This commit is contained in:
ruying408
2025-04-13 10:53:31 +08:00
parent 5cf762362d
commit 8931ac24cd
52 changed files with 4442 additions and 3605 deletions
+19 -19
View File
@@ -1,55 +1,55 @@
{
"hash": "d9b86bd3",
"configHash": "e63c5cfc",
"lockfileHash": "c55b7bf4",
"browserHash": "045a2561",
"hash": "2db8a438",
"configHash": "79f1e1cd",
"lockfileHash": "f052b98e",
"browserHash": "c985e4db",
"optimized": {
"vue": {
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "7bf05bff",
"fileHash": "3dbeaf7e",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
"src": "../../../node_modules/.pnpm/@vue+devtools-api@7.7.2/node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "ac0f4af7",
"fileHash": "438ef906",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../node_modules/@vueuse/core/index.mjs",
"src": "../../../node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "7c806c54",
"fileHash": "a26197c8",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
"src": "../../../node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.6.4/node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "ec243bc2",
"fileHash": "9fa24bbd",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../node_modules/mark.js/src/vanilla.js",
"src": "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "4d49e387",
"fileHash": "d7f4c694",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../node_modules/minisearch/dist/es/index.js",
"src": "../../../node_modules/.pnpm/minisearch@7.1.2/node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "9eb5370b",
"fileHash": "3cf8f096",
"needsInterop": false
},
"medium-zoom": {
"src": "../../../node_modules/medium-zoom/dist/medium-zoom.esm.js",
"src": "../../../node_modules/.pnpm/medium-zoom@1.1.0/node_modules/medium-zoom/dist/medium-zoom.esm.js",
"file": "medium-zoom.js",
"fileHash": "82de3862",
"fileHash": "bf9d03b4",
"needsInterop": false
}
},
"chunks": {
"chunk-GK7ZRSPS": {
"file": "chunk-GK7ZRSPS.js"
"chunk-YV5DHV7Y": {
"file": "chunk-YV5DHV7Y.js"
},
"chunk-XPVHNUZ4": {
"file": "chunk-XPVHNUZ4.js"
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,4 +1,4 @@
// node_modules/medium-zoom/dist/medium-zoom.esm.js
// node_modules/.pnpm/medium-zoom@1.1.0/node_modules/medium-zoom/dist/medium-zoom.esm.js
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+19 -3
View File
@@ -5,6 +5,7 @@ import {
assert,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsElement,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
@@ -28,6 +29,7 @@ import {
createFilterWrapper,
createGlobalState,
createInjectionState,
createRef,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
@@ -39,7 +41,6 @@ import {
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
executeTransition,
extendRef,
formatDate,
@@ -69,6 +70,7 @@ import {
objectOmit,
objectPick,
onClickOutside,
onElementRemoval,
onKeyDown,
onKeyPressed,
onKeyStroke,
@@ -78,6 +80,8 @@ import {
pausableFilter,
promiseTimeout,
provideLocal,
provideSSRWidth,
pxValue,
rand,
reactify,
reactifyObject,
@@ -98,6 +102,7 @@ import {
templateRef,
throttleFilter,
timestamp,
toArray,
toReactive,
toRef,
toRefs,
@@ -137,6 +142,7 @@ import {
useCloned,
useColorMode,
useConfirmDialog,
useCountdown,
useCounter,
useCssVar,
useCurrentElement,
@@ -211,10 +217,12 @@ import {
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePreferredReducedTransparency,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useSSRWidth,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
@@ -273,7 +281,7 @@ import {
watchTriggerable,
watchWithFilter,
whenever
} from "./chunk-GK7ZRSPS.js";
} from "./chunk-YV5DHV7Y.js";
import "./chunk-XPVHNUZ4.js";
export {
DefaultMagicKeysAliasMap,
@@ -284,6 +292,7 @@ export {
refAutoReset as autoResetRef,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsElement,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
@@ -309,6 +318,7 @@ export {
createGlobalState,
createInjectionState,
reactify as createReactiveFn,
createRef,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
@@ -322,7 +332,6 @@ export {
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
computedEager as eagerComputed,
executeTransition,
extendRef,
@@ -354,6 +363,7 @@ export {
objectOmit,
objectPick,
onClickOutside,
onElementRemoval,
onKeyDown,
onKeyPressed,
onKeyStroke,
@@ -364,6 +374,8 @@ export {
watchPausable as pausableWatch,
promiseTimeout,
provideLocal,
provideSSRWidth,
pxValue,
rand,
reactify,
reactifyObject,
@@ -386,6 +398,7 @@ export {
refThrottled as throttledRef,
watchThrottled as throttledWatch,
timestamp,
toArray,
toReactive,
toRef,
toRefs,
@@ -425,6 +438,7 @@ export {
useCloned,
useColorMode,
useConfirmDialog,
useCountdown,
useCounter,
useCssVar,
useCurrentElement,
@@ -500,10 +514,12 @@ export {
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePreferredReducedTransparency,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useSSRWidth,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
@@ -1,13 +1,17 @@
import {
notNullish,
toArray,
tryOnScopeDispose,
unrefElement
} from "./chunk-GK7ZRSPS.js";
} from "./chunk-YV5DHV7Y.js";
import {
ref,
computed,
shallowRef,
toValue,
watch
} from "./chunk-XPVHNUZ4.js";
// node_modules/tabbable/dist/index.esm.js
// node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js
var candidateSelectors = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"];
var candidateSelector = candidateSelectors.join(",");
var NoElement = typeof Element === "undefined";
@@ -338,7 +342,29 @@ var isFocusable = function isFocusable2(node, options) {
return isNodeMatchingSelectorFocusable(options, node);
};
// node_modules/focus-trap/dist/focus-trap.esm.js
// node_modules/.pnpm/focus-trap@7.6.4/node_modules/focus-trap/dist/focus-trap.esm.js
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return _arrayLikeToArray(r);
}
function _defineProperty(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: true,
configurable: true,
writable: true
}) : e[r] = t, e;
}
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -360,40 +386,36 @@ function _objectSpread2(e) {
}
return e;
}
function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== void 0) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
var activeFocusTraps = {
activateTrap: function activateTrap(trapStack, trap) {
if (trapStack.length > 0) {
var activeTrap = trapStack[trapStack.length - 1];
if (activeTrap !== trap) {
activeTrap.pause();
activeTrap._setPausedState(true);
}
}
var trapIndex = trapStack.indexOf(trap);
@@ -409,8 +431,8 @@ var activeFocusTraps = {
if (trapIndex !== -1) {
trapStack.splice(trapIndex, 1);
}
if (trapStack.length > 0) {
trapStack[trapStack.length - 1].unpause();
if (trapStack.length > 0 && !trapStack[trapStack.length - 1]._isManuallyPaused()) {
trapStack[trapStack.length - 1]._setPausedState(false);
}
}
};
@@ -432,17 +454,6 @@ var isKeyBackward = function isKeyBackward2(e) {
var delay = function delay2(fn) {
return setTimeout(fn, 0);
};
var findIndex = function findIndex2(arr, fn) {
var idx = -1;
arr.every(function(value, i) {
if (fn(value)) {
idx = i;
return false;
}
return true;
});
return idx;
};
var valueOrHandler = function valueOrHandler2(value) {
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
params[_key - 1] = arguments[_key];
@@ -494,6 +505,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
mostRecentlyFocusedNode: null,
active: false,
paused: false,
manuallyPaused: false,
// timer ID for when delayInitialFocus is true and initial focus in this trap
// has been delayed during activation
delayInitialFocusTimer: void 0,
@@ -518,12 +530,10 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
};
var getNodeForOption = function getNodeForOption2(optionName) {
var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$hasFallback = _ref2.hasFallback, hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback, _ref2$params = _ref2.params, params = _ref2$params === void 0 ? [] : _ref2$params;
var optionValue = config[optionName];
if (typeof optionValue === "function") {
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
params[_key2 - 1] = arguments[_key2];
}
optionValue = optionValue.apply(void 0, params);
optionValue = optionValue.apply(void 0, _toConsumableArray(params));
}
if (optionValue === true) {
optionValue = void 0;
@@ -536,19 +546,27 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
var node = optionValue;
if (typeof optionValue === "string") {
node = doc.querySelector(optionValue);
try {
node = doc.querySelector(optionValue);
} catch (err) {
throw new Error("`".concat(optionName, '` appears to be an invalid selector; error="').concat(err.message, '"'));
}
if (!node) {
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
if (!hasFallback) {
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
}
}
}
return node;
};
var getInitialFocusNode = function getInitialFocusNode2() {
var node = getNodeForOption("initialFocus");
var node = getNodeForOption("initialFocus", {
hasFallback: true
});
if (node === false) {
return false;
}
if (node === void 0 || !isFocusable(node, config.tabbableOptions)) {
if (node === void 0 || node && !isFocusable(node, config.tabbableOptions)) {
if (findContainerIndex(doc.activeElement) >= 0) {
node = doc.activeElement;
} else {
@@ -556,6 +574,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
node = firstTabbableNode || getNodeForOption("fallbackFocus");
}
} else if (node === null) {
node = getNodeForOption("fallbackFocus");
}
if (!node) {
throw new Error("Your focus-trap needs to have at least one focusable element");
@@ -635,25 +655,25 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
}
};
var getActiveElement = function getActiveElement2(el) {
var _getActiveElement = function getActiveElement(el) {
var activeElement = el.activeElement;
if (!activeElement) {
return;
}
if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
return getActiveElement2(activeElement.shadowRoot);
return _getActiveElement(activeElement.shadowRoot);
}
return activeElement;
};
var tryFocus = function tryFocus2(node) {
var _tryFocus = function tryFocus(node) {
if (node === false) {
return;
}
if (node === getActiveElement(document)) {
if (node === _getActiveElement(document)) {
return;
}
if (!node || !node.focus) {
tryFocus2(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
return;
}
node.focus({
@@ -665,11 +685,13 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
};
var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {
var node = getNodeForOption("setReturnFocus", previousActiveElement);
var node = getNodeForOption("setReturnFocus", {
params: [previousActiveElement]
});
return node ? node : node === false ? false : previousActiveElement;
};
var findNextNavNode = function findNextNavNode2(_ref2) {
var target = _ref2.target, event = _ref2.event, _ref2$isBackward = _ref2.isBackward, isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
var findNextNavNode = function findNextNavNode2(_ref3) {
var target = _ref3.target, event = _ref3.event, _ref3$isBackward = _ref3.isBackward, isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
target = target || getActualTarget(event);
updateTabbableNodes();
var destinationNode = null;
@@ -683,8 +705,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
destinationNode = state.tabbableGroups[0].firstTabbableNode;
}
} else if (isBackward) {
var startOfGroupIndex = findIndex(state.tabbableGroups, function(_ref3) {
var firstTabbableNode = _ref3.firstTabbableNode;
var startOfGroupIndex = state.tabbableGroups.findIndex(function(_ref4) {
var firstTabbableNode = _ref4.firstTabbableNode;
return target === firstTabbableNode;
});
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
@@ -698,8 +720,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
destinationNode = containerGroup.nextTabbableNode(target, false);
}
} else {
var lastOfGroupIndex = findIndex(state.tabbableGroups, function(_ref4) {
var lastTabbableNode = _ref4.lastTabbableNode;
var lastOfGroupIndex = state.tabbableGroups.findIndex(function(_ref5) {
var lastTabbableNode = _ref5.lastTabbableNode;
return target === lastTabbableNode;
});
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
@@ -794,9 +816,9 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
}
if (nextNode) {
tryFocus(nextNode);
_tryFocus(nextNode);
} else {
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
_tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
}
}
state.recentNavEvent = void 0;
@@ -812,17 +834,18 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
if (isTabEvent(event)) {
event.preventDefault();
}
tryFocus(destinationNode);
_tryFocus(destinationNode);
}
};
var checkKey = function checkKey2(event) {
var checkTabKey = function checkTabKey2(event) {
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
checkKeyNav(event, config.isKeyBackward(event));
}
};
var checkEscapeKey = function checkEscapeKey2(event) {
if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
event.preventDefault();
trap.deactivate();
return;
}
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
checkKeyNav(event, config.isKeyBackward(event));
}
};
var checkClick = function checkClick2(e) {
@@ -845,8 +868,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
activeFocusTraps.activateTrap(trapStack, trap);
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function() {
tryFocus(getInitialFocusNode());
}) : tryFocus(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
}) : _tryFocus(getInitialFocusNode());
doc.addEventListener("focusin", checkFocusIn, true);
doc.addEventListener("mousedown", checkPointerDown, {
capture: true,
@@ -860,10 +883,11 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
capture: true,
passive: false
});
doc.addEventListener("keydown", checkKey, {
doc.addEventListener("keydown", checkTabKey, {
capture: true,
passive: false
});
doc.addEventListener("keydown", checkEscapeKey);
return trap;
};
var removeListeners = function removeListeners2() {
@@ -874,7 +898,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
doc.removeEventListener("mousedown", checkPointerDown, true);
doc.removeEventListener("touchstart", checkPointerDown, true);
doc.removeEventListener("click", checkClick, true);
doc.removeEventListener("keydown", checkKey, true);
doc.removeEventListener("keydown", checkTabKey, true);
doc.removeEventListener("keydown", checkEscapeKey);
return trap;
};
var checkDomRemoval = function checkDomRemoval2(mutations) {
@@ -885,7 +910,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
});
if (isFocusedNodeRemoved) {
tryFocus(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
}
};
var mutationObserver = typeof window !== "undefined" && "MutationObserver" in window ? new MutationObserver(checkDomRemoval) : void 0;
@@ -963,7 +988,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
var finishDeactivation = function finishDeactivation2() {
delay(function() {
if (returnFocus) {
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
_tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
}
onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();
});
@@ -976,31 +1001,21 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
return this;
},
pause: function pause(pauseOptions) {
if (state.paused || !state.active) {
if (!state.active) {
return this;
}
var onPause = getOption(pauseOptions, "onPause");
var onPostPause = getOption(pauseOptions, "onPostPause");
state.paused = true;
onPause === null || onPause === void 0 || onPause();
removeListeners();
updateObservedNodes();
onPostPause === null || onPostPause === void 0 || onPostPause();
return this;
state.manuallyPaused = true;
return this._setPausedState(true, pauseOptions);
},
unpause: function unpause(unpauseOptions) {
if (!state.paused || !state.active) {
if (!state.active) {
return this;
}
var onUnpause = getOption(unpauseOptions, "onUnpause");
var onPostUnpause = getOption(unpauseOptions, "onPostUnpause");
state.paused = false;
onUnpause === null || onUnpause === void 0 || onUnpause();
updateTabbableNodes();
addListeners();
updateObservedNodes();
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
return this;
state.manuallyPaused = false;
if (trapStack[trapStack.length - 1] !== this) {
return this;
}
return this._setPausedState(false, unpauseOptions);
},
updateContainerElements: function updateContainerElements(containerElements) {
var elementsAsArray = [].concat(containerElements).filter(Boolean);
@@ -1014,16 +1029,48 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
return this;
}
};
Object.defineProperties(trap, {
_isManuallyPaused: {
value: function value() {
return state.manuallyPaused;
}
},
_setPausedState: {
value: function value(paused, options) {
if (state.paused === paused) {
return this;
}
state.paused = paused;
if (paused) {
var onPause = getOption(options, "onPause");
var onPostPause = getOption(options, "onPostPause");
onPause === null || onPause === void 0 || onPause();
removeListeners();
updateObservedNodes();
onPostPause === null || onPostPause === void 0 || onPostPause();
} else {
var onUnpause = getOption(options, "onUnpause");
var onPostUnpause = getOption(options, "onPostUnpause");
onUnpause === null || onUnpause === void 0 || onUnpause();
updateTabbableNodes();
addListeners();
updateObservedNodes();
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
}
return this;
}
}
});
trap.updateContainerElements(elements);
return trap;
};
// node_modules/@vueuse/integrations/useFocusTrap.mjs
// node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.6.4/node_modules/@vueuse/integrations/useFocusTrap.mjs
function useFocusTrap(target, options = {}) {
let trap;
const { immediate, ...focusTrapOptions } = options;
const hasFocus = ref(false);
const isPaused = ref(false);
const hasFocus = shallowRef(false);
const isPaused = shallowRef(false);
const activate = (opts) => trap && trap.activate(opts);
const deactivate = (opts) => trap && trap.deactivate(opts);
const pause = () => {
@@ -1038,12 +1085,19 @@ function useFocusTrap(target, options = {}) {
isPaused.value = false;
}
};
const targets = computed(() => {
const _targets = toValue(target);
return toArray(_targets).map((el) => {
const _el = toValue(el);
return typeof _el === "string" ? _el : unrefElement(_el);
}).filter(notNullish);
});
watch(
() => unrefElement(target),
(el) => {
if (!el)
targets,
(els) => {
if (!els.length)
return;
trap = createFocusTrap(el, {
trap = createFocusTrap(els, {
...focusTrapOptions,
onActivate() {
hasFocus.value = true;
@@ -1084,7 +1138,7 @@ tabbable/dist/index.esm.js:
focus-trap/dist/focus-trap.esm.js:
(*!
* focus-trap 7.5.4
* focus-trap 7.6.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*)
*/
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
// node_modules/mark.js/src/lib/domiterator.js
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/domiterator.js
var DOMIterator = class _DOMIterator {
/**
* @param {HTMLElement|HTMLElement[]|NodeList|string} ctx - The context DOM
@@ -494,7 +494,7 @@ var DOMIterator = class _DOMIterator {
*/
};
// node_modules/mark.js/src/lib/mark.js
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/mark.js
var Mark = class {
// eslint-disable-line no-unused-vars
/**
@@ -1638,7 +1638,7 @@ var Mark = class {
}
};
// node_modules/mark.js/src/vanilla.js
// node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js
function Mark2(ctx) {
const instance = new Mark(ctx);
this.mark = (sv, opt) => {
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -52,7 +52,7 @@ export default defineConfig({
{ text: "🔥插件市场", link: "https://cool-js.com/plugin" },
{ text: "交流合作", link: "/src/about/index.md" },
{
text: "v7.1.0",
text: "v8.0.0",
items: [
{
text: "更新日志",
+2 -2
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{R as p}from"./chunks/theme.BG3pNQ3U.js";import{U as s,a5 as i,a6 as u,a7 as c,a8 as l,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,d as v,u as w,s as y,q as C,af as P,ag as R,ah as b,ai as E}from"./chunks/framework.BjhQB2K5.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=w();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&P(),R(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
import{R as p}from"./chunks/theme.Dh5vPo0_.js";import{U as s,a5 as i,a6 as u,a7 as c,a8 as l,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,d as v,u as w,s as y,q as C,af as P,ag as R,ah as b,ai as E}from"./chunks/framework.BjhQB2K5.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=w();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&P(),R(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long