@flamingo-stack/openframe-frontend-core 0.0.731 → 0.0.733

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 (149) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-RAHRDJBP.cjs → chunk-3HPB4H4C.cjs} +4 -4
  3. package/dist/{chunk-2UNQJVYN.cjs → chunk-3KGICRH7.cjs} +1457 -1187
  4. package/dist/{chunk-A4HNF4MP.cjs → chunk-3UTPZW36.cjs} +89 -89
  5. package/dist/{chunk-GID62YEN.cjs → chunk-AAFW4STC.cjs} +3 -3
  6. package/dist/{chunk-XDBHGWFH.cjs → chunk-ATMBJBOI.cjs} +16 -16
  7. package/dist/{chunk-YDGBRI3Y.cjs → chunk-AV5533DH.cjs} +15 -15
  8. package/dist/{chunk-BFHLGEJK.cjs → chunk-BP6R5WDW.cjs} +63 -60
  9. package/dist/{chunk-CLILWI6O.cjs → chunk-CJVAA7KL.cjs} +32 -32
  10. package/dist/{chunk-YJFN2W7A.cjs → chunk-DUVOQHQI.cjs} +7 -7
  11. package/dist/{chunk-E3N24573.cjs → chunk-DUXLZPMJ.cjs} +9 -9
  12. package/dist/{chunk-TH4N726A.cjs → chunk-E26I4XH6.cjs} +17 -17
  13. package/dist/{chunk-Y4QRK3CB.cjs → chunk-EMG3T55N.cjs} +7 -7
  14. package/dist/{chunk-JK75ZZP3.cjs → chunk-EQORT7NK.cjs} +59 -59
  15. package/dist/chunk-FCGLSWKR.cjs +417 -0
  16. package/dist/{chunk-MANNIJ42.cjs → chunk-FICJS5OA.cjs} +6 -0
  17. package/dist/{chunk-QP6QS3YU.cjs → chunk-FNRMDDVN.cjs} +48 -50
  18. package/dist/{chunk-KLXHCNDC.cjs → chunk-FTTLBMHU.cjs} +3 -3
  19. package/dist/{chunk-JPZ4Y6X3.cjs → chunk-GB3CHAW7.cjs} +93 -93
  20. package/dist/{chunk-7DUXR4HL.cjs → chunk-GVTDVS5U.cjs} +3 -3
  21. package/dist/{chunk-ZV6473Z4.cjs → chunk-HSWHOCZ3.cjs} +20 -20
  22. package/dist/{chunk-53XZ6MJ5.cjs → chunk-IC4FT3A6.cjs} +28 -28
  23. package/dist/{chunk-6V4GEE55.cjs → chunk-J7JKPTGO.cjs} +12 -12
  24. package/dist/{chunk-FKKUQK4C.cjs → chunk-L4ZNR5V7.cjs} +43 -39
  25. package/dist/{chunk-NYY25425.cjs → chunk-MYBTNOS6.cjs} +2 -2
  26. package/dist/chunk-NTJE6SM6.cjs +28 -0
  27. package/dist/{chunk-RBOIGJYF.cjs → chunk-P3R23TOE.cjs} +35 -35
  28. package/dist/chunk-PX7FY655.cjs +114 -0
  29. package/dist/{chunk-YUXRIR45.cjs → chunk-SA7LDEVJ.cjs} +98 -50
  30. package/dist/{chunk-32ENYVFA.cjs → chunk-TIMCHP4X.cjs} +42 -42
  31. package/dist/{chunk-3SWLL4IM.cjs → chunk-U4T5NLZD.cjs} +8 -8
  32. package/dist/{chunk-HI7EFAFQ.cjs → chunk-XDWY6HAW.cjs} +28 -28
  33. package/dist/{chunk-25H2SZH7.cjs → chunk-XY632BCH.cjs} +4 -4
  34. package/dist/{chunk-HY2KTQSL.cjs → chunk-YIXKH2JO.cjs} +236 -236
  35. package/dist/{chunk-4YPV4OI4.cjs → chunk-ZBNA6TCW.cjs} +82 -82
  36. package/dist/{chunk-HLIJ3U2T.cjs → chunk-ZJNYWNCB.cjs} +23 -21
  37. package/dist/{chunk-HEOD765R.cjs → chunk-ZRYKDN2J.cjs} +32 -379
  38. package/dist/{cloud-tenants-SC4FNAC2.cjs → cloud-tenants-3GOGR3EN.cjs} +22 -22
  39. package/dist/components/agent-identity.d.ts +8 -0
  40. package/dist/components/agent-identity.d.ts.map +1 -1
  41. package/dist/components/agent-identity.js +13 -1
  42. package/dist/components/case-studies/index.cjs +35 -35
  43. package/dist/components/chat/embeddable-chat.d.ts +16 -0
  44. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  45. package/dist/components/chat/embeddable-chat.js +5 -2
  46. package/dist/components/chat/index.cjs +16 -16
  47. package/dist/components/chat/utils/icon-library.d.ts.map +1 -1
  48. package/dist/components/chat/utils/icon-library.js +6 -0
  49. package/dist/components/contact/index.cjs +23 -23
  50. package/dist/components/docs/index.cjs +26 -26
  51. package/dist/components/embeds/index.cjs +23 -23
  52. package/dist/components/faq/index.cjs +23 -23
  53. package/dist/components/features/index.cjs +22 -22
  54. package/dist/components/help-center-pages/index.cjs +138 -138
  55. package/dist/components/index.cjs +89 -82
  56. package/dist/components/meeting-scheduler/index.cjs +67 -67
  57. package/dist/components/navigation/index.cjs +25 -25
  58. package/dist/components/onboarding-guides/index.cjs +25 -25
  59. package/dist/components/product-demo/index.cjs +8 -8
  60. package/dist/components/product-demo/screens/remote-desktop-picture.d.ts.map +1 -1
  61. package/dist/components/product-demo/screens/remote-desktop-picture.js +2 -1
  62. package/dist/components/related-content/index.cjs +10 -10
  63. package/dist/components/tickets/index.cjs +26 -26
  64. package/dist/components/ui/device-wallpaper.d.ts +7 -0
  65. package/dist/components/ui/device-wallpaper.d.ts.map +1 -0
  66. package/dist/components/ui/device-wallpaper.js +5 -0
  67. package/dist/components/ui/feature-list.d.ts +9 -4
  68. package/dist/components/ui/feature-list.d.ts.map +1 -1
  69. package/dist/components/ui/feature-list.js +26 -35
  70. package/dist/components/ui/index.cjs +28 -22
  71. package/dist/components/ui/index.d.ts +3 -1
  72. package/dist/components/ui/index.d.ts.map +1 -1
  73. package/dist/components/ui/index.js +3 -1
  74. package/dist/components/ui/notification-stack.d.ts +33 -0
  75. package/dist/components/ui/notification-stack.d.ts.map +1 -0
  76. package/dist/components/ui/notification-stack.js +78 -0
  77. package/dist/components/ui/numbered-step.d.ts +29 -0
  78. package/dist/components/ui/numbered-step.d.ts.map +1 -0
  79. package/dist/components/ui/numbered-step.js +57 -0
  80. package/dist/components/ui/phone-frame.d.ts +14 -9
  81. package/dist/components/ui/phone-frame.d.ts.map +1 -1
  82. package/dist/components/ui/phone-frame.js +50 -6
  83. package/dist/components/ui/phone-glyphs/lock-camera-glyph.d.ts +5 -0
  84. package/dist/components/ui/phone-glyphs/lock-camera-glyph.d.ts.map +1 -0
  85. package/dist/components/ui/phone-glyphs/lock-camera-glyph.js +14 -0
  86. package/dist/components/ui/phone-glyphs/lock-flashlight-glyph.d.ts +5 -0
  87. package/dist/components/ui/phone-glyphs/lock-flashlight-glyph.d.ts.map +1 -0
  88. package/dist/components/ui/phone-glyphs/lock-flashlight-glyph.js +14 -0
  89. package/dist/components/ui/phone-glyphs/status-bar-glyphs.d.ts +5 -0
  90. package/dist/components/ui/phone-glyphs/status-bar-glyphs.d.ts.map +1 -0
  91. package/dist/components/ui/phone-glyphs/status-bar-glyphs.js +68 -0
  92. package/dist/components/ui/searchable-select.d.ts +29 -3
  93. package/dist/components/ui/searchable-select.d.ts.map +1 -1
  94. package/dist/components/ui/searchable-select.js +101 -45
  95. package/dist/components/ui/snap-carousel.d.ts +5 -8
  96. package/dist/components/ui/snap-carousel.d.ts.map +1 -1
  97. package/dist/components/ui/snap-carousel.js +2 -27
  98. package/dist/components/ui/tab-navigation.d.ts +8 -1
  99. package/dist/components/ui/tab-navigation.d.ts.map +1 -1
  100. package/dist/components/ui/tab-navigation.js +30 -20
  101. package/dist/{devices-7MHSJNXS.cjs → devices-POZXTP7X.cjs} +23 -23
  102. package/dist/{embeddable-chat-VPIG3F7E.cjs → embeddable-chat-I3Y5GCCR.cjs} +96 -93
  103. package/dist/hooks/index.cjs +9 -9
  104. package/dist/hooks/ui/use-autoplay.d.ts +50 -13
  105. package/dist/hooks/ui/use-autoplay.d.ts.map +1 -1
  106. package/dist/hooks/ui/use-autoplay.js +76 -13
  107. package/dist/hooks/ui/use-in-view.d.ts +8 -0
  108. package/dist/hooks/ui/use-in-view.d.ts.map +1 -1
  109. package/dist/hooks/ui/use-in-view.js +21 -36
  110. package/dist/hooks/use-agent-identities.d.ts +6 -0
  111. package/dist/hooks/use-agent-identities.d.ts.map +1 -1
  112. package/dist/hooks/use-scenario-player.d.ts +26 -9
  113. package/dist/hooks/use-scenario-player.d.ts.map +1 -1
  114. package/dist/hooks/use-scenario-player.js +12 -9
  115. package/dist/index.cjs +58 -51
  116. package/dist/{knowledge-4DREGSOZ.cjs → knowledge-AP34IMXN.cjs} +23 -23
  117. package/dist/{logs-BWXNT2KP.cjs → logs-CEVMIOPW.cjs} +30 -30
  118. package/dist/{policies-MGFUI23M.cjs → policies-AMBMRCGB.cjs} +26 -26
  119. package/dist/{remote-session-O6QGXV2N.cjs → remote-session-Z4YZFG5E.cjs} +10 -9
  120. package/dist/{software-update-7LF7XEYC.cjs → software-update-Z3MWMSHI.cjs} +26 -26
  121. package/dist/{tickets-board-KNXK747O.cjs → tickets-board-JOSYLOS7.cjs} +13 -13
  122. package/package.json +1 -1
  123. package/src/components/agent-identity.tsx +20 -1
  124. package/src/components/chat/embeddable-chat.tsx +29 -2
  125. package/src/components/chat/utils/icon-library.tsx +7 -0
  126. package/src/components/product-demo/screens/remote-desktop-picture.tsx +2 -1
  127. package/src/components/ui/device-wallpaper.ts +7 -0
  128. package/src/components/ui/feature-list.tsx +24 -30
  129. package/src/components/ui/index.ts +3 -1
  130. package/src/components/ui/notification-stack.tsx +133 -0
  131. package/src/components/ui/numbered-step.tsx +81 -0
  132. package/src/components/ui/phone-frame.tsx +83 -19
  133. package/src/components/ui/phone-glyphs/lock-camera-glyph.tsx +14 -0
  134. package/src/components/ui/phone-glyphs/lock-flashlight-glyph.tsx +14 -0
  135. package/src/components/ui/phone-glyphs/status-bar-glyphs.tsx +45 -0
  136. package/src/components/ui/searchable-select.tsx +124 -32
  137. package/src/components/ui/snap-carousel.tsx +6 -38
  138. package/src/components/ui/tab-navigation.tsx +49 -21
  139. package/src/hooks/ui/use-autoplay.ts +144 -27
  140. package/src/hooks/ui/use-in-view.ts +31 -38
  141. package/src/hooks/use-agent-identities.ts +6 -0
  142. package/src/hooks/use-scenario-player.ts +44 -20
  143. package/dist/chunk-2WXLQ5R5.cjs +0 -99
  144. package/dist/chunk-BE2WAMG5.cjs +0 -54
  145. package/dist/chunk-LCTDHLDL.cjs +0 -43
  146. package/dist/components/ui/playback-toggle.d.ts +0 -24
  147. package/dist/components/ui/playback-toggle.d.ts.map +0 -1
  148. package/dist/components/ui/playback-toggle.js +0 -32
  149. package/src/components/ui/playback-toggle.tsx +0 -53
