@refraction-ui/react 0.18.2 → 0.18.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.
- package/dist/dist-IBD7CHHX.js +649 -0
- package/dist/dist-IBD7CHHX.js.map +1 -0
- package/dist/index.cjs +3712 -1306
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1727 -72
- package/dist/index.js.map +1 -1
- package/dist/internal/ai/index.d.cts +111 -0
- package/dist/internal/ai/index.d.ts +111 -0
- package/dist/internal/charts/index.d.cts +95 -0
- package/dist/internal/charts/index.d.ts +95 -0
- package/dist/internal/command-input/index.d.cts +41 -0
- package/dist/internal/command-input/index.d.ts +41 -0
- package/dist/internal/diff-viewer/index.d.cts +118 -0
- package/dist/internal/diff-viewer/index.d.ts +118 -0
- package/dist/internal/react-ai/index.d.cts +59 -0
- package/dist/internal/react-ai/index.d.ts +59 -0
- package/dist/internal/react-charts/index.d.cts +108 -0
- package/dist/internal/react-charts/index.d.ts +108 -0
- package/dist/internal/react-command-input/index.d.cts +21 -0
- package/dist/internal/react-command-input/index.d.ts +21 -0
- package/dist/internal/react-diff-viewer/index.d.cts +45 -0
- package/dist/internal/react-diff-viewer/index.d.ts +45 -0
- package/dist/internal/react-dropdown-menu/index.d.cts +5 -0
- package/dist/internal/react-dropdown-menu/index.d.ts +5 -0
- package/dist/internal/react-feedback-dialog/index.d.cts +5 -19
- package/dist/internal/react-feedback-dialog/index.d.ts +5 -19
- package/dist/internal/react-location-selector/index.d.cts +14 -0
- package/dist/internal/react-location-selector/index.d.ts +14 -0
- package/dist/theme.cjs +10 -10
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js +10 -10
- package/dist/theme.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { cn, devWarn, cva, generateId, prefersReducedMotion, createKeyboardHandler, Keys, createMachine } from './chunk-4A4BW3GR.js';
|
|
3
3
|
export { createFaroSink } from './chunk-XWP763SH.js';
|
|
4
4
|
import * as React23 from 'react';
|
|
5
|
+
import { createContext, forwardRef, useRef, useState, useEffect, useContext } from 'react';
|
|
5
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
7
|
import * as ReactDOM from 'react-dom';
|
|
7
8
|
import { createPortal } from 'react-dom';
|
|
@@ -124,6 +125,250 @@ var AccordionContent = React23.forwardRef(
|
|
|
124
125
|
);
|
|
125
126
|
AccordionContent.displayName = "AccordionContent";
|
|
126
127
|
|
|
128
|
+
// ../ai/dist/index.js
|
|
129
|
+
function createAI(config) {
|
|
130
|
+
const providers = /* @__PURE__ */ new Map();
|
|
131
|
+
const providerOrder = [];
|
|
132
|
+
const defaultProvider = config?.default;
|
|
133
|
+
const fallbackChain = config?.fallback ?? [];
|
|
134
|
+
const router = config?.router;
|
|
135
|
+
function resolveProvider(opts) {
|
|
136
|
+
if (opts?.provider) {
|
|
137
|
+
const p = providers.get(opts.provider);
|
|
138
|
+
if (!p) {
|
|
139
|
+
throw new Error(`AI provider "${opts.provider}" not found. Registered providers: [${providerOrder.join(", ")}]`);
|
|
140
|
+
}
|
|
141
|
+
return p;
|
|
142
|
+
}
|
|
143
|
+
if (router) {
|
|
144
|
+
const chosen = router(opts ?? {}, {
|
|
145
|
+
providers: [...providerOrder],
|
|
146
|
+
default: defaultProvider ?? providerOrder[0] ?? ""
|
|
147
|
+
});
|
|
148
|
+
const p = providers.get(chosen);
|
|
149
|
+
if (p) return p;
|
|
150
|
+
}
|
|
151
|
+
if (defaultProvider) {
|
|
152
|
+
const p = providers.get(defaultProvider);
|
|
153
|
+
if (!p) {
|
|
154
|
+
throw new Error(`Default AI provider "${defaultProvider}" not registered. Registered providers: [${providerOrder.join(", ")}]`);
|
|
155
|
+
}
|
|
156
|
+
return p;
|
|
157
|
+
}
|
|
158
|
+
if (providerOrder.length === 0) {
|
|
159
|
+
throw new Error("No AI providers configured. Call addProvider() to register at least one provider.");
|
|
160
|
+
}
|
|
161
|
+
return providers.get(providerOrder[0]);
|
|
162
|
+
}
|
|
163
|
+
async function withFallback(primary, fn) {
|
|
164
|
+
try {
|
|
165
|
+
return await fn(primary);
|
|
166
|
+
} catch (error) {
|
|
167
|
+
for (const name of fallbackChain) {
|
|
168
|
+
const fallback = providers.get(name);
|
|
169
|
+
if (!fallback || fallback === primary) continue;
|
|
170
|
+
try {
|
|
171
|
+
return await fn(fallback);
|
|
172
|
+
} catch {
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (fallbackChain.length > 0) {
|
|
176
|
+
const lastFallbackName = fallbackChain[fallbackChain.length - 1];
|
|
177
|
+
const lastFallback = providers.get(lastFallbackName);
|
|
178
|
+
if (lastFallback && lastFallback !== primary) {
|
|
179
|
+
return await fn(lastFallback);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const api = {
|
|
186
|
+
get providers() {
|
|
187
|
+
return [...providerOrder];
|
|
188
|
+
},
|
|
189
|
+
async generateText(prompt, opts) {
|
|
190
|
+
const provider = resolveProvider(opts);
|
|
191
|
+
return withFallback(provider, (p) => p.generateText(prompt, opts));
|
|
192
|
+
},
|
|
193
|
+
async generateJSON(prompt, opts) {
|
|
194
|
+
const provider = resolveProvider(opts);
|
|
195
|
+
return withFallback(provider, (p) => p.generateJSON(prompt, opts));
|
|
196
|
+
},
|
|
197
|
+
addProvider(name, provider) {
|
|
198
|
+
if (providers.has(name)) {
|
|
199
|
+
providers.set(name, provider);
|
|
200
|
+
} else {
|
|
201
|
+
providers.set(name, provider);
|
|
202
|
+
providerOrder.push(name);
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
removeProvider(name) {
|
|
206
|
+
if (providers.has(name)) {
|
|
207
|
+
providers.delete(name);
|
|
208
|
+
const idx = providerOrder.indexOf(name);
|
|
209
|
+
if (idx !== -1) providerOrder.splice(idx, 1);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
return api;
|
|
214
|
+
}
|
|
215
|
+
function createTTS(config) {
|
|
216
|
+
const providers = /* @__PURE__ */ new Map();
|
|
217
|
+
const providerOrder = [];
|
|
218
|
+
const defaultProvider = config?.default;
|
|
219
|
+
const router = config?.router;
|
|
220
|
+
function resolveProvider(opts) {
|
|
221
|
+
if (opts?.provider) {
|
|
222
|
+
const p = providers.get(opts.provider);
|
|
223
|
+
if (!p) {
|
|
224
|
+
throw new Error(`TTS provider "${opts.provider}" not found. Registered providers: [${providerOrder.join(", ")}]`);
|
|
225
|
+
}
|
|
226
|
+
return p;
|
|
227
|
+
}
|
|
228
|
+
if (router) {
|
|
229
|
+
const chosen = router(opts ?? {}, {
|
|
230
|
+
providers: [...providerOrder],
|
|
231
|
+
default: defaultProvider ?? providerOrder[0] ?? ""
|
|
232
|
+
});
|
|
233
|
+
const p = providers.get(chosen);
|
|
234
|
+
if (p) return p;
|
|
235
|
+
}
|
|
236
|
+
if (defaultProvider) {
|
|
237
|
+
const p = providers.get(defaultProvider);
|
|
238
|
+
if (!p) {
|
|
239
|
+
throw new Error(`Default TTS provider "${defaultProvider}" not registered. Registered providers: [${providerOrder.join(", ")}]`);
|
|
240
|
+
}
|
|
241
|
+
return p;
|
|
242
|
+
}
|
|
243
|
+
if (providerOrder.length === 0) {
|
|
244
|
+
throw new Error("No TTS providers configured. Call addProvider() to register at least one provider.");
|
|
245
|
+
}
|
|
246
|
+
return providers.get(providerOrder[0]);
|
|
247
|
+
}
|
|
248
|
+
const api = {
|
|
249
|
+
get providers() {
|
|
250
|
+
return [...providerOrder];
|
|
251
|
+
},
|
|
252
|
+
speak(text, opts) {
|
|
253
|
+
const provider = resolveProvider(opts);
|
|
254
|
+
provider.speak(text, opts);
|
|
255
|
+
},
|
|
256
|
+
stop() {
|
|
257
|
+
for (const name of providerOrder) {
|
|
258
|
+
const p = providers.get(name);
|
|
259
|
+
if (p) p.stop();
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
addProvider(name, provider) {
|
|
263
|
+
if (providers.has(name)) {
|
|
264
|
+
providers.set(name, provider);
|
|
265
|
+
} else {
|
|
266
|
+
providers.set(name, provider);
|
|
267
|
+
providerOrder.push(name);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
return api;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// ../react-ai/dist/index.js
|
|
275
|
+
var AIContext = React23.createContext(null);
|
|
276
|
+
function AIProvider({ children, providers: providerMap, ...config }) {
|
|
277
|
+
const aiRef = React23.useRef(null);
|
|
278
|
+
if (!aiRef.current) {
|
|
279
|
+
aiRef.current = createAI(config);
|
|
280
|
+
if (providerMap) {
|
|
281
|
+
for (const [name, provider] of Object.entries(providerMap)) {
|
|
282
|
+
aiRef.current.addProvider(name, provider);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const [isGenerating, setIsGenerating] = React23.useState(false);
|
|
287
|
+
const [providerNames, setProviderNames] = React23.useState(() => aiRef.current.providers);
|
|
288
|
+
const value = React23.useMemo(
|
|
289
|
+
() => ({
|
|
290
|
+
generateText: async (prompt, opts) => {
|
|
291
|
+
setIsGenerating(true);
|
|
292
|
+
try {
|
|
293
|
+
return await aiRef.current.generateText(prompt, opts);
|
|
294
|
+
} finally {
|
|
295
|
+
setIsGenerating(false);
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
generateJSON: async (prompt, opts) => {
|
|
299
|
+
setIsGenerating(true);
|
|
300
|
+
try {
|
|
301
|
+
return await aiRef.current.generateJSON(prompt, opts);
|
|
302
|
+
} finally {
|
|
303
|
+
setIsGenerating(false);
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
providers: providerNames,
|
|
307
|
+
isGenerating
|
|
308
|
+
}),
|
|
309
|
+
[providerNames, isGenerating]
|
|
310
|
+
);
|
|
311
|
+
return React23.createElement(AIContext.Provider, { value }, children);
|
|
312
|
+
}
|
|
313
|
+
function useAI() {
|
|
314
|
+
const ctx = React23.useContext(AIContext);
|
|
315
|
+
if (!ctx) {
|
|
316
|
+
devWarn(
|
|
317
|
+
"react-ai/use-ai-outside-provider",
|
|
318
|
+
"useAI() was called outside an <AIProvider>. Wrap your app (or the consuming subtree) in <AIProvider> so the AI context is available."
|
|
319
|
+
);
|
|
320
|
+
throw new Error("useAI must be used within an <AIProvider>");
|
|
321
|
+
}
|
|
322
|
+
return ctx;
|
|
323
|
+
}
|
|
324
|
+
var TTSContext = React23.createContext(null);
|
|
325
|
+
function TTSProvider({ children, providers: providerMap, ...config }) {
|
|
326
|
+
const ttsRef = React23.useRef(null);
|
|
327
|
+
if (!ttsRef.current) {
|
|
328
|
+
ttsRef.current = createTTS(config);
|
|
329
|
+
if (providerMap) {
|
|
330
|
+
for (const [name, provider] of Object.entries(providerMap)) {
|
|
331
|
+
ttsRef.current.addProvider(name, provider);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const [isSpeaking, setIsSpeaking] = React23.useState(false);
|
|
336
|
+
const [providerNames] = React23.useState(() => ttsRef.current.providers);
|
|
337
|
+
const value = React23.useMemo(
|
|
338
|
+
() => ({
|
|
339
|
+
speak: (text, opts) => {
|
|
340
|
+
setIsSpeaking(true);
|
|
341
|
+
ttsRef.current.speak(text, {
|
|
342
|
+
...opts,
|
|
343
|
+
onEnd: () => {
|
|
344
|
+
setIsSpeaking(false);
|
|
345
|
+
opts?.onEnd?.();
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
},
|
|
349
|
+
stop: () => {
|
|
350
|
+
ttsRef.current.stop();
|
|
351
|
+
setIsSpeaking(false);
|
|
352
|
+
},
|
|
353
|
+
isSpeaking,
|
|
354
|
+
providers: providerNames
|
|
355
|
+
}),
|
|
356
|
+
[isSpeaking, providerNames]
|
|
357
|
+
);
|
|
358
|
+
return React23.createElement(TTSContext.Provider, { value }, children);
|
|
359
|
+
}
|
|
360
|
+
function useTTS() {
|
|
361
|
+
const ctx = React23.useContext(TTSContext);
|
|
362
|
+
if (!ctx) {
|
|
363
|
+
devWarn(
|
|
364
|
+
"react-ai/use-tts-outside-provider",
|
|
365
|
+
"useTTS() was called outside a <TTSProvider>. Wrap your app (or the consuming subtree) in <TTSProvider> so the TTS context is available."
|
|
366
|
+
);
|
|
367
|
+
throw new Error("useTTS must be used within a <TTSProvider>");
|
|
368
|
+
}
|
|
369
|
+
return ctx;
|
|
370
|
+
}
|
|
371
|
+
|
|
127
372
|
// ../animated-text/dist/index.js
|
|
128
373
|
function createAnimatedText(props) {
|
|
129
374
|
const { words } = props;
|
|
@@ -1411,6 +1656,475 @@ function CalendarHeader({
|
|
|
1411
1656
|
}
|
|
1412
1657
|
CalendarHeader.displayName = "CalendarHeader";
|
|
1413
1658
|
|
|
1659
|
+
// ../charts/dist/index.js
|
|
1660
|
+
function createLinearScale(domain, range) {
|
|
1661
|
+
const [d0, d1] = domain;
|
|
1662
|
+
const [r0, r1] = range;
|
|
1663
|
+
const domainSpan = d1 - d0;
|
|
1664
|
+
const rangeSpan = r1 - r0;
|
|
1665
|
+
const scale = ((value) => {
|
|
1666
|
+
if (domainSpan === 0) return r0;
|
|
1667
|
+
return r0 + (value - d0) / domainSpan * rangeSpan;
|
|
1668
|
+
});
|
|
1669
|
+
scale.invert = (value) => {
|
|
1670
|
+
if (rangeSpan === 0) return d0;
|
|
1671
|
+
return d0 + (value - r0) / rangeSpan * domainSpan;
|
|
1672
|
+
};
|
|
1673
|
+
scale.ticks = (count = 10) => {
|
|
1674
|
+
if (count <= 0) return [];
|
|
1675
|
+
const ticks = [];
|
|
1676
|
+
for (let i = 0; i < count; i++) {
|
|
1677
|
+
ticks.push(d0 + domainSpan * i / (count - 1 || 1));
|
|
1678
|
+
}
|
|
1679
|
+
return ticks;
|
|
1680
|
+
};
|
|
1681
|
+
scale.type = "linear";
|
|
1682
|
+
scale.domain = domain;
|
|
1683
|
+
scale.range = range;
|
|
1684
|
+
return scale;
|
|
1685
|
+
}
|
|
1686
|
+
function createBandScale(domain, range, padding = 0) {
|
|
1687
|
+
const [r0, r1] = range;
|
|
1688
|
+
const rangeSpan = r1 - r0;
|
|
1689
|
+
const n = domain.length;
|
|
1690
|
+
let step = 0;
|
|
1691
|
+
let bw = 0;
|
|
1692
|
+
if (n > 0) {
|
|
1693
|
+
if (n === 1) {
|
|
1694
|
+
bw = rangeSpan;
|
|
1695
|
+
step = rangeSpan;
|
|
1696
|
+
} else {
|
|
1697
|
+
step = n > 0 ? rangeSpan / (n - padding) : 0;
|
|
1698
|
+
bw = step * (1 - padding);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
const indexMap = /* @__PURE__ */ new Map();
|
|
1702
|
+
domain.forEach((d, i) => indexMap.set(d, i));
|
|
1703
|
+
const scale = ((value) => {
|
|
1704
|
+
const idx = indexMap.get(value);
|
|
1705
|
+
if (idx === void 0) return 0;
|
|
1706
|
+
return r0 + idx * step;
|
|
1707
|
+
});
|
|
1708
|
+
scale.bandwidth = () => {
|
|
1709
|
+
return Math.max(0, bw);
|
|
1710
|
+
};
|
|
1711
|
+
scale.type = "band";
|
|
1712
|
+
scale.domain = domain;
|
|
1713
|
+
scale.range = range;
|
|
1714
|
+
return scale;
|
|
1715
|
+
}
|
|
1716
|
+
function computeExtent(data) {
|
|
1717
|
+
let min = data[0];
|
|
1718
|
+
let max = data[0];
|
|
1719
|
+
for (let i = 1; i < data.length; i++) {
|
|
1720
|
+
if (data[i] < min) min = data[i];
|
|
1721
|
+
if (data[i] > max) max = data[i];
|
|
1722
|
+
}
|
|
1723
|
+
return [min, max];
|
|
1724
|
+
}
|
|
1725
|
+
function computeHistogramBins(data, binCount) {
|
|
1726
|
+
const count = binCount ?? Math.ceil(Math.sqrt(data.length));
|
|
1727
|
+
const [min, max] = computeExtent(data);
|
|
1728
|
+
const span = max - min;
|
|
1729
|
+
if (span === 0) {
|
|
1730
|
+
const bins2 = [];
|
|
1731
|
+
for (let i = 0; i < count; i++) {
|
|
1732
|
+
bins2.push({ x0: min, x1: max, count: 0 });
|
|
1733
|
+
}
|
|
1734
|
+
bins2[0].count = data.length;
|
|
1735
|
+
return bins2;
|
|
1736
|
+
}
|
|
1737
|
+
const binWidth = span / count;
|
|
1738
|
+
const bins = [];
|
|
1739
|
+
for (let i = 0; i < count; i++) {
|
|
1740
|
+
bins.push({
|
|
1741
|
+
x0: min + i * binWidth,
|
|
1742
|
+
x1: min + (i + 1) * binWidth,
|
|
1743
|
+
count: 0
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
for (const value of data) {
|
|
1747
|
+
let idx = Math.floor((value - min) / binWidth);
|
|
1748
|
+
if (idx >= count) idx = count - 1;
|
|
1749
|
+
bins[idx].count++;
|
|
1750
|
+
}
|
|
1751
|
+
return bins;
|
|
1752
|
+
}
|
|
1753
|
+
function linePath(points) {
|
|
1754
|
+
if (points.length === 0) return "";
|
|
1755
|
+
let d = `M${points[0].x},${points[0].y}`;
|
|
1756
|
+
for (let i = 1; i < points.length; i++) {
|
|
1757
|
+
d += `L${points[i].x},${points[i].y}`;
|
|
1758
|
+
}
|
|
1759
|
+
return d;
|
|
1760
|
+
}
|
|
1761
|
+
function arcPath(cx, cy, radius, startAngle, endAngle) {
|
|
1762
|
+
const x1 = cx + radius * Math.cos(startAngle);
|
|
1763
|
+
const y1 = cy + radius * Math.sin(startAngle);
|
|
1764
|
+
const x2 = cx + radius * Math.cos(endAngle);
|
|
1765
|
+
const y2 = cy + radius * Math.sin(endAngle);
|
|
1766
|
+
const largeArcFlag = endAngle - startAngle > Math.PI ? 1 : 0;
|
|
1767
|
+
const r = (n) => Math.round(n * 1e6) / 1e6;
|
|
1768
|
+
let d = `M${r(x1)},${r(y1)}`;
|
|
1769
|
+
d += `A${radius},${radius} 0 ${largeArcFlag} 1 ${r(x2)},${r(y2)}`;
|
|
1770
|
+
d += `L${cx},${cy}`;
|
|
1771
|
+
d += "Z";
|
|
1772
|
+
return d;
|
|
1773
|
+
}
|
|
1774
|
+
var DEFAULT_MARGIN = {
|
|
1775
|
+
top: 40,
|
|
1776
|
+
right: 30,
|
|
1777
|
+
bottom: 40,
|
|
1778
|
+
left: 75
|
|
1779
|
+
};
|
|
1780
|
+
var DEFAULT_WIDTH = 600;
|
|
1781
|
+
var DEFAULT_HEIGHT = 400;
|
|
1782
|
+
function combineDimensions(partial) {
|
|
1783
|
+
const width = partial.width ?? DEFAULT_WIDTH;
|
|
1784
|
+
const height = partial.height ?? DEFAULT_HEIGHT;
|
|
1785
|
+
const margin = {
|
|
1786
|
+
...DEFAULT_MARGIN,
|
|
1787
|
+
...partial.margin ?? {}
|
|
1788
|
+
};
|
|
1789
|
+
const boundedWidth = Math.max(0, width - margin.left - margin.right);
|
|
1790
|
+
const boundedHeight = Math.max(0, height - margin.top - margin.bottom);
|
|
1791
|
+
return { width, height, margin, boundedWidth, boundedHeight };
|
|
1792
|
+
}
|
|
1793
|
+
function formatTick(value, type) {
|
|
1794
|
+
const num = value;
|
|
1795
|
+
if (!Number.isFinite(num)) return String(num);
|
|
1796
|
+
if (Number.isInteger(num)) {
|
|
1797
|
+
return num.toLocaleString("en-US", { maximumFractionDigits: 0 });
|
|
1798
|
+
}
|
|
1799
|
+
const formatted = num.toLocaleString("en-US", {
|
|
1800
|
+
minimumFractionDigits: 0,
|
|
1801
|
+
maximumFractionDigits: 2
|
|
1802
|
+
});
|
|
1803
|
+
return formatted;
|
|
1804
|
+
}
|
|
1805
|
+
var DEFAULT_MARGIN2 = { top: 40, right: 30, bottom: 40, left: 75 };
|
|
1806
|
+
var ChartContext = createContext({
|
|
1807
|
+
__isDefault: true,
|
|
1808
|
+
dimensions: {
|
|
1809
|
+
width: 600,
|
|
1810
|
+
height: 400,
|
|
1811
|
+
margin: DEFAULT_MARGIN2,
|
|
1812
|
+
boundedWidth: 600 - DEFAULT_MARGIN2.left - DEFAULT_MARGIN2.right,
|
|
1813
|
+
boundedHeight: 400 - DEFAULT_MARGIN2.top - DEFAULT_MARGIN2.bottom
|
|
1814
|
+
}
|
|
1815
|
+
});
|
|
1816
|
+
function useChartContext() {
|
|
1817
|
+
const ctx = useContext(ChartContext);
|
|
1818
|
+
if (ctx.__isDefault) {
|
|
1819
|
+
devWarn(
|
|
1820
|
+
"react-charts/no-chart-provider",
|
|
1821
|
+
"A chart sub-component (Bars/Line/Circles/\u2026) was rendered without a <Chart> ancestor. It is silently falling back to default 600x400 dimensions and will render with the wrong scale. Wrap it in <Chart>\u2026</Chart>."
|
|
1822
|
+
);
|
|
1823
|
+
}
|
|
1824
|
+
return ctx;
|
|
1825
|
+
}
|
|
1826
|
+
function Chart({
|
|
1827
|
+
width = 600,
|
|
1828
|
+
height = 400,
|
|
1829
|
+
margin,
|
|
1830
|
+
children
|
|
1831
|
+
}) {
|
|
1832
|
+
const dimensions = combineDimensions({ width, height, margin });
|
|
1833
|
+
return /* @__PURE__ */ jsx("svg", { width, height, children: /* @__PURE__ */ jsx(ChartContext.Provider, { value: { dimensions }, children: /* @__PURE__ */ jsx("g", { transform: `translate(${dimensions.margin.left},${dimensions.margin.top})`, children }) }) });
|
|
1834
|
+
}
|
|
1835
|
+
function Bars({ data, x, y, fill = "currentColor" }) {
|
|
1836
|
+
const { dimensions } = useChartContext();
|
|
1837
|
+
const { boundedWidth, boundedHeight } = dimensions;
|
|
1838
|
+
const labels = data.map(x);
|
|
1839
|
+
const values = data.map(y);
|
|
1840
|
+
const [, maxVal] = computeExtent(values);
|
|
1841
|
+
const xScale = createBandScale(labels, [0, boundedWidth], 0.1);
|
|
1842
|
+
const yScale = createLinearScale([0, maxVal], [boundedHeight, 0]);
|
|
1843
|
+
return /* @__PURE__ */ jsx("g", { children: data.map((d, i) => {
|
|
1844
|
+
const label = labels[i];
|
|
1845
|
+
const value = values[i];
|
|
1846
|
+
const barX = xScale(label);
|
|
1847
|
+
const barY = yScale(value);
|
|
1848
|
+
const barHeight = boundedHeight - barY;
|
|
1849
|
+
const barWidth = xScale.bandwidth();
|
|
1850
|
+
return /* @__PURE__ */ jsx(
|
|
1851
|
+
"rect",
|
|
1852
|
+
{
|
|
1853
|
+
x: barX,
|
|
1854
|
+
y: barY,
|
|
1855
|
+
width: barWidth,
|
|
1856
|
+
height: barHeight,
|
|
1857
|
+
fill
|
|
1858
|
+
},
|
|
1859
|
+
i
|
|
1860
|
+
);
|
|
1861
|
+
}) });
|
|
1862
|
+
}
|
|
1863
|
+
function Line({
|
|
1864
|
+
data,
|
|
1865
|
+
x,
|
|
1866
|
+
y,
|
|
1867
|
+
stroke = "currentColor",
|
|
1868
|
+
strokeWidth = 2,
|
|
1869
|
+
fill = "none"
|
|
1870
|
+
}) {
|
|
1871
|
+
const { dimensions } = useChartContext();
|
|
1872
|
+
const { boundedWidth, boundedHeight } = dimensions;
|
|
1873
|
+
const xValues = data.map(x);
|
|
1874
|
+
const yValues = data.map(y);
|
|
1875
|
+
const [xMin, xMax] = computeExtent(xValues);
|
|
1876
|
+
const [yMin, yMax] = computeExtent(yValues);
|
|
1877
|
+
const xScale = createLinearScale([xMin, xMax], [0, boundedWidth]);
|
|
1878
|
+
const yScale = createLinearScale([yMin, yMax], [boundedHeight, 0]);
|
|
1879
|
+
const points = data.map((d2) => ({
|
|
1880
|
+
x: xScale(x(d2)),
|
|
1881
|
+
y: yScale(y(d2))
|
|
1882
|
+
}));
|
|
1883
|
+
const d = linePath(points);
|
|
1884
|
+
return /* @__PURE__ */ jsx(
|
|
1885
|
+
"path",
|
|
1886
|
+
{
|
|
1887
|
+
d,
|
|
1888
|
+
stroke,
|
|
1889
|
+
strokeWidth,
|
|
1890
|
+
fill
|
|
1891
|
+
}
|
|
1892
|
+
);
|
|
1893
|
+
}
|
|
1894
|
+
function Circles({
|
|
1895
|
+
data,
|
|
1896
|
+
cx,
|
|
1897
|
+
cy,
|
|
1898
|
+
r = 4,
|
|
1899
|
+
fill = "currentColor"
|
|
1900
|
+
}) {
|
|
1901
|
+
const { dimensions } = useChartContext();
|
|
1902
|
+
const { boundedWidth, boundedHeight } = dimensions;
|
|
1903
|
+
const xValues = data.map(cx);
|
|
1904
|
+
const yValues = data.map(cy);
|
|
1905
|
+
const [xMin, xMax] = computeExtent(xValues);
|
|
1906
|
+
const [yMin, yMax] = computeExtent(yValues);
|
|
1907
|
+
const xScale = createLinearScale([xMin, xMax], [0, boundedWidth]);
|
|
1908
|
+
const yScale = createLinearScale([yMin, yMax], [boundedHeight, 0]);
|
|
1909
|
+
return /* @__PURE__ */ jsx("g", { children: data.map((d, i) => /* @__PURE__ */ jsx(
|
|
1910
|
+
"circle",
|
|
1911
|
+
{
|
|
1912
|
+
cx: xScale(cx(d)),
|
|
1913
|
+
cy: yScale(cy(d)),
|
|
1914
|
+
r,
|
|
1915
|
+
fill
|
|
1916
|
+
},
|
|
1917
|
+
i
|
|
1918
|
+
)) });
|
|
1919
|
+
}
|
|
1920
|
+
function XAxis({
|
|
1921
|
+
ticks,
|
|
1922
|
+
scale,
|
|
1923
|
+
height,
|
|
1924
|
+
tickSize = 6
|
|
1925
|
+
}) {
|
|
1926
|
+
return /* @__PURE__ */ jsx("g", { transform: `translate(0,${height})`, children: ticks.map((tick, i) => {
|
|
1927
|
+
const x = scale(tick);
|
|
1928
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(${x},0)`, children: [
|
|
1929
|
+
/* @__PURE__ */ jsx("line", { y2: tickSize, stroke: "currentColor" }),
|
|
1930
|
+
/* @__PURE__ */ jsx(
|
|
1931
|
+
"text",
|
|
1932
|
+
{
|
|
1933
|
+
y: tickSize + 9,
|
|
1934
|
+
textAnchor: "middle",
|
|
1935
|
+
fontSize: 12,
|
|
1936
|
+
fill: "currentColor",
|
|
1937
|
+
children: String(tick)
|
|
1938
|
+
}
|
|
1939
|
+
)
|
|
1940
|
+
] }, i);
|
|
1941
|
+
}) });
|
|
1942
|
+
}
|
|
1943
|
+
function YAxis({
|
|
1944
|
+
ticks,
|
|
1945
|
+
scale,
|
|
1946
|
+
tickSize = 6
|
|
1947
|
+
}) {
|
|
1948
|
+
return /* @__PURE__ */ jsx("g", { children: ticks.map((tick, i) => {
|
|
1949
|
+
const y = scale(tick);
|
|
1950
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(0,${y})`, children: [
|
|
1951
|
+
/* @__PURE__ */ jsx("line", { x2: -tickSize, stroke: "currentColor" }),
|
|
1952
|
+
/* @__PURE__ */ jsx(
|
|
1953
|
+
"text",
|
|
1954
|
+
{
|
|
1955
|
+
x: -tickSize - 4,
|
|
1956
|
+
dy: "0.32em",
|
|
1957
|
+
textAnchor: "end",
|
|
1958
|
+
fontSize: 12,
|
|
1959
|
+
fill: "currentColor",
|
|
1960
|
+
children: String(tick)
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
] }, i);
|
|
1964
|
+
}) });
|
|
1965
|
+
}
|
|
1966
|
+
function Gradient({
|
|
1967
|
+
id,
|
|
1968
|
+
from,
|
|
1969
|
+
to,
|
|
1970
|
+
direction = "vertical"
|
|
1971
|
+
}) {
|
|
1972
|
+
const isVertical = direction === "vertical";
|
|
1973
|
+
return /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
1974
|
+
"linearGradient",
|
|
1975
|
+
{
|
|
1976
|
+
id,
|
|
1977
|
+
x1: "0",
|
|
1978
|
+
y1: "0",
|
|
1979
|
+
x2: isVertical ? "0" : "1",
|
|
1980
|
+
y2: isVertical ? "1" : "0",
|
|
1981
|
+
children: [
|
|
1982
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: from }),
|
|
1983
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: to })
|
|
1984
|
+
]
|
|
1985
|
+
}
|
|
1986
|
+
) });
|
|
1987
|
+
}
|
|
1988
|
+
function Histogram({
|
|
1989
|
+
data,
|
|
1990
|
+
width = 600,
|
|
1991
|
+
height = 400,
|
|
1992
|
+
bins: binCount = 10,
|
|
1993
|
+
fill = "steelblue",
|
|
1994
|
+
margin
|
|
1995
|
+
}) {
|
|
1996
|
+
const dimensions = combineDimensions({ width, height, margin });
|
|
1997
|
+
const { boundedWidth, boundedHeight } = dimensions;
|
|
1998
|
+
const histBins = computeHistogramBins(data, binCount);
|
|
1999
|
+
const maxCount = Math.max(...histBins.map((b) => b.count));
|
|
2000
|
+
const labels = histBins.map((b) => `${formatTick(b.x0)}-${formatTick(b.x1)}`);
|
|
2001
|
+
const xScale = createBandScale(labels, [0, boundedWidth], 0.05);
|
|
2002
|
+
const yScale = createLinearScale([0, maxCount], [boundedHeight, 0]);
|
|
2003
|
+
const yTicks = yScale.ticks(5);
|
|
2004
|
+
return /* @__PURE__ */ jsx("svg", { width, height, children: /* @__PURE__ */ jsxs("g", { transform: `translate(${dimensions.margin.left},${dimensions.margin.top})`, children: [
|
|
2005
|
+
histBins.map((bin, i) => {
|
|
2006
|
+
const label = labels[i];
|
|
2007
|
+
const barX = xScale(label);
|
|
2008
|
+
const barY = yScale(bin.count);
|
|
2009
|
+
const barHeight = boundedHeight - barY;
|
|
2010
|
+
const barWidth = xScale.bandwidth();
|
|
2011
|
+
return /* @__PURE__ */ jsx(
|
|
2012
|
+
"rect",
|
|
2013
|
+
{
|
|
2014
|
+
x: barX,
|
|
2015
|
+
y: barY,
|
|
2016
|
+
width: barWidth,
|
|
2017
|
+
height: barHeight,
|
|
2018
|
+
fill
|
|
2019
|
+
},
|
|
2020
|
+
i
|
|
2021
|
+
);
|
|
2022
|
+
}),
|
|
2023
|
+
/* @__PURE__ */ jsx("g", { transform: `translate(0,${boundedHeight})`, children: labels.map((label, i) => {
|
|
2024
|
+
const x = xScale(label) + xScale.bandwidth() / 2;
|
|
2025
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(${x},0)`, children: [
|
|
2026
|
+
/* @__PURE__ */ jsx("line", { y2: 6, stroke: "currentColor" }),
|
|
2027
|
+
/* @__PURE__ */ jsx("text", { y: 18, textAnchor: "middle", fontSize: 10, fill: "currentColor", children: label })
|
|
2028
|
+
] }, i);
|
|
2029
|
+
}) }),
|
|
2030
|
+
/* @__PURE__ */ jsx("g", { children: yTicks.map((tick, i) => {
|
|
2031
|
+
const y = yScale(tick);
|
|
2032
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(0,${y})`, children: [
|
|
2033
|
+
/* @__PURE__ */ jsx("line", { x2: -6, stroke: "currentColor" }),
|
|
2034
|
+
/* @__PURE__ */ jsx("text", { x: -9, dy: "0.32em", textAnchor: "end", fontSize: 10, fill: "currentColor", children: formatTick(tick) })
|
|
2035
|
+
] }, i);
|
|
2036
|
+
}) })
|
|
2037
|
+
] }) });
|
|
2038
|
+
}
|
|
2039
|
+
function ScatterPlot({
|
|
2040
|
+
data,
|
|
2041
|
+
x,
|
|
2042
|
+
y,
|
|
2043
|
+
width = 600,
|
|
2044
|
+
height = 400,
|
|
2045
|
+
r = 4,
|
|
2046
|
+
fill = "steelblue",
|
|
2047
|
+
margin
|
|
2048
|
+
}) {
|
|
2049
|
+
const dimensions = combineDimensions({ width, height, margin });
|
|
2050
|
+
const { boundedWidth, boundedHeight } = dimensions;
|
|
2051
|
+
const xValues = data.map(x);
|
|
2052
|
+
const yValues = data.map(y);
|
|
2053
|
+
const [xMin, xMax] = computeExtent(xValues);
|
|
2054
|
+
const [yMin, yMax] = computeExtent(yValues);
|
|
2055
|
+
const xScale = createLinearScale([xMin, xMax], [0, boundedWidth]);
|
|
2056
|
+
const yScale = createLinearScale([yMin, yMax], [boundedHeight, 0]);
|
|
2057
|
+
const xTicks = xScale.ticks(5);
|
|
2058
|
+
const yTicks = yScale.ticks(5);
|
|
2059
|
+
return /* @__PURE__ */ jsx("svg", { width, height, children: /* @__PURE__ */ jsxs("g", { transform: `translate(${dimensions.margin.left},${dimensions.margin.top})`, children: [
|
|
2060
|
+
data.map((d, i) => /* @__PURE__ */ jsx(
|
|
2061
|
+
"circle",
|
|
2062
|
+
{
|
|
2063
|
+
cx: xScale(x(d)),
|
|
2064
|
+
cy: yScale(y(d)),
|
|
2065
|
+
r,
|
|
2066
|
+
fill
|
|
2067
|
+
},
|
|
2068
|
+
i
|
|
2069
|
+
)),
|
|
2070
|
+
/* @__PURE__ */ jsx("g", { transform: `translate(0,${boundedHeight})`, children: xTicks.map((tick, i) => {
|
|
2071
|
+
const px = xScale(tick);
|
|
2072
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(${px},0)`, children: [
|
|
2073
|
+
/* @__PURE__ */ jsx("line", { y2: 6, stroke: "currentColor" }),
|
|
2074
|
+
/* @__PURE__ */ jsx("text", { y: 18, textAnchor: "middle", fontSize: 10, fill: "currentColor", children: formatTick(tick) })
|
|
2075
|
+
] }, i);
|
|
2076
|
+
}) }),
|
|
2077
|
+
/* @__PURE__ */ jsx("g", { children: yTicks.map((tick, i) => {
|
|
2078
|
+
const py = yScale(tick);
|
|
2079
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(0,${py})`, children: [
|
|
2080
|
+
/* @__PURE__ */ jsx("line", { x2: -6, stroke: "currentColor" }),
|
|
2081
|
+
/* @__PURE__ */ jsx("text", { x: -9, dy: "0.32em", textAnchor: "end", fontSize: 10, fill: "currentColor", children: formatTick(tick) })
|
|
2082
|
+
] }, i);
|
|
2083
|
+
}) })
|
|
2084
|
+
] }) });
|
|
2085
|
+
}
|
|
2086
|
+
var DEFAULT_COLORS = [
|
|
2087
|
+
"#4e79a7",
|
|
2088
|
+
"#f28e2b",
|
|
2089
|
+
"#e15759",
|
|
2090
|
+
"#76b7b2",
|
|
2091
|
+
"#59a14f",
|
|
2092
|
+
"#edc948",
|
|
2093
|
+
"#b07aa1",
|
|
2094
|
+
"#ff9da7",
|
|
2095
|
+
"#9c755f",
|
|
2096
|
+
"#bab0ac"
|
|
2097
|
+
];
|
|
2098
|
+
function PieChart({
|
|
2099
|
+
data,
|
|
2100
|
+
value,
|
|
2101
|
+
width = 300,
|
|
2102
|
+
height = 300,
|
|
2103
|
+
colors = DEFAULT_COLORS
|
|
2104
|
+
}) {
|
|
2105
|
+
const cx = width / 2;
|
|
2106
|
+
const cy = height / 2;
|
|
2107
|
+
const radius = Math.min(cx, cy) - 10;
|
|
2108
|
+
const values = data.map(value);
|
|
2109
|
+
const total = values.reduce((sum, v) => sum + v, 0);
|
|
2110
|
+
let currentAngle = -Math.PI / 2;
|
|
2111
|
+
const arcs = data.map((_, i) => {
|
|
2112
|
+
const sliceAngle = values[i] / total * Math.PI * 2;
|
|
2113
|
+
const startAngle = currentAngle;
|
|
2114
|
+
const endAngle = currentAngle + sliceAngle;
|
|
2115
|
+
currentAngle = endAngle;
|
|
2116
|
+
return { startAngle, endAngle, color: colors[i % colors.length] };
|
|
2117
|
+
});
|
|
2118
|
+
return /* @__PURE__ */ jsx("svg", { width, height, children: arcs.map((arc, i) => /* @__PURE__ */ jsx(
|
|
2119
|
+
"path",
|
|
2120
|
+
{
|
|
2121
|
+
d: arcPath(cx, cy, radius, arc.startAngle, arc.endAngle),
|
|
2122
|
+
fill: arc.color
|
|
2123
|
+
},
|
|
2124
|
+
i
|
|
2125
|
+
)) });
|
|
2126
|
+
}
|
|
2127
|
+
|
|
1414
2128
|
// ../code-editor/dist/index.js
|
|
1415
2129
|
var languageLabels = {
|
|
1416
2130
|
js: "JavaScript",
|
|
@@ -2692,6 +3406,196 @@ var CommandSeparator = React23.forwardRef(
|
|
|
2692
3406
|
);
|
|
2693
3407
|
CommandSeparator.displayName = "CommandSeparator";
|
|
2694
3408
|
|
|
3409
|
+
// ../command-input/dist/index.js
|
|
3410
|
+
var CommandInput2 = class {
|
|
3411
|
+
state = {
|
|
3412
|
+
nodes: [],
|
|
3413
|
+
rawText: "",
|
|
3414
|
+
cursorPosition: 0,
|
|
3415
|
+
activeTrigger: null,
|
|
3416
|
+
activeCommandText: null
|
|
3417
|
+
};
|
|
3418
|
+
options;
|
|
3419
|
+
constructor(options) {
|
|
3420
|
+
this.options = { ...options };
|
|
3421
|
+
}
|
|
3422
|
+
handleInput(text, cursorPosition) {
|
|
3423
|
+
this.state.rawText = text;
|
|
3424
|
+
this.state.cursorPosition = cursorPosition;
|
|
3425
|
+
this.parseInput();
|
|
3426
|
+
this.notifyStateChange();
|
|
3427
|
+
}
|
|
3428
|
+
handleKeyDown(key, event) {
|
|
3429
|
+
if (this.state.activeTrigger) {
|
|
3430
|
+
if (key === "Escape") {
|
|
3431
|
+
if (event) event.preventDefault();
|
|
3432
|
+
this.state.activeTrigger = null;
|
|
3433
|
+
this.state.activeCommandText = null;
|
|
3434
|
+
if (this.options.onCommandCancel) {
|
|
3435
|
+
this.options.onCommandCancel();
|
|
3436
|
+
}
|
|
3437
|
+
this.notifyStateChange();
|
|
3438
|
+
} else if (key === "Enter") {
|
|
3439
|
+
if (event) event.preventDefault();
|
|
3440
|
+
const trigger = this.state.activeTrigger;
|
|
3441
|
+
const text = this.state.activeCommandText || "";
|
|
3442
|
+
this.state.activeTrigger = null;
|
|
3443
|
+
this.state.activeCommandText = null;
|
|
3444
|
+
if (this.options.onCommandCommit) {
|
|
3445
|
+
this.options.onCommandCommit(trigger, text);
|
|
3446
|
+
}
|
|
3447
|
+
this.notifyStateChange();
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
get value() {
|
|
3452
|
+
return this.state.nodes;
|
|
3453
|
+
}
|
|
3454
|
+
getState() {
|
|
3455
|
+
return { ...this.state };
|
|
3456
|
+
}
|
|
3457
|
+
parseInput() {
|
|
3458
|
+
const { rawText, cursorPosition } = this.state;
|
|
3459
|
+
this.state.activeTrigger = null;
|
|
3460
|
+
this.state.activeCommandText = null;
|
|
3461
|
+
for (let i = cursorPosition - 1; i >= 0; i--) {
|
|
3462
|
+
const char = rawText[i];
|
|
3463
|
+
const matchedTrigger = this.options.triggers.find((t) => t.char === char);
|
|
3464
|
+
if (matchedTrigger) {
|
|
3465
|
+
const isStartOfWord = i === 0 || /\s/.test(rawText[i - 1]);
|
|
3466
|
+
if (isStartOfWord) {
|
|
3467
|
+
const commandText = rawText.slice(i + 1, cursorPosition);
|
|
3468
|
+
if (!/\s/.test(commandText)) {
|
|
3469
|
+
let isValid = true;
|
|
3470
|
+
if (matchedTrigger.pattern) {
|
|
3471
|
+
isValid = matchedTrigger.pattern.test(commandText);
|
|
3472
|
+
}
|
|
3473
|
+
if (isValid) {
|
|
3474
|
+
this.state.activeTrigger = matchedTrigger;
|
|
3475
|
+
this.state.activeCommandText = commandText;
|
|
3476
|
+
if (this.options.onCommandTriggered) {
|
|
3477
|
+
this.options.onCommandTriggered(matchedTrigger, commandText);
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
break;
|
|
3483
|
+
}
|
|
3484
|
+
if (/\s/.test(char)) {
|
|
3485
|
+
break;
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
const nodes = [];
|
|
3489
|
+
if (this.options.triggers.length === 0) {
|
|
3490
|
+
nodes.push({ type: "text", text: rawText });
|
|
3491
|
+
this.state.nodes = nodes;
|
|
3492
|
+
return;
|
|
3493
|
+
}
|
|
3494
|
+
const triggerChars = this.options.triggers.map((t) => t.char.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
3495
|
+
const patternStr = `(^|\\s)(${triggerChars.join("|")})([^\\s]*)`;
|
|
3496
|
+
const regex = new RegExp(patternStr, "g");
|
|
3497
|
+
let currentIndex = 0;
|
|
3498
|
+
let match;
|
|
3499
|
+
while ((match = regex.exec(rawText)) !== null) {
|
|
3500
|
+
const precedingWhitespace = match[1];
|
|
3501
|
+
const triggerChar = match[2];
|
|
3502
|
+
const commandText = match[3];
|
|
3503
|
+
const matchStart = match.index;
|
|
3504
|
+
const triggerStart = matchStart + precedingWhitespace.length;
|
|
3505
|
+
const triggerConfig = this.options.triggers.find((t) => t.char === triggerChar);
|
|
3506
|
+
let isValid = true;
|
|
3507
|
+
if (triggerConfig?.pattern && commandText.length > 0) {
|
|
3508
|
+
isValid = triggerConfig.pattern.test(commandText);
|
|
3509
|
+
}
|
|
3510
|
+
if (isValid) {
|
|
3511
|
+
if (triggerStart > currentIndex) {
|
|
3512
|
+
nodes.push({ type: "text", text: rawText.slice(currentIndex, triggerStart) });
|
|
3513
|
+
}
|
|
3514
|
+
nodes.push({ type: "command", trigger: triggerChar, text: commandText });
|
|
3515
|
+
currentIndex = regex.lastIndex;
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
if (currentIndex < rawText.length) {
|
|
3519
|
+
nodes.push({ type: "text", text: rawText.slice(currentIndex) });
|
|
3520
|
+
}
|
|
3521
|
+
this.state.nodes = nodes;
|
|
3522
|
+
}
|
|
3523
|
+
notifyStateChange() {
|
|
3524
|
+
if (this.options.onStateChange) {
|
|
3525
|
+
this.options.onStateChange({ ...this.state });
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
};
|
|
3529
|
+
var CommandInput3 = forwardRef(
|
|
3530
|
+
({
|
|
3531
|
+
value = "",
|
|
3532
|
+
onChange,
|
|
3533
|
+
triggers = [],
|
|
3534
|
+
renderPopover,
|
|
3535
|
+
className,
|
|
3536
|
+
...props
|
|
3537
|
+
}, ref) => {
|
|
3538
|
+
const localRef = useRef(null);
|
|
3539
|
+
const containerRef = ref || localRef;
|
|
3540
|
+
const [popoverState, setPopoverState] = useState({
|
|
3541
|
+
isOpen: false,
|
|
3542
|
+
trigger: "",
|
|
3543
|
+
search: "",
|
|
3544
|
+
position: { top: 0, left: 0 }
|
|
3545
|
+
});
|
|
3546
|
+
const coreRef = useRef(null);
|
|
3547
|
+
useEffect(() => {
|
|
3548
|
+
if (containerRef.current && !coreRef.current) {
|
|
3549
|
+
coreRef.current = new CommandInput2({
|
|
3550
|
+
triggers,
|
|
3551
|
+
onCommandTriggered: (trigger, search) => {
|
|
3552
|
+
setPopoverState({
|
|
3553
|
+
isOpen: true,
|
|
3554
|
+
trigger: trigger.char,
|
|
3555
|
+
search,
|
|
3556
|
+
position: { top: 0, left: 0 }
|
|
3557
|
+
});
|
|
3558
|
+
},
|
|
3559
|
+
onCommandCancel: () => {
|
|
3560
|
+
setPopoverState((prev) => ({ ...prev, isOpen: false }));
|
|
3561
|
+
},
|
|
3562
|
+
onStateChange: (state) => {
|
|
3563
|
+
onChange?.(state.rawText);
|
|
3564
|
+
}
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3567
|
+
}, [triggers, onChange]);
|
|
3568
|
+
useEffect(() => {
|
|
3569
|
+
if (containerRef.current && containerRef.current.innerHTML !== value && coreRef.current) {
|
|
3570
|
+
containerRef.current.innerHTML = value;
|
|
3571
|
+
}
|
|
3572
|
+
}, [value]);
|
|
3573
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", className), children: [
|
|
3574
|
+
/* @__PURE__ */ jsx(
|
|
3575
|
+
"div",
|
|
3576
|
+
{
|
|
3577
|
+
ref: containerRef,
|
|
3578
|
+
contentEditable: true,
|
|
3579
|
+
suppressContentEditableWarning: true,
|
|
3580
|
+
className: "w-full min-h-[40px] p-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
3581
|
+
onInput: (e) => {
|
|
3582
|
+
coreRef.current?.handleInput(e.currentTarget.textContent || "", 0);
|
|
3583
|
+
},
|
|
3584
|
+
onKeyDown: (e) => {
|
|
3585
|
+
coreRef.current?.handleKeyDown(e.key, e);
|
|
3586
|
+
},
|
|
3587
|
+
...props
|
|
3588
|
+
}
|
|
3589
|
+
),
|
|
3590
|
+
renderPopover && renderPopover({
|
|
3591
|
+
...popoverState,
|
|
3592
|
+
close: () => setPopoverState((prev) => ({ ...prev, isOpen: false }))
|
|
3593
|
+
})
|
|
3594
|
+
] });
|
|
3595
|
+
}
|
|
3596
|
+
);
|
|
3597
|
+
CommandInput3.displayName = "CommandInput";
|
|
3598
|
+
|
|
2695
3599
|
// ../emoji-picker/dist/index.js
|
|
2696
3600
|
var CATEGORY_ORDER = ["smileys", "people", "nature", "food", "travel", "activities", "objects", "symbols", "flags"];
|
|
2697
3601
|
var EMOJI_TUPLES = [
|
|
@@ -8358,7 +9262,7 @@ function MessageRow({
|
|
|
8358
9262
|
"div",
|
|
8359
9263
|
{ className: "flex items-baseline gap-2" },
|
|
8360
9264
|
h2("span", { className: "text-sm font-semibold" }, message.author.name),
|
|
8361
|
-
h2("span", { className: "text-xs text-muted-foreground", title: message.timestamp.
|
|
9265
|
+
h2("span", { className: "text-xs text-muted-foreground", title: message.timestamp.toISOString() }, formatTimestamp(message.timestamp)),
|
|
8362
9266
|
message.edited ? h2("span", { className: "text-xs text-muted-foreground" }, "(edited)") : null
|
|
8363
9267
|
),
|
|
8364
9268
|
inner
|
|
@@ -8372,7 +9276,7 @@ function MessageRow({
|
|
|
8372
9276
|
"div",
|
|
8373
9277
|
{ className: "flex items-baseline gap-2" },
|
|
8374
9278
|
message.edited ? h2("span", { className: "text-xs text-muted-foreground" }, "(edited)") : null,
|
|
8375
|
-
h2("span", { className: "text-xs text-muted-foreground", title: message.timestamp.
|
|
9279
|
+
h2("span", { className: "text-xs text-muted-foreground", title: message.timestamp.toISOString() }, formatTimestamp(message.timestamp)),
|
|
8376
9280
|
h2("span", { className: "text-sm font-semibold" }, message.author.name)
|
|
8377
9281
|
),
|
|
8378
9282
|
h2("div", { className: "mt-0.5 flex max-w-[80%] flex-col items-end" }, inner)
|
|
@@ -9786,25 +10690,47 @@ function DropdownMenu({
|
|
|
9786
10690
|
}
|
|
9787
10691
|
DropdownMenu.displayName = "DropdownMenu";
|
|
9788
10692
|
var DropdownMenuTrigger = React23.forwardRef(
|
|
9789
|
-
({ onClick, children, ...props }, ref) => {
|
|
10693
|
+
({ asChild = false, onClick, children, ...props }, ref) => {
|
|
9790
10694
|
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
9791
10695
|
const handleClick = (e) => {
|
|
9792
10696
|
onOpenChange(!open);
|
|
9793
10697
|
onClick?.(e);
|
|
9794
10698
|
};
|
|
9795
|
-
|
|
9796
|
-
"button",
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
10699
|
+
const triggerProps = {
|
|
10700
|
+
type: "button",
|
|
10701
|
+
"aria-expanded": open,
|
|
10702
|
+
"aria-controls": contentId,
|
|
10703
|
+
"aria-haspopup": "menu",
|
|
10704
|
+
onClick: handleClick,
|
|
10705
|
+
...props
|
|
10706
|
+
};
|
|
10707
|
+
if (asChild) {
|
|
10708
|
+
if (!React23.isValidElement(children)) {
|
|
10709
|
+
devWarn(
|
|
10710
|
+
"dropdown-menu-trigger-asChild-child",
|
|
10711
|
+
"DropdownMenuTrigger: `asChild` expects a single React element child; rendering nothing."
|
|
10712
|
+
);
|
|
10713
|
+
return null;
|
|
10714
|
+
}
|
|
10715
|
+
const child = children;
|
|
10716
|
+
const childOnClick = child.props.onClick;
|
|
10717
|
+
const childRef = child.ref;
|
|
10718
|
+
const mergedProps = {
|
|
10719
|
+
...triggerProps,
|
|
10720
|
+
onClick: (e) => {
|
|
10721
|
+
childOnClick?.(e);
|
|
10722
|
+
if (!e.defaultPrevented) handleClick(e);
|
|
10723
|
+
},
|
|
10724
|
+
ref: (node) => {
|
|
10725
|
+
if (typeof ref === "function") ref(node);
|
|
10726
|
+
else if (ref) ref.current = node;
|
|
10727
|
+
if (typeof childRef === "function") childRef(node);
|
|
10728
|
+
else if (childRef) childRef.current = node;
|
|
10729
|
+
}
|
|
10730
|
+
};
|
|
10731
|
+
return React23.cloneElement(child, mergedProps);
|
|
10732
|
+
}
|
|
10733
|
+
return React23.createElement("button", { ref, ...triggerProps }, children);
|
|
9808
10734
|
}
|
|
9809
10735
|
);
|
|
9810
10736
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
@@ -9998,12 +10924,14 @@ var feedbackDialogVariants = cva({
|
|
|
9998
10924
|
// ../react-feedback-dialog/dist/index.js
|
|
9999
10925
|
function FeedbackDialog({
|
|
10000
10926
|
open: controlledOpen,
|
|
10927
|
+
defaultOpen = false,
|
|
10001
10928
|
onOpenChange,
|
|
10002
10929
|
onSubmit,
|
|
10003
10930
|
type = "general",
|
|
10004
|
-
className
|
|
10931
|
+
className,
|
|
10932
|
+
children
|
|
10005
10933
|
}) {
|
|
10006
|
-
const [open, setOpen] = React23.useState(controlledOpen ??
|
|
10934
|
+
const [open, setOpen] = React23.useState(controlledOpen ?? defaultOpen);
|
|
10007
10935
|
const [comment, setComment] = React23.useState("");
|
|
10008
10936
|
const [email, setEmail] = React23.useState("");
|
|
10009
10937
|
const [honeypot, setHoneypot] = React23.useState("");
|
|
@@ -10048,73 +10976,97 @@ function FeedbackDialog({
|
|
|
10048
10976
|
setIsSubmitting(false);
|
|
10049
10977
|
setIsSubmitted(false);
|
|
10050
10978
|
}, []);
|
|
10051
|
-
if (!isOpen) return null;
|
|
10052
10979
|
const api = apiRef.current;
|
|
10980
|
+
const trigger = React23.isValidElement(children) ? (() => {
|
|
10981
|
+
const child = children;
|
|
10982
|
+
const childOnClick = child.props.onClick;
|
|
10983
|
+
const childRef = child.ref;
|
|
10984
|
+
return React23.cloneElement(child, {
|
|
10985
|
+
onClick: (e) => {
|
|
10986
|
+
childOnClick?.(e);
|
|
10987
|
+
if (!e.defaultPrevented) handleOpenChange(true);
|
|
10988
|
+
},
|
|
10989
|
+
ref: (node) => {
|
|
10990
|
+
if (typeof childRef === "function") childRef(node);
|
|
10991
|
+
else if (childRef) childRef.current = node;
|
|
10992
|
+
}
|
|
10993
|
+
});
|
|
10994
|
+
})() : children;
|
|
10053
10995
|
if (isSubmitted) {
|
|
10054
10996
|
return React23.createElement(
|
|
10997
|
+
React23.Fragment,
|
|
10998
|
+
null,
|
|
10999
|
+
trigger,
|
|
11000
|
+
React23.createElement(
|
|
11001
|
+
"div",
|
|
11002
|
+
{
|
|
11003
|
+
className: cn(feedbackDialogVariants({ type }), className),
|
|
11004
|
+
...api.ariaProps,
|
|
11005
|
+
"data-state": "submitted"
|
|
11006
|
+
},
|
|
11007
|
+
React23.createElement("p", { "data-testid": "success-message" }, "Thank you for your feedback!"),
|
|
11008
|
+
React23.createElement(
|
|
11009
|
+
"button",
|
|
11010
|
+
{
|
|
11011
|
+
type: "button",
|
|
11012
|
+
onClick: () => {
|
|
11013
|
+
handleReset();
|
|
11014
|
+
handleOpenChange(false);
|
|
11015
|
+
}
|
|
11016
|
+
},
|
|
11017
|
+
"Close"
|
|
11018
|
+
)
|
|
11019
|
+
)
|
|
11020
|
+
);
|
|
11021
|
+
}
|
|
11022
|
+
return React23.createElement(
|
|
11023
|
+
React23.Fragment,
|
|
11024
|
+
null,
|
|
11025
|
+
trigger,
|
|
11026
|
+
isOpen ? React23.createElement(
|
|
10055
11027
|
"div",
|
|
10056
11028
|
{
|
|
10057
11029
|
className: cn(feedbackDialogVariants({ type }), className),
|
|
10058
11030
|
...api.ariaProps,
|
|
10059
|
-
"data-state": "
|
|
11031
|
+
"data-state": "open"
|
|
10060
11032
|
},
|
|
10061
|
-
React23.createElement("
|
|
11033
|
+
React23.createElement("h2", { id: `${api.ariaProps.id}-title` }, "Send Feedback"),
|
|
11034
|
+
React23.createElement("textarea", {
|
|
11035
|
+
"aria-label": "Feedback comment",
|
|
11036
|
+
value: comment,
|
|
11037
|
+
onChange: (e) => setComment(e.target.value),
|
|
11038
|
+
placeholder: "Your feedback...",
|
|
11039
|
+
disabled: isSubmitting
|
|
11040
|
+
}),
|
|
11041
|
+
React23.createElement("input", {
|
|
11042
|
+
type: "email",
|
|
11043
|
+
"aria-label": "Email",
|
|
11044
|
+
value: email,
|
|
11045
|
+
onChange: (e) => setEmail(e.target.value),
|
|
11046
|
+
placeholder: "Email (optional)",
|
|
11047
|
+
disabled: isSubmitting
|
|
11048
|
+
}),
|
|
11049
|
+
// Honeypot field — hidden from real users
|
|
11050
|
+
React23.createElement("input", {
|
|
11051
|
+
type: "text",
|
|
11052
|
+
"aria-hidden": true,
|
|
11053
|
+
tabIndex: -1,
|
|
11054
|
+
style: { position: "absolute", left: "-9999px" },
|
|
11055
|
+
value: honeypot,
|
|
11056
|
+
onChange: (e) => setHoneypot(e.target.value),
|
|
11057
|
+
autoComplete: "off",
|
|
11058
|
+
name: "website"
|
|
11059
|
+
}),
|
|
10062
11060
|
React23.createElement(
|
|
10063
11061
|
"button",
|
|
10064
11062
|
{
|
|
10065
11063
|
type: "button",
|
|
10066
|
-
onClick:
|
|
10067
|
-
|
|
10068
|
-
handleOpenChange(false);
|
|
10069
|
-
}
|
|
11064
|
+
onClick: handleSubmit,
|
|
11065
|
+
disabled: isSubmitting || !comment.trim()
|
|
10070
11066
|
},
|
|
10071
|
-
"
|
|
11067
|
+
isSubmitting ? "Submitting..." : "Submit"
|
|
10072
11068
|
)
|
|
10073
|
-
)
|
|
10074
|
-
}
|
|
10075
|
-
return React23.createElement(
|
|
10076
|
-
"div",
|
|
10077
|
-
{
|
|
10078
|
-
className: cn(feedbackDialogVariants({ type }), className),
|
|
10079
|
-
...api.ariaProps,
|
|
10080
|
-
"data-state": "open"
|
|
10081
|
-
},
|
|
10082
|
-
React23.createElement("h2", { id: `${api.ariaProps.id}-title` }, "Send Feedback"),
|
|
10083
|
-
React23.createElement("textarea", {
|
|
10084
|
-
"aria-label": "Feedback comment",
|
|
10085
|
-
value: comment,
|
|
10086
|
-
onChange: (e) => setComment(e.target.value),
|
|
10087
|
-
placeholder: "Your feedback...",
|
|
10088
|
-
disabled: isSubmitting
|
|
10089
|
-
}),
|
|
10090
|
-
React23.createElement("input", {
|
|
10091
|
-
type: "email",
|
|
10092
|
-
"aria-label": "Email",
|
|
10093
|
-
value: email,
|
|
10094
|
-
onChange: (e) => setEmail(e.target.value),
|
|
10095
|
-
placeholder: "Email (optional)",
|
|
10096
|
-
disabled: isSubmitting
|
|
10097
|
-
}),
|
|
10098
|
-
// Honeypot field — hidden from real users
|
|
10099
|
-
React23.createElement("input", {
|
|
10100
|
-
type: "text",
|
|
10101
|
-
"aria-hidden": true,
|
|
10102
|
-
tabIndex: -1,
|
|
10103
|
-
style: { position: "absolute", left: "-9999px" },
|
|
10104
|
-
value: honeypot,
|
|
10105
|
-
onChange: (e) => setHoneypot(e.target.value),
|
|
10106
|
-
autoComplete: "off",
|
|
10107
|
-
name: "website"
|
|
10108
|
-
}),
|
|
10109
|
-
React23.createElement(
|
|
10110
|
-
"button",
|
|
10111
|
-
{
|
|
10112
|
-
type: "button",
|
|
10113
|
-
onClick: handleSubmit,
|
|
10114
|
-
disabled: isSubmitting || !comment.trim()
|
|
10115
|
-
},
|
|
10116
|
-
isSubmitting ? "Submitting..." : "Submit"
|
|
10117
|
-
)
|
|
11069
|
+
) : null
|
|
10118
11070
|
);
|
|
10119
11071
|
}
|
|
10120
11072
|
FeedbackDialog.displayName = "FeedbackDialog";
|
|
@@ -10779,6 +11731,251 @@ var InstallPrompt = React23.forwardRef(
|
|
|
10779
11731
|
);
|
|
10780
11732
|
InstallPrompt.displayName = "InstallPrompt";
|
|
10781
11733
|
|
|
11734
|
+
// ../i18n/dist/index.js
|
|
11735
|
+
var LANGUAGES = {
|
|
11736
|
+
// English variants
|
|
11737
|
+
"en": { code: "en", name: "English", nativeName: "English", direction: "ltr", group: "English" },
|
|
11738
|
+
"en-US": { code: "en-US", name: "English (US)", nativeName: "English (US)", direction: "ltr", group: "English" },
|
|
11739
|
+
"en-GB": { code: "en-GB", name: "English (UK)", nativeName: "English (UK)", direction: "ltr", group: "English" },
|
|
11740
|
+
"en-IN": { code: "en-IN", name: "English (India)", nativeName: "English (India)", direction: "ltr", group: "English" },
|
|
11741
|
+
// Indian languages
|
|
11742
|
+
"hi": { code: "hi", name: "Hindi", nativeName: "\u0939\u093F\u0928\u094D\u0926\u0940", direction: "ltr", group: "Indian" },
|
|
11743
|
+
"te": { code: "te", name: "Telugu", nativeName: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41", direction: "ltr", group: "Indian" },
|
|
11744
|
+
"ta": { code: "ta", name: "Tamil", nativeName: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", direction: "ltr", group: "Indian" },
|
|
11745
|
+
"ur": { code: "ur", name: "Urdu", nativeName: "\u0627\u0631\u062F\u0648", direction: "rtl", group: "Indian" },
|
|
11746
|
+
"pa": { code: "pa", name: "Punjabi", nativeName: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40", direction: "ltr", group: "Indian" },
|
|
11747
|
+
"bn": { code: "bn", name: "Bengali", nativeName: "\u09AC\u09BE\u0982\u09B2\u09BE", direction: "ltr", group: "Indian" },
|
|
11748
|
+
"gu": { code: "gu", name: "Gujarati", nativeName: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0", direction: "ltr", group: "Indian" },
|
|
11749
|
+
"mr": { code: "mr", name: "Marathi", nativeName: "\u092E\u0930\u093E\u0920\u0940", direction: "ltr", group: "Indian" },
|
|
11750
|
+
"kn": { code: "kn", name: "Kannada", nativeName: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1", direction: "ltr", group: "Indian" },
|
|
11751
|
+
"ml": { code: "ml", name: "Malayalam", nativeName: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02", direction: "ltr", group: "Indian" },
|
|
11752
|
+
// Western European
|
|
11753
|
+
"fr": { code: "fr", name: "French", nativeName: "Fran\xE7ais", direction: "ltr", group: "European" },
|
|
11754
|
+
"es": { code: "es", name: "Spanish", nativeName: "Espa\xF1ol", direction: "ltr", group: "European" },
|
|
11755
|
+
"de": { code: "de", name: "German", nativeName: "Deutsch", direction: "ltr", group: "European" },
|
|
11756
|
+
"it": { code: "it", name: "Italian", nativeName: "Italiano", direction: "ltr", group: "European" },
|
|
11757
|
+
"pt": { code: "pt", name: "Portuguese", nativeName: "Portugu\xEAs", direction: "ltr", group: "European" },
|
|
11758
|
+
"pt-BR": { code: "pt-BR", name: "Portuguese (Brazil)", nativeName: "Portugu\xEAs (Brasil)", direction: "ltr", group: "European" },
|
|
11759
|
+
"nl": { code: "nl", name: "Dutch", nativeName: "Nederlands", direction: "ltr", group: "European" },
|
|
11760
|
+
// Nordic
|
|
11761
|
+
"sv": { code: "sv", name: "Swedish", nativeName: "Svenska", direction: "ltr", group: "European" },
|
|
11762
|
+
"da": { code: "da", name: "Danish", nativeName: "Dansk", direction: "ltr", group: "European" },
|
|
11763
|
+
"no": { code: "no", name: "Norwegian", nativeName: "Norsk", direction: "ltr", group: "European" },
|
|
11764
|
+
"fi": { code: "fi", name: "Finnish", nativeName: "Suomi", direction: "ltr", group: "European" },
|
|
11765
|
+
// Eastern European
|
|
11766
|
+
"pl": { code: "pl", name: "Polish", nativeName: "Polski", direction: "ltr", group: "European" },
|
|
11767
|
+
"cs": { code: "cs", name: "Czech", nativeName: "\u010Ce\u0161tina", direction: "ltr", group: "European" },
|
|
11768
|
+
"ro": { code: "ro", name: "Romanian", nativeName: "Rom\xE2n\u0103", direction: "ltr", group: "European" },
|
|
11769
|
+
"hu": { code: "hu", name: "Hungarian", nativeName: "Magyar", direction: "ltr", group: "European" },
|
|
11770
|
+
"bg": { code: "bg", name: "Bulgarian", nativeName: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", direction: "ltr", group: "European" },
|
|
11771
|
+
"hr": { code: "hr", name: "Croatian", nativeName: "Hrvatski", direction: "ltr", group: "European" },
|
|
11772
|
+
"sk": { code: "sk", name: "Slovak", nativeName: "Sloven\u010Dina", direction: "ltr", group: "European" },
|
|
11773
|
+
"sl": { code: "sl", name: "Slovenian", nativeName: "Sloven\u0161\u010Dina", direction: "ltr", group: "European" },
|
|
11774
|
+
"sr": { code: "sr", name: "Serbian", nativeName: "Srpski", direction: "ltr", group: "European" },
|
|
11775
|
+
"uk": { code: "uk", name: "Ukrainian", nativeName: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430", direction: "ltr", group: "European" },
|
|
11776
|
+
"el": { code: "el", name: "Greek", nativeName: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", direction: "ltr", group: "European" },
|
|
11777
|
+
"ru": { code: "ru", name: "Russian", nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", direction: "ltr", group: "European" },
|
|
11778
|
+
// East Asian
|
|
11779
|
+
"ja": { code: "ja", name: "Japanese", nativeName: "\u65E5\u672C\u8A9E", direction: "ltr", group: "East Asian" },
|
|
11780
|
+
"ko": { code: "ko", name: "Korean", nativeName: "\uD55C\uAD6D\uC5B4", direction: "ltr", group: "East Asian" },
|
|
11781
|
+
"zh": { code: "zh", name: "Chinese (Simplified)", nativeName: "\u4E2D\u6587\uFF08\u7B80\u4F53\uFF09", direction: "ltr", group: "East Asian" },
|
|
11782
|
+
"zh-TW": { code: "zh-TW", name: "Chinese (Traditional)", nativeName: "\u4E2D\u6587\uFF08\u7E41\u9AD4\uFF09", direction: "ltr", group: "East Asian" },
|
|
11783
|
+
// Middle Eastern
|
|
11784
|
+
"ar": { code: "ar", name: "Arabic", nativeName: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629", direction: "rtl", group: "Middle Eastern" },
|
|
11785
|
+
"he": { code: "he", name: "Hebrew", nativeName: "\u05E2\u05D1\u05E8\u05D9\u05EA", direction: "rtl", group: "Middle Eastern" },
|
|
11786
|
+
"tr": { code: "tr", name: "Turkish", nativeName: "T\xFCrk\xE7e", direction: "ltr", group: "Middle Eastern" },
|
|
11787
|
+
// Southeast Asian
|
|
11788
|
+
"th": { code: "th", name: "Thai", nativeName: "\u0E44\u0E17\u0E22", direction: "ltr", group: "Southeast Asian" },
|
|
11789
|
+
"vi": { code: "vi", name: "Vietnamese", nativeName: "Ti\u1EBFng Vi\u1EC7t", direction: "ltr", group: "Southeast Asian" },
|
|
11790
|
+
"id": { code: "id", name: "Indonesian", nativeName: "Bahasa Indonesia", direction: "ltr", group: "Southeast Asian" },
|
|
11791
|
+
"ms": { code: "ms", name: "Malay", nativeName: "Bahasa Melayu", direction: "ltr", group: "Southeast Asian" }
|
|
11792
|
+
};
|
|
11793
|
+
var COUNTRIES = {
|
|
11794
|
+
// North America
|
|
11795
|
+
"US": { code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}", defaultLanguages: ["en"], timezone: "America/New_York" },
|
|
11796
|
+
"CA": { code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}", defaultLanguages: ["en", "fr"], timezone: "America/Toronto" },
|
|
11797
|
+
"MX": { code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}", defaultLanguages: ["es"], timezone: "America/Mexico_City" },
|
|
11798
|
+
// UK & Ireland
|
|
11799
|
+
"GB": { code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}", defaultLanguages: ["en"], timezone: "Europe/London" },
|
|
11800
|
+
"IE": { code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}", defaultLanguages: ["en"], timezone: "Europe/Dublin" },
|
|
11801
|
+
// Oceania
|
|
11802
|
+
"AU": { code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}", defaultLanguages: ["en"], timezone: "Australia/Sydney" },
|
|
11803
|
+
"NZ": { code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}", defaultLanguages: ["en"], timezone: "Pacific/Auckland" },
|
|
11804
|
+
// South Asia
|
|
11805
|
+
"IN": { code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}", defaultLanguages: ["hi", "en"], timezone: "Asia/Kolkata" },
|
|
11806
|
+
"PK": { code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}", defaultLanguages: ["ur", "en"], timezone: "Asia/Karachi" },
|
|
11807
|
+
"BD": { code: "BD", name: "Bangladesh", flag: "\u{1F1E7}\u{1F1E9}", defaultLanguages: ["bn"], timezone: "Asia/Dhaka" },
|
|
11808
|
+
"LK": { code: "LK", name: "Sri Lanka", flag: "\u{1F1F1}\u{1F1F0}", defaultLanguages: ["ta", "en"], timezone: "Asia/Colombo" },
|
|
11809
|
+
"NP": { code: "NP", name: "Nepal", flag: "\u{1F1F3}\u{1F1F5}", defaultLanguages: ["hi", "en"], timezone: "Asia/Kathmandu" },
|
|
11810
|
+
// Western Europe
|
|
11811
|
+
"FR": { code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}", defaultLanguages: ["fr"], timezone: "Europe/Paris" },
|
|
11812
|
+
"DE": { code: "DE", name: "Germany", flag: "\u{1F1E9}\u{1F1EA}", defaultLanguages: ["de"], timezone: "Europe/Berlin" },
|
|
11813
|
+
"ES": { code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}", defaultLanguages: ["es"], timezone: "Europe/Madrid" },
|
|
11814
|
+
"IT": { code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}", defaultLanguages: ["it"], timezone: "Europe/Rome" },
|
|
11815
|
+
"PT": { code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}", defaultLanguages: ["pt"], timezone: "Europe/Lisbon" },
|
|
11816
|
+
"NL": { code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}", defaultLanguages: ["nl"], timezone: "Europe/Amsterdam" },
|
|
11817
|
+
"BE": { code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}", defaultLanguages: ["nl", "fr", "de"], timezone: "Europe/Brussels" },
|
|
11818
|
+
"CH": { code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}", defaultLanguages: ["de", "fr", "it"], timezone: "Europe/Zurich" },
|
|
11819
|
+
"AT": { code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}", defaultLanguages: ["de"], timezone: "Europe/Vienna" },
|
|
11820
|
+
// Nordic
|
|
11821
|
+
"SE": { code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}", defaultLanguages: ["sv"], timezone: "Europe/Stockholm" },
|
|
11822
|
+
"NO": { code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}", defaultLanguages: ["no"], timezone: "Europe/Oslo" },
|
|
11823
|
+
"DK": { code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}", defaultLanguages: ["da"], timezone: "Europe/Copenhagen" },
|
|
11824
|
+
"FI": { code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}", defaultLanguages: ["fi"], timezone: "Europe/Helsinki" },
|
|
11825
|
+
// Eastern Europe
|
|
11826
|
+
"PL": { code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}", defaultLanguages: ["pl"], timezone: "Europe/Warsaw" },
|
|
11827
|
+
"CZ": { code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}", defaultLanguages: ["cs"], timezone: "Europe/Prague" },
|
|
11828
|
+
"RO": { code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}", defaultLanguages: ["ro"], timezone: "Europe/Bucharest" },
|
|
11829
|
+
"HU": { code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}", defaultLanguages: ["hu"], timezone: "Europe/Budapest" },
|
|
11830
|
+
"BG": { code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}", defaultLanguages: ["bg"], timezone: "Europe/Sofia" },
|
|
11831
|
+
"HR": { code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}", defaultLanguages: ["hr"], timezone: "Europe/Zagreb" },
|
|
11832
|
+
"SK": { code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}", defaultLanguages: ["sk"], timezone: "Europe/Bratislava" },
|
|
11833
|
+
"SI": { code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}", defaultLanguages: ["sl"], timezone: "Europe/Ljubljana" },
|
|
11834
|
+
"RS": { code: "RS", name: "Serbia", flag: "\u{1F1F7}\u{1F1F8}", defaultLanguages: ["sr"], timezone: "Europe/Belgrade" },
|
|
11835
|
+
"UA": { code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}", defaultLanguages: ["uk"], timezone: "Europe/Kyiv" },
|
|
11836
|
+
"RU": { code: "RU", name: "Russia", flag: "\u{1F1F7}\u{1F1FA}", defaultLanguages: ["ru"], timezone: "Europe/Moscow" },
|
|
11837
|
+
"TR": { code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}", defaultLanguages: ["tr"], timezone: "Europe/Istanbul" },
|
|
11838
|
+
"GR": { code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}", defaultLanguages: ["el"], timezone: "Europe/Athens" },
|
|
11839
|
+
// East Asia
|
|
11840
|
+
"JP": { code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}", defaultLanguages: ["ja"], timezone: "Asia/Tokyo" },
|
|
11841
|
+
"KR": { code: "KR", name: "South Korea", flag: "\u{1F1F0}\u{1F1F7}", defaultLanguages: ["ko"], timezone: "Asia/Seoul" },
|
|
11842
|
+
"CN": { code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}", defaultLanguages: ["zh"], timezone: "Asia/Shanghai" },
|
|
11843
|
+
"TW": { code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}", defaultLanguages: ["zh"], timezone: "Asia/Taipei" },
|
|
11844
|
+
// Southeast Asia
|
|
11845
|
+
"TH": { code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}", defaultLanguages: ["th"], timezone: "Asia/Bangkok" },
|
|
11846
|
+
"VN": { code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}", defaultLanguages: ["vi"], timezone: "Asia/Ho_Chi_Minh" },
|
|
11847
|
+
"ID": { code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}", defaultLanguages: ["id"], timezone: "Asia/Jakarta" },
|
|
11848
|
+
"MY": { code: "MY", name: "Malaysia", flag: "\u{1F1F2}\u{1F1FE}", defaultLanguages: ["ms", "en"], timezone: "Asia/Kuala_Lumpur" },
|
|
11849
|
+
"PH": { code: "PH", name: "Philippines", flag: "\u{1F1F5}\u{1F1ED}", defaultLanguages: ["en"], timezone: "Asia/Manila" },
|
|
11850
|
+
"SG": { code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}", defaultLanguages: ["en", "ms", "zh"], timezone: "Asia/Singapore" },
|
|
11851
|
+
// South America
|
|
11852
|
+
"BR": { code: "BR", name: "Brazil", flag: "\u{1F1E7}\u{1F1F7}", defaultLanguages: ["pt"], timezone: "America/Sao_Paulo" },
|
|
11853
|
+
"AR": { code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}", defaultLanguages: ["es"], timezone: "America/Argentina/Buenos_Aires" },
|
|
11854
|
+
"CO": { code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}", defaultLanguages: ["es"], timezone: "America/Bogota" },
|
|
11855
|
+
"CL": { code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}", defaultLanguages: ["es"], timezone: "America/Santiago" },
|
|
11856
|
+
// Middle East & North Africa
|
|
11857
|
+
"SA": { code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}", defaultLanguages: ["ar"], timezone: "Asia/Riyadh" },
|
|
11858
|
+
"AE": { code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}", defaultLanguages: ["ar", "en"], timezone: "Asia/Dubai" },
|
|
11859
|
+
"IL": { code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}", defaultLanguages: ["he"], timezone: "Asia/Jerusalem" },
|
|
11860
|
+
"EG": { code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}", defaultLanguages: ["ar"], timezone: "Africa/Cairo" }
|
|
11861
|
+
};
|
|
11862
|
+
|
|
11863
|
+
// ../location-selector/dist/index.js
|
|
11864
|
+
function createLocationSelector(options = {}) {
|
|
11865
|
+
const {
|
|
11866
|
+
defaultCountry = "US",
|
|
11867
|
+
defaultLanguage = "en",
|
|
11868
|
+
onCountryChange,
|
|
11869
|
+
onLanguageChange
|
|
11870
|
+
} = options;
|
|
11871
|
+
let state = {
|
|
11872
|
+
country: defaultCountry,
|
|
11873
|
+
language: defaultLanguage
|
|
11874
|
+
};
|
|
11875
|
+
const countryId = generateId("location-sel-country");
|
|
11876
|
+
const languageId = generateId("location-sel-language");
|
|
11877
|
+
function setCountry(country) {
|
|
11878
|
+
state.country = country;
|
|
11879
|
+
onCountryChange?.(country);
|
|
11880
|
+
}
|
|
11881
|
+
function setLanguage(language) {
|
|
11882
|
+
state.language = language;
|
|
11883
|
+
onLanguageChange?.(language);
|
|
11884
|
+
}
|
|
11885
|
+
const countries = Array.isArray(COUNTRIES) ? COUNTRIES : Object.values(COUNTRIES);
|
|
11886
|
+
const languages = Array.isArray(LANGUAGES) ? LANGUAGES : Object.values(LANGUAGES);
|
|
11887
|
+
return {
|
|
11888
|
+
state,
|
|
11889
|
+
setCountry,
|
|
11890
|
+
setLanguage,
|
|
11891
|
+
countries,
|
|
11892
|
+
languages,
|
|
11893
|
+
countryProps: {
|
|
11894
|
+
id: countryId,
|
|
11895
|
+
name: "country"
|
|
11896
|
+
},
|
|
11897
|
+
languageProps: {
|
|
11898
|
+
id: languageId,
|
|
11899
|
+
name: "language"
|
|
11900
|
+
}
|
|
11901
|
+
};
|
|
11902
|
+
}
|
|
11903
|
+
|
|
11904
|
+
// ../react-location-selector/dist/index.js
|
|
11905
|
+
function LocationSelector({
|
|
11906
|
+
defaultCountry = "US",
|
|
11907
|
+
defaultLanguage = "en",
|
|
11908
|
+
onCountryChange,
|
|
11909
|
+
onLanguageChange,
|
|
11910
|
+
className
|
|
11911
|
+
}) {
|
|
11912
|
+
const [country, setCountry] = React23.useState(defaultCountry);
|
|
11913
|
+
const [language, setLanguage] = React23.useState(defaultLanguage);
|
|
11914
|
+
const handleCountryChange = React23.useCallback(
|
|
11915
|
+
(c) => {
|
|
11916
|
+
setCountry(c);
|
|
11917
|
+
onCountryChange?.(c);
|
|
11918
|
+
},
|
|
11919
|
+
[onCountryChange]
|
|
11920
|
+
);
|
|
11921
|
+
const handleLanguageChange = React23.useCallback(
|
|
11922
|
+
(l) => {
|
|
11923
|
+
setLanguage(l);
|
|
11924
|
+
onLanguageChange?.(l);
|
|
11925
|
+
},
|
|
11926
|
+
[onLanguageChange]
|
|
11927
|
+
);
|
|
11928
|
+
const api = React23.useMemo(
|
|
11929
|
+
() => createLocationSelector({
|
|
11930
|
+
defaultCountry,
|
|
11931
|
+
defaultLanguage,
|
|
11932
|
+
onCountryChange: handleCountryChange,
|
|
11933
|
+
onLanguageChange: handleLanguageChange
|
|
11934
|
+
}),
|
|
11935
|
+
[defaultCountry, defaultLanguage, handleCountryChange, handleLanguageChange]
|
|
11936
|
+
);
|
|
11937
|
+
return React23.createElement(
|
|
11938
|
+
"div",
|
|
11939
|
+
{ className: cn("flex flex-col gap-4 sm:flex-row", className) },
|
|
11940
|
+
React23.createElement(
|
|
11941
|
+
"div",
|
|
11942
|
+
{ className: "flex flex-col gap-1.5 flex-1" },
|
|
11943
|
+
React23.createElement("label", { htmlFor: api.countryProps.id, className: "text-sm font-medium" }, "Country"),
|
|
11944
|
+
React23.createElement(
|
|
11945
|
+
"select",
|
|
11946
|
+
{
|
|
11947
|
+
id: api.countryProps.id,
|
|
11948
|
+
name: api.countryProps.name,
|
|
11949
|
+
value: country,
|
|
11950
|
+
onChange: (e) => api.setCountry(e.target.value),
|
|
11951
|
+
className: "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
11952
|
+
},
|
|
11953
|
+
api.countries.map(
|
|
11954
|
+
(c) => React23.createElement("option", { key: c.code || c.id || c, value: c.code || c.id || c }, c.name || c.label || c)
|
|
11955
|
+
)
|
|
11956
|
+
)
|
|
11957
|
+
),
|
|
11958
|
+
React23.createElement(
|
|
11959
|
+
"div",
|
|
11960
|
+
{ className: "flex flex-col gap-1.5 flex-1" },
|
|
11961
|
+
React23.createElement("label", { htmlFor: api.languageProps.id, className: "text-sm font-medium" }, "Language"),
|
|
11962
|
+
React23.createElement(
|
|
11963
|
+
"select",
|
|
11964
|
+
{
|
|
11965
|
+
id: api.languageProps.id,
|
|
11966
|
+
name: api.languageProps.name,
|
|
11967
|
+
value: language,
|
|
11968
|
+
onChange: (e) => api.setLanguage(e.target.value),
|
|
11969
|
+
className: "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
11970
|
+
},
|
|
11971
|
+
api.languages.map(
|
|
11972
|
+
(l) => React23.createElement("option", { key: l.code || l.id || l, value: l.code || l.id || l }, l.name || l.label || l)
|
|
11973
|
+
)
|
|
11974
|
+
)
|
|
11975
|
+
)
|
|
11976
|
+
);
|
|
11977
|
+
}
|
|
11978
|
+
|
|
10782
11979
|
// ../mascot/dist/index.js
|
|
10783
11980
|
function getMascotMoodStyles(mood) {
|
|
10784
11981
|
switch (mood) {
|
|
@@ -15871,6 +17068,464 @@ Object.assign(AuthShellRoot, {
|
|
|
15871
17068
|
Card: AuthShellCard
|
|
15872
17069
|
});
|
|
15873
17070
|
|
|
17071
|
+
// ../diff-viewer/dist/index.js
|
|
17072
|
+
var extToLanguage = {
|
|
17073
|
+
ts: "typescript",
|
|
17074
|
+
tsx: "typescript",
|
|
17075
|
+
js: "javascript",
|
|
17076
|
+
jsx: "javascript",
|
|
17077
|
+
py: "python",
|
|
17078
|
+
go: "go",
|
|
17079
|
+
rs: "rust",
|
|
17080
|
+
rb: "ruby",
|
|
17081
|
+
java: "java",
|
|
17082
|
+
swift: "swift",
|
|
17083
|
+
kt: "kotlin",
|
|
17084
|
+
dart: "dart",
|
|
17085
|
+
php: "php",
|
|
17086
|
+
lua: "lua",
|
|
17087
|
+
r: "r",
|
|
17088
|
+
scala: "scala",
|
|
17089
|
+
json: "json",
|
|
17090
|
+
yaml: "yaml",
|
|
17091
|
+
yml: "yaml",
|
|
17092
|
+
md: "markdown",
|
|
17093
|
+
html: "html",
|
|
17094
|
+
css: "css",
|
|
17095
|
+
scss: "scss",
|
|
17096
|
+
sql: "sql",
|
|
17097
|
+
sh: "shell",
|
|
17098
|
+
bash: "shell",
|
|
17099
|
+
zsh: "shell",
|
|
17100
|
+
xml: "xml",
|
|
17101
|
+
toml: "toml",
|
|
17102
|
+
proto: "protobuf",
|
|
17103
|
+
dockerfile: "dockerfile",
|
|
17104
|
+
cpp: "cpp",
|
|
17105
|
+
c: "c"
|
|
17106
|
+
};
|
|
17107
|
+
function getLanguageForFile(filePath) {
|
|
17108
|
+
const ext = filePath.split(".").pop()?.toLowerCase() || "";
|
|
17109
|
+
const basename = filePath.split("/").pop()?.toLowerCase() || "";
|
|
17110
|
+
if (basename === "dockerfile") return "dockerfile";
|
|
17111
|
+
return extToLanguage[ext] || "plaintext";
|
|
17112
|
+
}
|
|
17113
|
+
var statusIcons = {
|
|
17114
|
+
added: "\u{1F7E2}",
|
|
17115
|
+
// green circle
|
|
17116
|
+
modified: "\u{1F7E1}",
|
|
17117
|
+
// yellow circle
|
|
17118
|
+
deleted: "\u{1F534}",
|
|
17119
|
+
// red circle
|
|
17120
|
+
renamed: "\u{1F535}"
|
|
17121
|
+
// blue circle
|
|
17122
|
+
};
|
|
17123
|
+
function createDiffViewer(props = {}) {
|
|
17124
|
+
const {
|
|
17125
|
+
files = [],
|
|
17126
|
+
activeFileIndex = 0,
|
|
17127
|
+
viewMode = "side-by-side",
|
|
17128
|
+
theme = "dark",
|
|
17129
|
+
language,
|
|
17130
|
+
sidebarOpen = true,
|
|
17131
|
+
onFileSelect,
|
|
17132
|
+
onViewModeChange,
|
|
17133
|
+
onSidebarToggle
|
|
17134
|
+
} = props;
|
|
17135
|
+
let currentIndex = Math.min(activeFileIndex, Math.max(0, files.length - 1));
|
|
17136
|
+
let currentViewMode = viewMode;
|
|
17137
|
+
let currentSidebarOpen = sidebarOpen;
|
|
17138
|
+
const state = {
|
|
17139
|
+
activeFileIndex: currentIndex,
|
|
17140
|
+
viewMode: currentViewMode,
|
|
17141
|
+
theme,
|
|
17142
|
+
language: language || (files[currentIndex] ? getLanguageForFile(files[currentIndex].path) : "plaintext"),
|
|
17143
|
+
sidebarOpen: currentSidebarOpen,
|
|
17144
|
+
files
|
|
17145
|
+
};
|
|
17146
|
+
const ariaProps = {
|
|
17147
|
+
role: "region",
|
|
17148
|
+
"aria-label": "Diff viewer"
|
|
17149
|
+
};
|
|
17150
|
+
const dataAttributes = {
|
|
17151
|
+
"data-view-mode": currentViewMode,
|
|
17152
|
+
"data-theme": theme,
|
|
17153
|
+
"data-file-count": String(files.length)
|
|
17154
|
+
};
|
|
17155
|
+
if (!currentSidebarOpen) {
|
|
17156
|
+
dataAttributes["data-sidebar-collapsed"] = "";
|
|
17157
|
+
}
|
|
17158
|
+
function selectFile(index) {
|
|
17159
|
+
if (index >= 0 && index < files.length) {
|
|
17160
|
+
currentIndex = index;
|
|
17161
|
+
state.activeFileIndex = index;
|
|
17162
|
+
state.language = language || getLanguageForFile(files[index].path);
|
|
17163
|
+
onFileSelect?.(index);
|
|
17164
|
+
}
|
|
17165
|
+
}
|
|
17166
|
+
function nextFile() {
|
|
17167
|
+
if (currentIndex < files.length - 1) {
|
|
17168
|
+
selectFile(currentIndex + 1);
|
|
17169
|
+
}
|
|
17170
|
+
}
|
|
17171
|
+
function prevFile() {
|
|
17172
|
+
if (currentIndex > 0) {
|
|
17173
|
+
selectFile(currentIndex - 1);
|
|
17174
|
+
}
|
|
17175
|
+
}
|
|
17176
|
+
function toggleViewMode() {
|
|
17177
|
+
currentViewMode = currentViewMode === "side-by-side" ? "inline" : "side-by-side";
|
|
17178
|
+
state.viewMode = currentViewMode;
|
|
17179
|
+
dataAttributes["data-view-mode"] = currentViewMode;
|
|
17180
|
+
onViewModeChange?.(currentViewMode);
|
|
17181
|
+
}
|
|
17182
|
+
function toggleSidebar() {
|
|
17183
|
+
currentSidebarOpen = !currentSidebarOpen;
|
|
17184
|
+
state.sidebarOpen = currentSidebarOpen;
|
|
17185
|
+
if (currentSidebarOpen) {
|
|
17186
|
+
delete dataAttributes["data-sidebar-collapsed"];
|
|
17187
|
+
} else {
|
|
17188
|
+
dataAttributes["data-sidebar-collapsed"] = "";
|
|
17189
|
+
}
|
|
17190
|
+
onSidebarToggle?.();
|
|
17191
|
+
}
|
|
17192
|
+
function totalAdditions() {
|
|
17193
|
+
return files.reduce((sum, f) => sum + f.additions, 0);
|
|
17194
|
+
}
|
|
17195
|
+
function totalDeletions() {
|
|
17196
|
+
return files.reduce((sum, f) => sum + f.deletions, 0);
|
|
17197
|
+
}
|
|
17198
|
+
return {
|
|
17199
|
+
state,
|
|
17200
|
+
ariaProps,
|
|
17201
|
+
dataAttributes,
|
|
17202
|
+
selectFile,
|
|
17203
|
+
nextFile,
|
|
17204
|
+
prevFile,
|
|
17205
|
+
toggleViewMode,
|
|
17206
|
+
toggleSidebar,
|
|
17207
|
+
getLanguageForFile,
|
|
17208
|
+
getFileStatusIcon: (status) => statusIcons[status] || "\u26AA",
|
|
17209
|
+
totalAdditions,
|
|
17210
|
+
totalDeletions
|
|
17211
|
+
};
|
|
17212
|
+
}
|
|
17213
|
+
var diffViewerTokens = {
|
|
17214
|
+
name: "diff-viewer",
|
|
17215
|
+
tokens: {
|
|
17216
|
+
bg: { variable: "--rfr-diff-bg", fallback: "hsl(var(--background))" },
|
|
17217
|
+
fg: { variable: "--rfr-diff-fg", fallback: "hsl(var(--foreground))" },
|
|
17218
|
+
sidebarBg: { variable: "--rfr-diff-sidebar-bg", fallback: "hsl(var(--muted))" },
|
|
17219
|
+
headerBg: { variable: "--rfr-diff-header-bg", fallback: "hsl(var(--muted))" },
|
|
17220
|
+
border: { variable: "--rfr-diff-border", fallback: "hsl(var(--border))" },
|
|
17221
|
+
addBg: { variable: "--rfr-diff-add-bg", fallback: "rgba(46, 160, 67, 0.15)" },
|
|
17222
|
+
delBg: { variable: "--rfr-diff-del-bg", fallback: "rgba(248, 81, 73, 0.15)" },
|
|
17223
|
+
addFg: { variable: "--rfr-diff-add-fg", fallback: "#3fb950" },
|
|
17224
|
+
delFg: { variable: "--rfr-diff-del-fg", fallback: "#f85149" },
|
|
17225
|
+
statusbar: { variable: "--rfr-diff-statusbar", fallback: "hsl(var(--primary))" },
|
|
17226
|
+
statusbarFg: { variable: "--rfr-diff-statusbar-fg", fallback: "hsl(var(--primary-foreground))" }
|
|
17227
|
+
}
|
|
17228
|
+
};
|
|
17229
|
+
var diffViewerVariants = cva({
|
|
17230
|
+
base: "flex flex-col overflow-hidden font-sans text-sm",
|
|
17231
|
+
variants: {
|
|
17232
|
+
theme: {
|
|
17233
|
+
light: "bg-white text-gray-900",
|
|
17234
|
+
dark: "bg-gray-950 text-gray-100"
|
|
17235
|
+
},
|
|
17236
|
+
fullscreen: {
|
|
17237
|
+
"true": "h-screen",
|
|
17238
|
+
"false": ""
|
|
17239
|
+
}
|
|
17240
|
+
},
|
|
17241
|
+
defaultVariants: {
|
|
17242
|
+
theme: "dark",
|
|
17243
|
+
fullscreen: "true"
|
|
17244
|
+
}
|
|
17245
|
+
});
|
|
17246
|
+
var sidebarVariants2 = cva({
|
|
17247
|
+
base: "border-r overflow-auto flex-shrink-0",
|
|
17248
|
+
variants: {
|
|
17249
|
+
theme: {
|
|
17250
|
+
light: "bg-gray-50 border-gray-200",
|
|
17251
|
+
dark: "bg-gray-900 border-gray-800"
|
|
17252
|
+
}
|
|
17253
|
+
},
|
|
17254
|
+
defaultVariants: {
|
|
17255
|
+
theme: "dark"
|
|
17256
|
+
}
|
|
17257
|
+
});
|
|
17258
|
+
var sidebarItemVariants2 = cva({
|
|
17259
|
+
base: "px-2.5 py-1 cursor-pointer text-xs font-mono transition-colors",
|
|
17260
|
+
variants: {
|
|
17261
|
+
active: {
|
|
17262
|
+
"true": "border-l-2 border-blue-500",
|
|
17263
|
+
"false": "border-l-2 border-transparent"
|
|
17264
|
+
},
|
|
17265
|
+
theme: {
|
|
17266
|
+
light: "",
|
|
17267
|
+
dark: ""
|
|
17268
|
+
}
|
|
17269
|
+
},
|
|
17270
|
+
compoundVariants: [
|
|
17271
|
+
{ active: "true", theme: "dark", class: "bg-gray-800 text-gray-100" },
|
|
17272
|
+
{ active: "false", theme: "dark", class: "text-gray-400 hover:bg-gray-800/50" },
|
|
17273
|
+
{ active: "true", theme: "light", class: "bg-blue-50 text-gray-900" },
|
|
17274
|
+
{ active: "false", theme: "light", class: "text-gray-600 hover:bg-gray-100" }
|
|
17275
|
+
],
|
|
17276
|
+
defaultVariants: {
|
|
17277
|
+
active: "false",
|
|
17278
|
+
theme: "dark"
|
|
17279
|
+
}
|
|
17280
|
+
});
|
|
17281
|
+
var tabBarVariants = cva({
|
|
17282
|
+
base: "flex items-center border-b overflow-auto flex-shrink-0",
|
|
17283
|
+
variants: {
|
|
17284
|
+
theme: {
|
|
17285
|
+
light: "bg-gray-50 border-gray-200",
|
|
17286
|
+
dark: "bg-gray-900 border-gray-800"
|
|
17287
|
+
}
|
|
17288
|
+
},
|
|
17289
|
+
defaultVariants: {
|
|
17290
|
+
theme: "dark"
|
|
17291
|
+
}
|
|
17292
|
+
});
|
|
17293
|
+
var tabVariants = cva({
|
|
17294
|
+
base: "px-3 h-[35px] flex items-center gap-1 cursor-pointer text-xs font-mono border-r shrink-0",
|
|
17295
|
+
variants: {
|
|
17296
|
+
active: {
|
|
17297
|
+
"true": "",
|
|
17298
|
+
"false": ""
|
|
17299
|
+
},
|
|
17300
|
+
theme: {
|
|
17301
|
+
light: "border-gray-200",
|
|
17302
|
+
dark: "border-gray-800"
|
|
17303
|
+
}
|
|
17304
|
+
},
|
|
17305
|
+
compoundVariants: [
|
|
17306
|
+
{ active: "true", theme: "dark", class: "bg-gray-950 text-gray-100 border-b-gray-950 -mb-px" },
|
|
17307
|
+
{ active: "false", theme: "dark", class: "text-gray-400" },
|
|
17308
|
+
{ active: "true", theme: "light", class: "bg-white text-gray-900 border-b-white -mb-px" },
|
|
17309
|
+
{ active: "false", theme: "light", class: "text-gray-500" }
|
|
17310
|
+
],
|
|
17311
|
+
defaultVariants: {
|
|
17312
|
+
active: "false",
|
|
17313
|
+
theme: "dark"
|
|
17314
|
+
}
|
|
17315
|
+
});
|
|
17316
|
+
var statusBarVariants = cva({
|
|
17317
|
+
base: "h-[22px] flex items-center px-2.5 gap-3 text-[11px] font-mono flex-shrink-0",
|
|
17318
|
+
variants: {
|
|
17319
|
+
theme: {
|
|
17320
|
+
light: "bg-blue-600 text-white",
|
|
17321
|
+
dark: "bg-blue-700 text-white"
|
|
17322
|
+
}
|
|
17323
|
+
},
|
|
17324
|
+
defaultVariants: {
|
|
17325
|
+
theme: "dark"
|
|
17326
|
+
}
|
|
17327
|
+
});
|
|
17328
|
+
var MonacoDiffEditor = React23.lazy(
|
|
17329
|
+
() => import('./dist-IBD7CHHX.js').then((m) => ({ default: m.DiffEditor }))
|
|
17330
|
+
);
|
|
17331
|
+
var DiffViewer = React23.forwardRef(
|
|
17332
|
+
({
|
|
17333
|
+
files,
|
|
17334
|
+
original = "",
|
|
17335
|
+
modified = "",
|
|
17336
|
+
language,
|
|
17337
|
+
monacoTheme = "vs-dark",
|
|
17338
|
+
theme = "dark",
|
|
17339
|
+
viewMode: controlledViewMode = "side-by-side",
|
|
17340
|
+
showSidebar = true,
|
|
17341
|
+
showTabs = true,
|
|
17342
|
+
showStatusBar = true,
|
|
17343
|
+
sidebarWidth = 220,
|
|
17344
|
+
activeFileIndex: controlledIndex = 0,
|
|
17345
|
+
onFileSelect,
|
|
17346
|
+
onViewModeChange,
|
|
17347
|
+
statusBarTitle,
|
|
17348
|
+
statusBarStatus,
|
|
17349
|
+
className,
|
|
17350
|
+
editorOptions
|
|
17351
|
+
}, ref) => {
|
|
17352
|
+
const [activeIdx, setActiveIdx] = React23.useState(controlledIndex);
|
|
17353
|
+
const [sidebarOpen, setSidebarOpen] = React23.useState(showSidebar);
|
|
17354
|
+
const [viewMode, setViewMode] = React23.useState(controlledViewMode);
|
|
17355
|
+
React23.useEffect(() => setActiveIdx(controlledIndex), [controlledIndex]);
|
|
17356
|
+
React23.useEffect(() => setViewMode(controlledViewMode), [controlledViewMode]);
|
|
17357
|
+
const api = React23.useMemo(
|
|
17358
|
+
() => createDiffViewer({
|
|
17359
|
+
files,
|
|
17360
|
+
activeFileIndex: activeIdx,
|
|
17361
|
+
viewMode,
|
|
17362
|
+
theme,
|
|
17363
|
+
language,
|
|
17364
|
+
sidebarOpen,
|
|
17365
|
+
onFileSelect: (i) => {
|
|
17366
|
+
setActiveIdx(i);
|
|
17367
|
+
onFileSelect?.(i);
|
|
17368
|
+
},
|
|
17369
|
+
onViewModeChange: (m) => {
|
|
17370
|
+
setViewMode(m);
|
|
17371
|
+
onViewModeChange?.(m);
|
|
17372
|
+
},
|
|
17373
|
+
onSidebarToggle: () => setSidebarOpen((s) => !s)
|
|
17374
|
+
}),
|
|
17375
|
+
[files, activeIdx, viewMode, theme, language, sidebarOpen, onFileSelect, onViewModeChange]
|
|
17376
|
+
);
|
|
17377
|
+
const activeFile = files[activeIdx];
|
|
17378
|
+
const detectedLang = language || (activeFile ? api.getLanguageForFile(activeFile.path) : "plaintext");
|
|
17379
|
+
React23.useEffect(() => {
|
|
17380
|
+
function onKey(e) {
|
|
17381
|
+
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
|
|
17382
|
+
if (e.key === "j") {
|
|
17383
|
+
setActiveIdx((i) => {
|
|
17384
|
+
const next = Math.min(i + 1, files.length - 1);
|
|
17385
|
+
onFileSelect?.(next);
|
|
17386
|
+
return next;
|
|
17387
|
+
});
|
|
17388
|
+
} else if (e.key === "k") {
|
|
17389
|
+
setActiveIdx((i) => {
|
|
17390
|
+
const prev = Math.max(i - 1, 0);
|
|
17391
|
+
onFileSelect?.(prev);
|
|
17392
|
+
return prev;
|
|
17393
|
+
});
|
|
17394
|
+
} else if (e.key === "b") {
|
|
17395
|
+
setSidebarOpen((s) => !s);
|
|
17396
|
+
}
|
|
17397
|
+
}
|
|
17398
|
+
window.addEventListener("keydown", onKey);
|
|
17399
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
17400
|
+
}, [files.length, onFileSelect]);
|
|
17401
|
+
return /* @__PURE__ */ jsxs(
|
|
17402
|
+
"div",
|
|
17403
|
+
{
|
|
17404
|
+
ref,
|
|
17405
|
+
className: cn(diffViewerVariants({ theme, fullscreen: "true" }), className),
|
|
17406
|
+
...api.ariaProps,
|
|
17407
|
+
...api.dataAttributes,
|
|
17408
|
+
children: [
|
|
17409
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, display: "flex", overflow: "hidden" }, children: [
|
|
17410
|
+
sidebarOpen && /* @__PURE__ */ jsxs("div", { className: sidebarVariants2({ theme }), style: { width: sidebarWidth }, children: [
|
|
17411
|
+
/* @__PURE__ */ jsxs("div", { className: "px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: [
|
|
17412
|
+
"Files (",
|
|
17413
|
+
files.length,
|
|
17414
|
+
")"
|
|
17415
|
+
] }),
|
|
17416
|
+
files.map((f, i) => {
|
|
17417
|
+
const active = i === activeIdx;
|
|
17418
|
+
const fname = f.path.split("/").pop() || f.path;
|
|
17419
|
+
const dir = f.path.split("/").slice(0, -1).join("/");
|
|
17420
|
+
return /* @__PURE__ */ jsxs(
|
|
17421
|
+
"div",
|
|
17422
|
+
{
|
|
17423
|
+
onClick: () => {
|
|
17424
|
+
setActiveIdx(i);
|
|
17425
|
+
onFileSelect?.(i);
|
|
17426
|
+
},
|
|
17427
|
+
className: sidebarItemVariants2({ active: active ? "true" : "false", theme }),
|
|
17428
|
+
children: [
|
|
17429
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
17430
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px]", children: api.getFileStatusIcon(f.status) }),
|
|
17431
|
+
/* @__PURE__ */ jsx("span", { className: active ? "" : "opacity-70", children: fname }),
|
|
17432
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto text-[10px]", children: [
|
|
17433
|
+
/* @__PURE__ */ jsxs("span", { className: "text-green-500", children: [
|
|
17434
|
+
"+",
|
|
17435
|
+
f.additions
|
|
17436
|
+
] }),
|
|
17437
|
+
f.deletions > 0 && /* @__PURE__ */ jsxs("span", { className: "text-red-500", children: [
|
|
17438
|
+
"-",
|
|
17439
|
+
f.deletions
|
|
17440
|
+
] })
|
|
17441
|
+
] })
|
|
17442
|
+
] }),
|
|
17443
|
+
dir && /* @__PURE__ */ jsx("div", { className: "text-[10px] opacity-50 mt-0.5 pl-4", children: dir })
|
|
17444
|
+
]
|
|
17445
|
+
},
|
|
17446
|
+
f.path
|
|
17447
|
+
);
|
|
17448
|
+
})
|
|
17449
|
+
] }),
|
|
17450
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
|
17451
|
+
showTabs && activeFile && /* @__PURE__ */ jsx("div", { className: tabBarVariants({ theme }), children: files.map((f, i) => {
|
|
17452
|
+
const active = i === activeIdx;
|
|
17453
|
+
const fname = f.path.split("/").pop() || f.path;
|
|
17454
|
+
return /* @__PURE__ */ jsxs(
|
|
17455
|
+
"div",
|
|
17456
|
+
{
|
|
17457
|
+
onClick: () => {
|
|
17458
|
+
setActiveIdx(i);
|
|
17459
|
+
onFileSelect?.(i);
|
|
17460
|
+
},
|
|
17461
|
+
className: tabVariants({ active: active ? "true" : "false", theme }),
|
|
17462
|
+
children: [
|
|
17463
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px]", children: api.getFileStatusIcon(f.status) }),
|
|
17464
|
+
fname
|
|
17465
|
+
]
|
|
17466
|
+
},
|
|
17467
|
+
f.path
|
|
17468
|
+
);
|
|
17469
|
+
}) }),
|
|
17470
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx(
|
|
17471
|
+
React23.Suspense,
|
|
17472
|
+
{
|
|
17473
|
+
fallback: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full text-xs opacity-50", children: "Loading editor..." }),
|
|
17474
|
+
children: /* @__PURE__ */ jsx(
|
|
17475
|
+
MonacoDiffEditor,
|
|
17476
|
+
{
|
|
17477
|
+
original,
|
|
17478
|
+
modified,
|
|
17479
|
+
language: detectedLang,
|
|
17480
|
+
theme: monacoTheme,
|
|
17481
|
+
options: {
|
|
17482
|
+
readOnly: true,
|
|
17483
|
+
renderSideBySide: viewMode === "side-by-side",
|
|
17484
|
+
minimap: { enabled: true, scale: 1, showSlider: "mouseover" },
|
|
17485
|
+
fontSize: 13,
|
|
17486
|
+
lineHeight: 20,
|
|
17487
|
+
fontFamily: "'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",
|
|
17488
|
+
fontLigatures: true,
|
|
17489
|
+
scrollBeyondLastLine: false,
|
|
17490
|
+
renderOverviewRuler: true,
|
|
17491
|
+
scrollbar: { verticalScrollbarSize: 10, horizontalScrollbarSize: 10 },
|
|
17492
|
+
padding: { top: 8, bottom: 8 },
|
|
17493
|
+
renderWhitespace: "selection",
|
|
17494
|
+
bracketPairColorization: { enabled: true },
|
|
17495
|
+
guides: { indentation: true },
|
|
17496
|
+
smoothScrolling: true,
|
|
17497
|
+
cursorBlinking: "smooth",
|
|
17498
|
+
...editorOptions
|
|
17499
|
+
}
|
|
17500
|
+
}
|
|
17501
|
+
)
|
|
17502
|
+
}
|
|
17503
|
+
) })
|
|
17504
|
+
] })
|
|
17505
|
+
] }),
|
|
17506
|
+
showStatusBar && /* @__PURE__ */ jsxs("div", { className: statusBarVariants({ theme }), children: [
|
|
17507
|
+
statusBarTitle && /* @__PURE__ */ jsx("span", { children: statusBarTitle }),
|
|
17508
|
+
activeFile && /* @__PURE__ */ jsx("span", { children: activeFile.path }),
|
|
17509
|
+
/* @__PURE__ */ jsxs("span", { style: { marginLeft: "auto" }, children: [
|
|
17510
|
+
"+",
|
|
17511
|
+
api.totalAdditions(),
|
|
17512
|
+
" -",
|
|
17513
|
+
api.totalDeletions()
|
|
17514
|
+
] }),
|
|
17515
|
+
statusBarStatus && /* @__PURE__ */ jsx("span", { children: statusBarStatus }),
|
|
17516
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
17517
|
+
files.length,
|
|
17518
|
+
" ",
|
|
17519
|
+
files.length === 1 ? "file" : "files"
|
|
17520
|
+
] })
|
|
17521
|
+
] })
|
|
17522
|
+
]
|
|
17523
|
+
}
|
|
17524
|
+
);
|
|
17525
|
+
}
|
|
17526
|
+
);
|
|
17527
|
+
DiffViewer.displayName = "DiffViewer";
|
|
17528
|
+
|
|
15874
17529
|
// ../avatar/dist/index.js
|
|
15875
17530
|
function getInitials(name) {
|
|
15876
17531
|
const parts = name.trim().split(/\s+/);
|
|
@@ -26462,6 +28117,6 @@ var SlotPicker = React23.forwardRef(
|
|
|
26462
28117
|
);
|
|
26463
28118
|
SlotPicker.displayName = "SlotPicker";
|
|
26464
28119
|
|
|
26465
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AudienceFeatureCard, AudioRoom, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, BrandNetworkCell, Breadcrumbs, BrowserChromeMock, Button, CATEGORY_LABELS, CURSOR_COLORS, Calendar, CalendarHeader, CallControlButton, CallControls, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chat, Checkbox, Checklist, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ConfirmationCard, ContentProtection, CookieConsent, Cursor, DEFAULT_CATEGORIES, DEFAULT_COMPOSER_STRINGS, DEFAULT_TWEMOJI_BASE_URL, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_COUNT_TOTAL, EMOJI_DATA, EditorStatusBar, EditorTabs, EmojiPicker, EmptyState, FeedbackButton, FeedbackDialog, FileTree, FileUpload, FloatingReactions, FlowEditor, Footer, GraphView, IconSystem, InfiniteCanvas, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KanbanBoard, KanbanCard, KanbanColumn, KeyboardShortcut, LanguageSelector, LinkCard, LiveCaptions, LiveCursors, LiveTranscript, MarkdownRenderer, MarqueeStrip, Mascot, MasteryBar, MiniMap, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, NumberedSteps, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, PasswordInput, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PreCallLobby, PresenceIndicator, PricingCard, ProgressBar, RadialGauge, RadioGroup, RadioItem, RatingScale, ReactionBar, ReactionBurst, RefractionComposer, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, SHORTCODE_ALIASES, STARTER_STICKER_SET, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, STICKY_NOTE_COLORS, SearchBar, SearchResultItem, SearchResults, SectionHead, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectItem, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, Slider, SlotPicker, SocialAuthButton, SocialAuthRow, SortableList, SpeakingOrb, StatGrid, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, StickyNote, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Terminal, TestResults, Textarea, ThreadView, Timeline, TimelineItem, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoGrid, VideoPlayer, VideoTile, VoicePill, Waveform, Wizard, altHintState, animatedTextVariants, assignCursorColor, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buildShortcodeMap, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, composerAccessoryPanelClass, composerAccessoryToggleVariants, composerAttachmentChipVariants, composerCounterVariants, composerFieldClass, composerMenuClass, composerMenuItemVariants, composerPrimaryActionVariants, composerSurfaceVariants, composerTokenPillClass, composerTrayClass, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createComposer, createConsoleSink, createConversation, createCookieConsent, createEmojiTrigger, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createPreCallLobby, createSegmentedControl, createSilentSamples, createTelemetry, createTwemojiRenderer, createVoicePill, createWaveform, dayVariants, defaultStickerRenderer, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAllEmojis, getAssignableRoles, getDefaultPortal, getInitials, getNextSegmentIndex, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, micLevelToBars, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, nativeEmojiRenderer, navLinkVariants, navbarVariants, nextStickyColor, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, resolveShortcode, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchEmojis, searchResultVariants, segmentedControlItemVariants, segmentedControlVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statColumns, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toMessageAttachment, toastVariants, toolbarVariants, tooltipContentVariants, twemojiAssetUrl, twemojiFilename, twemojiRenderer, typewriterVariants, useAnalytics, useAuth, useComposer, useConversation, useCookieConsent, useFloatingReactions, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, useWizard, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
|
|
28120
|
+
export { AIProvider, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AudienceFeatureCard, AudioRoom, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, Bars, BottomNav, BrandNetworkCell, Breadcrumbs, BrowserChromeMock, Button, CATEGORY_LABELS, CURSOR_COLORS, Calendar, CalendarHeader, CallControlButton, CallControls, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chart, ChartContext, Chat, Checkbox, Checklist, Circles, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ConfirmationCard, ContentProtection, CookieConsent, Cursor, DEFAULT_CATEGORIES, DEFAULT_COMPOSER_STRINGS, DEFAULT_TWEMOJI_BASE_URL, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DiffViewer, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_COUNT_TOTAL, EMOJI_DATA, EditorStatusBar, EditorTabs, EmojiPicker, EmptyState, FeedbackButton, FeedbackDialog, FileTree, FileUpload, FloatingReactions, FlowEditor, Footer, Gradient, GraphView, Histogram, IconSystem, InfiniteCanvas, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KanbanBoard, KanbanCard, KanbanColumn, KeyboardShortcut, LanguageSelector, Line, LinkCard, LiveCaptions, LiveCursors, LiveTranscript, LocationSelector, MarkdownRenderer, MarqueeStrip, Mascot, MasteryBar, MiniMap, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, NumberedSteps, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, PasswordInput, Payment, PieChart, Popover, PopoverClose, PopoverContent, PopoverTrigger, PreCallLobby, PresenceIndicator, PricingCard, ProgressBar, RadialGauge, RadioGroup, RadioItem, RatingScale, ReactionBar, ReactionBurst, RefractionComposer, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, SHORTCODE_ALIASES, STARTER_STICKER_SET, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, STICKY_NOTE_COLORS, ScatterPlot, SearchBar, SearchResultItem, SearchResults, SectionHead, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectItem, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, Slider, SlotPicker, SocialAuthButton, SocialAuthRow, SortableList, SpeakingOrb, CommandInput3 as StandaloneCommandInput, StatGrid, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, StickyNote, Switch, TTSProvider, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Terminal, TestResults, Textarea, ThreadView, Timeline, TimelineItem, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoGrid, VideoPlayer, VideoTile, VoicePill, Waveform, Wizard, XAxis, YAxis, altHintState, animatedTextVariants, assignCursorColor, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buildShortcodeMap, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, composerAccessoryPanelClass, composerAccessoryToggleVariants, composerAttachmentChipVariants, composerCounterVariants, composerFieldClass, composerMenuClass, composerMenuItemVariants, composerPrimaryActionVariants, composerSurfaceVariants, composerTokenPillClass, composerTrayClass, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createComposer, createConsoleSink, createConversation, createCookieConsent, createDiffViewer, createEmojiTrigger, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createPreCallLobby, createSegmentedControl, createSilentSamples, createTelemetry, createTwemojiRenderer, createVoicePill, createWaveform, dayVariants, defaultStickerRenderer, deviceFrameVariants, dialogContentVariants, sidebarItemVariants2 as diffViewerSidebarItemVariants, sidebarVariants2 as diffViewerSidebarVariants, diffViewerTokens, diffViewerVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAllEmojis, getAssignableRoles, getDefaultPortal, getInitials, getNextSegmentIndex, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, micLevelToBars, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, nativeEmojiRenderer, navLinkVariants, navbarVariants, nextStickyColor, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, resolveShortcode, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchEmojis, searchResultVariants, segmentedControlItemVariants, segmentedControlVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statColumns, statsGridVariants, statusBarVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tabBarVariants, tabVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toMessageAttachment, toastVariants, toolbarVariants, tooltipContentVariants, twemojiAssetUrl, twemojiFilename, twemojiRenderer, typewriterVariants, useAI, useAnalytics, useAuth, useComposer, useConversation, useCookieConsent, useFloatingReactions, useLogger, useShortcut, useSpan, useTTS, useTelemetry, useToast, useTrackEvent, useWizard, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
|
|
26466
28121
|
//# sourceMappingURL=index.js.map
|
|
26467
28122
|
//# sourceMappingURL=index.js.map
|