@glissade/core 0.8.0-pre.0 → 0.8.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/dist/index.d.ts +7 -1
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -486,7 +486,13 @@ interface TimelineBuilder {
|
|
|
486
486
|
}): TimelineBuilder;
|
|
487
487
|
/** Compiles to a marker; the callback is Player-registered, never serialized (§4.2). */
|
|
488
488
|
call(fn: () => void, at?: Position): TimelineBuilder;
|
|
489
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* A named cue marker — the composer-signal substrate. Fired on crossing via
|
|
491
|
+
* `player.onCue(kind, …)` and emitted to the render-time `cues.json`. Every
|
|
492
|
+
* cue carries a `data.kind` (default `'cue'`); pass your own to group them
|
|
493
|
+
* (e.g. `{ kind: 'chapter', title: '…' }`). `data.title` becomes the chapter
|
|
494
|
+
* label in `--chapters vtt`.
|
|
495
|
+
*/
|
|
490
496
|
cue(at: Position, name: string, data?: Json): TimelineBuilder;
|
|
491
497
|
/** An ad-break cue: a marker with `data.kind: 'ad-break'` + optional duration (§ad-break). */
|
|
492
498
|
adBreak(at: Position, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -1385,13 +1385,14 @@ function buildTimeline(build, init = {}) {
|
|
|
1385
1385
|
return builder;
|
|
1386
1386
|
},
|
|
1387
1387
|
cue(at, name, data) {
|
|
1388
|
-
|
|
1388
|
+
const merged = data !== void 0 && data !== null && typeof data === "object" && !Array.isArray(data) ? {
|
|
1389
|
+
kind: "cue",
|
|
1390
|
+
...data
|
|
1391
|
+
} : { kind: "cue" };
|
|
1392
|
+
markers.push({
|
|
1389
1393
|
t: resolvePosition(at),
|
|
1390
1394
|
name,
|
|
1391
|
-
data
|
|
1392
|
-
} : {
|
|
1393
|
-
t: resolvePosition(at),
|
|
1394
|
-
name
|
|
1395
|
+
data: merged
|
|
1395
1396
|
});
|
|
1396
1397
|
return builder;
|
|
1397
1398
|
},
|
package/package.json
CHANGED