@moonwitness/ui 0.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +135 -260
- package/TOKENS.md +62 -0
- package/dist/cartoon/anime-avatar.d.ts +8 -0
- package/dist/cartoon/anime-avatar.js +135 -0
- package/dist/cartoon/anime-stage.d.ts +67 -0
- package/dist/cartoon/anime-stage.js +106 -0
- package/dist/cartoon/index.d.ts +113 -0
- package/dist/cartoon/index.js +119 -0
- package/dist/cartoon.d.ts +59 -0
- package/dist/cartoon.js +238 -0
- package/dist/characters.d.ts +71 -0
- package/dist/characters.js +543 -0
- package/dist/components/accordion.d.ts +11 -0
- package/dist/components/accordion.js +26 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +36 -0
- package/dist/components/appearance-menu.d.ts +22 -0
- package/dist/components/appearance-menu.js +64 -0
- package/dist/components/artwork-frame.d.ts +10 -0
- package/dist/components/artwork-frame.js +12 -0
- package/dist/components/audio.d.ts +19 -0
- package/dist/components/audio.js +49 -0
- package/dist/components/avatar.d.ts +9 -0
- package/dist/components/avatar.js +28 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +21 -0
- package/dist/components/brand-mark.d.ts +13 -0
- package/dist/components/brand-mark.js +32 -0
- package/dist/components/breadcrumbs.d.ts +15 -0
- package/dist/components/breadcrumbs.js +25 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.js +119 -0
- package/dist/components/card.d.ts +20 -0
- package/dist/components/card.js +57 -0
- package/dist/components/character-badge.d.ts +9 -0
- package/dist/components/character-badge.js +19 -0
- package/dist/components/character-preview.d.ts +10 -0
- package/dist/components/character-preview.js +47 -0
- package/dist/components/character-stage.d.ts +54 -0
- package/dist/components/character-stage.js +38 -0
- package/dist/components/chart.d.ts +36 -0
- package/dist/components/chart.js +154 -0
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +15 -0
- package/dist/components/comic-panel.d.ts +17 -0
- package/dist/components/comic-panel.js +118 -0
- package/dist/components/comic-theater.d.ts +19 -0
- package/dist/components/comic-theater.js +54 -0
- package/dist/components/command.d.ts +32 -0
- package/dist/components/command.js +56 -0
- package/dist/components/confirm-dialog.d.ts +19 -0
- package/dist/components/confirm-dialog.js +32 -0
- package/dist/components/copy-button.d.ts +14 -0
- package/dist/components/copy-button.js +17 -0
- package/dist/components/date-picker.d.ts +21 -0
- package/dist/components/date-picker.js +45 -0
- package/dist/components/dialog.d.ts +20 -0
- package/dist/components/dialog.js +51 -0
- package/dist/components/dna-icon.d.ts +24 -0
- package/dist/components/dna-icon.js +14 -0
- package/dist/components/dropdown-menu.d.ts +13 -0
- package/dist/components/dropdown-menu.js +26 -0
- package/dist/components/effects.d.ts +143 -0
- package/dist/components/effects.js +248 -0
- package/dist/components/empty-state.d.ts +15 -0
- package/dist/components/empty-state.js +18 -0
- package/dist/components/epistemic-branch-panel.d.ts +10 -0
- package/dist/components/epistemic-branch-panel.js +45 -0
- package/dist/components/error-state.d.ts +20 -0
- package/dist/components/error-state.js +44 -0
- package/dist/components/field.d.ts +13 -0
- package/dist/components/field.js +35 -0
- package/dist/components/filter-facet-bar.d.ts +15 -0
- package/dist/components/filter-facet-bar.js +38 -0
- package/dist/components/inbox-popover.d.ts +28 -0
- package/dist/components/inbox-popover.js +14 -0
- package/dist/components/input.d.ts +7 -0
- package/dist/components/input.js +8 -0
- package/dist/components/kanban-board.d.ts +21 -0
- package/dist/components/kanban-board.js +38 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +7 -0
- package/dist/components/layered-scene.d.ts +74 -0
- package/dist/components/layered-scene.js +316 -0
- package/dist/components/log-console.d.ts +29 -0
- package/dist/components/log-console.js +82 -0
- package/dist/components/metric-tile.d.ts +15 -0
- package/dist/components/metric-tile.js +30 -0
- package/dist/components/mode-picker.d.ts +9 -0
- package/dist/components/mode-picker.js +72 -0
- package/dist/components/motion-timeline.d.ts +56 -0
- package/dist/components/motion-timeline.js +215 -0
- package/dist/components/number-input.d.ts +29 -0
- package/dist/components/number-input.js +45 -0
- package/dist/components/page-header.d.ts +16 -0
- package/dist/components/page-header.js +48 -0
- package/dist/components/pagination.d.ts +10 -0
- package/dist/components/pagination.js +17 -0
- package/dist/components/panel.d.ts +18 -0
- package/dist/components/panel.js +28 -0
- package/dist/components/paper-note.d.ts +6 -0
- package/dist/components/paper-note.js +35 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +29 -0
- package/dist/components/progress.d.ts +17 -0
- package/dist/components/progress.js +26 -0
- package/dist/components/quest-card.d.ts +82 -0
- package/dist/components/quest-card.js +89 -0
- package/dist/components/radio-group.d.ts +8 -0
- package/dist/components/radio-group.js +23 -0
- package/dist/components/riot-sticker.d.ts +28 -0
- package/dist/components/riot-sticker.js +61 -0
- package/dist/components/scene-particles.d.ts +31 -0
- package/dist/components/scene-particles.js +90 -0
- package/dist/components/scene-transitions.d.ts +16 -0
- package/dist/components/scene-transitions.js +51 -0
- package/dist/components/section-ribbon.d.ts +17 -0
- package/dist/components/section-ribbon.js +21 -0
- package/dist/components/select-field.d.ts +7 -0
- package/dist/components/select-field.js +8 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.js +22 -0
- package/dist/components/separator.d.ts +9 -0
- package/dist/components/separator.js +12 -0
- package/dist/components/sheet.d.ts +14 -0
- package/dist/components/sheet.js +39 -0
- package/dist/components/skeleton.d.ts +7 -0
- package/dist/components/skeleton.js +11 -0
- package/dist/components/sketch-annotation.d.ts +22 -0
- package/dist/components/sketch-annotation.js +21 -0
- package/dist/components/smart-button-box.d.ts +24 -0
- package/dist/components/smart-button-box.js +26 -0
- package/dist/components/speech-bubble.d.ts +33 -0
- package/dist/components/speech-bubble.js +18 -0
- package/dist/components/spinner.d.ts +11 -0
- package/dist/components/spinner.js +10 -0
- package/dist/components/sprite-player.d.ts +50 -0
- package/dist/components/sprite-player.js +230 -0
- package/dist/components/status-bar.d.ts +14 -0
- package/dist/components/status-bar.js +16 -0
- package/dist/components/status-pill.d.ts +11 -0
- package/dist/components/status-pill.js +20 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.js +16 -0
- package/dist/components/table.d.ts +15 -0
- package/dist/components/table.js +66 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +24 -0
- package/dist/components/tag-input.d.ts +17 -0
- package/dist/components/tag-input.js +79 -0
- package/dist/components/textarea.d.ts +7 -0
- package/dist/components/textarea.js +8 -0
- package/dist/components/toast.d.ts +7 -0
- package/dist/components/toast.js +8 -0
- package/dist/components/toolbar.d.ts +8 -0
- package/dist/components/toolbar.js +11 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/update-banner.d.ts +14 -0
- package/dist/components/update-banner.js +39 -0
- package/dist/components/xv-primitives.d.ts +63 -0
- package/dist/components/xv-primitives.js +53 -0
- package/dist/dna.d.ts +26 -0
- package/dist/dna.js +79 -0
- package/dist/game/boss-hud.d.ts +73 -0
- package/dist/game/boss-hud.js +78 -0
- package/dist/game/index.d.ts +194 -0
- package/dist/game/index.js +222 -0
- package/dist/game/tactical.d.ts +41 -0
- package/dist/game/tactical.js +46 -0
- package/dist/game.d.ts +95 -0
- package/dist/game.js +263 -0
- package/dist/icons/activity.d.ts +7 -0
- package/dist/icons/activity.js +8 -0
- package/dist/icons/add.d.ts +7 -0
- package/dist/icons/add.js +8 -0
- package/dist/icons/addon.d.ts +7 -0
- package/dist/icons/addon.js +8 -0
- package/dist/icons/anime-anger.d.ts +7 -0
- package/dist/icons/anime-anger.js +8 -0
- package/dist/icons/anime-shock.d.ts +7 -0
- package/dist/icons/anime-shock.js +8 -0
- package/dist/icons/anime-sparkle.d.ts +7 -0
- package/dist/icons/anime-sparkle.js +8 -0
- package/dist/icons/anime-sweatdrop.d.ts +7 -0
- package/dist/icons/anime-sweatdrop.js +8 -0
- package/dist/icons/archive.d.ts +7 -0
- package/dist/icons/archive.js +8 -0
- package/dist/icons/arrow-left.d.ts +7 -0
- package/dist/icons/arrow-left.js +8 -0
- package/dist/icons/arrow-right.d.ts +7 -0
- package/dist/icons/arrow-right.js +8 -0
- package/dist/icons/attachment.d.ts +7 -0
- package/dist/icons/attachment.js +8 -0
- package/dist/icons/bank.d.ts +7 -0
- package/dist/icons/bank.js +8 -0
- package/dist/icons/bolt.d.ts +7 -0
- package/dist/icons/bolt.js +8 -0
- package/dist/icons/book-open.d.ts +7 -0
- package/dist/icons/book-open.js +8 -0
- package/dist/icons/bookmark.d.ts +7 -0
- package/dist/icons/bookmark.js +8 -0
- package/dist/icons/boss-skull.d.ts +7 -0
- package/dist/icons/boss-skull.js +8 -0
- package/dist/icons/calendar-clock.d.ts +7 -0
- package/dist/icons/calendar-clock.js +8 -0
- package/dist/icons/calendar.d.ts +7 -0
- package/dist/icons/calendar.js +8 -0
- package/dist/icons/check-circle.d.ts +7 -0
- package/dist/icons/check-circle.js +8 -0
- package/dist/icons/check-square.d.ts +7 -0
- package/dist/icons/check-square.js +8 -0
- package/dist/icons/check.d.ts +7 -0
- package/dist/icons/check.js +8 -0
- package/dist/icons/chevron-right.d.ts +7 -0
- package/dist/icons/chevron-right.js +8 -0
- package/dist/icons/chevrons-left.d.ts +7 -0
- package/dist/icons/chevrons-left.js +8 -0
- package/dist/icons/chevrons-right.d.ts +7 -0
- package/dist/icons/chevrons-right.js +8 -0
- package/dist/icons/clapperboard.d.ts +7 -0
- package/dist/icons/clapperboard.js +8 -0
- package/dist/icons/clock.d.ts +7 -0
- package/dist/icons/clock.js +8 -0
- package/dist/icons/close.d.ts +7 -0
- package/dist/icons/close.js +8 -0
- package/dist/icons/code.d.ts +7 -0
- package/dist/icons/code.js +8 -0
- package/dist/icons/columns.d.ts +7 -0
- package/dist/icons/columns.js +8 -0
- package/dist/icons/combo-flame.d.ts +7 -0
- package/dist/icons/combo-flame.js +8 -0
- package/dist/icons/company.d.ts +7 -0
- package/dist/icons/company.js +8 -0
- package/dist/icons/credit-card.d.ts +7 -0
- package/dist/icons/credit-card.js +8 -0
- package/dist/icons/critical-star.d.ts +7 -0
- package/dist/icons/critical-star.js +8 -0
- package/dist/icons/currency.d.ts +7 -0
- package/dist/icons/currency.js +8 -0
- package/dist/icons/delete.d.ts +7 -0
- package/dist/icons/delete.js +8 -0
- package/dist/icons/document.d.ts +7 -0
- package/dist/icons/document.js +8 -0
- package/dist/icons/download.d.ts +7 -0
- package/dist/icons/download.js +8 -0
- package/dist/icons/dpad.d.ts +7 -0
- package/dist/icons/dpad.js +8 -0
- package/dist/icons/edit.d.ts +7 -0
- package/dist/icons/edit.js +8 -0
- package/dist/icons/element-fire.d.ts +7 -0
- package/dist/icons/element-fire.js +8 -0
- package/dist/icons/element-ice.d.ts +7 -0
- package/dist/icons/element-ice.js +8 -0
- package/dist/icons/element-solar.d.ts +7 -0
- package/dist/icons/element-solar.js +8 -0
- package/dist/icons/element-void.d.ts +7 -0
- package/dist/icons/element-void.js +8 -0
- package/dist/icons/element-volt.d.ts +7 -0
- package/dist/icons/element-volt.js +8 -0
- package/dist/icons/element-wind.d.ts +7 -0
- package/dist/icons/element-wind.js +8 -0
- package/dist/icons/error.d.ts +7 -0
- package/dist/icons/error.js +8 -0
- package/dist/icons/external-link.d.ts +7 -0
- package/dist/icons/external-link.js +8 -0
- package/dist/icons/field.d.ts +7 -0
- package/dist/icons/field.js +8 -0
- package/dist/icons/file-spreadsheet.d.ts +7 -0
- package/dist/icons/file-spreadsheet.js +8 -0
- package/dist/icons/filter.d.ts +7 -0
- package/dist/icons/filter.js +8 -0
- package/dist/icons/gacha-ticket.d.ts +7 -0
- package/dist/icons/gacha-ticket.js +8 -0
- package/dist/icons/gamepad.d.ts +7 -0
- package/dist/icons/gamepad.js +8 -0
- package/dist/icons/globe.d.ts +7 -0
- package/dist/icons/globe.js +8 -0
- package/dist/icons/grid.d.ts +7 -0
- package/dist/icons/grid.js +8 -0
- package/dist/icons/hash.d.ts +7 -0
- package/dist/icons/hash.js +8 -0
- package/dist/icons/heart-hp.d.ts +7 -0
- package/dist/icons/heart-hp.js +8 -0
- package/dist/icons/history.d.ts +7 -0
- package/dist/icons/history.js +8 -0
- package/dist/icons/home.d.ts +7 -0
- package/dist/icons/home.js +8 -0
- package/dist/icons/image.d.ts +7 -0
- package/dist/icons/image.js +8 -0
- package/dist/icons/impact-slash.d.ts +7 -0
- package/dist/icons/impact-slash.js +8 -0
- package/dist/icons/inbox.d.ts +7 -0
- package/dist/icons/inbox.js +8 -0
- package/dist/icons/index.d.ts +120 -0
- package/dist/icons/index.js +120 -0
- package/dist/icons/info.d.ts +7 -0
- package/dist/icons/info.js +8 -0
- package/dist/icons/jobs.d.ts +7 -0
- package/dist/icons/jobs.js +8 -0
- package/dist/icons/katana.d.ts +7 -0
- package/dist/icons/katana.js +8 -0
- package/dist/icons/key.d.ts +7 -0
- package/dist/icons/key.js +8 -0
- package/dist/icons/keyboard.d.ts +7 -0
- package/dist/icons/keyboard.js +8 -0
- package/dist/icons/keyframe-diamond.d.ts +7 -0
- package/dist/icons/keyframe-diamond.js +8 -0
- package/dist/icons/knowledge.d.ts +7 -0
- package/dist/icons/knowledge.js +8 -0
- package/dist/icons/language.d.ts +7 -0
- package/dist/icons/language.js +8 -0
- package/dist/icons/lock.d.ts +7 -0
- package/dist/icons/lock.js +8 -0
- package/dist/icons/logout.d.ts +7 -0
- package/dist/icons/logout.js +8 -0
- package/dist/icons/loot-chest.d.ts +7 -0
- package/dist/icons/loot-chest.js +8 -0
- package/dist/icons/mail.d.ts +7 -0
- package/dist/icons/mail.js +8 -0
- package/dist/icons/mana-crystal.d.ts +7 -0
- package/dist/icons/mana-crystal.js +8 -0
- package/dist/icons/map-pin.d.ts +7 -0
- package/dist/icons/map-pin.js +8 -0
- package/dist/icons/mecha-helm.d.ts +7 -0
- package/dist/icons/mecha-helm.js +8 -0
- package/dist/icons/menu.d.ts +7 -0
- package/dist/icons/menu.js +8 -0
- package/dist/icons/message.d.ts +7 -0
- package/dist/icons/message.js +8 -0
- package/dist/icons/model.d.ts +7 -0
- package/dist/icons/model.js +8 -0
- package/dist/icons/moon.d.ts +7 -0
- package/dist/icons/moon.js +8 -0
- package/dist/icons/notification.d.ts +7 -0
- package/dist/icons/notification.js +8 -0
- package/dist/icons/partner.d.ts +7 -0
- package/dist/icons/partner.js +8 -0
- package/dist/icons/pause.d.ts +7 -0
- package/dist/icons/pause.js +8 -0
- package/dist/icons/phone.d.ts +7 -0
- package/dist/icons/phone.js +8 -0
- package/dist/icons/play.d.ts +7 -0
- package/dist/icons/play.js +8 -0
- package/dist/icons/potion-flask.d.ts +7 -0
- package/dist/icons/potion-flask.js +8 -0
- package/dist/icons/quest-scroll.d.ts +7 -0
- package/dist/icons/quest-scroll.js +8 -0
- package/dist/icons/radar-ping.d.ts +7 -0
- package/dist/icons/radar-ping.js +8 -0
- package/dist/icons/refresh.d.ts +7 -0
- package/dist/icons/refresh.js +8 -0
- package/dist/icons/relation.d.ts +7 -0
- package/dist/icons/relation.js +8 -0
- package/dist/icons/save.d.ts +7 -0
- package/dist/icons/save.js +8 -0
- package/dist/icons/search.d.ts +7 -0
- package/dist/icons/search.js +8 -0
- package/dist/icons/security.d.ts +7 -0
- package/dist/icons/security.js +8 -0
- package/dist/icons/send.d.ts +7 -0
- package/dist/icons/send.js +8 -0
- package/dist/icons/settings.d.ts +7 -0
- package/dist/icons/settings.js +8 -0
- package/dist/icons/shield-crest.d.ts +7 -0
- package/dist/icons/shield-crest.js +8 -0
- package/dist/icons/shuriken.d.ts +7 -0
- package/dist/icons/shuriken.js +8 -0
- package/dist/icons/signal-off.d.ts +7 -0
- package/dist/icons/signal-off.js +8 -0
- package/dist/icons/signal.d.ts +7 -0
- package/dist/icons/signal.js +8 -0
- package/dist/icons/skill-node.d.ts +7 -0
- package/dist/icons/skill-node.js +8 -0
- package/dist/icons/smartphone.d.ts +7 -0
- package/dist/icons/smartphone.js +8 -0
- package/dist/icons/sort-ascending.d.ts +7 -0
- package/dist/icons/sort-ascending.js +8 -0
- package/dist/icons/sort-descending.d.ts +7 -0
- package/dist/icons/sort-descending.js +8 -0
- package/dist/icons/sort.d.ts +7 -0
- package/dist/icons/sort.js +8 -0
- package/dist/icons/sparkle.d.ts +7 -0
- package/dist/icons/sparkle.js +8 -0
- package/dist/icons/speech-burst.d.ts +7 -0
- package/dist/icons/speech-burst.js +8 -0
- package/dist/icons/story.d.ts +7 -0
- package/dist/icons/story.js +8 -0
- package/dist/icons/sun.d.ts +7 -0
- package/dist/icons/sun.js +8 -0
- package/dist/icons/tag.d.ts +7 -0
- package/dist/icons/tag.js +8 -0
- package/dist/icons/team.d.ts +7 -0
- package/dist/icons/team.js +8 -0
- package/dist/icons/trophy-crown.d.ts +7 -0
- package/dist/icons/trophy-crown.js +8 -0
- package/dist/icons/upload.d.ts +7 -0
- package/dist/icons/upload.js +8 -0
- package/dist/icons/user.d.ts +7 -0
- package/dist/icons/user.js +8 -0
- package/dist/icons/users.d.ts +7 -0
- package/dist/icons/users.js +8 -0
- package/dist/icons/visibility-off.d.ts +7 -0
- package/dist/icons/visibility-off.js +8 -0
- package/dist/icons/visibility.d.ts +7 -0
- package/dist/icons/visibility.js +8 -0
- package/dist/icons/volume-off.d.ts +7 -0
- package/dist/icons/volume-off.js +8 -0
- package/dist/icons/volume.d.ts +7 -0
- package/dist/icons/volume.js +8 -0
- package/dist/icons/warning.d.ts +7 -0
- package/dist/icons/warning.js +8 -0
- package/dist/icons/workflow.d.ts +7 -0
- package/dist/icons/workflow.js +8 -0
- package/dist/icons.d.ts +124 -0
- package/dist/icons.js +361 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +83 -0
- package/dist/lib/asset-registry.d.ts +104 -0
- package/dist/lib/asset-registry.js +328 -0
- package/dist/lib/audio-runtime.d.ts +23 -0
- package/dist/lib/audio-runtime.js +254 -0
- package/dist/lib/character-adapter.d.ts +63 -0
- package/dist/lib/character-adapter.js +232 -0
- package/dist/lib/character-registry.d.ts +159 -0
- package/dist/lib/character-registry.js +1950 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/cn.js +4 -0
- package/dist/lib/compose-refs.d.ts +7 -0
- package/dist/lib/compose-refs.js +14 -0
- package/dist/lib/sanitize-url.d.ts +6 -0
- package/dist/lib/sanitize-url.js +44 -0
- package/dist/lib/scene-camera.d.ts +70 -0
- package/dist/lib/scene-camera.js +317 -0
- package/dist/lib/scene-playback.d.ts +93 -0
- package/dist/lib/scene-playback.js +447 -0
- package/dist/lib/scene-soundscape.d.ts +35 -0
- package/dist/lib/scene-soundscape.js +117 -0
- package/dist/lib/scene-test-harness.d.ts +17 -0
- package/dist/lib/scene-test-harness.js +140 -0
- package/dist/lib/scene-timeline.d.ts +59 -0
- package/dist/lib/scene-timeline.js +280 -0
- package/dist/lib/use-animation-visibility.d.ts +7 -0
- package/dist/lib/use-animation-visibility.js +31 -0
- package/dist/lib/use-modal-focus.d.ts +6 -0
- package/dist/lib/use-modal-focus.js +211 -0
- package/dist/lib/use-reduced-motion.d.ts +5 -0
- package/dist/lib/use-reduced-motion.js +31 -0
- package/dist/motion/easing-presets.d.ts +21 -0
- package/dist/motion/easing-presets.js +207 -0
- package/dist/motion/index.d.ts +153 -0
- package/dist/motion/index.js +311 -0
- package/dist/motion/physics.d.ts +30 -0
- package/dist/motion/physics.js +178 -0
- package/dist/motion/timeline-math.d.ts +78 -0
- package/dist/motion/timeline-math.js +216 -0
- package/dist/motion.d.ts +76 -0
- package/dist/motion.js +316 -0
- package/dist/pixelfx-registry.d.ts +127 -0
- package/dist/pixelfx-registry.js +861 -0
- package/dist/pixelfx.d.ts +161 -0
- package/dist/pixelfx.js +510 -0
- package/dist/provider.d.ts +27 -0
- package/dist/provider.js +15 -0
- package/dist/skin-catalog.d.ts +20 -0
- package/dist/skin-catalog.js +215 -0
- package/dist/skin-tokens.d.ts +3 -0
- package/dist/skin-tokens.js +390 -0
- package/dist/tailwind-preset.css +109 -0
- package/dist/templates/battle-arena.d.ts +2 -0
- package/dist/templates/battle-arena.js +351 -0
- package/dist/templates/index.d.ts +3 -0
- package/dist/templates/index.js +77 -0
- package/dist/templates.d.ts +4 -0
- package/dist/templates.js +78 -0
- package/dist/themes/dna-presets.d.ts +18 -0
- package/dist/themes/dna-presets.js +84 -0
- package/dist/themes/index.d.ts +11 -0
- package/dist/themes/index.js +10 -0
- package/dist/themes/provider.d.ts +26 -0
- package/dist/themes/provider.js +96 -0
- package/dist/themes/types.d.ts +42 -0
- package/dist/themes/types.js +47 -0
- package/dist/themes.d.ts +2 -0
- package/dist/themes.js +2 -0
- package/dist/token-exporter.d.ts +5 -0
- package/dist/token-exporter.js +4 -0
- package/dist/token-exporters.d.ts +28 -0
- package/dist/token-exporters.js +257 -0
- package/dist/token-seeds.d.ts +38 -0
- package/dist/token-seeds.js +272 -0
- package/dist/token-snapshot.d.ts +21 -0
- package/dist/token-snapshot.js +131 -0
- package/dist/tokens.bundle.json +1669 -0
- package/dist/tokens.generated.css +599 -0
- package/dist/tokens.w3c.json +1931 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +49 -0
- package/package.json +536 -43
- package/scripts/generate-icons.mjs +110 -0
- package/scripts/generate-token-artifacts.mjs +90 -0
- package/scripts/icon-svg-to-jsx.mjs +249 -0
- package/scripts/verification-diagnostics.mjs +40 -0
- package/scripts/verify-package.mjs +412 -0
- package/src/cartoon/anime-avatar.tsx +628 -0
- package/src/cartoon/anime-stage.tsx +458 -0
- package/src/cartoon/index.tsx +542 -0
- package/src/cartoon.tsx +645 -0
- package/src/characters.ts +625 -0
- package/src/components/accordion.tsx +77 -0
- package/src/components/alert.tsx +139 -0
- package/src/components/appearance-menu.tsx +181 -0
- package/src/components/artwork-frame.tsx +49 -0
- package/src/components/audio.tsx +97 -0
- package/src/components/avatar.tsx +75 -0
- package/src/components/badge.tsx +94 -0
- package/src/components/brand-mark.tsx +73 -0
- package/src/components/breadcrumbs.tsx +98 -0
- package/src/components/button.tsx +340 -0
- package/src/components/card.tsx +171 -0
- package/src/components/character-badge.tsx +58 -0
- package/src/components/character-preview.tsx +104 -0
- package/src/components/character-stage.tsx +225 -0
- package/src/components/chart.tsx +481 -0
- package/src/components/checkbox.tsx +64 -0
- package/src/components/comic-panel.tsx +301 -0
- package/src/components/comic-theater.tsx +170 -0
- package/src/components/command.tsx +189 -0
- package/src/components/confirm-dialog.tsx +129 -0
- package/src/components/copy-button.tsx +62 -0
- package/src/components/date-picker.tsx +126 -0
- package/src/components/dialog.tsx +164 -0
- package/src/components/dna-icon.tsx +77 -0
- package/src/components/dropdown-menu.tsx +87 -0
- package/src/components/effects.tsx +1021 -0
- package/src/components/empty-state.tsx +93 -0
- package/src/components/epistemic-branch-panel.tsx +101 -0
- package/src/components/error-state.tsx +137 -0
- package/src/components/field.tsx +96 -0
- package/src/components/filter-facet-bar.tsx +91 -0
- package/src/components/inbox-popover.tsx +146 -0
- package/src/components/input.tsx +25 -0
- package/src/components/kanban-board.tsx +190 -0
- package/src/components/label.tsx +19 -0
- package/src/components/layered-scene.tsx +555 -0
- package/src/components/log-console.tsx +261 -0
- package/src/components/metric-tile.tsx +99 -0
- package/src/components/mode-picker.tsx +149 -0
- package/src/components/motion-timeline.tsx +848 -0
- package/src/components/number-input.tsx +104 -0
- package/src/components/page-header.tsx +123 -0
- package/src/components/pagination.tsx +83 -0
- package/src/components/panel.tsx +121 -0
- package/src/components/paper-note.tsx +77 -0
- package/src/components/popover.tsx +72 -0
- package/src/components/progress.tsx +127 -0
- package/src/components/quest-card.tsx +319 -0
- package/src/components/radio-group.tsx +50 -0
- package/src/components/riot-sticker.tsx +151 -0
- package/src/components/scene-particles.tsx +196 -0
- package/src/components/scene-transitions.tsx +130 -0
- package/src/components/section-ribbon.tsx +94 -0
- package/src/components/select-field.tsx +27 -0
- package/src/components/select.tsx +81 -0
- package/src/components/separator.tsx +58 -0
- package/src/components/sheet.tsx +96 -0
- package/src/components/skeleton.tsx +35 -0
- package/src/components/sketch-annotation.tsx +87 -0
- package/src/components/smart-button-box.tsx +114 -0
- package/src/components/speech-bubble.tsx +116 -0
- package/src/components/spinner.tsx +69 -0
- package/src/components/sprite-player.tsx +412 -0
- package/src/components/status-bar.tsx +63 -0
- package/src/components/status-pill.tsx +68 -0
- package/src/components/switch.tsx +76 -0
- package/src/components/table.tsx +163 -0
- package/src/components/tabs.tsx +101 -0
- package/src/components/tag-input.tsx +170 -0
- package/src/components/textarea.tsx +25 -0
- package/src/components/toast.tsx +14 -0
- package/src/components/toolbar.tsx +39 -0
- package/src/components/tooltip.tsx +49 -0
- package/src/components/update-banner.tsx +220 -0
- package/src/components/xv-primitives.tsx +256 -0
- package/src/dna.tsx +137 -0
- package/src/game/boss-hud.tsx +384 -0
- package/src/game/index.tsx +886 -0
- package/src/game/tactical.tsx +245 -0
- package/src/game.tsx +770 -0
- package/src/icons/activity.tsx +38 -0
- package/src/icons/add.tsx +38 -0
- package/src/icons/addon.tsx +37 -0
- package/src/icons/anime-anger.tsx +37 -0
- package/src/icons/anime-shock.tsx +37 -0
- package/src/icons/anime-sparkle.tsx +38 -0
- package/src/icons/anime-sweatdrop.tsx +38 -0
- package/src/icons/archive.tsx +37 -0
- package/src/icons/arrow-left.tsx +37 -0
- package/src/icons/arrow-right.tsx +37 -0
- package/src/icons/attachment.tsx +38 -0
- package/src/icons/bank.tsx +37 -0
- package/src/icons/bolt.tsx +37 -0
- package/src/icons/book-open.tsx +37 -0
- package/src/icons/bookmark.tsx +37 -0
- package/src/icons/boss-skull.tsx +40 -0
- package/src/icons/calendar-clock.tsx +40 -0
- package/src/icons/calendar.tsx +38 -0
- package/src/icons/check-circle.tsx +38 -0
- package/src/icons/check-square.tsx +38 -0
- package/src/icons/check.tsx +37 -0
- package/src/icons/chevron-right.tsx +37 -0
- package/src/icons/chevrons-left.tsx +37 -0
- package/src/icons/chevrons-right.tsx +37 -0
- package/src/icons/clapperboard.tsx +38 -0
- package/src/icons/clock.tsx +38 -0
- package/src/icons/close.tsx +37 -0
- package/src/icons/code.tsx +37 -0
- package/src/icons/columns.tsx +38 -0
- package/src/icons/combo-flame.tsx +38 -0
- package/src/icons/company.tsx +38 -0
- package/src/icons/credit-card.tsx +38 -0
- package/src/icons/critical-star.tsx +37 -0
- package/src/icons/currency.tsx +38 -0
- package/src/icons/delete.tsx +37 -0
- package/src/icons/document.tsx +38 -0
- package/src/icons/download.tsx +37 -0
- package/src/icons/dpad.tsx +38 -0
- package/src/icons/edit.tsx +38 -0
- package/src/icons/element-fire.tsx +37 -0
- package/src/icons/element-ice.tsx +38 -0
- package/src/icons/element-solar.tsx +38 -0
- package/src/icons/element-void.tsx +38 -0
- package/src/icons/element-volt.tsx +38 -0
- package/src/icons/element-wind.tsx +37 -0
- package/src/icons/error.tsx +38 -0
- package/src/icons/external-link.tsx +38 -0
- package/src/icons/field.tsx +38 -0
- package/src/icons/file-spreadsheet.tsx +38 -0
- package/src/icons/filter.tsx +37 -0
- package/src/icons/gacha-ticket.tsx +38 -0
- package/src/icons/gamepad.tsx +40 -0
- package/src/icons/globe.tsx +38 -0
- package/src/icons/grid.tsx +40 -0
- package/src/icons/hash.tsx +37 -0
- package/src/icons/heart-hp.tsx +38 -0
- package/src/icons/history.tsx +37 -0
- package/src/icons/home.tsx +37 -0
- package/src/icons/image.tsx +39 -0
- package/src/icons/impact-slash.tsx +38 -0
- package/src/icons/inbox.tsx +38 -0
- package/src/icons/index.ts +120 -0
- package/src/icons/info.tsx +38 -0
- package/src/icons/jobs.tsx +38 -0
- package/src/icons/katana.tsx +38 -0
- package/src/icons/key.tsx +38 -0
- package/src/icons/keyboard.tsx +38 -0
- package/src/icons/keyframe-diamond.tsx +38 -0
- package/src/icons/knowledge.tsx +38 -0
- package/src/icons/language.tsx +39 -0
- package/src/icons/lock.tsx +38 -0
- package/src/icons/logout.tsx +37 -0
- package/src/icons/loot-chest.tsx +39 -0
- package/src/icons/mail.tsx +38 -0
- package/src/icons/mana-crystal.tsx +38 -0
- package/src/icons/map-pin.tsx +38 -0
- package/src/icons/mecha-helm.tsx +38 -0
- package/src/icons/menu.tsx +37 -0
- package/src/icons/message.tsx +38 -0
- package/src/icons/model.tsx +38 -0
- package/src/icons/moon.tsx +37 -0
- package/src/icons/notification.tsx +38 -0
- package/src/icons/partner.tsx +41 -0
- package/src/icons/pause.tsx +37 -0
- package/src/icons/phone.tsx +37 -0
- package/src/icons/play.tsx +37 -0
- package/src/icons/potion-flask.tsx +40 -0
- package/src/icons/quest-scroll.tsx +39 -0
- package/src/icons/radar-ping.tsx +40 -0
- package/src/icons/refresh.tsx +38 -0
- package/src/icons/relation.tsx +40 -0
- package/src/icons/save.tsx +38 -0
- package/src/icons/search.tsx +38 -0
- package/src/icons/security.tsx +38 -0
- package/src/icons/send.tsx +38 -0
- package/src/icons/settings.tsx +39 -0
- package/src/icons/shield-crest.tsx +38 -0
- package/src/icons/shuriken.tsx +38 -0
- package/src/icons/signal-off.tsx +37 -0
- package/src/icons/signal.tsx +37 -0
- package/src/icons/skill-node.tsx +40 -0
- package/src/icons/smartphone.tsx +38 -0
- package/src/icons/sort-ascending.tsx +37 -0
- package/src/icons/sort-descending.tsx +37 -0
- package/src/icons/sort.tsx +37 -0
- package/src/icons/sparkle.tsx +38 -0
- package/src/icons/speech-burst.tsx +37 -0
- package/src/icons/story.tsx +37 -0
- package/src/icons/sun.tsx +38 -0
- package/src/icons/tag.tsx +38 -0
- package/src/icons/team.tsx +40 -0
- package/src/icons/trophy-crown.tsx +39 -0
- package/src/icons/upload.tsx +37 -0
- package/src/icons/user.tsx +38 -0
- package/src/icons/users.tsx +39 -0
- package/src/icons/visibility-off.tsx +38 -0
- package/src/icons/visibility.tsx +38 -0
- package/src/icons/volume-off.tsx +37 -0
- package/src/icons/volume.tsx +37 -0
- package/src/icons/warning.tsx +38 -0
- package/src/icons/workflow.tsx +40 -0
- package/src/icons.tsx +965 -0
- package/src/index.ts +89 -0
- package/src/lib/asset-registry.ts +534 -0
- package/src/lib/audio-runtime.ts +314 -0
- package/src/lib/character-adapter.ts +370 -0
- package/src/lib/character-registry.ts +2368 -0
- package/src/lib/cn.ts +6 -0
- package/src/lib/compose-refs.ts +16 -0
- package/src/lib/sanitize-url.ts +51 -0
- package/src/lib/scene-camera.ts +483 -0
- package/src/lib/scene-playback.ts +622 -0
- package/src/lib/scene-soundscape.ts +151 -0
- package/src/lib/scene-test-harness.ts +200 -0
- package/src/lib/scene-timeline.ts +398 -0
- package/src/lib/use-animation-visibility.ts +45 -0
- package/src/lib/use-modal-focus.ts +270 -0
- package/src/lib/use-reduced-motion.ts +37 -0
- package/src/motion/easing-presets.ts +262 -0
- package/src/motion/index.tsx +894 -0
- package/src/motion/physics.ts +259 -0
- package/src/motion/timeline-math.ts +358 -0
- package/src/motion.tsx +639 -0
- package/src/pixelfx-registry.ts +1190 -0
- package/src/pixelfx-types.d.ts +73 -0
- package/src/pixelfx.tsx +994 -0
- package/src/provider.tsx +63 -0
- package/src/skin-catalog.ts +270 -0
- package/src/skin-tokens.ts +425 -0
- package/src/styles/components.css +8007 -0
- package/src/styles/tokens.css +952 -0
- package/src/styles/visual-universe.css +149 -0
- package/src/styles/xv-primitives.css +192 -0
- package/src/templates/battle-arena.tsx +688 -0
- package/src/templates/index.tsx +314 -0
- package/src/templates.tsx +225 -0
- package/src/themes/dna-presets.ts +119 -0
- package/src/themes/index.ts +43 -0
- package/src/themes/provider.tsx +162 -0
- package/src/themes/types.ts +111 -0
- package/src/themes.ts +9 -0
- package/src/token-exporter.ts +12 -0
- package/src/token-exporters.ts +343 -0
- package/src/token-seeds.ts +335 -0
- package/src/token-snapshot.ts +179 -0
- package/src/utils.ts +58 -0
- package/styles.css +3 -0
- package/src/components.d.ts +0 -588
- package/src/components.js +0 -2044
- package/src/index.d.ts +0 -3
- package/src/index.js +0 -13
- package/src/skins.d.ts +0 -4
- package/src/skins.js +0 -20
- package/src/styles.css +0 -587
- package/src/tailwind.css +0 -24
- package/src/theme.d.ts +0 -71
- package/src/theme.js +0 -257
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState, } from "react";
|
|
4
|
+
import { Badge } from "../components/badge.js";
|
|
5
|
+
import { Button } from "../components/button.js";
|
|
6
|
+
import { getBossCharacters, getCharacterById, getPlayableCharacters, rollGachaCharacter, } from "../lib/character-registry.js";
|
|
7
|
+
import { MotionStage, ScreenFXOverlay, useMotion } from "../motion/index.js";
|
|
8
|
+
import { AchievementToast, ActionHotbar, BossHealthBar, ComboCounter, DialogueBox, FloatingCombatText, InputPromptBadge, LootRevealCard, PauseMenuOverlay, RadialMenu, StatGauge, TacticalRadar, TurnOrderStrip, } from "../game/index.js";
|
|
9
|
+
import { AnimeCutIn, CartoonRig, EpisodeTitleCard, SmearFrame, StoryboardPlayer, VisualNovelStage, } from "../cartoon/index.js";
|
|
10
|
+
import { KatanaIcon } from "../icons/katana.js";
|
|
11
|
+
import { CriticalStarIcon } from "../icons/critical-star.js";
|
|
12
|
+
import { PotionFlaskIcon } from "../icons/potion-flask.js";
|
|
13
|
+
import { ShieldCrestIcon } from "../icons/shield-crest.js";
|
|
14
|
+
const PLAYABLE_HEROES = getPlayableCharacters();
|
|
15
|
+
const ECLIPSE_BOSSES = getBossCharacters();
|
|
16
|
+
const RADAR_BLIPS = [
|
|
17
|
+
{ id: "b1", label: "Boss", x: 0.45, y: -0.42, kind: "boss" },
|
|
18
|
+
{ id: "b2", label: "Ally", x: -0.35, y: 0.25, kind: "ally" },
|
|
19
|
+
{ id: "b3", label: "Relic", x: 0.12, y: 0.56, kind: "objective" },
|
|
20
|
+
{ id: "b4", label: "Drone", x: -0.52, y: -0.3, kind: "enemy" },
|
|
21
|
+
];
|
|
22
|
+
export function GameBattleTemplate() {
|
|
23
|
+
const { triggerSfx } = useMotion();
|
|
24
|
+
const [heroId, setHeroId] = useState(PLAYABLE_HEROES[0]?.id ?? "kuro-signal");
|
|
25
|
+
const [bossId, setBossId] = useState(ECLIPSE_BOSSES[0]?.id ?? "lord-null");
|
|
26
|
+
const hero = getCharacterById(heroId) ?? PLAYABLE_HEROES[0];
|
|
27
|
+
const boss = getCharacterById(bossId) ?? ECLIPSE_BOSSES[0];
|
|
28
|
+
const [hp, setHp] = useState(92);
|
|
29
|
+
const [mp, setMp] = useState(80);
|
|
30
|
+
const [xp, setXp] = useState(45);
|
|
31
|
+
const [bossHp, setBossHp] = useState(boss.stats.hp);
|
|
32
|
+
const [stagger, setStagger] = useState(35);
|
|
33
|
+
const [combo, setCombo] = useState(6);
|
|
34
|
+
const [paused, setPaused] = useState(false);
|
|
35
|
+
const [flashFx, setFlashFx] = useState(false);
|
|
36
|
+
const [speedlinesFx, setSpeedlinesFx] = useState(false);
|
|
37
|
+
const [shakeSeed, setShakeSeed] = useState(0);
|
|
38
|
+
const [shakeIntensity, setShakeIntensity] = useState(0);
|
|
39
|
+
const [hitstopMs, setHitstopMs] = useState(0);
|
|
40
|
+
const [heroPose, setHeroPose] = useState("idle");
|
|
41
|
+
const [cutInOpen, setCutInOpen] = useState(false);
|
|
42
|
+
const [trophyOpen, setTrophyOpen] = useState(false);
|
|
43
|
+
const [lootCharacterId, setLootCharacterId] = useState(null);
|
|
44
|
+
const [lootRevealed, setLootRevealed] = useState(false);
|
|
45
|
+
const [dialogueStep, setDialogueStep] = useState(0);
|
|
46
|
+
const [radialAction, setRadialAction] = useState("slash");
|
|
47
|
+
const [events, setEvents] = useState([]);
|
|
48
|
+
const [cooldowns, setCooldowns] = useState({});
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
setBossHp(boss.stats.hp);
|
|
51
|
+
setStagger(25);
|
|
52
|
+
setLootCharacterId(null);
|
|
53
|
+
setLootRevealed(false);
|
|
54
|
+
}, [boss.id, boss.stats.hp]);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const activeIds = Object.keys(cooldowns).filter((k) => (cooldowns[k] ?? 0) > 0);
|
|
57
|
+
if (activeIds.length === 0)
|
|
58
|
+
return;
|
|
59
|
+
const timer = window.setInterval(() => {
|
|
60
|
+
setCooldowns((prev) => {
|
|
61
|
+
const next = {};
|
|
62
|
+
for (const [k, v] of Object.entries(prev)) {
|
|
63
|
+
const updated = Math.max(0, Math.round((v - 0.2) * 10) / 10);
|
|
64
|
+
if (updated > 0)
|
|
65
|
+
next[k] = updated;
|
|
66
|
+
}
|
|
67
|
+
return next;
|
|
68
|
+
});
|
|
69
|
+
}, 200);
|
|
70
|
+
return () => window.clearInterval(timer);
|
|
71
|
+
}, [cooldowns]);
|
|
72
|
+
const spawnCombatText = useCallback((text, tone) => {
|
|
73
|
+
const id = Date.now() + Math.random();
|
|
74
|
+
const xPercent = 30 + Math.round(Math.random() * 38);
|
|
75
|
+
setEvents((prev) => [
|
|
76
|
+
...prev.slice(-4),
|
|
77
|
+
{ id, text, tone, xPercent, yPercent: 28 },
|
|
78
|
+
]);
|
|
79
|
+
window.setTimeout(() => {
|
|
80
|
+
setEvents((prev) => prev.filter((item) => item.id !== id));
|
|
81
|
+
}, 950);
|
|
82
|
+
}, []);
|
|
83
|
+
const triggerShake = useCallback((intensity, hitstop) => {
|
|
84
|
+
setShakeIntensity(intensity);
|
|
85
|
+
setHitstopMs(hitstop);
|
|
86
|
+
setShakeSeed((s) => s + 1);
|
|
87
|
+
}, []);
|
|
88
|
+
const strikeBoss = useCallback((damage, staggerGain, crit = false) => {
|
|
89
|
+
const brokenBonus = stagger >= 100 ? 1.4 : 1;
|
|
90
|
+
const finalDamage = Math.round(damage * brokenBonus);
|
|
91
|
+
triggerSfx(crit ? "level-up" : "hit-impact", hero.voicePitch);
|
|
92
|
+
setHeroPose("attack");
|
|
93
|
+
window.setTimeout(() => setHeroPose("idle"), 260);
|
|
94
|
+
setCombo((c) => c + (crit ? 4 : 2));
|
|
95
|
+
setXp((x) => Math.min(100, x + (crit ? 16 : 9)));
|
|
96
|
+
setStagger((s) => Math.min(100, s + staggerGain));
|
|
97
|
+
setFlashFx(true);
|
|
98
|
+
setSpeedlinesFx(crit);
|
|
99
|
+
triggerShake(crit ? 9 : 4.5, crit ? 90 : 40);
|
|
100
|
+
window.setTimeout(() => {
|
|
101
|
+
setFlashFx(false);
|
|
102
|
+
setSpeedlinesFx(false);
|
|
103
|
+
}, 240);
|
|
104
|
+
spawnCombatText(crit ? `-${finalDamage} CRIT!` : `-${finalDamage}`, crit ? "crit" : "damage");
|
|
105
|
+
setBossHp((prev) => {
|
|
106
|
+
const next = Math.max(0, prev - finalDamage);
|
|
107
|
+
if (next === 0 && prev > 0) {
|
|
108
|
+
setHeroPose("victory");
|
|
109
|
+
setTrophyOpen(true);
|
|
110
|
+
setLootCharacterId(rollGachaCharacter(Date.now()).id);
|
|
111
|
+
setLootRevealed(false);
|
|
112
|
+
}
|
|
113
|
+
return next;
|
|
114
|
+
});
|
|
115
|
+
}, [hero.voicePitch, stagger, triggerSfx, triggerShake, spawnCombatText]);
|
|
116
|
+
const triggerTakeHit = useCallback((damage) => {
|
|
117
|
+
triggerSfx("error-bonk");
|
|
118
|
+
setHeroPose("hurt");
|
|
119
|
+
window.setTimeout(() => setHeroPose("idle"), 260);
|
|
120
|
+
setHp((prev) => Math.max(0, prev - damage));
|
|
121
|
+
triggerShake(6, 55);
|
|
122
|
+
spawnCombatText(`-${damage} HIT`, "damage");
|
|
123
|
+
}, [triggerSfx, triggerShake, spawnCombatText]);
|
|
124
|
+
const triggerHeal = useCallback(() => {
|
|
125
|
+
triggerSfx("success-chime");
|
|
126
|
+
setHp((prev) => Math.min(100, prev + 24));
|
|
127
|
+
setMp((prev) => Math.max(0, prev - 15));
|
|
128
|
+
spawnCombatText("+24 HEAL", "heal");
|
|
129
|
+
}, [triggerSfx, spawnCombatText]);
|
|
130
|
+
const triggerUltimate = useCallback(() => {
|
|
131
|
+
setCutInOpen(true);
|
|
132
|
+
strikeBoss(hero.ultimate.power * 2, 45, true);
|
|
133
|
+
window.setTimeout(() => setCutInOpen(false), 1850);
|
|
134
|
+
}, [hero.ultimate.power, strikeBoss]);
|
|
135
|
+
const resetBattle = useCallback(() => {
|
|
136
|
+
triggerSfx("coin-pickup");
|
|
137
|
+
setHp(100);
|
|
138
|
+
setMp(100);
|
|
139
|
+
setBossHp(boss.stats.hp);
|
|
140
|
+
setStagger(0);
|
|
141
|
+
setCombo(0);
|
|
142
|
+
setHeroPose("idle");
|
|
143
|
+
setLootCharacterId(null);
|
|
144
|
+
setLootRevealed(false);
|
|
145
|
+
setTrophyOpen(false);
|
|
146
|
+
setPaused(false);
|
|
147
|
+
spawnCombatText("RESET!", "status");
|
|
148
|
+
}, [boss.stats.hp, spawnCombatText, triggerSfx]);
|
|
149
|
+
const hotbarItems = [
|
|
150
|
+
{
|
|
151
|
+
id: "slash",
|
|
152
|
+
label: "Slash",
|
|
153
|
+
hotkey: "1",
|
|
154
|
+
icon: _jsx(KatanaIcon, { size: 18, "aria-hidden": "true" }),
|
|
155
|
+
rarity: "common",
|
|
156
|
+
cooldownProgress: (cooldowns.slash ?? 0) / 1.4,
|
|
157
|
+
cooldownSeconds: cooldowns.slash,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "nova",
|
|
161
|
+
label: "Nova Crit",
|
|
162
|
+
hotkey: "2",
|
|
163
|
+
icon: _jsx(CriticalStarIcon, { size: 18, "aria-hidden": "true" }),
|
|
164
|
+
rarity: "legendary",
|
|
165
|
+
cooldownProgress: (cooldowns.nova ?? 0) / 2.2,
|
|
166
|
+
cooldownSeconds: cooldowns.nova,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "med",
|
|
170
|
+
label: "Med Pulse",
|
|
171
|
+
hotkey: "3",
|
|
172
|
+
icon: _jsx(PotionFlaskIcon, { size: 18, "aria-hidden": "true" }),
|
|
173
|
+
rarity: "rare",
|
|
174
|
+
count: 3,
|
|
175
|
+
cooldownProgress: (cooldowns.med ?? 0) / 1.6,
|
|
176
|
+
cooldownSeconds: cooldowns.med,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "guard",
|
|
180
|
+
label: "Reset Arena",
|
|
181
|
+
hotkey: "4",
|
|
182
|
+
icon: _jsx(ShieldCrestIcon, { size: 18, "aria-hidden": "true" }),
|
|
183
|
+
rarity: "epic",
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
const handleHotbar = useCallback((item) => {
|
|
187
|
+
if (item.id === "slash") {
|
|
188
|
+
setCooldowns((c) => ({ ...c, slash: 1.4 }));
|
|
189
|
+
strikeBoss(28, 22, false);
|
|
190
|
+
}
|
|
191
|
+
else if (item.id === "nova") {
|
|
192
|
+
setCooldowns((c) => ({ ...c, nova: 2.2 }));
|
|
193
|
+
strikeBoss(54, 38, true);
|
|
194
|
+
}
|
|
195
|
+
else if (item.id === "med") {
|
|
196
|
+
setCooldowns((c) => ({ ...c, med: 1.6 }));
|
|
197
|
+
triggerHeal();
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
resetBattle();
|
|
201
|
+
}
|
|
202
|
+
}, [resetBattle, strikeBoss, triggerHeal]);
|
|
203
|
+
const handleArenaKeyDown = useCallback((event) => {
|
|
204
|
+
const target = event.target;
|
|
205
|
+
if (target &&
|
|
206
|
+
(target.tagName === "INPUT" ||
|
|
207
|
+
target.tagName === "SELECT" ||
|
|
208
|
+
target.tagName === "TEXTAREA")) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (event.key === "1")
|
|
212
|
+
handleHotbar(hotbarItems[0]);
|
|
213
|
+
else if (event.key === "2")
|
|
214
|
+
handleHotbar(hotbarItems[1]);
|
|
215
|
+
else if (event.key === "3")
|
|
216
|
+
handleHotbar(hotbarItems[2]);
|
|
217
|
+
else if (event.key === "4")
|
|
218
|
+
handleHotbar(hotbarItems[3]);
|
|
219
|
+
else if (event.key.toLowerCase() === "u")
|
|
220
|
+
triggerUltimate();
|
|
221
|
+
else if (event.key === "Escape")
|
|
222
|
+
setPaused((p) => !p);
|
|
223
|
+
}, [handleHotbar, hotbarItems, triggerUltimate]);
|
|
224
|
+
const turnEntries = useMemo(() => [
|
|
225
|
+
{ id: "t1", characterId: hero.id, team: "ally", actionValue: 0 },
|
|
226
|
+
{ id: "t2", characterId: "vesper-ink", team: "ally", actionValue: 14 },
|
|
227
|
+
{ id: "t3", characterId: boss.id, team: "enemy", actionValue: 22 },
|
|
228
|
+
{ id: "t4", characterId: "akira-pulse", team: "ally", actionValue: 31 },
|
|
229
|
+
], [hero.id, boss.id]);
|
|
230
|
+
const activeDialogueChar = dialogueStep % 2 === 0 ? hero : boss;
|
|
231
|
+
const activeDialogueText = activeDialogueChar.dialogueLines[dialogueStep % activeDialogueChar.dialogueLines.length] ?? activeDialogueChar.ultimate.quote;
|
|
232
|
+
return (_jsxs(MotionStage, { tabIndex: 0, onKeyDown: handleArenaKeyDown, shakeIntensity: shakeIntensity, shakeSeed: shakeSeed, hitstopMs: hitstopMs, className: "mw-ui-template-shell mw-ui-template-game", "data-testid": "template-game-battle", children: [_jsx(ScreenFXOverlay, { effect: "flash", active: flashFx }), _jsx(ScreenFXOverlay, { effect: "speedlines-burst", active: speedlinesFx }), _jsx(ScreenFXOverlay, { effect: "vignette", active: hp > 0 && hp <= 25 }), _jsx(FloatingCombatText, { events: events }), _jsx(PauseMenuOverlay, { open: paused, onResume: () => setPaused(false), onRestart: resetBattle, children: _jsx("p", { className: "mw-ui-template-hero-lead", children: "Battle paused. Press Esc or Resume to return with keyboard hotkeys (1-4, U)." }) }), _jsxs("div", { className: "mw-ui-template-battle-bar", children: [_jsxs("div", { className: "mw-ui-template-battle-pickers", children: [_jsxs("label", { children: ["HERO", " ", _jsx("select", { "aria-label": "Select battle hero", className: "mw-ui-template-battle-select", value: hero.id, onChange: (e) => setHeroId(e.target.value), children: PLAYABLE_HEROES.map((c) => (_jsxs("option", { value: c.id, children: [c.name, " (", c.faction, ")"] }, c.id))) })] }), _jsxs("label", { children: ["BOSS", " ", _jsx("select", { "aria-label": "Select raid boss", className: "mw-ui-template-battle-select", value: boss.id, onChange: (e) => setBossId(e.target.value), children: ECLIPSE_BOSSES.map((c) => (_jsxs("option", { value: c.id, children: [c.name, " (", c.stats.hp, " HP)"] }, c.id))) })] })] }), _jsxs("div", { className: "mw-ui-template-actions", children: [_jsx(Button, { size: "sm", variant: "default", onClick: triggerUltimate, children: "Ultimate Cut-In (U)" }), _jsx(Button, { size: "sm", variant: "destructive", onClick: () => triggerTakeHit(22), children: "Take Hit (-22)" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => setPaused(true), children: "Pause HUD" })] })] }), _jsx(BossHealthBar, { characterId: boss.id, hp: bossHp, maxHp: boss.stats.hp, phases: 3, stagger: stagger, broken: stagger >= 100 }), _jsx(TurnOrderStrip, { entries: turnEntries, activeId: "t1" }), _jsx(AnimeCutIn, { active: cutInOpen, characterId: hero.id, onDismiss: () => setCutInOpen(false) }), _jsx(AchievementToast, { open: trophyOpen, title: `${boss.name} Vanquished!`, description: "Multi-phase Eclipse boss cleared. Reveal your mythic summon reward below.", points: 350, rarity: "mythic", onDismiss: () => setTrophyOpen(false) }), _jsxs("div", { className: "mw-ui-template-game-top", children: [_jsxs("div", { className: "mw-ui-template-game-gauges", children: [_jsx(StatGauge, { label: `${hero.name.toUpperCase()} HP`, value: hp, max: 100, tone: "hp", variant: "arcade-skew" }), _jsx(StatGauge, { label: "ENERGY MP", value: mp, max: 100, tone: "mp", variant: "segmented", segments: 8 }), _jsx(StatGauge, { label: "SYNC XP", value: xp, max: 100, tone: "xp", variant: "straight" })] }), _jsxs("div", { className: "mw-ui-template-game-right", children: [_jsx(ComboCounter, { count: combo, decayProgress: Math.min(1, 0.35 + combo * 0.06) }), _jsx(TacticalRadar, { zoneLabel: "ROOFTOP ARENA", blips: RADAR_BLIPS })] })] }), _jsxs("div", { className: "mw-ui-template-battle-stage", children: [_jsxs("div", { className: "mw-ui-template-battle-fighter", children: [_jsx(CartoonRig, { characterId: hero.id, pose: heroPose, emote: hp <= 25 ? "sweatdrop" : combo >= 10 ? "sparkle" : undefined, size: "md" }), _jsxs("div", { children: [_jsxs(Badge, { size: "sm", variant: "primary", children: [hero.codename, " \u00B7 ", hero.element.toUpperCase()] }), _jsxs("p", { className: "mw-ui-template-hero-lead", children: [_jsx("strong", { children: hero.name }), " \u2014 ", hero.title] })] })] }), lootCharacterId ? (_jsx(LootRevealCard, { characterId: lootCharacterId, revealed: lootRevealed, onRevealChange: setLootRevealed })) : (_jsxs("div", { className: "mw-ui-template-game-radial-wrap", children: [_jsx(RadialMenu, { activeId: radialAction, options: [
|
|
233
|
+
{ id: "slash", label: "Strike", badge: "ATK" },
|
|
234
|
+
{ id: "guard", label: "Guard", badge: "DEF" },
|
|
235
|
+
{ id: "dash", label: "Ultimate", badge: "ULT" },
|
|
236
|
+
{ id: "item", label: "Heal", badge: "MED" },
|
|
237
|
+
], onSelect: (opt) => {
|
|
238
|
+
setRadialAction(opt.id);
|
|
239
|
+
if (opt.id === "slash")
|
|
240
|
+
strikeBoss(30, 20, false);
|
|
241
|
+
else if (opt.id === "dash")
|
|
242
|
+
triggerUltimate();
|
|
243
|
+
else if (opt.id === "item")
|
|
244
|
+
triggerHeal();
|
|
245
|
+
else
|
|
246
|
+
spawnCombatText("GUARD UP!", "status");
|
|
247
|
+
} }), _jsxs("div", { className: "mw-ui-template-prompts", children: [_jsx(InputPromptBadge, { input: "1-4", platform: "keyboard", actionLabel: "Skills" }), _jsx(InputPromptBadge, { input: "U", platform: "keyboard", actionLabel: "Ultimate" }), _jsx(InputPromptBadge, { input: "A", platform: "xbox", actionLabel: "Strike" }), _jsx(InputPromptBadge, { input: "\u2715", platform: "playstation", actionLabel: "Advance" })] })] }))] }), _jsx(ActionHotbar, { items: hotbarItems, onActivate: handleHotbar }), _jsx(DialogueBox, { characterId: activeDialogueChar.id, text: activeDialogueText, instant: false, choices: [
|
|
248
|
+
{
|
|
249
|
+
id: "strike",
|
|
250
|
+
label: `Launch ${hero.ultimate.name}`,
|
|
251
|
+
hint: "Cut-In",
|
|
252
|
+
},
|
|
253
|
+
{ id: "heal", label: "Cast Field Med (+24 HP)", hint: "-15 MP" },
|
|
254
|
+
], onChoiceSelect: (choice) => {
|
|
255
|
+
if (choice.id === "strike")
|
|
256
|
+
triggerUltimate();
|
|
257
|
+
else
|
|
258
|
+
triggerHeal();
|
|
259
|
+
setDialogueStep((s) => s + 1);
|
|
260
|
+
}, onAdvance: () => setDialogueStep((s) => s + 1) })] }));
|
|
261
|
+
}
|
|
262
|
+
const SAMPLE_STORYBOARD = [
|
|
263
|
+
{
|
|
264
|
+
id: "beat-1",
|
|
265
|
+
label: "Entrance",
|
|
266
|
+
durationMs: 2600,
|
|
267
|
+
characterId: "kuro-signal",
|
|
268
|
+
speaker: "Kuro",
|
|
269
|
+
line: "Hold tight! Launching the MoonWitness cel-shaded anime & cartoon cutscene engine!",
|
|
270
|
+
mood: "happy",
|
|
271
|
+
emote: "sparkle",
|
|
272
|
+
sfxWord: "WHOOSH!",
|
|
273
|
+
sfxTone: "speed",
|
|
274
|
+
audioCue: "zip",
|
|
275
|
+
cameraZoom: 1,
|
|
276
|
+
cameraX: 0,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
id: "beat-2",
|
|
280
|
+
label: "Impact",
|
|
281
|
+
durationMs: 2400,
|
|
282
|
+
characterId: "pip-bounce",
|
|
283
|
+
speaker: "Pip",
|
|
284
|
+
line: "BOOM! Spiky starburst SFX, eye blinks, lip-sync phonemes, and squash-stretch all synced!",
|
|
285
|
+
mood: "surprised",
|
|
286
|
+
emote: "shock",
|
|
287
|
+
sfxWord: "BOOM!",
|
|
288
|
+
sfxTone: "impact",
|
|
289
|
+
audioCue: "boing",
|
|
290
|
+
cameraZoom: 1.08,
|
|
291
|
+
cameraX: -8,
|
|
292
|
+
impactFlash: true,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: "beat-3",
|
|
296
|
+
label: "Finale",
|
|
297
|
+
durationMs: 2600,
|
|
298
|
+
characterId: "aria-lumina",
|
|
299
|
+
speaker: "Aria",
|
|
300
|
+
line: "Every character in our 30-character registry plugs directly into rigs, cut-ins, and VN stages.",
|
|
301
|
+
mood: "determined",
|
|
302
|
+
emote: "exclaim",
|
|
303
|
+
sfxWord: "ZAP!",
|
|
304
|
+
sfxTone: "electric",
|
|
305
|
+
audioCue: "rimshot",
|
|
306
|
+
cameraZoom: 1.03,
|
|
307
|
+
cameraX: 6,
|
|
308
|
+
},
|
|
309
|
+
];
|
|
310
|
+
const SAMPLE_VN_LINES = [
|
|
311
|
+
{
|
|
312
|
+
id: "vn-1",
|
|
313
|
+
speakerId: "kuro-signal",
|
|
314
|
+
position: "left",
|
|
315
|
+
mood: "determined",
|
|
316
|
+
emote: "exclaim",
|
|
317
|
+
text: "Lord Null just breached the rooftop broadcast relay. Ready for a synchronized Anime Cut-In?",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
id: "vn-2",
|
|
321
|
+
speakerId: "vesper-ink",
|
|
322
|
+
position: "center",
|
|
323
|
+
mood: "neutral",
|
|
324
|
+
emote: "sparkle",
|
|
325
|
+
text: "I already locked the stagger curve. Give me the call and we shatter all three boss bars.",
|
|
326
|
+
choices: [
|
|
327
|
+
{ id: "rush", label: "Full Rush — Trigger Overdrive Cut-In!" },
|
|
328
|
+
{ id: "sync", label: "Wait for Akira to boost our ATB Speed" },
|
|
329
|
+
],
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: "vn-3",
|
|
333
|
+
speakerId: "akira-pulse",
|
|
334
|
+
position: "right",
|
|
335
|
+
mood: "happy",
|
|
336
|
+
emote: "sparkle",
|
|
337
|
+
text: "Unified audio bus at 100%! Every character speaks at their own signature voice pitch.",
|
|
338
|
+
},
|
|
339
|
+
];
|
|
340
|
+
export function CartoonStudioTemplate() {
|
|
341
|
+
const { triggerSfx } = useMotion();
|
|
342
|
+
const [smearActive, setSmearActive] = useState(false);
|
|
343
|
+
const [cutInPreview, setCutInPreview] = useState(false);
|
|
344
|
+
const [episodeReplay, setEpisodeReplay] = useState(0);
|
|
345
|
+
const triggerSmear = () => {
|
|
346
|
+
setSmearActive(true);
|
|
347
|
+
triggerSfx("zip");
|
|
348
|
+
window.setTimeout(() => setSmearActive(false), 420);
|
|
349
|
+
};
|
|
350
|
+
return (_jsxs("div", { className: "mw-ui-template-shell", "data-testid": "template-cartoon-studio", children: [_jsxs("div", { className: "mw-ui-template-app-bar", children: [_jsxs("div", { children: [_jsx(Badge, { variant: "primary", size: "sm", children: "ANIME & 2D CARTOON CUTSCENE STUDIO" }), _jsx("h3", { className: "mw-ui-template-section-title", children: "Episode Card, Visual Novel Stage & Storyboard" })] }), _jsxs("div", { className: "mw-ui-template-actions", children: [_jsx(Button, { size: "sm", variant: "default", onClick: () => setCutInPreview((v) => !v), children: cutInPreview ? "Hide Cut-In" : "Trigger Anime Cut-In" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => setEpisodeReplay((n) => n + 1), children: "Replay Title Card" }), _jsx(Button, { size: "sm", variant: "outline", onClick: triggerSmear, children: "Smear Burst" })] })] }), _jsx(EpisodeTitleCard, { episodeLabel: "EPISODE 01", jpSubtitle: "\u7B2C1\u8A71\u30FB\u30B7\u30B0\u30CA\u30EB\u66B4\u8D70", title: "SIGNAL OVERDRIVE: MOONWITNESS AWAKENS", replayKey: episodeReplay }), _jsx(AnimeCutIn, { active: cutInPreview, characterId: "kuro-signal", onDismiss: () => setCutInPreview(false) }), _jsx(VisualNovelStage, { sceneTitle: "SCENE 01 \u00B7 SIGNAL TOWER ROOFTOP", castIds: ["kuro-signal", "vesper-ink", "akira-pulse"], lines: SAMPLE_VN_LINES }), _jsx(SmearFrame, { active: smearActive, direction: "right", children: _jsx(StoryboardPlayer, { title: "EP-01 \u00B7 Signal Drop", beats: SAMPLE_STORYBOARD }) })] }));
|
|
351
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { Badge } from "../components/badge.js";
|
|
5
|
+
import { Button } from "../components/button.js";
|
|
6
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "../components/card.js";
|
|
7
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, } from "../components/sheet.js";
|
|
8
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../components/tabs.js";
|
|
9
|
+
import { AnimatedNumber, KineticText, MarqueeRibbon, PageTransitionCurtain, ScrollReveal, StaggerGroup, StateMorphButton, useMotion, } from "../motion/index.js";
|
|
10
|
+
export { CartoonStudioTemplate, GameBattleTemplate } from "./battle-arena.js";
|
|
11
|
+
export function WebLandingTemplate() {
|
|
12
|
+
const { triggerSfx } = useMotion();
|
|
13
|
+
const [ctaStatus, setCtaStatus] = useState("idle");
|
|
14
|
+
const [curtainVariant, setCurtainVariant] = useState("ink-wipe");
|
|
15
|
+
const [curtainActive, setCurtainActive] = useState(false);
|
|
16
|
+
const handleLaunch = useCallback(() => {
|
|
17
|
+
setCtaStatus("loading");
|
|
18
|
+
window.setTimeout(() => {
|
|
19
|
+
setCtaStatus("success");
|
|
20
|
+
triggerSfx("success-chime");
|
|
21
|
+
window.setTimeout(() => setCtaStatus("idle"), 1600);
|
|
22
|
+
}, 650);
|
|
23
|
+
}, [triggerSfx]);
|
|
24
|
+
const previewCurtain = useCallback((variant) => {
|
|
25
|
+
setCurtainVariant(variant);
|
|
26
|
+
setCurtainActive(true);
|
|
27
|
+
triggerSfx("drawer-whoosh");
|
|
28
|
+
window.setTimeout(() => setCurtainActive(false), 680);
|
|
29
|
+
}, [triggerSfx]);
|
|
30
|
+
return (_jsxs("div", { className: "mw-ui-template-shell", "data-testid": "template-web-landing", children: [_jsx(PageTransitionCurtain, { active: curtainActive, variant: curtainVariant, label: "SCENE SHIFT" }), _jsx("header", { className: "mw-ui-template-hero", children: _jsxs("div", { className: "mw-ui-template-hero-copy", children: [_jsx(Badge, { variant: "magenta", size: "sm", children: "WEB MOTION TEMPLATE" }), _jsx("h3", { className: "mw-ui-template-hero-title", children: _jsx(KineticText, { text: "SHIP LIVING INTERFACES", variant: "stamp-drop", splitBy: "word" }) }), _jsx("p", { className: "mw-ui-template-hero-lead", children: "Zero-Tailwind animated hero built with KineticText, StaggerGroup, MarqueeRibbon, and accessible reduced-motion fallbacks." }), _jsxs("div", { className: "mw-ui-template-actions", children: [_jsx(StateMorphButton, { status: ctaStatus, idleLabel: "Deploy Starter", loadingLabel: "Deploying\u2026", successLabel: "Live on Edge", onClick: handleLaunch }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => previewCurtain("ink-wipe"), children: "Ink Wipe Transition" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => previewCurtain("iris-circle"), children: "Iris Transition" })] })] }) }), _jsx(MarqueeRibbon, { items: [
|
|
31
|
+
"SPRING PHYSICS",
|
|
32
|
+
"12FPS CARTOON EASING",
|
|
33
|
+
"ZERO TAILWIND CSS",
|
|
34
|
+
"WCAG AA CONTRAST",
|
|
35
|
+
"SSR READY",
|
|
36
|
+
"GAME & WEBTEMPLATES",
|
|
37
|
+
] }), _jsx(ScrollReveal, { preset: "slide-snap", children: _jsxs(StaggerGroup, { preset: "pop-in", className: "mw-ui-template-bento", children: [_jsxs(Card, { variant: "elevated", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "01 \u00B7 Kinetic Typography" }), _jsx(CardDescription, { children: "Word or character stagger with intact screen-reader label." })] }), _jsx(CardContent, { children: _jsx(KineticText, { text: "FRAME BY FRAME", variant: "wave-bounce", splitBy: "word" }) })] }), _jsxs(Card, { variant: "elevated", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "02 \u00B7 Motion Profiles" }), _jsx(CardDescription, { children: "Switch off, subtle, expressive, or cartoon scale globally." })] }), _jsx(CardContent, { children: _jsx(Badge, { variant: "cyan", size: "sm", children: "Respects prefers-reduced-motion" }) })] }), _jsxs(Card, { variant: "elevated", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "03 \u00B7 Audio Ready" }), _jsx(CardDescription, { children: "Procedural WebAudio cues opt-in with zero external MP3s." })] }), _jsx(CardContent, { children: _jsx(Badge, { variant: "success", size: "sm", children: "13 Built-in SFX Presets" }) })] })] }) })] }));
|
|
38
|
+
}
|
|
39
|
+
export function AppCommandTemplate() {
|
|
40
|
+
const { triggerSfx } = useMotion();
|
|
41
|
+
const [revenue, setRevenue] = useState(48290);
|
|
42
|
+
const [activeUsers, setActiveUsers] = useState(1428);
|
|
43
|
+
const [latencyMs, setLatencyMs] = useState(34);
|
|
44
|
+
const [syncStatus, setSyncStatus] = useState("idle");
|
|
45
|
+
const [tasks, setTasks] = useState([
|
|
46
|
+
{ id: "t1", title: "Publish @moonwitness/ui v1.0.0", status: "Ready" },
|
|
47
|
+
{
|
|
48
|
+
id: "t2",
|
|
49
|
+
title: "Verify multi-genre skin contrast matrix",
|
|
50
|
+
status: "Passed",
|
|
51
|
+
},
|
|
52
|
+
{ id: "t3", title: "Sync W3C design token artifacts", status: "Synced" },
|
|
53
|
+
]);
|
|
54
|
+
const simulatePulse = useCallback(() => {
|
|
55
|
+
triggerSfx("coin-pickup");
|
|
56
|
+
setRevenue((v) => v + 640);
|
|
57
|
+
setActiveUsers((v) => v + 19);
|
|
58
|
+
setLatencyMs((v) => (v <= 24 ? 38 : v - 4));
|
|
59
|
+
}, [triggerSfx]);
|
|
60
|
+
const runSync = useCallback(() => {
|
|
61
|
+
setSyncStatus("loading");
|
|
62
|
+
window.setTimeout(() => {
|
|
63
|
+
setSyncStatus("success");
|
|
64
|
+
triggerSfx("success-chime");
|
|
65
|
+
setTasks((prev) => [
|
|
66
|
+
{
|
|
67
|
+
id: `t-${Date.now()}`,
|
|
68
|
+
title: `Synced release snapshot #${prev.length + 1}`,
|
|
69
|
+
status: "Live",
|
|
70
|
+
},
|
|
71
|
+
...prev.slice(0, 3),
|
|
72
|
+
]);
|
|
73
|
+
window.setTimeout(() => setSyncStatus("idle"), 1400);
|
|
74
|
+
}, 550);
|
|
75
|
+
}, [triggerSfx]);
|
|
76
|
+
return (_jsxs("div", { className: "mw-ui-template-shell", "data-testid": "template-app-command", children: [_jsxs("div", { className: "mw-ui-template-app-bar", children: [_jsxs("div", { children: [_jsx(Badge, { variant: "cyan", size: "sm", children: "APP / SAAS MOTION SHELL" }), _jsx("h3", { className: "mw-ui-template-section-title", children: "Command Workspace" })] }), _jsxs("div", { className: "mw-ui-template-actions", children: [_jsx(Button, { size: "sm", variant: "outline", onClick: simulatePulse, children: "Simulate Live Tick" }), _jsx(StateMorphButton, { status: syncStatus, idleLabel: "Sync Workspace", loadingLabel: "Syncing\u2026", successLabel: "Synced", onClick: runSync }), _jsxs(Sheet, { children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { size: "sm", variant: "default", children: "Open Inspector" }) }), _jsxs(SheetContent, { "data-side": "right", children: [_jsxs(SheetHeader, { children: [_jsx(SheetTitle, { children: "Workspace Inspector" }), _jsx(SheetDescription, { children: "Standalone CSS Sheet drawer with zero Tailwind dependency and smooth slide motion." })] }), _jsxs("div", { className: "mw-ui-template-inspector-body", children: [_jsxs("p", { children: ["Active sessions: ", activeUsers] }), _jsxs("p", { children: ["Current p95 latency: ", latencyMs, " ms"] })] })] })] })] })] }), _jsxs(StaggerGroup, { preset: "pop-in", className: "mw-ui-template-kpi-grid", children: [_jsx(Card, { variant: "elevated", children: _jsxs(CardHeader, { children: [_jsx(CardDescription, { children: "Monthly Recurring" }), _jsx(CardTitle, { children: _jsx(AnimatedNumber, { value: revenue, prefix: "$" }) })] }) }), _jsx(Card, { variant: "elevated", children: _jsxs(CardHeader, { children: [_jsx(CardDescription, { children: "Active Operators" }), _jsx(CardTitle, { children: _jsx(AnimatedNumber, { value: activeUsers }) })] }) }), _jsx(Card, { variant: "elevated", children: _jsxs(CardHeader, { children: [_jsx(CardDescription, { children: "Edge Latency" }), _jsx(CardTitle, { children: _jsx(AnimatedNumber, { value: latencyMs, suffix: " ms" }) })] }) })] }), _jsxs(Tabs, { defaultValue: "queue", children: [_jsxs(TabsList, { children: [_jsxs(TabsTrigger, { value: "queue", children: ["Dispatch Queue (", tasks.length, ")"] }), _jsx(TabsTrigger, { value: "telemetry", children: "Motion Telemetry" })] }), _jsx(TabsContent, { value: "queue", children: _jsx("ul", { className: "mw-ui-template-list", children: tasks.map((task) => (_jsxs("li", { className: "mw-ui-template-list-item", children: [_jsx("span", { children: task.title }), _jsx(Badge, { size: "sm", variant: "success", children: task.status })] }, task.id))) }) }), _jsx(TabsContent, { value: "telemetry", children: _jsx("p", { className: "mw-ui-template-hero-lead", children: "All numeric KPI counters, tabs, and overlays honor global MotionProfile and prefers-reduced-motion automatically." }) })] })] }));
|
|
77
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function WebLandingTemplate(): import("react").JSX.Element;
|
|
2
|
+
export declare function AppCommandTemplate(): import("react").JSX.Element;
|
|
3
|
+
export declare function GameBattleTemplate(): import("react").JSX.Element;
|
|
4
|
+
export declare function CartoonStudioTemplate(): import("react").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Badge } from "./components/badge.js";
|
|
4
|
+
import { Button } from "./components/button.js";
|
|
5
|
+
import { Card, CardContent, CardHeader, CardTitle } from "./components/card.js";
|
|
6
|
+
import { KineticText } from "./motion.js";
|
|
7
|
+
import { ActionHotbar, BossHealthBar, ComboCounter, StatGauge, TurnOrderStrip, } from "./game.js";
|
|
8
|
+
import { CartoonRig, EpisodeTitleCard, OnomatopoeiaSFX, StoryboardPlayer, } from "./cartoon.js";
|
|
9
|
+
export function WebLandingTemplate() {
|
|
10
|
+
return (_jsxs("div", { style: {
|
|
11
|
+
display: "grid",
|
|
12
|
+
gap: "1rem",
|
|
13
|
+
padding: "1.25rem",
|
|
14
|
+
background: "var(--mw-background)",
|
|
15
|
+
border: "1.5px solid var(--mw-border)",
|
|
16
|
+
}, children: [_jsxs("div", { style: { display: "flex", flexWrap: "wrap", justifyContent: "space-between", alignItems: "center", gap: "0.75rem" }, children: [_jsx(Badge, { variant: "magenta", size: "sm", children: "WEB LANDING STARTER" }), _jsxs("div", { style: { display: "flex", gap: "0.5rem" }, children: [_jsx(Button, { size: "xs", variant: "outline", children: "Docs" }), _jsx(Button, { size: "xs", variant: "default", children: "Launch" })] })] }), _jsxs("div", { style: { display: "grid", gap: "0.55rem" }, children: [_jsx(KineticText, { text: "BUILD DISTINCTIVE INTERFACES", splitBy: "word" }), _jsx("p", { style: { margin: 0, maxWidth: "40rem", color: "var(--mw-muted-foreground)", fontSize: "0.9rem" }, children: "Shared design tokens, accessible primitives, and expressive motion packed into one cohesive starter layout." })] }), _jsx("div", { style: {
|
|
17
|
+
display: "grid",
|
|
18
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(12rem, 1fr))",
|
|
19
|
+
gap: "0.75rem",
|
|
20
|
+
}, children: [
|
|
21
|
+
["Tokens", "Multi-skin & Genre DNA"],
|
|
22
|
+
["Motion", "12 deterministic easing curves"],
|
|
23
|
+
["A11y", "Keyboard & contrast verified"],
|
|
24
|
+
].map(([title, copy]) => (_jsxs(Card, { padding: "sm", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: title }) }), _jsx(CardContent, { children: _jsx("small", { style: { color: "var(--mw-muted-foreground)" }, children: copy }) })] }, title))) })] }));
|
|
25
|
+
}
|
|
26
|
+
export function AppCommandTemplate() {
|
|
27
|
+
const [activeTab, setActiveTab] = useState("queue");
|
|
28
|
+
return (_jsxs("div", { style: {
|
|
29
|
+
display: "grid",
|
|
30
|
+
gap: "0.9rem",
|
|
31
|
+
padding: "1.15rem",
|
|
32
|
+
background: "var(--mw-background)",
|
|
33
|
+
border: "1.5px solid var(--mw-border)",
|
|
34
|
+
}, children: [_jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", flexWrap: "wrap", gap: "0.5rem" }, children: [_jsx("strong", { style: { fontFamily: "var(--mw-font-display)", fontSize: "1.15rem" }, children: "APP COMMAND SHELL" }), _jsxs("div", { style: { display: "flex", gap: "0.35rem" }, children: [_jsx(Button, { size: "xs", variant: activeTab === "queue" ? "default" : "outline", onClick: () => setActiveTab("queue"), children: "Review Queue" }), _jsx(Button, { size: "xs", variant: activeTab === "releases" ? "default" : "outline", onClick: () => setActiveTab("releases"), children: "Releases" })] })] }), _jsxs("div", { style: {
|
|
35
|
+
display: "grid",
|
|
36
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(13rem, 1fr))",
|
|
37
|
+
gap: "0.75rem",
|
|
38
|
+
}, children: [_jsxs(Card, { padding: "sm", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: activeTab === "queue" ? "Active Specimens" : "Release Channel" }) }), _jsx(CardContent, { children: _jsx("strong", { style: { fontSize: "1.5rem" }, children: activeTab === "queue" ? "34" : "v1.0.0-rc.1" }) })] }), _jsxs(Card, { padding: "sm", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Gate Health" }) }), _jsx(CardContent, { children: _jsx(Badge, { variant: "success", size: "sm", children: "ALL GATES PASSING" }) })] })] })] }));
|
|
39
|
+
}
|
|
40
|
+
export function GameBattleTemplate() {
|
|
41
|
+
const [bossHp, setBossHp] = useState(290);
|
|
42
|
+
const [combo, setCombo] = useState(4);
|
|
43
|
+
return (_jsxs("div", { style: {
|
|
44
|
+
display: "grid",
|
|
45
|
+
gap: "0.9rem",
|
|
46
|
+
padding: "1.1rem",
|
|
47
|
+
background: "var(--mw-night-raised)",
|
|
48
|
+
color: "var(--mw-moon)",
|
|
49
|
+
border: "2px solid var(--mw-border-strong)",
|
|
50
|
+
}, children: [_jsx(BossHealthBar, { characterId: "lord-null", hp: bossHp, maxHp: 380, phases: 3, stagger: Math.min(100, combo * 14), broken: combo * 14 >= 100 }), _jsxs("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "center", justifyContent: "space-between", gap: "0.75rem" }, children: [_jsx(TurnOrderStrip, { characterIds: ["kuro-signal", "vesper-ink", "rocksoul-witness", "lord-null"], activeIndex: 0 }), _jsx(ComboCounter, { count: combo })] }), _jsxs("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(12rem, 1fr))", gap: "0.75rem" }, children: [_jsx(StatGauge, { label: "KURO HP", value: 88, max: 100, tone: "hp", segments: 4 }), _jsx(StatGauge, { label: "SIGNAL MP", value: 72, max: 100, tone: "mp", segments: 4 })] }), _jsx(ActionHotbar, { slots: [
|
|
51
|
+
{ id: "slash", key: "1", label: "Signal Slash" },
|
|
52
|
+
{ id: "guard", key: "2", label: "Ink Guard" },
|
|
53
|
+
{ id: "reset", key: "R", label: "Reset Boss" },
|
|
54
|
+
], onTrigger: (id) => {
|
|
55
|
+
if (id === "slash") {
|
|
56
|
+
setBossHp((hp) => Math.max(0, hp - 34));
|
|
57
|
+
setCombo((c) => c + 1);
|
|
58
|
+
}
|
|
59
|
+
else if (id === "reset") {
|
|
60
|
+
setBossHp(380);
|
|
61
|
+
setCombo(1);
|
|
62
|
+
}
|
|
63
|
+
} })] }));
|
|
64
|
+
}
|
|
65
|
+
export function CartoonStudioTemplate() {
|
|
66
|
+
return (_jsxs("div", { style: {
|
|
67
|
+
display: "grid",
|
|
68
|
+
gap: "0.9rem",
|
|
69
|
+
padding: "1.1rem",
|
|
70
|
+
background: "var(--mw-background)",
|
|
71
|
+
border: "1.5px solid var(--mw-border)",
|
|
72
|
+
}, children: [_jsx(EpisodeTitleCard, { episode: "ACT 01 \u00B7 STUDIO", title: "MOONWITNESS SIGNAL" }), _jsxs("div", { style: {
|
|
73
|
+
display: "flex",
|
|
74
|
+
flexWrap: "wrap",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
gap: "1rem",
|
|
77
|
+
}, children: [_jsx(CartoonRig, { characterId: "kuro-signal", mood: "happy", emote: "sparkle", size: "md" }), _jsx(CartoonRig, { characterId: "vesper-ink", mood: "determined", size: "md" }), _jsx(OnomatopoeiaSFX, { text: "ZAP!!", tone: "electric", tiltDeg: -6 })] }), _jsx(StoryboardPlayer, {})] }));
|
|
78
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuiltinSkinId, SkinDensity } from "./types.js";
|
|
2
|
+
import type { ThemeMode } from "./provider.js";
|
|
3
|
+
import type { MotionProfile } from "../motion/physics.js";
|
|
4
|
+
export type GenreDnaPresetId = "signal-riot-zine" | "shonen-anime" | "arcade-fighter" | "cozy-jrpg" | "saturday-cartoon" | "doodlebook-funky-grunge";
|
|
5
|
+
export interface GenreDnaPreset {
|
|
6
|
+
readonly id: GenreDnaPresetId;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly badge: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly skin: BuiltinSkinId;
|
|
11
|
+
readonly mode: ThemeMode;
|
|
12
|
+
readonly density: SkinDensity;
|
|
13
|
+
readonly motionProfile: MotionProfile;
|
|
14
|
+
readonly dnaAttribute: GenreDnaPresetId;
|
|
15
|
+
}
|
|
16
|
+
export declare const GENRE_DNA_PRESETS: readonly GenreDnaPreset[];
|
|
17
|
+
export declare function getGenreDnaPresetById(id?: string | null): GenreDnaPreset | undefined;
|
|
18
|
+
export declare function applyGenreDnaAttribute(presetId: GenreDnaPresetId | null, root?: HTMLElement | null): void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export const GENRE_DNA_PRESETS = Object.freeze([
|
|
2
|
+
Object.freeze({
|
|
3
|
+
id: "signal-riot-zine",
|
|
4
|
+
label: "Signal Riot Zine",
|
|
5
|
+
badge: "ZINE",
|
|
6
|
+
description: "Razor ink borders, Ben-Day halftone, electric magenta & canary punch.",
|
|
7
|
+
skin: "moonwitness-riot",
|
|
8
|
+
mode: "dark",
|
|
9
|
+
density: "comfortable",
|
|
10
|
+
motionProfile: "expressive",
|
|
11
|
+
dnaAttribute: "signal-riot-zine",
|
|
12
|
+
}),
|
|
13
|
+
Object.freeze({
|
|
14
|
+
id: "shonen-anime",
|
|
15
|
+
label: "Shonen Anime",
|
|
16
|
+
badge: "ANIME",
|
|
17
|
+
description: "Manga ink paper, kinetic diagonal cut-ins, speedlines, and 12fps snaps.",
|
|
18
|
+
skin: "moonwitness-ink",
|
|
19
|
+
mode: "light",
|
|
20
|
+
density: "comfortable",
|
|
21
|
+
motionProfile: "cartoon",
|
|
22
|
+
dnaAttribute: "shonen-anime",
|
|
23
|
+
}),
|
|
24
|
+
Object.freeze({
|
|
25
|
+
id: "arcade-fighter",
|
|
26
|
+
label: "Arcade Fighter",
|
|
27
|
+
badge: "ARCADE",
|
|
28
|
+
description: "Obsidian cyber-cabinet HUD, skewed combo meters, scanlines, and chromatic hit.",
|
|
29
|
+
skin: "arcade-neon",
|
|
30
|
+
mode: "dark",
|
|
31
|
+
density: "compact",
|
|
32
|
+
motionProfile: "expressive",
|
|
33
|
+
dnaAttribute: "arcade-fighter",
|
|
34
|
+
}),
|
|
35
|
+
Object.freeze({
|
|
36
|
+
id: "cozy-jrpg",
|
|
37
|
+
label: "Cozy JRPG",
|
|
38
|
+
badge: "JRPG",
|
|
39
|
+
description: "Warm storybook parchment, gilded quest crests, and gentle dialogue cadence.",
|
|
40
|
+
skin: "cozy-rpg",
|
|
41
|
+
mode: "light",
|
|
42
|
+
density: "comfortable",
|
|
43
|
+
motionProfile: "subtle",
|
|
44
|
+
dnaAttribute: "cozy-jrpg",
|
|
45
|
+
}),
|
|
46
|
+
Object.freeze({
|
|
47
|
+
id: "saturday-cartoon",
|
|
48
|
+
label: "Saturday Cartoon",
|
|
49
|
+
badge: "TOON",
|
|
50
|
+
description: "Chunky cel-shaded ink outlines, squash-stretch springs, and starburst SFX.",
|
|
51
|
+
skin: "cartoon-pop",
|
|
52
|
+
mode: "light",
|
|
53
|
+
density: "comfortable",
|
|
54
|
+
motionProfile: "cartoon",
|
|
55
|
+
dnaAttribute: "saturday-cartoon",
|
|
56
|
+
}),
|
|
57
|
+
Object.freeze({
|
|
58
|
+
id: "doodlebook-funky-grunge",
|
|
59
|
+
label: "Doodlebook Funky Grunge",
|
|
60
|
+
badge: "DOODLE",
|
|
61
|
+
description: "Classroom activity-book energy with chunky ink, bright doodles, and playful zine motion.",
|
|
62
|
+
skin: "doodlebook",
|
|
63
|
+
mode: "light",
|
|
64
|
+
density: "comfortable",
|
|
65
|
+
motionProfile: "cartoon",
|
|
66
|
+
dnaAttribute: "doodlebook-funky-grunge",
|
|
67
|
+
}),
|
|
68
|
+
]);
|
|
69
|
+
export function getGenreDnaPresetById(id) {
|
|
70
|
+
if (!id)
|
|
71
|
+
return undefined;
|
|
72
|
+
return GENRE_DNA_PRESETS.find((preset) => preset.id === id);
|
|
73
|
+
}
|
|
74
|
+
export function applyGenreDnaAttribute(presetId, root = typeof document !== "undefined"
|
|
75
|
+
? document.documentElement
|
|
76
|
+
: null) {
|
|
77
|
+
if (!root)
|
|
78
|
+
return;
|
|
79
|
+
if (!presetId) {
|
|
80
|
+
delete root.dataset.dna;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
root.dataset.dna = presetId;
|
|
84
|
+
}
|