@lobehub/ui 5.2.1 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  4. package/es/Alert/Alert.d.mts +2 -2
  5. package/es/AutoComplete/Select.d.mts +2 -2
  6. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  7. package/es/Burger/Burger.d.mts +2 -2
  8. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  9. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  10. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  11. package/es/Collapse/Collapse.d.mts +2 -2
  12. package/es/ConfigProvider/index.d.mts +2 -2
  13. package/es/CopyButton/CopyButton.d.mts +2 -2
  14. package/es/DatePicker/DatePicker.d.mts +2 -2
  15. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  16. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  17. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  19. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  20. package/es/Drawer/Drawer.d.mts +2 -2
  21. package/es/Dropdown/Dropdown.d.mts +2 -2
  22. package/es/EditableText/EditableText.d.mts +2 -2
  23. package/es/EditorSlashMenu/atoms.d.mts +13 -13
  24. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  25. package/es/Flex/FlexBasic.d.mts +2 -2
  26. package/es/FontLoader/index.d.mts +2 -2
  27. package/es/Footer/Footer.d.mts +2 -2
  28. package/es/Form/components/FormGroup.d.mts +2 -2
  29. package/es/Form/components/FormItem.d.mts +2 -2
  30. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  31. package/es/FormModal/FormModal.d.mts +2 -2
  32. package/es/Freeze/Freeze.d.mts +2 -2
  33. package/es/GuideCard/GuideCard.d.mts +2 -2
  34. package/es/Header/Header.d.mts +2 -2
  35. package/es/Highlighter/Highlighter.d.mts +2 -2
  36. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  37. package/es/Hotkey/Hotkey.d.mts +2 -2
  38. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  39. package/es/Icon/Icon.d.mts +2 -2
  40. package/es/Icon/components/IconProvider.d.mts +3 -3
  41. package/es/Image/Image.mjs +2 -2
  42. package/es/Image/Image.mjs.map +1 -1
  43. package/es/Image/PreviewGroup.d.mts +2 -2
  44. package/es/Image/components/Toolbar.mjs +116 -36
  45. package/es/Image/components/Toolbar.mjs.map +1 -1
  46. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  47. package/es/Input/Input.d.mts +2 -2
  48. package/es/Input/InputNumber.d.mts +2 -2
  49. package/es/Input/InputOPT.d.mts +2 -2
  50. package/es/Input/InputPassword.d.mts +2 -2
  51. package/es/Input/TextArea.d.mts +2 -2
  52. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  53. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  54. package/es/Layout/components/LayoutMain.d.mts +2 -2
  55. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  56. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  57. package/es/Layout/components/LayoutToc.d.mts +2 -2
  58. package/es/List/ListItem/index.d.mts +2 -2
  59. package/es/Markdown/Markdown.d.mts +2 -2
  60. package/es/Markdown/Typography.d.mts +2 -2
  61. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  62. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  63. package/es/Menu/Menu.d.mts +2 -2
  64. package/es/Modal/Modal.d.mts +2 -2
  65. package/es/Modal/ModalProvider.d.mts +2 -2
  66. package/es/Modal/imperative.d.mts +2 -2
  67. package/es/MotionProvider/index.d.mts +2 -2
  68. package/es/Popover/ArrowIcon.d.mts +2 -2
  69. package/es/Popover/atoms.d.mts +9 -9
  70. package/es/Popover/context.d.mts +2 -2
  71. package/es/SearchBar/SearchBar.d.mts +2 -2
  72. package/es/Segmented/Segmented.d.mts +2 -2
  73. package/es/Select/Select.d.mts +2 -2
  74. package/es/SideNav/SideNav.d.mts +2 -2
  75. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  76. package/es/SortableList/components/DragHandle.d.mts +2 -2
  77. package/es/SortableList/components/SortableItem.d.mts +2 -2
  78. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  79. package/es/Toc/Toc.d.mts +2 -2
  80. package/es/Tooltip/TooltipGroup.mjs +4 -3
  81. package/es/Tooltip/TooltipGroup.mjs.map +1 -1
  82. package/es/Tooltip/TooltipStandalone.mjs +18 -5
  83. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  84. package/es/Tooltip/type.d.mts +7 -0
  85. package/es/Tooltip/useMergedTooltipProps.mjs +4 -1
  86. package/es/Tooltip/useMergedTooltipProps.mjs.map +1 -1
  87. package/es/Video/index.d.mts +2 -2
  88. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  89. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  90. package/es/awesome/Features/Features.d.mts +2 -2
  91. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  92. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  93. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  94. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  95. package/es/awesome/Hero/Hero.d.mts +2 -2
  96. package/es/awesome/Spline/Spine.d.mts +2 -2
  97. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  98. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  99. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  100. package/es/base-ui/ContextMenu/ContextMenuHost.mjs +2 -0
  101. package/es/base-ui/ContextMenu/ContextMenuHost.mjs.map +1 -1
  102. package/es/base-ui/ContextMenu/renderItems.mjs.map +1 -1
  103. package/es/base-ui/DropdownMenu/DropdownMenu.d.mts +2 -2
  104. package/es/base-ui/DropdownMenu/atoms.d.mts +18 -18
  105. package/es/base-ui/Modal/atoms.d.mts +12 -12
  106. package/es/base-ui/Modal/context.d.mts +2 -2
  107. package/es/base-ui/Modal/imperative.d.mts +2 -2
  108. package/es/base-ui/ScrollArea/atoms.d.mts +7 -7
  109. package/es/base-ui/Select/Select.d.mts +2 -2
  110. package/es/base-ui/Select/atoms.d.mts +19 -19
  111. package/es/base-ui/Toast/imperative.d.mts +2 -2
  112. package/es/brand/LobeChat/index.d.mts +2 -2
  113. package/es/brand/LobeHub/index.d.mts +2 -2
  114. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  115. package/es/brand/LogoThree/index.d.mts +2 -2
  116. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  117. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  118. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  119. package/es/chat/ChatList/ChatList.d.mts +2 -2
  120. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  121. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  122. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  123. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  124. package/es/color/ColorScales/index.d.mts +2 -2
  125. package/es/color/CssVar/index.d.mts +2 -2
  126. package/es/i18n/context.d.mts +2 -2
  127. package/es/i18n/resources/en/image.d.mts +18 -0
  128. package/es/i18n/resources/en/image.mjs +19 -0
  129. package/es/i18n/resources/en/image.mjs.map +1 -0
  130. package/es/i18n/resources/en/index.d.mts +4 -3
  131. package/es/i18n/resources/en/index.mjs +2 -0
  132. package/es/i18n/resources/en/index.mjs.map +1 -1
  133. package/es/i18n/resources/zhCn/image.d.mts +18 -0
  134. package/es/i18n/resources/zhCn/image.mjs +19 -0
  135. package/es/i18n/resources/zhCn/image.mjs.map +1 -0
  136. package/es/i18n/resources/zhCn/index.d.mts +4 -3
  137. package/es/i18n/resources/zhCn/index.mjs +2 -0
  138. package/es/i18n/resources/zhCn/index.mjs.map +1 -1
  139. package/es/i18n/types.d.mts +4 -3
  140. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  141. package/es/icons/lucideExtra/CreateBotIcon.d.mts +2 -2
  142. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
  144. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  145. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  146. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  147. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  148. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  149. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  150. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  151. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  152. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  153. package/es/icons/lucideExtra/SkillsIcon.d.mts +3 -3
  154. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  155. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  156. package/es/mdx/Mdx/index.d.mts +2 -2
  157. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  158. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  159. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  160. package/es/storybook/StoryBook/index.d.mts +2 -2
  161. package/es/utils/blobToPng.mjs +41 -0
  162. package/es/utils/blobToPng.mjs.map +1 -0
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Image.mjs","names":["Image","usePreview","Flexbox","AntImage"],"sources":["../../src/Image/Image.tsx"],"sourcesContent":["'use client';\n\nimport { Image as AntImage, Skeleton } from 'antd';\nimport { cssVar, cx, useThemeMode } from 'antd-style';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\n\nimport usePreview from './components/usePreview';\nimport { FALLBACK_DARK, FALLBACK_LIGHT, styles, variants } from './style';\nimport type { ImageProps } from './type';\n\nconst Image = memo<ImageProps>(\n ({\n ref,\n style,\n preview,\n isLoading,\n maxHeight = '100%',\n maxWidth = '100%',\n minHeight,\n minWidth,\n actions,\n className,\n alwaysShowActions,\n variant = 'filled',\n objectFit = 'cover',\n classNames,\n styles: customStyles,\n onClick,\n width,\n height,\n ...rest\n }) => {\n const { isDarkMode } = useThemeMode();\n const actionsClassName = alwaysShowActions ? styles.actionsVisible : styles.actionsHidden;\n const mergePreivew = usePreview(preview);\n\n if (isLoading)\n return (\n <div onClick={onClick}>\n <Skeleton.Avatar\n active\n style={{\n borderRadius: cssVar.borderRadius,\n height,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n width,\n }}\n />\n </div>\n );\n\n return (\n <Flexbox className={cx(variants({ variant }), className)} ref={ref} style={style}>\n {actions && (\n <div className={cx(actionsClassName, alwaysShowActions ? '' : 'actions-hidden')}>\n {actions}\n </div>\n )}\n <AntImage\n className={cx(styles.image, classNames?.image)}\n fallback={isDarkMode ? FALLBACK_DARK : FALLBACK_LIGHT}\n height={height}\n loading={'lazy'}\n preview={preview === false ? false : (mergePreivew as any)}\n width={width}\n classNames={{\n root: cx(styles.wrapper, classNames?.wrapper),\n }}\n style={{\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n objectFit: objectFit || 'cover',\n ...customStyles?.image,\n }}\n styles={{\n root: customStyles?.wrapper,\n }}\n onClick={onClick}\n {...rest}\n />\n </Flexbox>\n );\n },\n);\n\nImage.displayName = 'Image';\n\nexport default Image;\n"],"mappings":";;;;;;;;;;;AAYA,MAAMA,UAAQ,MACX,EACC,KACA,OACA,SACA,WACA,YAAY,QACZ,WAAW,QACX,WACA,UACA,SACA,WACA,mBACA,UAAU,UACV,YAAY,SACZ,YACA,QAAQ,cACR,SACA,OACA,QACA,GAAG,WACC;CACJ,MAAM,EAAE,eAAe,cAAc;CACrC,MAAM,mBAAmB,oBAAoB,OAAO,iBAAiB,OAAO;CAC5E,MAAM,eAAeC,mBAAW,QAAQ;AAExC,KAAI,UACF,QACE,oBAAC;EAAa;YACZ,oBAAC,SAAS;GACR;GACA,OAAO;IACL,cAAc,OAAO;IACrB;IACA;IACA;IACA;IACA;IACA;IACD;IACD;GACE;AAGV,QACE,qBAACC;EAAQ,WAAW,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,UAAU;EAAO;EAAY;aACxE,WACC,oBAAC;GAAI,WAAW,GAAG,kBAAkB,oBAAoB,KAAK,iBAAiB;aAC5E;IACG,EAER,oBAACC;GACC,WAAW,GAAG,OAAO,OAAO,YAAY,MAAM;GAC9C,UAAU,aAAa,gBAAgB;GAC/B;GACR,SAAS;GACT,SAAS,YAAY,QAAQ,QAAS;GAC/B;GACP,YAAY,EACV,MAAM,GAAG,OAAO,SAAS,YAAY,QAAQ,EAC9C;GACD,OAAO;IACL;IACA;IACA;IACA;IACA,WAAW,aAAa;IACxB,GAAG,cAAc;IAClB;GACD,QAAQ,EACN,MAAM,cAAc,SACrB;GACQ;GACT,GAAI;IACJ;GACM;EAGf;AAED,QAAM,cAAc;AAEpB,oBAAeH"}
1
+ {"version":3,"file":"Image.mjs","names":["Image","usePreview","Flexbox","AntImage"],"sources":["../../src/Image/Image.tsx"],"sourcesContent":["'use client';\n\nimport { Image as AntImage, Skeleton } from 'antd';\nimport { cssVar, cx, useThemeMode } from 'antd-style';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\n\nimport usePreview from './components/usePreview';\nimport { FALLBACK_DARK, FALLBACK_LIGHT, styles, variants } from './style';\nimport type { ImageProps } from './type';\n\nconst Image = memo<ImageProps>(\n ({\n ref,\n style,\n preview,\n isLoading,\n maxHeight = '100%',\n maxWidth = '100%',\n minHeight,\n minWidth,\n actions,\n className,\n alwaysShowActions,\n variant = 'filled',\n objectFit = 'cover',\n classNames,\n styles: customStyles,\n onClick,\n width,\n height,\n ...rest\n }) => {\n const { isDarkMode } = useThemeMode();\n const actionsClassName = alwaysShowActions ? styles.actionsVisible : styles.actionsHidden;\n const mergePreview = usePreview(preview);\n\n if (isLoading)\n return (\n <div onClick={onClick}>\n <Skeleton.Avatar\n active\n style={{\n borderRadius: cssVar.borderRadius,\n height,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n width,\n }}\n />\n </div>\n );\n\n return (\n <Flexbox className={cx(variants({ variant }), className)} ref={ref} style={style}>\n {actions && (\n <div className={cx(actionsClassName, alwaysShowActions ? '' : 'actions-hidden')}>\n {actions}\n </div>\n )}\n <AntImage\n className={cx(styles.image, classNames?.image)}\n fallback={isDarkMode ? FALLBACK_DARK : FALLBACK_LIGHT}\n height={height}\n loading={'lazy'}\n preview={preview === false ? false : (mergePreview as any)}\n width={width}\n classNames={{\n root: cx(styles.wrapper, classNames?.wrapper),\n }}\n style={{\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n objectFit: objectFit || 'cover',\n ...customStyles?.image,\n }}\n styles={{\n root: customStyles?.wrapper,\n }}\n onClick={onClick}\n {...rest}\n />\n </Flexbox>\n );\n },\n);\n\nImage.displayName = 'Image';\n\nexport default Image;\n"],"mappings":";;;;;;;;;;;AAYA,MAAMA,UAAQ,MACX,EACC,KACA,OACA,SACA,WACA,YAAY,QACZ,WAAW,QACX,WACA,UACA,SACA,WACA,mBACA,UAAU,UACV,YAAY,SACZ,YACA,QAAQ,cACR,SACA,OACA,QACA,GAAG,WACC;CACJ,MAAM,EAAE,eAAe,cAAc;CACrC,MAAM,mBAAmB,oBAAoB,OAAO,iBAAiB,OAAO;CAC5E,MAAM,eAAeC,mBAAW,QAAQ;AAExC,KAAI,UACF,QACE,oBAAC;EAAa;YACZ,oBAAC,SAAS;GACR;GACA,OAAO;IACL,cAAc,OAAO;IACrB;IACA;IACA;IACA;IACA;IACA;IACD;IACD;GACE;AAGV,QACE,qBAACC;EAAQ,WAAW,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,UAAU;EAAO;EAAY;aACxE,WACC,oBAAC;GAAI,WAAW,GAAG,kBAAkB,oBAAoB,KAAK,iBAAiB;aAC5E;IACG,EAER,oBAACC;GACC,WAAW,GAAG,OAAO,OAAO,YAAY,MAAM;GAC9C,UAAU,aAAa,gBAAgB;GAC/B;GACR,SAAS;GACT,SAAS,YAAY,QAAQ,QAAS;GAC/B;GACP,YAAY,EACV,MAAM,GAAG,OAAO,SAAS,YAAY,QAAQ,EAC9C;GACD,OAAO;IACL;IACA;IACA;IACA;IACA,WAAW,aAAa;IACxB,GAAG,cAAc;IAClB;GACD,QAAQ,EACN,MAAM,cAAc,SACrB;GACQ;GACT,GAAI;IACJ;GACM;EAGf;AAED,QAAM,cAAc;AAEpB,oBAAeH"}
@@ -1,8 +1,8 @@
1
1
  import { PreviewGroupProps } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react69 from "react";
