@publish.os/nextjs 0.0.1-alpha.3 → 0.0.1-alpha.5

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.
Files changed (57) hide show
  1. package/README.md +3 -9
  2. package/dist/index.cjs +26 -23
  3. package/dist/index.js +26 -23
  4. package/dist/kernel/components/blocks/design-system-preview.cjs +18 -17
  5. package/dist/kernel/components/blocks/design-system-preview.js +18 -17
  6. package/dist/kernel/components/blocks/link-playground.cjs +3 -3
  7. package/dist/kernel/components/blocks/link-playground.js +3 -3
  8. package/dist/kernel/components/blocks/navbar.cjs +1 -1
  9. package/dist/kernel/components/blocks/navbar.js +1 -1
  10. package/dist/kernel/components/blocks/navigation-progress-playground.cjs +2 -2
  11. package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
  12. package/dist/kernel/components/ui/button-group.cjs +2 -3
  13. package/dist/kernel/components/ui/button-group.d.cts +2 -2
  14. package/dist/kernel/components/ui/button-group.d.ts +2 -2
  15. package/dist/kernel/components/ui/button-group.js +2 -3
  16. package/dist/kernel/components/ui/button.cjs +4 -12
  17. package/dist/kernel/components/ui/button.d.cts +3 -4
  18. package/dist/kernel/components/ui/button.d.ts +3 -4
  19. package/dist/kernel/components/ui/button.js +4 -12
  20. package/dist/kernel/components/ui/card.d.cts +1 -1
  21. package/dist/kernel/components/ui/card.d.ts +1 -1
  22. package/dist/kernel/components/ui/tag.cjs +104 -0
  23. package/dist/kernel/components/ui/tag.d.cts +14 -0
  24. package/dist/kernel/components/ui/tag.d.ts +14 -0
  25. package/dist/kernel/components/ui/tag.js +76 -0
  26. package/dist/kernel/components/ui/text.d.cts +1 -1
  27. package/dist/kernel/components/ui/text.d.ts +1 -1
  28. package/dist/kernel/components/ui/theme-toggle.cjs +1 -1
  29. package/dist/kernel/components/ui/theme-toggle.js +1 -1
  30. package/dist/kernel/defaults.registry.cjs +4 -4
  31. package/dist/kernel/defaults.registry.d.cts +4 -4
  32. package/dist/kernel/defaults.registry.d.ts +4 -4
  33. package/dist/kernel/defaults.registry.js +4 -4
  34. package/dist/kernel/routes/agent/markdown.cjs +5 -11
  35. package/dist/kernel/routes/agent/markdown.d.cts +0 -1
  36. package/dist/kernel/routes/agent/markdown.d.ts +0 -1
  37. package/dist/kernel/routes/agent/markdown.js +5 -11
  38. package/dist/kernel/routes/metadata/feed.cjs +17 -21
  39. package/dist/kernel/routes/metadata/feed.d.cts +0 -1
  40. package/dist/kernel/routes/metadata/feed.d.ts +0 -1
  41. package/dist/kernel/routes/metadata/feed.js +17 -21
  42. package/dist/kernel/routes/metadata/llms.cjs +21 -16
  43. package/dist/kernel/routes/metadata/llms.d.cts +0 -1
  44. package/dist/kernel/routes/metadata/llms.d.ts +0 -1
  45. package/dist/kernel/routes/metadata/llms.js +21 -16
  46. package/dist/kernel/routes/metadata/robots.cjs +21 -11
  47. package/dist/kernel/routes/metadata/robots.js +21 -11
  48. package/dist/kernel/routes/metadata/sitemap.cjs +29 -19
  49. package/dist/kernel/routes/metadata/sitemap.js +29 -19
  50. package/package.json +28 -5
  51. package/release/package.json +23 -0
  52. package/release/pnpm-lock.yaml +1215 -0
  53. package/release/release.json +39 -0
  54. package/dist/kernel/components/ui/badge.cjs +0 -75
  55. package/dist/kernel/components/ui/badge.d.cts +0 -12
  56. package/dist/kernel/components/ui/badge.d.ts +0 -12
  57. package/dist/kernel/components/ui/badge.js +0 -47
