@designa8/vibedesign-v6 1.20.12 → 1.20.13

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 CHANGED
@@ -1,51 +1,25 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Generated design system, version **1.20.12**.
3
+ Complete design system generated by Atoms Design, version **1.20.13**.
4
+ Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
+ never hardcode visual values in consumer code.
4
6
 
5
- ## Local install (npm link)
6
-
7
- From this directory:
8
-
9
- ```bash
10
- npm link
11
- ```
12
-
13
- Then, in the consumer app:
7
+ ## Install
14
8
 
15
9
  ```bash
16
- npm link @plasma/vibedesign-v6
10
+ npm install @plasma/vibedesign-v6
17
11
  ```
18
12
 
19
13
  ## Imports
20
14
 
21
15
  ```ts
22
- import { /* atoms */ } from "@plasma/vibedesign-v6";
16
+ import { Button, Input } from "@plasma/vibedesign-v6";
23
17
  ```
24
18
 
25
19
  The CSS (design tokens, Tailwind utilities, and the design system font loaded
26
20
  from Google Fonts) is bundled into the package entry point and injected
27
21
  automatically by your bundler — no separate CSS import needed.
28
22
 
29
- ## Vite configuration (local npm link only)
30
-
31
- When using `npm link`, the package fonts live outside your project root and
32
- Vite's dev server will block them by default. Add `server.fs.allow` to your
33
- `vite.config.js` / `vite.config.ts`:
34
-
35
- ```js
36
- export default defineConfig({
37
- server: {
38
- fs: {
39
- allow: ['..', '/path/to/.published-packages'],
40
- },
41
- },
42
- })
43
- ```
44
-
45
- Replace `/path/to/.published-packages` with the absolute path printed by
46
- `npm link` (the directory that contains this package folder).
47
- This step is not needed when the package is installed from a real registry.
48
-
49
23
  ## Global CSS compatibility
50
24
 
51
25
  The package's utility classes (spacing, colours, border-radius, etc.) are
package/dist/index.cjs CHANGED
@@ -142,7 +142,9 @@ var ICON_REGISTRY = {
142
142
  "image-placeholder-dashed-frame": { viewBox: "0 0 72 72", paths: ["M4 4h64v64H4z", "M14 14h20v20H14z", "M38 14h20v20H38z", "M14 38h44v12H14z"] },
143
143
  "image-photo-picture": { viewBox: "0 0 24 24", paths: ["M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z", "M11 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"] },
144
144
  "video-film-clapperboard": { viewBox: "0 0 24 24", paths: ["M4 6h10a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z", "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"] },
145
- "minus-indeterminate": { viewBox: "0 0 24 24", paths: ["M5 12h14"] }
145
+ "minus-indeterminate": { viewBox: "0 0 24 24", paths: ["M5 12h14"] },
146
+ "cloud": { viewBox: "0 0 24 24", paths: ["M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16", "M8 19h9.5"] },
147
+ "download": { viewBox: "0 0 24 24", paths: ["M12 3v12", "M7 10l5 5 5-5", "M5 21h14"] }
146
148
  };
147
149
 
148
150
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -5259,113 +5261,20 @@ var defaultLines = [
5259
5261
  { text: "muted: {colors.muted}" },
5260
5262
  { text: "hairline: {colors.hairline}" }
5261
5263
  ];