3
3
 
4
4
  //#region src/Image/PreviewGroup.d.ts
5
- declare const PreviewGroup: react15.NamedExoticComponent<PreviewGroupProps>;
5
+ declare const PreviewGroup: react69.NamedExoticComponent<PreviewGroupProps>;
6
6
  //#endregion
7
7
  export { PreviewGroup };
8
8
  //# sourceMappingURL=PreviewGroup.d.mts.map
@@ -1,46 +1,126 @@
1
1
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
2
+ import TooltipGroup_default from "../../Tooltip/TooltipGroup.mjs";
2
3
  import ActionIcon_default from "../../ActionIcon/ActionIcon.mjs";
4
+ import { useTranslation } from "../../i18n/useTranslation.mjs";
5
+ import { downloadBlob } from "../../utils/downloadBlob.mjs";
3
6
  import { styles } from "../style.mjs";
4
- import { memo } from "react";
7
+ import image_default from "../../i18n/resources/en/image.mjs";
8
+ import { getClipboardBlob } from "../../utils/blobToPng.mjs";
9
+ import { memo, useCallback, useState } from "react";
5
10
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { FlipHorizontal, FlipVertical, RotateCcw, RotateCw, ZoomIn, ZoomOut } from "lucide-react";
11
+ import { message } from "antd";
12
+ import { Copy, Download, FlipHorizontal, FlipVertical, RotateCcw, RotateCw, ZoomIn, ZoomOut } from "lucide-react";
7
13
 
