@lobehub/ui 4.17.1 → 4.18.1

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 (167) 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 +8 -0
  9. package/es/CodeDiff/CodeDiff.mjs +122 -0
  10. package/es/CodeDiff/CodeDiff.mjs.map +1 -0
  11. package/es/CodeDiff/PatchDiff.d.mts +8 -0
  12. package/es/CodeDiff/PatchDiff.mjs +101 -0
  13. package/es/CodeDiff/PatchDiff.mjs.map +1 -0
  14. package/es/CodeDiff/index.d.mts +4 -0
  15. package/es/CodeDiff/index.d.ts +1 -0
  16. package/es/CodeDiff/index.js +1 -0
  17. package/es/CodeDiff/index.mjs +4 -0
  18. package/es/CodeDiff/style.mjs +122 -0
  19. package/es/CodeDiff/style.mjs.map +1 -0
  20. package/es/CodeDiff/type.d.mts +123 -0
  21. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  22. package/es/Collapse/Collapse.d.mts +2 -2
  23. package/es/ConfigProvider/index.d.mts +2 -2
  24. package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
  25. package/es/CopyButton/CopyButton.d.mts +2 -2
  26. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  27. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  28. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  29. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  30. package/es/Drawer/Drawer.d.mts +2 -2
  31. package/es/Dropdown/Dropdown.d.mts +2 -2
  32. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  33. package/es/DropdownMenu/DropdownMenu.mjs +13 -42
  34. package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
  35. package/es/DropdownMenu/atoms.d.mts +145 -0
  36. package/es/DropdownMenu/atoms.mjs +163 -0
  37. package/es/DropdownMenu/atoms.mjs.map +1 -0
  38. package/es/DropdownMenu/index.d.mts +3 -1
  39. package/es/DropdownMenu/index.mjs +3 -1
  40. package/es/DropdownMenu/renderItems.d.mts +10 -0
  41. package/es/DropdownMenu/renderItems.mjs +22 -47
  42. package/es/DropdownMenu/renderItems.mjs.map +1 -1
  43. package/es/EditableText/EditableText.d.mts +2 -2
  44. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  45. package/es/Flex/FlexBasic.d.mts +2 -2
  46. package/es/FontLoader/index.d.mts +2 -2
  47. package/es/Footer/Footer.d.mts +2 -2
  48. package/es/Form/components/FormGroup.d.mts +2 -2
  49. package/es/Form/components/FormItem.d.mts +2 -2
  50. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  51. package/es/FormModal/FormModal.d.mts +2 -2
  52. package/es/GuideCard/GuideCard.d.mts +2 -2
  53. package/es/Header/Header.d.mts +2 -2
  54. package/es/Highlighter/Highlighter.d.mts +2 -2
  55. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  56. package/es/Hotkey/Hotkey.d.mts +2 -2
  57. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  58. package/es/Icon/components/IconProvider.d.mts +3 -3
  59. package/es/Image/PreviewGroup.d.mts +2 -2
  60. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  61. package/es/Input/Input.d.mts +2 -2
  62. package/es/Input/InputNumber.d.mts +2 -2
  63. package/es/Input/InputOPT.d.mts +2 -2
  64. package/es/Input/InputPassword.d.mts +2 -2
  65. package/es/Input/TextArea.d.mts +2 -2
  66. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  67. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  68. package/es/Layout/components/LayoutMain.d.mts +2 -2
  69. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  70. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  71. package/es/Layout/components/LayoutToc.d.mts +2 -2
  72. package/es/List/ListItem/index.d.mts +2 -2
  73. package/es/Markdown/Markdown.d.mts +2 -2
  74. package/es/Markdown/Typography.d.mts +2 -2
  75. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  76. package/es/Markdown/type.d.mts +1 -2
  77. package/es/Menu/Menu.d.mts +2 -2
  78. package/es/Menu/sharedStyle.mjs +1 -1
  79. package/es/Menu/sharedStyle.mjs.map +1 -1
  80. package/es/Mermaid/Mermaid.d.mts +2 -2
  81. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  82. package/es/Mermaid/type.d.mts +1 -1
  83. package/es/Modal/Modal.d.mts +2 -2
  84. package/es/Modal/ModalProvider.d.mts +2 -2
  85. package/es/Modal/imperative.d.mts +2 -2
  86. package/es/MotionProvider/index.d.mts +2 -2
  87. package/es/Popover/ArrowIcon.d.mts +7 -0
  88. package/es/Popover/PopoverGroup.mjs +14 -15
  89. package/es/Popover/PopoverGroup.mjs.map +1 -1
  90. package/es/Popover/PopoverPortal.d.mts +6 -0
  91. package/es/Popover/PopoverPortal.mjs +1 -1
  92. package/es/Popover/PopoverStandalone.mjs +20 -49
  93. package/es/Popover/PopoverStandalone.mjs.map +1 -1
  94. package/es/Popover/atoms.d.mts +77 -0
  95. package/es/Popover/atoms.mjs +104 -0
  96. package/es/Popover/atoms.mjs.map +1 -0
  97. package/es/Popover/context.d.mts +2 -2
  98. package/es/Popover/groupContext.d.mts +1 -0
  99. package/es/Popover/groupContext.mjs.map +1 -1
  100. package/es/Popover/index.d.mts +5 -2
  101. package/es/Popover/index.mjs +4 -1
  102. package/es/SearchBar/SearchBar.d.mts +2 -2
  103. package/es/Segmented/Segmented.d.mts +2 -2
  104. package/es/Select/Select.d.mts +2 -2
  105. package/es/SideNav/SideNav.d.mts +2 -2
  106. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  107. package/es/SortableList/components/DragHandle.d.mts +2 -2
  108. package/es/SortableList/components/SortableItem.d.mts +2 -2
  109. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  110. package/es/Toc/Toc.d.mts +2 -2
  111. package/es/Tooltip/groupContext.mjs.map +1 -1
  112. package/es/Video/index.d.mts +2 -2
  113. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  114. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  115. package/es/awesome/Features/Features.d.mts +2 -2
  116. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  117. package/es/awesome/Giscus/type.d.mts +4 -4
  118. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  119. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  120. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  121. package/es/awesome/Hero/Hero.d.mts +2 -2
  122. package/es/awesome/Spline/Spine.d.mts +2 -2
  123. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  124. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  125. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  126. package/es/brand/LobeChat/index.d.mts +2 -2
  127. package/es/brand/LobeHub/index.d.mts +2 -2
  128. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  129. package/es/brand/LogoThree/index.d.mts +2 -2
  130. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  131. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  132. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  133. package/es/chat/ChatList/ChatList.d.mts +2 -2
  134. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  135. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  136. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  137. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  138. package/es/color/ColorScales/index.d.mts +2 -2
  139. package/es/color/CssVar/index.d.mts +2 -2
  140. package/es/hooks/useMermaid.mjs.map +1 -1
  141. package/es/hooks/useStreamMermaid.mjs.map +1 -1
  142. package/es/i18n/context.d.mts +2 -2
  143. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  144. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  145. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  146. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
  147. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  148. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  149. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  150. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  151. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  152. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  153. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  154. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  155. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  156. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  157. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  158. package/es/index.d.mts +7 -2
  159. package/es/index.mjs +6 -1
  160. package/es/mdx/Mdx/index.d.mts +2 -2
  161. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  162. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  163. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  164. package/es/storybook/StoryBook/index.d.mts +2 -2
  165. package/es/utils/placement.d.mts +7 -1
  166. package/es/utils/placement.mjs.map +1 -1
  167. package/package.json +2 -1
