@appinternalleads/ui 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- 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 +85 -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 +289 -0
- package/dist/cjs/motion/typesurface/config.js.map +1 -0
- package/dist/cjs/motion/typesurface/construct.js +875 -0
- package/dist/cjs/motion/typesurface/construct.js.map +1 -0
- package/dist/cjs/motion/typesurface/engine.js +631 -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 +80 -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 +259 -0
- package/dist/cjs/motion/typesurface/presets.js.map +1 -0
- package/dist/cjs/motion/typesurface/renderer.js +738 -0
- package/dist/cjs/motion/typesurface/renderer.js.map +1 -0
- package/dist/cjs/motion/typesurface/shaders.js +322 -0
- package/dist/cjs/motion/typesurface/shaders.js.map +1 -0
- package/dist/cjs/motion/typesurface/surfaces.js +225 -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 +32 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js +81 -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 +284 -0
- package/dist/esm/motion/typesurface/config.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/config.js +280 -0
- package/dist/esm/motion/typesurface/config.js.map +1 -0
- package/dist/esm/motion/typesurface/construct.d.ts +284 -0
- package/dist/esm/motion/typesurface/construct.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/construct.js +866 -0
- package/dist/esm/motion/typesurface/construct.js.map +1 -0
- package/dist/esm/motion/typesurface/engine.d.ts +102 -0
- package/dist/esm/motion/typesurface/engine.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/engine.js +627 -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 +21 -0
- package/dist/esm/motion/typesurface/index.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/index.js +21 -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 +51 -0
- package/dist/esm/motion/typesurface/presets.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/presets.js +250 -0
- package/dist/esm/motion/typesurface/presets.js.map +1 -0
- package/dist/esm/motion/typesurface/renderer.d.ts +88 -0
- package/dist/esm/motion/typesurface/renderer.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/renderer.js +732 -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 +319 -0
- package/dist/esm/motion/typesurface/shaders.js.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts +108 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.js +216 -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/docs/TYPE-SURFACE.md +183 -0
- package/package.json +38 -2
- 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 +101 -0
- package/src/motion/typesurface/art.ts +639 -0
- package/src/motion/typesurface/config.ts +512 -0
- package/src/motion/typesurface/construct.ts +828 -0
- package/src/motion/typesurface/engine.ts +612 -0
- package/src/motion/typesurface/fonts.ts +63 -0
- package/src/motion/typesurface/index.ts +20 -0
- package/src/motion/typesurface/layout.ts +133 -0
- package/src/motion/typesurface/ops.ts +196 -0
- package/src/motion/typesurface/presets.ts +271 -0
- package/src/motion/typesurface/renderer.ts +639 -0
- package/src/motion/typesurface/shaders.ts +325 -0
- package/src/motion/typesurface/surfaces.ts +300 -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 +8010 -88
- package/tools/ask/dist/neon.js +69 -0
- package/tools/ask/mcp.mjs +166 -2
- package/tools/ask/neon-render.mjs +143 -0
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useRef, useState } from 'react';
|
|
4
3
|
import { Fit, RiveFileFactory, RiveView } from '@rive-app/react-native';
|
|
5
|
-
import { Box } from '../core';
|
|
6
|
-
import { HUE, blockRadii } from '../tokens';
|
|
7
|
-
import { ReceiptPaper } from '../components/onboarding/receipt-printer/ReceiptPaper';
|
|
8
|
-
import { RECEIPT_PRINTER_RIV } from '../components/onboarding/receipt-printer/riv';
|
|
9
|
-
import { stageAspect } from '../components/onboarding/receipt-printer/ReceiptStage.types';
|
|
10
4
|
import { ReceiptPrinter } from '../components/onboarding/receipt-printer/ReceiptPrinterView';
|
|
5
|
+
import { createRiveReceiptStage } from './riveReceiptStageFactory';
|
|
11
6
|
/**
|
|
12
7
|
* **The Receipt Printer's Rive printer, on iOS and Android** — the same `.riv`, the same feed, the
|
|
13
8
|
* same tear-off as the web, through `@rive-app/react-native` (which needs
|
|
@@ -22,153 +17,17 @@ import { ReceiptPrinter } from '../components/onboarding/receipt-printer/Receipt
|
|
|
22
17
|
* and trigger is followed by `playIfNeeded()`. Found on Android: without it, Print again after a
|
|
23
18
|
* print fired the trigger into a paused view, and nothing moved.
|
|
24
19
|
*
|
|
25
|
-
*
|
|
20
|
+
* **Since 29 Sep 2026 this is also the default** on native: the main entry point's `ReceiptPrinter`
|
|
21
|
+
* loads the runtime through an optional `require` and uses this printer whenever the app has
|
|
22
|
+
* installed `@rive-app/react-native`, falling back to the still when it has not. This entry point
|
|
23
|
+
* stays for apps that want to name the stage explicitly, or want a missing runtime to fail the
|
|
24
|
+
* build rather than fall back to the still:
|
|
26
25
|
*
|
|
27
26
|
* import { NativeReceiptPrinter } from '@comppack/ui/native/receipt-printer';
|
|
28
27
|
* <NativeReceiptPrinter preset="case1" />
|
|
29
28
|
* // or: <ReceiptPrinter stage={RiveReceiptStage} />
|
|
30
29
|
*/
|
|
31
|
-
const
|
|
32
|
-
const MACHINE = 'ReceiptPrinterMachine';
|
|
33
|
-
const LINE_KEYS = ['title', 'badge', 'total', 'meta', 'paymentMethod', 'message', 'paymentLabel', 'totalLabel'];
|
|
34
|
-
let bytes = null;
|
|
35
|
-
function rivBytes() {
|
|
36
|
-
if (!bytes) {
|
|
37
|
-
const bin = atob(RECEIPT_PRINTER_RIV);
|
|
38
|
-
const out = new Uint8Array(bin.length);
|
|
39
|
-
for (let i = 0; i < bin.length; i++)
|
|
40
|
-
out[i] = bin.charCodeAt(i);
|
|
41
|
-
bytes = out.buffer;
|
|
42
|
-
}
|
|
43
|
-
return bytes;
|
|
44
|
-
}
|
|
45
|
-
/** One file per app: parsing 280 kB once is enough for every printer on every screen. */
|
|
46
|
-
let filePromise = null;
|
|
47
|
-
const loadFile = () => (filePromise ??= RiveFileFactory.fromBytes(rivBytes(), undefined, false)
|
|
48
|
-
/* A load that failed is not kept: the next printer to mount tries again. */
|
|
49
|
-
.catch(e => { filePromise = null; throw e; }));
|
|
50
|
-
async function syncList(vm, path, model, rows) {
|
|
51
|
-
const list = vm.listProperty(path);
|
|
52
|
-
if (!list)
|
|
53
|
-
return;
|
|
54
|
-
let length = await list.getLengthAsync();
|
|
55
|
-
while (length > rows.length) {
|
|
56
|
-
await list.removeInstanceAtAsync(length - 1);
|
|
57
|
-
length--;
|
|
58
|
-
}
|
|
59
|
-
while (length < rows.length && model) {
|
|
60
|
-
const inst = await model.createBlankInstanceAsync();
|
|
61
|
-
if (!inst)
|
|
62
|
-
break;
|
|
63
|
-
await list.addInstanceAsync(inst);
|
|
64
|
-
length++;
|
|
65
|
-
}
|
|
66
|
-
for (let i = 0; i < rows.length; i++) {
|
|
67
|
-
const inst = await list.getInstanceAtAsync(i);
|
|
68
|
-
for (const [k, v] of Object.entries(rows[i]))
|
|
69
|
-
inst?.stringProperty(k)?.set(v);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async function writeLines(l, lines) {
|
|
73
|
-
for (const k of LINE_KEYS)
|
|
74
|
-
l.vm.stringProperty(k)?.set(lines[k]);
|
|
75
|
-
await syncList(l.vm, 'details', l.models.detail, lines.details);
|
|
76
|
-
await syncList(l.vm, 'items', l.models.item, lines.items);
|
|
77
|
-
l.vm.numberProperty('lineCount')?.set(Math.max(1, lines.items.length));
|
|
78
|
-
l.vm.numberProperty('detailCount')?.set(lines.details.length);
|
|
79
|
-
}
|
|
80
|
-
export function RiveReceiptStage({ lines, job, phase, reduceMotion, onPrinted, label, maxWidth, testID }) {
|
|
81
|
-
const [loaded, setLoaded] = useState(null);
|
|
82
|
-
const [failed, setFailed] = useState(false);
|
|
83
|
-
const [shown, setShown] = useState({ lines: Math.max(1, lines.items.length), fields: lines.details.length });
|
|
84
|
-
const view = useRef(null);
|
|
85
|
-
const queue = useRef(Promise.resolve());
|
|
86
|
-
/* Every change to the view model, in order — then wake the view, which pauses once it settles. */
|
|
87
|
-
const enqueue = (work) => {
|
|
88
|
-
queue.current = queue.current.then(work).then(() => view.current?.playIfNeeded()).catch(() => { });
|
|
89
|
-
};
|
|
90
|
-
const status = useRef('idle');
|
|
91
|
-
const started = useRef(null);
|
|
92
|
-
const latest = useRef(lines);
|
|
93
|
-
latest.current = lines;
|
|
94
|
-
const printed = useRef(onPrinted);
|
|
95
|
-
printed.current = onPrinted;
|
|
96
|
-
const write = (l, next) => enqueue(async () => {
|
|
97
|
-
await writeLines(l, next);
|
|
98
|
-
setShown({ lines: Math.max(1, next.items.length), fields: next.details.length });
|
|
99
|
-
});
|
|
100
|
-
/* Load the file, make the `Receipt` instance this view binds, and listen to where the paper is. */
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
let alive = true;
|
|
103
|
-
let stop;
|
|
104
|
-
(async () => {
|
|
105
|
-
const file = await loadFile();
|
|
106
|
-
const model = await file.viewModelByNameAsync('Receipt');
|
|
107
|
-
const vm = await model?.createDefaultInstanceAsync();
|
|
108
|
-
if (!vm)
|
|
109
|
-
throw new Error('The Receipt view model is missing.');
|
|
110
|
-
const l = {
|
|
111
|
-
file, vm,
|
|
112
|
-
models: { detail: await file.viewModelByNameAsync('ReceiptDetail'), item: await file.viewModelByNameAsync('ReceiptItem') },
|
|
113
|
-
};
|
|
114
|
-
/* The first lines go on before the view mounts, so its first frame is this receipt's length. */
|
|
115
|
-
await writeLines(l, latest.current);
|
|
116
|
-
if (!alive)
|
|
117
|
-
return;
|
|
118
|
-
setShown({ lines: Math.max(1, latest.current.items.length), fields: latest.current.details.length });
|
|
119
|
-
stop = vm.stringProperty('status')?.addListener(value => {
|
|
120
|
-
status.current = value;
|
|
121
|
-
/* Past a tear-off — a fresh feed, or the idle stub: the lines held back go on now. */
|
|
122
|
-
if (value === 'printing' || value === 'idle')
|
|
123
|
-
write(l, latest.current);
|
|
124
|
-
if (value === 'printed' && started.current !== null)
|
|
125
|
-
printed.current(started.current);
|
|
126
|
-
});
|
|
127
|
-
setLoaded(l);
|
|
128
|
-
})().catch(() => { if (alive)
|
|
129
|
-
setFailed(true); });
|
|
130
|
-
return () => { alive = false; stop?.(); };
|
|
131
|
-
}, []);
|
|
132
|
-
/* 1 · The lines — never onto a receipt on its way out (a reprint or a reset, with motion). */
|
|
133
|
-
useEffect(() => {
|
|
134
|
-
if (!loaded)
|
|
135
|
-
return;
|
|
136
|
-
loaded.vm.booleanProperty('reduceMotion')?.set(reduceMotion);
|
|
137
|
-
const leaving = status.current === 'tearing'
|
|
138
|
-
|| (status.current === 'printed' && !reduceMotion && (phase === 'idle' || started.current !== job));
|
|
139
|
-
if (!leaving)
|
|
140
|
-
write(loaded, lines);
|
|
141
|
-
}, [loaded, lines, phase, job, reduceMotion]);
|
|
142
|
-
/* 2 · The phase, as triggers — queued behind the lines. Each job is started once. */
|
|
143
|
-
useEffect(() => {
|
|
144
|
-
if (!loaded)
|
|
145
|
-
return;
|
|
146
|
-
if (phase === 'idle') {
|
|
147
|
-
started.current = null;
|
|
148
|
-
enqueue(() => { if (status.current !== 'idle')
|
|
149
|
-
loaded.vm.triggerProperty('reset')?.trigger(); });
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
if (started.current === job)
|
|
153
|
-
return;
|
|
154
|
-
started.current = job;
|
|
155
|
-
const reveal = reduceMotion || phase === 'printed';
|
|
156
|
-
enqueue(() => {
|
|
157
|
-
/* A reveal over a receipt already at rest changes no status: the new lines are this job's paper. */
|
|
158
|
-
if (reveal && status.current === 'printed') {
|
|
159
|
-
printed.current(job);
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
loaded.vm.triggerProperty(reveal ? 'reveal' : 'print')?.trigger();
|
|
163
|
-
});
|
|
164
|
-
}, [loaded, phase, job, reduceMotion]);
|
|
165
|
-
/* Without the runtime, the still — and a print completes at once. */
|
|
166
|
-
useEffect(() => { if (failed && phase === 'printing')
|
|
167
|
-
onPrinted(job); }, [failed, phase, job]);
|
|
168
|
-
if (failed)
|
|
169
|
-
return _jsx(ReceiptPaper, { lines: lines, phase: phase, maxWidth: maxWidth, label: label, testID: testID });
|
|
170
|
-
return (_jsx(Box, { testID: testID, role: "img", "aria-label": label, style: { width: '100%', maxWidth, aspectRatio: stageAspect(shown.lines, shown.fields), borderRadius: blockRadii.mid, overflow: 'hidden', backgroundColor: HUE.butter.hs }, children: loaded ? (_jsx(RiveView, { file: loaded.file, artboardName: ARTBOARD, stateMachineName: MACHINE, dataBind: loaded.vm, autoPlay: true, fit: Fit.Contain, onError: () => setFailed(true), hybridRef: { f: (ref) => { view.current = ref; } }, style: { width: '100%', height: '100%' } })) : null }));
|
|
171
|
-
}
|
|
30
|
+
export const RiveReceiptStage = createRiveReceiptStage({ Fit, RiveFileFactory, RiveView });
|
|
172
31
|
/** `ReceiptPrinter` with the animated Rive printer — for React Native apps that installed the runtime. */
|
|
173
32
|
export function NativeReceiptPrinter(props) {
|
|
174
33
|
return _jsx(ReceiptPrinter, { ...props, stage: RiveReceiptStage });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiveReceiptStage.js","sourceRoot":"","sources":["../../../src/native/RiveReceiptStage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RiveReceiptStage.js","sourceRoot":"","sources":["../../../src/native/RiveReceiptStage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,cAAc,EAA4B,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE3F,0GAA0G;AAC1G,MAAM,UAAU,oBAAoB,CAAC,KAAmE;IACtG,OAAO,KAAC,cAAc,OAAK,KAAK,EAAE,KAAK,EAAE,gBAAgB,GAAI,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import type { Fit as RiveFit, RiveFileFactory as RiveFileFactoryT, RiveView as RiveViewT } from '@rive-app/react-native';
|
|
3
|
+
import { type ReceiptStageProps } from '../components/onboarding/receipt-printer/ReceiptStage.types';
|
|
4
|
+
/**
|
|
5
|
+
* **The Receipt Printer's Rive printer on iOS and Android, as a factory over the runtime.**
|
|
6
|
+
*
|
|
7
|
+
* Everything about driving the printer is here: the view model, the ordered write queue,
|
|
8
|
+
* `playIfNeeded()` after every change, and the still when the runtime or file cannot load (see
|
|
9
|
+
* `RiveReceiptStage.tsx`). The runtime itself is passed in. That is why the default native stage
|
|
10
|
+
* (`components/onboarding/receipt-printer/ReceiptStage.tsx`) can animate with Rive whenever the
|
|
11
|
+
* app has installed it, without making every React Native app install it.
|
|
12
|
+
*/
|
|
13
|
+
export type RiveRuntime = {
|
|
14
|
+
Fit: typeof RiveFit;
|
|
15
|
+
RiveFileFactory: typeof RiveFileFactoryT;
|
|
16
|
+
RiveView: typeof RiveViewT;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Build the stage around a Rive runtime module. Taking the runtime as an argument — rather than
|
|
20
|
+
* importing it — is what lets the MAIN entry point use this file: its only reference to
|
|
21
|
+
* `@rive-app/react-native` is a type import, erased at build, so nothing here makes Metro resolve
|
|
22
|
+
* the runtime. Whoever calls this has already loaded it (statically in the opt-in entry point,
|
|
23
|
+
* through an optional `require` in the default native stage).
|
|
24
|
+
*/
|
|
25
|
+
export declare function createRiveReceiptStage({ Fit, RiveFileFactory, RiveView }: RiveRuntime): ComponentType<ReceiptStageProps>;
|
|
26
|
+
//# sourceMappingURL=riveReceiptStageFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"riveReceiptStageFactory.d.ts","sourceRoot":"","sources":["../../../src/native/riveReceiptStageFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,IAAI,OAAO,EAAY,eAAe,IAAI,gBAAgB,EAAE,QAAQ,IAAI,SAAS,EAA6C,MAAM,wBAAwB,CAAC;AAM9K,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,6DAA6D,CAAC;AAElH;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,OAAO,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,gBAAgB,CAAC;IAAC,QAAQ,EAAE,OAAO,SAAS,CAAA;CAAE,CAAC;AA2CxH;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,WAAW,GAAG,aAAa,CAAC,iBAAiB,CAAC,CA0GxH"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { Box } from '../core';
|
|
5
|
+
import { HUE, blockRadii } from '../tokens';
|
|
6
|
+
import { ReceiptPaper } from '../components/onboarding/receipt-printer/ReceiptPaper';
|
|
7
|
+
import { RECEIPT_PRINTER_RIV } from '../components/onboarding/receipt-printer/riv';
|
|
8
|
+
import { stageAspect } from '../components/onboarding/receipt-printer/ReceiptStage.types';
|
|
9
|
+
const ARTBOARD = 'ReceiptPrinter';
|
|
10
|
+
const MACHINE = 'ReceiptPrinterMachine';
|
|
11
|
+
const LINE_KEYS = ['title', 'badge', 'total', 'meta', 'paymentMethod', 'message', 'paymentLabel', 'totalLabel'];
|
|
12
|
+
let bytes = null;
|
|
13
|
+
function rivBytes() {
|
|
14
|
+
if (!bytes) {
|
|
15
|
+
const bin = atob(RECEIPT_PRINTER_RIV);
|
|
16
|
+
const out = new Uint8Array(bin.length);
|
|
17
|
+
for (let i = 0; i < bin.length; i++)
|
|
18
|
+
out[i] = bin.charCodeAt(i);
|
|
19
|
+
bytes = out.buffer;
|
|
20
|
+
}
|
|
21
|
+
return bytes;
|
|
22
|
+
}
|
|
23
|
+
async function syncList(vm, path, model, rows) {
|
|
24
|
+
const list = vm.listProperty(path);
|
|
25
|
+
if (!list)
|
|
26
|
+
return;
|
|
27
|
+
let length = await list.getLengthAsync();
|
|
28
|
+
while (length > rows.length) {
|
|
29
|
+
await list.removeInstanceAtAsync(length - 1);
|
|
30
|
+
length--;
|
|
31
|
+
}
|
|
32
|
+
while (length < rows.length && model) {
|
|
33
|
+
const inst = await model.createBlankInstanceAsync();
|
|
34
|
+
if (!inst)
|
|
35
|
+
break;
|
|
36
|
+
await list.addInstanceAsync(inst);
|
|
37
|
+
length++;
|
|
38
|
+
}
|
|
39
|
+
for (let i = 0; i < rows.length; i++) {
|
|
40
|
+
const inst = await list.getInstanceAtAsync(i);
|
|
41
|
+
for (const [k, v] of Object.entries(rows[i]))
|
|
42
|
+
inst?.stringProperty(k)?.set(v);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async function writeLines(l, lines) {
|
|
46
|
+
for (const k of LINE_KEYS)
|
|
47
|
+
l.vm.stringProperty(k)?.set(lines[k]);
|
|
48
|
+
await syncList(l.vm, 'details', l.models.detail, lines.details);
|
|
49
|
+
await syncList(l.vm, 'items', l.models.item, lines.items);
|
|
50
|
+
l.vm.numberProperty('lineCount')?.set(Math.max(1, lines.items.length));
|
|
51
|
+
l.vm.numberProperty('detailCount')?.set(lines.details.length);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build the stage around a Rive runtime module. Taking the runtime as an argument — rather than
|
|
55
|
+
* importing it — is what lets the MAIN entry point use this file: its only reference to
|
|
56
|
+
* `@rive-app/react-native` is a type import, erased at build, so nothing here makes Metro resolve
|
|
57
|
+
* the runtime. Whoever calls this has already loaded it (statically in the opt-in entry point,
|
|
58
|
+
* through an optional `require` in the default native stage).
|
|
59
|
+
*/
|
|
60
|
+
export function createRiveReceiptStage({ Fit, RiveFileFactory, RiveView }) {
|
|
61
|
+
/** One file per app: parsing 280 kB once is enough for every printer on every screen. */
|
|
62
|
+
let filePromise = null;
|
|
63
|
+
const loadFile = () => (filePromise ??= RiveFileFactory.fromBytes(rivBytes(), undefined, false)
|
|
64
|
+
/* A load that failed is not kept: the next printer to mount tries again. */
|
|
65
|
+
.catch(e => { filePromise = null; throw e; }));
|
|
66
|
+
return function RiveReceiptStage({ lines, job, phase, reduceMotion, onPrinted, label, maxWidth, testID }) {
|
|
67
|
+
const [loaded, setLoaded] = useState(null);
|
|
68
|
+
const [failed, setFailed] = useState(false);
|
|
69
|
+
const [shown, setShown] = useState({ lines: Math.max(1, lines.items.length), fields: lines.details.length });
|
|
70
|
+
const view = useRef(null);
|
|
71
|
+
const queue = useRef(Promise.resolve());
|
|
72
|
+
/* Every change to the view model, in order — then wake the view, which pauses once it settles. */
|
|
73
|
+
const enqueue = (work) => {
|
|
74
|
+
queue.current = queue.current.then(work).then(() => view.current?.playIfNeeded()).catch(() => { });
|
|
75
|
+
};
|
|
76
|
+
const status = useRef('idle');
|
|
77
|
+
const started = useRef(null);
|
|
78
|
+
const latest = useRef(lines);
|
|
79
|
+
latest.current = lines;
|
|
80
|
+
const printed = useRef(onPrinted);
|
|
81
|
+
printed.current = onPrinted;
|
|
82
|
+
const write = (l, next) => enqueue(async () => {
|
|
83
|
+
await writeLines(l, next);
|
|
84
|
+
setShown({ lines: Math.max(1, next.items.length), fields: next.details.length });
|
|
85
|
+
});
|
|
86
|
+
/* Load the file, make the `Receipt` instance this view binds, and listen to where the paper is. */
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
let alive = true;
|
|
89
|
+
let stop;
|
|
90
|
+
(async () => {
|
|
91
|
+
const file = await loadFile();
|
|
92
|
+
const model = await file.viewModelByNameAsync('Receipt');
|
|
93
|
+
const vm = await model?.createDefaultInstanceAsync();
|
|
94
|
+
if (!vm)
|
|
95
|
+
throw new Error('The Receipt view model is missing.');
|
|
96
|
+
const l = {
|
|
97
|
+
file, vm,
|
|
98
|
+
models: { detail: await file.viewModelByNameAsync('ReceiptDetail'), item: await file.viewModelByNameAsync('ReceiptItem') },
|
|
99
|
+
};
|
|
100
|
+
/* The first lines go on before the view mounts, so its first frame is this receipt's length. */
|
|
101
|
+
await writeLines(l, latest.current);
|
|
102
|
+
if (!alive)
|
|
103
|
+
return;
|
|
104
|
+
setShown({ lines: Math.max(1, latest.current.items.length), fields: latest.current.details.length });
|
|
105
|
+
stop = vm.stringProperty('status')?.addListener(value => {
|
|
106
|
+
status.current = value;
|
|
107
|
+
/* Past a tear-off — a fresh feed, or the idle stub: the lines held back go on now. */
|
|
108
|
+
if (value === 'printing' || value === 'idle')
|
|
109
|
+
write(l, latest.current);
|
|
110
|
+
if (value === 'printed' && started.current !== null)
|
|
111
|
+
printed.current(started.current);
|
|
112
|
+
});
|
|
113
|
+
setLoaded(l);
|
|
114
|
+
})().catch(() => { if (alive)
|
|
115
|
+
setFailed(true); });
|
|
116
|
+
return () => { alive = false; stop?.(); };
|
|
117
|
+
}, []);
|
|
118
|
+
/* 1 · The lines — never onto a receipt on its way out (a reprint or a reset, with motion). */
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (!loaded)
|
|
121
|
+
return;
|
|
122
|
+
loaded.vm.booleanProperty('reduceMotion')?.set(reduceMotion);
|
|
123
|
+
const leaving = status.current === 'tearing'
|
|
124
|
+
|| (status.current === 'printed' && !reduceMotion && (phase === 'idle' || started.current !== job));
|
|
125
|
+
if (!leaving)
|
|
126
|
+
write(loaded, lines);
|
|
127
|
+
}, [loaded, lines, phase, job, reduceMotion]);
|
|
128
|
+
/* 2 · The phase, as triggers — queued behind the lines. Each job is started once. */
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (!loaded)
|
|
131
|
+
return;
|
|
132
|
+
if (phase === 'idle') {
|
|
133
|
+
started.current = null;
|
|
134
|
+
enqueue(() => { if (status.current !== 'idle')
|
|
135
|
+
loaded.vm.triggerProperty('reset')?.trigger(); });
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (started.current === job)
|
|
139
|
+
return;
|
|
140
|
+
started.current = job;
|
|
141
|
+
const reveal = reduceMotion || phase === 'printed';
|
|
142
|
+
enqueue(() => {
|
|
143
|
+
/* A reveal over a receipt already at rest changes no status: the new lines are this job's paper. */
|
|
144
|
+
if (reveal && status.current === 'printed') {
|
|
145
|
+
printed.current(job);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
loaded.vm.triggerProperty(reveal ? 'reveal' : 'print')?.trigger();
|
|
149
|
+
});
|
|
150
|
+
}, [loaded, phase, job, reduceMotion]);
|
|
151
|
+
/* Without the runtime, the still — and a print completes at once. */
|
|
152
|
+
useEffect(() => { if (failed && phase === 'printing')
|
|
153
|
+
onPrinted(job); }, [failed, phase, job]);
|
|
154
|
+
if (failed)
|
|
155
|
+
return _jsx(ReceiptPaper, { lines: lines, phase: phase, maxWidth: maxWidth, label: label, testID: testID });
|
|
156
|
+
return (_jsx(Box, { testID: testID, role: "img", "aria-label": label, style: { width: '100%', maxWidth, aspectRatio: stageAspect(shown.lines, shown.fields), borderRadius: blockRadii.mid, overflow: 'hidden', backgroundColor: HUE.butter.hs }, children: loaded ? (_jsx(RiveView, { file: loaded.file, artboardName: ARTBOARD, stateMachineName: MACHINE, dataBind: loaded.vm, autoPlay: true, fit: Fit.Contain, onError: () => setFailed(true), hybridRef: { f: (ref) => { view.current = ref; } }, style: { width: '100%', height: '100%' } })) : null }));
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=riveReceiptStageFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"riveReceiptStageFactory.js","sourceRoot":"","sources":["../../../src/native/riveReceiptStageFactory.tsx"],"names":[],"mappings":";AAAA,O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EAAE,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,YACzN,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,QAAQ,IACP,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,YAAY,EAAE,QAAQ,EACtB,gBAAgB,EAAE,OAAO,EACzB,QAAQ,EAAE,MAAM,CAAC,EAAE,EACnB,QAAQ,QACR,GAAG,EAAE,GAAG,CAAC,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,GAAuB,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EACtE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GACxC,CACH,CAAC,CAAC,CAAC,IAAI,GACJ,CACP,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The ground a Rive animation is drawn on.** Animated Status's artboard (`rive/animated-status`)
|
|
3
|
+
* paints its white scenes on pure white; the stage behind the canvas, and the still that stands in
|
|
4
|
+
* for it, use the same so no seam shows while the runtime loads. Fixed design, not a theme colour.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ANIMATION_GROUND = "#FFFFFF";
|
|
7
|
+
//# sourceMappingURL=stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/tokens/stage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The ground a Rive animation is drawn on.** Animated Status's artboard (`rive/animated-status`)
|
|
3
|
+
* paints its white scenes on pure white; the stage behind the canvas, and the still that stands in
|
|
4
|
+
* for it, use the same so no seam shows while the runtime loads. Fixed design, not a theme colour.
|
|
5
|
+
*/
|
|
6
|
+
export const ANIMATION_GROUND = '#FFFFFF';
|
|
7
|
+
//# sourceMappingURL=stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage.js","sourceRoot":"","sources":["../../../src/tokens/stage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Typography × Surface — a lab for text that physically meets a surface
|
|
2
|
+
|
|
3
|
+
**Live:** `/animations/type-surface` · **Code:** `src/motion/typesurface/` (exported from `@comppack/ui/motion` as `TypeSurface`, plus `TypeSurfaceCanvas`)
|
|
4
|
+
· **Playground:** `site/components/TypeSurfaceStudio.tsx` · **Tests:** `tests/motion/typeSurface.test.ts`, `typeSurfaceConstruct.test.ts` · **Decisions:** `DECISIONS.md` §30
|
|
5
|
+
|
|
6
|
+
Type any words and they meet a surface. They wrap around it, land letter by letter, fold across a crease, crumple with the
|
|
7
|
+
paper, roll up with it, and finally sink into it as printed ink. The text is never painted into the artwork. It stays its own
|
|
8
|
+
editable layer the whole time, so changing BREAKING NEWS to SUMMER SALE, or the font, colour or size, never touches the newspaper.
|
|
9
|
+
|
|
10
|
+
Surfaces: **newspaper** (the detailed one), paper, bottle, wrapper and fabric. The lab also shows the library's existing
|
|
11
|
+
**paper-fold promo** (`PaperFoldPlayer`, unchanged) with the lab's text as its headline. Its result is the fold performed (the
|
|
12
|
+
middle of its folded hold), and it covers the stage. Neon has its own page
|
|
13
|
+
(`/animations/neon-text`) and is not part of the lab. Glass and metal were removed at the user's request.
|
|
14
|
+
|
|
15
|
+
Presets and states open on their **result**, with the operation already performed. **Replay** plays the transformation, and the timeline scrubs it.
|
|
16
|
+
The camera looks straight down with a narrow lens. Perspective was removed from every preset and state (`deformation.perspective` stays 0),
|
|
17
|
+
because it looked bad.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. How text geometry is represented
|
|
22
|
+
|
|
23
|
+
`layout.ts` lays the text out once into a **block** in *surface units* (every surface is 1000 wide). The block has lines, and each
|
|
24
|
+
glyph's box on its line, with kerning kept: a glyph starts where the width of everything before it ends. `text.ts` rasterises exactly
|
|
25
|
+
this layout, as white letters on nothing, into an alpha texture, using the live font. Colour, gradient, blend mode and ink are applied
|
|
26
|
+
in the shader on top of that mask. So a colour change repaints nothing, and only new words or a new font repaint the raster.
|
|
27
|
+
|
|
28
|
+
## 2. How surfaces are represented
|
|
29
|
+
|
|
30
|
+
`surfaces.ts`: a surface is **data**. It has a size in world units, a mesh resolution, an artwork painter (`art.ts`), a shading
|
|
31
|
+
model, what it lies on, its natural text material, and named **states** (flat, folded, double folded, rolled, partially folded,
|
|
32
|
+
crumpled, heavily crumpled…). Only a few have their own shape: a wrapper inflates and has crimped seals, and fabric drapes. Everything else comes from shared operators.
|
|
33
|
+
Every surface has full artwork, procedural and seeded (`art.ts`):
|
|
34
|
+
|
|
35
|
+
| surface | artwork | shading |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| newspaper | masthead, dateline, justified columns of real words, halftoned photos, advert, markets, delivery crease, fibres, the next page showing through; a back page, stacked pages, a loose page on the desk | newsprint: matte, a little light through the sheet |
|
|
38
|
+
| bottle | a paper label: winery line, descriptors, a red pen scribble, vintage and volume, a back label with a barcode where it wraps behind. The bottle is geometry: dark glass reflecting a studio (key softbox and strip light) with a crinkled foil capsule | label: satin paper; glass and foil use the studio reflection |
|
|
39
|
+
| wrapper | a glossy snack pack: brand band, sale burst behind the words, crisps, flavour ribbon, net weight, silver crimped seals | film: sharp specular plus studio reflection |
|
|
40
|
+
| paper | a ruled note sheet: blue rules, red margin, three real punched holes (the table shows through) | paper |
|
|
41
|
+
| fabric | twill-woven cotton with slubs, a hemmed edge with running stitch, a woven care label | cloth: rough, with sheen at grazing angles |
|
|
42
|
+
|
|
43
|
+
## 3. How deformation is applied
|
|
44
|
+
|
|
45
|
+
`ops.ts` holds the shared operators, and every one is an isometry of the sheet or close to one:
|
|
46
|
+
|
|
47
|
+
| operator | what it does |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `bend` | a crease: one side turns about a line through a rounded zone. Height above the sheet is carried through, so stacked layers fold together (`core` stops an inner layer from turning inside out on a second fold) |
|
|
50
|
+
| `roll` | winds the sheet up from an edge onto a tightening spiral, printed side outward |
|
|
51
|
+
| `cylinder` | wraps a cylinder, keeping arc length (a bottle label) |
|
|
52
|
+
| `crumpleField` | a seeded network of straight ridges and valleys with planar flanks, plus the in-plane pull the ridges take up |
|
|
53
|
+
| `rotate` | rigid turns of the whole object |
|
|
54
|
+
|
|
55
|
+
**Up to four folds and four wraps.** `fold`, `fold2`, `fold3` and `fold4` are creases. Each has a position, angle, crease width,
|
|
56
|
+
orientation, direction (over/under) and `side` (which part moves). `wrap1`–`wrap4` wrap the sheet round a rod from a line, with
|
|
57
|
+
a radius and an angle up to 360°. All eight are the same `bend` operator, applied in that order. A later one in the same
|
|
58
|
+
direction wraps the layers the earlier ones laid on its inner side. Parallel creases fold correctly when the farthest is
|
|
59
|
+
listed first, as the accordion preset does. Each has its own timeline key (`fold`…`fold4`, `wrap1`…`wrap4`).
|
|
60
|
+
|
|
61
|
+
`engine.ts` runs every sheet vertex through **shape → wrinkles → crumple → fold → second fold → roll → cylinder → turns**,
|
|
62
|
+
then computes normals, cavity (valleys darken) and crease light. The crumple field is cached per seed, and every buffer is
|
|
63
|
+
allocated once per surface, so a frame allocates nothing.
|
|
64
|
+
|
|
65
|
+
**The text mesh is made of the sheet's own cells** under the text block, with the same triangle diagonals. Each text vertex
|
|
66
|
+
blends from its *floating* position (the flat sheet, lifted above everything) to *the sheet vertex it belongs to*. A conformed
|
|
67
|
+
letter therefore lies on exactly the paper's triangles, crease for crease, and depth testing hides it behind folds. This is tested.
|
|
68
|
+
|
|
69
|
+
- **wrap** conforms the block, sweeping slightly left to right.
|
|
70
|
+
- **morph** lands glyphs one at a time: each glyph has its own window, the letters spread apart mid-way (`morphGap`), and in-flight letters arc up.
|
|
71
|
+
|
|
72
|
+
## 4. How material blending works
|
|
73
|
+
|
|
74
|
+
`material.blend` runs 0 → 1: **floating** (a flat graphic that casts a real shadow in the shadow map) → **surface** (takes the
|
|
75
|
+
key light, shadow and crease light) → **printed** (the blend mode is computed against the paper's own albedo under the letter, and
|
|
76
|
+
the paper grain breaks the ink up) → **embedded** (ragged edges, spread into the fibres, misregistration, and an optional halftone screen).
|
|
77
|
+
The sliders are ink strength, spread, roughness, paper influence, grain influence, halftone, displacement, surface contrast, float height,
|
|
78
|
+
float shadow, gloss and emboss.
|
|
79
|
+
|
|
80
|
+
## 5. How animation states are interpolated
|
|
81
|
+
|
|
82
|
+
`timeline.ts`: sliders say how **far** each transformation goes, and `animation.stages` say **when**. At progress p, a driven amount is
|
|
83
|
+
`value × envelope(p)`. The envelope is an eased ramp between `start` and `end`, optionally falling back between `outStart` and `outEnd`.
|
|
84
|
+
Envelopes are continuous, so scrubbing never jumps. The test samples every preset at 400 points to prove it.
|
|
85
|
+
|
|
86
|
+
## 6. Adding a surface
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
TypeSurface.registerSurface({ ...TypeSurface.SURFACES.paper, id: 'poster', name: 'Poster', width: 1, height: 1.4,
|
|
90
|
+
states: { flat: { label: 'Flat', deformation: {} }, curled: { label: 'Curled', deformation: { roll: { amount: 0.3 } } } }, defaultState: 'flat' });
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The id becomes a valid `surface.type`, and it gets every operator, the text mesh and the materials. The typography code is not touched.
|
|
94
|
+
|
|
95
|
+
## 7. Configuring an experiment (agents)
|
|
96
|
+
|
|
97
|
+
The whole experiment is one JSON object: `text`, `typography`, `placement`, `surface`, `deformation`, `material`, `view` and `animation`.
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { TypeSurface, TypeSurfaceCanvas } from '@comppack/ui/motion';
|
|
101
|
+
const config = TypeSurface.createTypeSurface({ text: 'SUMMER SALE', surface: 'newspaper', state: 'crumpled', font: 'Anton', color: '#E0271B' });
|
|
102
|
+
TypeSurface.validateTypeSurface(config); // [] or [{ path, message }] — never throws
|
|
103
|
+
TypeSurface.TS_CONTROLS; // every knob: path, range, unit, what it does
|
|
104
|
+
<TypeSurfaceCanvas config={config} progress={1} />
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`sanitizeTypeSurface` replaces each bad field with its default and names it, so a config always draws.
|
|
108
|
+
|
|
109
|
+
## 8. Constructing objects (agents)
|
|
110
|
+
|
|
111
|
+
A surface catalogue never covers what a user asks for, so objects are **built, not listed**. `construct.ts` is the construction
|
|
112
|
+
layer, and an object is JSON in the config's `object` field. When `object` is set it is what the text meets, and `surface.type` is ignored.
|
|
113
|
+
|
|
114
|
+
| level | what | where |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| primitives | `cylinder` (optionally hollow), `sphere`, `ring`, `revolve` (any `[radius, y]` profile), `tube` (a bar along a path), `box` | `TS_PRIMITIVES` |
|
|
117
|
+
| manipulators | `taper`, `flare`, `bulge`, `twist`, `bend`, `scale`, applied to a part in order | `TS_MANIPULATORS` |
|
|
118
|
+
| materials | `plastic`, `matte`, `ceramic`, `glass`, `metal`, `chrome`, in any colour | `TS_OBJECT_MATERIALS` |
|
|
119
|
+
| recipes | `tumbler`, `mug`, `can`, `bottle`: compositions of the above, returned as a plain spec to edit | `TS_RECIPES`, `createObject` |
|
|
120
|
+
| presets | the config an agent ends up with; save the JSON, edit it later | `object-tumbler`, `object-mug` |
|
|
121
|
+
|
|
122
|
+
`TypeSurface.describeConstruction()` is the machine-readable manifest: every primitive with its parameters (type, range, default,
|
|
123
|
+
hint) and the manipulators it accepts, every material, how text attaches, and a `limits` list of what cannot be done. Validation
|
|
124
|
+
reads the same tables, so the manifest cannot drift from what is accepted.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
// "a teal tumbler with Shekhar on it": a recipe, then edits
|
|
128
|
+
const cfg = TypeSurface.createTypeSurface({ text: 'Shekhar', object: 'tumbler', objectColor: '#1F8A8A', color: '#FFFFFF' });
|
|
129
|
+
|
|
130
|
+
// something with no recipe: compose it from the manifest
|
|
131
|
+
const vase: TypeSurface.TSObjectSpec = {
|
|
132
|
+
name: 'Vase',
|
|
133
|
+
parts: [
|
|
134
|
+
{ id: 'body', shape: 'revolve', params: { profile: [[0, 0], [0.22, 0], [0.4, 0.45], [0.3, 0.95], [0.16, 1.25], [0.2, 1.5]], smooth: true },
|
|
135
|
+
ops: [], material: { type: 'ceramic', color: '#2E5E8C' }, at: [0, 0, 0], rotate: [0, 0, 0] },
|
|
136
|
+
{ id: 'lip', shape: 'ring', params: { radius: 0.2, thickness: 0.018 }, ops: [], material: { type: 'ceramic', color: '#2E5E8C' }, at: [0, 1.5, 0], rotate: [0, 0, 0] },
|
|
137
|
+
],
|
|
138
|
+
text: { on: 'body', y: 0.3, height: 0.3, arc: 140, label: null }, // label: a hex colour for a paper label, null prints on the part
|
|
139
|
+
scene: { table: 'studio', backdrop: ['#d9dadc', '#b9bbbf'] },
|
|
140
|
+
};
|
|
141
|
+
TypeSurface.validateObject(vase); // [] or [{ path: 'object.parts.0.params.radius', message }]; never throws
|
|
142
|
+
const onVase = TypeSurface.createTypeSurface({ text: 'Iris', object: vase });
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**How it draws.** `objectSurface(spec)` turns the spec into a `SurfaceDef`: the parts become the solid (one triangle range and one
|
|
146
|
+
material per part), and a sheet the size of the text area wraps the part named in `text.on`. The sheet follows that part's radius at
|
|
147
|
+
every height (`radiusAt`), so text sits on a taper or a bulge. The sheet is hidden unless `text.label` asks for a paper label, so the
|
|
148
|
+
words read as printed on the object. Everything else is unchanged: the text is still its own layer with every typography, placement,
|
|
149
|
+
material and timeline control.
|
|
150
|
+
|
|
151
|
+
**Repair, not rejection.** `sanitizeObject` clamps numbers into range, fills omitted parameters from the manifest, drops parts and
|
|
152
|
+
manipulators that make no sense, moves the text to a part that can carry it, and names each fix by path. `object` becomes null only
|
|
153
|
+
when nothing in it can be drawn, and the config then falls back to its surface.
|
|
154
|
+
|
|
155
|
+
**Text size and ink.** `fitObjectText(config)` sets the font size to the largest that fits the part's front face (`OBJECT_FRONT_ARC`,
|
|
156
|
+
110° of the circumference) and the text area's height. `createTypeSurface({ object })` calls it, and with no `color` picks near-white
|
|
157
|
+
or near-black against the part. The rule itself is in the manifest under `text.sizing`.
|
|
158
|
+
|
|
159
|
+
**Looking at an object.** Turn the object, not the camera: the states `wrapped`, `lying`, `turned` and `tipped`, or `deformation.tiltX`
|
|
160
|
+
(turn) and `tiltY` (tip; negative shows the top). `view.yaw` and `view.pitch` orbit about the table and are wrong for a standing
|
|
161
|
+
object. The manifest's `view` section says this.
|
|
162
|
+
|
|
163
|
+
**Ready.** `TypeSurfaceCanvas` calls `onReady` and sets `data-ts-ready="true"` after the frame drawn with the loaded fonts
|
|
164
|
+
(`renderer.whenReady(config)` underneath). A screenshot script waits for that instead of a timeout.
|
|
165
|
+
|
|
166
|
+
**An object config says so.** `withObject` sets `surface.type` to `object`; no built-in surface name is left beside the object.
|
|
167
|
+
|
|
168
|
+
**Limits** (also in the manifest): no boolean cut or union; text wraps round parts only (cylinder, sphere, revolve, on the axis, kept
|
|
169
|
+
round); one text block per object; materials are opaque (glass is dark and reflective, not see-through); the lighting is fixed.
|
|
170
|
+
|
|
171
|
+
Rendered from this code: `docs/type-surface/constructed-objects.png` (tumbler, mug, steel tumbler, can, bottle, a vase with no recipe, a labelled bottle).
|
|
172
|
+
|
|
173
|
+
## 9. Debug view
|
|
174
|
+
|
|
175
|
+
The Debug tab shows the surface mesh, fold and roll lines, a deformation heat map, text bounds, baselines, surface normals,
|
|
176
|
+
control points and a mapping-coordinate checker, and can switch shadows off. **MOVE TEXT** drags the text across the surface by picking the nearest sheet vertex.
|
|
177
|
+
|
|
178
|
+
## 10. Known limits
|
|
179
|
+
|
|
180
|
+
- Renders with WebGL2. Without it, the component says so and does not draw.
|
|
181
|
+
- `next dev` returns 500 on this page, the same pre-existing CJS/React-Refresh bug as the neon page (DECISIONS §29). Use `next build && next start`.
|
|
182
|
+
- From the straight-down camera, gentle relief (a shallow accordion) reads through shading only. Orbit (drag) to see it from the side.
|
|
183
|
+
- A second fold over a stack is not strictly length-preserving on the inner layer (real stacked paper slips too).
|