@elaraai/east-ui 1.0.34 → 1.0.36

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 (111) hide show
  1. package/dist/src/charts/chart/index.d.ts +8 -0
  2. package/dist/src/charts/chart/index.d.ts.map +1 -1
  3. package/dist/src/charts/chart/index.js +3 -3
  4. package/dist/src/charts/chart/index.js.map +1 -1
  5. package/dist/src/charts/spec/index.d.ts +11 -0
  6. package/dist/src/charts/spec/index.d.ts.map +1 -1
  7. package/dist/src/charts/spec/index.js +1 -0
  8. package/dist/src/charts/spec/index.js.map +1 -1
  9. package/dist/src/charts/spec/types.d.ts +2 -0
  10. package/dist/src/charts/spec/types.d.ts.map +1 -1
  11. package/dist/src/charts/spec/types.js +2 -0
  12. package/dist/src/charts/spec/types.js.map +1 -1
  13. package/dist/src/component.d.ts +61 -0
  14. package/dist/src/component.d.ts.map +1 -1
  15. package/dist/src/component.js +35 -0
  16. package/dist/src/component.js.map +1 -1
  17. package/dist/src/index.d.ts +3 -3
  18. package/dist/src/index.d.ts.map +1 -1
  19. package/dist/src/index.js +3 -3
  20. package/dist/src/index.js.map +1 -1
  21. package/dist/src/internal.d.ts +4 -3
  22. package/dist/src/internal.d.ts.map +1 -1
  23. package/dist/src/internal.js +3 -2
  24. package/dist/src/internal.js.map +1 -1
  25. package/dist/src/layout/dock/index.d.ts +144 -0
  26. package/dist/src/layout/dock/index.d.ts.map +1 -0
  27. package/dist/src/layout/dock/index.js +150 -0
  28. package/dist/src/layout/dock/index.js.map +1 -0
  29. package/dist/src/layout/dock/types.d.ts +133 -0
  30. package/dist/src/layout/dock/types.d.ts.map +1 -0
  31. package/dist/src/layout/dock/types.js +70 -0
  32. package/dist/src/layout/dock/types.js.map +1 -0
  33. package/dist/src/layout/index.d.ts +1 -0
  34. package/dist/src/layout/index.d.ts.map +1 -1
  35. package/dist/src/layout/index.js +1 -0
  36. package/dist/src/layout/index.js.map +1 -1
  37. package/dist/src/navigation/index.d.ts +1 -1
  38. package/dist/src/navigation/index.d.ts.map +1 -1
  39. package/dist/src/navigation/index.js +1 -1
  40. package/dist/src/navigation/index.js.map +1 -1
  41. package/dist/src/navigation/pages/index.d.ts +44 -8
  42. package/dist/src/navigation/pages/index.d.ts.map +1 -1
  43. package/dist/src/navigation/pages/index.js +44 -7
  44. package/dist/src/navigation/pages/index.js.map +1 -1
  45. package/dist/src/overlays/drawer/index.d.ts +2 -0
  46. package/dist/src/overlays/drawer/index.d.ts.map +1 -1
  47. package/dist/src/overlays/drawer/index.js +4 -1
  48. package/dist/src/overlays/drawer/index.js.map +1 -1
  49. package/dist/src/overlays/drawer/types.d.ts +8 -0
  50. package/dist/src/overlays/drawer/types.d.ts.map +1 -1
  51. package/dist/src/overlays/drawer/types.js +4 -0
  52. package/dist/src/overlays/drawer/types.js.map +1 -1
  53. package/dist/src/reactive/match.d.ts +85 -0
  54. package/dist/src/reactive/match.d.ts.map +1 -0
  55. package/dist/src/reactive/match.js +65 -0
  56. package/dist/src/reactive/match.js.map +1 -0
  57. package/dist/src/runtime/layout/dock.d.ts +53 -0
  58. package/dist/src/runtime/layout/dock.d.ts.map +1 -0
  59. package/dist/src/runtime/layout/dock.js +51 -0
  60. package/dist/src/runtime/layout/dock.js.map +1 -0
  61. package/dist/src/runtime/layout/index.d.ts +1 -0
  62. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  63. package/dist/src/runtime/layout/index.js +1 -0
  64. package/dist/src/runtime/layout/index.js.map +1 -1
  65. package/dist/src/runtime/navigation/index.d.ts +1 -0
  66. package/dist/src/runtime/navigation/index.d.ts.map +1 -1
  67. package/dist/src/runtime/navigation/index.js +1 -0
  68. package/dist/src/runtime/navigation/index.js.map +1 -1
  69. package/dist/src/runtime/navigation/route.d.ts +46 -0
  70. package/dist/src/runtime/navigation/route.d.ts.map +1 -0
  71. package/dist/src/runtime/navigation/route.js +47 -0
  72. package/dist/src/runtime/navigation/route.js.map +1 -0
  73. package/dist/src/runtime/reactive/index.d.ts +1 -0
  74. package/dist/src/runtime/reactive/index.d.ts.map +1 -1
  75. package/dist/src/runtime/reactive/index.js +1 -0
  76. package/dist/src/runtime/reactive/index.js.map +1 -1
  77. package/dist/src/runtime/reactive/match.d.ts +51 -0
  78. package/dist/src/runtime/reactive/match.d.ts.map +1 -0
  79. package/dist/src/runtime/reactive/match.js +49 -0
  80. package/dist/src/runtime/reactive/match.js.map +1 -0
  81. package/dist/test/charts/chart.examples.js +3 -3
  82. package/dist/test/charts/chart.examples.js.map +1 -1
  83. package/dist/test/layout/aligned-stack.examples.d.ts +17 -0
  84. package/dist/test/layout/aligned-stack.examples.d.ts.map +1 -1
  85. package/dist/test/layout/aligned-stack.examples.js +49 -2
  86. package/dist/test/layout/aligned-stack.examples.js.map +1 -1
  87. package/dist/test/layout/dock.examples.d.ts +34 -0
  88. package/dist/test/layout/dock.examples.d.ts.map +1 -0
  89. package/dist/test/layout/dock.examples.js +77 -0
  90. package/dist/test/layout/dock.examples.js.map +1 -0
  91. package/dist/test/navigation/index.d.ts +1 -0
  92. package/dist/test/navigation/index.d.ts.map +1 -1
  93. package/dist/test/navigation/index.js +1 -0
  94. package/dist/test/navigation/index.js.map +1 -1
  95. package/dist/test/navigation/route.examples.d.ts +13 -0
  96. package/dist/test/navigation/route.examples.d.ts.map +1 -0
  97. package/dist/test/navigation/route.examples.js +69 -0
  98. package/dist/test/navigation/route.examples.js.map +1 -0
  99. package/dist/test/overlays/drawer.examples.d.ts +1 -0
  100. package/dist/test/overlays/drawer.examples.d.ts.map +1 -1
  101. package/dist/test/overlays/drawer.examples.js +46 -0
  102. package/dist/test/overlays/drawer.examples.js.map +1 -1
  103. package/dist/test/reactive/index.d.ts +7 -0
  104. package/dist/test/reactive/index.d.ts.map +1 -0
  105. package/dist/test/reactive/index.js +7 -0
  106. package/dist/test/reactive/index.js.map +1 -0
  107. package/dist/test/reactive/match.examples.d.ts +16 -0
  108. package/dist/test/reactive/match.examples.d.ts.map +1 -0
  109. package/dist/test/reactive/match.examples.js +77 -0
  110. package/dist/test/reactive/match.examples.js.map +1 -0
  111. package/package.json +3 -3
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { type ExprType, type SubtypeExprOrValue, ArrayType, BooleanType, FunctionType, NullType, OptionType, StructType } from "@elaraai/east";
6
+ import { UIComponentType } from "../../component.js";
7
+ import { DockStyleType, type DockOptions } from "./types.js";
8
+ export { DockStyleType, DockOrientationType, DockSideType, DockPersistType, type DockStyle, type DockOptions, } from "./types.js";
9
+ /**
10
+ * Concrete struct mirroring the inline `Dock` variant in `component.ts`.
11
+ * Renderers reference this for `equalFor` / `ValueTypeOf`.
12
+ *
13
+ * @property body - The expanded content (UIComps) — kept mounted across collapse by default
14
+ * @property collapsed - Collapsed state (synced on change; omit for uncontrolled toggling)
15
+ * @property defaultCollapsed - Uncontrolled initial collapsed state
16
+ * @property onCollapsedChange - Callback invoked with the new collapsed state
17
+ * @property style - Presentation + behaviour sub-struct
18
+ */
19
+ export declare const DockType: StructType<{
20
+ body: ArrayType<UIComponentType>;
21
+ collapsed: OptionType<BooleanType>;
22
+ defaultCollapsed: OptionType<BooleanType>;
23
+ onCollapsedChange: OptionType<FunctionType<[BooleanType], NullType>>;
24
+ style: OptionType<DockStyleType>;
25
+ }>;
26
+ export type DockType = typeof DockType;
27
+ /**
28
+ * Creates a Dock — an inline panel that collapses along one axis to a compact
29
+ * icon rail and expands back to its full content, without leaving the
30
+ * document flow (siblings reflow; it never overlays).
31
+ *
32
+ * @param children - The expanded content (UIComps)
33
+ * @param options - Optional collapsed-state / behaviour / presentation fields
34
+ * @returns An East expression representing the Dock component
35
+ *
36
+ * @remarks
37
+ * The in-flow, collapse-to-rail sibling of `Expandable` (which does the
38
+ * opposite — a CSS takeover that fills the app container). A Dock stays an
39
+ * ordinary flex child: collapsed, it shrinks to `railSize` and the freed
40
+ * space is reclaimed by its siblings — so it can sit beside a drop target (a
41
+ * `Planner`, a board) and tuck away without covering it. Arbitrarily nestable;
42
+ * each dock keyed by its own structural storage key. Drive it from state with
43
+ * `collapsed` + `onCollapsedChange`, or omit both for uncontrolled toggling
44
+ * (optionally `persist`ed). Distinct from the disclosure `Collapsible`
45
+ * (trigger + content show/hide) and `Dialog` / `Drawer` (portalled overlays).
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * import { East } from "@elaraai/east";
50
+ * import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
51
+ *
52
+ * const sidebar = East.function([], UIComponentType, _$ =>
53
+ * Dock.Root(
54
+ * [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
55
+ * { icon: "book", label: "Bookings", expandedSize: "25%" },
56
+ * ),
57
+ * );
58
+ * ```
59
+ */
60
+ declare function createDock(children: SubtypeExprOrValue<ArrayType<UIComponentType>>, options?: DockOptions): ExprType<UIComponentType>;
61
+ /**
62
+ * Dock primitive — an inline panel that collapses along an axis to an icon
63
+ * rail, staying in the document flow.
64
+ *
65
+ * @remarks
66
+ * Use `Dock.Root(children, opts)`. Types are exposed via `Dock.Types`.
67
+ */
68
+ export declare const Dock: {
69
+ /**
70
+ * Creates a Dock component.
71
+ *
72
+ * @param children - The expanded content (UIComps)
73
+ * @param options - Optional collapsed-state / behaviour / presentation fields
74
+ * @returns An East expression representing the Dock component
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * import { East } from "@elaraai/east";
79
+ * import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
80
+ *
81
+ * const ex = East.function([], UIComponentType, _$ =>
82
+ * Dock.Root(
83
+ * [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
84
+ * { icon: "book", label: "Bookings", expandedSize: "25%" },
85
+ * ),
86
+ * );
87
+ * ```
88
+ */
89
+ readonly Root: typeof createDock;
90
+ readonly Types: {
91
+ /**
92
+ * The concrete East type for Dock — mirrors the inline `Dock` variant
93
+ * in `component.ts`.
94
+ */
95
+ readonly Dock: StructType<{
96
+ body: ArrayType<UIComponentType>;
97
+ collapsed: OptionType<BooleanType>;
98
+ defaultCollapsed: OptionType<BooleanType>;
99
+ onCollapsedChange: OptionType<FunctionType<[BooleanType], NullType>>;
100
+ style: OptionType<DockStyleType>;
101
+ }>;
102
+ /** Presentation + behaviour config struct for Dock. */
103
+ readonly Style: StructType<{
104
+ readonly orientation: OptionType<import("@elaraai/east").VariantType<{
105
+ readonly horizontal: NullType;
106
+ readonly vertical: NullType;
107
+ }>>;
108
+ readonly side: OptionType<import("@elaraai/east").VariantType<{
109
+ readonly start: NullType;
110
+ readonly end: NullType;
111
+ }>>;
112
+ readonly expandedSize: OptionType<import("@elaraai/east").StringType>;
113
+ readonly railSize: OptionType<import("@elaraai/east").StringType>;
114
+ readonly icon: OptionType<import("@elaraai/east").StringType>;
115
+ readonly label: OptionType<import("@elaraai/east").StringType>;
116
+ readonly badge: OptionType<import("@elaraai/east").StringType>;
117
+ readonly persist: OptionType<import("@elaraai/east").VariantType<{
118
+ readonly none: NullType;
119
+ readonly local: NullType;
120
+ readonly session: NullType;
121
+ }>>;
122
+ readonly keepMounted: OptionType<BooleanType>;
123
+ readonly lazy: OptionType<BooleanType>;
124
+ readonly animated: OptionType<BooleanType>;
125
+ }>;
126
+ /** Collapse-axis variant (`horizontal` / `vertical`). */
127
+ readonly Orientation: import("@elaraai/east").VariantType<{
128
+ readonly horizontal: NullType;
129
+ readonly vertical: NullType;
130
+ }>;
131
+ /** Rail-edge variant (`start` / `end`). */
132
+ readonly Side: import("@elaraai/east").VariantType<{
133
+ readonly start: NullType;
134
+ readonly end: NullType;
135
+ }>;
136
+ /** Persistence variant (`none` / `local` / `session`). */
137
+ readonly Persist: import("@elaraai/east").VariantType<{
138
+ readonly none: NullType;
139
+ readonly local: NullType;
140
+ readonly session: NullType;
141
+ }>;
142
+ };
143
+ };
144
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1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AC,WAAW,CAAC;8BAChB,UAAU,CAAC,WAAW,CAAC;+BACtB,UAAU,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;mBAC7D,UAAU,CAAC,aAAa,CAAC;;QAkI5B,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;QAEvD,yDAAyD;;;;;QAEzD,2CAA2C;;;;;QAE3C,0DAA0D;;;;;;;CAGxD,CAAC"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { East, ArrayType, BooleanType, FunctionType, NullType, OptionType, StructType, variant, some, none, } from "@elaraai/east";
6
+ import { UIComponentType } from "../../component.js";
7
+ import { DockStyleType, DockOrientationType, DockSideType, DockPersistType, } from "./types.js";
8
+ // Re-export types
9
+ export { DockStyleType, DockOrientationType, DockSideType, DockPersistType, } from "./types.js";
10
+ // ============================================================================
11
+ // DockType — standalone mirror of the inline `Dock` variant
12
+ // ============================================================================
13
+ /**
14
+ * Concrete struct mirroring the inline `Dock` variant in `component.ts`.
15
+ * Renderers reference this for `equalFor` / `ValueTypeOf`.
16
+ *
17
+ * @property body - The expanded content (UIComps) — kept mounted across collapse by default
18
+ * @property collapsed - Collapsed state (synced on change; omit for uncontrolled toggling)
19
+ * @property defaultCollapsed - Uncontrolled initial collapsed state
20
+ * @property onCollapsedChange - Callback invoked with the new collapsed state
21
+ * @property style - Presentation + behaviour sub-struct
22
+ */
23
+ export const DockType = StructType({
24
+ body: ArrayType(UIComponentType),
25
+ collapsed: OptionType(BooleanType),
26
+ defaultCollapsed: OptionType(BooleanType),
27
+ onCollapsedChange: OptionType(FunctionType([BooleanType], NullType)),
28
+ style: OptionType(DockStyleType),
29
+ });
30
+ // ============================================================================
31
+ // Dock Factory
32
+ // ============================================================================
33
+ /** Resolve a variant string shorthand (or pass a value/expression through). */
34
+ function orientationValue(v) {
35
+ return typeof v === "string" ? East.value(variant(v, null), DockOrientationType) : v;
36
+ }
37
+ function sideValue(v) {
38
+ return typeof v === "string" ? East.value(variant(v, null), DockSideType) : v;
39
+ }
40
+ function persistValue(v) {
41
+ return typeof v === "string" ? East.value(variant(v, null), DockPersistType) : v;
42
+ }
43
+ /**
44
+ * Creates a Dock — an inline panel that collapses along one axis to a compact
45
+ * icon rail and expands back to its full content, without leaving the
46
+ * document flow (siblings reflow; it never overlays).
47
+ *
48
+ * @param children - The expanded content (UIComps)
49
+ * @param options - Optional collapsed-state / behaviour / presentation fields
50
+ * @returns An East expression representing the Dock component
51
+ *
52
+ * @remarks
53
+ * The in-flow, collapse-to-rail sibling of `Expandable` (which does the
54
+ * opposite — a CSS takeover that fills the app container). A Dock stays an
55
+ * ordinary flex child: collapsed, it shrinks to `railSize` and the freed
56
+ * space is reclaimed by its siblings — so it can sit beside a drop target (a
57
+ * `Planner`, a board) and tuck away without covering it. Arbitrarily nestable;
58
+ * each dock keyed by its own structural storage key. Drive it from state with
59
+ * `collapsed` + `onCollapsedChange`, or omit both for uncontrolled toggling
60
+ * (optionally `persist`ed). Distinct from the disclosure `Collapsible`
61
+ * (trigger + content show/hide) and `Dialog` / `Drawer` (portalled overlays).
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { East } from "@elaraai/east";
66
+ * import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
67
+ *
68
+ * const sidebar = East.function([], UIComponentType, _$ =>
69
+ * Dock.Root(
70
+ * [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
71
+ * { icon: "book", label: "Bookings", expandedSize: "25%" },
72
+ * ),
73
+ * );
74
+ * ```
75
+ */
76
+ function createDock(children, options) {
77
+ const hasStyle = options !== undefined && (options.orientation !== undefined || options.side !== undefined
78
+ || options.expandedSize !== undefined || options.railSize !== undefined
79
+ || options.icon !== undefined || options.label !== undefined || options.badge !== undefined
80
+ || options.persist !== undefined || options.keepMounted !== undefined
81
+ || options.lazy !== undefined || options.animated !== undefined);
82
+ const styleValue = hasStyle
83
+ ? East.value({
84
+ orientation: options.orientation !== undefined ? some(orientationValue(options.orientation)) : none,
85
+ side: options.side !== undefined ? some(sideValue(options.side)) : none,
86
+ expandedSize: options.expandedSize !== undefined ? some(options.expandedSize) : none,
87
+ railSize: options.railSize !== undefined ? some(options.railSize) : none,
88
+ icon: options.icon !== undefined ? some(options.icon) : none,
89
+ label: options.label !== undefined ? some(options.label) : none,
90
+ badge: options.badge !== undefined ? some(options.badge) : none,
91
+ persist: options.persist !== undefined ? some(persistValue(options.persist)) : none,
92
+ keepMounted: options.keepMounted !== undefined ? some(options.keepMounted) : none,
93
+ lazy: options.lazy !== undefined ? some(options.lazy) : none,
94
+ animated: options.animated !== undefined ? some(options.animated) : none,
95
+ }, DockStyleType)
96
+ : undefined;
97
+ return East.value(variant("Dock", {
98
+ body: children,
99
+ collapsed: options?.collapsed !== undefined ? some(options.collapsed) : none,
100
+ defaultCollapsed: options?.defaultCollapsed !== undefined ? some(options.defaultCollapsed) : none,
101
+ onCollapsedChange: options?.onCollapsedChange ? some(options.onCollapsedChange) : none,
102
+ style: styleValue ? some(styleValue) : none,
103
+ }), UIComponentType);
104
+ }
105
+ /**
106
+ * Dock primitive — an inline panel that collapses along an axis to an icon
107
+ * rail, staying in the document flow.
108
+ *
109
+ * @remarks
110
+ * Use `Dock.Root(children, opts)`. Types are exposed via `Dock.Types`.
111
+ */
112
+ export const Dock = {
113
+ /**
114
+ * Creates a Dock component.
115
+ *
116
+ * @param children - The expanded content (UIComps)
117
+ * @param options - Optional collapsed-state / behaviour / presentation fields
118
+ * @returns An East expression representing the Dock component
119
+ *
120
+ * @example
121
+ * ```ts
122
+ * import { East } from "@elaraai/east";
123
+ * import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
124
+ *
125
+ * const ex = East.function([], UIComponentType, _$ =>
126
+ * Dock.Root(
127
+ * [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
128
+ * { icon: "book", label: "Bookings", expandedSize: "25%" },
129
+ * ),
130
+ * );
131
+ * ```
132
+ */
133
+ Root: createDock,
134
+ Types: {
135
+ /**
136
+ * The concrete East type for Dock — mirrors the inline `Dock` variant
137
+ * in `component.ts`.
138
+ */
139
+ Dock: DockType,
140
+ /** Presentation + behaviour config struct for Dock. */
141
+ Style: DockStyleType,
142
+ /** Collapse-axis variant (`horizontal` / `vertical`). */
143
+ Orientation: DockOrientationType,
144
+ /** Rail-edge variant (`start` / `end`). */
145
+ Side: DockSideType,
146
+ /** Persistence variant (`none` / `local` / `session`). */
147
+ Persist: DockPersistType,
148
+ },
149
+ };
150
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/layout/dock/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACH,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAGlB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAGlB,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,4DAA4D;AAC5D,+EAA+E;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAMhB,UAAU,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC,eAAe,CAAC;IAChC,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC;IAClC,gBAAgB,EAAE,UAAU,CAAC,WAAW,CAAC;IACzC,iBAAiB,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,QAAQ,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,aAAa;QACpB,yDAAyD;QACzD,WAAW,EAAE,mBAAmB;QAChC,2CAA2C;QAC3C,IAAI,EAAE,YAAY;QAClB,0DAA0D;QAC1D,OAAO,EAAE,eAAe;KAC3B;CACK,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { type SubtypeExprOrValue, BooleanType, FunctionType, NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
6
+ /**
7
+ * The axis a {@link DockStyleType} collapses along.
8
+ *
9
+ * @property horizontal - Collapses its width to a vertical rail (a sidebar)
10
+ * @property vertical - Collapses its height to a horizontal rail (a tray)
11
+ */
12
+ export declare const DockOrientationType: VariantType<{
13
+ readonly horizontal: NullType;
14
+ readonly vertical: NullType;
15
+ }>;
16
+ export type DockOrientationType = typeof DockOrientationType;
17
+ /**
18
+ * Which edge the collapsed rail pins to — also sets the toggle chevron
19
+ * direction.
20
+ *
21
+ * @property start - Leading edge (left when horizontal, top when vertical)
22
+ * @property end - Trailing edge (right when horizontal, bottom when vertical)
23
+ */
24
+ export declare const DockSideType: VariantType<{
25
+ readonly start: NullType;
26
+ readonly end: NullType;
27
+ }>;
28
+ export type DockSideType = typeof DockSideType;
29
+ /**
30
+ * Where the uncontrolled collapsed state is persisted, keyed by the dock's
31
+ * structural storage key.
32
+ *
33
+ * @property none - Not persisted (resets on reload)
34
+ * @property local - `localStorage` (survives reload + browser restart)
35
+ * @property session - `sessionStorage` (survives reload, cleared with the tab)
36
+ */
37
+ export declare const DockPersistType: VariantType<{
38
+ readonly none: NullType;
39
+ readonly local: NullType;
40
+ readonly session: NullType;
41
+ }>;
42
+ export type DockPersistType = typeof DockPersistType;
43
+ /**
44
+ * Presentation + behaviour configuration for a Dock. Every field optional;
45
+ * the renderer falls back to a horizontal sidebar that pins to the `start`
46
+ * edge, `44px` rail, keep-mounted body.
47
+ *
48
+ * @property orientation - Axis it collapses along (default `horizontal`)
49
+ * @property side - Edge the rail pins to → chevron direction (default `start`)
50
+ * @property expandedSize - Size ALONG the axis when expanded (px or %, e.g. `"25%"`)
51
+ * @property railSize - Size when collapsed — the icon rail (default `44px`)
52
+ * @property icon - Font Awesome icon name shown on the rail + header
53
+ * @property label - Header title (expanded) + rail tooltip / accessible name (collapsed)
54
+ * @property badge - Optional count/label shown on the rail + header
55
+ * @property persist - Where the uncontrolled collapsed state is persisted (default `none`)
56
+ * @property keepMounted - Keep the body mounted while collapsed to preserve its scroll / drag / search state (default `true`)
57
+ * @property lazy - Mount the body only on first expand (default `false`)
58
+ * @property animated - Smoothly transition the size between rail and expanded (default `false`)
59
+ */
60
+ export declare const DockStyleType: StructType<{
61
+ readonly orientation: OptionType<VariantType<{
62
+ readonly horizontal: NullType;
63
+ readonly vertical: NullType;
64
+ }>>;
65
+ readonly side: OptionType<VariantType<{
66
+ readonly start: NullType;
67
+ readonly end: NullType;
68
+ }>>;
69
+ readonly expandedSize: OptionType<StringType>;
70
+ readonly railSize: OptionType<StringType>;
71
+ readonly icon: OptionType<StringType>;
72
+ readonly label: OptionType<StringType>;
73
+ readonly badge: OptionType<StringType>;
74
+ readonly persist: OptionType<VariantType<{
75
+ readonly none: NullType;
76
+ readonly local: NullType;
77
+ readonly session: NullType;
78
+ }>>;
79
+ readonly keepMounted: OptionType<BooleanType>;
80
+ readonly lazy: OptionType<BooleanType>;
81
+ readonly animated: OptionType<BooleanType>;
82
+ }>;
83
+ export type DockStyleType = typeof DockStyleType;
84
+ /** String shorthand for {@link DockOrientationType}. */
85
+ export type DockOrientationLiteral = "horizontal" | "vertical";
86
+ /** String shorthand for {@link DockSideType}. */
87
+ export type DockSideLiteral = "start" | "end";
88
+ /** String shorthand for {@link DockPersistType}. */
89
+ export type DockPersistLiteral = "none" | "local" | "session";
90
+ /**
91
+ * TypeScript style interface for {@link DockStyleType} — the flat config bag.
92
+ */
93
+ export interface DockStyle {
94
+ /** Axis it collapses along (default `horizontal`). */
95
+ orientation?: SubtypeExprOrValue<DockOrientationType> | DockOrientationLiteral;
96
+ /** Edge the rail pins to → chevron direction (default `start`). */
97
+ side?: SubtypeExprOrValue<DockSideType> | DockSideLiteral;
98
+ /** Size along the axis when expanded (px or %, e.g. `"25%"`). */
99
+ expandedSize?: SubtypeExprOrValue<StringType>;
100
+ /** Size when collapsed — the icon rail (default `44px`). */
101
+ railSize?: SubtypeExprOrValue<StringType>;
102
+ /** Font Awesome icon name shown on the rail + header. */
103
+ icon?: SubtypeExprOrValue<StringType>;
104
+ /** Header title (expanded) + rail tooltip / accessible name (collapsed). */
105
+ label?: SubtypeExprOrValue<StringType>;
106
+ /** Optional count/label shown on the rail + header. */
107
+ badge?: SubtypeExprOrValue<StringType>;
108
+ /** Where the uncontrolled collapsed state is persisted (default `none`). */
109
+ persist?: SubtypeExprOrValue<DockPersistType> | DockPersistLiteral;
110
+ /** Keep the body mounted while collapsed to preserve its state (default `true`). */
111
+ keepMounted?: SubtypeExprOrValue<BooleanType>;
112
+ /** Mount the body only on first expand (default `false`). */
113
+ lazy?: SubtypeExprOrValue<BooleanType>;
114
+ /** Smoothly transition the size between rail and expanded (default `false`). */
115
+ animated?: SubtypeExprOrValue<BooleanType>;
116
+ }
117
+ /**
118
+ * Dock options — passed to `Dock.Root(children, opts)`. Extends
119
+ * {@link DockStyle} with the collapsed-state behaviour fields.
120
+ */
121
+ export interface DockOptions extends DockStyle {
122
+ /**
123
+ * Collapsed state. Synced on change (forms convention), so a
124
+ * `State.bind`-driven value controls the dock reactively; omit for
125
+ * uncontrolled toggling via the built-in control.
126
+ */
127
+ collapsed?: SubtypeExprOrValue<BooleanType>;
128
+ /** Uncontrolled initial collapsed state (default `false`). */
129
+ defaultCollapsed?: SubtypeExprOrValue<BooleanType>;
130
+ /** Callback invoked with the new collapsed state when the user toggles. */
131
+ onCollapsedChange?: SubtypeExprOrValue<FunctionType<[BooleanType], NullType>>;
132
+ }
133
+ //# sourceMappingURL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AA4D;IAC5D,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,yDAAyD;IACzD,IAAI,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACtC,4EAA4E;IAC5E,KAAK,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvC,uDAAuD;IACvD,KAAK,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvC,4EAA4E;IAC5E,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAAC;IACnE,oFAAoF;IACpF,WAAW,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC9C,6DAA6D;IAC7D,IAAI,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACvC,gFAAgF;IAChF,QAAQ,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC5C,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACnD,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;CACjF"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { BooleanType, FunctionType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
6
+ /**
7
+ * The axis a {@link DockStyleType} collapses along.
8
+ *
9
+ * @property horizontal - Collapses its width to a vertical rail (a sidebar)
10
+ * @property vertical - Collapses its height to a horizontal rail (a tray)
11
+ */
12
+ export const DockOrientationType = VariantType({
13
+ horizontal: NullType,
14
+ vertical: NullType,
15
+ });
16
+ /**
17
+ * Which edge the collapsed rail pins to — also sets the toggle chevron
18
+ * direction.
19
+ *
20
+ * @property start - Leading edge (left when horizontal, top when vertical)
21
+ * @property end - Trailing edge (right when horizontal, bottom when vertical)
22
+ */
23
+ export const DockSideType = VariantType({
24
+ start: NullType,
25
+ end: NullType,
26
+ });
27
+ /**
28
+ * Where the uncontrolled collapsed state is persisted, keyed by the dock's
29
+ * structural storage key.
30
+ *
31
+ * @property none - Not persisted (resets on reload)
32
+ * @property local - `localStorage` (survives reload + browser restart)
33
+ * @property session - `sessionStorage` (survives reload, cleared with the tab)
34
+ */
35
+ export const DockPersistType = VariantType({
36
+ none: NullType,
37
+ local: NullType,
38
+ session: NullType,
39
+ });
40
+ /**
41
+ * Presentation + behaviour configuration for a Dock. Every field optional;
42
+ * the renderer falls back to a horizontal sidebar that pins to the `start`
43
+ * edge, `44px` rail, keep-mounted body.
44
+ *
45
+ * @property orientation - Axis it collapses along (default `horizontal`)
46
+ * @property side - Edge the rail pins to → chevron direction (default `start`)
47
+ * @property expandedSize - Size ALONG the axis when expanded (px or %, e.g. `"25%"`)
48
+ * @property railSize - Size when collapsed — the icon rail (default `44px`)
49
+ * @property icon - Font Awesome icon name shown on the rail + header
50
+ * @property label - Header title (expanded) + rail tooltip / accessible name (collapsed)
51
+ * @property badge - Optional count/label shown on the rail + header
52
+ * @property persist - Where the uncontrolled collapsed state is persisted (default `none`)
53
+ * @property keepMounted - Keep the body mounted while collapsed to preserve its scroll / drag / search state (default `true`)
54
+ * @property lazy - Mount the body only on first expand (default `false`)
55
+ * @property animated - Smoothly transition the size between rail and expanded (default `false`)
56
+ */
57
+ export const DockStyleType = StructType({
58
+ orientation: OptionType(DockOrientationType),
59
+ side: OptionType(DockSideType),
60
+ expandedSize: OptionType(StringType),
61
+ railSize: OptionType(StringType),
62
+ icon: OptionType(StringType),
63
+ label: OptionType(StringType),
64
+ badge: OptionType(StringType),
65
+ persist: OptionType(DockPersistType),
66
+ keepMounted: OptionType(BooleanType),
67
+ lazy: OptionType(BooleanType),
68
+ animated: OptionType(BooleanType),
69
+ });
70
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/layout/dock/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;CACrB,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;IACpC,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,QAAQ;CAChB,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;CACpB,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACpC,WAAW,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAC5C,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9B,YAAY,EAAE,UAAU,CAAC,UAAU,CAAC;IACpC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAChC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;IAC5B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC;IACpC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IACpC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;CACpC,CAAC,CAAC"}
@@ -12,4 +12,5 @@ export { Splitter } from "./splitter/index.js";
12
12
  export { Sticky } from "./sticky/index.js";
13
13
  export { ScrollArea } from "./scroll-area/index.js";
14
14
  export { Expandable } from "./expandable/index.js";
15
+ export { Dock } from "./dock/index.js";
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
@@ -12,4 +12,5 @@ export { Splitter } from "./splitter/index.js";
12
12
  export { Sticky } from "./sticky/index.js";
13
13
  export { ScrollArea } from "./scroll-area/index.js";
14
14
  export { Expandable } from "./expandable/index.js";
15
+ export { Dock } from "./dock/index.js";
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export { Breadcrumb } from "./breadcrumb/index.js";
6
6
  export { NavList, NavListType, NavSectionType, NavItemType, type NavListStyle, type NavSectionInput, type NavItemInput, } from "./nav-list/index.js";
7
- export { Navigation, Pages, NavBindHandleType, navBindPlatformFn, NavBindPrimitives, routeVariantType, type NavRoutes, type NavRouteConfig, type NavConfig, type RouteVariantOf, type NavHandleType, type BoundNav, type PageConstructors, type PagesHandlers, type PagesInput, } from "./pages/index.js";
7
+ export { Navigation, Pages, Route, NavBindHandleType, navBindPlatformFn, NavBindPrimitives, routeVariantType, type NavRoutes, type NavRouteConfig, type NavConfig, type RouteVariantOf, type NavHandleType, type BoundNav, type PageConstructors, type PagesHandlers, type PagesInput, type RouteInput, } from "./pages/index.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACH,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,UAAU,EACV,KAAK,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,UAAU,GAClB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACH,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,UAAU,GAClB,MAAM,kBAAkB,CAAC"}
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export { Breadcrumb } from "./breadcrumb/index.js";
6
6
  export { NavList, NavListType, NavSectionType, NavItemType, } from "./nav-list/index.js";