8
14
  //#region src/Image/components/Toolbar.tsx
15
+ const getFileNameFromUrl = (url) => {
16
+ try {
17
+ const match = new URL(url).pathname.match(/\/([^/]+)$/);
18
+ return match ? decodeURIComponent(match[1]) : "image";
19
+ } catch {
20
+ return "image";
21
+ }
22
+ };
23
+ const getExtensionFromMimeType = (mimeType) => {
24
+ return {
25
+ "image/svg+xml": "svg",
26
+ "image/png": "png",
27
+ "image/jpeg": "jpg",
28
+ "image/jpg": "jpg",
29
+ "image/webp": "webp",
30
+ "image/gif": "gif"
31
+ }[mimeType?.toLowerCase()] || mimeType?.split("/")[1]?.split("+")[0] || "png";
32
+ };
9
33
  const Toolbar = memo(({ children, info, minScale, maxScale }) => {
10
- const { transform: { scale }, actions: { onFlipY, onFlipX, onRotateLeft, onRotateRight, onZoomOut, onZoomIn } } = info;
11
- return /* @__PURE__ */ jsxs(FlexBasic_default, {
12
- horizontal: true,
13
- className: styles.toolbar,
14
- gap: 4,
15
- children: [
16
- /* @__PURE__ */ jsx(ActionIcon_default, {
17
- icon: FlipHorizontal,
18
- onClick: onFlipX
19
- }),
20
- /* @__PURE__ */ jsx(ActionIcon_default, {
21
- icon: FlipVertical,
22
- onClick: onFlipY
23
- }),
24
- /* @__PURE__ */ jsx(ActionIcon_default, {
25
- icon: RotateCcw,
26
- onClick: onRotateLeft
27
- }),
28
- /* @__PURE__ */ jsx(ActionIcon_default, {
29
- icon: RotateCw,
30
- onClick: onRotateRight
31
- }),
32
- /* @__PURE__ */ jsx(ActionIcon_default, {
33
- disabled: scale === minScale,
34
- icon: ZoomOut,
35
- onClick: onZoomOut
36
- }),
37
- /* @__PURE__ */ jsx(ActionIcon_default, {
38
- disabled: scale === maxScale,
39
- icon: ZoomIn,
40
- onClick: onZoomIn
41
- }),
42
- children
43
- ]
34
+ const { t } = useTranslation(image_default);
35
+ const [containerEl, setContainerEl] = useState(null);
36
+ const [copyLoading, setCopyLoading] = useState(false);
37
+ const [downloadLoading, setDownloadLoading] = useState(false);
38
+ const { transform: { scale }, actions: { onFlipY, onFlipX, onRotateLeft, onRotateRight, onZoomOut, onZoomIn }, image: { url } } = info;
39
+ const handleDownload = useCallback(async () => {
40
+ setDownloadLoading(true);
41
+ try {
42
+ const blob = await (await fetch(url, { mode: "cors" })).blob();
43
+ const blobUrl = URL.createObjectURL(blob);
44
+ let fileName = getFileNameFromUrl(url);
45
+ const ext = getExtensionFromMimeType(blob.type);
46
+ if (!fileName.includes(".")) fileName = `${fileName}.${ext}`;
47
+ else if (fileName.endsWith(".svg+xml")) fileName = fileName.replace(/\.svg\+xml$/i, ".svg");
48
+ await downloadBlob(blobUrl, fileName);
49
+ URL.revokeObjectURL(blobUrl);
50
+ message.success(t("image.downloadSuccess"));
51
+ } catch {
52
+ message.error(t("image.downloadFailed"));
53
+ } finally {
54
+ setDownloadLoading(false);
55
+ }
56
+ }, [url, t]);
57
+ const handleCopy = useCallback(async () => {
58
+ setCopyLoading(true);
59
+ try {
60
+ const clipboardBlob = await getClipboardBlob(await (await fetch(url, { mode: "cors" })).blob());
61
+ await navigator.clipboard.write([new ClipboardItem(clipboardBlob)]);
62
+ message.success(t("image.copySuccess"));
63
+ } catch {
64
+ message.error(t("image.copyFailed"));
65
+ } finally {
66
+ setCopyLoading(false);
67
+ }
68
+ }, [url, t]);
69
+ return /* @__PURE__ */ jsx(TooltipGroup_default, {
70
+ popupContainer: containerEl ?? void 0,
71
+ children: /* @__PURE__ */ jsxs(FlexBasic_default, {
72
+ horizontal: true,
73
+ className: styles.toolbar,
74
+ gap: 4,
75
+ ref: setContainerEl,
76
+ children: [
77
+ /* @__PURE__ */ jsx(ActionIcon_default, {
78
+ icon: FlipHorizontal,
79
+ title: t("image.flipHorizontal"),
80
+ onClick: onFlipX
81
+ }),
82
+ /* @__PURE__ */ jsx(ActionIcon_default, {
83
+ icon: FlipVertical,
84
+ title: t("image.flipVertical"),
85
+ onClick: onFlipY
86
+ }),
87
+ /* @__PURE__ */ jsx(ActionIcon_default, {
88
+ icon: RotateCcw,
89
+ title: t("image.rotateLeft"),
90
+ onClick: onRotateLeft
91
+ }),
92
+ /* @__PURE__ */ jsx(ActionIcon_default, {
93
+ icon: RotateCw,
94
+ title: t("image.rotateRight"),
95
+ onClick: onRotateRight
96
+ }),
97
+ /* @__PURE__ */ jsx(ActionIcon_default, {
98
+ disabled: scale === minScale,
99
+ icon: ZoomOut,
100
+ title: t("image.zoomOut"),
101
+ onClick: onZoomOut
102
+ }),
103
+ /* @__PURE__ */ jsx(ActionIcon_default, {
104
+ disabled: scale === maxScale,
105
+ icon: ZoomIn,
106
+ title: t("image.zoomIn"),
107
+ onClick: onZoomIn
108
+ }),
109
+ /* @__PURE__ */ jsx(ActionIcon_default, {
110
+ icon: Copy,
111
+ loading: copyLoading,
112
+ title: t("image.copy"),
113
+ onClick: handleCopy
114
+ }),
115
+ /* @__PURE__ */ jsx(ActionIcon_default, {
116
+ icon: Download,
117
+ loading: downloadLoading,
118
+ title: t("image.download"),
119
+ onClick: handleDownload
120
+ }),
121
+ children
122
+ ]
123
+ })
44
124
  });
45
125
  });
46
126
  var Toolbar_default = Toolbar;
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.mjs","names":["Flexbox","ActionIcon"],"sources":["../../../src/Image/components/Toolbar.tsx"],"sourcesContent":["import { FlipHorizontal, FlipVertical, RotateCcw, RotateCw, ZoomIn, ZoomOut } from 'lucide-react';\nimport { type ToolbarRenderInfoType } from 'rc-image/lib/Preview';\nimport { memo, type ReactNode } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\n\nimport { styles } from '../style';\n\nexport interface ToolbarProps {\n children?: ReactNode;\n info: Omit<ToolbarRenderInfoType, 'current' | 'total'>;\n maxScale: number;\n minScale: number;\n}\n\nconst Toolbar = memo<ToolbarProps>(({ children, info, minScale, maxScale }) => {\n const {\n transform: { scale },\n actions: { onFlipY, onFlipX, onRotateLeft, onRotateRight, onZoomOut, onZoomIn },\n } = info;\n\n return (\n <Flexbox horizontal className={styles.toolbar} gap={4}>\n <ActionIcon icon={FlipHorizontal} onClick={onFlipX} />\n <ActionIcon icon={FlipVertical} onClick={onFlipY} />\n <ActionIcon icon={RotateCcw} onClick={onRotateLeft} />\n <ActionIcon icon={RotateCw} onClick={onRotateRight} />\n <ActionIcon disabled={scale === minScale} icon={ZoomOut} onClick={onZoomOut} />\n <ActionIcon disabled={scale === maxScale} icon={ZoomIn} onClick={onZoomIn} />\n {children}\n </Flexbox>\n );\n});\n\nexport default Toolbar;\n"],"mappings":";;;;;;;;AAgBA,MAAM,UAAU,MAAoB,EAAE,UAAU,MAAM,UAAU,eAAe;CAC7E,MAAM,EACJ,WAAW,EAAE,SACb,SAAS,EAAE,SAAS,SAAS,cAAc,eAAe,WAAW,eACnE;AAEJ,QACE,qBAACA;EAAQ;EAAW,WAAW,OAAO;EAAS,KAAK;;GAClD,oBAACC;IAAW,MAAM;IAAgB,SAAS;KAAW;GACtD,oBAACA;IAAW,MAAM;IAAc,SAAS;KAAW;GACpD,oBAACA;IAAW,MAAM;IAAW,SAAS;KAAgB;GACtD,oBAACA;IAAW,MAAM;IAAU,SAAS;KAAiB;GACtD,oBAACA;IAAW,UAAU,UAAU;IAAU,MAAM;IAAS,SAAS;KAAa;GAC/E,oBAACA;IAAW,UAAU,UAAU;IAAU,MAAM;IAAQ,SAAS;KAAY;GAC5E;;GACO;EAEZ;AAEF,sBAAe"}
1
+ {"version":3,"file":"Toolbar.mjs","names":["imageMessages","TooltipGroup","Flexbox","ActionIcon"],"sources":["../../../src/Image/components/Toolbar.tsx"],"sourcesContent":["import { message } from 'antd';\nimport {\n Copy,\n Download,\n FlipHorizontal,\n FlipVertical,\n RotateCcw,\n RotateCw,\n ZoomIn,\n ZoomOut,\n} from 'lucide-react';\nimport { type ToolbarRenderInfoType } from 'rc-image/lib/Preview';\nimport { memo, type ReactNode, useCallback, useState } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport imageMessages from '@/i18n/resources/en/image';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport { TooltipGroup } from '@/Tooltip';\nimport { getClipboardBlob } from '@/utils/blobToPng';\nimport { downloadBlob } from '@/utils/downloadBlob';\n\nimport { styles } from '../style';\n\nconst getFileNameFromUrl = (url: string): string => {\n try {\n const pathname = new URL(url).pathname;\n const match = pathname.match(/\\/([^/]+)$/);\n return match ? decodeURIComponent(match[1]) : 'image';\n } catch {\n return 'image';\n }\n};\n\nconst getExtensionFromMimeType = (mimeType: string): string => {\n const map: Record<string, string> = {\n 'image/svg+xml': 'svg',\n 'image/png': 'png',\n 'image/jpeg': 'jpg',\n 'image/jpg': 'jpg',\n 'image/webp': 'webp',\n 'image/gif': 'gif',\n };\n return map[mimeType?.toLowerCase()] || mimeType?.split('/')[1]?.split('+')[0] || 'png';\n};\n\nexport interface ToolbarProps {\n children?: ReactNode;\n info: Omit<ToolbarRenderInfoType, 'current' | 'total'>;\n maxScale: number;\n minScale: number;\n}\n\nconst Toolbar = memo<ToolbarProps>(({ children, info, minScale, maxScale }) => {\n const { t } = useTranslation(imageMessages);\n const [containerEl, setContainerEl] = useState<HTMLElement | null>(null);\n const [copyLoading, setCopyLoading] = useState(false);\n const [downloadLoading, setDownloadLoading] = useState(false);\n const {\n transform: { scale },\n actions: { onFlipY, onFlipX, onRotateLeft, onRotateRight, onZoomOut, onZoomIn },\n image: { url },\n } = info;\n\n const handleDownload = useCallback(async () => {\n setDownloadLoading(true);\n try {\n const response = await fetch(url, { mode: 'cors' });\n const blob = await response.blob();\n const blobUrl = URL.createObjectURL(blob);\n let fileName = getFileNameFromUrl(url);\n const ext = getExtensionFromMimeType(blob.type);\n if (!fileName.includes('.')) {\n fileName = `${fileName}.${ext}`;\n } else if (fileName.endsWith('.svg+xml')) {\n fileName = fileName.replace(/\\.svg\\+xml$/i, '.svg');\n }\n await downloadBlob(blobUrl, fileName);\n URL.revokeObjectURL(blobUrl);\n message.success(t('image.downloadSuccess'));\n } catch {\n message.error(t('image.downloadFailed'));\n } finally {\n setDownloadLoading(false);\n }\n }, [url, t]);\n\n const handleCopy = useCallback(async () => {\n setCopyLoading(true);\n try {\n const response = await fetch(url, { mode: 'cors' });\n const blob = await response.blob();\n const clipboardBlob = await getClipboardBlob(blob);\n await navigator.clipboard.write([new ClipboardItem(clipboardBlob)]);\n message.success(t('image.copySuccess'));\n } catch {\n message.error(t('image.copyFailed'));\n } finally {\n setCopyLoading(false);\n }\n }, [url, t]);\n\n return (\n <TooltipGroup popupContainer={containerEl ?? undefined}>\n <Flexbox horizontal className={styles.toolbar} gap={4} ref={setContainerEl}>\n <ActionIcon icon={FlipHorizontal} title={t('image.flipHorizontal')} onClick={onFlipX} />\n <ActionIcon icon={FlipVertical} title={t('image.flipVertical')} onClick={onFlipY} />\n <ActionIcon icon={RotateCcw} title={t('image.rotateLeft')} onClick={onRotateLeft} />\n <ActionIcon icon={RotateCw} title={t('image.rotateRight')} onClick={onRotateRight} />\n <ActionIcon\n disabled={scale === minScale}\n icon={ZoomOut}\n title={t('image.zoomOut')}\n onClick={onZoomOut}\n />\n <ActionIcon\n disabled={scale === maxScale}\n icon={ZoomIn}\n title={t('image.zoomIn')}\n onClick={onZoomIn}\n />\n <ActionIcon\n icon={Copy}\n loading={copyLoading}\n title={t('image.copy')}\n onClick={handleCopy}\n />\n <ActionIcon\n icon={Download}\n loading={downloadLoading}\n title={t('image.download')}\n onClick={handleDownload}\n />\n {children}\n </Flexbox>\n </TooltipGroup>\n );\n});\n\nexport default Toolbar;\n"],"mappings":"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"}
@@ -1,8 +1,8 @@
1
1
  import { ImageSelectProps } from "./type.mjs";
2
- import * as react117 from "react";
2
+ import * as react81 from "react";
3
3
 
4
4
  //#region src/ImageSelect/ImageSelect.d.ts
5
- declare const ImageSelect: react117.NamedExoticComponent<ImageSelectProps>;
5
+ declare const ImageSelect: react81.NamedExoticComponent<ImageSelectProps>;
6
6
  //#endregion
7
7
  export { ImageSelect };
8
8
  //# sourceMappingURL=ImageSelect.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputProps } from "./type.mjs";
2
- import * as react145 from "react";
2
+ import * as react121 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react145.NamedExoticComponent<InputProps>;
5
+ declare const Input: react121.NamedExoticComponent<InputProps>;
6
6
  //#endregion
7
7
  export { Input };
8
8
  //# sourceMappingURL=Input.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputNumberProps } from "./type.mjs";
2
- import * as react144 from "react";
2
+ import * as react123 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react144.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react123.NamedExoticComponent<InputNumberProps>;
6
6
  //#endregion
7
7
  export { InputNumber };
8
8
  //# sourceMappingURL=InputNumber.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputOPTProps } from "./type.mjs";
2
- import * as react147 from "react";
2
+ import * as react124 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react147.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react124.NamedExoticComponent<InputOPTProps>;
6
6
  //#endregion
7
7
  export { InputOPT };
8
8
  //# sourceMappingURL=InputOPT.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputPasswordProps } from "./type.mjs";
2
- import * as react148 from "react";
2
+ import * as react125 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react148.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react125.NamedExoticComponent<InputPasswordProps>;
6
6
  //#endregion
7
7
  export { InputPassword };
8
8
  //# sourceMappingURL=InputPassword.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { TextAreaProps } from "./type.mjs";
2
- import * as react146 from "react";
2
+ import * as react126 from "react";
3
3
 
4
4
  //#region src/Input/TextArea.d.ts
5
- declare const TextArea: react146.NamedExoticComponent<TextAreaProps>;
5
+ declare const TextArea: react126.NamedExoticComponent<TextAreaProps>;
6
6
  //#endregion
7
7
  export { TextArea };
8
8
  //# sourceMappingURL=TextArea.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react23 from "react";
3
+ import * as react62 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react23.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react62.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutFooter };
9
9
  //# sourceMappingURL=LayoutFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutHeaderProps } from "../type.mjs";
2
- import * as react24 from "react";
2
+ import * as react64 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react24.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react64.NamedExoticComponent<LayoutHeaderProps>;
6
6
  //#endregion
7
7
  export { LayoutHeader };
8
8
  //# sourceMappingURL=LayoutHeader.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react25 from "react";
3
+ import * as react63 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react25.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react63.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutMain };
9
9
  //# sourceMappingURL=LayoutMain.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarProps } from "../type.mjs";
