nvent 0.4.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.
Files changed (192) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +389 -0
  3. package/dist/module.d.mts +193 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +974 -0
  6. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +33 -0
  7. package/dist/runtime/app/components/ConfirmDialog.vue +121 -0
  8. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +33 -0
  9. package/dist/runtime/app/components/FlowDiagram.d.vue.ts +64 -0
  10. package/dist/runtime/app/components/FlowDiagram.vue +338 -0
  11. package/dist/runtime/app/components/FlowDiagram.vue.d.ts +64 -0
  12. package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +29 -0
  13. package/dist/runtime/app/components/FlowNodeCard.vue +156 -0
  14. package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +29 -0
  15. package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +9 -0
  16. package/dist/runtime/app/components/FlowRunOverview.vue +291 -0
  17. package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +9 -0
  18. package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +14 -0
  19. package/dist/runtime/app/components/FlowRunStatusBadge.vue +60 -0
  20. package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +14 -0
  21. package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +12 -0
  22. package/dist/runtime/app/components/FlowRunTimeline.vue +127 -0
  23. package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +12 -0
  24. package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +16 -0
  25. package/dist/runtime/app/components/FlowScheduleDialog.vue +226 -0
  26. package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +16 -0
  27. package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +12 -0
  28. package/dist/runtime/app/components/FlowSchedulesList.vue +99 -0
  29. package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +12 -0
  30. package/dist/runtime/app/components/JobScheduling.d.vue.ts +6 -0
  31. package/dist/runtime/app/components/JobScheduling.vue +203 -0
  32. package/dist/runtime/app/components/JobScheduling.vue.d.ts +6 -0
  33. package/dist/runtime/app/components/ListItem.d.vue.ts +23 -0
  34. package/dist/runtime/app/components/ListItem.vue +70 -0
  35. package/dist/runtime/app/components/ListItem.vue.d.ts +23 -0
  36. package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +45 -0
  37. package/dist/runtime/app/components/QueueConfigDetails.vue +412 -0
  38. package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +45 -0
  39. package/dist/runtime/app/components/StatCounter.d.vue.ts +9 -0
  40. package/dist/runtime/app/components/StatCounter.vue +25 -0
  41. package/dist/runtime/app/components/StatCounter.vue.d.ts +9 -0
  42. package/dist/runtime/app/components/TimelineList.d.vue.ts +7 -0
  43. package/dist/runtime/app/components/TimelineList.vue +210 -0
  44. package/dist/runtime/app/components/TimelineList.vue.d.ts +7 -0
  45. package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +46 -0
  46. package/dist/runtime/app/components/nhealth/component-router.vue +26 -0
  47. package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +46 -0
  48. package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +24 -0
  49. package/dist/runtime/app/components/nhealth/component-shell.vue +89 -0
  50. package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +24 -0
  51. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +14 -0
  52. package/dist/runtime/app/composables/useAnalyzedFlows.js +7 -0
  53. package/dist/runtime/app/composables/useComponentRouter.d.ts +38 -0
  54. package/dist/runtime/app/composables/useComponentRouter.js +240 -0
  55. package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +15 -0
  56. package/dist/runtime/app/composables/useFlowRunTimeline.js +66 -0
  57. package/dist/runtime/app/composables/useFlowRuns.d.ts +11 -0
  58. package/dist/runtime/app/composables/useFlowRuns.js +31 -0
  59. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +24 -0
  60. package/dist/runtime/app/composables/useFlowRunsInfinite.js +123 -0
  61. package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +8 -0
  62. package/dist/runtime/app/composables/useFlowRunsPolling.js +26 -0
  63. package/dist/runtime/app/composables/useFlowState.d.ts +125 -0
  64. package/dist/runtime/app/composables/useFlowState.js +211 -0
  65. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +27 -0
  66. package/dist/runtime/app/composables/useFlowWebSocket.js +205 -0
  67. package/dist/runtime/app/composables/useFlowsNavigation.d.ts +10 -0
  68. package/dist/runtime/app/composables/useFlowsNavigation.js +57 -0
  69. package/dist/runtime/app/composables/useQueueJobs.d.ts +20 -0
  70. package/dist/runtime/app/composables/useQueueJobs.js +20 -0
  71. package/dist/runtime/app/composables/useQueueUpdates.d.ts +26 -0
  72. package/dist/runtime/app/composables/useQueueUpdates.js +122 -0
  73. package/dist/runtime/app/composables/useQueues.d.ts +43 -0
  74. package/dist/runtime/app/composables/useQueues.js +26 -0
  75. package/dist/runtime/app/composables/useQueuesLive.d.ts +19 -0
  76. package/dist/runtime/app/composables/useQueuesLive.js +143 -0
  77. package/dist/runtime/app/pages/flows/index.d.vue.ts +3 -0
  78. package/dist/runtime/app/pages/flows/index.vue +645 -0
  79. package/dist/runtime/app/pages/flows/index.vue.d.ts +3 -0
  80. package/dist/runtime/app/pages/index.d.vue.ts +3 -0
  81. package/dist/runtime/app/pages/index.vue +34 -0
  82. package/dist/runtime/app/pages/index.vue.d.ts +3 -0
  83. package/dist/runtime/app/pages/queues/index.d.vue.ts +3 -0
  84. package/dist/runtime/app/pages/queues/index.vue +229 -0
  85. package/dist/runtime/app/pages/queues/index.vue.d.ts +3 -0
  86. package/dist/runtime/app/pages/queues/job.d.vue.ts +3 -0
  87. package/dist/runtime/app/pages/queues/job.vue +262 -0
  88. package/dist/runtime/app/pages/queues/job.vue.d.ts +3 -0
  89. package/dist/runtime/app/pages/queues/jobs.d.vue.ts +3 -0
  90. package/dist/runtime/app/pages/queues/jobs.vue +291 -0
  91. package/dist/runtime/app/pages/queues/jobs.vue.d.ts +3 -0
  92. package/dist/runtime/app/plugins/vueflow.client.d.ts +6 -0
  93. package/dist/runtime/app/plugins/vueflow.client.js +15 -0
  94. package/dist/runtime/constants.d.ts +11 -0
  95. package/dist/runtime/constants.js +11 -0
  96. package/dist/runtime/python/get_config.py +64 -0
  97. package/dist/runtime/schema.d.ts +37 -0
  98. package/dist/runtime/schema.js +20 -0
  99. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +10 -0
  100. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +44 -0
  101. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +7 -0
  102. package/dist/runtime/server/api/_flows/[name]/runs.get.js +53 -0
  103. package/dist/runtime/server/api/_flows/[name]/schedule.post.d.ts +2 -0
  104. package/dist/runtime/server/api/_flows/[name]/schedule.post.js +57 -0
  105. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.d.ts +2 -0
  106. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +42 -0
  107. package/dist/runtime/server/api/_flows/[name]/schedules.get.d.ts +2 -0
  108. package/dist/runtime/server/api/_flows/[name]/schedules.get.js +48 -0
  109. package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +2 -0
  110. package/dist/runtime/server/api/_flows/[name]/start.post.js +9 -0
  111. package/dist/runtime/server/api/_flows/index.get.d.ts +6 -0
  112. package/dist/runtime/server/api/_flows/index.get.js +5 -0
  113. package/dist/runtime/server/api/_flows/ws.d.ts +60 -0
  114. package/dist/runtime/server/api/_flows/ws.js +183 -0
  115. package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +2 -0
  116. package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +9 -0
  117. package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +2 -0
  118. package/dist/runtime/server/api/_queues/[name]/job/index.get.js +18 -0
  119. package/dist/runtime/server/api/_queues/index.get.d.ts +2 -0
  120. package/dist/runtime/server/api/_queues/index.get.js +63 -0
  121. package/dist/runtime/server/api/_queues/ws.d.ts +48 -0
  122. package/dist/runtime/server/api/_queues/ws.js +200 -0
  123. package/dist/runtime/server/events/adapters/fileAdapter.d.ts +2 -0
  124. package/dist/runtime/server/events/adapters/fileAdapter.js +382 -0
  125. package/dist/runtime/server/events/adapters/memoryAdapter.d.ts +2 -0
  126. package/dist/runtime/server/events/adapters/memoryAdapter.js +171 -0
  127. package/dist/runtime/server/events/adapters/redis/redisAdapter.d.ts +2 -0
  128. package/dist/runtime/server/events/adapters/redis/redisAdapter.js +348 -0
  129. package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.d.ts +29 -0
  130. package/dist/runtime/server/events/adapters/redis/redisPubSubGateway.js +82 -0
  131. package/dist/runtime/server/events/eventBus.d.ts +20 -0
  132. package/dist/runtime/server/events/eventBus.js +35 -0
  133. package/dist/runtime/server/events/eventStoreFactory.d.ts +19 -0
  134. package/dist/runtime/server/events/eventStoreFactory.js +44 -0
  135. package/dist/runtime/server/events/streamNames.d.ts +17 -0
  136. package/dist/runtime/server/events/streamNames.js +17 -0
  137. package/dist/runtime/server/events/types.d.ts +63 -0
  138. package/dist/runtime/server/events/types.js +0 -0
  139. package/dist/runtime/server/events/wiring/flowWiring.d.ts +33 -0
  140. package/dist/runtime/server/events/wiring/flowWiring.js +406 -0
  141. package/dist/runtime/server/events/wiring/registry.d.ts +10 -0
  142. package/dist/runtime/server/events/wiring/registry.js +24 -0
  143. package/dist/runtime/server/plugins/00.event-store.d.ts +13 -0
  144. package/dist/runtime/server/plugins/00.event-store.js +16 -0
  145. package/dist/runtime/server/plugins/00.ws-lifecycle.d.ts +5 -0
  146. package/dist/runtime/server/plugins/00.ws-lifecycle.js +66 -0
  147. package/dist/runtime/server/plugins/flow-management.d.ts +13 -0
  148. package/dist/runtime/server/plugins/flow-management.js +65 -0
  149. package/dist/runtime/server/plugins/queue-management.d.ts +2 -0
  150. package/dist/runtime/server/plugins/queue-management.js +27 -0
  151. package/dist/runtime/server/plugins/state-cleanup.d.ts +11 -0
  152. package/dist/runtime/server/plugins/state-cleanup.js +93 -0
  153. package/dist/runtime/server/plugins/worker-management.d.ts +2 -0
  154. package/dist/runtime/server/plugins/worker-management.js +33 -0
  155. package/dist/runtime/server/queue/adapters/bullmq.d.ts +17 -0
  156. package/dist/runtime/server/queue/adapters/bullmq.js +164 -0
  157. package/dist/runtime/server/queue/queueFactory.d.ts +3 -0
  158. package/dist/runtime/server/queue/queueFactory.js +10 -0
  159. package/dist/runtime/server/queue/types.d.ts +47 -0
  160. package/dist/runtime/server/queue/types.js +0 -0
  161. package/dist/runtime/server/state/adapters/redis.d.ts +2 -0
  162. package/dist/runtime/server/state/adapters/redis.js +42 -0
  163. package/dist/runtime/server/state/stateFactory.d.ts +3 -0
  164. package/dist/runtime/server/state/stateFactory.js +17 -0
  165. package/dist/runtime/server/state/types.d.ts +23 -0
  166. package/dist/runtime/server/state/types.js +0 -0
  167. package/dist/runtime/server/tsconfig.json +3 -0
  168. package/dist/runtime/server/utils/defineQueueConfig.d.ts +154 -0
  169. package/dist/runtime/server/utils/defineQueueConfig.js +2 -0
  170. package/dist/runtime/server/utils/defineQueueWorker.d.ts +10 -0
  171. package/dist/runtime/server/utils/defineQueueWorker.js +17 -0
  172. package/dist/runtime/server/utils/useEventManager.d.ts +15 -0
  173. package/dist/runtime/server/utils/useEventManager.js +26 -0
  174. package/dist/runtime/server/utils/useEventStore.d.ts +20 -0
  175. package/dist/runtime/server/utils/useEventStore.js +119 -0
  176. package/dist/runtime/server/utils/useFlowEngine.d.ts +9 -0
  177. package/dist/runtime/server/utils/useFlowEngine.js +44 -0
  178. package/dist/runtime/server/utils/useLogs.d.ts +41 -0
  179. package/dist/runtime/server/utils/useLogs.js +74 -0
  180. package/dist/runtime/server/utils/useQueue.d.ts +31 -0
  181. package/dist/runtime/server/utils/useQueue.js +24 -0
  182. package/dist/runtime/server/utils/useServerLogger.d.ts +42 -0
  183. package/dist/runtime/server/utils/useServerLogger.js +54 -0
  184. package/dist/runtime/server/utils/wsPeerManager.d.ts +34 -0
  185. package/dist/runtime/server/utils/wsPeerManager.js +23 -0
  186. package/dist/runtime/server/worker/adapter.d.ts +4 -0
  187. package/dist/runtime/server/worker/adapter.js +65 -0
  188. package/dist/runtime/server/worker/runner/node.d.ts +27 -0
  189. package/dist/runtime/server/worker/runner/node.js +196 -0
  190. package/dist/runtime/types.d.ts +132 -0
  191. package/dist/types.d.mts +3 -0
  192. package/package.json +75 -0
