@burdenoff/microfe-vibecontrols 2026.611.5 → 2026.613.1
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/dist/VibeControlsRoot.js
CHANGED
|
@@ -12,17 +12,17 @@ import { Toaster as N } from "@burdenoff/fe-libs/ui";
|
|
|
12
12
|
import { FeatureFlagProvider as P } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
13
13
|
//#region src/VibeControlsRoot.tsx
|
|
14
14
|
var F = (F) => {
|
|
15
|
-
let { registerNavItems: I, registerFooterItems: L, basePath: R = "/", workspaceId: z } = F, { t:
|
|
15
|
+
let { registerNavItems: I, registerFooterItems: L, basePath: R = "/", workspaceId: z, renderToaster: B = !1 } = F, { t: V, locale: H } = i(), U = typeof window < "u" && /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
|
|
16
16
|
a({
|
|
17
17
|
productSlug: "vibecontrols",
|
|
18
|
-
enabled: !
|
|
18
|
+
enabled: !U
|
|
19
19
|
});
|
|
20
|
-
let
|
|
20
|
+
let W = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
21
21
|
return r(() => {
|
|
22
|
-
if (!(!I ||
|
|
22
|
+
if (!(!I || U)) return I([
|
|
23
23
|
{
|
|
24
24
|
id: "vibecontrols-overview",
|
|
25
|
-
label:
|
|
25
|
+
label: V("nav.overview"),
|
|
26
26
|
path: R === "/" ? "/" : R,
|
|
27
27
|
icon: /* @__PURE__ */ j(_, { size: 20 }),
|
|
28
28
|
order: 10,
|
|
@@ -30,183 +30,183 @@ var F = (F) => {
|
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: "vibecontrols-targets",
|
|
33
|
-
label:
|
|
34
|
-
path:
|
|
33
|
+
label: V("nav.targets"),
|
|
34
|
+
path: W(R, "targets"),
|
|
35
35
|
icon: /* @__PURE__ */ j(w, { size: 20 }),
|
|
36
36
|
order: 12,
|
|
37
37
|
group: "vibecontrols"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: "vibecontrols-agents",
|
|
41
|
-
label:
|
|
42
|
-
path:
|
|
41
|
+
label: V("nav.agents"),
|
|
42
|
+
path: W(R, "agents"),
|
|
43
43
|
icon: /* @__PURE__ */ j(u, { size: 20 }),
|
|
44
44
|
order: 14,
|
|
45
45
|
group: "vibecontrols"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
id: "vibecontrols-agent-graph",
|
|
49
|
-
label:
|
|
50
|
-
path:
|
|
49
|
+
label: V("nav.agentGraph"),
|
|
50
|
+
path: W(R, "agent-graph"),
|
|
51
51
|
icon: /* @__PURE__ */ j(h, { size: 20 }),
|
|
52
52
|
order: 16,
|
|
53
53
|
group: "vibecontrols"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
id: "vibecontrols-vibes",
|
|
57
|
-
label:
|
|
58
|
-
path:
|
|
57
|
+
label: V("nav.vibes"),
|
|
58
|
+
path: W(R, "vibes"),
|
|
59
59
|
icon: /* @__PURE__ */ j(A, { size: 20 }),
|
|
60
60
|
order: 20,
|
|
61
61
|
group: "vibecontrols"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: "vibecontrols-catalogs",
|
|
65
|
-
label:
|
|
66
|
-
path:
|
|
65
|
+
label: V("nav.catalogs") === "nav.catalogs" ? "Catalogs" : V("nav.catalogs"),
|
|
66
|
+
path: W(R, "catalogs"),
|
|
67
67
|
icon: /* @__PURE__ */ j(c, { size: 20 }),
|
|
68
68
|
order: 21,
|
|
69
69
|
group: "vibecontrols"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "vibecontrols-components",
|
|
73
|
-
label:
|
|
74
|
-
path:
|
|
73
|
+
label: V("nav.components") === "nav.components" ? "Components" : V("nav.components"),
|
|
74
|
+
path: W(R, "components"),
|
|
75
75
|
icon: /* @__PURE__ */ j(d, { size: 20 }),
|
|
76
76
|
order: 22,
|
|
77
77
|
group: "vibecontrols"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: "vibecontrols-templates",
|
|
81
|
-
label:
|
|
82
|
-
path:
|
|
81
|
+
label: V("nav.templates") === "nav.templates" ? "Templates" : V("nav.templates"),
|
|
82
|
+
path: W(R, "templates"),
|
|
83
83
|
icon: /* @__PURE__ */ j(m, { size: 20 }),
|
|
84
84
|
order: 23,
|
|
85
85
|
group: "vibecontrols"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
id: "vibecontrols-environments",
|
|
89
|
-
label:
|
|
90
|
-
path:
|
|
89
|
+
label: V("nav.environments") === "nav.environments" ? "Environments" : V("nav.environments"),
|
|
90
|
+
path: W(R, "environments"),
|
|
91
91
|
icon: /* @__PURE__ */ j(y, { size: 20 }),
|
|
92
92
|
order: 23.5,
|
|
93
93
|
group: "vibecontrols"
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
id: "vibecontrols-plugins",
|
|
97
|
-
label:
|
|
98
|
-
path:
|
|
97
|
+
label: V("nav.plugins") === "nav.plugins" ? "Plugins" : V("nav.plugins"),
|
|
98
|
+
path: W(R, "plugins"),
|
|
99
99
|
icon: /* @__PURE__ */ j(S, { size: 20 }),
|
|
100
100
|
order: 24,
|
|
101
101
|
group: "vibecontrols"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
id: "vibecontrols-vibedeck",
|
|
105
|
-
label:
|
|
106
|
-
path:
|
|
105
|
+
label: V("nav.vibeDeck"),
|
|
106
|
+
path: W(R, "vibedeck"),
|
|
107
107
|
icon: /* @__PURE__ */ j(v, { size: 20 }),
|
|
108
108
|
order: 25,
|
|
109
109
|
group: "vibecontrols"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
id: "vibecontrols-sessions",
|
|
113
|
-
label:
|
|
114
|
-
path:
|
|
113
|
+
label: V("nav.sessions"),
|
|
114
|
+
path: W(R, "sessions"),
|
|
115
115
|
icon: /* @__PURE__ */ j(O, { size: 20 }),
|
|
116
116
|
order: 30,
|
|
117
117
|
group: "vibecontrols"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
id: "vibecontrols-vibecalendar",
|
|
121
|
-
label:
|
|
122
|
-
path:
|
|
121
|
+
label: V("nav.vibeCalendar"),
|
|
122
|
+
path: W(R, "calendar"),
|
|
123
123
|
icon: /* @__PURE__ */ j(p, { size: 20 }),
|
|
124
124
|
order: 35,
|
|
125
125
|
group: "vibecontrols"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
id: "vibecontrols-ai",
|
|
129
|
-
label:
|
|
130
|
-
path:
|
|
129
|
+
label: V("nav.ai"),
|
|
130
|
+
path: W(R, "ai"),
|
|
131
131
|
icon: /* @__PURE__ */ j(f, { size: 20 }),
|
|
132
132
|
order: 38,
|
|
133
133
|
group: "vibecontrols"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
id: "vibecontrols-ai-bookmarks",
|
|
137
|
-
label:
|
|
138
|
-
path:
|
|
137
|
+
label: V("nav.aiBookmarks"),
|
|
138
|
+
path: W(R, "ai/bookmarks"),
|
|
139
139
|
icon: /* @__PURE__ */ j(l, { size: 20 }),
|
|
140
140
|
order: 38.5,
|
|
141
141
|
group: "vibecontrols"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
id: "vibecontrols-ai-builder",
|
|
145
|
-
label:
|
|
146
|
-
path:
|
|
145
|
+
label: V("nav.aiBuilder") === "nav.aiBuilder" ? "AI Builder" : V("nav.aiBuilder"),
|
|
146
|
+
path: W(R, "ai-builder"),
|
|
147
147
|
icon: /* @__PURE__ */ j(D, { size: 20 }),
|
|
148
148
|
order: 38.7,
|
|
149
149
|
group: "vibecontrols"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
id: "vibecontrols-actions",
|
|
153
|
-
label:
|
|
154
|
-
path:
|
|
153
|
+
label: V("nav.actions"),
|
|
154
|
+
path: W(R, "actions"),
|
|
155
155
|
icon: /* @__PURE__ */ j(b, { size: 20 }),
|
|
156
156
|
order: 40,
|
|
157
157
|
group: "vibecontrols"
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
id: "vibecontrols-webhooks",
|
|
161
|
-
label:
|
|
162
|
-
path:
|
|
161
|
+
label: V("nav.webhooks") === "nav.webhooks" ? "Webhooks" : V("nav.webhooks"),
|
|
162
|
+
path: W(R, "webhooks"),
|
|
163
163
|
icon: /* @__PURE__ */ j(k, { size: 20 }),
|
|
164
164
|
order: 41,
|
|
165
165
|
group: "vibecontrols"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
id: "vibecontrols-getting-started",
|
|
169
|
-
label:
|
|
170
|
-
path:
|
|
169
|
+
label: V("nav.gettingStarted"),
|
|
170
|
+
path: W(R, "getting-started"),
|
|
171
171
|
icon: /* @__PURE__ */ j(C, { size: 20 }),
|
|
172
172
|
order: 50,
|
|
173
173
|
group: "vibecontrols"
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: "vibecontrols-tunnels",
|
|
177
|
-
label:
|
|
178
|
-
path:
|
|
177
|
+
label: V("nav.tunnels"),
|
|
178
|
+
path: W(R, "tunnels"),
|
|
179
179
|
icon: /* @__PURE__ */ j(g, { size: 20 }),
|
|
180
180
|
order: 47,
|
|
181
181
|
group: "vibecontrols"
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
id: "vibecontrols-analytics",
|
|
185
|
-
label:
|
|
186
|
-
path:
|
|
185
|
+
label: V("nav.analytics"),
|
|
186
|
+
path: W(R, "analytics"),
|
|
187
187
|
icon: /* @__PURE__ */ j(s, { size: 20 }),
|
|
188
188
|
order: 55.5,
|
|
189
189
|
group: "vibecontrols-system"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
id: "vibecontrols-audit",
|
|
193
|
-
label:
|
|
194
|
-
path:
|
|
193
|
+
label: V("nav.vibeAudit"),
|
|
194
|
+
path: W(R, "audit"),
|
|
195
195
|
icon: /* @__PURE__ */ j(E, { size: 20 }),
|
|
196
196
|
order: 56,
|
|
197
197
|
group: "vibecontrols-system"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
id: "vibecontrols-health",
|
|
201
|
-
label:
|
|
202
|
-
path:
|
|
201
|
+
label: V("nav.health"),
|
|
202
|
+
path: W(R, "health"),
|
|
203
203
|
icon: /* @__PURE__ */ j(o, { size: 20 }),
|
|
204
204
|
order: 110,
|
|
205
205
|
group: "vibecontrols-system"
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
id: "vibecontrols-integrations",
|
|
209
|
-
label:
|
|
209
|
+
label: V("nav.integrations") === "nav.integrations" ? "Integrations" : V("nav.integrations"),
|
|
210
210
|
path: "/integrations",
|
|
211
211
|
icon: /* @__PURE__ */ j(x, { size: 20 }),
|
|
212
212
|
order: 115,
|
|
@@ -214,8 +214,8 @@ var F = (F) => {
|
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
id: "vibecontrols-settings",
|
|
217
|
-
label:
|
|
218
|
-
path:
|
|
217
|
+
label: V("nav.settings"),
|
|
218
|
+
path: W(R, "settings"),
|
|
219
219
|
icon: /* @__PURE__ */ j(T, { size: 20 }),
|
|
220
220
|
order: 120,
|
|
221
221
|
group: "vibecontrols-system"
|
|
@@ -224,27 +224,27 @@ var F = (F) => {
|
|
|
224
224
|
}, [
|
|
225
225
|
I,
|
|
226
226
|
R,
|
|
227
|
-
B,
|
|
228
227
|
V,
|
|
229
|
-
H
|
|
228
|
+
H,
|
|
229
|
+
U
|
|
230
230
|
]), r(() => {
|
|
231
|
-
if (!(!L ||
|
|
231
|
+
if (!(!L || U)) return L([{
|
|
232
232
|
id: "vibecontrols-status",
|
|
233
233
|
label: "VibeControls Ready",
|
|
234
234
|
type: "status",
|
|
235
235
|
order: 10,
|
|
236
236
|
section: "left"
|
|
237
237
|
}]);
|
|
238
|
-
}, [L,
|
|
238
|
+
}, [L, U]), /* @__PURE__ */ j(P, {
|
|
239
239
|
workspaceId: z ?? null,
|
|
240
240
|
gateway: "global",
|
|
241
241
|
defaultEnabled: !0,
|
|
242
242
|
children: /* @__PURE__ */ M(e, {
|
|
243
243
|
...F,
|
|
244
244
|
children: [
|
|
245
|
-
|
|
245
|
+
U ? null : /* @__PURE__ */ j(n, {}),
|
|
246
246
|
/* @__PURE__ */ j(t, {}),
|
|
247
|
-
/* @__PURE__ */ j(N, {
|
|
247
|
+
B ? /* @__PURE__ */ j(N, {
|
|
248
248
|
position: "bottom-right",
|
|
249
249
|
offset: {
|
|
250
250
|
bottom: 96,
|
|
@@ -261,7 +261,7 @@ var F = (F) => {
|
|
|
261
261
|
"--normal-border": "var(--color-border-default)",
|
|
262
262
|
"--border-radius": "var(--radius-card)"
|
|
263
263
|
}
|
|
264
|
-
})
|
|
264
|
+
}) : null
|
|
265
265
|
]
|
|
266
266
|
})
|
|
267
267
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VibeControlsRoot.js","names":[],"sources":["../src/VibeControlsRoot.tsx"],"sourcesContent":["import type { CSSProperties, FC } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useRecordProductVisit } from '@burdenoff/fe-libs/shared/hooks';\nimport {\n LayoutDashboard,\n Bot,\n Terminal,\n Zap,\n Globe,\n Settings,\n Activity,\n Rocket,\n LayoutGrid,\n CalendarClock,\n Shield,\n Server,\n GitBranch,\n Brain,\n Bookmark,\n PlayCircle,\n BarChart2,\n BookOpen,\n Box,\n FileCode,\n Plug,\n Puzzle,\n Network,\n Webhook,\n Sparkles,\n} from 'lucide-react';\nimport { VibeControlsProvider } from './providers/VibeControlsProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { Toaster } from '@burdenoff/fe-libs/ui';\nimport type { NavItem, VibeControlsRootProps } from './types';\nimport { VibeControlsRoutes } from './VibeControlsRoutes';\nimport { AgentEventsConnector } from './components/shared/AgentEventsConnector';\nimport './styles/vibecontrols.css';\nimport './styles/print.css';\n\n/**\n * Root component for the VibeControls microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { VibeControlsRoot, type VibeControlsRootProps } from '@burdenoff/microfe-vibecontrols';\n *\n * function App() {\n * const props: VibeControlsRootProps = {\n * basePath: '/vibecontrols',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * defaultView: 'agents',\n * onAgentSelect: (agent) => console.log('Agent selected:', agent),\n * onSessionStart: (session) => console.log('Session started:', session),\n * onVibeActivate: (vibe) => console.log('Vibe activated:', vibe),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <VibeControlsRoot {...props} />;\n * }\n * ```\n */\nexport const VibeControlsRoot: FC<VibeControlsRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/', workspaceId } = props;\n const { t, locale } = useI18n();\n\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n useRecordProductVisit({ productSlug: 'vibecontrols', enabled: !isPublicLinkRoute });\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems || isPublicLinkRoute) return;\n\n const navItems: NavItem[] = [\n // Main navigation\n {\n id: 'vibecontrols-overview',\n label: t('nav.overview'),\n path: basePath === '/' ? '/' : basePath,\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'vibecontrols',\n },\n\n // Targets first — the primary entity\n {\n id: 'vibecontrols-targets',\n label: t('nav.targets'),\n path: joinPath(basePath, 'targets'),\n icon: <Server size={20} />,\n order: 12,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agents',\n label: t('nav.agents'),\n path: joinPath(basePath, 'agents'),\n icon: <Bot size={20} />,\n order: 14,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agent-graph',\n label: t('nav.agentGraph'),\n path: joinPath(basePath, 'agent-graph'),\n icon: <GitBranch size={20} />,\n order: 16,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibes',\n label: t('nav.vibes'),\n path: joinPath(basePath, 'vibes'),\n icon: <Zap size={20} />,\n order: 20,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-catalogs',\n label: t('nav.catalogs') === 'nav.catalogs' ? 'Catalogs' : t('nav.catalogs'),\n path: joinPath(basePath, 'catalogs'),\n icon: <BookOpen size={20} />,\n order: 21,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-components',\n label: t('nav.components') === 'nav.components' ? 'Components' : t('nav.components'),\n path: joinPath(basePath, 'components'),\n icon: <Box size={20} />,\n order: 22,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-templates',\n label: t('nav.templates') === 'nav.templates' ? 'Templates' : t('nav.templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileCode size={20} />,\n order: 23,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-environments',\n label:\n t('nav.environments') === 'nav.environments' ? 'Environments' : t('nav.environments'),\n path: joinPath(basePath, 'environments'),\n icon: <Network size={20} />,\n order: 23.5,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-plugins',\n label: t('nav.plugins') === 'nav.plugins' ? 'Plugins' : t('nav.plugins'),\n path: joinPath(basePath, 'plugins'),\n icon: <Puzzle size={20} />,\n order: 24,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibedeck',\n label: t('nav.vibeDeck'),\n path: joinPath(basePath, 'vibedeck'),\n icon: <LayoutGrid size={20} />,\n order: 25,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-sessions',\n label: t('nav.sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <Terminal size={20} />,\n order: 30,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibecalendar',\n label: t('nav.vibeCalendar'),\n path: joinPath(basePath, 'calendar'),\n icon: <CalendarClock size={20} />,\n order: 35,\n group: 'vibecontrols',\n },\n // AI Vibecoding\n {\n id: 'vibecontrols-ai',\n label: t('nav.ai'),\n path: joinPath(basePath, 'ai'),\n icon: <Brain size={20} />,\n order: 38,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-ai-bookmarks',\n label: t('nav.aiBookmarks'),\n path: joinPath(basePath, 'ai/bookmarks'),\n icon: <Bookmark size={20} />,\n order: 38.5,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-ai-builder',\n label: t('nav.aiBuilder') === 'nav.aiBuilder' ? 'AI Builder' : t('nav.aiBuilder'),\n path: joinPath(basePath, 'ai-builder'),\n icon: <Sparkles size={20} />,\n order: 38.7,\n group: 'vibecontrols',\n },\n\n // Actions\n {\n id: 'vibecontrols-actions',\n label: t('nav.actions'),\n path: joinPath(basePath, 'actions'),\n icon: <PlayCircle size={20} />,\n order: 40,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-webhooks',\n label: t('nav.webhooks') === 'nav.webhooks' ? 'Webhooks' : t('nav.webhooks'),\n path: joinPath(basePath, 'webhooks'),\n icon: <Webhook size={20} />,\n order: 41,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-getting-started',\n label: t('nav.gettingStarted'),\n path: joinPath(basePath, 'getting-started'),\n icon: <Rocket size={20} />,\n order: 50,\n group: 'vibecontrols',\n },\n\n // Connection management\n {\n id: 'vibecontrols-tunnels',\n label: t('nav.tunnels'),\n path: joinPath(basePath, 'tunnels'),\n icon: <Globe size={20} />,\n order: 47,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-analytics',\n label: t('nav.analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart2 size={20} />,\n order: 55.5,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-audit',\n label: t('nav.vibeAudit'),\n path: joinPath(basePath, 'audit'),\n icon: <Shield size={20} />,\n order: 56,\n group: 'vibecontrols-system',\n },\n\n // Settings & System\n {\n id: 'vibecontrols-health',\n label: t('nav.health'),\n path: joinPath(basePath, 'health'),\n icon: <Activity size={20} />,\n order: 110,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-integrations',\n label:\n t('nav.integrations') === 'nav.integrations' ? 'Integrations' : t('nav.integrations'),\n // Absolute path — links out to the host shell's /integrations route\n // (microfe-integrations, mounted by vibecontrols-app). Keeps the\n // VibeControls MFE compliant with the no-cross-MFE-import rule.\n path: '/integrations',\n icon: <Plug size={20} />,\n order: 115,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-settings',\n label: t('nav.settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 120,\n group: 'vibecontrols-system',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t, locale, isPublicLinkRoute]);\n\n // Register footer items (example: status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems || isPublicLinkRoute) return;\n\n const footerItems = [\n {\n id: 'vibecontrols-status',\n label: 'VibeControls Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, isPublicLinkRoute]);\n\n return (\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <VibeControlsProvider {...props}>\n {!isPublicLinkRoute ? (\n /* Agent events connector - syncs active agent to WebSocket */\n <AgentEventsConnector />\n ) : null}\n <VibeControlsRoutes />\n {/* Single sonner toaster for the whole module (lib/toast.ts emits\n to it). Offset clears the shell's page-discussion FAB at\n bottom-6 right-6. The style block remaps sonner's theme vars to\n this app's semantic tokens (the fe-libs defaults reference\n shadcn vars that are not defined in this shell). */}\n <Toaster\n position=\"bottom-right\"\n offset={{ bottom: 96, right: 16 }}\n mobileOffset={{ bottom: 96, left: 16, right: 16 }}\n style={\n {\n '--normal-bg': 'var(--color-bg-elevated)',\n '--normal-text': 'var(--color-text-primary)',\n '--normal-border': 'var(--color-border-default)',\n '--border-radius': 'var(--radius-card)',\n } as CSSProperties\n }\n />\n </VibeControlsProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAuEA,IAAa,KAA+C,MAAU;CACpE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,mBAAgB,GACzE,EAAE,MAAG,cAAW,GAAS,EAEzB,IACJ,OAAO,SAAW,OAClB,kCAAkC,KAAK,OAAO,SAAS,SAAS;AAElE,GAAsB;EAAE,aAAa;EAAgB,SAAS,CAAC;EAAmB,CAAC;CAGnF,IAAM,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AA8PtD,QAzPA,QAAgB;AACV,SAAC,KAAoB,GAkOzB,QAHgB,EA7NY;GAE1B;IACE,IAAI;IACJ,OAAO,EAAE,eAAe;IACxB,MAAM,MAAa,MAAM,MAAM;IAC/B,MAAM,kBAAC,GAAD,EAAiB,MAAM,IAAM,CAAA;IACnC,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,cAAc;IACvB,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,aA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EAAU;EAAG;EAAQ;EAAkB,CAAC,EAG9D,QAAgB;AACV,SAAC,KAAuB,GAa5B,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAkB,CAAC,EAG1C,kBAAC,GAAD;EAAqB,aAAa,KAAe;EAAM,SAAQ;EAAS,gBAAgB;YACtF,kBAAC,GAAD;GAAsB,GAAI;aAA1B;IACI,IAGE,OADF,kBAAC,GAAD,EAAwB,CAAA;IAE1B,kBAAC,GAAD,EAAsB,CAAA;IAMtB,kBAAC,GAAD;KACE,UAAS;KACT,QAAQ;MAAE,QAAQ;MAAI,OAAO;MAAI;KACjC,cAAc;MAAE,QAAQ;MAAI,MAAM;MAAI,OAAO;MAAI;KACjD,OACE;MACE,eAAe;MACf,iBAAiB;MACjB,mBAAmB;MACnB,mBAAmB;MACpB;KAEH,CAAA;IACmB;;EACH,CAAA"}
|
|
1
|
+
{"version":3,"file":"VibeControlsRoot.js","names":[],"sources":["../src/VibeControlsRoot.tsx"],"sourcesContent":["import type { CSSProperties, FC } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useRecordProductVisit } from '@burdenoff/fe-libs/shared/hooks';\nimport {\n LayoutDashboard,\n Bot,\n Terminal,\n Zap,\n Globe,\n Settings,\n Activity,\n Rocket,\n LayoutGrid,\n CalendarClock,\n Shield,\n Server,\n GitBranch,\n Brain,\n Bookmark,\n PlayCircle,\n BarChart2,\n BookOpen,\n Box,\n FileCode,\n Plug,\n Puzzle,\n Network,\n Webhook,\n Sparkles,\n} from 'lucide-react';\nimport { VibeControlsProvider } from './providers/VibeControlsProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { Toaster } from '@burdenoff/fe-libs/ui';\nimport type { NavItem, VibeControlsRootProps } from './types';\nimport { VibeControlsRoutes } from './VibeControlsRoutes';\nimport { AgentEventsConnector } from './components/shared/AgentEventsConnector';\nimport './styles/vibecontrols.css';\nimport './styles/print.css';\n\n/**\n * Root component for the VibeControls microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { VibeControlsRoot, type VibeControlsRootProps } from '@burdenoff/microfe-vibecontrols';\n *\n * function App() {\n * const props: VibeControlsRootProps = {\n * basePath: '/vibecontrols',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * defaultView: 'agents',\n * onAgentSelect: (agent) => console.log('Agent selected:', agent),\n * onSessionStart: (session) => console.log('Session started:', session),\n * onVibeActivate: (vibe) => console.log('Vibe activated:', vibe),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <VibeControlsRoot {...props} />;\n * }\n * ```\n */\nexport const VibeControlsRoot: FC<VibeControlsRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n workspaceId,\n renderToaster = false,\n } = props;\n const { t, locale } = useI18n();\n\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n useRecordProductVisit({ productSlug: 'vibecontrols', enabled: !isPublicLinkRoute });\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems || isPublicLinkRoute) return;\n\n const navItems: NavItem[] = [\n // Main navigation\n {\n id: 'vibecontrols-overview',\n label: t('nav.overview'),\n path: basePath === '/' ? '/' : basePath,\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'vibecontrols',\n },\n\n // Targets first — the primary entity\n {\n id: 'vibecontrols-targets',\n label: t('nav.targets'),\n path: joinPath(basePath, 'targets'),\n icon: <Server size={20} />,\n order: 12,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agents',\n label: t('nav.agents'),\n path: joinPath(basePath, 'agents'),\n icon: <Bot size={20} />,\n order: 14,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agent-graph',\n label: t('nav.agentGraph'),\n path: joinPath(basePath, 'agent-graph'),\n icon: <GitBranch size={20} />,\n order: 16,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibes',\n label: t('nav.vibes'),\n path: joinPath(basePath, 'vibes'),\n icon: <Zap size={20} />,\n order: 20,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-catalogs',\n label: t('nav.catalogs') === 'nav.catalogs' ? 'Catalogs' : t('nav.catalogs'),\n path: joinPath(basePath, 'catalogs'),\n icon: <BookOpen size={20} />,\n order: 21,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-components',\n label: t('nav.components') === 'nav.components' ? 'Components' : t('nav.components'),\n path: joinPath(basePath, 'components'),\n icon: <Box size={20} />,\n order: 22,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-templates',\n label: t('nav.templates') === 'nav.templates' ? 'Templates' : t('nav.templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileCode size={20} />,\n order: 23,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-environments',\n label:\n t('nav.environments') === 'nav.environments' ? 'Environments' : t('nav.environments'),\n path: joinPath(basePath, 'environments'),\n icon: <Network size={20} />,\n order: 23.5,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-plugins',\n label: t('nav.plugins') === 'nav.plugins' ? 'Plugins' : t('nav.plugins'),\n path: joinPath(basePath, 'plugins'),\n icon: <Puzzle size={20} />,\n order: 24,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibedeck',\n label: t('nav.vibeDeck'),\n path: joinPath(basePath, 'vibedeck'),\n icon: <LayoutGrid size={20} />,\n order: 25,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-sessions',\n label: t('nav.sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <Terminal size={20} />,\n order: 30,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibecalendar',\n label: t('nav.vibeCalendar'),\n path: joinPath(basePath, 'calendar'),\n icon: <CalendarClock size={20} />,\n order: 35,\n group: 'vibecontrols',\n },\n // AI Vibecoding\n {\n id: 'vibecontrols-ai',\n label: t('nav.ai'),\n path: joinPath(basePath, 'ai'),\n icon: <Brain size={20} />,\n order: 38,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-ai-bookmarks',\n label: t('nav.aiBookmarks'),\n path: joinPath(basePath, 'ai/bookmarks'),\n icon: <Bookmark size={20} />,\n order: 38.5,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-ai-builder',\n label: t('nav.aiBuilder') === 'nav.aiBuilder' ? 'AI Builder' : t('nav.aiBuilder'),\n path: joinPath(basePath, 'ai-builder'),\n icon: <Sparkles size={20} />,\n order: 38.7,\n group: 'vibecontrols',\n },\n\n // Actions\n {\n id: 'vibecontrols-actions',\n label: t('nav.actions'),\n path: joinPath(basePath, 'actions'),\n icon: <PlayCircle size={20} />,\n order: 40,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-webhooks',\n label: t('nav.webhooks') === 'nav.webhooks' ? 'Webhooks' : t('nav.webhooks'),\n path: joinPath(basePath, 'webhooks'),\n icon: <Webhook size={20} />,\n order: 41,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-getting-started',\n label: t('nav.gettingStarted'),\n path: joinPath(basePath, 'getting-started'),\n icon: <Rocket size={20} />,\n order: 50,\n group: 'vibecontrols',\n },\n\n // Connection management\n {\n id: 'vibecontrols-tunnels',\n label: t('nav.tunnels'),\n path: joinPath(basePath, 'tunnels'),\n icon: <Globe size={20} />,\n order: 47,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-analytics',\n label: t('nav.analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart2 size={20} />,\n order: 55.5,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-audit',\n label: t('nav.vibeAudit'),\n path: joinPath(basePath, 'audit'),\n icon: <Shield size={20} />,\n order: 56,\n group: 'vibecontrols-system',\n },\n\n // Settings & System\n {\n id: 'vibecontrols-health',\n label: t('nav.health'),\n path: joinPath(basePath, 'health'),\n icon: <Activity size={20} />,\n order: 110,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-integrations',\n label:\n t('nav.integrations') === 'nav.integrations' ? 'Integrations' : t('nav.integrations'),\n // Absolute path — links out to the host shell's /integrations route\n // (microfe-integrations, mounted by vibecontrols-app). Keeps the\n // VibeControls MFE compliant with the no-cross-MFE-import rule.\n path: '/integrations',\n icon: <Plug size={20} />,\n order: 115,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-settings',\n label: t('nav.settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 120,\n group: 'vibecontrols-system',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t, locale, isPublicLinkRoute]);\n\n // Register footer items (example: status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems || isPublicLinkRoute) return;\n\n const footerItems = [\n {\n id: 'vibecontrols-status',\n label: 'VibeControls Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, isPublicLinkRoute]);\n\n return (\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <VibeControlsProvider {...props}>\n {!isPublicLinkRoute ? (\n /* Agent events connector - syncs active agent to WebSocket */\n <AgentEventsConnector />\n ) : null}\n <VibeControlsRoutes />\n {/* Toaster is owned by the HOST, not the module. Production app shells\n mount a single sonner <Toaster> via AppShellProvider; since sonner\n is a global singleton, this module's lib/toast.ts emits to it and a\n second Toaster here would render every toast twice (the AI-assistant\n \"Error fetching quota limit and usage\" double-toast). Only the\n standalone dev harness (src/dev/main.tsx) — which has no host shell —\n passes renderToaster so toasts are visible there. The style block\n remaps sonner's theme vars to this app's semantic tokens (the\n fe-libs defaults reference shadcn vars not defined in the bare dev\n harness); the offset clears the page-discussion FAB. */}\n {renderToaster ? (\n <Toaster\n position=\"bottom-right\"\n offset={{ bottom: 96, right: 16 }}\n mobileOffset={{ bottom: 96, left: 16, right: 16 }}\n style={\n {\n '--normal-bg': 'var(--color-bg-elevated)',\n '--normal-text': 'var(--color-text-primary)',\n '--normal-border': 'var(--color-border-default)',\n '--border-radius': 'var(--radius-card)',\n } as CSSProperties\n }\n />\n ) : null}\n </VibeControlsProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAuEA,IAAa,KAA+C,MAAU;CACpE,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,mBAAgB,OACd,GACE,EAAE,MAAG,cAAW,GAAS,EAEzB,IACJ,OAAO,SAAW,OAClB,kCAAkC,KAAK,OAAO,SAAS,SAAS;AAElE,GAAsB;EAAE,aAAa;EAAgB,SAAS,CAAC;EAAmB,CAAC;CAGnF,IAAM,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AA8PtD,QAzPA,QAAgB;AACV,SAAC,KAAoB,GAkOzB,QAHgB,EA7NY;GAE1B;IACE,IAAI;IACJ,OAAO,EAAE,eAAe;IACxB,MAAM,MAAa,MAAM,MAAM;IAC/B,MAAM,k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MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,eAAe;IACxB,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACF,CAGyC;IAKzC;EAAC;EAAkB;EAAU;EAAG;EAAQ;EAAkB,CAAC,EAG9D,QAAgB;AACV,SAAC,KAAuB,GAa5B,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAkB,CAAC,EAG1C,kBAAC,GAAD;EAAqB,aAAa,KAAe;EAAM,SAAQ;EAAS,gBAAgB;YACtF,kBAAC,GAAD;GAAsB,GAAI;aAA1B;IACI,IAGE,OADF,kBAAC,GAAD,EAAwB,CAAA;IAE1B,kBAAC,GAAD,EAAsB,CAAA;IAWrB,IACC,kBAAC,GAAD;KACE,UAAS;KACT,QAAQ;MAAE,QAAQ;MAAI,OAAO;MAAI;KACjC,cAAc;MAAE,QAAQ;MAAI,MAAM;MAAI,OAAO;MAAI;KACjD,OACE;MACE,eAAe;MACf,iBAAiB;MACjB,mBAAmB;MACnB,mBAAmB;MACpB;KAEH,CAAA,GACA;IACiB;;EACH,CAAA"}
|
package/dist/lib/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","names":[],"sources":["../../src/lib/toast.ts"],"sourcesContent":["import { toast } from 'sonner';\n\n/**\n * Module-wide toast API.
|
|
1
|
+
{"version":3,"file":"toast.js","names":[],"sources":["../../src/lib/toast.ts"],"sourcesContent":["import { toast } from 'sonner';\n\n/**\n * Module-wide toast API. sonner is a global singleton; the matching <Toaster>\n * is owned by the HOST — the production app shell mounts a single one via\n * AppShellProvider, and the standalone dev harness mounts its own (see\n * VibeControlsRoot's `renderToaster`). Every page/component must emit feedback\n * through these helpers instead of hand-rolling fixed-position toast markup.\n *\n * Durations follow the notification spec: success/info auto-dismiss,\n * errors stay until the user dismisses them (sonner renders a close\n * button and announces via aria-live).\n */\nexport const notify = {\n success(message: string, description?: string): void {\n toast.success(message, { description, duration: 4000 });\n },\n info(message: string, description?: string): void {\n toast.info(message, { description, duration: 4000 });\n },\n warning(message: string, description?: string): void {\n toast.warning(message, { description, duration: 8000 });\n },\n error(message: string, description?: string): void {\n toast.error(message, { description, duration: Infinity, closeButton: true });\n },\n dismiss(id?: string | number): void {\n toast.dismiss(id);\n },\n};\n\nexport { toast };\n"],"mappings":";;AAaA,IAAa,IAAS;CACpB,QAAQ,GAAiB,GAA4B;AACnD,IAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEzD,KAAK,GAAiB,GAA4B;AAChD,IAAM,KAAK,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEtD,QAAQ,GAAiB,GAA4B;AACnD,IAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEzD,MAAM,GAAiB,GAA4B;AACjD,IAAM,MAAM,GAAS;GAAE;GAAa,UAAU;GAAU,aAAa;GAAM,CAAC;;CAE9E,QAAQ,GAA4B;AAClC,IAAM,QAAQ,EAAG;;CAEpB"}
|