@novely/solid-renderer 0.40.0 → 0.41.1
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/index.jsx +12 -19
- package/package.json +3 -3
package/dist/index.jsx
CHANGED
|
@@ -2675,12 +2675,7 @@ var allEmpty = (target) => {
|
|
|
2675
2675
|
var handleBackgroundAction = ($contextState, background) => {
|
|
2676
2676
|
$contextState.get().background.clear?.();
|
|
2677
2677
|
const { dispose: dispose2 } = useBackground(background, (value) => {
|
|
2678
|
-
$contextState.mutate((s) => s.background,
|
|
2679
|
-
return {
|
|
2680
|
-
...prev,
|
|
2681
|
-
background: value
|
|
2682
|
-
};
|
|
2683
|
-
});
|
|
2678
|
+
$contextState.mutate((s) => s.background.background, value);
|
|
2684
2679
|
});
|
|
2685
2680
|
$contextState.mutate((s) => s.background.clear, () => dispose2);
|
|
2686
2681
|
};
|
|
@@ -4176,10 +4171,6 @@ var Game = (props) => {
|
|
|
4176
4171
|
skipTypewriterWhenGoingBack
|
|
4177
4172
|
} = props;
|
|
4178
4173
|
const [auto, setAuto] = createSignal(false);
|
|
4179
|
-
const onChoicesButtonClick = ([disabled, i]) => {
|
|
4180
|
-
if (disabled) return;
|
|
4181
|
-
choice().resolve?.(i);
|
|
4182
|
-
};
|
|
4183
4174
|
const onInputButtonClick = () => {
|
|
4184
4175
|
if (input().error) return;
|
|
4185
4176
|
const {
|
|
@@ -4229,9 +4220,6 @@ var Game = (props) => {
|
|
|
4229
4220
|
return acc;
|
|
4230
4221
|
}, 0);
|
|
4231
4222
|
});
|
|
4232
|
-
createEffect(() => {
|
|
4233
|
-
console.log(images());
|
|
4234
|
-
});
|
|
4235
4223
|
return (() => {
|
|
4236
4224
|
const _el$ = _tmpl$122(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$6 = _el$4.firstChild, _el$16 = _el$3.nextSibling, _el$17 = _el$16.nextSibling, _el$23 = _el$17.nextSibling;
|
|
4237
4225
|
insert(_el$, createComponent(Canvas, {
|
|
@@ -4364,16 +4352,20 @@ var Game = (props) => {
|
|
|
4364
4352
|
get each() {
|
|
4365
4353
|
return choice().choices;
|
|
4366
4354
|
},
|
|
4367
|
-
children: ([text2, active
|
|
4368
|
-
const
|
|
4355
|
+
children: ([text2, active$, visible$, onSelect, image], i) => {
|
|
4356
|
+
const active = from(active$);
|
|
4357
|
+
const visible = from(visible$);
|
|
4358
|
+
const disabled = () => !active();
|
|
4369
4359
|
const index = i();
|
|
4370
4360
|
return createComponent(Show, {
|
|
4371
4361
|
when: visible,
|
|
4372
4362
|
get children() {
|
|
4373
4363
|
const _el$24 = _tmpl$132(), _el$25 = _el$24.firstChild;
|
|
4374
|
-
_el$24.$$click =
|
|
4375
|
-
|
|
4376
|
-
|
|
4364
|
+
_el$24.$$click = () => {
|
|
4365
|
+
onSelect();
|
|
4366
|
+
if (disabled()) return;
|
|
4367
|
+
choice().resolve?.(index);
|
|
4368
|
+
};
|
|
4377
4369
|
insert(_el$25, text2);
|
|
4378
4370
|
insert(_el$24, createComponent(Show, {
|
|
4379
4371
|
when: image !== "",
|
|
@@ -4390,6 +4382,7 @@ var Game = (props) => {
|
|
|
4390
4382
|
});
|
|
4391
4383
|
}
|
|
4392
4384
|
}), null);
|
|
4385
|
+
createRenderEffect(() => setAttribute(_el$24, "aria-disabled", disabled()));
|
|
4393
4386
|
return _el$24;
|
|
4394
4387
|
}
|
|
4395
4388
|
});
|
|
@@ -5230,7 +5223,7 @@ var createSolidRenderer = ({
|
|
|
5230
5223
|
canvas,
|
|
5231
5224
|
ctx: canvasContext,
|
|
5232
5225
|
emotions: {},
|
|
5233
|
-
|
|
5226
|
+
emotion(emotion, shouldRender) {
|
|
5234
5227
|
let stored = this.emotions[emotion];
|
|
5235
5228
|
if (!stored) {
|
|
5236
5229
|
stored = this.emotions[emotion] = options.getCharacterAssets(character, emotion).map((src) => imagePreloadWithCachingNotComplete(src));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"clsx": "^2.1.1",
|
|
20
20
|
"solid-js": "1.8.21",
|
|
21
21
|
"solid-transition-group": "^0.2.3",
|
|
22
|
-
"@novely/core": "0.
|
|
23
|
-
"@novely/renderer-toolkit": "0.
|
|
22
|
+
"@novely/core": "0.45.1",
|
|
23
|
+
"@novely/renderer-toolkit": "0.11.2",
|
|
24
24
|
"@novely/typewriter": "0.5.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|