@litfamily/litgravity 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +72 -17
- package/README_ko-KR.md +72 -17
- package/package.json +1 -1
- package/plugin/hooks/lib/lanes.mjs +65 -0
- package/plugin/hooks/lib/motion.mjs +34 -5
- package/plugin/hooks/lib/reentry.mjs +7 -0
- package/plugin/hooks/lib/rewind/brief.mjs +332 -0
- package/plugin/hooks/lib/rewind/collect.mjs +328 -0
- package/plugin/hooks/lib/rewind/gauge.mjs +55 -0
- package/plugin/hooks/lib/rewind/next-step.mjs +77 -0
- package/plugin/hooks/lib/rewind/redact.mjs +60 -0
- package/plugin/hooks/lib/rewind/transcripts.mjs +211 -0
- package/plugin/hooks/lib/routes.mjs +79 -5
- package/plugin/hooks/lib/workflow-stack.mjs +213 -0
- package/plugin/hooks/post-tool-use.mjs +37 -1
- package/plugin/hooks/pre-invocation.mjs +91 -2
- package/plugin/hooks/session-start.mjs +26 -3
- package/plugin/hooks/stop.mjs +22 -2
- package/plugin/hud/looks.mjs +29 -0
- package/plugin/hud/render.mjs +234 -12
- package/plugin/plugin.json +1 -1
- package/plugin/skills/frontend-ui-ux/SKILL.md +12 -1
- package/plugin/skills/frontend-ui-ux/kit/components.css +417 -0
- package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
- package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
- package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +30 -9
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +20 -8
- package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +42 -9
- package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/plugin/skills/lit-adhd/SKILL.md +157 -0
- package/plugin/skills/lit-adhd/references/card-examples.md +101 -0
- package/plugin/skills/lit-adhd/references/status-taxonomy.md +32 -0
- package/plugin/skills/lit-adhd/scripts/rewind.mjs +5 -0
- package/plugin/skills/lit-diagram-drawer/SKILL.md +5 -3
- package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +1 -1
- package/plugin/skills/lit-diagram-drawer/references/style-guide.md +21 -12
- package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/plugin/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
- package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
- package/plugin/skills/lit-docx/SKILL.md +3 -3
- package/plugin/skills/lit-handoff/SKILL.md +1 -0
- package/plugin/skills/lit-hijack/SKILL.md +263 -0
- package/plugin/skills/lit-hijack/references/capture-and-provenance.md +100 -0
- package/plugin/skills/lit-hijack/references/clean-room-build.md +75 -0
- package/plugin/skills/lit-hijack/references/distil-and-licence.md +67 -0
- package/plugin/skills/lit-hijack/references/gap-and-port-design.md +100 -0
- package/plugin/skills/lit-hijack/references/parity-and-report.md +85 -0
- package/plugin/skills/lit-hijack/scripts/hijack.mjs +953 -0
- package/plugin/skills/lit-plan/SKILL.md +1 -1
- package/plugin/skills/lit-pptx/SKILL.md +8 -8
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
- package/plugin/skills/lit-pptx/references/agents/analyst.md +34 -56
- package/plugin/skills/lit-pptx/references/agents/antithesis.md +49 -67
- package/plugin/skills/lit-pptx/references/agents/architect.md +38 -51
- package/plugin/skills/lit-pptx/references/agents/critic.md +25 -41
- package/plugin/skills/lit-pptx/references/agents/synthesizer.md +37 -46
- package/plugin/skills/lit-pptx/references/agents/thesis.md +29 -49
- package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +119 -145
- package/plugin/skills/lit-pptx/references/authoring-guide.md +187 -278
- package/plugin/skills/lit-pptx/references/consensus-protocol.md +99 -97
- package/plugin/skills/lit-pptx/references/data-display-cookbook.md +36 -137
- package/plugin/skills/lit-pptx/references/density-and-fill.md +147 -216
- package/plugin/skills/lit-pptx/references/design-system-azure.md +56 -85
- package/plugin/skills/lit-pptx/references/direction-step.md +134 -176
- package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +114 -115
- package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +66 -66
- package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +63 -63
- package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +96 -96
- package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +81 -81
- package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +103 -103
- package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +100 -98
- package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +76 -76
- package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +96 -96
- package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +80 -80
- package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +72 -72
- package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +95 -95
- package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
- package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
- package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
- package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
- package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
- package/plugin/skills/lit-pptx/references/interview-protocol.md +83 -102
- package/plugin/skills/lit-pptx/references/layout-families.md +161 -265
- package/plugin/skills/lit-pptx/references/stages/autopilot.md +30 -70
- package/plugin/skills/lit-pptx/references/stages/interview.md +36 -68
- package/plugin/skills/lit-pptx/references/stages/plan.md +26 -67
- package/plugin/skills/lit-pptx/references/title-treatments.md +93 -145
- package/plugin/skills/lit-pptx/references/tonalities/atlas.md +95 -108
- package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
- package/plugin/skills/lit-pptx/references/tonalities/chalk.md +107 -122
- package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
- package/plugin/skills/lit-pptx/references/tonalities/gazette.md +87 -111
- package/plugin/skills/lit-pptx/references/tonalities/ledger.md +96 -125
- package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
- package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
- package/plugin/skills/lit-pptx/references/tonalities/night.md +104 -131
- package/plugin/skills/lit-pptx/references/tonalities/paper.md +114 -130
- package/plugin/skills/lit-pptx/references/tonalities/riso.md +137 -0
- package/plugin/skills/lit-pptx/references/tonalities/signal.md +96 -103
- package/plugin/skills/lit-pptx/references/tonalities/studio.md +81 -112
- package/plugin/skills/lit-pptx/scripts/compile-deck.js +4 -6
- package/plugin/skills/lit-pptx/scripts/craft_extras.py +135 -91
- package/plugin/skills/lit-pptx/scripts/deck_craft.py +1 -1
- package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
- package/plugin/skills/lit-pptx/scripts/layout_inventory.py +1 -1
- package/plugin/skills/lit-pptx/scripts/learn_template.py +1 -1
- package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +370 -563
- package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
- package/plugin/skills/lit-pptx/scripts/qa_deck.py +6 -6
- package/plugin/skills/lit-pptx/scripts/render_pages.py +31 -0
- package/plugin/skills/lit-pptx/scripts/validate_pptx.py +1 -1
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +167 -191
- package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +117 -166
- package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +307 -330
- package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
- package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
- package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
- package/plugin/skills/lit-schematic/SKILL.md +114 -0
- package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/plugin/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/plugin/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/plugin/skills/lit-schematic/references/journal-figures.md +72 -0
- package/plugin/skills/lit-schematic/references/kit-api.md +134 -0
- package/plugin/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/plugin/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/plugin/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/plugin/skills/lit-schematic/references/verification.md +100 -0
- package/plugin/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/plugin/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
- package/plugin/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/plugin/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/plugin/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/plugin/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/plugin/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/plugin/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/plugin/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/plugin/skills/lit-schematic/scripts/render.mjs +233 -0
- package/plugin/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/plugin/skills/lit-scientific-visualization/SKILL.md +17 -6
- package/plugin/skills/lit-typographic-motion/SKILL.md +58 -48
- package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +13 -2
- package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
- package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
- package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +65 -1
- package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +298 -0
- package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +143 -0
- package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
- package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +7 -1
- package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +9 -12
- package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +5 -3
- package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +7 -6
- package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +37 -4
- package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +19 -8
- package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +45 -6
- package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +7 -5
- package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +121 -0
- package/plugin/skills/lit-typographic-motion/engine/node/host.mjs +34 -0
- package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
- package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +34 -20
- package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +19 -9
- package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
- package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
- package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
- package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +127 -29
- package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +7 -6
- package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +59 -5
- package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +141 -9
- package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +28 -5
- package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
- package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +213 -0
- package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
- package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +14 -2
- package/plugin/skills/lit-typographic-motion/engine/stage/init.js +11 -1
- package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +6 -1
- package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +83 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
- package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
- package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
- package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +6 -4
- package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +4 -2
- package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +7 -5
- package/plugin/skills/lit-typographic-motion/references/cover.md +394 -443
- package/plugin/skills/lit-typographic-motion/references/craft-loop.md +57 -87
- package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
- package/plugin/skills/lit-typographic-motion/references/look.md +94 -129
- package/plugin/skills/lit-typographic-motion/references/runtime.md +58 -91
- package/plugin/skills/lit-typographic-motion/references/sound.md +130 -99
- package/plugin/skills/lit-typographic-motion/references/stage.md +190 -215
- package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
- package/plugin/skills/lit-typographic-motion/references/style-bibles.md +108 -97
- package/plugin/skills/lit-typographic-motion/references/treatment.md +191 -143
- package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +17 -5
- package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +47 -7
- package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
- package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
- package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
- package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
- package/plugin/skills/litresearch/SKILL.md +1 -0
- package/plugin/skills/readme-studio/SKILL.md +2 -0
- package/plugin/skills/readme-studio/templates/hyperframes-cover/package-lock.json +3 -3
- package/plugin/skills/readme-studio/templates/remotion-cover/package-lock.json +3 -3
- package/plugin/skills/review-work/SKILL.md +1 -1
- package/plugin/skills/start-work/SKILL.md +1 -1
|
@@ -1,239 +1,214 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Copy lives in a single `COPY` object at the top of the page script, one entry per `copy.lines` line, word
|
|
32
|
-
for word. That keeps edits in one place, and the text QA then has to find every line on screen; a line it
|
|
33
|
-
cannot find is quoted in a `TEXT-COPY-FOUND` failure.
|
|
34
|
-
|
|
35
|
-
A bare skeleton (every angle-bracket value is yours to fill):
|
|
1
|
+
# Stage path
|
|
2
|
+
|
|
3
|
+
Read this after the treatment sets `path: stage`, with `studio.md`. On the stage path you author the
|
|
4
|
+
film as a web page and the renderer captures it frame by frame, deterministically, then runs the gate.
|
|
5
|
+
The house style gives the frame: palette, type roles, layout zones, motion tokens and hand-offs, served
|
|
6
|
+
to the page as `/lit/style.css` and `/lit/style.js`. The subject, its drawing and its motion are yours.
|
|
7
|
+
Start every page from `motion.mjs scaffold --out <dir>`, which writes the structure from the treatment.
|
|
8
|
+
|
|
9
|
+
## Contract
|
|
10
|
+
|
|
11
|
+
- Write `stage/index.html` inside the run's output directory, plus any local assets it needs:
|
|
12
|
+
SVG, PNG, JPG, WebP, JS, CSS and WAV files beside it. Nothing else is served.
|
|
13
|
+
- The page loads the fonts, the style and the kit from the renderer's own routes:
|
|
14
|
+
`<link rel="stylesheet" href="/lit/fonts.css">`, `<link rel="stylesheet" href="/lit/style.css">`,
|
|
15
|
+
`<script src="/lit/style.js"></script>` and `<script src="/lit/stage-kit.js"></script>`.
|
|
16
|
+
- Each shot's copy sits in its layout's type zone, in a type-role class and a colour class of the style;
|
|
17
|
+
the gate's style rules check the result (`studio.md`).
|
|
18
|
+
- The page calls `LitStage.define({ width, height, fps, duration, render })`, or sets
|
|
19
|
+
`window.litStage` to the same object. `render(t)` draws the frame at `t` seconds. The renderer
|
|
20
|
+
calls it once per frame, in order, from 0; the page never runs its own loop.
|
|
21
|
+
- Size is exactly 1920×1080 for `format: 16:9` or 1080×1920 for `format: 9:16`, matching the
|
|
22
|
+
treatment. A capture of any other size stops the run (exit 17).
|
|
23
|
+
- `fps` is 60. Use 30 only when the treatment says so, which it may only when the request asks for 30 fps.
|
|
24
|
+
- `duration` must land within ±10 % of `treatment.durationSec`, or the gate fails. Length comes
|
|
25
|
+
from the treatment's arc; do not trim the page to finish sooner.
|
|
26
|
+
- Put the copy in one `COPY` object at the top of `stage/index.html`, so it is easy to edit and
|
|
27
|
+
easy to find. Every `copy.lines` entry appears verbatim there, and the page must show each one:
|
|
28
|
+
the QA replay quotes any line it cannot find on screen (exit 17).
|
|
29
|
+
|
|
30
|
+
The scaffold writes the page; its shape, with placeholders only:
|
|
36
31
|
|
|
37
32
|
```html
|
|
38
33
|
<!doctype html>
|
|
39
34
|
<meta charset="utf-8">
|
|
40
35
|
<link rel="stylesheet" href="/lit/fonts.css">
|
|
36
|
+
<link rel="stylesheet" href="/lit/style.css">
|
|
37
|
+
<script src="/lit/style.js"></script>
|
|
41
38
|
<script src="/lit/stage-kit.js"></script>
|
|
42
|
-
<style>html, body { margin: 0; width: <width>px; height: <height>px; overflow: hidden; background: <colour>; }</style>
|
|
43
39
|
<body>
|
|
44
|
-
<
|
|
45
|
-
|
|
40
|
+
<section class="shot" data-shot="0">
|
|
41
|
+
<svg class="subject" data-zone="subject"></svg>
|
|
42
|
+
<div class="type" data-zone="type"><p class="lit-headline lit-ink" data-copy="0"></p></div>
|
|
43
|
+
</section>
|
|
46
44
|
<script>
|
|
47
|
-
const COPY =
|
|
48
|
-
const { define,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
text(h);
|
|
45
|
+
const COPY = ["<one copy line>"];
|
|
46
|
+
const { define, shot, place, tokens, text } = LitStage;
|
|
47
|
+
// place each shot's zones from LitTimeline, set the COPY lines, then:
|
|
48
|
+
const DRAW = [(s, svg, t) => { /* the subject of shot 1, from s.p, s.local, s.enter() */ }];
|
|
52
49
|
define({ width: <width>, height: <height>, fps: 60, duration: <seconds>, render(t) {
|
|
53
|
-
|
|
50
|
+
const s = shot(t);
|
|
51
|
+
DRAW[s.index](s, document.querySelectorAll(".subject")[s.index], t);
|
|
54
52
|
} });
|
|
55
53
|
</script>
|
|
56
54
|
</body>
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
offset overlaps the previous step
|
|
78
|
-
`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
##
|
|
102
|
-
|
|
103
|
-
`/lit/fonts.css` declares only the verified faces, each with `font-display: block`, so
|
|
104
|
-
captured
|
|
105
|
-
|
|
106
|
-
| Family | Weights
|
|
57
|
+
## Kit
|
|
58
|
+
|
|
59
|
+
Every primitive is a pure function of its inputs. `LitStage` holds them all.
|
|
60
|
+
|
|
61
|
+
- Eases: `ease.outCubic(p)`, `ease.inOutSine(p)`, `ease.outBack(p)`, `ease.standard(p)`,
|
|
62
|
+
`ease.emphasized(p)`, `ease.decelerate(p)`, `ease.accelerate(p)`; each maps 0..1 to 0..1 with
|
|
63
|
+
exact ends.
|
|
64
|
+
- `cubicBezier(x1, y1, x2, y2)` returns an ease: `const e = cubicBezier(0.2, 0, 0, 1); e(0.5)`.
|
|
65
|
+
- `spring({ stiffness, damping, mass, velocity })` returns an analytic position from 0 to 1:
|
|
66
|
+
`const s = spring({ damping: 14 }); el.style.scale = s(t - <start>);`.
|
|
67
|
+
`spring.settle({ damping: 14 })` returns the seconds it needs to settle within 0.1 %.
|
|
68
|
+
- `kf(t, keys)`: `kf(t, [{ t: 0, v: 0, ease: "outCubic" }, { t: 1.2, v: 240 }])`. Values may be
|
|
69
|
+
numbers, number arrays or colours (`"#rrggbb"`, `"rgb(...)"`); `ease` on a key shapes the segment
|
|
70
|
+
that starts there; outside the keys the ends hold.
|
|
71
|
+
- `stagger(i, each, { from, count })`: `const d = stagger(i, 0.06, { from: "center", count: n });`.
|
|
72
|
+
- `at(t, start, dur, ease)` returns eased local progress, clamped to 0..1.
|
|
73
|
+
- `seq([name, dur, offset?], ...)`: `const tl = seq(["in", 0.6], ["hold", 1.8], ["out", 0.5, -0.2]);`
|
|
74
|
+
then `tl.p("in", t)`, `tl.local("hold", t)`, `tl.active("out", t)`, `tl.seg.out.start`,
|
|
75
|
+
`tl.duration`. A negative offset overlaps the previous step.
|
|
76
|
+
- `rand(seed)` returns a seeded generator: `const r = rand(<seed>); r();`. Also
|
|
77
|
+
`rand.int(<seed>)(1, 6)` and `rand.range(<seed>)(-8, 8)`.
|
|
78
|
+
- `splitText(el, { by })` with `by` = `grapheme`, `word`, `eojeol` or `line` replaces the element's
|
|
79
|
+
text with `<span data-lit-part>` units and returns them:
|
|
80
|
+
`splitText(el, { by: "eojeol" }).forEach((s, i) => { s.style.opacity = at(t, i * 0.08, 0.4); });`.
|
|
81
|
+
Units are inline-block so transforms apply. Given a string it returns the pieces. It never splits
|
|
82
|
+
a Hangul syllable, and `eojeol` keeps each space-separated word whole.
|
|
83
|
+
- `drawPath(pathEl, p)` draws an SVG stroke from 0 to 1: `drawPath(stroke, at(t, 1, 1.4, ease.inOutSine));`.
|
|
84
|
+
- `morph(fromD, toD, { samples })` returns `p => d` for two single-subpath shapes:
|
|
85
|
+
`const m = morph(shapeA, shapeB); pathEl.setAttribute("d", m(at(t, 2, 0.8)));`.
|
|
86
|
+
- `clipRect(el, p, { from })` reveals from `left`, `right`, `top`, `bottom` or `center`;
|
|
87
|
+
`wipe(el, p, { from })` is the same reveal.
|
|
88
|
+
- `clipCircle(el, p, { x, y })` opens an iris from `x`% `y`%.
|
|
89
|
+
- `maskLinear(el, p, { angle, feather })` makes a soft-edged reveal along an angle.
|
|
90
|
+
- `mix(a, b, t, { space })` blends two colours in oklab (default) or sRGB:
|
|
91
|
+
`el.style.background = mix(<colour a>, <colour b>, p);`. `rgba(colour, alpha)` sets alpha.
|
|
92
|
+
- `clamp`, `lerp`, `invLerp`, `remap(x, a, b, c, d)` and `smoothstep(a, b, x)` for arithmetic.
|
|
93
|
+
- `text(el, { decor })` marks a text run; `text({ content, x, y, w, h })` registers canvas text
|
|
94
|
+
(see Text).
|
|
95
|
+
- The style and the timeline (`studio.md`): `shot(t)` (the shot at `t`, with `p`, `local`,
|
|
96
|
+
`enter(delay, dur)`, `exit(dur)`), `zone(layout, part)` and `place(el, layout, part)` (a layout zone in
|
|
97
|
+
pixels), `tokens()` (the style's eases, durations, staggers and springs per object class).
|
|
98
|
+
|
|
99
|
+
## Fonts
|
|
100
|
+
|
|
101
|
+
`/lit/fonts.css` declares only the product's verified faces, each with `font-display: block`, so
|
|
102
|
+
no frame is captured with a fallback face. Use these family names exactly:
|
|
103
|
+
|
|
104
|
+
| Family | Weights and widths | Scripts and role |
|
|
107
105
|
| --- | --- | --- |
|
|
108
|
-
| `"Pretendard"` | 400, 700 | Hangul and Latin
|
|
106
|
+
| `"Pretendard"` | 400, 700 | Hangul and Latin; body and display |
|
|
109
107
|
| `"Archivo"` | 400, 700, 900 at `font-stretch` 75 %, 100 %, 125 % | Latin display |
|
|
110
108
|
| `"VT323"` | 400 | Latin terminal voice |
|
|
111
109
|
| `"Silkscreen"` | 400, 700 | Latin pixel voice |
|
|
112
110
|
| `"Galmuri9"` | 400 | Hangul and Latin pixel voice |
|
|
113
111
|
| `"MesloLGS NF"` | 400 | Latin monospace |
|
|
114
|
-
| `"JetBrains Mono"` | variable `wght`
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
##
|
|
121
|
-
|
|
122
|
-
The renderer
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
`
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
##
|
|
112
|
+
| `"JetBrains Mono"` | 100–800 (variable `wght`) | Latin monospace with a fixed advance; weight motion never reflows |
|
|
113
|
+
|
|
114
|
+
Any other family falls back to a system face. The QA replay reports that, and fails it for copy
|
|
115
|
+
text. Set Korean copy in Pretendard. Never ask for a weight the family does not have (the browser
|
|
116
|
+
would synthesize a fake bold), and never animate tracking or width on Hangul.
|
|
117
|
+
|
|
118
|
+
## Clock
|
|
119
|
+
|
|
120
|
+
The renderer owns time. It steps a virtual clock frame by frame from 0 and captures the frames in
|
|
121
|
+
order. `Date`, `performance.now`, `setTimeout`, `setInterval`, `requestAnimationFrame`,
|
|
122
|
+
`requestIdleCallback`, `document.timeline.currentTime`, CSS animations and transitions, the Web
|
|
123
|
+
Animations API (its `finished` promises included), SVG SMIL and `Math.random` (seeded from the
|
|
124
|
+
treatment) all follow that clock. So CSS keyframes, WAAPI chains and timers are safe to use.
|
|
125
|
+
|
|
126
|
+
Anything outside the clock is not. Never let `performance.timeOrigin`, `crypto.getRandomValues` or
|
|
127
|
+
any other real clock or entropy reach a visible value: a second capture in a fresh browser compares
|
|
128
|
+
sampled frames pixel by pixel, and a difference stops the run (exit 18) naming the frame and the
|
|
129
|
+
region. For variation, use `LitStage.rand(<seed>)`.
|
|
130
|
+
|
|
131
|
+
## Forbidden
|
|
132
|
+
|
|
133
|
+
- Elements `<video>`, `<audio>`, `<iframe>`, `<object>`, `<embed>` and `<frame>`; the APIs
|
|
134
|
+
`new Audio()`, `AudioContext` and `OfflineAudioContext`; `Worker`, `SharedWorker` and service
|
|
135
|
+
workers. Each stops the run with exit 17, naming the element or API. Sound comes from the
|
|
136
|
+
treatment's `sound` plan, never from the page.
|
|
137
|
+
- Network of any kind: `WebSocket`, `WebTransport`, `RTCPeerConnection`, any absolute `http(s)://`
|
|
138
|
+
or protocol-relative (`//…`) URL, and preconnect or prefetch links. Each is exit 19. Everything
|
|
139
|
+
the page uses is local.
|
|
140
|
+
- Third-party libraries: never install, download or copy one into the stage directory. Use the kit
|
|
141
|
+
and your own code. The one exception is the pinned three.js build the renderer itself serves at
|
|
142
|
+
`/lit/three/` for a `depth: 3d` film (`depth.md`); import it through the import map, never from a
|
|
143
|
+
CDN.
|
|
144
|
+
- Rasters: at most 24 raster images and 8 MB in total. Ten or more rasters of the same size (a
|
|
145
|
+
flipbook), or any animated GIF, APNG or WebP, is exit 17. Rasters are textures and stills, never a
|
|
146
|
+
frame sequence.
|
|
147
|
+
- Hand-encoded films are not the deliverable: no frame loop encoded by hand, no screen recording,
|
|
148
|
+
no raster flipbook. Every frame passes through the renderer.
|
|
149
|
+
|
|
150
|
+
## Text
|
|
151
|
+
|
|
152
|
+
The QA replay reads DOM text in a separate browser and never touches the master capture.
|
|
153
|
+
|
|
154
|
+
- Mark each copy element with `LitStage.text(el)`, or let its nearest block element carry the run.
|
|
155
|
+
A run is the text of that element, however it is split into spans.
|
|
156
|
+
- Illustrative text inside a drawn subject is decor: `text(el, { decor: true })`. Decor is exempt
|
|
157
|
+
from title-safe and the reading floor, its contrast is a warning only, it may never carry a copy
|
|
158
|
+
line, and it may cover at most 25 % of the visible text area in any sample.
|
|
159
|
+
- Canvas and WebGL text is invisible to the QA unless you register it every frame with
|
|
160
|
+
`LitStage.text({ content, x, y, w, h })`. Unregistered canvas text is reported as not measured.
|
|
161
|
+
- Copy stays inside the central 90 % of the frame, reaches 4.5:1 contrast (3:1 when its font size
|
|
162
|
+
is at least 3 % of the frame's short side), and stays readable for at least its reading floor.
|
|
163
|
+
- Copy stays on the style and in its shot's type zone, and no two text runs overlap: `TEXT-ON-STYLE`,
|
|
164
|
+
`TEXT-ZONE` and `TEXT-OVERLAP` (`studio.md`, Style rules in the gate). An empty frame of any colour
|
|
165
|
+
for more than 1 s fails `FLAT-FRAME`.
|
|
166
|
+
- Never put the request, the idea, a file name or an internal term on screen as a label.
|
|
167
|
+
|
|
168
|
+
## Unsupported
|
|
169
|
+
|
|
170
|
+
- Morphs between shapes with more than one subpath: `morph` throws
|
|
171
|
+
`morph: multi-subpath paths are unsupported`. Morph each subpath separately, or cross-fade.
|
|
172
|
+
- Anything that reads the real clock or unseeded entropy for a visible value.
|
|
173
|
+
- Video and audio elements, and any page-side sound.
|
|
174
|
+
- No tested effect is non-deterministic on the stage renderer: CSS `filter: blur()`,
|
|
175
|
+
`backdrop-filter`, `mix-blend-mode`, `box-shadow`, SVG `feGaussianBlur` and SMIL, Canvas2D
|
|
176
|
+
`shadowBlur` and a WebGL shader all match a fresh replay pixel for pixel. The renderer rasterizes
|
|
177
|
+
every tile in full on the CPU (SwiftShader, no partial raster). An element whose opacity and
|
|
178
|
+
transform change together can still rasterize one level apart depending on which earlier frames
|
|
179
|
+
were painted and captured, so the determinism replay paints and captures every frame exactly as
|
|
180
|
+
the master does; stills-only frames may differ from the master by that one level. For WebGL, create the context with
|
|
181
|
+
`preserveDrawingBuffer: true`.
|
|
182
|
+
- That is the software rung. A `depth: 3d` treatment renders on the GPU rung instead (ANGLE on Metal
|
|
183
|
+
on macOS) and is held to the same determinism replay; when the GPU rung cannot start or has no
|
|
184
|
+
WebGL, the render falls back to the software rung and the report and manifest say so (`depth.md`).
|
|
185
|
+
|
|
186
|
+
## Commands
|
|
187
|
+
|
|
188
|
+
`SKILL_ROOT` is the skill's directory; run the installed commands by absolute path.
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
|
-
node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round
|
|
192
|
-
node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round
|
|
191
|
+
node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round <N> --stills-only
|
|
192
|
+
node "$SKILL_ROOT/scripts/motion.mjs" stage --out <dir> --round <N>
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
The
|
|
196
|
-
|
|
197
|
-
`stills/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
- `MO-C-13` the preview is at most 3 MB and the poster at most 1 MB (a master above 100 MB per 10 s warns).
|
|
216
|
-
- `MO-C-14` the reduced-motion still (the final beat's midpoint) exists.
|
|
217
|
-
- `MO-D-03` no empty near-black run longer than 2.4 s (1 s extra is allowed at the very start or end).
|
|
218
|
-
- `MO-C-02` WebGL on the software rung, reported only when the page uses WebGL.
|
|
219
|
-
- `MO-C-09` the determinism replay matched.
|
|
220
|
-
- `MO-A-37..41` the film, preview, poster and reduced-motion still are all present.
|
|
221
|
-
- The `TEXT-*` rules above and the `SOUND-*` rules from `references/sound.md`.
|
|
222
|
-
|
|
223
|
-
No rule is waived to pass, and the flash audit is never weakened.
|
|
224
|
-
|
|
225
|
-
## Exit codes on this path
|
|
226
|
-
|
|
227
|
-
| Exit | State | What to do |
|
|
228
|
-
| --- | --- | --- |
|
|
229
|
-
| 10 | `BLOCKED_NO_CHROME` | Install Chrome or set `CHROME_PATH`. |
|
|
230
|
-
| 11 | `BLOCKED_NO_WEBGL2` | Only when the page asked for WebGL and no rung had it. |
|
|
231
|
-
| 12 | `BLOCKED_NO_FFMPEG_FOR_VIDEO` | The stills and sheet exist; install ffmpeg for the film. |
|
|
232
|
-
| 13 | `GATE_FAIL_QA` | Fix the named rule and render the next round. |
|
|
233
|
-
| 14 | `BLOCKED_DEPS_NOT_PREWARMED` | The user runs `npx @litfamily/litgravity runtime install motion` in a terminal (or as an allowed `run_command`). |
|
|
234
|
-
| 15 | `BLOCKED_FONT_FETCH` | A cached font is missing or fails its hash; same pre-warm command. |
|
|
235
|
-
| 16 | `BLOCKED_TREATMENT_INVALID` | Fix the named treatment field. |
|
|
236
|
-
| 17 | `STAGE_CONTRACT_ERROR` | Fix the element, API, raster, size, fps or missing copy the message names. |
|
|
237
|
-
| 18 | `STAGE_NONDETERMINISTIC` | Drive the named frame's source from `t` or a seeded `rand`. |
|
|
238
|
-
| 19 | `STAGE_NETWORK_REQUEST` | Remove the URL or connection; everything is local. |
|
|
239
|
-
| 20 | `SOUND_INVALID` | Fix the bed or the track the message names. |
|
|
195
|
+
The first is the board round: every beat midpoint, a −6 / 0 / +6 frame transition strip per cut, a
|
|
196
|
+
12-frame contact sheet, the storyboard `stills/board.png`, and the board check (the text QA replay with
|
|
197
|
+
the style rules) in `stills/check.json`; exit 13 `BOARD_CHECK_FAIL` names each failed rule. Nothing is
|
|
198
|
+
encoded. The second is the full render: the master, the preview, the poster, the reduced-motion still,
|
|
199
|
+
the determinism re-check, the text QA replay, the sound mux, the gate and the board again. Give the full render call a timeout of at least 600 s, and
|
|
200
|
+
never shorten the film to save render time.
|
|
201
|
+
|
|
202
|
+
| Exit | Meaning |
|
|
203
|
+
| --- | --- |
|
|
204
|
+
| 10 | No Chrome |
|
|
205
|
+
| 11 | The page asked for WebGL and none is available on any rung |
|
|
206
|
+
| 12 | No ffmpeg; the stills and the sheet are still written |
|
|
207
|
+
| 13 | Gate FAIL, or the board check failed on a stills-only render |
|
|
208
|
+
| 14 | Runtime not pre-warmed |
|
|
209
|
+
| 15 | A font is missing or its hash differs |
|
|
210
|
+
| 16 | Treatment invalid (names the field) |
|
|
211
|
+
| 17 | Stage contract error |
|
|
212
|
+
| 18 | Nondeterministic frame |
|
|
213
|
+
| 19 | Network request |
|
|
214
|
+
| 20 | Sound invalid |
|