@hyperframes/parsers 0.8.49 → 0.8.51

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { C as CompositionVariable, T as TimelineElement, a as CanvasResolution, K as Keyframe, S as StageZoomKeyframe, V as ValidationResult } from './types-Y0NXTiVo.js';
2
2
  export { A as AddElementData, b as Asset, B as BooleanVariable, c as CANVAS_DIMENSIONS, d as COMPOSITION_VARIABLE_TYPES, e as ColorVariable, f as CompositionAPI, g as CompositionAsset, h as CompositionSpec, i as CompositionVariableBase, j as CompositionVariableType, D as DEFAULT_DURATIONS, E as ElementKeyframes, k as EnumVariable, F as FontVariable, I as ImageVariable, l as KeyframeProperties, M as MediaElementType, m as MediaFile, N as NumberVariable, P as PlayerAPI, R as ResolvedResolutionFlag, n as StageZoom, o as StringVariable, p as TIMELINE_COLORS, q as TimelineCompositionElement, r as TimelineElementBase, s as TimelineElementType, t as TimelineMediaElement, u as TimelineTextElement, v as VALID_CANVAS_RESOLUTIONS, W as WaveformData, w as getDefaultStageZoom, x as isAspectAgnosticResolutionAlias, y as isCompositionElement, z as isMediaElement, G as isTextElement, H as normalizeResolutionFlag, J as resolveResolutionFlagPair } from './types-Y0NXTiVo.js';
