@appinternalleads/ui 0.4.0 → 0.4.1
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/cjs/agent/AgentComponent.js +1 -1
- package/dist/cjs/agent/AgentComponent.js.map +1 -1
- package/dist/cjs/agent/manifests.js +81 -1
- package/dist/cjs/agent/manifests.js.map +1 -1
- package/dist/cjs/agent/result.js +6 -0
- package/dist/cjs/agent/result.js.map +1 -1
- package/dist/cjs/components/catalog.js +18 -0
- package/dist/cjs/components/catalog.js.map +1 -1
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js +21 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js +6 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js +89 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js +62 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js +20 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/contract.js +87 -0
- package/dist/cjs/components/onboarding/animated-status/contract.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/engine.js +40 -0
- package/dist/cjs/components/onboarding/animated-status/engine.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/index.js +20 -0
- package/dist/cjs/components/onboarding/animated-status/index.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/presets.json +126 -0
- package/dist/cjs/components/onboarding/animated-status/riv.js +7 -0
- package/dist/cjs/components/onboarding/animated-status/riv.js.map +1 -0
- package/dist/cjs/components/onboarding/index.js +4 -0
- package/dist/cjs/components/onboarding/index.js.map +1 -1
- package/dist/cjs/components/onboarding/presets.js +90 -84
- package/dist/cjs/components/onboarding/presets.js.map +1 -1
- package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js +43 -6
- package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
- package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js +111 -0
- package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.js +37 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.types.js +6 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.types.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.web.js +107 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.web.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStill.js +17 -0
- package/dist/cjs/components/onboarding/send-completion/SendStill.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/contract.js +83 -0
- package/dist/cjs/components/onboarding/send-completion/contract.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/engine.js +32 -0
- package/dist/cjs/components/onboarding/send-completion/engine.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/index.js +22 -0
- package/dist/cjs/components/onboarding/send-completion/index.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/presets.json +132 -0
- package/dist/cjs/components/onboarding/send-completion/riv.js +7 -0
- package/dist/cjs/components/onboarding/send-completion/riv.js.map +1 -0
- package/dist/cjs/components/onboarding/shared/actions-data.js +2 -0
- package/dist/cjs/components/onboarding/shared/actions-data.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/configColor.js +76 -0
- package/dist/cjs/components/onboarding/shared/configColor.js.map +1 -0
- package/dist/cjs/components/onboarding/shared/contract.js +4 -0
- package/dist/cjs/components/onboarding/shared/contract.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/describe.js +1 -1
- package/dist/cjs/components/onboarding/shared/describe.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/mock.js +2 -0
- package/dist/cjs/components/onboarding/shared/mock.js.map +1 -1
- package/dist/cjs/components/onboarding/views.js +8 -0
- package/dist/cjs/components/onboarding/views.js.map +1 -1
- package/dist/cjs/motion/MotionPlayer.js +42 -0
- package/dist/cjs/motion/MotionPlayer.js.map +1 -0
- package/dist/cjs/motion/agent.js +323 -0
- package/dist/cjs/motion/agent.js.map +1 -0
- package/dist/cjs/motion/cat/Cat.js +79 -0
- package/dist/cjs/motion/cat/Cat.js.map +1 -0
- package/dist/cjs/motion/cat/animation.js +204 -0
- package/dist/cjs/motion/cat/animation.js.map +1 -0
- package/dist/cjs/motion/cat/art.generated.js +37 -0
- package/dist/cjs/motion/cat/art.generated.js.map +1 -0
- package/dist/cjs/motion/cat/config.js +136 -0
- package/dist/cjs/motion/cat/config.js.map +1 -0
- package/dist/cjs/motion/cat/index.js +75 -0
- package/dist/cjs/motion/cat/index.js.map +1 -0
- package/dist/cjs/motion/cat/rig.js +99 -0
- package/dist/cjs/motion/cat/rig.js.map +1 -0
- package/dist/cjs/motion/cat/scene.js +148 -0
- package/dist/cjs/motion/cat/scene.js.map +1 -0
- package/dist/cjs/motion/configurable/config.js +477 -0
- package/dist/cjs/motion/configurable/config.js.map +1 -0
- package/dist/cjs/motion/configurable/controls.js +44 -0
- package/dist/cjs/motion/configurable/controls.js.map +1 -0
- package/dist/cjs/motion/easing.js +62 -0
- package/dist/cjs/motion/easing.js.map +1 -0
- package/dist/cjs/motion/fit.js +12 -0
- package/dist/cjs/motion/fit.js.map +1 -0
- package/dist/cjs/motion/index.js +101 -0
- package/dist/cjs/motion/index.js.map +1 -0
- package/dist/cjs/motion/neon/GlowRenderer.js +18 -0
- package/dist/cjs/motion/neon/GlowRenderer.js.map +1 -0
- package/dist/cjs/motion/neon/NeonCanvas.js +97 -0
- package/dist/cjs/motion/neon/NeonCanvas.js.map +1 -0
- package/dist/cjs/motion/neon/NeonText.js +108 -0
- package/dist/cjs/motion/neon/NeonText.js.map +1 -0
- package/dist/cjs/motion/neon/NeonTextFrame.js +36 -0
- package/dist/cjs/motion/neon/NeonTextFrame.js.map +1 -0
- package/dist/cjs/motion/neon/artwork.js +102 -0
- package/dist/cjs/motion/neon/artwork.js.map +1 -0
- package/dist/cjs/motion/neon/audio.js +165 -0
- package/dist/cjs/motion/neon/audio.js.map +1 -0
- package/dist/cjs/motion/neon/config.js +334 -0
- package/dist/cjs/motion/neon/config.js.map +1 -0
- package/dist/cjs/motion/neon/flicker.js +196 -0
- package/dist/cjs/motion/neon/flicker.js.map +1 -0
- package/dist/cjs/motion/neon/fonts.js +52 -0
- package/dist/cjs/motion/neon/fonts.js.map +1 -0
- package/dist/cjs/motion/neon/frame.js +24 -0
- package/dist/cjs/motion/neon/frame.js.map +1 -0
- package/dist/cjs/motion/neon/glitch.js +114 -0
- package/dist/cjs/motion/neon/glitch.js.map +1 -0
- package/dist/cjs/motion/neon/index.js +119 -0
- package/dist/cjs/motion/neon/index.js.map +1 -0
- package/dist/cjs/motion/neon/layers.js +68 -0
- package/dist/cjs/motion/neon/layers.js.map +1 -0
- package/dist/cjs/motion/neon/material.js +56 -0
- package/dist/cjs/motion/neon/material.js.map +1 -0
- package/dist/cjs/motion/neon/random.js +43 -0
- package/dist/cjs/motion/neon/random.js.map +1 -0
- package/dist/cjs/motion/neon/scene.js +549 -0
- package/dist/cjs/motion/neon/scene.js.map +1 -0
- package/dist/cjs/motion/neon/synth.js +213 -0
- package/dist/cjs/motion/neon/synth.js.map +1 -0
- package/dist/cjs/motion/neon/typography.js +81 -0
- package/dist/cjs/motion/neon/typography.js.map +1 -0
- package/dist/cjs/motion/neon/wall.js +113 -0
- package/dist/cjs/motion/neon/wall.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFold.js +40 -0
- package/dist/cjs/motion/paperfold/PaperFold.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFoldFrame.js +290 -0
- package/dist/cjs/motion/paperfold/PaperFoldFrame.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFoldPlayer.js +59 -0
- package/dist/cjs/motion/paperfold/PaperFoldPlayer.js.map +1 -0
- package/dist/cjs/motion/paperfold/art.js +388 -0
- package/dist/cjs/motion/paperfold/art.js.map +1 -0
- package/dist/cjs/motion/paperfold/config.js +103 -0
- package/dist/cjs/motion/paperfold/config.js.map +1 -0
- package/dist/cjs/motion/paperfold/controls.js +493 -0
- package/dist/cjs/motion/paperfold/controls.js.map +1 -0
- package/dist/cjs/motion/paperfold/engine.js +722 -0
- package/dist/cjs/motion/paperfold/engine.js.map +1 -0
- package/dist/cjs/motion/paperfold/fonts.js +25 -0
- package/dist/cjs/motion/paperfold/fonts.js.map +1 -0
- package/dist/cjs/motion/paperfold/index.js +113 -0
- package/dist/cjs/motion/paperfold/index.js.map +1 -0
- package/dist/cjs/motion/paperfold/manipulate.js +170 -0
- package/dist/cjs/motion/paperfold/manipulate.js.map +1 -0
- package/dist/cjs/motion/paperfold/presets.js +119 -0
- package/dist/cjs/motion/paperfold/presets.js.map +1 -0
- package/dist/cjs/motion/paperfold/template.js +40 -0
- package/dist/cjs/motion/paperfold/template.js.map +1 -0
- package/dist/cjs/motion/player.js +203 -0
- package/dist/cjs/motion/player.js.map +1 -0
- package/dist/cjs/motion/promo/PromoFrame.js +293 -0
- package/dist/cjs/motion/promo/PromoFrame.js.map +1 -0
- package/dist/cjs/motion/promo/PromoShowcasePlayer.js +59 -0
- package/dist/cjs/motion/promo/PromoShowcasePlayer.js.map +1 -0
- package/dist/cjs/motion/promo/config.js +565 -0
- package/dist/cjs/motion/promo/config.js.map +1 -0
- package/dist/cjs/motion/promo/controls.js +571 -0
- package/dist/cjs/motion/promo/controls.js.map +1 -0
- package/dist/cjs/motion/promo/easing.js +35 -0
- package/dist/cjs/motion/promo/easing.js.map +1 -0
- package/dist/cjs/motion/promo/engine.js +567 -0
- package/dist/cjs/motion/promo/engine.js.map +1 -0
- package/dist/cjs/motion/promo/fonts.js +20 -0
- package/dist/cjs/motion/promo/fonts.js.map +1 -0
- package/dist/cjs/motion/promo/icons.js +29 -0
- package/dist/cjs/motion/promo/icons.js.map +1 -0
- package/dist/cjs/motion/promo/index.js +73 -0
- package/dist/cjs/motion/promo/index.js.map +1 -0
- package/dist/cjs/motion/promo/presets.js +44 -0
- package/dist/cjs/motion/promo/presets.js.map +1 -0
- package/dist/cjs/motion/promo/template.js +38 -0
- package/dist/cjs/motion/promo/template.js.map +1 -0
- package/dist/cjs/motion/replication2/Replication2Player.js +93 -0
- package/dist/cjs/motion/replication2/Replication2Player.js.map +1 -0
- package/dist/cjs/motion/replication2/config.js +352 -0
- package/dist/cjs/motion/replication2/config.js.map +1 -0
- package/dist/cjs/motion/replication2/controls.js +286 -0
- package/dist/cjs/motion/replication2/controls.js.map +1 -0
- package/dist/cjs/motion/replication2/driver.js +68 -0
- package/dist/cjs/motion/replication2/driver.js.map +1 -0
- package/dist/cjs/motion/replication2/easing.js +97 -0
- package/dist/cjs/motion/replication2/easing.js.map +1 -0
- package/dist/cjs/motion/replication2/engine.js +481 -0
- package/dist/cjs/motion/replication2/engine.js.map +1 -0
- package/dist/cjs/motion/replication2/html.js +88 -0
- package/dist/cjs/motion/replication2/html.js.map +1 -0
- package/dist/cjs/motion/replication2/index.js +61 -0
- package/dist/cjs/motion/replication2/index.js.map +1 -0
- package/dist/cjs/motion/replication2/measure.js +30 -0
- package/dist/cjs/motion/replication2/measure.js.map +1 -0
- package/dist/cjs/motion/replication2/metrics.js +10 -0
- package/dist/cjs/motion/replication2/metrics.js.map +1 -0
- package/dist/cjs/motion/replication2/presets.js +67 -0
- package/dist/cjs/motion/replication2/presets.js.map +1 -0
- package/dist/cjs/motion/replication2/riv.js +7 -0
- package/dist/cjs/motion/replication2/riv.js.map +1 -0
- package/dist/cjs/motion/replication2/rive-contract.js +158 -0
- package/dist/cjs/motion/replication2/rive-contract.js.map +1 -0
- package/dist/cjs/motion/replication2/template.js +35 -0
- package/dist/cjs/motion/replication2/template.js.map +1 -0
- package/dist/cjs/motion/sample.js +149 -0
- package/dist/cjs/motion/sample.js.map +1 -0
- package/dist/cjs/motion/templates/hey-template.js +1552 -0
- package/dist/cjs/motion/templates/hey-template.js.map +1 -0
- package/dist/cjs/motion/templates/index.js +22 -0
- package/dist/cjs/motion/templates/index.js.map +1 -0
- package/dist/cjs/motion/templates/word-motion.js +1165 -0
- package/dist/cjs/motion/templates/word-motion.js.map +1 -0
- package/dist/cjs/motion/types.js +3 -0
- package/dist/cjs/motion/types.js.map +1 -0
- package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js +62 -0
- package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
- package/dist/cjs/motion/typesurface/art.js +861 -0
- package/dist/cjs/motion/typesurface/art.js.map +1 -0
- package/dist/cjs/motion/typesurface/config.js +269 -0
- package/dist/cjs/motion/typesurface/config.js.map +1 -0
- package/dist/cjs/motion/typesurface/engine.js +607 -0
- package/dist/cjs/motion/typesurface/engine.js.map +1 -0
- package/dist/cjs/motion/typesurface/fonts.js +45 -0
- package/dist/cjs/motion/typesurface/fonts.js.map +1 -0
- package/dist/cjs/motion/typesurface/index.js +72 -0
- package/dist/cjs/motion/typesurface/index.js.map +1 -0
- package/dist/cjs/motion/typesurface/layout.js +130 -0
- package/dist/cjs/motion/typesurface/layout.js.map +1 -0
- package/dist/cjs/motion/typesurface/ops.js +175 -0
- package/dist/cjs/motion/typesurface/ops.js.map +1 -0
- package/dist/cjs/motion/typesurface/presets.js +192 -0
- package/dist/cjs/motion/typesurface/presets.js.map +1 -0
- package/dist/cjs/motion/typesurface/renderer.js +672 -0
- package/dist/cjs/motion/typesurface/renderer.js.map +1 -0
- package/dist/cjs/motion/typesurface/shaders.js +300 -0
- package/dist/cjs/motion/typesurface/shaders.js.map +1 -0
- package/dist/cjs/motion/typesurface/surfaces.js +156 -0
- package/dist/cjs/motion/typesurface/surfaces.js.map +1 -0
- package/dist/cjs/motion/typesurface/text.js +34 -0
- package/dist/cjs/motion/typesurface/text.js.map +1 -0
- package/dist/cjs/motion/typesurface/timeline.js +64 -0
- package/dist/cjs/motion/typesurface/timeline.js.map +1 -0
- package/dist/cjs/motion/validate.js +89 -0
- package/dist/cjs/motion/validate.js.map +1 -0
- package/dist/cjs/native/RiveReceiptStage.js +9 -150
- package/dist/cjs/native/RiveReceiptStage.js.map +1 -1
- package/dist/cjs/native/riveReceiptStageFactory.js +162 -0
- package/dist/cjs/native/riveReceiptStageFactory.js.map +1 -0
- package/dist/cjs/tokens/stage.js +10 -0
- package/dist/cjs/tokens/stage.js.map +1 -0
- package/dist/esm/agent/AgentComponent.js +1 -1
- package/dist/esm/agent/AgentComponent.js.map +1 -1
- package/dist/esm/agent/manifests.d.ts.map +1 -1
- package/dist/esm/agent/manifests.js +81 -1
- package/dist/esm/agent/manifests.js.map +1 -1
- package/dist/esm/agent/result.d.ts.map +1 -1
- package/dist/esm/agent/result.js +6 -0
- package/dist/esm/agent/result.js.map +1 -1
- package/dist/esm/agent/types.d.ts +1 -1
- package/dist/esm/agent/types.d.ts.map +1 -1
- package/dist/esm/components/catalog.d.ts +1 -1
- package/dist/esm/components/catalog.d.ts.map +1 -1
- package/dist/esm/components/catalog.js +18 -0
- package/dist/esm/components/catalog.js.map +1 -1
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts +9 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.js +18 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts +31 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js +3 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts +4 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js +86 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts +32 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js +59 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts +8 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.js +17 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/contract.d.ts +61 -0
- package/dist/esm/components/onboarding/animated-status/contract.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/contract.js +78 -0
- package/dist/esm/components/onboarding/animated-status/contract.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/engine.d.ts +24 -0
- package/dist/esm/components/onboarding/animated-status/engine.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/engine.js +32 -0
- package/dist/esm/components/onboarding/animated-status/engine.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/index.d.ts +5 -0
- package/dist/esm/components/onboarding/animated-status/index.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/index.js +4 -0
- package/dist/esm/components/onboarding/animated-status/index.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/presets.json +126 -0
- package/dist/esm/components/onboarding/animated-status/riv.d.ts +3 -0
- package/dist/esm/components/onboarding/animated-status/riv.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/riv.js +4 -0
- package/dist/esm/components/onboarding/animated-status/riv.js.map +1 -0
- package/dist/esm/components/onboarding/index.d.ts +2 -0
- package/dist/esm/components/onboarding/index.d.ts.map +1 -1
- package/dist/esm/components/onboarding/index.js +4 -0
- package/dist/esm/components/onboarding/index.js.map +1 -1
- package/dist/esm/components/onboarding/presets.d.ts.map +1 -1
- package/dist/esm/components/onboarding/presets.js +6 -0
- package/dist/esm/components/onboarding/presets.js.map +1 -1
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts +4 -6
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts.map +1 -1
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js +42 -6
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts +47 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.js +108 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.d.ts +9 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.js +34 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts +33 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.js +3 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts +4 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.js +104 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.d.ts +11 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.js +14 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/contract.d.ts +99 -0
- package/dist/esm/components/onboarding/send-completion/contract.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/contract.js +76 -0
- package/dist/esm/components/onboarding/send-completion/contract.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/engine.d.ts +20 -0
- package/dist/esm/components/onboarding/send-completion/engine.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/engine.js +28 -0
- package/dist/esm/components/onboarding/send-completion/engine.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/index.d.ts +6 -0
- package/dist/esm/components/onboarding/send-completion/index.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/index.js +6 -0
- package/dist/esm/components/onboarding/send-completion/index.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/presets.json +132 -0
- package/dist/esm/components/onboarding/send-completion/riv.d.ts +3 -0
- package/dist/esm/components/onboarding/send-completion/riv.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/riv.js +4 -0
- package/dist/esm/components/onboarding/send-completion/riv.js.map +1 -0
- package/dist/esm/components/onboarding/shared/actions-data.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/actions-data.js +2 -0
- package/dist/esm/components/onboarding/shared/actions-data.js.map +1 -1
- package/dist/esm/components/onboarding/shared/configColor.d.ts +29 -0
- package/dist/esm/components/onboarding/shared/configColor.d.ts.map +1 -0
- package/dist/esm/components/onboarding/shared/configColor.js +69 -0
- package/dist/esm/components/onboarding/shared/configColor.js.map +1 -0
- package/dist/esm/components/onboarding/shared/contract.d.ts +1 -1
- package/dist/esm/components/onboarding/shared/contract.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/contract.js +4 -0
- package/dist/esm/components/onboarding/shared/contract.js.map +1 -1
- package/dist/esm/components/onboarding/shared/describe.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/describe.js +1 -1
- package/dist/esm/components/onboarding/shared/describe.js.map +1 -1
- package/dist/esm/components/onboarding/shared/mock.d.ts +2 -0
- package/dist/esm/components/onboarding/shared/mock.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/mock.js +2 -0
- package/dist/esm/components/onboarding/shared/mock.js.map +1 -1
- package/dist/esm/components/onboarding/views.d.ts.map +1 -1
- package/dist/esm/components/onboarding/views.js +8 -0
- package/dist/esm/components/onboarding/views.js.map +1 -1
- package/dist/esm/motion/MotionPlayer.d.ts +22 -0
- package/dist/esm/motion/MotionPlayer.d.ts.map +1 -0
- package/dist/esm/motion/MotionPlayer.js +39 -0
- package/dist/esm/motion/MotionPlayer.js.map +1 -0
- package/dist/esm/motion/agent.d.ts +146 -0
- package/dist/esm/motion/agent.d.ts.map +1 -0
- package/dist/esm/motion/agent.js +278 -0
- package/dist/esm/motion/agent.js.map +1 -0
- package/dist/esm/motion/cat/Cat.d.ts +43 -0
- package/dist/esm/motion/cat/Cat.d.ts.map +1 -0
- package/dist/esm/motion/cat/Cat.js +74 -0
- package/dist/esm/motion/cat/Cat.js.map +1 -0
- package/dist/esm/motion/cat/animation.d.ts +86 -0
- package/dist/esm/motion/cat/animation.d.ts.map +1 -0
- package/dist/esm/motion/cat/animation.js +193 -0
- package/dist/esm/motion/cat/animation.js.map +1 -0
- package/dist/esm/motion/cat/art.generated.d.ts +53 -0
- package/dist/esm/motion/cat/art.generated.d.ts.map +1 -0
- package/dist/esm/motion/cat/art.generated.js +34 -0
- package/dist/esm/motion/cat/art.generated.js.map +1 -0
- package/dist/esm/motion/cat/config.d.ts +103 -0
- package/dist/esm/motion/cat/config.d.ts.map +1 -0
- package/dist/esm/motion/cat/config.js +129 -0
- package/dist/esm/motion/cat/config.js.map +1 -0
- package/dist/esm/motion/cat/index.d.ts +13 -0
- package/dist/esm/motion/cat/index.d.ts.map +1 -0
- package/dist/esm/motion/cat/index.js +13 -0
- package/dist/esm/motion/cat/index.js.map +1 -0
- package/dist/esm/motion/cat/rig.d.ts +44 -0
- package/dist/esm/motion/cat/rig.d.ts.map +1 -0
- package/dist/esm/motion/cat/rig.js +86 -0
- package/dist/esm/motion/cat/rig.js.map +1 -0
- package/dist/esm/motion/cat/scene.d.ts +66 -0
- package/dist/esm/motion/cat/scene.d.ts.map +1 -0
- package/dist/esm/motion/cat/scene.js +137 -0
- package/dist/esm/motion/cat/scene.js.map +1 -0
- package/dist/esm/motion/configurable/config.d.ts +80 -0
- package/dist/esm/motion/configurable/config.d.ts.map +1 -0
- package/dist/esm/motion/configurable/config.js +468 -0
- package/dist/esm/motion/configurable/config.js.map +1 -0
- package/dist/esm/motion/configurable/controls.d.ts +74 -0
- package/dist/esm/motion/configurable/controls.d.ts.map +1 -0
- package/dist/esm/motion/configurable/controls.js +38 -0
- package/dist/esm/motion/configurable/controls.js.map +1 -0
- package/dist/esm/motion/easing.d.ts +4 -0
- package/dist/esm/motion/easing.d.ts.map +1 -0
- package/dist/esm/motion/easing.js +58 -0
- package/dist/esm/motion/easing.js.map +1 -0
- package/dist/esm/motion/fit.d.ts +8 -0
- package/dist/esm/motion/fit.d.ts.map +1 -0
- package/dist/esm/motion/fit.js +8 -0
- package/dist/esm/motion/fit.js.map +1 -0
- package/dist/esm/motion/index.d.ts +27 -0
- package/dist/esm/motion/index.d.ts.map +1 -0
- package/dist/esm/motion/index.js +21 -0
- package/dist/esm/motion/index.js.map +1 -0
- package/dist/esm/motion/neon/GlowRenderer.d.ts +31 -0
- package/dist/esm/motion/neon/GlowRenderer.d.ts.map +1 -0
- package/dist/esm/motion/neon/GlowRenderer.js +14 -0
- package/dist/esm/motion/neon/GlowRenderer.js.map +1 -0
- package/dist/esm/motion/neon/NeonCanvas.d.ts +42 -0
- package/dist/esm/motion/neon/NeonCanvas.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonCanvas.js +92 -0
- package/dist/esm/motion/neon/NeonCanvas.js.map +1 -0
- package/dist/esm/motion/neon/NeonText.d.ts +26 -0
- package/dist/esm/motion/neon/NeonText.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonText.js +103 -0
- package/dist/esm/motion/neon/NeonText.js.map +1 -0
- package/dist/esm/motion/neon/NeonTextFrame.d.ts +29 -0
- package/dist/esm/motion/neon/NeonTextFrame.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonTextFrame.js +33 -0
- package/dist/esm/motion/neon/NeonTextFrame.js.map +1 -0
- package/dist/esm/motion/neon/artwork.d.ts +29 -0
- package/dist/esm/motion/neon/artwork.d.ts.map +1 -0
- package/dist/esm/motion/neon/artwork.js +98 -0
- package/dist/esm/motion/neon/artwork.js.map +1 -0
- package/dist/esm/motion/neon/audio.d.ts +49 -0
- package/dist/esm/motion/neon/audio.d.ts.map +1 -0
- package/dist/esm/motion/neon/audio.js +161 -0
- package/dist/esm/motion/neon/audio.js.map +1 -0
- package/dist/esm/motion/neon/config.d.ts +319 -0
- package/dist/esm/motion/neon/config.d.ts.map +1 -0
- package/dist/esm/motion/neon/config.js +319 -0
- package/dist/esm/motion/neon/config.js.map +1 -0
- package/dist/esm/motion/neon/flicker.d.ts +82 -0
- package/dist/esm/motion/neon/flicker.d.ts.map +1 -0
- package/dist/esm/motion/neon/flicker.js +187 -0
- package/dist/esm/motion/neon/flicker.js.map +1 -0
- package/dist/esm/motion/neon/fonts.d.ts +29 -0
- package/dist/esm/motion/neon/fonts.d.ts.map +1 -0
- package/dist/esm/motion/neon/fonts.js +47 -0
- package/dist/esm/motion/neon/fonts.js.map +1 -0
- package/dist/esm/motion/neon/frame.d.ts +22 -0
- package/dist/esm/motion/neon/frame.d.ts.map +1 -0
- package/dist/esm/motion/neon/frame.js +20 -0
- package/dist/esm/motion/neon/frame.js.map +1 -0
- package/dist/esm/motion/neon/glitch.d.ts +64 -0
- package/dist/esm/motion/neon/glitch.d.ts.map +1 -0
- package/dist/esm/motion/neon/glitch.js +108 -0
- package/dist/esm/motion/neon/glitch.js.map +1 -0
- package/dist/esm/motion/neon/index.d.ts +29 -0
- package/dist/esm/motion/neon/index.d.ts.map +1 -0
- package/dist/esm/motion/neon/index.js +28 -0
- package/dist/esm/motion/neon/index.js.map +1 -0
- package/dist/esm/motion/neon/layers.d.ts +56 -0
- package/dist/esm/motion/neon/layers.d.ts.map +1 -0
- package/dist/esm/motion/neon/layers.js +64 -0
- package/dist/esm/motion/neon/layers.js.map +1 -0
- package/dist/esm/motion/neon/material.d.ts +68 -0
- package/dist/esm/motion/neon/material.d.ts.map +1 -0
- package/dist/esm/motion/neon/material.js +51 -0
- package/dist/esm/motion/neon/material.js.map +1 -0
- package/dist/esm/motion/neon/random.d.ts +15 -0
- package/dist/esm/motion/neon/random.d.ts.map +1 -0
- package/dist/esm/motion/neon/random.js +37 -0
- package/dist/esm/motion/neon/random.js.map +1 -0
- package/dist/esm/motion/neon/scene.d.ts +255 -0
- package/dist/esm/motion/neon/scene.d.ts.map +1 -0
- package/dist/esm/motion/neon/scene.js +532 -0
- package/dist/esm/motion/neon/scene.js.map +1 -0
- package/dist/esm/motion/neon/synth.d.ts +18 -0
- package/dist/esm/motion/neon/synth.d.ts.map +1 -0
- package/dist/esm/motion/neon/synth.js +208 -0
- package/dist/esm/motion/neon/synth.js.map +1 -0
- package/dist/esm/motion/neon/typography.d.ts +53 -0
- package/dist/esm/motion/neon/typography.d.ts.map +1 -0
- package/dist/esm/motion/neon/typography.js +74 -0
- package/dist/esm/motion/neon/typography.js.map +1 -0
- package/dist/esm/motion/neon/wall.d.ts +62 -0
- package/dist/esm/motion/neon/wall.d.ts.map +1 -0
- package/dist/esm/motion/neon/wall.js +106 -0
- package/dist/esm/motion/neon/wall.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFold.d.ts +36 -0
- package/dist/esm/motion/paperfold/PaperFold.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFold.js +37 -0
- package/dist/esm/motion/paperfold/PaperFold.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts +39 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.js +283 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts +27 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.js +56 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.js.map +1 -0
- package/dist/esm/motion/paperfold/art.d.ts +148 -0
- package/dist/esm/motion/paperfold/art.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/art.js +374 -0
- package/dist/esm/motion/paperfold/art.js.map +1 -0
- package/dist/esm/motion/paperfold/config.d.ts +47 -0
- package/dist/esm/motion/paperfold/config.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/config.js +96 -0
- package/dist/esm/motion/paperfold/config.js.map +1 -0
- package/dist/esm/motion/paperfold/controls.d.ts +57 -0
- package/dist/esm/motion/paperfold/controls.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/controls.js +506 -0
- package/dist/esm/motion/paperfold/controls.js.map +1 -0
- package/dist/esm/motion/paperfold/engine.d.ts +397 -0
- package/dist/esm/motion/paperfold/engine.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/engine.js +699 -0
- package/dist/esm/motion/paperfold/engine.js.map +1 -0
- package/dist/esm/motion/paperfold/fonts.d.ts +3 -0
- package/dist/esm/motion/paperfold/fonts.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/fonts.js +21 -0
- package/dist/esm/motion/paperfold/fonts.js.map +1 -0
- package/dist/esm/motion/paperfold/index.d.ts +17 -0
- package/dist/esm/motion/paperfold/index.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/index.js +17 -0
- package/dist/esm/motion/paperfold/index.js.map +1 -0
- package/dist/esm/motion/paperfold/manipulate.d.ts +59 -0
- package/dist/esm/motion/paperfold/manipulate.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/manipulate.js +161 -0
- package/dist/esm/motion/paperfold/manipulate.js.map +1 -0
- package/dist/esm/motion/paperfold/presets.d.ts +9 -0
- package/dist/esm/motion/paperfold/presets.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/presets.js +115 -0
- package/dist/esm/motion/paperfold/presets.js.map +1 -0
- package/dist/esm/motion/paperfold/template.d.ts +3 -0
- package/dist/esm/motion/paperfold/template.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/template.js +37 -0
- package/dist/esm/motion/paperfold/template.js.map +1 -0
- package/dist/esm/motion/player.d.ts +35 -0
- package/dist/esm/motion/player.d.ts.map +1 -0
- package/dist/esm/motion/player.js +197 -0
- package/dist/esm/motion/player.js.map +1 -0
- package/dist/esm/motion/promo/PromoFrame.d.ts +31 -0
- package/dist/esm/motion/promo/PromoFrame.d.ts.map +1 -0
- package/dist/esm/motion/promo/PromoFrame.js +288 -0
- package/dist/esm/motion/promo/PromoFrame.js.map +1 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts +25 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts.map +1 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.js +56 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.js.map +1 -0
- package/dist/esm/motion/promo/config.d.ts +91 -0
- package/dist/esm/motion/promo/config.d.ts.map +1 -0
- package/dist/esm/motion/promo/config.js +550 -0
- package/dist/esm/motion/promo/config.js.map +1 -0
- package/dist/esm/motion/promo/controls.d.ts +86 -0
- package/dist/esm/motion/promo/controls.d.ts.map +1 -0
- package/dist/esm/motion/promo/controls.js +567 -0
- package/dist/esm/motion/promo/controls.js.map +1 -0
- package/dist/esm/motion/promo/easing.d.ts +3 -0
- package/dist/esm/motion/promo/easing.d.ts.map +1 -0
- package/dist/esm/motion/promo/easing.js +32 -0
- package/dist/esm/motion/promo/easing.js.map +1 -0
- package/dist/esm/motion/promo/engine.d.ts +205 -0
- package/dist/esm/motion/promo/engine.d.ts.map +1 -0
- package/dist/esm/motion/promo/engine.js +551 -0
- package/dist/esm/motion/promo/engine.js.map +1 -0
- package/dist/esm/motion/promo/fonts.d.ts +7 -0
- package/dist/esm/motion/promo/fonts.d.ts.map +1 -0
- package/dist/esm/motion/promo/fonts.js +16 -0
- package/dist/esm/motion/promo/fonts.js.map +1 -0
- package/dist/esm/motion/promo/icons.d.ts +7 -0
- package/dist/esm/motion/promo/icons.d.ts.map +1 -0
- package/dist/esm/motion/promo/icons.js +26 -0
- package/dist/esm/motion/promo/icons.js.map +1 -0
- package/dist/esm/motion/promo/index.d.ts +15 -0
- package/dist/esm/motion/promo/index.d.ts.map +1 -0
- package/dist/esm/motion/promo/index.js +15 -0
- package/dist/esm/motion/promo/index.js.map +1 -0
- package/dist/esm/motion/promo/presets.d.ts +13 -0
- package/dist/esm/motion/promo/presets.d.ts.map +1 -0
- package/dist/esm/motion/promo/presets.js +40 -0
- package/dist/esm/motion/promo/presets.js.map +1 -0
- package/dist/esm/motion/promo/template.d.ts +8 -0
- package/dist/esm/motion/promo/template.d.ts.map +1 -0
- package/dist/esm/motion/promo/template.js +35 -0
- package/dist/esm/motion/promo/template.js.map +1 -0
- package/dist/esm/motion/replication2/Replication2Player.d.ts +26 -0
- package/dist/esm/motion/replication2/Replication2Player.d.ts.map +1 -0
- package/dist/esm/motion/replication2/Replication2Player.js +90 -0
- package/dist/esm/motion/replication2/Replication2Player.js.map +1 -0
- package/dist/esm/motion/replication2/config.d.ts +78 -0
- package/dist/esm/motion/replication2/config.d.ts.map +1 -0
- package/dist/esm/motion/replication2/config.js +341 -0
- package/dist/esm/motion/replication2/config.js.map +1 -0
- package/dist/esm/motion/replication2/controls.d.ts +70 -0
- package/dist/esm/motion/replication2/controls.d.ts.map +1 -0
- package/dist/esm/motion/replication2/controls.js +283 -0
- package/dist/esm/motion/replication2/controls.js.map +1 -0
- package/dist/esm/motion/replication2/driver.d.ts +23 -0
- package/dist/esm/motion/replication2/driver.d.ts.map +1 -0
- package/dist/esm/motion/replication2/driver.js +65 -0
- package/dist/esm/motion/replication2/driver.js.map +1 -0
- package/dist/esm/motion/replication2/easing.d.ts +19 -0
- package/dist/esm/motion/replication2/easing.d.ts.map +1 -0
- package/dist/esm/motion/replication2/easing.js +92 -0
- package/dist/esm/motion/replication2/easing.js.map +1 -0
- package/dist/esm/motion/replication2/engine.d.ts +236 -0
- package/dist/esm/motion/replication2/engine.d.ts.map +1 -0
- package/dist/esm/motion/replication2/engine.js +470 -0
- package/dist/esm/motion/replication2/engine.js.map +1 -0
- package/dist/esm/motion/replication2/html.d.ts +30 -0
- package/dist/esm/motion/replication2/html.d.ts.map +1 -0
- package/dist/esm/motion/replication2/html.js +83 -0
- package/dist/esm/motion/replication2/html.js.map +1 -0
- package/dist/esm/motion/replication2/index.d.ts +15 -0
- package/dist/esm/motion/replication2/index.d.ts.map +1 -0
- package/dist/esm/motion/replication2/index.js +15 -0
- package/dist/esm/motion/replication2/index.js.map +1 -0
- package/dist/esm/motion/replication2/measure.d.ts +3 -0
- package/dist/esm/motion/replication2/measure.d.ts.map +1 -0
- package/dist/esm/motion/replication2/measure.js +27 -0
- package/dist/esm/motion/replication2/measure.js.map +1 -0
- package/dist/esm/motion/replication2/metrics.d.ts +6 -0
- package/dist/esm/motion/replication2/metrics.d.ts.map +1 -0
- package/dist/esm/motion/replication2/metrics.js +7 -0
- package/dist/esm/motion/replication2/metrics.js.map +1 -0
- package/dist/esm/motion/replication2/presets.d.ts +13 -0
- package/dist/esm/motion/replication2/presets.d.ts.map +1 -0
- package/dist/esm/motion/replication2/presets.js +63 -0
- package/dist/esm/motion/replication2/presets.js.map +1 -0
- package/dist/esm/motion/replication2/riv.d.ts +3 -0
- package/dist/esm/motion/replication2/riv.d.ts.map +1 -0
- package/dist/esm/motion/replication2/riv.js +4 -0
- package/dist/esm/motion/replication2/riv.js.map +1 -0
- package/dist/esm/motion/replication2/rive-contract.d.ts +27 -0
- package/dist/esm/motion/replication2/rive-contract.d.ts.map +1 -0
- package/dist/esm/motion/replication2/rive-contract.js +153 -0
- package/dist/esm/motion/replication2/rive-contract.js.map +1 -0
- package/dist/esm/motion/replication2/template.d.ts +8 -0
- package/dist/esm/motion/replication2/template.d.ts.map +1 -0
- package/dist/esm/motion/replication2/template.js +32 -0
- package/dist/esm/motion/replication2/template.js.map +1 -0
- package/dist/esm/motion/sample.d.ts +61 -0
- package/dist/esm/motion/sample.d.ts.map +1 -0
- package/dist/esm/motion/sample.js +138 -0
- package/dist/esm/motion/sample.js.map +1 -0
- package/dist/esm/motion/templates/hey-template.d.ts +3 -0
- package/dist/esm/motion/templates/hey-template.d.ts.map +1 -0
- package/dist/esm/motion/templates/hey-template.js +1549 -0
- package/dist/esm/motion/templates/hey-template.js.map +1 -0
- package/dist/esm/motion/templates/index.d.ts +22 -0
- package/dist/esm/motion/templates/index.d.ts.map +1 -0
- package/dist/esm/motion/templates/index.js +15 -0
- package/dist/esm/motion/templates/index.js.map +1 -0
- package/dist/esm/motion/templates/word-motion.d.ts +3 -0
- package/dist/esm/motion/templates/word-motion.d.ts.map +1 -0
- package/dist/esm/motion/templates/word-motion.js +1162 -0
- package/dist/esm/motion/templates/word-motion.js.map +1 -0
- package/dist/esm/motion/types.d.ts +192 -0
- package/dist/esm/motion/types.d.ts.map +1 -0
- package/dist/esm/motion/types.js +2 -0
- package/dist/esm/motion/types.js.map +1 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts +22 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js +58 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
- package/dist/esm/motion/typesurface/art.d.ts +21 -0
- package/dist/esm/motion/typesurface/art.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/art.js +854 -0
- package/dist/esm/motion/typesurface/art.js.map +1 -0
- package/dist/esm/motion/typesurface/config.d.ts +273 -0
- package/dist/esm/motion/typesurface/config.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/config.js +260 -0
- package/dist/esm/motion/typesurface/config.js.map +1 -0
- package/dist/esm/motion/typesurface/engine.d.ts +94 -0
- package/dist/esm/motion/typesurface/engine.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/engine.js +603 -0
- package/dist/esm/motion/typesurface/engine.js.map +1 -0
- package/dist/esm/motion/typesurface/fonts.d.ts +25 -0
- package/dist/esm/motion/typesurface/fonts.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/fonts.js +40 -0
- package/dist/esm/motion/typesurface/fonts.js.map +1 -0
- package/dist/esm/motion/typesurface/index.d.ts +17 -0
- package/dist/esm/motion/typesurface/index.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/index.js +17 -0
- package/dist/esm/motion/typesurface/index.js.map +1 -0
- package/dist/esm/motion/typesurface/layout.d.ts +57 -0
- package/dist/esm/motion/typesurface/layout.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/layout.js +122 -0
- package/dist/esm/motion/typesurface/layout.js.map +1 -0
- package/dist/esm/motion/typesurface/ops.d.ts +70 -0
- package/dist/esm/motion/typesurface/ops.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/ops.js +164 -0
- package/dist/esm/motion/typesurface/ops.js.map +1 -0
- package/dist/esm/motion/typesurface/presets.d.ts +33 -0
- package/dist/esm/motion/typesurface/presets.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/presets.js +185 -0
- package/dist/esm/motion/typesurface/presets.js.map +1 -0
- package/dist/esm/motion/typesurface/renderer.d.ts +78 -0
- package/dist/esm/motion/typesurface/renderer.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/renderer.js +666 -0
- package/dist/esm/motion/typesurface/renderer.js.map +1 -0
- package/dist/esm/motion/typesurface/shaders.d.ts +17 -0
- package/dist/esm/motion/typesurface/shaders.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/shaders.js +297 -0
- package/dist/esm/motion/typesurface/shaders.js.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts +81 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.js +149 -0
- package/dist/esm/motion/typesurface/surfaces.js.map +1 -0
- package/dist/esm/motion/typesurface/text.d.ts +17 -0
- package/dist/esm/motion/typesurface/text.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/text.js +28 -0
- package/dist/esm/motion/typesurface/text.js.map +1 -0
- package/dist/esm/motion/typesurface/timeline.d.ts +15 -0
- package/dist/esm/motion/typesurface/timeline.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/timeline.js +57 -0
- package/dist/esm/motion/typesurface/timeline.js.map +1 -0
- package/dist/esm/motion/validate.d.ts +22 -0
- package/dist/esm/motion/validate.d.ts.map +1 -0
- package/dist/esm/motion/validate.js +84 -0
- package/dist/esm/motion/validate.js.map +1 -0
- package/dist/esm/native/RiveReceiptStage.d.ts +25 -2
- package/dist/esm/native/RiveReceiptStage.d.ts.map +1 -1
- package/dist/esm/native/RiveReceiptStage.js +7 -148
- package/dist/esm/native/RiveReceiptStage.js.map +1 -1
- package/dist/esm/native/riveReceiptStageFactory.d.ts +26 -0
- package/dist/esm/native/riveReceiptStageFactory.d.ts.map +1 -0
- package/dist/esm/native/riveReceiptStageFactory.js +159 -0
- package/dist/esm/native/riveReceiptStageFactory.js.map +1 -0
- package/dist/esm/tokens/stage.d.ts +7 -0
- package/dist/esm/tokens/stage.d.ts.map +1 -0
- package/dist/esm/tokens/stage.js +7 -0
- package/dist/esm/tokens/stage.js.map +1 -0
- package/package.json +35 -1
- package/spec/examples/components/onboarding/animated-status/case1.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case2.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case3.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case4.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case5.json +42 -0
- package/spec/examples/components/onboarding/send-completion/case1.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case2.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case3.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case4.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case5.json +48 -0
- package/spec/families/onboarding.schema.json +610 -1
- package/src/agent/AgentComponent.tsx +1 -1
- package/src/agent/manifests.ts +83 -1
- package/src/agent/result.ts +6 -0
- package/src/agent/types.ts +1 -1
- package/src/components/catalog.ts +21 -1
- package/src/components/onboarding/animated-status/AnimatedStage.tsx +18 -0
- package/src/components/onboarding/animated-status/AnimatedStage.types.ts +30 -0
- package/src/components/onboarding/animated-status/AnimatedStage.web.tsx +99 -0
- package/src/components/onboarding/animated-status/AnimatedStatusView.tsx +109 -0
- package/src/components/onboarding/animated-status/AnimatedStill.tsx +23 -0
- package/src/components/onboarding/animated-status/contract.ts +105 -0
- package/src/components/onboarding/animated-status/engine.ts +49 -0
- package/src/components/onboarding/animated-status/index.ts +8 -0
- package/src/components/onboarding/animated-status/presets.json +126 -0
- package/src/components/onboarding/animated-status/riv.ts +4 -0
- package/src/components/onboarding/index.ts +4 -0
- package/src/components/onboarding/presets.ts +6 -0
- package/src/components/onboarding/receipt-printer/ReceiptStage.tsx +46 -7
- package/src/components/onboarding/send-completion/SendCompletionView.tsx +164 -0
- package/src/components/onboarding/send-completion/SendStage.tsx +27 -0
- package/src/components/onboarding/send-completion/SendStage.types.ts +32 -0
- package/src/components/onboarding/send-completion/SendStage.web.tsx +116 -0
- package/src/components/onboarding/send-completion/SendStill.tsx +19 -0
- package/src/components/onboarding/send-completion/contract.ts +127 -0
- package/src/components/onboarding/send-completion/engine.ts +37 -0
- package/src/components/onboarding/send-completion/index.ts +10 -0
- package/src/components/onboarding/send-completion/presets.json +132 -0
- package/src/components/onboarding/send-completion/riv.ts +4 -0
- package/src/components/onboarding/shared/actions-data.ts +2 -0
- package/src/components/onboarding/shared/configColor.ts +72 -0
- package/src/components/onboarding/shared/contract.ts +4 -0
- package/src/components/onboarding/shared/describe.ts +1 -1
- package/src/components/onboarding/shared/mock.ts +2 -0
- package/src/components/onboarding/views.ts +8 -0
- package/src/motion/MotionPlayer.tsx +62 -0
- package/src/motion/agent.ts +288 -0
- package/src/motion/cat/Cat.tsx +118 -0
- package/src/motion/cat/animation.ts +206 -0
- package/src/motion/cat/art.generated.ts +44 -0
- package/src/motion/cat/config.ts +186 -0
- package/src/motion/cat/index.ts +26 -0
- package/src/motion/cat/rig.ts +102 -0
- package/src/motion/cat/scene.ts +181 -0
- package/src/motion/configurable/config.ts +420 -0
- package/src/motion/configurable/controls.ts +93 -0
- package/src/motion/easing.ts +55 -0
- package/src/motion/fit.ts +8 -0
- package/src/motion/index.ts +29 -0
- package/src/motion/neon/GlowRenderer.tsx +83 -0
- package/src/motion/neon/NeonCanvas.tsx +175 -0
- package/src/motion/neon/NeonText.tsx +113 -0
- package/src/motion/neon/NeonTextFrame.tsx +67 -0
- package/src/motion/neon/artwork.ts +95 -0
- package/src/motion/neon/audio.ts +162 -0
- package/src/motion/neon/config.ts +484 -0
- package/src/motion/neon/flicker.ts +225 -0
- package/src/motion/neon/fonts.ts +76 -0
- package/src/motion/neon/frame.ts +34 -0
- package/src/motion/neon/glitch.ts +142 -0
- package/src/motion/neon/index.ts +41 -0
- package/src/motion/neon/layers.tsx +209 -0
- package/src/motion/neon/material.ts +88 -0
- package/src/motion/neon/random.ts +40 -0
- package/src/motion/neon/scene.ts +610 -0
- package/src/motion/neon/synth.ts +188 -0
- package/src/motion/neon/typography.ts +102 -0
- package/src/motion/neon/wall.ts +157 -0
- package/src/motion/paperfold/PaperFold.tsx +45 -0
- package/src/motion/paperfold/PaperFoldFrame.tsx +576 -0
- package/src/motion/paperfold/PaperFoldPlayer.tsx +80 -0
- package/src/motion/paperfold/art.ts +455 -0
- package/src/motion/paperfold/config.ts +98 -0
- package/src/motion/paperfold/controls.ts +557 -0
- package/src/motion/paperfold/engine.ts +852 -0
- package/src/motion/paperfold/fonts.ts +21 -0
- package/src/motion/paperfold/index.ts +30 -0
- package/src/motion/paperfold/manipulate.ts +188 -0
- package/src/motion/paperfold/presets.ts +117 -0
- package/src/motion/paperfold/template.ts +38 -0
- package/src/motion/player.ts +207 -0
- package/src/motion/promo/PromoFrame.tsx +501 -0
- package/src/motion/promo/PromoShowcasePlayer.tsx +78 -0
- package/src/motion/promo/config.ts +479 -0
- package/src/motion/promo/controls.ts +643 -0
- package/src/motion/promo/easing.ts +36 -0
- package/src/motion/promo/engine.ts +587 -0
- package/src/motion/promo/fonts.ts +16 -0
- package/src/motion/promo/icons.tsx +29 -0
- package/src/motion/promo/index.ts +24 -0
- package/src/motion/promo/presets.ts +40 -0
- package/src/motion/promo/template.ts +36 -0
- package/src/motion/replication2/Replication2Player.tsx +115 -0
- package/src/motion/replication2/config.ts +323 -0
- package/src/motion/replication2/controls.ts +336 -0
- package/src/motion/replication2/driver.ts +92 -0
- package/src/motion/replication2/easing.ts +88 -0
- package/src/motion/replication2/engine.ts +539 -0
- package/src/motion/replication2/html.ts +87 -0
- package/src/motion/replication2/index.ts +14 -0
- package/src/motion/replication2/measure.ts +28 -0
- package/src/motion/replication2/metrics.ts +7 -0
- package/src/motion/replication2/presets.ts +63 -0
- package/src/motion/replication2/riv.ts +4 -0
- package/src/motion/replication2/rive-contract.ts +165 -0
- package/src/motion/replication2/template.ts +33 -0
- package/src/motion/sample.ts +173 -0
- package/src/motion/templates/hey-template.ts +1553 -0
- package/src/motion/templates/index.ts +17 -0
- package/src/motion/templates/word-motion.ts +1166 -0
- package/src/motion/types.ts +162 -0
- package/src/motion/typesurface/TypeSurfaceCanvas.tsx +73 -0
- package/src/motion/typesurface/art.ts +639 -0
- package/src/motion/typesurface/config.ts +486 -0
- package/src/motion/typesurface/engine.ts +586 -0
- package/src/motion/typesurface/fonts.ts +63 -0
- package/src/motion/typesurface/index.ts +16 -0
- package/src/motion/typesurface/layout.ts +133 -0
- package/src/motion/typesurface/ops.ts +196 -0
- package/src/motion/typesurface/presets.ts +199 -0
- package/src/motion/typesurface/renderer.ts +579 -0
- package/src/motion/typesurface/shaders.ts +303 -0
- package/src/motion/typesurface/surfaces.ts +223 -0
- package/src/motion/typesurface/text.ts +35 -0
- package/src/motion/typesurface/timeline.ts +58 -0
- package/src/motion/validate.ts +101 -0
- package/src/native/RiveReceiptStage.tsx +8 -155
- package/src/native/riveReceiptStageFactory.tsx +175 -0
- package/src/tokens/stage.ts +6 -0
- package/tools/ask/dist/components.mjs +6887 -46
- package/tools/ask/mcp.mjs +80 -1
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import { getPath, type Replication2Config } from './config';
|
|
2
|
+
import { SCENE_IDS, type AspectRatio, type DistortionMode, type EasingValue, type SceneId } from './controls';
|
|
3
|
+
import { ease } from './easing';
|
|
4
|
+
import { lineWidthEm } from './measure';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* **The Replication 2 engine — when, not what.** A pure function from (config, frame) to the value of
|
|
8
|
+
* every layer: the Rive file draws them, this decides them. Deterministic: no clock, no Math.random,
|
|
9
|
+
* no DOM. The same config, seed and frame always give the same state, so Remotion can render frames
|
|
10
|
+
* in any order and in parallel, and the live player and the video agree frame for frame.
|
|
11
|
+
*
|
|
12
|
+
* Frames here are 60 fps motion frames. `outputFrameToMotion` maps an output frame (at canvas.fps,
|
|
13
|
+
* after the overall speed and loops) onto them.
|
|
14
|
+
*/
|
|
15
|
+
export const MOTION_FPS = 60;
|
|
16
|
+
|
|
17
|
+
export type Rgba = { hex: string; alpha: number };
|
|
18
|
+
export type Glow = { visible: boolean; x: number; y: number; rx: number; ry: number; color: string; falloff: number; opacity: number };
|
|
19
|
+
export type FrameState = {
|
|
20
|
+
frame: number;
|
|
21
|
+
scene: SceneId | 'complete';
|
|
22
|
+
sceneIndex: number;
|
|
23
|
+
status: string;
|
|
24
|
+
design: { width: number; height: number };
|
|
25
|
+
theme: 'dark' | 'light';
|
|
26
|
+
background: {
|
|
27
|
+
dark: string; light: string; lightOpacity: number;
|
|
28
|
+
gradient: { opacity: number; from: string; to: string; x1: number; y1: number; x2: number; y2: number };
|
|
29
|
+
top: Glow; bottom: Glow;
|
|
30
|
+
vignette: { opacity: number; color: string; radius: number };
|
|
31
|
+
streaks: { color: string; width: number; items: { x: number; opacity: number }[] };
|
|
32
|
+
};
|
|
33
|
+
/** The text group: position (design units), scale, rotation (deg), opacity. Everything below is in its local space. */
|
|
34
|
+
stage: { x: number; y: number; scale: number; rotation: number; opacity: number };
|
|
35
|
+
/** The typed sentence (dark scenes). `settled` + `head` (the placeholder, if any) are drawn as one centred line. */
|
|
36
|
+
line: {
|
|
37
|
+
visible: boolean; settled: string; head: string; headColor: Rgba; color: string;
|
|
38
|
+
fontSize: number; weight: number; letterSpacing: number; opacity: number;
|
|
39
|
+
enter: GlyphTransform; distortion: Distortion;
|
|
40
|
+
};
|
|
41
|
+
/** The display line (AI Agent?). */
|
|
42
|
+
display: {
|
|
43
|
+
visible: boolean; text: string; fontSize: number; weight: number; letterSpacing: number; opacity: number;
|
|
44
|
+
gradientTop: string; gradientBottom: string; hideLeftTo: number; hideRightFrom: number; softness: number;
|
|
45
|
+
distortion: Distortion;
|
|
46
|
+
};
|
|
47
|
+
/** The light-scene words. `settled` + `head` (placeholder) + `entering` (an added word, resolving). */
|
|
48
|
+
final: {
|
|
49
|
+
visible: boolean; settled: string; head: string; headColor: Rgba; entering: string; enteringColor: Rgba; color: string;
|
|
50
|
+
fontSize: number; weight: number; letterSpacing: number; opacity: number; enter: GlyphTransform;
|
|
51
|
+
};
|
|
52
|
+
cursor: {
|
|
53
|
+
visible: boolean; solid: boolean; attach: 'line' | 'final'; width: number; height: number; stroke: number; radius: number;
|
|
54
|
+
color: string; opacity: number; gap: number; scale: number; glow: { opacity: number; color: string; radius: number };
|
|
55
|
+
};
|
|
56
|
+
headGlow: { opacity: number; color: string; rx: number; ry: number; falloff: number; offsetX: number; offsetY: number; blend: 'normal' | 'screen' | 'additive' };
|
|
57
|
+
brackets: {
|
|
58
|
+
visible: boolean; color: string; opacity: number; thickness: number; height: number; serif: number; padding: number;
|
|
59
|
+
leftOffset: number; rightOffset: number; leftTrim: number; rightTrim: number; leftOpacity: number; rightOpacity: number;
|
|
60
|
+
glow: { opacity: number; color: string; radius: number };
|
|
61
|
+
};
|
|
62
|
+
brace: {
|
|
63
|
+
visible: boolean; color: string; opacity: number; size: number; weight: number; padding: number; offsetY: number;
|
|
64
|
+
closingVisible: number; closingSlack: number; glow: { opacity: number; color: string; radius: number };
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export type GlyphTransform = { index: number; x: number; y: number; scale: number; rotation: number; opacity: number; strength: number };
|
|
68
|
+
export type Distortion = { mode: DistortionMode; strength: number; from: number; to: number; falloffFrom: number; falloffTo: number; x: number; y: number; rotation: number; scaleX: number; scaleY: number; opacity: number };
|
|
69
|
+
|
|
70
|
+
/* ─── helpers ─────────────────────────────────────────────────────────────────────────────── */
|
|
71
|
+
const DESIGN: Record<AspectRatio, { width: number; height: number }> = {
|
|
72
|
+
'16:9': { width: 1920, height: 1080 }, '9:16': { width: 1080, height: 1920 }, '1:1': { width: 1080, height: 1080 },
|
|
73
|
+
};
|
|
74
|
+
const clamp = (v: number, lo = 0, hi = 1) => (v < lo ? lo : v > hi ? hi : v);
|
|
75
|
+
const lerp = (a: number, b: number, t: number) => a + (b - a) * t;
|
|
76
|
+
const prog = (t: number, start: number, dur: number) => (dur <= 0 ? (t >= start ? 1 : 0) : clamp((t - start) / dur));
|
|
77
|
+
function mixHex(a: string, b: string, t: number) {
|
|
78
|
+
const pa = parseInt(a.slice(1), 16), pb = parseInt(b.slice(1), 16);
|
|
79
|
+
const ch = (s: number) => Math.round(lerp((pa >> s) & 255, (pb >> s) & 255, t));
|
|
80
|
+
return `#${((ch(16) << 16) | (ch(8) << 8) | ch(0)).toString(16).padStart(6, '0')}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** mulberry32 over a hash of the inputs: a deterministic random number in [0, 1). */
|
|
84
|
+
export function seeded(...keys: number[]): number {
|
|
85
|
+
let h = 0x9e3779b9;
|
|
86
|
+
for (const k of keys) h = Math.imul(h ^ (k | 0), 0x85ebca6b) ^ (h >>> 13);
|
|
87
|
+
let t = h + 0x6d2b79f5;
|
|
88
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
89
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
90
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type Cfg = { n: (p: string) => number; b: (p: string) => boolean; s: (p: string) => string; e: (p: string) => EasingValue };
|
|
94
|
+
const reader = (config: Replication2Config): Cfg => ({
|
|
95
|
+
n: (p) => getPath(config, p) as number,
|
|
96
|
+
b: (p) => getPath(config, p) as boolean,
|
|
97
|
+
s: (p) => getPath(config, p) as string,
|
|
98
|
+
e: (p) => getPath(config, p) as EasingValue,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const transform = (text: string, mode: string) => (mode === 'uppercase' ? text.toUpperCase() : mode === 'lowercase' ? text.toLowerCase() : text);
|
|
102
|
+
|
|
103
|
+
/* ─── timeline ────────────────────────────────────────────────────────────────────────────── */
|
|
104
|
+
export type SceneSpan = { id: SceneId; index: number; start: number; duration: number; enabled: boolean };
|
|
105
|
+
|
|
106
|
+
/** Each scene's start and length in motion frames; disabled scenes take no time. */
|
|
107
|
+
export function timeline(config: Replication2Config): { scenes: SceneSpan[]; durationFrames: number } {
|
|
108
|
+
const c = reader(config);
|
|
109
|
+
let at = 0;
|
|
110
|
+
const scenes = SCENE_IDS.map((id, index) => {
|
|
111
|
+
const flag = getPath(config, `scenes.${id}.enabled`);
|
|
112
|
+
const enabled = flag === undefined ? true : Boolean(flag);
|
|
113
|
+
const duration = enabled ? c.n(`scenes.${id}.durationFrames`) : 0;
|
|
114
|
+
const span = { id, index, start: at, duration, enabled };
|
|
115
|
+
at += duration;
|
|
116
|
+
return span;
|
|
117
|
+
});
|
|
118
|
+
return { scenes, durationFrames: at };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The overall speed actually played. In `speed` mode it is canvas.playbackSpeed; in `totalFrames`
|
|
123
|
+
* mode it follows from canvas.totalFrames: the timeline's length at canvas.fps divided by the frames
|
|
124
|
+
* asked for. Speed and total frames are one setting seen two ways.
|
|
125
|
+
*/
|
|
126
|
+
export function effectiveSpeed(config: Replication2Config): number {
|
|
127
|
+
const c = reader(config);
|
|
128
|
+
if (c.s('canvas.timingMode') !== 'totalFrames') return c.n('canvas.playbackSpeed');
|
|
129
|
+
return speedForFrames(config, c.n('canvas.totalFrames'));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** The speed that makes one play-through last `frames` output frames at canvas.fps. */
|
|
133
|
+
export function speedForFrames(config: Replication2Config, frames: number): number {
|
|
134
|
+
return (timeline(config).durationFrames * reader(config).n('canvas.fps')) / MOTION_FPS / Math.max(1, frames);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The output frames one play-through lasts at `speed`, at canvas.fps. */
|
|
138
|
+
export function framesForSpeed(config: Replication2Config, speed: number): number {
|
|
139
|
+
return Math.ceil((timeline(config).durationFrames * reader(config).n('canvas.fps')) / MOTION_FPS / speed);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Output frames of a render at canvas.fps (speed or total frames, and loops, included). */
|
|
143
|
+
export function outputDuration(config: Replication2Config): number {
|
|
144
|
+
const c = reader(config);
|
|
145
|
+
const perLoop = c.s('canvas.timingMode') === 'totalFrames' ? c.n('canvas.totalFrames') : framesForSpeed(config, c.n('canvas.playbackSpeed'));
|
|
146
|
+
return perLoop * (c.b('canvas.loop') ? c.n('canvas.loopCount') : 1);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** The motion frame an output frame shows. */
|
|
150
|
+
export function outputFrameToMotion(config: Replication2Config, outputFrame: number): number {
|
|
151
|
+
const c = reader(config);
|
|
152
|
+
const total = timeline(config).durationFrames;
|
|
153
|
+
const m = (outputFrame * MOTION_FPS * effectiveSpeed(config)) / c.n('canvas.fps');
|
|
154
|
+
if (c.b('canvas.loop')) {
|
|
155
|
+
const loops = c.n('canvas.loopCount');
|
|
156
|
+
return m >= total * loops ? total - 1e-6 : m % total;
|
|
157
|
+
}
|
|
158
|
+
return Math.min(m, total - 1e-6);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ─── typing ──────────────────────────────────────────────────────────────────────────────── */
|
|
162
|
+
/** When each character starts (placeholder first), in frames from the typing start. Fits `available`. */
|
|
163
|
+
function typingTimes(count: number, startCps: number, endCps: number, available: number): number[] {
|
|
164
|
+
const times: number[] = [];
|
|
165
|
+
let t = 0;
|
|
166
|
+
for (let i = 0; i < count; i++) {
|
|
167
|
+
times.push(t);
|
|
168
|
+
const cps = count > 1 ? lerp(startCps, endCps, i / (count - 1)) : startCps;
|
|
169
|
+
t += MOTION_FPS / cps;
|
|
170
|
+
}
|
|
171
|
+
const last = times.at(-1) ?? 0;
|
|
172
|
+
if (available > 0 && last > available) return times.map((x) => (x * available) / last);
|
|
173
|
+
return times;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type Typed = { settled: string; head: string; newest: number; sinceNewest: number; done: boolean; doneAt: number };
|
|
177
|
+
/** The text typed by frame `t` (frames from the typing start): what is resolved and the placeholder at the head. */
|
|
178
|
+
function typed(c: Cfg, sceneKey: number, full: string, from: number, times: number[], t: number, reduced: boolean): Typed {
|
|
179
|
+
const chars = [...full];
|
|
180
|
+
const lead = c.n('characters.scramble.leadFrames');
|
|
181
|
+
const doneAt = (times.at(-1) ?? 0) + (c.b('characters.scramble.enabled') ? lead : 0);
|
|
182
|
+
if (reduced || t >= doneAt) return { settled: full, head: '', newest: chars.length - 1, sinceNewest: Infinity, done: true, doneAt };
|
|
183
|
+
let n = 0;
|
|
184
|
+
while (n < times.length && times[n]! <= t) n++;
|
|
185
|
+
const shown = from + n;
|
|
186
|
+
const newest = shown - 1;
|
|
187
|
+
const since = n > 0 ? t - times[n - 1]! : Infinity;
|
|
188
|
+
if (n > 0 && c.b('characters.scramble.enabled') && since < lead && chars[newest] !== ' ') {
|
|
189
|
+
const glyphs = [...c.s('characters.scramble.glyphs')];
|
|
190
|
+
const step = Math.floor(since / c.n('characters.scramble.changeEveryFrames'));
|
|
191
|
+
const g = glyphs[Math.floor(seeded(c.n('canvas.seed'), sceneKey, newest, step) * glyphs.length)] ?? '#';
|
|
192
|
+
return { settled: chars.slice(0, newest).join(''), head: g, newest, sinceNewest: since, done: false, doneAt };
|
|
193
|
+
}
|
|
194
|
+
return { settled: chars.slice(0, shown).join(''), head: '', newest, sinceNewest: since, done: false, doneAt };
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function glyphEnter(c: Cfg, index: number, since: number): GlyphTransform {
|
|
198
|
+
const dur = c.n('characters.enter.durationFrames');
|
|
199
|
+
const k = dur > 0 && Number.isFinite(since) ? 1 - ease(c.e('characters.enter.easing'), since / dur, dur) : 0;
|
|
200
|
+
return {
|
|
201
|
+
index, strength: k,
|
|
202
|
+
x: c.n('characters.enter.offsetX'), y: c.n('characters.enter.offsetY'),
|
|
203
|
+
scale: c.n('characters.enter.scale'), rotation: c.n('characters.enter.rotation'), opacity: c.n('characters.enter.opacity'),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const NO_DISTORTION: Distortion = { mode: 'none', strength: 0, from: 0, to: 0, falloffFrom: 0, falloffTo: 0, x: 0, y: 0, rotation: 0, scaleX: 1, scaleY: 1, opacity: 1 };
|
|
208
|
+
/** A band of glyphs travelling along the line, moved by the chosen mode. `scramble` is placeholders only. */
|
|
209
|
+
function distortion(c: Cfg, t: number, active: boolean, reduced: boolean): Distortion {
|
|
210
|
+
const mode = c.s('distortion.mode') as DistortionMode;
|
|
211
|
+
if (reduced || mode === 'none' || mode === 'scramble' || (c.b('distortion.whileTypingOnly') && !active)) return NO_DISTORTION;
|
|
212
|
+
const width = 1 / c.n('distortion.frequency');
|
|
213
|
+
const centre = (((c.n('distortion.phase') + (c.n('distortion.speed') * t) / MOTION_FPS) % 1) + 1) % 1;
|
|
214
|
+
const from = centre - width / 2, to = centre + width / 2;
|
|
215
|
+
const d = { mode, strength: c.n('distortion.amount'), from, to, falloffFrom: centre, falloffTo: centre, x: 0, y: 0, rotation: 0, scaleX: 1, scaleY: 1, opacity: c.n('distortion.opacity') };
|
|
216
|
+
const dy = c.n('distortion.displacement'), rot = c.n('distortion.rotation'), sx = c.n('distortion.scaleX'), sy = c.n('distortion.scaleY');
|
|
217
|
+
switch (mode) {
|
|
218
|
+
case 'wave': return { ...d, y: dy };
|
|
219
|
+
case 'stretch': return { ...d, scaleX: sx, scaleY: sy };
|
|
220
|
+
case 'rotate': return { ...d, rotation: rot };
|
|
221
|
+
case 'warp': return { ...d, y: dy, rotation: rot, scaleX: sx };
|
|
222
|
+
case 'verticalMorph': return { ...d, scaleY: sy };
|
|
223
|
+
case 'horizontalMorph': return { ...d, scaleX: sx };
|
|
224
|
+
}
|
|
225
|
+
return NO_DISTORTION;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* ─── the frame ───────────────────────────────────────────────────────────────────────────── */
|
|
229
|
+
/** Every layer's value at motion frame `frame`. `config` must be resolved (see `resolveConfig`). */
|
|
230
|
+
export function frameState(config: Replication2Config, frame: number): FrameState {
|
|
231
|
+
const c = reader(config);
|
|
232
|
+
const reduced = c.b('motion.reducedMotion');
|
|
233
|
+
const design = DESIGN[c.s('canvas.aspectRatio') as AspectRatio];
|
|
234
|
+
const { scenes, durationFrames } = timeline(config);
|
|
235
|
+
const f = clamp(frame, 0, Math.max(0, durationFrames - 1e-6));
|
|
236
|
+
const span = scenes.find((s) => s.enabled && f >= s.start && f < s.start + s.duration) ?? scenes.filter((s) => s.enabled).at(-1)!;
|
|
237
|
+
const t = f - span.start; // frames into the scene
|
|
238
|
+
const S = (id: SceneId) => scenes[SCENE_IDS.indexOf(id)]!;
|
|
239
|
+
const tt = (p: string) => transform(c.s(p), c.s('typography.textTransform'));
|
|
240
|
+
const safe = c.n('canvas.safeArea');
|
|
241
|
+
const safeW = design.width * (1 - 2 * safe), safeH = design.height * (1 - 2 * safe);
|
|
242
|
+
const fitW = safeW * c.n('motion.zoom.fitWidth');
|
|
243
|
+
const sizeScale = c.n('typography.sizeScale');
|
|
244
|
+
const fit = (widthDu: number) => (c.b('motion.zoom.enabled') && widthDu > fitW ? Math.max(c.n('motion.zoom.minScale'), fitW / widthDu) : 1);
|
|
245
|
+
const light = span.id === 'developers';
|
|
246
|
+
|
|
247
|
+
/* sentence text and typing (what + line) */
|
|
248
|
+
const what = tt('text.what');
|
|
249
|
+
const rest = tt('text.line');
|
|
250
|
+
const lineOn = S('line').enabled && rest.trim() !== '';
|
|
251
|
+
const sentence = lineOn ? `${what} ${rest}` : what;
|
|
252
|
+
const lineSize = c.n('scenes.what.fontSize') * sizeScale;
|
|
253
|
+
const lineWeight = c.n('scenes.what.fontWeight');
|
|
254
|
+
const lineLs = c.n('scenes.what.letterSpacing');
|
|
255
|
+
const lead = c.b('characters.scramble.enabled') ? c.n('characters.scramble.leadFrames') : 0;
|
|
256
|
+
const whatTimes = typingTimes([...what].length, c.n('scenes.what.cps'), c.n('scenes.what.cps'), S('what').duration - lead - 1);
|
|
257
|
+
const restChars = [...sentence].length - [...what].length;
|
|
258
|
+
const restTimes = typingTimes(restChars, c.n('scenes.line.startCps'), c.n('scenes.line.endCps'), S('line').duration - lead - 1);
|
|
259
|
+
/** Typing state of the sentence at absolute motion frame `af`. */
|
|
260
|
+
const sentenceAt = (af: number): Typed => {
|
|
261
|
+
if (af < S('what').start) return { settled: '', head: '', newest: -1, sinceNewest: Infinity, done: false, doneAt: 0 };
|
|
262
|
+
if (!lineOn || af < S('line').start) {
|
|
263
|
+
const r = typed(c, 1, what, 0, whatTimes, af - S('what').start, reduced);
|
|
264
|
+
return lineOn || af < S('what').start + S('what').duration ? r : { ...r, done: true };
|
|
265
|
+
}
|
|
266
|
+
return typed(c, 2, sentence, [...what].length, restTimes, af - S('line').start, reduced);
|
|
267
|
+
};
|
|
268
|
+
const sentenceWidth = (s: Typed) => lineWidthEm(s.settled + s.head, lineWeight, lineLs) * lineSize;
|
|
269
|
+
/** Zoom trails the text by smoothingFrames: the mean of the fit over the frames just before. */
|
|
270
|
+
const smoothedFit = (af: number) => {
|
|
271
|
+
const n = reduced ? 0 : c.n('motion.zoom.smoothingFrames');
|
|
272
|
+
let sum = 0;
|
|
273
|
+
for (let k = 0; k <= n; k++) sum += fit(sentenceWidth(sentenceAt(Math.max(S('what').start, af - k))));
|
|
274
|
+
return sum / (n + 1);
|
|
275
|
+
};
|
|
276
|
+
const drift = (p: number, to: number) => (reduced ? 1 : lerp(1, to, ease(c.e('motion.driftEasing'), p)));
|
|
277
|
+
const whatDrift = (af: number) => {
|
|
278
|
+
const s = S('what');
|
|
279
|
+
const typedFor = typed(c, 1, what, 0, whatTimes, 0, false).doneAt;
|
|
280
|
+
return drift(prog(af - s.start, typedFor, s.duration - typedFor), c.n('scenes.what.driftScale'));
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/* defaults: nothing visible */
|
|
284
|
+
// eslint-disable-next-line comppack/no-raw-colour -- an invisible glow's placeholder colour, never drawn
|
|
285
|
+
const glowOff: Glow = { visible: false, x: 0, y: 0, rx: 0, ry: 0, color: '#000000', falloff: 0.5, opacity: 0 };
|
|
286
|
+
const st: FrameState = {
|
|
287
|
+
frame: f, scene: span.id, sceneIndex: span.index, status: span.id,
|
|
288
|
+
design, theme: light ? 'light' : 'dark',
|
|
289
|
+
background: {
|
|
290
|
+
dark: c.s('background.dark.color'), light: c.s('background.light.color'), lightOpacity: light ? 1 : 0,
|
|
291
|
+
gradient: { opacity: 0, from: c.s('background.gradient.from'), to: c.s('background.gradient.to'), x1: 0, y1: 0, x2: 0, y2: 0 },
|
|
292
|
+
top: glowOff, bottom: glowOff,
|
|
293
|
+
vignette: { opacity: 0, color: c.s('background.vignette.color'), radius: Math.hypot(design.width, design.height) / 2 },
|
|
294
|
+
streaks: { color: c.s('background.streaks.color'), width: c.n('background.streaks.width'), items: [] },
|
|
295
|
+
},
|
|
296
|
+
stage: { x: 0, y: 0, scale: 1, rotation: c.n('motion.rotation'), opacity: 1 },
|
|
297
|
+
line: {
|
|
298
|
+
visible: false, settled: '', head: '', headColor: { hex: c.s('typography.color.dark'), alpha: c.n('characters.scramble.opacity') },
|
|
299
|
+
color: c.s('typography.color.dark'), fontSize: lineSize, weight: lineWeight, letterSpacing: lineLs * lineSize,
|
|
300
|
+
opacity: c.n('typography.opacity'), enter: glyphEnter(c, -1, Infinity), distortion: NO_DISTORTION,
|
|
301
|
+
},
|
|
302
|
+
display: {
|
|
303
|
+
visible: false, text: tt('text.aiAgent'), fontSize: c.n('scenes.aiAgent.fontSize') * sizeScale, weight: c.n('scenes.aiAgent.fontWeight'),
|
|
304
|
+
letterSpacing: 0, opacity: 0, gradientTop: c.s('scenes.aiAgent.gradientTop'), gradientBottom: c.s('scenes.aiAgent.gradientBottom'),
|
|
305
|
+
hideLeftTo: -1, hideRightFrom: 2, softness: 0, distortion: NO_DISTORTION,
|
|
306
|
+
},
|
|
307
|
+
final: {
|
|
308
|
+
visible: false, settled: '', head: '', headColor: { hex: c.s('typography.color.light'), alpha: c.n('characters.scramble.opacity') },
|
|
309
|
+
entering: '', enteringColor: { hex: c.s('typography.color.light'), alpha: 0 }, color: c.s('typography.color.light'),
|
|
310
|
+
fontSize: c.n('scenes.developers.fontSize') * sizeScale, weight: c.n('scenes.developers.fontWeight'),
|
|
311
|
+
letterSpacing: c.n('scenes.developers.letterSpacing') * c.n('scenes.developers.fontSize') * sizeScale, opacity: c.n('typography.opacity'),
|
|
312
|
+
enter: glyphEnter(c, -1, Infinity),
|
|
313
|
+
},
|
|
314
|
+
cursor: {
|
|
315
|
+
visible: false, solid: c.s('cursor.dark.style') === 'solid', attach: 'line', width: 0, height: 0, stroke: 0, radius: 0,
|
|
316
|
+
color: c.s('cursor.dark.color'), opacity: c.n('cursor.opacity'), gap: 0, scale: 1,
|
|
317
|
+
glow: { opacity: 0, color: c.s('cursor.glow.color'), radius: 0 },
|
|
318
|
+
},
|
|
319
|
+
headGlow: {
|
|
320
|
+
opacity: 0, color: c.s('glow.color'), rx: 0, ry: 0, falloff: c.n('glow.falloff'), offsetX: 0, offsetY: 0,
|
|
321
|
+
blend: c.s('glow.blendMode') as 'normal' | 'screen' | 'additive',
|
|
322
|
+
},
|
|
323
|
+
brackets: {
|
|
324
|
+
visible: false, color: c.s('brackets.color'), opacity: c.n('brackets.opacity'), thickness: 0, height: 0, serif: 0, padding: 0,
|
|
325
|
+
leftOffset: 0, rightOffset: 0, leftTrim: 1, rightTrim: 1, leftOpacity: 1, rightOpacity: 1, glow: { opacity: 0, color: c.s('brackets.glow.color'), radius: 0 },
|
|
326
|
+
},
|
|
327
|
+
brace: {
|
|
328
|
+
visible: false, color: c.s('brace.color'), opacity: c.n('brace.opacity'), size: c.n('brace.size'), weight: c.n('brace.weight'),
|
|
329
|
+
padding: 0, offsetY: 0, closingVisible: 0, closingSlack: 0, glow: { opacity: 0, color: c.s('brace.glow.color'), radius: 0 },
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
/* background: gradient, glows, vignette, streaks (dark scenes) */
|
|
334
|
+
if (!light) {
|
|
335
|
+
if (c.b('background.gradient.enabled')) {
|
|
336
|
+
const a = (c.n('background.gradient.angle') * Math.PI) / 180;
|
|
337
|
+
const hx = (Math.sin(a) * design.width) / 2, hy = (-Math.cos(a) * design.height) / 2;
|
|
338
|
+
st.background.gradient = { ...st.background.gradient, opacity: c.n('background.gradient.opacity'), x1: design.width / 2 - hx, y1: design.height / 2 - hy, x2: design.width / 2 + hx, y2: design.height / 2 + hy };
|
|
339
|
+
}
|
|
340
|
+
const lineS = S('line');
|
|
341
|
+
const rise = lineS.enabled
|
|
342
|
+
? ease('easeOutCubic', prog(f, lineS.start + c.n('scenes.line.backgroundGlowAtFrame'), c.n('scenes.line.backgroundGlowFrames')))
|
|
343
|
+
: f >= S('collapse').start ? 1 : 0;
|
|
344
|
+
const bgGlow = (k: 'top' | 'bottom'): Glow => (c.b(`background.${k}Glow.enabled`)
|
|
345
|
+
? {
|
|
346
|
+
visible: true, x: c.n(`background.${k}Glow.x`) * design.width, y: c.n(`background.${k}Glow.y`) * design.height,
|
|
347
|
+
rx: c.n(`background.${k}Glow.radiusX`) * design.width, ry: c.n(`background.${k}Glow.radiusY`) * design.height,
|
|
348
|
+
color: c.s(`background.${k}Glow.color`), falloff: 0.5, opacity: c.n(`background.${k}Glow.intensity`) * (reduced ? 1 : rise),
|
|
349
|
+
}
|
|
350
|
+
: glowOff);
|
|
351
|
+
st.background.top = bgGlow('top');
|
|
352
|
+
st.background.bottom = bgGlow('bottom');
|
|
353
|
+
st.background.vignette.opacity = c.n('background.vignette.intensity');
|
|
354
|
+
const from = S(c.s('background.streaks.fromScene') as SceneId);
|
|
355
|
+
if (c.b('background.streaks.enabled') && f >= from.start) {
|
|
356
|
+
const count = c.n('background.streaks.count');
|
|
357
|
+
const band = c.n('background.streaks.band') * design.width;
|
|
358
|
+
for (let i = 0; i < count; i++) {
|
|
359
|
+
const r = seeded(c.n('canvas.seed'), 77, i);
|
|
360
|
+
const x = i % 2 === 0 ? r * band : design.width - r * band;
|
|
361
|
+
st.background.streaks.items.push({ x, opacity: c.n('background.streaks.opacity') * (0.5 + 0.5 * seeded(c.n('canvas.seed'), 78, i)) });
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* anchor: where the group's centre sits, given its width */
|
|
367
|
+
const place = (widthDu: number, heightDu: number) => {
|
|
368
|
+
const anchor = c.s('motion.anchor');
|
|
369
|
+
let x = design.width * safe + safeW * c.n('motion.position.x');
|
|
370
|
+
let y = design.height * safe + safeH * c.n('motion.position.y');
|
|
371
|
+
if (anchor === 'centerLeft') x += widthDu / 2;
|
|
372
|
+
if (anchor === 'centerRight') x -= widthDu / 2;
|
|
373
|
+
if (anchor === 'topCenter') y += heightDu / 2;
|
|
374
|
+
if (anchor === 'bottomCenter') y -= heightDu / 2;
|
|
375
|
+
return { x, y };
|
|
376
|
+
};
|
|
377
|
+
const cursorDark = (em: number) => ({
|
|
378
|
+
visible: c.b('cursor.enabled'), solid: c.s('cursor.dark.style') === 'solid', attach: 'line' as const,
|
|
379
|
+
width: c.n('cursor.dark.width') * em, height: c.n('cursor.dark.height') * em, stroke: c.n('cursor.dark.strokeWidth') * em,
|
|
380
|
+
radius: c.n('cursor.dark.cornerRadius') * em, color: c.s('cursor.dark.color'), opacity: c.n('cursor.opacity'), gap: c.n('cursor.gap') * em, scale: 1,
|
|
381
|
+
glow: { opacity: c.b('cursor.glow.enabled') ? c.n('cursor.glow.intensity') : 0, color: c.s('cursor.glow.color'), radius: c.n('cursor.glow.radius') * em },
|
|
382
|
+
});
|
|
383
|
+
const blink = (waiting: boolean) => (c.b('cursor.blink.enabled') && waiting && !reduced ? (Math.floor(f / (c.n('cursor.blink.periodFrames') / 2)) % 2 === 0 ? 1 : 0) : 1);
|
|
384
|
+
const headGlow = (em: number, strength: number) => ({
|
|
385
|
+
...st.headGlow, opacity: c.b('glow.enabled') && !reduced ? c.n('glow.intensity') * strength : 0,
|
|
386
|
+
rx: c.n('glow.radiusX') * em, ry: c.n('glow.radiusY') * em, offsetX: c.n('glow.offsetX') * em, offsetY: c.n('glow.offsetY') * em,
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
/* ─── scenes ─── */
|
|
390
|
+
if (span.id === 'cursor') {
|
|
391
|
+
const p = reduced ? 1 : ease(c.e('scenes.cursor.easing'), t / c.n('scenes.cursor.introFrames'), c.n('scenes.cursor.introFrames'));
|
|
392
|
+
st.stage = { ...st.stage, ...place(0, lineSize), scale: c.n('motion.scale') };
|
|
393
|
+
st.line = { ...st.line, visible: true };
|
|
394
|
+
st.cursor = { ...cursorDark(lineSize), scale: lerp(c.n('scenes.cursor.fromScale'), 1, p), gap: 0 };
|
|
395
|
+
st.cursor.opacity *= blink(true);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
if (span.id === 'what' || span.id === 'line') {
|
|
399
|
+
const s = sentenceAt(f);
|
|
400
|
+
const width = sentenceWidth(s);
|
|
401
|
+
let zoom = smoothedFit(f);
|
|
402
|
+
if (span.id === 'line' && c.s('motion.zoom.mode') === 'anticipate' && !reduced) {
|
|
403
|
+
// Ease towards the finished line's zoom; never less zoomed out than the text so far needs.
|
|
404
|
+
const target = fit(lineWidthEm(sentence, lineWeight, lineLs) * lineSize);
|
|
405
|
+
const zf = c.n('scenes.line.zoomFrames');
|
|
406
|
+
zoom = Math.min(zoom, lerp(fit(lineWidthEm(what, lineWeight, lineLs) * lineSize), target, ease(c.e('scenes.line.zoomEasing'), t / zf, zf)));
|
|
407
|
+
}
|
|
408
|
+
const scale = zoom * whatDrift(Math.min(f, S('what').start + S('what').duration)) * c.n('motion.scale');
|
|
409
|
+
st.stage = { ...st.stage, ...place(width * scale, lineSize * scale), scale };
|
|
410
|
+
st.line = {
|
|
411
|
+
...st.line, visible: true, settled: s.settled, head: s.head,
|
|
412
|
+
enter: glyphEnter(c, s.newest, s.sinceNewest), distortion: distortion(c, t, !s.done, reduced),
|
|
413
|
+
};
|
|
414
|
+
const typingActive = !s.done;
|
|
415
|
+
const sinceDone = f - (span.id === 'what' ? S('what').start : S('line').start) - s.doneAt;
|
|
416
|
+
const activity = typingActive ? 1 : clamp(1 - sinceDone / Math.max(1, c.n('glow.fadeOutFrames')));
|
|
417
|
+
st.headGlow = headGlow(lineSize, activity * c.n(`scenes.${span.id}.glowIntensity`));
|
|
418
|
+
const complete = s.done && (span.id === 'line' || !lineOn);
|
|
419
|
+
st.cursor = { ...cursorDark(lineSize), visible: c.b('cursor.enabled') && !(complete && c.b('cursor.hideOnComplete')) && !reduced };
|
|
420
|
+
st.cursor.opacity *= blink(s.done);
|
|
421
|
+
if (span.id === 'line' && c.b('brackets.enabled')) Object.assign(st.brackets, bracketState(c, t - c.n('scenes.line.bracketsAtFrame'), lineSize, scale, design.width, reduced));
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (span.id === 'collapse') {
|
|
425
|
+
const final = sentenceAt(S('collapse').start - 1e-6);
|
|
426
|
+
const width = sentenceWidth({ ...final, head: '' });
|
|
427
|
+
const base = fit(width) * whatDrift(S('what').start + S('what').duration) * c.n('motion.scale');
|
|
428
|
+
const hold = c.n('scenes.collapse.holdFrames'), dur = c.n('scenes.collapse.collapseFrames');
|
|
429
|
+
const pc = reduced ? 0 : ease(c.e('scenes.collapse.easing'), prog(t, hold, dur), dur);
|
|
430
|
+
const scale = base * drift(prog(t, 0, hold), c.n('scenes.collapse.holdDriftScale')) * lerp(1, c.n('scenes.collapse.toScale'), pc);
|
|
431
|
+
st.stage = { ...st.stage, ...place(width * scale, lineSize * scale), scale, opacity: c.b('scenes.collapse.fade') ? 1 - pc : 1 };
|
|
432
|
+
st.line = { ...st.line, visible: true, settled: final.settled, head: '' };
|
|
433
|
+
if (c.b('brackets.enabled') && S('line').enabled) Object.assign(st.brackets, bracketState(c, Infinity, lineSize, scale, design.width, true));
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (span.id === 'aiAgent') {
|
|
437
|
+
const size = st.display.fontSize, weight = st.display.weight;
|
|
438
|
+
const toLs = c.n('scenes.aiAgent.letterSpacing'), fromLs = c.n('scenes.aiAgent.fromLetterSpacing');
|
|
439
|
+
const trackIn = c.n('scenes.aiAgent.trackInFrames');
|
|
440
|
+
const p = reduced ? 1 : ease(c.e('scenes.aiAgent.easing'), t / trackIn, trackIn);
|
|
441
|
+
const ls = lerp(fromLs, toLs, p);
|
|
442
|
+
const settledWidth = lineWidthEm(st.display.text, weight, toLs) * size;
|
|
443
|
+
const pd = prog(t, trackIn, span.duration - trackIn);
|
|
444
|
+
const scale = fit(settledWidth) * lerp(c.n('scenes.aiAgent.fromScale'), 1, p) * drift(pd, c.n('scenes.aiAgent.driftScale')) * c.n('motion.scale');
|
|
445
|
+
const width = lineWidthEm(st.display.text, weight, ls) * size;
|
|
446
|
+
st.stage = { ...st.stage, ...place(width * scale, size * scale), scale };
|
|
447
|
+
const rf = c.n('scenes.aiAgent.revealFrames');
|
|
448
|
+
const r = reduced || rf === 0 ? 1 : ease(c.e('scenes.aiAgent.revealEasing'), t / rf, rf);
|
|
449
|
+
const soft = c.n('scenes.aiAgent.revealSoftness');
|
|
450
|
+
const mode = c.s('scenes.aiAgent.revealMode');
|
|
451
|
+
// Hidden spans, in fractions of the line: glyphs left of hideLeftTo and right of hideRightFrom.
|
|
452
|
+
const [hideLeftTo, hideRightFrom] = mode === 'centerOut' ? [0.5 - r * (0.5 + soft), 0.5 + r * (0.5 + soft)]
|
|
453
|
+
: mode === 'leftToRight' ? [-1 - soft, r * (1 + soft)]
|
|
454
|
+
: mode === 'rightToLeft' ? [1 - r * (1 + soft), 2 + soft]
|
|
455
|
+
: [-1 - soft, 2 + soft];
|
|
456
|
+
st.display = {
|
|
457
|
+
...st.display, visible: true, letterSpacing: ls * size, opacity: c.n('typography.opacity') * lerp(1, c.n('scenes.aiAgent.dimTo'), reduced ? 0 : pd),
|
|
458
|
+
hideLeftTo, hideRightFrom, softness: soft, distortion: distortion(c, t, t < trackIn, reduced),
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (span.id === 'developers') {
|
|
463
|
+
const size = st.final.fontSize, weight = st.final.weight, ls = c.n('scenes.developers.letterSpacing');
|
|
464
|
+
const w1 = tt('text.final1'), w2 = tt('text.final2'), w3 = tt('text.final3');
|
|
465
|
+
const at2 = c.n('scenes.developers.word2AtFrame'), at3 = c.n('scenes.developers.word3AtFrame');
|
|
466
|
+
const typingAt = c.n('scenes.developers.typingAtFrame');
|
|
467
|
+
const times = typingTimes([...w1].length, c.n('scenes.developers.cps'), c.n('scenes.developers.cps'), (w2 ? at2 : span.duration) - typingAt - lead - 1);
|
|
468
|
+
const s = typed(c, 3, w1, 0, times, t - typingAt, reduced);
|
|
469
|
+
const typingStarted = t >= typingAt || reduced;
|
|
470
|
+
const words = [w1, ...(w2 && (t >= at2 || reduced) ? [w2] : []), ...(w3 && (t >= at3 || reduced) ? [w3] : [])];
|
|
471
|
+
const addingAt = words.length === 3 ? at3 : words.length === 2 ? at2 : -1;
|
|
472
|
+
const fadeDur = c.n('scenes.developers.wordFadeFrames');
|
|
473
|
+
const pw = reduced || addingAt < 0 ? 1 : prog(t, addingAt + c.n('scenes.developers.wordDelayFrames'), fadeDur);
|
|
474
|
+
const settledWords = pw < 1 ? words.slice(0, -1) : words;
|
|
475
|
+
const settled = typingStarted ? (words.length > 1 ? settledWords.join(' ') : s.settled) : '';
|
|
476
|
+
const entering = pw < 1 ? ` ${words.at(-1)}` : '';
|
|
477
|
+
const all = settled + (words.length > 1 ? entering : s.head);
|
|
478
|
+
const width = lineWidthEm(all, weight, ls) * size;
|
|
479
|
+
const introP = reduced ? 1 : ease(c.e('scenes.developers.introEasing'), t / c.n('scenes.developers.introFrames'), c.n('scenes.developers.introFrames'));
|
|
480
|
+
const introEnd = c.n('scenes.developers.introFrames');
|
|
481
|
+
const braceExtra = c.b('brace.enabled') ? 2 * (c.n('brace.padding') + 0.6 * c.n('brace.size')) * size : 0;
|
|
482
|
+
const scale = fit(width + braceExtra) * lerp(c.n('scenes.developers.introFromScale'), 1, introP)
|
|
483
|
+
* drift(prog(t, introEnd, span.duration - introEnd), c.n('scenes.developers.driftScale')) * c.n('motion.scale');
|
|
484
|
+
st.stage = { ...st.stage, ...place((width + braceExtra) * scale, size * c.n('brace.size') * scale), scale };
|
|
485
|
+
st.final = {
|
|
486
|
+
...st.final, visible: true, settled, head: words.length > 1 ? '' : s.head,
|
|
487
|
+
entering, enteringColor: { hex: mixHex(c.s('scenes.developers.wordFromColor'), c.s('typography.color.light'), pw), alpha: pw },
|
|
488
|
+
enter: glyphEnter(c, s.newest, s.sinceNewest),
|
|
489
|
+
};
|
|
490
|
+
st.cursor = {
|
|
491
|
+
...cursorDark(size), attach: 'final', solid: c.s('cursor.light.style') === 'solid',
|
|
492
|
+
visible: c.b('cursor.enabled') && !typingStarted, width: c.n('cursor.light.width') * size, height: c.n('cursor.light.height') * size,
|
|
493
|
+
color: c.s('cursor.light.color'), glow: { opacity: 0, color: c.s('cursor.glow.color'), radius: 0 },
|
|
494
|
+
};
|
|
495
|
+
st.cursor.opacity *= blink(true);
|
|
496
|
+
if (c.b('brace.enabled')) {
|
|
497
|
+
const gapDur = c.n('brace.gapFrames');
|
|
498
|
+
const pg = reduced || addingAt < 0 ? 1 : ease(c.e('brace.gapEasing'), prog(t, addingAt, gapDur), gapDur);
|
|
499
|
+
const added = addingAt < 0 ? 0 : lineWidthEm(` ${words.at(-1)}`, weight, ls) * size + ls * size;
|
|
500
|
+
st.brace = {
|
|
501
|
+
...st.brace, visible: true, padding: c.n('brace.padding') * size, offsetY: c.n('brace.offsetY') * size,
|
|
502
|
+
closingVisible: reduced || t >= typingAt + c.n('brace.closingDelayFrames') ? 1 : 0,
|
|
503
|
+
closingSlack: -added * (1 - pg),
|
|
504
|
+
glow: { opacity: c.b('brace.glow.enabled') ? c.n('brace.glow.intensity') : 0, color: c.s('brace.glow.color'), radius: c.n('brace.glow.radius') * size },
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// The last frame reports completion (the state machine's Complete state keeps every group shown;
|
|
510
|
+
// the opacities above decide what is visible).
|
|
511
|
+
if (frame >= durationFrames - 1) {
|
|
512
|
+
st.sceneIndex = SCENE_IDS.length;
|
|
513
|
+
st.status = 'complete';
|
|
514
|
+
}
|
|
515
|
+
if (reduced) {
|
|
516
|
+
st.line.head = '';
|
|
517
|
+
st.final.head = '';
|
|
518
|
+
}
|
|
519
|
+
return st;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** The brackets `t` frames after they start arriving (Infinity = settled). */
|
|
523
|
+
function bracketState(c: Cfg, t: number, em: number, stageScale: number, designWidth: number, settled: boolean): Partial<FrameState['brackets']> {
|
|
524
|
+
const dur = c.n('brackets.enter.durationFrames'), stagger = c.n('brackets.enter.staggerFrames');
|
|
525
|
+
const e = c.e('brackets.enter.easing');
|
|
526
|
+
const pl = settled ? 1 : ease(e, prog(t, 0, dur), dur);
|
|
527
|
+
const pr = settled ? 1 : ease(e, prog(t, stagger, dur), dur);
|
|
528
|
+
if (!settled && t < 0) return { visible: false };
|
|
529
|
+
const mode = c.s('brackets.enter.mode');
|
|
530
|
+
const travel = (c.n('brackets.enter.distance') * designWidth) / Math.max(stageScale, 1e-3);
|
|
531
|
+
return {
|
|
532
|
+
visible: true, thickness: c.n('brackets.thickness') * em, height: c.n('brackets.height') * em, serif: c.n('brackets.serifLength') * em,
|
|
533
|
+
padding: c.n('brackets.padding') * em,
|
|
534
|
+
leftOffset: mode === 'slide' ? -travel * (1 - pl) : 0, rightOffset: mode === 'slide' ? travel * (1 - pr) : 0,
|
|
535
|
+
leftTrim: mode === 'draw' ? pl : 1, rightTrim: mode === 'draw' ? pr : 1,
|
|
536
|
+
leftOpacity: mode === 'fade' ? pl : pl > 0 || mode !== 'slide' ? 1 : 0, rightOpacity: mode === 'fade' ? pr : pr > 0 || mode !== 'slide' ? 1 : 0,
|
|
537
|
+
glow: { opacity: c.b('brackets.glow.enabled') ? c.n('brackets.glow.intensity') : 0, color: c.s('brackets.glow.color'), radius: c.n('brackets.glow.radius') * em },
|
|
538
|
+
};
|
|
539
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CONFIG_SCHEMA_ID, validateConfig, type ConfigError } from './config';
|
|
2
|
+
import { replication2 } from './template';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* **HTML serialization** — the portable form of a replication-2 animation, following the Rive host
|
|
6
|
+
* pattern of `rive-prototype/`: a page that carries the config as JSON and draws it with the Rive
|
|
7
|
+
* runtime (`runtime.js` + `replication-2.riv` + `rive.wasm` beside it). No frames, images or video:
|
|
8
|
+
* configuration plus a reference to the reusable runtime asset.
|
|
9
|
+
*
|
|
10
|
+
* The config is embedded in a `<script type="application/json">` with `<`, `>` and `&` escaped as
|
|
11
|
+
* \u escapes, so no value can close the tag or start markup — whatever the text says.
|
|
12
|
+
*/
|
|
13
|
+
export const HTML_ASSETS = { runtime: 'runtime.js', riv: 'replication-2.riv', wasm: 'rive.wasm' } as const;
|
|
14
|
+
|
|
15
|
+
const escapeJson = (value: unknown) =>
|
|
16
|
+
JSON.stringify(value, null, 2).replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/&/g, '\\u0026').replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
17
|
+
const escapeAttr = (s: string) => s.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
|
18
|
+
|
|
19
|
+
/** The accessible description of a config: `text.ariaLabel`, or the copy in order. */
|
|
20
|
+
export function describeCopy(config: Record<string, unknown>): string {
|
|
21
|
+
const t = config.text as Record<string, string>;
|
|
22
|
+
return t.ariaLabel || [`${t.what} ${t.line}`.trim(), t.aiAgent, [t.final1, t.final2, t.final3].filter(Boolean).join(' ')].join(' — ');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* The host page's own chrome (black letterbox, white error text), not a component colour. */
|
|
26
|
+
/* eslint-disable comppack/no-raw-colour */
|
|
27
|
+
const HOST_STYLE = (w: number, h: number) => ` <style>
|
|
28
|
+
html, body { margin: 0; height: 100%; background: #000; }
|
|
29
|
+
figure { margin: 0; height: 100%; display: grid; place-items: center; }
|
|
30
|
+
canvas { max-width: 100%; max-height: 100%; aspect-ratio: ${w} / ${h}; }
|
|
31
|
+
[data-error] { color: #fff; font: 14px/1.5 system-ui; padding: 16px; white-space: pre-wrap; }
|
|
32
|
+
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
33
|
+
</style>
|
|
34
|
+
`;
|
|
35
|
+
/* eslint-enable comppack/no-raw-colour */
|
|
36
|
+
|
|
37
|
+
/** A complete host page for `config`, or the validation errors. */
|
|
38
|
+
export function serializeReplication2Html(config: unknown, options: { title?: string; assetBase?: string; wasmFromCdn?: boolean } = {}): { valid: true; html: string } | { valid: false; errors: ConfigError[] } {
|
|
39
|
+
const checked = validateConfig(config);
|
|
40
|
+
if (!checked.valid) return { valid: false, errors: checked.errors };
|
|
41
|
+
const cfg = checked.config!;
|
|
42
|
+
const canvas = cfg.canvas as { width: number; height: number; aspectRatio: string };
|
|
43
|
+
const base = options.assetBase ?? './';
|
|
44
|
+
const label = describeCopy(cfg);
|
|
45
|
+
const html = `<!doctype html>
|
|
46
|
+
<html lang="en">
|
|
47
|
+
<head>
|
|
48
|
+
<meta charset="utf-8">
|
|
49
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
50
|
+
<title>${escapeAttr(options.title ?? replication2.title)}</title>
|
|
51
|
+
${HOST_STYLE(canvas.width, canvas.height)}</head>
|
|
52
|
+
<body>
|
|
53
|
+
<!--
|
|
54
|
+
replication-2: a thin host for ${HTML_ASSETS.riv}. It validates the config, and the package engine
|
|
55
|
+
decides each frame; the Rive file draws it. Config, first found wins: #config=<url-encoded JSON> ·
|
|
56
|
+
?config=<url-encoded JSON> · the JSON below. In an iframe, post { type: 'replication-2:update', config }.
|
|
57
|
+
-->
|
|
58
|
+
<figure role="img" aria-label="${escapeAttr(label)}" data-template="${replication2.id}" data-version="${replication2.version}" data-schema="${CONFIG_SCHEMA_ID}">
|
|
59
|
+
<canvas width="${canvas.width}" height="${canvas.height}" aria-hidden="true"></canvas>
|
|
60
|
+
<p class="visually-hidden">${escapeAttr(label)}</p>
|
|
61
|
+
<pre data-error role="alert" hidden></pre>
|
|
62
|
+
</figure>
|
|
63
|
+
<script type="application/json" id="replication-2-config">
|
|
64
|
+
${escapeJson(cfg)}
|
|
65
|
+
</script>
|
|
66
|
+
<script type="module">
|
|
67
|
+
const { mountReplication2 } = await import(new URL('${escapeAttr(base)}${HTML_ASSETS.runtime}', location.href).href);
|
|
68
|
+
const read = () => {
|
|
69
|
+
const q = (s) => new URLSearchParams(s).get('config');
|
|
70
|
+
const raw = q(location.hash.slice(1)) ?? q(location.search) ?? document.getElementById('replication-2-config').textContent;
|
|
71
|
+
try { return JSON.parse(raw); } catch { return { __unparseable: raw }; }
|
|
72
|
+
};
|
|
73
|
+
const errorBox = document.querySelector('[data-error]');
|
|
74
|
+
const show = (errors) => { errorBox.hidden = false; errorBox.textContent = 'replication-2 could not show this configuration:\\n\\n' + errors.map((e) => '• ' + (e.path || '(config)') + ' — ' + e.message).join('\\n'); };
|
|
75
|
+
const handle = await mountReplication2(document.querySelector('canvas'), read(), {
|
|
76
|
+
riv: new URL('${escapeAttr(base)}${HTML_ASSETS.riv}', location.href).href,
|
|
77
|
+
${options.wasmFromCdn ? ' // rive.wasm comes from the Rive runtime\'s CDN' : ` wasmUrl: new URL('${escapeAttr(base)}${HTML_ASSETS.wasm}', import.meta.url).href,`}
|
|
78
|
+
onInvalid: show,
|
|
79
|
+
});
|
|
80
|
+
window.replication2 = handle;
|
|
81
|
+
addEventListener('message', ({ data }) => { if (data?.type === 'replication-2:update') { const r = handle?.update(data.config); if (r && !r.valid) show(r.errors); } });
|
|
82
|
+
</script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
|
85
|
+
`;
|
|
86
|
+
return { valid: true, html };
|
|
87
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **replication-2 — a configurable-motion template rendered by Rive.** One canonical config (the
|
|
3
|
+
* control table), a pure engine that turns it into frames, and the Rive file that draws them.
|
|
4
|
+
* `docs/replication-2.md`.
|
|
5
|
+
*/
|
|
6
|
+
export { CONTROLS, CONTROL_BY_PATH, GROUPS, EASING_NAMES, ASPECT_RATIOS, FPS_OPTIONS, FONT_FAMILIES, DISTORTION_MODES, SCENE_IDS, type Control, type ControlType, type EasingValue, type Group, type SceneId } from './controls';
|
|
7
|
+
export { CONFIG_SCHEMA_ID, defaultConfig, validateConfig, resolveConfig, applyPatch, diffConfig, configJsonSchema, getPath, Replication2ConfigError, type Replication2Config, type ConfigError, type ConfigPatch, type PatchOp } from './config';
|
|
8
|
+
export { PRESET_PATCHES, presetConfig, type PresetName } from './presets';
|
|
9
|
+
export { frameState, timeline, outputDuration, outputFrameToMotion, effectiveSpeed, speedForFrames, framesForSpeed, seeded, MOTION_FPS, type FrameState, type SceneSpan } from './engine';
|
|
10
|
+
export { ease, cubicBezier, springAt } from './easing';
|
|
11
|
+
export { lineWidthEm } from './measure';
|
|
12
|
+
export { riveValues, argb, RIVE_PROPS, RIVE_ARTBOARD, RIVE_STATE_MACHINE, RIVE_VIEW_MODEL, type RiveValues, type RiveProp } from './rive-contract';
|
|
13
|
+
export { createReplication2Driver, type Replication2Driver, type DriverOptions } from './driver';
|
|
14
|
+
export { serializeReplication2Html, describeCopy, HTML_ASSETS } from './html';
|