7
- export { Navigation, Pages, NavBindHandleType, navBindPlatformFn, NavBindPrimitives, routeVariantType, } from "./pages/index.js";
7
+ export { Navigation, Pages, Route, NavBindHandleType, navBindPlatformFn, NavBindPrimitives, routeVariantType, } from "./pages/index.js";
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACH,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,GAId,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,UAAU,EACV,KAAK,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GAUnB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACH,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,GAId,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GAWnB,MAAM,kBAAkB,CAAC"}
@@ -101,14 +101,6 @@ export interface PagesInput<R extends NavRoutes> {
101
101
  * Build a `<Pages>` content-switcher from a bound nav handle + a typed page
102
102
  * registry.
103
103
  *
104
- * The nullary `render` reads `current()` on the **passed** handle (no internal
105
- * re-bind) and `match`es the active route to its page body. The bodies live in
106
- * the match arms (in the IR), so the manifest walk collects every page's binds
107
- * (the union) while only the matched arm executes — the renderer mounts just
108
- * the active page (leaf-only, visible-only). The render closes over `nav`, so
109
- * its `current()` read subscribes to the same store the app's handle is bound
110
- * to (#114).
111
- *
112
104
  * @param input - The {@link PagesInput} (`nav` handle + `pages` registry).
113
105
  * @returns A `Pages` `UIComponentType` value.
114
106
  */
@@ -126,4 +118,48 @@ export declare const Pages: {
126
118
  /** Build a `<Pages>` content-switcher from `{ nav, pages }`. See {@link createPages}. */
127
119
  readonly Root: typeof createPages;
128
120
  };
121
+ /**
122
+ * The input to the `<Route>` slot: the nav handle (bound once in the enclosing
123
+ * `<Reactive>` via `Navigation.bind`, shared with the body `<Pages>` and the
124
+ * chrome) plus the typed route registry — one body per route, receiving
125
+ * `($, payload, nav)` exactly like {@link PagesHandlers}.
126
+ *
127
+ * @remarks
128
+ * `R` is fixed by `nav`, so every `routes` handler is contextually typed and
129
+ * the registry is exhaustive against the `Navigation.config`.
130
+ */
131
+ export interface RouteInput<R extends NavRoutes> {
132
+ /** The nav handle from `Navigation.bind(config, key, initial)`, bound in the enclosing `<Reactive>`. */
133
+ nav: BoundNav<R>;
134
+ /** One body per route — see {@link PagesHandlers}. `R` is fixed by `nav`, so the handlers are contextually typed. */
135
+ routes: PagesHandlers<NoInfer<R>>;
136
+ }
137
+ /**
138
+ * Build a `<Route>` hosting slot from a bound nav handle + a typed route
139
+ * registry — `<Pages>` generalized to any slot.
140
+ *
141
+ * Renders only the active route's body and remounts it on navigation, but is
142
+ * placeable anywhere (a header widget, a sidebar, a drawer body). The body
143
+ * `<Pages>` and any number of `<Route>` slots bind the **same** `nav` handle,
144
+ * so they stay in lockstep and each remounts *its own* slot on navigation.
145
+ *
146
+ * @param input - The {@link RouteInput} (`nav` handle + `routes` registry).
147
+ * @returns A `Route` `UIComponentType` value.
148
+ */
149
+ declare function createRoute<R extends NavRoutes>({ nav, routes }: RouteInput<R>): ExprType<typeof UIComponentType>;
150
+ /**
151
+ * The `Route` namespace — the nav-typed hosting slot.
152
+ *
153
+ * @remarks
154
+ * Authored as the `<Route nav={…} routes={{…}} />` tag; `Route.Root({ nav,
155
+ * routes })` is the underlying factory. Use it to swap a **stateful**
156
+ * component (its own `<Reactive>` / binds) in any slot by route: each case is
157
+ * a self-contained component built with the existing binds, torn down and
158
+ * rebuilt fresh when the route changes. For a non-route key (a `State`-bound
159
+ * mode, a tagged selection), use `<Match on cases>` instead.
160
+ */
161
+ export declare const Route: {
162
+ /** Build a `<Route>` hosting slot from `{ nav, routes }`. See {@link createRoute}. */
163
+ readonly Root: typeof createRoute;
164
+ };
129
165
  //# sourceMappingURL=index.d.ts.map