package/README.md CHANGED
@@ -1,14 +1,8 @@
1
1
  # @publish.os/nextjs
2
2
 
3
- PublishOS runtime package for generated Next.js applications.
4
-
5
- NextJS runtime for your `publish.os/` content.
6
-
7
- ## Install
8
-
9
- ```bash
10
- pnpm add @publish.os/nextjs
11
- ```
3
+ PublishOS runtime package for generated Next.js applications. Tenant source
4
+ pins its exact version in `publish.os.config.json`; the CLI obtains and verifies
5
+ it automatically. Do not install it into the host application.
12
6
 
13
7
  ## License
14
8
 
package/dist/index.cjs CHANGED
@@ -178,22 +178,28 @@ function cachedTextHeaders(contentType, options = {}) {
178
178
  headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
179
179
  headers.set("content-type", contentType);
180
180
  headers.set("x-content-type-options", "nosniff");
181
- if (options.etag) headers.set("etag", options.etag);
182
181
  if (options.noindex) headers.set("x-robots-tag", "noindex");
183
182
  return headers;
184
183
  }
185
184
  function createCachedTextResponse(options) {
186
185
  const status = options.status ?? 200;
187
- const method = options.method ?? options.request?.method ?? "GET";
186
+ const method = options.method ?? "GET";
188
187
  const headers = cachedTextHeaders(options.contentType, options);
189
- const isNotModified = status === 200 && options.etag && options.request?.headers.get("if-none-match") === options.etag;
190
- return new Response(
191
- method === "HEAD" || isNotModified ? null : options.body,
192
- {
193
- headers,
194
- status: isNotModified ? 304 : status
195
- }
196
- );
188
+ return new Response(method === "HEAD" ? null : options.body, {
189
+ headers,
190
+ status
191
+ });
192
+ }
193
+
194
+ // src/kernel/routes/metadata/canonical-url.ts
195
+ function canonicalUrl(manifest, path) {
196
+ const origin = manifest.site.url?.replace(/\/+$/, "");
197
+ if (!origin) return path;
198
+ try {
199
+ return new URL(path, `${origin}/`).toString();
200
+ } catch {
201
+ return path;
202
+ }
197
203
  }
198
204
 
199
205
  // src/kernel/routes/metadata/feed.ts
@@ -206,15 +212,6 @@ function pageTimestamp(page) {
206
212
  const timestamp = Date.parse(value);
207
213
  return Number.isNaN(timestamp) ? -Infinity : timestamp;
208
214
  }
