@novely/solid-renderer 0.35.3 → 0.35.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.
- package/dist/components/Icon.d.ts +2 -0
- package/dist/components/Range.d.ts +14 -0
- package/dist/components/Select copy.d.ts +14 -0
- package/dist/components/Select.d.ts +14 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.jsx +204 -114
- package/dist/styles/index.css +19 -5
- package/package.json +3 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JSX, VoidComponent } from 'solid-js';
|
|
2
|
+
type NativeInputProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'class' | 'id' | 'type'>;
|
|
3
|
+
type RangeProps = NativeInputProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Icon HTML string
|
|
6
|
+
*/
|
|
7
|
+
icon: string;
|
|
8
|
+
/**
|
|
9
|
+
* Label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Range: VoidComponent<RangeProps>;
|
|
14
|
+
export { Range };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JSX, FlowComponent } from 'solid-js';
|
|
2
|
+
type NativeSelectProps = Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, 'class' | 'id'>;
|
|
3
|
+
type SelectProps = NativeSelectProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Icon HTML string
|
|
6
|
+
*/
|
|
7
|
+
icon: string;
|
|
8
|
+
/**
|
|
9
|
+
* Label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Select: FlowComponent<SelectProps>;
|
|
14
|
+
export { Select };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JSX, FlowComponent } from 'solid-js';
|
|
2
|
+
type NativeSelectProps = Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, 'class' | 'id'>;
|
|
3
|
+
type SelectProps = NativeSelectProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Icon HTML string
|
|
6
|
+
*/
|
|
7
|
+
icon: string;
|
|
8
|
+
/**
|
|
9
|
+
* Label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Select: FlowComponent<SelectProps>;
|
|
14
|
+
export { Select };
|
package/dist/index.jsx
CHANGED
|
@@ -2236,7 +2236,7 @@ var require_howler = __commonJS({
|
|
|
2236
2236
|
}
|
|
2237
2237
|
});
|
|
2238
2238
|
|
|
2239
|
-
// ../../node_modules/.pnpm/solid-js@1.8.
|
|
2239
|
+
// ../../node_modules/.pnpm/solid-js@1.8.18/node_modules/solid-js/dist/solid.js
|
|
2240
2240
|
var sharedConfig = {
|
|
2241
2241
|
context: void 0,
|
|
2242
2242
|
registry: void 0
|
|
@@ -3323,7 +3323,7 @@ function Match(props) {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
var SuspenseListContext = createContext();
|
|
3325
3325
|
|
|
3326
|
-
// ../../node_modules/.pnpm/solid-js@1.8.
|
|
3326
|
+
// ../../node_modules/.pnpm/solid-js@1.8.18/node_modules/solid-js/web/dist/web.js
|
|
3327
3327
|
var booleans = [
|
|
3328
3328
|
"allowfullscreen",
|
|
3329
3329
|
"async",
|
|
@@ -3750,8 +3750,11 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
3750
3750
|
if (t === "string" || t === "number") {
|
|
3751
3751
|
if (hydrating)
|
|
3752
3752
|
return current;
|
|
3753
|
-
if (t === "number")
|
|
3753
|
+
if (t === "number") {
|
|
3754
3754
|
value = value.toString();
|
|
3755
|
+
if (value === current)
|
|
3756
|
+
return current;
|
|
3757
|
+
}
|
|
3755
3758
|
if (multi) {
|
|
3756
3759
|
let node = current[0];
|
|
3757
3760
|
if (node && node.nodeType === 3) {
|
|
@@ -4683,13 +4686,15 @@ var createRootSetter = (getContext2) => {
|
|
|
4683
4686
|
};
|
|
4684
4687
|
};
|
|
4685
4688
|
var vibrationPossible = /* @__PURE__ */ (() => {
|
|
4686
|
-
let
|
|
4689
|
+
let possible = false;
|
|
4687
4690
|
const onPointerDown = () => {
|
|
4688
|
-
|
|
4689
|
-
|
|
4691
|
+
possible = true;
|
|
4692
|
+
};
|
|
4693
|
+
const isPossible = () => {
|
|
4694
|
+
return possible;
|
|
4690
4695
|
};
|
|
4691
|
-
document.addEventListener("pointerdown", onPointerDown);
|
|
4692
|
-
return
|
|
4696
|
+
document.addEventListener("pointerdown", onPointerDown, { once: true });
|
|
4697
|
+
return isPossible;
|
|
4693
4698
|
})();
|
|
4694
4699
|
var vibrate = (pattern) => {
|
|
4695
4700
|
if (vibrationPossible() && "vibrate" in navigator) {
|
|
@@ -5400,6 +5405,8 @@ var _tmpl$12 = /* @__PURE__ */ template(`<svg><rect width="12.5" height="12.5" x
|
|
|
5400
5405
|
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);
|
|
5401
5406
|
var _tmpl$14 = /* @__PURE__ */ template(`<svg><path d="M18 9.25h-4.25V5"></svg>`, false, true);
|
|
5402
5407
|
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);
|
|
5408
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<svg><path d="M15.25 10.75 12 14.25l-3.25-3.5"></svg>`, false, true);
|
|
5409
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<svg><path d="M15.25 14.25 12 10.75l-3.25 3.5"></svg>`, false, true);
|
|
5403
5410
|
var Icon = (props) => {
|
|
5404
5411
|
return (() => {
|
|
5405
5412
|
const _el$ = _tmpl$5();
|
|
@@ -5438,6 +5445,12 @@ Icon.FilePlus = () => {
|
|
|
5438
5445
|
Icon.Files = () => {
|
|
5439
5446
|
return _tmpl$15();
|
|
5440
5447
|
};
|
|
5448
|
+
Icon.ChevronDown = () => {
|
|
5449
|
+
return _tmpl$16();
|
|
5450
|
+
};
|
|
5451
|
+
Icon.ChevronUp = () => {
|
|
5452
|
+
return _tmpl$17();
|
|
5453
|
+
};
|
|
5441
5454
|
|
|
5442
5455
|
// src/actions.ts
|
|
5443
5456
|
var clickOutside = (node, handler) => {
|
|
@@ -5447,7 +5460,7 @@ var clickOutside = (node, handler) => {
|
|
|
5447
5460
|
};
|
|
5448
5461
|
|
|
5449
5462
|
// src/components/Modal.tsx
|
|
5450
|
-
var _tmpl$
|
|
5463
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<div role="dialog" class="dialog">`);
|
|
5451
5464
|
var Modal = (props) => {
|
|
5452
5465
|
let modalWindow;
|
|
5453
5466
|
const handleKeydown = (event) => {
|
|
@@ -5483,7 +5496,7 @@ var Modal = (props) => {
|
|
|
5483
5496
|
return props.isOpen();
|
|
5484
5497
|
},
|
|
5485
5498
|
get children() {
|
|
5486
|
-
const _el$ = _tmpl$
|
|
5499
|
+
const _el$ = _tmpl$18();
|
|
5487
5500
|
use((element) => {
|
|
5488
5501
|
modalWindow = element;
|
|
5489
5502
|
clickOutside(element, close);
|
|
@@ -5495,7 +5508,7 @@ var Modal = (props) => {
|
|
|
5495
5508
|
});
|
|
5496
5509
|
};
|
|
5497
5510
|
|
|
5498
|
-
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.0.5_solid-js@1.8.
|
|
5511
|
+
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.0.5_solid-js@1.8.18/node_modules/@solid-primitives/transition-group/dist/index.js
|
|
5499
5512
|
var noop2 = () => {
|
|
5500
5513
|
};
|
|
5501
5514
|
var noopTransition = (el, done) => done();
|
|
@@ -5563,10 +5576,10 @@ function createSwitchTransition(source, options) {
|
|
|
5563
5576
|
return returned;
|
|
5564
5577
|
}
|
|
5565
5578
|
|
|
5566
|
-
// ../../node_modules/.pnpm/@solid-primitives+utils@6.2.3_solid-js@1.8.
|
|
5579
|
+
// ../../node_modules/.pnpm/@solid-primitives+utils@6.2.3_solid-js@1.8.18/node_modules/@solid-primitives/utils/dist/chunk/R5675YMU.js
|
|
5567
5580
|
var access = (v) => typeof v === "function" && !v.length ? v() : v;
|
|
5568
5581
|
|
|
5569
|
-
// ../../node_modules/.pnpm/@solid-primitives+refs@1.0.8_solid-js@1.8.
|
|
5582
|
+
// ../../node_modules/.pnpm/@solid-primitives+refs@1.0.8_solid-js@1.8.18/node_modules/@solid-primitives/refs/dist/index.js
|
|
5570
5583
|
var defaultElementPredicate = isServer ? (item) => item != null && typeof item === "object" && "t" in item : (item) => item instanceof Element;
|
|
5571
5584
|
function getFirstChild(value, predicate) {
|
|
5572
5585
|
if (predicate(value))
|
|
@@ -5587,7 +5600,7 @@ function resolveFirst(fn, predicate = defaultElementPredicate, serverPredicate =
|
|
|
5587
5600
|
return createMemo(() => getFirstChild(children2(), isServer ? serverPredicate : predicate));
|
|
5588
5601
|
}
|
|
5589
5602
|
|
|
5590
|
-
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.8.
|
|
5603
|
+
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.8.18/node_modules/solid-transition-group/dist/index.js
|
|
5591
5604
|
function createClassnames(props) {
|
|
5592
5605
|
return createMemo(() => {
|
|
5593
5606
|
const name = props.name || "s";
|
|
@@ -5695,7 +5708,7 @@ var createRetrieved = (fn) => {
|
|
|
5695
5708
|
};
|
|
5696
5709
|
|
|
5697
5710
|
// src/components/Save.tsx
|
|
5698
|
-
var _tmpl$
|
|
5711
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div class="saves__list-item__overlay">`);
|
|
5699
5712
|
var _tmpl$24 = /* @__PURE__ */ template(`<iframe tabindex="-1" class="saves__list-item__iframe" src="about:blank">`);
|
|
5700
5713
|
var _tmpl$33 = /* @__PURE__ */ template(`<li class="saves__list-item"><div class="saves__list-item__load" role="button" tabindex="0"></div><div class="saves__list-item__description"><div></div><div></div></div><button type="reset" class="button saves__button-reset"><span>`);
|
|
5701
5714
|
var _tmpl$43 = /* @__PURE__ */ template(`<div class="saves__list-item__iframe">`);
|
|
@@ -5821,7 +5834,7 @@ var Save = (props) => {
|
|
|
5821
5834
|
return props.overlayShown;
|
|
5822
5835
|
},
|
|
5823
5836
|
get children() {
|
|
5824
|
-
return _tmpl$
|
|
5837
|
+
return _tmpl$19();
|
|
5825
5838
|
}
|
|
5826
5839
|
});
|
|
5827
5840
|
}
|
|
@@ -6023,7 +6036,7 @@ var settingsIcons = {
|
|
|
6023
6036
|
};
|
|
6024
6037
|
|
|
6025
6038
|
// src/components/Typewriter.tsx
|
|
6026
|
-
var _tmpl$
|
|
6039
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<span>`);
|
|
6027
6040
|
var PRM = matchMedia("(prefers-reduced-motion: reduce)");
|
|
6028
6041
|
var createTypewriter = ({
|
|
6029
6042
|
resolve
|
|
@@ -6065,7 +6078,7 @@ var createTypewriter = ({
|
|
|
6065
6078
|
bypassed = false;
|
|
6066
6079
|
});
|
|
6067
6080
|
return (() => {
|
|
6068
|
-
const _el$ = _tmpl$
|
|
6081
|
+
const _el$ = _tmpl$20();
|
|
6069
6082
|
const _ref$ = node;
|
|
6070
6083
|
typeof _ref$ === "function" ? use(_ref$, _el$) : node = _el$;
|
|
6071
6084
|
spread(_el$, mergeProps(() => props.attributes), false, false);
|
|
@@ -6091,11 +6104,17 @@ var createTypewriter = ({
|
|
|
6091
6104
|
};
|
|
6092
6105
|
|
|
6093
6106
|
// src/components/Canvas.tsx
|
|
6094
|
-
var _tmpl$
|
|
6107
|
+
var _tmpl$21 = /* @__PURE__ */ template(`<canvas>`);
|
|
6095
6108
|
var Canvas = (props) => {
|
|
6096
6109
|
const [local, rest] = splitProps(props, ["resize", "render"]);
|
|
6097
6110
|
const [canvas, setCanvas] = createSignal();
|
|
6098
|
-
const ctx = createMemo(() =>
|
|
6111
|
+
const ctx = createMemo(() => {
|
|
6112
|
+
const canvasElement = canvas();
|
|
6113
|
+
if (!canvasElement) {
|
|
6114
|
+
return null;
|
|
6115
|
+
}
|
|
6116
|
+
return canvasElement.getContext("2d");
|
|
6117
|
+
});
|
|
6099
6118
|
createEffect(() => {
|
|
6100
6119
|
const canvasElement = canvas();
|
|
6101
6120
|
const canvasContext = ctx();
|
|
@@ -6130,14 +6149,61 @@ var Canvas = (props) => {
|
|
|
6130
6149
|
removeEventListener("resize", onResize);
|
|
6131
6150
|
});
|
|
6132
6151
|
return (() => {
|
|
6133
|
-
const _el$ = _tmpl$
|
|
6152
|
+
const _el$ = _tmpl$21();
|
|
6134
6153
|
use(setCanvas, _el$);
|
|
6135
6154
|
spread(_el$, rest, false, false);
|
|
6136
6155
|
return _el$;
|
|
6137
6156
|
})();
|
|
6138
6157
|
};
|
|
6139
6158
|
|
|
6140
|
-
//
|
|
6159
|
+
// src/components/Select.tsx
|
|
6160
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div class="select"><label class="select__label"><span class="select__label__icon"></span> </label><div class="select__select-container"><select>`);
|
|
6161
|
+
var Select = (props) => {
|
|
6162
|
+
const [local, rest] = splitProps(props, ["icon", "label"]);
|
|
6163
|
+
const id = createUniqueId();
|
|
6164
|
+
return (() => {
|
|
6165
|
+
const _el$ = _tmpl$25(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild;
|
|
6166
|
+
setAttribute(_el$2, "for", id);
|
|
6167
|
+
setAttribute(_el$3, "aria-hidden", true);
|
|
6168
|
+
insert(_el$2, () => local.label, null);
|
|
6169
|
+
spread(_el$6, mergeProps(rest, {
|
|
6170
|
+
"class": "select__select",
|
|
6171
|
+
"id": id
|
|
6172
|
+
}), false, true);
|
|
6173
|
+
insert(_el$6, () => props.children);
|
|
6174
|
+
insert(_el$5, createComponent(Icon, {
|
|
6175
|
+
"class": "select__icon",
|
|
6176
|
+
"aria-hidden": true,
|
|
6177
|
+
get children() {
|
|
6178
|
+
return createComponent(Icon.ChevronDown, {});
|
|
6179
|
+
}
|
|
6180
|
+
}), null);
|
|
6181
|
+
createRenderEffect(() => _el$3.innerHTML = local.icon);
|
|
6182
|
+
return _el$;
|
|
6183
|
+
})();
|
|
6184
|
+
};
|
|
6185
|
+
|
|
6186
|
+
// src/components/Range.tsx
|
|
6187
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<div class="range"><label class="range__label"><span class="range__label__icon"></span> </label><input>`);
|
|
6188
|
+
var Range = (props) => {
|
|
6189
|
+
const [local, rest] = splitProps(props, ["icon", "label"]);
|
|
6190
|
+
const id = createUniqueId();
|
|
6191
|
+
return (() => {
|
|
6192
|
+
const _el$ = _tmpl$26(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
|
|
6193
|
+
setAttribute(_el$2, "for", id);
|
|
6194
|
+
setAttribute(_el$3, "aria-hidden", true);
|
|
6195
|
+
insert(_el$2, () => local.label, null);
|
|
6196
|
+
spread(_el$5, mergeProps(rest, {
|
|
6197
|
+
"class": "range__range",
|
|
6198
|
+
"type": "range",
|
|
6199
|
+
"id": id
|
|
6200
|
+
}), false, false);
|
|
6201
|
+
createRenderEffect(() => _el$3.innerHTML = local.icon);
|
|
6202
|
+
return _el$;
|
|
6203
|
+
})();
|
|
6204
|
+
};
|
|
6205
|
+
|
|
6206
|
+
// ../../node_modules/.pnpm/@solid-primitives+destructure@0.1.17_solid-js@1.8.18/node_modules/@solid-primitives/destructure/dist/index.js
|
|
6141
6207
|
var isReactiveObject = (value) => typeof value === "object" && value !== null;
|
|
6142
6208
|
function createProxyCache(obj, get) {
|
|
6143
6209
|
return new Proxy(
|
|
@@ -6183,8 +6249,8 @@ function destructure(source, options) {
|
|
|
6183
6249
|
}
|
|
6184
6250
|
|
|
6185
6251
|
// src/screens/game.tsx
|
|
6186
|
-
var _tmpl$
|
|
6187
|
-
var _tmpl$
|
|
6252
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<div class="action-dialog-person">`);
|
|
6253
|
+
var _tmpl$28 = /* @__PURE__ */ template(`<div class="dialog-container"><span class="dialog-fix" aria-hidden="true">​</span><div class="dialog-panel"><span class="dialog-panel-label">`);
|
|
6188
6254
|
var _tmpl$34 = /* @__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 class="input-dialog-label-text"></span></label><span class="input-dialog-label-text input-dialog-label__error" aria-live="polite" aria-atomic="true"></span><button type="submit" class="button dialog-input__button">`);
|
|
6189
6255
|
var _tmpl$44 = /* @__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">`);
|
|
6190
6256
|
var _tmpl$53 = /* @__PURE__ */ template(`<button type="button" class="button control-panel__button">`);
|
|
@@ -6343,7 +6409,7 @@ var Game = (props) => {
|
|
|
6343
6409
|
return dialog().miniature.emotion;
|
|
6344
6410
|
},
|
|
6345
6411
|
get children() {
|
|
6346
|
-
const _el$5 = _tmpl$
|
|
6412
|
+
const _el$5 = _tmpl$27();
|
|
6347
6413
|
insert(_el$5, createComponent(Show, {
|
|
6348
6414
|
get when() {
|
|
6349
6415
|
return dialog().miniature.emotion;
|
|
@@ -6390,7 +6456,7 @@ var Game = (props) => {
|
|
|
6390
6456
|
isOpen: () => choice().visible,
|
|
6391
6457
|
trapFocus: () => !props.isPreview && !rendererState().exitPromptShown,
|
|
6392
6458
|
get children() {
|
|
6393
|
-
const _el$7 = _tmpl$
|
|
6459
|
+
const _el$7 = _tmpl$28(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$10 = _el$9.firstChild;
|
|
6394
6460
|
insert(_el$10, () => choice().label || " ");
|
|
6395
6461
|
insert(_el$9, createComponent(For, {
|
|
6396
6462
|
get each() {
|
|
@@ -6591,18 +6657,18 @@ var Game = (props) => {
|
|
|
6591
6657
|
delegateEvents(["click", "keydown"]);
|
|
6592
6658
|
|
|
6593
6659
|
// src/screens/loading.tsx
|
|
6594
|
-
var _tmpl$
|
|
6660
|
+
var _tmpl$29 = /* @__PURE__ */ template(`<div class="loading"><div class="loading__animation"><div></div><div></div><div></div><div>`);
|
|
6595
6661
|
var Loading = (props) => {
|
|
6596
6662
|
return (() => {
|
|
6597
|
-
const _el$ = _tmpl$
|
|
6663
|
+
const _el$ = _tmpl$29();
|
|
6598
6664
|
createRenderEffect(() => _el$.classList.toggle("overlay", !!props.overlay));
|
|
6599
6665
|
return _el$;
|
|
6600
6666
|
})();
|
|
6601
6667
|
};
|
|
6602
6668
|
|
|
6603
6669
|
// src/screens/mainmenu.tsx
|
|
6604
|
-
var _tmpl$
|
|
6605
|
-
var _tmpl$
|
|
6670
|
+
var _tmpl$30 = /* @__PURE__ */ template(`<div class="main-menu"><div class="main-menu__controls"><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">`);
|
|
6671
|
+
var _tmpl$210 = /* @__PURE__ */ template(`<button>`);
|
|
6606
6672
|
var MainMenu = () => {
|
|
6607
6673
|
const {
|
|
6608
6674
|
t,
|
|
@@ -6619,7 +6685,7 @@ var MainMenu = () => {
|
|
|
6619
6685
|
$rendererState.mutate((s) => s.screen, screen);
|
|
6620
6686
|
});
|
|
6621
6687
|
return (() => {
|
|
6622
|
-
const _el$ = _tmpl$
|
|
6688
|
+
const _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$10 = _el$9.firstChild;
|
|
6623
6689
|
_el$3.$$click = () => {
|
|
6624
6690
|
options.newGame();
|
|
6625
6691
|
};
|
|
@@ -6658,7 +6724,7 @@ var MainMenu = () => {
|
|
|
6658
6724
|
return rendererStore().mainmenu;
|
|
6659
6725
|
},
|
|
6660
6726
|
children: (item) => (() => {
|
|
6661
|
-
const _el$11 = _tmpl$
|
|
6727
|
+
const _el$11 = _tmpl$210();
|
|
6662
6728
|
spread(_el$11, mergeProps(() => item(goto)), false, false);
|
|
6663
6729
|
return _el$11;
|
|
6664
6730
|
})()
|
|
@@ -6670,8 +6736,8 @@ var MainMenu = () => {
|
|
|
6670
6736
|
delegateEvents(["click"]);
|
|
6671
6737
|
|
|
6672
6738
|
// src/screens/saves.tsx
|
|
6673
|
-
var _tmpl$
|
|
6674
|
-
var _tmpl$
|
|
6739
|
+
var _tmpl$31 = /* @__PURE__ */ template(`<ol class="saves__list">`);
|
|
6740
|
+
var _tmpl$211 = /* @__PURE__ */ template(`<div class="saves"><div class="saves__controls"><button type="button" class="button saves__button"></button></div><div class="saves__list-container">`);
|
|
6675
6741
|
var _tmpl$35 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
|
|
6676
6742
|
var Saves = () => {
|
|
6677
6743
|
const {
|
|
@@ -6743,7 +6809,7 @@ var Saves = () => {
|
|
|
6743
6809
|
return !targets.every((item) => completed.includes(item));
|
|
6744
6810
|
};
|
|
6745
6811
|
return (() => {
|
|
6746
|
-
const _el$ = _tmpl$
|
|
6812
|
+
const _el$ = _tmpl$211(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
|
|
6747
6813
|
_el$3.$$click = () => {
|
|
6748
6814
|
$rendererState.setKey("screen", "mainmenu");
|
|
6749
6815
|
};
|
|
@@ -6760,7 +6826,7 @@ var Saves = () => {
|
|
|
6760
6826
|
})();
|
|
6761
6827
|
},
|
|
6762
6828
|
get children() {
|
|
6763
|
-
const _el$5 = _tmpl$
|
|
6829
|
+
const _el$5 = _tmpl$31();
|
|
6764
6830
|
use(setList, _el$5);
|
|
6765
6831
|
insert(_el$5, createComponent(For, {
|
|
6766
6832
|
get each() {
|
|
@@ -6791,8 +6857,8 @@ var Saves = () => {
|
|
|
6791
6857
|
delegateEvents(["click"]);
|
|
6792
6858
|
|
|
6793
6859
|
// src/screens/settings.tsx
|
|
6794
|
-
var _tmpl$
|
|
6795
|
-
var _tmpl$
|
|
6860
|
+
var _tmpl$36 = /* @__PURE__ */ template(`<div class="root settings"><div class="settings__controls"><button type="button" class="button settings__button"></button><button type="button" class="button settings__button"></button></div><div class="settings__options"><div></div><div>`);
|
|
6861
|
+
var _tmpl$212 = /* @__PURE__ */ template(`<option>`);
|
|
6796
6862
|
var Settings = (props) => {
|
|
6797
6863
|
const {
|
|
6798
6864
|
t,
|
|
@@ -6837,13 +6903,8 @@ var Settings = (props) => {
|
|
|
6837
6903
|
};
|
|
6838
6904
|
return fn;
|
|
6839
6905
|
};
|
|
6840
|
-
const languageSelectID = createUniqueId();
|
|
6841
|
-
const speedSelectID = createUniqueId();
|
|
6842
|
-
const musicVolumeSelectID = createUniqueId();
|
|
6843
|
-
const soundVolumeSelectID = createUniqueId();
|
|
6844
|
-
const voiceVolumeSelectID = createUniqueId();
|
|
6845
6906
|
return (() => {
|
|
6846
|
-
const _el$ = _tmpl$
|
|
6907
|
+
const _el$ = _tmpl$36(), _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.nextSibling;
|
|
6847
6908
|
_el$3.$$click = () => {
|
|
6848
6909
|
$rendererState.setKey("screen", "mainmenu");
|
|
6849
6910
|
};
|
|
@@ -6852,80 +6913,109 @@ var Settings = (props) => {
|
|
|
6852
6913
|
options.restore();
|
|
6853
6914
|
};
|
|
6854
6915
|
insert(_el$4, () => t("ToTheGame"));
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
_el$11.addEventListener("change", onLanguageSelect);
|
|
6859
|
-
setAttribute(_el$11, "id", languageSelectID);
|
|
6860
|
-
insert(_el$11, createComponent(For, {
|
|
6861
|
-
get each() {
|
|
6862
|
-
return options.languages;
|
|
6916
|
+
insert(_el$6, createComponent(Select, {
|
|
6917
|
+
get icon() {
|
|
6918
|
+
return props.icons.language;
|
|
6863
6919
|
},
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
return
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6920
|
+
get label() {
|
|
6921
|
+
return t("Language");
|
|
6922
|
+
},
|
|
6923
|
+
onChange: onLanguageSelect,
|
|
6924
|
+
get children() {
|
|
6925
|
+
return createComponent(For, {
|
|
6926
|
+
get each() {
|
|
6927
|
+
return options.languages;
|
|
6928
|
+
},
|
|
6929
|
+
children: (lang) => (() => {
|
|
6930
|
+
const _el$8 = _tmpl$212();
|
|
6931
|
+
_el$8.value = lang;
|
|
6932
|
+
insert(_el$8, () => options.getLanguageDisplayName(lang));
|
|
6933
|
+
createRenderEffect(() => _el$8.selected = lang === language());
|
|
6934
|
+
return _el$8;
|
|
6935
|
+
})()
|
|
6936
|
+
});
|
|
6937
|
+
}
|
|
6938
|
+
}), null);
|
|
6939
|
+
insert(_el$6, createComponent(Select, {
|
|
6940
|
+
get icon() {
|
|
6941
|
+
return props.icons.typewriter_speed;
|
|
6942
|
+
},
|
|
6943
|
+
get label() {
|
|
6944
|
+
return t("TextSpeed");
|
|
6945
|
+
},
|
|
6946
|
+
onChange: onSpeedSelect,
|
|
6947
|
+
get children() {
|
|
6948
|
+
return createComponent(For, {
|
|
6949
|
+
each: ["Slow", "Medium", "Fast", "Auto"],
|
|
6950
|
+
children: (speed) => (() => {
|
|
6951
|
+
const _el$9 = _tmpl$212();
|
|
6952
|
+
_el$9.value = speed;
|
|
6953
|
+
insert(_el$9, () => t("TextSpeed" + speed));
|
|
6954
|
+
createRenderEffect(() => _el$9.selected = speed === textSpeed());
|
|
6955
|
+
return _el$9;
|
|
6956
|
+
})()
|
|
6957
|
+
});
|
|
6958
|
+
}
|
|
6959
|
+
}), null);
|
|
6960
|
+
insert(_el$7, createComponent(Range, {
|
|
6961
|
+
get icon() {
|
|
6962
|
+
return props.icons.music_volume;
|
|
6963
|
+
},
|
|
6964
|
+
get label() {
|
|
6965
|
+
return t("MusicVolume");
|
|
6966
|
+
},
|
|
6967
|
+
min: 0,
|
|
6968
|
+
max: 1,
|
|
6969
|
+
step: 0.01,
|
|
6970
|
+
get value() {
|
|
6971
|
+
return volume(2);
|
|
6972
|
+
},
|
|
6973
|
+
get onChange() {
|
|
6974
|
+
return volumeChange(2);
|
|
6975
|
+
}
|
|
6976
|
+
}), null);
|
|
6977
|
+
insert(_el$7, createComponent(Range, {
|
|
6978
|
+
get icon() {
|
|
6979
|
+
return props.icons.sound_volume;
|
|
6980
|
+
},
|
|
6981
|
+
get label() {
|
|
6982
|
+
return t("SoundVolume");
|
|
6983
|
+
},
|
|
6984
|
+
min: 0,
|
|
6985
|
+
max: 1,
|
|
6986
|
+
step: 0.01,
|
|
6987
|
+
get value() {
|
|
6988
|
+
return volume(3);
|
|
6989
|
+
},
|
|
6990
|
+
get onChange() {
|
|
6991
|
+
return volumeChange(3);
|
|
6992
|
+
}
|
|
6993
|
+
}), null);
|
|
6994
|
+
insert(_el$7, createComponent(Range, {
|
|
6995
|
+
get icon() {
|
|
6996
|
+
return props.icons.voice_volume;
|
|
6997
|
+
},
|
|
6998
|
+
get label() {
|
|
6999
|
+
return t("VoiceVolume");
|
|
7000
|
+
},
|
|
7001
|
+
min: 0,
|
|
7002
|
+
max: 1,
|
|
7003
|
+
step: 0.01,
|
|
7004
|
+
get value() {
|
|
7005
|
+
return volume(4);
|
|
7006
|
+
},
|
|
7007
|
+
get onChange() {
|
|
7008
|
+
return volumeChange(4);
|
|
7009
|
+
}
|
|
7010
|
+
}), null);
|
|
7011
|
+
createRenderEffect(() => _el$7.classList.toggle("settings--hidden", !props.showAudioSettings));
|
|
6922
7012
|
return _el$;
|
|
6923
7013
|
})();
|
|
6924
7014
|
};
|
|
6925
7015
|
delegateEvents(["click"]);
|
|
6926
7016
|
|
|
6927
7017
|
// src/components/Root.tsx
|
|
6928
|
-
var _tmpl$
|
|
7018
|
+
var _tmpl$37 = /* @__PURE__ */ template(`<div class="root">`);
|
|
6929
7019
|
var createRootComponent = ({
|
|
6930
7020
|
$rendererState,
|
|
6931
7021
|
$contextState,
|
|
@@ -6961,7 +7051,7 @@ var createRootComponent = ({
|
|
|
6961
7051
|
emitter.emit("screen:change", currentScreen);
|
|
6962
7052
|
});
|
|
6963
7053
|
return (() => {
|
|
6964
|
-
const _el$ = _tmpl$
|
|
7054
|
+
const _el$ = _tmpl$37();
|
|
6965
7055
|
const _ref$ = setRoot;
|
|
6966
7056
|
typeof _ref$ === "function" ? use(_ref$, _el$) : setRoot = _el$;
|
|
6967
7057
|
insert(_el$, createComponent(Provider, {
|
|
@@ -7161,7 +7251,7 @@ var hideImage = (source, params = {}) => {
|
|
|
7161
7251
|
};
|
|
7162
7252
|
|
|
7163
7253
|
// src/renderer.tsx
|
|
7164
|
-
var _tmpl$
|
|
7254
|
+
var _tmpl$38 = /* @__PURE__ */ template(`<canvas>`);
|
|
7165
7255
|
var {
|
|
7166
7256
|
preloadAudioBlocking
|
|
7167
7257
|
} = createAudioMisc();
|
|
@@ -7213,7 +7303,7 @@ var createSolidRenderer = ({
|
|
|
7213
7303
|
return chars[character];
|
|
7214
7304
|
}
|
|
7215
7305
|
const canvas = (() => {
|
|
7216
|
-
const _el$ = _tmpl$
|
|
7306
|
+
const _el$ = _tmpl$38();
|
|
7217
7307
|
setAttribute(_el$, "data-character", character);
|
|
7218
7308
|
return _el$;
|
|
7219
7309
|
})();
|
package/dist/styles/index.css
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
color: var(--novely-button-color, #000);
|
|
44
44
|
box-shadow: 0 0 0 var(--button-box-shadow-spread-radius, .25rem) var(--novely-button-border-color, #ffc7df);
|
|
45
45
|
margin: .4rem var(--button-box-shadow-spread-radius, .25rem);
|
|
46
|
+
outline-offset: var(--select-box-shadow-spread-radius, .25rem);
|
|
46
47
|
cursor: pointer;
|
|
47
48
|
-webkit-tap-highlight-color: #0000;
|
|
48
49
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -267,6 +268,7 @@
|
|
|
267
268
|
background-color: var(--novely-select-background-color, #ffe9f3);
|
|
268
269
|
color: var(--novely-select-color, #000);
|
|
269
270
|
box-shadow: 0 0 0 var(--select-box-shadow-spread-radius, .25rem) var(--novely-select-border-color, #ffc7df);
|
|
271
|
+
outline-offset: var(--select-box-shadow-spread-radius, .25rem);
|
|
270
272
|
margin: calc(var(--select-box-shadow-spread-radius, .25rem) + .4rem) var(--select-box-shadow-spread-radius, .25rem);
|
|
271
273
|
border: none;
|
|
272
274
|
border-radius: .25rem;
|
|
@@ -278,10 +280,7 @@
|
|
|
278
280
|
.select__select {
|
|
279
281
|
-webkit-appearance: none;
|
|
280
282
|
appearance: none;
|
|
281
|
-
|
|
282
|
-
background-position: 100%;
|
|
283
|
-
background-repeat: no-repeat;
|
|
284
|
-
padding-right: 1.5rem;
|
|
283
|
+
padding-right: 2rem;
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
286
|
@media (max-aspect-ratio: .8) {
|
|
@@ -295,6 +294,11 @@
|
|
|
295
294
|
}
|
|
296
295
|
}
|
|
297
296
|
|
|
297
|
+
/* src/styles/select/select/container.css */
|
|
298
|
+
.select__select-container {
|
|
299
|
+
position: relative;
|
|
300
|
+
}
|
|
301
|
+
|
|
298
302
|
/* src/styles/select/label/label.css */
|
|
299
303
|
.select__label {
|
|
300
304
|
background: var(--novely-select-label-background, #ffe9f3);
|
|
@@ -322,6 +326,16 @@
|
|
|
322
326
|
}
|
|
323
327
|
}
|
|
324
328
|
|
|
329
|
+
/* src/styles/select/icon/icon.css */
|
|
330
|
+
.select__icon {
|
|
331
|
+
pointer-events: none;
|
|
332
|
+
width: 1.5rem;
|
|
333
|
+
height: 1.5rem;
|
|
334
|
+
position: absolute;
|
|
335
|
+
top: .9rem;
|
|
336
|
+
right: .5rem;
|
|
337
|
+
}
|
|
338
|
+
|
|
325
339
|
/* src/styles/select/index.css */
|
|
326
340
|
|
|
327
341
|
/* src/styles/range/range.css */
|
|
@@ -876,7 +890,7 @@ input[name=novely-input][type=password] {
|
|
|
876
890
|
flex-direction: column-reverse;
|
|
877
891
|
}
|
|
878
892
|
}
|
|
879
|
-
.settings
|
|
893
|
+
.settings--hidden {
|
|
880
894
|
display: none;
|
|
881
895
|
}
|
|
882
896
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"retrieved": "^0.1.0",
|
|
20
20
|
"solid-js": "1.8.18",
|
|
21
21
|
"solid-transition-group": "^0.2.3",
|
|
22
|
+
"@novely/core": "0.38.1",
|
|
22
23
|
"@novely/renderer-toolkit": "0.7.1",
|
|
23
|
-
"@novely/typewriter": "0.5.1"
|
|
24
|
-
"@novely/core": "0.38.0"
|
|
24
|
+
"@novely/typewriter": "0.5.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@novely/core": "*",
|