plggmatic 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/Catalog/index.d.ts +17 -0
  2. package/dist/Catalog/index.d.ts.map +1 -0
  3. package/dist/Catalog/model/tool.d.ts +101 -0
  4. package/dist/Catalog/model/tool.d.ts.map +1 -0
  5. package/dist/Catalog/usecase/adapter.d.ts +81 -0
  6. package/dist/Catalog/usecase/adapter.d.ts.map +1 -0
  7. package/dist/Catalog/usecase/catalog.d.ts +43 -0
  8. package/dist/Catalog/usecase/catalog.d.ts.map +1 -0
  9. package/dist/Catalog/usecase/runFlow.d.ts +77 -0
  10. package/dist/Catalog/usecase/runFlow.d.ts.map +1 -0
  11. package/dist/Component/index.d.ts +28 -0
  12. package/dist/Component/index.d.ts.map +1 -0
  13. package/dist/Component/model/interaction.d.ts +41 -0
  14. package/dist/Component/model/interaction.d.ts.map +1 -0
  15. package/dist/Component/model/navItem.d.ts +16 -0
  16. package/dist/Component/model/navItem.d.ts.map +1 -0
  17. package/dist/Component/usecase/breadcrumb.d.ts +26 -0
  18. package/dist/Component/usecase/breadcrumb.d.ts.map +1 -0
  19. package/dist/Component/usecase/button.d.ts +27 -0
  20. package/dist/Component/usecase/button.d.ts.map +1 -0
  21. package/dist/Component/usecase/checkbox.d.ts +20 -0
  22. package/dist/Component/usecase/checkbox.d.ts.map +1 -0
  23. package/dist/Component/usecase/colHead.d.ts +28 -0
  24. package/dist/Component/usecase/colHead.d.ts.map +1 -0
  25. package/dist/Component/usecase/confirmDialog.d.ts +25 -0
  26. package/dist/Component/usecase/confirmDialog.d.ts.map +1 -0
  27. package/dist/Component/usecase/navTree.d.ts +21 -0
  28. package/dist/Component/usecase/navTree.d.ts.map +1 -0
  29. package/dist/Component/usecase/selectInput.d.ts +28 -0
  30. package/dist/Component/usecase/selectInput.d.ts.map +1 -0
  31. package/dist/Component/usecase/textArea.d.ts +22 -0
  32. package/dist/Component/usecase/textArea.d.ts.map +1 -0
  33. package/dist/Component/usecase/textInput.d.ts +23 -0
  34. package/dist/Component/usecase/textInput.d.ts.map +1 -0
  35. package/dist/Component/usecase/textLink.d.ts +26 -0
  36. package/dist/Component/usecase/textLink.d.ts.map +1 -0
  37. package/dist/Component/usecase/themeToggle.d.ts +70 -0
  38. package/dist/Component/usecase/themeToggle.d.ts.map +1 -0
  39. package/dist/Component/usecase/toast.d.ts +32 -0
  40. package/dist/Component/usecase/toast.d.ts.map +1 -0
  41. package/dist/Component/usecase/typography.d.ts +33 -0
  42. package/dist/Component/usecase/typography.d.ts.map +1 -0
  43. package/dist/Declare/model/Action.d.ts +91 -0
  44. package/dist/Declare/model/Action.d.ts.map +1 -0
  45. package/dist/Declare/model/Adapter.d.ts +107 -0
  46. package/dist/Declare/model/Adapter.d.ts.map +1 -0
  47. package/dist/Declare/model/Collection.d.ts +55 -0
  48. package/dist/Declare/model/Collection.d.ts.map +1 -0
  49. package/dist/Declare/model/Declaration.d.ts +27 -0
  50. package/dist/Declare/model/Declaration.d.ts.map +1 -0
  51. package/dist/Declare/model/Menu.d.ts +21 -0
  52. package/dist/Declare/model/Menu.d.ts.map +1 -0
  53. package/dist/Declare/model/Query.d.ts +56 -0
  54. package/dist/Declare/model/Query.d.ts.map +1 -0
  55. package/dist/Declare/model/Row.d.ts +129 -0
  56. package/dist/Declare/model/Row.d.ts.map +1 -0
  57. package/dist/Declare/model/Source.d.ts +83 -0
  58. package/dist/Declare/model/Source.d.ts.map +1 -0
  59. package/dist/Declare/usecase/apply.d.ts +23 -0
  60. package/dist/Declare/usecase/apply.d.ts.map +1 -0
  61. package/dist/Declare/usecase/project.d.ts +66 -0
  62. package/dist/Declare/usecase/project.d.ts.map +1 -0
  63. package/dist/Declare/usecase/reconcile.d.ts +63 -0
  64. package/dist/Declare/usecase/reconcile.d.ts.map +1 -0
  65. package/dist/Flow/model/forms.d.ts +45 -0
  66. package/dist/Flow/model/forms.d.ts.map +1 -0
  67. package/dist/Flow/model/run.d.ts +74 -0
  68. package/dist/Flow/model/run.d.ts.map +1 -0
  69. package/dist/Flow/model/script.d.ts +279 -0
  70. package/dist/Flow/model/script.d.ts.map +1 -0
  71. package/dist/Flow/usecase/interpret.d.ts +17 -0
  72. package/dist/Flow/usecase/interpret.d.ts.map +1 -0
  73. package/dist/Flow/usecase/read.d.ts +46 -0
  74. package/dist/Flow/usecase/read.d.ts.map +1 -0
  75. package/dist/Form/index.d.ts +14 -0
  76. package/dist/Form/index.d.ts.map +1 -0
  77. package/dist/Form/model/control.d.ts +9 -0
  78. package/dist/Form/model/control.d.ts.map +1 -0
  79. package/dist/Form/model/submission.d.ts +30 -0
  80. package/dist/Form/model/submission.d.ts.map +1 -0
  81. package/dist/Form/usecase/controlParts.d.ts +30 -0
  82. package/dist/Form/usecase/controlParts.d.ts.map +1 -0
  83. package/dist/Form/usecase/formView.d.ts +21 -0
  84. package/dist/Form/usecase/formView.d.ts.map +1 -0
  85. package/dist/Form/usecase/parseForm.d.ts +28 -0
  86. package/dist/Form/usecase/parseForm.d.ts.map +1 -0
  87. package/dist/Layout/index.d.ts +16 -0
  88. package/dist/Layout/index.d.ts.map +1 -0
  89. package/dist/Layout/model/pane.d.ts +15 -0
  90. package/dist/Layout/model/pane.d.ts.map +1 -0
  91. package/dist/Layout/usecase/combinators.d.ts +49 -0
  92. package/dist/Layout/usecase/combinators.d.ts.map +1 -0
  93. package/dist/Meta/model/identity.d.ts +16 -0
  94. package/dist/Meta/model/identity.d.ts.map +1 -0
  95. package/dist/Render/index.d.ts +17 -0
  96. package/dist/Render/index.d.ts.map +1 -0
  97. package/dist/Render/model/mode.d.ts +13 -0
  98. package/dist/Render/model/mode.d.ts.map +1 -0
  99. package/dist/Render/model/screen.d.ts +27 -0
  100. package/dist/Render/model/screen.d.ts.map +1 -0
  101. package/dist/Render/usecase/multiColumn.d.ts +52 -0
  102. package/dist/Render/usecase/multiColumn.d.ts.map +1 -0
  103. package/dist/Render/usecase/parts.d.ts +56 -0
  104. package/dist/Render/usecase/parts.d.ts.map +1 -0
  105. package/dist/Render/usecase/renderMode.d.ts +17 -0
  106. package/dist/Render/usecase/renderMode.d.ts.map +1 -0
  107. package/dist/Render/usecase/singleColumn.d.ts +20 -0
  108. package/dist/Render/usecase/singleColumn.d.ts.map +1 -0
  109. package/dist/Schedule/model/Model.d.ts +103 -0
  110. package/dist/Schedule/model/Model.d.ts.map +1 -0
  111. package/dist/Schedule/model/Msg.d.ts +131 -0
  112. package/dist/Schedule/model/Msg.d.ts.map +1 -0
  113. package/dist/Schedule/model/Scene.d.ts +190 -0
  114. package/dist/Schedule/model/Scene.d.ts.map +1 -0
  115. package/dist/Schedule/model/View.d.ts +54 -0
  116. package/dist/Schedule/model/View.d.ts.map +1 -0
  117. package/dist/Schedule/usecase/chain.d.ts +16 -0
  118. package/dist/Schedule/usecase/chain.d.ts.map +1 -0
  119. package/dist/Schedule/usecase/codec.d.ts +44 -0
  120. package/dist/Schedule/usecase/codec.d.ts.map +1 -0
  121. package/dist/Schedule/usecase/lower.d.ts +45 -0
  122. package/dist/Schedule/usecase/lower.d.ts.map +1 -0
  123. package/dist/Schedule/usecase/scene.d.ts +16 -0
  124. package/dist/Schedule/usecase/scene.d.ts.map +1 -0
  125. package/dist/Schedule/usecase/schedule.d.ts +72 -0
  126. package/dist/Schedule/usecase/schedule.d.ts.map +1 -0
  127. package/dist/Schedule/usecase/update.d.ts +39 -0
  128. package/dist/Schedule/usecase/update.d.ts.map +1 -0
  129. package/dist/Style/index.d.ts +30 -0
  130. package/dist/Style/index.d.ts.map +1 -0
  131. package/dist/Style/model/appearance.d.ts +23 -0
  132. package/dist/Style/model/appearance.d.ts.map +1 -0
  133. package/dist/Style/model/breakpoint.d.ts +43 -0
  134. package/dist/Style/model/breakpoint.d.ts.map +1 -0
  135. package/dist/Style/model/hexColor.d.ts +24 -0
  136. package/dist/Style/model/hexColor.d.ts.map +1 -0
  137. package/dist/Style/model/metric.d.ts +35 -0
  138. package/dist/Style/model/metric.d.ts.map +1 -0
  139. package/dist/Style/model/palette.d.ts +38 -0
  140. package/dist/Style/model/palette.d.ts.map +1 -0
  141. package/dist/Style/model/scheme.d.ts +26 -0
  142. package/dist/Style/model/scheme.d.ts.map +1 -0
  143. package/dist/Style/model/syntax.d.ts +54 -0
  144. package/dist/Style/model/syntax.d.ts.map +1 -0
  145. package/dist/Style/model/theme.d.ts +58 -0
  146. package/dist/Style/model/theme.d.ts.map +1 -0
  147. package/dist/Style/model/token.d.ts +142 -0
  148. package/dist/Style/model/token.d.ts.map +1 -0
  149. package/dist/Style/model/typography.d.ts +83 -0
  150. package/dist/Style/model/typography.d.ts.map +1 -0
  151. package/dist/Style/model/zIndex.d.ts +25 -0
  152. package/dist/Style/model/zIndex.d.ts.map +1 -0
  153. package/dist/Style/usecase/appearanceScript.d.ts +43 -0
  154. package/dist/Style/usecase/appearanceScript.d.ts.map +1 -0
  155. package/dist/Style/usecase/chromeCss.d.ts +41 -0
  156. package/dist/Style/usecase/chromeCss.d.ts.map +1 -0
  157. package/dist/Style/usecase/contrast.d.ts +3 -0
  158. package/dist/Style/usecase/contrast.d.ts.map +1 -0
  159. package/dist/Style/usecase/metricCss.d.ts +17 -0
  160. package/dist/Style/usecase/metricCss.d.ts.map +1 -0
  161. package/dist/Style/usecase/reducedMotion.d.ts +20 -0
  162. package/dist/Style/usecase/reducedMotion.d.ts.map +1 -0
  163. package/dist/Style/usecase/schemeCss.d.ts +25 -0
  164. package/dist/Style/usecase/schemeCss.d.ts.map +1 -0
  165. package/dist/Style/usecase/syntaxCss.d.ts +14 -0
  166. package/dist/Style/usecase/syntaxCss.d.ts.map +1 -0
  167. package/dist/Style/usecase/utilities.d.ts +98 -0
  168. package/dist/Style/usecase/utilities.d.ts.map +1 -0
  169. package/dist/brand.d.ts +29 -0
  170. package/dist/brand.d.ts.map +1 -0
  171. package/dist/index.d.ts +53 -0
  172. package/dist/index.d.ts.map +1 -0
  173. package/dist/index.es.js +4427 -0
  174. package/dist/styleEntry.d.ts +29 -0
  175. package/dist/styleEntry.d.ts.map +1 -0
  176. package/dist/styleEntry.es.js +1036 -0
  177. package/package.json +4 -1