5262
- var CloudIcon = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5263
- "svg",
5264
- {
5265
- viewBox: "0 0 24 24",
5266
- width: "16",
5267
- height: "16",
5268
- fill: "none",
5269
- stroke: "currentColor",
5270
- strokeWidth: "2",
5271
- strokeLinecap: "round",
5272
- strokeLinejoin: "round",
5273
- "aria-hidden": "true",
5274
- children: [
5275
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16" }),
5276
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M8 19h9.5" })
5277
- ]
5278
- }
5279
- );
5280
- var LinkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5281
- "svg",
5282
- {
5283
- viewBox: "0 0 24 24",
5284
- width: "16",
5285
- height: "16",
5286
- fill: "none",
5287
- stroke: "currentColor",
5288
- strokeWidth: "2",
5289
- strokeLinecap: "round",
5290
- strokeLinejoin: "round",
5291
- "aria-hidden": "true",
5292
- children: [
5293
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
5294
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
5295
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
5296
- ]
5297
- }
5298
- );
5299
- var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5300
- "svg",
5301
- {
5302
- viewBox: "0 0 24 24",
5303
- width: "14",
5304
- height: "14",
5305
- fill: "none",
5306
- stroke: "currentColor",
5307
- strokeWidth: "2",
5308
- strokeLinecap: "round",
5309
- strokeLinejoin: "round",
5310
- "aria-hidden": "true",
5311
- children: [
5312
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
5313
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })
5314
- ]
5315
- }
5316
- );
5317
- var DownloadIcon = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5318
- "svg",
5319
- {
5320
- viewBox: "0 0 24 24",
5321
- width: "14",
5322
- height: "14",
5323
- fill: "none",
5324
- stroke: "currentColor",
5325
- strokeWidth: "2",
5326
- strokeLinecap: "round",
5327
- strokeLinejoin: "round",
5328
- "aria-hidden": "true",
5329
- children: [
5330
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M12 3v12" }),
5331
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M7 10l5 5 5-5" }),
5332
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M5 21h14" })
5333
- ]
5334
- }
5335
- );
5336
- var SpinnerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5337
- "svg",
5338
- {
5339
- viewBox: "0 0 24 24",
5340
- width: "20",
5341
- height: "20",
5342
- fill: "none",
5343
- className: "animate-spin text-primary",
5344
- "aria-hidden": "true",
5345
- children: [
5346
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5347
- "circle",
5348
- {
5349
- cx: "12",
5350
- cy: "12",
5351
- r: "9",
5352
- stroke: "currentColor",
5353
- strokeWidth: "2.5",
5354
- strokeOpacity: "0.25"
5355
- }
5356
- ),
5357
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5358
- "path",
5359
- {
5360
- d: "M21 12a9 9 0 0 0-9-9",
5361
- stroke: "currentColor",
5362
- strokeWidth: "2.5",
5363
- strokeLinecap: "round"
5364
- }
5365
- )
5366
- ]
5264
+ var SOURCE_INFO = {
5265
+ production: {
5266
+ icon: "cloud",
5267
+ title: "Production (npm install)",
5268
+ description: "Generated for public npm registry consumption.",
5269
+ helper: "Consumer apps install from the public npm registry ('npm install')."
5270
+ },
5271
+ local: {
5272
+ icon: "external-link-arrow-up-right",
5273
+ title: "Local (npm link)",
5274
+ description: "Generated for local development with npm link.",
5275
+ helper: "Consumer apps resolve the package via a local 'npm link' during development."
5367
5276
  }
5368
- );
5277
+ };
5369
5278
  var ExportDesignMdModal = import_react23.default.forwardRef(
5370
5279
  ({
5371
5280
  isOpen,
@@ -5373,17 +5282,13 @@ var ExportDesignMdModal = import_react23.default.forwardRef(
5373
5282
  onExport,
5374
5283
  onDownload,
5375
5284
  onCopy,
5376
- onSourceChange,
5377
5285
  designSystemName = "Design System",
5378
5286
  defaultSource = "production",
5379
5287
  lines = defaultLines,
5380
5288
  loading = false
5381
5289
  }, ref) => {
5382
- const [source, setSource] = (0, import_react23.useState)(defaultSource);
5383
- const changeSource = (next) => {
5384
- setSource(next);
5385
- onSourceChange?.(next);
5386
- };
5290
+ const source = defaultSource;
5291
+ const info = SOURCE_INFO[source];
5387
5292
  const handleCopy = () => {
5388
5293
  const text = lines.map((l) => l.text).join("\n");
5389
5294
  if (typeof navigator !== "undefined" && navigator.clipboard) {
@@ -5402,7 +5307,7 @@ var ExportDesignMdModal = import_react23.default.forwardRef(
5402
5307
  size: "xl",
5403
5308
  footer: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
5404
5309
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Button, { variant: "secondary", size: "sm", onClick: onDownload, children: [
5405
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DownloadIcon, {}),
5310
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "download" }),
5406
5311
  "Download .md"
5407
5312
  ] }),
5408
5313
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-sm", children: [
@@ -5412,35 +5317,15 @@ var ExportDesignMdModal = import_react23.default.forwardRef(
5412
5317
  ] }),
5413
5318
  children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full space-y-lg", children: [
5414
5319
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-md", color: "muted", children: "Generate and export the DESIGN.md file for handoff to AI coding agents or your team." }),
5415
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-md", children: [
5416
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md", children: [
5417
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5418
- Button,
5419
- {
5420
- variant: source === "production" ? "primary" : "ghost",
5421
- size: "sm",
5422
- onClick: () => changeSource("production"),
5423
- children: [
5424
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CloudIcon, {}),
5425
- "Production"
5426
- ]
5427
- }
5428
- ),
5429
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5430
- Button,
5431
- {
5432
- variant: source === "local" ? "primary" : "ghost",
5433
- size: "sm",
5434
- onClick: () => changeSource("local"),
5435
- children: [
5436
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LinkIcon, {}),
5437
- "Local (npm link)"
5438
- ]
5439
- }
5440
- )
5320
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5321
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: info.icon }) }),
5322
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
5323
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: info.title }),
5324
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", children: info.description })
5441
5325
  ] }),
5442
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", className: "flex-1 min-w-[16rem]", children: source === "production" ? "Consumer apps install from the public npm registry ('npm install')." : "Consumer apps resolve the package via a local 'npm link' during development." })
5326
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Chip, { label: "Active", variant: "primary", size: "sm" })
5443
5327
  ] }),
5328
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", children: info.helper }),
5444
5329
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
5445
5330
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5446
5331
  Typography,
@@ -5461,7 +5346,7 @@ var ExportDesignMdModal = import_react23.default.forwardRef(
5461
5346
  onClick: handleCopy,
5462
5347
  className: "absolute top-sm right-sm",
5463
5348
  children: [
5464
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CopyIcon, {}),
5349
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "copy-clipboard" }),
5465
5350
  "Copy"
5466
5351
  ]
5467
5352
  }
@@ -5484,46 +5369,12 @@ var ExportDesignMdModal = import_react23.default.forwardRef(
5484
5369
  "aria-label": "Loading preview",
5485
5370
  className: "absolute inset-0 flex items-center justify-center gap-sm bg-canvas opacity-90",
5486
5371
  children: [
5487
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SpinnerIcon, {}),
5372
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "loading-spinner", className: "animate-spin text-primary" }),
5488
5373
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", children: "Loading preview\u2026" })
5489
5374
  ]
5490
5375
  }
5491
5376
  ) : null
5492
5377
  ] })