2
- import * as react26 from "react";
2
+ import * as react66 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react26.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react66.NamedExoticComponent<LayoutSidebarProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebar };
8
8
  //# sourceMappingURL=LayoutSidebar.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarInnerProps } from "../type.mjs";
2
- import * as react27 from "react";
2
+ import * as react65 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react27.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react65.NamedExoticComponent<LayoutSidebarInnerProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebarInner };
8
8
  //# sourceMappingURL=LayoutSidebarInner.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutTocProps } from "../type.mjs";
2
- import * as react28 from "react";
2
+ import * as react67 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react28.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react67.NamedExoticComponent<LayoutTocProps>;
6
6
  //#endregion
7
7
  export { LayoutToc };
8
8
  //# sourceMappingURL=LayoutToc.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ListItemProps } from "../type.mjs";
2
- import * as react31 from "react";
2
+ import * as react68 from "react";
3
3
 
4
4
  //#region src/List/ListItem/index.d.ts
5
- declare const ListItem: react31.NamedExoticComponent<ListItemProps>;
5
+ declare const ListItem: react68.NamedExoticComponent<ListItemProps>;
6
6
  //#endregion
7
7
  export { ListItem };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MarkdownProps } from "./type.mjs";
2
- import * as react21 from "react";
2
+ import * as react58 from "react";
3
3
 
