@fast-china/utils 2.0.0 → 2.0.3

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/Fast.png +0 -0
  3. package/README.md +27 -29
  4. package/README.zh.md +27 -29
  5. package/dist/base64/index.mjs.map +1 -1
  6. package/dist/crypto/index.d.mts +266 -97
  7. package/dist/crypto/index.mjs +565 -263
  8. package/dist/crypto/index.mjs.map +1 -1
  9. package/dist/identity/index.d.mts +5 -5
  10. package/dist/identity/index.mjs +2 -2
  11. package/dist/identity/index.mjs.map +1 -1
  12. package/dist/index.d.mts +3 -3
  13. package/dist/index.global.min.js +3 -0
  14. package/dist/index.global.min.js.map +1 -0
  15. package/dist/index.mjs +2 -2
  16. package/dist/storage/index.d.mts +11 -8
  17. package/dist/storage/index.mjs +21 -18
  18. package/dist/storage/index.mjs.map +1 -1
  19. package/dist/vue/emits.mjs.map +1 -1
  20. package/dist/vue/index.d.mts +2 -2
  21. package/dist/vue/install.d.mts +11 -29
  22. package/dist/vue/install.mjs +25 -25
  23. package/dist/vue/install.mjs.map +1 -1
  24. package/dist/vue/props.mjs.map +1 -1
  25. package/dist/vue/render.d.mts +2 -3
  26. package/dist/vue/render.mjs +3 -9
  27. package/dist/vue/render.mjs.map +1 -1
  28. package/docs/API.md +30 -14
  29. package/docs/API.zh-CN.md +30 -14
  30. package/docs/DEVELOPMENT_RELEASE.zh-CN.md +4 -4
  31. package/docs/RUNTIME_CONTRACT.md +10 -10
  32. package/package.json +9 -11
  33. package/dist/array/index.d.mts.map +0 -1
  34. package/dist/async/index.d.mts.map +0 -1
  35. package/dist/base64/index.d.mts.map +0 -1
  36. package/dist/color/index.d.mts.map +0 -1
  37. package/dist/crypto/index.d.mts.map +0 -1
  38. package/dist/date/index.d.mts.map +0 -1
  39. package/dist/dom/style.d.mts.map +0 -1
  40. package/dist/env/index.d.mts.map +0 -1
  41. package/dist/identity/index.d.mts.map +0 -1
  42. package/dist/logger/index.d.mts.map +0 -1
  43. package/dist/number/index.d.mts.map +0 -1
  44. package/dist/object/index.d.mts.map +0 -1
  45. package/dist/storage/index.d.mts.map +0 -1
  46. package/dist/string/index.d.mts.map +0 -1
  47. package/dist/vue/emits.d.mts.map +0 -1
  48. package/dist/vue/expose.d.mts.map +0 -1
  49. package/dist/vue/func.d.mts.map +0 -1
  50. package/dist/vue/install.d.mts.map +0 -1
  51. package/dist/vue/props.d.mts.map +0 -1
  52. package/dist/vue/render.d.mts.map +0 -1
  53. package/dist/vue/slots.d.mts.map +0 -1
  54. package/dist/vue/with.d.mts.map +0 -1
  55. package/src/array/index.ts +0 -173
  56. package/src/async/index.ts +0 -475
  57. package/src/base64/index.ts +0 -374
  58. package/src/color/index.ts +0 -208
  59. package/src/crypto/index.ts +0 -670
  60. package/src/date/index.ts +0 -451
  61. package/src/dom/index.ts +0 -6
  62. package/src/dom/style.ts +0 -92
  63. package/src/env/index.ts +0 -169
  64. package/src/identity/index.ts +0 -144
  65. package/src/index.ts +0 -20
  66. package/src/internal/text.ts +0 -46
  67. package/src/logger/index.ts +0 -219
  68. package/src/number/index.ts +0 -235
  69. package/src/object/index.ts +0 -160
  70. package/src/storage/index.ts +0 -524
  71. package/src/string/index.ts +0 -328
  72. package/src/vue/emits.ts +0 -71
  73. package/src/vue/expose.ts +0 -11
  74. package/src/vue/func.ts +0 -17
  75. package/src/vue/index.ts +0 -13
  76. package/src/vue/install.ts +0 -185
  77. package/src/vue/props.ts +0 -39
  78. package/src/vue/render.ts +0 -41
  79. package/src/vue/slots.ts +0 -23
  80. package/src/vue/with.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"install.mjs","names":[],"sources":["../../src/vue/install.ts"],"sourcesContent":["/** Vue 2.7 构造器与 Vue 3 App 共有的组件、指令注册能力。 */\nexport interface VueRegistrationTarget {\n\t/**\n\t * 读取或注册全局组件。\n\t *\n\t * @param name - 全局组件名。\n\t * @param component - 注册时传入的组件;省略时读取现有组件。\n\t * @returns Vue 平台返回的现有组件、注册结果或目标自身。\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 平台返回的现有指令、注册结果或目标自身。\n\t */\n\tdirective: (name: string, directive?: unknown) => unknown;\n}\n\n/** Vue 组件对象、函数组件或指令对象可接受的最小结构类型。 */\nexport type VueInstallValue = object | ((...arguments_: never[]) => unknown);\n\n/** Vue 组件或指令附加供 Vue 2.7 `Vue.use()` 与 Vue 3 `app.use()` 调用的安装能力。 */\nexport type Installable<Value> = Value & {\n\t/**\n\t * 把当前组件或指令安装到 Vue 2.7 构造器或 Vue 3 App。\n\t * @param target - Vue 2.7 构造器或 Vue 3 App 实例。\n\t */\n\tinstall: (target: unknown) => void;\n};\n\n/** TSX 组件安装类型;与 {@link Installable} 保持同一运行时契约。 */\nexport type TSXWithInstall<Value> = Installable<Value>;\n\n/**\n * 校验 Vue 插件安装目标。\n *\n * @param value - Vue 2.7 构造器或 Vue 3 App 实例。\n * @returns 只包含组件和指令注册能力的结构化目标。\n * @throws `TypeError` 当目标缺少 `component` 或 `directive` 方法。\n */\nconst assertTarget = (value: unknown): VueRegistrationTarget => {\n\tif ((typeof value !== \"object\" && typeof value !== \"function\") || value === null) {\n\t\tthrow new TypeError(\"Vue plugin installation requires a Vue constructor or App.\");\n\t}\n\tconst target = value as Partial<VueRegistrationTarget>;\n\tif (typeof target.component !== \"function\" || typeof target.directive !== \"function\") {\n\t\tthrow new TypeError(\"Vue plugin installation requires component() and directive() registration methods.\");\n\t}\n\treturn target as VueRegistrationTarget;\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(\"Installable Vue components must expose a non-empty name without whitespace.\");\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 target - 已校验的 Vue 注册目标。\n * @param component - 待注册组件。\n * @returns 已校验的组件引用、名称和目标中是否已经存在同一引用。\n * @throws `Error` 当同名位置已由其他组件占用。\n */\nconst prepareComponentRegistration = (target: VueRegistrationTarget, component: VueInstallValue): ComponentRegistration => {\n\tconst name = getComponentName(component);\n\tconst existing = target.component(name);\n\tif (existing !== undefined && existing !== component) {\n\t\tthrow new Error(`Vue component name \"${name}\" is already registered by another component.`);\n\t}\n\treturn { component, name, registered: existing === component };\n};\n\n/**\n * 为主组件附加 Vue 2.7 `Vue.use()` 与 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` 当安装目标中同名位置已经注册其他组件。\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(\"The Vue component already defines an install property.\");\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 component extras must use string property names.\");\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 component name \"${componentName}\" is registered more than once.`);\n\t\tcomponentNames.add(componentName);\n\t\tif (key === \"install\" || key in Object(main)) {\n\t\t\tthrow new TypeError(`Vue component extra \"${key}\" would overwrite a property on the main component.`);\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: unknown): void => {\n\t\tconst target = assertTarget(value);\n\t\t// 先完成全部冲突检查,再统一注册,避免安装到一半留下部分全局组件。\n\t\tconst registrations = [main, ...extraEntries.map(([, component]) => component)].map((component) =>\n\t\t\tprepareComponentRegistration(target, component)\n\t\t);\n\t\tfor (const registration of registrations) {\n\t\t\tif (!registration.registered) target.component(registration.name, registration.component);\n\t\t}\n\t};\n\treturn installable;\n}\n\n/**\n * 为不需要单独注册的附属组件附加空安装函数。\n *\n * @remarks 适用于只能作为主组件附属属性使用、但仍需满足 Vue Plugin 类型的组件。\n * 函数直接修改并返回传入组件,不会向 Vue 全局组件表注册内容。\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(\"The Vue component already defines an install property.\");\n\tconst installable = component as TSXWithInstall<Value>;\n\tinstallable.install = (): void => undefined;\n\treturn installable;\n}\n\n/**\n * 为 Vue 2.7/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` 当安装目标中同名位置已经注册其他指令。\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(\"Installable Vue directives require a name without whitespace or a v- prefix.\");\n\t}\n\tif (\"install\" in Object(directive)) throw new TypeError(\"The Vue directive already defines an install property.\");\n\tconst installable = directive as Installable<Value>;\n\tinstallable.install = (value: unknown): void => {\n\t\tconst target = assertTarget(value);\n\t\tconst existing = target.directive(name);\n\t\tif (existing !== undefined && existing !== directive) {\n\t\t\tthrow new Error(`Vue directive name \"${name}\" is already registered by another directive.`);\n\t\t}\n\t\tif (existing !== directive) target.directive(name, directive);\n\t};\n\treturn installable;\n}\n"],"mappings":";;;;;;;;AA0CA,MAAM,gBAAgB,UAA0C;CAC/D,IAAK,OAAO,UAAU,YAAY,OAAO,UAAU,cAAe,UAAU,MAC3E,MAAM,IAAI,UAAU,4DAA4D;CAEjF,MAAM,SAAS;CACf,IAAI,OAAO,OAAO,cAAc,cAAc,OAAO,OAAO,cAAc,YACzE,MAAM,IAAI,UAAU,oFAAoF;CAEzG,OAAO;AACR;;;;;;;;AASA,MAAM,oBAAoB,cAAuC;CAChE,MAAM,OAAQ,UAAiC;CAC/C,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,KAAK,MAAM,KAAK,IAAI,GACnE,MAAM,IAAI,UAAU,6EAA6E;CAElG,OAAO;AACR;;;;;;;;;;AAqBA,MAA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,MAAM,gBAAgB,eAC1B,IAAI,CAAC,aAAa,YAAY,OAAO,UAAU,aAAa,MAAM,aAAa,SAAS;CAE1F;CACA,OAAO;AACR;;;;;;;;;;AAWA,SAAgB,gBAA+C,WAAyC;CACvG,IAAI,aAAa,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,wDAAwD;CAChH,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,8EAA8E;CAEnG,IAAI,aAAa,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,wDAAwD;CAChH,MAAM,cAAc;CACpB,YAAY,WAAW,UAAyB;EAC/C,MAAM,SAAS,aAAa,KAAK;EACjC,MAAM,WAAW,OAAO,UAAU,IAAI;EACtC,IAAI,aAAa,KAAA,KAAa,aAAa,WAC1C,MAAM,IAAI,MAAM,uBAAuB,KAAK,8CAA8C;EAE3F,IAAI,aAAa,WAAW,OAAO,UAAU,MAAM,SAAS;CAC7D;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"install.mjs","names":[],"sources":["../../src/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: App): VueAppRegistrationTarget => {\n\tif (typeof value !== \"object\" || value === null) {\n\t\tthrow new TypeError(\"Vue plugin installation requires a Vue 3 App.\");\n\t}\n\tconst app = value as unknown as Partial<VueAppRegistrationTarget>;\n\tif (typeof app.component !== \"function\" || typeof app.directive !== \"function\") {\n\t\tthrow new TypeError(\"Vue plugin installation requires component() and directive() registration methods.\");\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(\"Installable Vue components must expose a non-empty name without whitespace.\");\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 component name \"${name}\" is already registered by another component.`);\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(\"The Vue component already defines an install property.\");\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 component extras must use string property names.\");\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 component name \"${componentName}\" is registered more than once.`);\n\t\tcomponentNames.add(componentName);\n\t\tif (key === \"install\" || key in Object(main)) {\n\t\t\tthrow new TypeError(`Vue component extra \"${key}\" would overwrite a property on the main component.`);\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(\"The Vue component already defines an install property.\");\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(\"Installable Vue directives require a name without whitespace or a v- prefix.\");\n\t}\n\tif (\"install\" in Object(directive)) throw new TypeError(\"The Vue directive already defines an install property.\");\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 directive name \"${name}\" is already registered by another directive.`);\n\t\t}\n\t\tif (existing !== directive) app.directive(name, directive);\n\t};\n\treturn installable;\n}\n"],"mappings":";;;;;;;;AA4CA,MAAM,aAAa,UAAyC;CAC3D,IAAI,OAAO,UAAU,YAAY,UAAU,MAC1C,MAAM,IAAI,UAAU,+CAA+C;CAEpE,MAAM,MAAM;CACZ,IAAI,OAAO,IAAI,cAAc,cAAc,OAAO,IAAI,cAAc,YACnE,MAAM,IAAI,UAAU,oFAAoF;CAEzG,OAAO;AACR;;;;;;;;AASA,MAAM,oBAAoB,cAAuC;CAChE,MAAM,OAAQ,UAAiC;CAC/C,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,KAAK,MAAM,KAAK,IAAI,GACnE,MAAM,IAAI,UAAU,6EAA6E;CAElG,OAAO;AACR;;;;;;;;;;AAqBA,MAAM,gCAAgC,KAA+B,cAAsD;CAC1H,MAAM,OAAO,iBAAiB,SAAS;CACvC,MAAM,WAAW,IAAI,UAAU,IAAI;CACnC,IAAI,aAAa,KAAA,KAAa,aAAa,WAC1C,MAAM,IAAI,MAAM,uBAAuB,KAAK,8CAA8C;CAE3F,OAAO;EAAE;EAAW;EAAM,YAAY,aAAa;CAAU;AAC9D;;;;;;;;;;;;AAaA,SAAgB,YACf,MACA,QAC6B;CAC7B,MAAM,iCAAiB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;CACvD,IAAI,aAAa,OAAO,IAAI,GAAG,MAAM,IAAI,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E,MAAM,IAAI,UAAU,8EAA8E;CAEnG,IAAI,aAAa,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,wDAAwD;CAChH,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,uBAAuB,KAAK,8CAA8C;EAE3F,IAAI,aAAa,WAAW,IAAI,UAAU,MAAM,SAAS;CAC1D;CACA,OAAO;AACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","names":[],"sources":["../../src/vue/props.ts"],"sourcesContent":["import { computed } from \"vue\";\n\nimport type { ComputedRef, PropType } from \"vue\";\n\n/**\n * 为 Vue 运行时 Props 构造器附加泛型类型。\n *\n * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应\n * 传入 Vue 支持的构造器或构造器数组。\n * @param runtimeType - Vue 支持的运行时构造器或构造器数组。\n * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。\n */\nexport function definePropType<Value>(runtimeType: unknown): PropType<Value> {\n\treturn runtimeType as PropType<Value>;\n}\n\n/**\n * 构建需要透传给子组件的响应式 Props。\n *\n * @param props - Vue `setup` 接收的只读响应式 Props 对象。\n * @param rawProps - 子组件的运行时 Props 配置。\n * @param ignoredProps - 不需要透传的 Props 名称。\n * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。\n */\nexport function useProps<Props extends object, RawProps extends object>(\n\tprops: Props,\n\trawProps: RawProps,\n\tignoredProps: readonly (keyof RawProps)[] = []\n): ComputedRef<Pick<Props, Extract<keyof Props, keyof RawProps>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredProps);\n\treturn computed<Pick<Props, Extract<keyof Props, keyof RawProps>>>(() => {\n\t\tconst result = {} as Pick<Props, Extract<keyof Props, keyof RawProps>>;\n\t\tfor (const key of Reflect.ownKeys(rawProps)) {\n\t\t\tif (ignored.has(key) || !Object.hasOwn(props, key)) continue;\n\t\t\tObject.defineProperty(result, key, { configurable: true, enumerable: true, value: Reflect.get(props, key), writable: true });\n\t\t}\n\t\treturn result;\n\t});\n}\n"],"mappings":";;;;;;;;;;AAYA,SAAgB,eAAsB,aAAuC;CAC5E,OAAO;AACR;;;;;;;;;AAUA,SAAgB,SACf,OACA,UACA,eAA4C,CAAC,GACoB;CACjE,MAAM,UAAU,IAAI,IAAiB,YAAY;CACjD,OAAO,eAAkE;EACxE,MAAM,SAAS,CAAC;EAChB,KAAK,MAAM,OAAO,QAAQ,QAAQ,QAAQ,GAAG;GAC5C,IAAI,QAAQ,IAAI,GAAG,KAAK,CAAC,OAAO,OAAO,OAAO,GAAG,GAAG;GACpD,OAAO,eAAe,QAAQ,KAAK;IAAE,cAAc;IAAM,YAAY;IAAM,OAAO,QAAQ,IAAI,OAAO,GAAG;IAAG,UAAU;GAAK,CAAC;EAC5H;EACA,OAAO;CACR,CAAC;AACF"}