@@ -1,10 +1,8 @@
1
1
  import Icon_default from "../Icon/Icon.mjs";
2
- import { styles } from "../Menu/sharedStyle.mjs";
2
+ import { DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger } from "./atoms.mjs";
3
3
  import { isValidElement } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { cx } from "antd-style";
6
5
  import { Check, ChevronRight } from "lucide-react";
7
- import { Menu } from "@base-ui/react/menu";
8
6
 
9
7
  //#region src/DropdownMenu/renderItems.tsx
10
8
  const getItemKey = (item, fallback) => {
@@ -51,29 +49,15 @@ const renderItemContent = (item, options, iconNode) => {
51
49
  const extra = "extra" in item ? item.extra : void 0;
52
50
  const hasCustomIcon = iconNode !== void 0;
53
51
  const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);
54
- const shouldRenderIcon = hasCustomIcon ? Boolean(options?.reserveIconSpace || iconNode) : Boolean(hasIcon || options?.reserveIconSpace);
55
- return /* @__PURE__ */ jsxs("div", {
56
- className: styles.itemContent,
57
- children: [
58
- shouldRenderIcon ? /* @__PURE__ */ jsx("span", {
59
- "aria-hidden": !hasIcon,
60
- className: styles.icon,
61
- children: hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null
62
- }) : null,
63
- /* @__PURE__ */ jsx("span", {
64
- className: styles.label,
65
- children: label
66
- }),
67
- extra ? /* @__PURE__ */ jsx("span", {
68
- className: styles.extra,
69
- children: extra
70
- }) : null,
71
- options?.submenu ? /* @__PURE__ */ jsx("span", {
72
- className: styles.submenuArrow,
73
- children: /* @__PURE__ */ jsx(ChevronRight, { size: 16 })
74
- }) : null
75
- ]
76
- });
52
+ return /* @__PURE__ */ jsxs(DropdownMenuItemContent, { children: [
53
+ (hasCustomIcon ? Boolean(options?.reserveIconSpace || iconNode) : Boolean(hasIcon || options?.reserveIconSpace)) ? /* @__PURE__ */ jsx(DropdownMenuItemIcon, {
54
+ "aria-hidden": !hasIcon,
55
+ children: hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null
56
+ }) : null,
57
+ /* @__PURE__ */ jsx(DropdownMenuItemLabel, { children: label }),
58
+ extra ? /* @__PURE__ */ jsx(DropdownMenuItemExtra, { children: extra }) : null,
59
+ options?.submenu ? /* @__PURE__ */ jsx(DropdownMenuSubmenuArrow, { children: /* @__PURE__ */ jsx(ChevronRight, { size: 16 }) }) : null
60
+ ] });
77
61
  };
