@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.
- package/dist/src/charts/chart/index.d.ts +8 -0
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +3 -3
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/charts/spec/index.d.ts +11 -0
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/charts/spec/index.js +1 -0
- package/dist/src/charts/spec/index.js.map +1 -1
- package/dist/src/charts/spec/types.d.ts +2 -0
- package/dist/src/charts/spec/types.d.ts.map +1 -1
- package/dist/src/charts/spec/types.js +2 -0
- package/dist/src/charts/spec/types.js.map +1 -1
- package/dist/src/component.d.ts +61 -0
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +35 -0
- package/dist/src/component.js.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +4 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +3 -2
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/dock/index.d.ts +144 -0
- package/dist/src/layout/dock/index.d.ts.map +1 -0
- package/dist/src/layout/dock/index.js +150 -0
- package/dist/src/layout/dock/index.js.map +1 -0
- package/dist/src/layout/dock/types.d.ts +133 -0
- package/dist/src/layout/dock/types.d.ts.map +1 -0
- package/dist/src/layout/dock/types.js +70 -0
- package/dist/src/layout/dock/types.js.map +1 -0
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/navigation/index.d.ts +1 -1
- package/dist/src/navigation/index.d.ts.map +1 -1
- package/dist/src/navigation/index.js +1 -1
- package/dist/src/navigation/index.js.map +1 -1
- package/dist/src/navigation/pages/index.d.ts +44 -8
- package/dist/src/navigation/pages/index.d.ts.map +1 -1
- package/dist/src/navigation/pages/index.js +44 -7
- package/dist/src/navigation/pages/index.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +2 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +4 -1
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +8 -0
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/overlays/drawer/types.js +4 -0
- package/dist/src/overlays/drawer/types.js.map +1 -1
- package/dist/src/reactive/match.d.ts +85 -0
- package/dist/src/reactive/match.d.ts.map +1 -0
- package/dist/src/reactive/match.js +65 -0
- package/dist/src/reactive/match.js.map +1 -0
- package/dist/src/runtime/layout/dock.d.ts +53 -0
- package/dist/src/runtime/layout/dock.d.ts.map +1 -0
- package/dist/src/runtime/layout/dock.js +51 -0
- package/dist/src/runtime/layout/dock.js.map +1 -0
- package/dist/src/runtime/layout/index.d.ts +1 -0
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +1 -0
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/src/runtime/navigation/index.d.ts +1 -0
- package/dist/src/runtime/navigation/index.d.ts.map +1 -1
- package/dist/src/runtime/navigation/index.js +1 -0
- package/dist/src/runtime/navigation/index.js.map +1 -1
- package/dist/src/runtime/navigation/route.d.ts +46 -0
- package/dist/src/runtime/navigation/route.d.ts.map +1 -0
- package/dist/src/runtime/navigation/route.js +47 -0
- package/dist/src/runtime/navigation/route.js.map +1 -0
- package/dist/src/runtime/reactive/index.d.ts +1 -0
- package/dist/src/runtime/reactive/index.d.ts.map +1 -1
- package/dist/src/runtime/reactive/index.js +1 -0
- package/dist/src/runtime/reactive/index.js.map +1 -1
- package/dist/src/runtime/reactive/match.d.ts +51 -0
- package/dist/src/runtime/reactive/match.d.ts.map +1 -0
- package/dist/src/runtime/reactive/match.js +49 -0
- package/dist/src/runtime/reactive/match.js.map +1 -0
- package/dist/test/charts/chart.examples.js +3 -3
- package/dist/test/charts/chart.examples.js.map +1 -1
- package/dist/test/layout/aligned-stack.examples.d.ts +17 -0
- package/dist/test/layout/aligned-stack.examples.d.ts.map +1 -1
- package/dist/test/layout/aligned-stack.examples.js +49 -2
- package/dist/test/layout/aligned-stack.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +34 -0
- package/dist/test/layout/dock.examples.d.ts.map +1 -0
- package/dist/test/layout/dock.examples.js +77 -0
- package/dist/test/layout/dock.examples.js.map +1 -0
- package/dist/test/navigation/index.d.ts +1 -0
- package/dist/test/navigation/index.d.ts.map +1 -1
- package/dist/test/navigation/index.js +1 -0
- package/dist/test/navigation/index.js.map +1 -1
- package/dist/test/navigation/route.examples.d.ts +13 -0
- package/dist/test/navigation/route.examples.d.ts.map +1 -0
- package/dist/test/navigation/route.examples.js +69 -0
- package/dist/test/navigation/route.examples.js.map +1 -0
- package/dist/test/overlays/drawer.examples.d.ts +1 -0
- package/dist/test/overlays/drawer.examples.d.ts.map +1 -1
- package/dist/test/overlays/drawer.examples.js +46 -0
- package/dist/test/overlays/drawer.examples.js.map +1 -1
- package/dist/test/reactive/index.d.ts +7 -0
- package/dist/test/reactive/index.d.ts.map +1 -0
- package/dist/test/reactive/index.js +7 -0
- package/dist/test/reactive/index.js.map +1 -0
- package/dist/test/reactive/match.examples.d.ts +16 -0
- package/dist/test/reactive/match.examples.d.ts.map +1 -0
- package/dist/test/reactive/match.examples.js +77 -0
- package/dist/test/reactive/match.examples.js.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/pages/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAEH,SAAS,EACT,QAAQ,EAGR,KAAK,YAAY,EACjB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AO,MAAM,KAAK;IACd,sFAAsF;;CAEhF,CAAC"}
|
|
@@ -67,8 +67,8 @@ export const Navigation = {
|
|
|
67
67
|
bind: bindNavigation,
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
70
|
+
* Shared switcher builder for `Pages` / `Route` — the two emit the same
|
|
71
|
+
* payload (`render` + `navKey`) under their own variant case.
|
|
72
72
|
*
|
|
73
73
|
* The nullary `render` reads `current()` on the **passed** handle (no internal
|
|
74
74
|
* re-bind) and `match`es the active route to its page body. The bodies live in
|
|
@@ -77,11 +77,8 @@ export const Navigation = {
|
|
|
77
77
|
* the active page (leaf-only, visible-only). The render closes over `nav`, so
|
|
78
78
|
* its `current()` read subscribes to the same store the app's handle is bound
|
|
79
79
|
* to (#114).
|
|
80
|
-
*
|
|
81
|
-
* @param input - The {@link PagesInput} (`nav` handle + `pages` registry).
|
|
82
|
-
* @returns A `Pages` `UIComponentType` value.
|
|
83
80
|
*/
|
|
84
|
-
function
|
|
81
|
+
function createNavSwitcher(caseName, nav, pages) {
|
|
85
82
|
const handlers = pages;
|
|
86
83
|
// Build the match arms in host TS (outside the East block): one arm per
|
|
87
84
|
// route, forwarding the typed payload + the shared handle to the page body.
|
|
@@ -97,7 +94,17 @@ function createPages({ nav, pages }) {
|
|
|
97
94
|
const cur = $.const(nav.current());
|
|
98
95
|
return cur.match(armsFor(nav));
|
|
99
96
|
});
|
|
100
|
-
return East.value(variant(
|
|
97
|
+
return East.value(variant(caseName, { render, navKey: nav.key }), UIComponentType);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Build a `<Pages>` content-switcher from a bound nav handle + a typed page
|
|
101
|
+
* registry.
|
|
102
|
+
*
|
|
103
|
+
* @param input - The {@link PagesInput} (`nav` handle + `pages` registry).
|
|
104
|
+
* @returns A `Pages` `UIComponentType` value.
|
|
105
|
+
*/
|
|
106
|
+
function createPages({ nav, pages }) {
|
|
107
|
+
return createNavSwitcher("Pages", nav, pages);
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
110
|
* The `Pages` namespace — the first-class navigation content-switcher.
|
|
@@ -112,4 +119,34 @@ export const Pages = {
|
|
|
112
119
|
/** Build a `<Pages>` content-switcher from `{ nav, pages }`. See {@link createPages}. */
|
|
113
120
|
Root: createPages,
|
|
114
121
|
};
|
|
122
|
+
/**
|
|
123
|
+
* Build a `<Route>` hosting slot from a bound nav handle + a typed route
|
|
124
|
+
* registry — `<Pages>` generalized to any slot.
|
|
125
|
+
*
|
|
126
|
+
* Renders only the active route's body and remounts it on navigation, but is
|
|
127
|
+
* placeable anywhere (a header widget, a sidebar, a drawer body). The body
|
|
128
|
+
* `<Pages>` and any number of `<Route>` slots bind the **same** `nav` handle,
|
|
129
|
+
* so they stay in lockstep and each remounts *its own* slot on navigation.
|
|
130
|
+
*
|
|
131
|
+
* @param input - The {@link RouteInput} (`nav` handle + `routes` registry).
|
|
132
|
+
* @returns A `Route` `UIComponentType` value.
|
|
133
|
+
*/
|
|
134
|
+
function createRoute({ nav, routes }) {
|
|
135
|
+
return createNavSwitcher("Route", nav, routes);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The `Route` namespace — the nav-typed hosting slot.
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* Authored as the `<Route nav={…} routes={{…}} />` tag; `Route.Root({ nav,
|
|
142
|
+
* routes })` is the underlying factory. Use it to swap a **stateful**
|
|
143
|
+
* component (its own `<Reactive>` / binds) in any slot by route: each case is
|
|
144
|
+
* a self-contained component built with the existing binds, torn down and
|
|
145
|
+
* rebuilt fresh when the route changes. For a non-route key (a `State`-bound
|
|
146
|
+
* mode, a tagged selection), use `<Match on cases>` instead.
|
|
147
|
+
*/
|
|
148
|
+
export const Route = {
|
|
149
|
+
/** Build a `<Route>` hosting slot from `{ nav, routes }`. See {@link createRoute}. */
|
|
150
|
+
Root: createRoute,
|
|
151
|
+
};
|
|
115
152
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/navigation/pages/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EACH,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,UAAU,EACV,OAAO,GAIV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GAInB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GAMnB,MAAM,YAAY,CAAC;AAkBpB,SAAS,oBAAoB,CAAsB,MAAS;IACxD,MAAM,IAAI,GAAmD,EAAE,CAAC;IAChE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAiB,EAAE,EAAE,CAC/B,OAAO,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAA2C,CAAC;IACxG,CAAC;IACD,OAAO,IAA2B,CAAC;AACvC,CAAC;AAsBD,SAAS,eAAe,CAAsB,MAAS;IACnD,OAAO;QACH,MAAM;QACN,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC;KACrC,CAAC;AACN,CAAC;AAED,+EAA+E;AAC/E,kFAAkF;AAClF,+EAA+E;AAE/E;;;;;;;;;;;;GAYG;AACH,SAAS,cAAc,CACnB,MAAoB,EACpB,GAAW,EACX,OAAyD;IAEzD,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,IAAI,CA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C,CAAC,EAAE,EAAE;QACpD,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACnC,OAAQ,GAA0E,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;GAMG;AACH,SAAS,WAAW,CAAsB,EAAE,GAAG,EAAE,KAAK,EAAiB;IACnE,OAAO,iBAAiB,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,yFAAyF;IACzF,IAAI,EAAE,WAAW;CACX,CAAC;AAuBX;;;;;;;;;;;GAWG;AACH,SAAS,WAAW,CAAsB,EAAE,GAAG,EAAE,MAAM,EAAiB;IACpE,OAAO,iBAAiB,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,sFAAsF;IACtF,IAAI,EAAE,WAAW;CACX,CAAC"}
|
|
@@ -236,6 +236,8 @@ export declare const Drawer: {
|
|
|
236
236
|
readonly bodyPadding: OptionType<StringType>;
|
|
237
237
|
readonly flush: OptionType<import("@elaraai/east").BooleanType>;
|
|
238
238
|
readonly fillBody: OptionType<import("@elaraai/east").BooleanType>;
|
|
239
|
+
readonly stacked: OptionType<import("@elaraai/east").BooleanType>;
|
|
240
|
+
readonly stackIcon: OptionType<StringType>;
|
|
239
241
|
}>;
|
|
240
242
|
/**
|
|
241
243
|
* Size variant type for Drawer component.
|
|
@@ -1 +1 @@
|
|
|
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5B,UAAU,CAAC,eAAe,CAAC;;;QA8L9B;;;;;;;;;;;;WAYG;;qBArPE,eAAe;kBAClB,SAAS,CAAC,eAAe,CAAC;qBACvB,UAAU,CAAC,UAAU,CAAC;mBACxB,UAAU,CAAC,UAAU,CAAC;yBAChB,UAAU,CAAC,UAAU,CAAC;mBAC5B,UAAU,CAAC,eAAe,CAAC;;QAkP9B;;;;;;;;;WASG;;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;;;;;;;;WASG;;;;;;;;;QAEH;;;;;;;WAOG;;;;;;;QAEH;;;;;;;;;;;WAWG;;kBA1PD,SAAS,CAAC,eAAe,CAAC;qBACvB,UAAU,CAAC,UAAU,CAAC;mBACxB,UAAU,CAAC,UAAU,CAAC;yBAChB,UAAU,CAAC,UAAU,CAAC;mBAC5B,UAAU,CAAC,eAAe,CAAC;;;CAyP5B,CAAC"}
|
|
@@ -70,7 +70,8 @@ function createDrawer(body, options) {
|
|
|
70
70
|
: undefined;
|
|
71
71
|
const hasStyle = sizeValue || placementValue || style.contained !== undefined ||
|
|
72
72
|
style.onOpenChange !== undefined || style.onExitComplete !== undefined ||
|
|
73
|
-
style.bodyPadding !== undefined || style.flush !== undefined || style.fillBody !== undefined
|
|
73
|
+
style.bodyPadding !== undefined || style.flush !== undefined || style.fillBody !== undefined ||
|
|
74
|
+
style.stacked !== undefined || style.stackIcon !== undefined;
|
|
74
75
|
return East.value(variant("Drawer", {
|
|
75
76
|
trigger: trigger,
|
|
76
77
|
body: body,
|
|
@@ -87,6 +88,8 @@ function createDrawer(body, options) {
|
|
|
87
88
|
bodyPadding: style.bodyPadding !== undefined ? some(style.bodyPadding) : none,
|
|
88
89
|
flush: style.flush !== undefined ? some(style.flush) : none,
|
|
89
90
|
fillBody: style.fillBody !== undefined ? some(style.fillBody) : none,
|
|
91
|
+
stacked: style.stacked !== undefined ? some(style.stacked) : none,
|
|
92
|
+
stackIcon: style.stackIcon !== undefined ? some(style.stackIcon) : none,
|
|
90
93
|
}, DrawerStyleType))
|
|
91
94
|
: none,
|
|
92
95
|
}), UIComponentType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/overlays/drawer/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,UAAU,EAAE,UAAU,EACtB,UAAU,EACV,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,eAAe,EAElB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,eAAe,GAElB,MAAM,YAAY,CAAC;AAGpB,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAOlB,UAAU,CAAC;IACZ,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,SAAS,CAAC,eAAe,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC;IAC/B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC;CACrC,CAAC,CAAC;AAOH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAM3B,UAAU,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC,eAAe,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC;IAC/B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC;CAC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,CAAC,CAAC,CAAC,IAAI;aAC1E,EAAE,eAAe,CAAC,CAAC;YACpB,CAAC,CAAC,IAAI;KACb,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CACpC,aAAa,EACb,CAAC,mBAAmB,CAAC,EACrB,QAAQ,EACR;IACI,QAAQ,EAAE,IAAI;CACjB,CACJ,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,IAAI,EAAE,YAAY;IAClB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE;QACH;;;;;;;;;;;;WAYG;QACH,MAAM,EAAE,UAAU;QAClB;;;;;;;;;WASG;QACH,KAAK,EAAE,eAAe;QACtB;;;;;;;;;WASG;QACH,IAAI,EAAE,cAAc;QACpB;;;;;;;WAOG;QACH,SAAS,EAAE,mBAAmB;QAC9B;;;;;;;;;;;WAWG;QACH,SAAS,EAAE,mBAAmB;KACjC;CACK,CAAC"}
|
|
@@ -77,6 +77,10 @@ export declare const DrawerStyleType: StructType<{
|
|
|
77
77
|
readonly flush: OptionType<BooleanType>;
|
|
78
78
|
/** When `true`, body becomes a definite-height flex column so a single child fills + owns its scroll */
|
|
79
79
|
readonly fillBody: OptionType<BooleanType>;
|
|
80
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it, instead of hiding behind it (#328); clicking the rail pops the stack back to it */
|
|
81
|
+
readonly stacked: OptionType<BooleanType>;
|
|
82
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron */
|
|
83
|
+
readonly stackIcon: OptionType<StringType>;
|
|
80
84
|
}>;
|
|
81
85
|
export type DrawerStyleType = typeof DrawerStyleType;
|
|
82
86
|
/**
|
|
@@ -135,5 +139,9 @@ export interface DrawerStyle {
|
|
|
135
139
|
flush?: SubtypeExprOrValue<BooleanType>;
|
|
136
140
|
/** When `true`, the body is a definite-height flex column (`minHeight:0`, clipped) so a single `height:100%`/`flex:1` child fills the panel and owns its internal scroll instead of the whole panel scrolling. */
|
|
137
141
|
fillBody?: SubtypeExprOrValue<BooleanType>;
|
|
142
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it — instead of hiding behind it — so the stack you drilled through stays a visible, navigable spine (#328). Click the rail to pop back to this drawer (closing the deeper ones); Esc pops one level. */
|
|
143
|
+
stacked?: SubtypeExprOrValue<BooleanType>;
|
|
144
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron. */
|
|
145
|
+
stackIcon?: SubtypeExprOrValue<StringType>;
|
|
138
146
|
}
|
|
139
147
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/overlays/drawer/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACf,MAAM,eAAe,CAAC;AAMvB;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;EAOzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAM1E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAC7D,MAAM,M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,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,sUAAsU;IACtU,OAAO,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC1C,gGAAgG;IAChG,SAAS,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;CAC9C"}
|
|
@@ -70,5 +70,9 @@ export const DrawerStyleType = StructType({
|
|
|
70
70
|
flush: OptionType(BooleanType),
|
|
71
71
|
/** When `true`, body becomes a definite-height flex column so a single child fills + owns its scroll */
|
|
72
72
|
fillBody: OptionType(BooleanType),
|
|
73
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it, instead of hiding behind it (#328); clicking the rail pops the stack back to it */
|
|
74
|
+
stacked: OptionType(BooleanType),
|
|
75
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron */
|
|
76
|
+
stackIcon: OptionType(StringType),
|
|
73
77
|
});
|
|
74
78
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/overlays/drawer/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACf,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACtC,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;CACjB,CAAC,CAAC;AAKH,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAA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AE,QAAQ;CACjB,CAAC,CAAC;AAKH,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;CACnB,CAAC,CAAC;AAKH,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACtC,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC;IAChC,SAAS,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAC1C,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC;IAClC,iDAAiD;IACjD,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC/D,uDAAuD;IACvD,cAAc,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtD,iEAAiE;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,8EAA8E;IAC9E,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IAC9B,wGAAwG;IACxG,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IACjC,oNAAoN;IACpN,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC;IAChC,+FAA+F;IAC/F,SAAS,EAAE,UAAU,CAAC,UAAU,CAAC;CACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* `Match` — the hosting slot over a variant (#333): the component-level twin
|
|
7
|
+
* of `variant.match`.
|
|
8
|
+
*
|
|
9
|
+
* A plain `variant.match(…)` selecting between mounted components reconciles
|
|
10
|
+
* same-shape nodes, so swapping component A → B at one slot keeps A mounted —
|
|
11
|
+
* its nested `Reactive` / bind / scroll / open state persists and the content
|
|
12
|
+
* goes stale. `Match` host-mounts only the active case and **remounts on tag
|
|
13
|
+
* change**: each case is a normal, self-contained component built with the
|
|
14
|
+
* existing binds, torn down and rebuilt fresh per key. Same-tag payload/data
|
|
15
|
+
* churn re-renders without losing mounted state.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import { type BlockBuilder, type EastType, type ExprType, type SubtypeExprOrValue, type VariantType } from "@elaraai/east";
|
|
20
|
+
import { UIComponentType } from "../component.js";
|
|
21
|
+
/**
|
|
22
|
+
* The case registry: one body per variant case, receiving `($, payload)` —
|
|
23
|
+
* the inner block builder and that case's typed payload. Typed from the `on`
|
|
24
|
+
* variant so a wrong payload arg is a compile error; every case must be
|
|
25
|
+
* handled (exhaustive), exactly like `variant.match`.
|
|
26
|
+
*/
|
|
27
|
+
export type MatchCases<C extends {
|
|
28
|
+
[K in string]: EastType;
|
|
29
|
+
}> = {
|
|
30
|
+
[K in keyof C]: ($: BlockBuilder<typeof UIComponentType>, payload: ExprType<C[K]>) => SubtypeExprOrValue<typeof UIComponentType>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The input to the `<Match>` hosting slot: the variant expression selecting
|
|
34
|
+
* the active case, plus the typed case registry.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Taking a **variant** (not a bare string/number key) is what lets the case
|
|
38
|
+
* map be typed + exhaustive — model the choice as a variant (a `State`-bound
|
|
39
|
+
* mode, a selection tagged as a variant) to get it. `C` is fixed by `on`, so
|
|
40
|
+
* every `cases` handler is contextually typed.
|
|
41
|
+
*/
|
|
42
|
+
export interface MatchInput<C extends {
|
|
43
|
+
[K in string]: EastType;
|
|
44
|
+
}> {
|
|
45
|
+
/** The variant expression selecting the active case — its reads are the reactive subscription. */
|
|
46
|
+
on: ExprType<VariantType<C>>;
|
|
47
|
+
/** One body per case — see {@link MatchCases}. `C` is fixed by `on`, so the handlers are contextually typed. */
|
|
48
|
+
cases: MatchCases<NoInfer<C>>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build a `<Match>` hosting slot from a variant expression + a typed case
|
|
52
|
+
* registry.
|
|
53
|
+
*
|
|
54
|
+
* The nullary `render` re-reads `on` and `match`es the active case to its
|
|
55
|
+
* body. The bodies live in the match arms (in the IR), so the manifest walk
|
|
56
|
+
* collects every case's binds (the union) while only the matched arm executes
|
|
57
|
+
* — the renderer mounts just the active case. The `tag` closure re-reads `on`
|
|
58
|
+
* and yields the active case name; the renderer keys the mounted subtree by
|
|
59
|
+
* it, so the active case remounts exactly on tag change.
|
|
60
|
+
*
|
|
61
|
+
* @param input - The {@link MatchInput} (`on` variant + `cases` registry).
|
|
62
|
+
* @returns A `Match` `UIComponentType` value.
|
|
63
|
+
*/
|
|
64
|
+
declare function createMatch<C extends {
|
|
65
|
+
[K in string]: EastType;
|
|
66
|
+
}>({ on, cases }: MatchInput<C>): ExprType<typeof UIComponentType>;
|
|
67
|
+
/**
|
|
68
|
+
* The `Match` namespace — the general hosting slot over a variant.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* Authored as the `<Match on={…} cases={{…}} />` tag; `Match.Root({ on,
|
|
72
|
+
* cases })` is the underlying factory. Use it to swap a **stateful**
|
|
73
|
+
* component (its own `<Reactive>` / binds) at one slot by a reactive key:
|
|
74
|
+
* the active case remounts on tag change. Where the key is a nav route, use
|
|
75
|
+
* `<Route nav routes>` instead — it pins the case map to the
|
|
76
|
+
* `Navigation.config` and hands each body the route payload + nav. For
|
|
77
|
+
* selecting a plain *value* by key (a label, a count), use `variant.match`
|
|
78
|
+
* directly — only mounted subtrees need the hosting slot.
|
|
79
|
+
*/
|
|
80
|
+
export declare const Match: {
|
|
81
|
+
/** Build a `<Match>` hosting slot from `{ on, cases }`. See {@link createMatch}. */
|
|
82
|
+
readonly Root: typeof createMatch;
|
|
83
|
+
};
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../src/reactive/match.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAIH,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS;KAAG,CAAC,IAAI,MAAM,GAAG,QAAQ;CAAE,IAAI;KAC3D,CAAC,IAAI,MAAM,CAAC,GAAG,CACZ,CAAC,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,EACvC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACtB,kBAAkB,CAAC,OAAO,eAAe,CAAC;CAClD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS;KAAG,CAAC,IAAI,MAAM,GAAG,QAAQ;CAAE;IAC7D,kGAAkG;IAClG,EAAE,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,gHAAgH;IAChH,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CACjC;AAED;;;;;;;;;;;;;GAaG;AACH,iBAAS,WAAW,CAAC,CAAC,SAAS;KAAG,CAAC,IAAI,MAAM,GAAG,QAAQ;CAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAY1H;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,KAAK;IACd,oFAAoF;;CAE9E,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* `Match` — the hosting slot over a variant (#333): the component-level twin
|
|
7
|
+
* of `variant.match`.
|
|
8
|
+
*
|
|
9
|
+
* A plain `variant.match(…)` selecting between mounted components reconciles
|
|
10
|
+
* same-shape nodes, so swapping component A → B at one slot keeps A mounted —
|
|
11
|
+
* its nested `Reactive` / bind / scroll / open state persists and the content
|
|
12
|
+
* goes stale. `Match` host-mounts only the active case and **remounts on tag
|
|
13
|
+
* change**: each case is a normal, self-contained component built with the
|
|
14
|
+
* existing binds, torn down and rebuilt fresh per key. Same-tag payload/data
|
|
15
|
+
* churn re-renders without losing mounted state.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import { East, StringType, variant, } from "@elaraai/east";
|
|
20
|
+
import { UIComponentType } from "../component.js";
|
|
21
|
+
/**
|
|
22
|
+
* Build a `<Match>` hosting slot from a variant expression + a typed case
|
|
23
|
+
* registry.
|
|
24
|
+
*
|
|
25
|
+
* The nullary `render` re-reads `on` and `match`es the active case to its
|
|
26
|
+
* body. The bodies live in the match arms (in the IR), so the manifest walk
|
|
27
|
+
* collects every case's binds (the union) while only the matched arm executes
|
|
28
|
+
* — the renderer mounts just the active case. The `tag` closure re-reads `on`
|
|
29
|
+
* and yields the active case name; the renderer keys the mounted subtree by
|
|
30
|
+
* it, so the active case remounts exactly on tag change.
|
|
31
|
+
*
|
|
32
|
+
* @param input - The {@link MatchInput} (`on` variant + `cases` registry).
|
|
33
|
+
* @returns A `Match` `UIComponentType` value.
|
|
34
|
+
*/
|
|
35
|
+
function createMatch({ on, cases }) {
|
|
36
|
+
// The handlers receive ($, payload) — the exact `variant.match` arm shape —
|
|
37
|
+
// so the registry passes straight through as the match arms.
|
|
38
|
+
const render = East.function([], UIComponentType, ($) => {
|
|
39
|
+
const cur = $.const(on);
|
|
40
|
+
return cur.match(cases);
|
|
41
|
+
});
|
|
42
|
+
const tag = East.function([], StringType, ($) => {
|
|
43
|
+
const cur = $.const(on);
|
|
44
|
+
return cur.getTag();
|
|
45
|
+
});
|
|
46
|
+
return East.value(variant("Match", { render, tag }), UIComponentType);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The `Match` namespace — the general hosting slot over a variant.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Authored as the `<Match on={…} cases={{…}} />` tag; `Match.Root({ on,
|
|
53
|
+
* cases })` is the underlying factory. Use it to swap a **stateful**
|
|
54
|
+
* component (its own `<Reactive>` / binds) at one slot by a reactive key:
|
|
55
|
+
* the active case remounts on tag change. Where the key is a nav route, use
|
|
56
|
+
* `<Route nav routes>` instead — it pins the case map to the
|
|
57
|
+
* `Navigation.config` and hands each body the route payload + nav. For
|
|
58
|
+
* selecting a plain *value* by key (a label, a count), use `variant.match`
|
|
59
|
+
* directly — only mounted subtrees need the hosting slot.
|
|
60
|
+
*/
|
|
61
|
+
export const Match = {
|
|
62
|
+
/** Build a `<Match>` hosting slot from `{ on, cases }`. See {@link createMatch}. */
|
|
63
|
+
Root: createMatch,
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../../src/reactive/match.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,IAAI,EACJ,UAAU,EACV,OAAO,GAMV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAgClD;;;;;;;;;;;;;GAaG;AACH,SAAS,WAAW,CAAwC,EAAE,EAAE,EAAE,KAAK,EAAiB;IACpF,4EAA4E;IAC5E,6DAA6D;IAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE;QACpD,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxB,OAAQ,GAA0E,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpG,CAAC,CAAC,CAAC;IACH,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;QAC5C,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxB,OAAQ,GAAqD,CAAC,MAAM,EAAE,CAAC;IAC3E,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,oFAAoF;IACpF,IAAI,EAAE,WAAW;CACX,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* `<Dock>` tag — see the export's JSDoc.
|
|
7
|
+
*/
|
|
8
|
+
import { Dock as DockFactory } from "../../layout/dock/index.js";
|
|
9
|
+
import { type ContainerProps, type JsxTag } from "../combinators.js";
|
|
10
|
+
/**
|
|
11
|
+
* An inline panel that collapses along one axis to a compact icon rail and
|
|
12
|
+
* expands back to its children, without leaving the document flow — siblings
|
|
13
|
+
* reflow to reclaim the freed space; it never overlays. The in-flow,
|
|
14
|
+
* collapse-to-rail sibling of `<Expandable>` (which instead fills the app
|
|
15
|
+
* container). Reach for it when a source panel should tuck away beside the
|
|
16
|
+
* thing it feeds — a `<Library>` drag-source beside a `<Planner>` drop-target,
|
|
17
|
+
* a filter rail beside a board — so the board grows while the panel is stowed
|
|
18
|
+
* and the drop-target is never covered.
|
|
19
|
+
*
|
|
20
|
+
* Collapsed, it shrinks to `railSize` and shows the `icon`, a chevron toggle
|
|
21
|
+
* (pointing away from `side`), and any `badge`; `label` becomes the rail's
|
|
22
|
+
* accessible name. Expanded, it is `expandedSize` along the axis with a header
|
|
23
|
+
* (`icon` + `label` + `badge` + collapse chevron) above the children. Drive it
|
|
24
|
+
* from state with `collapsed` + `onCollapsedChange`, or omit both for
|
|
25
|
+
* uncontrolled toggling — optionally `persist`ed across reloads. It is an
|
|
26
|
+
* ordinary flex child: place it in a `<Flex>` / `<HStack>` (horizontal) or
|
|
27
|
+
* `<VStack>` (vertical) whose sibling is `flex="1" minWidth="0"`. Arbitrarily
|
|
28
|
+
* nestable. Esc does NOT collapse it (it's inline content, not a modal).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
33
|
+
* import { East } from "@elaraai/east";
|
|
34
|
+
* import { Box, Dock, HStack, Planner, Text, UIComponentType } from "@elaraai/east-ui";
|
|
35
|
+
*
|
|
36
|
+
* const board = East.function([], UIComponentType, _$ => (
|
|
37
|
+
* <HStack gap="4" width="100%">
|
|
38
|
+
* <Dock icon="book" label="Bookings" expandedSize="25%">
|
|
39
|
+
* <Box padding="3" background="bg.surface"><Text>Drag source…</Text></Box>
|
|
40
|
+
* </Dock>
|
|
41
|
+
* <Box flex="1" minWidth="0"><Text>Board / drop target…</Text></Box>
|
|
42
|
+
* </HStack>
|
|
43
|
+
* ));
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Carries `Dock.Types` — the East data type and config struct. Desugars to
|
|
48
|
+
* `Dock.Root(children, options)`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const Dock: JsxTag<ContainerProps<typeof DockFactory.Root>> & {
|
|
51
|
+
Types: typeof DockFactory.Types;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=dock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../../../src/runtime/layout/dock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAA;CAC1B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* `<Dock>` tag — see the export's JSDoc.
|
|
7
|
+
*/
|
|
8
|
+
import { Dock as DockFactory } from "../../layout/dock/index.js";
|
|
9
|
+
import { container } from "../combinators.js";
|
|
10
|
+
/**
|
|
11
|
+
* An inline panel that collapses along one axis to a compact icon rail and
|
|
12
|
+
* expands back to its children, without leaving the document flow — siblings
|
|
13
|
+
* reflow to reclaim the freed space; it never overlays. The in-flow,
|
|
14
|
+
* collapse-to-rail sibling of `<Expandable>` (which instead fills the app
|
|
15
|
+
* container). Reach for it when a source panel should tuck away beside the
|
|
16
|
+
* thing it feeds — a `<Library>` drag-source beside a `<Planner>` drop-target,
|
|
17
|
+
* a filter rail beside a board — so the board grows while the panel is stowed
|
|
18
|
+
* and the drop-target is never covered.
|
|
19
|
+
*
|
|
20
|
+
* Collapsed, it shrinks to `railSize` and shows the `icon`, a chevron toggle
|
|
21
|
+
* (pointing away from `side`), and any `badge`; `label` becomes the rail's
|
|
22
|
+
* accessible name. Expanded, it is `expandedSize` along the axis with a header
|
|
23
|
+
* (`icon` + `label` + `badge` + collapse chevron) above the children. Drive it
|
|
24
|
+
* from state with `collapsed` + `onCollapsedChange`, or omit both for
|
|
25
|
+
* uncontrolled toggling — optionally `persist`ed across reloads. It is an
|
|
26
|
+
* ordinary flex child: place it in a `<Flex>` / `<HStack>` (horizontal) or
|
|
27
|
+
* `<VStack>` (vertical) whose sibling is `flex="1" minWidth="0"`. Arbitrarily
|
|
28
|
+
* nestable. Esc does NOT collapse it (it's inline content, not a modal).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
33
|
+
* import { East } from "@elaraai/east";
|
|
34
|
+
* import { Box, Dock, HStack, Planner, Text, UIComponentType } from "@elaraai/east-ui";
|
|
35
|
+
*
|
|
36
|
+
* const board = East.function([], UIComponentType, _$ => (
|
|
37
|
+
* <HStack gap="4" width="100%">
|
|
38
|
+
* <Dock icon="book" label="Bookings" expandedSize="25%">
|
|
39
|
+
* <Box padding="3" background="bg.surface"><Text>Drag source…</Text></Box>
|
|
40
|
+
* </Dock>
|
|
41
|
+
* <Box flex="1" minWidth="0"><Text>Board / drop target…</Text></Box>
|
|
42
|
+
* </HStack>
|
|
43
|
+
* ));
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Carries `Dock.Types` — the East data type and config struct. Desugars to
|
|
48
|
+
* `Dock.Root(children, options)`.
|
|
49
|
+
*/
|
|
50
|
+
export const Dock = Object.assign(container(DockFactory.Root), { Types: DockFactory.Types });
|
|
51
|
+
//# sourceMappingURL=dock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.js","sourceRoot":"","sources":["../../../../src/runtime/layout/dock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAoC,MAAM,mBAAmB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,IAAI,GACb,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { AlignedStack } from "./aligned-stack.js";
|
|
|
10
10
|
export { ScrollArea } from "./scroll-area.js";
|
|
11
11
|
export { Sticky } from "./sticky.js";
|
|
12
12
|
export { Expandable } from "./expandable.js";
|
|
13
|
+
export { Dock } from "./dock.js";
|
|
13
14
|
export { Separator } from "./separator.js";
|
|
14
15
|
export { Grid } from "./grid.js";
|
|
15
16
|
export { Splitter } from "./splitter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8CAA8C;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8CAA8C;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { AlignedStack } from "./aligned-stack.js";
|
|
|
10
10
|
export { ScrollArea } from "./scroll-area.js";
|
|
11
11
|
export { Sticky } from "./sticky.js";
|
|
12
12
|
export { Expandable } from "./expandable.js";
|
|
13
|
+
export { Dock } from "./dock.js";
|
|
13
14
|
export { Separator } from "./separator.js";
|
|
14
15
|
export { Grid } from "./grid.js";
|
|
15
16
|
export { Splitter } from "./splitter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8CAA8C;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8CAA8C;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sDAAsD;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sDAAsD;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sDAAsD;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/navigation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sDAAsD;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
/** Navigation `<Route>` tag — the nav-typed hosting slot (#333). */
|
|
6
|
+
import { type RouteInput } from "../../navigation/pages/index.js";
|
|
7
|
+
import type { NavRoutes } from "../../navigation/pages/types.js";
|
|
8
|
+
import type { UIElement } from "../runtime.js";
|
|
9
|
+
/**
|
|
10
|
+
* Nav-typed hosting slot — `<Pages>` generalized to any slot: renders only the
|
|
11
|
+
* active route's body and **remounts it on navigation**, but is placeable
|
|
12
|
+
* anywhere (a header widget, a sidebar, a drawer body). Bind the nav handle
|
|
13
|
+
* once in the enclosing `<Reactive>` and share it between the body `<Pages>`,
|
|
14
|
+
* the chrome, and any number of `<Route>` slots — they stay in lockstep and
|
|
15
|
+
* each remounts *its own* slot on navigation. Route keys are typed +
|
|
16
|
+
* exhaustive against the `Navigation.config`; each body receives the route's
|
|
17
|
+
* payload + the nav handle. For a non-route key (a `State`-bound mode, a
|
|
18
|
+
* tagged selection), use `<Match on cases>` instead.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
23
|
+
* import { East, NullType, UIComponentType } from "@elaraai/east";
|
|
24
|
+
* import { Navigation, Route, Reactive, Text } from "@elaraai/east-ui";
|
|
25
|
+
*
|
|
26
|
+
* const widget = East.function([], UIComponentType, _$ => {
|
|
27
|
+
* const routes = Navigation.config({ overview: { value: NullType, label: "Overview" } });
|
|
28
|
+
* return (
|
|
29
|
+
* <Reactive>{$ => {
|
|
30
|
+
* const nav = $.let(Navigation.bind(routes, "app.nav", [routes.Page.overview()]));
|
|
31
|
+
* return <Route nav={nav} routes={{ overview: () => <Text>Overview widget</Text> }} />;
|
|
32
|
+
* }}</Reactive>
|
|
33
|
+
* );
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Desugars to `Route.Root({ nav, routes })`. A generic function declaration
|
|
39
|
+
* (merged with the `Route` namespace) so it is a valid generic JSX component.
|
|
40
|
+
*/
|
|
41
|
+
export declare function Route<R extends NavRoutes>(props: RouteInput<R>): UIElement;
|
|
42
|
+
export declare namespace Route {
|
|
43
|
+
/** The underlying factory: `Route.Root({ nav, routes })`. */
|
|
44
|
+
const Root: <R extends NavRoutes>({ nav, routes }: RouteInput<R>) => import("@elaraai/east").ExprType<typeof import("../../component.js").UIComponentType>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../src/runtime/navigation/route.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oEAAoE;AAEpE,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAE1E;AAGD,yBAAiB,KAAK,CAAC;IACnB,6DAA6D;IACtD,MAAM,IAAI,gJAAoB,CAAC;CACzC"}
|