@salesmind-ai/design-system 0.3.4 → 0.3.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 (197) hide show
  1. package/dist/admin/index.cjs +68 -2928
  2. package/dist/admin/index.cjs.map +1 -1
  3. package/dist/admin/index.js +5 -2915
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/blog/index.cjs +53 -1064
  6. package/dist/blog/index.cjs.map +1 -1
  7. package/dist/blog/index.js +8 -1054
  8. package/dist/blog/index.js.map +1 -1
  9. package/dist/charts/index.cjs +46 -2694
  10. package/dist/charts/index.cjs.map +1 -1
  11. package/dist/charts/index.js +3 -2680
  12. package/dist/charts/index.js.map +1 -1
  13. package/dist/chunk-2GARWEJK.js +17 -0
  14. package/dist/chunk-2GARWEJK.js.map +1 -0
  15. package/dist/chunk-2KQVZ5FB.js +485 -0
  16. package/dist/chunk-2KQVZ5FB.js.map +1 -0
  17. package/dist/chunk-2ZNR2F2V.cjs +194 -0
  18. package/dist/chunk-2ZNR2F2V.cjs.map +1 -0
  19. package/dist/chunk-3NKRFUAR.js +37 -0
  20. package/dist/chunk-3NKRFUAR.js.map +1 -0
  21. package/dist/chunk-3TGSIILM.cjs +201 -0
  22. package/dist/chunk-3TGSIILM.cjs.map +1 -0
  23. package/dist/chunk-4GM5BGBN.cjs +801 -0
  24. package/dist/chunk-4GM5BGBN.cjs.map +1 -0
  25. package/dist/chunk-5LGDEZWY.cjs +2434 -0
  26. package/dist/chunk-5LGDEZWY.cjs.map +1 -0
  27. package/dist/chunk-6H4DSTXR.js +786 -0
  28. package/dist/chunk-6H4DSTXR.js.map +1 -0
  29. package/dist/chunk-6HKQ5ILL.cjs +1624 -0
  30. package/dist/chunk-6HKQ5ILL.cjs.map +1 -0
  31. package/dist/chunk-6UNG76Y2.js +153 -0
  32. package/dist/chunk-6UNG76Y2.js.map +1 -0
  33. package/dist/chunk-7PX2AZ6Y.js +39 -0
  34. package/dist/chunk-7PX2AZ6Y.js.map +1 -0
  35. package/dist/chunk-B6AVAX4F.js +1415 -0
  36. package/dist/chunk-B6AVAX4F.js.map +1 -0
  37. package/dist/chunk-BILT5KD3.js +264 -0
  38. package/dist/chunk-BILT5KD3.js.map +1 -0
  39. package/dist/chunk-C2BCDNAV.js +24 -0
  40. package/dist/chunk-C2BCDNAV.js.map +1 -0
  41. package/dist/chunk-CH42VPWE.cjs +421 -0
  42. package/dist/chunk-CH42VPWE.cjs.map +1 -0
  43. package/dist/chunk-CJ2MKVAF.cjs +46 -0
  44. package/dist/chunk-CJ2MKVAF.cjs.map +1 -0
  45. package/dist/chunk-DP74LUXG.cjs +98 -0
  46. package/dist/chunk-DP74LUXG.cjs.map +1 -0
  47. package/dist/chunk-E7D6EKJ4.cjs +44 -0
  48. package/dist/chunk-E7D6EKJ4.cjs.map +1 -0
  49. package/dist/chunk-ECXBTUH6.cjs +584 -0
  50. package/dist/chunk-ECXBTUH6.cjs.map +1 -0
  51. package/dist/chunk-EFRAP5ES.js +157 -0
  52. package/dist/chunk-EFRAP5ES.js.map +1 -0
  53. package/dist/chunk-EM7JHRYW.cjs +69 -0
  54. package/dist/chunk-EM7JHRYW.cjs.map +1 -0
  55. package/dist/chunk-FAFAP4L5.js +183 -0
  56. package/dist/chunk-FAFAP4L5.js.map +1 -0
  57. package/dist/chunk-H2Y6BSTL.cjs +69 -0
  58. package/dist/chunk-H2Y6BSTL.cjs.map +1 -0
  59. package/dist/chunk-HN4PHABT.js +126 -0
  60. package/dist/chunk-HN4PHABT.js.map +1 -0
  61. package/dist/chunk-HRENHNDJ.js +211 -0
  62. package/dist/chunk-HRENHNDJ.js.map +1 -0
  63. package/dist/chunk-I75BFEYT.cjs +2561 -0
  64. package/dist/chunk-I75BFEYT.cjs.map +1 -0
  65. package/dist/chunk-IFRATNLU.js +562 -0
  66. package/dist/chunk-IFRATNLU.js.map +1 -0
  67. package/dist/chunk-JNASH4OQ.js +1022 -0
  68. package/dist/chunk-JNASH4OQ.js.map +1 -0
  69. package/dist/chunk-JPJN4YBC.js +409 -0
  70. package/dist/chunk-JPJN4YBC.js.map +1 -0
  71. package/dist/chunk-KCKUSU2M.cjs +166 -0
  72. package/dist/chunk-KCKUSU2M.cjs.map +1 -0
  73. package/dist/chunk-KDLH35OI.cjs +1042 -0
  74. package/dist/chunk-KDLH35OI.cjs.map +1 -0
  75. package/dist/chunk-KJ2OXQF4.js +287 -0
  76. package/dist/chunk-KJ2OXQF4.js.map +1 -0
  77. package/dist/chunk-KK5UO2P4.cjs +717 -0
  78. package/dist/chunk-KK5UO2P4.cjs.map +1 -0
  79. package/dist/chunk-KNQEIU7O.cjs +1202 -0
  80. package/dist/chunk-KNQEIU7O.cjs.map +1 -0
  81. package/dist/chunk-KVGSVGRK.cjs +569 -0
  82. package/dist/chunk-KVGSVGRK.cjs.map +1 -0
  83. package/dist/chunk-L352JRV6.cjs +105 -0
  84. package/dist/chunk-L352JRV6.cjs.map +1 -0
  85. package/dist/chunk-LGNMFBLF.cjs +502 -0
  86. package/dist/chunk-LGNMFBLF.cjs.map +1 -0
  87. package/dist/chunk-LJADZITX.cjs +298 -0
  88. package/dist/chunk-LJADZITX.cjs.map +1 -0
  89. package/dist/chunk-MDB2WCRQ.cjs +137 -0
  90. package/dist/chunk-MDB2WCRQ.cjs.map +1 -0
  91. package/dist/chunk-MQDEE7HC.cjs +283 -0
  92. package/dist/chunk-MQDEE7HC.cjs.map +1 -0
  93. package/dist/chunk-MQRB634A.cjs +34 -0
  94. package/dist/chunk-MQRB634A.cjs.map +1 -0
  95. package/dist/chunk-MU6GW5ZV.js +2317 -0
  96. package/dist/chunk-MU6GW5ZV.js.map +1 -0
  97. package/dist/chunk-NN3TUHIH.js +28 -0
  98. package/dist/chunk-NN3TUHIH.js.map +1 -0
  99. package/dist/chunk-NT4LBP7D.cjs +111 -0
  100. package/dist/chunk-NT4LBP7D.cjs.map +1 -0
  101. package/dist/chunk-OGKGIXFC.cjs +2162 -0
  102. package/dist/chunk-OGKGIXFC.cjs.map +1 -0
  103. package/dist/chunk-OXNXEQY7.js +2538 -0
  104. package/dist/chunk-OXNXEQY7.js.map +1 -0
  105. package/dist/chunk-P5BOFE5A.js +546 -0
  106. package/dist/chunk-P5BOFE5A.js.map +1 -0
  107. package/dist/chunk-PE2KJVRN.js +185 -0
  108. package/dist/chunk-PE2KJVRN.js.map +1 -0
  109. package/dist/chunk-Q2MFGYTE.cjs +1449 -0
  110. package/dist/chunk-Q2MFGYTE.cjs.map +1 -0
  111. package/dist/chunk-Q75DBVDY.cjs +68 -0
  112. package/dist/chunk-Q75DBVDY.cjs.map +1 -0
  113. package/dist/chunk-RQUFZAZ7.js +1608 -0
  114. package/dist/chunk-RQUFZAZ7.js.map +1 -0
  115. package/dist/chunk-SICKWUWB.js +62 -0
  116. package/dist/chunk-SICKWUWB.js.map +1 -0
  117. package/dist/chunk-T343CCH5.js +1190 -0
  118. package/dist/chunk-T343CCH5.js.map +1 -0
  119. package/dist/chunk-T5H5PNLN.js +701 -0
  120. package/dist/chunk-T5H5PNLN.js.map +1 -0
  121. package/dist/chunk-U3LK2GID.js +2122 -0
  122. package/dist/chunk-U3LK2GID.js.map +1 -0
  123. package/dist/chunk-UFAJY2DM.js +62 -0
  124. package/dist/chunk-UFAJY2DM.js.map +1 -0
  125. package/dist/chunk-VC5LMUVQ.cjs +20 -0
  126. package/dist/chunk-VC5LMUVQ.cjs.map +1 -0
  127. package/dist/chunk-VM7WFMKI.cjs +76 -0
  128. package/dist/chunk-VM7WFMKI.cjs.map +1 -0
  129. package/dist/chunk-W2WTP6HS.cjs +233 -0
  130. package/dist/chunk-W2WTP6HS.cjs.map +1 -0
  131. package/dist/chunk-WH7PYHZY.cjs +35 -0
  132. package/dist/chunk-WH7PYHZY.cjs.map +1 -0
  133. package/dist/chunk-XU3OMQ7V.js +98 -0
  134. package/dist/chunk-XU3OMQ7V.js.map +1 -0
  135. package/dist/chunk-XWPDRMZG.js +62 -0
  136. package/dist/chunk-XWPDRMZG.js.map +1 -0
  137. package/dist/chunk-Y3CPKNB7.js +67 -0
  138. package/dist/chunk-Y3CPKNB7.js.map +1 -0
  139. package/dist/chunk-YNVRDD2P.js +98 -0
  140. package/dist/chunk-YNVRDD2P.js.map +1 -0
  141. package/dist/chunk-YSYR54XR.js +92 -0
  142. package/dist/chunk-YSYR54XR.js.map +1 -0
  143. package/dist/chunk-YTYDQBVY.cjs +162 -0
  144. package/dist/chunk-YTYDQBVY.cjs.map +1 -0
  145. package/dist/core/index.cjs +807 -4333
  146. package/dist/core/index.cjs.map +1 -1
  147. package/dist/core/index.js +14 -4130
  148. package/dist/core/index.js.map +1 -1
  149. package/dist/i18n/index.cjs +86 -558
  150. package/dist/i18n/index.cjs.map +1 -1
  151. package/dist/i18n/index.js +1 -544
  152. package/dist/i18n/index.js.map +1 -1
  153. package/dist/index.cjs +1432 -17140
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.js +31 -16785
  156. package/dist/index.js.map +1 -1
  157. package/dist/marketing/index.cjs +142 -3072
  158. package/dist/marketing/index.cjs.map +1 -1
  159. package/dist/marketing/index.js +11 -3042
  160. package/dist/marketing/index.js.map +1 -1
  161. package/dist/motion/index.cjs +26 -1222
  162. package/dist/motion/index.cjs.map +1 -1
  163. package/dist/motion/index.js +2 -1215
  164. package/dist/motion/index.js.map +1 -1
  165. package/dist/nav/index.cjs +101 -1518
  166. package/dist/nav/index.cjs.map +1 -1
  167. package/dist/nav/index.js +4 -1498
  168. package/dist/nav/index.js.map +1 -1
  169. package/dist/report/index.cjs +171 -2403
  170. package/dist/report/index.cjs.map +1 -1
  171. package/dist/report/index.js +3 -2363
  172. package/dist/report/index.js.map +1 -1
  173. package/dist/sections/index.cjs +22 -377
  174. package/dist/sections/index.cjs.map +1 -1
  175. package/dist/sections/index.js +6 -369
  176. package/dist/sections/index.js.map +1 -1
  177. package/dist/social-proof/index.cjs +53 -1250
  178. package/dist/social-proof/index.cjs.map +1 -1
  179. package/dist/social-proof/index.js +6 -1235
  180. package/dist/social-proof/index.js.map +1 -1
  181. package/dist/theme/index.cjs +38 -565
  182. package/dist/theme/index.cjs.map +1 -1
  183. package/dist/theme/index.js +2 -555
  184. package/dist/theme/index.js.map +1 -1
  185. package/dist/web/client/index.cjs +38 -491
  186. package/dist/web/client/index.cjs.map +1 -1
  187. package/dist/web/client/index.js +4 -483
  188. package/dist/web/client/index.js.map +1 -1
  189. package/dist/web/index.cjs +158 -1346
  190. package/dist/web/index.cjs.map +1 -1
  191. package/dist/web/index.js +9 -1305
  192. package/dist/web/index.js.map +1 -1
  193. package/dist/web/server/index.cjs +26 -563
  194. package/dist/web/server/index.cjs.map +1 -1
  195. package/dist/web/server/index.js +1 -560
  196. package/dist/web/server/index.js.map +1 -1
  197. package/package.json +1 -1
