@avento-space/ts-ui 1.1.1 → 1.2.2

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 (141) hide show
  1. package/README.md +123 -213
  2. package/dist/card.wc-pFLgjfwm.d.ts +1595 -0
  3. package/dist/chunk-7GJXOXOW.js +108 -0
  4. package/dist/chunk-7GJXOXOW.js.map +1 -0
  5. package/dist/chunk-ICB6OBEZ.js +2087 -0
  6. package/dist/chunk-ICB6OBEZ.js.map +1 -0
  7. package/dist/chunk-Q5RCPPCF.js +406 -0
  8. package/dist/chunk-Q5RCPPCF.js.map +1 -0
  9. package/dist/chunk-QTANS5ZS.js +81 -0
  10. package/dist/chunk-QTANS5ZS.js.map +1 -0
  11. package/dist/chunk-RATTHYIP.js +4855 -0
  12. package/dist/chunk-RATTHYIP.js.map +1 -0
  13. package/dist/chunk-RAWESWNC.js +3 -0
  14. package/dist/chunk-RAWESWNC.js.map +1 -0
  15. package/dist/chunk-RQZ7KDYP.js +5941 -0
  16. package/dist/chunk-RQZ7KDYP.js.map +1 -0
  17. package/dist/chunk-T7QLIHHU.js +3 -0
  18. package/dist/chunk-T7QLIHHU.js.map +1 -0
  19. package/dist/chunk-U4WYCYL6.js +116 -0
  20. package/dist/chunk-U4WYCYL6.js.map +1 -0
  21. package/dist/components/index.d.ts +13 -11
  22. package/dist/components/index.js +5 -5
  23. package/dist/components/index.js.map +1 -1
  24. package/dist/define.d.ts +2 -2
  25. package/dist/define.js +8 -1
  26. package/dist/define.js.map +1 -1
  27. package/dist/{core/element.d.ts → element-DHtonJNX.d.ts} +3 -2
  28. package/dist/icons/index.d.ts +33 -5
  29. package/dist/icons/index.js +5 -3
  30. package/dist/icons/index.js.map +1 -1
  31. package/dist/index.d.ts +35 -10
  32. package/dist/index.js +44 -9
  33. package/dist/index.js.map +1 -1
  34. package/dist/jsx-dev-runtime.d.ts +1 -2
  35. package/dist/jsx-dev-runtime.js +3 -1
  36. package/dist/jsx-dev-runtime.js.map +1 -1
  37. package/dist/jsx-runtime.d.ts +644 -7
  38. package/dist/jsx-runtime.js +3 -120
  39. package/dist/jsx-runtime.js.map +1 -1
  40. package/dist/plugins/index.d.ts +21 -3
  41. package/dist/plugins/index.js +85 -1
  42. package/dist/plugins/index.js.map +1 -1
  43. package/dist/react/index.d.ts +1261 -15
  44. package/dist/react/index.js +1443 -15
  45. package/dist/react/index.js.map +1 -1
  46. package/dist/{core/types.d.ts → types-DWglFa91.d.ts} +8 -7
  47. package/package.json +32 -8
  48. package/dist/components/box.wc.d.ts +0 -24
  49. package/dist/components/box.wc.d.ts.map +0 -1
  50. package/dist/components/box.wc.js +0 -52
  51. package/dist/components/box.wc.js.map +0 -1
  52. package/dist/components/button.wc.d.ts +0 -32
  53. package/dist/components/button.wc.d.ts.map +0 -1
  54. package/dist/components/button.wc.js +0 -91
  55. package/dist/components/button.wc.js.map +0 -1
  56. package/dist/components/index.d.ts.map +0 -1
  57. package/dist/components/input.wc.d.ts +0 -45
  58. package/dist/components/input.wc.d.ts.map +0 -1
  59. package/dist/components/input.wc.js +0 -130
  60. package/dist/components/input.wc.js.map +0 -1
  61. package/dist/components/list.wc.d.ts +0 -49
  62. package/dist/components/list.wc.d.ts.map +0 -1
  63. package/dist/components/list.wc.js +0 -120
  64. package/dist/components/list.wc.js.map +0 -1
  65. package/dist/components/portal.wc.d.ts +0 -18
  66. package/dist/components/portal.wc.d.ts.map +0 -1
  67. package/dist/components/portal.wc.js +0 -78
  68. package/dist/components/portal.wc.js.map +0 -1
  69. package/dist/components/styles.d.ts +0 -7
  70. package/dist/components/styles.d.ts.map +0 -1
  71. package/dist/components/styles.js +0 -134
  72. package/dist/components/styles.js.map +0 -1
  73. package/dist/core/define.d.ts +0 -5
  74. package/dist/core/define.d.ts.map +0 -1
  75. package/dist/core/define.js +0 -26
  76. package/dist/core/define.js.map +0 -1
  77. package/dist/core/element.d.ts.map +0 -1
  78. package/dist/core/element.js +0 -30
  79. package/dist/core/element.js.map +0 -1
  80. package/dist/core/index.d.ts +0 -7
  81. package/dist/core/index.d.ts.map +0 -1
  82. package/dist/core/index.js +0 -5
  83. package/dist/core/index.js.map +0 -1
  84. package/dist/core/plugin.d.ts +0 -17
  85. package/dist/core/plugin.d.ts.map +0 -1
  86. package/dist/core/plugin.js +0 -117
  87. package/dist/core/plugin.js.map +0 -1
  88. package/dist/core/reactive-context.d.ts +0 -12
  89. package/dist/core/reactive-context.d.ts.map +0 -1
  90. package/dist/core/reactive-context.js +0 -34
  91. package/dist/core/reactive-context.js.map +0 -1
  92. package/dist/core/scheduler.d.ts +0 -13
  93. package/dist/core/scheduler.d.ts.map +0 -1
  94. package/dist/core/scheduler.js +0 -80
  95. package/dist/core/scheduler.js.map +0 -1
  96. package/dist/core/signal.d.ts +0 -14
  97. package/dist/core/signal.d.ts.map +0 -1
  98. package/dist/core/signal.js +0 -391
  99. package/dist/core/signal.js.map +0 -1
  100. package/dist/core/store.d.ts +0 -6
  101. package/dist/core/store.d.ts.map +0 -1
  102. package/dist/core/store.js +0 -35
  103. package/dist/core/store.js.map +0 -1
  104. package/dist/core/types.d.ts.map +0 -1
  105. package/dist/core/types.js +0 -2
  106. package/dist/core/types.js.map +0 -1
  107. package/dist/define.d.ts.map +0 -1
  108. package/dist/icons/icon-element.d.ts +0 -25
  109. package/dist/icons/icon-element.d.ts.map +0 -1
  110. package/dist/icons/icon-element.js +0 -63
  111. package/dist/icons/icon-element.js.map +0 -1
  112. package/dist/icons/index.d.ts.map +0 -1
  113. package/dist/icons/registry.d.ts +0 -6
  114. package/dist/icons/registry.d.ts.map +0 -1
  115. package/dist/icons/registry.js +0 -4775
  116. package/dist/icons/registry.js.map +0 -1
  117. package/dist/index.d.ts.map +0 -1
  118. package/dist/jsx-dev-runtime.d.ts.map +0 -1
  119. package/dist/jsx-runtime.d.ts.map +0 -1
  120. package/dist/jsx-types.d.ts +0 -651
  121. package/dist/jsx-types.d.ts.map +0 -1
  122. package/dist/jsx-types.js +0 -3
  123. package/dist/jsx-types.js.map +0 -1
  124. package/dist/plugins/index.d.ts.map +0 -1
  125. package/dist/plugins/router.d.ts +0 -4
  126. package/dist/plugins/router.d.ts.map +0 -1
  127. package/dist/plugins/router.js +0 -90
  128. package/dist/plugins/router.js.map +0 -1
  129. package/dist/plugins/types.d.ts +0 -16
  130. package/dist/plugins/types.d.ts.map +0 -1
  131. package/dist/plugins/types.js +0 -2
  132. package/dist/plugins/types.js.map +0 -1
  133. package/dist/react/icon.d.ts +0 -8
  134. package/dist/react/icon.d.ts.map +0 -1
  135. package/dist/react/icon.js +0 -7
  136. package/dist/react/icon.js.map +0 -1
  137. package/dist/react/icons.d.ts +0 -1194
  138. package/dist/react/icons.d.ts.map +0 -1
  139. package/dist/react/icons.js +0 -1196
  140. package/dist/react/icons.js.map +0 -1
  141. package/dist/react/index.d.ts.map +0 -1
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-T7QLIHHU.js.map
3
+ //# sourceMappingURL=chunk-T7QLIHHU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-T7QLIHHU.js"}
@@ -0,0 +1,116 @@
1
+ // src/core/plugin.ts
2
+ function createPluginSystem() {
3
+ const pluginHooks = /* @__PURE__ */ new Map();
4
+ const registeredPlugins = /* @__PURE__ */ new Map();
5
+ const pluginHookCleanups = /* @__PURE__ */ new Map();
6
+ function registerPlugin2(plugin) {
7
+ if (!plugin || typeof plugin !== "object") {
8
+ throw new Error("Invalid plugin: plugin must be a non-null object");
9
+ }
10
+ if (typeof plugin.name !== "string" || plugin.name.length === 0) {
11
+ throw new Error("Invalid plugin: plugin.name must be a non-empty string");
12
+ }
13
+ if (typeof plugin.version !== "string") {
14
+ throw new Error("Invalid plugin: plugin.version must be a string");
15
+ }
16
+ if (typeof plugin.setup !== "function") {
17
+ throw new Error(`Invalid plugin "${plugin.name}": plugin.setup must be a function`);
18
+ }
19
+ if (registeredPlugins.has(plugin.name)) {
20
+ throw new Error(`Plugin "${plugin.name}" is already registered`);
21
+ }
22
+ registeredPlugins.set(plugin.name, plugin);
23
+ const cleanups = /* @__PURE__ */ new Set();
24
+ pluginHookCleanups.set(plugin.name, cleanups);
25
+ const pluginAPI = {
26
+ registerHook(name, fn) {
27
+ if (!pluginHooks.has(name)) {
28
+ pluginHooks.set(name, /* @__PURE__ */ new Set());
29
+ }
30
+ const hooks = pluginHooks.get(name);
31
+ hooks.add(fn);
32
+ const cleanup = () => {
33
+ hooks.delete(fn);
34
+ cleanups.delete(cleanup);
35
+ };
36
+ cleanups.add(cleanup);
37
+ return cleanup;
38
+ },
39
+ getHook(name) {
40
+ const hooks = pluginHooks.get(name);
41
+ return hooks ? new Set(hooks) : /* @__PURE__ */ new Set();
42
+ }
43
+ };
44
+ plugin.setup(pluginAPI);
45
+ }
46
+ function unregisterPlugin2(name) {
47
+ const cleanups = pluginHookCleanups.get(name);
48
+ if (cleanups) {
49
+ for (const fn of cleanups) fn();
50
+ pluginHookCleanups.delete(name);
51
+ }
52
+ return registeredPlugins.delete(name);
53
+ }
54
+ function getPlugin2(name) {
55
+ return registeredPlugins.get(name);
56
+ }
57
+ function hasPlugin2(name) {
58
+ return registeredPlugins.has(name);
59
+ }
60
+ function runPluginHook2(name, ...args) {
61
+ const hooks = pluginHooks.get(name);
62
+ if (hooks) {
63
+ for (const fn of hooks) {
64
+ try {
65
+ fn(...args);
66
+ } catch (e) {
67
+ console.error(`Plugin hook "${name}" failed:`, e);
68
+ }
69
+ }
70
+ }
71
+ }
72
+ function getPluginAPI() {
73
+ return {
74
+ registerHook(name, fn) {
75
+ if (!pluginHooks.has(name)) {
76
+ pluginHooks.set(name, /* @__PURE__ */ new Set());
77
+ }
78
+ const hooks = pluginHooks.get(name);
79
+ hooks.add(fn);
80
+ return () => hooks.delete(fn);
81
+ },
82
+ getHook(name) {
83
+ const hooks = pluginHooks.get(name);
84
+ return hooks ? new Set(hooks) : /* @__PURE__ */ new Set();
85
+ }
86
+ };
87
+ }
88
+ return {
89
+ registerPlugin: registerPlugin2,
90
+ unregisterPlugin: unregisterPlugin2,
91
+ getPlugin: getPlugin2,
92
+ hasPlugin: hasPlugin2,
93
+ runPluginHook: runPluginHook2,
94
+ getPluginAPI
95
+ };
96
+ }
97
+ var defaultSystem = createPluginSystem();
98
+ function registerPlugin(plugin) {
99
+ defaultSystem.registerPlugin(plugin);
100
+ }
101
+ function unregisterPlugin(name) {
102
+ return defaultSystem.unregisterPlugin(name);
103
+ }
104
+ function getPlugin(name) {
105
+ return defaultSystem.getPlugin(name);
106
+ }
107
+ function hasPlugin(name) {
108
+ return defaultSystem.hasPlugin(name);
109
+ }
110
+ function runPluginHook(name, ...args) {
111
+ defaultSystem.runPluginHook(name, ...args);
112
+ }
113
+
114
+ export { getPlugin, hasPlugin, registerPlugin, runPluginHook, unregisterPlugin };
115
+ //# sourceMappingURL=chunk-U4WYCYL6.js.map
116
+ //# sourceMappingURL=chunk-U4WYCYL6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/plugin.ts"],"names":["registerPlugin","unregisterPlugin","getPlugin","hasPlugin","runPluginHook"],"mappings":";AAWO,SAAS,kBAAA,GAAmC;AACjD,EAAA,MAAM,WAAA,uBAAkB,GAAA,EAA2C;AACnE,EAAA,MAAM,iBAAA,uBAAwB,GAAA,EAAoB;AAClD,EAAA,MAAM,kBAAA,uBAAyB,GAAA,EAA6B;AAE5D,EAAA,SAASA,gBAAe,MAAA,EAAsB;AAC5C,IAAA,IAAI,CAAC,MAAA,IAAU,OAAO,MAAA,KAAW,QAAA,EAAU;AACzC,MAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AAAA,IACpE;AACA,IAAA,IAAI,OAAO,MAAA,CAAO,IAAA,KAAS,YAAY,MAAA,CAAO,IAAA,CAAK,WAAW,CAAA,EAAG;AAC/D,MAAA,MAAM,IAAI,MAAM,wDAAwD,CAAA;AAAA,IAC1E;AACA,IAAA,IAAI,OAAO,MAAA,CAA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I,CAAA;AAC3C","file":"chunk-U4WYCYL6.js","sourcesContent":["import type { Plugin, PluginAPI } from './types.js';\n\nexport interface PluginSystem {\n registerPlugin(plugin: Plugin): void;\n unregisterPlugin(name: string): boolean;\n getPlugin(name: string): Plugin | undefined;\n hasPlugin(name: string): boolean;\n runPluginHook(name: string, ...args: any[]): void;\n getPluginAPI(): PluginAPI;\n}\n\nexport function createPluginSystem(): PluginSystem {\n const pluginHooks = new Map<string, Set<(...args: any[]) => void>>();\n const registeredPlugins = new Map<string, Plugin>();\n const pluginHookCleanups = new Map<string, Set<() => void>>();\n\n function registerPlugin(plugin: Plugin): void {\n if (!plugin || typeof plugin !== 'object') {\n throw new Error('Invalid plugin: plugin must be a non-null object');\n }\n if (typeof plugin.name !== 'string' || plugin.name.length === 0) {\n throw new Error('Invalid plugin: plugin.name must be a non-empty string');\n }\n if (typeof plugin.version !== 'string') {\n throw new Error('Invalid plugin: plugin.version must be a string');\n }\n if (typeof plugin.setup !== 'function') {\n throw new Error(`Invalid plugin \"${plugin.name}\": plugin.setup must be a function`);\n }\n if (registeredPlugins.has(plugin.name)) {\n throw new Error(`Plugin \"${plugin.name}\" is already registered`);\n }\n registeredPlugins.set(plugin.name, plugin);\n\n const cleanups = new Set<() => void>();\n pluginHookCleanups.set(plugin.name, cleanups);\n\n const pluginAPI: PluginAPI = {\n registerHook(name: string, fn: (...args: any[]) => void): () => void {\n if (!pluginHooks.has(name)) {\n pluginHooks.set(name, new Set());\n }\n const hooks = pluginHooks.get(name)!;\n hooks.add(fn);\n const cleanup = () => {\n hooks.delete(fn);\n cleanups.delete(cleanup);\n };\n cleanups.add(cleanup);\n return cleanup;\n },\n\n getHook(name: string): Set<(...args: any[]) => void> {\n const hooks = pluginHooks.get(name);\n return hooks ? new Set(hooks) : new Set();\n },\n };\n\n plugin.setup(pluginAPI);\n }\n\n function unregisterPlugin(name: string): boolean {\n const cleanups = pluginHookCleanups.get(name);\n if (cleanups) {\n for (const fn of cleanups) fn();\n pluginHookCleanups.delete(name);\n }\n return registeredPlugins.delete(name);\n }\n\n function getPlugin(name: string): Plugin | undefined {\n return registeredPlugins.get(name);\n }\n\n function hasPlugin(name: string): boolean {\n return registeredPlugins.has(name);\n }\n\n function runPluginHook(name: string, ...args: any[]): void {\n const hooks = pluginHooks.get(name);\n if (hooks) {\n for (const fn of hooks) {\n try {\n fn(...args);\n } catch (e) {\n console.error(`Plugin hook \"${name}\" failed:`, e);\n }\n }\n }\n }\n\n function getPluginAPI(): PluginAPI {\n return {\n registerHook(name: string, fn: (...args: any[]) => void): () => void {\n if (!pluginHooks.has(name)) {\n pluginHooks.set(name, new Set());\n }\n const hooks = pluginHooks.get(name)!;\n hooks.add(fn);\n return () => hooks.delete(fn);\n },\n getHook(name: string): Set<(...args: any[]) => void> {\n const hooks = pluginHooks.get(name);\n return hooks ? new Set(hooks) : new Set();\n },\n };\n }\n\n return {\n registerPlugin,\n unregisterPlugin,\n getPlugin,\n hasPlugin,\n runPluginHook,\n getPluginAPI,\n };\n}\n\nconst defaultSystem = createPluginSystem();\n\nexport function registerPlugin(plugin: Plugin): void {\n defaultSystem.registerPlugin(plugin);\n}\nexport function unregisterPlugin(name: string): boolean {\n return defaultSystem.unregisterPlugin(name);\n}\nexport function getPlugin(name: string): Plugin | undefined {\n return defaultSystem.getPlugin(name);\n}\nexport function hasPlugin(name: string): boolean {\n return defaultSystem.hasPlugin(name);\n}\nexport function runPluginHook(name: string, ...args: any[]): void {\n defaultSystem.runPluginHook(name, ...args);\n}\nexport function getPluginAPI(): PluginAPI {\n return defaultSystem.getPluginAPI();\n}\n"]}
@@ -1,11 +1,13 @@
1
- export { UButton } from './button.wc.js';
2
- export type { ButtonProps } from './button.wc.js';
3
- export { UInput, createControlledInput } from './input.wc.js';
4
- export type { InputProps } from './input.wc.js';
5
- export { UBox } from './box.wc.js';
6
- export type { BoxProps, BoxAs } from './box.wc.js';
7
- export { UList, UVirtualList } from './list.wc.js';
8
- export type { ListProps, VirtualListProps } from './list.wc.js';
9
- export { UPortal, setPortalRoot } from './portal.wc.js';
10
- export type { PortalProps } from './portal.wc.js';
11
- //# sourceMappingURL=index.d.ts.map
1
+ export { a2 as AccordionItemProps, A as AccordionProps, a3 as AnimatePreset, a as AnimateProps, B as BadgeProps, a4 as BadgeSize, a5 as BadgeVariant, a6 as BoxAs, b as BoxProps, a7 as BreadcrumbItem, c as BreadcrumbProps, d as ButtonProps, C as CalendarProps, a8 as CardPadding, e as CardProps, a9 as CardVariant, f as CheckboxProps, g as CollectionProps, aa as CollectionSelection, ab as ComboboxOption, h as ComboboxProps, ac as CommandItem, i as CommandPaletteProps, j as ContainerProps, ad as ContextMenuItem, k as ContextMenuProps, ae as DataTableColumn, D as DataTableProps, l as DialogRootProps, m as DismissableLayerProps, n as DrawerProps, af as DrawerSide, ag as DropdownItem, o as DropdownProps, F as FieldProps, p as FocusManagerProps, q as FocusScopeProps, r as FocusTrapProps, s as FormProps, G as GridProps, H as HoverableProps, I as InputProps, K as KeyboardNavigationProps, L as LabelProps, t as LinkProps, u as ListProps, ah as LiveRegionPoliteness, v as LiveRegionProps, M as ModalProps, O as OverlayProps, P as PopoverProps, ai as PopperPlacement, w as PopperProps, x as PortalProps, aj as PresenceAnimation, y as PresenceProps, z as PressableProps, R as RadioGroupProps, ak as RadioProps, E as RouterViewProps, al as SelectOption, J as SelectProps, N as SortableProps, Q as SpacerProps, S as StackProps, T as SwitchProps, am as TableColumn, U as TableProps, V as TabsProps, an as TextColor, W as TextProps, ao as TextSize, ap as TextWeight, X as TextareaProps, aq as ToastOptions, Y as ToastProps, Z as TooltipRootProps, _ as TransitionProps, ar as TransitionType, as as TreeNodeData, $ as TreeProps, at as UAccordion, au as UAccordionItem, av as UAnimate, aw as UBadge, ax as UBox, ay as UBreadcrumb, az as UButton, aA as UCalendar, aB as UCard, aC as UCheckbox, aD as UCollection, aE as UCombobox, aF as UCommandPalette, aG as UContainer, aH as UContextMenu, aI as UDataTable, aJ as UDialogRoot, aK as UDismissableLayer, aL as UDrawer, aM as UDropdown, aN as UField, aO as UFocusManager, aP as UFocusScope, aQ as UFocusTrap, aR as UForm, aS as UGrid, aT as UHStack, aU as UHoverable, aV as UInput, aW as UKeyboardNavigation, aX as ULabel, aY as ULink, aZ as UList, a_ as ULiveRegion, a$ as UModal, b0 as UOverlay, b1 as UPopover, b2 as UPopper, b3 as UPortal, b4 as UPresence, b5 as UPressable, b6 as URadio, b7 as URadioGroup, b8 as URouterView, b9 as USelect, ba as USortable, bb as USpacer, bc as UStack, bd as USwitch, be as UTable, bf as UTabs, bg as UText, bh as UTextarea, bi as UToast, bj as UTooltipRoot, bk as UTransition, bl as UTree, bm as UVirtualList, bn as UVisuallyHidden, a0 as VirtualListProps, a1 as VisuallyHiddenProps, bo as createControlledInput, bp as setPortalRoot } from '../card.wc-pFLgjfwm.js';
2
+ import { U as UElement } from '../element-DHtonJNX.js';
3
+ import '../types-DWglFa91.js';
4
+
5
+ interface SlotProps {
6
+ class?: string;
7
+ }
8
+ declare class USlot extends UElement {
9
+ constructor();
10
+ _mount(): void;
11
+ }
12
+
13
+ export { type SlotProps, USlot };
@@ -1,6 +1,6 @@
1
- export { UButton } from './button.wc.js';
2
- export { UInput, createControlledInput } from './input.wc.js';
3
- export { UBox } from './box.wc.js';
4
- export { UList, UVirtualList } from './list.wc.js';
5
- export { UPortal, setPortalRoot } from './portal.wc.js';
1
+ import '../chunk-T7QLIHHU.js';
2
+ export { UAccordion, UAccordionItem, UAnimate, UBadge, UBox, UBreadcrumb, UButton, UCalendar, UCard, UCheckbox, UCollection, UCombobox, UCommandPalette, UContainer, UContextMenu, UDataTable, UDialogRoot, UDismissableLayer, UDrawer, UDropdown, UField, UFocusManager, UFocusScope, UFocusTrap, UForm, UGrid, UHStack, UHoverable, UInput, UKeyboardNavigation, ULabel, ULink, UList, ULiveRegion, UModal, UOverlay, UPopover, UPopper, UPortal, UPresence, UPressable, URadio, URadioGroup, URouterView, USelect, USlot, USortable, USpacer, UStack, USwitch, UTable, UTabs, UText, UTextarea, UToast, UTooltipRoot, UTransition, UTree, UVirtualList, UVisuallyHidden, createControlledInput, setPortalRoot } from '../chunk-RQZ7KDYP.js';
3
+ import '../chunk-ICB6OBEZ.js';
4
+ import '../chunk-Q5RCPPCF.js';
5
+ //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/dist/define.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=define.d.ts.map
1
+
2
+ export { }
package/dist/define.js CHANGED
@@ -1,3 +1,10 @@
1
- import { defineComponents } from './core/define.js';
1
+ import { defineComponents } from './chunk-QTANS5ZS.js';
2
+ import './chunk-RQZ7KDYP.js';
3
+ import './chunk-RATTHYIP.js';
4
+ import './chunk-ICB6OBEZ.js';
5
+ import './chunk-Q5RCPPCF.js';
6
+
7
+ // src/define.ts
2
8
  defineComponents();