5493
- ] }),
5494
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full space-y-sm", children: [
5495
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5496
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CloudIcon, {}) }),
5497
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
5498
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Production (npm install)" }),
5499
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", children: "Generated for public npm registry consumption." })
5500
- ] }),
5501
- source === "production" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5502
- Button,
5503
- {
5504
- variant: "secondary",
5505
- size: "sm",
5506
- onClick: () => changeSource("production"),
5507
- children: "Switch"
5508
- }
5509
- )
5510
- ] }),
5511
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5512
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LinkIcon, {}) }),
5513
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
5514
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Local (npm link)" }),
5515
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { role: "body-sm", color: "muted", children: "Generated for local development with npm link." })
5516
- ] }),
5517
- source === "local" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5518
- Button,
5519
- {
5520
- variant: "secondary",
5521
- size: "sm",
5522
- onClick: () => changeSource("local"),
5523
- children: "Switch"
5524
- }
5525
- )
5526
- ] })
5527
5378
  ] })
5528
5379
  ] })
5529
5380
  }
@@ -6309,7 +6160,7 @@ var GlobeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { vi
6309
6160
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M12 3a13.5 13.5 0 0 1 0 18" }),
6310
6161
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M12 3a13.5 13.5 0 0 0 0 18" })
6311
6162
  ] });
6312
- var LinkIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6163
+ var LinkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6313
6164
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
6314
6165
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
6315
6166
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
@@ -6349,7 +6200,7 @@ var ChevronIcon2 = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6349
6200
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M9 6l6 6-6 6" })
6350
6201
  }
6351
6202
  );
6352
- var SpinnerIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
6203
+ var SpinnerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
6353
6204
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
6354
6205
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
6355
6206
  ] });
@@ -6405,7 +6256,7 @@ var PublishModal = import_react30.default.forwardRef(
6405
6256
  disabled: loading,
6406
6257
  "aria-busy": loading,
6407
6258
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
6408
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SpinnerIcon2, {}),
6259
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SpinnerIcon, {}),
6409
6260
  isProduction ? "Publishing\u2026" : "Linking\u2026"
6410
6261
  ] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
6411
6262
  }
@@ -6455,7 +6306,7 @@ var PublishModal = import_react30.default.forwardRef(
6455
6306
  !isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
6456
6307
  ].join(" "),
6457
6308
  children: [
6458
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(LinkIcon2, {}),
6309
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(LinkIcon, {}),
6459
6310
  "Local (npm link)"
6460
6311
  ]
6461
6312
  }
package/dist/index.js CHANGED
@@ -75,7 +75,9 @@ var ICON_REGISTRY = {
75
75
  "image-placeholder-dashed-frame": { viewBox: "0 0 72 72", paths: ["M4 4h64v64H4z", "M14 14h20v20H14z", "M38 14h20v20H38z", "M14 38h44v12H14z"] },
76
76
  "image-photo-picture": { viewBox: "0 0 24 24", paths: ["M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z", "M11 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"] },
77
77
  "video-film-clapperboard": { viewBox: "0 0 24 24", paths: ["M4 6h10a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z", "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"] },
78
- "minus-indeterminate": { viewBox: "0 0 24 24", paths: ["M5 12h14"] }
78
+ "minus-indeterminate": { viewBox: "0 0 24 24", paths: ["M5 12h14"] },
79
+ "cloud": { viewBox: "0 0 24 24", paths: ["M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16", "M8 19h9.5"] },
80
+ "download": { viewBox: "0 0 24 24", paths: ["M12 3v12", "M7 10l5 5 5-5", "M5 21h14"] }
79
81
  };
80
82
 
