@vertz/ui 0.2.23 → 0.2.25

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 (36) hide show
  1. package/dist/shared/chunk-09ntccdx.js +39 -0
  2. package/dist/shared/{chunk-g6fb5yc2.js → chunk-1jgws7rs.js} +210 -258
  3. package/dist/shared/{chunk-016m1fq0.js → chunk-2krx4aqe.js} +119 -15
  4. package/dist/shared/{chunk-f4d5nphq.js → chunk-7nr2ebrf.js} +1 -1
  5. package/dist/shared/{chunk-4gmtsf6v.js → chunk-bk7mmn92.js} +1 -1
  6. package/dist/shared/chunk-djvarb8r.js +333 -0
  7. package/dist/shared/{chunk-jtma4sh4.js → chunk-e09mdqcx.js} +2 -2
  8. package/dist/shared/{chunk-4xkw6h1s.js → chunk-h1fsr8kv.js} +67 -1
  9. package/dist/shared/{chunk-xhc7arn9.js → chunk-j1a7t906.js} +14 -12
  10. package/dist/shared/{chunk-656n0x6y.js → chunk-ppr06jgn.js} +8 -2
  11. package/dist/shared/{chunk-2kyhn86t.js → chunk-svvqjmyy.js} +5 -63
  12. package/dist/shared/{chunk-da2w7j7w.js → chunk-xs5s8gqe.js} +1 -1
  13. package/dist/shared/{chunk-p3fz6qqp.js → chunk-ymc3wwam.js} +8 -2
  14. package/dist/src/auth/public.d.ts +35 -1
  15. package/dist/src/auth/public.js +72 -3
  16. package/dist/src/components/index.d.ts +3 -2
  17. package/dist/src/components/index.js +56 -46
  18. package/dist/src/css/public.d.ts +5 -1
  19. package/dist/src/css/public.js +4 -5
  20. package/dist/src/form/public.js +2 -2
  21. package/dist/src/index.d.ts +162 -53
  22. package/dist/src/index.js +341 -320
  23. package/dist/src/internals.d.ts +85 -10
  24. package/dist/src/internals.js +380 -90
  25. package/dist/src/jsx-runtime/index.js +3 -5
  26. package/dist/src/query/public.d.ts +6 -33
  27. package/dist/src/query/public.js +5 -7
  28. package/dist/src/router/public.d.ts +27 -4
  29. package/dist/src/router/public.js +8 -10
  30. package/dist/src/test/index.d.ts +12 -3
  31. package/dist/src/test/index.js +3 -3
  32. package/package.json +4 -3
  33. package/reactivity.json +1 -1
  34. package/dist/shared/chunk-13tvh4wq.js +0 -229
  35. package/dist/shared/chunk-2y9f9j62.js +0 -40
  36. package/dist/shared/chunk-prj7nm08.js +0 -67
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  __append,
3
+ __attr,
3
4
  __element,
4
5
  __enterChildren,
5
6
  __exitChildren
6
- } from "./chunk-13tvh4wq.js";
7
+ } from "./chunk-djvarb8r.js";
7
8
  import {
8
9
  getSSRContext
9
- } from "./chunk-656n0x6y.js";
10
+ } from "./chunk-ppr06jgn.js";
10
11
 
11
12
  // src/component/children.ts
12
13
  var MAX_RESOLVE_DEPTH = 100;
@@ -181,13 +182,13 @@ var SPACING_SCALE = {
181
182
  };
182
183
  var RADIUS_SCALE = {
183
184
  none: "0",
184
- xs: "0.125rem",
185
- sm: "0.25rem",
186
- md: "0.375rem",
187
- lg: "0.5rem",
188
- xl: "0.75rem",
189
- "2xl": "1rem",
190
- "3xl": "1.5rem",
185
+ xs: "calc(var(--radius) * 0.33)",
186
+ sm: "calc(var(--radius) * 0.67)",
187
+ md: "var(--radius)",
188
+ lg: "calc(var(--radius) * 1.33)",
189
+ xl: "calc(var(--radius) * 2)",
190
+ "2xl": "calc(var(--radius) * 2.67)",
191
+ "3xl": "calc(var(--radius) * 4)",
191
192
  full: "9999px"
192
193
  };