4
4
  //#region src/Markdown/Markdown.d.ts
5
- declare const Markdown: react21.NamedExoticComponent<MarkdownProps>;
5
+ declare const Markdown: react58.NamedExoticComponent<MarkdownProps>;
6
6
  //#endregion
7
7
  export { Markdown };
8
8
  //# sourceMappingURL=Markdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { TypographyProps } from "./type.mjs";
2
- import * as react20 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/Markdown/Typography.d.ts
5
- declare const Typography: react20.NamedExoticComponent<TypographyProps>;
5
+ declare const Typography: react57.NamedExoticComponent<TypographyProps>;
6
6
  //#endregion
7
7
  export { Typography };
8
8
  //# sourceMappingURL=Typography.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { FlexboxProps } from "../../../Flex/type.mjs";
2
2
  import "../../../Flex/index.mjs";
3
- import * as react66 from "react";
3
+ import * as react30 from "react";
4
4
  import { Ref } from "react";
5
5
 
6
6
  //#region src/Markdown/components/SearchResultCards/index.d.ts
@@ -14,7 +14,7 @@ interface SearchResultCardsProps extends FlexboxProps {
14
14
  dataSource: string[] | SearchResultItem[];
15
15
  ref?: Ref<HTMLDivElement>;
16
16
  }