3
- export { A as ArcPathConfig, a as ArcPathSegment, G as GsapAnimation, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, e as GsapProvenance, f as GsapProvenanceKind, K as KeyframeEditability, P as ParsedGsap, S as SourcedGsapPercentageKeyframe, g as SplitAnimationsOptions, h as SplitAnimationsResult, i as editabilityForProvenance, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-QZcXUoVf.js';
3
+ export { A as ArcPathConfig, a as ArcPathSegment, G as GsapAnimation, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, e as GsapProvenance, f as GsapProvenanceKind, K as KeyframeEditability, P as ParsedGsap, S as SourcedGsapPercentageKeyframe, g as SplitAnimationsOptions, h as SplitAnimationsResult, i as editabilityForProvenance, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-b8lNzSbI.js';
4
4
  export { isStudioHoldSet } from './gsapParser.js';
5
5
  export { PROPERTY_GROUPS, PropertyGroupName, SUPPORTED_EASES, SUPPORTED_PROPS, classifyPropertyGroup, classifyTweenPropertyGroup } from './gsapConstants.js';
6
6
  export { SPRING_PRESETS, SpringPreset, generateSpringEaseData } from './springEase.js';
@@ -8,6 +8,9 @@ export { parseGsapScriptAcorn as parseGsapScript } from './gsapParserAcorn.js';
8
8
  export { EXCLUDED_TAGS, ensureHfIds, isCompositionTemplate, mintHfId, walkCompositionDescendants } from './hfIds.js';
9
9
  export { ParsableDocumentLike, SubCompositionValidity, SubCompositionValidityReason, checkSubCompositionUsability } from './subCompositionValidity.js';
10
10
  export { CANONICAL_AUTHORED_TIMING_ATTRIBUTES, COMPOSITION_ATTRIBUTES, COMPOSITION_CONTRACT_VERSION, ClipAttributeReader, ClipAttributeWriter, ClipTiming, ClipTimingDiagnostic, ClipTimingDiagnosticCode, ClipTimingUpdate, ClipTimingWriteError, DERIVED_TIMING_ATTRIBUTES, LEGACY_TIMING_ATTRIBUTES, ReadClipTimingOptions, ReferenceExpression, parseNumeric, parseStartExpression, readClipTiming, writeClipTiming } from './compositionContract.js';
11
+ export { StructureNode, TrackKind, TrackKindSource, isSubCompositionHost, isTimedElement, topLevelElements, trackKindOf } from './topLevelElements.js';
12
+ export { AttrReader, DEFAULT_IMAGE_TIMELINE_DURATION_SECONDS, MAX_PLAYBACK_RATE, MIN_PLAYBACK_RATE, MediaDurationResult, MediaDurationSource, MediaTag, PENDING_MEDIA_DURATION_READERS, ResolveMediaDurationInput, clampPlaybackRate, readAuthoredDurationSeconds, readDataDurationSeconds, readMediaOffsetSeconds, readPlaybackRate, resolveMediaDuration, resolveNaturalDurationSeconds } from './mediaDuration.js';
13
+ export { CompositionDurationResult, CompositionDurationSource, ResolveCompositionDurationInput, resolveCompositionDuration } from './compositionDuration.js';
11
14
  export { CANONICAL_FONT_DISPLAY_NAMES, FONT_ALIAS_KEYS, FONT_ALIAS_MAP, VariableUsageScan, decodeUrlPathVariants, parseCompositionVariables, resolveAliasDisplayName, scanVariableUsage } from './composition.js';
12
15
 
13
16
  /**
@@ -126,11 +129,7 @@ declare function checkOutputResolutionCompatibility(input: {
126
129
  hdrRequested?: boolean;
127
130
  }): OutputResolutionCompatibility;
128
131
 
129
- /**
130
- * Rewrite `script` so top-level helper calls / loops that build the timeline
131
- * become explicit literal tweens. Returns the original script unchanged when
132
- * there is nothing statically-resolvable to unroll.
133
- */
132
+ /** Rewrite top-level helper calls and loops into literal tweens; unchanged when nothing can be unrolled. */
134
133
  declare function unrollComputedTimeline(script: string): string;
135
134
 
136
135
  declare function queryByAttr(root: ParentNode, attr: string, value: string, tag?: string): Element | null;
@@ -146,6 +145,38 @@ declare const HTML_BODY_CSS_HEIGHT_FIRST_RE: RegExp;
146
145
  /** Viewport meta content. Shared by lint (reads groups 2/4) and cli (replaces via 1/3). */
147
146
  declare const VIEWPORT_META_SIZE_RE: RegExp;
148
147
 
148
+ type TimingFinding = {
149
+ kind: "tween-outside-window";
150
+ selector: string;
151
+ elementId: string | null;
152
+ dataStart: number;
153
+ dataEnd: number | null;
154
+ tweenStart: number;
155
+ tweenEnd: number;
156
+ } | {
157
+ kind: "animated-without-timing";
158
+ selector: string;
159
+ elementId: string | null;
160
+ } | {
161
+ kind: "timeline-exceeds-root-duration";
162
+ rootDuration: number;
163
+ timelineEnd: number;
164
+ };
165
+ /** Timing that could not be read statically. Reported, never flagged. */
166
+ interface UnresolvedTiming {
167
+ selector: string;
168
+ reason: "duration" | "position" | "stagger" | "start-attribute";
169
+ }
170
+ interface TimingMismatchReport {
171
+ findings: TimingFinding[];
172
+ unresolved: UnresolvedTiming[];
173
+ }
174
+ /**
175
+ * Compares the GSAP timeline in a composition file with the timing attributes of its elements.
176
+ * Attributes are authoritative: a tween that places an element outside its window is a finding.
177
+ */
178
+ declare function timingMismatches(html: string): TimingMismatchReport;
179
+
149
180
  interface MediaSrcMutation {
150
181
  selector: string;
151
182
  operation: "src_assignment" | "set_attribute";
@@ -154,4 +185,4 @@ interface MediaSrcMutation {
154
185
  /** Find literal source writes whose target is a statically resolvable DOM lookup. */
155
186
  declare function extractMediaSrcMutations(script: string): MediaSrcMutation[];
156
187
 
157
- export { CanvasResolution, CompositionHtmlParseError, type CompositionMetadata, CompositionVariable, HTML_BODY_CSS_HEIGHT_FIRST_RE, HTML_BODY_CSS_WIDTH_FIRST_RE, Keyframe, type MediaSrcMutation, type OutputResolutionCompatibility, type OutputResolutionIssueKind, type ParsedHtml, StageZoomKeyframe, TimelineElement, VIEWPORT_META_SIZE_RE, ValidationResult, addElementToHtml, checkOutputResolutionCompatibility, extractCompositionMetadata, extractMediaSrcMutations, parseHtml, queryByAttr, removeElementFromHtml, removeElementWithGsapCascade, suggestMatchingPreset, unrollComputedTimeline, updateElementInHtml, validateCompositionHtml };
188
+ export { CanvasResolution, CompositionHtmlParseError, type CompositionMetadata, CompositionVariable, HTML_BODY_CSS_HEIGHT_FIRST_RE, HTML_BODY_CSS_WIDTH_FIRST_RE, Keyframe, type MediaSrcMutation, type OutputResolutionCompatibility, type OutputResolutionIssueKind, type ParsedHtml, StageZoomKeyframe, TimelineElement, type TimingFinding, type TimingMismatchReport, type UnresolvedTiming, VIEWPORT_META_SIZE_RE, ValidationResult, addElementToHtml, checkOutputResolutionCompatibility, extractCompositionMetadata, extractMediaSrcMutations, parseHtml, queryByAttr, removeElementFromHtml, removeElementWithGsapCascade, suggestMatchingPreset, timingMismatches, unrollComputedTimeline, updateElementInHtml, validateCompositionHtml };