@moonwitness/ui 0.1.0 → 7.1.3
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/css-exports.d.ts +77 -0
- package/dist/css-exports.js +116 -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-boundary.d.ts +79 -0
- package/dist/pixelfx-boundary.js +114 -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 +534 -0
- package/dist/provider.d.ts +27 -0
- package/dist/provider.js +15 -0
- package/dist/skin-catalog.d.ts +31 -0
- package/dist/skin-catalog.js +242 -0
- package/dist/skin-tokens.d.ts +3 -0
- package/dist/skin-tokens.js +390 -0
- package/dist/ssr/init-script.d.ts +36 -0
- package/dist/ssr/init-script.js +135 -0
- package/dist/ssr/resolve-skin.d.ts +34 -0
- package/dist/ssr/resolve-skin.js +168 -0
- package/dist/ssr/theme-mismatch-dev.d.ts +58 -0
- package/dist/ssr/theme-mismatch-dev.js +133 -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 +13 -0
- package/dist/themes/index.js +12 -0
- package/dist/themes/provider.d.ts +26 -0
- package/dist/themes/provider.js +111 -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 +544 -42
- package/scripts/consumer-smoke.mjs +45 -0
- 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/css-exports.ts +142 -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-boundary.ts +188 -0
- package/src/pixelfx-registry.ts +1190 -0
- package/src/pixelfx-types.d.ts +73 -0
- package/src/pixelfx.tsx +1022 -0
- package/src/provider.tsx +63 -0
- package/src/skin-catalog.ts +306 -0
- package/src/skin-tokens.ts +425 -0
- package/src/ssr/init-script.ts +281 -0
- package/src/ssr/resolve-skin.ts +217 -0
- package/src/ssr/theme-mismatch-dev.ts +181 -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 +56 -0
- package/src/themes/provider.tsx +183 -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,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic skin catalogue.
|
|
3
|
+
*
|
|
4
|
+
* This module is deliberately free of React (and of every other runtime
|
|
5
|
+
* dependency) so that token-only consumers — `@moonwitness/ui/token-exporter`
|
|
6
|
+
* and `@moonwitness/design-tokens` — can read the skin catalogue without
|
|
7
|
+
* pulling the component runtime into their bundle.
|
|
8
|
+
*
|
|
9
|
+
* `./themes/index.ts` re-exports everything here, so the public surface of
|
|
10
|
+
* `@moonwitness/ui/themes` is unchanged.
|
|
11
|
+
*/
|
|
12
|
+
import { isSkinMetadata, } from "./themes/types.js";
|
|
13
|
+
export const DEFAULT_SKIN_ID = "moonwitness-ink";
|
|
14
|
+
export const BUILTIN_SKINS = Object.freeze([
|
|
15
|
+
Object.freeze({
|
|
16
|
+
id: "moonwitness-ink",
|
|
17
|
+
label: "MoonWitness Ink",
|
|
18
|
+
description: "Signature zine and manga editorial aesthetic with warm paper and bold ink.",
|
|
19
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
20
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
21
|
+
defaultMode: "light",
|
|
22
|
+
defaultDensity: "comfortable",
|
|
23
|
+
swatch: Object.freeze({
|
|
24
|
+
background: "#f3efe4",
|
|
25
|
+
surface: "#fffdf6",
|
|
26
|
+
foreground: "#0d0d0d",
|
|
27
|
+
accent: "#ffe031",
|
|
28
|
+
}),
|
|
29
|
+
}),
|
|
30
|
+
Object.freeze({
|
|
31
|
+
id: "moonwitness-compact",
|
|
32
|
+
label: "MoonWitness Compact",
|
|
33
|
+
description: "Dense operational skin with crisp neutral surfaces and tighter spacing.",
|
|
34
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
35
|
+
supportedDensities: Object.freeze(["compact", "comfortable"]),
|
|
36
|
+
defaultMode: "light",
|
|
37
|
+
defaultDensity: "compact",
|
|
38
|
+
swatch: Object.freeze({
|
|
39
|
+
background: "#f0eee9",
|
|
40
|
+
surface: "#ffffff",
|
|
41
|
+
foreground: "#111113",
|
|
42
|
+
accent: "#00b8f0",
|
|
43
|
+
}),
|
|
44
|
+
}),
|
|
45
|
+
Object.freeze({
|
|
46
|
+
id: "moonwitness-high-contrast",
|
|
47
|
+
label: "MoonWitness High Contrast",
|
|
48
|
+
description: "Accessibility-focused skin with maximum contrast and reinforced focus borders.",
|
|
49
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
50
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
51
|
+
defaultMode: "light",
|
|
52
|
+
defaultDensity: "comfortable",
|
|
53
|
+
swatch: Object.freeze({
|
|
54
|
+
background: "#ffffff",
|
|
55
|
+
surface: "#ffffff",
|
|
56
|
+
foreground: "#000000",
|
|
57
|
+
accent: "#ffd000",
|
|
58
|
+
}),
|
|
59
|
+
}),
|
|
60
|
+
Object.freeze({
|
|
61
|
+
id: "moonwitness-riot",
|
|
62
|
+
label: "MoonWitness Riot",
|
|
63
|
+
description: "High-impact punk zine and comic skin with stark contrast, heavy ink borders, and electric neon accents.",
|
|
64
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
65
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
66
|
+
defaultMode: "dark",
|
|
67
|
+
defaultDensity: "comfortable",
|
|
68
|
+
swatch: Object.freeze({
|
|
69
|
+
background: "#09090b",
|
|
70
|
+
surface: "#121216",
|
|
71
|
+
foreground: "#f5efdf",
|
|
72
|
+
accent: "#ff2e88",
|
|
73
|
+
}),
|
|
74
|
+
}),
|
|
75
|
+
Object.freeze({
|
|
76
|
+
id: "cartoon-pop",
|
|
77
|
+
label: "Cartoon Pop",
|
|
78
|
+
description: "Cel-shaded Saturday-morning cartoon palette with chunky ink outlines, rounded corners, and playful punch.",
|
|
79
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
80
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
81
|
+
defaultMode: "light",
|
|
82
|
+
defaultDensity: "comfortable",
|
|
83
|
+
swatch: Object.freeze({
|
|
84
|
+
background: "#fff8e7",
|
|
85
|
+
surface: "#ffffff",
|
|
86
|
+
foreground: "#14132a",
|
|
87
|
+
accent: "#ff5c5c",
|
|
88
|
+
}),
|
|
89
|
+
}),
|
|
90
|
+
Object.freeze({
|
|
91
|
+
id: "arcade-neon",
|
|
92
|
+
label: "Arcade Neon",
|
|
93
|
+
description: "High-contrast game HUD and cyber-arcade aesthetic with deep obsidian surfaces and electric cyan/magenta accents.",
|
|
94
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
95
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
96
|
+
defaultMode: "dark",
|
|
97
|
+
defaultDensity: "compact",
|
|
98
|
+
swatch: Object.freeze({
|
|
99
|
+
background: "#080b14",
|
|
100
|
+
surface: "#111728",
|
|
101
|
+
foreground: "#eef6ff",
|
|
102
|
+
accent: "#00e5ff",
|
|
103
|
+
}),
|
|
104
|
+
}),
|
|
105
|
+
Object.freeze({
|
|
106
|
+
id: "clean-motion",
|
|
107
|
+
label: "Clean Motion",
|
|
108
|
+
description: "Refined modern web and SaaS product skin with crisp neutral elevation, smooth radii, and tactile micro-motion.",
|
|
109
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
110
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
111
|
+
defaultMode: "light",
|
|
112
|
+
defaultDensity: "comfortable",
|
|
113
|
+
swatch: Object.freeze({
|
|
114
|
+
background: "#f8fafc",
|
|
115
|
+
surface: "#ffffff",
|
|
116
|
+
foreground: "#0f172a",
|
|
117
|
+
accent: "#2563eb",
|
|
118
|
+
}),
|
|
119
|
+
}),
|
|
120
|
+
Object.freeze({
|
|
121
|
+
id: "cozy-rpg",
|
|
122
|
+
label: "Cozy RPG",
|
|
123
|
+
description: "Warm storybook parchment and forest-gold journal aesthetic crafted for RPG menus, quests, and dialogue.",
|
|
124
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
125
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
126
|
+
defaultMode: "light",
|
|
127
|
+
defaultDensity: "comfortable",
|
|
128
|
+
swatch: Object.freeze({
|
|
129
|
+
background: "#f6eedc",
|
|
130
|
+
surface: "#fdf9ef",
|
|
131
|
+
foreground: "#261b12",
|
|
132
|
+
accent: "#d97706",
|
|
133
|
+
}),
|
|
134
|
+
}),
|
|
135
|
+
Object.freeze({
|
|
136
|
+
id: "doodlebook",
|
|
137
|
+
label: "Doodlebook",
|
|
138
|
+
description: "Classroom and activity-book funky-grunge zine skin with warm paper, bold ink, and playful neon accents.",
|
|
139
|
+
supportedModes: Object.freeze(["light", "dark"]),
|
|
140
|
+
supportedDensities: Object.freeze(["comfortable", "compact"]),
|
|
141
|
+
defaultMode: "light",
|
|
142
|
+
defaultDensity: "comfortable",
|
|
143
|
+
swatch: Object.freeze({
|
|
144
|
+
background: "#fff4d6",
|
|
145
|
+
surface: "#fffaf0",
|
|
146
|
+
foreground: "#17120c",
|
|
147
|
+
accent: "#ffed00",
|
|
148
|
+
}),
|
|
149
|
+
}),
|
|
150
|
+
]);
|
|
151
|
+
function validateSkinMetadata(skin) {
|
|
152
|
+
if (!isSkinMetadata(skin)) {
|
|
153
|
+
throw new Error("Invalid skin metadata.");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
export function createThemeRegistry(initialSkins = BUILTIN_SKINS, defaultSkinId = DEFAULT_SKIN_ID) {
|
|
157
|
+
const skins = new Map();
|
|
158
|
+
const register = (skin) => {
|
|
159
|
+
validateSkinMetadata(skin);
|
|
160
|
+
if (skins.has(skin.id)) {
|
|
161
|
+
throw new Error(`Duplicate skin id "${skin.id}" cannot be registered twice.`);
|
|
162
|
+
}
|
|
163
|
+
skins.set(skin.id, Object.freeze({ ...skin }));
|
|
164
|
+
};
|
|
165
|
+
for (const skin of initialSkins) {
|
|
166
|
+
register(skin);
|
|
167
|
+
}
|
|
168
|
+
if (!skins.has(defaultSkinId)) {
|
|
169
|
+
throw new Error(`Default skin "${defaultSkinId}" is not registered.`);
|
|
170
|
+
}
|
|
171
|
+
const get = (id) => skins.get(id);
|
|
172
|
+
const resolve = (id) => {
|
|
173
|
+
if (typeof id === "string" && skins.has(id)) {
|
|
174
|
+
return skins.get(id);
|
|
175
|
+
}
|
|
176
|
+
return skins.get(defaultSkinId);
|
|
177
|
+
};
|
|
178
|
+
const list = () => Array.from(skins.values());
|
|
179
|
+
const has = (id) => skins.has(id);
|
|
180
|
+
const isModeSupported = (skinId, mode) => resolve(skinId).supportedModes.includes(mode);
|
|
181
|
+
const isDensitySupported = (skinId, density) => resolve(skinId).supportedDensities.includes(density);
|
|
182
|
+
const normalizePreferences = (preferences) => {
|
|
183
|
+
const resolvedSkin = resolve(preferences?.skin);
|
|
184
|
+
const mode = preferences?.theme_mode &&
|
|
185
|
+
resolvedSkin.supportedModes.includes(preferences.theme_mode)
|
|
186
|
+
? preferences.theme_mode
|
|
187
|
+
: resolvedSkin.defaultMode;
|
|
188
|
+
const density = preferences?.density &&
|
|
189
|
+
resolvedSkin.supportedDensities.includes(preferences.density)
|
|
190
|
+
? preferences.density
|
|
191
|
+
: resolvedSkin.defaultDensity;
|
|
192
|
+
return {
|
|
193
|
+
skin: resolvedSkin.id,
|
|
194
|
+
theme_mode: mode,
|
|
195
|
+
density,
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
return {
|
|
199
|
+
defaultSkinId,
|
|
200
|
+
register,
|
|
201
|
+
get,
|
|
202
|
+
resolve,
|
|
203
|
+
list,
|
|
204
|
+
has,
|
|
205
|
+
isModeSupported,
|
|
206
|
+
isDensitySupported,
|
|
207
|
+
normalizePreferences,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
export const themeRegistry = createThemeRegistry(BUILTIN_SKINS, DEFAULT_SKIN_ID);
|
|
211
|
+
/**
|
|
212
|
+
* Validates a skin ID against the registry.
|
|
213
|
+
* Throws if the skin ID is not registered.
|
|
214
|
+
* Does NOT silently fall back — callers must handle or let it throw.
|
|
215
|
+
*/
|
|
216
|
+
export function validateSkinId(skinId, registry = themeRegistry) {
|
|
217
|
+
if (!registry.has(skinId)) {
|
|
218
|
+
const available = registry.list().map((s) => s.id).join(", ");
|
|
219
|
+
throw new Error(`Unknown skin ID "${skinId}". Available skins: ${available}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Validates a skin ID and returns the resolved skin metadata.
|
|
224
|
+
* Throws if the skin ID is not registered.
|
|
225
|
+
*/
|
|
226
|
+
export function resolveValidSkin(skinId, registry = themeRegistry) {
|
|
227
|
+
if (typeof skinId === "string" && registry.has(skinId)) {
|
|
228
|
+
return registry.get(skinId);
|
|
229
|
+
}
|
|
230
|
+
if (skinId !== undefined && skinId !== null) {
|
|
231
|
+
// Explicit but invalid skin ID — throw, don't silently fall back
|
|
232
|
+
const available = registry.list().map((s) => s.id).join(", ");
|
|
233
|
+
throw new Error(`Unknown skin ID "${skinId}". Available skins: ${available}`);
|
|
234
|
+
}
|
|
235
|
+
// No skin specified — use default
|
|
236
|
+
return registry.get(registry.defaultSkinId);
|
|
237
|
+
}
|
|
238
|
+
export function createSkinInitScript(options = {}) {
|
|
239
|
+
const skinIds = JSON.stringify(themeRegistry.list().map((skin) => skin.id));
|
|
240
|
+
const primaryKey = JSON.stringify(options.storageKey ?? "mw-ui-theme");
|
|
241
|
+
return `(function(){try{var raw=localStorage.getItem(${primaryKey})||localStorage.getItem('mw-board-preferences');var p=raw?JSON.parse(raw):null;var k=p&&typeof p.skin==='string'?p.skin:'${DEFAULT_SKIN_ID}';var allowed=${skinIds};if(allowed.indexOf(k)===-1)k='${DEFAULT_SKIN_ID}';var d=p&&p.density==='compact'?'compact':'comfortable';var rawMode=p&&(p.mode||p.theme);var m=(rawMode==='dark'||rawMode==='light'||rawMode==='high-contrast')?rawMode:(localStorage.getItem('mw-theme')==='dark'?'dark':'light');var r=document.documentElement;r.dataset.skin=k;r.dataset.density=d;r.dataset.theme=m;r.classList.toggle('dark',m==='dark');r.classList.toggle('high-contrast',m==='high-contrast');}catch(e){}})();`;
|
|
242
|
+
}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
function freezeSkinMode(light, dark) {
|
|
2
|
+
return Object.freeze({
|
|
3
|
+
light: Object.freeze(light),
|
|
4
|
+
dark: Object.freeze(dark),
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
/** Per-skin light and dark CSS variable overrides for all 8 built-in skins. */
|
|
8
|
+
export const BUILTIN_SKIN_TOKENS = Object.freeze({
|
|
9
|
+
"moonwitness-ink": freezeSkinMode({}, {
|
|
10
|
+
"--mw-yellow-readable": "var(--mw-yellow)",
|
|
11
|
+
"--mw-magenta-readable": "var(--mw-magenta)",
|
|
12
|
+
"--mw-cyan-readable": "var(--mw-signal-blue)",
|
|
13
|
+
"--mw-violet-readable": "var(--mw-violet)",
|
|
14
|
+
"--mw-paper": "#0e0e10",
|
|
15
|
+
"--mw-paper-raised": "#17171a",
|
|
16
|
+
"--mw-ink": "#f3efe4",
|
|
17
|
+
"--mw-ink-soft": "#c9c5b8",
|
|
18
|
+
"--mw-ink-faint": "#9b988f",
|
|
19
|
+
"--mw-halftone-dot": "rgb(243 239 228 / 9%)",
|
|
20
|
+
"--mw-muted": "#232327",
|
|
21
|
+
"--mw-error": "#fda29b",
|
|
22
|
+
"--mw-on-error": "#0d0d0d",
|
|
23
|
+
"--mw-focus": "var(--mw-ink)",
|
|
24
|
+
"--mw-warning-readable": "var(--mw-warning)",
|
|
25
|
+
"--mw-success-readable": "#86efac",
|
|
26
|
+
}),
|
|
27
|
+
"moonwitness-compact": freezeSkinMode({
|
|
28
|
+
"--mw-paper": "#f0eee9",
|
|
29
|
+
"--mw-paper-raised": "#ffffff",
|
|
30
|
+
"--mw-ink": "#111113",
|
|
31
|
+
"--mw-ink-soft": "#37373c",
|
|
32
|
+
"--mw-ink-faint": "#5e5e66",
|
|
33
|
+
"--mw-muted": "#e3e1db",
|
|
34
|
+
"--mw-primary": "var(--mw-signal-blue)",
|
|
35
|
+
"--mw-accent": "var(--mw-signal-blue)",
|
|
36
|
+
"--mw-radius-sm": "0.125rem",
|
|
37
|
+
"--mw-radius-md": "0.1875rem",
|
|
38
|
+
"--mw-radius-lg": "0.375rem",
|
|
39
|
+
"--mw-shadow-ink": "2px 2px 0 0 var(--mw-ink)",
|
|
40
|
+
"--mw-shadow-ink-lg": "4px 4px 0 0 var(--mw-ink)",
|
|
41
|
+
}, {
|
|
42
|
+
"--mw-paper": "#0c0d10",
|
|
43
|
+
"--mw-paper-raised": "#15171c",
|
|
44
|
+
"--mw-ink": "#f0f2f5",
|
|
45
|
+
"--mw-ink-soft": "#c2c6cf",
|
|
46
|
+
"--mw-ink-faint": "#9197a3",
|
|
47
|
+
"--mw-muted": "#20232b",
|
|
48
|
+
}),
|
|
49
|
+
"moonwitness-high-contrast": freezeSkinMode({
|
|
50
|
+
"--mw-paper": "#ffffff",
|
|
51
|
+
"--mw-paper-raised": "#ffffff",
|
|
52
|
+
"--mw-ink": "#000000",
|
|
53
|
+
"--mw-ink-soft": "#1a1a1a",
|
|
54
|
+
"--mw-ink-faint": "#333333",
|
|
55
|
+
"--mw-muted": "#ebebeb",
|
|
56
|
+
"--mw-yellow": "#ffd000",
|
|
57
|
+
"--mw-on-accent": "#000000",
|
|
58
|
+
"--mw-error": "#990000",
|
|
59
|
+
"--mw-on-error": "#ffffff",
|
|
60
|
+
"--mw-success": "#005a1f",
|
|
61
|
+
"--mw-on-success": "#ffffff",
|
|
62
|
+
"--mw-info": "#003c8f",
|
|
63
|
+
"--mw-on-info": "#ffffff",
|
|
64
|
+
"--mw-yellow-readable": "#5c4800",
|
|
65
|
+
"--mw-magenta-readable": "#990044",
|
|
66
|
+
"--mw-cyan-readable": "#005b7a",
|
|
67
|
+
"--mw-violet-readable": "#4c1d95",
|
|
68
|
+
"--mw-frame-width": "3px",
|
|
69
|
+
}, {
|
|
70
|
+
"--mw-paper": "#000000",
|
|
71
|
+
"--mw-paper-raised": "#0a0a0a",
|
|
72
|
+
"--mw-ink": "#ffffff",
|
|
73
|
+
"--mw-ink-soft": "#e6e6e6",
|
|
74
|
+
"--mw-ink-faint": "#cccccc",
|
|
75
|
+
"--mw-muted": "#1c1c1c",
|
|
76
|
+
"--mw-yellow": "#ffe600",
|
|
77
|
+
"--mw-focus": "var(--mw-yellow)",
|
|
78
|
+
"--mw-error": "#ff8a80",
|
|
79
|
+
"--mw-on-error": "#000000",
|
|
80
|
+
"--mw-yellow-readable": "var(--mw-yellow)",
|
|
81
|
+
"--mw-magenta-readable": "#ff66a8",
|
|
82
|
+
"--mw-cyan-readable": "#33d1ff",
|
|
83
|
+
"--mw-violet-readable": "#d8b4fe",
|
|
84
|
+
}),
|
|
85
|
+
"moonwitness-riot": freezeSkinMode({
|
|
86
|
+
"--mw-paper": "#f5efdf",
|
|
87
|
+
"--mw-paper-raised": "#fff9eb",
|
|
88
|
+
"--mw-ink": "#0a0a0c",
|
|
89
|
+
"--mw-ink-soft": "#2d2d2a",
|
|
90
|
+
"--mw-ink-faint": "#2d2d2a",
|
|
91
|
+
"--mw-muted": "#e4dcc8",
|
|
92
|
+
"--mw-primary": "#ffe031",
|
|
93
|
+
"--mw-primary-foreground": "#0a0a0c",
|
|
94
|
+
"--mw-accent": "#ff2e88",
|
|
95
|
+
"--mw-accent-foreground": "#0a0a0c",
|
|
96
|
+
"--mw-on-accent": "#0a0a0c",
|
|
97
|
+
"--mw-on-magenta": "#0a0a0c",
|
|
98
|
+
"--mw-on-violet": "#0a0a0c",
|
|
99
|
+
"--mw-focus": "#a60e4f",
|
|
100
|
+
"--mw-magenta-readable": "#a60e4f",
|
|
101
|
+
"--mw-cyan-readable": "#006e92",
|
|
102
|
+
"--mw-yellow-readable": "#6b5500",
|
|
103
|
+
"--mw-violet-readable": "#6322cf",
|
|
104
|
+
"--mw-frame-width": "3px",
|
|
105
|
+
"--mw-shadow-ink": "4px 4px 0 0 #0a0a0c",
|
|
106
|
+
"--mw-shadow-ink-lg": "7px 7px 0 0 #0a0a0c",
|
|
107
|
+
"--mw-shadow-comic": "4px 4px 0 0 #0a0a0c",
|
|
108
|
+
"--mw-shadow-anime-impact": "4px 4px 0 0 #0a0a0c, 8px 8px 0 0 #ff2e88",
|
|
109
|
+
"--mw-halftone-dot": "rgb(10 10 12 / 18%)",
|
|
110
|
+
"--mw-grunge-grain-opacity": "0.2",
|
|
111
|
+
"--mw-dna-skew": "-10deg",
|
|
112
|
+
"--mw-dna-halftone-size": "6px",
|
|
113
|
+
"--mw-dna-halftone-opacity": "0.24",
|
|
114
|
+
"--mw-dna-border-heavy": "3px",
|
|
115
|
+
"--mw-dna-chromatic-x": "4px",
|
|
116
|
+
}, {
|
|
117
|
+
"--mw-paper": "#09090b",
|
|
118
|
+
"--mw-paper-raised": "#121216",
|
|
119
|
+
"--mw-ink": "#f5efdf",
|
|
120
|
+
"--mw-ink-soft": "#cfcabd",
|
|
121
|
+
"--mw-ink-faint": "#cfcabd",
|
|
122
|
+
"--mw-muted": "#1e1e24",
|
|
123
|
+
"--mw-primary": "#ff2e88",
|
|
124
|
+
"--mw-primary-foreground": "#0a0a0c",
|
|
125
|
+
"--mw-accent": "#ffe031",
|
|
126
|
+
"--mw-accent-foreground": "#0a0a0c",
|
|
127
|
+
"--mw-focus": "#ffe031",
|
|
128
|
+
"--mw-error": "#fda29b",
|
|
129
|
+
"--mw-on-error": "#0a0a0c",
|
|
130
|
+
"--mw-magenta-readable": "#ff4d99",
|
|
131
|
+
"--mw-cyan-readable": "#00b8f0",
|
|
132
|
+
"--mw-yellow-readable": "#ffe031",
|
|
133
|
+
"--mw-violet-readable": "#c084fc",
|
|
134
|
+
"--mw-shadow-ink": "4px 4px 0 0 #000000",
|
|
135
|
+
"--mw-shadow-ink-lg": "7px 7px 0 0 #ff2e88",
|
|
136
|
+
"--mw-shadow-comic": "4px 4px 0 0 #000000",
|
|
137
|
+
"--mw-shadow-anime-impact": "4px 4px 0 0 #000000, 8px 8px 0 0 #00b8f0",
|
|
138
|
+
"--mw-halftone-dot": "rgb(245 239 223 / 14%)",
|
|
139
|
+
"--mw-grunge-grain-opacity": "0.22",
|
|
140
|
+
}),
|
|
141
|
+
"cartoon-pop": freezeSkinMode({
|
|
142
|
+
"--mw-paper": "#fff8e7",
|
|
143
|
+
"--mw-paper-raised": "#ffffff",
|
|
144
|
+
"--mw-ink": "#14132a",
|
|
145
|
+
"--mw-ink-soft": "#323055",
|
|
146
|
+
"--mw-ink-faint": "#4c4973",
|
|
147
|
+
"--mw-muted": "#f4e7c6",
|
|
148
|
+
"--mw-primary": "#ffd43b",
|
|
149
|
+
"--mw-primary-foreground": "#14132a",
|
|
150
|
+
"--mw-accent": "#ff5c5c",
|
|
151
|
+
"--mw-accent-foreground": "#14132a",
|
|
152
|
+
"--mw-on-accent": "#14132a",
|
|
153
|
+
"--mw-on-magenta": "#14132a",
|
|
154
|
+
"--mw-focus": "#1d4ed8",
|
|
155
|
+
"--mw-magenta-readable": "#b41759",
|
|
156
|
+
"--mw-cyan-readable": "#00668c",
|
|
157
|
+
"--mw-yellow-readable": "#6b4f00",
|
|
158
|
+
"--mw-violet-readable": "#5b21b6",
|
|
159
|
+
"--mw-radius-sm": "0.45rem",
|
|
160
|
+
"--mw-radius-md": "0.75rem",
|
|
161
|
+
"--mw-radius-lg": "1.15rem",
|
|
162
|
+
"--mw-frame-width": "3px",
|
|
163
|
+
"--mw-shadow-ink": "4px 4px 0 0 #14132a",
|
|
164
|
+
"--mw-shadow-ink-lg": "7px 7px 0 0 #14132a",
|
|
165
|
+
"--mw-shadow-comic": "4px 4px 0 0 #14132a",
|
|
166
|
+
"--mw-dna-skew": "-6deg",
|
|
167
|
+
"--mw-dna-halftone-size": "8px",
|
|
168
|
+
"--mw-dna-halftone-opacity": "0.2",
|
|
169
|
+
"--mw-dna-border-heavy": "3px",
|
|
170
|
+
}, {
|
|
171
|
+
"--mw-paper": "#141326",
|
|
172
|
+
"--mw-paper-raised": "#1e1c38",
|
|
173
|
+
"--mw-ink": "#fff8e7",
|
|
174
|
+
"--mw-ink-soft": "#d9d4eb",
|
|
175
|
+
"--mw-ink-faint": "#b3accf",
|
|
176
|
+
"--mw-muted": "#2a274d",
|
|
177
|
+
"--mw-primary": "#ffd43b",
|
|
178
|
+
"--mw-primary-foreground": "#14132a",
|
|
179
|
+
"--mw-accent": "#ff70a6",
|
|
180
|
+
"--mw-accent-foreground": "#14132a",
|
|
181
|
+
"--mw-focus": "#ffd43b",
|
|
182
|
+
"--mw-magenta-readable": "#ff70a6",
|
|
183
|
+
"--mw-cyan-readable": "#38d9ff",
|
|
184
|
+
"--mw-yellow-readable": "#ffd43b",
|
|
185
|
+
"--mw-violet-readable": "#d0bfff",
|
|
186
|
+
"--mw-shadow-ink": "4px 4px 0 0 #070611",
|
|
187
|
+
"--mw-shadow-ink-lg": "7px 7px 0 0 #070611",
|
|
188
|
+
}),
|
|
189
|
+
"arcade-neon": freezeSkinMode({
|
|
190
|
+
"--mw-paper": "#eef4fb",
|
|
191
|
+
"--mw-paper-raised": "#ffffff",
|
|
192
|
+
"--mw-ink": "#0a1020",
|
|
193
|
+
"--mw-ink-soft": "#283552",
|
|
194
|
+
"--mw-ink-faint": "#425274",
|
|
195
|
+
"--mw-muted": "#dce6f5",
|
|
196
|
+
"--mw-primary": "#00d4ff",
|
|
197
|
+
"--mw-primary-foreground": "#0a1020",
|
|
198
|
+
"--mw-accent": "#ff2e93",
|
|
199
|
+
"--mw-accent-foreground": "#0a1020",
|
|
200
|
+
"--mw-on-accent": "#0a1020",
|
|
201
|
+
"--mw-focus": "#005b99",
|
|
202
|
+
"--mw-magenta-readable": "#a60e5b",
|
|
203
|
+
"--mw-cyan-readable": "#005f80",
|
|
204
|
+
"--mw-yellow-readable": "#685000",
|
|
205
|
+
"--mw-violet-readable": "#5b21b6",
|
|
206
|
+
"--mw-radius-sm": "0.125rem",
|
|
207
|
+
"--mw-radius-md": "0.25rem",
|
|
208
|
+
"--mw-radius-lg": "0.375rem",
|
|
209
|
+
"--mw-frame-width": "2px",
|
|
210
|
+
"--mw-shadow-ink": "3px 3px 0 0 #0a1020",
|
|
211
|
+
"--mw-shadow-ink-lg": "6px 6px 0 0 #0a1020",
|
|
212
|
+
}, {
|
|
213
|
+
"--mw-paper": "#080b14",
|
|
214
|
+
"--mw-paper-raised": "#111728",
|
|
215
|
+
"--mw-ink": "#eef6ff",
|
|
216
|
+
"--mw-ink-soft": "#b8cae6",
|
|
217
|
+
"--mw-ink-faint": "#90a6c7",
|
|
218
|
+
"--mw-muted": "#1b243d",
|
|
219
|
+
"--mw-primary": "#00e5ff",
|
|
220
|
+
"--mw-primary-foreground": "#080b14",
|
|
221
|
+
"--mw-accent": "#ff3b9a",
|
|
222
|
+
"--mw-accent-foreground": "#080b14",
|
|
223
|
+
"--mw-on-accent": "#080b14",
|
|
224
|
+
"--mw-focus": "#00e5ff",
|
|
225
|
+
"--mw-magenta-readable": "#ff6bb5",
|
|
226
|
+
"--mw-cyan-readable": "#33ebff",
|
|
227
|
+
"--mw-yellow-readable": "#ffe64d",
|
|
228
|
+
"--mw-violet-readable": "#c8a2ff",
|
|
229
|
+
"--mw-shadow-ink": "3px 3px 0 0 #00e5ff",
|
|
230
|
+
"--mw-shadow-ink-lg": "5px 5px 0 0 #ff3b9a",
|
|
231
|
+
"--mw-dna-skew": "-12deg",
|
|
232
|
+
"--mw-dna-halftone-opacity": "0.14",
|
|
233
|
+
"--mw-dna-speedline-opacity": "0.3",
|
|
234
|
+
"--mw-dna-chromatic-x": "4px",
|
|
235
|
+
}),
|
|
236
|
+
"clean-motion": freezeSkinMode({
|
|
237
|
+
"--mw-paper": "#f8fafc",
|
|
238
|
+
"--mw-paper-raised": "#ffffff",
|
|
239
|
+
"--mw-ink": "#0f172a",
|
|
240
|
+
"--mw-ink-soft": "#334155",
|
|
241
|
+
"--mw-ink-faint": "#475569",
|
|
242
|
+
"--mw-muted": "#e2e8f0",
|
|
243
|
+
"--mw-primary": "#2563eb",
|
|
244
|
+
"--mw-primary-foreground": "#ffffff",
|
|
245
|
+
"--mw-accent": "#0ea5e9",
|
|
246
|
+
"--mw-accent-foreground": "#0f172a",
|
|
247
|
+
"--mw-on-accent": "#0f172a",
|
|
248
|
+
"--mw-focus": "#1d4ed8",
|
|
249
|
+
"--mw-magenta-readable": "#9d174d",
|
|
250
|
+
"--mw-cyan-readable": "#0369a1",
|
|
251
|
+
"--mw-yellow-readable": "#713f12",
|
|
252
|
+
"--mw-violet-readable": "#5b21b6",
|
|
253
|
+
"--mw-radius-sm": "0.375rem",
|
|
254
|
+
"--mw-radius-md": "0.625rem",
|
|
255
|
+
"--mw-radius-lg": "0.875rem",
|
|
256
|
+
"--mw-frame-width": "1px",
|
|
257
|
+
"--mw-shadow-ink": "0 2px 8px rgb(15 23 42 / 10%)",
|
|
258
|
+
"--mw-shadow-ink-lg": "0 10px 24px rgb(15 23 42 / 14%)",
|
|
259
|
+
"--mw-shadow-comic": "0 4px 12px rgb(15 23 42 / 10%)",
|
|
260
|
+
}, {
|
|
261
|
+
"--mw-paper": "#0b1120",
|
|
262
|
+
"--mw-paper-raised": "#111827",
|
|
263
|
+
"--mw-ink": "#f8fafc",
|
|
264
|
+
"--mw-ink-soft": "#cbd5e1",
|
|
265
|
+
"--mw-ink-faint": "#94a3b8",
|
|
266
|
+
"--mw-muted": "#1e293b",
|
|
267
|
+
"--mw-primary": "#60a5fa",
|
|
268
|
+
"--mw-primary-foreground": "#0b1120",
|
|
269
|
+
"--mw-accent": "#38bdf8",
|
|
270
|
+
"--mw-accent-foreground": "#0b1120",
|
|
271
|
+
"--mw-on-accent": "#0b1120",
|
|
272
|
+
"--mw-focus": "#60a5fa",
|
|
273
|
+
"--mw-magenta-readable": "#f472b6",
|
|
274
|
+
"--mw-cyan-readable": "#38bdf8",
|
|
275
|
+
"--mw-yellow-readable": "#fde047",
|
|
276
|
+
"--mw-violet-readable": "#c4b5fd",
|
|
277
|
+
"--mw-shadow-ink": "0 2px 10px rgb(0 0 0 / 45%)",
|
|
278
|
+
"--mw-shadow-ink-lg": "0 12px 28px rgb(0 0 0 / 55%)",
|
|
279
|
+
}),
|
|
280
|
+
"doodlebook": freezeSkinMode({
|
|
281
|
+
"--mw-paper": "#fff4d6",
|
|
282
|
+
"--mw-paper-raised": "#fffaf0",
|
|
283
|
+
"--mw-ink": "#17120c",
|
|
284
|
+
"--mw-ink-soft": "#352b20",
|
|
285
|
+
"--mw-ink-faint": "#514333",
|
|
286
|
+
"--mw-muted": "#eee1c1",
|
|
287
|
+
"--mw-primary": "#ffed00",
|
|
288
|
+
"--mw-primary-foreground": "#17120c",
|
|
289
|
+
"--mw-accent": "#00e5ff",
|
|
290
|
+
"--mw-accent-foreground": "#10191b",
|
|
291
|
+
"--mw-on-accent": "#10191b",
|
|
292
|
+
"--mw-focus": "#17120c",
|
|
293
|
+
"--mw-magenta-readable": "#a20d50",
|
|
294
|
+
"--mw-cyan-readable": "#00677a",
|
|
295
|
+
"--mw-yellow-readable": "#665500",
|
|
296
|
+
"--mw-violet-readable": "#6326a6",
|
|
297
|
+
"--mw-success-readable": "#176b2c",
|
|
298
|
+
"--mw-warning-readable": "#665500",
|
|
299
|
+
"--mw-error-readable": "#a51d16",
|
|
300
|
+
"--mw-border": "#17120c",
|
|
301
|
+
"--mw-border-strong": "#17120c",
|
|
302
|
+
"--mw-border-subtle": "#665b49",
|
|
303
|
+
"--mw-frame-width": "3px",
|
|
304
|
+
"--mw-comic-border-width": "3px",
|
|
305
|
+
"--mw-shadow-ink": "4px 4px 0 0 #17120c",
|
|
306
|
+
"--mw-shadow-ink-sm": "2px 2px 0 0 #17120c",
|
|
307
|
+
"--mw-shadow-ink-lg": "6px 6px 0 0 #17120c",
|
|
308
|
+
"--mw-shadow-comic": "5px 5px 0 0 #17120c",
|
|
309
|
+
"--mw-yellow": "#ffed00",
|
|
310
|
+
"--mw-magenta": "#ff2e88",
|
|
311
|
+
"--mw-signal-blue": "#00e5ff",
|
|
312
|
+
"--mw-cyan": "#00e5ff",
|
|
313
|
+
"--mw-green": "#39ff14",
|
|
314
|
+
"--mw-dna-skew": "-6deg",
|
|
315
|
+
"--mw-dna-halftone-opacity": "0.2",
|
|
316
|
+
"--mw-dna-speedline-opacity": "0.24",
|
|
317
|
+
"--mw-dna-chromatic-x": "2px",
|
|
318
|
+
}, {
|
|
319
|
+
"--mw-paper": "#0b0b0d",
|
|
320
|
+
"--mw-paper-raised": "#151518",
|
|
321
|
+
"--mw-ink": "#fff8e7",
|
|
322
|
+
"--mw-ink-soft": "#e2dccb",
|
|
323
|
+
"--mw-ink-faint": "#c3baa5",
|
|
324
|
+
"--mw-muted": "#25252b",
|
|
325
|
+
"--mw-primary": "#ffed00",
|
|
326
|
+
"--mw-primary-foreground": "#17120c",
|
|
327
|
+
"--mw-accent": "#00e5ff",
|
|
328
|
+
"--mw-accent-foreground": "#10191b",
|
|
329
|
+
"--mw-on-accent": "#10191b",
|
|
330
|
+
"--mw-focus": "#ffed00",
|
|
331
|
+
"--mw-magenta-readable": "#ff70ad",
|
|
332
|
+
"--mw-cyan-readable": "#61efff",
|
|
333
|
+
"--mw-yellow-readable": "#ffed00",
|
|
334
|
+
"--mw-violet-readable": "#d3a6ff",
|
|
335
|
+
"--mw-success-readable": "#7dff69",
|
|
336
|
+
"--mw-warning-readable": "#ffed00",
|
|
337
|
+
"--mw-error-readable": "#ff8e86",
|
|
338
|
+
"--mw-border": "#fff8e7",
|
|
339
|
+
"--mw-border-strong": "#fff8e7",
|
|
340
|
+
"--mw-border-subtle": "#a39b89",
|
|
341
|
+
"--mw-shadow-ink": "4px 4px 0 0 #000000",
|
|
342
|
+
"--mw-shadow-ink-sm": "2px 2px 0 0 #000000",
|
|
343
|
+
"--mw-shadow-ink-lg": "6px 6px 0 0 #000000",
|
|
344
|
+
"--mw-shadow-comic": "5px 5px 0 0 #000000",
|
|
345
|
+
"--mw-green": "#39ff14",
|
|
346
|
+
}),
|
|
347
|
+
"cozy-rpg": freezeSkinMode({
|
|
348
|
+
"--mw-paper": "#f6eedc",
|
|
349
|
+
"--mw-paper-raised": "#fdf9ef",
|
|
350
|
+
"--mw-ink": "#261b12",
|
|
351
|
+
"--mw-ink-soft": "#4d3927",
|
|
352
|
+
"--mw-ink-faint": "#624a35",
|
|
353
|
+
"--mw-muted": "#e9dcc0",
|
|
354
|
+
"--mw-primary": "#f59e0b",
|
|
355
|
+
"--mw-primary-foreground": "#261b12",
|
|
356
|
+
"--mw-accent": "#10b981",
|
|
357
|
+
"--mw-accent-foreground": "#14221b",
|
|
358
|
+
"--mw-on-accent": "#261b12",
|
|
359
|
+
"--mw-focus": "#9a3412",
|
|
360
|
+
"--mw-magenta-readable": "#9f1239",
|
|
361
|
+
"--mw-cyan-readable": "#0f6277",
|
|
362
|
+
"--mw-yellow-readable": "#713f12",
|
|
363
|
+
"--mw-violet-readable": "#5b21b6",
|
|
364
|
+
"--mw-radius-sm": "0.25rem",
|
|
365
|
+
"--mw-radius-md": "0.5rem",
|
|
366
|
+
"--mw-radius-lg": "0.75rem",
|
|
367
|
+
"--mw-frame-width": "2px",
|
|
368
|
+
"--mw-shadow-ink": "3px 3px 0 0 #3f2d1d",
|
|
369
|
+
"--mw-shadow-ink-lg": "6px 6px 0 0 #3f2d1d",
|
|
370
|
+
}, {
|
|
371
|
+
"--mw-paper": "#1b1510",
|
|
372
|
+
"--mw-paper-raised": "#261e17",
|
|
373
|
+
"--mw-ink": "#f7efe0",
|
|
374
|
+
"--mw-ink-soft": "#d9cbb2",
|
|
375
|
+
"--mw-ink-faint": "#b6a488",
|
|
376
|
+
"--mw-muted": "#352a20",
|
|
377
|
+
"--mw-primary": "#fbbf24",
|
|
378
|
+
"--mw-primary-foreground": "#1b1510",
|
|
379
|
+
"--mw-accent": "#34d399",
|
|
380
|
+
"--mw-accent-foreground": "#0c1f17",
|
|
381
|
+
"--mw-on-accent": "#1b1510",
|
|
382
|
+
"--mw-focus": "#fbbf24",
|
|
383
|
+
"--mw-magenta-readable": "#fb7185",
|
|
384
|
+
"--mw-cyan-readable": "#5eead4",
|
|
385
|
+
"--mw-yellow-readable": "#fcd34d",
|
|
386
|
+
"--mw-violet-readable": "#d8b4fe",
|
|
387
|
+
"--mw-shadow-ink": "3px 3px 0 0 #0a0705",
|
|
388
|
+
"--mw-shadow-ink-lg": "6px 6px 0 0 #0a0705",
|
|
389
|
+
}),
|
|
390
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T13 — Client pre-hydration init script for SSR skin parity.
|
|
3
|
+
*
|
|
4
|
+
* INV-013: Theme state is carried by request data.
|
|
5
|
+
* Generates a dependency-free IIFE that runs before React hydration.
|
|
6
|
+
* Precedence: explicit inline state > server data-* attrs > mw-theme cookie > legacy localStorage > defaults.
|
|
7
|
+
* Dev mismatch warning integrates T09 theme-mismatch-dev.ts when `dev: true`.
|
|
8
|
+
*/
|
|
9
|
+
import type { ThemeRegistry, UserThemePreferences } from "../themes/types.js";
|
|
10
|
+
export interface SkinInitScriptOptionsSsr {
|
|
11
|
+
/** Explicit server-rendered state (inline data-* attributes win) */
|
|
12
|
+
serverState?: Partial<UserThemePreferences>;
|
|
13
|
+
/** Raw cookie value from the client (cookie wins over defaults) */
|
|
14
|
+
cookieValue?: string | null;
|
|
15
|
+
/** Development mode: emit console warning when server/client disagree */
|
|
16
|
+
dev?: boolean;
|
|
17
|
+
/** Theme registry to validate against */
|
|
18
|
+
registry?: ThemeRegistry;
|
|
19
|
+
/** Storage key for legacy localStorage fallback */
|
|
20
|
+
storageKey?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create a pre-hydration init script that applies theme state to documentElement
|
|
24
|
+
* before React hydrates. The generated IIFE has zero dependencies and runs
|
|
25
|
+
* synchronously in the <head> or at the top of <body>.
|
|
26
|
+
*
|
|
27
|
+
* Precedence (highest first):
|
|
28
|
+
* 1. `serverState` passed explicitly (inline data-* attrs from server render)
|
|
29
|
+
* 2. `cookieValue` from mw-theme cookie (passed from server, or read at runtime)
|
|
30
|
+
* 3. Legacy localStorage keys (mw-ui-theme, mw-board-preferences, mw-theme)
|
|
31
|
+
* 4. Registry defaults
|
|
32
|
+
*
|
|
33
|
+
* When `dev: true`, emits a console.warn if the resolved skin differs from what
|
|
34
|
+
* the server would have resolved from the same cookie (T09 parity check).
|
|
35
|
+
*/
|
|
36
|
+
export declare function createSkinInitScript(options?: SkinInitScriptOptionsSsr): string;
|