@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,484 @@
|
|
|
1
|
+
/* eslint-disable comppack/no-raw-colour -- neon colours are sign content (the brief's presets), not theme colours. */
|
|
2
|
+
/**
|
|
3
|
+
* **The neon sign's configuration** — one plain JSON object that says everything about a sign. The
|
|
4
|
+
* four concerns never reach into each other:
|
|
5
|
+
*
|
|
6
|
+
* text what the sign says ("CAFE", "OPEN\n24/7", anything)
|
|
7
|
+
* typography how the letters are shaped: font, size, weight, spacing, tube width, construction
|
|
8
|
+
* neon the material: tube, core, glow and bloom colours, intensity, radii, shadow
|
|
9
|
+
* animation flicker and glitch: on/off, intensity, frequency, speed, seed
|
|
10
|
+
*
|
|
11
|
+
* So CAFE → OPEN → 24/7 changes `text` only, and RED → BLUE changes `neon` only. Units: `fontSize`,
|
|
12
|
+
* widths and radii are SVG user units (px at scale 1); times are ms; frequencies are events per
|
|
13
|
+
* second. Measured defaults come from the Vecteezy 7356951 reference (`docs/NEON-TEXT.md`).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const NEON_CONSTRUCTIONS = ['outline', 'monoline'] as const;
|
|
17
|
+
/**
|
|
18
|
+
* How the tube follows the letter.
|
|
19
|
+
* - `outline`: one tube traces each glyph's outline (the reference's CAFE). Any font works.
|
|
20
|
+
* - `monoline`: the glyph is the tube: filled and stroked with round joins (the reference's 24/7).
|
|
21
|
+
* Light, rounded fonts read best; the glyph's own stem is the hot core.
|
|
22
|
+
*/
|
|
23
|
+
export type NeonConstruction = (typeof NEON_CONSTRUCTIONS)[number];
|
|
24
|
+
export const NEON_ALIGNS = ['start', 'middle', 'end'] as const;
|
|
25
|
+
export type NeonAlign = (typeof NEON_ALIGNS)[number];
|
|
26
|
+
|
|
27
|
+
export type NeonTypography = {
|
|
28
|
+
/** Any CSS font-family list. The font must be loaded by the page; nothing is converted to paths. */
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
fontSize: number;
|
|
31
|
+
fontWeight: number;
|
|
32
|
+
fontStyle: 'normal' | 'italic';
|
|
33
|
+
/** Extra space between letters, in user units. */
|
|
34
|
+
letterSpacing: number;
|
|
35
|
+
/** Line pitch as a multiple of fontSize, for multi-line text ("OPEN\n24/7"). */
|
|
36
|
+
lineHeight: number;
|
|
37
|
+
/** The glass tube's width, in user units. The reference's outline tube is ≈ 0.033 × fontSize. */
|
|
38
|
+
strokeWidth: number;
|
|
39
|
+
construction: NeonConstruction;
|
|
40
|
+
align: NeonAlign;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type NeonShadow = {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
color: string;
|
|
46
|
+
opacity: number;
|
|
47
|
+
/** Offset as a fraction of fontSize; the reference casts its shadow down and to the right. */
|
|
48
|
+
offsetX: number;
|
|
49
|
+
offsetY: number;
|
|
50
|
+
/** Blur radius, in user units. */
|
|
51
|
+
blur: number;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type NeonMaterialConfig = {
|
|
55
|
+
/** The primary neon colour. Every colour below that is null is derived from it. */
|
|
56
|
+
color: string;
|
|
57
|
+
/** The hot centre line. null → nearly white, tinted by `color`. */
|
|
58
|
+
coreColor: string | null;
|
|
59
|
+
/** The lit glass. null → `color`. */
|
|
60
|
+
tubeColor: string | null;
|
|
61
|
+
/** The tight coloured halo. null → a deeper, more saturated `color`. */
|
|
62
|
+
glowColor: string | null;
|
|
63
|
+
/** The wide light thrown on the wall. null → a dark, saturated `color`. */
|
|
64
|
+
bloomColor: string | null;
|
|
65
|
+
/** Glow and bloom strength: 0 is a bare tube, 1 the reference, up to 3. */
|
|
66
|
+
intensity: number;
|
|
67
|
+
/** The bloom's own strength, on top of `intensity` (1 = as the reference). */
|
|
68
|
+
bloomIntensity: number;
|
|
69
|
+
/** How bright the lit tube is (1 = full; lower shows more dark glass). */
|
|
70
|
+
tubeBrightness: number;
|
|
71
|
+
/** How bright the hot core is (1 = full; 0 hides it). */
|
|
72
|
+
coreBrightness: number;
|
|
73
|
+
/** How far the tight glow reaches, in user units. */
|
|
74
|
+
glowRadius: number;
|
|
75
|
+
/** How far the wall bloom reaches, in user units. */
|
|
76
|
+
bloomRadius: number;
|
|
77
|
+
/** The hot core's width as a fraction of the tube (outline construction). Reference: 0.47. */
|
|
78
|
+
coreWidth: number;
|
|
79
|
+
/** How visible the unlit glass is when the tube dims (0 hides it). */
|
|
80
|
+
glassOpacity: number;
|
|
81
|
+
shadow: NeonShadow;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type NeonAnimationConfig = {
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
/** Plays everything faster (2) or slower (0.5). */
|
|
87
|
+
speed: number;
|
|
88
|
+
/** Same seed, same performance. Change it to get a different, equally natural one. */
|
|
89
|
+
seed: number;
|
|
90
|
+
flickerEnabled: boolean;
|
|
91
|
+
/** 0 is a steady tube; 0.25 plays the full hardware ranges (dips to 40–80 %, failures to 20–50 %); 1 is a failing transformer. */
|
|
92
|
+
flickerIntensity: number;
|
|
93
|
+
/** Noticeable flicker events (sags, dips, failures) per second. 0.08 ≈ one every 12 s. */
|
|
94
|
+
flickerFrequency: number;
|
|
95
|
+
/** How fast each flicker event plays, on top of `speed`. */
|
|
96
|
+
flickerSpeed: number;
|
|
97
|
+
/** 0: every event plays its typical shape and depth, evenly; 1: depths, lengths and the hum vary widely. */
|
|
98
|
+
flickerRandomness: number;
|
|
99
|
+
/** How fast the tube recovers after a dip or failure: 0 slow (≈ 300 ms tail), 1 instant. */
|
|
100
|
+
flickerRecovery: number;
|
|
101
|
+
/** The floor: the tube never falls below this brightness (0…1). */
|
|
102
|
+
flickerMinBrightness: number;
|
|
103
|
+
glitchEnabled: boolean;
|
|
104
|
+
/** 0 is none; 1 is the most a readable sign should glitch. */
|
|
105
|
+
glitchIntensity: number;
|
|
106
|
+
/** Glitches per second. 0.04 ≈ one every 25 s. */
|
|
107
|
+
glitchFrequency: number;
|
|
108
|
+
/** A glitch's typical length, in ms. */
|
|
109
|
+
glitchDuration: number;
|
|
110
|
+
/** Scales the whole-sign sideways jump (0 none, 1 default, 2 double). */
|
|
111
|
+
glitchDisplacement: number;
|
|
112
|
+
/** Scales the red/cyan split. */
|
|
113
|
+
glitchRgbSplit: number;
|
|
114
|
+
/** Scales the sliced bands' shift. */
|
|
115
|
+
glitchSlices: number;
|
|
116
|
+
/** Scales how far the glow slips from the tube. */
|
|
117
|
+
glitchGlowSeparation: number;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export type NeonTextConfig = {
|
|
121
|
+
text: string;
|
|
122
|
+
typography: NeonTypography;
|
|
123
|
+
neon: NeonMaterialConfig;
|
|
124
|
+
animation: NeonAnimationConfig;
|
|
125
|
+
/** A colour behind the sign, or null for transparent. */
|
|
126
|
+
background: string | null;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? (T[K] extends unknown[] ? T[K] : DeepPartial<T[K]> | null) : T[K] };
|
|
130
|
+
export type NeonTextConfigInput = DeepPartial<NeonTextConfig>;
|
|
131
|
+
|
|
132
|
+
export const DEFAULT_NEON_CONFIG: NeonTextConfig = {
|
|
133
|
+
text: 'CAFE',
|
|
134
|
+
typography: {
|
|
135
|
+
fontFamily: "Oswald, 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif",
|
|
136
|
+
fontSize: 220,
|
|
137
|
+
fontWeight: 500,
|
|
138
|
+
fontStyle: 'normal',
|
|
139
|
+
letterSpacing: 4,
|
|
140
|
+
lineHeight: 1.15,
|
|
141
|
+
strokeWidth: 8,
|
|
142
|
+
construction: 'outline',
|
|
143
|
+
align: 'middle',
|
|
144
|
+
},
|
|
145
|
+
neon: {
|
|
146
|
+
color: '#FF4655',
|
|
147
|
+
coreColor: '#FFF5F5',
|
|
148
|
+
tubeColor: '#FF4655',
|
|
149
|
+
glowColor: '#FF1838',
|
|
150
|
+
bloomColor: '#D4002F',
|
|
151
|
+
intensity: 1,
|
|
152
|
+
bloomIntensity: 1,
|
|
153
|
+
tubeBrightness: 1,
|
|
154
|
+
coreBrightness: 1,
|
|
155
|
+
glowRadius: 20,
|
|
156
|
+
bloomRadius: 70,
|
|
157
|
+
coreWidth: 0.47,
|
|
158
|
+
glassOpacity: 0.16,
|
|
159
|
+
shadow: { enabled: true, color: '#000000', opacity: 0.5, offsetX: 0.035, offsetY: 0.045, blur: 6 },
|
|
160
|
+
},
|
|
161
|
+
animation: {
|
|
162
|
+
enabled: true,
|
|
163
|
+
speed: 1,
|
|
164
|
+
seed: 7356951,
|
|
165
|
+
flickerEnabled: true,
|
|
166
|
+
flickerIntensity: 0.15,
|
|
167
|
+
flickerFrequency: 0.08,
|
|
168
|
+
flickerSpeed: 1,
|
|
169
|
+
flickerRandomness: 0.6,
|
|
170
|
+
flickerRecovery: 0.7,
|
|
171
|
+
flickerMinBrightness: 0.05,
|
|
172
|
+
glitchEnabled: true,
|
|
173
|
+
glitchIntensity: 0.15,
|
|
174
|
+
glitchFrequency: 0.04,
|
|
175
|
+
glitchDuration: 180,
|
|
176
|
+
glitchDisplacement: 1,
|
|
177
|
+
glitchRgbSplit: 1,
|
|
178
|
+
glitchSlices: 1,
|
|
179
|
+
glitchGlowSeparation: 1,
|
|
180
|
+
},
|
|
181
|
+
background: null,
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/** The four neon colours of each preset, from the brief. `color` is the tube. */
|
|
185
|
+
export type NeonColorPreset = Pick<NeonMaterialConfig, 'color'> & { coreColor: string; tubeColor: string; glowColor: string; bloomColor: string };
|
|
186
|
+
export const NEON_COLOR_PRESETS = {
|
|
187
|
+
red: { color: '#FF3B4D', coreColor: '#FFF5F5', tubeColor: '#FF3B4D', glowColor: '#FF1744', bloomColor: '#C40030' },
|
|
188
|
+
blue: { color: '#00D9FF', coreColor: '#F5FFFF', tubeColor: '#00D9FF', glowColor: '#009DFF', bloomColor: '#0055FF' },
|
|
189
|
+
purple: { color: '#D66BFF', coreColor: '#FFF5FF', tubeColor: '#D66BFF', glowColor: '#9C27FF', bloomColor: '#5E00B8' },
|
|
190
|
+
green: { color: '#39FF88', coreColor: '#F5FFF5', tubeColor: '#39FF88', glowColor: '#00D95F', bloomColor: '#008F3D' },
|
|
191
|
+
} satisfies Record<string, NeonColorPreset>;
|
|
192
|
+
export type NeonColorPresetId = keyof typeof NEON_COLOR_PRESETS;
|
|
193
|
+
|
|
194
|
+
/** Text presets: the words, and the letterform that suits them. Material and animation are untouched. */
|
|
195
|
+
export const NEON_TEXT_PRESETS = {
|
|
196
|
+
cafe: { text: 'CAFE', typography: { construction: 'outline', fontFamily: DEFAULT_NEON_CONFIG.typography.fontFamily, fontWeight: 500, strokeWidth: 8, letterSpacing: 4 } },
|
|
197
|
+
open: { text: 'OPEN', typography: { construction: 'outline', fontFamily: DEFAULT_NEON_CONFIG.typography.fontFamily, fontWeight: 500, strokeWidth: 8, letterSpacing: 10 } },
|
|
198
|
+
night: { text: 'NIGHT', typography: { construction: 'outline', fontFamily: DEFAULT_NEON_CONFIG.typography.fontFamily, fontWeight: 500, strokeWidth: 8, letterSpacing: 6 } },
|
|
199
|
+
'24/7': { text: '24/7', typography: { construction: 'monoline', fontFamily: "Quicksand, 'Arial Rounded MT Bold', 'Helvetica Neue', Arial, sans-serif", fontWeight: 500, strokeWidth: 10, letterSpacing: 2 } },
|
|
200
|
+
hello: { text: 'Hello', typography: { construction: 'monoline', fontFamily: "Sacramento, 'Snell Roundhand', 'Brush Script MT', cursive", fontWeight: 400, strokeWidth: 7, letterSpacing: 0 } },
|
|
201
|
+
} satisfies Record<string, NeonTextConfigInput>;
|
|
202
|
+
export type NeonTextPresetId = keyof typeof NEON_TEXT_PRESETS;
|
|
203
|
+
|
|
204
|
+
/* ---------- colour helpers (pure) ---------- */
|
|
205
|
+
|
|
206
|
+
const HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
207
|
+
export const isHexColor = (v: unknown): v is string => typeof v === 'string' && HEX.test(v);
|
|
208
|
+
export function hexToRgb(hex: string): [number, number, number] {
|
|
209
|
+
const h = hex.length === 4 ? hex.slice(1).split('').map((c) => c + c).join('') : hex.slice(1);
|
|
210
|
+
return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
|
|
211
|
+
}
|
|
212
|
+
export const rgbToHex = (rgb: readonly number[]) => '#' + rgb.map((v) => Math.round(Math.max(0, Math.min(255, v))).toString(16).padStart(2, '0')).join('').toUpperCase();
|
|
213
|
+
export function mixHex(a: string, b: string, t: number): string {
|
|
214
|
+
const x = hexToRgb(a);
|
|
215
|
+
const y = hexToRgb(b);
|
|
216
|
+
return rgbToHex(x.map((v, i) => v + (y[i]! - v) * t));
|
|
217
|
+
}
|
|
218
|
+
function toHsl([r, g, b]: [number, number, number]): [number, number, number] {
|
|
219
|
+
const [R, G, B] = [r / 255, g / 255, b / 255];
|
|
220
|
+
const max = Math.max(R, G, B);
|
|
221
|
+
const min = Math.min(R, G, B);
|
|
222
|
+
const l = (max + min) / 2;
|
|
223
|
+
if (max === min) return [0, 0, l];
|
|
224
|
+
const d = max - min;
|
|
225
|
+
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
226
|
+
const h = max === R ? (G - B) / d + (G < B ? 6 : 0) : max === G ? (B - R) / d + 2 : (R - G) / d + 4;
|
|
227
|
+
return [h * 60, s, l];
|
|
228
|
+
}
|
|
229
|
+
function fromHsl(h: number, s: number, l: number): string {
|
|
230
|
+
const k = (n: number) => (n + h / 30) % 12;
|
|
231
|
+
const a = s * Math.min(l, 1 - l);
|
|
232
|
+
const f = (n: number) => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
|
|
233
|
+
return rgbToHex([f(0) * 255, f(8) * 255, f(4) * 255]);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* **One colour in, a whole neon palette out.** Fitted to the brief's four presets: the glow is the
|
|
238
|
+
* same hue a little deeper and fully saturated; the bloom is darker still and drifts a few degrees
|
|
239
|
+
* toward blue (a lit wall reads cooler than the tube); the core is the colour at 6 % over white.
|
|
240
|
+
*/
|
|
241
|
+
export function deriveNeonPalette(color: string): { coreColor: string; tubeColor: string; glowColor: string; bloomColor: string } {
|
|
242
|
+
const base = isHexColor(color) ? color : DEFAULT_NEON_CONFIG.neon.color;
|
|
243
|
+
const [h, s, l] = toHsl(hexToRgb(base));
|
|
244
|
+
const drift = (deg: number) => (s < 0.08 ? h : (h + deg + 360) % 360);
|
|
245
|
+
return {
|
|
246
|
+
coreColor: mixHex(base, '#FFFFFF', 0.94),
|
|
247
|
+
tubeColor: rgbToHex(hexToRgb(base)),
|
|
248
|
+
glowColor: fromHsl(drift(-6), Math.min(1, s + 0.15), Math.max(0.3, l * 0.84)),
|
|
249
|
+
bloomColor: fromHsl(drift(-10), Math.min(1, s + 0.2), Math.max(0.18, l * 0.6)),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* ---------- resolving ---------- */
|
|
254
|
+
|
|
255
|
+
const isObj = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
256
|
+
function merge<T>(base: T, over: unknown): T {
|
|
257
|
+
if (!isObj(base) || !isObj(over)) return (over === undefined ? base : over) as T;
|
|
258
|
+
const out: Record<string, unknown> = { ...base };
|
|
259
|
+
for (const [k, v] of Object.entries(over)) {
|
|
260
|
+
if (v === undefined) continue;
|
|
261
|
+
out[k] = isObj(out[k]) && isObj(v) ? merge(out[k], v) : v;
|
|
262
|
+
}
|
|
263
|
+
return out as T;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* **The flat props an agent or a JSX author reaches for**, mapped onto the config. Every one is
|
|
268
|
+
* optional; each wins over the same value in `config`.
|
|
269
|
+
*/
|
|
270
|
+
export type NeonTextShorthand = {
|
|
271
|
+
text?: string;
|
|
272
|
+
fontFamily?: string;
|
|
273
|
+
fontSize?: number;
|
|
274
|
+
fontWeight?: number;
|
|
275
|
+
fontStyle?: 'normal' | 'italic';
|
|
276
|
+
letterSpacing?: number;
|
|
277
|
+
lineHeight?: number;
|
|
278
|
+
strokeWidth?: number;
|
|
279
|
+
construction?: NeonConstruction;
|
|
280
|
+
align?: NeonAlign;
|
|
281
|
+
/** The primary colour: glow, bloom and core follow it unless set themselves. */
|
|
282
|
+
neonColor?: string;
|
|
283
|
+
tubeColor?: string;
|
|
284
|
+
coreColor?: string;
|
|
285
|
+
glowColor?: string;
|
|
286
|
+
bloomColor?: string;
|
|
287
|
+
glowIntensity?: number;
|
|
288
|
+
glowRadius?: number;
|
|
289
|
+
bloomRadius?: number;
|
|
290
|
+
shadow?: boolean;
|
|
291
|
+
/** Animation on/off (flicker and glitch together). */
|
|
292
|
+
animated?: boolean;
|
|
293
|
+
animationSpeed?: number;
|
|
294
|
+
seed?: number;
|
|
295
|
+
flicker?: boolean;
|
|
296
|
+
flickerIntensity?: number;
|
|
297
|
+
flickerFrequency?: number;
|
|
298
|
+
flickerSpeed?: number;
|
|
299
|
+
glitch?: boolean;
|
|
300
|
+
glitchIntensity?: number;
|
|
301
|
+
glitchFrequency?: number;
|
|
302
|
+
glitchDuration?: number;
|
|
303
|
+
background?: string | null;
|
|
304
|
+
};
|
|
305
|
+
export const NEON_SHORTHAND_KEYS = [
|
|
306
|
+
'text', 'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'letterSpacing', 'lineHeight', 'strokeWidth', 'construction', 'align',
|
|
307
|
+
'neonColor', 'tubeColor', 'coreColor', 'glowColor', 'bloomColor', 'glowIntensity', 'glowRadius', 'bloomRadius', 'shadow',
|
|
308
|
+
'animated', 'animationSpeed', 'seed', 'flicker', 'flickerIntensity', 'flickerFrequency', 'flickerSpeed',
|
|
309
|
+
'glitch', 'glitchIntensity', 'glitchFrequency', 'glitchDuration', 'background',
|
|
310
|
+
] as const satisfies readonly (keyof NeonTextShorthand)[];
|
|
311
|
+
|
|
312
|
+
/** Shorthand props → a config patch (only the keys that were given). */
|
|
313
|
+
export function shorthandToConfig(p: NeonTextShorthand): NeonTextConfigInput {
|
|
314
|
+
const drop = <T extends Record<string, unknown>>(o: T) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined)) as Partial<T>;
|
|
315
|
+
const out: NeonTextConfigInput = {};
|
|
316
|
+
if (p.text !== undefined) out.text = p.text;
|
|
317
|
+
if (p.background !== undefined) out.background = p.background;
|
|
318
|
+
out.typography = drop({
|
|
319
|
+
fontFamily: p.fontFamily, fontSize: p.fontSize, fontWeight: p.fontWeight, fontStyle: p.fontStyle, letterSpacing: p.letterSpacing,
|
|
320
|
+
lineHeight: p.lineHeight, strokeWidth: p.strokeWidth, construction: p.construction, align: p.align,
|
|
321
|
+
});
|
|
322
|
+
out.neon = drop({
|
|
323
|
+
color: p.neonColor, tubeColor: p.tubeColor, coreColor: p.coreColor, glowColor: p.glowColor, bloomColor: p.bloomColor,
|
|
324
|
+
intensity: p.glowIntensity, glowRadius: p.glowRadius, bloomRadius: p.bloomRadius,
|
|
325
|
+
});
|
|
326
|
+
if (p.shadow !== undefined) out.neon.shadow = { enabled: p.shadow };
|
|
327
|
+
out.animation = drop({
|
|
328
|
+
enabled: p.animated, speed: p.animationSpeed, seed: p.seed, flickerEnabled: p.flicker, flickerIntensity: p.flickerIntensity,
|
|
329
|
+
flickerFrequency: p.flickerFrequency, flickerSpeed: p.flickerSpeed, glitchEnabled: p.glitch, glitchIntensity: p.glitchIntensity,
|
|
330
|
+
glitchFrequency: p.glitchFrequency, glitchDuration: p.glitchDuration,
|
|
331
|
+
});
|
|
332
|
+
return out;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* **defaults ← config ← shorthand props.** When the primary colour changes (`neon.color` or the
|
|
337
|
+
* `neonColor` prop) and a derived colour was not given at the same level, that colour is re-derived,
|
|
338
|
+
* so `{ neon: { color: '#00D9FF' } }` alone turns the whole sign blue.
|
|
339
|
+
*/
|
|
340
|
+
export function resolveNeonConfig(input?: NeonTextConfigInput | null, shorthand?: NeonTextShorthand): NeonTextConfig {
|
|
341
|
+
let config = DEFAULT_NEON_CONFIG;
|
|
342
|
+
for (const layer of [isObj(input) ? input : undefined, shorthand ? shorthandToConfig(shorthand) : undefined]) {
|
|
343
|
+
if (!layer) continue;
|
|
344
|
+
const neon = isObj(layer.neon) ? (layer.neon as Record<string, unknown>) : undefined;
|
|
345
|
+
const primary = neon && typeof neon.color === 'string' ? neon.color : neon && typeof neon.tubeColor === 'string' && neon.color === undefined ? neon.tubeColor : undefined;
|
|
346
|
+
config = merge(config, layer);
|
|
347
|
+
if (primary !== undefined && isHexColor(primary)) {
|
|
348
|
+
const derived = deriveNeonPalette(primary);
|
|
349
|
+
const n = { ...config.neon, color: primary };
|
|
350
|
+
for (const k of ['coreColor', 'tubeColor', 'glowColor', 'bloomColor'] as const) if (neon![k] === undefined) n[k] = derived[k];
|
|
351
|
+
config = { ...config, neon: n };
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return config;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/** The effective four colours: each explicit one, or derived from `color`. */
|
|
358
|
+
export function neonColors(neon: NeonMaterialConfig) {
|
|
359
|
+
const d = deriveNeonPalette(neon.color);
|
|
360
|
+
return {
|
|
361
|
+
coreColor: isHexColor(neon.coreColor) ? neon.coreColor : d.coreColor,
|
|
362
|
+
tubeColor: isHexColor(neon.tubeColor) ? neon.tubeColor : d.tubeColor,
|
|
363
|
+
glowColor: isHexColor(neon.glowColor) ? neon.glowColor : d.glowColor,
|
|
364
|
+
bloomColor: isHexColor(neon.bloomColor) ? neon.bloomColor : d.bloomColor,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* ---------- validation: never throws ---------- */
|
|
369
|
+
|
|
370
|
+
export type NeonConfigError = { path: string; message: string };
|
|
371
|
+
export type NeonControl = {
|
|
372
|
+
path: string;
|
|
373
|
+
label: string;
|
|
374
|
+
group: 'Text' | 'Typography' | 'Colour' | 'Light' | 'Flicker' | 'Glitch' | 'Animation';
|
|
375
|
+
type: 'text' | 'number' | 'color' | 'boolean' | 'enum' | 'color-or-null';
|
|
376
|
+
min?: number;
|
|
377
|
+
max?: number;
|
|
378
|
+
step?: number;
|
|
379
|
+
unit?: string;
|
|
380
|
+
options?: readonly string[];
|
|
381
|
+
description: string;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/** Every editable value, with its range. The playground draws its controls from this; `validateNeonConfig` checks against it. */
|
|
385
|
+
export const NEON_CONTROLS: NeonControl[] = [
|
|
386
|
+
{ path: 'text', label: 'Text', group: 'Text', type: 'text', description: 'What the sign says. A new line (\\n) starts a second row.' },
|
|
387
|
+
{ path: 'typography.fontFamily', label: 'Font', group: 'Typography', type: 'text', description: 'A CSS font-family list; the page must load the font.' },
|
|
388
|
+
{ path: 'typography.fontSize', label: 'Font size', group: 'Typography', type: 'number', min: 12, max: 1000, step: 1, unit: 'units', description: 'The em size, in SVG user units.' },
|
|
389
|
+
{ path: 'typography.fontWeight', label: 'Font weight', group: 'Typography', type: 'number', min: 100, max: 900, step: 100, description: 'CSS font-weight.' },
|
|
390
|
+
{ path: 'typography.fontStyle', label: 'Font style', group: 'Typography', type: 'enum', options: ['normal', 'italic'], description: 'Upright or italic.' },
|
|
391
|
+
{ path: 'typography.letterSpacing', label: 'Letter spacing', group: 'Typography', type: 'number', min: -50, max: 200, step: 1, unit: 'units', description: 'Extra space between letters.' },
|
|
392
|
+
{ path: 'typography.lineHeight', label: 'Line height', group: 'Typography', type: 'number', min: 0.6, max: 3, step: 0.05, unit: '× size', description: 'Row pitch for multi-line text.' },
|
|
393
|
+
{ path: 'typography.strokeWidth', label: 'Tube width', group: 'Typography', type: 'number', min: 0.5, max: 80, step: 0.5, unit: 'units', description: 'The glass tube. The reference is ≈ 0.033 × font size.' },
|
|
394
|
+
{ path: 'typography.construction', label: 'Construction', group: 'Typography', type: 'enum', options: NEON_CONSTRUCTIONS, description: 'outline: the tube traces each letter (CAFE). monoline: the letter is the tube (24/7).' },
|
|
395
|
+
{ path: 'typography.align', label: 'Align', group: 'Typography', type: 'enum', options: NEON_ALIGNS, description: 'Row alignment for multi-line text.' },
|
|
396
|
+
{ path: 'neon.color', label: 'Neon colour', group: 'Colour', type: 'color', description: 'The primary colour; the others follow it unless set.' },
|
|
397
|
+
{ path: 'neon.tubeColor', label: 'Tube colour', group: 'Colour', type: 'color-or-null', description: 'The lit glass. null follows the neon colour.' },
|
|
398
|
+
{ path: 'neon.coreColor', label: 'Core colour', group: 'Colour', type: 'color-or-null', description: 'The hot centre line. null follows the neon colour.' },
|
|
399
|
+
{ path: 'neon.glowColor', label: 'Glow colour', group: 'Colour', type: 'color-or-null', description: 'The tight halo. null follows the neon colour.' },
|
|
400
|
+
{ path: 'neon.bloomColor', label: 'Bloom colour', group: 'Colour', type: 'color-or-null', description: 'The light on the wall. null follows the neon colour.' },
|
|
401
|
+
{ path: 'neon.intensity', label: 'Glow intensity', group: 'Light', type: 'number', min: 0, max: 3, step: 0.05, description: '0 is a bare tube; 1 the reference.' },
|
|
402
|
+
{ path: 'neon.bloomIntensity', label: 'Bloom intensity', group: 'Light', type: 'number', min: 0, max: 3, step: 0.05, description: 'The wall bloom’s own strength.' },
|
|
403
|
+
{ path: 'neon.tubeBrightness', label: 'Tube brightness', group: 'Light', type: 'number', min: 0, max: 1.5, step: 0.01, description: 'How bright the lit glass is.' },
|
|
404
|
+
{ path: 'neon.coreBrightness', label: 'Core brightness', group: 'Light', type: 'number', min: 0, max: 1.5, step: 0.01, description: 'How bright the hot centre line is.' },
|
|
405
|
+
{ path: 'neon.glowRadius', label: 'Glow radius', group: 'Light', type: 'number', min: 0, max: 200, step: 1, unit: 'units', description: 'Reach of the tight halo.' },
|
|
406
|
+
{ path: 'neon.bloomRadius', label: 'Bloom radius', group: 'Light', type: 'number', min: 0, max: 400, step: 1, unit: 'units', description: 'Reach of the wall bloom.' },
|
|
407
|
+
{ path: 'neon.coreWidth', label: 'Core width', group: 'Light', type: 'number', min: 0, max: 1, step: 0.01, unit: '× tube', description: 'The hot core, as a share of the tube.' },
|
|
408
|
+
{ path: 'neon.glassOpacity', label: 'Unlit glass', group: 'Light', type: 'number', min: 0, max: 1, step: 0.01, description: 'How much dark glass shows when the tube dims.' },
|
|
409
|
+
{ path: 'neon.shadow.enabled', label: 'Shadow', group: 'Light', type: 'boolean', description: 'The tube’s dark cast shadow on the wall.' },
|
|
410
|
+
{ path: 'neon.shadow.color', label: 'Shadow colour', group: 'Light', type: 'color', description: 'Shadow colour.' },
|
|
411
|
+
{ path: 'neon.shadow.opacity', label: 'Shadow opacity', group: 'Light', type: 'number', min: 0, max: 1, step: 0.01, description: 'Shadow strength.' },
|
|
412
|
+
{ path: 'neon.shadow.offsetX', label: 'Shadow x', group: 'Light', type: 'number', min: -0.5, max: 0.5, step: 0.005, unit: '× size', description: 'Shadow offset, across.' },
|
|
413
|
+
{ path: 'neon.shadow.offsetY', label: 'Shadow y', group: 'Light', type: 'number', min: -0.5, max: 0.5, step: 0.005, unit: '× size', description: 'Shadow offset, down.' },
|
|
414
|
+
{ path: 'neon.shadow.blur', label: 'Shadow blur', group: 'Light', type: 'number', min: 0, max: 100, step: 0.5, unit: 'units', description: 'Shadow softness.' },
|
|
415
|
+
{ path: 'animation.enabled', label: 'Animation', group: 'Animation', type: 'boolean', description: 'Flicker and glitch on or off.' },
|
|
416
|
+
{ path: 'animation.speed', label: 'Animation speed', group: 'Animation', type: 'number', min: 0.1, max: 5, step: 0.05, unit: '×', description: 'Plays everything faster or slower.' },
|
|
417
|
+
{ path: 'animation.seed', label: 'Seed', group: 'Animation', type: 'number', min: 0, max: 4294967295, step: 1, description: 'Same seed, same performance.' },
|
|
418
|
+
{ path: 'animation.flickerEnabled', label: 'Flicker', group: 'Flicker', type: 'boolean', description: 'Brightness flicker on or off.' },
|
|
419
|
+
{ path: 'animation.flickerIntensity', label: 'Flicker intensity', group: 'Flicker', type: 'number', min: 0, max: 1, step: 0.01, description: '0.25 plays the full hardware ranges.' },
|
|
420
|
+
{ path: 'animation.flickerFrequency', label: 'Flicker frequency', group: 'Flicker', type: 'number', min: 0, max: 5, step: 0.01, unit: '/ s', description: 'Noticeable flicker events per second.' },
|
|
421
|
+
{ path: 'animation.flickerSpeed', label: 'Flicker speed', group: 'Flicker', type: 'number', min: 0.1, max: 5, step: 0.05, unit: '×', description: 'How fast each flicker event plays.' },
|
|
422
|
+
{ path: 'animation.flickerRandomness', label: 'Randomness', group: 'Flicker', type: 'number', min: 0, max: 1, step: 0.01, description: 'How much events vary in depth and length.' },
|
|
423
|
+
{ path: 'animation.flickerRecovery', label: 'Recovery speed', group: 'Flicker', type: 'number', min: 0, max: 1, step: 0.01, description: 'How fast the tube comes back after a dip or failure.' },
|
|
424
|
+
{ path: 'animation.flickerMinBrightness', label: 'Minimum brightness', group: 'Flicker', type: 'number', min: 0, max: 1, step: 0.01, description: 'The tube never falls below this.' },
|
|
425
|
+
{ path: 'animation.glitchEnabled', label: 'Glitch', group: 'Glitch', type: 'boolean', description: 'Occasional glitches on or off.' },
|
|
426
|
+
{ path: 'animation.glitchIntensity', label: 'Glitch intensity', group: 'Glitch', type: 'number', min: 0, max: 1, step: 0.01, description: 'How far slices shift and colours split.' },
|
|
427
|
+
{ path: 'animation.glitchFrequency', label: 'Glitch frequency', group: 'Glitch', type: 'number', min: 0, max: 5, step: 0.01, unit: '/ s', description: 'Glitches per second.' },
|
|
428
|
+
{ path: 'animation.glitchDuration', label: 'Glitch duration', group: 'Glitch', type: 'number', min: 20, max: 2000, step: 10, unit: 'ms', description: 'A glitch’s typical length.' },
|
|
429
|
+
{ path: 'animation.glitchDisplacement', label: 'Horizontal displacement', group: 'Glitch', type: 'number', min: 0, max: 2, step: 0.05, unit: '×', description: 'The whole-sign sideways jump.' },
|
|
430
|
+
{ path: 'animation.glitchRgbSplit', label: 'RGB separation', group: 'Glitch', type: 'number', min: 0, max: 2, step: 0.05, unit: '×', description: 'The red/cyan split.' },
|
|
431
|
+
{ path: 'animation.glitchSlices', label: 'Slice displacement', group: 'Glitch', type: 'number', min: 0, max: 2, step: 0.05, unit: '×', description: 'How far the sliced bands shift.' },
|
|
432
|
+
{ path: 'animation.glitchGlowSeparation', label: 'Glow separation', group: 'Glitch', type: 'number', min: 0, max: 2, step: 0.05, unit: '×', description: 'How far the glow slips from the tube.' },
|
|
433
|
+
{ path: 'background', label: 'Background', group: 'Colour', type: 'color-or-null', description: 'A colour behind the sign, or null for transparent.' },
|
|
434
|
+
];
|
|
435
|
+
|
|
436
|
+
export function getPath(obj: unknown, path: string): unknown {
|
|
437
|
+
return path.split('.').reduce<unknown>((o, k) => (isObj(o) ? o[k] : undefined), obj);
|
|
438
|
+
}
|
|
439
|
+
export function setPath<T>(obj: T, path: string, value: unknown): T {
|
|
440
|
+
const [head, ...rest] = path.split('.');
|
|
441
|
+
const o = (isObj(obj) ? obj : {}) as Record<string, unknown>;
|
|
442
|
+
return { ...o, [head!]: rest.length ? setPath(o[head!], rest.join('.'), value) : value } as T;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export const MAX_NEON_TEXT_LENGTH = 200;
|
|
446
|
+
|
|
447
|
+
/** `[]` when the config can be drawn; otherwise every problem as `{ path, message }`. Never throws. */
|
|
448
|
+
export function validateNeonConfig(config: unknown): NeonConfigError[] {
|
|
449
|
+
const errors: NeonConfigError[] = [];
|
|
450
|
+
if (!isObj(config)) return [{ path: '', message: 'The config must be an object.' }];
|
|
451
|
+
for (const c of NEON_CONTROLS) {
|
|
452
|
+
const v = getPath(config, c.path);
|
|
453
|
+
const where = c.path;
|
|
454
|
+
if (c.type === 'text') {
|
|
455
|
+
if (typeof v !== 'string') errors.push({ path: where, message: 'Must be text.' });
|
|
456
|
+
else if (c.path === 'text' && v.length > MAX_NEON_TEXT_LENGTH) errors.push({ path: where, message: `At most ${MAX_NEON_TEXT_LENGTH} characters.` });
|
|
457
|
+
else if (c.path !== 'text' && !v.trim()) errors.push({ path: where, message: 'Must not be empty.' });
|
|
458
|
+
} else if (c.type === 'number') {
|
|
459
|
+
if (typeof v !== 'number' || !Number.isFinite(v)) errors.push({ path: where, message: 'Must be a number.' });
|
|
460
|
+
else if ((c.min !== undefined && v < c.min) || (c.max !== undefined && v > c.max)) errors.push({ path: where, message: `Must be between ${c.min} and ${c.max}.` });
|
|
461
|
+
} else if (c.type === 'boolean') {
|
|
462
|
+
if (typeof v !== 'boolean') errors.push({ path: where, message: 'Must be true or false.' });
|
|
463
|
+
} else if (c.type === 'enum') {
|
|
464
|
+
if (!c.options!.includes(v as string)) errors.push({ path: where, message: `Must be one of: ${c.options!.join(', ')}.` });
|
|
465
|
+
} else if (c.type === 'color') {
|
|
466
|
+
if (!isHexColor(v)) errors.push({ path: where, message: 'Must be a hex colour like #FF3B4D.' });
|
|
467
|
+
} else if (v !== null && !isHexColor(v)) {
|
|
468
|
+
errors.push({ path: where, message: 'Must be a hex colour like #FF3B4D, or null.' });
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return errors;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* **A config that can always be drawn.** Every field that fails validation is replaced by its
|
|
476
|
+
* default, and the problems are returned alongside, so a renderer never crashes and never half-draws.
|
|
477
|
+
*/
|
|
478
|
+
export function sanitizeNeonConfig(config: unknown): { config: NeonTextConfig; errors: NeonConfigError[] } {
|
|
479
|
+
const base = isObj(config) ? merge(DEFAULT_NEON_CONFIG, config) : DEFAULT_NEON_CONFIG;
|
|
480
|
+
const errors = validateNeonConfig(base);
|
|
481
|
+
let out = base;
|
|
482
|
+
for (const e of errors) out = e.path ? setPath(out, e.path, getPath(DEFAULT_NEON_CONFIG, e.path)) : DEFAULT_NEON_CONFIG;
|
|
483
|
+
return { config: out, errors: isObj(config) ? errors : [{ path: '', message: 'The config must be an object.' }] };
|
|
484
|
+
}
|