feat: Finalize VitePress site structure and styling

This commit is contained in:
tycon
2025-10-11 23:05:08 +08:00
parent 86777756b4
commit bca5292f1f
4460 changed files with 1059060 additions and 9046 deletions

38
node_modules/copy-anything/dist/cjs/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,38 @@
'use strict';
const isWhat = require('is-what');
function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
if (propType === "enumerable")
carry[key] = newVal;
if (includeNonenumerable && propType === "nonenumerable") {
Object.defineProperty(carry, key, {
value: newVal,
enumerable: false,
writable: true,
configurable: true
});
}
}
function copy(target, options = {}) {
if (isWhat.isArray(target)) {
return target.map((item) => copy(item, options));
}
if (!isWhat.isPlainObject(target)) {
return target;
}
const props = Object.getOwnPropertyNames(target);
const symbols = Object.getOwnPropertySymbols(target);
return [...props, ...symbols].reduce((carry, key) => {
if (isWhat.isArray(options.props) && !options.props.includes(key)) {
return carry;
}
const val = target[key];
const newVal = copy(val, options);
assignProp(carry, key, newVal, target, options.nonenumerable);
return carry;
}, {});
}
exports.copy = copy;

14
node_modules/copy-anything/dist/cjs/index.d.cts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
type Options = {
props?: (string | symbol)[];
nonenumerable?: boolean;
};
/**
* Copy (clone) an object and all its props recursively to get rid of any prop referenced of the original object. Arrays are also cloned, however objects inside arrays are still linked.
*
* @param target Target can be anything
* @param [options = {}] Options can be `props` or `nonenumerable`
* @returns the target with replaced values
*/
declare function copy<T>(target: T, options?: Options): T;
export { Options, copy };

14
node_modules/copy-anything/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
type Options = {
props?: (string | symbol)[];
nonenumerable?: boolean;
};
/**
* Copy (clone) an object and all its props recursively to get rid of any prop referenced of the original object. Arrays are also cloned, however objects inside arrays are still linked.
*
* @param target Target can be anything
* @param [options = {}] Options can be `props` or `nonenumerable`
* @returns the target with replaced values
*/
declare function copy<T>(target: T, options?: Options): T;
export { Options, copy };

36
node_modules/copy-anything/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
import { isArray, isPlainObject } from 'is-what';
function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
if (propType === "enumerable")
carry[key] = newVal;
if (includeNonenumerable && propType === "nonenumerable") {
Object.defineProperty(carry, key, {
value: newVal,
enumerable: false,
writable: true,
configurable: true
});
}
}
function copy(target, options = {}) {
if (isArray(target)) {
return target.map((item) => copy(item, options));
}
if (!isPlainObject(target)) {
return target;
}
const props = Object.getOwnPropertyNames(target);
const symbols = Object.getOwnPropertySymbols(target);
return [...props, ...symbols].reduce((carry, key) => {
if (isArray(options.props) && !options.props.includes(key)) {
return carry;
}
const val = target[key];
const newVal = copy(val, options);
assignProp(carry, key, newVal, target, options.nonenumerable);
return carry;
}, {});
}
export { copy };