plggmatic 0.2.1 → 0.3.0
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/README.md +37 -0
- 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 +30 -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/declaredForm.d.ts +89 -0
- package/dist/Component/usecase/declaredForm.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/sidebarNav.d.ts +77 -0
- package/dist/Component/usecase/sidebarNav.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 +75 -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 +21 -0
- package/dist/Layout/index.d.ts.map +1 -0
- package/dist/Layout/model/geometry.d.ts +97 -0
- package/dist/Layout/model/geometry.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/model/reveal.d.ts +26 -0
- package/dist/Layout/model/reveal.d.ts.map +1 -0
- package/dist/Layout/usecase/combinators.d.ts +78 -0
- package/dist/Layout/usecase/combinators.d.ts.map +1 -0
- package/dist/Layout/usecase/preference.d.ts +27 -0
- package/dist/Layout/usecase/preference.d.ts.map +1 -0
- package/dist/Layout/usecase/revealColumn.d.ts +39 -0
- package/dist/Layout/usecase/revealColumn.d.ts.map +1 -0
- package/dist/Layout/usecase/workspace.d.ts +58 -0
- package/dist/Layout/usecase/workspace.d.ts.map +1 -0
- package/dist/Meta/model/classHooks.d.ts +141 -0
- package/dist/Meta/model/classHooks.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/Navigate/index.d.ts +19 -0
- package/dist/Navigate/index.d.ts.map +1 -0
- package/dist/Navigate/model/Composition.d.ts +50 -0
- package/dist/Navigate/model/Composition.d.ts.map +1 -0
- package/dist/Navigate/model/Trail.d.ts +84 -0
- package/dist/Navigate/model/Trail.d.ts.map +1 -0
- package/dist/Navigate/model/marker.d.ts +44 -0
- package/dist/Navigate/model/marker.d.ts.map +1 -0
- package/dist/Navigate/usecase/compositionUrl.d.ts +63 -0
- package/dist/Navigate/usecase/compositionUrl.d.ts.map +1 -0
- package/dist/Navigate/usecase/navigationScript.d.ts +16 -0
- package/dist/Navigate/usecase/navigationScript.d.ts.map +1 -0
- package/dist/Navigate/usecase/trailUrl.d.ts +61 -0
- package/dist/Navigate/usecase/trailUrl.d.ts.map +1 -0
- package/dist/Render/index.d.ts +18 -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/advanceColumns.d.ts +41 -0
- package/dist/Render/usecase/advanceColumns.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 +34 -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/componentSlot.d.ts +35 -0
- package/dist/Style/model/componentSlot.d.ts.map +1 -0
- package/dist/Style/model/hexColor.d.ts +26 -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 +68 -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/runwayCss.d.ts +50 -0
- package/dist/Style/usecase/runwayCss.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/slotCss.d.ts +73 -0
- package/dist/Style/usecase/slotCss.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/Style/usecase/workspaceCss.d.ts +48 -0
- package/dist/Style/usecase/workspaceCss.d.ts.map +1 -0
- package/dist/brand.d.ts +29 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/columnsEntry.d.ts +27 -0
- package/dist/columnsEntry.d.ts.map +1 -0
- package/dist/columnsEntry.es.js +452 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +6022 -0
- package/dist/styleEntry.d.ts +34 -0
- package/dist/styleEntry.d.ts.map +1 -0
- package/dist/styleEntry.es.js +1615 -0
- package/package.json +15 -8
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plggmatic Navigate module: the strip's SCREEN STATE
|
|
3
|
+
* and how a URL carries it. A composition is an ordered
|
|
4
|
+
* list of `(route, optional highlighted span)` — one
|
|
5
|
+
* concept for a strip you walked into by following links
|
|
6
|
+
* and a strip something assembled for you, because they
|
|
7
|
+
* are the same object.
|
|
8
|
+
*
|
|
9
|
+
* The framework owns this because the framework emits the
|
|
10
|
+
* strip: a product renders columns, it does not decide
|
|
11
|
+
* what a column IS or how a strip is addressed.
|
|
12
|
+
*/
|
|
13
|
+
export { type Column, type Composition, columnOf, columnWithSpan, soloComposition, columnsOf, } from "./model/Composition";
|
|
14
|
+
export { restParam, spanParam, entrySeparator, fieldSeparator, escapeChar, decodeComposition, compositionQuery, compositionHref, } from "./usecase/compositionUrl";
|
|
15
|
+
export { stripAttr, columnAttr, spanAttr, navHookName, strip, documentColumn, } from "./model/marker";
|
|
16
|
+
export { navigationInitScript, injectNavigationScript, } from "./usecase/navigationScript";
|
|
17
|
+
export { type Trail, type TrailResolver, type TrailColumn, resolveTrail, settledTrail, foldTrail, stepFrom, restep, } from "./model/Trail";
|
|
18
|
+
export { type StepCodec, trailParam, stepSeparator, encodeTrail, decodeTrail, trailQuery, printSteps, parseSteps, } from "./usecase/trailUrl";
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Navigate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,SAAS,GACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,WAAW,EACX,KAAK,EACL,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,MAAM,GACP,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,SAAS,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* ONE open document in the strip: the route it was read
|
|
4
|
+
* from, and — optionally — the verbatim passage inside it
|
|
5
|
+
* the reader's attention was sent to.
|
|
6
|
+
*
|
|
7
|
+
* The span is deliberately the document's OWN text rather
|
|
8
|
+
* than an offset or a heading id: it is located in the
|
|
9
|
+
* document exactly once or not at all, so a passage that
|
|
10
|
+
* was paraphrased instead of quoted cannot address
|
|
11
|
+
* anything (the `edit_doc` locator's contract, reused).
|
|
12
|
+
*/
|
|
13
|
+
export type Column = Readonly<{
|
|
14
|
+
route: SoftStr;
|
|
15
|
+
span: Option<SoftStr>;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* The screen, modelled ONCE: an ordered list of columns,
|
|
19
|
+
* left to right. `head` is the document the URL's own path
|
|
20
|
+
* names — so every composition is also an ordinary,
|
|
21
|
+
* self-sufficient page — and `rest` are the columns opened
|
|
22
|
+
* to its right.
|
|
23
|
+
*
|
|
24
|
+
* Non-empty BY CONSTRUCTION. There is no empty composition
|
|
25
|
+
* to defend against anywhere downstream, which is why the
|
|
26
|
+
* head is a field rather than `list[0]`.
|
|
27
|
+
*
|
|
28
|
+
* The load-bearing decision of the strip is that this is
|
|
29
|
+
* not a trail. Following a link is merely the case where
|
|
30
|
+
* `rest` grew by one; a set of columns an assistant
|
|
31
|
+
* assembled from documents that link to nothing is the
|
|
32
|
+
* same value, arriving by a different route.
|
|
33
|
+
*/
|
|
34
|
+
export type Composition = Readonly<{
|
|
35
|
+
head: Column;
|
|
36
|
+
rest: ReadonlyArray<Column>;
|
|
37
|
+
}>;
|
|
38
|
+
/** One column at a route, with no passage marked. */
|
|
39
|
+
export declare const columnOf: (route: SoftStr) => Column;
|
|
40
|
+
/** One column at a route, with a passage marked. */
|
|
41
|
+
export declare const columnWithSpan: (route: SoftStr, span: Option<SoftStr>) => Column;
|
|
42
|
+
/** The composition showing one document and nothing else. */
|
|
43
|
+
export declare const soloComposition: (route: SoftStr) => Composition;
|
|
44
|
+
/**
|
|
45
|
+
* The composition as a plain left-to-right list — the form
|
|
46
|
+
* a renderer walks. Reconstructing the head/rest split from
|
|
47
|
+
* it is never necessary, so this is one-way on purpose.
|
|
48
|
+
*/
|
|
49
|
+
export declare const columnsOf: (composition: Composition) => ReadonlyArray<Column>;
|
|
50
|
+
//# sourceMappingURL=Composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Composition.d.ts","sourceRoot":"","sources":["../../../src/Navigate/model/Composition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AAEd;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;CACvB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,QAAQ,UACZ,OAAO,KACb,MAAmC,CAAC;AAEvC,oDAAoD;AACpD,eAAO,MAAM,cAAc,UAClB,OAAO,QACR,MAAM,CAAC,OAAO,CAAC,KACpB,MAA2B,CAAC;AAE/B,6DAA6D;AAC7D,eAAO,MAAM,eAAe,UACnB,OAAO,KACb,WAGD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,SAAS,gBACP,WAAW,KACvB,aAAa,CAAC,MAAM,CAGtB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* The OTHER way a strip of columns comes to be: a TRAIL.
|
|
4
|
+
*
|
|
5
|
+
* A {@link Composition} is a set of independent documents
|
|
6
|
+
* standing side by side — any column may be there without
|
|
7
|
+
* the one to its left. A trail is the opposite claim: each
|
|
8
|
+
* column was opened FROM the one to its left, so a step
|
|
9
|
+
* only means something after the steps before it. A menu,
|
|
10
|
+
* a list it opened, a record chosen in the list, the
|
|
11
|
+
* records that record points to: that is a trail.
|
|
12
|
+
*
|
|
13
|
+
* A step is an opaque string here. What a step says (a
|
|
14
|
+
* list, a record, a relation, how it is shown) is the
|
|
15
|
+
* product's vocabulary, spelled by the product; the
|
|
16
|
+
* framework owns only the three rules every trail obeys,
|
|
17
|
+
* below. Three products wrote those rules separately
|
|
18
|
+
* before this module (2026-11-25).
|
|
19
|
+
*/
|
|
20
|
+
export type Trail = ReadonlyArray<SoftStr>;
|
|
21
|
+
/**
|
|
22
|
+
* How a product answers a trail with columns of its own
|
|
23
|
+
* kind `C`. `root` is the column the empty trail shows.
|
|
24
|
+
* `resolve` is asked for the column a `step` opens from
|
|
25
|
+
* the column `previous`, and answers `None` for a step
|
|
26
|
+
* that column does not offer.
|
|
27
|
+
*/
|
|
28
|
+
export type TrailResolver<C> = Readonly<{
|
|
29
|
+
root: () => C;
|
|
30
|
+
resolve: (previous: C, step: SoftStr) => Option<C>;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* One resolved column and the trail that reaches it. The
|
|
34
|
+
* `prefix` is the column's own address: the root's is
|
|
35
|
+
* empty, and a column `n` steps in carries the first `n`
|
|
36
|
+
* steps.
|
|
37
|
+
*/
|
|
38
|
+
export type TrailColumn<C> = Readonly<{
|
|
39
|
+
prefix: Trail;
|
|
40
|
+
column: C;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* RULE 1 — PREFIX CLOSURE. The columns a trail shows, left
|
|
44
|
+
* to right, the root first. Each step is put to the column
|
|
45
|
+
* before it, and the first step that column does not offer
|
|
46
|
+
* ENDS the walk: the valid prefix shows and the tail is
|
|
47
|
+
* dropped. A stale or hand-typed address therefore folds
|
|
48
|
+
* to the deepest state it still names; it never fails and
|
|
49
|
+
* never shows a column the one to its left does not lead
|
|
50
|
+
* to. Never empty — the root always resolves.
|
|
51
|
+
*/
|
|
52
|
+
export declare const resolveTrail: <C>(resolver: TrailResolver<C>) => (trail: Trail) => ReadonlyArray<TrailColumn<C>>;
|
|
53
|
+
/**
|
|
54
|
+
* The part of a trail that resolved: the address to
|
|
55
|
+
* rewrite a stale URL to. Equal to the trail itself when
|
|
56
|
+
* every step was offered.
|
|
57
|
+
*/
|
|
58
|
+
export declare const settledTrail: <C>(columns: ReadonlyArray<TrailColumn<C>>) => Trail;
|
|
59
|
+
/**
|
|
60
|
+
* RULE 2 — ONE FOLD. The trail as the column `depth` steps
|
|
61
|
+
* in sees it: everything to its right dropped. `depth` 0
|
|
62
|
+
* is the root. This is the whole of "go back": a column's
|
|
63
|
+
* heading links to the trail folded to itself. Generic in
|
|
64
|
+
* the step so a product may fold its typed steps directly.
|
|
65
|
+
*/
|
|
66
|
+
export declare const foldTrail: <S>(trail: ReadonlyArray<S>, depth: number) => ReadonlyArray<S>;
|
|
67
|
+
/**
|
|
68
|
+
* RULE 3 — A STEP REPLACES WHAT IT LEAVES BEHIND. The
|
|
69
|
+
* trail after the column `depth` steps in opens `step`:
|
|
70
|
+
* folded to that column, then grown by one. Opening
|
|
71
|
+
* something from a column part way along never appends
|
|
72
|
+
* past the columns to its right — they were reached
|
|
73
|
+
* through a choice this one replaces.
|
|
74
|
+
*/
|
|
75
|
+
export declare const stepFrom: <S>(trail: ReadonlyArray<S>, depth: number, step: S) => ReadonlyArray<S>;
|
|
76
|
+
/**
|
|
77
|
+
* The same column shown another way: the step at `index`
|
|
78
|
+
* exchanged in place, the columns to its right kept. For a
|
|
79
|
+
* change that does not alter what the column offers — its
|
|
80
|
+
* sort order, its page, its presentation. If it does alter
|
|
81
|
+
* that, {@link resolveTrail} drops what no longer follows.
|
|
82
|
+
*/
|
|
83
|
+
export declare const restep: <S>(trail: ReadonlyArray<S>, index: number, step: S) => ReadonlyArray<S>;
|
|
84
|
+
//# sourceMappingURL=Trail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trail.d.ts","sourceRoot":"","sources":["../../../src/Navigate/model/Trail.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AAEd;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,QAAQ,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC,CAAC;IACd,OAAO,EAAE,CACP,QAAQ,EAAE,CAAC,EACX,IAAI,EAAE,OAAO,KACV,MAAM,CAAC,CAAC,CAAC,CAAC;CAChB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,QAAQ,CAAC;IACpC,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,CAAC,CAAC;CACX,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GACtB,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,aAErB,KAAK,KACX,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAgC9B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,WACnB,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KACrC,KAIA,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAClB,aAAa,CAAC,CAAC,CAAC,SAChB,MAAM,KACZ,aAAa,CAAC,CAAC,CACkB,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SACjB,aAAa,CAAC,CAAC,CAAC,SAChB,MAAM,QACP,CAAC,KACN,aAAa,CAAC,CAAC,CAGjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SACf,aAAa,CAAC,CAAC,CAAC,SAChB,MAAM,QACP,CAAC,KACN,aAAa,CAAC,CAAC,CAGf,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
import { type Html } from "plgg-view";
|
|
3
|
+
import { type Parts } from "../../Layout/usecase/combinators";
|
|
4
|
+
/**
|
|
5
|
+
* The MARKERS the navigation runtime navigates by, and the
|
|
6
|
+
* combinators that stamp them. Framework-owned on purpose:
|
|
7
|
+
* a product must never have to spell one of these strings
|
|
8
|
+
* in its own JavaScript for the strip to work, because a
|
|
9
|
+
* string a consumer types is a contract no compiler
|
|
10
|
+
* checks. Import the constant, or use the combinator.
|
|
11
|
+
*/
|
|
12
|
+
/** The element holding the strip's columns. */
|
|
13
|
+
export declare const stripAttr: SoftStr;
|
|
14
|
+
/**
|
|
15
|
+
* A PLACEABLE document column. Its value is the column's
|
|
16
|
+
* own route, so the runtime can compare what is on screen
|
|
17
|
+
* to what the URL says without a side table.
|
|
18
|
+
*/
|
|
19
|
+
export declare const columnAttr: SoftStr;
|
|
20
|
+
/**
|
|
21
|
+
* The passage a column is showing, when it is showing one.
|
|
22
|
+
* Carried on the element so the runtime can compare the
|
|
23
|
+
* screen to the URL by VALUE — a column at the right route
|
|
24
|
+
* but the wrong passage is a different column.
|
|
25
|
+
*/
|
|
26
|
+
export declare const spanAttr: SoftStr;
|
|
27
|
+
/**
|
|
28
|
+
* The single entry point the runtime publishes on
|
|
29
|
+
* `window`. One name, so the pointer, the keyboard and an
|
|
30
|
+
* assistant all drive the same code — there is no second
|
|
31
|
+
* navigation path to diverge from.
|
|
32
|
+
*/
|
|
33
|
+
export declare const navHookName: SoftStr;
|
|
34
|
+
/** A {@link rowWith} marked as the navigable strip. */
|
|
35
|
+
export declare const strip: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
36
|
+
/**
|
|
37
|
+
* A {@link columnWith} marked as a placeable document
|
|
38
|
+
* column at `route`. The runtime fetches a route's own
|
|
39
|
+
* page, takes the element carrying this marker, and puts
|
|
40
|
+
* it in the strip — which is sound only because a column
|
|
41
|
+
* renders identically wherever it sits.
|
|
42
|
+
*/
|
|
43
|
+
export declare const documentColumn: <Msg>(route: SoftStr, span: Option<SoftStr>, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
44
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../src/Navigate/model/marker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,KAAK,EAGX,MAAM,sCAAsC,CAAC;AAG9C;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,eAAO,MAAM,SAAS,EAAE,OAAmC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,OAAoC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAkC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,OAA6B,CAAC;AAExD,uDAAuD;AACvD,eAAO,MAAM,KAAK,GAAI,GAAG,SAChB,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CACsC,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,SACzB,OAAO,QACR,MAAM,CAAC,OAAO,CAAC,SACd,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAgBR,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
import { type Composition } from "../model/Composition";
|
|
3
|
+
/**
|
|
4
|
+
* The composition's WIRE FORMAT — the one authority for
|
|
5
|
+
* how a strip is written into a URL and read back out of
|
|
6
|
+
* one. The server renderer and the client runtime both
|
|
7
|
+
* compose from here; nothing re-derives the format.
|
|
8
|
+
*
|
|
9
|
+
* The URL's PATH is always the head column, so every
|
|
10
|
+
* composition URL is also an ordinary, crawlable,
|
|
11
|
+
* self-sufficient page. Two query parameters decorate it:
|
|
12
|
+
*
|
|
13
|
+
* - `c` — the columns to the head's right, in order;
|
|
14
|
+
* - `q` — the head's own highlighted passage.
|
|
15
|
+
*
|
|
16
|
+
* Within `c`, entries are separated by `,` and a column's
|
|
17
|
+
* route from its span by `:`. Those three characters (and
|
|
18
|
+
* the escape character itself) are escaped INSIDE a field,
|
|
19
|
+
* so a passage containing a comma or a colon is
|
|
20
|
+
* unambiguous. That escaping is deliberately NOT
|
|
21
|
+
* percent-encoding: the transport already percent-encodes
|
|
22
|
+
* on the way out and decodes on the way in, and layering
|
|
23
|
+
* a second percent round would make the two indis-
|
|
24
|
+
* tinguishable. {@link decodeComposition} therefore takes
|
|
25
|
+
* values a URL parser has ALREADY decoded (what
|
|
26
|
+
* `URLSearchParams.get` or a server's query map hands
|
|
27
|
+
* you), and {@link compositionQuery} emits values ready
|
|
28
|
+
* to be pasted into a URL.
|
|
29
|
+
*/
|
|
30
|
+
export declare const restParam: SoftStr;
|
|
31
|
+
export declare const spanParam: SoftStr;
|
|
32
|
+
/**
|
|
33
|
+
* The format's alphabet, exported because the client
|
|
34
|
+
* runtime is an inline script that cannot import this
|
|
35
|
+
* module: it is COMPOSED from these constants
|
|
36
|
+
* (`JSON.stringify`), so the separators are declared once
|
|
37
|
+
* even though the splitting is spelled twice.
|
|
38
|
+
*/
|
|
39
|
+
export declare const entrySeparator: SoftStr;
|
|
40
|
+
export declare const fieldSeparator: SoftStr;
|
|
41
|
+
export declare const escapeChar: SoftStr;
|
|
42
|
+
/**
|
|
43
|
+
* Read the composition a request carries: the route it is
|
|
44
|
+
* on, plus the already-URL-decoded `c` and `q` values.
|
|
45
|
+
* Total by construction — a malformed, truncated or
|
|
46
|
+
* hand-typed `c` yields the columns that do parse, and in
|
|
47
|
+
* the worst case the head alone. A composition URL must
|
|
48
|
+
* always still be a page.
|
|
49
|
+
*/
|
|
50
|
+
export declare const decodeComposition: (route: SoftStr, rest: Option<SoftStr>, span: Option<SoftStr>) => Composition;
|
|
51
|
+
/**
|
|
52
|
+
* The composition's query string, `?`-prefixed, or the
|
|
53
|
+
* empty string when the composition needs none.
|
|
54
|
+
*/
|
|
55
|
+
export declare const compositionQuery: (composition: Composition) => SoftStr;
|
|
56
|
+
/**
|
|
57
|
+
* The whole composition as ONE addressable link: the head
|
|
58
|
+
* route carrying the rest of the strip in its query. This
|
|
59
|
+
* is what history is pushed with, and what a reader
|
|
60
|
+
* copies out of the address bar.
|
|
61
|
+
*/
|
|
62
|
+
export declare const compositionHref: (composition: Composition) => SoftStr;
|
|
63
|
+
//# sourceMappingURL=compositionUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compositionUrl.d.ts","sourceRoot":"","sources":["../../../src/Navigate/usecase/compositionUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAMZ,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,SAAS,EAAE,OAAa,CAAC;AACtC,eAAO,MAAM,SAAS,EAAE,OAAa,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,OAAa,CAAC;AAC3C,eAAO,MAAM,cAAc,EAAE,OAAa,CAAC;AAC3C,eAAO,MAAM,UAAU,EAAE,OAAa,CAAC;AAmHvC;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,UACrB,OAAO,QACR,MAAM,CAAC,OAAO,CAAC,QACf,MAAM,CAAC,OAAO,CAAC,KACpB,WAqBD,CAAC;AAoDH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gBACd,WAAW,KACvB,OAYA,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,eAAe,gBACb,WAAW,KACvB,OAE4B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* The inline navigation runtime. Contains no `</script`
|
|
4
|
+
* inner sequence, and is injected AFTER the SSR escaper
|
|
5
|
+
* so its `<`/`>` are literal markup.
|
|
6
|
+
*/
|
|
7
|
+
export declare const navigationInitScript: SoftStr;
|
|
8
|
+
/**
|
|
9
|
+
* Insert the runtime just before `</body>` — after the
|
|
10
|
+
* document's own content, so the markers it navigates by
|
|
11
|
+
* already exist when it runs. A page with no `</body>`
|
|
12
|
+
* passes through unchanged (the same idempotent guard
|
|
13
|
+
* `injectAppearanceScript` records).
|
|
14
|
+
*/
|
|
15
|
+
export declare const injectNavigationScript: (html: SoftStr) => SoftStr;
|
|
16
|
+
//# sourceMappingURL=navigationScript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigationScript.d.ts","sourceRoot":"","sources":["../../../src/Navigate/usecase/navigationScript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAqDpC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,OAyN1B,CAAC;AAEV;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,SAC3B,OAAO,KACZ,OAMO,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type SoftStr, type Option } from "plgg";
|
|
2
|
+
import { type Trail } from "../model/Trail";
|
|
3
|
+
/**
|
|
4
|
+
* A trail's WIRE FORMAT: one query parameter, `x`, holding
|
|
5
|
+
* the steps joined by `.`.
|
|
6
|
+
*
|
|
7
|
+
* `.` and not `/`: a trail rides in a query beside a path,
|
|
8
|
+
* and a separator that is also the path's makes an address
|
|
9
|
+
* hard to read and easy to cut in the wrong place. Both
|
|
10
|
+
* products this format was lifted from already carried
|
|
11
|
+
* their trail in `x`, and one already joined with `.`, so
|
|
12
|
+
* its addresses read unchanged.
|
|
13
|
+
*
|
|
14
|
+
* Inside a step, a `.` and anything a URL would not carry
|
|
15
|
+
* literally are percent-encoded, so a step may hold any
|
|
16
|
+
* text. This IS a second percent round under the
|
|
17
|
+
* transport's own, which {@link compositionQuery} refuses
|
|
18
|
+
* on purpose; it is accepted here because the inherited
|
|
19
|
+
* addresses are written this way, and a step is a short
|
|
20
|
+
* machine-made token rather than a quoted passage.
|
|
21
|
+
* {@link decodeTrail} therefore takes the value a URL
|
|
22
|
+
* parser has ALREADY decoded once (`URLSearchParams.get`),
|
|
23
|
+
* and {@link encodeTrail} gives the value to hand to
|
|
24
|
+
* `URLSearchParams.set`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const trailParam: SoftStr;
|
|
27
|
+
export declare const stepSeparator: SoftStr;
|
|
28
|
+
/** The `x` value of a trail; empty for the root alone. */
|
|
29
|
+
export declare const encodeTrail: (trail: Trail) => SoftStr;
|
|
30
|
+
/**
|
|
31
|
+
* The trail an `x` value names. Total: an absent or empty
|
|
32
|
+
* value is the root alone, and empty steps (`a..b`, a
|
|
33
|
+
* trailing `.`) contribute nothing.
|
|
34
|
+
*/
|
|
35
|
+
export declare const decodeTrail: (raw: Option<SoftStr>) => Trail;
|
|
36
|
+
/**
|
|
37
|
+
* The trail as a query string, `?`-prefixed, or the empty
|
|
38
|
+
* string for the root alone — a strip at its root adds
|
|
39
|
+
* nothing to a link.
|
|
40
|
+
*/
|
|
41
|
+
export declare const trailQuery: (trail: Trail) => SoftStr;
|
|
42
|
+
/**
|
|
43
|
+
* A product's typed step and its spelling. `print` writes
|
|
44
|
+
* a step as the opaque string a {@link Trail} holds;
|
|
45
|
+
* `parse` reads one back, `None` for a string that is not
|
|
46
|
+
* a step of this product.
|
|
47
|
+
*/
|
|
48
|
+
export type StepCodec<S> = Readonly<{
|
|
49
|
+
print: (step: S) => SoftStr;
|
|
50
|
+
parse: (raw: SoftStr) => Option<S>;
|
|
51
|
+
}>;
|
|
52
|
+
/** Typed steps as a trail. */
|
|
53
|
+
export declare const printSteps: <S>(codec: StepCodec<S>) => (steps: ReadonlyArray<S>) => Trail;
|
|
54
|
+
/**
|
|
55
|
+
* A trail as typed steps, by the trail's own rule: the
|
|
56
|
+
* first string that is not a step ends the reading, and
|
|
57
|
+
* the steps before it stand. Skipping it instead would
|
|
58
|
+
* join two columns that were never next to each other.
|
|
59
|
+
*/
|
|
60
|
+
export declare const parseSteps: <S>(codec: StepCodec<S>) => (trail: Trail) => ReadonlyArray<S>;
|
|
61
|
+
//# sourceMappingURL=trailUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trailUrl.d.ts","sourceRoot":"","sources":["../../../src/Navigate/usecase/trailUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAKZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,EAAE,OAAa,CAAC;AACvC,eAAO,MAAM,aAAa,EAAE,OAAa,CAAC;AAuB1C,0DAA0D;AAC1D,eAAO,MAAM,WAAW,UACf,KAAK,KACX,OACwC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,WAAW,QACjB,MAAM,CAAC,OAAO,CAAC,KACnB,KAQK,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,UAAU,UACd,KAAK,KACX,OAMyC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,QAAQ,CAAC;IAClC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC5B,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,8BAA8B;AAC9B,eAAO,MAAM,UAAU,GACpB,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,aACf,aAAa,CAAC,CAAC,CAAC,KAAG,KACH,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACpB,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,aACf,KAAK,KAAG,aAAa,CAAC,CAAC,CAe9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export { advanceColumns } from "./usecase/advanceColumns";
|
|
18
|
+
//# 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;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,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,MAAO,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,UACjB,KAAK,KACX,MAAM,CAAC,MAAM,CAGb,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Cmd } from "plgg-view/client";
|
|
2
|
+
import { type Theme } from "../../Style/model/theme";
|
|
3
|
+
/**
|
|
4
|
+
* The SEEK-HEAD SCROLL that owns the {@link runwayCss}
|
|
5
|
+
* runway: after an action grows or changes the column stack,
|
|
6
|
+
* slide the horizontal strip so the NEWEST (right-most,
|
|
7
|
+
* active) column comes into view, and publish the last
|
|
8
|
+
* column's measured width so the runway spacer is exactly one
|
|
9
|
+
* column short of the strip. The framework half of the
|
|
10
|
+
* unbounded-depth runway capability — the reference used to
|
|
11
|
+
* own this as an app effect; it is now declared here and the
|
|
12
|
+
* reference merely wires it.
|
|
13
|
+
*
|
|
14
|
+
* A pure {@link Cmd}: the DOM read/scroll runs in the effect
|
|
15
|
+
* (after paint, via a double `requestAnimationFrame`), never
|
|
16
|
+
* in an `update`. Inert (resolves `done` immediately) with no
|
|
17
|
+
* `document`/`window` — so it is a safe no-op under the node
|
|
18
|
+
* test runner, the reason this thin DOM-integration file is
|
|
19
|
+
* coverage-excluded.
|
|
20
|
+
*
|
|
21
|
+
* The resting place differs by viewport, because the two have
|
|
22
|
+
* different scarcity:
|
|
23
|
+
* - **Below `snap`** (a phone): the live column goes to the
|
|
24
|
+
* LEFT EDGE, always — about one column fits, so there is no
|
|
25
|
+
* context to keep and the edge is the unambiguous rest point
|
|
26
|
+
* the mandatory scroll-snap lands on anyway.
|
|
27
|
+
* - **At/above `snap`**: the live column goes to the CENTRE,
|
|
28
|
+
* and only when not already fully visible — a wide strip
|
|
29
|
+
* shows several columns, so the trail behind the live column
|
|
30
|
+
* is context worth keeping; `scrollTo` clamps, so a centre
|
|
31
|
+
* target the strip cannot afford simply rests at the near
|
|
32
|
+
* edge (no separate shallow-strip case).
|
|
33
|
+
*
|
|
34
|
+
* The `snap` boundary is matched through `matchMedia` on the
|
|
35
|
+
* very {@link minWidth} condition the runway CSS uses, so the
|
|
36
|
+
* motion and the scrollable range never disagree about which
|
|
37
|
+
* viewport this is. Curried `advanceColumns(theme)(done)` so
|
|
38
|
+
* the completion message is the consumer's own `Msg`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const advanceColumns: (theme: Theme) => <Msg>(done: Msg) => Cmd<Msg>;
|
|
41
|
+
//# sourceMappingURL=advanceColumns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advanceColumns.d.ts","sourceRoot":"","sources":["../../../src/Render/usecase/advanceColumns.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAET,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,cAAc,UACjB,KAAK,MACZ,GAAG,QAAQ,GAAG,KAAG,GAAG,CAAC,GAAG,CA8EtB,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,CAAC;AAEhD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,KAAK,KAAK,EAQX,MAAM,gCAAgC,CAAC;AAqBxC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,MAAM,WAAW,CAAC,GAAG,IAAI,QAAQ,CAAC;IACtC,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,CAAC,GAAG,IAAI,QAAQ,CAAC;IAC7C,MAAM,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,GAAG,CAAC;IACnC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7C,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,UACf,KAAK,KACX,IAAI,CAAC,YAAY,EAAE,KAAK,CAGvB,CAAC;AAEL,eAAO,MAAM,eAAe,GAAI,GAAG,SAC1B,KAAK,WACH,kBAAkB,CAAC,GAAG,CAAC,KAC/B,IAAI,CAAC,GAAG,EAAE,KAAK,CAgCf,CAAC;AA0CJ;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UACZ,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":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAKZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EAkBV,MAAM,WAAW,CAAC;AAiCnB,OAAO,EACL,KAAK,YAAY,EAMlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,WAAW,EACjB,MAAM,gCAAgC,CAAC;AAYxC;;;;;;;;;;GAUG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,YAChB,MAAM,CAAC,aAAa,CAAC,KAC7B,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAmBvB,CAAC;AAEb,6DAA6D;AAC7D,eAAO,MAAM,SAAS,eACR,OAAO,UACX,MAAM,CAAC,OAAO,CAAC,WACd,aAAa,CAAC,YAAY,CAAC,KACnC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAsB5B,CAAC;AA0CR,6DAA6D;AAC7D,eAAO,MAAM,UAAU,MAClB,MAAM,CAAC,UAAU,CAAC,KACpB,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAmB7B,CAAC;AAEP,oEAAoE;AACpE,eAAO,MAAM,OAAO,MACf,OAAO,KACT,IAAI,CAAC,YAAY,EAAE,IAAI,CAevB,CAAC;AAEJ,kBAAkB;AAClB,eAAO,MAAM,OAAO,SACZ,aAAa,CAAC,OAAO,CAAC,KAC3B,IAAI,CAAC,YAAY,EAAE,IAAI,CACoB,CAAC;AAiD/C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,UACZ,aAAa,CAAC,IAAI,CAAC,KACzB,IAAI,CAAC,YAAY,EAAE,IAAI,CACuB,CAAC;AAElD,0DAA0D;AAC1D,eAAO,MAAM,OAAO,YACT,aAAa,CAAC,QAAQ,CAAC,KAC/B,IAAI,CAAC,YAAY,CAWjB,CAAC;AAWJ,oDAAoD;AACpD,eAAO,MAAM,WAAW,YACb,OAAO,KACf,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAQ3B,CAAC;AAET,iDAAiD;AACjD,eAAO,MAAM,SAAS,UACb,MAAM,CAAC,OAAO,CAAC,KACrB,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAYzB,CAAC;AA+EX;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,WACf,aAAa,CAAC,WAAW,CAAC,KACjC,IAAI,CAAC,YAAY,EAAE,KAAK,CAoBxB,CAAC;AAEJ,8DAA8D;AAC9D,eAAO,MAAM,WAAW,SAChB,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,SACd,IAAI,aACH,KAAK,KAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAOvC,CAAC"}
|