@pixodesk/svg-animator-core 1.0.40 → 1.0.43
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/README.md +58 -13
- package/dist/{internal-BZSJtt_h.d.ts → PxDocumentDiagnostic-DkBZYJ7X.d.cts} +227 -462
- package/dist/{internal-BZSJtt_h.d.cts → PxDocumentDiagnostic-DkBZYJ7X.d.ts} +227 -462
- package/dist/{chunk-PAE3NF2U.js → chunk-BOTZI36B.js} +183 -580
- package/dist/chunk-BOTZI36B.js.map +1 -0
- package/dist/chunk-CAZFG2HW.min.js +1 -0
- package/dist/index.cjs +240 -926
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +117 -175
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/internal.cjs +93 -91
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +378 -1
- package/dist/internal.d.ts +378 -1
- package/dist/internal.js +413 -34
- package/dist/internal.js.map +1 -1
- package/dist/internal.min.cjs +1 -1
- package/dist/internal.min.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-PAE3NF2U.js.map +0 -1
- package/dist/chunk-WIVGJ5YO.min.js +0 -1
|
@@ -79,12 +79,12 @@ type PxInfer<S> = S extends PxSchema<infer T, any> ? T : never;
|
|
|
79
79
|
* Useful for strict property-access checking on types that have an open `[key: string]: any`.
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
|
-
* type Strict =
|
|
82
|
+
* type Strict = PxRemoveIndex<PxAnimatedSvgDocument>;
|
|
83
83
|
* Strict['animator'] // PxAnimatorConfig | undefined ✓
|
|
84
84
|
* Strict['anything'] // compile error ✓
|
|
85
85
|
* @public @advanced
|
|
86
86
|
*/
|
|
87
|
-
type
|
|
87
|
+
type PxRemoveIndex<T> = {
|
|
88
88
|
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
89
89
|
};
|
|
90
90
|
type UnionMembers<T extends ReadonlyArray<PxSchema<any, any>>> = {
|
|
@@ -208,7 +208,7 @@ declare const px: {
|
|
|
208
208
|
* The base can be the result of px.object() or px.openObject() — anything with a _shape property.
|
|
209
209
|
*
|
|
210
210
|
* @example
|
|
211
|
-
* const PxSvgNodeSchema = px.extendedObject(
|
|
211
|
+
* const PxSvgNodeSchema = px.extendedObject(PxNodeBaseSchema, { width: px.number().optional() });
|
|
212
212
|
*/
|
|
213
213
|
readonly extendedObject: <B extends AnyShape, E extends AnyShape>(base: {
|
|
214
214
|
readonly _shape: B;
|
|
@@ -230,9 +230,9 @@ declare const px: {
|
|
|
230
230
|
};
|
|
231
231
|
|
|
232
232
|
/** The wire key, under the animator config block. @public @advanced */
|
|
233
|
-
declare const
|
|
233
|
+
declare const PX_WIRE_VERSION_KEY = "version";
|
|
234
234
|
/** Parsed form. Compare these, NEVER the strings: `"1.10" < "1.9"` lexically. @public @advanced */
|
|
235
|
-
interface
|
|
235
|
+
interface PxWireVersion {
|
|
236
236
|
/** Generation. A change no conversion can bridge. */
|
|
237
237
|
readonly a: number;
|
|
238
238
|
/** Player schema revision within the generation. */
|
|
@@ -241,7 +241,7 @@ interface WireVersion {
|
|
|
241
241
|
readonly c: number;
|
|
242
242
|
}
|
|
243
243
|
/** How a file's version relates to a reader's. @public @advanced */
|
|
244
|
-
declare enum
|
|
244
|
+
declare enum PxWireVersionRelation {
|
|
245
245
|
/** No stamp — unknown provenance. Assume nothing, migrate nothing. */
|
|
246
246
|
unstamped = "unstamped",
|
|
247
247
|
same = "same",
|
|
@@ -255,19 +255,19 @@ declare enum WireVersionRelation {
|
|
|
255
255
|
/** `"1.2.3"` → `{a:1,b:2,c:3}`; a missing `c` is baseline 0. `undefined` when unparseable —
|
|
256
256
|
* treated exactly like an absent stamp, never as an error. * @public @advanced
|
|
257
257
|
*/
|
|
258
|
-
declare function parseWireVersion(raw: unknown):
|
|
258
|
+
declare function parseWireVersion(raw: unknown): PxWireVersion | undefined;
|
|
259
259
|
/** @public @advanced */
|
|
260
|
-
declare function formatWireVersion(v:
|
|
260
|
+
declare function formatWireVersion(v: PxWireVersion): string;
|
|
261
261
|
/** The version this PLAYER implements, parsed. `c` is 0: the player has no editor extension. @public @advanced */
|
|
262
|
-
declare const
|
|
262
|
+
declare const PX_WIRE_VERSION: PxWireVersion;
|
|
263
263
|
/** The version stamped on a document, or `undefined` when it carries none. @public @advanced */
|
|
264
|
-
declare function readWireVersion(doc: unknown):
|
|
264
|
+
declare function readWireVersion(doc: unknown): PxWireVersion | undefined;
|
|
265
265
|
/**
|
|
266
266
|
* How `file` relates to `mine`. `readerReadsEditorPart` separates the two readers: the EDITOR
|
|
267
267
|
* compares all three parts, the PLAYER compares only `a.b` and is blind to `c`.
|
|
268
268
|
* @public @advanced
|
|
269
269
|
*/
|
|
270
|
-
declare function compareWireVersion(file:
|
|
270
|
+
declare function compareWireVersion(file: PxWireVersion | undefined, mine: PxWireVersion, readerReadsEditorPart: boolean): PxWireVersionRelation;
|
|
271
271
|
/**
|
|
272
272
|
* What to TELL the user about a version gap — and only ever alongside unknown content actually
|
|
273
273
|
* met. `undefined` means the version explains nothing, so nothing is said.
|
|
@@ -277,9 +277,9 @@ declare function compareWireVersion(file: WireVersion | undefined, mine: WireVer
|
|
|
277
277
|
* so the worst case is a document missing a feature plus a sentence saying how to close the gap.
|
|
278
278
|
* @public @advanced
|
|
279
279
|
*/
|
|
280
|
-
declare function
|
|
280
|
+
declare function wireVersionAdvice(relation: PxWireVersionRelation, file: PxWireVersion | undefined, mine: PxWireVersion, isPlayer: boolean): string | undefined;
|
|
281
281
|
/** What a step DOES to documents — and therefore whether it needs conversion code. @public @advanced */
|
|
282
|
-
declare enum
|
|
282
|
+
declare enum PxWireStepKind {
|
|
283
283
|
/**
|
|
284
284
|
* Only OPTIONAL fields were added. An older reader ignores them; a newer reader finds them
|
|
285
285
|
* absent and defaults. Nothing to convert either way — but it must still be DECLARED, so
|
|
@@ -290,16 +290,16 @@ declare enum WireStepKind {
|
|
|
290
290
|
converted = "converted"
|
|
291
291
|
}
|
|
292
292
|
/** One `b` step of the player schema. @public @advanced */
|
|
293
|
-
interface
|
|
293
|
+
interface PxWireVersionStep {
|
|
294
294
|
/** The version this step converts FROM, e.g. `'1.1'`. */
|
|
295
295
|
readonly from: string;
|
|
296
296
|
/** …and TO. Must be the `from` of the next step, so the table is one unbroken chain. */
|
|
297
297
|
readonly to: string;
|
|
298
298
|
/** Why the format moved — the sentence a future reader needs, not a commit hash. */
|
|
299
299
|
readonly reason: string;
|
|
300
|
-
readonly kind:
|
|
300
|
+
readonly kind: PxWireStepKind;
|
|
301
301
|
/**
|
|
302
|
-
* Older → newer, MUTATING the document in place. Required for {@link
|
|
302
|
+
* Older → newer, MUTATING the document in place. Required for {@link PxWireStepKind.converted}.
|
|
303
303
|
* It may not touch `meta.*`: that subtree is the editor's, and its steps are the `c` part.
|
|
304
304
|
*/
|
|
305
305
|
readonly up?: (doc: Record<string, unknown>) => void;
|
|
@@ -307,19 +307,19 @@ interface WireVersionStep {
|
|
|
307
307
|
readonly down?: (doc: Record<string, unknown>) => void;
|
|
308
308
|
}
|
|
309
309
|
/** Where the chain starts: the first RELEASED player schema. Everything older is pre-release. @public @advanced */
|
|
310
|
-
declare const
|
|
310
|
+
declare const PX_WIRE_BASELINE_VERSION = "1.1";
|
|
311
311
|
/**
|
|
312
|
-
* Every `b` step from {@link
|
|
312
|
+
* Every `b` step from {@link PX_WIRE_BASELINE_VERSION} to {@link PX_WIRE_SCHEMA_VERSION}.
|
|
313
313
|
*
|
|
314
314
|
* EMPTY IS CORRECT TODAY: 1.1 is the baseline and nothing has moved since. It exists now because
|
|
315
|
-
* the guard spec keys off it — bump `
|
|
315
|
+
* the guard spec keys off it — bump `PX_WIRE_SCHEMA_VERSION` without adding the matching step
|
|
316
316
|
* and the suite fails naming the gap. That is the whole point: the last three renames shipped
|
|
317
317
|
* because nothing forced anyone to say they had happened.
|
|
318
318
|
* @public @advanced
|
|
319
319
|
*/
|
|
320
|
-
declare const
|
|
320
|
+
declare const PX_WIRE_STEPS: ReadonlyArray<PxWireVersionStep>;
|
|
321
321
|
/** What a conversion pass did, so a caller can report it. @public @advanced */
|
|
322
|
-
interface
|
|
322
|
+
interface PxWireConversionResult {
|
|
323
323
|
/**
|
|
324
324
|
* The document to read. A converted COPY when steps applied, otherwise the input itself,
|
|
325
325
|
* unchanged and identical by reference — the caller's object is never mutated, so a failed
|
|
@@ -327,26 +327,26 @@ interface PlayerConversionResult {
|
|
|
327
327
|
*/
|
|
328
328
|
readonly doc: unknown;
|
|
329
329
|
/** The version found on the file, if any. */
|
|
330
|
-
readonly from:
|
|
331
|
-
readonly relation:
|
|
330
|
+
readonly from: PxWireVersion | undefined;
|
|
331
|
+
readonly relation: PxWireVersionRelation;
|
|
332
332
|
/** The steps actually applied, oldest first. Empty when nothing was needed. */
|
|
333
|
-
readonly applied: ReadonlyArray<
|
|
333
|
+
readonly applied: ReadonlyArray<PxWireVersionStep>;
|
|
334
334
|
/** Set only when the version could not be honored — never a refusal to render. */
|
|
335
335
|
readonly advice?: string;
|
|
336
336
|
}
|
|
337
337
|
/** Which table to run, and what to bring the document up TO. @public @advanced */
|
|
338
|
-
interface
|
|
338
|
+
interface PxWireConversionOptions {
|
|
339
339
|
/** The step table — the player's, or the editor's `meta.*` one. */
|
|
340
|
-
readonly steps: ReadonlyArray<
|
|
340
|
+
readonly steps: ReadonlyArray<PxWireVersionStep>;
|
|
341
341
|
/** The version the document should end up at. */
|
|
342
|
-
readonly target:
|
|
342
|
+
readonly target: PxWireVersion;
|
|
343
343
|
/** `true` for the EDITOR (compares and stamps `c`), `false` for the PLAYER (blind to it). */
|
|
344
344
|
readonly readerReadsEditorPart: boolean;
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
347
|
* THE STEP ENGINE — one implementation, two tables.
|
|
348
348
|
*
|
|
349
|
-
* The player runs it over `
|
|
349
|
+
* The player runs it over `PX_WIRE_STEPS`; the editor runs it a second time over its own
|
|
350
350
|
* `meta.*` table, on the document the player pass returned. Keeping it one function is what
|
|
351
351
|
* stops the two halves from drifting into two different ideas of what conversion means.
|
|
352
352
|
*
|
|
@@ -359,30 +359,30 @@ interface WireConversionConfig {
|
|
|
359
359
|
* converted one.
|
|
360
360
|
* @public @advanced
|
|
361
361
|
*/
|
|
362
|
-
declare function applyWireSteps(doc: unknown, cfg:
|
|
362
|
+
declare function applyWireSteps(doc: unknown, cfg: PxWireConversionOptions): PxWireConversionResult;
|
|
363
363
|
/**
|
|
364
364
|
* BRING A DOCUMENT UP TO THIS PLAYER'S SCHEMA — the `playerFixer` half of the pair.
|
|
365
|
-
* Runs {@link applyWireSteps} over {@link
|
|
365
|
+
* Runs {@link applyWireSteps} over {@link PX_WIRE_STEPS}, touching nothing under `meta.*`.
|
|
366
366
|
* @public @advanced
|
|
367
367
|
*/
|
|
368
|
-
declare function
|
|
368
|
+
declare function convertWireDocument(doc: unknown): PxWireConversionResult;
|
|
369
369
|
/**
|
|
370
370
|
* What an EXPLICIT down-conversion did. Unlike reading, this may refuse — it is an output the
|
|
371
371
|
* user asked for ("save for an older player"), and handing back a file that silently lacks what
|
|
372
372
|
* the older schema cannot say would be worse than saying no.
|
|
373
373
|
* @public @advanced
|
|
374
374
|
*/
|
|
375
|
-
type
|
|
375
|
+
type PxWireDowngradeResult = {
|
|
376
376
|
readonly ok: true;
|
|
377
377
|
readonly doc: unknown;
|
|
378
|
-
readonly applied: ReadonlyArray<
|
|
378
|
+
readonly applied: ReadonlyArray<PxWireVersionStep>;
|
|
379
379
|
} | {
|
|
380
380
|
readonly ok: false;
|
|
381
381
|
readonly reason: string;
|
|
382
|
-
readonly blocking: ReadonlyArray<
|
|
382
|
+
readonly blocking: ReadonlyArray<PxWireVersionStep>;
|
|
383
383
|
};
|
|
384
384
|
/** Down-convert through the PLAYER table only — `meta.*` is untouched, as on the way up. @public @advanced */
|
|
385
|
-
declare function
|
|
385
|
+
declare function downgradeWireDocument(doc: unknown, target: PxWireVersion): PxWireDowngradeResult;
|
|
386
386
|
|
|
387
387
|
/** WAAPI `fill` — which values apply outside the active period. @public */
|
|
388
388
|
declare const PxFillMode: {
|
|
@@ -479,7 +479,7 @@ type PxAlongPathMode = typeof PxAlongPathMode[keyof typeof PxAlongPathMode];
|
|
|
479
479
|
* platform's animation API (`native`), or write it from the player's own frame loop (`js`).
|
|
480
480
|
*
|
|
481
481
|
* This is the CORE set. Code that always knows which engine is running takes this (e.g.
|
|
482
|
-
* `
|
|
482
|
+
* `normalizeBindings`'s `engine` arg gates motion-along-path materialization).
|
|
483
483
|
* @public
|
|
484
484
|
*/
|
|
485
485
|
declare const PxTimelineEngine: {
|
|
@@ -496,25 +496,25 @@ type PxTimelineEngine = typeof PxTimelineEngine[keyof typeof PxTimelineEngine];
|
|
|
496
496
|
* drift: every engine is automatically an accepted value, and `auto` is visibly the one extra.
|
|
497
497
|
* @public
|
|
498
498
|
*/
|
|
499
|
-
declare const
|
|
499
|
+
declare const PxTimelineEngineSetting: {
|
|
500
500
|
readonly auto: "auto";
|
|
501
501
|
readonly native: "native";
|
|
502
502
|
readonly js: "js";
|
|
503
503
|
};
|
|
504
|
-
type
|
|
504
|
+
type PxTimelineEngineSetting = typeof PxTimelineEngineSetting[keyof typeof PxTimelineEngineSetting];
|
|
505
505
|
/** What a requested engine resolves to BEFORE the runtime probes support: `js` pins the frame
|
|
506
506
|
* loop, anything else starts at `native`. NOTE this is only the STARTING point — `auto` still
|
|
507
507
|
* falls back to `js` per document when the platform API declines an attribute, which happens at
|
|
508
508
|
* bind time (see `PxAnimatorBind`), not here. * @public @advanced
|
|
509
509
|
*/
|
|
510
|
-
declare function resolveTimelineEngine(engine:
|
|
510
|
+
declare function resolveTimelineEngine(engine: PxTimelineEngineSetting | undefined): PxTimelineEngine;
|
|
511
511
|
/** `native` is a demand, not a preference: no JS fallback when the platform API declines an attribute. @public @advanced */
|
|
512
|
-
declare function isNativeForced(engine:
|
|
512
|
+
declare function isNativeForced(engine: PxTimelineEngineSetting | undefined): boolean;
|
|
513
513
|
/** May the browser's ScrollTimeline/ViewTimeline drive a scroll/view timeline?
|
|
514
514
|
* `auto` tries it first (falling back to the player's own measurement), `native`
|
|
515
515
|
* asks for it, `js` never uses it. * @public @advanced
|
|
516
516
|
*/
|
|
517
|
-
declare function mayUseNativeScrollTimeline(engine:
|
|
517
|
+
declare function mayUseNativeScrollTimeline(engine: PxTimelineEngineSetting | undefined): boolean;
|
|
518
518
|
/**
|
|
519
519
|
* THE TRIGGER DEFAULTS — what a missing `trigger` field means. One table, declared by
|
|
520
520
|
* `PxTriggerSchema` and applied by {@link resolveTrigger}, which every player calls (the web's
|
|
@@ -695,7 +695,7 @@ declare const PxStrokeTrimSubPaths: {
|
|
|
695
695
|
};
|
|
696
696
|
type PxStrokeTrimSubPaths = typeof PxStrokeTrimSubPaths[keyof typeof PxStrokeTrimSubPaths];
|
|
697
697
|
/** @internal */
|
|
698
|
-
declare const
|
|
698
|
+
declare const PX_TEXT_CONTENT_ATTR = "textContent";
|
|
699
699
|
/** @public */
|
|
700
700
|
declare const PX_TRANSFORM_PART_KEYS: readonly ["translate", "rotate", "scale", "origin"];
|
|
701
701
|
/** Loose enums for `spreadMethod` / gradient `type` — kept on the wire as
|
|
@@ -718,7 +718,7 @@ declare const PxGradientType: {
|
|
|
718
718
|
};
|
|
719
719
|
type PxGradientType = typeof PxGradientType[keyof typeof PxGradientType];
|
|
720
720
|
/** @public @advanced */
|
|
721
|
-
declare function
|
|
721
|
+
declare function isPxDocument(doc: any): doc is PxAnimatedSvgDocument;
|
|
722
722
|
/**
|
|
723
723
|
* The animator config, at either of its TWO canonical addresses (S4).
|
|
724
724
|
*
|
|
@@ -747,12 +747,136 @@ declare function flattenAnimatorTimeline(cfg: PxAnimatorConfig): PxAnimatorConfi
|
|
|
747
747
|
*/
|
|
748
748
|
declare function nestAnimatorTimeline(cfg: PxAnimatorConfig): PxAnimatorConfig;
|
|
749
749
|
/** @public @advanced */
|
|
750
|
-
declare function
|
|
750
|
+
declare function getDefinitions(doc: PxAnimatedSvgDocument): PxDefinitions | undefined;
|
|
751
751
|
/** The bind-by-id document's `animator.bindings`, as written — `target` keeps its `#`. @public @advanced */
|
|
752
752
|
declare function getBindings(doc: PxAnimatedSvgDocument): PxBinding[] | undefined;
|
|
753
753
|
/** @public @advanced */
|
|
754
754
|
declare function getChildren(doc: PxAnimatedSvgDocument): PxNode[] | undefined;
|
|
755
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Every diagnostic a player can report, as a number a host can switch on.
|
|
758
|
+
*
|
|
759
|
+
* The words are not in the build: each code's description lives in the comment on its member and
|
|
760
|
+
* is compiled into `docs/diagnostics.md`, which every diagnostic's `message` links to.
|
|
761
|
+
* @public
|
|
762
|
+
*/
|
|
763
|
+
declare enum PxDiagnosticCode {
|
|
764
|
+
/**
|
|
765
|
+
* The player could not be built from this document — a document that passed validation but
|
|
766
|
+
* still broke the builder, or a bug in the player. Report it.
|
|
767
|
+
* @data the Error
|
|
768
|
+
*/
|
|
769
|
+
buildFailed = 1001,
|
|
770
|
+
/**
|
|
771
|
+
* The file at `src` loaded, but it is not a Pixodesk animation document.
|
|
772
|
+
* @data the `src` URL
|
|
773
|
+
*/
|
|
774
|
+
invalidDocumentAtSrc = 1002,
|
|
775
|
+
/**
|
|
776
|
+
* The page could not fetch `src`. The file may be perfect — this is the request failing.
|
|
777
|
+
* @data the `src` URL · the fetch error's message
|
|
778
|
+
*/
|
|
779
|
+
loadFailed = 1003,
|
|
780
|
+
/**
|
|
781
|
+
* One element's animation could not be built, so that element stays static; the rest plays.
|
|
782
|
+
* @data the Error
|
|
783
|
+
*/
|
|
784
|
+
animationBuildFailed = 1004,
|
|
785
|
+
/**
|
|
786
|
+
* An `effects` bucket does not match the schema, so that effect is ignored or degraded.
|
|
787
|
+
* @data the problem, with the node's path
|
|
788
|
+
*/
|
|
789
|
+
effectsShape = 1101,
|
|
790
|
+
/**
|
|
791
|
+
* Part of the per-instance `timeline` override could not be applied — most often clock-only
|
|
792
|
+
* keys aimed at a scroll timeline.
|
|
793
|
+
* @data what could not be applied
|
|
794
|
+
*/
|
|
795
|
+
timelineOverrideIgnored = 1102,
|
|
796
|
+
/**
|
|
797
|
+
* An SVG tag that can execute or load remote content was dropped from the rendered tree.
|
|
798
|
+
* @data the tag name
|
|
799
|
+
*/
|
|
800
|
+
blockedTag = 1103,
|
|
801
|
+
/**
|
|
802
|
+
* The browser will not animate these attributes, so the document fell back to the frame loop.
|
|
803
|
+
* @data the attribute names
|
|
804
|
+
*/
|
|
805
|
+
unsupportedAnimatedAttrs = 1104,
|
|
806
|
+
/** A bind-by-id document carries no `animator.bindings`, so nothing is animated. */
|
|
807
|
+
noBindings = 1105,
|
|
808
|
+
/**
|
|
809
|
+
* A binding names no element, or names animations that `definitions.animations` does not have.
|
|
810
|
+
* @data the binding
|
|
811
|
+
*/
|
|
812
|
+
unresolvedBinding = 1106,
|
|
813
|
+
/** `setupAnimationTriggers` was given no root element, so no trigger was wired. */
|
|
814
|
+
triggersNoRoot = 1201,
|
|
815
|
+
/**
|
|
816
|
+
* The container selector matched nothing, so there is nothing to render into.
|
|
817
|
+
* @data the selector
|
|
818
|
+
*/
|
|
819
|
+
noRootForSelector = 1202,
|
|
820
|
+
/** No container was given and the document's `id` matched no element already on the page. */
|
|
821
|
+
noRootElement = 1203,
|
|
822
|
+
/**
|
|
823
|
+
* A binding's selector matched no element, so that binding animates nothing.
|
|
824
|
+
* @data the selector
|
|
825
|
+
*/
|
|
826
|
+
noElementsForSelector = 1206,
|
|
827
|
+
/**
|
|
828
|
+
* An attribute write found no element for this id — the rendered SVG was probably replaced.
|
|
829
|
+
* @data the id or selector
|
|
830
|
+
*/
|
|
831
|
+
setAttributeNoElement = 1207,
|
|
832
|
+
/** `smoothing` needs the player's own driver, so the browser's scroll timeline was not used. */
|
|
833
|
+
scrollSmoothingNeedsOwnDriver = 1301,
|
|
834
|
+
/** The browser refused to build a native scroll timeline; the player measures progress itself. */
|
|
835
|
+
scrollNativeUnavailable = 1302,
|
|
836
|
+
/**
|
|
837
|
+
* `scroll.subject` is not a valid CSS selector, so the SVG itself is measured instead.
|
|
838
|
+
* @data the subject
|
|
839
|
+
*/
|
|
840
|
+
scrollSubjectInvalid = 1303,
|
|
841
|
+
/**
|
|
842
|
+
* `scroll.subject` matched no element, so the SVG itself is measured instead.
|
|
843
|
+
* @data the subject
|
|
844
|
+
*/
|
|
845
|
+
scrollSubjectNoMatch = 1304,
|
|
846
|
+
/** There is no root element to observe, so a scroll-driven animation stays on its first frame. */
|
|
847
|
+
scrollNoRootToObserve = 1305,
|
|
848
|
+
/** `animator.trigger` does not apply to a scroll timeline — the scrollbar is the playhead. */
|
|
849
|
+
scrollTriggerIgnored = 1306,
|
|
850
|
+
/** A playback rate of `0`, or a non-finite one, is rejected everywhere — use `pause()`. */
|
|
851
|
+
rateRejected = 1401,
|
|
852
|
+
/**
|
|
853
|
+
* Two control tiers were set at once. The higher one wins and the lower is ignored — see the
|
|
854
|
+
* control-mode rule.
|
|
855
|
+
* @data which props conflicted, and which won
|
|
856
|
+
*/
|
|
857
|
+
controlPropsConflict = 1501,
|
|
858
|
+
/**
|
|
859
|
+
* The document could not be compiled into animation tracks, so `fallback` is shown.
|
|
860
|
+
* @data the Error
|
|
861
|
+
*/
|
|
862
|
+
rnCompileFailed = 1601,
|
|
863
|
+
/**
|
|
864
|
+
* Rendering the compiled document threw, so `fallback` is shown.
|
|
865
|
+
* @data the Error
|
|
866
|
+
*/
|
|
867
|
+
rnRenderFailed = 1602,
|
|
868
|
+
/**
|
|
869
|
+
* The error boundary caught a render failure below this component.
|
|
870
|
+
* @data the Error · the React component stack
|
|
871
|
+
*/
|
|
872
|
+
rnBoundaryCaught = 1603,
|
|
873
|
+
/**
|
|
874
|
+
* `react-native-svg` cannot express part of this document, so it was left out or simplified.
|
|
875
|
+
* @data what was left out
|
|
876
|
+
*/
|
|
877
|
+
rnUnsupported = 1604
|
|
878
|
+
}
|
|
879
|
+
|
|
756
880
|
/**
|
|
757
881
|
* Who can do something about a diagnostic.
|
|
758
882
|
*
|
|
@@ -773,24 +897,35 @@ declare const PxDiagnosticKind: {
|
|
|
773
897
|
readonly internal: "internal";
|
|
774
898
|
};
|
|
775
899
|
type PxDiagnosticKind = typeof PxDiagnosticKind[keyof typeof PxDiagnosticKind];
|
|
776
|
-
/**
|
|
900
|
+
/**
|
|
901
|
+
* One thing a player has to say.
|
|
902
|
+
*
|
|
903
|
+
* The TEXT is not here, and is not in the bundle: `code` identifies the diagnostic and
|
|
904
|
+
* {@link https://github.com/pixodesk/pixodesk-svg-animator/blob/main/docs/diagnostics.md the
|
|
905
|
+
* codes page} carries the description. That is the trade this library makes — a smaller
|
|
906
|
+
* download, and a stable number you can switch on instead of matching a sentence that may be
|
|
907
|
+
* reworded. The specifics are in `data`.
|
|
908
|
+
* @public
|
|
909
|
+
*/
|
|
777
910
|
interface PxDiagnostic {
|
|
911
|
+
/** WHICH diagnostic this is — a permanent number; look it up on the codes page. */
|
|
912
|
+
readonly code: PxDiagnosticCode;
|
|
778
913
|
/** Who can act on it — see {@link PxDiagnosticKind}. */
|
|
779
914
|
readonly kind: PxDiagnosticKind;
|
|
780
|
-
/** Human-readable, and never carries the console prefix. */
|
|
781
|
-
readonly message: string;
|
|
782
915
|
/**
|
|
783
|
-
*
|
|
784
|
-
*
|
|
916
|
+
* What the site had to hand, in the order the code's `@data` lists: a selector, a URL, the
|
|
917
|
+
* offending binding, an inner problem. Everything a sentence would have interpolated.
|
|
785
918
|
*/
|
|
786
|
-
readonly
|
|
787
|
-
/**
|
|
919
|
+
readonly data?: ReadonlyArray<unknown>;
|
|
920
|
+
/** The code and a link to its description — NOT the description itself, which is not shipped. */
|
|
921
|
+
readonly message: string;
|
|
922
|
+
/** Present on errors: the Error that stopped the player. */
|
|
788
923
|
readonly error?: Error;
|
|
789
924
|
}
|
|
790
925
|
/**
|
|
791
926
|
* Where a player sends what it wants to say. Every field is optional.
|
|
792
927
|
*
|
|
793
|
-
* The SHARED base of every callbacks object (
|
|
928
|
+
* The SHARED base of every callbacks object (dev-docs/reviews/api-surface-review.md §26.1): `createDiagnostics` reads it directly,
|
|
794
929
|
* `PxEngineCallbacks` extends it with the playback lifecycle, `PxAnimatorCallbacks` adds `onStop`
|
|
795
930
|
* on top — so the four diagnostics fields are spelled once, here.
|
|
796
931
|
* @public
|
|
@@ -799,15 +934,16 @@ interface PxDiagnosticsConfig {
|
|
|
799
934
|
/**
|
|
800
935
|
* IT PLAYS, but something was ignored, degraded or misspelled — an unknown easing, an
|
|
801
936
|
* override that could not apply, an attribute the platform will not animate. Each
|
|
802
|
-
* diagnostic says
|
|
803
|
-
* `
|
|
937
|
+
* diagnostic says WHAT happened via `code` (a number — look it up on the codes page) and
|
|
938
|
+
* WHO can act on it via `kind` (`document` / `host` / `platform` / `usage` / `internal`);
|
|
939
|
+
* `data` carries the values the site had. Without this: `console.warn`.
|
|
804
940
|
*/
|
|
805
941
|
onWarn?: (diagnostic: PxDiagnostic) => void;
|
|
806
942
|
/**
|
|
807
943
|
* THIS INSTANCE WILL NOT PLAY — the document failed to load, parse or build, or the render
|
|
808
944
|
* threw: nothing rendered, `isReady()` false, the component's `fallback` shown. The player
|
|
809
945
|
* stays inert rather than throwing at the caller. `diagnostic.error` is the Error; on React
|
|
810
|
-
* Native `diagnostic.
|
|
946
|
+
* Native `diagnostic.data` carries the component stack when the error boundary caught it.
|
|
811
947
|
* Without this: `console.error`.
|
|
812
948
|
*/
|
|
813
949
|
onError?: (diagnostic: PxDiagnostic) => void;
|
|
@@ -823,10 +959,13 @@ interface PxDiagnosticsConfig {
|
|
|
823
959
|
}
|
|
824
960
|
/** The reporting channel a player writes to. @public */
|
|
825
961
|
interface PxDiagnostics {
|
|
826
|
-
/** Report something survivable — it plays. */
|
|
827
|
-
warn(kind: PxDiagnosticKind,
|
|
828
|
-
/**
|
|
829
|
-
|
|
962
|
+
/** Report something survivable — it plays. `data` is whatever the code's `@data` names. */
|
|
963
|
+
warn(kind: PxDiagnosticKind, code: PxDiagnosticCode, ...data: Array<unknown>): void;
|
|
964
|
+
/**
|
|
965
|
+
* Report a failure that stopped this instance — it will not play. An `Error` anywhere in
|
|
966
|
+
* `data` becomes the diagnostic's `error`, so a site can pass it wherever it reads best.
|
|
967
|
+
*/
|
|
968
|
+
error(kind: PxDiagnosticKind, code: PxDiagnosticCode, ...data: Array<unknown>): void;
|
|
830
969
|
}
|
|
831
970
|
/**
|
|
832
971
|
* Builds the channel a player reports through.
|
|
@@ -968,14 +1107,14 @@ type PxNormalizedKeyframe = _PxNormalizedKeyframe;
|
|
|
968
1107
|
*/
|
|
969
1108
|
type PxAnyKeyframe = _PxKeyframe | _PxNormalizedKeyframe;
|
|
970
1109
|
/** Value, whichever spelling. @internal */
|
|
971
|
-
declare const
|
|
1110
|
+
declare const keyframeValue: (kf: PxAnyKeyframe) => any;
|
|
972
1111
|
/** Easing — resolved on a normalized keyframe, possibly a NAME on a wire one. @internal */
|
|
973
|
-
declare const
|
|
1112
|
+
declare const keyframeEasing: (kf: PxAnyKeyframe) => PxEasingOrRef | undefined;
|
|
974
1113
|
/**
|
|
975
1114
|
* A single animation keyframe defining the state at a specific point in time.
|
|
976
1115
|
*
|
|
977
1116
|
* Generic over the keyframe `value` type for callers that know the per-property
|
|
978
|
-
* value shape (e.g. `PxKeyframe<
|
|
1117
|
+
* value shape (e.g. `PxKeyframe<PxVec2>` in the effect appliers). Defaults to
|
|
979
1118
|
* `any`, matching the schema (`value` is stored as `px.any()` on the wire).
|
|
980
1119
|
* @public
|
|
981
1120
|
*/
|
|
@@ -1380,7 +1519,7 @@ declare const PxGlyphFontSchema: PxSchema<{
|
|
|
1380
1519
|
/** @public */
|
|
1381
1520
|
type PxGlyphFont = PxInfer<typeof PxGlyphFontSchema>;
|
|
1382
1521
|
/** @public @advanced */
|
|
1383
|
-
declare const
|
|
1522
|
+
declare const PxDefinitionsSchema: PxSchema<{} & {
|
|
1384
1523
|
easings?: Record<string, [number, number, number, number]> | undefined;
|
|
1385
1524
|
animations?: Record<string, Record<string, {} & {
|
|
1386
1525
|
value?: string | number | number[] | ({} & {
|
|
@@ -1474,7 +1613,7 @@ declare const PxDefsSchema: PxSchema<{} & {
|
|
|
1474
1613
|
};
|
|
1475
1614
|
};
|
|
1476
1615
|
/** Reusable definitions library for easings, animations and fonts. @public */
|
|
1477
|
-
type
|
|
1616
|
+
type PxDefinitions = PxInfer<typeof PxDefinitionsSchema>;
|
|
1478
1617
|
/** @public @advanced */
|
|
1479
1618
|
declare const PxScrollRangePointSchema: PxSchema<{} & {
|
|
1480
1619
|
phase?: "cover" | "contain" | "entry" | "exit" | "entry-crossing" | "exit-crossing" | undefined;
|
|
@@ -1633,8 +1772,8 @@ type PxTimeline = PxInfer<typeof PxTimelineSchema>;
|
|
|
1633
1772
|
interface _PxAnimatorConfig {
|
|
1634
1773
|
/** RUNTIME VIEW ONLY (not wire — the wire spells it `timeline.engine`, on every
|
|
1635
1774
|
* timeline type; same word both sides). How the animated attributes get updated;
|
|
1636
|
-
* see {@link
|
|
1637
|
-
engine?:
|
|
1775
|
+
* see {@link PxTimelineEngineSetting}. */
|
|
1776
|
+
engine?: PxTimelineEngineSetting;
|
|
1638
1777
|
/** RUNTIME VIEW ONLY (not wire — §2.8: the wire spells it `timeline.duration`).
|
|
1639
1778
|
* Total animation duration in milliseconds. */
|
|
1640
1779
|
duration?: number;
|
|
@@ -1671,7 +1810,7 @@ interface _PxAnimatorConfig {
|
|
|
1671
1810
|
/** Trigger configuration for when animation should start */
|
|
1672
1811
|
trigger?: PxTrigger;
|
|
1673
1812
|
/** Named easings, animations and embedded fonts — referenced by elements and bindings */
|
|
1674
|
-
definitions?:
|
|
1813
|
+
definitions?: PxDefinitions;
|
|
1675
1814
|
/**
|
|
1676
1815
|
* The bind-by-id document (a pre-rendered SVG + JS export, no `children`): the elements
|
|
1677
1816
|
* already exist as markup, so instead of carrying them again the document lists WHICH
|
|
@@ -1732,7 +1871,7 @@ declare const PxBindingSchema: PxSchema<{
|
|
|
1732
1871
|
/** @public */
|
|
1733
1872
|
type PxBinding = PxInfer<typeof PxBindingSchema>;
|
|
1734
1873
|
/**
|
|
1735
|
-
* RUNTIME VIEW ONLY (not wire) — a binding once `
|
|
1874
|
+
* RUNTIME VIEW ONLY (not wire) — a binding once `normalizeBindings` has resolved it: the
|
|
1736
1875
|
* bare DOM id and the merged, normalized animation. A self-contained document yields the same
|
|
1737
1876
|
* shape from every animated node, so the engines never see which kind of document they play.
|
|
1738
1877
|
* @internal
|
|
@@ -2036,7 +2175,7 @@ declare const PxAttrValueSchema: PxSchema<string | number | number[] | ({} & {
|
|
|
2036
2175
|
value: any;
|
|
2037
2176
|
} & {}), false>;
|
|
2038
2177
|
/** Fixed-length 2-number tuple. `[x, y]` for positions, `[sx, sy]` for scale, …. @public */
|
|
2039
|
-
type
|
|
2178
|
+
type PxVec2 = [number, number];
|
|
2040
2179
|
/**
|
|
2041
2180
|
* Animatable wire value — the ONE grammar for every animatable slot:
|
|
2042
2181
|
*
|
|
@@ -5717,7 +5856,7 @@ type PxEffects = PxInfer<typeof PxEffectsSchema>;
|
|
|
5717
5856
|
* Pass `strict: true` to also flag undeclared keys (useful in dev / tests).
|
|
5718
5857
|
* @public @advanced
|
|
5719
5858
|
*/
|
|
5720
|
-
declare function validateNodeEffects(root: PxNode,
|
|
5859
|
+
declare function validateNodeEffects(root: PxNode, options?: {
|
|
5721
5860
|
strict?: boolean;
|
|
5722
5861
|
}): Array<string>;
|
|
5723
5862
|
/**
|
|
@@ -5728,7 +5867,7 @@ declare function validateNodeEffects(root: PxNode, opts?: {
|
|
|
5728
5867
|
* for tooling, CI and agents that want a yes/no answer before shipping a document.
|
|
5729
5868
|
* @public
|
|
5730
5869
|
*/
|
|
5731
|
-
declare function validateDocument(doc: unknown,
|
|
5870
|
+
declare function validateDocument(doc: unknown, options?: {
|
|
5732
5871
|
strict?: boolean;
|
|
5733
5872
|
}): Array<string>;
|
|
5734
5873
|
/**
|
|
@@ -5740,7 +5879,7 @@ declare function validateDocument(doc: unknown, opts?: {
|
|
|
5740
5879
|
* `{ type:string, style?:…, [key:string]: string|number|PxPropertyAnimation }`
|
|
5741
5880
|
* @public @advanced
|
|
5742
5881
|
*/
|
|
5743
|
-
declare const
|
|
5882
|
+
declare const PxNodeBaseSchema: PxSchema<{
|
|
5744
5883
|
type: string;
|
|
5745
5884
|
} & {
|
|
5746
5885
|
domType?: string | undefined;
|
|
@@ -7927,7 +8066,7 @@ declare let PxNodeSchema: PxSchema<any>;
|
|
|
7927
8066
|
* Named properties take precedence over the index signature when accessed.
|
|
7928
8067
|
* @public
|
|
7929
8068
|
*/
|
|
7930
|
-
interface PxNode extends PxInfer<typeof
|
|
8069
|
+
interface PxNode extends PxInfer<typeof PxNodeBaseSchema> {
|
|
7931
8070
|
children?: PxNode[];
|
|
7932
8071
|
[camelCaseDomKey: string]: any;
|
|
7933
8072
|
}
|
|
@@ -7938,7 +8077,7 @@ interface PxNode extends PxInfer<typeof PxNodeBase> {
|
|
|
7938
8077
|
* `{ width?:number, height?:number, viewBox?:string, animator?:AnimatorConfig }`
|
|
7939
8078
|
* @public @advanced
|
|
7940
8079
|
*/
|
|
7941
|
-
declare const
|
|
8080
|
+
declare const PxSvgNodeRootSchema: PxSchema<{} & {
|
|
7942
8081
|
width?: string | number | undefined;
|
|
7943
8082
|
height?: string | number | undefined;
|
|
7944
8083
|
viewBox?: string | undefined;
|
|
@@ -8199,7 +8338,7 @@ declare const PxSvgNodeExtra: PxSchema<{} & {
|
|
|
8199
8338
|
* SVG-root fields.
|
|
8200
8339
|
* @public
|
|
8201
8340
|
*/
|
|
8202
|
-
interface PxSvgNode extends PxNode, Omit<PxInfer<typeof
|
|
8341
|
+
interface PxSvgNode extends PxNode, Omit<PxInfer<typeof PxSvgNodeRootSchema>, 'animator'> {
|
|
8203
8342
|
/** The RUNTIME-VIEW type, not the wire shape: in-memory documents may carry the
|
|
8204
8343
|
* flat playback fields (`flattenAnimatorTimeline` output, prop overrides in the
|
|
8205
8344
|
* RN/React wrappers), while `PxAnimatorConfigSchema` validates only the nested
|
|
@@ -10709,7 +10848,7 @@ type PxBezierPath = PxInfer<typeof PxBezierPathSchema>;
|
|
|
10709
10848
|
* React Native player to its own view handle. Defaults to `unknown`.
|
|
10710
10849
|
* @public
|
|
10711
10850
|
*/
|
|
10712
|
-
interface
|
|
10851
|
+
interface PxPlaybackApi<TRoot = unknown> {
|
|
10713
10852
|
isReady(): boolean;
|
|
10714
10853
|
/** Returns the root element for the animation (platform-specific type). */
|
|
10715
10854
|
getRootElement(): TRoot | null;
|
|
@@ -10740,7 +10879,7 @@ interface PxBasicAnimatorAPI<TRoot = unknown> {
|
|
|
10740
10879
|
* rather than one per engine.
|
|
10741
10880
|
* @public
|
|
10742
10881
|
*/
|
|
10743
|
-
interface
|
|
10882
|
+
interface PxAnimatorApi<TRoot = unknown> extends PxPlaybackApi<TRoot> {
|
|
10744
10883
|
/** Jumps to the end of the animation and holds the final state. */
|
|
10745
10884
|
finish(): void;
|
|
10746
10885
|
/**
|
|
@@ -10774,7 +10913,7 @@ interface PxAnimatorAPI<TRoot = unknown> extends PxBasicAnimatorAPI<TRoot> {
|
|
|
10774
10913
|
* `setPlaybackRate` comment had already lost "negative plays backwards".
|
|
10775
10914
|
* @public
|
|
10776
10915
|
*/
|
|
10777
|
-
type PxAnimatorHandle = Omit<
|
|
10916
|
+
type PxAnimatorHandle = Omit<PxAnimatorApi, 'isReady' | 'getRootElement' | 'destroy'>;
|
|
10778
10917
|
/** @public @advanced */
|
|
10779
10918
|
interface PxValidationResult {
|
|
10780
10919
|
valid: boolean;
|
|
@@ -10790,7 +10929,7 @@ interface PxValidationResult {
|
|
|
10790
10929
|
* this on OPEN, where a key from a newer version is worth a warning, never a refusal.
|
|
10791
10930
|
* @public @advanced
|
|
10792
10931
|
*/
|
|
10793
|
-
declare function
|
|
10932
|
+
declare function isValidPxDocument(doc: unknown): PxValidationResult;
|
|
10794
10933
|
|
|
10795
10934
|
/** @internal */
|
|
10796
10935
|
declare function generateUniqueId(): string;
|
|
@@ -10829,12 +10968,12 @@ declare function generateNewIds(doc: PxAnimatedSvgDocument): PxAnimatedSvgDocume
|
|
|
10829
10968
|
* refs on `href` / `src` / `mask` / `marker*`.
|
|
10830
10969
|
* @internal
|
|
10831
10970
|
*/
|
|
10832
|
-
declare const
|
|
10971
|
+
declare const PX_DISALLOWED_SVG_TAGS_LOWER: Set<string>;
|
|
10833
10972
|
/** CSS-only properties that are NOT SVG presentation attributes — the browser
|
|
10834
10973
|
* ignores them via `setAttribute`, so they must be applied through `element.style`.
|
|
10835
10974
|
* Keyed camelCase to match the normalized prop names (`element.style.mixBlendMode`). * @internal
|
|
10836
10975
|
*/
|
|
10837
|
-
declare const
|
|
10976
|
+
declare const PX_CSS_ONLY_STYLE_PROPS: Set<string>;
|
|
10838
10977
|
/**
|
|
10839
10978
|
* Returns the value to pass to `setAttribute`, or `undefined` to drop the
|
|
10840
10979
|
* attribute entirely. Dropping leaves the DOM clean — the caller skips
|
|
@@ -10855,14 +10994,14 @@ declare const CSS_ONLY_STYLE_PROPS: Set<string>;
|
|
|
10855
10994
|
*/
|
|
10856
10995
|
declare function sanitizeAttributeValue(name: string, value: any): any | undefined;
|
|
10857
10996
|
/** @public @advanced */
|
|
10858
|
-
declare function
|
|
10997
|
+
declare function toDomProps(props: Record<string, any>): Record<string, any>;
|
|
10859
10998
|
|
|
10860
10999
|
/**
|
|
10861
11000
|
* Time separation between a cycle's snap-back keyframe and the previous repetition's
|
|
10862
11001
|
* end, in ms.
|
|
10863
11002
|
*
|
|
10864
11003
|
* SINGLE SOURCE OF TRUTH — the editor imports this and converts to its own frame unit
|
|
10865
|
-
* (`TLoop.smallFrameShift =
|
|
11004
|
+
* (`TLoop.smallFrameShift = PX_LOOP_JUMP_SHIFT_MS / FRAME_DURATION_MS`), so the two sides
|
|
10866
11005
|
* cannot drift apart and materialize different keyframes (B7).
|
|
10867
11006
|
*
|
|
10868
11007
|
* 1ms, not one 10ms editor frame: a 10ms snap-back is long enough to read as a visible
|
|
@@ -10874,7 +11013,7 @@ declare function getNormalizedProps(props: Record<string, any>): Record<string,
|
|
|
10874
11013
|
* editor side keeps the fractional value and must not be re-clamped to a whole frame.
|
|
10875
11014
|
* @internal
|
|
10876
11015
|
*/
|
|
10877
|
-
declare const
|
|
11016
|
+
declare const PX_LOOP_JUMP_SHIFT_MS = 1;
|
|
10878
11017
|
/**
|
|
10879
11018
|
* Interpolates between two keyframe values based on property type.
|
|
10880
11019
|
* Returns the raw interpolated value (not a CSS string).
|
|
@@ -10914,7 +11053,7 @@ declare function mergeStaticTransformIntoAnimDef(animDef: PxAnimationDefinition,
|
|
|
10914
11053
|
* handling — see {@link PxTimelineEngine}.
|
|
10915
11054
|
* @public @advanced
|
|
10916
11055
|
*/
|
|
10917
|
-
declare function
|
|
11056
|
+
declare function normalizeBindings(doc: PxAnimatedSvgDocument, engine?: PxTimelineEngine): PxNormalizedBinding[];
|
|
10918
11057
|
/**
|
|
10919
11058
|
* Calculates interpolated attribute values for an animation definition.
|
|
10920
11059
|
* @param animDef The animation definition (with resolved refs and normalized times)
|
|
@@ -10954,13 +11093,13 @@ declare function materializeMotionPathInPropAnim(anim: PxPropertyAnimation, opts
|
|
|
10954
11093
|
/** Options accepted by {@link materializeAllInTree}. Mostly forwarded to the
|
|
10955
11094
|
* per-stage materializers; ordering is fixed (see module doc). * @internal
|
|
10956
11095
|
*/
|
|
10957
|
-
interface
|
|
11096
|
+
interface PxMaterializeAllOptions {
|
|
10958
11097
|
/** Knobs forwarded to `materializeMotionPathsInTree`. Only consulted for
|
|
10959
11098
|
* `engine === waapi` — frames-mode skips that stage entirely. */
|
|
10960
11099
|
motionPath?: MotionPathMaterializationOptions;
|
|
10961
11100
|
}
|
|
10962
11101
|
/** @public @advanced */
|
|
10963
|
-
declare function materializeAllInTree(doc: PxAnimatedSvgDocument, engine: PxTimelineEngine,
|
|
11102
|
+
declare function materializeAllInTree(doc: PxAnimatedSvgDocument, engine: PxTimelineEngine, options?: PxMaterializeAllOptions): PxAnimatedSvgDocument;
|
|
10964
11103
|
|
|
10965
11104
|
/**
|
|
10966
11105
|
* A document's schema findings. The pre-2026-09 FLAT animator spelling is NOT a category of its
|
|
@@ -10984,378 +11123,4 @@ declare function diagnoseDocument(doc: unknown): PxDocumentDiagnosis;
|
|
|
10984
11123
|
*/
|
|
10985
11124
|
declare function reportDocumentDiagnostics(doc: unknown, where: string): void;
|
|
10986
11125
|
|
|
10987
|
-
|
|
10988
|
-
type?: string;
|
|
10989
|
-
children?: Array<VmNode>;
|
|
10990
|
-
[attr: string]: any;
|
|
10991
|
-
}
|
|
10992
|
-
interface EffectDiff {
|
|
10993
|
-
time: number;
|
|
10994
|
-
onlyInA: Array<string>;
|
|
10995
|
-
onlyInB: Array<string>;
|
|
10996
|
-
}
|
|
10997
|
-
/**
|
|
10998
|
-
* Compares two trees "in effect" across all keyframe instants found in either.
|
|
10999
|
-
* Returns one entry per time where the painted-primitive multisets differ.
|
|
11000
|
-
* @internal
|
|
11001
|
-
*/
|
|
11002
|
-
declare function diffInEffect(a: VmNode, b: VmNode): Array<EffectDiff>;
|
|
11003
|
-
|
|
11004
|
-
/**
|
|
11005
|
-
* Element-creation factory — abstracts WHAT an "element" is so the same
|
|
11006
|
-
* geometry/layout code (e.g. the glyph text materializer) can emit plain wire
|
|
11007
|
-
* nodes here, or the editor's React / px elements when called from the editor.
|
|
11008
|
-
*
|
|
11009
|
-
* The signature intentionally mirrors the editor's `createPxElement(type,
|
|
11010
|
-
* props, children, fixReactKeysIfNeeded?)` so the editor's own factory drops in
|
|
11011
|
-
* unchanged.
|
|
11012
|
-
* @internal
|
|
11013
|
-
*/
|
|
11014
|
-
type PxCreateElement<E = any> = (type: string, props: {
|
|
11015
|
-
[k: string]: any;
|
|
11016
|
-
}, children?: Array<E> | E | null, fixReactKeysIfNeeded?: boolean) => E;
|
|
11017
|
-
|
|
11018
|
-
/** @internal */
|
|
11019
|
-
interface PathPoint {
|
|
11020
|
-
x: number;
|
|
11021
|
-
y: number;
|
|
11022
|
-
angle: number;
|
|
11023
|
-
}
|
|
11024
|
-
/** @internal */
|
|
11025
|
-
interface PathSampler {
|
|
11026
|
-
totalLength: number;
|
|
11027
|
-
/** True when the path loops back on itself (explicit `Z` or coincident ends) —
|
|
11028
|
-
* no open tip to run off, so overflow clamps/wraps rather than clipping. */
|
|
11029
|
-
closed: boolean;
|
|
11030
|
-
sampleAtDistance(dist: number): PathPoint;
|
|
11031
|
-
}
|
|
11032
|
-
/** @internal */
|
|
11033
|
-
declare function createPathSampler(d: string): PathSampler | null;
|
|
11034
|
-
|
|
11035
|
-
/**
|
|
11036
|
-
* Glyph text materializer — turns a `<text>`/`<tspan>` subtree into `<path>`
|
|
11037
|
-
* outlines from `definitions.fonts`, so the text renders with no external font.
|
|
11038
|
-
*
|
|
11039
|
-
* - HORIZONTAL ({@link materializeGlyphTextHorizontal}) — left-to-right by
|
|
11040
|
-
* advance width; honors font-size, text-anchor, letter/word-spacing,
|
|
11041
|
-
* per-tspan x/y/dx/dy, fill/stroke, nested tspans.
|
|
11042
|
-
* - ALONG-PATH ({@link materializeGlyphTextAlongPath}) — each glyph placed and
|
|
11043
|
-
* rotated to the referenced path's tangent. Static `startOffset` → glyphs
|
|
11044
|
-
* bake+merge; animated `startOffset` → per-glyph `<path>` with sampled
|
|
11045
|
-
* `animate.transform`. Text-level `x`/`dx` add distance ALONG the path (≈
|
|
11046
|
-
* startOffset) and `dy` shifts PERPENDICULAR — matching native `<textPath>`
|
|
11047
|
-
* (see {@link alongPathNodeOffsets}); `y` and per-tspan positioning are ignored
|
|
11048
|
-
* (a single run).
|
|
11049
|
-
*
|
|
11050
|
-
* Element creation goes through an injected {@link PxCreateElement} factory, so
|
|
11051
|
-
* the SAME layout produces plain wire nodes here (the effects pipeline) or the
|
|
11052
|
-
* editor's React/px elements when the editor calls it — see
|
|
11053
|
-
* {@link materializeGlyphText}.
|
|
11054
|
-
*
|
|
11055
|
-
* v1 scope (see svga.text.design.md): keyframe-interval easing is linear;
|
|
11056
|
-
* kerning/ligatures, per-tspan opacity, text-level animated fill are out of scope.
|
|
11057
|
-
*/
|
|
11058
|
-
|
|
11059
|
-
/** Inputs for a glyph materialization, decoupled from the effects `ApplyContext`
|
|
11060
|
-
* so the editor can call the materializer directly. * @internal
|
|
11061
|
-
*/
|
|
11062
|
-
interface GlyphMaterializeOpts<E = any> {
|
|
11063
|
-
/** Embedded glyph fonts, keyed by `font-family`. */
|
|
11064
|
-
glyphs: Record<string, PxGlyphFont>;
|
|
11065
|
-
/** Element factory — defaults to plain wire nodes ({@link jsonElementFactory}). */
|
|
11066
|
-
create?: PxCreateElement<E>;
|
|
11067
|
-
/** Optional diagnostics sink. */
|
|
11068
|
-
warnings?: Array<string>;
|
|
11069
|
-
}
|
|
11070
|
-
/** Per-CHARACTER advance box (local, pre-transform coords). `x,y` = the char's baseline start,
|
|
11071
|
-
* `width` = its advance, `ascent`/`fontSize` size its bbox. * @internal
|
|
11072
|
-
*/
|
|
11073
|
-
interface GlyphCharBox {
|
|
11074
|
-
x: number;
|
|
11075
|
-
y: number;
|
|
11076
|
-
width: number;
|
|
11077
|
-
ascent: number;
|
|
11078
|
-
fontSize: number;
|
|
11079
|
-
/** Along-path only: baseline END point (leading edge of the next char). Absent for
|
|
11080
|
-
* horizontal, where the end is `x + width` on the same baseline. */
|
|
11081
|
-
endX?: number;
|
|
11082
|
-
endY?: number;
|
|
11083
|
-
/** Along-path only: char rotation in DEGREES (path tangent; 0 = horizontal). */
|
|
11084
|
-
rotation?: number;
|
|
11085
|
-
}
|
|
11086
|
-
/** Optional along-path geometry for {@link layoutGlyphTextChars}: when given, chars are
|
|
11087
|
-
* placed + rotated along `pathD` (mirrors {@link materializeGlyphTextAlongPath}) at the
|
|
11088
|
-
* STATIC / frame-0 startOffset, so the editor caret follows the path. * @internal
|
|
11089
|
-
*/
|
|
11090
|
-
interface GlyphCharBoxAlongPath {
|
|
11091
|
-
pathD?: string;
|
|
11092
|
-
startOffset?: PxAnimatable<number>;
|
|
11093
|
-
textLength?: PxAnimatable<number>;
|
|
11094
|
-
pathOverflow?: string;
|
|
11095
|
-
}
|
|
11096
|
-
/** Per-character layout boxes for a glyph text, in reading/DOM order INCLUDING spaces
|
|
11097
|
-
* (a space has no glyph but advances the pen) AND one zero-width filler box per EMPTY
|
|
11098
|
-
* line — the editor's edit canvas renders a zero-width filler char for an empty line
|
|
11099
|
-
* (so the caret has something to measure), and DOM char indices must stay aligned.
|
|
11100
|
-
* HORIZONTAL by default — mirrors `materializeGlyphTextHorizontal`'s pen-walk exactly
|
|
11101
|
-
* (same x/y/dx/dy, spacing and text-anchor). When `opts.alongPath` is given, mirrors
|
|
11102
|
-
* `materializeGlyphTextAlongPath` (each char placed + rotated to the path tangent). So
|
|
11103
|
-
* an editor caret built from these lands on the rendered glyphs. Empty for a text with
|
|
11104
|
-
* no glyph font / unparsable path. * @internal
|
|
11105
|
-
*/
|
|
11106
|
-
declare function layoutGlyphTextChars(node: PxNode, opts: Pick<GlyphMaterializeOpts, 'glyphs' | 'warnings'> & {
|
|
11107
|
-
alongPath?: GlyphCharBoxAlongPath;
|
|
11108
|
-
}): Array<GlyphCharBox>;
|
|
11109
|
-
/** @internal */
|
|
11110
|
-
declare function materializeGlyphTextAlongPath<E = any>(node: PxNode, pathD: string | undefined, startOffset: PxAnimatable<number> | undefined, opts: GlyphMaterializeOpts<E>, textLength?: PxAnimatable<number>, pathOverflow?: string): E | null;
|
|
11111
|
-
/** Single entry the EDITOR calls: materializes a glyph `<text>` node into the
|
|
11112
|
-
* factory's element type, choosing along-path when `alongPath` is given. * @internal
|
|
11113
|
-
*/
|
|
11114
|
-
declare function materializeGlyphText<E = any>(node: PxNode, opts: GlyphMaterializeOpts<E> & {
|
|
11115
|
-
alongPath?: {
|
|
11116
|
-
pathD?: string;
|
|
11117
|
-
startOffset?: PxAnimatable<number>;
|
|
11118
|
-
textLength?: PxAnimatable<number>;
|
|
11119
|
-
pathOverflow?: string;
|
|
11120
|
-
};
|
|
11121
|
-
}): E | null;
|
|
11122
|
-
|
|
11123
|
-
/** Inputs for {@link extendedPathForBrowser}. `advance` = the text run-width used to
|
|
11124
|
-
* size the end extension (caller-measured; the player estimates it from the node,
|
|
11125
|
-
* the editor from its text model — browser fonts have no glyph metrics available). * @internal
|
|
11126
|
-
*/
|
|
11127
|
-
interface ExtendPathOpts {
|
|
11128
|
-
pathOverflow?: string;
|
|
11129
|
-
startOffset?: PxAnimatable<number>;
|
|
11130
|
-
textLength?: PxAnimatable<number>;
|
|
11131
|
-
advance?: number;
|
|
11132
|
-
}
|
|
11133
|
-
/** Result of {@link extendedPathForBrowser}: the (possibly) extended `d`, plus
|
|
11134
|
-
* `startShift` — the length of the prepended START lead-in. Because that lead-in
|
|
11135
|
-
* moves the `<textPath>` origin back by `startShift`, EVERY `startOffset` (all
|
|
11136
|
-
* keyframes) MUST be shifted by `+startShift` so the text lands where it would on
|
|
11137
|
-
* the un-extended path (`extend` only adds a tail, it must never move the text). * @internal
|
|
11138
|
-
*/
|
|
11139
|
-
interface ExtendedPath {
|
|
11140
|
-
d: string;
|
|
11141
|
-
startShift: number;
|
|
11142
|
-
}
|
|
11143
|
-
/** For `pathOverflow:'extend'` (browser-font): extend an OPEN path along its endpoint
|
|
11144
|
-
* tangents so the browser lays overflow glyphs onto the straight extension (matching
|
|
11145
|
-
* glyph-mode's tangent behavior) instead of dropping them. `'clip'`/closed paths are
|
|
11146
|
-
* returned unchanged (browser clips natively). Shared by the player's browser-font
|
|
11147
|
-
* applier and the editor's live/heavy `<textPath>` def generate (single source of truth).
|
|
11148
|
-
* Returns the extended `d` AND `startShift` — see {@link ExtendedPath}. * @internal
|
|
11149
|
-
*/
|
|
11150
|
-
declare function extendedPathForBrowser(pathD: string, opts: ExtendPathOpts): ExtendedPath;
|
|
11151
|
-
|
|
11152
|
-
/** Is this document scroll-driven? (`animator.timelineSource === 'scroll'`) @internal */
|
|
11153
|
-
declare function isScrollTimeline(config: PxAnimatorConfig | undefined): boolean;
|
|
11154
|
-
/**
|
|
11155
|
-
* The seek-space length (ms) a scroll progress of 1 maps to: duration × finite
|
|
11156
|
-
* iterations. `'infinite'` is meaningless on a finite progress timeline (see design doc
|
|
11157
|
-
* D4) — treated as 1 with the read-side warning left to the consumer.
|
|
11158
|
-
* @internal
|
|
11159
|
-
*/
|
|
11160
|
-
declare function scrollTotalDurationMs(config: PxAnimatorConfig | undefined): number;
|
|
11161
|
-
/**
|
|
11162
|
-
* A named phase's interval in `u`-space.
|
|
11163
|
-
*
|
|
11164
|
-
* `u` is the subject's "journey distance": with `sTop` = subject's leading edge in
|
|
11165
|
-
* scrollport coordinates, `u = vpSize − sTop` — 0 exactly when the subject is about to
|
|
11166
|
-
* enter (leading edge at the scrollport's trailing edge), growing as the user scrolls.
|
|
11167
|
-
* The `min`/`max` pairs make every formula valid BOTH for a subject smaller than the
|
|
11168
|
-
* scrollport and one larger than it (where "fully visible" flips to "covers the
|
|
11169
|
-
* scrollport") — the same case split CSS specifies for its named timeline ranges.
|
|
11170
|
-
* @internal
|
|
11171
|
-
*/
|
|
11172
|
-
declare function scrollPhaseInterval(phase: PxScrollPhase, subjectSize: number, scrollportSize: number): [number, number];
|
|
11173
|
-
/**
|
|
11174
|
-
* `kind: 'view'` progress ∈ [0, 1]: where the subject's journey sits within the
|
|
11175
|
-
* configured range.
|
|
11176
|
-
*
|
|
11177
|
-
* @param subjectStart subject's leading edge in scrollport coordinates
|
|
11178
|
-
* (`subjectRect.top − scrollportRect.top` on the resolved axis)
|
|
11179
|
-
* @param subjectSize subject size on the axis
|
|
11180
|
-
* @param scrollportSize scrollport size on the axis
|
|
11181
|
-
*
|
|
11182
|
-
* A degenerate/inverted range (uStart ≥ uEnd — e.g. zero-size subject with an `entry`
|
|
11183
|
-
* range) reports 1 once the point is passed, 0 before — never NaN.
|
|
11184
|
-
* @internal
|
|
11185
|
-
*/
|
|
11186
|
-
declare function scrollViewProgress(subjectStart: number, subjectSize: number, scrollportSize: number, range: PxScroll['range'] | undefined): number;
|
|
11187
|
-
/**
|
|
11188
|
-
* `kind: 'scroll'` progress ∈ [0, 1]: the scroller's offset ratio mapped through the
|
|
11189
|
-
* range (phases don't exist here — `fraction` is of the total scroll range).
|
|
11190
|
-
*
|
|
11191
|
-
* `maxOffset === 0` (nothing to scroll) reports 1, matching the CSS spec's rule that a
|
|
11192
|
-
* zero-length timeline is at 100%.
|
|
11193
|
-
* @internal
|
|
11194
|
-
*/
|
|
11195
|
-
declare function scrollOffsetProgress(offset: number, maxOffset: number, range: PxScroll['range'] | undefined): number;
|
|
11196
|
-
/**
|
|
11197
|
-
* Resolve a logical axis to a physical one. `block`/`inline` are writing-mode relative:
|
|
11198
|
-
* in horizontal writing (`horizontal-tb`, the default) block flows vertically; in
|
|
11199
|
-
* vertical writing modes it flows horizontally.
|
|
11200
|
-
* @internal
|
|
11201
|
-
*/
|
|
11202
|
-
declare function scrollResolveAxis(axis: PxScroll['axis'] | undefined, writingMode: string | undefined): 'x' | 'y';
|
|
11203
|
-
|
|
11204
|
-
/**
|
|
11205
|
-
* Converts a PxBezierPath to an SVG path string.
|
|
11206
|
-
* Control points (i, o) are treated as ABSOLUTE coordinates.
|
|
11207
|
-
* @param {PxBezierPath} path
|
|
11208
|
-
* @returns {string}
|
|
11209
|
-
*/
|
|
11210
|
-
/**
|
|
11211
|
-
* @param forceCurves Emit EVERY segment (incl. the closing one) as a cubic `C`, even when
|
|
11212
|
-
* its control points are degenerate (a straight line). Needed for keyframe values the
|
|
11213
|
-
* BROWSER interpolates (WAAPI / CSS `path()`): CSS only interpolates paths with
|
|
11214
|
-
* IDENTICAL command sequences, so an opportunistic `L` in one keyframe vs a `C` in the
|
|
11215
|
-
* next (e.g. a round-corner radius animating from 0) turns the whole animation
|
|
11216
|
-
* DISCRETE — it flips at 50% instead of morphing.
|
|
11217
|
-
* @internal
|
|
11218
|
-
*/
|
|
11219
|
-
declare function bezierToSvgPath(path: PxBezierPath, forceCurves?: boolean): string;
|
|
11220
|
-
/**
|
|
11221
|
-
* Creates a cubic-bezier easing function.
|
|
11222
|
-
* @param easing An array of four numbers [x1, y1, x2, y2] defining the bezier curve.
|
|
11223
|
-
* @returns A function that takes a progress value (0-1) and returns an eased value.
|
|
11224
|
-
* @internal
|
|
11225
|
-
*/
|
|
11226
|
-
declare function cubicBezier(easing: [number, number, number, number]): (x: number) => number;
|
|
11227
|
-
type Point2 = [number, number];
|
|
11228
|
-
/**
|
|
11229
|
-
* Splits a cubic bezier curve at parameter t using De Casteljau's algorithm.
|
|
11230
|
-
* Returns the left and right sub-curves as 4-point tuples.
|
|
11231
|
-
* @internal
|
|
11232
|
-
*/
|
|
11233
|
-
declare function subdivideCubicBezier(p0: Point2, p1: Point2, p2: Point2, p3: Point2, t: number): {
|
|
11234
|
-
left: [Point2, Point2, Point2, Point2];
|
|
11235
|
-
right: [Point2, Point2, Point2, Point2];
|
|
11236
|
-
};
|
|
11237
|
-
type Easing = [number, number, number, number];
|
|
11238
|
-
/**
|
|
11239
|
-
* Splits a CSS cubic-bezier easing [x1,y1,x2,y2] at a given x-axis fraction.
|
|
11240
|
-
* Each half is re-normalized to map [0,0]→[1,1].
|
|
11241
|
-
* Returns undefined for either half if the input is undefined (linear) or the split is degenerate.
|
|
11242
|
-
* @internal
|
|
11243
|
-
*/
|
|
11244
|
-
declare function splitEasing(easing: Easing | undefined, xFraction: number): {
|
|
11245
|
-
left: Easing | undefined;
|
|
11246
|
-
right: Easing | undefined;
|
|
11247
|
-
};
|
|
11248
|
-
/**
|
|
11249
|
-
* Reverses a cubic-bezier easing for backward playback.
|
|
11250
|
-
* [x1,y1,x2,y2] → [1-x2, 1-y2, 1-x1, 1-y1].
|
|
11251
|
-
* @internal
|
|
11252
|
-
*/
|
|
11253
|
-
declare function reverseEasing(easing: Easing | undefined): Easing | undefined;
|
|
11254
|
-
/**
|
|
11255
|
-
* Converts a color from a [r, g, b, a] array (where values are 0-1) to an rgba() or rgb() CSS string.
|
|
11256
|
-
* @param color The color array.
|
|
11257
|
-
* @internal
|
|
11258
|
-
*/
|
|
11259
|
-
declare function toRGBA(color: Array<number>): string;
|
|
11260
|
-
/** @internal */
|
|
11261
|
-
declare const COLOR_ATTR_NAMES: Set<string>;
|
|
11262
|
-
/** @internal */
|
|
11263
|
-
declare const TRANSFORM_FN_NAMES: Set<string>;
|
|
11264
|
-
/** @internal */
|
|
11265
|
-
declare const PCT_BASED_ATTR_NAMES: Set<string>;
|
|
11266
|
-
/**
|
|
11267
|
-
* Compose a `PxTransformParts` record into a single SVG/CSS transform string in
|
|
11268
|
-
* the canonical order:
|
|
11269
|
-
*
|
|
11270
|
-
* translate, translate(+origin), rotate, scale, translate(-origin)
|
|
11271
|
-
*
|
|
11272
|
-
* Each part is omitted when not present. `origin` becomes a `translate(+o)` /
|
|
11273
|
-
* `translate(-o)` pair surrounding the rotate/scale segment — the SVG-native
|
|
11274
|
-
* way to render a transform-origin pivot.
|
|
11275
|
-
*
|
|
11276
|
-
* @param parts the parts record (translate / rotate / scale / origin)
|
|
11277
|
-
* @param opts.withUnits when true (default), translates use `px` and rotate
|
|
11278
|
-
* uses `deg` — required for CSS / WebAnimations keyframes. When false, no
|
|
11279
|
-
* units are emitted — required for the SVG `transform` attribute.
|
|
11280
|
-
* @internal
|
|
11281
|
-
*/
|
|
11282
|
-
declare function composeTransformParts(parts: PxTransformParts | null | undefined, opts?: {
|
|
11283
|
-
withUnits?: boolean;
|
|
11284
|
-
}): string;
|
|
11285
|
-
/** @internal */
|
|
11286
|
-
declare const STYLE_ATTR_NAMES: Set<string>;
|
|
11287
|
-
/** @internal */
|
|
11288
|
-
declare const DEFAULT_DURATION_MS = 1000;
|
|
11289
|
-
/**
|
|
11290
|
-
* Converts a kebab-case string to camelCase.
|
|
11291
|
-
* @param kebab The kebab-case string.
|
|
11292
|
-
* @internal
|
|
11293
|
-
*/
|
|
11294
|
-
declare function kebabToCamelCaseWord(kebab: string): string;
|
|
11295
|
-
/**
|
|
11296
|
-
* Converts a camelCase string to kebab-case.
|
|
11297
|
-
* @param camel The camelCase string.
|
|
11298
|
-
* @internal
|
|
11299
|
-
*/
|
|
11300
|
-
declare function camelCaseToKebabWordIfNeeded(camel: string): string;
|
|
11301
|
-
/**
|
|
11302
|
-
* Clamps a number between a minimum and maximum value.
|
|
11303
|
-
* @param value The number to clamp.
|
|
11304
|
-
* @param min The minimum value.
|
|
11305
|
-
* @param max The maximum value.
|
|
11306
|
-
* @internal
|
|
11307
|
-
*/
|
|
11308
|
-
declare function clamp(value: number, min: number, max: number): number;
|
|
11309
|
-
|
|
11310
|
-
/** Every field identity `root` can carry, as canonical paths, sorted. @internal */
|
|
11311
|
-
declare function schemaFieldUniverse(root: PxSchema<any, any>): Array<string>;
|
|
11312
|
-
|
|
11313
|
-
/** One entry of the release log — what shipped, when, and what it changed. @internal */
|
|
11314
|
-
interface SchemaReleaseRecord {
|
|
11315
|
-
readonly version: string;
|
|
11316
|
-
/** ISO date, `YYYY-MM-DD`. */
|
|
11317
|
-
readonly date: string;
|
|
11318
|
-
/** The first release: nothing to compare it against. */
|
|
11319
|
-
readonly baseline?: boolean;
|
|
11320
|
-
readonly added: ReadonlyArray<string>;
|
|
11321
|
-
readonly removed: ReadonlyArray<string>;
|
|
11322
|
-
readonly note?: string;
|
|
11323
|
-
}
|
|
11324
|
-
/** Keys that appeared and keys that left between two inventories, each sorted. @internal */
|
|
11325
|
-
declare function diffFieldUniverse(previous: ReadonlyArray<string>, current: ReadonlyArray<string>): {
|
|
11326
|
-
added: Array<string>;
|
|
11327
|
-
removed: Array<string>;
|
|
11328
|
-
};
|
|
11329
|
-
/** What a release must do about the version. `refuse` set means: do not release as-is. @internal */
|
|
11330
|
-
interface SchemaReleasePlan {
|
|
11331
|
-
/** Did any key appear or leave since the last release? */
|
|
11332
|
-
readonly changed: boolean;
|
|
11333
|
-
/** Which kind of step the change requires — a removal is never additive. */
|
|
11334
|
-
readonly requiredKind?: WireStepKind;
|
|
11335
|
-
/** The version this release must carry. */
|
|
11336
|
-
readonly requiredVersion?: string;
|
|
11337
|
-
readonly refuse?: string;
|
|
11338
|
-
}
|
|
11339
|
-
/**
|
|
11340
|
-
* THE BUMP RULE. A key change requires `b + 1` and a step that explains it; no key change
|
|
11341
|
-
* requires nothing. The rule never picks the number by taste — the inventory diff does.
|
|
11342
|
-
* @internal
|
|
11343
|
-
*/
|
|
11344
|
-
declare function planSchemaRelease(p: {
|
|
11345
|
-
readonly added: ReadonlyArray<string>;
|
|
11346
|
-
readonly removed: ReadonlyArray<string>;
|
|
11347
|
-
/** `PX_PLAYER_SCHEMA_VERSION` — what the source says now. */
|
|
11348
|
-
readonly declared: string;
|
|
11349
|
-
/** The version of the last release record. */
|
|
11350
|
-
readonly lastReleased: string;
|
|
11351
|
-
readonly steps: ReadonlyArray<WireVersionStep>;
|
|
11352
|
-
}): SchemaReleasePlan;
|
|
11353
|
-
/**
|
|
11354
|
-
* Everything wrong with the release log, as sentences — empty when it is consistent. The log
|
|
11355
|
-
* must start at the baseline, move strictly forward, END at the version the source declares,
|
|
11356
|
-
* and every release after the baseline must have the step that explains it.
|
|
11357
|
-
* @internal
|
|
11358
|
-
*/
|
|
11359
|
-
declare function releaseLogProblems(releases: ReadonlyArray<SchemaReleaseRecord>, steps: ReadonlyArray<WireVersionStep>, declared: string, baseline: string): Array<string>;
|
|
11360
|
-
|
|
11361
|
-
export { PxFillMode as $, type PxBezierPath as A, BASELINE_PLAYER_VERSION as B, COLOR_ATTR_NAMES as C, DEFAULT_DURATION_MS as D, PxBezierPathSchema as E, type PxBinding as F, type GlyphCharBox as G, PxClipPathEffectSchema as H, PxCloneEffectSchema as I, PxCloneWithout as J, PxControlMode as K, LOOP_JUMP_SHIFT_MS as L, type MaterializeAllOptions as M, type PxControlProps as N, type PxCreateElement as O, type PxAnimatedSvgDocument as P, type PxDefs as Q, PxDefsSchema as R, type PxDiagnostic as S, PxDiagnosticKind as T, type PxDiagnostics as U, type PxDiagnosticsConfig as V, type PxEffects as W, PxEffectsSchema as X, type PxElementAnimation as Y, PxElementAnimationSchema as Z, PxFillGradientEffectSchema as _, type PxEngineCallbacks as a, TEXT_CONTENT_ATTR as a$, PxFinishAction as a0, type PxGlyph as a1, type PxGlyphFont as a2, PxGradientSpreadMethod as a3, PxGradientStopSchema as a4, PxGradientType as a5, type PxInfer as a6, type PxKeyframe as a7, PxKeyframeSchema as a8, PxKeyframeValueSchema as a9, PxScrollRangePointSchema as aA, PxScrollRangeSchema as aB, PxScrollSchema as aC, PxScrollSource as aD, PxStrokeTrimEffectSchema as aE, PxStrokeTrimSubPaths as aF, type PxSvgNode as aG, PxSvgNodeExtra as aH, PxTextEffectSchema as aI, PxTextPathEffectSchema as aJ, PxTextPathMethod as aK, PxTextPathSpacing as aL, type PxTimeline as aM, PxTimelineEngine as aN, PxTimelineEngineExtra as aO, PxTimelineSchema as aP, PxTransformByEffectSchema as aQ, type PxTransformParts as aR, PxTransformPartsSchema as aS, type PxTransformValue as aT, PxTransformValueSchema as aU, type PxTrigger as aV, PxTriggerSchema as aW, PxUnits as aX, type PxValidationContext as aY, type RemoveIndex as aZ, STYLE_ATTR_NAMES as a_, PxLengthAdjust as aa, type PxLoop as ab, PxLoopDirection as ac, PxLoopRepeatAt as ad, PxLoopSchema as ae, PxMaskType as af, PxMaskedByEffectSchema as ag, PxNodeBase as ah, PxNodeSchema as ai, type PxNormalizedKeyframe as aj, type PxNormalizedPropertyAnimation as ak, PxOutAction as al, PxPathOverflow as am, PxPinAlign as an, PxPlaybackDirection as ao, type PxPropertyAnimation as ap, PxPropertyAnimationSchema as aq, PxRepeaterEffectSchema as ar, PxRetimeEffectSchema as as, type PxSchema as at, type PxSchemaDesc as au, type PxScroll as av, PxScrollAxis as aw, PxScrollKind as ax, PxScrollPhase as ay, type PxScrollRangePoint as az, type PxAnimatorAPI as b, sanitizeAttributeValue as b$, TRANSFORM_FN_NAMES as b0, type Vec2 as b1, WIRE_VERSION_KEY as b2, type WireConversionConfig as b3, WireStepKind as b4, type WireVersion as b5, WireVersionRelation as b6, type WireVersionStep as b7, applyWireSteps as b8, bezierToSvgPath as b9, getNormalizedProps as bA, interpolateValue as bB, isNativeForced as bC, isPxElementFileFormat as bD, isPxElementFileFormatDeep as bE, isScrollTimeline as bF, kebabToCamelCaseWord as bG, kfEasing as bH, kfValue as bI, layoutGlyphTextChars as bJ, materializeAllInTree as bK, materializeGlyphText as bL, materializeGlyphTextAlongPath as bM, materializeMotionPathInPropAnim as bN, mayUseNativeScrollTimeline as bO, mergeStaticTransformIntoAnimDef as bP, nestAnimatorTimeline as bQ, parseWireVersion as bR, planSchemaRelease as bS, px as bT, readWireVersion as bU, releaseLogProblems as bV, reportDocumentDiagnostics as bW, resolveControlMode as bX, resolveTimelineEngine as bY, resolveTrigger as bZ, reverseEasing as b_, calcAnimationValues as ba, camelCaseToKebabWordIfNeeded as bb, clamp as bc, compareWireVersion as bd, composeTransformParts as be, controlModeTakesOverTrigger as bf, convertPlayerDocument as bg, createDiagnostics as bh, createPathSampler as bi, cubicBezier as bj, deepClone as bk, describeSchema as bl, diagnoseDocument as bm, diffFieldUniverse as bn, diffInEffect as bo, downgradePlayerDocument as bp, extendedPathForBrowser as bq, flattenAnimatorTimeline as br, formatWireVersion as bs, generateNewIds as bt, generateUniqueId as bu, getAnimatorConfig as bv, getBindings as bw, getChildren as bx, getDefs as by, getNormalizedBindings as bz, type PxAnimatorConfig as c, schemaFieldUniverse as c0, schemaKeys as c1, scrollOffsetProgress as c2, scrollPhaseInterval as c3, scrollResolveAxis as c4, scrollTotalDurationMs as c5, scrollViewProgress as c6, splitEasing as c7, subdivideCubicBezier as c8, toRGBA as c9, validateDocument as ca, validateNodeEffects as cb, versionAdvice as cc, PxStartOn as d, type PxNode as e, CSS_ONLY_STYLE_PROPS as f, DISALLOWED_SVG_TAGS_LOWER as g, PCT_BASED_ATTR_NAMES as h, PLAYER_WIRE_STEPS as i, PLAYER_WIRE_VERSION as j, PX_ANIM_ATTR_NAME as k, PX_ANIM_SRC_ATTR_NAME as l, PX_TRANSFORM_PART_KEYS as m, PX_TRIGGER_DEFAULTS as n, PX_UNKNOWN_KEY_ERROR as o, type PlayerConversionResult as p, PxAlongPathMode as q, type PxAnimatable as r, PxAnimatedSvgDocumentSchema as s, type PxAnimationDefinition as t, type PxAnimatorCallbacks as u, PxAnimatorConfigSchema as v, type PxAnimatorHandle as w, type PxAnyKeyframe as x, PxAttrValueSchema as y, type PxBasicAnimatorAPI as z };
|
|
11126
|
+
export { PxLoopRepeatAt as $, type PxDefinitions as A, PxDefinitionsSchema as B, type PxDiagnostic as C, PxDiagnosticCode as D, PxDiagnosticKind as E, type PxDiagnostics as F, type PxDiagnosticsConfig as G, type PxEffects as H, PxEffectsSchema as I, type PxElementAnimation as J, PxElementAnimationSchema as K, PxFillGradientEffectSchema as L, PxFillMode as M, PxFinishAction as N, type PxGlyph as O, type PxAnimatedSvgDocument as P, type PxGlyphFont as Q, PxGradientSpreadMethod as R, PxGradientStopSchema as S, PxGradientType as T, type PxInfer as U, type PxKeyframe as V, PxKeyframeSchema as W, PxKeyframeValueSchema as X, PxLengthAdjust as Y, type PxLoop as Z, PxLoopDirection as _, type PxEngineCallbacks as a, formatWireVersion as a$, PxLoopSchema as a0, PxMaskType as a1, PxMaskedByEffectSchema as a2, PxNodeBaseSchema as a3, PxNodeSchema as a4, PxOutAction as a5, PxPathOverflow as a6, PxPinAlign as a7, type PxPlaybackApi as a8, PxPlaybackDirection as a9, PxTimelineEngineSetting as aA, PxTimelineSchema as aB, PxTransformByEffectSchema as aC, type PxTransformParts as aD, PxTransformPartsSchema as aE, type PxTransformValue as aF, PxTransformValueSchema as aG, type PxTrigger as aH, PxTriggerSchema as aI, PxUnits as aJ, type PxValidationContext as aK, type PxVec2 as aL, type PxWireConversionOptions as aM, type PxWireConversionResult as aN, PxWireStepKind as aO, type PxWireVersion as aP, PxWireVersionRelation as aQ, type PxWireVersionStep as aR, applyWireSteps as aS, calcAnimationValues as aT, compareWireVersion as aU, controlModeTakesOverTrigger as aV, convertWireDocument as aW, describeSchema as aX, diagnoseDocument as aY, downgradeWireDocument as aZ, flattenAnimatorTimeline as a_, type PxPropertyAnimation as aa, PxPropertyAnimationSchema as ab, type PxRemoveIndex as ac, PxRepeaterEffectSchema as ad, PxRetimeEffectSchema as ae, type PxSchema as af, type PxSchemaDesc as ag, type PxScroll as ah, PxScrollAxis as ai, PxScrollKind as aj, PxScrollPhase as ak, type PxScrollRangePoint as al, PxScrollRangePointSchema as am, PxScrollRangeSchema as an, PxScrollSchema as ao, PxScrollSource as ap, PxStrokeTrimEffectSchema as aq, PxStrokeTrimSubPaths as ar, type PxSvgNode as as, PxSvgNodeRootSchema as at, PxTextEffectSchema as au, PxTextPathEffectSchema as av, PxTextPathMethod as aw, PxTextPathSpacing as ax, type PxTimeline as ay, PxTimelineEngine as az, type PxAnimatorApi as b, generateNewIds as b0, getAnimatorConfig as b1, getBindings as b2, getChildren as b3, getDefinitions as b4, isNativeForced as b5, isPxDocument as b6, isValidPxDocument as b7, materializeAllInTree as b8, mayUseNativeScrollTimeline as b9, deepClone as bA, generateUniqueId as bB, interpolateValue as bC, keyframeEasing as bD, keyframeValue as bE, materializeMotionPathInPropAnim as bF, mergeStaticTransformIntoAnimDef as bG, reportDocumentDiagnostics as bH, sanitizeAttributeValue as bI, nestAnimatorTimeline as ba, normalizeBindings as bb, parseWireVersion as bc, px as bd, readWireVersion as be, resolveControlMode as bf, resolveTimelineEngine as bg, resolveTrigger as bh, schemaKeys as bi, toDomProps as bj, validateDocument as bk, validateNodeEffects as bl, wireVersionAdvice as bm, type PxAnimatable as bn, PX_ANIM_ATTR_NAME as bo, PX_ANIM_SRC_ATTR_NAME as bp, PX_CSS_ONLY_STYLE_PROPS as bq, PX_DISALLOWED_SVG_TAGS_LOWER as br, PX_LOOP_JUMP_SHIFT_MS as bs, PX_TEXT_CONTENT_ATTR as bt, PX_UNKNOWN_KEY_ERROR as bu, type PxAnyKeyframe as bv, type PxMaterializeAllOptions as bw, type PxNormalizedKeyframe as bx, type PxNormalizedPropertyAnimation as by, createDiagnostics as bz, type PxAnimatorConfig as c, PxStartOn as d, type PxNode as e, PX_TRANSFORM_PART_KEYS as f, PX_TRIGGER_DEFAULTS as g, PX_WIRE_BASELINE_VERSION as h, PX_WIRE_STEPS as i, PX_WIRE_VERSION as j, PX_WIRE_VERSION_KEY as k, PxAlongPathMode as l, PxAnimatedSvgDocumentSchema as m, type PxAnimationDefinition as n, type PxAnimatorCallbacks as o, PxAnimatorConfigSchema as p, type PxAnimatorHandle as q, PxAttrValueSchema as r, type PxBezierPath as s, PxBezierPathSchema as t, type PxBinding as u, PxClipPathEffectSchema as v, PxCloneEffectSchema as w, PxCloneWithout as x, PxControlMode as y, type PxControlProps as z };
|