@elaraai/east-ui 1.0.83 → 1.0.85
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 +7 -4
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +3 -1
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +1182 -37
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/index.js +191 -13
- package/dist/src/collections/library/index.js.map +1 -1
- package/dist/src/collections/library/types.d.ts +376 -180
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/library/types.js +188 -91
- package/dist/src/collections/library/types.js.map +1 -1
- package/dist/src/collections/plan/root.d.ts.map +1 -1
- package/dist/src/collections/plan/root.js +10 -37
- package/dist/src/collections/plan/root.js.map +1 -1
- package/dist/src/collections/plan/types.d.ts +1 -1
- package/dist/src/collections/plan/types.js +1 -1
- package/dist/src/collections/sheet/editing-bridge.js +1 -1
- package/dist/src/collections/sheet/editing-bridge.js.map +1 -1
- package/dist/src/collections/sheet/root.d.ts +1 -1
- package/dist/src/collections/sheet/root.js +1 -1
- package/dist/src/collections/sheet/root.js.map +1 -1
- package/dist/src/component.d.ts +490 -11
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +17 -3
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +1 -0
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/editing.d.ts +19 -0
- package/dist/src/contracts/editing.d.ts.map +1 -1
- package/dist/src/contracts/editing.js +31 -1
- package/dist/src/contracts/editing.js.map +1 -1
- package/dist/src/contracts/index.d.ts +1 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/pick.js +4 -4
- package/dist/src/contracts/pick.js.map +1 -1
- package/dist/src/contracts/source.d.ts +87 -131
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js +153 -368
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/display/bar-strip/index.d.ts +39 -6
- package/dist/src/display/bar-strip/index.d.ts.map +1 -1
- package/dist/src/display/bar-strip/index.js +16 -38
- package/dist/src/display/bar-strip/index.js.map +1 -1
- package/dist/src/display/bar-strip/types.d.ts +17 -1
- package/dist/src/display/bar-strip/types.d.ts.map +1 -1
- package/dist/src/display/bar-strip/types.js.map +1 -1
- package/dist/src/feedback/status/index.d.ts +10 -2
- package/dist/src/feedback/status/index.d.ts.map +1 -1
- package/dist/src/feedback/status/index.js +8 -3
- package/dist/src/feedback/status/index.js.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +2 -1
- 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 +58 -16
- package/dist/src/layout/dock/index.d.ts.map +1 -1
- package/dist/src/layout/dock/index.js +48 -13
- package/dist/src/layout/dock/index.js.map +1 -1
- package/dist/src/layout/dock/types.d.ts +62 -10
- package/dist/src/layout/dock/types.d.ts.map +1 -1
- package/dist/src/layout/dock/types.js +21 -4
- package/dist/src/layout/dock/types.js.map +1 -1
- 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/layout/snap-grid/index.d.ts +1291 -0
- package/dist/src/layout/snap-grid/index.d.ts.map +1 -0
- package/dist/src/layout/snap-grid/index.js +510 -0
- package/dist/src/layout/snap-grid/index.js.map +1 -0
- package/dist/src/layout/snap-grid/types.d.ts +1046 -0
- package/dist/src/layout/snap-grid/types.d.ts.map +1 -0
- package/dist/src/layout/snap-grid/types.js +371 -0
- package/dist/src/layout/snap-grid/types.js.map +1 -0
- package/dist/src/navigation/app/index.d.ts +15 -0
- package/dist/src/navigation/app/index.d.ts.map +1 -1
- package/dist/src/navigation/app/index.js +2 -2
- package/dist/src/navigation/app/index.js.map +1 -1
- package/dist/src/navigation/nav-list/index.d.ts +5 -3
- package/dist/src/navigation/nav-list/index.d.ts.map +1 -1
- package/dist/src/navigation/nav-list/index.js +5 -3
- package/dist/src/navigation/nav-list/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts +9 -0
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +11 -1
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/overlays/action-bar/types.d.ts +11 -7
- package/dist/src/overlays/action-bar/types.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/types.js +8 -1
- package/dist/src/overlays/action-bar/types.js.map +1 -1
- package/dist/src/overlays/dialog/index.d.ts +16 -0
- package/dist/src/overlays/dialog/index.d.ts.map +1 -1
- package/dist/src/overlays/dialog/index.js +18 -0
- package/dist/src/overlays/dialog/index.js.map +1 -1
- package/dist/src/overlays/dialog/types.d.ts +18 -11
- package/dist/src/overlays/dialog/types.d.ts.map +1 -1
- package/dist/src/overlays/dialog/types.js +12 -0
- package/dist/src/overlays/dialog/types.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +12 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +14 -0
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +13 -1
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/overlays/drawer/types.js +12 -0
- package/dist/src/overlays/drawer/types.js.map +1 -1
- package/dist/src/overlays/hover-card/index.d.ts +9 -0
- package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/index.js +12 -1
- package/dist/src/overlays/hover-card/index.js.map +1 -1
- package/dist/src/overlays/hover-card/types.d.ts +9 -1
- package/dist/src/overlays/hover-card/types.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/types.js +8 -0
- package/dist/src/overlays/hover-card/types.js.map +1 -1
- package/dist/src/overlays/popover/index.d.ts +15 -0
- package/dist/src/overlays/popover/index.d.ts.map +1 -1
- package/dist/src/overlays/popover/index.js +19 -1
- package/dist/src/overlays/popover/index.js.map +1 -1
- package/dist/src/overlays/popover/types.d.ts +19 -5
- package/dist/src/overlays/popover/types.d.ts.map +1 -1
- package/dist/src/overlays/popover/types.js +14 -0
- package/dist/src/overlays/popover/types.js.map +1 -1
- package/dist/src/overlays/toggle-tip/index.d.ts +9 -0
- package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/index.js +12 -1
- package/dist/src/overlays/toggle-tip/index.js.map +1 -1
- package/dist/src/overlays/toggle-tip/types.d.ts +9 -1
- package/dist/src/overlays/toggle-tip/types.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/types.js +8 -0
- package/dist/src/overlays/toggle-tip/types.js.map +1 -1
- package/dist/src/runtime/collections/library.d.ts +10 -6
- package/dist/src/runtime/collections/library.d.ts.map +1 -1
- package/dist/src/runtime/collections/library.js +10 -6
- package/dist/src/runtime/collections/library.js.map +1 -1
- package/dist/src/runtime/display/bar-strip.d.ts +38 -10
- package/dist/src/runtime/display/bar-strip.d.ts.map +1 -1
- package/dist/src/runtime/display/bar-strip.js +12 -34
- package/dist/src/runtime/display/bar-strip.js.map +1 -1
- package/dist/src/runtime/feedback/status.d.ts +4 -2
- package/dist/src/runtime/feedback/status.d.ts.map +1 -1
- package/dist/src/runtime/feedback/status.js +4 -2
- package/dist/src/runtime/feedback/status.js.map +1 -1
- package/dist/src/runtime/layout/dock.d.ts +13 -8
- package/dist/src/runtime/layout/dock.d.ts.map +1 -1
- package/dist/src/runtime/layout/dock.js +13 -8
- package/dist/src/runtime/layout/dock.js.map +1 -1
- 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/layout/snap-grid.d.ts +68 -0
- package/dist/src/runtime/layout/snap-grid.d.ts.map +1 -0
- package/dist/src/runtime/layout/snap-grid.js +44 -0
- package/dist/src/runtime/layout/snap-grid.js.map +1 -0
- package/dist/src/runtime/navigation/app.d.ts +3 -1
- package/dist/src/runtime/navigation/app.d.ts.map +1 -1
- package/dist/src/runtime/navigation/app.js +3 -1
- package/dist/src/runtime/navigation/app.js.map +1 -1
- package/dist/src/style/typography.d.ts +18 -18
- package/dist/src/style/typography.js +18 -18
- package/dist/test/collections/index.d.ts +0 -1
- package/dist/test/collections/index.d.ts.map +1 -1
- package/dist/test/collections/index.js +0 -1
- package/dist/test/collections/index.js.map +1 -1
- package/dist/test/collections/library.examples.d.ts +28 -0
- package/dist/test/collections/library.examples.d.ts.map +1 -1
- package/dist/test/collections/library.examples.js +183 -3
- package/dist/test/collections/library.examples.js.map +1 -1
- package/dist/test/collections/sheet.examples.d.ts +0 -7
- package/dist/test/collections/sheet.examples.d.ts.map +1 -1
- package/dist/test/collections/sheet.examples.js +4 -31
- package/dist/test/collections/sheet.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +0 -7
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +1 -22
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/display/bar-strip.examples.d.ts +6 -0
- package/dist/test/display/bar-strip.examples.d.ts.map +1 -1
- package/dist/test/display/bar-strip.examples.js +24 -1
- package/dist/test/display/bar-strip.examples.js.map +1 -1
- package/dist/test/feedback/status.examples.d.ts +1 -0
- package/dist/test/feedback/status.examples.d.ts.map +1 -1
- package/dist/test/feedback/status.examples.js +8 -0
- package/dist/test/feedback/status.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +14 -0
- package/dist/test/layout/dock.examples.d.ts.map +1 -1
- package/dist/test/layout/dock.examples.js +35 -0
- package/dist/test/layout/dock.examples.js.map +1 -1
- package/dist/test/layout/snap-grid.examples.d.ts +4 -0
- package/dist/test/layout/snap-grid.examples.d.ts.map +1 -0
- package/dist/test/layout/snap-grid.examples.js +252 -0
- package/dist/test/layout/snap-grid.examples.js.map +1 -0
- package/dist/test/navigation/app.examples.d.ts +6 -0
- package/dist/test/navigation/app.examples.d.ts.map +1 -1
- package/dist/test/navigation/app.examples.js +37 -2
- package/dist/test/navigation/app.examples.js.map +1 -1
- package/dist/test/navigation/nav-list.examples.d.ts +1 -0
- package/dist/test/navigation/nav-list.examples.d.ts.map +1 -1
- package/dist/test/navigation/nav-list.examples.js +21 -1
- package/dist/test/navigation/nav-list.examples.js.map +1 -1
- package/dist/test/overlays/dialog.examples.d.ts +1 -0
- package/dist/test/overlays/dialog.examples.d.ts.map +1 -1
- package/dist/test/overlays/dialog.examples.js +11 -0
- package/dist/test/overlays/dialog.examples.js.map +1 -1
- 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 +12 -0
- package/dist/test/overlays/drawer.examples.js.map +1 -1
- package/dist/test/overlays/hover-card.examples.d.ts +1 -0
- package/dist/test/overlays/hover-card.examples.d.ts.map +1 -1
- package/dist/test/overlays/hover-card.examples.js +10 -0
- package/dist/test/overlays/hover-card.examples.js.map +1 -1
- package/dist/test/overlays/popover.examples.d.ts +1 -0
- package/dist/test/overlays/popover.examples.d.ts.map +1 -1
- package/dist/test/overlays/popover.examples.js +12 -2
- package/dist/test/overlays/popover.examples.js.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.d.ts +1 -0
- package/dist/test/overlays/toggle-tip.examples.d.ts.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.js +11 -1
- package/dist/test/overlays/toggle-tip.examples.js.map +1 -1
- package/package.json +5 -9
- package/dist/test/collections/paged-source.examples.d.ts +0 -14
- package/dist/test/collections/paged-source.examples.d.ts.map +0 -1
- package/dist/test/collections/paged-source.examples.js +0 -252
- package/dist/test/collections/paged-source.examples.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/layout/snap-grid/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACH,SAAS,EACT,QAAQ,EACR,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACd,MAAM,eAAe,CAAC;AAKvB;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;EAI5B,CAAC;AAEH,qDAAqD;AACrD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAEzD,uDAAuD;AACvD,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC;AAEH,8CAA8C;AAC9C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D,yDAAyD;AACzD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAQ9B,CAAC;AAEH,8DAA8D;AAC9D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBjD"}
|
|
@@ -0,0 +1,371 @@
|
|
|
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
|
+
* SnapGrid types — the 12-column snap grid of tiles (#989, #990), the editing
|
|
7
|
+
* canvas's chrome (#995), and the changes (#996) and the Apply (#998) a host
|
|
8
|
+
* asks of it.
|
|
9
|
+
*
|
|
10
|
+
* A cell carries its content — and the editing canvas its toolbar items and
|
|
11
|
+
* panes — and the inline `SnapGrid` arm of `UIComponentType` spells those with
|
|
12
|
+
* the recursion `node` while `SnapGrid.Types.Root` spells them
|
|
13
|
+
* `UIComponentType`. Both are built here, over the content's type
|
|
14
|
+
* ({@link SnapGridRootOf}), so the two are one East type by construction. This
|
|
15
|
+
* file imports no `UIComponentType`, so `component.ts` can import it.
|
|
16
|
+
*/
|
|
17
|
+
import { ArrayType, BlobType, BooleanType, FloatType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
18
|
+
import { DragEventType, LibraryRefType } from "../../contracts/drag.js";
|
|
19
|
+
import { EditingReadinessType, EditingSessionFields } from "../../contracts/editing.js";
|
|
20
|
+
/**
|
|
21
|
+
* Where a cell shorter than its row sits in it.
|
|
22
|
+
*
|
|
23
|
+
* @property top - At the row's top
|
|
24
|
+
* @property center - Centred in the row
|
|
25
|
+
* @property stretch - As tall as the row
|
|
26
|
+
*/
|
|
27
|
+
export const SnapGridAlignType = VariantType({
|
|
28
|
+
top: NullType,
|
|
29
|
+
center: NullType,
|
|
30
|
+
stretch: NullType,
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* How a SnapGrid draws its cells.
|
|
34
|
+
*
|
|
35
|
+
* @property tiles - Each cell's content, in its tile
|
|
36
|
+
* @property wireframe - Each cell an outline at its tile's size, its content
|
|
37
|
+
* not drawn, and with no cells the blank page — the page library's
|
|
38
|
+
* thumbnails, framed by their host
|
|
39
|
+
*/
|
|
40
|
+
export const SnapGridVariantType = VariantType({
|
|
41
|
+
tiles: NullType,
|
|
42
|
+
wireframe: NullType,
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* A change a host asks the editing canvas to make to one tile (#996) — an
|
|
46
|
+
* inspector's edit. The canvas takes it as ONE gesture of its session, by the
|
|
47
|
+
* rules its own handles and drags keep, and writes the `ui` state's `request`
|
|
48
|
+
* back to `none`.
|
|
49
|
+
*
|
|
50
|
+
* @property key - The tile's key
|
|
51
|
+
* @property change - What to change: its `span`, held to what its row has room
|
|
52
|
+
* for; its `row`, counting from 1 — a row past the last, or one already
|
|
53
|
+
* holding its most tiles, is a new row after it; its `height`, `none` for its
|
|
54
|
+
* content's own; or its `align`, written to the field `edit.align` names
|
|
55
|
+
*/
|
|
56
|
+
export const SnapGridRequestType = StructType({
|
|
57
|
+
key: StringType,
|
|
58
|
+
change: VariantType({
|
|
59
|
+
span: IntegerType,
|
|
60
|
+
row: IntegerType,
|
|
61
|
+
height: OptionType(IntegerType),
|
|
62
|
+
align: SnapGridAlignType,
|
|
63
|
+
}),
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* The SnapGrid's interaction state, as a host holds it — the value behind a
|
|
67
|
+
* bound `ui` ({@link SnapGridUiBindType}, #990). Bound, the SnapGrid draws the
|
|
68
|
+
* selection it holds and writes the user's back, so a host selects a tile
|
|
69
|
+
* from outside (an inspector, a list beside the canvas) and reads the one the
|
|
70
|
+
* user chose. A `request` asks the editing canvas for a change (#996), as the
|
|
71
|
+
* Plan's `focus` asks it for a row.
|
|
72
|
+
*
|
|
73
|
+
* @property selected - The selected tile's key (`none` ⇒ nothing selected)
|
|
74
|
+
* @property request - A change asked of the editing canvas ({@link SnapGridRequestType}), taken as one gesture and written back `none`
|
|
75
|
+
*/
|
|
76
|
+
export const SnapGridUiStateType = StructType({
|
|
77
|
+
selected: OptionType(StringType),
|
|
78
|
+
request: OptionType(SnapGridRequestType),
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* A bound {@link SnapGridUiStateType} — exactly `State.bind`'s handle at it, so
|
|
82
|
+
* `State.bind([SnapGrid.Types.UiState], key, SnapGrid.uiState())` passes straight
|
|
83
|
+
* through as a SnapGrid's `ui`.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* Field order is `read` / `write` / `has`: East struct subtyping is exact, so
|
|
87
|
+
* declaring the shape here means a change to `State.bind`'s fails this file's
|
|
88
|
+
* build rather than a canvas's.
|
|
89
|
+
*
|
|
90
|
+
* @property read - The current state
|
|
91
|
+
* @property write - Replace it
|
|
92
|
+
* @property has - Whether the key is set
|
|
93
|
+
*/
|
|
94
|
+
export const SnapGridUiBindType = StructType({
|
|
95
|
+
read: FunctionType([], SnapGridUiStateType),
|
|
96
|
+
write: FunctionType([SnapGridUiStateType], NullType),
|
|
97
|
+
has: FunctionType([], BooleanType),
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* The design width and the zoom the editing canvas draws at, as a host holds
|
|
101
|
+
* them — the value behind a bound `view` ({@link SnapGridViewBindType}, #995).
|
|
102
|
+
* Bound, the canvas draws at them and writes the user's choices back — a
|
|
103
|
+
* width preset, a zoom step — so a preview beside it shows the page at the
|
|
104
|
+
* width the builder chose.
|
|
105
|
+
*
|
|
106
|
+
* @property width - The design width, a CSS length; `none` ⇒ the SnapGrid's `width`
|
|
107
|
+
* @property zoom - The scale it draws at; `none` ⇒ the SnapGrid's `zoom`, else actual size
|
|
108
|
+
*/
|
|
109
|
+
export const SnapGridViewStateType = StructType({
|
|
110
|
+
width: OptionType(StringType),
|
|
111
|
+
zoom: OptionType(FloatType),
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* A bound {@link SnapGridViewStateType} — exactly `State.bind`'s handle at it,
|
|
115
|
+
* so `State.bind([SnapGrid.Types.ViewState], key, SnapGrid.viewState())`
|
|
116
|
+
* passes straight through as a SnapGrid's `view`.
|
|
117
|
+
*
|
|
118
|
+
* @property read - The current state
|
|
119
|
+
* @property write - Replace it
|
|
120
|
+
* @property has - Whether the key is set
|
|
121
|
+
*/
|
|
122
|
+
export const SnapGridViewBindType = StructType({
|
|
123
|
+
read: FunctionType([], SnapGridViewStateType),
|
|
124
|
+
write: FunctionType([SnapGridViewStateType], NullType),
|
|
125
|
+
has: FunctionType([], BooleanType),
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* An Apply a host asks of the editing canvas, and the canvas's answer (#998) —
|
|
129
|
+
* the value behind a bound `apply` ({@link SnapGridApplyBindType}). A host
|
|
130
|
+
* writes `asked` with an id of its own — a publish that must not leave drafts
|
|
131
|
+
* behind; the canvas applies its drafts as its own Apply does, and answers
|
|
132
|
+
* under the same id: `applied` once the source confirms them, or at once when
|
|
133
|
+
* it has none; `refused` when they cannot land, with why.
|
|
134
|
+
*
|
|
135
|
+
* @property idle - Nothing asked
|
|
136
|
+
* @property asked - An Apply asked — its id
|
|
137
|
+
* @property applied - The drafts landed, or there were none — the id asked
|
|
138
|
+
* @property refused - They cannot land — the id asked, and why, in the canvas's words
|
|
139
|
+
*/
|
|
140
|
+
export const SnapGridApplyStateType = VariantType({
|
|
141
|
+
idle: NullType,
|
|
142
|
+
asked: StringType,
|
|
143
|
+
applied: StringType,
|
|
144
|
+
refused: StructType({ id: StringType, reason: StringType }),
|
|
145
|
+
});
|
|
146
|
+
/**
|
|
147
|
+
* A bound {@link SnapGridApplyStateType} — exactly `State.bind`'s handle at it,
|
|
148
|
+
* so `State.bind([SnapGrid.Types.ApplyState], key, variant("idle", null))`
|
|
149
|
+
* passes straight through as a SnapGrid's `apply`.
|
|
150
|
+
*
|
|
151
|
+
* @property read - The current state
|
|
152
|
+
* @property write - Replace it
|
|
153
|
+
* @property has - Whether the key is set
|
|
154
|
+
*/
|
|
155
|
+
export const SnapGridApplyBindType = StructType({
|
|
156
|
+
read: FunctionType([], SnapGridApplyStateType),
|
|
157
|
+
write: FunctionType([SnapGridApplyStateType], NullType),
|
|
158
|
+
has: FunctionType([], BooleanType),
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* A design width the editing canvas's toolbar offers (#995) — a device the
|
|
162
|
+
* page is laid out for, such as Desktop or Tablet.
|
|
163
|
+
*
|
|
164
|
+
* @property label - Its name in the toolbar
|
|
165
|
+
* @property icon - A Font Awesome solid icon name, beside the name
|
|
166
|
+
* @property width - The design width, a CSS length (`"1440px"`)
|
|
167
|
+
*/
|
|
168
|
+
export const SnapGridWidthType = StructType({
|
|
169
|
+
label: StringType,
|
|
170
|
+
icon: OptionType(StringType),
|
|
171
|
+
width: StringType,
|
|
172
|
+
});
|
|
173
|
+
/**
|
|
174
|
+
* The chrome the editing canvas draws around itself (#995).
|
|
175
|
+
*
|
|
176
|
+
* @property card - Its own bordered, rounded frame (the default)
|
|
177
|
+
* @property shell - No frame: the canvas sits inside a host's
|
|
178
|
+
*/
|
|
179
|
+
export const SnapGridSurfaceType = VariantType({
|
|
180
|
+
card: NullType,
|
|
181
|
+
shell: NullType,
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* Where a dropped card lands (#990) — what `edit.create` builds the new entry
|
|
185
|
+
* at.
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* The canvas fits the entry `create` returns: it writes `row` into the field
|
|
189
|
+
* `edit.row` names, and holds its span to what the row has room for.
|
|
190
|
+
*
|
|
191
|
+
* @property key - A fresh key for the new entry, unique among the entries' identities
|
|
192
|
+
* @property row - The key of the row it lands in — an existing row's, or a new row's
|
|
193
|
+
*/
|
|
194
|
+
export const SnapGridPlaceType = StructType({
|
|
195
|
+
key: StringType,
|
|
196
|
+
row: StringType,
|
|
197
|
+
});
|
|
198
|
+
/**
|
|
199
|
+
* The entry fields a gesture writes, as `edit` names them (#990).
|
|
200
|
+
*
|
|
201
|
+
* @internal
|
|
202
|
+
* @property key - The String identity field
|
|
203
|
+
* @property row - The String field holding the row key
|
|
204
|
+
* @property span - The Integer field holding the span
|
|
205
|
+
* @property height - The `Option<Integer>` field holding the height, when a height is edited
|
|
206
|
+
* @property align - The `SnapGrid.Types.Align` field an align request writes, when one is taken (#996)
|
|
207
|
+
*/
|
|
208
|
+
export const SnapGridEditFieldsType = StructType({
|
|
209
|
+
key: StringType,
|
|
210
|
+
row: StringType,
|
|
211
|
+
span: StringType,
|
|
212
|
+
height: OptionType(StringType),
|
|
213
|
+
align: OptionType(StringType),
|
|
214
|
+
});
|
|
215
|
+
/**
|
|
216
|
+
* A drafted entry the author's readiness check reads (#990).
|
|
217
|
+
*
|
|
218
|
+
* @internal
|
|
219
|
+
* @property id - The entry's identity
|
|
220
|
+
* @property entry - The drafted entry, encoded
|
|
221
|
+
*/
|
|
222
|
+
export const SnapGridReadyEntryType = StructType({ id: StringType, entry: BlobType });
|
|
223
|
+
/**
|
|
224
|
+
* One tile, over its content's type — its identity, where it sits, and what
|
|
225
|
+
* it shows.
|
|
226
|
+
*
|
|
227
|
+
* @remarks
|
|
228
|
+
* Rows order by their first appearance among the cells, and the cells of a
|
|
229
|
+
* row by their order in the SnapGrid's `data`.
|
|
230
|
+
*
|
|
231
|
+
* @typeParam C - The content's type
|
|
232
|
+
* @param content - The content's type — the recursion node in the inline arm, `UIComponentType` in `SnapGrid.Types.Cell`
|
|
233
|
+
* @returns The cell struct
|
|
234
|
+
*
|
|
235
|
+
* @property key - The cell's identity
|
|
236
|
+
* @property row - The key of the row it sits in
|
|
237
|
+
* @property span - Its width, in columns of 12
|
|
238
|
+
* @property height - Its height in px; `none` is its content's height
|
|
239
|
+
* @property minHeight - The least height a height drag leaves it, in px; `none` stops it at its content's height
|
|
240
|
+
* @property align - Where it sits in a taller row
|
|
241
|
+
* @property frame - Drawn in a tile frame, or bare
|
|
242
|
+
* @property label - Its name — the drag ghost's, the announcements' and the history's; `none` names it by its key
|
|
243
|
+
* @property icon - A Font Awesome solid icon name, which the editing canvas's selection bar shows beside its name
|
|
244
|
+
* @property meta - A line the selection bar shows after its name — what it is, what it reads
|
|
245
|
+
* @property content - What it shows
|
|
246
|
+
*/
|
|
247
|
+
export function SnapGridCellOf(content) {
|
|
248
|
+
return StructType({
|
|
249
|
+
key: StringType,
|
|
250
|
+
row: StringType,
|
|
251
|
+
span: IntegerType,
|
|
252
|
+
height: OptionType(IntegerType),
|
|
253
|
+
minHeight: OptionType(IntegerType),
|
|
254
|
+
align: SnapGridAlignType,
|
|
255
|
+
frame: BooleanType,
|
|
256
|
+
label: OptionType(StringType),
|
|
257
|
+
icon: OptionType(StringType),
|
|
258
|
+
meta: OptionType(StringType),
|
|
259
|
+
content,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The host's items in the editing canvas's toolbar (#995), over their content
|
|
264
|
+
* type: the `start` items lead the row, the `end` items close it.
|
|
265
|
+
*
|
|
266
|
+
* @typeParam C - The items' type
|
|
267
|
+
* @param content - The items' type — the recursion node in the inline arm, `UIComponentType` in `SnapGrid.Types.Root`
|
|
268
|
+
* @returns The toolbar struct
|
|
269
|
+
*
|
|
270
|
+
* @property start - Before the canvas's own items, at the row's start
|
|
271
|
+
* @property end - After the canvas's own items, at the row's end
|
|
272
|
+
*/
|
|
273
|
+
export function SnapGridToolbarOf(content) {
|
|
274
|
+
return StructType({
|
|
275
|
+
start: ArrayType(content),
|
|
276
|
+
end: ArrayType(content),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The panes beside the editing canvas, under its toolbar (#995), over their
|
|
281
|
+
* content type — a palette, an inspector.
|
|
282
|
+
*
|
|
283
|
+
* @typeParam C - The panes' type
|
|
284
|
+
* @param content - The panes' type — the recursion node in the inline arm, `UIComponentType` in `SnapGrid.Types.Root`
|
|
285
|
+
* @returns The panes struct
|
|
286
|
+
*
|
|
287
|
+
* @property start - The pane before the canvas
|
|
288
|
+
* @property end - The pane after it
|
|
289
|
+
*/
|
|
290
|
+
export function SnapGridPanesOf(content) {
|
|
291
|
+
return StructType({
|
|
292
|
+
start: OptionType(content),
|
|
293
|
+
end: OptionType(content),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* A SnapGrid's editing declaration, on the wire (#990), over its cells' content
|
|
298
|
+
* type — the shared session's fields ({@link EditingSessionFields}) and the
|
|
299
|
+
* canvas's own. Entries cross as bytes at the exact type the wire names, so
|
|
300
|
+
* the arm stays a closed type whatever the SnapGrid's rows are.
|
|
301
|
+
*
|
|
302
|
+
* @internal
|
|
303
|
+
* @typeParam C - The cells' content type
|
|
304
|
+
* @param content - The cells' content type
|
|
305
|
+
* @returns The editing struct
|
|
306
|
+
*
|
|
307
|
+
* @property fields - The entry fields a gesture writes ({@link SnapGridEditFieldsType})
|
|
308
|
+
* @property derive - The cells of a whole drafted collection, encoded — what the canvas draws a draft as, exactly as Apply leaves it
|
|
309
|
+
* @property create - A dropped card's new entry, encoded — the author's `edit.create`; `none` takes no card
|
|
310
|
+
* @property ready - The author's readiness check over drafted entries, one result each, in order
|
|
311
|
+
* @property onDrafted - The author's `editing.onDrafted`, over the drafted rows' bytes — hears the rows the canvas draws (#996)
|
|
312
|
+
*/
|
|
313
|
+
export function SnapGridEditingOf(content) {
|
|
314
|
+
return StructType({
|
|
315
|
+
...EditingSessionFields,
|
|
316
|
+
fields: SnapGridEditFieldsType,
|
|
317
|
+
derive: FunctionType([BlobType], ArrayType(SnapGridCellOf(content))),
|
|
318
|
+
create: OptionType(FunctionType([LibraryRefType, SnapGridPlaceType], BlobType)),
|
|
319
|
+
ready: OptionType(FunctionType([ArrayType(SnapGridReadyEntryType)], ArrayType(EditingReadinessType))),
|
|
320
|
+
onDrafted: OptionType(FunctionType([BlobType], NullType)),
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* A SnapGrid's value, over its cells' content type.
|
|
325
|
+
*
|
|
326
|
+
* @typeParam C - The cells' content type
|
|
327
|
+
* @param content - The cells' content type — the recursion node in the inline arm, `UIComponentType` in `SnapGrid.Types.Root`
|
|
328
|
+
* @returns The root struct
|
|
329
|
+
*
|
|
330
|
+
* @property cells - Every cell, in the order `data` holds them
|
|
331
|
+
* @property variant - Tiles (the default) or a wireframe
|
|
332
|
+
* @property width - The design width, a CSS length
|
|
333
|
+
* @property height - A pinned height, a CSS length; the grid scrolls within
|
|
334
|
+
* @property maxHeight - A height cap, a CSS length; the grid scrolls past it
|
|
335
|
+
* @property zoom - The scale the canvas draws at (`1.0` actual size)
|
|
336
|
+
* @property guides - Draw the column ruler and the column bands
|
|
337
|
+
* @property editing - The editing session (#990); `none` takes no gesture
|
|
338
|
+
* @property ui - The bound selection ({@link SnapGridUiBindType}); `none` keeps it in the canvas
|
|
339
|
+
* @property view - The bound design width and zoom ({@link SnapGridViewBindType}, #995); `none` keeps them in the canvas
|
|
340
|
+
* @property apply - The bound Apply request ({@link SnapGridApplyBindType}, #998); `none` takes none
|
|
341
|
+
* @property id - The drag surface's name in a drop's cell refs; `none` names one of its own
|
|
342
|
+
* @property sources - The library ids whose cards land on the canvas
|
|
343
|
+
* @property canDrop - The veto over a drop where the drag rests (the shared grammar)
|
|
344
|
+
* @property widths - The design widths the editing canvas's toolbar offers (#995)
|
|
345
|
+
* @property toolbar - The host's items in the editing canvas's toolbar (#995)
|
|
346
|
+
* @property panes - The panes beside the editing canvas, under its toolbar (#995)
|
|
347
|
+
* @property surface - The editing canvas's frame, or none (#995); `none` draws the frame
|
|
348
|
+
*/
|
|
349
|
+
export function SnapGridRootOf(content) {
|
|
350
|
+
return StructType({
|
|
351
|
+
cells: ArrayType(SnapGridCellOf(content)),
|
|
352
|
+
variant: OptionType(SnapGridVariantType),
|
|
353
|
+
width: OptionType(StringType),
|
|
354
|
+
height: OptionType(StringType),
|
|
355
|
+
maxHeight: OptionType(StringType),
|
|
356
|
+
zoom: OptionType(FloatType),
|
|
357
|
+
guides: BooleanType,
|
|
358
|
+
editing: OptionType(SnapGridEditingOf(content)),
|
|
359
|
+
ui: OptionType(SnapGridUiBindType),
|
|
360
|
+
view: OptionType(SnapGridViewBindType),
|
|
361
|
+
apply: OptionType(SnapGridApplyBindType),
|
|
362
|
+
id: OptionType(StringType),
|
|
363
|
+
sources: ArrayType(StringType),
|
|
364
|
+
canDrop: OptionType(FunctionType([DragEventType], BooleanType)),
|
|
365
|
+
widths: ArrayType(SnapGridWidthType),
|
|
366
|
+
toolbar: SnapGridToolbarOf(content),
|
|
367
|
+
panes: SnapGridPanesOf(content),
|
|
368
|
+
surface: OptionType(SnapGridSurfaceType),
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/layout/snap-grid/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACH,SAAS,EACT,QAAQ,EACR,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;IACzC,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;CACpB,CAAC,CAAC;AAQH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAQH;;;;;;;;;;;GAWG;AACH,MAA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C"}
|
|
@@ -53,6 +53,10 @@ import { type NavConfig, type NavRoutes, type BoundNav, type PagesHandlers } fro
|
|
|
53
53
|
* (leading cluster) — e.g. an environment switcher.
|
|
54
54
|
* @property barEnd - Optional app-bar nodes rendered at the trailing edge —
|
|
55
55
|
* `<IconButton>` / `<Menu>` / `<Avatar>` actions.
|
|
56
|
+
* @property rail - Optional rail in place of the one the config derives — a
|
|
57
|
+
* `<NavList>` over rows that are data, such as the pages a record holds.
|
|
58
|
+
* @property breadcrumb - Optional breadcrumb in place of the one the nav path
|
|
59
|
+
* derives — one that names what the route's payload is.
|
|
56
60
|
*/
|
|
57
61
|
export interface AppInput<R extends NavRoutes> {
|
|
58
62
|
/** The nav handle from `Navigation.bind(config, key, initial)`. */
|
|
@@ -80,6 +84,17 @@ export interface AppInput<R extends NavRoutes> {
|
|
|
80
84
|
barStart?: SubtypeExprOrValue<ArrayType<UIComponentType>>;
|
|
81
85
|
/** App-bar nodes at the trailing edge. */
|
|
82
86
|
barEnd?: SubtypeExprOrValue<ArrayType<UIComponentType>>;
|
|
87
|
+
/**
|
|
88
|
+
* The rail, in place of the one the config derives — a `<NavList>` whose
|
|
89
|
+
* rows are data (a route per row of a record, which a static config cannot
|
|
90
|
+
* list). Its rows navigate through the same `nav` handle.
|
|
91
|
+
*/
|
|
92
|
+
rail?: SubtypeExprOrValue<UIComponentType>;
|
|
93
|
+
/**
|
|
94
|
+
* The breadcrumb, in place of the one the nav path derives — for routes
|
|
95
|
+
* whose static labels do not name what their payload is.
|
|
96
|
+
*/
|
|
97
|
+
breadcrumb?: SubtypeExprOrValue<UIComponentType>;
|
|
83
98
|
}
|
|
84
99
|
/**
|
|
85
100
|
* Creates an `App` — the application shell composed from the navigation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/app/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAA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aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,+DAA+D;IAC/D,KAAK,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvC,oEAAoE;IACpE,IAAI,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC3C,8DAA8D;IAC9D,aAAa,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpD,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;yDAGqD;IACrD,OAAO,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC;IAC3D,oDAAoD;IACpD,QAAQ,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,0CAA0C;IAC1C,MAAM,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;IACxD;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC3C;;;OAGG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CACpD;AA6FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,iBAAS,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAuBrF;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG;IACZ,gGAAgG;;CAE1F,CAAC"}
|
|
@@ -156,8 +156,8 @@ function buildBreadcrumb(input) {
|
|
|
156
156
|
function createApp(input) {
|
|
157
157
|
const { nav, pages } = input;
|
|
158
158
|
const body = Pages.Root({ nav, pages: pages });
|
|
159
|
-
const rail = buildRail(input);
|
|
160
|
-
const breadcrumb = buildBreadcrumb(input);
|
|
159
|
+
const rail = input.rail !== undefined ? East.value(input.rail, UIComponentType) : buildRail(input);
|
|
160
|
+
const breadcrumb = input.breadcrumb !== undefined ? East.value(input.breadcrumb, UIComponentType) : buildBreadcrumb(input);
|
|
161
161
|
const emptyChildren = East.value([], ArrayType(UIComponentType));
|
|
162
162
|
return East.value(variant("App", {
|
|
163
163
|
title: input.title !== undefined ? some(input.title) : none,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/navigation/app/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAGH,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAA2C,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAqE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/navigation/app/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAGH,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WA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|
|
4
4
|
*/
|
|
5
|
-
import { type ExprType } from "@elaraai/east";
|
|
5
|
+
import { type ExprType, ArrayType } from "@elaraai/east";
|
|
6
6
|
import { UIComponentType } from "../../component.js";
|
|
7
7
|
import { NavListType, NavSectionType, NavItemType, type NavListStyle, type NavSectionInput } from "./types.js";
|
|
8
8
|
export { NavListType, NavSectionType, NavItemType, NavListSurfaceType, type NavListSurfaceLiteral, type NavListStyle, type NavSectionInput, type NavItemInput, } from "./types.js";
|
|
@@ -11,7 +11,9 @@ export { NavListType, NavSectionType, NavItemType, NavListSurfaceType, type NavL
|
|
|
11
11
|
* bsys Sidebar recipe (mono uppercase rows, brand-tint active with a
|
|
12
12
|
* 3 px brand-d left rule, paper-2 card chrome).
|
|
13
13
|
*
|
|
14
|
-
* @param sections -
|
|
14
|
+
* @param sections - The sections, each with an optional label and its items:
|
|
15
|
+
* declared as an array, or an East `Array<NavList.Types.Section>` computed
|
|
16
|
+
* from data — a rail of the pages a record holds, say
|
|
15
17
|
* @param style - Optional configuration (`onSelect`, `surface`, `background`)
|
|
16
18
|
* @returns An East expression representing the NavList
|
|
17
19
|
*
|
|
@@ -45,7 +47,7 @@ export { NavListType, NavSectionType, NavItemType, NavListSurfaceType, type NavL
|
|
|
45
47
|
* });
|
|
46
48
|
* ```
|
|
47
49
|
*/
|
|
48
|
-
declare function createNavList(sections: NavSectionInput[]
|
|
50
|
+
declare function createNavList(sections: NavSectionInput[] | ExprType<ArrayType<typeof NavSectionType>>, style?: NavListStyle): ExprType<UIComponentType>;
|
|
49
51
|
interface NavListNamespace {
|
|
50
52
|
Root: typeof createNavList;
|
|
51
53
|
Types: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/nav-list/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/nav-list/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,SAAS,EAKZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACH,WAAW,EACX,cAAc,EACd,WAAW,EAEX,KAAK,YAAY,EACjB,KAAK,eAAe,EACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,WAAW,EACX,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,GACpB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,iBAAS,aAAa,CAClB,QAAQ,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,cAAc,CAAC,CAAC,EACxE,KAAK,CAAC,EAAE,YAAY,GACrB,QAAQ,CAAC,eAAe,CAAC,CAoC3B;AAED,UAAU,gBAAgB;IACtB,IAAI,EAAE,OAAO,aAAa,CAAC;IAC3B,KAAK,EAAE;QACH,OAAO,EAAE,OAAO,WAAW,CAAC;QAC5B,OAAO,EAAE,OAAO,cAAc,CAAC;QAC/B,IAAI,EAAE,OAAO,WAAW,CAAC;KAC5B,CAAC;CACL;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,gBA+BrB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import { East, variant, some, none, } from "@elaraai/east";
|
|
5
|
+
import { ArrayType, East, variant, some, none, } from "@elaraai/east";
|
|
6
6
|
import { UIComponentType } from "../../component.js";
|
|
7
7
|
import { IconType } from "../../display/icon/types.js";
|
|
8
8
|
import { NavListType, NavSectionType, NavItemType, NavListSurfaceType, } from "./types.js";
|
|
@@ -15,7 +15,9 @@ export { NavListType, NavSectionType, NavItemType, NavListSurfaceType, } from ".
|
|
|
15
15
|
* bsys Sidebar recipe (mono uppercase rows, brand-tint active with a
|
|
16
16
|
* 3 px brand-d left rule, paper-2 card chrome).
|
|
17
17
|
*
|
|
18
|
-
* @param sections -
|
|
18
|
+
* @param sections - The sections, each with an optional label and its items:
|
|
19
|
+
* declared as an array, or an East `Array<NavList.Types.Section>` computed
|
|
20
|
+
* from data — a rail of the pages a record holds, say
|
|
19
21
|
* @param style - Optional configuration (`onSelect`, `surface`, `background`)
|
|
20
22
|
* @returns An East expression representing the NavList
|
|
21
23
|
*
|
|
@@ -50,7 +52,7 @@ export { NavListType, NavSectionType, NavItemType, NavListSurfaceType, } from ".
|
|
|
50
52
|
* ```
|
|
51
53
|
*/
|
|
52
54
|
function createNavList(sections, style) {
|
|
53
|
-
const sectionsExpr = East.value(sections.map(s => East.value({
|
|
55
|
+
const sectionsExpr = !Array.isArray(sections) ? East.value(sections, ArrayType(NavSectionType)) : East.value(sections.map(s => East.value({
|
|
54
56
|
label: s.label !== undefined ? some(s.label) : none,
|
|
55
57
|
items: East.value(s.items.map(it => {
|
|
56
58
|
const iconExpr = it.icon !== undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/navigation/nav-list/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACH,WAAW,EACX,cAAc,EACd,WAAW,EACX,kBAAkB,GAGrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,WAAW,EACX,cAAc,EACd,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AAO,CAAC;YACpB,CAAC,CAAC,IAAI;QACV,UAAU,EAAE,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;KAC9E,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAWD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB;IACrC;;OAEG;IACH,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACH;;;;;WAKG;QACH,OAAO,EAAE,WAAW;QACpB;;;;;WAKG;QACH,OAAO,EAAE,cAAc;QACvB;;;;;;;;WAQG;QACH,IAAI,EAAE,WAAW;KACpB;CACJ,CAAC"}
|
|
@@ -202,8 +202,17 @@ export declare const ActionBar: {
|
|
|
202
202
|
*
|
|
203
203
|
* @remarks
|
|
204
204
|
* ActionBar has fixed styling - no size/variant options.
|
|
205
|
+
*
|
|
206
|
+
* @property open - Controlled open state, in place of the selection count's
|
|
207
|
+
* @property closeOnInteractOutside - Close when clicking outside
|
|
208
|
+
* @property closeOnEscape - Close on escape key
|
|
209
|
+
* @property onSelect - Callback triggered when an action is selected
|
|
210
|
+
* @property onOpenChange - Callback triggered when open state changes
|
|
205
211
|
*/
|
|
206
212
|
readonly Style: StructType<{
|
|
213
|
+
readonly open: OptionType<BooleanType>;
|
|
214
|
+
readonly closeOnInteractOutside: OptionType<BooleanType>;
|
|
215
|
+
readonly closeOnEscape: OptionType<BooleanType>;
|
|
207
216
|
readonly onSelect: OptionType<import("@elaraai/east").FunctionType<[StringType], import("@elaraai/east").NullType>>;
|
|
208
217
|
readonly onOpenChange: OptionType<import("@elaraai/east").FunctionType<[BooleanType], import("@elaraai/east").NullType>>;
|
|
209
218
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlays/action-bar/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,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CAkB3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;;;QAGC;;;;;;;;;;;WAWG;;mBAhNA,SAAS,CAAC,iBAAiB,CAAC;4BACnB,UAAU,CAAC,WAAW,CAAC;4BACvB,UAAU,CAAC,UAAU,CAAC;mBAC/B,UAAU,CAAC,kBAAkB,CAAC;;QA+MjC;;;;;WAKG;;;;;;;;;QAEH;;;;;;;;;;;WAWG;;;;;;;;;CAGD,CAAC"}
|
|
@@ -86,13 +86,17 @@ function createSeparator() {
|
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
88
|
function createActionBar(items, style) {
|
|
89
|
-
const hasStyle = style?.
|
|
89
|
+
const hasStyle = style?.open !== undefined || style?.closeOnInteractOutside !== undefined ||
|
|
90
|
+
style?.closeOnEscape !== undefined || style?.onSelect !== undefined || style?.onOpenChange !== undefined;
|
|
90
91
|
return East.value(variant("ActionBar", {
|
|
91
92
|
items: items,
|
|
92
93
|
selectionCount: style?.selectionCount !== undefined ? some(style.selectionCount) : none,
|
|
93
94
|
selectionLabel: style?.selectionLabel !== undefined ? some(style.selectionLabel) : none,
|
|
94
95
|
style: hasStyle
|
|
95
96
|
? some(East.value({
|
|
97
|
+
open: style?.open !== undefined ? some(style.open) : none,
|
|
98
|
+
closeOnInteractOutside: style?.closeOnInteractOutside !== undefined ? some(style.closeOnInteractOutside) : none,
|
|
99
|
+
closeOnEscape: style?.closeOnEscape !== undefined ? some(style.closeOnEscape) : none,
|
|
96
100
|
onSelect: style?.onSelect !== undefined ? some(style.onSelect) : none,
|
|
97
101
|
onOpenChange: style?.onOpenChange !== undefined ? some(style.onOpenChange) : none,
|
|
98
102
|
}, ActionBarStyleType))
|
|
@@ -217,6 +221,12 @@ export const ActionBar = {
|
|
|
217
221
|
*
|
|
218
222
|
* @remarks
|
|
219
223
|
* ActionBar has fixed styling - no size/variant options.
|
|
224
|
+
*
|
|
225
|
+
* @property open - Controlled open state, in place of the selection count's
|
|
226
|
+
* @property closeOnInteractOutside - Close when clicking outside
|
|
227
|
+
* @property closeOnEscape - Close on escape key
|
|
228
|
+
* @property onSelect - Callback triggered when an action is selected
|
|
229
|
+
* @property onOpenChange - Callback triggered when open state changes
|
|
220
230
|
*/
|
|
221
231
|
Style: ActionBarStyleType,
|
|
222
232
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/overlays/action-bar/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACH,iBAAiB,EACjB,kBAAkB,GAErB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,iBAAiB,EACjB,kBAAkB,GAErB,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,aAAa,GAKrB,UAAU,CAAC;IACZ,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IACnC,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC;IACvC,cAAc,EAAE,UAAU,CAAC,UAAU,CAAC;IACtC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;CACxC,CAAC,CAAC;AAOH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,SAAS,YAAY,CACjB,KAAqC,EACrC,KAAqC,EACrC,QAA0C;IAE1C,OAAO,IAAI,CAA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