9
+ //# sourceMappingURL=define.js.map
3
10
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"sources":["../src/define.ts"],"names":[],"mappings":";;;;;;;AAEA,gBAAA,EAAiB","file":"define.js","sourcesContent":["import { defineComponents } from './core/define.js';\r\n\r\ndefineComponents();\r\n"]}
@@ -1,4 +1,4 @@
1
- export declare abstract class UElement extends HTMLElement {
1
+ declare abstract class UElement extends HTMLElement {
2
2
  private _cleanups;
3
3
  protected _root: ShadowRoot;
4
4
  protected _id: number;
@@ -8,4 +8,5 @@ export declare abstract class UElement extends HTMLElement {
8
8
  protected adoptEffect(fn: () => (() => void) | void): () => void;
9
9
  protected abstract _mount(): void;
10
10
  }
11
- //# sourceMappingURL=element.d.ts.map
11
+
12
+ export { UElement as U };
@@ -1,5 +1,33 @@
1
- export { UIcon } from './icon-element.js';
2
- export type { UIconProps } from './icon-element.js';
3
- export { iconRegistry } from './registry.js';
4
- export type { IconData } from './registry.js';
5
- //# sourceMappingURL=index.d.ts.map
1
+ import { U as UElement } from '../element-DHtonJNX.js';
2
+
3
+ interface UIconProps {
4
+ name?: string;
5
+ size?: number | string;
6
+ strokeWidth?: number | string;
7
+ class?: string;
8
+ }
9
+ declare class UIcon extends UElement {
10
+ static get observedAttributes(): string[];
11
+ private _name;
12
+ private _size;
13
+ private _strokeWidth;
14
+ constructor();
15
+ get name(): string;
16
+ set name(val: string);
17
+ get size(): number;
18
+ set size(val: number);
19
+ get strokeWidth(): number;
20
+ set strokeWidth(val: number);
21
+ connectedCallback(): void;
22
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
23
+ private _update;
24
+ _mount(): void;
25
+ }
26
+
27
+ interface IconData {
28
+ innerHTML: string;
29
+ viewBox: string;
30
+ }
31
+ declare const iconRegistry: Record<string, IconData>;
32
+
33
+ export { type IconData, UIcon, type UIconProps, iconRegistry };
@@ -1,4 +1,6 @@
1
- // Auto-generated by scripts/build-icons.mjs — do not edit manually
2
- export { UIcon } from './icon-element.js';
3
- export { iconRegistry } from './registry.js';
1
+ import '../chunk-RAWESWNC.js';
2
+ export { UIcon, iconRegistry } from '../chunk-RATTHYIP.js';
3
+ import '../chunk-ICB6OBEZ.js';
4
+ import '../chunk-Q5RCPPCF.js';
5
+ //# sourceMappingURL=index.js.map
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,35 @@
1
- export { signal, computed, effect, isSignal, untrack, hydrateSignals, batch, scheduleMicrotask, isBatching, createStore, createSliceStore, registerPlugin, unregisterPlugin, getPlugin, hasPlugin, runPluginHook, } from './core/index.js';
2
- export type { Signal, WritableSignal, ReadonlySignal, Store, Plugin, PluginAPI, } from './core/index.js';
3
- export { UButton, UInput, UBox, UList, UVirtualList, UPortal } from './components/index.js';
4
- export { createControlledInput, setPortalRoot } from './components/index.js';
5
- export type { ButtonProps, InputProps, BoxProps, BoxAs, ListProps, VirtualListProps, PortalProps } from './components/index.js';
6
- export { UIcon, iconRegistry } from './icons/index.js';
7
- export type { UIconProps, IconData } from './icons/index.js';
8
- export { defineComponents } from './core/define.js';
9
- export type { DefineOptions } from './core/define.js';
10
- //# sourceMappingURL=index.d.ts.map
1
+ import { R as ReadonlySignal, S as Signal, W as WritableSignal, a as Store, P as Plugin } from './types-DWglFa91.js';
2
+ export { b as PluginAPI } from './types-DWglFa91.js';
3
+ export { a2 as AccordionItemProps, A as AccordionProps, a3 as AnimatePreset, a as AnimateProps, B as BadgeProps, a4 as BadgeSize, a5 as BadgeVariant, a6 as BoxAs, b as BoxProps, a7 as BreadcrumbItem, c as BreadcrumbProps, d as ButtonProps, C as CalendarProps, a8 as CardPadding, e as CardProps, a9 as CardVariant, f as CheckboxProps, g as CollectionProps, aa as CollectionSelection, ab as ComboboxOption, h as ComboboxProps, ac as CommandItem, i as CommandPaletteProps, j as ContainerProps, ad as ContextMenuItem, k as ContextMenuProps, ae as DataTableColumn, D as DataTableProps, l as DialogRootProps, m as DismissableLayerProps, n as DrawerProps, af as DrawerSide, ag as DropdownItem, o as DropdownProps, F as FieldProps, p as FocusManagerProps, q as FocusScopeProps, r as FocusTrapProps, s as FormProps, G as GridProps, H as HoverableProps, I as InputProps, K as KeyboardNavigationProps, L as LabelProps, t as LinkProps, u as ListProps, ah as LiveRegionPoliteness, v as LiveRegionProps, M as ModalProps, O as OverlayProps, P as PopoverProps, ai as PopperPlacement, w as PopperProps, x as PortalProps, aj as PresenceAnimation, y as PresenceProps, z as PressableProps, R as RadioGroupProps, ak as RadioProps, E as RouterViewProps, al as SelectOption, J as SelectProps, N as SortableProps, Q as SpacerProps, S as StackProps, T as SwitchProps, am as TableColumn, U as TableProps, V as TabsProps, an as TextColor, W as TextProps, ao as TextSize, ap as TextWeight, X as TextareaProps, aq as ToastOptions, Y as ToastProps, Z as TooltipRootProps, _ as TransitionProps, ar as TransitionType, as as TreeNodeData, $ as TreeProps, at as UAccordion, au as UAccordionItem, av as UAnimate, aw as UBadge, ax as UBox, ay as UBreadcrumb, az as UButton, aA as UCalendar, aB as UCard, aC as UCheckbox, aD as UCollection, aE as UCombobox, aF as UCommandPalette, aG as UContainer, aH as UContextMenu, aI as UDataTable, aJ as UDialogRoot, aK as UDismissableLayer, aL as UDrawer, aM as UDropdown, aN as UField, aO as UFocusManager, aP as UFocusScope, aQ as UFocusTrap, aR as UForm, aS as UGrid, aT as UHStack, aU as UHoverable, aV as UInput, aW as UKeyboardNavigation, aX as ULabel, aY as ULink, aZ as UList, a_ as ULiveRegion, a$ as UModal, b0 as UOverlay, b1 as UPopover, b2 as UPopper, b3 as UPortal, b4 as UPresence, b5 as UPressable, b6 as URadio, b7 as URadioGroup, b8 as URouterView, b9 as USelect, ba as USortable, bb as USpacer, bc as UStack, bd as USwitch, be as UTable, bf as UTabs, bg as UText, bh as UTextarea, bi as UToast, bj as UTooltipRoot, bk as UTransition, bl as UTree, bm as UVirtualList, bn as UVisuallyHidden, a0 as VirtualListProps, a1 as VisuallyHiddenProps, bo as createControlledInput, bp as setPortalRoot } from './card.wc-pFLgjfwm.js';
4
+ export { SlotProps, USlot } from './components/index.js';
5
+ export { IconData, UIcon, UIconProps, iconRegistry } from './icons/index.js';
6
+ import './element-DHtonJNX.js';
7
+
8
+ declare function batch(fn: () => void): void;
9
+ declare function isBatching(): boolean;
10
+ declare function scheduleMicrotask(fn: () => void): void;
11
+
12
+ declare function hydrateSignals(data?: Record<string, any>): void;
13
+ declare function signal<T>(initial: T): WritableSignal<T>;
14
+ declare function computed<T>(fn: () => T): ReadonlySignal<T>;
15
+ declare function effect(fn: () => (() => void) | void): () => void;
16
+ declare function isSignal(value: unknown): value is Signal<any>;
17
+ declare function untrack<T>(fn: () => T): T;
18
+
19
+ declare function createStore<T extends Record<string, any>>(initial: T): Store<T>;
20
+ declare function createSliceStore<T extends Record<string, any>>(initial: T, name?: string): Store<T> & {
21
+ name?: string;
22
+ };
23
+
24
+ declare function registerPlugin(plugin: Plugin): void;
25
+ declare function unregisterPlugin(name: string): boolean;
26
+ declare function getPlugin(name: string): Plugin | undefined;
27
+ declare function hasPlugin(name: string): boolean;
28
+ declare function runPluginHook(name: string, ...args: any[]): void;
29
+
30
+ interface DefineOptions {
31
+ prefix?: string;
32
+ }
33
+ declare function defineComponents(options?: DefineOptions): void;
34
+
35
+ export { type DefineOptions, Plugin, ReadonlySignal, Signal, Store, WritableSignal, batch, computed, createSliceStore, createStore, defineComponents, effect, getPlugin, hasPlugin, hydrateSignals, isBatching, isSignal, registerPlugin, runPluginHook, scheduleMicrotask, signal, unregisterPlugin, untrack };
package/dist/index.js CHANGED
@@ -1,10 +1,45 @@
1
- // Core
2
- export { signal, computed, effect, isSignal, untrack, hydrateSignals, batch, scheduleMicrotask, isBatching, createStore, createSliceStore, registerPlugin, unregisterPlugin, getPlugin, hasPlugin, runPluginHook, } from './core/index.js';
3
- // Components (Web Components)
4
- export { UButton, UInput, UBox, UList, UVirtualList, UPortal } from './components/index.js';
5
- export { createControlledInput, setPortalRoot } from './components/index.js';
6
- // Icons
7
- export { UIcon, iconRegistry } from './icons/index.js';
8
- // Define / Registration
9
- export { defineComponents } from './core/define.js';
1
+ export { defineComponents } from './chunk-QTANS5ZS.js';
2
+ import './chunk-T7QLIHHU.js';
3
+ export { UAccordion, UAccordionItem, UAnimate, UBadge, UBox, UBreadcrumb, UButton, UCalendar, UCard, UCheckbox, UCollection, UCombobox, UCommandPalette, UContainer, UContextMenu, UDataTable, UDialogRoot, UDismissableLayer, UDrawer, UDropdown, UField, UFocusManager, UFocusScope, UFocusTrap, UForm, UGrid, UHStack, UHoverable, UInput, UKeyboardNavigation, ULabel, ULink, UList, ULiveRegion, UModal, UOverlay, UPopover, UPopper, UPortal, UPresence, UPressable, URadio, URadioGroup, URouterView, USelect, USlot, USortable, USpacer, UStack, USwitch, UTable, UTabs, UText, UTextarea, UToast, UTooltipRoot, UTransition, UTree, UVirtualList, UVisuallyHidden, createControlledInput, setPortalRoot } from './chunk-RQZ7KDYP.js';
4
+ import './chunk-RAWESWNC.js';
5
+ export { UIcon, iconRegistry } from './chunk-RATTHYIP.js';
6
+ import './chunk-ICB6OBEZ.js';
7
+ export { getPlugin, hasPlugin, registerPlugin, runPluginHook, unregisterPlugin } from './chunk-U4WYCYL6.js';
8
+ import { signal, batch, destroySignal } from './chunk-Q5RCPPCF.js';
9
+ export { batch, computed, effect, hydrateSignals, isBatching, isSignal, scheduleMicrotask, signal, untrack } from './chunk-Q5RCPPCF.js';
10
+
11
+ // src/core/store.ts
12
+ function createStore(initial) {
13
+ const stateSignal = signal({ ...initial });
14
+ let destroyed = false;
15
+ const getState = () => {
16
+ return stateSignal.get();
17
+ };
18
+ const setState = (partial) => {
19
+ if (destroyed) return;
20
+ batch(() => {
21
+ const updates = typeof partial === "function" ? partial(stateSignal.peek()) : partial;
22
+ const current = stateSignal.peek();
23
+ const next = { ...current, ...updates };
24
+ stateSignal.set(next);
25
+ });
26
+ };
27
+ const subscribe = (fn) => {
28
+ if (destroyed) return () => {
29
+ };
30
+ return stateSignal.subscribe(fn);
31
+ };
32
+ const destroy = () => {
33
+ if (destroyed) return;
34
+ destroyed = true;
35
+ destroySignal(stateSignal);
36
+ };
37
+ return { getState, setState, subscribe, destroy };
38
+ }
39
+ function createSliceStore(initial, name) {
40
+ return { ...createStore(initial), name };
41
+ }
42
+
43
+ export { createSliceStore, createStore };
44
+ //# sourceMappingURL=index.js.map
10
45
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,OAAO,EACL,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAC3D,KAAK,EAAE,iBAAiB,EAAE,UAAU,EACpC,WAAW,EAAE,gBAAgB,EAC7B,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GACtE,MAAM,iBAAiB,CAAC;AAMzB,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG7E,QAAQ;AACR,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGvD,wBAAwB;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"sources":["../src/core/store.ts"],"names":[],"mappings":";;;;;;;;;;;AAIO,SAAS,YAA2C,OAAA,EAAsB;AAC/E,EAAA,MAAM,WAAA,GAAc,MAAA,CAAU,EAAE,GAAG,SAAc,CAAA;AACjD,EAAA,IAAI,SAAA,GAAY,KAAA;AAEhB,EAAA,MAAM,WAAW,MAAmB;AAClC,IAAA,OAAO,YAAY,GAAA,EAAI;AAAA,EACzB,CAAA;AAEA,EAAA,MAAM,QAAA,GAAW,CAAC,OAAA,KAA0D;AAC1E,IAAA,IAAI,SAAA,EAAW;AACf,IAAA,KAAA,CAAM,MAAM;AACV,MAAA,MAAM,OAAA,GAAU,OAAO,OAAA,KAAY,UAAA,GAAa,QAAQ,WAAA,CAAY,IAAA,EAAM,CAAA,GAAI,OAAA;AAC9E,MAAA,MAAM,OAAA,GAAU,YAAY,IAAA,EAAK;AACjC,MAAA,MAAM,IAAA,GAAO,EAAE,GAAG,OAAA,EAAS,GAAG,OAAA,EAAQ;AACtC,MAAA,WAAA,CAAY,IAAI,IAAI,CAAA;AAAA,IACtB,CAAC,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,MAAM,SAAA,GAAY,CAAC,EAAA,KAAiC;AAClD,IAAA,IAAI,SAAA,SAAkB,MAAM;AAAA,IAAC,CAAA;AAC7B,IAAA,OAAO,WAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA;AAEA,EAAA,MAAM,UAAU,MAAY;AAC1B,IAAA,IAAI,SAAA,EAAW;AACf,IAAA,SAAA,GAAY,IAAA;AACZ,IAAA,aAAA,CAAc,WAAW,CAAA;AAAA,EAC3B,CAAA;AAEA,EAAA,OAAO,EAAE,QAAA,EAAU,QAAA,EAAU,SAAA,EAAW,OAAA,EAAQ;AAClD;AAEO,SAAS,gBAAA,CACd,SACA,IAAA,EAC8B;AAC9B,EAAA,OAAO,EAAE,GAAG,WAAA,CAAY,OAAO,GAAG,IAAA,EAAK;AACzC","file":"index.js","sourcesContent":["import type { Store } from './types.js';\r\nimport { signal, effect, destroySignal } from './signal.js';\r\nimport { batch } from './scheduler.js';\r\n\r\nexport function createStore<T extends Record<string, any>>(initial: T): Store<T> {\r\n const stateSignal = signal<T>({ ...initial } as T);\r\n let destroyed = false;\r\n\r\n const getState = (): Readonly<T> => {\r\n return stateSignal.get();\r\n };\r\n\r\n const setState = (partial: Partial<T> | ((prev: T) => Partial<T>)): void => {\r\n if (destroyed) return;\r\n batch(() => {\r\n const updates = typeof partial === 'function' ? partial(stateSignal.peek()) : partial;\r\n const current = stateSignal.peek();\r\n const next = { ...current, ...updates };\r\n stateSignal.set(next);\r\n });\r\n };\r\n\r\n const subscribe = (fn: () => void): (() => void) => {\r\n if (destroyed) return () => {};\r\n return stateSignal.subscribe(fn);\r\n };\r\n\r\n const destroy = (): void => {\r\n if (destroyed) return;\r\n destroyed = true;\r\n destroySignal(stateSignal);\r\n };\r\n\r\n return { getState, setState, subscribe, destroy };\r\n}\r\n\r\nexport function createSliceStore<T extends Record<string, any>>(\r\n initial: T,\r\n name?: string,\r\n): Store<T> & { name?: string } {\r\n return { ...createStore(initial), name };\r\n}\r\n"]}
@@ -1,2 +1 @@
1
- export { jsxDEV, Fragment } from './jsx-runtime.js';
2
- //# sourceMappingURL=jsx-dev-runtime.d.ts.map
1
+ export { Fragment, jsxDEV } from './jsx-runtime.js';
@@ -1,2 +1,4 @@
1
- export { jsxDEV, Fragment } from './jsx-runtime.js';
1
+ export { Fragment, jsxDEV } from './chunk-7GJXOXOW.js';
2
+ import './chunk-Q5RCPPCF.js';
3
+ //# sourceMappingURL=jsx-dev-runtime.js.map
2
4
  //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../src/jsx-dev-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"jsx-dev-runtime.js"}