@ug666/ui-core 0.3.0-beta.1 → 0.3.0-beta.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 (62) hide show
  1. package/LICENSE +21 -0
  2. package/dist/RELEASE_PROVENANCE.json +8 -0
  3. package/dist/THIRD_PARTY_NOTICES.txt +98 -0
  4. package/dist/chunk-SSXPAFU2.js +3 -0
  5. package/dist/chunk-SSXPAFU2.js.map +1 -0
  6. package/dist/compat/table-css.d.ts +12 -0
  7. package/dist/compat/table-css.d.ts.map +1 -0
  8. package/dist/controls/rating.d.ts +6 -0
  9. package/dist/controls/rating.d.ts.map +1 -0
  10. package/dist/controls/select-value.d.ts.map +1 -0
  11. package/dist/controls/selection-list.d.ts +31 -0
  12. package/dist/controls/selection-list.d.ts.map +1 -0
  13. package/dist/controls/text-value.d.ts.map +1 -0
  14. package/dist/date-time/calendar.d.ts +26 -0
  15. package/dist/date-time/calendar.d.ts.map +1 -0
  16. package/dist/date-time/date-picker-modes.d.ts +16 -0
  17. package/dist/date-time/date-picker-modes.d.ts.map +1 -0
  18. package/dist/date-time/date-range.d.ts +9 -0
  19. package/dist/date-time/date-range.d.ts.map +1 -0
  20. package/dist/date-time/date-time.d.ts +43 -0
  21. package/dist/date-time/date-time.d.ts.map +1 -0
  22. package/dist/form/form-state.d.ts +30 -0
  23. package/dist/form/form-state.d.ts.map +1 -0
  24. package/dist/{form-validation.d.ts → form/form-validation.d.ts} +2 -1
  25. package/dist/form/form-validation.d.ts.map +1 -0
  26. package/dist/image-preview.d.ts +8 -0
  27. package/dist/image-preview.d.ts.map +1 -0
  28. package/dist/index.cjs +2 -180
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +19 -3
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -121
  33. package/dist/index.js.map +1 -1
  34. package/dist/table/table-layout.d.ts +14 -0
  35. package/dist/table/table-layout.d.ts.map +1 -0
  36. package/dist/table/table-structure.d.ts +29 -0
  37. package/dist/table/table-structure.d.ts.map +1 -0
  38. package/dist/table/tree-table.d.ts +21 -0
  39. package/dist/table/tree-table.d.ts.map +1 -0
  40. package/dist/theme/color.d.ts +17 -0
  41. package/dist/theme/color.d.ts.map +1 -0
  42. package/dist/theme/state.d.ts +79 -0
  43. package/dist/theme/state.d.ts.map +1 -0
  44. package/dist/theme.cjs +2 -59
  45. package/dist/theme.cjs.map +1 -1
  46. package/dist/theme.d.ts +2 -31
  47. package/dist/theme.d.ts.map +1 -1
  48. package/dist/theme.js +2 -8
  49. package/dist/tree/tree-check.d.ts +23 -0
  50. package/dist/tree/tree-check.d.ts.map +1 -0
  51. package/dist/tree/tree-drag.d.ts +8 -0
  52. package/dist/tree/tree-drag.d.ts.map +1 -0
  53. package/dist/tree/tree-path.d.ts +29 -0
  54. package/dist/tree/tree-path.d.ts.map +1 -0
  55. package/package.json +4 -3
  56. package/dist/chunk-S4DT6FOD.js +0 -35
  57. package/dist/chunk-S4DT6FOD.js.map +0 -1
  58. package/dist/form-validation.d.ts.map +0 -1
  59. package/dist/select-value.d.ts.map +0 -1
  60. package/dist/text-value.d.ts.map +0 -1
  61. /package/dist/{select-value.d.ts → controls/select-value.d.ts} +0 -0
  62. /package/dist/{text-value.d.ts → controls/text-value.d.ts} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 UG666
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ {
2
+ "schema": 1,
3
+ "package": "@ug666/ui-core",
4
+ "version": "0.3.0-beta.3",
5
+ "revision": "9e22bdf2e48e7f1cb13b9ae95265abf738c7cc5a",
6
+ "tag": "next",
7
+ "dirty": false
8
+ }
@@ -0,0 +1,98 @@
1
+ Arco Design
2
+ Source: https://github.com/arco-design/arco-design
3
+ Version: 2.66.16
4
+ Commit: fbf2ec0a8cc28a5d20f1f82de6c2c4196ef66950
5
+ Also adapted from Arco Design Vue:
6
+ Source: https://github.com/arco-design/arco-design-vue
7
+ Version: 2.58.0
8
+ Commit: 5a707cc60c1130d8dae3aefb2e93616541952a66
9
+ UG UI includes adapted portions of Arco Design. Source mappings and local
10
+ modifications are documented in docs/UI_DEVELOPMENT_GUIDE.md.
11
+
12
+ MIT License
13
+
14
+ Copyright (c) 2021 Bytedance, Inc. and its affiliates.
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
33
+
34
+ Element Plus
35
+ Source: https://github.com/element-plus/element-plus
36
+ Version: 2.14.7
37
+ Commit: 77d5c32c4ebcfffde67e51f6325c6d350ca668a0
38
+ Also adapted from Version: 2.13.1
39
+ Commit: d8c723219a471c711fa2a798a8b85a1f06e2e63d
40
+ UG UI adapts the TreeSelect depth-first node lookup algorithm from 2.14.7,
41
+ and default control surfaces, border/radius tokens and plain-button state
42
+ mixing from 2.13.1. React/Vue components use UG primitives, themes and public
43
+ APIs. Source mappings and local modifications are documented in
44
+ docs/UI_DEVELOPMENT_GUIDE.md.
45
+
46
+ MIT License
47
+
48
+ Copyright (c) 2020-PRESENT Element Plus
49
+
50
+ Permission is hereby granted, free of charge, to any person obtaining a copy
51
+ of this software and associated documentation files (the "Software"), to deal
52
+ in the Software without restriction, including without limitation the rights
53
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
+ copies of the Software, and to permit persons to whom the Software is
55
+ furnished to do so, subject to the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be included in all
58
+ copies or substantial portions of the Software.
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
66
+ SOFTWARE.
67
+
68
+
69
+ Element UI
70
+ Source: https://github.com/ElemeFE/element
71
+ Version: 2.15.14
72
+ Commit: 290e68ea6aa6c56b7d83182b650e3be4f77ff1b0
73
+ UG UI adapts color conversion algorithms and selected interaction/structure
74
+ contracts into native React/Vue components, semantic tokens and replaceable
75
+ callbacks. No Element runtime is required. Source mappings and local changes
76
+ are documented in docs/UI_DEVELOPMENT_GUIDE.md.
77
+
78
+ The MIT License (MIT)
79
+
80
+ Copyright (c) 2016-present ElemeFE
81
+
82
+ Permission is hereby granted, free of charge, to any person obtaining a copy
83
+ of this software and associated documentation files (the "Software"), to deal
84
+ in the Software without restriction, including without limitation the rights
85
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
86
+ copies of the Software, and to permit persons to whom the Software is
87
+ furnished to do so, subject to the following conditions:
88
+
89
+ The above copyright notice and this permission notice shall be included in all
90
+ copies or substantial portions of the Software.
91
+
92
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
93
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
94
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
95
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
96
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
98
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ "use client"
2
+ var defaultUGThemeNavigationColors={default:{light:{background:"#ffffff",text:"#475569",activeBackground:"#ecf5ff",activeText:"#1d4ed8",hoverBackground:"#f1f5f9"},dark:{background:"#151c28",text:"#cbd5e1",activeBackground:"#3178c2",activeText:"#ffffff",hoverBackground:"#293442"}},minimal:{light:{background:"#ffffff",text:"#334155",activeBackground:"#e0f2fe",activeText:"#0369a1",hoverBackground:"#f8fafc"},dark:{background:"#111827",text:"#d1d5db",activeBackground:"#164e63",activeText:"#ecfeff",hoverBackground:"#1f2937"}},mecha:{light:{background:"#eef2f6",text:"#334155",activeBackground:"#cffafe",activeText:"#0e7490",hoverBackground:"#e2e8f0"},dark:{background:"#0b1220",text:"#cbd5e1",activeBackground:"#155e75",activeText:"#ecfeff",hoverBackground:"#172033"}}};var defaultUGNavigationColors=defaultUGThemeNavigationColors.default;function resolveUGNavigationPalette(mode,prefersDark=false){if(mode==="dark")return"dark";if(mode==="light")return"light";return prefersDark?"dark":"light"}var defaultUGAccentNavigationColors={cyan:{light:{activeBackground:"#cffafe",activeText:"#0e7490"},dark:{activeBackground:"#0e7490",activeText:"#ecfeff"}},blue:{light:{activeBackground:"#dbeafe",activeText:"#1d4ed8"},dark:{activeBackground:"#1d4ed8",activeText:"#eff6ff"}},violet:{light:{activeBackground:"#ede9fe",activeText:"#6d28d9"},dark:{activeBackground:"#6d28d9",activeText:"#f5f3ff"}},emerald:{light:{activeBackground:"#d1fae5",activeText:"#047857"},dark:{activeBackground:"#047857",activeText:"#ecfdf5"}},rose:{light:{activeBackground:"#ffe4e6",activeText:"#be123c"},dark:{activeBackground:"#be123c",activeText:"#fff1f2"}}};function resolveUGNavigationColors(preset,palette,overrides,accent="theme"){if(overrides)return overrides;const themeColors=preset in defaultUGThemeNavigationColors?defaultUGThemeNavigationColors[preset]:defaultUGThemeNavigationColors.default;const resolvedColors=themeColors[palette];if(accent in defaultUGAccentNavigationColors){return{...resolvedColors,...defaultUGAccentNavigationColors[accent][palette]}}return resolvedColors}var ugThemeProfileFields=["density","radius","shadow","font","contrast","motion","background"];var defaultUGTheme={preset:"default",mode:"system",surface:"workspace",density:"comfortable",radius:"default",shadow:"standard",font:"system",contrast:"standard",motion:"standard",background:"grid",accent:"theme"};var defaultUGThemeProfiles=[{id:"balanced",label:"\u5747\u8861",description:"\u8212\u9002\u3001\u6E05\u6670\uFF0C\u9002\u5408\u65E5\u5E38\u901A\u7528\u64CD\u4F5C\u3002",value:{density:"comfortable",radius:"default",shadow:"standard",font:"system",contrast:"standard",motion:"standard",background:"plain"}},{id:"efficient",label:"\u9AD8\u6548",description:"\u7D27\u51D1\u3001\u5229\u843D\uFF0C\u9002\u5408\u9AD8\u9891\u64CD\u4F5C\u548C\u6570\u636E\u5DE5\u4F5C\u3002",value:{density:"compact",radius:"sharp",shadow:"flat",font:"compact",contrast:"strong",motion:"reduced",background:"plain"}},{id:"readable",label:"\u6613\u8BFB",description:"\u5BBD\u677E\u3001\u6E05\u6670\uFF0C\u9002\u5408\u957F\u65F6\u95F4\u9605\u8BFB\u548C\u4F4E\u523A\u6FC0\u64CD\u4F5C\u3002",value:{density:"spacious",radius:"soft",shadow:"standard",font:"readable",contrast:"strong",motion:"reduced",background:"plain"}}];var defaultUGThemeConfiguratorOptions={presets:[{value:"default",label:"\u9ED8\u8BA4",description:"\u5747\u8861\u7684\u8FB9\u754C\u3001\u5C42\u6B21\u4E0E\u4FE1\u606F\u5BC6\u5EA6\u3002"},{value:"minimal",label:"\u7B80\u6D01",description:"\u51CF\u5C11\u88C5\u9970\uFF0C\u8BA9\u5185\u5BB9\u6210\u4E3A\u89C6\u89C9\u4E2D\u5FC3\u3002"},{value:"mecha",label:"\u673A\u68B0",description:"\u786C\u6717\u8FB9\u754C\u4E0E\u7D27\u51D1\u7684\u63A7\u5236\u53F0\u8282\u594F\u3002"}],modes:[{value:"system",label:"\u8DDF\u968F\u7CFB\u7EDF",description:"\u81EA\u52A8\u5339\u914D\u8BBE\u5907\u5916\u89C2\u3002"},{value:"light",label:"\u4EAE\u8272",description:"\u59CB\u7EC8\u4F7F\u7528\u4EAE\u8272\u754C\u9762\u3002"},{value:"dark",label:"\u6697\u8272",description:"\u59CB\u7EC8\u4F7F\u7528\u6697\u8272\u754C\u9762\u3002"}],surfaces:[{value:"workspace",label:"\u5DE5\u4F5C\u533A"},{value:"showcase",label:"\u5C55\u793A\u9875"},{value:"auth",label:"\u8BA4\u8BC1\u9875"},{value:"content",label:"\u5185\u5BB9\u9875"}],densities:[{value:"comfortable",label:"\u8212\u9002"},{value:"compact",label:"\u7D27\u51D1"},{value:"spacious",label:"\u5BBD\u677E"}],radii:[{value:"sharp",label:"\u5229\u843D"},{value:"default",label:"\u9ED8\u8BA4"},{value:"soft",label:"\u67D4\u548C"}],shadows:[{value:"flat",label:"\u5E73\u9762"},{value:"standard",label:"\u6807\u51C6"},{value:"layered",label:"\u5C42\u6B21"}],fonts:[{value:"system",label:"\u7CFB\u7EDF"},{value:"readable",label:"\u6613\u8BFB"},{value:"compact",label:"\u7D27\u51D1"}],contrasts:[{value:"soft",label:"\u67D4\u548C"},{value:"standard",label:"\u6807\u51C6"},{value:"strong",label:"\u6E05\u6670"}],motions:[{value:"reduced",label:"\u51CF\u5C11"},{value:"standard",label:"\u6807\u51C6"},{value:"lively",label:"\u7075\u52A8"}],backgrounds:[{value:"plain",label:"\u7EAF\u51C0"},{value:"grid",label:"\u7F51\u683C"},{value:"soft",label:"\u67D4\u5149"}],accents:[{value:"theme",label:"\u4E3B\u9898\u9ED8\u8BA4"},{value:"cyan",label:"UG \u9752"},{value:"blue",label:"\u6D77\u84DD"},{value:"violet",label:"\u7D2B\u6676"},{value:"emerald",label:"\u677E\u7EFF"},{value:"rose",label:"\u73AB\u7EA2"}]};function createUGThemeValue(parent,overrides){return{preset:overrides.preset??parent.preset,mode:overrides.mode??parent.mode,surface:overrides.surface??parent.surface,density:overrides.density??parent.density,radius:overrides.radius??parent.radius,shadow:overrides.shadow??parent.shadow,font:overrides.font??parent.font,contrast:overrides.contrast??parent.contrast,motion:overrides.motion??parent.motion,background:overrides.background??parent.background,accent:overrides.accent??parent.accent}}function applyUGThemeProfile(current,profile){return createUGThemeValue(current,profile.value)}function isUGThemeProfileModified(current,profile){return ugThemeProfileFields.some(field=>current[field]!==profile.value[field])}export{defaultUGThemeNavigationColors,defaultUGNavigationColors,resolveUGNavigationPalette,resolveUGNavigationColors,ugThemeProfileFields,defaultUGTheme,defaultUGThemeProfiles,defaultUGThemeConfiguratorOptions,createUGThemeValue,applyUGThemeProfile,isUGThemeProfileModified};
3
+ //# sourceMappingURL=chunk-SSXPAFU2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/state.ts"],"sourcesContent":["/**\n * @description: UG UI 平台无关主题语义与组合规则\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-21\n */\nexport type UGThemePreset = 'default' | 'minimal' | 'mecha' | (string & {})\nexport type UGThemeMode = 'light' | 'dark' | 'system'\nexport type UGThemeSurfaceValue = 'workspace' | 'showcase' | 'auth' | 'content' | (string & {})\nexport type UGThemeDensity = 'comfortable' | 'compact' | 'spacious' | (string & {})\nexport type UGThemeRadius = 'sharp' | 'default' | 'soft' | (string & {})\nexport type UGThemeShadow = 'flat' | 'standard' | 'layered' | (string & {})\nexport type UGThemeFont = 'system' | 'readable' | 'compact' | (string & {})\nexport type UGThemeContrast = 'soft' | 'standard' | 'strong' | (string & {})\nexport type UGThemeMotion = 'reduced' | 'standard' | 'lively' | (string & {})\nexport type UGThemeBackground = 'plain' | 'grid' | 'soft' | (string & {})\nexport type UGThemeAccent = 'theme' | 'cyan' | 'blue' | 'violet' | 'emerald' | 'rose' | (string & {})\nexport type UGNavigationMode = 'sidebar' | 'header'\nexport type UGNavigationPalette = 'light' | 'dark'\n\nexport interface UGNavigationColors {\n background: string\n text: string\n activeBackground: string\n activeText: string\n hoverBackground: string\n}\n\nexport type UGThemeNavigationColors = Readonly<Record<UGNavigationPalette, UGNavigationColors>>\n\nexport const defaultUGThemeNavigationColors: Readonly<Record<'default' | 'minimal' | 'mecha', UGThemeNavigationColors>> = {\n default: {\n light: {\n background: '#ffffff',\n text: '#475569',\n activeBackground: '#ecf5ff',\n activeText: '#1d4ed8',\n hoverBackground: '#f1f5f9',\n },\n dark: {\n background: '#151c28',\n text: '#cbd5e1',\n activeBackground: '#3178c2',\n activeText: '#ffffff',\n hoverBackground: '#293442',\n },\n },\n minimal: {\n light: {\n background: '#ffffff',\n text: '#334155',\n activeBackground: '#e0f2fe',\n activeText: '#0369a1',\n hoverBackground: '#f8fafc',\n },\n dark: {\n background: '#111827',\n text: '#d1d5db',\n activeBackground: '#164e63',\n activeText: '#ecfeff',\n hoverBackground: '#1f2937',\n },\n },\n mecha: {\n light: {\n background: '#eef2f6',\n text: '#334155',\n activeBackground: '#cffafe',\n activeText: '#0e7490',\n hoverBackground: '#e2e8f0',\n },\n dark: {\n background: '#0b1220',\n text: '#cbd5e1',\n activeBackground: '#155e75',\n activeText: '#ecfeff',\n hoverBackground: '#172033',\n },\n },\n}\n\n/** 兼容旧调用方:未声明主题时使用 default 主题的导航配色。 */\nexport const defaultUGNavigationColors: UGThemeNavigationColors = defaultUGThemeNavigationColors.default\n\n/** 将主题显示模式解析为导航默认明暗;显式导航颜色仍由调用方优先覆盖。 */\nexport function resolveUGNavigationPalette(\n mode: UGThemeMode,\n prefersDark = false,\n): UGNavigationPalette {\n if (mode === 'dark') return 'dark'\n if (mode === 'light') return 'light'\n return prefersDark ? 'dark' : 'light'\n}\n\ntype UGNavigationActiveColors = Pick<UGNavigationColors, 'activeBackground' | 'activeText'>\n\nconst defaultUGAccentNavigationColors: Readonly<Record<\n 'cyan' | 'blue' | 'violet' | 'emerald' | 'rose',\n Readonly<Record<UGNavigationPalette, UGNavigationActiveColors>>\n>> = {\n cyan: {\n light: { activeBackground: '#cffafe', activeText: '#0e7490' },\n dark: { activeBackground: '#0e7490', activeText: '#ecfeff' },\n },\n blue: {\n light: { activeBackground: '#dbeafe', activeText: '#1d4ed8' },\n dark: { activeBackground: '#1d4ed8', activeText: '#eff6ff' },\n },\n violet: {\n light: { activeBackground: '#ede9fe', activeText: '#6d28d9' },\n dark: { activeBackground: '#6d28d9', activeText: '#f5f3ff' },\n },\n emerald: {\n light: { activeBackground: '#d1fae5', activeText: '#047857' },\n dark: { activeBackground: '#047857', activeText: '#ecfdf5' },\n },\n rose: {\n light: { activeBackground: '#ffe4e6', activeText: '#be123c' },\n dark: { activeBackground: '#be123c', activeText: '#fff1f2' },\n },\n}\n\nexport function resolveUGNavigationColors(\n preset: UGThemePreset,\n palette: UGNavigationPalette,\n overrides?: UGNavigationColors,\n accent: UGThemeAccent = 'theme',\n): UGNavigationColors {\n if (overrides) return overrides\n const themeColors = preset in defaultUGThemeNavigationColors\n ? defaultUGThemeNavigationColors[preset as keyof typeof defaultUGThemeNavigationColors]\n : defaultUGThemeNavigationColors.default\n const resolvedColors = themeColors[palette]\n if (accent in defaultUGAccentNavigationColors) {\n return {\n ...resolvedColors,\n ...defaultUGAccentNavigationColors[accent as keyof typeof defaultUGAccentNavigationColors][palette],\n }\n }\n return resolvedColors\n}\n\nexport interface UGThemeContextValue {\n preset: UGThemePreset\n mode: UGThemeMode\n surface: UGThemeSurfaceValue\n density: UGThemeDensity\n radius: UGThemeRadius\n shadow: UGThemeShadow\n font: UGThemeFont\n contrast: UGThemeContrast\n motion: UGThemeMotion\n background: UGThemeBackground\n accent: UGThemeAccent\n}\n\nexport const ugThemeProfileFields = [\n 'density',\n 'radius',\n 'shadow',\n 'font',\n 'contrast',\n 'motion',\n 'background',\n] as const\n\nexport type UGThemeProfileField = (typeof ugThemeProfileFields)[number]\nexport type UGThemeProfileValue = Pick<UGThemeContextValue, UGThemeProfileField>\n\nexport interface UGThemeProfileDefinition {\n readonly id: string\n readonly label: string\n readonly description: string\n readonly value: UGThemeProfileValue\n}\n\nexport interface UGThemeChoiceOption<TValue extends string = string> {\n readonly value: TValue\n readonly label: string\n readonly description?: string\n}\n\nexport interface UGThemeConfiguratorOptions {\n readonly presets: readonly UGThemeChoiceOption<UGThemePreset>[]\n readonly modes: readonly UGThemeChoiceOption<UGThemeMode>[]\n readonly surfaces: readonly UGThemeChoiceOption<UGThemeSurfaceValue>[]\n readonly densities: readonly UGThemeChoiceOption<UGThemeDensity>[]\n readonly radii: readonly UGThemeChoiceOption<UGThemeRadius>[]\n readonly shadows: readonly UGThemeChoiceOption<UGThemeShadow>[]\n readonly fonts: readonly UGThemeChoiceOption<UGThemeFont>[]\n readonly contrasts: readonly UGThemeChoiceOption<UGThemeContrast>[]\n readonly motions: readonly UGThemeChoiceOption<UGThemeMotion>[]\n readonly backgrounds: readonly UGThemeChoiceOption<UGThemeBackground>[]\n readonly accents: readonly UGThemeChoiceOption<UGThemeAccent>[]\n}\n\nexport const defaultUGTheme: UGThemeContextValue = {\n preset: 'default', mode: 'system', surface: 'workspace', density: 'comfortable', radius: 'default',\n shadow: 'standard', font: 'system', contrast: 'standard', motion: 'standard', background: 'grid', accent: 'theme',\n}\n\nexport const defaultUGThemeProfiles: readonly UGThemeProfileDefinition[] = [\n {\n id: 'balanced',\n label: '均衡',\n description: '舒适、清晰,适合日常通用操作。',\n value: {\n density: 'comfortable',\n radius: 'default',\n shadow: 'standard',\n font: 'system',\n contrast: 'standard',\n motion: 'standard',\n background: 'plain',\n },\n },\n {\n id: 'efficient',\n label: '高效',\n description: '紧凑、利落,适合高频操作和数据工作。',\n value: {\n density: 'compact',\n radius: 'sharp',\n shadow: 'flat',\n font: 'compact',\n contrast: 'strong',\n motion: 'reduced',\n background: 'plain',\n },\n },\n {\n id: 'readable',\n label: '易读',\n description: '宽松、清晰,适合长时间阅读和低刺激操作。',\n value: {\n density: 'spacious',\n radius: 'soft',\n shadow: 'standard',\n font: 'readable',\n contrast: 'strong',\n motion: 'reduced',\n background: 'plain',\n },\n },\n] as const\n\nexport const defaultUGThemeConfiguratorOptions: UGThemeConfiguratorOptions = {\n presets: [\n { value: 'default', label: '默认', description: '均衡的边界、层次与信息密度。' },\n { value: 'minimal', label: '简洁', description: '减少装饰,让内容成为视觉中心。' },\n { value: 'mecha', label: '机械', description: '硬朗边界与紧凑的控制台节奏。' },\n ],\n modes: [\n { value: 'system', label: '跟随系统', description: '自动匹配设备外观。' },\n { value: 'light', label: '亮色', description: '始终使用亮色界面。' },\n { value: 'dark', label: '暗色', description: '始终使用暗色界面。' },\n ],\n surfaces: [\n { value: 'workspace', label: '工作区' },\n { value: 'showcase', label: '展示页' },\n { value: 'auth', label: '认证页' },\n { value: 'content', label: '内容页' },\n ],\n densities: [\n { value: 'comfortable', label: '舒适' },\n { value: 'compact', label: '紧凑' },\n { value: 'spacious', label: '宽松' },\n ],\n radii: [\n { value: 'sharp', label: '利落' },\n { value: 'default', label: '默认' },\n { value: 'soft', label: '柔和' },\n ],\n shadows: [\n { value: 'flat', label: '平面' },\n { value: 'standard', label: '标准' },\n { value: 'layered', label: '层次' },\n ],\n fonts: [\n { value: 'system', label: '系统' },\n { value: 'readable', label: '易读' },\n { value: 'compact', label: '紧凑' },\n ],\n contrasts: [\n { value: 'soft', label: '柔和' },\n { value: 'standard', label: '标准' },\n { value: 'strong', label: '清晰' },\n ],\n motions: [\n { value: 'reduced', label: '减少' },\n { value: 'standard', label: '标准' },\n { value: 'lively', label: '灵动' },\n ],\n backgrounds: [\n { value: 'plain', label: '纯净' },\n { value: 'grid', label: '网格' },\n { value: 'soft', label: '柔光' },\n ],\n accents: [\n { value: 'theme', label: '主题默认' },\n { value: 'cyan', label: 'UG 青' },\n { value: 'blue', label: '海蓝' },\n { value: 'violet', label: '紫晶' },\n { value: 'emerald', label: '松绿' },\n { value: 'rose', label: '玫红' },\n ],\n}\n\nexport function createUGThemeValue(parent: UGThemeContextValue, overrides: Partial<UGThemeContextValue>): UGThemeContextValue {\n return {\n preset: overrides.preset ?? parent.preset,\n mode: overrides.mode ?? parent.mode,\n surface: overrides.surface ?? parent.surface,\n density: overrides.density ?? parent.density,\n radius: overrides.radius ?? parent.radius,\n shadow: overrides.shadow ?? parent.shadow,\n font: overrides.font ?? parent.font,\n contrast: overrides.contrast ?? parent.contrast,\n motion: overrides.motion ?? parent.motion,\n background: overrides.background ?? parent.background,\n accent: overrides.accent ?? parent.accent,\n }\n}\n\nexport function applyUGThemeProfile(\n current: UGThemeContextValue,\n profile: UGThemeProfileDefinition,\n): UGThemeContextValue {\n return createUGThemeValue(current, profile.value)\n}\n\nexport function isUGThemeProfileModified(\n current: UGThemeContextValue,\n profile: UGThemeProfileDefinition,\n): boolean {\n return ugThemeProfileFields.some((field) => current[field] !== profile.value[field])\n}\n"],"mappings":";AA6BO,IAAM,+BAA6G,CACxH,QAAS,CACP,MAAO,CACL,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,EACA,KAAM,CACJ,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,CACF,EACA,QAAS,CACP,MAAO,CACL,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,EACA,KAAM,CACJ,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,CACF,EACA,MAAO,CACL,MAAO,CACL,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,EACA,KAAM,CACJ,WAAY,UACZ,KAAM,UACN,iBAAkB,UAClB,WAAY,UACZ,gBAAiB,SACnB,CACF,CACF,EAGO,IAAM,0BAAqD,+BAA+B,QAG1F,SAAS,2BACd,KACA,YAAc,MACO,CACrB,GAAI,OAAS,OAAQ,MAAO,OAC5B,GAAI,OAAS,QAAS,MAAO,QAC7B,OAAO,YAAc,OAAS,OAChC,CAIA,IAAM,gCAGD,CACH,KAAM,CACJ,MAAO,CAAE,iBAAkB,UAAW,WAAY,SAAU,EAC5D,KAAM,CAAE,iBAAkB,UAAW,WAAY,SAAU,CAC7D,EACA,K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*/
2
+ import { type TableColumnLayout } from '../table/table-layout';
3
+ /** @deprecated Web 代码请从 @ug666/ui-web 导入。 */
4
+ export declare function tableColumnLength(value: number | string | undefined): string | undefined;
5
+ /** @deprecated Web 代码请从 @ug666/ui-web 导入。 */
6
+ export declare function getTableColumnStyle(columns: readonly TableColumnLayout[], index: number, widths?: readonly number[]): {
7
+ width: string | undefined;
8
+ minWidth: string | undefined;
9
+ textAlign: "center" | "left" | "right" | undefined;
10
+ '--ug-table-fixed-offset': string | undefined;
11
+ };
12
+ //# sourceMappingURL=table-css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-css.d.ts","sourceRoot":"","sources":["../../src/compat/table-css.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAErF,6CAA6C;AAC7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,SAAS,MAAM,EAAO;IAKpH,KAAK;IAA4B,QAAQ;IAA+B,SAAS;IACjF,yBAAyB;EAE5B"}
@@ -0,0 +1,6 @@
1
+ /** @description: 评分值和键盘步进的框架无关算法。 @author: UG @date: 2026-10-11 */
2
+ export type RatingPrecision = 1 | 0.5;
3
+ export declare function normalizeRatingMax(max: number): number;
4
+ export declare function normalizeRatingValue(value: number | undefined, max: number, precision?: RatingPrecision): number;
5
+ export declare function getRatingKeyboardValue(value: number, key: string, max: number, precision?: RatingPrecision, allowClear?: boolean): number | undefined;
6
+ //# sourceMappingURL=rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/controls/rating.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,GAAG,CAAA;AACrC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AACD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,eAAmB,GAAG,MAAM,CAGnH;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,eAAmB,EAAE,UAAU,UAAQ,GAAG,MAAM,GAAG,SAAS,CAQtJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-value.d.ts","sourceRoot":"","sources":["../../src/controls/select-value.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAErE;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,oBAAoB,GAAG,SAAS,oBAAoB,EAAE,GAAG,SAAS,GACxE,MAAM,EAAE,CAGV"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @description: 分组选择列表的纯集合规则;搜索和批量操作只改变当前可操作范围。
3
+ * @author: UG
4
+ * @date: 2026-10-06
5
+ */
6
+ export interface SelectionListOption {
7
+ id: string;
8
+ label: string;
9
+ group?: string;
10
+ description?: string;
11
+ disabled?: boolean;
12
+ }
13
+ export interface SelectionListGroup {
14
+ key: string;
15
+ label: string;
16
+ options: SelectionListOption[];
17
+ }
18
+ /** id 必须唯一;重复输入防御性保留第一项,避免渲染重复 key。 */
19
+ export declare function filterSelectionListOptions(options: readonly SelectionListOption[], query?: string): SelectionListOption[];
20
+ export declare function groupSelectionListOptions(options: readonly SelectionListOption[]): SelectionListGroup[];
21
+ export declare function getSelectionListScope(options: readonly SelectionListOption[], selected: readonly string[]): {
22
+ total: number;
23
+ available: number;
24
+ disabled: number;
25
+ selected: number;
26
+ checked: boolean;
27
+ indeterminate: boolean;
28
+ };
29
+ /** 保留筛选外、禁用既有以及暂不在 options 的标识,不推测业务权限。 */
30
+ export declare function updateSelectionListScope(selected: readonly string[], options: readonly SelectionListOption[], checked: boolean): string[];
31
+ //# sourceMappingURL=selection-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-list.d.ts","sourceRoot":"","sources":["../../src/controls/selection-list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B;AAMD,uCAAuC;AACvC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,KAAK,SAAK,yBAS7F;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,GAAG,kBAAkB,EAAE,CAUvG;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE;IAKtG,KAAK;IACL,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,aAAa;EAEhB;AAED,2CAA2C;AAC3C,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,OAAO,EAAE,OAAO,GACf,MAAM,EAAE,CAIV"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-value.d.ts","sourceRoot":"","sources":["../../src/controls/text-value.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;AAEzD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAIR;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAkBR"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @description: Calendar 跨框架日期计算工具,统一 React 与 Vue 的本地日期语义
3
+ * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。
4
+ * @date: 2026-08-14
5
+ */
6
+ export type CalendarWeekStartsOn = 0 | 1;
7
+ export interface CalendarDay {
8
+ date: Date;
9
+ key: string;
10
+ day: number;
11
+ outside: boolean;
12
+ today: boolean;
13
+ }
14
+ export declare function isValidCalendarDate(value: Date | null | undefined): value is Date;
15
+ export declare function normalizeCalendarDate(value: Date | null | undefined, fallback?: Date): Date;
16
+ export declare function startOfCalendarMonth(value: Date): Date;
17
+ export declare function addCalendarDays(value: Date, amount: number): Date;
18
+ export declare function addCalendarMonths(value: Date, amount: number): Date;
19
+ export declare function calendarDateKey(value: Date): string;
20
+ export declare function compareCalendarDates(left: Date, right: Date): number;
21
+ export declare function isSameCalendarDay(left: Date | null | undefined, right: Date | null | undefined): boolean;
22
+ export declare function buildCalendarMonth(month: Date, weekStartsOn?: CalendarWeekStartsOn): CalendarDay[];
23
+ export declare function buildCalendarWeekdays(locale?: string, weekStartsOn?: CalendarWeekStartsOn): string[];
24
+ export declare function formatCalendarMonth(value: Date, locale?: string): string;
25
+ export declare function formatCalendarDay(value: Date, locale?: string): string;
26
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/date-time/calendar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,CAAC,CAAA;AAExC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,IAAI,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,IAAI,CAEjF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,OAAa,GAAG,IAAI,CAGjG;AASD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAEtD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAInD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,CAIpE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMxG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,GAAE,oBAAwB,GAAG,WAAW,EAAE,CAgBrG;AAED,wBAAgB,qBAAqB,CAAC,MAAM,SAAU,EAAE,YAAY,GAAE,oBAAwB,GAAG,MAAM,EAAE,CASxG;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,SAAU,GAAG,MAAM,CAMzE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,SAAU,GAAG,MAAM,CAMvE"}
@@ -0,0 +1,16 @@
1
+ import { type DateTimeValueConstraints, type DateValueConstraints } from './date-time';
2
+ export type DatePickerMode = 'date' | 'year' | 'month' | 'week' | 'multiple';
3
+ export type DatePickerDates = readonly string[];
4
+ export type DateTimeRangeValue = readonly [string, string];
5
+ export interface DateRangeShortcut {
6
+ label: string;
7
+ value: readonly [string, string] | (() => readonly [string, string]);
8
+ disabled?: boolean;
9
+ }
10
+ export declare function isoWeekStart(date: Date): Date;
11
+ export declare function datePickerModeKey(date: Date, mode: DatePickerMode): string;
12
+ export declare function parseDatePickerModeKey(value: string, mode: DatePickerMode): Date | null;
13
+ export declare function validateDatePickerModeValue(value: string, mode?: DatePickerMode, policy?: DateValueConstraints): string | undefined;
14
+ export declare function validateDateTimeRangeValue(value: DateTimeRangeValue, policy?: DateTimeValueConstraints): string | undefined;
15
+ export declare function validateDateRangeShortcut(value: readonly [string, string], policy?: DateValueConstraints): string | undefined;
16
+ //# sourceMappingURL=date-picker-modes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker-modes.d.ts","sourceRoot":"","sources":["../../src/date-time/date-picker-modes.ts"],"names":[],"mappings":"AAOA,OAAO,EAAyB,KAAK,wBAAwB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC7G,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAA;AAC5E,MAAM,MAAM,eAAe,GAAG,SAAS,MAAM,EAAE,CAAA;AAC/C,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC1D,MAAM,WAAW,iBAAiB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AAG9I,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAA0J;AACxM,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAS1E;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAQvF;AACD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,cAAuB,EAAE,MAAM,GAAE,oBAAyB,GAAG,MAAM,GAAG,SAAS,CAuB/I;AACD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,GAAE,wBAA6B,GAAG,MAAM,GAAG,SAAS,CAI/H;AACD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAE,oBAAyB,GAAG,MAAM,GAAG,SAAS,CAGjI"}
@@ -0,0 +1,9 @@
1
+ export type DateRangeValue = readonly [string, string];
2
+ export type CalendarRange = readonly [Date | null, Date | null];
3
+ export type CalendarRangePosition = 'start' | 'end' | 'middle' | 'single';
4
+ /** 严格解析 YYYY-MM-DD;拒绝日期溢出并保留 0000–0099 年。 */
5
+ export declare function parseCalendarDateKey(value: string | undefined): Date | null;
6
+ export declare function parseCalendarRange(value: DateRangeValue): CalendarRange;
7
+ /** 反向或单边草稿只显示真实端点,不伪造中间范围。 */
8
+ export declare function getCalendarRangePosition(date: Date, range?: CalendarRange): CalendarRangePosition | undefined;
9
+ //# sourceMappingURL=date-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/date-time/date-range.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACtD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;AAC/D,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEzE,6CAA6C;AAC7C,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAU3E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,CAEvE;AAED,8BAA8B;AAC9B,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,qBAAqB,GAAG,SAAS,CAQ7G"}
@@ -0,0 +1,43 @@
1
+ export type TimeRangeValue = readonly [string, string];
2
+ export interface TimeValueConstraints {
3
+ showSeconds?: boolean;
4
+ min?: string;
5
+ max?: string;
6
+ disabledTime?: (value: string) => boolean;
7
+ }
8
+ export interface DateValueConstraints {
9
+ min?: string;
10
+ max?: string;
11
+ disabledDate?: (date: Date) => boolean;
12
+ }
13
+ export interface DateTimeValueConstraints extends TimeValueConstraints {
14
+ disabledDate?: (date: Date) => boolean;
15
+ }
16
+ /** HH:mm 或 HH:mm:ss,24:00、溢出、缺少补零均无效。 */
17
+ export declare function parseTimeValue(value: string | undefined, showSeconds?: boolean): number | null;
18
+ export declare function formatTimeValue(seconds: number, showSeconds?: boolean): string;
19
+ /** 同一个本地日历规则用于单日期和日期时间;不使用 Date.parse。 */
20
+ export declare function validateDateValue(value: string, options?: DateValueConstraints): string | undefined;
21
+ export declare function validateTimeValue(value: string, options?: TimeValueConstraints): string | undefined;
22
+ export declare function parseLocalDateTimeValue(value: string, showSeconds?: boolean): {
23
+ date: Date;
24
+ time: string;
25
+ } | null;
26
+ export declare function validateDateTimeValue(value: string, options?: DateTimeValueConstraints): string | undefined;
27
+ export declare function validateTimeRangeValue(value: TimeRangeValue, options?: TimeValueConstraints): string | undefined;
28
+ /** 固定时间段列表;无效或零步长返回空列表,最多一天的分钟数,不会死循环。 */
29
+ export declare function buildTimeSelectOptions(start?: string, end?: string, step?: string, constraints?: TimeValueConstraints): {
30
+ value: string;
31
+ label: string;
32
+ disabled: boolean;
33
+ }[];
34
+ /** 面板只枚举实际合法时刻;列切换能够跨越不连续的可选区间。 */
35
+ export declare function getAvailableTimeValues(options?: TimeValueConstraints): number[];
36
+ export declare function getTimeColumnChoices(available: readonly number[], current: number, unit: 'hour' | 'minute' | 'second'): {
37
+ label: string;
38
+ value: number;
39
+ time: number | undefined;
40
+ disabled: boolean;
41
+ }[];
42
+ export declare function localDateTimeKey(date: Date, time: string): string;
43
+ //# sourceMappingURL=date-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-time.d.ts","sourceRoot":"","sources":["../../src/date-time/date-time.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACtD,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;CAC1C;AACD,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAA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E,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ;;;;;IAcrH;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,30 @@
1
+ /** @description 表单嵌套路径的不可变读写与动态数组身份;不含框架和 DOM。 @author UG @date 2026-10-11 */
2
+ export type FormFieldName<T> = Extract<keyof T, string> | (string & {});
3
+ export type FormSetFieldValue<T> = <Key extends FormFieldName<T>>(name: Key, value: Key extends keyof T ? T[Key] : unknown) => void;
4
+ export declare function isFormPathWithin(field: string, parent: string): boolean;
5
+ export interface FormFieldArrayEntry<T = unknown> {
6
+ id: string;
7
+ index: number;
8
+ name: string;
9
+ value: T;
10
+ }
11
+ export interface FormFieldArray<T = unknown> {
12
+ readonly fields: readonly FormFieldArrayEntry<T>[];
13
+ append(value: T): void;
14
+ insert(index: number, value: T): void;
15
+ remove(index: number): void;
16
+ move(from: number, to: number): void;
17
+ replace(values: readonly T[]): void;
18
+ }
19
+ export declare function normalizeFormPath(path: string): string;
20
+ export declare function getFormPath(values: unknown, path: string): unknown;
21
+ /** 数组删除后不存在的数字索引不参与校验;普通未填写字段仍参与 required。 */
22
+ export declare function isFormPathActive(values: unknown, path: string): boolean;
23
+ export declare function setFormPath<T>(values: T, path: string, value: unknown): T;
24
+ export declare function getFormPaths(values: unknown, prefix?: string): string[];
25
+ export declare function isFormValueEqual(left: unknown, right: unknown): boolean;
26
+ export declare function createFormFieldArray<T>(path: string, read: () => unknown, write: (values: readonly T[]) => void): {
27
+ controller: FormFieldArray<T>;
28
+ resetIds(): void;
29
+ };
30
+ //# sourceMappingURL=form-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-state.d.ts","sourceRoot":"","sources":["../../src/form/form-state.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,MAAM,aAAa,CAAC,CAAC,IA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AE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOvE;AACD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAWzE;AACD,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,SAAK,GAAG,MAAM,EAAE,CAQnE;AACD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAQvE;AACD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,IAAI;;;EAgC/G"}
@@ -8,6 +8,7 @@ export type FormValueType = 'string' | 'number' | 'boolean' | 'array' | 'date' |
8
8
  export interface FormRule<Value = unknown, Values extends Record<string, unknown> = Record<string, unknown>> {
9
9
  required?: boolean;
10
10
  message?: string;
11
+ /** change/blur 控制即时校验时机;提交与主动 validate 始终检查全部规则。 */
11
12
  trigger?: FormValidationTrigger | FormValidationTrigger[];
12
13
  type?: FormValueType;
13
14
  min?: number;
@@ -19,7 +20,7 @@ export interface FormRule<Value = unknown, Values extends Record<string, unknown
19
20
  export type FormFieldRules<Value = unknown, Values extends Record<string, unknown> = Record<string, unknown>> = FormRule<Value, Values> | FormRule<Value, Values>[];
20
21
  export type FormRules<Values extends Record<string, unknown>> = Partial<{
21
22
  [Key in keyof Values]: FormFieldRules<Values[Key], Values>;
22
- }>;
23
+ }> & Partial<Record<`${string}.${string}` | `${string}[${number}]${string}`, FormFieldRules<unknown, Values>>>;
23
24
  export declare function isEmptyFormValue(value: unknown): boolean;
