plggmatic 0.2.1 → 0.2.2
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/Catalog/index.d.ts +17 -0
- package/dist/Catalog/index.d.ts.map +1 -0
- package/dist/Catalog/model/tool.d.ts +101 -0
- package/dist/Catalog/model/tool.d.ts.map +1 -0
- package/dist/Catalog/usecase/adapter.d.ts +81 -0
- package/dist/Catalog/usecase/adapter.d.ts.map +1 -0
- package/dist/Catalog/usecase/catalog.d.ts +43 -0
- package/dist/Catalog/usecase/catalog.d.ts.map +1 -0
- package/dist/Catalog/usecase/runFlow.d.ts +77 -0
- package/dist/Catalog/usecase/runFlow.d.ts.map +1 -0
- package/dist/Component/index.d.ts +28 -0
- package/dist/Component/index.d.ts.map +1 -0
- package/dist/Component/model/interaction.d.ts +41 -0
- package/dist/Component/model/interaction.d.ts.map +1 -0
- package/dist/Component/model/navItem.d.ts +16 -0
- package/dist/Component/model/navItem.d.ts.map +1 -0
- package/dist/Component/usecase/breadcrumb.d.ts +26 -0
- package/dist/Component/usecase/breadcrumb.d.ts.map +1 -0
- package/dist/Component/usecase/button.d.ts +27 -0
- package/dist/Component/usecase/button.d.ts.map +1 -0
- package/dist/Component/usecase/checkbox.d.ts +20 -0
- package/dist/Component/usecase/checkbox.d.ts.map +1 -0
- package/dist/Component/usecase/colHead.d.ts +28 -0
- package/dist/Component/usecase/colHead.d.ts.map +1 -0
- package/dist/Component/usecase/confirmDialog.d.ts +25 -0
- package/dist/Component/usecase/confirmDialog.d.ts.map +1 -0
- package/dist/Component/usecase/navTree.d.ts +21 -0
- package/dist/Component/usecase/navTree.d.ts.map +1 -0
- package/dist/Component/usecase/selectInput.d.ts +28 -0
- package/dist/Component/usecase/selectInput.d.ts.map +1 -0
- package/dist/Component/usecase/textArea.d.ts +22 -0
- package/dist/Component/usecase/textArea.d.ts.map +1 -0
- package/dist/Component/usecase/textInput.d.ts +23 -0
- package/dist/Component/usecase/textInput.d.ts.map +1 -0
- package/dist/Component/usecase/textLink.d.ts +26 -0
- package/dist/Component/usecase/textLink.d.ts.map +1 -0
- package/dist/Component/usecase/themeToggle.d.ts +70 -0
- package/dist/Component/usecase/themeToggle.d.ts.map +1 -0
- package/dist/Component/usecase/toast.d.ts +32 -0
- package/dist/Component/usecase/toast.d.ts.map +1 -0
- package/dist/Component/usecase/typography.d.ts +33 -0
- package/dist/Component/usecase/typography.d.ts.map +1 -0
- package/dist/Declare/model/Action.d.ts +91 -0
- package/dist/Declare/model/Action.d.ts.map +1 -0
- package/dist/Declare/model/Adapter.d.ts +107 -0
- package/dist/Declare/model/Adapter.d.ts.map +1 -0
- package/dist/Declare/model/Collection.d.ts +55 -0
- package/dist/Declare/model/Collection.d.ts.map +1 -0
- package/dist/Declare/model/Declaration.d.ts +27 -0
- package/dist/Declare/model/Declaration.d.ts.map +1 -0
- package/dist/Declare/model/Menu.d.ts +21 -0
- package/dist/Declare/model/Menu.d.ts.map +1 -0
- package/dist/Declare/model/Query.d.ts +56 -0
- package/dist/Declare/model/Query.d.ts.map +1 -0
- package/dist/Declare/model/Row.d.ts +129 -0
- package/dist/Declare/model/Row.d.ts.map +1 -0
- package/dist/Declare/model/Source.d.ts +83 -0
- package/dist/Declare/model/Source.d.ts.map +1 -0
- package/dist/Declare/usecase/apply.d.ts +23 -0
- package/dist/Declare/usecase/apply.d.ts.map +1 -0
- package/dist/Declare/usecase/project.d.ts +66 -0
- package/dist/Declare/usecase/project.d.ts.map +1 -0
- package/dist/Declare/usecase/reconcile.d.ts +63 -0
- package/dist/Declare/usecase/reconcile.d.ts.map +1 -0
- package/dist/Flow/model/forms.d.ts +45 -0
- package/dist/Flow/model/forms.d.ts.map +1 -0
- package/dist/Flow/model/run.d.ts +74 -0
- package/dist/Flow/model/run.d.ts.map +1 -0
- package/dist/Flow/model/script.d.ts +279 -0
- package/dist/Flow/model/script.d.ts.map +1 -0
- package/dist/Flow/usecase/interpret.d.ts +17 -0
- package/dist/Flow/usecase/interpret.d.ts.map +1 -0
- package/dist/Flow/usecase/read.d.ts +46 -0
- package/dist/Flow/usecase/read.d.ts.map +1 -0
- package/dist/Form/index.d.ts +14 -0
- package/dist/Form/index.d.ts.map +1 -0
- package/dist/Form/model/control.d.ts +9 -0
- package/dist/Form/model/control.d.ts.map +1 -0
- package/dist/Form/model/submission.d.ts +30 -0
- package/dist/Form/model/submission.d.ts.map +1 -0
- package/dist/Form/usecase/controlParts.d.ts +30 -0
- package/dist/Form/usecase/controlParts.d.ts.map +1 -0
- package/dist/Form/usecase/formView.d.ts +21 -0
- package/dist/Form/usecase/formView.d.ts.map +1 -0
- package/dist/Form/usecase/parseForm.d.ts +28 -0
- package/dist/Form/usecase/parseForm.d.ts.map +1 -0
- package/dist/Layout/index.d.ts +16 -0
- package/dist/Layout/index.d.ts.map +1 -0
- package/dist/Layout/model/pane.d.ts +15 -0
- package/dist/Layout/model/pane.d.ts.map +1 -0
- package/dist/Layout/usecase/combinators.d.ts +49 -0
- package/dist/Layout/usecase/combinators.d.ts.map +1 -0
- package/dist/Meta/model/identity.d.ts +16 -0
- package/dist/Meta/model/identity.d.ts.map +1 -0
- package/dist/Render/index.d.ts +17 -0
- package/dist/Render/index.d.ts.map +1 -0
- package/dist/Render/model/mode.d.ts +13 -0
- package/dist/Render/model/mode.d.ts.map +1 -0
- package/dist/Render/model/screen.d.ts +27 -0
- package/dist/Render/model/screen.d.ts.map +1 -0
- package/dist/Render/usecase/multiColumn.d.ts +52 -0
- package/dist/Render/usecase/multiColumn.d.ts.map +1 -0
- package/dist/Render/usecase/parts.d.ts +56 -0
- package/dist/Render/usecase/parts.d.ts.map +1 -0
- package/dist/Render/usecase/renderMode.d.ts +17 -0
- package/dist/Render/usecase/renderMode.d.ts.map +1 -0
- package/dist/Render/usecase/singleColumn.d.ts +20 -0
- package/dist/Render/usecase/singleColumn.d.ts.map +1 -0
- package/dist/Schedule/model/Model.d.ts +103 -0
- package/dist/Schedule/model/Model.d.ts.map +1 -0
- package/dist/Schedule/model/Msg.d.ts +131 -0
- package/dist/Schedule/model/Msg.d.ts.map +1 -0
- package/dist/Schedule/model/Scene.d.ts +190 -0
- package/dist/Schedule/model/Scene.d.ts.map +1 -0
- package/dist/Schedule/model/View.d.ts +54 -0
- package/dist/Schedule/model/View.d.ts.map +1 -0
- package/dist/Schedule/usecase/chain.d.ts +16 -0
- package/dist/Schedule/usecase/chain.d.ts.map +1 -0
- package/dist/Schedule/usecase/codec.d.ts +44 -0
- package/dist/Schedule/usecase/codec.d.ts.map +1 -0
- package/dist/Schedule/usecase/lower.d.ts +45 -0
- package/dist/Schedule/usecase/lower.d.ts.map +1 -0
- package/dist/Schedule/usecase/scene.d.ts +16 -0
- package/dist/Schedule/usecase/scene.d.ts.map +1 -0
- package/dist/Schedule/usecase/schedule.d.ts +72 -0
- package/dist/Schedule/usecase/schedule.d.ts.map +1 -0
- package/dist/Schedule/usecase/update.d.ts +39 -0
- package/dist/Schedule/usecase/update.d.ts.map +1 -0
- package/dist/Style/index.d.ts +30 -0
- package/dist/Style/index.d.ts.map +1 -0
- package/dist/Style/model/appearance.d.ts +23 -0
- package/dist/Style/model/appearance.d.ts.map +1 -0
- package/dist/Style/model/breakpoint.d.ts +43 -0
- package/dist/Style/model/breakpoint.d.ts.map +1 -0
- package/dist/Style/model/hexColor.d.ts +24 -0
- package/dist/Style/model/hexColor.d.ts.map +1 -0
- package/dist/Style/model/metric.d.ts +35 -0
- package/dist/Style/model/metric.d.ts.map +1 -0
- package/dist/Style/model/palette.d.ts +38 -0
- package/dist/Style/model/palette.d.ts.map +1 -0
- package/dist/Style/model/scheme.d.ts +26 -0
- package/dist/Style/model/scheme.d.ts.map +1 -0
- package/dist/Style/model/syntax.d.ts +54 -0
- package/dist/Style/model/syntax.d.ts.map +1 -0
- package/dist/Style/model/theme.d.ts +58 -0
- package/dist/Style/model/theme.d.ts.map +1 -0
- package/dist/Style/model/token.d.ts +142 -0
- package/dist/Style/model/token.d.ts.map +1 -0
- package/dist/Style/model/typography.d.ts +83 -0
- package/dist/Style/model/typography.d.ts.map +1 -0
- package/dist/Style/model/zIndex.d.ts +25 -0
- package/dist/Style/model/zIndex.d.ts.map +1 -0
- package/dist/Style/usecase/appearanceScript.d.ts +43 -0
- package/dist/Style/usecase/appearanceScript.d.ts.map +1 -0
- package/dist/Style/usecase/chromeCss.d.ts +41 -0
- package/dist/Style/usecase/chromeCss.d.ts.map +1 -0
- package/dist/Style/usecase/contrast.d.ts +3 -0
- package/dist/Style/usecase/contrast.d.ts.map +1 -0
- package/dist/Style/usecase/metricCss.d.ts +17 -0
- package/dist/Style/usecase/metricCss.d.ts.map +1 -0
- package/dist/Style/usecase/reducedMotion.d.ts +20 -0
- package/dist/Style/usecase/reducedMotion.d.ts.map +1 -0
- package/dist/Style/usecase/schemeCss.d.ts +25 -0
- package/dist/Style/usecase/schemeCss.d.ts.map +1 -0
- package/dist/Style/usecase/syntaxCss.d.ts +14 -0
- package/dist/Style/usecase/syntaxCss.d.ts.map +1 -0
- package/dist/Style/usecase/utilities.d.ts +98 -0
- package/dist/Style/usecase/utilities.d.ts.map +1 -0
- package/dist/brand.d.ts +29 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +4427 -0
- package/dist/styleEntry.d.ts +29 -0
- package/dist/styleEntry.d.ts.map +1 -0
- package/dist/styleEntry.es.js +1036 -0
- package/package.json +4 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plggmatic Render module: the screen-mode renderers
|
|
3
|
+
* (D10) — pure projections of ticket 09's scheduled
|
|
4
|
+
* `Scene` into a display. The multi-column mode (ticket
|
|
5
|
+
* 10) and the single-column mode + runtime `Mode`
|
|
6
|
+
* dispatcher (ticket 11) live here; each is
|
|
7
|
+
* `(Scene) => Html<SchedulerMsg>`, stores no state, and
|
|
8
|
+
* touches no `window`. `renderMode(mode)(scene)` is the
|
|
9
|
+
* public entry; the two renderers are exported for direct
|
|
10
|
+
* use and testing.
|
|
11
|
+
*/
|
|
12
|
+
export { type Mode, modes, toggleMode, } from "./model/mode";
|
|
13
|
+
export { type Screen, currentScreen, } from "./model/screen";
|
|
14
|
+
export { type HeaderLink, type ExtraColumn, type MultiColumnOptions, multiColumn, multiColumnWith, crumbsOf, } from "./usecase/multiColumn";
|
|
15
|
+
export { singleColumn } from "./usecase/singleColumn";
|
|
16
|
+
export { renderMode } from "./usecase/renderMode";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,EACL,UAAU,GACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,MAAM,EACX,aAAa,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,WAAW,EACX,eAAe,EACf,QAAQ,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The display mode a consuming app holds BESIDE the
|
|
3
|
+
* scheduled model (never inside it, never in the
|
|
4
|
+
* declaration, never in the URL — D10). A closed union so
|
|
5
|
+
* the render dispatcher's `match` is exhaustive: adding a
|
|
6
|
+
* third mode is a `tsc` error at the dispatcher, not a
|
|
7
|
+
* blank screen. Pure data — no persistence, no DOM.
|
|
8
|
+
*/
|
|
9
|
+
export type Mode = "multiColumn" | "singleColumn";
|
|
10
|
+
export declare const modes: ReadonlyArray<Mode>;
|
|
11
|
+
/** Flips the mode — the runtime toggle a consumer wires. */
|
|
12
|
+
export declare const toggleMode: (m: Mode) => Mode;
|
|
13
|
+
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../../src/Render/model/mode.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,IAAI,GAAG,aAAa,GAAG,cAAc,CAAC;AAElD,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,IAAI,CAGrC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,UAAU,GAAI,GAAG,IAAI,KAAG,IAGlB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Option } from "plgg";
|
|
2
|
+
import { type Scene, type Level } from "../../Schedule/model/Scene";
|
|
3
|
+
/**
|
|
4
|
+
* The single-column mode shows ONE operation per screen —
|
|
5
|
+
* and the current screen is DERIVED, never stored (the
|
|
6
|
+
* strongest answer to ticket 09's tenet (g): this
|
|
7
|
+
* renderer holds no state at all). The current screen is
|
|
8
|
+
* the DEEPEST level of the scheduled `Scene` (the menu
|
|
9
|
+
* when nothing is open, the deepest list while browsing,
|
|
10
|
+
* the detail when an item is selected). A `Level` already
|
|
11
|
+
* IS the screen union (menu / list / detail), so `Screen`
|
|
12
|
+
* aliases it; the confirmation is a renderer-owned overlay
|
|
13
|
+
* in both modes (parity is reachability, not identical
|
|
14
|
+
* DOM). The back target for each screen is the level's own
|
|
15
|
+
* truncating `back`, obtained from the scheduler — never
|
|
16
|
+
* recomputed renderer-side.
|
|
17
|
+
*/
|
|
18
|
+
export type Screen = Level;
|
|
19
|
+
/**
|
|
20
|
+
* The current screen — the deepest level. `None` only for
|
|
21
|
+
* a structurally-empty scene (the scheduler always emits
|
|
22
|
+
* at least the menu level, so in practice this is
|
|
23
|
+
* `Some`); the renderer degrades to an empty screen rather
|
|
24
|
+
* than crashing.
|
|
25
|
+
*/
|
|
26
|
+
export declare const currentScreen: (scene: Scene) => Option<Screen>;
|
|
27
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/Render/model/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,MAAM,CAAC;AACjD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,KAAK,EACX,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,KAAK,KACX,MAAM,CAAC,MAAM,CAGb,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
import { type Html } from "plgg-view";
|
|
3
|
+
import { type Crumb } from "../../Component/usecase/breadcrumb";
|
|
4
|
+
import { type SchedulerMsg } from "../../Schedule/model/Msg";
|
|
5
|
+
import { type Scene } from "../../Schedule/model/Scene";
|
|
6
|
+
export type HeaderLink = Readonly<{
|
|
7
|
+
collection: SoftStr;
|
|
8
|
+
label: SoftStr;
|
|
9
|
+
href: SoftStr;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export type ExtraColumn<Msg> = Readonly<{
|
|
13
|
+
key: SoftStr;
|
|
14
|
+
title: SoftStr;
|
|
15
|
+
close: Option<SoftStr>;
|
|
16
|
+
body: ReadonlyArray<Html<Msg>>;
|
|
17
|
+
}>;
|
|
18
|
+
export type MultiColumnOptions<Msg> = Readonly<{
|
|
19
|
+
mapMsg: (msg: SchedulerMsg) => Msg;
|
|
20
|
+
headerLinks?: ReadonlyArray<HeaderLink>;
|
|
21
|
+
extraColumns?: ReadonlyArray<ExtraColumn<Msg>>;
|
|
22
|
+
/**
|
|
23
|
+
* When true, the internal breadcrumb is not rendered —
|
|
24
|
+
* the consumer renders its own, e.g. in an app navbar.
|
|
25
|
+
*/
|
|
26
|
+
omitBreadcrumb?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* App-owned columns inserted right AFTER the menu column
|
|
29
|
+
* and before the collection's list/detail columns — e.g.
|
|
30
|
+
* a section sub-menu. Rendered in order; empty when the
|
|
31
|
+
* consumer provides none.
|
|
32
|
+
*/
|
|
33
|
+
afterMenu?: ReadonlyArray<ExtraColumn<Msg>>;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* The MULTI-COLUMN mode renderer (D10) — a pure
|
|
37
|
+
* projection of ticket 09's scheduled {@link Scene} into
|
|
38
|
+
* panes expanding rightward. The base renderer is kept
|
|
39
|
+
* lightweight; consumers that need app-specific actions or
|
|
40
|
+
* forms can use {@link multiColumnWith} to add header links
|
|
41
|
+
* and arbitrary extra columns without teaching the
|
|
42
|
+
* scheduler those domain concepts.
|
|
43
|
+
*/
|
|
44
|
+
export declare const multiColumn: (scene: Scene) => Html<SchedulerMsg, "div">;
|
|
45
|
+
export declare const multiColumnWith: <Msg>(scene: Scene, options: MultiColumnOptions<Msg>) => Html<Msg, "div">;
|
|
46
|
+
/**
|
|
47
|
+
* One crumb per level; each crumb links to the URL that
|
|
48
|
+
* makes ITS level the deepest — obtained as the NEXT
|
|
49
|
+
* level's `back` (which truncates to exactly there).
|
|
50
|
+
*/
|
|
51
|
+
export declare const crumbsOf: (scene: Scene) => ReadonlyArray<Crumb>;
|
|
52
|
+
//# sourceMappingURL=multiColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiColumn.d.ts","sourceRoot":"","sources":["../../../src/Render/usecase/multiColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAQZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EAUV,MAAM,WAAW,CAAC;AAanB,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,wCAAwC,CAA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AAM,QAAQ,GACnB,OAAO,KAAK,KACX,aAAa,CAAC,KAAK,CAYnB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
import { type Html } from "plgg-view";
|
|
3
|
+
import { type SchedulerMsg } from "../../Schedule/model/Msg";
|
|
4
|
+
import { type ConfirmPrompt, type ActionButton, type QueryState, type RowLink, type MenuLink, type Tile, type DetailField } from "../../Schedule/model/Scene";
|
|
5
|
+
/**
|
|
6
|
+
* The rendering pieces BOTH mode renderers (multi-column,
|
|
7
|
+
* single-column) share — so the two projections of the
|
|
8
|
+
* same {@link Scene} can never drift (mode parity is the
|
|
9
|
+
* proof obligation of ticket 11): the confirmation
|
|
10
|
+
* overlay, the action buttons, the query box, the list
|
|
11
|
+
* rows, the menu nav, and the detail fields. Navigation
|
|
12
|
+
* is links (the runtime turns an in-app `<a>` click into
|
|
13
|
+
* `onUrlChange`); the query, actions, and confirmation
|
|
14
|
+
* dispatch scheduler `Msg`s.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The confirmation, if parked — rendered by ticket 12's
|
|
18
|
+
* framework `confirmDialog` (a real `role="dialog"` /
|
|
19
|
+
* `aria-modal` modal with a backdrop), so both renderers
|
|
20
|
+
* get the accessible dialog. Backdrop-click and Cancel
|
|
21
|
+
* dispatch `cancelAction`, Confirm dispatches
|
|
22
|
+
* `confirmAction`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const confirmOverlay: (confirm: Option<ConfirmPrompt>) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
25
|
+
/** The action buttons for a collection (empty when none). */
|
|
26
|
+
export declare const actionRow: (collection: SoftStr, target: Option<SoftStr>, actions: ReadonlyArray<ActionButton>) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
27
|
+
/** The query controls (empty when the list has no query). */
|
|
28
|
+
export declare const queryField: (q: Option<QueryState>) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
29
|
+
/** One list row as a drilling link (`aria-current` when active). */
|
|
30
|
+
export declare const rowItem: (r: RowLink) => Html<SchedulerMsg, "li">;
|
|
31
|
+
/** A row list. */
|
|
32
|
+
export declare const rowList: (rows: ReadonlyArray<RowLink>) => Html<SchedulerMsg, "ul">;
|
|
33
|
+
/**
|
|
34
|
+
* A board's tile grid — the shared `BoardLevel` fold of
|
|
35
|
+
* BOTH mode renderers (the parity obligation), as the
|
|
36
|
+
* `rowList`/`detailFields` parts are for the other level
|
|
37
|
+
* kinds.
|
|
38
|
+
*/
|
|
39
|
+
export declare const tileGrid: (tiles: ReadonlyArray<Tile>) => Html<SchedulerMsg, "ul">;
|
|
40
|
+
/** The menu entries as a `navTree`, active one marked. */
|
|
41
|
+
export declare const menuNav: (entries: ReadonlyArray<MenuLink>) => Html<SchedulerMsg>;
|
|
42
|
+
/** A loading hint line (empty when not loading). */
|
|
43
|
+
export declare const loadingHint: (loading: boolean) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
44
|
+
/** A failure hint line (empty when no error). */
|
|
45
|
+
export declare const errorHint: (error: Option<SoftStr>) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
46
|
+
/**
|
|
47
|
+
* The detail fields block. A field's `label` is rendered
|
|
48
|
+
* as a caption above its value when non-empty; an empty
|
|
49
|
+
* label (a body paragraph) renders the value alone — the
|
|
50
|
+
* emptiness is presentation. Values render by their
|
|
51
|
+
* {@link FieldValue} kind via {@link valueNode}.
|
|
52
|
+
*/
|
|
53
|
+
export declare const detailFields: (fields: ReadonlyArray<DetailField>) => Html<SchedulerMsg, "div">;
|
|
54
|
+
/** A labelled back affordance (a truncating link), if any. */
|
|
55
|
+
export declare const backControl: (back: Option<SoftStr>) => ReadonlyArray<Html<SchedulerMsg>>;
|
|
56
|
+
//# sourceMappingURL=parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/Render/usecase/parts.ts"],"names":[],"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O,GAClB,SAAS,aAAa,CAAC,QAAQ,CAAC,KAC/B,IAAI,CAAC,YAAY,CAWjB,CAAC;AAWJ,oDAAoD;AACpD,eAAO,MAAM,WAAW,GACtB,SAAS,OAAO,KACf,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAQ3B,CAAC;AAET,iDAAiD;AACjD,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,CAAC,OAAO,CAAC,KACrB,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAYzB,CAAC;AAoGX;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,aAAa,CAAC,WAAW,CAAC,KACjC,IAAI,CAAC,YAAY,EAAE,KAAK,CA8BxB,CAAC;AAEJ,8DAA8D;AAC9D,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,CAAC,OAAO,CAAC,KACpB,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAgB1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Html } from "plgg-view";
|
|
2
|
+
import { type SchedulerMsg } from "../../Schedule/model/Msg";
|
|
3
|
+
import { type Scene } from "../../Schedule/model/Scene";
|
|
4
|
+
import { type Mode } from "../model/mode";
|
|
5
|
+
/**
|
|
6
|
+
* The runtime render dispatcher (D10) — the PUBLIC entry a
|
|
7
|
+
* consuming app calls: `renderMode(mode)(scene)`. It
|
|
8
|
+
* exhaustively matches the closed {@link Mode} to a
|
|
9
|
+
* renderer, so adding a mode without a renderer is a `tsc`
|
|
10
|
+
* error here, not a runtime fallback. Because both
|
|
11
|
+
* renderers are pure projections of the SAME scene, a mode
|
|
12
|
+
* flip mid-flow is loss-free by construction: same flow
|
|
13
|
+
* position, selection, query, pending confirmation, and
|
|
14
|
+
* URL — only the projection changes.
|
|
15
|
+
*/
|
|
16
|
+
export declare const renderMode: (mode: Mode) => (scene: Scene) => Html<SchedulerMsg, "div">;
|
|
17
|
+
//# sourceMappingURL=renderMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderMode.d.ts","sourceRoot":"","sources":["../../../src/Render/usecase/renderMode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAIxD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GACpB,MAAM,IAAI,MACV,OAAO,KAAK,KAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAOvC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Html } from "plgg-view";
|
|
2
|
+
import { type SchedulerMsg } from "../../Schedule/model/Msg";
|
|
3
|
+
import { type Scene } from "../../Schedule/model/Scene";
|
|
4
|
+
/**
|
|
5
|
+
* The SINGLE-COLUMN mode renderer (D10) — one operation
|
|
6
|
+
* per screen. A pure projection of the SAME scheduled
|
|
7
|
+
* {@link Scene} the multi-column renderer draws: the
|
|
8
|
+
* current screen is derived (the deepest level), the menu
|
|
9
|
+
* screen is a `navigation` landmark and every other screen
|
|
10
|
+
* a single `main`, and each non-root screen shows a
|
|
11
|
+
* labelled back affordance (a truncating link — the
|
|
12
|
+
* runtime turns the click into the scheduler's navigation,
|
|
13
|
+
* and browser Back pops one screen because traversal
|
|
14
|
+
* pushes history). Shares the interactive pieces with the
|
|
15
|
+
* multi-column renderer through {@link parts}, so the two
|
|
16
|
+
* modes stay in parity. Holds no state, touches no
|
|
17
|
+
* `window`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const singleColumn: (scene: Scene) => Html<SchedulerMsg, "div">;
|
|
20
|
+
//# sourceMappingURL=singleColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleColumn.d.ts","sourceRoot":"","sources":["../../../src/Render/usecase/singleColumn.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,WAAW,CAAC;AAOnB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,KAAK,KAAK,EAOX,MAAM,gCAAgC,CAAC;AAoBxC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,KACX,IAAI,CAAC,YAAY,EAAE,KAAK,CAwBxB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type SoftStr, type Box, type Icon, type Option } from "plgg";
|
|
2
|
+
import { type Row } from "../../Declare/model/Row";
|
|
3
|
+
import { type Action } from "../../Declare/model/Action";
|
|
4
|
+
/**
|
|
5
|
+
* A collection's load state — the resource slot. `Idle`
|
|
6
|
+
* before a read, `Loading` while a `Cmd` is in flight,
|
|
7
|
+
* `Loaded` with rows, `Failed` with a message. A closed
|
|
8
|
+
* union so a renderer must acknowledge every state (no
|
|
9
|
+
* bare "maybe null rows").
|
|
10
|
+
*/
|
|
11
|
+
export type Slot = Icon<"Idle"> | Icon<"Loading"> | Box<"Loaded", ReadonlyArray<Row>> | Box<"Failed", SoftStr>;
|
|
12
|
+
/** The idle slot (never read). */
|
|
13
|
+
export declare const idle: () => Slot;
|
|
14
|
+
/** The loading slot (a read is in flight). */
|
|
15
|
+
export declare const loading: () => Slot;
|
|
16
|
+
/** A loaded slot carrying rows. */
|
|
17
|
+
export declare const loadedSlot: (rows: ReadonlyArray<Row>) => Slot;
|
|
18
|
+
/** A failed slot carrying a message. */
|
|
19
|
+
export declare const failedSlot: (error: SoftStr) => Slot;
|
|
20
|
+
/** Matchers for folding a {@link Slot}. */
|
|
21
|
+
export declare const idle$: () => {
|
|
22
|
+
__tag: "Idle";
|
|
23
|
+
type: "tag";
|
|
24
|
+
body: undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare const loading$: () => {
|
|
27
|
+
__tag: "Loading";
|
|
28
|
+
type: "tag";
|
|
29
|
+
body: undefined;
|
|
30
|
+
};
|
|
31
|
+
export declare const loadedSlot$: () => {
|
|
32
|
+
__tag: "Loaded";
|
|
33
|
+
type: "tag";
|
|
34
|
+
body: undefined;
|
|
35
|
+
};
|
|
36
|
+
export declare const failedSlot$: () => {
|
|
37
|
+
__tag: "Failed";
|
|
38
|
+
type: "tag";
|
|
39
|
+
body: undefined;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A destructive action parked awaiting confirmation — the
|
|
43
|
+
* scheduler state that makes confirm/cancel modeless and
|
|
44
|
+
* data-driven (not renderer folklore). Carries which
|
|
45
|
+
* collection, the full {@link Action} (run on confirm),
|
|
46
|
+
* the target row id (`None` for a create), and the
|
|
47
|
+
* `prompt`/`destructive` copied off the action's
|
|
48
|
+
* `Confirm` at park time — so the scene reads them
|
|
49
|
+
* directly, with no match over a branch that can never
|
|
50
|
+
* be parked (only a `Confirm` action ever parks).
|
|
51
|
+
*/
|
|
52
|
+
export type PendingAction = Readonly<{
|
|
53
|
+
collection: SoftStr;
|
|
54
|
+
action: Action;
|
|
55
|
+
target: Option<SoftStr>;
|
|
56
|
+
prompt: SoftStr;
|
|
57
|
+
destructive: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* The scheduled model — everything plgg-view's
|
|
61
|
+
* `Application` needs minus the view, carrying ONLY
|
|
62
|
+
* mode-independent truth (design tenet g): the mount
|
|
63
|
+
* `base`, the chosen `root` collection, the drill-down
|
|
64
|
+
* `path` of selected row ids (root→leaf), the active
|
|
65
|
+
* `query` text with the chosen `queryChoices` values (the
|
|
66
|
+
* declared typed query fields, point 4), the
|
|
67
|
+
* per-collection load `slots`, and the `pending`
|
|
68
|
+
* confirmation. "Which single screen is focused" is
|
|
69
|
+
* derived (`focusedView`), never stored.
|
|
70
|
+
*
|
|
71
|
+
* `slots` is an assoc list (not a `Dict`, whose values
|
|
72
|
+
* must be `Datum`): lookup is a total helper returning
|
|
73
|
+
* `Idle` for an absent key.
|
|
74
|
+
*/
|
|
75
|
+
export type Model = Readonly<{
|
|
76
|
+
base: SoftStr;
|
|
77
|
+
root: Option<SoftStr>;
|
|
78
|
+
path: ReadonlyArray<SoftStr>;
|
|
79
|
+
query: SoftStr;
|
|
80
|
+
queryChoices: ReadonlyArray<readonly [SoftStr, SoftStr]>;
|
|
81
|
+
slots: ReadonlyArray<readonly [SoftStr, Slot]>;
|
|
82
|
+
pending: Option<PendingAction>;
|
|
83
|
+
}>;
|
|
84
|
+
/** The empty model at a mount `base`. */
|
|
85
|
+
export declare const emptyModel: (base: SoftStr) => Model;
|
|
86
|
+
/**
|
|
87
|
+
* The chosen value of a declared query choice, or `""`
|
|
88
|
+
* (no filter) when unset. Total — an assoc lookup folded
|
|
89
|
+
* through `Option`.
|
|
90
|
+
*/
|
|
91
|
+
export declare const choiceOf: (model: Model, choice: SoftStr) => SoftStr;
|
|
92
|
+
/**
|
|
93
|
+
* A collection's slot, or `Idle` if never read. Total —
|
|
94
|
+
* an assoc lookup folded through `Option`, no dead index
|
|
95
|
+
* guard (the pair is destructured in the `Some` branch).
|
|
96
|
+
*/
|
|
97
|
+
export declare const slotOf: (model: Model, collection: SoftStr) => Slot;
|
|
98
|
+
/**
|
|
99
|
+
* Sets a collection's slot, replacing any prior entry.
|
|
100
|
+
* Pure — returns a new slots list.
|
|
101
|
+
*/
|
|
102
|
+
export declare const setSlot: (model: Model, collection: SoftStr, slot: Slot) => Model;
|
|
103
|
+
//# sourceMappingURL=Model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../../src/Schedule/model/Model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,MAAM,EAQZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KA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E,OAAO,CAAC;IACf,YAAY,EAAE,aAAa,CACzB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAC5B,CAAC;IACF,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,yCAAyC;AACzC,eAAO,MAAM,UAAU,GACrB,MAAM,OAAO,KACZ,KAQD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,KAAK,EACZ,QAAQ,OAAO,KACd,OAcA,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,EACZ,YAAY,OAAO,KAClB,IAWA,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,OAAO,GAClB,OAAO,KAAK,EACZ,YAAY,OAAO,EACnB,MAAM,IAAI,KACT,KAQD,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type SoftStr, type Box, type Icon, type Option } from "plgg";
|
|
2
|
+
import { type Url } from "plgg-view/client";
|
|
3
|
+
import { type Row } from "../../Declare/model/Row";
|
|
4
|
+
import { type View, type Binding } from "./View";
|
|
5
|
+
/**
|
|
6
|
+
* Everything that can happen to a scheduled program, as
|
|
7
|
+
* pure data — the derived `Msg` union of `schedule(...)`.
|
|
8
|
+
* A closed union consumed by the derived `update` with an
|
|
9
|
+
* exhaustive `match`, so a new interaction cannot be
|
|
10
|
+
* added without every interpreter site acknowledging it.
|
|
11
|
+
*
|
|
12
|
+
* - `Navigate` — the CORE navigation: go to a `View` with
|
|
13
|
+
* its ancestor `Binding`s (mission decision,
|
|
14
|
+
* 2026-07-12). Every other navigation message is a
|
|
15
|
+
* special case the scheduler lowers onto this one.
|
|
16
|
+
* - `UrlChanged` — a navigation (link/back/forward) the
|
|
17
|
+
* runtime turned into a message.
|
|
18
|
+
* - `OpenMenu` — a menu entry chose a root collection
|
|
19
|
+
* (≡ `Navigate` to that collection's list view).
|
|
20
|
+
* - `Select` — a row at a flow `level` was selected
|
|
21
|
+
* (≡ `Navigate` to the view the selection drills into).
|
|
22
|
+
* - `QueryInput` — the active list's keyword text
|
|
23
|
+
* changed.
|
|
24
|
+
* - `QueryChoiceInput` — a declared query choice (typed
|
|
25
|
+
* query field, point 4) was set (`""` clears it).
|
|
26
|
+
* - `RequestAction` — an action was requested on a
|
|
27
|
+
* collection (with an optional target row).
|
|
28
|
+
* - `ConfirmAction` / `CancelAction` — resolve a parked
|
|
29
|
+
* destructive confirmation.
|
|
30
|
+
* - `Loaded` / `Failed` — an async collection read (or an
|
|
31
|
+
* action's re-read) resolved.
|
|
32
|
+
*/
|
|
33
|
+
export type SchedulerMsg = Box<"Navigate", Readonly<{
|
|
34
|
+
to: View;
|
|
35
|
+
with: ReadonlyArray<Binding>;
|
|
36
|
+
}>> | Box<"UrlChanged", Url> | Box<"OpenMenu", SoftStr> | Box<"Select", Readonly<{
|
|
37
|
+
level: number;
|
|
38
|
+
id: SoftStr;
|
|
39
|
+
}>> | Box<"QueryInput", SoftStr> | Box<"QueryChoiceInput", Readonly<{
|
|
40
|
+
choice: SoftStr;
|
|
41
|
+
value: SoftStr;
|
|
42
|
+
}>> | Box<"RequestAction", Readonly<{
|
|
43
|
+
collection: SoftStr;
|
|
44
|
+
action: SoftStr;
|
|
45
|
+
target: Option<SoftStr>;
|
|
46
|
+
}>> | Icon<"ConfirmAction"> | Icon<"CancelAction"> | Box<"Loaded", Readonly<{
|
|
47
|
+
collection: SoftStr;
|
|
48
|
+
rows: ReadonlyArray<Row>;
|
|
49
|
+
}>> | Box<"Failed", Readonly<{
|
|
50
|
+
collection: SoftStr;
|
|
51
|
+
error: SoftStr;
|
|
52
|
+
}>>;
|
|
53
|
+
/** Constructs a {@link SchedulerMsg} `Navigate`. */
|
|
54
|
+
export declare const navigate: (to: View, bindings: ReadonlyArray<Binding>) => SchedulerMsg;
|
|
55
|
+
/** Constructs a {@link SchedulerMsg} `UrlChanged`. */
|
|
56
|
+
export declare const urlChanged: (url: Url) => SchedulerMsg;
|
|
57
|
+
/** Constructs a {@link SchedulerMsg} `OpenMenu`. */
|
|
58
|
+
export declare const openMenu: (collection: SoftStr) => SchedulerMsg;
|
|
59
|
+
/** Constructs a {@link SchedulerMsg} `Select`. */
|
|
60
|
+
export declare const select: (level: number, id: SoftStr) => SchedulerMsg;
|
|
61
|
+
/** Constructs a {@link SchedulerMsg} `QueryInput`. */
|
|
62
|
+
export declare const queryInput: (text: SoftStr) => SchedulerMsg;
|
|
63
|
+
/** Constructs a {@link SchedulerMsg} `QueryChoiceInput`. */
|
|
64
|
+
export declare const queryChoiceInput: (choice: SoftStr, value: SoftStr) => SchedulerMsg;
|
|
65
|
+
/** Constructs a {@link SchedulerMsg} `RequestAction`. */
|
|
66
|
+
export declare const requestAction: (collection: SoftStr, action: SoftStr, target: Option<SoftStr>) => SchedulerMsg;
|
|
67
|
+
/** Constructs a {@link SchedulerMsg} `ConfirmAction`. */
|
|
68
|
+
export declare const confirmAction: () => SchedulerMsg;
|
|
69
|
+
/** Constructs a {@link SchedulerMsg} `CancelAction`. */
|
|
70
|
+
export declare const cancelAction: () => SchedulerMsg;
|
|
71
|
+
/** Constructs a {@link SchedulerMsg} `Loaded`. */
|
|
72
|
+
export declare const loaded: (collection: SoftStr, rows: ReadonlyArray<Row>) => SchedulerMsg;
|
|
73
|
+
/** Constructs a {@link SchedulerMsg} `Failed`. */
|
|
74
|
+
export declare const failed: (collection: SoftStr, error: SoftStr) => SchedulerMsg;
|
|
75
|
+
/** Matchers for folding a {@link SchedulerMsg}. */
|
|
76
|
+
export declare const navigate$: () => {
|
|
77
|
+
__tag: "Navigate";
|
|
78
|
+
type: "tag";
|
|
79
|
+
body: undefined;
|
|
80
|
+
};
|
|
81
|
+
export declare const urlChanged$: () => {
|
|
82
|
+
__tag: "UrlChanged";
|
|
83
|
+
type: "tag";
|
|
84
|
+
body: undefined;
|
|
85
|
+
};
|
|
86
|
+
export declare const openMenu$: () => {
|
|
87
|
+
__tag: "OpenMenu";
|
|
88
|
+
type: "tag";
|
|
89
|
+
body: undefined;
|
|
90
|
+
};
|
|
91
|
+
export declare const select$: () => {
|
|
92
|
+
__tag: "Select";
|
|
93
|
+
type: "tag";
|
|
94
|
+
body: undefined;
|
|
95
|
+
};
|
|
96
|
+
export declare const queryInput$: () => {
|
|
97
|
+
__tag: "QueryInput";
|
|
98
|
+
type: "tag";
|
|
99
|
+
body: undefined;
|
|
100
|
+
};
|
|
101
|
+
export declare const queryChoiceInput$: () => {
|
|
102
|
+
__tag: "QueryChoiceInput";
|
|
103
|
+
type: "tag";
|
|
104
|
+
body: undefined;
|
|
105
|
+
};
|
|
106
|
+
export declare const requestAction$: () => {
|
|
107
|
+
__tag: "RequestAction";
|
|
108
|
+
type: "tag";
|
|
109
|
+
body: undefined;
|
|
110
|
+
};
|
|
111
|
+
export declare const confirmAction$: () => {
|
|
112
|
+
__tag: "ConfirmAction";
|
|
113
|
+
type: "tag";
|
|
114
|
+
body: undefined;
|
|
115
|
+
};
|
|
116
|
+
export declare const cancelAction$: () => {
|
|
117
|
+
__tag: "CancelAction";
|
|
118
|
+
type: "tag";
|
|
119
|
+
body: undefined;
|
|
120
|
+
};
|
|
121
|
+
export declare const loaded$: () => {
|
|
122
|
+
__tag: "Loaded";
|
|
123
|
+
type: "tag";
|
|
124
|
+
body: undefined;
|
|
125
|
+
};
|
|
126
|
+
export declare const failed$: () => {
|
|
127
|
+
__tag: "Failed";
|
|
128
|
+
type: "tag";
|
|
129
|
+
body: undefined;
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=Msg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Msg.d.ts","sourceRoot":"","sources":["../../../src/Schedule/model/Msg.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,IAAI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