@salesmind-ai/design-system 0.3.3 → 0.3.4

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 (215) hide show
  1. package/dist/{SectionShell-BfBw5q0Y.d.cts → SectionShell-GlglHCzz.d.cts} +1 -0
  2. package/dist/{SectionShell-BfBw5q0Y.d.ts → SectionShell-GlglHCzz.d.ts} +1 -0
  3. package/dist/StatsSection-B8iD9L-o.d.ts +68 -0
  4. package/dist/StatsSection-wgd8Vge1.d.cts +68 -0
  5. package/dist/admin/index.cjs +2928 -68
  6. package/dist/admin/index.cjs.map +1 -1
  7. package/dist/admin/index.js +2915 -5
  8. package/dist/admin/index.js.map +1 -1
  9. package/dist/blog/index.cjs +1064 -53
  10. package/dist/blog/index.cjs.map +1 -1
  11. package/dist/blog/index.d.cts +1 -1
  12. package/dist/blog/index.d.ts +1 -1
  13. package/dist/blog/index.js +1054 -8
  14. package/dist/blog/index.js.map +1 -1
  15. package/dist/charts/index.cjs +2694 -46
  16. package/dist/charts/index.cjs.map +1 -1
  17. package/dist/charts/index.js +2680 -3
  18. package/dist/charts/index.js.map +1 -1
  19. package/dist/core/index.cjs +4333 -807
  20. package/dist/core/index.cjs.map +1 -1
  21. package/dist/core/index.js +4130 -14
  22. package/dist/core/index.js.map +1 -1
  23. package/dist/i18n/index.cjs +558 -86
  24. package/dist/i18n/index.cjs.map +1 -1
  25. package/dist/i18n/index.js +544 -1
  26. package/dist/i18n/index.js.map +1 -1
  27. package/dist/index.cjs +17140 -1432
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.css +24 -13
  30. package/dist/index.css.map +1 -1
  31. package/dist/index.d.cts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +16785 -31
  34. package/dist/index.js.map +1 -1
  35. package/dist/marketing/index.cjs +3072 -142
  36. package/dist/marketing/index.cjs.map +1 -1
  37. package/dist/marketing/index.d.cts +1 -1
  38. package/dist/marketing/index.d.ts +1 -1
  39. package/dist/marketing/index.js +3042 -11
  40. package/dist/marketing/index.js.map +1 -1
  41. package/dist/motion/index.cjs +1222 -26
  42. package/dist/motion/index.cjs.map +1 -1
  43. package/dist/motion/index.js +1215 -2
  44. package/dist/motion/index.js.map +1 -1
  45. package/dist/nav/index.cjs +1518 -101
  46. package/dist/nav/index.cjs.map +1 -1
  47. package/dist/nav/index.css +24 -13
  48. package/dist/nav/index.css.map +1 -1
  49. package/dist/nav/index.js +1498 -4
  50. package/dist/nav/index.js.map +1 -1
  51. package/dist/report/index.cjs +2403 -171
  52. package/dist/report/index.cjs.map +1 -1
  53. package/dist/report/index.js +2363 -3
  54. package/dist/report/index.js.map +1 -1
  55. package/dist/sections/index.cjs +382 -28
  56. package/dist/sections/index.cjs.map +1 -1
  57. package/dist/sections/index.d.cts +15 -69
  58. package/dist/sections/index.d.ts +15 -69
  59. package/dist/sections/index.js +376 -4
  60. package/dist/sections/index.js.map +1 -1
  61. package/dist/social-proof/index.cjs +1250 -53
  62. package/dist/social-proof/index.cjs.map +1 -1
  63. package/dist/social-proof/index.d.cts +1 -1
  64. package/dist/social-proof/index.d.ts +1 -1
  65. package/dist/social-proof/index.js +1235 -6
  66. package/dist/social-proof/index.js.map +1 -1
  67. package/dist/theme/index.cjs +565 -38
  68. package/dist/theme/index.cjs.map +1 -1
  69. package/dist/theme/index.js +555 -2
  70. package/dist/theme/index.js.map +1 -1
  71. package/dist/web/client/index.cjs +491 -38
  72. package/dist/web/client/index.cjs.map +1 -1
  73. package/dist/web/client/index.js +483 -4
  74. package/dist/web/client/index.js.map +1 -1
  75. package/dist/web/index.cjs +1346 -158
  76. package/dist/web/index.cjs.map +1 -1
  77. package/dist/web/index.js +1305 -9
  78. package/dist/web/index.js.map +1 -1
  79. package/dist/web/server/index.cjs +563 -26
  80. package/dist/web/server/index.cjs.map +1 -1
  81. package/dist/web/server/index.js +560 -1
  82. package/dist/web/server/index.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/chunk-2GARWEJK.js +0 -17
  85. package/dist/chunk-2GARWEJK.js.map +0 -1
  86. package/dist/chunk-3NKRFUAR.js +0 -37
  87. package/dist/chunk-3NKRFUAR.js.map +0 -1
  88. package/dist/chunk-3TGSIILM.cjs +0 -201
  89. package/dist/chunk-3TGSIILM.cjs.map +0 -1
  90. package/dist/chunk-4GM5BGBN.cjs +0 -801
  91. package/dist/chunk-4GM5BGBN.cjs.map +0 -1
  92. package/dist/chunk-5LGDEZWY.cjs +0 -2434
  93. package/dist/chunk-5LGDEZWY.cjs.map +0 -1
  94. package/dist/chunk-6H4DSTXR.js +0 -786
  95. package/dist/chunk-6H4DSTXR.js.map +0 -1
  96. package/dist/chunk-6UNG76Y2.js +0 -153
  97. package/dist/chunk-6UNG76Y2.js.map +0 -1
  98. package/dist/chunk-7PX2AZ6Y.js +0 -39
  99. package/dist/chunk-7PX2AZ6Y.js.map +0 -1
  100. package/dist/chunk-B6AVAX4F.js +0 -1415
  101. package/dist/chunk-B6AVAX4F.js.map +0 -1
  102. package/dist/chunk-BILT5KD3.js +0 -264
  103. package/dist/chunk-BILT5KD3.js.map +0 -1
  104. package/dist/chunk-C2BCDNAV.js +0 -24
  105. package/dist/chunk-C2BCDNAV.js.map +0 -1
  106. package/dist/chunk-CH42VPWE.cjs +0 -421
  107. package/dist/chunk-CH42VPWE.cjs.map +0 -1
  108. package/dist/chunk-CJ2MKVAF.cjs +0 -46
  109. package/dist/chunk-CJ2MKVAF.cjs.map +0 -1
  110. package/dist/chunk-DP74LUXG.cjs +0 -98
  111. package/dist/chunk-DP74LUXG.cjs.map +0 -1
  112. package/dist/chunk-E7D6EKJ4.cjs +0 -44
  113. package/dist/chunk-E7D6EKJ4.cjs.map +0 -1
  114. package/dist/chunk-ECXBTUH6.cjs +0 -584
  115. package/dist/chunk-ECXBTUH6.cjs.map +0 -1
  116. package/dist/chunk-EFRAP5ES.js +0 -157
  117. package/dist/chunk-EFRAP5ES.js.map +0 -1
  118. package/dist/chunk-F6YYWMME.js +0 -485
  119. package/dist/chunk-F6YYWMME.js.map +0 -1
  120. package/dist/chunk-FAFAP4L5.js +0 -183
  121. package/dist/chunk-FAFAP4L5.js.map +0 -1
  122. package/dist/chunk-GUZIMHWS.js +0 -1608
  123. package/dist/chunk-GUZIMHWS.js.map +0 -1
  124. package/dist/chunk-H2Y6BSTL.cjs +0 -69
  125. package/dist/chunk-H2Y6BSTL.cjs.map +0 -1
  126. package/dist/chunk-HN4PHABT.js +0 -126
  127. package/dist/chunk-HN4PHABT.js.map +0 -1
  128. package/dist/chunk-HRENHNDJ.js +0 -211
  129. package/dist/chunk-HRENHNDJ.js.map +0 -1
  130. package/dist/chunk-I75BFEYT.cjs +0 -2561
  131. package/dist/chunk-I75BFEYT.cjs.map +0 -1
  132. package/dist/chunk-IFRATNLU.js +0 -562
  133. package/dist/chunk-IFRATNLU.js.map +0 -1
  134. package/dist/chunk-IYPXJ6YC.cjs +0 -69
  135. package/dist/chunk-IYPXJ6YC.cjs.map +0 -1
  136. package/dist/chunk-JPJN4YBC.js +0 -409
  137. package/dist/chunk-JPJN4YBC.js.map +0 -1
  138. package/dist/chunk-KBA2LFBG.js +0 -62
  139. package/dist/chunk-KBA2LFBG.js.map +0 -1
  140. package/dist/chunk-KCKUSU2M.cjs +0 -166
  141. package/dist/chunk-KCKUSU2M.cjs.map +0 -1
  142. package/dist/chunk-KJ2OXQF4.js +0 -287
  143. package/dist/chunk-KJ2OXQF4.js.map +0 -1
  144. package/dist/chunk-KNQEIU7O.cjs +0 -1202
  145. package/dist/chunk-KNQEIU7O.cjs.map +0 -1
  146. package/dist/chunk-KVGSVGRK.cjs +0 -569
  147. package/dist/chunk-KVGSVGRK.cjs.map +0 -1
  148. package/dist/chunk-L352JRV6.cjs +0 -105
  149. package/dist/chunk-L352JRV6.cjs.map +0 -1
  150. package/dist/chunk-LJADZITX.cjs +0 -298
  151. package/dist/chunk-LJADZITX.cjs.map +0 -1
  152. package/dist/chunk-LMJPWXTZ.cjs +0 -194
  153. package/dist/chunk-LMJPWXTZ.cjs.map +0 -1
  154. package/dist/chunk-LOWEAQST.js +0 -701
  155. package/dist/chunk-LOWEAQST.js.map +0 -1
  156. package/dist/chunk-MDB2WCRQ.cjs +0 -137
  157. package/dist/chunk-MDB2WCRQ.cjs.map +0 -1
  158. package/dist/chunk-MQDEE7HC.cjs +0 -283
  159. package/dist/chunk-MQDEE7HC.cjs.map +0 -1
  160. package/dist/chunk-MQRB634A.cjs +0 -34
  161. package/dist/chunk-MQRB634A.cjs.map +0 -1
  162. package/dist/chunk-MTI27RDV.js +0 -185
  163. package/dist/chunk-MTI27RDV.js.map +0 -1
  164. package/dist/chunk-MU6GW5ZV.js +0 -2317
  165. package/dist/chunk-MU6GW5ZV.js.map +0 -1
  166. package/dist/chunk-NN3TUHIH.js +0 -28
  167. package/dist/chunk-NN3TUHIH.js.map +0 -1
  168. package/dist/chunk-NT4LBP7D.cjs +0 -111
  169. package/dist/chunk-NT4LBP7D.cjs.map +0 -1
  170. package/dist/chunk-OLV7OD3X.cjs +0 -502
  171. package/dist/chunk-OLV7OD3X.cjs.map +0 -1
  172. package/dist/chunk-OXNXEQY7.js +0 -2538
  173. package/dist/chunk-OXNXEQY7.js.map +0 -1
  174. package/dist/chunk-P5BOFE5A.js +0 -546
  175. package/dist/chunk-P5BOFE5A.js.map +0 -1
  176. package/dist/chunk-Q2MFGYTE.cjs +0 -1449
  177. package/dist/chunk-Q2MFGYTE.cjs.map +0 -1
  178. package/dist/chunk-Q75DBVDY.cjs +0 -68
  179. package/dist/chunk-Q75DBVDY.cjs.map +0 -1
  180. package/dist/chunk-REQ5Q6ZI.js +0 -1022
  181. package/dist/chunk-REQ5Q6ZI.js.map +0 -1
  182. package/dist/chunk-SICKWUWB.js +0 -62
  183. package/dist/chunk-SICKWUWB.js.map +0 -1
  184. package/dist/chunk-T343CCH5.js +0 -1190
  185. package/dist/chunk-T343CCH5.js.map +0 -1
  186. package/dist/chunk-TEC62D4A.cjs +0 -1624
  187. package/dist/chunk-TEC62D4A.cjs.map +0 -1
  188. package/dist/chunk-TW5JB35D.js +0 -2122
  189. package/dist/chunk-TW5JB35D.js.map +0 -1
  190. package/dist/chunk-VC5LMUVQ.cjs +0 -20
  191. package/dist/chunk-VC5LMUVQ.cjs.map +0 -1
  192. package/dist/chunk-VM7WFMKI.cjs +0 -76
  193. package/dist/chunk-VM7WFMKI.cjs.map +0 -1
  194. package/dist/chunk-W2WTP6HS.cjs +0 -233
  195. package/dist/chunk-W2WTP6HS.cjs.map +0 -1
  196. package/dist/chunk-WH7PYHZY.cjs +0 -35
  197. package/dist/chunk-WH7PYHZY.cjs.map +0 -1
  198. package/dist/chunk-XQZVY7JJ.cjs +0 -717
  199. package/dist/chunk-XQZVY7JJ.cjs.map +0 -1
  200. package/dist/chunk-XU3OMQ7V.js +0 -98
  201. package/dist/chunk-XU3OMQ7V.js.map +0 -1
  202. package/dist/chunk-XWPDRMZG.js +0 -62
  203. package/dist/chunk-XWPDRMZG.js.map +0 -1
  204. package/dist/chunk-Y3CPKNB7.js +0 -67
  205. package/dist/chunk-Y3CPKNB7.js.map +0 -1
  206. package/dist/chunk-YNVRDD2P.js +0 -98
  207. package/dist/chunk-YNVRDD2P.js.map +0 -1
  208. package/dist/chunk-YSYR54XR.js +0 -92
  209. package/dist/chunk-YSYR54XR.js.map +0 -1
  210. package/dist/chunk-YTYDQBVY.cjs +0 -162
  211. package/dist/chunk-YTYDQBVY.cjs.map +0 -1
  212. package/dist/chunk-ZDLOA2UT.cjs +0 -1042
  213. package/dist/chunk-ZDLOA2UT.cjs.map +0 -1
  214. package/dist/chunk-ZWUKRCOJ.cjs +0 -2162
  215. package/dist/chunk-ZWUKRCOJ.cjs.map +0 -1
@@ -1,10 +1,1056 @@
1
- export { ArticleCard, ArticleLayout, AuthorBio, DataHighlight, InsightCallout, LongFormLayout, ReadingProgress, RelatedContent, TableOfContents, VersionedSeriesNavigator, VersionedUpgradeAlert } from '../chunk-F6YYWMME.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-KBA2LFBG.js';
7
- import '../chunk-KJ2OXQF4.js';
8
- import '../chunk-HN4PHABT.js';
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 };
9
1055
  //# sourceMappingURL=out.js.map
10
1056
  //# sourceMappingURL=index.js.map