fast-element-plus 2.0.16 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/component.d.ts +6570 -2
- package/dist/component.mjs.map +1 -1
- package/dist/components/avatar/src/avatar.d.ts +19 -7
- package/dist/components/avatar/src/avatar.mjs +5 -0
- package/dist/components/avatar/src/avatar.mjs.map +1 -1
- package/dist/components/button/src/button.d.ts +4 -4
- package/dist/components/button/src/button.mjs +3 -4
- package/dist/components/button/src/button.mjs.map +1 -1
- package/dist/components/carNumber/src/carNumber.mjs +7 -9
- package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
- package/dist/components/contextMenu/src/contextMenu.mjs +8 -7
- package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/dist/components/dialog/src/dialog.d.ts +7 -4
- package/dist/components/dialog/src/dialog.mjs +6 -7
- package/dist/components/dialog/src/dialog.mjs.map +1 -1
- package/dist/components/drawer/src/drawer.mjs +14 -14
- package/dist/components/drawer/src/drawer.mjs.map +1 -1
- package/dist/components/form/src/form.d.ts +36 -24
- package/dist/components/form/src/form.mjs +8 -9
- package/dist/components/form/src/form.mjs.map +1 -1
- package/dist/components/form/src/formItem.d.ts +3 -3
- package/dist/components/form/src/formItem.mjs +18 -17
- package/dist/components/form/src/formItem.mjs.map +1 -1
- package/dist/components/form/utils/form.d.ts +2 -2
- package/dist/components/form/utils/form.mjs +2 -2
- package/dist/components/form/utils/form.mjs.map +1 -1
- package/dist/components/icon/src/icon.mjs.map +1 -1
- package/dist/components/iconSelector/src/iconSelector.d.ts +2 -2
- package/dist/components/iconSelector/src/iconSelector.mjs +4 -5
- package/dist/components/iconSelector/src/iconSelector.mjs.map +1 -1
- package/dist/components/image/src/image.d.ts +1 -1
- package/dist/components/image/src/image.mjs +2 -2
- package/dist/components/image/src/image.mjs.map +1 -1
- package/dist/components/inputDialogPage/src/inputDialogPage.mjs +10 -12
- package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
- package/dist/components/layoutGrid/src/layoutGrid.d.ts +23 -11
- package/dist/components/layoutGrid/src/layoutGrid.mjs +42 -43
- package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
- package/dist/components/layoutGrid/src/layoutGrid.type.d.ts +1 -1
- package/dist/components/layoutGrid/src/layoutGridItem.mjs +13 -14
- package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
- package/dist/components/select/src/select.d.ts +27 -12
- package/dist/components/select/src/select.mjs +46 -44
- package/dist/components/select/src/select.mjs.map +1 -1
- package/dist/components/select/src/selectOption.mjs +4 -5
- package/dist/components/select/src/selectOption.mjs.map +1 -1
- package/dist/components/selectPage/src/selectPage.d.ts +24 -9
- package/dist/components/selectPage/src/selectPage.mjs +45 -52
- package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
- package/dist/components/selectV2/src/selectV2.d.ts +49 -29
- package/dist/components/selectV2/src/selectV2.mjs +64 -62
- package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
- package/dist/components/table/src/table.d.ts +63 -29
- package/dist/components/table/src/table.mjs +77 -81
- package/dist/components/table/src/table.mjs.map +1 -1
- package/dist/components/table/src/table.type.d.ts +2 -2
- package/dist/components/table/src/table.type.mjs.map +1 -1
- package/dist/components/table/src/tableColumn.d.ts +7 -7
- package/dist/components/table/src/tableColumn.mjs +17 -30
- package/dist/components/table/src/tableColumn.mjs.map +1 -1
- package/dist/components/table/src/tableColumnSettingDialog.mjs +24 -14
- package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
- package/dist/components/table/src/tablePagination.mjs +2 -3
- package/dist/components/table/src/tablePagination.mjs.map +1 -1
- package/dist/components/table/src/tableSearchForm.d.ts +4 -4
- package/dist/components/table/src/tableSearchForm.mjs +24 -27
- package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
- package/dist/components/table/src/tableSearchFormItem.d.ts +1 -7
- package/dist/components/table/src/tableSearchFormItem.mjs +3 -6
- package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
- package/dist/components/table/src/useTable.d.ts +4 -4
- package/dist/components/table/src/useTable.mjs +13 -14
- package/dist/components/table/src/useTable.mjs.map +1 -1
- package/dist/components/table/utils/table.mjs +5 -7
- package/dist/components/table/utils/table.mjs.map +1 -1
- package/dist/components/tree/src/tree.d.ts +6 -6
- package/dist/components/tree/src/tree.mjs +28 -26
- package/dist/components/tree/src/tree.mjs.map +1 -1
- package/dist/components/treeSelect/src/treeSelect.d.ts +30 -27
- package/dist/components/treeSelect/src/treeSelect.mjs +45 -43
- package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/dist/components/upload/src/upload.d.ts +1 -1
- package/dist/components/upload/src/upload.mjs +4 -5
- package/dist/components/upload/src/upload.mjs.map +1 -1
- package/dist/components/upload/src/useUpload.mjs +5 -7
- package/dist/components/upload/src/useUpload.mjs.map +1 -1
- package/dist/components/upload/utils/upload.mjs +1 -1
- package/dist/components/upload/utils/upload.mjs.map +1 -1
- package/dist/components/uploadImage/src/uploadImage.d.ts +1 -1
- package/dist/components/uploadImage/src/uploadImage.mjs +7 -8
- package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/dist/components/uploadImages/src/uploadImages.d.ts +1 -1
- package/dist/components/uploadImages/src/uploadImages.mjs +7 -8
- package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
- package/dist/directives/click-copy/index.mjs +5 -9
- package/dist/directives/click-copy/index.mjs.map +1 -1
- package/dist/element-plus.mjs +5 -6
- package/dist/element-plus.mjs.map +1 -1
- package/dist/hooks/use-screenFull/index.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.global.min.js +4 -4
- package/dist/index.global.min.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/object/index.d.ts +8 -0
- package/dist/utils/object/index.mjs +113 -0
- package/dist/utils/object/index.mjs.map +1 -0
- package/dist/utils/string/index.mjs.map +1 -1
- package/dist/utils/vue/emits.mjs.map +1 -1
- package/dist/utils/vue/install.mjs.map +1 -1
- package/dist/utils/vue/render.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +4 -9
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 深度比较两个值,支持常见对象、集合、二进制数据与循环引用。 */
|
|
2
|
+
export declare const isEqual: (left: unknown, right: unknown) => boolean;
|
|
3
|
+
/** 从对象中选择指定的自身属性。 */
|
|
4
|
+
export declare function pick<Source extends object, Key extends keyof Source>(source: Source, keys: readonly Key[]): Pick<Source, Key>;
|
|
5
|
+
export declare function pick<Source extends object>(source: Source, keys: readonly PropertyKey[]): Partial<Source>;
|
|
6
|
+
/** 从对象中排除指定的自身属性。 */
|
|
7
|
+
export declare function omit<Source extends object, Key extends keyof Source>(source: Source, keys: readonly Key[]): Omit<Source, Key>;
|
|
8
|
+
export declare function omit<Source extends object>(source: Source, keys: readonly PropertyKey[]): Partial<Source>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
//#region src/utils/object/index.ts
|
|
2
|
+
/** 返回值对应的内建对象标签。 */
|
|
3
|
+
const getObjectTag = (value) => Object.prototype.toString.call(value);
|
|
4
|
+
/** 判断两个值是否相等,并将 `NaN` 视为相等。 */
|
|
5
|
+
const isSameValue = (left, right) => left === right || typeof left === "number" && typeof right === "number" && Number.isNaN(left) && Number.isNaN(right);
|
|
6
|
+
/** 返回对象自身可枚举的字符串键和 Symbol 键。 */
|
|
7
|
+
const getEnumerableKeys = (value) => Reflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));
|
|
8
|
+
/** 比较 ArrayBuffer 或视图所覆盖的二进制内容。 */
|
|
9
|
+
const isBinaryEqual = (left, leftOffset, leftLength, right, rightOffset, rightLength) => {
|
|
10
|
+
if (leftLength !== rightLength) return false;
|
|
11
|
+
const leftBytes = new Uint8Array(left, leftOffset, leftLength);
|
|
12
|
+
const rightBytes = new Uint8Array(right, rightOffset, rightLength);
|
|
13
|
+
return leftBytes.every((value, index) => value === rightBytes[index]);
|
|
14
|
+
};
|
|
15
|
+
/** 深度比较内部实现;两个栈用于识别循环引用。 */
|
|
16
|
+
const compare = (left, right, leftStack, rightStack) => {
|
|
17
|
+
if (isSameValue(left, right)) return true;
|
|
18
|
+
if (typeof left !== "object" || left === null || typeof right !== "object" || right === null) return false;
|
|
19
|
+
const leftCycleIndex = leftStack.lastIndexOf(left);
|
|
20
|
+
if (leftCycleIndex >= 0) return rightStack[leftCycleIndex] === right;
|
|
21
|
+
if (rightStack.includes(right)) return false;
|
|
22
|
+
const leftTag = getObjectTag(left);
|
|
23
|
+
if (leftTag !== getObjectTag(right)) return false;
|
|
24
|
+
leftStack.push(left);
|
|
25
|
+
rightStack.push(right);
|
|
26
|
+
try {
|
|
27
|
+
if (ArrayBuffer.isView(left) || ArrayBuffer.isView(right)) return ArrayBuffer.isView(left) && ArrayBuffer.isView(right) && isBinaryEqual(left.buffer, left.byteOffset, left.byteLength, right.buffer, right.byteOffset, right.byteLength);
|
|
28
|
+
switch (leftTag) {
|
|
29
|
+
case "[object Array]": {
|
|
30
|
+
const leftArray = left;
|
|
31
|
+
const rightArray = right;
|
|
32
|
+
return leftArray.length === rightArray.length && leftArray.every((value, index) => compare(value, rightArray[index], leftStack, rightStack));
|
|
33
|
+
}
|
|
34
|
+
case "[object ArrayBuffer]": {
|
|
35
|
+
const leftBuffer = left;
|
|
36
|
+
const rightBuffer = right;
|
|
37
|
+
return isBinaryEqual(leftBuffer, 0, leftBuffer.byteLength, rightBuffer, 0, rightBuffer.byteLength);
|
|
38
|
+
}
|
|
39
|
+
case "[object BigInt]":
|
|
40
|
+
case "[object Boolean]":
|
|
41
|
+
case "[object Number]":
|
|
42
|
+
case "[object String]":
|
|
43
|
+
case "[object Symbol]": return isSameValue(left.valueOf(), right.valueOf());
|
|
44
|
+
case "[object Date]": return isSameValue(left.getTime(), right.getTime());
|
|
45
|
+
case "[object Error]": {
|
|
46
|
+
const leftError = left;
|
|
47
|
+
const rightError = right;
|
|
48
|
+
return leftError.name === rightError.name && leftError.message === rightError.message;
|
|
49
|
+
}
|
|
50
|
+
case "[object Map]": {
|
|
51
|
+
const leftMap = left;
|
|
52
|
+
const rightEntries = [...right.entries()];
|
|
53
|
+
if (leftMap.size !== rightEntries.length) return false;
|
|
54
|
+
const matchedIndexes = /* @__PURE__ */ new Set();
|
|
55
|
+
for (const [leftKey, leftValue] of leftMap) {
|
|
56
|
+
const matchIndex = rightEntries.findIndex(([rightKey, rightValue], index) => !matchedIndexes.has(index) && compare(leftKey, rightKey, leftStack, rightStack) && compare(leftValue, rightValue, leftStack, rightStack));
|
|
57
|
+
if (matchIndex < 0) return false;
|
|
58
|
+
matchedIndexes.add(matchIndex);
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
case "[object RegExp]": {
|
|
63
|
+
const leftRegExp = left;
|
|
64
|
+
const rightRegExp = right;
|
|
65
|
+
return leftRegExp.source === rightRegExp.source && leftRegExp.flags === rightRegExp.flags;
|
|
66
|
+
}
|
|
67
|
+
case "[object Set]": {
|
|
68
|
+
const leftSet = left;
|
|
69
|
+
const rightValues = [...right.values()];
|
|
70
|
+
if (leftSet.size !== rightValues.length) return false;
|
|
71
|
+
const matchedIndexes = /* @__PURE__ */ new Set();
|
|
72
|
+
for (const leftValue of leftSet) {
|
|
73
|
+
const matchIndex = rightValues.findIndex((rightValue, index) => !matchedIndexes.has(index) && compare(leftValue, rightValue, leftStack, rightStack));
|
|
74
|
+
if (matchIndex < 0) return false;
|
|
75
|
+
matchedIndexes.add(matchIndex);
|
|
76
|
+
}
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
case "[object Object]": {
|
|
80
|
+
if (Object.getPrototypeOf(left) !== Object.getPrototypeOf(right)) return false;
|
|
81
|
+
const leftKeys = getEnumerableKeys(left);
|
|
82
|
+
const rightKeys = getEnumerableKeys(right);
|
|
83
|
+
if (leftKeys.length !== rightKeys.length || leftKeys.some((key) => !rightKeys.includes(key))) return false;
|
|
84
|
+
const leftRecord = left;
|
|
85
|
+
const rightRecord = right;
|
|
86
|
+
return leftKeys.every((key) => compare(leftRecord[key], rightRecord[key], leftStack, rightStack));
|
|
87
|
+
}
|
|
88
|
+
default: return false;
|
|
89
|
+
}
|
|
90
|
+
} finally {
|
|
91
|
+
leftStack.pop();
|
|
92
|
+
rightStack.pop();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/** 深度比较两个值,支持常见对象、集合、二进制数据与循环引用。 */
|
|
96
|
+
const isEqual = (left, right) => compare(left, right, [], []);
|
|
97
|
+
function pick(source, keys) {
|
|
98
|
+
const sourceRecord = source;
|
|
99
|
+
const result = {};
|
|
100
|
+
for (const key of keys) if (Object.hasOwn(source, key)) result[key] = sourceRecord[key];
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
function omit(source, keys) {
|
|
104
|
+
const omittedKeys = new Set(keys);
|
|
105
|
+
const sourceRecord = source;
|
|
106
|
+
const result = {};
|
|
107
|
+
for (const key of getEnumerableKeys(source)) if (!omittedKeys.has(key)) result[key] = sourceRecord[key];
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { isEqual, omit, pick };
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/object/index.ts"],"sourcesContent":["/** 返回值对应的内建对象标签。 */\nconst getObjectTag = (value: object): string => Object.prototype.toString.call(value);\n\n/** 判断两个值是否相等,并将 `NaN` 视为相等。 */\nconst isSameValue = (left: unknown, right: unknown): boolean =>\n\tleft === right || (typeof left === \"number\" && typeof right === \"number\" && Number.isNaN(left) && Number.isNaN(right));\n\n/** 返回对象自身可枚举的字符串键和 Symbol 键。 */\nconst getEnumerableKeys = (value: object): PropertyKey[] =>\n\tReflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));\n\n/** 比较 ArrayBuffer 或视图所覆盖的二进制内容。 */\nconst isBinaryEqual = (\n\tleft: ArrayBufferLike,\n\tleftOffset: number,\n\tleftLength: number,\n\tright: ArrayBufferLike,\n\trightOffset: number,\n\trightLength: number\n): boolean => {\n\tif (leftLength !== rightLength) return false;\n\tconst leftBytes = new Uint8Array(left, leftOffset, leftLength);\n\tconst rightBytes = new Uint8Array(right, rightOffset, rightLength);\n\treturn leftBytes.every((value, index) => value === rightBytes[index]);\n};\n\n/** 深度比较内部实现;两个栈用于识别循环引用。 */\nconst compare = (left: unknown, right: unknown, leftStack: object[], rightStack: object[]): boolean => {\n\tif (isSameValue(left, right)) return true;\n\tif (typeof left !== \"object\" || left === null || typeof right !== \"object\" || right === null) return false;\n\n\tconst leftCycleIndex = leftStack.lastIndexOf(left);\n\tif (leftCycleIndex >= 0) return rightStack[leftCycleIndex] === right;\n\tif (rightStack.includes(right)) return false;\n\n\tconst leftTag = getObjectTag(left);\n\tif (leftTag !== getObjectTag(right)) return false;\n\n\tleftStack.push(left);\n\trightStack.push(right);\n\ttry {\n\t\tif (ArrayBuffer.isView(left) || ArrayBuffer.isView(right)) {\n\t\t\treturn (\n\t\t\t\tArrayBuffer.isView(left) &&\n\t\t\t\tArrayBuffer.isView(right) &&\n\t\t\t\tisBinaryEqual(left.buffer, left.byteOffset, left.byteLength, right.buffer, right.byteOffset, right.byteLength)\n\t\t\t);\n\t\t}\n\n\t\tswitch (leftTag) {\n\t\t\tcase \"[object Array]\": {\n\t\t\t\tconst leftArray = left as unknown[];\n\t\t\t\tconst rightArray = right as unknown[];\n\t\t\t\treturn (\n\t\t\t\t\tleftArray.length === rightArray.length &&\n\t\t\t\t\tleftArray.every((value, index) => compare(value, rightArray[index], leftStack, rightStack))\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase \"[object ArrayBuffer]\": {\n\t\t\t\tconst leftBuffer = left as ArrayBuffer;\n\t\t\t\tconst rightBuffer = right as ArrayBuffer;\n\t\t\t\treturn isBinaryEqual(leftBuffer, 0, leftBuffer.byteLength, rightBuffer, 0, rightBuffer.byteLength);\n\t\t\t}\n\t\t\tcase \"[object BigInt]\":\n\t\t\tcase \"[object Boolean]\":\n\t\t\tcase \"[object Number]\":\n\t\t\tcase \"[object String]\":\n\t\t\tcase \"[object Symbol]\":\n\t\t\t\treturn isSameValue(left.valueOf(), right.valueOf());\n\t\t\tcase \"[object Date]\":\n\t\t\t\treturn isSameValue((left as Date).getTime(), (right as Date).getTime());\n\t\t\tcase \"[object Error]\": {\n\t\t\t\tconst leftError = left as Error;\n\t\t\t\tconst rightError = right as Error;\n\t\t\t\treturn leftError.name === rightError.name && leftError.message === rightError.message;\n\t\t\t}\n\t\t\tcase \"[object Map]\": {\n\t\t\t\tconst leftMap = left as Map<unknown, unknown>;\n\t\t\t\tconst rightEntries = [...(right as Map<unknown, unknown>).entries()];\n\t\t\t\tif (leftMap.size !== rightEntries.length) return false;\n\t\t\t\tconst matchedIndexes = new Set<number>();\n\t\t\t\tfor (const [leftKey, leftValue] of leftMap) {\n\t\t\t\t\tconst matchIndex = rightEntries.findIndex(\n\t\t\t\t\t\t([rightKey, rightValue], index) =>\n\t\t\t\t\t\t\t!matchedIndexes.has(index) &&\n\t\t\t\t\t\t\tcompare(leftKey, rightKey, leftStack, rightStack) &&\n\t\t\t\t\t\t\tcompare(leftValue, rightValue, leftStack, rightStack)\n\t\t\t\t\t);\n\t\t\t\t\tif (matchIndex < 0) return false;\n\t\t\t\t\tmatchedIndexes.add(matchIndex);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase \"[object RegExp]\": {\n\t\t\t\tconst leftRegExp = left as RegExp;\n\t\t\t\tconst rightRegExp = right as RegExp;\n\t\t\t\treturn leftRegExp.source === rightRegExp.source && leftRegExp.flags === rightRegExp.flags;\n\t\t\t}\n\t\t\tcase \"[object Set]\": {\n\t\t\t\tconst leftSet = left as Set<unknown>;\n\t\t\t\tconst rightValues = [...(right as Set<unknown>).values()];\n\t\t\t\tif (leftSet.size !== rightValues.length) return false;\n\t\t\t\tconst matchedIndexes = new Set<number>();\n\t\t\t\tfor (const leftValue of leftSet) {\n\t\t\t\t\tconst matchIndex = rightValues.findIndex(\n\t\t\t\t\t\t(rightValue, index) => !matchedIndexes.has(index) && compare(leftValue, rightValue, leftStack, rightStack)\n\t\t\t\t\t);\n\t\t\t\t\tif (matchIndex < 0) return false;\n\t\t\t\t\tmatchedIndexes.add(matchIndex);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase \"[object Object]\": {\n\t\t\t\tif (Object.getPrototypeOf(left) !== Object.getPrototypeOf(right)) return false;\n\t\t\t\tconst leftKeys = getEnumerableKeys(left);\n\t\t\t\tconst rightKeys = getEnumerableKeys(right);\n\t\t\t\tif (leftKeys.length !== rightKeys.length || leftKeys.some((key) => !rightKeys.includes(key))) return false;\n\t\t\t\tconst leftRecord = left as Record<PropertyKey, unknown>;\n\t\t\t\tconst rightRecord = right as Record<PropertyKey, unknown>;\n\t\t\t\treturn leftKeys.every((key) => compare(leftRecord[key], rightRecord[key], leftStack, rightStack));\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t} finally {\n\t\tleftStack.pop();\n\t\trightStack.pop();\n\t}\n};\n\n/** 深度比较两个值,支持常见对象、集合、二进制数据与循环引用。 */\nexport const isEqual = (left: unknown, right: unknown): boolean => compare(left, right, [], []);\n\n/** 从对象中选择指定的自身属性。 */\nexport function pick<Source extends object, Key extends keyof Source>(source: Source, keys: readonly Key[]): Pick<Source, Key>;\nexport function pick<Source extends object>(source: Source, keys: readonly PropertyKey[]): Partial<Source>;\nexport function pick(source: object, keys: readonly PropertyKey[]): object {\n\tconst sourceRecord = source as Record<PropertyKey, unknown>;\n\tconst result: Record<PropertyKey, unknown> = {};\n\tfor (const key of keys) {\n\t\tif (Object.hasOwn(source, key)) result[key] = sourceRecord[key];\n\t}\n\treturn result;\n}\n\n/** 从对象中排除指定的自身属性。 */\nexport function omit<Source extends object, Key extends keyof Source>(source: Source, keys: readonly Key[]): Omit<Source, Key>;\nexport function omit<Source extends object>(source: Source, keys: readonly PropertyKey[]): Partial<Source>;\nexport function omit(source: object, keys: readonly PropertyKey[]): object {\n\tconst omittedKeys = new Set<PropertyKey>(keys);\n\tconst sourceRecord = source as Record<PropertyKey, unknown>;\n\tconst result: Record<PropertyKey, unknown> = {};\n\tfor (const key of getEnumerableKeys(source)) {\n\t\tif (!omittedKeys.has(key)) result[key] = sourceRecord[key];\n\t}\n\treturn result;\n}\n"],"mappings":";;AACA,MAAM,gBAAgB,UAA0B,OAAO,UAAU,SAAS,KAAK,KAAK;;AAGpF,MAAM,eAAe,MAAe,UACnC,SAAS,SAAU,OAAO,SAAS,YAAY,OAAO,UAAU,YAAY,OAAO,MAAM,IAAI,KAAK,OAAO,MAAM,KAAK;;AAGrH,MAAM,qBAAqB,UAC1B,QAAQ,QAAQ,KAAK,CAAC,CAAC,QAAQ,QAAQ,OAAO,UAAU,qBAAqB,KAAK,OAAO,GAAG,CAAC;;AAG9F,MAAM,iBACL,MACA,YACA,YACA,OACA,aACA,gBACa;CACb,IAAI,eAAe,aAAa,OAAO;CACvC,MAAM,YAAY,IAAI,WAAW,MAAM,YAAY,UAAU;CAC7D,MAAM,aAAa,IAAI,WAAW,OAAO,aAAa,WAAW;CACjE,OAAO,UAAU,OAAO,OAAO,UAAU,UAAU,WAAW,MAAM;AACrE;;AAGA,MAAM,WAAW,MAAe,OAAgB,WAAqB,eAAkC;CACtG,IAAI,YAAY,MAAM,KAAK,GAAG,OAAO;CACrC,IAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CAErG,MAAM,iBAAiB,UAAU,YAAY,IAAI;CACjD,IA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O,CAAC,GAAG,CAAC,CAAC;AAK9F,SAAgB,KAAK,QAAgB,MAAsC;CAC1E,MAAM,eAAe;CACrB,MAAM,SAAuC,CAAC;CAC9C,KAAK,MAAM,OAAO,MACjB,IAAI,OAAO,OAAO,QAAQ,GAAG,GAAG,OAAO,OAAO,aAAa;CAE5D,OAAO;AACR;AAKA,SAAgB,KAAK,QAAgB,MAAsC;CAC1E,MAAM,cAAc,IAAI,IAAiB,IAAI;CAC7C,MAAM,eAAe;CACrB,MAAM,SAAuC,CAAC;CAC9C,KAAK,MAAM,OAAO,kBAAkB,MAAM,GACzC,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG,OAAO,OAAO,aAAa;CAEvD,OAAO;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/string/index.ts"],"sourcesContent":["/** Web、Node、WebView 与 uni-app 宿主可能按需提供的运行时全局能力。 */\ninterface RuntimeGlobals {\n\treadonly crypto?: Omit<Partial<Crypto>, \"subtle\"> & {\n\t\treadonly subtle?: Partial<SubtleCrypto>;\n\t};\n\treadonly document?: Partial<Document>;\n\treadonly isSecureContext?: boolean;\n\treadonly navigator?: Partial<Navigator>;\n\treadonly uni?: unknown;\n}\n\n/**\n * 以可选能力视图读取全局对象。\n *\n * @remarks TypeScript 的 DOM 声明假定浏览器全局始终存在,但本包也会在 Node、WebView\n * 和 uni-app 中运行。这里只放宽能力是否存在,不改变标准 API 的属性与方法类型。\n */\nconst runtimeGlobals = globalThis as
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/string/index.ts"],"sourcesContent":["/** Web、Node、WebView 与 uni-app 宿主可能按需提供的运行时全局能力。 */\ninterface RuntimeGlobals {\n\treadonly crypto?: Omit<Partial<Crypto>, \"subtle\"> & {\n\t\treadonly subtle?: Partial<SubtleCrypto>;\n\t};\n\treadonly document?: Partial<Document>;\n\treadonly isSecureContext?: boolean;\n\treadonly navigator?: Partial<Navigator>;\n\treadonly uni?: unknown;\n}\n\n/**\n * 以可选能力视图读取全局对象。\n *\n * @remarks TypeScript 的 DOM 声明假定浏览器全局始终存在,但本包也会在 Node、WebView\n * 和 uni-app 中运行。这里只放宽能力是否存在,不改变标准 API 的属性与方法类型。\n */\nconst runtimeGlobals = globalThis as RuntimeGlobals;\n\nconst defaultRandomAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\nconst maximumRandomStringLength = 1_000_000;\nconst maximumRandomValuesPerBatch = 16_384;\nconst uint32Range = 0x1_0000_0000;\n\n/** uni-app 文本复制所需的最小运行时能力。 */\ninterface UniClipboard {\n\tsetClipboardData: (options: { data: string; fail: (error: unknown) => void; success: () => void }) => void;\n}\n\n/** 使用 Web Crypto 填充随机值,能力缺失时回退到 `Math.random()`。 */\nconst fillRandomValues = (values: Uint8Array<ArrayBuffer> | Uint32Array<ArrayBuffer>): void => {\n\tconst crypto = runtimeGlobals.crypto;\n\tif (typeof crypto?.getRandomValues === \"function\") {\n\t\tcrypto.getRandomValues(values);\n\t\treturn;\n\t}\n\tconst range = values.BYTES_PER_ELEMENT === Uint8Array.BYTES_PER_ELEMENT ? 0x100 : uint32Range;\n\tfor (let index = 0; index < values.length; index += 1) values[index] = Math.floor(Math.random() * range);\n};\n\n/**\n * 把文本复制到系统剪贴板。\n *\n * @remarks uni-app 使用 `setClipboardData`;浏览器优先使用 Clipboard API,并在该 API 不可用时\n * 回退到 `document.execCommand(\"copy\")`。平台拒绝访问剪贴板时不会静默忽略错误。\n * @param value - 要复制的文本。\n * @returns 复制完成后兑现的 Promise。\n * @throws `Error` 当运行时没有可用的剪贴板能力或复制失败。\n */\nexport async function copy(value: string): Promise<void> {\n\tconst uni = runtimeGlobals.uni;\n\tif (uni !== undefined) {\n\t\tif ((typeof uni !== \"object\" && typeof uni !== \"function\") || uni === null) {\n\t\t\tthrow new TypeError(\"全局 uni 对象未提供 `setClipboardData`。\");\n\t\t}\n\t\tconst clipboard = uni as Partial<UniClipboard>;\n\t\tconst setClipboardData = clipboard.setClipboardData?.bind(clipboard);\n\t\tif (setClipboardData === undefined) throw new TypeError(\"全局 uni 对象未提供 `setClipboardData`。\");\n\t\tawait new Promise<void>((resolve, reject) => {\n\t\t\tsetClipboardData({\n\t\t\t\tdata: value,\n\t\t\t\tfail: (error: unknown): void => {\n\t\t\t\t\treject(error instanceof Error ? error : new Error(\"文本复制到剪贴板失败。\", { cause: error }));\n\t\t\t\t},\n\t\t\t\tsuccess: resolve,\n\t\t\t});\n\t\t});\n\t\treturn;\n\t}\n\n\tconst browserClipboard = runtimeGlobals.navigator?.clipboard;\n\tif (runtimeGlobals.isSecureContext === true && typeof browserClipboard?.writeText === \"function\") {\n\t\tawait browserClipboard.writeText(value);\n\t\treturn;\n\t}\n\n\tconst document = runtimeGlobals.document;\n\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 兼容不支持 Clipboard API 的旧 WebView。\n\tif (typeof document?.createElement !== \"function\" || document.body == null || typeof document.execCommand !== \"function\") {\n\t\tthrow new Error(\"当前运行环境不支持访问剪贴板。\");\n\t}\n\tconst textarea = document.createElement(\"textarea\");\n\ttextarea.value = value;\n\ttextarea.style.left = \"-999999px\";\n\ttextarea.style.opacity = \"0\";\n\ttextarea.style.position = \"fixed\";\n\ttextarea.style.top = \"-999999px\";\n\tdocument.body.appendChild(textarea);\n\tlet copied: boolean;\n\ttry {\n\t\ttextarea.focus();\n\t\ttextarea.select();\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 兼容不支持 Clipboard API 的旧 WebView。\n\t\tcopied = document.execCommand(\"copy\");\n\t} finally {\n\t\ttextarea.remove();\n\t}\n\tif (!copied) throw new Error(\"文本复制到剪贴板失败。\");\n}\n\n/**\n * 生成随机字符串。\n *\n * @remarks 优先使用 Web Crypto;平台缺少安全随机能力时回退到 `Math.random()`。\n * @param length - 字符数量,必须是 0 至 1,000,000 的安全整数。\n * @param alphabet - 不得为空、包含重复字符或超过 2^32 个 Unicode 码点。\n * @returns 由 `alphabet` 中 Unicode 码点组成的随机文本。\n * @throws `RangeError` 当长度或字母表非法。\n */\nexport function randomString(length: number, alphabet: string = defaultRandomAlphabet): string {\n\tif (!Number.isSafeInteger(length) || length < 0 || length > maximumRandomStringLength) {\n\t\tthrow new RangeError(`\\`length\\` 必须是 0 到 ${maximumRandomStringLength} 之间的安全整数。`);\n\t}\n\tconst characters = Array.from(alphabet);\n\tif (characters.length === 0) throw new RangeError(\"`alphabet` 不能为空。\");\n\tif (new Set(characters).size !== characters.length) throw new RangeError(\"`alphabet` 不能包含重复字符。\");\n\tif (characters.length > 0x1_0000_0000) throw new RangeError(\"`alphabet` 不能包含超过 2^32 个字符。\");\n\tif (length === 0) return \"\";\n\n\t// 丢弃不能平均映射到字母表的尾部区间,避免 `%` 造成前部字符概率偏高。\n\tconst acceptanceLimit = Math.floor(uint32Range / characters.length) * characters.length;\n\tconst result: string[] = [];\n\twhile (result.length < length) {\n\t\tconst remaining = length - result.length;\n\t\t// 分批填充可控制临时内存,并避开 Web Crypto 单次随机数组大小限制。\n\t\tconst samples = new Uint32Array(Math.min(remaining, maximumRandomValuesPerBatch));\n\t\tfillRandomValues(samples);\n\t\tfor (const sample of samples) {\n\t\t\tif (sample >= acceptanceLimit) continue;\n\t\t\tconst character = characters[sample % characters.length];\n\t\t\tif (character === undefined) continue;\n\t\t\tresult.push(character);\n\t\t\tif (result.length === length) break;\n\t\t}\n\t}\n\treturn result.join(\"\");\n}\n"],"mappings":";;;;;;;AAiBA,MAAM,iBAAiB;AAEvB,MAAM,wBAAwB;AAC9B,MAAM,4BAA4B;AAClC,MAAM,8BAA8B;AACpC,MAAM,cAAc;;AAQpB,MAAM,oBAAoB,WAAqE;CAC9F,MAAM,SAAS,eAAe;CAC9B,IAAI,OAAO,QAAQ,oBAAoB,YAAY;EAClD,OAAO,gBAAgB,MAAM;EAC7B;CACD;CACA,MAAM,QAAQ,OAAO,sBA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,SAAS,OAAO;CACjB;CACA,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,aAAa;AAC3C;;;;;;;;;;AAWA,SAAgB,aAAa,QAAgB,WAAmB,uBAA+B;CAC9F,IAAI,CAAC,OAAO,cAAc,MAAM,KAAK,SAAS,KAAK,SAAS,2BAC3D,MAAM,IAAI,WAAW,sBAAsB,0BAA0B,UAAU;CAEhF,MAAM,aAAa,MAAM,KAAK,QAAQ;CACtC,IAAI,WAAW,WAAW,GAAG,MAAM,IAAI,WAAW,kBAAkB;CACpE,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC,SAAS,WAAW,QAAQ,MAAM,IAAI,WAAW,sBAAsB;CAC/F,IAAI,WAAW,SAAS,YAAe,MAAM,IAAI,WAAW,6BAA6B;CACzF,IAAI,WAAW,GAAG,OAAO;CAGzB,MAAM,kBAAkB,KAAK,MAAM,cAAc,WAAW,MAAM,IAAI,WAAW;CACjF,MAAM,SAAmB,CAAC;CAC1B,OAAO,OAAO,SAAS,QAAQ;EAC9B,MAAM,YAAY,SAAS,OAAO;EAElC,MAAM,UAAU,IAAI,YAAY,KAAK,IAAI,WAAW,2BAA2B,CAAC;EAChF,iBAAiB,OAAO;EACxB,KAAK,MAAM,UAAU,SAAS;GAC7B,IAAI,UAAU,iBAAiB;GAC/B,MAAM,YAAY,WAAW,SAAS,WAAW;GACjD,IAAI,cAAc,KAAA,GAAW;GAC7B,OAAO,KAAK,SAAS;GACrB,IAAI,OAAO,WAAW,QAAQ;EAC/B;CACD;CACA,OAAO,OAAO,KAAK,EAAE;AACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emits.mjs","names":[],"sources":["../../../src/utils/vue/emits.ts"],"sourcesContent":["import { computed } from \"vue\";\nimport type { ComputedRef } from \"vue\";\n\n/** Vue Emits 对象中允许的校验器形状。 */\ntype EmitValidator = ((...arguments_: never[]) => unknown) | null;\n/** 事件名到可选参数校验器的内部映射。 */\ntype EmitsOptions = Record<string, EmitValidator>;\n/** 从校验器中提取事件参数;无校验器时保留未知参数。 */\ntype EventArguments<Validator> = Validator extends (...arguments_: infer Arguments) => unknown ? Arguments : unknown[];\n/** 在类型层递归把 kebab-case 事件名转换为 PascalCase。 */\ntype PascalEventName<Value extends string> = Value extends `${infer Head}-${infer Tail}`\n\t? `${Capitalize<Head>}${PascalEventName<Tail>}`\n\t: Capitalize<Value>;\n\n/** 把事件配置映射为 Vue `onXxx` 属性。 */\nexport type EmitHandlers<Emits extends EmitsOptions> = {\n\t[Name in keyof Emits as Name extends string ? `on${PascalEventName<Name>}` : never]: (...arguments_: EventArguments<Emits[Name]>) => void;\n};\n\n/**\n * 把事件名转换为 Vue Handler Prop 名称。\n *\n * @param eventName - Emits 对象中的原始事件名,可使用 kebab-case。\n * @returns `onPascalCase` 形式的属性名。\n * @throws `TypeError` 当事件名包含空片段或无法生成有效 Handler 名称。\n */\nconst toHandlerName = (eventName: string): string => {\n\treturn `on${eventName\n\t\t.split(\"-\")\n\t\t.map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n\t\t.join(\"\")}`;\n};\n\n/**\n * 构建响应式 Vue 事件处理器。\n *\n * @param emits - Vue emits 配置对象。\n * @param emit - `setup` 上下文提供的 emit 函数。\n * @param ignoredEvents - 不需要向子组件透传的事件名。\n * @returns 随配置重新计算的事件处理器对象。\n */\nexport function useEmits<Emits extends EmitsOptions>(\n\temits: Emits,\n\temit: (...arguments_: never[]) => unknown,\n\tignoredEvents: readonly (keyof Emits)[] = []\n): ComputedRef<Partial<EmitHandlers<Emits>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredEvents);\n\tconst emitEvent = emit as
|
|
1
|
+
{"version":3,"file":"emits.mjs","names":[],"sources":["../../../src/utils/vue/emits.ts"],"sourcesContent":["import { computed } from \"vue\";\nimport type { ComputedRef } from \"vue\";\n\n/** Vue Emits 对象中允许的校验器形状。 */\ntype EmitValidator = ((...arguments_: never[]) => unknown) | null;\n/** 事件名到可选参数校验器的内部映射。 */\ntype EmitsOptions = Record<string, EmitValidator>;\n/** 从校验器中提取事件参数;无校验器时保留未知参数。 */\ntype EventArguments<Validator> = Validator extends (...arguments_: infer Arguments) => unknown ? Arguments : unknown[];\n/** 在类型层递归把 kebab-case 事件名转换为 PascalCase。 */\ntype PascalEventName<Value extends string> = Value extends `${infer Head}-${infer Tail}`\n\t? `${Capitalize<Head>}${PascalEventName<Tail>}`\n\t: Capitalize<Value>;\n\n/** 把事件配置映射为 Vue `onXxx` 属性。 */\nexport type EmitHandlers<Emits extends EmitsOptions> = {\n\t[Name in keyof Emits as Name extends string ? `on${PascalEventName<Name>}` : never]: (...arguments_: EventArguments<Emits[Name]>) => void;\n};\n\n/**\n * 把事件名转换为 Vue Handler Prop 名称。\n *\n * @param eventName - Emits 对象中的原始事件名,可使用 kebab-case。\n * @returns `onPascalCase` 形式的属性名。\n * @throws `TypeError` 当事件名包含空片段或无法生成有效 Handler 名称。\n */\nconst toHandlerName = (eventName: string): string => {\n\treturn `on${eventName\n\t\t.split(\"-\")\n\t\t.map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n\t\t.join(\"\")}`;\n};\n\n/**\n * 构建响应式 Vue 事件处理器。\n *\n * @param emits - Vue emits 配置对象。\n * @param emit - `setup` 上下文提供的 emit 函数。\n * @param ignoredEvents - 不需要向子组件透传的事件名。\n * @returns 随配置重新计算的事件处理器对象。\n */\nexport function useEmits<Emits extends EmitsOptions>(\n\temits: Emits,\n\temit: (...arguments_: never[]) => unknown,\n\tignoredEvents: readonly (keyof Emits)[] = []\n): ComputedRef<Partial<EmitHandlers<Emits>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredEvents);\n\tconst emitEvent = emit as (eventName: string, ...arguments_: unknown[]) => void;\n\treturn computed<Partial<EmitHandlers<Emits>>>(() => {\n\t\tconst handlers = {} as Partial<EmitHandlers<Emits>>;\n\t\tconst handlerNames = new Set<string>();\n\t\tfor (const eventName of Object.keys(emits)) {\n\t\t\tif (ignored.has(eventName)) continue;\n\t\t\tif (eventName.length === 0 || /\\s/u.test(eventName)) throw new TypeError(`无效的 Vue 事件名称:“${eventName}”。`);\n\t\t\tconst handlerName = toHandlerName(eventName);\n\t\t\tif (handlerNames.has(handlerName)) {\n\t\t\t\tthrow new TypeError(`多个 Vue 事件映射到同一处理器属性:“${handlerName}”。`);\n\t\t\t}\n\t\t\thandlerNames.add(handlerName);\n\t\t\tObject.defineProperty(handlers, handlerName, {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: (...arguments_: unknown[]): void => {\n\t\t\t\t\temitEvent(eventName, ...arguments_);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t});\n\t\t}\n\t\treturn handlers;\n\t});\n}\n"],"mappings":";;;;;;;;;AA0BA,MAAM,iBAAiB,cAA8B;CACpD,OAAO,KAAK,UACV,MAAM,GAAG,CAAC,CACV,KAAK,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAC3D,KAAK,EAAE;AACV;;;;;;;;;AAUA,SAAgB,SACf,OACA,MACA,gBAA0C,CAAC,GACC;CAC5C,MAAM,UAAU,IAAI,IAAiB,aAAa;CAClD,MAAM,YAAY;CAClB,OAAO,eAA6C;EACnD,MAAM,WAAW,CAAC;EAClB,MAAM,+BAAe,IAAI,IAAY;EACrC,KAAK,MAAM,aAAa,OAAO,KAAK,KAAK,GAAG;GAC3C,IAAI,QAAQ,IAAI,SAAS,GAAG;GAC5B,IAAI,UAAU,WAAW,KAAK,MAAM,KAAK,SAAS,GAAG,MAAM,IAAI,UAAU,iBAAiB,UAAU,GAAG;GACvG,MAAM,cAAc,cAAc,SAAS;GAC3C,IAAI,aAAa,IAAI,WAAW,GAC/B,MAAM,IAAI,UAAU,wBAAwB,YAAY,GAAG;GAE5D,aAAa,IAAI,WAAW;GAC5B,OAAO,eAAe,UAAU,aAAa;IAC5C,YAAY;IACZ,QAAQ,GAAG,eAAgC;KAC1C,UAAU,WAAW,GAAG,UAAU;IACnC;IACA,UAAU;GACX,CAAC;EACF;EACA,OAAO;CACR,CAAC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.mjs","names":[],"sources":["../../../src/utils/vue/install.ts"],"sourcesContent":["import type { App } from \"vue\";\n\n/** Vue 组件对象、函数组件或指令对象可接受的最小结构类型。 */\nexport type VueInstallValue = object | ((...arguments_: never[]) => unknown);\n\n/** 为 Vue 组件或指令附加供 Vue 3 `app.use()` 调用的安装能力。 */\nexport type Installable<Value> = Value & {\n\t/**\n\t * 把当前组件或指令安装到 Vue 3 App。\n\t * @param app - Vue 3 App 实例。\n\t */\n\tinstall: (app: App) => void;\n};\n\n/** TSX 组件安装类型;与 {@link Installable} 保持同一运行时契约。 */\nexport type TSXWithInstall<Value> = Installable<Value>;\n\n/** 组件、指令注册所需的 Vue 3 App 能力。 */\ninterface VueAppRegistrationTarget {\n\t/**\n\t * 读取或注册全局组件。\n\t *\n\t * @param name - 全局组件名。\n\t * @param component - 注册时传入的组件;省略时读取现有组件。\n\t * @returns Vue App 返回的现有组件、注册结果或 App 自身。\n\t */\n\tcomponent: (name: string, component?: unknown) => unknown;\n\t/**\n\t * 读取或注册全局指令。\n\t *\n\t * @param name - 不带 `v-` 的全局指令名。\n\t * @param directive - 注册时传入的指令;省略时读取现有指令。\n\t * @returns Vue App 返回的现有指令、注册结果或 App 自身。\n\t */\n\tdirective: (name: string, directive?: unknown) => unknown;\n}\n\n/**\n * 校验 Vue 3 插件安装目标。\n *\n * @param value - Vue 3 App 实例。\n * @returns 只包含组件和指令注册能力的 App。\n * @throws `TypeError` 当目标不是对象或缺少 `component`、`directive` 方法。\n */\nconst assertApp = (value: unknown): VueAppRegistrationTarget => {\n\tif (typeof value !== \"object\" || value === null) {\n\t\tthrow new TypeError(\"安装 Vue 插件需要 Vue 3 App 实例。\");\n\t}\n\tconst app = value as
|
|
1
|
+
{"version":3,"file":"install.mjs","names":[],"sources":["../../../src/utils/vue/install.ts"],"sourcesContent":["import type { App } from \"vue\";\n\n/** Vue 组件对象、函数组件或指令对象可接受的最小结构类型。 */\nexport type VueInstallValue = object | ((...arguments_: never[]) => unknown);\n\n/** 为 Vue 组件或指令附加供 Vue 3 `app.use()` 调用的安装能力。 */\nexport type Installable<Value> = Value & {\n\t/**\n\t * 把当前组件或指令安装到 Vue 3 App。\n\t * @param app - Vue 3 App 实例。\n\t */\n\tinstall: (app: App) => void;\n};\n\n/** TSX 组件安装类型;与 {@link Installable} 保持同一运行时契约。 */\nexport type TSXWithInstall<Value> = Installable<Value>;\n\n/** 组件、指令注册所需的 Vue 3 App 能力。 */\ninterface VueAppRegistrationTarget {\n\t/**\n\t * 读取或注册全局组件。\n\t *\n\t * @param name - 全局组件名。\n\t * @param component - 注册时传入的组件;省略时读取现有组件。\n\t * @returns Vue App 返回的现有组件、注册结果或 App 自身。\n\t */\n\tcomponent: (name: string, component?: unknown) => unknown;\n\t/**\n\t * 读取或注册全局指令。\n\t *\n\t * @param name - 不带 `v-` 的全局指令名。\n\t * @param directive - 注册时传入的指令;省略时读取现有指令。\n\t * @returns Vue App 返回的现有指令、注册结果或 App 自身。\n\t */\n\tdirective: (name: string, directive?: unknown) => unknown;\n}\n\n/**\n * 校验 Vue 3 插件安装目标。\n *\n * @param value - Vue 3 App 实例。\n * @returns 只包含组件和指令注册能力的 App。\n * @throws `TypeError` 当目标不是对象或缺少 `component`、`directive` 方法。\n */\nconst assertApp = (value: unknown): VueAppRegistrationTarget => {\n\tif (typeof value !== \"object\" || value === null) {\n\t\tthrow new TypeError(\"安装 Vue 插件需要 Vue 3 App 实例。\");\n\t}\n\tconst app = value as Partial<VueAppRegistrationTarget>;\n\tif (typeof app.component !== \"function\" || typeof app.directive !== \"function\") {\n\t\tthrow new TypeError(\"安装 Vue 插件需要 `component()` 和 `directive()` 注册方法。\");\n\t}\n\treturn app as VueAppRegistrationTarget;\n};\n\n/**\n * 提取组件的全局注册名称。\n *\n * @param component - 待注册组件。\n * @returns 经过校验的显式名称。\n * @throws `TypeError` 当组件没有非空字符串名称,或名称包含空白。\n */\nconst getComponentName = (component: VueInstallValue): string => {\n\tconst name = (component as { name?: unknown }).name;\n\tif (typeof name !== \"string\" || name.length === 0 || /\\s/u.test(name)) {\n\t\tthrow new TypeError(\"可安装的 Vue 组件必须公开不含空白的非空名称。\");\n\t}\n\treturn name;\n};\n\n/** 预检完成、可以无失败注册的组件动作。 */\ninterface ComponentRegistration {\n\t/** 已校验的组件引用。 */\n\tcomponent: VueInstallValue;\n\t/** 已校验的组件名称。 */\n\tname: string;\n\t/** 目标中是否已经注册了完全相同的组件引用。 */\n\tregistered: boolean;\n}\n\n/**\n * 预检单个组件注册。\n *\n * @remarks 先读取同名组件并完成冲突判断,再返回延迟执行动作;调用方可以在所有组件预检通过后统一提交。\n * @param app - 已校验的 Vue 3 App 注册目标。\n * @param component - 待注册组件。\n * @returns 已校验的组件引用、名称和目标中是否已经存在同一引用。\n * @throws `Error` 当同名位置已由其他组件占用。\n */\nconst prepareComponentRegistration = (app: VueAppRegistrationTarget, component: VueInstallValue): ComponentRegistration => {\n\tconst name = getComponentName(component);\n\tconst existing = app.component(name);\n\tif (existing !== undefined && existing !== component) {\n\t\tthrow new Error(`Vue 组件名称“${name}”已被其他组件注册。`);\n\t}\n\treturn { component, name, registered: existing === component };\n};\n\n/**\n * 为主组件附加 Vue 3 `app.use()` 安装能力。\n *\n * @remarks 函数会直接为 `main` 定义附属组件属性和 `install`。所有组件名称、附属属性\n * 冲突会在修改 `main` 前完成校验;安装到 App 时也会先预检全部全局名称,再统一注册。\n * @param main - 具有非空 `name` 的组件。\n * @param extras - 同时注册并以可枚举属性挂到主组件的附属组件映射。\n * @returns 原始 `main` 引用,并附加类型化的 `install` 与 `extras` 属性。\n * @throws `TypeError` 当组件缺少合法名称、已有 `install`、附属键或名称发生冲突。\n * @throws `Error` 当 App 中同名位置已经注册其他组件。\n */\nexport function withInstall<Main extends VueInstallValue, Extras extends Record<string, VueInstallValue> = Record<never, never>>(\n\tmain: Main,\n\textras?: Extras\n): Installable<Main> & Extras {\n\tconst componentNames = new Set([getComponentName(main)]);\n\tif (\"install\" in Object(main)) throw new TypeError(\"Vue 组件已定义 `install` 属性。\");\n\tconst extraEntries = Object.entries(extras ?? {});\n\tif (extras !== undefined && Object.getOwnPropertySymbols(extras).some((key) => Object.prototype.propertyIsEnumerable.call(extras, key))) {\n\t\tthrow new TypeError(\"Vue 组件附属项必须使用字符串属性名。\");\n\t}\n\tfor (const [key, component] of extraEntries) {\n\t\tconst componentName = getComponentName(component);\n\t\tif (componentNames.has(componentName)) throw new TypeError(`Vue 组件名称“${componentName}”被重复注册。`);\n\t\tcomponentNames.add(componentName);\n\t\tif (key === \"install\" || key in Object(main)) {\n\t\t\tthrow new TypeError(`Vue 组件附属项“${key}”会覆盖主组件上的属性。`);\n\t\t}\n\t}\n\tconst installable = main as Installable<Main> & Extras;\n\tfor (const [key, component] of extraEntries) {\n\t\tObject.defineProperty(installable, key, { configurable: true, enumerable: true, value: component, writable: true });\n\t}\n\tinstallable.install = (value: App): void => {\n\t\tconst app = assertApp(value);\n\t\t// 先完成全部冲突检查,再统一注册,避免安装到一半留下部分全局组件。\n\t\tconst registrations = [main, ...extraEntries.map(([, component]) => component)].map((component) =>\n\t\t\tprepareComponentRegistration(app, component)\n\t\t);\n\t\tfor (const registration of registrations) {\n\t\t\tif (!registration.registered) app.component(registration.name, registration.component);\n\t\t}\n\t};\n\treturn installable;\n}\n\n/**\n * 为不需要单独注册的附属组件附加空安装函数。\n *\n * @remarks 适用于只能作为主组件附属属性使用、但仍需满足 Vue Plugin 类型的组件。\n * 函数直接修改并返回传入组件,不会向 Vue 3 App 注册内容。\n * @param component - 尚未定义或继承 `install` 属性的组件。\n * @returns 原组件引用及无副作用的 `install` 方法。\n * @throws `TypeError` 当组件自身或原型链已经存在 `install`。\n */\nexport function withNoopInstall<Value extends VueInstallValue>(component: Value): TSXWithInstall<Value> {\n\tif (\"install\" in Object(component)) throw new TypeError(\"Vue 组件已定义 `install` 属性。\");\n\tconst installable = component as TSXWithInstall<Value>;\n\tinstallable.install = (): void => undefined;\n\treturn installable;\n}\n\n/**\n * 为 Vue 3 指令附加插件安装能力。\n *\n * @remarks 函数直接修改并返回指令。安装时重复注册同一引用保持幂等,不会覆盖同名的\n * 其他指令。名称只传给 `directive()`,不得包含 `v-` 前缀。\n * @param directive - 尚未定义或继承 `install` 属性的 Vue 指令对象。\n * @param name - 非空、无空白且不以 `v-` 开头的全局指令名。\n * @returns 原指令引用及 Vue Plugin `install` 方法。\n * @throws `TypeError` 当名称非法、指令已有 `install`,或安装目标无效。\n * @throws `Error` 当 App 中同名位置已经注册其他指令。\n */\nexport function withInstallDirective<Value extends VueInstallValue>(directive: Value, name: string): Installable<Value> {\n\tif (name.length === 0 || /\\s/u.test(name) || name.startsWith(\"v-\")) {\n\t\tthrow new TypeError(\"可安装的 Vue 指令名称不能包含空白或 `v-` 前缀。\");\n\t}\n\tif (\"install\" in Object(directive)) throw new TypeError(\"Vue 指令已定义 `install` 属性。\");\n\tconst installable = directive as Installable<Value>;\n\tinstallable.install = (value: App): void => {\n\t\tconst app = assertApp(value);\n\t\tconst existing = app.directive(name);\n\t\tif (existing !== undefined && existing !== directive) {\n\t\t\tthrow new Error(`Vue 指令名称“${name}”已被其他指令注册。`);\n\t\t}\n\t\tif (existing !== directive) app.directive(name, directive);\n\t};\n\treturn installable;\n}\n"],"mappings":";;;;;;;;AA4CA,MAAM,aAAa,UAA6C;CAC/D,IAAI,OAAO,UAAU,YAAY,UAAU,MAC1C,MAAM,IAAI,UAAU,2BAA2B;CAEhD,MAAM,MAAM;CACZ,IAAI,OAAO,IAAI,cAAc,cAAc,OAAO,IAAI,cAAc,YACnE,MAAM,IAAI,UAAU,iDAAiD;CAEtE,OAAO;AACR;;;;;;;;AASA,MAAM,oBAAoB,cAAuC;CAChE,MAAM,OAAQ,UAAiC;CAC/C,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,KA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,eAAe,SAAS,CAAC,CAAC,CAAC,KAAK,cACpF,6BAA6B,KAAK,SAAS,CAC5C;EACA,KAAK,MAAM,gBAAgB,eAC1B,IAAI,CAAC,aAAa,YAAY,IAAI,UAAU,aAAa,MAAM,aAAa,SAAS;CAEvF;CACA,OAAO;AACR;;;;;;;;;;AAWA,SAAgB,gBAA+C,WAAyC;CACvG,IAAI,aAAa,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,yBAAyB;CACjF,MAAM,cAAc;CACpB,YAAY,gBAAsB,KAAA;CAClC,OAAO;AACR;;;;;;;;;;;;AAaA,SAAgB,qBAAoD,WAAkB,MAAkC;CACvH,IAAI,KAAK,WAAW,KAAK,MAAM,KAAK,IAAI,KAAK,KAAK,WAAW,IAAI,GAChE,MAAM,IAAI,UAAU,+BAA+B;CAEpD,IAAI,aAAa,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,yBAAyB;CACjF,MAAM,cAAc;CACpB,YAAY,WAAW,UAAqB;EAC3C,MAAM,MAAM,UAAU,KAAK;EAC3B,MAAM,WAAW,IAAI,UAAU,IAAI;EACnC,IAAI,aAAa,KAAA,KAAa,aAAa,WAC1C,MAAM,IAAI,MAAM,YAAY,KAAK,WAAW;EAE7C,IAAI,aAAa,WAAW,IAAI,UAAU,MAAM,SAAS;CAC1D;CACA,OAAO;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.mjs","names":[],"sources":["../../../src/utils/vue/render.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\nimport type { VNode } from \"vue\";\n\n/** `useRender` 需要写入的 Vue 3 内部组件实例字段。 */\ninterface MutableVueComponentInstance {\n\trender?: () => VNode;\n}\n\n/**\n * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。\n * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。\n * @param render - 当前组件的渲染函数。\n * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。\n */\nexport function useRender(render: () => VNode): void {\n\tconst instance = getCurrentInstance();\n\tif (instance === null) throw new Error(\"`useRender` 必须在 `setup` 函数内部调用。\");\n\t(instance as
|
|
1
|
+
{"version":3,"file":"render.mjs","names":[],"sources":["../../../src/utils/vue/render.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\nimport type { VNode } from \"vue\";\n\n/** `useRender` 需要写入的 Vue 3 内部组件实例字段。 */\ninterface MutableVueComponentInstance {\n\trender?: () => VNode;\n}\n\n/**\n * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。\n * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。\n * @param render - 当前组件的渲染函数。\n * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。\n */\nexport function useRender(render: () => VNode): void {\n\tconst instance = getCurrentInstance();\n\tif (instance === null) throw new Error(\"`useRender` 必须在 `setup` 函数内部调用。\");\n\t(instance as MutableVueComponentInstance).render = render;\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,UAAU,QAA2B;CACpD,MAAM,WAAW,mBAAmB;CACpC,IAAI,aAAa,MAAM,MAAM,IAAI,MAAM,iCAAiC;CACxE,SAA0C,SAAS;AACpD"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */
|
|
2
|
-
export declare const version = "2.0.
|
|
2
|
+
export declare const version = "2.0.17";
|
package/dist/version.mjs
CHANGED
package/dist/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */\nexport const version = \"2.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */\nexport const version = \"2.0.17\";\n"],"mappings":";;AACA,MAAa,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-element-plus",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "Typed Vue 3 components, directives, and hooks built on Element Plus.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -86,12 +86,7 @@
|
|
|
86
86
|
"vue": "^3.5.11"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@vueuse/core": "^14.4.0",
|
|
90
|
-
"csstype": "^3.2.3",
|
|
91
89
|
"decimal.js": "^10.6.0",
|
|
92
|
-
"lodash": "^4.18.1",
|
|
93
|
-
"lodash-es": "^4.18.1",
|
|
94
|
-
"lodash-unified": "^1.0.3",
|
|
95
90
|
"screenfull": "^6.0.2",
|
|
96
91
|
"sortablejs": "^1.15.7"
|
|
97
92
|
},
|
|
@@ -100,8 +95,6 @@
|
|
|
100
95
|
"@eslint/js": "^10.0.1",
|
|
101
96
|
"@eslint/markdown": "^8.0.3",
|
|
102
97
|
"@fast-element-plus/icons-vue": "^2.0.1",
|
|
103
|
-
"@types/lodash": "^4.17.25",
|
|
104
|
-
"@types/lodash-es": "^4.17.12",
|
|
105
98
|
"@types/node": "^24.13.4",
|
|
106
99
|
"@types/sortablejs": "^1.15.9",
|
|
107
100
|
"dayjs": "^1.11.23",
|
|
@@ -112,6 +105,7 @@
|
|
|
112
105
|
"eslint-plugin-import-x": "^4.17.1",
|
|
113
106
|
"eslint-plugin-jsonc": "^3.4.2",
|
|
114
107
|
"eslint-plugin-regexp": "^3.3.0",
|
|
108
|
+
"eslint-plugin-vue": "^10.11.0",
|
|
115
109
|
"globals": "^17.12.0",
|
|
116
110
|
"prettier": "^3.9.6",
|
|
117
111
|
"publint": "^0.3.24",
|
|
@@ -122,7 +116,8 @@
|
|
|
122
116
|
"typescript-eslint": "^8.70.0",
|
|
123
117
|
"unplugin-vue-jsx": "^0.10.0",
|
|
124
118
|
"vitepress": "^1.6.4",
|
|
125
|
-
"vue": "^3.5.11"
|
|
119
|
+
"vue": "^3.5.11",
|
|
120
|
+
"vue-eslint-parser": "^10.4.1"
|
|
126
121
|
},
|
|
127
122
|
"engines": {
|
|
128
123
|
"node": "^22.18.0 || ^24.18.0",
|