@djangocfg/ui-tools 2.1.201 → 2.1.203

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 (41) hide show
  1. package/README.md +22 -4
  2. package/dist/{chunk-7HP3GZFT.mjs → chunk-O55KZXKD.mjs} +123 -11
  3. package/dist/chunk-O55KZXKD.mjs.map +1 -0
  4. package/dist/{chunk-KHHTBDWW.cjs → chunk-XMZWMGKE.cjs} +122 -9
  5. package/dist/chunk-XMZWMGKE.cjs.map +1 -0
  6. package/dist/components-OZEGOPNP.cjs +46 -0
  7. package/dist/{components-7L3KMPQ5.cjs.map → components-OZEGOPNP.cjs.map} +1 -1
  8. package/dist/components-R4CC6JGG.mjs +5 -0
  9. package/dist/{components-IPSHDNXP.mjs.map → components-R4CC6JGG.mjs.map} +1 -1
  10. package/dist/index.cjs +48 -36
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +49 -2
  13. package/dist/index.d.ts +49 -2
  14. package/dist/index.mjs +15 -4
  15. package/dist/index.mjs.map +1 -1
  16. package/package.json +6 -6
  17. package/src/index.ts +2 -0
  18. package/src/tools/AudioPlayer/AudioPlayer.story.tsx +26 -5
  19. package/src/tools/AudioPlayer/README.md +38 -2
  20. package/src/tools/AudioPlayer/components/HybridCompactPlayer.tsx +153 -0
  21. package/src/tools/AudioPlayer/components/HybridSimplePlayer.tsx +9 -5
  22. package/src/tools/AudioPlayer/components/ReactiveCover/AudioReactiveCover.tsx +3 -1
  23. package/src/tools/AudioPlayer/components/index.ts +1 -0
  24. package/src/tools/AudioPlayer/hooks/index.ts +4 -0
  25. package/src/tools/AudioPlayer/hooks/useAudioBus.ts +76 -0
  26. package/src/tools/AudioPlayer/hooks/useHybridAudio.ts +18 -2
  27. package/src/tools/AudioPlayer/index.ts +6 -0
  28. package/src/tools/AudioPlayer/lazy.tsx +21 -1
  29. package/src/tools/Uploader/README.md +31 -6
  30. package/src/tools/Uploader/Uploader.story.tsx +44 -0
  31. package/src/tools/Uploader/components/UploadDropzone.tsx +13 -1
  32. package/src/tools/Uploader/components/UploadPreviewItem.tsx +10 -5
  33. package/src/tools/Uploader/hooks/useClipboardPaste.ts +15 -4
  34. package/src/tools/Uploader/index.ts +1 -0
  35. package/src/tools/Uploader/types/index.ts +7 -0
  36. package/src/tools/Uploader/utils/formatters.ts +28 -0
  37. package/src/tools/Uploader/utils/index.ts +1 -1
  38. package/dist/chunk-7HP3GZFT.mjs.map +0 -1
  39. package/dist/chunk-KHHTBDWW.cjs.map +0 -1
  40. package/dist/components-7L3KMPQ5.cjs +0 -42
  41. package/dist/components-IPSHDNXP.mjs +0 -5
