@epoch32/visage 1.2.0 → 1.3.1

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 (64) hide show
  1. package/dist/api/index.js +4 -4
  2. package/dist/charts/index.js +5 -5
  3. package/dist/devtools/index.js +7 -7
  4. package/dist/dom/index.js +3 -3
  5. package/dist/form/index.js +2 -2
  6. package/dist/{index-grhdtcb5.js → index-0qat98zs.js} +3 -3
  7. package/dist/{index-h6tjqk6e.js → index-1jcd8gjf.js} +28 -17
  8. package/dist/{index-6kfe1nr4.js → index-1yhbg34h.js} +41 -9
  9. package/dist/{index-9fvarkrx.js → index-3y73zgbk.js} +1 -1
  10. package/dist/{index-y9bq7h9g.js → index-5jhzwtdz.js} +2 -2
  11. package/dist/{index-a4xns6cc.js → index-65j7a9et.js} +1 -1
  12. package/dist/{index-dyvgtp43.js → index-9bez1tmf.js} +2 -2
  13. package/dist/{index-b5wc752a.js → index-aagpn02x.js} +346 -5
  14. package/dist/{index-df5e614s.js → index-awcrz19g.js} +1 -1
  15. package/dist/{index-8x8xz80v.js → index-b7emqmej.js} +3 -3
  16. package/dist/{index-061jf06a.js → index-cgepvvd4.js} +1 -1
  17. package/dist/{index-1xtrtz1t.js → index-dmhmde2z.js} +2 -2
  18. package/dist/{index-0madxn60.js → index-enc8cmea.js} +1 -1
  19. package/dist/{index-js199er4.js → index-g1drdx7k.js} +12 -1
  20. package/dist/{index-zr6cvset.js → index-ptj8rt6b.js} +5 -5
  21. package/dist/{index-8czhpea8.js → index-x6whpv54.js} +30 -19
  22. package/dist/{index-5s255b3w.js → index-xby428n5.js} +23 -22
  23. package/dist/{index-x2rs3vab.js → index-y3nprgn7.js} +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +32 -18
  26. package/dist/jsx-runtime/index.js +4 -4
  27. package/dist/query/index.js +3 -3
  28. package/dist/router/index.js +5 -5
  29. package/dist/rpc/index.js +4 -4
  30. package/dist/server/index.js +2 -2
  31. package/dist/signals/index.js +1 -1
  32. package/dist/signals/system.d.ts +2 -0
  33. package/dist/style/index.js +6 -6
  34. package/dist/template/index.js +2 -2
  35. package/dist/ui/bottom-bar/action.d.ts +3 -0
  36. package/dist/ui/bottom-bar/badge.d.ts +3 -0
  37. package/dist/ui/bottom-bar/context.d.ts +3 -0
  38. package/dist/ui/bottom-bar/index.d.ts +19 -0
  39. package/dist/ui/bottom-bar/item.d.ts +3 -0
  40. package/dist/ui/bottom-bar/root.d.ts +3 -0
  41. package/dist/ui/bottom-bar/separator.d.ts +3 -0
  42. package/dist/ui/bottom-bar/types.d.ts +72 -0
  43. package/dist/ui/index.d.ts +1 -0
  44. package/dist/ui/index.js +21 -7
  45. package/dist/virtual/index.js +5 -5
  46. package/package.json +1 -1
  47. package/src/dom/control-flow.ts +31 -21
  48. package/src/form/form.ts +29 -17
  49. package/src/index.ts +14 -0
  50. package/src/signals/effect.ts +2 -2
  51. package/src/signals/scope.ts +10 -8
  52. package/src/signals/store.ts +32 -1
  53. package/src/signals/system.ts +8 -0
  54. package/src/template/template.ts +12 -1
  55. package/src/ui/bottom-bar/action.tsx +60 -0
  56. package/src/ui/bottom-bar/badge.tsx +51 -0
  57. package/src/ui/bottom-bar/context.ts +8 -0
  58. package/src/ui/bottom-bar/index.ts +29 -0
  59. package/src/ui/bottom-bar/item.tsx +119 -0
  60. package/src/ui/bottom-bar/root.tsx +148 -0
  61. package/src/ui/bottom-bar/separator.tsx +26 -0
  62. package/src/ui/bottom-bar/types.ts +79 -0
  63. package/src/ui/index.ts +16 -0
  64. package/src/virtual/virtualizer.ts +31 -18
