@novely/solid-renderer 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Icon.d.ts +2 -0
- package/dist/index.jsx +89 -68
- package/dist/renderer.d.ts +6 -1
- package/dist/screens/settings.d.ts +1 -0
- package/dist/styles/index.css +13 -0
- package/package.json +1 -1
package/dist/index.jsx
CHANGED
|
@@ -1827,9 +1827,7 @@ var ControlPanelButtons = (props) => {
|
|
|
1827
1827
|
insert(_el$2, () => data.t("GoBack"));
|
|
1828
1828
|
insert(_el$, createComponent(Icon, {
|
|
1829
1829
|
"class": "control-panel__button__icon",
|
|
1830
|
-
|
|
1831
|
-
return Icon.Back();
|
|
1832
|
-
}
|
|
1830
|
+
children: Icon.Back()
|
|
1833
1831
|
}), null);
|
|
1834
1832
|
createRenderEffect(() => setAttribute(_el$, "title", data.t("GoBack")));
|
|
1835
1833
|
return _el$;
|
|
@@ -1841,9 +1839,7 @@ var ControlPanelButtons = (props) => {
|
|
|
1841
1839
|
insert(_el$4, () => data.t("DoSave"));
|
|
1842
1840
|
insert(_el$3, createComponent(Icon, {
|
|
1843
1841
|
"class": "control-panel__button__icon",
|
|
1844
|
-
|
|
1845
|
-
return Icon.Save();
|
|
1846
|
-
}
|
|
1842
|
+
children: Icon.Save()
|
|
1847
1843
|
}), null);
|
|
1848
1844
|
createRenderEffect(() => setAttribute(_el$3, "title", data.t("DoSave")));
|
|
1849
1845
|
return _el$3;
|
|
@@ -1870,9 +1866,7 @@ var ControlPanelButtons = (props) => {
|
|
|
1870
1866
|
insert(_el$8, () => data.t("Settings"));
|
|
1871
1867
|
insert(_el$7, createComponent(Icon, {
|
|
1872
1868
|
"class": "control-panel__button__icon",
|
|
1873
|
-
|
|
1874
|
-
return Icon.Settings();
|
|
1875
|
-
}
|
|
1869
|
+
children: Icon.Settings()
|
|
1876
1870
|
}), null);
|
|
1877
1871
|
createRenderEffect(() => setAttribute(_el$7, "title", data.t("Settings")));
|
|
1878
1872
|
return _el$7;
|
|
@@ -1884,9 +1878,7 @@ var ControlPanelButtons = (props) => {
|
|
|
1884
1878
|
insert(_el$10, () => data.t("Exit"));
|
|
1885
1879
|
insert(_el$9, createComponent(Icon, {
|
|
1886
1880
|
"class": "control-panel__button__icon",
|
|
1887
|
-
|
|
1888
|
-
return Icon.Exit();
|
|
1889
|
-
}
|
|
1881
|
+
children: Icon.Exit()
|
|
1890
1882
|
}), null);
|
|
1891
1883
|
createRenderEffect(() => setAttribute(_el$9, "title", data.t("Exit")));
|
|
1892
1884
|
return _el$9;
|
|
@@ -1900,9 +1892,7 @@ var ControlPanelButtons = (props) => {
|
|
|
1900
1892
|
props.closeDropdown();
|
|
1901
1893
|
};
|
|
1902
1894
|
insert(_el$11, createComponent(Icon, {
|
|
1903
|
-
|
|
1904
|
-
return Icon.Close();
|
|
1905
|
-
}
|
|
1895
|
+
children: Icon.Close()
|
|
1906
1896
|
}));
|
|
1907
1897
|
createRenderEffect(() => setAttribute(_el$11, "title", data.t("CloseMenu")));
|
|
1908
1898
|
return _el$11;
|
|
@@ -1950,6 +1940,9 @@ var _tmpl$9 = /* @__PURE__ */ template(`<svg><path d="m17.25 6.75-10.5 10.5M6.75
|
|
|
1950
1940
|
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
1941
|
var _tmpl$11 = /* @__PURE__ */ template(`<svg><path d="m15.25 12-5.5-3.25v6.5l5.5-3.25Z"></svg>`, false, true);
|
|
1952
1942
|
var _tmpl$12 = /* @__PURE__ */ template(`<svg><rect width="12.5" height="12.5" x="5.75" y="5.75" rx="1"></svg>`, false, true);
|
|
1943
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<svg><path d="M11.25 19.25h-3.5a2 2 0 0 1-2-2V6.75a2 2 0 0 1 2-2H14L18.25 9v2.25M17 14.75v4.5M19.25 17h-4.5"></svg>`, false, true);
|
|
1944
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<svg><path d="M18 9.25h-4.25V5"></svg>`, false, true);
|
|
1945
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<svg><path d="M9.75 6.75h-3a2 2 0 0 0-2 2v8.5a2 2 0 0 0 2 2h6.5a2 2 0 0 0 2-2v-5m-5.5-5.5 5.5 5.5m-5.5-5.5v3.5a2 2 0 0 0 2 2h3.5m-3.5-7.5h2l5.5 5.5v5a2 2 0 0 1-2 2H15.5"></svg>`, false, true);
|
|
1953
1946
|
var Icon = (props) => {
|
|
1954
1947
|
return (() => {
|
|
1955
1948
|
const _el$ = _tmpl$5();
|
|
@@ -1982,6 +1975,12 @@ Icon.Play = () => {
|
|
|
1982
1975
|
Icon.Stop = () => {
|
|
1983
1976
|
return _tmpl$12();
|
|
1984
1977
|
};
|
|
1978
|
+
Icon.FilePlus = () => {
|
|
1979
|
+
return [_tmpl$13(), _tmpl$14()];
|
|
1980
|
+
};
|
|
1981
|
+
Icon.Files = () => {
|
|
1982
|
+
return _tmpl$15();
|
|
1983
|
+
};
|
|
1985
1984
|
|
|
1986
1985
|
// src/actions.ts
|
|
1987
1986
|
var clickOutside = (node, handler) => {
|
|
@@ -1991,7 +1990,7 @@ var clickOutside = (node, handler) => {
|
|
|
1991
1990
|
};
|
|
1992
1991
|
|
|
1993
1992
|
// src/components/Modal.tsx
|
|
1994
|
-
var _tmpl$
|
|
1993
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<div role="dialog" class="dialog">`);
|
|
1995
1994
|
var Modal = (props) => {
|
|
1996
1995
|
let modalWindow;
|
|
1997
1996
|
const handleKeydown = (event) => {
|
|
@@ -2027,7 +2026,7 @@ var Modal = (props) => {
|
|
|
2027
2026
|
return props.isOpen();
|
|
2028
2027
|
},
|
|
2029
2028
|
get children() {
|
|
2030
|
-
const _el$ = _tmpl$
|
|
2029
|
+
const _el$ = _tmpl$16();
|
|
2031
2030
|
use((element) => {
|
|
2032
2031
|
modalWindow = element;
|
|
2033
2032
|
clickOutside(element, close);
|
|
@@ -2159,7 +2158,7 @@ var TEXT_SPEED_MAP = {
|
|
|
2159
2158
|
};
|
|
2160
2159
|
|
|
2161
2160
|
// src/components/Typewriter.tsx
|
|
2162
|
-
var _tmpl$
|
|
2161
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<span>`);
|
|
2163
2162
|
var PRM = matchMedia("(prefers-reduced-motion: reduce)");
|
|
2164
2163
|
var createTypewriter = ({
|
|
2165
2164
|
resolve
|
|
@@ -2201,7 +2200,7 @@ var createTypewriter = ({
|
|
|
2201
2200
|
bypassed = false;
|
|
2202
2201
|
});
|
|
2203
2202
|
return (() => {
|
|
2204
|
-
const _el$ = _tmpl$
|
|
2203
|
+
const _el$ = _tmpl$17();
|
|
2205
2204
|
const _ref$ = node;
|
|
2206
2205
|
typeof _ref$ === "function" ? use(_ref$, _el$) : node = _el$;
|
|
2207
2206
|
spread(_el$, mergeProps(() => props.attributes), false, false);
|
|
@@ -2227,7 +2226,7 @@ var createTypewriter = ({
|
|
|
2227
2226
|
};
|
|
2228
2227
|
|
|
2229
2228
|
// src/screens/game.tsx
|
|
2230
|
-
var _tmpl$
|
|
2229
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<div class="dialog-container"><span class="dialog-fix" aria-hidden="true">​</span><div class="dialog-panel"><span class="dialog-panel-label">`);
|
|
2231
2230
|
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">`);
|
|
2232
2231
|
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">`);
|
|
2233
2232
|
var _tmpl$43 = /* @__PURE__ */ template(`<button type="button" class="button control-panel__button">`);
|
|
@@ -2401,7 +2400,7 @@ var Game = (props) => {
|
|
|
2401
2400
|
isOpen: () => props.state.choices.visible,
|
|
2402
2401
|
trapFocus: () => !props.state.exitPromptShown,
|
|
2403
2402
|
get children() {
|
|
2404
|
-
const _el$7 = _tmpl$
|
|
2403
|
+
const _el$7 = _tmpl$18(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$10 = _el$9.firstChild;
|
|
2405
2404
|
insert(_el$10, () => props.state.choices.question || " ");
|
|
2406
2405
|
insert(_el$9, createComponent(For, {
|
|
2407
2406
|
get each() {
|
|
@@ -2582,13 +2581,13 @@ var Game = (props) => {
|
|
|
2582
2581
|
delegateEvents(["click", "keydown"]);
|
|
2583
2582
|
|
|
2584
2583
|
// src/screens/loading.tsx
|
|
2585
|
-
var _tmpl$
|
|
2584
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div class="root loading"><div class="loading__animation"><div></div><div></div><div></div><div>`);
|
|
2586
2585
|
var Loading = () => {
|
|
2587
|
-
return _tmpl$
|
|
2586
|
+
return _tmpl$19();
|
|
2588
2587
|
};
|
|
2589
2588
|
|
|
2590
2589
|
// src/screens/mainmenu.tsx
|
|
2591
|
-
var _tmpl$
|
|
2590
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<div class="root main-menu"><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text">`);
|
|
2592
2591
|
var _tmpl$25 = /* @__PURE__ */ template(`<button>`);
|
|
2593
2592
|
var MainMenu = (props) => {
|
|
2594
2593
|
const data = useData();
|
|
@@ -2599,15 +2598,27 @@ var MainMenu = (props) => {
|
|
|
2599
2598
|
props.setState("screen", screen);
|
|
2600
2599
|
});
|
|
2601
2600
|
return (() => {
|
|
2602
|
-
const _el$ = _tmpl$
|
|
2601
|
+
const _el$ = _tmpl$20(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild;
|
|
2603
2602
|
addEventListener2(_el$2, "click", data.options.newGame, true);
|
|
2604
|
-
insert(_el$
|
|
2605
|
-
_el$
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
_el$5
|
|
2610
|
-
insert(_el$
|
|
2603
|
+
insert(_el$3, () => data.t("NewGame"));
|
|
2604
|
+
insert(_el$2, createComponent(Icon, {
|
|
2605
|
+
children: Icon.FilePlus()
|
|
2606
|
+
}), null);
|
|
2607
|
+
_el$4.$$click = () => data.options.restore();
|
|
2608
|
+
insert(_el$5, () => data.t("LoadSave"));
|
|
2609
|
+
insert(_el$4, createComponent(Icon, {
|
|
2610
|
+
children: Icon.Play()
|
|
2611
|
+
}), null);
|
|
2612
|
+
_el$6.$$click = () => props.setState("screen", "saves");
|
|
2613
|
+
insert(_el$7, () => data.t("Saves"));
|
|
2614
|
+
insert(_el$6, createComponent(Icon, {
|
|
2615
|
+
children: Icon.Files()
|
|
2616
|
+
}), null);
|
|
2617
|
+
_el$8.$$click = () => props.setState("screen", "settings");
|
|
2618
|
+
insert(_el$9, () => data.t("Settings"));
|
|
2619
|
+
insert(_el$8, createComponent(Icon, {
|
|
2620
|
+
children: Icon.Settings()
|
|
2621
|
+
}), null);
|
|
2611
2622
|
insert(_el$, createComponent(Show, {
|
|
2612
2623
|
get when() {
|
|
2613
2624
|
return language();
|
|
@@ -2618,9 +2629,9 @@ var MainMenu = (props) => {
|
|
|
2618
2629
|
return props.state.mainmenu.items;
|
|
2619
2630
|
},
|
|
2620
2631
|
children: (item) => (() => {
|
|
2621
|
-
const _el$
|
|
2622
|
-
spread(_el$
|
|
2623
|
-
return _el$
|
|
2632
|
+
const _el$10 = _tmpl$25();
|
|
2633
|
+
spread(_el$10, mergeProps(() => item(goto)), false, false);
|
|
2634
|
+
return _el$10;
|
|
2624
2635
|
})()
|
|
2625
2636
|
})
|
|
2626
2637
|
}), null);
|
|
@@ -2630,7 +2641,7 @@ var MainMenu = (props) => {
|
|
|
2630
2641
|
delegateEvents(["click"]);
|
|
2631
2642
|
|
|
2632
2643
|
// src/screens/saves.tsx
|
|
2633
|
-
var _tmpl$
|
|
2644
|
+
var _tmpl$21 = /* @__PURE__ */ template(`<ol class="saves__list">`);
|
|
2634
2645
|
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">`);
|
|
2635
2646
|
var _tmpl$34 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
|
|
2636
2647
|
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>`);
|
|
@@ -2660,7 +2671,7 @@ var Saves = (props) => {
|
|
|
2660
2671
|
})();
|
|
2661
2672
|
},
|
|
2662
2673
|
get children() {
|
|
2663
|
-
const _el$5 = _tmpl$
|
|
2674
|
+
const _el$5 = _tmpl$21();
|
|
2664
2675
|
insert(_el$5, createComponent(For, {
|
|
2665
2676
|
get each() {
|
|
2666
2677
|
return saves();
|
|
@@ -2707,15 +2718,18 @@ var Saves = (props) => {
|
|
|
2707
2718
|
delegateEvents(["click"]);
|
|
2708
2719
|
|
|
2709
2720
|
// src/screens/settings.tsx
|
|
2710
|
-
var _tmpl$
|
|
2711
|
-
var _tmpl$
|
|
2721
|
+
var _tmpl$27 = /* @__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"><span>🌎</span> </label><select class="select__select"></select></div><div class="select"><label class="select__label"><span>⚡</span> </label><select class="select__select">`);
|
|
2722
|
+
var _tmpl$28 = /* @__PURE__ */ template(`<option>`);
|
|
2712
2723
|
var Settings = (props) => {
|
|
2713
2724
|
const data = useData();
|
|
2714
2725
|
const language = () => data.storeData().meta[0];
|
|
2715
2726
|
const textSpeed = () => data.storeData().meta[1];
|
|
2716
|
-
const
|
|
2717
|
-
|
|
2718
|
-
|
|
2727
|
+
const getLanguageName = (lang) => {
|
|
2728
|
+
const intl = new Intl.DisplayNames([props.useNativeLanguageNames ? lang : language()], {
|
|
2729
|
+
type: "language"
|
|
2730
|
+
});
|
|
2731
|
+
return intl.of(lang) || lang;
|
|
2732
|
+
};
|
|
2719
2733
|
const onLanguageSelect = ({
|
|
2720
2734
|
currentTarget: {
|
|
2721
2735
|
value
|
|
@@ -2737,39 +2751,41 @@ var Settings = (props) => {
|
|
|
2737
2751
|
const languageSelectID = createUniqueId();
|
|
2738
2752
|
const speedSelectID = createUniqueId();
|
|
2739
2753
|
return (() => {
|
|
2740
|
-
const _el$ = _tmpl$
|
|
2754
|
+
const _el$ = _tmpl$27(), _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.firstChild, _el$9 = _el$8.nextSibling, _el$10 = _el$7.nextSibling, _el$11 = _el$6.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$12.nextSibling;
|
|
2741
2755
|
_el$3.$$click = () => props.setState("screen", "mainmenu");
|
|
2742
2756
|
insert(_el$3, () => data.t("HomeScreen"));
|
|
2743
2757
|
_el$4.$$click = () => data.options.restore();
|
|
2744
2758
|
insert(_el$4, () => data.t("ToTheGame"));
|
|
2745
2759
|
setAttribute(_el$7, "for", languageSelectID);
|
|
2746
|
-
|
|
2747
|
-
_el$
|
|
2748
|
-
|
|
2749
|
-
|
|
2760
|
+
setAttribute(_el$8, "aria-hidden", true);
|
|
2761
|
+
insert(_el$7, () => data.t("Language"), null);
|
|
2762
|
+
_el$10.addEventListener("change", onLanguageSelect);
|
|
2763
|
+
setAttribute(_el$10, "id", languageSelectID);
|
|
2764
|
+
insert(_el$10, createComponent(For, {
|
|
2750
2765
|
get each() {
|
|
2751
2766
|
return data.options.languages;
|
|
2752
2767
|
},
|
|
2753
2768
|
children: (lang) => (() => {
|
|
2754
|
-
const _el$
|
|
2755
|
-
_el$
|
|
2756
|
-
insert(_el$
|
|
2757
|
-
createRenderEffect(() => _el$
|
|
2758
|
-
return _el$
|
|
2769
|
+
const _el$16 = _tmpl$28();
|
|
2770
|
+
_el$16.value = lang;
|
|
2771
|
+
insert(_el$16, () => capitalize(getLanguageName(lang)));
|
|
2772
|
+
createRenderEffect(() => _el$16.selected = lang === language());
|
|
2773
|
+
return _el$16;
|
|
2759
2774
|
})()
|
|
2760
2775
|
}));
|
|
2761
|
-
setAttribute(_el$
|
|
2762
|
-
|
|
2763
|
-
_el$
|
|
2764
|
-
|
|
2765
|
-
|
|
2776
|
+
setAttribute(_el$12, "for", speedSelectID);
|
|
2777
|
+
setAttribute(_el$13, "aria-hidden", true);
|
|
2778
|
+
insert(_el$12, () => data.t("TextSpeed"), null);
|
|
2779
|
+
_el$15.addEventListener("change", onSpeedSelect);
|
|
2780
|
+
setAttribute(_el$15, "id", speedSelectID);
|
|
2781
|
+
insert(_el$15, createComponent(For, {
|
|
2766
2782
|
each: ["Slow", "Medium", "Fast", "Auto"],
|
|
2767
2783
|
children: (speed) => (() => {
|
|
2768
|
-
const _el$
|
|
2769
|
-
_el$
|
|
2770
|
-
insert(_el$
|
|
2771
|
-
createRenderEffect(() => _el$
|
|
2772
|
-
return _el$
|
|
2784
|
+
const _el$17 = _tmpl$28();
|
|
2785
|
+
_el$17.value = speed;
|
|
2786
|
+
insert(_el$17, () => data.t("TextSpeed" + speed));
|
|
2787
|
+
createRenderEffect(() => _el$17.selected = speed === textSpeed());
|
|
2788
|
+
return _el$17;
|
|
2773
2789
|
})()
|
|
2774
2790
|
}));
|
|
2775
2791
|
return _el$;
|
|
@@ -2778,13 +2794,14 @@ var Settings = (props) => {
|
|
|
2778
2794
|
delegateEvents(["click"]);
|
|
2779
2795
|
|
|
2780
2796
|
// src/renderer.tsx
|
|
2781
|
-
var _tmpl$
|
|
2782
|
-
var _tmpl$
|
|
2797
|
+
var _tmpl$29 = /* @__PURE__ */ template(`<div>`);
|
|
2798
|
+
var _tmpl$210 = /* @__PURE__ */ template(`<canvas>`);
|
|
2783
2799
|
var _tmpl$35 = /* @__PURE__ */ template(`<input type="text" name="novely-input" required autocomplete="off">`);
|
|
2784
2800
|
var createSolidRenderer = ({
|
|
2785
2801
|
fullscreen = false,
|
|
2786
2802
|
controls = "outside",
|
|
2787
2803
|
skipTypewriterWhenGoingBack = true,
|
|
2804
|
+
useNativeLanguageNames = true,
|
|
2788
2805
|
target = document.body
|
|
2789
2806
|
} = {}) => {
|
|
2790
2807
|
const [state, setState] = createStore({
|
|
@@ -2844,7 +2861,7 @@ var createSolidRenderer = ({
|
|
|
2844
2861
|
}
|
|
2845
2862
|
});
|
|
2846
2863
|
return (() => {
|
|
2847
|
-
const _el$ = _tmpl$
|
|
2864
|
+
const _el$ = _tmpl$29();
|
|
2848
2865
|
const _ref$ = root;
|
|
2849
2866
|
typeof _ref$ === "function" ? use(_ref$, _el$) : root = _el$;
|
|
2850
2867
|
insert(_el$, createComponent(Provider, {
|
|
@@ -2899,7 +2916,8 @@ var createSolidRenderer = ({
|
|
|
2899
2916
|
},
|
|
2900
2917
|
get children() {
|
|
2901
2918
|
return createComponent(Settings, {
|
|
2902
|
-
setState
|
|
2919
|
+
setState,
|
|
2920
|
+
useNativeLanguageNames
|
|
2903
2921
|
});
|
|
2904
2922
|
}
|
|
2905
2923
|
}), createComponent(Match, {
|
|
@@ -2960,7 +2978,7 @@ var createSolidRenderer = ({
|
|
|
2960
2978
|
if (store.characters[character])
|
|
2961
2979
|
return store.characters[character];
|
|
2962
2980
|
const canvas = (() => {
|
|
2963
|
-
const _el$2 = _tmpl$
|
|
2981
|
+
const _el$2 = _tmpl$210();
|
|
2964
2982
|
setAttribute(_el$2, "data-character", character);
|
|
2965
2983
|
return _el$2;
|
|
2966
2984
|
})();
|
|
@@ -3182,7 +3200,7 @@ var createSolidRenderer = ({
|
|
|
3182
3200
|
clear(), setState("layers", id, void 0);
|
|
3183
3201
|
};
|
|
3184
3202
|
const element = insert2 ? (() => {
|
|
3185
|
-
const _el$4 = _tmpl$
|
|
3203
|
+
const _el$4 = _tmpl$29();
|
|
3186
3204
|
setAttribute(_el$4, "id", id);
|
|
3187
3205
|
return _el$4;
|
|
3188
3206
|
})() : null;
|
|
@@ -3258,6 +3276,9 @@ var createSolidRenderer = ({
|
|
|
3258
3276
|
img.addEventListener("error", reject);
|
|
3259
3277
|
});
|
|
3260
3278
|
}));
|
|
3279
|
+
},
|
|
3280
|
+
preloadImage: (image) => {
|
|
3281
|
+
return document.createElement("img").src = image;
|
|
3261
3282
|
}
|
|
3262
3283
|
}
|
|
3263
3284
|
};
|
package/dist/renderer.d.ts
CHANGED
|
@@ -158,8 +158,13 @@ interface CreateSolidRendererOptions {
|
|
|
158
158
|
* @default document.body
|
|
159
159
|
*/
|
|
160
160
|
target?: MountableElement;
|
|
161
|
+
/**
|
|
162
|
+
* In the settings screen languages will be shown in it's own language instead of selected language
|
|
163
|
+
* @default true
|
|
164
|
+
*/
|
|
165
|
+
useNativeLanguageNames?: boolean;
|
|
161
166
|
}
|
|
162
|
-
declare const createSolidRenderer: ({ fullscreen, controls, skipTypewriterWhenGoingBack, target }?: CreateSolidRendererOptions) => {
|
|
167
|
+
declare const createSolidRenderer: ({ fullscreen, controls, skipTypewriterWhenGoingBack, useNativeLanguageNames, target }?: CreateSolidRendererOptions) => {
|
|
163
168
|
createRenderer(init: RendererInit): Renderer;
|
|
164
169
|
registerScreen(name: string, screen: StateScreen): void;
|
|
165
170
|
registerMainmenuItem(fn: StateMainmenuItem): void;
|
|
@@ -3,6 +3,7 @@ import type { SetStoreFunction } from 'solid-js/store';
|
|
|
3
3
|
import type { State } from '../renderer';
|
|
4
4
|
interface SettingsProps {
|
|
5
5
|
setState: SetStoreFunction<State>;
|
|
6
|
+
useNativeLanguageNames: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare const Settings: VoidComponent<SettingsProps>;
|
|
8
9
|
export { Settings };
|
package/dist/styles/index.css
CHANGED
|
@@ -490,7 +490,20 @@
|
|
|
490
490
|
|
|
491
491
|
/* src/styles/main-menu/button/button.css */
|
|
492
492
|
.main-menu__button {
|
|
493
|
+
grid-template-rows: 1fr;
|
|
494
|
+
grid-template-columns: calc(100% - 24px) 24px;
|
|
495
|
+
align-content: space-around;
|
|
496
|
+
justify-items: center;
|
|
493
497
|
min-width: 30vw;
|
|
498
|
+
display: grid;
|
|
499
|
+
}
|
|
500
|
+
@media (max-aspect-ratio: .26) {
|
|
501
|
+
.main-menu__button {
|
|
502
|
+
grid-template-columns: 1fr;
|
|
503
|
+
}
|
|
504
|
+
.main-menu__button__text {
|
|
505
|
+
display: none;
|
|
506
|
+
}
|
|
494
507
|
}
|
|
495
508
|
|
|
496
509
|
/* src/styles/main-menu/index.css */
|