onda-engine 0.1.0 → 0.2.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/README.md +60 -39
- package/dist/cinema.js +1 -1
- package/dist/cinema.js.map +1 -1
- package/dist/components.d.ts +12 -1
- package/dist/components.js +24 -1
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react.d.ts +3 -1
- package/dist/react.js +101 -17
- package/dist/react.js.map +1 -1
- package/dist/wasm/pkg/onda_wasm.d.ts +195 -0
- package/dist/wasm/pkg/onda_wasm_bg.wasm.d.ts +34 -0
- package/dist/wasm-audio/pkg/onda_wasm_audio.d.ts +106 -0
- package/dist/wasm-audio/pkg/onda_wasm_audio_bg.wasm.d.ts +20 -0
- package/dist/wasm-vello/index.d.ts +1 -0
- package/dist/wasm-vello/pkg/onda_wasm_vello.d.ts +96 -0
- package/dist/wasm-vello/pkg/onda_wasm_vello_bg.wasm.d.ts +24 -0
- package/package.json +7 -7
package/dist/components.d.ts
CHANGED
|
@@ -1954,6 +1954,11 @@ interface ResponsiveTransform {
|
|
|
1954
1954
|
y: number;
|
|
1955
1955
|
scale: number;
|
|
1956
1956
|
}
|
|
1957
|
+
/** Whether an element is a full-bleed background plate: image/video content whose rendered size
|
|
1958
|
+
* (content size × scale) covers ≥{@link FULL_BLEED} of BOTH design axes. Such plates must COVER
|
|
1959
|
+
* the output (scale by the LARGER axis ratio), never FIT it (the smaller ratio) — fitting a
|
|
1960
|
+
* background on an aspect flip (16:9 → 9:16) shrinks it to a band with dead space top and bottom. */
|
|
1961
|
+
declare function isFullBleed(props: Record<string, unknown> | undefined, design: Box): boolean;
|
|
1957
1962
|
/** The representative design-space point an element "lives at" — the mean of its
|
|
1958
1963
|
* position track, nudged to the visual CENTRE of image content (whose pivot defaults
|
|
1959
1964
|
* to a corner). Returns `null` for elements with NO absolute position: those already
|
|
@@ -1969,6 +1974,12 @@ declare function responsiveEntryTransform(anchor: {
|
|
|
1969
1974
|
x: number;
|
|
1970
1975
|
y: number;
|
|
1971
1976
|
} | null, design: Box, out: Box): ResponsiveTransform;
|
|
1977
|
+
/** COVER re-frame for a full-bleed plate ({@link isFullBleed}): uniformly scale the WHOLE design
|
|
1978
|
+
* canvas by the LARGER axis ratio and centre it on the output, so the plate keeps filling the
|
|
1979
|
+
* frame (overflowing the long axis) instead of fitting into a band with dead space. The translate
|
|
1980
|
+
* is anchor-independent — it just centres the scaled design canvas, preserving every element's
|
|
1981
|
+
* relative position within that plate. Matching canvas ⇒ identity. */
|
|
1982
|
+
declare function responsiveCoverTransform(design: Box, out: Box): ResponsiveTransform;
|
|
1972
1983
|
|
|
1973
1984
|
/** The per-glyph entrance presets. */
|
|
1974
1985
|
type KineticTextPreset = 'rise' | 'fade' | 'scale' | 'blur' | 'wave';
|
|
@@ -3477,4 +3488,4 @@ interface WordStaggerProps extends TextStyleProps {
|
|
|
3477
3488
|
}
|
|
3478
3489
|
declare function WordStagger({ text: textProp, fontSize, color: colorProp, width, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, justify, delay: delayIn, stagger: staggerIn, }: WordStaggerProps): react.JSX.Element;
|
|
3479
3490
|
|
|
3480
|
-
export { type AudioAnalyzer, AudioClip, type AudioClipProps, AudioVisualizer, type AudioVisualizerProps, BarChart, type BarChartDatum, type BarChartProps, type Beats, type BeatsHandle, BentoGrid, type BentoGridProps, type BentoItem, BlurReveal, type BlurRevealProps, BoundingBox, type BoundingBoxProps, type Box, BrowserFrame, type BrowserFrameProps, Button, type ButtonProps, COMPONENT_SETTLE, Callout, type CalloutDirection, type CalloutProps, CameraShake, type CameraShakeProps, type CaptionEntry, Captions, type CaptionsProps, CardShowcase, type CardShowcaseProps, ChapterCard, type ChapterCardProps, CodeBlock, type CodeBlockProps, CodeDiff, type CodeDiffProps, Confetti, type ConfettiProps, CountUp, type CountUpProps, Cursor, type CursorProps, DURATION, DeviceFrame, type DeviceFrameProps, type DiffLine, type DiffLineType, type Divergence, type DivergenceOpts, DrawOn, type DrawOnProps, type DurationToken, DynamicGrid, type DynamicGridProps, type Ease, type ElementSize, EndCard, type EndCardProps, type EntranceOptions, type EntranceType, FadeIn, type FadeInProps, FadeOut, type FadeOutProps, FilmGrade, type FilmGradeProps, type FilmLook, type FitOpts, type FitToClipOpts, type FontMetrics, type FrameSize, type GlyphCell, type GlyphInfo, type GlyphLine, type GlyphLineOpts, GradientShift, type GradientShiftProps, GrainOverlay, type GrainOverlayProps, HOUSE_EASE, Highlight, type HighlightProps, IconPop, type IconPopProps, type IconShape, ImageReveal, type ImageRevealFit, type ImageRevealMotion, type ImageRevealProps, InputField, type InputFieldProps, KanbanBoard, type KanbanBoardProps, type KanbanColumn, KenBurns, type KenBurnsProps, type KeyframeTracks, Keyframes, type KeyframesImageContent, type KeyframesProps, type KeyframesTextContent, KineticText, type KineticTextPreset, type KineticTextProps, LINE_RATIO, LineChart, type LineChartProps, LogoReveal, type LogoRevealPreset, type LogoRevealProps, LogoSting, type LogoStingProps, type LookbookLayout, LookbookShot, type LookbookShotProps, LowerThird, type LowerThirdProps, Marquee, type MarqueeProps, MaskReveal, type MaskRevealProps, MatrixDecode, type MatrixDecodeProps, type MeasureOpts, MeshGradient, type MeshGradientProps, Moodboard, type MoodboardProps, type Motion, NodeGraph, type NodeGraphProps, OVERSHOOT, PLACEMENT_DESCRIPTION, PLACEMENT_REGIONS, Parallax, type ParallaxLayer, type ParallaxProps, PathMorph, type PathMorphProps, type PatternInput, PieReveal, type PieRevealProps, type PieRevealSlice, Placed, type PlacedProps, type Placement, type PlacementPoint, type PlacementRegion, PlacementShift, type PlacementShiftProps, type PosKey, PriceTag, type PriceTagProps, PricingCard, type PricingCardProps, ProductWall, type ProductWallProps, ProgressBar, type ProgressBarProps, ProgressSteps, type ProgressStepsProps, PulsingIndicator, type PulsingIndicatorProps, QuoteCard, type QuoteCardProps, type RenderBackend, type ResolvedBounds, type ResolvedPlacement, type ResponsiveTransform, RgbGlitch, type RgbGlitchProps, RotateIn, type RotateInProps, SAFE_MARGIN, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER, type SampledKeyframes, type Satellite, ScaleIn, type ScaleInProps, Scrim, type ScrimProps, type SettleFn, ShimmerSweep, type ShimmerSweepProps, SiteReveal, type SiteRevealProps, SkeletonCard, type SkeletonCardProps, SlideIn, type SlideInProps, SlideOut, type SlideOutProps, SlotMachineRoll, type SlotMachineRollProps, SplitLockup, type SplitLockupProps, SplitScreen, type SplitScreenProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, StaggerGroup, type StaggerGroupProps, StatCard, type StatCardProps, TIME_DESCRIPTION, Terminal, type TerminalProps, type TextAnimate, TextAnimator, type TextAnimatorDirection, type TextAnimatorProps, type TextAnimatorUnit, TextFadeReplace, type TextFadeReplaceProps, type TextMetrics, type Theme, ThemeProvider, type ThemeProviderProps, type TimeInput, Timeline, type TimelineEvent, type TimelineProps, TitleCard, type TitleCardProps, TrackingIn, type TrackingInProps, Typewriter, type TypewriterProps, Underline, type UnderlineProps, type ValKey, VideoClip, type VideoClipProps, Vignette, type VignetteProps, WordRotate, type WordRotateProps, WordStagger, type WordStaggerProps, beatPulse, defaultTheme, divergenceReport, entryDesignAnchor, entryFade, entryFadeRise, entryScale, entrySlide, exitFade, exitFadeFall, exitScale, exitSlide, fitFontSize, fitMaxWidth, fontMetrics, framesOf, framesSinceBeat, glyphLayout, hasKeyframeTracks, heroReveal, isBeat, isPlacement, layoutGlyphLine, lineStartX, lineTopY, loadFont, matchesExport, measureText, placementSchema, preloadTextMetrics, resolvePlacement, responsiveEntryTransform, sampleKeyframes, sampleTrack, settleTime, staggerFrames, staggeredSettle, stateSwap, timeSchema, useAudioBeats, useAudioData, useEntrance, useFittedFontSize, useFontMetrics, useGlyphLayout, usePlacement, useResolvedBounds, useSceneProgress, useSpringValue, useStaggeredEntrance, useTextMetrics, useTextMetricsReady, useTextReveal, useTheme, useTimeScale };
|
|
3491
|
+
export { type AudioAnalyzer, AudioClip, type AudioClipProps, AudioVisualizer, type AudioVisualizerProps, BarChart, type BarChartDatum, type BarChartProps, type Beats, type BeatsHandle, BentoGrid, type BentoGridProps, type BentoItem, BlurReveal, type BlurRevealProps, BoundingBox, type BoundingBoxProps, type Box, BrowserFrame, type BrowserFrameProps, Button, type ButtonProps, COMPONENT_SETTLE, Callout, type CalloutDirection, type CalloutProps, CameraShake, type CameraShakeProps, type CaptionEntry, Captions, type CaptionsProps, CardShowcase, type CardShowcaseProps, ChapterCard, type ChapterCardProps, CodeBlock, type CodeBlockProps, CodeDiff, type CodeDiffProps, Confetti, type ConfettiProps, CountUp, type CountUpProps, Cursor, type CursorProps, DURATION, DeviceFrame, type DeviceFrameProps, type DiffLine, type DiffLineType, type Divergence, type DivergenceOpts, DrawOn, type DrawOnProps, type DurationToken, DynamicGrid, type DynamicGridProps, type Ease, type ElementSize, EndCard, type EndCardProps, type EntranceOptions, type EntranceType, FadeIn, type FadeInProps, FadeOut, type FadeOutProps, FilmGrade, type FilmGradeProps, type FilmLook, type FitOpts, type FitToClipOpts, type FontMetrics, type FrameSize, type GlyphCell, type GlyphInfo, type GlyphLine, type GlyphLineOpts, GradientShift, type GradientShiftProps, GrainOverlay, type GrainOverlayProps, HOUSE_EASE, Highlight, type HighlightProps, IconPop, type IconPopProps, type IconShape, ImageReveal, type ImageRevealFit, type ImageRevealMotion, type ImageRevealProps, InputField, type InputFieldProps, KanbanBoard, type KanbanBoardProps, type KanbanColumn, KenBurns, type KenBurnsProps, type KeyframeTracks, Keyframes, type KeyframesImageContent, type KeyframesProps, type KeyframesTextContent, KineticText, type KineticTextPreset, type KineticTextProps, LINE_RATIO, LineChart, type LineChartProps, LogoReveal, type LogoRevealPreset, type LogoRevealProps, LogoSting, type LogoStingProps, type LookbookLayout, LookbookShot, type LookbookShotProps, LowerThird, type LowerThirdProps, Marquee, type MarqueeProps, MaskReveal, type MaskRevealProps, MatrixDecode, type MatrixDecodeProps, type MeasureOpts, MeshGradient, type MeshGradientProps, Moodboard, type MoodboardProps, type Motion, NodeGraph, type NodeGraphProps, OVERSHOOT, PLACEMENT_DESCRIPTION, PLACEMENT_REGIONS, Parallax, type ParallaxLayer, type ParallaxProps, PathMorph, type PathMorphProps, type PatternInput, PieReveal, type PieRevealProps, type PieRevealSlice, Placed, type PlacedProps, type Placement, type PlacementPoint, type PlacementRegion, PlacementShift, type PlacementShiftProps, type PosKey, PriceTag, type PriceTagProps, PricingCard, type PricingCardProps, ProductWall, type ProductWallProps, ProgressBar, type ProgressBarProps, ProgressSteps, type ProgressStepsProps, PulsingIndicator, type PulsingIndicatorProps, QuoteCard, type QuoteCardProps, type RenderBackend, type ResolvedBounds, type ResolvedPlacement, type ResponsiveTransform, RgbGlitch, type RgbGlitchProps, RotateIn, type RotateInProps, SAFE_MARGIN, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER, type SampledKeyframes, type Satellite, ScaleIn, type ScaleInProps, Scrim, type ScrimProps, type SettleFn, ShimmerSweep, type ShimmerSweepProps, SiteReveal, type SiteRevealProps, SkeletonCard, type SkeletonCardProps, SlideIn, type SlideInProps, SlideOut, type SlideOutProps, SlotMachineRoll, type SlotMachineRollProps, SplitLockup, type SplitLockupProps, SplitScreen, type SplitScreenProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, StaggerGroup, type StaggerGroupProps, StatCard, type StatCardProps, TIME_DESCRIPTION, Terminal, type TerminalProps, type TextAnimate, TextAnimator, type TextAnimatorDirection, type TextAnimatorProps, type TextAnimatorUnit, TextFadeReplace, type TextFadeReplaceProps, type TextMetrics, type Theme, ThemeProvider, type ThemeProviderProps, type TimeInput, Timeline, type TimelineEvent, type TimelineProps, TitleCard, type TitleCardProps, TrackingIn, type TrackingInProps, Typewriter, type TypewriterProps, Underline, type UnderlineProps, type ValKey, VideoClip, type VideoClipProps, Vignette, type VignetteProps, WordRotate, type WordRotateProps, WordStagger, type WordStaggerProps, beatPulse, defaultTheme, divergenceReport, entryDesignAnchor, entryFade, entryFadeRise, entryScale, entrySlide, exitFade, exitFadeFall, exitScale, exitSlide, fitFontSize, fitMaxWidth, fontMetrics, framesOf, framesSinceBeat, glyphLayout, hasKeyframeTracks, heroReveal, isBeat, isFullBleed, isPlacement, layoutGlyphLine, lineStartX, lineTopY, loadFont, matchesExport, measureText, placementSchema, preloadTextMetrics, resolvePlacement, responsiveCoverTransform, responsiveEntryTransform, sampleKeyframes, sampleTrack, settleTime, staggerFrames, staggeredSettle, stateSwap, timeSchema, useAudioBeats, useAudioData, useEntrance, useFittedFontSize, useFontMetrics, useGlyphLayout, usePlacement, useResolvedBounds, useSceneProgress, useSpringValue, useStaggeredEntrance, useTextMetrics, useTextMetricsReady, useTextReveal, useTheme, useTimeScale };
|
package/dist/components.js
CHANGED
|
@@ -4762,7 +4762,19 @@ function Keyframes({
|
|
|
4762
4762
|
|
|
4763
4763
|
// ../components/src/responsive.ts
|
|
4764
4764
|
var EDGE = 0.2;
|
|
4765
|
+
var FULL_BLEED = 0.9;
|
|
4765
4766
|
var mean = (ns) => ns.length ? ns.reduce((a, b) => a + b, 0) / ns.length : 0;
|
|
4767
|
+
function meanScale(props) {
|
|
4768
|
+
const scaleTrack = props?.scale;
|
|
4769
|
+
return Array.isArray(scaleTrack) && scaleTrack.length ? mean(scaleTrack.map((k) => k.v)) : 1;
|
|
4770
|
+
}
|
|
4771
|
+
function isFullBleed(props, design) {
|
|
4772
|
+
const content = props?.content;
|
|
4773
|
+
if (!content || content.kind !== "image" && content.kind !== "video") return false;
|
|
4774
|
+
if (!content.width || !content.height) return false;
|
|
4775
|
+
const s = meanScale(props);
|
|
4776
|
+
return content.width * s >= FULL_BLEED * design.width && content.height * s >= FULL_BLEED * design.height;
|
|
4777
|
+
}
|
|
4766
4778
|
function entryDesignAnchor(props) {
|
|
4767
4779
|
const position = props?.position;
|
|
4768
4780
|
if (!Array.isArray(position) || position.length === 0) return null;
|
|
@@ -4792,6 +4804,17 @@ function responsiveEntryTransform(anchor, design, out) {
|
|
|
4792
4804
|
const ay = pinAxis(anchor.y, design.height, out.height, s);
|
|
4793
4805
|
return { x: ax - anchor.x * s, y: ay - anchor.y * s, scale: s };
|
|
4794
4806
|
}
|
|
4807
|
+
function responsiveCoverTransform(design, out) {
|
|
4808
|
+
if (design.width === out.width && design.height === out.height) {
|
|
4809
|
+
return { x: 0, y: 0, scale: 1 };
|
|
4810
|
+
}
|
|
4811
|
+
const s = Math.max(out.width / design.width, out.height / design.height);
|
|
4812
|
+
return {
|
|
4813
|
+
x: (out.width - design.width * s) / 2,
|
|
4814
|
+
y: (out.height - design.height * s) / 2,
|
|
4815
|
+
scale: s
|
|
4816
|
+
};
|
|
4817
|
+
}
|
|
4795
4818
|
var CLAMP5 = { extrapolateLeft: "clamp", extrapolateRight: "clamp" };
|
|
4796
4819
|
function orderOf(i, n, direction) {
|
|
4797
4820
|
const mid = (n - 1) / 2;
|
|
@@ -11481,6 +11504,6 @@ function WordRotate({
|
|
|
11481
11504
|
//! motion fingerprint comes from the closed token system (durations, the house
|
|
11482
11505
|
//! spring, the house ease), shared by every component.
|
|
11483
11506
|
|
|
11484
|
-
export { AudioClip, AudioVisualizer, BarChart, BentoGrid, BlurReveal, BoundingBox, BrowserFrame, Button, COMPONENT_SETTLE, Callout, CameraShake, Captions, CardShowcase, ChapterCard, CodeBlock, CodeDiff, Confetti, CountUp, Cursor, DURATION, DeviceFrame, DrawOn, DynamicGrid, EndCard, FadeIn, FadeOut, FilmGrade, GradientShift, GrainOverlay, HOUSE_EASE, Highlight, IconPop, ImageReveal, InputField, KanbanBoard, KenBurns, Keyframes, KineticText, LINE_RATIO, LineChart, LogoReveal, LogoSting, LookbookShot, LowerThird, Marquee, MaskReveal, MatrixDecode, MeshGradient, Moodboard, NodeGraph, OVERSHOOT, Parallax, PathMorph, PieReveal, PriceTag, PricingCard, ProductWall, ProgressBar, ProgressSteps, PulsingIndicator, QuoteCard, RgbGlitch, RotateIn, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER, ScaleIn, Scrim, ShimmerSweep, SiteReveal, SkeletonCard, SlideIn, SlideOut, SlotMachineRoll, SplitLockup, SplitScreen, Spotlight, SpotlightCard, StaggerGroup, StatCard, Terminal, TextAnimator, TextFadeReplace, ThemeProvider, Timeline, TitleCard, TrackingIn, Typewriter, Underline, VideoClip, Vignette, WordRotate, WordStagger, beatPulse, defaultTheme, divergenceReport, entryDesignAnchor, entryFade, entryFadeRise, entryScale, entrySlide, exitFade, exitFadeFall, exitScale, exitSlide, fitFontSize, fitMaxWidth, fontMetrics, framesSinceBeat, glyphLayout, hasKeyframeTracks, heroReveal, isBeat, layoutGlyphLine, lineStartX, lineTopY, loadFont, matchesExport, measureText, preloadTextMetrics, responsiveEntryTransform, sampleKeyframes, sampleTrack, settleTime, staggerFrames, staggeredSettle, stateSwap, useAudioBeats, useAudioData, useEntrance, useFittedFontSize, useFontMetrics, useGlyphLayout, useResolvedBounds, useSceneProgress, useSpringValue, useStaggeredEntrance, useTextMetrics, useTextMetricsReady, useTextReveal, useTheme, useTimeScale };
|
|
11507
|
+
export { AudioClip, AudioVisualizer, BarChart, BentoGrid, BlurReveal, BoundingBox, BrowserFrame, Button, COMPONENT_SETTLE, Callout, CameraShake, Captions, CardShowcase, ChapterCard, CodeBlock, CodeDiff, Confetti, CountUp, Cursor, DURATION, DeviceFrame, DrawOn, DynamicGrid, EndCard, FadeIn, FadeOut, FilmGrade, GradientShift, GrainOverlay, HOUSE_EASE, Highlight, IconPop, ImageReveal, InputField, KanbanBoard, KenBurns, Keyframes, KineticText, LINE_RATIO, LineChart, LogoReveal, LogoSting, LookbookShot, LowerThird, Marquee, MaskReveal, MatrixDecode, MeshGradient, Moodboard, NodeGraph, OVERSHOOT, Parallax, PathMorph, PieReveal, PriceTag, PricingCard, ProductWall, ProgressBar, ProgressSteps, PulsingIndicator, QuoteCard, RgbGlitch, RotateIn, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER, ScaleIn, Scrim, ShimmerSweep, SiteReveal, SkeletonCard, SlideIn, SlideOut, SlotMachineRoll, SplitLockup, SplitScreen, Spotlight, SpotlightCard, StaggerGroup, StatCard, Terminal, TextAnimator, TextFadeReplace, ThemeProvider, Timeline, TitleCard, TrackingIn, Typewriter, Underline, VideoClip, Vignette, WordRotate, WordStagger, beatPulse, defaultTheme, divergenceReport, entryDesignAnchor, entryFade, entryFadeRise, entryScale, entrySlide, exitFade, exitFadeFall, exitScale, exitSlide, fitFontSize, fitMaxWidth, fontMetrics, framesSinceBeat, glyphLayout, hasKeyframeTracks, heroReveal, isBeat, isFullBleed, layoutGlyphLine, lineStartX, lineTopY, loadFont, matchesExport, measureText, preloadTextMetrics, responsiveCoverTransform, responsiveEntryTransform, sampleKeyframes, sampleTrack, settleTime, staggerFrames, staggeredSettle, stateSwap, useAudioBeats, useAudioData, useEntrance, useFittedFontSize, useFontMetrics, useGlyphLayout, useResolvedBounds, useSceneProgress, useSpringValue, useStaggeredEntrance, useTextMetrics, useTextMetricsReady, useTextReveal, useTheme, useTimeScale };
|
|
11485
11508
|
//# sourceMappingURL=components.js.map
|
|
11486
11509
|
//# sourceMappingURL=components.js.map
|