@hraness/design-kit 0.35.0 → 0.35.2

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.
@@ -8,8 +8,9 @@ import {
8
8
  HeroBackdrop
9
9
  } from "../chunk-8834fh4n.js";
10
10
  import {
11
- PlatformInstall
12
- } from "../chunk-8xfssb9c.js";
11
+ PlatformInstall,
12
+ SetupCopyButton
13
+ } from "../chunk-tzd7177a.js";
13
14
  import {
14
15
  ArticleBarChart,
15
16
  ArticleByline,
@@ -88,10 +89,10 @@ import {
88
89
  marketingProofFrameAddress,
89
90
  proceduralBackdropVariants,
90
91
  proceduralRecipeVersion
91
- } from "../chunk-c9mhn3yb.js";
92
+ } from "../chunk-4tgt8egt.js";
92
93
  import {
93
94
  SyntaxCode
94
- } from "../chunk-fjf81bww.js";
95
+ } from "../chunk-6ts4955n.js";
95
96
  import {
96
97
  STATUS_PAGE_AGENT_PREFIX,
97
98
  STATUS_PAGE_BACK_LABEL,
@@ -120,7 +121,7 @@ import {
120
121
  resolveStatusPage,
121
122
  statusPageRoutesAttribute,
122
123
  suggestStatusRoute
123
- } from "../chunk-c80g58j1.js";
124
+ } from "../chunk-fmeg5cxf.js";
124
125
  import"../chunk-gmea6p0d.js";
125
126
  import"../chunk-wzvdn8ey.js";
126
127
  import"../chunk-he8eznb1.js";
@@ -290,43 +291,12 @@ var agentSetupStyles = {
290
291
  kA33Yr: "x13c0qn1",
291
292
  $$css: true
292
293
  },
293
- copy: {
294
- kGNEyG: "x6s0dn4",
295
- kysU6D: "xjyslct",
296
- kWkggS: "x17tv4j5 x1lf5oka xnwy5bs",
297
- kVAM5u: "x3ugid2 x1ylmb6m",
298
- kaIpWk: "x116uinm",
299
- ksu8eU: "x1y0btm7",
300
- kMzoRj: "xmkeg23",
301
- kB7OPa: "x9f619",
302
- kMwMTN: "xm06a53 x1ggml12",
303
- kkrTdU: "x1ypdohk",
304
- k1xSpc: "x3nfvp2 x1cfwndu",
305
- kmuXW: "x2lah0s",
306
- kMv6JI: "xjb2p0i",
307
- kGuDYH: "x1dcheo9",
308
- kOIVth: "x1neeqzj",
309
- kjj79g: "xl56j7k",
310
- kLWn49: "xo5v014",
311
- kogj98: "x1ghz6dp",
312
- kAzted: "xgbkey0",
313
- kI3sdo: "x1a2a7pz xr5lfjo",
314
- kInvED: "x1hl8ikr",
315
- kmVPX3: "x1i4hug3",
316
- $$css: true
317
- },
318
294
  copyOverlay: {
319
295
  krVfgx: "x1of4z1n",
320
296
  kt4wiu: "xe388cy",
321
297
  kVAEAm: "x10l6tqk",
322
298
  $$css: true
323
299
  },