package/dist/index.d.ts CHANGED
@@ -11,5 +11,5 @@ export { hydrate, renderChildToString, renderToStream, renderToString, type Stre
11
11
  export { batch, type CleanupFn, Computed, type Context, computed, createContext, createEffect, createMemo, createRoot, createSignal, createStore, type Dependency, Effect, effect, getActiveScope, isSignal, mutateStore, onCleanup, type ReadonlySignal, runInScope, Scope, Signal, type Store, type Subscriber, signal, untrack, unwrapStore, useContext, type WritableSignal } from "./signals";
12
12
  export { type BaseLayoutProps, Center, type CenterProps, type ClassValue, createStyle, css, cx, DIMENSION_KEYWORDS, em, extractStyleTags, fluid, formatStyleProp, type GlassOptions, Grid, type GridProps, getScopeId, glass, hashString, hasReactiveClass, normalizeClass, px, type RadiusVariant, Row, type RowProps, radius, rem, type ScopeOptions, type ShadowVariant, Spacer, type SpacerProps, Stack, type StackProps, Style, type StyleClasses, StyleManager, type StyleProps, scopeCSS, scopeSelector, shadow, space, styleManager, UNITLESS_PROPERTIES, useStyle } from "./style";
13
13
  export { html, template } from "./template";
14
- export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, type ColumnDef, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, type CreateTabsOptions, createControllableSignal, createIcon, createId, createTabs, createToastManager, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuSeparator, DropdownMenuTrigger, defaultToastManager, type IconNode, type IconProps, onClickOutside, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, type SortDirection, type SortState, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, Toast, ToastClose, type ToastData, ToastDescription, type ToastManager, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastVariant, ToastViewport, type ToastViewportProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipTrigger, toast, trapFocus, useAccordionContext, useAccordionItemContext, useCommandContext, useDialogContext, useDropdownMenuContext, usePopoverContext, useTabsContext, useToast, useTooltipContext } from "./ui";
14
+ export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, BottomBar, BottomBarAction, type BottomBarActionProps, BottomBarBadge, type BottomBarBadgeProps, type BottomBarContextValue, BottomBarItem, type BottomBarItemConfig, type BottomBarItemProps, type BottomBarProps, BottomBarRoot, BottomBarSeparator, type BottomBarSeparatorProps, type ColumnDef, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, type CreateTabsOptions, createControllableSignal, createIcon, createId, createTabs, createToastManager, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuSeparator, DropdownMenuTrigger, defaultToastManager, type IconNode, type IconProps, onClickOutside, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, type SortDirection, type SortState, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, Toast, ToastClose, type ToastData, ToastDescription, type ToastManager, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastVariant, ToastViewport, type ToastViewportProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipTrigger, toast, trapFocus, useAccordionContext, useAccordionItemContext, useBottomBarContext, useCommandContext, useDialogContext, useDropdownMenuContext, usePopoverContext, useTabsContext, useToast, useTooltipContext } from "./ui";
15
15
  export { createVirtualizer, VirtualGrid, type VirtualGridProps, type VirtualItem, type Virtualizer, type VirtualizerOptions, VirtualList, type VirtualListProps } from "./virtual";
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  createStore2,
41
41
  mutateStore2,
42
42
  unwrapStore2
