@novely/solid-renderer 0.49.0 → 0.50.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.
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface TypewriterProps {
|
|
1
|
+
import type { VoidComponent } from 'solid-js';
|
|
2
|
+
type TypewriterProps = {
|
|
4
3
|
content: string | undefined;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ended: (prefersReducedMotion: boolean) => void;
|
|
8
|
-
attributes?: JSX.HTMLAttributes<HTMLSpanElement>;
|
|
9
|
-
}
|
|
10
|
-
interface CreateTypewriterOptions {
|
|
4
|
+
};
|
|
5
|
+
type CreateTypewriterOptions = {
|
|
11
6
|
resolve: () => void;
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
ignore: () => boolean;
|
|
8
|
+
onComplete: (prm: boolean, click: () => void) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const createTypewriter: ({ ignore, onComplete, resolve }: CreateTypewriterOptions) => {
|
|
14
11
|
Typewriter: VoidComponent<TypewriterProps>;
|
|
15
|
-
|
|
16
|
-
state: import("solid-js").Accessor<"processing" | "done" | "idle">;
|
|
12
|
+
click: () => void;
|
|
17
13
|
};
|
|
18
14
|
export { createTypewriter };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const TEXT_SPEED_MAP: {
|
|
2
|
+
Slow: () => number;
|
|
3
|
+
Medium: () => number;
|
|
4
|
+
Fast: () => number;
|
|
5
|
+
Auto: () => number;
|
|
6
|
+
};
|
|
3
7
|
export { TEXT_SPEED_MAP };
|
package/dist/index.jsx
CHANGED
|
@@ -1140,7 +1140,7 @@ var SVGNamespace = {
|
|
|
1140
1140
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1141
1141
|
};
|
|
1142
1142
|
function reconcileArrays(parentNode, a, b) {
|
|
1143
|
-
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling,
|
|
1143
|
+
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
1144
1144
|
while (aStart < aEnd || bStart < bEnd) {
|
|
1145
1145
|
if (a[aStart] === b[bStart]) {
|
|
1146
1146
|
aStart++;
|
|
@@ -1156,7 +1156,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1156
1156
|
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
1157
1157
|
} else if (bEnd === bStart) {
|
|
1158
1158
|
while (aStart < aEnd) {
|
|
1159
|
-
if (!
|
|
1159
|
+
if (!map || !map.has(a[aStart])) a[aStart].remove();
|
|
1160
1160
|
aStart++;
|
|
1161
1161
|
}
|
|
1162
1162
|
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
@@ -1165,17 +1165,17 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1165
1165
|
parentNode.insertBefore(b[--bEnd], node);
|
|
1166
1166
|
a[aEnd] = b[bEnd];
|
|
1167
1167
|
} else {
|
|
1168
|
-
if (!
|
|
1169
|
-
|
|
1168
|
+
if (!map) {
|
|
1169
|
+
map = /* @__PURE__ */ new Map();
|
|
1170
1170
|
let i = bStart;
|
|
1171
|
-
while (i < bEnd)
|
|
1171
|
+
while (i < bEnd) map.set(b[i], i++);
|
|
1172
1172
|
}
|
|
1173
|
-
const index =
|
|
1173
|
+
const index = map.get(a[aStart]);
|
|
1174
1174
|
if (index != null) {
|
|
1175
1175
|
if (bStart < index && index < bEnd) {
|
|
1176
1176
|
let i = aStart, sequence = 1, t;
|
|
1177
1177
|
while (++i < aEnd && i < bEnd) {
|
|
1178
|
-
if ((t =
|
|
1178
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
1179
1179
|
sequence++;
|
|
1180
1180
|
}
|
|
1181
1181
|
if (sequence > index - bStart) {
|
|
@@ -3716,186 +3716,238 @@ var Save = (props) => {
|
|
|
3716
3716
|
};
|
|
3717
3717
|
delegateEvents(["click", "keydown", "keyup"]);
|
|
3718
3718
|
|
|
3719
|
-
//
|
|
3720
|
-
var
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
el.childNodes.forEach((child) => {
|
|
3726
|
-
if (child.nodeName === "#text") items.push(child);
|
|
3727
|
-
else items.push(...collectTextNodes(child));
|
|
3728
|
-
});
|
|
3729
|
-
return items;
|
|
3719
|
+
// src/constants.ts
|
|
3720
|
+
var TEXT_SPEED_MAP = {
|
|
3721
|
+
Slow: () => 450,
|
|
3722
|
+
Medium: () => 300,
|
|
3723
|
+
Fast: () => 150,
|
|
3724
|
+
Auto: () => Math.random() * (450 - 150) + 150
|
|
3730
3725
|
};
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3726
|
+
|
|
3727
|
+
// src/components/Typewriter.tsx
|
|
3728
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<span>`);
|
|
3729
|
+
var PRM = matchMedia("(prefers-reduced-motion: reduce)");
|
|
3730
|
+
var createRandomId = /* @__PURE__ */ (() => {
|
|
3731
|
+
let i = 0;
|
|
3732
|
+
return () => {
|
|
3733
|
+
return "nrid" + i++ + Math.random().toString(26).slice(2);
|
|
3734
|
+
};
|
|
3735
|
+
})();
|
|
3736
|
+
var Writer = class Writer2 {
|
|
3737
|
+
constructor(node, input, getDuration, endedCallback) {
|
|
3738
|
+
this.completed = false;
|
|
3739
|
+
this.input = input;
|
|
3740
|
+
this.current = 0;
|
|
3741
|
+
this.animation = null;
|
|
3742
|
+
this.endedCallback = endedCallback;
|
|
3743
|
+
this.getDuration = getDuration;
|
|
3744
|
+
this.node = node;
|
|
3745
|
+
this.node.innerHTML = input;
|
|
3746
|
+
this.segments = [];
|
|
3747
|
+
if (input === "") {
|
|
3748
|
+
this.completed = true;
|
|
3749
|
+
this.endedCallback();
|
|
3750
|
+
return;
|
|
3737
3751
|
}
|
|
3752
|
+
if (PRM.matches) {
|
|
3753
|
+
this.completed = true;
|
|
3754
|
+
this.endedCallback();
|
|
3755
|
+
return;
|
|
3756
|
+
}
|
|
3757
|
+
this.searchNodeForSegments(this.node);
|
|
3758
|
+
this.breakSegments();
|
|
3738
3759
|
}
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
const nodes = collectTextNodes(node).map((child) => {
|
|
3744
|
-
const letters = map(child.textContent, (char, prev) => {
|
|
3745
|
-
if (char === " " && prev) {
|
|
3746
|
-
prev.textContent += " ";
|
|
3747
|
-
return void 0;
|
|
3760
|
+
searchNodeForSegments(node) {
|
|
3761
|
+
for (const child of Array.from(node.childNodes)) {
|
|
3762
|
+
if (child.nodeName === "#text") {
|
|
3763
|
+
this.segments.push(child);
|
|
3748
3764
|
} else {
|
|
3749
|
-
|
|
3750
|
-
text2.textContent = char;
|
|
3751
|
-
text2.style.opacity = "0";
|
|
3752
|
-
return text2;
|
|
3765
|
+
this.searchNodeForSegments(child);
|
|
3753
3766
|
}
|
|
3754
|
-
});
|
|
3755
|
-
child.replaceWith(...letters);
|
|
3756
|
-
return letters;
|
|
3757
|
-
});
|
|
3758
|
-
let current = 0;
|
|
3759
|
-
let pos = 0;
|
|
3760
|
-
let end = false;
|
|
3761
|
-
let frame;
|
|
3762
|
-
const enqueue = () => {
|
|
3763
|
-
frame = requestAnimationFrame(queue);
|
|
3764
|
-
};
|
|
3765
|
-
const dequeue = () => {
|
|
3766
|
-
cancelAnimationFrame(frame);
|
|
3767
|
-
};
|
|
3768
|
-
let timeout = 0;
|
|
3769
|
-
let start = 0;
|
|
3770
|
-
let container;
|
|
3771
|
-
const queue = (time) => {
|
|
3772
|
-
if (time >= start + timeout) {
|
|
3773
|
-
start = time;
|
|
3774
|
-
timeout = speed();
|
|
3775
|
-
process2();
|
|
3776
|
-
} else if (end) {
|
|
3777
|
-
dequeue();
|
|
3778
|
-
} else {
|
|
3779
|
-
enqueue();
|
|
3780
3767
|
}
|
|
3781
|
-
}
|
|
3782
|
-
|
|
3783
|
-
const
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3768
|
+
}
|
|
3769
|
+
makeSegmentNode(content) {
|
|
3770
|
+
const span = document.createElement("span");
|
|
3771
|
+
span.textContent = content;
|
|
3772
|
+
span.style.opacity = "0";
|
|
3773
|
+
return span;
|
|
3774
|
+
}
|
|
3775
|
+
breakSegments() {
|
|
3776
|
+
const segments = [];
|
|
3777
|
+
for (const segment of this.segments) {
|
|
3778
|
+
if (!segment.textContent) {
|
|
3779
|
+
segments.push(segment);
|
|
3780
|
+
continue;
|
|
3792
3781
|
}
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
ended && ended();
|
|
3782
|
+
const parts = segment.textContent.split(" ").map((content, index, array) => {
|
|
3783
|
+
const end = index === array.length - 1;
|
|
3784
|
+
const string = end ? content : content + " ";
|
|
3785
|
+
return this.makeSegmentNode(string);
|
|
3786
|
+
});
|
|
3787
|
+
segment.replaceWith(...parts);
|
|
3788
|
+
segments.push(...parts);
|
|
3801
3789
|
}
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3790
|
+
this.segments = segments;
|
|
3791
|
+
}
|
|
3792
|
+
adjustDuration(content, duration) {
|
|
3793
|
+
if (content.length === 1) {
|
|
3794
|
+
return duration / 3;
|
|
3795
|
+
}
|
|
3796
|
+
if (content.length <= 3) {
|
|
3797
|
+
return duration / 2;
|
|
3798
|
+
}
|
|
3799
|
+
return duration;
|
|
3800
|
+
}
|
|
3801
|
+
createAnimation(element, duration) {
|
|
3802
|
+
const id = createRandomId();
|
|
3803
|
+
const style3 = document.createElement("style");
|
|
3804
|
+
document.head.appendChild(style3);
|
|
3805
|
+
style3.innerHTML = `@keyframes a${id} { from { opacity: 0; } to { opacity: 1; } } #${id} { animation: a${id} ${duration}ms linear; }`;
|
|
3806
|
+
element.id = id;
|
|
3807
|
+
return {
|
|
3808
|
+
remove: () => {
|
|
3809
|
+
style3.remove();
|
|
3810
|
+
},
|
|
3811
|
+
pause: () => {
|
|
3812
|
+
element.style.animationPlayState = "paused";
|
|
3813
|
+
},
|
|
3814
|
+
resume: () => {
|
|
3815
|
+
element.style.animationPlayState = "initial";
|
|
3816
|
+
},
|
|
3817
|
+
finish: () => {
|
|
3818
|
+
element.style.animationDuration = "0s";
|
|
3813
3819
|
}
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3820
|
+
};
|
|
3821
|
+
}
|
|
3822
|
+
play() {
|
|
3823
|
+
if (this.completed) return;
|
|
3824
|
+
if (this.current >= this.segments.length) {
|
|
3825
|
+
this.endedCallback();
|
|
3826
|
+
this.completed = true;
|
|
3827
|
+
}
|
|
3828
|
+
const element = this.segments[this.current];
|
|
3829
|
+
if (element instanceof HTMLSpanElement) {
|
|
3830
|
+
const duration = this.adjustDuration(element.textContent || "", this.getDuration());
|
|
3831
|
+
const animation = this.createAnimation(element, duration);
|
|
3832
|
+
element.addEventListener("animationend", () => {
|
|
3833
|
+
animation.remove();
|
|
3834
|
+
this.animation = null;
|
|
3835
|
+
element.replaceWith(document.createTextNode(element.textContent || ""));
|
|
3836
|
+
this.current++;
|
|
3837
|
+
this.play();
|
|
3838
|
+
}, {
|
|
3839
|
+
once: true
|
|
3840
|
+
});
|
|
3841
|
+
this.animation = animation;
|
|
3824
3842
|
}
|
|
3825
|
-
}
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3843
|
+
}
|
|
3844
|
+
pause() {
|
|
3845
|
+
if (this.animation) {
|
|
3846
|
+
this.animation.pause();
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
resume() {
|
|
3850
|
+
if (this.animation) {
|
|
3851
|
+
this.animation.resume();
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
complete() {
|
|
3855
|
+
if (this.completed) return;
|
|
3856
|
+
if (this.animation) {
|
|
3857
|
+
this.animation.finish();
|
|
3858
|
+
this.animation.remove();
|
|
3859
|
+
this.animation = null;
|
|
3860
|
+
}
|
|
3861
|
+
this.node.innerHTML = this.input;
|
|
3862
|
+
this.completed = true;
|
|
3863
|
+
this.endedCallback();
|
|
3864
|
+
}
|
|
3865
|
+
destroy() {
|
|
3866
|
+
if (this.animation) {
|
|
3867
|
+
this.animation.finish();
|
|
3868
|
+
this.animation.remove();
|
|
3869
|
+
this.animation = null;
|
|
3870
|
+
}
|
|
3871
|
+
this.node.innerHTML = "";
|
|
3872
|
+
}
|
|
3873
|
+
setDurationFunction(fn) {
|
|
3874
|
+
this.getDuration = fn;
|
|
3875
|
+
}
|
|
3834
3876
|
};
|
|
3835
|
-
|
|
3836
|
-
// src/components/Typewriter.tsx
|
|
3837
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<span>`);
|
|
3838
|
-
var PRM = matchMedia("(prefers-reduced-motion: reduce)");
|
|
3839
3877
|
var createTypewriter = ({
|
|
3878
|
+
ignore,
|
|
3879
|
+
onComplete,
|
|
3840
3880
|
resolve
|
|
3841
3881
|
}) => {
|
|
3842
|
-
let
|
|
3843
|
-
let typewriter2;
|
|
3882
|
+
let typewriter;
|
|
3844
3883
|
const [state, setState] = createSignal("idle");
|
|
3884
|
+
const click = () => {
|
|
3885
|
+
if (!typewriter) return;
|
|
3886
|
+
if (typewriter.completed) {
|
|
3887
|
+
setState("idle");
|
|
3888
|
+
resolve();
|
|
3889
|
+
return;
|
|
3890
|
+
}
|
|
3891
|
+
typewriter.complete();
|
|
3892
|
+
setState("done");
|
|
3893
|
+
};
|
|
3845
3894
|
const Typewriter = (props) => {
|
|
3895
|
+
const data = useData();
|
|
3896
|
+
const duration = createMemo(() => data.storageData().meta[1]);
|
|
3897
|
+
const paused = createMemo(() => data.coreData().paused || !data.coreData().focused);
|
|
3898
|
+
const getDurationFunction = () => {
|
|
3899
|
+
return TEXT_SPEED_MAP[untrack(duration)];
|
|
3900
|
+
};
|
|
3846
3901
|
let node;
|
|
3847
3902
|
createEffect(() => {
|
|
3848
3903
|
const text = props.content;
|
|
3849
|
-
|
|
3904
|
+
typewriter?.destroy();
|
|
3850
3905
|
setState("idle");
|
|
3851
3906
|
if (!text) return;
|
|
3852
3907
|
if (!node) return;
|
|
3853
|
-
if (
|
|
3908
|
+
if (untrack(ignore)) {
|
|
3854
3909
|
node.innerHTML = text;
|
|
3855
|
-
bypassed = true;
|
|
3856
3910
|
setState("done");
|
|
3857
3911
|
return;
|
|
3858
3912
|
}
|
|
3859
3913
|
setState("processing");
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
untrack(() => props.ended(PRM.matches));
|
|
3866
|
-
},
|
|
3867
|
-
speed: TEXT_SPEED_MAP[untrack(() => props.speed)]
|
|
3914
|
+
typewriter = new Writer(node, text, getDurationFunction(), () => {
|
|
3915
|
+
setState("done");
|
|
3916
|
+
untrack(() => {
|
|
3917
|
+
onComplete(PRM.matches, click);
|
|
3918
|
+
});
|
|
3868
3919
|
});
|
|
3869
|
-
|
|
3920
|
+
typewriter.play();
|
|
3921
|
+
});
|
|
3922
|
+
createEffect(() => {
|
|
3923
|
+
duration();
|
|
3924
|
+
typewriter?.setDurationFunction(getDurationFunction());
|
|
3925
|
+
});
|
|
3926
|
+
createEffect(() => {
|
|
3927
|
+
paused();
|
|
3928
|
+
if (!typewriter) return;
|
|
3929
|
+
if (typewriter.completed) return;
|
|
3930
|
+
if (paused()) {
|
|
3931
|
+
typewriter.pause();
|
|
3932
|
+
} else {
|
|
3933
|
+
typewriter.resume();
|
|
3934
|
+
}
|
|
3870
3935
|
});
|
|
3871
3936
|
onCleanup(() => {
|
|
3872
3937
|
setState("idle");
|
|
3873
|
-
|
|
3874
|
-
bypassed = false;
|
|
3938
|
+
typewriter?.destroy();
|
|
3875
3939
|
});
|
|
3876
3940
|
return (() => {
|
|
3877
3941
|
var _el$ = _tmpl$8();
|
|
3878
3942
|
var _ref$ = node;
|
|
3879
3943
|
typeof _ref$ === "function" ? use(_ref$, _el$) : node = _el$;
|
|
3880
|
-
|
|
3944
|
+
createRenderEffect(() => setAttribute(_el$, "title", state() === "idle" ? void 0 : data.t(state() === "processing" ? "CompleteText" : "GoForward")));
|
|
3881
3945
|
return _el$;
|
|
3882
3946
|
})();
|
|
3883
3947
|
};
|
|
3884
|
-
const clear = () => {
|
|
3885
|
-
const reduced = PRM.matches;
|
|
3886
|
-
const written = typewriter2 && typewriter2.end();
|
|
3887
|
-
if (reduced || written || bypassed) {
|
|
3888
|
-
bypassed = false;
|
|
3889
|
-
setState("idle");
|
|
3890
|
-
resolve();
|
|
3891
|
-
} else {
|
|
3892
|
-
setState("done");
|
|
3893
|
-
}
|
|
3894
|
-
};
|
|
3895
3948
|
return {
|
|
3896
3949
|
Typewriter,
|
|
3897
|
-
|
|
3898
|
-
state
|
|
3950
|
+
click
|
|
3899
3951
|
};
|
|
3900
3952
|
};
|
|
3901
3953
|
|
|
@@ -4231,26 +4283,36 @@ var Game = (props) => {
|
|
|
4231
4283
|
const customs = () => {
|
|
4232
4284
|
return Object.values(custom());
|
|
4233
4285
|
};
|
|
4234
|
-
const
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4286
|
+
const TextWriter = createTypewriter({
|
|
4287
|
+
resolve() {
|
|
4288
|
+
text().resolve?.();
|
|
4289
|
+
},
|
|
4290
|
+
ignore: () => {
|
|
4291
|
+
return skipTypewriterWhenGoingBack && context.meta.goingBack || Boolean(props.isPreview);
|
|
4292
|
+
},
|
|
4293
|
+
onComplete: (prm, click) => {
|
|
4294
|
+
if (!auto()) return;
|
|
4239
4295
|
if (prm) {
|
|
4240
4296
|
setAuto(false);
|
|
4241
4297
|
} else {
|
|
4242
|
-
|
|
4298
|
+
click();
|
|
4243
4299
|
}
|
|
4244
|
-
};
|
|
4245
|
-
};
|
|
4246
|
-
const TextWriter = createTypewriter({
|
|
4247
|
-
resolve() {
|
|
4248
|
-
text().resolve?.();
|
|
4249
4300
|
}
|
|
4250
4301
|
});
|
|
4251
4302
|
const DialogWriter = createTypewriter({
|
|
4252
4303
|
resolve() {
|
|
4253
4304
|
dialog().resolve?.();
|
|
4305
|
+
},
|
|
4306
|
+
ignore: () => {
|
|
4307
|
+
return skipTypewriterWhenGoingBack && context.meta.goingBack || Boolean(props.isPreview);
|
|
4308
|
+
},
|
|
4309
|
+
onComplete: (prm, click) => {
|
|
4310
|
+
if (!auto()) return;
|
|
4311
|
+
if (prm) {
|
|
4312
|
+
setAuto(false);
|
|
4313
|
+
} else {
|
|
4314
|
+
click();
|
|
4315
|
+
}
|
|
4254
4316
|
}
|
|
4255
4317
|
});
|
|
4256
4318
|
const controlPanelMenuID = createUniqueId();
|
|
@@ -4313,9 +4375,9 @@ var Game = (props) => {
|
|
|
4313
4375
|
return mood();
|
|
4314
4376
|
}
|
|
4315
4377
|
}), _el$5);
|
|
4316
|
-
addEventListener2(_el$5, "keydown", onKey(DialogWriter.
|
|
4317
|
-
addEventListener2(_el$5, "keypress", onKey(DialogWriter.
|
|
4318
|
-
addEventListener2(_el$5, "click", DialogWriter.
|
|
4378
|
+
addEventListener2(_el$5, "keydown", onKey(DialogWriter.click, " "), true);
|
|
4379
|
+
addEventListener2(_el$5, "keypress", onKey(DialogWriter.click, "Enter"));
|
|
4380
|
+
addEventListener2(_el$5, "click", DialogWriter.click, true);
|
|
4319
4381
|
insert(_el$5, createComponent(Show, {
|
|
4320
4382
|
get when() {
|
|
4321
4383
|
return dialog().miniature.emotion;
|
|
@@ -4344,22 +4406,8 @@ var Game = (props) => {
|
|
|
4344
4406
|
}
|
|
4345
4407
|
}), _el$7);
|
|
4346
4408
|
insert(_el$7, createComponent(DialogWriter.Typewriter, {
|
|
4347
|
-
get attributes() {
|
|
4348
|
-
return {
|
|
4349
|
-
title: DialogWriter.state() === "idle" ? void 0 : data.t(DialogWriter.state() === "processing" ? "CompleteText" : "GoForward")
|
|
4350
|
-
};
|
|
4351
|
-
},
|
|
4352
4409
|
get content() {
|
|
4353
4410
|
return dialog().content;
|
|
4354
|
-
},
|
|
4355
|
-
get ignore() {
|
|
4356
|
-
return skipTypewriterWhenGoingBack && context.meta.goingBack || Boolean(props.isPreview);
|
|
4357
|
-
},
|
|
4358
|
-
get speed() {
|
|
4359
|
-
return speed();
|
|
4360
|
-
},
|
|
4361
|
-
get ended() {
|
|
4362
|
-
return onWriterEnd(DialogWriter.clear);
|
|
4363
4411
|
}
|
|
4364
4412
|
}));
|
|
4365
4413
|
insert(_el$, createComponent(Modal, {
|
|
@@ -4489,26 +4537,12 @@ var Game = (props) => {
|
|
|
4489
4537
|
},
|
|
4490
4538
|
children: (value) => value.node
|
|
4491
4539
|
}));
|
|
4492
|
-
addEventListener2(_el$18, "keydown", onKey(TextWriter.
|
|
4493
|
-
addEventListener2(_el$18, "keypress", onKey(TextWriter.
|
|
4494
|
-
addEventListener2(_el$18, "click", TextWriter.
|
|
4540
|
+
addEventListener2(_el$18, "keydown", onKey(TextWriter.click, " "), true);
|
|
4541
|
+
addEventListener2(_el$18, "keypress", onKey(TextWriter.click, "Enter"));
|
|
4542
|
+
addEventListener2(_el$18, "click", TextWriter.click, true);
|
|
4495
4543
|
insert(_el$18, createComponent(TextWriter.Typewriter, {
|
|
4496
|
-
get attributes() {
|
|
4497
|
-
return {
|
|
4498
|
-
title: TextWriter.state() === "idle" ? void 0 : data.t(TextWriter.state() === "processing" ? "CompleteText" : "GoForward")
|
|
4499
|
-
};
|
|
4500
|
-
},
|
|
4501
4544
|
get content() {
|
|
4502
4545
|
return text().content;
|
|
4503
|
-
},
|
|
4504
|
-
get ignore() {
|
|
4505
|
-
return skipTypewriterWhenGoingBack && context.meta.goingBack || Boolean(props.isPreview);
|
|
4506
|
-
},
|
|
4507
|
-
get speed() {
|
|
4508
|
-
return speed();
|
|
4509
|
-
},
|
|
4510
|
-
get ended() {
|
|
4511
|
-
return onWriterEnd(TextWriter.clear);
|
|
4512
4546
|
}
|
|
4513
4547
|
}));
|
|
4514
4548
|
insert(_el$, createComponent(Show, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novely/solid-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"es-toolkit": "^1.31.0",
|
|
22
22
|
"solid-js": "~1.9.4",
|
|
23
23
|
"solid-transition-group": "^0.2.3",
|
|
24
|
-
"@novely/renderer-toolkit": "0.13.0"
|
|
25
|
-
"@novely/typewriter": "0.5.1"
|
|
24
|
+
"@novely/renderer-toolkit": "0.13.0"
|
|
26
25
|
},
|
|
27
26
|
"peerDependencies": {
|
|
28
27
|
"@novely/core": "*",
|