@refraction-ui/react 0.4.1 → 0.5.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-ZWRGVWUY.js +120 -0
- package/dist/chunk-ZWRGVWUY.js.map +1 -0
- package/dist/form.cjs +315 -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 +196 -0
- package/dist/form.js.map +1 -0
- package/dist/index.cjs +45 -258
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +74 -76
- package/dist/index.d.ts +74 -76
- package/dist/index.js +47 -334
- package/dist/index.js.map +1 -1
- 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/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-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-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 +249 -0
- package/dist/internal/shared/index.d.ts +249 -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.d.cts +1 -1
- package/dist/theme.d.ts +1 -1
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -1,123 +1,9 @@
|
|
|
1
|
+
import { cn, cva, createKeyboardHandler, Keys, createMachine, generateId } from './chunk-ZWRGVWUY.js';
|
|
1
2
|
import * as React11 from 'react';
|
|
2
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
4
|
import * as ReactDOM from 'react-dom';
|
|
4
5
|
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
6
|
|
|
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
7
|
var AccordionContext = React11.createContext(null);
|
|
122
8
|
var Accordion = React11.forwardRef(
|
|
123
9
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
@@ -4106,192 +3992,6 @@ var Footer = React11.forwardRef(
|
|
|
4106
3992
|
}
|
|
4107
3993
|
);
|
|
4108
3994
|
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
3995
|
|
|
4296
3996
|
// ../inline-editor/dist/index.js
|
|
4297
3997
|
function createInlineEditor(props) {
|
|
@@ -7225,21 +6925,22 @@ var voicePillTokens = {
|
|
|
7225
6925
|
var voicePillRootStyles = "inline-flex min-w-0 max-w-[min(calc(100vw-2rem),22rem)] items-center gap-3 rounded-full border border-border bg-background px-3 py-2 text-foreground shadow-lg ring-1 ring-border/50 transition-opacity data-[muted=true]:opacity-80";
|
|
7226
6926
|
var voicePillSpeakerStyles = "[--rfr-voice-pill-accent:hsl(var(--primary))] [--rfr-voice-pill-accent-foreground:hsl(var(--primary-foreground))] data-[speaker=user]:[--rfr-voice-pill-accent:hsl(var(--accent-foreground))] data-[speaker=user]:[--rfr-voice-pill-accent-foreground:hsl(var(--accent))] data-[muted=true]:[--rfr-voice-pill-accent:hsl(var(--muted-foreground))]";
|
|
7227
6927
|
var voicePillPositionVariants = cva({
|
|
7228
|
-
base: "
|
|
6928
|
+
base: "z-50",
|
|
7229
6929
|
variants: {
|
|
7230
6930
|
position: {
|
|
7231
|
-
|
|
7232
|
-
"top-
|
|
7233
|
-
"top-
|
|
7234
|
-
"
|
|
7235
|
-
"bottom-
|
|
7236
|
-
"bottom-
|
|
7237
|
-
"
|
|
7238
|
-
"left-
|
|
7239
|
-
"left-
|
|
7240
|
-
"
|
|
7241
|
-
"right-
|
|
7242
|
-
"right-
|
|
6931
|
+
inline: "relative",
|
|
6932
|
+
"top-start": "fixed top-[calc(env(safe-area-inset-top)+1rem)] left-[calc(env(safe-area-inset-left)+1rem)]",
|
|
6933
|
+
"top-center": "fixed top-[calc(env(safe-area-inset-top)+1rem)] left-1/2 -translate-x-1/2",
|
|
6934
|
+
"top-end": "fixed top-[calc(env(safe-area-inset-top)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)]",
|
|
6935
|
+
"bottom-start": "fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] left-[calc(env(safe-area-inset-left)+1rem)]",
|
|
6936
|
+
"bottom-center": "fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] left-1/2 -translate-x-1/2",
|
|
6937
|
+
"bottom-end": "fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)]",
|
|
6938
|
+
"left-start": "fixed left-[calc(env(safe-area-inset-left)+1rem)] top-[calc(env(safe-area-inset-top)+1rem)]",
|
|
6939
|
+
"left-center": "fixed left-[calc(env(safe-area-inset-left)+1rem)] top-1/2 -translate-y-1/2",
|
|
6940
|
+
"left-end": "fixed left-[calc(env(safe-area-inset-left)+1rem)] bottom-[calc(env(safe-area-inset-bottom)+1rem)]",
|
|
6941
|
+
"right-start": "fixed right-[calc(env(safe-area-inset-right)+1rem)] top-[calc(env(safe-area-inset-top)+1rem)]",
|
|
6942
|
+
"right-center": "fixed right-[calc(env(safe-area-inset-right)+1rem)] top-1/2 -translate-y-1/2",
|
|
6943
|
+
"right-end": "fixed right-[calc(env(safe-area-inset-right)+1rem)] bottom-[calc(env(safe-area-inset-bottom)+1rem)]"
|
|
7243
6944
|
}
|
|
7244
6945
|
},
|
|
7245
6946
|
defaultVariants: {
|
|
@@ -7380,6 +7081,7 @@ var DEFAULT_WAVEFORM_BAR_COUNT = 48;
|
|
|
7380
7081
|
var DEFAULT_WAVEFORM_COLOR = "var(--accent-2)";
|
|
7381
7082
|
var DEFAULT_WAVEFORM_HEIGHT = 80;
|
|
7382
7083
|
var DEFAULT_WAVEFORM_INTENSITY = 1;
|
|
7084
|
+
var DEFAULT_WAVEFORM_AMPLITUDE = 1;
|
|
7383
7085
|
var DEFAULT_WAVEFORM_SMOOTHING = 0.8;
|
|
7384
7086
|
var MAX_BAR_COUNT = 1024;
|
|
7385
7087
|
var MAX_INTENSITY = 1;
|
|
@@ -7395,10 +7097,15 @@ function normalizeIntensity(value) {
|
|
|
7395
7097
|
if (value == null || !Number.isFinite(value)) return DEFAULT_WAVEFORM_INTENSITY;
|
|
7396
7098
|
return Math.min(MAX_INTENSITY, Math.max(0, value));
|
|
7397
7099
|
}
|
|
7100
|
+
function normalizeAmplitude(value) {
|
|
7101
|
+
if (value == null || !Number.isFinite(value)) return DEFAULT_WAVEFORM_AMPLITUDE;
|
|
7102
|
+
return Math.min(1, Math.max(0, value));
|
|
7103
|
+
}
|
|
7398
7104
|
function normalizeWaveformConfig(props = {}) {
|
|
7399
7105
|
return {
|
|
7400
7106
|
variant: props.variant ?? "bars",
|
|
7401
7107
|
intensity: normalizeIntensity(props.intensity),
|
|
7108
|
+
amplitude: normalizeAmplitude(props.amplitude),
|
|
7402
7109
|
height: props.height ?? DEFAULT_WAVEFORM_HEIGHT,
|
|
7403
7110
|
width: props.width ?? "100%",
|
|
7404
7111
|
barCount: normalizeBarCount(props.barCount),
|
|
@@ -7413,16 +7120,17 @@ function isWaveformSampleInput(value) {
|
|
|
7413
7120
|
function createSilentSamples(count = DEFAULT_WAVEFORM_BAR_COUNT) {
|
|
7414
7121
|
return new Float32Array(normalizeBarCount(count));
|
|
7415
7122
|
}
|
|
7416
|
-
function createIntensitySamples(intensity = DEFAULT_WAVEFORM_INTENSITY, count = DEFAULT_WAVEFORM_BAR_COUNT) {
|
|
7123
|
+
function createIntensitySamples(intensity = DEFAULT_WAVEFORM_INTENSITY, count = DEFAULT_WAVEFORM_BAR_COUNT, phase = 0) {
|
|
7417
7124
|
const normalizedIntensity = normalizeIntensity(intensity);
|
|
7418
7125
|
const normalizedCount = normalizeBarCount(count);
|
|
7419
7126
|
const samples = new Float32Array(normalizedCount);
|
|
7420
7127
|
if (normalizedIntensity === 0) return samples;
|
|
7128
|
+
const pulse = 0.72 + Math.sin(phase * 1.8) * 0.18;
|
|
7421
7129
|
for (let i = 0; i < normalizedCount; i += 1) {
|
|
7422
7130
|
const progress = normalizedCount <= 1 ? 0.5 : i / (normalizedCount - 1);
|
|
7423
7131
|
const envelope = 0.35 + Math.sin(progress * Math.PI) * 0.65;
|
|
7424
|
-
const carrier = Math.sin(progress * Math.PI * 6);
|
|
7425
|
-
samples[i] = carrier * envelope * normalizedIntensity;
|
|
7132
|
+
const carrier = Math.sin(progress * Math.PI * 6 + phase * 2.8);
|
|
7133
|
+
samples[i] = carrier * envelope * normalizedIntensity * pulse;
|
|
7426
7134
|
}
|
|
7427
7135
|
return samples;
|
|
7428
7136
|
}
|
|
@@ -7546,36 +7254,37 @@ function drawWaveform(context, samples, size, options = {}) {
|
|
|
7546
7254
|
const variant = options.variant ?? "bars";
|
|
7547
7255
|
const color = options.color ?? DEFAULT_WAVEFORM_COLOR;
|
|
7548
7256
|
const intensity = normalizeIntensity(options.intensity ?? DEFAULT_WAVEFORM_INTENSITY);
|
|
7257
|
+
const amplitude = normalizeAmplitude(options.amplitude ?? DEFAULT_WAVEFORM_AMPLITUDE);
|
|
7549
7258
|
const barCount = normalizeBarCount(options.barCount);
|
|
7550
7259
|
context.clearRect(0, 0, width, height);
|
|
7551
7260
|
applyCanvasColor(context, color);
|
|
7552
7261
|
if (variant === "line") {
|
|
7553
|
-
drawLine(context, samples, width, height, intensity);
|
|
7262
|
+
drawLine(context, samples, width, height, intensity, amplitude);
|
|
7554
7263
|
return;
|
|
7555
7264
|
}
|
|
7556
7265
|
if (variant === "rings") {
|
|
7557
|
-
drawRings(context, samples, width, height, intensity);
|
|
7266
|
+
drawRings(context, samples, width, height, intensity, amplitude);
|
|
7558
7267
|
return;
|
|
7559
7268
|
}
|
|
7560
|
-
drawBars(context, samples, width, height, intensity, barCount);
|
|
7269
|
+
drawBars(context, samples, width, height, intensity, amplitude, barCount);
|
|
7561
7270
|
}
|
|
7562
|
-
function drawBars(context, samples, width, height, intensity, barCount) {
|
|
7271
|
+
function drawBars(context, samples, width, height, intensity, amplitude, barCount) {
|
|
7563
7272
|
const bars = scaleWaveformSamples(resampleWaveformSamples(samples, barCount), intensity);
|
|
7564
7273
|
const slotWidth = width / bars.length;
|
|
7565
7274
|
const barWidth = Math.max(1, slotWidth * 0.64);
|
|
7566
7275
|
const center = height / 2;
|
|
7567
7276
|
for (let i = 0; i < bars.length; i += 1) {
|
|
7568
7277
|
const value = Math.abs(bars[i]);
|
|
7569
|
-
const barHeight = Math.max(value * height, value > 0 ? 1 : 0);
|
|
7278
|
+
const barHeight = Math.max(value * height * amplitude, value > 0 ? 1 : 0);
|
|
7570
7279
|
const x = i * slotWidth + (slotWidth - barWidth) / 2;
|
|
7571
7280
|
const y = center - barHeight / 2;
|
|
7572
7281
|
context.fillRect(x, y, barWidth, barHeight);
|
|
7573
7282
|
}
|
|
7574
7283
|
}
|
|
7575
|
-
function drawLine(context, samples, width, height, intensity) {
|
|
7284
|
+
function drawLine(context, samples, width, height, intensity, amplitudeScale) {
|
|
7576
7285
|
const lineSamples = scaleWaveformSamples(samples, intensity);
|
|
7577
7286
|
const center = height / 2;
|
|
7578
|
-
const amplitude = height * 0.45;
|
|
7287
|
+
const amplitude = height * 0.45 * amplitudeScale;
|
|
7579
7288
|
context.beginPath();
|
|
7580
7289
|
for (let i = 0; i < lineSamples.length; i += 1) {
|
|
7581
7290
|
const x = lineSamples.length <= 1 ? width / 2 : i / (lineSamples.length - 1) * width;
|
|
@@ -7591,8 +7300,8 @@ function drawLine(context, samples, width, height, intensity) {
|
|
|
7591
7300
|
context.lineJoin = "round";
|
|
7592
7301
|
context.stroke();
|
|
7593
7302
|
}
|
|
7594
|
-
function drawRings(context, samples, width, height, intensity) {
|
|
7595
|
-
const peak = getWaveformPeak(scaleWaveformSamples(samples, intensity));
|
|
7303
|
+
function drawRings(context, samples, width, height, intensity, amplitude) {
|
|
7304
|
+
const peak = getWaveformPeak(scaleWaveformSamples(samples, intensity)) * amplitude;
|
|
7596
7305
|
const minDimension = Math.min(width, height);
|
|
7597
7306
|
const centerX = width / 2;
|
|
7598
7307
|
const centerY = height / 2;
|
|
@@ -7642,6 +7351,7 @@ var Waveform = React11.forwardRef(
|
|
|
7642
7351
|
source,
|
|
7643
7352
|
samples,
|
|
7644
7353
|
intensity,
|
|
7354
|
+
amplitude,
|
|
7645
7355
|
variant,
|
|
7646
7356
|
height,
|
|
7647
7357
|
width,
|
|
@@ -7664,6 +7374,7 @@ var Waveform = React11.forwardRef(
|
|
|
7664
7374
|
source,
|
|
7665
7375
|
samples,
|
|
7666
7376
|
intensity,
|
|
7377
|
+
amplitude,
|
|
7667
7378
|
variant,
|
|
7668
7379
|
height,
|
|
7669
7380
|
width,
|
|
@@ -7736,7 +7447,7 @@ var Waveform = React11.forwardRef(
|
|
|
7736
7447
|
}
|
|
7737
7448
|
frame = null;
|
|
7738
7449
|
};
|
|
7739
|
-
const readSamples = () => {
|
|
7450
|
+
const readSamples = (phase = 0) => {
|
|
7740
7451
|
if (samples != null) {
|
|
7741
7452
|
return normalizeWaveformSamples(samples, api.config.barCount);
|
|
7742
7453
|
}
|
|
@@ -7747,15 +7458,15 @@ var Waveform = React11.forwardRef(
|
|
|
7747
7458
|
if (analyser) {
|
|
7748
7459
|
return readAnalyserSamples(analyser, api.config.barCount, floatBufferRef, byteBufferRef);
|
|
7749
7460
|
}
|
|
7750
|
-
return createIntensitySamples(api.config.intensity, api.config.barCount);
|
|
7461
|
+
return createIntensitySamples(api.config.intensity, api.config.barCount, phase);
|
|
7751
7462
|
};
|
|
7752
|
-
const draw = () => {
|
|
7463
|
+
const draw = (time = typeof performance === "undefined" ? 0 : performance.now()) => {
|
|
7753
7464
|
const context = prepareWaveformCanvas(canvas, {
|
|
7754
7465
|
...size,
|
|
7755
7466
|
pixelRatio: window.devicePixelRatio || 1
|
|
7756
7467
|
});
|
|
7757
7468
|
if (!context) return;
|
|
7758
|
-
const nextSamples = readSamples();
|
|
7469
|
+
const nextSamples = readSamples(time / 1e3);
|
|
7759
7470
|
const renderedSamples = smoothWaveformSamples(
|
|
7760
7471
|
previousSamplesRef.current ?? void 0,
|
|
7761
7472
|
nextSamples,
|
|
@@ -7766,6 +7477,7 @@ var Waveform = React11.forwardRef(
|
|
|
7766
7477
|
variant: api.config.variant,
|
|
7767
7478
|
color: resolveCanvasColor(root, api.config.color),
|
|
7768
7479
|
intensity: api.config.intensity,
|
|
7480
|
+
amplitude: api.config.amplitude,
|
|
7769
7481
|
barCount: api.config.barCount
|
|
7770
7482
|
});
|
|
7771
7483
|
};
|
|
@@ -7774,11 +7486,11 @@ var Waveform = React11.forwardRef(
|
|
|
7774
7486
|
if (typeof window.requestAnimationFrame === "function") {
|
|
7775
7487
|
frame = window.requestAnimationFrame(tick);
|
|
7776
7488
|
} else {
|
|
7777
|
-
frame = window.setTimeout(() => tick(), 16);
|
|
7489
|
+
frame = window.setTimeout(() => tick(performance.now()), 16);
|
|
7778
7490
|
}
|
|
7779
7491
|
};
|
|
7780
|
-
const tick = () => {
|
|
7781
|
-
draw();
|
|
7492
|
+
const tick = (time) => {
|
|
7493
|
+
draw(time);
|
|
7782
7494
|
schedule();
|
|
7783
7495
|
};
|
|
7784
7496
|
draw();
|
|
@@ -7798,6 +7510,7 @@ var Waveform = React11.forwardRef(
|
|
|
7798
7510
|
api.config.color,
|
|
7799
7511
|
api.config.height,
|
|
7800
7512
|
api.config.intensity,
|
|
7513
|
+
api.config.amplitude,
|
|
7801
7514
|
api.config.paused,
|
|
7802
7515
|
api.config.smoothing,
|
|
7803
7516
|
api.config.variant,
|
|
@@ -13611,6 +13324,6 @@ var PaymentButton = React11.forwardRef(
|
|
|
13611
13324
|
);
|
|
13612
13325
|
PaymentButton.displayName = "PaymentButton";
|
|
13613
13326
|
|
|
13614
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, 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,
|
|
13327
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, 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, 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, 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, useAuth, useShortcut, useToast, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
|
|
13615
13328
|
//# sourceMappingURL=index.js.map
|
|
13616
13329
|
//# sourceMappingURL=index.js.map
|