@litfamily/litclaude 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +8 -8
  3. package/README_ko-KR.md +8 -8
  4. package/bin/litclaude-ai.js +173 -4
  5. package/docs/assets/readme/badge-version.svg +1 -1
  6. package/package.json +1 -1
  7. package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
  8. package/plugins/litclaude/bin/litclaude-ai +1 -0
  9. package/plugins/litclaude/bin/litclaude-hook.js +21 -7
  10. package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
  11. package/plugins/litclaude/hooks/hooks.json +1 -1
  12. package/plugins/litclaude/lib/agent-file/apply.mjs +150 -0
  13. package/plugins/litclaude/lib/agent-file/attribution.mjs +62 -0
  14. package/plugins/litclaude/lib/agent-file/block.md +12 -0
  15. package/plugins/litclaude/lib/agent-file/cli.mjs +71 -0
  16. package/plugins/litclaude/lib/agent-file/managed-block.mjs +82 -0
  17. package/plugins/litclaude/lib/agent-file/project-block.md +9 -0
  18. package/plugins/litclaude/lib/canonical-skill-resources.mjs +14 -14
  19. package/plugins/litclaude/lib/mark.mjs +23 -6
  20. package/plugins/litclaude/lib/mod/state.mjs +12 -0
  21. package/plugins/litclaude/lib/mod/view.mjs +9 -3
  22. package/plugins/litclaude/lib/rewind/brief.mjs +12 -2
  23. package/plugins/litclaude/lib/rewind/collect.mjs +31 -9
  24. package/plugins/litclaude/lib/rewind/next-step.mjs +21 -3
  25. package/plugins/litclaude/lib/start-work-lifecycle.mjs +4 -2
  26. package/plugins/litclaude/skills/lit-adhd/SKILL.md +5 -4
  27. package/plugins/litclaude/skills/lit-init/SKILL.md +12 -0
  28. package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +1 -1
  29. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover.mjs +1 -1
  30. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +1 -0
  31. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +126 -4
  32. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +5 -1
  33. package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/init.js +13 -0
  34. package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/stage-kit.js +40 -1
  35. package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +43 -2
  36. package/plugins/litclaude/skills/readme-studio/templates/hyperframes-cover/package-lock.json +4 -4
@@ -12,7 +12,8 @@ Start every page from `motion.mjs scaffold --out <dir>`, which writes the struct
12
12
  SVG, PNG, JPG, WebP, JS, CSS and WAV files beside it. Nothing else is served.
13
13
  - The page loads the fonts, the style and the kit from the renderer's own routes:
