@novely/solid-renderer 0.0.2 → 0.0.4

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.
@@ -0,0 +1,8 @@
1
+ import type { FlowComponent, Accessor } from 'solid-js';
2
+ interface ModalProps {
3
+ isOpen: Accessor<boolean>;
4
+ setIsOpen?: (value: boolean) => void;
5
+ onClose?: () => void;
6
+ }
7
+ declare const Modal: FlowComponent<ModalProps>;
8
+ export { Modal };
package/dist/index.jsx CHANGED
@@ -31,9 +31,6 @@ var canvasDrawImages = (canvas = document.createElement("canvas"), ctx = canvas.
31
31
  var url = (str) => {
32
32
  return `url(${str})`;
33
33
  };
34
- var join = (...elements) => {
35
- return elements.filter(Boolean).join(" ");
36
- };
37
34
 
38
35
  // src/context/index.tsx
39
36
  import { from, createContext, useContext } from "solid-js";
@@ -56,43 +53,7 @@ var useData = () => {
56
53
  };
57
54
 
58
55
  // src/screens/game.tsx
59
- import { createEffect, createSignal, untrack, For, Show } from "solid-js";
60
-
61
- // esbuild-css-modules-plugin-namespace:./src/styles/root.module.css?esbuild-css-modules-plugin-building
62
- var root_module_default = { "root": "n-root" };
63
-
64
- // esbuild-css-modules-plugin-namespace:./src/styles/button.module.css?esbuild-css-modules-plugin-building
65
- var button_module_default = { "button": "n-button", "buttonControlPanel": "n-buttonControlPanel", "buttonInputDialogPanel": "n-buttonInputDialogPanel", "buttonMainMenu": "n-buttonMainMenu", "buttonSaves": "n-buttonSaves", "buttonSavesDelete": "n-buttonSavesDelete", "buttonSettings": "n-buttonSettings" };
66
-
67
- // esbuild-css-modules-plugin-namespace:./src/styles/characters.module.css?esbuild-css-modules-plugin-building
68
- var characters_module_default = { "characters": "n-characters" };
69
-
70
- // esbuild-css-modules-plugin-namespace:./src/styles/dialog.module.css?esbuild-css-modules-plugin-building
71
- var dialog_module_default = { "dialog": "n-dialog", "dialogContainer": "n-dialogContainer", "dialogContainerWithPerson": "n-dialogContainerWithPerson", "dialogContent": "n-dialogContent", "dialogName": "n-dialogName", "dialogPerson": "n-dialogPerson", "pers": "n-pers", "text": "n-text" };
72
-
73
- // esbuild-css-modules-plugin-namespace:./src/styles/headlessDialog.module.css?esbuild-css-modules-plugin-building
74
- var headlessDialog_module_default = { "headlessDialog": "n-headlessDialog", "headlessDialogContainer": "n-headlessDialogContainer", "headlessDialogFix": "n-headlessDialogFix", "headlessDialogPanel": "n-headlessDialogPanel", "headlessDialogPanelLabel": "n-headlessDialogPanelLabel", "inputDialogLabel": "n-inputDialogLabel", "inputDialogPanel": "n-inputDialogPanel" };
75
-
76
- // esbuild-css-modules-plugin-namespace:./src/styles/mainMenu.module.css?esbuild-css-modules-plugin-building
77
- var mainMenu_module_default = { "controls": "n-controls", "mainMenu": "n-mainMenu" };
78
-
79
- // esbuild-css-modules-plugin-namespace:./src/styles/saves.module.css?esbuild-css-modules-plugin-building
80
- var saves_module_default = { "controls": "n-controls", "list": "n-list", "saves": "n-saves" };
81
-
82
- // esbuild-css-modules-plugin-namespace:./src/styles/controlPanel.module.css?esbuild-css-modules-plugin-building
83
- var controlPanel_module_default = { "controlPanel": "n-controlPanel" };
84
-
85
- // esbuild-css-modules-plugin-namespace:./src/styles/settings.module.css?esbuild-css-modules-plugin-building
86
- var settings_module_default = { "content": "n-content", "controls": "n-controls", "select": "n-select", "settings": "n-settings" };
87
-
88
- // esbuild-css-modules-plugin-namespace:./src/styles/loading.module.css?esbuild-css-modules-plugin-building
89
- var loading_module_default = { "ldsEllipsis": "n-lds-ellipsis", "ldsEllipsis1": "n-lds-ellipsis1", "ldsEllipsis2": "n-lds-ellipsis2", "ldsEllipsis3": "n-lds-ellipsis3", "loading": "n-loading" };
90
-
91
- // esbuild-css-modules-plugin-namespace:./src/styles/fullscreenText.module.css?esbuild-css-modules-plugin-building
92
- var fullscreenText_module_default = { "fullscreenText": "n-fullscreenText" };
93
-
94
- // src/styles/styles.ts
95
- Object.assign(root_module_default, button_module_default, characters_module_default, dialog_module_default, headlessDialog_module_default, mainMenu_module_default, saves_module_default, controlPanel_module_default, settings_module_default, loading_module_default, fullscreenText_module_default);
56
+ import { createEffect as createEffect2, createSignal, untrack as untrack2, For, Show as Show2 } from "solid-js";
96
57
 
97
58
  // src/components/DialogName.tsx
98
59
  var DialogName = (props) => {
@@ -102,7 +63,7 @@ var DialogName = (props) => {
102
63
  return c ? c in cs ? cs[c].color : "#000" : "#000";
103
64
  };
104
65
  return <span
105
- class={root_module_default.dialogName}
66
+ class="action-dialog-name"
106
67
  style={{
107
68
  color: color(),
108
69
  opacity: props.character ? 1 : 0,
@@ -120,29 +81,71 @@ var Character = (props) => {
120
81
  return canvas();
121
82
  };
122
83
 
123
- // src/screens/game.tsx
124
- import { Dialog, DialogPanel } from "solid-headless";
84
+ // src/components/Modal.tsx
85
+ import { untrack, createEffect, on, onCleanup, Show } from "solid-js";
86
+ var clickOutside = (node, handler) => {
87
+ const handleClick = (event) => node && !node.contains(event.target) && !event.defaultPrevented && handler && handler();
88
+ document.addEventListener("click", handleClick, true);
89
+ onCleanup(() => document.removeEventListener("click", handleClick, true));
90
+ };
91
+ var Modal = (props) => {
92
+ let modalWindow;
93
+ const handleKeydown = (event) => {
94
+ if (untrack(props.isOpen) && event.key === "Tab") {
95
+ const nodes = modalWindow.querySelectorAll("*");
96
+ const tabbable = Array.from(nodes).filter((node) => node.tabIndex >= 0);
97
+ let index = tabbable.indexOf(document.activeElement);
98
+ if (index === -1 && event.shiftKey)
99
+ index = 0;
100
+ index += tabbable.length + (event.shiftKey ? -1 : 1);
101
+ index %= tabbable.length;
102
+ tabbable[index].focus();
103
+ event.preventDefault();
104
+ }
105
+ };
106
+ const close = () => {
107
+ props.setIsOpen && props.setIsOpen(false);
108
+ props.onClose && untrack(props.onClose);
109
+ };
110
+ createEffect(on(props.isOpen, (isOpen) => isOpen && props.onClose && untrack(props.onClose), { defer: true }));
111
+ addEventListener("keydown", handleKeydown);
112
+ onCleanup(() => removeEventListener("keydown", handleKeydown));
113
+ return <Show when={props.isOpen()}><div
114
+ role="dialog"
115
+ class="dialog"
116
+ aria-modal={true}
117
+ ref={(element) => {
118
+ modalWindow = element;
119
+ clickOutside(element, close);
120
+ }}
121
+ >{props.children}</div></Show>;
122
+ };
125
123
 
126
124
  // ../typewriter/dist/index.js
127
- var M = (h, m, c, T = () => Math.min(90 * Math.random() + 100, 90)) => {
128
- let p, e = document.createElement("span");
125
+ var b = () => Math.min(90 * Math.random() + 100, 90);
126
+ var v = ({ node: N, text: m, ended: c, speed: T = b }) => {
127
+ let e = document.createElement("span");
129
128
  e.innerHTML = m;
130
- let o = (a, f) => {
129
+ let l = (t, M) => {
131
130
  let d = [];
132
- return a.childNodes.forEach((n) => {
133
- n.nodeName === "#text" && (d.push(n), f && (n.textContent = "")), d.push(...o(n, f));
131
+ return t.childNodes.forEach((s) => {
132
+ s.nodeName === "#text" && (d.push(s), M && (s.textContent = "")), d.push(...l(s, M));
134
133
  }), d;
135
- }, r = o(e.cloneNode(true), false).map((a) => [...a.textContent]), C = o(e, true);
136
- h.appendChild(e);
137
- let t = 0, s = 0, l = false, i = () => {
138
- clearTimeout(p);
139
- }, u = () => {
140
- r[t]?.length > s ? (C[t].textContent += r[t][s++], setTimeout(u, T())) : t++ < r.length ? (s = 0, u()) : (l = true, c && (p = setTimeout(c, 790)));
134
+ }, u = l(e.cloneNode(true), false).map((t) => [...t.textContent]), q = l(e, true);
135
+ N.appendChild(e);
136
+ let n = 0, a = 0, r = false, p, i = () => {
137
+ p = requestAnimationFrame(x);
138
+ }, o = () => {
139
+ cancelAnimationFrame(p);
140
+ }, f = 0, h = 0, x = (t) => {
141
+ t >= h + f ? (h = t, f = T(), C()) : r ? o() : i();
142
+ }, C = () => {
143
+ u[n]?.length > a ? (q[n].textContent += u[n][a++], i()) : n++ < u.length ? (a = 0, i()) : (r = true, o(), c && c());
141
144
  };
142
- return u(), { end() {
143
- return l ? (i(), e.remove(), true) : (i(), e.innerHTML = m, l = true, false);
145
+ return C(), { end() {
146
+ return o(), r ? (e.remove(), true) : (e.innerHTML = m, r = true, false);
144
147
  }, destroy() {
145
- i(), e.remove();
148
+ o(), e.remove();
146
149
  } };
147
150
  };
148
151
 
@@ -158,22 +161,30 @@ var Game = (props) => {
158
161
  const [auto, setAuto] = createSignal(false);
159
162
  const getCurrentContent = () => {
160
163
  const state = props.state;
161
- return [state.dialog.content, state.text.content];
164
+ if (state.dialog.content) {
165
+ return [store.dialogRef, state.dialog.content];
166
+ } else {
167
+ return [store.textRef, state.text.content];
168
+ }
162
169
  };
163
- createEffect(() => {
164
- const [dialog, text] = getCurrentContent();
170
+ createEffect2(() => {
171
+ const [element, text] = getCurrentContent();
165
172
  writer?.destroy();
166
- writer = M(
167
- dialog ? store.dialogRef : store.textRef,
168
- dialog || text,
169
- () => {
170
- if (auto())
171
- untrack(clearTypewriterEffect);
173
+ if (!element)
174
+ return;
175
+ writer = v({
176
+ node: element,
177
+ text,
178
+ ended() {
179
+ const next = untrack2(auto);
180
+ if (next) {
181
+ untrack2(clearTypewriterEffect);
182
+ }
172
183
  },
173
- () => {
184
+ speed() {
174
185
  return data.storeData().meta[1];
175
186
  }
176
- );
187
+ });
177
188
  });
178
189
  const onChoicesButtonClick = ([disabled, i]) => {
179
190
  if (disabled)
@@ -198,14 +209,14 @@ var Game = (props) => {
198
209
  resolve?.();
199
210
  };
200
211
  const layers = () => Object.values(props.state.layers);
201
- return <div class={root_module_default.root} style={background()}>
202
- <div data-characters={true} class={root_module_default.characters}><For each={Object.entries(props.state.characters)}>{([character, data2]) => <Show when={data2.visible}><Character
212
+ return <div class="root" style={background()}>
213
+ <div data-characters={true} class="characters"><For each={Object.entries(props.state.characters)}>{([character, data2]) => <Show2 when={data2.visible}><Character
203
214
  character={character}
204
215
  data={data2}
205
216
  characters={store.characters}
206
- /></Show>}</For></div>
217
+ /></Show2>}</For></div>
207
218
  <div
208
- class={root_module_default.dialog}
219
+ class="action-dialog"
209
220
  style={{ display: props.state.dialog.visible ? "flex" : "none" }}
210
221
  onClick={clearTypewriterEffect}
211
222
  >
@@ -214,8 +225,11 @@ var Game = (props) => {
214
225
  name={props.state.dialog.name}
215
226
  characters={characters}
216
227
  />
217
- <div class={join(root_module_default.dialogContainer, root_module_default.dialogContainerWithPerson)} data-no-person={!(props.state.dialog.character && props.state.dialog.emotion)}>
218
- <div class={root_module_default.dialogPerson}><Show when={props.state.dialog.emotion} keyed>{(emotion) => {
228
+ <div
229
+ class="action-dialog-container"
230
+ data-no-person={!(props.state.dialog.character && props.state.dialog.emotion)}
231
+ >
232
+ <div class="action-dialog-person"><Show2 when={props.state.dialog.emotion} keyed>{(emotion) => {
219
233
  const character = props.state.dialog.character;
220
234
  if (!character)
221
235
  return null;
@@ -228,59 +242,60 @@ var Game = (props) => {
228
242
  return image;
229
243
  const [canvas] = canvasDrawImages(void 0, void 0, Object.values(image));
230
244
  return canvas;
231
- }}</Show></div>
232
- <p class={root_module_default.dialogContent} ref={store.dialogRef}> </p>
245
+ }}</Show2></div>
246
+ <p class="action-dialog-content" ref={store.dialogRef}> </p>
233
247
  </div>
234
248
  </div>
235
- <Dialog
236
- isOpen={props.state.choices.visible}
237
- class={root_module_default.headlessDialog}
238
- ><div class={root_module_default.headlessDialogContainer}>
249
+ <Modal
250
+ isOpen={() => props.state.choices.visible}
251
+ ><div class="dialog-container">
239
252
  <span
240
- class={root_module_default.headlessDialogFix}
253
+ class="dialog-fix"
241
254
  aria-hidden="true"
242
255
  >​</span>
243
- <DialogPanel class={root_module_default.headlessDialogPanel}>
244
- <span aria-hidden={!props.state.choices.question} class={root_module_default.headlessDialogPanelLabel}>{props.state.choices.question || <>ᅠ</>}</span>
256
+ <div class="dialog-panel">
257
+ <span
258
+ class="dialog-panel-label"
259
+ aria-hidden={!props.state.choices.question}
260
+ >{props.state.choices.question || <>ᅠ</>}</span>
245
261
  <For each={props.state.choices.choices}>{([text, _, active], i) => {
246
262
  const disabled = active ? !active() : false;
247
263
  const index = i();
248
264
  return <button
249
265
  type="button"
266
+ class="button"
250
267
  aria-disabled={disabled}
251
- class={join(root_module_default.button, root_module_default.buttonChoices)}
252
268
  onClick={[onChoicesButtonClick, [disabled, index]]}
253
269
  >{text}</button>;
254
270
  }}</For>
255
- </DialogPanel>
256
- </div></Dialog>
257
- <Dialog
258
- isOpen={props.state.input.visible}
259
- class={root_module_default.headlessDialog}
260
- ><div class={root_module_default.headlessDialogContainer}>
271
+ </div>
272
+ </div></Modal>
273
+ <Modal
274
+ isOpen={() => props.state.input.visible}
275
+ ><div class="dialog-container">
261
276
  <span
262
- class={root_module_default.headlessDialogFix}
277
+ class="dialog-fix"
263
278
  aria-hidden="true"
264
279
  >​</span>
265
- <DialogPanel class={join(root_module_default.headlessDialogPanel, root_module_default.inputDialogPanel)}>
266
- <label for="novely-input" class={root_module_default.inputDialogLabel}>
280
+ <div class="dialog-panel input-dialog-panel">
281
+ <label for="novely-input" class="input-dialog-label">
267
282
  <span>{props.state.input.question}</span>
268
283
  {props.state.input.element}
269
284
  <span aria-live="polite">{props.state.input.error}</span>
270
285
  </label>
271
286
  <button
287
+ class="button dialog-input__button"
272
288
  onClick={onInputButtonClick}
273
- class={join(root_module_default.button, root_module_default.buttonInputDialogPanel)}
274
- aria-disabled={props.state.input.error || !props.state.input.element?.validity.valid ? "true" : "false"}
289
+ aria-disabled={Boolean(props.state.input.error || !props.state.input.element?.validity.valid)}
275
290
  >{data.t("Sumbit")}</button>
276
- </DialogPanel>
277
- </div></Dialog>
291
+ </div>
292
+ </div></Modal>
278
293
  <div data-custom={true}><For each={layers()}>{(value) => value.dom}</For></div>
279
- <div class={root_module_default.fullscreenText} data-fullscreen-text-shown={Boolean(props.state.text.content)} ref={store.textRef} onClick={clearTypewriterEffect}> </div>
280
- <div class={root_module_default.controlPanel}>
294
+ <div class="action-text" data-shown={Boolean(props.state.text.content)} ref={store.textRef} onClick={clearTypewriterEffect}> </div>
295
+ <div class="control-panel">
281
296
  <button
282
297
  type="button"
283
- class={join(root_module_default.button, root_module_default.buttonControlPanel)}
298
+ class="button control-panel__button"
284
299
  onClick={() => {
285
300
  data.options.stack.back();
286
301
  data.options.restore(data.options.stack.value);
@@ -288,21 +303,21 @@ var Game = (props) => {
288
303
  >{data.t("GoBack")}</button>
289
304
  <button
290
305
  type="button"
291
- class={join(root_module_default.button, root_module_default.buttonControlPanel)}
306
+ class="button control-panel__button"
292
307
  onClick={() => {
293
308
  data.options.save(false, "manual");
294
309
  }}
295
310
  >{data.t("DoSave")}</button>
296
311
  <button
297
312
  type="button"
298
- class={join(root_module_default.button, root_module_default.buttonControlPanel)}
313
+ class="button control-panel__button"
299
314
  onClick={() => {
300
315
  setAuto((prev) => !prev);
301
316
  }}
302
317
  >{data.t(auto() ? "Stop" : "Auto")}</button>
303
318
  <button
304
319
  type="button"
305
- class={join(root_module_default.button, root_module_default.buttonControlPanel)}
320
+ class="button control-panel__button"
306
321
  onClick={() => {
307
322
  data.options.save(false, "auto");
308
323
  props.setState("screen", "settings");
@@ -310,7 +325,7 @@ var Game = (props) => {
310
325
  >{data.t("Settings")}</button>
311
326
  <button
312
327
  type="button"
313
- class={join(root_module_default.button, root_module_default.buttonControlPanel)}
328
+ class="button control-panel__button"
314
329
  onClick={data.options.exit}
315
330
  >{data.t("Exit")}</button>
316
331
  </div>
@@ -320,21 +335,16 @@ var Game = (props) => {
320
335
  // src/screens/mainmenu.tsx
321
336
  var MainMenu = (props) => {
322
337
  const data = useData();
323
- return <div
324
- classList={{
325
- [root_module_default.root]: true,
326
- [root_module_default.mainMenu]: true
327
- }}
328
- ><div class={root_module_default.controls}>
329
- <button type="button" class={join(root_module_default.button, root_module_default.buttonMainMenu)} onClick={data.options.newGame}>{data.t("NewGame")}</button>
330
- <button type="button" class={join(root_module_default.button, root_module_default.buttonMainMenu)} onClick={() => data.options.restore()}>{data.t("LoadSave")}</button>
331
- <button type="button" class={join(root_module_default.button, root_module_default.buttonMainMenu)} onClick={() => props.setState("screen", "saves")}>{data.t("Saves")}</button>
332
- <button type="button" class={join(root_module_default.button, root_module_default.buttonMainMenu)} onClick={() => props.setState("screen", "settings")}>{data.t("Settings")}</button>
333
- </div></div>;
338
+ return <div class="root main-menu">
339
+ <button type="button" class="button main-menu__button" onClick={data.options.newGame}>{data.t("NewGame")}</button>
340
+ <button type="button" class="button main-menu__button" onClick={() => data.options.restore()}>{data.t("LoadSave")}</button>
341
+ <button type="button" class="button main-menu__button" onClick={() => props.setState("screen", "saves")}>{data.t("Saves")}</button>
342
+ <button type="button" class="button main-menu__button" onClick={() => props.setState("screen", "settings")}>{data.t("Settings")}</button>
343
+ </div>;
334
344
  };
335
345
 
336
346
  // src/screens/saves.tsx
337
- import { Show as Show2, For as For2 } from "solid-js";
347
+ import { Show as Show3, For as For2 } from "solid-js";
338
348
  var Saves = (props) => {
339
349
  const data = useData();
340
350
  const saves = () => data.storeData().saves;
@@ -351,30 +361,25 @@ var Saves = (props) => {
351
361
  return prev.saves = _saves, prev;
352
362
  });
353
363
  };
354
- return <div
355
- classList={{
356
- [root_module_default.root]: true,
357
- [root_module_default.saves]: true
358
- }}
359
- >
360
- <div class={root_module_default.controls}><button type="button" class={join(root_module_default.button, root_module_default.buttonSaves)} onClick={() => props.setState("screen", "mainmenu")}>{data.t("GoBack")}</button></div>
361
- <Show2 when={saves()} fallback={data.t("NoSaves")}><ol class={root_module_default.list}><For2 each={saves()}>{(save) => {
364
+ return <div class="root saves">
365
+ <div class="saves__column"><button type="button" class="button saves__button" onClick={() => props.setState("screen", "mainmenu")}>{data.t("GoBack")}</button></div>
366
+ <Show3 when={saves()} fallback={data.t("NoSaves")}><ol class="saves__column saves__list"><For2 each={saves()}>{(save) => {
362
367
  const [date, type] = save[2];
363
368
  const stringDate = capitalize(new Date(date).toLocaleDateString(language(), { weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }));
364
369
  const stringType = data.t(type === "auto" ? "Automatic" : "Manual");
365
- return <li>
370
+ return <li class="saves__list-item">
366
371
  <button
367
372
  type="button"
368
- class={join(root_module_default.button, root_module_default.buttonSaves)}
373
+ class="button saves__button-load"
369
374
  aria-label={data.t("LoadASaveFrom") + " " + stringDate}
370
375
  onClick={() => data.options.set(save)}
371
376
  >
372
377
  {stringDate}
373
378
  <span style={{ "margin-left": "1em" }}>{stringType}</span>
374
379
  </button>
375
- <button type="reset" class={join(root_module_default.button, root_module_default.buttonSavesDelete)} aria-label={data.t("DeleteASaveFrom") + " " + stringDate} onClick={[removeSave, date]}><span>{data.t("Remove")}</span></button>
380
+ <button type="reset" class="button" aria-label={data.t("DeleteASaveFrom") + " " + stringDate} onClick={[removeSave, date]}><span>{data.t("Remove")}</span></button>
376
381
  </li>;
377
- }}</For2></ol></Show2>
382
+ }}</For2></ol></Show3>
378
383
  </div>;
379
384
  };
380
385
 
@@ -399,25 +404,21 @@ var Settings = (props) => {
399
404
  return prev.meta[1] = selected, prev;
400
405
  });
401
406
  };
402
- const id = createUniqueId();
403
- return <div
404
- classList={{
405
- [root_module_default.root]: true,
406
- [root_module_default.settings]: true
407
- }}
408
- >
409
- <div class={root_module_default.controls}>
410
- <button type="button" class={join(root_module_default.button, root_module_default.buttonSettings)} onClick={() => props.setState("screen", "mainmenu")}>{data.t("HomeScreen")}</button>
411
- <button type="button" class={join(root_module_default.button, root_module_default.buttonSettings)} onClick={() => data.options.restore()}>{data.t("ToTheGame")}</button>
407
+ const languageSelectID = createUniqueId();
408
+ const speedSelectID = createUniqueId();
409
+ return <div class="root settings">
410
+ <div class="settings__column">
411
+ <button type="button" class="button settings__button" onClick={() => props.setState("screen", "mainmenu")}>{data.t("HomeScreen")}</button>
412
+ <button type="button" class="button settings__button" onClick={() => data.options.restore()}>{data.t("ToTheGame")}</button>
412
413
  </div>
413
- <div class={root_module_default.content}>
414
- <div class={root_module_default.select}>
415
- <label for={id}>{data.t("Language")}</label>
416
- <select id={id} onChange={onLanguageSelect}><For3 each={data.options.languages}>{(lang) => <option value={lang} selected={lang === language()}>{capitalize(languageNames().of(lang) || lang)}</option>}</For3></select>
414
+ <div class="settings__column">
415
+ <div class="select">
416
+ <label class="select__label" for={languageSelectID}>{data.t("Language")}</label>
417
+ <select class="select__select" id={languageSelectID} onChange={onLanguageSelect}><For3 each={data.options.languages}>{(lang) => <option value={lang} selected={lang === language()}>{capitalize(languageNames().of(lang) || lang)}</option>}</For3></select>
417
418
  </div>
418
- <div class={root_module_default.select}>
419
- <label for={id}>{data.t("TextSpeed")}</label>
420
- <select id={id} onChange={onSpeedSelect}><For3 each={[90, 140, 190]}>{(speed) => <option value={speed} selected={speed === textSpeed()}>{speed}</option>}</For3></select>
419
+ <div class="select">
420
+ <label class="select__label" for={speedSelectID}>{data.t("TextSpeed")}</label>
421
+ <select class="select__select" id={speedSelectID} onChange={onSpeedSelect}><For3 each={[90, 140, 190]}>{(speed) => <option value={speed} selected={speed === textSpeed()}>{speed}</option>}</For3></select>
421
422
  </div>
422
423
  </div>
423
424
  </div>;
@@ -425,12 +426,7 @@ var Settings = (props) => {
425
426
 
426
427
  // src/screens/loading.tsx
427
428
  var Loading = () => {
428
- return <div
429
- classList={{
430
- [root_module_default.root]: true,
431
- [root_module_default.loading]: true
432
- }}
433
- ><div class={root_module_default.ldsEllipsis}>
429
+ return <div class="root loading"><div class="loading__animation">
434
430
  <div />
435
431
  <div />
436
432
  <div />
@@ -1,448 +1,489 @@
1
- /* esbuild-css-modules-plugin-namespace:./src/styles/root.module.css?esbuild-css-modules-plugin-built */
2
- .n-root {
3
- background-position: center;
4
- background-repeat: no-repeat;
5
- background-size: cover;
1
+ /* src/styles/root/root.css */
2
+ .root {
6
3
  height: 100vh;
4
+ width: 100vw;
5
+ font-size: 1em;
7
6
  font-family:
8
7
  ui-sans-serif,
9
8
  system-ui,
10
9
  -apple-system,
11
10
  BlinkMacSystemFont,
12
- Segoe UI,
11
+ "Segoe UI",
13
12
  Roboto,
14
- Helvetica Neue,
13
+ "Helvetica Neue",
15
14
  Arial,
16
- Noto Sans,
15
+ "Noto Sans",
17
16
  sans-serif,
18
- Apple Color Emoji,
19
- Segoe UI Emoji,
20
- Segoe UI Symbol,
21
- Noto Color Emoji;
22
- font-size: 1em;
17
+ "Apple Color Emoji",
18
+ "Segoe UI Emoji",
19
+ "Segoe UI Symbol",
20
+ "Noto Color Emoji";
21
+ background-repeat: no-repeat;
22
+ background-position: center;
23
+ background-size: cover;
23
24
  }
24
- .n-root * {
25
+ .root,
26
+ .root * {
25
27
  box-sizing: border-box;
26
28
  }
27
29
 
28
- /* esbuild-css-modules-plugin-namespace:./src/styles/button.module.css?esbuild-css-modules-plugin-built */
29
- .n-button {
30
+ /* src/styles/root/index.css */
31
+
32
+ /* src/styles/main-menu/main-menu.css */
33
+ .main-menu {
34
+ overflow: hidden;
35
+ background-image: var(--novely-main-menu-background-image);
36
+ padding: 0 1em;
37
+ display: grid;
38
+ justify-content: start;
39
+ align-content: center;
40
+ }
41
+
42
+ /* src/styles/main-menu/button/button.css */
43
+ .main-menu__button {
44
+ min-width: 30vw;
45
+ }
46
+
47
+ /* src/styles/main-menu/index.css */
48
+
49
+ /* src/styles/loading/loading.css */
50
+ .loading {
51
+ overflow: hidden;
52
+ background: black;
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ }
57
+
58
+ /* src/styles/loading/animation/animation.css */
59
+ .loading__animation {
60
+ display: inline-block;
61
+ position: relative;
62
+ width: 80px;
63
+ height: 80px;
64
+ }
65
+ .loading__animation div {
66
+ position: absolute;
67
+ top: 33px;
68
+ width: 13px;
69
+ height: 13px;
70
+ border-radius: 50%;
71
+ background: #fff;
72
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
73
+ }
74
+ .loading__animation div:nth-child(1) {
75
+ left: 8px;
76
+ animation: lds-ellipsis1 0.6s infinite;
77
+ }
78
+ .loading__animation div:nth-child(2) {
79
+ left: 8px;
80
+ animation: lds-ellipsis2 0.6s infinite;
81
+ }
82
+ .loading__animation div:nth-child(3) {
83
+ left: 32px;
84
+ animation: lds-ellipsis2 0.6s infinite;
85
+ }
86
+ .loading__animation div:nth-child(4) {
87
+ left: 56px;
88
+ animation: lds-ellipsis3 0.6s infinite;
89
+ }
90
+ @keyframes lds-ellipsis1 {
91
+ 0% {
92
+ transform: scale(0);
93
+ }
94
+ 100% {
95
+ transform: scale(1);
96
+ }
97
+ }
98
+ @keyframes lds-ellipsis3 {
99
+ 0% {
100
+ transform: scale(1);
101
+ }
102
+ 100% {
103
+ transform: scale(0);
104
+ }
105
+ }
106
+ @keyframes lds-ellipsis2 {
107
+ 0% {
108
+ transform: translate(0, 0);
109
+ }
110
+ 100% {
111
+ transform: translate(24px, 0);
112
+ }
113
+ }
114
+
115
+ /* src/styles/loading/index.css */
116
+
117
+ /* src/styles/settings/settings.css */
118
+ .settings {
119
+ position: absolute;
120
+ inset: 0;
121
+ z-index: 1;
122
+ padding: 0 1em;
123
+ gap: 1em;
124
+ overflow: hidden;
125
+ background-image: var(--novely-settings-background-image);
126
+ display: flex;
127
+ }
128
+ @media (orientation: portrait) {
129
+ .settings {
130
+ flex-direction: column-reverse;
131
+ }
132
+ }
133
+
134
+ /* src/styles/settings/button/button.css */
135
+ .settings__button {
136
+ min-width: 30vw;
137
+ }
138
+ @media (orientation: portrait) {
139
+ .settings__button {
140
+ min-width: 80%;
141
+ }
142
+ }
143
+
144
+ /* src/styles/settings/column/column.css */
145
+ .settings__column {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ flex-direction: column;
150
+ flex-wrap: wrap;
151
+ }
152
+
153
+ /* src/styles/settings/index.css */
154
+
155
+ /* src/styles/saves/saves.css */
156
+ .saves {
157
+ position: absolute;
158
+ inset: 0;
159
+ z-index: 1;
160
+ padding: 0 1em;
161
+ gap: 1em;
162
+ overflow: hidden;
163
+ background-image: var(--novely-saves-background-image);
164
+ display: flex;
165
+ }
166
+ @media (orientation: portrait) {
167
+ .saves {
168
+ flex-direction: column-reverse;
169
+ }
170
+ }
171
+
172
+ /* src/styles/saves/button/button.css */
173
+ .saves__button {
174
+ min-width: 30vw;
175
+ }
176
+ .saves__button-load {
177
+ width: 100%;
178
+ }
179
+ @media (orientation: portrait) {
180
+ .saves__button {
181
+ min-width: 80%;
182
+ }
183
+ }
184
+
185
+ /* src/styles/saves/list/list.css */
186
+ .saves__list {
187
+ width: 100%;
188
+ height: 100%;
189
+ padding: 0 1em;
190
+ display: grid;
191
+ align-content: flex-start;
192
+ justify-content: center;
193
+ justify-items: stretch;
194
+ list-style: none;
195
+ overflow-y: scroll;
196
+ margin-block-start: 0;
197
+ margin-block-end: 0;
198
+ }
199
+ .saves__list-item {
200
+ display: flex;
201
+ }
202
+
203
+ /* src/styles/saves/index.css */
204
+
205
+ /* src/styles/button/button.css */
206
+ .button {
30
207
  background-color: var(--novely-button-background-color, #ffe9f3);
31
208
  border: 4px solid var(--novely-button-border-color, #ffc7df);
32
209
  color: var(--novely-button-color, #000);
33
- cursor: pointer;
34
- user-select: none;
35
- margin: .4em 0;
36
- padding: .4em;
210
+ margin: 0.4em 0;
211
+ padding: 0.4em;
37
212
  font-size: 1.02em;
38
213
  line-height: 1.2;
214
+ cursor: pointer;
215
+ user-select: none;
39
216
  }
40
- .n-button:hover {
41
- background-color: var(--novely-button-hover-background-color, #fff);
217
+ .button:hover {
218
+ background-color: var(--novely-button-hover-background-color, #ffffff);
42
219
  border-color: var(--novely-button-hover-border-color, #ffc6d8);
43
220
  color: var(--novely-button-hover-color, #ffb7a2);
44
221
  }
45
- .n-button[aria-disabled=true] {
222
+ .button[aria-disabled=true] {
46
223
  cursor: not-allowed;
47
- opacity: .9;
48
- }
49
- .n-buttonInputDialogPanel {
50
- width: fit-content;
51
- padding: .4em .6em;
52
- font-size: 1.2375em;
224
+ opacity: 0.9;
53
225
  }
54
- .n-buttonMainMenu,
55
- .n-buttonSaves {
56
- width: 100%;
226
+
227
+ /* src/styles/button/index.css */
228
+
229
+ /* src/styles/characters/characters.css */
230
+ .characters {
231
+ position: absolute;
232
+ inset: 0;
233
+ z-index: 1;
234
+ overflow: hidden;
235
+ display: flex;
236
+ align-items: flex-end;
237
+ justify-content: center;
57
238
  }
58
- .n-buttonSavesDelete {
59
- margin-left: 1em;
239
+ .characters > canvas {
240
+ position: relative;
241
+ min-width: unset;
242
+ max-height: 85vh;
243
+ max-width: 50vw;
60
244
  }
61
- .n-buttonSettings {
62
- width: 100%;
245
+
246
+ /* src/styles/characters/index.css */
247
+
248
+ /* src/styles/control-panel/control-panel.css */
249
+ .control-panel {
250
+ z-index: 23;
251
+ position: absolute;
252
+ display: flex;
253
+ justify-content: end;
254
+ right: 0.4em;
255
+ bottom: 0.4em;
63
256
  }
64
- .n-buttonControlPanel {
257
+
258
+ /* src/styles/control-panel/button/button.css */
259
+ .control-panel__button {
65
260
  border: 2px solid var(--novely-button-border-color, #ffc7df);
66
- height: 2em;
67
261
  margin: 0;
68
- padding: .2em .4em;
262
+ padding: 0.2em 0.4em;
69
263
  font-size: 1em;
70
264
  line-height: 1;
265
+ height: 2em;
71
266
  }
72
267
 
73
- /* esbuild-css-modules-plugin-namespace:./src/styles/characters.module.css?esbuild-css-modules-plugin-built */
74
- .n-characters {
75
- z-index: 1;
268
+ /* src/styles/control-panel/index.css */
269
+
270
+ /* src/styles/action-text/action-text.css */
271
+ .action-text {
76
272
  position: absolute;
77
273
  inset: 0;
78
- overflow: hidden;
274
+ z-index: 2;
275
+ display: none;
276
+ text-align: center;
277
+ font-size: 1.5em;
79
278
  }
80
- .n-characters > canvas {
81
- height: 85vmin;
82
- max-height: 70vh;
83
- position: absolute;
84
- bottom: 0;
279
+ .action-text[data-shown=true] {
280
+ display: flex;
281
+ align-items: center;
282
+ justify-content: center;
283
+ background: var(--novely-fullscreen-backgroun-color, rgba(0, 0, 0, 0.3));
284
+ text-shadow: var( --novely-fullscreen-text-shadow, 2px 2px 4px rgba(0, 0, 0, 0.5) );
285
+ color: var(--novely-fullscreen-text-color, white);
286
+ }
287
+ .action-text[data-shown=true] > span {
288
+ cursor: pointer;
85
289
  }
86
290
 
87
- /* esbuild-css-modules-plugin-namespace:./src/styles/dialog.module.css?esbuild-css-modules-plugin-built */
88
- .n-dialog {
89
- z-index: 22;
90
- text-align: left;
91
- cursor: default;
92
- user-select: none;
291
+ /* src/styles/action-text/index.css */
292
+
293
+ /* src/styles/select/select.css */
294
+ .select {
295
+ width: 100%;
296
+ display: flex;
93
297
  flex-direction: column;
94
- justify-content: flex-end;
95
- width: 75%;
298
+ align-items: start;
299
+ }
300
+
301
+ /* src/styles/select/select/select.css */
302
+ .select__select {
303
+ background-color: var(--novely-select-background-color, #ffe9f3);
304
+ border: 4px solid var(--novely-select-border-color, #ffc7df);
305
+ color: var(--novely-select-color, #000);
306
+ margin: 0.4em 0;
307
+ padding: 0.4em;
308
+ font-size: 1.02em;
309
+ }
310
+
311
+ /* src/styles/select/label/label.css */
312
+ .select__label {
313
+ background: var(--novely-select-label-background, #ffe9f3);
314
+ color: var(--novely-select-color, #000);
315
+ font-size: 1.02em;
316
+ padding: 0.25em 0.5em;
317
+ border-radius: 0.25em;
318
+ }
319
+
320
+ /* src/styles/select/index.css */
321
+
322
+ /* src/styles/action-dialog/action-dialog.css */
323
+ .action-dialog {
96
324
  min-height: 26vh;
325
+ width: 75%;
97
326
  position: absolute;
98
- bottom: .4em;
99
327
  left: 50%;
100
328
  transform: translateX(-50%);
329
+ bottom: 0.4em;
330
+ z-index: 22;
331
+ text-align: left;
332
+ flex-direction: column;
333
+ justify-content: flex-end;
334
+ cursor: default;
335
+ user-select: none;
101
336
  }
102
- .n-dialogContainer {
103
- color: var(--novely-dialog-color, #fff);
104
- border: 3px solid var(--novely-dialog-border-color, #fff);
337
+ .action-dialog-container {
338
+ height: 100%;
339
+ min-height: 18vh;
340
+ flex-grow: 1;
341
+ color: var(--novely-dialog-color, #ffffff);
342
+ border: 3px solid var(--novely-dialog-border-color, #ffffff);
105
343
  border-radius: var(--novely-dialog-border-radius, 14px);
106
344
  box-shadow: 1px 1px 4px var(--novely-dialog-box-shadow-color, #00000072);
107
345
  background-image: var(--novely-dialog-background-image, radial-gradient(#d6608998 20%, transparent 20%), radial-gradient(#d6608998 20%, transparent 20%));
108
346
  background-color: var(--novely-dialog-background-color, #f092b4d8);
109
347
  background-position: var(--novely-dialog-background-position, 0 0, 50px 50px);
110
348
  background-size: var(--novely-dialog-background-size, 100px 100px);
111
- flex-grow: 1;
112
- grid-template-areas: "n-pers n-text" "n-pers n-text";
113
- height: 100%;
114
- min-height: 18vh;
115
- padding-bottom: 2.8em;
116
349
  display: grid;
350
+ grid-template-areas: "pers text" "pers text";
351
+ padding-bottom: 2.8em;
117
352
  }
118
- .n-dialogPerson {
119
- grid-area: n-pers;
120
- max-width: 25vw;
121
- max-height: 25vh;
122
- }
123
- .n-dialogContainerWithPerson[data-no-person=true] {
124
- grid-template-areas: "n-text n-text" "n-text n-text";
353
+ .action-dialog-container[data-no-person=true] {
354
+ grid-template-areas: "text text" "text text";
125
355
  }
126
- .n-dialogContainerWithPerson[data-no-person=true] > .n-dialogPerson {
127
- display: none;
356
+ .action-dialog-person {
357
+ max-height: 25vh;
358
+ max-width: 25vw;
359
+ grid-area: pers;
128
360
  }
129
- .n-dialogName,
130
- .n-dialogContent {
131
- margin: 0;
132
- padding: 1vmin;
361
+ .action-dialog-name,
362
+ .action-dialog-content {
133
363
  display: block;
364
+ padding: 1vmin;
365
+ margin: 0;
134
366
  }
135
- .n-dialogName {
136
- background: #fff;
367
+ .action-dialog-name {
368
+ font-size: 1.4375em;
369
+ line-height: 1.2;
370
+ background: #ffffff;
137
371
  border-radius: 7px 7px 0 0;
372
+ width: -moz-fit-content;
138
373
  width: fit-content;
139
374
  margin-left: 5vmin;
140
- font-size: 1.4375em;
141
- line-height: 1.2;
142
375
  box-shadow: 1px 1px 3px #00000042;
143
376
  }
144
- .n-dialogContent {
145
- text-shadow:
146
- 1px 1px #000,
147
- -1px -1px #000,
148
- 1px -1px #000,
149
- -1px 1px #000;
150
- grid-area: n-text;
151
- width: 100%;
377
+ .action-dialog-content {
152
378
  font-size: 2.2375em;
153
379
  line-height: 1.2;
380
+ width: 100%;
381
+ grid-area: text;
382
+ text-shadow:
383
+ 1px 1px 0 black,
384
+ -1px -1px 0 black,
385
+ 1px -1px 0 black,
386
+ -1px 1px 0 black;
154
387
  }
155
- .n-dialogPerson > canvas,
156
- .n-dialogPerson > img {
388
+ .action-dialog-person > canvas,
389
+ .action-dialog-person > img {
157
390
  height: 100%;
158
391
  }
159
- @media (width <= 768px) {
160
- .n-dialog {
392
+ @media (orientation: portrait) {
393
+ .action-dialog {
394
+ width: 100%;
161
395
  bottom: 0;
162
396
  left: unset;
163
397
  transform: unset;
164
- width: 100%;
165
398
  }
166
- .n-dialogName {
399
+ .action-dialog-name {
167
400
  font-size: 1.02em;
168
401
  }
169
- .n-dialogContent {
402
+ .action-dialog-content {
170
403
  font-size: 1.32em;
171
404
  }
172
- .n-dialogContainer {
405
+ .action-dialog-container {
173
406
  border-radius: 14px 14px 0 0;
174
407
  }
175
408
  }
176
409
 
177
- /* esbuild-css-modules-plugin-namespace:./src/styles/headlessDialog.module.css?esbuild-css-modules-plugin-built */
178
- .n-headlessDialog {
179
- z-index: 20;
410
+ /* src/styles/action-dialog/index.css */
411
+
412
+ /* src/styles/dialog/dialog.css */
413
+ .dialog {
180
414
  position: fixed;
181
415
  inset: 0;
416
+ z-index: 20;
182
417
  overflow-y: auto;
183
418
  }
184
- .n-headlessDialogContainer {
185
- justify-content: center;
186
- align-items: center;
419
+ .dialog-container {
187
420
  min-height: 100vh;
188
421
  display: flex;
422
+ align-items: center;
423
+ justify-content: center;
189
424
  }
190
- .n-headlessDialogFix {
191
- vertical-align: middle;
192
- height: 100vh;
425
+ .dialog-fix {
193
426
  display: inline-block;
427
+ height: 100vh;
428
+ vertical-align: middle;
194
429
  }
195
- .n-headlessDialogPanel {
430
+ .dialog-panel {
196
431
  text-align: left;
197
432
  z-index: 21;
198
- flex-direction: column;
199
- align-items: stretch;
200
433
  width: 100%;
201
434
  max-width: 40vw;
202
435
  min-height: 40vh;
203
436
  display: flex;
437
+ flex-direction: column;
438
+ align-items: stretch;
204
439
  }
205
- .n-headlessDialogPanelLabel {
440
+ .dialog-panel-label {
206
441
  user-select: none;
207
442
  font-size: 1.2375em;
208
443
  }
209
- @media (width <= 768px) {
210
- .n-headlessDialogPanel {
444
+ @media (orientation: portrait) {
445
+ .dialog-panel {
211
446
  max-width: 95vw;
212
447
  }
213
448
  }
214
- .n-inputDialogLabel {
215
- flex-direction: column;
216
- justify-content: center;
217
- align-items: center;
218
- width: 100%;
219
- font-size: 1.2375em;
220
- display: flex;
221
- }
222
- .n-inputDialogLabel > span {
223
- min-height: 1lh;
224
- margin: .4em 0;
225
- }
226
- .n-inputDialogPanel {
227
- color: #fff;
228
- background-color: #f092b4d8;
229
- background-image: radial-gradient(#d6608998 20%, #0000 20%), radial-gradient(#d6608998 20%, #0000 20%);
230
- background-position: 0 0, 50px 50px;
231
- background-size: 100px 100px;
232
- border: 3px solid #fff;
233
- border-radius: 14px;
234
- justify-content: center;
235
- align-items: center;
236
- box-shadow: 1px 1px 4px #00000072;
237
- }
238
449
 
239
- /* esbuild-css-modules-plugin-namespace:./src/styles/mainMenu.module.css?esbuild-css-modules-plugin-built */
240
- .n-mainMenu {
241
- z-index: 1;
242
- background-image: var(--novely-main-menu-background-image);
243
- position: absolute;
244
- inset: 0;
245
- overflow: hidden;
246
- }
247
- .n-mainMenu > .n-controls {
248
- flex-direction: column;
249
- justify-content: center;
250
- align-items: center;
251
- width: 30vw;
252
- height: 100%;
253
- padding: 0 1em;
254
- display: flex;
255
- }
256
- @media (width <= 768px) {
257
- .n-mainMenu > .n-controls {
258
- width: 100%;
259
- }
260
- }
450
+ /* src/styles/dialog/index.css */
261
451
 
262
- /* esbuild-css-modules-plugin-namespace:./src/styles/saves.module.css?esbuild-css-modules-plugin-built */
263
- .n-saves {
264
- z-index: 1;
265
- background-image: var(--novely-saves-background-image);
452
+ /* src/styles/input-dialog/input-dialog.css */
453
+ .input-dialog-label {
266
454
  display: flex;
267
- position: absolute;
268
- inset: 0;
269
- overflow: hidden;
270
- }
271
- .n-saves > .n-controls {
272
455
  flex-direction: column;
273
456
  align-items: center;
274
- width: 30vw;
275
- height: 100%;
276
- padding: 0 1em;
277
- display: flex;
278
- }
279
- .n-saves > .n-list {
280
- flex-direction: column;
281
- align-items: center;
282
- width: 100%;
283
- height: 100%;
284
- padding: 0 1em;
285
- list-style: none;
286
- display: flex;
287
- overflow-y: scroll;
288
- }
289
- .n-saves > .n-list > li {
290
- display: flex;
291
- }
292
- @media (width <= 768px) {
293
- .n-saves {
294
- flex-direction: column;
295
- }
296
- .n-saves > .n-controls {
297
- width: auto;
298
- height: auto;
299
- }
300
- .n-saves > .n-list {
301
- height: auto;
302
- }
303
- }
304
-
305
- /* esbuild-css-modules-plugin-namespace:./src/styles/controlPanel.module.css?esbuild-css-modules-plugin-built */
306
- .n-controlPanel {
307
- z-index: 23;
308
- justify-content: end;
309
- display: flex;
310
- position: absolute;
311
- bottom: .4em;
312
- right: .4em;
313
- }
314
-
315
- /* esbuild-css-modules-plugin-namespace:./src/styles/settings.module.css?esbuild-css-modules-plugin-built */
316
- .n-settings {
317
- z-index: 1;
318
- background-image: var(--novely-settings-background-image);
319
- display: flex;
320
- position: absolute;
321
- inset: 0;
322
- overflow: hidden;
323
- }
324
- .n-settings .n-controls {
325
- flex-direction: column;
326
457
  justify-content: center;
327
- align-items: center;
328
- width: 30vw;
329
- height: 100%;
330
- padding-left: 1em;
331
- display: flex;
332
- }
333
- .n-content {
334
- flex-direction: column;
335
- flex: 1 1 0;
336
- justify-content: center;
337
- align-items: start;
458
+ font-size: 1.2375em;
338
459
  width: 100%;
339
- height: 100%;
340
- padding-left: 1em;
341
- list-style: none;
342
- display: flex;
343
460
  }
344
- .n-settings .n-select {
345
- flex-direction: column;
346
- align-items: start;
347
- display: flex;
348
- }
349
- .n-settings .n-select > select {
350
- background-color: var(--novely-select-background-color, #ffe9f3);
351
- border: 4px solid var(--novely-select-border-color, #ffc7df);
352
- color: var(--novely-select-color, #000);
353
- margin: .4em 0;
354
- padding: .4em;
355
- font-size: 1.02em;
356
- }
357
- .n-settings .n-select > label {
358
- color: var(--novely-select-color, #000);
359
- font-size: 1.42em;
461
+ .input-dialog-label > span {
462
+ margin: 0.4em 0;
463
+ min-height: 1em;
464
+ min-height: 1lh;
360
465
  }
361
-
362
- /* esbuild-css-modules-plugin-namespace:./src/styles/loading.module.css?esbuild-css-modules-plugin-built */
363
- .n-loading {
364
- z-index: 1;
365
- background: #000;
466
+ .input-dialog-panel {
366
467
  justify-content: center;
367
468
  align-items: center;
368
- display: flex;
369
- position: absolute;
370
- inset: 0;
371
- overflow: hidden;
372
- }
373
- .n-lds-ellipsis {
374
- width: 80px;
375
- height: 80px;
376
- display: inline-block;
377
- position: relative;
378
- }
379
- .n-lds-ellipsis div {
380
- background: #fff;
381
- border-radius: 50%;
382
- width: 13px;
383
- height: 13px;
384
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
385
- position: absolute;
386
- top: 33px;
387
- }
388
- .n-lds-ellipsis div:first-child {
389
- animation: .6s infinite n-lds-ellipsis1;
390
- left: 8px;
391
- }
392
- .n-lds-ellipsis div:nth-child(2) {
393
- animation: .6s infinite n-lds-ellipsis2;
394
- left: 8px;
395
- }
396
- .n-lds-ellipsis div:nth-child(3) {
397
- animation: .6s infinite n-lds-ellipsis2;
398
- left: 32px;
399
- }
400
- .n-lds-ellipsis div:nth-child(4) {
401
- animation: .6s infinite n-lds-ellipsis3;
402
- left: 56px;
403
- }
404
- @keyframes n-lds-ellipsis1 {
405
- 0% {
406
- transform: scale(0);
407
- }
408
- 100% {
409
- transform: scale(1);
410
- }
411
- }
412
- @keyframes n-lds-ellipsis3 {
413
- 0% {
414
- transform: scale(1);
415
- }
416
- 100% {
417
- transform: scale(0);
418
- }
419
- }
420
- @keyframes n-lds-ellipsis2 {
421
- 0% {
422
- transform: translate(0);
423
- }
424
- 100% {
425
- transform: translate(24px);
426
- }
469
+ color: rgb(255, 255, 255);
470
+ border: 3px solid #ffffff;
471
+ border-radius: 14px;
472
+ box-shadow: 1px 1px 4px #00000072;
473
+ background-image: radial-gradient(#d6608998 20%, transparent 20%), radial-gradient(#d6608998 20%, transparent 20%);
474
+ background-color: #f092b4d8;
475
+ background-position: 0 0, 50px 50px;
476
+ background-size: 100px 100px;
427
477
  }
428
478
 
429
- /* esbuild-css-modules-plugin-namespace:./src/styles/fullscreenText.module.css?esbuild-css-modules-plugin-built */
430
- .n-fullscreenText {
431
- z-index: 2;
432
- text-align: center;
433
- justify-content: center;
434
- align-items: center;
435
- font-size: 1.5em;
436
- display: none;
437
- position: absolute;
438
- inset: 0;
439
- }
440
- .n-fullscreenText[data-fullscreen-text-shown=true] {
441
- background: var(--novely-fullscreen-backgroun-color, #0000004d);
442
- text-shadow: var(--novely-fullscreen-text-shadow, 2px 2px 4px #00000080);
443
- color: var(--novely-fullscreen-text-color, white);
444
- display: flex;
445
- }
446
- .n-fullscreenText[data-fullscreen-text-shown=true] > span {
447
- cursor: pointer;
479
+ /* src/styles/input-dialog/button/button.css */
480
+ .dialog-input__button {
481
+ font-size: 1.2375em;
482
+ padding: 0.4em 0.6em;
483
+ width: -moz-fit-content;
484
+ width: fit-content;
448
485
  }
486
+
487
+ /* src/styles/input-dialog/index.css */
488
+
489
+ /* src/styles/index.css */
package/dist/utils.d.ts CHANGED
@@ -6,5 +6,4 @@ declare const createImage: (src: string) => HTMLImageElement;
6
6
  */
7
7
  declare const canvasDrawImages: (canvas: HTMLCanvasElement | undefined, ctx: CanvasRenderingContext2D | undefined, images: HTMLImageElement[]) => readonly [HTMLCanvasElement, CanvasRenderingContext2D];
8
8
  declare const url: <T extends string>(str: T) => `url(${T})`;
9
- declare const join: (...elements: (string | boolean)[]) => string;
10
- export { isCSSImage, canvasDrawImages, url, createImage, capitalize, join };
9
+ export { isCSSImage, canvasDrawImages, url, createImage, capitalize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novely/solid-renderer",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,18 +15,15 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "esbuild": "^0.16.17",
18
- "esbuild-css-modules-plugin": "^2.7.1",
19
18
  "typescript": "^4.9.5"
20
19
  },
21
20
  "dependencies": {
22
21
  "@novely/core": "workspace:*",
23
- "@novely/typewriter": "^0.1.0",
24
- "solid-headless": "^0.13.1",
22
+ "@novely/typewriter": "workspace:*",
25
23
  "solid-js": "1.7.3"
26
24
  },
27
25
  "peerDependencies": {
28
26
  "@novely/core": "*",
29
- "solid-headless": "*",
30
27
  "solid-js": "*"
31
28
  },
32
29
  "license": "ISC",
@@ -1,2 +0,0 @@
1
- import style from './root.module.css';
2
- export { style };