resuxjs 0.3.7 → 0.3.9

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.
Files changed (38) hide show
  1. package/README.md +251 -251
  2. package/dist/cli.js +308 -295
  3. package/dist/cli.js.map +1 -1
  4. package/dist/compiler/implementation.js +266 -162
  5. package/dist/compiler/index.js.map +1 -1
  6. package/dist/core/module-container.d.ts +4 -0
  7. package/dist/core/module-container.js +35 -8
  8. package/dist/core/module-container.js.map +1 -1
  9. package/dist/create.js +446 -446
  10. package/dist/deploy/framework-runtime.d.ts +1 -0
  11. package/dist/deploy/framework-runtime.js +56 -0
  12. package/dist/deploy/framework-runtime.js.map +1 -0
  13. package/dist/deploy/netlify.js +7 -0
  14. package/dist/deploy/netlify.js.map +1 -1
  15. package/dist/deploy/production-report.d.ts +1 -0
  16. package/dist/deploy/production-report.js +19 -0
  17. package/dist/deploy/production-report.js.map +1 -0
  18. package/dist/deploy/runtime-dependencies.d.ts +4 -0
  19. package/dist/deploy/runtime-dependencies.js +250 -0
  20. package/dist/deploy/runtime-dependencies.js.map +1 -0
  21. package/dist/deploy/vercel.js +7 -125
  22. package/dist/deploy/vercel.js.map +1 -1
  23. package/dist/halal-core/ai/classifyRuntimeContent.js +20 -20
  24. package/dist/halal-core/report/generateHalalReport.js +17 -17
  25. package/dist/i18n/index.js +45 -6
  26. package/dist/i18n/index.js.map +1 -1
  27. package/dist/i18n/shared.js +11 -1
  28. package/dist/i18n/shared.js.map +1 -1
  29. package/dist/icons/index.d.ts +4 -4
  30. package/dist/runtime/index.d.ts +2 -0
  31. package/dist/runtime/index.js +9307 -8941
  32. package/dist/runtime/index.js.map +1 -1
  33. package/dist/ui/index.d.ts +15 -15
  34. package/dist/ui/index.js +254 -250
  35. package/dist/ui/index.js.map +1 -1
  36. package/package.json +150 -150
  37. package/templates/default/README.md +18 -18
  38. package/templates/default/pages/index.vue +102 -102