193
194
  var SHADOW_SCALE = {
@@ -1097,10 +1098,11 @@ ${darkVars.join(`
1097
1098
  }
1098
1099
 
1099
1100
  // src/css/theme-provider.ts
1100
- function ThemeProvider({ theme = "light", children: children2 }) {
1101
- const el = __element("div", { "data-theme": theme });
1101
+ function ThemeProvider(props) {
1102
+ const el = __element("div");
1103
+ __attr(el, "data-theme", () => props.theme ?? "light");
1102
1104
  __enterChildren(el);
1103
- const nodes = resolveChildren(children2);
1105
+ const nodes = resolveChildren(props.children);
1104
1106
  for (const node of nodes) {
1105
1107
  __append(el, node);
1106
1108
  }
@@ -411,7 +411,7 @@ function claimText() {
411
411
  currentNode = text.nextSibling;
412
412
  return text;
413
413
  }
414
- if (currentNode.nodeType === Node.ELEMENT_NODE) {
414
+ if (currentNode.nodeType === Node.ELEMENT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {
415
415
  break;
416
416
  }
417
417
  currentNode = currentNode.nextSibling;
@@ -466,8 +466,14 @@ function findUnclaimedNodes(root, claimed) {
466
466
  continue;
467
467
  }
468
468
  }
469
- if (child.nodeType === Node.ELEMENT_NODE && claimed.has(child) && child.tagName === "SPAN" && child.style.display === "contents") {
469
+ if (child.nodeType === Node.COMMENT_NODE && claimed.has(child) && child.data.trim() === "child") {
470
470
  child = child.nextSibling;
471
+ while (child) {
472
+ if (child.nodeType === Node.COMMENT_NODE && child.data.trim() === "child") {
473
+ break;
474
+ }
475
+ child = child.nextSibling;
476
+ }
471
477
  continue;
472
478
  }
473
479
  if (!claimed.has(child)) {
@@ -1,15 +1,11 @@
1
- import {
2
- styleObjectToString
3
- } from "./chunk-4xkw6h1s.js";
4
1
  import {
5
2
  _tryOnCleanup,
6
- deferredDomEffect,
7
3
  getSSRContext,
8
4
  popScope,
9
5
  pushScope,
10
6
  runCleanups,
11
7
  untrack
12
- } from "./chunk-656n0x6y.js";
8
+ } from "./chunk-ppr06jgn.js";
13
9
 
14
10
  // src/component/lifecycle.ts
15
11
  var mountFrames = [];
@@ -95,66 +91,12 @@ function executeOnMount(callback) {
95
91
  }
96
92
  }
97
93
 
98
- // src/dom/attributes.ts
99
- function __attr(el, name, fn) {
100
- return deferredDomEffect(() => {
101
- const value = fn();
102
- if (value == null || value === false) {
103
- el.removeAttribute(name);
104
- } else if (value === true) {
105
- el.setAttribute(name, "");
106
- } else if (name === "style" && typeof value === "object") {
107
- el.setAttribute(name, styleObjectToString(value));
108
- } else {
109
- el.setAttribute(name, value);
110
- }
111
- });
112
- }
113
- function __prop(el, name, fn) {
114
- return deferredDomEffect(() => {
115
- const value = fn();
116
- if (value == null) {
117
- Reflect.set(el, name, typeof Reflect.get(el, name) === "boolean" ? false : "");
118
- } else {
119
- Reflect.set(el, name, value);
120
- }
121
- if (name === "selected") {
122
- if (value) {
123
- el.setAttribute(name, "");
124
- } else {
125
- el.removeAttribute(name);
126
- }
127
- }
128
- });
129
- }
130
- function __show(el, fn) {
131
- const originalDisplay = el.style.display;
132
- return deferredDomEffect(() => {
133
- el.style.display = fn() ? originalDisplay : "none";
134
- });
135
- }
136
- function __classList(el, classMap) {
137
- const disposers = [];
138
- for (const [className, fn] of Object.entries(classMap)) {
139
- disposers.push(deferredDomEffect(() => {
140
- if (fn()) {
141
- el.classList.add(className);
142
- } else {
143
- el.classList.remove(className);
144
- }
145
- }));
146
- }
147
- return () => {
148
- for (const dispose of disposers) {
149
- dispose();
150
- }
151
- };
152
- }
153
-
154
94
  // src/dom/events.ts
155
95
  function __on(el, event, handler) {
156
96
  el.addEventListener(event, handler);
157
- return () => el.removeEventListener(event, handler);
97
+ const cleanup = () => el.removeEventListener(event, handler);
98
+ _tryOnCleanup(cleanup);
99
+ return cleanup;
158
100
  }
159
101
 
160
- export { __pushMountFrame, __flushMountFrame, __discardMountFrame, beginDeferringMounts, flushDeferredMounts, discardDeferredMounts, onMount, __attr, __prop, __show, __classList, __on };
102
+ export { __pushMountFrame, __flushMountFrame, __discardMountFrame, beginDeferringMounts, flushDeferredMounts, discardDeferredMounts, onMount, __on };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  hasSSRResolver
3
- } from "./chunk-656n0x6y.js";
3
+ } from "./chunk-ppr06jgn.js";
4
4
 
5
5
  // src/env/is-browser.ts
6
6
  function isBrowser() {
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  injectCSS
3
- } from "./chunk-xhc7arn9.js";
3
+ } from "./chunk-j1a7t906.js";
4
+ import {
5
+ createContext
6
+ } from "./chunk-ppr06jgn.js";
4
7
 
5
8
  // src/dom/animation.ts
6
9
  function onAnimationsComplete(el, callback) {
@@ -417,6 +420,9 @@ var palettes = {
417
420
  pink,
418
421
  rose
419
422
  };
423
+ // src/dom/list-animation-context.ts
424
+ var ListAnimationContext = createContext(undefined, "@vertz/ui::ListAnimationContext");
425
+
420
426
  // src/hydrate/component-registry.ts
421
427
  async function resolveComponent(registry, componentId) {
422
428
  const loader = registry[componentId];
@@ -547,4 +553,4 @@ function hydrateIslands(registry) {
547
553
  // src/query/index.ts
548
554
  import { isQueryDescriptor } from "@vertz/fetch";
549
555
 
550
- export { onAnimationsComplete, keyframes, ANIMATION_DURATION, ANIMATION_EASING, fadeIn, fadeOut, zoomIn, zoomOut, slideInFromTop, slideInFromBottom, slideOutToTop, slideOutToBottom, slideInFromLeft, slideInFromRight, slideOutToLeft, slideOutToRight, accordionDown, accordionUp, palettes, resolveComponent, deserializeProps, hydrate, hydrateIslands, isQueryDescriptor };
556
+ export { onAnimationsComplete, keyframes, ANIMATION_DURATION, ANIMATION_EASING, fadeIn, fadeOut, zoomIn, zoomOut, slideInFromTop, slideInFromBottom, slideOutToTop, slideOutToBottom, slideInFromLeft, slideInFromRight, slideOutToLeft, slideOutToRight, accordionDown, accordionUp, palettes, ListAnimationContext, resolveComponent, deserializeProps, hydrate, hydrateIslands, isQueryDescriptor };
@@ -366,6 +366,40 @@ declare function createAccessProvider(): AccessContextValue;
366
366
  * Returns the built-in icon for known providers, or a generic fallback for unknown.
367
367
  */
368
368
  declare function getProviderIcon(providerId: string, size: number): string;
369
+ import { Result as Result3 } from "@vertz/fetch";
370
+ interface TenantInfo {
371
+ id: string;
372
+ name: string;
373
+ [key: string]: unknown;
374
+ }
375
+ interface ListTenantsResponse {
376
+ tenants: TenantInfo[];
377
+ currentTenantId?: string;
378
+ lastTenantId?: string;
379
+ resolvedDefaultId?: string;
380
+ }
381
+ interface TenantContextValue {
382
+ tenants: Signal<TenantInfo[]>;
383
+ currentTenantId: Signal<string | undefined>;
384
+ lastTenantId: Signal<string | undefined>;
385
+ resolvedDefaultId: Signal<string | undefined>;
386
+ isLoading: Signal<boolean>;
387
+ switchTenant: (tenantId: string) => Promise<Result3<void, Error>>;
388
+ }
389
+ declare const TenantContext: Context<TenantContextValue>;
390
+ declare function useTenant(): UnwrapSignals<TenantContextValue>;
391
+ interface TenantProviderProps {
392
+ /** SDK method to list tenants (generated by codegen). */
393
+ listTenants: () => PromiseLike<Result3<ListTenantsResponse, Error>>;
394
+ /** SDK method to switch tenant (generated by codegen). */
395
+ switchTenant: SdkMethodWithMeta<{
396
+ tenantId: string;
397
+ }, unknown>;
398
+ /** Called after a successful tenant switch. */
399
+ onSwitchComplete?: (tenantId: string) => void;
400
+ children: (() => unknown) | unknown;
401
+ }
402
+ declare function TenantProvider({ listTenants, switchTenant: switchTenantSdk, onSwitchComplete, children }: TenantProviderProps): HTMLElement;
369
403
  /**
370
404
  * Get a display name for a user with a fallback chain.
371
405
  * Chain: user.name (if string & non-empty) → user.email → fallback (default: 'Unknown')
@@ -381,4 +415,4 @@ declare function getUserInitials(user: User | null | undefined): string;
381
415
  * Returns an inline SVG string — no external requests, works in SSR.
382
416
  */
383
417
  declare function getUserIcon(size: number): string;
384
- export { useAuth, useAccessContext, getUserInitials, getUserIcon, getUserDisplayName, getProviderIcon, createAccessProvider, createAccessEventClient, canSignals, can, User, SignUpInput, SignOutOptions, SignInInput, ResetInput, RawAccessCheck, OAuthProviderInfo, MfaInput, ForgotInput, EntitlementRegistry, Entitlement, DenialReason, DenialMeta, ClientAccessEvent, AuthStatus, AuthSdkMethod, AuthSdk, AuthResponse, AuthProviderProps, AuthProvider, AuthErrorCode, AuthContextValue, AuthContext, AuthClientError, AccessSet, AccessEventClientOptions, AccessEventClient, AccessContextValue, AccessContext, AccessCheckData, AccessCheck };
418
+ export { useTenant, useAuth, useAccessContext, getUserInitials, getUserIcon, getUserDisplayName, getProviderIcon, createAccessProvider, createAccessEventClient, canSignals, can, User, TenantProviderProps, TenantProvider, TenantInfo, TenantContextValue, TenantContext, SignUpInput, SignOutOptions, SignInInput, ResetInput, RawAccessCheck, OAuthProviderInfo, MfaInput, ListTenantsResponse, ForgotInput, EntitlementRegistry, Entitlement, DenialReason, DenialMeta, ClientAccessEvent, AuthStatus, AuthSdkMethod, AuthSdk, AuthResponse, AuthProviderProps, AuthProvider, AuthErrorCode, AuthContextValue, AuthContext, AuthClientError, AccessSet, AccessEventClientOptions, AccessEventClient, AccessContextValue, AccessContext, AccessCheckData, AccessCheck };
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  RouterContext
3
- } from "../../shared/chunk-f4d5nphq.js";
3
+ } from "../../shared/chunk-7nr2ebrf.js";
4
+ import {
5
+ invalidateTenantQueries
6
+ } from "../../shared/chunk-09ntccdx.js";
4
7
  import {
5
8
  isBrowser
6
- } from "../../shared/chunk-da2w7j7w.js";
9
+ } from "../../shared/chunk-xs5s8gqe.js";
7
10
  import {
8
11
  _tryOnCleanup,
9
12
  computed,
@@ -11,7 +14,7 @@ import {
11
14
  getSSRContext,
12
15
  signal,
13
16
  useContext
14
- } from "../../shared/chunk-656n0x6y.js";
17
+ } from "../../shared/chunk-ppr06jgn.js";
15
18
 
16
19
  // src/auth/access-context.ts
17
20
  var AccessContext = createContext(undefined, "@vertz/ui::AccessContext");
@@ -778,6 +781,69 @@ function getProviderIcon(providerId, size) {
778
781
  const iconFn = icons[providerId];
779
782
  return iconFn ? iconFn(size) : fallbackIcon(size);
780
783
  }
784
+ // src/auth/tenant-context.ts
785
+ var TenantContext = createContext(undefined, "@vertz/ui::TenantContext");
786
+ function useTenant() {
787
+ const ctx = useContext(TenantContext);
788
+ if (!ctx)
789
+ throw new Error("useTenant must be called within TenantProvider");
790
+ return ctx;
791
+ }
792
+ function TenantProvider({
793
+ listTenants,
794
+ switchTenant: switchTenantSdk,
795
+ onSwitchComplete,
796
+ children
797
+ }) {
798
+ const authCtx = useContext(AuthContext);
799
+ if (!authCtx)
800
+ throw new Error("TenantProvider must be rendered inside AuthProvider");
801
+ const tenantsSignal = signal([]);
802
+ const currentTenantIdSignal = signal(undefined);
803
+ const lastTenantIdSignal = signal(undefined);
804
+ const resolvedDefaultIdSignal = signal(undefined);
805
+ const isLoadingSignal = signal(true);
806
+ setTimeout(() => {
807
+ fetchTenants().catch(() => {});
808
+ }, 0);
809
+ async function fetchTenants() {
810
+ isLoadingSignal.value = true;
811
+ try {
812
+ const result = await listTenants();
813
+ if (result.ok) {
814
+ tenantsSignal.value = result.data.tenants;
815
+ currentTenantIdSignal.value = result.data.currentTenantId;
816
+ lastTenantIdSignal.value = result.data.lastTenantId;
817
+ resolvedDefaultIdSignal.value = result.data.resolvedDefaultId;
818
+ if (!result.data.currentTenantId && result.data.resolvedDefaultId) {
819
+ await doSwitchTenant(result.data.resolvedDefaultId);
820
+ }
821
+ }
822
+ } finally {
823
+ isLoadingSignal.value = false;
824
+ }
825
+ }
826
+ async function doSwitchTenant(tenantId) {
827
+ const result = await switchTenantSdk({ tenantId });
828
+ if (result.ok) {
829
+ currentTenantIdSignal.value = tenantId;
830
+ lastTenantIdSignal.value = tenantId;
831
+ invalidateTenantQueries();
832
+ onSwitchComplete?.(tenantId);
833
+ return { ok: true, data: undefined };
834
+ }
835
+ return { ok: false, error: result.error };
836
+ }
837
+ const contextValue = {
838
+ tenants: tenantsSignal,
839
+ currentTenantId: currentTenantIdSignal,
840
+ lastTenantId: lastTenantIdSignal,
841
+ resolvedDefaultId: resolvedDefaultIdSignal,
842
+ isLoading: isLoadingSignal,
843
+ switchTenant: doSwitchTenant
844
+ };
845
+ return TenantContext.Provider({ value: contextValue, children });
846
+ }
781
847
  // src/auth/user-display.ts
782
848
  function getUserDisplayName(user, fallback = "Unknown") {
783
849
  if (!user)
@@ -810,6 +876,7 @@ function getUserIcon(size) {
810
876
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>`;
811
877
  }
812
878
  export {
879
+ useTenant,
813
880
  useAuth,
814
881
  useAccessContext,
815
882
  getUserInitials,
@@ -820,6 +887,8 @@ export {
820
887
  createAccessEventClient,
821
888
  canSignals,
822
889
  can,
890
+ TenantProvider,
891
+ TenantContext,
823
892
  AuthProvider,
824
893
  AuthContext,
825
894
  AccessContext
@@ -36,9 +36,9 @@ declare const Alert: ThemeComponentMap["Alert"];
36
36
  declare const Card: ThemeComponentMap["Card"];
37
37
  declare const FormGroup: ThemeComponentMap["FormGroup"];
38
38
  declare const Avatar: ThemeComponentMap["Avatar"];
39
+ declare const EmptyState: ThemeComponentMap["EmptyState"];
39
40
  declare const Skeleton: ThemeComponentMap["Skeleton"];
40
41
  declare const Table: ThemeComponentMap["Table"];
41
- declare const AlertDialog: ThemeComponentMap["AlertDialog"];
42
42
  declare const Dialog: ThemeComponentMap["Dialog"];
43
43
  declare const DropdownMenu: ThemeComponentMap["DropdownMenu"];
44
44
  declare const Select: ThemeComponentMap["Select"];
@@ -51,6 +51,7 @@ declare const ContextMenu: ThemeComponentMap["ContextMenu"];
51
51
  declare const Sheet: ThemeComponentMap["Sheet"];
52
52
  declare const Drawer: ThemeComponentMap["Drawer"];
53
53
  declare const Carousel: ThemeComponentMap["Carousel"];
54
+ declare const List: ThemeComponentMap["List"];
54
55
  declare const Calendar: ThemeComponentMap["Calendar"];
55
56
  declare const Checkbox: ThemeComponentMap["Checkbox"];
56
57
  declare const Switch: ThemeComponentMap["Switch"];
@@ -67,4 +68,4 @@ declare const NavigationMenu: ThemeComponentMap["NavigationMenu"];
67
68
  declare const ResizablePanel: ThemeComponentMap["ResizablePanel"];
68
69
  declare const ScrollArea: ThemeComponentMap["ScrollArea"];
69
70
  declare const ToggleGroup: ThemeComponentMap["ToggleGroup"];
70
- export { Tooltip, ToggleGroup, Toggle, Toast, ThemeComponentMap, Textarea, Tabs, Table, Switch, Slider, Skeleton, Sheet, Separator, Select, ScrollArea, ResizablePanel, RadioGroup, Progress, Popover, Pagination, NavigationMenu, Menubar, Label, Input, HoverCard, FormGroup, DropdownMenu, Drawer, Dialog, DatePicker, ContextMenu, Command, Collapsible, Checkbox, Carousel, Card, Calendar, Button, Breadcrumb, Badge, Avatar, AlertDialog, Alert, Accordion };
71
+ export { Tooltip, ToggleGroup, Toggle, Toast, ThemeComponentMap, Textarea, Tabs, Table, Switch, Slider, Skeleton, Sheet, Separator, Select, ScrollArea, ResizablePanel, RadioGroup, Progress, Popover, Pagination, NavigationMenu, Menubar, List, Label, Input, HoverCard, FormGroup, EmptyState, DropdownMenu, Drawer, Dialog, DatePicker, ContextMenu, Command, Collapsible, Checkbox, Carousel, Card, Calendar, Button, Breadcrumb, Badge, Avatar, Alert, Accordion };
@@ -13,32 +13,38 @@ function createComponentProxy(name) {
13
13
  return fn(...args);
14
14
  };
15
15
  }
16
- function createSuiteProxy(name, subComponents) {
17
- const suite = {};
16
+ function createCompoundProxy(name, subComponents) {
17
+ const root = (...args) => {
18
+ const fn = _getPrimitive(name);
19
+ if (typeof fn !== "function") {
20
+ throw new Error(`Primitive "${name}" is not callable in the registered theme. ` + `Check that your theme package provides this component.`);
21
+ }
22
+ return fn(...args);
23
+ };
18
24
  for (const sub of subComponents) {
19
- Object.defineProperty(suite, sub, {
25
+ Object.defineProperty(root, sub, {
20
26
  get: () => {
21
- const parent = _getComponent(name);
27
+ const parent = _getPrimitive(name);
22
28
  return Reflect.get(parent, sub);
23
29
  },
24
30
  enumerable: true,
25
31
  configurable: true
26
32
  });
27
33
  }
28
- return suite;
34
+ return root;
29
35
  }
30
- function createCompoundProxy(name, subComponents) {
36
+ function createCallableSuiteProxy(name, subComponents) {
31
37
  const root = (...args) => {
32
- const fn = _getPrimitive(name);
38
+ const fn = _getComponent(name);
33
39
  if (typeof fn !== "function") {
34
- throw new Error(`Primitive "${name}" is not callable in the registered theme. ` + `Check that your theme package provides this component.`);
40
+ throw new Error(`Component "${name}" is not callable in the registered theme. ` + `Check that your theme package provides this component.`);
35
41
  }
36
42
  return fn(...args);
37
43
  };
38
44
  for (const sub of subComponents) {
39
45
  Object.defineProperty(root, sub, {
40
46
  get: () => {
41
- const parent = _getPrimitive(name);
47
+ const parent = _getComponent(name);
42
48
  return Reflect.get(parent, sub);
43
49
  },
44
50
  enumerable: true,
@@ -47,6 +53,20 @@ function createCompoundProxy(name, subComponents) {
47
53
  }
48
54
  return root;
49
55
  }
56
+ function createPrimitiveSuiteProxy(name, subComponents) {
57
+ const suite = {};
58
+ for (const sub of subComponents) {
59
+ Object.defineProperty(suite, sub, {
60
+ get: () => {
61
+ const parent = _getPrimitive(name);
62
+ return Reflect.get(parent, sub);
63
+ },
64
+ enumerable: true,
65
+ configurable: true
66
+ });
67
+ }
68
+ return suite;
69
+ }
50
70
  function createPrimitiveProxy(name) {
51
71
  return (...args) => {
52
72
  const fn = _getPrimitive(name);
@@ -62,49 +82,34 @@ var Input = /* @__PURE__ */ createComponentProxy("Input");
62
82
  var Textarea = /* @__PURE__ */ createComponentProxy("Textarea");
63
83
  var Label = /* @__PURE__ */ createComponentProxy("Label");
64
84
  var Separator = /* @__PURE__ */ createComponentProxy("Separator");
65
- var Breadcrumb = /* @__PURE__ */ createComponentProxy("Breadcrumb");
85
+ var Breadcrumb = /* @__PURE__ */ createCallableSuiteProxy("Breadcrumb", ["Item"]);
66
86
  var Pagination = /* @__PURE__ */ createComponentProxy("Pagination");
67
- var Alert = /* @__PURE__ */ createSuiteProxy("Alert", [
68
- "Alert",
69
- "AlertTitle",
70
- "AlertDescription"
71
- ]);
72
- var Card = /* @__PURE__ */ createSuiteProxy("Card", [
73
- "Card",
74
- "CardHeader",
75
- "CardTitle",
76
- "CardDescription",
77
- "CardContent",
78
- "CardFooter",
79
- "CardAction"
80
- ]);
81
- var FormGroup = /* @__PURE__ */ createSuiteProxy("FormGroup", ["FormGroup", "FormError"]);
82
- var Avatar = /* @__PURE__ */ createSuiteProxy("Avatar", [
83
- "Avatar",
84
- "AvatarImage",
85
- "AvatarFallback"
86
- ]);
87
- var Skeleton = /* @__PURE__ */ createSuiteProxy("Skeleton", ["Skeleton"]);
88
- var Table = /* @__PURE__ */ createSuiteProxy("Table", [
89
- "Table",
90
- "TableHeader",
91
- "TableBody",
92
- "TableRow",
93
- "TableHead",
94
- "TableCell",
95
- "TableCaption",
96
- "TableFooter"
87
+ var Alert = /* @__PURE__ */ createCallableSuiteProxy("Alert", [
88
+ "Title",
89
+ "Description"
97
90
  ]);
98
- var AlertDialog = /* @__PURE__ */ createCompoundProxy("AlertDialog", ["Trigger", "Content", "Header", "Title", "Description", "Footer", "Cancel", "Action"]);
99
- var Dialog = /* @__PURE__ */ createCompoundProxy("Dialog", [
100
- "Trigger",
101
- "Content",
91
+ var Card = /* @__PURE__ */ createCallableSuiteProxy("Card", [
102
92
  "Header",
103
93
  "Title",
104
94
  "Description",
95
+ "Content",
105
96
  "Footer",
106
- "Close"
97
+ "Action"
98
+ ]);
99
+ var FormGroup = /* @__PURE__ */ createCallableSuiteProxy("FormGroup", ["FormError"]);
100
+ var Avatar = /* @__PURE__ */ createCallableSuiteProxy("Avatar", ["Image", "Fallback"]);
101
+ var EmptyState = /* @__PURE__ */ createCallableSuiteProxy("EmptyState", ["Icon", "Title", "Description", "Action"]);
102
+ var Skeleton = /* @__PURE__ */ createCallableSuiteProxy("Skeleton", ["Text", "Circle"]);
103
+ var Table = /* @__PURE__ */ createCallableSuiteProxy("Table", [
104
+ "Header",
105
+ "Body",
106
+ "Row",
107
+ "Head",
108
+ "Cell",
109
+ "Caption",
110
+ "Footer"
107
111
  ]);
112
+ var Dialog = /* @__PURE__ */ createPrimitiveSuiteProxy("Dialog", ["Header", "Title", "Description", "Footer", "Body", "Close", "Cancel"]);
108
113
  var DropdownMenu = /* @__PURE__ */ createCompoundProxy("DropdownMenu", ["Trigger", "Content", "Item", "Group", "Label", "Separator"]);
109
114
  var Select = /* @__PURE__ */ createCompoundProxy("Select", [
110
115
  "Trigger",
@@ -140,6 +145,10 @@ var Drawer = /* @__PURE__ */ createCompoundProxy("Drawer", [
140
145
  "Handle"
141
146
  ]);
142
147
  var Carousel = /* @__PURE__ */ createCompoundProxy("Carousel", ["Slide", "Previous", "Next"]);
148
+ var List = /* @__PURE__ */ createCompoundProxy("List", [
149
+ "Item",
150
+ "DragHandle"
151
+ ]);
143
152
  var Calendar = /* @__PURE__ */ createPrimitiveProxy("Calendar");
144
153
  var Checkbox = /* @__PURE__ */ createPrimitiveProxy("Checkbox");
145
154
  var Switch = /* @__PURE__ */ createPrimitiveProxy("Switch");
@@ -188,10 +197,12 @@ export {
188
197
  Pagination,
189
198
  NavigationMenu,
190
199
  Menubar,
200
+ List,
191
201
  Label,
192
202
  Input,
193
203
  HoverCard,
194
204
  FormGroup,
205
+ EmptyState,
195
206
  DropdownMenu,
196
207
  Drawer,
197
208
  Dialog,
@@ -207,7 +218,6 @@ export {
207
218
  Breadcrumb,
208
219
  Badge,
209
220
  Avatar,
210
- AlertDialog,
211
221
  Alert,
212
222
  Accordion
213
223
  };
@@ -253,8 +253,12 @@ interface ThemeProviderProps {
253
253
  *
254
254
  * Uses __element() directly (instead of jsx()) so the hydration cursor
255
255
  * walker can claim the existing SSR node during mount().
256
+ *
257
+ * Accepts `props` without destructuring so that the compiler-generated
258
+ * getter for `theme` stays alive — `__attr()` reads it inside a domEffect,
259
+ * making the attribute reactive when the parent passes a signal-backed value.
256
260
  */
257
- declare function ThemeProvider({ theme, children }: ThemeProviderProps): HTMLElement;
261
+ declare function ThemeProvider(props: ThemeProviderProps): HTMLElement;
258
262
  /**
259
263
  * A record of variant names to their possible values (each value maps to style entries).
260
264
  *
@@ -8,11 +8,10 @@ import {
8
8
  globalCss,
9
9
  s,
10
10
  variants
11
- } from "../../shared/chunk-xhc7arn9.js";
12
- import"../../shared/chunk-13tvh4wq.js";
13
- import"../../shared/chunk-prj7nm08.js";
14
- import"../../shared/chunk-2y9f9j62.js";
15
- import"../../shared/chunk-656n0x6y.js";
11
+ } from "../../shared/chunk-j1a7t906.js";
12
+ import"../../shared/chunk-djvarb8r.js";
13
+ import"../../shared/chunk-h1fsr8kv.js";
14
+ import"../../shared/chunk-ppr06jgn.js";
16
15
  export {
17
16
  variants,
18
17
  s,
@@ -3,8 +3,8 @@ import {
3
3
  form,
4
4
  formDataToObject,
5
5
  validate
6
- } from "../../shared/chunk-4gmtsf6v.js";
7
- import"../../shared/chunk-656n0x6y.js";
6
+ } from "../../shared/chunk-bk7mmn92.js";
7
+ import"../../shared/chunk-ppr06jgn.js";
8
8
  export {
9
9
  validate,
10
10
  formDataToObject,