@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,610 @@
|
|
|
1
|
+
/* eslint-disable comppack/no-raw-colour -- neon colours are scene content (presets and named colours), not theme colours. */
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_NEON_CONFIG, NEON_COLOR_PRESETS, deriveNeonPalette, isHexColor, validateNeonConfig, getPath, setPath,
|
|
4
|
+
type NeonAnimationConfig, type NeonConfigError, type NeonConstruction, type NeonMaterialConfig, type NeonTypography, type DeepPartial,
|
|
5
|
+
} from './config';
|
|
6
|
+
import { flickerCuesBetween, type FlickerKind, type NeonTrigger } from './flicker';
|
|
7
|
+
import { glitchCuesBetween } from './glitch';
|
|
8
|
+
import { NEON_ARTWORK_LIBRARY, parseSvgArtwork, type ParsedSvg } from './artwork';
|
|
9
|
+
import { NEON_EMOJI_FONT, NEON_FONTS, findNeonFont } from './fonts';
|
|
10
|
+
import { materialPad, type NeonShapeMetrics } from './material';
|
|
11
|
+
import { estimateTextWidth, layoutText, type NeonLayout, type TextMeasurer } from './typography';
|
|
12
|
+
import { DEFAULT_NEON_WALL, type NeonWallConfig } from './wall';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* **A neon scene: several neon elements on a wall, as one JSON document.** Text, emoji and artwork
|
|
16
|
+
* are all `NeonElement`s and share one contract — position, scale, rotation, opacity, a neon
|
|
17
|
+
* material and an animation — so an agent builds "CAFE + ☕ + a pink heart" the same way it builds
|
|
18
|
+
* one word. The scene adds the wall, the sound and a timeline of scripted moments.
|
|
19
|
+
*
|
|
20
|
+
* NeonCanvas
|
|
21
|
+
* ├── elements: NeonText | NeonEmoji | NeonArtwork (each: material + animation)
|
|
22
|
+
* ├── wall: procedural bricks, ambient light, light spill from every element
|
|
23
|
+
* ├── audio: hum, flicker, dip, failure, glitch, recovery
|
|
24
|
+
* └── timeline: duration, loop, triggers (scripted events)
|
|
25
|
+
*/
|
|
26
|
+
export type NeonElementCommon = {
|
|
27
|
+
id: string;
|
|
28
|
+
/** Centre, in stage units. */
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
scale: number;
|
|
32
|
+
/** Degrees, clockwise. */
|
|
33
|
+
rotation: number;
|
|
34
|
+
opacity: number;
|
|
35
|
+
visible: boolean;
|
|
36
|
+
/** Pinned: dragging on a stage never moves it (config and agents still can). */
|
|
37
|
+
locked: boolean;
|
|
38
|
+
neon: NeonMaterialConfig;
|
|
39
|
+
animation: NeonAnimationConfig;
|
|
40
|
+
};
|
|
41
|
+
export type NeonTextElement = NeonElementCommon & { type: 'text'; text: string; typography: NeonTypography };
|
|
42
|
+
export type NeonEmojiElement = NeonElementCommon & {
|
|
43
|
+
type: 'emoji';
|
|
44
|
+
emoji: string;
|
|
45
|
+
/** The glyph's em size, stage units. */
|
|
46
|
+
size: number;
|
|
47
|
+
strokeWidth: number;
|
|
48
|
+
construction: NeonConstruction;
|
|
49
|
+
fontWeight: number;
|
|
50
|
+
/** The outline emoji face (monochrome, vector): Noto Emoji by default. */
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
};
|
|
53
|
+
export type NeonArtworkSource =
|
|
54
|
+
| { kind: 'library'; id: string }
|
|
55
|
+
| { kind: 'svg'; svg: string; name?: string }
|
|
56
|
+
| { kind: 'raster'; src: string; width: number; height: number; mode: 'alpha' | 'luminance'; threshold: number; name?: string };
|
|
57
|
+
export type NeonArtworkElement = NeonElementCommon & {
|
|
58
|
+
type: 'artwork';
|
|
59
|
+
artwork: NeonArtworkSource;
|
|
60
|
+
/** The artwork's longer side, stage units. */
|
|
61
|
+
size: number;
|
|
62
|
+
strokeWidth: number;
|
|
63
|
+
construction: NeonConstruction;
|
|
64
|
+
};
|
|
65
|
+
export type NeonElement = NeonTextElement | NeonEmojiElement | NeonArtworkElement;
|
|
66
|
+
export type NeonElementType = NeonElement['type'];
|
|
67
|
+
|
|
68
|
+
export type NeonAudioConfig = {
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
muted: boolean;
|
|
71
|
+
/** 0…1 each. */
|
|
72
|
+
master: number;
|
|
73
|
+
hum: number;
|
|
74
|
+
flicker: number;
|
|
75
|
+
dip: number;
|
|
76
|
+
failure: number;
|
|
77
|
+
glitch: number;
|
|
78
|
+
recovery: number;
|
|
79
|
+
/** Preview sounds while scrubbing the timeline, throttled. */
|
|
80
|
+
scrub: boolean;
|
|
81
|
+
scrubVolume: number;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type SceneTrigger = NeonTrigger & { /** Only this element (default: all). */ target?: string };
|
|
85
|
+
export type NeonTimeline = { duration: number; loop: boolean; triggers: SceneTrigger[] };
|
|
86
|
+
|
|
87
|
+
export type NeonScene = {
|
|
88
|
+
type: 'neonScene';
|
|
89
|
+
version: 1;
|
|
90
|
+
stage: { width: number; height: number };
|
|
91
|
+
elements: NeonElement[];
|
|
92
|
+
wall: NeonWallConfig;
|
|
93
|
+
audio: NeonAudioConfig;
|
|
94
|
+
timeline: NeonTimeline;
|
|
95
|
+
};
|
|
96
|
+
export type NeonSceneInput = DeepPartial<Omit<NeonScene, 'elements'>> & { elements?: NeonElementInput[] };
|
|
97
|
+
export type NeonElementInput = DeepPartial<Omit<NeonTextElement, 'type'>> & { type?: NeonElementType } & Record<string, unknown>;
|
|
98
|
+
|
|
99
|
+
export const DEFAULT_NEON_AUDIO: NeonAudioConfig = {
|
|
100
|
+
enabled: false, muted: false, master: 0.7, hum: 0.45, flicker: 0.45, dip: 0.55, failure: 0.6, glitch: 0.3, recovery: 0.45, scrub: true, scrubVolume: 0.5,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const common = (id: string, seed: number): NeonElementCommon => ({
|
|
104
|
+
id, x: 800, y: 500, scale: 1, rotation: 0, opacity: 1, visible: true, locked: false,
|
|
105
|
+
neon: { ...DEFAULT_NEON_CONFIG.neon, shadow: { ...DEFAULT_NEON_CONFIG.neon.shadow } },
|
|
106
|
+
animation: { ...DEFAULT_NEON_CONFIG.animation, seed },
|
|
107
|
+
});
|
|
108
|
+
export const DEFAULT_NEON_ELEMENTS: { text: NeonTextElement; emoji: NeonEmojiElement; artwork: NeonArtworkElement } = {
|
|
109
|
+
text: { ...common('text-1', 7356951), type: 'text', text: 'CAFE', typography: { ...DEFAULT_NEON_CONFIG.typography, fontSize: 300, strokeWidth: 10.5, letterSpacing: 6 } },
|
|
110
|
+
emoji: { ...common('emoji-1', 7356952), type: 'emoji', emoji: '☕', size: 240, strokeWidth: 8, construction: 'outline', fontWeight: 500, fontFamily: NEON_EMOJI_FONT.family },
|
|
111
|
+
artwork: { ...common('artwork-1', 7356953), type: 'artwork', artwork: { kind: 'library', id: 'heart' }, size: 260, strokeWidth: 8, construction: 'outline' },
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const DEFAULT_NEON_SCENE: NeonScene = {
|
|
115
|
+
type: 'neonScene',
|
|
116
|
+
version: 1,
|
|
117
|
+
stage: { width: 1600, height: 1000 },
|
|
118
|
+
elements: [DEFAULT_NEON_ELEMENTS.text],
|
|
119
|
+
wall: DEFAULT_NEON_WALL,
|
|
120
|
+
audio: DEFAULT_NEON_AUDIO,
|
|
121
|
+
timeline: { duration: 8000, loop: true, triggers: [] },
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/* ---------- resolving ---------- */
|
|
125
|
+
|
|
126
|
+
const isObj = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
127
|
+
function merge<T>(base: T, over: unknown): T {
|
|
128
|
+
if (!isObj(base) || !isObj(over)) return (over === undefined ? base : over) as T;
|
|
129
|
+
const out: Record<string, unknown> = { ...base };
|
|
130
|
+
for (const [k, v] of Object.entries(over)) {
|
|
131
|
+
if (v === undefined) continue;
|
|
132
|
+
out[k] = isObj(out[k]) && isObj(v) ? merge(out[k], v) : v;
|
|
133
|
+
}
|
|
134
|
+
return out as T;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Re-derives the element's derived colours when only `neon.color` (or `tubeColor`) was given. */
|
|
138
|
+
function withDerivedColours(el: NeonElement, input: unknown): NeonElement {
|
|
139
|
+
const n = isObj(input) && isObj(input.neon) ? input.neon : undefined;
|
|
140
|
+
const primary = n && typeof n.color === 'string' ? n.color : n && typeof n.tubeColor === 'string' ? n.tubeColor : undefined;
|
|
141
|
+
if (!n || !isHexColor(primary)) return el;
|
|
142
|
+
const d = deriveNeonPalette(primary);
|
|
143
|
+
const neon = { ...el.neon, color: primary };
|
|
144
|
+
for (const k of ['coreColor', 'tubeColor', 'glowColor', 'bloomColor'] as const) if (n[k] === undefined) neon[k] = d[k];
|
|
145
|
+
return { ...el, neon };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** One element: its type's defaults ← the input. Colours follow `neon.color` unless given. */
|
|
149
|
+
export function resolveNeonElement(input: unknown, index = 0): NeonElement {
|
|
150
|
+
const type = isObj(input) && (input.type === 'emoji' || input.type === 'artwork') ? input.type : 'text';
|
|
151
|
+
const base = DEFAULT_NEON_ELEMENTS[type];
|
|
152
|
+
const seeded = { ...base, id: `${type}-${index + 1}`, animation: { ...base.animation, seed: base.animation.seed + index * 101 } };
|
|
153
|
+
const el = merge(seeded as NeonElement, isObj(input) ? input : {});
|
|
154
|
+
return withDerivedColours({ ...el, type } as NeonElement, input);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** defaults ← input, element by element. Never throws; `validateNeonScene` says what is wrong. */
|
|
158
|
+
export function resolveNeonScene(input?: NeonSceneInput | null): NeonScene {
|
|
159
|
+
const i = isObj(input) ? input : {};
|
|
160
|
+
const elements = Array.isArray(i.elements) ? i.elements.map((e, n) => resolveNeonElement(e, n)) : DEFAULT_NEON_SCENE.elements;
|
|
161
|
+
return {
|
|
162
|
+
...DEFAULT_NEON_SCENE,
|
|
163
|
+
stage: merge(DEFAULT_NEON_SCENE.stage, i.stage),
|
|
164
|
+
wall: merge(DEFAULT_NEON_SCENE.wall, i.wall),
|
|
165
|
+
audio: merge(DEFAULT_NEON_SCENE.audio, i.audio),
|
|
166
|
+
timeline: merge(DEFAULT_NEON_SCENE.timeline, i.timeline),
|
|
167
|
+
elements,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* ---------- validation: never throws ---------- */
|
|
172
|
+
|
|
173
|
+
const num = (v: unknown, min: number, max: number) => typeof v === 'number' && Number.isFinite(v) && v >= min && v <= max;
|
|
174
|
+
const WALL_RANGES: [keyof NeonWallConfig, number, number][] = [
|
|
175
|
+
['brickWidth', 20, 1000], ['brickHeight', 10, 500], ['mortar', 0, 40], ['variation', 0, 1], ['texture', 0, 1], ['ambient', 0, 1],
|
|
176
|
+
['vignette', 0, 1], ['lightSpill', 0, 2], ['spillRadius', 0, 2000], ['seed', 0, 4294967295],
|
|
177
|
+
];
|
|
178
|
+
const AUDIO_KEYS = ['master', 'hum', 'flicker', 'dip', 'failure', 'glitch', 'recovery', 'scrubVolume'] as const;
|
|
179
|
+
|
|
180
|
+
/** The shape's metrics and layout inputs, for validation and geometry. */
|
|
181
|
+
function textLike(el: NeonTextElement | NeonEmojiElement): { text: string; typography: NeonTypography } {
|
|
182
|
+
if (el.type === 'text') return { text: el.text, typography: el.typography };
|
|
183
|
+
return {
|
|
184
|
+
text: emojiText(el.emoji),
|
|
185
|
+
typography: { fontFamily: el.fontFamily, fontSize: el.size, fontWeight: el.fontWeight, fontStyle: 'normal', letterSpacing: 0, lineHeight: 1, strokeWidth: el.strokeWidth, construction: el.construction, align: 'middle' },
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Text presentation for an emoji: the outline face draws it, not a colour bitmap. */
|
|
190
|
+
export const emojiText = (e: string) => `${String(e ?? '').replace(/️/g, '')}︎`;
|
|
191
|
+
|
|
192
|
+
export function validateNeonElement(el: unknown, at = ''): NeonConfigError[] {
|
|
193
|
+
if (!isObj(el)) return [{ path: at, message: 'An element must be an object.' }];
|
|
194
|
+
const errors: NeonConfigError[] = [];
|
|
195
|
+
const p = (k: string) => (at ? `${at}.${k}` : k);
|
|
196
|
+
if (!['text', 'emoji', 'artwork'].includes(el.type as string)) errors.push({ path: p('type'), message: 'Must be text, emoji or artwork.' });
|
|
197
|
+
if (typeof el.id !== 'string' || !el.id) errors.push({ path: p('id'), message: 'Must be a non-empty id.' });
|
|
198
|
+
for (const [k, lo, hi] of [['x', -5000, 10000], ['y', -5000, 10000], ['scale', 0.01, 20], ['rotation', -360, 360], ['opacity', 0, 1]] as const) {
|
|
199
|
+
if (!num(el[k], lo, hi)) errors.push({ path: p(k), message: `Must be a number between ${lo} and ${hi}.` });
|
|
200
|
+
}
|
|
201
|
+
if (typeof el.visible !== 'boolean') errors.push({ path: p('visible'), message: 'Must be true or false.' });
|
|
202
|
+
if (typeof el.locked !== 'boolean') errors.push({ path: p('locked'), message: 'Must be true or false.' });
|
|
203
|
+
/* Material and animation: the same rules as a single sign. */
|
|
204
|
+
const asText = { ...DEFAULT_NEON_CONFIG, neon: el.neon, animation: el.animation };
|
|
205
|
+
for (const e of validateNeonConfig(asText)) if (e.path.startsWith('neon') || e.path.startsWith('animation')) errors.push({ path: p(e.path), message: e.message });
|
|
206
|
+
if (el.type === 'text') {
|
|
207
|
+
for (const e of validateNeonConfig({ ...DEFAULT_NEON_CONFIG, text: el.text, typography: el.typography })) if (e.path === 'text' || e.path.startsWith('typography')) errors.push({ path: p(e.path), message: e.message });
|
|
208
|
+
} else if (el.type === 'emoji' || el.type === 'artwork') {
|
|
209
|
+
if (!num(el.size, 8, 2000)) errors.push({ path: p('size'), message: 'Must be a number between 8 and 2000.' });
|
|
210
|
+
if (!num(el.strokeWidth, 0.5, 80)) errors.push({ path: p('strokeWidth'), message: 'Must be a number between 0.5 and 80.' });
|
|
211
|
+
if (el.construction !== 'outline' && el.construction !== 'monoline') errors.push({ path: p('construction'), message: 'Must be outline or monoline.' });
|
|
212
|
+
if (el.type === 'emoji') {
|
|
213
|
+
if (typeof el.emoji !== 'string' || !el.emoji.trim() || [...el.emoji].length > 12) errors.push({ path: p('emoji'), message: 'Must be one emoji (or a few characters).' });
|
|
214
|
+
if (!num(el.fontWeight, 100, 900)) errors.push({ path: p('fontWeight'), message: 'Must be between 100 and 900.' });
|
|
215
|
+
if (typeof el.fontFamily !== 'string' || !el.fontFamily.trim()) errors.push({ path: p('fontFamily'), message: 'Must be a font-family.' });
|
|
216
|
+
} else {
|
|
217
|
+
const a = el.artwork;
|
|
218
|
+
if (!isObj(a)) errors.push({ path: p('artwork'), message: 'Must be { kind: library | svg | raster, … }.' });
|
|
219
|
+
else if (a.kind === 'library') { if (!NEON_ARTWORK_LIBRARY[a.id as string]) errors.push({ path: p('artwork.id'), message: `Must be one of: ${Object.keys(NEON_ARTWORK_LIBRARY).join(', ')}.` }); }
|
|
220
|
+
else if (a.kind === 'svg') { try { parseSvgArtwork(a.svg as string); } catch (err) { errors.push({ path: p('artwork.svg'), message: (err as Error).message }); } }
|
|
221
|
+
else if (a.kind === 'raster') {
|
|
222
|
+
if (typeof a.src !== 'string' || !/^(data:image\/(png|webp|jpeg|gif);base64,|https?:\/\/|\/)/.test(a.src)) errors.push({ path: p('artwork.src'), message: 'Must be a PNG/WebP data URL or an image URL.' });
|
|
223
|
+
if (!num(a.width, 1, 20000) || !num(a.height, 1, 20000)) errors.push({ path: p('artwork.width'), message: 'Width and height must be the image’s pixel size.' });
|
|
224
|
+
if (a.mode !== 'alpha' && a.mode !== 'luminance') errors.push({ path: p('artwork.mode'), message: 'Must be alpha or luminance.' });
|
|
225
|
+
if (!num(a.threshold, 0, 1)) errors.push({ path: p('artwork.threshold'), message: 'Must be between 0 and 1.' });
|
|
226
|
+
} else errors.push({ path: p('artwork.kind'), message: 'Must be library, svg or raster.' });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return errors;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** `[]` when the scene can be drawn as given; otherwise every problem as `{ path, message }`. */
|
|
233
|
+
export function validateNeonScene(scene: unknown): NeonConfigError[] {
|
|
234
|
+
if (!isObj(scene)) return [{ path: '', message: 'The scene must be an object.' }];
|
|
235
|
+
const errors: NeonConfigError[] = [];
|
|
236
|
+
const st = scene.stage;
|
|
237
|
+
if (!isObj(st) || !num(st.width, 100, 8000) || !num(st.height, 100, 8000)) errors.push({ path: 'stage', message: 'width and height must be 100…8000.' });
|
|
238
|
+
if (!Array.isArray(scene.elements)) errors.push({ path: 'elements', message: 'Must be a list.' });
|
|
239
|
+
else {
|
|
240
|
+
if (scene.elements.length > 40) errors.push({ path: 'elements', message: 'At most 40 elements.' });
|
|
241
|
+
const ids = new Set<string>();
|
|
242
|
+
scene.elements.forEach((el, i) => {
|
|
243
|
+
errors.push(...validateNeonElement(el, `elements.${i}`));
|
|
244
|
+
if (isObj(el) && typeof el.id === 'string') { if (ids.has(el.id)) errors.push({ path: `elements.${i}.id`, message: 'Ids must be unique.' }); ids.add(el.id); }
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
const w = scene.wall;
|
|
248
|
+
if (!isObj(w)) errors.push({ path: 'wall', message: 'Must be an object.' });
|
|
249
|
+
else {
|
|
250
|
+
if (typeof w.enabled !== 'boolean') errors.push({ path: 'wall.enabled', message: 'Must be true or false.' });
|
|
251
|
+
for (const [k, lo, hi] of WALL_RANGES) if (!num(w[k], lo, hi)) errors.push({ path: `wall.${k}`, message: `Must be a number between ${lo} and ${hi}.` });
|
|
252
|
+
for (const k of ['brickColor', 'mortarColor', 'ambientColor'] as const) if (!isHexColor(w[k])) errors.push({ path: `wall.${k}`, message: 'Must be a hex colour.' });
|
|
253
|
+
}
|
|
254
|
+
const a = scene.audio;
|
|
255
|
+
if (!isObj(a)) errors.push({ path: 'audio', message: 'Must be an object.' });
|
|
256
|
+
else {
|
|
257
|
+
for (const k of ['enabled', 'muted', 'scrub'] as const) if (typeof a[k] !== 'boolean') errors.push({ path: `audio.${k}`, message: 'Must be true or false.' });
|
|
258
|
+
for (const k of AUDIO_KEYS) if (!num(a[k], 0, 1)) errors.push({ path: `audio.${k}`, message: 'Must be a number between 0 and 1.' });
|
|
259
|
+
}
|
|
260
|
+
const t = scene.timeline;
|
|
261
|
+
if (!isObj(t) || !num(t.duration, 500, 600_000) || typeof t.loop !== 'boolean' || !Array.isArray(t.triggers)) errors.push({ path: 'timeline', message: 'Needs duration (500…600000 ms), loop and a triggers list.' });
|
|
262
|
+
else t.triggers.forEach((tr, i) => {
|
|
263
|
+
if (!isObj(tr) || !['sag', 'flicker', 'dip', 'failure', 'glitch', 'normal'].includes(tr.kind as string) || !num(tr.at, 0, 600_000)) errors.push({ path: `timeline.triggers.${i}`, message: 'Needs kind (sag, flicker, dip, failure, glitch, normal) and at (ms).' });
|
|
264
|
+
});
|
|
265
|
+
return errors;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** A scene that can always be drawn: each bad field falls back to its default; the problems come back too. */
|
|
269
|
+
export function sanitizeNeonScene(input: unknown): { scene: NeonScene; errors: NeonConfigError[] } {
|
|
270
|
+
const scene = resolveNeonScene(isObj(input) ? (input as NeonSceneInput) : null);
|
|
271
|
+
const errors = validateNeonScene(scene);
|
|
272
|
+
let out: NeonScene = scene;
|
|
273
|
+
for (const e of errors) {
|
|
274
|
+
const m = /^elements\.(\d+)/.exec(e.path);
|
|
275
|
+
if (m) {
|
|
276
|
+
const i = Number(m[1]);
|
|
277
|
+
const el = out.elements[i]!;
|
|
278
|
+
const rest = e.path.slice(m[0].length + 1);
|
|
279
|
+
const def = DEFAULT_NEON_ELEMENTS[(['text', 'emoji', 'artwork'].includes(el?.type) ? el.type : 'text') as NeonElementType];
|
|
280
|
+
const fixed = rest ? setPath(el, rest, getPath(def, rest)) : def;
|
|
281
|
+
out = { ...out, elements: out.elements.map((x, n) => (n === i ? (fixed as NeonElement) : x)) };
|
|
282
|
+
} else if (e.path && e.path !== 'elements') {
|
|
283
|
+
out = setPath(out, e.path, getPath(DEFAULT_NEON_SCENE, e.path));
|
|
284
|
+
} else if (e.path === 'elements') {
|
|
285
|
+
out = { ...out, elements: out.elements.slice(0, 40) };
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (errors.length && validateNeonScene(out).length) out = { ...DEFAULT_NEON_SCENE, elements: out.elements.filter((el) => !validateNeonElement(el).length) };
|
|
289
|
+
return { scene: out, errors };
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* ---------- geometry ---------- */
|
|
293
|
+
|
|
294
|
+
export type NeonElementGeometry = {
|
|
295
|
+
/** What the renderer draws. */
|
|
296
|
+
shape:
|
|
297
|
+
| { kind: 'text'; layout: NeonLayout; typography: NeonTypography; text: string }
|
|
298
|
+
| { kind: 'svg'; art: ParsedSvg }
|
|
299
|
+
| { kind: 'raster'; src: string; width: number; height: number; mode: 'alpha' | 'luminance'; threshold: number }
|
|
300
|
+
| { kind: 'none'; reason: string };
|
|
301
|
+
/** The shape's box in its local units. */
|
|
302
|
+
box: { x: number; y: number; width: number; height: number };
|
|
303
|
+
/** Local units per stage unit (before the element's own `scale`). */
|
|
304
|
+
unit: number;
|
|
305
|
+
/** One em in local units (glitch offsets). */
|
|
306
|
+
em: number;
|
|
307
|
+
/** Material metrics and the neon config, in local units. */
|
|
308
|
+
metrics: NeonShapeMetrics;
|
|
309
|
+
neon: NeonMaterialConfig;
|
|
310
|
+
pad: number;
|
|
311
|
+
/** The SVG transform that places the local shape on the stage. */
|
|
312
|
+
transform: string;
|
|
313
|
+
/** Axis-aligned bounds on the stage (for the wall light, placement and selection). */
|
|
314
|
+
bounds: { x: number; y: number; width: number; height: number };
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const r3 = (v: number) => Math.round(v * 1000) / 1000;
|
|
318
|
+
|
|
319
|
+
/** Scale a material's lengths into local units. */
|
|
320
|
+
function localNeon(neon: NeonMaterialConfig, k: number): NeonMaterialConfig {
|
|
321
|
+
return { ...neon, glowRadius: neon.glowRadius * k, bloomRadius: neon.bloomRadius * k, shadow: { ...neon.shadow, blur: neon.shadow.blur * k } };
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/** Where and how big an element is. `measure` defaults to the width estimate. */
|
|
325
|
+
export function elementGeometry(el: NeonElement, measure: TextMeasurer = estimateTextWidth): NeonElementGeometry {
|
|
326
|
+
let shape: NeonElementGeometry['shape'];
|
|
327
|
+
let box: NeonElementGeometry['box'];
|
|
328
|
+
let unit = 1;
|
|
329
|
+
let em: number;
|
|
330
|
+
let metrics: NeonShapeMetrics;
|
|
331
|
+
if (el.type === 'text' || el.type === 'emoji') {
|
|
332
|
+
const { text, typography } = textLike(el);
|
|
333
|
+
const layout = layoutText(text, typography, 0, el.type === 'emoji' ? (() => typography.fontSize * 1.05) : measure);
|
|
334
|
+
shape = { kind: 'text', layout, typography, text };
|
|
335
|
+
box = layout.box;
|
|
336
|
+
em = typography.fontSize;
|
|
337
|
+
metrics = { fontSize: typography.fontSize, strokeWidth: typography.strokeWidth, construction: typography.construction };
|
|
338
|
+
} else {
|
|
339
|
+
let vb: [number, number, number, number] = [0, 0, 100, 100];
|
|
340
|
+
const a = el.artwork;
|
|
341
|
+
try {
|
|
342
|
+
if (a.kind === 'raster') {
|
|
343
|
+
/* Drawn at its stage size, so the outline filters work at stage resolution, like the vectors' strokes. */
|
|
344
|
+
const w = Math.max(1, el.size);
|
|
345
|
+
const h = (w * a.height) / Math.max(1, a.width);
|
|
346
|
+
vb = [0, 0, a.width >= a.height ? w : (w * a.width) / a.height, a.width >= a.height ? h : w];
|
|
347
|
+
shape = { kind: 'raster', src: a.src, width: vb[2], height: vb[3], mode: a.mode, threshold: a.threshold };
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
const art = parseSvgArtwork(a.kind === 'library' ? (NEON_ARTWORK_LIBRARY[a.id] ?? NEON_ARTWORK_LIBRARY.heart!).svg : a.svg);
|
|
351
|
+
vb = art.viewBox;
|
|
352
|
+
shape = { kind: 'svg', art };
|
|
353
|
+
}
|
|
354
|
+
} catch (err) {
|
|
355
|
+
shape = { kind: 'none', reason: (err as Error).message };
|
|
356
|
+
}
|
|
357
|
+
const side = Math.max(vb[2], vb[3]);
|
|
358
|
+
unit = side / Math.max(1, el.size);
|
|
359
|
+
box = { x: vb[0], y: vb[1], width: vb[2], height: vb[3] };
|
|
360
|
+
em = side;
|
|
361
|
+
metrics = { fontSize: side, strokeWidth: el.strokeWidth * unit, construction: el.construction };
|
|
362
|
+
}
|
|
363
|
+
const neon = unit === 1 ? el.neon : localNeon(el.neon, unit);
|
|
364
|
+
const pad = materialPad(neon, metrics);
|
|
365
|
+
const cx = box.x + box.width / 2;
|
|
366
|
+
const cy = box.y + box.height / 2;
|
|
367
|
+
const s = el.scale / unit;
|
|
368
|
+
const transform = `translate(${r3(el.x)} ${r3(el.y)}) rotate(${r3(el.rotation)}) scale(${r3(s)}) translate(${r3(-cx)} ${r3(-cy)})`;
|
|
369
|
+
/* Rotated box → axis-aligned stage bounds. */
|
|
370
|
+
const hw = (box.width / 2) * s;
|
|
371
|
+
const hh = (box.height / 2) * s;
|
|
372
|
+
const rad = (el.rotation * Math.PI) / 180;
|
|
373
|
+
const bw = Math.abs(hw * Math.cos(rad)) + Math.abs(hh * Math.sin(rad));
|
|
374
|
+
const bh = Math.abs(hw * Math.sin(rad)) + Math.abs(hh * Math.cos(rad));
|
|
375
|
+
return { shape, box, unit, em, metrics, neon, pad, transform, bounds: { x: el.x - bw, y: el.y - bh, width: 2 * bw, height: 2 * bh } };
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/* ---------- sound cues ---------- */
|
|
379
|
+
|
|
380
|
+
export type NeonCueKind = FlickerKind | 'restore' | 'glitch';
|
|
381
|
+
export type NeonCue = { kind: NeonCueKind; at: number; elementId: string; depth: number };
|
|
382
|
+
|
|
383
|
+
/** Triggers that apply to this element, without the target field. */
|
|
384
|
+
export const elementTriggers = (triggers: readonly SceneTrigger[] | undefined, id: string): NeonTrigger[] =>
|
|
385
|
+
(triggers ?? []).filter((t) => !t.target || t.target === id).map(({ kind, at }) => ({ kind, at }));
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* **Sound cues between two clock times**: every flicker event start, every re-strike after a dip or
|
|
389
|
+
* failure, and every glitch start, across visible elements. Elements that share a seed share a
|
|
390
|
+
* circuit, so identical cues within 30 ms are merged.
|
|
391
|
+
*/
|
|
392
|
+
export function neonSceneCues(scene: NeonScene, t0: number, t1: number, triggers?: readonly SceneTrigger[]): NeonCue[] {
|
|
393
|
+
if (!(t1 > t0)) return [];
|
|
394
|
+
const out: NeonCue[] = [];
|
|
395
|
+
for (const el of scene.elements) {
|
|
396
|
+
if (!el.visible || !el.animation.enabled) continue;
|
|
397
|
+
const a = el.animation;
|
|
398
|
+
const sp = Math.max(0, a.speed);
|
|
399
|
+
const fs = Math.max(0.01, a.flickerSpeed);
|
|
400
|
+
const tr = elementTriggers(triggers, el.id);
|
|
401
|
+
if (sp > 0) {
|
|
402
|
+
for (const c of flickerCuesBetween(a, t0 * sp * fs, t1 * sp * fs, tr, (ms) => ms * sp * fs)) out.push({ kind: c.kind, at: c.at / (sp * fs), elementId: el.id, depth: c.depth });
|
|
403
|
+
for (const g of glitchCuesBetween(a, t0 * sp, t1 * sp, tr, (ms) => ms * sp)) out.push({ kind: 'glitch', at: g.at / sp, elementId: el.id, depth: 1 });
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
out.sort((x, y) => x.at - y.at);
|
|
407
|
+
return out.filter((c, i) => !out.slice(0, i).some((p) => p.kind === c.kind && Math.abs(p.at - c.at) < 30));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* ---------- presets ---------- */
|
|
411
|
+
|
|
412
|
+
const fontFor = (id: string) => NEON_FONTS.find((x) => x.id === id)!;
|
|
413
|
+
function textEl(id: string, text: string, fontId: string, color: Partial<NeonMaterialConfig>, over: Partial<NeonTextElement> = {}): NeonElementInput {
|
|
414
|
+
const font = fontFor(fontId);
|
|
415
|
+
return {
|
|
416
|
+
id, type: 'text', text,
|
|
417
|
+
typography: { fontFamily: font.family, fontWeight: font.weight, construction: font.construction, fontSize: 300, strokeWidth: Math.round(300 * font.stroke * 2) / 2, ...(over.typography ?? {}) },
|
|
418
|
+
neon: color,
|
|
419
|
+
...Object.fromEntries(Object.entries(over).filter(([k]) => k !== 'typography')),
|
|
420
|
+
} as NeonElementInput;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export type NeonScenePreset = { id: string; name: string; description: string; scene: NeonSceneInput };
|
|
424
|
+
const anim = (o: Partial<NeonAnimationConfig>) => o;
|
|
425
|
+
|
|
426
|
+
/** Complete scenes: text, font, colours, glow, flicker, glitch, wall and sound. */
|
|
427
|
+
export const NEON_SCENE_PRESETS: NeonScenePreset[] = [
|
|
428
|
+
{ id: 'cafe-red', name: 'CAFE RED', description: 'The reference: red outline CAFE on a navy brick wall.', scene: { elements: [textEl('text-1', 'CAFE', 'oswald', NEON_COLOR_PRESETS.red, { animation: anim({ flickerIntensity: 0.18, flickerFrequency: 0.25, glitchFrequency: 0.1 }) as NeonAnimationConfig })] } },
|
|
429
|
+
{ id: 'cafe-blue', name: 'CAFE BLUE', description: 'CAFE in ice blue.', scene: { elements: [textEl('text-1', 'CAFE', 'oswald', NEON_COLOR_PRESETS.blue)] } },
|
|
430
|
+
{ id: 'cafe-purple', name: 'CAFE PURPLE', description: 'CAFE in violet.', scene: { elements: [textEl('text-1', 'CAFE', 'oswald', NEON_COLOR_PRESETS.purple)] } },
|
|
431
|
+
{ id: 'cafe-green', name: 'CAFE GREEN', description: 'CAFE in acid green.', scene: { elements: [textEl('text-1', 'CAFE', 'oswald', NEON_COLOR_PRESETS.green)] } },
|
|
432
|
+
{
|
|
433
|
+
id: 'retro-red', name: 'RETRO RED', description: 'A 1950s diner sign: Righteous, warm red, a tired transformer.',
|
|
434
|
+
scene: {
|
|
435
|
+
elements: [
|
|
436
|
+
textEl('text-1', 'DINER', 'righteous', { color: '#FF3040' }, { y: 470, animation: anim({ flickerIntensity: 0.3, flickerFrequency: 0.45, flickerRandomness: 0.8, glitchEnabled: false }) as NeonAnimationConfig }),
|
|
437
|
+
{ id: 'artwork-1', type: 'artwork', artwork: { kind: 'library', id: 'star' }, size: 170, x: 1370, y: 300, rotation: 12, neon: { color: '#FFC24A' }, animation: { seed: 91 } },
|
|
438
|
+
],
|
|
439
|
+
wall: { ambientColor: '#3A1F7A', ambient: 0.45, lightSpill: 1.2 },
|
|
440
|
+
audio: { hum: 0.55, failure: 0.7 },
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
id: 'cyber-blue', name: 'CYBER BLUE', description: 'Orbitron in electric blue with frequent digital glitches.',
|
|
445
|
+
scene: {
|
|
446
|
+
elements: [textEl('text-1', 'CYBER', 'orbitron', NEON_COLOR_PRESETS.blue, { animation: anim({ flickerIntensity: 0.12, flickerFrequency: 0.15, glitchIntensity: 0.6, glitchFrequency: 0.35, glitchRgbSplit: 1.6 }) as NeonAnimationConfig })],
|
|
447
|
+
wall: { ambientColor: '#0D3DD8', ambient: 0.6 },
|
|
448
|
+
audio: { glitch: 0.5 },
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: 'purple-night', name: 'PURPLE NIGHT', description: 'A handwritten “night” under a neon moon.',
|
|
453
|
+
scene: {
|
|
454
|
+
elements: [
|
|
455
|
+
textEl('text-1', 'night', 'sacramento', NEON_COLOR_PRESETS.purple, { y: 540, typography: { fontSize: 420, strokeWidth: 9 } as NeonTypography }),
|
|
456
|
+
{ id: 'emoji-1', type: 'emoji', emoji: '🌙', size: 200, x: 1200, y: 290, neon: { color: '#E0B3FF' }, animation: { seed: 7356951 } },
|
|
457
|
+
],
|
|
458
|
+
wall: { ambientColor: '#4A1FB8', ambient: 0.5 },
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
id: 'electric-green', name: 'ELECTRIC GREEN', description: 'Audiowide “24/7” with a bolt, both on one circuit.',
|
|
463
|
+
scene: {
|
|
464
|
+
elements: [
|
|
465
|
+
textEl('text-1', '24/7', 'audiowide', NEON_COLOR_PRESETS.green, { x: 700, animation: anim({ seed: 4242, flickerIntensity: 0.22, flickerFrequency: 0.3 }) as NeonAnimationConfig }),
|
|
466
|
+
{ id: 'emoji-1', type: 'emoji', emoji: '⚡', size: 230, x: 1300, y: 480, neon: { color: '#F4FF3A' }, animation: { seed: 4242, flickerIntensity: 0.22, flickerFrequency: 0.3 } },
|
|
467
|
+
],
|
|
468
|
+
wall: { ambientColor: '#123A7A', ambient: 0.5 },
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
id: 'warm-white', name: 'WARM WHITE', description: 'Tilt Neon “Hello” in warm white; nearly steady.',
|
|
473
|
+
scene: {
|
|
474
|
+
elements: [textEl('text-1', 'Hello', 'tilt-neon', { color: '#FFE3B8', coreColor: '#FFFFFF', tubeColor: '#FFE3B8', glowColor: '#FFC98A', bloomColor: '#C98A3A' }, { typography: { fontSize: 340, strokeWidth: 12 } as NeonTypography, animation: anim({ flickerIntensity: 0.06, flickerFrequency: 0.05, glitchEnabled: false }) as NeonAnimationConfig })],
|
|
475
|
+
wall: { ambientColor: '#2A2A6A', ambient: 0.4, lightSpill: 1.3 },
|
|
476
|
+
audio: { hum: 0.35 },
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
];
|
|
480
|
+
|
|
481
|
+
/* ---------- agent vocabulary ---------- */
|
|
482
|
+
|
|
483
|
+
/** Named colours an agent can say. Each is a primary: glow, bloom and core derive from it. */
|
|
484
|
+
export const NEON_NAMED_COLORS: Record<string, string> = {
|
|
485
|
+
red: NEON_COLOR_PRESETS.red.color, blue: NEON_COLOR_PRESETS.blue.color, purple: NEON_COLOR_PRESETS.purple.color, green: NEON_COLOR_PRESETS.green.color,
|
|
486
|
+
pink: '#FF4FB8', magenta: '#FF2BD6', cyan: '#2BF7FF', teal: '#1FFFD0', amber: '#FFB300', orange: '#FF7A1A', yellow: '#F4FF3A',
|
|
487
|
+
white: '#F2F6FF', 'warm white': '#FFE3B8', 'cool white': '#DDEBFF', violet: '#9C5BFF', lime: '#B6FF2B',
|
|
488
|
+
};
|
|
489
|
+
/** Flicker by word: "none" … "failing". */
|
|
490
|
+
export const NEON_FLICKER_LEVELS: Record<string, Pick<NeonAnimationConfig, 'flickerEnabled' | 'flickerIntensity' | 'flickerFrequency'>> = {
|
|
491
|
+
none: { flickerEnabled: false, flickerIntensity: 0, flickerFrequency: 0 },
|
|
492
|
+
subtle: { flickerEnabled: true, flickerIntensity: 0.1, flickerFrequency: 0.06 },
|
|
493
|
+
medium: { flickerEnabled: true, flickerIntensity: 0.2, flickerFrequency: 0.2 },
|
|
494
|
+
heavy: { flickerEnabled: true, flickerIntensity: 0.3, flickerFrequency: 0.5 },
|
|
495
|
+
failing: { flickerEnabled: true, flickerIntensity: 0.6, flickerFrequency: 1.2 },
|
|
496
|
+
};
|
|
497
|
+
/** Glitch by word: "none" … "frequent". */
|
|
498
|
+
export const NEON_GLITCH_LEVELS: Record<string, Pick<NeonAnimationConfig, 'glitchEnabled' | 'glitchIntensity' | 'glitchFrequency'>> = {
|
|
499
|
+
none: { glitchEnabled: false, glitchIntensity: 0, glitchFrequency: 0 },
|
|
500
|
+
rare: { glitchEnabled: true, glitchIntensity: 0.15, glitchFrequency: 0.03 },
|
|
501
|
+
occasional: { glitchEnabled: true, glitchIntensity: 0.3, glitchFrequency: 0.1 },
|
|
502
|
+
frequent: { glitchEnabled: true, glitchIntensity: 0.5, glitchFrequency: 0.35 },
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
/** A colour by name or hex. Unknown names come back undefined. */
|
|
506
|
+
export function neonColor(nameOrHex: string): string | undefined {
|
|
507
|
+
if (isHexColor(nameOrHex)) return nameOrHex.toUpperCase();
|
|
508
|
+
return NEON_NAMED_COLORS[String(nameOrHex).trim().toLowerCase().replace(/[-_]+/g, ' ')];
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export type NeonElementSpec = {
|
|
512
|
+
type?: NeonElementType;
|
|
513
|
+
text?: string;
|
|
514
|
+
emoji?: string;
|
|
515
|
+
/** A library artwork id ("heart"), or SVG markup. */
|
|
516
|
+
artwork?: string;
|
|
517
|
+
font?: string;
|
|
518
|
+
color?: string;
|
|
519
|
+
flicker?: keyof typeof NEON_FLICKER_LEVELS | string;
|
|
520
|
+
glitch?: keyof typeof NEON_GLITCH_LEVELS | string;
|
|
521
|
+
/** Next to an existing element, or at a point. */
|
|
522
|
+
placement?: 'right' | 'left' | 'above' | 'below' | 'center' | { x: number; y: number };
|
|
523
|
+
relativeTo?: string;
|
|
524
|
+
size?: number;
|
|
525
|
+
id?: string;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/** The element an agent described, as config. Unknown words are ignored, not guessed. */
|
|
529
|
+
export function neonElementFromSpec(spec: NeonElementSpec, index = 0): NeonElementInput {
|
|
530
|
+
const type: NeonElementType = spec.type ?? (spec.emoji ? 'emoji' : spec.artwork ? 'artwork' : 'text');
|
|
531
|
+
const out: NeonElementInput = { type, id: spec.id ?? `${type}-${index + 1}` };
|
|
532
|
+
const color = spec.color ? neonColor(spec.color) : undefined;
|
|
533
|
+
if (color) out.neon = { color };
|
|
534
|
+
const flicker = spec.flicker ? NEON_FLICKER_LEVELS[spec.flicker] : undefined;
|
|
535
|
+
const glitch = spec.glitch ? NEON_GLITCH_LEVELS[spec.glitch] : undefined;
|
|
536
|
+
if (flicker || glitch) out.animation = { ...flicker, ...glitch };
|
|
537
|
+
if (type === 'text') {
|
|
538
|
+
out.text = spec.text ?? 'OPEN';
|
|
539
|
+
const font = spec.font ? findNeonFont(spec.font) : undefined;
|
|
540
|
+
const size = spec.size ?? 300;
|
|
541
|
+
out.typography = { fontSize: size, ...(font ? { fontFamily: font.family, fontWeight: font.weight, construction: font.construction, strokeWidth: Math.max(2, Math.round(size * font.stroke * 2) / 2) } : {}) };
|
|
542
|
+
} else if (type === 'emoji') {
|
|
543
|
+
out.emoji = spec.emoji ?? '⭐';
|
|
544
|
+
out.size = spec.size ?? 240;
|
|
545
|
+
} else {
|
|
546
|
+
const art = spec.artwork ?? 'heart';
|
|
547
|
+
out.artwork = NEON_ARTWORK_LIBRARY[art] ? { kind: 'library', id: art } : { kind: 'svg', svg: art };
|
|
548
|
+
out.size = spec.size ?? 260;
|
|
549
|
+
}
|
|
550
|
+
return out;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* **“A blue neon sign saying OPEN in Orbitron, medium flicker, occasional glitch.”** Builds the
|
|
555
|
+
* scene from words an agent already has. Anything more specific goes straight into the JSON.
|
|
556
|
+
*/
|
|
557
|
+
export function createNeonScene(spec: NeonElementSpec & { elements?: NeonElementSpec[]; wall?: Partial<NeonWallConfig> } = {}): NeonScene {
|
|
558
|
+
let scene = resolveNeonScene({ elements: [neonElementFromSpec({ ...spec, type: 'text' }, 0)], wall: spec.wall });
|
|
559
|
+
for (const extra of spec.elements ?? []) scene = addNeonElement(scene, extra);
|
|
560
|
+
return scene;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/** **“Add a pink neon heart next to the text.”** Places the new element beside another, clear of it. */
|
|
564
|
+
export function addNeonElement(scene: NeonScene, spec: NeonElementSpec, measure?: TextMeasurer): NeonScene {
|
|
565
|
+
const index = scene.elements.length;
|
|
566
|
+
const input = neonElementFromSpec(spec, index);
|
|
567
|
+
let id = String(input.id);
|
|
568
|
+
for (let n = 2; scene.elements.some((e) => e.id === id); n++) id = `${input.type}-${index + n}`;
|
|
569
|
+
const el = resolveNeonElement({ ...input, id }, index);
|
|
570
|
+
const anchor = scene.elements.find((e) => e.id === spec.relativeTo) ?? scene.elements[0];
|
|
571
|
+
const place = spec.placement ?? 'right';
|
|
572
|
+
let { x, y } = el;
|
|
573
|
+
if (typeof place === 'object') ({ x, y } = place);
|
|
574
|
+
else if (place === 'center') { x = scene.stage.width / 2; y = scene.stage.height / 2; }
|
|
575
|
+
else if (anchor) {
|
|
576
|
+
/* The asked-for side of the anchor first; then the other sides of every element; then a grid.
|
|
577
|
+
A spot must fit on the stage and not overlap anything already there. */
|
|
578
|
+
const self = elementGeometry({ ...el, x: 0, y: 0 }, measure).bounds;
|
|
579
|
+
const others = scene.elements.filter((e) => e.visible).map((e) => elementGeometry(e, measure).bounds);
|
|
580
|
+
const gap = 50;
|
|
581
|
+
const fits = (cx: number, cy: number) => {
|
|
582
|
+
const r = { x: cx - self.width / 2, y: cy - self.height / 2, width: self.width, height: self.height };
|
|
583
|
+
if (r.x < 10 || r.y < 10 || r.x + r.width > scene.stage.width - 10 || r.y + r.height > scene.stage.height - 10) return false;
|
|
584
|
+
return !others.some((o) => r.x < o.x + o.width + 12 && o.x < r.x + r.width + 12 && r.y < o.y + o.height + 12 && o.y < r.y + r.height + 12);
|
|
585
|
+
};
|
|
586
|
+
const around = (a: { x: number; y: number; width: number; height: number }, side: string): [number, number] => {
|
|
587
|
+
const ax = a.x + a.width / 2;
|
|
588
|
+
const ay = a.y + a.height / 2;
|
|
589
|
+
if (side === 'right') return [a.x + a.width + gap + self.width / 2, ay];
|
|
590
|
+
if (side === 'left') return [a.x - gap - self.width / 2, ay];
|
|
591
|
+
if (side === 'above') return [ax, a.y - gap - self.height / 2];
|
|
592
|
+
return [ax, a.y + a.height + gap + self.height / 2];
|
|
593
|
+
};
|
|
594
|
+
const anchorBox = elementGeometry(anchor, measure).bounds;
|
|
595
|
+
const sides = [place, ...['right', 'left', 'above', 'below'].filter((q) => q !== place)];
|
|
596
|
+
const candidates: [number, number][] = [
|
|
597
|
+
...sides.map((q) => around(anchorBox, q)),
|
|
598
|
+
...others.flatMap((o) => sides.map((q) => around(o, q))),
|
|
599
|
+
];
|
|
600
|
+
for (let gy = 1; gy <= 5; gy++) for (let gx = 1; gx <= 7; gx++) candidates.push([(scene.stage.width * gx) / 8, (scene.stage.height * gy) / 6]);
|
|
601
|
+
const hit = candidates.find(([cx, cy]) => fits(cx, cy));
|
|
602
|
+
[x, y] = hit ?? around(anchorBox, place);
|
|
603
|
+
}
|
|
604
|
+
return { ...scene, elements: [...scene.elements, { ...el, x: r3(x), y: r3(y) }] };
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** The single-sign config (`NeonTextConfig`) as a scene with one text element on the wall. */
|
|
608
|
+
export function neonSceneFromText(config: { text: string; typography: NeonTypography; neon: NeonMaterialConfig; animation: NeonAnimationConfig }): NeonScene {
|
|
609
|
+
return resolveNeonScene({ elements: [{ type: 'text', id: 'text-1', text: config.text, typography: config.typography, neon: config.neon, animation: config.animation }] });
|
|
610
|
+
}
|