@novely/solid-renderer 0.46.0 → 0.47.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/Await.d.ts +7 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.jsx +139 -109
- package/dist/show-modal.d.ts +2 -0
- package/dist/styles/index.css +11 -6
- package/package.json +3 -3
package/dist/index.jsx
CHANGED
|
@@ -846,10 +846,10 @@ function mergeProps(...sources) {
|
|
|
846
846
|
return false;
|
|
847
847
|
},
|
|
848
848
|
keys() {
|
|
849
|
-
const
|
|
849
|
+
const keys = [];
|
|
850
850
|
for (let i = 0; i < sources.length; i++)
|
|
851
|
-
|
|
852
|
-
return [...new Set(
|
|
851
|
+
keys.push(...Object.keys(resolveSource(sources[i])));
|
|
852
|
+
return [...new Set(keys)];
|
|
853
853
|
}
|
|
854
854
|
},
|
|
855
855
|
propTraps
|
|
@@ -889,10 +889,10 @@ function mergeProps(...sources) {
|
|
|
889
889
|
}
|
|
890
890
|
return target;
|
|
891
891
|
}
|
|
892
|
-
function splitProps(props, ...
|
|
892
|
+
function splitProps(props, ...keys) {
|
|
893
893
|
if (SUPPORTS_PROXY && $PROXY in props) {
|
|
894
|
-
const blocked = new Set(
|
|
895
|
-
const res =
|
|
894
|
+
const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
|
|
895
|
+
const res = keys.map((k) => {
|
|
896
896
|
return new Proxy(
|
|
897
897
|
{
|
|
898
898
|
get(property) {
|
|
@@ -927,13 +927,13 @@ function splitProps(props, ...keys2) {
|
|
|
927
927
|
return res;
|
|
928
928
|
}
|
|
929
929
|
const otherObject = {};
|
|
930
|
-
const objects =
|
|
930
|
+
const objects = keys.map(() => ({}));
|
|
931
931
|
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
932
932
|
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
933
933
|
const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
|
|
934
934
|
let blocked = false;
|
|
935
935
|
let objectIndex = 0;
|
|
936
|
-
for (const k of
|
|
936
|
+
for (const k of keys) {
|
|
937
937
|
if (k.includes(propName)) {
|
|
938
938
|
blocked = true;
|
|
939
939
|
isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);
|
|
@@ -2344,7 +2344,7 @@ var deepAtom = (init) => {
|
|
|
2344
2344
|
var getDefaultContextState = () => {
|
|
2345
2345
|
return {
|
|
2346
2346
|
background: {
|
|
2347
|
-
background: "#
|
|
2347
|
+
background: "#0000"
|
|
2348
2348
|
},
|
|
2349
2349
|
characters: {},
|
|
2350
2350
|
choice: {
|
|
@@ -2372,7 +2372,8 @@ var getDefaultContextState = () => {
|
|
|
2372
2372
|
restoring: false,
|
|
2373
2373
|
goingBack: false,
|
|
2374
2374
|
preview: false
|
|
2375
|
-
}
|
|
2375
|
+
},
|
|
2376
|
+
loading: false
|
|
2376
2377
|
};
|
|
2377
2378
|
};
|
|
2378
2379
|
var createContextStateRoot = (getExtension = () => ({})) => {
|
|
@@ -2537,11 +2538,11 @@ var createAudio2 = (storageData) => {
|
|
|
2537
2538
|
};
|
|
2538
2539
|
const clear = (keepAudio) => {
|
|
2539
2540
|
context.voiceStop();
|
|
2540
|
-
const
|
|
2541
|
+
const entries = [
|
|
2541
2542
|
[store.music, keepAudio.music],
|
|
2542
2543
|
[store.sound, keepAudio.sounds]
|
|
2543
2544
|
];
|
|
2544
|
-
const clearEntries =
|
|
2545
|
+
const clearEntries = entries.flatMap(([incoming, keep]) => {
|
|
2545
2546
|
return Object.entries(incoming).filter(([name]) => !keep.has(name)).map(([_, a]) => a);
|
|
2546
2547
|
});
|
|
2547
2548
|
for (const music of clearEntries) {
|
|
@@ -2966,9 +2967,9 @@ var canvasDrawImages = async (canvas = createCanvas(), ctx = getContext(canvas),
|
|
|
2966
2967
|
}
|
|
2967
2968
|
return [canvas, ctx];
|
|
2968
2969
|
};
|
|
2969
|
-
var onKey = (cb, ...
|
|
2970
|
+
var onKey = (cb, ...keys) => {
|
|
2970
2971
|
return (e) => {
|
|
2971
|
-
if (
|
|
2972
|
+
if (keys.some((key) => key === e.key)) {
|
|
2972
2973
|
cb(e);
|
|
2973
2974
|
}
|
|
2974
2975
|
};
|
|
@@ -3402,9 +3403,6 @@ function createSwitchTransition(source, options) {
|
|
|
3402
3403
|
return returned;
|
|
3403
3404
|
}
|
|
3404
3405
|
|
|
3405
|
-
// ../../node_modules/.pnpm/@solid-primitives+utils@6.2.3_solid-js@1.9.3/node_modules/@solid-primitives/utils/dist/chunk/R5675YMU.js
|
|
3406
|
-
var access = (v) => typeof v === "function" && !v.length ? v() : v;
|
|
3407
|
-
|
|
3408
3406
|
// ../../node_modules/.pnpm/@solid-primitives+refs@1.0.8_solid-js@1.9.3/node_modules/@solid-primitives/refs/dist/index.js
|
|
3409
3407
|
var defaultElementPredicate = isServer ? (item) => item != null && typeof item === "object" && "t" in item : (item) => item instanceof Element;
|
|
3410
3408
|
function getFirstChild(value, predicate) {
|
|
@@ -4072,56 +4070,61 @@ var DialogOverview = (props) => {
|
|
|
4072
4070
|
},
|
|
4073
4071
|
keyed: true,
|
|
4074
4072
|
get children() {
|
|
4075
|
-
return createComponent(
|
|
4076
|
-
get
|
|
4073
|
+
return createComponent(Await, {
|
|
4074
|
+
get ["for"]() {
|
|
4077
4075
|
return data.options.getDialogOverview();
|
|
4078
4076
|
},
|
|
4079
|
-
children: (
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
const
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
}
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
await voice.play();
|
|
4105
|
-
const currentPlayingId = ++playingId;
|
|
4106
|
-
voice.onEnded(() => {
|
|
4107
|
-
if (currentPlayingId === playingId) {
|
|
4108
|
-
setCurrentlyPlaying(null);
|
|
4109
|
-
setCurrentlyPlayingSource("");
|
|
4077
|
+
children: (entries) => createComponent(For, {
|
|
4078
|
+
get each() {
|
|
4079
|
+
return entries();
|
|
4080
|
+
},
|
|
4081
|
+
children: (entry) => (() => {
|
|
4082
|
+
const _el$6 = _tmpl$43(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild;
|
|
4083
|
+
insert(_el$8, () => removeTagsFromHTML(entry.name));
|
|
4084
|
+
insert(_el$9, createComponent(Show, {
|
|
4085
|
+
get when() {
|
|
4086
|
+
return entry.voice;
|
|
4087
|
+
},
|
|
4088
|
+
get children() {
|
|
4089
|
+
const _el$10 = _tmpl$34();
|
|
4090
|
+
_el$10.$$click = async () => {
|
|
4091
|
+
if (!entry.voice) return;
|
|
4092
|
+
const voice = props.audio.getAudio("voice", entry.voice);
|
|
4093
|
+
const source = currentlyPlayingSource();
|
|
4094
|
+
if (currentlyPlayingSource() === entry.voice) {
|
|
4095
|
+
await voice.stop();
|
|
4096
|
+
setCurrentlyPlaying(null);
|
|
4097
|
+
setCurrentlyPlayingSource("");
|
|
4098
|
+
} else {
|
|
4099
|
+
if (source) {
|
|
4100
|
+
const previous = props.audio.getAudio("voice", source);
|
|
4101
|
+
await previous.stop();
|
|
4110
4102
|
}
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4103
|
+
setCurrentlyPlaying(voice);
|
|
4104
|
+
setCurrentlyPlayingSource(entry.voice);
|
|
4105
|
+
await voice.reset();
|
|
4106
|
+
await voice.play();
|
|
4107
|
+
const currentPlayingId = ++playingId;
|
|
4108
|
+
voice.onEnded(() => {
|
|
4109
|
+
if (currentPlayingId === playingId) {
|
|
4110
|
+
setCurrentlyPlaying(null);
|
|
4111
|
+
setCurrentlyPlayingSource("");
|
|
4112
|
+
}
|
|
4113
|
+
});
|
|
4114
|
+
}
|
|
4115
|
+
};
|
|
4116
|
+
insert(_el$10, createComponent(Icon, {
|
|
4117
|
+
get icon() {
|
|
4118
|
+
return currentlyPlayingSource() === entry.voice ? "#novely-stop-icon" : "#novely-play-icon";
|
|
4119
|
+
}
|
|
4120
|
+
}));
|
|
4121
|
+
return _el$10;
|
|
4122
|
+
}
|
|
4123
|
+
}));
|
|
4124
|
+
insert(_el$12, () => removeTagsFromHTML(entry.text));
|
|
4125
|
+
return _el$6;
|
|
4126
|
+
})()
|
|
4127
|
+
})
|
|
4125
4128
|
});
|
|
4126
4129
|
}
|
|
4127
4130
|
}));
|
|
@@ -4132,25 +4135,39 @@ var DialogOverview = (props) => {
|
|
|
4132
4135
|
};
|
|
4133
4136
|
delegateEvents(["click"]);
|
|
4134
4137
|
|
|
4135
|
-
//
|
|
4138
|
+
// src/components/Await.tsx
|
|
4139
|
+
var Await = (props) => {
|
|
4140
|
+
const [value, setValue] = createSignal();
|
|
4141
|
+
onMount(() => props.for.then(setValue));
|
|
4142
|
+
return createComponent(Show, {
|
|
4143
|
+
get when() {
|
|
4144
|
+
return value();
|
|
4145
|
+
},
|
|
4146
|
+
get children() {
|
|
4147
|
+
return props.children;
|
|
4148
|
+
}
|
|
4149
|
+
});
|
|
4150
|
+
};
|
|
4151
|
+
|
|
4152
|
+
// ../../node_modules/.pnpm/@solid-primitives+utils@6.3.0_solid-js@1.9.3/node_modules/@solid-primitives/utils/dist/index.js
|
|
4153
|
+
var access = (v) => typeof v === "function" && !v.length ? v() : v;
|
|
4154
|
+
|
|
4155
|
+
// ../../node_modules/.pnpm/@solid-primitives+destructure@0.2.0_solid-js@1.9.3/node_modules/@solid-primitives/destructure/dist/index.js
|
|
4136
4156
|
var isReactiveObject = (value) => typeof value === "object" && value !== null;
|
|
4137
4157
|
function createProxyCache(obj, get) {
|
|
4138
|
-
return new Proxy(
|
|
4139
|
-
{
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
set: () => false
|
|
4152
|
-
}
|
|
4153
|
-
);
|
|
4158
|
+
return new Proxy({}, {
|
|
4159
|
+
get: (target, key) => {
|
|
4160
|
+
if (key === Symbol.iterator || key === "length")
|
|
4161
|
+
return Reflect.get(obj, key);
|
|
4162
|
+
const saved = Reflect.get(target, key);
|
|
4163
|
+
if (saved)
|
|
4164
|
+
return saved;
|
|
4165
|
+
const value = get(key);
|
|
4166
|
+
Reflect.set(target, key, value);
|
|
4167
|
+
return value;
|
|
4168
|
+
},
|
|
4169
|
+
set: () => false
|
|
4170
|
+
});
|
|
4154
4171
|
}
|
|
4155
4172
|
function destructure(source, options) {
|
|
4156
4173
|
const config = options ?? {};
|
|
@@ -4189,9 +4206,10 @@ var _tmpl$82 = /* @__PURE__ */ template(`<button type="button" class="button con
|
|
|
4189
4206
|
var _tmpl$92 = /* @__PURE__ */ template(`<span class="control-panel-container-fix" aria-hidden="true">​`);
|
|
4190
4207
|
var _tmpl$102 = /* @__PURE__ */ template(`<div class="control-panel-container-backdrop">`);
|
|
4191
4208
|
var _tmpl$112 = /* @__PURE__ */ template(`<div class="control-panel"><div role="menubar" class="control-panel-container">`);
|
|
4192
|
-
var _tmpl$122 = /* @__PURE__ */ template(`<div
|
|
4193
|
-
var _tmpl$132 = /* @__PURE__ */ template(`<
|
|
4194
|
-
var _tmpl$14 = /* @__PURE__ */ template(`<
|
|
4209
|
+
var _tmpl$122 = /* @__PURE__ */ template(`<div class="loading overlay game"><div class="loading__animation"><div></div><div></div><div></div><div>`);
|
|
4210
|
+
var _tmpl$132 = /* @__PURE__ */ template(`<div><div class="background"></div><div class="characters"></div><div class="action-dialog"><div class="action-dialog-container" role="button" tabindex="0"><div class="action-dialog-content"></div></div></div><div></div><div class="action-text" role="button" tabindex="0"></div><div class="action-image">`);
|
|
4211
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<button type="button" class="button choice-dialog__choice"><span>`);
|
|
4212
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div class="action-image__image-container">`);
|
|
4195
4213
|
var Game = (props) => {
|
|
4196
4214
|
const data = useData();
|
|
4197
4215
|
const {
|
|
@@ -4207,7 +4225,8 @@ var Game = (props) => {
|
|
|
4207
4225
|
custom,
|
|
4208
4226
|
images,
|
|
4209
4227
|
dialogOverviewShown,
|
|
4210
|
-
mood
|
|
4228
|
+
mood,
|
|
4229
|
+
loading
|
|
4211
4230
|
} = destructure(from(props.$contextState));
|
|
4212
4231
|
const rendererState = from(data.$rendererState);
|
|
4213
4232
|
const exitPromptShown = () => rendererState().exitPromptShown;
|
|
@@ -4281,7 +4300,7 @@ var Game = (props) => {
|
|
|
4281
4300
|
}
|
|
4282
4301
|
});
|
|
4283
4302
|
return (() => {
|
|
4284
|
-
const _el$ = _tmpl$
|
|
4303
|
+
const _el$ = _tmpl$132(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$7 = _el$5.firstChild, _el$17 = _el$4.nextSibling, _el$18 = _el$17.nextSibling, _el$24 = _el$18.nextSibling;
|
|
4285
4304
|
setAttribute(_el$3, "data-characters", true);
|
|
4286
4305
|
insert(_el$3, createComponent(For, {
|
|
4287
4306
|
get each() {
|
|
@@ -4399,14 +4418,14 @@ var Game = (props) => {
|
|
|
4399
4418
|
return visible();
|
|
4400
4419
|
},
|
|
4401
4420
|
get children() {
|
|
4402
|
-
const _el$
|
|
4403
|
-
_el$
|
|
4421
|
+
const _el$26 = _tmpl$14(), _el$27 = _el$26.firstChild;
|
|
4422
|
+
_el$26.$$click = () => {
|
|
4404
4423
|
onSelect();
|
|
4405
4424
|
if (disabled()) return;
|
|
4406
4425
|
choice().resolve?.(index);
|
|
4407
4426
|
};
|
|
4408
|
-
insert(_el$
|
|
4409
|
-
insert(_el$
|
|
4427
|
+
insert(_el$27, text2);
|
|
4428
|
+
insert(_el$26, createComponent(Show, {
|
|
4410
4429
|
when: image !== "",
|
|
4411
4430
|
get children() {
|
|
4412
4431
|
return createComponent(Canvas, {
|
|
@@ -4421,8 +4440,8 @@ var Game = (props) => {
|
|
|
4421
4440
|
});
|
|
4422
4441
|
}
|
|
4423
4442
|
}), null);
|
|
4424
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4425
|
-
return _el$
|
|
4443
|
+
createRenderEffect(() => setAttribute(_el$26, "aria-disabled", disabled()));
|
|
4444
|
+
return _el$26;
|
|
4426
4445
|
}
|
|
4427
4446
|
});
|
|
4428
4447
|
}
|
|
@@ -4629,9 +4648,9 @@ var Game = (props) => {
|
|
|
4629
4648
|
return image().visible;
|
|
4630
4649
|
},
|
|
4631
4650
|
get children() {
|
|
4632
|
-
const _el$
|
|
4633
|
-
insert(_el$
|
|
4634
|
-
return _el$
|
|
4651
|
+
const _el$28 = _tmpl$15();
|
|
4652
|
+
insert(_el$28, () => image().image);
|
|
4653
|
+
return _el$28;
|
|
4635
4654
|
}
|
|
4636
4655
|
});
|
|
4637
4656
|
}
|
|
@@ -4645,12 +4664,20 @@ var Game = (props) => {
|
|
|
4645
4664
|
},
|
|
4646
4665
|
close: () => props.$contextState.setKey("dialogOverviewShown", false)
|
|
4647
4666
|
}), null);
|
|
4667
|
+
insert(_el$, createComponent(Show, {
|
|
4668
|
+
get when() {
|
|
4669
|
+
return loading();
|
|
4670
|
+
},
|
|
4671
|
+
get children() {
|
|
4672
|
+
return _tmpl$122();
|
|
4673
|
+
}
|
|
4674
|
+
}), null);
|
|
4648
4675
|
createRenderEffect((_p$) => {
|
|
4649
4676
|
const _v$7 = `${props.className || ""} game`, _v$8 = !!props.isPreview, _v$9 = bg().startsWith("url") ? void 0 : bg(), _v$10 = bg().startsWith("url") ? bg() : void 0, _v$11 = charactersCount(), _v$12 = !!dialog().visible, _v$13 = !dialog().visible, _v$14 = !(dialog().miniature.character && dialog().miniature.emotion), _v$15 = !dialog().content, _v$16 = !!props.isPreview, _v$17 = !!Boolean(text().content), _v$18 = !text().content;
|
|
4650
4677
|
_v$7 !== _p$._v$7 && className(_el$, _p$._v$7 = _v$7);
|
|
4651
4678
|
_v$8 !== _p$._v$8 && _el$.classList.toggle("preview", _p$._v$8 = _v$8);
|
|
4652
|
-
_v$9 !== _p$._v$9 && ((_p$._v$9 = _v$9) != null ? _el$2.style.setProperty("
|
|
4653
|
-
_v$10 !== _p$._v$10 && ((_p$._v$10 = _v$10) != null ? _el$2.style.setProperty("
|
|
4679
|
+
_v$9 !== _p$._v$9 && ((_p$._v$9 = _v$9) != null ? _el$2.style.setProperty("background-color", _v$9) : _el$2.style.removeProperty("background-color"));
|
|
4680
|
+
_v$10 !== _p$._v$10 && ((_p$._v$10 = _v$10) != null ? _el$2.style.setProperty("background-image", _v$10) : _el$2.style.removeProperty("background-image"));
|
|
4654
4681
|
_v$11 !== _p$._v$11 && ((_p$._v$11 = _v$11) != null ? _el$3.style.setProperty("--shown-characters-count", _v$11) : _el$3.style.removeProperty("--shown-characters-count"));
|
|
4655
4682
|
_v$12 !== _p$._v$12 && _el$4.classList.toggle("action-dialog--visible", _p$._v$12 = _v$12);
|
|
4656
4683
|
_v$13 !== _p$._v$13 && _el$4.classList.toggle("action-dialog--hidden", _p$._v$13 = _v$13);
|
|
@@ -4680,17 +4707,17 @@ var Game = (props) => {
|
|
|
4680
4707
|
delegateEvents(["click", "keydown"]);
|
|
4681
4708
|
|
|
4682
4709
|
// src/screens/loading.tsx
|
|
4683
|
-
var _tmpl$
|
|
4710
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<div class="loading"><div class="loading__animation"><div></div><div></div><div></div><div>`);
|
|
4684
4711
|
var Loading = (props) => {
|
|
4685
4712
|
return (() => {
|
|
4686
|
-
const _el$ = _tmpl$
|
|
4713
|
+
const _el$ = _tmpl$16();
|
|
4687
4714
|
createRenderEffect(() => _el$.classList.toggle("overlay", !!props.overlay));
|
|
4688
4715
|
return _el$;
|
|
4689
4716
|
})();
|
|
4690
4717
|
};
|
|
4691
4718
|
|
|
4692
4719
|
// src/screens/mainmenu.tsx
|
|
4693
|
-
var _tmpl$
|
|
4720
|
+
var _tmpl$17 = /* @__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">`);
|
|
4694
4721
|
var _tmpl$27 = /* @__PURE__ */ template(`<button>`);
|
|
4695
4722
|
var MainMenu = () => {
|
|
4696
4723
|
const {
|
|
@@ -4707,7 +4734,7 @@ var MainMenu = () => {
|
|
|
4707
4734
|
$rendererState.mutate((s) => s.screen, screen);
|
|
4708
4735
|
});
|
|
4709
4736
|
return (() => {
|
|
4710
|
-
const _el$ = _tmpl$
|
|
4737
|
+
const _el$ = _tmpl$17(), _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;
|
|
4711
4738
|
_el$3.$$click = () => {
|
|
4712
4739
|
options.newGame();
|
|
4713
4740
|
};
|
|
@@ -4758,7 +4785,7 @@ var MainMenu = () => {
|
|
|
4758
4785
|
delegateEvents(["click"]);
|
|
4759
4786
|
|
|
4760
4787
|
// src/screens/saves.tsx
|
|
4761
|
-
var _tmpl$
|
|
4788
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<ol class="saves__list">`);
|
|
4762
4789
|
var _tmpl$28 = /* @__PURE__ */ template(`<div class="saves"><div class="saves__controls"><button type="button" class="button saves__button"></button></div><div class="saves__list-container">`);
|
|
4763
4790
|
var _tmpl$36 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
|
|
4764
4791
|
var Saves = () => {
|
|
@@ -4777,9 +4804,9 @@ var Saves = () => {
|
|
|
4777
4804
|
onMount(() => {
|
|
4778
4805
|
const listElement = list();
|
|
4779
4806
|
if (!listElement) return;
|
|
4780
|
-
const observer = new IntersectionObserver((
|
|
4807
|
+
const observer = new IntersectionObserver((entries) => {
|
|
4781
4808
|
const currentEntryTimestamps = [];
|
|
4782
|
-
|
|
4809
|
+
entries.forEach((entry) => {
|
|
4783
4810
|
if (!entry.isIntersecting) return;
|
|
4784
4811
|
if (processed.has(entry.target)) return;
|
|
4785
4812
|
if (!(entry.target instanceof HTMLElement)) return;
|
|
@@ -4844,7 +4871,7 @@ var Saves = () => {
|
|
|
4844
4871
|
})();
|
|
4845
4872
|
},
|
|
4846
4873
|
get children() {
|
|
4847
|
-
const _el$5 = _tmpl$
|
|
4874
|
+
const _el$5 = _tmpl$18();
|
|
4848
4875
|
use(setList, _el$5);
|
|
4849
4876
|
insert(_el$5, createComponent(For, {
|
|
4850
4877
|
get each() {
|
|
@@ -4875,7 +4902,7 @@ var Saves = () => {
|
|
|
4875
4902
|
delegateEvents(["click"]);
|
|
4876
4903
|
|
|
4877
4904
|
// src/screens/settings.tsx
|
|
4878
|
-
var _tmpl$
|
|
4905
|
+
var _tmpl$19 = /* @__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">`);
|
|
4879
4906
|
var _tmpl$29 = /* @__PURE__ */ template(`<option>`);
|
|
4880
4907
|
var Settings = (props) => {
|
|
4881
4908
|
const {
|
|
@@ -4922,7 +4949,7 @@ var Settings = (props) => {
|
|
|
4922
4949
|
return fn;
|
|
4923
4950
|
};
|
|
4924
4951
|
return (() => {
|
|
4925
|
-
const _el$ = _tmpl$
|
|
4952
|
+
const _el$ = _tmpl$19(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
|
|
4926
4953
|
_el$3.$$click = () => {
|
|
4927
4954
|
$rendererState.setKey("screen", "mainmenu");
|
|
4928
4955
|
};
|
|
@@ -5027,7 +5054,7 @@ var Settings = (props) => {
|
|
|
5027
5054
|
delegateEvents(["click"]);
|
|
5028
5055
|
|
|
5029
5056
|
// src/components/Root.tsx
|
|
5030
|
-
var _tmpl$
|
|
5057
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<div class="root">`);
|
|
5031
5058
|
var createRootComponent = ({
|
|
5032
5059
|
$rendererState,
|
|
5033
5060
|
$contextState,
|
|
@@ -5061,7 +5088,7 @@ var createRootComponent = ({
|
|
|
5061
5088
|
emitter.emit("screen:change", currentScreen);
|
|
5062
5089
|
});
|
|
5063
5090
|
return (() => {
|
|
5064
|
-
const _el$ = _tmpl$
|
|
5091
|
+
const _el$ = _tmpl$20();
|
|
5065
5092
|
const _ref$ = setRoot;
|
|
5066
5093
|
typeof _ref$ === "function" ? use(_ref$, _el$) : setRoot = _el$;
|
|
5067
5094
|
insert(_el$, createComponent(Provider, {
|
|
@@ -5495,6 +5522,9 @@ var createSolidRenderer = ({
|
|
|
5495
5522
|
text(content, resolve) {
|
|
5496
5523
|
handleTextAction($contextState, content, resolve);
|
|
5497
5524
|
},
|
|
5525
|
+
loading(shown) {
|
|
5526
|
+
$contextState.setKey("loading", shown);
|
|
5527
|
+
},
|
|
5498
5528
|
audio: audio.context,
|
|
5499
5529
|
meta: {
|
|
5500
5530
|
get restoring() {
|
package/dist/styles/index.css
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
/* src/styles/control-panel/control-panel.css */
|
|
110
110
|
.control-panel {
|
|
111
|
-
z-index:
|
|
111
|
+
z-index: 31;
|
|
112
112
|
position: fixed;
|
|
113
113
|
bottom: .45rem;
|
|
114
114
|
right: .4rem;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
display: none;
|
|
132
132
|
}
|
|
133
133
|
.control-panel-container--wide-open {
|
|
134
|
-
z-index:
|
|
134
|
+
z-index: 31;
|
|
135
135
|
flex-direction: column;
|
|
136
136
|
width: calc(100% - .8rem);
|
|
137
137
|
display: flex;
|
|
@@ -775,12 +775,10 @@ input[name=novely-input][type=checkbox] {
|
|
|
775
775
|
|
|
776
776
|
/* src/styles/game/background/background.css */
|
|
777
777
|
.background {
|
|
778
|
+
z-index: 1;
|
|
778
779
|
background-position: 50%;
|
|
779
780
|
background-repeat: no-repeat;
|
|
780
781
|
background-size: cover;
|
|
781
|
-
background-color: var(--background-color, black);
|
|
782
|
-
background-image: var(--background-image);
|
|
783
|
-
z-index: 1;
|
|
784
782
|
width: 100vw;
|
|
785
783
|
height: 100vh;
|
|
786
784
|
position: fixed;
|
|
@@ -788,7 +786,6 @@ input[name=novely-input][type=checkbox] {
|
|
|
788
786
|
|
|
789
787
|
/* src/styles/game/game/game.css */
|
|
790
788
|
.game {
|
|
791
|
-
background: #000;
|
|
792
789
|
width: 100%;
|
|
793
790
|
height: 100%;
|
|
794
791
|
}
|
|
@@ -860,6 +857,9 @@ input[name=novely-input][type=checkbox] {
|
|
|
860
857
|
left: 0;
|
|
861
858
|
right: 0;
|
|
862
859
|
}
|
|
860
|
+
.loading.game {
|
|
861
|
+
z-index: 30;
|
|
862
|
+
}
|
|
863
863
|
|
|
864
864
|
/* src/styles/loading/animation/animation.css */
|
|
865
865
|
.loading__animation {
|
|
@@ -893,6 +893,11 @@ input[name=novely-input][type=checkbox] {
|
|
|
893
893
|
animation: .6s infinite lds-ellipsis3;
|
|
894
894
|
left: 3.5rem;
|
|
895
895
|
}
|
|
896
|
+
.loading__animation div {
|
|
897
|
+
animation-direction: normal !important;
|
|
898
|
+
animation-play-state: running !important;
|
|
899
|
+
animation-fill-mode: none !important;
|
|
900
|
+
}
|
|
896
901
|
@keyframes lds-ellipsis1 {
|
|
897
902
|
0% {
|
|
898
903
|
transform: scale(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"typescript": "^5.6.2"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@solid-primitives/destructure": "^0.
|
|
18
|
+
"@solid-primitives/destructure": "^0.2.0",
|
|
19
19
|
"clsx": "^2.1.1",
|
|
20
20
|
"es-toolkit": "^1.23.0",
|
|
21
21
|
"solid-js": "~1.9.3",
|
|
22
22
|
"solid-transition-group": "^0.2.3",
|
|
23
|
-
"@novely/core": "0.
|
|
23
|
+
"@novely/core": "0.49.0",
|
|
24
24
|
"@novely/renderer-toolkit": "0.12.1",
|
|
25
25
|
"@novely/typewriter": "0.5.1"
|
|
26
26
|
},
|