@novely/solid-renderer 0.29.1-beta.4 → 0.29.1-beta.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/index.jsx +13 -14
- package/package.json +1 -1
package/dist/index.jsx
CHANGED
|
@@ -5525,6 +5525,18 @@ var Save = (props) => {
|
|
|
5525
5525
|
const KEY = `save-${timestamp}-${type}`;
|
|
5526
5526
|
const $contextState = useContextState(KEY);
|
|
5527
5527
|
const context = getContext2(KEY);
|
|
5528
|
+
const game = createMemo(() => {
|
|
5529
|
+
return createComponent(Game, {
|
|
5530
|
+
controls: "outside",
|
|
5531
|
+
skipTypewriterWhenGoingBack: true,
|
|
5532
|
+
$contextState,
|
|
5533
|
+
context,
|
|
5534
|
+
get store() {
|
|
5535
|
+
return useShared(KEY);
|
|
5536
|
+
},
|
|
5537
|
+
isPreview: true
|
|
5538
|
+
});
|
|
5539
|
+
});
|
|
5528
5540
|
const year = date.getFullYear();
|
|
5529
5541
|
const stringDate = () => capitalize(date.toLocaleDateString(props.language, {
|
|
5530
5542
|
year: year === CURRENT_YEAR ? void 0 : "numeric",
|
|
@@ -5552,24 +5564,12 @@ var Save = (props) => {
|
|
|
5552
5564
|
return;
|
|
5553
5565
|
contentDocument.head.insertAdjacentHTML("beforeend", `<style>:root { font-size: 30%; background: black; cursor: pointer; } * { pointer-events: none; } *, *::before, *::after { animation-play-state: paused !important; }</style><style>${stylesheet()}</style>`);
|
|
5554
5566
|
context.root = contentDocument.body;
|
|
5567
|
+
context.root.appendChild(game());
|
|
5555
5568
|
setIframeLoaded(true);
|
|
5556
5569
|
};
|
|
5557
|
-
let dispose2 = noop;
|
|
5558
5570
|
createEffect(() => {
|
|
5559
5571
|
if (props.observed && iframeLoaded() && !previewStarted()) {
|
|
5560
5572
|
setPreviewStarted(true);
|
|
5561
|
-
dispose2 = render(() => {
|
|
5562
|
-
return createComponent(Game, {
|
|
5563
|
-
controls: "outside",
|
|
5564
|
-
skipTypewriterWhenGoingBack: true,
|
|
5565
|
-
$contextState,
|
|
5566
|
-
context,
|
|
5567
|
-
get store() {
|
|
5568
|
-
return useShared(KEY);
|
|
5569
|
-
},
|
|
5570
|
-
isPreview: true
|
|
5571
|
-
});
|
|
5572
|
-
}, context.root);
|
|
5573
5573
|
options.preview(props.save, KEY).then(() => {
|
|
5574
5574
|
const background = useContextState(KEY).get().background.background;
|
|
5575
5575
|
if (!background || !isCSSImage(background)) {
|
|
@@ -5623,7 +5623,6 @@ var Save = (props) => {
|
|
|
5623
5623
|
});
|
|
5624
5624
|
onCleanup(() => {
|
|
5625
5625
|
clearTimeout(previewDoneTimeoutId);
|
|
5626
|
-
dispose2();
|
|
5627
5626
|
});
|
|
5628
5627
|
return (() => {
|
|
5629
5628
|
const _el$ = _tmpl$33(), _el$2 = _el$.firstChild, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild;
|