create-outsystems-astro 0.7.0 → 0.7.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/package.json +1 -1
- package/template/bun.lock +165 -233
- package/template/deno.json +17 -1
- package/template/deno.lock +286 -229
- package/template/package-lock.json +217 -289
- package/template/package.json +67 -19
- package/template/pnpm-lock.yaml +395 -357
- package/template/src/framework/preact/Demo.tsx +5 -6
- package/template/src/framework/react/Demo.tsx +4 -2
- package/template/src/framework/svelte/Demo.svelte +2 -2
- package/template/src/framework/vue/Demo.vue +3 -2
- package/template/src/pages/angular/angular-demo.astro +1 -1
- package/template/src/pages/preact/preact-demo.astro +2 -3
- package/template/src/pages/react/react-demo.astro +2 -3
- package/template/src/pages/svelte/svelte-demo.astro +2 -3
- package/template/src/pages/vue/vue-demo.astro +2 -3
- package/template/src/stores/demo.ts +14 -0
- package/template/yarn.lock +154 -154
- package/template/src/stores/.gitkeep +0 -0
- /package/template/patches/{@angular+build+21.2.1.patch → @angular+build+21.2.2.patch} +0 -0
|
@@ -6,6 +6,7 @@ import { useState } from "preact/hooks";
|
|
|
6
6
|
import AstroLogo from "../../images/astro.png?url";
|
|
7
7
|
import OutSystemsLogo from "../../images/outsystems.png?url";
|
|
8
8
|
import { Operation, setCounterCount } from "../../lib/setCounterCount";
|
|
9
|
+
import { setupStore } from "../../stores/demo";
|
|
9
10
|
|
|
10
11
|
interface DemoProps {
|
|
11
12
|
children: ComponentChildren;
|
|
@@ -28,14 +29,12 @@ export default function Demo({
|
|
|
28
29
|
setCount((i) => setCounterCount(i, Operation.Subtract));
|
|
29
30
|
|
|
30
31
|
const showParentMessage = () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(window as any)[showMessage]?.(count);
|
|
34
|
-
}
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
+
(window as any)[showMessage](count);
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
const nanoStoreValue = useStore(
|
|
36
|
+
const store = setupStore("preactStore");
|
|
37
|
+
const nanoStoreValue = useStore(store);
|
|
39
38
|
|
|
40
39
|
return (
|
|
41
40
|
<>
|
|
@@ -5,6 +5,7 @@ import { useState } from "react";
|
|
|
5
5
|
import AstroLogo from "../../images/astro.png?url";
|
|
6
6
|
import OutSystemsLogo from "../../images/outsystems.png?url";
|
|
7
7
|
import { Operation, setCounterCount } from "../../lib/setCounterCount";
|
|
8
|
+
import { setupStore } from "../../stores/demo";
|
|
8
9
|
|
|
9
10
|
interface DemoProps {
|
|
10
11
|
children: React.ReactNode;
|
|
@@ -29,8 +30,9 @@ export default function Demo({
|
|
|
29
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
31
|
const showParentMessage = () => (window as any)[showMessage](count);
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const store = setupStore("reactStore");
|
|
34
|
+
|
|
35
|
+
const nanoStoreValue = useStore(store);
|
|
34
36
|
|
|
35
37
|
return (
|
|
36
38
|
<>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import AstroLogo from "../../images/astro.png?url";
|
|
3
3
|
import OutSystemsLogo from "../../images/outsystems.png?url";
|
|
4
4
|
import { Operation, setCounterCount } from "../../lib/setCounterCount";
|
|
5
|
+
import { setupStore } from "../../stores/demo";
|
|
5
6
|
|
|
6
7
|
export let initialCount: number;
|
|
7
8
|
export let showMessage: string;
|
|
@@ -21,8 +22,7 @@
|
|
|
21
22
|
(window as any)[showMessage](count);
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
const nanoStoreValue = (window as any).Stores["svelteStore"];
|
|
25
|
+
const nanoStoreValue = setupStore("svelteStore");
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<slot name="header" />
|
|
@@ -5,6 +5,7 @@ import { useStore } from "@nanostores/vue";
|
|
|
5
5
|
import AstroLogo from "../../images/astro.png?url";
|
|
6
6
|
import OutSystemsLogo from "../../images/outsystems.png?url";
|
|
7
7
|
import { Operation, setCounterCount } from "../../lib/setCounterCount";
|
|
8
|
+
import { setupStore } from "../../stores/demo";
|
|
8
9
|
|
|
9
10
|
const props = defineProps<{
|
|
10
11
|
initialCount: number;
|
|
@@ -26,8 +27,8 @@ const showParentMessage = () => {
|
|
|
26
27
|
(window as any)[props.showMessage](count.value);
|
|
27
28
|
};
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
const nanoStoreValue = useStore(
|
|
30
|
+
const store = setupStore("vueStore");
|
|
31
|
+
const nanoStoreValue = useStore(store);
|
|
31
32
|
</script>
|
|
32
33
|
|
|
33
34
|
<template>
|
|
@@ -8,12 +8,11 @@ const showMessage = "showMessage";
|
|
|
8
8
|
<head>
|
|
9
9
|
<link href={styles} rel="stylesheet" />
|
|
10
10
|
<script>
|
|
11
|
-
import {
|
|
11
|
+
import { setupStore } from "../../stores/demo";
|
|
12
|
+
setupStore("preactStore");
|
|
12
13
|
window["showMessage"] = (count) => {
|
|
13
14
|
document.getElementById("counter").textContent = count;
|
|
14
15
|
};
|
|
15
|
-
window.Stores = [];
|
|
16
|
-
window.Stores["preactStore"] = atom("Test Value");
|
|
17
16
|
document.addEventListener("DOMContentLoaded", function () {
|
|
18
17
|
const input = document.getElementById("store");
|
|
19
18
|
input.value = window.Stores["preactStore"].get();
|
|
@@ -8,12 +8,11 @@ const showMessage = "showMessage";
|
|
|
8
8
|
<head>
|
|
9
9
|
<link href={styles} rel="stylesheet" />
|
|
10
10
|
<script>
|
|
11
|
-
import {
|
|
11
|
+
import { setupStore } from "../../stores/demo";
|
|
12
|
+
setupStore("reactStore");
|
|
12
13
|
window["showMessage"] = (count) => {
|
|
13
14
|
document.getElementById("counter").textContent = count;
|
|
14
15
|
};
|
|
15
|
-
window.Stores = [];
|
|
16
|
-
window.Stores["reactStore"] = atom("Test Value");
|
|
17
16
|
document.addEventListener("DOMContentLoaded", function () {
|
|
18
17
|
const input = document.getElementById("store");
|
|
19
18
|
input.value = window.Stores["reactStore"].get();
|
|
@@ -8,12 +8,11 @@ const showMessage = "showMessage";
|
|
|
8
8
|
<head>
|
|
9
9
|
<link href={styles} rel="stylesheet" />
|
|
10
10
|
<script>
|
|
11
|
-
import {
|
|
11
|
+
import { setupStore } from "../../stores/demo";
|
|
12
|
+
setupStore("svelteStore");
|
|
12
13
|
window["showMessage"] = (count) => {
|
|
13
14
|
document.getElementById("counter").textContent = count;
|
|
14
15
|
};
|
|
15
|
-
window.Stores = [];
|
|
16
|
-
window.Stores["svelteStore"] = atom("Test Value");
|
|
17
16
|
document.addEventListener("DOMContentLoaded", function () {
|
|
18
17
|
const input = document.getElementById("store");
|
|
19
18
|
input.value = window.Stores["svelteStore"].get();
|
|
@@ -8,12 +8,11 @@ const showMessage = "showMessage";
|
|
|
8
8
|
<head>
|
|
9
9
|
<link href={styles} rel="stylesheet" />
|
|
10
10
|
<script>
|
|
11
|
-
import {
|
|
11
|
+
import { setupStore } from "../../stores/demo";
|
|
12
|
+
setupStore("vueStore");
|
|
12
13
|
window["showMessage"] = (count) => {
|
|
13
14
|
document.getElementById("counter").textContent = count;
|
|
14
15
|
};
|
|
15
|
-
window.Stores = [];
|
|
16
|
-
window.Stores["vueStore"] = atom("Test Value");
|
|
17
16
|
document.addEventListener("DOMContentLoaded", function () {
|
|
18
17
|
const input = document.getElementById("store");
|
|
19
18
|
input.value = window.Stores["vueStore"].get();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { atom } from "nanostores";
|
|
2
|
+
|
|
3
|
+
export function setupStore(name: string) {
|
|
4
|
+
// @ts-expect-error: Stores does not exist on window
|
|
5
|
+
if (window.Stores === undefined) {
|
|
6
|
+
// @ts-expect-error: Stores does not exist on window
|
|
7
|
+
window.Stores = [];
|
|
8
|
+
// @ts-expect-error: Stores does not exist on window
|
|
9
|
+
window.Stores[name] = atom("Test Value");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// @ts-expect-error: Stores does not exist on window
|
|
13
|
+
return window.Stores[name];
|
|
14
|
+
}
|