@refraction-ui/react 0.4.2 → 0.6.0
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/README.md +9 -1
- package/dist/chunk-O4453CBF.js +137 -0
- package/dist/chunk-O4453CBF.js.map +1 -0
- package/dist/chunk-XWP763SH.js +76 -0
- package/dist/chunk-XWP763SH.js.map +1 -0
- package/dist/faro-engine-47HGRAQH-JKINJPMH.js +3 -0
- package/dist/faro-engine-47HGRAQH-JKINJPMH.js.map +1 -0
- package/dist/form.cjs +340 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +1 -0
- package/dist/form.d.ts +1 -0
- package/dist/form.js +204 -0
- package/dist/form.js.map +1 -0
- package/dist/index.cjs +1438 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -76
- package/dist/index.d.ts +76 -76
- package/dist/index.js +1317 -312
- package/dist/index.js.map +1 -1
- package/dist/internal/analytics/index.d.cts +448 -0
- package/dist/internal/analytics/index.d.ts +448 -0
- package/dist/internal/animated-text/index.d.cts +47 -0
- package/dist/internal/animated-text/index.d.ts +47 -0
- package/dist/internal/app-shell/index.d.cts +128 -0
- package/dist/internal/app-shell/index.d.ts +128 -0
- package/dist/internal/auth/index.d.cts +74 -0
- package/dist/internal/auth/index.d.ts +74 -0
- package/dist/internal/avatar/index.d.cts +53 -0
- package/dist/internal/avatar/index.d.ts +53 -0
- package/dist/internal/avatar-group/index.d.cts +70 -0
- package/dist/internal/avatar-group/index.d.ts +70 -0
- package/dist/internal/badge/index.d.cts +26 -0
- package/dist/internal/badge/index.d.ts +26 -0
- package/dist/internal/bottom-nav/index.d.cts +29 -0
- package/dist/internal/bottom-nav/index.d.ts +29 -0
- package/dist/internal/breadcrumbs/index.d.cts +38 -0
- package/dist/internal/breadcrumbs/index.d.ts +38 -0
- package/dist/internal/button/index.d.cts +34 -0
- package/dist/internal/button/index.d.ts +34 -0
- package/dist/internal/calendar/index.d.cts +73 -0
- package/dist/internal/calendar/index.d.ts +73 -0
- package/dist/internal/card/index.d.cts +62 -0
- package/dist/internal/card/index.d.ts +62 -0
- package/dist/internal/card-grid/index.d.cts +10 -0
- package/dist/internal/card-grid/index.d.ts +10 -0
- package/dist/internal/checkbox/index.d.cts +40 -0
- package/dist/internal/checkbox/index.d.ts +40 -0
- package/dist/internal/code-editor/index.d.cts +47 -0
- package/dist/internal/code-editor/index.d.ts +47 -0
- package/dist/internal/collapsible/index.d.cts +43 -0
- package/dist/internal/collapsible/index.d.ts +43 -0
- package/dist/internal/command/index.d.cts +80 -0
- package/dist/internal/command/index.d.ts +80 -0
- package/dist/internal/content-protection/index.d.cts +47 -0
- package/dist/internal/content-protection/index.d.ts +47 -0
- package/dist/internal/data-table/index.d.cts +73 -0
- package/dist/internal/data-table/index.d.ts +73 -0
- package/dist/internal/date-picker/index.d.cts +98 -0
- package/dist/internal/date-picker/index.d.ts +98 -0
- package/dist/internal/device-frame/index.d.cts +40 -0
- package/dist/internal/device-frame/index.d.ts +40 -0
- package/dist/internal/dialog/index.d.cts +54 -0
- package/dist/internal/dialog/index.d.ts +54 -0
- package/dist/internal/dropdown-menu/index.d.cts +55 -0
- package/dist/internal/dropdown-menu/index.d.ts +55 -0
- package/dist/internal/emoji-picker/index.d.cts +77 -0
- package/dist/internal/emoji-picker/index.d.ts +77 -0
- package/dist/internal/feedback-dialog/index.d.cts +55 -0
- package/dist/internal/feedback-dialog/index.d.ts +55 -0
- package/dist/internal/file-upload/index.d.cts +91 -0
- package/dist/internal/file-upload/index.d.ts +91 -0
- package/dist/internal/footer/index.d.cts +30 -0
- package/dist/internal/footer/index.d.ts +30 -0
- package/dist/internal/inline-editor/index.d.cts +52 -0
- package/dist/internal/inline-editor/index.d.ts +52 -0
- package/dist/internal/input/index.d.cts +38 -0
- package/dist/internal/input/index.d.ts +38 -0
- package/dist/internal/input-group/index.d.cts +35 -0
- package/dist/internal/input-group/index.d.ts +35 -0
- package/dist/internal/install-prompt/index.d.cts +36 -0
- package/dist/internal/install-prompt/index.d.ts +36 -0
- package/dist/internal/keyboard-shortcut/index.d.cts +49 -0
- package/dist/internal/keyboard-shortcut/index.d.ts +49 -0
- package/dist/internal/language-selector/index.d.cts +63 -0
- package/dist/internal/language-selector/index.d.ts +63 -0
- package/dist/internal/logger/index.d.cts +229 -0
- package/dist/internal/logger/index.d.ts +229 -0
- package/dist/internal/markdown-renderer/index.d.cts +40 -0
- package/dist/internal/markdown-renderer/index.d.ts +40 -0
- package/dist/internal/mobile-nav/index.d.cts +45 -0
- package/dist/internal/mobile-nav/index.d.ts +45 -0
- package/dist/internal/navbar/index.d.cts +30 -0
- package/dist/internal/navbar/index.d.ts +30 -0
- package/dist/internal/otp-input/index.d.cts +66 -0
- package/dist/internal/otp-input/index.d.ts +66 -0
- package/dist/internal/payment/index.d.cts +9 -0
- package/dist/internal/payment/index.d.ts +9 -0
- package/dist/internal/popover/index.d.cts +46 -0
- package/dist/internal/popover/index.d.ts +46 -0
- package/dist/internal/presence-indicator/index.d.cts +38 -0
- package/dist/internal/presence-indicator/index.d.ts +38 -0
- package/dist/internal/progress-display/index.d.cts +60 -0
- package/dist/internal/progress-display/index.d.ts +60 -0
- package/dist/internal/radio/index.d.ts +43 -0
- package/dist/internal/react-accordion/index.d.ts +22 -0
- package/dist/internal/react-analytics/index.d.cts +44 -0
- package/dist/internal/react-analytics/index.d.ts +44 -0
- package/dist/internal/react-animated-text/index.d.cts +12 -0
- package/dist/internal/react-animated-text/index.d.ts +12 -0
- package/dist/internal/react-app-shell/index.d.cts +169 -0
- package/dist/internal/react-app-shell/index.d.ts +169 -0
- package/dist/internal/react-auth/index.d.cts +59 -0
- package/dist/internal/react-auth/index.d.ts +59 -0
- package/dist/internal/react-avatar/index.d.cts +20 -0
- package/dist/internal/react-avatar/index.d.ts +20 -0
- package/dist/internal/react-avatar-group/index.d.cts +33 -0
- package/dist/internal/react-avatar-group/index.d.ts +33 -0
- package/dist/internal/react-badge/index.d.cts +17 -0
- package/dist/internal/react-badge/index.d.ts +17 -0
- package/dist/internal/react-bottom-nav/index.d.cts +19 -0
- package/dist/internal/react-bottom-nav/index.d.ts +19 -0
- package/dist/internal/react-breadcrumbs/index.d.cts +24 -0
- package/dist/internal/react-breadcrumbs/index.d.ts +24 -0
- package/dist/internal/react-button/index.d.cts +21 -0
- package/dist/internal/react-button/index.d.ts +21 -0
- package/dist/internal/react-calendar/index.d.cts +44 -0
- package/dist/internal/react-calendar/index.d.ts +44 -0
- package/dist/internal/react-callout/index.d.cts +12 -0
- package/dist/internal/react-callout/index.d.ts +12 -0
- package/dist/internal/react-card/index.d.cts +29 -0
- package/dist/internal/react-card/index.d.ts +29 -0
- package/dist/internal/react-card-grid/index.d.cts +8 -0
- package/dist/internal/react-card-grid/index.d.ts +8 -0
- package/dist/internal/react-carousel/index.d.ts +22 -0
- package/dist/internal/react-checkbox/index.d.cts +18 -0
- package/dist/internal/react-checkbox/index.d.ts +18 -0
- package/dist/internal/react-code-block/index.d.cts +7 -0
- package/dist/internal/react-code-block/index.d.ts +7 -0
- package/dist/internal/react-code-editor/index.d.cts +28 -0
- package/dist/internal/react-code-editor/index.d.ts +28 -0
- package/dist/internal/react-collapsible/index.d.cts +29 -0
- package/dist/internal/react-collapsible/index.d.ts +29 -0
- package/dist/internal/react-combobox/index.d.cts +94 -0
- package/dist/internal/react-combobox/index.d.ts +94 -0
- package/dist/internal/react-command/index.d.cts +51 -0
- package/dist/internal/react-command/index.d.ts +51 -0
- package/dist/internal/react-content-protection/index.d.cts +22 -0
- package/dist/internal/react-content-protection/index.d.ts +22 -0
- package/dist/internal/react-data-table/index.d.cts +22 -0
- package/dist/internal/react-data-table/index.d.ts +22 -0
- package/dist/internal/react-date-picker/index.d.cts +23 -0
- package/dist/internal/react-date-picker/index.d.ts +23 -0
- package/dist/internal/react-device-frame/index.d.cts +37 -0
- package/dist/internal/react-device-frame/index.d.ts +37 -0
- package/dist/internal/react-dialog/index.d.cts +49 -0
- package/dist/internal/react-dialog/index.d.ts +49 -0
- package/dist/internal/react-dropdown-menu/index.d.cts +37 -0
- package/dist/internal/react-dropdown-menu/index.d.ts +37 -0
- package/dist/internal/react-emoji-picker/index.d.cts +32 -0
- package/dist/internal/react-emoji-picker/index.d.ts +32 -0
- package/dist/internal/react-feedback-dialog/index.d.cts +40 -0
- package/dist/internal/react-feedback-dialog/index.d.ts +40 -0
- package/dist/internal/react-file-tree/index.d.cts +5 -0
- package/dist/internal/react-file-tree/index.d.ts +5 -0
- package/dist/internal/react-file-upload/index.d.cts +22 -0
- package/dist/internal/react-file-upload/index.d.ts +22 -0
- package/dist/internal/react-footer/index.d.cts +20 -0
- package/dist/internal/react-footer/index.d.ts +20 -0
- package/dist/internal/react-form/index.d.cts +85 -0
- package/dist/internal/react-form/index.d.ts +85 -0
- package/dist/internal/react-icon-system/index.d.cts +5 -0
- package/dist/internal/react-icon-system/index.d.ts +5 -0
- package/dist/internal/react-inline-editor/index.d.cts +17 -0
- package/dist/internal/react-inline-editor/index.d.ts +17 -0
- package/dist/internal/react-input/index.d.cts +31 -0
- package/dist/internal/react-input/index.d.ts +31 -0
- package/dist/internal/react-input-group/index.d.cts +34 -0
- package/dist/internal/react-input-group/index.d.ts +34 -0
- package/dist/internal/react-install-prompt/index.d.cts +24 -0
- package/dist/internal/react-install-prompt/index.d.ts +24 -0
- package/dist/internal/react-keyboard-shortcut/index.d.cts +57 -0
- package/dist/internal/react-keyboard-shortcut/index.d.ts +57 -0
- package/dist/internal/react-language-selector/index.d.cts +26 -0
- package/dist/internal/react-language-selector/index.d.ts +26 -0
- package/dist/internal/react-link-card/index.d.cts +5 -0
- package/dist/internal/react-link-card/index.d.ts +5 -0
- package/dist/internal/react-logger/index.d.cts +107 -0
- package/dist/internal/react-logger/index.d.ts +107 -0
- package/dist/internal/react-markdown-renderer/index.d.cts +20 -0
- package/dist/internal/react-markdown-renderer/index.d.ts +20 -0
- package/dist/internal/react-mobile-nav/index.d.cts +33 -0
- package/dist/internal/react-mobile-nav/index.d.ts +33 -0
- package/dist/internal/react-navbar/index.d.cts +25 -0
- package/dist/internal/react-navbar/index.d.ts +25 -0
- package/dist/internal/react-otp-input/index.d.cts +21 -0
- package/dist/internal/react-otp-input/index.d.ts +21 -0
- package/dist/internal/react-pagination/index.d.ts +7 -0
- package/dist/internal/react-payment/index.d.cts +9 -0
- package/dist/internal/react-payment/index.d.ts +9 -0
- package/dist/internal/react-popover/index.d.cts +33 -0
- package/dist/internal/react-popover/index.d.ts +33 -0
- package/dist/internal/react-presence-indicator/index.d.cts +34 -0
- package/dist/internal/react-presence-indicator/index.d.ts +34 -0
- package/dist/internal/react-progress-display/index.d.cts +21 -0
- package/dist/internal/react-progress-display/index.d.ts +21 -0
- package/dist/internal/react-radio/index.d.ts +33 -0
- package/dist/internal/react-reaction-bar/index.d.cts +34 -0
- package/dist/internal/react-reaction-bar/index.d.ts +34 -0
- package/dist/internal/react-resizable-layout/index.d.cts +36 -0
- package/dist/internal/react-resizable-layout/index.d.ts +36 -0
- package/dist/internal/react-rich-editor/index.d.cts +2 -0
- package/dist/internal/react-rich-editor/index.d.ts +2 -0
- package/dist/internal/react-search-bar/index.d.cts +32 -0
- package/dist/internal/react-search-bar/index.d.ts +32 -0
- package/dist/internal/react-select/index.d.cts +30 -0
- package/dist/internal/react-select/index.d.ts +30 -0
- package/dist/internal/react-sheet/index.d.cts +67 -0
- package/dist/internal/react-sheet/index.d.ts +67 -0
- package/dist/internal/react-sidebar/index.d.cts +23 -0
- package/dist/internal/react-sidebar/index.d.ts +23 -0
- package/dist/internal/react-skeleton/index.d.cts +31 -0
- package/dist/internal/react-skeleton/index.d.ts +31 -0
- package/dist/internal/react-skip-to-content/index.d.cts +9 -0
- package/dist/internal/react-skip-to-content/index.d.ts +9 -0
- package/dist/internal/react-slide-viewer/index.d.cts +23 -0
- package/dist/internal/react-slide-viewer/index.d.ts +23 -0
- package/dist/internal/react-slider/index.d.cts +1 -0
- package/dist/internal/react-slider/index.d.ts +1 -0
- package/dist/internal/react-status-indicator/index.d.cts +34 -0
- package/dist/internal/react-status-indicator/index.d.ts +34 -0
- package/dist/internal/react-steps/index.d.cts +19 -0
- package/dist/internal/react-steps/index.d.ts +19 -0
- package/dist/internal/react-switch/index.d.cts +17 -0
- package/dist/internal/react-switch/index.d.ts +17 -0
- package/dist/internal/react-table-of-contents/index.d.ts +10 -0
- package/dist/internal/react-tabs/index.d.cts +31 -0
- package/dist/internal/react-tabs/index.d.ts +31 -0
- package/dist/internal/react-textarea/index.d.cts +16 -0
- package/dist/internal/react-textarea/index.d.ts +16 -0
- package/dist/internal/react-theme/index.d.cts +44 -0
- package/dist/internal/react-theme/index.d.ts +44 -0
- package/dist/internal/react-thread-view/index.d.cts +34 -0
- package/dist/internal/react-thread-view/index.d.ts +34 -0
- package/dist/internal/react-toast/index.d.cts +36 -0
- package/dist/internal/react-toast/index.d.ts +36 -0
- package/dist/internal/react-tooltip/index.d.cts +33 -0
- package/dist/internal/react-tooltip/index.d.ts +33 -0
- package/dist/internal/react-version-selector/index.d.cts +24 -0
- package/dist/internal/react-version-selector/index.d.ts +24 -0
- package/dist/internal/react-video-player/index.d.cts +9 -0
- package/dist/internal/react-video-player/index.d.ts +9 -0
- package/dist/internal/react-voice-pill/index.d.cts +10 -0
- package/dist/internal/react-voice-pill/index.d.ts +10 -0
- package/dist/internal/react-waveform/index.d.cts +9 -0
- package/dist/internal/react-waveform/index.d.ts +9 -0
- package/dist/internal/reaction-bar/index.d.cts +50 -0
- package/dist/internal/reaction-bar/index.d.ts +50 -0
- package/dist/internal/resizable-layout/index.d.cts +47 -0
- package/dist/internal/resizable-layout/index.d.ts +47 -0
- package/dist/internal/search-bar/index.d.cts +51 -0
- package/dist/internal/search-bar/index.d.ts +51 -0
- package/dist/internal/select/index.d.cts +69 -0
- package/dist/internal/select/index.d.ts +69 -0
- package/dist/internal/shared/index.d.cts +419 -0
- package/dist/internal/shared/index.d.ts +419 -0
- package/dist/internal/sidebar/index.d.cts +40 -0
- package/dist/internal/sidebar/index.d.ts +40 -0
- package/dist/internal/skeleton/index.d.cts +27 -0
- package/dist/internal/skeleton/index.d.ts +27 -0
- package/dist/internal/slide-viewer/index.d.cts +72 -0
- package/dist/internal/slide-viewer/index.d.ts +72 -0
- package/dist/internal/slider/index.d.cts +4 -0
- package/dist/internal/slider/index.d.ts +4 -0
- package/dist/internal/status-indicator/index.d.cts +42 -0
- package/dist/internal/status-indicator/index.d.ts +42 -0
- package/dist/internal/switch/index.d.cts +41 -0
- package/dist/internal/switch/index.d.ts +41 -0
- package/dist/internal/tabs/index.d.cts +45 -0
- package/dist/internal/tabs/index.d.ts +45 -0
- package/dist/internal/textarea/index.d.cts +28 -0
- package/dist/internal/textarea/index.d.ts +28 -0
- package/dist/internal/theme/index.d.cts +60 -0
- package/dist/internal/theme/index.d.ts +60 -0
- package/dist/internal/thread-view/index.d.cts +95 -0
- package/dist/internal/thread-view/index.d.ts +95 -0
- package/dist/internal/toast/index.d.cts +64 -0
- package/dist/internal/toast/index.d.ts +64 -0
- package/dist/internal/tooltip/index.d.cts +45 -0
- package/dist/internal/tooltip/index.d.ts +45 -0
- package/dist/internal/version-selector/index.d.cts +68 -0
- package/dist/internal/version-selector/index.d.ts +68 -0
- package/dist/internal/video-player/index.d.cts +50 -0
- package/dist/internal/video-player/index.d.ts +50 -0
- package/dist/internal/voice-pill/index.d.cts +86 -0
- package/dist/internal/voice-pill/index.d.ts +86 -0
- package/dist/internal/waveform/index.d.cts +83 -0
- package/dist/internal/waveform/index.d.ts +83 -0
- package/dist/theme.cjs +23 -0
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +5 -2
- package/dist/theme.js.map +1 -1
- package/package.json +10 -7
package/dist/index.js
CHANGED
|
@@ -1,123 +1,10 @@
|
|
|
1
|
+
import { cn, devWarn, cva, createKeyboardHandler, Keys, createMachine, generateId } from './chunk-O4453CBF.js';
|
|
2
|
+
import './chunk-XWP763SH.js';
|
|
1
3
|
import * as React11 from 'react';
|
|
2
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
5
|
import * as ReactDOM from 'react-dom';
|
|
4
6
|
import { createPortal } from 'react-dom';
|
|
5
|
-
import { useFormContext, useFormState, FormProvider, Controller } from 'react-hook-form';
|
|
6
|
-
export { Controller, FormProvider, useController, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
|
|
7
7
|
|
|
8
|
-
// ../react-accordion/dist/index.js
|
|
9
|
-
|
|
10
|
-
// ../shared/dist/index.js
|
|
11
|
-
var idCounter = 0;
|
|
12
|
-
function generateId(prefix = "rfr") {
|
|
13
|
-
idCounter++;
|
|
14
|
-
return `${prefix}-${idCounter}`;
|
|
15
|
-
}
|
|
16
|
-
var Keys = {
|
|
17
|
-
Enter: "Enter",
|
|
18
|
-
Space: " ",
|
|
19
|
-
Escape: "Escape",
|
|
20
|
-
ArrowUp: "ArrowUp",
|
|
21
|
-
ArrowDown: "ArrowDown",
|
|
22
|
-
ArrowLeft: "ArrowLeft",
|
|
23
|
-
ArrowRight: "ArrowRight",
|
|
24
|
-
Home: "Home",
|
|
25
|
-
End: "End",
|
|
26
|
-
Backspace: "Backspace"};
|
|
27
|
-
function createKeyboardHandler(handlers) {
|
|
28
|
-
return (event) => {
|
|
29
|
-
const handler = handlers[event.key];
|
|
30
|
-
if (handler) {
|
|
31
|
-
handler(event);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function createMachine(config) {
|
|
36
|
-
let current = config.initial;
|
|
37
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
38
|
-
return {
|
|
39
|
-
get state() {
|
|
40
|
-
return current;
|
|
41
|
-
},
|
|
42
|
-
send(event) {
|
|
43
|
-
const stateConfig = config.states[current];
|
|
44
|
-
const next = stateConfig?.on?.[event];
|
|
45
|
-
if (next && next !== current) {
|
|
46
|
-
current = next;
|
|
47
|
-
for (const fn of listeners) {
|
|
48
|
-
fn(current);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
subscribe(fn) {
|
|
53
|
-
listeners.add(fn);
|
|
54
|
-
return () => {
|
|
55
|
-
listeners.delete(fn);
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
matches(state) {
|
|
59
|
-
return current === state;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function cn(...inputs) {
|
|
64
|
-
const classes = [];
|
|
65
|
-
for (const input of inputs) {
|
|
66
|
-
if (!input) continue;
|
|
67
|
-
if (typeof input === "string") {
|
|
68
|
-
classes.push(input);
|
|
69
|
-
} else if (typeof input === "number") {
|
|
70
|
-
classes.push(String(input));
|
|
71
|
-
} else if (Array.isArray(input)) {
|
|
72
|
-
const nested = cn(...input);
|
|
73
|
-
if (nested) classes.push(nested);
|
|
74
|
-
} else if (typeof input === "object") {
|
|
75
|
-
for (const [key, value] of Object.entries(input)) {
|
|
76
|
-
if (value) classes.push(key);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return classes.join(" ");
|
|
81
|
-
}
|
|
82
|
-
function cva(config) {
|
|
83
|
-
return (props) => {
|
|
84
|
-
const classes = [];
|
|
85
|
-
if (config.base) {
|
|
86
|
-
classes.push(config.base);
|
|
87
|
-
}
|
|
88
|
-
if (config.variants) {
|
|
89
|
-
for (const [variantKey, variantOptions] of Object.entries(config.variants)) {
|
|
90
|
-
const selectedValue = props?.[variantKey] ?? config.defaultVariants?.[variantKey];
|
|
91
|
-
if (selectedValue != null) {
|
|
92
|
-
const variantClass = variantOptions[selectedValue];
|
|
93
|
-
if (variantClass) {
|
|
94
|
-
classes.push(variantClass);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (config.compoundVariants) {
|
|
100
|
-
for (const compound of config.compoundVariants) {
|
|
101
|
-
const { class: compoundClass, ...conditions } = compound;
|
|
102
|
-
let matches = true;
|
|
103
|
-
for (const [key, value] of Object.entries(conditions)) {
|
|
104
|
-
const propValue = props?.[key] ?? config.defaultVariants?.[key];
|
|
105
|
-
if (propValue !== value) {
|
|
106
|
-
matches = false;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (matches) {
|
|
111
|
-
classes.push(compoundClass);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (props?.className) {
|
|
116
|
-
classes.push(props.className);
|
|
117
|
-
}
|
|
118
|
-
return classes.filter(Boolean).join(" ");
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
8
|
var AccordionContext = React11.createContext(null);
|
|
122
9
|
var Accordion = React11.forwardRef(
|
|
123
10
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
@@ -148,7 +35,13 @@ var AccordionItemContext = React11.createContext(null);
|
|
|
148
35
|
var AccordionItem = React11.forwardRef(
|
|
149
36
|
({ className, value, ...props }, ref) => {
|
|
150
37
|
const context = React11.useContext(AccordionContext);
|
|
151
|
-
if (!context)
|
|
38
|
+
if (!context) {
|
|
39
|
+
devWarn(
|
|
40
|
+
"react-accordion/item-outside-accordion",
|
|
41
|
+
"<AccordionItem> must be rendered inside an <Accordion>. The missing AccordionContext makes this throw."
|
|
42
|
+
);
|
|
43
|
+
throw new Error("AccordionItem must be within Accordion");
|
|
44
|
+
}
|
|
152
45
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
153
46
|
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
154
47
|
}
|
|
@@ -158,7 +51,13 @@ var AccordionTrigger = React11.forwardRef(
|
|
|
158
51
|
({ className, children, ...props }, ref) => {
|
|
159
52
|
const accordionContext = React11.useContext(AccordionContext);
|
|
160
53
|
const itemContext = React11.useContext(AccordionItemContext);
|
|
161
|
-
if (!accordionContext || !itemContext)
|
|
54
|
+
if (!accordionContext || !itemContext) {
|
|
55
|
+
devWarn(
|
|
56
|
+
"react-accordion/trigger-missing-context",
|
|
57
|
+
"<AccordionTrigger> must be rendered inside an <AccordionItem> within an <Accordion>. The missing AccordionContext/AccordionItemContext makes this throw."
|
|
58
|
+
);
|
|
59
|
+
throw new Error("AccordionTrigger missing context");
|
|
60
|
+
}
|
|
162
61
|
return /* @__PURE__ */ jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxs(
|
|
163
62
|
"button",
|
|
164
63
|
{
|
|
@@ -199,7 +98,13 @@ AccordionTrigger.displayName = "AccordionTrigger";
|
|
|
199
98
|
var AccordionContent = React11.forwardRef(
|
|
200
99
|
({ className, children, ...props }, ref) => {
|
|
201
100
|
const itemContext = React11.useContext(AccordionItemContext);
|
|
202
|
-
if (!itemContext)
|
|
101
|
+
if (!itemContext) {
|
|
102
|
+
devWarn(
|
|
103
|
+
"react-accordion/content-missing-context",
|
|
104
|
+
"<AccordionContent> must be rendered inside an <AccordionItem>. The missing AccordionItemContext makes this throw."
|
|
105
|
+
);
|
|
106
|
+
throw new Error("AccordionContent missing context");
|
|
107
|
+
}
|
|
203
108
|
return /* @__PURE__ */ jsx(
|
|
204
109
|
"div",
|
|
205
110
|
{
|
|
@@ -497,6 +402,10 @@ function AuthProvider({ children, ...config }) {
|
|
|
497
402
|
const authRef = React11.useRef(null);
|
|
498
403
|
if (!authRef.current) {
|
|
499
404
|
if (!config.adapter && !config.testMode) {
|
|
405
|
+
devWarn(
|
|
406
|
+
"react-auth/missing-adapter",
|
|
407
|
+
"<AuthProvider> was rendered without a required `adapter` prop (and not in `testMode`). Pass an auth adapter so the provider can create an auth instance."
|
|
408
|
+
);
|
|
500
409
|
throw new Error("[refraction-ui/react-auth] You must provide an `adapter` to AuthProvider.");
|
|
501
410
|
}
|
|
502
411
|
authRef.current = createAuth(config.adapter, config);
|
|
@@ -528,6 +437,10 @@ function AuthProvider({ children, ...config }) {
|
|
|
528
437
|
function useAuth() {
|
|
529
438
|
const ctx = React11.useContext(AuthContext);
|
|
530
439
|
if (!ctx) {
|
|
440
|
+
devWarn(
|
|
441
|
+
"react-auth/use-auth-outside-provider",
|
|
442
|
+
"useAuth() was called outside an <AuthProvider>. Wrap your app (or the consuming subtree) in <AuthProvider> so the auth context is available."
|
|
443
|
+
);
|
|
531
444
|
throw new Error("useAuth must be used within an <AuthProvider>");
|
|
532
445
|
}
|
|
533
446
|
return ctx;
|
|
@@ -1724,6 +1637,10 @@ var CollapsibleContext = React11.createContext(null);
|
|
|
1724
1637
|
function useCollapsibleContext() {
|
|
1725
1638
|
const ctx = React11.useContext(CollapsibleContext);
|
|
1726
1639
|
if (!ctx) {
|
|
1640
|
+
devWarn(
|
|
1641
|
+
"react-collapsible/context-outside-provider",
|
|
1642
|
+
"Collapsible compound components (CollapsibleTrigger/CollapsibleContent) must be rendered inside a <Collapsible>. The missing CollapsibleContext makes this throw."
|
|
1643
|
+
);
|
|
1727
1644
|
throw new Error(
|
|
1728
1645
|
"Collapsible compound components must be used within <Collapsible>"
|
|
1729
1646
|
);
|
|
@@ -1871,6 +1788,10 @@ var ComboboxContext = React11.createContext(null);
|
|
|
1871
1788
|
function useComboboxContext() {
|
|
1872
1789
|
const ctx = React11.useContext(ComboboxContext);
|
|
1873
1790
|
if (!ctx) {
|
|
1791
|
+
devWarn(
|
|
1792
|
+
"react-combobox/context-outside-provider",
|
|
1793
|
+
"Combobox compound components (ComboboxInput/ComboboxContent/ComboboxItem/etc.) must be rendered inside a <Combobox>. The missing ComboboxContext makes this throw."
|
|
1794
|
+
);
|
|
1874
1795
|
throw new Error("Combobox compound components must be used within <Combobox>");
|
|
1875
1796
|
}
|
|
1876
1797
|
return ctx;
|
|
@@ -2543,6 +2464,10 @@ var CommandContext = React11.createContext(null);
|
|
|
2543
2464
|
function useCommandContext() {
|
|
2544
2465
|
const ctx = React11.useContext(CommandContext);
|
|
2545
2466
|
if (!ctx) {
|
|
2467
|
+
devWarn(
|
|
2468
|
+
"react-command/context-outside-provider",
|
|
2469
|
+
"Command compound components (CommandInput/CommandList/CommandItem/CommandGroup/etc.) must be rendered inside a <Command>. The missing CommandContext makes this throw."
|
|
2470
|
+
);
|
|
2546
2471
|
throw new Error("Command compound components must be used within <Command>");
|
|
2547
2472
|
}
|
|
2548
2473
|
return ctx;
|
|
@@ -3380,6 +3305,10 @@ var DialogContext = React11.createContext(null);
|
|
|
3380
3305
|
function useDialogContext() {
|
|
3381
3306
|
const ctx = React11.useContext(DialogContext);
|
|
3382
3307
|
if (!ctx) {
|
|
3308
|
+
devWarn(
|
|
3309
|
+
"react-dialog/context-outside-provider",
|
|
3310
|
+
"Dialog compound components (DialogTrigger/DialogContent/DialogTitle/etc.) must be rendered inside a <Dialog>. The missing DialogContext makes this throw."
|
|
3311
|
+
);
|
|
3383
3312
|
throw new Error("Dialog compound components must be used within <Dialog>");
|
|
3384
3313
|
}
|
|
3385
3314
|
return ctx;
|
|
@@ -3667,6 +3596,10 @@ var DropdownMenuContext = React11.createContext(null);
|
|
|
3667
3596
|
function useDropdownMenuContext() {
|
|
3668
3597
|
const ctx = React11.useContext(DropdownMenuContext);
|
|
3669
3598
|
if (!ctx) {
|
|
3599
|
+
devWarn(
|
|
3600
|
+
"react-dropdown-menu/context-outside-provider",
|
|
3601
|
+
"DropdownMenu compound components (DropdownMenuTrigger/DropdownMenuContent/DropdownMenuItem/etc.) must be rendered inside a <DropdownMenu>. The missing DropdownMenuContext makes this throw."
|
|
3602
|
+
);
|
|
3670
3603
|
throw new Error("DropdownMenu compound components must be used within <DropdownMenu>");
|
|
3671
3604
|
}
|
|
3672
3605
|
return ctx;
|
|
@@ -4106,192 +4039,6 @@ var Footer = React11.forwardRef(
|
|
|
4106
4039
|
}
|
|
4107
4040
|
);
|
|
4108
4041
|
Footer.displayName = "Footer";
|
|
4109
|
-
var Slot = React11.forwardRef(function Slot2(props, forwardedRef) {
|
|
4110
|
-
const { children, ...slotProps } = props;
|
|
4111
|
-
if (!React11.isValidElement(children)) {
|
|
4112
|
-
return null;
|
|
4113
|
-
}
|
|
4114
|
-
const childProps = children.props ?? {};
|
|
4115
|
-
const mergedProps = mergeProps(slotProps, childProps);
|
|
4116
|
-
let childRef = childProps.ref;
|
|
4117
|
-
if (childRef === void 0 && !("ref" in childProps)) {
|
|
4118
|
-
childRef = children.ref;
|
|
4119
|
-
}
|
|
4120
|
-
const mergedRef = composeRefs(forwardedRef, childRef);
|
|
4121
|
-
return React11.cloneElement(
|
|
4122
|
-
children,
|
|
4123
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4124
|
-
{ ...mergedProps, ref: mergedRef }
|
|
4125
|
-
);
|
|
4126
|
-
});
|
|
4127
|
-
Slot.displayName = "Slot";
|
|
4128
|
-
function mergeProps(slotProps, childProps) {
|
|
4129
|
-
const merged = { ...slotProps };
|
|
4130
|
-
for (const key of Object.keys(childProps)) {
|
|
4131
|
-
const slotValue = slotProps[key];
|
|
4132
|
-
const childValue = childProps[key];
|
|
4133
|
-
if (/^on[A-Z]/.test(key) && typeof slotValue === "function" && typeof childValue === "function") {
|
|
4134
|
-
merged[key] = (...args) => {
|
|
4135
|
-
const child = childValue;
|
|
4136
|
-
const slot = slotValue;
|
|
4137
|
-
child(...args);
|
|
4138
|
-
slot(...args);
|
|
4139
|
-
};
|
|
4140
|
-
} else if (key === "className") {
|
|
4141
|
-
merged[key] = [slotValue, childValue].filter(Boolean).join(" ");
|
|
4142
|
-
} else if (key === "style") {
|
|
4143
|
-
merged[key] = { ...slotValue, ...childValue };
|
|
4144
|
-
} else if (childValue !== void 0) {
|
|
4145
|
-
merged[key] = childValue;
|
|
4146
|
-
}
|
|
4147
|
-
}
|
|
4148
|
-
return merged;
|
|
4149
|
-
}
|
|
4150
|
-
function composeRefs(...refs) {
|
|
4151
|
-
return (node) => {
|
|
4152
|
-
for (const ref of refs) {
|
|
4153
|
-
if (typeof ref === "function") {
|
|
4154
|
-
ref(node);
|
|
4155
|
-
} else if (ref != null) {
|
|
4156
|
-
const objectRef = ref;
|
|
4157
|
-
objectRef.current = node;
|
|
4158
|
-
}
|
|
4159
|
-
}
|
|
4160
|
-
};
|
|
4161
|
-
}
|
|
4162
|
-
var Form = FormProvider;
|
|
4163
|
-
var FormFieldContext = React11.createContext(
|
|
4164
|
-
void 0
|
|
4165
|
-
);
|
|
4166
|
-
var FormItemContext = React11.createContext(
|
|
4167
|
-
void 0
|
|
4168
|
-
);
|
|
4169
|
-
function FormField(props) {
|
|
4170
|
-
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
4171
|
-
}
|
|
4172
|
-
function useFormField() {
|
|
4173
|
-
const fieldContext = React11.useContext(FormFieldContext);
|
|
4174
|
-
const itemContext = React11.useContext(FormItemContext);
|
|
4175
|
-
const formContext = useFormContext();
|
|
4176
|
-
const { errors } = useFormState({
|
|
4177
|
-
control: formContext?.control,
|
|
4178
|
-
name: fieldContext?.name,
|
|
4179
|
-
exact: true
|
|
4180
|
-
});
|
|
4181
|
-
if (!fieldContext) {
|
|
4182
|
-
throw new Error("useFormField must be used within a <FormField>");
|
|
4183
|
-
}
|
|
4184
|
-
if (!itemContext) {
|
|
4185
|
-
throw new Error("useFormField must be used within a <FormItem>");
|
|
4186
|
-
}
|
|
4187
|
-
const { id } = itemContext;
|
|
4188
|
-
const error = getNestedError(errors, fieldContext.name);
|
|
4189
|
-
return {
|
|
4190
|
-
id,
|
|
4191
|
-
name: fieldContext.name,
|
|
4192
|
-
formItemId: `${id}-form-item`,
|
|
4193
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
4194
|
-
formMessageId: `${id}-form-item-message`,
|
|
4195
|
-
error,
|
|
4196
|
-
invalid: Boolean(error)
|
|
4197
|
-
};
|
|
4198
|
-
}
|
|
4199
|
-
function getNestedError(errors, name) {
|
|
4200
|
-
if (!errors) return void 0;
|
|
4201
|
-
const segments = name.replace(/\[(\w+)\]/g, ".$1").split(".");
|
|
4202
|
-
let cursor = errors;
|
|
4203
|
-
for (const seg of segments) {
|
|
4204
|
-
if (cursor && typeof cursor === "object" && seg in cursor) {
|
|
4205
|
-
cursor = cursor[seg];
|
|
4206
|
-
} else {
|
|
4207
|
-
return void 0;
|
|
4208
|
-
}
|
|
4209
|
-
}
|
|
4210
|
-
return cursor;
|
|
4211
|
-
}
|
|
4212
|
-
var formItemVariants = cva({ base: "space-y-2" });
|
|
4213
|
-
var FormItem = React11.forwardRef(
|
|
4214
|
-
({ className, ...props }, ref) => {
|
|
4215
|
-
const id = React11.useId();
|
|
4216
|
-
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(formItemVariants(), className), ...props }) });
|
|
4217
|
-
}
|
|
4218
|
-
);
|
|
4219
|
-
FormItem.displayName = "FormItem";
|
|
4220
|
-
var formLabelVariants = cva({
|
|
4221
|
-
base: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
4222
|
-
variants: {
|
|
4223
|
-
invalid: {
|
|
4224
|
-
true: "text-destructive",
|
|
4225
|
-
false: ""
|
|
4226
|
-
}
|
|
4227
|
-
},
|
|
4228
|
-
defaultVariants: {
|
|
4229
|
-
invalid: "false"
|
|
4230
|
-
}
|
|
4231
|
-
});
|
|
4232
|
-
var FormLabel = React11.forwardRef(
|
|
4233
|
-
({ className, ...props }, ref) => {
|
|
4234
|
-
const { invalid, formItemId } = useFormField();
|
|
4235
|
-
return /* @__PURE__ */ jsx(
|
|
4236
|
-
"label",
|
|
4237
|
-
{
|
|
4238
|
-
ref,
|
|
4239
|
-
htmlFor: formItemId,
|
|
4240
|
-
"data-invalid": invalid ? "" : void 0,
|
|
4241
|
-
className: cn(formLabelVariants({ invalid: invalid ? "true" : "false" }), className),
|
|
4242
|
-
...props
|
|
4243
|
-
}
|
|
4244
|
-
);
|
|
4245
|
-
}
|
|
4246
|
-
);
|
|
4247
|
-
FormLabel.displayName = "FormLabel";
|
|
4248
|
-
var FormControl = React11.forwardRef(
|
|
4249
|
-
({ ...props }, ref) => {
|
|
4250
|
-
const { invalid, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
4251
|
-
return /* @__PURE__ */ jsx(
|
|
4252
|
-
Slot,
|
|
4253
|
-
{
|
|
4254
|
-
ref,
|
|
4255
|
-
id: formItemId,
|
|
4256
|
-
"aria-describedby": invalid ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
|
|
4257
|
-
"aria-invalid": invalid || void 0,
|
|
4258
|
-
...props
|
|
4259
|
-
}
|
|
4260
|
-
);
|
|
4261
|
-
}
|
|
4262
|
-
);
|
|
4263
|
-
FormControl.displayName = "FormControl";
|
|
4264
|
-
var FormDescription = React11.forwardRef(({ className, ...props }, ref) => {
|
|
4265
|
-
const { formDescriptionId } = useFormField();
|
|
4266
|
-
return /* @__PURE__ */ jsx(
|
|
4267
|
-
"p",
|
|
4268
|
-
{
|
|
4269
|
-
ref,
|
|
4270
|
-
id: formDescriptionId,
|
|
4271
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
4272
|
-
...props
|
|
4273
|
-
}
|
|
4274
|
-
);
|
|
4275
|
-
});
|
|
4276
|
-
FormDescription.displayName = "FormDescription";
|
|
4277
|
-
var FormMessage = React11.forwardRef(
|
|
4278
|
-
({ className, children, ...props }, ref) => {
|
|
4279
|
-
const { error, formMessageId } = useFormField();
|
|
4280
|
-
const body = error?.message ? String(error.message) : children;
|
|
4281
|
-
if (!body) return null;
|
|
4282
|
-
return /* @__PURE__ */ jsx(
|
|
4283
|
-
"p",
|
|
4284
|
-
{
|
|
4285
|
-
ref,
|
|
4286
|
-
id: formMessageId,
|
|
4287
|
-
className: cn("text-sm font-medium text-destructive", className),
|
|
4288
|
-
...props,
|
|
4289
|
-
children: body
|
|
4290
|
-
}
|
|
4291
|
-
);
|
|
4292
|
-
}
|
|
4293
|
-
);
|
|
4294
|
-
FormMessage.displayName = "FormMessage";
|
|
4295
4042
|
|
|
4296
4043
|
// ../inline-editor/dist/index.js
|
|
4297
4044
|
function createInlineEditor(props) {
|
|
@@ -5103,6 +4850,10 @@ var MobileNavContext = React11.createContext(null);
|
|
|
5103
4850
|
function useMobileNavContext() {
|
|
5104
4851
|
const ctx = React11.useContext(MobileNavContext);
|
|
5105
4852
|
if (!ctx) {
|
|
4853
|
+
devWarn(
|
|
4854
|
+
"react-mobile-nav/compound-outside-provider",
|
|
4855
|
+
"A MobileNav compound component was rendered outside of <MobileNav>. Wrap it in <MobileNav>."
|
|
4856
|
+
);
|
|
5106
4857
|
throw new Error("MobileNav compound components must be used within <MobileNav>");
|
|
5107
4858
|
}
|
|
5108
4859
|
return ctx;
|
|
@@ -5361,6 +5112,10 @@ var PopoverContext = React11.createContext(null);
|
|
|
5361
5112
|
function usePopoverContext() {
|
|
5362
5113
|
const ctx = React11.useContext(PopoverContext);
|
|
5363
5114
|
if (!ctx) {
|
|
5115
|
+
devWarn(
|
|
5116
|
+
"react-popover/context-outside-provider",
|
|
5117
|
+
"Popover compound components (PopoverTrigger/PopoverContent/etc.) must be rendered inside a <Popover>. The missing PopoverContext makes this throw."
|
|
5118
|
+
);
|
|
5364
5119
|
throw new Error("Popover compound components must be used within <Popover>");
|
|
5365
5120
|
}
|
|
5366
5121
|
return ctx;
|
|
@@ -5566,6 +5321,10 @@ var SearchBarContext = React11.createContext(null);
|
|
|
5566
5321
|
function useSearchBarContext() {
|
|
5567
5322
|
const ctx = React11.useContext(SearchBarContext);
|
|
5568
5323
|
if (!ctx) {
|
|
5324
|
+
devWarn(
|
|
5325
|
+
"react-search-bar/compound-outside-provider",
|
|
5326
|
+
"A SearchBar compound component was rendered outside of <SearchBar>. Wrap it in <SearchBar>."
|
|
5327
|
+
);
|
|
5569
5328
|
throw new Error("SearchBar compound components must be used within <SearchBar>");
|
|
5570
5329
|
}
|
|
5571
5330
|
return ctx;
|
|
@@ -5829,6 +5588,10 @@ var SheetContext = React11.createContext(null);
|
|
|
5829
5588
|
function useSheetContext() {
|
|
5830
5589
|
const ctx = React11.useContext(SheetContext);
|
|
5831
5590
|
if (!ctx) {
|
|
5591
|
+
devWarn(
|
|
5592
|
+
"react-sheet/sheet-compound-outside-provider",
|
|
5593
|
+
"A Sheet compound component was rendered outside of <Sheet>. Wrap it in <Sheet>."
|
|
5594
|
+
);
|
|
5832
5595
|
throw new Error("Sheet compound components must be used within <Sheet>");
|
|
5833
5596
|
}
|
|
5834
5597
|
return ctx;
|
|
@@ -6280,6 +6043,10 @@ var TabsContext = React11.createContext(null);
|
|
|
6280
6043
|
function useTabsContext() {
|
|
6281
6044
|
const ctx = React11.useContext(TabsContext);
|
|
6282
6045
|
if (!ctx) {
|
|
6046
|
+
devWarn(
|
|
6047
|
+
"react-tabs/context-outside-provider",
|
|
6048
|
+
"Tabs compound components (TabsList/TabsTrigger/TabsContent) must be rendered inside a <Tabs>. The missing TabsContext makes this throw."
|
|
6049
|
+
);
|
|
6283
6050
|
throw new Error("Tabs compound components must be used within <Tabs>");
|
|
6284
6051
|
}
|
|
6285
6052
|
return ctx;
|
|
@@ -6604,6 +6371,10 @@ var ToastContext = React11.createContext(null);
|
|
|
6604
6371
|
function useToastContext() {
|
|
6605
6372
|
const ctx = React11.useContext(ToastContext);
|
|
6606
6373
|
if (!ctx) {
|
|
6374
|
+
devWarn(
|
|
6375
|
+
"react-toast/use-toast-outside-provider",
|
|
6376
|
+
"useToast() was called outside a <ToastProvider>. Wrap your app (or the consuming subtree) in <ToastProvider> so the toast context is available."
|
|
6377
|
+
);
|
|
6607
6378
|
throw new Error("useToast must be used within a <ToastProvider>");
|
|
6608
6379
|
}
|
|
6609
6380
|
return ctx;
|
|
@@ -6783,6 +6554,10 @@ var TooltipContext = React11.createContext(null);
|
|
|
6783
6554
|
function useTooltipContext() {
|
|
6784
6555
|
const ctx = React11.useContext(TooltipContext);
|
|
6785
6556
|
if (!ctx) {
|
|
6557
|
+
devWarn(
|
|
6558
|
+
"react-tooltip/context-outside-provider",
|
|
6559
|
+
"Tooltip compound components (TooltipTrigger/TooltipContent/etc.) must be rendered inside a <Tooltip>. The missing TooltipContext makes this throw."
|
|
6560
|
+
);
|
|
6786
6561
|
throw new Error("Tooltip compound components must be used within <Tooltip>");
|
|
6787
6562
|
}
|
|
6788
6563
|
return ctx;
|
|
@@ -8984,6 +8759,10 @@ var ResizableLayoutContext = React11.createContext(null);
|
|
|
8984
8759
|
function useResizableLayoutContext() {
|
|
8985
8760
|
const ctx = React11.useContext(ResizableLayoutContext);
|
|
8986
8761
|
if (!ctx) {
|
|
8762
|
+
devWarn(
|
|
8763
|
+
"react-resizable-layout/compound-outside-provider",
|
|
8764
|
+
"A Resizable compound component was rendered outside of <ResizableLayout>. Wrap it in <ResizableLayout>."
|
|
8765
|
+
);
|
|
8987
8766
|
throw new Error("Resizable compound components must be used within <ResizableLayout>");
|
|
8988
8767
|
}
|
|
8989
8768
|
return ctx;
|
|
@@ -9365,6 +9144,10 @@ var AppShellContext = React11.createContext(null);
|
|
|
9365
9144
|
function useAppShell() {
|
|
9366
9145
|
const ctx = React11.useContext(AppShellContext);
|
|
9367
9146
|
if (!ctx) {
|
|
9147
|
+
devWarn(
|
|
9148
|
+
"react-app-shell/use-app-shell-outside-provider",
|
|
9149
|
+
"useAppShell() was called outside of <AppShell>. Wrap the consuming component tree in <AppShell>."
|
|
9150
|
+
);
|
|
9368
9151
|
throw new Error("useAppShell must be used within <AppShell>");
|
|
9369
9152
|
}
|
|
9370
9153
|
return ctx;
|
|
@@ -9571,6 +9354,10 @@ var PageShellContext = React11.createContext(null);
|
|
|
9571
9354
|
function usePageShell() {
|
|
9572
9355
|
const ctx = React11.useContext(PageShellContext);
|
|
9573
9356
|
if (!ctx) {
|
|
9357
|
+
devWarn(
|
|
9358
|
+
"react-app-shell/page-shell-compound-outside-provider",
|
|
9359
|
+
"A PageShell compound component was rendered outside of <PageShell>. Wrap it in <PageShell>."
|
|
9360
|
+
);
|
|
9574
9361
|
throw new Error("PageShell compound components must be used within <PageShell>");
|
|
9575
9362
|
}
|
|
9576
9363
|
return ctx;
|
|
@@ -9673,6 +9460,10 @@ var AuthShellContext = React11.createContext(null);
|
|
|
9673
9460
|
function useAuthShell() {
|
|
9674
9461
|
const ctx = React11.useContext(AuthShellContext);
|
|
9675
9462
|
if (!ctx) {
|
|
9463
|
+
devWarn(
|
|
9464
|
+
"react-app-shell/auth-shell-compound-outside-provider",
|
|
9465
|
+
"An AuthShell compound component was rendered outside of <AuthShell>. Wrap it in <AuthShell>."
|
|
9466
|
+
);
|
|
9676
9467
|
throw new Error("AuthShell compound components must be used within <AuthShell>");
|
|
9677
9468
|
}
|
|
9678
9469
|
return ctx;
|
|
@@ -12070,7 +11861,13 @@ function RadioGroup({
|
|
|
12070
11861
|
}
|
|
12071
11862
|
function RadioItem({ value, children, disabled = false, className }) {
|
|
12072
11863
|
const ctx = React11.useContext(RadioContext);
|
|
12073
|
-
if (!ctx)
|
|
11864
|
+
if (!ctx) {
|
|
11865
|
+
devWarn(
|
|
11866
|
+
"react-radio/radio-item-outside-group",
|
|
11867
|
+
"RadioItem was rendered outside of <RadioGroup>. Wrap it in <RadioGroup>."
|
|
11868
|
+
);
|
|
11869
|
+
throw new Error("RadioItem must be used within RadioGroup");
|
|
11870
|
+
}
|
|
12074
11871
|
const isChecked = ctx.value === value;
|
|
12075
11872
|
const isDisabled = ctx.disabled || disabled;
|
|
12076
11873
|
return React11.createElement(
|
|
@@ -12337,6 +12134,7 @@ var selectItemVariants = cva({
|
|
|
12337
12134
|
}
|
|
12338
12135
|
});
|
|
12339
12136
|
var SelectContext = React11.createContext({
|
|
12137
|
+
__isDefault: true,
|
|
12340
12138
|
value: void 0,
|
|
12341
12139
|
onValueChange: () => {
|
|
12342
12140
|
},
|
|
@@ -12349,6 +12147,16 @@ var SelectContext = React11.createContext({
|
|
|
12349
12147
|
triggerId: "",
|
|
12350
12148
|
contentId: ""
|
|
12351
12149
|
});
|
|
12150
|
+
function useSelectContext(part) {
|
|
12151
|
+
const ctx = React11.useContext(SelectContext);
|
|
12152
|
+
if (ctx.__isDefault) {
|
|
12153
|
+
devWarn(
|
|
12154
|
+
"react-select/no-select-provider",
|
|
12155
|
+
`<${part}> was rendered without a <Select> ancestor. It is silently reading inert context defaults (clicks/keyboard do nothing, it never opens). Wrap it in <Select>\u2026</Select>.`
|
|
12156
|
+
);
|
|
12157
|
+
}
|
|
12158
|
+
return ctx;
|
|
12159
|
+
}
|
|
12352
12160
|
function Select({
|
|
12353
12161
|
value,
|
|
12354
12162
|
onValueChange,
|
|
@@ -12381,7 +12189,7 @@ function Select({
|
|
|
12381
12189
|
}
|
|
12382
12190
|
var SelectTrigger = React11.forwardRef(
|
|
12383
12191
|
({ className, children, size = "default", ...props }, ref) => {
|
|
12384
|
-
const { open, setOpen, disabled, triggerId, contentId } =
|
|
12192
|
+
const { open, setOpen, disabled, triggerId, contentId } = useSelectContext("SelectTrigger");
|
|
12385
12193
|
const api = createSelect({ disabled, open });
|
|
12386
12194
|
const handleClick = () => {
|
|
12387
12195
|
if (!disabled) {
|
|
@@ -12440,7 +12248,7 @@ var SelectTrigger = React11.forwardRef(
|
|
|
12440
12248
|
SelectTrigger.displayName = "SelectTrigger";
|
|
12441
12249
|
var SelectContent = React11.forwardRef(
|
|
12442
12250
|
({ className, children, ...props }, forwardedRef) => {
|
|
12443
|
-
const { open, contentId, triggerId, setOpen } =
|
|
12251
|
+
const { open, contentId, triggerId, setOpen } = useSelectContext("SelectContent");
|
|
12444
12252
|
const containerRef = React11.useRef(null);
|
|
12445
12253
|
const ref = React11.useCallback(
|
|
12446
12254
|
(node) => {
|
|
@@ -12501,7 +12309,7 @@ var SelectContent = React11.forwardRef(
|
|
|
12501
12309
|
SelectContent.displayName = "SelectContent";
|
|
12502
12310
|
var SelectItem = React11.forwardRef(
|
|
12503
12311
|
({ className, children, value: itemValue, disabled: itemDisabled = false, ...props }, ref) => {
|
|
12504
|
-
const { value, onValueChange, setOpen, triggerId } =
|
|
12312
|
+
const { value, onValueChange, setOpen, triggerId } = useSelectContext("SelectItem");
|
|
12505
12313
|
const isSelected = value === itemValue;
|
|
12506
12314
|
const handleClick = () => {
|
|
12507
12315
|
if (!itemDisabled) {
|
|
@@ -13068,7 +12876,13 @@ var CarouselItemContext = React11.createContext(null);
|
|
|
13068
12876
|
var CarouselItem = React11.forwardRef(
|
|
13069
12877
|
({ className, value, ...props }, ref) => {
|
|
13070
12878
|
const context = React11.useContext(CarouselContext);
|
|
13071
|
-
if (!context)
|
|
12879
|
+
if (!context) {
|
|
12880
|
+
devWarn(
|
|
12881
|
+
"react-carousel/carousel-item-outside-carousel",
|
|
12882
|
+
"CarouselItem was rendered outside of <Carousel>. Wrap it in <Carousel>."
|
|
12883
|
+
);
|
|
12884
|
+
throw new Error("CarouselItem must be within Carousel");
|
|
12885
|
+
}
|
|
13072
12886
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
13073
12887
|
return /* @__PURE__ */ jsx(CarouselItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
13074
12888
|
}
|
|
@@ -13078,7 +12892,13 @@ var CarouselTrigger = React11.forwardRef(
|
|
|
13078
12892
|
({ className, children, ...props }, ref) => {
|
|
13079
12893
|
const carouselContext = React11.useContext(CarouselContext);
|
|
13080
12894
|
const itemContext = React11.useContext(CarouselItemContext);
|
|
13081
|
-
if (!carouselContext || !itemContext)
|
|
12895
|
+
if (!carouselContext || !itemContext) {
|
|
12896
|
+
devWarn(
|
|
12897
|
+
"react-carousel/carousel-trigger-outside-item",
|
|
12898
|
+
"CarouselTrigger was rendered outside of a <CarouselItem> within <Carousel>. Nest it inside <CarouselItem>."
|
|
12899
|
+
);
|
|
12900
|
+
throw new Error("CarouselTrigger missing context");
|
|
12901
|
+
}
|
|
13082
12902
|
return /* @__PURE__ */ jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxs(
|
|
13083
12903
|
"button",
|
|
13084
12904
|
{
|
|
@@ -13119,7 +12939,13 @@ CarouselTrigger.displayName = "CarouselTrigger";
|
|
|
13119
12939
|
var CarouselContent = React11.forwardRef(
|
|
13120
12940
|
({ className, children, ...props }, ref) => {
|
|
13121
12941
|
const itemContext = React11.useContext(CarouselItemContext);
|
|
13122
|
-
if (!itemContext)
|
|
12942
|
+
if (!itemContext) {
|
|
12943
|
+
devWarn(
|
|
12944
|
+
"react-carousel/carousel-content-outside-item",
|
|
12945
|
+
"CarouselContent was rendered outside of a <CarouselItem> within <Carousel>. Nest it inside <CarouselItem>."
|
|
12946
|
+
);
|
|
12947
|
+
throw new Error("CarouselContent missing context");
|
|
12948
|
+
}
|
|
13123
12949
|
return /* @__PURE__ */ jsx(
|
|
13124
12950
|
"div",
|
|
13125
12951
|
{
|
|
@@ -13624,6 +13450,1185 @@ var PaymentButton = React11.forwardRef(
|
|
|
13624
13450
|
);
|
|
13625
13451
|
PaymentButton.displayName = "PaymentButton";
|
|
13626
13452
|
|
|
13627
|
-
|
|
13453
|
+
// ../logger/dist/index.js
|
|
13454
|
+
var LEVEL_ORDER = {
|
|
13455
|
+
debug: 10,
|
|
13456
|
+
info: 20,
|
|
13457
|
+
warn: 30,
|
|
13458
|
+
error: 40,
|
|
13459
|
+
fatal: 50
|
|
13460
|
+
};
|
|
13461
|
+
var METHOD = {
|
|
13462
|
+
debug: "debug",
|
|
13463
|
+
info: "info",
|
|
13464
|
+
warn: "warn",
|
|
13465
|
+
error: "error",
|
|
13466
|
+
fatal: "error"
|
|
13467
|
+
};
|
|
13468
|
+
function createConsoleSink(opts) {
|
|
13469
|
+
const pretty = opts?.pretty ?? true;
|
|
13470
|
+
const out = opts?.console ?? console;
|
|
13471
|
+
function emit(level, line, payload) {
|
|
13472
|
+
out[METHOD[level]](line, payload);
|
|
13473
|
+
}
|
|
13474
|
+
return {
|
|
13475
|
+
name: "console",
|
|
13476
|
+
log(record) {
|
|
13477
|
+
if (pretty) {
|
|
13478
|
+
const ts = new Date(record.timestamp).toISOString();
|
|
13479
|
+
emit(
|
|
13480
|
+
record.level,
|
|
13481
|
+
`${ts} ${record.level.toUpperCase()} [${record.app}] ${record.message}`,
|
|
13482
|
+
record.context
|
|
13483
|
+
);
|
|
13484
|
+
} else {
|
|
13485
|
+
emit(record.level, JSON.stringify({ type: "log", ...record }), record.context);
|
|
13486
|
+
}
|
|
13487
|
+
},
|
|
13488
|
+
span(record) {
|
|
13489
|
+
const level = record.status === "error" ? "error" : "debug";
|
|
13490
|
+
if (pretty) {
|
|
13491
|
+
emit(
|
|
13492
|
+
level,
|
|
13493
|
+
`[span] ${record.name} ${record.durationMs.toFixed(2)}ms (${record.status})`,
|
|
13494
|
+
record.context
|
|
13495
|
+
);
|
|
13496
|
+
} else {
|
|
13497
|
+
emit(level, JSON.stringify({ type: "span", ...record }), record.context);
|
|
13498
|
+
}
|
|
13499
|
+
},
|
|
13500
|
+
async flush() {
|
|
13501
|
+
}
|
|
13502
|
+
};
|
|
13503
|
+
}
|
|
13504
|
+
var NOOP_SPAN = {
|
|
13505
|
+
end() {
|
|
13506
|
+
}
|
|
13507
|
+
};
|
|
13508
|
+
function createNoopTelemetry() {
|
|
13509
|
+
const noop = {
|
|
13510
|
+
debug() {
|
|
13511
|
+
},
|
|
13512
|
+
info() {
|
|
13513
|
+
},
|
|
13514
|
+
warn() {
|
|
13515
|
+
},
|
|
13516
|
+
error() {
|
|
13517
|
+
},
|
|
13518
|
+
fatal() {
|
|
13519
|
+
},
|
|
13520
|
+
child() {
|
|
13521
|
+
return noop;
|
|
13522
|
+
},
|
|
13523
|
+
startSpan() {
|
|
13524
|
+
return NOOP_SPAN;
|
|
13525
|
+
},
|
|
13526
|
+
async flush() {
|
|
13527
|
+
},
|
|
13528
|
+
get sinks() {
|
|
13529
|
+
return [];
|
|
13530
|
+
},
|
|
13531
|
+
addSink() {
|
|
13532
|
+
},
|
|
13533
|
+
removeSink() {
|
|
13534
|
+
}
|
|
13535
|
+
};
|
|
13536
|
+
return noop;
|
|
13537
|
+
}
|
|
13538
|
+
var PRESETS = {
|
|
13539
|
+
development: {
|
|
13540
|
+
minLevel: "debug",
|
|
13541
|
+
batch: false,
|
|
13542
|
+
batchSize: 1,
|
|
13543
|
+
sampleRate: 1,
|
|
13544
|
+
pretty: true,
|
|
13545
|
+
beaconFlush: false
|
|
13546
|
+
},
|
|
13547
|
+
production: {
|
|
13548
|
+
minLevel: "warn",
|
|
13549
|
+
batch: true,
|
|
13550
|
+
batchSize: 20,
|
|
13551
|
+
sampleRate: 0.25,
|
|
13552
|
+
pretty: false,
|
|
13553
|
+
beaconFlush: true
|
|
13554
|
+
}
|
|
13555
|
+
};
|
|
13556
|
+
function resolvePreset(env) {
|
|
13557
|
+
return { ...PRESETS[env] };
|
|
13558
|
+
}
|
|
13559
|
+
function redact(value, keys) {
|
|
13560
|
+
if (keys.length === 0) return value;
|
|
13561
|
+
const lookup = new Set(keys.map((k) => k.toLowerCase()));
|
|
13562
|
+
return walk(value, lookup, /* @__PURE__ */ new WeakSet());
|
|
13563
|
+
}
|
|
13564
|
+
function walk(value, keys, seen) {
|
|
13565
|
+
if (value === null || typeof value !== "object") return value;
|
|
13566
|
+
if (seen.has(value)) return "[Circular]";
|
|
13567
|
+
seen.add(value);
|
|
13568
|
+
if (Array.isArray(value)) {
|
|
13569
|
+
return value.map((item) => walk(item, keys, seen));
|
|
13570
|
+
}
|
|
13571
|
+
const out = {};
|
|
13572
|
+
for (const [k, v] of Object.entries(value)) {
|
|
13573
|
+
if (keys.has(k.toLowerCase())) {
|
|
13574
|
+
out[k] = "[REDACTED]";
|
|
13575
|
+
continue;
|
|
13576
|
+
}
|
|
13577
|
+
out[k] = walk(v, keys, seen);
|
|
13578
|
+
}
|
|
13579
|
+
return out;
|
|
13580
|
+
}
|
|
13581
|
+
function createTelemetry(config) {
|
|
13582
|
+
if (config.enabled === false) {
|
|
13583
|
+
return createNoopTelemetry();
|
|
13584
|
+
}
|
|
13585
|
+
const preset = resolvePreset(config.env);
|
|
13586
|
+
const sampleRate = config.sampleRate ?? preset.sampleRate;
|
|
13587
|
+
const redactKeys = config.redactKeys ?? [];
|
|
13588
|
+
const sinks = /* @__PURE__ */ new Map();
|
|
13589
|
+
const sinkOrder = [];
|
|
13590
|
+
const buffer = [];
|
|
13591
|
+
function addSinkInternal(sink) {
|
|
13592
|
+
if (sinks.has(sink.name)) {
|
|
13593
|
+
sinks.set(sink.name, sink);
|
|
13594
|
+
} else {
|
|
13595
|
+
sinks.set(sink.name, sink);
|
|
13596
|
+
sinkOrder.push(sink.name);
|
|
13597
|
+
}
|
|
13598
|
+
}
|
|
13599
|
+
addSinkInternal(createConsoleSink({ pretty: preset.pretty }));
|
|
13600
|
+
if (config.endpoint) {
|
|
13601
|
+
const endpoint = config.endpoint;
|
|
13602
|
+
void import('./faro-engine-47HGRAQH-JKINJPMH.js').then(({ createFaroSink: createFaroSink2 }) => createFaroSink2({ app: config.app, endpoint })).then((faro) => {
|
|
13603
|
+
if (faro) addSinkInternal(faro);
|
|
13604
|
+
}).catch(() => {
|
|
13605
|
+
});
|
|
13606
|
+
}
|
|
13607
|
+
function shouldSample() {
|
|
13608
|
+
if (sampleRate >= 1) return true;
|
|
13609
|
+
if (sampleRate <= 0) return false;
|
|
13610
|
+
return Math.random() < sampleRate;
|
|
13611
|
+
}
|
|
13612
|
+
function dispatch(entry) {
|
|
13613
|
+
if (preset.batch) {
|
|
13614
|
+
buffer.push(entry);
|
|
13615
|
+
if (buffer.length >= preset.batchSize) {
|
|
13616
|
+
void flushBuffer();
|
|
13617
|
+
}
|
|
13618
|
+
return;
|
|
13619
|
+
}
|
|
13620
|
+
deliver(entry);
|
|
13621
|
+
}
|
|
13622
|
+
function deliver(entry) {
|
|
13623
|
+
for (const name of sinkOrder) {
|
|
13624
|
+
const sink = sinks.get(name);
|
|
13625
|
+
if (!sink) continue;
|
|
13626
|
+
if (entry.kind === "log") sink.log(entry.record);
|
|
13627
|
+
else sink.span(entry.record);
|
|
13628
|
+
}
|
|
13629
|
+
}
|
|
13630
|
+
async function flushBuffer() {
|
|
13631
|
+
if (buffer.length > 0) {
|
|
13632
|
+
const pending = buffer.splice(0, buffer.length);
|
|
13633
|
+
for (const entry of pending) deliver(entry);
|
|
13634
|
+
}
|
|
13635
|
+
await Promise.all(
|
|
13636
|
+
sinkOrder.map((name) => sinks.get(name)?.flush() ?? Promise.resolve())
|
|
13637
|
+
);
|
|
13638
|
+
}
|
|
13639
|
+
const root = globalThis;
|
|
13640
|
+
if (preset.beaconFlush && typeof root.addEventListener === "function") {
|
|
13641
|
+
const onExit = () => {
|
|
13642
|
+
void flushBuffer();
|
|
13643
|
+
};
|
|
13644
|
+
root.addEventListener("pagehide", onExit);
|
|
13645
|
+
root.addEventListener("visibilitychange", () => {
|
|
13646
|
+
if (root.document?.visibilityState === "hidden") onExit();
|
|
13647
|
+
});
|
|
13648
|
+
}
|
|
13649
|
+
function makeLogger(boundContext) {
|
|
13650
|
+
function emit(level, message, context) {
|
|
13651
|
+
if (LEVEL_ORDER[level] < LEVEL_ORDER[preset.minLevel]) return;
|
|
13652
|
+
if (!shouldSample()) return;
|
|
13653
|
+
const merged = redact({ ...boundContext, ...context }, redactKeys);
|
|
13654
|
+
const record = {
|
|
13655
|
+
level,
|
|
13656
|
+
message,
|
|
13657
|
+
timestamp: Date.now(),
|
|
13658
|
+
app: config.app,
|
|
13659
|
+
env: config.env,
|
|
13660
|
+
context: merged
|
|
13661
|
+
};
|
|
13662
|
+
dispatch({ kind: "log", record });
|
|
13663
|
+
}
|
|
13664
|
+
const logger = {
|
|
13665
|
+
debug(message, context) {
|
|
13666
|
+
emit("debug", message, context);
|
|
13667
|
+
},
|
|
13668
|
+
info(message, context) {
|
|
13669
|
+
emit("info", message, context);
|
|
13670
|
+
},
|
|
13671
|
+
warn(message, context) {
|
|
13672
|
+
emit("warn", message, context);
|
|
13673
|
+
},
|
|
13674
|
+
error(message, context) {
|
|
13675
|
+
emit("error", message, context);
|
|
13676
|
+
},
|
|
13677
|
+
fatal(message, context) {
|
|
13678
|
+
emit("fatal", message, context);
|
|
13679
|
+
},
|
|
13680
|
+
child(context) {
|
|
13681
|
+
return makeLogger({ ...boundContext, ...context });
|
|
13682
|
+
},
|
|
13683
|
+
startSpan(name, attributes) {
|
|
13684
|
+
const startTime = Date.now();
|
|
13685
|
+
let ended = false;
|
|
13686
|
+
return {
|
|
13687
|
+
end(opts) {
|
|
13688
|
+
if (ended) return;
|
|
13689
|
+
ended = true;
|
|
13690
|
+
const endTime = Date.now();
|
|
13691
|
+
const merged = redact(
|
|
13692
|
+
{ ...boundContext, ...attributes, ...opts?.attributes },
|
|
13693
|
+
redactKeys
|
|
13694
|
+
);
|
|
13695
|
+
const err = opts?.error;
|
|
13696
|
+
const record = {
|
|
13697
|
+
name,
|
|
13698
|
+
startTime,
|
|
13699
|
+
endTime,
|
|
13700
|
+
durationMs: endTime - startTime,
|
|
13701
|
+
app: config.app,
|
|
13702
|
+
env: config.env,
|
|
13703
|
+
context: merged,
|
|
13704
|
+
status: err ? "error" : "ok",
|
|
13705
|
+
...err ? {
|
|
13706
|
+
error: {
|
|
13707
|
+
name: err instanceof Error ? err.name : "Error",
|
|
13708
|
+
message: err instanceof Error ? err.message : String(err)
|
|
13709
|
+
}
|
|
13710
|
+
} : {}
|
|
13711
|
+
};
|
|
13712
|
+
dispatch({ kind: "span", record });
|
|
13713
|
+
}
|
|
13714
|
+
};
|
|
13715
|
+
},
|
|
13716
|
+
flush() {
|
|
13717
|
+
return flushBuffer();
|
|
13718
|
+
},
|
|
13719
|
+
get sinks() {
|
|
13720
|
+
return [...sinkOrder];
|
|
13721
|
+
},
|
|
13722
|
+
addSink(sink) {
|
|
13723
|
+
addSinkInternal(sink);
|
|
13724
|
+
},
|
|
13725
|
+
removeSink(name) {
|
|
13726
|
+
if (sinks.has(name)) {
|
|
13727
|
+
sinks.delete(name);
|
|
13728
|
+
const idx = sinkOrder.indexOf(name);
|
|
13729
|
+
if (idx !== -1) sinkOrder.splice(idx, 1);
|
|
13730
|
+
}
|
|
13731
|
+
}
|
|
13732
|
+
};
|
|
13733
|
+
return logger;
|
|
13734
|
+
}
|
|
13735
|
+
return makeLogger({});
|
|
13736
|
+
}
|
|
13737
|
+
|
|
13738
|
+
// ../react-logger/dist/index.js
|
|
13739
|
+
var TelemetryContext = React11.createContext(null);
|
|
13740
|
+
function TelemetryProvider({ children, ...config }) {
|
|
13741
|
+
const telemetryRef = React11.useRef(null);
|
|
13742
|
+
if (!telemetryRef.current) {
|
|
13743
|
+
telemetryRef.current = createTelemetry(config);
|
|
13744
|
+
}
|
|
13745
|
+
const value = React11.useMemo(
|
|
13746
|
+
() => ({ telemetry: telemetryRef.current }),
|
|
13747
|
+
[]
|
|
13748
|
+
);
|
|
13749
|
+
return React11.createElement(TelemetryContext.Provider, { value }, children);
|
|
13750
|
+
}
|
|
13751
|
+
function useTelemetry() {
|
|
13752
|
+
const ctx = React11.useContext(TelemetryContext);
|
|
13753
|
+
if (!ctx) {
|
|
13754
|
+
devWarn(
|
|
13755
|
+
"react-logger/use-telemetry-outside-provider",
|
|
13756
|
+
"useTelemetry() (or useSpan(), which depends on it) was called outside a <TelemetryProvider>. Wrap your app (or the consuming subtree) in <TelemetryProvider> so the telemetry context is available."
|
|
13757
|
+
);
|
|
13758
|
+
throw new Error("useTelemetry must be used within a <TelemetryProvider>");
|
|
13759
|
+
}
|
|
13760
|
+
return ctx.telemetry;
|
|
13761
|
+
}
|
|
13762
|
+
function useLogger(scope) {
|
|
13763
|
+
const telemetry = useTelemetry();
|
|
13764
|
+
const scopeKey = scope ? JSON.stringify(scope) : "";
|
|
13765
|
+
return React11.useMemo(
|
|
13766
|
+
() => scope ? telemetry.child(scope) : telemetry,
|
|
13767
|
+
[telemetry, scope, scopeKey]
|
|
13768
|
+
);
|
|
13769
|
+
}
|
|
13770
|
+
function useSpan() {
|
|
13771
|
+
const telemetry = useTelemetry();
|
|
13772
|
+
const spanRef = React11.useRef(null);
|
|
13773
|
+
const [isActive, setIsActive] = React11.useState(false);
|
|
13774
|
+
const end = React11.useCallback(
|
|
13775
|
+
(opts) => {
|
|
13776
|
+
if (!spanRef.current) return;
|
|
13777
|
+
spanRef.current.end(opts);
|
|
13778
|
+
spanRef.current = null;
|
|
13779
|
+
setIsActive(false);
|
|
13780
|
+
},
|
|
13781
|
+
[]
|
|
13782
|
+
);
|
|
13783
|
+
const start = React11.useCallback(
|
|
13784
|
+
(name, attributes) => {
|
|
13785
|
+
if (spanRef.current) {
|
|
13786
|
+
spanRef.current.end();
|
|
13787
|
+
}
|
|
13788
|
+
const span = telemetry.startSpan(name, attributes);
|
|
13789
|
+
spanRef.current = span;
|
|
13790
|
+
setIsActive(true);
|
|
13791
|
+
return span;
|
|
13792
|
+
},
|
|
13793
|
+
[telemetry]
|
|
13794
|
+
);
|
|
13795
|
+
React11.useEffect(() => {
|
|
13796
|
+
return () => {
|
|
13797
|
+
if (spanRef.current) {
|
|
13798
|
+
spanRef.current.end();
|
|
13799
|
+
spanRef.current = null;
|
|
13800
|
+
}
|
|
13801
|
+
};
|
|
13802
|
+
}, []);
|
|
13803
|
+
return React11.useMemo(
|
|
13804
|
+
() => ({ start, end, isActive }),
|
|
13805
|
+
[start, end, isActive]
|
|
13806
|
+
);
|
|
13807
|
+
}
|
|
13808
|
+
var TelemetryErrorBoundary = class extends React11.Component {
|
|
13809
|
+
static contextType = TelemetryContext;
|
|
13810
|
+
state = { error: null };
|
|
13811
|
+
static getDerivedStateFromError(error) {
|
|
13812
|
+
return { error };
|
|
13813
|
+
}
|
|
13814
|
+
componentDidCatch(error, info) {
|
|
13815
|
+
const telemetry = this.context?.telemetry;
|
|
13816
|
+
if (telemetry) {
|
|
13817
|
+
telemetry.error(error.message, {
|
|
13818
|
+
...this.props.context,
|
|
13819
|
+
name: error.name,
|
|
13820
|
+
stack: error.stack,
|
|
13821
|
+
componentStack: info.componentStack
|
|
13822
|
+
});
|
|
13823
|
+
}
|
|
13824
|
+
this.props.onError?.(error, info);
|
|
13825
|
+
}
|
|
13826
|
+
reset = () => {
|
|
13827
|
+
this.setState({ error: null });
|
|
13828
|
+
};
|
|
13829
|
+
render() {
|
|
13830
|
+
const { error } = this.state;
|
|
13831
|
+
if (error) {
|
|
13832
|
+
const { fallback } = this.props;
|
|
13833
|
+
if (typeof fallback === "function") {
|
|
13834
|
+
return fallback(error, this.reset);
|
|
13835
|
+
}
|
|
13836
|
+
return fallback ?? null;
|
|
13837
|
+
}
|
|
13838
|
+
return this.props.children;
|
|
13839
|
+
}
|
|
13840
|
+
};
|
|
13841
|
+
|
|
13842
|
+
// ../analytics/dist/index.js
|
|
13843
|
+
var SCHEMA_VERSION = 1;
|
|
13844
|
+
function uuidv4() {
|
|
13845
|
+
const c = typeof globalThis !== "undefined" ? globalThis.crypto : void 0;
|
|
13846
|
+
if (c && typeof c.randomUUID === "function") {
|
|
13847
|
+
return c.randomUUID();
|
|
13848
|
+
}
|
|
13849
|
+
const bytes = new Uint8Array(16);
|
|
13850
|
+
if (c && typeof c.getRandomValues === "function") {
|
|
13851
|
+
c.getRandomValues(bytes);
|
|
13852
|
+
} else {
|
|
13853
|
+
for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);
|
|
13854
|
+
}
|
|
13855
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
13856
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
13857
|
+
const hex = [];
|
|
13858
|
+
for (let i = 0; i < 256; i++) hex.push((i + 256).toString(16).slice(1));
|
|
13859
|
+
return hex[bytes[0]] + hex[bytes[1]] + hex[bytes[2]] + hex[bytes[3]] + "-" + hex[bytes[4]] + hex[bytes[5]] + "-" + hex[bytes[6]] + hex[bytes[7]] + "-" + hex[bytes[8]] + hex[bytes[9]] + "-" + hex[bytes[10]] + hex[bytes[11]] + hex[bytes[12]] + hex[bytes[13]] + hex[bytes[14]] + hex[bytes[15]];
|
|
13860
|
+
}
|
|
13861
|
+
var UUID_V4_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
13862
|
+
function isUuidV4(value) {
|
|
13863
|
+
return typeof value === "string" && UUID_V4_RE.test(value);
|
|
13864
|
+
}
|
|
13865
|
+
function createMemoryStorage() {
|
|
13866
|
+
const map = /* @__PURE__ */ new Map();
|
|
13867
|
+
return {
|
|
13868
|
+
get: (k) => map.has(k) ? map.get(k) : null,
|
|
13869
|
+
set: (k, v) => {
|
|
13870
|
+
map.set(k, v);
|
|
13871
|
+
},
|
|
13872
|
+
remove: (k) => {
|
|
13873
|
+
map.delete(k);
|
|
13874
|
+
}
|
|
13875
|
+
};
|
|
13876
|
+
}
|
|
13877
|
+
function createLocalStorageAdapter(ls) {
|
|
13878
|
+
return {
|
|
13879
|
+
get: (k) => {
|
|
13880
|
+
try {
|
|
13881
|
+
return ls.getItem(k);
|
|
13882
|
+
} catch {
|
|
13883
|
+
return null;
|
|
13884
|
+
}
|
|
13885
|
+
},
|
|
13886
|
+
set: (k, v) => {
|
|
13887
|
+
try {
|
|
13888
|
+
ls.setItem(k, v);
|
|
13889
|
+
} catch {
|
|
13890
|
+
}
|
|
13891
|
+
},
|
|
13892
|
+
remove: (k) => {
|
|
13893
|
+
try {
|
|
13894
|
+
ls.removeItem(k);
|
|
13895
|
+
} catch {
|
|
13896
|
+
}
|
|
13897
|
+
}
|
|
13898
|
+
};
|
|
13899
|
+
}
|
|
13900
|
+
function createCookieAdapter(doc, maxAgeSeconds = 60 * 60 * 24 * 365) {
|
|
13901
|
+
const read = (k) => {
|
|
13902
|
+
const target = encodeURIComponent(k) + "=";
|
|
13903
|
+
const parts = doc.cookie ? doc.cookie.split(";") : [];
|
|
13904
|
+
for (const part of parts) {
|
|
13905
|
+
const c = part.trim();
|
|
13906
|
+
if (c.startsWith(target)) {
|
|
13907
|
+
return decodeURIComponent(c.slice(target.length));
|
|
13908
|
+
}
|
|
13909
|
+
}
|
|
13910
|
+
return null;
|
|
13911
|
+
};
|
|
13912
|
+
return {
|
|
13913
|
+
get: read,
|
|
13914
|
+
set: (k, v) => {
|
|
13915
|
+
doc.cookie = `${encodeURIComponent(k)}=${encodeURIComponent(
|
|
13916
|
+
v
|
|
13917
|
+
)}; path=/; max-age=${maxAgeSeconds}; SameSite=Lax`;
|
|
13918
|
+
},
|
|
13919
|
+
remove: (k) => {
|
|
13920
|
+
doc.cookie = `${encodeURIComponent(k)}=; path=/; max-age=0; SameSite=Lax`;
|
|
13921
|
+
}
|
|
13922
|
+
};
|
|
13923
|
+
}
|
|
13924
|
+
function resolveStorage(override) {
|
|
13925
|
+
if (override) return override;
|
|
13926
|
+
const g = globalThis;
|
|
13927
|
+
if (g.localStorage) {
|
|
13928
|
+
try {
|
|
13929
|
+
const probe = "__rfx_a_probe__";
|
|
13930
|
+
g.localStorage.setItem(probe, "1");
|
|
13931
|
+
g.localStorage.removeItem(probe);
|
|
13932
|
+
return createLocalStorageAdapter(g.localStorage);
|
|
13933
|
+
} catch {
|
|
13934
|
+
}
|
|
13935
|
+
}
|
|
13936
|
+
if (g.document && typeof g.document.cookie === "string") {
|
|
13937
|
+
return createCookieAdapter(g.document);
|
|
13938
|
+
}
|
|
13939
|
+
return createMemoryStorage();
|
|
13940
|
+
}
|
|
13941
|
+
var DEFAULT_SESSION_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
13942
|
+
var DEFAULT_KEY = "rfx:analytics:session";
|
|
13943
|
+
var CAMPAIGN_PARAMS = [
|
|
13944
|
+
"utm_source",
|
|
13945
|
+
"utm_medium",
|
|
13946
|
+
"utm_campaign",
|
|
13947
|
+
"utm_term",
|
|
13948
|
+
"utm_content",
|
|
13949
|
+
"gclid",
|
|
13950
|
+
"fbclid",
|
|
13951
|
+
"msclkid"
|
|
13952
|
+
];
|
|
13953
|
+
function campaignFingerprint(search) {
|
|
13954
|
+
if (!search) return void 0;
|
|
13955
|
+
let qs = search;
|
|
13956
|
+
const q = qs.indexOf("?");
|
|
13957
|
+
if (q !== -1) qs = qs.slice(q + 1);
|
|
13958
|
+
let params;
|
|
13959
|
+
try {
|
|
13960
|
+
params = new URLSearchParams(qs);
|
|
13961
|
+
} catch {
|
|
13962
|
+
return void 0;
|
|
13963
|
+
}
|
|
13964
|
+
const pairs = [];
|
|
13965
|
+
for (const p of CAMPAIGN_PARAMS) {
|
|
13966
|
+
const v = params.get(p);
|
|
13967
|
+
if (v) pairs.push(`${p}=${v}`);
|
|
13968
|
+
}
|
|
13969
|
+
return pairs.length ? pairs.join("&") : void 0;
|
|
13970
|
+
}
|
|
13971
|
+
function createSession(config, now = () => Date.now()) {
|
|
13972
|
+
const storage = resolveStorage(config?.storage);
|
|
13973
|
+
const key = config?.storageKey ?? DEFAULT_KEY;
|
|
13974
|
+
const timeoutMs = config?.timeoutMs ?? DEFAULT_SESSION_TIMEOUT_MS;
|
|
13975
|
+
const resetOnCampaign = config?.resetOnCampaign ?? true;
|
|
13976
|
+
function read() {
|
|
13977
|
+
const raw = storage.get(key);
|
|
13978
|
+
if (!raw) return null;
|
|
13979
|
+
try {
|
|
13980
|
+
const parsed = JSON.parse(raw);
|
|
13981
|
+
if (parsed && typeof parsed.id === "string") return parsed;
|
|
13982
|
+
} catch {
|
|
13983
|
+
}
|
|
13984
|
+
return null;
|
|
13985
|
+
}
|
|
13986
|
+
function write(s) {
|
|
13987
|
+
storage.set(key, JSON.stringify(s));
|
|
13988
|
+
}
|
|
13989
|
+
function mint(campaign) {
|
|
13990
|
+
const s = {
|
|
13991
|
+
id: uuidv4(),
|
|
13992
|
+
lastActivity: now(),
|
|
13993
|
+
campaign
|
|
13994
|
+
};
|
|
13995
|
+
write(s);
|
|
13996
|
+
return s;
|
|
13997
|
+
}
|
|
13998
|
+
function ensure(campaign) {
|
|
13999
|
+
const existing = read();
|
|
14000
|
+
const t = now();
|
|
14001
|
+
if (!existing) return mint(campaign);
|
|
14002
|
+
if (t - existing.lastActivity > timeoutMs) {
|
|
14003
|
+
return mint(campaign);
|
|
14004
|
+
}
|
|
14005
|
+
if (resetOnCampaign && campaign !== void 0 && existing.campaign !== campaign) {
|
|
14006
|
+
return mint(campaign);
|
|
14007
|
+
}
|
|
14008
|
+
return existing;
|
|
14009
|
+
}
|
|
14010
|
+
return {
|
|
14011
|
+
/** Get the current session id, rotating if expired. */
|
|
14012
|
+
id(campaign) {
|
|
14013
|
+
return ensure(campaign).id;
|
|
14014
|
+
},
|
|
14015
|
+
/** Force a brand-new session. */
|
|
14016
|
+
start(campaign) {
|
|
14017
|
+
return mint(campaign).id;
|
|
14018
|
+
},
|
|
14019
|
+
/** End the current session (next id() mints a fresh one). */
|
|
14020
|
+
end() {
|
|
14021
|
+
storage.remove(key);
|
|
14022
|
+
},
|
|
14023
|
+
/** Touch activity so the inactivity window slides forward. */
|
|
14024
|
+
touch(campaign) {
|
|
14025
|
+
const s = ensure(campaign);
|
|
14026
|
+
s.lastActivity = now();
|
|
14027
|
+
write(s);
|
|
14028
|
+
return s.id;
|
|
14029
|
+
},
|
|
14030
|
+
/** Attach/merge session-scoped properties. */
|
|
14031
|
+
set(props) {
|
|
14032
|
+
const s = ensure();
|
|
14033
|
+
s.props = { ...s.props ?? {}, ...props };
|
|
14034
|
+
write(s);
|
|
14035
|
+
},
|
|
14036
|
+
/** Read session-scoped properties (undefined when none). */
|
|
14037
|
+
props() {
|
|
14038
|
+
return read()?.props;
|
|
14039
|
+
}
|
|
14040
|
+
};
|
|
14041
|
+
}
|
|
14042
|
+
var DEFAULT_KEY2 = "rfx:analytics:anon";
|
|
14043
|
+
function createIdentity(config) {
|
|
14044
|
+
const storage = resolveStorage(config?.storage);
|
|
14045
|
+
const key = config?.storageKey ?? DEFAULT_KEY2;
|
|
14046
|
+
let userId;
|
|
14047
|
+
function loadOrMintAnon() {
|
|
14048
|
+
const existing = storage.get(key);
|
|
14049
|
+
if (isUuidV4(existing)) return existing;
|
|
14050
|
+
const fresh = uuidv4();
|
|
14051
|
+
storage.set(key, fresh);
|
|
14052
|
+
return fresh;
|
|
14053
|
+
}
|
|
14054
|
+
let anonymousId = loadOrMintAnon();
|
|
14055
|
+
return {
|
|
14056
|
+
anonymousId() {
|
|
14057
|
+
return anonymousId;
|
|
14058
|
+
},
|
|
14059
|
+
userId() {
|
|
14060
|
+
return userId;
|
|
14061
|
+
},
|
|
14062
|
+
/** identify(): bind an opaque app user id (no validation, no persistence). */
|
|
14063
|
+
setUserId(id) {
|
|
14064
|
+
userId = id;
|
|
14065
|
+
},
|
|
14066
|
+
/**
|
|
14067
|
+
* alias(): returns the stitch pair for the envelope. `previousId`
|
|
14068
|
+
* defaults to the current user or anonymous id.
|
|
14069
|
+
*/
|
|
14070
|
+
alias(nextUserId, previousId) {
|
|
14071
|
+
const prev = previousId ?? userId ?? anonymousId;
|
|
14072
|
+
userId = nextUserId;
|
|
14073
|
+
return { userId: nextUserId, previousId: prev };
|
|
14074
|
+
},
|
|
14075
|
+
/**
|
|
14076
|
+
* reset(): privacy-safe logout. Drops the user binding and mints a brand
|
|
14077
|
+
* new anonymousId so the next visitor is not stitched to the old one.
|
|
14078
|
+
*/
|
|
14079
|
+
reset() {
|
|
14080
|
+
userId = void 0;
|
|
14081
|
+
anonymousId = uuidv4();
|
|
14082
|
+
storage.set(key, anonymousId);
|
|
14083
|
+
return anonymousId;
|
|
14084
|
+
}
|
|
14085
|
+
};
|
|
14086
|
+
}
|
|
14087
|
+
function createConsent(config) {
|
|
14088
|
+
const granted = new Set(config?.granted ?? []);
|
|
14089
|
+
return {
|
|
14090
|
+
strict: config?.strict ?? false,
|
|
14091
|
+
grant(...categories) {
|
|
14092
|
+
for (const c of categories) granted.add(c);
|
|
14093
|
+
},
|
|
14094
|
+
revoke(...categories) {
|
|
14095
|
+
for (const c of categories) granted.delete(c);
|
|
14096
|
+
},
|
|
14097
|
+
granted() {
|
|
14098
|
+
return [...granted];
|
|
14099
|
+
},
|
|
14100
|
+
isGranted(category) {
|
|
14101
|
+
return granted.has(category);
|
|
14102
|
+
},
|
|
14103
|
+
allows(required) {
|
|
14104
|
+
if (!required || required.length === 0) return true;
|
|
14105
|
+
return required.every((c) => granted.has(c));
|
|
14106
|
+
}
|
|
14107
|
+
};
|
|
14108
|
+
}
|
|
14109
|
+
var PII_DENY_LIST = [
|
|
14110
|
+
"email",
|
|
14111
|
+
"phone",
|
|
14112
|
+
"mobile",
|
|
14113
|
+
"firstname",
|
|
14114
|
+
"lastname",
|
|
14115
|
+
"fullname",
|
|
14116
|
+
"givenname",
|
|
14117
|
+
"surname",
|
|
14118
|
+
"password",
|
|
14119
|
+
"passwd",
|
|
14120
|
+
"ssn",
|
|
14121
|
+
"creditcard",
|
|
14122
|
+
"cardnumber",
|
|
14123
|
+
"cvv",
|
|
14124
|
+
"dob",
|
|
14125
|
+
"dateofbirth",
|
|
14126
|
+
"address"
|
|
14127
|
+
];
|
|
14128
|
+
var PII_EXACT_KEYS = ["name"];
|
|
14129
|
+
var REDACTED = "[REDACTED]";
|
|
14130
|
+
function normalize(key) {
|
|
14131
|
+
return key.toLowerCase().replace(/[_\-\s]/g, "");
|
|
14132
|
+
}
|
|
14133
|
+
function createRedactor(extraKeys = []) {
|
|
14134
|
+
const exact = /* @__PURE__ */ new Set([
|
|
14135
|
+
...extraKeys.map(normalize),
|
|
14136
|
+
...PII_EXACT_KEYS.map(normalize)
|
|
14137
|
+
]);
|
|
14138
|
+
const deny = PII_DENY_LIST.map(normalize);
|
|
14139
|
+
const shouldRedact = (key) => {
|
|
14140
|
+
const n = normalize(key);
|
|
14141
|
+
if (exact.has(n)) return true;
|
|
14142
|
+
return deny.some((d) => n.includes(d));
|
|
14143
|
+
};
|
|
14144
|
+
const walk2 = (value) => {
|
|
14145
|
+
if (Array.isArray(value)) return value.map(walk2);
|
|
14146
|
+
if (value && typeof value === "object") {
|
|
14147
|
+
const out = {};
|
|
14148
|
+
for (const [k, v] of Object.entries(value)) {
|
|
14149
|
+
out[k] = shouldRedact(k) ? REDACTED : walk2(v);
|
|
14150
|
+
}
|
|
14151
|
+
return out;
|
|
14152
|
+
}
|
|
14153
|
+
return value;
|
|
14154
|
+
};
|
|
14155
|
+
return {
|
|
14156
|
+
shouldRedact,
|
|
14157
|
+
/** Redact a properties/traits bag (returns a new object). */
|
|
14158
|
+
redact(props) {
|
|
14159
|
+
if (!props) return props;
|
|
14160
|
+
return walk2(props);
|
|
14161
|
+
}
|
|
14162
|
+
};
|
|
14163
|
+
}
|
|
14164
|
+
var NO_RETRY = /* @__PURE__ */ new Set([400, 401, 413]);
|
|
14165
|
+
function base64(input) {
|
|
14166
|
+
const g = globalThis;
|
|
14167
|
+
if (typeof g.btoa === "function") {
|
|
14168
|
+
return g.btoa(input);
|
|
14169
|
+
}
|
|
14170
|
+
if (g.Buffer) {
|
|
14171
|
+
return g.Buffer.from(input, "utf-8").toString("base64");
|
|
14172
|
+
}
|
|
14173
|
+
throw new Error("No base64 implementation available (btoa/Buffer)");
|
|
14174
|
+
}
|
|
14175
|
+
function byteLength(s) {
|
|
14176
|
+
const g = globalThis;
|
|
14177
|
+
if (g.TextEncoder) return new g.TextEncoder().encode(s).length;
|
|
14178
|
+
return unescape(encodeURIComponent(s)).length;
|
|
14179
|
+
}
|
|
14180
|
+
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
14181
|
+
function splitBatch(batch, maxBatchBytes, maxEventBytes) {
|
|
14182
|
+
const batches = [];
|
|
14183
|
+
const dropped = [];
|
|
14184
|
+
let current = [];
|
|
14185
|
+
let currentBytes = 2;
|
|
14186
|
+
for (const ev of batch) {
|
|
14187
|
+
const evBytes = byteLength(JSON.stringify(ev));
|
|
14188
|
+
if (evBytes > maxEventBytes) {
|
|
14189
|
+
dropped.push(ev);
|
|
14190
|
+
continue;
|
|
14191
|
+
}
|
|
14192
|
+
if (current.length && currentBytes + evBytes + 1 > maxBatchBytes) {
|
|
14193
|
+
batches.push(current);
|
|
14194
|
+
current = [];
|
|
14195
|
+
currentBytes = 2;
|
|
14196
|
+
}
|
|
14197
|
+
current.push(ev);
|
|
14198
|
+
currentBytes += evBytes + 1;
|
|
14199
|
+
}
|
|
14200
|
+
if (current.length) batches.push(current);
|
|
14201
|
+
return { batches, dropped };
|
|
14202
|
+
}
|
|
14203
|
+
function createHttpSink(options) {
|
|
14204
|
+
const {
|
|
14205
|
+
endpoint,
|
|
14206
|
+
writeKey,
|
|
14207
|
+
maxRetries = 3,
|
|
14208
|
+
backoffBaseMs = 500,
|
|
14209
|
+
consentCategories = ["analytics"],
|
|
14210
|
+
maxBatchBytes = 5e5,
|
|
14211
|
+
maxEventBytes = 32e3
|
|
14212
|
+
} = options;
|
|
14213
|
+
const base = endpoint.replace(/\/+$/, "");
|
|
14214
|
+
const url = `${base}/v${SCHEMA_VERSION}/batch`;
|
|
14215
|
+
const authHeader = `Basic ${base64(`${writeKey}:`)}`;
|
|
14216
|
+
const resolveFetch = () => {
|
|
14217
|
+
if (options.fetchImpl) return options.fetchImpl;
|
|
14218
|
+
const f = globalThis.fetch;
|
|
14219
|
+
if (!f) throw new Error("No fetch implementation available");
|
|
14220
|
+
return f;
|
|
14221
|
+
};
|
|
14222
|
+
const resolveBeacon = () => {
|
|
14223
|
+
if (options.beaconImpl) return options.beaconImpl;
|
|
14224
|
+
const nav = globalThis.navigator;
|
|
14225
|
+
if (nav && typeof nav.sendBeacon === "function") {
|
|
14226
|
+
return (u, body) => nav.sendBeacon(u, body);
|
|
14227
|
+
}
|
|
14228
|
+
return void 0;
|
|
14229
|
+
};
|
|
14230
|
+
function envelope(batch) {
|
|
14231
|
+
return {
|
|
14232
|
+
batch,
|
|
14233
|
+
sentAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14234
|
+
batchId: uuidv4()
|
|
14235
|
+
};
|
|
14236
|
+
}
|
|
14237
|
+
function sendViaBeacon(batch) {
|
|
14238
|
+
const beacon = resolveBeacon();
|
|
14239
|
+
if (!beacon) return false;
|
|
14240
|
+
const beaconUrl = `${url}?writeKey=${encodeURIComponent(writeKey)}`;
|
|
14241
|
+
return beacon(beaconUrl, JSON.stringify(envelope(batch)));
|
|
14242
|
+
}
|
|
14243
|
+
async function sendViaFetch(batch) {
|
|
14244
|
+
const doFetch = resolveFetch();
|
|
14245
|
+
const body = JSON.stringify(envelope(batch));
|
|
14246
|
+
for (let attempt = 0; ; attempt++) {
|
|
14247
|
+
let status;
|
|
14248
|
+
try {
|
|
14249
|
+
const res = await doFetch(url, {
|
|
14250
|
+
method: "POST",
|
|
14251
|
+
headers: {
|
|
14252
|
+
"Content-Type": "application/json",
|
|
14253
|
+
Authorization: authHeader
|
|
14254
|
+
},
|
|
14255
|
+
body,
|
|
14256
|
+
keepalive: true
|
|
14257
|
+
});
|
|
14258
|
+
status = res.status;
|
|
14259
|
+
} catch {
|
|
14260
|
+
status = 0;
|
|
14261
|
+
}
|
|
14262
|
+
if (status >= 200 && status < 300) return;
|
|
14263
|
+
if (NO_RETRY.has(status)) return;
|
|
14264
|
+
if (attempt >= maxRetries) return;
|
|
14265
|
+
const delay = backoffBaseMs * 2 ** attempt;
|
|
14266
|
+
await sleep(delay);
|
|
14267
|
+
}
|
|
14268
|
+
}
|
|
14269
|
+
return {
|
|
14270
|
+
name: "http",
|
|
14271
|
+
consentCategories,
|
|
14272
|
+
async deliver(batch, ctx) {
|
|
14273
|
+
if (batch.length === 0) return;
|
|
14274
|
+
const { batches } = splitBatch(
|
|
14275
|
+
batch,
|
|
14276
|
+
maxBatchBytes,
|
|
14277
|
+
maxEventBytes
|
|
14278
|
+
);
|
|
14279
|
+
for (const part of batches) {
|
|
14280
|
+
if (ctx.unload) {
|
|
14281
|
+
if (sendViaBeacon(part)) continue;
|
|
14282
|
+
void sendViaFetch(part);
|
|
14283
|
+
} else {
|
|
14284
|
+
await sendViaFetch(part);
|
|
14285
|
+
}
|
|
14286
|
+
}
|
|
14287
|
+
}
|
|
14288
|
+
};
|
|
14289
|
+
}
|
|
14290
|
+
function createConsoleSink2(options = {}) {
|
|
14291
|
+
const logger = options.logger ?? globalThis.console;
|
|
14292
|
+
return {
|
|
14293
|
+
name: "console",
|
|
14294
|
+
consentCategories: options.consentCategories,
|
|
14295
|
+
deliver(batch) {
|
|
14296
|
+
for (const ev of batch) {
|
|
14297
|
+
const label = `[analytics] ${ev.type}${ev.event ? ` ${ev.event}` : ""}`;
|
|
14298
|
+
if (typeof logger.groupCollapsed === "function") {
|
|
14299
|
+
logger.groupCollapsed(label);
|
|
14300
|
+
logger.log(ev);
|
|
14301
|
+
logger.groupEnd?.();
|
|
14302
|
+
} else {
|
|
14303
|
+
logger.log(label, ev);
|
|
14304
|
+
}
|
|
14305
|
+
}
|
|
14306
|
+
}
|
|
14307
|
+
};
|
|
14308
|
+
}
|
|
14309
|
+
function createNoopAnalytics() {
|
|
14310
|
+
const sessionId = "00000000-0000-4000-8000-000000000000";
|
|
14311
|
+
const noop = () => {
|
|
14312
|
+
};
|
|
14313
|
+
const api = {
|
|
14314
|
+
track: noop,
|
|
14315
|
+
identify: noop,
|
|
14316
|
+
page: noop,
|
|
14317
|
+
screen: noop,
|
|
14318
|
+
group: noop,
|
|
14319
|
+
alias: noop,
|
|
14320
|
+
session: {
|
|
14321
|
+
id: () => sessionId,
|
|
14322
|
+
start: () => sessionId,
|
|
14323
|
+
end: noop,
|
|
14324
|
+
set: noop
|
|
14325
|
+
},
|
|
14326
|
+
consent: {
|
|
14327
|
+
grant: noop,
|
|
14328
|
+
revoke: noop,
|
|
14329
|
+
granted: () => [],
|
|
14330
|
+
isGranted: () => false
|
|
14331
|
+
},
|
|
14332
|
+
anonymousId: () => sessionId,
|
|
14333
|
+
userId: () => void 0,
|
|
14334
|
+
with: () => api,
|
|
14335
|
+
addSink: noop,
|
|
14336
|
+
removeSink: noop,
|
|
14337
|
+
get sinks() {
|
|
14338
|
+
return [];
|
|
14339
|
+
},
|
|
14340
|
+
flush: async () => {
|
|
14341
|
+
},
|
|
14342
|
+
reset: noop,
|
|
14343
|
+
enabled: false
|
|
14344
|
+
};
|
|
14345
|
+
return api;
|
|
14346
|
+
}
|
|
14347
|
+
var LIBRARY = {
|
|
14348
|
+
name: "@refraction-ui/analytics",
|
|
14349
|
+
version: "0.1.0"
|
|
14350
|
+
};
|
|
14351
|
+
function readPage() {
|
|
14352
|
+
const g = globalThis;
|
|
14353
|
+
if (!g.location && !g.document) return void 0;
|
|
14354
|
+
return {
|
|
14355
|
+
path: g.location?.pathname,
|
|
14356
|
+
url: g.location?.href,
|
|
14357
|
+
search: g.location?.search,
|
|
14358
|
+
title: g.document?.title,
|
|
14359
|
+
referrer: g.document?.referrer
|
|
14360
|
+
};
|
|
14361
|
+
}
|
|
14362
|
+
function createAnalytics(config) {
|
|
14363
|
+
if (config.enabled === false) {
|
|
14364
|
+
return createNoopAnalytics();
|
|
14365
|
+
}
|
|
14366
|
+
const { app, env } = config;
|
|
14367
|
+
const preset = config.preset ?? (env === "production" ? "prod" : "dev");
|
|
14368
|
+
const sampleRate = config.sampleRate ?? 1;
|
|
14369
|
+
const batchSize = config.batchSize ?? 20;
|
|
14370
|
+
const flushIntervalMs = config.flushIntervalMs ?? 1e4;
|
|
14371
|
+
const session = createSession(config.session);
|
|
14372
|
+
const identity = createIdentity(config.identity);
|
|
14373
|
+
const consent = createConsent(config.consent);
|
|
14374
|
+
const redactor = createRedactor(config.redactKeys);
|
|
14375
|
+
const sinks = /* @__PURE__ */ new Map();
|
|
14376
|
+
const sinkOrder = [];
|
|
14377
|
+
const initialized = /* @__PURE__ */ new Set();
|
|
14378
|
+
function registerSink(sink) {
|
|
14379
|
+
if (!sinks.has(sink.name)) sinkOrder.push(sink.name);
|
|
14380
|
+
sinks.set(sink.name, sink);
|
|
14381
|
+
}
|
|
14382
|
+
if (config.endpoint) {
|
|
14383
|
+
registerSink(
|
|
14384
|
+
createHttpSink({
|
|
14385
|
+
endpoint: config.endpoint,
|
|
14386
|
+
writeKey: config.writeKey ?? ""
|
|
14387
|
+
})
|
|
14388
|
+
);
|
|
14389
|
+
}
|
|
14390
|
+
if (preset === "dev") {
|
|
14391
|
+
registerSink(createConsoleSink2());
|
|
14392
|
+
}
|
|
14393
|
+
for (const s of config.sinks ?? []) registerSink(s);
|
|
14394
|
+
function ensureInit(sink) {
|
|
14395
|
+
if (initialized.has(sink.name)) return;
|
|
14396
|
+
initialized.add(sink.name);
|
|
14397
|
+
if (sink.init) {
|
|
14398
|
+
return sink.init({ app, env, endpoint: config.endpoint });
|
|
14399
|
+
}
|
|
14400
|
+
}
|
|
14401
|
+
const buffer = [];
|
|
14402
|
+
let timer;
|
|
14403
|
+
function startTimer() {
|
|
14404
|
+
if (preset !== "prod" || timer) return;
|
|
14405
|
+
timer = setInterval(() => {
|
|
14406
|
+
void flush(false);
|
|
14407
|
+
}, flushIntervalMs);
|
|
14408
|
+
timer.unref?.();
|
|
14409
|
+
}
|
|
14410
|
+
function deliverToSinks(batch, unload) {
|
|
14411
|
+
if (batch.length === 0) return;
|
|
14412
|
+
const ctx = { unload };
|
|
14413
|
+
const pending = [];
|
|
14414
|
+
for (const name of sinkOrder) {
|
|
14415
|
+
const sink = sinks.get(name);
|
|
14416
|
+
if (!sink) continue;
|
|
14417
|
+
if (!consent.allows(sink.consentCategories)) continue;
|
|
14418
|
+
const inited = ensureInit(sink);
|
|
14419
|
+
if (inited && typeof inited.then === "function") {
|
|
14420
|
+
pending.push(
|
|
14421
|
+
inited.then(() => sink.deliver(batch, ctx))
|
|
14422
|
+
);
|
|
14423
|
+
} else {
|
|
14424
|
+
const r = sink.deliver(batch, ctx);
|
|
14425
|
+
if (r && typeof r.then === "function") {
|
|
14426
|
+
pending.push(r);
|
|
14427
|
+
}
|
|
14428
|
+
}
|
|
14429
|
+
}
|
|
14430
|
+
if (pending.length) return Promise.all(pending).then(() => void 0);
|
|
14431
|
+
}
|
|
14432
|
+
async function flush(unload = false) {
|
|
14433
|
+
const batch = buffer.splice(0, buffer.length);
|
|
14434
|
+
await deliverToSinks(batch, unload);
|
|
14435
|
+
for (const name of sinkOrder) {
|
|
14436
|
+
const sink = sinks.get(name);
|
|
14437
|
+
if (sink?.flush && consent.allows(sink.consentCategories)) {
|
|
14438
|
+
await sink.flush();
|
|
14439
|
+
}
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
function bindUnload() {
|
|
14443
|
+
if (preset !== "prod") return;
|
|
14444
|
+
const g = globalThis;
|
|
14445
|
+
if (typeof g.addEventListener !== "function") return;
|
|
14446
|
+
const onUnload = () => {
|
|
14447
|
+
void deliverToSinks(buffer.splice(0, buffer.length), true);
|
|
14448
|
+
};
|
|
14449
|
+
g.addEventListener("pagehide", onUnload);
|
|
14450
|
+
g.addEventListener("visibilitychange", () => {
|
|
14451
|
+
if (g.document?.visibilityState === "hidden") onUnload();
|
|
14452
|
+
});
|
|
14453
|
+
}
|
|
14454
|
+
startTimer();
|
|
14455
|
+
bindUnload();
|
|
14456
|
+
function buildContext(extra, childCtx) {
|
|
14457
|
+
const page = readPage();
|
|
14458
|
+
return {
|
|
14459
|
+
app,
|
|
14460
|
+
env,
|
|
14461
|
+
...page ? { page } : {},
|
|
14462
|
+
...childCtx,
|
|
14463
|
+
...extra,
|
|
14464
|
+
library: LIBRARY
|
|
14465
|
+
};
|
|
14466
|
+
}
|
|
14467
|
+
function sampled() {
|
|
14468
|
+
if (sampleRate >= 1) return true;
|
|
14469
|
+
if (sampleRate <= 0) return false;
|
|
14470
|
+
return Math.random() < sampleRate;
|
|
14471
|
+
}
|
|
14472
|
+
function enqueue(ev) {
|
|
14473
|
+
if (preset === "dev") {
|
|
14474
|
+
void deliverToSinks([ev], false);
|
|
14475
|
+
return;
|
|
14476
|
+
}
|
|
14477
|
+
buffer.push(ev);
|
|
14478
|
+
if (buffer.length >= batchSize) {
|
|
14479
|
+
void flush(false);
|
|
14480
|
+
}
|
|
14481
|
+
}
|
|
14482
|
+
function emit(type, fields, childCtx, opts) {
|
|
14483
|
+
if (!sampled()) return;
|
|
14484
|
+
const page = readPage();
|
|
14485
|
+
const campaign = campaignFingerprint(page?.search);
|
|
14486
|
+
const sessionId = session.touch(campaign);
|
|
14487
|
+
const sessionProps = session.props();
|
|
14488
|
+
const ev = {
|
|
14489
|
+
type,
|
|
14490
|
+
messageId: uuidv4(),
|
|
14491
|
+
anonymousId: identity.anonymousId(),
|
|
14492
|
+
userId: identity.userId(),
|
|
14493
|
+
sessionId,
|
|
14494
|
+
context: buildContext(opts?.context, childCtx),
|
|
14495
|
+
timestamp: opts?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
14496
|
+
schemaVersion: SCHEMA_VERSION,
|
|
14497
|
+
...fields
|
|
14498
|
+
};
|
|
14499
|
+
if (sessionProps && (ev.properties || type === "track" || type === "page" || type === "screen")) {
|
|
14500
|
+
ev.properties = { ...sessionProps, ...ev.properties ?? {} };
|
|
14501
|
+
}
|
|
14502
|
+
enqueue(ev);
|
|
14503
|
+
}
|
|
14504
|
+
function makeApi(childCtx) {
|
|
14505
|
+
const api = {
|
|
14506
|
+
track(event, properties, opts) {
|
|
14507
|
+
emit(
|
|
14508
|
+
"track",
|
|
14509
|
+
{ event, properties: redactor.redact(properties) },
|
|
14510
|
+
childCtx,
|
|
14511
|
+
opts
|
|
14512
|
+
);
|
|
14513
|
+
},
|
|
14514
|
+
identify(userId, traits, opts) {
|
|
14515
|
+
identity.setUserId(userId);
|
|
14516
|
+
emit("identify", { traits: redactor.redact(traits) }, childCtx, opts);
|
|
14517
|
+
},
|
|
14518
|
+
page(name, properties, opts) {
|
|
14519
|
+
emit(
|
|
14520
|
+
"page",
|
|
14521
|
+
{ event: name, properties: redactor.redact(properties) },
|
|
14522
|
+
childCtx,
|
|
14523
|
+
opts
|
|
14524
|
+
);
|
|
14525
|
+
},
|
|
14526
|
+
screen(name, properties, opts) {
|
|
14527
|
+
emit(
|
|
14528
|
+
"screen",
|
|
14529
|
+
{ event: name, properties: redactor.redact(properties) },
|
|
14530
|
+
childCtx,
|
|
14531
|
+
opts
|
|
14532
|
+
);
|
|
14533
|
+
},
|
|
14534
|
+
group(groupId, traits, opts) {
|
|
14535
|
+
emit(
|
|
14536
|
+
"group",
|
|
14537
|
+
{ groupId, traits: redactor.redact(traits) },
|
|
14538
|
+
childCtx,
|
|
14539
|
+
opts
|
|
14540
|
+
);
|
|
14541
|
+
},
|
|
14542
|
+
alias(userId, previousId, opts) {
|
|
14543
|
+
const stitch = identity.alias(userId, previousId);
|
|
14544
|
+
emit(
|
|
14545
|
+
"alias",
|
|
14546
|
+
{ userId: stitch.userId, previousId: stitch.previousId },
|
|
14547
|
+
childCtx,
|
|
14548
|
+
opts
|
|
14549
|
+
);
|
|
14550
|
+
},
|
|
14551
|
+
session: {
|
|
14552
|
+
id: () => session.id(),
|
|
14553
|
+
start: () => session.start(),
|
|
14554
|
+
end: () => session.end(),
|
|
14555
|
+
set: (props) => session.set(props)
|
|
14556
|
+
},
|
|
14557
|
+
consent: {
|
|
14558
|
+
grant: (...c) => consent.grant(...c),
|
|
14559
|
+
revoke: (...c) => consent.revoke(...c),
|
|
14560
|
+
granted: () => consent.granted(),
|
|
14561
|
+
isGranted: (c) => consent.isGranted(c)
|
|
14562
|
+
},
|
|
14563
|
+
anonymousId: () => identity.anonymousId(),
|
|
14564
|
+
userId: () => identity.userId(),
|
|
14565
|
+
with(extra) {
|
|
14566
|
+
return makeApi({ ...childCtx, ...extra });
|
|
14567
|
+
},
|
|
14568
|
+
addSink(sink) {
|
|
14569
|
+
registerSink(sink);
|
|
14570
|
+
},
|
|
14571
|
+
removeSink(name) {
|
|
14572
|
+
if (sinks.has(name)) {
|
|
14573
|
+
sinks.delete(name);
|
|
14574
|
+
const i = sinkOrder.indexOf(name);
|
|
14575
|
+
if (i !== -1) sinkOrder.splice(i, 1);
|
|
14576
|
+
initialized.delete(name);
|
|
14577
|
+
}
|
|
14578
|
+
},
|
|
14579
|
+
get sinks() {
|
|
14580
|
+
return [...sinkOrder];
|
|
14581
|
+
},
|
|
14582
|
+
async flush() {
|
|
14583
|
+
await flush(false);
|
|
14584
|
+
},
|
|
14585
|
+
reset() {
|
|
14586
|
+
identity.reset();
|
|
14587
|
+
session.end();
|
|
14588
|
+
},
|
|
14589
|
+
enabled: true
|
|
14590
|
+
};
|
|
14591
|
+
return api;
|
|
14592
|
+
}
|
|
14593
|
+
return makeApi();
|
|
14594
|
+
}
|
|
14595
|
+
|
|
14596
|
+
// ../react-analytics/dist/index.js
|
|
14597
|
+
var AnalyticsContext = React11.createContext(null);
|
|
14598
|
+
function AnalyticsProvider({ children, value }) {
|
|
14599
|
+
const analyticsRef = React11.useRef(null);
|
|
14600
|
+
if (!analyticsRef.current) {
|
|
14601
|
+
analyticsRef.current = value;
|
|
14602
|
+
}
|
|
14603
|
+
return React11.createElement(
|
|
14604
|
+
AnalyticsContext.Provider,
|
|
14605
|
+
{ value: analyticsRef.current },
|
|
14606
|
+
children
|
|
14607
|
+
);
|
|
14608
|
+
}
|
|
14609
|
+
function useAnalytics(options) {
|
|
14610
|
+
const ctx = React11.useContext(AnalyticsContext);
|
|
14611
|
+
if (!ctx) {
|
|
14612
|
+
devWarn(
|
|
14613
|
+
"react-analytics/use-analytics-outside-provider",
|
|
14614
|
+
"useAnalytics() was called outside an <AnalyticsProvider>. Wrap your app (or the consuming subtree) in <AnalyticsProvider> so the analytics context is available."
|
|
14615
|
+
);
|
|
14616
|
+
throw new Error("useAnalytics must be used within an <AnalyticsProvider>");
|
|
14617
|
+
}
|
|
14618
|
+
const scope = options?.scope;
|
|
14619
|
+
return React11.useMemo(
|
|
14620
|
+
() => scope ? ctx.with(scope) : ctx,
|
|
14621
|
+
[ctx, scope]
|
|
14622
|
+
);
|
|
14623
|
+
}
|
|
14624
|
+
function useTrackEvent(options) {
|
|
14625
|
+
const analytics = useAnalytics(options);
|
|
14626
|
+
return React11.useCallback(
|
|
14627
|
+
(event, properties, opts) => analytics.track(event, properties, opts),
|
|
14628
|
+
[analytics]
|
|
14629
|
+
);
|
|
14630
|
+
}
|
|
14631
|
+
|
|
14632
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AuthGuard, AuthProvider, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, Breadcrumbs, Button, CATEGORY_LABELS, Calendar, CalendarHeader, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Checkbox, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ContentProtection, 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_DATA, EmojiPicker, FeedbackButton, FeedbackDialog, FileTree, FileUpload, Footer, IconSystem, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, MarkdownRenderer, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PresenceIndicator, ProgressBar, RadioGroup, RadioItem, ReactionBar, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, SearchBar, SearchResultItem, SearchResults, Select, SelectContent, SelectItem, SelectTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Textarea, ThreadView, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoPlayer, VoicePill, Waveform, altHintState, animatedTextVariants, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, 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, contentProtectionVariants, controlsVariants, createAnalytics, createIntensitySamples, createSilentSamples, createVoicePill, createWaveform, dayVariants, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, 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, rowVariants, scaleWaveformSamples, searchBarVariants, searchResultVariants, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, statCardVariants, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAnalytics, useAuth, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
|
|
13628
14633
|
//# sourceMappingURL=index.js.map
|
|
13629
14634
|
//# sourceMappingURL=index.js.map
|