package/dist/index.d.ts CHANGED
@@ -646,6 +646,8 @@ interface UseHybridAudioOptions {
646
646
  initialVolume?: number;
647
647
  loop?: boolean;
648
648
  crossOrigin?: 'anonymous' | 'use-credentials';
649
+ /** Set to true to opt out of global audio bus (player won't stop others and won't be stopped) */
650
+ excludeFromBus?: boolean;
649
651
  onPlay?: () => void;
650
652
  onPause?: () => void;
651
653
  onEnded?: () => void;
@@ -793,6 +795,44 @@ interface HybridSimplePlayerProps {
793
795
  }
794
796
  declare function HybridSimplePlayer(props: HybridSimplePlayerProps): react_jsx_runtime.JSX.Element;
795
797
 
798
+ /**
799
+ * HybridCompactPlayer - Single-row audio player
800
+ *
801
+ * Designed for tight spaces: play/pause + waveform + timer.
802
+ * No cover art, no volume slider, no skip buttons.
803
+ *
804
+ * @example
805
+ * <HybridCompactPlayer src="https://example.com/audio.mp3" title="Rain & Thunder" />
806
+ *
807
+ * @example
808
+ * // Lazy-loaded (preferred in app)
809
+ * <LazyHybridCompactPlayer src={url} autoPlay />
810
+ */
811
+
812
+ interface HybridCompactPlayerProps {
813
+ /** Audio source URL */
814
+ src: string;
815
+ /** Track title (shown as tooltip / aria-label) */
816
+ title?: string;
817
+ /** Auto-play on load */
818
+ autoPlay?: boolean;
819
+ /** Loop playback */
820
+ loop?: boolean;
821
+ /** Initial volume (0-1) */
822
+ initialVolume?: number;
823
+ /** Waveform visualization mode */
824
+ waveformMode?: 'frequency' | 'static';
825
+ /** Show timer */
826
+ showTimer?: boolean;
827
+ /** Additional class name */
828
+ className?: string;
829
+ /** Callbacks */
830
+ onPlay?: () => void;
831
+ onPause?: () => void;
832
+ onEnded?: () => void;
833
+ onError?: (error: Error) => void;
834
+ }
835
+
796
836
  interface HybridWaveformProps {
797
837
  /** Visualization mode */
798
838
  mode?: 'frequency' | 'static';
@@ -819,7 +859,8 @@ declare const HybridWaveform: React$1.NamedExoticComponent<HybridWaveformProps>;
819
859
 
820
860
  interface AudioReactiveCoverProps {
821
861
  children: ReactNode;
822
- size?: 'sm' | 'md' | 'lg';
862
+ /** 'sm' | 'md' | 'lg' = fixed sizes; 'full' = stretch to container width (aspect-square) */
863
+ size?: 'sm' | 'md' | 'lg' | 'full';
823
864
  variant?: EffectVariant;
824
865
  intensity?: EffectIntensity;
825
866
  colorScheme?: EffectColorScheme;
@@ -875,6 +916,12 @@ declare const LazyHybridAudioPlayer: React$1.ComponentType<HybridAudioPlayerProp
875
916
  * Automatically shows loading state while WaveSurfer loads (~200KB)
876
917
  */
877
918
  declare const LazyHybridSimplePlayer: React$1.ComponentType<HybridSimplePlayerProps>;
919
+ /**
920
+ * LazyHybridCompactPlayer - Lazy-loaded compact single-row audio player
921
+ *
922
+ * Use in tight spaces: play/pause + waveform + timer in one line.
923
+ */
924
+ declare const LazyHybridCompactPlayer: React$1.ComponentType<HybridCompactPlayerProps>;
878
925
 
879
926
  /**
880
927
  * Video source type definitions
@@ -2251,4 +2298,4 @@ declare function useBlobUrlCleanup(key: string | null): void;
2251
2298
  */
2252
2299
  declare function generateContentKey(content: ArrayBuffer): string;
2253
2300
 
2254
- export { ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, type AudioLevels, AudioReactiveCover, type AudioReactiveCoverProps, BaseInputTemplate, type BlobSource, COLOR_SCHEMES, COLOR_SCHEME_INFO, CardLoadingFallback, CheckboxWidget, ColorWidget, type CreateLazyComponentOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, type DataUrlSource, DayChips, 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 JsonTreeProps, LazyCronScheduler, LazyHybridAudioPlayer, LazyHybridSimplePlayer, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownMessage, type MarkdownMessageProps, type MarkerData, Mermaid, type MermaidProps, MeshEffect, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, OrbsEffect, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, Spinner, SpotlightEffect, StreamProvider, type StreamSource, SwitchWidget, TextWidget, TimeSelector, type UrlSource, type UseAudioVisualizationReturn, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, 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 WeekDay, type YouTubeSource, buildCron, calculateGlowLayers, calculateMeshGradients, calculateOrbs, calculateSpotlight, createLazyComponent, createVideoErrorFallback, formatTime, generateContentKey, getColors, getEffectConfig, getRequiredFields, hasRequiredFields, humanizeCron, isSimpleStreamSource, isValidCron, mergeDefaults, normalizeFormData, parseCron, prepareEffectColors, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useAudioVisualization, useBlobUrlCleanup, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useHybridAudio, useHybridAudioAnalysis, useHybridAudioContext, useHybridAudioControls, useHybridAudioLevels, useHybridAudioState, useHybridWebAudio, useImageCache, useLottie, useMediaCacheStore, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, useVisualization, validateRequiredFields, validateSchema };
2301
+ export { ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, type AudioLevels, AudioReactiveCover, type AudioReactiveCoverProps, BaseInputTemplate, type BlobSource, COLOR_SCHEMES, COLOR_SCHEME_INFO, CardLoadingFallback, CheckboxWidget, ColorWidget, type CreateLazyComponentOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, type DataUrlSource, DayChips, 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, type HybridCompactPlayerProps, 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 JsonTreeProps, LazyCronScheduler, LazyHybridAudioPlayer, LazyHybridCompactPlayer, LazyHybridSimplePlayer, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownMessage, type MarkdownMessageProps, type MarkerData, Mermaid, type MermaidProps, MeshEffect, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, OrbsEffect, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, Spinner, SpotlightEffect, StreamProvider, type StreamSource, SwitchWidget, TextWidget, TimeSelector, type UrlSource, type UseAudioVisualizationReturn, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, 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 WeekDay, type YouTubeSource, buildCron, calculateGlowLayers, calculateMeshGradients, calculateOrbs, calculateSpotlight, createLazyComponent, createVideoErrorFallback, formatTime, generateContentKey, getColors, getEffectConfig, getRequiredFields, hasRequiredFields, humanizeCron, isSimpleStreamSource, isValidCron, mergeDefaults, normalizeFormData, parseCron, prepareEffectColors, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useAudioVisualization, useBlobUrlCleanup, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useHybridAudio, useHybridAudioAnalysis, useHybridAudioContext, useHybridAudioControls, useHybridAudioLevels, useHybridAudioState, useHybridWebAudio, useImageCache, useLottie, useMediaCacheStore, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, useVisualization, validateRequiredFields, validateSchema };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { AudioReactiveCover, COLOR_SCHEMES, COLOR_SCHEME_INFO, EFFECT_ANIMATIONS, GlowEffect, HybridAudioPlayer, HybridAudioProvider, HybridSimplePlayer, HybridWaveform, INTENSITY_CONFIG, INTENSITY_INFO, MeshEffect, OrbsEffect, SpotlightEffect, VARIANT_INFO, VisualizationProvider, calculateGlowLayers, calculateMeshGradients, calculateOrbs, calculateSpotlight, formatTime, getColors, getEffectConfig, prepareEffectColors, useAudioVisualization, useHybridAudio, useHybridAudioAnalysis, useHybridAudioContext, useHybridAudioControls, useHybridAudioLevels, useHybridAudioState, useHybridWebAudio, useVisualization } from './chunk-7HP3GZFT.mjs';
1
+ export { AudioReactiveCover, COLOR_SCHEMES, COLOR_SCHEME_INFO, EFFECT_ANIMATIONS, GlowEffect, HybridAudioPlayer, HybridAudioProvider, HybridSimplePlayer, HybridWaveform, INTENSITY_CONFIG, INTENSITY_INFO, MeshEffect, OrbsEffect, SpotlightEffect, VARIANT_INFO, VisualizationProvider, calculateGlowLayers, calculateMeshGradients, calculateOrbs, calculateSpotlight, formatTime, getColors, getEffectConfig, prepareEffectColors, useAudioVisualization, useHybridAudio, useHybridAudioAnalysis, useHybridAudioContext, useHybridAudioControls, useHybridAudioLevels, useHybridAudioState, useHybridWebAudio, useVisualization } from './chunk-O55KZXKD.mjs';
2
2
  export { NativeProvider, StreamProvider, VideoControls, VideoErrorFallback, VideoPlayer, VideoPlayerProvider, VidstackProvider, createVideoErrorFallback, isSimpleStreamSource, resolveFileSource, resolvePlayerMode, resolveStreamSource, useVideoPlayerContext } from './chunk-QKG4LERV.mjs';
3
3
  import './chunk-JWB2EWQO.mjs';
4
4
  export { ImageViewer } from './chunk-MADKYFI3.mjs';
@@ -767,19 +767,30 @@ function AudioLoadingFallback() {
767
767
  }
768
768
  __name(AudioLoadingFallback, "AudioLoadingFallback");
769
769
  var LazyHybridAudioPlayer = createLazyComponent(
770
- () => import('./components-IPSHDNXP.mjs').then((mod) => ({ default: mod.HybridAudioPlayer })),
770
+ () => import('./components-R4CC6JGG.mjs').then((mod) => ({ default: mod.HybridAudioPlayer })),
771
771
  {
772
772
  displayName: "LazyHybridAudioPlayer",
773
773
  fallback: /* @__PURE__ */ jsx(AudioLoadingFallback, {})
774
774
  }
775
775
  );
776
776
  var LazyHybridSimplePlayer = createLazyComponent(
777
- () => import('./components-IPSHDNXP.mjs').then((mod) => ({ default: mod.HybridSimplePlayer })),
777
+ () => import('./components-R4CC6JGG.mjs').then((mod) => ({ default: mod.HybridSimplePlayer })),
778
778
  {
779
779
  displayName: "LazyHybridSimplePlayer",
780
780
  fallback: /* @__PURE__ */ jsx(AudioLoadingFallback, {})
781
781
  }
782
782
  );
783
+ var LazyHybridCompactPlayer = createLazyComponent(
784
+ () => import('./components-R4CC6JGG.mjs').then((mod) => ({ default: mod.HybridCompactPlayer })),
785
+ {
786
+ displayName: "LazyHybridCompactPlayer",
787
+ fallback: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 h-8 px-1 animate-pulse", children: [
788
+ /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-md bg-muted flex-shrink-0" }),
789
+ /* @__PURE__ */ jsx("div", { className: "flex-1 h-4 rounded bg-muted" }),
790
+ /* @__PURE__ */ jsx("div", { className: "h-3 w-12 rounded bg-muted flex-shrink-0" })
791
+ ] })
792
+ }
793
+ );
783
794
  function VideoLoadingFallback() {
784
795
  return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center bg-black/90 rounded-lg aspect-video", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
785
796
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
@@ -869,6 +880,6 @@ function CronSchedulerFallback() {
869
880
  }
870
881
  __name(CronSchedulerFallback, "CronSchedulerFallback");
871
882
 
872
- export { CardLoadingFallback, CronScheduler, LazyCronScheduler, LazyHybridAudioPlayer, LazyHybridSimplePlayer, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyVideoPlayer, LazyWrapper, LoadingFallback, LottiePlayer, MapLoadingFallback, MarkdownMessage, Mermaid_default as Mermaid, OpenapiViewer_default as OpenapiViewer, Spinner, createLazyComponent, useCollapsibleContent };
883
+ export { CardLoadingFallback, CronScheduler, LazyCronScheduler, LazyHybridAudioPlayer, LazyHybridCompactPlayer, LazyHybridSimplePlayer, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyVideoPlayer, LazyWrapper, LoadingFallback, LottiePlayer, MapLoadingFallback, MarkdownMessage, Mermaid_default as Mermaid, OpenapiViewer_default as OpenapiViewer, Spinner, createLazyComponent, useCollapsibleContent };
873
884
  //# sourceMappingURL=index.mjs.map
874
885
  //# sourceMappingURL=index.mjs.map