@ultimat3/cli 31.51.0 → 31.53.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/CLAUDE.md +1 -1
- package/README.md +9 -9
- package/package.json +29 -29
- package/src/app-kit-disk.ts +39 -0
- package/src/app-kit-forms.ts +27 -0
- package/src/app-kit.ts +146 -0
- package/src/budgets.ts +3 -1
- package/src/catalog-layout.ts +194 -0
- package/src/cdp-shot-driver-screen.ts +72 -0
- package/src/cdp-shot-driver.ts +17 -1
- package/src/cmd-design-capture.ts +210 -0
- package/src/cmd-design-errors.ts +50 -0
- package/src/cmd-design-paths.ts +47 -0
- package/src/cmd-design-publish.ts +64 -0
- package/src/cmd-design-run.ts +229 -0
- package/src/cmd-design-spec.ts +47 -0
- package/src/cmd-design-theme.ts +107 -0
- package/src/cmd-design-url.ts +201 -0
- package/src/cmd-design.ts +188 -0
- package/src/cmd-doctor.ts +3 -0
- package/src/cmd-generate-spec.ts +5 -0
- package/src/cmd-generate.ts +3 -1
- package/src/cmd-i18n-spec.ts +4 -4
- package/src/cmd-i18n-split.ts +133 -0
- package/src/cmd-i18n.ts +46 -66
- package/src/cmd-kit-spec.ts +13 -0
- package/src/cmd-kit.ts +133 -0
- package/src/cmd-shot-against.ts +275 -0
- package/src/cmd-shot-spec.ts +9 -1
- package/src/cmd-shot.ts +19 -0
- package/src/cmd-upgrade.ts +11 -0
- package/src/codemods/agent-kit.ts +130 -0
- package/src/codemods/agents-md-budget.ts +47 -0
- package/src/codemods/docs-visual-quality.ts +198 -0
- package/src/codemods/index.ts +8 -0
- package/src/codemods/settings-kit-allow.ts +49 -0
- package/src/config-redact.ts +20 -4
- package/src/db-rollback-pass.ts +4 -1
- package/src/design-extract-script.ts +187 -0
- package/src/design-extract.ts +311 -0
- package/src/design-map-colors.ts +180 -0
- package/src/design-map.ts +288 -0
- package/src/dev-child-watch.ts +16 -0
- package/src/dev-db-migrate.ts +27 -46
- package/src/dev-db-migrator-hold.ts +131 -0
- package/src/dev-db-rollback.ts +11 -2
- package/src/dev-rebuild-schema.ts +7 -24
- package/src/doctor-kit.ts +25 -0
- package/src/error-catalog.ts +4 -2
- package/src/error-codes-kit.ts +24 -0
- package/src/error-codes.ts +12 -10
- package/src/generate-catalog-locales.ts +25 -2
- package/src/generate-files.ts +31 -1
- package/src/generate-follow-ups.ts +8 -3
- package/src/guards-shipped-names.ts +5 -0
- package/src/i18n-audit.ts +17 -33
- package/src/i18n-index.ts +108 -31
- package/src/i18n-locale-parity.ts +14 -6
- package/src/i18n-new-locale.ts +75 -0
- package/src/i18n-registration.ts +52 -27
- package/src/island-capture.ts +36 -7
- package/src/kit/agent-audit.ts +49 -0
- package/src/kit/agent-data.ts +32 -0
- package/src/kit/agent-server.ts +34 -0
- package/src/kit/agent-shape.ts +61 -0
- package/src/kit/agent-web.ts +49 -0
- package/src/kit/design-map.ts +106 -0
- package/src/kit/managed.ts +12 -0
- package/src/kit/registry.ts +89 -0
- package/src/kit/skill-design-research.ts +119 -0
- package/src/kit/skill-feature.ts +159 -0
- package/src/kit/skill-planx.ts +139 -0
- package/src/kit/skill-upgrade.ts +94 -0
- package/src/kit/skill-verify.ts +80 -0
- package/src/mcp-errors.ts +5 -0
- package/src/mcp-ui-diff.ts +13 -38
- package/src/mcp-ui.ts +30 -1
- package/src/merge-state.ts +3 -2
- package/src/messages-design.ts +104 -0
- package/src/messages-floor.ts +2 -0
- package/src/messages-upgrade.ts +9 -0
- package/src/messages.ts +4 -0
- package/src/registry.ts +4 -0
- package/src/serve-boot-telemetry.ts +106 -0
- package/src/serve-boot.ts +23 -4
- package/src/shot-blank.ts +70 -0
- package/src/shot-diff.ts +96 -0
- package/src/shot-gpu.ts +17 -5
- package/src/templates/catalog-barrel.ts +84 -0
- package/src/templates/guard-animated-layout-script.ts +173 -0
- package/src/templates/guard-effect-without-fallback.ts +117 -0
- package/src/templates/guard-motion-adapter.ts +161 -0
- package/src/templates/guard-raw-frame-loop.ts +134 -0
- package/src/templates/guard-raw-motion-script.ts +132 -0
- package/src/templates/guard-raw-motion-ts-scan.ts +95 -0
- package/src/templates/guard-released-forms.ts +12 -1
- package/src/templates/guard-untranslated-string.ts +27 -6
- package/src/templates/index.ts +1 -2
- package/src/templates/island.ts +55 -8
- package/src/templates/kit-released-forms.ts +63 -0
- package/src/templates/locales.ts +6 -0
- package/src/templates/motion-scale.ts +115 -0
- package/src/templates/scaffold-claude.ts +39 -26
- package/src/templates/scaffold-design.ts +41 -0
- package/src/templates/scaffold-docs.ts +31 -7
- package/src/templates/scaffold-gitattributes.ts +9 -2
- package/src/templates/scaffold-guards.ts +31 -2
- package/src/templates/scaffold-i18n.ts +10 -6
- package/src/templates/scaffold-verify-floor.ts +3 -0
- package/src/templates/shapes/blog-site.ts +15 -0
- package/src/templates/shapes/blog.ts +2 -0
- package/src/templates/shapes/content-site.ts +13 -0
- package/src/templates/shapes/content.ts +2 -0
- package/src/templates/shapes/dashboard-detail.ts +2 -0
- package/src/templates/shapes/dashboard-motion.ts +284 -0
- package/src/templates/shapes/dashboard.ts +19 -1
- package/src/templates/shapes/landing-motion.ts +67 -0
- package/src/templates/shapes/offline.ts +5 -2
- package/src/templates/shapes/saas.ts +4 -0
- package/src/test-ignores.ts +3 -2
- package/src/upgrade-gate.ts +14 -2
- package/src/upgrade-kit.ts +65 -0
- package/src/upgrade-report-kit.ts +28 -0
- package/src/upgrade-report.ts +3 -0
- package/src/verify-checks.ts +9 -1
- package/src/verify-floor.ts +9 -1
- package/src/verify-local-only.ts +66 -0
- package/src/verify-run.ts +17 -2
- package/src/workspace-checks.ts +3 -3
- package/wiki/Actions.md +1 -1
- package/wiki/Agents.md +33 -1
- package/wiki/Auth.md +3 -3
- package/wiki/Batching-And-Preloading.md +1 -0
- package/wiki/CLI-Reference-Data.md +241 -0
- package/wiki/CLI-Reference-Gate.md +572 -0
- package/wiki/CLI-Reference-Project.md +414 -0
- package/wiki/CLI-Reference-Ship.md +348 -0
- package/wiki/CLI-Reference-Tools.md +687 -0
- package/wiki/CLI-Reference.md +18 -2227
- package/wiki/Compared.md +8 -8
- package/wiki/Configuration.md +26 -2
- package/wiki/Deployment.md +1 -1
- package/wiki/Design-Research.md +96 -0
- package/wiki/Effects.md +83 -0
- package/wiki/Entities-And-Migrations.md +3 -2
- package/wiki/FAQ.md +1 -1
- package/wiki/Getting-Started.md +1 -1
- package/wiki/Home.md +2 -2
- package/wiki/I18n.md +39 -5
- package/wiki/Installation.md +1 -1
- package/wiki/Jobs-And-Workflows.md +29 -1
- package/wiki/Known-Gaps.md +6 -2
- package/wiki/MCP-And-AI.md +4 -0
- package/wiki/Motion.md +85 -0
- package/wiki/Observability.md +15 -1
- package/wiki/Outbound-HTTP.md +62 -2
- package/wiki/PWA-And-Offline.md +1 -1
- package/wiki/Policies-And-Authz.md +10 -0
- package/wiki/Project-Layout.md +1 -1
- package/wiki/Realtime.md +29 -2
- package/wiki/Static-Assets.md +1 -1
- package/wiki/Testing.md +33 -0
- package/wiki/Theming.md +31 -8
- package/wiki/Troubleshooting.md +1 -1
- package/wiki/Tutorial-02-First-Feature.md +1 -1
- package/wiki/UI-Components.md +2 -0
- package/wiki/Upgrading.md +9 -3
- package/src/templates/scaffold-claude-agents.ts +0 -161
- package/src/templates/scaffold-claude-commands.ts +0 -239
|
@@ -13,9 +13,19 @@ import { S3_GATEWAY_IMAGE } from './pinned-images';
|
|
|
13
13
|
import { binFiles } from './scaffold-bin';
|
|
14
14
|
import { claudeFiles } from './scaffold-claude';
|
|
15
15
|
import { containerFiles } from './scaffold-container';
|
|
16
|
+
import { designFiles } from './scaffold-design';
|
|
16
17
|
import { mcpJsonFile } from './scaffold-mcp-json';
|
|
17
18
|
import { testServicesFiles } from './scaffold-test-services';
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* The `agentsMdMaxBytes` a scaffold's `x.verify.json` declares: the manifest default (12,000 B)
|
|
22
|
+
* plus 1,120 B, measured — the motion-adapter, frame-loop and effects rows, the TS-scan guards on
|
|
23
|
+
* the timing and motion rows, the Visual quality section and the kit line (plan 101, slice 09) took
|
|
24
|
+
* the default scaffold from 11,723 B to 12,843 B and the largest shape (`saas`) from 11,998 B to
|
|
25
|
+
* 13,118 B. A raise, not a cut: each added row names a guard or a check the gate runs.
|
|
26
|
+
*/
|
|
27
|
+
export const SCAFFOLD_AGENTS_MD_MAX_BYTES = 13_120;
|
|
28
|
+
|
|
19
29
|
/**
|
|
20
30
|
* The one convention file, under two names: `CLAUDE.md` holds it and `AGENTS.md` is a relative
|
|
21
31
|
* symlink to it (the owner's ruling, 2026-11-03), so there is no second copy to drift. Every word
|
|
@@ -60,13 +70,16 @@ queries, jobs, MCP tools, published operations and tests it touches, each with p
|
|
|
60
70
|
| Breakpoints | a viewport query names a breakpoint rung (\`respond-up\`, \`respond-down\`, \`respond-between\`), never a width | \`raw-breakpoint\` |
|
|
61
71
|
| Layers | a \`z-index\` is a named layer, never a number | \`raw-z-index\` |
|
|
62
72
|
| Shadows | a shadow comes off the shadow scale, never a hand-written offset and blur | \`raw-shadow\` |
|
|
63
|
-
| Timing | a duration and an easing curve come off the motion scale
|
|
73
|
+
| Timing | a duration and an easing curve come off the motion scale — \`motionTiming()\` from \`@ultimat3/ui/motion\` in TypeScript — never a literal | \`raw-motion\`, \`raw-motion-script\` |
|
|
74
|
+
| Motion adapter | animation through \`@ultimat3/ui/motion\` and \`@ultimat3/effects\`, never an animation or shader library | \`motion-adapter\` |
|
|
75
|
+
| Frame loops | \`frameLoop(tick, { el })\` from \`@ultimat3/ui/motion\`, never a bare \`requestAnimationFrame(\`; a \`// why:\` admits one | \`raw-frame-loop\` |
|
|
76
|
+
| Effects | a \`<canvas>\` or WebGL context only inside \`EffectCanvas\` (\`@ultimat3/effects\`), whose \`fallback\` is required | \`effect-without-fallback\` |
|
|
64
77
|
| Classes | a class a component reads off its stylesheet is one that sheet compiles | \`undefined-style-class\` |
|
|
65
78
|
| Properties | a custom property a stylesheet reads is one the app declares | \`undeclared-custom-property\` |
|
|
66
79
|
| Interaction | a click is answered by a control — never a \`<div onClick>\`, and never a \`role=\` where the native tag exists | \`semantic-interactive\` |
|
|
67
80
|
| Focus | \`outline: none\` replaces the ring in the same rule or the one beside it, or it does not remove it | \`focus-visible\` |
|
|
68
81
|
| Images | every image carries width + height or an aspect-ratio, and the priority one is never \`loading="lazy"\` | \`image-dimensions\` |
|
|
69
|
-
| Motion | animate \`transform\` and \`opacity\` — never a layout property, never \`transition: all\` | \`animated-layout-property\` |
|
|
82
|
+
| Motion | animate \`transform\` and \`opacity\` — never a layout property, never \`transition: all\`; reorder with \`layout()\` from \`@ultimat3/ui/motion\` | \`animated-layout-property\`, \`animated-layout-script\` |
|
|
70
83
|
| Islands | every \`*.island.tsx\` has a sibling \`*.island.states.ts\`, so \`bunx x shot --island\` can photograph its failures | \`island-without-states\` |
|
|
71
84
|
| Island mounts | a \`mount\` replaces its server markup through \`mountOver\`, so a render that throws shows the server's HTML, not a blank box | \`island-mount-clears\` |
|
|
72
85
|
| Size | one file, one job — ${LINE_CEILING} lines of reviewable logic, and split past it | \`X_FILE_TOO_LONG\` |
|
|
@@ -127,8 +140,19 @@ Commands: \`bun run setup\`, \`bun run dev\`, \`bun run verify\`, \`bunx x g <pr
|
|
|
127
140
|
table: read it, never edit it. \`bunx x verify\` fails with \`X_SCHEMA_DUMP_DRIFT\` when it is not
|
|
128
141
|
what the migrations produce, and \`bunx x db gen\` rewrites it.
|
|
129
142
|
- \`bunx x doctor\` explains a broken environment and prints the fix for every finding.
|
|
130
|
-
- \`.claude/\` holds
|
|
131
|
-
|
|
143
|
+
- \`.claude/\` holds the agent kit that reads this file: five skills, five boundary-scoped agents.
|
|
144
|
+
Managed: \`bunx x kit\` rewrites them, an edit in place is \`X_KIT_DRIFT\`; yours go in \`app-*\`.
|
|
145
|
+
|
|
146
|
+
## Visual quality
|
|
147
|
+
|
|
148
|
+
\`apps/web/DESIGN.md\` is this app's design — tokens, type, motion, sources — read before rendering.
|
|
149
|
+
|
|
150
|
+
| Rule | Refused by |
|
|
151
|
+
|---|---|
|
|
152
|
+
| every colour pair a theme changes meets WCAG 2.2 AA | \`defineTheme\`: \`X_UI_CONTRAST_INSUFFICIENT\` |
|
|
153
|
+
| motion is optional: loops and effects stop for reduced motion, a hidden tab and \`MotionToggle\` | \`raw-frame-loop\`, \`motion-adapter\` |
|
|
154
|
+
| an effect's static frame renders first, so \`site/\` stays 0kb JS | \`effect-without-fallback\`, the \`budgets\` step |
|
|
155
|
+
| a look is matched by measurement: \`bunx x shot <route> --against .x/design/<slug>\` | recorded, never gating |
|
|
132
156
|
|
|
133
157
|
## Agent tools
|
|
134
158
|
|
|
@@ -138,9 +162,7 @@ Commands: \`bun run setup\`, \`bun run dev\`, \`bun run verify\`, \`bunx x g <pr
|
|
|
138
162
|
| \`bunx x impact <file|primitive> --json\` · \`bunx x graph --json\` | what an edit reaches, and the app as one graph (declared, import and observed edges) | rebuilt on every call |
|
|
139
163
|
| \`.mcp.json\` | the dev tools over MCP: routes, schema, policies, the database, tests, the gate — \`bunx x mcp tools\` lists them | a client that reads \`.mcp.json\` starts it; from any other, run \`bunx @ultimat3/cli mcp serve --transport stdio\` here |
|
|
140
164
|
| \`POST /mcp\` | this app's own tools — every action declaring \`mcp: { expose: true }\` — for a remote agent | \`apps/web/mcp.ts\`; under \`bun run dev\`, \`Authorization: Bearer dev-agent.admin\`, else an API key |
|
|
141
|
-
| \`.claude/
|
|
142
|
-
| \`.claude/commands/planx.md\` | write a plan to \`docs/plans/\` | the same |
|
|
143
|
-
| \`.claude/commands/verify.md\` | run the gate and fix what it reports | the same |
|
|
165
|
+
| \`.claude/skills/\` | \`feature\` (hive, one PR, done when merged), \`planx\`, \`verify\`, \`upgrade\`, \`design-research\` | plain markdown any agent can follow; \`bunx x kit\` keeps them current |
|
|
144
166
|
|
|
145
167
|
Project notes for ${app.kebab}: replace this line with the conventions a newcomer could not guess.
|
|
146
168
|
`;
|
|
@@ -260,6 +282,8 @@ export function docsFiles(app: NameSet, root?: string): readonly GeneratedFile[]
|
|
|
260
282
|
// The harness half of the same job AGENTS.md does. It lands in the app's own repo rather than
|
|
261
283
|
// in a global config, so it is visible in the scaffold's diff and deletable in one line.
|
|
262
284
|
...claudeFiles(app),
|
|
285
|
+
// The app's own design brief, never managed: the `web` agent reads it first.
|
|
286
|
+
...designFiles(app),
|
|
263
287
|
// The same two commands `README.md` opens with, run by a machine that has never seen this
|
|
264
288
|
// repository. Registered here and not in `scaffold-repo.ts` because it is documentation of the
|
|
265
289
|
// gate in executable form, which is the job this file has.
|
|
@@ -46,10 +46,16 @@ export const LINE_ENDING_ATTRIBUTES = `# Every text file is LF, in the index and
|
|
|
46
46
|
${BINARY_EXTENSIONS.map((extension) => `*.${extension} binary`).join('\n')}
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
+
/** The catalog rule `x new` wrote before split catalogs, and what `x i18n split` replaces it with. */
|
|
50
|
+
export const FLAT_CATALOG_ATTRIBUTE = 'packages/i18n/catalogs/*.json merge=x-registry';
|
|
51
|
+
|
|
49
52
|
/**
|
|
50
53
|
* How two branches' features merge. `bunx x merge-driver install` (a step of `bun run setup`) defines
|
|
51
54
|
* the drivers in `.git/config`; a clone without them gets git's ordinary text merge, so nothing here
|
|
52
|
-
* can lose work. Also carried into existing apps by the `merge-drivers` codemod.
|
|
55
|
+
* can lose work. Also carried into existing apps by the `merge-drivers` codemod. The catalog rule
|
|
56
|
+
* holds a flat `<locale>.json` and every namespace file of a split locale alike (git's `**` also
|
|
57
|
+
* matches no directory); a split locale's barrel is one import and one entry per line, so the
|
|
58
|
+
* registry driver keeps the namespace each branch added.
|
|
53
59
|
*/
|
|
54
60
|
export const MERGE_ATTRIBUTES = `# Merging two features. x-registry keeps what both branches added and leaves a real conflict alone;
|
|
55
61
|
# x-generated keeps our copy of a projection, which \`bunx x manifest\` then rebuilds.
|
|
@@ -57,7 +63,8 @@ apps/web/api/index.ts merge=x-registry
|
|
|
57
63
|
apps/web/exercise.ts merge=x-registry
|
|
58
64
|
apps/web/shared/roles.ts merge=x-registry
|
|
59
65
|
packages/db/src/client.ts merge=x-registry
|
|
60
|
-
packages/i18n/catalogs
|
|
66
|
+
packages/i18n/catalogs/**/*.json merge=x-registry
|
|
67
|
+
packages/i18n/catalogs/*/index.ts merge=x-registry
|
|
61
68
|
x.manifest.json merge=x-generated
|
|
62
69
|
openapi.json merge=x-generated
|
|
63
70
|
`;
|
|
@@ -28,23 +28,32 @@
|
|
|
28
28
|
// Two more are about the REPO: an `await` per turn of a loop, REPORT ONLY (`severity: 'warning'`)
|
|
29
29
|
// until the apps are clean of it, and a `.all()` that says no bound — failing the gate in an app
|
|
30
30
|
// scaffolded from 31.23 on, while an older app keeps the report-only copy it was given. One is
|
|
31
|
-
// about the ENVIRONMENT: a variable is read only once `app.config.ts` declares it.
|
|
31
|
+
// about the ENVIRONMENT: a variable is read only once `app.config.ts` declares it. Five are about
|
|
32
|
+
// MOTION and EFFECTS (`motion-adapter`, `raw-frame-loop`, `effect-without-fallback`, and the SCRIPT
|
|
33
|
+
// halves of two stylesheet rules, `raw-motion-script` and `animated-layout-script`): report-only
|
|
34
|
+
// by their own declaration, since a stricter rule on `main` is a break; `x new` writes their
|
|
35
|
+
// `"error"` rows into `guards/shipped.json` (`STRICT_FROM_NEW`).
|
|
32
36
|
|
|
33
37
|
import { SHIPPED_GUARD_NAMES as NAMES, type ShippedGuardName } from '../guards-shipped-names';
|
|
34
38
|
import { animatedLayoutPropertyGuardFiles } from './guard-animated-layout-property';
|
|
39
|
+
import { animatedLayoutScriptGuardFiles } from './guard-animated-layout-script';
|
|
35
40
|
import { bareErrorGuardFiles } from './guard-bare-error';
|
|
41
|
+
import { effectWithoutFallbackGuardFiles } from './guard-effect-without-fallback';
|
|
36
42
|
import { errorDeclaredGuardFiles } from './guard-error-declared';
|
|
37
43
|
import { focusVisibleGuardFiles } from './guard-focus-visible';
|
|
38
44
|
import { imageDimensionsGuardFiles } from './guard-image-dimensions';
|
|
39
45
|
import { islandMountClearsGuardFiles } from './guard-island-mount-clears';
|
|
40
46
|
import { islandWithoutStatesGuardFiles } from './guard-island-without-states';
|
|
47
|
+
import { motionAdapterGuardFiles } from './guard-motion-adapter';
|
|
41
48
|
import { nativeConfirmGuardFiles } from './guard-native-confirm';
|
|
42
49
|
import { rawBreakpointGuardFiles } from './guard-raw-breakpoint';
|
|
43
50
|
import { rawColourGuardFiles } from './guard-raw-colour';
|
|
44
51
|
import { rawFetchGuardFiles } from './guard-raw-fetch';
|
|
52
|
+
import { rawFrameLoopGuardFiles } from './guard-raw-frame-loop';
|
|
45
53
|
import { rawIntervalGuardFiles } from './guard-raw-interval';
|
|
46
54
|
import { rawLengthGuardFiles } from './guard-raw-length';
|
|
47
55
|
import { rawMotionGuardFiles } from './guard-raw-motion';
|
|
56
|
+
import { rawMotionScriptGuardFiles } from './guard-raw-motion-script';
|
|
48
57
|
import { rawShadowGuardFiles } from './guard-raw-shadow';
|
|
49
58
|
import { rawZIndexGuardFiles } from './guard-raw-z-index';
|
|
50
59
|
import { repoAwaitInLoopGuardFiles } from './guard-repo-await-in-loop';
|
|
@@ -68,19 +77,24 @@ import type { GeneratedFile } from './naming';
|
|
|
68
77
|
*/
|
|
69
78
|
const SHIPPED: Readonly<Record<ShippedGuardName, () => readonly GeneratedFile[]>> = {
|
|
70
79
|
'animated-layout-property': animatedLayoutPropertyGuardFiles,
|
|
80
|
+
'animated-layout-script': animatedLayoutScriptGuardFiles,
|
|
71
81
|
'bare-error': bareErrorGuardFiles,
|
|
82
|
+
'effect-without-fallback': effectWithoutFallbackGuardFiles,
|
|
72
83
|
'error-declared': errorDeclaredGuardFiles,
|
|
73
84
|
'focus-visible': focusVisibleGuardFiles,
|
|
74
85
|
'image-dimensions': imageDimensionsGuardFiles,
|
|
75
86
|
'island-mount-clears': islandMountClearsGuardFiles,
|
|
76
87
|
'island-without-states': islandWithoutStatesGuardFiles,
|
|
88
|
+
'motion-adapter': motionAdapterGuardFiles,
|
|
77
89
|
'native-confirm': nativeConfirmGuardFiles,
|
|
78
90
|
'raw-breakpoint': rawBreakpointGuardFiles,
|
|
79
91
|
'raw-colour': rawColourGuardFiles,
|
|
80
92
|
'raw-fetch': rawFetchGuardFiles,
|
|
93
|
+
'raw-frame-loop': rawFrameLoopGuardFiles,
|
|
81
94
|
'raw-interval': rawIntervalGuardFiles,
|
|
82
95
|
'raw-length': rawLengthGuardFiles,
|
|
83
96
|
'raw-motion': rawMotionGuardFiles,
|
|
97
|
+
'raw-motion-script': rawMotionScriptGuardFiles,
|
|
84
98
|
'raw-shadow': rawShadowGuardFiles,
|
|
85
99
|
'raw-z-index': rawZIndexGuardFiles,
|
|
86
100
|
'repo-await-in-loop': repoAwaitInLoopGuardFiles,
|
|
@@ -96,6 +110,18 @@ const SHIPPED: Readonly<Record<ShippedGuardName, () => readonly GeneratedFile[]>
|
|
|
96
110
|
'unzoned-date': unzonedDateGuardFiles,
|
|
97
111
|
};
|
|
98
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Guards that ship report-only (`severity: 'warning'`) to every app that predates them and fail
|
|
115
|
+
* a new one: `x new` writes their `"error"` row. A guard that is strict for everyone needs no row.
|
|
116
|
+
*/
|
|
117
|
+
const STRICT_FROM_NEW: readonly ShippedGuardName[] = [
|
|
118
|
+
'animated-layout-script',
|
|
119
|
+
'effect-without-fallback',
|
|
120
|
+
'motion-adapter',
|
|
121
|
+
'raw-frame-loop',
|
|
122
|
+
'raw-motion-script',
|
|
123
|
+
];
|
|
124
|
+
|
|
99
125
|
/** The names, in the order every list of them is shown. */
|
|
100
126
|
export const SHIPPED_GUARD_NAMES: readonly string[] = NAMES;
|
|
101
127
|
|
|
@@ -176,5 +202,8 @@ export const shippedGuardTest = (name: string): string | undefined => {
|
|
|
176
202
|
* that and whose rows are its severities. The app's own guards join it from `x g guard <name>`.
|
|
177
203
|
*/
|
|
178
204
|
export const scaffoldGuardFiles = (): readonly GeneratedFile[] => [
|
|
179
|
-
{
|
|
205
|
+
{
|
|
206
|
+
path: 'guards/shipped.json',
|
|
207
|
+
contents: `${JSON.stringify({ severity: Object.fromEntries(STRICT_FROM_NEW.map((name) => [name, 'error'])) }, null, 2)}\n`,
|
|
208
|
+
},
|
|
180
209
|
];
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// of scaffold-repo.ts to stay under the file-size ceiling.
|
|
4
4
|
|
|
5
5
|
import { APP_CATALOGS_PATH } from '@ultimat3/i18n/app-catalogs';
|
|
6
|
+
import { BARREL_EXPORT } from './catalog-barrel';
|
|
6
7
|
import { catalogJson } from './catalog-json';
|
|
7
8
|
import type { GeneratedFile, NameSet } from './naming';
|
|
8
9
|
import { camel } from './naming';
|
|
@@ -46,9 +47,12 @@ const orderedLocales = (locales: readonly string[]): readonly string[] => {
|
|
|
46
47
|
|
|
47
48
|
/** A locale tag is not always a valid JS binding (`zh-hant`) — `camel()` is the one identifier
|
|
48
49
|
* derivation every generated file already uses for names, so the import agrees with the rest of
|
|
49
|
-
* the app's own naming instead of inventing a second casing rule.
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
* the app's own naming instead of inventing a second casing rule. A split locale is its
|
|
51
|
+
* directory's generated barrel (`catalog-barrel.ts`), read as the same one object a JSON file is. */
|
|
52
|
+
export const localeImport = (locale: string, split = false): string =>
|
|
53
|
+
split
|
|
54
|
+
? `import { ${BARREL_EXPORT} as ${camel(locale)} } from '../catalogs/${locale}';`
|
|
55
|
+
: `import ${camel(locale)} from '../catalogs/${locale}.json';`;
|
|
52
56
|
|
|
53
57
|
/** The object-literal entry for one locale: shorthand when the binding IS the tag (`en`, `es`, …),
|
|
54
58
|
* `'tag': binding` when `camel()` had to reshape it (`zh-hant` → `zhHant`) — `defineCatalogs` reads
|
|
@@ -61,13 +65,13 @@ export const localeEntry = (locale: string): string => {
|
|
|
61
65
|
/**
|
|
62
66
|
* The app's one catalog-registration module — regenerated, never hand-edited, to the full current
|
|
63
67
|
* locale set every time `x g ... --locales` lands a new catalog file (`syncI18nIndex` in
|
|
64
|
-
* `cmd-generate.ts`). `i18nFiles` below calls this with `['en']` for the shape `x new` has always
|
|
68
|
+
* `cmd-generate.ts`). `split` names the locales held as a directory of namespace files. `i18nFiles` below calls this with `['en']` for the shape `x new` has always
|
|
65
69
|
* scaffolded; a later run passes whatever `packages/i18n/catalogs/` actually holds.
|
|
66
70
|
*/
|
|
67
|
-
export function i18nIndex(locales: readonly string[]): string {
|
|
71
|
+
export function i18nIndex(locales: readonly string[], split: readonly string[] = []): string {
|
|
68
72
|
const ordered = orderedLocales(locales);
|
|
69
73
|
const fallback = defaultLocaleOf(locales);
|
|
70
|
-
const imports = ordered.map(localeImport).join('\n');
|
|
74
|
+
const imports = ordered.map((locale) => localeImport(locale, split.includes(locale))).join('\n');
|
|
71
75
|
const entries = ordered.map(localeEntry).join(', ');
|
|
72
76
|
return `// The app's catalog, registered once and typed against English. Every surface resolves strings
|
|
73
77
|
// through this module, and an unknown key is a compile error via useT() — never a runtime miss
|
|
@@ -5,6 +5,7 @@ import { STATEMENTS_MAX } from '@ultimat3/testing';
|
|
|
5
5
|
import type { CoverageExclude } from '../coverage-floor';
|
|
6
6
|
import { COVERAGE_BAR } from '../coverage-floor';
|
|
7
7
|
import type { VerifyStepName } from '../verify-step';
|
|
8
|
+
import { SCAFFOLD_AGENTS_MD_MAX_BYTES } from './scaffold-docs';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* The suite ratchet, committed on day one, naming ALL of the gate: every step is either required in
|
|
@@ -107,6 +108,8 @@ export const verifyFloor = (suites: FloorSuites): string =>
|
|
|
107
108
|
{
|
|
108
109
|
...floorSteps(suites),
|
|
109
110
|
strict: true,
|
|
111
|
+
// The brief this scaffold writes is over the manifest default: its own measured budget.
|
|
112
|
+
agentsMdMaxBytes: SCAFFOLD_AGENTS_MD_MAX_BYTES,
|
|
110
113
|
coverage: {
|
|
111
114
|
lines: COVERAGE_BAR,
|
|
112
115
|
funcs: COVERAGE_BAR,
|
|
@@ -79,6 +79,7 @@ const indexPage = (
|
|
|
79
79
|
): string => `// The blog index: every published post, newest first. Zero JavaScript.
|
|
80
80
|
|
|
81
81
|
import { useT } from '@${app.kebab}/i18n';
|
|
82
|
+
import { Aurora } from '@ultimat3/effects';
|
|
82
83
|
import { defineRoute } from '@ultimat3/render';
|
|
83
84
|
import { DateTime } from '@ultimat3/ui';
|
|
84
85
|
import type { JSX } from 'solid-js';
|
|
@@ -98,6 +99,7 @@ export function Page(props: { readonly data: BlogIndex }): JSX.Element {
|
|
|
98
99
|
const t = useT();
|
|
99
100
|
return (
|
|
100
101
|
<main class={styles.page}>
|
|
102
|
+
<Aurora class={styles.aurora} />
|
|
101
103
|
<h1>{t('site.blog.title')}</h1>
|
|
102
104
|
<Show when={props.data.length > 0} fallback={<p>{t('site.blog.empty')}</p>}>
|
|
103
105
|
<ul class={styles.list}>
|
|
@@ -269,6 +271,10 @@ unitTest('a slug no published post has is X_NOT_FOUND', async () => {
|
|
|
269
271
|
const style = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
270
272
|
|
|
271
273
|
.page {
|
|
274
|
+
@include tokens.view-transition-name(blog-main);
|
|
275
|
+
|
|
276
|
+
position: relative;
|
|
277
|
+
isolation: isolate;
|
|
272
278
|
display: grid;
|
|
273
279
|
gap: tokens.space(4);
|
|
274
280
|
padding: tokens.space(8);
|
|
@@ -276,6 +282,13 @@ const style = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
|
276
282
|
color: tokens.role('fg');
|
|
277
283
|
}
|
|
278
284
|
|
|
285
|
+
// The backdrop is CSS alone (\`data-effect-backend="css"\`): zero JavaScript, behind the content.
|
|
286
|
+
.aurora {
|
|
287
|
+
position: absolute;
|
|
288
|
+
inset: 0;
|
|
289
|
+
z-index: calc(-1 * #{tokens.z(raised)});
|
|
290
|
+
}
|
|
291
|
+
|
|
279
292
|
.list {
|
|
280
293
|
display: grid;
|
|
281
294
|
gap: tokens.space(3);
|
|
@@ -293,6 +306,8 @@ const style = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
|
293
306
|
const postStyle = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
294
307
|
|
|
295
308
|
.page {
|
|
309
|
+
@include tokens.view-transition-name(blog-main);
|
|
310
|
+
|
|
296
311
|
display: grid;
|
|
297
312
|
gap: tokens.space(4);
|
|
298
313
|
padding: tokens.space(8);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { GeneratedFile, NameSet } from '../naming';
|
|
6
6
|
import { blogSiteFiles } from './blog-site';
|
|
7
7
|
import { blogSliceFiles } from './blog-slice';
|
|
8
|
+
import { effectsDependency } from './landing-motion';
|
|
8
9
|
import type { ShapeEdit, ShapeOverlay } from './overlay';
|
|
9
10
|
import { claudeRows, shapeLines } from './shared-edits';
|
|
10
11
|
|
|
@@ -40,6 +41,7 @@ unitTest('health and both public reads are registered under their export names',
|
|
|
40
41
|
`;
|
|
41
42
|
|
|
42
43
|
const edits = (app: NameSet): readonly ShapeEdit[] => [
|
|
44
|
+
effectsDependency(),
|
|
43
45
|
{
|
|
44
46
|
path: 'packages/db/src/client.ts',
|
|
45
47
|
find: 'const entities = {};',
|
|
@@ -85,6 +85,10 @@ const frameStyle = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.main {
|
|
88
|
+
@include tokens.view-transition-name(site-main);
|
|
89
|
+
|
|
90
|
+
position: relative;
|
|
91
|
+
isolation: isolate;
|
|
88
92
|
display: grid;
|
|
89
93
|
gap: tokens.space(4);
|
|
90
94
|
padding: tokens.space(8);
|
|
@@ -101,6 +105,7 @@ const indexPage = (
|
|
|
101
105
|
): string => `// The front page: what the site is, and every page it holds in this locale. Zero JavaScript.
|
|
102
106
|
|
|
103
107
|
import { useT } from '@${app.kebab}/i18n';
|
|
108
|
+
import { Aurora } from '@ultimat3/effects';
|
|
104
109
|
import { currentLocale, localizedPath } from '@ultimat3/i18n';
|
|
105
110
|
import { defineRoute } from '@ultimat3/render';
|
|
106
111
|
import { ld } from '@ultimat3/seo';
|
|
@@ -136,6 +141,7 @@ export function Page(props: { readonly data: FrontPage }): JSX.Element {
|
|
|
136
141
|
const t = useT();
|
|
137
142
|
return (
|
|
138
143
|
<SiteFrame locale={props.data.locale} home={props.data.home} path="/">
|
|
144
|
+
<Aurora class={styles.aurora} />
|
|
139
145
|
<h1>{t('site.content.headline')}</h1>
|
|
140
146
|
<p class={styles.lede}>{t('site.content.lede')}</p>
|
|
141
147
|
<h2>{t('site.content.pages')}</h2>
|
|
@@ -197,6 +203,13 @@ unitTest('it is static, ships zero JavaScript, and says what the site is', async
|
|
|
197
203
|
|
|
198
204
|
const indexStyle = (): string => `@use '@ultimat3/ui/tokens' as tokens;
|
|
199
205
|
|
|
206
|
+
// The backdrop is CSS alone (\`data-effect-backend="css"\`): zero JavaScript, behind the frame's main.
|
|
207
|
+
.aurora {
|
|
208
|
+
position: absolute;
|
|
209
|
+
inset: 0;
|
|
210
|
+
z-index: calc(-1 * #{tokens.z(raised)});
|
|
211
|
+
}
|
|
212
|
+
|
|
200
213
|
.lede {
|
|
201
214
|
color: tokens.role('fg-muted');
|
|
202
215
|
}
|
|
@@ -10,10 +10,12 @@ import { i18nIndex } from '../scaffold-i18n';
|
|
|
10
10
|
import { ADMIN_SPANISH } from './content-admin-es';
|
|
11
11
|
import { CONTENT_LOCALES, contentPageFiles } from './content-pages';
|
|
12
12
|
import { contentSiteFiles } from './content-site';
|
|
13
|
+
import { effectsDependency } from './landing-motion';
|
|
13
14
|
import type { ShapeEdit, ShapeOverlay } from './overlay';
|
|
14
15
|
import { claudeRows, shapeLines } from './shared-edits';
|
|
15
16
|
|
|
16
17
|
const edits = (): readonly ShapeEdit[] => [
|
|
18
|
+
effectsDependency(),
|
|
17
19
|
...claudeRows({
|
|
18
20
|
page: '`apps/web/site/page.test.ts`',
|
|
19
21
|
island: 'none in this shape: `bunx x g island <name>` writes one with its states',
|