209
- function canonicalUrl(manifest, path) {
210
- const origin = manifest.site.url?.replace(/\/+$/, "");
211
- if (!origin) return path;
212
- try {
213
- return new URL(path, `${origin}/`).toString();
214
- } catch {
215
- return path;
216
- }
217
- }
218
215
  function pageInScope(page, options) {
219
216
  if (options.scope === "site" || !options.group) return true;
220
217
  if (options.scope === "self") return page.group === options.group;
@@ -379,10 +376,10 @@ async function llmsTxt(manifest, options = {}) {
379
376
  const visiblePages = options.limit ? pages.slice(0, options.limit) : pages;
380
377
  const lines = visiblePages.map((page) => {
381
378
  const description = options.includeDescriptions && page.description ? ` - ${page.description}` : "";
382
- return `- [${page.title}](${page.path})${description}`;
379
+ return `- [${page.title}](${canonicalUrl(manifest, page.path)})${description}`;
383
380
  });
384
381
  const linkLines = (options.links ?? []).map(
385
- (link) => `- [${link.title}](${link.path})`
382
+ (link) => `- [${link.title}](${canonicalUrl(manifest, link.path)})`
386
383
  );
387
384
  const linkSection = linkLines.length ? `
388
385
 
@@ -1012,7 +1009,11 @@ async function robotsTxt(manifest) {
1012
1009
  "use cache";
1013
1010
  (0, import_cache3.cacheLife)("page");
1014
1011
  (0, import_cache3.cacheTag)(tags.site(), tags.robots(), tags.manifest(manifest.contentHash));
1015
- return "User-agent: *\nAllow: /\nSitemap: /sitemap.xml\n";
1012
+ const sitemapUrl = canonicalUrl(manifest, "/sitemap.xml");
1013
+ return `User-agent: *
1014
+ Allow: /
1015
+ Sitemap: ${sitemapUrl}
1016
+ `;
1016
1017
  }
1017
1018
  function createRobotsTxtRoute(manifest) {
1018
1019
  return async function GET() {
@@ -1038,7 +1039,9 @@ async function sitemapXml(manifest) {
1038
1039
  ...manifest.pages.filter((page) => page.status === "published").map((page) => page.path)
1039
1040
  ];
1040
1041
  const uniqueUrls = [...new Set(urls)];
1041
- const body = uniqueUrls.map((url) => ` <url><loc>${xmlEscape2(url)}</loc></url>`).join("\n");
1042
+ const body = uniqueUrls.map(
1043
+ (url) => ` <url><loc>${xmlEscape2(canonicalUrl(manifest, url))}</loc></url>`
1044
+ ).join("\n");
1042
1045
  return `<?xml version="1.0" encoding="UTF-8"?>
1043
1046
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
1044
1047
  ${body}
package/dist/index.js CHANGED
@@ -132,22 +132,28 @@ function cachedTextHeaders(contentType, options = {}) {
132
132
  headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
133
133
  headers.set("content-type", contentType);
134
134
  headers.set("x-content-type-options", "nosniff");
135
- if (options.etag) headers.set("etag", options.etag);
136
135
  if (options.noindex) headers.set("x-robots-tag", "noindex");
137
136
  return headers;
138
137
  }
139
138
  function createCachedTextResponse(options) {
140
139
  const status = options.status ?? 200;
141
- const method = options.method ?? options.request?.method ?? "GET";
140
+ const method = options.method ?? "GET";
142
141
  const headers = cachedTextHeaders(options.contentType, options);
143
- const isNotModified = status === 200 && options.etag && options.request?.headers.get("if-none-match") === options.etag;
144
- return new Response(
145
- method === "HEAD" || isNotModified ? null : options.body,
146
- {
147
- headers,
148
- status: isNotModified ? 304 : status
149
- }
150
- );
142
+ return new Response(method === "HEAD" ? null : options.body, {
143
+ headers,
144
+ status
145
+ });
146
+ }
147
+
148
+ // src/kernel/routes/metadata/canonical-url.ts
149
+ function canonicalUrl(manifest, path) {
150
+ const origin = manifest.site.url?.replace(/\/+$/, "");
151
+ if (!origin) return path;
152
+ try {
153
+ return new URL(path, `${origin}/`).toString();
154
+ } catch {
155
+ return path;
156
+ }
151
157
  }
152
158
 
153
159
  // src/kernel/routes/metadata/feed.ts
@@ -160,15 +166,6 @@ function pageTimestamp(page) {
160
166
  const timestamp = Date.parse(value);
161
167
  return Number.isNaN(timestamp) ? -Infinity : timestamp;
162
168
  }
163
- function canonicalUrl(manifest, path) {
164
- const origin = manifest.site.url?.replace(/\/+$/, "");
165
- if (!origin) return path;
166
- try {
167
- return new URL(path, `${origin}/`).toString();
168
- } catch {
169
- return path;
170
- }
171
- }
172
169
  function pageInScope(page, options) {
173
170
  if (options.scope === "site" || !options.group) return true;
174
171
  if (options.scope === "self") return page.group === options.group;
@@ -333,10 +330,10 @@ async function llmsTxt(manifest, options = {}) {
333
330
  const visiblePages = options.limit ? pages.slice(0, options.limit) : pages;
334
331
  const lines = visiblePages.map((page) => {
335
332
  const description = options.includeDescriptions && page.description ? ` - ${page.description}` : "";
336
- return `- [${page.title}](${page.path})${description}`;
333
+ return `- [${page.title}](${canonicalUrl(manifest, page.path)})${description}`;
337
334
  });
338
335
  const linkLines = (options.links ?? []).map(
339
- (link) => `- [${link.title}](${link.path})`
336
+ (link) => `- [${link.title}](${canonicalUrl(manifest, link.path)})`
340
337
  );
341
338
  const linkSection = linkLines.length ? `
342
339
 
@@ -966,7 +963,11 @@ async function robotsTxt(manifest) {
966
963
  "use cache";
967
964
  cacheLife3("page");
968
965
  cacheTag3(tags.site(), tags.robots(), tags.manifest(manifest.contentHash));
969
- return "User-agent: *\nAllow: /\nSitemap: /sitemap.xml\n";
966
+ const sitemapUrl = canonicalUrl(manifest, "/sitemap.xml");
967
+ return `User-agent: *
968
+ Allow: /
969
+ Sitemap: ${sitemapUrl}
970
+ `;
970
971
  }
971
972
  function createRobotsTxtRoute(manifest) {
972
973
  return async function GET() {
@@ -992,7 +993,9 @@ async function sitemapXml(manifest) {
992
993
  ...manifest.pages.filter((page) => page.status === "published").map((page) => page.path)
993
994
  ];
994
995
  const uniqueUrls = [...new Set(urls)];
995
- const body = uniqueUrls.map((url) => ` <url><loc>${xmlEscape2(url)}</loc></url>`).join("\n");
996
+ const body = uniqueUrls.map(
997
+ (url) => ` <url><loc>${xmlEscape2(canonicalUrl(manifest, url))}</loc></url>`
998
+ ).join("\n");
996
999
  return `<?xml version="1.0" encoding="UTF-8"?>
997
1000
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
998
1001
  ${body}
@@ -38,7 +38,6 @@ var import_animated_icon_swap = require("./animated-icon-swap.js");
38
38
  var import_color_palette = __toESM(require("./color-palette.js"), 1);
39
39
  var import_inline_code = require("../mdx/components/inline-code.js");
40
40
  var import_accordion = require("../ui/accordion.js");
41
- var import_badge = require("../ui/badge.js");
42
41
  var import_breadcrumb = require("../ui/breadcrumb.js");
43
42
  var import_button = require("../ui/button.js");
44
43
  var import_button_group = require("../ui/button-group.js");
@@ -57,6 +56,7 @@ var import_select = require("../ui/select.js");
57
56
  var import_separator = require("../ui/separator.js");
58
57
  var import_table = require("../ui/table.js");
59
58
  var import_tabs = require("../ui/tabs.js");
59
+ var import_tag = require("../ui/tag.js");
60
60
  var import_text = require("../ui/text.js");
61
61
  var import_toast = require("../ui/toast.js");
62
62
  var import_tooltip = require("../ui/tooltip.js");
@@ -111,15 +111,15 @@ function UiPreview({ items = [] }) {
111
111
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
112
112
  items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: item.name, children: item.children }, item.name)),
113
113
  !hasFixture(items, "Button") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Button", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { children: "Primary" }),
115
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Secondary" }),
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { children: "Solid" }),
115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "soft", children: "Soft" }),
116
116
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { disabled: true, variant: "outline", children: "Disabled" })
117
117
  ] }) }),
