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.
- package/README.md +37 -0
- package/dist/Catalog/index.d.ts +17 -0
- package/dist/Catalog/index.d.ts.map +1 -0
- package/dist/Catalog/model/tool.d.ts +101 -0
- package/dist/Catalog/model/tool.d.ts.map +1 -0
- package/dist/Catalog/usecase/adapter.d.ts +81 -0
- package/dist/Catalog/usecase/adapter.d.ts.map +1 -0
- package/dist/Catalog/usecase/catalog.d.ts +43 -0
- package/dist/Catalog/usecase/catalog.d.ts.map +1 -0
- package/dist/Catalog/usecase/runFlow.d.ts +77 -0
- package/dist/Catalog/usecase/runFlow.d.ts.map +1 -0
- package/dist/Component/index.d.ts +30 -0
- package/dist/Component/index.d.ts.map +1 -0
- package/dist/Component/model/interaction.d.ts +41 -0
- package/dist/Component/model/interaction.d.ts.map +1 -0
- package/dist/Component/model/navItem.d.ts +16 -0
- package/dist/Component/model/navItem.d.ts.map +1 -0
- package/dist/Component/usecase/breadcrumb.d.ts +26 -0
- package/dist/Component/usecase/breadcrumb.d.ts.map +1 -0
- package/dist/Component/usecase/button.d.ts +27 -0
- package/dist/Component/usecase/button.d.ts.map +1 -0
- package/dist/Component/usecase/checkbox.d.ts +20 -0
- package/dist/Component/usecase/checkbox.d.ts.map +1 -0
- package/dist/Component/usecase/colHead.d.ts +28 -0
- package/dist/Component/usecase/colHead.d.ts.map +1 -0
- package/dist/Component/usecase/confirmDialog.d.ts +25 -0
- package/dist/Component/usecase/confirmDialog.d.ts.map +1 -0
- package/dist/Component/usecase/declaredForm.d.ts +89 -0
- package/dist/Component/usecase/declaredForm.d.ts.map +1 -0
- package/dist/Component/usecase/navTree.d.ts +21 -0
- package/dist/Component/usecase/navTree.d.ts.map +1 -0
- package/dist/Component/usecase/selectInput.d.ts +28 -0
- package/dist/Component/usecase/selectInput.d.ts.map +1 -0
- package/dist/Component/usecase/sidebarNav.d.ts +77 -0
- package/dist/Component/usecase/sidebarNav.d.ts.map +1 -0
- package/dist/Component/usecase/textArea.d.ts +22 -0
- package/dist/Component/usecase/textArea.d.ts.map +1 -0
- package/dist/Component/usecase/textInput.d.ts +23 -0
- package/dist/Component/usecase/textInput.d.ts.map +1 -0
- package/dist/Component/usecase/textLink.d.ts +26 -0
- package/dist/Component/usecase/textLink.d.ts.map +1 -0
- package/dist/Component/usecase/themeToggle.d.ts +75 -0
- package/dist/Component/usecase/themeToggle.d.ts.map +1 -0
- package/dist/Component/usecase/toast.d.ts +32 -0
- package/dist/Component/usecase/toast.d.ts.map +1 -0
- package/dist/Component/usecase/typography.d.ts +33 -0
- package/dist/Component/usecase/typography.d.ts.map +1 -0
- package/dist/Declare/model/Action.d.ts +91 -0
- package/dist/Declare/model/Action.d.ts.map +1 -0
- package/dist/Declare/model/Adapter.d.ts +107 -0
- package/dist/Declare/model/Adapter.d.ts.map +1 -0
- package/dist/Declare/model/Collection.d.ts +55 -0
- package/dist/Declare/model/Collection.d.ts.map +1 -0
- package/dist/Declare/model/Declaration.d.ts +27 -0
- package/dist/Declare/model/Declaration.d.ts.map +1 -0
- package/dist/Declare/model/Menu.d.ts +21 -0
- package/dist/Declare/model/Menu.d.ts.map +1 -0
- package/dist/Declare/model/Query.d.ts +56 -0
- package/dist/Declare/model/Query.d.ts.map +1 -0
- package/dist/Declare/model/Row.d.ts +129 -0
- package/dist/Declare/model/Row.d.ts.map +1 -0
- package/dist/Declare/model/Source.d.ts +83 -0
- package/dist/Declare/model/Source.d.ts.map +1 -0
- package/dist/Declare/usecase/apply.d.ts +23 -0
- package/dist/Declare/usecase/apply.d.ts.map +1 -0
- package/dist/Declare/usecase/project.d.ts +66 -0
- package/dist/Declare/usecase/project.d.ts.map +1 -0
- package/dist/Declare/usecase/reconcile.d.ts +63 -0
- package/dist/Declare/usecase/reconcile.d.ts.map +1 -0
- package/dist/Flow/model/forms.d.ts +45 -0
- package/dist/Flow/model/forms.d.ts.map +1 -0
- package/dist/Flow/model/run.d.ts +74 -0
- package/dist/Flow/model/run.d.ts.map +1 -0
- package/dist/Flow/model/script.d.ts +279 -0
- package/dist/Flow/model/script.d.ts.map +1 -0
- package/dist/Flow/usecase/interpret.d.ts +17 -0
- package/dist/Flow/usecase/interpret.d.ts.map +1 -0
- package/dist/Flow/usecase/read.d.ts +46 -0
- package/dist/Flow/usecase/read.d.ts.map +1 -0
- package/dist/Form/index.d.ts +14 -0
- package/dist/Form/index.d.ts.map +1 -0
- package/dist/Form/model/control.d.ts +9 -0
- package/dist/Form/model/control.d.ts.map +1 -0
- package/dist/Form/model/submission.d.ts +30 -0
- package/dist/Form/model/submission.d.ts.map +1 -0
- package/dist/Form/usecase/controlParts.d.ts +30 -0
- package/dist/Form/usecase/controlParts.d.ts.map +1 -0
- package/dist/Form/usecase/formView.d.ts +21 -0
- package/dist/Form/usecase/formView.d.ts.map +1 -0
- package/dist/Form/usecase/parseForm.d.ts +28 -0
- package/dist/Form/usecase/parseForm.d.ts.map +1 -0
- package/dist/Layout/index.d.ts +21 -0
- package/dist/Layout/index.d.ts.map +1 -0
- package/dist/Layout/model/geometry.d.ts +97 -0
- package/dist/Layout/model/geometry.d.ts.map +1 -0
- package/dist/Layout/model/pane.d.ts +15 -0
- package/dist/Layout/model/pane.d.ts.map +1 -0
- package/dist/Layout/model/reveal.d.ts +26 -0
- package/dist/Layout/model/reveal.d.ts.map +1 -0
- package/dist/Layout/usecase/combinators.d.ts +78 -0
- package/dist/Layout/usecase/combinators.d.ts.map +1 -0
- package/dist/Layout/usecase/preference.d.ts +27 -0
- package/dist/Layout/usecase/preference.d.ts.map +1 -0
- package/dist/Layout/usecase/revealColumn.d.ts +39 -0
- package/dist/Layout/usecase/revealColumn.d.ts.map +1 -0
- package/dist/Layout/usecase/workspace.d.ts +58 -0
- package/dist/Layout/usecase/workspace.d.ts.map +1 -0
- package/dist/Meta/model/classHooks.d.ts +141 -0
- package/dist/Meta/model/classHooks.d.ts.map +1 -0
- package/dist/Meta/model/identity.d.ts +16 -0
- package/dist/Meta/model/identity.d.ts.map +1 -0
- package/dist/Navigate/index.d.ts +19 -0
- package/dist/Navigate/index.d.ts.map +1 -0
- package/dist/Navigate/model/Composition.d.ts +50 -0
- package/dist/Navigate/model/Composition.d.ts.map +1 -0
- package/dist/Navigate/model/Trail.d.ts +84 -0
- package/dist/Navigate/model/Trail.d.ts.map +1 -0
- package/dist/Navigate/model/marker.d.ts +44 -0
- package/dist/Navigate/model/marker.d.ts.map +1 -0
- package/dist/Navigate/usecase/compositionUrl.d.ts +63 -0
- package/dist/Navigate/usecase/compositionUrl.d.ts.map +1 -0
- package/dist/Navigate/usecase/navigationScript.d.ts +16 -0
- package/dist/Navigate/usecase/navigationScript.d.ts.map +1 -0
- package/dist/Navigate/usecase/trailUrl.d.ts +61 -0
- package/dist/Navigate/usecase/trailUrl.d.ts.map +1 -0
- package/dist/Render/index.d.ts +18 -0
- package/dist/Render/index.d.ts.map +1 -0
- package/dist/Render/model/mode.d.ts +13 -0
- package/dist/Render/model/mode.d.ts.map +1 -0
- package/dist/Render/model/screen.d.ts +27 -0
- package/dist/Render/model/screen.d.ts.map +1 -0
- package/dist/Render/usecase/advanceColumns.d.ts +41 -0
- package/dist/Render/usecase/advanceColumns.d.ts.map +1 -0
- package/dist/Render/usecase/multiColumn.d.ts +52 -0
- package/dist/Render/usecase/multiColumn.d.ts.map +1 -0
- package/dist/Render/usecase/parts.d.ts +56 -0
- package/dist/Render/usecase/parts.d.ts.map +1 -0
- package/dist/Render/usecase/renderMode.d.ts +17 -0
- package/dist/Render/usecase/renderMode.d.ts.map +1 -0
- package/dist/Render/usecase/singleColumn.d.ts +20 -0
- package/dist/Render/usecase/singleColumn.d.ts.map +1 -0
- package/dist/Schedule/model/Model.d.ts +103 -0
- package/dist/Schedule/model/Model.d.ts.map +1 -0
- package/dist/Schedule/model/Msg.d.ts +131 -0
- package/dist/Schedule/model/Msg.d.ts.map +1 -0
- package/dist/Schedule/model/Scene.d.ts +190 -0
- package/dist/Schedule/model/Scene.d.ts.map +1 -0
- package/dist/Schedule/model/View.d.ts +54 -0
- package/dist/Schedule/model/View.d.ts.map +1 -0
- package/dist/Schedule/usecase/chain.d.ts +16 -0
- package/dist/Schedule/usecase/chain.d.ts.map +1 -0
- package/dist/Schedule/usecase/codec.d.ts +44 -0
- package/dist/Schedule/usecase/codec.d.ts.map +1 -0
- package/dist/Schedule/usecase/lower.d.ts +45 -0
- package/dist/Schedule/usecase/lower.d.ts.map +1 -0
- package/dist/Schedule/usecase/scene.d.ts +16 -0
- package/dist/Schedule/usecase/scene.d.ts.map +1 -0
- package/dist/Schedule/usecase/schedule.d.ts +72 -0
- package/dist/Schedule/usecase/schedule.d.ts.map +1 -0
- package/dist/Schedule/usecase/update.d.ts +39 -0
- package/dist/Schedule/usecase/update.d.ts.map +1 -0
- package/dist/Style/index.d.ts +34 -0
- package/dist/Style/index.d.ts.map +1 -0
- package/dist/Style/model/appearance.d.ts +23 -0
- package/dist/Style/model/appearance.d.ts.map +1 -0
- package/dist/Style/model/breakpoint.d.ts +43 -0
- package/dist/Style/model/breakpoint.d.ts.map +1 -0
- package/dist/Style/model/componentSlot.d.ts +35 -0
- package/dist/Style/model/componentSlot.d.ts.map +1 -0
- package/dist/Style/model/hexColor.d.ts +26 -0
- package/dist/Style/model/hexColor.d.ts.map +1 -0
- package/dist/Style/model/metric.d.ts +35 -0
- package/dist/Style/model/metric.d.ts.map +1 -0
- package/dist/Style/model/palette.d.ts +38 -0
- package/dist/Style/model/palette.d.ts.map +1 -0
- package/dist/Style/model/scheme.d.ts +26 -0
- package/dist/Style/model/scheme.d.ts.map +1 -0
- package/dist/Style/model/syntax.d.ts +54 -0
- package/dist/Style/model/syntax.d.ts.map +1 -0
- package/dist/Style/model/theme.d.ts +68 -0
- package/dist/Style/model/theme.d.ts.map +1 -0
- package/dist/Style/model/token.d.ts +142 -0
- package/dist/Style/model/token.d.ts.map +1 -0
- package/dist/Style/model/typography.d.ts +83 -0
- package/dist/Style/model/typography.d.ts.map +1 -0
- package/dist/Style/model/zIndex.d.ts +25 -0
- package/dist/Style/model/zIndex.d.ts.map +1 -0
- package/dist/Style/usecase/appearanceScript.d.ts +43 -0
- package/dist/Style/usecase/appearanceScript.d.ts.map +1 -0
- package/dist/Style/usecase/chromeCss.d.ts +41 -0
- package/dist/Style/usecase/chromeCss.d.ts.map +1 -0
- package/dist/Style/usecase/contrast.d.ts +3 -0
- package/dist/Style/usecase/contrast.d.ts.map +1 -0
- package/dist/Style/usecase/metricCss.d.ts +17 -0
- package/dist/Style/usecase/metricCss.d.ts.map +1 -0
- package/dist/Style/usecase/reducedMotion.d.ts +20 -0
- package/dist/Style/usecase/reducedMotion.d.ts.map +1 -0
- package/dist/Style/usecase/runwayCss.d.ts +50 -0
- package/dist/Style/usecase/runwayCss.d.ts.map +1 -0
- package/dist/Style/usecase/schemeCss.d.ts +25 -0
- package/dist/Style/usecase/schemeCss.d.ts.map +1 -0
- package/dist/Style/usecase/slotCss.d.ts +73 -0
- package/dist/Style/usecase/slotCss.d.ts.map +1 -0
- package/dist/Style/usecase/syntaxCss.d.ts +14 -0
- package/dist/Style/usecase/syntaxCss.d.ts.map +1 -0
- package/dist/Style/usecase/utilities.d.ts +98 -0
- package/dist/Style/usecase/utilities.d.ts.map +1 -0
- package/dist/Style/usecase/workspaceCss.d.ts +48 -0
- package/dist/Style/usecase/workspaceCss.d.ts.map +1 -0
- package/dist/brand.d.ts +29 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/columnsEntry.d.ts +27 -0
- package/dist/columnsEntry.d.ts.map +1 -0
- package/dist/columnsEntry.es.js +452 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +6022 -0
- package/dist/styleEntry.d.ts +34 -0
- package/dist/styleEntry.d.ts.map +1 -0
- package/dist/styleEntry.es.js +1615 -0
- package/package.json +15 -8
|
@@ -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,UACX,KAAK,SACT,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,MAAO,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,SAC3B,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,WACd,MAAM,QACR,UAAU,WACP,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,UACb,KAAK,KACX,OA2BF,CAAC"}
|
|
@@ -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,MACrB,QAAQ,KACR,QAAQ,KACV,MAIF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
import { type Theme } from "../model/theme";
|
|
3
|
+
/**
|
|
4
|
+
* The shell-metric custom properties as a single
|
|
5
|
+
* scheme-INDEPENDENT `:root` block
|
|
6
|
+
* (`--pm-shell-max:1440px;…`), in {@link metrics} order.
|
|
7
|
+
* Mirrors `schemeCss`'s single-source contract, but
|
|
8
|
+
* without a `html.dark` override — geometry does not
|
|
9
|
+
* change by light/dark. Escape-safe (no `<`, `>`, `&`) so
|
|
10
|
+
* it survives an SSR text escaper byte-for-byte; inject
|
|
11
|
+
* ahead of the collected atomic rules so every
|
|
12
|
+
* `var(--<prefix>-*)` metric reference resolves. The
|
|
13
|
+
* lengths and namespace come from the supplied
|
|
14
|
+
* {@link Theme}.
|
|
15
|
+
*/
|
|
16
|
+
export declare const metricCss: (theme: Theme) => SoftStr;
|
|
17
|
+
//# sourceMappingURL=metricCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metricCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/metricCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAKpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,UACb,KAAK,KACX,OAMa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
/**
|
|
3
|
+
* The framework-owned reduced-motion block, generalized
|
|
4
|
+
* from the oracle's `prefers-reduced-motion:reduce` rule
|
|
5
|
+
* (`baseCss.ts` lines 80–85): smooth scrolling drops back
|
|
6
|
+
* to `auto` on the page and on the independently
|
|
7
|
+
* scrolling `main` column.
|
|
8
|
+
*
|
|
9
|
+
* **Recorded rule:** any motion plggmatic ships — today
|
|
10
|
+
* the `hoverDim`/`pressDim` feedback and the example's
|
|
11
|
+
* drawer/snap transitions, tomorrow whatever the D9
|
|
12
|
+
* scheduler animates — must be authored so THIS block
|
|
13
|
+
* disables it (a transition gated behind the same query,
|
|
14
|
+
* an animation reset to `none`). Motion is opt-out by
|
|
15
|
+
* default (WCAG 2.3.3). Ticket 07 composes this block into
|
|
16
|
+
* the ported theme rather than re-authoring it. Escape-safe
|
|
17
|
+
* (no `<`, `>`, `&`).
|
|
18
|
+
*/
|
|
19
|
+
export declare const reducedMotionCss: SoftStr;
|
|
20
|
+
//# sourceMappingURL=reducedMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducedMotion.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/reducedMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAwG,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
import { type Theme } from "../model/theme";
|
|
3
|
+
/**
|
|
4
|
+
* The parameters of a runway: the column {@link gap} (also
|
|
5
|
+
* the width the trailing spacer leaves for the gap after the
|
|
6
|
+
* last column) and the {@link lastFallback} width used until
|
|
7
|
+
* the advance effect has measured the real last column.
|
|
8
|
+
*/
|
|
9
|
+
export type RunwayOptions = Readonly<{
|
|
10
|
+
gap: SoftStr;
|
|
11
|
+
lastFallback: SoftStr;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* The UNBOUNDED-DEPTH HORIZONTAL RUNWAY as a declared
|
|
15
|
+
* framework capability.
|
|
16
|
+
*
|
|
17
|
+
* The framework's own multi-column chrome ({@link chromeCss})
|
|
18
|
+
* only scrolls the strip BELOW the `snap` breakpoint — above
|
|
19
|
+
* it a column strip is expected to fit, so the row is
|
|
20
|
+
* `overflow:hidden`. An app whose column recursion is
|
|
21
|
+
* UNBOUNDED (the reference's central claim: the strip
|
|
22
|
+
* expanding rightward with the body/top-bar width invariant,
|
|
23
|
+
* "depth does not consume the viewport") needs the strip to
|
|
24
|
+
* scroll at EVERY width, plus a trailing runway so the last —
|
|
25
|
+
* content-width — column can still slide to the left edge.
|
|
26
|
+
* The reference used to hand-write this as app-owned `pm-row`
|
|
27
|
+
* overrides; it is now this capability, which the reference
|
|
28
|
+
* merely enables.
|
|
29
|
+
*
|
|
30
|
+
* Emitted (in the theme's namespace, `pm` by default):
|
|
31
|
+
* - `.<p>-row` scrolls horizontally at every width, laid out
|
|
32
|
+
* to fill its flex parent, its gap published as an internal
|
|
33
|
+
* `--<p>-runway-gap` custom property; and
|
|
34
|
+
* - a `min-width:snap` trailing `::after` FLEX SPACER (never
|
|
35
|
+
* a margin — unreliably counted in a flex scroll container's
|
|
36
|
+
* scroll width) sized `calc(100% - <last> - <gap>)`, one
|
|
37
|
+
* column short of the strip so the last column rests at the
|
|
38
|
+
* left edge with the runway filling the rest. `<last>` is
|
|
39
|
+
* read from `--<p>-runway-last`, which {@link advanceColumns}
|
|
40
|
+
* publishes from its measurement, falling back to
|
|
41
|
+
* {@link RunwayOptions.lastFallback} until the first paint
|
|
42
|
+
* measures it.
|
|
43
|
+
*
|
|
44
|
+
* Escape-safe (no `<`,`>`,`&`) and injected AFTER
|
|
45
|
+
* {@link chromeCss} so the every-width scroll wins the
|
|
46
|
+
* cascade over the framework's above-`snap` `overflow:hidden`
|
|
47
|
+
* at equal specificity. Curried `runwayCss(theme)(opts)`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const runwayCss: (theme: Theme) => (opts: RunwayOptions) => SoftStr;
|
|
50
|
+
//# sourceMappingURL=runwayCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runwayCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/runwayCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGzD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,GAAG,EAAE,OAAO,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,SAAS,UACZ,KAAK,YACN,aAAa,KAAG,OAQtB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
import { type Palette } from "../model/palette";
|
|
3
|
+
import { type Theme } from "../model/theme";
|
|
4
|
+
/**
|
|
5
|
+
* The engine's base color stylesheet for a {@link Theme}:
|
|
6
|
+
* the light scheme on `:root` and the dark override under
|
|
7
|
+
* `html.dark`, toggled by one `dark` class. `html.dark` is
|
|
8
|
+
* the single published scheme mechanism (no attribute
|
|
9
|
+
* variants). Escape-safe (no `<`, `>`, `&`) so it survives
|
|
10
|
+
* an SSR text escaper byte-for-byte. Inject ahead of the
|
|
11
|
+
* collected atomic rules so the custom properties are
|
|
12
|
+
* defined before any `var(--<prefix>-*)` resolves. The
|
|
13
|
+
* consumer passes its theme (`schemeCss(defaultTheme)` for
|
|
14
|
+
* the monochrome default) at its composition root.
|
|
15
|
+
*/
|
|
16
|
+
export declare const schemeCss: (theme: Theme) => SoftStr;
|
|
17
|
+
/**
|
|
18
|
+
* Scheme CSS for a bare palette under the default prefix —
|
|
19
|
+
* the palette-override convenience: `schemeCssOf(palette)`
|
|
20
|
+
* is `schemeCss` over the default theme with `palette`
|
|
21
|
+
* swapped in, so an override that only changes colors need
|
|
22
|
+
* not build a whole {@link Theme}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const schemeCssOf: (palette: Palette) => SoftStr;
|
|
25
|
+
//# sourceMappingURL=schemeCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemeCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/schemeCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,KAAK,EAEX,MAAM,6BAA6B,CAAC;AAsBrC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,UACb,KAAK,KACX,OACkH,CAAC;AAEtH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YACb,OAAO,KACf,OACsC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type SoftStr, type Option, type Result, type InvalidError } from "plgg";
|
|
2
|
+
import { type Theme } from "../model/theme";
|
|
3
|
+
import { type ComponentSlot } from "../model/componentSlot";
|
|
4
|
+
/**
|
|
5
|
+
* A CONSUMER'S RESTYLE of one framework component slot,
|
|
6
|
+
* expressed as data instead of a hand-written `pm-*` rule.
|
|
7
|
+
*
|
|
8
|
+
* The framework owns the component selector (the `slot`,
|
|
9
|
+
* resolved through {@link slotSelector}); the consumer
|
|
10
|
+
* supplies only its OWN context and the declarations:
|
|
11
|
+
*
|
|
12
|
+
* - `scope` — an optional leading selector the consumer
|
|
13
|
+
* owns (`.bo-results`), narrowing the override to a
|
|
14
|
+
* context; emitted as `<scope> <slotSelector>…`.
|
|
15
|
+
* - `state` — an optional pseudo/attribute suffix on the
|
|
16
|
+
* component (`:hover`, `[aria-current="page"]`).
|
|
17
|
+
* - `within` — an optional trailing consumer descendant
|
|
18
|
+
* (`.bo-result-meta`), emitted after the component.
|
|
19
|
+
* - `declarations` — the CSS body (no braces).
|
|
20
|
+
*
|
|
21
|
+
* The consumer never writes a `pm-*` class string — that is
|
|
22
|
+
* the by-name coupling this layer removes. {@link slotStyle}
|
|
23
|
+
* builds one from trusted composition; {@link asSlotStyle}
|
|
24
|
+
* validates untrusted (config-borne) input the same way
|
|
25
|
+
* {@link asPalette} validates a palette.
|
|
26
|
+
*/
|
|
27
|
+
export type SlotStyle = Readonly<{
|
|
28
|
+
slot: ComponentSlot;
|
|
29
|
+
scope: Option<SoftStr>;
|
|
30
|
+
state: Option<SoftStr>;
|
|
31
|
+
within: Option<SoftStr>;
|
|
32
|
+
declarations: SoftStr;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Build a {@link SlotStyle} from trusted composition — the
|
|
36
|
+
* constructor a consumer's own stylesheet uses. Optional
|
|
37
|
+
* context fields are read at this builder boundary and
|
|
38
|
+
* lifted into `Option` (the domain never carries
|
|
39
|
+
* `undefined`).
|
|
40
|
+
*/
|
|
41
|
+
export declare const slotStyle: (spec: Readonly<{
|
|
42
|
+
slot: ComponentSlot;
|
|
43
|
+
declarations: SoftStr;
|
|
44
|
+
scope?: SoftStr;
|
|
45
|
+
state?: SoftStr;
|
|
46
|
+
within?: SoftStr;
|
|
47
|
+
}>) => SlotStyle;
|
|
48
|
+
/**
|
|
49
|
+
* Validate an unknown value (config-borne) as a
|
|
50
|
+
* {@link SlotStyle}: the `slot` must be a declared
|
|
51
|
+
* {@link ComponentSlot}, the `declarations` a non-empty
|
|
52
|
+
* escape-safe string, and each optional context field
|
|
53
|
+
* escape-safe when present. Validates SHAPE — a first
|
|
54
|
+
* failing field wins and names itself, the {@link asPalette}
|
|
55
|
+
* pattern.
|
|
56
|
+
*/
|
|
57
|
+
export declare const asSlotStyle: (value: unknown) => Result<SlotStyle, InvalidError>;
|
|
58
|
+
/**
|
|
59
|
+
* Emit one {@link SlotStyle} as a CSS rule, resolving its
|
|
60
|
+
* slot to the framework selector in the supplied theme's
|
|
61
|
+
* namespace. Curried `slotStyleCss(theme)(style)`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const slotStyleCss: (theme: Theme) => (style: SlotStyle) => SoftStr;
|
|
64
|
+
/**
|
|
65
|
+
* Emit a theme's per-component slot overrides as one CSS
|
|
66
|
+
* block, in order. Injected AFTER {@link chromeCss} so the
|
|
67
|
+
* consumer's declarations win the cascade over the
|
|
68
|
+
* framework defaults at equal specificity. Empty (the
|
|
69
|
+
* default theme carries no slots) emits nothing, so the
|
|
70
|
+
* zero-config chrome is byte-unchanged.
|
|
71
|
+
*/
|
|
72
|
+
export declare const slotCss: (theme: Theme) => SoftStr;
|
|
73
|
+
//# sourceMappingURL=slotCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slotCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/slotCss.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EASlB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,SACd,QAAQ,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,KACD,SAMD,CAAC;AAwCH;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,UACf,OAAO,KACb,MAAM,CAAC,SAAS,EAAE,YAAY,CAmDhC,CAAC;AA0BF;;;;GAIG;AACH,eAAO,MAAM,YAAY,UACf,KAAK,aACL,SAAS,KAAG,OACsH,CAAC;AAE7I;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,UAAW,KAAK,KAAG,OACQ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type SoftStr } from "plgg";
|
|
2
|
+
import { type Theme } from "../model/theme";
|
|
3
|
+
/**
|
|
4
|
+
* The engine's syntax-highlight stylesheet for a
|
|
5
|
+
* {@link Theme}: the `--<prefix>-code-*` properties on
|
|
6
|
+
* `:root` (light) with the `html.dark` override, followed
|
|
7
|
+
* by the `.tok-*` class rules. Self-contained (defines the
|
|
8
|
+
* properties it references) and escape-safe (no `<`, `>`,
|
|
9
|
+
* `&`) so it survives an SSR text escaper byte-for-byte; a
|
|
10
|
+
* host composes it into the document `<style>` alongside
|
|
11
|
+
* `schemeCss`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const syntaxCss: (theme: Theme) => SoftStr;
|
|
14
|
+
//# sourceMappingURL=syntaxCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntaxCss.d.ts","sourceRoot":"","sources":["../../../src/Style/usecase/syntaxCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAQpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAsCzD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,UACb,KAAK,KACX,OAEc,CAAC"}
|