324
- copyIcon: {
325
- kZKoxP: "x1l36t39",
326
- kmuXW: "x2lah0s",
327
- kzqmXN: "xcdlrvm",
328
- $$css: true
329
- },
330
300
  targets: {
331
301
  k1xSpc: "xrvj5dj",
332
302
  kOIVth: "x1uma3xh",
@@ -349,6 +319,12 @@ var agentSetupStyles = {
349
319
  kmVPX3: "x1717udv",
350
320
  $$css: true
351
321
  },
322
+ targetGrid: {
323
+ kumcoG: "xe92ajh",
324
+ "--_hraness-agent-target-columns": "x6fuqh4",
325
+ "--_hraness-agent-target-wide-columns": "x1ii36b5",
326
+ $$css: true
327
+ },
352
328
  target: {
353
329
  kGNEyG: "x6s0dn4",
354
330
  kWkggS: "xw51l6n x1jf9jbc xnwy5bs",
@@ -479,7 +455,7 @@ function agentSetupClassName(parts, caller) {
479
455
  }
480
456
 
481
457
  // src/react/agent-setup-prompt.tsx
482
- import { jsx as jsx2, jsxs, Fragment } from "react/jsx-runtime";
458
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
483
459
  function commandSubject(entry) {
484
460
  return `${entry.label} ${entry.filename === undefined ? "command" : "configuration"}`;
485
461
  }
@@ -648,61 +624,20 @@ function useCopy(text, subject, fallback, onCopied) {
648
624
  copy
649
625
  };
650
626
  }
651
- function CopyGlyph({
652
- copied
653
- }) {
654
- return /* @__PURE__ */ jsx2("svg", {
655
- "aria-hidden": "true",
656
- className: agentSetupClassName(["copyIcon"]),
657
- fill: "none",
658
- focusable: "false",
659
- stroke: "currentColor",
660
- strokeLinecap: "round",
661
- strokeLinejoin: "round",
662
- strokeWidth: 2,
663
- viewBox: "0 0 24 24",
664
- children: copied ? /* @__PURE__ */ jsx2("path", {
665
- d: "M5 12.5l4.5 4.5L19 7.5"
666
- }) : /* @__PURE__ */ jsxs(Fragment, {
667
- children: [
668
- /* @__PURE__ */ jsx2("rect", {
669
- height: "12",
670
- rx: "2",
671
- width: "12",
672
- x: "8",
673
- y: "8"
674
- }),
675
- /* @__PURE__ */ jsx2("path", {
676
- d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"
677
- })
678
- ]
679
- })
680
- });
681
- }
682
627
  function CopyButton({
683
628
  copy,
684
629
  overlay = false,
685
630
  state,
686
631
  subject
687
632
  }) {
688
- return /* @__PURE__ */ jsxs("button", {
689
- "aria-busy": state === "copying" || undefined,
690
- "aria-label": `${state === "copied" ? "Copied" : "Copy"} ${subject}`,
691
- className: agentSetupClassName(["copy", overlay && "copyOverlay"]),
692
- "data-copy-state": state,
693
- disabled: state === "copying",
694
- onClick: () => {
633
+ return /* @__PURE__ */ jsx2(SetupCopyButton, {
634
+ className: agentSetupClassName([overlay && "copyOverlay"], "hraness-agent-setup__copy"),
635
+ iconClassName: "hraness-agent-setup__copyIcon",
636
+ onCopy: () => {
695
637
  copy();
696
638
  },
697
- type: "button",
698
- children: [
699
- /* @__PURE__ */ jsx2(CopyGlyph, {
700
- copied: state === "copied"
701
- }),
702
- /* @__PURE__ */ jsx2("span", {
703
- children: state === "copied" ? "Copied" : state === "copying" ? "Copying" : state === "failed" ? "Copy failed" : "Copy"
704
- })
705
- ]
639
+ state,
640
+ subject
706
641
  });
707
642
  }
708
643
  function CopyStatus({
@@ -743,12 +678,15 @@ function AgentSetupPrompt({
743
678
  prompt,
744
679
  label = "Agent setup",
745
680
  targets = [],
681
+ targetsPlacement = "responsive",
746
682
  className,
747
683
  onCopied
748
684
  }) {
749
685
  assertText(prompt, "Agent setup prompt");
750
686
  assertText(label, "Agent setup label");
751
687
  assertEntries(targets, "Agent setup target");
688
+ if (targetsPlacement !== "responsive" && targetsPlacement !== "below")
689
+ throw new RangeError("Unsupported agent setup targets placement.");
752
690
  for (const target of targets) {
753
691
  assertHref(target.href);
754
692
  if (target.mode !== undefined && target.mode !== "prefill" && target.mode !== "copy-and-open")
@@ -851,9 +789,10 @@ function AgentSetupPrompt({
851
789
  "aria-label": label,
852
790
  className: agentSetupClassName(["root"], className),
853
791
  "data-hraness-agent-setup-prompt": "",
792
+ "data-targets-placement": targetsPlacement,
854
793
  children: [
855
794
  /* @__PURE__ */ jsxs("div", {
856
- className: agentSetupClassName(["layout", targets.length > 0 && "withTargets"]),
795
+ className: agentSetupClassName(["layout", targets.length > 0 && targetsPlacement === "responsive" && "withTargets"]),
857
796
  children: [
858
797
  /* @__PURE__ */ jsxs("div", {
859
798
  className: agentSetupClassName(["frame"]),
@@ -907,7 +846,7 @@ function AgentSetupPrompt({
907
846
  children: "Open in"
908
847
  }),
909
848
  /* @__PURE__ */ jsx2("ul", {
910
- className: agentSetupClassName(["targetList"]),
849
+ className: agentSetupClassName(["targetList", targetsPlacement === "below" && "targetGrid"]),
911
850
  children: targets.map((target) => /* @__PURE__ */ jsx2("li", {
912
851
  children: /* @__PURE__ */ jsxs("a", {
913
852
  "aria-busy": target.mode === "copy-and-open" && state === "copying" || undefined,
@@ -1669,11 +1608,11 @@ function PhaserDots({
1669
1608
  }
1670
1609
 
1671
1610
  // src/react/aurora-dots-background.tsx
1672
- import { jsx as jsx5, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
1611
+ import { jsx as jsx5, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
1673
1612
  function AuroraDotsBackground() {
1674
1613
  const backgroundPresentation = stylex5.props(effectsStyles.auroraBackground);
1675
1614
  const dotsPresentation = stylex5.props(effectsStyles.auroraDots);
1676
- return /* @__PURE__ */ jsxs4(Fragment2, {
1615
+ return /* @__PURE__ */ jsxs4(Fragment, {
1677
1616
  children: [
1678
1617
  /* @__PURE__ */ jsx5("div", {
1679
1618
  "aria-hidden": "true",
@@ -5293,7 +5232,7 @@ var themeStyles = {
5293
5232
  };
5294
5233
 
5295
5234
  // src/react/theme.tsx
5296
- import { jsx as jsx14, jsxs as jsxs12, Fragment as Fragment3 } from "react/jsx-runtime";
5235
+ import { jsx as jsx14, jsxs as jsxs12, Fragment as Fragment2 } from "react/jsx-runtime";
5297
5236
  var concreteThemes = ["light", "dark"];
5298
5237
  var emptySubscribe = () => () => {
5299
5238
  return;
@@ -5335,7 +5274,7 @@ function DesignThemeProvider({
5335
5274
  nonce,
5336
5275
  storageKey = designThemeStorageKey
5337
5276
  }) {
5338
- return /* @__PURE__ */ jsxs12(Fragment3, {
5277
+ return /* @__PURE__ */ jsxs12(Fragment2, {
5339
5278
  children: [
5340
5279
  forcedTheme === undefined ? /* @__PURE__ */ jsx14("script", {
5341
5280
  ...nonce === undefined ? {} : {
@@ -5542,7 +5481,7 @@ function ThemeColorSync({
5542
5481
  }
5543
5482
 
5544
5483
  // src/react/route-state.tsx
5545
- import { jsx as jsx15, jsxs as jsxs13, Fragment as Fragment4 } from "react/jsx-runtime";
5484
+ import { jsx as jsx15, jsxs as jsxs13, Fragment as Fragment3 } from "react/jsx-runtime";
5546
5485
  var lowerHeading = {
5547
5486
  h1: "h2",
5548
5487
  h2: "h3",
@@ -5634,7 +5573,7 @@ function StatusPage({
5634
5573
  /* @__PURE__ */ jsxs13("div", {
5635
5574
  className: "hraness-status-page__actions",
5636
5575
  children: [
5637
- onRetry ? /* @__PURE__ */ jsxs13(Fragment4, {
5576
+ onRetry ? /* @__PURE__ */ jsxs13(Fragment3, {
5638
5577
  children: [
5639
5578
  /* @__PURE__ */ jsx15("button", {
5640
5579
  className: "hraness-status-page__action hraness-foil",
@@ -5802,7 +5741,7 @@ function GlobalErrorDocument({
5802
5741
  theme = defaultDesignTheme,
5803
5742
  ...props14
5804
5743
  }) {
5805
- const content = /* @__PURE__ */ jsxs13(Fragment4, {
5744
+ const content = /* @__PURE__ */ jsxs13(Fragment3, {
5806
5745
  children: [
5807
5746
  diagnostics,
5808
5747
  /* @__PURE__ */ jsx15(RouteErrorPage, {
@@ -5822,7 +5761,7 @@ function GlobalErrorDocument({
5822
5761
  content: theme === "system" ? "light dark" : theme,
5823
5762
  name: "color-scheme"
5824
5763
  }),
5825
- theme === "system" ? /* @__PURE__ */ jsxs13(Fragment4, {
5764
+ theme === "system" ? /* @__PURE__ */ jsxs13(Fragment3, {
5826
5765
  children: [
5827
5766
  /* @__PURE__ */ jsx15("meta", {
5828
5767
  content: lightColor,
@@ -6004,7 +5943,7 @@ function RelativeTime({
6004
5943
  }
6005
5944
 
6006
5945
  // src/react/design-gallery.tsx
6007
- import { jsx as jsx17, jsxs as jsxs15, Fragment as Fragment5 } from "react/jsx-runtime";
5946
+ import { jsx as jsx17, jsxs as jsxs15, Fragment as Fragment4 } from "react/jsx-runtime";
6008
5947
  var designGallerySections = [{
6009
5948
  id: "foundation",
6010
5949
  label: "Foundation"
@@ -6592,6 +6531,7 @@ function DesignSystemGallery({
6592
6531
  children: [
6593
6532
  /* @__PURE__ */ jsx17(AgentSetupPrompt, {
6594
6533
  label: "Relay agent setup",
6534
+ targetsPlacement: "below",
6595
6535
  prompt: `Install Relay from https://relay.example/install.sh.
6596
6536
  Read the project instructions before making changes.
6597
6537
  Run relay init in this workspace and create a job named sample.
@@ -6646,7 +6586,7 @@ Run the job, then show me its log.`,
6646
6586
  }),
6647
6587
  /* @__PURE__ */ jsxs15(MarketingSection, {
6648
6588
  heading: "A job keeps its name everywhere.",
6649
- headingContent: /* @__PURE__ */ jsxs15(Fragment5, {
6589
+ headingContent: /* @__PURE__ */ jsxs15(Fragment4, {
6650
6590
  children: [
6651
6591
  /* @__PURE__ */ jsx17(MarketingCodeBlock, {
6652
6592
  code: "relay run job-01"
@@ -7192,6 +7132,7 @@ Run the job, then show me its log.`,
7192
7132
  /* @__PURE__ */ jsxs15(MarketingArticle, {
7193
7133
  after: /* @__PURE__ */ jsx17(ArticleSources, {
7194
7134
  headingId: "gallery-article-sources",
7135
+ showDates: false,
7195
7136
  sources: [{
7196
7137
  checkedOn: "2026-09-20",
7197
7138
  href: "#articles",
@@ -7215,6 +7156,7 @@ Run the job, then show me its log.`,
7215
7156
  }
7216
7157
  },
7217
7158
  published: "2026-09-10",
7159
+ showDates: false,
7218
7160
  toc: [{
7219
7161
  href: "#gallery-article-problem",
7220
7162
  label: "The problem"
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  PlatformInstall
4
- } from "../chunk-8xfssb9c.js";
5
- import"../chunk-fjf81bww.js";
4
+ } from "../chunk-tzd7177a.js";
5
+ import"../chunk-6ts4955n.js";
6
6
  import"../chunk-wzvdn8ey.js";
7
7
  import"../chunk-he8eznb1.js";
8
8
  import"../chunk-5gtx3pza.js";
@@ -68,10 +68,10 @@ import {
68
68
  marketingProofFrameAddress,
69
69
  proceduralBackdropVariants,
70
70
  proceduralRecipeVersion
71
- } from "../chunk-c9mhn3yb.js";
71
+ } from "../chunk-4tgt8egt.js";
72
72
  import {
73
73
  SyntaxCode
74
- } from "../chunk-fjf81bww.js";
74
+ } from "../chunk-6ts4955n.js";
75
75
  import"../chunk-gmea6p0d.js";
76
76
  import"../chunk-wzvdn8ey.js";
77
77
  import"../chunk-he8eznb1.js";