@djangocfg/ui-tools 2.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/LottiePlayer.client-LBEC2JKY.mjs +161 -0
  2. package/dist/LottiePlayer.client-LBEC2JKY.mjs.map +1 -0
  3. package/dist/LottiePlayer.client-WFMG2OOW.cjs +168 -0
  4. package/dist/LottiePlayer.client-WFMG2OOW.cjs.map +1 -0
  5. package/dist/Mermaid.client-4TU2TSH3.mjs +477 -0
  6. package/dist/Mermaid.client-4TU2TSH3.mjs.map +1 -0
  7. package/dist/Mermaid.client-SBYY364Q.cjs +483 -0
  8. package/dist/Mermaid.client-SBYY364Q.cjs.map +1 -0
  9. package/dist/PlaygroundLayout-3YVSAEAF.cjs +1003 -0
  10. package/dist/PlaygroundLayout-3YVSAEAF.cjs.map +1 -0
  11. package/dist/PlaygroundLayout-4DYBORAS.mjs +996 -0
  12. package/dist/PlaygroundLayout-4DYBORAS.mjs.map +1 -0
  13. package/dist/PrettyCode.client-LCBPPTIX.mjs +152 -0
  14. package/dist/PrettyCode.client-LCBPPTIX.mjs.map +1 -0
  15. package/dist/PrettyCode.client-PNPLXRH6.cjs +154 -0
  16. package/dist/PrettyCode.client-PNPLXRH6.cjs.map +1 -0
  17. package/dist/chunk-37ZI6VD4.mjs +12 -0
  18. package/dist/chunk-37ZI6VD4.mjs.map +1 -0
  19. package/dist/chunk-3HK2OE62.cjs +81 -0
  20. package/dist/chunk-3HK2OE62.cjs.map +1 -0
  21. package/dist/chunk-7DGDQVQW.cjs +591 -0
  22. package/dist/chunk-7DGDQVQW.cjs.map +1 -0
  23. package/dist/chunk-M6P2FU7L.mjs +572 -0
  24. package/dist/chunk-M6P2FU7L.mjs.map +1 -0
  25. package/dist/chunk-UQ3XI5MY.cjs +15 -0
  26. package/dist/chunk-UQ3XI5MY.cjs.map +1 -0
  27. package/dist/chunk-YFRNE2IR.mjs +79 -0
  28. package/dist/chunk-YFRNE2IR.mjs.map +1 -0
  29. package/dist/index.cjs +5042 -0
  30. package/dist/index.cjs.map +1 -0
  31. package/dist/index.d.cts +1591 -0
  32. package/dist/index.d.ts +1591 -0
  33. package/dist/index.mjs +4941 -0
  34. package/dist/index.mjs.map +1 -0
  35. package/package.json +86 -0
  36. package/src/components/markdown/MarkdownMessage.tsx +340 -0
  37. package/src/components/markdown/index.ts +5 -0
  38. package/src/index.ts +26 -0
  39. package/src/stores/index.ts +9 -0
  40. package/src/stores/mediaCache.ts +534 -0
  41. package/src/tools/AudioPlayer/README.md +206 -0
  42. package/src/tools/AudioPlayer/components/HybridAudioPlayer.tsx +216 -0
  43. package/src/tools/AudioPlayer/components/HybridSimplePlayer.tsx +280 -0
  44. package/src/tools/AudioPlayer/components/HybridWaveform.tsx +279 -0
  45. package/src/tools/AudioPlayer/components/ReactiveCover/AudioReactiveCover.tsx +149 -0
  46. package/src/tools/AudioPlayer/components/ReactiveCover/effects/GlowEffect.tsx +110 -0
  47. package/src/tools/AudioPlayer/components/ReactiveCover/effects/MeshEffect.tsx +58 -0
  48. package/src/tools/AudioPlayer/components/ReactiveCover/effects/OrbsEffect.tsx +45 -0
  49. package/src/tools/AudioPlayer/components/ReactiveCover/effects/SpotlightEffect.tsx +82 -0
  50. package/src/tools/AudioPlayer/components/ReactiveCover/effects/index.ts +8 -0
  51. package/src/tools/AudioPlayer/components/ReactiveCover/index.ts +6 -0
  52. package/src/tools/AudioPlayer/components/index.ts +22 -0
  53. package/src/tools/AudioPlayer/context/HybridAudioProvider.tsx +158 -0
  54. package/src/tools/AudioPlayer/context/index.ts +16 -0
  55. package/src/tools/AudioPlayer/effects/index.ts +412 -0
  56. package/src/tools/AudioPlayer/hooks/index.ts +35 -0
  57. package/src/tools/AudioPlayer/hooks/useHybridAudio.ts +387 -0
  58. package/src/tools/AudioPlayer/hooks/useHybridAudioAnalysis.ts +95 -0
  59. package/src/tools/AudioPlayer/hooks/useVisualization.tsx +207 -0
  60. package/src/tools/AudioPlayer/index.ts +133 -0
  61. package/src/tools/AudioPlayer/types/effects.ts +73 -0
  62. package/src/tools/AudioPlayer/types/index.ts +27 -0
  63. package/src/tools/AudioPlayer/utils/debug.ts +14 -0
  64. package/src/tools/AudioPlayer/utils/formatTime.ts +10 -0
  65. package/src/tools/AudioPlayer/utils/index.ts +6 -0
  66. package/src/tools/ImageViewer/@refactoring/00-PLAN.md +71 -0
  67. package/src/tools/ImageViewer/@refactoring/01-TYPES.md +121 -0
  68. package/src/tools/ImageViewer/@refactoring/02-UTILS.md +143 -0
  69. package/src/tools/ImageViewer/@refactoring/03-HOOKS.md +261 -0
  70. package/src/tools/ImageViewer/@refactoring/04-COMPONENTS.md +427 -0
  71. package/src/tools/ImageViewer/@refactoring/05-EXECUTION-CHECKLIST.md +126 -0
  72. package/src/tools/ImageViewer/README.md +200 -0
  73. package/src/tools/ImageViewer/components/ImageInfo.tsx +44 -0
  74. package/src/tools/ImageViewer/components/ImageToolbar.tsx +145 -0
  75. package/src/tools/ImageViewer/components/ImageViewer.tsx +241 -0
  76. package/src/tools/ImageViewer/components/index.ts +7 -0
  77. package/src/tools/ImageViewer/hooks/index.ts +9 -0
  78. package/src/tools/ImageViewer/hooks/useImageLoading.ts +204 -0
  79. package/src/tools/ImageViewer/hooks/useImageTransform.ts +101 -0
  80. package/src/tools/ImageViewer/index.ts +60 -0
  81. package/src/tools/ImageViewer/types.ts +81 -0
  82. package/src/tools/ImageViewer/utils/constants.ts +59 -0
  83. package/src/tools/ImageViewer/utils/debug.ts +14 -0
  84. package/src/tools/ImageViewer/utils/index.ts +17 -0
  85. package/src/tools/ImageViewer/utils/lqip.ts +47 -0
  86. package/src/tools/JsonForm/JsonSchemaForm.tsx +197 -0
  87. package/src/tools/JsonForm/examples/BotConfigExample.tsx +249 -0
  88. package/src/tools/JsonForm/examples/RealBotConfigExample.tsx +161 -0
  89. package/src/tools/JsonForm/index.ts +46 -0
  90. package/src/tools/JsonForm/templates/ArrayFieldItemTemplate.tsx +47 -0
  91. package/src/tools/JsonForm/templates/ArrayFieldTemplate.tsx +74 -0
  92. package/src/tools/JsonForm/templates/BaseInputTemplate.tsx +107 -0
  93. package/src/tools/JsonForm/templates/ErrorListTemplate.tsx +35 -0
  94. package/src/tools/JsonForm/templates/FieldTemplate.tsx +62 -0
  95. package/src/tools/JsonForm/templates/ObjectFieldTemplate.tsx +116 -0
  96. package/src/tools/JsonForm/templates/index.ts +12 -0
  97. package/src/tools/JsonForm/types.ts +83 -0
  98. package/src/tools/JsonForm/utils.ts +213 -0
  99. package/src/tools/JsonForm/widgets/CheckboxWidget.tsx +37 -0
  100. package/src/tools/JsonForm/widgets/ColorWidget.tsx +219 -0
  101. package/src/tools/JsonForm/widgets/NumberWidget.tsx +89 -0
  102. package/src/tools/JsonForm/widgets/SelectWidget.tsx +97 -0
  103. package/src/tools/JsonForm/widgets/SliderWidget.tsx +148 -0
  104. package/src/tools/JsonForm/widgets/SwitchWidget.tsx +35 -0
  105. package/src/tools/JsonForm/widgets/TextWidget.tsx +96 -0
  106. package/src/tools/JsonForm/widgets/index.ts +14 -0
  107. package/src/tools/JsonTree/index.tsx +243 -0
  108. package/src/tools/LottiePlayer/LottiePlayer.client.tsx +213 -0
  109. package/src/tools/LottiePlayer/index.tsx +56 -0
  110. package/src/tools/LottiePlayer/types.ts +108 -0
  111. package/src/tools/LottiePlayer/useLottie.ts +164 -0
  112. package/src/tools/Mermaid/Mermaid.client.tsx +82 -0
  113. package/src/tools/Mermaid/components/MermaidCodeViewer.tsx +95 -0
  114. package/src/tools/Mermaid/components/MermaidFullscreenModal.tsx +103 -0
  115. package/src/tools/Mermaid/hooks/index.ts +4 -0
  116. package/src/tools/Mermaid/hooks/useMermaidCleanup.ts +73 -0
  117. package/src/tools/Mermaid/hooks/useMermaidFullscreen.ts +46 -0
  118. package/src/tools/Mermaid/hooks/useMermaidRenderer.ts +226 -0
  119. package/src/tools/Mermaid/hooks/useMermaidValidation.ts +29 -0
  120. package/src/tools/Mermaid/index.tsx +44 -0
  121. package/src/tools/Mermaid/utils/mermaid-helpers.ts +33 -0
  122. package/src/tools/OpenapiViewer/components/EndpointInfo.tsx +149 -0
  123. package/src/tools/OpenapiViewer/components/EndpointsLibrary.tsx +263 -0
  124. package/src/tools/OpenapiViewer/components/PlaygroundLayout.tsx +125 -0
  125. package/src/tools/OpenapiViewer/components/PlaygroundStepper.tsx +100 -0
  126. package/src/tools/OpenapiViewer/components/RequestBuilder.tsx +157 -0
  127. package/src/tools/OpenapiViewer/components/RequestParametersForm.tsx +253 -0
  128. package/src/tools/OpenapiViewer/components/ResponseViewer.tsx +173 -0
  129. package/src/tools/OpenapiViewer/components/VersionSelector.tsx +68 -0
  130. package/src/tools/OpenapiViewer/components/index.ts +14 -0
  131. package/src/tools/OpenapiViewer/constants.ts +39 -0
  132. package/src/tools/OpenapiViewer/context/PlaygroundContext.tsx +337 -0
  133. package/src/tools/OpenapiViewer/hooks/index.ts +8 -0
  134. package/src/tools/OpenapiViewer/hooks/useMobile.ts +10 -0
  135. package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +199 -0
  136. package/src/tools/OpenapiViewer/index.tsx +37 -0
  137. package/src/tools/OpenapiViewer/types.ts +151 -0
  138. package/src/tools/OpenapiViewer/utils/apiKeyManager.ts +149 -0
  139. package/src/tools/OpenapiViewer/utils/formatters.ts +71 -0
  140. package/src/tools/OpenapiViewer/utils/index.ts +9 -0
  141. package/src/tools/OpenapiViewer/utils/versionManager.ts +161 -0
  142. package/src/tools/PrettyCode/PrettyCode.client.tsx +208 -0
  143. package/src/tools/PrettyCode/index.tsx +47 -0
  144. package/src/tools/VideoPlayer/@refactoring/00-PLAN.md +91 -0
  145. package/src/tools/VideoPlayer/@refactoring/01-TYPES.md +284 -0
  146. package/src/tools/VideoPlayer/@refactoring/02-UTILS.md +141 -0
  147. package/src/tools/VideoPlayer/@refactoring/03-HOOKS.md +178 -0
  148. package/src/tools/VideoPlayer/@refactoring/04-COMPONENTS.md +95 -0
  149. package/src/tools/VideoPlayer/@refactoring/05-EXECUTION-CHECKLIST.md +139 -0
  150. package/src/tools/VideoPlayer/README.md +264 -0
  151. package/src/tools/VideoPlayer/components/VideoControls.tsx +138 -0
  152. package/src/tools/VideoPlayer/components/VideoErrorFallback.tsx +172 -0
  153. package/src/tools/VideoPlayer/components/VideoPlayer.tsx +201 -0
  154. package/src/tools/VideoPlayer/components/index.ts +14 -0
  155. package/src/tools/VideoPlayer/context/VideoPlayerContext.tsx +52 -0
  156. package/src/tools/VideoPlayer/context/index.ts +8 -0
  157. package/src/tools/VideoPlayer/hooks/index.ts +12 -0
  158. package/src/tools/VideoPlayer/hooks/useVideoPlayerSettings.ts +70 -0
  159. package/src/tools/VideoPlayer/hooks/useVideoPositionCache.ts +116 -0
  160. package/src/tools/VideoPlayer/index.ts +77 -0
  161. package/src/tools/VideoPlayer/providers/NativeProvider.tsx +284 -0
  162. package/src/tools/VideoPlayer/providers/StreamProvider.tsx +505 -0
  163. package/src/tools/VideoPlayer/providers/VidstackProvider.tsx +400 -0
  164. package/src/tools/VideoPlayer/providers/index.ts +8 -0
  165. package/src/tools/VideoPlayer/types/index.ts +38 -0
  166. package/src/tools/VideoPlayer/types/player.ts +116 -0
  167. package/src/tools/VideoPlayer/types/provider.ts +93 -0
  168. package/src/tools/VideoPlayer/types/sources.ts +97 -0
  169. package/src/tools/VideoPlayer/utils/debug.ts +14 -0
  170. package/src/tools/VideoPlayer/utils/fileSource.ts +78 -0
  171. package/src/tools/VideoPlayer/utils/index.ts +12 -0
  172. package/src/tools/VideoPlayer/utils/resolvers.ts +75 -0
  173. package/src/tools/_shared.ts +29 -0
  174. package/src/tools/index.ts +172 -0
