@novely/solid-renderer 0.42.0-next.0 → 0.42.0-next.2
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/DialogName.d.ts +3 -2
- package/dist/components/Icon.d.ts +0 -2
- package/dist/context-state.d.ts +1 -0
- package/dist/custom-actions/index.d.ts +1 -0
- package/dist/custom-actions/mood.d.ts +3 -0
- package/dist/icons/index.d.ts +14 -0
- package/dist/icons.d.ts +0 -0
- package/dist/index.jsx +68 -31
- package/dist/renderer.d.ts +1 -0
- package/dist/styles/index.css +4 -0
- package/package.json +1 -1
- package/dist/components/Select copy.d.ts +0 -14
- package/dist/components/ShadowRoot.d.ts +0 -3
- package/dist/custom-actions/show-arbitrary-character.d.ts +0 -10
- package/dist/custom-actions.d.ts +0 -24
|
@@ -12,7 +12,6 @@ declare const Icon: {
|
|
|
12
12
|
Back(): JSX.Element;
|
|
13
13
|
Book(): JSX.Element;
|
|
14
14
|
Save(): JSX.Element;
|
|
15
|
-
Settings(): JSX.Element;
|
|
16
15
|
Exit(): JSX.Element;
|
|
17
16
|
Menu(): JSX.Element;
|
|
18
17
|
Close(): JSX.Element;
|
|
@@ -21,7 +20,6 @@ declare const Icon: {
|
|
|
21
20
|
StopMedia(): JSX.Element;
|
|
22
21
|
Stop(): JSX.Element;
|
|
23
22
|
FilePlus(): JSX.Element;
|
|
24
|
-
Files(): JSX.Element;
|
|
25
23
|
ChevronDown(): JSX.Element;
|
|
26
24
|
ChevronUp(): JSX.Element;
|
|
27
25
|
};
|
package/dist/context-state.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const useContextState: (id: string) => import("@novely/renderer-toolkit").DeepAtom<import("@novely/renderer-toolkit").ContextStateStore<{
|
|
2
2
|
images: Record<string, HTMLImageElement | undefined>;
|
|
3
3
|
dialogOverviewShown: boolean;
|
|
4
|
+
mood: string;
|
|
4
5
|
}>>, removeContextState: (id: string) => void;
|
|
5
6
|
type IContextState = ReturnType<typeof useContextState>;
|
|
6
7
|
export { useContextState, removeContextState };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const iconStore: {
|
|
2
|
+
SkipBack: import("solid-js").JSX.Element;
|
|
3
|
+
BookOpen: import("solid-js").JSX.Element;
|
|
4
|
+
FloppyDisk: import("solid-js").JSX.Element;
|
|
5
|
+
GearSix: import("solid-js").JSX.Element;
|
|
6
|
+
SignOut: import("solid-js").JSX.Element;
|
|
7
|
+
List: import("solid-js").JSX.Element;
|
|
8
|
+
X: import("solid-js").JSX.Element;
|
|
9
|
+
Play: import("solid-js").JSX.Element;
|
|
10
|
+
Stop: import("solid-js").JSX.Element;
|
|
11
|
+
ArrowSquareRight: import("solid-js").JSX.Element;
|
|
12
|
+
FilePlus: import("solid-js").JSX.Element;
|
|
13
|
+
Files: import("solid-js").JSX.Element;
|
|
14
|
+
};
|
package/dist/icons.d.ts
ADDED
|
File without changes
|
package/dist/index.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/solid-js@1.9.
|
|
1
|
+
// ../../node_modules/.pnpm/solid-js@1.9.1/node_modules/solid-js/dist/solid.js
|
|
2
2
|
var sharedConfig = {
|
|
3
3
|
context: void 0,
|
|
4
4
|
registry: void 0,
|
|
@@ -973,7 +973,7 @@ function Match(props) {
|
|
|
973
973
|
return props;
|
|
974
974
|
}
|
|
975
975
|
|
|
976
|
-
// ../../node_modules/.pnpm/solid-js@1.9.
|
|
976
|
+
// ../../node_modules/.pnpm/solid-js@1.9.1/node_modules/solid-js/web/dist/web.js
|
|
977
977
|
var booleans = [
|
|
978
978
|
"allowfullscreen",
|
|
979
979
|
"async",
|
|
@@ -2420,6 +2420,7 @@ var createAudio2 = (storageData) => {
|
|
|
2420
2420
|
resource.pause();
|
|
2421
2421
|
},
|
|
2422
2422
|
play(loop) {
|
|
2423
|
+
resource.volume = getVolume(method);
|
|
2423
2424
|
resource.loop = loop;
|
|
2424
2425
|
resource.play();
|
|
2425
2426
|
},
|
|
@@ -2432,6 +2433,7 @@ var createAudio2 = (storageData) => {
|
|
|
2432
2433
|
this.start();
|
|
2433
2434
|
this.voiceStop();
|
|
2434
2435
|
const resource = store.voice = getAudio("voice", source);
|
|
2436
|
+
resource.volume = getVolume("voice");
|
|
2435
2437
|
resource.play();
|
|
2436
2438
|
},
|
|
2437
2439
|
voiceStop() {
|
|
@@ -2472,9 +2474,14 @@ var createAudio2 = (storageData) => {
|
|
|
2472
2474
|
};
|
|
2473
2475
|
const clear = (keepAudio) => {
|
|
2474
2476
|
context.voiceStop();
|
|
2475
|
-
const
|
|
2476
|
-
|
|
2477
|
-
|
|
2477
|
+
const entries2 = [
|
|
2478
|
+
[store.music, keepAudio.music],
|
|
2479
|
+
[store.sound, keepAudio.sounds]
|
|
2480
|
+
];
|
|
2481
|
+
const clearEntries = entries2.flatMap(([incoming, keep]) => {
|
|
2482
|
+
return Object.entries(incoming).filter(([name]) => !keep.has(name)).map(([_, a]) => a);
|
|
2483
|
+
});
|
|
2484
|
+
for (const music of clearEntries) {
|
|
2478
2485
|
if (!music) continue;
|
|
2479
2486
|
music.stop();
|
|
2480
2487
|
}
|
|
@@ -3149,7 +3156,8 @@ var ControlPanelButtons = (props) => {
|
|
|
3149
3156
|
delegateEvents(["click"]);
|
|
3150
3157
|
|
|
3151
3158
|
// src/components/DialogName.tsx
|
|
3152
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<
|
|
3159
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div class="action-dialog-name">`);
|
|
3160
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<span class="action-dialog-mood-separator">✦`);
|
|
3153
3161
|
var DialogName = (props) => {
|
|
3154
3162
|
const data = useData();
|
|
3155
3163
|
const color = () => {
|
|
@@ -3157,7 +3165,13 @@ var DialogName = (props) => {
|
|
|
3157
3165
|
};
|
|
3158
3166
|
return (() => {
|
|
3159
3167
|
const _el$ = _tmpl$8();
|
|
3160
|
-
insert(_el$, () => props.name || " ");
|
|
3168
|
+
insert(_el$, () => props.name || " ", null);
|
|
3169
|
+
insert(_el$, createComponent(Show, {
|
|
3170
|
+
get when() {
|
|
3171
|
+
return props.mood;
|
|
3172
|
+
},
|
|
3173
|
+
children: (mood) => [" ", _tmpl$23(), " ", createMemo(mood)]
|
|
3174
|
+
}), null);
|
|
3161
3175
|
createRenderEffect((_p$) => {
|
|
3162
3176
|
const _v$ = color(), _v$2 = props.character ? 1 : 0, _v$3 = props.character ? "visible" : "hidden";
|
|
3163
3177
|
_v$ !== _p$._v$ && ((_p$._v$ = _v$) != null ? _el$.style.setProperty("color", _v$) : _el$.style.removeProperty("color"));
|
|
@@ -3229,7 +3243,7 @@ var Modal = (props) => {
|
|
|
3229
3243
|
})();
|
|
3230
3244
|
};
|
|
3231
3245
|
|
|
3232
|
-
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.0.5_solid-js@1.9.
|
|
3246
|
+
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.0.5_solid-js@1.9.1/node_modules/@solid-primitives/transition-group/dist/index.js
|
|
3233
3247
|
var noop2 = () => {
|
|
3234
3248
|
};
|
|
3235
3249
|
var noopTransition = (el, done) => done();
|
|
@@ -3297,10 +3311,10 @@ function createSwitchTransition(source, options) {
|
|
|
3297
3311
|
return returned;
|
|
3298
3312
|
}
|
|
3299
3313
|
|
|
3300
|
-
// ../../node_modules/.pnpm/@solid-primitives+utils@6.2.3_solid-js@1.9.
|
|
3314
|
+
// ../../node_modules/.pnpm/@solid-primitives+utils@6.2.3_solid-js@1.9.1/node_modules/@solid-primitives/utils/dist/chunk/R5675YMU.js
|
|
3301
3315
|
var access = (v) => typeof v === "function" && !v.length ? v() : v;
|
|
3302
3316
|
|
|
3303
|
-
// ../../node_modules/.pnpm/@solid-primitives+refs@1.0.8_solid-js@1.9.
|
|
3317
|
+
// ../../node_modules/.pnpm/@solid-primitives+refs@1.0.8_solid-js@1.9.1/node_modules/@solid-primitives/refs/dist/index.js
|
|
3304
3318
|
var defaultElementPredicate = isServer ? (item) => item != null && typeof item === "object" && "t" in item : (item) => item instanceof Element;
|
|
3305
3319
|
function getFirstChild(value, predicate) {
|
|
3306
3320
|
if (predicate(value))
|
|
@@ -3321,7 +3335,7 @@ function resolveFirst(fn, predicate = defaultElementPredicate, serverPredicate =
|
|
|
3321
3335
|
return createMemo(() => getFirstChild(children2(), isServer ? serverPredicate : predicate));
|
|
3322
3336
|
}
|
|
3323
3337
|
|
|
3324
|
-
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.9.
|
|
3338
|
+
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.9.1/node_modules/solid-transition-group/dist/index.js
|
|
3325
3339
|
function createClassnames(props) {
|
|
3326
3340
|
return createMemo(() => {
|
|
3327
3341
|
const name = props.name || "s";
|
|
@@ -3420,13 +3434,14 @@ var Transition2 = (props) => {
|
|
|
3420
3434
|
var { useContextState, removeContextState } = createContextStateRoot(() => {
|
|
3421
3435
|
return {
|
|
3422
3436
|
images: {},
|
|
3423
|
-
dialogOverviewShown: false
|
|
3437
|
+
dialogOverviewShown: false,
|
|
3438
|
+
mood: ""
|
|
3424
3439
|
};
|
|
3425
3440
|
});
|
|
3426
3441
|
|
|
3427
3442
|
// src/components/Save.tsx
|
|
3428
3443
|
var _tmpl$10 = /* @__PURE__ */ template(`<div class="saves__list-item__overlay">`);
|
|
3429
|
-
var _tmpl$
|
|
3444
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<iframe tabindex="-1" class="saves__list-item__iframe" src="about:blank">`);
|
|
3430
3445
|
var _tmpl$32 = /* @__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>`);
|
|
3431
3446
|
var _tmpl$42 = /* @__PURE__ */ template(`<div class="saves__list-item__iframe">`);
|
|
3432
3447
|
var CURRENT_DATE = /* @__PURE__ */ new Date();
|
|
@@ -3569,7 +3584,7 @@ var Save = (props) => {
|
|
|
3569
3584
|
},
|
|
3570
3585
|
get children() {
|
|
3571
3586
|
return [(() => {
|
|
3572
|
-
const _el$4 = _tmpl$
|
|
3587
|
+
const _el$4 = _tmpl$24();
|
|
3573
3588
|
_el$4.addEventListener("load", () => {
|
|
3574
3589
|
onIframeLoaded();
|
|
3575
3590
|
});
|
|
@@ -3905,7 +3920,7 @@ var Range = (props) => {
|
|
|
3905
3920
|
|
|
3906
3921
|
// src/components/DialogOverview.tsx
|
|
3907
3922
|
var _tmpl$15 = /* @__PURE__ */ template(`<div class="dialog-overview__head"><span></span><button type="button" class="button">`);
|
|
3908
|
-
var _tmpl$
|
|
3923
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div class="dialog-overview__body"><table class="dialog-overview__list">`);
|
|
3909
3924
|
var _tmpl$33 = /* @__PURE__ */ template(`<button type="button" class="dialog-overview__button-audio-control"><svg fill="currentColor" width="24" height="24" viewBox="0 0 256 256"><use>`);
|
|
3910
3925
|
var _tmpl$43 = /* @__PURE__ */ template(`<tr class="dialog-overview__list-item"><td class="dialog-overview__list-item__name"><span></span></td><td></td><td class="dialog-overview__list-item__text"><span>`);
|
|
3911
3926
|
var DialogOverview = (props) => {
|
|
@@ -3944,7 +3959,7 @@ var DialogOverview = (props) => {
|
|
|
3944
3959
|
insert(_el$3, () => data.t("Close"));
|
|
3945
3960
|
return _el$;
|
|
3946
3961
|
})(), (() => {
|
|
3947
|
-
const _el$4 = _tmpl$
|
|
3962
|
+
const _el$4 = _tmpl$25(), _el$5 = _el$4.firstChild;
|
|
3948
3963
|
use(setScrollArea, _el$5);
|
|
3949
3964
|
insert(_el$5, createComponent(Show, {
|
|
3950
3965
|
get when() {
|
|
@@ -4008,7 +4023,7 @@ var DialogOverview = (props) => {
|
|
|
4008
4023
|
};
|
|
4009
4024
|
delegateEvents(["click"]);
|
|
4010
4025
|
|
|
4011
|
-
// ../../node_modules/.pnpm/@solid-primitives+destructure@0.1.17_solid-js@1.9.
|
|
4026
|
+
// ../../node_modules/.pnpm/@solid-primitives+destructure@0.1.17_solid-js@1.9.1/node_modules/@solid-primitives/destructure/dist/index.js
|
|
4012
4027
|
var isReactiveObject = (value) => typeof value === "object" && value !== null;
|
|
4013
4028
|
function createProxyCache(obj, get) {
|
|
4014
4029
|
return new Proxy(
|
|
@@ -4055,7 +4070,7 @@ function destructure(source, options) {
|
|
|
4055
4070
|
|
|
4056
4071
|
// src/screens/game.tsx
|
|
4057
4072
|
var _tmpl$16 = /* @__PURE__ */ template(`<div class="action-dialog-person">`);
|
|
4058
|
-
var _tmpl$
|
|
4073
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<span class="dialog-label">`);
|
|
4059
4074
|
var _tmpl$34 = /* @__PURE__ */ template(`<div class="choice-dialog__choices">`);
|
|
4060
4075
|
var _tmpl$44 = /* @__PURE__ */ template(`<label for="novely-input" class="input-dialog__text input-dialog__label">`);
|
|
4061
4076
|
var _tmpl$52 = /* @__PURE__ */ template(`<span class="input-dialog__text input-dialog__error" aria-live="polite" aria-atomic="true">`);
|
|
@@ -4081,7 +4096,8 @@ var Game = (props) => {
|
|
|
4081
4096
|
background,
|
|
4082
4097
|
custom,
|
|
4083
4098
|
images,
|
|
4084
|
-
dialogOverviewShown
|
|
4099
|
+
dialogOverviewShown,
|
|
4100
|
+
mood
|
|
4085
4101
|
} = destructure(from(props.$contextState));
|
|
4086
4102
|
const rendererState = from(data.$rendererState);
|
|
4087
4103
|
const exitPromptShown = () => rendererState().exitPromptShown;
|
|
@@ -4194,6 +4210,9 @@ var Game = (props) => {
|
|
|
4194
4210
|
},
|
|
4195
4211
|
get name() {
|
|
4196
4212
|
return dialog().name;
|
|
4213
|
+
},
|
|
4214
|
+
get mood() {
|
|
4215
|
+
return mood();
|
|
4197
4216
|
}
|
|
4198
4217
|
}), _el$4);
|
|
4199
4218
|
addEventListener2(_el$4, "keydown", onKey(DialogWriter.clear, " "), true);
|
|
@@ -4255,7 +4274,7 @@ var Game = (props) => {
|
|
|
4255
4274
|
trapFocus: () => !props.isPreview && !exitPromptShown(),
|
|
4256
4275
|
get children() {
|
|
4257
4276
|
return [(() => {
|
|
4258
|
-
const _el$7 = _tmpl$
|
|
4277
|
+
const _el$7 = _tmpl$26();
|
|
4259
4278
|
insert(_el$7, () => choice().label || " ");
|
|
4260
4279
|
createRenderEffect((_p$) => {
|
|
4261
4280
|
const _v$ = Boolean(choice().label), _v$2 = !choice().label;
|
|
@@ -4346,7 +4365,7 @@ var Game = (props) => {
|
|
|
4346
4365
|
trapFocus: () => !props.isPreview && exitPromptShown(),
|
|
4347
4366
|
get children() {
|
|
4348
4367
|
return [(() => {
|
|
4349
|
-
const _el$12 = _tmpl$
|
|
4368
|
+
const _el$12 = _tmpl$26();
|
|
4350
4369
|
insert(_el$12, () => data.t("ExitDialogWarning"));
|
|
4351
4370
|
return _el$12;
|
|
4352
4371
|
})(), (() => {
|
|
@@ -4525,7 +4544,7 @@ var Loading = (props) => {
|
|
|
4525
4544
|
|
|
4526
4545
|
// src/screens/mainmenu.tsx
|
|
4527
4546
|
var _tmpl$18 = /* @__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><svg width="24" height="24" viewBox="0 0 256 256"><use href="#novely-file-plus-icon"></use></svg></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span><svg width="24" height="24" viewBox="0 0 256 256"><use href="#novely-play-game-icon"></use></svg></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span><svg width="24" height="24" viewBox="0 0 256 256"><use href="#novely-files-icon"></use></svg></button><button type="button" class="button main-menu__button"><span class="main-menu__button__text"></span><svg width="24" height="24" viewBox="0 0 256 256"><use href="#novely-settings-icon">`);
|
|
4528
|
-
var _tmpl$
|
|
4547
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<button>`);
|
|
4529
4548
|
var MainMenu = () => {
|
|
4530
4549
|
const {
|
|
4531
4550
|
t,
|
|
@@ -4568,7 +4587,7 @@ var MainMenu = () => {
|
|
|
4568
4587
|
return rendererStore().mainmenu;
|
|
4569
4588
|
},
|
|
4570
4589
|
children: (item) => (() => {
|
|
4571
|
-
const _el$11 = _tmpl$
|
|
4590
|
+
const _el$11 = _tmpl$27();
|
|
4572
4591
|
spread(_el$11, mergeProps(() => item(goto)), false, false);
|
|
4573
4592
|
return _el$11;
|
|
4574
4593
|
})()
|
|
@@ -4581,7 +4600,7 @@ delegateEvents(["click"]);
|
|
|
4581
4600
|
|
|
4582
4601
|
// src/screens/saves.tsx
|
|
4583
4602
|
var _tmpl$19 = /* @__PURE__ */ template(`<ol class="saves__list">`);
|
|
4584
|
-
var _tmpl$
|
|
4603
|
+
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">`);
|
|
4585
4604
|
var _tmpl$35 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
|
|
4586
4605
|
var Saves = () => {
|
|
4587
4606
|
const {
|
|
@@ -4649,7 +4668,7 @@ var Saves = () => {
|
|
|
4649
4668
|
return !targets.every((item) => completed.includes(item));
|
|
4650
4669
|
};
|
|
4651
4670
|
return (() => {
|
|
4652
|
-
const _el$ = _tmpl$
|
|
4671
|
+
const _el$ = _tmpl$28(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
|
|
4653
4672
|
_el$3.$$click = () => {
|
|
4654
4673
|
$rendererState.setKey("screen", "mainmenu");
|
|
4655
4674
|
};
|
|
@@ -4698,7 +4717,7 @@ delegateEvents(["click"]);
|
|
|
4698
4717
|
|
|
4699
4718
|
// src/screens/settings.tsx
|
|
4700
4719
|
var _tmpl$20 = /* @__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>`);
|
|
4701
|
-
var _tmpl$
|
|
4720
|
+
var _tmpl$29 = /* @__PURE__ */ template(`<option>`);
|
|
4702
4721
|
var Settings = (props) => {
|
|
4703
4722
|
const {
|
|
4704
4723
|
t,
|
|
@@ -4765,7 +4784,7 @@ var Settings = (props) => {
|
|
|
4765
4784
|
return options.languages;
|
|
4766
4785
|
},
|
|
4767
4786
|
children: (lang) => (() => {
|
|
4768
|
-
const _el$8 = _tmpl$
|
|
4787
|
+
const _el$8 = _tmpl$29();
|
|
4769
4788
|
_el$8.value = lang;
|
|
4770
4789
|
insert(_el$8, () => options.getLanguageDisplayName(lang));
|
|
4771
4790
|
createRenderEffect(() => _el$8.selected = lang === language());
|
|
@@ -4784,7 +4803,7 @@ var Settings = (props) => {
|
|
|
4784
4803
|
return createComponent(For, {
|
|
4785
4804
|
each: ["Slow", "Medium", "Fast", "Auto"],
|
|
4786
4805
|
children: (speed) => (() => {
|
|
4787
|
-
const _el$9 = _tmpl$
|
|
4806
|
+
const _el$9 = _tmpl$29();
|
|
4788
4807
|
_el$9.value = speed;
|
|
4789
4808
|
insert(_el$9, () => t("TextSpeed" + speed));
|
|
4790
4809
|
createRenderEffect(() => _el$9.selected = speed === textSpeed());
|
|
@@ -5057,6 +5076,23 @@ var hideImage = (source, params = {}) => {
|
|
|
5057
5076
|
return ["custom", handler];
|
|
5058
5077
|
};
|
|
5059
5078
|
|
|
5079
|
+
// src/custom-actions/mood.ts
|
|
5080
|
+
var SET_MOOD = Symbol();
|
|
5081
|
+
var setMood = (mood) => {
|
|
5082
|
+
const handler = ({ contextKey, clear }) => {
|
|
5083
|
+
const ctx = useContextState(contextKey);
|
|
5084
|
+
if (mood === "''" || mood === '""') ctx.setKey("mood", "");
|
|
5085
|
+
else ctx.setKey("mood", mood);
|
|
5086
|
+
clear(() => {
|
|
5087
|
+
ctx.setKey("mood", "");
|
|
5088
|
+
});
|
|
5089
|
+
};
|
|
5090
|
+
handler.id = SET_MOOD;
|
|
5091
|
+
handler.key = "set-mood";
|
|
5092
|
+
handler.callOnlyLatest = true;
|
|
5093
|
+
return ["custom", handler];
|
|
5094
|
+
};
|
|
5095
|
+
|
|
5060
5096
|
// src/emitter.ts
|
|
5061
5097
|
var createEmitter = () => {
|
|
5062
5098
|
const listeners = /* @__PURE__ */ new Map();
|
|
@@ -5092,7 +5128,7 @@ var createEmitter = () => {
|
|
|
5092
5128
|
};
|
|
5093
5129
|
|
|
5094
5130
|
// src/renderer.tsx
|
|
5095
|
-
var _tmpl$
|
|
5131
|
+
var _tmpl$30 = /* @__PURE__ */ template(`<canvas>`);
|
|
5096
5132
|
var {
|
|
5097
5133
|
preloadAudioBlocking
|
|
5098
5134
|
} = createAudioMisc();
|
|
@@ -5151,7 +5187,7 @@ var createSolidRenderer = ({
|
|
|
5151
5187
|
return chars[character];
|
|
5152
5188
|
}
|
|
5153
5189
|
const canvas = (() => {
|
|
5154
|
-
const _el$ = _tmpl$
|
|
5190
|
+
const _el$ = _tmpl$30();
|
|
5155
5191
|
setAttribute(_el$, "data-character", character);
|
|
5156
5192
|
return _el$;
|
|
5157
5193
|
})();
|
|
@@ -5358,7 +5394,8 @@ var createSolidRenderer = ({
|
|
|
5358
5394
|
},
|
|
5359
5395
|
actions: {
|
|
5360
5396
|
showImage,
|
|
5361
|
-
hideImage
|
|
5397
|
+
hideImage,
|
|
5398
|
+
setMood
|
|
5362
5399
|
}
|
|
5363
5400
|
};
|
|
5364
5401
|
return renderer;
|
package/dist/renderer.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const createSolidRenderer: ({ fullscreen, controls, skipTypewriterWhenGo
|
|
|
32
32
|
out?: string;
|
|
33
33
|
await?: boolean;
|
|
34
34
|
}) => import("@novely/core").ValidAction;
|
|
35
|
+
setMood: (mood: string) => import("@novely/core").ValidAction;
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
38
|
registerScreen(name: string, screen: StateScreen): void;
|
package/dist/styles/index.css
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FlowComponent, JSX } 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 };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Character, CharactersData, Lang, ValidAction } from "@novely/core";
|
|
2
|
-
type ShowArbitraryCharacterParams<$Characters extends CharactersData<Record<string, Character<Lang>>>, $Character extends keyof $Characters> = {
|
|
3
|
-
id: $Character & string;
|
|
4
|
-
emotion: $Characters[$Character]['emotions'][number] & string;
|
|
5
|
-
extendWith: () => string | string[];
|
|
6
|
-
classes?: string;
|
|
7
|
-
style?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const createShowArbitraryCharacterAction: <$Characters extends CharactersData<Record<string, Character>>>() => <$Character extends keyof $Characters>(params: ShowArbitraryCharacterParams<$Characters, $Character>) => ValidAction;
|
|
10
|
-
export { createShowArbitraryCharacterAction };
|
package/dist/custom-actions.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Character, Lang, ValidAction } from "@novely/core";
|
|
2
|
-
type ShowArbitraryCharacterParams<$Characters extends Record<string, Character<Lang>>, $Character extends keyof $Characters> = {
|
|
3
|
-
id: $Character & string;
|
|
4
|
-
emotion: keyof $Characters[$Character]['emotions'] & string;
|
|
5
|
-
extendWith: () => string | string[];
|
|
6
|
-
classes?: string;
|
|
7
|
-
style?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const createShowArbitraryCharacterAction: <$Characters extends Record<string, Character>>(_: $Characters) => <$Character extends keyof $Characters>(params: ShowArbitraryCharacterParams<$Characters, $Character>) => ValidAction;
|
|
10
|
-
type ShowImageParams = {
|
|
11
|
-
z?: number;
|
|
12
|
-
in?: string;
|
|
13
|
-
class?: string;
|
|
14
|
-
style?: string;
|
|
15
|
-
position?: string;
|
|
16
|
-
await?: boolean;
|
|
17
|
-
};
|
|
18
|
-
declare const showImage: (source: string, params?: ShowImageParams) => ValidAction;
|
|
19
|
-
type HideImageParams = {
|
|
20
|
-
out?: string;
|
|
21
|
-
await?: boolean;
|
|
22
|
-
};
|
|
23
|
-
declare const hideImage: (source: string, params?: HideImageParams) => ValidAction;
|
|
24
|
-
export { createShowArbitraryCharacterAction, showImage, hideImage };
|