81
83
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -5102,7 +5104,7 @@ var Dropdown = React24.forwardRef(
5102
5104
  Dropdown.displayName = "Dropdown";
5103
5105
 
5104
5106
  // virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
5105
- import React26, { useState as useState6 } from "react";
5107
+ import React26 from "react";
5106
5108
 
5107
5109
  // virtual-pkg:src/atoms/Typography/Typography.tsx
5108
5110
  import React25 from "react";
@@ -5192,113 +5194,20 @@ var defaultLines = [
5192
5194
  { text: "muted: {colors.muted}" },
5193
5195
  { text: "hairline: {colors.hairline}" }
5194
5196
  ];
5195
- var CloudIcon = () => /* @__PURE__ */ jsxs24(
5196
- "svg",
5197
- {
5198
- viewBox: "0 0 24 24",
5199
- width: "16",
5200
- height: "16",
5201
- fill: "none",
5202
- stroke: "currentColor",
5203
- strokeWidth: "2",
5204
- strokeLinecap: "round",
5205
- strokeLinejoin: "round",
5206
- "aria-hidden": "true",
5207
- children: [
5208
- /* @__PURE__ */ jsx26("path", { d: "M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16" }),
5209
- /* @__PURE__ */ jsx26("path", { d: "M8 19h9.5" })
5210
- ]
5211
- }
5212
- );
5213
- var LinkIcon = () => /* @__PURE__ */ jsxs24(
5214
- "svg",
5215
- {
5216
- viewBox: "0 0 24 24",
5217
- width: "16",
5218
- height: "16",
5219
- fill: "none",
5220
- stroke: "currentColor",
5221
- strokeWidth: "2",
5222
- strokeLinecap: "round",
5223
- strokeLinejoin: "round",
5224
- "aria-hidden": "true",
5225
- children: [
5226
- /* @__PURE__ */ jsx26("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
5227
- /* @__PURE__ */ jsx26("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
5228
- /* @__PURE__ */ jsx26("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
5229
- ]
5230
- }
5231
- );
5232
- var CopyIcon = () => /* @__PURE__ */ jsxs24(
5233
- "svg",
5234
- {
5235
- viewBox: "0 0 24 24",
5236
- width: "14",
5237
- height: "14",
5238
- fill: "none",
5239
- stroke: "currentColor",
5240
- strokeWidth: "2",
5241
- strokeLinecap: "round",
5242
- strokeLinejoin: "round",
5243
- "aria-hidden": "true",
5244
- children: [
5245
- /* @__PURE__ */ jsx26("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
5246
- /* @__PURE__ */ jsx26("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })
5247
- ]
5248
- }
5249
- );
5250
- var DownloadIcon = () => /* @__PURE__ */ jsxs24(
5251
- "svg",
5252
- {
5253
- viewBox: "0 0 24 24",
5254
- width: "14",
5255
- height: "14",
5256
- fill: "none",
5257
- stroke: "currentColor",
5258
- strokeWidth: "2",
5259
- strokeLinecap: "round",
5260
- strokeLinejoin: "round",
5261
- "aria-hidden": "true",
5262
- children: [
5263
- /* @__PURE__ */ jsx26("path", { d: "M12 3v12" }),
5264
- /* @__PURE__ */ jsx26("path", { d: "M7 10l5 5 5-5" }),
5265
- /* @__PURE__ */ jsx26("path", { d: "M5 21h14" })
5266
- ]
5267
- }
5268
- );
5269
- var SpinnerIcon = () => /* @__PURE__ */ jsxs24(
5270
- "svg",
5271
- {
5272
- viewBox: "0 0 24 24",
5273
- width: "20",
5274
- height: "20",
5275
- fill: "none",
5276
- className: "animate-spin text-primary",
5277
- "aria-hidden": "true",
5278
- children: [
5279
- /* @__PURE__ */ jsx26(
5280
- "circle",
5281
- {
5282
- cx: "12",
5283
- cy: "12",
5284
- r: "9",
5285
- stroke: "currentColor",
5286
- strokeWidth: "2.5",
5287
- strokeOpacity: "0.25"
5288
- }
5289
- ),
5290
- /* @__PURE__ */ jsx26(
5291
- "path",
5292
- {
5293
- d: "M21 12a9 9 0 0 0-9-9",
5294
- stroke: "currentColor",
5295
- strokeWidth: "2.5",
5296
- strokeLinecap: "round"
5297
- }
5298
- )
5299
- ]
5197
+ var SOURCE_INFO = {
5198
+ production: {
5199
+ icon: "cloud",
5200
+ title: "Production (npm install)",
5201
+ description: "Generated for public npm registry consumption.",
5202
+ helper: "Consumer apps install from the public npm registry ('npm install')."
5203
+ },
5204
+ local: {
5205
+ icon: "external-link-arrow-up-right",
5206
+ title: "Local (npm link)",
5207
+ description: "Generated for local development with npm link.",
5208
+ helper: "Consumer apps resolve the package via a local 'npm link' during development."
5300
5209
  }
5301
- );
5210
+ };
5302
5211
  var ExportDesignMdModal = React26.forwardRef(
5303
5212
  ({
5304
5213
  isOpen,
@@ -5306,17 +5215,13 @@ var ExportDesignMdModal = React26.forwardRef(
5306
5215
  onExport,
5307
5216
  onDownload,
5308
5217
  onCopy,
5309
- onSourceChange,
5310
5218
  designSystemName = "Design System",
5311
5219
  defaultSource = "production",
5312
5220
  lines = defaultLines,
5313
5221
  loading = false
5314
5222
  }, ref) => {
5315
- const [source, setSource] = useState6(defaultSource);
5316
- const changeSource = (next) => {
5317
- setSource(next);
5318
- onSourceChange?.(next);
5319
- };
5223
+ const source = defaultSource;
5224
+ const info = SOURCE_INFO[source];
5320
5225
  const handleCopy = () => {
5321
5226
  const text = lines.map((l) => l.text).join("\n");
5322
5227
  if (typeof navigator !== "undefined" && navigator.clipboard) {
@@ -5335,7 +5240,7 @@ var ExportDesignMdModal = React26.forwardRef(
5335
5240
  size: "xl",
5336
5241
  footer: /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center justify-between", children: [
5337
5242
  /* @__PURE__ */ jsxs24(Button, { variant: "secondary", size: "sm", onClick: onDownload, children: [
5338
- /* @__PURE__ */ jsx26(DownloadIcon, {}),
5243
+ /* @__PURE__ */ jsx26(Icon, { name: "download" }),
5339
5244
  "Download .md"
5340
5245
  ] }),
5341
5246
  /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-sm", children: [
@@ -5345,35 +5250,15 @@ var ExportDesignMdModal = React26.forwardRef(
5345
5250
  ] }),
5346
5251
  children: /* @__PURE__ */ jsxs24("div", { className: "w-full space-y-lg", children: [
5347
5252
  /* @__PURE__ */ jsx26(Typography, { role: "body-md", color: "muted", children: "Generate and export the DESIGN.md file for handoff to AI coding agents or your team." }),
5348
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center justify-between gap-md", children: [
5349
- /* @__PURE__ */ jsxs24("div", { className: "inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md", children: [
5350
- /* @__PURE__ */ jsxs24(
5351
- Button,
5352
- {
5353
- variant: source === "production" ? "primary" : "ghost",
5354
- size: "sm",
5355
- onClick: () => changeSource("production"),
5356
- children: [
5357
- /* @__PURE__ */ jsx26(CloudIcon, {}),
5358
- "Production"
5359
- ]
5360
- }
5361
- ),
5362
- /* @__PURE__ */ jsxs24(
5363
- Button,
5364
- {
5365
- variant: source === "local" ? "primary" : "ghost",
5366
- size: "sm",
5367
- onClick: () => changeSource("local"),
5368
- children: [
5369
- /* @__PURE__ */ jsx26(LinkIcon, {}),
5370
- "Local (npm link)"
5371
- ]
5372
- }
5373
- )
5253
+ /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5254
+ /* @__PURE__ */ jsx26("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ jsx26(Icon, { name: info.icon }) }),
5255
+ /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
5256
+ /* @__PURE__ */ jsx26(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: info.title }),
5257
+ /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", children: info.description })
5374
5258
  ] }),
5375
- /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", className: "flex-1 min-w-[16rem]", children: source === "production" ? "Consumer apps install from the public npm registry ('npm install')." : "Consumer apps resolve the package via a local 'npm link' during development." })
5259
+ /* @__PURE__ */ jsx26(Chip, { label: "Active", variant: "primary", size: "sm" })
5376
5260
  ] }),
5261
+ /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", children: info.helper }),
5377
5262
  /* @__PURE__ */ jsxs24("div", { children: [
5378
5263
  /* @__PURE__ */ jsx26(
5379
5264
  Typography,
@@ -5394,7 +5279,7 @@ var ExportDesignMdModal = React26.forwardRef(
5394
5279
  onClick: handleCopy,
5395
5280
  className: "absolute top-sm right-sm",
5396
5281
  children: [
5397
- /* @__PURE__ */ jsx26(CopyIcon, {}),
5282
+ /* @__PURE__ */ jsx26(Icon, { name: "copy-clipboard" }),
5398
5283
  "Copy"
5399
5284
  ]
5400
5285
  }
@@ -5417,46 +5302,12 @@ var ExportDesignMdModal = React26.forwardRef(
5417
5302
  "aria-label": "Loading preview",
5418
5303
  className: "absolute inset-0 flex items-center justify-center gap-sm bg-canvas opacity-90",
5419
5304
  children: [
5420
- /* @__PURE__ */ jsx26(SpinnerIcon, {}),
5305
+ /* @__PURE__ */ jsx26(Icon, { name: "loading-spinner", className: "animate-spin text-primary" }),
5421
5306
  /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", children: "Loading preview\u2026" })
5422
5307
  ]
5423
5308
  }
5424
5309
  ) : null
5425
5310
  ] })
5426
- ] }),
5427
- /* @__PURE__ */ jsxs24("div", { className: "w-full space-y-sm", children: [
5428
- /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5429
- /* @__PURE__ */ jsx26("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ jsx26(CloudIcon, {}) }),
5430
- /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
5431
- /* @__PURE__ */ jsx26(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Production (npm install)" }),
5432
- /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", children: "Generated for public npm registry consumption." })
5433
- ] }),
5434
- source === "production" ? /* @__PURE__ */ jsx26(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx26(
5435
- Button,
5436
- {
5437
- variant: "secondary",
5438
- size: "sm",
5439
- onClick: () => changeSource("production"),
5440
- children: "Switch"
5441
- }
5442
- )
5443
- ] }),
5444
- /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
5445
- /* @__PURE__ */ jsx26("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-muted", children: /* @__PURE__ */ jsx26(LinkIcon, {}) }),
5446
- /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
5447
- /* @__PURE__ */ jsx26(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Local (npm link)" }),
5448
- /* @__PURE__ */ jsx26(Typography, { role: "body-sm", color: "muted", children: "Generated for local development with npm link." })
5449
- ] }),
5450
- source === "local" ? /* @__PURE__ */ jsx26(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx26(
5451
- Button,
5452
- {
5453
- variant: "secondary",
5454
- size: "sm",
5455
- onClick: () => changeSource("local"),
5456
- children: "Switch"
5457
- }
5458
- )
5459
- ] })
5460
5311
  ] })