78
62
  const invokeItemClick = (item, keyPath, event) => {
79
63
  if (!item.onClick) return;
@@ -97,12 +81,12 @@ const renderDropdownMenuItems = (items, keyPath = [], options) => {
97
81
  const checkboxItem = item;
98
82
  const label$1 = getItemLabel(checkboxItem);
99
83
  const labelText$1 = typeof label$1 === "string" ? label$1 : void 0;
100
- const isDanger$1 = Boolean(checkboxItem.danger);
101
- const indicator = /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(Icon_default, { icon: Check }) });
102
- return /* @__PURE__ */ jsx(Menu.CheckboxItem, {
84
+ const isDanger = Boolean(checkboxItem.danger);
85
+ const indicator = /* @__PURE__ */ jsx(DropdownMenuCheckboxItemIndicator, { children: /* @__PURE__ */ jsx(Icon_default, { icon: Check }) });
86
+ return /* @__PURE__ */ jsx(DropdownMenuCheckboxItemPrimitive, {
103
87
  checked: checkboxItem.checked,
104
- className: cx(styles.item, isDanger$1 && styles.danger),
105
88
  closeOnClick: checkboxItem.closeOnClick,
89
+ danger: isDanger,
106
90
  defaultChecked: checkboxItem.defaultChecked,
107
91
  disabled: checkboxItem.disabled,
108
92
  label: labelText$1,
@@ -110,44 +94,35 @@ const renderDropdownMenuItems = (items, keyPath = [], options) => {
110
94
  children: renderItemContent(checkboxItem, { reserveIconSpace }, indicator)
111
95
  }, itemKey);
112
96
  }
113
- if (item.type === "divider") return /* @__PURE__ */ jsx(Menu.Separator, { className: styles.separator }, itemKey);
97
+ if (item.type === "divider") return /* @__PURE__ */ jsx(DropdownMenuSeparator, {}, itemKey);
114
98
  if (item.type === "group") {
115
99
  const group = item;
116
100
  const groupReserveIconSpace = Boolean(group.children?.some((child) => Boolean(child && "icon" in child && child.icon)));
117
- return /* @__PURE__ */ jsxs(Menu.Group, { children: [group.label ? /* @__PURE__ */ jsx(Menu.GroupLabel, {
118
- className: styles.groupLabel,
119
- children: group.label
120
- }) : null, group.children ? renderDropdownMenuItems(group.children, nextKeyPath, { reserveIconSpace: groupReserveIconSpace }) : null] }, itemKey);
101
+ return /* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [group.label ? /* @__PURE__ */ jsx(DropdownMenuGroupLabel, { children: group.label }) : null, group.children ? renderDropdownMenuItems(group.children, nextKeyPath, { reserveIconSpace: groupReserveIconSpace }) : null] }, itemKey);
121
102
  }