17
- declare const SearchResultCards: react66.NamedExoticComponent<SearchResultCardsProps>;
17
+ declare const SearchResultCards: react30.NamedExoticComponent<SearchResultCardsProps>;
18
18
  //#endregion
19
19
  export { SearchResultCards, SearchResultCardsProps };
20
20
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MaskShadowProps } from "./type.mjs";
2
- import * as react79 from "react";
2
+ import * as react56 from "react";
3
3
 
4
4
  //#region src/MaskShadow/MaskShadow.d.ts
5
- declare const MaskShadow: react79.NamedExoticComponent<MaskShadowProps>;
5
+ declare const MaskShadow: react56.NamedExoticComponent<MaskShadowProps>;
6
6
  //#endregion
7
7
  export { MaskShadow };
8
8
  //# sourceMappingURL=MaskShadow.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MenuProps } from "./type.mjs";
2
- import * as react1 from "react";
2
+ import * as react61 from "react";
3
3
 
4
4
  //#region src/Menu/Menu.d.ts
5
- declare const Menu: react1.NamedExoticComponent<MenuProps<unknown>>;
5
+ declare const Menu: react61.NamedExoticComponent<MenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { Menu };
8
8
  //# sourceMappingURL=Menu.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ModalProps } from "./type.mjs";
