@elaraai/east-ui 1.0.85 → 1.0.87
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/buttons/button/index.d.ts +4 -0
- package/dist/src/buttons/button/index.d.ts.map +1 -1
- package/dist/src/buttons/button/index.js +8 -1
- package/dist/src/buttons/button/index.js.map +1 -1
- package/dist/src/buttons/button/types.d.ts +6 -5
- package/dist/src/buttons/button/types.d.ts.map +1 -1
- package/dist/src/buttons/button/types.js.map +1 -1
- package/dist/src/buttons/icon-button/index.d.ts +5 -5
- package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.js +8 -2
- package/dist/src/buttons/icon-button/index.js.map +1 -1
- package/dist/src/buttons/icon-button/types.d.ts +8 -12
- package/dist/src/buttons/icon-button/types.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/types.js +2 -2
- package/dist/src/buttons/icon-button/types.js.map +1 -1
- package/dist/src/buttons/toggle/index.d.ts +4 -0
- package/dist/src/buttons/toggle/index.d.ts.map +1 -1
- package/dist/src/buttons/toggle/index.js +6 -1
- package/dist/src/buttons/toggle/index.js.map +1 -1
- package/dist/src/buttons/toggle/types.d.ts +3 -2
- package/dist/src/buttons/toggle/types.d.ts.map +1 -1
- package/dist/src/buttons/toggle/types.js.map +1 -1
- 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.map +1 -1
- package/dist/src/charts/spec/index.js +5 -2
- package/dist/src/charts/spec/index.js.map +1 -1
- package/dist/src/collections/deck/index.d.ts.map +1 -1
- package/dist/src/collections/deck/index.js +2 -2
- package/dist/src/collections/deck/index.js.map +1 -1
- package/dist/src/collections/index.d.ts +0 -6
- package/dist/src/collections/index.d.ts.map +1 -1
- package/dist/src/collections/index.js +0 -6
- package/dist/src/collections/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +1 -1
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/index.js +2 -2
- package/dist/src/collections/library/index.js.map +1 -1
- package/dist/src/collections/schematic/index.d.ts.map +1 -1
- package/dist/src/collections/schematic/index.js +2 -2
- package/dist/src/collections/schematic/index.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +1 -1
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +2 -2
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/tree-view/index.d.ts +11 -32
- package/dist/src/collections/tree-view/index.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.js +15 -10
- package/dist/src/collections/tree-view/index.js.map +1 -1
- package/dist/src/component.d.ts +673 -9344
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +5 -259
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/approval.d.ts +6 -8
- package/dist/src/contracts/approval.d.ts.map +1 -1
- package/dist/src/contracts/approval.js +6 -8
- package/dist/src/contracts/approval.js.map +1 -1
- package/dist/src/contracts/drag.d.ts +1 -1
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +4 -5
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/editing.d.ts +19 -19
- package/dist/src/contracts/editing.js +14 -14
- package/dist/src/contracts/fields.d.ts +471 -0
- package/dist/src/contracts/fields.d.ts.map +1 -0
- package/dist/src/contracts/fields.js +492 -0
- package/dist/src/contracts/fields.js.map +1 -0
- package/dist/src/contracts/index.d.ts +1 -0
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js +1 -0
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/contracts/indexed-source.d.ts +118 -0
- package/dist/src/contracts/indexed-source.d.ts.map +1 -0
- package/dist/src/contracts/indexed-source.js +89 -0
- package/dist/src/contracts/indexed-source.js.map +1 -0
- package/dist/src/contracts/pick.d.ts +0 -16
- package/dist/src/contracts/pick.d.ts.map +1 -1
- package/dist/src/contracts/review.d.ts +4 -6
- package/dist/src/contracts/review.d.ts.map +1 -1
- package/dist/src/contracts/review.js +4 -6
- package/dist/src/contracts/review.js.map +1 -1
- package/dist/src/contracts/source.d.ts +2 -2
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/contracts/states.d.ts +1 -3
- package/dist/src/contracts/states.d.ts.map +1 -1
- package/dist/src/contracts/states.js +1 -3
- package/dist/src/contracts/states.js.map +1 -1
- package/dist/src/display/editable-chip/index.d.ts +2 -0
- package/dist/src/display/editable-chip/index.d.ts.map +1 -1
- package/dist/src/display/editable-chip/index.js +4 -1
- package/dist/src/display/editable-chip/index.js.map +1 -1
- package/dist/src/display/icon/index.d.ts +14 -31
- package/dist/src/display/icon/index.d.ts.map +1 -1
- package/dist/src/display/icon/index.js +15 -19
- package/dist/src/display/icon/index.js.map +1 -1
- package/dist/src/display/icon/solid.d.ts +24 -0
- package/dist/src/display/icon/solid.d.ts.map +1 -0
- package/dist/src/display/icon/solid.js +39 -0
- package/dist/src/display/icon/solid.js.map +1 -0
- package/dist/src/display/icon/types.d.ts +14 -38
- package/dist/src/display/icon/types.d.ts.map +1 -1
- package/dist/src/display/icon/types.js +6 -15
- package/dist/src/display/icon/types.js.map +1 -1
- package/dist/src/display/metric-chip/index.d.ts +2 -0
- package/dist/src/display/metric-chip/index.d.ts.map +1 -1
- package/dist/src/display/metric-chip/index.js +4 -1
- package/dist/src/display/metric-chip/index.js.map +1 -1
- package/dist/src/display/stat/index.d.ts +2 -0
- package/dist/src/display/stat/index.d.ts.map +1 -1
- package/dist/src/display/stat/index.js +4 -1
- package/dist/src/display/stat/index.js.map +1 -1
- package/dist/src/display/stat/types.d.ts +3 -5
- package/dist/src/display/stat/types.d.ts.map +1 -1
- package/dist/src/display/stat/types.js +5 -2
- package/dist/src/display/stat/types.js.map +1 -1
- package/dist/src/feedback/banner/index.d.ts +5 -3
- package/dist/src/feedback/banner/index.d.ts.map +1 -1
- package/dist/src/feedback/banner/index.js +4 -1
- package/dist/src/feedback/banner/index.js.map +1 -1
- package/dist/src/feedback/empty-state/index.d.ts +16 -19
- package/dist/src/feedback/empty-state/index.d.ts.map +1 -1
- package/dist/src/feedback/empty-state/index.js +17 -10
- package/dist/src/feedback/empty-state/index.js.map +1 -1
- package/dist/src/feedback/status/index.d.ts +5 -3
- package/dist/src/feedback/status/index.d.ts.map +1 -1
- package/dist/src/feedback/status/index.js +4 -1
- package/dist/src/feedback/status/index.js.map +1 -1
- package/dist/src/index.d.ts +5 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +23 -16
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +29 -13
- package/dist/src/internal.js.map +1 -1
- package/dist/src/navigation/index.d.ts +0 -2
- package/dist/src/navigation/index.d.ts.map +1 -1
- package/dist/src/navigation/index.js +0 -2
- package/dist/src/navigation/index.js.map +1 -1
- package/dist/src/navigation/nav-list/index.d.ts +2 -0
- package/dist/src/navigation/nav-list/index.d.ts.map +1 -1
- package/dist/src/navigation/nav-list/index.js +4 -1
- package/dist/src/navigation/nav-list/index.js.map +1 -1
- package/dist/src/navigation/nav-list/types.d.ts +3 -14
- package/dist/src/navigation/nav-list/types.d.ts.map +1 -1
- package/dist/src/navigation/nav-list/types.js.map +1 -1
- package/dist/src/overlays/command-palette/index.d.ts +2 -0
- package/dist/src/overlays/command-palette/index.d.ts.map +1 -1
- package/dist/src/overlays/command-palette/index.js +5 -0
- package/dist/src/overlays/command-palette/index.js.map +1 -1
- package/dist/src/overlays/command-palette/types.d.ts +0 -8
- package/dist/src/overlays/command-palette/types.d.ts.map +1 -1
- package/dist/src/pick/index.d.ts +1 -17
- package/dist/src/pick/index.d.ts.map +1 -1
- package/dist/src/pick/index.js +1 -1
- package/dist/src/platform/slice/index.d.ts +1324 -2039
- package/dist/src/platform/slice/index.d.ts.map +1 -1
- package/dist/src/platform/slice/index.js +55 -74
- package/dist/src/platform/slice/index.js.map +1 -1
- package/dist/src/platform/slice/local.d.ts +743 -0
- package/dist/src/platform/slice/local.d.ts.map +1 -0
- package/dist/src/platform/slice/local.js +133 -0
- package/dist/src/platform/slice/local.js.map +1 -0
- package/dist/src/platform/slice/record-chrome.d.ts +211 -0
- package/dist/src/platform/slice/record-chrome.d.ts.map +1 -0
- package/dist/src/platform/slice/record-chrome.js +52 -0
- package/dist/src/platform/slice/record-chrome.js.map +1 -0
- package/dist/src/platform/slice/record-interval.d.ts +24 -0
- package/dist/src/platform/slice/record-interval.d.ts.map +1 -0
- package/dist/src/platform/slice/record-interval.js +61 -0
- package/dist/src/platform/slice/record-interval.js.map +1 -0
- package/dist/src/platform/slice/record-plan.d.ts +54 -0
- package/dist/src/platform/slice/record-plan.d.ts.map +1 -0
- package/dist/src/platform/slice/record-plan.js +139 -0
- package/dist/src/platform/slice/record-plan.js.map +1 -0
- package/dist/src/platform/slice/record-types.d.ts +2739 -0
- package/dist/src/platform/slice/record-types.d.ts.map +1 -0
- package/dist/src/platform/slice/record-types.js +209 -0
- package/dist/src/platform/slice/record-types.js.map +1 -0
- package/dist/src/platform/slice/record.d.ts +109 -0
- package/dist/src/platform/slice/record.d.ts.map +1 -0
- package/dist/src/platform/slice/record.js +210 -0
- package/dist/src/platform/slice/record.js.map +1 -0
- package/dist/src/reactive/match.d.ts +4 -6
- package/dist/src/reactive/match.d.ts.map +1 -1
- package/dist/src/reactive/match.js +4 -6
- package/dist/src/reactive/match.js.map +1 -1
- package/dist/src/runtime/collections/deck.d.ts.map +1 -1
- package/dist/src/runtime/collections/index.d.ts +0 -6
- package/dist/src/runtime/collections/index.d.ts.map +1 -1
- package/dist/src/runtime/collections/index.js +0 -6
- package/dist/src/runtime/collections/index.js.map +1 -1
- package/dist/src/runtime/display/icon.d.ts +6 -5
- package/dist/src/runtime/display/icon.d.ts.map +1 -1
- package/dist/src/runtime/display/icon.js +6 -5
- package/dist/src/runtime/display/icon.js.map +1 -1
- package/dist/src/runtime/feedback/empty-state.d.ts +5 -5
- package/dist/src/runtime/feedback/empty-state.js +5 -5
- package/dist/src/runtime/layout/dock.d.ts +2 -1
- package/dist/src/runtime/layout/dock.d.ts.map +1 -1
- package/dist/src/runtime/layout/dock.js +2 -1
- package/dist/src/runtime/layout/dock.js.map +1 -1
- package/dist/src/runtime/navigation/index.d.ts +0 -3
- package/dist/src/runtime/navigation/index.d.ts.map +1 -1
- package/dist/src/runtime/navigation/index.js +0 -3
- package/dist/src/runtime/navigation/index.js.map +1 -1
- package/dist/src/runtime/reactive/match.d.ts +2 -3
- package/dist/src/runtime/reactive/match.d.ts.map +1 -1
- package/dist/src/runtime/reactive/match.js +2 -3
- package/dist/src/runtime/reactive/match.js.map +1 -1
- package/dist/src/runtime/record-slice-source.d.ts +78 -0
- package/dist/src/runtime/record-slice-source.d.ts.map +1 -0
- package/dist/src/runtime/record-slice-source.js +201 -0
- package/dist/src/runtime/record-slice-source.js.map +1 -0
- package/dist/src/runtime/record-slice.d.ts +110 -0
- package/dist/src/runtime/record-slice.d.ts.map +1 -0
- package/dist/src/runtime/record-slice.js +374 -0
- package/dist/src/runtime/record-slice.js.map +1 -0
- package/dist/src/runtime/slice.d.ts +11 -13
- package/dist/src/runtime/slice.d.ts.map +1 -1
- package/dist/src/runtime/slice.js +41 -93
- package/dist/src/runtime/slice.js.map +1 -1
- package/dist/src/shared/plot-gutter.d.ts +1 -1
- package/dist/src/shared/plot-gutter.js +1 -1
- package/dist/src/shared/resolve-tag.d.ts +23 -0
- package/dist/src/shared/resolve-tag.d.ts.map +1 -0
- package/dist/src/shared/resolve-tag.js +26 -0
- package/dist/src/shared/resolve-tag.js.map +1 -0
- package/dist/src/shared/tree.d.ts +1 -1
- package/dist/src/shared/tree.js +1 -1
- package/dist/src/slice/breakdown/index.d.ts +1 -1
- package/dist/src/slice/breakdown/index.d.ts.map +1 -1
- package/dist/src/slice/breakdown/index.js +3 -3
- package/dist/src/slice/breakdown/index.js.map +1 -1
- package/dist/src/slice/cohort/index.d.ts +4 -5
- package/dist/src/slice/cohort/index.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.js +6 -7
- package/dist/src/slice/cohort/index.js.map +1 -1
- package/dist/src/slice/filter/index.d.ts +1 -1
- package/dist/src/slice/filter/index.d.ts.map +1 -1
- package/dist/src/slice/filter/index.js +3 -3
- package/dist/src/slice/filter/index.js.map +1 -1
- package/dist/src/slice/index.d.ts +20 -2230
- package/dist/src/slice/index.d.ts.map +1 -1
- package/dist/src/slice/legend/index.d.ts +2 -2
- package/dist/src/slice/legend/index.d.ts.map +1 -1
- package/dist/src/slice/legend/index.js +4 -4
- package/dist/src/slice/legend/index.js.map +1 -1
- package/dist/src/slice/rail/index.d.ts +7 -4
- package/dist/src/slice/rail/index.d.ts.map +1 -1
- package/dist/src/slice/rail/index.js +10 -5
- package/dist/src/slice/rail/index.js.map +1 -1
- package/dist/src/slice/range/index.d.ts +1 -1
- package/dist/src/slice/range/index.d.ts.map +1 -1
- package/dist/src/slice/range/index.js +3 -3
- package/dist/src/slice/range/index.js.map +1 -1
- package/dist/src/slice/record/index.d.ts +171 -0
- package/dist/src/slice/record/index.d.ts.map +1 -0
- package/dist/src/slice/record/index.js +10 -0
- package/dist/src/slice/record/index.js.map +1 -0
- package/dist/src/slice/search/index.d.ts +6 -6
- package/dist/src/slice/search/index.d.ts.map +1 -1
- package/dist/src/slice/search/index.js +7 -7
- package/dist/src/slice/search/index.js.map +1 -1
- package/dist/src/slice/summary/index.d.ts +1 -1
- package/dist/src/slice/summary/index.d.ts.map +1 -1
- package/dist/src/slice/summary/index.js +3 -3
- package/dist/src/slice/summary/index.js.map +1 -1
- package/dist/src/typography/list/index.d.ts +2 -8
- package/dist/src/typography/list/index.d.ts.map +1 -1
- package/dist/src/typography/list/index.js +4 -1
- package/dist/src/typography/list/index.js.map +1 -1
- package/dist/src/typography/list/types.d.ts +0 -8
- package/dist/src/typography/list/types.d.ts.map +1 -1
- package/dist/test/collections/deck.examples.d.ts.map +1 -1
- package/dist/test/collections/deck.examples.js +6 -7
- package/dist/test/collections/deck.examples.js.map +1 -1
- 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.map +1 -1
- package/dist/test/collections/library.examples.js +6 -7
- package/dist/test/collections/library.examples.js.map +1 -1
- package/dist/test/collections/schematic.examples.d.ts.map +1 -1
- package/dist/test/collections/schematic.examples.js +11 -19
- package/dist/test/collections/schematic.examples.js.map +1 -1
- package/dist/test/collections/tree-view.examples.js +2 -2
- package/dist/test/contracts/editing.examples.d.ts +1 -0
- package/dist/test/contracts/editing.examples.d.ts.map +1 -1
- package/dist/test/contracts/editing.examples.js +37 -6
- package/dist/test/contracts/editing.examples.js.map +1 -1
- package/dist/test/contracts/fields.examples.d.ts +7 -0
- package/dist/test/contracts/fields.examples.d.ts.map +1 -0
- package/dist/test/contracts/fields.examples.js +42 -0
- package/dist/test/contracts/fields.examples.js.map +1 -0
- package/dist/test/display/avatar.examples.d.ts.map +1 -1
- package/dist/test/display/avatar.examples.js +3 -3
- package/dist/test/display/avatar.examples.js.map +1 -1
- package/dist/test/display/icon.examples.d.ts.map +1 -1
- package/dist/test/display/icon.examples.js +12 -11
- package/dist/test/display/icon.examples.js.map +1 -1
- package/dist/test/feedback/empty-state.examples.js +9 -9
- package/dist/test/feedback/empty-state.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +0 -8
- package/dist/test/layout/dock.examples.d.ts.map +1 -1
- package/dist/test/layout/dock.examples.js +2 -42
- package/dist/test/layout/dock.examples.js.map +1 -1
- package/dist/test/layout/snap-grid.examples.d.ts.map +1 -1
- package/dist/test/layout/snap-grid.examples.js +18 -28
- package/dist/test/layout/snap-grid.examples.js.map +1 -1
- package/dist/test/navigation/index.d.ts +0 -2
- package/dist/test/navigation/index.d.ts.map +1 -1
- package/dist/test/navigation/index.js +0 -2
- package/dist/test/navigation/index.js.map +1 -1
- package/dist/test/navigation/nav-list.examples.js.map +1 -1
- package/dist/test/platform/index.d.ts +1 -0
- package/dist/test/platform/index.d.ts.map +1 -1
- package/dist/test/platform/index.js +1 -0
- package/dist/test/platform/index.js.map +1 -1
- package/dist/test/platform/slice-local.examples.d.ts +2 -0
- package/dist/test/platform/slice-local.examples.d.ts.map +1 -0
- package/dist/test/platform/slice-local.examples.js +31 -0
- package/dist/test/platform/slice-local.examples.js.map +1 -0
- package/dist/test/platform/slice.examples.js +61 -61
- package/dist/test/platform/slice.examples.js.map +1 -1
- package/dist/test/slice/slice.examples.d.ts +0 -1
- package/dist/test/slice/slice.examples.d.ts.map +1 -1
- package/dist/test/slice/slice.examples.js +67 -181
- package/dist/test/slice/slice.examples.js.map +1 -1
- package/package.json +4 -4
- package/dist/src/collections/board/index.d.ts +0 -855
- package/dist/src/collections/board/index.d.ts.map +0 -1
- package/dist/src/collections/board/index.js +0 -416
- package/dist/src/collections/board/index.js.map +0 -1
- package/dist/src/collections/board/types.d.ts +0 -111
- package/dist/src/collections/board/types.d.ts.map +0 -1
- package/dist/src/collections/board/types.js +0 -89
- package/dist/src/collections/board/types.js.map +0 -1
- package/dist/src/collections/calendar/index.d.ts +0 -446
- package/dist/src/collections/calendar/index.d.ts.map +0 -1
- package/dist/src/collections/calendar/index.js +0 -287
- package/dist/src/collections/calendar/index.js.map +0 -1
- package/dist/src/collections/calendar/types.d.ts +0 -338
- package/dist/src/collections/calendar/types.d.ts.map +0 -1
- package/dist/src/collections/calendar/types.js +0 -206
- package/dist/src/collections/calendar/types.js.map +0 -1
- package/dist/src/collections/flowchart/index.d.ts +0 -430
- package/dist/src/collections/flowchart/index.d.ts.map +0 -1
- package/dist/src/collections/flowchart/index.js +0 -292
- package/dist/src/collections/flowchart/index.js.map +0 -1
- package/dist/src/collections/flowchart/types.d.ts +0 -333
- package/dist/src/collections/flowchart/types.d.ts.map +0 -1
- package/dist/src/collections/flowchart/types.js +0 -263
- package/dist/src/collections/flowchart/types.js.map +0 -1
- package/dist/src/collections/plan/assemble.d.ts +0 -2274
- package/dist/src/collections/plan/assemble.d.ts.map +0 -1
- package/dist/src/collections/plan/assemble.js +0 -210
- package/dist/src/collections/plan/assemble.js.map +0 -1
- package/dist/src/collections/plan/builders.d.ts +0 -765
- package/dist/src/collections/plan/builders.d.ts.map +0 -1
- package/dist/src/collections/plan/builders.js +0 -673
- package/dist/src/collections/plan/builders.js.map +0 -1
- package/dist/src/collections/plan/factories.d.ts +0 -512
- package/dist/src/collections/plan/factories.d.ts.map +0 -1
- package/dist/src/collections/plan/factories.js +0 -539
- package/dist/src/collections/plan/factories.js.map +0 -1
- package/dist/src/collections/plan/index.d.ts +0 -324
- package/dist/src/collections/plan/index.d.ts.map +0 -1
- package/dist/src/collections/plan/index.js +0 -193
- package/dist/src/collections/plan/index.js.map +0 -1
- package/dist/src/collections/plan/ir.d.ts +0 -2490
- package/dist/src/collections/plan/ir.d.ts.map +0 -1
- package/dist/src/collections/plan/ir.js +0 -107
- package/dist/src/collections/plan/ir.js.map +0 -1
- package/dist/src/collections/plan/pick.d.ts +0 -133
- package/dist/src/collections/plan/pick.d.ts.map +0 -1
- package/dist/src/collections/plan/pick.js +0 -208
- package/dist/src/collections/plan/pick.js.map +0 -1
- package/dist/src/collections/plan/root.d.ts +0 -297
- package/dist/src/collections/plan/root.d.ts.map +0 -1
- package/dist/src/collections/plan/root.js +0 -427
- package/dist/src/collections/plan/root.js.map +0 -1
- package/dist/src/collections/plan/series.d.ts +0 -13887
- package/dist/src/collections/plan/series.d.ts.map +0 -1
- package/dist/src/collections/plan/series.js +0 -1710
- package/dist/src/collections/plan/series.js.map +0 -1
- package/dist/src/collections/plan/types.d.ts +0 -12612
- package/dist/src/collections/plan/types.d.ts.map +0 -1
- package/dist/src/collections/plan/types.js +0 -1345
- package/dist/src/collections/plan/types.js.map +0 -1
- package/dist/src/collections/roster/index.d.ts +0 -787
- package/dist/src/collections/roster/index.d.ts.map +0 -1
- package/dist/src/collections/roster/index.js +0 -325
- package/dist/src/collections/roster/index.js.map +0 -1
- package/dist/src/collections/roster/types.d.ts +0 -97
- package/dist/src/collections/roster/types.d.ts.map +0 -1
- package/dist/src/collections/roster/types.js +0 -72
- package/dist/src/collections/roster/types.js.map +0 -1
- package/dist/src/collections/sheet/bridge.d.ts +0 -376
- package/dist/src/collections/sheet/bridge.d.ts.map +0 -1
- package/dist/src/collections/sheet/bridge.js +0 -773
- package/dist/src/collections/sheet/bridge.js.map +0 -1
- package/dist/src/collections/sheet/columns.d.ts +0 -410
- package/dist/src/collections/sheet/columns.d.ts.map +0 -1
- package/dist/src/collections/sheet/columns.js +0 -99
- package/dist/src/collections/sheet/columns.js.map +0 -1
- package/dist/src/collections/sheet/context-bridge.d.ts +0 -48
- package/dist/src/collections/sheet/context-bridge.d.ts.map +0 -1
- package/dist/src/collections/sheet/context-bridge.js +0 -216
- package/dist/src/collections/sheet/context-bridge.js.map +0 -1
- package/dist/src/collections/sheet/draft-bridge.d.ts +0 -37
- package/dist/src/collections/sheet/draft-bridge.d.ts.map +0 -1
- package/dist/src/collections/sheet/draft-bridge.js +0 -153
- package/dist/src/collections/sheet/draft-bridge.js.map +0 -1
- package/dist/src/collections/sheet/drafts.d.ts +0 -14
- package/dist/src/collections/sheet/drafts.d.ts.map +0 -1
- package/dist/src/collections/sheet/drafts.js +0 -14
- package/dist/src/collections/sheet/drafts.js.map +0 -1
- package/dist/src/collections/sheet/editing-bridge.d.ts +0 -36
- package/dist/src/collections/sheet/editing-bridge.d.ts.map +0 -1
- package/dist/src/collections/sheet/editing-bridge.js +0 -196
- package/dist/src/collections/sheet/editing-bridge.js.map +0 -1
- package/dist/src/collections/sheet/editing-types.d.ts +0 -268
- package/dist/src/collections/sheet/editing-types.d.ts.map +0 -1
- package/dist/src/collections/sheet/editing-types.js +0 -34
- package/dist/src/collections/sheet/editing-types.js.map +0 -1
- package/dist/src/collections/sheet/edits.d.ts +0 -37
- package/dist/src/collections/sheet/edits.d.ts.map +0 -1
- package/dist/src/collections/sheet/edits.js +0 -31
- package/dist/src/collections/sheet/edits.js.map +0 -1
- package/dist/src/collections/sheet/group.d.ts +0 -165
- package/dist/src/collections/sheet/group.d.ts.map +0 -1
- package/dist/src/collections/sheet/group.js +0 -52
- package/dist/src/collections/sheet/group.js.map +0 -1
- package/dist/src/collections/sheet/index.d.ts +0 -351
- package/dist/src/collections/sheet/index.d.ts.map +0 -1
- package/dist/src/collections/sheet/index.js +0 -208
- package/dist/src/collections/sheet/index.js.map +0 -1
- package/dist/src/collections/sheet/link.d.ts +0 -398
- package/dist/src/collections/sheet/link.d.ts.map +0 -1
- package/dist/src/collections/sheet/link.js +0 -228
- package/dist/src/collections/sheet/link.js.map +0 -1
- package/dist/src/collections/sheet/registers.d.ts +0 -278
- package/dist/src/collections/sheet/registers.d.ts.map +0 -1
- package/dist/src/collections/sheet/registers.js +0 -268
- package/dist/src/collections/sheet/registers.js.map +0 -1
- package/dist/src/collections/sheet/root.d.ts +0 -328
- package/dist/src/collections/sheet/root.d.ts.map +0 -1
- package/dist/src/collections/sheet/root.js +0 -432
- package/dist/src/collections/sheet/root.js.map +0 -1
- package/dist/src/collections/sheet/seed-bridge.d.ts +0 -14
- package/dist/src/collections/sheet/seed-bridge.d.ts.map +0 -1
- package/dist/src/collections/sheet/seed-bridge.js +0 -51
- package/dist/src/collections/sheet/seed-bridge.js.map +0 -1
- package/dist/src/collections/sheet/sub-rows.d.ts +0 -249
- package/dist/src/collections/sheet/sub-rows.d.ts.map +0 -1
- package/dist/src/collections/sheet/sub-rows.js +0 -222
- package/dist/src/collections/sheet/sub-rows.js.map +0 -1
- package/dist/src/collections/sheet/transactions.d.ts +0 -76
- package/dist/src/collections/sheet/transactions.d.ts.map +0 -1
- package/dist/src/collections/sheet/transactions.js +0 -40
- package/dist/src/collections/sheet/transactions.js.map +0 -1
- package/dist/src/collections/sheet/types.d.ts +0 -14992
- package/dist/src/collections/sheet/types.d.ts.map +0 -1
- package/dist/src/collections/sheet/types.js +0 -1061
- package/dist/src/collections/sheet/types.js.map +0 -1
- package/dist/src/navigation/app/index.d.ts +0 -150
- package/dist/src/navigation/app/index.d.ts.map +0 -1
- package/dist/src/navigation/app/index.js +0 -191
- package/dist/src/navigation/app/index.js.map +0 -1
- package/dist/src/navigation/pages/index.d.ts +0 -165
- package/dist/src/navigation/pages/index.d.ts.map +0 -1
- package/dist/src/navigation/pages/index.js +0 -152
- package/dist/src/navigation/pages/index.js.map +0 -1
- package/dist/src/navigation/pages/types.d.ts +0 -111
- package/dist/src/navigation/pages/types.d.ts.map +0 -1
- package/dist/src/navigation/pages/types.js +0 -101
- package/dist/src/navigation/pages/types.js.map +0 -1
- package/dist/src/runtime/collections/board.d.ts +0 -73
- package/dist/src/runtime/collections/board.d.ts.map +0 -1
- package/dist/src/runtime/collections/board.js +0 -68
- package/dist/src/runtime/collections/board.js.map +0 -1
- package/dist/src/runtime/collections/calendar.d.ts +0 -54
- package/dist/src/runtime/collections/calendar.d.ts.map +0 -1
- package/dist/src/runtime/collections/calendar.js +0 -54
- package/dist/src/runtime/collections/calendar.js.map +0 -1
- package/dist/src/runtime/collections/flowchart.d.ts +0 -58
- package/dist/src/runtime/collections/flowchart.d.ts.map +0 -1
- package/dist/src/runtime/collections/flowchart.js +0 -54
- package/dist/src/runtime/collections/flowchart.js.map +0 -1
- package/dist/src/runtime/collections/plan.d.ts +0 -181
- package/dist/src/runtime/collections/plan.d.ts.map +0 -1
- package/dist/src/runtime/collections/plan.js +0 -186
- package/dist/src/runtime/collections/plan.js.map +0 -1
- package/dist/src/runtime/collections/roster.d.ts +0 -60
- package/dist/src/runtime/collections/roster.d.ts.map +0 -1
- package/dist/src/runtime/collections/roster.js +0 -59
- package/dist/src/runtime/collections/roster.js.map +0 -1
- package/dist/src/runtime/collections/sheet.d.ts +0 -122
- package/dist/src/runtime/collections/sheet.d.ts.map +0 -1
- package/dist/src/runtime/collections/sheet.js +0 -73
- package/dist/src/runtime/collections/sheet.js.map +0 -1
- package/dist/src/runtime/navigation/app.d.ts +0 -52
- package/dist/src/runtime/navigation/app.d.ts.map +0 -1
- package/dist/src/runtime/navigation/app.js +0 -53
- package/dist/src/runtime/navigation/app.js.map +0 -1
- package/dist/src/runtime/navigation/pages.d.ts +0 -50
- package/dist/src/runtime/navigation/pages.d.ts.map +0 -1
- package/dist/src/runtime/navigation/pages.js +0 -52
- package/dist/src/runtime/navigation/pages.js.map +0 -1
- package/dist/src/runtime/navigation/route.d.ts +0 -46
- package/dist/src/runtime/navigation/route.d.ts.map +0 -1
- package/dist/src/runtime/navigation/route.js +0 -47
- package/dist/src/runtime/navigation/route.js.map +0 -1
- package/dist/test/collections/board.examples.d.ts +0 -18
- package/dist/test/collections/board.examples.d.ts.map +0 -1
- package/dist/test/collections/board.examples.js +0 -297
- package/dist/test/collections/board.examples.js.map +0 -1
- package/dist/test/collections/calendar.examples.d.ts +0 -5
- package/dist/test/collections/calendar.examples.d.ts.map +0 -1
- package/dist/test/collections/calendar.examples.js +0 -147
- package/dist/test/collections/calendar.examples.js.map +0 -1
- package/dist/test/collections/flowchart.examples.d.ts +0 -17
- package/dist/test/collections/flowchart.examples.d.ts.map +0 -1
- package/dist/test/collections/flowchart.examples.js +0 -243
- package/dist/test/collections/flowchart.examples.js.map +0 -1
- package/dist/test/collections/plan.examples.d.ts +0 -200
- package/dist/test/collections/plan.examples.d.ts.map +0 -1
- package/dist/test/collections/plan.examples.js +0 -3665
- package/dist/test/collections/plan.examples.js.map +0 -1
- package/dist/test/collections/roster.examples.d.ts +0 -26
- package/dist/test/collections/roster.examples.d.ts.map +0 -1
- package/dist/test/collections/roster.examples.js +0 -237
- package/dist/test/collections/roster.examples.js.map +0 -1
- package/dist/test/collections/sheet-link.examples.d.ts +0 -7
- package/dist/test/collections/sheet-link.examples.d.ts.map +0 -1
- package/dist/test/collections/sheet-link.examples.js +0 -41
- package/dist/test/collections/sheet-link.examples.js.map +0 -1
- package/dist/test/collections/sheet-transactions.examples.d.ts +0 -7
- package/dist/test/collections/sheet-transactions.examples.d.ts.map +0 -1
- package/dist/test/collections/sheet-transactions.examples.js +0 -58
- package/dist/test/collections/sheet-transactions.examples.js.map +0 -1
- package/dist/test/collections/sheet.examples.d.ts +0 -96
- package/dist/test/collections/sheet.examples.d.ts.map +0 -1
- package/dist/test/collections/sheet.examples.js +0 -1040
- package/dist/test/collections/sheet.examples.js.map +0 -1
- package/dist/test/navigation/app.examples.d.ts +0 -22
- package/dist/test/navigation/app.examples.d.ts.map +0 -1
- package/dist/test/navigation/app.examples.js +0 -136
- package/dist/test/navigation/app.examples.js.map +0 -1
- package/dist/test/navigation/pages.examples.d.ts +0 -13
- package/dist/test/navigation/pages.examples.d.ts.map +0 -1
- package/dist/test/navigation/pages.examples.js +0 -113
- package/dist/test/navigation/pages.examples.js.map +0 -1
- package/dist/test/navigation/route.examples.d.ts +0 -13
- package/dist/test/navigation/route.examples.d.ts.map +0 -1
- package/dist/test/navigation/route.examples.js +0 -69
- package/dist/test/navigation/route.examples.js.map +0 -1
|
@@ -1,152 +0,0 @@
|
|
|
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
|
-
* `Navigation` — the config/bind handle for first-class navigation.
|
|
7
|
-
*
|
|
8
|
-
* `Navigation.config({...})` declares each route's payload type + label (the
|
|
9
|
-
* single source of truth). `Navigation.bind(config, key, initial)` returns a
|
|
10
|
-
* handle whose `go.<route>(payload)` closures are derived from the config (the
|
|
11
|
-
* `Record.bind` pattern). `config.Page.<route>(payload)` are typed segment
|
|
12
|
-
* constructors (`≡ variant(route, payload)`) for `navigateTo`.
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
15
|
-
*/
|
|
16
|
-
import { East, ArrayType, NullType, StringType, variant, } from "@elaraai/east";
|
|
17
|
-
import { UIComponentType } from "../../component.js";
|
|
18
|
-
import { NavBindHandleType, navBindPlatformFn, routeVariantType, } from "./types.js";
|
|
19
|
-
export { NavBindHandleType, navBindPlatformFn, NavBindPrimitives, routeVariantType, } from "./types.js";
|
|
20
|
-
function makePageConstructors(routes) {
|
|
21
|
-
const page = {};
|
|
22
|
-
for (const name of Object.keys(routes)) {
|
|
23
|
-
page[name] = (payload) => variant(name, payload === undefined ? null : payload);
|
|
24
|
-
}
|
|
25
|
-
return page;
|
|
26
|
-
}
|
|
27
|
-
function createNavConfig(routes) {
|
|
28
|
-
return {
|
|
29
|
-
routes,
|
|
30
|
-
Route: routeVariantType(routes),
|
|
31
|
-
Page: makePageConstructors(routes),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// Navigation.bind — build the handle from the config (Record.bind-over-H pattern)
|
|
36
|
-
// ============================================================================
|
|
37
|
-
/**
|
|
38
|
-
* Bind a navigation config to a reactive path-stack handle.
|
|
39
|
-
*
|
|
40
|
-
* Builds the concrete handle type from the config and instantiates the
|
|
41
|
-
* {@link navBindPlatformFn} platform over it — so `go.<route>` keeps each route's
|
|
42
|
-
* payload type, exactly as `Record.bind` keeps each `mutate.<name>`'s arg types.
|
|
43
|
-
*
|
|
44
|
-
* @param config - A {@link Navigation.config} value.
|
|
45
|
-
* @param key - The browser-local store key the path is persisted under.
|
|
46
|
-
* @param initial - The initial path (e.g. `[config.Page.overview()]`).
|
|
47
|
-
* @returns A handle: `path` / `current` / `depth` / `canPop` / `pop` /
|
|
48
|
-
* `go.<route>(payload)` / `navigateTo(path)` / `labelOf(route)`.
|
|
49
|
-
*/
|
|
50
|
-
function bindNavigation(config, key, initial) {
|
|
51
|
-
const handleType = NavBindHandleType(config.routes);
|
|
52
|
-
const keyValue = East.value(key, StringType);
|
|
53
|
-
return navBindPlatformFn([handleType, config.Route], keyValue, initial);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* The `Navigation` namespace — first-class navigation config + bind handle.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* `Navigation.config({...})` is the single source of truth for each route's
|
|
60
|
-
* payload type + label; `Navigation.bind(config, key, initial)` returns the
|
|
61
|
-
* path-stack handle UI components plug into.
|
|
62
|
-
*/
|
|
63
|
-
export const Navigation = {
|
|
64
|
-
/** Build a navigation config from a routes map (types + labels). */
|
|
65
|
-
config: createNavConfig,
|
|
66
|
-
/** Bind a config to a reactive path-stack handle. */
|
|
67
|
-
bind: bindNavigation,
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Shared switcher builder for `Pages` / `Route` — the two emit the same
|
|
71
|
-
* payload (`render` + `navKey`) under their own variant case.
|
|
72
|
-
*
|
|
73
|
-
* The nullary `render` reads `current()` on the **passed** handle (no internal
|
|
74
|
-
* re-bind) and `match`es the active route to its page body. The bodies live in
|
|
75
|
-
* the match arms (in the IR), so the manifest walk collects every page's binds
|
|
76
|
-
* (the union) while only the matched arm executes — the renderer mounts just
|
|
77
|
-
* the active page (leaf-only, visible-only). The render closes over `nav`, so
|
|
78
|
-
* its `current()` read subscribes to the same store the app's handle is bound
|
|
79
|
-
* to (#114).
|
|
80
|
-
*/
|
|
81
|
-
function createNavSwitcher(caseName, nav, pages) {
|
|
82
|
-
const handlers = pages;
|
|
83
|
-
// Build the match arms in host TS (outside the East block): one arm per
|
|
84
|
-
// route, forwarding the typed payload + the shared handle to the page body.
|
|
85
|
-
const armsFor = (navH) => {
|
|
86
|
-
const arms = {};
|
|
87
|
-
for (const name of Object.keys(handlers)) {
|
|
88
|
-
const fn = handlers[name];
|
|
89
|
-
arms[name] = (h, payload) => fn(h, payload, navH);
|
|
90
|
-
}
|
|
91
|
-
return arms;
|
|
92
|
-
};
|
|
93
|
-
const render = East.function([], UIComponentType, ($) => {
|
|
94
|
-
const cur = $.const(nav.current());
|
|
95
|
-
return cur.match(armsFor(nav));
|
|
96
|
-
});
|
|
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);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* The `Pages` namespace — the first-class navigation content-switcher.
|
|
111
|
-
*
|
|
112
|
-
* @remarks
|
|
113
|
-
* Authored as the `<Pages nav={…} pages={{…}} />` tag; `Pages.Root({ nav,
|
|
114
|
-
* pages })` is the underlying factory. Bind the handle once with
|
|
115
|
-
* `Navigation.bind` in the enclosing `<Reactive>` and share it with the chrome
|
|
116
|
-
* (`<Breadcrumb nav>` / `<NavList nav>`).
|
|
117
|
-
*/
|
|
118
|
-
export const Pages = {
|
|
119
|
-
/** Build a `<Pages>` content-switcher from `{ nav, pages }`. See {@link createPages}. */
|
|
120
|
-
Root: createPages,
|
|
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
|
-
};
|
|
152
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CA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
|
|
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
|
-
* First-class navigation types — the `Navigation` config/bind handle.
|
|
7
|
-
*
|
|
8
|
-
* A **route** is one case of a typed variant; the navigation **path** is a stack
|
|
9
|
-
* of routes (`ArrayType(Route)`). The config declares each route's payload type +
|
|
10
|
-
* label (the single source of truth); the bind handle exposes the path-stack ops
|
|
11
|
-
* plus one typed `go.<route>(payload)` per route — derived from the config exactly
|
|
12
|
-
* as `Record.bind` derives `mutate.<name>(args)` from its mutation list.
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
15
|
-
*/
|
|
16
|
-
import { ArrayType, BooleanType, FunctionType, IntegerType, NullType, StringType, StructType, VariantType, type EastType, type ExprType } from "@elaraai/east";
|
|
17
|
-
/**
|
|
18
|
-
* One route declaration: the page's payload East type plus its display label,
|
|
19
|
-
* and optional rail presentation (`<App>` reads these to build the nav rail —
|
|
20
|
-
* the config is the single source of truth for the rail as well as the routes).
|
|
21
|
-
*
|
|
22
|
-
* @typeParam V - The route's payload East type (`NullType` for an argless page).
|
|
23
|
-
* @property value - The East type of the value passed when navigating to this route.
|
|
24
|
-
* @property label - Human-readable label (breadcrumb / rail).
|
|
25
|
-
* @property icon - Optional leading Font Awesome icon for the `<App>` rail row (`{ prefix, name }`).
|
|
26
|
-
* @property section - Optional `<App>` rail section heading to group this route under; omit ⇒ the route is reachable but hidden from the rail (a deep page).
|
|
27
|
-
* @property badge - Optional trailing badge text for the `<App>` rail row (count / "New").
|
|
28
|
-
*/
|
|
29
|
-
export interface NavRouteConfig<V extends EastType = EastType> {
|
|
30
|
-
value: V;
|
|
31
|
-
label: string;
|
|
32
|
-
/** Optional leading Font Awesome icon for the `<App>` rail row. */
|
|
33
|
-
icon?: {
|
|
34
|
-
prefix: string;
|
|
35
|
-
name: string;
|
|
36
|
-
};
|
|
37
|
-
/** Optional `<App>` rail section heading; omit ⇒ reachable but hidden from the rail. */
|
|
38
|
-
section?: string;
|
|
39
|
-
/** Optional trailing badge text for the `<App>` rail row. */
|
|
40
|
-
badge?: string;
|
|
41
|
-
}
|
|
42
|
-
/** A routes map: route name → its {@link NavRouteConfig}. */
|
|
43
|
-
export type NavRoutes = Record<string, NavRouteConfig>;
|
|
44
|
-
/** The derived `Route` variant East type for a routes map (`{ [name]: payload }`). */
|
|
45
|
-
export type RouteVariantOf<R extends NavRoutes> = VariantType<{
|
|
46
|
-
[K in keyof R]: R[K]["value"];
|
|
47
|
-
}>;
|
|
48
|
-
/** Build the `Route` variant East type from a routes config. */
|
|
49
|
-
export declare function routeVariantType<R extends NavRoutes>(routes: R): RouteVariantOf<R>;
|
|
50
|
-
/**
|
|
51
|
-
* Build the East `StructType` of the bind handle for a routes config: the
|
|
52
|
-
* path-stack ops plus one `go.<route>` closure per route (typed from the config),
|
|
53
|
-
* `navigateTo`, and `labelOf`. Mirrors {@link "../../../e3-ui" | RecordBindHandleType}'s
|
|
54
|
-
* "one closure per item, the struct shape IS the signature" approach.
|
|
55
|
-
*
|
|
56
|
-
* @param routes - The routes config.
|
|
57
|
-
* @returns The handle `StructType`.
|
|
58
|
-
*/
|
|
59
|
-
export declare function NavBindHandleType<R extends NavRoutes>(routes: R): NavHandleType<R>;
|
|
60
|
-
/** The `Route` variant TS type for a routes map. */
|
|
61
|
-
type RouteVariant<R extends NavRoutes> = VariantType<{
|
|
62
|
-
[K in keyof R]: R[K]["value"];
|
|
63
|
-
}>;
|
|
64
|
-
/**
|
|
65
|
-
* The precise East struct type of a nav handle — a mapped type (rather than the
|
|
66
|
-
* widened runtime loop of {@link NavBindHandleType}) so each `go.<route>` keeps
|
|
67
|
-
* its payload arg type.
|
|
68
|
-
*
|
|
69
|
-
* @typeParam R - The routes config.
|
|
70
|
-
*/
|
|
71
|
-
export type NavHandleType<R extends NavRoutes> = StructType<{
|
|
72
|
-
key: typeof StringType;
|
|
73
|
-
path: FunctionType<[], ArrayType<RouteVariant<R>>>;
|
|
74
|
-
current: FunctionType<[], RouteVariant<R>>;
|
|
75
|
-
depth: FunctionType<[], typeof IntegerType>;
|
|
76
|
-
canPop: FunctionType<[], typeof BooleanType>;
|
|
77
|
-
pop: FunctionType<[], typeof NullType>;
|
|
78
|
-
go: StructType<{
|
|
79
|
-
[K in keyof R]: FunctionType<[R[K]["value"]], typeof NullType>;
|
|
80
|
-
}>;
|
|
81
|
-
navigateTo: FunctionType<[ArrayType<RouteVariant<R>>], typeof NullType>;
|
|
82
|
-
}>;
|
|
83
|
-
/** The value type of a {@link Navigation.bind} handle for routes `R`. */
|
|
84
|
-
export type BoundNav<R extends NavRoutes> = ExprType<NavHandleType<R>>;
|
|
85
|
-
/**
|
|
86
|
-
* Underlying `Navigation.bind` platform definition. End-users call
|
|
87
|
-
* {@link Navigation.bind} (the typed factory); runtimes register against this raw
|
|
88
|
-
* definition. Generic over `H` (the fully-instantiated handle struct — its shape
|
|
89
|
-
* IS the signature) and `R` (the route variant type, governing the initial path).
|
|
90
|
-
* The single literal/value args are the store key and the initial path.
|
|
91
|
-
*/
|
|
92
|
-
export declare const navBindPlatformFn: import("@elaraai/east").GenericPlatformDefinition<readonly ["H", "R"], readonly [StringType, ArrayType<"R">], "H">;
|
|
93
|
-
/**
|
|
94
|
-
* Low-level platform primitives that back {@link Navigation.bind}'s handle methods.
|
|
95
|
-
*
|
|
96
|
-
* @internal Not for direct use — author against {@link Navigation.bind}. These
|
|
97
|
-
* exist so the handle's methods can be IR-bearing `East.function`s (serializable)
|
|
98
|
-
* rather than raw host closures.
|
|
99
|
-
*/
|
|
100
|
-
export declare const NavBindPrimitives: {
|
|
101
|
-
/** `nav_read([P], key, initial) -> P` — the path stack (tracks the key). */
|
|
102
|
-
readonly read: import("@elaraai/east").GenericPlatformDefinition<readonly ["P"], readonly [StringType, "P"], "P">;
|
|
103
|
-
/** `nav_write([P], key, path) -> Null` — replace the whole stack. */
|
|
104
|
-
readonly write: import("@elaraai/east").GenericPlatformDefinition<readonly ["P"], readonly [StringType, "P"], NullType>;
|
|
105
|
-
/** `nav_pop([P], key, initial) -> Null` — drop the leaf (if depth > 1). */
|
|
106
|
-
readonly pop: import("@elaraai/east").GenericPlatformDefinition<readonly ["P"], readonly [StringType, "P"], NullType>;
|
|
107
|
-
/** `nav_go([P, V], key, routeName, payload, initial) -> Null` — push a route. */
|
|
108
|
-
readonly go: import("@elaraai/east").GenericPlatformDefinition<readonly ["P", "V"], readonly [StringType, StringType, "V", "P"], NullType>;
|
|
109
|
-
};
|
|
110
|
-
export {};
|
|
111
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/pages/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAEH,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EAChB,MAAM,eAAe,CAAC;AAMvB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IACzD,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAEvD,sFAAsF;AACtF,MAAM,MAAM,cAAc,CAAC,CAAC,S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EAAE,YAAY,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC;CAC3E,CAAC,CAAC;AAEH,yEAAyE;AACzE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,SAAS,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAMvE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,oHAM7B,CAAC;AAcF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;IAC1B,4EAA4E;;IAE5E,qEAAqE;;IAErE,2EAA2E;;IAE3E,iFAAiF;;CAE3E,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
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
|
-
* First-class navigation types — the `Navigation` config/bind handle.
|
|
7
|
-
*
|
|
8
|
-
* A **route** is one case of a typed variant; the navigation **path** is a stack
|
|
9
|
-
* of routes (`ArrayType(Route)`). The config declares each route's payload type +
|
|
10
|
-
* label (the single source of truth); the bind handle exposes the path-stack ops
|
|
11
|
-
* plus one typed `go.<route>(payload)` per route — derived from the config exactly
|
|
12
|
-
* as `Record.bind` derives `mutate.<name>(args)` from its mutation list.
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
15
|
-
*/
|
|
16
|
-
import { East, ArrayType, BooleanType, FunctionType, IntegerType, NullType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
17
|
-
/** Build the `Route` variant East type from a routes config. */
|
|
18
|
-
export function routeVariantType(routes) {
|
|
19
|
-
const cases = {};
|
|
20
|
-
for (const [name, cfg] of Object.entries(routes))
|
|
21
|
-
cases[name] = cfg.value;
|
|
22
|
-
return VariantType(cases);
|
|
23
|
-
}
|
|
24
|
-
// ============================================================================
|
|
25
|
-
// Bind handle — return type of `Navigation.bind`
|
|
26
|
-
// ============================================================================
|
|
27
|
-
/**
|
|
28
|
-
* Build the East `StructType` of the bind handle for a routes config: the
|
|
29
|
-
* path-stack ops plus one `go.<route>` closure per route (typed from the config),
|
|
30
|
-
* `navigateTo`, and `labelOf`. Mirrors {@link "../../../e3-ui" | RecordBindHandleType}'s
|
|
31
|
-
* "one closure per item, the struct shape IS the signature" approach.
|
|
32
|
-
*
|
|
33
|
-
* @param routes - The routes config.
|
|
34
|
-
* @returns The handle `StructType`.
|
|
35
|
-
*/
|
|
36
|
-
export function NavBindHandleType(routes) {
|
|
37
|
-
const Route = routeVariantType(routes);
|
|
38
|
-
const Path = ArrayType(Route);
|
|
39
|
-
const goFields = {};
|
|
40
|
-
for (const [name, cfg] of Object.entries(routes)) {
|
|
41
|
-
goFields[name] = FunctionType([cfg.value], NullType);
|
|
42
|
-
}
|
|
43
|
-
return StructType({
|
|
44
|
-
/** The store key this navigator is bound to — lets renderers self-subscribe. */
|
|
45
|
-
key: StringType,
|
|
46
|
-
/** The whole path stack (→ breadcrumb). Tracked for reactive re-render. */
|
|
47
|
-
path: FunctionType([], Path),
|
|
48
|
-
/** The leaf (top of stack) — the page `<Pages>` renders. */
|
|
49
|
-
current: FunctionType([], Route),
|
|
50
|
-
/** Stack depth. */
|
|
51
|
-
depth: FunctionType([], IntegerType),
|
|
52
|
-
/** Whether `pop()` would do anything (depth > 1). */
|
|
53
|
-
canPop: FunctionType([], BooleanType),
|
|
54
|
-
/** Pop one level (back). */
|
|
55
|
-
pop: FunctionType([], NullType),
|
|
56
|
-
/** One typed navigate closure per route — push `variant(route, payload)`. */
|
|
57
|
-
go: StructType(goFields),
|
|
58
|
-
/** Replace the whole path (deep link / restore / nested path). */
|
|
59
|
-
navigateTo: FunctionType([Path], NullType),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
// ============================================================================
|
|
63
|
-
// nav_bind platform — generic over the instantiated handle + route types
|
|
64
|
-
// ============================================================================
|
|
65
|
-
/**
|
|
66
|
-
* Underlying `Navigation.bind` platform definition. End-users call
|
|
67
|
-
* {@link Navigation.bind} (the typed factory); runtimes register against this raw
|
|
68
|
-
* definition. Generic over `H` (the fully-instantiated handle struct — its shape
|
|
69
|
-
* IS the signature) and `R` (the route variant type, governing the initial path).
|
|
70
|
-
* The single literal/value args are the store key and the initial path.
|
|
71
|
-
*/
|
|
72
|
-
export const navBindPlatformFn = East.genericPlatform("nav_bind", ["H", "R"], [StringType, ArrayType("R")], "H", { optional: true });
|
|
73
|
-
// Low-level primitives backing a `Navigation.bind` handle's methods (issue #106).
|
|
74
|
-
//
|
|
75
|
-
// The handle's path-stack ops become thin `East.function`s over these primitives,
|
|
76
|
-
// capturing only the plain-data store key (+ the seed path for the decode-side
|
|
77
|
-
// fallback). `P` is the path type (`ArrayType(Route)`); `V` is one route's payload
|
|
78
|
-
// type. current/depth/canPop are derived in East from `nav_read`. So a nav handle
|
|
79
|
-
// is ordinary serializable East data and re-binds to the decoder's store.
|
|
80
|
-
const nav_read = East.genericPlatform("nav_read", ["P"], [StringType, "P"], "P", { optional: true });
|
|
81
|
-
const nav_write = East.genericPlatform("nav_write", ["P"], [StringType, "P"], NullType, { optional: true });
|
|
82
|
-
const nav_pop = East.genericPlatform("nav_pop", ["P"], [StringType, "P"], NullType, { optional: true });
|
|
83
|
-
const nav_go = East.genericPlatform("nav_go", ["P", "V"], [StringType, StringType, "V", "P"], NullType, { optional: true });
|
|
84
|
-
/**
|
|
85
|
-
* Low-level platform primitives that back {@link Navigation.bind}'s handle methods.
|
|
86
|
-
*
|
|
87
|
-
* @internal Not for direct use — author against {@link Navigation.bind}. These
|
|
88
|
-
* exist so the handle's methods can be IR-bearing `East.function`s (serializable)
|
|
89
|
-
* rather than raw host closures.
|
|
90
|
-
*/
|
|
91
|
-
export const NavBindPrimitives = {
|
|
92
|
-
/** `nav_read([P], key, initial) -> P` — the path stack (tracks the key). */
|
|
93
|
-
read: nav_read,
|
|
94
|
-
/** `nav_write([P], key, path) -> Null` — replace the whole stack. */
|
|
95
|
-
write: nav_write,
|
|
96
|
-
/** `nav_pop([P], key, initial) -> Null` — drop the leaf (if depth > 1). */
|
|
97
|
-
pop: nav_pop,
|
|
98
|
-
/** `nav_go([P, V], key, routeName, payload, initial) -> Null` — push a route. */
|
|
99
|
-
go: nav_go,
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/navigation/pages/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EACH,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,GAGd,MAAM,eAAe,CAAC;AAmCvB,gEAAgE;AAChE,MAAM,UAAU,gBAAgB,CAAsB,MAAS;IAC3D,MAAM,KAAK,GAA6B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;IAC1E,OAAO,WAAW,CAAC,KAAK,CAAsB,CAAC;AACnD,CAAC;AAED,+EAA+E;AAC/E,iDAAiD;AACjD,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAsB,MAAS;IAC5D,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAA6B,EAAE,CAAC;IAC9C,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/C,QAAQ,CAAC,I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AAC;AACrG,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5G,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACxG,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAE5H;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,4EAA4E;IAC5E,IAAI,EAAE,QAAQ;IACd,qEAAqE;IACrE,KAAK,EAAE,SAAS;IAChB,2EAA2E;IAC3E,GAAG,EAAE,OAAO;IACZ,iFAAiF;IACjF,EAAE,EAAE,MAAM;CACJ,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
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
|
-
/** `<Board>` tag — see the export's JSDoc. */
|
|
6
|
-
import { type ExprType, type SubtypeExprOrValue, ArrayType, StructType } from "@elaraai/east";
|
|
7
|
-
import { Board as BoardFactory, type BoardConfig, type BoardRowElement } from "../../collections/board/index.js";
|
|
8
|
-
import { UIComponentType } from "../../component.js";
|
|
9
|
-
/**
|
|
10
|
-
* `<Board>` — single-day areas × shifts assignment scheduling. Takes the
|
|
11
|
-
* flat tables a dataset naturally provides — `areas` (rows), `shifts`
|
|
12
|
-
* (columns), `people` (chip faces), and `assignments` — each with a
|
|
13
|
-
* chart-style field encoding (`area`, `shift`, `person`, `assignment`); the
|
|
14
|
-
* factory groups assignments into cells by `area × shift` and joins each to
|
|
15
|
-
* `people` by person key. Optional `requirements` (+ `requirement` encoding)
|
|
16
|
-
* add per-cell coverage: `n/required` numerals, dashed open-slot
|
|
17
|
-
* placeholders, under / over tones.
|
|
18
|
-
*
|
|
19
|
-
* Declares the drag & drop **target** role: `sources` lists the Library ids
|
|
20
|
-
* it accepts `add` drags from, and every completed drag (add / move /
|
|
21
|
-
* remove) funnels through `onDrag` as one typed event. Published mode
|
|
22
|
-
* renders committed assignments only, pointer-immutable; edit mode enables
|
|
23
|
-
* grips on proposed assignments, open-slot / empty-cell add (`onAddAt`),
|
|
24
|
-
* and ghost acceptance (`onAccept`). Dropping a person onto a cell that
|
|
25
|
-
* already holds them is a no-op (the duplicate-person guard).
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
30
|
-
* import { East, variant } from "@elaraai/east";
|
|
31
|
-
* import { Board, UIComponentType } from "@elaraai/east-ui";
|
|
32
|
-
*
|
|
33
|
-
* const board = East.function([], UIComponentType, _$ => (
|
|
34
|
-
* <Board
|
|
35
|
-
* id="board-tue"
|
|
36
|
-
* sources={["people"]}
|
|
37
|
-
* mode="edit"
|
|
38
|
-
* areas={[{ id: "icu", name: "ICU", wing: "Level 2" }]}
|
|
39
|
-
* area={a => ({ key: a.id, label: a.name, sublabel: a.wing })}
|
|
40
|
-
* shifts={[{ id: "am", name: "AM", window: "06:00–14:00" }]}
|
|
41
|
-
* shift={s => ({ key: s.id, label: s.name, sublabel: s.window })}
|
|
42
|
-
* people={[{ id: "patel", name: "Patel, R.", role: "Senior RN" }]}
|
|
43
|
-
* person={p => ({ key: p.id, label: p.name, sublabel: p.role })}
|
|
44
|
-
* assignments={[
|
|
45
|
-
* { id: "x1", personId: "patel", areaId: "icu", shiftId: "am", state: variant("committed", null) },
|
|
46
|
-
* ]}
|
|
47
|
-
* assignment={x => ({ key: x.id, person: x.personId, area: x.areaId,
|
|
48
|
-
* shift: x.shiftId, state: x.state })}
|
|
49
|
-
* />
|
|
50
|
-
* ));
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Assignment states are typed `PlannerStateType` values in the data
|
|
55
|
-
* (`variant("committed", null)`, `variant("proposed", variant("model",
|
|
56
|
-
* null))`, …) — `Board.Types.State` names the grammar. The component bakes
|
|
57
|
-
* in no user-facing copy: every string is data or a prop (`summary`,
|
|
58
|
-
* `areaHeader`); toolbar chrome is page composition. Desugars to
|
|
59
|
-
* `Board.Root(areas, shifts, people, assignments, config)`.
|
|
60
|
-
*/
|
|
61
|
-
declare function BoardTag<A extends SubtypeExprOrValue<ArrayType<StructType>>, S extends SubtypeExprOrValue<ArrayType<StructType>>, P extends SubtypeExprOrValue<ArrayType<StructType>>, X extends SubtypeExprOrValue<ArrayType<StructType>>, R extends SubtypeExprOrValue<ArrayType<StructType>> = []>(props: {
|
|
62
|
-
areas: A;
|
|
63
|
-
shifts: S;
|
|
64
|
-
people: P;
|
|
65
|
-
assignments: X;
|
|
66
|
-
} & BoardConfig<BoardRowElement<A>, BoardRowElement<S>, BoardRowElement<P>, BoardRowElement<X>, BoardRowElement<R>> & {
|
|
67
|
-
requirements?: R;
|
|
68
|
-
}): ExprType<UIComponentType>;
|
|
69
|
-
export declare const Board: typeof BoardTag & {
|
|
70
|
-
Types: typeof BoardFactory.Types;
|
|
71
|
-
};
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=board.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/board.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH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
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/** `<Board>` tag — see the export's JSDoc. */
|
|
6
|
-
import { ArrayType, StructType } from "@elaraai/east";
|
|
7
|
-
import { Board as BoardFactory, } from "../../collections/board/index.js";
|
|
8
|
-
import { UIComponentType } from "../../component.js";
|
|
9
|
-
/**
|
|
10
|
-
* `<Board>` — single-day areas × shifts assignment scheduling. Takes the
|
|
11
|
-
* flat tables a dataset naturally provides — `areas` (rows), `shifts`
|
|
12
|
-
* (columns), `people` (chip faces), and `assignments` — each with a
|
|
13
|
-
* chart-style field encoding (`area`, `shift`, `person`, `assignment`); the
|
|
14
|
-
* factory groups assignments into cells by `area × shift` and joins each to
|
|
15
|
-
* `people` by person key. Optional `requirements` (+ `requirement` encoding)
|
|
16
|
-
* add per-cell coverage: `n/required` numerals, dashed open-slot
|
|
17
|
-
* placeholders, under / over tones.
|
|
18
|
-
*
|
|
19
|
-
* Declares the drag & drop **target** role: `sources` lists the Library ids
|
|
20
|
-
* it accepts `add` drags from, and every completed drag (add / move /
|
|
21
|
-
* remove) funnels through `onDrag` as one typed event. Published mode
|
|
22
|
-
* renders committed assignments only, pointer-immutable; edit mode enables
|
|
23
|
-
* grips on proposed assignments, open-slot / empty-cell add (`onAddAt`),
|
|
24
|
-
* and ghost acceptance (`onAccept`). Dropping a person onto a cell that
|
|
25
|
-
* already holds them is a no-op (the duplicate-person guard).
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
30
|
-
* import { East, variant } from "@elaraai/east";
|
|
31
|
-
* import { Board, UIComponentType } from "@elaraai/east-ui";
|
|
32
|
-
*
|
|
33
|
-
* const board = East.function([], UIComponentType, _$ => (
|
|
34
|
-
* <Board
|
|
35
|
-
* id="board-tue"
|
|
36
|
-
* sources={["people"]}
|
|
37
|
-
* mode="edit"
|
|
38
|
-
* areas={[{ id: "icu", name: "ICU", wing: "Level 2" }]}
|
|
39
|
-
* area={a => ({ key: a.id, label: a.name, sublabel: a.wing })}
|
|
40
|
-
* shifts={[{ id: "am", name: "AM", window: "06:00–14:00" }]}
|
|
41
|
-
* shift={s => ({ key: s.id, label: s.name, sublabel: s.window })}
|
|
42
|
-
* people={[{ id: "patel", name: "Patel, R.", role: "Senior RN" }]}
|
|
43
|
-
* person={p => ({ key: p.id, label: p.name, sublabel: p.role })}
|
|
44
|
-
* assignments={[
|
|
45
|
-
* { id: "x1", personId: "patel", areaId: "icu", shiftId: "am", state: variant("committed", null) },
|
|
46
|
-
* ]}
|
|
47
|
-
* assignment={x => ({ key: x.id, person: x.personId, area: x.areaId,
|
|
48
|
-
* shift: x.shiftId, state: x.state })}
|
|
49
|
-
* />
|
|
50
|
-
* ));
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Assignment states are typed `PlannerStateType` values in the data
|
|
55
|
-
* (`variant("committed", null)`, `variant("proposed", variant("model",
|
|
56
|
-
* null))`, …) — `Board.Types.State` names the grammar. The component bakes
|
|
57
|
-
* in no user-facing copy: every string is data or a prop (`summary`,
|
|
58
|
-
* `areaHeader`); toolbar chrome is page composition. Desugars to
|
|
59
|
-
* `Board.Root(areas, shifts, people, assignments, config)`.
|
|
60
|
-
*/
|
|
61
|
-
function BoardTag(props) {
|
|
62
|
-
const { areas, shifts, people, assignments, ...config } = props;
|
|
63
|
-
return BoardFactory.Root(areas, shifts, people, assignments, config);
|
|
64
|
-
}
|
|
65
|
-
export const Board = Object.assign(BoardTag, {
|
|
66
|
-
Types: BoardFactory.Types,
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=board.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../../../src/runtime/collections/board.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8CAA8C;AAE9C,OAAO,EAA0C,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EACH,KAAK,IAAI,YAAY,GAGxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,SAAS,QAAQ,CAOb,KAE0B;IAE1B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAChE,OAAO,YAAY,CAAC,IAAI,CACpB,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAClC,MAC0B,CAC7B,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAEd,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IACxB,KAAK,EAAE,YAAY,CAAC,KAAK;CAC5B,CAAC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
/** `<Calendar>` tag — see the export's JSDoc. */
|
|
6
|
-
import { type ExprType, type SubtypeExprOrValue, ArrayType, StructType } from "@elaraai/east";
|
|
7
|
-
import { Calendar as CalendarFactory, type CalendarConfig, type RowElement } from "../../collections/calendar/index.js";
|
|
8
|
-
import { UIComponentType } from "../../component.js";
|
|
9
|
-
/**
|
|
10
|
-
* `<Calendar>` — a day-of-week × week grid coloured by intensity (forecast,
|
|
11
|
-
* demand, OT exposure). Visualisation only: clicking drills into a day, but
|
|
12
|
-
* there are no events, no committed/proposed state, and no drag & drop. The
|
|
13
|
-
* component owns the week — columns are always Mon–Sun; rows appear in
|
|
14
|
-
* first-appearance order of the `week` field.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
19
|
-
* import { East } from "@elaraai/east";
|
|
20
|
-
* import { Calendar, UIComponentType } from "@elaraai/east-ui";
|
|
21
|
-
*
|
|
22
|
-
* const demand = East.function([], UIComponentType, _$ => (
|
|
23
|
-
* <Calendar
|
|
24
|
-
* data={[
|
|
25
|
-
* { week: "W37", day: "Tue", demand: 102.0, lastYear: 95.0 },
|
|
26
|
-
* { week: "W37", day: "Wed", demand: 110.0, lastYear: 101.0 },
|
|
27
|
-
* { week: "W38", day: "Thu", demand: 131.0, lastYear: 112.0 },
|
|
28
|
-
* ]}
|
|
29
|
-
* cell={d => ({
|
|
30
|
-
* week: d.week, day: d.day, value: d.demand, compare: d.lastYear,
|
|
31
|
-
* })}
|
|
32
|
-
* totals={Calendar.totals()}
|
|
33
|
-
* aggregateRow={Calendar.aggregateRow()}
|
|
34
|
-
* footer={Calendar.footer({ valueLabel: "predicted", compareLabel: "last yr", legend: true })}
|
|
35
|
-
* />
|
|
36
|
-
* ));
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Desugars to `Calendar.Root(data, config)`. The `Calendar.scale` / `totals` /
|
|
41
|
-
* `aggregateRow` / `footer` sub-factories are exposed on the tag too.
|
|
42
|
-
*/
|
|
43
|
-
declare function CalendarTag<T extends SubtypeExprOrValue<ArrayType<StructType>>>(props: {
|
|
44
|
-
data: T;
|
|
45
|
-
} & CalendarConfig<RowElement<T>>): ExprType<UIComponentType>;
|
|
46
|
-
export declare const Calendar: typeof CalendarTag & {
|
|
47
|
-
Types: typeof CalendarFactory.Types;
|
|
48
|
-
scale: typeof CalendarFactory.scale;
|
|
49
|
-
totals: typeof CalendarFactory.totals;
|
|
50
|
-
aggregateRow: typeof CalendarFactory.aggregateRow;
|
|
51
|
-
footer: typeof CalendarFactory.footer;
|
|
52
|
-
};
|
|
53
|
-
export {};
|
|
54
|
-
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iDAAiD;AAEjD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EACH,QAAQ,IAAI,eAAe,EAC3B,KAAK,cAAc,EACnB,KAAK,UAAU,EAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,iBAAS,WAAW,CAAC,CAAC,SAAS,kBAAkB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EACpE,KAAK,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACnD,QAAQ,CAAC,eAAe,CAAC,CAG3B;AAED,eAAO,MAAM,QAAQ,EAAE,OAAO,WAAW,GAAG;IACxC,KAAK,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC;IACpC,KAAK,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC;IACpC,MAAM,EAAE,OAAO,eAAe,CAAC,MAAM,CAAC;IACtC,YAAY,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC;IAClD,MAAM,EAAE,OAAO,eAAe,CAAC,MAAM,CAAC;CAOxC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
/** `<Calendar>` tag — see the export's JSDoc. */
|
|
6
|
-
import { ArrayType, StructType } from "@elaraai/east";
|
|
7
|
-
import { Calendar as CalendarFactory, } from "../../collections/calendar/index.js";
|
|
8
|
-
import { UIComponentType } from "../../component.js";
|
|
9
|
-
/**
|
|
10
|
-
* `<Calendar>` — a day-of-week × week grid coloured by intensity (forecast,
|
|
11
|
-
* demand, OT exposure). Visualisation only: clicking drills into a day, but
|
|
12
|
-
* there are no events, no committed/proposed state, and no drag & drop. The
|
|
13
|
-
* component owns the week — columns are always Mon–Sun; rows appear in
|
|
14
|
-
* first-appearance order of the `week` field.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
19
|
-
* import { East } from "@elaraai/east";
|
|
20
|
-
* import { Calendar, UIComponentType } from "@elaraai/east-ui";
|
|
21
|
-
*
|
|
22
|
-
* const demand = East.function([], UIComponentType, _$ => (
|
|
23
|
-
* <Calendar
|
|
24
|
-
* data={[
|
|
25
|
-
* { week: "W37", day: "Tue", demand: 102.0, lastYear: 95.0 },
|
|
26
|
-
* { week: "W37", day: "Wed", demand: 110.0, lastYear: 101.0 },
|
|
27
|
-
* { week: "W38", day: "Thu", demand: 131.0, lastYear: 112.0 },
|
|
28
|
-
* ]}
|
|
29
|
-
* cell={d => ({
|
|
30
|
-
* week: d.week, day: d.day, value: d.demand, compare: d.lastYear,
|
|
31
|
-
* })}
|
|
32
|
-
* totals={Calendar.totals()}
|
|
33
|
-
* aggregateRow={Calendar.aggregateRow()}
|
|
34
|
-
* footer={Calendar.footer({ valueLabel: "predicted", compareLabel: "last yr", legend: true })}
|
|
35
|
-
* />
|
|
36
|
-
* ));
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Desugars to `Calendar.Root(data, config)`. The `Calendar.scale` / `totals` /
|
|
41
|
-
* `aggregateRow` / `footer` sub-factories are exposed on the tag too.
|
|
42
|
-
*/
|
|
43
|
-
function CalendarTag(props) {
|
|
44
|
-
const { data, ...config } = props;
|
|
45
|
-
return CalendarFactory.Root(data, config);
|
|
46
|
-
}
|
|
47
|
-
export const Calendar = Object.assign(CalendarTag, {
|
|
48
|
-
Types: CalendarFactory.Types,
|
|
49
|
-
scale: CalendarFactory.scale,
|
|
50
|
-
totals: CalendarFactory.totals,
|
|
51
|
-
aggregateRow: CalendarFactory.aggregateRow,
|
|
52
|
-
footer: CalendarFactory.footer,
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=calendar.js.map
|