@novely/solid-renderer 0.42.0-next.3 → 0.42.0-next.5
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/Select copy.d.ts +14 -0
- package/dist/components/ShadowRoot.d.ts +3 -0
- package/dist/custom-actions/show-arbitrary-character.d.ts +10 -0
- package/dist/custom-actions.d.ts +24 -0
- package/dist/index.jsx +7 -12
- package/package.json +4 -4
- package/dist/icons/index.d.ts +0 -14
- package/dist/icons.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
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 };
|
|
@@ -0,0 +1,10 @@
|
|
|
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 };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 };
|
package/dist/index.jsx
CHANGED
|
@@ -2420,7 +2420,6 @@ var createAudio2 = (storageData) => {
|
|
|
2420
2420
|
resource.pause();
|
|
2421
2421
|
},
|
|
2422
2422
|
play(loop) {
|
|
2423
|
-
resource.volume = getVolume(method);
|
|
2424
2423
|
resource.loop = loop;
|
|
2425
2424
|
resource.play();
|
|
2426
2425
|
},
|
|
@@ -2433,7 +2432,6 @@ var createAudio2 = (storageData) => {
|
|
|
2433
2432
|
this.start();
|
|
2434
2433
|
this.voiceStop();
|
|
2435
2434
|
const resource = store.voice = getAudio("voice", source);
|
|
2436
|
-
resource.volume = getVolume("voice");
|
|
2437
2435
|
resource.play();
|
|
2438
2436
|
},
|
|
2439
2437
|
voiceStop() {
|
|
@@ -2474,14 +2472,9 @@ var createAudio2 = (storageData) => {
|
|
|
2474
2472
|
};
|
|
2475
2473
|
const clear = (keepAudio) => {
|
|
2476
2474
|
context.voiceStop();
|
|
2477
|
-
const
|
|
2478
|
-
|
|
2479
|
-
|
|
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) {
|
|
2475
|
+
const musics = Object.entries(store.music).filter(([name]) => !keepAudio.music.has(name)).map(([_, a]) => a);
|
|
2476
|
+
const sounds = Object.entries(store.sound).filter(([name]) => !keepAudio.sounds.has(name)).map(([_, a]) => a);
|
|
2477
|
+
for (const music of [...musics, ...sounds]) {
|
|
2485
2478
|
if (!music) continue;
|
|
2486
2479
|
music.stop();
|
|
2487
2480
|
}
|
|
@@ -3150,7 +3143,7 @@ var ControlPanelButtons = (props) => {
|
|
|
3150
3143
|
insert(_el$10, () => data.t("Settings"));
|
|
3151
3144
|
insert(_el$9, createComponent(Icon, {
|
|
3152
3145
|
"class": "control-panel__button__icon",
|
|
3153
|
-
icon: "#novely-
|
|
3146
|
+
icon: "#novely-settings-icon"
|
|
3154
3147
|
}), null);
|
|
3155
3148
|
createRenderEffect(() => setAttribute(_el$9, "title", data.t("Settings")));
|
|
3156
3149
|
return _el$9;
|
|
@@ -4347,7 +4340,9 @@ var Game = (props) => {
|
|
|
4347
4340
|
const disabled = () => !active();
|
|
4348
4341
|
const index = i();
|
|
4349
4342
|
return createComponent(Show, {
|
|
4350
|
-
when
|
|
4343
|
+
get when() {
|
|
4344
|
+
return visible();
|
|
4345
|
+
},
|
|
4351
4346
|
get children() {
|
|
4352
4347
|
const _el$24 = _tmpl$132(), _el$25 = _el$24.firstChild;
|
|
4353
4348
|
_el$24.$$click = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.42.0-next.
|
|
3
|
+
"version": "0.42.0-next.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,13 +20,13 @@
|
|
|
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.46.0-next.3",
|
|
23
24
|
"@novely/renderer-toolkit": "0.12.0",
|
|
24
|
-
"@novely/typewriter": "0.5.1"
|
|
25
|
-
"@novely/core": "0.46.0-next.1"
|
|
25
|
+
"@novely/typewriter": "0.5.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"solid-js": "*",
|
|
29
|
-
"@novely/core": "0.46.0-next.
|
|
29
|
+
"@novely/core": "0.46.0-next.3"
|
|
30
30
|
},
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"bugs": {
|
package/dist/icons/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
DELETED
|
File without changes
|