@hraness/design-kit 0.34.0 → 0.35.1
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/AGENT_SETUP.md +4 -0
- package/ARTICLE_COPY.md +12 -6
- package/README.md +20 -2
- package/dist/{chunk-nwpcjm48.js → chunk-6bfr0g23.js} +1115 -441
- package/dist/{chunk-h4k7yv6x.js → chunk-6ts4955n.js} +36 -36
- package/dist/chunk-gmea6p0d.js +13 -0
- package/dist/{chunk-mr1vdcjq.js → chunk-tzd7177a.js} +142 -82
- package/dist/index.js +5 -1
- package/dist/mockups/client.js +50 -15
- package/dist/portfolio.js +586 -85
- package/dist/react/index.js +169 -105
- package/dist/react/platform-install.js +3 -2
- package/dist/react/server.js +17 -3
- package/dist/stylex-manifest.json +1 -1
- package/dist/stylex.css +376 -58
- package/package.json +16 -3
- package/portfolio-inventory.json +1 -1
- package/src/diagrams.ts +11 -0
- package/src/index.ts +2 -0
- package/src/marketing-comparison.css +162 -0
- package/src/marketing-diagram.css +24 -0
- package/src/mockups/client.tsx +25 -17
- package/src/mockups.css +19 -0
- package/src/plain-publication.css +9 -6
- package/src/portfolio.generated.json +578 -86
- package/src/portfolio.generated.ts +578 -86
- package/src/portfolio.ts +73 -0
- package/src/product-marketing-foundation.css +29 -0
- package/src/product-marketing.css +133 -38
- package/src/react/agent-setup-prompt.stylex.ts +5 -25
- package/src/react/agent-setup-prompt.tsx +9 -18
- package/src/react/article.tsx +2 -2
- package/src/react/design-gallery.tsx +34 -6
- package/src/react/index.ts +3 -0
- package/src/react/marketing-account.stylex.ts +74 -0
- package/src/react/marketing-account.tsx +69 -0
- package/src/react/marketing-comparison.stylex.ts +24 -0
- package/src/react/marketing-comparison.tsx +73 -0
- package/src/react/marketing-diagram.stylex.ts +8 -0
- package/src/react/marketing-diagram.tsx +33 -0
- package/src/react/platform-install.stylex.ts +9 -37
- package/src/react/platform-install.tsx +17 -24
- package/src/react/product-marketing.stylex.ts +138 -109
- package/src/react/product-marketing.tsx +69 -43
- package/src/react/server.ts +3 -0
- package/src/react/setup-copy-button.stylex.ts +39 -0
- package/src/react/setup-copy-button.tsx +20 -0
- package/src/styles.css +2 -0
- package/src/typography.css +32 -0
- /package/dist/{chunk-4d79eskk.js → chunk-c80g58j1.js} +0 -0
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
highlightCode
|
|
3
|
+
} from "./chunk-he8eznb1.js";
|
|
4
|
+
|
|
5
|
+
// src/react/syntax-code.tsx
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function SyntaxCode({
|
|
8
|
+
className,
|
|
9
|
+
code,
|
|
10
|
+
language,
|
|
11
|
+
styles
|
|
12
|
+
}) {
|
|
13
|
+
const highlighted = highlightCode(code, language, styles === undefined ? {} : {
|
|
14
|
+
styles
|
|
15
|
+
});
|
|
16
|
+
const classes = className === undefined ? highlighted.className : `${highlighted.className} ${className}`;
|
|
17
|
+
return /* @__PURE__ */ jsx("code", {
|
|
18
|
+
className: classes,
|
|
19
|
+
"data-language": highlighted.language,
|
|
20
|
+
dangerouslySetInnerHTML: {
|
|
21
|
+
__html: highlighted.html
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
1
26
|
// src/react/platform-install.stylex.ts
|
|
2
27
|
import * as stylex from "@stylexjs/stylex";
|
|
3
28
|
var ink = "var(--hraness-marketing-ink, var(--foreground, CanvasText))";
|
|
@@ -118,11 +143,12 @@ var platformInstallStyles = {
|
|
|
118
143
|
},
|
|
119
144
|
command: {
|
|
120
145
|
kWkggS: "xvpcapb x9yvj25",
|
|
121
|
-
kVAM5u: "
|
|
146
|
+
kVAM5u: "xtxfw9o x1w1tqly",
|
|
122
147
|
kaIpWk: "x1yt6v20",
|
|
123
148
|
ksu8eU: "x1y0btm7",
|
|
124
149
|
kMzoRj: "xmkeg23",
|
|
125
150
|
kB7OPa: "x9f619",
|
|
151
|
+
kGVxlE: "x1s13key xwaqzdf",
|
|
126
152
|
k1xSpc: "xrvj5dj",
|
|
127
153
|
k7Eaqz: "xeuugli",
|
|
128
154
|
kVQacm: "xb3r6kr",
|
|
@@ -188,38 +214,6 @@ var platformInstallStyles = {
|
|
|
188
214
|
kmVPX3: "x1717udv",
|
|
189
215
|
$$css: true
|
|
190
216
|
},
|
|
191
|
-
copy: {
|
|
192
|
-
kGNEyG: "x6s0dn4",
|
|
193
|
-
kysU6D: "xjyslct",
|
|
194
|
-
kWkggS: "xf7cb96 x3oli7v xnwy5bs",
|
|
195
|
-
kVAM5u: "x1ls9zlr x1ylmb6m",
|
|
196
|
-
kaIpWk: "x116uinm",
|
|
197
|
-
ksu8eU: "x1y0btm7",
|
|
198
|
-
kMzoRj: "xmkeg23",
|
|
199
|
-
kB7OPa: "x9f619",
|
|
200
|
-
kMwMTN: "x1p5laik x1ggml12",
|
|
201
|
-
kkrTdU: "x1ypdohk",
|
|
202
|
-
k1xSpc: "x3nfvp2 x1cfwndu",
|
|
203
|
-
kmuXW: "x2lah0s",
|
|
204
|
-
kMv6JI: "x1vnz01h",
|
|
205
|
-
kGuDYH: "x1dcheo9",
|
|
206
|
-
k63SB2: "xk50ysn",
|
|
207
|
-
kOIVth: "x73f2yu",
|
|
208
|
-
kLWn49: "xo5v014",
|
|
209
|
-
kogj98: "x1ghz6dp",
|
|
210
|
-
kAzted: "x1in32aq x1rewkhn",
|
|
211
|
-
kI3sdo: "x1a2a7pz x11dsm9b",
|
|
212
|
-
kInvED: "x1y3gkto",
|
|
213
|
-
k8WAf4: "x1267ecw",
|
|
214
|
-
kg3NbH: "x1f6otoe",
|
|
215
|
-
$$css: true
|
|
216
|
-
},
|
|
217
|
-
copyIcon: {
|
|
218
|
-
kZKoxP: "x1at03k5",
|
|
219
|
-
kmuXW: "x2lah0s",
|
|
220
|
-
kzqmXN: "x2tfi8i",
|
|
221
|
-
$$css: true
|
|
222
|
-
},
|
|
223
217
|
alternatives: {
|
|
224
218
|
k1xSpc: "xrvj5dj",
|
|
225
219
|
kOIVth: "x1uma3xh",
|
|
@@ -236,6 +230,14 @@ var platformInstallStyles = {
|
|
|
236
230
|
kogj98: "x1ghz6dp",
|
|
237
231
|
$$css: true
|
|
238
232
|
},
|
|
233
|
+
commandNote: {
|
|
234
|
+
kLZC3w: "x1h3am7x x19dwuzr",
|
|
235
|
+
kPef9Z: "x13fuv20",
|
|
236
|
+
kEafiO: "x178xt8z",
|
|
237
|
+
k8WAf4: "x8fiyw4",
|
|
238
|
+
kg3NbH: "x1fi0nvg",
|
|
239
|
+
$$css: true
|
|
240
|
+
},
|
|
239
241
|
unavailable: {
|
|
240
242
|
kVAM5u: "x1ls9zlr x1w1tqly",
|
|
241
243
|
kaIpWk: "x1yt6v20",
|
|
@@ -341,8 +343,6 @@ var hooks = {
|
|
|
341
343
|
code: "hraness-platform-install__code",
|
|
342
344
|
command: "hraness-platform-install__command",
|
|
343
345
|
commandBar: "hraness-platform-install__command-bar",
|
|
344
|
-
copy: "hraness-platform-install__copy",
|
|
345
|
-
copyIcon: "hraness-platform-install__copy-icon",
|
|
346
346
|
icon: "hraness-platform-icon",
|
|
347
347
|
markSymbols: "hraness-platform-install__marks",
|
|
348
348
|
note: "hraness-platform-install__note",
|
|
@@ -365,4 +365,4 @@ function platformInstallClassName(parts, caller) {
|
|
|
365
365
|
return [...hookNames, atoms, caller].filter(Boolean).join(" ");
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
export { platformInstallClassName };
|
|
368
|
+
export { SyntaxCode, platformInstallClassName };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/diagrams.ts
|
|
2
|
+
var diagramMetrics = Object.freeze({
|
|
3
|
+
labelSize: 20,
|
|
4
|
+
detailSize: 16,
|
|
5
|
+
strokeWidth: 1.5,
|
|
6
|
+
arrowheadSize: 6,
|
|
7
|
+
nodePadding: 24,
|
|
8
|
+
nodeGap: 48,
|
|
9
|
+
minimumCanvasWidth: 640,
|
|
10
|
+
fontFamily: '"Nebula Sans", ui-sans-serif, system-ui, sans-serif'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { diagramMetrics };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
SyntaxCode,
|
|
2
3
|
platformInstallClassName
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6ts4955n.js";
|
|
4
5
|
import {
|
|
5
6
|
detectPlatform,
|
|
6
7
|
isKnownPlatformId,
|
|
@@ -12,7 +13,102 @@ import {
|
|
|
12
13
|
|
|
13
14
|
// src/react/platform-install.tsx
|
|
14
15
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
16
|
+
|
|
17
|
+
// src/react/setup-copy-button.stylex.ts
|
|
18
|
+
import * as stylex from "@stylexjs/stylex";
|
|
19
|
+
var setupCopyButtonStyles = {
|
|
20
|
+
button: {
|
|
21
|
+
kGNEyG: "x6s0dn4",
|
|
22
|
+
kysU6D: "xjyslct",
|
|
23
|
+
kWkggS: "x17tv4j5 x1lf5oka xnwy5bs",
|
|
24
|
+
kVAM5u: "x3ugid2 x1ylmb6m",
|
|
25
|
+
kaIpWk: "x116uinm",
|
|
26
|
+
ksu8eU: "x1y0btm7",
|
|
27
|
+
kMzoRj: "xmkeg23",
|
|
28
|
+
kB7OPa: "x9f619",
|
|
29
|
+
kMwMTN: "xm06a53 x1ggml12",
|
|
30
|
+
kkrTdU: "x1ypdohk",
|
|
31
|
+
k1xSpc: "x3nfvp2 x1cfwndu",
|
|
32
|
+
kmuXW: "x2lah0s",
|
|
33
|
+
kMv6JI: "xtls1wf",
|
|
34
|
+
kGuDYH: "x1dcheo9",
|
|
35
|
+
k63SB2: "xk50ysn",
|
|
36
|
+
kOIVth: "x1neeqzj",
|
|
37
|
+
kjj79g: "xl56j7k",
|
|
38
|
+
kLWn49: "xo5v014",
|
|
39
|
+
kogj98: "x1ghz6dp",
|
|
40
|
+
kAzted: "xgbkey0",
|
|
41
|
+
kI3sdo: "x1a2a7pz xr5lfjo",
|
|
42
|
+
kInvED: "x1hl8ikr",
|
|
43
|
+
kmVPX3: "x1i4hug3",
|
|
44
|
+
$$css: true
|
|
45
|
+
},
|
|
46
|
+
icon: {
|
|
47
|
+
kZKoxP: "x1l36t39",
|
|
48
|
+
kmuXW: "x2lah0s",
|
|
49
|
+
kzqmXN: "xcdlrvm",
|
|
50
|
+
$$css: true
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
function setupCopyButtonClassName(part, caller) {
|
|
54
|
+
return [`hraness-setup-copy__${part}`, stylex.props(setupCopyButtonStyles[part]).className, caller].filter(Boolean).join(" ");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/react/setup-copy-button.tsx
|
|
15
58
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
59
|
+
function SetupCopyButton({
|
|
60
|
+
className,
|
|
61
|
+
iconClassName,
|
|
62
|
+
onCopy,
|
|
63
|
+
state,
|
|
64
|
+
subject,
|
|
65
|
+
failedLabel = "Copy failed"
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
68
|
+
"aria-busy": state === "copying" || undefined,
|
|
69
|
+
"aria-label": `${state === "copied" ? "Copied" : "Copy"} ${subject}`,
|
|
70
|
+
className: setupCopyButtonClassName("button", className),
|
|
71
|
+
"data-copy-state": state,
|
|
72
|
+
disabled: state === "copying",
|
|
73
|
+
onClick: onCopy,
|
|
74
|
+
type: "button",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx("svg", {
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
className: setupCopyButtonClassName("icon", iconClassName),
|
|
79
|
+
fill: "none",
|
|
80
|
+
focusable: "false",
|
|
81
|
+
stroke: "currentColor",
|
|
82
|
+
strokeLinecap: "round",
|
|
83
|
+
strokeLinejoin: "round",
|
|
84
|
+
strokeWidth: 2,
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
children: state === "copied" ? /* @__PURE__ */ jsx("path", {
|
|
87
|
+
d: "M5 12.5l4.5 4.5L19 7.5"
|
|
88
|
+
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsx("rect", {
|
|
91
|
+
height: "12",
|
|
92
|
+
rx: "2",
|
|
93
|
+
width: "12",
|
|
94
|
+
x: "8",
|
|
95
|
+
y: "8"
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ jsx("path", {
|
|
98
|
+
d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ jsx("span", {
|
|
104
|
+
children: state === "copied" ? "Copied" : state === "copying" ? "Copying" : state === "failed" ? failedLabel : "Copy"
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/react/platform-install.tsx
|
|
111
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
16
112
|
var copyResetMilliseconds = 2000;
|
|
17
113
|
function assertTargets(platforms, defaultPlatform) {
|
|
18
114
|
if (platforms.length === 0)
|
|
@@ -81,17 +177,17 @@ function PlatformMarkSymbols({
|
|
|
81
177
|
ids,
|
|
82
178
|
symbolId
|
|
83
179
|
}) {
|
|
84
|
-
return /* @__PURE__ */
|
|
180
|
+
return /* @__PURE__ */ jsx2("svg", {
|
|
85
181
|
"aria-hidden": "true",
|
|
86
182
|
className: platformInstallClassName(["markSymbols"]),
|
|
87
183
|
focusable: "false",
|
|
88
184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
89
185
|
children: ids.map((id) => {
|
|
90
186
|
const mark = platformMark(id);
|
|
91
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ jsx2("symbol", {
|
|
92
188
|
id: symbolId(id),
|
|
93
189
|
viewBox: mark.viewBox,
|
|
94
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ jsx2("path", {
|
|
95
191
|
d: mark.path
|
|
96
192
|
})
|
|
97
193
|
}, id);
|
|
@@ -102,7 +198,7 @@ function PlatformMarkUse({
|
|
|
102
198
|
platform,
|
|
103
199
|
symbolId
|
|
104
200
|
}) {
|
|
105
|
-
return /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ jsx2("svg", {
|
|
106
202
|
"aria-hidden": "true",
|
|
107
203
|
className: platformInstallClassName(["icon"]),
|
|
108
204
|
"data-platform": platform,
|
|
@@ -110,95 +206,58 @@ function PlatformMarkUse({
|
|
|
110
206
|
focusable: "false",
|
|
111
207
|
viewBox: platformMark(platform).viewBox,
|
|
112
208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ jsx2("use", {
|
|
114
210
|
href: `#${symbolId}`
|
|
115
211
|
})
|
|
116
212
|
});
|
|
117
213
|
}
|
|
118
|
-
function CopyGlyph({
|
|
119
|
-
copied
|
|
120
|
-
}) {
|
|
121
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
122
|
-
"aria-hidden": "true",
|
|
123
|
-
className: platformInstallClassName(["copyIcon"]),
|
|
124
|
-
fill: "none",
|
|
125
|
-
focusable: "false",
|
|
126
|
-
stroke: "currentColor",
|
|
127
|
-
strokeLinecap: "round",
|
|
128
|
-
strokeLinejoin: "round",
|
|
129
|
-
strokeWidth: 2,
|
|
130
|
-
viewBox: "0 0 24 24",
|
|
131
|
-
children: copied ? /* @__PURE__ */ jsx("path", {
|
|
132
|
-
d: "M5 12.5l4.5 4.5L19 7.5"
|
|
133
|
-
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
134
|
-
children: [
|
|
135
|
-
/* @__PURE__ */ jsx("rect", {
|
|
136
|
-
height: "12",
|
|
137
|
-
rx: "2",
|
|
138
|
-
width: "12",
|
|
139
|
-
x: "8",
|
|
140
|
-
y: "8"
|
|
141
|
-
}),
|
|
142
|
-
/* @__PURE__ */ jsx("path", {
|
|
143
|
-
d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"
|
|
144
|
-
})
|
|
145
|
-
]
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
214
|
function CommandBlock({
|
|
150
215
|
caption,
|
|
151
216
|
command,
|
|
152
217
|
copyKey,
|
|
153
218
|
onCopy,
|
|
219
|
+
note,
|
|
154
220
|
status,
|
|
155
221
|
subject
|
|
156
222
|
}) {
|
|
157
223
|
const preRef = useRef(null);
|
|
158
224
|
const state = status?.key === copyKey ? status.ok ? "copied" : "failed" : "idle";
|
|
159
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
160
226
|
className: platformInstallClassName(["command"]),
|
|
161
227
|
"data-copy-state": state,
|
|
162
228
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
164
230
|
className: platformInstallClassName(["commandBar", (caption === undefined || caption === "") && "commandBarEmpty"]),
|
|
165
231
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ jsx2("span", {
|
|
167
233
|
className: platformInstallClassName(["shell"]),
|
|
168
234
|
children: caption
|
|
169
235
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
className:
|
|
172
|
-
"
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
copied: state === "copied"
|
|
178
|
-
}),
|
|
179
|
-
/* @__PURE__ */ jsx("span", {
|
|
180
|
-
children: state === "copied" ? "Copied" : state === "failed" ? "Select to copy" : "Copy"
|
|
181
|
-
}),
|
|
182
|
-
/* @__PURE__ */ jsxs("span", {
|
|
183
|
-
className: platformInstallClassName(["status"]),
|
|
184
|
-
children: [
|
|
185
|
-
" ",
|
|
186
|
-
subject
|
|
187
|
-
]
|
|
188
|
-
})
|
|
189
|
-
]
|
|
236
|
+
/* @__PURE__ */ jsx2(SetupCopyButton, {
|
|
237
|
+
className: "hraness-platform-install__copy",
|
|
238
|
+
iconClassName: "hraness-platform-install__copy-icon",
|
|
239
|
+
failedLabel: "Select to copy",
|
|
240
|
+
onCopy: () => onCopy(copyKey, command, subject, preRef.current),
|
|
241
|
+
state,
|
|
242
|
+
subject
|
|
190
243
|
})
|
|
191
244
|
]
|
|
192
245
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ jsx2("pre", {
|
|
194
247
|
"aria-label": subject,
|
|
195
248
|
className: platformInstallClassName(["pre"]),
|
|
196
249
|
ref: preRef,
|
|
197
250
|
tabIndex: 0,
|
|
198
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ jsx2(SyntaxCode, {
|
|
199
252
|
className: platformInstallClassName(["code"]),
|
|
200
|
-
|
|
253
|
+
code: command,
|
|
254
|
+
language: "shell",
|
|
255
|
+
styles: "classes"
|
|
201
256
|
})
|
|
257
|
+
}),
|
|
258
|
+
note === undefined ? null : /* @__PURE__ */ jsx2("div", {
|
|
259
|
+
className: platformInstallClassName(["note", "commandNote"]),
|
|
260
|
+
children: note
|
|
202
261
|
})
|
|
203
262
|
]
|
|
204
263
|
});
|
|
@@ -283,25 +342,25 @@ function PlatformInstall({
|
|
|
283
342
|
event.preventDefault();
|
|
284
343
|
choose(target, true);
|
|
285
344
|
};
|
|
286
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
287
346
|
className: platformInstallClassName(["root"], className),
|
|
288
347
|
"data-hraness-platform-install": "",
|
|
289
348
|
"data-selected-platform": current,
|
|
290
349
|
"data-selection-source": source,
|
|
291
350
|
id,
|
|
292
351
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ jsx2(PlatformMarkSymbols, {
|
|
294
353
|
ids,
|
|
295
354
|
symbolId
|
|
296
355
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ jsx2("div", {
|
|
298
357
|
"aria-label": label,
|
|
299
358
|
className: platformInstallClassName(["tablist"]),
|
|
300
359
|
onKeyDown,
|
|
301
360
|
role: "tablist",
|
|
302
361
|
children: platforms.map((target) => {
|
|
303
362
|
const isSelected = target.id === current;
|
|
304
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ jsxs2("button", {
|
|
305
364
|
"aria-controls": `${baseId}-panel-${target.id}`,
|
|
306
365
|
"aria-selected": isSelected,
|
|
307
366
|
className: platformInstallClassName(["tab", isSelected && "tabSelected"]),
|
|
@@ -319,11 +378,11 @@ function PlatformInstall({
|
|
|
319
378
|
tabIndex: isSelected ? 0 : -1,
|
|
320
379
|
type: "button",
|
|
321
380
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ jsx2(PlatformMarkUse, {
|
|
323
382
|
platform: target.id,
|
|
324
383
|
symbolId: symbolId(target.id)
|
|
325
384
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ jsx2("span", {
|
|
327
386
|
className: platformInstallClassName(["tabLabel"]),
|
|
328
387
|
children: labelOf(target)
|
|
329
388
|
})
|
|
@@ -334,7 +393,7 @@ function PlatformInstall({
|
|
|
334
393
|
platforms.map((target) => {
|
|
335
394
|
const name = labelOf(target);
|
|
336
395
|
const alternatives = target.alternatives ?? [];
|
|
337
|
-
return /* @__PURE__ */
|
|
396
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
338
397
|
"aria-labelledby": `${baseId}-tab-${target.id}`,
|
|
339
398
|
className: platformInstallClassName(["panel"]),
|
|
340
399
|
"data-availability": target.unavailable === true ? "unavailable" : "available",
|
|
@@ -342,38 +401,39 @@ function PlatformInstall({
|
|
|
342
401
|
hidden: target.id !== current,
|
|
343
402
|
id: `${baseId}-panel-${target.id}`,
|
|
344
403
|
role: "tabpanel",
|
|
345
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ jsxs2("div", {
|
|
346
405
|
className: platformInstallClassName(["panelBody"]),
|
|
347
406
|
children: [
|
|
348
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
349
408
|
className: platformInstallClassName(["panelLabel"]),
|
|
350
409
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ jsx2(PlatformMarkUse, {
|
|
352
411
|
platform: target.id,
|
|
353
412
|
symbolId: symbolId(target.id)
|
|
354
413
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ jsx2("span", {
|
|
356
415
|
children: name
|
|
357
416
|
})
|
|
358
417
|
]
|
|
359
418
|
}),
|
|
360
|
-
target.unavailable === true ? /* @__PURE__ */
|
|
419
|
+
target.unavailable === true ? /* @__PURE__ */ jsx2("div", {
|
|
361
420
|
className: platformInstallClassName(["unavailable"]),
|
|
362
421
|
children: target.unavailableNote
|
|
363
422
|
}) : null,
|
|
364
|
-
target.command === undefined ? null : /* @__PURE__ */
|
|
423
|
+
target.command === undefined ? null : /* @__PURE__ */ jsx2(CommandBlock, {
|
|
365
424
|
caption: target.shell,
|
|
366
425
|
command: target.command,
|
|
367
426
|
copyKey: `${target.id}:primary`,
|
|
368
427
|
onCopy: copy,
|
|
428
|
+
note: target.note,
|
|
369
429
|
status,
|
|
370
430
|
subject: `${name} install command`
|
|
371
431
|
}),
|
|
372
|
-
alternatives.length === 0 ? null : /* @__PURE__ */
|
|
432
|
+
alternatives.length === 0 ? null : /* @__PURE__ */ jsx2("ul", {
|
|
373
433
|
"aria-label": `Other ways to install on ${name}`,
|
|
374
434
|
className: platformInstallClassName(["alternatives"]),
|
|
375
|
-
children: alternatives.map((alternative, index) => /* @__PURE__ */
|
|
376
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: alternatives.map((alternative, index) => /* @__PURE__ */ jsx2("li", {
|
|
436
|
+
children: /* @__PURE__ */ jsx2(CommandBlock, {
|
|
377
437
|
caption: [alternative.label, alternative.shell].filter(Boolean).join(" · "),
|
|
378
438
|
command: alternative.command,
|
|
379
439
|
copyKey: `${target.id}:${index}`,
|
|
@@ -383,7 +443,7 @@ function PlatformInstall({
|
|
|
383
443
|
})
|
|
384
444
|
}, `${alternative.label}-${index}`))
|
|
385
445
|
}),
|
|
386
|
-
target.note === undefined ? null : /* @__PURE__ */
|
|
446
|
+
target.command !== undefined || target.note === undefined ? null : /* @__PURE__ */ jsx2("div", {
|
|
387
447
|
className: platformInstallClassName(["note"]),
|
|
388
448
|
children: target.note
|
|
389
449
|
})
|
|
@@ -391,7 +451,7 @@ function PlatformInstall({
|
|
|
391
451
|
})
|
|
392
452
|
}, target.id);
|
|
393
453
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ jsx2("p", {
|
|
395
455
|
"aria-live": "polite",
|
|
396
456
|
className: platformInstallClassName(["status"]),
|
|
397
457
|
role: "status",
|
|
@@ -401,4 +461,4 @@ function PlatformInstall({
|
|
|
401
461
|
});
|
|
402
462
|
}
|
|
403
463
|
|
|
404
|
-
export { PlatformInstall };
|
|
464
|
+
export { SetupCopyButton, PlatformInstall };
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,10 @@ import {
|
|
|
64
64
|
themeFor,
|
|
65
65
|
typeScale,
|
|
66
66
|
typography
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-c80g58j1.js";
|
|
68
|
+
import {
|
|
69
|
+
diagramMetrics
|
|
70
|
+
} from "./chunk-gmea6p0d.js";
|
|
68
71
|
import {
|
|
69
72
|
detectPlatform,
|
|
70
73
|
isKnownPlatformId,
|
|
@@ -189,6 +192,7 @@ export {
|
|
|
189
192
|
fontFallbacks,
|
|
190
193
|
escapeArticleHtml,
|
|
191
194
|
elevation,
|
|
195
|
+
diagramMetrics,
|
|
192
196
|
detectPlatform,
|
|
193
197
|
designThemes,
|
|
194
198
|
designThemeStorageKey,
|
package/dist/mockups/client.js
CHANGED
|
@@ -335,7 +335,7 @@ function StepThrough({
|
|
|
335
335
|
className: "hkm-tabs hkm-step-tabs",
|
|
336
336
|
role: "tablist",
|
|
337
337
|
children: steps.map((entry, position) => /* @__PURE__ */ jsxs("button", {
|
|
338
|
-
"aria-controls": `${id}-panel`,
|
|
338
|
+
"aria-controls": `${id}-panel-${entry.id}`,
|
|
339
339
|
"aria-selected": position === current,
|
|
340
340
|
className: "hkm-tab",
|
|
341
341
|
"data-hkm-done": position < current ? "" : undefined,
|
|
@@ -363,32 +363,52 @@ function StepThrough({
|
|
|
363
363
|
})
|
|
364
364
|
}),
|
|
365
365
|
/* @__PURE__ */ jsx("div", {
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
366
|
+
className: "hkm-showcase-stage hkm-step-stage",
|
|
367
|
+
children: steps.map((entry, position) => /* @__PURE__ */ jsx("div", {
|
|
368
|
+
"aria-hidden": position !== current,
|
|
369
|
+
"aria-labelledby": `${id}-tab-${entry.id}`,
|
|
370
|
+
className: "hkm-step-panel",
|
|
371
|
+
"data-hkm-animated": position === current && animated ? "" : undefined,
|
|
372
|
+
id: `${id}-panel-${entry.id}`,
|
|
373
|
+
inert: position !== current,
|
|
374
|
+
role: "tabpanel",
|
|
375
|
+
children: /* @__PURE__ */ jsx(FitToWidth, {
|
|
376
|
+
minWidth,
|
|
377
|
+
children: entry.render({
|
|
378
|
+
animated: position === current && animated,
|
|
379
|
+
theme
|
|
380
|
+
})
|
|
376
381
|
})
|
|
377
|
-
})
|
|
382
|
+
}, entry.id))
|
|
378
383
|
}),
|
|
379
384
|
/* @__PURE__ */ jsxs("div", {
|
|
380
385
|
className: "hkm-step-nav",
|
|
381
386
|
children: [
|
|
382
387
|
/* @__PURE__ */ jsx("button", {
|
|
388
|
+
"aria-label": "Back",
|
|
383
389
|
className: "hkm-step-button",
|
|
384
390
|
disabled: current === 0,
|
|
385
391
|
onClick: () => go(current - 1),
|
|
386
392
|
type: "button",
|
|
387
|
-
children: "
|
|
393
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
394
|
+
"aria-hidden": "true",
|
|
395
|
+
focusable: "false",
|
|
396
|
+
height: "28",
|
|
397
|
+
viewBox: "0 0 24 24",
|
|
398
|
+
width: "28",
|
|
399
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
400
|
+
d: "m14.5 5-7 7 7 7",
|
|
401
|
+
fill: "none",
|
|
402
|
+
stroke: "currentColor",
|
|
403
|
+
strokeLinecap: "round",
|
|
404
|
+
strokeLinejoin: "round",
|
|
405
|
+
strokeWidth: "1.75"
|
|
406
|
+
})
|
|
407
|
+
})
|
|
388
408
|
}),
|
|
389
409
|
/* @__PURE__ */ jsxs("span", {
|
|
390
410
|
"aria-live": "polite",
|
|
391
|
-
className: "hkm-showcase-status",
|
|
411
|
+
className: "hkm-showcase-status hkm-step-announcement",
|
|
392
412
|
children: [
|
|
393
413
|
"Step ",
|
|
394
414
|
current + 1,
|
|
@@ -398,12 +418,27 @@ function StepThrough({
|
|
|
398
418
|
]
|
|
399
419
|
}),
|
|
400
420
|
/* @__PURE__ */ jsx("button", {
|
|
421
|
+
"aria-label": "Next",
|
|
401
422
|
className: "hkm-step-button",
|
|
402
423
|
"data-hkm-primary": "",
|
|
403
424
|
disabled: current === steps.length - 1,
|
|
404
425
|
onClick: () => go(current + 1),
|
|
405
426
|
type: "button",
|
|
406
|
-
children: "
|
|
427
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
428
|
+
"aria-hidden": "true",
|
|
429
|
+
focusable: "false",
|
|
430
|
+
height: "28",
|
|
431
|
+
viewBox: "0 0 24 24",
|
|
432
|
+
width: "28",
|
|
433
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
434
|
+
d: "m9.5 5 7 7-7 7",
|
|
435
|
+
fill: "none",
|
|
436
|
+
stroke: "currentColor",
|
|
437
|
+
strokeLinecap: "round",
|
|
438
|
+
strokeLinejoin: "round",
|
|
439
|
+
strokeWidth: "1.75"
|
|
440
|
+
})
|
|
441
|
+
})
|
|
407
442
|
})
|
|
408
443
|
]
|
|
409
444
|
}),
|