@rydr/game-sdk 3.0.0 → 3.1.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/README.md +72 -0
- package/dist/client/PlatformClient.d.ts +10 -1
- package/dist/client/PlatformClient.d.ts.map +1 -1
- package/dist/client/PlatformClient.js +76 -5
- package/dist/client/PlatformClient.js.map +1 -1
- package/dist/protocol/buttons.d.ts +30 -0
- package/dist/protocol/buttons.d.ts.map +1 -1
- package/dist/protocol/buttons.js +33 -1
- package/dist/protocol/buttons.js.map +1 -1
- package/dist/protocol/messages.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +1 -1
- package/dist/protocol/version.js +1 -1
- package/dist/ui/action-card.d.ts +39 -0
- package/dist/ui/action-card.d.ts.map +1 -0
- package/dist/ui/action-card.js +38 -0
- package/dist/ui/action-card.js.map +1 -0
- package/dist/ui/action-diamond.d.ts +41 -0
- package/dist/ui/action-diamond.d.ts.map +1 -0
- package/dist/ui/action-diamond.js +35 -0
- package/dist/ui/action-diamond.js.map +1 -0
- package/dist/ui/card.d.ts +45 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +73 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/choice-card.d.ts +73 -0
- package/dist/ui/choice-card.d.ts.map +1 -0
- package/dist/ui/choice-card.js +141 -0
- package/dist/ui/choice-card.js.map +1 -0
- package/dist/ui/dialogue-card.d.ts +54 -0
- package/dist/ui/dialogue-card.d.ts.map +1 -0
- package/dist/ui/dialogue-card.js +107 -0
- package/dist/ui/dialogue-card.js.map +1 -0
- package/dist/ui/index.d.ts +31 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +31 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/keycap.d.ts +77 -0
- package/dist/ui/keycap.d.ts.map +1 -0
- package/dist/ui/keycap.js +160 -0
- package/dist/ui/keycap.js.map +1 -0
- package/dist/ui/labeled-diamond.d.ts +32 -0
- package/dist/ui/labeled-diamond.d.ts.map +1 -0
- package/dist/ui/labeled-diamond.js +86 -0
- package/dist/ui/labeled-diamond.js.map +1 -0
- package/dist/ui/showcase/gallery.d.ts +56 -0
- package/dist/ui/showcase/gallery.d.ts.map +1 -0
- package/dist/ui/showcase/gallery.js +85 -0
- package/dist/ui/showcase/gallery.js.map +1 -0
- package/dist/ui/showcase/index.d.ts +29 -0
- package/dist/ui/showcase/index.d.ts.map +1 -0
- package/dist/ui/showcase/index.js +255 -0
- package/dist/ui/showcase/index.js.map +1 -0
- package/dist/ui/styles.d.ts +12 -0
- package/dist/ui/styles.d.ts.map +1 -0
- package/dist/ui/styles.js +183 -0
- package/dist/ui/styles.js.map +1 -0
- package/package.json +13 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rydr/game-sdk/ui/showcase` — a live catalog of every `@rydr/game-sdk/ui` component in every state,
|
|
3
|
+
* rendered into a host-provided element by {@link mountUiShowcase}. The SDK owns *what* the catalog
|
|
4
|
+
* shows (so it versions with the components and stays the single source of truth); a host provides
|
|
5
|
+
* only *where*:
|
|
6
|
+
*
|
|
7
|
+
* • a standalone dev page in this repo (`examples/ui`) for fast local iteration — see its `main.ts`;
|
|
8
|
+
* • the platform shell, mounting this at an admin-gated route to review the components in the real
|
|
9
|
+
* trainer-screen chrome.
|
|
10
|
+
*
|
|
11
|
+
* This entry is intentionally NOT re-exported from `@rydr/game-sdk/ui`, so a game importing the actual
|
|
12
|
+
* components never pulls the catalog into its bundle. Pass a real `session` for live watts + real
|
|
13
|
+
* button reflection; omit it and the catalog renders static.
|
|
14
|
+
*/
|
|
15
|
+
import { type ShowcaseSession } from "./gallery.js";
|
|
16
|
+
export type { ShowcaseSession } from "./gallery.js";
|
|
17
|
+
export interface UiShowcaseOptions {
|
|
18
|
+
/**
|
|
19
|
+
* A real `PlatformSession` (or a stand-in) — drives the live watts readout and wires every keycap to
|
|
20
|
+
* real controller presses (`UP`/`DOWN`/`A` also drive the choice menu). Omit for a static catalog.
|
|
21
|
+
*/
|
|
22
|
+
session?: ShowcaseSession;
|
|
23
|
+
}
|
|
24
|
+
export interface UiShowcase {
|
|
25
|
+
dispose(): void;
|
|
26
|
+
}
|
|
27
|
+
/** Mount the full UI catalog into `host`. Returns a handle whose `dispose()` tears it all down. */
|
|
28
|
+
export declare function mountUiShowcase(host: HTMLElement, opts?: UiShowcaseOptions): UiShowcase;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/showcase/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiBH,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAE7E,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAoBpD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,iBAAsB,GAAG,UAAU,CAiN3F"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rydr/game-sdk/ui/showcase` — a live catalog of every `@rydr/game-sdk/ui` component in every state,
|
|
3
|
+
* rendered into a host-provided element by {@link mountUiShowcase}. The SDK owns *what* the catalog
|
|
4
|
+
* shows (so it versions with the components and stays the single source of truth); a host provides
|
|
5
|
+
* only *where*:
|
|
6
|
+
*
|
|
7
|
+
* • a standalone dev page in this repo (`examples/ui`) for fast local iteration — see its `main.ts`;
|
|
8
|
+
* • the platform shell, mounting this at an admin-gated route to review the components in the real
|
|
9
|
+
* trainer-screen chrome.
|
|
10
|
+
*
|
|
11
|
+
* This entry is intentionally NOT re-exported from `@rydr/game-sdk/ui`, so a game importing the actual
|
|
12
|
+
* components never pulls the catalog into its bundle. Pass a real `session` for live watts + real
|
|
13
|
+
* button reflection; omit it and the catalog renders static.
|
|
14
|
+
*/
|
|
15
|
+
import { createKeycap, createDpadKeycap, mountCard, mountActionCard, mountActionDiamond, mountDialogueCard, mountChoiceCard, mountLabeledDiamond, } from "../index.js";
|
|
16
|
+
import { Gallery, el, makeCanvas } from "./gallery.js";
|
|
17
|
+
const FACES = ["A", "B", "Y", "Z"];
|
|
18
|
+
const DIRS = ["UP", "RIGHT", "DOWN", "LEFT"];
|
|
19
|
+
const READY_HOLD = 2; // seconds a keycap stays "ready" (full colour) between cooldown cycles
|
|
20
|
+
const DLG_STEP = 2.6; // seconds between auto-advances of the demo dialogue
|
|
21
|
+
const DLG_LINES = [
|
|
22
|
+
"There you are at last. I have waited since dawn, and was beginning to lose hope that a new challenger would walk through the village gates.",
|
|
23
|
+
"Come closer.",
|
|
24
|
+
"Out in the tall grass to the north sleep creatures that wait for a spark to bind themselves to a worthy hand.",
|
|
25
|
+
"Choose well.",
|
|
26
|
+
"Remember the one rule that truly matters: push hard when you feel the resistance rise, for your power decides the outcome.",
|
|
27
|
+
"Good luck.",
|
|
28
|
+
];
|
|
29
|
+
const CHOICE_PROMPT = "Which path would you like to take?";
|
|
30
|
+
const CHOICE_OPTIONS = ["The northern grass", "The river crossing", "The old mine"];
|
|
31
|
+
/** Mount the full UI catalog into `host`. Returns a handle whose `dispose()` tears it all down. */
|
|
32
|
+
export function mountUiShowcase(host, opts = {}) {
|
|
33
|
+
const session = opts.session;
|
|
34
|
+
const press = session; // a session satisfies the components' structural `ButtonSource`
|
|
35
|
+
const g = new Gallery(host, {
|
|
36
|
+
title: "RYDR — controller-button UI",
|
|
37
|
+
sub: "The same components everywhere: pick a shape + state, fill the content slot. Tuned for a trainer screen — don't restyle the type.",
|
|
38
|
+
css: BS_CSS,
|
|
39
|
+
});
|
|
40
|
+
let clock = 0;
|
|
41
|
+
const cooldowns = [];
|
|
42
|
+
let dialogue;
|
|
43
|
+
let dlgT = 0;
|
|
44
|
+
let choice;
|
|
45
|
+
let offButton;
|
|
46
|
+
// a captioned cell holding a centred node
|
|
47
|
+
const cell = (grid, caption, node) => {
|
|
48
|
+
const c = el(grid, "div", "bs-cell");
|
|
49
|
+
const stage = el(c, "div", "bs-stage");
|
|
50
|
+
stage.appendChild(node);
|
|
51
|
+
el(c, "div", "bs-cap", caption);
|
|
52
|
+
};
|
|
53
|
+
// a captioned cell with extra room for a card's floating keycap; returns the stage to mount into
|
|
54
|
+
const cardCell = (grid, caption) => {
|
|
55
|
+
const c = el(grid, "div", "bs-cell");
|
|
56
|
+
const stage = el(c, "div", "bs-stage card");
|
|
57
|
+
el(c, "div", "bs-cap", caption);
|
|
58
|
+
return stage;
|
|
59
|
+
};
|
|
60
|
+
// a generic "icon + name" node — the consumer's OWN content fitted inside a card's fixed slot
|
|
61
|
+
const iconLabel = (name, color) => {
|
|
62
|
+
const { canvas, c } = makeCanvas(20, 20);
|
|
63
|
+
c.fillStyle = color;
|
|
64
|
+
c.beginPath();
|
|
65
|
+
c.moveTo(10, 1);
|
|
66
|
+
c.lineTo(19, 10);
|
|
67
|
+
c.lineTo(10, 19);
|
|
68
|
+
c.lineTo(1, 10);
|
|
69
|
+
c.closePath();
|
|
70
|
+
c.fill();
|
|
71
|
+
const wrap = document.createElement("div");
|
|
72
|
+
wrap.style.cssText = "display:flex;align-items:center;gap:7px;font:800 16px system-ui,sans-serif;";
|
|
73
|
+
const span = document.createElement("span");
|
|
74
|
+
span.textContent = name;
|
|
75
|
+
wrap.append(canvas, span);
|
|
76
|
+
return wrap;
|
|
77
|
+
};
|
|
78
|
+
// --- Solo keycap: every state ------------------------------------------
|
|
79
|
+
g.section("Single button (solo)", "One key. The base states.");
|
|
80
|
+
{
|
|
81
|
+
const grid = el(g.list, "div", "bs-grid");
|
|
82
|
+
cell(grid, "Idle (press A)", createKeycap("A", { animate: false, press }).el);
|
|
83
|
+
cell(grid, "Pulse", createKeycap("A", { animate: true }).el);
|
|
84
|
+
const pressed = createKeycap("A", { animate: false });
|
|
85
|
+
pressed.setPressed(true);
|
|
86
|
+
cell(grid, "Pressed", pressed.el);
|
|
87
|
+
const cd = createKeycap("A", { animate: false });
|
|
88
|
+
cooldowns.push({ kc: cd, total: 5 });
|
|
89
|
+
cell(grid, "Cooldown", cd.el);
|
|
90
|
+
const off = createKeycap("A", { animate: false });
|
|
91
|
+
off.setDisabled(true);
|
|
92
|
+
cell(grid, "Disabled", off.el);
|
|
93
|
+
}
|
|
94
|
+
// --- Full A/B/Y/Z diamond ----------------------------------------------
|
|
95
|
+
g.section("A/B/Y/Z diamond", "All four keys, one active. Colour vs mono, and cooldown.");
|
|
96
|
+
{
|
|
97
|
+
const grid = el(g.list, "div", "bs-grid");
|
|
98
|
+
for (const f of FACES)
|
|
99
|
+
cell(grid, `Active: ${f}`, createKeycap(f, { variant: "full", animate: false }).el);
|
|
100
|
+
cell(grid, "Colour", createKeycap("A", { variant: "full", colored: true, animate: false }).el);
|
|
101
|
+
cell(grid, "Mono", createKeycap("A", { variant: "full", colored: false, animate: false }).el);
|
|
102
|
+
const cd = createKeycap("A", { variant: "full", animate: false });
|
|
103
|
+
cooldowns.push({ kc: cd, total: 6 });
|
|
104
|
+
cell(grid, "Cooldown (on the key)", cd.el);
|
|
105
|
+
}
|
|
106
|
+
// --- Directional buttons -----------------------------------------------
|
|
107
|
+
g.section("Directional buttons", "The same state machine as the face buttons (solo/full, pulse, pressed, cooldown). A white chevron on a steel pip, not the bright key hues.");
|
|
108
|
+
{
|
|
109
|
+
const grid = el(g.list, "div", "bs-grid");
|
|
110
|
+
for (const d of DIRS)
|
|
111
|
+
cell(grid, `Solo: ${d}`, createDpadKeycap(d, { animate: false }).el);
|
|
112
|
+
cell(grid, "Pulse (UP)", createDpadKeycap("UP", { animate: true }).el);
|
|
113
|
+
const pressed = createDpadKeycap("UP", { animate: false });
|
|
114
|
+
pressed.setPressed(true);
|
|
115
|
+
cell(grid, "Pressed (UP)", pressed.el);
|
|
116
|
+
const cd = createDpadKeycap("UP", { animate: false });
|
|
117
|
+
cooldowns.push({ kc: cd, total: 5 });
|
|
118
|
+
cell(grid, "Cooldown (UP)", cd.el);
|
|
119
|
+
cell(grid, "Diamond (UP active)", createDpadKeycap("UP", { variant: "full", animate: false }).el);
|
|
120
|
+
}
|
|
121
|
+
// --- Action card: slot content -----------------------------------------
|
|
122
|
+
g.section("Action card (content slot)", "The frame + the key are provided; the game fills the slot.");
|
|
123
|
+
{
|
|
124
|
+
const grid = el(g.list, "div", "bs-grid");
|
|
125
|
+
const plain = cardCell(grid, "Plain label");
|
|
126
|
+
mountActionCard(plain, "A", { label: "Attack", inline: true, press });
|
|
127
|
+
const custom = cardCell(grid, "Custom (icon + text)");
|
|
128
|
+
const card = mountActionCard(custom, "A", { inline: true, animate: false, press });
|
|
129
|
+
card.setContent(iconLabel("Ember", "#FF7A0C"));
|
|
130
|
+
cooldowns.push({ kc: card.keycap, total: 4 });
|
|
131
|
+
const off = cardCell(grid, "Disabled (action unavailable)");
|
|
132
|
+
const disabled = mountActionCard(off, "A", { label: "Attack", inline: true, animate: false });
|
|
133
|
+
disabled.setDisabled(true);
|
|
134
|
+
}
|
|
135
|
+
// --- the dark card ALONE (no keycap) -----------------------------------
|
|
136
|
+
g.section("Card alone (no key)", "Just a dark padded container, no key. Size it however: hug the content, or fix it. Reuse it for labels, dialogue boxes, etc.");
|
|
137
|
+
{
|
|
138
|
+
const grid = el(g.list, "div", "bs-grid");
|
|
139
|
+
mountCard(cardCell(grid, "Hugs content"), { content: iconLabel("Ember", "#FF7A0C"), inline: true });
|
|
140
|
+
mountCard(cardCell(grid, "Fixed size (200×84)"), { content: iconLabel("Ember", "#FF7A0C"), inline: true, width: 200, height: 84 });
|
|
141
|
+
}
|
|
142
|
+
// --- the dialogue card -------------------------------------------------
|
|
143
|
+
g.section("Dialogue card", "NPC dialogue box: name + line (typewriter) + an A key to continue. The cue flips from ▸ (more) to ✓ (last line). Auto-advances in a loop here.");
|
|
144
|
+
{
|
|
145
|
+
const stage = el(g.list, "div", "bs-dialog");
|
|
146
|
+
dialogue = mountDialogueCard(stage, { inline: true, press });
|
|
147
|
+
dialogue.open("Master Orsane", DLG_LINES);
|
|
148
|
+
}
|
|
149
|
+
// --- the choice card ---------------------------------------------------
|
|
150
|
+
g.section("Choice card (player menu)", "The PLAYER's menu: name + question + a list of options. ▲▼ move the (clamped) selection, and the A key sits to the right of the active option and follows it. Arrows show only on the active option.");
|
|
151
|
+
{
|
|
152
|
+
const stage = el(g.list, "div", "bs-dialog");
|
|
153
|
+
const status = el(g.list, "div", "bs-cap");
|
|
154
|
+
choice = mountChoiceCard(stage, { inline: true, press });
|
|
155
|
+
choice.open({
|
|
156
|
+
name: "Player",
|
|
157
|
+
prompt: CHOICE_PROMPT,
|
|
158
|
+
options: CHOICE_OPTIONS,
|
|
159
|
+
onConfirm: (_i, label) => { status.textContent = `Confirmed: ${label}`; },
|
|
160
|
+
});
|
|
161
|
+
if (session) {
|
|
162
|
+
offButton = session.onButton((e) => {
|
|
163
|
+
if (e.edge !== "down" || !choice)
|
|
164
|
+
return;
|
|
165
|
+
if (e.name === "UP")
|
|
166
|
+
choice.moveBy(-1);
|
|
167
|
+
else if (e.name === "DOWN")
|
|
168
|
+
choice.moveBy(1);
|
|
169
|
+
else if (e.name === "A")
|
|
170
|
+
choice.confirm();
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
status.textContent = "(pass a session to drive ▲▼ / A)";
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// --- the WHOLE move diamond --------------------------------------------
|
|
178
|
+
g.section("Move diamond (HUD)", "The A/B/Y/Z diamond: Z left · Y+B stacked centre · A right. Four content cards. A = selected, Z = cooling, B = disabled. Press the keys → the card sinks.");
|
|
179
|
+
{
|
|
180
|
+
const stage = el(g.list, "div", "bs-diamond");
|
|
181
|
+
const dia = mountActionDiamond(stage, { press, cards: { Y: { label: "Spark" }, A: { label: "Quake" }, B: {}, Z: { label: "Blaze" } } });
|
|
182
|
+
dia.cards.A.setActive(true);
|
|
183
|
+
cooldowns.push({ kc: dia.cards.Z.keycap, total: 6 });
|
|
184
|
+
dia.cards.B.setDisabled(true);
|
|
185
|
+
}
|
|
186
|
+
g.section("Move diamond (HUD) — mono", "The same diamond in mono: white keys with a dark letter instead of the bright hues. Same states.");
|
|
187
|
+
{
|
|
188
|
+
const stage = el(g.list, "div", "bs-diamond");
|
|
189
|
+
const dia = mountActionDiamond(stage, { press, colored: false, cards: { Y: { label: "Spark" }, A: { label: "Quake" }, B: {}, Z: { label: "Blaze" } } });
|
|
190
|
+
dia.cards.A.setActive(true);
|
|
191
|
+
cooldowns.push({ kc: dia.cards.Z.keycap, total: 6 });
|
|
192
|
+
dia.cards.B.setDisabled(true);
|
|
193
|
+
}
|
|
194
|
+
// --- the labeled diamond -----------------------------------------------
|
|
195
|
+
g.section("Labeled diamond", "A central A/B/Y/Z pip cluster, any number of buttons active at once, each label radiating from its key (Y above, B below, Z left, A right) and seated in the dark card. Toggle disables the Y action.");
|
|
196
|
+
{
|
|
197
|
+
const cellWrap = el(g.list, "div", "bs-cell ld-cell");
|
|
198
|
+
const stage = el(cellWrap, "div", "bs-ld");
|
|
199
|
+
const ld = mountLabeledDiamond(stage, { inline: true, actions: { Y: "Inspect", A: "Equip", B: "Inventory" } });
|
|
200
|
+
let disabled = false;
|
|
201
|
+
const btn = el(cellWrap, "button", "bs-btn");
|
|
202
|
+
const sync = () => {
|
|
203
|
+
ld.setDisabled("Y", disabled);
|
|
204
|
+
btn.textContent = disabled ? "Enable “Inspect”" : "Disable “Inspect”";
|
|
205
|
+
};
|
|
206
|
+
btn.addEventListener("click", () => { disabled = !disabled; sync(); });
|
|
207
|
+
sync();
|
|
208
|
+
}
|
|
209
|
+
g.run({
|
|
210
|
+
session,
|
|
211
|
+
perFrame: (dt) => {
|
|
212
|
+
clock += dt;
|
|
213
|
+
for (const { kc, total } of cooldowns) {
|
|
214
|
+
const phase = clock % (total + READY_HOLD);
|
|
215
|
+
if (phase < total)
|
|
216
|
+
kc.setCooldown((total - phase) / total, Math.ceil(total - phase));
|
|
217
|
+
else
|
|
218
|
+
kc.setCooldown(null);
|
|
219
|
+
}
|
|
220
|
+
dlgT += dt;
|
|
221
|
+
if (dialogue && dlgT >= DLG_STEP) {
|
|
222
|
+
dlgT = 0;
|
|
223
|
+
if (!dialogue.advance())
|
|
224
|
+
dialogue.open("Master Orsane", DLG_LINES);
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
dispose: () => {
|
|
230
|
+
offButton?.();
|
|
231
|
+
choice?.dispose();
|
|
232
|
+
dialogue?.dispose();
|
|
233
|
+
g.dispose();
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
const BS_CSS = `
|
|
238
|
+
.bs-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
|
|
239
|
+
.bs-cell { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
|
|
240
|
+
border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
|
|
241
|
+
.bs-stage { min-height: 96px; display: flex; align-items: flex-end; justify-content: center; padding: 14px 0 22px; }
|
|
242
|
+
.bs-stage.card { min-height: 120px; padding-bottom: 42px; }
|
|
243
|
+
.bs-cap { font-size: 0.8rem; font-weight: 700; opacity: 0.8; text-align: center; }
|
|
244
|
+
.bs-diamond { position: relative; width: 100%; height: min(64vh, 480px);
|
|
245
|
+
background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
|
|
246
|
+
border-radius: 16px; padding: 1.25rem; box-sizing: border-box; }
|
|
247
|
+
.bs-dialog { display: flex; justify-content: center; padding: 1.5rem 0 2.5rem; }
|
|
248
|
+
.ld-cell { grid-column: 1 / -1; }
|
|
249
|
+
.bs-ld { display: flex; justify-content: center; width: 100%; min-height: 220px; }
|
|
250
|
+
.bs-btn { margin-top: 4px; padding: 7px 14px; border-radius: 10px; cursor: pointer;
|
|
251
|
+
font: 700 0.82rem system-ui, sans-serif; color: #eef4ff;
|
|
252
|
+
background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.18); }
|
|
253
|
+
.bs-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
|
|
254
|
+
`;
|
|
255
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/showcase/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,GAMpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AAI7E,MAAM,KAAK,GAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACnD,MAAM,IAAI,GAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1D,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,uEAAuE;AAC7F,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,qDAAqD;AAE3E,MAAM,SAAS,GAAG;IAChB,6IAA6I;IAC7I,cAAc;IACd,+GAA+G;IAC/G,cAAc;IACd,4HAA4H;IAC5H,YAAY;CACb,CAAC;AACF,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAC3D,MAAM,cAAc,GAAG,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,cAAc,CAAC,CAAC;AAgBpF,mGAAmG;AACnG,MAAM,UAAU,eA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E,EAAE,EAAE;YACf,KAAK,IAAI,EAAE,CAAC;YACZ,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,SAAS,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC;gBAC3C,IAAI,KAAK,GAAG,KAAK;oBAAE,EAAE,CAAC,WAAW,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;;oBAChF,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YACD,IAAI,IAAI,EAAE,CAAC;YACX,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;gBACjC,IAAI,GAAG,CAAC,CAAC;gBACT,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;oBAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,GAAG,EAAE;YACZ,SAAS,EAAE,EAAE,CAAC;YACd,MAAM,EAAE,OAAO,EAAE,CAAC;YAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;YACpB,CAAC,CAAC,OAAO,EAAE,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;CAiBd,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared scoped `.rydr-ui-*` CSS for the controller-button UI (keycap · card · action card · action
|
|
3
|
+
* diamond · dialogue · choice · labeled diamond), injected once into <head>. Self-contained, like the
|
|
4
|
+
* perf-overlay: it injects no global styles and depends on no CSS variables, so any game gets the look
|
|
5
|
+
* just by constructing a component. Keep it dependency-free.
|
|
6
|
+
*
|
|
7
|
+
* The font sizes, paddings, and dimensions here are TUNED FOR A TRAINER SCREEN read from a few feet
|
|
8
|
+
* away while pedaling — they are part of the component contract, not defaults to be overridden.
|
|
9
|
+
* Consumers fill the content slot; they must not restyle the `.rydr-ui-*` type/sizing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function injectCss(): void;
|
|
12
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,wBAAgB,SAAS,IAAI,IAAI,CAOhC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared scoped `.rydr-ui-*` CSS for the controller-button UI (keycap · card · action card · action
|
|
3
|
+
* diamond · dialogue · choice · labeled diamond), injected once into <head>. Self-contained, like the
|
|
4
|
+
* perf-overlay: it injects no global styles and depends on no CSS variables, so any game gets the look
|
|
5
|
+
* just by constructing a component. Keep it dependency-free.
|
|
6
|
+
*
|
|
7
|
+
* The font sizes, paddings, and dimensions here are TUNED FOR A TRAINER SCREEN read from a few feet
|
|
8
|
+
* away while pedaling — they are part of the component contract, not defaults to be overridden.
|
|
9
|
+
* Consumers fill the content slot; they must not restyle the `.rydr-ui-*` type/sizing.
|
|
10
|
+
*/
|
|
11
|
+
let cssInjected = false;
|
|
12
|
+
export function injectCss() {
|
|
13
|
+
if (cssInjected || document.getElementById("rydr-ui-css")) {
|
|
14
|
+
cssInjected = true;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const style = document.createElement("style");
|
|
18
|
+
style.id = "rydr-ui-css";
|
|
19
|
+
style.textContent = CSS;
|
|
20
|
+
document.head.appendChild(style);
|
|
21
|
+
cssInjected = true;
|
|
22
|
+
}
|
|
23
|
+
const CSS = `
|
|
24
|
+
.rydr-ui-root { position: fixed; left: 50%; bottom: 96px; z-index: 40; pointer-events: none;
|
|
25
|
+
transform: translateX(-50%); opacity: 0; transition: opacity 0.18s; }
|
|
26
|
+
.rydr-ui-root.inline { position: relative; left: auto; bottom: auto; transform: none; opacity: 1; display: inline-block; }
|
|
27
|
+
/* the dark action card holding the content slot */
|
|
28
|
+
.rydr-ui-card { position: relative; padding: 10px 20px 12px; border-radius: 12px; background: rgba(8,14,24,0.7);
|
|
29
|
+
border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0,0,0,0.4);
|
|
30
|
+
color: #eef4ff; text-align: center; }
|
|
31
|
+
/* the card is JUST a dark container with padding — it hugs its content by default. A consumer can fix
|
|
32
|
+
the size via the width/height options (→ .rydr-ui-card.fixed) and the content then centres inside. */
|
|
33
|
+
.rydr-ui-card.fixed { box-sizing: border-box; }
|
|
34
|
+
.rydr-ui-card.fixed > .rydr-ui-card-body { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
|
|
35
|
+
/* inside the diamond, cards are a CONSTANT fixed-size frame (uniform), content centred. */
|
|
36
|
+
.rydr-ui-dia .rydr-ui-card-body { width: 150px; min-height: 52px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
|
|
37
|
+
/* a string label gets the bold, centred, 2-line-clamped "ATTAQUER" look; custom content styles itself. */
|
|
38
|
+
.rydr-ui-card-lbl { font: 800 20px system-ui, sans-serif; letter-spacing: 0.04em;
|
|
39
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
40
|
+
line-height: 1.12; text-align: center; overflow-wrap: anywhere; }
|
|
41
|
+
/* the action-card keycap (a DIRECT child of the card) floats over the card, straddling its bottom edge.
|
|
42
|
+
Direct-child selector so keycaps nested inside the body (e.g. the dialogue card's corner) are NOT pinned. */
|
|
43
|
+
.rydr-ui-card > .rydr-ui-diamond { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 65%); }
|
|
44
|
+
.rydr-ui-diamond { position: relative; }
|
|
45
|
+
|
|
46
|
+
/* DIALOGUE CARD — speaker name + typed line + a continue cue (▸ / ✓) and keycap, inside the dark card */
|
|
47
|
+
.rydr-ui-dlg { width: min(720px, 90vw); text-align: left; }
|
|
48
|
+
.rydr-ui-dlg-name { color: #ffe27a; font: 800 22px system-ui, sans-serif; letter-spacing: 0.01em; margin-bottom: 10px; }
|
|
49
|
+
.rydr-ui-dlg-line { color: #eef4ff; font: 600 26px system-ui, sans-serif; line-height: 1.4; min-height: 2.8em; }
|
|
50
|
+
.rydr-ui-dlg-go { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
|
|
51
|
+
.rydr-ui-dlg-cue { color: rgba(255,255,255,0.6); font: 800 22px system-ui, sans-serif; }
|
|
52
|
+
|
|
53
|
+
/* CHOICE CARD — player menu: speaker name + optional prompt + a highlighted option list (▲▼ move, A confirm) */
|
|
54
|
+
.rydr-ui-choice { width: min(720px, 90vw); text-align: left; }
|
|
55
|
+
/* the conversation cards (NPC discussion + player choice) use even padding on all sides — the shared
|
|
56
|
+
.rydr-ui-card is asymmetric to seat a straddling keycap, which neither of these cards has. */
|
|
57
|
+
.rydr-ui-card:has(> .rydr-ui-card-body > .rydr-ui-choice),
|
|
58
|
+
.rydr-ui-card:has(> .rydr-ui-card-body > .rydr-ui-dlg) { padding: 20px; }
|
|
59
|
+
.rydr-ui-choice-name { color: #ffe27a; font: 800 22px system-ui, sans-serif; letter-spacing: 0.01em; margin-bottom: 10px; }
|
|
60
|
+
.rydr-ui-choice-prompt { color: #eef4ff; font: 600 24px system-ui, sans-serif; line-height: 1.35; margin-bottom: 14px;
|
|
61
|
+
overflow-wrap: anywhere; }
|
|
62
|
+
.rydr-ui-choice-list { display: flex; flex-direction: column; gap: 10px; }
|
|
63
|
+
/* an option row: a soft pill (accent-highlighted when selected). The row is tall enough to seat two
|
|
64
|
+
stacked arrows, and reserves a left gutter (.has-arrows) so labels stay aligned whether or not the
|
|
65
|
+
arrow guide is showing on this row. */
|
|
66
|
+
.rydr-ui-choice-opt { position: relative; display: flex; align-items: center; min-height: 52px; padding: 12px 18px;
|
|
67
|
+
border-radius: 12px; border: 2px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04);
|
|
68
|
+
color: #dfe7f3; transition: border-color 0.12s, background 0.12s, color 0.12s, padding-left 0.1s ease, padding-right 0.1s ease; }
|
|
69
|
+
/* only the SELECTED row opens a left gutter for the arrows; it pushes right quickly to make the room */
|
|
70
|
+
.rydr-ui-choice-opt.has-arrows.selected { padding-left: 60px; }
|
|
71
|
+
/* the confirm A keycap parks on the right of the selected row, so reserve room for it there */
|
|
72
|
+
.rydr-ui-choice-opt.selected { padding-right: 58px; }
|
|
73
|
+
.rydr-ui-choice-opt > .rydr-ui-diamond { position: absolute; right: 14px; top: 50%; transform: translateY(calc(-50% - 2px)); }
|
|
74
|
+
/* lift the selected row so its arrow gutter (which overflows the short row) paints ABOVE the rows below */
|
|
75
|
+
.rydr-ui-choice-opt.selected { border-color: rgba(255,226,122,0.85); background: rgba(255,226,122,0.1); color: #ffe27a; z-index: 2; }
|
|
76
|
+
/* the left gutter is ABSOLUTE so showing/hiding arrows never shifts the label; only the selected row's
|
|
77
|
+
gutter is populated. Arrow keycaps stack (UP over DOWN), centred in the gutter. */
|
|
78
|
+
.rydr-ui-choice-arrows { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 44px;
|
|
79
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
|
|
80
|
+
.rydr-ui-choice-label { flex: 1 1 auto; font: 700 24px system-ui, sans-serif; overflow-wrap: anywhere; }
|
|
81
|
+
|
|
82
|
+
.rydr-ui-pip { position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center;
|
|
83
|
+
color: #0c1014; font-family: system-ui, sans-serif;
|
|
84
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, var(--c) 60%);
|
|
85
|
+
box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000), 0 5px 9px rgba(0,0,0,0.45);
|
|
86
|
+
transition: transform 0.08s ease, box-shadow 0.08s ease; }
|
|
87
|
+
.rydr-ui-pip-letter { font-weight: 800; line-height: 1; font-size: 0; position: relative; z-index: 2; }
|
|
88
|
+
/* directional glyph (chevron/caret/arrow) — drawn pointing up, rotated per position, dark like a letter */
|
|
89
|
+
.rydr-ui-pip-glyph { display: block; position: relative; z-index: 2; }
|
|
90
|
+
/* in the full diamond, the idle siblings sit pressed-in (shorter) so the active button reads as raised */
|
|
91
|
+
.rydr-ui-pip:not(.active) { transform: translateY(2px);
|
|
92
|
+
box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 50%, #000), inset 0 1px 2px rgba(0,0,0,0.45); }
|
|
93
|
+
.rydr-ui-pip.anim { animation: rydr-ui-pulse 1.6s ease-in-out infinite; }
|
|
94
|
+
/* pressed sink — opposite of the pulse's lift */
|
|
95
|
+
.rydr-ui-pip.pressed { transform: translateY(3px);
|
|
96
|
+
box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 55%, #000), 0 2px 4px rgba(0,0,0,0.45); }
|
|
97
|
+
.rydr-ui-pip.pressed.anim { animation: none; }
|
|
98
|
+
|
|
99
|
+
/* COOLDOWN — while recharging the button goes greyed + pushed-in ("spent"), with a circular loader
|
|
100
|
+
inside the rim and a centred countdown number. */
|
|
101
|
+
.rydr-ui-ring { position: absolute; inset: 2px; border-radius: 50%; z-index: 3; display: none;
|
|
102
|
+
background: conic-gradient(var(--c) calc(var(--cd, 0) * 360deg), rgba(255,255,255,0.16) 0);
|
|
103
|
+
-webkit-mask: radial-gradient(closest-side, transparent 70%, #000 72%);
|
|
104
|
+
mask: radial-gradient(closest-side, transparent 70%, #000 72%); }
|
|
105
|
+
.rydr-ui-cd-num { position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center;
|
|
106
|
+
font: 800 18px system-ui, sans-serif; color: #eef4ff; }
|
|
107
|
+
|
|
108
|
+
.rydr-ui-pip.cooling { animation: none; transform: translateY(3px);
|
|
109
|
+
background: linear-gradient(180deg, #555d6b 0%, #3a414d 60%);
|
|
110
|
+
box-shadow: 0 1px 0 #20242d, 0 2px 5px rgba(0,0,0,0.4); }
|
|
111
|
+
.rydr-ui-pip.cooling .rydr-ui-pip-letter,
|
|
112
|
+
.rydr-ui-pip.cooling .rydr-ui-pip-glyph { display: none; }
|
|
113
|
+
.rydr-ui-pip.cooling .rydr-ui-ring { display: block; }
|
|
114
|
+
.rydr-ui-pip.cooling .rydr-ui-cd-num { display: flex; }
|
|
115
|
+
|
|
116
|
+
/* DISABLED — the action is unavailable. The CARD fades (frame + content read at ~50%), but the
|
|
117
|
+
floating keycap stays crisp — opacity can't be undone in children, so we dim the card's frame via
|
|
118
|
+
alpha + fade only its body, NOT the whole card, leaving the keycap to carry its OWN inert style.
|
|
119
|
+
The button reads as inert: flat grey, no pulse, no raised lip, letter dimmed. Distinct from
|
|
120
|
+
"cooling" (spent + recharging, with a ring). */
|
|
121
|
+
.rydr-ui-card.disabled { background: rgba(8,14,24,0.35); border-color: rgba(255,255,255,0.07);
|
|
122
|
+
box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
|
|
123
|
+
.rydr-ui-card.disabled > .rydr-ui-card-body { opacity: 0.5; }
|
|
124
|
+
.rydr-ui-pip.disabled { animation: none; transform: none;
|
|
125
|
+
background: linear-gradient(180deg, #4a515c 0%, #3a414d 60%);
|
|
126
|
+
box-shadow: 0 2px 0 #20242d, 0 2px 4px rgba(0,0,0,0.3); }
|
|
127
|
+
.rydr-ui-pip.disabled .rydr-ui-pip-letter,
|
|
128
|
+
.rydr-ui-pip.disabled .rydr-ui-pip-glyph { opacity: 0.35; color: #fff; }
|
|
129
|
+
|
|
130
|
+
/* the A/B/Y/Z move diamond — Z left · Y+B stacked in the centre column · A right. A centred grid that
|
|
131
|
+
sizes to its content, so the cluster takes only the room it needs and stays centred in any container. */
|
|
132
|
+
.rydr-ui-dia { display: grid; width: 100%; height: 100%; min-height: 240px; box-sizing: border-box;
|
|
133
|
+
grid-template-columns: auto auto auto; grid-template-rows: auto auto;
|
|
134
|
+
justify-content: center; align-content: center; justify-items: center; align-items: center;
|
|
135
|
+
column-gap: 10px; row-gap: 40px; }
|
|
136
|
+
.rydr-ui-dia .rydr-ui-dia-card.pos-lft { grid-column: 1; grid-row: 1 / span 2; }
|
|
137
|
+
.rydr-ui-dia .rydr-ui-dia-card.pos-top { grid-column: 2; grid-row: 1; }
|
|
138
|
+
.rydr-ui-dia .rydr-ui-dia-card.pos-bot { grid-column: 2; grid-row: 2; }
|
|
139
|
+
.rydr-ui-dia .rydr-ui-dia-card.pos-rgt { grid-column: 3; grid-row: 1 / span 2; }
|
|
140
|
+
.rydr-ui-dia-card.active .rydr-ui-card { border-color: rgba(255,226,122,0.85); background: rgba(255,226,122,0.14); }
|
|
141
|
+
|
|
142
|
+
/* LABELED DIAMOND (mountLabeledDiamond) — a central A/B/Y/Z pip cluster with a label radiating from
|
|
143
|
+
each active button. Outer 3×3 grid: cluster in the centre, one label cell per direction (each with
|
|
144
|
+
its own outward alignment). .rydr-ui-ld-host is the placement shell: an absolute overlay by default
|
|
145
|
+
(driven by setScreenPos), or inline + full-width when .inline. */
|
|
146
|
+
.rydr-ui-ld-host { position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 30; }
|
|
147
|
+
.rydr-ui-ld-host.inline { position: relative; transform: none; width: 100%; pointer-events: auto; }
|
|
148
|
+
.rydr-ui-ld-wrap { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 1fr auto 1fr;
|
|
149
|
+
align-items: center; justify-items: center; gap: 0; box-sizing: border-box; }
|
|
150
|
+
.rydr-ui-ld-host:not(.inline) .rydr-ui-ld-wrap { width: max-content; }
|
|
151
|
+
.rydr-ui-ld-host.inline .rydr-ui-ld-wrap { width: 100%; min-height: 210px; padding: 8px 0; }
|
|
152
|
+
/* the pip cluster: four absolutely-placed pips packed into a tight, nearly-touching losange. (CSS gap
|
|
153
|
+
can't go negative, so we position by hand to pull the buttons right up against each other.) Lifted
|
|
154
|
+
above the labels so a button can overlap (sit on top of) the card pulled in beneath it. */
|
|
155
|
+
.rydr-ui-ld-cluster { grid-area: 2 / 2; position: relative; width: 110px; height: 100px; z-index: 3; }
|
|
156
|
+
.rydr-ui-ld-cluster .rydr-ui-pip { position: absolute; width: 40px; height: 40px; }
|
|
157
|
+
.rydr-ui-ld-cluster .pos-top { left: 35px; top: 0; }
|
|
158
|
+
.rydr-ui-ld-cluster .pos-bot { left: 35px; top: 60px; }
|
|
159
|
+
.rydr-ui-ld-cluster .pos-lft { left: 0; top: 30px; }
|
|
160
|
+
.rydr-ui-ld-cluster .pos-rgt { left: 70px; top: 30px; }
|
|
161
|
+
/* labels seat in the outer cell matching their button, snug against the cluster + aligned outward.
|
|
162
|
+
Each label is pulled under its button so the button overlaps it, and kept BELOW the button (the
|
|
163
|
+
cluster outranks it). Top/bottom sit a touch further out, left/right a touch closer. */
|
|
164
|
+
.rydr-ui-ld-lbl-top { grid-area: 1 / 2; align-self: end; text-align: center; margin-bottom: -14px; }
|
|
165
|
+
.rydr-ui-ld-lbl-bot { grid-area: 3 / 2; align-self: start; text-align: center; margin-top: -14px; }
|
|
166
|
+
.rydr-ui-ld-lbl-lft { grid-area: 2 / 1; justify-self: end; text-align: right; margin-right: -22px; }
|
|
167
|
+
.rydr-ui-ld-lbl-rgt { grid-area: 2 / 3; justify-self: start; text-align: left; margin-left: -22px; }
|
|
168
|
+
.rydr-ui-ld-lbl { position: relative; z-index: 1; }
|
|
169
|
+
/* short action verbs — keep them on one line so the side labels don't get squeezed into a wrap */
|
|
170
|
+
.rydr-ui-ld-lbl { white-space: nowrap; }
|
|
171
|
+
.rydr-ui-ld-lbl .rydr-ui-card-lbl { white-space: nowrap; display: block; -webkit-line-clamp: initial; }
|
|
172
|
+
/* a disabled action's label fades back (the pip carries its own inert grey via .rydr-ui-pip.disabled) */
|
|
173
|
+
.rydr-ui-ld-lbl-off { opacity: 0.4; transition: opacity 0.12s; }
|
|
174
|
+
|
|
175
|
+
@keyframes rydr-ui-pulse {
|
|
176
|
+
0%,100% { transform: translateY(0);
|
|
177
|
+
box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000), 0 7px 12px rgba(0,0,0,0.5),
|
|
178
|
+
0 0 16px 1px rgba(0,0,0,0.6); }
|
|
179
|
+
50% { transform: translateY(-5px);
|
|
180
|
+
box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000), 0 7px 12px rgba(0,0,0,0.5),
|
|
181
|
+
0 0 30px 7px rgba(0,0,0,0.6); } }
|
|
182
|
+
`;
|
|
183
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,UAAU,SAAS;IACvB,IAAI,WAAW,IAAI,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;QAAC,WAAW,GAAG,IAAI,CAAC;QAAC,OAAO;IAAC,CAAC;IAC1F,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,aAAa,CAAC;IACzB,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+JX,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rydr/game-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/bdefrenne/rydr-game-sdk.git"
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"./three": {
|
|
20
20
|
"types": "./dist/three/index.d.ts",
|
|
21
21
|
"import": "./dist/three/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./ui": {
|
|
24
|
+
"types": "./dist/ui/index.d.ts",
|
|
25
|
+
"import": "./dist/ui/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./ui/showcase": {
|
|
28
|
+
"types": "./dist/ui/showcase/index.d.ts",
|
|
29
|
+
"import": "./dist/ui/showcase/index.js"
|
|
22
30
|
}
|
|
23
31
|
},
|
|
24
32
|
"main": "./dist/index.js",
|
|
@@ -32,6 +40,8 @@
|
|
|
32
40
|
"dev": "tsc -w -p tsconfig.json",
|
|
33
41
|
"clean": "rm -rf dist",
|
|
34
42
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
43
|
+
"showcase": "npm run build && vite examples/ui",
|
|
44
|
+
"showcase:build": "npm run build && vite build examples/ui",
|
|
35
45
|
"preversion": "node scripts/check-changelog.mjs",
|
|
36
46
|
"version": "node scripts/sync-version.mjs && node scripts/release-changelog.mjs && git add src/protocol/version.ts CHANGELOG.md",
|
|
37
47
|
"postversion": "git push --follow-tags"
|
|
@@ -47,6 +57,7 @@
|
|
|
47
57
|
"devDependencies": {
|
|
48
58
|
"@types/three": "^0.184.0",
|
|
49
59
|
"three": "^0.184.0",
|
|
50
|
-
"typescript": "^5.5.0"
|
|
60
|
+
"typescript": "^5.5.0",
|
|
61
|
+
"vite": "^6.0.0"
|
|
51
62
|
}
|
|
52
63
|
}
|