@octabits-io/nuxt-ui-kit 0.3.2 → 0.5.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.2",
3
+ "version": "0.5.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",
@@ -18,9 +18,22 @@ const props = withDefaults(defineProps<{
18
18
  * e.g. `?s=owner:42`) — the mobile slideover auto-closes when it changes.
19
19
  */
20
20
  selectionQueryKey?: string
21
+ /**
22
+ * Visibility classes for the persistent rail `<aside>`. Override to drive
23
+ * the rail/slideover switch from something other than the viewport — e.g.
24
+ * a named container query (`'hidden @3xl/main:flex'`) so the rail collapses
25
+ * when a docked panel squeezes the content column. Must be complete class
26
+ * literals (Tailwind extracts literals only) and must pair with
27
+ * `toggleVisibilityClass` (the toggle shows exactly while the rail hides).
28
+ */
29
+ railVisibilityClass?: string
30
+ /** Visibility classes for the toggle bar that opens the slideover. */
31
+ toggleVisibilityClass?: string
21
32
  }>(), {
22
33
  width: 'w-[240px]',
23
34
  selectionQueryKey: 's',
35
+ railVisibilityClass: 'hidden lg:flex',
36
+ toggleVisibilityClass: 'lg:hidden',
24
37
  })
25
38
 
26
39
  const open = ref(false)
@@ -63,7 +76,7 @@ watch(
63
76
  </USlideover>
64
77
 
65
78
  <aside
66
- :class="['hidden shrink-0 flex-col overflow-hidden border-r border-default lg:flex', width]"
79
+ :class="['shrink-0 flex-col overflow-hidden border-r border-default', railVisibilityClass, width]"
67
80
  >
68
81
  <div v-if="!headerless" class="border-b border-default px-4 py-3">
69
82
  <h2 class="font-display text-lg font-semibold tracking-tight">{{ title }}</h2>
@@ -75,7 +88,7 @@ watch(
75
88
  </aside>
76
89
 
77
90
  <div class="flex min-w-0 flex-1 flex-col overflow-hidden">
78
- <div class="flex shrink-0 items-center gap-2 border-b border-default px-3 py-2 lg:hidden">
91
+ <div :class="['flex shrink-0 items-center gap-2 border-b border-default px-3 py-2', toggleVisibilityClass]">
79
92
  <UButton
80
93
  :label="buttonLabel"
81
94
  icon="i-lucide-panel-left-open"