@@ -0,0 +1,1591 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CommonExternalProps } from 'react-json-tree';
3
+ import * as React$1 from 'react';
4
+ import React__default, { ReactNode } from 'react';
5
+ import { Language } from 'prism-react-renderer';
6
+ export { Language } from 'prism-react-renderer';
7
+ import { RJSFSchema, UiSchema, WidgetProps, FieldTemplateProps, ObjectFieldTemplateProps, ArrayFieldTemplateProps, ArrayFieldItemTemplateProps, ErrorListProps } from '@rjsf/utils';
8
+ import { FormProps, IChangeEvent } from '@rjsf/core';
9
+ import { MediaPlayerInstance } from '@vidstack/react';
10
+ import * as zustand_middleware from 'zustand/middleware';
11
+ import * as zustand from 'zustand';
12
+
13
+ interface JsonTreeConfig {
14
+ /** Maximum depth to expand automatically (default: 2) */
15
+ maxAutoExpandDepth?: number;
16
+ /** Maximum items in array to auto-expand (default: 10) */
17
+ maxAutoExpandArrayItems?: number;
18
+ /** Maximum object keys to auto-expand (default: 5) */
19
+ maxAutoExpandObjectKeys?: number;
20
+ /** Maximum string length before truncation (default: 200) */
21
+ maxStringLength?: number;
22
+ /** Collection limit for performance (default: 50) */
23
+ collectionLimit?: number;
24
+ /** Whether to show collection info (array length, object keys count) */
25
+ showCollectionInfo?: boolean;
26
+ /** Whether to show expand/collapse all buttons */
27
+ showExpandControls?: boolean;
28
+ /** Whether to show copy/download buttons */
29
+ showActionButtons?: boolean;
30
+ /** Custom CSS classes for the container */
31
+ className?: string;
32
+ /** Whether to preserve object key order (default: true) */
33
+ preserveKeyOrder?: boolean;
34
+ }
35
+ interface JsonTreeComponentProps {
36
+ title?: string;
37
+ data: unknown;
38
+ config?: JsonTreeConfig;
39
+ /** Override for react-json-tree props */
40
+ jsonTreeProps?: Partial<CommonExternalProps>;
41
+ }
42
+ declare const JsonTreeComponent: ({ title, data, config, jsonTreeProps }: JsonTreeComponentProps) => react_jsx_runtime.JSX.Element;
43
+
44
+ /**
45
+ * Mermaid Component - Dynamic Import Wrapper
46
+ *
47
+ * Lazy loads the heavy Mermaid library (~800KB) only when needed.
48
+ * This significantly reduces the initial bundle size.
49
+ */
50
+
51
+ interface MermaidProps {
52
+ chart: string;
53
+ className?: string;
54
+ isCompact?: boolean;
55
+ }
56
+ declare const Mermaid: React__default.FC<MermaidProps>;
57
+
58
+ /**
59
+ * PrettyCode Component - Dynamic Import Wrapper
60
+ *
61
+ * Lazy loads the heavy Prism library (~500KB) only when needed.
62
+ * This significantly reduces the initial bundle size.
63
+ */
64
+
65
+ interface PrettyCodeProps {
66
+ data: string | object;
67
+ language: Language;
68
+ className?: string;
69
+ mode?: 'dark' | 'light';
70
+ inline?: boolean;
71
+ customBg?: string;
72
+ isCompact?: boolean;
73
+ }
74
+ declare const PrettyCode: React__default.FC<PrettyCodeProps>;
75
+
76
+ /**
77
+ * LottiePlayer Types
78
+ *
79
+ * Type definitions for the Lottie animation player component
80
+ */
81
+ type LottieSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
82
+ type LottieSpeed = 0.5 | 1 | 1.5 | 2;
83
+ type LottieDirection = 1 | -1;
84
+ interface LottiePlayerProps {
85
+ /**
86
+ * Animation data (JSON object) or URL to load from
87
+ */
88
+ src: string | object;
89
+ /**
90
+ * Size preset for the player
91
+ * @default 'md'
92
+ */
93
+ size?: LottieSize;
94
+ /**
95
+ * Custom width (overrides size preset)
96
+ */
97
+ width?: number | string;
98
+ /**
99
+ * Custom height (overrides size preset)
100
+ */
101
+ height?: number | string;
102
+ /**
103
+ * Autoplay animation
104
+ * @default true
105
+ */
106
+ autoplay?: boolean;
107
+ /**
108
+ * Loop animation
109
+ * @default true
110
+ */
111
+ loop?: boolean | number;
112
+ /**
113
+ * Playback speed
114
+ * @default 1
115
+ */
116
+ speed?: LottieSpeed;
117
+ /**
118
+ * Direction (1 = forward, -1 = reverse)
119
+ * @default 1
120
+ */
121
+ direction?: LottieDirection;
122
+ /**
123
+ * Show playback controls
124
+ * @default false
125
+ */
126
+ controls?: boolean;
127
+ /**
128
+ * Background color
129
+ */
130
+ background?: string;
131
+ /**
132
+ * CSS class name
133
+ */
134
+ className?: string;
135
+ /**
136
+ * Show loading state
137
+ * @default true
138
+ */
139
+ showLoading?: boolean;
140
+ /**
141
+ * Callback when animation completes
142
+ */
143
+ onComplete?: () => void;
144
+ /**
145
+ * Callback when animation loads
146
+ */
147
+ onLoad?: () => void;
148
+ /**
149
+ * Callback on error
150
+ */
151
+ onError?: (error: Error) => void;
152
+ }
153
+
154
+ /**
155
+ * useLottie Hook
156
+ *
157
+ * Hook for loading and managing Lottie animation data
158
+ */
159
+ interface UseLottieOptions {
160
+ /**
161
+ * Animation data (JSON object) or URL to load from
162
+ */
163
+ src: string | object;
164
+ /**
165
+ * Enable caching of loaded animations
166
+ * @default true
167
+ */
168
+ cache?: boolean;
169
+ }
170
+ interface UseLottieReturn {
171
+ /**
172
+ * Loaded animation data
173
+ */
174
+ animationData: object | null;
175
+ /**
176
+ * Loading state
177
+ */
178
+ isLoading: boolean;
179
+ /**
180
+ * Error state
181
+ */
182
+ error: Error | null;
183
+ /**
184
+ * Retry loading the animation
185
+ */
186
+ retry: () => void;
187
+ }
188
+ /**
189
+ * Hook for loading Lottie animations from URLs or objects
190
+ *
191
+ * Features:
192
+ * - Loads animations from URLs or accepts animation objects directly
193
+ * - Caching support to prevent re-fetching the same animation
194
+ * - Error handling with retry capability
195
+ * - Loading states
196
+ *
197
+ * Usage:
198
+ * ```tsx
199
+ * const { animationData, isLoading, error, retry } = useLottie({
200
+ * src: 'https://example.com/animation.json'
201
+ * });
202
+ *
203
+ * if (isLoading) return <div>Loading...</div>;
204
+ * if (error) return <div>Error: {error.message} <button onClick={retry}>Retry</button></div>;
205
+ * if (!animationData) return null;
206
+ *
207
+ * return <LottiePlayer animationData={animationData} />;
208
+ * ```
209
+ */
210
+ declare function useLottie(options: UseLottieOptions): UseLottieReturn;
211
+
212
+ /**
213
+ * LottiePlayer component wrapper with dynamic import
214
+ *
215
+ * This component automatically handles code splitting and lazy loading
216
+ * of the Lottie player to optimize bundle size.
217
+ *
218
+ * Usage:
219
+ * ```tsx
220
+ * import { LottiePlayer } from '@djangocfg/ui-core/tools';
221
+ *
222
+ * <LottiePlayer
223
+ * src="https://example.com/animation.json"
224
+ * size="md"
225
+ * autoplay
226
+ * loop
227
+ * />
228
+ * ```
229
+ */
230
+ declare function LottiePlayer(props: LottiePlayerProps): react_jsx_runtime.JSX.Element;
231
+
232
+ /**
233
+ * JSON Schema Form props interface
234
+ */
235
+ interface JsonSchemaFormProps<T = any> extends Partial<FormProps<T>> {
236
+ /** JSON Schema that defines the form structure */
237
+ schema: RJSFSchema;
238
+ /** UI Schema for customizing the form appearance */
239
+ uiSchema?: UiSchema;
240
+ /** Initial form data */
241
+ formData?: T;
242
+ /** Callback when form is submitted */
243
+ onSubmit?: (data: IChangeEvent<T>) => void;
244
+ /** Callback when form data changes */
245
+ onChange?: (data: IChangeEvent<T>) => void;
246
+ /** Callback when form has validation errors */
247
+ onError?: (errors: any[]) => void;
248
+ /** Whether to show error list at the top of form */
249
+ showErrorList?: false | 'top' | 'bottom';
250
+ /** Whether to live validate on change */
251
+ liveValidate?: boolean;
252
+ /** Whether the form is disabled */
253
+ disabled?: boolean;
254
+ /** Whether the form is read-only */
255
+ readonly?: boolean;
256
+ /** Custom CSS class name */
257
+ className?: string;
258
+ /** Whether to show submit button */
259
+ showSubmitButton?: boolean;
260
+ /** Submit button text */
261
+ submitButtonText?: string;
262
+ }
263
+
264
+ /**
265
+ * JSON Schema Form Component
266
+ *
267
+ * A fully-featured form generator that creates forms from JSON Schema.
268
+ * Built on top of react-jsonschema-form with custom widgets and templates
269
+ * using @djangocfg/ui components.
270
+ *
271
+ * @example
272
+ * ```tsx
273
+ * const schema = {
274
+ * type: 'object',
275
+ * required: ['name'],
276
+ * properties: {
277
+ * name: { type: 'string', title: 'Name' },
278
+ * age: { type: 'number', title: 'Age' },
279
+ * active: { type: 'boolean', title: 'Active' }
280
+ * }
281
+ * };
282
+ *
283
+ * <JsonSchemaForm
284
+ * schema={schema}
285
+ * onSubmit={(data) => console.log(data.formData)}
286
+ * />
287
+ * ```
288
+ */
289
+ declare function JsonSchemaForm<T = any>(props: JsonSchemaFormProps<T>): react_jsx_runtime.JSX.Element;
290
+
291
+ /**
292
+ * Text input widget for JSON Schema Form
293
+ * Handles string fields with optional textarea for multiline
294
+ */
295
+ declare function TextWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
296
+
297
+ /**
298
+ * Number input widget for JSON Schema Form
299
+ * Handles integer and number fields
300
+ */
301
+ declare function NumberWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
302
+
303
+ /**
304
+ * Checkbox widget for JSON Schema Form
305
+ * Handles boolean fields
306
+ */
307
+ declare function CheckboxWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
308
+
309
+ /**
310
+ * Select dropdown widget for JSON Schema Form
311
+ * Handles enum fields
312
+ */
313
+ declare function SelectWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
314
+
315
+ /**
316
+ * Switch toggle widget for JSON Schema Form
317
+ * Alternative boolean input
318
+ */
319
+ declare function SwitchWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
320
+
321
+ /**
322
+ * Color input widget for JSON Schema Form
323
+ * Supports HSL format (h s% l%) and HEX format
324
+ * Click on color box to open native color picker directly
325
+ */
326
+ declare function ColorWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
327
+
328
+ /**
329
+ * Slider widget for JSON Schema Form
330
+ *
331
+ * Supports:
332
+ * - number/integer types
333
+ * - min/max from schema
334
+ * - step from schema or options
335
+ * - unit suffix (e.g., "rem", "px", "%")
336
+ * - optional text input for precise values
337
+ *
338
+ * Usage in uiSchema:
339
+ * ```json
340
+ * {
341
+ * "radius": {
342
+ * "ui:widget": "slider",
343
+ * "ui:options": {
344
+ * "unit": "rem",
345
+ * "showInput": true,
346
+ * "step": 0.125
347
+ * }
348
+ * }
349
+ * }
350
+ * ```
351
+ */
352
+ declare function SliderWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
353
+
354
+ /**
355
+ * Field template for JSON Schema Form
356
+ * Controls the layout and styling of individual form fields
357
+ */
358
+ declare function FieldTemplate(props: FieldTemplateProps): react_jsx_runtime.JSX.Element;
359
+
360
+ /**
361
+ * Object field template for JSON Schema Form
362
+ *
363
+ * Supports:
364
+ * - Collapsible groups via ui:collapsible option
365
+ * - Grid layout via ui:grid option
366
+ * - Custom styling via ui:className
367
+ *
368
+ * Usage in uiSchema:
369
+ * ```json
370
+ * {
371
+ * "colors": {
372
+ * "ui:collapsible": true,
373
+ * "ui:collapsed": false,
374
+ * "ui:grid": 2
375
+ * }
376
+ * }
377
+ * ```
378
+ */
379
+ declare function ObjectFieldTemplate(props: ObjectFieldTemplateProps): react_jsx_runtime.JSX.Element;
380
+
381
+ /**
382
+ * Array field template for JSON Schema Form
383
+ * Renders array items with add/remove controls
384
+ *
385
+ * NOTE: In RJSF v6, `items` is an array of ReactElement (already rendered),
386
+ * NOT an array of objects with {children, hasRemove, etc.}.
387
+ * The actual rendering of each item (including remove buttons) is handled
388
+ * by ArrayFieldItemTemplate.
389
+ */
390
+ declare function ArrayFieldTemplate(props: ArrayFieldTemplateProps): react_jsx_runtime.JSX.Element;
391
+
392
+ /**
393
+ * Array field item template for JSON Schema Form
394
+ * Renders individual array items with proper styling and action buttons
395
+ *
396
+ * In RJSF v6, this template is responsible for rendering each item in an array,
397
+ * including the item content (children) and the action buttons (remove, move up/down, copy).
398
+ */
399
+ declare function ArrayFieldItemTemplate(props: ArrayFieldItemTemplateProps): react_jsx_runtime.JSX.Element;
400
+
401
+ /**
402
+ * Error list template for JSON Schema Form
403
+ * Displays validation errors at the top of the form
404
+ */
405
+ declare function ErrorListTemplate(props: ErrorListProps): react_jsx_runtime.JSX.Element;
406
+
407
+ /**
408
+ * Base input template for JSON Schema Form
409
+ *
410
+ * This template is CRITICAL for rendering primitive types (string, number)
411
+ * inside arrays. Without it, array items with primitive types will render
412
+ * as empty containers.
413
+ *
414
+ * RJSF uses this template for:
415
+ * - Array items with primitive types (e.g., array of strings)
416
+ * - Fields without explicit widget mapping
417
+ * - All text-based widgets internally
418
+ *
419
+ * @see https://rjsf-team.github.io/react-jsonschema-form/docs/advanced-customization/custom-templates/#baseinputtemplate
420
+ */
421
+ declare function BaseInputTemplate(props: WidgetProps): react_jsx_runtime.JSX.Element;
422
+
423
+ /**
424
+ * Utility functions for JSON Schema Form
425
+ */
426
+ /**
427
+ * Safely validates and normalizes JSON Schema
428
+ * Ensures schema is valid before rendering
429
+ */
430
+ declare function validateSchema(schema: any): RJSFSchema | null;
431
+ /**
432
+ * Safely normalizes form data
433
+ * Removes undefined values and ensures data structure matches schema
434
+ */
435
+ declare function normalizeFormData<T = any>(formData: any, schema: RJSFSchema): T;
436
+ /**
437
+ * Merges schema defaults with form data
438
+ */
439
+ declare function mergeDefaults(formData: any, schema: RJSFSchema): any;
440
+ /**
441
+ * Safely parses JSON string with error handling
442
+ */
443
+ declare function safeJsonParse<T = any>(jsonString: string, fallback: T): T;
444
+ /**
445
+ * Safely stringifies object to JSON
446
+ */
447
+ declare function safeJsonStringify(obj: any, pretty?: boolean): string;
448
+ /**
449
+ * Checks if schema has required fields
450
+ */
451
+ declare function hasRequiredFields(schema: RJSFSchema): boolean;
452
+ /**
453
+ * Gets all required field paths from schema
454
+ */
455
+ declare function getRequiredFields(schema: RJSFSchema, prefix?: string): string[];
456
+ /**
457
+ * Validates form data against required fields
458
+ */
459
+ declare function validateRequiredFields(formData: any, schema: RJSFSchema): {
460
+ valid: boolean;
461
+ missing: string[];
462
+ };
463
+
464
+ interface SchemaSource {
465
+ id: string;
466
+ name: string;
467
+ url: string;
468
+ }
469
+ interface PlaygroundConfig {
470
+ schemas: SchemaSource[];
471
+ defaultSchemaId?: string;
472
+ }
473
+
474
+ interface PlaygroundProps {
475
+ config: PlaygroundConfig;
476
+ }
477
+ declare const Playground: React__default.FC<PlaygroundProps>;
478
+
479
+ /**
480
+ * Video source type definitions
481
+ */
482
+ /** Simple URL source (mp4, webm, etc.) */
483
+ interface UrlSource {
484
+ type: 'url';
485
+ url: string;
486
+ title?: string;
487
+ poster?: string;
488
+ }
489
+ /** YouTube embed source */
490
+ interface YouTubeSource {
491
+ type: 'youtube';
492
+ /** YouTube video ID (11 characters) */
493
+ id: string;
494
+ title?: string;
495
+ poster?: string;
496
+ }
497
+ /** Vimeo embed source */
498
+ interface VimeoSource {
499
+ type: 'vimeo';
500
+ /** Vimeo video ID */
501
+ id: string;
502
+ title?: string;
503
+ poster?: string;
504
+ }
505
+ /** HLS streaming source */
506
+ interface HLSSource {
507
+ type: 'hls';
508
+ /** URL to .m3u8 manifest */
509
+ url: string;
510
+ title?: string;
511
+ poster?: string;
512
+ }
513
+ /** DASH streaming source */
514
+ interface DASHSource {
515
+ type: 'dash';
516
+ /** URL to .mpd manifest */
517
+ url: string;
518
+ title?: string;
519
+ poster?: string;
520
+ }
521
+ /** HTTP Range streaming source (for large files with auth) */
522
+ interface StreamSource {
523
+ type: 'stream';
524
+ /** Session ID for authorization */
525
+ sessionId: string;
526
+ /** File path on server */
527
+ path: string;
528
+ /** Function to generate stream URL */
529
+ getStreamUrl: (sessionId: string, path: string) => string;
530
+ /** MIME type for the video */
531
+ mimeType?: string;
532
+ title?: string;
533
+ poster?: string;
534
+ }
535
+ /** Binary data source (ArrayBuffer) */
536
+ interface BlobSource {
537
+ type: 'blob';
538
+ /** Video data as ArrayBuffer */
539
+ data: ArrayBuffer;
540
+ /** MIME type (default: video/mp4) */
541
+ mimeType?: string;
542
+ title?: string;
543
+ poster?: string;
544
+ }
545
+ /** Base64 data URL source */
546
+ interface DataUrlSource {
547
+ type: 'data-url';
548
+ /** Base64 encoded data URL */
549
+ data: string;
550
+ title?: string;
551
+ poster?: string;
552
+ }
553
+ /** Union of all source types */
554
+ type VideoSourceUnion = UrlSource | YouTubeSource | VimeoSource | HLSSource | DASHSource | StreamSource | BlobSource | DataUrlSource;
555
+
556
+ /**
557
+ * Player configuration types
558
+ */
559
+
560
+ /** Player mode - determines which provider to use */
561
+ type PlayerMode = 'auto' | 'vidstack' | 'native' | 'streaming';
562
+ /** Aspect ratio options */
563
+ type AspectRatioValue = number | 'auto' | 'fill';
564
+ /** Common player settings */
565
+ interface CommonPlayerSettings {
566
+ /** Auto-play video */
567
+ autoPlay?: boolean;
568
+ /** Mute video by default */
569
+ muted?: boolean;
570
+ /** Loop video */
571
+ loop?: boolean;
572
+ /** Play video inline on mobile */
573
+ playsInline?: boolean;
574
+ /** Show player controls */
575
+ controls?: boolean;
576
+ /**
577
+ * Aspect ratio:
578
+ * - number (e.g. 16/9): Fixed aspect ratio
579
+ * - 'auto': Natural video aspect ratio
580
+ * - 'fill': Fill parent container (100% width & height)
581
+ */
582
+ aspectRatio?: AspectRatioValue;
583
+ /** Preload strategy */
584
+ preload?: 'auto' | 'metadata' | 'none';
585
+ }
586
+ /** Common player events */
587
+ interface CommonPlayerEvents {
588
+ onPlay?: () => void;
589
+ onPause?: () => void;
590
+ onEnded?: () => void;
591
+ onError?: (error: string) => void;
592
+ onLoadStart?: () => void;
593
+ onCanPlay?: () => void;
594
+ onTimeUpdate?: (currentTime: number, duration: number) => void;
595
+ /** Called when buffering progress changes (buffered seconds, total duration) */
596
+ onBufferProgress?: (buffered: number, duration: number) => void;
597
+ }
598
+ /** Error fallback render props */
599
+ interface ErrorFallbackProps {
600
+ error: string;
601
+ retry?: () => void;
602
+ }
603
+ /** Main VideoPlayer props */
604
+ interface VideoPlayerProps extends CommonPlayerSettings, CommonPlayerEvents {
605
+ /** Video source configuration */
606
+ source: VideoSourceUnion;
607
+ /** Player mode (default: 'auto') */
608
+ mode?: PlayerMode;
609
+ /** Player theme (Vidstack only) */
610
+ theme?: 'default' | 'minimal' | 'modern';
611
+ /** Show video info below player */
612
+ showInfo?: boolean;
613
+ /** Container className */
614
+ className?: string;
615
+ /** Video element className (native/streaming only) */
616
+ videoClassName?: string;
617
+ /** Disable right-click context menu */
618
+ disableContextMenu?: boolean;
619
+ /** Show loading spinner */
620
+ showPreloader?: boolean;
621
+ /** Preloader timeout in ms */
622
+ preloaderTimeout?: number;
623
+ /** Custom error fallback UI */
624
+ errorFallback?: React__default.ReactNode | ((props: ErrorFallbackProps) => React__default.ReactNode);
625
+ }
626
+ /** VideoPlayer ref methods */
627
+ interface VideoPlayerRef {
628
+ /** Play video */
629
+ play: () => Promise<void> | void;
630
+ /** Pause video */
631
+ pause: () => void;
632
+ /** Toggle play/pause */
633
+ togglePlay: () => void;
634
+ /** Seek to time in seconds */
635
+ seekTo: (time: number) => void;
636
+ /** Set volume (0-1) */
637
+ setVolume: (volume: number) => void;
638
+ /** Toggle mute */
639
+ toggleMute: () => void;
640
+ /** Enter fullscreen */
641
+ enterFullscreen: () => void;
642
+ /** Exit fullscreen */
643
+ exitFullscreen: () => void;
644
+ /** Current playback time in seconds */
645
+ readonly currentTime: number;
646
+ /** Video duration in seconds */
647
+ readonly duration: number;
648
+ /** Whether video is paused */
649
+ readonly paused: boolean;
650
+ }
651
+
652
+ /**
653
+ * Provider-specific types
654
+ */
655
+
656
+ /** Props passed to Vidstack provider */
657
+ interface VidstackProviderProps extends CommonPlayerSettings, CommonPlayerEvents {
658
+ source: UrlSource | YouTubeSource | VimeoSource | HLSSource | DASHSource;
659
+ theme?: 'default' | 'minimal' | 'modern';
660
+ showInfo?: boolean;
661
+ className?: string;
662
+ errorFallback?: React__default.ReactNode | ((props: ErrorFallbackProps) => React__default.ReactNode);
663
+ }
664
+ /** Props passed to Native provider */
665
+ interface NativeProviderProps extends CommonPlayerSettings, CommonPlayerEvents {
666
+ source: UrlSource | DataUrlSource;
667
+ className?: string;
668
+ videoClassName?: string;
669
+ disableContextMenu?: boolean;
670
+ showPreloader?: boolean;
671
+ preloaderTimeout?: number;
672
+ }
673
+ /** Props passed to Stream provider */
674
+ interface StreamProviderProps extends CommonPlayerSettings, CommonPlayerEvents {
675
+ source: StreamSource | BlobSource | DataUrlSource;
676
+ className?: string;
677
+ videoClassName?: string;
678
+ disableContextMenu?: boolean;
679
+ showPreloader?: boolean;
680
+ preloaderTimeout?: number;
681
+ errorFallback?: React__default.ReactNode | ((props: ErrorFallbackProps) => React__default.ReactNode);
682
+ }
683
+ /** Options for resolving file source */
684
+ interface ResolveFileSourceOptions {
685
+ /** File content - can be data URL string or binary ArrayBuffer */
686
+ content: string | ArrayBuffer | null | undefined;
687
+ /** File path for streaming */
688
+ path: string;
689
+ /** MIME type of the file */
690
+ mimeType?: string;
691
+ /** Session ID for authenticated streaming */
692
+ sessionId?: string | null;
693
+ /** Load method hint - 'http_stream' enables streaming mode */
694
+ loadMethod?: 'http_stream' | 'rpc' | 'unspecified' | 'skip' | string;
695
+ /** Function to generate stream URL (required for streaming) */
696
+ getStreamUrl?: (sessionId: string, path: string) => string;
697
+ /** Optional title */
698
+ title?: string;
699
+ /** Optional poster */
700
+ poster?: string;
701
+ }
702
+ interface VideoPlayerContextValue {
703
+ /** Function to generate stream URL (for HTTP Range streaming) */
704
+ getStreamUrl?: (sessionId: string, path: string) => string;
705
+ /** Current session ID */
706
+ sessionId?: string | null;
707
+ }
708
+ interface VideoPlayerProviderProps extends VideoPlayerContextValue {
709
+ children: React__default.ReactNode;
710
+ }
711
+ /** Simplified stream source (uses context for getStreamUrl) */
712
+ interface SimpleStreamSource {
713
+ type: 'stream';
714
+ /** File path on server */
715
+ path: string;
716
+ /** Session ID (optional, uses context if not provided) */
717
+ sessionId?: string;
718
+ /** MIME type for the video */
719
+ mimeType?: string;
720
+ title?: string;
721
+ poster?: string;
722
+ }
723
+
724
+ /**
725
+ * VideoPlayer - Unified Video Player Component
726
+ *
727
+ * Supports multiple modes:
728
+ * - vidstack: Full-featured player (YouTube, Vimeo, HLS, DASH)
729
+ * - native: Lightweight HTML5 player
730
+ * - streaming: HTTP Range streaming with auth / Blob sources
731
+ *
732
+ * @example
733
+ * // YouTube video
734
+ * <VideoPlayer source={{ type: 'youtube', id: 'dQw4w9WgXcQ' }} />
735
+ *
736
+ * @example
737
+ * // HLS stream
738
+ * <VideoPlayer source={{ type: 'hls', url: 'https://example.com/video.m3u8' }} />
739
+ *
740
+ * @example
741
+ * // HTTP Range streaming with auth (full source)
742
+ * <VideoPlayer
743
+ * source={{
744
+ * type: 'stream',
745
+ * sessionId: 'abc123',
746
+ * path: '/videos/movie.mp4',
747
+ * getStreamUrl: (id, path) => `/api/stream/${id}?path=${path}&token=${token}`
748
+ * }}
749
+ * />
750
+ *
751
+ * @example
752
+ * // HTTP Range streaming (simplified, using VideoPlayerProvider context)
753
+ * <VideoPlayerProvider sessionId={sessionId} getStreamUrl={getStreamUrl}>
754
+ * <VideoPlayer source={{ type: 'stream', path: '/videos/movie.mp4' }} />
755
+ * </VideoPlayerProvider>
756
+ *
757
+ * @example
758
+ * // Blob/ArrayBuffer
759
+ * <VideoPlayer source={{ type: 'blob', data: arrayBuffer, mimeType: 'video/mp4' }} />
760
+ */
761
+
762
+ declare const VideoPlayer: React__default.ForwardRefExoticComponent<VideoPlayerProps & {
763
+ source: VideoSourceUnion | SimpleStreamSource;
764
+ } & React__default.RefAttributes<VideoPlayerRef>>;
765
+
766
+ interface VideoControlsProps {
767
+ player: React__default.RefObject<MediaPlayerInstance | null>;
768
+ className?: string;
769
+ }
770
+ declare function VideoControls({ player, className }: VideoControlsProps): react_jsx_runtime.JSX.Element;
771
+
772
+ interface VideoErrorFallbackProps extends ErrorFallbackProps {
773
+ /** URL for download button (if provided, shows download button) */
774
+ downloadUrl?: string;
775
+ /** Filename for download */
776
+ downloadFilename?: string;
777
+ /** File size to display */
778
+ fileSize?: string;
779
+ /** Show retry button */
780
+ showRetry?: boolean;
781
+ /** Custom className */
782
+ className?: string;
783
+ /** Custom icon */
784
+ icon?: React__default.ReactNode;
785
+ /** Custom title (defaults to error message) */
786
+ title?: string;
787
+ /** Custom description */
788
+ description?: string;
789
+ }
790
+ /**
791
+ * Pre-built error fallback component for VideoPlayer
792
+ *
793
+ * @example
794
+ * // Basic usage
795
+ * <VideoPlayer
796
+ * source={source}
797
+ * errorFallback={(props) => (
798
+ * <VideoErrorFallback
799
+ * {...props}
800
+ * downloadUrl={getDownloadUrl()}
801
+ * downloadFilename="video.mp4"
802
+ * />
803
+ * )}
804
+ * />
805
+ *
806
+ * @example
807
+ * // With file size
808
+ * <VideoErrorFallback
809
+ * error="Failed to load video"
810
+ * downloadUrl="/api/download/video.mp4"
811
+ * fileSize="125 MB"
812
+ * showRetry
813
+ * retry={() => reloadVideo()}
814
+ * />
815
+ */
816
+ declare function VideoErrorFallback({ error, retry, downloadUrl, downloadFilename, fileSize, showRetry, className, icon, title, description, }: VideoErrorFallbackProps): react_jsx_runtime.JSX.Element;
817
+ interface CreateVideoErrorFallbackOptions {
818
+ /** Function to get download URL from source */
819
+ getDownloadUrl?: (source: unknown) => string | undefined;
820
+ /** Function to get filename from source */
821
+ getFilename?: (source: unknown) => string | undefined;
822
+ /** Function to get file size from source */
823
+ getFileSize?: (source: unknown) => string | undefined;
824
+ /** Show retry button */
825
+ showRetry?: boolean;
826
+ }
827
+ /**
828
+ * Factory to create error fallback function for VideoPlayer
829
+ *
830
+ * @example
831
+ * const errorFallback = createVideoErrorFallback({
832
+ * getDownloadUrl: (source) => source.downloadUrl,
833
+ * getFilename: (source) => source.filename,
834
+ * showRetry: true,
835
+ * });
836
+ *
837
+ * <VideoPlayer source={source} errorFallback={errorFallback} />
838
+ */
839
+ declare function createVideoErrorFallback(options: CreateVideoErrorFallbackOptions): (props: ErrorFallbackProps, source?: unknown) => React__default.ReactNode;
840
+
841
+ /**
842
+ * VidstackProvider - Full-featured video player using Vidstack
843
+ * Supports YouTube, Vimeo, HLS, DASH, and direct URLs
844
+ */
845
+
846
+ declare const VidstackProvider: React__default.ForwardRefExoticComponent<VidstackProviderProps & React__default.RefAttributes<VideoPlayerRef>>;
847
+
848
+ /**
849
+ * NativeProvider - Lightweight native HTML5 video player
850
+ * For demo videos, background videos, autoplay loop muted scenarios
851
+ */
852
+
853
+ declare const NativeProvider: React__default.ForwardRefExoticComponent<NativeProviderProps & React__default.RefAttributes<VideoPlayerRef>>;
854
+
855
+ /**
856
+ * StreamProvider - HTTP Range streaming and Blob video player
857
+ * Supports:
858
+ * - HTTP Range requests with authorization (for large files)
859
+ * - Blob/ArrayBuffer sources
860
+ * - Data URL sources
861
+ * - Fill parent container mode
862
+ * - Custom error fallback
863
+ */
864
+
865
+ declare const StreamProvider: React__default.ForwardRefExoticComponent<StreamProviderProps & React__default.RefAttributes<VideoPlayerRef>>;
866
+
867
+ /**
868
+ * Provider for VideoPlayer streaming configuration
869
+ *
870
+ * @example
871
+ * // In your app layout or FileWorkspace
872
+ * <VideoPlayerProvider
873
+ * sessionId={sessionId}
874
+ * getStreamUrl={terminalClient.terminal_media.streamStreamRetrieveUrl}
875
+ * >
876
+ * <VideoPlayer source={{ type: 'stream', path: '/video.mp4' }} />
877
+ * </VideoPlayerProvider>
878
+ */
879
+ declare function VideoPlayerProvider({ children, getStreamUrl, sessionId, }: VideoPlayerProviderProps): react_jsx_runtime.JSX.Element;
880
+ /**
881
+ * Hook to access VideoPlayer context
882
+ */
883
+ declare function useVideoPlayerContext(): VideoPlayerContextValue | null;
884
+
885
+ /**
886
+ * Video source and player mode resolvers
887
+ */
888
+
889
+ /**
890
+ * Determine which provider to use based on source type
891
+ */
892
+ declare function resolvePlayerMode(source: VideoSourceUnion, mode?: PlayerMode): 'vidstack' | 'native' | 'streaming';
893
+ /**
894
+ * Check if source is a simplified stream source (without getStreamUrl)
895
+ */
896
+ declare function isSimpleStreamSource(source: VideoSourceUnion | SimpleStreamSource): source is SimpleStreamSource;
897
+ /**
898
+ * Resolve simplified stream source to full stream source using context
899
+ */
900
+ declare function resolveStreamSource(source: SimpleStreamSource, context: VideoPlayerContextValue | null): StreamSource | null;
901
+
902
+ /**
903
+ * File source resolution utilities
904
+ */
905
+
906
+ /**
907
+ * Resolve file content to VideoSourceUnion
908
+ * Useful for FileWorkspace/file manager integrations
909
+ *
910
+ * @example
911
+ * const source = resolveFileSource({
912
+ * content: file.content,
913
+ * path: file.path,
914
+ * mimeType: file.mimeType,
915
+ * sessionId: sessionId,
916
+ * loadMethod: file.loadMethod,
917
+ * getStreamUrl: terminalClient.terminal_media.streamStreamRetrieveUrl
918
+ * });
919
+ *
920
+ * <VideoPlayer source={source} />
921
+ */
922
+ declare function resolveFileSource(options: ResolveFileSourceOptions): VideoSourceUnion | null;
923
+
924
+ interface HybridAudioPlayerProps {
925
+ /** Show playback controls */
926
+ showControls?: boolean;
927
+ /** Show frequency waveform */
928
+ showWaveform?: boolean;
929
+ /** Waveform visualization mode */
930
+ waveformMode?: 'frequency' | 'static';
931
+ /** Waveform height in pixels */
932
+ waveformHeight?: number;
933
+ /** Show time display */
934
+ showTimer?: boolean;
935
+ /** Show volume control */
936
+ showVolume?: boolean;
937
+ /** Show loop button */
938
+ showLoop?: boolean;
939
+ /** Additional CSS class */
940
+ className?: string;
941
+ /** Inline styles */
942
+ style?: React.CSSProperties;
943
+ }
944
+ declare const HybridAudioPlayer: React$1.NamedExoticComponent<HybridAudioPlayerProps>;
945
+
946
+ /**
947
+ * Audio Reactive Effects - Common utilities and types
948
+ *
949
+ * Provides reusable effect calculations and configurations
950
+ */
951
+ type EffectVariant = 'glow' | 'orbs' | 'spotlight' | 'mesh';
952
+ type EffectIntensity = 'subtle' | 'medium' | 'strong';
953
+ type EffectColorScheme = 'primary' | 'vibrant' | 'cool' | 'warm';
954
+ interface AudioLevels {
955
+ bass: number;
956
+ mid: number;
957
+ high: number;
958
+ overall: number;
959
+ }
960
+ interface EffectConfig$1 {
961
+ opacity: number;
962
+ scale: number;
963
+ blur: string;
964
+ }
965
+ interface EffectColors {
966
+ colors: string[];
967
+ hueShift: number;
968
+ }
969
+ interface EffectLayer {
970
+ inset: number;
971
+ opacity: number;
972
+ scale: number;
973
+ background: string;
974
+ blur: string;
975
+ animation?: string;
976
+ }
977
+ declare const INTENSITY_CONFIG: Record<EffectIntensity, EffectConfig$1>;
978
+ declare const COLOR_SCHEMES: Record<EffectColorScheme, string[]>;
979
+ /**
980
+ * Get effect configuration from intensity setting
981
+ */
982
+ declare function getEffectConfig(intensity: EffectIntensity): EffectConfig$1;
983
+ /**
984
+ * Get color array from color scheme
985
+ */
986
+ declare function getColors(colorScheme: EffectColorScheme): string[];
987
+ /**
988
+ * Prepare colors with hue shift based on audio levels
989
+ */
990
+ declare function prepareEffectColors(colorScheme: EffectColorScheme, levels: AudioLevels): EffectColors;
991
+ /**
992
+ * Calculate glow layer properties
993
+ */
994
+ declare function calculateGlowLayers(levels: AudioLevels, config: EffectConfig$1, colors: string[]): EffectLayer[];
995
+ /**
996
+ * Calculate orb positions and properties - highly reactive
997
+ */
998
+ declare function calculateOrbs(levels: AudioLevels, config: EffectConfig$1, colors: string[], baseSize?: number): {
999
+ x: number;
1000
+ y: number;
1001
+ size: number;
1002
+ color: string;
1003
+ opacity: number;
1004
+ scale: number;
1005
+ }[];
1006
+ /**
1007
+ * Calculate mesh gradient positions - dynamic and reactive
1008
+ */
1009
+ declare function calculateMeshGradients(levels: AudioLevels, config: EffectConfig$1, colors: string[]): ({
1010
+ width: string;
1011
+ height: string;
1012
+ top: string;
1013
+ right: string;
1014
+ color: string;
1015
+ opacity: number;
1016
+ scale: number;
1017
+ rotation: number;
1018
+ blur: string;
1019
+ bottom?: undefined;
1020
+ left?: undefined;
1021
+ isCenter?: undefined;
1022
+ } | {
1023
+ width: string;
1024
+ height: string;
1025
+ bottom: string;
1026
+ left: string;
1027
+ color: string;
1028
+ opacity: number;
1029
+ scale: number;
1030
+ rotation: number;
1031
+ blur: string;
1032
+ top?: undefined;
1033
+ right?: undefined;
1034
+ isCenter?: undefined;
1035
+ } | {
1036
+ width: string;
1037
+ height: string;
1038
+ top: string;
1039
+ left: string;
1040
+ color: string;
1041
+ opacity: number;
1042
+ scale: number;
1043
+ rotation: number;
1044
+ blur: string;
1045
+ right?: undefined;
1046
+ bottom?: undefined;
1047
+ isCenter?: undefined;
1048
+ } | {
1049
+ width: string;
1050
+ height: string;
1051
+ top: string;
1052
+ left: string;
1053
+ color: string;
1054
+ opacity: number;
1055
+ scale: number;
1056
+ rotation: number;
1057
+ isCenter: boolean;
1058
+ blur: string;
1059
+ right?: undefined;
1060
+ bottom?: undefined;
1061
+ })[];
1062
+ /**
1063
+ * Calculate spotlight effect properties - highly reactive
1064
+ */
1065
+ declare function calculateSpotlight(levels: AudioLevels, config: EffectConfig$1, colors: string[], rotation: number): {
1066
+ rotation: number;
1067
+ inset: number;
1068
+ colors: {
1069
+ color: string;
1070
+ opacity: number;
1071
+ }[];
1072
+ pulseInset: number;
1073
+ pulseOpacity: number;
1074
+ pulseScale: number;
1075
+ ringOpacity: number;
1076
+ ringScale: number;
1077
+ };
1078
+ /**
1079
+ * CSS for effect animations - can be injected once
1080
+ */
1081
+ declare const EFFECT_ANIMATIONS = "\n @keyframes spotlight-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n @keyframes orb-float-1 {\n 0%, 100% { transform: translate(-50%, -50%) translateY(0); }\n 50% { transform: translate(-50%, -50%) translateY(-15px); }\n }\n\n @keyframes orb-float-2 {\n 0%, 100% { transform: translate(-50%, -50%) translateX(0); }\n 50% { transform: translate(-50%, -50%) translateX(15px); }\n }\n\n @keyframes orb-float-3 {\n 0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }\n 33% { transform: translate(-50%, -50%) translate(10px, -10px); }\n 66% { transform: translate(-50%, -50%) translate(-10px, 10px); }\n }\n\n @keyframes orb-float-4 {\n 0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }\n 50% { transform: translate(-50%, -50%) translate(-15px, -10px); }\n }\n\n @keyframes mesh-float-1 {\n 0%, 100% { transform: translate(0, 0) scale(1); }\n 25% { transform: translate(-5%, 10%) scale(1.05); }\n 50% { transform: translate(5%, 5%) scale(0.95); }\n 75% { transform: translate(-3%, -5%) scale(1.02); }\n }\n\n @keyframes mesh-float-2 {\n 0%, 100% { transform: translate(0, 0) scale(1); }\n 33% { transform: translate(8%, -8%) scale(1.08); }\n 66% { transform: translate(-6%, 6%) scale(0.92); }\n }\n\n @keyframes mesh-float-3 {\n 0%, 100% { transform: translate(0, 0) scale(1); }\n 50% { transform: translate(10%, 10%) scale(1.1); }\n }\n\n @keyframes mesh-float-4 {\n 0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }\n 25% { transform: translate(10%, -5%) scale(1.1) rotate(5deg); }\n 50% { transform: translate(-5%, 10%) scale(0.95) rotate(-5deg); }\n 75% { transform: translate(-10%, -10%) scale(1.05) rotate(3deg); }\n }\n\n @keyframes mesh-pulse {\n 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }\n 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }\n }\n\n @keyframes glow-breathe {\n 0%, 100% { opacity: 0.6; transform: scale(1); }\n 50% { opacity: 1; transform: scale(1.05); }\n }\n\n @keyframes glow-rotate {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n @keyframes sparkle-move {\n 0% { opacity: 0; transform: scale(0.8); }\n 50% { opacity: 1; }\n 100% { opacity: 0; transform: scale(1.2); }\n }\n";
1082
+
1083
+ interface UseHybridAudioOptions {
1084
+ src: string;
1085
+ autoPlay?: boolean;
1086
+ initialVolume?: number;
1087
+ loop?: boolean;
1088
+ crossOrigin?: 'anonymous' | 'use-credentials';
1089
+ onPlay?: () => void;
1090
+ onPause?: () => void;
1091
+ onEnded?: () => void;
1092
+ onTimeUpdate?: (time: number) => void;
1093
+ onError?: (error: Error) => void;
1094
+ onReady?: () => void;
1095
+ }
1096
+ interface HybridAudioState {
1097
+ isReady: boolean;
1098
+ isPlaying: boolean;
1099
+ currentTime: number;
1100
+ duration: number;
1101
+ volume: number;
1102
+ isMuted: boolean;
1103
+ isLooping: boolean;
1104
+ buffered: TimeRanges | null;
1105
+ error: Error | null;
1106
+ }
1107
+ interface HybridAudioControls {
1108
+ play: () => Promise<void>;
1109
+ pause: () => void;
1110
+ togglePlay: () => void;
1111
+ seek: (time: number) => void;
1112
+ seekTo: (progress: number) => void;
1113
+ skip: (seconds: number) => void;
1114
+ setVolume: (vol: number) => void;
1115
+ toggleMute: () => void;
1116
+ toggleLoop: () => void;
1117
+ setLoop: (enabled: boolean) => void;
1118
+ restart: () => void;
1119
+ }
1120
+ interface HybridWebAudioAPI {
1121
+ context: AudioContext | null;
1122
+ analyser: AnalyserNode | null;
1123
+ sourceNode: MediaElementAudioSourceNode | null;
1124
+ }
1125
+ interface UseHybridAudioReturn {
1126
+ audioRef: React.RefObject<HTMLAudioElement | null>;
1127
+ state: HybridAudioState;
1128
+ controls: HybridAudioControls;
1129
+ webAudio: HybridWebAudioAPI;
1130
+ }
1131
+ declare function useHybridAudio(options: UseHybridAudioOptions): UseHybridAudioReturn;
1132
+
1133
+ declare function useHybridAudioAnalysis(analyser: AnalyserNode | null, isPlaying: boolean): AudioLevels;
1134
+
1135
+ type VisualizationVariant = 'glow' | 'orbs' | 'spotlight' | 'mesh' | 'none';
1136
+ type VisualizationIntensity = 'subtle' | 'medium' | 'strong';
1137
+ type VisualizationColorScheme = 'primary' | 'vibrant' | 'cool' | 'warm';
1138
+ interface VisualizationSettings {
1139
+ /** Enable reactive cover animation */
1140
+ enabled: boolean;
1141
+ /** Visual effect variant */
1142
+ variant: VisualizationVariant;
1143
+ /** Effect intensity */
1144
+ intensity: VisualizationIntensity;
1145
+ /** Color scheme */
1146
+ colorScheme: VisualizationColorScheme;
1147
+ /** Playback volume (0-1) */
1148
+ volume: number;
1149
+ /** Loop playback */
1150
+ isLooping: boolean;
1151
+ }
1152
+ interface UseVisualizationReturn {
1153
+ /** Current settings */
1154
+ settings: VisualizationSettings;
1155
+ /** Toggle visualization on/off */
1156
+ toggle: () => void;
1157
+ /** Set specific setting */
1158
+ setSetting: <K extends keyof VisualizationSettings>(key: K, value: VisualizationSettings[K]) => void;
1159
+ /** Cycle to next variant */
1160
+ nextVariant: () => void;
1161
+ /** Cycle to next intensity */
1162
+ nextIntensity: () => void;
1163
+ /** Cycle to next color scheme */
1164
+ nextColorScheme: () => void;
1165
+ /** Reset to defaults */
1166
+ reset: () => void;
1167
+ }
1168
+ type UseAudioVisualizationReturn = UseVisualizationReturn;
1169
+ interface VisualizationProviderProps {
1170
+ children: ReactNode;
1171
+ }
1172
+ declare function VisualizationProvider({ children }: VisualizationProviderProps): react_jsx_runtime.JSX.Element;
1173
+ declare function useVisualization(): UseVisualizationReturn;
1174
+ declare const useAudioVisualization: typeof useVisualization;
1175
+ declare const VARIANT_INFO: Record<VisualizationVariant, {
1176
+ label: string;
1177
+ icon: string;
1178
+ }>;
1179
+ declare const INTENSITY_INFO: Record<VisualizationIntensity, {
1180
+ label: string;
1181
+ }>;
1182
+ declare const COLOR_SCHEME_INFO: Record<VisualizationColorScheme, {
1183
+ label: string;
1184
+ preview: string;
1185
+ }>;
1186
+
1187
+ interface HybridSimplePlayerProps {
1188
+ /** Audio source URL */
1189
+ src: string;
1190
+ /** Track title */
1191
+ title?: string;
1192
+ /** Artist name */
1193
+ artist?: string;
1194
+ /** Cover art URL or ReactNode */
1195
+ coverArt?: string | ReactNode;
1196
+ /** Cover art size */
1197
+ coverSize?: 'sm' | 'md' | 'lg';
1198
+ /** Show frequency waveform */
1199
+ showWaveform?: boolean;
1200
+ /** Waveform visualization mode */
1201
+ waveformMode?: 'frequency' | 'static';
1202
+ /** Waveform height in pixels */
1203
+ waveformHeight?: number;
1204
+ /** Show timer */
1205
+ showTimer?: boolean;
1206
+ /** Show volume control */
1207
+ showVolume?: boolean;
1208
+ /** Show loop/repeat button */
1209
+ showLoop?: boolean;
1210
+ /** Enable audio-reactive cover effects */
1211
+ reactiveCover?: boolean;
1212
+ /** Reactive effect variant */
1213
+ variant?: VisualizationVariant;
1214
+ /** Reactive effect intensity */
1215
+ intensity?: EffectIntensity;
1216
+ /** Reactive effect color scheme */
1217
+ colorScheme?: EffectColorScheme;
1218
+ /** Auto-play on load */
1219
+ autoPlay?: boolean;
1220
+ /** Loop playback */
1221
+ loop?: boolean;
1222
+ /** Initial volume (0-1) */
1223
+ initialVolume?: number;
1224
+ /** Layout direction */
1225
+ layout?: 'vertical' | 'horizontal';
1226
+ /** Additional class name */
1227
+ className?: string;
1228
+ /** Callbacks */
1229
+ onPlay?: () => void;
1230
+ onPause?: () => void;
1231
+ onEnded?: () => void;
1232
+ onError?: (error: Error) => void;
1233
+ }
1234
+ declare function HybridSimplePlayer(props: HybridSimplePlayerProps): react_jsx_runtime.JSX.Element;
1235
+
1236
+ interface HybridWaveformProps {
1237
+ /** Visualization mode */
1238
+ mode?: 'frequency' | 'static';
1239
+ /** Canvas height in pixels */
1240
+ height?: number;
1241
+ /** Bar width in pixels */
1242
+ barWidth?: number;
1243
+ /** Gap between bars in pixels */
1244
+ barGap?: number;
1245
+ /** Bar border radius */
1246
+ barRadius?: number;
1247
+ /** Color for played portion */
1248
+ progressColor?: string;
1249
+ /** Color for unplayed portion */
1250
+ waveColor?: string;
1251
+ /** Color for buffered regions indicator */
1252
+ bufferedColor?: string;
1253
+ /** Additional CSS class */
1254
+ className?: string;
1255
+ /** Callback when user seeks */
1256
+ onSeek?: (time: number) => void;
1257
+ }
1258
+ declare const HybridWaveform: React$1.NamedExoticComponent<HybridWaveformProps>;
1259
+
1260
+ interface AudioReactiveCoverProps {
1261
+ children: ReactNode;
1262
+ size?: 'sm' | 'md' | 'lg';
1263
+ variant?: EffectVariant;
1264
+ intensity?: EffectIntensity;
1265
+ colorScheme?: EffectColorScheme;
1266
+ onClick?: () => void;
1267
+ className?: string;
1268
+ }
1269
+ declare function AudioReactiveCover({ children, size, variant, intensity, colorScheme, onClick, className, }: AudioReactiveCoverProps): react_jsx_runtime.JSX.Element;
1270
+
1271
+ interface GlowEffectData {
1272
+ layers: ReturnType<typeof calculateGlowLayers>;
1273
+ hueShift: number;
1274
+ showPulseRings: boolean;
1275
+ showSparkle: boolean;
1276
+ }
1277
+ interface GlowEffectProps {
1278
+ data: GlowEffectData;
1279
+ colors: string[];
1280
+ isPlaying: boolean;
1281
+ }
1282
+ declare function GlowEffect({ data, colors, isPlaying }: GlowEffectProps): react_jsx_runtime.JSX.Element;
1283
+
1284
+ interface OrbsEffectProps {
1285
+ orbs: ReturnType<typeof calculateOrbs>;
1286
+ blur: string;
1287
+ isPlaying: boolean;
1288
+ }
1289
+ declare function OrbsEffect({ orbs, blur, isPlaying }: OrbsEffectProps): react_jsx_runtime.JSX.Element;
1290
+
1291
+ interface SpotlightEffectProps {
1292
+ data: ReturnType<typeof calculateSpotlight>;
1293
+ colors: string[];
1294
+ blur: string;
1295
+ isPlaying: boolean;
1296
+ }
1297
+ declare function SpotlightEffect({ data, colors, blur, isPlaying }: SpotlightEffectProps): react_jsx_runtime.JSX.Element;
1298
+
1299
+ interface MeshEffectProps {
1300
+ gradients: ReturnType<typeof calculateMeshGradients>;
1301
+ blur: string;
1302
+ isPlaying: boolean;
1303
+ }
1304
+ declare function MeshEffect({ gradients, isPlaying }: MeshEffectProps): react_jsx_runtime.JSX.Element;
1305
+
1306
+ interface HybridAudioContextValue {
1307
+ state: HybridAudioState;
1308
+ controls: HybridAudioControls;
1309
+ webAudio: HybridWebAudioAPI;
1310
+ audioLevels: AudioLevels;
1311
+ audioRef: React.RefObject<HTMLAudioElement | null>;
1312
+ }
1313
+ interface HybridAudioProviderProps extends UseHybridAudioOptions {
1314
+ children: ReactNode;
1315
+ }
1316
+ declare function HybridAudioProvider({ children, ...options }: HybridAudioProviderProps): react_jsx_runtime.JSX.Element;
1317
+ /**
1318
+ * Access full hybrid audio context
1319
+ */
1320
+ declare function useHybridAudioContext(): HybridAudioContextValue;
1321
+ /**
1322
+ * Access audio state only (read-only)
1323
+ */
1324
+ declare function useHybridAudioState(): HybridAudioState;
1325
+ /**
1326
+ * Access audio controls only (no state re-renders)
1327
+ */
1328
+ declare function useHybridAudioControls(): HybridAudioControls;
1329
+ /**
1330
+ * Access audio levels for reactive effects
1331
+ */
1332
+ declare function useHybridAudioLevels(): AudioLevels;
1333
+ /**
1334
+ * Access Web Audio API for custom visualizations
1335
+ */
1336
+ declare function useHybridWebAudio(): HybridWebAudioAPI;
1337
+
1338
+ /**
1339
+ * AudioPlayer types
1340
+ */
1341
+ interface EqualizerOptions {
1342
+ barCount?: number;
1343
+ height?: number;
1344
+ gap?: number;
1345
+ showPeaks?: boolean;
1346
+ barColor?: string;
1347
+ peakColor?: string;
1348
+ }
1349
+
1350
+ /**
1351
+ * formatTime - Format seconds to mm:ss string
1352
+ */
1353
+ declare function formatTime(seconds: number): string;
1354
+
1355
+ /**
1356
+ * ImageViewer type definitions
1357
+ */
1358
+ interface ImageFile {
1359
+ /** Display name for the image */
1360
+ name: string;
1361
+ /** File path used for change detection and caching */
1362
+ path: string;
1363
+ /** Optional MIME type */
1364
+ mimeType?: string;
1365
+ }
1366
+ interface ImageViewerProps {
1367
+ /** File info (name, path, mimeType) */
1368
+ file: ImageFile;
1369
+ /** Image content as string (data URL or base64) or ArrayBuffer */
1370
+ content: string | ArrayBuffer;
1371
+ /**
1372
+ * Direct image URL for HTTP streaming.
1373
+ * When provided, bypasses content→blob conversion and uses URL directly.
1374
+ * Useful for large files loaded via HTTP Range requests.
1375
+ */
1376
+ src?: string;
1377
+ /** Hide expand button when already in dialog */
1378
+ inDialog?: boolean;
1379
+ }
1380
+
1381
+ declare function ImageViewer({ file, content, src: directSrc, inDialog }: ImageViewerProps): react_jsx_runtime.JSX.Element;
1382
+
1383
+ interface BlobUrlEntry {
1384
+ url: string;
1385
+ refCount: number;
1386
+ createdAt: number;
1387
+ }
1388
+ interface ImageDimensions {
1389
+ width: number;
1390
+ height: number;
1391
+ }
1392
+ interface VideoMetadata {
1393
+ duration: number;
1394
+ width: number;
1395
+ height: number;
1396
+ codec?: string;
1397
+ }
1398
+ interface EffectConfig {
1399
+ opacity: number;
1400
+ scale: number;
1401
+ blur: string;
1402
+ }
1403
+ /** Video player settings (persisted) */
1404
+ interface VideoPlayerSettings {
1405
+ volume: number;
1406
+ isLooping: boolean;
1407
+ }
1408
+ interface MediaCacheState {
1409
+ blobUrls: Map<string, BlobUrlEntry>;
1410
+ imageDimensions: Map<string, ImageDimensions>;
1411
+ audioPlaybackPositions: Map<string, number>;
1412
+ audioEffectConfigs: Map<string, EffectConfig>;
1413
+ videoStreamUrls: Map<string, {
1414
+ url: string;
1415
+ timestamp: number;
1416
+ }>;
1417
+ videoPosterUrls: Map<string, string>;
1418
+ videoPlaybackPositions: Map<string, number>;
1419
+ videoMetadata: Map<string, VideoMetadata>;
1420
+ videoPlayerSettings: VideoPlayerSettings;
1421
+ }
1422
+ interface MediaCacheActions {
1423
+ getOrCreateBlobUrl: (key: string, content: ArrayBuffer, mimeType: string) => string;
1424
+ releaseBlobUrl: (key: string) => void;
1425
+ hasBlobUrl: (key: string) => boolean;
1426
+ cacheDimensions: (src: string, dims: ImageDimensions) => void;
1427
+ getDimensions: (src: string) => ImageDimensions | null;
1428
+ saveAudioPosition: (uri: string, time: number) => void;
1429
+ getAudioPosition: (uri: string) => number | null;
1430
+ getEffectConfig: (key: string) => EffectConfig | null;
1431
+ cacheEffectConfig: (key: string, config: EffectConfig) => void;
1432
+ getOrCreateStreamUrl: (sessionId: string, path: string, generator: (sessionId: string, path: string) => string) => string;
1433
+ getPosterUrl: (title: string) => string | null;
1434
+ cachePosterUrl: (title: string, url: string) => void;
1435
+ saveVideoPosition: (key: string, time: number) => void;
1436
+ getVideoPosition: (key: string) => number | null;
1437
+ cacheVideoMetadata: (url: string, meta: VideoMetadata) => void;
1438
+ getVideoMetadata: (url: string) => VideoMetadata | null;
1439
+ invalidateSession: (sessionId: string) => void;
1440
+ getVideoPlayerSettings: () => VideoPlayerSettings;
1441
+ saveVideoPlayerSettings: (settings: Partial<VideoPlayerSettings>) => void;
1442
+ clearCache: () => void;
1443
+ getCacheStats: () => {
1444
+ blobUrls: number;
1445
+ dimensions: number;
1446
+ audioPositions: number;
1447
+ videoPositions: number;
1448
+ };
1449
+ }
1450
+ type MediaCacheStore = MediaCacheState & MediaCacheActions;
1451
+ declare const useMediaCacheStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<MediaCacheStore>, "setState" | "devtools"> & {
1452
+ setState(partial: MediaCacheStore | Partial<MediaCacheStore> | ((state: MediaCacheStore) => MediaCacheStore | Partial<MediaCacheStore>), replace?: false, action?: string | {
1453
+ [x: string]: unknown;
1454
+ [x: number]: unknown;
1455
+ [x: symbol]: unknown;
1456
+ type: string;
1457
+ }): void;
1458
+ setState(state: MediaCacheStore | ((state: MediaCacheStore) => MediaCacheStore), replace: true, action?: string | {
1459
+ [x: string]: unknown;
1460
+ [x: number]: unknown;
1461
+ [x: symbol]: unknown;
1462
+ type: string;
1463
+ }): void;
1464
+ devtools: {
1465
+ cleanup: () => void;
1466
+ };
1467
+ }, "setState" | "persist"> & {
1468
+ setState(partial: MediaCacheStore | Partial<MediaCacheStore> | ((state: MediaCacheStore) => MediaCacheStore | Partial<MediaCacheStore>), replace?: false, action?: string | {
1469
+ [x: string]: unknown;
1470
+ [x: number]: unknown;
1471
+ [x: symbol]: unknown;
1472
+ type: string;
1473
+ }): unknown;
1474
+ setState(state: MediaCacheStore | ((state: MediaCacheStore) => MediaCacheStore), replace: true, action?: string | {
1475
+ [x: string]: unknown;
1476
+ [x: number]: unknown;
1477
+ [x: symbol]: unknown;
1478
+ type: string;
1479
+ }): unknown;
1480
+ persist: {
1481
+ setOptions: (options: Partial<zustand_middleware.PersistOptions<MediaCacheStore, {
1482
+ audioPlaybackPositions: [string, number][];
1483
+ videoPlaybackPositions: [string, number][];
1484
+ videoPosterUrls: [string, string][];
1485
+ videoPlayerSettings: VideoPlayerSettings;
1486
+ }, unknown>>) => void;
1487
+ clearStorage: () => void;
1488
+ rehydrate: () => Promise<void> | void;
1489
+ hasHydrated: () => boolean;
1490
+ onHydrate: (fn: (state: MediaCacheStore) => void) => () => void;
1491
+ onFinishHydration: (fn: (state: MediaCacheStore) => void) => () => void;
1492
+ getOptions: () => Partial<zustand_middleware.PersistOptions<MediaCacheStore, {
1493
+ audioPlaybackPositions: [string, number][];
1494
+ videoPlaybackPositions: [string, number][];
1495
+ videoPosterUrls: [string, string][];
1496
+ videoPlayerSettings: VideoPlayerSettings;
1497
+ }, unknown>>;
1498
+ };
1499
+ }>;
1500
+ /**
1501
+ * Hook for image-related cache operations
1502
+ * Uses useShallow to prevent infinite re-renders
1503
+ */
1504
+ declare const useImageCache: () => {
1505
+ getOrCreateBlobUrl: (key: string, content: ArrayBuffer, mimeType: string) => string;
1506
+ releaseBlobUrl: (key: string) => void;
1507
+ hasBlobUrl: (key: string) => boolean;
1508
+ cacheDimensions: (src: string, dims: ImageDimensions) => void;
1509
+ getDimensions: (src: string) => ImageDimensions | null;
1510
+ };
1511
+ /**
1512
+ * Hook for audio-related cache operations
1513
+ * Uses useShallow to prevent infinite re-renders
1514
+ */
1515
+ declare const useAudioCache: () => {
1516
+ getOrCreateBlobUrl: (key: string, content: ArrayBuffer, mimeType: string) => string;
1517
+ releaseBlobUrl: (key: string) => void;
1518
+ hasBlobUrl: (key: string) => boolean;
1519
+ saveAudioPosition: (uri: string, time: number) => void;
1520
+ getAudioPosition: (uri: string) => number | null;
1521
+ getEffectConfig: (key: string) => EffectConfig | null;
1522
+ cacheEffectConfig: (key: string, config: EffectConfig) => void;
1523
+ };
1524
+ /**
1525
+ * Hook for video-related cache operations
1526
+ * Uses useShallow to prevent infinite re-renders
1527
+ */
1528
+ declare const useVideoCache: () => {
1529
+ getOrCreateBlobUrl: (key: string, content: ArrayBuffer, mimeType: string) => string;
1530
+ releaseBlobUrl: (key: string) => void;
1531
+ hasBlobUrl: (key: string) => boolean;
1532
+ getOrCreateStreamUrl: (sessionId: string, path: string, generator: (sessionId: string, path: string) => string) => string;
1533
+ getPosterUrl: (title: string) => string | null;
1534
+ cachePosterUrl: (title: string, url: string) => void;
1535
+ saveVideoPosition: (key: string, time: number) => void;
1536
+ getVideoPosition: (key: string) => number | null;
1537
+ cacheVideoMetadata: (url: string, meta: VideoMetadata) => void;
1538
+ getVideoMetadata: (url: string) => VideoMetadata | null;
1539
+ invalidateSession: (sessionId: string) => void;
1540
+ getVideoPlayerSettings: () => VideoPlayerSettings;
1541
+ saveVideoPlayerSettings: (settings: Partial<VideoPlayerSettings>) => void;
1542
+ };
1543
+ /**
1544
+ * Hook for video player settings only
1545
+ * Returns current settings and save function
1546
+ */
1547
+ declare const useVideoPlayerSettings: () => {
1548
+ settings: VideoPlayerSettings;
1549
+ saveSettings: (settings: Partial<VideoPlayerSettings>) => void;
1550
+ };
1551
+ /**
1552
+ * Hook for blob URL cleanup on unmount
1553
+ */
1554
+ declare function useBlobUrlCleanup(key: string | null): void;
1555
+ /**
1556
+ * Generate a cache key from ArrayBuffer content
1557
+ * Uses first and last 1KB + length for fast hashing
1558
+ */
1559
+ declare function generateContentKey(content: ArrayBuffer): string;
1560
+
1561
+ interface MarkdownMessageProps {
1562
+ /** Markdown content to render */
1563
+ content: string;
1564
+ /** Additional CSS classes */
1565
+ className?: string;
1566
+ /** Whether the message is from the user (affects styling) */
1567
+ isUser?: boolean;
1568
+ /** Use compact size (text-xs instead of text-sm) */
1569
+ isCompact?: boolean;
1570
+ }
1571
+ /**
1572
+ * MarkdownMessage - Renders markdown content with syntax highlighting and GFM support
1573
+ *
1574
+ * Features:
1575
+ * - GitHub Flavored Markdown (GFM) support
1576
+ * - Syntax highlighted code blocks with copy button
1577
+ * - Mermaid diagram rendering
1578
+ * - Tables, lists, blockquotes
1579
+ * - User/assistant styling modes
1580
+ *
1581
+ * @example
1582
+ * ```tsx
1583
+ * <MarkdownMessage content="# Hello\n\nThis is **bold** text." />
1584
+ *
1585
+ * // User message styling
1586
+ * <MarkdownMessage content="Some content" isUser />
1587
+ * ```
1588
+ */
1589
+ declare const MarkdownMessage: React__default.FC<MarkdownMessageProps>;
1590
+
1591
+ export { ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, type AudioLevels, AudioReactiveCover, type AudioReactiveCoverProps, BaseInputTemplate, type BlobSource, COLOR_SCHEMES, COLOR_SCHEME_INFO, CheckboxWidget, ColorWidget, type CreateVideoErrorFallbackOptions, type DASHSource, type DataUrlSource, EFFECT_ANIMATIONS, type EffectColorScheme, type EffectColors, type EffectConfig$1 as EffectConfig, type EffectIntensity, type EffectLayer, type EffectVariant, type EqualizerOptions, type ErrorFallbackProps, ErrorListTemplate, FieldTemplate, GlowEffect, type GlowEffectData, type HLSSource, type HybridAudioContextValue, type HybridAudioControls, HybridAudioPlayer, type HybridAudioPlayerProps, HybridAudioProvider, type HybridAudioProviderProps, type HybridAudioState, HybridSimplePlayer, type HybridSimplePlayerProps, HybridWaveform, type HybridWaveformProps, type HybridWebAudioAPI, INTENSITY_CONFIG, INTENSITY_INFO, type ImageFile, ImageViewer, type ImageViewerProps, JsonSchemaForm, type JsonSchemaFormProps, JsonTreeComponent as JsonTree, type JsonTreeConfig, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, MarkdownMessage, type MarkdownMessageProps, Mermaid, MeshEffect, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, OrbsEffect, type PlayerMode, type PlaygroundConfig, type PlaygroundProps, PrettyCode, type ResolveFileSourceOptions, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, SpotlightEffect, StreamProvider, type StreamSource, SwitchWidget, TextWidget, type UrlSource, type UseAudioVisualizationReturn, type UseHybridAudioOptions, type UseHybridAudioReturn, type UseLottieOptions, type UseLottieReturn, type UseVisualizationReturn, VARIANT_INFO, VideoControls, VideoErrorFallback, type VideoErrorFallbackProps, VideoPlayer, type VideoPlayerContextValue, type VideoPlayerProps, VideoPlayerProvider, type VideoPlayerProviderProps, type VideoPlayerRef, type VideoSourceUnion, VidstackProvider, type VimeoSource, type VisualizationColorScheme, type VisualizationIntensity, VisualizationProvider, type VisualizationProviderProps, type VisualizationSettings, type VisualizationVariant, type YouTubeSource, calculateGlowLayers, calculateMeshGradients, calculateOrbs, calculateSpotlight, createVideoErrorFallback, formatTime, generateContentKey, getColors, getEffectConfig, getRequiredFields, hasRequiredFields, isSimpleStreamSource, mergeDefaults, normalizeFormData, prepareEffectColors, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useAudioVisualization, useBlobUrlCleanup, useHybridAudio, useHybridAudioAnalysis, useHybridAudioContext, useHybridAudioControls, useHybridAudioLevels, useHybridAudioState, useHybridWebAudio, useImageCache, useLottie, useMediaCacheStore, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, useVisualization, validateRequiredFields, validateSchema };