motionary 10.9.0 → 11.0.0
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/AGENTS.md +1 -1
- package/CHANGELOG.md +32 -0
- package/README.md +119 -74
- package/README_ja.md +4 -4
- package/README_zh.md +4 -4
- package/dist/chunks/{anim-image-CnZDYmtv.js → anim-image-Btw3j5Qb.js} +2 -2
- package/dist/chunks/{anim-image-CnZDYmtv.js.map → anim-image-Btw3j5Qb.js.map} +1 -1
- package/dist/chunks/{anim-image-D1JZ7wOU.cjs → anim-image-DVv_vtbG.cjs} +2 -2
- package/dist/chunks/{anim-image-D1JZ7wOU.cjs.map → anim-image-DVv_vtbG.cjs.map} +1 -1
- package/dist/chunks/{three-scene-DibsZUID.js → gl-scene-BDA6FlGQ.js} +5 -11
- package/dist/chunks/gl-scene-BDA6FlGQ.js.map +1 -0
- package/dist/chunks/{three-scene-BFZnZuqp.cjs → gl-scene-SO5UU93S.cjs} +3 -10
- package/dist/chunks/gl-scene-SO5UU93S.cjs.map +1 -0
- package/dist/chunks/{keyframes-uYSI-do7.cjs → keyframes-4rb2WShh.cjs} +2 -2
- package/dist/chunks/{keyframes-uYSI-do7.cjs.map → keyframes-4rb2WShh.cjs.map} +1 -1
- package/dist/chunks/{keyframes-CLoYRGjR.js → keyframes-C9poRyzF.js} +2 -2
- package/dist/chunks/{keyframes-CLoYRGjR.js.map → keyframes-C9poRyzF.js.map} +1 -1
- package/dist/chunks/{lottie-player-UJHOl-8L.js → lottie-player-CPdwHhqe.js} +2 -2
- package/dist/chunks/{lottie-player-UJHOl-8L.js.map → lottie-player-CPdwHhqe.js.map} +1 -1
- package/dist/chunks/{lottie-player-Mcpt1H5w.cjs → lottie-player-DD1pnLN2.cjs} +2 -2
- package/dist/chunks/{lottie-player-Mcpt1H5w.cjs.map → lottie-player-DD1pnLN2.cjs.map} +1 -1
- package/dist/chunks/{physics-playground-BxnQyZ_V.cjs → physics-playground-B00t13Nz.cjs} +2 -2
- package/dist/chunks/{physics-playground-BxnQyZ_V.cjs.map → physics-playground-B00t13Nz.cjs.map} +1 -1
- package/dist/chunks/{physics-playground-B19qANJs.js → physics-playground-CluT_Nj9.js} +2 -2
- package/dist/chunks/{physics-playground-B19qANJs.js.map → physics-playground-CluT_Nj9.js.map} +1 -1
- package/dist/chunks/{registry-RJYrdUTF.js → registry-W7pXOwju.js} +3 -3
- package/dist/chunks/{registry-RJYrdUTF.js.map → registry-W7pXOwju.js.map} +1 -1
- package/dist/chunks/{registry-xGDPpmX2.cjs → registry-uaO8pDKn.cjs} +3 -3
- package/dist/chunks/{registry-xGDPpmX2.cjs.map → registry-uaO8pDKn.cjs.map} +1 -1
- package/dist/chunks/{runtime-link-GD9ayzxH.cjs → runtime-link-Bz3rGMsh.cjs} +2 -2
- package/dist/chunks/{runtime-link-GD9ayzxH.cjs.map → runtime-link-Bz3rGMsh.cjs.map} +1 -1
- package/dist/chunks/{runtime-link-CQyKFwE1.js → runtime-link-CP3qaRja.js} +2 -2
- package/dist/chunks/{runtime-link-CQyKFwE1.js.map → runtime-link-CP3qaRja.js.map} +1 -1
- package/dist/chunks/{scroll-scene-C-6sdMtR.cjs → scroll-scene-CeIosbEs.cjs} +3 -3
- package/dist/chunks/{scroll-scene-C-6sdMtR.cjs.map → scroll-scene-CeIosbEs.cjs.map} +1 -1
- package/dist/chunks/{scroll-scene-DtAaP0Aa.js → scroll-scene-eHhGcoDQ.js} +3 -3
- package/dist/chunks/{scroll-scene-DtAaP0Aa.js.map → scroll-scene-eHhGcoDQ.js.map} +1 -1
- package/dist/chunks/{ticker-C4VkAL4Y.js → ticker-D0qF_rV_.js} +2 -2
- package/dist/chunks/{ticker-C4VkAL4Y.js.map → ticker-D0qF_rV_.js.map} +1 -1
- package/dist/chunks/{ticker-DJuzcy1_.cjs → ticker-nshSbZ-Q.cjs} +2 -2
- package/dist/chunks/{ticker-DJuzcy1_.cjs.map → ticker-nshSbZ-Q.cjs.map} +1 -1
- package/dist/chunks/{tween-BHbiOBWO.cjs → tween-Df87h-1G.cjs} +2 -2
- package/dist/chunks/{tween-BHbiOBWO.cjs.map → tween-Df87h-1G.cjs.map} +1 -1
- package/dist/chunks/{tween-CrnzMeOU.js → tween-WepVA7id.js} +2 -2
- package/dist/chunks/{tween-CrnzMeOU.js.map → tween-WepVA7id.js.map} +1 -1
- package/dist/chunks/{worker-canvas-Bkwd1euX.js → worker-canvas-BZNHRLcu.js} +50 -3
- package/dist/chunks/worker-canvas-BZNHRLcu.js.map +1 -0
- package/dist/chunks/{worker-canvas-Ckc3R2Ye.cjs → worker-canvas-DW3VgtxO.cjs} +50 -2
- package/dist/chunks/worker-canvas-DW3VgtxO.cjs.map +1 -0
- package/dist/components/dotlottie.cjs +3 -3
- package/dist/components/dotlottie.d.cts +2 -1
- package/dist/components/dotlottie.d.ts +2 -1
- package/dist/components/dotlottie.js +3 -3
- package/dist/components/fx-perf.cjs +10 -5
- package/dist/components/fx-perf.cjs.map +1 -1
- package/dist/components/fx-perf.d.cts +6 -1
- package/dist/components/fx-perf.d.ts +6 -1
- package/dist/components/fx-perf.js +11 -6
- package/dist/components/fx-perf.js.map +1 -1
- package/dist/components/fx2.d.cts +6 -1
- package/dist/components/fx2.d.ts +6 -1
- package/dist/components/gl-model.cjs +3 -3
- package/dist/components/gl-model.d.cts +1 -1
- package/dist/components/gl-model.d.ts +1 -1
- package/dist/components/gl-model.js +3 -3
- package/dist/components/snap-carousel.cjs +2 -2
- package/dist/components/snap-carousel.js +2 -2
- package/dist/components/widgets.cjs +9 -9
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +10 -9
- package/dist/components/widgets.d.ts +10 -9
- package/dist/components/widgets.js +12 -12
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +301 -312
- package/dist/llms.txt +3 -4
- package/dist/manifest.json +271 -299
- package/dist/runtime/drag-snap.cjs +1 -1
- package/dist/runtime/drag-snap.js +1 -1
- package/dist/runtime/format-apng.cjs +4 -4
- package/dist/runtime/format-apng.js +4 -4
- package/dist/runtime/format-css.cjs +4 -4
- package/dist/runtime/format-css.js +4 -4
- package/dist/runtime/format-gif.cjs +4 -4
- package/dist/runtime/format-gif.js +4 -4
- package/dist/runtime/format-gltf.cjs +1 -1
- package/dist/runtime/format-gltf.js +1 -1
- package/dist/runtime/format-motion.cjs +4 -4
- package/dist/runtime/format-motion.js +4 -4
- package/dist/runtime/format-obj.cjs +1 -1
- package/dist/runtime/format-obj.js +1 -1
- package/dist/runtime/format-scene.cjs +1 -1
- package/dist/runtime/format-scene.js +1 -1
- package/dist/runtime/format-sprite.cjs +3 -3
- package/dist/runtime/format-sprite.js +3 -3
- package/dist/runtime/format-svg.cjs +3 -3
- package/dist/runtime/format-svg.js +3 -3
- package/dist/runtime/format-webp.cjs +4 -4
- package/dist/runtime/format-webp.js +4 -4
- package/dist/runtime/gl.cjs +1 -1
- package/dist/runtime/gl.js +1 -1
- package/dist/runtime/gltf-anim.cjs +1 -1
- package/dist/runtime/gltf-anim.js +1 -1
- package/dist/runtime/gltf-decoders.cjs +1 -1
- package/dist/runtime/gltf-decoders.js +1 -1
- package/dist/runtime/lottie-state.cjs +1 -1
- package/dist/runtime/lottie-state.js +1 -1
- package/dist/runtime/physics.cjs +1 -1
- package/dist/runtime/physics.js +1 -1
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/smooth.cjs +1 -1
- package/dist/runtime/smooth.js +1 -1
- package/dist/runtime/text.cjs +1 -1
- package/dist/runtime/text.js +1 -1
- package/dist/runtime/vector.cjs +66 -17
- package/dist/runtime/vector.cjs.map +1 -1
- package/dist/runtime/vector.d.cts +30 -6
- package/dist/runtime/vector.d.ts +30 -6
- package/dist/runtime/vector.iife.js +1 -1
- package/dist/runtime/vector.iife.js.map +1 -1
- package/dist/runtime/vector.js +65 -18
- package/dist/runtime/vector.js.map +1 -1
- package/dist/runtime.cjs +3 -3
- package/dist/runtime.d.cts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +5 -5
- package/dist/widgets/dotlottie.cjs +3 -3
- package/dist/widgets/dotlottie.js +3 -3
- package/dist/widgets/gl-model.cjs +3 -3
- package/dist/widgets/gl-model.js +3 -3
- package/dist/widgets/gl-scene.cjs +3 -3
- package/dist/widgets/gl-scene.js +3 -3
- package/dist/widgets/install-button.cjs.map +1 -1
- package/dist/widgets/install-button.js.map +1 -1
- package/dist/widgets/lottie-player.cjs +3 -3
- package/dist/widgets/lottie-player.js +3 -3
- package/dist/widgets/motion-inspector.cjs +1 -1
- package/dist/widgets/motion-inspector.js +1 -1
- package/dist/widgets/physics-playground.cjs +3 -3
- package/dist/widgets/physics-playground.js +3 -3
- package/dist/widgets/plugin-card.cjs +2 -2
- package/dist/widgets/plugin-card.js +2 -2
- package/dist/widgets/scroll-scene.cjs +3 -3
- package/dist/widgets/scroll-scene.js +3 -3
- package/dist/widgets/smooth-scroll.cjs +2 -2
- package/dist/widgets/smooth-scroll.js +2 -2
- package/dist/widgets/snap-carousel.cjs +2 -2
- package/dist/widgets/snap-carousel.js +2 -2
- package/dist/widgets/text-splitter.cjs +2 -2
- package/dist/widgets/text-splitter.js +2 -2
- package/dist/widgets/worker-canvas.cjs +1 -1
- package/dist/widgets/worker-canvas.js +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +44 -4
- package/docs/architecture.md +78 -0
- package/docs/compat-matrix.md +340 -0
- package/docs/components/README.md +1 -5
- package/docs/components/usa-accordion.md +1 -1
- package/docs/components/usa-acrylic.md +1 -1
- package/docs/components/usa-add-to-cart.md +1 -1
- package/docs/components/usa-ambient.md +1 -1
- package/docs/components/usa-anim-icon.md +1 -1
- package/docs/components/usa-audio.md +1 -1
- package/docs/components/usa-aurora.md +1 -1
- package/docs/components/usa-auto-animate.md +1 -1
- package/docs/components/usa-auto-skeleton.md +1 -1
- package/docs/components/usa-avatar-stack.md +1 -1
- package/docs/components/usa-back-to-top.md +1 -1
- package/docs/components/usa-badge-wall.md +1 -1
- package/docs/components/usa-badge.md +1 -1
- package/docs/components/usa-bar-chart.md +1 -1
- package/docs/components/usa-bg-generator.md +1 -1
- package/docs/components/usa-blobs.md +1 -1
- package/docs/components/usa-bottom-sheet.md +1 -1
- package/docs/components/usa-button.md +1 -1
- package/docs/components/usa-card-stack.md +1 -1
- package/docs/components/usa-card.md +1 -1
- package/docs/components/usa-carousel-3d.md +1 -1
- package/docs/components/usa-carousel.md +1 -1
- package/docs/components/usa-cart-drawer.md +1 -1
- package/docs/components/usa-chapter-nav.md +1 -1
- package/docs/components/usa-chat-composer.md +1 -1
- package/docs/components/usa-check.md +1 -1
- package/docs/components/usa-checkbox.md +1 -1
- package/docs/components/usa-click.md +1 -1
- package/docs/components/usa-clock-control.md +1 -1
- package/docs/components/usa-code-export.md +1 -1
- package/docs/components/usa-color-picker.md +1 -1
- package/docs/components/usa-command-palette.md +1 -1
- package/docs/components/usa-compare.md +1 -1
- package/docs/components/usa-countdown.md +1 -1
- package/docs/components/usa-counter.md +1 -1
- package/docs/components/usa-cube-gallery.md +1 -1
- package/docs/components/usa-cube.md +1 -1
- package/docs/components/usa-cursor.md +1 -1
- package/docs/components/usa-date-picker.md +1 -1
- package/docs/components/usa-depth.md +1 -1
- package/docs/components/usa-dialog.md +1 -1
- package/docs/components/usa-disclosure.md +1 -1
- package/docs/components/usa-distort.md +1 -1
- package/docs/components/usa-dock.md +1 -1
- package/docs/components/usa-dot-network.md +1 -1
- package/docs/components/usa-dotlottie.md +6 -6
- package/docs/components/usa-double-tap.md +1 -1
- package/docs/components/usa-draggable.md +1 -1
- package/docs/components/usa-draw.md +1 -1
- package/docs/components/usa-drawer.md +1 -1
- package/docs/components/usa-equalizer.md +1 -1
- package/docs/components/usa-fab.md +1 -1
- package/docs/components/usa-festival-banner.md +1 -1
- package/docs/components/usa-field.md +1 -1
- package/docs/components/usa-file-drop.md +1 -1
- package/docs/components/usa-fullpage.md +1 -1
- package/docs/components/usa-fx.md +1 -1
- package/docs/components/usa-gauge.md +1 -1
- package/docs/components/usa-gen-art.md +1 -1
- package/docs/components/usa-gesture-fx.md +1 -1
- package/docs/components/usa-gesture-sticker.md +1 -1
- package/docs/components/usa-gl-model.md +7 -7
- package/docs/components/usa-gl-scene.md +10 -10
- package/docs/components/usa-glitch.md +1 -1
- package/docs/components/usa-globe.md +1 -1
- package/docs/components/usa-gpu-particles.md +1 -1
- package/docs/components/usa-gradient-text.md +1 -1
- package/docs/components/usa-grain.md +1 -1
- package/docs/components/usa-grid-glow.md +1 -1
- package/docs/components/usa-gyro-card.md +1 -1
- package/docs/components/usa-handwriting.md +1 -1
- package/docs/components/usa-hero-video.md +1 -1
- package/docs/components/usa-hold.md +1 -1
- package/docs/components/usa-hud-panel.md +1 -1
- package/docs/components/usa-hydrate.md +1 -1
- package/docs/components/usa-icon-morph.md +1 -1
- package/docs/components/usa-install-button.md +3 -3
- package/docs/components/usa-kanban.md +1 -1
- package/docs/components/usa-keyframe-editor.md +1 -1
- package/docs/components/usa-kpi.md +1 -1
- package/docs/components/usa-leaderboard.md +1 -1
- package/docs/components/usa-like.md +1 -1
- package/docs/components/usa-liquid-nav.md +1 -1
- package/docs/components/usa-liquid.md +1 -1
- package/docs/components/usa-loading-bar.md +1 -1
- package/docs/components/usa-location-card.md +1 -1
- package/docs/components/usa-lottie-icon.md +1 -1
- package/docs/components/usa-lottie-player.md +5 -5
- package/docs/components/usa-lottie.md +1 -1
- package/docs/components/usa-lyrics.md +1 -1
- package/docs/components/usa-magnetic.md +1 -1
- package/docs/components/usa-marquee.md +1 -1
- package/docs/components/usa-mask-reveal.md +1 -1
- package/docs/components/usa-masonry-flow.md +1 -1
- package/docs/components/usa-masonry.md +1 -1
- package/docs/components/usa-menu-toggle.md +1 -1
- package/docs/components/usa-menu.md +1 -1
- package/docs/components/usa-message-list.md +1 -1
- package/docs/components/usa-milestones.md +1 -1
- package/docs/components/usa-modal.md +1 -1
- package/docs/components/usa-morph.md +1 -1
- package/docs/components/usa-motion-inspector.md +1 -1
- package/docs/components/usa-motion-prefs.md +1 -1
- package/docs/components/usa-motion-prompt.md +1 -1
- package/docs/components/usa-motion-spec.md +1 -1
- package/docs/components/usa-motion-switch.md +1 -1
- package/docs/components/usa-motion-theme.md +1 -1
- package/docs/components/usa-motion.md +1 -1
- package/docs/components/usa-music-player.md +1 -1
- package/docs/components/usa-native-preview.md +1 -1
- package/docs/components/usa-nav-morph.md +1 -1
- package/docs/components/usa-navbar.md +1 -1
- package/docs/components/usa-notification-bell.md +1 -1
- package/docs/components/usa-odometer.md +1 -1
- package/docs/components/usa-organic-card.md +1 -1
- package/docs/components/usa-otp.md +1 -1
- package/docs/components/usa-overscroll.md +1 -1
- package/docs/components/usa-pack.md +1 -1
- package/docs/components/usa-pagination.md +1 -1
- package/docs/components/usa-panorama.md +1 -1
- package/docs/components/usa-parallax-layers.md +1 -1
- package/docs/components/usa-particles.md +1 -1
- package/docs/components/usa-pause-all.md +1 -1
- package/docs/components/usa-perf-monitor.md +1 -1
- package/docs/components/usa-physics-playground.md +6 -6
- package/docs/components/usa-pinch-zoom.md +1 -1
- package/docs/components/usa-player.md +1 -1
- package/docs/components/usa-plugin-card.md +4 -4
- package/docs/components/usa-plugin-store.md +1 -1
- package/docs/components/usa-popover.md +1 -1
- package/docs/components/usa-post-fx.md +1 -1
- package/docs/components/usa-presence.md +1 -1
- package/docs/components/usa-press.md +1 -1
- package/docs/components/usa-prize-wheel.md +1 -1
- package/docs/components/usa-product-gallery.md +1 -1
- package/docs/components/usa-progress-ring.md +1 -1
- package/docs/components/usa-progress.md +1 -1
- package/docs/components/usa-prop-panel.md +1 -1
- package/docs/components/usa-pull-cord.md +1 -1
- package/docs/components/usa-pull-refresh.md +1 -1
- package/docs/components/usa-radar.md +1 -1
- package/docs/components/usa-reactions.md +1 -1
- package/docs/components/usa-red-envelope.md +1 -1
- package/docs/components/usa-retro-button.md +1 -1
- package/docs/components/usa-reveal.md +1 -1
- package/docs/components/usa-ripple.md +1 -1
- package/docs/components/usa-rive.md +3 -3
- package/docs/components/usa-route-transition.md +1 -1
- package/docs/components/usa-scene.md +1 -1
- package/docs/components/usa-scramble.md +1 -1
- package/docs/components/usa-scroll-highlight.md +1 -1
- package/docs/components/usa-scroll-progress.md +1 -1
- package/docs/components/usa-scroll-ring.md +1 -1
- package/docs/components/usa-scroll-scene.md +5 -5
- package/docs/components/usa-scrolly.md +1 -1
- package/docs/components/usa-segmented.md +1 -1
- package/docs/components/usa-shader-backdrop.md +1 -1
- package/docs/components/usa-shader.md +1 -1
- package/docs/components/usa-sheet.md +1 -1
- package/docs/components/usa-shimmer-text.md +1 -1
- package/docs/components/usa-shortcut.md +1 -1
- package/docs/components/usa-skeleton-reveal.md +1 -1
- package/docs/components/usa-skeleton.md +1 -1
- package/docs/components/usa-sketch-chart.md +1 -1
- package/docs/components/usa-slider.md +1 -1
- package/docs/components/usa-smooth-scroll.md +5 -5
- package/docs/components/usa-snap-carousel.md +5 -5
- package/docs/components/usa-sparkline.md +1 -1
- package/docs/components/usa-spatial-card.md +1 -1
- package/docs/components/usa-spinner.md +1 -1
- package/docs/components/usa-splash.md +1 -1
- package/docs/components/usa-split-text.md +1 -1
- package/docs/components/usa-spotlight.md +1 -1
- package/docs/components/usa-spring.md +1 -1
- package/docs/components/usa-stagger.md +1 -1
- package/docs/components/usa-star-rating.md +1 -1
- package/docs/components/usa-stepper.md +1 -1
- package/docs/components/usa-sticky-stack.md +1 -1
- package/docs/components/usa-sticky-wall.md +1 -1
- package/docs/components/usa-stories.md +1 -1
- package/docs/components/usa-story.md +1 -1
- package/docs/components/usa-suggestion-chips.md +1 -1
- package/docs/components/usa-swipe-deck.md +1 -1
- package/docs/components/usa-swipeable.md +1 -1
- package/docs/components/usa-switch.md +1 -1
- package/docs/components/usa-tab-bar.md +1 -1
- package/docs/components/usa-tabs.md +1 -1
- package/docs/components/usa-terminal.md +1 -1
- package/docs/components/usa-text-rotate.md +1 -1
- package/docs/components/usa-text-splitter.md +5 -5
- package/docs/components/usa-theme-surface.md +1 -1
- package/docs/components/usa-theme-switcher.md +1 -1
- package/docs/components/usa-tilt.md +1 -1
- package/docs/components/usa-timeline.md +1 -1
- package/docs/components/usa-tip.md +1 -1
- package/docs/components/usa-toast-stack.md +1 -1
- package/docs/components/usa-toaster.md +1 -1
- package/docs/components/usa-token-editor.md +1 -1
- package/docs/components/usa-typewriter.md +1 -1
- package/docs/components/usa-upload-progress.md +1 -1
- package/docs/components/usa-video-card.md +1 -1
- package/docs/components/usa-view-switch.md +1 -1
- package/docs/components/usa-voice-button.md +1 -1
- package/docs/components/usa-volume-knob.md +1 -1
- package/docs/components/usa-water-ripple.md +1 -1
- package/docs/components/usa-wave-text.md +1 -1
- package/docs/components/usa-weather-card.md +1 -1
- package/docs/components/usa-worker-canvas.md +1 -1
- package/docs/components/usa-xp-bar.md +1 -1
- package/docs/components.md +49 -49
- package/docs/deprecations.md +2 -0
- package/docs/entry-points.md +1 -2
- package/docs/runtime/core.md +2 -2
- package/docs/runtime/drag-snap.md +3 -3
- package/docs/runtime/format-apng.md +3 -3
- package/docs/runtime/format-css.md +3 -3
- package/docs/runtime/format-gif.md +3 -3
- package/docs/runtime/format-gltf.md +3 -3
- package/docs/runtime/format-motion.md +3 -3
- package/docs/runtime/format-obj.md +3 -3
- package/docs/runtime/format-scene.md +3 -3
- package/docs/runtime/format-sprite.md +3 -3
- package/docs/runtime/format-svg.md +3 -3
- package/docs/runtime/format-webp.md +3 -3
- package/docs/runtime/gl.md +3 -3
- package/docs/runtime/gltf-anim.md +3 -3
- package/docs/runtime/gltf-decoders.md +3 -3
- package/docs/runtime/lottie-state.md +3 -3
- package/docs/runtime/physics.md +3 -3
- package/docs/runtime/scroll.md +3 -3
- package/docs/runtime/smooth.md +3 -3
- package/docs/runtime/text.md +3 -3
- package/docs/runtime/vector.md +3 -3
- package/docs/upgrading-11.md +2 -2
- package/package.json +1 -11
- package/dist/chunks/three-scene-BFZnZuqp.cjs.map +0 -1
- package/dist/chunks/three-scene-DibsZUID.js.map +0 -1
- package/dist/chunks/worker-canvas-Bkwd1euX.js.map +0 -1
- package/dist/chunks/worker-canvas-Ckc3R2Ye.cjs.map +0 -1
- package/dist/widgets/three-scene.cjs +0 -11
- package/dist/widgets/three-scene.cjs.map +0 -1
- package/dist/widgets/three-scene.d.cts +0 -2
- package/dist/widgets/three-scene.d.ts +0 -2
- package/dist/widgets/three-scene.js +0 -5
- package/dist/widgets/three-scene.js.map +0 -1
- package/docs/components/usa-three-scene.md +0 -20
package/dist/chunks/{physics-playground-BxnQyZ_V.cjs.map → physics-playground-B00t13Nz.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"physics-playground-BxnQyZ_V.cjs","sources":["../../src/components/widgets/physics-playground.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { runtimeModule } from './runtime-link';\nimport type { PhysicsApi, World, Body } from '../../runtime/physics';\nimport type { FormatSceneApi, Scene } from '../../runtime/format-scene';\nimport css from './physics-playground.css?raw';\n\n/**\n * `<usa-physics-playground preset=\"pyramid\"></usa-physics-playground>` (10.7)\n * — a 2D rigid-body sandbox drawn on Canvas 2D, simulated by Motionary's own\n * **`motionary/runtime/physics`** and loaded from a **`motionary-scene@1`**\n * scene (`motionary/runtime/format-scene`). Requires `use(physics,\n * formatScene)` before it mounts.\n *\n * Attributes: `preset` (balls · pyramid · pendulum · dominoes), `src` (a\n * scene JSON URL) or an inline `<script type=\"application/json\">` scene,\n * `gravity` (px/s², default 980), `spawn` (click / tap empty space drops a\n * body), `paused`, `label`. Drag any dynamic body (pointer or touch);\n * arrow keys nudge the last body touched. Reduced motion: the scene is\n * settled off-screen and drawn once (dragging still works, one frame per\n * move). Only steps while visible.\n *\n * API: `world`, `bodies` (by scene id), `scene` (the loaded scene),\n * `reset()`, `play()`, `pause()`, `toScene()`; events `usa:load` ({ bodies,\n * format }), `usa:collision` (first contact between two dynamic bodies per\n * step), `usa:error`, `usa:runtime-missing`.\n */\nexport interface UsaPhysicsPlaygroundElement extends UsaElement {\n readonly world: World | null;\n readonly bodies: Record<string, Body>;\n readonly scene: Scene | null;\n reset(): void;\n play(): void;\n pause(): void;\n toScene(): Scene | null;\n}\n\nconst PALETTE = ['#818cf8', '#f472b6', '#34d399', '#fbbf24', '#38bdf8', '#fb7185'];\nconst W = 600, H = 360;\n\n/** The built-in scenes (motionary-scene@1). */\nexport const PHYSICS_PRESETS: Record<string, () => unknown> = {\n balls: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n materials: { rubber: { restitution: 0.75, friction: 0.3 } },\n bodies: Array.from({ length: 14 }, (_, i) => ({ id: `ball-${i}`, shape: 'circle', radius: 14 + ((i * 7) % 13), position: [60 + ((i * 83) % 480), 40 + (i % 4) * 30], material: 'rubber', style: { fill: PALETTE[i % PALETTE.length] } })),\n }),\n pyramid: () => {\n const bodies: any[] = [];\n const s = 34;\n for (let row = 0; row < 6; row++) for (let i = 0; i <= row; i++) bodies.push({ id: `box-${row}-${i}`, shape: 'box', size: [s, s], position: [W / 2 + (i - row / 2) * (s + 1), H - 12 - (6 - row) * s + s / 2], style: { fill: PALETTE[row % PALETTE.length] } });\n bodies.push({ id: 'ball', shape: 'circle', radius: 18, position: [80, 60], velocity: [420, 0], restitution: 0.4, density: 0.004, style: { fill: '#f8fafc' } });\n return { format: 'motionary-scene@1', world: { width: W, height: H, gravity: [0, 980], walls: true }, bodies };\n },\n pendulum: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [0, 1, 2, 3, 4].map((i) => ({ id: `bob-${i}`, shape: 'circle', radius: 20, position: [i === 0 ? 120 : 220 + i * 41, i === 0 ? 120 : 250], restitution: 0.95, friction: 0, style: { fill: PALETTE[i] } })),\n constraints: [0, 1, 2, 3, 4].map((i) => ({ type: 'pin', a: `bob-${i}`, point: [220 + i * 41, 40], length: i === 0 ? Math.hypot(220 - 120, 40 - 120) : 210, stiffness: 1 })),\n }),\n dominoes: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [\n ...Array.from({ length: 9 }, (_, i) => ({ id: `domino-${i}`, shape: 'box', size: [10, 70], position: [150 + i * 44, H - 35], friction: 0.6, style: { fill: PALETTE[i % PALETTE.length] } })),\n { id: 'ramp', shape: 'polygon', vertices: [[0, 0], [110, 70], [0, 70]], position: [40, H - 35], static: true, style: { fill: '#475569' } },\n { id: 'ball', shape: 'circle', radius: 14, position: [30, 40], density: 0.003, style: { fill: '#f8fafc' } },\n ],\n }),\n};\n\nexport function definePhysicsPlayground(tag = 'usa-physics-playground'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) => {\n class UsaPhysicsPlayground extends Base {\n static get observedAttributes(): string[] {\n return ['preset', 'src', 'gravity', 'spawn', 'label'];\n }\n private w: World | null = null;\n private byId: Record<string, Body> = {};\n private sc: Scene | null = null;\n private running = true;\n private redraw: (() => void) | null = null;\n private rebuild: (() => void) | null = null;\n get world(): World | null {\n return this.w;\n }\n get bodies(): Record<string, Body> {\n return this.byId;\n }\n get scene(): Scene | null {\n return this.sc;\n }\n reset(): void {\n this.rebuild?.();\n }\n play(): void {\n this.running = true;\n this.removeAttribute('paused');\n }\n pause(): void {\n this.running = false;\n this.setAttribute('paused', '');\n }\n toScene(): Scene | null {\n const F = runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!F || !this.w || !this.sc) return null;\n return F.worldToScene(this.w, { width: this.sc.world.width, height: this.sc.world.height, walls: !!this.sc.world.walls });\n }\n mount(): void {\n const P = runtimeModule<PhysicsApi>(this, 'physics');\n const F = P && runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!P || !F) return;\n this.running = !this.flag('paused');\n const canvas = document.createElement('canvas');\n canvas.setAttribute('role', 'img');\n canvas.setAttribute('aria-label', this.str('label', 'Physics playground'));\n canvas.tabIndex = 0;\n this.querySelector(':scope > canvas')?.remove();\n this.prepend(canvas);\n this.onCleanup(() => canvas.remove());\n const ctx = canvas.getContext('2d');\n let alive = true;\n this.onCleanup(() => (alive = false));\n let view = { s: 1, ox: 0, oy: 0 };\n let last: Body | null = null;\n let drag: ReturnType<PhysicsApi['dragConstraint']> | null = null;\n\n const draw = () => {\n if (!ctx || !this.w || !this.sc) return;\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const cw = Math.max(1, Math.round((canvas.clientWidth || W) * dpr)), ch = Math.max(1, Math.round((canvas.clientHeight || H) * dpr));\n if (canvas.width !== cw || canvas.height !== ch) Object.assign(canvas, { width: cw, height: ch });\n const { width, height } = this.sc.world;\n const s = Math.min(cw / width, ch / height);\n view = { s: s / dpr, ox: (cw - width * s) / 2 / dpr, oy: (ch - height * s) / 2 / dpr };\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, cw, ch);\n ctx.setTransform(s, 0, 0, s, (cw - width * s) / 2, (ch - height * s) / 2);\n for (const b of this.w.bodies) {\n const st: any = (b.data as any)?.style || {};\n if (!(b.data as any)?.id) continue; // walls from bounds()\n ctx.fillStyle = st.fill || (b.type === 'static' ? '#475569' : PALETTE[b.id % PALETTE.length]);\n ctx.globalAlpha = b.sleeping ? 0.85 : 1;\n ctx.beginPath();\n if (b.shape === 'circle') {\n ctx.arc(b.position.x, b.position.y, b.radius, 0, Math.PI * 2);\n ctx.fill();\n ctx.strokeStyle = 'rgba(15,23,42,.55)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(b.position.x, b.position.y);\n ctx.lineTo(b.position.x + Math.cos(b.angle) * b.radius, b.position.y + Math.sin(b.angle) * b.radius);\n ctx.stroke();\n } else {\n const vs = b.worldVerts();\n vs.forEach((p, i) => (i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y)));\n ctx.closePath();\n ctx.fill();\n }\n }\n ctx.globalAlpha = 1;\n ctx.strokeStyle = 'rgba(148,163,184,.6)';\n ctx.lineWidth = 1.5;\n for (const c of this.w.constraints) {\n const a = c.worldA(), b = c.worldB();\n ctx.beginPath();\n ctx.moveTo(a.x, a.y);\n ctx.lineTo(b.x, b.y);\n ctx.stroke();\n }\n };\n this.redraw = draw;\n\n const build = (json: unknown) => {\n try {\n const g = this.str('gravity');\n const sceneJson: any = JSON.parse(JSON.stringify(json));\n if (g && sceneJson?.world) sceneJson.world.gravity = [0, Number(g)];\n const r = F.sceneToWorld(sceneJson);\n this.w = r.world;\n this.byId = r.bodies;\n this.sc = r.scene;\n let seen = '';\n r.world.onCollision((m) => {\n if (m.a.type !== 'dynamic' || m.b.type !== 'dynamic' || m.a.sensor || m.b.sensor) return;\n const k = String(r.world.steps);\n if (seen === k) return;\n seen = k;\n this.emit('collision', { a: (m.a.data as any)?.id, b: (m.b.data as any)?.id });\n });\n if (this.reduced) for (let i = 0; i < 240; i++) r.world.step();\n draw();\n this.emit('load', { bodies: Object.keys(r.bodies).length, format: r.scene.format });\n } catch (e: any) {\n this.emit('error', { error: String(e?.message || e) });\n }\n };\n const load = () => {\n const inline = this.querySelector(':scope > script[type=\"application/json\"]');\n const src = this.str('src');\n if (inline) return build(JSON.parse(inline.textContent || '{}'));\n if (src) {\n fetch(new URL(src, location.href).href)\n .then((r) => r.json())\n .then((j) => alive && build(j))\n .catch((e) => this.emit('error', { error: String(e?.message || e) }));\n return;\n }\n build((PHYSICS_PRESETS[this.str('preset', 'balls')] || PHYSICS_PRESETS.balls)());\n };\n this.rebuild = load;\n load();\n\n const toWorld = (e: PointerEvent) => {\n const r = canvas.getBoundingClientRect();\n return [(e.clientX - r.left - view.ox) / view.s, (e.clientY - r.top - view.oy) / view.s];\n };\n this.listen(canvas, 'pointerdown', (e: PointerEvent) => {\n if (!this.w) return;\n const [x, y] = toWorld(e);\n const hit = this.w.query(x, y).find((b) => b.type === 'dynamic');\n if (hit) {\n last = hit;\n drag = P.dragConstraint(this.w, hit, x, y);\n canvas.setPointerCapture?.(e.pointerId);\n } else if (this.flag('spawn')) {\n const n = Object.keys(this.byId).length;\n const id = `spawn-${n}`;\n this.byId[id] = this.w.body({ shape: n % 2 ? 'box' : 'circle', x, y, radius: 16, width: 30, height: 30, restitution: 0.4, data: { id, style: { fill: PALETTE[n % PALETTE.length] } }, label: id });\n last = this.byId[id];\n if (this.reduced) draw();\n }\n });\n this.listen(canvas, 'pointermove', (e: PointerEvent) => {\n if (!drag) return;\n const [x, y] = toWorld(e);\n drag.move(x, y);\n if (this.reduced && this.w) {\n for (let i = 0; i < 4; i++) this.w.step();\n draw();\n }\n });\n const up = () => {\n drag?.release();\n drag = null;\n };\n this.listen(canvas, 'pointerup', up);\n this.listen(canvas, 'pointercancel', up);\n this.listen(canvas, 'keydown', (e: KeyboardEvent) => {\n const b = last || Object.values(this.byId).find((x) => x.type === 'dynamic');\n const d: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };\n if (!b || !d[e.key]) return;\n e.preventDefault();\n b.applyImpulse({ x: d[e.key][0] * 200 * b.mass, y: d[e.key][1] * 300 * b.mass });\n b.wake();\n if (this.reduced && this.w) {\n for (let i = 0; i < 30; i++) this.w.step();\n draw();\n }\n });\n\n let visible = true;\n this.inView((v) => (visible = v));\n if (this.reduced) return;\n let prev = 0;\n const loop = (now: number) => {\n if (!alive) return;\n requestAnimationFrame(loop);\n const dt = prev ? Math.min(0.05, (now - prev) / 1000) : 1 / 60;\n prev = now;\n if (!visible || !this.w) return;\n if (this.running) this.w.update(dt);\n draw();\n };\n requestAnimationFrame(loop);\n }\n }\n return UsaPhysicsPlayground as unknown as CustomElementConstructor;\n },\n { id: 'physics-playground', text: css }\n );\n}\n"],"names":["defineElement","runtimeModule"],"mappings":";;;;;;;AAoCA,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,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BAAA,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;AAC1C,wBAAA,IAAI,EAAE;oBACR;AACF,gBAAA,CAAC,CAAC;gBAEF,IAAI,OAAO,GAAG,IAAI;AAClB,gBAAA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;gBACjC,IAAI,IAAI,CAAC,OAAO;oBAAE;gBAClB,IAAI,IAAI,GAAG,CAAC;AACZ,gBAAA,MAAM,IAAI,GAAG,CAAC,GAAW,KAAI;AAC3B,oBAAA,IAAI,CAAC,KAAK;wBAAE;oBACZ,qBAAqB,CAAC,IAAI,CAAC;oBAC3B,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;oBAC9D,IAAI,GAAG,GAAG;AACV,oBAAA,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;wBAAE;oBACzB,IAAI,IAAI,CAAC,OAAO;AAAE,wBAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;AACnC,oBAAA,IAAI,EAAE;AACR,gBAAA,CAAC;gBACD,qBAAqB,CAAC,IAAI,CAAC;YAC7B;AACD;AACD,QAAA,OAAO,oBAA2D;IACpE,CAAC,EACD,EAAE,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CACxC;AACH;;;"}
|
|
1
|
+
{"version":3,"file":"physics-playground-B00t13Nz.cjs","sources":["../../src/components/widgets/physics-playground.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { runtimeModule } from './runtime-link';\nimport type { PhysicsApi, World, Body } from '../../runtime/physics';\nimport type { FormatSceneApi, Scene } from '../../runtime/format-scene';\nimport css from './physics-playground.css?raw';\n\n/**\n * `<usa-physics-playground preset=\"pyramid\"></usa-physics-playground>` (10.7)\n * — a 2D rigid-body sandbox drawn on Canvas 2D, simulated by Motionary's own\n * **`motionary/runtime/physics`** and loaded from a **`motionary-scene@1`**\n * scene (`motionary/runtime/format-scene`). Requires `use(physics,\n * formatScene)` before it mounts.\n *\n * Attributes: `preset` (balls · pyramid · pendulum · dominoes), `src` (a\n * scene JSON URL) or an inline `<script type=\"application/json\">` scene,\n * `gravity` (px/s², default 980), `spawn` (click / tap empty space drops a\n * body), `paused`, `label`. Drag any dynamic body (pointer or touch);\n * arrow keys nudge the last body touched. Reduced motion: the scene is\n * settled off-screen and drawn once (dragging still works, one frame per\n * move). Only steps while visible.\n *\n * API: `world`, `bodies` (by scene id), `scene` (the loaded scene),\n * `reset()`, `play()`, `pause()`, `toScene()`; events `usa:load` ({ bodies,\n * format }), `usa:collision` (first contact between two dynamic bodies per\n * step), `usa:error`, `usa:runtime-missing`.\n */\nexport interface UsaPhysicsPlaygroundElement extends UsaElement {\n readonly world: World | null;\n readonly bodies: Record<string, Body>;\n readonly scene: Scene | null;\n reset(): void;\n play(): void;\n pause(): void;\n toScene(): Scene | null;\n}\n\nconst PALETTE = ['#818cf8', '#f472b6', '#34d399', '#fbbf24', '#38bdf8', '#fb7185'];\nconst W = 600, H = 360;\n\n/** The built-in scenes (motionary-scene@1). */\nexport const PHYSICS_PRESETS: Record<string, () => unknown> = {\n balls: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n materials: { rubber: { restitution: 0.75, friction: 0.3 } },\n bodies: Array.from({ length: 14 }, (_, i) => ({ id: `ball-${i}`, shape: 'circle', radius: 14 + ((i * 7) % 13), position: [60 + ((i * 83) % 480), 40 + (i % 4) * 30], material: 'rubber', style: { fill: PALETTE[i % PALETTE.length] } })),\n }),\n pyramid: () => {\n const bodies: any[] = [];\n const s = 34;\n for (let row = 0; row < 6; row++) for (let i = 0; i <= row; i++) bodies.push({ id: `box-${row}-${i}`, shape: 'box', size: [s, s], position: [W / 2 + (i - row / 2) * (s + 1), H - 12 - (6 - row) * s + s / 2], style: { fill: PALETTE[row % PALETTE.length] } });\n bodies.push({ id: 'ball', shape: 'circle', radius: 18, position: [80, 60], velocity: [420, 0], restitution: 0.4, density: 0.004, style: { fill: '#f8fafc' } });\n return { format: 'motionary-scene@1', world: { width: W, height: H, gravity: [0, 980], walls: true }, bodies };\n },\n pendulum: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [0, 1, 2, 3, 4].map((i) => ({ id: `bob-${i}`, shape: 'circle', radius: 20, position: [i === 0 ? 120 : 220 + i * 41, i === 0 ? 120 : 250], restitution: 0.95, friction: 0, style: { fill: PALETTE[i] } })),\n constraints: [0, 1, 2, 3, 4].map((i) => ({ type: 'pin', a: `bob-${i}`, point: [220 + i * 41, 40], length: i === 0 ? Math.hypot(220 - 120, 40 - 120) : 210, stiffness: 1 })),\n }),\n dominoes: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [\n ...Array.from({ length: 9 }, (_, i) => ({ id: `domino-${i}`, shape: 'box', size: [10, 70], position: [150 + i * 44, H - 35], friction: 0.6, style: { fill: PALETTE[i % PALETTE.length] } })),\n { id: 'ramp', shape: 'polygon', vertices: [[0, 0], [110, 70], [0, 70]], position: [40, H - 35], static: true, style: { fill: '#475569' } },\n { id: 'ball', shape: 'circle', radius: 14, position: [30, 40], density: 0.003, style: { fill: '#f8fafc' } },\n ],\n }),\n};\n\nexport function definePhysicsPlayground(tag = 'usa-physics-playground'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) => {\n class UsaPhysicsPlayground extends Base {\n static get observedAttributes(): string[] {\n return ['preset', 'src', 'gravity', 'spawn', 'label'];\n }\n private w: World | null = null;\n private byId: Record<string, Body> = {};\n private sc: Scene | null = null;\n private running = true;\n private redraw: (() => void) | null = null;\n private rebuild: (() => void) | null = null;\n get world(): World | null {\n return this.w;\n }\n get bodies(): Record<string, Body> {\n return this.byId;\n }\n get scene(): Scene | null {\n return this.sc;\n }\n reset(): void {\n this.rebuild?.();\n }\n play(): void {\n this.running = true;\n this.removeAttribute('paused');\n }\n pause(): void {\n this.running = false;\n this.setAttribute('paused', '');\n }\n toScene(): Scene | null {\n const F = runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!F || !this.w || !this.sc) return null;\n return F.worldToScene(this.w, { width: this.sc.world.width, height: this.sc.world.height, walls: !!this.sc.world.walls });\n }\n mount(): void {\n const P = runtimeModule<PhysicsApi>(this, 'physics');\n const F = P && runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!P || !F) return;\n this.running = !this.flag('paused');\n const canvas = document.createElement('canvas');\n canvas.setAttribute('role', 'img');\n canvas.setAttribute('aria-label', this.str('label', 'Physics playground'));\n canvas.tabIndex = 0;\n this.querySelector(':scope > canvas')?.remove();\n this.prepend(canvas);\n this.onCleanup(() => canvas.remove());\n const ctx = canvas.getContext('2d');\n let alive = true;\n this.onCleanup(() => (alive = false));\n let view = { s: 1, ox: 0, oy: 0 };\n let last: Body | null = null;\n let drag: ReturnType<PhysicsApi['dragConstraint']> | null = null;\n\n const draw = () => {\n if (!ctx || !this.w || !this.sc) return;\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const cw = Math.max(1, Math.round((canvas.clientWidth || W) * dpr)), ch = Math.max(1, Math.round((canvas.clientHeight || H) * dpr));\n if (canvas.width !== cw || canvas.height !== ch) Object.assign(canvas, { width: cw, height: ch });\n const { width, height } = this.sc.world;\n const s = Math.min(cw / width, ch / height);\n view = { s: s / dpr, ox: (cw - width * s) / 2 / dpr, oy: (ch - height * s) / 2 / dpr };\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, cw, ch);\n ctx.setTransform(s, 0, 0, s, (cw - width * s) / 2, (ch - height * s) / 2);\n for (const b of this.w.bodies) {\n const st: any = (b.data as any)?.style || {};\n if (!(b.data as any)?.id) continue; // walls from bounds()\n ctx.fillStyle = st.fill || (b.type === 'static' ? '#475569' : PALETTE[b.id % PALETTE.length]);\n ctx.globalAlpha = b.sleeping ? 0.85 : 1;\n ctx.beginPath();\n if (b.shape === 'circle') {\n ctx.arc(b.position.x, b.position.y, b.radius, 0, Math.PI * 2);\n ctx.fill();\n ctx.strokeStyle = 'rgba(15,23,42,.55)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(b.position.x, b.position.y);\n ctx.lineTo(b.position.x + Math.cos(b.angle) * b.radius, b.position.y + Math.sin(b.angle) * b.radius);\n ctx.stroke();\n } else {\n const vs = b.worldVerts();\n vs.forEach((p, i) => (i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y)));\n ctx.closePath();\n ctx.fill();\n }\n }\n ctx.globalAlpha = 1;\n ctx.strokeStyle = 'rgba(148,163,184,.6)';\n ctx.lineWidth = 1.5;\n for (const c of this.w.constraints) {\n const a = c.worldA(), b = c.worldB();\n ctx.beginPath();\n ctx.moveTo(a.x, a.y);\n ctx.lineTo(b.x, b.y);\n ctx.stroke();\n }\n };\n this.redraw = draw;\n\n const build = (json: unknown) => {\n try {\n const g = this.str('gravity');\n const sceneJson: any = JSON.parse(JSON.stringify(json));\n if (g && sceneJson?.world) sceneJson.world.gravity = [0, Number(g)];\n const r = F.sceneToWorld(sceneJson);\n this.w = r.world;\n this.byId = r.bodies;\n this.sc = r.scene;\n let seen = '';\n r.world.onCollision((m) => {\n if (m.a.type !== 'dynamic' || m.b.type !== 'dynamic' || m.a.sensor || m.b.sensor) return;\n const k = String(r.world.steps);\n if (seen === k) return;\n seen = k;\n this.emit('collision', { a: (m.a.data as any)?.id, b: (m.b.data as any)?.id });\n });\n if (this.reduced) for (let i = 0; i < 240; i++) r.world.step();\n draw();\n this.emit('load', { bodies: Object.keys(r.bodies).length, format: r.scene.format });\n } catch (e: any) {\n this.emit('error', { error: String(e?.message || e) });\n }\n };\n const load = () => {\n const inline = this.querySelector(':scope > script[type=\"application/json\"]');\n const src = this.str('src');\n if (inline) return build(JSON.parse(inline.textContent || '{}'));\n if (src) {\n fetch(new URL(src, location.href).href)\n .then((r) => r.json())\n .then((j) => alive && build(j))\n .catch((e) => this.emit('error', { error: String(e?.message || e) }));\n return;\n }\n build((PHYSICS_PRESETS[this.str('preset', 'balls')] || PHYSICS_PRESETS.balls)());\n };\n this.rebuild = load;\n load();\n\n const toWorld = (e: PointerEvent) => {\n const r = canvas.getBoundingClientRect();\n return [(e.clientX - r.left - view.ox) / view.s, (e.clientY - r.top - view.oy) / view.s];\n };\n this.listen(canvas, 'pointerdown', (e: PointerEvent) => {\n if (!this.w) return;\n const [x, y] = toWorld(e);\n const hit = this.w.query(x, y).find((b) => b.type === 'dynamic');\n if (hit) {\n last = hit;\n drag = P.dragConstraint(this.w, hit, x, y);\n canvas.setPointerCapture?.(e.pointerId);\n } else if (this.flag('spawn')) {\n const n = Object.keys(this.byId).length;\n const id = `spawn-${n}`;\n this.byId[id] = this.w.body({ shape: n % 2 ? 'box' : 'circle', x, y, radius: 16, width: 30, height: 30, restitution: 0.4, data: { id, style: { fill: PALETTE[n % PALETTE.length] } }, label: id });\n last = this.byId[id];\n if (this.reduced) draw();\n }\n });\n this.listen(canvas, 'pointermove', (e: PointerEvent) => {\n if (!drag) return;\n const [x, y] = toWorld(e);\n drag.move(x, y);\n if (this.reduced && this.w) {\n for (let i = 0; i < 4; i++) this.w.step();\n draw();\n }\n });\n const up = () => {\n drag?.release();\n drag = null;\n };\n this.listen(canvas, 'pointerup', up);\n this.listen(canvas, 'pointercancel', up);\n this.listen(canvas, 'keydown', (e: KeyboardEvent) => {\n const b = last || Object.values(this.byId).find((x) => x.type === 'dynamic');\n const d: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };\n if (!b || !d[e.key]) return;\n e.preventDefault();\n b.applyImpulse({ x: d[e.key][0] * 200 * b.mass, y: d[e.key][1] * 300 * b.mass });\n b.wake();\n if (this.reduced && this.w) {\n for (let i = 0; i < 30; i++) this.w.step();\n draw();\n }\n });\n\n let visible = true;\n this.inView((v) => (visible = v));\n if (this.reduced) return;\n let prev = 0;\n const loop = (now: number) => {\n if (!alive) return;\n requestAnimationFrame(loop);\n const dt = prev ? Math.min(0.05, (now - prev) / 1000) : 1 / 60;\n prev = now;\n if (!visible || !this.w) return;\n if (this.running) this.w.update(dt);\n draw();\n };\n requestAnimationFrame(loop);\n }\n }\n return UsaPhysicsPlayground as unknown as CustomElementConstructor;\n },\n { id: 'physics-playground', text: css }\n );\n}\n"],"names":["defineElement","runtimeModule"],"mappings":";;;;;;;AAoCA,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAClF,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG;AAEtB;AACO,MAAM,eAAe,GAAkC;AAC5D,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9D,QAAA,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE;AAC3D,QAAA,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,CAAA,KAAA,EAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC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AAI,CAAC;YAC7B;AACD;AACD,QAAA,OAAO,oBAA2D;IACpE,CAAC,EACD,EAAE,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CACxC;AACH;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as defineElement } from './base-BTev8qxg.js';
|
|
2
|
-
import { r as runtimeModule } from './runtime-link-
|
|
2
|
+
import { r as runtimeModule } from './runtime-link-CP3qaRja.js';
|
|
3
3
|
|
|
4
4
|
var css = "usa-physics-playground{position:relative;display:block;aspect-ratio:5/3;min-height:140px;background:radial-gradient(circle at 50% 0,#1e293b,#0f172a);border-radius:12px;overflow:hidden;touch-action:none}usa-physics-playground>canvas{display:block;width:100%;height:100%;cursor:grab;outline:none}usa-physics-playground>canvas:active{cursor:grabbing}usa-physics-playground>canvas:focus-visible{box-shadow:inset 0 0 0 2px #818cf8}usa-physics-playground>script{display:none}";
|
|
5
5
|
|
|
@@ -272,4 +272,4 @@ function definePhysicsPlayground(tag = 'usa-physics-playground') {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
export { PHYSICS_PRESETS as P, definePhysicsPlayground as d };
|
|
275
|
-
//# sourceMappingURL=physics-playground-
|
|
275
|
+
//# sourceMappingURL=physics-playground-CluT_Nj9.js.map
|
package/dist/chunks/{physics-playground-B19qANJs.js.map → physics-playground-CluT_Nj9.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"physics-playground-B19qANJs.js","sources":["../../src/components/widgets/physics-playground.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { runtimeModule } from './runtime-link';\nimport type { PhysicsApi, World, Body } from '../../runtime/physics';\nimport type { FormatSceneApi, Scene } from '../../runtime/format-scene';\nimport css from './physics-playground.css?raw';\n\n/**\n * `<usa-physics-playground preset=\"pyramid\"></usa-physics-playground>` (10.7)\n * — a 2D rigid-body sandbox drawn on Canvas 2D, simulated by Motionary's own\n * **`motionary/runtime/physics`** and loaded from a **`motionary-scene@1`**\n * scene (`motionary/runtime/format-scene`). Requires `use(physics,\n * formatScene)` before it mounts.\n *\n * Attributes: `preset` (balls · pyramid · pendulum · dominoes), `src` (a\n * scene JSON URL) or an inline `<script type=\"application/json\">` scene,\n * `gravity` (px/s², default 980), `spawn` (click / tap empty space drops a\n * body), `paused`, `label`. Drag any dynamic body (pointer or touch);\n * arrow keys nudge the last body touched. Reduced motion: the scene is\n * settled off-screen and drawn once (dragging still works, one frame per\n * move). Only steps while visible.\n *\n * API: `world`, `bodies` (by scene id), `scene` (the loaded scene),\n * `reset()`, `play()`, `pause()`, `toScene()`; events `usa:load` ({ bodies,\n * format }), `usa:collision` (first contact between two dynamic bodies per\n * step), `usa:error`, `usa:runtime-missing`.\n */\nexport interface UsaPhysicsPlaygroundElement extends UsaElement {\n readonly world: World | null;\n readonly bodies: Record<string, Body>;\n readonly scene: Scene | null;\n reset(): void;\n play(): void;\n pause(): void;\n toScene(): Scene | null;\n}\n\nconst PALETTE = ['#818cf8', '#f472b6', '#34d399', '#fbbf24', '#38bdf8', '#fb7185'];\nconst W = 600, H = 360;\n\n/** The built-in scenes (motionary-scene@1). */\nexport const PHYSICS_PRESETS: Record<string, () => unknown> = {\n balls: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n materials: { rubber: { restitution: 0.75, friction: 0.3 } },\n bodies: Array.from({ length: 14 }, (_, i) => ({ id: `ball-${i}`, shape: 'circle', radius: 14 + ((i * 7) % 13), position: [60 + ((i * 83) % 480), 40 + (i % 4) * 30], material: 'rubber', style: { fill: PALETTE[i % PALETTE.length] } })),\n }),\n pyramid: () => {\n const bodies: any[] = [];\n const s = 34;\n for (let row = 0; row < 6; row++) for (let i = 0; i <= row; i++) bodies.push({ id: `box-${row}-${i}`, shape: 'box', size: [s, s], position: [W / 2 + (i - row / 2) * (s + 1), H - 12 - (6 - row) * s + s / 2], style: { fill: PALETTE[row % PALETTE.length] } });\n bodies.push({ id: 'ball', shape: 'circle', radius: 18, position: [80, 60], velocity: [420, 0], restitution: 0.4, density: 0.004, style: { fill: '#f8fafc' } });\n return { format: 'motionary-scene@1', world: { width: W, height: H, gravity: [0, 980], walls: true }, bodies };\n },\n pendulum: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [0, 1, 2, 3, 4].map((i) => ({ id: `bob-${i}`, shape: 'circle', radius: 20, position: [i === 0 ? 120 : 220 + i * 41, i === 0 ? 120 : 250], restitution: 0.95, friction: 0, style: { fill: PALETTE[i] } })),\n constraints: [0, 1, 2, 3, 4].map((i) => ({ type: 'pin', a: `bob-${i}`, point: [220 + i * 41, 40], length: i === 0 ? Math.hypot(220 - 120, 40 - 120) : 210, stiffness: 1 })),\n }),\n dominoes: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [\n ...Array.from({ length: 9 }, (_, i) => ({ id: `domino-${i}`, shape: 'box', size: [10, 70], position: [150 + i * 44, H - 35], friction: 0.6, style: { fill: PALETTE[i % PALETTE.length] } })),\n { id: 'ramp', shape: 'polygon', vertices: [[0, 0], [110, 70], [0, 70]], position: [40, H - 35], static: true, style: { fill: '#475569' } },\n { id: 'ball', shape: 'circle', radius: 14, position: [30, 40], density: 0.003, style: { fill: '#f8fafc' } },\n ],\n }),\n};\n\nexport function definePhysicsPlayground(tag = 'usa-physics-playground'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) => {\n class UsaPhysicsPlayground extends Base {\n static get observedAttributes(): string[] {\n return ['preset', 'src', 'gravity', 'spawn', 'label'];\n }\n private w: World | null = null;\n private byId: Record<string, Body> = {};\n private sc: Scene | null = null;\n private running = true;\n private redraw: (() => void) | null = null;\n private rebuild: (() => void) | null = null;\n get world(): World | null {\n return this.w;\n }\n get bodies(): Record<string, Body> {\n return this.byId;\n }\n get scene(): Scene | null {\n return this.sc;\n }\n reset(): void {\n this.rebuild?.();\n }\n play(): void {\n this.running = true;\n this.removeAttribute('paused');\n }\n pause(): void {\n this.running = false;\n this.setAttribute('paused', '');\n }\n toScene(): Scene | null {\n const F = runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!F || !this.w || !this.sc) return null;\n return F.worldToScene(this.w, { width: this.sc.world.width, height: this.sc.world.height, walls: !!this.sc.world.walls });\n }\n mount(): void {\n const P = runtimeModule<PhysicsApi>(this, 'physics');\n const F = P && runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!P || !F) return;\n this.running = !this.flag('paused');\n const canvas = document.createElement('canvas');\n canvas.setAttribute('role', 'img');\n canvas.setAttribute('aria-label', this.str('label', 'Physics playground'));\n canvas.tabIndex = 0;\n this.querySelector(':scope > canvas')?.remove();\n this.prepend(canvas);\n this.onCleanup(() => canvas.remove());\n const ctx = canvas.getContext('2d');\n let alive = true;\n this.onCleanup(() => (alive = false));\n let view = { s: 1, ox: 0, oy: 0 };\n let last: Body | null = null;\n let drag: ReturnType<PhysicsApi['dragConstraint']> | null = null;\n\n const draw = () => {\n if (!ctx || !this.w || !this.sc) return;\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const cw = Math.max(1, Math.round((canvas.clientWidth || W) * dpr)), ch = Math.max(1, Math.round((canvas.clientHeight || H) * dpr));\n if (canvas.width !== cw || canvas.height !== ch) Object.assign(canvas, { width: cw, height: ch });\n const { width, height } = this.sc.world;\n const s = Math.min(cw / width, ch / height);\n view = { s: s / dpr, ox: (cw - width * s) / 2 / dpr, oy: (ch - height * s) / 2 / dpr };\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, cw, ch);\n ctx.setTransform(s, 0, 0, s, (cw - width * s) / 2, (ch - height * s) / 2);\n for (const b of this.w.bodies) {\n const st: any = (b.data as any)?.style || {};\n if (!(b.data as any)?.id) continue; // walls from bounds()\n ctx.fillStyle = st.fill || (b.type === 'static' ? '#475569' : PALETTE[b.id % PALETTE.length]);\n ctx.globalAlpha = b.sleeping ? 0.85 : 1;\n ctx.beginPath();\n if (b.shape === 'circle') {\n ctx.arc(b.position.x, b.position.y, b.radius, 0, Math.PI * 2);\n ctx.fill();\n ctx.strokeStyle = 'rgba(15,23,42,.55)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(b.position.x, b.position.y);\n ctx.lineTo(b.position.x + Math.cos(b.angle) * b.radius, b.position.y + Math.sin(b.angle) * b.radius);\n ctx.stroke();\n } else {\n const vs = b.worldVerts();\n vs.forEach((p, i) => (i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y)));\n ctx.closePath();\n ctx.fill();\n }\n }\n ctx.globalAlpha = 1;\n ctx.strokeStyle = 'rgba(148,163,184,.6)';\n ctx.lineWidth = 1.5;\n for (const c of this.w.constraints) {\n const a = c.worldA(), b = c.worldB();\n ctx.beginPath();\n ctx.moveTo(a.x, a.y);\n ctx.lineTo(b.x, b.y);\n ctx.stroke();\n }\n };\n this.redraw = draw;\n\n const build = (json: unknown) => {\n try {\n const g = this.str('gravity');\n const sceneJson: any = JSON.parse(JSON.stringify(json));\n if (g && sceneJson?.world) sceneJson.world.gravity = [0, Number(g)];\n const r = F.sceneToWorld(sceneJson);\n this.w = r.world;\n this.byId = r.bodies;\n this.sc = r.scene;\n let seen = '';\n r.world.onCollision((m) => {\n if (m.a.type !== 'dynamic' || m.b.type !== 'dynamic' || m.a.sensor || m.b.sensor) return;\n const k = String(r.world.steps);\n if (seen === k) return;\n seen = k;\n this.emit('collision', { a: (m.a.data as any)?.id, b: (m.b.data as any)?.id });\n });\n if (this.reduced) for (let i = 0; i < 240; i++) r.world.step();\n draw();\n this.emit('load', { bodies: Object.keys(r.bodies).length, format: r.scene.format });\n } catch (e: any) {\n this.emit('error', { error: String(e?.message || e) });\n }\n };\n const load = () => {\n const inline = this.querySelector(':scope > script[type=\"application/json\"]');\n const src = this.str('src');\n if (inline) return build(JSON.parse(inline.textContent || '{}'));\n if (src) {\n fetch(new URL(src, location.href).href)\n .then((r) => r.json())\n .then((j) => alive && build(j))\n .catch((e) => this.emit('error', { error: String(e?.message || e) }));\n return;\n }\n build((PHYSICS_PRESETS[this.str('preset', 'balls')] || PHYSICS_PRESETS.balls)());\n };\n this.rebuild = load;\n load();\n\n const toWorld = (e: PointerEvent) => {\n const r = canvas.getBoundingClientRect();\n return [(e.clientX - r.left - view.ox) / view.s, (e.clientY - r.top - view.oy) / view.s];\n };\n this.listen(canvas, 'pointerdown', (e: PointerEvent) => {\n if (!this.w) return;\n const [x, y] = toWorld(e);\n const hit = this.w.query(x, y).find((b) => b.type === 'dynamic');\n if (hit) {\n last = hit;\n drag = P.dragConstraint(this.w, hit, x, y);\n canvas.setPointerCapture?.(e.pointerId);\n } else if (this.flag('spawn')) {\n const n = Object.keys(this.byId).length;\n const id = `spawn-${n}`;\n this.byId[id] = this.w.body({ shape: n % 2 ? 'box' : 'circle', x, y, radius: 16, width: 30, height: 30, restitution: 0.4, data: { id, style: { fill: PALETTE[n % PALETTE.length] } }, label: id });\n last = this.byId[id];\n if (this.reduced) draw();\n }\n });\n this.listen(canvas, 'pointermove', (e: PointerEvent) => {\n if (!drag) return;\n const [x, y] = toWorld(e);\n drag.move(x, y);\n if (this.reduced && this.w) {\n for (let i = 0; i < 4; i++) this.w.step();\n draw();\n }\n });\n const up = () => {\n drag?.release();\n drag = null;\n };\n this.listen(canvas, 'pointerup', up);\n this.listen(canvas, 'pointercancel', up);\n this.listen(canvas, 'keydown', (e: KeyboardEvent) => {\n const b = last || Object.values(this.byId).find((x) => x.type === 'dynamic');\n const d: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };\n if (!b || !d[e.key]) return;\n e.preventDefault();\n b.applyImpulse({ x: d[e.key][0] * 200 * b.mass, y: d[e.key][1] * 300 * b.mass });\n b.wake();\n if (this.reduced && this.w) {\n for (let i = 0; i < 30; i++) this.w.step();\n draw();\n }\n });\n\n let visible = true;\n this.inView((v) => (visible = v));\n if (this.reduced) return;\n let prev = 0;\n const loop = (now: number) => {\n if (!alive) return;\n requestAnimationFrame(loop);\n const dt = prev ? Math.min(0.05, (now - prev) / 1000) : 1 / 60;\n prev = now;\n if (!visible || !this.w) return;\n if (this.running) this.w.update(dt);\n draw();\n };\n requestAnimationFrame(loop);\n }\n }\n return UsaPhysicsPlayground as unknown as CustomElementConstructor;\n },\n { id: 'physics-playground', text: css }\n );\n}\n"],"names":[],"mappings":";;;;;AAoCA,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAClF,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG;AAEtB;AACO,MAAM,eAAe,GAAkC;AAC5D,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9D,QAAA,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE;AAC3D,QAAA,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,CAAA,KAAA,EAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,QA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AE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CACxC;AACH;;"}
|
|
1
|
+
{"version":3,"file":"physics-playground-CluT_Nj9.js","sources":["../../src/components/widgets/physics-playground.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { runtimeModule } from './runtime-link';\nimport type { PhysicsApi, World, Body } from '../../runtime/physics';\nimport type { FormatSceneApi, Scene } from '../../runtime/format-scene';\nimport css from './physics-playground.css?raw';\n\n/**\n * `<usa-physics-playground preset=\"pyramid\"></usa-physics-playground>` (10.7)\n * — a 2D rigid-body sandbox drawn on Canvas 2D, simulated by Motionary's own\n * **`motionary/runtime/physics`** and loaded from a **`motionary-scene@1`**\n * scene (`motionary/runtime/format-scene`). Requires `use(physics,\n * formatScene)` before it mounts.\n *\n * Attributes: `preset` (balls · pyramid · pendulum · dominoes), `src` (a\n * scene JSON URL) or an inline `<script type=\"application/json\">` scene,\n * `gravity` (px/s², default 980), `spawn` (click / tap empty space drops a\n * body), `paused`, `label`. Drag any dynamic body (pointer or touch);\n * arrow keys nudge the last body touched. Reduced motion: the scene is\n * settled off-screen and drawn once (dragging still works, one frame per\n * move). Only steps while visible.\n *\n * API: `world`, `bodies` (by scene id), `scene` (the loaded scene),\n * `reset()`, `play()`, `pause()`, `toScene()`; events `usa:load` ({ bodies,\n * format }), `usa:collision` (first contact between two dynamic bodies per\n * step), `usa:error`, `usa:runtime-missing`.\n */\nexport interface UsaPhysicsPlaygroundElement extends UsaElement {\n readonly world: World | null;\n readonly bodies: Record<string, Body>;\n readonly scene: Scene | null;\n reset(): void;\n play(): void;\n pause(): void;\n toScene(): Scene | null;\n}\n\nconst PALETTE = ['#818cf8', '#f472b6', '#34d399', '#fbbf24', '#38bdf8', '#fb7185'];\nconst W = 600, H = 360;\n\n/** The built-in scenes (motionary-scene@1). */\nexport const PHYSICS_PRESETS: Record<string, () => unknown> = {\n balls: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n materials: { rubber: { restitution: 0.75, friction: 0.3 } },\n bodies: Array.from({ length: 14 }, (_, i) => ({ id: `ball-${i}`, shape: 'circle', radius: 14 + ((i * 7) % 13), position: [60 + ((i * 83) % 480), 40 + (i % 4) * 30], material: 'rubber', style: { fill: PALETTE[i % PALETTE.length] } })),\n }),\n pyramid: () => {\n const bodies: any[] = [];\n const s = 34;\n for (let row = 0; row < 6; row++) for (let i = 0; i <= row; i++) bodies.push({ id: `box-${row}-${i}`, shape: 'box', size: [s, s], position: [W / 2 + (i - row / 2) * (s + 1), H - 12 - (6 - row) * s + s / 2], style: { fill: PALETTE[row % PALETTE.length] } });\n bodies.push({ id: 'ball', shape: 'circle', radius: 18, position: [80, 60], velocity: [420, 0], restitution: 0.4, density: 0.004, style: { fill: '#f8fafc' } });\n return { format: 'motionary-scene@1', world: { width: W, height: H, gravity: [0, 980], walls: true }, bodies };\n },\n pendulum: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [0, 1, 2, 3, 4].map((i) => ({ id: `bob-${i}`, shape: 'circle', radius: 20, position: [i === 0 ? 120 : 220 + i * 41, i === 0 ? 120 : 250], restitution: 0.95, friction: 0, style: { fill: PALETTE[i] } })),\n constraints: [0, 1, 2, 3, 4].map((i) => ({ type: 'pin', a: `bob-${i}`, point: [220 + i * 41, 40], length: i === 0 ? Math.hypot(220 - 120, 40 - 120) : 210, stiffness: 1 })),\n }),\n dominoes: () => ({\n format: 'motionary-scene@1',\n world: { width: W, height: H, gravity: [0, 980], walls: true },\n bodies: [\n ...Array.from({ length: 9 }, (_, i) => ({ id: `domino-${i}`, shape: 'box', size: [10, 70], position: [150 + i * 44, H - 35], friction: 0.6, style: { fill: PALETTE[i % PALETTE.length] } })),\n { id: 'ramp', shape: 'polygon', vertices: [[0, 0], [110, 70], [0, 70]], position: [40, H - 35], static: true, style: { fill: '#475569' } },\n { id: 'ball', shape: 'circle', radius: 14, position: [30, 40], density: 0.003, style: { fill: '#f8fafc' } },\n ],\n }),\n};\n\nexport function definePhysicsPlayground(tag = 'usa-physics-playground'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) => {\n class UsaPhysicsPlayground extends Base {\n static get observedAttributes(): string[] {\n return ['preset', 'src', 'gravity', 'spawn', 'label'];\n }\n private w: World | null = null;\n private byId: Record<string, Body> = {};\n private sc: Scene | null = null;\n private running = true;\n private redraw: (() => void) | null = null;\n private rebuild: (() => void) | null = null;\n get world(): World | null {\n return this.w;\n }\n get bodies(): Record<string, Body> {\n return this.byId;\n }\n get scene(): Scene | null {\n return this.sc;\n }\n reset(): void {\n this.rebuild?.();\n }\n play(): void {\n this.running = true;\n this.removeAttribute('paused');\n }\n pause(): void {\n this.running = false;\n this.setAttribute('paused', '');\n }\n toScene(): Scene | null {\n const F = runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!F || !this.w || !this.sc) return null;\n return F.worldToScene(this.w, { width: this.sc.world.width, height: this.sc.world.height, walls: !!this.sc.world.walls });\n }\n mount(): void {\n const P = runtimeModule<PhysicsApi>(this, 'physics');\n const F = P && runtimeModule<FormatSceneApi>(this, 'format-scene');\n if (!P || !F) return;\n this.running = !this.flag('paused');\n const canvas = document.createElement('canvas');\n canvas.setAttribute('role', 'img');\n canvas.setAttribute('aria-label', this.str('label', 'Physics playground'));\n canvas.tabIndex = 0;\n this.querySelector(':scope > canvas')?.remove();\n this.prepend(canvas);\n this.onCleanup(() => canvas.remove());\n const ctx = canvas.getContext('2d');\n let alive = true;\n this.onCleanup(() => (alive = false));\n let view = { s: 1, ox: 0, oy: 0 };\n let last: Body | null = null;\n let drag: ReturnType<PhysicsApi['dragConstraint']> | null = null;\n\n const draw = () => {\n if (!ctx || !this.w || !this.sc) return;\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const cw = Math.max(1, Math.round((canvas.clientWidth || W) * dpr)), ch = Math.max(1, Math.round((canvas.clientHeight || H) * dpr));\n if (canvas.width !== cw || canvas.height !== ch) Object.assign(canvas, { width: cw, height: ch });\n const { width, height } = this.sc.world;\n const s = Math.min(cw / width, ch / height);\n view = { s: s / dpr, ox: (cw - width * s) / 2 / dpr, oy: (ch - height * s) / 2 / dpr };\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, cw, ch);\n ctx.setTransform(s, 0, 0, s, (cw - width * s) / 2, (ch - height * s) / 2);\n for (const b of this.w.bodies) {\n const st: any = (b.data as any)?.style || {};\n if (!(b.data as any)?.id) continue; // walls from bounds()\n ctx.fillStyle = st.fill || (b.type === 'static' ? '#475569' : PALETTE[b.id % PALETTE.length]);\n ctx.globalAlpha = b.sleeping ? 0.85 : 1;\n ctx.beginPath();\n if (b.shape === 'circle') {\n ctx.arc(b.position.x, b.position.y, b.radius, 0, Math.PI * 2);\n ctx.fill();\n ctx.strokeStyle = 'rgba(15,23,42,.55)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(b.position.x, b.position.y);\n ctx.lineTo(b.position.x + Math.cos(b.angle) * b.radius, b.position.y + Math.sin(b.angle) * b.radius);\n ctx.stroke();\n } else {\n const vs = b.worldVerts();\n vs.forEach((p, i) => (i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y)));\n ctx.closePath();\n ctx.fill();\n }\n }\n ctx.globalAlpha = 1;\n ctx.strokeStyle = 'rgba(148,163,184,.6)';\n ctx.lineWidth = 1.5;\n for (const c of this.w.constraints) {\n const a = c.worldA(), b = c.worldB();\n ctx.beginPath();\n ctx.moveTo(a.x, a.y);\n ctx.lineTo(b.x, b.y);\n ctx.stroke();\n }\n };\n this.redraw = draw;\n\n const build = (json: unknown) => {\n try {\n const g = this.str('gravity');\n const sceneJson: any = JSON.parse(JSON.stringify(json));\n if (g && sceneJson?.world) sceneJson.world.gravity = [0, Number(g)];\n const r = F.sceneToWorld(sceneJson);\n this.w = r.world;\n this.byId = r.bodies;\n this.sc = r.scene;\n let seen = '';\n r.world.onCollision((m) => {\n if (m.a.type !== 'dynamic' || m.b.type !== 'dynamic' || m.a.sensor || m.b.sensor) return;\n const k = String(r.world.steps);\n if (seen === k) return;\n seen = k;\n this.emit('collision', { a: (m.a.data as any)?.id, b: (m.b.data as any)?.id });\n });\n if (this.reduced) for (let i = 0; i < 240; i++) r.world.step();\n draw();\n this.emit('load', { bodies: Object.keys(r.bodies).length, format: r.scene.format });\n } catch (e: any) {\n this.emit('error', { error: String(e?.message || e) });\n }\n };\n const load = () => {\n const inline = this.querySelector(':scope > script[type=\"application/json\"]');\n const src = this.str('src');\n if (inline) return build(JSON.parse(inline.textContent || '{}'));\n if (src) {\n fetch(new URL(src, location.href).href)\n .then((r) => r.json())\n .then((j) => alive && build(j))\n .catch((e) => this.emit('error', { error: String(e?.message || e) }));\n return;\n }\n build((PHYSICS_PRESETS[this.str('preset', 'balls')] || PHYSICS_PRESETS.balls)());\n };\n this.rebuild = load;\n load();\n\n const toWorld = (e: PointerEvent) => {\n const r = canvas.getBoundingClientRect();\n return [(e.clientX - r.left - view.ox) / view.s, (e.clientY - r.top - view.oy) / view.s];\n };\n this.listen(canvas, 'pointerdown', (e: PointerEvent) => {\n if (!this.w) return;\n const [x, y] = toWorld(e);\n const hit = this.w.query(x, y).find((b) => b.type === 'dynamic');\n if (hit) {\n last = hit;\n drag = P.dragConstraint(this.w, hit, x, y);\n canvas.setPointerCapture?.(e.pointerId);\n } else if (this.flag('spawn')) {\n const n = Object.keys(this.byId).length;\n const id = `spawn-${n}`;\n this.byId[id] = this.w.body({ shape: n % 2 ? 'box' : 'circle', x, y, radius: 16, width: 30, height: 30, restitution: 0.4, data: { id, style: { fill: PALETTE[n % PALETTE.length] } }, label: id });\n last = this.byId[id];\n if (this.reduced) draw();\n }\n });\n this.listen(canvas, 'pointermove', (e: PointerEvent) => {\n if (!drag) return;\n const [x, y] = toWorld(e);\n drag.move(x, y);\n if (this.reduced && this.w) {\n for (let i = 0; i < 4; i++) this.w.step();\n draw();\n }\n });\n const up = () => {\n drag?.release();\n drag = null;\n };\n this.listen(canvas, 'pointerup', up);\n this.listen(canvas, 'pointercancel', up);\n this.listen(canvas, 'keydown', (e: KeyboardEvent) => {\n const b = last || Object.values(this.byId).find((x) => x.type === 'dynamic');\n const d: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };\n if (!b || !d[e.key]) return;\n e.preventDefault();\n b.applyImpulse({ x: d[e.key][0] * 200 * b.mass, y: d[e.key][1] * 300 * b.mass });\n b.wake();\n if (this.reduced && this.w) {\n for (let i = 0; i < 30; i++) this.w.step();\n draw();\n }\n });\n\n let visible = true;\n this.inView((v) => (visible = v));\n if (this.reduced) return;\n let prev = 0;\n const loop = (now: number) => {\n if (!alive) return;\n requestAnimationFrame(loop);\n const dt = prev ? Math.min(0.05, (now - prev) / 1000) : 1 / 60;\n prev = now;\n if (!visible || !this.w) return;\n if (this.running) this.w.update(dt);\n draw();\n };\n requestAnimationFrame(loop);\n }\n }\n return UsaPhysicsPlayground as unknown as CustomElementConstructor;\n },\n { id: 'physics-playground', text: css }\n );\n}\n"],"names":[],"mappings":";;;;;AAoCA,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAClF,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG;AAEtB;AACO,MAAM,eAAe,GAAkC;AAC5D,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9D,QAAA,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE;AAC3D,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EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;oBAC9D,IAAI,GAAG,GAAG;AACV,oBAAA,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;wBAAE;oBACzB,IAAI,IAAI,CAAC,OAAO;AAAE,wBAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;AACnC,oBAAA,IAAI,EAAE;AACR,gBAAA,CAAC;gBACD,qBAAqB,CAAC,IAAI,CAAC;YAC7B;AACD;AACD,QAAA,OAAO,oBAA2D;IACpE,CAAC,EACD,EAAE,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CACxC;AACH;;"}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* inside Web Workers.
|
|
8
8
|
*/
|
|
9
9
|
/** Runtime version (kept in sync with the package version by the release script). */
|
|
10
|
-
const RUNTIME_VERSION = '
|
|
10
|
+
const RUNTIME_VERSION = '11.0.0';
|
|
11
11
|
/** Where the CDN builds live (major-pinned). */
|
|
12
|
-
const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@
|
|
12
|
+
const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@11/dist/';
|
|
13
13
|
const KEY = Symbol.for('motionary.runtime');
|
|
14
14
|
/** The page-wide registry (created on first use). */
|
|
15
15
|
function registry() {
|
|
@@ -66,4 +66,4 @@ function requireModule(id, who) {
|
|
|
66
66
|
const registeredModules = () => Array.from(registry().modules.keys());
|
|
67
67
|
|
|
68
68
|
export { RUNTIME_VERSION as R, registry as a, register as b, RUNTIME_CDN as c, RuntimeModuleError as d, moduleCdn as e, modulePath as f, registeredModules as g, hasModule as h, missingMessage as m, requireModule as r };
|
|
69
|
-
//# sourceMappingURL=registry-
|
|
69
|
+
//# sourceMappingURL=registry-W7pXOwju.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-
|
|
1
|
+
{"version":3,"file":"registry-W7pXOwju.js","sources":["../../src/runtime/registry.ts"],"sourcesContent":["/**\n * Module registry shared by every copy of `motionary/runtime` on the page\n * (ESM, CJS and the CDN IIFE builds all read the same `globalThis` slot),\n * so a component never needs to import the runtime itself — it asks for a\n * module with `requireModule()` and gets a clear error when it is missing.\n * Nothing here touches `window` / `document`: safe to import during SSR and\n * inside Web Workers.\n */\n\n/** Runtime version (kept in sync with the package version by the release script). */\nexport const RUNTIME_VERSION = '11.0.0';\n\n/** Where the CDN builds live (major-pinned). */\nexport const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@11/dist/';\n\n/** A runtime module: `{ id, version, api }`, registered with `use()`. */\nexport interface RuntimeModule<A = unknown> {\n /** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */\n id: string;\n version: string;\n /** Other modules this one needs (registered first by `use()` callers). */\n requires?: string[];\n /** The module's public API (what `requireModule(id)` returns). */\n api: A;\n /** Optional one-time setup, called on first registration. */\n setup?(registry: RuntimeRegistry): void;\n}\n\nexport interface RuntimeRegistry {\n version: string;\n modules: Map<string, RuntimeModule>;\n /** Shared per-page state slots (the ticker lives here). */\n slots: Record<string, unknown>;\n}\n\nconst KEY = Symbol.for('motionary.runtime');\n\n/** The page-wide registry (created on first use). */\nexport function registry(): RuntimeRegistry {\n const g = globalThis as unknown as Record<symbol, RuntimeRegistry | undefined>;\n return (g[KEY] ||= { version: RUNTIME_VERSION, modules: new Map(), slots: {} });\n}\n\n/** The import path of a module id. */\nexport const modulePath = (id: string): string => (id === 'core' ? 'motionary/runtime' : `motionary/runtime/${id}`);\n\n/** The CDN IIFE file of a module id. */\nexport const moduleCdn = (id: string): string => RUNTIME_CDN + (id === 'core' ? 'runtime.iife.js' : `runtime/${id}.iife.js`);\n\n/** The text of the \"module missing\" error (shared with the components). */\nexport function missingMessage(id: string, who = 'This feature'): string {\n const path = modulePath(id);\n const reg = id === 'core' ? `import { use } from 'motionary/runtime'; use();` : `import { use } from 'motionary/runtime'; import { ${camel(id)} } from '${path}'; use(${camel(id)});`;\n const cdn = id === 'core' ? `<script src=\"${moduleCdn('core')}\"></script>` : `<script src=\"${moduleCdn('core')}\"></script><script src=\"${moduleCdn(id)}\"></script>`;\n return `[motionary] ${who} requires ${path}. Install once: npm i motionary — then register it before the component mounts: ${reg} Or from a CDN (core first): ${cdn} Docs: https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/${id}.md`;\n}\n\n/** 'format-css' → 'formatCss' (the module object's export name). */\nexport const camel = (id: string): string => id.replace(/-(\\w)/g, (_, c: string) => c.toUpperCase());\n\n/** Thrown by `requireModule()` when a module is not registered. */\nexport class RuntimeModuleError extends Error {\n readonly module: string;\n constructor(id: string, who?: string) {\n super(missingMessage(id, who));\n this.name = 'RuntimeModuleError';\n this.module = id;\n }\n}\n\n/** Register modules (each once; re-registering the same id keeps the first). Returns the registry. */\nexport function register(...mods: RuntimeModule[]): RuntimeRegistry {\n const r = registry();\n for (const m of mods) {\n if (!m || typeof m.id !== 'string') throw new TypeError('[motionary] use(): not a runtime module — pass the object exported by motionary/runtime/<module>');\n if (r.modules.has(m.id)) continue;\n for (const dep of m.requires || []) if (!r.modules.has(dep)) throw new RuntimeModuleError(dep, `motionary/runtime/${m.id}`);\n r.modules.set(m.id, m as RuntimeModule);\n m.setup?.(r);\n }\n return r;\n}\n\n/** Is a module registered? */\nexport const hasModule = (id: string): boolean => registry().modules.has(id);\n\n/** The API of a registered module, or a `RuntimeModuleError` with install / import / CDN instructions. */\nexport function requireModule<A = unknown>(id: string, who?: string): A {\n const m = registry().modules.get(id);\n if (!m) throw new RuntimeModuleError(id, who);\n return m.api as A;\n}\n\n/** Ids of the registered modules. */\nexport const registeredModules = (): string[] => Array.from(registry().modules.keys());\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;AAEH;AACO,MAAM,eAAe,GAAG;AAE/B;AACO,MAAM,WAAW,GAAG;AAsB3B,MAAM,GAAG,GAAG,MAAM,C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,SAAU,aAAa,CAAc,EAAU,EAAE,GAAY,EAAA;IACjE,MAAM,CAAC,GAAG,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;AACpC,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,MAAM,IAAI,kBAAkB,CAAC,EAAE,EAAE,GAAG,CAAC;IAC7C,OAAO,CAAC,CAAC,GAAQ;AACnB;AAEA;AACO,MAAM,iBAAiB,GAAG,MAAgB,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;;"}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* inside Web Workers.
|
|
10
10
|
*/
|
|
11
11
|
/** Runtime version (kept in sync with the package version by the release script). */
|
|
12
|
-
const RUNTIME_VERSION = '
|
|
12
|
+
const RUNTIME_VERSION = '11.0.0';
|
|
13
13
|
/** Where the CDN builds live (major-pinned). */
|
|
14
|
-
const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@
|
|
14
|
+
const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@11/dist/';
|
|
15
15
|
const KEY = Symbol.for('motionary.runtime');
|
|
16
16
|
/** The page-wide registry (created on first use). */
|
|
17
17
|
function registry() {
|
|
@@ -78,4 +78,4 @@ exports.register = register;
|
|
|
78
78
|
exports.registeredModules = registeredModules;
|
|
79
79
|
exports.registry = registry;
|
|
80
80
|
exports.requireModule = requireModule;
|
|
81
|
-
//# sourceMappingURL=registry-
|
|
81
|
+
//# sourceMappingURL=registry-uaO8pDKn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-
|
|
1
|
+
{"version":3,"file":"registry-uaO8pDKn.cjs","sources":["../../src/runtime/registry.ts"],"sourcesContent":["/**\n * Module registry shared by every copy of `motionary/runtime` on the page\n * (ESM, CJS and the CDN IIFE builds all read the same `globalThis` slot),\n * so a component never needs to import the runtime itself — it asks for a\n * module with `requireModule()` and gets a clear error when it is missing.\n * Nothing here touches `window` / `document`: safe to import during SSR and\n * inside Web Workers.\n */\n\n/** Runtime version (kept in sync with the package version by the release script). */\nexport const RUNTIME_VERSION = '11.0.0';\n\n/** Where the CDN builds live (major-pinned). */\nexport const RUNTIME_CDN = 'https://cdn.jsdelivr.net/npm/motionary@11/dist/';\n\n/** A runtime module: `{ id, version, api }`, registered with `use()`. */\nexport interface RuntimeModule<A = unknown> {\n /** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */\n id: string;\n version: string;\n /** Other modules this one needs (registered first by `use()` callers). */\n requires?: string[];\n /** The module's public API (what `requireModule(id)` returns). */\n api: A;\n /** Optional one-time setup, called on first registration. */\n setup?(registry: RuntimeRegistry): void;\n}\n\nexport interface RuntimeRegistry {\n version: string;\n modules: Map<string, RuntimeModule>;\n /** Shared per-page state slots (the ticker lives here). */\n slots: Record<string, unknown>;\n}\n\nconst KEY = Symbol.for('motionary.runtime');\n\n/** The page-wide registry (created on first use). */\nexport function registry(): RuntimeRegistry {\n const g = globalThis as unknown as Record<symbol, RuntimeRegistry | undefined>;\n return (g[KEY] ||= { version: RUNTIME_VERSION, modules: new Map(), slots: {} });\n}\n\n/** The import path of a module id. */\nexport const modulePath = (id: string): string => (id === 'core' ? 'motionary/runtime' : `motionary/runtime/${id}`);\n\n/** The CDN IIFE file of a module id. */\nexport const moduleCdn = (id: string): string => RUNTIME_CDN + (id === 'core' ? 'runtime.iife.js' : `runtime/${id}.iife.js`);\n\n/** The text of the \"module missing\" error (shared with the components). */\nexport function missingMessage(id: string, who = 'This feature'): string {\n const path = modulePath(id);\n const reg = id === 'core' ? `import { use } from 'motionary/runtime'; use();` : `import { use } from 'motionary/runtime'; import { ${camel(id)} } from '${path}'; use(${camel(id)});`;\n const cdn = id === 'core' ? `<script src=\"${moduleCdn('core')}\"></script>` : `<script src=\"${moduleCdn('core')}\"></script><script src=\"${moduleCdn(id)}\"></script>`;\n return `[motionary] ${who} requires ${path}. Install once: npm i motionary — then register it before the component mounts: ${reg} Or from a CDN (core first): ${cdn} Docs: https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/${id}.md`;\n}\n\n/** 'format-css' → 'formatCss' (the module object's export name). */\nexport const camel = (id: string): string => id.replace(/-(\\w)/g, (_, c: string) => c.toUpperCase());\n\n/** Thrown by `requireModule()` when a module is not registered. */\nexport class RuntimeModuleError extends Error {\n readonly module: string;\n constructor(id: string, who?: string) {\n super(missingMessage(id, who));\n this.name = 'RuntimeModuleError';\n this.module = id;\n }\n}\n\n/** Register modules (each once; re-registering the same id keeps the first). Returns the registry. */\nexport function register(...mods: RuntimeModule[]): RuntimeRegistry {\n const r = registry();\n for (const m of mods) {\n if (!m || typeof m.id !== 'string') throw new TypeError('[motionary] use(): not a runtime module — pass the object exported by motionary/runtime/<module>');\n if (r.modules.has(m.id)) continue;\n for (const dep of m.requires || []) if (!r.modules.has(dep)) throw new RuntimeModuleError(dep, `motionary/runtime/${m.id}`);\n r.modules.set(m.id, m as RuntimeModule);\n m.setup?.(r);\n }\n return r;\n}\n\n/** Is a module registered? */\nexport const hasModule = (id: string): boolean => registry().modules.has(id);\n\n/** The API of a registered module, or a `RuntimeModuleError` with install / import / CDN instructions. */\nexport function requireModule<A = unknown>(id: string, who?: string): A {\n const m = registry().modules.get(id);\n if (!m) throw new RuntimeModuleError(id, who);\n return m.api as A;\n}\n\n/** Ids of the registered modules. */\nexport const registeredModules = (): string[] => Array.from(registry().modules.keys());\n"],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AAEH;AACO,MAAM,eAAe,GAAG;AAE/B;AACO,MAAM,WAAW,GAAG;AAsB3B,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAE3C;SACgB,QAAQ,GAAA;IACtB,MAAM,CAAC,GAAG,UAAoE;IAC9E,QAAQ,CAAC,CAAC,GAAG,CAAA,KAAL,CAAC,CAAC,GAAG,CAAA,GAAM,EAAE,OAAO,EAAE,eAAe,EA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,EAAE,EAAE,GAAG,CAAC;IAC7C,OAAO,CAAC,CAAC,GAAQ;AACnB;AAEA;AACO,MAAM,iBAAiB,GAAG,MAAgB,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('./registry-
|
|
3
|
+
var registry = require('./registry-uaO8pDKn.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 10.1: how runtime-powered components reach `motionary/runtime` without
|
|
@@ -35,4 +35,4 @@ function runtimeModule(host, id) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
exports.runtimeModule = runtimeModule;
|
|
38
|
-
//# sourceMappingURL=runtime-link-
|
|
38
|
+
//# sourceMappingURL=runtime-link-Bz3rGMsh.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-link-
|
|
1
|
+
{"version":3,"file":"runtime-link-Bz3rGMsh.cjs","sources":["../../src/components/widgets/runtime-link.ts"],"sourcesContent":["/**\n * 10.1: how runtime-powered components reach `motionary/runtime` without\n * importing it — they read the page-wide module registry (only the tiny\n * registry file is bundled with the component) and, when a module is\n * missing, show the clear install / import / CDN message in place, log it\n * once and dispatch `usa:runtime-missing`.\n */\nimport { hasModule, requireModule, missingMessage } from '../../runtime/registry';\n\nexport { hasModule, missingMessage };\n\nconst logged = new Set<string>();\n\n/** The module API, or null after rendering the \"missing module\" notice into `host`. */\nexport function runtimeModule<A>(host: HTMLElement, id: string): A | null {\n const who = `<${host.localName}>`;\n try {\n return requireModule<A>(id, who);\n } catch {\n const msg = missingMessage(id, who);\n if (!logged.has(id + who)) {\n logged.add(id + who);\n console.error(msg);\n }\n if (!host.querySelector(':scope > .usa-rt-missing')) {\n const p = document.createElement('p');\n p.className = 'usa-rt-missing';\n p.setAttribute('role', 'alert');\n p.textContent = msg;\n host.prepend(p);\n }\n host.dispatchEvent(new CustomEvent('usa:runtime-missing', { detail: { module: id, message: msg }, bubbles: true }));\n return null;\n }\n}\n"],"names":["requireModule","missingMessage"],"mappings":";;;;AAAA;;;;;;AAMG;AAKH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAEhC;AACM,SAAU,aAAa,CAAI,IAAiB,EAAE,EAAU,EAAA;AAC5D,IAAA,MAAM,GAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAC,SAAS,GAAG;AACjC,IAAA,IAAI;AACF,QAAA,OAAOA,sBAAa,CAAI,EAAE,EAAE,GAAG,CAAC;IAClC;AAAE,IAAA,MAAM;QACN,MAAM,GAAG,GAAGC,uBAAc,CAAC,EAAE,EAAE,GAAG,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE;AACzB,YAAA,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC;AACpB,YAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACpB;QACA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,0BAA0B,CAAC,EAAE;YACnD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,YAAA,CAAC,CAAC,SAAS,GAAG,gBAAgB;AAC9B,YAAA,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC;AAC/B,YAAA,CAAC,CAAC,WAAW,GAAG,GAAG;AACnB,YAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACjB;QACA,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACnH,QAAA,OAAO,IAAI;IACb;AACF;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireModule, m as missingMessage } from './registry-
|
|
1
|
+
import { r as requireModule, m as missingMessage } from './registry-W7pXOwju.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* 10.1: how runtime-powered components reach `motionary/runtime` without
|
|
@@ -33,4 +33,4 @@ function runtimeModule(host, id) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export { runtimeModule as r };
|
|
36
|
-
//# sourceMappingURL=runtime-link-
|
|
36
|
+
//# sourceMappingURL=runtime-link-CP3qaRja.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-link-
|
|
1
|
+
{"version":3,"file":"runtime-link-CP3qaRja.js","sources":["../../src/components/widgets/runtime-link.ts"],"sourcesContent":["/**\n * 10.1: how runtime-powered components reach `motionary/runtime` without\n * importing it — they read the page-wide module registry (only the tiny\n * registry file is bundled with the component) and, when a module is\n * missing, show the clear install / import / CDN message in place, log it\n * once and dispatch `usa:runtime-missing`.\n */\nimport { hasModule, requireModule, missingMessage } from '../../runtime/registry';\n\nexport { hasModule, missingMessage };\n\nconst logged = new Set<string>();\n\n/** The module API, or null after rendering the \"missing module\" notice into `host`. */\nexport function runtimeModule<A>(host: HTMLElement, id: string): A | null {\n const who = `<${host.localName}>`;\n try {\n return requireModule<A>(id, who);\n } catch {\n const msg = missingMessage(id, who);\n if (!logged.has(id + who)) {\n logged.add(id + who);\n console.error(msg);\n }\n if (!host.querySelector(':scope > .usa-rt-missing')) {\n const p = document.createElement('p');\n p.className = 'usa-rt-missing';\n p.setAttribute('role', 'alert');\n p.textContent = msg;\n host.prepend(p);\n }\n host.dispatchEvent(new CustomEvent('usa:runtime-missing', { detail: { module: id, message: msg }, bubbles: true }));\n return null;\n }\n}\n"],"names":[],"mappings":";;AAAA;;;;;;AAMG;AAKH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAEhC;AACM,SAAU,aAAa,CAAI,IAAiB,EAAE,EAAU,EAAA;AAC5D,IAAA,MAAM,GAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAC,SAAS,GAAG;AACjC,IAAA,IAAI;AACF,QAAA,OAAO,aAAa,CAAI,EAAE,EAAE,GAAG,CAAC;IAClC;AAAE,IAAA,MAAM;QACN,MAAM,GAAG,GAAG,cAAc,CAAC,EAAE,EAAE,GAAG,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE;AACzB,YAAA,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC;AACpB,YAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACpB;QACA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,0BAA0B,CAAC,EAAE;YACnD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,YAAA,CAAC,CAAC,SAAS,GAAG,gBAAgB;AAC9B,YAAA,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC;AAC/B,YAAA,CAAC,CAAC,WAAW,GAAG,GAAG;AACnB,YAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACjB;QACA,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACnH,QAAA,OAAO,IAAI;IACb;AACF;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var base = require('./base-DBheNxJu.cjs');
|
|
4
|
-
var runtimeLink = require('./runtime-link-
|
|
5
|
-
var registry = require('./registry-
|
|
4
|
+
var runtimeLink = require('./runtime-link-Bz3rGMsh.cjs');
|
|
5
|
+
var registry = require('./registry-uaO8pDKn.cjs');
|
|
6
6
|
|
|
7
7
|
var css = "usa-scroll-scene{display:block;position:relative;max-width:100%;box-sizing:border-box}usa-scroll-scene [data-scrub]{will-change:transform,opacity}usa-scroll-scene .usa-rt-missing{margin:0 0 8px;padding:8px;border-radius:8px;background:#fef2f2;color:#991b1b;font:11px/1.4 ui-monospace,monospace;overflow-wrap:anywhere}";
|
|
8
8
|
|
|
@@ -93,4 +93,4 @@ function defineScrollScene(tag = 'usa-scroll-scene') {
|
|
|
93
93
|
|
|
94
94
|
exports.defineScrollScene = defineScrollScene;
|
|
95
95
|
exports.parseScrub = parseScrub;
|
|
96
|
-
//# sourceMappingURL=scroll-scene-
|
|
96
|
+
//# sourceMappingURL=scroll-scene-CeIosbEs.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-scene-
|
|
1
|
+
{"version":3,"file":"scroll-scene-CeIosbEs.cjs","sources":["../../src/components/widgets/scroll-scene.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { runtimeModule } from './runtime-link';\nimport { requireModule } from '../../runtime/registry';\nimport type { CoreApi } from '../../runtime/index';\nimport type { ScrollApi, ScrollScene } from '../../runtime/scroll';\nimport type { Timeline } from '../../runtime/tween';\nimport css from './scroll-scene.css?raw';\n\n/**\n * `<usa-scroll-scene start=\"top 80%\" end=\"bottom 20%\" scrub=\"120\" pin markers>`\n * (10.2) — a scroll-linked scene powered by **`motionary/runtime/scroll`**\n * (requires `use(scroll)` first). Each child with `data-scrub=\"opacity: 0 -> 1;\n * x: -80 -> 0; rotate: -8deg -> 0deg\"` is tweened across the scene; `stagger`\n * (ms of the scene's 1000 ms timeline) offsets the children. `scrub` = `true`\n * (direct) or a smoothing time in ms; without `scrub` the timeline plays on\n * enter and reverses on leave-back. `pin`, `markers`, `toggle-class`.\n * When the page cannot scroll (e.g. a thumbnail), `preview` loops the scene.\n * `progress` (read-only), `refresh()`, `timeline()`; `usa:progress`, `usa:enter`, `usa:leave`.\n */\nexport interface UsaScrollSceneElement extends UsaElement {\n readonly progress: number;\n refresh(): void;\n timeline(): Timeline | null;\n}\n\n/** 'opacity: 0 -> 1; x: -80 -> 0' → [{ from: { opacity: '0', x: '-80' }, to: {...} }] */\nexport function parseScrub(spec: string): { from: Record<string, string>; to: Record<string, string> } {\n const from: Record<string, string> = {}, to: Record<string, string> = {};\n for (const part of spec.split(';')) {\n const m = /^\\s*([\\w-]+)\\s*:\\s*([^>]+?)\\s*->\\s*(.+?)\\s*$/.exec(part);\n if (!m) continue;\n const k = m[1].replace(/-([a-z])/g, (_, c: string) => c.toUpperCase());\n from[k] = m[2];\n to[k] = m[3];\n }\n return { from, to };\n}\n\nexport function defineScrollScene(tag = 'usa-scroll-scene'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) => {\n class UsaScrollScene extends Base {\n static get observedAttributes(): string[] {\n return ['start', 'end', 'scrub', 'pin', 'markers', 'stagger', 'toggle-class', 'preview'];\n }\n private scene: ScrollScene | null = null;\n private tl: Timeline | null = null;\n get progress(): number {\n return this.scene?.progress ?? 0;\n }\n timeline(): Timeline | null {\n return this.tl;\n }\n refresh(): void {\n this.scene?.refresh();\n }\n mount(): void {\n const sc = runtimeModule<ScrollApi>(this, 'scroll');\n const core = sc && requireModule<CoreApi>('core'); // registered by use(scroll)\n if (!sc || !core) return;\n const items = Array.from(this.querySelectorAll<HTMLElement>('[data-scrub]'));\n const stagger = this.num('stagger', 0);\n const tl = core.timeline({ paused: true });\n items.forEach((el, i) => {\n const { from, to } = parseScrub(el.dataset.scrub || '');\n tl.add(new core.Tween(el, { from, to, duration: Math.max(100, 1000 - stagger * (items.length - 1)), ease: this.reduced ? 'linear' : 'cubic-out', paused: true }), stagger * i);\n });\n tl.seek(0);\n this.tl = tl;\n const scrubAttr = this.getAttribute('scrub');\n const scrub = scrubAttr === null ? false : scrubAttr === '' || scrubAttr === 'true' ? true : Number(scrubAttr) || true;\n const canScroll = document.documentElement.scrollHeight > innerHeight + 2;\n if (this.flag('preview') && !canScroll) {\n if (!this.reduced) {\n const loop = core.timeline({ repeat: -1, yoyo: true, paused: true }).add(tl, 0);\n loop.play();\n this.onCleanup(() => loop.kill());\n } else tl.progress = 1;\n this.setAttribute('data-preview', '');\n return;\n }\n this.scene = sc.scrollScene({\n trigger: this,\n start: this.str('start', 'top 85%'),\n end: this.str('end', 'bottom 35%'),\n scrub,\n pin: this.flag('pin'),\n markers: this.flag('markers'),\n toggleClass: this.str('toggle-class') || undefined,\n animation: tl,\n onEnter: () => this.emit('enter'),\n onLeave: () => this.emit('leave'),\n onUpdate: (s) => this.emit('progress', { progress: s.progress }),\n });\n this.onCleanup(() => {\n this.scene?.kill();\n this.scene = null;\n tl.kill();\n });\n }\n }\n return UsaScrollScene as unknown as CustomElementConstructor;\n },\n { id: 'scroll-scene', text: css }\n );\n}\n"],"names":["defineElement","runtimeModule","requireModule"],"mappings":";;;;;;;;AAyBA;AACM,SAAU,UAAU,CAAC,IAAY,EAAA;AACrC,IAAA,MAAM,IAAI,GAA2B,EAAE,EAAE,EAAE,GAA2B,EAAE;IACxE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAClC,MAAM,CAAC,GAAG,8CAA8C,CAAC,IAAI,CAAC,IAAI,CAAC;AACnE,QAAA,IAAI,CAAC,CAAC;YAAE;QACR,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QACtE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACd,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACd;AACA,IAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;AACrB;AAEM,SAAU,iBAAiB,CAAC,GAAG,GAAG,kBAAkB,EAAA;AACxD,IAAA,OAAOA,kBAAa,CAClB,GAAG,EACH,CAAC,IAAI,KAAI;QACP,MAAM,c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AAC;oBACrC;gBACF;AACA,gBAAA,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC;AAC1B,oBAAA,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC;oBACnC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC;oBAClC,KAAK;AACL,oBAAA,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;AACrB,oBAAA,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC7B,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,SAAS;AAClD,oBAAA,SAAS,EAAE,EAAE;oBACb,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;oBACjC,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AACjC,oBAAA,QAAQ,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AACjE,iBAAA,CAAC;AACF,gBAAA,IAAI,CAAC,SAAS,CAAC,MAAK;AAClB,oBAAA,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;AAClB,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;oBACjB,EAAE,CAAC,IAAI,EAAE;AACX,gBAAA,CAAC,CAAC;YACJ;AACD;AACD,QAAA,OAAO,cAAqD;IAC9D,CAAC,EACD,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,CAClC;AACH;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as defineElement } from './base-BTev8qxg.js';
|
|
2
|
-
import { r as runtimeModule } from './runtime-link-
|
|
3
|
-
import { r as requireModule } from './registry-
|
|
2
|
+
import { r as runtimeModule } from './runtime-link-CP3qaRja.js';
|
|
3
|
+
import { r as requireModule } from './registry-W7pXOwju.js';
|
|
4
4
|
|
|
5
5
|
var css = "usa-scroll-scene{display:block;position:relative;max-width:100%;box-sizing:border-box}usa-scroll-scene [data-scrub]{will-change:transform,opacity}usa-scroll-scene .usa-rt-missing{margin:0 0 8px;padding:8px;border-radius:8px;background:#fef2f2;color:#991b1b;font:11px/1.4 ui-monospace,monospace;overflow-wrap:anywhere}";
|
|
6
6
|
|
|
@@ -90,4 +90,4 @@ function defineScrollScene(tag = 'usa-scroll-scene') {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
export { defineScrollScene as d, parseScrub as p };
|
|
93
|
-
//# sourceMappingURL=scroll-scene-
|
|
93
|
+
//# sourceMappingURL=scroll-scene-eHhGcoDQ.js.map
|