118
118
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "ButtonGroup", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-4", children: [
119
119
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { children: [
120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Draft" }),
121
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Preview" }),
122
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "secondary", children: "Publish" })
120
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "soft", children: "Draft" }),
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "soft", children: "Preview" }),
122
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "soft", children: "Publish" })
123
123
  ] }),
124
124
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { children: [
125
125
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button_group.ButtonGroupText, { size: "sm", children: "v1.2.0" }),
@@ -127,14 +127,15 @@ function UiPreview({ items = [] }) {
127
127
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "outline", children: "Copy" })
128
128
  ] }),
129
129
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button_group.ButtonGroup, { orientation: "vertical", children: [
130
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Move up" }),
131
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Move down" })
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "soft", children: "Move up" }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "soft", children: "Move down" })
132
132
  ] })
133
133
  ] }) }),
134
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Badge", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap justify-center gap-2", children: [
135
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { variant: "primary", children: "Primary" }),
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { children: "Default" }),
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.Badge, { variant: "outline", children: "Outline" })
134
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Tag", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap justify-center gap-2", children: [
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tag.Tag, { children: "Solid" }),
136
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tag.Tag, { variant: "soft", children: "Soft" }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tag.Tag, { variant: "outline", children: "Outline" }),
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tag.Tag, { borderStyle: "dotted", tone: "accent", variant: "soft", children: "Beta" })
138
139
  ] }) }),
