@lincyaw/skills 1.0.0-rc.69 → 1.0.0-rc.70
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincyaw/skills",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.70",
|
|
4
4
|
"description": "Presmium's bundled authoring, animation, presentation and plugin-development skills for coding agents",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"jiti": "^2.7.0",
|
|
39
|
-
"@lincyaw/kernel": "1.0.0-rc.
|
|
39
|
+
"@lincyaw/kernel": "1.0.0-rc.70"
|
|
40
40
|
},
|
|
41
41
|
"presmium": {
|
|
42
42
|
"skills": [
|
package/skills/index.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"references/publishing.md",
|
|
13
13
|
"references/writing.md"
|
|
14
14
|
],
|
|
15
|
-
"version": "1.0.0-rc.
|
|
15
|
+
"version": "1.0.0-rc.70",
|
|
16
16
|
"hash": "15f7c877601430994bd289557728924436adb6cc36401b3fbee342b03dcdf15c"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
"references/team.md",
|
|
546
546
|
"references/timeline.md"
|
|
547
547
|
],
|
|
548
|
-
"version": "1.0.0-rc.
|
|
548
|
+
"version": "1.0.0-rc.70",
|
|
549
549
|
"hash": "e03f7e914cde64664fc473e7f0a58089283c68f07f213d5be086138089f2e13e"
|
|
550
550
|
},
|
|
551
551
|
{
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
"references/plugin.md",
|
|
557
557
|
"references/testing.md"
|
|
558
558
|
],
|
|
559
|
-
"version": "1.0.0-rc.
|
|
560
|
-
"hash": "
|
|
559
|
+
"version": "1.0.0-rc.70",
|
|
560
|
+
"hash": "96422f5cef6a97bba23c9c67b7fb0ee491b18f01f789e262ca24b274e7fabaa1"
|
|
561
561
|
}
|
|
562
562
|
]
|
|
@@ -258,9 +258,11 @@ server(ctx) { // once per document: presmium dev serves
|
|
|
258
258
|
`ctx.service(DOCUMENT_FILES)` when the program running the server (`presmium serve`, the studio)
|
|
259
259
|
provides it (paths relative to `workspaceRoot`), so the write is reviewed and versioned; write directly
|
|
260
260
|
only when it is absent. Both tokens come from `@lincyaw/kernel`.
|
|
261
|
-
- Browser: `useServer()` returns `{ available, member, fetch(pluginId, path, init?), events(pluginId, path) }`
|
|
261
|
+
- Browser: `useServer()` returns `{ available, member, fetch(pluginId, path, init?), events(pluginId, path), resourceURL?(pluginId, path) }`
|
|
262
262
|
(`events` is an `EventSource`; answer it with `sseResponse`). `fetch` sends `Accept-Language` with the page's
|
|
263
|
-
language; answer in it.
|
|
263
|
+
language; answer in it. Optional `resourceURL` gives native media a document-scoped GET URL using the page's
|
|
264
|
+
existing authentication and proxy root; normal route authorization and version checks still apply. In a built site
|
|
265
|
+
`available` is false: hide the control or degrade.
|
|
264
266
|
|
|
265
267
|
An `Exporter` is `{ id, label: { 'zh-CN': ..., en: ... }, available?(doc, config), run(ctx) }`; `ctx` gives
|
|
266
268
|
`deckDir`, `workspaceRoot`, `config`, an empty `outDir`, `signal` (stop your processes and reject),
|
|
@@ -300,8 +302,8 @@ export default function PmPoll({ question, choices }: {
|
|
|
300
302
|
| `useStepState({ from, to? })` | `{ active, reached, done }` of internal steps `[from, to)`, relative to the block's `at`; do not subtract `at` yourself |
|
|
301
303
|
| `useStepScope()`, `useBlockStepRange()` | `scope.step(k)` is the absolute step of internal step k; `useStepState(useBlockStepRange())` is active while the block (within its parents) is shown: stop media and background work outside it |
|
|
302
304
|
| `useStepTime({ until? })` | Milliseconds since the component's step began; `Infinity` when settled (stepped back, document view, reduced motion, after `until`, a slide that is not the current one). The lecture replay and video export drive it. Pause your animation library's timeline and seek to this time; never play by the page clock |
|
|
303
|
-
| `useService(STEP_CLOCK)?.wait(promise)` | Register async preparation
|
|
304
|
-
| `useService(STEP_CLOCK)?.registerPreparation?.(slide, prepare)` | Register bounded look-ahead preparation for a slide; return the unsubscribe function from the component's effect. `prepare(slides)` warms those pictures and waits for their
|
|
305
|
+
| `useService(STEP_CLOCK)?.wait(promise, slide?)` | Register async picture preparation (loading a module, WebGL) for its slide. `settled(slides)` waits for those slides and unscoped work; `settled()` waits for all work before a capture/export frame. Failures follow the same scope. |
|
|
306
|
+
| `useService(STEP_CLOCK)?.registerPreparation?.(slide, prepare)` | Register bounded look-ahead preparation for a slide; return the unsubscribe function from the component's effect. `prepare(slides)` warms those pictures and waits for their work; `{ wait: false }` starts background warming. Do not play media or advance a step while warming it. |
|
|
305
307
|
| `usePrefersReducedMotion()` | When true, show the final state directly |
|
|
306
308
|
| `useActions(elementRef, { name: (seeking) => ... }, { clear })` | Named actions: call the returned `run(name)` from buttons. A recorded lecture replays them, and the narration's ``{cue to=<block>}`click <name>` `` runs them; on a jump the host calls `clear` and replays in order. The look must be a function of the actions so far |
|
|
307
309
|
| `useCursor()`, `useViewRole()`, `usePresentationMode()` | `{ slide, step }`; `'audience' \| 'presenter' \| 'reader'`; `'slides' \| 'document'`. The current step (`useHost().useStep()`, `useHost()` being the object behind these functions) is `Infinity` in the fully expanded document view: a component with internal steps may then give readers its own stepper; the look is a function of (section step, local step) |
|