2
- import * as react52 from "react";
2
+ import * as react49 from "react";
3
3
 
4
4
  //#region src/Modal/Modal.d.ts
5
- declare const Modal: react52.NamedExoticComponent<ModalProps>;
5
+ declare const Modal: react49.NamedExoticComponent<ModalProps>;
6
6
  //#endregion
7
7
  export { Modal };
8
8
  //# sourceMappingURL=Modal.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { ModalContextValue } from "./type.mjs";
2
- import * as react53 from "react";
2
+ import * as react50 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/Modal/ModalProvider.d.ts
6
- declare const ModalProvider: react53.NamedExoticComponent<{
6
+ declare const ModalProvider: react50.NamedExoticComponent<{
7
7
  children: ReactNode;
8
8
  value: ModalContextValue;
9
9
  }>;
@@ -1,5 +1,5 @@
1
1
  import { ImperativeModalProps, ModalInstance, RawModalComponent, RawModalComponentProps, RawModalInstance, RawModalKeyOptions, RawModalOptions } from "./type.mjs";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/Modal/imperative.d.ts
5
5
  type ModalHostProps = {
@@ -7,7 +7,7 @@ type ModalHostProps = {
7
7
  };
8
8
  declare const ModalHost: ({
9
9
  root
10
- }: ModalHostProps) => react_jsx_runtime0.JSX.Element | null;
10
+ }: ModalHostProps) => react_jsx_runtime11.JSX.Element | null;
11
11
  declare const createModal: (props: ImperativeModalProps) => ModalInstance;
12
12
  declare function createRawModal<P extends RawModalComponentProps>(component: RawModalComponent<P>, props: Omit<P, 'open' | 'onClose'>, options?: RawModalOptions): RawModalInstance<P>;
13
13
  declare function createRawModal<P, OpenKey extends keyof P, CloseKey extends keyof P>(component: RawModalComponent<P>, props: Omit<P, OpenKey | CloseKey>, options: RawModalKeyOptions<OpenKey, CloseKey>): RawModalInstance<P, OpenKey, CloseKey>;
@@ -1,4 +1,4 @@
1
- import * as react67 from "react";
1
+ import * as react31 from "react";
2
2
  import { Context, ReactNode } from "react";
3
3
  import * as motion_react0 from "motion/react";
4
4
  import * as m from "motion/react-m";
@@ -6,7 +6,7 @@ import * as m from "motion/react-m";
6
6
  //#region src/MotionProvider/index.d.ts
7
7
  type MotionComponentType = typeof motion_react0.motion | typeof m;
8
8
  declare const MotionComponent: Context<MotionComponentType>;
