deploy: v0.12 fix 存档key名

This commit is contained in:
2026-06-24 03:09:02 +00:00
parent 7a08d49fe3
commit e0a5281119
58743 changed files with 7297269 additions and 39505 deletions
+144
View File
@@ -0,0 +1,144 @@
import 'intersection-observer';
import { useState, useEffect } from 'react';
import useLayoutEffect from '@react-hook/passive-layout-effect';
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
function useIntersectionObserver(target, options) {
if (options === void 0) {
options = {};
}
var {
root = null,
pollInterval = null,
useMutationObserver = false,
rootMargin = '0px 0px 0px 0px',
threshold = 0,
initialIsIntersecting = false
} = options;
var [entry, setEntry] = useState(() => ({
boundingClientRect: null,
intersectionRatio: 0,
intersectionRect: null,
isIntersecting: initialIsIntersecting,
rootBounds: null,
target: null,
time: 0
}));
var [observer, setObserver] = useState(() => getIntersectionObserver({
root,
pollInterval,
useMutationObserver,
rootMargin,
threshold
}));
useEffect(() => {
var observer = getIntersectionObserver({
root,
pollInterval,
useMutationObserver,
rootMargin,
threshold
});
setObserver(observer); // eslint-disable-next-line react-hooks/exhaustive-deps
}, [root, rootMargin, pollInterval, useMutationObserver, JSON.stringify(threshold)]);
useLayoutEffect(() => {
var targetEl = target && 'current' in target ? target.current : target;
if (!observer || !targetEl) return;
var didUnsubscribe = false;
observer.observer.observe(targetEl);
var callback = entries => {
if (didUnsubscribe) return;
for (var i = 0; i < entries.length; i++) {
var _entry = entries[i];
if (_entry.target === targetEl) {
setEntry(_entry);
}
}
};
observer.subscribe(callback);
return () => {
didUnsubscribe = true;
observer.observer.unobserve(targetEl);
observer.unsubscribe(callback);
};
}, [target, observer]);
return entry;
}
function createIntersectionObserver(_ref) {
var {
root = null,
pollInterval = null,
useMutationObserver = false,
rootMargin = '0px 0px 0px 0px',
threshold = 0
} = _ref;
var callbacks = new Set();
if (typeof IntersectionObserver === 'undefined') return null;
var observer = new IntersectionObserver(entries => {
for (var callback of callbacks) {
callback(entries, observer);
}
}, {
root,
rootMargin,
threshold
}); // @ts-ignore
observer.POLL_INTERVAL = pollInterval; // @ts-ignore
observer.USE_MUTATION_OBSERVER = useMutationObserver;
return {
observer,
getListeners() {
return callbacks;
},
subscribe: callback => callbacks.add(callback),
unsubscribe: callback => callbacks.delete(callback)
};
}
var _intersectionObserver = /*#__PURE__*/new Map();
function getIntersectionObserver(options) {
var {
root
} = options,
keys = _objectWithoutPropertiesLoose(options, ["root"]);
var key = JSON.stringify(keys);
var base = _intersectionObserver.get(root);
if (!base) {
base = {};
_intersectionObserver.set(root, base);
}
return !base[key] ? base[key] = createIntersectionObserver(options) : base[key];
}
export default useIntersectionObserver;
//# sourceMappingURL=index.dev.mjs.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
function r(r){var{root:e}=r,t=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],0>e.indexOf(t)&&(o[t]=r[t]);return o}(r,["root"]),n=JSON.stringify(t),i=o.get(e);return i||(i={},o.set(e,i)),i[n]?i[n]:i[n]=function(r){var{root:e=null,pollInterval:t=null,useMutationObserver:n=0,rootMargin:o="0px 0px 0px 0px",threshold:i=0}=r,s=new Set;if("undefined"==typeof IntersectionObserver)return null;var l=new IntersectionObserver(r=>{for(var e of s)e(r,l)},{root:e,rootMargin:o,threshold:i});return l.POLL_INTERVAL=t,l.USE_MUTATION_OBSERVER=n,{observer:l,getListeners:()=>s,subscribe:r=>s.add(r),unsubscribe:r=>s.delete(r)}}(r)}import"intersection-observer";import{useState as e,useEffect as t}from"react";import n from"@react-hook/passive-layout-effect";var o=new Map;export default function(o,i){void 0===i&&(i={});var{root:s=null,pollInterval:l=null,useMutationObserver:u=0,rootMargin:a="0px 0px 0px 0px",threshold:v=0,initialIsIntersecting:c=0}=i,[b,f]=e(()=>({boundingClientRect:null,intersectionRatio:0,intersectionRect:null,isIntersecting:c,rootBounds:null,target:null,time:0})),[p,g]=e(()=>r({root:s,pollInterval:l,useMutationObserver:u,rootMargin:a,threshold:v}));return t(()=>{var e=r({root:s,pollInterval:l,useMutationObserver:u,rootMargin:a,threshold:v});g(e)},[s,a,l,u,JSON.stringify(v)]),n(()=>{var r=o&&"current"in o?o.current:o;if(p&&r){var e=0;p.observer.observe(r);var t=t=>{if(!e)for(var n=0;n<t.length;n++){var o=t[n];o.target===r&&f(o)}};return p.subscribe(t),()=>{e=1,p.observer.unobserve(r),p.unsubscribe(t)}}},[o,p]),b}
//# sourceMappingURL=index.mjs.map
File diff suppressed because one or more lines are too long