139
140
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Input", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
140
141
  "label",
@@ -178,7 +179,7 @@ function UiPreview({ items = [] }) {
178
179
  }
179
180
  ),
180
181
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", disabled: true, href: "#", variant: "link.standalone", children: "Disabled link" }),
181
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.primary", children: "Link as button" })
182
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.solid", children: "Link as button" })
182
183
  ] }) }),
183
184
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link colors", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
184
185
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", color: "green-300", children: "Docs" }),
@@ -223,8 +224,8 @@ function UiPreview({ items = [] }) {
223
224
  ] }) }),
224
225
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-3", children: [
225
226
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", variant: "link.inline", children: "Link inline" }),
226
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.secondary", children: "Link button" }),
227
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "secondary", children: "Button" })
227
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "sm", variant: "button.soft", children: "Link button" }),
228
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "soft", children: "Button" })
228
229
  ] })
229
230
  ] }) }),
230
231
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Text", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xs space-y-2", children: [
@@ -412,7 +413,7 @@ function MdxPreview({ items = [] }) {
412
413
  !hasFixture(items, "Link") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "Link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
413
414
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "default", href: "/ds", variant: "link.standalone", children: "Default standalone" }),
414
415
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { color: "accent", href: "/ds", variant: "link.inline", children: "Accent inline" }),
415
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", size: "sm", variant: "button.primary", children: "Button link" })
416
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "/ds", size: "sm", variant: "button.solid", children: "Button link" })
416
417
  ] }) }),
417
418
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PreviewCell, { name: "MDX Links", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-md space-y-4 text-sm leading-7 text-foreground-2", children: [
418
419
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
@@ -481,7 +482,7 @@ function CopyToClipboardPreview() {
481
482
  }
482
483
  ),
483
484
  onClick: handleCopy,
484
- variant: "secondary",
485
+ variant: "soft",
485
486
  children: "Copy"
486
487
  }
487
488
  );
@@ -11,7 +11,6 @@ import {
11
11
  AccordionPanel,
12
12
  AccordionTrigger
13
13
  } from "../ui/accordion.js";
14
- import { Badge } from "../ui/badge.js";
15
14
  import {
16
15
  Breadcrumb,
17
16
  BreadcrumbItem,
@@ -108,6 +107,7 @@ import {
108
107
  TabsPanel,
109
108
  TabsTab
110
109
  } from "../ui/tabs.js";
110
+ import { Tag } from "../ui/tag.js";
111
111
  import { Text } from "../ui/text.js";
112
112
  import {
113
113
  Toast,
@@ -175,15 +175,15 @@ function UiPreview({ items = [] }) {
175
175
  return /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
176
176
  items.map((item) => /* @__PURE__ */ jsx(PreviewCell, { name: item.name, children: item.children }, item.name)),
177
177
  !hasFixture(items, "Button") && /* @__PURE__ */ jsx(PreviewCell, { name: "Button", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
178
- /* @__PURE__ */ jsx(Button, { children: "Primary" }),
179
- /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Secondary" }),
178
+ /* @__PURE__ */ jsx(Button, { children: "Solid" }),
179
+ /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Soft" }),
180
180
  /* @__PURE__ */ jsx(Button, { disabled: true, variant: "outline", children: "Disabled" })
181
181
  ] }) }),