@@ -0,0 +1,210 @@
1
+ <template>
2
+ <div
3
+ :class="heightClass"
4
+ class="overflow-y-auto overflow-x-hidden"
5
+ >
6
+ <UTimeline
7
+ v-if="timelineItems && timelineItems.length"
8
+ :items="timelineItems"
9
+ size="xs"
10
+ class="px-6 py-4"
11
+ >
12
+ <!-- Custom indicator slot to show icons -->
13
+ <template #indicator="{ item }">
14
+ <UIcon
15
+ :name="item.icon || 'i-lucide-circle'"
16
+ class="size-4"
17
+ />
18
+ </template>
19
+
20
+ <!-- Custom title slot to include kind badge and subject -->
21
+ <template #title="{ item }">
22
+ <div class="flex items-center gap-2 min-w-0">
23
+ <span
24
+ class="font-mono text-xs px-2 py-0.5 rounded bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 flex-shrink-0"
25
+ >
26
+ {{ item.eventType }}
27
+ </span>
28
+ <span
29
+ v-if="item.stepName"
30
+ class="text-xs text-gray-500 dark:text-gray-400 truncate"
31
+ >
32
+ {{ item.stepName }}
33
+ </span>
34
+ </div>
35
+ </template>
36
+
37
+ <!-- Custom description slot for rich content -->
38
+ <template #description="{ item }">
39
+ <!-- Special rendering for log events -->
40
+ <div
41
+ v-if="item.eventType === 'log'"
42
+ class="space-y-2 mt-2"
43
+ >
44
+ <div class="flex items-start gap-2">
45
+ <UBadge
46
+ :color="levelColor(item?.eventData?.level)"
47
+ variant="subtle"
48
+ size="xs"
49
+ class="capitalize mt-0.5 flex-shrink-0"
50
+ >
51
+ {{ item?.eventData?.level || "info" }}
52
+ </UBadge>
53
+ <span class="text-sm text-gray-900 dark:text-gray-100 flex-1 break-words">
54
+ {{ item?.eventData?.message || "" }}
55
+ </span>
56
+ </div>
57
+ <div
58
+ v-if="item?.eventData?.progress"
59
+ class="mt-2"
60
+ >
61
+ <pre class="text-xs bg-gray-50 dark:bg-gray-800 rounded p-2 overflow-x-auto max-h-40 text-gray-700 dark:text-gray-300 font-mono">{{ pretty(item.eventData) }}</pre>
62
+ </div>
63
+ </div>
64
+
65
+ <!-- Special rendering for flow events -->
66
+ <div
67
+ v-else-if="isFlowEvent(item.eventType)"
68
+ class="text-sm mt-2"
69
+ >
70
+ <div
71
+ v-if="item.eventData"
72
+ class="space-y-1"
73
+ >
74
+ <div
75
+ v-if="item.eventData.input"
76
+ class="flex items-start gap-2"
77
+ >
78
+ <span class="text-xs text-gray-500 dark:text-gray-400 font-medium min-w-[60px] flex-shrink-0">Input:</span>
79
+ <pre class="text-xs bg-gray-50 dark:bg-gray-800 rounded px-2 py-1 overflow-x-auto max-h-20 text-gray-700 dark:text-gray-300 font-mono flex-1 min-w-0">{{ pretty(item.eventData.input) }}</pre>
80
+ </div>
81
+ <div
82
+ v-if="item.eventData.output"
83
+ class="flex items-start gap-2"
84
+ >
85
+ <span class="text-xs text-gray-500 dark:text-gray-400 font-medium min-w-[60px] flex-shrink-0">Output:</span>
86
+ <pre class="text-xs bg-gray-50 dark:bg-gray-800 rounded px-2 py-1 overflow-x-auto max-h-20 text-gray-700 dark:text-gray-300 font-mono flex-1 min-w-0">{{ pretty(item.eventData.output) }}</pre>
87
+ </div>
88
+ <div
89
+ v-if="item.eventData.error"
90
+ class="flex items-start gap-2"
91
+ >
92
+ <span class="text-xs text-red-500 dark:text-red-400 font-medium min-w-[60px] flex-shrink-0">Error:</span>
93
+ <pre class="text-xs bg-red-50 dark:bg-red-900/20 rounded px-2 py-1 overflow-x-auto max-h-20 text-red-700 dark:text-red-300 font-mono flex-1 min-w-0">{{ pretty(item.eventData.error) }}</pre>
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+ <!-- Default rendering -->
99
+ <div
100
+ v-else-if="item.eventData && Object.keys(item.eventData).length > 0"
101
+ class="mt-2"
102
+ >
103
+ <pre class="text-xs bg-gray-50 dark:bg-gray-800 rounded p-2 overflow-x-auto max-h-40 text-gray-700 dark:text-gray-300 font-mono">{{ pretty(item.eventData) }}</pre>
104
+ </div>
105
+ </template>
106
+ </UTimeline>
107
+ <div
108
+ v-else
109
+ class="h-full w-full flex flex-col items-center justify-center text-gray-400 dark:text-gray-500"
110
+ >
111
+ <UIcon
112
+ name="i-lucide-inbox"
113
+ class="w-12 h-12 mb-3 opacity-50"
114
+ />
115
+ <span class="text-sm">No events yet.</span>
116
+ </div>
117
+ </div>
118
+ </template>
119
+
120
+ <script setup>
121
+ import { computed } from "#imports";
122
+ import { UTimeline, UIcon, UBadge } from "#components";
123
+ const props = defineProps({
124
+ items: { type: Array, required: true },
125
+ heightClass: { type: String, required: false }
126
+ });
127
+ const heightClass = computed(() => props.heightClass || "h-96");
128
+ function eventTsMs(e) {
129
+ try {
130
+ const ts = e?.ts;
131
+ if (typeof ts === "number" && Number.isFinite(ts)) return ts;
132
+ if (typeof ts === "string") {
133
+ const n = Number(ts);
134
+ if (Number.isFinite(n)) return n;
135
+ const d = Date.parse(ts);
136
+ if (!Number.isNaN(d)) return d;
137
+ }
138
+ if (typeof e?.id === "string" && e.id.includes("-")) {
139
+ const n = Number(e.id.split("-")[0]);
140
+ if (Number.isFinite(n)) return n;
141
+ }
142
+ } catch {
143
+ }
144
+ return Date.now();
145
+ }
146
+ function formatTs(e) {
147
+ try {
148
+ const t = eventTsMs(e);
149
+ return new Date(t).toLocaleString();
150
+ } catch {
151
+ return "";
152
+ }
153
+ }
154
+ function eventIcon(type) {
155
+ if (!type) return "i-lucide-circle";
156
+ if (type === "flow.start") return "i-lucide-play-circle";
157
+ if (type === "flow.completed") return "i-lucide-check-circle-2";
158
+ if (type === "flow.failed") return "i-lucide-x-circle";
159
+ if (type === "step.started" || type === "step.running") return "i-lucide-arrow-right-circle";
160
+ if (type === "step.completed") return "i-lucide-check-circle";
161
+ if (type === "step.failed") return "i-lucide-alert-circle";
162
+ if (type === "step.retry") return "i-lucide-rotate-cw";
163
+ if (type === "step.timeout") return "i-lucide-clock";
164
+ if (type === "log") return "i-lucide-file-text";
165
+ if (type === "emit") return "i-lucide-zap";
166
+ return "i-lucide-circle-dot";
167
+ }
168
+ const timelineItems = computed(() => {
169
+ const arr = Array.isArray(props.items) ? [...props.items] : [];
170
+ arr.sort((a, b) => {
171
+ const tb = eventTsMs(b);
172
+ const ta = eventTsMs(a);
173
+ if (tb !== ta) return tb - ta;
174
+ const ai = String(a?.id || "");
175
+ const bi = String(b?.id || "");
176
+ return bi.localeCompare(ai);
177
+ });
178
+ return arr.map((e) => ({
179
+ date: formatTs(e),
180
+ icon: eventIcon(e.type),
181
+ eventType: e.type,
182
+ stepName: e.stepName,
183
+ eventData: e.data
184
+ }));
185
+ });
186
+ function pretty(v) {
187
+ try {
188
+ return JSON.stringify(v, null, 2);
189
+ } catch {
190
+ return String(v);
191
+ }
192
+ }
193
+ function levelColor(level) {
194
+ switch ((level || "").toLowerCase()) {
195
+ case "debug":
196
+ return "neutral";
197
+ case "info":
198
+ return "primary";
199
+ case "warn":
200
+ return "warning";
201
+ case "error":
202
+ return "error";
203
+ default:
204
+ return "neutral";
205
+ }
206
+ }
207
+ function isFlowEvent(type) {
208
+ return type?.startsWith("flow.") || type?.startsWith("step.");
209
+ }
210
+ </script>
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ items: any[];
3
+ heightClass?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,46 @@
1
+ type ComponentRouteRecord = {
2
+ path: string;
3
+ component: any;
4
+ name?: string;
5
+ };
6
+ type ComponentRouterMode = 'query' | 'hash' | 'memory';
7
+ type __VLS_Props = {
8
+ routes: ComponentRouteRecord[] | Record<string, any>;
9
+ base?: string;
10
+ mode?: ComponentRouterMode;
11
+ initial?: string;
12
+ debug?: boolean;
13
+ };
14
+ declare var __VLS_1: {
15
+ component: any;
16
+ route: any;
17
+ push: any;
18
+ };
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
23
+ push: (path: string) => Promise<void>;
24
+ replace: (path: string) => Promise<void>;
25
+ route: import("vue").ShallowRef<{
26
+ path: string;
27
+ params: Record<string, string>;
28
+ query: Record<string, any>;
29
+ } | undefined, {
30
+ path: string;
31
+ params: Record<string, string>;
32
+ query: Record<string, any>;
33
+ } | undefined>;
34
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
35
+ mode: ComponentRouterMode;
36
+ debug: boolean;
37
+ base: string;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <slot
3
+ :component="component"
4
+ :route="route"
5
+ :push="push"
6
+ />
7
+ </template>
8
+
9
+ <script setup>
10
+ import { useComponentRouter } from "#imports";
11
+ const props = defineProps({
12
+ routes: { type: [Array, Object], required: true },
13
+ base: { type: String, required: false, default: "fp" },
14
+ mode: { type: String, required: false, default: "query" },
15
+ initial: { type: String, required: false },
16
+ debug: { type: Boolean, required: false, default: false }
17
+ });
18
+ const { component, route, push, replace } = useComponentRouter({
19
+ routes: props.routes,
20
+ base: props.base,
21
+ mode: props.mode,
22
+ initial: props.initial,
23
+ debug: props.debug
24
+ });
25
+ defineExpose({ push, replace, route });
26
+ </script>
@@ -0,0 +1,46 @@
1
+ type ComponentRouteRecord = {
2
+ path: string;
3
+ component: any;
4
+ name?: string;
5
+ };
6
+ type ComponentRouterMode = 'query' | 'hash' | 'memory';
7
+ type __VLS_Props = {
8
+ routes: ComponentRouteRecord[] | Record<string, any>;
9
+ base?: string;
10
+ mode?: ComponentRouterMode;
11
+ initial?: string;
12
+ debug?: boolean;
13
+ };
14
+ declare var __VLS_1: {
15
+ component: any;
16
+ route: any;
17
+ push: any;
18
+ };
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
23
+ push: (path: string) => Promise<void>;
24
+ replace: (path: string) => Promise<void>;
25
+ route: import("vue").ShallowRef<{
26
+ path: string;
27
+ params: Record<string, string>;
28
+ query: Record<string, any>;
29
+ } | undefined, {
30
+ path: string;
31
+ params: Record<string, string>;
32
+ query: Record<string, any>;
33
+ } | undefined>;
34
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
35
+ mode: ComponentRouterMode;
36
+ debug: boolean;
37
+ base: string;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,24 @@
1
+ import type { NavigationMenuItem } from '@nuxt/ui';
2
+ type __VLS_Props = {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ items?: (NavigationMenuItem & {
5
+ path?: string;
6
+ })[][];
7
+ activeMatch?: 'exact' | 'prefix';
8
+ };
9
+ declare var __VLS_6: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_6) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ orientation: "horizontal" | "vertical";
15
+ activeMatch: "exact" | "prefix";
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <section class="h-full">
3
+ <!-- Layout container switches between column (horizontal nav top) and row (vertical nav left) -->
4
+ <div
5
+ :class="
6
+ orientation === 'vertical' ? 'flex h-full' : 'flex h-screen flex-col'
7
+ "
8
+ >
9
+ <!-- Navigation area -->
10
+ <div
11
+ :class="[
12
+ 'border-gray-200',
13
+ orientation === 'vertical' ? 'min-w-[256px] border-r' : 'border-b px-4 py-2'
14
+ ]"
15
+ >
16
+ <!-- Custom navigation wired via composable router -->
17
+ <nav
18
+ :class="
19
+ orientation === 'vertical' ? 'flex flex-col gap-1' : 'flex items-center gap-4'
20
+ "
21
+ >
22
+ <template
23
+ v-for="(group, gi) in items"
24
+ :key="gi"
25
+ >
26
+ <div
27
+ :class="
28
+ orientation === 'vertical' ? 'flex flex-col gap-1 px-2 py-2' : 'flex flex-1 items-center gap-2'
29
+ "
30
+ >
31
+ <button
32
+ v-for="(it, ii) in group"
33
+ :key="ii"
34
+ type="button"
35
+ :class="[
36
+ 'cursor-pointer rounded-md hover:bg-gray-100',
37
+ orientation === 'vertical' ? 'px-2 py-1 text-left' : 'px-1 py-1',
38
+ isActive(it) ? 'text-primary-600' : 'hover:text-gray-900'
39
+ ]"
40
+ @click="onItemClick(it)"
41
+ >
42
+ <span class="inline-flex items-center gap-2">
43
+ <UIcon
44
+ v-if="it.icon"
45
+ :name="it.icon"
46
+ />
47
+ <span>{{ it.label }}</span>
48
+ </span>
49
+ </button>
50
+ </div>
51
+ </template>
52
+ </nav>
53
+ </div>
54
+
55
+ <!-- Main Content -->
56
+ <div
57
+ :class="orientation === 'vertical' ? 'flex-1 min-h-0 overflow-hidden' : 'flex-1 min-h-0 overflow-hidden'"
58
+ >
59
+ <slot />
60
+ </div>
61
+ </div>
62
+ </section>
63
+ </template>
64
+
65
+ <script setup>
66
+ import { useComponentRouter } from "#imports";
67
+ const props = defineProps({
68
+ orientation: { type: String, required: false, default: "horizontal" },
69
+ items: { type: Array, required: false },
70
+ activeMatch: { type: String, required: false, default: "prefix" }
71
+ });
72
+ const router = useComponentRouter();
73
+ function onItemClick(it) {
74
+ if (it.path) {
75
+ router.push(it.path);
76
+ }
77
+ }
78
+ function isActive(it) {
79
+ if (!it.path) return false;
80
+ const current = router.route?.value?.path || "";
81
+ if (props.activeMatch === "prefix") return isPrefixActive(current, it.path);
82
+ return current === it.path;
83
+ }
84
+ function isPrefixActive(current, base) {
85
+ if (base === "/") return current === "/";
86
+ if (current === base) return true;
87
+ return current.startsWith(base.endsWith("/") ? base : base + "/");
88
+ }
89
+ </script>
@@ -0,0 +1,24 @@
1
+ import type { NavigationMenuItem } from '@nuxt/ui';
2
+ type __VLS_Props = {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ items?: (NavigationMenuItem & {
5
+ path?: string;
6
+ })[][];
7
+ activeMatch?: 'exact' | 'prefix';
8
+ };
9
+ declare var __VLS_6: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_6) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ orientation: "horizontal" | "vertical";
15
+ activeMatch: "exact" | "prefix";
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,14 @@
1
+ import type { AnalyzedFlows } from '#build/analyzed-flows';
2
+ /**
3
+ * Get pre-analyzed flows with execution levels and dependencies.
4
+ * Flows are analyzed at build time for optimal performance.
5
+ *
6
+ * This returns a reactive ref that will automatically trigger re-renders
7
+ * when flows are updated during development.
8
+ */
9
+ export declare function useAnalyzedFlows(): any;
10
+ /**
11
+ * Get the raw analyzed flows array directly.
12
+ * Use this when you don't need reactivity.
13
+ */
14
+ export declare function getAnalyzedFlows(): AnalyzedFlows;
@@ -0,0 +1,7 @@
1
+ import { analyzedFlows } from "#build/analyzed-flows";
2
+ export function useAnalyzedFlows() {
3
+ return readonly(ref(analyzedFlows));
4
+ }
5
+ export function getAnalyzedFlows() {
6
+ return analyzedFlows;
7
+ }
@@ -0,0 +1,38 @@
1
+ import { shallowRef } from '#imports';
2
+ export type ComponentRouteRecord = {
3
+ path: string;
4
+ component: any;
5
+ name?: string;
6
+ };
7
+ export type ComponentRouterMode = 'query' | 'hash' | 'memory';
8
+ export interface UseComponentRouterOptions {
9
+ routes: ComponentRouteRecord[] | Record<string, any>;
10
+ base?: string;
11
+ mode?: ComponentRouterMode;
12
+ initial?: string;
13
+ provideKey?: string;
14
+ debug?: boolean;
15
+ }
16
+ type RouterContext = {
17
+ route: ReturnType<typeof shallowRef<{
18
+ path: string;
19
+ params: Record<string, string>;
20
+ query: Record<string, any>;
21
+ }>>;
22
+ push: (path: string) => Promise<void>;
23
+ replace: (path: string) => Promise<void>;
24
+ makePath: (patternOrPath: string, params?: Record<string, any>) => string;
25
+ makeHref: (patternOrPath: string, params?: Record<string, any>) => string;
26
+ pushTo: (patternOrPath: string, params?: Record<string, any>) => Promise<void>;
27
+ replaceTo: (patternOrPath: string, params?: Record<string, any>) => Promise<void>;
28
+ };
29
+ export declare function useComponentRouter(): RouterContext & {
30
+ component?: any;
31
+ };
32
+ export declare function useComponentRouter(opts: UseComponentRouterOptions): RouterContext & {
33
+ component: any;
34
+ };
35
+ export default useComponentRouter;
36
+ export declare function createComponentRoutes(glob: Record<string, () => Promise<any>>, options?: {
37
+ base?: string;
38
+ }): ComponentRouteRecord[];