@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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The control-table kit for configurable-motion templates** (DECISIONS §25–§27). A template declares
|
|
3
|
+
* every editable value once — path, type, range or options, default, unit, description, who may edit
|
|
4
|
+
* it — and `createConfigApi` (./config) derives the defaults, validator, JSON Schema, patch API and
|
|
5
|
+
* diff from that table. The Remotion Studio schema and the site editor read the same table.
|
|
6
|
+
*
|
|
7
|
+
* Generalized from promo-product-showcase's own table (`../promo/controls.ts`) so a new template reuses
|
|
8
|
+
* the machinery instead of copying it. Adds two things promo does not need: multiline text and keyed
|
|
9
|
+
* lists (a fixed list whose items can also be addressed by their id, e.g. `folds.top.peakAngle`).
|
|
10
|
+
*/
|
|
11
|
+
export type ControlType = 'number' | 'integer' | 'boolean' | 'color' | 'enum' | 'text' | 'easing' | 'asset' | 'overrides';
|
|
12
|
+
export type ControlUnit =
|
|
13
|
+
| 'frames' | 'du' | 'pu' | 'em' | 'normalized' | 'short' | 'deg' | 'px' | 'hz' | 'du/s' | 'factor' | 'weight' | 'fraction';
|
|
14
|
+
|
|
15
|
+
export type Control<G extends string = string> = {
|
|
16
|
+
/** Dotted path into the config (`content.top.headline`); inside a list item, relative to the item (`peakAngle`). */
|
|
17
|
+
path: string;
|
|
18
|
+
group: G;
|
|
19
|
+
type: ControlType;
|
|
20
|
+
default: unknown;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
step?: number;
|
|
24
|
+
options?: readonly (string | number)[];
|
|
25
|
+
maxLength?: number;
|
|
26
|
+
minLength?: number;
|
|
27
|
+
/** `text`: line breaks (\n) are allowed; every other control character is still refused. */
|
|
28
|
+
multiline?: boolean;
|
|
29
|
+
/** `overrides`: the config paths (prefixes) an override map may set. */
|
|
30
|
+
allow?: readonly string[];
|
|
31
|
+
unit?: ControlUnit;
|
|
32
|
+
description: string;
|
|
33
|
+
userEditable: boolean;
|
|
34
|
+
agentEditable: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ListSpec<G extends string = string> = {
|
|
38
|
+
path: string;
|
|
39
|
+
group: G;
|
|
40
|
+
minItems: number;
|
|
41
|
+
maxItems: number;
|
|
42
|
+
item: readonly Control<G>[];
|
|
43
|
+
default: unknown[];
|
|
44
|
+
description: string;
|
|
45
|
+
/**
|
|
46
|
+
* A keyed list: its items are exactly `keys`, in order, each carrying its key in `keyField`. Patches
|
|
47
|
+
* may address an item by index (`folds.0.peakAngle`) or by key (`folds.top.peakAngle`).
|
|
48
|
+
*/
|
|
49
|
+
keyField?: string;
|
|
50
|
+
keys?: readonly string[];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type Opts = Partial<Pick<Control, 'step' | 'unit' | 'userEditable' | 'agentEditable' | 'minLength' | 'multiline'>>;
|
|
54
|
+
|
|
55
|
+
/** Control builders bound to a template's group resolver (path → group). */
|
|
56
|
+
export function controlKit<G extends string>(groupOf: (path: string) => G, easingNames: readonly string[]) {
|
|
57
|
+
const base = (o: Opts = {}) => ({
|
|
58
|
+
userEditable: o.userEditable ?? true, agentEditable: o.agentEditable ?? true,
|
|
59
|
+
...(o.unit ? { unit: o.unit } : {}), ...(o.step !== undefined ? { step: o.step } : {}),
|
|
60
|
+
});
|
|
61
|
+
const num = (path: string, def: number, min: number, max: number, description: string, o: Opts = {}): Control<G> => ({ path, group: groupOf(path), type: 'number', default: def, min, max, description, ...base({ step: 0.01, ...o }) });
|
|
62
|
+
const int = (path: string, def: number, min: number, max: number, description: string, o: Opts = {}): Control<G> => ({ path, group: groupOf(path), type: 'integer', default: def, min, max, description, ...base({ step: 1, ...o }) });
|
|
63
|
+
const k = {
|
|
64
|
+
num, int,
|
|
65
|
+
frames: (path: string, def: number, max: number, description: string, min = 0) => int(path, def, min, max, description, { unit: 'frames' }),
|
|
66
|
+
bool: (path: string, def: boolean, description: string, o: Opts = {}): Control<G> => ({ path, group: groupOf(path), type: 'boolean', default: def, description, ...base(o) }),
|
|
67
|
+
color: (path: string, def: string, description: string, o: Opts = {}): Control<G> => ({ path, group: groupOf(path), type: 'color', default: def, description, ...base(o) }),
|
|
68
|
+
choice: (path: string, def: string | number, options: readonly (string | number)[], description: string, o: Opts = {}): Control<G> => ({ path, group: groupOf(path), type: 'enum', default: def, options, description, ...base(o) }),
|
|
69
|
+
text: (path: string, def: string, maxLength: number, description: string, o: Opts = {}): Control<G> => ({
|
|
70
|
+
path, group: groupOf(path), type: 'text', default: def, maxLength, minLength: o.minLength ?? 0, ...(o.multiline ? { multiline: true } : {}), description, ...base(o),
|
|
71
|
+
}),
|
|
72
|
+
easing: (path: string, def: string, description: string): Control<G> => ({ path, group: groupOf(path), type: 'easing', default: def, options: easingNames, description, ...base() }),
|
|
73
|
+
asset: (path: string, description: string): Control<G> => ({ path, group: groupOf(path), type: 'asset', default: '', maxLength: 2048, description, ...base() }),
|
|
74
|
+
opacity: (path: string, def: number, description: string) => num(path, def, 0, 1, description, { unit: 'fraction' }),
|
|
75
|
+
du: (path: string, def: number, min: number, max: number, description: string) => num(path, def, min, max, description, { step: 1, unit: 'du' }),
|
|
76
|
+
pu: (path: string, def: number, min: number, max: number, description: string) => num(path, def, min, max, description, { step: 1, unit: 'pu' }),
|
|
77
|
+
norm: (path: string, def: number, min: number, max: number, description: string) => num(path, def, min, max, description, { step: 0.005, unit: 'normalized' }),
|
|
78
|
+
deg: (path: string, def: number, min: number, max: number, description: string) => num(path, def, min, max, description, { step: 0.5, unit: 'deg' }),
|
|
79
|
+
factor: (path: string, def: number, min: number, max: number, description: string) => num(path, def, min, max, description, { step: 0.01, unit: 'factor' }),
|
|
80
|
+
};
|
|
81
|
+
return k;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Re-home a control into a list item: same control, relative path, fixed group. */
|
|
85
|
+
export const inGroup = <G extends string>(group: G, c: Control<string>): Control<G> => ({ ...c, group });
|
|
86
|
+
|
|
87
|
+
/** Every editable leaf, lists expanded as `<list>[].<field>` — the count people and agents see. */
|
|
88
|
+
export function expandControls<G extends string>(controls: readonly Control<G>[], lists: readonly ListSpec<G>[]): (Control<G> & { list?: string })[] {
|
|
89
|
+
return [
|
|
90
|
+
...controls,
|
|
91
|
+
...lists.flatMap((l) => l.item.map((c) => ({ ...c, path: c.path ? `${l.path}[].${c.path}` : `${l.path}[]`, list: l.path }))),
|
|
92
|
+
];
|
|
93
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Easing } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* **Named easings, as cubic-béziers.** The motion contract refers to these by name so it stays JSON;
|
|
5
|
+
* the same functions run in Remotion and in the exported HTML runtime, so both play identical curves.
|
|
6
|
+
*/
|
|
7
|
+
const BEZIERS: Record<Exclude<Easing, 'linear' | 'hold'>, [number, number, number, number]> = {
|
|
8
|
+
'ease-in': [0.42, 0, 1, 1],
|
|
9
|
+
'ease-out': [0, 0, 0.58, 1],
|
|
10
|
+
'ease-in-out': [0.42, 0, 0.58, 1],
|
|
11
|
+
'expo-out': [0.16, 1, 0.3, 1],
|
|
12
|
+
'back-out': [0.34, 1.56, 0.64, 1],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Standard cubic-bézier solve: Newton steps on x, then bisection if Newton stalls. */
|
|
16
|
+
function bezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number {
|
|
17
|
+
const cx = 3 * x1, bx = 3 * (x2 - x1) - cx, ax = 1 - cx - bx;
|
|
18
|
+
const cy = 3 * y1, by = 3 * (y2 - y1) - cy, ay = 1 - cy - by;
|
|
19
|
+
const sx = (t: number) => ((ax * t + bx) * t + cx) * t;
|
|
20
|
+
const sy = (t: number) => ((ay * t + by) * t + cy) * t;
|
|
21
|
+
const dx = (t: number) => (3 * ax * t + 2 * bx) * t + cx;
|
|
22
|
+
return (x) => {
|
|
23
|
+
if (x <= 0) return 0;
|
|
24
|
+
if (x >= 1) return 1;
|
|
25
|
+
let t = x;
|
|
26
|
+
for (let i = 0; i < 8; i++) {
|
|
27
|
+
const err = sx(t) - x;
|
|
28
|
+
if (Math.abs(err) < 1e-7) return sy(t);
|
|
29
|
+
const d = dx(t);
|
|
30
|
+
if (Math.abs(d) < 1e-6) break;
|
|
31
|
+
t -= err / d;
|
|
32
|
+
}
|
|
33
|
+
let lo = 0, hi = 1;
|
|
34
|
+
t = x;
|
|
35
|
+
for (let i = 0; i < 40; i++) {
|
|
36
|
+
const v = sx(t);
|
|
37
|
+
if (Math.abs(v - x) < 1e-7) break;
|
|
38
|
+
if (v < x) lo = t; else hi = t;
|
|
39
|
+
t = (lo + hi) / 2;
|
|
40
|
+
}
|
|
41
|
+
return sy(t);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const CURVES: Record<Easing, (t: number) => number> = {
|
|
46
|
+
linear: (t) => t,
|
|
47
|
+
hold: (t) => (t >= 1 ? 1 : 0),
|
|
48
|
+
...(Object.fromEntries(Object.entries(BEZIERS).map(([k, p]) => [k, bezier(...p)])) as Record<keyof typeof BEZIERS, (t: number) => number>),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export function ease(name: Easing | undefined, t: number): number {
|
|
52
|
+
return CURVES[name ?? 'linear'](t);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const EASING_BEZIERS = BEZIERS;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Auto-fit for text slots.** A slot has a fixed type size and a fixed maximum width. Text wider
|
|
3
|
+
* than that is scaled down (through the `--fit` custom property, which the template's CSS multiplies
|
|
4
|
+
* into `font-size`), never wrapped or moved. Both renderers — Remotion and the HTML runtime — measure
|
|
5
|
+
* the same DOM in the same browser engine and use this one formula, so the result is identical.
|
|
6
|
+
*/
|
|
7
|
+
export const fitScale = (naturalWidth: number, maxWidth: number) =>
|
|
8
|
+
naturalWidth <= maxWidth || naturalWidth <= 0 ? 1 : Math.floor((maxWidth / naturalWidth) * 1000) / 1000;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **`@appinternalleads/ui/motion` — motion templates.** Animations authored once in Remotion
|
|
3
|
+
* (`remotion-prototype/`) and shipped as data. People and agents change only the content contract:
|
|
4
|
+
* text slots, theme colours and optional scenes. `docs/MOTION-TEMPLATES.md`.
|
|
5
|
+
*/
|
|
6
|
+
export type { ConfigurableMotionTemplate, ConfigurableMotionControl, MotionContract, MotionTemplate, MotionTheme, MotionFormat, MotionSequence, SlotSpec, ChoiceSpec, ThemeTokenSpec, SceneTimeline, Track, Keyframe, Easing, AnimatedProperty } from './types';
|
|
7
|
+
export { MOTION_TEMPLATES, CONFIGURABLE_MOTION_TEMPLATES, heyTemplate, wordMotion, replication2, promoProductShowcase, paperFoldPromo } from './templates';
|
|
8
|
+
export { mountMotion, installMotionStyles, MotionContentValidationError, type MotionController, type MountOptions } from './player';
|
|
9
|
+
export { validateMotionContent, countWords, type MotionContentError } from './validate';
|
|
10
|
+
export { createSampler, durationFor, activeScenes, sceneAt, themeVariables, valueAt, playlist, itemScene, formatFor, type Sampler, type TargetStyle, type PlayedScene } from './sample';
|
|
11
|
+
export { fitScale } from './fit';
|
|
12
|
+
export { ease } from './easing';
|
|
13
|
+
export {
|
|
14
|
+
MOTION_REQUEST_SCHEMA, NOT_CONFIGURABLE, listMotionTemplates, describeMotionTemplate, getMotionTemplate,
|
|
15
|
+
validateMotionRequest, motionPreviewUrl, motionOutputFormats, decodeMotionPreview, getConfigurableMotionTemplate, configurableOutputFormats, type MotionRequest,
|
|
16
|
+
} from './agent';
|
|
17
|
+
export { MotionPlayer, type MotionPlayerProps } from './MotionPlayer';
|
|
18
|
+
export * as Replication2 from './replication2';
|
|
19
|
+
export { Replication2Player, type Replication2PlayerProps } from './replication2/Replication2Player';
|
|
20
|
+
export * as PromoShowcase from './promo';
|
|
21
|
+
export { PromoShowcasePlayer, type PromoShowcasePlayerProps } from './promo/PromoShowcasePlayer';
|
|
22
|
+
export * as PaperFold from './paperfold';
|
|
23
|
+
export { PaperFoldPlayer, type PaperFoldPlayerProps } from './paperfold/PaperFoldPlayer';
|
|
24
|
+
export * as CatRig from './cat';
|
|
25
|
+
export { Cat, CatPlayer, type CatProps, type CatPlayerProps } from './cat/Cat';
|
|
26
|
+
export * as Neon from './neon';
|
|
27
|
+
export { NeonText, NeonTextFrame, NeonCanvas, type NeonTextProps, type NeonTextFrameProps, type NeonTextConfig, type NeonTextConfigInput, type NeonCanvasProps, type NeonScene } from './neon';
|
|
28
|
+
export * as TypeSurface from './typesurface';
|
|
29
|
+
export { TypeSurfaceCanvas, type TypeSurfaceCanvasProps, type TypeSurfaceConfig } from './typesurface';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ReactNode, Ref, SVGProps } from 'react';
|
|
2
|
+
import type { NeonTypography } from './config';
|
|
3
|
+
import type { NeonFrame } from './frame';
|
|
4
|
+
import { NeonLayers } from './layers';
|
|
5
|
+
import type { NeonMaterial } from './material';
|
|
6
|
+
import type { NeonLayout } from './typography';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* **The glow renderer: layout + material + frame → one SVG** for a single text sign. The letters
|
|
10
|
+
* are defined ONCE, as a live `<text>` in `<defs>`, and `NeonLayers` paints the five light layers
|
|
11
|
+
* from it. So the words, the font and the material never meet except here, and this file never
|
|
12
|
+
* mentions a word. `NeonCanvas` uses the same `NeonTextGlyphs` + `NeonLayers` for its text elements.
|
|
13
|
+
*/
|
|
14
|
+
export type GlowRendererProps = Omit<SVGProps<SVGSVGElement>, 'children' | 'viewBox' | 'ref'> & {
|
|
15
|
+
svgRef?: Ref<SVGSVGElement>;
|
|
16
|
+
text: string;
|
|
17
|
+
layout: NeonLayout;
|
|
18
|
+
typography: NeonTypography;
|
|
19
|
+
material: NeonMaterial;
|
|
20
|
+
frame: NeonFrame;
|
|
21
|
+
background: string | null;
|
|
22
|
+
/** Prepended to every id, so several signs can share a page. */
|
|
23
|
+
idPrefix: string;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const r3 = (v: number) => Math.round(v * 1000) / 1000;
|
|
28
|
+
|
|
29
|
+
/** The rows as one `<text>`, for `<use>`. SVG adds letter-spacing after the last letter too, so the anchor shifts back. */
|
|
30
|
+
export function NeonTextGlyphs({ id, layout, typography: t }: { id: string; layout: NeonLayout; typography: NeonTypography }) {
|
|
31
|
+
const lsFix = layout.textAnchor === 'middle' ? t.letterSpacing / 2 : layout.textAnchor === 'end' ? t.letterSpacing : 0;
|
|
32
|
+
return (
|
|
33
|
+
<text
|
|
34
|
+
id={id}
|
|
35
|
+
fontFamily={t.fontFamily}
|
|
36
|
+
fontSize={t.fontSize}
|
|
37
|
+
fontWeight={t.fontWeight}
|
|
38
|
+
fontStyle={t.fontStyle}
|
|
39
|
+
letterSpacing={t.letterSpacing}
|
|
40
|
+
textAnchor={layout.textAnchor}
|
|
41
|
+
style={{ whiteSpace: 'pre' }}
|
|
42
|
+
>
|
|
43
|
+
{layout.rows.map((row, i) => (
|
|
44
|
+
<tspan key={i} x={r3(layout.anchorX + lsFix)} y={r3(row.y)}>{row.text}</tspan>
|
|
45
|
+
))}
|
|
46
|
+
</text>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function GlowRenderer({ text, layout, typography: t, material: m, frame, background, idPrefix: p, children, svgRef, ...svg }: GlowRendererProps) {
|
|
51
|
+
const vb = layout.viewBox;
|
|
52
|
+
return (
|
|
53
|
+
<svg
|
|
54
|
+
ref={svgRef}
|
|
55
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
56
|
+
viewBox={`${r3(vb.x)} ${r3(vb.y)} ${r3(vb.width)} ${r3(vb.height)}`}
|
|
57
|
+
width={Math.round(vb.width)}
|
|
58
|
+
height={Math.round(vb.height)}
|
|
59
|
+
role="img"
|
|
60
|
+
aria-label={text}
|
|
61
|
+
data-neon-event={frame.levels.event ?? undefined}
|
|
62
|
+
data-neon-glitch={frame.glitch ? 'on' : undefined}
|
|
63
|
+
{...svg}
|
|
64
|
+
>
|
|
65
|
+
<title>{text}</title>
|
|
66
|
+
<defs>
|
|
67
|
+
<NeonTextGlyphs id={`${p}neon-glyphs`} layout={layout} typography={t} />
|
|
68
|
+
</defs>
|
|
69
|
+
{background ? <rect data-layer="background" x={r3(vb.x)} y={r3(vb.y)} width={r3(vb.width)} height={r3(vb.height)} fill={background} /> : null}
|
|
70
|
+
<NeonLayers
|
|
71
|
+
source={{ kind: 'vector', href: `${p}neon-glyphs`, filled: m.filled }}
|
|
72
|
+
material={m}
|
|
73
|
+
levels={frame.levels}
|
|
74
|
+
glitch={frame.glitch}
|
|
75
|
+
box={layout.box}
|
|
76
|
+
em={t.fontSize}
|
|
77
|
+
pad={layout.pad}
|
|
78
|
+
idPrefix={`${p}neon-`}
|
|
79
|
+
/>
|
|
80
|
+
{children}
|
|
81
|
+
</svg>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { ReactNode, Ref, SVGProps } from 'react';
|
|
2
|
+
import { mixHex } from './config';
|
|
3
|
+
import { neonFrame, type NeonFrame } from './frame';
|
|
4
|
+
import { NeonTextGlyphs } from './GlowRenderer';
|
|
5
|
+
import { NeonLayers, type NeonSource } from './layers';
|
|
6
|
+
import { resolveMaterial } from './material';
|
|
7
|
+
import { elementGeometry, elementTriggers, sanitizeNeonScene, type NeonElement, type NeonElementGeometry, type NeonScene, type NeonSceneInput, type SceneTrigger } from './scene';
|
|
8
|
+
import type { TextMeasurer } from './typography';
|
|
9
|
+
import { neonWallMaskSvg, neonWallSvg, svgDataUrl, type NeonWallConfig } from './wall';
|
|
10
|
+
import type { SvgNode } from './artwork';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* **The neon canvas: a whole scene at one moment.** Wall, light spill and every element, in one
|
|
14
|
+
* SVG. Pure (no hooks, no clock): `timeMs` and `triggers` decide every flicker and glitch, so a
|
|
15
|
+
* timeline can scrub it and Remotion can render it.
|
|
16
|
+
*
|
|
17
|
+
* Paint order, back to front:
|
|
18
|
+
* 1 wall the procedural bricks, drawn once as an image (static; never re-rasterised)
|
|
19
|
+
* 2 spill each element's light on the wall: a soft coloured pool around it, scaled by that
|
|
20
|
+
* element's live bloom level, masked by the wall's albedo so it lands on brick
|
|
21
|
+
* faces more than in the joints, blended with `screen`. It flickers, darkens in a
|
|
22
|
+
* failure and comes back on the re-strike, with the sign.
|
|
23
|
+
* 3 shadows every element's cast shadow, above the light it blocks
|
|
24
|
+
* 4 elements bloom → glow → tube → core for each element (`NeonLayers`)
|
|
25
|
+
*/
|
|
26
|
+
export type NeonCanvasProps = Omit<SVGProps<SVGSVGElement>, 'children' | 'viewBox' | 'ref'> & {
|
|
27
|
+
scene: NeonSceneInput | NeonScene;
|
|
28
|
+
timeMs?: number;
|
|
29
|
+
triggers?: readonly SceneTrigger[];
|
|
30
|
+
measure?: TextMeasurer;
|
|
31
|
+
idPrefix?: string;
|
|
32
|
+
svgRef?: Ref<SVGSVGElement>;
|
|
33
|
+
/** Drawn over the scene, in stage units (selection handles). */
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const r3 = (v: number) => Math.round(v * 1000) / 1000;
|
|
38
|
+
|
|
39
|
+
/* The wall is a few hundred bricks and a noise filter: build its image once per look and size. */
|
|
40
|
+
const wallCache = new Map<string, { wall: string; mask: string }>();
|
|
41
|
+
export function neonWallImages(wall: NeonWallConfig, width: number, height: number) {
|
|
42
|
+
const key = JSON.stringify([wall, width, height]);
|
|
43
|
+
let hit = wallCache.get(key);
|
|
44
|
+
if (!hit) {
|
|
45
|
+
hit = { wall: svgDataUrl(neonWallSvg(wall, width, height)), mask: svgDataUrl(neonWallMaskSvg(wall, width, height)) };
|
|
46
|
+
if (wallCache.size > 24) wallCache.delete(wallCache.keys().next().value!);
|
|
47
|
+
wallCache.set(key, hit);
|
|
48
|
+
}
|
|
49
|
+
return hit;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SvgTree({ nodes }: { nodes: SvgNode[] }) {
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
{nodes.map((n, i) => {
|
|
56
|
+
const { tag: Tag, attrs, children } = n;
|
|
57
|
+
const props: Record<string, string> = {};
|
|
58
|
+
for (const [k, v] of Object.entries(attrs)) props[k === 'fill-rule' ? 'fillRule' : k] = v;
|
|
59
|
+
return children.length ? <Tag key={i} {...props}><SvgTree nodes={children} /></Tag> : <Tag key={i} {...props} />;
|
|
60
|
+
})}
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Each element's resting state + live frame: everything the painter and the wall light need. */
|
|
66
|
+
export type NeonElementState = { element: NeonElement; geometry: NeonElementGeometry; frame: NeonFrame };
|
|
67
|
+
export function neonSceneState(scene: NeonScene, timeMs: number, triggers?: readonly SceneTrigger[], measure?: TextMeasurer): NeonElementState[] {
|
|
68
|
+
return scene.elements.filter((e) => e.visible).map((element) => ({
|
|
69
|
+
element,
|
|
70
|
+
geometry: elementGeometry(element, measure),
|
|
71
|
+
frame: neonFrame(element, timeMs, elementTriggers(triggers, element.id)),
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function NeonCanvas({ scene: input, timeMs = 0, triggers, measure, idPrefix = 'nc-', svgRef, children, ...svg }: NeonCanvasProps) {
|
|
76
|
+
const { scene, errors } = sanitizeNeonScene(input);
|
|
77
|
+
const triggersAll = [...(scene.timeline.triggers ?? []), ...(triggers ?? [])];
|
|
78
|
+
const W = scene.stage.width;
|
|
79
|
+
const H = scene.stage.height;
|
|
80
|
+
const states = neonSceneState(scene, timeMs, triggersAll, measure);
|
|
81
|
+
const wall = scene.wall.enabled ? neonWallImages(scene.wall, W, H) : null;
|
|
82
|
+
const p = idPrefix;
|
|
83
|
+
const label = scene.elements.filter((e) => e.visible).map((e) => (e.type === 'text' ? e.text : e.type === 'emoji' ? e.emoji : 'artwork')).join(' ');
|
|
84
|
+
|
|
85
|
+
const defs: ReactNode[] = [];
|
|
86
|
+
const shadows: ReactNode[] = [];
|
|
87
|
+
const lights: ReactNode[] = [];
|
|
88
|
+
const spill: ReactNode[] = [];
|
|
89
|
+
|
|
90
|
+
states.forEach(({ element: el, geometry: g, frame }, i) => {
|
|
91
|
+
const ep = `${p}e${i}-`;
|
|
92
|
+
const shapeId = `${ep}shape`;
|
|
93
|
+
const material = resolveMaterial(g.neon, g.metrics);
|
|
94
|
+
let source: NeonSource | null = null;
|
|
95
|
+
if (g.shape.kind === 'text') {
|
|
96
|
+
defs.push(<NeonTextGlyphs key={shapeId} id={shapeId} layout={g.shape.layout} typography={g.shape.typography} />);
|
|
97
|
+
source = { kind: 'vector', href: shapeId, filled: material.filled };
|
|
98
|
+
} else if (g.shape.kind === 'svg') {
|
|
99
|
+
defs.push(<g key={shapeId} id={shapeId}><SvgTree nodes={g.shape.art.nodes} /></g>);
|
|
100
|
+
source = { kind: 'vector', href: shapeId, filled: material.filled };
|
|
101
|
+
} else if (g.shape.kind === 'raster') {
|
|
102
|
+
defs.push(<image key={shapeId} id={shapeId} href={g.shape.src} x={0} y={0} width={g.shape.width} height={g.shape.height} preserveAspectRatio="none" />);
|
|
103
|
+
source = { kind: 'raster', href: shapeId, width: g.shape.width, height: g.shape.height, mode: g.shape.mode, threshold: g.shape.threshold, filled: material.filled };
|
|
104
|
+
}
|
|
105
|
+
if (!source) return;
|
|
106
|
+
const common = { source, material, levels: frame.levels, glitch: frame.glitch, box: g.box, em: g.em, pad: g.pad };
|
|
107
|
+
shadows.push(
|
|
108
|
+
<g key={`s${i}`} transform={g.transform} opacity={r3(el.opacity)} data-element={el.id} data-part="shadow">
|
|
109
|
+
<NeonLayers {...common} idPrefix={`${ep}s-`} part="shadow" />
|
|
110
|
+
</g>,
|
|
111
|
+
);
|
|
112
|
+
lights.push(
|
|
113
|
+
<g key={`l${i}`} transform={g.transform} opacity={r3(el.opacity)} data-element={el.id} data-element-type={el.type} data-neon-event={frame.levels.event ?? undefined} data-neon-glitch={frame.glitch ? 'on' : undefined}>
|
|
114
|
+
<NeonLayers {...common} idPrefix={ep} part="light" />
|
|
115
|
+
{/* The whole box answers the pointer, not just the thin tube: grab a letter anywhere. */}
|
|
116
|
+
<rect data-hit={el.id} x={r3(g.box.x)} y={r3(g.box.y)} width={r3(g.box.width)} height={r3(g.box.height)} fill="transparent" pointerEvents="all" />
|
|
117
|
+
</g>,
|
|
118
|
+
);
|
|
119
|
+
/* The wall light: a pool of the element's colour, as wide as the element plus the spill radius. */
|
|
120
|
+
const strength = scene.wall.lightSpill * Math.min(1.5, el.neon.intensity) * el.opacity * frame.levels.bloom * (scene.wall.glitchAffectsWall && frame.glitch ? frame.glitch.keep : 1);
|
|
121
|
+
if (scene.wall.enabled && strength > 0.002) {
|
|
122
|
+
const b = g.bounds;
|
|
123
|
+
const R = Math.max(0, scene.wall.spillRadius);
|
|
124
|
+
const color = mixHex(el.neon.bloomColor ?? el.neon.color, el.neon.glowColor ?? el.neon.color, 0.45);
|
|
125
|
+
const gid = `${ep}spill`;
|
|
126
|
+
const jolt = scene.wall.glitchAffectsWall && frame.glitch ? frame.glitch.glowShiftX * g.em / g.unit * el.scale : 0;
|
|
127
|
+
defs.push(
|
|
128
|
+
<radialGradient key={gid} id={gid}>
|
|
129
|
+
<stop offset="0" stopColor={color} stopOpacity={0.95} />
|
|
130
|
+
<stop offset="0.4" stopColor={color} stopOpacity={0.5} />
|
|
131
|
+
<stop offset="0.75" stopColor={color} stopOpacity={0.14} />
|
|
132
|
+
<stop offset="1" stopColor={color} stopOpacity={0} />
|
|
133
|
+
</radialGradient>,
|
|
134
|
+
);
|
|
135
|
+
const cx = r3(b.x + b.width / 2 + jolt);
|
|
136
|
+
const cy = r3(b.y + b.height / 2);
|
|
137
|
+
/* A wide pool that reaches `spillRadius`, and a hot one hugging the element. */
|
|
138
|
+
spill.push(
|
|
139
|
+
<g key={gid} data-spill={el.id}>
|
|
140
|
+
<ellipse cx={cx} cy={cy} rx={r3(b.width / 2 + R)} ry={r3(b.height / 2 + R * 0.85)} fill={`url(#${gid})`} opacity={r3(Math.min(1, 0.85 * strength))} />
|
|
141
|
+
<ellipse cx={cx} cy={cy} rx={r3(b.width / 2 + R * 0.3)} ry={r3(b.height / 2 + R * 0.28)} fill={`url(#${gid})`} opacity={r3(Math.min(1, 0.55 * strength))} />
|
|
142
|
+
</g>,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<svg
|
|
149
|
+
ref={svgRef}
|
|
150
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
151
|
+
viewBox={`0 0 ${W} ${H}`}
|
|
152
|
+
width={W}
|
|
153
|
+
height={H}
|
|
154
|
+
role="img"
|
|
155
|
+
aria-label={label || 'Neon sign'}
|
|
156
|
+
data-neon-invalid={errors.length ? errors.map((e) => e.path).join(' ') : undefined}
|
|
157
|
+
{...svg}
|
|
158
|
+
>
|
|
159
|
+
<title>{label || 'Neon sign'}</title>
|
|
160
|
+
<defs>
|
|
161
|
+
{defs}
|
|
162
|
+
{wall ? (
|
|
163
|
+
<mask id={`${p}albedo`} maskUnits="userSpaceOnUse" x={0} y={0} width={W} height={H}>
|
|
164
|
+
<image href={wall.mask} x={0} y={0} width={W} height={H} />
|
|
165
|
+
</mask>
|
|
166
|
+
) : null}
|
|
167
|
+
</defs>
|
|
168
|
+
{wall ? <image data-layer="wall" href={wall.wall} x={0} y={0} width={W} height={H} preserveAspectRatio="none" /> : null}
|
|
169
|
+
{spill.length ? <g data-layer="wall-light" mask={`url(#${p}albedo)`} style={{ mixBlendMode: 'screen' }}>{spill}</g> : null}
|
|
170
|
+
<g data-layer="shadows">{shadows}</g>
|
|
171
|
+
<g data-layer="elements">{lights}</g>
|
|
172
|
+
{children}
|
|
173
|
+
</svg>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { resolveNeonConfig, type NeonTypography } from './config';
|
|
5
|
+
import { NeonTextFrame, type NeonTextFrameProps } from './NeonTextFrame';
|
|
6
|
+
import { estimateTextWidth, fontShorthand, type TextMeasurer } from './typography';
|
|
7
|
+
|
|
8
|
+
export type NeonTextProps = Omit<NeonTextFrameProps, 'timeMs' | 'measure'> & {
|
|
9
|
+
/** Hold the current frame. */
|
|
10
|
+
paused?: boolean;
|
|
11
|
+
/** Drive the clock yourself (ms); the component then never runs its own. */
|
|
12
|
+
timeMs?: number;
|
|
13
|
+
/** Keep the sign steady for people who ask for reduced motion (default true). */
|
|
14
|
+
respectReducedMotion?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** A canvas-backed measurer; falls back to the estimate if canvas text isn't available. Browser only. */
|
|
18
|
+
export function createCanvasMeasurer(): TextMeasurer {
|
|
19
|
+
let ctx: CanvasRenderingContext2D | null = null;
|
|
20
|
+
try { ctx = document.createElement('canvas').getContext('2d'); } catch { ctx = null; }
|
|
21
|
+
const cache = new Map<string, number>();
|
|
22
|
+
return (text: string, t: NeonTypography) => {
|
|
23
|
+
if (!ctx) return estimateTextWidth(text, t);
|
|
24
|
+
const key = `${fontShorthand(t)}|${text}`;
|
|
25
|
+
const hit = cache.get(key);
|
|
26
|
+
if (hit !== undefined) return hit;
|
|
27
|
+
ctx.font = fontShorthand(t);
|
|
28
|
+
const w = ctx.measureText(text).width;
|
|
29
|
+
const value = Number.isFinite(w) && w > 0 ? w : estimateTextWidth(text, t);
|
|
30
|
+
cache.set(key, value);
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* **A live neon sign.** Everything is data: change `text`, the font, the colours or the animation
|
|
37
|
+
* props (or pass one `config` object) and the same renderer draws it.
|
|
38
|
+
*
|
|
39
|
+
* <NeonText text="OPEN" fontFamily="Oswald" fontSize={220} neonColor="#FF3B4D"
|
|
40
|
+
* glowIntensity={1} flickerIntensity={0.15} glitchIntensity={0.1} />
|
|
41
|
+
* <NeonText config={neonConfig} />
|
|
42
|
+
*
|
|
43
|
+
* The clock runs only while the sign is on screen, animation is on and motion isn't reduced. Row
|
|
44
|
+
* widths are measured with a canvas once fonts load; the first paint (and a server render) uses an
|
|
45
|
+
* estimate, so server and client HTML match.
|
|
46
|
+
*/
|
|
47
|
+
export function NeonText({ paused = false, timeMs: controlledTime, respectReducedMotion = true, idPrefix, ...props }: NeonTextProps) {
|
|
48
|
+
const autoId = useId().replace(/[^a-zA-Z0-9_-]/g, '');
|
|
49
|
+
const prefix = idPrefix ?? `n${autoId}-`;
|
|
50
|
+
const [time, setTime] = useState(0);
|
|
51
|
+
const [measure, setMeasure] = useState<TextMeasurer | undefined>(undefined);
|
|
52
|
+
const [reduced, setReduced] = useState(false);
|
|
53
|
+
const [visible, setVisible] = useState(true);
|
|
54
|
+
const ref = useRef<SVGSVGElement>(null);
|
|
55
|
+
|
|
56
|
+
const animated = useMemo(() => resolveNeonConfig(props.config, { animated: props.animated }).animation.enabled, [props.config, props.animated]);
|
|
57
|
+
const fontKey = `${props.config?.typography?.fontFamily ?? ''}|${props.fontFamily ?? ''}|${props.fontWeight ?? props.config?.typography?.fontWeight ?? ''}|${props.fontStyle ?? props.config?.typography?.fontStyle ?? ''}`;
|
|
58
|
+
|
|
59
|
+
/* Measure with a canvas once fonts are ready, and again whenever a font finishes loading. */
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
let live = true;
|
|
62
|
+
const refresh = () => { if (live) setMeasure(() => createCanvasMeasurer()); };
|
|
63
|
+
refresh();
|
|
64
|
+
const fonts = typeof document !== 'undefined' ? document.fonts : undefined;
|
|
65
|
+
fonts?.ready.then(refresh).catch(() => undefined);
|
|
66
|
+
fonts?.addEventListener?.('loadingdone', refresh);
|
|
67
|
+
return () => { live = false; fonts?.removeEventListener?.('loadingdone', refresh); };
|
|
68
|
+
}, [fontKey]);
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!respectReducedMotion || typeof matchMedia !== 'function') return;
|
|
72
|
+
const q = matchMedia('(prefers-reduced-motion: reduce)');
|
|
73
|
+
const on = () => setReduced(q.matches);
|
|
74
|
+
on();
|
|
75
|
+
q.addEventListener?.('change', on);
|
|
76
|
+
return () => q.removeEventListener?.('change', on);
|
|
77
|
+
}, [respectReducedMotion]);
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const el = ref.current;
|
|
81
|
+
if (!el || typeof IntersectionObserver !== 'function') return;
|
|
82
|
+
const io = new IntersectionObserver((entries) => setVisible(entries.some((e) => e.isIntersecting)));
|
|
83
|
+
io.observe(el);
|
|
84
|
+
return () => io.disconnect();
|
|
85
|
+
}, []);
|
|
86
|
+
|
|
87
|
+
const running = controlledTime === undefined && animated && !paused && !reduced && visible;
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (!running || typeof requestAnimationFrame !== 'function') return;
|
|
90
|
+
let raf = 0;
|
|
91
|
+
let last: number | null = null;
|
|
92
|
+
const tick = (now: number) => {
|
|
93
|
+
/* A backgrounded tab resumes with a huge gap: step at most 100 ms so nothing jumps. */
|
|
94
|
+
if (last !== null) { const dt = now - last; if (dt > 0) setTime((v) => v + Math.min(dt, 100)); }
|
|
95
|
+
last = now;
|
|
96
|
+
raf = requestAnimationFrame(tick);
|
|
97
|
+
};
|
|
98
|
+
raf = requestAnimationFrame(tick);
|
|
99
|
+
return () => cancelAnimationFrame(raf);
|
|
100
|
+
}, [running]);
|
|
101
|
+
|
|
102
|
+
const steady = reduced && controlledTime === undefined;
|
|
103
|
+
return (
|
|
104
|
+
<NeonTextFrame
|
|
105
|
+
{...props}
|
|
106
|
+
animated={steady ? false : props.animated}
|
|
107
|
+
svgRef={ref}
|
|
108
|
+
idPrefix={prefix}
|
|
109
|
+
timeMs={controlledTime ?? time}
|
|
110
|
+
measure={measure}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ReactNode, Ref, SVGProps } from 'react';
|
|
2
|
+
import { resolveNeonConfig, sanitizeNeonConfig, type NeonTextConfigInput, type NeonTextShorthand } from './config';
|
|
3
|
+
import { neonFrame } from './frame';
|
|
4
|
+
import { GlowRenderer } from './GlowRenderer';
|
|
5
|
+
import { materialPad, resolveMaterial } from './material';
|
|
6
|
+
import { layoutText, type TextMeasurer } from './typography';
|
|
7
|
+
|
|
8
|
+
export type NeonTextFrameProps = NeonTextShorthand & Omit<SVGProps<SVGSVGElement>, 'children' | 'viewBox' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'fontStyle' | 'letterSpacing' | 'strokeWidth' | 'ref'> & {
|
|
9
|
+
/** The root <svg> element. */
|
|
10
|
+
svgRef?: Ref<SVGSVGElement>;
|
|
11
|
+
/** The whole configuration; the shorthand props win over it. */
|
|
12
|
+
config?: NeonTextConfigInput | null;
|
|
13
|
+
/** The clock, in ms. The caller owns time, so a frame is a pure function of it. */
|
|
14
|
+
timeMs?: number;
|
|
15
|
+
/** Row widths; the browser player passes a canvas measurer, otherwise an estimate is used. */
|
|
16
|
+
measure?: TextMeasurer;
|
|
17
|
+
/** Prepended to every element id, so several signs can share a page. */
|
|
18
|
+
idPrefix?: string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* **One still frame of a neon sign.** No hooks and no clock: `timeMs` decides the flicker and the
|
|
24
|
+
* glitch, so the same props always draw the same picture — what Remotion and a server render need.
|
|
25
|
+
* `<NeonText>` is this plus a clock.
|
|
26
|
+
*
|
|
27
|
+
* NeonText → Typography (layoutText) → NeonMaterial (resolveMaterial) → FlickerController +
|
|
28
|
+
* GlitchController (neonFrame) → GlowRenderer
|
|
29
|
+
*
|
|
30
|
+
* A config with bad values still draws: each bad field falls back to its default, and the SVG says
|
|
31
|
+
* so in `data-neon-invalid` (the list is `validateNeonConfig`'s).
|
|
32
|
+
*/
|
|
33
|
+
export function NeonTextFrame(props: NeonTextFrameProps) {
|
|
34
|
+
const {
|
|
35
|
+
config: input, timeMs = 0, measure, idPrefix = '', children,
|
|
36
|
+
text, fontFamily, fontSize, fontWeight, fontStyle, letterSpacing, lineHeight, strokeWidth, construction, align,
|
|
37
|
+
neonColor, tubeColor, coreColor, glowColor, bloomColor, glowIntensity, glowRadius, bloomRadius, shadow,
|
|
38
|
+
animated, animationSpeed, seed, flicker, flickerIntensity, flickerFrequency, flickerSpeed,
|
|
39
|
+
glitch, glitchIntensity, glitchFrequency, glitchDuration, background,
|
|
40
|
+
...svg
|
|
41
|
+
} = props;
|
|
42
|
+
const resolved = resolveNeonConfig(input, {
|
|
43
|
+
text, fontFamily, fontSize, fontWeight, fontStyle, letterSpacing, lineHeight, strokeWidth, construction, align,
|
|
44
|
+
neonColor, tubeColor, coreColor, glowColor, bloomColor, glowIntensity, glowRadius, bloomRadius, shadow,
|
|
45
|
+
animated, animationSpeed, seed, flicker, flickerIntensity, flickerFrequency, flickerSpeed,
|
|
46
|
+
glitch, glitchIntensity, glitchFrequency, glitchDuration, background,
|
|
47
|
+
});
|
|
48
|
+
const { config, errors } = sanitizeNeonConfig(resolved);
|
|
49
|
+
const layout = layoutText(config.text, config.typography, materialPad(config.neon, config.typography), measure);
|
|
50
|
+
const material = resolveMaterial(config.neon, config.typography);
|
|
51
|
+
const frame = neonFrame(config, timeMs);
|
|
52
|
+
return (
|
|
53
|
+
<GlowRenderer
|
|
54
|
+
text={config.text}
|
|
55
|
+
layout={layout}
|
|
56
|
+
typography={config.typography}
|
|
57
|
+
material={material}
|
|
58
|
+
frame={frame}
|
|
59
|
+
background={config.background}
|
|
60
|
+
idPrefix={idPrefix}
|
|
61
|
+
data-neon-invalid={errors.length ? errors.map((e) => e.path).join(' ') : undefined}
|
|
62
|
+
{...svg}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</GlowRenderer>
|
|
66
|
+
);
|
|
67
|
+
}
|