182
182
  /* @__PURE__ */ jsx(PreviewCell, { name: "ButtonGroup", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4", children: [
183
183
  /* @__PURE__ */ jsxs(ButtonGroup, { children: [
184
- /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Draft" }),
185
- /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Preview" }),
186
- /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Publish" })
184
+ /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Draft" }),
185
+ /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Preview" }),
186
+ /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Publish" })
187
187
  ] }),
188
188
  /* @__PURE__ */ jsxs(ButtonGroup, { children: [
189
189
  /* @__PURE__ */ jsx(ButtonGroupText, { size: "sm", children: "v1.2.0" }),
@@ -191,14 +191,15 @@ function UiPreview({ items = [] }) {
191
191
  /* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", children: "Copy" })
192
192
  ] }),
193
193
  /* @__PURE__ */ jsxs(ButtonGroup, { orientation: "vertical", children: [
194
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "secondary", children: "Move up" }),
195
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "secondary", children: "Move down" })
194
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Move up" }),
195
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Move down" })
196
196
  ] })
197
197
  ] }) }),
198
- /* @__PURE__ */ jsx(PreviewCell, { name: "Badge", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-center gap-2", children: [
199
- /* @__PURE__ */ jsx(Badge, { variant: "primary", children: "Primary" }),
200
- /* @__PURE__ */ jsx(Badge, { children: "Default" }),
201
- /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Outline" })
198
+ /* @__PURE__ */ jsx(PreviewCell, { name: "Tag", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-center gap-2", children: [
199
+ /* @__PURE__ */ jsx(Tag, { children: "Solid" }),
200
+ /* @__PURE__ */ jsx(Tag, { variant: "soft", children: "Soft" }),
201
+ /* @__PURE__ */ jsx(Tag, { variant: "outline", children: "Outline" }),
202
+ /* @__PURE__ */ jsx(Tag, { borderStyle: "dotted", tone: "accent", variant: "soft", children: "Beta" })
202
203
  ] }) }),
203
204
  /* @__PURE__ */ jsx(PreviewCell, { name: "Input", children: /* @__PURE__ */ jsxs(
204
205
  "label",
@@ -242,7 +243,7 @@ function UiPreview({ items = [] }) {
242
243
  }
243
244
  ),
244
245
  /* @__PURE__ */ jsx(Link, { color: "accent", disabled: true, href: "#", variant: "link.standalone", children: "Disabled link" }),
245
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.primary", children: "Link as button" })
246
+ /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.solid", children: "Link as button" })
246
247
  ] }) }),
247
248
  /* @__PURE__ */ jsx(PreviewCell, { name: "Link colors", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
248
249
  /* @__PURE__ */ jsx(Link, { href: "/ds", color: "green-300", children: "Docs" }),
@@ -287,8 +288,8 @@ function UiPreview({ items = [] }) {
287
288
  ] }) }),
288
289
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
289
290
  /* @__PURE__ */ jsx(Link, { href: "#", variant: "link.inline", children: "Link inline" }),
290
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.secondary", children: "Link button" }),
291
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "secondary", children: "Button" })
291
+ /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.soft", children: "Link button" }),
292
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Button" })
292
293
  ] })
293
294
  ] }) }),
294
295
  /* @__PURE__ */ jsx(PreviewCell, { name: "Text", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xs space-y-2", children: [
@@ -476,7 +477,7 @@ function MdxPreview({ items = [] }) {
476
477
  !hasFixture(items, "Link") && /* @__PURE__ */ jsx(PreviewCell, { name: "Link", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
477
478
  /* @__PURE__ */ jsx(Link, { color: "default", href: "/ds", variant: "link.standalone", children: "Default standalone" }),
478
479
  /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: "Accent inline" }),
479
- /* @__PURE__ */ jsx(Link, { href: "/ds", size: "sm", variant: "button.primary", children: "Button link" })
480
+ /* @__PURE__ */ jsx(Link, { href: "/ds", size: "sm", variant: "button.solid", children: "Button link" })
480
481
  ] }) }),