@@ -0,0 +1,28 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Option } from "plgg";
3
+ import { type Html } from "plgg-view";
4
+ /** One choice in a {@link selectInput}. */
5
+ export type SelectOption = Readonly<{
6
+ value: SoftStr;
7
+ label: SoftStr;
8
+ }>;
9
+ /**
10
+ * A CONTROLLED dropdown. The selected `value` comes from
11
+ * props (the matching `option` carries `selected`), it is
12
+ * labelled by id, and shows errors via `aria-invalid` +
13
+ * `aria-describedby`. `<select>` is deliberately outside
14
+ * the runtime's controlled-property sync (its selection
15
+ * is driven by the marked option), so this stays a pure
16
+ * view. `onChange` reports the newly-chosen value.
17
+ */
18
+ export type SelectProps<Msg> = Readonly<{
19
+ name: SoftStr;
20
+ label: SoftStr;
21
+ value: SoftStr;
22
+ options: ReadonlyArray<SelectOption>;
23
+ error: Option<SoftStr>;
24
+ disabled: boolean;
25
+ onChange: (value: SoftStr) => Msg;
26
+ }>;
27
+ export declare const selectInput: <Msg>(props: SelectProps<Msg>) => Html<Msg, "div">;
28
+ //# sourceMappingURL=selectInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectInput.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/selectInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EACL,KAAK,IAAI,EAUV,MAAM,WAAW,CAAC;AAUnB,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CAAC,GAAG,IAAI,QAAQ,CAAC;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CACnC,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,GAAG,EAC7B,OAAO,WAAW,CAAC,GAAG,CAAC,KACtB,IAAI,CAAC,GAAG,EAAE,KAAK,CA4Bf,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type SoftStr, type Option } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ /**
4
+ * A CONTROLLED multi-line text control — `textInput`'s
5
+ * sibling for prose drafts. Same recorded rules: value
6
+ * from props, labelled by id, `aria-invalid`/
7
+ * `aria-describedby` error wiring, disabled = native +
8
+ * `pm-disabled` + withheld hover. The value rides both
9
+ * the `value` attribute (the runtime's controlled sync)
10
+ * and the text child (SSR's initial render).
11
+ */
12
+ export type TextAreaProps<Msg> = Readonly<{
13
+ name: SoftStr;
14
+ label: SoftStr;
15
+ value: SoftStr;
16
+ placeholder: Option<SoftStr>;
17
+ error: Option<SoftStr>;
18
+ disabled: boolean;
19
+ onInput: (value: SoftStr) => Msg;
20
+ }>;
21
+ export declare const textArea: <Msg>(props: TextAreaProps<Msg>) => Html<Msg, "div">;
22
+ //# sourceMappingURL=textArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textArea.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/textArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EAWV,MAAM,WAAW,CAAC;AAanB;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,IAAI,QAAQ,CAAC;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAClC,CAAC,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,GAAG,EAC1B,OAAO,aAAa,CAAC,GAAG,CAAC,KACxB,IAAI,CAAC,GAAG,EAAE,KAAK,CAkCf,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type SoftStr, type Option } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ /**
4
+ * A CONTROLLED single-line text input. Its value comes
5
+ * from props (never internal state), it is associated
6
+ * with a real `<label>` by id, renders its error via
7
+ * `aria-invalid` + `aria-describedby`, and — the recorded
8
+ * interaction rule — a disabled input wears the native
9
+ * attribute AND more-than-colour (a `pm-disabled` class:
10
+ * dimmed + `not-allowed` cursor) AND withholds hover
11
+ * feedback. `focusRing` on focus.
12
+ */
13
+ export type TextInputProps<Msg> = Readonly<{
14
+ name: SoftStr;
15
+ label: SoftStr;
16
+ value: SoftStr;
17
+ placeholder: Option<SoftStr>;
18
+ error: Option<SoftStr>;
19
+ disabled: boolean;
20
+ onInput: (value: SoftStr) => Msg;
21
+ }>;
22
+ export declare const textInput: <Msg>(props: TextInputProps<Msg>) => Html<Msg, "div">;
23
+ //# sourceMappingURL=textInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/textInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,IAAI,EAWV,MAAM,WAAW,CAAC;AAanB;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,CAAC,GAAG,IAAI,QAAQ,CAAC;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAClC,CAAC,CAAC;AAEH,eAAO,MAAM,SAAS,GAAI,GAAG,EAC3B,OAAO,cAAc,CAAC,GAAG,CAAC,KACzB,IAAI,CAAC,GAAG,EAAE,KAAK,CAmCf,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ /**
4
+ * A text link's props. `external` marks a link that
5
+ * leaves the site, so it opens in a new tab AND is
6
+ * announced as such (no surprise navigation — a
7
+ * no-dark-patterns default).
8
+ */
9
+ export type TextLinkProps = Readonly<{
10
+ label: SoftStr;
11
+ to: SoftStr;
12
+ external: boolean;
13
+ }>;
14
+ /**
15
+ * The navigation component. **Recorded rule**:
16
+ * navigation is always a real `<a>` carrying an `href`
17
+ * (never a div-with-onclick), with a standing underline
18
+ * so a link is identifiable without relying on color
19
+ * alone; an `external` link opens in a new tab and
20
+ * announces it (`target=_blank` + `rel=noopener
21
+ * noreferrer` + a visible `↗` affordance and an extended
22
+ * accessible label), so the user is never surprised.
23
+ * Carries the shared focus ring and hover feedback.
24
+ */
25
+ export declare const textLink: (props: TextLinkProps) => Html<never, "a">;
26
+ //# sourceMappingURL=textLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textLink.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/textLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,WAAW,CAAC;AAWnB;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,aAAa,KACnB,IAAI,CAAC,KAAK,EAAE,GAAG,CA4Bf,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ import { type Scheme } from "../../Style";
4
+ /**
5
+ * A theme toggle's props. `scheme` is the CURRENTLY
6
+ * active scheme (so the button shows where a click will
7
+ * take you); `toggle` is the `Msg` a click produces.
8
+ */
9
+ export type ThemeToggleProps<Msg> = Readonly<{
10
+ scheme: Scheme;
11
+ toggle: Msg;
12
+ }>;
13
+ /**
14
+ * The appearance-switch component, exercising the token
15
+ * layer's scheme mechanism. **Recorded rule**: the
16
+ * framework ships the VIEW ONLY — the toggle renders the
17
+ * current scheme's icon (sun in light, moon in dark) and
18
+ * emits a `toggle` `Msg`; applying the `dark` class to
19
+ * `<html>` is the app's effect seam, wired through the
20
+ * framework-owned appearance contract —
21
+ * `applyScheme` / `appearanceStorageKey` (the preserved
22
+ * `vp-appearance` key) / `appearanceInitScript` in
23
+ * `Style/usecase/appearanceScript.ts` — so the component
24
+ * stays pure. The `aria-label` names the destination
25
+ * scheme, and the icon is a non-color cue (shape, not
26
+ * hue) for the current one. Carries the shared focus
27
+ * ring and hover feedback.
28
+ */
29
+ export declare const themeToggle: <Msg>(props: ThemeToggleProps<Msg>) => Html<Msg, "button">;
30
+ /**
31
+ * The stable class hook the SSG toggle carries. A
32
+ * static-site host binds every rendered toggle by this
33
+ * class from its no-runtime body script, and the
34
+ * icon-switch CSS in {@link themeToggleCss} targets it —
35
+ * so the literal is never re-typed at the consumer.
36
+ */
37
+ export declare const themeToggleClass: SoftStr;
38
+ /**
39
+ * The SSG-capable appearance toggle: a static
40
+ * `Html<never, "button">` that renders BOTH icons (the
41
+ * active one chosen by CSS on `html.dark`, NOT by a
42
+ * build-time scheme) and carries {@link themeToggleClass}
43
+ * so a host's no-runtime body script can wire the click.
44
+ *
45
+ * The runtime {@link themeToggle} is for TEA apps that
46
+ * re-render on a scheme `Msg`; a static-site host (no
47
+ * plgg-view runtime on the page, `renderToString` drops
48
+ * every handler) can neither dispatch a `Msg` nor know the
49
+ * visitor's scheme when the page is built, so it renders
50
+ * this instead and drives it through the framework-owned
51
+ * appearance contract (`appearanceStorageKey` /
52
+ * `applyScheme` / `appearanceInitScript`). Chrome and
53
+ * icon-switch live in {@link themeToggleCss}; escape-safe.
54
+ */
55
+ export declare const staticThemeToggle: Html<never, "button">;
56
+ /**
57
+ * The SSG toggle's chrome + icon-switch as one escape-safe
58
+ * CSS body (no `<`, `>`, `&`; descendant selectors only, no
59
+ * child combinators) so it survives a host's SSR text
60
+ * escaper byte-for-byte. Token-driven — a circular,
61
+ * bordered control on the neutral `surface`, the sun shown
62
+ * in light and the crescent under `html.dark` (a shape
63
+ * cue, not a hue), with the shared 2px focus ring and the
64
+ * `primary` hover edge matching the runtime
65
+ * {@link themeToggle}. A host composes it into its document
66
+ * `<style>` AFTER the scheme variables (it references
67
+ * `var(--pm-*)`) and ahead of the collected atomic rules.
68
+ */
69
+ export declare const themeToggleCss: SoftStr;
70
+ //# sourceMappingURL=themeToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeToggle.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/themeToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EAQV,MAAM,WAAW,CAAC;AAYnB,OAAO,EACL,KAAK,MAAM,EAMZ,MAAM,iBAAiB,CAAC;AAuCzB;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,GAAG,IAAI,QAAQ,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,EAC7B,OAAO,gBAAgB,CAAC,GAAG,CAAC,KAC3B,IAAI,CAAC,GAAG,EAAE,QAAQ,CA2BlB,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,OACZ,CAAC;AAyBpB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,IAAI,CAClC,KAAK,EACL,QAAQ,CAWT,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,OAoBV,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ /**
4
+ * A toast's tone — the semantic role set (D9). A closed
5
+ * union so a renderer/CSS map is exhaustive; each tone is
6
+ * styled through its role's `surface`/`text`/`border`
7
+ * variants (`--pm-<tone>-*`).
8
+ */
9
+ export type Tone = "success" | "danger" | "warning" | "info";
10
+ export declare const tones: ReadonlyArray<Tone>;
11
+ /**
12
+ * A single feedback toast. Announced via `role="status"`
13
+ * with `aria-live` — `danger` escalates to `assertive`
14
+ * (an error interrupts), the rest stay `polite`.
15
+ * Dismissible via an `aria-label`led close that dispatches
16
+ * `onDismiss`; the component owns NO timer — auto-dismiss
17
+ * is the consumer's `cmdEffect`.
18
+ */
19
+ export type ToastProps<Msg> = Readonly<{
20
+ id: SoftStr;
21
+ tone: Tone;
22
+ message: SoftStr;
23
+ onDismiss: Msg;
24
+ }>;
25
+ export declare const toast: <Msg>(props: ToastProps<Msg>) => Html<Msg, "div">;
26
+ /**
27
+ * The keyed toaster stack — a live region holding the
28
+ * current toasts (keyed by id so enter/exit motion plays
29
+ * on the right node under the reduced-motion block).
30
+ */
31
+ export declare const toaster: <Msg>(toasts: ReadonlyArray<ToastProps<Msg>>) => Html<Msg, "div">;
32
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EAQV,MAAM,WAAW,CAAC;AAKnB;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GACd,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,IAAI,CAKrC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,CAAC,GAAG,IAAI,QAAQ,CAAC;IACrC,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC,CAAC;AAEH,eAAO,MAAM,KAAK,GAAI,GAAG,EACvB,OAAO,UAAU,CAAC,GAAG,CAAC,KACrB,IAAI,CAAC,GAAG,EAAE,KAAK,CA8Bf,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,EACzB,QAAQ,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KACrC,IAAI,CAAC,GAAG,EAAE,KAAK,CAOf,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html, type Flow } from "plgg-view";
3
+ /**
4
+ * A heading level. A closed union so a level maps to a
5
+ * real `h1`–`h4` element (and its font token) — an
6
+ * invalid level cannot be requested.
7
+ */
8
+ export type HeadingLevel = 1 | 2 | 3 | 4;
9
+ /**
10
+ * The heading component. **Recorded rule**: the heading
11
+ * `level` is a semantic prop that maps 1:1 to a real
12
+ * `h1`–`h4` element, and its size / leading / weight are
13
+ * drawn from the prose {@link typeStyle} scale by that
14
+ * same level — so the document outline and the type scale
15
+ * never drift apart (no "looks like an h2 but is a div").
16
+ * The shipped scale is the guide's: level 1 renders
17
+ * `1.875rem` at weight 400, not the old generic
18
+ * `2xl`/`600`. Themed `text` ink.
19
+ */
20
+ export declare const heading: (level: HeadingLevel, content: SoftStr) => Html<never>;
21
+ /**
22
+ * The prose component. **Recorded rule**: prose is a
23
+ * typographic container that establishes the reading
24
+ * baseline once — themed body ink, the `body` type role
25
+ * (`1rem` at line-height `1.75`), and the capped readable
26
+ * `measure` (the `48rem` shell metric, via its custom
27
+ * property) — for arbitrary flow content; per-element
28
+ * prose rules (link underline weight, code badges, list
29
+ * rhythm) are added one at a time as real documents demand
30
+ * them, not pre-built here (emergent design system).
31
+ */
32
+ export declare const prose: <Msg>(body: ReadonlyArray<Flow<Msg>>) => Html<Msg, "div">;
33
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EASV,MAAM,WAAW,CAAC;AASnB;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAmCzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,GAClB,OAAO,YAAY,EACnB,SAAS,OAAO,KACf,IAAI,CAAC,KAAK,CASV,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,EACvB,MAAM,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAC7B,IAAI,CAAC,GAAG,EAAE,KAAK,CAUf,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { type SoftStr, type Box, type Icon, type Option } from "plgg";
2
+ import { type Cmd } from "plgg-view/client";
3
+ import { type SchedulerMsg } from "../../Schedule/model/Msg";
4
+ import { type Actor } from "./Adapter";
5
+ /**
6
+ * The mutation an {@link Action} performs, as a closed
7
+ * union so a renderer can style create/update/delete
8
+ * distinctly and the scheduler can reason about intent
9
+ * without a free string.
10
+ */
11
+ export type Verb = "create" | "update" | "delete";
12
+ /**
13
+ * Confirmation semantics as DATA — destructive intent is
14
+ * explicit, and confirm/cancel is scheduler state, not
15
+ * renderer folklore. `Immediate` runs the action at once;
16
+ * `Confirm` parks a pending-confirmation in the model
17
+ * (with the prompt and whether it is destructive) until a
18
+ * `ConfirmAction`/`CancelAction` message resolves it.
19
+ */
20
+ export type Confirm = Icon<"Immediate"> | Box<"Confirm", Readonly<{
21
+ prompt: SoftStr;
22
+ destructive: boolean;
23
+ }>>;
24
+ /** No confirmation — run the action immediately. */
25
+ export declare const immediate: () => Confirm;
26
+ /** Park a confirmation before running the action. */
27
+ export declare const confirm: (prompt: SoftStr, destructive?: boolean) => Confirm;
28
+ /** Matchers for folding a {@link Confirm}. */
29
+ export declare const immediate$: () => {
30
+ __tag: "Immediate";
31
+ type: "tag";
32
+ body: undefined;
33
+ };
34
+ export declare const confirm$: () => {
35
+ __tag: "Confirm";
36
+ type: "tag";
37
+ body: undefined;
38
+ };
39
+ /**
40
+ * An action's authorization policy: a total predicate over
41
+ * the host-supplied {@link Actor} and the subject (the
42
+ * target row id, `None` for a create). The ENGINE evaluates
43
+ * it BEFORE dispatching — an unauthorized action never runs
44
+ * and the Scene hides its button (point-7 authorization).
45
+ * A pure decision as data; the adapter MAY re-enforce at
46
+ * the data layer (defense in depth, not required).
47
+ */
48
+ export type Authorize = (actor: Actor, subject: Option<SoftStr>) => boolean;
49
+ /**
50
+ * A create/update/delete verb on a collection, mapped to
51
+ * a `Cmd` factory. `run` receives the acting row's id
52
+ * (`None` for a create, which has no target yet) and
53
+ * returns a `Cmd` — pure data the plgg-view runtime
54
+ * executes; the scheduler only returns it, never runs it.
55
+ * Fold the mutation's `Result` to a `Loaded`/`Failed`
56
+ * message inside the `cmdEffect` thunk so the effect
57
+ * always resolves to a message. `authorize` is the optional
58
+ * legality gate (`None` = always permitted): the engine
59
+ * checks it against the actor before dispatching `run`.
60
+ */
61
+ export type Action = Readonly<{
62
+ id: SoftStr;
63
+ label: SoftStr;
64
+ verb: Verb;
65
+ confirm: Confirm;
66
+ run: (target: Option<SoftStr>) => Cmd<SchedulerMsg>;
67
+ authorize: Option<Authorize>;
68
+ }>;
69
+ /** Constructs an {@link Action}. */
70
+ export declare const action: (a: {
71
+ id: SoftStr;
72
+ label: SoftStr;
73
+ verb: Verb;
74
+ confirm: Confirm;
75
+ run: (target: Option<SoftStr>) => Cmd<SchedulerMsg>;
76
+ authorize?: Authorize;
77
+ }) => Action;
78
+ /**
79
+ * Whether the actor may run `action` on `subject` — the
80
+ * engine's legality gate, total. An action with no declared
81
+ * `authorize` is always permitted (absence of a policy is
82
+ * not a denial in v1; deny-by-default arrives with the
83
+ * manifest's static authorize checks). A declared policy
84
+ * REQUIRES an actor: a policy with no supplied actor
85
+ * (`None`) is denied — the engine cannot prove
86
+ * authorization without one.
87
+ */
88
+ export declare const permits: (action: Action, actor: Option<Actor>, subject: Option<SoftStr>) => boolean;
89
+ /** Whether an action's confirmation is destructive. */
90
+ export declare const isDestructive: (c: Confirm) => boolean;
91
+ //# sourceMappingURL=Action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/Declare/model/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,MAAM,EAOZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GACf,IAAI,CAAC,WAAW,CAAC,GACjB,GAAG,CACD,SAAS,EACT,QAAQ,CAAC;IACP,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC,CACH,CAAC;AAEN,oDAAoD;AACpD,eAAO,MAAM,SAAS,QAAO,OACV,CAAC;AAEpB,qDAAqD;AACrD,eAAO,MAAM,OAAO,GAClB,QAAQ,OAAO,EACf,cAAa,OAAe,KAC3B,OACsC,CAAC;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,UAAU;;;;CACC,CAAC;AACzB,eAAO,MAAM,QAAQ;;;;CACC,CAAC;AAEvB;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,CACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KACrB,OAAO,CAAC;AAEb;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,CACH,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,KACpB,GAAG,CAAC,YAAY,CAAC,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,oCAAoC;AACpC,eAAO,MAAM,MAAM,GAAI,GAAG;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,CACH,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,KACpB,GAAG,CAAC,YAAY,CAAC,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,KAAG,MAOF,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAClB,QAAQ,MAAM,EACd,OAAO,MAAM,CAAC,KAAK,CAAC,EACpB,SAAS,MAAM,CAAC,OAAO,CAAC,KACvB,OAQkB,CAAC;AAEtB,uDAAuD;AACvD,eAAO,MAAM,aAAa,GACxB,GAAG,OAAO,KACT,OAQA,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { type SoftStr, type Option, type Result } from "plgg";
2
+ import { type Row } from "./Row";
3
+ import { type Path } from "./Source";
4
+ import { type Verb } from "./Action";
5
+ /**
6
+ * The host-supplied ACTOR, passed as DATA at program start
7
+ * (never named in the declaration): an identity and its
8
+ * roles. The engine evaluates an action's declared
9
+ * `authorize` over (actor, subject) BEFORE dispatching, so
10
+ * an unauthorized action never reaches the adapter (the
11
+ * point-7 authorization decision, 2026-07-13).
12
+ */
13
+ export type Actor = Readonly<{
14
+ id: SoftStr;
15
+ roles: ReadonlyArray<SoftStr>;
16
+ }>;
17
+ /** Constructs an {@link Actor} (roles default empty). */
18
+ export declare const actor: (id: SoftStr, roles?: ReadonlyArray<SoftStr>) => Actor;
19
+ /**
20
+ * A query-scoped READ descriptor: the collection and the
21
+ * ancestor `path` a child reads against (the same Path the
22
+ * legacy Source reads). The Sync/Async split does not
23
+ * appear here — the adapter read is uniformly deferred (a
24
+ * `Promise<Result>`), the concrete backend's concern.
25
+ */
26
+ export type Scope = Readonly<{
27
+ collection: SoftStr;
28
+ path: Path;
29
+ }>;
30
+ /** Constructs a {@link Scope}. */
31
+ export declare const scope: (collection: SoftStr, path: Path) => Scope;
32
+ /**
33
+ * A checked mutation the host APPLIES: the collection, the
34
+ * create/update/delete verb, the target row (`None` for a
35
+ * create), and the projected field payload (key→value).
36
+ * Constructing an effect here is the apply HAND-OFF; the
37
+ * checked-effect construction from a compiled manifest
38
+ * belongs to the manifest lowering (out of scope for this
39
+ * layer).
40
+ */
41
+ export type Effect = Readonly<{
42
+ collection: SoftStr;
43
+ verb: Verb;
44
+ target: Option<SoftStr>;
45
+ payload: ReadonlyArray<readonly [SoftStr, SoftStr]>;
46
+ }>;
47
+ /** Constructs an {@link Effect} (payload defaults empty). */
48
+ export declare const effect: (e: {
49
+ collection: SoftStr;
50
+ verb: Verb;
51
+ target: Option<SoftStr>;
52
+ payload?: ReadonlyArray<readonly [SoftStr, SoftStr]>;
53
+ }) => Effect;
54
+ /**
55
+ * The successful outcome of `apply`: the collection whose
56
+ * rows changed and its refreshed rows, so the scheduler
57
+ * folds Ok → a `Loaded` message on the action-result path,
58
+ * mirroring a read.
59
+ */
60
+ export type ApplyOk = Readonly<{
61
+ collection: SoftStr;
62
+ rows: ReadonlyArray<Row>;
63
+ }>;
64
+ /**
65
+ * The ONE host capability (point 7): `read` — a
66
+ * query-scoped, deferred read whose `Err` lands in the
67
+ * collection's Failed slot (today's async path) — and
68
+ * `apply` — a checked effect against an actor, its `Err`
69
+ * surfacing on the action-result path. Nothing throws;
70
+ * timeouts are the adapter's own concern. `toRow` is NOT
71
+ * here: it left the capability surface for keyword
72
+ * projection (see `Declare/usecase/project`).
73
+ */
74
+ export type HostAdapter = Readonly<{
75
+ read: (scope: Scope) => Promise<Result<ReadonlyArray<Row>, Error>>;
76
+ apply: (effect: Effect, actor: Actor) => Promise<Result<ApplyOk, Error>>;
77
+ }>;
78
+ /** Constructs a {@link HostAdapter}. */
79
+ export declare const hostAdapter: (a: {
80
+ read: (scope: Scope) => Promise<Result<ReadonlyArray<Row>, Error>>;
81
+ apply: (effect: Effect, actor: Actor) => Promise<Result<ApplyOk, Error>>;
82
+ }) => HostAdapter;
83
+ /**
84
+ * A host adapter registered under a NAME. One registration
85
+ * becomes the DEFAULT (declarations name no adapter);
86
+ * several require the non-default collections to name
87
+ * theirs (the point-7 naming decision).
88
+ */
89
+ export type NamedAdapter = Readonly<{
90
+ name: SoftStr;
91
+ adapter: HostAdapter;
92
+ }>;
93
+ /** The host's registered adapters (empty when none). */
94
+ export type Registry = ReadonlyArray<NamedAdapter>;
95
+ /** Registers an adapter under a name. */
96
+ export declare const named: (name: SoftStr, adapter: HostAdapter) => NamedAdapter;
97
+ /**
98
+ * Resolves the adapter a source reads through. A named
99
+ * source names it; an unnamed source (`None`) resolves to
100
+ * the DEFAULT — the sole registration. Total: `None` when
101
+ * the name is unknown, or when an unnamed source meets a
102
+ * registry that is not exactly one (0 or ≥2) — the
103
+ * reconciliation pass reports which; this lookup never
104
+ * throws.
105
+ */
106
+ export declare const resolveAdapter: (registry: Registry, name: Option<SoftStr>) => Option<HostAdapter>;
107
+ //# sourceMappingURL=Adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Adapter.d.ts","sourceRoot":"","sources":["../../../src/Declare/model/Adapter.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,55 @@
1
+ import { type SoftStr, type Option } from "plgg";
2
+ import { type Row } from "./Row";
3
+ import { type Source, type TypedSource } from "./Source";
4
+ import { type Query } from "./Query";
5
+ import { type Action } from "./Action";
6
+ /**
7
+ * A typed data resource in the declaration: an identity,
8
+ * a title, a `Source`, and its place in the flow graph —
9
+ * an optional `child` collection a row drills into, an
10
+ * optional `Query` filter, and the create/update/delete
11
+ * `Action`s available on it. The `Source` here is the
12
+ * ERASED (`Row`-valued) source; a typed `T` never leaks
13
+ * past {@link collection}'s `toRow`. `board` opts the
14
+ * collection into board (tile) presentation: its rows
15
+ * project as tiles whose only interaction is a jump —
16
+ * they neither drill nor show a detail (the point-5
17
+ * decision, 2026-07-12).
18
+ */
19
+ export type Collection = Readonly<{
20
+ id: SoftStr;
21
+ title: SoftStr;
22
+ source: Source;
23
+ child: Option<SoftStr>;
24
+ query: Option<Query>;
25
+ actions: ReadonlyArray<Action>;
26
+ board: boolean;
27
+ }>;
28
+ /**
29
+ * Declares a {@link Collection}. The ONLY place a typed
30
+ * item `T` appears: `toRow` captures the list/detail
31
+ * projection and erases the source to `Row`. `child`,
32
+ * `query`, `actions`, and `board` are optional (absence
33
+ * is `None` / `[]` / `false`, not `undefined` past this
34
+ * boundary) — every existing declaration is untouched.
35
+ */
36
+ export declare const collection: <T>(c: {
37
+ id: SoftStr;
38
+ title: SoftStr;
39
+ toRow: (item: T) => Row;
40
+ source: TypedSource<T>;
41
+ child?: SoftStr;
42
+ query?: Query;
43
+ actions?: ReadonlyArray<Action>;
44
+ board?: boolean;
45
+ }) => Collection;
46
+ /**
47
+ * Finds a collection by id in a declaration's list.
48
+ * Total: an unknown id yields `None`, never throws — the
49
+ * scheduler treats a dangling child/menu reference as an
50
+ * empty level rather than a crash.
51
+ */
52
+ export declare const collectionById: (collections: ReadonlyArray<Collection>, id: SoftStr) => Option<Collection>;
53
+ /** The action of a collection by id. */
54
+ export declare const actionById: (c: Collection, id: SoftStr) => Option<Action>;
55
+ //# sourceMappingURL=Collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../../../src/Declare/model/Collection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAOZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,WAAW,EAKjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAkDH;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,GAAG;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC;IACxB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,KAAG,UAcF,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,aAAa,CAAC,UAAU,CAAC,EACtC,IAAI,OAAO,KACV,MAAM,CAAC,UAAU,CAGjB,CAAC;AAEJ,wCAAwC;AACxC,eAAO,MAAM,UAAU,GACrB,GAAG,UAAU,EACb,IAAI,OAAO,KACV,MAAM,CAAC,MAAM,CAGb,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Menu } from "./Menu";
3
+ import { type Collection } from "./Collection";
4
+ /**
5
+ * The root of a plggmatic declaration — everything
6
+ * `schedule(...)` needs to derive a TEA program: a title,
7
+ * the root {@link Menu}, and the {@link Collection}s
8
+ * keyed by id. The flow graph is implicit: the menu names
9
+ * the roots, and each collection's `child` names the next
10
+ * level, so no separate flow type is needed. MODE-
11
+ * AGNOSTIC (D10): nothing here names a column, pane,
12
+ * drawer, or screen — renderers project the derived level
13
+ * stack into a display.
14
+ */
15
+ export type Declaration = Readonly<{
16
+ title: SoftStr;
17
+ menu: Menu;
18
+ collections: ReadonlyArray<Collection>;
19
+ }>;
20
+ /**
21
+ * Constructs a {@link Declaration}. An identity function
22
+ * with a name — it performs nothing (constructing a
23
+ * declaration reads no data and runs no effect); it is
24
+ * the vocabulary's entry point the scheduler consumes.
25
+ */
26
+ export declare const declare: (d: Declaration) => Declaration;
27
+ //# sourceMappingURL=Declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/Declare/model/Declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACxC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAClB,GAAG,WAAW,KACb,WAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type SoftStr } from "plgg";
2
+ /**
3
+ * One labelled entry of the root {@link Menu}: a label
4
+ * and the id of the collection it opens (the root of a
5
+ * flow). A menu is navigation INTO the flow, so an entry
6
+ * references a collection by id, not a view — the
7
+ * scheduler resolves the collection.
8
+ */
9
+ export type MenuEntry = Readonly<{
10
+ label: SoftStr;
11
+ collection: SoftStr;
12
+ }>;
13
+ /** The root navigation entries of a declaration. */
14
+ export type Menu = Readonly<{
15
+ entries: ReadonlyArray<MenuEntry>;
16
+ }>;
17
+ /** Constructs a {@link MenuEntry}. */
18
+ export declare const menuEntry: (label: SoftStr, collection: SoftStr) => MenuEntry;
19
+ /** Constructs a {@link Menu}. */
20
+ export declare const menu: (entries: ReadonlyArray<MenuEntry>) => Menu;
21
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/Declare/model/Menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,oDAAoD;AACpD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC,CAAC;AAEH,sCAAsC;AACtC,eAAO,MAAM,SAAS,GACpB,OAAO,OAAO,EACd,YAAY,OAAO,KAClB,SAAoC,CAAC;AAExC,iCAAiC;AACjC,eAAO,MAAM,IAAI,GACf,SAAS,aAAa,CAAC,SAAS,CAAC,KAChC,IAAqB,CAAC"}