@designa8/vibedesign-v6 1.6.9 → 1.8.4
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/README.md +1 -1
- package/dist/index.cjs +249 -9
- package/dist/index.js +249 -9
- package/dist/styles.css +51 -6
- package/package.json +11 -1
- package/src/atoms/FilterTabBar/FilterTabBar.tsx +9 -17
- package/src/atoms/FilterTabBar/preview.tsx +79 -58
- package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +253 -0
- package/src/atoms/PreviewToolbar/index.ts +2 -0
- package/src/atoms/PreviewToolbar/preview.tsx +81 -0
- package/src/atoms/Typography/Typography.tsx +107 -0
- package/src/atoms/Typography/index.ts +2 -0
- package/src/atoms/Typography/preview.tsx +132 -0
- package/src/index.ts +2 -0
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -39,8 +39,10 @@ __export(src_exports, {
|
|
|
39
39
|
Input: () => Input,
|
|
40
40
|
Modal: () => Modal,
|
|
41
41
|
NavItem: () => NavItem,
|
|
42
|
+
PreviewToolbar: () => PreviewToolbar,
|
|
42
43
|
PromptInputBar: () => PromptInputBar,
|
|
43
44
|
TopNavbar: () => TopNavbar,
|
|
45
|
+
Typography: () => Typography,
|
|
44
46
|
UpgradeCard: () => UpgradeCard,
|
|
45
47
|
WorkspaceMenu: () => WorkspaceMenu
|
|
46
48
|
});
|
|
@@ -3073,28 +3075,24 @@ var FilterTabBar = import_react13.default.forwardRef(
|
|
|
3073
3075
|
"aria-label": "Filter tabs",
|
|
3074
3076
|
className: [
|
|
3075
3077
|
"inline-flex items-center gap-xs p-xs",
|
|
3076
|
-
"bg-
|
|
3078
|
+
"bg-canvas border border-hairline rounded-xl shadow-sm",
|
|
3077
3079
|
className
|
|
3078
3080
|
].filter(Boolean).join(" "),
|
|
3079
3081
|
...rest,
|
|
3080
3082
|
children: tabs.map((tab) => {
|
|
3081
3083
|
const isActive = tab.value === value;
|
|
3082
|
-
const iconOnly = !!tab.icon && !tab.label;
|
|
3083
3084
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3084
3085
|
Button,
|
|
3085
3086
|
{
|
|
3086
3087
|
role: "tab",
|
|
3087
3088
|
"aria-selected": isActive,
|
|
3088
|
-
"aria-label": tab
|
|
3089
|
+
"aria-label": tab.label ?? tab.value,
|
|
3089
3090
|
variant: isActive ? "primary" : "ghost",
|
|
3090
3091
|
size: "sm",
|
|
3091
3092
|
onClick: () => onChange(tab.value),
|
|
3092
|
-
className:
|
|
3093
|
-
"transition-[background-color,color,box-shadow] duration-200 ease-in-out",
|
|
3094
|
-
iconOnly ? "!px-xs aspect-square" : ""
|
|
3095
|
-
].filter(Boolean).join(" "),
|
|
3093
|
+
className: "gap-xs",
|
|
3096
3094
|
children: [
|
|
3097
|
-
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex items-center justify-center
|
|
3095
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
3098
3096
|
tab.label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: tab.label }),
|
|
3099
3097
|
tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3100
3098
|
"span",
|
|
@@ -3104,7 +3102,7 @@ var FilterTabBar = import_react13.default.forwardRef(
|
|
|
3104
3102
|
"min-w-[1.25rem] h-5 px-xs rounded-sm",
|
|
3105
3103
|
"text-caption leading-none",
|
|
3106
3104
|
"transition-[background-color,color] duration-200 ease-in-out",
|
|
3107
|
-
isActive ? "bg-
|
|
3105
|
+
isActive ? "bg-ink text-canvas" : "bg-surface-strong text-muted"
|
|
3108
3106
|
].filter(Boolean).join(" "),
|
|
3109
3107
|
"aria-label": `${tab.count} items`,
|
|
3110
3108
|
children: tab.count
|
|
@@ -3229,3 +3227,245 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3229
3227
|
}
|
|
3230
3228
|
);
|
|
3231
3229
|
Modal.displayName = "Modal";
|
|
3230
|
+
|
|
3231
|
+
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
3232
|
+
var import_react15 = __toESM(require("react"));
|
|
3233
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3234
|
+
var DesktopIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8 21h8M12 17v4" })
|
|
3237
|
+
] });
|
|
3238
|
+
var SidebarIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M9 3v18" })
|
|
3241
|
+
] });
|
|
3242
|
+
var MobileIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
3245
|
+
] });
|
|
3246
|
+
var ExpandIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
3247
|
+
var InspectIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M12 8v4l3 3" }),
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
3251
|
+
] });
|
|
3252
|
+
var MoonIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
3253
|
+
var FullscreenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3254
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("polyline", { points: "9 21 3 21 3 15" }),
|
|
3256
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3257
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3258
|
+
] });
|
|
3259
|
+
var DotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
3263
|
+
] });
|
|
3264
|
+
var VIEWPORT_OPTIONS = [
|
|
3265
|
+
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
3266
|
+
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
3267
|
+
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
3268
|
+
];
|
|
3269
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3270
|
+
Button,
|
|
3271
|
+
{
|
|
3272
|
+
variant: active ? "primary" : "ghost",
|
|
3273
|
+
size: "sm",
|
|
3274
|
+
"aria-label": label,
|
|
3275
|
+
"aria-pressed": active,
|
|
3276
|
+
onClick,
|
|
3277
|
+
className: ["!w-8 !h-8 !p-0 rounded-sm shrink-0", active ? "" : "text-muted"].join(" "),
|
|
3278
|
+
children
|
|
3279
|
+
}
|
|
3280
|
+
);
|
|
3281
|
+
var PreviewToolbar = import_react15.default.forwardRef(
|
|
3282
|
+
({
|
|
3283
|
+
viewport = "desktop",
|
|
3284
|
+
onViewportChange,
|
|
3285
|
+
darkMode = false,
|
|
3286
|
+
onDarkToggle,
|
|
3287
|
+
inspecting = false,
|
|
3288
|
+
onInspectTokens,
|
|
3289
|
+
onFullscreen,
|
|
3290
|
+
onExpand,
|
|
3291
|
+
modelLabel = "Sonnet 4.6",
|
|
3292
|
+
kindLabel = "ATOM",
|
|
3293
|
+
onOverflow,
|
|
3294
|
+
className = ""
|
|
3295
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3296
|
+
"div",
|
|
3297
|
+
{
|
|
3298
|
+
ref,
|
|
3299
|
+
role: "toolbar",
|
|
3300
|
+
"aria-label": "Preview toolbar",
|
|
3301
|
+
className: [
|
|
3302
|
+
"inline-flex items-center gap-sm px-sm py-xs",
|
|
3303
|
+
"bg-canvas border border-hairline rounded-xl shadow-md",
|
|
3304
|
+
className
|
|
3305
|
+
].filter(Boolean).join(" "),
|
|
3306
|
+
children: [
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3308
|
+
"div",
|
|
3309
|
+
{
|
|
3310
|
+
role: "group",
|
|
3311
|
+
"aria-label": "Viewport size",
|
|
3312
|
+
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs",
|
|
3313
|
+
children: [
|
|
3314
|
+
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3315
|
+
ViewportBtn,
|
|
3316
|
+
{
|
|
3317
|
+
label,
|
|
3318
|
+
active: viewport === id,
|
|
3319
|
+
onClick: () => onViewportChange?.(id),
|
|
3320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, {})
|
|
3321
|
+
},
|
|
3322
|
+
id
|
|
3323
|
+
)),
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-px h-4 bg-hairline mx-xxs", "aria-hidden": true }),
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3326
|
+
Button,
|
|
3327
|
+
{
|
|
3328
|
+
variant: "ghost",
|
|
3329
|
+
size: "sm",
|
|
3330
|
+
"aria-label": "Expand preview",
|
|
3331
|
+
onClick: onExpand,
|
|
3332
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ExpandIcon, {})
|
|
3334
|
+
}
|
|
3335
|
+
)
|
|
3336
|
+
]
|
|
3337
|
+
}
|
|
3338
|
+
),
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3340
|
+
Button,
|
|
3341
|
+
{
|
|
3342
|
+
variant: inspecting ? "primary" : "secondary",
|
|
3343
|
+
size: "sm",
|
|
3344
|
+
"aria-pressed": inspecting,
|
|
3345
|
+
onClick: onInspectTokens,
|
|
3346
|
+
className: "gap-xs rounded-xl",
|
|
3347
|
+
children: [
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InspectIcon, {}),
|
|
3349
|
+
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
3350
|
+
]
|
|
3351
|
+
}
|
|
3352
|
+
),
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3354
|
+
Button,
|
|
3355
|
+
{
|
|
3356
|
+
variant: darkMode ? "primary" : "secondary",
|
|
3357
|
+
size: "sm",
|
|
3358
|
+
"aria-pressed": darkMode,
|
|
3359
|
+
onClick: onDarkToggle,
|
|
3360
|
+
className: "gap-xs rounded-xl",
|
|
3361
|
+
children: [
|
|
3362
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MoonIcon2, {}),
|
|
3363
|
+
"Dark"
|
|
3364
|
+
]
|
|
3365
|
+
}
|
|
3366
|
+
),
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3368
|
+
Button,
|
|
3369
|
+
{
|
|
3370
|
+
variant: "secondary",
|
|
3371
|
+
size: "sm",
|
|
3372
|
+
onClick: onFullscreen,
|
|
3373
|
+
className: "gap-xs rounded-xl",
|
|
3374
|
+
children: [
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FullscreenIcon, {}),
|
|
3376
|
+
"Fullscreen"
|
|
3377
|
+
]
|
|
3378
|
+
}
|
|
3379
|
+
),
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3381
|
+
Chip,
|
|
3382
|
+
{
|
|
3383
|
+
label: modelLabel ?? "",
|
|
3384
|
+
variant: "default",
|
|
3385
|
+
size: "md",
|
|
3386
|
+
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
3387
|
+
}
|
|
3388
|
+
),
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3390
|
+
Chip,
|
|
3391
|
+
{
|
|
3392
|
+
label: kindLabel ?? "",
|
|
3393
|
+
variant: "default",
|
|
3394
|
+
size: "md",
|
|
3395
|
+
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
3396
|
+
}
|
|
3397
|
+
),
|
|
3398
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3399
|
+
Button,
|
|
3400
|
+
{
|
|
3401
|
+
variant: "ghost",
|
|
3402
|
+
size: "sm",
|
|
3403
|
+
"aria-label": "More options",
|
|
3404
|
+
onClick: onOverflow,
|
|
3405
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DotsIcon, {})
|
|
3407
|
+
}
|
|
3408
|
+
)
|
|
3409
|
+
]
|
|
3410
|
+
}
|
|
3411
|
+
)
|
|
3412
|
+
);
|
|
3413
|
+
PreviewToolbar.displayName = "PreviewToolbar";
|
|
3414
|
+
|
|
3415
|
+
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3416
|
+
var import_react16 = __toESM(require("react"));
|
|
3417
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3418
|
+
var roleTagMap = {
|
|
3419
|
+
"display-lg": "h1",
|
|
3420
|
+
"heading-lg": "h2",
|
|
3421
|
+
"heading-md": "h3",
|
|
3422
|
+
"heading-sm": "h4",
|
|
3423
|
+
"body-lg": "p",
|
|
3424
|
+
"body-md": "p",
|
|
3425
|
+
"body-sm": "p",
|
|
3426
|
+
caption: "span"
|
|
3427
|
+
};
|
|
3428
|
+
var roleClassMap = {
|
|
3429
|
+
"display-lg": "text-display-lg",
|
|
3430
|
+
"heading-lg": "text-heading-lg",
|
|
3431
|
+
"heading-md": "text-heading-md",
|
|
3432
|
+
"heading-sm": "text-heading-sm",
|
|
3433
|
+
"body-lg": "text-body-lg",
|
|
3434
|
+
"body-md": "text-body-md",
|
|
3435
|
+
"body-sm": "text-body-sm",
|
|
3436
|
+
caption: "text-caption"
|
|
3437
|
+
};
|
|
3438
|
+
var colorClassMap = {
|
|
3439
|
+
ink: "text-ink",
|
|
3440
|
+
body: "text-body",
|
|
3441
|
+
muted: "text-muted",
|
|
3442
|
+
"muted-soft": "text-muted-soft",
|
|
3443
|
+
primary: "text-primary",
|
|
3444
|
+
"semantic-error": "text-semantic-error",
|
|
3445
|
+
"semantic-success": "text-semantic-success",
|
|
3446
|
+
"semantic-warning": "text-semantic-warning",
|
|
3447
|
+
"on-primary": "text-on-primary"
|
|
3448
|
+
};
|
|
3449
|
+
var Typography = import_react16.default.forwardRef(
|
|
3450
|
+
({
|
|
3451
|
+
role = "body-md",
|
|
3452
|
+
color = "ink",
|
|
3453
|
+
as,
|
|
3454
|
+
truncate = false,
|
|
3455
|
+
uppercase = false,
|
|
3456
|
+
className = "",
|
|
3457
|
+
children,
|
|
3458
|
+
...rest
|
|
3459
|
+
}, ref) => {
|
|
3460
|
+
const Tag = as ?? roleTagMap[role];
|
|
3461
|
+
const classes = [
|
|
3462
|
+
roleClassMap[role],
|
|
3463
|
+
colorClassMap[color],
|
|
3464
|
+
truncate ? "truncate" : "",
|
|
3465
|
+
uppercase ? "uppercase tracking-wide" : "",
|
|
3466
|
+
className
|
|
3467
|
+
].filter(Boolean).join(" ");
|
|
3468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tag, { ref, className: classes, ...rest, children });
|
|
3469
|
+
}
|
|
3470
|
+
);
|
|
3471
|
+
Typography.displayName = "Typography";
|
package/dist/index.js
CHANGED
|
@@ -3027,28 +3027,24 @@ var FilterTabBar = React13.forwardRef(
|
|
|
3027
3027
|
"aria-label": "Filter tabs",
|
|
3028
3028
|
className: [
|
|
3029
3029
|
"inline-flex items-center gap-xs p-xs",
|
|
3030
|
-
"bg-
|
|
3030
|
+
"bg-canvas border border-hairline rounded-xl shadow-sm",
|
|
3031
3031
|
className
|
|
3032
3032
|
].filter(Boolean).join(" "),
|
|
3033
3033
|
...rest,
|
|
3034
3034
|
children: tabs.map((tab) => {
|
|
3035
3035
|
const isActive = tab.value === value;
|
|
3036
|
-
const iconOnly = !!tab.icon && !tab.label;
|
|
3037
3036
|
return /* @__PURE__ */ jsxs13(
|
|
3038
3037
|
Button,
|
|
3039
3038
|
{
|
|
3040
3039
|
role: "tab",
|
|
3041
3040
|
"aria-selected": isActive,
|
|
3042
|
-
"aria-label": tab
|
|
3041
|
+
"aria-label": tab.label ?? tab.value,
|
|
3043
3042
|
variant: isActive ? "primary" : "ghost",
|
|
3044
3043
|
size: "sm",
|
|
3045
3044
|
onClick: () => onChange(tab.value),
|
|
3046
|
-
className:
|
|
3047
|
-
"transition-[background-color,color,box-shadow] duration-200 ease-in-out",
|
|
3048
|
-
iconOnly ? "!px-xs aspect-square" : ""
|
|
3049
|
-
].filter(Boolean).join(" "),
|
|
3045
|
+
className: "gap-xs",
|
|
3050
3046
|
children: [
|
|
3051
|
-
tab.icon && /* @__PURE__ */ jsx13("span", { className: "inline-flex items-center justify-center
|
|
3047
|
+
tab.icon && /* @__PURE__ */ jsx13("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
3052
3048
|
tab.label && /* @__PURE__ */ jsx13("span", { children: tab.label }),
|
|
3053
3049
|
tab.count !== void 0 && /* @__PURE__ */ jsx13(
|
|
3054
3050
|
"span",
|
|
@@ -3058,7 +3054,7 @@ var FilterTabBar = React13.forwardRef(
|
|
|
3058
3054
|
"min-w-[1.25rem] h-5 px-xs rounded-sm",
|
|
3059
3055
|
"text-caption leading-none",
|
|
3060
3056
|
"transition-[background-color,color] duration-200 ease-in-out",
|
|
3061
|
-
isActive ? "bg-
|
|
3057
|
+
isActive ? "bg-ink text-canvas" : "bg-surface-strong text-muted"
|
|
3062
3058
|
].filter(Boolean).join(" "),
|
|
3063
3059
|
"aria-label": `${tab.count} items`,
|
|
3064
3060
|
children: tab.count
|
|
@@ -3183,6 +3179,248 @@ var Modal = React14.forwardRef(
|
|
|
3183
3179
|
}
|
|
3184
3180
|
);
|
|
3185
3181
|
Modal.displayName = "Modal";
|
|
3182
|
+
|
|
3183
|
+
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
3184
|
+
import React15 from "react";
|
|
3185
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3186
|
+
var DesktopIcon = () => /* @__PURE__ */ jsxs15("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3187
|
+
/* @__PURE__ */ jsx15("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
3188
|
+
/* @__PURE__ */ jsx15("path", { d: "M8 21h8M12 17v4" })
|
|
3189
|
+
] });
|
|
3190
|
+
var SidebarIcon2 = () => /* @__PURE__ */ jsxs15("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3191
|
+
/* @__PURE__ */ jsx15("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
|
|
3192
|
+
/* @__PURE__ */ jsx15("path", { d: "M9 3v18" })
|
|
3193
|
+
] });
|
|
3194
|
+
var MobileIcon = () => /* @__PURE__ */ jsxs15("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3195
|
+
/* @__PURE__ */ jsx15("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
3196
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
3197
|
+
] });
|
|
3198
|
+
var ExpandIcon = () => /* @__PURE__ */ jsx15("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
3199
|
+
var InspectIcon = () => /* @__PURE__ */ jsxs15("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3200
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "12", r: "9" }),
|
|
3201
|
+
/* @__PURE__ */ jsx15("path", { d: "M12 8v4l3 3" }),
|
|
3202
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
3203
|
+
] });
|
|
3204
|
+
var MoonIcon2 = () => /* @__PURE__ */ jsx15("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
3205
|
+
var FullscreenIcon = () => /* @__PURE__ */ jsxs15("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3206
|
+
/* @__PURE__ */ jsx15("polyline", { points: "15 3 21 3 21 9" }),
|
|
3207
|
+
/* @__PURE__ */ jsx15("polyline", { points: "9 21 3 21 3 15" }),
|
|
3208
|
+
/* @__PURE__ */ jsx15("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3209
|
+
/* @__PURE__ */ jsx15("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3210
|
+
] });
|
|
3211
|
+
var DotsIcon = () => /* @__PURE__ */ jsxs15("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
3212
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
3213
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
3214
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
3215
|
+
] });
|
|
3216
|
+
var VIEWPORT_OPTIONS = [
|
|
3217
|
+
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
3218
|
+
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
3219
|
+
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
3220
|
+
];
|
|
3221
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx15(
|
|
3222
|
+
Button,
|
|
3223
|
+
{
|
|
3224
|
+
variant: active ? "primary" : "ghost",
|
|
3225
|
+
size: "sm",
|
|
3226
|
+
"aria-label": label,
|
|
3227
|
+
"aria-pressed": active,
|
|
3228
|
+
onClick,
|
|
3229
|
+
className: ["!w-8 !h-8 !p-0 rounded-sm shrink-0", active ? "" : "text-muted"].join(" "),
|
|
3230
|
+
children
|
|
3231
|
+
}
|
|
3232
|
+
);
|
|
3233
|
+
var PreviewToolbar = React15.forwardRef(
|
|
3234
|
+
({
|
|
3235
|
+
viewport = "desktop",
|
|
3236
|
+
onViewportChange,
|
|
3237
|
+
darkMode = false,
|
|
3238
|
+
onDarkToggle,
|
|
3239
|
+
inspecting = false,
|
|
3240
|
+
onInspectTokens,
|
|
3241
|
+
onFullscreen,
|
|
3242
|
+
onExpand,
|
|
3243
|
+
modelLabel = "Sonnet 4.6",
|
|
3244
|
+
kindLabel = "ATOM",
|
|
3245
|
+
onOverflow,
|
|
3246
|
+
className = ""
|
|
3247
|
+
}, ref) => /* @__PURE__ */ jsxs15(
|
|
3248
|
+
"div",
|
|
3249
|
+
{
|
|
3250
|
+
ref,
|
|
3251
|
+
role: "toolbar",
|
|
3252
|
+
"aria-label": "Preview toolbar",
|
|
3253
|
+
className: [
|
|
3254
|
+
"inline-flex items-center gap-sm px-sm py-xs",
|
|
3255
|
+
"bg-canvas border border-hairline rounded-xl shadow-md",
|
|
3256
|
+
className
|
|
3257
|
+
].filter(Boolean).join(" "),
|
|
3258
|
+
children: [
|
|
3259
|
+
/* @__PURE__ */ jsxs15(
|
|
3260
|
+
"div",
|
|
3261
|
+
{
|
|
3262
|
+
role: "group",
|
|
3263
|
+
"aria-label": "Viewport size",
|
|
3264
|
+
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs",
|
|
3265
|
+
children: [
|
|
3266
|
+
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ jsx15(
|
|
3267
|
+
ViewportBtn,
|
|
3268
|
+
{
|
|
3269
|
+
label,
|
|
3270
|
+
active: viewport === id,
|
|
3271
|
+
onClick: () => onViewportChange?.(id),
|
|
3272
|
+
children: /* @__PURE__ */ jsx15(Icon, {})
|
|
3273
|
+
},
|
|
3274
|
+
id
|
|
3275
|
+
)),
|
|
3276
|
+
/* @__PURE__ */ jsx15("div", { className: "w-px h-4 bg-hairline mx-xxs", "aria-hidden": true }),
|
|
3277
|
+
/* @__PURE__ */ jsx15(
|
|
3278
|
+
Button,
|
|
3279
|
+
{
|
|
3280
|
+
variant: "ghost",
|
|
3281
|
+
size: "sm",
|
|
3282
|
+
"aria-label": "Expand preview",
|
|
3283
|
+
onClick: onExpand,
|
|
3284
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3285
|
+
children: /* @__PURE__ */ jsx15(ExpandIcon, {})
|
|
3286
|
+
}
|
|
3287
|
+
)
|
|
3288
|
+
]
|
|
3289
|
+
}
|
|
3290
|
+
),
|
|
3291
|
+
/* @__PURE__ */ jsxs15(
|
|
3292
|
+
Button,
|
|
3293
|
+
{
|
|
3294
|
+
variant: inspecting ? "primary" : "secondary",
|
|
3295
|
+
size: "sm",
|
|
3296
|
+
"aria-pressed": inspecting,
|
|
3297
|
+
onClick: onInspectTokens,
|
|
3298
|
+
className: "gap-xs rounded-xl",
|
|
3299
|
+
children: [
|
|
3300
|
+
/* @__PURE__ */ jsx15(InspectIcon, {}),
|
|
3301
|
+
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
3302
|
+
]
|
|
3303
|
+
}
|
|
3304
|
+
),
|
|
3305
|
+
/* @__PURE__ */ jsxs15(
|
|
3306
|
+
Button,
|
|
3307
|
+
{
|
|
3308
|
+
variant: darkMode ? "primary" : "secondary",
|
|
3309
|
+
size: "sm",
|
|
3310
|
+
"aria-pressed": darkMode,
|
|
3311
|
+
onClick: onDarkToggle,
|
|
3312
|
+
className: "gap-xs rounded-xl",
|
|
3313
|
+
children: [
|
|
3314
|
+
/* @__PURE__ */ jsx15(MoonIcon2, {}),
|
|
3315
|
+
"Dark"
|
|
3316
|
+
]
|
|
3317
|
+
}
|
|
3318
|
+
),
|
|
3319
|
+
/* @__PURE__ */ jsxs15(
|
|
3320
|
+
Button,
|
|
3321
|
+
{
|
|
3322
|
+
variant: "secondary",
|
|
3323
|
+
size: "sm",
|
|
3324
|
+
onClick: onFullscreen,
|
|
3325
|
+
className: "gap-xs rounded-xl",
|
|
3326
|
+
children: [
|
|
3327
|
+
/* @__PURE__ */ jsx15(FullscreenIcon, {}),
|
|
3328
|
+
"Fullscreen"
|
|
3329
|
+
]
|
|
3330
|
+
}
|
|
3331
|
+
),
|
|
3332
|
+
/* @__PURE__ */ jsx15(
|
|
3333
|
+
Chip,
|
|
3334
|
+
{
|
|
3335
|
+
label: modelLabel ?? "",
|
|
3336
|
+
variant: "default",
|
|
3337
|
+
size: "md",
|
|
3338
|
+
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
3339
|
+
}
|
|
3340
|
+
),
|
|
3341
|
+
/* @__PURE__ */ jsx15(
|
|
3342
|
+
Chip,
|
|
3343
|
+
{
|
|
3344
|
+
label: kindLabel ?? "",
|
|
3345
|
+
variant: "default",
|
|
3346
|
+
size: "md",
|
|
3347
|
+
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
3348
|
+
}
|
|
3349
|
+
),
|
|
3350
|
+
/* @__PURE__ */ jsx15(
|
|
3351
|
+
Button,
|
|
3352
|
+
{
|
|
3353
|
+
variant: "ghost",
|
|
3354
|
+
size: "sm",
|
|
3355
|
+
"aria-label": "More options",
|
|
3356
|
+
onClick: onOverflow,
|
|
3357
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3358
|
+
children: /* @__PURE__ */ jsx15(DotsIcon, {})
|
|
3359
|
+
}
|
|
3360
|
+
)
|
|
3361
|
+
]
|
|
3362
|
+
}
|
|
3363
|
+
)
|
|
3364
|
+
);
|
|
3365
|
+
PreviewToolbar.displayName = "PreviewToolbar";
|
|
3366
|
+
|
|
3367
|
+
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3368
|
+
import React16 from "react";
|
|
3369
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3370
|
+
var roleTagMap = {
|
|
3371
|
+
"display-lg": "h1",
|
|
3372
|
+
"heading-lg": "h2",
|
|
3373
|
+
"heading-md": "h3",
|
|
3374
|
+
"heading-sm": "h4",
|
|
3375
|
+
"body-lg": "p",
|
|
3376
|
+
"body-md": "p",
|
|
3377
|
+
"body-sm": "p",
|
|
3378
|
+
caption: "span"
|
|
3379
|
+
};
|
|
3380
|
+
var roleClassMap = {
|
|
3381
|
+
"display-lg": "text-display-lg",
|
|
3382
|
+
"heading-lg": "text-heading-lg",
|
|
3383
|
+
"heading-md": "text-heading-md",
|
|
3384
|
+
"heading-sm": "text-heading-sm",
|
|
3385
|
+
"body-lg": "text-body-lg",
|
|
3386
|
+
"body-md": "text-body-md",
|
|
3387
|
+
"body-sm": "text-body-sm",
|
|
3388
|
+
caption: "text-caption"
|
|
3389
|
+
};
|
|
3390
|
+
var colorClassMap = {
|
|
3391
|
+
ink: "text-ink",
|
|
3392
|
+
body: "text-body",
|
|
3393
|
+
muted: "text-muted",
|
|
3394
|
+
"muted-soft": "text-muted-soft",
|
|
3395
|
+
primary: "text-primary",
|
|
3396
|
+
"semantic-error": "text-semantic-error",
|
|
3397
|
+
"semantic-success": "text-semantic-success",
|
|
3398
|
+
"semantic-warning": "text-semantic-warning",
|
|
3399
|
+
"on-primary": "text-on-primary"
|
|
3400
|
+
};
|
|
3401
|
+
var Typography = React16.forwardRef(
|
|
3402
|
+
({
|
|
3403
|
+
role = "body-md",
|
|
3404
|
+
color = "ink",
|
|
3405
|
+
as,
|
|
3406
|
+
truncate = false,
|
|
3407
|
+
uppercase = false,
|
|
3408
|
+
className = "",
|
|
3409
|
+
children,
|
|
3410
|
+
...rest
|
|
3411
|
+
}, ref) => {
|
|
3412
|
+
const Tag = as ?? roleTagMap[role];
|
|
3413
|
+
const classes = [
|
|
3414
|
+
roleClassMap[role],
|
|
3415
|
+
colorClassMap[color],
|
|
3416
|
+
truncate ? "truncate" : "",
|
|
3417
|
+
uppercase ? "uppercase tracking-wide" : "",
|
|
3418
|
+
className
|
|
3419
|
+
].filter(Boolean).join(" ");
|
|
3420
|
+
return /* @__PURE__ */ jsx16(Tag, { ref, className: classes, ...rest, children });
|
|
3421
|
+
}
|
|
3422
|
+
);
|
|
3423
|
+
Typography.displayName = "Typography";
|
|
3186
3424
|
export {
|
|
3187
3425
|
AppLayout,
|
|
3188
3426
|
AppSidebar,
|
|
@@ -3194,8 +3432,10 @@ export {
|
|
|
3194
3432
|
Input,
|
|
3195
3433
|
Modal,
|
|
3196
3434
|
NavItem,
|
|
3435
|
+
PreviewToolbar,
|
|
3197
3436
|
PromptInputBar,
|
|
3198
3437
|
TopNavbar,
|
|
3438
|
+
Typography,
|
|
3199
3439
|
UpgradeCard,
|
|
3200
3440
|
WorkspaceMenu
|
|
3201
3441
|
};
|