481
482
  /* @__PURE__ */ jsx(PreviewCell, { name: "MDX Links", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md space-y-4 text-sm leading-7 text-foreground-2", children: [
482
483
  /* @__PURE__ */ jsxs("p", { children: [
@@ -545,7 +546,7 @@ function CopyToClipboardPreview() {
545
546
  }
546
547
  ),
547
548
  onClick: handleCopy,
548
- variant: "secondary",
549
+ variant: "soft",
549
550
  children: "Copy"
550
551
  }
551
552
  );
@@ -349,7 +349,7 @@ function LinkSet({ settings }) {
349
349
  children: "Disabled link"
350
350
  }
351
351
  ),
352
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "lg", variant: "button.primary", children: "Link as button" })
352
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, { href: "#", size: "lg", variant: "button.solid", children: "Link as button" })
353
353
  ] });
354
354
  }
355
355
  function SizeScale({ settings }) {
@@ -541,7 +541,7 @@ function LinkPlayground() {
541
541
  ] }),
542
542
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2", children: [
543
543
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: reset, size: "xs", variant: "outline", children: "Reset" }),
544
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
544
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
545
545
  ] })
546
546
  ] }) }),
547
547
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
@@ -803,7 +803,7 @@ function LinkPlayground() {
803
803
  value: output
804
804
  }
805
805
  ),
806
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
806
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
807
807
  ] }) })
808
808
  ] })
809
809
  ] })
@@ -326,7 +326,7 @@ function LinkSet({ settings }) {
326
326
  children: "Disabled link"
327
327
  }
328
328
  ),
329
- /* @__PURE__ */ jsx(Link, { href: "#", size: "lg", variant: "button.primary", children: "Link as button" })
329
+ /* @__PURE__ */ jsx(Link, { href: "#", size: "lg", variant: "button.solid", children: "Link as button" })
330
330
  ] });
331
331
  }
332
332
  function SizeScale({ settings }) {
@@ -518,7 +518,7 @@ function LinkPlayground() {
518
518
  ] }),
519
519
  /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
520
520
  /* @__PURE__ */ jsx(Button, { onClick: reset, size: "xs", variant: "outline", children: "Reset" }),
521
- /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
521
+ /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
522
522
  ] })
523
523
  ] }) }),
524
524
  /* @__PURE__ */ jsxs("div", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
@@ -780,7 +780,7 @@ function LinkPlayground() {
780
780
  value: output
781
781
  }
782
782
  ),
783
- /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
783
+ /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
784
784
  ] }) })
785
785
  ] })
786
786
  ] })
@@ -140,7 +140,7 @@ function Navbar({
140
140
  href: "/",
141
141
  rightIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { "aria-hidden": "true", size: 14 }),
142
142
  size: "sm",
143
- variant: "button.primary",
143
+ variant: "button.solid",
144
144
  children: "Start"
145
145
  }
146
146
  ),
@@ -109,7 +109,7 @@ function Navbar({
109
109
  href: "/",
110
110
  rightIcon: /* @__PURE__ */ jsx(ArrowRight, { "aria-hidden": "true", size: 14 }),
111
111
  size: "sm",
112
- variant: "button.primary",
112
+ variant: "button.solid",
113
113
  children: "Start"
114
114
  }
115
115
  ),
@@ -476,7 +476,7 @@ function NavigationProgressPlayground() {
476
476
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-sm font-semibold text-foreground-1", children: "Navigation Progress" }),
477
477
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune, trigger, copy." })
478
478
  ] }),
479
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
479
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
480
480
  ] }) }),
481
481
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "border-b border-stroke-3 px-4 py-4", children: [
482
482
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 gap-1 rounded-button border border-stroke-2 bg-surface-2 p-1", children: presetOrder.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -722,7 +722,7 @@ function NavigationProgressPlayground() {
722
722
  value: output
723
723
  }
724
724
  ),
725
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
725
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
726
726
  ] }) })
727
727
  ] })
728
728
  ] })
@@ -464,7 +464,7 @@ function NavigationProgressPlayground() {
464
464
  /* @__PURE__ */ jsx("h1", { className: "text-sm font-semibold text-foreground-1", children: "Navigation Progress" }),
465
465
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune, trigger, copy." })
466
466
  ] }),
