@octabits-io/nuxt-ui-kit 0.3.1 → 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.
@@ -129,6 +129,13 @@ interface AiProgressCoreOptions {
129
129
  fetchWorkflowStatus: (workflowId: number) => Promise<AiWorkflowStatusSnapshot | null>;
130
130
  /** Poll cadence while any tracked workflow is active. Default 3000ms. */
131
131
  intervalMs?: number;
132
+ /**
133
+ * Fired once per workflow when polling observes its transition to a
134
+ * terminal status (completed/failed/cancelled) — alongside the
135
+ * `completionSignal` bump, but carrying WHICH workflow finished. Use for
136
+ * per-workflow notifications (toasts, badges).
137
+ */
138
+ onTerminal?: (tracked: TrackedWorkflow) => void;
132
139
  }
133
140
  /**
134
141
  * Cross-page AI-workflow progress tracking — the setup body of an app's
package/dist/ai/index.js CHANGED
@@ -241,7 +241,10 @@ function createAiProgressCore(options) {
241
241
  tracked.totalSteps = workflow.totalSteps;
242
242
  tracked.completedSteps = workflow.completedSteps;
243
243
  tracked.progress = workflow.totalSteps > 0 ? workflow.completedSteps / workflow.totalSteps * 100 : 0;
244
- if (wasActive && isTerminalStatus(workflow.status)) completionSignal.value++;
244
+ if (wasActive && isTerminalStatus(workflow.status)) {
245
+ completionSignal.value++;
246
+ options.onTerminal?.(tracked);
247
+ }
245
248
  } catch {}
246
249
  }
247
250
  const { pause, resume } = createPausableInterval(pollActive, intervalMs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octabits-io/nuxt-ui-kit",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Frontend kit for Nuxt/Vue admin SPAs: OIDC session harness (oidc-client-ts), Eden Treaty client factory, auth/org store cores, and a route-guard builder — factory-style seams the app wires into its own plugins, stores, and middleware",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -75,7 +75,7 @@
75
75
  "vitest": "^4.1.10",
76
76
  "vue": "^3.5.39",
77
77
  "zod": "^4.4.3",
78
- "@octabits-io/framework": "^0.3.0"
78
+ "@octabits-io/framework": "^0.3.1"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@elysiajs/eden": "^1.4.0",
@@ -88,7 +88,7 @@
88
88
  "typescript": "^5 || ^6 || ^7",
89
89
  "vue": "^3.5.0",
90
90
  "vue-i18n": "^11",
91
- "vue-router": "^4",
91
+ "vue-router": "^4.5.0 || ^5.0.0",
92
92
  "zod": "^4"
93
93
  },
94
94
  "peerDependenciesMeta": {