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":"confirmDialog.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/confirmDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,KAAK,IAAI,EAUV,MAAM,WAAW,CAAC;AAanB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,CAAC,GAAG,IAAI,QAAQ,CAAC;IAC7C,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC,CAAC;AAIH,eAAO,MAAM,aAAa,GAAI,GAAG,SACxB,kBAAkB,CAAC,GAAG,CAAC,KAC7B,IAAI,CAAC,GAAG,EAAE,KAAK,CAqDf,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { type SoftStr, type Option } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ import { type ControlKind } from "../../Form/model/control";
4
+ import { type FieldSpec } from "../../Form/usecase/parseForm";
5
+ import { type SelectOption } from "./selectInput";
6
+ /**
7
+ * One arm of the {@link Control} union: a variant tagged by
8
+ * a {@link ControlKind} member (`K extends ControlKind`, so
9
+ * a kind that is not in the closed union is a compile
10
+ * error) carrying that kind's render data.
11
+ */
12
+ type ControlOf<K extends ControlKind, Data> = Readonly<{
13
+ kind: K;
14
+ } & Data>;
15
+ /**
16
+ * The RENDER half of a declared field, discriminated by
17
+ * {@link ControlKind} — the per-kind data and the
18
+ * consumer's message builders. A closed union so
19
+ * {@link fieldControl}'s `switch` is exhaustive: a new
20
+ * control kind cannot be added to the surface without a
21
+ * render arm for it. This is what makes `ControlKind`
22
+ * load-bearing — the declaration says *which* control, and
23
+ * the framework picks the component, instead of the caller
24
+ * hand-listing `textInput`/`textArea`.
25
+ */
26
+ export type Control<Msg> = ControlOf<"text", {
27
+ placeholder: Option<SoftStr>;
28
+ onInput: (value: SoftStr) => Msg;
29
+ }> | ControlOf<"textarea", {
30
+ placeholder: Option<SoftStr>;
31
+ onInput: (value: SoftStr) => Msg;
32
+ }> | ControlOf<"select", {
33
+ options: ReadonlyArray<SelectOption>;
34
+ onChange: (value: SoftStr) => Msg;
35
+ }> | ControlOf<"checkbox", {
36
+ onToggle: Msg;
37
+ }>;
38
+ /**
39
+ * A fully declared form field: the parse contract
40
+ * ({@link FieldSpec}'s `name` + `cast`) plus its label and
41
+ * render {@link Control}. ONE declaration drives BOTH
42
+ * validation (`parseForm` reads `name`/`cast`) and
43
+ * rendering ({@link fieldControl} reads `label`/`control`)
44
+ * — the example declares *what the form is*, the framework
45
+ * parses and renders it.
46
+ */
47
+ export type FormField<Msg> = FieldSpec & Readonly<{
48
+ label: SoftStr;
49
+ control: Control<Msg>;
50
+ }>;
51
+ /**
52
+ * The per-render runtime state of a field — its current
53
+ * draft `value`, its parse `error` (if any), and whether
54
+ * it is `disabled` (the form is submitting). The static
55
+ * {@link FormField} declaration carries no state; this is
56
+ * threaded in each frame.
57
+ */
58
+ export type FieldState = Readonly<{
59
+ value: SoftStr;
60
+ error: Option<SoftStr>;
61
+ disabled: boolean;
62
+ }>;
63
+ /**
64
+ * Renders one declared field to its control component by an
65
+ * exhaustive `switch` over the {@link Control} kind (a
66
+ * closed union, no `default`, so a new kind is a compile
67
+ * error until it has an arm). A `checkbox` reads its
68
+ * checked-ness from a non-empty draft, mirroring how HTML
69
+ * serialises a checked box.
70
+ */
71
+ export declare const fieldControl: <Msg>(field: FormField<Msg>, state: FieldState) => Html<Msg, "div">;
72
+ /**
73
+ * A form driven entirely by its declared {@link FormField}
74
+ * set: each field is rendered through {@link fieldControl}
75
+ * (its runtime state resolved by `stateOf`) and the whole
76
+ * is assembled by {@link formView}. The consumer's `update`
77
+ * still owns parsing (the SAME field list feeds `parseForm`)
78
+ * and the submit `Cmd`; this component owns no state.
79
+ */
80
+ export type DeclaredFormProps<Msg> = Readonly<{
81
+ fields: ReadonlyArray<FormField<Msg>>;
82
+ stateOf: (name: SoftStr) => FieldState;
83
+ submitLabel: SoftStr;
84
+ submitting: boolean;
85
+ onSubmit: Msg;
86
+ }>;
87
+ export declare const declaredForm: <Msg>(props: DeclaredFormProps<Msg>) => Html<Msg, "form">;
88
+ export {};
89
+ //# sourceMappingURL=declaredForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declaredForm.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/declaredForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,yCAAyC,CAAC;AAGjD;;;;;GAKG;AACH,KAAK,SAAS,CACZ,CAAC,SAAS,WAAW,EACrB,IAAI,IACF,QAAQ,CAAC;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,CAAC,GAAG,IACnB,SAAS,CACP,MAAM,EACN;IACE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAClC,CACF,GACD,SAAS,CACP,UAAU,EACV;IACE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAClC,CACF,GACD,SAAS,CACP,QAAQ,EACR;IACE,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CACnC,CACF,GACD,SAAS,CAAC,UAAU,EAAE;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,CAAC,GAAG,IAAI,SAAS,GACpC,QAAQ,CAAC;IACP,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;CACvB,CAAC,CAAC;AAEL;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,SACvB,SAAS,CAAC,GAAG,CAAC,SACd,UAAU,KAChB,IAAI,CAAC,GAAG,EAAE,KAAK,CA0CjB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,CAAC,GAAG,IAAI,QAAQ,CAAC;IAC5C,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,UAAU,CAAC;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,GAAG,SACvB,iBAAiB,CAAC,GAAG,CAAC,KAC5B,IAAI,CAAC,GAAG,EAAE,MAAM,CAYf,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ import { type NavItem } from "../model/navItem";
4
+ /**
5
+ * The navigation-tree component: a recursive,
6
+ * config-driven tree (the docs-site sidebar). **Recorded
7
+ * rule**: navTree emits LIST markup only — a `<ul>` of
8
+ * `<li>`, nested for children — and does NOT wrap itself
9
+ * in a `<nav>` landmark; the landmark is owned by the
10
+ * Layout `navigation` pane it sits inside, so the two
11
+ * never produce nested/duplicate nav landmarks (the
12
+ * higher-level pane policy wins, per this ticket's
13
+ * coordination note). The leaf whose `href` equals
14
+ * `activePath` is marked `aria-current="page"` at build
15
+ * time; a header node (`href` `None`) renders plain
16
+ * text. Zero client JavaScript — the whole tree is
17
+ * static SSR. Links carry the shared focus ring and
18
+ * hover feedback.
19
+ */
20
+ export declare const navTree: (items: ReadonlyArray<NavItem>, activePath: SoftStr) => Html<never, "ul">;
21
+ //# sourceMappingURL=navTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navTree.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/navTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,MAAM,CAAC;AACjD,OAAO,EACL,KAAK,IAAI,EASV,MAAM,WAAW,CAAC;AAYnB,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,UACX,aAAa,CAAC,OAAO,CAAC,cACjB,OAAO,KAClB,IAAI,CAAC,KAAK,EAAE,IAAI,CA4ClB,CAAC"}
@@ -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;AAanB,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,SACtB,WAAW,CAAC,GAAG,CAAC,KACtB,IAAI,CAAC,GAAG,EAAE,KAAK,CA4Bf,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Html } from "plgg-view";
3
+ import { type Theme } from "../../Style";
4
+ import { type NavItem } from "../model/navItem";
5
+ /**
6
+ * A titled bucket of {@link NavItem}s: one section of a
7
+ * {@link sidebarNav}.
8
+ */
9
+ export type NavGroup = Readonly<{
10
+ label: SoftStr;
11
+ items: ReadonlyArray<NavItem>;
12
+ }>;
13
+ /**
14
+ * The class vocabulary of {@link sidebarNav}, exported so a
15
+ * host that draws a look-alike row outside the tree (a
16
+ * section index, a touch-target override) names the same
17
+ * classes instead of re-typing them.
18
+ */
19
+ export declare const sidebarNavClass: {
20
+ nav: string;
21
+ numbered: string;
22
+ group: string;
23
+ groupTitle: string;
24
+ link: string;
25
+ flat: string;
26
+ subgroup: string;
27
+ subgroupTitle: string;
28
+ };
29
+ /**
30
+ * What a {@link sidebarNav} is drawn from. `resolve` turns
31
+ * an item's `href` into the address written on the link
32
+ * (a host's base-path resolver); `current` says whether an
33
+ * `href` is the page being shown. Both are the host's, so
34
+ * the component holds no routing rule of its own.
35
+ */
36
+ export type SidebarNavProps = Readonly<{
37
+ groups: ReadonlyArray<NavGroup>;
38
+ resolve: (href: SoftStr) => SoftStr;
39
+ current: (href: SoftStr) => boolean;
40
+ /** Each group is a disclosure, open where the current page lives. */
41
+ toggle: boolean;
42
+ /** Rows are counted 01, 02, … (per group when `toggle`). */
43
+ numbered: boolean;
44
+ label: SoftStr;
45
+ }>;
46
+ /**
47
+ * The sidebar: full-width ruled rows in titled groups, the
48
+ * current row inverted. **Recorded rule**: the tree is
49
+ * flush left — hierarchy reads from weight and spacing,
50
+ * never indentation — and a group is either always open
51
+ * (a plain header) or, with `toggle`, a named disclosure
52
+ * that opens with the group holding the current page and
53
+ * closes its siblings; there is no third state kept in
54
+ * script. Zero client JavaScript. Returns the `<nav>`
55
+ * landmark itself, unlike {@link navTree}, because a
56
+ * sidebar is the whole landmark, not a list placed inside
57
+ * a pane that owns one.
58
+ */
59
+ export declare const sidebarNav: (props: SidebarNavProps) => Html<never, "nav">;
60
+ /**
61
+ * The sidebar's stylesheet. Escape-safe — no raw `<`, `>`
62
+ * or `&` (descendant selectors only, no child combinator,
63
+ * no nesting) — so a host may inline it through an SSR
64
+ * text escaper byte-for-byte. Colors resolve through the
65
+ * theme's custom properties, so the rows rescheme with the
66
+ * rest of the tree.
67
+ */
68
+ export declare const sidebarNavCss: (theme: Theme) => SoftStr;
69
+ /**
70
+ * A statement (no `<script>` wrapper) that brings the
71
+ * current row into view when the page opened with it below
72
+ * the fold of its scrolling column. The one piece of script
73
+ * a sidebar wants, and optional: without it the row is
74
+ * still marked, only possibly off screen.
75
+ */
76
+ export declare const sidebarNavRevealScript: SoftStr;
77
+ //# sourceMappingURL=sidebarNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebarNav.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/sidebarNav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,MAAM,CAAC;AACjD,OAAO,EACL,KAAK,IAAI,EAYV,MAAM,WAAW,CAAC;AAKnB,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAYjE;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CAC/B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;CASO,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACpC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACpC,qEAAqE;IACrE,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,UACd,eAAe,KACrB,IAAI,CAAC,KAAK,EAAE,KAAK,CAoGnB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,UACjB,KAAK,KACX,OA2GF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,OAWpB,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;AAiBnB;;;;;;;;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,SACnB,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;AAiBnB;;;;;;;;;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,SACpB,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,UACZ,aAAa,KACnB,IAAI,CAAC,KAAK,EAAE,GAAG,CA4Bf,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { themeToggleClass, sunClass, moonClass } from "../../Meta/model/classHooks";
3
+ import { type Html } from "plgg-view";
4
+ import { type Scheme } from "../../Style";
5
+ /**
6
+ * A theme toggle's props. `scheme` is the CURRENTLY
7
+ * active scheme (so the button shows where a click will
8
+ * take you); `toggle` is the `Msg` a click produces.
9
+ */
10
+ export type ThemeToggleProps<Msg> = Readonly<{
11
+ scheme: Scheme;
12
+ toggle: Msg;
13
+ }>;
14
+ /**
15
+ * The appearance-switch component, exercising the token
16
+ * layer's scheme mechanism. **Recorded rule**: the
17
+ * framework ships the VIEW ONLY — the toggle renders the
18
+ * current scheme's icon (sun in light, moon in dark) and
19
+ * emits a `toggle` `Msg`; applying the `dark` class to
20
+ * `<html>` is the app's effect seam, wired through the
21
+ * framework-owned appearance contract —
22
+ * `applyScheme` / `appearanceStorageKey` (the preserved
23
+ * `vp-appearance` key) / `appearanceInitScript` in
24
+ * `Style/usecase/appearanceScript.ts` — so the component
25
+ * stays pure. The `aria-label` names the destination
26
+ * scheme, and the icon is a non-color cue (shape, not
27
+ * hue) for the current one. Carries the shared focus
28
+ * ring and hover feedback.
29
+ */
30
+ export declare const themeToggle: <Msg>(props: ThemeToggleProps<Msg>) => Html<Msg, "button">;
31
+ /**
32
+ * The stable class hook the SSG toggle carries. A
33
+ * static-site host binds every rendered toggle by this
34
+ * class from its no-runtime body script, and the
35
+ * icon-switch CSS in {@link themeToggleCss} targets it —
36
+ * so the literal is never re-typed at the consumer.
37
+ */
38
+ export { themeToggleClass };
39
+ /** The two icon hooks the toggle emits, exported for
40
+ * the same reason the layout hooks are: a consumer names
41
+ * them by import or not at all. */
42
+ export { sunClass, moonClass };
43
+ /**
44
+ * The SSG-capable appearance toggle: a static
45
+ * `Html<never, "button">` that renders BOTH icons (the
46
+ * active one chosen by CSS on `html.dark`, NOT by a
47
+ * build-time scheme) and carries {@link themeToggleClass}
48
+ * so a host's no-runtime body script can wire the click.
49
+ *
50
+ * The runtime {@link themeToggle} is for TEA apps that
51
+ * re-render on a scheme `Msg`; a static-site host (no
52
+ * plgg-view runtime on the page, `renderToString` drops
53
+ * every handler) can neither dispatch a `Msg` nor know the
54
+ * visitor's scheme when the page is built, so it renders
55
+ * this instead and drives it through the framework-owned
56
+ * appearance contract (`appearanceStorageKey` /
57
+ * `applyScheme` / `appearanceInitScript`). Chrome and
58
+ * icon-switch live in {@link themeToggleCss}; escape-safe.
59
+ */
60
+ export declare const staticThemeToggle: Html<never, "button">;
61
+ /**
62
+ * The SSG toggle's chrome + icon-switch as one escape-safe
63
+ * CSS body (no `<`, `>`, `&`; descendant selectors only, no
64
+ * child combinators) so it survives a host's SSR text
65
+ * escaper byte-for-byte. Token-driven — a circular,
66
+ * bordered control on the neutral `surface`, the sun shown
67
+ * in light and the crescent under `html.dark` (a shape
68
+ * cue, not a hue), with the shared 2px focus ring and the
69
+ * `primary` hover edge matching the runtime
70
+ * {@link themeToggle}. A host composes it into its document
71
+ * `<style>` AFTER the scheme variables (it references
72
+ * `var(--pm-*)`) and ahead of the collected atomic rules.
73
+ */
74
+ export declare const themeToggleCss: SoftStr;
75
+ //# 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,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACV,MAAM,iCAAiC,CAAC;AACzC,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,SACtB,gBAAgB,CAAC,GAAG,CAAC,KAC3B,IAAI,CAAC,GAAG,EAAE,QAAQ,CA2BlB,CAAC;AAEJ;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAK5B;;mCAEmC;AACnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAqB/B;;;;;;;;;;;;;;;;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;AAUnB;;;;;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,SAChB,UAAU,CAAC,GAAG,CAAC,KACrB,IAAI,CAAC,GAAG,EAAE,KAAK,CA2Bf,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,UACjB,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,UACX,YAAY,WACV,OAAO,KACf,IAAI,CAAC,KAAK,CASV,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,QACjB,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,WACV,OAAO,gBACF,OAAO,KACnB,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,MAAO;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,WACV,MAAM,SACP,MAAM,CAAC,KAAK,CAAC,WACX,MAAM,CAAC,OAAO,CAAC,KACvB,OAQkB,CAAC;AAEtB,uDAAuD;AACvD,eAAO,MAAM,aAAa,MACrB,OAAO,KACT,OAQA,CAAC"}