467
- /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
467
+ /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
468
468
  ] }) }),
469
469
  /* @__PURE__ */ jsxs("div", { className: "border-b border-stroke-3 px-4 py-4", children: [
470
470
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-1 rounded-button border border-stroke-2 bg-surface-2 p-1", children: presetOrder.map((preset) => /* @__PURE__ */ jsx(
@@ -710,7 +710,7 @@ function NavigationProgressPlayground() {
710
710
  value: output
711
711
  }
712
712
  ),
713
- /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
713
+ /* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
714
714
  ] }) })
715
715
  ] })
716
716
  ] })
@@ -99,16 +99,15 @@ function ButtonGroup({
99
99
  }
100
100
  function ButtonGroupText({
101
101
  className,
102
- color,
103
102
  size,
104
- variant = "secondary",
103
+ variant = "soft",
105
104
  ...props
106
105
  }) {
107
106
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
107
  "div",
109
108
  {
110
109
  className: cn(
111
- (0, import_button.buttonVariants)({ color, iconOnly: false, size, variant }),
110
+ (0, import_button.buttonVariants)({ iconOnly: false, size, variant }),
112
111
  "pointer-events-none",
113
112
  className
114
113
  ),
@@ -11,8 +11,8 @@ declare const buttonGroupVariants: (props?: ({
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  type ButtonGroupProps = ComponentPropsWithoutRef<"div"> & VariantProps<typeof buttonGroupVariants>;
13
13
  declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
14
- type ButtonGroupTextProps = Omit<ComponentPropsWithoutRef<"div">, "color"> & Pick<ButtonVariantProps, "color" | "size" | "variant">;
15
- declare function ButtonGroupText({ className, color, size, variant, ...props }: ButtonGroupTextProps): react_jsx_runtime.JSX.Element;
14
+ type ButtonGroupTextProps = Omit<ComponentPropsWithoutRef<"div">, "color"> & Pick<ButtonVariantProps, "size" | "variant">;
15
+ declare function ButtonGroupText({ className, size, variant, ...props }: ButtonGroupTextProps): react_jsx_runtime.JSX.Element;
16
16
  type ButtonGroupSeparatorProps = SeparatorProps;
17
17
  declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): react_jsx_runtime.JSX.Element;
18
18
 
@@ -11,8 +11,8 @@ declare const buttonGroupVariants: (props?: ({
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  type ButtonGroupProps = ComponentPropsWithoutRef<"div"> & VariantProps<typeof buttonGroupVariants>;
13
13
  declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
14
- type ButtonGroupTextProps = Omit<ComponentPropsWithoutRef<"div">, "color"> & Pick<ButtonVariantProps, "color" | "size" | "variant">;
15
- declare function ButtonGroupText({ className, color, size, variant, ...props }: ButtonGroupTextProps): react_jsx_runtime.JSX.Element;
14
+ type ButtonGroupTextProps = Omit<ComponentPropsWithoutRef<"div">, "color"> & Pick<ButtonVariantProps, "size" | "variant">;
15
+ declare function ButtonGroupText({ className, size, variant, ...props }: ButtonGroupTextProps): react_jsx_runtime.JSX.Element;
16
16
  type ButtonGroupSeparatorProps = SeparatorProps;
17
17
  declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): react_jsx_runtime.JSX.Element;
18
18
 
@@ -72,16 +72,15 @@ function ButtonGroup({
72
72
  }
73
73
  function ButtonGroupText({
74
74
  className,
75
- color,
76
75
  size,
77
- variant = "secondary",
76
+ variant = "soft",
78
77
  ...props
79
78
  }) {
80
79
  return /* @__PURE__ */ jsx(
81
80
  "div",
82
81
  {
83
82
  className: cn(
84
- buttonVariants({ color, iconOnly: false, size, variant }),
83
+ buttonVariants({ iconOnly: false, size, variant }),
85
84
  "pointer-events-none",
86
85
  className
87
86
  ),