9
- declare const MotionProvider: react67.NamedExoticComponent<{
9
+ declare const MotionProvider: react31.NamedExoticComponent<{
10
10
  children: ReactNode;
11
11
  motion: MotionComponentType;
12
12
  }>;
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/Popover/ArrowIcon.d.ts
4
- declare const PopoverArrowIcon: react_jsx_runtime1.JSX.Element;
4
+ declare const PopoverArrowIcon: react_jsx_runtime12.JSX.Element;
5
5
  //#endregion
6
6
  export { PopoverArrowIcon };
7
7
  //# sourceMappingURL=ArrowIcon.d.mts.map
@@ -1,13 +1,13 @@
1
1
  import { PopoverPlacement } from "./type.mjs";
2
- import * as react55 from "react";
2
+ import * as react54 from "react";
3
3
  import { ComponentProps, ComponentPropsWithRef } from "react";
4
- import * as react_jsx_runtime2 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
5
5
  import * as _base_ui_react_popover0 from "@base-ui/react/popover";
6
6
  import { Popover } from "@base-ui/react/popover";
7
7
 
8
8
  //#region src/Popover/atoms.d.ts
9
9
  declare const PopoverRoot: typeof Popover.Root;
10
- declare const PopoverBackdrop: react55.ForwardRefExoticComponent<_base_ui_react_popover0.PopoverBackdropProps & react55.RefAttributes<HTMLDivElement>>;
10
+ declare const PopoverBackdrop: react54.ForwardRefExoticComponent<_base_ui_react_popover0.PopoverBackdropProps & react54.RefAttributes<HTMLDivElement>>;
11
11
  type PopoverTriggerElementProps = Omit<ComponentPropsWithRef<typeof Popover.Trigger>, 'children' | 'render'> & {
12
12
  children: ComponentProps<typeof Popover.Trigger>['children'];
13
13
  };
@@ -18,7 +18,7 @@ declare const PopoverTriggerElement: {
18
18
  nativeButton,
19
19
  ref: refProp,
20
20
  ...rest
21
- }: PopoverTriggerElementProps): react_jsx_runtime2.JSX.Element;
21
+ }: PopoverTriggerElementProps): react_jsx_runtime13.JSX.Element;
22
22
  displayName: string;
23
23
  };
24
24
  type PopoverPortalAtomProps = Omit<ComponentProps<typeof Popover.Portal>, 'container'> & {
@@ -37,7 +37,7 @@ declare const PopoverPortal: {
37
37
  root,
38
38
  children,
39
39
  ...rest
40
- }: PopoverPortalAtomProps): react_jsx_runtime2.JSX.Element | null;
40
+ }: PopoverPortalAtomProps): react_jsx_runtime13.JSX.Element | null;
41
41
  displayName: string;
42
42
  };
43
43
  type PopoverPositionerAtomProps = ComponentProps<typeof Popover.Positioner> & {
@@ -54,7 +54,7 @@ declare const PopoverPositioner: {
54
54
  side,
55
55
  sideOffset,
56
56
  ...rest
57
- }: PopoverPositionerAtomProps): react_jsx_runtime2.JSX.Element;
57
+ }: PopoverPositionerAtomProps): react_jsx_runtime13.JSX.Element;
58
58
  displayName: string;
59
59
  };
60
60
  type PopoverPopupAtomProps = ComponentProps<typeof Popover.Popup>;
@@ -62,7 +62,7 @@ declare const PopoverPopup: {
62
62
  ({
63
63
  className,
64
64
  ...rest
65
- }: PopoverPopupAtomProps): react_jsx_runtime2.JSX.Element;
65
+ }: PopoverPopupAtomProps): react_jsx_runtime13.JSX.Element;
66
66
  displayName: string;
67
67
  };
68
68
  type PopoverArrowAtomProps = ComponentProps<typeof Popover.Arrow>;
@@ -71,7 +71,7 @@ declare const PopoverArrow: {
71
71
  className,
72
72
  children,
73
73
  ...rest
74
- }: PopoverArrowAtomProps): react_jsx_runtime2.JSX.Element;
74
+ }: PopoverArrowAtomProps): react_jsx_runtime13.JSX.Element;
75
75
  displayName: string;
76
76
  };
77
77
  type PopoverViewportAtomProps = ComponentProps<typeof Popover.Viewport>;
@@ -79,7 +79,7 @@ declare const PopoverViewport: {
79
79
  ({
80
80
  className,
81
81
  ...rest
82
- }: PopoverViewportAtomProps): react_jsx_runtime2.JSX.Element;
82
+ }: PopoverViewportAtomProps): react_jsx_runtime13.JSX.Element;
83
83
  displayName: string;
84
84
  };
85
85
  //#endregion
@@ -1,11 +1,11 @@
1
- import * as react57 from "react";
1
+ import * as react52 from "react";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region src/Popover/context.d.ts
5
5
  type PopoverContextValue = {
6
6
  close: () => void;
7
7
  };
8
- declare const PopoverProvider: react57.NamedExoticComponent<{
8
+ declare const PopoverProvider: react52.NamedExoticComponent<{
9
9
  children: ReactNode;
10
10
  value: PopoverContextValue;
11
11
  }>;
@@ -1,8 +1,8 @@
1
1
  import { SearchBarProps } from "./type.mjs";
2
- import * as react69 from "react";
2
+ import * as react47 from "react";
3
3
 
4
4
  //#region src/SearchBar/SearchBar.d.ts
5
- declare const SearchBar: react69.NamedExoticComponent<SearchBarProps>;
5
+ declare const SearchBar: react47.NamedExoticComponent<SearchBarProps>;
6
6
  //#endregion
7
7
  export { SearchBar };
8
8
  //# sourceMappingURL=SearchBar.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SegmentedProps } from "./type.mjs";
2
- import * as react49 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/Segmented/Segmented.d.ts
5
- declare const Segmented: react49.NamedExoticComponent<SegmentedProps>;
5
+ declare const Segmented: react46.NamedExoticComponent<SegmentedProps>;
6
6
  //#endregion
7
7
  export { Segmented };
8
8
  //# sourceMappingURL=Segmented.d.mts.map