@novely/solid-renderer 0.29.1-beta.6 → 0.29.1-beta.7
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 +43 -30
- package/package.json +3 -3
package/dist/index.jsx
CHANGED
|
@@ -4841,6 +4841,43 @@ var handleClearCustomAction = ($contextState, fn) => {
|
|
|
4841
4841
|
if (data)
|
|
4842
4842
|
data.clear();
|
|
4843
4843
|
};
|
|
4844
|
+
var handleClearActionAction = ($contextState, preserve) => {
|
|
4845
|
+
if (preserve !== "choice") {
|
|
4846
|
+
$contextState.mutate(
|
|
4847
|
+
(s) => s.choice,
|
|
4848
|
+
{
|
|
4849
|
+
choices: [],
|
|
4850
|
+
visible: false,
|
|
4851
|
+
label: ""
|
|
4852
|
+
}
|
|
4853
|
+
);
|
|
4854
|
+
}
|
|
4855
|
+
if (preserve !== "input") {
|
|
4856
|
+
$contextState.mutate(
|
|
4857
|
+
(s) => s.input,
|
|
4858
|
+
{
|
|
4859
|
+
element: null,
|
|
4860
|
+
label: "",
|
|
4861
|
+
visible: false,
|
|
4862
|
+
error: ""
|
|
4863
|
+
}
|
|
4864
|
+
);
|
|
4865
|
+
}
|
|
4866
|
+
if (preserve !== "text") {
|
|
4867
|
+
$contextState.mutate((s) => s.text, { content: "" });
|
|
4868
|
+
}
|
|
4869
|
+
if (preserve !== "dialog") {
|
|
4870
|
+
$contextState.mutate(
|
|
4871
|
+
(s) => s.dialog,
|
|
4872
|
+
{
|
|
4873
|
+
visible: false,
|
|
4874
|
+
content: "",
|
|
4875
|
+
name: "",
|
|
4876
|
+
miniature: {}
|
|
4877
|
+
}
|
|
4878
|
+
);
|
|
4879
|
+
}
|
|
4880
|
+
};
|
|
4844
4881
|
var handleTextAction = ($contextState, content, resolve) => {
|
|
4845
4882
|
$contextState.mutate((s) => s.text, { content, resolve });
|
|
4846
4883
|
};
|
|
@@ -6011,14 +6048,7 @@ var Game = (props) => {
|
|
|
6011
6048
|
const onChoicesButtonClick = ([disabled, i]) => {
|
|
6012
6049
|
if (disabled)
|
|
6013
6050
|
return;
|
|
6014
|
-
|
|
6015
|
-
$contextState.setKey("choice", {
|
|
6016
|
-
choices: [],
|
|
6017
|
-
visible: false,
|
|
6018
|
-
resolve: void 0,
|
|
6019
|
-
label: ""
|
|
6020
|
-
});
|
|
6021
|
-
resolve(i);
|
|
6051
|
+
choice().resolve?.(i);
|
|
6022
6052
|
};
|
|
6023
6053
|
const onInputButtonClick = () => {
|
|
6024
6054
|
if (input().error)
|
|
@@ -6027,14 +6057,6 @@ var Game = (props) => {
|
|
|
6027
6057
|
resolve,
|
|
6028
6058
|
cleanup
|
|
6029
6059
|
} = input();
|
|
6030
|
-
$contextState.setKey("input", {
|
|
6031
|
-
element: null,
|
|
6032
|
-
label: "",
|
|
6033
|
-
error: "",
|
|
6034
|
-
visible: false,
|
|
6035
|
-
cleanup: void 0,
|
|
6036
|
-
resolve: void 0
|
|
6037
|
-
});
|
|
6038
6060
|
cleanup?.();
|
|
6039
6061
|
resolve?.();
|
|
6040
6062
|
};
|
|
@@ -6056,24 +6078,12 @@ var Game = (props) => {
|
|
|
6056
6078
|
};
|
|
6057
6079
|
const TextWriter = createTypewriter({
|
|
6058
6080
|
resolve() {
|
|
6059
|
-
|
|
6060
|
-
$contextState.setKey("text", {
|
|
6061
|
-
content: ""
|
|
6062
|
-
});
|
|
6063
|
-
resolve();
|
|
6081
|
+
text().resolve?.();
|
|
6064
6082
|
}
|
|
6065
6083
|
});
|
|
6066
6084
|
const DialogWriter = createTypewriter({
|
|
6067
6085
|
resolve() {
|
|
6068
|
-
|
|
6069
|
-
$contextState.setKey("dialog", {
|
|
6070
|
-
content: "",
|
|
6071
|
-
name: "",
|
|
6072
|
-
miniature: {},
|
|
6073
|
-
visible: false,
|
|
6074
|
-
resolve: void 0
|
|
6075
|
-
});
|
|
6076
|
-
resolve();
|
|
6086
|
+
dialog().resolve?.();
|
|
6077
6087
|
}
|
|
6078
6088
|
});
|
|
6079
6089
|
const controlPanelMenuID = createUniqueId();
|
|
@@ -7050,6 +7060,9 @@ var createSolidRenderer = ({
|
|
|
7050
7060
|
clearCustom(fn) {
|
|
7051
7061
|
handleClearCustomAction($contextState, fn);
|
|
7052
7062
|
},
|
|
7063
|
+
clearAction(name2) {
|
|
7064
|
+
handleClearActionAction($contextState, name2);
|
|
7065
|
+
},
|
|
7053
7066
|
vibrate(pattern) {
|
|
7054
7067
|
handleVibrateAction(pattern);
|
|
7055
7068
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.29.1-beta.
|
|
3
|
+
"version": "0.29.1-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"retrieved": "^0.1.0",
|
|
20
20
|
"solid-js": "1.8.17",
|
|
21
21
|
"solid-transition-group": "^0.2.3",
|
|
22
|
-
"@novely/core": "0.33.0-beta.
|
|
23
|
-
"@novely/renderer-toolkit": "0.
|
|
22
|
+
"@novely/core": "0.33.0-beta.2",
|
|
23
|
+
"@novely/renderer-toolkit": "0.4.0-beta.0",
|
|
24
24
|
"@novely/typewriter": "0.5.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|