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,24 @@
1
+ import { type Result, type InvalidError, type Box } from "plgg";
2
+ /**
3
+ * A validated `#rrggbb` color literal — the only value the
4
+ * scheme emitter accepts, so a palette can never carry a
5
+ * malformed hex. Minted ONLY through {@link asHexColor}
6
+ * (the `Box` brand keeps the constructor private), so an
7
+ * arbitrary string cannot masquerade as a color. Follows
8
+ * the `plgg/Basics/Str` brand+caster pattern.
9
+ */
10
+ export type HexColor = Box<"HexColor", string>;
11
+ export declare const isHexColor: (value: unknown) => value is HexColor;
12
+ /**
13
+ * Cast an unknown value to a {@link HexColor}. Accepts a
14
+ * case-insensitive `#rrggbb` string (normalized to
15
+ * lowercase); anything else is an `Err` naming the
16
+ * offending value.
17
+ */
18
+ export declare const asHexColor: (value: unknown) => Result<HexColor, InvalidError>;
19
+ /**
20
+ * The raw `#rrggbb` string of a {@link HexColor}, for the
21
+ * emitter and the contrast math.
22
+ */
23
+ export declare const hex: (c: HexColor) => string;
24
+ //# sourceMappingURL=hexColor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hexColor.d.ts","sourceRoot":"","sources":["../../../src/Style/model/hexColor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,GAAG,EAOT,MAAM,MAAM,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAiB/C,eAAO,MAAM,UAAU,UALJ,OAAO,KAAG,KAAK,IAAI,QAKV,CAAC;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,OAAO,KACb,MAAM,CAAC,QAAQ,EAAE,YAAY,CAY/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,GAAG,QAAQ,KAAG,MACvB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Theme } from "./theme";
3
+ /**
4
+ * The shell-geometry metrics — the fixed dimensions of
5
+ * the app shell, lifted value-for-value from the qmu
6
+ * oracle (`--vp-shell-max` / `--vp-sidebar-w` /
7
+ * `--vp-rail-w` and the `.vp-doc` prose measure). A
8
+ * closed union so a missing dimension is a `tsc` error.
9
+ *
10
+ * Unlike {@link Breakpoint}s these ARE emitted as `--pm-*`
11
+ * custom properties: they are `var()`-consumable (used in
12
+ * ordinary declarations, never inside `@media`), so the
13
+ * shell CSS and the `prose` measure reference them through
14
+ * {@link metricVar} and one edit retunes the geometry
15
+ * everywhere. Scheme-independent — geometry does not
16
+ * change by light/dark, so there is no `html.dark`
17
+ * override (see the metric CSS emitter).
18
+ */
19
+ export type Metric = "shell-max" | "sidebar" | "measure" | "rail";
20
+ export declare const metrics: ReadonlyArray<Metric>;
21
+ export declare const metricTable: Record<Metric, SoftStr>;
22
+ /** A metric's concrete length (build-time value). */
23
+ export declare const metricValue: (m: Metric) => SoftStr;
24
+ /**
25
+ * The `var(--<prefix>-<metric>)` reference for a metric —
26
+ * the runtime handle the shell CSS and the `measure` atom
27
+ * emit, mirroring `colorVar`. Resolved by the metrics
28
+ * `:root` block (see the metric CSS emitter). The prefix
29
+ * comes from the supplied {@link Theme} (`pm` by default),
30
+ * so a consumer that renames its custom-property namespace
31
+ * flows through here. Curried `metricVar(theme)(m)` so a
32
+ * theme-bound emitter fixes the namespace once.
33
+ */
34
+ export declare const metricVar: (theme: Theme) => (m: Metric) => SoftStr;
35
+ //# sourceMappingURL=metric.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../../../src/Style/model/metric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,MAAM,GAChB,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,MAAM,CAKzC,CAAC;AASF,eAAO,MAAM,WAAW,EAAE,MAAM,CAC9B,MAAM,EACN,OAAO,CAMR,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,OACxB,CAAC;AAEjB;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,GACnB,OAAO,KAAK,MACZ,GAAG,MAAM,KAAG,OACkB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type Result, type InvalidError } from "plgg";
2
+ import { type Color } from "./token";
3
+ import { type Scheme } from "./scheme";
4
+ import { type HexColor, hex } from "./hexColor";
5
+ /**
6
+ * A full palette: every {@link Color} token, in every
7
+ * {@link Scheme}, as a validated {@link HexColor}. The
8
+ * `Record` shape makes it exhaustive twice over — a missing
9
+ * scheme or token is a `tsc` error — so an override can
10
+ * never ship a hole. Palette *data*, split from the token
11
+ * *vocabulary* (`token.ts`) so an app can supply its own
12
+ * brand colors without forking the framework.
13
+ */
14
+ export type Palette = Record<Scheme, Record<Color, HexColor>>;
15
+ export declare const defaultPalette: Palette;
16
+ /**
17
+ * A token's {@link HexColor} in a palette / scheme.
18
+ */
19
+ export declare const paletteHex: (palette: Palette, scheme: Scheme, c: Color) => HexColor;
20
+ /**
21
+ * A token's {@link HexColor} in the DEFAULT palette — the
22
+ * zero-config path the emitter and the contrast gate use.
23
+ * (Was `token.ts`'s `colorHex`; now returns the branded
24
+ * color — `hex()` unwraps the raw string.)
25
+ */
26
+ export declare const colorHex: (scheme: Scheme, c: Color) => HexColor;
27
+ /**
28
+ * Validate an unknown value (config-borne) as a full
29
+ * {@link Palette}. Iterates `schemes` × the token vocabulary
30
+ * exhaustively — a missing scheme, a missing token, or a
31
+ * bad hex is an `Err` naming the failing path (e.g.
32
+ * `dark.danger-border`). Validates SHAPE, not taste: a
33
+ * low-contrast override is the app's deliberate choice
34
+ * (use `contrastRatio` to audit).
35
+ */
36
+ export declare const asPalette: (value: unknown) => Result<Palette, InvalidError>;
37
+ export { hex };
38
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/Style/model/palette.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EAOlB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,MAAM,EAEZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,QAAQ,EAEb,GAAG,EACJ,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAC1B,MAAM,EACN,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CACxB,CAAC;AAmHF,eAAO,MAAM,cAAc,EAAE,OAE5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,OAAO,EAChB,QAAQ,MAAM,EACd,GAAG,KAAK,KACP,QAA8B,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GACnB,QAAQ,MAAM,EACd,GAAG,KAAK,KACP,QAAqC,CAAC;AAYzC;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GACpB,OAAO,OAAO,KACb,MAAM,CAAC,OAAO,EAAE,YAAY,CAwC9B,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The two color schemes plggmatic ships. A closed union
3
+ * (not a free string) so the scheme emitter and any
4
+ * future scheme-aware code are exhaustive: adding a
5
+ * third scheme is a compile error everywhere it must be
6
+ * handled, never a silent gap.
7
+ *
8
+ * Light is the default; dark is opted into by a single
9
+ * `dark` class on `<html>` (`html.dark`) — the SINGLE
10
+ * published scheme mechanism (no attribute variants),
11
+ * which reswitches every `--pm-*` custom property (see the
12
+ * scheme CSS emitter). The class is set/persisted through
13
+ * the appearance contract (`Style/usecase/appearanceScript`,
14
+ * `applyScheme` + the `vp-appearance` key). The scheme is
15
+ * chosen by one class, not threaded through the component
16
+ * tree — colors stay data.
17
+ */
18
+ export type Scheme = "light" | "dark";
19
+ /**
20
+ * Every {@link Scheme}, in emit order (light first, then
21
+ * the `html.dark` override). Iterated by the scheme CSS
22
+ * emitter and by the contrast spec so both cover the
23
+ * whole union without hard-coding the members twice.
24
+ */
25
+ export declare const schemes: ReadonlyArray<Scheme>;
26
+ //# sourceMappingURL=scheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../../src/Style/model/scheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,MAAM,CAGzC,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Scheme } from "./scheme";
3
+ import { type HexColor } from "./hexColor";
4
+ import { type Theme } from "./theme";
5
+ /**
6
+ * The closed syntax-highlight vocabulary — a SIBLING of the
7
+ * {@link Color} token matrix (`Style/model/token.ts`), NOT
8
+ * new members of it: `bg("code-keyword")` stays a compile
9
+ * error, because syntax hues paint plgg-highlight's
10
+ * `tok-<kind>` spans through their own `--pm-code-*`
11
+ * properties, never the color atoms. A closed union so an
12
+ * unknown kind is a `tsc` error and the palette / emitter
13
+ * stay exhaustive.
14
+ *
15
+ * Seven of plgg-highlight's nine `TokenKind`s are colored;
16
+ * **`identifier` and `plain` are deliberately absent** — they
17
+ * inherit the code block's default ink (the pre-existing
18
+ * behavior, kept on purpose), so plggmatic emits neither a
19
+ * `--pm-code-*` property nor a `.tok-*` rule for them.
20
+ *
21
+ * **Pinned contract with plgg-highlight.** These kind names
22
+ * MUST equal plgg-highlight's `tok-<kind>` class stems
23
+ * (`Render/usecase/highlight.ts` `tokenClass`). plggmatic
24
+ * does NOT import plgg-highlight to learn them (its deps
25
+ * stay `plgg` + `plgg-view`); the name agreement is pinned
26
+ * by a cross-package spec in plggpress — the one package
27
+ * that depends on both sides of the seam.
28
+ */
29
+ export type SyntaxKind = "keyword" | "string" | "number" | "comment" | "regex" | "template" | "punctuation";
30
+ export declare const syntaxKinds: ReadonlyArray<SyntaxKind>;
31
+ /**
32
+ * The default syntax palette: every {@link SyntaxKind} in
33
+ * every {@link Scheme} as a validated {@link HexColor}. The
34
+ * `Record<Scheme, Record<SyntaxKind, HexColor>>` shape is
35
+ * exhaustive twice over — a missing scheme or kind is a
36
+ * `tsc` error. Shaped as a Record so ticket 04's
37
+ * palette-override API can reach syntax the same way it
38
+ * reaches the color matrix (a consumer overriding `primary`
39
+ * can override `keyword`); the config→override wiring rides
40
+ * the schemeCss precedent and is added by the consumer
41
+ * tickets.
42
+ */
43
+ export declare const syntaxPalette: Record<Scheme, Record<SyntaxKind, HexColor>>;
44
+ /** A syntax kind's {@link HexColor} in a scheme. */
45
+ export declare const syntaxHex: (scheme: Scheme, k: SyntaxKind) => HexColor;
46
+ /**
47
+ * The `var(--pm-code-<kind>)` reference for a kind — what
48
+ * the `.tok-<kind>` rule emits, resolved per scheme by the
49
+ * `--pm-code-*` properties. The `pm` namespace comes from
50
+ * {@link cssPrefix}; the `code-` segment separates syntax
51
+ * hues from the `--pm-<color>` token namespace.
52
+ */
53
+ export declare const syntaxVar: (theme: Theme) => (k: SyntaxKind) => SoftStr;
54
+ //# sourceMappingURL=syntax.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax.d.ts","sourceRoot":"","sources":["../../../src/Style/model/syntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,CAAC;AAElB,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,UAAU,CAS/C,CAAC;AA2DJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,MAAM,EACN,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAI7B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,SAAS,GACpB,QAAQ,MAAM,EACd,GAAG,UAAU,KACZ,QAAoC,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GACnB,OAAO,KAAK,MACZ,GAAG,UAAU,KAAG,OACmB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Palette } from "./palette";
3
+ import { type Metric } from "./metric";
4
+ import { type TypeRole, type TypeScale } from "./typography";
5
+ import { type Scheme } from "./scheme";
6
+ import { type SyntaxKind } from "./syntax";
7
+ import { type HexColor } from "./hexColor";
8
+ import { type ZBand } from "./zIndex";
9
+ /**
10
+ * The design language as a single closed record — the
11
+ * empty-shell answer of the `plggmatic-extraction-cut`
12
+ * trip (ticket A3). Every value the CSS emitters and color
13
+ * atoms used to close over as a module constant is now a
14
+ * field here, so a consumer supplies its inputs explicitly
15
+ * instead of the engine baking one brand in:
16
+ *
17
+ * - `prefix` — the custom-property namespace
18
+ * (`--<prefix>-*`); `pm` by default. `colorVar`/
19
+ * `metricVar`/the emitters read it, so the emitted block
20
+ * and the atoms that reference it agree by construction.
21
+ * - `palette` — every color token's hex, per scheme
22
+ * (the `schemeCss` source; the override API's target).
23
+ * - `metrics` — the shell-geometry lengths (`metricCss`).
24
+ * - `typeScale` — the prose type roles.
25
+ * - `syntax` — the code-token palette (`syntaxCss`).
26
+ * - `zBands` — the stacking-band integers.
27
+ * - `storageKey` — the appearance persistence key
28
+ * (`vp-appearance` by default — a visitor's saved scheme
29
+ * must survive the extraction, D16).
30
+ *
31
+ * A widened or missing field is a `tsc` error — no `as`,
32
+ * no `any`. The engine ships {@link defaultTheme} (values
33
+ * = today's monochrome `--pm-*` design language) as its
34
+ * brand-neutral default; `plggmatic/brand` owns the
35
+ * BRANDED instance and the palette-override API layered
36
+ * over this contract.
37
+ */
38
+ export type Theme = Readonly<{
39
+ prefix: SoftStr;
40
+ palette: Palette;
41
+ metrics: Record<Metric, SoftStr>;
42
+ typeScale: Record<TypeRole, TypeScale>;
43
+ syntax: Record<Scheme, Record<SyntaxKind, HexColor>>;
44
+ zBands: Record<ZBand, number>;
45
+ storageKey: SoftStr;
46
+ }>;
47
+ /**
48
+ * The neutral default `Theme`: the monochrome `--pm-*`
49
+ * design language the engine shipped before
50
+ * parameterization (prefix `pm`, the oracle palette,
51
+ * `vp-appearance`), so passing `defaultTheme` to the
52
+ * emitters reproduces the old output byte-for-byte
53
+ * (D3/D16). `plggmatic/brand` re-brands this as
54
+ * Pragmatic's; `plggpress` passes it at its composition
55
+ * root and may diverge later.
56
+ */
57
+ export declare const defaultTheme: Theme;
58
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Style/model/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,MAAM,EAEZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EAEf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CACZ,MAAM,EACN,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7B,CAAC;IACF,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Theme } from "./theme";
3
+ /**
4
+ * The closed color vocabulary. Because it is a union (not
5
+ * a free string) an unknown role like `bg("blurple")`, or
6
+ * a bare `bg("primary")` without a variant, is a compile
7
+ * error — the type-driven win over stringly CSS classes.
8
+ *
9
+ * Per D9 (roadmap 2026-07-04,
10
+ * `.workaholic/specs/20260704-plggpress-plggmatic-roadmap.md`)
11
+ * the vocabulary is a MATRIX: five semantic roles ×
12
+ * four variants (20 tokens), plus a five-member neutral
13
+ * scale (25 tokens total), assembled from the exported
14
+ * {@link SemanticRole}/{@link Variant}/{@link Neutral}
15
+ * unions so the shape stays closed and adding a role
16
+ * later is a single union-member edit whose fallout
17
+ * (`colors`, `PALETTE`, the exhaustiveness pin, the
18
+ * contrast pairs) is driven entirely by `tsc`.
19
+ *
20
+ * DOCTRINE (amended by D9): `token.ts` was originally a
21
+ * deliberate *seed*, not a catalog — each role earned its
22
+ * place from a concrete consumer. D9 fixes the role×variant
23
+ * *shape* up front as roadmap vocabulary, so the
24
+ * earned-place rule now applies one tier up: new ROLES
25
+ * (secondary/tertiary) are still earned by a concrete
26
+ * consumer and are deliberately NOT shipped yet.
27
+ *
28
+ * Variant semantics:
29
+ * - `base` — the solid accent fill (button, active marker).
30
+ * Its on-fill label is the neutral `surface` token
31
+ * (inverted per scheme — exactly the qmu oracle's
32
+ * `--vp-hover`/`--vp-hover-ink` pair).
33
+ * - `text` — the role's ink used as foreground on the
34
+ * neutral surfaces AND on the role's own `surface`.
35
+ * - `surface` — the role-tinted panel background (a
36
+ * callout body).
37
+ * - `border` — the role's edge hue (WCAG 1.4.11 non-text).
38
+ *
39
+ * Neutral scale:
40
+ * - `surface` — the page/pane background prose sits on
41
+ * - `surface-2` — a secondary panel (code block, table
42
+ * header, sunken rail) distinct from `surface`
43
+ * - `text` — default body/heading ink on `surface`
44
+ * - `muted` — secondary ink (captions, metadata); still
45
+ * meets AA on both surfaces (not decoration-only)
46
+ * - `border` — hairline dividers and pane edges
47
+ */
48
+ export type SemanticRole = "primary" | "success" | "danger" | "warning" | "info";
49
+ export type Variant = "base" | "text" | "surface" | "border";
50
+ export type Neutral = "surface" | "surface-2" | "text" | "muted" | "border";
51
+ export type Color = `${SemanticRole}-${Variant}` | Neutral;
52
+ export declare const semanticRoles: ReadonlyArray<SemanticRole>;
53
+ export declare const variants: ReadonlyArray<Variant>;
54
+ export declare const neutrals: ReadonlyArray<Neutral>;
55
+ /**
56
+ * HOVER / HOVER-INK DECISION (D9 + ticket 05 — recorded,
57
+ * not shipped as a token).
58
+ *
59
+ * The qmu signature affordance — the inverted pill on
60
+ * every chrome link and active nav leaf — needs a fill
61
+ * (`--vp-hover`) and its label ink (`--vp-hover-ink`).
62
+ * Under the monochrome default this pair is EXACTLY the
63
+ * on-base-label convention already pinned by the matrix,
64
+ * so no dedicated token ships:
65
+ *
66
+ * - `hover` := `primary-base` (light `#111111`, dark
67
+ * `#f4f4f4` — the oracle's dark `rgba(255,255,255,.95)`
68
+ * alpha-flattened per the palette's step 4).
69
+ * - `hover-ink` := neutral `surface` (light `#ffffff`,
70
+ * dark `#1b1b1f`).
71
+ *
72
+ * i.e. the inverted pill is `neutral surface` painted on
73
+ * `primary-base` — the same two values a `primary-base`
74
+ * fill already labels with. A second name would be a
75
+ * synonym, so D9's earned-place rule (at the role tier)
76
+ * keeps it derived.
77
+ *
78
+ * REVISIT TRIGGERS:
79
+ * 1. Ticket 04's palette-override API — a non-black
80
+ * `primary-base` turns the monochrome pill into a
81
+ * COLORED pill. If qmu identity requires the inversion
82
+ * to stay monochrome under an overridden palette, the
83
+ * pair earns its own token then (and joins the ticket-03
84
+ * contrast gate in both schemes).
85
+ * 2. Ticket 07's port — if any inverted surface fails AA
86
+ * under this derivation, the contrast spec is the
87
+ * arbiter and the pair is re-decided.
88
+ *
89
+ * This is a THEME idiom expressed through existing tokens.
90
+ * It is distinct from the COMPONENT hover-feedback rule
91
+ * (an opacity dim — see `Component/model/interaction.ts`
92
+ * `hoverDim`): that governs a control dimming on `:hover`,
93
+ * this governs a link/leaf inverting its fill. Both stand.
94
+ */
95
+ /**
96
+ * Every {@link Color}, DERIVED from the unions so the list
97
+ * can never drift from the type. The scheme emitter and
98
+ * specs iterate this; the exhaustiveness spin in
99
+ * `token.spec.ts` pins it to the union at compile time.
100
+ */
101
+ export declare const colors: ReadonlyArray<Color>;
102
+ /**
103
+ * The concrete hex for every token in every scheme. The
104
+ * `Record<Scheme, Record<Color, SoftStr>>` shape makes
105
+ * this exhaustive twice over: a missing scheme or a
106
+ * missing token is a `tsc` error, so the palette can never
107
+ * ship a hole. Literal color values live ONLY here — every
108
+ * atom resolves through {@link colorVar}.
109
+ *
110
+ * The default is MONOCHROME (D9): the qmu.co.jp oracle port
111
+ * carried in `plggpress/src/theme/baseCss.ts` — black
112
+ * `#111111` on white `#ffffff` in light, near-white on
113
+ * near-black in dark. The dark neutral inks are the
114
+ * oracle's translucent whites flattened over the dark
115
+ * `surface` (single solid hex is required by the hex-shape
116
+ * spec and the emitter): text `rgba(240,240,245,.92)` →
117
+ * `#dfdfe4`, muted `rgba(235,235,245,.55)` → `#8d8d95`,
118
+ * brand `rgba(255,255,255,.95)` → `#f4f4f4`. Semantic
119
+ * surfaces/inks are seeded from the oracle callout hues;
120
+ * `base`/`border` tiers are chosen so the on-base label
121
+ * and the 3:1 border floor clear AA (the contrast spec is
122
+ * the arbiter). `info` has no oracle value (plggpress
123
+ * renders info in brand) — a provisional blue family,
124
+ * flagged as the one non-oracle role. The palette DATA
125
+ * (the default values, the override caster) lives in
126
+ * `Style/model/palette.ts`; `token.ts` owns only the token
127
+ * *vocabulary* and `colorVar`, so overriding a palette
128
+ * never reaches this file.
129
+ */
130
+ /**
131
+ * The `var(--<prefix>-<token>)` reference for a token —
132
+ * what every color atom emits, so the value is resolved by
133
+ * the active scheme's custom properties at paint time
134
+ * rather than baked in. The namespace prefix comes from the
135
+ * supplied {@link Theme} (`pm` by default), so the emitted
136
+ * `:root` block and the atoms that reference it share one
137
+ * namespace. Curried `colorVar(theme)(c)` so a theme-bound
138
+ * emitter (or the default-bound atoms) fixes the prefix
139
+ * once.
140
+ */
141
+ export declare const colorVar: (theme: Theme) => (c: Color) => SoftStr;
142
+ //# sourceMappingURL=token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/Style/model/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,MAAM,OAAO,GACjB,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzC,MAAM,MAAM,OAAO,GACf,SAAS,GACT,WAAW,GACX,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEb,MAAM,MAAM,KAAK,GACf,GAAG,YAAY,IAAI,OAAO,EAAE,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,YAAY,CAOnD,CAAC;AAEJ,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,OAAO,CAK3C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,OAAO,CAM3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,KAAK,CAMvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GAClB,OAAO,KAAK,MACZ,GAAG,KAAK,KAAG,OACmB,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { type SoftStr, type Option } from "plgg";
2
+ /**
3
+ * The prose type roles plggmatic tokenizes — the guide's
4
+ * document scale, NOT plgg-view's generic `FontSize`
5
+ * ladder (which tops out at `2xl = 1.5rem`, below the
6
+ * guide `h1` of `1.875rem`, so it cannot reach the scale
7
+ * at all). A closed union so a role with no entry — or a
8
+ * typo like `typeScale["h5"]` — is a `tsc` error; ticket
9
+ * 07 emits the ported theme's heading CSS from this one
10
+ * map, base scale AND phone-column block.
11
+ *
12
+ * Sourced value-for-value from the qmu.co.jp oracle port
13
+ * carried in `plggpress/src/theme/baseCss.ts` (the
14
+ * `.vp-doc h1`–`h4` block and the `body.vp` base): a calm
15
+ * ~1.25 modular scale on a 1rem body, every heading at
16
+ * weight 400 (regular), no letter-spacing.
17
+ */
18
+ export type TypeRole = "h1" | "h2" | "h3" | "h4" | "body";
19
+ export declare const typeRoles: ReadonlyArray<TypeRole>;
20
+ /**
21
+ * The closed font-weight set — the ONLY three weights the
22
+ * oracle uses: `regular` body & headings, `medium` links,
23
+ * wordmark, active nav and buttons, `semibold` section /
24
+ * group titles and table headers. A union, not a free
25
+ * `number`, so `weight(700)` is a compile error until a
26
+ * component earns the weight (the emergent doctrine, one
27
+ * tier down from the color roles).
28
+ */
29
+ export type FontWeight = 400 | 500 | 600;
30
+ export declare const fontWeights: ReadonlyArray<FontWeight>;
31
+ /** Regular — body copy and every heading (weight 400). */
32
+ export declare const regular: FontWeight;
33
+ /** Medium — links, wordmark, active nav, buttons. */
34
+ export declare const medium: FontWeight;
35
+ /** Semibold — section / group titles, table headers. */
36
+ export declare const semibold: FontWeight;
37
+ /**
38
+ * A heading role's compact (sub-`sm`) override: the
39
+ * phone-column `size`, and — only where the oracle sets
40
+ * one — a `lineHeight`. `h3` narrows its size but keeps
41
+ * its base leading, so its `lineHeight` is `None` (absence
42
+ * is `Option`, never a sentinel). Recorded so ticket 07
43
+ * emits the oracle's `max-width:639px` media block from
44
+ * the same source as the base scale.
45
+ */
46
+ export type CompactType = Readonly<{
47
+ size: SoftStr;
48
+ lineHeight: Option<SoftStr>;
49
+ }>;
50
+ /**
51
+ * One prose role's metrics: the base `size`, its
52
+ * (unitless, inheritance-safe) `lineHeight`, its
53
+ * `weight`, and the optional `compact` phone-column
54
+ * override. `h4` and `body` have no compact variant
55
+ * (`None`).
56
+ */
57
+ export type TypeScale = Readonly<{
58
+ size: SoftStr;
59
+ lineHeight: SoftStr;
60
+ weight: FontWeight;
61
+ compact: Option<CompactType>;
62
+ }>;
63
+ /**
64
+ * Every {@link TypeRole}'s metrics, from the oracle:
65
+ * `h1 1.875rem/1.25`, `h2 1.5rem/1.3`,
66
+ * `h3 1.1875rem/1.45`, `h4 1.0625rem/1.5`, all weight
67
+ * 400; `body 1rem/1.75/400`. The compact sizes
68
+ * (`h1 1.75rem`, `h2 1.375rem`, `h3 1.125rem`) are the
69
+ * oracle's `max-width:639px` block — h1/h2 re-state their
70
+ * (unchanged) leading, h3 keeps its base leading. The
71
+ * `Record` makes it exhaustive: a missing role is a `tsc`
72
+ * error.
73
+ */
74
+ export declare const typeScale: Record<TypeRole, TypeScale>;
75
+ /**
76
+ * The sans font stack — the oracle's `body.vp`
77
+ * `font-family` verbatim (`"Inter"` first, then the
78
+ * system-UI fallbacks and the emoji families). A recorded
79
+ * token; ticket 07 applies it as the ported theme's base
80
+ * family. Escape-safe (no `<`, `>`, `&`).
81
+ */
82
+ export declare const sansFontStack: SoftStr;
83
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/Style/model/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EAGZ,MAAM,MAAM,CAAC;AAEd;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,QAAQ,GAClB,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,aAAa,CAAC,QAAQ,CACZ,CAAC;AAEnC;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,UAAU,CACjC,CAAC;AAElB,0DAA0D;AAC1D,eAAO,MAAM,OAAO,EAAE,UAAgB,CAAC;AACvC,qDAAqD;AACrD,eAAO,MAAM,MAAM,EAAE,UAAgB,CAAC;AACtC,wDAAwD;AACxD,eAAO,MAAM,QAAQ,EAAE,UAAgB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;CAC7B,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAC5B,QAAQ,EACR,SAAS,CAyCV,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,OAAoH,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The z-index stacking bands. A closed, semantically
3
+ * named set — spaced (1 / 30 / 40 / 50) so a new layer
4
+ * can slot between two without renumbering — that
5
+ * replaces the ad-hoc integers which otherwise accumulate
6
+ * across the shell. Exactly the oracle's stack plus the
7
+ * example's sticky header:
8
+ *
9
+ * - `content` (1) — a sticky in-pane header inside a
10
+ * scrolling column (the example's `.ex-colhead`).
11
+ * - `chrome` (30) — the sticky mobile bar.
12
+ * - `backdrop` (40) — the dimmed scrim behind an open
13
+ * drawer.
14
+ * - `overlay` (50) — the off-canvas drawer itself.
15
+ *
16
+ * The `zIndex` atom (Style/usecase/utilities) resolves a
17
+ * band for inline styles; the value function feeds raw
18
+ * CSS strings (media blocks) where an atom cannot reach.
19
+ */
20
+ export type ZBand = "content" | "chrome" | "backdrop" | "overlay";
21
+ export declare const zBands: ReadonlyArray<ZBand>;
22
+ export declare const zBandTable: Record<ZBand, number>;
23
+ /** A band's concrete stacking integer. */
24
+ export declare const zValue: (b: ZBand) => number;
25
+ //# sourceMappingURL=zIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zIndex.d.ts","sourceRoot":"","sources":["../../../src/Style/model/zIndex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,KAAK,GACf,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhD,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,KAAK,CAKvC,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAK5C,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,MAAM,GAAI,GAAG,KAAK,KAAG,MACnB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Scheme } from "../model/scheme";
3
+ /**
4
+ * The dependency-free, no-FOUC inline script that sets the
5
+ * `dark` class BEFORE first paint, mirroring plggpress's
6
+ * `HEAD_SCRIPT` in effect: read {@link appearanceStorageKey}
7
+ * else `matchMedia('(prefers-color-scheme: dark)')`, add
8
+ * `dark` to `document.documentElement.classList`, all in a
9
+ * `try/catch` (private mode / blocked storage schemes from
10
+ * the OS preference). Contains no `</script` inner sequence,
11
+ * and is injected AFTER the SSR text escaper (see
12
+ * {@link injectAppearanceScript}) so its `<` characters are
13
+ * intentional markup, not escaped content.
14
+ */
15
+ export declare const appearanceInitScript: SoftStr;
16
+ /**
17
+ * Insert the init script just before `</head>`. A page with
18
+ * no `</head>` passes through unchanged (idempotent guard,
19
+ * per the plggpress precedent). Injected after escaping, so
20
+ * the `<script>` tags are literal.
21
+ */
22
+ export declare const injectAppearanceScript: (html: SoftStr) => SoftStr;
23
+ export type SchemeClassList = Readonly<{
24
+ add: (token: string) => void;
25
+ remove: (token: string) => void;
26
+ }>;
27
+ export type SchemeRoot = Readonly<{
28
+ classList: SchemeClassList;
29
+ }>;
30
+ export type SchemeStorage = Readonly<{
31
+ setItem: (key: string, value: string) => void;
32
+ }>;
33
+ /**
34
+ * Apply and persist a scheme at the app's effect seam: set
35
+ * or remove the `dark` class on the root, and store the
36
+ * choice under {@link appearanceStorageKey}. Storage
37
+ * failures (private mode) are swallowed — the class still
38
+ * flips, and the OS preference still schemes on reload.
39
+ * (When plgg-view gains `Cmd`/`Sub` in ticket 06 this wraps
40
+ * as a `Cmd`; the adapter is intentionally thin.)
41
+ */
42
+ export declare const applyScheme: (scheme: Scheme, root: SchemeRoot, storage: SchemeStorage) => void;
43
+ //# sourceMappingURL=appearanceScript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appearanceScript.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/appearanceScript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAG3D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,EAAE,OAAmQ,CAAC;AAEvS;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,OAAO,KACZ,OAMO,CAAC;AAKX,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC,CAAC;AAGH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,MAAM,UAAU,EAChB,SAAS,aAAa,KACrB,IAWF,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type SoftStr } from "plgg";
2
+ import { type Theme } from "../model/theme";
3
+ /**
4
+ * The multi-column mode's framework chrome, as a single
5
+ * escape-safe CSS block (no `<`, `>`, `&` — survives an
6
+ * SSR text escaper byte-for-byte). This is the pattern
7
+ * the workbench example hand-wrote as app-side `ex-*`
8
+ * rules, lifted into the design system: column surfaces,
9
+ * sticky `colHead` headers, the breadcrumb trail, the
10
+ * `aria-current` inverted pill (and the close/crumb hover
11
+ * pills) — all painted as neutral `surface` ink on a
12
+ * `primary-base` fill, the on-fill label the `base` variant
13
+ * documents (NOT `primary-text`, which is the role ink for
14
+ * neutral surfaces and equals `primary-base` under the
15
+ * monochrome default, rendering the pill label invisible) —
16
+ * per-column scroll above
17
+ * the `snap` breakpoint (viewport minus the chrome-rail
18
+ * metric), and the below-`snap` horizontal scroll-snap
19
+ * strip — a MANDATORY, one-column-per-swipe left-edge snap
20
+ * (`scroll-snap-stop:always`, `overscroll-behavior-x:
21
+ * contain`) so a touch swipe on a phone catches and aligns
22
+ * the next column firmly to the left edge, with a
23
+ * full-viewport trailing runway (`.pm-row::after` — a
24
+ * `flex:0 0 100vw` spacer box, NOT a trailing margin, whose
25
+ * width is reliably counted in the scroll width at every
26
+ * depth) so even a shallow last column (2nd/3rd/4th) slides
27
+ * all the way to the left edge; mandatory snap keeps the
28
+ * rest point on the last column, never in the empty runway
29
+ * (the spacer carries no `scroll-snap-align`). Every color
30
+ * is a `--pm-*` variable (via
31
+ * {@link colorVar}), every dimension a token
32
+ * ({@link metricVar}/{@link zValue}), and the media
33
+ * boundaries come from the breakpoint builders (never a
34
+ * `--pm-*` custom property — a `@media` cannot resolve
35
+ * `var()`). Class hooks are `cssPrefix`-derived
36
+ * (`pm-row`/`pm-col`/`pm-pane`/`pm-colhead`/`pm-crumbs`).
37
+ * Inject once at boot AFTER the scheme CSS so the
38
+ * variables resolve.
39
+ */
40
+ export declare const chromeCss: (theme: Theme) => SoftStr;
41
+ //# sourceMappingURL=chromeCss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chromeCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/chromeCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AASzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,SAAS,GACpB,OAAO,KAAK,KACX,OA2BF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type HexColor } from "../model/hexColor";
2
+ export declare const contrastRatio: (a: HexColor, b: HexColor) => number;
3
+ //# sourceMappingURL=contrast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/contrast.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,gCAAgC,CAAC;AA8BxC,eAAO,MAAM,aAAa,GACxB,GAAG,QAAQ,EACX,GAAG,QAAQ,KACV,MAIF,CAAC"}