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.
Files changed (221) hide show
  1. package/README.md +37 -0
  2. package/dist/Catalog/index.d.ts +17 -0
  3. package/dist/Catalog/index.d.ts.map +1 -0
  4. package/dist/Catalog/model/tool.d.ts +101 -0
  5. package/dist/Catalog/model/tool.d.ts.map +1 -0
  6. package/dist/Catalog/usecase/adapter.d.ts +81 -0
  7. package/dist/Catalog/usecase/adapter.d.ts.map +1 -0
  8. package/dist/Catalog/usecase/catalog.d.ts +43 -0
  9. package/dist/Catalog/usecase/catalog.d.ts.map +1 -0
  10. package/dist/Catalog/usecase/runFlow.d.ts +77 -0
  11. package/dist/Catalog/usecase/runFlow.d.ts.map +1 -0
  12. package/dist/Component/index.d.ts +30 -0
  13. package/dist/Component/index.d.ts.map +1 -0
  14. package/dist/Component/model/interaction.d.ts +41 -0
  15. package/dist/Component/model/interaction.d.ts.map +1 -0
  16. package/dist/Component/model/navItem.d.ts +16 -0
  17. package/dist/Component/model/navItem.d.ts.map +1 -0
  18. package/dist/Component/usecase/breadcrumb.d.ts +26 -0
  19. package/dist/Component/usecase/breadcrumb.d.ts.map +1 -0
  20. package/dist/Component/usecase/button.d.ts +27 -0
  21. package/dist/Component/usecase/button.d.ts.map +1 -0
  22. package/dist/Component/usecase/checkbox.d.ts +20 -0
  23. package/dist/Component/usecase/checkbox.d.ts.map +1 -0
  24. package/dist/Component/usecase/colHead.d.ts +28 -0
  25. package/dist/Component/usecase/colHead.d.ts.map +1 -0
  26. package/dist/Component/usecase/confirmDialog.d.ts +25 -0
  27. package/dist/Component/usecase/confirmDialog.d.ts.map +1 -0
  28. package/dist/Component/usecase/declaredForm.d.ts +89 -0
  29. package/dist/Component/usecase/declaredForm.d.ts.map +1 -0
  30. package/dist/Component/usecase/navTree.d.ts +21 -0
  31. package/dist/Component/usecase/navTree.d.ts.map +1 -0
  32. package/dist/Component/usecase/selectInput.d.ts +28 -0
  33. package/dist/Component/usecase/selectInput.d.ts.map +1 -0
  34. package/dist/Component/usecase/sidebarNav.d.ts +77 -0
  35. package/dist/Component/usecase/sidebarNav.d.ts.map +1 -0
  36. package/dist/Component/usecase/textArea.d.ts +22 -0
  37. package/dist/Component/usecase/textArea.d.ts.map +1 -0
  38. package/dist/Component/usecase/textInput.d.ts +23 -0
  39. package/dist/Component/usecase/textInput.d.ts.map +1 -0
  40. package/dist/Component/usecase/textLink.d.ts +26 -0
  41. package/dist/Component/usecase/textLink.d.ts.map +1 -0
  42. package/dist/Component/usecase/themeToggle.d.ts +75 -0
  43. package/dist/Component/usecase/themeToggle.d.ts.map +1 -0
  44. package/dist/Component/usecase/toast.d.ts +32 -0
  45. package/dist/Component/usecase/toast.d.ts.map +1 -0
  46. package/dist/Component/usecase/typography.d.ts +33 -0
  47. package/dist/Component/usecase/typography.d.ts.map +1 -0
  48. package/dist/Declare/model/Action.d.ts +91 -0
  49. package/dist/Declare/model/Action.d.ts.map +1 -0
  50. package/dist/Declare/model/Adapter.d.ts +107 -0
  51. package/dist/Declare/model/Adapter.d.ts.map +1 -0
  52. package/dist/Declare/model/Collection.d.ts +55 -0
  53. package/dist/Declare/model/Collection.d.ts.map +1 -0
  54. package/dist/Declare/model/Declaration.d.ts +27 -0
  55. package/dist/Declare/model/Declaration.d.ts.map +1 -0
  56. package/dist/Declare/model/Menu.d.ts +21 -0
  57. package/dist/Declare/model/Menu.d.ts.map +1 -0
  58. package/dist/Declare/model/Query.d.ts +56 -0
  59. package/dist/Declare/model/Query.d.ts.map +1 -0
  60. package/dist/Declare/model/Row.d.ts +129 -0
  61. package/dist/Declare/model/Row.d.ts.map +1 -0
  62. package/dist/Declare/model/Source.d.ts +83 -0
  63. package/dist/Declare/model/Source.d.ts.map +1 -0
  64. package/dist/Declare/usecase/apply.d.ts +23 -0
  65. package/dist/Declare/usecase/apply.d.ts.map +1 -0
  66. package/dist/Declare/usecase/project.d.ts +66 -0
  67. package/dist/Declare/usecase/project.d.ts.map +1 -0
  68. package/dist/Declare/usecase/reconcile.d.ts +63 -0
  69. package/dist/Declare/usecase/reconcile.d.ts.map +1 -0
  70. package/dist/Flow/model/forms.d.ts +45 -0
  71. package/dist/Flow/model/forms.d.ts.map +1 -0
  72. package/dist/Flow/model/run.d.ts +74 -0
  73. package/dist/Flow/model/run.d.ts.map +1 -0
  74. package/dist/Flow/model/script.d.ts +279 -0
  75. package/dist/Flow/model/script.d.ts.map +1 -0
  76. package/dist/Flow/usecase/interpret.d.ts +17 -0
  77. package/dist/Flow/usecase/interpret.d.ts.map +1 -0
  78. package/dist/Flow/usecase/read.d.ts +46 -0
  79. package/dist/Flow/usecase/read.d.ts.map +1 -0
  80. package/dist/Form/index.d.ts +14 -0
  81. package/dist/Form/index.d.ts.map +1 -0
  82. package/dist/Form/model/control.d.ts +9 -0
  83. package/dist/Form/model/control.d.ts.map +1 -0
  84. package/dist/Form/model/submission.d.ts +30 -0
  85. package/dist/Form/model/submission.d.ts.map +1 -0
  86. package/dist/Form/usecase/controlParts.d.ts +30 -0
  87. package/dist/Form/usecase/controlParts.d.ts.map +1 -0
  88. package/dist/Form/usecase/formView.d.ts +21 -0
  89. package/dist/Form/usecase/formView.d.ts.map +1 -0
  90. package/dist/Form/usecase/parseForm.d.ts +28 -0
  91. package/dist/Form/usecase/parseForm.d.ts.map +1 -0
  92. package/dist/Layout/index.d.ts +21 -0
  93. package/dist/Layout/index.d.ts.map +1 -0
  94. package/dist/Layout/model/geometry.d.ts +97 -0
  95. package/dist/Layout/model/geometry.d.ts.map +1 -0
  96. package/dist/Layout/model/pane.d.ts +15 -0
  97. package/dist/Layout/model/pane.d.ts.map +1 -0
  98. package/dist/Layout/model/reveal.d.ts +26 -0
  99. package/dist/Layout/model/reveal.d.ts.map +1 -0
  100. package/dist/Layout/usecase/combinators.d.ts +78 -0
  101. package/dist/Layout/usecase/combinators.d.ts.map +1 -0
  102. package/dist/Layout/usecase/preference.d.ts +27 -0
  103. package/dist/Layout/usecase/preference.d.ts.map +1 -0
  104. package/dist/Layout/usecase/revealColumn.d.ts +39 -0
  105. package/dist/Layout/usecase/revealColumn.d.ts.map +1 -0
  106. package/dist/Layout/usecase/workspace.d.ts +58 -0
  107. package/dist/Layout/usecase/workspace.d.ts.map +1 -0
  108. package/dist/Meta/model/classHooks.d.ts +141 -0
  109. package/dist/Meta/model/classHooks.d.ts.map +1 -0
  110. package/dist/Meta/model/identity.d.ts +16 -0
  111. package/dist/Meta/model/identity.d.ts.map +1 -0
  112. package/dist/Navigate/index.d.ts +19 -0
  113. package/dist/Navigate/index.d.ts.map +1 -0
  114. package/dist/Navigate/model/Composition.d.ts +50 -0
  115. package/dist/Navigate/model/Composition.d.ts.map +1 -0
  116. package/dist/Navigate/model/Trail.d.ts +84 -0
  117. package/dist/Navigate/model/Trail.d.ts.map +1 -0
  118. package/dist/Navigate/model/marker.d.ts +44 -0
  119. package/dist/Navigate/model/marker.d.ts.map +1 -0
  120. package/dist/Navigate/usecase/compositionUrl.d.ts +63 -0
  121. package/dist/Navigate/usecase/compositionUrl.d.ts.map +1 -0
  122. package/dist/Navigate/usecase/navigationScript.d.ts +16 -0
  123. package/dist/Navigate/usecase/navigationScript.d.ts.map +1 -0
  124. package/dist/Navigate/usecase/trailUrl.d.ts +61 -0
  125. package/dist/Navigate/usecase/trailUrl.d.ts.map +1 -0
  126. package/dist/Render/index.d.ts +18 -0
  127. package/dist/Render/index.d.ts.map +1 -0
  128. package/dist/Render/model/mode.d.ts +13 -0
  129. package/dist/Render/model/mode.d.ts.map +1 -0
  130. package/dist/Render/model/screen.d.ts +27 -0
  131. package/dist/Render/model/screen.d.ts.map +1 -0
  132. package/dist/Render/usecase/advanceColumns.d.ts +41 -0
  133. package/dist/Render/usecase/advanceColumns.d.ts.map +1 -0
  134. package/dist/Render/usecase/multiColumn.d.ts +52 -0
  135. package/dist/Render/usecase/multiColumn.d.ts.map +1 -0
  136. package/dist/Render/usecase/parts.d.ts +56 -0
  137. package/dist/Render/usecase/parts.d.ts.map +1 -0
  138. package/dist/Render/usecase/renderMode.d.ts +17 -0
  139. package/dist/Render/usecase/renderMode.d.ts.map +1 -0
  140. package/dist/Render/usecase/singleColumn.d.ts +20 -0
  141. package/dist/Render/usecase/singleColumn.d.ts.map +1 -0
  142. package/dist/Schedule/model/Model.d.ts +103 -0
  143. package/dist/Schedule/model/Model.d.ts.map +1 -0
  144. package/dist/Schedule/model/Msg.d.ts +131 -0
  145. package/dist/Schedule/model/Msg.d.ts.map +1 -0
  146. package/dist/Schedule/model/Scene.d.ts +190 -0
  147. package/dist/Schedule/model/Scene.d.ts.map +1 -0
  148. package/dist/Schedule/model/View.d.ts +54 -0
  149. package/dist/Schedule/model/View.d.ts.map +1 -0
  150. package/dist/Schedule/usecase/chain.d.ts +16 -0
  151. package/dist/Schedule/usecase/chain.d.ts.map +1 -0
  152. package/dist/Schedule/usecase/codec.d.ts +44 -0
  153. package/dist/Schedule/usecase/codec.d.ts.map +1 -0
  154. package/dist/Schedule/usecase/lower.d.ts +45 -0
  155. package/dist/Schedule/usecase/lower.d.ts.map +1 -0
  156. package/dist/Schedule/usecase/scene.d.ts +16 -0
  157. package/dist/Schedule/usecase/scene.d.ts.map +1 -0
  158. package/dist/Schedule/usecase/schedule.d.ts +72 -0
  159. package/dist/Schedule/usecase/schedule.d.ts.map +1 -0
  160. package/dist/Schedule/usecase/update.d.ts +39 -0
  161. package/dist/Schedule/usecase/update.d.ts.map +1 -0
  162. package/dist/Style/index.d.ts +34 -0
  163. package/dist/Style/index.d.ts.map +1 -0
  164. package/dist/Style/model/appearance.d.ts +23 -0
  165. package/dist/Style/model/appearance.d.ts.map +1 -0
  166. package/dist/Style/model/breakpoint.d.ts +43 -0
  167. package/dist/Style/model/breakpoint.d.ts.map +1 -0
  168. package/dist/Style/model/componentSlot.d.ts +35 -0
  169. package/dist/Style/model/componentSlot.d.ts.map +1 -0
  170. package/dist/Style/model/hexColor.d.ts +26 -0
  171. package/dist/Style/model/hexColor.d.ts.map +1 -0
  172. package/dist/Style/model/metric.d.ts +35 -0
  173. package/dist/Style/model/metric.d.ts.map +1 -0
  174. package/dist/Style/model/palette.d.ts +38 -0
  175. package/dist/Style/model/palette.d.ts.map +1 -0
  176. package/dist/Style/model/scheme.d.ts +26 -0
  177. package/dist/Style/model/scheme.d.ts.map +1 -0
  178. package/dist/Style/model/syntax.d.ts +54 -0
  179. package/dist/Style/model/syntax.d.ts.map +1 -0
  180. package/dist/Style/model/theme.d.ts +68 -0
  181. package/dist/Style/model/theme.d.ts.map +1 -0
  182. package/dist/Style/model/token.d.ts +142 -0
  183. package/dist/Style/model/token.d.ts.map +1 -0
  184. package/dist/Style/model/typography.d.ts +83 -0
  185. package/dist/Style/model/typography.d.ts.map +1 -0
  186. package/dist/Style/model/zIndex.d.ts +25 -0
  187. package/dist/Style/model/zIndex.d.ts.map +1 -0
  188. package/dist/Style/usecase/appearanceScript.d.ts +43 -0
  189. package/dist/Style/usecase/appearanceScript.d.ts.map +1 -0
  190. package/dist/Style/usecase/chromeCss.d.ts +41 -0
  191. package/dist/Style/usecase/chromeCss.d.ts.map +1 -0
  192. package/dist/Style/usecase/contrast.d.ts +3 -0
  193. package/dist/Style/usecase/contrast.d.ts.map +1 -0
  194. package/dist/Style/usecase/metricCss.d.ts +17 -0
  195. package/dist/Style/usecase/metricCss.d.ts.map +1 -0
  196. package/dist/Style/usecase/reducedMotion.d.ts +20 -0
  197. package/dist/Style/usecase/reducedMotion.d.ts.map +1 -0
  198. package/dist/Style/usecase/runwayCss.d.ts +50 -0
  199. package/dist/Style/usecase/runwayCss.d.ts.map +1 -0
  200. package/dist/Style/usecase/schemeCss.d.ts +25 -0
  201. package/dist/Style/usecase/schemeCss.d.ts.map +1 -0
  202. package/dist/Style/usecase/slotCss.d.ts +73 -0
  203. package/dist/Style/usecase/slotCss.d.ts.map +1 -0
  204. package/dist/Style/usecase/syntaxCss.d.ts +14 -0
  205. package/dist/Style/usecase/syntaxCss.d.ts.map +1 -0
  206. package/dist/Style/usecase/utilities.d.ts +98 -0
  207. package/dist/Style/usecase/utilities.d.ts.map +1 -0
  208. package/dist/Style/usecase/workspaceCss.d.ts +48 -0
  209. package/dist/Style/usecase/workspaceCss.d.ts.map +1 -0
  210. package/dist/brand.d.ts +29 -0
  211. package/dist/brand.d.ts.map +1 -0
  212. package/dist/columnsEntry.d.ts +27 -0
  213. package/dist/columnsEntry.d.ts.map +1 -0
  214. package/dist/columnsEntry.es.js +452 -0
  215. package/dist/index.d.ts +63 -0
  216. package/dist/index.d.ts.map +1 -0
  217. package/dist/index.es.js +6022 -0
  218. package/dist/styleEntry.d.ts +34 -0
  219. package/dist/styleEntry.d.ts.map +1 -0
  220. package/dist/styleEntry.es.js +1615 -0
  221. package/package.json +15 -8