43
- } from "./index-6kfe1nr4.js";
43
+ } from "./index-1yhbg34h.js";
44
44
  import {
45
45
  createApiClient2,
46
46
  buildFileRouter2,
@@ -49,24 +49,24 @@ import {
49
49
  defineMiddleware2,
50
50
  ProcedureBuilder2,
51
51
  procedure2
52
- } from "./index-061jf06a.js";
52
+ } from "./index-cgepvvd4.js";
53
53
  import {
54
54
  lazy2,
55
55
  Show2,
56
56
  For2,
57
57
  Portal2
58
- } from "./index-5s255b3w.js";
59
- import"./index-9fvarkrx.js";
58
+ } from "./index-xby428n5.js";
59
+ import"./index-3y73zgbk.js";
60
60
  import {
61
61
  DevToolsHub2,
62
62
  devtoolsHub2,
63
63
  highlightElement2,
64
64
  VisageDevTools2,
65
65
  connectDevTools2
66
- } from "./index-zr6cvset.js";
66
+ } from "./index-ptj8rt6b.js";
67
67
  import {
68
68
  createForm2
69
- } from "./index-h6tjqk6e.js";
69
+ } from "./index-1jcd8gjf.js";
70
70
  import"./index-921pn75b.js";
71
71
  import {
72
72
  Router2,
@@ -77,7 +77,7 @@ import {
77
77
  useNavigate2,
78
78
  useParams2,
79
79
  useSearchParams2
80
- } from "./index-grhdtcb5.js";
80
+ } from "./index-0qat98zs.js";
81
81
  import {
82
82
  createClient2,
83
83
  RouterImpl2,
@@ -85,17 +85,17 @@ import {
85
85
  query3,
86
86
  mutation3,
87
87
  subscription3
88
- } from "./index-df5e614s.js";
88
+ } from "./index-awcrz19g.js";
89
89
  import {
90
90
  hydrate2,
91
91
  renderChildToString2,
92
92
  renderToString2,
93
93
  renderToStream2
94
- } from "./index-x2rs3vab.js";
94
+ } from "./index-y3nprgn7.js";
95
95
  import {
96
96
  template2,
97
97
  html2
98
- } from "./index-js199er4.js";
98
+ } from "./index-g1drdx7k.js";
99
99
  import {
100
100
  useAccordionContext2,
101
101
  useAccordionItemContext2,
@@ -103,6 +103,13 @@ import {
103
103
  AccordionTrigger2,
104
104
  AccordionContent2,
105
105
  Accordion2,
106
+ BottomBarAction2,
107
+ BottomBarBadge2,
108
+ useBottomBarContext2,
109
+ BottomBarItem2,
110
+ BottomBarRoot2,
111
+ BottomBarSeparator2,
112
+ BottomBar2,
106
113
  CommandDialog2,
107
114
  useCommandContext2,
108
115
  CommandInput2,
@@ -145,12 +152,12 @@ import {
145
152
  ToastDescription2,
146
153
  ToastClose2,
147
154
  Toast2
148
- } from "./index-b5wc752a.js";
155
+ } from "./index-aagpn02x.js";
149
156
  import {
150
157
  createVirtualizer2,
151
158
  VirtualList2,
152
159
  VirtualGrid2
153
- } from "./index-8czhpea8.js";
160
+ } from "./index-x6whpv54.js";
154
161
  import {
155
162
  ChartContext2,
156
163
  useChartContext2,
@@ -172,7 +179,7 @@ import {
172
179
  Line2,
173
180
  Pie2,
174
181
  ChartTooltip2
175
- } from "./index-dyvgtp43.js";
182
+ } from "./index-9bez1tmf.js";
176
183
  import {
177
184
  createId2,
178
185
  createControllableSignal2,
@@ -191,7 +198,7 @@ import {
191
198
  Tooltip3,
192
199
  SwitchThumb2,
193
200
  Switch2
194
- } from "./index-8x8xz80v.js";
201
+ } from "./index-b7emqmej.js";
195
202
  import {
196
203
  ERROR_CODE_TO_STATUS2,
197
204
  STATUS_TO_ERROR_CODE2,
@@ -221,7 +228,7 @@ import {
221
228
  createMutation2,
222
229
  createQuery2,
223
230
  createInfiniteQuery2
224
- } from "./index-y9bq7h9g.js";
231
+ } from "./index-5jhzwtdz.js";
225
232
  import {
226
233
  hashString2,
227
234
  getScopeId2,
@@ -234,19 +241,19 @@ import {
234
241
  css2,
235
242
  useStyle2,
236
243
  Style2
237
- } from "./index-0madxn60.js";
244
+ } from "./index-enc8cmea.js";
238
245
  import {
239
246
  Stack2,
240
247
  Row2,
241
248
  Center2,
242
249
  Grid2,
243
250
  Spacer2
244
- } from "./index-1xtrtz1t.js";
251
+ } from "./index-dmhmde2z.js";
245
252
  import {
246
253
  createResource2,
247
254
  Suspense2,
248
255
  ErrorBoundary2
249
- } from "./index-a4xns6cc.js";
256
+ } from "./index-65j7a9et.js";
250
257
  export {
251
258
  Accordion2 as Accordion,
252
259
  AccordionContent2 as AccordionContent,
@@ -254,6 +261,12 @@ export {
254
261
  AccordionTrigger2 as AccordionTrigger,
255
262
  Area2 as Area,
256
263
  Bar2 as Bar,
264
+ BottomBar2 as BottomBar,
265
+ BottomBarAction2 as BottomBarAction,
266
+ BottomBarBadge2 as BottomBarBadge,
267
+ BottomBarItem2 as BottomBarItem,
268
+ BottomBarRoot2 as BottomBarRoot,
269
+ BottomBarSeparator2 as BottomBarSeparator,
257
270
  CartesianGrid2 as CartesianGrid,
258
271
  Center2 as Center,
259
272
  Chart2 as Chart,
@@ -441,6 +454,7 @@ export {
441
454
  unwrapStore2 as unwrapStore,
442
455
  useAccordionContext2 as useAccordionContext,
443
456
  useAccordionItemContext2 as useAccordionItemContext,
457
+ useBottomBarContext2 as useBottomBarContext,
444
458
  useChartContext2 as useChartContext,
445
459
  useCommandContext2 as useCommandContext,
446
460
  useContext2 as useContext,
@@ -3,10 +3,10 @@ import {
3
3
  jsx2,
4
4
  jsxs2,
5
5
  jsxDEV2
6
- } from "../index-9fvarkrx.js";
7
- import"../index-5s255b3w.js";
8
- import"../index-a4xns6cc.js";
9
- import"../index-6kfe1nr4.js";
6
+ } from "../index-3y73zgbk.js";
7
+ import"../index-xby428n5.js";
8
+ import"../index-65j7a9et.js";
9
+ import"../index-1yhbg34h.js";
10
10
  export {
11
11
  Fragment2 as Fragment,
12
12
  jsx2 as jsx,
@@ -21,9 +21,9 @@ import {
21
21
  createMutation2,
22
22
  createQuery2,
23
23
  createInfiniteQuery2
24
- } from "../index-y9bq7h9g.js";
25
- import"../index-a4xns6cc.js";
26
- import"../index-6kfe1nr4.js";
24
+ } from "../index-5jhzwtdz.js";
25
+ import"../index-65j7a9et.js";
26
+ import"../index-1yhbg34h.js";
27
27
  export {
28
28
  FocusManager2 as FocusManager,
29
29
  Mutation2 as Mutation,
@@ -7,13 +7,13 @@ import {
7
7
  useNavigate2,
8
8
  useParams2,
9
9
  useSearchParams2
10
- } from "../index-grhdtcb5.js";
11
- import"../index-9fvarkrx.js";
10
+ } from "../index-0qat98zs.js";
11
+ import"../index-3y73zgbk.js";
12
12
  import {
13
13
  lazy2
14
- } from "../index-5s255b3w.js";
15
- import"../index-a4xns6cc.js";
16
- import"../index-6kfe1nr4.js";
14
+ } from "../index-xby428n5.js";
15
+ import"../index-65j7a9et.js";
16
+ import"../index-1yhbg34h.js";
17
17
  export {
18
18
  Link2 as Link,
19
19
  Route2 as Route,
package/dist/rpc/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  query3,
6
6
  mutation3,
7
7
  subscription3
8
- } from "../index-df5e614s.js";
8
+ } from "../index-awcrz19g.js";
9
9
  import {
10
10
  ERROR_CODE_TO_STATUS2,
11
11
  STATUS_TO_ERROR_CODE2,
@@ -19,9 +19,9 @@ import {
19
19
  validateWithSchema2,
20
20
  v2
21
21
  } from "../index-2zz0g2n2.js";
22
- import"../index-y9bq7h9g.js";
23
- import"../index-a4xns6cc.js";
24
- import"../index-6kfe1nr4.js";
22
+ import"../index-5jhzwtdz.js";
23
+ import"../index-65j7a9et.js";
24
+ import"../index-1yhbg34h.js";
25
25
  export {
26
26
  ERROR_CODE_TO_STATUS2 as ERROR_CODE_TO_STATUS,
27
27
  RPCError2 as RPCError,
@@ -3,8 +3,8 @@ import {
3
3
  renderChildToString2,
4
4
  renderToString2,
5
5
  renderToStream2
6
- } from "../index-x2rs3vab.js";
7
- import"../index-6kfe1nr4.js";
6
+ } from "../index-y3nprgn7.js";
7
+ import"../index-1yhbg34h.js";
8
8
  export {
9
9
  hydrate2 as hydrate,
10
10
  renderChildToString2 as renderChildToString,
@@ -24,7 +24,7 @@ import {
24
24
  createStore2,
25
25
  mutateStore2,
26
26
  unwrapStore2
27
- } from "../index-6kfe1nr4.js";
27
+ } from "../index-1yhbg34h.js";
28
28
  export {
29
29
  COMPUTED_BRAND2 as COMPUTED_BRAND,
30
30
  Computed2 as Computed,
@@ -14,6 +14,8 @@ export declare function setCurrentScope(scope: any): void;
14
14
  export declare function getCurrentScope(): any;
15
15
  export declare function addPendingEffect(eff: any): void;
16
16
  export declare function removePendingEffect(eff: any): void;
17
+ export declare function getBatchDepth(): number;
18
+ export declare function getIsFlushing(): boolean;
17
19
  export declare function flushEffects(): void;
18
20
  /**
19
21
  * Batch multiple signal mutations so downstreams and effects update synchronously once at completion.
@@ -16,9 +16,9 @@ import {
16
16
  radius2,
17
17
  glass2,
18
18
  formatStyleProp2
19
- } from "../index-6kfe1nr4.js";
20
- import"../index-5s255b3w.js";
21
- import"../index-9fvarkrx.js";
19
+ } from "../index-1yhbg34h.js";
20
+ import"../index-xby428n5.js";
21
+ import"../index-3y73zgbk.js";
22
22
  import {
23
23
  hashString2,
24
24
  getScopeId2,
@@ -32,15 +32,15 @@ import {
32
32
  css2,
33
33
  useStyle2,
34
34
  Style2
35
- } from "../index-0madxn60.js";
35
+ } from "../index-enc8cmea.js";
36
36
  import {
37
37
  Stack2,
38
38
  Row2,
39
39
  Center2,
40
40
  Grid2,
41
41
  Spacer2
42
- } from "../index-1xtrtz1t.js";
43
- import"../index-a4xns6cc.js";
42
+ } from "../index-dmhmde2z.js";
43
+ import"../index-65j7a9et.js";
44
44
  export {
45
45
  Center2 as Center,
46
46
  DIMENSION_KEYWORDS2 as DIMENSION_KEYWORDS,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  template2,
3
3
  html2
4
- } from "../index-js199er4.js";
5
- import"../index-6kfe1nr4.js";
4
+ } from "../index-g1drdx7k.js";
5
+ import"../index-1yhbg34h.js";
6
6
  export {
7
7
  html2 as html,
8
8
  template2 as template
@@ -0,0 +1,3 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { BottomBarActionProps } from "./types";
3
+ export declare function BottomBarAction(props: BottomBarActionProps): Child;
@@ -0,0 +1,3 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { BottomBarBadgeProps } from "./types";
3
+ export declare function BottomBarBadge(props: BottomBarBadgeProps): Child;
@@ -0,0 +1,3 @@
1
+ import type { BottomBarContextValue } from "./types";
2
+ export declare const BottomBarContext: import("../..").Context<BottomBarContextValue | null>;
3
+ export declare function useBottomBarContext(): BottomBarContextValue | null;
@@ -0,0 +1,19 @@
1
+ import { BottomBarAction } from "./action";
2
+ import { BottomBarBadge } from "./badge";
3
+ import { BottomBarItem } from "./item";
4
+ import { BottomBarRoot } from "./root";
5
+ import { BottomBarSeparator } from "./separator";
6
+ export { BottomBarAction } from "./action";
7
+ export { BottomBarBadge } from "./badge";
8
+ export { BottomBarContext, useBottomBarContext } from "./context";
9
+ export { BottomBarItem } from "./item";
10
+ export { BottomBarRoot } from "./root";
11
+ export { BottomBarSeparator } from "./separator";
12
+ export type { BottomBarActionProps, BottomBarBadgeProps, BottomBarContextValue, BottomBarItemConfig, BottomBarItemProps, BottomBarProps, BottomBarSeparatorProps } from "./types";
13
+ export declare const BottomBar: typeof BottomBarRoot & {
14
+ Root: typeof BottomBarRoot;
15
+ Item: typeof BottomBarItem;
16
+ Action: typeof BottomBarAction;
17
+ Badge: typeof BottomBarBadge;
18
+ Separator: typeof BottomBarSeparator;
19
+ };
@@ -0,0 +1,3 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { BottomBarItemProps } from "./types";
3
+ export declare function BottomBarItem(props: BottomBarItemProps): Child;
@@ -0,0 +1,3 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { BottomBarProps } from "./types";
3
+ export declare function BottomBarRoot(props: BottomBarProps): Child;
@@ -0,0 +1,3 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { BottomBarSeparatorProps } from "./types";
3
+ export declare function BottomBarSeparator(props: BottomBarSeparatorProps): Child;
@@ -0,0 +1,72 @@
1
+ import type { Child } from "../../dom/render";
2
+ import type { ReadonlySignal } from "../../signals";
3
+ export interface BottomBarContextValue {
4
+ value: ReadonlySignal<string>;
5
+ setValue: (value: string) => void;
6
+ baseId: string;
7
+ variant: "floating" | "docked";
8
+ }
9
+ export interface BottomBarItemConfig {
10
+ value: string;
11
+ label?: Child | (() => Child);
12
+ icon?: Child | (() => Child);
13
+ badge?: Child | number | string | (() => Child | number | string | undefined);
14
+ disabled?: boolean | (() => boolean);
15
+ onClick?: (e: MouseEvent) => void;
16
+ class?: any;
17
+ style?: any;
18
+ }
19
+ export interface BottomBarProps {
20
+ value?: () => string | undefined;
21
+ defaultValue?: string;
22
+ onValueChange?: (value: string) => void;
23
+ variant?: "floating" | "docked";
24
+ hideOnScroll?: boolean;
25
+ scrollThreshold?: number;
26
+ items?: BottomBarItemConfig[];
27
+ itemClass?: any;
28
+ itemStyle?: any;
29
+ as?: string;
30
+ class?: any;
31
+ style?: any;
32
+ children?: Child | (() => Child);
33
+ [key: string]: any;
34
+ }
35
+ export interface BottomBarItemProps {
36
+ value: string;
37
+ icon?: Child | (() => Child);
38
+ label?: Child | (() => Child);
39
+ badge?: Child | number | string | (() => Child | number | string | undefined);
40
+ disabled?: boolean | (() => boolean);
41
+ onClick?: (e: MouseEvent) => void;
42
+ as?: string;
43
+ class?: any;
44
+ style?: any;
45
+ children?: Child | (() => Child);
46
+ [key: string]: any;
47
+ }
48
+ export interface BottomBarActionProps {
49
+ icon?: Child | (() => Child);
50
+ label?: string;
51
+ disabled?: boolean | (() => boolean);
52
+ onClick?: (e: MouseEvent) => void;
53
+ as?: string;
54
+ class?: any;
55
+ style?: any;
56
+ children?: Child | (() => Child);
57
+ [key: string]: any;
58
+ }
59
+ export interface BottomBarBadgeProps {
60
+ count?: Child | number | string | (() => Child | number | string | undefined);
61
+ as?: string;
62
+ class?: any;
63
+ style?: any;
64
+ children?: Child | (() => Child);
65
+ [key: string]: any;
66
+ }
67
+ export interface BottomBarSeparatorProps {
68
+ as?: string;
69
+ class?: any;
70
+ style?: any;
71
+ [key: string]: any;
72
+ }
@@ -1,4 +1,5 @@
1
1
  export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, useAccordionContext, useAccordionItemContext } from "./accordion";
2
+ export { BottomBar, BottomBarAction, type BottomBarActionProps, BottomBarBadge, type BottomBarBadgeProps, type BottomBarContextValue, BottomBarItem, type BottomBarItemConfig, type BottomBarItemProps, type BottomBarProps, BottomBarRoot, BottomBarSeparator, type BottomBarSeparatorProps, useBottomBarContext } from "./bottom-bar";
2
3
  export { Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, useCommandContext } from "./command";
3
4
  export { type ColumnDef, DataTable, type DataTableProps, type SortDirection, type SortState } from "./data-table";
4
5
  export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, useDialogContext } from "./dialog";
package/dist/ui/index.js CHANGED
@@ -5,6 +5,13 @@ import {
5
5
  AccordionTrigger2,
6
6
  AccordionContent2,
7
7
  Accordion2,
8
+ BottomBarAction2,
9
+ BottomBarBadge2,
10
+ useBottomBarContext2,
11
+ BottomBarItem2,
12
+ BottomBarRoot2,
13
+ BottomBarSeparator2,
14
+ BottomBar2,
8
15
  CommandDialog2,
9
16
  useCommandContext2,
10
17
  CommandInput2,
@@ -47,7 +54,7 @@ import {
47
54
  ToastDescription2,
48
55
  ToastClose2,
49
56
  Toast2
50
- } from "../index-b5wc752a.js";
57
+ } from "../index-aagpn02x.js";
51
58
  import {
52
59
  createId2,
53
60
  createControllableSignal2,
@@ -66,23 +73,29 @@ import {
66
73
  Tooltip3,
67
74
  SwitchThumb2,
68
75
  Switch2
69
- } from "../index-8x8xz80v.js";
76
+ } from "../index-b7emqmej.js";
70
77
  import {
71
78
  Stack2,
72
79
  Row2,
73
80
  Center2,
74
81
  Grid2,
75
82
  Spacer2
76
- } from "../index-1xtrtz1t.js";
77
- import"../index-9fvarkrx.js";
78
- import"../index-5s255b3w.js";
79
- import"../index-a4xns6cc.js";
80
- import"../index-6kfe1nr4.js";
83
+ } from "../index-dmhmde2z.js";
84
+ import"../index-3y73zgbk.js";
85
+ import"../index-xby428n5.js";
86
+ import"../index-65j7a9et.js";
87
+ import"../index-1yhbg34h.js";
81
88
  export {
82
89
  Accordion2 as Accordion,
83
90
  AccordionContent2 as AccordionContent,
84
91
  AccordionItem2 as AccordionItem,
85
92
  AccordionTrigger2 as AccordionTrigger,
93
+ BottomBar2 as BottomBar,
94
+ BottomBarAction2 as BottomBarAction,
95
+ BottomBarBadge2 as BottomBarBadge,
96
+ BottomBarItem2 as BottomBarItem,
97
+ BottomBarRoot2 as BottomBarRoot,
98
+ BottomBarSeparator2 as BottomBarSeparator,
86
99
  Center2 as Center,
87
100
  Command2 as Command,
88
101
  CommandDialog2 as CommandDialog,
@@ -142,6 +155,7 @@ export {
142
155
  trapFocus2 as trapFocus,
143
156
  useAccordionContext2 as useAccordionContext,
144
157
  useAccordionItemContext2 as useAccordionItemContext,
158
+ useBottomBarContext2 as useBottomBarContext,
145
159
  useCommandContext2 as useCommandContext,
146
160
  useDialogContext2 as useDialogContext,
147
161
  useDropdownMenuContext2 as useDropdownMenuContext,
@@ -2,11 +2,11 @@ import {
2
2
  createVirtualizer2,
3
3
  VirtualList2,
4
4
  VirtualGrid2
5
- } from "../index-8czhpea8.js";
6
- import"../index-9fvarkrx.js";
7
- import"../index-5s255b3w.js";
8
- import"../index-a4xns6cc.js";
9
- import"../index-6kfe1nr4.js";
5
+ } from "../index-x6whpv54.js";
6
+ import"../index-3y73zgbk.js";
7
+ import"../index-xby428n5.js";
8
+ import"../index-65j7a9et.js";
9
+ import"../index-1yhbg34h.js";
10
10
  export {
11
11
  VirtualGrid2 as VirtualGrid,
12
12
  VirtualList2 as VirtualList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch32/visage",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Lightning-fast, zero-VDOM, fine-grained reactive UI library with full TypeScript support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,4 +1,13 @@
1
- import { effect, getActiveScope, onCleanup, runInScope, Scope, untrack } from "../signals";
1
+ import {
2
+ effect,
3
+ getActiveScope,
4
+ onCleanup,
5
+ runInScope,
6
+ Scope,
7
+ signal,
8
+ untrack,
9
+ type WritableSignal
10
+ } from "../signals";
2
11
  import { type Child, insertChild, type ReactiveValue, resolveValue } from "./render";
3
12
 
4
13
  export interface ShowProps<T> {
@@ -120,7 +129,7 @@ interface ItemRecord<T> {
120
129
  item: T;
121
130
  scope: Scope;
122
131
  nodes: Node[];
123
- indexSignal: (val?: number) => number;
132
+ indexSignal: WritableSignal<number>;
124
133
  }
125
134
 
126
135
  /**
@@ -206,32 +215,31 @@ export function For<T>(props: ForProps<T>): any {
206
215
  if (!parent) return;
207
216
 
208
217
  const newItems: ItemRecord<T>[] = [];
209
- const prevMap = new Map<T, ItemRecord<T>>();
218
+ const prevMap = new Map<T, ItemRecord<T>[]>();
210
219
 
211
220
  for (const rec of items) {
212
- prevMap.set(rec.item, rec);
221
+ const group = prevMap.get(rec.item);
222
+ if (group) {
223
+ group.push(rec);
224
+ } else {
225
+ prevMap.set(rec.item, [rec]);
226
+ }
213
227
  }
214
228
 
215
229
  // Fast-path: map existing or create new item scopes
216
230
  for (let i = 0; i < list.length; i++) {
217
231
  const item = list[i]!;
218
- const existing = prevMap.get(item);
232
+ const existingGroup = prevMap.get(item);
233
+ const existing =
234
+ existingGroup && existingGroup.length > 0 ? existingGroup.shift() : undefined;
219
235
 
220
236
  if (existing) {
221
- existing.indexSignal(i);
237
+ untrack(() => {
238
+ existing.indexSignal.set(i);
239
+ });
222
240
  newItems.push(existing);
223
- prevMap.delete(item);
224
241
  } else {
225
- let indexVal = i;
226
- const indexSubscribers = new Set<() => void>();
227
- const indexSignal = (...args: [number?]): number => {
228
- if (args.length > 0 && args[0] !== undefined && args[0] !== indexVal) {
229
- indexVal = args[0];
230
- for (const sub of Array.from(indexSubscribers)) sub();
231
- }
232
- return indexVal;
233
- };
234
-
242
+ const indexSignal = signal(i, { internal: true });
235
243
  const itemScope = new Scope(getActiveScope());
236
244
  let itemNodes: Node[] = [];
237
245
 
@@ -254,10 +262,12 @@ export function For<T>(props: ForProps<T>): any {
254
262
  }
255
263
 
256
264
  // Clean up removed items
257
- for (const [, removed] of prevMap) {
258
- removed.scope.dispose();
259
- for (const node of removed.nodes) {
260
- if (node.parentNode) node.parentNode.removeChild(node);
265
+ for (const [, remainingGroup] of prevMap) {
266
+ for (const removed of remainingGroup) {
267
+ removed.scope.dispose();
268
+ for (const node of removed.nodes) {
269
+ if (node.parentNode) node.parentNode.removeChild(node);
270
+ }
261
271
  }
262
272
  }
263
273