122
103
  if (item.type === "submenu" || "children" in item) {
123
104
  const submenu = item;
124
105
  const label$1 = getItemLabel(submenu);
125
106
  const labelText$1 = typeof label$1 === "string" ? label$1 : void 0;
126
- const isDanger$1 = "danger" in submenu && Boolean(submenu.danger);
127
- return /* @__PURE__ */ jsxs(Menu.SubmenuRoot, { children: [/* @__PURE__ */ jsx(Menu.SubmenuTrigger, {
128
- className: cx(styles.item, isDanger$1 && styles.danger),
107
+ return /* @__PURE__ */ jsxs(DropdownMenuSubmenuRoot, { children: [/* @__PURE__ */ jsx(DropdownMenuSubmenuTrigger, {
108
+ danger: "danger" in submenu && Boolean(submenu.danger),
129
109
  disabled: submenu.disabled,
130
110
  label: labelText$1,
131
111
  children: renderItemContent(submenu, {
132
112
  reserveIconSpace,
133
113
  submenu: true
134
114
  })
135
- }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
115
+ }), /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(DropdownMenuPositioner, {
136
116
  alignOffset: -4,
137
- className: styles.positioner,
138
117
  sideOffset: -1,
139
- children: /* @__PURE__ */ jsx(Menu.Popup, {
140
- className: styles.popup,
141
- children: submenu.children ? renderDropdownMenuItems(submenu.children, nextKeyPath) : null
142
- })
118
+ children: /* @__PURE__ */ jsx(DropdownMenuPopup, { children: submenu.children ? renderDropdownMenuItems(submenu.children, nextKeyPath) : null })
143
119
  }) })] }, itemKey);
144
120
  }
145
121
  const menuItem = item;
146
122
  const label = getItemLabel(menuItem);
147
123
  const labelText = typeof label === "string" ? label : void 0;
148
- const isDanger = "danger" in menuItem && Boolean(menuItem.danger);
149
- return /* @__PURE__ */ jsx(Menu.Item, {
150
- className: cx(styles.item, isDanger && styles.danger),
124
+ return /* @__PURE__ */ jsx(DropdownMenuItem, {
125
+ danger: "danger" in menuItem && Boolean(menuItem.danger),
151
126
  disabled: menuItem.disabled,
152
127
  label: labelText,
153
128
  onClick: (event) => invokeItemClick(menuItem, nextKeyPath, event),
@@ -1 +1 @@
1
- {"version":3,"file":"renderItems.mjs","names":["Icon","segmentIndices: number[]","info: MenuInfo","label","labelText","isDanger"],"sources":["../../src/DropdownMenu/renderItems.tsx"],"sourcesContent":["import { Menu } from '@base-ui/react/menu';\nimport { cx } from 'antd-style';\nimport { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n Key,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\nimport { isValidElement } from 'react';\n\nimport Icon from '@/Icon';\nimport type {\n ItemType,\n MenuDividerType,\n MenuItemGroupType,\n MenuItemType,\n SubMenuType,\n} from '@/Menu';\nimport { styles } from '@/Menu/sharedStyle';\n\nimport type { DropdownItem, DropdownMenuCheckboxItem } from './type';\n\nconst getItemKey = (item: ItemType | DropdownItem, fallback: string): Key => {\n if (item && 'key' in item && item.key !== undefined) return item.key;\n return fallback;\n};\n\ntype LabelableItem = {\n key?: Key;\n label?: ReactNode;\n title?: ReactNode;\n};\n\nconst getItemLabel = (item: MenuItemType | SubMenuType | LabelableItem): ReactNode => {\n if (item.label !== undefined) return item.label;\n if ('title' in item && item.title !== undefined) return item.title;\n return item.key;\n};\n\nconst renderIcon = (icon: MenuItemType['icon']) => {\n if (!icon) return null;\n if (isValidElement(icon)) return icon;\n return <Icon icon={icon} />;\n};\n\nconst getReserveIconSpaceMap = (items: DropdownItem[]) => {\n const flags = Array.from({ length: items.length }).fill(false);\n let segmentIndices: number[] = [];\n let segmentHasIcon = false;\n\n const flush = () => {\n if (segmentHasIcon) {\n for (const index of segmentIndices) flags[index] = true;\n }\n segmentIndices = [];\n segmentHasIcon = false;\n };\n\n items.forEach((item, index) => {\n if (!item) return;\n if (\n (item as MenuDividerType).type === 'divider' ||\n (item as MenuItemGroupType).type === 'group'\n ) {\n flush();\n return;\n }\n\n segmentIndices.push(index);\n if ((item as DropdownMenuCheckboxItem).type === 'checkbox') {\n segmentHasIcon = true;\n return;\n }\n if ('icon' in item && item.icon) segmentHasIcon = true;\n });\n\n flush();\n return flags;\n};\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | DropdownMenuCheckboxItem,\n options?: { reserveIconSpace?: boolean; submenu?: boolean },\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const hasCustomIcon = iconNode !== undefined;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <div className={styles.itemContent}>\n {shouldRenderIcon ? (\n <span aria-hidden={!hasIcon} className={styles.icon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null}\n </span>\n ) : null}\n <span className={styles.label}>{label}</span>\n {extra ? <span className={styles.extra}>{extra}</span> : null}\n {options?.submenu ? (\n <span className={styles.submenuArrow}>\n <ChevronRight size={16} />\n </span>\n ) : null}\n </div>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderDropdownMenuItems = (\n items: DropdownItem[],\n keyPath: string[] = [],\n options?: { reserveIconSpace?: boolean },\n): ReactNode[] => {\n const reserveIconSpaceMap =\n options?.reserveIconSpace === undefined ? getReserveIconSpaceMap(items) : null;\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n const reserveIconSpace = options?.reserveIconSpace ?? Boolean(reserveIconSpaceMap?.[index]);\n\n if ((item as DropdownMenuCheckboxItem).type === 'checkbox') {\n const checkboxItem = item as DropdownMenuCheckboxItem;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <Menu.CheckboxItemIndicator>\n <Icon icon={Check} />\n </Menu.CheckboxItemIndicator>\n );\n\n return (\n <Menu.CheckboxItem\n checked={checkboxItem.checked}\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={checkboxItem.closeOnClick}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { reserveIconSpace }, indicator)}\n </Menu.CheckboxItem>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <Menu.Separator className={styles.separator} key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace = Boolean(\n group.children?.some((child) => Boolean(child && 'icon' in child && child.icon)),\n );\n return (\n <Menu.Group key={itemKey}>\n {group.label ? (\n <Menu.GroupLabel className={styles.groupLabel}>{group.label}</Menu.GroupLabel>\n ) : null}\n {group.children\n ? renderDropdownMenuItems(group.children, nextKeyPath, {\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </Menu.Group>\n );\n }\n\n if ((item as SubMenuType).type === 'submenu' || 'children' in item) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <Menu.SubmenuRoot key={itemKey}>\n <Menu.SubmenuTrigger\n className={cx(styles.item, isDanger && styles.danger)}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </Menu.SubmenuTrigger>\n <Menu.Portal>\n <Menu.Positioner alignOffset={-4} className={styles.positioner} sideOffset={-1}>\n <Menu.Popup className={styles.popup}>\n {submenu.children ? renderDropdownMenuItems(submenu.children, nextKeyPath) : null}\n </Menu.Popup>\n </Menu.Positioner>\n </Menu.Portal>\n </Menu.SubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <Menu.Item\n className={cx(styles.item, isDanger && styles.danger)}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </Menu.Item>\n );\n });\n};\n"],"mappings":";;;;;;;;;AAwBA,MAAM,cAAc,MAA+B,aAA0B;AAC3E,KAAI,QAAQ,SAAS,QAAQ,KAAK,QAAQ,OAAW,QAAO,KAAK;AACjE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,YAAY,QAAQ,SAAS,OAAO;AAEjE,SACE,oBAAC,KAAK;GACJ,WAAW,GAAG,OAAO,MAAM,YAAY,OAAO,OAAO;GACrD,UAAU,SAAS;GAEnB,OAAO;GACP,UAAU,UAAU,gBAAgB,UAAU,aAAa,MAAM;aAEhE,kBAAkB,UAAU,EAAE,kBAAkB,CAAC;KAJ7C,QAKK;GAEd"}
1
+ {"version":3,"file":"renderItems.mjs","names":["Icon","segmentIndices: number[]","info: MenuInfo","label","labelText"],"sources":["../../src/DropdownMenu/renderItems.tsx"],"sourcesContent":["import { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n Key,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\nimport { isValidElement } from 'react';\n\nimport Icon from '@/Icon';\nimport type {\n ItemType,\n MenuDividerType,\n MenuItemGroupType,\n MenuItemType,\n SubMenuType,\n} from '@/Menu';\n\nimport {\n DropdownMenuCheckboxItemIndicator,\n DropdownMenuCheckboxItemPrimitive,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuItemContent,\n DropdownMenuItemExtra,\n DropdownMenuItemIcon,\n DropdownMenuItemLabel,\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuSeparator,\n DropdownMenuSubmenuArrow,\n DropdownMenuSubmenuRoot,\n DropdownMenuSubmenuTrigger,\n} from './atoms';\nimport type {\n DropdownItem,\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemType,\n} from './type';\n\nconst getItemKey = (item: ItemType | DropdownItem, fallback: string): Key => {\n if (item && 'key' in item && item.key !== undefined) return item.key;\n return fallback;\n};\n\ntype LabelableItem = {\n key?: Key;\n label?: ReactNode;\n title?: ReactNode;\n};\n\nconst getItemLabel = (item: MenuItemType | SubMenuType | LabelableItem): ReactNode => {\n if (item.label !== undefined) return item.label;\n if ('title' in item && item.title !== undefined) return item.title;\n return item.key;\n};\n\nconst renderIcon = (icon: MenuItemType['icon']) => {\n if (!icon) return null;\n if (isValidElement(icon)) return icon;\n return <Icon icon={icon} />;\n};\n\nconst getReserveIconSpaceMap = (items: DropdownItem[]) => {\n const flags = Array.from({ length: items.length }).fill(false);\n let segmentIndices: number[] = [];\n let segmentHasIcon = false;\n\n const flush = () => {\n if (segmentHasIcon) {\n for (const index of segmentIndices) flags[index] = true;\n }\n segmentIndices = [];\n segmentHasIcon = false;\n };\n\n items.forEach((item, index) => {\n if (!item) return;\n if (\n (item as MenuDividerType).type === 'divider' ||\n (item as MenuItemGroupType).type === 'group'\n ) {\n flush();\n return;\n }\n\n segmentIndices.push(index);\n if ((item as DropdownMenuCheckboxItemType).type === 'checkbox') {\n segmentHasIcon = true;\n return;\n }\n if ('icon' in item && item.icon) segmentHasIcon = true;\n });\n\n flush();\n return flags;\n};\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | DropdownMenuCheckboxItemType,\n options?: { reserveIconSpace?: boolean; submenu?: boolean },\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const hasCustomIcon = iconNode !== undefined;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <DropdownMenuItemContent>\n {shouldRenderIcon ? (\n <DropdownMenuItemIcon aria-hidden={!hasIcon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null}\n </DropdownMenuItemIcon>\n ) : null}\n <DropdownMenuItemLabel>{label}</DropdownMenuItemLabel>\n {extra ? <DropdownMenuItemExtra>{extra}</DropdownMenuItemExtra> : null}\n {options?.submenu ? (\n <DropdownMenuSubmenuArrow>\n <ChevronRight size={16} />\n </DropdownMenuSubmenuArrow>\n ) : null}\n </DropdownMenuItemContent>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderDropdownMenuItems = (\n items: DropdownItem[],\n keyPath: string[] = [],\n options?: { reserveIconSpace?: boolean },\n): ReactNode[] => {\n const reserveIconSpaceMap =\n options?.reserveIconSpace === undefined ? getReserveIconSpaceMap(items) : null;\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n const reserveIconSpace = options?.reserveIconSpace ?? Boolean(reserveIconSpaceMap?.[index]);\n\n if ((item as DropdownMenuCheckboxItemType).type === 'checkbox') {\n const checkboxItem = item as DropdownMenuCheckboxItemType;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <DropdownMenuCheckboxItemIndicator>\n <Icon icon={Check} />\n </DropdownMenuCheckboxItemIndicator>\n );\n\n return (\n <DropdownMenuCheckboxItemPrimitive\n checked={checkboxItem.checked}\n closeOnClick={checkboxItem.closeOnClick}\n danger={isDanger}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { reserveIconSpace }, indicator)}\n </DropdownMenuCheckboxItemPrimitive>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <DropdownMenuSeparator key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace = Boolean(\n group.children?.some((child) => Boolean(child && 'icon' in child && child.icon)),\n );\n return (\n <DropdownMenuGroup key={itemKey}>\n {group.label ? <DropdownMenuGroupLabel>{group.label}</DropdownMenuGroupLabel> : null}\n {group.children\n ? renderDropdownMenuItems(group.children, nextKeyPath, {\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </DropdownMenuGroup>\n );\n }\n\n if ((item as SubMenuType).type === 'submenu' || 'children' in item) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <DropdownMenuSubmenuRoot key={itemKey}>\n <DropdownMenuSubmenuTrigger\n danger={isDanger}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </DropdownMenuSubmenuTrigger>\n <DropdownMenuPortal>\n <DropdownMenuPositioner alignOffset={-4} sideOffset={-1}>\n <DropdownMenuPopup>\n {submenu.children ? renderDropdownMenuItems(submenu.children, nextKeyPath) : null}\n </DropdownMenuPopup>\n </DropdownMenuPositioner>\n </DropdownMenuPortal>\n </DropdownMenuSubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <DropdownMenuItem\n danger={isDanger}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </DropdownMenuItem>\n );\n });\n};\n"],"mappings":";;;;;;;AA0CA,MAAM,cAAc,MAA+B,aAA0B;AAC3E,KAAI,QAAQ,SAAS,QAAQ,KAAK,QAAQ,OAAW,QAAO,KAAK;AACjE,QAAO;;AAST,MAAM,gBAAgB,SAAgE;AACpF,KAAI,KAAK,UAAU,OAAW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AAQ;GACd,MAAM,wBAAwB,QAC5B,MAAM,UAAU,MAAM,UAAU,QAAQ,SAAS,UAAU,SAAS,MAAM,KAAK,CAAC,CACjF;AACD,UACE,qBAAC,gCACE,MAAM,QAAQ,oBAAC,oCAAwB,MAAM,QAA+B,GAAG,MAC/E,MAAM,WACH,wBAAwB,MAAM,UAAU,aAAa,EACnD,kBAAkB,uBACnB,CAAC,GACF,SANkB,QAOJ;;AAIxB,MAAK,KAAqB,SAAS,aAAa,cAAc,MAAM;GAClE,MAAM,UAAU;GAChB,MAAMD,UAAQ,aAAa,QAAQ;GACnC,MAAMC,cAAY,OAAOD,YAAU,WAAWA,UAAQ;AAGtD,UACE,qBAAC,sCACC,oBAAC;IACC,QALW,YAAY,WAAW,QAAQ,QAAQ,OAAO;IAMzD,UAAU,QAAQ;IAClB,OAAOC;cAEN,kBAAkB,SAAS;KAC1B;KACA,SAAS;KACV,CAAC;KACyB,EAC7B,oBAAC,gCACC,oBAAC;IAAuB,aAAa;IAAI,YAAY;cACnD,oBAAC,+BACE,QAAQ,WAAW,wBAAwB,QAAQ,UAAU,YAAY,GAAG,OAC3D;KACG,GACN,KAjBO,QAkBJ;;EAI9B,MAAM,WAAW;EACjB,MAAM,QAAQ,aAAa,SAAS;EACpC,MAAM,YAAY,OAAO,UAAU,WAAW,QAAQ;AAGtD,SACE,oBAAC;GACC,QAJa,YAAY,YAAY,QAAQ,SAAS,OAAO;GAK7D,UAAU,SAAS;GAEnB,OAAO;GACP,UAAU,UAAU,gBAAgB,UAAU,aAAa,MAAM;aAEhE,kBAAkB,UAAU,EAAE,kBAAkB,CAAC;KAJ7C,QAKY;GAErB"}
@@ -1,8 +1,8 @@
1
1
  import { EditableTextProps } from "./type.mjs";
2
- import * as react16 from "react";
2
+ import * as react74 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react16.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react74.NamedExoticComponent<EditableTextProps>;
6
6
  //#endregion
7
7
  export { EditableText };
8
8
  //# sourceMappingURL=EditableText.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { EmojiPickerProps } from "./type.mjs";
2
- import * as react13 from "react";
2
+ import * as react73 from "react";
3
3
 
4
4
  //#region src/EmojiPicker/EmojiPicker.d.ts
5
- declare const EmojiPicker: react13.NamedExoticComponent<EmojiPickerProps>;
5
+ declare const EmojiPicker: react73.NamedExoticComponent<EmojiPickerProps>;
6
6
  //#endregion
7
7
  export { EmojiPicker };
8
8
  //# sourceMappingURL=EmojiPicker.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FlexBasicProps } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react72 from "react";
3
3
 
4
4
  //#region src/Flex/FlexBasic.d.ts
5
- declare const _default: react15.NamedExoticComponent<FlexBasicProps>;
5
+ declare const _default: react72.NamedExoticComponent<FlexBasicProps>;
6
6
  //#endregion
7
7
  export { _default };
8
8
  //# sourceMappingURL=FlexBasic.d.mts.map
@@ -1,10 +1,10 @@
1
- import * as react51 from "react";
1
+ import * as react35 from "react";
2
2
 
3
3
  //#region src/FontLoader/index.d.ts
4
4
  interface FontLoaderProps {
5
5
  url: string;
6
6
  }
7
- declare const FontLoader: react51.NamedExoticComponent<FontLoaderProps>;
7
+ declare const FontLoader: react35.NamedExoticComponent<FontLoaderProps>;
8
8
  //#endregion
9
9
  export { FontLoader, FontLoaderProps };
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./type.mjs";
2
- import * as react37 from "react";
2
+ import * as react71 from "react";
3
3
 
4
4
  //#region src/Footer/Footer.d.ts
5
- declare const Footer: react37.NamedExoticComponent<FooterProps>;
5
+ declare const Footer: react71.NamedExoticComponent<FooterProps>;
6
6
  //#endregion
7
7
  export { Footer };
8
8
  //# sourceMappingURL=Footer.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormGroupProps } from "../type.mjs";
2
- import * as react9 from "react";
2
+ import * as react68 from "react";
3
3
 
4
4
  //#region src/Form/components/FormGroup.d.ts
5
- declare const FormGroup: react9.NamedExoticComponent<FormGroupProps>;
5
+ declare const FormGroup: react68.NamedExoticComponent<FormGroupProps>;
6
6
  //#endregion
7
7
  export { FormGroup };
8
8
  //# sourceMappingURL=FormGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormItemProps } from "../type.mjs";
2
- import * as react11 from "react";
2
+ import * as react70 from "react";
3
3
 
4
4
  //#region src/Form/components/FormItem.d.ts
5
- declare const FormItem: react11.NamedExoticComponent<FormItemProps>;
5
+ declare const FormItem: react70.NamedExoticComponent<FormItemProps>;
6
6
  //#endregion
7
7
  export { FormItem };
8
8
  //# sourceMappingURL=FormItem.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormSubmitFooterProps } from "../type.mjs";
2
- import * as react10 from "react";
2
+ import * as react69 from "react";
3
3
 
4
4
  //#region src/Form/components/FormSubmitFooter.d.ts
5
- declare const FormSubmitFooter: react10.NamedExoticComponent<FormSubmitFooterProps>;
5
+ declare const FormSubmitFooter: react69.NamedExoticComponent<FormSubmitFooterProps>;
6
6
  //#endregion
7
7
  export { FormSubmitFooter };
8
8
  //# sourceMappingURL=FormSubmitFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormModalProps } from "./type.mjs";
2
- import * as react8 from "react";
2
+ import * as react67 from "react";
3
3
 
4
4
  //#region src/FormModal/FormModal.d.ts
5
- declare const FormModal: react8.NamedExoticComponent<FormModalProps>;
5
+ declare const FormModal: react67.NamedExoticComponent<FormModalProps>;
6
6
  //#endregion
7
7
  export { FormModal };
8
8
  //# sourceMappingURL=FormModal.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { GuideCardProps } from "./type.mjs";
2
- import * as react125 from "react";
2
+ import * as react135 from "react";
3
3
 
4
4
  //#region src/GuideCard/GuideCard.d.ts
5
- declare const GuideCard: react125.NamedExoticComponent<GuideCardProps>;
5
+ declare const GuideCard: react135.NamedExoticComponent<GuideCardProps>;
6
6
  //#endregion
7
7
  export { GuideCard };
8
8
  //# sourceMappingURL=GuideCard.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HeaderProps } from "./type.mjs";
2
- import * as react6 from "react";
2
+ import * as react63 from "react";
3
3
 
4
4
  //#region src/Header/Header.d.ts
5
- declare const Header: react6.NamedExoticComponent<HeaderProps>;
5
+ declare const Header: react63.NamedExoticComponent<HeaderProps>;
6
6
  //#endregion
7
7
  export { Header };
8
8
  //# sourceMappingURL=Header.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HighlighterProps } from "./type.mjs";
2
- import * as react74 from "react";
2
+ import * as react64 from "react";
3
3
 
4
4
  //#region src/Highlighter/Highlighter.d.ts
5
- declare const Highlighter: react74.NamedExoticComponent<HighlighterProps>;
5
+ declare const Highlighter: react64.NamedExoticComponent<HighlighterProps>;
6
6
  //#endregion
7
7
  export { Highlighter };
8
8
  //# sourceMappingURL=Highlighter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxHighlighterProps } from "../type.mjs";
2
- import * as react75 from "react";
2
+ import * as react65 from "react";
3
3
 
4
4
  //#region src/Highlighter/SyntaxHighlighter/index.d.ts
5
- declare const SyntaxHighlighter: react75.NamedExoticComponent<SyntaxHighlighterProps>;
5
+ declare const SyntaxHighlighter: react65.NamedExoticComponent<SyntaxHighlighterProps>;
6
6
  //#endregion
7
7
  export { SyntaxHighlighter };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyProps } from "./type.mjs";
2
- import * as react12 from "react";
2
+ import * as react62 from "react";
3
3
 
4
4
  //#region src/Hotkey/Hotkey.d.ts
5
- declare const Hotkey: react12.NamedExoticComponent<HotkeyProps>;
5
+ declare const Hotkey: react62.NamedExoticComponent<HotkeyProps>;
6
6
  //#endregion
7
7
  export { Hotkey };
8
8
  //# sourceMappingURL=Hotkey.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyInputProps } from "./type.mjs";
2
- import * as react7 from "react";
2
+ import * as react0 from "react";
3
3
 
4
4
  //#region src/HotkeyInput/HotkeyInput.d.ts
5
- declare const HotkeyInput: react7.NamedExoticComponent<HotkeyInputProps>;
5
+ declare const HotkeyInput: react0.NamedExoticComponent<HotkeyInputProps>;
6
6
  //#endregion
7
7
  export { HotkeyInput };
8
8
  //# sourceMappingURL=HotkeyInput.d.mts.map
@@ -1,11 +1,11 @@
1
1
  import { IconProps } from "../type.mjs";
2
- import * as react3 from "react";
2
+ import * as react6 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/Icon/components/IconProvider.d.ts
6
6
  type IconContentConfig = Omit<IconProps, 'icon' | 'ref'>;
7
- declare const IconContext: react3.Context<IconContentConfig>;
8
- declare const IconProvider: react3.NamedExoticComponent<{
7
+ declare const IconContext: react6.Context<IconContentConfig>;
8
+ declare const IconProvider: react6.NamedExoticComponent<{
9
9
  children: ReactNode;
10
10
  config?: IconContentConfig;
11
11
  }>;
@@ -1,8 +1,8 @@
1
1
  import { PreviewGroupProps } from "./type.mjs";
2
- import * as react73 from "react";
2
+ import * as react17 from "react";
3
3
 
4
4
  //#region src/Image/PreviewGroup.d.ts
5
- declare const PreviewGroup: react73.NamedExoticComponent<PreviewGroupProps>;
5
+ declare const PreviewGroup: react17.NamedExoticComponent<PreviewGroupProps>;
6
6
  //#endregion
7
7
  export { PreviewGroup };
8
8
  //# sourceMappingURL=PreviewGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ImageSelectProps } from "./type.mjs";
2
- import * as react110 from "react";
2
+ import * as react85 from "react";
3
3
 
4
4
  //#region src/ImageSelect/ImageSelect.d.ts
5
- declare const ImageSelect: react110.NamedExoticComponent<ImageSelectProps>;
5
+ declare const ImageSelect: react85.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 react130 from "react";
2
+ import * as react136 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react130.NamedExoticComponent<InputProps>;
5
+ declare const Input: react136.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 react128 from "react";
2
+ import * as react137 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react128.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react137.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 react126 from "react";
2
+ import * as react138 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react126.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react138.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 react127 from "react";
2
+ import * as react140 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react127.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react140.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 react129 from "react";
2
+ import * as react139 from "react";
3
3
 
4
4
  //#region src/Input/TextArea.d.ts
5
- declare const TextArea: react129.NamedExoticComponent<TextAreaProps>;
5
+ declare const TextArea: react139.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 react67 from "react";
3
+ import * as react10 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react67.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react10.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 react69 from "react";
2
+ import * as react11 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react69.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react11.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 react68 from "react";
3
+ import * as react12 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react68.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react12.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 react70 from "react";
2
+ import * as react13 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react70.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react13.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 react72 from "react";
2
+ import * as react14 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react72.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react14.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 react71 from "react";
2
+ import * as react15 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react71.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react15.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 react0 from "react";
2
+ import * as react16 from "react";
3
3
 
4
4
  //#region src/List/ListItem/index.d.ts
5
- declare const ListItem: react0.NamedExoticComponent<ListItemProps>;
5
+ declare const ListItem: react16.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 react2 from "react";
2
+ import * as react9 from "react";
3
3
 
4
4
  //#region src/Markdown/Markdown.d.ts
5
- declare const Markdown: react2.NamedExoticComponent<MarkdownProps>;
5
+ declare const Markdown: react9.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 react1 from "react";
2
+ import * as react8 from "react";
3
3
 
4
4
  //#region src/Markdown/Typography.d.ts
5
- declare const Typography: react1.NamedExoticComponent<TypographyProps>;
5
+ declare const Typography: react8.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 react52 from "react";
3
+ import * as react36 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: react52.NamedExoticComponent<SearchResultCardsProps>;
17
+ declare const SearchResultCards: react36.NamedExoticComponent<SearchResultCardsProps>;
18
18
  //#endregion
19
19
  export { SearchResultCards, SearchResultCardsProps };
20
20
  //# sourceMappingURL=index.d.mts.map
@@ -10,8 +10,7 @@ import { VideoProps } from "../mdx/mdxComponents/Video.mjs";
10
10
  import "../mdx/index.mjs";
11
11
  import { CSSProperties, ElementType, FC, ReactNode, Ref } from "react";
12
12
  import { AnchorProps } from "antd";
13
- import { Options } from "react-markdown";
14
- import { Components } from "react-markdown/lib";
13
+ import { Components, Options } from "react-markdown";
15
14
  import { Pluggable } from "unified";
16
15
 
17
16
  //#region src/Markdown/type.d.ts
@@ -1,8 +1,8 @@
1
1
  import { MenuProps } from "./type.mjs";
2
- import * as react0 from "react";
2
+ import * as react59 from "react";
3
3
 
4
4
  //#region src/Menu/Menu.d.ts
5
- declare const Menu: react0.NamedExoticComponent<MenuProps<unknown>>;
5
+ declare const Menu: react59.NamedExoticComponent<MenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { Menu };
8
8
  //# sourceMappingURL=Menu.d.mts.map