14
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>`.
15
+ `<script src="/lit/style.js"></script>` and `<script src="/lit/stage-kit.js"></script>`; a page
16
+ with clips also loads `<script src="/lit/clips.js"></script>` (Clips).
16
17
  - Each shot's copy sits in its layout's type zone, in a type-role class and a colour class of the style;
17
18
  the gate's style rules check the result (`studio.md`).
18
19
  - The page calls `LitStage.define({ width, height, fps, duration, render })`, or sets
@@ -92,6 +93,8 @@ Every primitive is a pure function of its inputs. `LitStage` holds them all.
92
93
  - `clamp`, `lerp`, `invLerp`, `remap(x, a, b, c, d)` and `smoothstep(a, b, x)` for arithmetic.
93
94
  - `text(el, { decor })` marks a text run; `text({ content, x, y, w, h })` registers canvas text
94
95
  (see Text).
96
+ - `clip({ parent, id, box })` shows a declared keyed clip (Clips): `const boom = clip({ parent, id: "boom",
97
+ box: { x: 1200, y: 300, w: 520, h: 511 } }); boom(t, { start: 2.1 });`.
95
98
  - The style and the timeline (`studio.md`): `shot(t)` (the shot at `t`, with `p`, `local`,
96
99
  `enter(delay, dur)`, `exit(dur)`), `zone(layout, part)` and `place(el, layout, part)` (a layout zone in
97
100
  pixels), `tokens()` (the style's eases, durations, staggers and springs per object class).
@@ -115,6 +118,44 @@ Any other family falls back to a system face. The QA replay reports that, and fa
115
118
  text. Set Korean copy in Pretendard. Never ask for a weight the family does not have (the browser
116
119
  would synthesize a fake bold), and never animate tracking or width on Hangul.
117
120
 
121
+ ## Clips
122
+
123
+ Real keyed footage (a reaction clip, a spinning-cat loop shot on green screen) joins the film as a
124
+ layer inside the page: the video is keyed outside the renderer into an 8-bit RGBA PNG per frame, the
125
+ frames are declared, and the page picks the frame from film time. A declared clip is exempt from the
126
+ flipbook and count rule; every other raster keeps its limits. Nothing is encoded by hand: the
127
+ frames are captured with the page, so the flash audit, the determinism replay and the text checks
128
+ run on the final pixels as for any other film.
129
+
130
+ 1. Copy each clip's frames into the run's stage folder as `stage/clips/<dir>/frame_0001.png`,
131
+ `frame_0002.png`, and so on, with no gaps and no other image in the folder.
132
+ 2. Declare them in `stage/clips/clips.json`:
133
+
134
+ ```json
135
+ { "clips": [ { "id": "boom", "dir": "01-vine-boom", "count": 122, "fps": 30 } ] }
136
+ ```
137
+
138
+ `id` is the name the page uses; `dir` is a folder directly under `clips/`; `count` is the number of
139
+ frames; `fps` is the clip's own rate, 1 to 30. A clip used twice is declared once.
140
+ 3. The page loads `<script src="/lit/clips.js"></script>` after the kit, registers each use with
141
+ `LitStage.clip({ parent, id, box })` once, and calls the returned `show(t, opts)` from `render(t)`.
142
+ `parent` is the element the clip sits in; `box` is its place in pixels, the frame fitted inside
143
+ it. `show` returns the clip's wrapper element, or `null` while hidden; scale, fade or move that
144
+ wrapper from `t` like any other layer. The frame is `floor((t - start) * fps) + 1`, counted
145
+ from `from`, so the cue is plain arithmetic: a clip whose own sound starts at frame 85 and must
146
+ land on a cue at 0.12 s has `start = 0.12 - 84 / 30`. Options: `start` (film seconds, default 0),
147
+ `from` and `to` (the frame range, default the whole clip), `loop` (wrap by frame index), `hold`
148
+ (keep the last frame). Before `start` and past `to`, without `loop` or `hold`, the clip is hidden.
149
+
150
+ The scan refuses, with exit 17 and the clip named: more than 12 clips, 360 frames in a clip or 1500
151
+ in all, 40 MB in a clip or 128 MB in all, a frame whose long side is above 720 px (a clip is an
152
+ overlay, not the film), a frame rate above 30, frames of mixed sizes, a missing or extra frame, a
153
+ frame that is not an 8-bit RGBA PNG or has no transparent pixel in the first, middle and last frame
154
+ (an opaque video is not keyed), an animated image, and a duplicate `id`. A folder that is not
155
+ declared, or any frame sequence beside a declared clip, is a flipbook as before. Cover mode takes
156
+ no clips. Keep clips clear of copy: the text checks look at DOM text, so a clip laid over a line is
157
+ yours to catch on the stills. The manifest and report list each clip.
158
+
118
159
  ## Clock
119
160
 
120
161
  The renderer owns time. It steps a virtual clock frame by frame from 0 and captures the frames in
@@ -143,7 +184,7 @@ region. For variation, use `LitStage.rand(<seed>)`.
143
184
  CDN.
144
185
  - Rasters: at most 24 raster images and 8 MB in total. Ten or more rasters of the same size (a
145
186
  flipbook), or any animated GIF, APNG or WebP, is exit 17. Rasters are textures and stills, never a
146
- frame sequence.
187
+ frame sequence. The one frame sequence a page may carry is a declared keyed clip (Clips).
147
188
  - Hand-encoded films are not the deliverable: no frame loop encoded by hand, no screen recording,
148
189
  no raster flipbook. Every frame passes through the renderer.
149
190
 
@@ -466,16 +466,16 @@
466
466
  }
467
467
  },
468
468
  "node_modules/@hono/node-server": {
469
- "version": "2.1.1",
470
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.1.tgz",
471
- "integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==",
469
+ "version": "2.1.5",
470
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz",
471
+ "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==",
472
472
  "dev": true,
473
473
  "license": "MIT",
474
474
  "engines": {
475
475
  "node": ">=20"
476
476
  },
477
477
  "peerDependencies": {
478
- "hono": "^4"
478
+ "hono": "^4 || ^5.0.0-0"
479
479
  }
480
480
  },
481
481
  "node_modules/@img/colour": {