plggmatic 0.2.2 → 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/model/tool.d.ts.map +1 -1
- package/dist/Catalog/usecase/adapter.d.ts.map +1 -1
- package/dist/Catalog/usecase/catalog.d.ts.map +1 -1
- package/dist/Catalog/usecase/runFlow.d.ts.map +1 -1
- package/dist/Component/index.d.ts +2 -0
- package/dist/Component/index.d.ts.map +1 -1
- package/dist/Component/usecase/breadcrumb.d.ts.map +1 -1
- package/dist/Component/usecase/button.d.ts.map +1 -1
- package/dist/Component/usecase/checkbox.d.ts.map +1 -1
- package/dist/Component/usecase/colHead.d.ts.map +1 -1
- package/dist/Component/usecase/confirmDialog.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/Component/usecase/selectInput.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/Component/usecase/textInput.d.ts.map +1 -1
- package/dist/Component/usecase/textLink.d.ts.map +1 -1
- package/dist/Component/usecase/themeToggle.d.ts +6 -1
- package/dist/Component/usecase/themeToggle.d.ts.map +1 -1
- package/dist/Component/usecase/toast.d.ts.map +1 -1
- package/dist/Component/usecase/typography.d.ts.map +1 -1
- package/dist/Declare/model/Action.d.ts.map +1 -1
- package/dist/Declare/model/Adapter.d.ts.map +1 -1
- package/dist/Declare/model/Collection.d.ts.map +1 -1
- package/dist/Declare/model/Declaration.d.ts.map +1 -1
- package/dist/Declare/model/Menu.d.ts.map +1 -1
- package/dist/Declare/model/Query.d.ts.map +1 -1
- package/dist/Declare/model/Row.d.ts.map +1 -1
- package/dist/Declare/model/Source.d.ts.map +1 -1
- package/dist/Declare/usecase/apply.d.ts.map +1 -1
- package/dist/Declare/usecase/project.d.ts.map +1 -1
- package/dist/Declare/usecase/reconcile.d.ts.map +1 -1
- package/dist/Flow/model/forms.d.ts.map +1 -1
- package/dist/Flow/model/run.d.ts.map +1 -1
- package/dist/Flow/model/script.d.ts.map +1 -1
- package/dist/Flow/usecase/interpret.d.ts.map +1 -1
- package/dist/Flow/usecase/read.d.ts.map +1 -1
- package/dist/Form/model/submission.d.ts.map +1 -1
- package/dist/Form/usecase/controlParts.d.ts.map +1 -1
- package/dist/Form/usecase/formView.d.ts.map +1 -1
- package/dist/Form/usecase/parseForm.d.ts.map +1 -1
- package/dist/Layout/index.d.ts +6 -1
- package/dist/Layout/index.d.ts.map +1 -1
- 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.map +1 -1
- 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 +30 -1
- package/dist/Layout/usecase/combinators.d.ts.map +1 -1
- 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/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 +1 -0
- package/dist/Render/index.d.ts.map +1 -1
- package/dist/Render/model/mode.d.ts.map +1 -1
- package/dist/Render/model/screen.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/Render/usecase/parts.d.ts.map +1 -1
- package/dist/Render/usecase/renderMode.d.ts.map +1 -1
- package/dist/Render/usecase/singleColumn.d.ts.map +1 -1
- package/dist/Schedule/model/Model.d.ts.map +1 -1
- package/dist/Schedule/model/Msg.d.ts.map +1 -1
- package/dist/Schedule/model/Scene.d.ts.map +1 -1
- package/dist/Schedule/model/View.d.ts.map +1 -1
- package/dist/Schedule/usecase/chain.d.ts.map +1 -1
- package/dist/Schedule/usecase/codec.d.ts.map +1 -1
- package/dist/Schedule/usecase/lower.d.ts.map +1 -1
- package/dist/Schedule/usecase/scene.d.ts.map +1 -1
- package/dist/Schedule/usecase/schedule.d.ts.map +1 -1
- package/dist/Schedule/usecase/update.d.ts.map +1 -1
- package/dist/Style/index.d.ts +4 -0
- package/dist/Style/index.d.ts.map +1 -1
- package/dist/Style/model/appearance.d.ts.map +1 -1
- package/dist/Style/model/breakpoint.d.ts.map +1 -1
- 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 +3 -1
- package/dist/Style/model/hexColor.d.ts.map +1 -1
- package/dist/Style/model/metric.d.ts.map +1 -1
- package/dist/Style/model/palette.d.ts.map +1 -1
- package/dist/Style/model/syntax.d.ts.map +1 -1
- package/dist/Style/model/theme.d.ts +10 -0
- package/dist/Style/model/theme.d.ts.map +1 -1
- package/dist/Style/model/token.d.ts.map +1 -1
- package/dist/Style/model/zIndex.d.ts.map +1 -1
- package/dist/Style/usecase/appearanceScript.d.ts.map +1 -1
- package/dist/Style/usecase/chromeCss.d.ts.map +1 -1
- package/dist/Style/usecase/contrast.d.ts.map +1 -1
- package/dist/Style/usecase/metricCss.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/Style/usecase/utilities.d.ts +1 -1
- package/dist/Style/usecase/utilities.d.ts.map +1 -1
- package/dist/Style/usecase/workspaceCss.d.ts +48 -0
- package/dist/Style/usecase/workspaceCss.d.ts.map +1 -0
- package/dist/brand.d.ts.map +1 -1
- 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 +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1773 -178
- package/dist/styleEntry.d.ts +7 -2
- package/dist/styleEntry.d.ts.map +1 -1
- package/dist/styleEntry.es.js +623 -44
- package/package.json +12 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlParts.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/controlParts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAGZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAOf,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"controlParts.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/controlParts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAGZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAOf,MAAM,WAAW,CAAC;AAMnB;;;;;;;GAOG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,UAAU,GAAI,GAAG,QACtB,OAAO,aACF,OAAO,KACjB,IAAI,CAAC,GAAG,EAAE,OAAO,CAIjB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,OAAO,SAAU,OAAO,KAAG,OACvB,CAAC;AAElB;;;;GAIG;AACH,eAAO,MAAM,SAAS,SACd,OAAO,SACN,MAAM,CAAC,OAAO,CAAC,KACrB,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAMzB,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,QACtB,OAAO,SACN,MAAM,CAAC,OAAO,CAAC,KACrB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAahB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formView.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/formView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EAQV,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"formView.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/formView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EAQV,MAAM,WAAW,CAAC;AAanB;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,IAAI,QAAQ,CAAC;IACxC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,GAAG,SACnB,aAAa,CAAC,GAAG,CAAC,KACxB,IAAI,CAAC,GAAG,EAAE,MAAM,CA6BhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseForm.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/parseForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EAUlB,MAAM,MAAM,CAAC;AAEd;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,CACJ,KAAK,EAAE,OAAO,KACX,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;CAClC,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,aAAa,CACpC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAC5B,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,OAAO,GAAG,QAAQ,CAC5B,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CACtB,CAAC;AASF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"parseForm.d.ts","sourceRoot":"","sources":["../../../src/Form/usecase/parseForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EAUlB,MAAM,MAAM,CAAC;AAEd;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,CACJ,KAAK,EAAE,OAAO,KACX,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;CAClC,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,aAAa,CACpC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAC5B,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,OAAO,GAAG,QAAQ,CAC5B,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CACtB,CAAC;AASF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,UACb,aAAa,CAAC,SAAS,CAAC,WACtB,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,KAClC,MAAM,CAAC,OAAO,EAAE,UAAU,CAwB5B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,QAAQ,WACX,UAAU,QACZ,OAAO,KACZ,MAAM,CAAC,OAAO,CAad,CAAC"}
|
package/dist/Layout/index.d.ts
CHANGED
|
@@ -12,5 +12,10 @@
|
|
|
12
12
|
* (house style); it grows one recorded rule at a time.
|
|
13
13
|
*/
|
|
14
14
|
export { type PaneRole, landmarkTag, } from "./model/pane";
|
|
15
|
-
export { type Parts, row, column, pane, navPane, mainPane, asidePane, } from "./usecase/combinators";
|
|
15
|
+
export { type Parts, rowClass, colClass, paneClass, row, rowWith, column, columnWith, pane, navPane, mainPane, asidePane, } from "./usecase/combinators";
|
|
16
|
+
export { type StripMetrics, type MenuTrack, type StripGeometry, stripMetrics, stripGeometry, stripVar, stripStyle, visibleColumnStart, reachableScroll, } from "./model/geometry";
|
|
17
|
+
export { type Span, revealTarget, glideEase, } from "./model/reveal";
|
|
18
|
+
export { type RevealOptions, revealOptions, revealColumn, } from "./usecase/revealColumn";
|
|
19
|
+
export { type WorkspaceState, type ColumnWidth, workspace, workspaceWith, pinnedPanel, browser, menuColumn, widthColumn, } from "./usecase/workspace";
|
|
20
|
+
export { type PreferenceStore, type PreferenceReader, type PreferenceWriter, readPreference, savePreference, } from "./usecase/preference";
|
|
16
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,KAAK,QAAQ,EACb,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,KAAK,EACV,GAAG,EACH,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,GACV,MAAM,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,KAAK,QAAQ,EACb,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,EACH,OAAO,EACP,MAAM,EACN,UAAU,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,GACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,IAAI,EACT,YAAY,EACZ,SAAS,GACV,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,aAAa,EAClB,aAAa,EACb,YAAY,GACb,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,SAAS,EACT,aAAa,EACb,WAAW,EACX,OAAO,EACP,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,cAAc,EACd,cAAc,GACf,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* The lengths a strip is laid out by, in CSS pixels. A
|
|
4
|
+
* menu and a column each have a width they would like and
|
|
5
|
+
* a share of the window they may not exceed; a pinned
|
|
6
|
+
* panel (a chat, an assistant) has a floor it is never
|
|
7
|
+
* squeezed below; under `phone` the window holds one thing
|
|
8
|
+
* at a time, so the menu and a column are each as wide as
|
|
9
|
+
* the window.
|
|
10
|
+
*/
|
|
11
|
+
export type StripMetrics = Readonly<{
|
|
12
|
+
menu: number;
|
|
13
|
+
menuShare: number;
|
|
14
|
+
column: number;
|
|
15
|
+
columnShare: number;
|
|
16
|
+
floor: number;
|
|
17
|
+
phone: number;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* The numbers two products arrived at separately and
|
|
21
|
+
* identically (corpd, coop-planner): a 220px menu up to
|
|
22
|
+
* 40% of the window, a 320px column up to 60%, a 320px
|
|
23
|
+
* floor for the pinned panel, one-at-a-time under 640px.
|
|
24
|
+
*/
|
|
25
|
+
export declare const stripMetrics: StripMetrics;
|
|
26
|
+
/**
|
|
27
|
+
* What the menu is doing. `closed` reserves no track;
|
|
28
|
+
* `open` takes the metric width; a number is a width given
|
|
29
|
+
* outright — a collapsed rail, or the menu part way
|
|
30
|
+
* through opening.
|
|
31
|
+
*/
|
|
32
|
+
export type MenuTrack = "closed" | "open" | number;
|
|
33
|
+
/**
|
|
34
|
+
* Where everything stands for one window width and one
|
|
35
|
+
* scroll position:
|
|
36
|
+
*
|
|
37
|
+
* - `menu`, `column` — the widths in force;
|
|
38
|
+
* - `track` — the window less the menu: what the pinned
|
|
39
|
+
* panel and the columns share;
|
|
40
|
+
* - `floor` — the least the pinned panel is given;
|
|
41
|
+
* - `width` — the pinned panel's width now: the whole
|
|
42
|
+
* track at rest, yielding to the columns as the strip
|
|
43
|
+
* scrolls, never under `floor`;
|
|
44
|
+
* - `seam` — the spacer after the last column that lets it
|
|
45
|
+
* come to rest beside the panel at its floor;
|
|
46
|
+
* - `layoutMinimum` — the window less the floor: the room
|
|
47
|
+
* the columns can ever have.
|
|
48
|
+
*/
|
|
49
|
+
export type StripGeometry = Readonly<{
|
|
50
|
+
menu: number;
|
|
51
|
+
column: number;
|
|
52
|
+
track: number;
|
|
53
|
+
floor: number;
|
|
54
|
+
seam: number;
|
|
55
|
+
layoutMinimum: number;
|
|
56
|
+
width: number;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* The geometry of a strip beside a pinned panel. Pure: the
|
|
60
|
+
* window width and the strip's scroll offset in, lengths
|
|
61
|
+
* out. Nothing here reads the document, so the same call
|
|
62
|
+
* serves a render, a test and a server.
|
|
63
|
+
*/
|
|
64
|
+
export declare const stripGeometry: (metrics: StripMetrics) => (viewport: number, scroll: number, menuTrack: MenuTrack) => StripGeometry;
|
|
65
|
+
/**
|
|
66
|
+
* The custom properties a stylesheet reads the geometry
|
|
67
|
+
* through, named once here so a host's CSS and its inline
|
|
68
|
+
* style cannot spell them differently.
|
|
69
|
+
*/
|
|
70
|
+
export declare const stripVar: {
|
|
71
|
+
track: string;
|
|
72
|
+
width: string;
|
|
73
|
+
menu: string;
|
|
74
|
+
column: string;
|
|
75
|
+
layoutMinimum: string;
|
|
76
|
+
seam: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The geometry as one inline `style` value: each length on
|
|
80
|
+
* its custom property, in pixels.
|
|
81
|
+
*/
|
|
82
|
+
export declare const stripStyle: (g: StripGeometry) => SoftStr;
|
|
83
|
+
/**
|
|
84
|
+
* The first column to show when only whole columns may
|
|
85
|
+
* stand beside the pinned panels: counting back from the
|
|
86
|
+
* last column while the next one still fits in what
|
|
87
|
+
* `pinned` leaves of the window. The last column always
|
|
88
|
+
* shows, however wide.
|
|
89
|
+
*/
|
|
90
|
+
export declare const visibleColumnStart: (widths: ReadonlyArray<number>, viewport: number, pinned: number) => number;
|
|
91
|
+
/**
|
|
92
|
+
* A remembered scroll offset, held to what the strip can
|
|
93
|
+
* still reach: going back in history returns the reader to
|
|
94
|
+
* where they were, unless the strip is now too short.
|
|
95
|
+
*/
|
|
96
|
+
export declare const reachableScroll: (left: number, scrollWidth: number, clientWidth: number) => number;
|
|
97
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../src/Layout/model/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,YAO1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YACd,YAAY,gBAEV,MAAM,UACR,MAAM,aACH,SAAS,KACnB,aAuCF,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOc,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,UAAU,MAClB,aAAa,KACf,OAQU,CAAC;AAEd;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,WACrB,aAAa,CAAC,MAAM,CAAC,YACnB,MAAM,UACR,MAAM,KACb,MAcF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,eACC,MAAM,eACN,MAAM,KAClB,MAOA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../../src/Layout/model/pane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../../src/Layout/model/pane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAChB,YAAY,GACZ,MAAM,GACN,eAAe,CAAC;AAcpB,mCAAmC;AACnC,eAAO,MAAM,WAAW,SAChB,QAAQ,KACb,OAAyB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** A horizontal extent in window coordinates. */
|
|
2
|
+
export type Span = Readonly<{
|
|
3
|
+
left: number;
|
|
4
|
+
right: number;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* Where a strip must be scrolled to for a column to be
|
|
8
|
+
* seen, given what of the strip is visible now. One rule
|
|
9
|
+
* for every column:
|
|
10
|
+
*
|
|
11
|
+
* - a column wider than the visible part shows its END
|
|
12
|
+
* (its right edge meets the visible right edge) — the
|
|
13
|
+
* newest content is where the reader's attention is;
|
|
14
|
+
* - a column cut off on the left comes to the left edge;
|
|
15
|
+
* - a column cut off on the right comes to the right edge;
|
|
16
|
+
* - a column already in full view moves nothing.
|
|
17
|
+
*
|
|
18
|
+
* Pure, and clamped to what the strip can reach.
|
|
19
|
+
*/
|
|
20
|
+
export declare const revealTarget: (current: number, maximum: number, visible: Span, column: Span) => number;
|
|
21
|
+
/**
|
|
22
|
+
* The glide's easing: fast at first, settling at the end
|
|
23
|
+
* (ease-out cubic). `progress` runs 0 to 1.
|
|
24
|
+
*/
|
|
25
|
+
export declare const glideEase: (progress: number) => number;
|
|
26
|
+
//# sourceMappingURL=reveal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveal.d.ts","sourceRoot":"","sources":["../../../src/Layout/model/reveal.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,YACd,MAAM,WACN,MAAM,WACN,IAAI,UACL,IAAI,KACX,MAcF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,aACV,MAAM,KACf,MAKA,CAAC"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { type SoftStr } from "plgg";
|
|
2
|
-
import { type Html } from "plgg-view";
|
|
2
|
+
import { type Html, type Attribute } from "plgg-view";
|
|
3
3
|
import { type Styles, type Variant } from "../../styleEntry";
|
|
4
4
|
import { type PaneRole } from "../model/pane";
|
|
5
|
+
import { rowClass, colClass, paneClass } from "../../Meta/model/classHooks";
|
|
6
|
+
/**
|
|
7
|
+
* The class hooks the layout skeleton emits. EXPORTED
|
|
8
|
+
* because a consumer that needs to name one — a
|
|
9
|
+
* stylesheet, a test — must import it rather than type it:
|
|
10
|
+
* a string a consumer types is a contract no compiler
|
|
11
|
+
* checks, and renaming the prefix would silently break
|
|
12
|
+
* every page that spelled it.
|
|
13
|
+
*
|
|
14
|
+
* RE-EXPORTED from `Meta/model/classHooks`, which is the
|
|
15
|
+
* single definition site for every hook the framework
|
|
16
|
+
* emits. This import path is kept because it is where
|
|
17
|
+
* consumers already reach for them.
|
|
18
|
+
*/
|
|
19
|
+
export { rowClass, colClass, paneClass };
|
|
5
20
|
/**
|
|
6
21
|
* What a combinator accepts as its style slot: exactly
|
|
7
22
|
* `style_`'s parts (class hooks, atom groups, variants).
|
|
@@ -23,6 +38,17 @@ export type Parts = ReadonlyArray<SoftStr | Styles | Variant>;
|
|
|
23
38
|
* config object.
|
|
24
39
|
*/
|
|
25
40
|
export declare const row: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
41
|
+
/**
|
|
42
|
+
* {@link row} with framework-owned ATTRIBUTES alongside
|
|
43
|
+
* its style parts. Not a widening of the recorded
|
|
44
|
+
* `(parts, children)` rule — that rule is about options
|
|
45
|
+
* being style atoms, and this is not an options bag. It
|
|
46
|
+
* exists so a framework module (Navigate's strip markers)
|
|
47
|
+
* can mark the skeleton it emits without either
|
|
48
|
+
* re-deciding the class/flow here or making a consumer
|
|
49
|
+
* spell `pm-row` by hand. Consumers use {@link row}.
|
|
50
|
+
*/
|
|
51
|
+
export declare const rowWith: <Msg>(attributes: ReadonlyArray<Attribute<Msg>>, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
26
52
|
/**
|
|
27
53
|
* One vertical track of the row. Contributes only the
|
|
28
54
|
* column flow (`flex-direction:column`) and its `pm-col`
|
|
@@ -31,6 +57,9 @@ export declare const row: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>
|
|
|
31
57
|
* remaining row.
|
|
32
58
|
*/
|
|
33
59
|
export declare const column: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
60
|
+
/** {@link column} with framework-owned attributes — see
|
|
61
|
+
* {@link rowWith} for why this pair exists. */
|
|
62
|
+
export declare const columnWith: <Msg>(attributes: ReadonlyArray<Attribute<Msg>>, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
34
63
|
/**
|
|
35
64
|
* A landmark content region inside a column: the
|
|
36
65
|
* accessibility skeleton of the pattern. `pane(role)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../../src/Layout/usecase/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../../src/Layout/usecase/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,MAAM,EACX,KAAK,OAAO,EAIb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACV,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,MAAM,KAAK,GAAG,aAAa,CAC/B,OAAO,GAAG,MAAM,GAAG,OAAO,CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,GAAI,GAAG,SACd,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAAiC,CAAC;AAE7C;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,cACb,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,SAClC,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAQR,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,SACjB,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAAoC,CAAC;AAEhD;+CAC+C;AAC/C,eAAO,MAAM,UAAU,GAAI,GAAG,cAChB,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,SAClC,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAQR,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,SACR,QAAQ,MACd,GAAG,SACK,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAKR,CAAC;AAEN,0DAA0D;AAC1D,eAAO,MAAM,OAAO,GAXjB,GAAG,SACK,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAQ4B,CAAC;AAC1C,uDAAuD;AACvD,eAAO,MAAM,QAAQ,GAblB,GAAG,SACK,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAUuB,CAAC;AACrC,uDAAuD;AACvD,eAAO,MAAM,SAAS,GAfnB,GAAG,SACK,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAYiC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* Where a yes/no preference is kept. `Storage`'s two
|
|
4
|
+
* methods, taken as a function so a test hands in a map
|
|
5
|
+
* and a browser hands in `localStorage` — and because
|
|
6
|
+
* merely touching `localStorage` can throw (a private
|
|
7
|
+
* window, a blocked site), which is why it is reached
|
|
8
|
+
* late and inside a guard.
|
|
9
|
+
*/
|
|
10
|
+
export type PreferenceStore = () => Pick<Storage, "getItem" | "setItem">;
|
|
11
|
+
/** The reading half of a {@link PreferenceStore}. */
|
|
12
|
+
export type PreferenceReader = () => Pick<Storage, "getItem">;
|
|
13
|
+
/** The writing half of a {@link PreferenceStore}. */
|
|
14
|
+
export type PreferenceWriter = () => Pick<Storage, "setItem">;
|
|
15
|
+
/**
|
|
16
|
+
* A remembered yes/no — a menu folded to its rail, a panel
|
|
17
|
+
* minimised. Absent, unreadable or anything but `"1"`
|
|
18
|
+
* reads as no: a preference is a convenience, and the page
|
|
19
|
+
* must lay out without it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const readPreference: (key: SoftStr, store?: PreferenceReader) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Remember a yes/no as `"1"`/`"0"`. A store that refuses
|
|
24
|
+
* is ignored: the choice still holds for this page.
|
|
25
|
+
*/
|
|
26
|
+
export declare const savePreference: (key: SoftStr, on: boolean, store?: PreferenceWriter) => boolean;
|
|
27
|
+
//# sourceMappingURL=preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference.d.ts","sourceRoot":"","sources":["../../../src/Layout/usecase/preference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,MAAM,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CACtC,OAAO,EACP,SAAS,GAAG,SAAS,CACtB,CAAC;AACF,qDAAqD;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CACvC,OAAO,EACP,SAAS,CACV,CAAC;AACF,qDAAqD;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CACvC,OAAO,EACP,SAAS,CACV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QACpB,OAAO,UACL,gBAAgB,KACtB,OASA,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,cAAc,QACpB,OAAO,MACR,OAAO,UACJ,gBAAgB,KACtB,OAUA,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* How a column is brought into view. `smooth` glides over
|
|
4
|
+
* {@link RevealOptions.duration}; `auto` jumps, which is
|
|
5
|
+
* what a reader who asked for less motion gets. `sticky`
|
|
6
|
+
* is an element pinned over the strip's left side (a
|
|
7
|
+
* sticky menu): while it covers part of the strip, the
|
|
8
|
+
* visible part starts at its right edge.
|
|
9
|
+
*/
|
|
10
|
+
export type RevealOptions = Readonly<{
|
|
11
|
+
behavior: "smooth" | "auto";
|
|
12
|
+
sticky: Element | null;
|
|
13
|
+
duration: number;
|
|
14
|
+
/**
|
|
15
|
+
* The attribute the strip carries while the glide runs.
|
|
16
|
+
* The framework's own by default; a product whose
|
|
17
|
+
* stylesheet already keys on another name passes that.
|
|
18
|
+
*/
|
|
19
|
+
marker: SoftStr;
|
|
20
|
+
}>;
|
|
21
|
+
/** A 280ms glide with nothing pinned over the strip. */
|
|
22
|
+
export declare const revealOptions: RevealOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Scroll `strip` so `column` is seen (see
|
|
25
|
+
* {@link revealTarget} for where it comes to rest).
|
|
26
|
+
*
|
|
27
|
+
* The glide belongs to the reader: a pointer press, a
|
|
28
|
+
* touch, a wheel turn or a key press on the strip ends it
|
|
29
|
+
* where it stands. While it runs the strip carries
|
|
30
|
+
* {@link RevealOptions.marker}, so a stylesheet can lift
|
|
31
|
+
* scroll-snap — a mandatory snap fights a scripted scroll
|
|
32
|
+
* frame by frame.
|
|
33
|
+
*
|
|
34
|
+
* DOM integration only: the decision is
|
|
35
|
+
* {@link revealTarget}, tested on its own; this file is
|
|
36
|
+
* excluded from coverage like `advanceColumns`.
|
|
37
|
+
*/
|
|
38
|
+
export declare const revealColumn: (strip: HTMLElement, column: Element, options?: RevealOptions) => void;
|
|
39
|
+
//# sourceMappingURL=revealColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revealColumn.d.ts","sourceRoot":"","sources":["../../../src/Layout/usecase/revealColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAOpC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AAEH,wDAAwD;AACxD,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC;AAUF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,UAChB,WAAW,UACV,OAAO,YACN,aAAa,KACrB,IA0EF,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Html, type Attribute } from "plgg-view";
|
|
2
|
+
import { type Parts } from "./combinators";
|
|
3
|
+
import { type StripGeometry } from "../model/geometry";
|
|
4
|
+
/**
|
|
5
|
+
* What a workspace is showing, beyond its columns: the
|
|
6
|
+
* lengths it is laid out by, whether its menu is shown,
|
|
7
|
+
* whether that menu is folded to a rail, and whether the
|
|
8
|
+
* window holds one column at a time.
|
|
9
|
+
*/
|
|
10
|
+
export type WorkspaceState = Readonly<{
|
|
11
|
+
geometry: StripGeometry;
|
|
12
|
+
menuOpen: boolean;
|
|
13
|
+
menuCompact: boolean;
|
|
14
|
+
phone: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* The frame a pinned panel and a strip of columns share —
|
|
18
|
+
* the horizontally scrolling element. It carries the
|
|
19
|
+
* geometry as custom properties and the three states as
|
|
20
|
+
* attributes, so {@link workspaceCss} lays everything out
|
|
21
|
+
* with no script of its own. Children are a
|
|
22
|
+
* {@link pinnedPanel} and a {@link browser}, in either
|
|
23
|
+
* order.
|
|
24
|
+
*/
|
|
25
|
+
export declare const workspace: <Msg>(state: WorkspaceState, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
26
|
+
/**
|
|
27
|
+
* {@link workspace} with the host's own attributes on the
|
|
28
|
+
* frame — its scroll handler above all: the frame is the
|
|
29
|
+
* element that scrolls, and the geometry needs to hear it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const workspaceWith: <Msg>(attributes: ReadonlyArray<Attribute<Msg>>, state: WorkspaceState, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
32
|
+
/**
|
|
33
|
+
* The panel pinned to the frame's left edge: it stays put
|
|
34
|
+
* while the strip scrolls under it, and gives up width to
|
|
35
|
+
* the columns down to its floor. An `<aside>` landmark.
|
|
36
|
+
*/
|
|
37
|
+
export declare const pinnedPanel: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
38
|
+
/**
|
|
39
|
+
* The strip beside the pinned panel: a {@link menuColumn},
|
|
40
|
+
* then columns. The trailing seam — the spacer that lets
|
|
41
|
+
* the last column come to rest beside the panel — is
|
|
42
|
+
* appended here, so a product cannot forget it.
|
|
43
|
+
*/
|
|
44
|
+
export declare const browser: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
45
|
+
/**
|
|
46
|
+
* The strip's menu track. Its width is the geometry's, or
|
|
47
|
+
* the rail's while the workspace is compact.
|
|
48
|
+
*/
|
|
49
|
+
export declare const menuColumn: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
50
|
+
/**
|
|
51
|
+
* How wide a strip column is: `fit` is one column of the
|
|
52
|
+
* geometry, `wide` two, `read` a reading measure that
|
|
53
|
+
* grows with the window.
|
|
54
|
+
*/
|
|
55
|
+
export type ColumnWidth = "fit" | "wide" | "read";
|
|
56
|
+
/** A strip column of a named width. */
|
|
57
|
+
export declare const widthColumn: <Msg>(width: ColumnWidth, parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
|
|
58
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/Layout/usecase/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAGf,MAAM,WAAW,CAAC;AAKnB,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AAazC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAQH;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,SACpB,cAAc,SACd,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CACgC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,cACnB,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,SAClC,cAAc,SACd,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAeR,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,SACtB,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAKR,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,SAClB,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAeR,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,SACrB,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CACsC,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,uCAAuC;AACvC,eAAO,MAAM,WAAW,GAAI,GAAG,SACtB,WAAW,SACX,KAAK,YACF,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KACjC,IAAI,CAAC,GAAG,CAKR,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
export declare const rowClass: SoftStr;
|
|
3
|
+
export declare const colClass: SoftStr;
|
|
4
|
+
export declare const paneClass: SoftStr;
|
|
5
|
+
/** A placed column's close control. */
|
|
6
|
+
export declare const foldClass: SoftStr;
|
|
7
|
+
/** The row naming every open column. */
|
|
8
|
+
export declare const trailClass: SoftStr;
|
|
9
|
+
/** The frame a pinned panel and a strip share. */
|
|
10
|
+
export declare const workspaceClass: SoftStr;
|
|
11
|
+
/** The panel pinned to the frame's left edge. */
|
|
12
|
+
export declare const pinnedClass: SoftStr;
|
|
13
|
+
/** The strip beside the pinned panel: menu, columns, seam. */
|
|
14
|
+
export declare const browserClass: SoftStr;
|
|
15
|
+
/** The strip's menu track. */
|
|
16
|
+
export declare const menuClass: SoftStr;
|
|
17
|
+
/** The spacer after the last column. */
|
|
18
|
+
export declare const seamClass: SoftStr;
|
|
19
|
+
/** Set on the workspace while its menu is shown. */
|
|
20
|
+
export declare const menuOpenAttr: SoftStr;
|
|
21
|
+
/** Set on the workspace while its menu is a narrow rail. */
|
|
22
|
+
export declare const menuCompactAttr: SoftStr;
|
|
23
|
+
/** Set on the workspace when the window holds one column. */
|
|
24
|
+
export declare const phoneAttr: SoftStr;
|
|
25
|
+
/**
|
|
26
|
+
* Set on the workspace while the framework itself is
|
|
27
|
+
* scrolling it, so a stylesheet can lift scroll-snap for
|
|
28
|
+
* the length of the glide.
|
|
29
|
+
*/
|
|
30
|
+
export declare const programmaticScrollAttr: SoftStr;
|
|
31
|
+
/** A strip column's width kind (`fit`/`wide`/`read`). */
|
|
32
|
+
export declare const widthAttr: SoftStr;
|
|
33
|
+
/** The sidebar's `<nav>`. */
|
|
34
|
+
export declare const navClass: SoftStr;
|
|
35
|
+
/** The sidebar counting its rows 01, 02, …. */
|
|
36
|
+
export declare const navNumberedClass: SoftStr;
|
|
37
|
+
/** One titled group of rows. */
|
|
38
|
+
export declare const navGroupClass: SoftStr;
|
|
39
|
+
/** A group's title (its `<summary>` when it toggles). */
|
|
40
|
+
export declare const navGroupTitleClass: SoftStr;
|
|
41
|
+
/** A row that is a link. */
|
|
42
|
+
export declare const navLinkClass: SoftStr;
|
|
43
|
+
/** A row that is plain text. */
|
|
44
|
+
export declare const navFlatClass: SoftStr;
|
|
45
|
+
/** A nested group inside a group. */
|
|
46
|
+
export declare const navSubgroupClass: SoftStr;
|
|
47
|
+
/** A nested group's title. */
|
|
48
|
+
export declare const navSubgroupTitleClass: SoftStr;
|
|
49
|
+
export declare const themeToggleClass: SoftStr;
|
|
50
|
+
export declare const sunClass: SoftStr;
|
|
51
|
+
export declare const moonClass: SoftStr;
|
|
52
|
+
export declare const btnClass: SoftStr;
|
|
53
|
+
export declare const btnPrimaryClass: SoftStr;
|
|
54
|
+
export declare const btnDangerClass: SoftStr;
|
|
55
|
+
export declare const actionsClass: SoftStr;
|
|
56
|
+
export declare const disabledClass: SoftStr;
|
|
57
|
+
export declare const modalClass: SoftStr;
|
|
58
|
+
export declare const backdropClass: SoftStr;
|
|
59
|
+
export declare const dialogClass: SoftStr;
|
|
60
|
+
export declare const dialogTitleClass: SoftStr;
|
|
61
|
+
export declare const dialogActionsClass: SoftStr;
|
|
62
|
+
export declare const toasterClass: SoftStr;
|
|
63
|
+
export declare const toastClass: SoftStr;
|
|
64
|
+
export declare const toastCloseClass: SoftStr;
|
|
65
|
+
/**
|
|
66
|
+
* The tone modifier a toast carries beside
|
|
67
|
+
* {@link toastClass} — `pm-toast-success`,
|
|
68
|
+
* `pm-toast-danger`, and so on. A function rather than a
|
|
69
|
+
* constant because the tone is a value, and a consumer
|
|
70
|
+
* styling one tone should still not have to spell the
|
|
71
|
+
* prefix.
|
|
72
|
+
*/
|
|
73
|
+
export declare const toastToneClass: (tone: SoftStr) => SoftStr;
|
|
74
|
+
export declare const formClass: SoftStr;
|
|
75
|
+
export declare const fieldsClass: SoftStr;
|
|
76
|
+
export declare const fieldClass: SoftStr;
|
|
77
|
+
export declare const fieldLabelClass: SoftStr;
|
|
78
|
+
export declare const fieldErrorClass: SoftStr;
|
|
79
|
+
export declare const fieldValueClass: SoftStr;
|
|
80
|
+
export declare const inputClass: SoftStr;
|
|
81
|
+
export declare const checkClass: SoftStr;
|
|
82
|
+
export declare const checkboxClass: SoftStr;
|
|
83
|
+
export declare const checkLabelClass: SoftStr;
|
|
84
|
+
export declare const fieldNumClass: SoftStr;
|
|
85
|
+
export declare const fieldFlagClass: SoftStr;
|
|
86
|
+
export declare const fieldMomentClass: SoftStr;
|
|
87
|
+
export declare const fieldRefClass: SoftStr;
|
|
88
|
+
export declare const fieldMediaClass: SoftStr;
|
|
89
|
+
export declare const colHeadClass: SoftStr;
|
|
90
|
+
export declare const colHeadTitleClass: SoftStr;
|
|
91
|
+
export declare const colHeadLinkClass: SoftStr;
|
|
92
|
+
export declare const crumbsClass: SoftStr;
|
|
93
|
+
export declare const crumbHereClass: SoftStr;
|
|
94
|
+
export declare const crumbLinkClass: SoftStr;
|
|
95
|
+
export declare const crumbSepClass: SoftStr;
|
|
96
|
+
export declare const schedulerClass: SoftStr;
|
|
97
|
+
export declare const singleClass: SoftStr;
|
|
98
|
+
export declare const backClass: SoftStr;
|
|
99
|
+
export declare const hintClass: SoftStr;
|
|
100
|
+
export declare const errorClass: SoftStr;
|
|
101
|
+
export declare const menuBodyClass: SoftStr;
|
|
102
|
+
export declare const listClass: SoftStr;
|
|
103
|
+
export declare const listItemClass: SoftStr;
|
|
104
|
+
export declare const listActionsClass: SoftStr;
|
|
105
|
+
export declare const listActionClass: SoftStr;
|
|
106
|
+
export declare const rowLinkClass: SoftStr;
|
|
107
|
+
export declare const boardClass: SoftStr;
|
|
108
|
+
export declare const tileClass: SoftStr;
|
|
109
|
+
export declare const tileBodyClass: SoftStr;
|
|
110
|
+
export declare const tileLinkClass: SoftStr;
|
|
111
|
+
export declare const tileLabelClass: SoftStr;
|
|
112
|
+
export declare const tileCaptionClass: SoftStr;
|
|
113
|
+
export declare const queryClass: SoftStr;
|
|
114
|
+
export declare const queryChoiceClass: SoftStr;
|
|
115
|
+
/**
|
|
116
|
+
* A plggmatic CSS custom property, by name:
|
|
117
|
+
* `cssVar("surface")` → `--pm-surface`.
|
|
118
|
+
*
|
|
119
|
+
* The colour tokens the emitters write are read back by a
|
|
120
|
+
* consumer's own stylesheet, so the `--pm-*` namespace is
|
|
121
|
+
* as much a contract as the class hooks — and spelling it
|
|
122
|
+
* by hand has the same failure mode. Distinct from
|
|
123
|
+
* `colorVar`, which yields the `var(--pm-…)` REFERENCE for
|
|
124
|
+
* a `Color` under a `Theme`; this is the bare property
|
|
125
|
+
* name, for a consumer composing raw CSS text.
|
|
126
|
+
*/
|
|
127
|
+
export declare const cssVar: (name: SoftStr) => SoftStr;
|
|
128
|
+
/**
|
|
129
|
+
* A reference to a plggmatic custom property:
|
|
130
|
+
* `cssVarRef("surface")` → `var(--pm-surface)`. The form a
|
|
131
|
+
* consumer's CSS declaration actually wants.
|
|
132
|
+
*/
|
|
133
|
+
export declare const cssVarRef: (name: SoftStr) => SoftStr;
|
|
134
|
+
/**
|
|
135
|
+
* A class SELECTOR for a hook: `selector(paneClass)` →
|
|
136
|
+
* `.pm-pane`. Sugar for a consumer writing a stylesheet as
|
|
137
|
+
* a template string, where `.${paneClass}` reads worse
|
|
138
|
+
* than the call.
|
|
139
|
+
*/
|
|
140
|
+
export declare const selector: (hookClass: SoftStr) => SoftStr;
|
|
141
|
+
//# sourceMappingURL=classHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classHooks.d.ts","sourceRoot":"","sources":["../../../src/Meta/model/classHooks.ts"],"names":[],"mappings":"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"}
|
|
@@ -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"}
|