@@ -1,1056 +1,10 @@
1
- import React, { createContext, forwardRef, useState, useEffect, useRef, useContext, useCallback } from 'react';
2
- import clsx from 'clsx';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { useIntl } from 'react-intl';
5
- import { FileText, Clock, ArrowRight } from 'lucide-react';
6
-
7
- // src/components/AuthorBio/AuthorBio.tsx
8
- var AvatarContext = React.createContext({
9
- hasImage: false,
10
- imageError: false,
11
- onImageError: () => {
12
- }
13
- });
14
- var Avatar = React.forwardRef(
15
- ({ size = "md", className, children, ...props }, ref) => {
16
- const [imageError, setImageError] = React.useState(false);
17
- const [hasImage, setHasImage] = React.useState(false);
18
- React.useEffect(() => {
19
- let found = false;
20
- React.Children.forEach(children, (child) => {
21
- if (React.isValidElement(child) && child.type === AvatarImage) {
22
- found = true;
23
- }
24
- });
25
- setHasImage(found);
26
- }, [children]);
27
- const onImageError = React.useCallback(() => {
28
- setImageError(true);
29
- }, []);
30
- return /* @__PURE__ */ jsx(AvatarContext.Provider, { value: { hasImage, imageError, onImageError }, children: /* @__PURE__ */ jsx(
31
- "span",
32
- {
33
- ref,
34
- className: clsx("ds-avatar", `ds-avatar--${size}`, className),
35
- ...props,
36
- children
37
- }
38
- ) });
39
- }
40
- );
41
- Avatar.displayName = "Avatar";
42
- var AvatarImage = React.forwardRef(({ className, onError, ...props }, ref) => {
43
- const { imageError, onImageError } = React.useContext(AvatarContext);
44
- const handleError = (e) => {
45
- onImageError();
46
- onError?.(e);
47
- };
48
- if (imageError) return null;
49
- return /* @__PURE__ */ jsx(
50
- "img",
51
- {
52
- ref,
53
- className: clsx("ds-avatar__image", className),
54
- onError: handleError,
55
- ...props
56
- }
57
- );
58
- });
59
- AvatarImage.displayName = "AvatarImage";
60
- var AvatarFallback = React.forwardRef(({ className, ...props }, ref) => {
61
- const { hasImage, imageError } = React.useContext(AvatarContext);
62
- if (hasImage && !imageError) return null;
63
- return /* @__PURE__ */ jsx("span", { ref, className: clsx("ds-avatar__fallback", className), ...props });
64
- });
65
- AvatarFallback.displayName = "AvatarFallback";
66
- var UtmContext = createContext(null);
67
-
68
- // src/web/utm/useUtmDefaults.ts
69
- function useUtmDefaults() {
70
- return useContext(UtmContext);
71
- }
72
-
73
- // src/web/utm/builders.ts
74
- var PLACEHOLDER_ORIGIN = "https://__placeholder__.internal";
75
- function buildUtmUrl(baseUrl, params) {
76
- const isRelative = baseUrl.startsWith("/");
77
- let url;
78
- try {
79
- url = isRelative ? new URL(baseUrl, PLACEHOLDER_ORIGIN) : new URL(baseUrl);
80
- } catch {
81
- return baseUrl;
82
- }
83
- const existingParams = [];
84
- url.searchParams.forEach((value, key) => {
85
- existingParams.push([key, value]);
86
- });
87
- for (const [key] of existingParams) {
88
- url.searchParams.delete(key);
89
- }
90
- for (const [key, value] of existingParams) {
91
- if (!key.startsWith("utm_")) {
92
- url.searchParams.set(key, value);
93
- }
94
- }
95
- url.searchParams.set("utm_source", params.source);
96
- url.searchParams.set("utm_medium", params.medium);
97
- url.searchParams.set("utm_campaign", params.campaign);
98
- if (params.term !== void 0) {
99
- url.searchParams.set("utm_term", params.term);
100
- }
101
- if (params.content !== void 0) {
102
- url.searchParams.set("utm_content", params.content);
103
- }
104
- if (isRelative) {
105
- return url.href.replace(PLACEHOLDER_ORIGIN, "");
106
- }
107
- return url.href;
108
- }
109
-
110
- // src/web/utm/classifiers.ts
111
- var INTERNAL_PATTERNS = [
112
- /^\/(?!\/)/,
113
- // Relative paths
114
- /^https?:\/\/(www\.)?sales-mind\.ai/i,
115
- // Marketing site
116
- /^https?:\/\/app\.sales-mind\.ai/i,
117
- // Web app
118
- /^https?:\/\/apps\.sales-mind\.ai/i,
119
- // Web app (legacy)
120
- /^https?:\/\/meet\.sales-mind\.ai/i,
121
- // Booking
122
- /^https?:\/\/docs\.sales-mind\.ai/i
123
- // Docs
124
- ];
125
- var SYSTEM_PATTERNS = [
126
- /^https?:\/\/.*\/api\//i,
127
- // API endpoints
128
- /^https?:\/\/.*\/webhook/i,
129
- // Webhooks
130
- /^https?:\/\/.*\/oauth/i,
131
- // OAuth callbacks
132
- /^https?:\/\/.*\/callback/i,
133
- // Callbacks
134
- /^https?:\/\/.*\.supabase\.(co|com)/i,
135
- // Supabase
136
- /^https?:\/\/.*\.firebaseapp\.com/i,
137
- // Firebase
138
- /^https?:\/\/.*\.cloudfunctions\.net/i
139
- // Cloud Functions
140
- ];
141
- var ASSET_PATTERNS = [
142
- /\.(css|js|mjs|map|woff2?|ttf|eot|svg|png|jpe?g|gif|webp|avif|ico|pdf)(\?.*)?$/i
143
- ];
144
- var CONVERSION_PATTERNS = [
145
- /^https?:\/\/(www\.)?calendly\.com/i,
146
- /^https?:\/\/(checkout\.)?stripe\.com/i,
147
- /^https?:\/\/buy\.stripe\.com/i,
148
- /^https?:\/\/chromewebstore\.google\.com/i,
149
- /^https?:\/\/meet\.sales-mind\.ai/i
150
- ];
151
- var PROTOCOL_EXEMPT = [
152
- /^mailto:/i,
153
- /^tel:/i,
154
- /^#/,
155
- /^javascript:/i
156
- ];
157
- function classifyUrl(url) {
158
- if (PROTOCOL_EXEMPT.some((p) => p.test(url))) return "protocol";
159
- if (ASSET_PATTERNS.some((p) => p.test(url))) return "asset";
160
- if (SYSTEM_PATTERNS.some((p) => p.test(url))) return "system";
161
- if (CONVERSION_PATTERNS.some((p) => p.test(url))) return "conversion";
162
- if (INTERNAL_PATTERNS.some((p) => p.test(url))) return "internal";
163
- return "external";
164
- }
165
-
166
- // src/components/OutboundLink/outbound-link-utils.ts
167
- var LEGACY_UTM_SOURCE = "salesmind";
168
- var EXEMPT_PATTERNS = [
169
- /^https?:\/\/(www\.)?(stripe\.com|checkout\.stripe\.com|paypal\.com)/i,
170
- /^https?:\/\/(www\.)?github\.com\/login\/oauth/i
171
- ];
172
- var isExemptUrl = (urlStr) => {
173
- if (urlStr.startsWith("mailto:") || urlStr.startsWith("tel:")) return true;
174
- const classification = classifyUrl(urlStr);
175
- if (classification === "system" || classification === "protocol" || classification === "asset") {
176
- return true;
177
- }
178
- return EXEMPT_PATTERNS.some((pattern) => pattern.test(urlStr));
179
- };
180
- var appendGovernedUTMs = (href, params, preserveExisting = true) => {
181
- try {
182
- const url = new URL(href);
183
- if (preserveExisting) {
184
- const hasAll = url.searchParams.has("utm_source") && url.searchParams.has("utm_medium") && url.searchParams.has("utm_campaign");
185
- if (hasAll) return href;
186
- }
187
- return buildUtmUrl(href, params);
188
- } catch {
189
- return href;
190
- }
191
- };
192
- var appendUTMs = (href, context, pageSlug, options) => {
193
- try {
194
- const url = new URL(href);
195
- const { mediumOverride = "outbound_link", campaignOverride, preserveExisting = true } = options;
196
- const utms = {
197
- utm_source: LEGACY_UTM_SOURCE,
198
- utm_medium: mediumOverride,
199
- utm_campaign: campaignOverride || pageSlug,
200
- utm_content: context
201
- };
202
- Object.entries(utms).forEach(([key, value]) => {
203
- if (value) {
204
- if (preserveExisting && url.searchParams.has(key)) {
205
- return;
206
- }
207
- url.searchParams.set(key, value);
208
- }
209
- });
210
- return url.toString();
211
- } catch {
212
- return href;
213
- }
214
- };
215
- var OutboundLink = forwardRef(
216
- ({
217
- href,
218
- context,
219
- campaignOverride,
220
- mediumOverride = "outbound_link",
221
- preserveExistingUTM = true,
222
- openInNewTab = true,
223
- disableTracking = false,
224
- utmParams,
225
- onClick,
226
- children,
227
- ...props
228
- }, ref) => {
229
- const contextParams = useUtmDefaults();
230
- const resolvedUtmParams = utmParams ?? contextParams;
231
- let hostname = "";
232
- try {
233
- const url = new URL(href);
234
- hostname = url.hostname;
235
- } catch {
236
- }
237
- const [finalHref, setFinalHref] = useState(href);
238
- useEffect(() => {
239
- let isExternal = false;
240
- let currentMedium = mediumOverride;
241
- try {
242
- const url = new URL(href);
243
- const currentHost = window.location.hostname;
244
- isExternal = url.hostname !== currentHost;
245
- if (isExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
246
- if (currentMedium === "outbound_link") {
247
- currentMedium = "cross_subdomain";
248
- }
249
- }
250
- } catch {
251
- isExternal = false;
252
- }
253
- const isExempt = isExemptUrl(href) || disableTracking;
254
- if (isExternal && !isExempt) {
255
- if (resolvedUtmParams) {
256
- setFinalHref(appendGovernedUTMs(href, resolvedUtmParams, preserveExistingUTM));
257
- } else {
258
- const pageSlug = window.location.pathname.replace(/^\/|\/$/g, "") || "home";
259
- setFinalHref(appendUTMs(href, context, pageSlug, {
260
- mediumOverride: currentMedium,
261
- campaignOverride,
262
- preserveExisting: preserveExistingUTM
263
- }));
264
- }
265
- } else {
266
- setFinalHref(href);
267
- }
268
- }, [href, context, mediumOverride, campaignOverride, preserveExistingUTM, disableTracking, resolvedUtmParams]);
269
- const handleClick = (e) => {
270
- if (typeof window === "undefined" || disableTracking) {
271
- onClick?.(e);
272
- return;
273
- }
274
- let clickExternal = false;
275
- let clickCrossSubdomain = false;
276
- let clickMedium = mediumOverride;
277
- try {
278
- const url = new URL(href);
279
- const currentHost = window.location.hostname;
280
- clickExternal = url.hostname !== currentHost;
281
- if (clickExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
282
- clickCrossSubdomain = true;
283
- if (clickMedium === "outbound_link") {
284
- clickMedium = "cross_subdomain";
285
- }
286
- }
287
- } catch {
288
- }
289
- if (clickExternal) {
290
- const detail = {
291
- destination_domain: hostname,
292
- destination_url: finalHref,
293
- utm_medium_type: clickMedium,
294
- page_slug: window.location.pathname,
295
- component_location: context,
296
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
297
- is_cross_subdomain: clickCrossSubdomain
298
- };
299
- const event = new CustomEvent("outbound_click", { detail });
300
- window.dispatchEvent(event);
301
- }
302
- onClick?.(e);
303
- };
304
- const relParts = [];
305
- let shouldOpenNewTab = openInNewTab;
306
- try {
307
- const url = new URL(href);
308
- if (typeof window !== "undefined") {
309
- const currentHost = window.location.hostname;
310
- if (url.hostname !== currentHost && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
311
- shouldOpenNewTab = false;
312
- }
313
- }
314
- } catch {
315
- }
316
- if (shouldOpenNewTab) relParts.push("noopener", "noreferrer");
317
- if (mediumOverride === "citation") relParts.push("nofollow");
318
- const rel = relParts.length > 0 ? relParts.join(" ") : void 0;
319
- return (
320
- // eslint-disable-next-line no-restricted-syntax
321
- /* @__PURE__ */ jsx(
322
- "a",
323
- {
324
- ref,
325
- href: finalHref,
326
- target: shouldOpenNewTab ? "_blank" : void 0,
327
- rel,
328
- onClick: handleClick,
329
- ...props,
330
- children
331
- }
332
- )
333
- );
334
- }
335
- );
336
- OutboundLink.displayName = "OutboundLink";
337
- var AuthorBio = forwardRef(
338
- ({
339
- name,
340
- role,
341
- avatar,
342
- bio,
343
- links,
344
- variant = "card",
345
- className,
346
- ...props
347
- }, ref) => {
348
- const initials = name.split(" ").map((n) => n[0]).join("").slice(0, 2);
349
- return /* @__PURE__ */ jsxs(
350
- "div",
351
- {
352
- ref,
353
- className: clsx("ds-author-bio", `ds-author-bio--${variant}`, className),
354
- ...props,
355
- children: [
356
- /* @__PURE__ */ jsxs(Avatar, { size: variant === "compact" ? "sm" : variant === "longform" ? "lg" : "md", className: "ds-author-bio__avatar", children: [
357
- avatar && /* @__PURE__ */ jsx(AvatarImage, { src: avatar, alt: name }),
358
- /* @__PURE__ */ jsx(AvatarFallback, { children: initials })
359
- ] }),
360
- /* @__PURE__ */ jsxs("div", { className: "ds-author-bio__info", children: [
361
- /* @__PURE__ */ jsx("span", { className: "ds-author-bio__name", children: name }),
362
- role && /* @__PURE__ */ jsx("span", { className: "ds-author-bio__role", children: role }),
363
- bio && variant !== "compact" && /* @__PURE__ */ jsx("p", { className: "ds-author-bio__bio", children: bio }),
364
- links && links.length > 0 && variant !== "compact" && /* @__PURE__ */ jsx("div", { className: "ds-author-bio__links", children: links.map((link, i) => /* @__PURE__ */ jsxs(
365
- OutboundLink,
366
- {
367
- href: link.href,
368
- context: "author-bio-link",
369
- className: "ds-author-bio__link",
370
- children: [
371
- link.icon && /* @__PURE__ */ jsx("span", { className: "ds-author-bio__link-icon", children: link.icon }),
372
- link.label
373
- ]
374
- },
375
- i
376
- )) })
377
- ] })
378
- ]
379
- }
380
- );
381
- }
382
- );
383
- AuthorBio.displayName = "AuthorBio";
384
- function useMessage() {
385
- const intl = useIntl();
386
- const formatMessage = useCallback(
387
- (descriptor, values) => {
388
- return intl.formatMessage(descriptor, values);
389
- },
390
- [intl]
391
- );
392
- return formatMessage;
393
- }
394
- var TableOfContents = forwardRef(
395
- ({
396
- items,
397
- activeId: controlledActiveId,
398
- position = "sidebar",
399
- label,
400
- onItemClick,
401
- className,
402
- ...props
403
- }, ref) => {
404
- const t = useMessage();
405
- const defaultLabel = t({ id: "ds.toc.label", defaultMessage: "On this page" });
406
- const finalLabel = label || defaultLabel;
407
- const [observedActiveId, setObservedActiveId] = useState("");
408
- const activeId = controlledActiveId ?? observedActiveId;
409
- useEffect(() => {
410
- if (controlledActiveId !== void 0) return;
411
- if (items.length === 0) return;
412
- const handleScroll = () => {
413
- const headingElements = items.map((item) => ({
414
- id: item.id,
415
- el: document.getElementById(item.id)
416
- })).filter((h) => !!h.el);
417
- if (headingElements.length === 0) return;
418
- const topOffset = 120;
419
- const firstBelowIndex = headingElements.findIndex((h) => {
420
- const rect = h.el.getBoundingClientRect();
421
- return rect.top > topOffset;
422
- });
423
- let newActiveId = "";
424
- if (firstBelowIndex === -1) {
425
- newActiveId = headingElements[headingElements.length - 1].id;
426
- } else if (firstBelowIndex === 0) {
427
- newActiveId = "";
428
- } else {
429
- newActiveId = headingElements[firstBelowIndex - 1].id;
430
- }
431
- setObservedActiveId(newActiveId);
432
- };
433
- window.addEventListener("scroll", handleScroll, { passive: true });
434
- handleScroll();
435
- return () => window.removeEventListener("scroll", handleScroll);
436
- }, [items, controlledActiveId]);
437
- const handleClick = (id) => {
438
- const el = document.getElementById(id);
439
- if (el) {
440
- el.scrollIntoView({ behavior: "smooth", block: "start" });
441
- }
442
- if (onItemClick) onItemClick(id);
443
- };
444
- if (items.length === 0) return null;
445
- return /* @__PURE__ */ jsxs(
446
- "nav",
447
- {
448
- ref,
449
- className: clsx("ds-toc", `ds-toc--${position}`, className),
450
- "aria-label": finalLabel,
451
- ...props,
452
- children: [
453
- /* @__PURE__ */ jsx("span", { className: "ds-toc__label", children: finalLabel }),
454
- /* @__PURE__ */ jsx("ul", { className: "ds-toc__list", children: items.map((item) => /* @__PURE__ */ jsx("li", { className: "ds-toc__item", style: { paddingLeft: `${(item.level - 2) * 12}px` }, children: /* @__PURE__ */ jsx(
455
- "button",
456
- {
457
- type: "button",
458
- className: clsx(
459
- "ds-toc__link",
460
- activeId === item.id && "ds-toc__link--active"
461
- ),
462
- onClick: () => handleClick(item.id),
463
- children: item.title
464
- }
465
- ) }, item.id)) })
466
- ]
467
- }
468
- );
469
- }
470
- );
471
- TableOfContents.displayName = "TableOfContents";
472
- var ReadingProgress = React.forwardRef(
473
- ({ targetRef, className, ...props }, ref) => {
474
- const [progress, setProgress] = useState(0);
475
- const frameRef = useRef(null);
476
- useEffect(() => {
477
- const handleScroll = () => {
478
- if (frameRef.current) cancelAnimationFrame(frameRef.current);
479
- frameRef.current = requestAnimationFrame(() => {
480
- let percentage = 0;
481
- if (targetRef && targetRef.current) {
482
- const el = targetRef.current;
483
- const rect = el.getBoundingClientRect();
484
- const viewportHeight = window.innerHeight;
485
- if (rect.top > viewportHeight) {
486
- percentage = 0;
487
- } else if (rect.bottom < 0) {
488
- percentage = 100;
489
- } else {
490
- const scrollableDistance = rect.height - viewportHeight;
491
- if (scrollableDistance <= 0) {
492
- percentage = 100;
493
- } else {
494
- const scrolled = viewportHeight - rect.top;
495
- percentage = Math.max(0, Math.min(100, scrolled / scrollableDistance * 100));
496
- }
497
- }
498
- } else {
499
- const scrollPosition = window.scrollY;
500
- const scrollHeight = document.body.scrollHeight - window.innerHeight;
501
- percentage = scrollHeight > 0 ? scrollPosition / scrollHeight * 100 : 0;
502
- percentage = Math.max(0, Math.min(100, percentage));
503
- }
504
- setProgress(percentage);
505
- });
506
- };
507
- window.addEventListener("scroll", handleScroll, { passive: true });
508
- window.addEventListener("resize", handleScroll, { passive: true });
509
- handleScroll();
510
- return () => {
511
- if (frameRef.current) cancelAnimationFrame(frameRef.current);
512
- window.removeEventListener("scroll", handleScroll);
513
- window.removeEventListener("resize", handleScroll);
514
- };
515
- }, [targetRef]);
516
- return /* @__PURE__ */ jsx(
517
- "div",
518
- {
519
- ref,
520
- className: clsx("ds-reading-progress", className),
521
- ...props,
522
- children: /* @__PURE__ */ jsx(
523
- "div",
524
- {
525
- className: "ds-reading-progress__bar",
526
- style: { transform: `scaleX(${progress / 100})` }
527
- }
528
- )
529
- }
530
- );
531
- }
532
- );
533
- ReadingProgress.displayName = "ReadingProgress";
534
- var LongFormLayout = React.forwardRef(
535
- ({ children, sidebar, className, ...props }, ref) => {
536
- return /* @__PURE__ */ jsxs("div", { ref, className: clsx("ds-longform-layout", className), ...props, children: [
537
- /* @__PURE__ */ jsx("article", { className: "ds-longform-layout__main", children }),
538
- sidebar && /* @__PURE__ */ jsx("aside", { className: "ds-longform-layout__sidebar", children: sidebar })
539
- ] });
540
- }
541
- );
542
- LongFormLayout.displayName = "LongFormLayout";
543
- var InsightCallout = React.forwardRef(
544
- ({ children, icon, title, className, ...props }, ref) => {
545
- return /* @__PURE__ */ jsxs("aside", { ref, className: clsx("ds-insight-callout", className), ...props, children: [
546
- icon && /* @__PURE__ */ jsx("div", { className: "ds-insight-callout__icon", children: icon }),
547
- /* @__PURE__ */ jsxs("div", { className: "ds-insight-callout__content", children: [
548
- title && /* @__PURE__ */ jsx("h5", { className: "ds-insight-callout__title", children: title }),
549
- children
550
- ] })
551
- ] });
552
- }
553
- );
554
- InsightCallout.displayName = "InsightCallout";
555
- var DataHighlight = React.forwardRef(
556
- ({ stat, label, children, className, ...props }, ref) => {
557
- return /* @__PURE__ */ jsxs("figure", { ref, className: clsx("ds-data-highlight", className), ...props, children: [
558
- /* @__PURE__ */ jsxs("div", { className: "ds-data-highlight__stat-group", children: [
559
- /* @__PURE__ */ jsx("span", { className: "ds-data-highlight__stat", children: stat }),
560
- /* @__PURE__ */ jsx("span", { className: "ds-data-highlight__label", children: label })
561
- ] }),
562
- children && /* @__PURE__ */ jsx("figcaption", { className: "ds-data-highlight__caption", children })
563
- ] });
564
- }
565
- );
566
- DataHighlight.displayName = "DataHighlight";
567
- var AnalyticsContext = createContext(null);
568
-
569
- // src/web/analytics/use-analytics.tsx
570
- var NOOP_VALUE = {
571
- track: () => {
572
- }
573
- };
574
- function useAnalytics() {
575
- return useContext(AnalyticsContext) ?? NOOP_VALUE;
576
- }
577
- var ArticleCard = forwardRef(
578
- ({
579
- href,
580
- title,
581
- excerpt,
582
- imageUrl,
583
- imageAlt = "",
584
- category,
585
- date,
586
- readingTime,
587
- author,
588
- variant = "vertical",
589
- className,
590
- onClick,
591
- ...props
592
- }, ref) => {
593
- const { track } = useAnalytics();
594
- const handleClick = (e) => {
595
- track("article_click", { url: href, title, category });
596
- if (onClick) onClick(e);
597
- };
598
- return /* @__PURE__ */ jsxs(
599
- OutboundLink,
600
- {
601
- ref,
602
- href,
603
- context: "article-card",
604
- className: clsx(
605
- "ds-article-card",
606
- `ds-article-card--${variant}`,
607
- !imageUrl && "ds-article-card--no-image",
608
- className
609
- ),
610
- onClick: handleClick,
611
- ...props,
612
- children: [
613
- imageUrl ? /* @__PURE__ */ jsxs("div", { className: "ds-article-card__image-wrapper", children: [
614
- /* @__PURE__ */ jsx(
615
- "img",
616
- {
617
- src: imageUrl,
618
- alt: imageAlt,
619
- className: "ds-article-card__image",
620
- loading: "lazy"
621
- }
622
- ),
623
- category && /* @__PURE__ */ jsx("span", { className: "ds-article-card__category-badge", children: category })
624
- ] }) : /* @__PURE__ */ jsxs("div", { className: "ds-article-card__placeholder", children: [
625
- /* @__PURE__ */ jsx(FileText, { className: "ds-article-card__placeholder-icon", "aria-hidden": "true" }),
626
- category && /* @__PURE__ */ jsx("span", { className: "ds-article-card__category-badge", children: category })
627
- ] }),
628
- /* @__PURE__ */ jsxs("div", { className: "ds-article-card__content", children: [
629
- /* @__PURE__ */ jsx("h3", { className: "ds-article-card__title", children: title }),
630
- /* @__PURE__ */ jsx("p", { className: "ds-article-card__excerpt", children: excerpt }),
631
- /* @__PURE__ */ jsxs("div", { className: "ds-article-card__meta", children: [
632
- (date || author) && /* @__PURE__ */ jsxs("div", { className: "ds-article-card__meta-primary", children: [
633
- author && /* @__PURE__ */ jsx("span", { className: "ds-article-card__author", children: author }),
634
- author && date && /* @__PURE__ */ jsx("span", { className: "ds-article-card__dot", "aria-hidden": "true", children: "\u2022" }),
635
- date && /* @__PURE__ */ jsx("time", { dateTime: date, className: "ds-article-card__date", children: date })
636
- ] }),
637
- readingTime && /* @__PURE__ */ jsxs("div", { className: "ds-article-card__meta-secondary", children: [
638
- /* @__PURE__ */ jsx(Clock, { size: 14, "aria-hidden": "true" }),
639
- /* @__PURE__ */ jsxs("span", { children: [
640
- readingTime,
641
- " min read"
642
- ] })
643
- ] })
644
- ] }),
645
- /* @__PURE__ */ jsx("div", { className: "ds-article-card__footer", children: /* @__PURE__ */ jsxs("span", { className: "ds-article-card__read-more", children: [
646
- "Read article",
647
- /* @__PURE__ */ jsx(ArrowRight, { size: 16, className: "ds-article-card__arrow" })
648
- ] }) })
649
- ] })
650
- ]
651
- }
652
- );
653
- }
654
- );
655
- ArticleCard.displayName = "ArticleCard";
656
- var ArticleLayout = forwardRef(
657
- ({
658
- children,
659
- title,
660
- author,
661
- date,
662
- heroImage,
663
- sidebar,
664
- className,
665
- ...props
666
- }, ref) => {
667
- const { track } = useAnalytics();
668
- React.useEffect(() => {
669
- let maxScroll = 0;
670
- const handleScroll = () => {
671
- const docHeight = document.documentElement.scrollHeight - window.innerHeight;
672
- if (docHeight > 0) {
673
- const scrollPercent = Math.round(window.scrollY / docHeight * 100);
674
- if (scrollPercent > maxScroll) {
675
- maxScroll = scrollPercent;
676
- if (maxScroll === 25) track("article_scroll", { milestone: 25 });
677
- if (maxScroll === 50) track("article_scroll", { milestone: 50 });
678
- if (maxScroll === 75) track("article_scroll", { milestone: 75 });
679
- if (maxScroll === 100) track("article_scroll", { milestone: 100 });
680
- }
681
- }
682
- };
683
- window.addEventListener("scroll", handleScroll, { passive: true });
684
- return () => window.removeEventListener("scroll", handleScroll);
685
- }, [track]);
686
- return /* @__PURE__ */ jsxs(
687
- "article",
688
- {
689
- ref,
690
- className: clsx("ds-article-layout", className),
691
- ...props,
692
- children: [
693
- /* @__PURE__ */ jsxs("header", { className: "ds-article-layout__header", children: [
694
- /* @__PURE__ */ jsx("h1", { className: "ds-article-layout__title", children: title }),
695
- (author || date) && /* @__PURE__ */ jsxs("div", { className: "ds-article-layout__meta", children: [
696
- author && /* @__PURE__ */ jsx("div", { className: "ds-article-layout__author", children: author }),
697
- author && date && /* @__PURE__ */ jsx("span", { className: "ds-article-layout__dot", "aria-hidden": "true", children: "\u2022" }),
698
- date && /* @__PURE__ */ jsx("time", { className: "ds-article-layout__date", children: date })
699
- ] })
700
- ] }),
701
- heroImage && /* @__PURE__ */ jsx("div", { className: "ds-article-layout__hero", children: /* @__PURE__ */ jsx("img", { src: heroImage, alt: "", "aria-hidden": "true" }) }),
702
- /* @__PURE__ */ jsxs("div", { className: clsx(
703
- "ds-article-layout__body",
704
- sidebar && "ds-article-layout__body--with-sidebar"
705
- ), children: [
706
- /* @__PURE__ */ jsx("div", { className: "ds-article-layout__content ds-prose", children }),
707
- sidebar && /* @__PURE__ */ jsx("aside", { className: "ds-article-layout__sidebar", children: /* @__PURE__ */ jsx("div", { className: "ds-article-layout__sidebar-inner", children: sidebar }) })
708
- ] })
709
- ]
710
- }
711
- );
712
- }
713
- );
714
- ArticleLayout.displayName = "ArticleLayout";
715
-
716
- // src/tokens/spacing.ts
717
- var SPACING = {
718
- 1: "var(--space-1)",
719
- 2: "var(--space-2)",
720
- 3: "var(--space-3)",
721
- 4: "var(--space-4)",
722
- 5: "var(--space-5)",
723
- 6: "var(--space-6)",
724
- 8: "var(--space-8)",
725
- 10: "var(--space-10)",
726
- 12: "var(--space-12)",
727
- 16: "var(--space-16)",
728
- 20: "var(--space-20)"
729
- };
730
-
731
- // src/components/LayoutPrimitives/utils.ts
732
- var SPACING_ALIASES = {
733
- xs: "var(--space-2)",
734
- sm: "var(--space-3)",
735
- md: "var(--space-4)",
736
- lg: "var(--space-6)",
737
- xl: "var(--space-8)",
738
- "2xl": "var(--space-12)"
739
- };
740
- function resolveSpacing(value) {
741
- if (value === void 0) return void 0;
742
- if (typeof value === "number" && SPACING[value]) {
743
- return SPACING[value];
744
- }
745
- if (typeof value === "string" && value in SPACING_ALIASES) {
746
- return SPACING_ALIASES[value];
747
- }
748
- return String(value);
749
- }
750
- function extractSpacingStyles(props) {
751
- const styles = {};
752
- if (props.m !== void 0) styles.margin = resolveSpacing(props.m);
753
- if (props.mt !== void 0) styles.marginTop = resolveSpacing(props.mt);
754
- if (props.mb !== void 0) styles.marginBottom = resolveSpacing(props.mb);
755
- if (props.ml !== void 0) styles.marginLeft = resolveSpacing(props.ml);
756
- if (props.mr !== void 0) styles.marginRight = resolveSpacing(props.mr);
757
- if (props.mx !== void 0) {
758
- styles.marginLeft = resolveSpacing(props.mx);
759
- styles.marginRight = resolveSpacing(props.mx);
760
- }
761
- if (props.my !== void 0) {
762
- styles.marginTop = resolveSpacing(props.my);
763
- styles.marginBottom = resolveSpacing(props.my);
764
- }
765
- if (props.p !== void 0) styles.padding = resolveSpacing(props.p);
766
- if (props.pt !== void 0) styles.paddingTop = resolveSpacing(props.pt);
767
- if (props.pb !== void 0) styles.paddingBottom = resolveSpacing(props.pb);
768
- if (props.pl !== void 0) styles.paddingLeft = resolveSpacing(props.pl);
769
- if (props.pr !== void 0) styles.paddingRight = resolveSpacing(props.pr);
770
- if (props.px !== void 0) {
771
- styles.paddingLeft = resolveSpacing(props.px);
772
- styles.paddingRight = resolveSpacing(props.px);
773
- }
774
- if (props.py !== void 0) {
775
- styles.paddingTop = resolveSpacing(props.py);
776
- styles.paddingBottom = resolveSpacing(props.py);
777
- }
778
- if (props.gap !== void 0) styles.gap = resolveSpacing(props.gap);
779
- return styles;
780
- }
781
- var Box = forwardRef(
782
- ({ as: Component = "div", className, style, children, ...props }, ref) => {
783
- const spacingStyles = extractSpacingStyles(props);
784
- const { m, mt, mb, ml, mr, mx, my, p, pt, pb, pl, pr, px, py, gap, ...domProps } = props;
785
- return /* @__PURE__ */ jsx(
786
- Component,
787
- {
788
- ref,
789
- className: clsx("ds-box", className),
790
- style: { ...spacingStyles, ...style },
791
- ...domProps,
792
- children
793
- }
794
- );
795
- }
796
- );
797
- Box.displayName = "Box";
798
- var CONTAINER_SIZE_MAP = {
799
- sm: "768px",
800
- // 48rem — max-w-3xl
801
- md: "1024px",
802
- // 64rem — max-w-5xl
803
- lg: "1152px",
804
- // 72rem — max-w-6xl
805
- xl: "1280px",
806
- // 80rem — max-w-7xl
807
- full: "100%"
808
- };
809
- var Container = forwardRef(
810
- ({ size, fluid, maxWidth, className, style, ...props }, ref) => {
811
- let resolvedMaxWidth;
812
- if (fluid) {
813
- resolvedMaxWidth = "100%";
814
- } else if (size) {
815
- resolvedMaxWidth = CONTAINER_SIZE_MAP[size];
816
- } else {
817
- resolvedMaxWidth = maxWidth || "var(--container-default-max, 1200px)";
818
- }
819
- return /* @__PURE__ */ jsx(
820
- Box,
821
- {
822
- ref,
823
- className: clsx("ds-container", className),
824
- style: {
825
- maxWidth: resolvedMaxWidth,
826
- ...style
827
- },
828
- ...props
829
- }
830
- );
831
- }
832
- );
833
- Container.displayName = "Container";
834
- var SectionHeader = forwardRef(
835
- ({ title, subtitle, eyebrow, align = "center", className, ...props }, ref) => {
836
- if (!title && !subtitle && !eyebrow) return null;
837
- return /* @__PURE__ */ jsxs(
838
- "header",
839
- {
840
- ref,
841
- className: clsx("ds-section-header", `ds-section-header--${align}`, className),
842
- ...props,
843
- children: [
844
- eyebrow && /* @__PURE__ */ jsx("span", { className: "ds-section-header__eyebrow", children: eyebrow }),
845
- title && /* @__PURE__ */ jsx("h2", { className: "ds-section-header__title", children: title }),
846
- subtitle && /* @__PURE__ */ jsx("p", { className: "ds-section-header__subtitle", children: subtitle })
847
- ]
848
- }
849
- );
850
- }
851
- );
852
- SectionHeader.displayName = "SectionHeader";
853
- var SectionShell = forwardRef(
854
- ({
855
- className,
856
- children,
857
- background = "default",
858
- padding = "md",
859
- containerSize,
860
- containerFluid = false,
861
- ...props
862
- }, ref) => {
863
- return /* @__PURE__ */ jsx(
864
- "section",
865
- {
866
- ref,
867
- className: clsx(
868
- "ds-section",
869
- `ds-section--bg-${background}`,
870
- `ds-section--padding-${padding}`,
871
- className
872
- ),
873
- ...props,
874
- children: /* @__PURE__ */ jsx(
875
- Container,
876
- {
877
- size: containerSize === "fluid" ? "full" : containerSize,
878
- fluid: containerFluid || containerSize === "fluid",
879
- children
880
- }
881
- )
882
- }
883
- );
884
- }
885
- );
886
- SectionShell.displayName = "SectionShell";
887
- var RelatedContent = forwardRef(
888
- ({
889
- eyebrow,
890
- title = "Related Articles",
891
- items,
892
- maxVisible,
893
- className,
894
- ...props
895
- }, ref) => {
896
- const visibleItems = maxVisible ? items.slice(0, maxVisible) : items;
897
- if (visibleItems.length === 0) return null;
898
- return /* @__PURE__ */ jsxs(
899
- SectionShell,
900
- {
901
- ref,
902
- className: clsx("ds-related-content", className),
903
- background: "muted",
904
- ...props,
905
- children: [
906
- /* @__PURE__ */ jsx(SectionHeader, { eyebrow, title }),
907
- /* @__PURE__ */ jsx("div", { className: "ds-related-content__grid", children: visibleItems.map((item, i) => /* @__PURE__ */ jsx(ArticleCard, { ...item }, i)) })
908
- ]
909
- }
910
- );
911
- }
912
- );
913
- RelatedContent.displayName = "RelatedContent";
914
- var VersionedUpgradeAlert = React.forwardRef(
915
- ({ seriesName, viewedYear, latestYear, latestUrl, deltaSummary, className, ...props }, ref) => {
916
- const [dismissed, setDismissed] = useState(false);
917
- if (dismissed) return null;
918
- return /* @__PURE__ */ jsxs(
919
- "div",
920
- {
921
- ref,
922
- className: clsx("ds-versioned-alert", className),
923
- role: "alert",
924
- ...props,
925
- children: [
926
- /* @__PURE__ */ jsxs("div", { className: "ds-versioned-alert__content", children: [
927
- /* @__PURE__ */ jsx("span", { className: "ds-versioned-alert__icon", children: "\u26A0\uFE0F" }),
928
- /* @__PURE__ */ jsxs("div", { className: "ds-versioned-alert__text", children: [
929
- /* @__PURE__ */ jsx("strong", { children: "Outdated Edition:" }),
930
- " You are viewing the ",
931
- viewedYear,
932
- " edition of ",
933
- seriesName,
934
- ". The ",
935
- /* @__PURE__ */ jsxs("strong", { children: [
936
- latestYear,
937
- " edition"
938
- ] }),
939
- " is now available.",
940
- deltaSummary && /* @__PURE__ */ jsxs("span", { className: "ds-versioned-alert__delta", children: [
941
- " ",
942
- deltaSummary
943
- ] })
944
- ] })
945
- ] }),
946
- /* @__PURE__ */ jsxs("div", { className: "ds-versioned-alert__actions", children: [
947
- /* @__PURE__ */ jsxs(OutboundLink, { href: latestUrl, context: "versioned-alert-view-latest", className: "ds-versioned-alert__button ds-button ds-button--primary ds-button--sm", openInNewTab: false, children: [
948
- "View ",
949
- latestYear,
950
- " Edition"
951
- ] }),
952
- /* @__PURE__ */ jsx(
953
- "button",
954
- {
955
- className: "ds-versioned-alert__close",
956
- onClick: () => setDismissed(true),
957
- "aria-label": "Dismiss alert",
958
- children: "\xD7"
959
- }
960
- )
961
- ] })
962
- ]
963
- }
964
- );
965
- }
966
- );
967
- VersionedUpgradeAlert.displayName = "VersionedUpgradeAlert";
968
- var VersionedSeriesNavigator = React.forwardRef(
969
- ({ seriesName, hubUrl, editions, className, ...props }, ref) => {
970
- const sortedEditions = [...editions].sort((a, b) => a.year - b.year);
971
- return /* @__PURE__ */ jsxs("div", { ref, className: clsx("ds-versioned-navigator", className), ...props, children: [
972
- /* @__PURE__ */ jsxs("div", { className: "ds-versioned-navigator__header", children: [
973
- /* @__PURE__ */ jsx("span", { className: "ds-versioned-navigator__label", children: "Series" }),
974
- /* @__PURE__ */ jsxs(OutboundLink, { href: hubUrl, context: "versioned-navigator-hub", className: "ds-versioned-navigator__title", openInNewTab: false, children: [
975
- seriesName,
976
- " Hub"
977
- ] })
978
- ] }),
979
- /* @__PURE__ */ jsx("div", { className: "ds-versioned-navigator__timeline", children: sortedEditions.map((edition, idx) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
980
- idx > 0 && /* @__PURE__ */ jsx("div", { className: "ds-versioned-navigator__connector" }),
981
- /* @__PURE__ */ jsx(
982
- OutboundLink,
983
- {
984
- href: edition.url,
985
- context: "versioned-navigator-edition",
986
- className: clsx(
987
- "ds-versioned-navigator__node",
988
- edition.isCurrent && "ds-versioned-navigator__node--active"
989
- ),
990
- "aria-current": edition.isCurrent ? "page" : void 0,
991
- openInNewTab: false,
992
- children: edition.year
993
- }
994
- )
995
- ] }, edition.year)) })
996
- ] });
997
- }
998
- );
999
- VersionedSeriesNavigator.displayName = "VersionedSeriesNavigator";
1000
- var BrowserFrame = forwardRef(
1001
- ({
1002
- variant = "browser",
1003
- children,
1004
- url,
1005
- showControls,
1006
- withGlow = false,
1007
- aspectRatio = "16/9",
1008
- className,
1009
- ...props
1010
- }, ref) => {
1011
- const hasControls = showControls ?? (variant === "browser" || variant === "app");
1012
- return /* @__PURE__ */ jsxs(
1013
- "div",
1014
- {
1015
- ref,
1016
- className: clsx(
1017
- "ds-browser-frame",
1018
- `ds-browser-frame--${variant}`,
1019
- withGlow && "ds-browser-frame--glow",
1020
- className
1021
- ),
1022
- ...props,
1023
- children: [
1024
- variant !== "minimal" && /* @__PURE__ */ jsxs("div", { className: "ds-browser-frame__chrome", children: [
1025
- hasControls && /* @__PURE__ */ jsxs("div", { className: "ds-browser-frame__controls", "aria-hidden": "true", children: [
1026
- /* @__PURE__ */ jsx("span", { className: "ds-browser-frame__dot ds-browser-frame__dot--red" }),
1027
- /* @__PURE__ */ jsx("span", { className: "ds-browser-frame__dot ds-browser-frame__dot--yellow" }),
1028
- /* @__PURE__ */ jsx("span", { className: "ds-browser-frame__dot ds-browser-frame__dot--green" })
1029
- ] }),
1030
- variant === "browser" && url && /* @__PURE__ */ jsxs("div", { className: "ds-browser-frame__url-bar", children: [
1031
- /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", className: "ds-browser-frame__lock", children: [
1032
- /* @__PURE__ */ jsx("path", { d: "M3 5V4a3 3 0 116 0v1", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }),
1033
- /* @__PURE__ */ jsx("rect", { x: "2", y: "5", width: "8", height: "6", rx: "1.5", stroke: "currentColor", strokeWidth: "1.2" })
1034
- ] }),
1035
- /* @__PURE__ */ jsx("span", { className: "ds-browser-frame__url-text", children: url })
1036
- ] })
1037
- ] }),
1038
- /* @__PURE__ */ jsx(
1039
- "div",
1040
- {
1041
- className: "ds-browser-frame__content",
1042
- style: aspectRatio !== "auto" ? { aspectRatio } : void 0,
1043
- children
1044
- }
1045
- ),
1046
- variant === "mobile" && /* @__PURE__ */ jsx("div", { className: "ds-browser-frame__notch", "aria-hidden": "true" })
1047
- ]
1048
- }
1049
- );
1050
- }
1051
- );
1052
- BrowserFrame.displayName = "BrowserFrame";
1053
-
1054
- export { ArticleCard, ArticleLayout, AuthorBio, BrowserFrame, DataHighlight, InsightCallout, LongFormLayout, ReadingProgress, RelatedContent, TableOfContents, VersionedSeriesNavigator, VersionedUpgradeAlert };
1
+ export { ArticleCard, ArticleLayout, AuthorBio, DataHighlight, InsightCallout, LongFormLayout, ReadingProgress, RelatedContent, TableOfContents, VersionedSeriesNavigator, VersionedUpgradeAlert } from '../chunk-2KQVZ5FB.js';
2
+ import '../chunk-P5BOFE5A.js';
3
+ export { BrowserFrame } from '../chunk-XWPDRMZG.js';
4
+ import '../chunk-2GARWEJK.js';
5
+ import '../chunk-Y3CPKNB7.js';
6
+ import '../chunk-UFAJY2DM.js';
7
+ import '../chunk-KJ2OXQF4.js';
8
+ import '../chunk-HN4PHABT.js';
1055
9
  //# sourceMappingURL=out.js.map
1056
10
  //# sourceMappingURL=index.js.map