@@ -0,0 +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;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"}
@@ -0,0 +1,21 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html, type Flow } from "plgg-view";
3
+ /**
4
+ * The form assembly: a `<form>` (plgg-view already
5
+ * `preventDefault`s `onSubmit`) wrapping the field
6
+ * controls and a submit button. When `submitting`, the
7
+ * submit button is natively disabled and dims (the
8
+ * pending state; the CONTROLS are disabled by the
9
+ * consumer passing `disabled` to each). One `onSubmit`
10
+ * Msg — the consumer's `update` parses the drafts
11
+ * (`parseForm`) and folds to field errors or the Action's
12
+ * `Cmd`; this component owns no state.
13
+ */
14
+ export type FormViewProps<Msg> = Readonly<{
15
+ fields: ReadonlyArray<Flow<Msg>>;
16
+ submitLabel: SoftStr;
17
+ submitting: boolean;
18
+ onSubmit: Msg;
19
+ }>;
20
+ export declare const formView: <Msg>(props: FormViewProps<Msg>) => Html<Msg, "form">;
21
+ //# sourceMappingURL=formView.d.ts.map
@@ -0,0 +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;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"}
@@ -0,0 +1,28 @@
1
+ import { type SoftStr, type Datum, type Result, type Option, type InvalidError } from "plgg";
2
+ /**
3
+ * One field's parse contract: its name and a caster that
4
+ * turns the raw draft into a typed value or an
5
+ * `InvalidError`. The caster IS the validation — "parse,
6
+ * don't validate" (`asStr`'s `Result<A, InvalidError>`
7
+ * shape); there is no second validate-then-convert layer.
8
+ */
9
+ export type FieldSpec = Readonly<{
10
+ name: SoftStr;
11
+ cast: (value: unknown) => Result<Datum, InvalidError>;
12
+ }>;
13
+ /** Per-field parse errors — `[name, message]` pairs. */
14
+ export type FormErrors = ReadonlyArray<readonly [SoftStr, SoftStr]>;
15
+ /** The parsed payload — field name → typed value. */
16
+ export type Payload = Readonly<Record<string, Datum>>;
17
+ /**
18
+ * Parses every field's draft through its caster in ONE
19
+ * pass, collecting ALL failures (not fail-fast, unlike a
20
+ * `cast` pipeline — a form shows every field's error at
21
+ * once). `Ok` with the typed payload when all fields
22
+ * parse; `Err` with per-field `[name, message]` errors
23
+ * when any fails. Total and DOM-free.
24
+ */
25
+ export declare const parseForm: (specs: ReadonlyArray<FieldSpec>, draftOf: (name: SoftStr) => SoftStr) => Result<Payload, FormErrors>;
26
+ /** The error message for a field name, if any. */
27
+ export declare const errorFor: (errors: FormErrors, name: SoftStr) => Option<SoftStr>;
28
+ //# sourceMappingURL=parseForm.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The plggmatic Layout module: the column-oriented
3
+ * pattern as COMPOSITION. A screen is an ordered
4
+ * {@link row} of {@link column}s, each holding
5
+ * {@link pane} landmarks — small builders that take
6
+ * `(parts, children)` like element builders take
7
+ * `(attributes, children)`. There is no layout config
8
+ * object and no interpreter: sizing (`basis`/`fluid`),
9
+ * scroll, and responsiveness are style parts and the
10
+ * consumer's own stylesheet targeting the `pm-row`/
11
+ * `pm-col`/`pm-pane` hooks. An explicit named barrel
12
+ * (house style); it grows one recorded rule at a time.
13
+ */
14
+ export { type PaneRole, landmarkTag, } from "./model/pane";
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";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,15 @@
1
+ import { type SoftStr } from "plgg";
2
+ /**
3
+ * The landmark role a pane plays in the page. A closed
4
+ * union (not a free string), mapped to a semantic HTML
5
+ * element by an exhaustive `Record` — so every pane
6
+ * renders as a real landmark and a new role cannot be
7
+ * added without giving it an element. This is the seed
8
+ * set the known consumers need (a `navigation` sidebar,
9
+ * a `main` content column, a `complementary` rail/list);
10
+ * more roles arrive one at a time with a consumer.
11
+ */
12
+ export type PaneRole = "navigation" | "main" | "complementary";
13
+ /** The landmark tag for a role. */
14
+ export declare const landmarkTag: (role: PaneRole) => SoftStr;
15
+ //# sourceMappingURL=pane.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,78 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html, type Attribute } from "plgg-view";
3
+ import { type Styles, type Variant } from "../../styleEntry";
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 };
20
+ /**
21
+ * What a combinator accepts as its style slot: exactly
22
+ * `style_`'s parts (class hooks, atom groups, variants).
23
+ * The combinator merges its own base parts and the
24
+ * consumer's into ONE `style_` call — `style_` is the
25
+ * sole class authority, so two calls on one element
26
+ * would clobber each other.
27
+ */
28
+ export type Parts = ReadonlyArray<SoftStr | Styles | Variant>;
29
+ /**
30
+ * The screen as a horizontal strip of columns — the
31
+ * column-oriented pattern's outermost piece. Purely
32
+ * compositional: `row` contributes only `display:flex`
33
+ * and its `pm-row` hook; height, snapping, and collapse
34
+ * are the consumer's parts and stylesheet. **Recorded
35
+ * rule**: layout combinators take `(parts, children)`
36
+ * like element builders take `(attributes, children)` —
37
+ * options are style atoms you compose, never fields on a
38
+ * config object.
39
+ */
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>;
52
+ /**
53
+ * One vertical track of the row. Contributes only the
54
+ * column flow (`flex-direction:column`) and its `pm-col`
55
+ * hook; sizing is a composed atom — `basis("220px")` for
56
+ * a fixed track, `fluid` for the one that fills the
57
+ * remaining row.
58
+ */
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>;
63
+ /**
64
+ * A landmark content region inside a column: the
65
+ * accessibility skeleton of the pattern. `pane(role)`
66
+ * renders the role's semantic element (`nav`, `main`,
67
+ * `aside` — see {@link landmarkTag}) around arbitrary
68
+ * consumer content, with the `pm-pane` hook. Scroll,
69
+ * padding, and measure caps are composed parts.
70
+ */
71
+ export declare const pane: (role: PaneRole) => <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
72
+ /** The `navigation` pane — renders a `<nav>` landmark. */
73
+ export declare const navPane: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
74
+ /** The `main` pane — renders the `<main>` landmark. */
75
+ export declare const mainPane: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
76
+ /** The `complementary` pane — renders an `<aside>`. */
77
+ export declare const asidePane: <Msg>(parts: Parts, children: ReadonlyArray<Html<Msg>>) => Html<Msg>;
78
+ //# sourceMappingURL=combinators.d.ts.map
@@ -0,0 +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,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;;;;;;;;;;;;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,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,MAA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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":"AAAA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AO,MAAM,cAAc,EAAE,OACT,CAAC;AACrB,eAAO,MAAM,gBAAgB,EAAE,OAE9B,CAAC;AACF,eAAO,MAAM,UAAU,EAAE,OAAuB,CAAC;AACjD,eAAO,MAAM,gBAAgB,EAAE,OAE9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,SAAU,OAAO,KAAG,OACb,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,SAAS,SACd,OAAO,KACZ,OAAiC,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,cACR,OAAO,KACjB,OAA0B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The framework's fixed identity values. `frameworkName`
3
+ * is the one word for this framework everywhere (docs,
4
+ * data attributes, error messages); `cssPrefix` is the
5
+ * namespace every plggmatic CSS custom property carries
6
+ * (`--pm-...`), keeping framework variables from
7
+ * colliding with an app's own.
8
+ */
9
+ export declare const frameworkName = "plggmatic";
10
+ /**
11
+ * Prefix for CSS custom properties owned by plggmatic
12
+ * (e.g. `--pm-surface`). Consumed by the color-scheme
13
+ * emitter.
14
+ */
15
+ export declare const cssPrefix = "pm";
16
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/Meta/model/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,SAAS,OAAO,CAAC"}