@novely/solid-renderer 0.9.3-next → 0.10.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/dist/components/Icon.d.ts +2 -0
- package/dist/index.jsx +52 -37
- package/dist/styles/index.css +3 -2
- package/package.json +1 -1
package/dist/index.jsx
CHANGED
|
@@ -1817,7 +1817,7 @@ var Character = (props) => {
|
|
|
1817
1817
|
|
|
1818
1818
|
// src/components/ControlPanelButtons.tsx
|
|
1819
1819
|
var _tmpl$2 = /* @__PURE__ */ template(`<button role="menuitem" type="button" class="button control-panel__button"><span class="control-panel__button__content">`);
|
|
1820
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<button role="menuitem" type="button" class="button control-panel__button control-panel__button--auto-mode">`);
|
|
1820
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<button role="menuitem" type="button" class="button control-panel__button control-panel__button--auto-mode"><span class="control-panel__button__content">`);
|
|
1821
1821
|
var _tmpl$3 = /* @__PURE__ */ template(`<button role="menuitem" type="button" class="button control-panel__button">`);
|
|
1822
1822
|
var ControlPanelButtons = (props) => {
|
|
1823
1823
|
const data = useData();
|
|
@@ -1848,58 +1848,64 @@ var ControlPanelButtons = (props) => {
|
|
|
1848
1848
|
createRenderEffect(() => setAttribute(_el$3, "title", data.t("DoSave")));
|
|
1849
1849
|
return _el$3;
|
|
1850
1850
|
})(), (() => {
|
|
1851
|
-
const _el$5 = _tmpl$22();
|
|
1851
|
+
const _el$5 = _tmpl$22(), _el$6 = _el$5.firstChild;
|
|
1852
1852
|
_el$5.$$click = () => {
|
|
1853
1853
|
props.setAuto((prev) => !prev);
|
|
1854
1854
|
};
|
|
1855
|
-
insert(_el$
|
|
1855
|
+
insert(_el$6, () => data.t(props.auto() ? "Stop" : "Auto"));
|
|
1856
|
+
insert(_el$5, createComponent(Icon, {
|
|
1857
|
+
"class": "control-panel__button__icon",
|
|
1858
|
+
get children() {
|
|
1859
|
+
return createMemo(() => !!props.auto())() ? createComponent(Icon.Stop, {}) : createComponent(Icon.Play, {});
|
|
1860
|
+
}
|
|
1861
|
+
}), null);
|
|
1856
1862
|
createRenderEffect(() => setAttribute(_el$5, "title", data.t(props.auto() ? "Stop" : "Auto")));
|
|
1857
1863
|
return _el$5;
|
|
1858
1864
|
})(), (() => {
|
|
1859
|
-
const _el$
|
|
1860
|
-
_el$
|
|
1865
|
+
const _el$7 = _tmpl$2(), _el$8 = _el$7.firstChild;
|
|
1866
|
+
_el$7.$$click = () => {
|
|
1861
1867
|
data.options.save(false, "auto");
|
|
1862
1868
|
props.openSettings();
|
|
1863
1869
|
};
|
|
1864
|
-
insert(_el$
|
|
1865
|
-
insert(_el$
|
|
1870
|
+
insert(_el$8, () => data.t("Settings"));
|
|
1871
|
+
insert(_el$7, createComponent(Icon, {
|
|
1866
1872
|
"class": "control-panel__button__icon",
|
|
1867
1873
|
get children() {
|
|
1868
1874
|
return Icon.Settings();
|
|
1869
1875
|
}
|
|
1870
1876
|
}), null);
|
|
1871
|
-
createRenderEffect(() => setAttribute(_el$
|
|
1872
|
-
return _el$
|
|
1877
|
+
createRenderEffect(() => setAttribute(_el$7, "title", data.t("Settings")));
|
|
1878
|
+
return _el$7;
|
|
1873
1879
|
})(), (() => {
|
|
1874
|
-
const _el$
|
|
1875
|
-
_el$
|
|
1880
|
+
const _el$9 = _tmpl$2(), _el$10 = _el$9.firstChild;
|
|
1881
|
+
_el$9.$$click = () => {
|
|
1876
1882
|
data.options.exit();
|
|
1877
1883
|
};
|
|
1878
|
-
insert(_el$
|
|
1879
|
-
insert(_el$
|
|
1884
|
+
insert(_el$10, () => data.t("Exit"));
|
|
1885
|
+
insert(_el$9, createComponent(Icon, {
|
|
1880
1886
|
"class": "control-panel__button__icon",
|
|
1881
1887
|
get children() {
|
|
1882
1888
|
return Icon.Exit();
|
|
1883
1889
|
}
|
|
1884
1890
|
}), null);
|
|
1885
|
-
createRenderEffect(() => setAttribute(_el$
|
|
1886
|
-
return _el$
|
|
1891
|
+
createRenderEffect(() => setAttribute(_el$9, "title", data.t("Exit")));
|
|
1892
|
+
return _el$9;
|
|
1887
1893
|
})(), createComponent(Show, {
|
|
1888
1894
|
get when() {
|
|
1889
1895
|
return data.media.hyperWide();
|
|
1890
1896
|
},
|
|
1891
1897
|
get children() {
|
|
1892
|
-
const _el$
|
|
1893
|
-
_el$
|
|
1898
|
+
const _el$11 = _tmpl$3();
|
|
1899
|
+
_el$11.$$click = () => {
|
|
1894
1900
|
props.closeDropdown();
|
|
1895
1901
|
};
|
|
1896
|
-
insert(_el$
|
|
1902
|
+
insert(_el$11, createComponent(Icon, {
|
|
1897
1903
|
get children() {
|
|
1898
1904
|
return Icon.Close();
|
|
1899
1905
|
}
|
|
1900
1906
|
}));
|
|
1901
|
-
createRenderEffect(() => setAttribute(_el$
|
|
1902
|
-
return _el$
|
|
1907
|
+
createRenderEffect(() => setAttribute(_el$11, "title", data.t("CloseMenu")));
|
|
1908
|
+
return _el$11;
|
|
1903
1909
|
}
|
|
1904
1910
|
})];
|
|
1905
1911
|
};
|
|
@@ -1941,6 +1947,9 @@ var _tmpl$6 = /* @__PURE__ */ template(`<svg><path d="M13.25 12a1.25 1.25 0 1 1-
|
|
|
1941
1947
|
var _tmpl$7 = /* @__PURE__ */ template(`<svg><path d="m15.75 8.75 3.5 3.25-3.5 3.25M19 12h-8.25M15.25 4.75h-8.5a2 2 0 0 0-2 2v10.5a2 2 0 0 0 2 2h8.5"></svg>`, false, true);
|
|
1942
1948
|
var _tmpl$8 = /* @__PURE__ */ template(`<svg><path d="M4.75 5.75h14.5M4.75 18.25h14.5M4.75 12h14.5"></svg>`, false, true);
|
|
1943
1949
|
var _tmpl$9 = /* @__PURE__ */ template(`<svg><path d="m17.25 6.75-10.5 10.5M6.75 6.75l10.5 10.5"></svg>`, false, true);
|
|
1950
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<svg><path d="M4.75 6.75a2 2 0 0 1 2-2h10.5a2 2 0 0 1 2 2v10.5a2 2 0 0 1-2 2H6.75a2 2 0 0 1-2-2V6.75Z"></svg>`, false, true);
|
|
1951
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<svg><path d="m15.25 12-5.5-3.25v6.5l5.5-3.25Z"></svg>`, false, true);
|
|
1952
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<svg><rect width="12.5" height="12.5" x="5.75" y="5.75" rx="1"></svg>`, false, true);
|
|
1944
1953
|
var Icon = (props) => {
|
|
1945
1954
|
return (() => {
|
|
1946
1955
|
const _el$ = _tmpl$5();
|
|
@@ -1967,6 +1976,12 @@ Icon.Menu = () => {
|
|
|
1967
1976
|
Icon.Close = () => {
|
|
1968
1977
|
return _tmpl$9();
|
|
1969
1978
|
};
|
|
1979
|
+
Icon.Play = () => {
|
|
1980
|
+
return [_tmpl$10(), _tmpl$11()];
|
|
1981
|
+
};
|
|
1982
|
+
Icon.Stop = () => {
|
|
1983
|
+
return _tmpl$12();
|
|
1984
|
+
};
|
|
1970
1985
|
|
|
1971
1986
|
// src/actions.ts
|
|
1972
1987
|
var clickOutside = (node, handler) => {
|
|
@@ -1976,7 +1991,7 @@ var clickOutside = (node, handler) => {
|
|
|
1976
1991
|
};
|
|
1977
1992
|
|
|
1978
1993
|
// src/components/Modal.tsx
|
|
1979
|
-
var _tmpl$
|
|
1994
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<div role="dialog" class="dialog">`);
|
|
1980
1995
|
var Modal = (props) => {
|
|
1981
1996
|
let modalWindow;
|
|
1982
1997
|
const handleKeydown = (event) => {
|
|
@@ -2012,7 +2027,7 @@ var Modal = (props) => {
|
|
|
2012
2027
|
return props.isOpen();
|
|
2013
2028
|
},
|
|
2014
2029
|
get children() {
|
|
2015
|
-
const _el$ = _tmpl$
|
|
2030
|
+
const _el$ = _tmpl$13();
|
|
2016
2031
|
use((element) => {
|
|
2017
2032
|
modalWindow = element;
|
|
2018
2033
|
clickOutside(element, close);
|
|
@@ -2144,7 +2159,7 @@ var TEXT_SPEED_MAP = {
|
|
|
2144
2159
|
};
|
|
2145
2160
|
|
|
2146
2161
|
// src/components/Typewriter.tsx
|
|
2147
|
-
var _tmpl$
|
|
2162
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<span>`);
|
|
2148
2163
|
var PRM = matchMedia("(prefers-reduced-motion: reduce)");
|
|
2149
2164
|
var createTypewriter = ({
|
|
2150
2165
|
resolve
|
|
@@ -2186,7 +2201,7 @@ var createTypewriter = ({
|
|
|
2186
2201
|
bypassed = false;
|
|
2187
2202
|
});
|
|
2188
2203
|
return (() => {
|
|
2189
|
-
const _el$ = _tmpl$
|
|
2204
|
+
const _el$ = _tmpl$14();
|
|
2190
2205
|
const _ref$ = node;
|
|
2191
2206
|
typeof _ref$ === "function" ? use(_ref$, _el$) : node = _el$;
|
|
2192
2207
|
spread(_el$, mergeProps(() => props.attributes), false, false);
|
|
@@ -2212,7 +2227,7 @@ var createTypewriter = ({
|
|
|
2212
2227
|
};
|
|
2213
2228
|
|
|
2214
2229
|
// src/screens/game.tsx
|
|
2215
|
-
var _tmpl$
|
|
2230
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div class="dialog-container"><span class="dialog-fix" aria-hidden="true">​</span><div class="dialog-panel"><span class="dialog-panel-label">`);
|
|
2216
2231
|
var _tmpl$24 = /* @__PURE__ */ template(`<div class="dialog-container"><span class="dialog-fix" aria-hidden="true">​</span><div class="dialog-panel input-dialog-panel"><label for="novely-input" class="input-dialog-label"><span></span><span aria-live="polite" aria-atomic="true"></span></label><button type="submit" class="button dialog-input__button">`);
|
|
2217
2232
|
var _tmpl$33 = /* @__PURE__ */ template(`<div class="dialog-container"><span class="dialog-fix" aria-hidden="true">​</span><div class="dialog-backdrop"></div><div class="dialog-panel exit-dialog-panel"><span class="dialog-panel-label"></span><div class="exit-dialog-panel-buttons"><button type="button" class="button"></button><button type="button" class="button">`);
|
|
2218
2233
|
var _tmpl$43 = /* @__PURE__ */ template(`<button type="button" class="button control-panel__button">`);
|
|
@@ -2386,7 +2401,7 @@ var Game = (props) => {
|
|
|
2386
2401
|
isOpen: () => props.state.choices.visible,
|
|
2387
2402
|
trapFocus: () => !props.state.exitPromptShown,
|
|
2388
2403
|
get children() {
|
|
2389
|
-
const _el$7 = _tmpl$
|
|
2404
|
+
const _el$7 = _tmpl$15(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$10 = _el$9.firstChild;
|
|
2390
2405
|
insert(_el$10, () => props.state.choices.question || " ");
|
|
2391
2406
|
insert(_el$9, createComponent(For, {
|
|
2392
2407
|
get each() {
|
|
@@ -2567,13 +2582,13 @@ var Game = (props) => {
|
|
|
2567
2582
|
delegateEvents(["click", "keydown"]);
|
|
2568
2583
|
|
|
2569
2584
|
// src/screens/loading.tsx
|
|
2570
|
-
var _tmpl$
|
|
2585
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<div class="root loading"><div class="loading__animation"><div></div><div></div><div></div><div>`);
|
|
2571
2586
|
var Loading = () => {
|
|
2572
|
-
return _tmpl$
|
|
2587
|
+
return _tmpl$16();
|
|
2573
2588
|
};
|
|
2574
2589
|
|
|
2575
2590
|
// src/screens/mainmenu.tsx
|
|
2576
|
-
var _tmpl$
|
|
2591
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<div class="root main-menu"><button type="button" class="button main-menu__button"></button><button type="button" class="button main-menu__button"></button><button type="button" class="button main-menu__button"></button><button type="button" class="button main-menu__button">`);
|
|
2577
2592
|
var _tmpl$25 = /* @__PURE__ */ template(`<button>`);
|
|
2578
2593
|
var MainMenu = (props) => {
|
|
2579
2594
|
const data = useData();
|
|
@@ -2584,7 +2599,7 @@ var MainMenu = (props) => {
|
|
|
2584
2599
|
props.setState("screen", screen);
|
|
2585
2600
|
});
|
|
2586
2601
|
return (() => {
|
|
2587
|
-
const _el$ = _tmpl$
|
|
2602
|
+
const _el$ = _tmpl$17(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
|
|
2588
2603
|
addEventListener2(_el$2, "click", data.options.newGame, true);
|
|
2589
2604
|
insert(_el$2, () => data.t("NewGame"));
|
|
2590
2605
|
_el$3.$$click = () => data.options.restore();
|
|
@@ -2615,7 +2630,7 @@ var MainMenu = (props) => {
|
|
|
2615
2630
|
delegateEvents(["click"]);
|
|
2616
2631
|
|
|
2617
2632
|
// src/screens/saves.tsx
|
|
2618
|
-
var _tmpl$
|
|
2633
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<ol class="saves__list">`);
|
|
2619
2634
|
var _tmpl$26 = /* @__PURE__ */ template(`<div class="root saves"><div class="saves__column"><button type="button" class="button saves__button"></button></div><div class="saves__list-container">`);
|
|
2620
2635
|
var _tmpl$34 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
|
|
2621
2636
|
var _tmpl$44 = /* @__PURE__ */ template(`<li class="saves__list-item"><button type="button" class="button saves__button-load"><span></span><span class="saves__button-load__type"></span></button><button type="reset" class="button saves__button-reset"><span>`);
|
|
@@ -2645,7 +2660,7 @@ var Saves = (props) => {
|
|
|
2645
2660
|
})();
|
|
2646
2661
|
},
|
|
2647
2662
|
get children() {
|
|
2648
|
-
const _el$5 = _tmpl$
|
|
2663
|
+
const _el$5 = _tmpl$18();
|
|
2649
2664
|
insert(_el$5, createComponent(For, {
|
|
2650
2665
|
get each() {
|
|
2651
2666
|
return saves();
|
|
@@ -2692,7 +2707,7 @@ var Saves = (props) => {
|
|
|
2692
2707
|
delegateEvents(["click"]);
|
|
2693
2708
|
|
|
2694
2709
|
// src/screens/settings.tsx
|
|
2695
|
-
var _tmpl$
|
|
2710
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div class="root settings"><div class="settings__column"><button type="button" class="button settings__button"></button><button type="button" class="button settings__button"></button></div><div class="settings__column"><div class="select"><label class="select__label"></label><select class="select__select"></select></div><div class="select"><label class="select__label"></label><select class="select__select">`);
|
|
2696
2711
|
var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
|
|
2697
2712
|
var Settings = (props) => {
|
|
2698
2713
|
const data = useData();
|
|
@@ -2722,7 +2737,7 @@ var Settings = (props) => {
|
|
|
2722
2737
|
const languageSelectID = createUniqueId();
|
|
2723
2738
|
const speedSelectID = createUniqueId();
|
|
2724
2739
|
return (() => {
|
|
2725
|
-
const _el$ = _tmpl$
|
|
2740
|
+
const _el$ = _tmpl$19(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$10 = _el$9.firstChild, _el$11 = _el$10.nextSibling;
|
|
2726
2741
|
_el$3.$$click = () => props.setState("screen", "mainmenu");
|
|
2727
2742
|
insert(_el$3, () => data.t("HomeScreen"));
|
|
2728
2743
|
_el$4.$$click = () => data.options.restore();
|
|
@@ -2763,7 +2778,7 @@ var Settings = (props) => {
|
|
|
2763
2778
|
delegateEvents(["click"]);
|
|
2764
2779
|
|
|
2765
2780
|
// src/renderer.tsx
|
|
2766
|
-
var _tmpl$
|
|
2781
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<div>`);
|
|
2767
2782
|
var _tmpl$28 = /* @__PURE__ */ template(`<canvas>`);
|
|
2768
2783
|
var _tmpl$35 = /* @__PURE__ */ template(`<input type="text" name="novely-input" required autocomplete="off">`);
|
|
2769
2784
|
var createSolidRenderer = ({
|
|
@@ -2829,7 +2844,7 @@ var createSolidRenderer = ({
|
|
|
2829
2844
|
}
|
|
2830
2845
|
});
|
|
2831
2846
|
return (() => {
|
|
2832
|
-
const _el$ = _tmpl$
|
|
2847
|
+
const _el$ = _tmpl$20();
|
|
2833
2848
|
const _ref$ = root;
|
|
2834
2849
|
typeof _ref$ === "function" ? use(_ref$, _el$) : root = _el$;
|
|
2835
2850
|
insert(_el$, createComponent(Provider, {
|
|
@@ -3167,7 +3182,7 @@ var createSolidRenderer = ({
|
|
|
3167
3182
|
clear(), setState("layers", id, void 0);
|
|
3168
3183
|
};
|
|
3169
3184
|
const element = insert2 ? (() => {
|
|
3170
|
-
const _el$4 = _tmpl$
|
|
3185
|
+
const _el$4 = _tmpl$20();
|
|
3171
3186
|
setAttribute(_el$4, "id", id);
|
|
3172
3187
|
return _el$4;
|
|
3173
3188
|
})() : null;
|
package/dist/styles/index.css
CHANGED
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
.control-panel__button {
|
|
135
135
|
border: 2px solid var(--novely-button-border-color, #ffc7df);
|
|
136
136
|
justify-content: center;
|
|
137
|
+
align-items: center;
|
|
137
138
|
height: 2rem;
|
|
138
139
|
margin: 0;
|
|
139
140
|
padding: .2rem .4rem;
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
.control-panel__button--auto-mode {
|
|
146
147
|
display: none;
|
|
147
148
|
}
|
|
148
|
-
@media (min-aspect-ratio: .26) or (max-aspect-ratio: .1) {
|
|
149
|
+
@media (max-aspect-ratio: .8) and ((min-aspect-ratio: .26) or (max-aspect-ratio: .1)) {
|
|
149
150
|
.control-panel__button__icon {
|
|
150
151
|
display: block;
|
|
151
152
|
}
|
|
@@ -161,7 +162,7 @@
|
|
|
161
162
|
}
|
|
162
163
|
@media (prefers-reduced-motion: no-preference) {
|
|
163
164
|
.control-panel__button--auto-mode {
|
|
164
|
-
display:
|
|
165
|
+
display: flex;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|