@@ -1,102 +1,102 @@
1
- <script setup lang="ts">
2
- definePageMeta({
3
- middleware: "auth"
4
- })
5
-
6
- const count = ref(0)
7
- const config = useRuntimeConfig()
8
- const appName = String(config.public.appName ?? "Resux App")
9
- const pluginLabel = String(useResuxApp().provides.starterPlugin ?? "Starter plugin")
10
- type StarterStats = {
11
- response: string
12
- routes: string
13
- mode: string
14
- }
15
- const { data, pending, error } = await useAsyncData("starter-stats", ({ signal }) => {
16
- return $fetch<StarterStats>("/api/stats", { signal })
17
- })
18
- const stats = reactive<StarterStats>({
19
- response: "",
20
- routes: "",
21
- mode: ""
22
- })
23
- watchEffect(() => {
24
- if (!data.value) {
25
- return
26
- }
27
- stats.response = data.value.response
28
- stats.routes = data.value.routes
29
- stats.mode = data.value.mode
30
- })
31
- const statsError = computed(() => error.value?.message ?? "")
32
- const hasStats = computed(() => Boolean(data.value && !pending.value && !error.value))
33
-
34
- useSeoMeta({
35
- title: appName,
36
- description: "A Resux application.",
37
- keywords: [
38
- "Resux",
39
- "resumable framework",
40
- "server-side rendering",
41
- "Vue-like SFC",
42
- "TypeScript framework",
43
- "islands architecture",
44
- "Nuxt-inspired",
45
- "Qwik-inspired"
46
- ],
47
- ogTitle: appName,
48
- ogDescription: "A Resux application.",
49
- twitterCard: "summary_large_image",
50
- themeColor: "#2563eb"
51
- })
52
-
53
- function increment() {
54
- count.value++
55
- }
56
- </script>
57
-
58
- <template>
59
- <main class="page">
60
- <section class="hero">
61
- <p class="eyebrow">Resux starter</p>
62
- <h1>{{ appName }}</h1>
63
- <p class="lede">Server-rendered Resux SFCs with resumable client handlers.</p>
64
- <p class="eyebrow">{{ pluginLabel }}</p>
65
- <div class="actions">
66
- <button @click="increment">Count: {{ count }}</button>
67
- <ResuxLink to="/about">About this app</ResuxLink>
68
- </div>
69
- </section>
70
-
71
- <section class="stats-panel">
72
- <div rx-if="pending" class="stats-grid">
73
- <div class="stat skeleton"></div>
74
- <div class="stat skeleton"></div>
75
- <div class="stat skeleton"></div>
76
- </div>
77
- <div rx-if="error" class="stat error-state">
78
- <span>Stats unavailable</span>
79
- <strong>{{ statsError }}</strong>
80
- <a href="/">Try again</a>
81
- </div>
82
- <div rx-if="hasStats" class="stats-grid">
83
- <article class="stat">
84
- <span>Response</span>
85
- <strong>{{ stats.response }}</strong>
86
- </article>
87
- <article class="stat">
88
- <span>Routes</span>
89
- <strong>{{ stats.routes }}</strong>
90
- </article>
91
- <article class="stat">
92
- <span>Mode</span>
93
- <strong rx-text="stats.mode">Mode</strong>
94
- </article>
95
- </div>
96
- </section>
97
-
98
- <section class="vue-panel">
99
- <VueIsland name="CounterIsland" :props="{ label: 'Vue island' }" />
100
- </section>
101
- </main>
102
- </template>
1
+ <script setup lang="ts">
2
+ definePageMeta({
3
+ middleware: "auth"
4
+ })
5
+
6
+ const count = ref(0)
7
+ const config = useRuntimeConfig()
8
+ const appName = String(config.public.appName ?? "Resux App")
9
+ const pluginLabel = String(useResuxApp().provides.starterPlugin ?? "Starter plugin")
10
+ type StarterStats = {
11
+ response: string
12
+ routes: string
13
+ mode: string
14
+ }
15
+ const { data, pending, error } = await useAsyncData("starter-stats", ({ signal }) => {
16
+ return $fetch<StarterStats>("/api/stats", { signal })
17
+ })
18
+ const stats = reactive<StarterStats>({
19
+ response: "",
20
+ routes: "",
21
+ mode: ""
22
+ })
23
+ watchEffect(() => {
24
+ if (!data.value) {
25
+ return
26
+ }
27
+ stats.response = data.value.response
28
+ stats.routes = data.value.routes
29
+ stats.mode = data.value.mode
30
+ })
31
+ const statsError = computed(() => error.value?.message ?? "")
32
+ const hasStats = computed(() => Boolean(data.value && !pending.value && !error.value))
33
+
34
+ useSeoMeta({
35
+ title: appName,
36
+ description: "A Resux application.",
37
+ keywords: [
38
+ "Resux",
39
+ "resumable framework",
40
+ "server-side rendering",
41
+ "Vue-like SFC",
42
+ "TypeScript framework",
43
+ "islands architecture",
44
+ "Nuxt-inspired",
45
+ "Qwik-inspired"
46
+ ],
47
+ ogTitle: appName,
48
+ ogDescription: "A Resux application.",
49
+ twitterCard: "summary_large_image",
50
+ themeColor: "#2563eb"
51
+ })
52
+
53
+ function increment() {
54
+ count.value++
55
+ }
56
+ </script>
57
+
58
+ <template>
59
+ <main class="page">
60
+ <section class="hero">
61
+ <p class="eyebrow">Resux starter</p>
62
+ <h1>{{ appName }}</h1>
63
+ <p class="lede">Server-rendered Resux SFCs with resumable client handlers.</p>
64
+ <p class="eyebrow">{{ pluginLabel }}</p>
65
+ <div class="actions">
66
+ <button @click="increment">Count: {{ count }}</button>
67
+ <ResuxLink to="/about">About this app</ResuxLink>
68
+ </div>
69
+ </section>
70
+
71
+ <section class="stats-panel">
72
+ <div rx-if="pending" class="stats-grid">
73
+ <div class="stat skeleton"></div>
74
+ <div class="stat skeleton"></div>
75
+ <div class="stat skeleton"></div>
76
+ </div>
77
+ <div rx-if="error" class="stat error-state">
78
+ <span>Stats unavailable</span>
79
+ <strong>{{ statsError }}</strong>
80
+ <a href="/">Try again</a>
81
+ </div>
82
+ <div rx-if="hasStats" class="stats-grid">
83
+ <article class="stat">
84
+ <span>Response</span>
85
+ <strong>{{ stats.response }}</strong>
86
+ </article>
87
+ <article class="stat">
88
+ <span>Routes</span>
89
+ <strong>{{ stats.routes }}</strong>
90
+ </article>
91
+ <article class="stat">
92
+ <span>Mode</span>
93
+ <strong rx-text="stats.mode">Mode</strong>
94
+ </article>
95
+ </div>
96
+ </section>
97
+
98
+ <section class="vue-panel">
99
+ <VueIsland name="CounterIsland" :props="{ label: 'Vue island' }" />
100
+ </section>
101
+ </main>
102
+ </template>