@embeddr/react-ui 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +164 -164
- package/README.md +2 -7
- package/dist/context/EmbeddrContext.d.ts +8 -0
- package/dist/context/EmbeddrContext.d.ts.map +1 -0
- package/dist/context/EmbeddrContext.js +14 -0
- package/dist/context/EmbeddrContext.js.map +1 -0
- package/dist/context/ImageDialogContext.d.ts +1 -2
- package/dist/context/ImageDialogContext.d.ts.map +1 -1
- package/dist/context/ImageDialogContext.js +3 -14
- package/dist/context/ImageDialogContext.js.map +1 -1
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +3 -0
- package/dist/context/index.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useExternalNav.d.ts +1 -1
- package/dist/hooks/useExternalNav.d.ts.map +1 -1
- package/dist/hooks/useExternalNav.js +8 -11
- package/dist/hooks/useExternalNav.js.map +1 -1
- package/dist/hooks/useImageDialog.d.ts +1 -1
- package/dist/hooks/useImageDialog.d.ts.map +1 -1
- package/dist/hooks/useImageDialog.js +10 -0
- package/dist/hooks/useImageDialog.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +2 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +37 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/index.d.ts +6 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -125
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +5 -8
- package/dist/lib/utils.js.map +1 -1
- package/dist/providers/{ExternalNav.d.ts → ExternalNavProvider.d.ts} +1 -1
- package/dist/providers/ExternalNavProvider.d.ts.map +1 -0
- package/dist/providers/ExternalNavProvider.js +26 -0
- package/dist/providers/ExternalNavProvider.js.map +1 -0
- package/dist/providers/ImageDialogProvider.d.ts.map +1 -1
- package/dist/providers/ImageDialogProvider.js +157 -132
- package/dist/providers/ImageDialogProvider.js.map +1 -1
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +3 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/types/domain.d.ts +73 -0
- package/dist/types/domain.d.ts.map +1 -0
- package/dist/types/domain.js +2 -0
- package/dist/types/domain.js.map +1 -0
- package/dist/types/gallery.d.ts +1 -0
- package/dist/types/gallery.d.ts.map +1 -1
- package/dist/types/gallery.js +2 -0
- package/dist/types/gallery.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/plugin.d.ts +94 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/ui/accordion.js +15 -62
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +8 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.js +12 -49
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -3
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +20 -37
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/breadcrumb.js +29 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +4 -4
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +33 -53
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.js +19 -96
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/checkbox.js +10 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/context-menu.d.ts +28 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +27 -128
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/draggable-panel.d.ts +47 -0
- package/dist/ui/draggable-panel.d.ts.map +1 -0
- package/dist/ui/draggable-panel.js +178 -0
- package/dist/ui/draggable-panel.js.map +1 -0
- package/dist/ui/dropdown-menu.js +37 -220
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/index.d.ts +31 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +31 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-group.d.ts +6 -6
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +49 -138
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input.js +7 -22
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.js +8 -23
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/lightbox/ComparisonSlider.d.ts +7 -0
- package/dist/ui/lightbox/ComparisonSlider.d.ts.map +1 -0
- package/dist/ui/lightbox/ComparisonSlider.js +62 -0
- package/dist/ui/lightbox/ComparisonSlider.js.map +1 -0
- package/dist/ui/lightbox/GalleryPicker.js +15 -61
- package/dist/ui/lightbox/GalleryPicker.js.map +1 -1
- package/dist/ui/lightbox/ImageThumbnailStrip.d.ts.map +1 -1
- package/dist/ui/lightbox/ImageThumbnailStrip.js +24 -94
- package/dist/ui/lightbox/ImageThumbnailStrip.js.map +1 -1
- package/dist/ui/lightbox/LightboxViewer.d.ts.map +1 -1
- package/dist/ui/lightbox/LightboxViewer.js +50 -112
- package/dist/ui/lightbox/LightboxViewer.js.map +1 -1
- package/dist/ui/lightbox/MediaCanvas.d.ts +13 -0
- package/dist/ui/lightbox/MediaCanvas.d.ts.map +1 -0
- package/dist/ui/lightbox/MediaCanvas.js +18 -0
- package/dist/ui/lightbox/MediaCanvas.js.map +1 -0
- package/dist/ui/lightbox/PannableImage.d.ts +3 -2
- package/dist/ui/lightbox/PannableImage.d.ts.map +1 -1
- package/dist/ui/lightbox/PannableImage.js +327 -222
- package/dist/ui/lightbox/PannableImage.js.map +1 -1
- package/dist/ui/lightbox/PannableVideo.d.ts +9 -0
- package/dist/ui/lightbox/PannableVideo.d.ts.map +1 -0
- package/dist/ui/lightbox/PannableVideo.js +183 -0
- package/dist/ui/lightbox/PannableVideo.js.map +1 -0
- package/dist/ui/lightbox/index.d.ts +8 -0
- package/dist/ui/lightbox/index.d.ts.map +1 -0
- package/dist/ui/lightbox/index.js +8 -0
- package/dist/ui/lightbox/index.js.map +1 -0
- package/dist/ui/menubar.js +55 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/progress.js +8 -32
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/resizable.js +13 -47
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/scroll-area.js +11 -65
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/select.js +29 -172
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.js +8 -27
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/skeleton.js +6 -17
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.js +13 -63
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.d.ts.map +1 -1
- package/dist/ui/sonner.js +24 -40
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +7 -20
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/switch.js +8 -32
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.js +29 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.js +15 -68
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/textarea.js +7 -19
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/tooltip.js +14 -53
- package/dist/ui/tooltip.js.map +1 -1
- package/package.json +29 -12
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -528
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -403
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -209
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -131
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +0 -10
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7__mszl4mxerbyoklygdzmmz7z344/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7__mszl4mxerbyoklygdzmmz7z344/node_modules/@radix-ui/react-arrow/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -30
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.js +0 -54
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.7__@types__3rf2o2lqjhudzepmewjxnjpij4/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.7__@types__3rf2o2lqjhudzepmewjxnjpij4/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.js +0 -14
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7_khjb2df42vo4osw72fyixnkybq/node_modules/@radix-ui/react-popper/dist/index.js +0 -220
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7_khjb2df42vo4osw72fyixnkybq/node_modules/@radix-ui/react-popper/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7_wazm3ifinqzsamvsqllqreat3m/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2.7_wazm3ifinqzsamvsqllqreat3m/node_modules/@radix-ui/react-portal/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2_g7nvzcflnhogkdp32witcuayfy/node_modules/@radix-ui/react-presence/dist/index.js +0 -71
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2_g7nvzcflnhogkdp32witcuayfy/node_modules/@radix-ui/react-presence/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19._vrijsupjqixawruberrfb56pbm/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19._vrijsupjqixawruberrfb56pbm/node_modules/@radix-ui/react-primitive/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19._4sfldbbhvd3xapj4euqmtg5wga/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19._4sfldbbhvd3xapj4euqmtg5wga/node_modules/@radix-ui/react-primitive/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2._lz7pdiyrbpqbbsap76pucwgg5i/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -339
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.7__@types_react@19.2._lz7pdiyrbpqbbsap76pucwgg5i/node_modules/@radix-ui/react-tooltip/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -53
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -15
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.js +0 -28
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.7__@types_rea_xyyq4kaffb3s2ucmc374detnx4/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -33
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.7__@types_rea_xyyq4kaffb3s2ucmc374detnx4/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.4_@types_react-dom@19.2.3_@types_react@19.2.7__@types_rea_uxirz2wej36zwyzefmreqngy74/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -31
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.4_@types_react-dom@19.2.3_@types_react@19.2.7__@types_rea_uxirz2wej36zwyzefmreqngy74/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +0 -36
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -18
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js +0 -36
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -22
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -15
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-check.js +0 -10
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-check.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/grip-vertical.js +0 -14
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/grip-vertical.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/info.js +0 -11
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/info.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/loader-circle.js +0 -7
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/loader-circle.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/octagon-x.js +0 -17
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/octagon-x.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/pause.js +0 -10
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/pause.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/play.js +0 -15
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/play.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +0 -10
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/rotate-cw.js +0 -10
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/rotate-cw.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +0 -17
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/triangle-alert.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js +0 -10
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js.map +0 -1
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -19
- package/dist/node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2766
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/providers/ExternalNav.d.ts.map +0 -1
- package/dist/providers/ExternalNav.js +0 -55
- package/dist/providers/ExternalNav.js.map +0 -1
- package/dist/providers/ImageDialog.d.ts +0 -2
- package/dist/providers/ImageDialog.d.ts.map +0 -1
|
@@ -1,114 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isOpen: n,
|
|
18
|
-
actions: x = [],
|
|
19
|
-
isLoading: N,
|
|
20
|
-
onClose: d,
|
|
21
|
-
showGalleryPicker: k = !1,
|
|
22
|
-
showThumbnailStrip: p = !1
|
|
23
|
-
}) => {
|
|
24
|
-
const [o, b] = h(!1), [a, w] = h(!1), c = y(null);
|
|
25
|
-
v(() => (o && (c.current = setInterval(() => {
|
|
26
|
-
l(s + 1);
|
|
27
|
-
}, 2500)), () => {
|
|
28
|
-
c.current && clearInterval(c.current);
|
|
29
|
-
}), [o, s, l]), v(() => {
|
|
30
|
-
n || b(!1);
|
|
31
|
-
}, [n]);
|
|
32
|
-
const z = async (t) => {
|
|
33
|
-
r && await l(t);
|
|
34
|
-
}, u = r?.images[s], P = u ? x.filter((t) => !t.isVisible || t.isVisible(u)).map((t) => ({
|
|
35
|
-
icon: t.icon,
|
|
36
|
-
label: t.label,
|
|
37
|
-
onClick: () => t.onClick(u)
|
|
38
|
-
})) : [], j = p ? a ? 180 : 80 : 16;
|
|
39
|
-
return /* @__PURE__ */ i("div", { className: "flex flex-col w-full h-full relative min-h-max flex-1 focus:outline-none", children: [
|
|
40
|
-
k && /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-20 pointer-events-none", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: /* @__PURE__ */ e(
|
|
41
|
-
S,
|
|
42
|
-
{
|
|
43
|
-
currentGalleryId: r?.id,
|
|
44
|
-
onGalleryChange: g
|
|
45
|
-
}
|
|
46
|
-
) }) }),
|
|
47
|
-
/* @__PURE__ */ i("div", { className: "absolute top-2 right-10 z-30 pointer-events-auto flex gap-2", children: [
|
|
48
|
-
/* @__PURE__ */ i(
|
|
49
|
-
f,
|
|
50
|
-
{
|
|
51
|
-
size: "sm",
|
|
52
|
-
variant: "outline",
|
|
53
|
-
disabled: !0,
|
|
54
|
-
className: "px-4 flex items-center justify-center text-sm font-medium text-muted-foreground backdrop-blur-sm",
|
|
55
|
-
children: [
|
|
56
|
-
s + 1,
|
|
57
|
-
" /",
|
|
58
|
-
" ",
|
|
59
|
-
r?.totalImages || r?.images.length || 0
|
|
60
|
-
]
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Loader2, Pause, Play, X } from "lucide-react";
|
|
4
|
+
import { Button } from "../button";
|
|
5
|
+
import { PannableImage } from "./PannableImage";
|
|
6
|
+
import { ImageThumbnailStrip } from "./ImageThumbnailStrip";
|
|
7
|
+
import { GalleryPicker } from "./GalleryPicker";
|
|
8
|
+
export const LightboxViewer = ({ imageSrc, gallery, imageIndex, onGalleryChange, onImageChange, isOpen, actions = [], isLoading, onClose, showGalleryPicker = false, showThumbnailStrip = false, }) => {
|
|
9
|
+
const [isPlaying, setIsPlaying] = useState(false);
|
|
10
|
+
const [isStripOpen, setIsStripOpen] = useState(false);
|
|
11
|
+
const timerRef = useRef(null);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (isPlaying) {
|
|
14
|
+
timerRef.current = setInterval(() => {
|
|
15
|
+
onImageChange(imageIndex + 1);
|
|
16
|
+
}, 2500);
|
|
61
17
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"aria-label": "Close dialog",
|
|
96
|
-
children: /* @__PURE__ */ e(L, { className: " text-muted-foreground group-hover:text-foreground transition-colors" })
|
|
97
|
-
}
|
|
98
|
-
),
|
|
99
|
-
p && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 z-20 select-none focus-visible:outline-none focus:ring-0 focus:ring-transparent", children: r && /* @__PURE__ */ e(
|
|
100
|
-
C,
|
|
101
|
-
{
|
|
102
|
-
gallery: r,
|
|
103
|
-
currentIndex: s,
|
|
104
|
-
onImageChange: z,
|
|
105
|
-
isOpen: a,
|
|
106
|
-
onToggle: () => w(!a)
|
|
107
|
-
}
|
|
108
|
-
) })
|
|
109
|
-
] });
|
|
110
|
-
};
|
|
111
|
-
export {
|
|
112
|
-
J as LightboxViewer
|
|
18
|
+
return () => {
|
|
19
|
+
if (timerRef.current)
|
|
20
|
+
clearInterval(timerRef.current);
|
|
21
|
+
};
|
|
22
|
+
}, [isPlaying, imageIndex, onImageChange]);
|
|
23
|
+
// Stop playing if dialog closes
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!isOpen)
|
|
26
|
+
setIsPlaying(false);
|
|
27
|
+
}, [isOpen]);
|
|
28
|
+
const handleImageChange = async (index) => {
|
|
29
|
+
if (!gallery)
|
|
30
|
+
return;
|
|
31
|
+
await onImageChange(index);
|
|
32
|
+
};
|
|
33
|
+
// Prepare actions for PannableImage
|
|
34
|
+
const currentImage = gallery?.images[imageIndex];
|
|
35
|
+
const pannableActions = currentImage
|
|
36
|
+
? actions
|
|
37
|
+
.filter((action) => !action.isVisible || action.isVisible(currentImage))
|
|
38
|
+
.map((action) => ({
|
|
39
|
+
icon: action.icon,
|
|
40
|
+
label: action.label,
|
|
41
|
+
onClick: () => action.onClick(currentImage),
|
|
42
|
+
}))
|
|
43
|
+
: [];
|
|
44
|
+
// Calculate bottom offset for controls based on strip state
|
|
45
|
+
const controlsBottomOffset = showThumbnailStrip
|
|
46
|
+
? isStripOpen
|
|
47
|
+
? 180 // Strip open height + padding
|
|
48
|
+
: 80 // Strip closed height + padding
|
|
49
|
+
: 16; // Default padding
|
|
50
|
+
return (_jsxs("div", { className: "flex flex-col w-full h-full relative min-h-max flex-1 focus:outline-none", children: [showGalleryPicker && (_jsx("div", { className: "absolute top-0 left-0 right-0 z-20 pointer-events-none", children: _jsx("div", { className: "pointer-events-auto", children: _jsx(GalleryPicker, { currentGalleryId: gallery?.id, onGalleryChange: onGalleryChange }) }) })), _jsxs("div", { className: "absolute top-2 right-10 z-30 pointer-events-auto flex gap-2", children: [_jsxs(Button, { size: "sm", variant: "outline", disabled: true, className: "px-4 flex items-center justify-center text-sm font-medium text-muted-foreground backdrop-blur-sm", children: [imageIndex + 1, " /", " ", gallery?.totalImages || gallery?.images.length || 0] }), _jsx(Button, { variant: "outline", size: "icon-sm", onClick: () => setIsPlaying(!isPlaying), className: " rounded-none bg-background/90 hover:bg-secondary/20 text-muted-foreground hover:text-foreground border-b border-l border-border backdrop-blur-sm", title: isPlaying ? "Pause slideshow" : "Start slideshow", children: isPlaying ? (_jsx(Pause, { className: "h-4 w-4" })) : (_jsx(Play, { className: "h-4 w-4" })) })] }), _jsxs("div", { className: "flex-1 flex items-center justify-center relative w-full h-full min-h-full", children: [isLoading && (_jsx("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-black/20 backdrop-blur-[1px]", children: _jsx(Loader2, { className: "w-10 h-10 text-white animate-spin" }) })), imageSrc && (_jsx(PannableImage, { src: imageSrc, mediaType: currentImage?.media_type === "video" ? "video" : "image", className: "w-full h-full", isOpen: isOpen, actions: pannableActions, controlsBottomOffset: controlsBottomOffset }))] }), onClose && (_jsx(Button, { variant: "outline", size: "icon-sm", onClick: onClose, className: "cursor-pointer hover:bg-secondary/20 fixed top-2 right-1.5 z-50 flex items-center justify-center group", "aria-label": "Close dialog", children: _jsx(X, { className: " text-muted-foreground group-hover:text-foreground transition-colors" }) })), showThumbnailStrip && (_jsx("div", { className: "absolute bottom-0 left-0 right-0 z-20 select-none focus-visible:outline-none focus:ring-0 focus:ring-transparent", children: gallery && (_jsx(ImageThumbnailStrip, { gallery: gallery, currentIndex: imageIndex, onImageChange: handleImageChange, isOpen: isStripOpen, onToggle: () => setIsStripOpen(!isStripOpen) })) }))] }));
|
|
113
51
|
};
|
|
114
|
-
//# sourceMappingURL=LightboxViewer.js.map
|
|
52
|
+
//# sourceMappingURL=LightboxViewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightboxViewer.js","sources":["../../../src/ui/lightbox/LightboxViewer.tsx"],"
|
|
1
|
+
{"version":3,"file":"LightboxViewer.js","sourceRoot":"","sources":["../../../src/ui/lightbox/LightboxViewer.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PannableImageAction } from "./PannableImage";
|
|
3
|
+
export interface MediaCanvasProps {
|
|
4
|
+
mode: "single" | "compare";
|
|
5
|
+
primaryImage: string;
|
|
6
|
+
secondaryImage?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
pannableActions?: Array<PannableImageAction>;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
mediaType?: "image" | "video";
|
|
11
|
+
}
|
|
12
|
+
export declare function MediaCanvas({ mode, primaryImage, secondaryImage, className, pannableActions, children, mediaType, }: MediaCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=MediaCanvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCanvas.d.ts","sourceRoot":"","sources":["../../../src/ui/lightbox/MediaCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC7C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC/B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,QAAQ,EACR,SAAS,GACV,EAAE,gBAAgB,2CAuClB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
import { PannableImage } from "./PannableImage";
|
|
5
|
+
import { PannableVideo } from "./PannableVideo";
|
|
6
|
+
import { ComparisonSlider } from "./ComparisonSlider";
|
|
7
|
+
export function MediaCanvas({ mode, primaryImage, secondaryImage, className, pannableActions, children, mediaType, }) {
|
|
8
|
+
const isVideo = (src) => {
|
|
9
|
+
if (mediaType === "video")
|
|
10
|
+
return true;
|
|
11
|
+
if (mediaType === "image")
|
|
12
|
+
return false;
|
|
13
|
+
return src && /\.(mp4|webm|mov|mkv)$/i.test(src);
|
|
14
|
+
};
|
|
15
|
+
return (_jsxs("div", { className: cn("w-full h-full relative overflow-hidden bg-muted/20", className), children: [mode === "single" &&
|
|
16
|
+
(isVideo(primaryImage) ? (_jsx(PannableVideo, { src: primaryImage, className: "w-full h-full", isOpen: true })) : (_jsx(PannableImage, { src: primaryImage, className: "w-full h-full", isOpen: true, actions: pannableActions }))), mode === "compare" && secondaryImage && (_jsx(ComparisonSlider, { before: secondaryImage, after: primaryImage, className: "w-full h-full" })), children] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=MediaCanvas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCanvas.js","sourceRoot":"","sources":["../../../src/ui/lightbox/MediaCanvas.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAG,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAatD,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,QAAQ,EACR,SAAS,GACQ;IACjB,MAAM,OAAO,GAAG,CAAC,GAAY,EAAE,EAAE;QAC/B,IAAI,SAAS,KAAK,OAAO;YAAE,OAAO,IAAI,CAAC;QACvC,IAAI,SAAS,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC;QACxC,OAAO,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC,CAAC;IAEF,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,oDAAoD,EACpD,SAAS,CACV,aAEA,IAAI,KAAK,QAAQ;gBAChB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CACvB,KAAC,aAAa,IACZ,GAAG,EAAE,YAAY,EACjB,SAAS,EAAC,eAAe,EACzB,MAAM,EAAE,IAAI,GACZ,CACH,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,IACZ,GAAG,EAAE,YAAY,EACjB,SAAS,EAAC,eAAe,EACzB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,eAAe,GACxB,CACH,CAAC,EACH,IAAI,KAAK,SAAS,IAAI,cAAc,IAAI,CACvC,KAAC,gBAAgB,IACf,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,YAAY,EACnB,SAAS,EAAC,eAAe,GACzB,CACH,EACA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
interface PannableImageAction {
|
|
2
|
+
export interface PannableImageAction {
|
|
3
3
|
icon: ReactNode;
|
|
4
4
|
label: string;
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
}
|
|
7
7
|
interface PannableImageProps {
|
|
8
8
|
src: string;
|
|
9
|
+
mediaType?: "image" | "video";
|
|
9
10
|
className?: string;
|
|
10
11
|
isOpen?: boolean;
|
|
11
12
|
actions?: Array<PannableImageAction>;
|
|
12
13
|
controlsBottomOffset?: number;
|
|
13
14
|
}
|
|
14
|
-
export declare const PannableImage: ({ src, className, isOpen, actions, controlsBottomOffset, }: PannableImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const PannableImage: ({ src, mediaType, className, isOpen, actions, controlsBottomOffset, }: PannableImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=PannableImage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PannableImage.d.ts","sourceRoot":"","sources":["../../../src/ui/lightbox/PannableImage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PannableImage.d.ts","sourceRoot":"","sources":["../../../src/ui/lightbox/PannableImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,aAAa,GAAI,uEAO3B,kBAAkB,4CAudpB,CAAC"}
|