@caelo-cms/shared 0.10.22 → 0.10.24
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/dist/ai-tools.d.ts +289 -273
- package/dist/ai-tools.d.ts.map +1 -1
- package/dist/ai-tools.js +342 -323
- package/dist/ai-tools.js.map +1 -1
- package/dist/auth-forms.d.ts.map +1 -1
- package/dist/auth-forms.js +4 -1
- package/dist/auth-forms.js.map +1 -1
- package/dist/base-css.d.ts +35 -0
- package/dist/base-css.d.ts.map +1 -0
- package/dist/base-css.js +40 -0
- package/dist/base-css.js.map +1 -0
- package/dist/build-page.d.ts +330 -0
- package/dist/build-page.d.ts.map +1 -0
- package/dist/build-page.js +282 -0
- package/dist/build-page.js.map +1 -0
- package/dist/content.d.ts +322 -9
- package/dist/content.d.ts.map +1 -1
- package/dist/content.js +354 -11
- package/dist/content.js.map +1 -1
- package/dist/css-gradient-scan.d.ts +14 -0
- package/dist/css-gradient-scan.d.ts.map +1 -0
- package/dist/css-gradient-scan.js +81 -0
- package/dist/css-gradient-scan.js.map +1 -0
- package/dist/css-var-scan.d.ts +56 -0
- package/dist/css-var-scan.d.ts.map +1 -0
- package/dist/css-var-scan.js +97 -0
- package/dist/css-var-scan.js.map +1 -0
- package/dist/design-draft-shell.d.ts +21 -0
- package/dist/design-draft-shell.d.ts.map +1 -0
- package/dist/design-draft-shell.js +81 -0
- package/dist/design-draft-shell.js.map +1 -0
- package/dist/design-manifest.d.ts +36 -0
- package/dist/design-manifest.d.ts.map +1 -0
- package/dist/design-manifest.js +90 -0
- package/dist/design-manifest.js.map +1 -0
- package/dist/fonts.d.ts +89 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +241 -0
- package/dist/fonts.js.map +1 -0
- package/dist/genesis-inventory.d.ts +32 -0
- package/dist/genesis-inventory.d.ts.map +1 -0
- package/dist/genesis-inventory.js +186 -0
- package/dist/genesis-inventory.js.map +1 -0
- package/dist/genesis.d.ts +102 -0
- package/dist/genesis.d.ts.map +1 -0
- package/dist/genesis.js +145 -0
- package/dist/genesis.js.map +1 -0
- package/dist/i18n.d.ts +29 -36
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +53 -128
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/dist/interactions.d.ts +23 -0
- package/dist/interactions.d.ts.map +1 -0
- package/dist/interactions.js +44 -0
- package/dist/interactions.js.map +1 -0
- package/dist/media.d.ts +101 -16
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +126 -15
- package/dist/media.js.map +1 -1
- package/dist/page-log.d.ts +94 -0
- package/dist/page-log.d.ts.map +1 -0
- package/dist/page-log.js +111 -0
- package/dist/page-log.js.map +1 -0
- package/dist/preview-compose.d.ts +85 -12
- package/dist/preview-compose.d.ts.map +1 -1
- package/dist/preview-compose.js +157 -67
- package/dist/preview-compose.js.map +1 -1
- package/dist/proposal-status.d.ts +40 -0
- package/dist/proposal-status.d.ts.map +1 -0
- package/dist/proposal-status.js +34 -0
- package/dist/proposal-status.js.map +1 -0
- package/dist/responsive-images.d.ts +64 -0
- package/dist/responsive-images.d.ts.map +1 -0
- package/dist/responsive-images.js +98 -0
- package/dist/responsive-images.js.map +1 -0
- package/dist/safe-keys.d.ts +9 -0
- package/dist/safe-keys.d.ts.map +1 -0
- package/dist/safe-keys.js +20 -0
- package/dist/safe-keys.js.map +1 -0
- package/dist/seo.d.ts +11 -16
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +7 -23
- package/dist/seo.js.map +1 -1
- package/dist/skills.d.ts +14 -68
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +19 -113
- package/dist/skills.js.map +1 -1
- package/dist/strip-cdata.d.ts +7 -0
- package/dist/strip-cdata.d.ts.map +1 -0
- package/dist/strip-cdata.js +48 -0
- package/dist/strip-cdata.js.map +1 -0
- package/dist/structured-sets.d.ts +6 -52
- package/dist/structured-sets.d.ts.map +1 -1
- package/dist/structured-sets.js +6 -68
- package/dist/structured-sets.js.map +1 -1
- package/dist/subagents.d.ts +105 -3
- package/dist/subagents.d.ts.map +1 -1
- package/dist/subagents.js +224 -41
- package/dist/subagents.js.map +1 -1
- package/dist/template-engine.d.ts +85 -0
- package/dist/template-engine.d.ts.map +1 -0
- package/dist/template-engine.js +403 -0
- package/dist/template-engine.js.map +1 -0
- package/dist/theme-importers/auto-detect.d.ts +26 -0
- package/dist/theme-importers/auto-detect.d.ts.map +1 -0
- package/dist/theme-importers/auto-detect.js +42 -0
- package/dist/theme-importers/auto-detect.js.map +1 -0
- package/dist/theme-importers/css-comments.d.ts +12 -0
- package/dist/theme-importers/css-comments.d.ts.map +1 -0
- package/dist/theme-importers/css-comments.js +15 -0
- package/dist/theme-importers/css-comments.js.map +1 -0
- package/dist/theme-importers/dtcg.d.ts +46 -0
- package/dist/theme-importers/dtcg.d.ts.map +1 -0
- package/dist/theme-importers/dtcg.js +111 -0
- package/dist/theme-importers/dtcg.js.map +1 -0
- package/dist/theme-importers/loose.d.ts +3 -0
- package/dist/theme-importers/loose.d.ts.map +1 -0
- package/dist/theme-importers/loose.js +76 -0
- package/dist/theme-importers/loose.js.map +1 -0
- package/dist/theme-importers/shadcn.d.ts +24 -0
- package/dist/theme-importers/shadcn.d.ts.map +1 -0
- package/dist/theme-importers/shadcn.js +135 -0
- package/dist/theme-importers/shadcn.js.map +1 -0
- package/dist/theme-importers/style-dictionary.d.ts +17 -0
- package/dist/theme-importers/style-dictionary.d.ts.map +1 -0
- package/dist/theme-importers/style-dictionary.js +125 -0
- package/dist/theme-importers/style-dictionary.js.map +1 -0
- package/dist/theme-importers/tailwind.d.ts +3 -0
- package/dist/theme-importers/tailwind.d.ts.map +1 -0
- package/dist/theme-importers/tailwind.js +218 -0
- package/dist/theme-importers/tailwind.js.map +1 -0
- package/dist/theme-literal-binding.d.ts +37 -0
- package/dist/theme-literal-binding.d.ts.map +1 -0
- package/dist/theme-literal-binding.js +138 -0
- package/dist/theme-literal-binding.js.map +1 -0
- package/dist/theme-normalize.d.ts +31 -0
- package/dist/theme-normalize.d.ts.map +1 -0
- package/dist/theme-normalize.js +587 -0
- package/dist/theme-normalize.js.map +1 -0
- package/dist/theme-ramp.d.ts +55 -0
- package/dist/theme-ramp.d.ts.map +1 -0
- package/dist/theme-ramp.js +149 -0
- package/dist/theme-ramp.js.map +1 -0
- package/dist/theme-render.d.ts +105 -0
- package/dist/theme-render.d.ts.map +1 -0
- package/dist/theme-render.js +441 -0
- package/dist/theme-render.js.map +1 -0
- package/dist/themes-errors.d.ts +109 -0
- package/dist/themes-errors.d.ts.map +1 -0
- package/dist/themes-errors.js +170 -0
- package/dist/themes-errors.js.map +1 -0
- package/dist/themes.d.ts +343 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +697 -0
- package/dist/themes.js.map +1 -0
- package/dist/version.d.ts +7 -4
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +6 -3
- package/dist/version.js.map +1 -1
- package/package.json +10 -2
- package/src/__tests__/redos-hardening.test.ts +160 -0
- package/src/ai-tools-add-module-modes.test.ts +106 -0
- package/src/ai-tools-position.test.ts +134 -0
- package/src/ai-tools.test.ts +81 -0
- package/src/ai-tools.ts +1105 -0
- package/src/auth-forms.ts +36 -0
- package/src/base-css.ts +42 -0
- package/src/build-page.test.ts +228 -0
- package/src/build-page.ts +319 -0
- package/src/cap-failures.ts +67 -0
- package/src/content.test.ts +170 -0
- package/src/content.ts +620 -0
- package/src/context.ts +43 -0
- package/src/css-gradient-scan.ts +88 -0
- package/src/css-var-scan.test.ts +96 -0
- package/src/css-var-scan.ts +144 -0
- package/src/derive-module-type.test.ts +80 -0
- package/src/design-draft-shell.test.ts +85 -0
- package/src/design-draft-shell.ts +109 -0
- package/src/design-manifest.ts +93 -0
- package/src/fonts.test.ts +157 -0
- package/src/fonts.ts +296 -0
- package/src/genesis-inventory.test.ts +86 -0
- package/src/genesis-inventory.ts +215 -0
- package/src/genesis-sanitize.test.ts +35 -0
- package/src/genesis.ts +158 -0
- package/src/i18n.test.ts +58 -0
- package/src/i18n.ts +91 -0
- package/src/index.test.ts +10 -0
- package/src/index.ts +59 -0
- package/src/interactions.ts +48 -0
- package/src/logger.ts +147 -0
- package/src/media.test.ts +160 -0
- package/src/media.ts +355 -0
- package/src/page-log.test.ts +163 -0
- package/src/page-log.ts +124 -0
- package/src/preview-compose.test.ts +637 -0
- package/src/preview-compose.ts +656 -0
- package/src/preview-scanner.test.ts +96 -0
- package/src/preview-scanner.ts +214 -0
- package/src/proposal-status.test.ts +69 -0
- package/src/proposal-status.ts +40 -0
- package/src/responsive-images.test.ts +104 -0
- package/src/responsive-images.ts +151 -0
- package/src/result.ts +29 -0
- package/src/safe-keys.ts +21 -0
- package/src/seo.test.ts +194 -0
- package/src/seo.ts +233 -0
- package/src/skills.ts +48 -0
- package/src/snapshots.test.ts +80 -0
- package/src/snapshots.ts +81 -0
- package/src/strip-cdata.test.ts +41 -0
- package/src/strip-cdata.ts +50 -0
- package/src/structured-sets.ts +114 -0
- package/src/subagents.test.ts +262 -0
- package/src/subagents.ts +432 -0
- package/src/template-engine.test.ts +379 -0
- package/src/template-engine.ts +520 -0
- package/src/theme-gradient.test.ts +92 -0
- package/src/theme-importers/__tests__/proto-pollution.test.ts +54 -0
- package/src/theme-importers/auto-detect.ts +84 -0
- package/src/theme-importers/css-comments.ts +15 -0
- package/src/theme-importers/dtcg.ts +106 -0
- package/src/theme-importers/loose.ts +76 -0
- package/src/theme-importers/shadcn.ts +133 -0
- package/src/theme-importers/style-dictionary.ts +125 -0
- package/src/theme-importers/tailwind.ts +217 -0
- package/src/theme-literal-binding.test.ts +71 -0
- package/src/theme-literal-binding.ts +159 -0
- package/src/theme-motion.test.ts +115 -0
- package/src/theme-normalize-envelope.test.ts +43 -0
- package/src/theme-normalize-gradient.test.ts +135 -0
- package/src/theme-normalize.ts +661 -0
- package/src/theme-ramp.ts +187 -0
- package/src/theme-render-sanitize.test.ts +45 -0
- package/src/theme-render.test.ts +119 -0
- package/src/theme-render.ts +487 -0
- package/src/theme-shadow.test.ts +56 -0
- package/src/themes-errors.ts +199 -0
- package/src/themes.ts +842 -0
- package/src/version.ts +66 -0
- package/dist/translation.d.ts +0 -127
- package/dist/translation.d.ts.map +0 -1
- package/dist/translation.js +0 -208
- package/dist/translation.js.map +0 -1
package/dist/content.js
CHANGED
|
@@ -13,6 +13,60 @@ import { z } from "zod";
|
|
|
13
13
|
export const slugSchema = z
|
|
14
14
|
.string()
|
|
15
15
|
.regex(/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/, "slug must be lowercase letters, digits, or hyphens (1–64 chars, no leading/trailing hyphen)");
|
|
16
|
+
/**
|
|
17
|
+
* v0.12.3 (issue #106) — derive a module's stable `type` from its
|
|
18
|
+
* displayName. The `type` is the semantic class of a module (`button`,
|
|
19
|
+
* `hero`, `pricing-card`) shared by every instance of that class — it is
|
|
20
|
+
* what a parent module's `allowedModuleTypes` whitelist matches against.
|
|
21
|
+
*
|
|
22
|
+
* This is the slug *base* WITHOUT the `-<timestamp>` uniqueness suffix
|
|
23
|
+
* that `slugify()` appends: a module's `slug` is its unique row identity
|
|
24
|
+
* (`button-mpqxq3ch`), its `type` is the reusable class (`button`). The
|
|
25
|
+
* tool-side `slugify` composes as `deriveModuleType(name) + "-" + suffix`
|
|
26
|
+
* so the two can never diverge.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors `slugify`'s normalization (lowercase, non-alphanumerics → single
|
|
29
|
+
* hyphen, trim hyphens, 40-char cap, `"module"` stem fallback) so a
|
|
30
|
+
* round-trip is predictable.
|
|
31
|
+
*/
|
|
32
|
+
export function deriveModuleType(displayName) {
|
|
33
|
+
const base = displayName
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
// Collapse every run of non-alphanumerics to a SINGLE hyphen first, so the
|
|
36
|
+
// string can never contain consecutive hyphens after this point.
|
|
37
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
38
|
+
// Cap BEFORE trimming the edge hyphen — trimming first then slicing could
|
|
39
|
+
// truncate mid-token and leave a trailing hyphen (e.g. the 40th char is a
|
|
40
|
+
// hyphen), which would make `slug = type + "-" + suffix` double-hyphenate.
|
|
41
|
+
.slice(0, 40)
|
|
42
|
+
// Trim a single leading/trailing hyphen. `^-|-$` (not `^-+|-+$`) is both
|
|
43
|
+
// sufficient — the collapse above guarantees no `--` runs — and free of the
|
|
44
|
+
// polynomial backtracking CodeQL flags on `-+$` over uncontrolled input.
|
|
45
|
+
.replace(/^-|-$/g, "");
|
|
46
|
+
return base.length > 0 ? base : "module";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* v0.12.3 (issue #106) — mint a unique module slug from a displayName:
|
|
50
|
+
* the stable `type` base (`deriveModuleType`) + a base36 timestamp
|
|
51
|
+
* suffix. Because the slug is always `type + "-" + suffix`, a module's
|
|
52
|
+
* `type` is guaranteed to be a prefix of its `slug` — the two can never
|
|
53
|
+
* drift. Shared by every module-minting AI tool so the rule lives in one
|
|
54
|
+
* place.
|
|
55
|
+
*
|
|
56
|
+
* @param suffix - override the uniqueness suffix (defaults to a base36
|
|
57
|
+
* timestamp). Pass a stable value in tests for determinism.
|
|
58
|
+
*/
|
|
59
|
+
export function slugifyModuleName(displayName, suffix = Date.now().toString(36)) {
|
|
60
|
+
return `${deriveModuleType(displayName)}-${suffix}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* v0.12.3 (issue #106) — slug for a module minted per page-section
|
|
64
|
+
* (`build_page` / legacy compose). Includes the section index so two sections
|
|
65
|
+
* sharing a displayName don't collide on the unique slug constraint.
|
|
66
|
+
*/
|
|
67
|
+
export function slugifyModuleSection(displayName, idx, suffix = Date.now().toString(36)) {
|
|
68
|
+
return `${deriveModuleType(displayName)}-${idx}-${suffix}`;
|
|
69
|
+
}
|
|
16
70
|
/** BCP-47 shape: 2-letter language with optional 2-letter region. P9 widens this. */
|
|
17
71
|
export const localeSchema = z
|
|
18
72
|
.string()
|
|
@@ -30,9 +84,26 @@ const moduleJs = z.string().max(MODULE_JS_MAX, `js exceeds ${MODULE_JS_MAX} byte
|
|
|
30
84
|
/**
|
|
31
85
|
* v0.4.0 — module field schema. Each field declares one substitution slot in
|
|
32
86
|
* the module's templated HTML (`{{fieldName}}`) and the kind of content it
|
|
33
|
-
* holds. Field values live on each page placement in
|
|
87
|
+
* holds. Field values live on each page placement (v0.4.0: in
|
|
88
|
+
* `page_module_content.content_values`; v0.12.0 onward: in
|
|
89
|
+
* `content_instances.values`).
|
|
90
|
+
*
|
|
91
|
+
* v0.12.0 — extended to nine kinds. Primitive kinds (text/richtext/url/
|
|
92
|
+
* image/number/boolean/link) substitute via `{{fieldName}}` placeholders.
|
|
93
|
+
* The two new nested kinds reference another module by id + content_instance:
|
|
94
|
+
*
|
|
95
|
+
* - `module` — single nested module reference. HTML slot syntax: `{{>fieldName}}`.
|
|
96
|
+
* Value shape: `{ moduleId, contentInstanceId }`.
|
|
97
|
+
* - `module-list` — ordered array of nested module references. HTML slot
|
|
98
|
+
* syntax: `{{#fieldName}}…inner…{{/fieldName}}` — `inner` renders once
|
|
99
|
+
* per element. Value shape: `Array<{ moduleId, contentInstanceId }>`.
|
|
100
|
+
*
|
|
101
|
+
* Schema is a discriminated union by `kind` so the validator rejects, e.g., a
|
|
102
|
+
* `text` kind that carries `allowedModuleTypes` (which only nested kinds use)
|
|
103
|
+
* or a `module-list` that carries a `default` (nested kinds populate from
|
|
104
|
+
* referenced content_instances, not from defaults).
|
|
34
105
|
*/
|
|
35
|
-
export const
|
|
106
|
+
export const MODULE_FIELD_PRIMITIVE_KINDS = [
|
|
36
107
|
"text",
|
|
37
108
|
"richtext",
|
|
38
109
|
"url",
|
|
@@ -41,17 +112,133 @@ export const MODULE_FIELD_KINDS = [
|
|
|
41
112
|
"boolean",
|
|
42
113
|
"link",
|
|
43
114
|
];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
115
|
+
/**
|
|
116
|
+
* v0.12.0 — list-of-primitive field kinds. The grammar mirrors
|
|
117
|
+
* `module-list`'s `{{#field}}{{/field}}` iteration but the elements
|
|
118
|
+
* are primitives (or a fixed {label,href} pair for link-list), not
|
|
119
|
+
* `{moduleId, contentInstanceId}` refs.
|
|
120
|
+
*
|
|
121
|
+
* Use `text-list` for "list of strings" — menu labels, tag chips,
|
|
122
|
+
* bullet points where each item is just text. Inner template
|
|
123
|
+
* references `{{.}}` (Mustache convention) or `{{item}}` to mean
|
|
124
|
+
* the current element.
|
|
125
|
+
*
|
|
126
|
+
* Use `link-list` for "list of links" — primary nav, footer columns,
|
|
127
|
+
* sidebar menus. Each element is `{href, label}`. Inner template
|
|
128
|
+
* uses `{{href}}` + `{{label}}` per iteration.
|
|
129
|
+
*
|
|
130
|
+
* For lists with richer per-item structure (cards with image + title
|
|
131
|
+
* + body + CTA), use `module-list` pointing at a sub-module — that's
|
|
132
|
+
* what nested modules are for.
|
|
133
|
+
*/
|
|
134
|
+
export const MODULE_FIELD_LIST_KINDS = ["text-list", "link-list"];
|
|
135
|
+
export const MODULE_FIELD_NESTED_KINDS = ["module", "module-list"];
|
|
136
|
+
/** All eleven v0.12.0 kinds. */
|
|
137
|
+
export const MODULE_FIELD_KINDS = [
|
|
138
|
+
...MODULE_FIELD_PRIMITIVE_KINDS,
|
|
139
|
+
...MODULE_FIELD_LIST_KINDS,
|
|
140
|
+
...MODULE_FIELD_NESTED_KINDS,
|
|
141
|
+
];
|
|
142
|
+
/**
|
|
143
|
+
* Field kinds the shared template engine iterates via the
|
|
144
|
+
* `{{#name}}…{{/name}}` Mustache-section operator. Adding a new
|
|
145
|
+
* list-shaped kind to MODULE_FIELD_LIST_KINDS / MODULE_FIELD_NESTED_KINDS
|
|
146
|
+
* automatically extends this set; the engine's section-dispatch branch
|
|
147
|
+
* keys off it (`packages/shared/src/template-engine.ts`).
|
|
148
|
+
*/
|
|
149
|
+
export const MODULE_FIELD_SECTION_KINDS = [...MODULE_FIELD_LIST_KINDS, "module-list"];
|
|
150
|
+
const moduleFieldName = z.string().regex(/^[a-z][a-z0-9_]{0,63}$/, "name must be snake_case");
|
|
151
|
+
const moduleFieldLabel = z.string().min(1).max(128);
|
|
152
|
+
const moduleFieldPrimitiveSchema = z
|
|
153
|
+
.object({
|
|
154
|
+
name: moduleFieldName,
|
|
155
|
+
kind: z.enum(MODULE_FIELD_PRIMITIVE_KINDS),
|
|
156
|
+
label: moduleFieldLabel,
|
|
157
|
+
/** Default value used when a placement's content_instance has no override. */
|
|
52
158
|
default: z.unknown().optional(),
|
|
53
159
|
})
|
|
54
160
|
.strict();
|
|
161
|
+
const moduleFieldModuleSchema = z
|
|
162
|
+
.object({
|
|
163
|
+
name: moduleFieldName,
|
|
164
|
+
kind: z.literal("module"),
|
|
165
|
+
label: moduleFieldLabel,
|
|
166
|
+
/**
|
|
167
|
+
* Optional whitelist of module *types* that may fill this slot (the
|
|
168
|
+
* stable `modules.type` class, e.g. `button` — NOT the unique
|
|
169
|
+
* `modules.slug` like `button-mpqxq3ch`). When absent, any module is
|
|
170
|
+
* permitted. The op-layer validator enforces the whitelist against
|
|
171
|
+
* the referenced module's `type` at `set_content_instance_values`
|
|
172
|
+
* time. v0.12.3 (issue #106) renamed this from `allowedModuleSlugs`:
|
|
173
|
+
* an exact-slug whitelist could never match an AI-minted module
|
|
174
|
+
* because every minted slug carries a uniqueness suffix.
|
|
175
|
+
*/
|
|
176
|
+
allowedModuleTypes: z.array(slugSchema).max(32).optional(),
|
|
177
|
+
})
|
|
178
|
+
.strict();
|
|
179
|
+
const moduleFieldModuleListSchema = z
|
|
180
|
+
.object({
|
|
181
|
+
name: moduleFieldName,
|
|
182
|
+
kind: z.literal("module-list"),
|
|
183
|
+
label: moduleFieldLabel,
|
|
184
|
+
/** v0.12.3 (issue #106) — whitelist of stable module `type`s (not
|
|
185
|
+
* unique slugs). See `moduleFieldModuleSchema.allowedModuleTypes`. */
|
|
186
|
+
allowedModuleTypes: z.array(slugSchema).max(32).optional(),
|
|
187
|
+
/** Minimum count of elements. Validator enforces at write time. */
|
|
188
|
+
min: z.number().int().nonnegative().optional(),
|
|
189
|
+
/** Maximum count of elements. Validator enforces at write time. */
|
|
190
|
+
max: z.number().int().positive().max(256).optional(),
|
|
191
|
+
})
|
|
192
|
+
.strict();
|
|
193
|
+
/**
|
|
194
|
+
* v0.12.0 — list-of-strings field. Inner template uses `{{.}}` (or
|
|
195
|
+
* the alias `{{item}}`) to reference the current element. Default
|
|
196
|
+
* is an optional array of strings rendered when the placement's
|
|
197
|
+
* content_instance has no override.
|
|
198
|
+
*/
|
|
199
|
+
const moduleFieldTextListSchema = z
|
|
200
|
+
.object({
|
|
201
|
+
name: moduleFieldName,
|
|
202
|
+
kind: z.literal("text-list"),
|
|
203
|
+
label: moduleFieldLabel,
|
|
204
|
+
min: z.number().int().nonnegative().optional(),
|
|
205
|
+
max: z.number().int().positive().max(256).optional(),
|
|
206
|
+
default: z.array(z.string()).optional(),
|
|
207
|
+
})
|
|
208
|
+
.strict();
|
|
209
|
+
/**
|
|
210
|
+
* v0.12.0 — list-of-{label,href} field. Inner template uses
|
|
211
|
+
* `{{label}}` + `{{href}}` per iteration. Targets the common
|
|
212
|
+
* primary-nav / footer-column / sidebar-menu pattern without
|
|
213
|
+
* forcing a sub-module per link.
|
|
214
|
+
*/
|
|
215
|
+
const moduleFieldLinkListSchema = z
|
|
216
|
+
.object({
|
|
217
|
+
name: moduleFieldName,
|
|
218
|
+
kind: z.literal("link-list"),
|
|
219
|
+
label: moduleFieldLabel,
|
|
220
|
+
min: z.number().int().nonnegative().optional(),
|
|
221
|
+
max: z.number().int().positive().max(256).optional(),
|
|
222
|
+
default: z.array(z.object({ label: z.string(), href: z.string() }).strict()).optional(),
|
|
223
|
+
})
|
|
224
|
+
.strict();
|
|
225
|
+
export const moduleFieldSchema = z.discriminatedUnion("kind", [
|
|
226
|
+
moduleFieldPrimitiveSchema,
|
|
227
|
+
moduleFieldTextListSchema,
|
|
228
|
+
moduleFieldLinkListSchema,
|
|
229
|
+
moduleFieldModuleSchema,
|
|
230
|
+
moduleFieldModuleListSchema,
|
|
231
|
+
]);
|
|
232
|
+
/**
|
|
233
|
+
* The shape of a single nested-module reference inside `content_instances.values`
|
|
234
|
+
* when the field's kind is `module` or — repeated inside an array — `module-list`.
|
|
235
|
+
*/
|
|
236
|
+
export const moduleRefSchema = z
|
|
237
|
+
.object({
|
|
238
|
+
moduleId: z.string().uuid(),
|
|
239
|
+
contentInstanceId: z.string().uuid(),
|
|
240
|
+
})
|
|
241
|
+
.strict();
|
|
55
242
|
const moduleFieldsArray = z
|
|
56
243
|
.array(moduleFieldSchema)
|
|
57
244
|
.max(64, "modules may declare at most 64 fields")
|
|
@@ -65,10 +252,36 @@ const moduleFieldsArray = z
|
|
|
65
252
|
seen.add(f.name);
|
|
66
253
|
}
|
|
67
254
|
});
|
|
255
|
+
/**
|
|
256
|
+
* v0.12.0 — coarse role tag for the AI's `## Modules` catalog block.
|
|
257
|
+
* Constrained by `modules_kind_check` in migration 0095. Adding a
|
|
258
|
+
* new kind means: (1) bump the SQL CHECK, (2) update this schema,
|
|
259
|
+
* (3) update formatModulesBlock so the AI knows when to use it.
|
|
260
|
+
*/
|
|
261
|
+
export const MODULE_KINDS = ["chrome", "hero", "content", "cta", "utility"];
|
|
262
|
+
export const moduleKindSchema = z.enum(MODULE_KINDS);
|
|
263
|
+
/**
|
|
264
|
+
* v0.12.0 — description is `.default("")` at the Zod boundary so the
|
|
265
|
+
* 82+ legacy callers in tests/seed scripts keep working unchanged.
|
|
266
|
+
* AI tool descriptions (create_module / edit_module) require the AI
|
|
267
|
+
* to supply a real description explicitly — see CLAUDE.md §1A.
|
|
268
|
+
*/
|
|
269
|
+
const moduleDescription = z.string().max(1000);
|
|
68
270
|
export const moduleCreateSchema = z
|
|
69
271
|
.object({
|
|
70
272
|
slug: slugSchema,
|
|
71
273
|
displayName: displayNameSchema,
|
|
274
|
+
description: moduleDescription.default(""),
|
|
275
|
+
kind: moduleKindSchema.default("content"),
|
|
276
|
+
/**
|
|
277
|
+
* v0.12.3 (issue #106) — stable semantic class shared by every
|
|
278
|
+
* instance of this module (`button`, `pricing-card`). What a parent
|
|
279
|
+
* module's `allowedModuleTypes` whitelist matches against. Optional:
|
|
280
|
+
* when omitted, `modules.create` derives it from `displayName` via
|
|
281
|
+
* `deriveModuleType()`. Pass it explicitly to reuse an existing
|
|
282
|
+
* class (e.g. a second `button` variant should share `type: "button"`).
|
|
283
|
+
*/
|
|
284
|
+
type: slugSchema.optional(),
|
|
72
285
|
html: moduleHtml,
|
|
73
286
|
css: moduleCss.default(""),
|
|
74
287
|
js: moduleJs.default(""),
|
|
@@ -79,16 +292,38 @@ export const moduleUpdateSchema = z
|
|
|
79
292
|
.object({
|
|
80
293
|
moduleId: z.string().uuid(),
|
|
81
294
|
displayName: displayNameSchema.optional(),
|
|
295
|
+
description: moduleDescription.optional(),
|
|
296
|
+
kind: moduleKindSchema.optional(),
|
|
297
|
+
/** v0.12.3 (issue #106) — re-classify a module's stable `type`. */
|
|
298
|
+
type: slugSchema.optional(),
|
|
82
299
|
html: moduleHtml.optional(),
|
|
83
300
|
css: moduleCss.optional(),
|
|
84
301
|
js: moduleJs.optional(),
|
|
85
302
|
fields: moduleFieldsArray.optional(),
|
|
86
303
|
})
|
|
87
304
|
.strict();
|
|
305
|
+
/**
|
|
306
|
+
* v0.12.0 — page-type tag pages inherit from their template.
|
|
307
|
+
* Constrained by templates_kind_check in migration 0096. Surfaced
|
|
308
|
+
* in the AI's `## Pages` block so the AI sees three modules-on-
|
|
309
|
+
* product-pages as a pattern. See CLAUDE.md §1A.
|
|
310
|
+
*/
|
|
311
|
+
export const TEMPLATE_KINDS = [
|
|
312
|
+
"home",
|
|
313
|
+
"landing",
|
|
314
|
+
"product",
|
|
315
|
+
"blog",
|
|
316
|
+
"doc",
|
|
317
|
+
"content",
|
|
318
|
+
"utility",
|
|
319
|
+
];
|
|
320
|
+
export const templateKindSchema = z.enum(TEMPLATE_KINDS);
|
|
88
321
|
export const templateCreateSchema = z
|
|
89
322
|
.object({
|
|
90
323
|
slug: slugSchema,
|
|
91
324
|
displayName: displayNameSchema,
|
|
325
|
+
/** v0.12.0 — what kind of page binds to this template. */
|
|
326
|
+
kind: templateKindSchema.default("content"),
|
|
92
327
|
html: z.string().max(TEMPLATE_HTML_MAX, `html exceeds ${TEMPLATE_HTML_MAX} bytes`),
|
|
93
328
|
css: z.string().max(TEMPLATE_CSS_MAX, `css exceeds ${TEMPLATE_CSS_MAX} bytes`).default(""),
|
|
94
329
|
/**
|
|
@@ -97,6 +332,22 @@ export const templateCreateSchema = z
|
|
|
97
332
|
* time. (Stored data, not a render-time fallback — see CLAUDE.md §2.)
|
|
98
333
|
*/
|
|
99
334
|
layoutId: z.string().uuid().optional(),
|
|
335
|
+
/**
|
|
336
|
+
* Optional block-set metadata — SYMMETRIC with `create_layout` and
|
|
337
|
+
* `propose_update_template`, which both take `blocks`. Omit it and the
|
|
338
|
+
* handler auto-derives one block per `<caelo-slot name="X">` in `html`
|
|
339
|
+
* (displayName = name, position = order of appearance) — the common case.
|
|
340
|
+
* Pass it to give blocks a nicer `displayName` or an explicit `position`;
|
|
341
|
+
* every entry's `name` MUST match a `<caelo-slot>` in `html` (a block with
|
|
342
|
+
* no slot renders nothing), else the create fails loudly (CLAUDE.md §2).
|
|
343
|
+
*/
|
|
344
|
+
blocks: z
|
|
345
|
+
.array(z.object({
|
|
346
|
+
name: z.string().min(1).max(80),
|
|
347
|
+
displayName: z.string().min(1).max(200),
|
|
348
|
+
position: z.number().int().min(0).max(1000),
|
|
349
|
+
}))
|
|
350
|
+
.optional(),
|
|
100
351
|
})
|
|
101
352
|
.strict();
|
|
102
353
|
export const templateBlockSchema = z
|
|
@@ -110,6 +361,8 @@ export const templateUpdateSchema = z
|
|
|
110
361
|
.object({
|
|
111
362
|
templateId: z.string().uuid(),
|
|
112
363
|
displayName: displayNameSchema.optional(),
|
|
364
|
+
/** v0.12.0 — re-classify the template's page-type kind. */
|
|
365
|
+
kind: templateKindSchema.optional(),
|
|
113
366
|
html: z.string().max(TEMPLATE_HTML_MAX).optional(),
|
|
114
367
|
css: z.string().max(TEMPLATE_CSS_MAX).optional(),
|
|
115
368
|
/** P6.7.6 — re-point the template to a different layout. */
|
|
@@ -155,7 +408,15 @@ export const pageCreateSchema = z
|
|
|
155
408
|
* not a render-time fallback (CLAUDE.md §2 no-fallbacks).
|
|
156
409
|
*/
|
|
157
410
|
templateId: z.string().uuid().optional(),
|
|
158
|
-
|
|
411
|
+
/**
|
|
412
|
+
* Optional — omit to let `pages.create` pick a context-aware default:
|
|
413
|
+
* `published` on a bootstrap site (0 live published pages), else
|
|
414
|
+
* `draft`. A bootstrap homepage MUST ship or the first Stage has
|
|
415
|
+
* nothing to serve ("0 published pages for env='staging'"). Pass an
|
|
416
|
+
* explicit value to override. (Was `.default("draft")`, which silently
|
|
417
|
+
* left the first page unpublished.)
|
|
418
|
+
*/
|
|
419
|
+
status: pageStatusSchema.optional(),
|
|
159
420
|
})
|
|
160
421
|
.strict();
|
|
161
422
|
export const pageUpdateSchema = z
|
|
@@ -173,6 +434,18 @@ export const pageUpdateSchema = z
|
|
|
173
434
|
slug: slugSchema.optional(),
|
|
174
435
|
templateId: z.string().uuid().optional(),
|
|
175
436
|
status: pageStatusSchema.optional(),
|
|
437
|
+
/**
|
|
438
|
+
* Only meaningful together with `slug`. A slug change rewrites the page's
|
|
439
|
+
* public URL, so the op creates a 301 from the old path by default and
|
|
440
|
+
* rewrites every nav-menu / link-list / module-body link that pointed at
|
|
441
|
+
* it — all inside the same transaction as the slug write.
|
|
442
|
+
*
|
|
443
|
+
* `'skip'` suppresses ONLY the redirect (the link rewrites still run) and
|
|
444
|
+
* is for the rare case where the operator explicitly says the old URL
|
|
445
|
+
* should 404. Defaults to `'auto'`: silently dropping the 301 would strand
|
|
446
|
+
* every inbound link, which is never a safe default (CLAUDE.md §2).
|
|
447
|
+
*/
|
|
448
|
+
redirectFromOld: z.enum(["auto", "skip"]).optional(),
|
|
176
449
|
})
|
|
177
450
|
.strict();
|
|
178
451
|
export const pageSetModulesSchema = z
|
|
@@ -187,4 +460,74 @@ export const pageSetModulesSchema = z
|
|
|
187
460
|
.strict()),
|
|
188
461
|
})
|
|
189
462
|
.strict();
|
|
463
|
+
// ─── v0.12.0 — content_instances ops ─────────────────────────────────
|
|
464
|
+
/**
|
|
465
|
+
* v0.12.0 — content sync mode on a placement.
|
|
466
|
+
*
|
|
467
|
+
* `synced` — editing the placement's content_instance propagates to
|
|
468
|
+
* every other placement bound to the same row.
|
|
469
|
+
* `unsynced` — placement holds a private row. Default.
|
|
470
|
+
*/
|
|
471
|
+
export const syncModeSchema = z.enum(["synced", "unsynced"]);
|
|
472
|
+
/**
|
|
473
|
+
* `values` jsonb shape — keyed by module field name. Values are arbitrary
|
|
474
|
+
* jsonb. For nested-module field kinds, the value satisfies `moduleRefSchema`
|
|
475
|
+
* (single) or `moduleRefSchema[]` (list); the renderer + write-side validator
|
|
476
|
+
* enforces shape against the module's declared `fields[]`.
|
|
477
|
+
*/
|
|
478
|
+
const contentValuesSchema = z.record(z.string(), z.unknown());
|
|
479
|
+
/**
|
|
480
|
+
* v0.12.0 — why this row exists as a shared/reusable instance.
|
|
481
|
+
* Surfaced in the `## Content Library` system-prompt block so the AI
|
|
482
|
+
* can decide *reuse the synced row* vs *fork to unsynced* vs *mint
|
|
483
|
+
* new* without a tool round-trip. Required by the AI's
|
|
484
|
+
* create_content_instance tool description; legacy callers may pass
|
|
485
|
+
* null (the migration-0093 unsynced rows have purpose=NULL).
|
|
486
|
+
* See CLAUDE.md §1A.
|
|
487
|
+
*/
|
|
488
|
+
const contentInstancePurpose = z.string().max(1000);
|
|
489
|
+
export const contentInstanceCreateSchema = z
|
|
490
|
+
.object({
|
|
491
|
+
moduleId: z.string().uuid(),
|
|
492
|
+
slug: slugSchema.optional(),
|
|
493
|
+
displayName: z.string().min(1).max(128).optional(),
|
|
494
|
+
purpose: contentInstancePurpose.optional(),
|
|
495
|
+
values: contentValuesSchema.default({}),
|
|
496
|
+
})
|
|
497
|
+
.strict();
|
|
498
|
+
export const contentInstanceUpdateSchema = z
|
|
499
|
+
.object({
|
|
500
|
+
id: z.string().uuid(),
|
|
501
|
+
/** Fully replaces existing values. */
|
|
502
|
+
values: contentValuesSchema,
|
|
503
|
+
/** Optional optimistic-concurrency token; mirrors pages.update. */
|
|
504
|
+
expectedVersion: z.number().int().nonnegative().optional(),
|
|
505
|
+
/** Optional rename in the same write; mirrors how pages.update accepts metadata edits. */
|
|
506
|
+
slug: slugSchema.nullable().optional(),
|
|
507
|
+
displayName: z.string().min(1).max(128).nullable().optional(),
|
|
508
|
+
/** v0.12.0 — rewrite the purpose (or clear via null). */
|
|
509
|
+
purpose: contentInstancePurpose.nullable().optional(),
|
|
510
|
+
})
|
|
511
|
+
.strict();
|
|
512
|
+
export const contentInstanceDeleteSchema = z
|
|
513
|
+
.object({
|
|
514
|
+
id: z.string().uuid(),
|
|
515
|
+
})
|
|
516
|
+
.strict();
|
|
517
|
+
export const setPlacementContentSchema = z
|
|
518
|
+
.object({
|
|
519
|
+
pageId: z.string().uuid(),
|
|
520
|
+
blockName: z.string().min(1).max(80),
|
|
521
|
+
position: z.number().int().nonnegative(),
|
|
522
|
+
contentInstanceId: z.string().uuid(),
|
|
523
|
+
syncMode: syncModeSchema,
|
|
524
|
+
})
|
|
525
|
+
.strict();
|
|
526
|
+
export const forkPlacementContentSchema = z
|
|
527
|
+
.object({
|
|
528
|
+
pageId: z.string().uuid(),
|
|
529
|
+
blockName: z.string().min(1).max(80),
|
|
530
|
+
position: z.number().int().nonnegative(),
|
|
531
|
+
})
|
|
532
|
+
.strict();
|
|
190
533
|
//# sourceMappingURL=content.js.map
|
package/dist/content.js.map
CHANGED
|
@@ -1 +1 @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AAsB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACtB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACxC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACpC,QAAQ,EAAE,cAAc;CACzB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACzC,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CssGradientMatch {
|
|
2
|
+
readonly start: number;
|
|
3
|
+
readonly end: number;
|
|
4
|
+
readonly literal: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* All complete gradient literals, in document order. Linear: ONE
|
|
8
|
+
* indexOf needle per hit (each advancing the cursor), a bounded
|
|
9
|
+
* backwards check for the base keyword, and a capped paren walk.
|
|
10
|
+
*/
|
|
11
|
+
export declare function scanCssGradients(text: string): CssGradientMatch[];
|
|
12
|
+
/** Replace each complete gradient via `cb` (return the literal to keep). */
|
|
13
|
+
export declare function replaceCssGradients(text: string, cb: (literal: string) => string): string;
|
|
14
|
+
//# sourceMappingURL=css-gradient-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-gradient-scan.d.ts","sourceRoot":"","sources":["../src/css-gradient-scan.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CA0CjE;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAUzF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* issue #164 (CodeQL follow-up) — linear CSS gradient scanner.
|
|
4
|
+
*
|
|
5
|
+
* A `*-gradient\([^;{}]*\)` regex over whole stylesheets is the
|
|
6
|
+
* polynomial-ReDoS shape (#113): on adversarial input full of unclosed
|
|
7
|
+
* `conic-gradient(` starts, every attempt rescans to end-of-input.
|
|
8
|
+
* Gradient arguments legitimately contain nested parens (rgba() stops),
|
|
9
|
+
* so the class can't simply exclude `(`. This scanner walks the string
|
|
10
|
+
* once: find the next `-gradient(` head, then match parens with a
|
|
11
|
+
* depth counter, bounded by a hard argument-length cap.
|
|
12
|
+
*/
|
|
13
|
+
/** No real gradient needs more; unclosed heads stop scanning here. */
|
|
14
|
+
const MAX_GRADIENT_LENGTH = 2_000;
|
|
15
|
+
const NEEDLE = "-gradient(";
|
|
16
|
+
const BASES = ["linear", "radial", "conic"];
|
|
17
|
+
const REPEATING = "repeating-";
|
|
18
|
+
/**
|
|
19
|
+
* All complete gradient literals, in document order. Linear: ONE
|
|
20
|
+
* indexOf needle per hit (each advancing the cursor), a bounded
|
|
21
|
+
* backwards check for the base keyword, and a capped paren walk.
|
|
22
|
+
*/
|
|
23
|
+
export function scanCssGradients(text) {
|
|
24
|
+
const lower = text.toLowerCase();
|
|
25
|
+
const out = [];
|
|
26
|
+
let from = 0;
|
|
27
|
+
while (from < lower.length) {
|
|
28
|
+
const g = lower.indexOf(NEEDLE, from);
|
|
29
|
+
if (g === -1)
|
|
30
|
+
break;
|
|
31
|
+
let headStart = -1;
|
|
32
|
+
for (const base of BASES) {
|
|
33
|
+
if (g >= base.length && lower.startsWith(base, g - base.length)) {
|
|
34
|
+
headStart = g - base.length;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (headStart === -1) {
|
|
39
|
+
from = g + NEEDLE.length;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (headStart >= REPEATING.length &&
|
|
43
|
+
lower.startsWith(REPEATING, headStart - REPEATING.length)) {
|
|
44
|
+
headStart -= REPEATING.length;
|
|
45
|
+
}
|
|
46
|
+
let depth = 1;
|
|
47
|
+
let i = g + NEEDLE.length;
|
|
48
|
+
const limit = Math.min(lower.length, i + MAX_GRADIENT_LENGTH);
|
|
49
|
+
while (i < limit && depth > 0) {
|
|
50
|
+
const ch = lower.charCodeAt(i);
|
|
51
|
+
if (ch === 40 /* ( */)
|
|
52
|
+
depth += 1;
|
|
53
|
+
else if (ch === 41 /* ) */)
|
|
54
|
+
depth -= 1;
|
|
55
|
+
i += 1;
|
|
56
|
+
}
|
|
57
|
+
if (depth === 0) {
|
|
58
|
+
out.push({ start: headStart, end: i, literal: text.slice(headStart, i) });
|
|
59
|
+
from = i;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// Unclosed (or over-long) head — advance past it, never rescan.
|
|
63
|
+
from = g + NEEDLE.length;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
/** Replace each complete gradient via `cb` (return the literal to keep). */
|
|
69
|
+
export function replaceCssGradients(text, cb) {
|
|
70
|
+
const matches = scanCssGradients(text);
|
|
71
|
+
if (matches.length === 0)
|
|
72
|
+
return text;
|
|
73
|
+
let out = "";
|
|
74
|
+
let cursor = 0;
|
|
75
|
+
for (const m of matches) {
|
|
76
|
+
out += text.slice(cursor, m.start) + cb(m.literal);
|
|
77
|
+
cursor = m.end;
|
|
78
|
+
}
|
|
79
|
+
return out + text.slice(cursor);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=css-gradient-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-gradient-scan.js","sourceRoot":"","sources":["../src/css-gradient-scan.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;GAUG;AAEH,sEAAsE;AACtE,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAElC,MAAM,MAAM,GAAG,YAAY,CAAC;AAC5B,MAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AACrD,MAAM,SAAS,GAAG,YAAY,CAAC;AAQ/B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,MAAM,GAAG,GAAuB,EAAE,CAAC;IACnC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,OAAO,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,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AAK,CAAC,EAAE,CAAC;YAChB,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAC1E,IAAI,GAAG,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,gEAAgE;YAChE,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,EAA+B;IAC/E,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* issue #156 — CSS custom-property reference scanner.
|
|
3
|
+
*
|
|
4
|
+
* The silent-fallback trap: module/template/layout CSS referencing a
|
|
5
|
+
* `var(--…)` the active theme never emits renders the hardcoded
|
|
6
|
+
* fallback (or nothing), so the page quietly diverges from the theme —
|
|
7
|
+
* the monochrome regression class documented in theme-render.ts. The
|
|
8
|
+
* prompt-level var inventory guards the happy path; this scanner is the
|
|
9
|
+
* mechanical write-time guard (CLAUDE.md §2: misses must be loud).
|
|
10
|
+
*
|
|
11
|
+
* Pure string analysis — callers (authoring tools, preview op) supply
|
|
12
|
+
* the known-var set from `listThemeCssVarNames(activeTheme.tokens)`.
|
|
13
|
+
* Custom properties DEFINED anywhere in the scanned bundle are treated
|
|
14
|
+
* as known: a layout may define `--site-gutter` for its modules, and
|
|
15
|
+
* that is legitimate authoring, not drift.
|
|
16
|
+
*/
|
|
17
|
+
/** One `var(--x)` reference found in CSS. */
|
|
18
|
+
export interface CssVarReference {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** True when the reference carries a literal fallback (`var(--x, #fff)`). */
|
|
21
|
+
readonly hasFallback: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Extract every `var(--x[, fallback])` reference (deduped by name+fallback). */
|
|
24
|
+
export declare function extractCssVarReferences(css: string): CssVarReference[];
|
|
25
|
+
/** Custom properties DEFINED in the CSS (`--x: value;`). */
|
|
26
|
+
export declare function extractCssVarDefinitions(css: string): Set<string>;
|
|
27
|
+
/** An unknown reference + the closest known name worth suggesting. */
|
|
28
|
+
export interface UnknownCssVar {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly hasFallback: boolean;
|
|
31
|
+
/** Closest known var within edit-distance 40% of length, or null. */
|
|
32
|
+
readonly suggestion: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface CssVarScanInput {
|
|
35
|
+
/** The CSS bundle to scan (concatenate layout+template+module parts). */
|
|
36
|
+
readonly css: string;
|
|
37
|
+
/** Vars the active theme emits (`listThemeCssVarNames`). */
|
|
38
|
+
readonly knownVars: readonly string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Report `var()` references that neither the theme emits nor the
|
|
42
|
+
* bundle itself defines, with a nearest-match suggestion so the fix is
|
|
43
|
+
* one edit, not a research task (CLAUDE.md §11: AI-actionable).
|
|
44
|
+
*/
|
|
45
|
+
export declare function scanCssVars(input: CssVarScanInput): UnknownCssVar[];
|
|
46
|
+
/**
|
|
47
|
+
* Marker for the preview op's missing-content surface — same
|
|
48
|
+
* convention as `theme-asset-unbound:<slot>` / `theme-font-unresolvable`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function unknownCssVarMarker(name: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* One-line, AI-actionable warning for authoring-tool results. Returns
|
|
53
|
+
* null when nothing is unknown (no noise on clean writes).
|
|
54
|
+
*/
|
|
55
|
+
export declare function formatUnknownCssVarWarning(unknown: readonly UnknownCssVar[]): string | null;
|
|
56
|
+
//# sourceMappingURL=css-var-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-var-scan.d.ts","sourceRoot":"","sources":["../src/css-var-scan.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAKD,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,CAStE;AAED,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAMjE;AAsBD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,aAAa,EAAE,CA0BnE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,GAAG,IAAI,CAa3F"}
|