5461
5312
  ] })
5462
5313
  }
@@ -6234,7 +6085,7 @@ var PricingPageTemplate = React32.forwardRef(
6234
6085
  PricingPageTemplate.displayName = "PricingPageTemplate";
6235
6086
 
6236
6087
  // virtual-pkg:src/atoms/PublishModal/PublishModal.tsx
6237
- import React33, { useState as useState7 } from "react";
6088
+ import React33, { useState as useState6 } from "react";
6238
6089
  import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
6239
6090
  var GlobeIcon = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6240
6091
  /* @__PURE__ */ jsx33("circle", { cx: "12", cy: "12", r: "9" }),
@@ -6242,7 +6093,7 @@ var GlobeIcon = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", widt
6242
6093
  /* @__PURE__ */ jsx33("path", { d: "M12 3a13.5 13.5 0 0 1 0 18" }),
6243
6094
  /* @__PURE__ */ jsx33("path", { d: "M12 3a13.5 13.5 0 0 0 0 18" })
6244
6095
  ] });
6245
- var LinkIcon2 = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6096
+ var LinkIcon = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
6246
6097
  /* @__PURE__ */ jsx33("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
6247
6098
  /* @__PURE__ */ jsx33("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
6248
6099
  /* @__PURE__ */ jsx33("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
@@ -6282,7 +6133,7 @@ var ChevronIcon2 = ({ open }) => /* @__PURE__ */ jsx33(
6282
6133
  children: /* @__PURE__ */ jsx33("path", { d: "M9 6l6 6-6 6" })
6283
6134
  }
6284
6135
  );
6285
- var SpinnerIcon2 = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
6136
+ var SpinnerIcon = () => /* @__PURE__ */ jsxs31("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
6286
6137
  /* @__PURE__ */ jsx33("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
6287
6138
  /* @__PURE__ */ jsx33("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
6288
6139
  ] });
@@ -6302,12 +6153,12 @@ var PublishModal = React33.forwardRef(
6302
6153
  defaultTarget = "production",
6303
6154
  loading = false
6304
6155
  }, ref) => {
6305
- const [target, setTarget] = useState7(defaultTarget);
6306
- const [nextVersion, setNextVersion] = useState7(
6156
+ const [target, setTarget] = useState6(defaultTarget);
6157
+ const [nextVersion, setNextVersion] = useState6(
6307
6158
  defaultNextVersion ?? bumpMinor(currentVersion)
6308
6159
  );
6309
- const [notesOpen, setNotesOpen] = useState7(false);
6310
- const [notes, setNotes] = useState7("");
6160
+ const [notesOpen, setNotesOpen] = useState6(false);
6161
+ const [notes, setNotes] = useState6("");
6311
6162
  const isProduction = target === "production";
6312
6163
  const summaryItems = isProduction ? [
6313
6164
  { title: "Package validated", desc: "All required fields are valid." },
@@ -6338,7 +6189,7 @@ var PublishModal = React33.forwardRef(
6338
6189
  disabled: loading,
6339
6190
  "aria-busy": loading,
6340
6191
  children: loading ? /* @__PURE__ */ jsxs31(Fragment5, { children: [
6341
- /* @__PURE__ */ jsx33(SpinnerIcon2, {}),
6192
+ /* @__PURE__ */ jsx33(SpinnerIcon, {}),
6342
6193
  isProduction ? "Publishing\u2026" : "Linking\u2026"
6343
6194
  ] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
6344
6195
  }
@@ -6388,7 +6239,7 @@ var PublishModal = React33.forwardRef(
6388
6239
  !isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
6389
6240
  ].join(" "),
6390
6241
  children: [
6391
- /* @__PURE__ */ jsx33(LinkIcon2, {}),
6242
+ /* @__PURE__ */ jsx33(LinkIcon, {}),
6392
6243
  "Local (npm link)"
6393
6244
  ]
6394
6245
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-v6",
3
- "version": "1.20.12",
4
- "description": "Design system \"Plasma Design System\" generated by atom-server.",
3
+ "version": "1.20.13",
4
+ "description": "Complete design system \"Plasma Design System\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
7
7
  "types": "src/index.ts",
@@ -1,8 +1,9 @@
1
- import React, { useState } from "react";
1
+ import React from "react";
2
2
  import { Modal } from "../Modal";
3
3
  import { Button } from "../Button";
4
4
  import { Chip } from "../Chip";
5
5
  import { Typography } from "../Typography";
6
+ import { Icon } from "../Icon";
6
7
 
7
8
  export type ExportDesignMdSource = "production" | "local";
8
9
 
@@ -24,11 +25,15 @@ export interface ExportDesignMdModalProps {
24
25
  onDownload?: () => void;
25
26
  /** Called when the user copies the preview to the clipboard */
26
27
  onCopy?: () => void;
27
- /** Called every time the user switches the source toggle (tabs or Switch buttons) */
28
+ /**
29
+ * Kept for backwards compatibility. The source is now locked to
30
+ * `defaultSource` for the lifetime of the modal — there is no toggle,
31
+ * so this callback is never invoked.
32
+ */
28
33
  onSourceChange?: (source: ExportDesignMdSource) => void;
29
34
  /** Name of the design system shown in the generated heading */
30
35
  designSystemName?: string;
31
- /** Which source tab is selected by default */
36
+ /** The single source this modal is locked to for its lifetime */
32
37
  defaultSource?: ExportDesignMdSource;
33
38
  /** Lines rendered in the code preview panel */
34
39
  lines?: ExportDesignMdLine[];
@@ -69,101 +74,23 @@ const defaultLines: ExportDesignMdLine[] = [
69
74
  { text: "hairline: {colors.hairline}" },
70
75
  ];
71
76
 
72
- const CloudIcon = () => (
73
- <svg
74
- viewBox="0 0 24 24"
75
- width="16"
76
- height="16"
77
- fill="none"
78
- stroke="currentColor"
79
- strokeWidth="2"
80
- strokeLinecap="round"
81
- strokeLinejoin="round"
82
- aria-hidden="true"
83
- >
84
- <path d="M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16" />
85
- <path d="M8 19h9.5" />
86
- </svg>
87
- );
88
-
89
- const LinkIcon = () => (
90
- <svg
91
- viewBox="0 0 24 24"
92
- width="16"
93
- height="16"
94
- fill="none"
95
- stroke="currentColor"
96
- strokeWidth="2"
97
- strokeLinecap="round"
98
- strokeLinejoin="round"
99
- aria-hidden="true"
100
- >
101
- <path d="M9 17H7A5 5 0 0 1 7 7h2" />
102
- <path d="M15 7h2a5 5 0 1 1 0 10h-2" />
103
- <line x1="8" y1="12" x2="16" y2="12" />
104
- </svg>
105
- );
106
-
107
- const CopyIcon = () => (
108
- <svg
109
- viewBox="0 0 24 24"
110
- width="14"
111
- height="14"
112
- fill="none"
113
- stroke="currentColor"
114
- strokeWidth="2"
115
- strokeLinecap="round"
116
- strokeLinejoin="round"
117
- aria-hidden="true"
118
- >
119
- <rect x="9" y="9" width="11" height="11" rx="2" />
120
- <path d="M5 15V5a2 2 0 0 1 2-2h10" />
121
- </svg>
122
- );
123
-
124
- const DownloadIcon = () => (
125
- <svg
126
- viewBox="0 0 24 24"
127
- width="14"
128
- height="14"
129
- fill="none"
130
- stroke="currentColor"
131
- strokeWidth="2"
132
- strokeLinecap="round"
133
- strokeLinejoin="round"
134
- aria-hidden="true"
135
- >
136
- <path d="M12 3v12" />
137
- <path d="M7 10l5 5 5-5" />
138
- <path d="M5 21h14" />
139
- </svg>
140
- );
141
-
142
- const SpinnerIcon = () => (
143
- <svg
144
- viewBox="0 0 24 24"
145
- width="20"
146
- height="20"
147
- fill="none"
148
- className="animate-spin text-primary"
149
- aria-hidden="true"
150
- >
151
- <circle
152
- cx="12"
153
- cy="12"
154
- r="9"
155
- stroke="currentColor"
156
- strokeWidth="2.5"
157
- strokeOpacity="0.25"
158
- />
159
- <path
160
- d="M21 12a9 9 0 0 0-9-9"
161
- stroke="currentColor"
162
- strokeWidth="2.5"
163
- strokeLinecap="round"
164
- />
165
- </svg>
166
- );
77
+ const SOURCE_INFO: Record<
78
+ ExportDesignMdSource,
79
+ { icon: string; title: string; description: string; helper: string }
80
+ > = {
81
+ production: {
82
+ icon: "cloud",
83
+ title: "Production (npm install)",
84
+ description: "Generated for public npm registry consumption.",
85
+ helper: "Consumer apps install from the public npm registry ('npm install').",
86
+ },
87
+ local: {
88
+ icon: "external-link-arrow-up-right",
89
+ title: "Local (npm link)",
90
+ description: "Generated for local development with npm link.",
91
+ helper: "Consumer apps resolve the package via a local 'npm link' during development.",
92
+ },
93
+ };
167
94
 
168
95
  export const ExportDesignMdModal = React.forwardRef<
169
96
  HTMLDivElement,
@@ -176,7 +103,6 @@ export const ExportDesignMdModal = React.forwardRef<
176
103
  onExport,
177
104
  onDownload,
178
105
  onCopy,
179
- onSourceChange,
180
106
  designSystemName = "Design System",
181
107
  defaultSource = "production",
182
108
  lines = defaultLines,
@@ -184,12 +110,8 @@ export const ExportDesignMdModal = React.forwardRef<
184
110
  },
185
111
  ref
186
112
  ) => {
187
- const [source, setSource] = useState<ExportDesignMdSource>(defaultSource);
188
-
189
- const changeSource = (next: ExportDesignMdSource) => {
190
- setSource(next);
191
- onSourceChange?.(next);
192
- };
113
+ const source = defaultSource;
114
+ const info = SOURCE_INFO[source];
193
115
 
194
116
  const handleCopy = () => {
195
117
  const text = lines.map((l) => l.text).join("\n");
@@ -209,7 +131,7 @@ export const ExportDesignMdModal = React.forwardRef<
209
131
  footer={
210
132
  <div className="flex w-full items-center justify-between">
211
133
  <Button variant="secondary" size="sm" onClick={onDownload}>
212
- <DownloadIcon />
134
+ <Icon name="download" />
213
135
  Download .md
214
136
  </Button>
215
137
  <div className="flex items-center gap-sm">
@@ -229,32 +151,24 @@ export const ExportDesignMdModal = React.forwardRef<
229
151
  agents or your team.
230
152
  </Typography>
231
153
 
232
- {/* Source tabs */}
233
- <div className="flex flex-wrap items-center justify-between gap-md">
234
- <div className="inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md">
235
- <Button
236
- variant={source === "production" ? "primary" : "ghost"}
237
- size="sm"
238
- onClick={() => changeSource("production")}
239
- >
240
- <CloudIcon />
241
- Production
242
- </Button>
243
- <Button
244
- variant={source === "local" ? "primary" : "ghost"}
245
- size="sm"
246
- onClick={() => changeSource("local")}
247
- >
248
- <LinkIcon />
249
- Local (npm link)
250
- </Button>
154
+ {/* Locked source info row */}
155
+ <div className="flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md">
156
+ <span className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary">
157
+ <Icon name={info.icon} />
158
+ </span>
159
+ <div className="min-w-0 flex-1">
160
+ <Typography role="body-md" color="ink" className="font-weight-heading-sm">
161
+ {info.title}
162
+ </Typography>
163
+ <Typography role="body-sm" color="muted">
164
+ {info.description}
165
+ </Typography>
251
166
  </div>
252
- <Typography role="body-sm" color="muted" className="flex-1 min-w-[16rem]">
253
- {source === "production"
254
- ? "Consumer apps install from the public npm registry ('npm install')."
255
- : "Consumer apps resolve the package via a local 'npm link' during development."}
256
- </Typography>
167
+ <Chip label="Active" variant="primary" size="sm" />
257
168
  </div>
169
+ <Typography role="body-sm" color="muted">
170
+ {info.helper}
171
+ </Typography>
258
172
 
259
173
  {/* Preview */}
260
174
  <div>
@@ -273,7 +187,7 @@ export const ExportDesignMdModal = React.forwardRef<
273
187
  onClick={handleCopy}
274
188
  className="absolute top-sm right-sm"
275
189
  >
276
- <CopyIcon />
190
+ <Icon name="copy-clipboard" />
277
191
  Copy
278
192
  </Button>
279
193
  <div className="max-h-64 overflow-y-auto px-md py-sm font-mono text-body-sm">
@@ -302,7 +216,7 @@ export const ExportDesignMdModal = React.forwardRef<
302
216
  aria-label="Loading preview"
303
217
  className="absolute inset-0 flex items-center justify-center gap-sm bg-canvas opacity-90"
304
218
  >
305
- <SpinnerIcon />
219
+ <Icon name="loading-spinner" className="animate-spin text-primary" />
306
220
  <Typography role="body-sm" color="muted">
307
221
  Loading preview…
308
222
  </Typography>
@@ -310,59 +224,6 @@ export const ExportDesignMdModal = React.forwardRef<
310
224
  ) : null}
311
225
  </div>
312
226
  </div>
313
-
314
- {/* Storage options */}
315
- <div className="w-full space-y-sm">
316
- <div className="flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md">
317
- <span className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary">
318
- <CloudIcon />
319
- </span>
320
- <div className="min-w-0 flex-1">
321
- <Typography role="body-md" color="ink" className="font-weight-heading-sm">
322
- Production (npm install)
323
- </Typography>
324
- <Typography role="body-sm" color="muted">
325
- Generated for public npm registry consumption.
326
- </Typography>
327
- </div>
328
- {source === "production" ? (
329
- <Chip label="Active" variant="primary" size="sm" />
330
- ) : (
331
- <Button
332
- variant="secondary"
333
- size="sm"
334
- onClick={() => changeSource("production")}
335
- >
336
- Switch
337
- </Button>
338
- )}
339
- </div>
340
-
341
- <div className="flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md">
342
- <span className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-muted">
343
- <LinkIcon />
344
- </span>
345
- <div className="min-w-0 flex-1">
346
- <Typography role="body-md" color="ink" className="font-weight-heading-sm">
347
- Local (npm link)
348
- </Typography>
349
- <Typography role="body-sm" color="muted">
350
- Generated for local development with npm link.
351
- </Typography>
352
- </div>
353
- {source === "local" ? (
354
- <Chip label="Active" variant="primary" size="sm" />
355
- ) : (
356
- <Button
357
- variant="secondary"
358
- size="sm"
359
- onClick={() => changeSource("local")}
360
- >
361
- Switch
362
- </Button>
363
- )}
364
- </div>
365
- </div>
366
227
  </div>
367
228
  </Modal>
368
229
  );
@@ -3,7 +3,8 @@ import { ExportDesignMdModal } from "./ExportDesignMdModal";
3
3
  import { Button } from "../Button";
4
4
 
5
5
  export default function ExportDesignMdModalPreview() {
6
- const [open, setOpen] = useState(false);
6
+ const [openProduction, setOpenProduction] = useState(false);
7
+ const [openLocal, setOpenLocal] = useState(false);
7
8
 
8
9
  return (
9
10
  <div className="w-full max-w-3xl mx-auto p-lg space-y-md">
@@ -11,19 +12,34 @@ export default function ExportDesignMdModalPreview() {
11
12
  <h2 className="text-heading-md text-ink">Export DESIGN.md</h2>
12
13
  <p className="text-body-md text-muted mt-xs">
13
14
  Opens a dialog for handing off the design system's token file to an
14
- AI coding agent or teammate, with a source toggle and live preview.
15
+ AI coding agent or teammate. The source is locked per instance —
16
+ no toggle, just a live preview and export/download actions.
15
17
  </p>
16
18
  </div>
17
19
 
18
- <Button variant="primary" onClick={() => setOpen(true)}>
19
- Export DESIGN.md
20
- </Button>
20
+ <div className="flex flex-wrap items-center gap-sm">
21
+ <Button variant="primary" onClick={() => setOpenProduction(true)}>
22
+ Export (production)
23
+ </Button>
24
+ <Button variant="secondary" onClick={() => setOpenLocal(true)}>
25
+ Export (local npm link)
26
+ </Button>
27
+ </div>
28
+
29
+ <ExportDesignMdModal
30
+ isOpen={openProduction}
31
+ onClose={() => setOpenProduction(false)}
32
+ onExport={() => setOpenProduction(false)}
33
+ onDownload={() => {}}
34
+ defaultSource="production"
35
+ />
21
36
 
22
37
  <ExportDesignMdModal
23
- isOpen={open}
24
- onClose={() => setOpen(false)}
25
- onExport={() => setOpen(false)}
38
+ isOpen={openLocal}
39
+ onClose={() => setOpenLocal(false)}
40
+ onExport={() => setOpenLocal(false)}
26
41
  onDownload={() => {}}
42
+ defaultSource="local"
27
43
  />
28
44
  </div>
29
45
  );
@@ -60,6 +60,8 @@ export const ICON_REGISTRY = {
60
60
  "image-photo-picture": { viewBox: "0 0 24 24", paths: ["M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z", "M11 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z", "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"] },
61
61
  "video-film-clapperboard": { viewBox: "0 0 24 24", paths: ["M4 6h10a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z", "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"] },
62
62
  "minus-indeterminate": { viewBox: "0 0 24 24", paths: ["M5 12h14"] },
63
+ "cloud": { viewBox: "0 0 24 24", paths: ["M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16", "M8 19h9.5"] },
64
+ "download": { viewBox: "0 0 24 24", paths: ["M12 3v12", "M7 10l5 5 5-5", "M5 21h14"] },
63
65
  } as const;
64
66
 
65
67
  export type IconName = keyof typeof ICON_REGISTRY;