@moonwitness/ui 7.3.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +2 -3
- package/scripts/consumer-smoke.mjs +0 -45
- package/scripts/generate-icons.mjs +0 -110
- package/scripts/generate-token-artifacts.mjs +0 -90
- package/scripts/icon-svg-to-jsx.mjs +0 -249
- package/scripts/verification-diagnostics.mjs +0 -40
- package/scripts/verify-package.mjs +0 -412
- package/src/cartoon/anime-avatar.tsx +0 -628
- package/src/cartoon/anime-stage.tsx +0 -458
- package/src/cartoon/index.tsx +0 -542
- package/src/cartoon.tsx +0 -645
- package/src/characters.ts +0 -625
- package/src/components/accordion.tsx +0 -77
- package/src/components/alert.tsx +0 -139
- package/src/components/appearance-menu.tsx +0 -181
- package/src/components/artwork-frame.tsx +0 -49
- package/src/components/audio.tsx +0 -97
- package/src/components/avatar.tsx +0 -75
- package/src/components/badge.tsx +0 -94
- package/src/components/brand-mark.tsx +0 -73
- package/src/components/breadcrumbs.tsx +0 -98
- package/src/components/button.tsx +0 -340
- package/src/components/card.tsx +0 -171
- package/src/components/character-badge.tsx +0 -58
- package/src/components/character-preview.tsx +0 -104
- package/src/components/character-stage.tsx +0 -225
- package/src/components/chart.tsx +0 -481
- package/src/components/checkbox.tsx +0 -64
- package/src/components/comic-panel.tsx +0 -301
- package/src/components/comic-theater.tsx +0 -170
- package/src/components/command.tsx +0 -189
- package/src/components/confirm-dialog.tsx +0 -129
- package/src/components/copy-button.tsx +0 -62
- package/src/components/date-picker.tsx +0 -126
- package/src/components/dialog.tsx +0 -164
- package/src/components/dna-icon.tsx +0 -77
- package/src/components/dropdown-menu.tsx +0 -87
- package/src/components/effects.tsx +0 -1021
- package/src/components/empty-state.tsx +0 -93
- package/src/components/epistemic-branch-panel.tsx +0 -101
- package/src/components/error-state.tsx +0 -137
- package/src/components/field.tsx +0 -96
- package/src/components/filter-facet-bar.tsx +0 -91
- package/src/components/inbox-popover.tsx +0 -146
- package/src/components/input.tsx +0 -25
- package/src/components/kanban-board.tsx +0 -190
- package/src/components/label.tsx +0 -19
- package/src/components/layered-scene.tsx +0 -555
- package/src/components/log-console.tsx +0 -261
- package/src/components/metric-tile.tsx +0 -99
- package/src/components/mode-picker.tsx +0 -149
- package/src/components/motion-timeline.tsx +0 -848
- package/src/components/number-input.tsx +0 -104
- package/src/components/page-header.tsx +0 -123
- package/src/components/pagination.tsx +0 -83
- package/src/components/panel.tsx +0 -121
- package/src/components/paper-note.tsx +0 -77
- package/src/components/popover.tsx +0 -72
- package/src/components/progress.tsx +0 -127
- package/src/components/quest-card.tsx +0 -319
- package/src/components/radio-group.tsx +0 -50
- package/src/components/riot-sticker.tsx +0 -151
- package/src/components/scene-particles.tsx +0 -196
- package/src/components/scene-transitions.tsx +0 -130
- package/src/components/section-ribbon.tsx +0 -94
- package/src/components/select-field.tsx +0 -27
- package/src/components/select.tsx +0 -81
- package/src/components/separator.tsx +0 -58
- package/src/components/sheet.tsx +0 -96
- package/src/components/skeleton.tsx +0 -35
- package/src/components/sketch-annotation.tsx +0 -87
- package/src/components/smart-button-box.tsx +0 -114
- package/src/components/speech-bubble.tsx +0 -116
- package/src/components/spinner.tsx +0 -69
- package/src/components/sprite-player.tsx +0 -412
- package/src/components/status-bar.tsx +0 -63
- package/src/components/status-pill.tsx +0 -68
- package/src/components/switch.tsx +0 -76
- package/src/components/table.tsx +0 -163
- package/src/components/tabs.tsx +0 -101
- package/src/components/tag-input.tsx +0 -170
- package/src/components/textarea.tsx +0 -25
- package/src/components/toast.tsx +0 -14
- package/src/components/toolbar.tsx +0 -39
- package/src/components/tooltip.tsx +0 -49
- package/src/components/update-banner.tsx +0 -220
- package/src/components/xv-primitives.tsx +0 -256
- package/src/css-exports.ts +0 -142
- package/src/dna.tsx +0 -137
- package/src/game/boss-hud.tsx +0 -384
- package/src/game/index.tsx +0 -886
- package/src/game/tactical.tsx +0 -245
- package/src/game.tsx +0 -770
- package/src/icons/activity.tsx +0 -38
- package/src/icons/add.tsx +0 -38
- package/src/icons/addon.tsx +0 -37
- package/src/icons/anime-anger.tsx +0 -37
- package/src/icons/anime-shock.tsx +0 -37
- package/src/icons/anime-sparkle.tsx +0 -38
- package/src/icons/anime-sweatdrop.tsx +0 -38
- package/src/icons/archive.tsx +0 -37
- package/src/icons/arrow-left.tsx +0 -37
- package/src/icons/arrow-right.tsx +0 -37
- package/src/icons/attachment.tsx +0 -38
- package/src/icons/bank.tsx +0 -37
- package/src/icons/bolt.tsx +0 -37
- package/src/icons/book-open.tsx +0 -37
- package/src/icons/bookmark.tsx +0 -37
- package/src/icons/boss-skull.tsx +0 -40
- package/src/icons/calendar-clock.tsx +0 -40
- package/src/icons/calendar.tsx +0 -38
- package/src/icons/check-circle.tsx +0 -38
- package/src/icons/check-square.tsx +0 -38
- package/src/icons/check.tsx +0 -37
- package/src/icons/chevron-right.tsx +0 -37
- package/src/icons/chevrons-left.tsx +0 -37
- package/src/icons/chevrons-right.tsx +0 -37
- package/src/icons/clapperboard.tsx +0 -38
- package/src/icons/clock.tsx +0 -38
- package/src/icons/close.tsx +0 -37
- package/src/icons/code.tsx +0 -37
- package/src/icons/columns.tsx +0 -38
- package/src/icons/combo-flame.tsx +0 -38
- package/src/icons/company.tsx +0 -38
- package/src/icons/credit-card.tsx +0 -38
- package/src/icons/critical-star.tsx +0 -37
- package/src/icons/currency.tsx +0 -38
- package/src/icons/delete.tsx +0 -37
- package/src/icons/document.tsx +0 -38
- package/src/icons/download.tsx +0 -37
- package/src/icons/dpad.tsx +0 -38
- package/src/icons/edit.tsx +0 -38
- package/src/icons/element-fire.tsx +0 -37
- package/src/icons/element-ice.tsx +0 -38
- package/src/icons/element-solar.tsx +0 -38
- package/src/icons/element-void.tsx +0 -38
- package/src/icons/element-volt.tsx +0 -38
- package/src/icons/element-wind.tsx +0 -37
- package/src/icons/error.tsx +0 -38
- package/src/icons/external-link.tsx +0 -38
- package/src/icons/field.tsx +0 -38
- package/src/icons/file-spreadsheet.tsx +0 -38
- package/src/icons/filter.tsx +0 -37
- package/src/icons/gacha-ticket.tsx +0 -38
- package/src/icons/gamepad.tsx +0 -40
- package/src/icons/globe.tsx +0 -38
- package/src/icons/grid.tsx +0 -40
- package/src/icons/hash.tsx +0 -37
- package/src/icons/heart-hp.tsx +0 -38
- package/src/icons/history.tsx +0 -37
- package/src/icons/home.tsx +0 -37
- package/src/icons/image.tsx +0 -39
- package/src/icons/impact-slash.tsx +0 -38
- package/src/icons/inbox.tsx +0 -38
- package/src/icons/index.ts +0 -120
- package/src/icons/info.tsx +0 -38
- package/src/icons/jobs.tsx +0 -38
- package/src/icons/katana.tsx +0 -38
- package/src/icons/key.tsx +0 -38
- package/src/icons/keyboard.tsx +0 -38
- package/src/icons/keyframe-diamond.tsx +0 -38
- package/src/icons/knowledge.tsx +0 -38
- package/src/icons/language.tsx +0 -39
- package/src/icons/lock.tsx +0 -38
- package/src/icons/logout.tsx +0 -37
- package/src/icons/loot-chest.tsx +0 -39
- package/src/icons/mail.tsx +0 -38
- package/src/icons/mana-crystal.tsx +0 -38
- package/src/icons/map-pin.tsx +0 -38
- package/src/icons/mecha-helm.tsx +0 -38
- package/src/icons/menu.tsx +0 -37
- package/src/icons/message.tsx +0 -38
- package/src/icons/model.tsx +0 -38
- package/src/icons/moon.tsx +0 -37
- package/src/icons/notification.tsx +0 -38
- package/src/icons/partner.tsx +0 -41
- package/src/icons/pause.tsx +0 -37
- package/src/icons/phone.tsx +0 -37
- package/src/icons/play.tsx +0 -37
- package/src/icons/potion-flask.tsx +0 -40
- package/src/icons/quest-scroll.tsx +0 -39
- package/src/icons/radar-ping.tsx +0 -40
- package/src/icons/refresh.tsx +0 -38
- package/src/icons/relation.tsx +0 -40
- package/src/icons/save.tsx +0 -38
- package/src/icons/search.tsx +0 -38
- package/src/icons/security.tsx +0 -38
- package/src/icons/send.tsx +0 -38
- package/src/icons/settings.tsx +0 -39
- package/src/icons/shield-crest.tsx +0 -38
- package/src/icons/shuriken.tsx +0 -38
- package/src/icons/signal-off.tsx +0 -37
- package/src/icons/signal.tsx +0 -37
- package/src/icons/skill-node.tsx +0 -40
- package/src/icons/smartphone.tsx +0 -38
- package/src/icons/sort-ascending.tsx +0 -37
- package/src/icons/sort-descending.tsx +0 -37
- package/src/icons/sort.tsx +0 -37
- package/src/icons/sparkle.tsx +0 -38
- package/src/icons/speech-burst.tsx +0 -37
- package/src/icons/story.tsx +0 -37
- package/src/icons/sun.tsx +0 -38
- package/src/icons/tag.tsx +0 -38
- package/src/icons/team.tsx +0 -40
- package/src/icons/trophy-crown.tsx +0 -39
- package/src/icons/upload.tsx +0 -37
- package/src/icons/user.tsx +0 -38
- package/src/icons/users.tsx +0 -39
- package/src/icons/visibility-off.tsx +0 -38
- package/src/icons/visibility.tsx +0 -38
- package/src/icons/volume-off.tsx +0 -37
- package/src/icons/volume.tsx +0 -37
- package/src/icons/warning.tsx +0 -38
- package/src/icons/workflow.tsx +0 -40
- package/src/icons.tsx +0 -965
- package/src/index.ts +0 -89
- package/src/lib/asset-registry.ts +0 -534
- package/src/lib/audio-runtime.ts +0 -314
- package/src/lib/character-adapter.ts +0 -370
- package/src/lib/character-registry.ts +0 -2368
- package/src/lib/cn.ts +0 -6
- package/src/lib/compose-refs.ts +0 -16
- package/src/lib/sanitize-url.ts +0 -51
- package/src/lib/scene-camera.ts +0 -483
- package/src/lib/scene-playback.ts +0 -622
- package/src/lib/scene-soundscape.ts +0 -151
- package/src/lib/scene-test-harness.ts +0 -200
- package/src/lib/scene-timeline.ts +0 -398
- package/src/lib/use-animation-visibility.ts +0 -45
- package/src/lib/use-modal-focus.ts +0 -270
- package/src/lib/use-reduced-motion.ts +0 -37
- package/src/motion/easing-presets.ts +0 -262
- package/src/motion/index.tsx +0 -894
- package/src/motion/physics.ts +0 -259
- package/src/motion/timeline-math.ts +0 -358
- package/src/motion.tsx +0 -639
- package/src/pixelfx-boundary.ts +0 -188
- package/src/pixelfx-registry.ts +0 -1190
- package/src/pixelfx-types.d.ts +0 -73
- package/src/pixelfx.tsx +0 -1022
- package/src/provider.tsx +0 -63
- package/src/skin-catalog.ts +0 -306
- package/src/skin-tokens.ts +0 -425
- package/src/ssr/init-script.ts +0 -281
- package/src/ssr/resolve-skin.ts +0 -217
- package/src/ssr/theme-mismatch-dev.ts +0 -181
- package/src/templates/battle-arena.tsx +0 -688
- package/src/templates/index.tsx +0 -314
- package/src/templates.tsx +0 -225
- package/src/themes/dna-presets.ts +0 -119
- package/src/themes/index.ts +0 -56
- package/src/themes/provider.tsx +0 -183
- package/src/themes/types.ts +0 -111
- package/src/themes.ts +0 -9
- package/src/token-exporter.ts +0 -12
- package/src/token-exporters.ts +0 -343
- package/src/token-seeds.ts +0 -335
- package/src/token-snapshot.ts +0 -179
- package/src/utils.ts +0 -58
package/src/index.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export * from "./characters.js";
|
|
2
|
-
export * from "./lib/sanitize-url.js";
|
|
3
|
-
export * from "./pixelfx-registry.js";
|
|
4
|
-
export * from "./pixelfx.js";
|
|
5
|
-
export * from "./provider.js";
|
|
6
|
-
export * from "./themes.js";
|
|
7
|
-
export * from "./token-exporter.js";
|
|
8
|
-
export * from "./utils.js";
|
|
9
|
-
|
|
10
|
-
export * from "./components/accordion.js";
|
|
11
|
-
export * from "./components/alert.js";
|
|
12
|
-
export * from "./components/appearance-menu.js";
|
|
13
|
-
export * from "./components/artwork-frame.js";
|
|
14
|
-
export * from "./components/audio.js";
|
|
15
|
-
export * from "./components/avatar.js";
|
|
16
|
-
export * from "./components/badge.js";
|
|
17
|
-
export * from "./components/brand-mark.js";
|
|
18
|
-
export * from "./components/breadcrumbs.js";
|
|
19
|
-
export * from "./components/button.js";
|
|
20
|
-
export * from "./components/card.js";
|
|
21
|
-
export * from "./components/character-badge.js";
|
|
22
|
-
export * from "./components/character-preview.js";
|
|
23
|
-
export * from "./components/character-stage.js";
|
|
24
|
-
export * from "./components/chart.js";
|
|
25
|
-
export * from "./components/checkbox.js";
|
|
26
|
-
export * from "./components/comic-panel.js";
|
|
27
|
-
export * from "./components/comic-theater.js";
|
|
28
|
-
// export * from "./components/command.js"; // Scoped to subpath to avoid cmdk peer-dep in root
|
|
29
|
-
export * from "./components/confirm-dialog.js";
|
|
30
|
-
export * from "./components/copy-button.js";
|
|
31
|
-
export * from "./components/date-picker.js";
|
|
32
|
-
export * from "./components/dialog.js";
|
|
33
|
-
export * from "./components/dna-icon.js";
|
|
34
|
-
export * from "./components/dropdown-menu.js";
|
|
35
|
-
export * from "./components/effects.js";
|
|
36
|
-
export * from "./components/empty-state.js";
|
|
37
|
-
export * from "./components/epistemic-branch-panel.js";
|
|
38
|
-
export * from "./components/error-state.js";
|
|
39
|
-
export * from "./components/field.js";
|
|
40
|
-
export * from "./components/filter-facet-bar.js";
|
|
41
|
-
export * from "./components/inbox-popover.js";
|
|
42
|
-
export * from "./components/input.js";
|
|
43
|
-
export * from "./components/kanban-board.js";
|
|
44
|
-
export * from "./components/label.js";
|
|
45
|
-
export * from "./components/layered-scene.js";
|
|
46
|
-
export * from "./components/log-console.js";
|
|
47
|
-
export * from "./components/metric-tile.js";
|
|
48
|
-
export * from "./components/mode-picker.js";
|
|
49
|
-
export * from "./components/motion-timeline.js";
|
|
50
|
-
export * from "./components/number-input.js";
|
|
51
|
-
export * from "./components/page-header.js";
|
|
52
|
-
export * from "./components/pagination.js";
|
|
53
|
-
export * from "./components/panel.js";
|
|
54
|
-
export * from "./components/paper-note.js";
|
|
55
|
-
export * from "./components/popover.js";
|
|
56
|
-
export * from "./components/progress.js";
|
|
57
|
-
export * from "./components/quest-card.js";
|
|
58
|
-
export * from "./components/radio-group.js";
|
|
59
|
-
export * from "./components/riot-sticker.js";
|
|
60
|
-
export * from "./components/scene-particles.js";
|
|
61
|
-
export * from "./components/scene-transitions.js";
|
|
62
|
-
export * from "./components/section-ribbon.js";
|
|
63
|
-
export * from "./components/select-field.js";
|
|
64
|
-
export * from "./components/select.js";
|
|
65
|
-
export * from "./components/separator.js";
|
|
66
|
-
export * from "./components/sheet.js";
|
|
67
|
-
export * from "./components/skeleton.js";
|
|
68
|
-
export * from "./components/sketch-annotation.js";
|
|
69
|
-
export * from "./components/smart-button-box.js";
|
|
70
|
-
export {
|
|
71
|
-
SpeechBubble,
|
|
72
|
-
StickerBadge,
|
|
73
|
-
type SpeechBubbleProps,
|
|
74
|
-
type StickerBadgeProps,
|
|
75
|
-
} from "./components/speech-bubble.js";
|
|
76
|
-
export * from "./components/spinner.js";
|
|
77
|
-
export * from "./components/sprite-player.js";
|
|
78
|
-
export * from "./components/status-bar.js";
|
|
79
|
-
export * from "./components/status-pill.js";
|
|
80
|
-
export * from "./components/switch.js";
|
|
81
|
-
export * from "./components/table.js";
|
|
82
|
-
export * from "./components/tabs.js";
|
|
83
|
-
export * from "./components/tag-input.js";
|
|
84
|
-
export * from "./components/textarea.js";
|
|
85
|
-
// export * from "./components/toast.js"; // Scoped to subpath to avoid sonner peer-dep in root
|
|
86
|
-
export * from "./components/toolbar.js";
|
|
87
|
-
export * from "./components/tooltip.js";
|
|
88
|
-
export * from "./components/update-banner.js";
|
|
89
|
-
export * from "./components/xv-primitives.js";
|
|
@@ -1,534 +0,0 @@
|
|
|
1
|
-
import type { SpriteClipMetadata } from "../components/sprite-player.js";
|
|
2
|
-
|
|
3
|
-
export type CharacterId = "kuro-signal" | "vesper-ink" | "walter-white";
|
|
4
|
-
|
|
5
|
-
// mw-ww ("Walter White") expressions — calm, polite, absurdly serious about sweeping.
|
|
6
|
-
export const WALTER_EXPRESSIONS = [
|
|
7
|
-
"calm",
|
|
8
|
-
"sweeping",
|
|
9
|
-
"gloating",
|
|
10
|
-
"victorious",
|
|
11
|
-
] as const;
|
|
12
|
-
|
|
13
|
-
export type WalterExpression = (typeof WALTER_EXPRESSIONS)[number];
|
|
14
|
-
|
|
15
|
-
export const KURO_EXPRESSIONS = [
|
|
16
|
-
"happy",
|
|
17
|
-
"excited",
|
|
18
|
-
"laughing",
|
|
19
|
-
"angry",
|
|
20
|
-
"confused",
|
|
21
|
-
"thinking",
|
|
22
|
-
"surprised",
|
|
23
|
-
"sad",
|
|
24
|
-
"crying",
|
|
25
|
-
"sleepy",
|
|
26
|
-
"curious",
|
|
27
|
-
"celebrating",
|
|
28
|
-
"embarrassed",
|
|
29
|
-
"determined",
|
|
30
|
-
"victory",
|
|
31
|
-
"disappointed",
|
|
32
|
-
] as const;
|
|
33
|
-
|
|
34
|
-
export type KuroExpression = (typeof KURO_EXPRESSIONS)[number];
|
|
35
|
-
|
|
36
|
-
export const KURO_POSES = [
|
|
37
|
-
"standing",
|
|
38
|
-
"sitting",
|
|
39
|
-
"walking",
|
|
40
|
-
"running",
|
|
41
|
-
"jumping",
|
|
42
|
-
"waving",
|
|
43
|
-
"pointing",
|
|
44
|
-
"reading",
|
|
45
|
-
"gaming",
|
|
46
|
-
"working",
|
|
47
|
-
"holding-objects",
|
|
48
|
-
"celebrating",
|
|
49
|
-
] as const;
|
|
50
|
-
|
|
51
|
-
export type KuroPose = (typeof KURO_POSES)[number];
|
|
52
|
-
|
|
53
|
-
export const STATE_ILLUSTRATIONS = [
|
|
54
|
-
"empty-dashboard",
|
|
55
|
-
"no-search-results",
|
|
56
|
-
"no-notifications",
|
|
57
|
-
"empty-collection",
|
|
58
|
-
"no-favorites",
|
|
59
|
-
"no-messages",
|
|
60
|
-
"no-activity",
|
|
61
|
-
"first-time",
|
|
62
|
-
"loading",
|
|
63
|
-
"success",
|
|
64
|
-
"error",
|
|
65
|
-
"offline",
|
|
66
|
-
"network-disconnected",
|
|
67
|
-
"maintenance",
|
|
68
|
-
"access-denied",
|
|
69
|
-
"not-found",
|
|
70
|
-
"unexpected-failure",
|
|
71
|
-
"welcome",
|
|
72
|
-
"onboarding",
|
|
73
|
-
"discover",
|
|
74
|
-
"explore",
|
|
75
|
-
"profile",
|
|
76
|
-
"achievement",
|
|
77
|
-
"completion",
|
|
78
|
-
"celebration",
|
|
79
|
-
] as const;
|
|
80
|
-
|
|
81
|
-
export type StateIllustrationSlug = (typeof STATE_ILLUSTRATIONS)[number];
|
|
82
|
-
|
|
83
|
-
export const STICKER_ASSETS = [
|
|
84
|
-
"speech-bubble-shout",
|
|
85
|
-
"speech-bubble-thought",
|
|
86
|
-
"comic-boom",
|
|
87
|
-
"lightning-bolt",
|
|
88
|
-
"riot-star",
|
|
89
|
-
"street-flame",
|
|
90
|
-
"pixel-heart",
|
|
91
|
-
"hand-arrow",
|
|
92
|
-
"paint-splash",
|
|
93
|
-
"motion-burst",
|
|
94
|
-
"torn-tape-x",
|
|
95
|
-
"graffiti-crown",
|
|
96
|
-
] as const;
|
|
97
|
-
|
|
98
|
-
export type StickerSlug = (typeof STICKER_ASSETS)[number];
|
|
99
|
-
|
|
100
|
-
export const GAME_ASSETS = [
|
|
101
|
-
"avatar-kuro",
|
|
102
|
-
"avatar-vesper",
|
|
103
|
-
"avatar-frame-riot",
|
|
104
|
-
"badge-signal-scout",
|
|
105
|
-
"badge-archive-keeper",
|
|
106
|
-
"badge-story-architect",
|
|
107
|
-
"badge-zero-drift",
|
|
108
|
-
"rank-rookie",
|
|
109
|
-
"rank-vanguard",
|
|
110
|
-
"rank-legend",
|
|
111
|
-
"quest-banner",
|
|
112
|
-
"reward-crate",
|
|
113
|
-
"level-up-burst",
|
|
114
|
-
] as const;
|
|
115
|
-
|
|
116
|
-
export type GameAssetSlug = (typeof GAME_ASSETS)[number];
|
|
117
|
-
|
|
118
|
-
export const BACKGROUND_ASSETS = [
|
|
119
|
-
"riot-street-alley",
|
|
120
|
-
"riot-arcade-workbench",
|
|
121
|
-
"halftone-paper-light",
|
|
122
|
-
"halftone-ink-dark",
|
|
123
|
-
] as const;
|
|
124
|
-
|
|
125
|
-
export type BackgroundSlug = (typeof BACKGROUND_ASSETS)[number];
|
|
126
|
-
|
|
127
|
-
export type BrandMarkVariant = "lockup" | "symbol" | "wordmark";
|
|
128
|
-
export type BrandMarkTone = "dark" | "light" | "mono-dark" | "mono-light";
|
|
129
|
-
|
|
130
|
-
export const KURO_CLIP_IDS = [
|
|
131
|
-
"idle",
|
|
132
|
-
"blink",
|
|
133
|
-
"wave",
|
|
134
|
-
"celebrate",
|
|
135
|
-
"think",
|
|
136
|
-
"loading",
|
|
137
|
-
"success",
|
|
138
|
-
"error",
|
|
139
|
-
] as const;
|
|
140
|
-
|
|
141
|
-
export type KuroClipId = (typeof KURO_CLIP_IDS)[number];
|
|
142
|
-
|
|
143
|
-
export const RIOT_ALLEY_SCENE_PATH = "scenes/riot-alley-scene.json";
|
|
144
|
-
export const MOON_CITY_SCENE_PATH = "scenes/moon-city-scene.json";
|
|
145
|
-
|
|
146
|
-
export const SCENE_PATHS = {
|
|
147
|
-
"riot-alley": RIOT_ALLEY_SCENE_PATH,
|
|
148
|
-
"moon-city": MOON_CITY_SCENE_PATH,
|
|
149
|
-
} as const;
|
|
150
|
-
|
|
151
|
-
export type SceneId = keyof typeof SCENE_PATHS;
|
|
152
|
-
|
|
153
|
-
export const EDITORIAL_ILLUSTRATIONS = [
|
|
154
|
-
"auth-login-desktop",
|
|
155
|
-
"auth-login-mobile",
|
|
156
|
-
"board-masthead",
|
|
157
|
-
"editorial-archive",
|
|
158
|
-
"editorial-knowledge",
|
|
159
|
-
"editorial-people",
|
|
160
|
-
"editorial-rain",
|
|
161
|
-
"editorial-signal",
|
|
162
|
-
"editorial-stories",
|
|
163
|
-
"home-hero-desktop",
|
|
164
|
-
"home-hero-mobile",
|
|
165
|
-
"moon-city-orbit",
|
|
166
|
-
"story-workbench-masthead",
|
|
167
|
-
] as const;
|
|
168
|
-
|
|
169
|
-
export type EditorialIllustrationSlug =
|
|
170
|
-
(typeof EDITORIAL_ILLUSTRATIONS)[number];
|
|
171
|
-
|
|
172
|
-
export const LEGACY_STATE_ILLUSTRATIONS = [
|
|
173
|
-
"access-denied",
|
|
174
|
-
"empty",
|
|
175
|
-
"no-activity",
|
|
176
|
-
"no-results",
|
|
177
|
-
"not-found",
|
|
178
|
-
"offline",
|
|
179
|
-
"onboarding",
|
|
180
|
-
"orbit-pattern",
|
|
181
|
-
] as const;
|
|
182
|
-
|
|
183
|
-
export type LegacyStateIllustrationSlug =
|
|
184
|
-
(typeof LEGACY_STATE_ILLUSTRATIONS)[number];
|
|
185
|
-
export type LegacyStateTone = "dark" | "light";
|
|
186
|
-
|
|
187
|
-
export const MATERIAL_ASSETS = [
|
|
188
|
-
"brush-strip-long",
|
|
189
|
-
"brush-strip-short",
|
|
190
|
-
"doodle-arrow",
|
|
191
|
-
"doodle-bolt",
|
|
192
|
-
"doodle-crown",
|
|
193
|
-
"doodle-smiley",
|
|
194
|
-
"doodle-star",
|
|
195
|
-
"folded-corner",
|
|
196
|
-
"ink-splatter-md",
|
|
197
|
-
"ink-splatter-sm",
|
|
198
|
-
"motif-cross-out",
|
|
199
|
-
"motif-eye-target",
|
|
200
|
-
"motif-globe-grid",
|
|
201
|
-
"motif-moon-phases",
|
|
202
|
-
"motif-orbit",
|
|
203
|
-
"motif-underline",
|
|
204
|
-
"paper-note",
|
|
205
|
-
"scuffed-border",
|
|
206
|
-
"stamp-outline",
|
|
207
|
-
"tape-strip",
|
|
208
|
-
"tile-halftone",
|
|
209
|
-
"tile-scratch",
|
|
210
|
-
"tile-speckle",
|
|
211
|
-
"torn-corner-bl",
|
|
212
|
-
"torn-corner-br",
|
|
213
|
-
"torn-corner-tl",
|
|
214
|
-
"torn-corner-tr",
|
|
215
|
-
"torn-edge-bottom",
|
|
216
|
-
"torn-edge-left",
|
|
217
|
-
"torn-edge-right",
|
|
218
|
-
"torn-edge-top",
|
|
219
|
-
] as const;
|
|
220
|
-
|
|
221
|
-
export type MaterialSlug = (typeof MATERIAL_ASSETS)[number];
|
|
222
|
-
|
|
223
|
-
export const SOUND_ASSETS = [
|
|
224
|
-
"ambience-archive-quiet",
|
|
225
|
-
"ambience-moon-city-night",
|
|
226
|
-
"ambience-street-rain",
|
|
227
|
-
"ambience-underground-hum",
|
|
228
|
-
"ui-alert",
|
|
229
|
-
"ui-signal",
|
|
230
|
-
"ui-success",
|
|
231
|
-
] as const;
|
|
232
|
-
|
|
233
|
-
export type SoundSlug = (typeof SOUND_ASSETS)[number];
|
|
234
|
-
|
|
235
|
-
export const CREW_CLIP_IDS = ["idle", "walk", "turn", "hair-move"] as const;
|
|
236
|
-
|
|
237
|
-
export type CrewClipId = (typeof CREW_CLIP_IDS)[number];
|
|
238
|
-
|
|
239
|
-
export interface UniverseAssetLookupOptions {
|
|
240
|
-
readonly basePath?: string;
|
|
241
|
-
readonly format?: "webp" | "png";
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export interface CharacterClipLookupOptions {
|
|
245
|
-
readonly basePath?: string;
|
|
246
|
-
readonly fps?: number;
|
|
247
|
-
readonly durationMs?: number;
|
|
248
|
-
readonly loop?: boolean;
|
|
249
|
-
readonly pingPong?: boolean;
|
|
250
|
-
readonly width?: number;
|
|
251
|
-
readonly height?: number;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export interface ResolvedUniverseImage {
|
|
255
|
-
readonly path: string;
|
|
256
|
-
readonly fallbackPath: string;
|
|
257
|
-
readonly src: string;
|
|
258
|
-
readonly fallbackSrc: string;
|
|
259
|
-
readonly alt: string;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export interface ResolvedUniverseSound {
|
|
263
|
-
readonly path: string;
|
|
264
|
-
readonly src: string;
|
|
265
|
-
readonly label: string;
|
|
266
|
-
readonly format: "wav";
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export interface ResolvedCharacterClip extends SpriteClipMetadata {
|
|
270
|
-
readonly characterId: "kuro-signal";
|
|
271
|
-
readonly clipId: KuroClipId;
|
|
272
|
-
readonly framePaths: readonly string[];
|
|
273
|
-
readonly fallbackPath: string;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export interface ResolvedCrewClip extends SpriteClipMetadata {
|
|
277
|
-
readonly characterId: "crew-01";
|
|
278
|
-
readonly clipId: CrewClipId;
|
|
279
|
-
readonly framePaths: readonly string[];
|
|
280
|
-
readonly fallbackPath: string;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
const RIOT_DIR = "illustrations/riot-universe";
|
|
284
|
-
const WORDS = (slug: string) => slug.replaceAll("-", " ");
|
|
285
|
-
|
|
286
|
-
const buildImage = (
|
|
287
|
-
path: string,
|
|
288
|
-
alt: string,
|
|
289
|
-
basePath = "",
|
|
290
|
-
fallbackPath = path,
|
|
291
|
-
): ResolvedUniverseImage => {
|
|
292
|
-
const src = resolveUniverseAsset(path, basePath);
|
|
293
|
-
return {
|
|
294
|
-
path,
|
|
295
|
-
fallbackPath,
|
|
296
|
-
src,
|
|
297
|
-
fallbackSrc:
|
|
298
|
-
fallbackPath === path
|
|
299
|
-
? src
|
|
300
|
-
: resolveUniverseAsset(fallbackPath, basePath),
|
|
301
|
-
alt,
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/** Resolve a canonical asset path against an optional app basePath (defaults to root '/'). */
|
|
306
|
-
export function resolveUniverseAsset(path: string, basePath = ""): string {
|
|
307
|
-
if (/^(?:https?:|data:|blob:)/iu.test(path)) return path;
|
|
308
|
-
let start = 0;
|
|
309
|
-
while (start < path.length && path.charCodeAt(start) === 47) start++;
|
|
310
|
-
const clean = start > 0 ? path.slice(start) : path;
|
|
311
|
-
if (!basePath) return `/${clean}`;
|
|
312
|
-
let end = basePath.length;
|
|
313
|
-
while (end > 0 && basePath.charCodeAt(end - 1) === 47) end--;
|
|
314
|
-
return `${end < basePath.length ? basePath.slice(0, end) : basePath}/${clean}`;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/** Resolve a character portrait asset (.webp primary with .png fallback). */
|
|
318
|
-
export function getCharacterPortrait(
|
|
319
|
-
characterId: CharacterId,
|
|
320
|
-
expression: KuroExpression | WalterExpression = "determined",
|
|
321
|
-
opts: UniverseAssetLookupOptions = {},
|
|
322
|
-
): ResolvedUniverseImage {
|
|
323
|
-
if (characterId === "walter-white") {
|
|
324
|
-
const walterExpression: WalterExpression = (
|
|
325
|
-
WALTER_EXPRESSIONS as readonly string[]
|
|
326
|
-
).includes(expression)
|
|
327
|
-
? (expression as WalterExpression)
|
|
328
|
-
: "calm";
|
|
329
|
-
const stem = `${RIOT_DIR}/characters/walter-white-expression-${walterExpression}`;
|
|
330
|
-
const fallback = `${stem}.png`;
|
|
331
|
-
return buildImage(
|
|
332
|
-
opts.format === "png" ? fallback : `${stem}.webp`,
|
|
333
|
-
`Walter White (${WORDS(walterExpression)})`,
|
|
334
|
-
opts.basePath,
|
|
335
|
-
fallback,
|
|
336
|
-
);
|
|
337
|
-
}
|
|
338
|
-
const isVesper = characterId === "vesper-ink";
|
|
339
|
-
const stem = `${RIOT_DIR}/characters/${isVesper ? "vesper-ink-portrait" : `kuro-signal-expression-${expression}`}`;
|
|
340
|
-
const fallback = `${stem}.png`;
|
|
341
|
-
return buildImage(
|
|
342
|
-
opts.format === "png" ? fallback : `${stem}.webp`,
|
|
343
|
-
isVesper
|
|
344
|
-
? "Vesper Ink character portrait"
|
|
345
|
-
: `Kuro Signal (${WORDS(expression)})`,
|
|
346
|
-
opts.basePath,
|
|
347
|
-
fallback,
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/** Resolve a character full-body pose asset (.webp primary with .png fallback). */
|
|
352
|
-
export function getCharacterPose(
|
|
353
|
-
characterId: CharacterId,
|
|
354
|
-
pose: KuroPose = "standing",
|
|
355
|
-
opts: UniverseAssetLookupOptions = {},
|
|
356
|
-
): ResolvedUniverseImage {
|
|
357
|
-
if (characterId === "vesper-ink")
|
|
358
|
-
return getCharacterPortrait("vesper-ink", "determined", opts);
|
|
359
|
-
if (characterId === "walter-white")
|
|
360
|
-
return getCharacterPortrait("walter-white", "sweeping", opts);
|
|
361
|
-
const stem = `${RIOT_DIR}/characters/kuro-signal-pose-${pose}`;
|
|
362
|
-
const fallback = `${stem}.png`;
|
|
363
|
-
return buildImage(
|
|
364
|
-
opts.format === "png" ? fallback : `${stem}.webp`,
|
|
365
|
-
`Kuro Signal ${WORDS(pose)} pose`,
|
|
366
|
-
opts.basePath,
|
|
367
|
-
fallback,
|
|
368
|
-
);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/** Resolve a state illustration asset (.webp). */
|
|
372
|
-
export function getStateIllustration(
|
|
373
|
-
state: StateIllustrationSlug,
|
|
374
|
-
opts: UniverseAssetLookupOptions = {},
|
|
375
|
-
): ResolvedUniverseImage {
|
|
376
|
-
return buildImage(
|
|
377
|
-
`${RIOT_DIR}/states/state-${state}.webp`,
|
|
378
|
-
`${WORDS(state)} state illustration`,
|
|
379
|
-
opts.basePath,
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/** Resolve a sticker asset (.png). */
|
|
384
|
-
export function getStickerAsset(
|
|
385
|
-
sticker: StickerSlug,
|
|
386
|
-
opts: UniverseAssetLookupOptions = {},
|
|
387
|
-
): ResolvedUniverseImage {
|
|
388
|
-
return buildImage(
|
|
389
|
-
`${RIOT_DIR}/stickers/sticker-${sticker}.png`,
|
|
390
|
-
`${WORDS(sticker)} sticker`,
|
|
391
|
-
opts.basePath,
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/** Resolve a game badge, rank, avatar, or reward asset (.png). */
|
|
396
|
-
export function getBadgeAsset(
|
|
397
|
-
badge: GameAssetSlug,
|
|
398
|
-
opts: UniverseAssetLookupOptions = {},
|
|
399
|
-
): ResolvedUniverseImage {
|
|
400
|
-
return buildImage(
|
|
401
|
-
`${RIOT_DIR}/game/${badge}.png`,
|
|
402
|
-
`${WORDS(badge)} badge`,
|
|
403
|
-
opts.basePath,
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/** Resolve a background texture or scene backdrop asset (.webp). */
|
|
408
|
-
export function getBackgroundAsset(
|
|
409
|
-
bg: BackgroundSlug,
|
|
410
|
-
opts: UniverseAssetLookupOptions = {},
|
|
411
|
-
): ResolvedUniverseImage {
|
|
412
|
-
return buildImage(
|
|
413
|
-
`${RIOT_DIR}/backgrounds/bg-${bg}.webp`,
|
|
414
|
-
`${WORDS(bg)} background`,
|
|
415
|
-
opts.basePath,
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/** Resolve a canonical MoonWitness brand mark (.svg). */
|
|
420
|
-
export function getBrandMarkAsset(
|
|
421
|
-
variant: BrandMarkVariant = "lockup",
|
|
422
|
-
tone: BrandMarkTone = "dark",
|
|
423
|
-
opts: UniverseAssetLookupOptions = {},
|
|
424
|
-
): ResolvedUniverseImage {
|
|
425
|
-
const path = `brand/moonwitness-${variant}-${tone}.svg`;
|
|
426
|
-
const alt = variant === "symbol" ? "MoonWitness crown symbol" : "MoonWitness";
|
|
427
|
-
return buildImage(path, alt, opts.basePath);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/** Resolve an editorial masthead, hero, or storytelling illustration (.webp). */
|
|
431
|
-
export function getEditorialIllustration(
|
|
432
|
-
slug: EditorialIllustrationSlug,
|
|
433
|
-
opts: UniverseAssetLookupOptions = {},
|
|
434
|
-
): ResolvedUniverseImage {
|
|
435
|
-
return buildImage(
|
|
436
|
-
`illustrations/${slug}.webp`,
|
|
437
|
-
`${WORDS(slug)} illustration`,
|
|
438
|
-
opts.basePath,
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/** Resolve a dark/light monochrome vector state illustration (.svg). */
|
|
443
|
-
export function getLegacyStateIllustration(
|
|
444
|
-
slug: LegacyStateIllustrationSlug,
|
|
445
|
-
tone: LegacyStateTone = "dark",
|
|
446
|
-
opts: UniverseAssetLookupOptions = {},
|
|
447
|
-
): ResolvedUniverseImage {
|
|
448
|
-
return buildImage(
|
|
449
|
-
`illustrations/${slug}-${tone}.svg`,
|
|
450
|
-
`${WORDS(slug)} (${tone}) illustration`,
|
|
451
|
-
opts.basePath,
|
|
452
|
-
);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/** Resolve a MoonWitness surface material, torn edge, doodle, or halftone tile (.svg). */
|
|
456
|
-
export function getMaterialAsset(
|
|
457
|
-
material: MaterialSlug,
|
|
458
|
-
opts: UniverseAssetLookupOptions = {},
|
|
459
|
-
): ResolvedUniverseImage {
|
|
460
|
-
return buildImage(
|
|
461
|
-
`materials/${material}.svg`,
|
|
462
|
-
`${WORDS(material)} material`,
|
|
463
|
-
opts.basePath,
|
|
464
|
-
);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/** Resolve a MoonWitness UI sound cue or ambient audio loop (.wav). */
|
|
468
|
-
export function getSoundAsset(
|
|
469
|
-
sound: SoundSlug,
|
|
470
|
-
opts: Pick<UniverseAssetLookupOptions, "basePath"> = {},
|
|
471
|
-
): ResolvedUniverseSound {
|
|
472
|
-
const path = `sounds/${sound}.wav`;
|
|
473
|
-
return {
|
|
474
|
-
path,
|
|
475
|
-
src: resolveUniverseAsset(path, opts.basePath),
|
|
476
|
-
label: `${WORDS(sound)} audio`,
|
|
477
|
-
format: "wav",
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/** Resolve a 4-frame sprite clip descriptor compatible with SpritePlayer. */
|
|
482
|
-
export function getCharacterClip(
|
|
483
|
-
clipId: KuroClipId,
|
|
484
|
-
opts: CharacterClipLookupOptions = {},
|
|
485
|
-
): ResolvedCharacterClip {
|
|
486
|
-
const id = `kuro-signal-${clipId}`;
|
|
487
|
-
const framePaths = ["01", "02", "03", "04"].map(
|
|
488
|
-
(f) => `animation/${id}/${id}-frame-${f}.png`,
|
|
489
|
-
);
|
|
490
|
-
const frames = framePaths.map((p) => resolveUniverseAsset(p, opts.basePath));
|
|
491
|
-
return {
|
|
492
|
-
id,
|
|
493
|
-
characterId: "kuro-signal",
|
|
494
|
-
clipId,
|
|
495
|
-
framePaths,
|
|
496
|
-
frames,
|
|
497
|
-
fallbackPath: framePaths[0],
|
|
498
|
-
fallbackAsset: frames[0],
|
|
499
|
-
fps: opts.fps ?? 8,
|
|
500
|
-
durationMs: opts.durationMs,
|
|
501
|
-
loop: opts.loop ?? true,
|
|
502
|
-
pingPong: opts.pingPong ?? true,
|
|
503
|
-
width: opts.width ?? 512,
|
|
504
|
-
height: opts.height ?? 512,
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/** Resolve a 4-frame vector animation clip for Crew 01 compatible with SpritePlayer. */
|
|
509
|
-
export function getCrewClip(
|
|
510
|
-
clipId: CrewClipId,
|
|
511
|
-
opts: CharacterClipLookupOptions = {},
|
|
512
|
-
): ResolvedCrewClip {
|
|
513
|
-
const dir = clipId === "hair-move" ? "crew-01-hair" : `crew-01-${clipId}`;
|
|
514
|
-
const stem = `crew-01-${clipId}`;
|
|
515
|
-
const framePaths = ["01", "02", "03", "04"].map(
|
|
516
|
-
(f) => `animation/${dir}/${stem}-frame-${f}.svg`,
|
|
517
|
-
);
|
|
518
|
-
const frames = framePaths.map((p) => resolveUniverseAsset(p, opts.basePath));
|
|
519
|
-
return {
|
|
520
|
-
id: stem,
|
|
521
|
-
characterId: "crew-01",
|
|
522
|
-
clipId,
|
|
523
|
-
framePaths,
|
|
524
|
-
frames,
|
|
525
|
-
fallbackPath: framePaths[0],
|
|
526
|
-
fallbackAsset: frames[0],
|
|
527
|
-
fps: opts.fps ?? 6,
|
|
528
|
-
durationMs: opts.durationMs,
|
|
529
|
-
loop: opts.loop ?? true,
|
|
530
|
-
pingPong: opts.pingPong ?? true,
|
|
531
|
-
width: opts.width ?? 256,
|
|
532
|
-
height: opts.height ?? 384,
|
|
533
|
-
};
|
|
534
|
-
}
|