@alfadocs/ui-kit-debug 0.87.0 → 0.88.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.
- package/dist/_chunks/{marketplace-app-shell-Chcj4q4z.js → marketplace-app-shell-DX5aLeIJ.js} +132 -128
- package/dist/_chunks/marketplace-app-shell-DX5aLeIJ.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -0
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
- package/package.json +5 -1
- package/dist/_chunks/marketplace-app-shell-Chcj4q4z.js.map +0 -1
package/dist/_chunks/{marketplace-app-shell-Chcj4q4z.js → marketplace-app-shell-DX5aLeIJ.js}
RENAMED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as b, useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { c as
|
|
5
|
-
import { A as
|
|
6
|
-
import { A as
|
|
7
|
-
import { A as
|
|
1
|
+
import { jsxs as t, jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as E } from "react";
|
|
3
|
+
import { useTranslation as B } from "react-i18next";
|
|
4
|
+
import { c as p } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { A as D } from "./app-frame-DIEMIC5V.js";
|
|
6
|
+
import { A as S } from "./avatar-BNQNhoyL.js";
|
|
7
|
+
import { A as F } from "./alert-Cxaqd-QO.js";
|
|
8
8
|
import { C as w } from "./card-DPmk26CL.js";
|
|
9
9
|
import { D as m } from "./dropdown-menu-DU-Hrf33.js";
|
|
10
|
-
import { T as
|
|
11
|
-
import { a as
|
|
12
|
-
import { H as
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import { T as
|
|
16
|
-
import { a as
|
|
17
|
-
import { u as
|
|
18
|
-
import { A as
|
|
19
|
-
import { A as
|
|
20
|
-
import { M as
|
|
21
|
-
import { L as
|
|
22
|
-
const
|
|
10
|
+
import { T as q } from "./tab-bar-Axhk6xzx.js";
|
|
11
|
+
import { a as A, H as G, g as J, f as z, e as K, c as Q, d as U } from "./header-CjwasYnn.js";
|
|
12
|
+
import { H as X } from "./header-settings-CLwFqMHI.js";
|
|
13
|
+
import { S as Y } from "./sign-in-with-alfadocs-button-UlYefZpI.js";
|
|
14
|
+
import { S as Z, g as _, b as aa, a as ea, j as sa, k as ra, i as ta, h as I } from "./sidebar-C0PbwJBc.js";
|
|
15
|
+
import { T as na } from "./theme-root-BOO73p5t.js";
|
|
16
|
+
import { a as da } from "./tooltip-DvmfrNvB.js";
|
|
17
|
+
import { u as ia } from "./use-theme-CAuo6EYT.js";
|
|
18
|
+
import { A as la, L as oa } from "./logo-1FuSGx0n.js";
|
|
19
|
+
import { A as ca } from "./Alfadocs_Logo_Mark-7o3L3WBI.js";
|
|
20
|
+
import { M as ma } from "./maximize-2-BYd2Kti7.js";
|
|
21
|
+
import { L as pa } from "./log-out-oDS6zO5d.js";
|
|
22
|
+
const ua = p("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), fa = p(
|
|
23
23
|
[
|
|
24
24
|
"ds:[font-family:var(--font-serif)]",
|
|
25
25
|
"ds:font-semibold",
|
|
@@ -60,7 +60,7 @@ const ca = u("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ma =
|
|
|
60
60
|
},
|
|
61
61
|
defaultVariants: { size: "md", tone: "gradient" }
|
|
62
62
|
}
|
|
63
|
-
),
|
|
63
|
+
), ha = p("ds:whitespace-nowrap", {
|
|
64
64
|
variants: {
|
|
65
65
|
size: {
|
|
66
66
|
sm: "ds:[--lockup-unit:var(--logo-size-sm)]",
|
|
@@ -75,47 +75,47 @@ const ca = u("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ma =
|
|
|
75
75
|
name: s,
|
|
76
76
|
variant: n = "standard",
|
|
77
77
|
monochrome: e = !1,
|
|
78
|
-
tone:
|
|
78
|
+
tone: r = "auto",
|
|
79
79
|
size: d = "md",
|
|
80
80
|
className: l,
|
|
81
81
|
...c
|
|
82
82
|
}, o) => {
|
|
83
83
|
if (n === "maker") {
|
|
84
|
-
const i =
|
|
85
|
-
return /* @__PURE__ */
|
|
84
|
+
const i = r === "inherit", u = i ? "" : e ? "ds:text-[color:var(--foreground)]" : "ds:text-[color:var(--primary)]", f = i ? "" : e ? "ds:text-[color:var(--foreground)]" : "ds:text-[color:var(--primary)]", h = i ? "" : "ds:text-[color:var(--muted-foreground)]", v = i ? "" : "ds:text-[color:var(--foreground)]";
|
|
85
|
+
return /* @__PURE__ */ t(
|
|
86
86
|
"span",
|
|
87
87
|
{
|
|
88
88
|
ref: o,
|
|
89
89
|
role: "img",
|
|
90
90
|
"aria-label": `${s} by Alfadocs`.trim(),
|
|
91
|
-
className:
|
|
91
|
+
className: ha({ size: d, className: l }),
|
|
92
92
|
"data-component": "product-lockup",
|
|
93
93
|
...c,
|
|
94
94
|
children: [
|
|
95
95
|
/* @__PURE__ */ a(
|
|
96
|
-
|
|
96
|
+
ca,
|
|
97
97
|
{
|
|
98
98
|
"aria-hidden": !0,
|
|
99
|
-
className: `ds:inline-block ds:align-middle ds:me-[var(--spacing-sm)] ds:h-[calc(var(--lockup-unit)*0.88)] ds:w-auto ds:forced-colors:text-[CanvasText] ${
|
|
99
|
+
className: `ds:inline-block ds:align-middle ds:me-[var(--spacing-sm)] ds:h-[calc(var(--lockup-unit)*0.88)] ds:w-auto ds:forced-colors:text-[CanvasText] ${u}`
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
102
|
/* @__PURE__ */ a(
|
|
103
103
|
"span",
|
|
104
104
|
{
|
|
105
105
|
"aria-hidden": !0,
|
|
106
|
-
className: `ds:align-middle ds:[font-family:var(--font-serif)] ds:font-semibold ds:italic ds:leading-none ds:tracking-[0.01em] ${
|
|
106
|
+
className: `ds:align-middle ds:[font-family:var(--font-serif)] ds:font-semibold ds:italic ds:leading-none ds:tracking-[0.01em] ${f} ds:text-[calc(var(--lockup-unit)*0.95)]`,
|
|
107
107
|
children: s
|
|
108
108
|
}
|
|
109
109
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ t(
|
|
111
111
|
"span",
|
|
112
112
|
{
|
|
113
113
|
"aria-hidden": !0,
|
|
114
|
-
className: `ds:align-text-top ds:ms-[var(--spacing-sm)] ds:inline-flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ${
|
|
114
|
+
className: `ds:align-text-top ds:ms-[var(--spacing-sm)] ds:inline-flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ${h}`,
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ a("span", { className: "ds:text-[calc(var(--lockup-unit)*0.4)] ds:leading-none", children: "by" }),
|
|
117
117
|
/* @__PURE__ */ a(
|
|
118
|
-
|
|
118
|
+
la,
|
|
119
119
|
{
|
|
120
120
|
"aria-hidden": !0,
|
|
121
121
|
viewBox: "168 0 637 125",
|
|
@@ -129,21 +129,21 @@ const ca = u("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ma =
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ t(
|
|
133
133
|
"span",
|
|
134
134
|
{
|
|
135
135
|
ref: o,
|
|
136
136
|
role: "img",
|
|
137
137
|
"aria-label": `Alfadocs ${s}`.trim(),
|
|
138
|
-
className:
|
|
138
|
+
className: ua({ className: l }),
|
|
139
139
|
"data-component": "product-lockup",
|
|
140
140
|
...c,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ a(
|
|
143
|
-
|
|
143
|
+
oa,
|
|
144
144
|
{
|
|
145
145
|
variant: e ? "monochrome" : "wordmark",
|
|
146
|
-
tone:
|
|
146
|
+
tone: r,
|
|
147
147
|
size: d,
|
|
148
148
|
decorative: !0
|
|
149
149
|
}
|
|
@@ -152,7 +152,7 @@ const ca = u("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ma =
|
|
|
152
152
|
"span",
|
|
153
153
|
{
|
|
154
154
|
"aria-hidden": !0,
|
|
155
|
-
className:
|
|
155
|
+
className: fa({
|
|
156
156
|
size: d,
|
|
157
157
|
tone: e ? "solid" : "gradient"
|
|
158
158
|
}),
|
|
@@ -165,21 +165,21 @@ const ca = u("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ma =
|
|
|
165
165
|
}
|
|
166
166
|
);
|
|
167
167
|
g.displayName = "ProductLockup";
|
|
168
|
-
function
|
|
168
|
+
function ga(s) {
|
|
169
169
|
return s > 99 ? "99+" : String(s);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function va({
|
|
172
172
|
user: s,
|
|
173
173
|
labels: n,
|
|
174
174
|
onSignOut: e,
|
|
175
|
-
onToggleFullscreen:
|
|
175
|
+
onToggleFullscreen: r
|
|
176
176
|
}) {
|
|
177
|
-
const { t: d } =
|
|
177
|
+
const { t: d } = B(), l = n.fullscreen ?? d("marketplaceAppShell.settings.fullscreen");
|
|
178
178
|
return (
|
|
179
179
|
// Non-modal: an account menu shouldn't inert/aria-hide the whole shell
|
|
180
180
|
// behind it (which leaves the still-focusable chrome inside an
|
|
181
181
|
// aria-hidden region — an `aria-hidden-focus` violation).
|
|
182
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ t(m.Root, { modal: !1, children: [
|
|
183
183
|
/* @__PURE__ */ a(m.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
184
184
|
"button",
|
|
185
185
|
{
|
|
@@ -187,24 +187,24 @@ function fa({
|
|
|
187
187
|
"aria-label": n.accountMenu,
|
|
188
188
|
"data-testid": "marketplace-account-trigger",
|
|
189
189
|
className: "ds:inline-flex ds:items-center ds:justify-center ds:shrink-0 ds:size-10 ds:rounded-[var(--radius-full)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
190
|
-
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
190
|
+
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: /* @__PURE__ */ a(S, { name: s.name, src: s.avatarSrc, size: "md" }) })
|
|
191
191
|
}
|
|
192
192
|
) }),
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */ a(m.Label, { children: /* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
196
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ t(m.Content, { align: "end", collisionPadding: 16, children: [
|
|
194
|
+
/* @__PURE__ */ a(m.Label, { children: /* @__PURE__ */ t("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
195
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: /* @__PURE__ */ a(S, { name: s.name, src: s.avatarSrc, size: "sm" }) }),
|
|
196
|
+
/* @__PURE__ */ t("span", { className: "ds:flex ds:flex-col ds:min-w-0", children: [
|
|
197
197
|
/* @__PURE__ */ a("span", { className: "type-label ds:text-[color:var(--foreground)] ds:truncate", children: s.name }),
|
|
198
198
|
s.email ? /* @__PURE__ */ a("span", { className: "type-meta ds:truncate", children: s.email }) : null
|
|
199
199
|
] })
|
|
200
200
|
] }) }),
|
|
201
|
-
|
|
201
|
+
r ? /* @__PURE__ */ t(M, { children: [
|
|
202
202
|
/* @__PURE__ */ a(m.Separator, {}),
|
|
203
203
|
/* @__PURE__ */ a(
|
|
204
204
|
m.Item,
|
|
205
205
|
{
|
|
206
|
-
startIcon: /* @__PURE__ */ a(
|
|
207
|
-
onSelect:
|
|
206
|
+
startIcon: /* @__PURE__ */ a(ma, { "aria-hidden": !0 }),
|
|
207
|
+
onSelect: r,
|
|
208
208
|
"data-testid": "marketplace-fullscreen",
|
|
209
209
|
children: l
|
|
210
210
|
}
|
|
@@ -214,7 +214,7 @@ function fa({
|
|
|
214
214
|
/* @__PURE__ */ a(
|
|
215
215
|
m.Item,
|
|
216
216
|
{
|
|
217
|
-
startIcon: /* @__PURE__ */ a(
|
|
217
|
+
startIcon: /* @__PURE__ */ a(pa, { "aria-hidden": !0 }),
|
|
218
218
|
onSelect: e,
|
|
219
219
|
"data-testid": "marketplace-sign-out",
|
|
220
220
|
children: n.signOut
|
|
@@ -224,22 +224,22 @@ function fa({
|
|
|
224
224
|
] })
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function xa({
|
|
228
228
|
nav: s,
|
|
229
229
|
renderLink: n
|
|
230
230
|
}) {
|
|
231
|
-
return /* @__PURE__ */ a(
|
|
232
|
-
const
|
|
233
|
-
e.icon ? /* @__PURE__ */ a(
|
|
234
|
-
/* @__PURE__ */ a(
|
|
235
|
-
|
|
231
|
+
return /* @__PURE__ */ a(ea, { children: s.map((e) => {
|
|
232
|
+
const r = typeof e.badgeCount == "number" && e.badgeCount > 0 ? e.badgeCount : void 0, d = /* @__PURE__ */ t(M, { children: [
|
|
233
|
+
e.icon ? /* @__PURE__ */ a(sa, { children: e.icon }) : null,
|
|
234
|
+
/* @__PURE__ */ a(ra, { children: e.label }),
|
|
235
|
+
r !== void 0 ? /* @__PURE__ */ a(ta, { children: ga(r) }) : null
|
|
236
236
|
] });
|
|
237
|
-
return n ? /* @__PURE__ */ a(
|
|
237
|
+
return n ? /* @__PURE__ */ a(I, { asChild: !0, isActive: e.isActive, children: n({
|
|
238
238
|
href: e.href,
|
|
239
239
|
children: d,
|
|
240
240
|
"aria-current": e.isActive ? "page" : void 0
|
|
241
241
|
}) }, e.id) : /* @__PURE__ */ a(
|
|
242
|
-
|
|
242
|
+
I,
|
|
243
243
|
{
|
|
244
244
|
href: e.href,
|
|
245
245
|
"aria-label": e.label,
|
|
@@ -251,7 +251,7 @@ function ha({
|
|
|
251
251
|
);
|
|
252
252
|
}) });
|
|
253
253
|
}
|
|
254
|
-
const
|
|
254
|
+
const T = p("ds:bg-[color:var(--app-shell-background)]", {
|
|
255
255
|
variants: {
|
|
256
256
|
variant: {
|
|
257
257
|
standalone: "",
|
|
@@ -264,42 +264,43 @@ const I = u("ds:bg-[color:var(--app-shell-background)]", {
|
|
|
264
264
|
},
|
|
265
265
|
defaultVariants: { variant: "standalone" }
|
|
266
266
|
});
|
|
267
|
-
function
|
|
267
|
+
function ba({
|
|
268
268
|
nav: s,
|
|
269
269
|
ariaLabel: n,
|
|
270
270
|
renderLink: e
|
|
271
271
|
}) {
|
|
272
|
-
const
|
|
272
|
+
const r = e ? ({
|
|
273
273
|
href: d,
|
|
274
274
|
className: l,
|
|
275
275
|
children: c,
|
|
276
276
|
"aria-current": o
|
|
277
277
|
}) => e({ href: d, className: l, children: c, "aria-current": o }) : void 0;
|
|
278
278
|
return /* @__PURE__ */ a(
|
|
279
|
-
|
|
279
|
+
q,
|
|
280
280
|
{
|
|
281
281
|
items: s,
|
|
282
282
|
ariaLabel: n,
|
|
283
|
-
...
|
|
283
|
+
...r ? { renderLink: r } : {}
|
|
284
284
|
}
|
|
285
285
|
);
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const ka = b(
|
|
288
288
|
({
|
|
289
289
|
productName: s,
|
|
290
290
|
productHref: n = "/",
|
|
291
291
|
nav: e,
|
|
292
|
-
renderLink:
|
|
292
|
+
renderLink: r,
|
|
293
293
|
user: d,
|
|
294
294
|
labels: l,
|
|
295
295
|
onSignOut: c,
|
|
296
296
|
onToggleFullscreen: o,
|
|
297
297
|
sidebarState: i,
|
|
298
|
-
|
|
298
|
+
collapsibleSidebar: u = !1,
|
|
299
|
+
mainAriaLabel: f,
|
|
299
300
|
variant: h = "standalone",
|
|
300
|
-
children:
|
|
301
|
-
},
|
|
302
|
-
const { t: x } =
|
|
301
|
+
children: v
|
|
302
|
+
}, k) => {
|
|
303
|
+
const { t: x } = B(), H = r ? /* @__PURE__ */ a(A, { asChild: !0, children: r({
|
|
303
304
|
href: n,
|
|
304
305
|
children: /* @__PURE__ */ a(
|
|
305
306
|
g,
|
|
@@ -311,7 +312,7 @@ const va = b(
|
|
|
311
312
|
}
|
|
312
313
|
)
|
|
313
314
|
}) }) : /* @__PURE__ */ a(
|
|
314
|
-
|
|
315
|
+
A,
|
|
315
316
|
{
|
|
316
317
|
href: n,
|
|
317
318
|
logo: /* @__PURE__ */ a(
|
|
@@ -324,22 +325,22 @@ const va = b(
|
|
|
324
325
|
}
|
|
325
326
|
)
|
|
326
327
|
}
|
|
327
|
-
), { theme: L, accessibility: V, resolvedTheme:
|
|
328
|
-
|
|
328
|
+
), { theme: L, accessibility: V, resolvedTheme: y } = ia(), j = L !== "system" || V !== "system", $ = y.startsWith("dark") ? "dark" : "light", O = y.endsWith("-accessible"), [R, N] = E(!1), W = /* @__PURE__ */ a(da, { children: /* @__PURE__ */ a(
|
|
329
|
+
D,
|
|
329
330
|
{
|
|
330
|
-
mainAriaLabel:
|
|
331
|
-
mainClassName:
|
|
332
|
-
header: /* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */ a(
|
|
335
|
-
/* @__PURE__ */ a(
|
|
336
|
-
|
|
331
|
+
mainAriaLabel: f,
|
|
332
|
+
mainClassName: T({ variant: "standalone" }),
|
|
333
|
+
header: /* @__PURE__ */ t(G, { children: [
|
|
334
|
+
/* @__PURE__ */ t(J, { children: [
|
|
335
|
+
/* @__PURE__ */ a(z, { href: "#main-content" }),
|
|
336
|
+
/* @__PURE__ */ a(K, { onMenuOpen: () => N(!0) }),
|
|
337
|
+
H
|
|
337
338
|
] }),
|
|
338
|
-
/* @__PURE__ */ a(
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */ a(
|
|
339
|
+
/* @__PURE__ */ a(Q, {}),
|
|
340
|
+
/* @__PURE__ */ t(U, { children: [
|
|
341
|
+
/* @__PURE__ */ a(X, { size: "sm" }),
|
|
341
342
|
/* @__PURE__ */ a(
|
|
342
|
-
|
|
343
|
+
va,
|
|
343
344
|
{
|
|
344
345
|
user: d,
|
|
345
346
|
labels: l,
|
|
@@ -349,30 +350,33 @@ const va = b(
|
|
|
349
350
|
)
|
|
350
351
|
] })
|
|
351
352
|
] }),
|
|
352
|
-
sidebar: /* @__PURE__ */
|
|
353
|
-
|
|
353
|
+
sidebar: /* @__PURE__ */ t(
|
|
354
|
+
Z,
|
|
354
355
|
{
|
|
355
356
|
...i !== void 0 ? { state: i } : { defaultState: "expanded" },
|
|
356
|
-
open:
|
|
357
|
-
onOpenChange:
|
|
357
|
+
open: R,
|
|
358
|
+
onOpenChange: N,
|
|
358
359
|
"aria-label": x("navigation.sidebar.label"),
|
|
359
360
|
"data-testid": "marketplace-app-shell-sidebar",
|
|
360
|
-
children:
|
|
361
|
+
children: [
|
|
362
|
+
u && i === void 0 ? /* @__PURE__ */ a(_, { className: "ds:justify-end", children: /* @__PURE__ */ a(aa, {}) }) : null,
|
|
363
|
+
/* @__PURE__ */ a(xa, { nav: e, renderLink: r })
|
|
364
|
+
]
|
|
361
365
|
}
|
|
362
366
|
),
|
|
363
|
-
children:
|
|
367
|
+
children: v
|
|
364
368
|
}
|
|
365
|
-
) }),
|
|
369
|
+
) }), P = (
|
|
366
370
|
// The shell owns the warm-grey canvas; TabBar's strip is transparent and
|
|
367
371
|
// floats its pill on it, and `<main>` continues the same surface.
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */ a(
|
|
372
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:min-h-dvh ds:flex-col ds:bg-[color:var(--app-shell-background)]", children: [
|
|
373
|
+
/* @__PURE__ */ a(z, { href: "#main-content" }),
|
|
370
374
|
/* @__PURE__ */ a(
|
|
371
|
-
|
|
375
|
+
ba,
|
|
372
376
|
{
|
|
373
377
|
nav: e,
|
|
374
378
|
ariaLabel: x("navigation.sidebar.label"),
|
|
375
|
-
renderLink:
|
|
379
|
+
renderLink: r
|
|
376
380
|
}
|
|
377
381
|
),
|
|
378
382
|
/* @__PURE__ */ a(
|
|
@@ -380,36 +384,36 @@ const va = b(
|
|
|
380
384
|
{
|
|
381
385
|
id: "main-content",
|
|
382
386
|
tabIndex: -1,
|
|
383
|
-
"aria-label":
|
|
384
|
-
className:
|
|
385
|
-
children:
|
|
387
|
+
"aria-label": f ?? x("navigation.main.label", "Main content"),
|
|
388
|
+
className: T({ variant: "embedded" }),
|
|
389
|
+
children: v
|
|
386
390
|
}
|
|
387
391
|
)
|
|
388
392
|
] })
|
|
389
|
-
),
|
|
390
|
-
return
|
|
391
|
-
|
|
393
|
+
), C = h === "embedded" ? P : W;
|
|
394
|
+
return j ? /* @__PURE__ */ a(
|
|
395
|
+
na,
|
|
392
396
|
{
|
|
393
|
-
ref:
|
|
397
|
+
ref: k,
|
|
394
398
|
theme: $,
|
|
395
|
-
accessible:
|
|
399
|
+
accessible: O,
|
|
396
400
|
className: "ds:contents",
|
|
397
401
|
"data-component": "marketplace-app-shell",
|
|
398
|
-
children:
|
|
402
|
+
children: C
|
|
399
403
|
}
|
|
400
404
|
) : /* @__PURE__ */ a(
|
|
401
405
|
"div",
|
|
402
406
|
{
|
|
403
|
-
ref:
|
|
407
|
+
ref: k,
|
|
404
408
|
className: "ds:contents",
|
|
405
409
|
"data-component": "marketplace-app-shell",
|
|
406
|
-
children:
|
|
410
|
+
children: C
|
|
407
411
|
}
|
|
408
412
|
);
|
|
409
413
|
}
|
|
410
414
|
);
|
|
411
|
-
|
|
412
|
-
const
|
|
415
|
+
ka.displayName = "MarketplaceAppShell";
|
|
416
|
+
const ya = p(
|
|
413
417
|
"ds:flex ds:min-h-dvh ds:bg-[color:var(--app-shell-background)]",
|
|
414
418
|
{
|
|
415
419
|
variants: {
|
|
@@ -420,7 +424,7 @@ const xa = u(
|
|
|
420
424
|
},
|
|
421
425
|
defaultVariants: { layout: "card" }
|
|
422
426
|
}
|
|
423
|
-
),
|
|
427
|
+
), Na = p("ds:w-full", {
|
|
424
428
|
variants: {
|
|
425
429
|
layout: {
|
|
426
430
|
card: "ds:max-w-[400px]",
|
|
@@ -428,37 +432,37 @@ const xa = u(
|
|
|
428
432
|
}
|
|
429
433
|
},
|
|
430
434
|
defaultVariants: { layout: "card" }
|
|
431
|
-
}),
|
|
435
|
+
}), Ca = p("", {
|
|
432
436
|
variants: {
|
|
433
437
|
layout: { card: "", split: "ds:lg:hidden" }
|
|
434
438
|
},
|
|
435
439
|
defaultVariants: { layout: "card" }
|
|
436
|
-
}),
|
|
440
|
+
}), Sa = b(
|
|
437
441
|
({
|
|
438
442
|
productName: s,
|
|
439
443
|
title: n,
|
|
440
444
|
description: e,
|
|
441
|
-
connectLabel:
|
|
445
|
+
connectLabel: r,
|
|
442
446
|
status: d = "idle",
|
|
443
447
|
error: l,
|
|
444
448
|
onConnect: c,
|
|
445
449
|
footer: o,
|
|
446
450
|
layout: i = "card",
|
|
447
|
-
brandPanel:
|
|
448
|
-
className:
|
|
449
|
-
},
|
|
451
|
+
brandPanel: u,
|
|
452
|
+
className: f
|
|
453
|
+
}, h) => /* @__PURE__ */ t(
|
|
450
454
|
"div",
|
|
451
455
|
{
|
|
452
|
-
ref:
|
|
456
|
+
ref: h,
|
|
453
457
|
"data-component": "connect-with-alfadocs",
|
|
454
|
-
className: `${
|
|
458
|
+
className: `${ya({ layout: i })} ${f ?? ""}`,
|
|
455
459
|
children: [
|
|
456
460
|
i === "split" ? (
|
|
457
461
|
// Desktop brand panel (lg+ only): a bold `--primary` surface with the
|
|
458
462
|
// monochrome lockup riding the `--primary-foreground` ink, plus an
|
|
459
463
|
// optional `brandPanel` slot. Decorative — the card carries the real
|
|
460
464
|
// heading + CTA, and shows its own lockup below `lg:`.
|
|
461
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:flex ds:lg:w-[55%] ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:ps-[var(--spacing-2xl)] ds:pe-[var(--spacing-2xl)] ds:pt-[var(--spacing-2xl)] ds:pb-[var(--spacing-2xl)] ds:text-start", children: [
|
|
462
466
|
/* @__PURE__ */ a(
|
|
463
467
|
g,
|
|
464
468
|
{
|
|
@@ -469,32 +473,32 @@ const xa = u(
|
|
|
469
473
|
variant: "maker"
|
|
470
474
|
}
|
|
471
475
|
),
|
|
472
|
-
|
|
476
|
+
u ? /* @__PURE__ */ a("div", { className: "type-body ds:max-w-[28rem] ds:text-start", children: u }) : null
|
|
473
477
|
] })
|
|
474
478
|
) : null,
|
|
475
|
-
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(w, { className:
|
|
479
|
+
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(w, { className: Na({ layout: i }), children: /* @__PURE__ */ t(w.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center", children: [
|
|
476
480
|
/* @__PURE__ */ a(
|
|
477
481
|
g,
|
|
478
482
|
{
|
|
479
483
|
name: s,
|
|
480
484
|
size: "lg",
|
|
481
485
|
variant: "maker",
|
|
482
|
-
className:
|
|
486
|
+
className: Ca({ layout: i })
|
|
483
487
|
}
|
|
484
488
|
),
|
|
485
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
486
490
|
/* @__PURE__ */ a("h1", { className: "type-title-card", children: n }),
|
|
487
491
|
/* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: e })
|
|
488
492
|
] }),
|
|
489
|
-
d === "error" && l ? /* @__PURE__ */ a(
|
|
493
|
+
d === "error" && l ? /* @__PURE__ */ a(F, { variant: "error", className: "ds:w-full ds:text-start", children: l }) : null,
|
|
490
494
|
/* @__PURE__ */ a(
|
|
491
|
-
|
|
495
|
+
Y,
|
|
492
496
|
{
|
|
493
497
|
intent: "primary",
|
|
494
498
|
className: "ds:w-full",
|
|
495
499
|
loading: d === "connecting",
|
|
496
500
|
onClick: c,
|
|
497
|
-
label:
|
|
501
|
+
label: r,
|
|
498
502
|
"data-testid": "connect-with-alfadocs-button"
|
|
499
503
|
}
|
|
500
504
|
),
|
|
@@ -504,10 +508,10 @@ const xa = u(
|
|
|
504
508
|
}
|
|
505
509
|
)
|
|
506
510
|
);
|
|
507
|
-
|
|
511
|
+
Sa.displayName = "ConnectWithAlfadocs";
|
|
508
512
|
export {
|
|
509
|
-
|
|
510
|
-
|
|
513
|
+
Sa as C,
|
|
514
|
+
ka as M,
|
|
511
515
|
g as P
|
|
512
516
|
};
|
|
513
|
-
//# sourceMappingURL=marketplace-app-shell-
|
|
517
|
+
//# sourceMappingURL=marketplace-app-shell-DX5aLeIJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-app-shell-DX5aLeIJ.js","sources":["../../src/brand/product-lockup/product-lockup.tsx","../../src/patterns/marketplace-app-shell/marketplace-app-shell.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Logo } from '../../components/logo/logo';\nimport { AlfadocsLogoMark, AlfadocsLogoNeg } from '../logo-asset';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\n// Outer lockup row. ~4px logical gap between the wordmark and the product\n// name (`--spacing-xs`), centre-aligned so the name's cap height sits\n// against the wordmark's letterforms.\nconst lockup = cva('ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]');\n\n// The product name. Marketing serif (Fraunces, `--font-serif`) — permitted\n// here because this file lives under `src/brand/`, never in `src/components/`\n// or `src/patterns/` (constraint 10). Sized to ~95% of the wordmark height so\n// its cap height matches the logo letterforms across every size and theme\n// (the `--logo-size-*` tokens shift up in the accessible themes; the calc\n// keeps the name proportional for free).\nconst productName = cva(\n [\n 'ds:[font-family:var(--font-serif)]',\n 'ds:font-semibold',\n 'ds:leading-none',\n 'ds:tracking-[0.01em]',\n 'ds:whitespace-nowrap',\n // Forced-colors: drop the transparent text-fill and paint the label\n // as solid CanvasText so it never disappears under Windows HCM —\n // a gradient/transparent fill has no meaning there.\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:forced-colors:[-webkit-text-fill-color:CanvasText]',\n ],\n {\n variants: {\n size: {\n sm: 'ds:text-[calc(var(--logo-size-sm)*0.95)]',\n md: 'ds:text-[calc(var(--logo-size-md)*0.95)]',\n lg: 'ds:text-[calc(var(--logo-size-lg)*0.95)]',\n xl: 'ds:text-[calc(var(--logo-size-xl)*0.95)]',\n },\n tone: {\n // Brand gradient filled into the glyphs via background-clip:text.\n // `--gradient-wordmark` rides the theme aliases, so it stays\n // AA-safe and adapts per theme on its own (and flattens to a solid\n // ink in the accessible / forced-colors blocks — see tokens).\n gradient: [\n 'ds:italic',\n 'ds:bg-[image:var(--gradient-wordmark)]',\n 'ds:bg-clip-text',\n 'ds:text-transparent',\n 'ds:[-webkit-text-fill-color:transparent]',\n ],\n // Monochrome: solid currentColor ink, upright, no gradient — for\n // print, single-colour work, and coloured chrome (e.g. app-shell\n // headers) where the lockup must ride the surrounding ink.\n solid: 'ds:text-current',\n },\n },\n defaultVariants: { size: 'md', tone: 'gradient' },\n },\n);\n\n// Maker lockup root. Sets a single `--lockup-unit` custom property to the\n// matching `--logo-size-*` token; every maker sub-element (mark, name, the\n// \"by Alfadocs\" tag) sizes off `var(--lockup-unit)`, so there's one per-size\n// source of truth that shifts up with the accessible themes for free.\n// `whitespace-nowrap` keeps \"[mark] Name by Alfadocs\" on one line.\nconst makerRoot = cva('ds:whitespace-nowrap', {\n variants: {\n size: {\n sm: 'ds:[--lockup-unit:var(--logo-size-sm)]',\n md: 'ds:[--lockup-unit:var(--logo-size-md)]',\n lg: 'ds:[--lockup-unit:var(--logo-size-lg)]',\n xl: 'ds:[--lockup-unit:var(--logo-size-xl)]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\ntype LockupSize = NonNullable<VariantProps<typeof productName>['size']>;\n\nexport type ProductLockupProps = {\n /**\n * The product name. Passed verbatim (product names are not translated).\n *\n * - `variant=\"standard\"` (default): renders as \"Alfadocs <name>\" with the\n * wordmark; accessible name is `Alfadocs <name>`.\n * - `variant=\"maker\"`: renders as \"[mark] <name> by Alfadocs\"; accessible\n * name is `<name> by Alfadocs`.\n */\n name: string;\n /**\n * Which lockup composition to use.\n *\n * - `'standard'` (default) — Alfadocs wordmark + product name (\"Alfadocs\n * Builders\"). Use for **internal** Alfadocs products (Alfadocs Builders,\n * Alfadocs API) where the product is part of the Alfadocs family.\n * - `'maker'` — \"<name> by Alfadocs\" with the four-pillar mark and the name\n * as the prominent element. Use for **external** marketplace extensions\n * (\"Scribe by Alfadocs\") where the extension's own name leads and\n * \"by Alfadocs\" is the maker attribution.\n */\n variant?: 'standard' | 'maker';\n /**\n * Render the name as a solid `--foreground` ink, upright (no gradient, no\n * italic), and pair it with the monochrome wordmark. Use for print,\n * single-colour reproductions, or any constrained context where the\n * gradient/serif treatment is inappropriate.\n */\n monochrome?: boolean;\n /**\n * Ink resolution. `'auto'` (default) uses the lockup's intended ink\n * (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride\n * `currentColor` — use it with `monochrome` on a coloured brand surface (a\n * tinted header or split-login panel) so the wordmark + name both take the\n * surface's text colour rather than clashing with a fixed `--foreground`.\n */\n tone?: 'auto' | 'inherit';\n /** Lockup size. Drives both the wordmark and the name's cap height. */\n size?: LockupSize;\n className?: string;\n} & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'role' | 'aria-label' | 'aria-hidden' | 'children' | 'className'\n>;\n\n/* ------------------------------------------------------------------ */\n/* ProductLockup */\n/* ------------------------------------------------------------------ */\n\n/**\n * Pairs a product name with the Alfadocs brand. Two compositions:\n *\n * - `variant=\"standard\"` (default) — the Alfadocs wordmark + product name\n * (\"Alfadocs Builders\"). For internal Alfadocs products. Exposed to\n * assistive tech as a single `img` named `Alfadocs <name>`.\n * - `variant=\"maker\"` — \"[mark] <name> by Alfadocs\". For external marketplace\n * extensions where the extension's name leads. Exposed as a single `img`\n * named `<name> by Alfadocs`.\n *\n * In both cases the inner wordmark/mark and the visible name are decorative so\n * the brand isn't announced twice. Every marketplace app should use this\n * rather than hand-rolling a wordmark + typed span.\n */\nexport const ProductLockup = forwardRef<HTMLSpanElement, ProductLockupProps>(\n (\n {\n name,\n variant = 'standard',\n monochrome = false,\n tone = 'auto',\n size = 'md',\n className,\n ...props\n },\n ref,\n ) => {\n if (import.meta.env.DEV && !name.trim()) {\n console.warn(\n '[ProductLockup] `name` is empty — the lockup will render the bare wordmark with no product name. Pass the product name (e.g. \"Builders\").',\n );\n }\n\n if (variant === 'maker') {\n // Ink matrix mirrors the standard variant's tone/monochrome model:\n // - tone=\"inherit\": every element rides currentColor (no explicit ink),\n // for coloured surfaces.\n // - monochrome (tone auto): foreground ink, with the attribution muted.\n // - default (colour, tone auto): the name + mark take --primary; the\n // wordmark lettering stays --foreground; the attribution is muted.\n const inherit = tone === 'inherit';\n const markInk = inherit\n ? ''\n : monochrome\n ? 'ds:text-[color:var(--foreground)]'\n : 'ds:text-[color:var(--primary)]';\n const nameInk = inherit\n ? ''\n : monochrome\n ? 'ds:text-[color:var(--foreground)]'\n : 'ds:text-[color:var(--primary)]';\n const byInk = inherit ? '' : 'ds:text-[color:var(--muted-foreground)]';\n const letteringInk = inherit ? '' : 'ds:text-[color:var(--foreground)]';\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={`${name} by Alfadocs`.trim()}\n className={makerRoot({ size, className })}\n data-component=\"product-lockup\"\n {...props}\n >\n {/* Pillar mark sized close to the app name (≈0.88 of the serif em),\n vertically centred on it. Inline (not flex) so the maker tag can\n use vertical-align. */}\n <AlfadocsLogoMark\n aria-hidden\n className={`ds:inline-block ds:align-middle ds:me-[var(--spacing-sm)] ds:h-[calc(var(--lockup-unit)*0.88)] ds:w-auto ds:forced-colors:text-[CanvasText] ${markInk}`}\n />\n <span\n aria-hidden\n className={`ds:align-middle ds:[font-family:var(--font-serif)] ds:font-semibold ds:italic ds:leading-none ds:tracking-[0.01em] ${nameInk} ds:text-[calc(var(--lockup-unit)*0.95)]`}\n >\n {name}\n </span>\n {/* Maker tag — superscript style, its top aligned to the app name's\n cap-height via vertical-align: text-top. */}\n <span\n aria-hidden\n className={`ds:align-text-top ds:ms-[var(--spacing-sm)] ds:inline-flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ${byInk}`}\n >\n <span className=\"ds:text-[calc(var(--lockup-unit)*0.4)] ds:leading-none\">\n by\n </span>\n {/* Real Alfadocs wordmark SVG. The Neg SVG's first <g> is the\n \"Alfadocs\" lettering; the second <g> is the four-pillar mark\n (x≈3–146). viewBox=\"168 0 637 125\" windows to the lettering\n only — no mark, no hand-typed wordmark. */}\n <AlfadocsLogoNeg\n aria-hidden\n viewBox=\"168 0 637 125\"\n className={`ds:h-[calc(var(--lockup-unit)*0.45)] ds:w-auto ds:forced-colors:text-[CanvasText] ${letteringInk}`}\n />\n </span>\n </span>\n );\n }\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={`Alfadocs ${name}`.trim()}\n className={lockup({ className })}\n data-component=\"product-lockup\"\n {...props}\n >\n <Logo\n variant={monochrome ? 'monochrome' : 'wordmark'}\n tone={tone}\n size={size}\n decorative\n />\n <span\n aria-hidden\n className={productName({\n size,\n tone: monochrome ? 'solid' : 'gradient',\n })}\n >\n {name}\n </span>\n </span>\n );\n },\n);\nProductLockup.displayName = 'ProductLockup';\n","/**\n * Marketplace App Shell — the standard chrome for an app built on top of\n * AlfaDocs (the kind a partner scaffolds with Claude Code, Lovable, etc.).\n *\n * It is a thin, opinionated composition of kit primitives: an `AppFrame` with\n * a branded `Header` (the maker `ProductLockup` — \"<Product> by Alfadocs\" —\n * rendered `monochrome` so it rides the header's ink; maker is the lockup\n * style for external marketplace extensions), a `Sidebar` for app\n * navigation, `HeaderSettings` (theme/locale/accessibility), and a bare-avatar\n * account menu (fullscreen + sign-out) matching the main app shell.\n * `ConnectWithAlfadocs` is the matching pre-auth screen, with the full-colour\n * maker lockup and `SignInWithAlfadocsButton`.\n *\n * Like `AliaSidebar`, this pattern ships a RUNTIME component (surfaced via\n * `src/patterns/index.ts` and the library bundle) because consuming apps mount\n * it in production rather than copying the source.\n *\n * Auth is intentionally decoupled: the shell takes the signed-in `user` and an\n * `onSignOut` callback as props, and `ConnectWithAlfadocs` takes a `status` +\n * `onConnect`. Wire them to `@alfadocs/auth/react`'s `useAlfadocsAuth()` in the\n * consuming app — the kit never touches OAuth or secrets (those live in the\n * server-side `@alfadocs/auth` BFF).\n *\n * All user-visible copy is consumer-provided (props) so each app localises in\n * its own i18n; the only kit-owned strings reuse existing translated `ui.*`\n * keys (sidebar label, skip link, menu button).\n */\nimport { forwardRef, useState, type MouseEvent, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport { LogOut, Maximize2 } from 'lucide-react';\n\nimport { AppFrame } from '../../components/app-frame';\nimport { Avatar } from '../../components/avatar';\nimport { Alert } from '../../components/alert';\nimport { Card } from '../../components/card';\nimport { DropdownMenu } from '../../components/dropdown-menu';\nimport { TabBar } from '../../components/tab-bar';\nimport {\n Header,\n HeaderBrand,\n HeaderCenter,\n HeaderEnd,\n HeaderMenuButton,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { HeaderSettings } from '../../components/header-settings';\nimport { ProductLockup } from '../../brand/product-lockup';\nimport { SignInWithAlfadocsButton } from '../../components/sign-in-with-alfadocs-button';\nimport {\n Sidebar,\n SidebarBody,\n SidebarCollapseTrigger,\n SidebarHeader,\n SidebarItem,\n SidebarItemBadge,\n SidebarItemIcon,\n SidebarItemLabel,\n type SidebarMode,\n} from '../../components/sidebar';\nimport { ThemeRoot } from '../../components/theme-root';\nimport { TooltipProvider } from '../../components/tooltip';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\nexport interface MarketplaceNavItem {\n id: string;\n /** Pre-translated label — apps localise their own nav copy. */\n label: string;\n href: string;\n /** Optional leading icon (a lucide-react element or equivalent). */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the item as the current page (`aria-current='page'`). */\n isActive?: boolean;\n /**\n * Optional click handler threaded onto the nav link's `<a>`. The lightweight\n * alternative to `renderLink`: intercept a same-origin click (call\n * `event.preventDefault()`) and route client-side without a full page load —\n * no router `<Link>` needed. Applies to both the standalone sidebar item and\n * the embedded tab. When `renderLink` is supplied it's handed through to the\n * consumer's link element instead.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the shell hands to `renderLink` for each nav item. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the kit's\n * active styling) and `aria-current` (`'page'` on the active item) so a tab /\n * sidebar-item click is a client-side route change, not a full page reload.\n */\nexport interface MarketplaceRenderLinkProps {\n /** The item's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's classes — apply verbatim to the link element. */\n className?: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active item, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n}\n\n/**\n * Render a nav item through the consumer's router instead of the kit's own\n * `<a>`. Returned by the consumer; the shell forwards `href`, the kit's\n * `className`, the item children, and `aria-current` so the active styling and\n * the `aria-current=\"page\"` marker survive a client-side route change.\n */\nexport type MarketplaceRenderLink = (\n props: MarketplaceRenderLinkProps,\n) => ReactNode;\n\nexport interface MarketplaceAppUser {\n /** Display name — drives the avatar initials + the account-menu header. */\n name: string;\n /** Optional email shown under the name in the account menu. */\n email?: string;\n /** Optional avatar image URL. */\n avatarSrc?: string;\n}\n\nexport interface MarketplaceAppShellLabels {\n /** Accessible name for the account-menu trigger, e.g. \"Account menu\". */\n accountMenu: string;\n /** The sign-out menu item, e.g. \"Sign out\". */\n signOut: string;\n /**\n * Optional fullscreen menu item label, e.g. \"Toggle fullscreen\". The item\n * renders whenever `onToggleFullscreen` is supplied; when this label is\n * omitted it falls back to the translated `ui.*` \"Toggle fullscreen\" string.\n */\n fullscreen?: string;\n}\n\nexport interface MarketplaceAppShellProps {\n /** Extension name — renders as the maker lockup \"<productName> by Alfadocs\". */\n productName: string;\n /** Link target for the brand lockup. Default `'/'`. */\n productHref?: string;\n /** Sidebar nav items, in order. */\n nav: MarketplaceNavItem[];\n /**\n * Render nav items (and the brand lockup) through the consumer's router so a\n * tab / item click is a client-side route change with **no full-page reload\n * or session flash**. Wire it to your router's `<Link>`:\n *\n * ```tsx\n * import { Link } from '@tanstack/react-router';\n * <MarketplaceAppShell\n * nav={nav}\n * renderLink={({ href, className, children, ...rest }) => (\n * <Link to={href} className={className} {...rest}>{children}</Link>\n * )}\n * />\n * ```\n *\n * Threaded to the standalone sidebar items, the embedded top tab strip, and\n * the brand lockup. The kit forwards the same `className` + `aria-current` so\n * the active styling and the `aria-current=\"page\"` marker survive in both\n * modes. Omit it to render the plain `<a href>` exactly as before — non-routed\n * consumers are byte-for-byte unaffected. A per-item `onClick` (a\n * click-interceptor shim) is the lighter alternative when you don't want to\n * thread a router `<Link>`.\n */\n renderLink?: MarketplaceRenderLink;\n /** The signed-in user shown in the account menu. */\n user: MarketplaceAppUser;\n /** Consumer-localised chrome labels owned by the shell. */\n labels: MarketplaceAppShellLabels;\n /** Fires when the user picks \"Sign out\". Wire to `useAlfadocsAuth().signOut`. */\n onSignOut?: () => void;\n /** Fires when the user toggles fullscreen. Omit to hide the fullscreen item. */\n onToggleFullscreen?: () => void;\n /**\n * Force the sidebar into a specific mode. Apps typically flip to `'overlay'`\n * on narrow viewports and leave this undefined elsewhere (defaults to\n * `'expanded'`).\n */\n sidebarState?: SidebarMode;\n /**\n * Render a collapse/expand toggle in the sidebar header, letting the user\n * shrink the standalone sidebar to an icon rail. The chosen mode persists\n * per-user (the underlying `Sidebar` stores it) and survives reloads. Opt-in\n * so existing consumers are unaffected; ignored when `sidebarState` forces a\n * mode or in the `'embedded'` variant (no sidebar). @default false\n */\n collapsibleSidebar?: boolean;\n /** Override the accessible name of the `<main>` landmark. */\n mainAriaLabel?: string;\n /**\n * Chrome variant. `'standalone'` (default) renders the full shell — branded\n * Header, Sidebar, and account menu. `'embedded'` is for apps running INSIDE\n * the AlfaDocs platform iframe (consumers detect this with\n * `window !== window.top`): it drops the Header, Sidebar, account menu, and\n * product lockup — the platform already brands and identifies the session\n * around the iframe — and renders the `nav` items as a single slim top tab\n * strip. `onSignOut`, `onToggleFullscreen`, `productName`, `productHref`, and\n * `sidebarState` are ignored in `'embedded'`; the `<main>` landmark,\n * `mainAriaLabel`, and the skip link are kept.\n */\n variant?: 'standalone' | 'embedded';\n /** Children render inside the main content region. */\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Internals */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\nfunction AccountMenu({\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n}: {\n user: MarketplaceAppUser;\n labels: MarketplaceAppShellLabels;\n onSignOut?: () => void;\n onToggleFullscreen?: () => void;\n}) {\n const { t } = useTranslation();\n // Default to the translated `ui.*` label so a consumer that wires\n // `onToggleFullscreen` but omits the label still gets a localised item.\n const fullscreenLabel =\n labels.fullscreen ?? t('marketplaceAppShell.settings.fullscreen');\n return (\n // Non-modal: an account menu shouldn't inert/aria-hide the whole shell\n // behind it (which leaves the still-focusable chrome inside an\n // aria-hidden region — an `aria-hidden-focus` violation).\n <DropdownMenu.Root modal={false}>\n <DropdownMenu.Trigger asChild>\n {/* Bare avatar circle — matches the main app shell's account\n trigger. The name lives inside the menu, not beside the avatar. */}\n <button\n type=\"button\"\n aria-label={labels.accountMenu}\n data-testid=\"marketplace-account-trigger\"\n className=\"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0 ds:size-10 ds:rounded-[var(--radius-full)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]\"\n >\n <span aria-hidden=\"true\">\n <Avatar name={user.name} src={user.avatarSrc} size=\"md\" />\n </span>\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" collisionPadding={16}>\n {/* GitHub-style identity header — small avatar + name + secondary\n line, matching the main app shell's account menu. */}\n <DropdownMenu.Label>\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span aria-hidden=\"true\">\n <Avatar name={user.name} src={user.avatarSrc} size=\"sm\" />\n </span>\n <span className=\"ds:flex ds:flex-col ds:min-w-0\">\n <span className=\"type-label ds:text-[color:var(--foreground)] ds:truncate\">\n {user.name}\n </span>\n {user.email ? (\n <span className=\"type-meta ds:truncate\">{user.email}</span>\n ) : null}\n </span>\n </span>\n </DropdownMenu.Label>\n {onToggleFullscreen ? (\n <>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<Maximize2 aria-hidden />}\n onSelect={onToggleFullscreen}\n data-testid=\"marketplace-fullscreen\"\n >\n {fullscreenLabel}\n </DropdownMenu.Item>\n </>\n ) : null}\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<LogOut aria-hidden />}\n onSelect={onSignOut}\n data-testid=\"marketplace-sign-out\"\n >\n {labels.signOut}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nfunction MarketplaceSidebarNav({\n nav,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n renderLink?: MarketplaceRenderLink;\n}) {\n return (\n <SidebarBody>\n {nav.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const inner = (\n <>\n {item.icon ? <SidebarItemIcon>{item.icon}</SidebarItemIcon> : null}\n <SidebarItemLabel>{item.label}</SidebarItemLabel>\n {badge !== undefined ? (\n <SidebarItemBadge>{formatBadgeCount(badge)}</SidebarItemBadge>\n ) : null}\n </>\n );\n\n // Consumer-router mode: render the item through Radix `Slot`\n // (`SidebarItem asChild`) so the consumer's `<Link>` takes over the\n // anchor while keeping the kit's item styling + `aria-current=\"page\"`.\n // Clicking routes client-side — no full-page reload.\n if (renderLink) {\n return (\n <SidebarItem key={item.id} asChild isActive={item.isActive}>\n {renderLink({\n href: item.href,\n children: inner,\n 'aria-current': item.isActive ? 'page' : undefined,\n })}\n </SidebarItem>\n );\n }\n\n // Default: plain anchor — byte-identical to before when no per-item\n // `onClick` is supplied (it's omitted entirely, not passed as\n // undefined, so the rendered `<a>` is unchanged).\n return (\n <SidebarItem\n key={item.id}\n href={item.href}\n aria-label={item.label}\n isActive={item.isActive}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </SidebarItem>\n );\n })}\n </SidebarBody>\n );\n}\n\n/* CVA for the chrome variant — drives the `<main>` surface; the structural\n header/sidebar-vs-tab-strip difference is conditional in the render.\n\n The `standalone` `<main>` gets its content inset from AppFrame's own\n `mainVariants({ padded: true })` (`--spacing-md` on every logical side), so\n this variant only carries the canvas colour there. The `embedded` `<main>`\n is a plain element (no AppFrame), so it has to supply its own inset:\n `--spacing-md` inline + block-end to match the standalone inset, and a\n larger `--spacing-lg` block-start so content clears the floating tab strip's\n pill instead of butting up against it. All logical — RTL mirrors for free. */\nconst shellMainVariants = cva('ds:bg-[color:var(--app-shell-background)]', {\n variants: {\n variant: {\n standalone: '',\n embedded: [\n 'ds:flex-1',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-lg)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n },\n },\n defaultVariants: { variant: 'standalone' },\n});\n\n/**\n * Embedded chrome: the slim floating tab strip (no Header / Sidebar / account\n * menu) for apps running inside the AlfaDocs platform iframe. It's the shared\n * {@link TabBar} fed the shell's nav items — the platform brands and identifies\n * the session around the iframe, so the strip is the only chrome. The\n * `MarketplaceNavItem` shape is structurally a `TabBarItem`, so the nav passes\n * straight through.\n */\nfunction EmbeddedTabStrip({\n nav,\n ariaLabel,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n ariaLabel: string;\n renderLink?: MarketplaceRenderLink;\n}) {\n // Adapt the shell's `renderLink` to TabBar's `renderLink` signature — TabBar\n // also offers the per-item `onClick`, but in consumer-router mode the\n // `<Link>` owns navigation (matching the standalone sidebar), so we forward\n // only `href` / `className` / `children` / `aria-current`. With `renderLink`\n // omitted, TabBar renders its own plain `<a href>` exactly as before, and a\n // per-item `onClick` rides through `nav` → `TabBarItem` untouched.\n const tabRenderLink = renderLink\n ? ({\n href,\n className,\n children,\n 'aria-current': ariaCurrent,\n }: {\n href: string;\n className: string;\n children: ReactNode;\n 'aria-current'?: 'page';\n }) =>\n renderLink({ href, className, children, 'aria-current': ariaCurrent })\n : undefined;\n\n return (\n <TabBar\n items={nav}\n ariaLabel={ariaLabel}\n {...(tabRenderLink ? { renderLink: tabRenderLink } : {})}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MarketplaceAppShell */\n/* ------------------------------------------------------------------ */\n\nexport const MarketplaceAppShell = forwardRef<\n HTMLDivElement,\n MarketplaceAppShellProps\n>(\n (\n {\n productName,\n productHref = '/',\n nav,\n renderLink,\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n sidebarState,\n collapsibleSidebar = false,\n mainAriaLabel,\n variant = 'standalone',\n children,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // The brand lockup as a consumer-router link: when `renderLink` is\n // supplied, the brand anchor routes client-side too (no session flash when\n // jumping home). The maker lockup's \"<productName> by Alfadocs\" supplies\n // the link's accessible name, matching the default `HeaderBrand` anchor.\n const headerBrand = renderLink ? (\n <HeaderBrand asChild>\n {renderLink({\n href: productHref,\n children: (\n <ProductLockup\n name={productName}\n size=\"md\"\n monochrome\n variant=\"maker\"\n />\n ),\n })}\n </HeaderBrand>\n ) : (\n <HeaderBrand\n href={productHref}\n logo={\n <ProductLockup\n name={productName}\n size=\"md\"\n monochrome\n variant=\"maker\"\n />\n }\n />\n );\n\n // Only wrap in a nested ThemeRoot when the user has an\n // explicit theme/accessibility override, so we don't clobber the consuming\n // app's (or Storybook's) outer theme cascade.\n const { theme: themePref, accessibility, resolvedTheme } = useTheme();\n const hasExplicitOverride =\n themePref !== 'system' || accessibility !== 'system';\n const themeBase = resolvedTheme.startsWith('dark') ? 'dark' : 'light';\n const themeAccessible = resolvedTheme.endsWith('-accessible');\n\n // Narrow-viewport overlay: HeaderMenuButton only renders below `md`.\n const [sidebarOpen, setSidebarOpen] = useState(false);\n\n const shell = (\n <TooltipProvider>\n <AppFrame\n mainAriaLabel={mainAriaLabel}\n mainClassName={shellMainVariants({ variant: 'standalone' })}\n header={\n <Header>\n <HeaderStart>\n <HeaderSkipLink href=\"#main-content\" />\n <HeaderMenuButton onMenuOpen={() => setSidebarOpen(true)} />\n {headerBrand}\n </HeaderStart>\n <HeaderCenter />\n <HeaderEnd>\n <HeaderSettings size=\"sm\" />\n <AccountMenu\n user={user}\n labels={labels}\n onSignOut={onSignOut}\n onToggleFullscreen={onToggleFullscreen}\n />\n </HeaderEnd>\n </Header>\n }\n sidebar={\n <Sidebar\n {...(sidebarState !== undefined\n ? { state: sidebarState }\n : { defaultState: 'expanded' as const })}\n open={sidebarOpen}\n onOpenChange={setSidebarOpen}\n aria-label={t('navigation.sidebar.label')}\n data-testid=\"marketplace-app-shell-sidebar\"\n >\n {collapsibleSidebar && sidebarState === undefined ? (\n <SidebarHeader className=\"ds:justify-end\">\n <SidebarCollapseTrigger />\n </SidebarHeader>\n ) : null}\n <MarketplaceSidebarNav nav={nav} renderLink={renderLink} />\n </Sidebar>\n }\n >\n {children}\n </AppFrame>\n </TooltipProvider>\n );\n\n const embedded = (\n // The shell owns the warm-grey canvas; TabBar's strip is transparent and\n // floats its pill on it, and `<main>` continues the same surface.\n <div className=\"ds:flex ds:min-h-dvh ds:flex-col ds:bg-[color:var(--app-shell-background)]\">\n <HeaderSkipLink href=\"#main-content\" />\n <EmbeddedTabStrip\n nav={nav}\n ariaLabel={t('navigation.sidebar.label')}\n renderLink={renderLink}\n />\n <main\n id=\"main-content\"\n tabIndex={-1}\n aria-label={\n mainAriaLabel ?? t('navigation.main.label', 'Main content')\n }\n className={shellMainVariants({ variant: 'embedded' })}\n >\n {children}\n </main>\n </div>\n );\n\n const content = variant === 'embedded' ? embedded : shell;\n\n if (!hasExplicitOverride) {\n return (\n <div\n ref={ref}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </div>\n );\n }\n\n return (\n <ThemeRoot\n ref={ref}\n theme={themeBase}\n accessible={themeAccessible}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </ThemeRoot>\n );\n },\n);\n\nMarketplaceAppShell.displayName = 'MarketplaceAppShell';\n\n/* ------------------------------------------------------------------ */\n/* ConnectWithAlfadocs */\n/* ------------------------------------------------------------------ */\n\nexport type ConnectStatus = 'idle' | 'connecting' | 'error';\n\nexport interface ConnectWithAlfadocsProps {\n /** Product name shown next to the wordmark at the top of the card. */\n productName: string;\n /** Heading, e.g. \"Connect your AlfaDocs account\". */\n title: string;\n /** Supporting copy below the heading. */\n description: ReactNode;\n /** The connect button label, e.g. \"Connect with AlfaDocs\". */\n connectLabel: string;\n /** Connection lifecycle. `connecting` shows a loading button; `error` shows the alert. */\n status?: ConnectStatus;\n /** Error message shown (as an alert) when `status === 'error'`. */\n error?: ReactNode;\n /** Fires when the connect button is pressed. Wire to `useAlfadocsAuth().connect`. */\n onConnect?: () => void;\n /** Optional footer content below the button (e.g. a \"what's this?\" link). */\n footer?: ReactNode;\n /**\n * Visual layout. `'card'` (default) is the centred card on the warm-grey\n * canvas — unchanged. `'split'` adds, at `lg:` and up, a two-panel desktop\n * layout: a brand panel on the inline-start and the connect card on the\n * inline-end. Below `lg:`, `'split'` collapses to exactly the card layout —\n * so it falls back gracefully inside iframes / embeds that never reach\n * desktop width. Use `'split'` for full-page desktop logins.\n */\n layout?: 'card' | 'split';\n /**\n * Optional content shown under the lockup in the `'split'` brand panel (a\n * tagline, value props, an illustration). Ignored in `'card'` and below `lg:`.\n */\n brandPanel?: ReactNode;\n className?: string;\n}\n\n/* Split-layout CVAs (lg+ two-panel; collapses to the centred card below lg). */\nconst connectRootVariants = cva(\n 'ds:flex ds:min-h-dvh ds:bg-[color:var(--app-shell-background)]',\n {\n variants: {\n layout: {\n card: '',\n split: 'ds:flex-col ds:lg:flex-row',\n },\n },\n defaultVariants: { layout: 'card' },\n },\n);\n\nconst connectCardWidthVariants = cva('ds:w-full', {\n variants: {\n layout: {\n card: 'ds:max-w-[400px]',\n split: 'ds:max-w-[400px] ds:lg:max-w-[480px]',\n },\n },\n defaultVariants: { layout: 'card' },\n});\n\n// The card's own lockup hides at lg+ in `split` (the brand panel shows it there).\nconst connectCardLockupVariants = cva('', {\n variants: {\n layout: { card: '', split: 'ds:lg:hidden' },\n },\n defaultVariants: { layout: 'card' },\n});\n\n/**\n * The pre-auth \"Connect with AlfaDocs\" screen. Centred white card on the\n * warm-grey canvas with the AlfaDocs wordmark + product name, copy, an error\n * slot, and the primary connect CTA. An opt-in `layout=\"split\"` adds a desktop\n * two-panel brand layout (lg+). Presentational — `onConnect` should call\n * `useAlfadocsAuth().connect()`, which redirects the browser to the server-side\n * BFF that runs the real OAuth2 + PKCE flow.\n */\nexport const ConnectWithAlfadocs = forwardRef<\n HTMLDivElement,\n ConnectWithAlfadocsProps\n>(\n (\n {\n productName,\n title,\n description,\n connectLabel,\n status = 'idle',\n error,\n onConnect,\n footer,\n layout = 'card',\n brandPanel,\n className,\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n data-component=\"connect-with-alfadocs\"\n className={`${connectRootVariants({ layout })} ${className ?? ''}`}\n >\n {layout === 'split' ? (\n // Desktop brand panel (lg+ only): a bold `--primary` surface with the\n // monochrome lockup riding the `--primary-foreground` ink, plus an\n // optional `brandPanel` slot. Decorative — the card carries the real\n // heading + CTA, and shows its own lockup below `lg:`.\n <div className=\"ds:hidden ds:lg:flex ds:lg:w-[55%] ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:ps-[var(--spacing-2xl)] ds:pe-[var(--spacing-2xl)] ds:pt-[var(--spacing-2xl)] ds:pb-[var(--spacing-2xl)] ds:text-start\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n monochrome\n tone=\"inherit\"\n variant=\"maker\"\n />\n {brandPanel ? (\n <div className=\"type-body ds:max-w-[28rem] ds:text-start\">\n {brandPanel}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className=\"ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]\">\n <Card className={connectCardWidthVariants({ layout })}>\n <Card.Body className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n variant=\"maker\"\n className={connectCardLockupVariants({ layout })}\n />\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <h1 className=\"type-title-card\">{title}</h1>\n <p className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {description}\n </p>\n </div>\n {status === 'error' && error ? (\n <Alert variant=\"error\" className=\"ds:w-full ds:text-start\">\n {error}\n </Alert>\n ) : null}\n <SignInWithAlfadocsButton\n intent=\"primary\"\n className=\"ds:w-full\"\n loading={status === 'connecting'}\n onClick={onConnect}\n label={connectLabel}\n data-testid=\"connect-with-alfadocs-button\"\n />\n {footer ? (\n <div className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {footer}\n </div>\n ) : null}\n </Card.Body>\n </Card>\n </div>\n </div>\n );\n },\n);\n\nConnectWithAlfadocs.displayName = 'ConnectWithAlfadocs';\n"],"names":["lockup","cva","productName","makerRoot","ProductLockup","forwardRef","name","variant","monochrome","tone","size","className","props","ref","inherit","markInk","nameInk","byInk","letteringInk","jsxs","jsx","AlfadocsLogoMark","AlfadocsLogoNeg","Logo","formatBadgeCount","count","AccountMenu","user","labels","onSignOut","onToggleFullscreen","t","useTranslation","fullscreenLabel","DropdownMenu","Avatar","Fragment","Maximize2","LogOut","MarketplaceSidebarNav","nav","renderLink","SidebarBody","item","badge","inner","SidebarItemIcon","SidebarItemLabel","SidebarItemBadge","SidebarItem","shellMainVariants","EmbeddedTabStrip","ariaLabel","tabRenderLink","href","children","ariaCurrent","TabBar","MarketplaceAppShell","productHref","sidebarState","collapsibleSidebar","mainAriaLabel","headerBrand","HeaderBrand","themePref","accessibility","resolvedTheme","useTheme","hasExplicitOverride","themeBase","themeAccessible","sidebarOpen","setSidebarOpen","useState","shell","TooltipProvider","AppFrame","Header","HeaderStart","HeaderSkipLink","HeaderMenuButton","HeaderCenter","HeaderEnd","HeaderSettings","Sidebar","SidebarHeader","SidebarCollapseTrigger","embedded","content","ThemeRoot","connectRootVariants","connectCardWidthVariants","connectCardLockupVariants","ConnectWithAlfadocs","title","description","connectLabel","status","error","onConnect","footer","layout","brandPanel","Card","Alert","SignInWithAlfadocsButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,KAASC,EAAI,2DAA2D,GAQxEC,KAAcD;AAAA,EAClB;AAAA,IAC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AAQ;AAAA,cACR,WAAW2F,GAA0B,EAAE,QAAAS,EAAA,CAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,UAEjD,gBAAAnF,EAAC,OAAA,EAAI,WAAU,kDACb,UAAA;AAAA,YAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,mBAAmB,UAAA2E,GAAM;AAAA,YACvC,gBAAA3E,EAAC,KAAA,EAAE,WAAU,wDACV,UAAA4E,EAAA,CACH;AAAA,UAAA,GACF;AAAA,UACCE,MAAW,WAAWC,IACrB,gBAAA/E,EAACqF,GAAA,EAAM,SAAQ,SAAQ,WAAU,2BAC9B,UAAAN,EAAA,CACH,IACE;AAAA,UACJ,gBAAA/E;AAAA,YAACsF;AAAA,YAAA;AAAA,cACC,QAAO;AAAA,cACP,WAAU;AAAA,cACV,SAASR,MAAW;AAAA,cACpB,SAASE;AAAA,cACT,OAAOH;AAAA,cACP,eAAY;AAAA,YAAA;AAAA,UAAA;AAAA,UAEbI,IACC,gBAAAjF,EAAC,OAAA,EAAI,WAAU,qDACZ,aACH,IACE;AAAA,QAAA,EAAA,CACN,GACF,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;AAEA0E,GAAoB,cAAc;"}
|
package/dist/agent-catalog.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ import { T as Gu } from "./_chunks/transaction-chip-DJCstquX.js";
|
|
|
216
216
|
import { W as Uu, a as Wu } from "./_chunks/whatsapp-button-BIy6NaJK.js";
|
|
217
217
|
import { C as Ku, W as Yu, a as ju, b as Xu, c as qu, i as Qu, l as $u, m as Ju, r as Zu, w as ax, d as ex, e as sx, f as rx } from "./_chunks/workflow-map-SIfAhmWz.js";
|
|
218
218
|
import { A as ox, a as ix, b as nx, c as lx } from "./_chunks/alia-sidebar-DzNz1gDf.js";
|
|
219
|
-
import { C as mx, M as px, P as cx } from "./_chunks/marketplace-app-shell-
|
|
219
|
+
import { C as mx, M as px, P as cx } from "./_chunks/marketplace-app-shell-DX5aLeIJ.js";
|
|
220
220
|
import { S as gx } from "./_chunks/signature-request-D_6jgDZd.js";
|
|
221
221
|
import { D as ux, d as xx } from "./_chunks/dependent-selector-DyFpdzZV.js";
|
|
222
222
|
import { D as Sx, d as Tx } from "./_chunks/document-preview-DXl9migE.js";
|
|
@@ -136,6 +136,14 @@ export interface MarketplaceAppShellProps {
|
|
|
136
136
|
* `'expanded'`).
|
|
137
137
|
*/
|
|
138
138
|
sidebarState?: SidebarMode;
|
|
139
|
+
/**
|
|
140
|
+
* Render a collapse/expand toggle in the sidebar header, letting the user
|
|
141
|
+
* shrink the standalone sidebar to an icon rail. The chosen mode persists
|
|
142
|
+
* per-user (the underlying `Sidebar` stores it) and survives reloads. Opt-in
|
|
143
|
+
* so existing consumers are unaffected; ignored when `sidebarState` forces a
|
|
144
|
+
* mode or in the `'embedded'` variant (no sidebar). @default false
|
|
145
|
+
*/
|
|
146
|
+
collapsibleSidebar?: boolean;
|
|
139
147
|
/** Override the accessible name of the `<main>` landmark. */
|
|
140
148
|
mainAriaLabel?: string;
|
|
141
149
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace-app-shell.d.ts","sourceRoot":"","sources":["../../../src/patterns/marketplace-app-shell/marketplace-app-shell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAwB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuB9E,OAAO,
|
|
1
|
+
{"version":3,"file":"marketplace-app-shell.d.ts","sourceRoot":"","sources":["../../../src/patterns/marketplace-app-shell/marketplace-app-shell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAwB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuB9E,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CA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C;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,qHAqF/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -720,6 +720,10 @@
|
|
|
720
720
|
"types": "./dist/components/tooltip/index.d.ts",
|
|
721
721
|
"import": "./dist/components/tooltip/index.js"
|
|
722
722
|
},
|
|
723
|
+
"./transaction-chip": {
|
|
724
|
+
"types": "./dist/components/transaction-chip/index.d.ts",
|
|
725
|
+
"import": "./dist/components/transaction-chip/index.js"
|
|
726
|
+
},
|
|
723
727
|
"./face-scheme": {
|
|
724
728
|
"types": "./dist/components/face-scheme/index.d.ts",
|
|
725
729
|
"import": "./dist/components/face-scheme/index.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace-app-shell-Chcj4q4z.js","sources":["../../src/brand/product-lockup/product-lockup.tsx","../../src/patterns/marketplace-app-shell/marketplace-app-shell.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Logo } from '../../components/logo/logo';\nimport { AlfadocsLogoMark, AlfadocsLogoNeg } from '../logo-asset';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\n// Outer lockup row. ~4px logical gap between the wordmark and the product\n// name (`--spacing-xs`), centre-aligned so the name's cap height sits\n// against the wordmark's letterforms.\nconst lockup = cva('ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]');\n\n// The product name. Marketing serif (Fraunces, `--font-serif`) — permitted\n// here because this file lives under `src/brand/`, never in `src/components/`\n// or `src/patterns/` (constraint 10). Sized to ~95% of the wordmark height so\n// its cap height matches the logo letterforms across every size and theme\n// (the `--logo-size-*` tokens shift up in the accessible themes; the calc\n// keeps the name proportional for free).\nconst productName = cva(\n [\n 'ds:[font-family:var(--font-serif)]',\n 'ds:font-semibold',\n 'ds:leading-none',\n 'ds:tracking-[0.01em]',\n 'ds:whitespace-nowrap',\n // Forced-colors: drop the transparent text-fill and paint the label\n // as solid CanvasText so it never disappears under Windows HCM —\n // a gradient/transparent fill has no meaning there.\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:forced-colors:[-webkit-text-fill-color:CanvasText]',\n ],\n {\n variants: {\n size: {\n sm: 'ds:text-[calc(var(--logo-size-sm)*0.95)]',\n md: 'ds:text-[calc(var(--logo-size-md)*0.95)]',\n lg: 'ds:text-[calc(var(--logo-size-lg)*0.95)]',\n xl: 'ds:text-[calc(var(--logo-size-xl)*0.95)]',\n },\n tone: {\n // Brand gradient filled into the glyphs via background-clip:text.\n // `--gradient-wordmark` rides the theme aliases, so it stays\n // AA-safe and adapts per theme on its own (and flattens to a solid\n // ink in the accessible / forced-colors blocks — see tokens).\n gradient: [\n 'ds:italic',\n 'ds:bg-[image:var(--gradient-wordmark)]',\n 'ds:bg-clip-text',\n 'ds:text-transparent',\n 'ds:[-webkit-text-fill-color:transparent]',\n ],\n // Monochrome: solid currentColor ink, upright, no gradient — for\n // print, single-colour work, and coloured chrome (e.g. app-shell\n // headers) where the lockup must ride the surrounding ink.\n solid: 'ds:text-current',\n },\n },\n defaultVariants: { size: 'md', tone: 'gradient' },\n },\n);\n\n// Maker lockup root. Sets a single `--lockup-unit` custom property to the\n// matching `--logo-size-*` token; every maker sub-element (mark, name, the\n// \"by Alfadocs\" tag) sizes off `var(--lockup-unit)`, so there's one per-size\n// source of truth that shifts up with the accessible themes for free.\n// `whitespace-nowrap` keeps \"[mark] Name by Alfadocs\" on one line.\nconst makerRoot = cva('ds:whitespace-nowrap', {\n variants: {\n size: {\n sm: 'ds:[--lockup-unit:var(--logo-size-sm)]',\n md: 'ds:[--lockup-unit:var(--logo-size-md)]',\n lg: 'ds:[--lockup-unit:var(--logo-size-lg)]',\n xl: 'ds:[--lockup-unit:var(--logo-size-xl)]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\ntype LockupSize = NonNullable<VariantProps<typeof productName>['size']>;\n\nexport type ProductLockupProps = {\n /**\n * The product name. Passed verbatim (product names are not translated).\n *\n * - `variant=\"standard\"` (default): renders as \"Alfadocs <name>\" with the\n * wordmark; accessible name is `Alfadocs <name>`.\n * - `variant=\"maker\"`: renders as \"[mark] <name> by Alfadocs\"; accessible\n * name is `<name> by Alfadocs`.\n */\n name: string;\n /**\n * Which lockup composition to use.\n *\n * - `'standard'` (default) — Alfadocs wordmark + product name (\"Alfadocs\n * Builders\"). Use for **internal** Alfadocs products (Alfadocs Builders,\n * Alfadocs API) where the product is part of the Alfadocs family.\n * - `'maker'` — \"<name> by Alfadocs\" with the four-pillar mark and the name\n * as the prominent element. Use for **external** marketplace extensions\n * (\"Scribe by Alfadocs\") where the extension's own name leads and\n * \"by Alfadocs\" is the maker attribution.\n */\n variant?: 'standard' | 'maker';\n /**\n * Render the name as a solid `--foreground` ink, upright (no gradient, no\n * italic), and pair it with the monochrome wordmark. Use for print,\n * single-colour reproductions, or any constrained context where the\n * gradient/serif treatment is inappropriate.\n */\n monochrome?: boolean;\n /**\n * Ink resolution. `'auto'` (default) uses the lockup's intended ink\n * (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride\n * `currentColor` — use it with `monochrome` on a coloured brand surface (a\n * tinted header or split-login panel) so the wordmark + name both take the\n * surface's text colour rather than clashing with a fixed `--foreground`.\n */\n tone?: 'auto' | 'inherit';\n /** Lockup size. Drives both the wordmark and the name's cap height. */\n size?: LockupSize;\n className?: string;\n} & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'role' | 'aria-label' | 'aria-hidden' | 'children' | 'className'\n>;\n\n/* ------------------------------------------------------------------ */\n/* ProductLockup */\n/* ------------------------------------------------------------------ */\n\n/**\n * Pairs a product name with the Alfadocs brand. Two compositions:\n *\n * - `variant=\"standard\"` (default) — the Alfadocs wordmark + product name\n * (\"Alfadocs Builders\"). For internal Alfadocs products. Exposed to\n * assistive tech as a single `img` named `Alfadocs <name>`.\n * - `variant=\"maker\"` — \"[mark] <name> by Alfadocs\". For external marketplace\n * extensions where the extension's name leads. Exposed as a single `img`\n * named `<name> by Alfadocs`.\n *\n * In both cases the inner wordmark/mark and the visible name are decorative so\n * the brand isn't announced twice. Every marketplace app should use this\n * rather than hand-rolling a wordmark + typed span.\n */\nexport const ProductLockup = forwardRef<HTMLSpanElement, ProductLockupProps>(\n (\n {\n name,\n variant = 'standard',\n monochrome = false,\n tone = 'auto',\n size = 'md',\n className,\n ...props\n },\n ref,\n ) => {\n if (import.meta.env.DEV && !name.trim()) {\n console.warn(\n '[ProductLockup] `name` is empty — the lockup will render the bare wordmark with no product name. Pass the product name (e.g. \"Builders\").',\n );\n }\n\n if (variant === 'maker') {\n // Ink matrix mirrors the standard variant's tone/monochrome model:\n // - tone=\"inherit\": every element rides currentColor (no explicit ink),\n // for coloured surfaces.\n // - monochrome (tone auto): foreground ink, with the attribution muted.\n // - default (colour, tone auto): the name + mark take --primary; the\n // wordmark lettering stays --foreground; the attribution is muted.\n const inherit = tone === 'inherit';\n const markInk = inherit\n ? ''\n : monochrome\n ? 'ds:text-[color:var(--foreground)]'\n : 'ds:text-[color:var(--primary)]';\n const nameInk = inherit\n ? ''\n : monochrome\n ? 'ds:text-[color:var(--foreground)]'\n : 'ds:text-[color:var(--primary)]';\n const byInk = inherit ? '' : 'ds:text-[color:var(--muted-foreground)]';\n const letteringInk = inherit ? '' : 'ds:text-[color:var(--foreground)]';\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={`${name} by Alfadocs`.trim()}\n className={makerRoot({ size, className })}\n data-component=\"product-lockup\"\n {...props}\n >\n {/* Pillar mark sized close to the app name (≈0.88 of the serif em),\n vertically centred on it. Inline (not flex) so the maker tag can\n use vertical-align. */}\n <AlfadocsLogoMark\n aria-hidden\n className={`ds:inline-block ds:align-middle ds:me-[var(--spacing-sm)] ds:h-[calc(var(--lockup-unit)*0.88)] ds:w-auto ds:forced-colors:text-[CanvasText] ${markInk}`}\n />\n <span\n aria-hidden\n className={`ds:align-middle ds:[font-family:var(--font-serif)] ds:font-semibold ds:italic ds:leading-none ds:tracking-[0.01em] ${nameInk} ds:text-[calc(var(--lockup-unit)*0.95)]`}\n >\n {name}\n </span>\n {/* Maker tag — superscript style, its top aligned to the app name's\n cap-height via vertical-align: text-top. */}\n <span\n aria-hidden\n className={`ds:align-text-top ds:ms-[var(--spacing-sm)] ds:inline-flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ${byInk}`}\n >\n <span className=\"ds:text-[calc(var(--lockup-unit)*0.4)] ds:leading-none\">\n by\n </span>\n {/* Real Alfadocs wordmark SVG. The Neg SVG's first <g> is the\n \"Alfadocs\" lettering; the second <g> is the four-pillar mark\n (x≈3–146). viewBox=\"168 0 637 125\" windows to the lettering\n only — no mark, no hand-typed wordmark. */}\n <AlfadocsLogoNeg\n aria-hidden\n viewBox=\"168 0 637 125\"\n className={`ds:h-[calc(var(--lockup-unit)*0.45)] ds:w-auto ds:forced-colors:text-[CanvasText] ${letteringInk}`}\n />\n </span>\n </span>\n );\n }\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={`Alfadocs ${name}`.trim()}\n className={lockup({ className })}\n data-component=\"product-lockup\"\n {...props}\n >\n <Logo\n variant={monochrome ? 'monochrome' : 'wordmark'}\n tone={tone}\n size={size}\n decorative\n />\n <span\n aria-hidden\n className={productName({\n size,\n tone: monochrome ? 'solid' : 'gradient',\n })}\n >\n {name}\n </span>\n </span>\n );\n },\n);\nProductLockup.displayName = 'ProductLockup';\n","/**\n * Marketplace App Shell — the standard chrome for an app built on top of\n * AlfaDocs (the kind a partner scaffolds with Claude Code, Lovable, etc.).\n *\n * It is a thin, opinionated composition of kit primitives: an `AppFrame` with\n * a branded `Header` (the maker `ProductLockup` — \"<Product> by Alfadocs\" —\n * rendered `monochrome` so it rides the header's ink; maker is the lockup\n * style for external marketplace extensions), a `Sidebar` for app\n * navigation, `HeaderSettings` (theme/locale/accessibility), and a bare-avatar\n * account menu (fullscreen + sign-out) matching the main app shell.\n * `ConnectWithAlfadocs` is the matching pre-auth screen, with the full-colour\n * maker lockup and `SignInWithAlfadocsButton`.\n *\n * Like `AliaSidebar`, this pattern ships a RUNTIME component (surfaced via\n * `src/patterns/index.ts` and the library bundle) because consuming apps mount\n * it in production rather than copying the source.\n *\n * Auth is intentionally decoupled: the shell takes the signed-in `user` and an\n * `onSignOut` callback as props, and `ConnectWithAlfadocs` takes a `status` +\n * `onConnect`. Wire them to `@alfadocs/auth/react`'s `useAlfadocsAuth()` in the\n * consuming app — the kit never touches OAuth or secrets (those live in the\n * server-side `@alfadocs/auth` BFF).\n *\n * All user-visible copy is consumer-provided (props) so each app localises in\n * its own i18n; the only kit-owned strings reuse existing translated `ui.*`\n * keys (sidebar label, skip link, menu button).\n */\nimport { forwardRef, useState, type MouseEvent, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport { LogOut, Maximize2 } from 'lucide-react';\n\nimport { AppFrame } from '../../components/app-frame';\nimport { Avatar } from '../../components/avatar';\nimport { Alert } from '../../components/alert';\nimport { Card } from '../../components/card';\nimport { DropdownMenu } from '../../components/dropdown-menu';\nimport { TabBar } from '../../components/tab-bar';\nimport {\n Header,\n HeaderBrand,\n HeaderCenter,\n HeaderEnd,\n HeaderMenuButton,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { HeaderSettings } from '../../components/header-settings';\nimport { ProductLockup } from '../../brand/product-lockup';\nimport { SignInWithAlfadocsButton } from '../../components/sign-in-with-alfadocs-button';\nimport {\n Sidebar,\n SidebarBody,\n SidebarItem,\n SidebarItemBadge,\n SidebarItemIcon,\n SidebarItemLabel,\n type SidebarMode,\n} from '../../components/sidebar';\nimport { ThemeRoot } from '../../components/theme-root';\nimport { TooltipProvider } from '../../components/tooltip';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\nexport interface MarketplaceNavItem {\n id: string;\n /** Pre-translated label — apps localise their own nav copy. */\n label: string;\n href: string;\n /** Optional leading icon (a lucide-react element or equivalent). */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the item as the current page (`aria-current='page'`). */\n isActive?: boolean;\n /**\n * Optional click handler threaded onto the nav link's `<a>`. The lightweight\n * alternative to `renderLink`: intercept a same-origin click (call\n * `event.preventDefault()`) and route client-side without a full page load —\n * no router `<Link>` needed. Applies to both the standalone sidebar item and\n * the embedded tab. When `renderLink` is supplied it's handed through to the\n * consumer's link element instead.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the shell hands to `renderLink` for each nav item. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the kit's\n * active styling) and `aria-current` (`'page'` on the active item) so a tab /\n * sidebar-item click is a client-side route change, not a full page reload.\n */\nexport interface MarketplaceRenderLinkProps {\n /** The item's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's classes — apply verbatim to the link element. */\n className?: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active item, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n}\n\n/**\n * Render a nav item through the consumer's router instead of the kit's own\n * `<a>`. Returned by the consumer; the shell forwards `href`, the kit's\n * `className`, the item children, and `aria-current` so the active styling and\n * the `aria-current=\"page\"` marker survive a client-side route change.\n */\nexport type MarketplaceRenderLink = (\n props: MarketplaceRenderLinkProps,\n) => ReactNode;\n\nexport interface MarketplaceAppUser {\n /** Display name — drives the avatar initials + the account-menu header. */\n name: string;\n /** Optional email shown under the name in the account menu. */\n email?: string;\n /** Optional avatar image URL. */\n avatarSrc?: string;\n}\n\nexport interface MarketplaceAppShellLabels {\n /** Accessible name for the account-menu trigger, e.g. \"Account menu\". */\n accountMenu: string;\n /** The sign-out menu item, e.g. \"Sign out\". */\n signOut: string;\n /**\n * Optional fullscreen menu item label, e.g. \"Toggle fullscreen\". The item\n * renders whenever `onToggleFullscreen` is supplied; when this label is\n * omitted it falls back to the translated `ui.*` \"Toggle fullscreen\" string.\n */\n fullscreen?: string;\n}\n\nexport interface MarketplaceAppShellProps {\n /** Extension name — renders as the maker lockup \"<productName> by Alfadocs\". */\n productName: string;\n /** Link target for the brand lockup. Default `'/'`. */\n productHref?: string;\n /** Sidebar nav items, in order. */\n nav: MarketplaceNavItem[];\n /**\n * Render nav items (and the brand lockup) through the consumer's router so a\n * tab / item click is a client-side route change with **no full-page reload\n * or session flash**. Wire it to your router's `<Link>`:\n *\n * ```tsx\n * import { Link } from '@tanstack/react-router';\n * <MarketplaceAppShell\n * nav={nav}\n * renderLink={({ href, className, children, ...rest }) => (\n * <Link to={href} className={className} {...rest}>{children}</Link>\n * )}\n * />\n * ```\n *\n * Threaded to the standalone sidebar items, the embedded top tab strip, and\n * the brand lockup. The kit forwards the same `className` + `aria-current` so\n * the active styling and the `aria-current=\"page\"` marker survive in both\n * modes. Omit it to render the plain `<a href>` exactly as before — non-routed\n * consumers are byte-for-byte unaffected. A per-item `onClick` (a\n * click-interceptor shim) is the lighter alternative when you don't want to\n * thread a router `<Link>`.\n */\n renderLink?: MarketplaceRenderLink;\n /** The signed-in user shown in the account menu. */\n user: MarketplaceAppUser;\n /** Consumer-localised chrome labels owned by the shell. */\n labels: MarketplaceAppShellLabels;\n /** Fires when the user picks \"Sign out\". Wire to `useAlfadocsAuth().signOut`. */\n onSignOut?: () => void;\n /** Fires when the user toggles fullscreen. Omit to hide the fullscreen item. */\n onToggleFullscreen?: () => void;\n /**\n * Force the sidebar into a specific mode. Apps typically flip to `'overlay'`\n * on narrow viewports and leave this undefined elsewhere (defaults to\n * `'expanded'`).\n */\n sidebarState?: SidebarMode;\n /** Override the accessible name of the `<main>` landmark. */\n mainAriaLabel?: string;\n /**\n * Chrome variant. `'standalone'` (default) renders the full shell — branded\n * Header, Sidebar, and account menu. `'embedded'` is for apps running INSIDE\n * the AlfaDocs platform iframe (consumers detect this with\n * `window !== window.top`): it drops the Header, Sidebar, account menu, and\n * product lockup — the platform already brands and identifies the session\n * around the iframe — and renders the `nav` items as a single slim top tab\n * strip. `onSignOut`, `onToggleFullscreen`, `productName`, `productHref`, and\n * `sidebarState` are ignored in `'embedded'`; the `<main>` landmark,\n * `mainAriaLabel`, and the skip link are kept.\n */\n variant?: 'standalone' | 'embedded';\n /** Children render inside the main content region. */\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Internals */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\nfunction AccountMenu({\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n}: {\n user: MarketplaceAppUser;\n labels: MarketplaceAppShellLabels;\n onSignOut?: () => void;\n onToggleFullscreen?: () => void;\n}) {\n const { t } = useTranslation();\n // Default to the translated `ui.*` label so a consumer that wires\n // `onToggleFullscreen` but omits the label still gets a localised item.\n const fullscreenLabel =\n labels.fullscreen ?? t('marketplaceAppShell.settings.fullscreen');\n return (\n // Non-modal: an account menu shouldn't inert/aria-hide the whole shell\n // behind it (which leaves the still-focusable chrome inside an\n // aria-hidden region — an `aria-hidden-focus` violation).\n <DropdownMenu.Root modal={false}>\n <DropdownMenu.Trigger asChild>\n {/* Bare avatar circle — matches the main app shell's account\n trigger. The name lives inside the menu, not beside the avatar. */}\n <button\n type=\"button\"\n aria-label={labels.accountMenu}\n data-testid=\"marketplace-account-trigger\"\n className=\"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0 ds:size-10 ds:rounded-[var(--radius-full)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]\"\n >\n <span aria-hidden=\"true\">\n <Avatar name={user.name} src={user.avatarSrc} size=\"md\" />\n </span>\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" collisionPadding={16}>\n {/* GitHub-style identity header — small avatar + name + secondary\n line, matching the main app shell's account menu. */}\n <DropdownMenu.Label>\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span aria-hidden=\"true\">\n <Avatar name={user.name} src={user.avatarSrc} size=\"sm\" />\n </span>\n <span className=\"ds:flex ds:flex-col ds:min-w-0\">\n <span className=\"type-label ds:text-[color:var(--foreground)] ds:truncate\">\n {user.name}\n </span>\n {user.email ? (\n <span className=\"type-meta ds:truncate\">{user.email}</span>\n ) : null}\n </span>\n </span>\n </DropdownMenu.Label>\n {onToggleFullscreen ? (\n <>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<Maximize2 aria-hidden />}\n onSelect={onToggleFullscreen}\n data-testid=\"marketplace-fullscreen\"\n >\n {fullscreenLabel}\n </DropdownMenu.Item>\n </>\n ) : null}\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n startIcon={<LogOut aria-hidden />}\n onSelect={onSignOut}\n data-testid=\"marketplace-sign-out\"\n >\n {labels.signOut}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nfunction MarketplaceSidebarNav({\n nav,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n renderLink?: MarketplaceRenderLink;\n}) {\n return (\n <SidebarBody>\n {nav.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const inner = (\n <>\n {item.icon ? <SidebarItemIcon>{item.icon}</SidebarItemIcon> : null}\n <SidebarItemLabel>{item.label}</SidebarItemLabel>\n {badge !== undefined ? (\n <SidebarItemBadge>{formatBadgeCount(badge)}</SidebarItemBadge>\n ) : null}\n </>\n );\n\n // Consumer-router mode: render the item through Radix `Slot`\n // (`SidebarItem asChild`) so the consumer's `<Link>` takes over the\n // anchor while keeping the kit's item styling + `aria-current=\"page\"`.\n // Clicking routes client-side — no full-page reload.\n if (renderLink) {\n return (\n <SidebarItem key={item.id} asChild isActive={item.isActive}>\n {renderLink({\n href: item.href,\n children: inner,\n 'aria-current': item.isActive ? 'page' : undefined,\n })}\n </SidebarItem>\n );\n }\n\n // Default: plain anchor — byte-identical to before when no per-item\n // `onClick` is supplied (it's omitted entirely, not passed as\n // undefined, so the rendered `<a>` is unchanged).\n return (\n <SidebarItem\n key={item.id}\n href={item.href}\n aria-label={item.label}\n isActive={item.isActive}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </SidebarItem>\n );\n })}\n </SidebarBody>\n );\n}\n\n/* CVA for the chrome variant — drives the `<main>` surface; the structural\n header/sidebar-vs-tab-strip difference is conditional in the render.\n\n The `standalone` `<main>` gets its content inset from AppFrame's own\n `mainVariants({ padded: true })` (`--spacing-md` on every logical side), so\n this variant only carries the canvas colour there. The `embedded` `<main>`\n is a plain element (no AppFrame), so it has to supply its own inset:\n `--spacing-md` inline + block-end to match the standalone inset, and a\n larger `--spacing-lg` block-start so content clears the floating tab strip's\n pill instead of butting up against it. All logical — RTL mirrors for free. */\nconst shellMainVariants = cva('ds:bg-[color:var(--app-shell-background)]', {\n variants: {\n variant: {\n standalone: '',\n embedded: [\n 'ds:flex-1',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-lg)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n },\n },\n defaultVariants: { variant: 'standalone' },\n});\n\n/**\n * Embedded chrome: the slim floating tab strip (no Header / Sidebar / account\n * menu) for apps running inside the AlfaDocs platform iframe. It's the shared\n * {@link TabBar} fed the shell's nav items — the platform brands and identifies\n * the session around the iframe, so the strip is the only chrome. The\n * `MarketplaceNavItem` shape is structurally a `TabBarItem`, so the nav passes\n * straight through.\n */\nfunction EmbeddedTabStrip({\n nav,\n ariaLabel,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n ariaLabel: string;\n renderLink?: MarketplaceRenderLink;\n}) {\n // Adapt the shell's `renderLink` to TabBar's `renderLink` signature — TabBar\n // also offers the per-item `onClick`, but in consumer-router mode the\n // `<Link>` owns navigation (matching the standalone sidebar), so we forward\n // only `href` / `className` / `children` / `aria-current`. With `renderLink`\n // omitted, TabBar renders its own plain `<a href>` exactly as before, and a\n // per-item `onClick` rides through `nav` → `TabBarItem` untouched.\n const tabRenderLink = renderLink\n ? ({\n href,\n className,\n children,\n 'aria-current': ariaCurrent,\n }: {\n href: string;\n className: string;\n children: ReactNode;\n 'aria-current'?: 'page';\n }) =>\n renderLink({ href, className, children, 'aria-current': ariaCurrent })\n : undefined;\n\n return (\n <TabBar\n items={nav}\n ariaLabel={ariaLabel}\n {...(tabRenderLink ? { renderLink: tabRenderLink } : {})}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MarketplaceAppShell */\n/* ------------------------------------------------------------------ */\n\nexport const MarketplaceAppShell = forwardRef<\n HTMLDivElement,\n MarketplaceAppShellProps\n>(\n (\n {\n productName,\n productHref = '/',\n nav,\n renderLink,\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n sidebarState,\n mainAriaLabel,\n variant = 'standalone',\n children,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // The brand lockup as a consumer-router link: when `renderLink` is\n // supplied, the brand anchor routes client-side too (no session flash when\n // jumping home). The maker lockup's \"<productName> by Alfadocs\" supplies\n // the link's accessible name, matching the default `HeaderBrand` anchor.\n const headerBrand = renderLink ? (\n <HeaderBrand asChild>\n {renderLink({\n href: productHref,\n children: (\n <ProductLockup\n name={productName}\n size=\"md\"\n monochrome\n variant=\"maker\"\n />\n ),\n })}\n </HeaderBrand>\n ) : (\n <HeaderBrand\n href={productHref}\n logo={\n <ProductLockup\n name={productName}\n size=\"md\"\n monochrome\n variant=\"maker\"\n />\n }\n />\n );\n\n // Only wrap in a nested ThemeRoot when the user has an\n // explicit theme/accessibility override, so we don't clobber the consuming\n // app's (or Storybook's) outer theme cascade.\n const { theme: themePref, accessibility, resolvedTheme } = useTheme();\n const hasExplicitOverride =\n themePref !== 'system' || accessibility !== 'system';\n const themeBase = resolvedTheme.startsWith('dark') ? 'dark' : 'light';\n const themeAccessible = resolvedTheme.endsWith('-accessible');\n\n // Narrow-viewport overlay: HeaderMenuButton only renders below `md`.\n const [sidebarOpen, setSidebarOpen] = useState(false);\n\n const shell = (\n <TooltipProvider>\n <AppFrame\n mainAriaLabel={mainAriaLabel}\n mainClassName={shellMainVariants({ variant: 'standalone' })}\n header={\n <Header>\n <HeaderStart>\n <HeaderSkipLink href=\"#main-content\" />\n <HeaderMenuButton onMenuOpen={() => setSidebarOpen(true)} />\n {headerBrand}\n </HeaderStart>\n <HeaderCenter />\n <HeaderEnd>\n <HeaderSettings size=\"sm\" />\n <AccountMenu\n user={user}\n labels={labels}\n onSignOut={onSignOut}\n onToggleFullscreen={onToggleFullscreen}\n />\n </HeaderEnd>\n </Header>\n }\n sidebar={\n <Sidebar\n {...(sidebarState !== undefined\n ? { state: sidebarState }\n : { defaultState: 'expanded' as const })}\n open={sidebarOpen}\n onOpenChange={setSidebarOpen}\n aria-label={t('navigation.sidebar.label')}\n data-testid=\"marketplace-app-shell-sidebar\"\n >\n <MarketplaceSidebarNav nav={nav} renderLink={renderLink} />\n </Sidebar>\n }\n >\n {children}\n </AppFrame>\n </TooltipProvider>\n );\n\n const embedded = (\n // The shell owns the warm-grey canvas; TabBar's strip is transparent and\n // floats its pill on it, and `<main>` continues the same surface.\n <div className=\"ds:flex ds:min-h-dvh ds:flex-col ds:bg-[color:var(--app-shell-background)]\">\n <HeaderSkipLink href=\"#main-content\" />\n <EmbeddedTabStrip\n nav={nav}\n ariaLabel={t('navigation.sidebar.label')}\n renderLink={renderLink}\n />\n <main\n id=\"main-content\"\n tabIndex={-1}\n aria-label={\n mainAriaLabel ?? t('navigation.main.label', 'Main content')\n }\n className={shellMainVariants({ variant: 'embedded' })}\n >\n {children}\n </main>\n </div>\n );\n\n const content = variant === 'embedded' ? embedded : shell;\n\n if (!hasExplicitOverride) {\n return (\n <div\n ref={ref}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </div>\n );\n }\n\n return (\n <ThemeRoot\n ref={ref}\n theme={themeBase}\n accessible={themeAccessible}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </ThemeRoot>\n );\n },\n);\n\nMarketplaceAppShell.displayName = 'MarketplaceAppShell';\n\n/* ------------------------------------------------------------------ */\n/* ConnectWithAlfadocs */\n/* ------------------------------------------------------------------ */\n\nexport type ConnectStatus = 'idle' | 'connecting' | 'error';\n\nexport interface ConnectWithAlfadocsProps {\n /** Product name shown next to the wordmark at the top of the card. */\n productName: string;\n /** Heading, e.g. \"Connect your AlfaDocs account\". */\n title: string;\n /** Supporting copy below the heading. */\n description: ReactNode;\n /** The connect button label, e.g. \"Connect with AlfaDocs\". */\n connectLabel: string;\n /** Connection lifecycle. `connecting` shows a loading button; `error` shows the alert. */\n status?: ConnectStatus;\n /** Error message shown (as an alert) when `status === 'error'`. */\n error?: ReactNode;\n /** Fires when the connect button is pressed. Wire to `useAlfadocsAuth().connect`. */\n onConnect?: () => void;\n /** Optional footer content below the button (e.g. a \"what's this?\" link). */\n footer?: ReactNode;\n /**\n * Visual layout. `'card'` (default) is the centred card on the warm-grey\n * canvas — unchanged. `'split'` adds, at `lg:` and up, a two-panel desktop\n * layout: a brand panel on the inline-start and the connect card on the\n * inline-end. Below `lg:`, `'split'` collapses to exactly the card layout —\n * so it falls back gracefully inside iframes / embeds that never reach\n * desktop width. Use `'split'` for full-page desktop logins.\n */\n layout?: 'card' | 'split';\n /**\n * Optional content shown under the lockup in the `'split'` brand panel (a\n * tagline, value props, an illustration). Ignored in `'card'` and below `lg:`.\n */\n brandPanel?: ReactNode;\n className?: string;\n}\n\n/* Split-layout CVAs (lg+ two-panel; collapses to the centred card below lg). */\nconst connectRootVariants = cva(\n 'ds:flex ds:min-h-dvh ds:bg-[color:var(--app-shell-background)]',\n {\n variants: {\n layout: {\n card: '',\n split: 'ds:flex-col ds:lg:flex-row',\n },\n },\n defaultVariants: { layout: 'card' },\n },\n);\n\nconst connectCardWidthVariants = cva('ds:w-full', {\n variants: {\n layout: {\n card: 'ds:max-w-[400px]',\n split: 'ds:max-w-[400px] ds:lg:max-w-[480px]',\n },\n },\n defaultVariants: { layout: 'card' },\n});\n\n// The card's own lockup hides at lg+ in `split` (the brand panel shows it there).\nconst connectCardLockupVariants = cva('', {\n variants: {\n layout: { card: '', split: 'ds:lg:hidden' },\n },\n defaultVariants: { layout: 'card' },\n});\n\n/**\n * The pre-auth \"Connect with AlfaDocs\" screen. Centred white card on the\n * warm-grey canvas with the AlfaDocs wordmark + product name, copy, an error\n * slot, and the primary connect CTA. An opt-in `layout=\"split\"` adds a desktop\n * two-panel brand layout (lg+). Presentational — `onConnect` should call\n * `useAlfadocsAuth().connect()`, which redirects the browser to the server-side\n * BFF that runs the real OAuth2 + PKCE flow.\n */\nexport const ConnectWithAlfadocs = forwardRef<\n HTMLDivElement,\n ConnectWithAlfadocsProps\n>(\n (\n {\n productName,\n title,\n description,\n connectLabel,\n status = 'idle',\n error,\n onConnect,\n footer,\n layout = 'card',\n brandPanel,\n className,\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n data-component=\"connect-with-alfadocs\"\n className={`${connectRootVariants({ layout })} ${className ?? ''}`}\n >\n {layout === 'split' ? (\n // Desktop brand panel (lg+ only): a bold `--primary` surface with the\n // monochrome lockup riding the `--primary-foreground` ink, plus an\n // optional `brandPanel` slot. Decorative — the card carries the real\n // heading + CTA, and shows its own lockup below `lg:`.\n <div className=\"ds:hidden ds:lg:flex ds:lg:w-[55%] ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:ps-[var(--spacing-2xl)] ds:pe-[var(--spacing-2xl)] ds:pt-[var(--spacing-2xl)] ds:pb-[var(--spacing-2xl)] ds:text-start\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n monochrome\n tone=\"inherit\"\n variant=\"maker\"\n />\n {brandPanel ? (\n <div className=\"type-body ds:max-w-[28rem] ds:text-start\">\n {brandPanel}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className=\"ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]\">\n <Card className={connectCardWidthVariants({ layout })}>\n <Card.Body className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n variant=\"maker\"\n className={connectCardLockupVariants({ layout })}\n />\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <h1 className=\"type-title-card\">{title}</h1>\n <p className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {description}\n </p>\n </div>\n {status === 'error' && error ? (\n <Alert variant=\"error\" className=\"ds:w-full ds:text-start\">\n {error}\n </Alert>\n ) : null}\n <SignInWithAlfadocsButton\n intent=\"primary\"\n className=\"ds:w-full\"\n loading={status === 'connecting'}\n onClick={onConnect}\n label={connectLabel}\n data-testid=\"connect-with-alfadocs-button\"\n />\n {footer ? (\n <div className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {footer}\n </div>\n ) : null}\n </Card.Body>\n </Card>\n </div>\n </div>\n );\n },\n);\n\nConnectWithAlfadocs.displayName = 'ConnectWithAlfadocs';\n"],"names":["lockup","cva","productName","makerRoot","ProductLockup","forwardRef","name","variant","monochrome","tone","size","className","props","ref","inherit","markInk","nameInk","byInk","letteringInk","jsxs","jsx","AlfadocsLogoMark","AlfadocsLogoNeg","Logo","formatBadgeCount","count","AccountMenu","user","labels","onSignOut","onToggleFullscreen","t","useTranslation","fullscreenLabel","DropdownMenu","Avatar","Fragment","Maximize2","LogOut","MarketplaceSidebarNav","nav","renderLink","SidebarBody","item","badge","inner","SidebarItemIcon","SidebarItemLabel","SidebarItemBadge","SidebarItem","shellMainVariants","EmbeddedTabStrip","ariaLabel","tabRenderLink","href","children","ariaCurrent","TabBar","MarketplaceAppShell","productHref","sidebarState","mainAriaLabel","headerBrand","HeaderBrand","themePref","accessibility","resolvedTheme","useTheme","hasExplicitOverride","themeBase","themeAccessible","sidebarOpen","setSidebarOpen","useState","shell","TooltipProvider","AppFrame","Header","HeaderStart","HeaderSkipLink","HeaderMenuButton","HeaderCenter","HeaderEnd","HeaderSettings","Sidebar","embedded","content","ThemeRoot","connectRootVariants","connectCardWidthVariants","connectCardLockupVariants","ConnectWithAlfadocs","title","description","connectLabel","status","error","onConnect","footer","layout","brandPanel","Card","Alert","SignInWithAlfadocsButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,KAASC,EAAI,2DAA2D,GAQxEC,KAAcD;AAAA,EAClB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,QAKJ,UAAU;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA;AAAA;AAAA;AAAA,QAKF,OAAO;AAAA,MAAA;AAAA,I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