24
25
  export declare function validateFormValue<Values extends Record<string, unknown>, Key extends keyof Values>(value: Values[Key], fieldRules: FormFieldRules<Values[Key], Values> | undefined, values: Values, trigger?: FormValidationTrigger): Promise<string | undefined>;
25
26
  //# sourceMappingURL=form-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-validation.d.ts","sourceRoot":"","sources":["../../src/form/form-validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAChE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;AAEhG,MAAM,WAAW,QAAQ,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oDAAoD;IACpD,OAAO,CAAC,EAAE,qBAAqB,GAAG,qBAAqB,EAAE,CAAA;IACzD,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,CACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,KACX,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,CAAA;CAChE;AAED,MAAM,MAAM,cAAc,CACxB,KAAK,GAAG,OAAO,EACf,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;AAEvD,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,OAAO,CAAC;KACrE,GAAG,IAAI,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CAC3D,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAa9G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOxD;AAmDD,wBAAsB,iBAAiB,CACrC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,GAAG,SAAS,MAAM,MAAM,EAExB,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAClB,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,EAC3D,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,qBAAgC,GACxC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyC7B"}
@@ -0,0 +1,8 @@
1
+ /** @description: 图片适配、缩放及旋转后的真实滚动画布尺寸 @author: UG @date: 2026-10-11 */
2
+ export declare function getImagePreviewLayout(width: number, height: number, viewportWidth: number, viewportHeight: number, zoom?: number, rotation?: number): {
3
+ width: number;
4
+ height: number;
5
+ canvasWidth: number;
6
+ canvasHeight: number;
7
+ };
8
+ //# sourceMappingURL=image-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-preview.d.ts","sourceRoot":"","sources":["../src/image-preview.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,SAAI,EAAE,QAAQ,SAAI;;;;;EAQzI"}