1
+ {"version":3,"file":"props.mjs","names":[],"sources":["../../src/vue/props.ts"],"sourcesContent":["import { computed } from \"vue\";\nimport type { ComputedRef, PropType } from \"vue\";\n\n/**\n * 为 Vue 运行时 Props 构造器附加泛型类型。\n *\n * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应\n * 传入 Vue 支持的构造器或构造器数组。\n * @param runtimeType - Vue 支持的运行时构造器或构造器数组。\n * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。\n */\nexport function definePropType<Value>(runtimeType: unknown): PropType<Value> {\n\treturn runtimeType as PropType<Value>;\n}\n\n/**\n * 构建需要透传给子组件的响应式 Props。\n *\n * @param props - Vue `setup` 接收的只读响应式 Props 对象。\n * @param rawProps - 子组件的运行时 Props 配置。\n * @param ignoredProps - 不需要透传的 Props 名称。\n * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。\n */\nexport function useProps<Props extends object, RawProps extends object>(\n\tprops: Props,\n\trawProps: RawProps,\n\tignoredProps: readonly (keyof RawProps)[] = []\n): ComputedRef<Pick<Props, Extract<keyof Props, keyof RawProps>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredProps);\n\treturn computed<Pick<Props, Extract<keyof Props, keyof RawProps>>>(() => {\n\t\tconst result = {} as Pick<Props, Extract<keyof Props, keyof RawProps>>;\n\t\tfor (const key of Reflect.ownKeys(rawProps)) {\n\t\t\tif (ignored.has(key) || !Object.hasOwn(props, key)) continue;\n\t\t\tObject.defineProperty(result, key, { configurable: true, enumerable: true, value: Reflect.get(props, key), writable: true });\n\t\t}\n\t\treturn result;\n\t});\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,eAAsB,aAAuC;CAC5E,OAAO;AACR;;;;;;;;;AAUA,SAAgB,SACf,OACA,UACA,eAA4C,CAAC,GACoB;CACjE,MAAM,UAAU,IAAI,IAAiB,YAAY;CACjD,OAAO,eAAkE;EACxE,MAAM,SAAS,CAAC;EAChB,KAAK,MAAM,OAAO,QAAQ,QAAQ,QAAQ,GAAG;GAC5C,IAAI,QAAQ,IAAI,GAAG,KAAK,CAAC,OAAO,OAAO,OAAO,GAAG,GAAG;GACpD,OAAO,eAAe,QAAQ,KAAK;IAAE,cAAc;IAAM,YAAY;IAAM,OAAO,QAAQ,IAAI,OAAO,GAAG;IAAG,UAAU;GAAK,CAAC;EAC5H;EACA,OAAO;CACR,CAAC;AACF"}
@@ -1,9 +1,8 @@
1
1
  import { VNode } from "vue";
2
2
  //#region src/vue/render.d.ts
3
3
  /**
4
- * 在当前 Vue 2.7/3 组件实例上安装 TSX 渲染函数。
5
- *
6
- * @remarks 组件的 `setup` 可以继续返回状态对象,因此状态能够显示在 Vue Devtools 中。
4
+ * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。
5
+ * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。
7
6
  * @param render - 当前组件的渲染函数。
8
7
  * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。
9
8
  */
@@ -1,21 +1,15 @@
1
1
  import { getCurrentInstance } from "vue";
2
2
  //#region src/vue/render.ts
3
3
  /**
4
- * 在当前 Vue 2.7/3 组件实例上安装 TSX 渲染函数。
5
- *
6
- * @remarks 组件的 `setup` 可以继续返回状态对象,因此状态能够显示在 Vue Devtools 中。
4
+ * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。
5
+ * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。
7
6
  * @param render - 当前组件的渲染函数。
8
7
  * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。
9
8
  */
10
9
  function useRender(render) {
11
10
  const instance = getCurrentInstance();
12
11
  if (instance === null) throw new Error("useRender must be called from inside a setup function.");
13
- const compatible = instance;
14
- if (compatible.proxy?.$options !== void 0 && !("render" in compatible)) {
15
- compatible.proxy.$options.render = render;
16
- return;
17
- }
18
- compatible.render = render;
12
+ instance.render = render;
19
13
  }
20
14
  //#endregion
21
15
  export { useRender };
@@ -1 +1 @@
1
- {"version":3,"file":"render.mjs","names":[],"sources":["../../src/vue/render.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\n\nimport type { VNode } from \"vue\";\n\n/** Vue 2.7 Vue 3 组件实例中渲染函数可能出现的位置。 */\ninterface CompatibleVueInstance {\n\t/** Vue 2.7 兼容实例上的公共代理。 */\n\tproxy?: CompatibleVueProxy;\n\t/** Vue 3 内部组件实例直接持有的渲染函数。 */\n\trender?: () => VNode;\n}\n\n/** Vue 2.7 公共代理中允许写入渲染函数的最小结构。 */\ninterface CompatibleVueProxy {\n\t/** 当前组件的可变 Options API 配置。 */\n\t$options?: CompatibleVueOptions;\n}\n\n/** TSX Helper 需要写入的最小组件选项。 */\ninterface CompatibleVueOptions {\n\t/** 当前组件渲染函数;调用 {@link useRender} 后替换为传入函数。 */\n\trender?: () => VNode;\n}\n\n/**\n * 在当前 Vue 2.7/3 组件实例上安装 TSX 渲染函数。\n *\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 must be called from inside a setup function.\");\n\tconst compatible = instance as unknown as CompatibleVueInstance;\n\tif (compatible.proxy?.$options !== undefined && !(\"render\" in compatible)) {\n\t\tcompatible.proxy.$options.render = render;\n\t\treturn;\n\t}\n\tcompatible.render = render;\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgB,UAAU,QAA2B;CACpD,MAAM,WAAW,mBAAmB;CACpC,IAAI,aAAa,MAAM,MAAM,IAAI,MAAM,wDAAwD;CAC/F,MAAM,aAAa;CACnB,IAAI,WAAW,OAAO,aAAa,KAAA,KAAa,EAAE,YAAY,aAAa;EAC1E,WAAW,MAAM,SAAS,SAAS;EACnC;CACD;CACA,WAAW,SAAS;AACrB"}
1
+ {"version":3,"file":"render.mjs","names":[],"sources":["../../src/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 must be called from inside a setup function.\");\n\t(instance as unknown as MutableVueComponentInstance).render = render;\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,UAAU,QAA2B;CACpD,MAAM,WAAW,mBAAmB;CACpC,IAAI,aAAa,MAAM,MAAM,IAAI,MAAM,wDAAwD;CAC/F,SAAqD,SAAS;AAC/D"}
package/docs/API.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fast.Utils API
2
2
 
3
- Fast.Utils is a browser-first, pure ESM utility package targeting ES2022. Its application environments are modern browsers, WebViews, Vue 2.7/3, and uni-app.
3
+ Fast.Utils is a browser-first utility package targeting ES2022. Package managers use its ESM entry, while CDNs use the separately minified IIFE entry. Its application environments are modern browsers, WebViews, Vue 3, and uni-app.
4
4
 
5
5
  ## Imports
6
6
 
@@ -14,35 +14,32 @@ Internal helpers are not public subpaths. Aggregate utility objects are not expo
14
14
 
15
15
  ## Storage
16
16
 
17
- Call `configureStorage` once in the application entry, then import `Local` or `Session` directly wherever needed.
17
+ `Local` and `Session` initialize lazily with the legacy-compatible `fast__` prefix, JSON codec, and `Date.now`. Calling `configureStorage` is optional unless the defaults must be overridden.
18
18
 
19
19
  ```ts
20
- import { configureStorage, Local, Session } from "@fast-china/utils";
21
-
22
- configureStorage({ prefix: "admin:" });
20
+ import { Local, Session } from "@fast-china/utils";
23
21
 
24
22
  Local.set("profile", { name: "Ada" }, { ttlMs: 3_600_000 });
25
23
  Session.set("draft", { step: 2 });
26
24
  ```
27
25
 
28
- `Local` and `Session` provide `get`, `set`, `has`, `remove`, `removeByPrefix`, `keys`, `pruneExpired`, and namespace-scoped `clear`. Missing and expired values return `undefined`. Invalid TTL values, empty prefixes, malformed stored envelopes, unavailable platform storage, and conflicting repeated configuration throw errors. Native storage quota and privacy errors are propagated.
26
+ `Local` and `Session` provide `get`, `set`, `has`, `remove`, `removeByPrefix`, `keys`, `pruneExpired`, and namespace-scoped `clear`. Missing and expired values return `undefined`. Invalid TTL values, empty prefixes, malformed stored envelopes, unavailable platform storage, and conflicting repeated configuration throw errors. Native storage quota and privacy errors are propagated. Custom options must be configured before the first Storage operation.
29
27
 
30
- For uni-app, `configureStorage` automatically detects the global `uni` object and uses its synchronous Storage API. uni-app has no separate session backend, so `Session` throws when called in this mode.
28
+ For uni-app, the first Storage operation or an explicit `configureStorage` call detects the global `uni` object and uses its synchronous Storage API. uni-app has no separate session backend, so `Session` throws when called in this mode.
31
29
 
32
30
  ```ts
33
- import { configureStorage, Local } from "@fast-china/utils";
31
+ import { Local } from "@fast-china/utils";
34
32
 
35
- configureStorage({ prefix: "mini:" });
36
33
  Local.set("token", "value");
37
34
  ```
38
35
 
39
- Custom codecs may be supplied with `codec`. `base64StorageCodec` is reversible obfuscation, not encryption.
36
+ `configureStorage({ prefix: "admin:", crypto: true })` restores the old global prefix and Base64-obfuscation options. `crypto: true` and `base64StorageCodec` are reversible encoding rather than encryption and must not protect secrets. A custom `codec` may be supplied instead of `crypto`.
40
37
 
41
38
  `encodeSecureBase64` and `decodeSecureBase64` preserve the legacy dictionary payload while using a Web Crypto random prefix. Given the same default six-character prefix, valid legacy payloads remain byte-for-byte compatible. The old dictionary references an unavailable character for Base64 lengths 101–124, so the current implementation inserts a one-character fallback that the legacy removal flow can decode. The old custom-length argument always generated six random characters; the current API correctly generates `prefixLength` characters. Custom lengths must match during encoding and decoding; `0` disables both the prefix and dictionary insertion. The format remains reversible encoding rather than encryption.
42
39
 
43
40
  ## Identity
44
41
 
45
- `installationIdentity` is the global installation identifier facade. Call `configureInstallationIdentity` in the application entry before first use to override its `identity:installation-id` cache key. `getOrCreateInstallationId(installationId?)` loads, creates, or replaces its UUID v4 value in configured `Local` storage. Call `configureStorage` first. UUID generation requires Web Crypto and never falls back to `Math.random()`.
42
+ `installationIdentity` is the global installation identifier facade. Call `configureInstallationIdentity` in the application entry before first use to override its `identity:installation-id` cache key. `getOrCreateInstallationId(installationId?)` loads, creates, or replaces its UUID v4 value in `Local` storage. Storage uses its defaults when no explicit configuration was supplied. UUID generation requires Web Crypto and never falls back to `Math.random()`.
46
43
 
47
44
  ```ts
48
45
  import { configureInstallationIdentity, configureStorage, getOrCreateInstallationId, installationIdentity } from "@fast-china/utils";
@@ -69,13 +66,32 @@ logger.error("network", "request failed", error);
69
66
 
70
67
  `createLogger` configures the minimum level, brand prefix, sink, and optional uni-app App-Plus split output. Scope must be a non-empty string without surrounding whitespace.
71
68
 
69
+ ## Crypto
70
+
71
+ The TypeScript Crypto public API mirrors the public methods and algorithm casing of .NET `CryptoUtil`:
72
+
73
+ | Capability | Shared method names |
74
+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
75
+ | Secure random and byte comparison | `GenerateRandomBytes`, `FixedTimeEquals` |
76
+ | MD5, SHA-1, and SHA-2 digests | `MD5Encrypt`, `SHA1Encrypt`, `SHA256Encrypt`, `SHA256Bytes`, `SHA384Encrypt`, `SHA384Bytes`, `SHA512Encrypt`, `SHA512Bytes` |
77
+ | HMAC | `HMACSHA256Encrypt`, `HMACSHA384Encrypt`, `HMACSHA512Encrypt` |
78
+ | Password derivation and hashing | `PBKDF2SHA256`, `HashPasswordPBKDF2SHA256`, `VerifyPasswordPBKDF2SHA256` |
79
+ | HKDF | `HKDFSHA256` |
80
+ | AES | `AESEncrypt`, `AESDecrypt`, `AESEncryptAuthenticated`, `AESDecryptAuthenticated`, `AESEncryptWithPassword`, `AESDecryptWithPassword` |
81
+ | RSA | `GenerateRSAKeyPair`, `RSAEncryptOAEP`, `RSADecryptOAEP`, `RSASignPSS`, `RSAVerifyPSS` |
82
+ | Elliptic curves | `GenerateECDSAKeyPair`, `ECDSASign`, `ECDSAVerify`, `GenerateECDHKeyPair`, `DeriveECDHSecret`, `DeriveECDHKeySHA256` |
83
+
84
+ The Base64 v1 payload produced by `AESEncryptAuthenticated`, the `FAST-AES-256-GCM-V1` password payload, PBKDF2 password hashes, and PKCS#8/SPKI PEM keys interoperate with .NET in both directions. MD5 and HMAC output lowercase hexadecimal; SHA-1/256/384/512 output uppercase hexadecimal, matching .NET.
85
+
86
+ Store passwords with `HashPasswordPBKDF2SHA256` and `VerifyPasswordPBKDF2SHA256`; the result is not decryptable. AES-GCM provides confidentiality and integrity, HMAC authenticates with a shared key, SHA-2 computes digests, and HKDF/PBKDF2 derive keys. MD5, SHA-1, AES-CBC, and AES-ECB do not provide modern password-storage or authenticated-encryption guarantees.
87
+
72
88
  ## Modules
73
89
 
74
90
  - `array`: `chunk`, `removeNullishValues`, `unique`, `uniqueBy`, `groupBy`, `partition`, `difference`, `intersection`, `hasDuplicatesBy`, and `allEqualBy`.
75
91
  - `async`: abort-aware `sleep`, timeout, retry, bounded concurrent mapping, debounce, and throttle primitives.
76
92
  - `base64`: strict UTF-8 Base64/Base64URL byte and text functions plus the historical Latin-1 and dictionary-obfuscation functions.
77
93
  - `color`: Hex parsing/formatting/mixing, explicit black/white mixing, luminance, and contrast helpers.
78
- - `crypto`: secure randomness, hashes, AES compatibility helpers, authenticated password encryption, RSA-OAEP, ECDSA, and ECDH helpers.
94
+ - `crypto`: secure randomness, digests, HMAC, PBKDF2, HKDF, AES, RSA-OAEP/PSS, ECDSA, and ECDH.
79
95
  - `date`: date validation and arithmetic, day ranges, relative formatting, and the seven historical date helpers as named functions.
80
96
  - `dom`: CSS unit and style serialization helpers.
81
97
  - `env`: capability and user-agent detection. Detection does not expand the supported runtime contract.
@@ -83,11 +99,11 @@ logger.error("network", "request failed", error);
83
99
  - `number`: ranges, rounding, aggregation, interpolation, byte formatting, and secure integer generation.
84
100
  - `object`: prototype-safe selection, comparison, mapping, and query serialization. Style serialization is provided by the `dom` module.
85
101
  - `string`: query parsing, casing, grapheme-aware truncation, UUID, secure random strings, escaping, and whitespace normalization.
86
- - `vue`: Composition API, type, render, and registration helpers for Vue 2.7/3. `makeSlots` is Vue 3-only because it uses Vue's official `SlotsType`.
102
+ - `vue`: Composition API, type, render, and `app.use()` registration helpers for Vue 3.
87
103
 
88
104
  ## Security and limits
89
105
 
90
- Use authenticated password encryption for new protected payloads. AES-CBC/ECB, MD5, SHA-1, and the historical Base64 dictionary exist for protocol compatibility and must not be presented as modern authenticated encryption. Cryptographic helpers enforce algorithm-specific parameter and payload limits and require Web Crypto where applicable.
106
+ AES-GCM provides confidentiality and integrity; AES-CBC/ECB do not authenticate ciphertexts. MD5, SHA-1, and the historical Base64 dictionary must not protect passwords, signatures, or sensitive data. Cryptographic helpers enforce algorithm-specific parameter and payload limits and require Web Crypto where applicable.
91
107
 
92
108
  Query and object helpers reject prototype-polluting keys. URL decoders are bounded. Storage cleanup is always restricted to the configured namespace. Browser globals are resolved only when an API is called, never during module import.
93
109
 
package/docs/API.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fast.Utils API
2
2
 
3
- Fast.Utils 是面向浏览器的纯 ESM 工具包,语法目标为 ES2022,应用环境包括现代浏览器、WebView、Vue 2.7/3 和 uni-app。
3
+ Fast.Utils 是面向浏览器的 ES2022 工具包;包管理器使用 ESM 入口,CDN 使用单独压缩的 IIFE 入口。应用环境包括现代浏览器、WebView、Vue 3 和 uni-app。
4
4
 
5
5
  ## 导入
6
6
 
@@ -14,35 +14,32 @@ import { chunk, configureStorage, installationIdentity, Local } from "@fast-chin
14
14
 
15
15
  ## Storage
16
16
 
17
- 在程序入口调用一次 `configureStorage`,其余业务文件直接从包中导入 `Local` `Session`。
17
+ `Local` `Session` 会以旧版兼容的 `fast__` 前缀、JSON Codec 与 `Date.now` 延迟初始化。除非需要覆盖默认值,否则无需调用 `configureStorage`。
18
18
 
19
19
  ```ts
20
- import { configureStorage, Local, Session } from "@fast-china/utils";
21
-
22
- configureStorage({ prefix: "admin:" });
20
+ import { Local, Session } from "@fast-china/utils";
23
21
 
24
22
  Local.set("profile", { name: "Ada" }, { ttlMs: 3_600_000 });
25
23
  Session.set("draft", { step: 2 });
26
24
  ```
27
25
 
28
- `Local` 和 `Session` 提供 `get`、`set`、`has`、`remove`、`removeByPrefix`、`keys`、`pruneExpired` 和仅清理当前命名空间的 `clear`。键缺失或过期时返回 `undefined`。TTL 非法、Prefix 为空、存储包络损坏、平台 Storage 不可用或重复配置发生冲突时抛出错误;浏览器配额与隐私策略错误直接向上传播。
26
+ `Local` 和 `Session` 提供 `get`、`set`、`has`、`remove`、`removeByPrefix`、`keys`、`pruneExpired` 和仅清理当前命名空间的 `clear`。键缺失或过期时返回 `undefined`。TTL 非法、Prefix 为空、存储包络损坏、平台 Storage 不可用或重复配置发生冲突时抛出错误;浏览器配额与隐私策略错误直接向上传播。自定义选项必须在首次 Storage 操作前配置。
29
27
 
30
- uni-app 中,`configureStorage` 会自动检测全局 `uni` 并使用其同步 Storage API。uni-app 没有独立 Session 后端,因此该模式调用 `Session` 会明确抛错。
28
+ uni-app 中,首次 Storage 操作或显式调用 `configureStorage` 会自动检测全局 `uni` 并使用其同步 Storage API。uni-app 没有独立 Session 后端,因此该模式调用 `Session` 会明确抛错。
31
29
 
32
30
  ```ts
33
- import { configureStorage, Local } from "@fast-china/utils";
31
+ import { Local } from "@fast-china/utils";
34
32
 
35
- configureStorage({ prefix: "mini:" });
36
33
  Local.set("token", "value");
37
34
  ```
38
35
 
39
- 可以通过 `codec` 注入自定义 Codec。`base64StorageCodec` 只是可逆混淆,不是加密。
36
+ `configureStorage({ prefix: "admin:", crypto: true })` 恢复了旧版全局前缀与 Base64 混淆选项。`crypto: true` `base64StorageCodec` 都只是可逆编码,不是加密,不能保护敏感数据。可以使用自定义 `codec` 替代 `crypto`。
40
37
 
41
38
  `encodeSecureBase64` 与 `decodeSecureBase64` 保留旧字典兼容载荷,并使用 Web Crypto 生成安全随机前缀。给定相同的默认 6 字符前缀时,有效旧载荷保持逐字符兼容;旧字典在 Base64 长度 101–124 时会引用越界,当前实现使用单字符回退,旧删除字典流程仍可解码。旧自定义长度参数始终生成 6 个随机字符,当前 API 已按 `prefixLength` 正确生成。自定义 `prefixLength` 必须在编码和解码时保持一致;传入 `0` 会同时关闭随机前缀与字典插入。该格式仍是可逆编码,不等同于加密。
42
39
 
43
40
  ## Identity
44
41
 
45
- `installationIdentity` 是全局安装标识门面。可在程序入口、首次使用前调用 `configureInstallationIdentity` 覆盖默认缓存键 `identity:installation-id`。`getOrCreateInstallationId(installationId?)` 会通过已配置的 `Local` 读取、生成或替换 UUID v4。必须先调用 `configureStorage`。UUID 生成依赖 Web Crypto,不会回退到 `Math.random()`。
42
+ `installationIdentity` 是全局安装标识门面。可在程序入口、首次使用前调用 `configureInstallationIdentity` 覆盖默认缓存键 `identity:installation-id`。`getOrCreateInstallationId(installationId?)` 会通过 `Local` 读取、生成或替换 UUID v4;未显式配置 Storage 时使用其默认值。UUID 生成依赖 Web Crypto,不会回退到 `Math.random()`。
46
43
 
47
44
  ```ts
48
45
  import { configureInstallationIdentity, configureStorage, getOrCreateInstallationId, installationIdentity } from "@fast-china/utils";
@@ -69,13 +66,32 @@ logger.error("network", "request failed", error);
69
66
 
70
67
  `createLogger` 只配置最低级别、品牌前缀、Sink 和可选的 uni-app App-Plus 拆分输出。作用域必须是无外围空白的非空字符串。
71
68
 
69
+ ## Crypto
70
+
71
+ TypeScript Crypto 公共 API 与 .NET `CryptoUtil` 的公开方法及算法名称大小写保持一致:
72
+
73
+ | 能力 | 两端统一的方法名 |
74
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
75
+ | 安全随机与字节比较 | `GenerateRandomBytes`、`FixedTimeEquals` |
76
+ | MD5、SHA-1 与 SHA-2 摘要 | `MD5Encrypt`、`SHA1Encrypt`、`SHA256Encrypt`、`SHA256Bytes`、`SHA384Encrypt`、`SHA384Bytes`、`SHA512Encrypt`、`SHA512Bytes` |
77
+ | HMAC | `HMACSHA256Encrypt`、`HMACSHA384Encrypt`、`HMACSHA512Encrypt` |
78
+ | 密码派生与密码哈希 | `PBKDF2SHA256`、`HashPasswordPBKDF2SHA256`、`VerifyPasswordPBKDF2SHA256` |
79
+ | HKDF | `HKDFSHA256` |
80
+ | AES | `AESEncrypt`、`AESDecrypt`、`AESEncryptAuthenticated`、`AESDecryptAuthenticated`、`AESEncryptWithPassword`、`AESDecryptWithPassword` |
81
+ | RSA | `GenerateRSAKeyPair`、`RSAEncryptOAEP`、`RSADecryptOAEP`、`RSASignPSS`、`RSAVerifyPSS` |
82
+ | 椭圆曲线 | `GenerateECDSAKeyPair`、`ECDSASign`、`ECDSAVerify`、`GenerateECDHKeyPair`、`DeriveECDHSecret`、`DeriveECDHKeySHA256` |
83
+
84
+ `AESEncryptAuthenticated` 的 Base64 v1 载荷、`AESEncryptWithPassword` 的 `FAST-AES-256-GCM-V1` 载荷、PBKDF2 密码哈希以及 PKCS#8/SPKI PEM 密钥均可与 .NET 双向使用。MD5 与 HMAC 输出小写十六进制;SHA-1/256/384/512 输出大写十六进制,与 .NET 保持一致。
85
+
86
+ 密码存储使用 `HashPasswordPBKDF2SHA256` 和 `VerifyPasswordPBKDF2SHA256`;该哈希不可解密。需要同时保证机密性和完整性的文本使用 AES-GCM 入口。HMAC 用于共享密钥认证,SHA-2 用于摘要,HKDF/PBKDF2 用于密钥派生。MD5、SHA-1、AES-CBC 和 AES-ECB 不提供现代密码存储或认证加密保证。
87
+
72
88
  ## 模块
73
89
 
74
90
  - `array`:分块、压缩、去重、分组、分区、差集、交集和一致性判断。
75
91
  - `async`:支持取消的 Sleep、超时、重试、受限并发映射、防抖和节流。
76
92
  - `base64`:严格 UTF-8 Base64/Base64URL 字节与文本函数,以及 Latin-1 和 SecureBase64 兼容函数。
77
93
  - `color`:颜色解析、格式化、混合、明暗、亮度和对比度。
78
- - `crypto`:安全随机、哈希、AES 兼容函数、认证密码加密、RSA-OAEP、ECDSA 和 ECDH。
94
+ - `crypto`:安全随机、摘要、HMAC、PBKDF2、HKDF、AESRSA-OAEP/PSS、ECDSA 和 ECDH。
79
95
  - `date`:日期校验、加减、日范围、相对时间,以及七个历史日期功能的具名函数。
80
96
  - `dom`:CSS 单位和 Style 序列化。
81
97
  - `env`:能力与 User-Agent 检测;检测函数不扩大运行时支持范围。
@@ -83,11 +99,11 @@ logger.error("network", "request failed", error);
83
99
  - `number`:范围、舍入、聚合、插值、字节格式化和安全随机整数。
84
100
  - `object`:防原型污染的选择、比较、映射和 Query 序列化;Style 序列化由 `dom` 模块提供。
85
101
  - `string`:Query 解析、大小写、字素截断、UUID、安全随机文本、转义和空白规范化。
86
- - `vue`:Vue 2.7/3 的 Composition API、类型、Render 和注册 Helper;使用官方 `SlotsType` `makeSlots` 仅供 Vue 3 使用。
102
+ - `vue`:Vue 3 的 Composition API、类型、Render `app.use()` 注册 Helper。
87
103
 
88
104
  ## 安全与限制
89
105
 
90
- 新受保护载荷应使用认证密码加密。AES-CBC/ECBMD5、SHA-1 和历史 Base64 字典仅用于协议兼容,不能描述为现代认证加密。Crypto API 按算法限制参数和载荷大小,并在需要时强制要求 Web Crypto。
106
+ AES-GCM 提供机密性和完整性;AES-CBC/ECB 不提供认证。MD5、SHA-1 和历史 Base64 字典不能用于密码存储、签名或受保护数据。Crypto API 按算法限制参数和载荷大小,并在需要时强制要求 Web Crypto。
91
107
 
92
108
  Query 与 Object API 拒绝原型污染键,URL 解码有最大深度,Storage 清理只作用于配置的命名空间。浏览器全局对象只在调用 API 时解析,模块导入阶段不会访问。
93
109
 
@@ -5,10 +5,10 @@
5
5
  - Node.js:`^22.18.0 || ^24.18.0`。
6
6
  - pnpm:`^11.0.0`,不固定补丁版本。
7
7
  - TypeScript 6、tsdown、ESLint 10 Flat Config、Prettier 3。
8
- - 发布格式:纯 ESM、ES2022、`.mjs`、`.d.mts` Source Map。
8
+ - 发布格式:包管理器使用 ESM、`.mjs` 与 `.d.mts`,CDN 使用压缩 IIFE;两类 JavaScript 产物均提供 Source Map。
9
9
  - 根目录是唯一 npm 发布单元,根 `dist/` 是唯一产物目录。
10
10
 
11
- 应用环境包括现代浏览器、WebView、Vue 2.7/3 和 uni-app。
11
+ 应用环境包括现代浏览器、WebView、Vue 3 和 uni-app。
12
12
 
13
13
  ## 安装与命令
14
14
 
@@ -20,7 +20,7 @@ pnpm install --frozen-lockfile
20
20
  | 命令 | 用途 |
21
21
  | ------------------- | ---------------------------------------------------------------------- |
22
22
  | `pnpm dev` | 使用 tsdown 监听源码并增量构建 |
23
- | `pnpm build` | 使用 tsdown 构建统一公开入口与内部模块 |
23
+ | `pnpm build` | 使用 tsdown 构建 ESM 模块与压缩 IIFE |
24
24
  | `pnpm typecheck` | 检查源码与构建配置类型 |
25
25
  | `pnpm lint` | 运行零警告 ESLint |
26
26
  | `pnpm format:check` | 检查 Prettier |
@@ -44,7 +44,7 @@ pnpm install --frozen-lockfile
44
44
  ## 依赖与锁文件
45
45
 
46
46
  - Runtime Dependency 必须证明无法由平台能力或小型实现替代。
47
- - Vue 保持 Optional Peer Dependency,不得打包进发布产物。
47
+ - Vue 3.3+ 是必须安装的 Peer Dependency;ESM 与 IIFE 均保持外部引用,不打包进发布产物。
48
48
  - 依赖升级后使用当前 pnpm 11 更新 Lockfile,并通过 Frozen Lockfile 安装验证。
49
49
  - 不混用 npm、Yarn 或不同 pnpm 主版本改写 Lockfile。
50
50
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ## Runtime and package contract
4
4
 
5
- - Runtime platforms: ES2022 modern browsers, WebViews, Vue 2.7/3 applications, and uni-app.
6
- - Package format: pure ESM with one public named-export entry; CommonJS, UMD, and IIFE are not shipped.
7
- - Framework boundary: Vue remains external to the package build and is an optional peer in `^2.7.0 || ^3.3.0`.
8
- - uni-app boundary: `configureStorage({ prefix })` detects global `uni` at call time and uses its synchronous Storage API.
9
- - Browser storage: applications call `configureStorage()` once, then import `Local` and `Session` directly from the package.
5
+ - Runtime platforms: ES2022 modern browsers, WebViews, Vue 3 applications, and uni-app.
6
+ - Package format: one public named-export ESM entry for package managers and one separately minified IIFE entry for CDN use; CommonJS and UMD are not shipped.
7
+ - Framework boundary: Vue remains external to the package-manager build and is a required peer in `^3.3.0`.
8
+ - uni-app boundary: the first Storage operation, or an earlier `configureStorage({ prefix })` call, detects global `uni` and uses its synchronous Storage API.
9
+ - Browser storage: applications import `Local` and `Session` directly; `configureStorage()` is needed only to override defaults before the first operation.
10
10
  - Stateful browser defaults: Storage and Identity configuration are page-global by design. Conflicting reconfiguration throws.
11
11
  - Security: secure random APIs require Web Crypto and never fall back to `Math.random()`.
12
12
  - Publishing: the repository root is the only package, `dist/` is the only build output, and `package.json#exports` is the complete public path whitelist.
@@ -23,11 +23,11 @@ Importing a module does not itself read `window`, browser Storage, or `uni`, so
23
23
 
24
24
  ## 运行时与包契约
25
25
 
26
- - 运行平台:ES2022 现代浏览器、WebView、Vue 2.7/3 应用和 uni-app。
27
- - 包格式:仅纯 ESM 和单一公开具名导出入口,不发布 CommonJS、UMDIIFE
28
- - Vue 边界:Vue 不会打进本包产物,是 `^2.7.0 || ^3.3.0` 的可选 Peer。
29
- - uni-app:`configureStorage({ prefix })` 在调用阶段自动检测全局 `uni` 并使用其同步 Storage API。
30
- - Storage:程序入口配置一次,其他文件直接从包导入 `Local` 和 `Session`。
26
+ - 运行平台:ES2022 现代浏览器、WebView、Vue 3 应用和 uni-app。
27
+ - 包格式:包管理器使用单一公开具名导出 ESM 入口,CDN 使用单独压缩的 IIFE;不发布 CommonJS 或 UMD
28
+ - Vue 边界:Vue 不会打进包管理器使用的构建产物,是 `^3.3.0` 的必需 Peer。
29
+ - uni-app:首次 Storage 操作或更早的 `configureStorage({ prefix })` 调用会检测全局 `uni`,并使用其同步 Storage API。
30
+ - Storage:直接从包导入 `Local` 和 `Session` 即可;只有覆盖默认值时才需在首次操作前调用 `configureStorage()`。
31
31
  - 状态:Storage 与 Identity 配置按浏览器页面全局共享;冲突配置明确抛错。
32
32
  - 安全随机:要求 Web Crypto,禁止回退 `Math.random()`。
33
33
  - 发布:根目录是唯一 npm 包,`dist/` 是唯一构建输出,`exports` 是完整公共路径白名单。
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@fast-china/utils",
3
- "version": "2.0.0",
4
- "description": "Typed utilities for modern browsers, WebViews, Vue 2.7/3, and uni-app applications.",
3
+ "version": "2.0.3",
4
+ "description": "Typed utilities for modern browsers, WebViews, Vue 3, and uni-app applications.",
5
5
  "type": "module",
6
6
  "keywords": [
7
+ "fast",
7
8
  "fast-china",
8
9
  "typescript",
9
10
  "utils"
@@ -21,13 +22,13 @@
21
22
  "files": [
22
23
  "CHANGELOG.md",
23
24
  "CONTRIBUTING.md",
25
+ "Fast.png",
24
26
  "LICENSE",
25
27
  "README.md",
26
28
  "README.zh.md",
27
29
  "SECURITY.md",
28
30
  "dist",
29
- "docs",
30
- "src"
31
+ "docs"
31
32
  ],
32
33
  "main": "./dist/index.mjs",
33
34
  "module": "./dist/index.mjs",
@@ -40,6 +41,8 @@
40
41
  }
41
42
  },
42
43
  "sideEffects": false,
44
+ "unpkg": "./dist/index.global.min.js",
45
+ "jsdelivr": "./dist/index.global.min.js",
43
46
  "publishConfig": {
44
47
  "access": "public"
45
48
  },
@@ -53,18 +56,13 @@
53
56
  "format:check": "prettier --check .",
54
57
  "test": "pnpm run build && pnpm run test:types && pnpm run test:runtime && pnpm run test:package",
55
58
  "test:types": "tsc --noEmit --project tests/tsconfig.json",
56
- "test:runtime": "node --import tsx --test tests/async.test.ts tests/core.test.ts tests/storage-crypto.test.ts tests/storage-uni.test.ts tests/vue.test.ts",
59
+ "test:runtime": "node --import tsx --test tests/async.test.ts tests/core.test.ts tests/storage-crypto.test.ts tests/storage-default.test.ts tests/storage-uni.test.ts tests/vue.test.ts",
57
60
  "test:package": "node --test tests/package.test.mjs && publint --strict --pack npm",
58
61
  "check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run format:check",
59
62
  "prepack": "pnpm run check"
60
63
  },
61
64
  "peerDependencies": {
62
- "vue": "^2.7.0 || ^3.3.0"
63
- },
64
- "peerDependenciesMeta": {
65
- "vue": {
66
- "optional": true
67
- }
65
+ "vue": "^3.3.0"
68
66
  },
69
67
  "dependencies": {
70
68
  "crypto-js": "^4.2.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/array/index.ts"],"mappings":";;KACY,YAAY,MAAM,QAAQ,MAAM,MAAM,kBAAkB;;;;;;;;;;iBAWpD,MAAM,MAAM,gBAAgB,QAAQ,eAAe;;;;;;;iBAkBnD,oBAAoB,MAAM,iBAAiB,6BAA6B;;;;;;;iBAUxE,OAAO,MAA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AAS,eACP,QAAQ,QAAQ;;;;;;;;;;;;;iBAqCG,cAAc,MAAM,QACzC,gBAAgB,QAChB,qBACA,SAAS,MAAM,MAAM,eAAe,QAAQ,4BAA4B,SAAS,YAAY,SAC7F,UAAS,uBACP,QAAQ,QAAQ;;;;;;;;;;;iBA+CH,SAAS,6BAA6B,QACrD,UAAU,cAAc,WAAW,SACnC,mBACE,kBAAkB,WAAW,QAAQ;;;;;;;;;;;iBA+ExB,SAAS,6BAA6B,QACrD,UAAU,cAAc,WAAW,SACnC,mBACE,kBAAkB,WAAW,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/base64/index.ts"],"mappings":";;;;;;;iBAwHgB,kBAAkB,OAAO;;;;;;;;;iBAYzB,kBAAkB,gBAAgB;;;;;;;;iBAWlC,aAAa;;;;;;;;iBAWb,aAAa;;;;;;;iBAUb,qBAAqB,OAAO;;;;;;;;;iBAY5B,qBAAqB,gBAAgB;;;;;;;;iBAWrC,gBAAgB;;;;;;;;iBAWhB,gBAAgB;;;;;;;;iBAWhB,mBAAmB;;;;;;;;iBAiBnB,mBAAmB;;;;;;;;;;;;iBA2HnB,mBAAmB,eAAe;;;;;;;;;iBAiBlC,mBAAmB,eAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/color/index.ts"],"mappings":";;UACiB;;EAEhB;;EAEA;;EAEA;;;UAIgB,kBAAkB;;EAElC;;;;;;;;;iBA0De,cAAc,gBAAgB;;;;;;;;;iBAkB9B,eAAe,OAAO,WAAW,WAAW;;;;;;;;;;iBAmB5C,aAAa,eAAe,gBAAgB;;;;;;;;iBAgC5C,qBAAqB,eAAe;;;;;;;;iBAWpC,qBAAqB,eAAe;;;;;;;;;iBAuBpC,kBAAkB;;;;;;;;;;iBAclB,cAAc,eAAe;;;;;;;;;;iBAiB7B,wBAAwB,oBAAoB,gBAAmB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index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;;;;;iBAqBE,OAAO,OAAO,YAAY;;;;;;;iBAc1B,YAAY,iBAAiB,SAAS;;;;;;;;iBAYtC,WAAW,OAAO,YAAY;;;;;;;;iBAa9B,SAAS,OAAO,YAAY;;;;;;;;;iBAc5B,QAAQ,OAAO,WAAW,iBAAiB;;;;;;;;;;iBAgB3C,UAAU,OAAO,WAAW,iBAAiB;;;;;;;;;iBAsB7C,SAAS,OAAO,WAAW,iBAAiB;;;;;;;;;iBAa5C,UAAU,MAAM,WAAW,OAAO;;;;;;;;;iBAclC,SAAS,OAAO,WAAW,MAAK;;;;;;;;iBAWhC,kBAAkB,QAAO,aAA0B,OAAO,MAAM,KAAK;;;;;;;;;;iBAarE,iBAAiB,OAAO,WAAW,OAAO,WAAW,KAAK;;;;;;;;;;iBAiB1D,mBAAmB,OAAO,WAAW,UAAS;;UAmC7C;;EAEhB;;;;;EAKA,aAAa;;;UAIG;;EAEhB;;;;;EAKA,cAAc,OAAO,MAAM,KAAK;;;;;;;;;iBA0EjB,0BAA0B,OAAO;;;;;;;iBAqCjC,6BAA6B,0BAAwB,OAAO,MAAM,KAAK;;;;;;;iBAevE,eAAe,MAAM;;;;;;iBASrB;;;;;;;iBAiBA,yBAAyB,yBAAuB;;;;;;;iBA4BhD,oBAAoB,yBAAuB;;;;;;iBAuB3C,mBAAmB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.d.mts","names":[],"sources":["../../src/dom/style.ts"],"mappings":";;KACY;;KAGA,cAAc,SAAS,eAAe;;KAGtC,sBAAsB,uBAAuB;;;;;;;;;iBA0CzC,WAAW,gCAAgC;;;;;;;;;;;iBAsB3C,eAAe,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/env/index.ts"],"mappings":";;KACY;;;;;;iBA2EI;;;;;;;;iBAYA;;;;;;iBASA;;;;;;iBASA;;;;;;;;iBAWA;;;;;;;iBAwBA,iBAAiB;;;;;;;;iBAcjB,kBAAkB;;;;;;;;iBAWlB,kBAAkB,oBAAwC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/identity/index.ts"],"mappings":";;UAMiB;;;;;;EAMhB;;;UAIgB;;;;;;WAMP;;;;;;EAMT;;;;;;EAMA;;;;;;;;;EASA,cAAc;;;;;;;;;EASd;;;;;;;;;;;iBAmCe,8BAA8B,UAAS;;;;;;;cAkB1C,sBAAsB;;;;;;;;;iBAoCnB,0BAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/logger/index.ts"],"mappings":";;KACY;;UAGK;;;;;EAKhB,WAAW;;;;;EAKX,SAAS;;;;;EAKT,UAAU;;;;;EAKV,WAAW;;;UAIK;;EAEhB,QAAQ;;EAER;;EAEA,OAAO;;EAEP;;;UAIgB;;;;;;;;EAQhB,QAAQ,eAAe,oBAAoB;;;;;;;;EAQ3C,OAAO,eAAe,oBAAoB;;;;;;;;EAQ1C,OAAO,eAAe,oBAAoB;;;;;;;;EAQ1C,QAAQ,eAAe,oBAAoB;;;;;;;;;;;iBA4F5B,aAAa,UAAS,gBAAqB;;cAsD9C,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/number/index.ts"],"mappings":";;UAYiB;;EAEhB;;EAEA;;EAEA;;;;;;;;;;;iBAgDe,MAAM,eAAe,iBAAiB;;;;;;;;;;;iBAkBtC,QAAQ,eAAe,iBAAiB,iBAAiB;;;;;;;;;;iBAiBzD,QAAQ,eAAe;;;;;;;;iBAkBvB,IAAI;;;;;;;;iBAsBJ,QAAQ;;;;;;;;;;;iBAsBR,KAAK,eAAe,aAAa;;;;;;;;;iBAiBjC,YAAY,eAAe,UAAS;;;;;;;;;iBA+BpC,gBAAgB,iBAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/object/index.ts"],"mappings":";;KACY;;KAGA,aAAa,0BAA0B;;UAWlC;;EAE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S;;;;;;;;iBAanC,WAAW,eAAe,SAAS;;;;;;;;iBAanC,UAAU,eAAe,SAAS;;;;;;;;iBAgBlC,WAAW,eAAe,SAAS;;;;;;;;iBAWnC,UAAU,eAAe,SAAS;;;;;;;;;;;;iBAiBlC,kBAAkB,eAAe,mBAAmB,iBAAc,SAAS;;;;;;;;;iBAc3E,mBAAmB,gBAAgB;;;;;;;iBAoCnC;;;;;;;iBAYA,SAAS;;;;;;;;iBAWT,WAAW;;;;;;;iBAuBX,oBAAoB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"emits.d.mts","names":[],"sources":["../../src/vue/emits.ts"],"mappings":";;;KAKK,qBAAqB;;KAErB,eAAe,eAAe;;KAE9B,eAAe,aAAa,uBAAsB,kBAAkB,yBAAwB;;KAE5F,gBAAgB,wBAAwB,uBAAuB,cAAc,YAC5E,WAAW,QAAQ,gBAAgB,UACtC,WAAW;;KAGF,aAAa,cAAc,mBACrC,cAAc,SAAS,2BAA2B,gBAAgB,sBAAsB,YAAY,eAAe,MAAM;;;;;;;;;iBAyB3G,SAAS,cAAc,cACtC,OAAO,OACP,UAAU,iCACV,gCAA+B,WAC7B,YAAY,QAAQ,aAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"expose.d.mts","names":[],"sources":["../../src/vue/expose.ts"],"mappings":";;;;;;;;iBAOgB,UAAU,wBAAwB,SAAS,UAAU,kBAAkB,SAAS,UAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"func.d.mts","names":[],"sources":["../../src/vue/func.ts"],"mappings":";;KACY,kBAAkB,sCAAsC,cAAc,YAAY,cAAc,SAAS,YAAY;;;;;;;;iBAS3G,qBAAqB,sCAAsC,QAChF,WAAW,kBAAkB,WAAW,+BACrC,YAAY,YACb,QAAQ,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"install.d.mts","names":[],"sources":["../../src/vue/install.ts"],"mappings":";;UACiB;;;;;;;;EAQhB,YAAY,cAAc;;;;;;;;EAQ1B,YAAY,cAAc;;;KAIf,gCAAgC;;KAGhC,YAAY,SAAS;;;;;EAKhC,UAAU;;;KAIC,eAAe,SAAS,YAAY;;;;;;;;;;;;iBA0EhC,YAAY,aAAa,iBAAiB,eAAe,eAAe,mBAAmB,sBAC1G,MAAM,MACN,SAAS,SACP,YAAY,QAAQ;;;;;;;;;;iBAyCP,gBAAgB,cAAc,iBAAiB,WAAW,QAAQ,eAAe;;;;;;;;;;;;iBAkBjF,qBAAqB,cAAc,iBAAiB,WAAW,OAAO,eAAe,YAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.mts","names":[],"sources":["../../src/vue/props.ts"],"mappings":";;;;;;;;;;iBAYgB,eAAe,OAAO,uBAAuB,SAAS;;;;;;;;;iBAYtD,SAAS,sBAAsB,yBAC9C,OAAO,OACP,UAAU,UACV,+BAA8B,cAC5B,YAAY,KAAK,OAAO,cAAc,aAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.mts","names":[],"sources":["../../src/vue/render.ts"],"mappings":";;;;;;;;;iBA+BgB,UAAU,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.mts","names":[],"sources":["../../src/vue/slots.ts"],"mappings":";;;KAGK,WAAW;;KAEX,QAAQ,eAAe,oCAAoC,WAAW,YAAY,eAAe;;KAG1F,WAAW,cAAc,eACnC,cAAc,QAAQ,QAAQ,MAAM;;KAI1B,sBAAsB,cAAc,YAAY,UAAU,QAAQ,WAAW;;;;;;iBAOzE,UAAU,cAAc,aAAa,sBAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"with.d.mts","names":[],"sources":["../../src/vue/with.ts"],"mappings":";;;;;;;;iBAOgB,eAAe,OAAO,OAAO,QAAQ"}