@@ -0,0 +1,417 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+
3
+
4
+
5
+
6
+ var _chunkPX7FY655cjs = require('./chunk-PX7FY655.cjs');
7
+
8
+
9
+
10
+
11
+ var _chunkFICJS5OAcjs = require('./chunk-FICJS5OA.cjs');
12
+
13
+ // src/utils/color-analysis.ts
14
+ var DESIGN_PALETTE = [
15
+ { name: "yellow", hex: "#FFC008", rgb: [255, 192, 8] },
16
+ { name: "black", hex: "#161616", rgb: [22, 22, 22] },
17
+ { name: "gray", hex: "#888888", rgb: [136, 136, 136] }
18
+ ];
19
+ function hexToRgb(hex) {
20
+ const normalized = hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (_, r, g, b) => `${r}${r}${g}${g}${b}${b}`);
21
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(normalized);
22
+ return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : [0, 0, 0];
23
+ }
24
+ function getLuminance(rgb) {
25
+ const [r, g, b] = rgb.map((channel) => {
26
+ const c = channel / 255;
27
+ return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
28
+ });
29
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
30
+ }
31
+ function getContrastRatio(color1, color2) {
32
+ const lum1 = getLuminance(color1);
33
+ const lum2 = getLuminance(color2);
34
+ const brightest = Math.max(lum1, lum2);
35
+ const darkest = Math.min(lum1, lum2);
36
+ return (brightest + 0.05) / (darkest + 0.05);
37
+ }
38
+ function pickReadableTextColor(bgHex) {
39
+ const bg = hexToRgb(bgHex);
40
+ const darkContrast = getContrastRatio(bg, [26, 26, 26]);
41
+ const lightContrast = getContrastRatio(bg, [250, 250, 250]);
42
+ return darkContrast >= lightContrast ? "dark" : "light";
43
+ }
44
+ function extractDominantColor(canvas) {
45
+ const ctx = canvas.getContext("2d");
46
+ if (!ctx) return [128, 128, 128];
47
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
48
+ const data = imageData.data;
49
+ const sampleSize = Math.max(1, Math.floor(data.length / (4 * 1e3)));
50
+ const colorCounts = {};
51
+ for (let i = 0; i < data.length; i += 4 * sampleSize) {
52
+ const r = data[i];
53
+ const g = data[i + 1];
54
+ const b = data[i + 2];
55
+ const alpha = data[i + 3];
56
+ if (alpha < 128) continue;
57
+ const bucketR = Math.round(r / 32) * 32;
58
+ const bucketG = Math.round(g / 32) * 32;
59
+ const bucketB = Math.round(b / 32) * 32;
60
+ const key = `${bucketR},${bucketG},${bucketB}`;
61
+ colorCounts[key] = (colorCounts[key] || 0) + 1;
62
+ }
63
+ let maxCount = 0;
64
+ let dominantColor = [128, 128, 128];
65
+ for (const [colorKey, count] of Object.entries(colorCounts)) {
66
+ if (count > maxCount) {
67
+ maxCount = count;
68
+ const [r, g, b] = colorKey.split(",").map(Number);
69
+ dominantColor = [r, g, b];
70
+ }
71
+ }
72
+ return dominantColor;
73
+ }
74
+ function getBestContrastColor(imageColor) {
75
+ let bestColor = DESIGN_PALETTE[0];
76
+ let bestContrast = 0;
77
+ for (const color of DESIGN_PALETTE) {
78
+ const contrast = getContrastRatio(imageColor, color.rgb);
79
+ if (contrast > bestContrast) {
80
+ bestContrast = contrast;
81
+ bestColor = color;
82
+ }
83
+ }
84
+ return bestContrast >= 3 ? bestColor : DESIGN_PALETTE.find((c) => c.name === "black") || bestColor;
85
+ }
86
+ function analyzeImageColor(imageSrc) {
87
+ return new Promise((resolve, reject) => {
88
+ const img = new Image();
89
+ img.crossOrigin = "anonymous";
90
+ img.onload = () => {
91
+ try {
92
+ const canvas = document.createElement("canvas");
93
+ const ctx = canvas.getContext("2d");
94
+ if (!ctx) {
95
+ reject(new Error("Could not get canvas context"));
96
+ return;
97
+ }
98
+ const maxSize = 100;
99
+ const scale = Math.min(maxSize / img.width, maxSize / img.height);
100
+ canvas.width = img.width * scale;
101
+ canvas.height = img.height * scale;
102
+ ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
103
+ const dominantColor = extractDominantColor(canvas);
104
+ const bestContrastColor = getBestContrastColor(dominantColor);
105
+ resolve(bestContrastColor);
106
+ } catch (error) {
107
+ reject(error);
108
+ }
109
+ };
110
+ img.onerror = () => reject(new Error("Failed to load image"));
111
+ img.src = imageSrc;
112
+ });
113
+ }
114
+ async function extractImageEdgeColorAsync(imageUrl) {
115
+ return new Promise((resolve) => {
116
+ if (typeof window === "undefined") {
117
+ resolve("#000000");
118
+ return;
119
+ }
120
+ const img = new Image();
121
+ img.crossOrigin = "anonymous";
122
+ img.onload = () => {
123
+ try {
124
+ const canvas = document.createElement("canvas");
125
+ const ctx = canvas.getContext("2d");
126
+ if (!ctx) {
127
+ resolve("#000000");
128
+ return;
129
+ }
130
+ const maxSize = 50;
131
+ const scale = Math.min(maxSize / img.naturalWidth, maxSize / img.naturalHeight);
132
+ const w = Math.round(img.naturalWidth * scale);
133
+ const h = Math.round(img.naturalHeight * scale);
134
+ canvas.width = w;
135
+ canvas.height = h;
136
+ ctx.drawImage(img, 0, 0, w, h);
137
+ const data = ctx.getImageData(0, 0, w, h).data;
138
+ const edgeW = Math.max(2, Math.round(w * 0.15));
139
+ const edgeH = Math.max(2, Math.round(h * 0.15));
140
+ const bucketSize = 32;
141
+ const buckets = /* @__PURE__ */ new Map();
142
+ for (let y = 0; y < h; y++) {
143
+ for (let x = 0; x < w; x++) {
144
+ if (!(x < edgeW || x >= w - edgeW || y < edgeH || y >= h - edgeH)) continue;
145
+ const i = (y * w + x) * 4;
146
+ if (data[i + 3] < 128) continue;
147
+ const br = Math.floor(data[i] / bucketSize) * bucketSize;
148
+ const bg = Math.floor(data[i + 1] / bucketSize) * bucketSize;
149
+ const bb = Math.floor(data[i + 2] / bucketSize) * bucketSize;
150
+ const key = `${br},${bg},${bb}`;
151
+ const existing = buckets.get(key);
152
+ if (existing) {
153
+ existing.r += data[i];
154
+ existing.g += data[i + 1];
155
+ existing.b += data[i + 2];
156
+ existing.count++;
157
+ } else {
158
+ buckets.set(key, { r: data[i], g: data[i + 1], b: data[i + 2], count: 1 });
159
+ }
160
+ }
161
+ }
162
+ let best = { r: 0, g: 0, b: 0, count: 0 };
163
+ for (const b2 of buckets.values()) {
164
+ if (b2.count > best.count) best = b2;
165
+ }
166
+ if (best.count === 0) {
167
+ resolve("#000000");
168
+ return;
169
+ }
170
+ const r = Math.round(best.r / best.count), g = Math.round(best.g / best.count), b = Math.round(best.b / best.count);
171
+ resolve(
172
+ `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`
173
+ );
174
+ } catch (e) {
175
+ resolve("#000000");
176
+ }
177
+ };
178
+ img.onerror = () => resolve("#000000");
179
+ img.src = imageUrl;
180
+ });
181
+ }
182
+
183
+ // src/utils/ods-color-tokens-stub.ts
184
+ var colorTokens = {
185
+ primary: "#FFC008",
186
+ secondary: "#161616",
187
+ background: "#FAFAFA",
188
+ surface: "#FFFFFF",
189
+ text: {
190
+ primary: "#161616",
191
+ secondary: "#666666",
192
+ inverse: "#FFFFFF"
193
+ },
194
+ border: "#E5E5E5"
195
+ };
196
+
197
+ // src/utils/ods-color-utils.ts
198
+ var TOKEN_MAP = colorTokens;
199
+ function lookupToken(tokenKey) {
200
+ const value = TOKEN_MAP[tokenKey];
201
+ return typeof value === "string" ? value : void 0;
202
+ }
203
+ function getODSToken(category, color, variant = "base") {
204
+ const tokenKey = `${category}-${color}-${variant}`;
205
+ return lookupToken(tokenKey);
206
+ }
207
+ function getCurrentPlatform() {
208
+ if (typeof window === "undefined") {
209
+ return process.env.NEXT_PUBLIC_APP_TYPE || "openmsp";
210
+ }
211
+ const domPlatform = document.documentElement.getAttribute("data-app-type");
212
+ if (domPlatform) {
213
+ return domPlatform;
214
+ }
215
+ return process.env.NEXT_PUBLIC_APP_TYPE || "openmsp";
216
+ }
217
+ function switchPlatformTheme(platform) {
218
+ if (typeof window === "undefined") return;
219
+ const root = document.documentElement;
220
+ root.setAttribute("data-app-type", platform);
221
+ window.dispatchEvent(
222
+ new CustomEvent("platformThemeChanged", {
223
+ detail: { platform }
224
+ })
225
+ );
226
+ }
227
+ function getSemanticColor(semanticName, platform) {
228
+ if (typeof window === "undefined") return void 0;
229
+ const currentPlatform = platform || getCurrentPlatform();
230
+ const originalPlatform = getCurrentPlatform();
231
+ if (currentPlatform !== originalPlatform) {
232
+ switchPlatformTheme(currentPlatform);
233
+ }
234
+ const testElement = document.createElement("div");
235
+ document.body.appendChild(testElement);
236
+ const computedStyle = getComputedStyle(testElement);
237
+ const colorValue = computedStyle.getPropertyValue(`--color-${semanticName}`);
238
+ document.body.removeChild(testElement);
239
+ if (currentPlatform !== originalPlatform) {
240
+ switchPlatformTheme(originalPlatform);
241
+ }
242
+ return colorValue.trim() || void 0;
243
+ }
244
+ function getPlatformConfig(platform) {
245
+ const currentPlatform = platform || getCurrentPlatform();
246
+ const isDarkTheme = _chunkFICJS5OAcjs.PLATFORM_THEME === "dark";
247
+ return {
248
+ platform: currentPlatform,
249
+ accentColor: _chunkFICJS5OAcjs.getPlatformAccentColor.call(void 0, currentPlatform),
250
+ isDarkTheme,
251
+ isLightTheme: !isDarkTheme,
252
+ brandName: _chunkFICJS5OAcjs.getPlatformDisplayName.call(void 0, currentPlatform)
253
+ };
254
+ }
255
+ function usePlatformColors(platform) {
256
+ const currentPlatform = platform || getCurrentPlatform();
257
+ const config = getPlatformConfig(currentPlatform);
258
+ return {
259
+ platform: currentPlatform,
260
+ accentColor: config.accentColor,
261
+ isDarkTheme: config.isDarkTheme,
262
+ isLightTheme: config.isLightTheme,
263
+ brandName: config.brandName,
264
+ getToken: (category, color, variant) => getODSToken(category, color, variant),
265
+ switchTheme: (newPlatform) => switchPlatformTheme(newPlatform),
266
+ getSemanticColor: (semanticName) => getSemanticColor(semanticName, currentPlatform)
267
+ };
268
+ }
269
+ function getReadableTextColor(hex) {
270
+ return pickReadableTextColor(hex) === "dark" ? "#212121" : "#fafafa";
271
+ }
272
+ var HEX_PATTERN = /^#[0-9a-fA-F]{6}$/;
273
+ function hexToRgb2(hex) {
274
+ if (!HEX_PATTERN.test(hex)) return null;
275
+ const n = Number.parseInt(hex.slice(1), 16);
276
+ return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
277
+ }
278
+ function rgbToHex(r, g, b) {
279
+ const to = (n) => _chunkPX7FY655cjs.clamp.call(void 0, Math.round(n), 0, 255).toString(16).padStart(2, "0");
280
+ return `#${to(r)}${to(g)}${to(b)}`;
281
+ }
282
+ var HOVER_DARKEN_STEP = 10;
283
+ var ACTIVE_DARKEN_STEP = 20;
284
+ function darkenByStep(hex, step) {
285
+ const rgb = hexToRgb2(hex);
286
+ if (!rgb) return hex;
287
+ return rgbToHex(rgb.r - step, rgb.g - step, rgb.b - step);
288
+ }
289
+ function deriveHoverColor(hex) {
290
+ return darkenByStep(hex, HOVER_DARKEN_STEP);
291
+ }
292
+ function deriveActiveColor(hex) {
293
+ return darkenByStep(hex, ACTIVE_DARKEN_STEP);
294
+ }
295
+ function rgbToHsl(r, g, b) {
296
+ const rn = r / 255;
297
+ const gn = g / 255;
298
+ const bn = b / 255;
299
+ const max = Math.max(rn, gn, bn);
300
+ const min = Math.min(rn, gn, bn);
301
+ const l = (max + min) / 2;
302
+ if (max === min) return { h: 0, s: 0, l: Math.round(l * 100) };
303
+ const d = max - min;
304
+ const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
305
+ let h;
306
+ if (max === rn) h = (gn - bn) / d + (gn < bn ? 6 : 0);
307
+ else if (max === gn) h = (bn - rn) / d + 2;
308
+ else h = (rn - gn) / d + 4;
309
+ h *= 60;
310
+ return { h: Math.round(h), s: Math.round(s * 100), l: Math.round(l * 100) };
311
+ }
312
+ function hslToRgb(h, s, l) {
313
+ const sn = _chunkPX7FY655cjs.clamp.call(void 0, s, 0, 100) / 100;
314
+ const ln = _chunkPX7FY655cjs.clamp.call(void 0, l, 0, 100) / 100;
315
+ const hn = (h % 360 + 360) % 360;
316
+ if (sn === 0) {
317
+ const v = Math.round(ln * 255);
318
+ return { r: v, g: v, b: v };
319
+ }
320
+ const q = ln < 0.5 ? ln * (1 + sn) : ln + sn - ln * sn;
321
+ const p = 2 * ln - q;
322
+ const hue2rgb = (t) => {
323
+ let tn = t;
324
+ if (tn < 0) tn += 1;
325
+ if (tn > 1) tn -= 1;
326
+ if (tn < 1 / 6) return p + (q - p) * 6 * tn;
327
+ if (tn < 1 / 2) return q;
328
+ if (tn < 2 / 3) return p + (q - p) * (2 / 3 - tn) * 6;
329
+ return p;
330
+ };
331
+ const hk = hn / 360;
332
+ return {
333
+ r: Math.round(hue2rgb(hk + 1 / 3) * 255),
334
+ g: Math.round(hue2rgb(hk) * 255),
335
+ b: Math.round(hue2rgb(hk - 1 / 3) * 255)
336
+ };
337
+ }
338
+
339
+ // src/components/agent-identity.tsx
340
+ var _react = require('react');
341
+ var _jsxruntime = require('react/jsx-runtime');
342
+ var AGENT_GLYPH_COLOR = "var(--color-text-primary)";
343
+ var AGENT_PICTURE_CLASS = "rounded-full object-cover";
344
+ var AgentIdentityContext = _react.createContext.call(void 0, null);
345
+ function Provide({ icons, children }) {
346
+ const bySlug = _react.useMemo.call(void 0, () => {
347
+ const map = /* @__PURE__ */ new Map();
348
+ for (const [slug, icon] of Object.entries(_nullishCoalesce(icons, () => ( {})))) if (icon) map.set(slug, icon);
349
+ return map;
350
+ }, [icons]);
351
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AgentIdentityContext.Provider, { value: bySlug, children });
352
+ }
353
+ function ProvideFromServer({
354
+ endpoint,
355
+ enabled,
356
+ children
357
+ }) {
358
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Provide, { icons: _chunkPX7FY655cjs.useAgentIdentities.call(void 0, endpoint, enabled), children });
359
+ }
360
+ function AgentIdentityProvider({
361
+ icons,
362
+ endpoint = _chunkPX7FY655cjs.AGENT_IDENTITIES_API_PATH,
363
+ enabled = true,
364
+ children
365
+ }) {
366
+ if (icons) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Provide, { icons, children });
367
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProvideFromServer, { endpoint, enabled, children });
368
+ }
369
+ function useAgentIdentityIcon(slug) {
370
+ const identities = _react.useContext.call(void 0, AgentIdentityContext);
371
+ const unprovided = !identities && Boolean(slug);
372
+ _react.useEffect.call(void 0, () => {
373
+ if (!unprovided || process.env.NODE_ENV === "production") return;
374
+ console.error(
375
+ `[AgentIdentity] the mark of "${slug}" was asked for with no <AgentIdentityProvider> above it: agents are drawn from their server identities only, so mount the provider once at the root.`
376
+ );
377
+ }, [unprovided, slug]);
378
+ return _optionalChain([identities, 'optionalAccess', _2 => _2.get, 'call', _3 => _3(_nullishCoalesce(slug, () => ( "")))]);
379
+ }
380
+ function useAgentAccents() {
381
+ const identities = _react.useContext.call(void 0, AgentIdentityContext);
382
+ return _react.useCallback.call(void 0,
383
+ (slug) => {
384
+ const accent = _optionalChain([identities, 'optionalAccess', _4 => _4.get, 'call', _5 => _5(_nullishCoalesce(slug, () => ( ""))), 'optionalAccess', _6 => _6.accent]);
385
+ return typeof accent === "string" && HEX_PATTERN.test(accent) ? accent : void 0;
386
+ },
387
+ [identities]
388
+ );
389
+ }
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.AGENT_GLYPH_COLOR = AGENT_GLYPH_COLOR; exports.AGENT_PICTURE_CLASS = AGENT_PICTURE_CLASS; exports.AgentIdentityProvider = AgentIdentityProvider; exports.useAgentIdentityIcon = useAgentIdentityIcon; exports.useAgentAccents = useAgentAccents;
@@ -634,6 +634,12 @@ var ICON_ALIASES = {
634
634
  rocket: ROCKET,
635
635
  video: { set: "VideoRecorderIcon" },
636
636
  headphones: { set: "HeadphoneIcon" },
637
+ // The two LLM brands offered by `ICON_OPTIONS`. Their brand-colored glyphs
638
+ // are the only picker entries that hardcode a fill (#000 / #D97757), so they
639
+ // ignored the chip accent and sat black and orange in a cyan grid; the grey
640
+ // variants fill with `currentColor` like every other brand logo here.
641
+ "openai-logo": { set: "OpenaiLogoGreyIcon" },
642
+ "anthropic-logo": { set: "AnthropicLogoGreyIcon" },
637
643
  // Figma-canonical aliases (node 7363:205938) — kept for Storybook
638
644
  // fixtures and any older feed entries still using the long names.
639
645
  "clickup-logo": CLICKUP_GREY,