@lobehub/ui 4.35.2 → 4.35.3

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 (151) 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/Alert/type.d.mts +1 -1
  6. package/es/AutoComplete/Select.d.mts +2 -2
  7. package/es/Avatar/Avatar.mjs +1 -1
  8. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  9. package/es/Burger/Burger.d.mts +2 -2
  10. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  11. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  12. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  13. package/es/Collapse/Collapse.d.mts +2 -2
  14. package/es/ColorSwatches/ColorSwatches.mjs +1 -1
  15. package/es/ConfigProvider/index.d.mts +2 -2
  16. package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
  17. package/es/ContextMenu/ContextMenuHost.mjs +10 -20
  18. package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
  19. package/es/CopyButton/CopyButton.d.mts +2 -2
  20. package/es/DatePicker/DatePicker.d.mts +2 -2
  21. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  22. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  23. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  24. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  25. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  26. package/es/Drawer/Drawer.d.mts +2 -2
  27. package/es/Dropdown/Dropdown.d.mts +2 -2
  28. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  29. package/es/DropdownMenu/atoms.d.mts +18 -18
  30. package/es/DropdownMenu/atoms.mjs +2 -4
  31. package/es/DropdownMenu/atoms.mjs.map +1 -1
  32. package/es/EditableText/EditableText.d.mts +2 -2
  33. package/es/EditorSlashMenu/atoms.d.mts +14 -20
  34. package/es/EditorSlashMenu/atoms.mjs +1 -8
  35. package/es/EditorSlashMenu/atoms.mjs.map +1 -1
  36. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  37. package/es/Flex/FlexBasic.d.mts +2 -2
  38. package/es/FontLoader/index.d.mts +2 -2
  39. package/es/Footer/Footer.d.mts +2 -2
  40. package/es/Form/components/FormGroup.d.mts +2 -2
  41. package/es/Form/components/FormItem.d.mts +2 -2
  42. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  43. package/es/FormModal/FormModal.d.mts +2 -2
  44. package/es/Freeze/Freeze.d.mts +2 -2
  45. package/es/GuideCard/GuideCard.d.mts +2 -2
  46. package/es/Header/Header.d.mts +2 -2
  47. package/es/Highlighter/Highlighter.d.mts +2 -2
  48. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  49. package/es/Hotkey/Hotkey.d.mts +2 -2
  50. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  51. package/es/Icon/Icon.d.mts +2 -2
  52. package/es/Icon/components/IconProvider.d.mts +3 -3
  53. package/es/Image/PreviewGroup.d.mts +2 -2
  54. package/es/Input/Input.d.mts +2 -2
  55. package/es/Input/InputNumber.d.mts +2 -2
  56. package/es/Input/InputOPT.d.mts +2 -2
  57. package/es/Input/InputPassword.d.mts +2 -2
  58. package/es/Input/TextArea.d.mts +2 -2
  59. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  60. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  61. package/es/Layout/components/LayoutMain.d.mts +2 -2
  62. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  63. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  64. package/es/Layout/components/LayoutToc.d.mts +2 -2
  65. package/es/List/ListItem/index.d.mts +2 -2
  66. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  67. package/es/LobeSelect/LobeSelect.mjs +45 -51
  68. package/es/LobeSelect/LobeSelect.mjs.map +1 -1
  69. package/es/LobeSelect/atoms.d.mts +19 -19
  70. package/es/LobeSelect/atoms.mjs +2 -4
  71. package/es/LobeSelect/atoms.mjs.map +1 -1
  72. package/es/LobeSwitch/LobeSwitch.d.mts +2 -2
  73. package/es/LobeSwitch/atoms.d.mts +4 -4
  74. package/es/Markdown/Markdown.d.mts +2 -2
  75. package/es/Markdown/Typography.d.mts +2 -2
  76. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  77. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  78. package/es/Menu/Menu.d.mts +2 -2
  79. package/es/Mermaid/Mermaid.d.mts +2 -2
  80. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  81. package/es/Modal/Modal.d.mts +2 -2
  82. package/es/Modal/ModalProvider.d.mts +2 -2
  83. package/es/Modal/imperative.d.mts +2 -2
  84. package/es/MotionProvider/index.d.mts +2 -2
  85. package/es/Popover/ArrowIcon.d.mts +2 -2
  86. package/es/Popover/PopoverPortal.mjs +0 -6
  87. package/es/Popover/PopoverPortal.mjs.map +1 -1
  88. package/es/Popover/atoms.d.mts +9 -9
  89. package/es/Popover/context.d.mts +2 -2
  90. package/es/ScrollArea/atoms.d.mts +7 -7
  91. package/es/SearchBar/SearchBar.d.mts +2 -2
  92. package/es/Segmented/Segmented.d.mts +2 -2
  93. package/es/Select/Select.d.mts +2 -2
  94. package/es/SideNav/SideNav.d.mts +2 -2
  95. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  96. package/es/ThemeProvider/GlobalStyle/global.mjs +10 -17
  97. package/es/ThemeProvider/GlobalStyle/global.mjs.map +1 -1
  98. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  99. package/es/ThemeProvider/ThemeProvider.mjs +34 -2
  100. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
  101. package/es/Toast/imperative.d.mts +3 -3
  102. package/es/Toast/imperative.mjs +7 -44
  103. package/es/Toast/imperative.mjs.map +1 -1
  104. package/es/Toc/Toc.d.mts +2 -2
  105. package/es/Tooltip/TooltipPortal.mjs +0 -7
  106. package/es/Tooltip/TooltipPortal.mjs.map +1 -1
  107. package/es/Video/index.d.mts +2 -2
  108. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  109. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  110. package/es/awesome/Features/Features.d.mts +2 -2
  111. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  112. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  113. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  114. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  115. package/es/awesome/Hero/Hero.d.mts +2 -2
  116. package/es/awesome/Spline/Spine.d.mts +2 -2
  117. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  118. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  119. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  120. package/es/brand/LobeChat/index.d.mts +2 -2
  121. package/es/brand/LobeHub/index.d.mts +2 -2
  122. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  123. package/es/brand/LogoThree/index.d.mts +2 -2
  124. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  125. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  126. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  127. package/es/chat/ChatList/ChatList.d.mts +2 -2
  128. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  129. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  130. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  131. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  132. package/es/color/ColorScales/index.d.mts +2 -2
  133. package/es/color/CssVar/index.d.mts +2 -2
  134. package/es/i18n/context.d.mts +2 -2
  135. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  136. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  137. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  140. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  141. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  142. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  143. package/es/index.mjs +5 -5
  144. package/es/mdx/Mdx/index.d.mts +2 -2
  145. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  146. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  147. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  148. package/es/storybook/StoryBook/index.d.mts +2 -2
  149. package/package.json +1 -1
  150. package/es/hooks/usePortalContainer.mjs +0 -24
  151. package/es/hooks/usePortalContainer.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { MarkdownProps } from "./type.mjs";
2
- import * as react47 from "react";
2
+ import * as react72 from "react";
3
3
 
4
4
  //#region src/Markdown/Markdown.d.ts
5
- declare const Markdown: react47.NamedExoticComponent<MarkdownProps>;
5
+ declare const Markdown: react72.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 react46 from "react";
2
+ import * as react71 from "react";
3
3
 
4
4
  //#region src/Markdown/Typography.d.ts
5
- declare const Typography: react46.NamedExoticComponent<TypographyProps>;
5
+ declare const Typography: react71.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 react81 from "react";
3
+ import * as react82 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: react81.NamedExoticComponent<SearchResultCardsProps>;
17
+ declare const SearchResultCards: react82.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 react44 from "react";
2
+ import * as react59 from "react";
3
3
 
4
4
  //#region src/MaskShadow/MaskShadow.d.ts
5
- declare const MaskShadow: react44.NamedExoticComponent<MaskShadowProps>;
5
+ declare const MaskShadow: react59.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 react45 from "react";
2
+ import * as react58 from "react";
3
3
 
4
4
  //#region src/Menu/Menu.d.ts
5
- declare const Menu: react45.NamedExoticComponent<MenuProps<unknown>>;
5
+ declare const Menu: react58.NamedExoticComponent<MenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { Menu };
8
8
  //# sourceMappingURL=Menu.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { MermaidProps } from "./type.mjs";
2
- import * as react42 from "react";
2
+ import * as react56 from "react";
3
3
 
4
4
  //#region src/Mermaid/Mermaid.d.ts
5
- declare const Mermaid: react42.NamedExoticComponent<MermaidProps>;
5
+ declare const Mermaid: react56.NamedExoticComponent<MermaidProps>;
6
6
  //#endregion
7
7
  export { Mermaid };
8
8
  //# sourceMappingURL=Mermaid.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxMermaidProps } from "../type.mjs";
2
- import * as react43 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/Mermaid/SyntaxMermaid/index.d.ts
5
- declare const SyntaxMermaid: react43.NamedExoticComponent<SyntaxMermaidProps>;
5
+ declare const SyntaxMermaid: react57.NamedExoticComponent<SyntaxMermaidProps>;
6
6
  //#endregion
7
7
  export { SyntaxMermaid };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ModalProps } from "./type.mjs";
2
- import * as react39 from "react";
2
+ import * as react49 from "react";
3
3
 
4
4
  //#region src/Modal/Modal.d.ts
5
- declare const Modal: react39.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 react40 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: react40.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_runtime41 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime52 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_runtime41.JSX.Element | null;
10
+ }: ModalHostProps) => react_jsx_runtime52.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 react82 from "react";
1
+ import * as react83 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: react82.NamedExoticComponent<{
9
+ declare const MotionProvider: react83.NamedExoticComponent<{
10
10
  children: ReactNode;
11
11
  motion: MotionComponentType;
12
12
  }>;
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime34 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime53 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/Popover/ArrowIcon.d.ts
4
- declare const PopoverArrowIcon: react_jsx_runtime34.JSX.Element;
4
+ declare const PopoverArrowIcon: react_jsx_runtime53.JSX.Element;
5
5
  //#endregion
6
6
  export { PopoverArrowIcon };
7
7
  //# sourceMappingURL=ArrowIcon.d.mts.map
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { LOBE_THEME_APP_ID } from "../ThemeProvider/constants.mjs";
4
3
  import { useEffect, useState } from "react";
5
4
 
6
5
  //#region src/Popover/PopoverPortal.tsx
@@ -11,11 +10,6 @@ const getOrCreateContainer = (root) => {
11
10
  const resolvedRoot = (() => {
12
11
  if (typeof document === "undefined") return root;
13
12
  if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot) return root;
14
- if (!(root === document.body)) return root;
15
- const themeApp = document.querySelector(`#${LOBE_THEME_APP_ID}`);
16
- if (themeApp) return themeApp;
17
- const popoverContainer = document.querySelector(`[${POPOVER_CONTAINER_ATTR}="true"]`);
18
- if (popoverContainer) return popoverContainer;
19
13
  return root;
20
14
  })();
21
15
  const cached = containerMap.get(resolvedRoot);
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverPortal.mjs","names":[],"sources":["../../src/Popover/PopoverPortal.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nimport { LOBE_THEME_APP_ID } from '@/ThemeProvider';\n\nconst PORTAL_ATTR = 'data-lobe-ui-popover-portal';\nexport const POPOVER_CONTAINER_ATTR = 'data-lobe-ui-popover-container';\n\n// Reuse one portal container per root (document.body by default).\nconst containerMap = new WeakMap<object, HTMLElement>();\n\nconst getOrCreateContainer = (root: HTMLElement | ShadowRoot): HTMLElement => {\n const resolvedRoot = (() => {\n if (typeof document === 'undefined') return root;\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) return root;\n\n const isBody = root === document.body;\n if (!isBody) return root;\n\n const themeApp = document.querySelector<HTMLElement>(`#${LOBE_THEME_APP_ID}`);\n if (themeApp) return themeApp;\n\n const popoverContainer = document.querySelector<HTMLElement>(\n `[${POPOVER_CONTAINER_ATTR}=\"true\"]`,\n );\n if (popoverContainer) return popoverContainer;\n\n return root;\n })();\n\n const cached = containerMap.get(resolvedRoot);\n if (cached && cached.isConnected) return cached;\n\n const el = document.createElement('div');\n el.setAttribute(PORTAL_ATTR, 'true');\n resolvedRoot.append(el);\n containerMap.set(resolvedRoot, el);\n return el;\n};\n\nconst resolveRoot = (root?: HTMLElement | ShadowRoot | null): HTMLElement | ShadowRoot | null => {\n if (root) return root;\n return document.body;\n};\n\nexport const usePopoverPortalContainer = (\n root?: HTMLElement | ShadowRoot | null,\n): HTMLElement | null => {\n const [container, setContainer] = useState<HTMLElement | null>(null);\n\n // Never mutate DOM / create portal container during render.\n // Create it after mount to avoid SSR/hydration side effects.\n useEffect(() => {\n const resolved = resolveRoot(root);\n if (!resolved) return;\n setContainer(getOrCreateContainer(resolved));\n }, [root, container?.isConnected]);\n\n return container;\n};\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;AACpB,MAAa,yBAAyB;AAGtC,MAAM,+BAAe,IAAI,SAA8B;AAEvD,MAAM,wBAAwB,SAAgD;CAC5E,MAAM,sBAAsB;AAC1B,MAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,MAAI,OAAO,eAAe,eAAe,gBAAgB,WAAY,QAAO;AAG5E,MAAI,EADW,SAAS,SAAS,MACpB,QAAO;EAEpB,MAAM,WAAW,SAAS,cAA2B,IAAI,oBAAoB;AAC7E,MAAI,SAAU,QAAO;EAErB,MAAM,mBAAmB,SAAS,cAChC,IAAI,uBAAuB,UAC5B;AACD,MAAI,iBAAkB,QAAO;AAE7B,SAAO;KACL;CAEJ,MAAM,SAAS,aAAa,IAAI,aAAa;AAC7C,KAAI,UAAU,OAAO,YAAa,QAAO;CAEzC,MAAM,KAAK,SAAS,cAAc,MAAM;AACxC,IAAG,aAAa,aAAa,OAAO;AACpC,cAAa,OAAO,GAAG;AACvB,cAAa,IAAI,cAAc,GAAG;AAClC,QAAO;;AAGT,MAAM,eAAe,SAA4E;AAC/F,KAAI,KAAM,QAAO;AACjB,QAAO,SAAS;;AAGlB,MAAa,6BACX,SACuB;CACvB,MAAM,CAAC,WAAW,gBAAgB,SAA6B,KAAK;AAIpE,iBAAgB;EACd,MAAM,WAAW,YAAY,KAAK;AAClC,MAAI,CAAC,SAAU;AACf,eAAa,qBAAqB,SAAS,CAAC;IAC3C,CAAC,MAAM,WAAW,YAAY,CAAC;AAElC,QAAO"}
1
+ {"version":3,"file":"PopoverPortal.mjs","names":[],"sources":["../../src/Popover/PopoverPortal.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nconst PORTAL_ATTR = 'data-lobe-ui-popover-portal';\nexport const POPOVER_CONTAINER_ATTR = 'data-lobe-ui-popover-container';\n\n// Reuse one portal container per root (document.body by default).\nconst containerMap = new WeakMap<object, HTMLElement>();\n\nconst getOrCreateContainer = (root: HTMLElement | ShadowRoot): HTMLElement => {\n const resolvedRoot = (() => {\n if (typeof document === 'undefined') return root;\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) return root;\n\n return root;\n })();\n\n const cached = containerMap.get(resolvedRoot);\n if (cached && cached.isConnected) return cached;\n\n const el = document.createElement('div');\n el.setAttribute(PORTAL_ATTR, 'true');\n resolvedRoot.append(el);\n containerMap.set(resolvedRoot, el);\n return el;\n};\n\nconst resolveRoot = (root?: HTMLElement | ShadowRoot | null): HTMLElement | ShadowRoot | null => {\n if (root) return root;\n return document.body;\n};\n\nexport const usePopoverPortalContainer = (\n root?: HTMLElement | ShadowRoot | null,\n): HTMLElement | null => {\n const [container, setContainer] = useState<HTMLElement | null>(null);\n\n // Never mutate DOM / create portal container during render.\n // Create it after mount to avoid SSR/hydration side effects.\n useEffect(() => {\n const resolved = resolveRoot(root);\n if (!resolved) return;\n setContainer(getOrCreateContainer(resolved));\n }, [root, container?.isConnected]);\n\n return container;\n};\n"],"mappings":";;;;;AAIA,MAAM,cAAc;AACpB,MAAa,yBAAyB;AAGtC,MAAM,+BAAe,IAAI,SAA8B;AAEvD,MAAM,wBAAwB,SAAgD;CAC5E,MAAM,sBAAsB;AAC1B,MAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,MAAI,OAAO,eAAe,eAAe,gBAAgB,WAAY,QAAO;AAE5E,SAAO;KACL;CAEJ,MAAM,SAAS,aAAa,IAAI,aAAa;AAC7C,KAAI,UAAU,OAAO,YAAa,QAAO;CAEzC,MAAM,KAAK,SAAS,cAAc,MAAM;AACxC,IAAG,aAAa,aAAa,OAAO;AACpC,cAAa,OAAO,GAAG;AACvB,cAAa,IAAI,cAAc,GAAG;AAClC,QAAO;;AAGT,MAAM,eAAe,SAA4E;AAC/F,KAAI,KAAM,QAAO;AACjB,QAAO,SAAS;;AAGlB,MAAa,6BACX,SACuB;CACvB,MAAM,CAAC,WAAW,gBAAgB,SAA6B,KAAK;AAIpE,iBAAgB;EACd,MAAM,WAAW,YAAY,KAAK;AAClC,MAAI,CAAC,SAAU;AACf,eAAa,qBAAqB,SAAS,CAAC;IAC3C,CAAC,MAAM,WAAW,YAAY,CAAC;AAElC,QAAO"}
@@ -1,13 +1,13 @@
1
1
  import { PopoverPlacement } from "./type.mjs";
2
- import * as react35 from "react";
2
+ import * as react54 from "react";
3
3
  import { ComponentProps, ComponentPropsWithRef } from "react";
4
- import * as react_jsx_runtime28 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime54 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: react35.ForwardRefExoticComponent<_base_ui_react_popover0.PopoverBackdropProps & react35.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_runtime28.JSX.Element;
21
+ }: PopoverTriggerElementProps): react_jsx_runtime54.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_runtime28.JSX.Element | null;
40
+ }: PopoverPortalAtomProps): react_jsx_runtime54.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_runtime28.JSX.Element;
57
+ }: PopoverPositionerAtomProps): react_jsx_runtime54.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_runtime28.JSX.Element;
65
+ }: PopoverPopupAtomProps): react_jsx_runtime54.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_runtime28.JSX.Element;
74
+ }: PopoverArrowAtomProps): react_jsx_runtime54.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_runtime28.JSX.Element;
82
+ }: PopoverViewportAtomProps): react_jsx_runtime54.JSX.Element;
83
83
  displayName: string;
84
84
  };
85
85
  //#endregion
@@ -1,11 +1,11 @@
1
- import * as react37 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: react37.NamedExoticComponent<{
8
+ declare const PopoverProvider: react52.NamedExoticComponent<{
9
9
  children: ReactNode;
10
10
  value: PopoverContextValue;
11
11
  }>;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime35 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime46 from "react/jsx-runtime";
3
3
  import { ScrollArea } from "@base-ui/react/scroll-area";
4
4
 
5
5
  //#region src/ScrollArea/atoms.d.ts
@@ -19,7 +19,7 @@ declare const ScrollAreaRoot: {
19
19
  ({
20
20
  className,
21
21
  ...rest
22
- }: ScrollAreaRootProps): react_jsx_runtime35.JSX.Element;
22
+ }: ScrollAreaRootProps): react_jsx_runtime46.JSX.Element;
23
23
  displayName: string;
24
24
  };
25
25
  declare const ScrollAreaViewport: {
@@ -27,35 +27,35 @@ declare const ScrollAreaViewport: {
27
27
  className,
28
28
  scrollFade,
29
29
  ...rest
30
- }: ScrollAreaViewportProps): react_jsx_runtime35.JSX.Element;
30
+ }: ScrollAreaViewportProps): react_jsx_runtime46.JSX.Element;
31
31
  displayName: string;
32
32
  };
33
33
  declare const ScrollAreaContent: {
34
34
  ({
35
35
  className,
36
36
  ...rest
37
- }: ScrollAreaContentProps): react_jsx_runtime35.JSX.Element;
37
+ }: ScrollAreaContentProps): react_jsx_runtime46.JSX.Element;
38
38
  displayName: string;
39
39
  };
40
40
  declare const ScrollAreaScrollbar: {
41
41
  ({
42
42
  className,
43
43
  ...rest
44
- }: ScrollAreaScrollbarProps): react_jsx_runtime35.JSX.Element;
44
+ }: ScrollAreaScrollbarProps): react_jsx_runtime46.JSX.Element;
45
45
  displayName: string;
46
46
  };
47
47
  declare const ScrollAreaThumb: {
48
48
  ({
49
49
  className,
50
50
  ...rest
51
- }: ScrollAreaThumbProps): react_jsx_runtime35.JSX.Element;
51
+ }: ScrollAreaThumbProps): react_jsx_runtime46.JSX.Element;
52
52
  displayName: string;
53
53
  };
54
54
  declare const ScrollAreaCorner: {
55
55
  ({
56
56
  className,
57
57
  ...rest
58
- }: ScrollAreaCornerProps): react_jsx_runtime35.JSX.Element;
58
+ }: ScrollAreaCornerProps): react_jsx_runtime46.JSX.Element;
59
59
  displayName: string;
60
60
  };
61
61
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { SearchBarProps } from "./type.mjs";
2
- import * as react18 from "react";
2
+ import * as react38 from "react";
3
3
 
4
4
  //#region src/SearchBar/SearchBar.d.ts
5
- declare const SearchBar: react18.NamedExoticComponent<SearchBarProps>;
5
+ declare const SearchBar: react38.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 react17 from "react";
2
+ import * as react44 from "react";
3
3
 
4
4
  //#region src/Segmented/Segmented.d.ts
5
- declare const Segmented: react17.NamedExoticComponent<SegmentedProps>;
5
+ declare const Segmented: react44.NamedExoticComponent<SegmentedProps>;
6
6
  //#endregion
7
7
  export { Segmented };
8
8
  //# sourceMappingURL=Segmented.d.mts.map
@@ -1,11 +1,11 @@
1
1
  import { SelectProps } from "./type.mjs";
2
- import * as react13 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/Select/Select.d.ts
5
5
  /**
6
6
  * @deprecated Use `LobeSelect` instead.
7
7
  */
8
- declare const Select: react13.NamedExoticComponent<SelectProps>;
8
+ declare const Select: react46.NamedExoticComponent<SelectProps>;
9
9
  //#endregion
10
10
  export { Select };
11
11
  //# sourceMappingURL=Select.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SideNavProps } from "./type.mjs";
2
- import * as react11 from "react";
2
+ import * as react45 from "react";
3
3
 
4
4
  //#region src/SideNav/SideNav.d.ts
5
- declare const SideNav: react11.NamedExoticComponent<SideNavProps>;
5
+ declare const SideNav: react45.NamedExoticComponent<SideNavProps>;
6
6
  //#endregion
7
7
  export { SideNav };
8
8
  //# sourceMappingURL=SideNav.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SliderWithInputProps } from "./type.mjs";
2
- import * as react12 from "react";
2
+ import * as react43 from "react";
3
3
 
4
4
  //#region src/SliderWithInput/SliderWithInput.d.ts
5
- declare const SliderWithInput: react12.NamedExoticComponent<SliderWithInputProps>;
5
+ declare const SliderWithInput: react43.NamedExoticComponent<SliderWithInputProps>;
6
6
  //#endregion
7
7
  export { SliderWithInput };
8
8
  //# sourceMappingURL=SliderWithInput.d.mts.map
@@ -1,4 +1,3 @@
1
- import { LOBE_THEME_APP_ID } from "../constants.mjs";
2
1
  import { CLASSNAMES } from "../../styles/classNames.mjs";
3
2
  import { css } from "antd-style";
4
3
 
@@ -63,10 +62,7 @@ var global_default = (token) => css`
63
62
  box-sizing: border-box;
64
63
  vertical-align: baseline;
65
64
  }
66
- #${LOBE_THEME_APP_ID} {
67
- /* https://base-ui.com/react/overview/quick-start#set-up-portals */
68
- isolation: isolate;
69
- }
65
+
70
66
  @layer lobe-popup {
71
67
  .${CLASSNAMES.ContextTrigger}[data-popup-open],
72
68
  .${CLASSNAMES.DropdownMenuTrigger}[data-popup-open] {
@@ -85,30 +81,27 @@ var global_default = (token) => css`
85
81
  --lobe-flex-width: auto;
86
82
  --lobe-flex-height: auto;
87
83
  --lobe-flex-padding: 0;
84
+
88
85
  /* Keep padding-inline/block aligned with padding by default, and prevent inheriting from parent */
89
86
  --lobe-flex-padding-inline: var(--lobe-flex-padding);
90
87
  --lobe-flex-padding-block: var(--lobe-flex-padding);
91
88
  --lobe-flex-gap: 0;
92
89
 
93
90
  display: flex;
94
-
95
91
  flex: var(--lobe-flex);
96
- flex-direction: var(--lobe-flex-direction);
97
- flex-wrap: var(--lobe-flex-wrap);
98
- justify-content: var(--lobe-flex-justify);
92
+ flex-flow: var(--lobe-flex-direction) var(--lobe-flex-wrap);
93
+ gap: var(--lobe-flex-gap);
99
94
  align-items: var(--lobe-flex-align);
95
+ justify-content: var(--lobe-flex-justify);
100
96
 
101
97
  width: var(--lobe-flex-width);
102
98
  height: var(--lobe-flex-height);
103
-
104
99
  padding: var(--lobe-flex-padding);
105
- padding-inline: var(--lobe-flex-padding-inline);
106
100
  padding-block: var(--lobe-flex-padding-block);
107
-
108
- gap: var(--lobe-flex-gap);
101
+ padding-inline: var(--lobe-flex-padding-inline);
109
102
  }
110
103
 
111
- .lobe-flex--hidden {
104
+ .lobe-flex-hidden {
112
105
  display: none;
113
106
  }
114
107
  }
@@ -126,17 +119,17 @@ var global_default = (token) => css`
126
119
 
127
120
  @keyframes fill {
128
121
  30% {
129
- fill-opacity: 5%;
122
+ fill-opacity: 0.05;
130
123
  }
131
124
 
132
125
  100% {
133
- fill-opacity: 100%;
126
+ fill-opacity: 1;
134
127
  }
135
128
  }
136
129
 
137
130
  .lobe-brand-loading path {
138
131
  fill: currentcolor;
139
- fill-opacity: 0%;
132
+ fill-opacity: 0;
140
133
  stroke: currentcolor;
141
134
  stroke-dasharray: 1000;
142
135
  stroke-dashoffset: 1000;
@@ -1 +1 @@
1
- {"version":3,"file":"global.mjs","names":[],"sources":["../../../src/ThemeProvider/GlobalStyle/global.ts"],"sourcesContent":["import { css, type Theme } from 'antd-style';\n\nimport { CLASSNAMES } from '@/styles/classNames';\n\nimport { LOBE_THEME_APP_ID } from '../constants';\n\nexport default (token: Theme) => css`\n :root {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n text-autospace: normal;\n }\n\n html {\n overscroll-behavior: none;\n color-scheme: ${token.isDarkMode ? 'dark' : 'light'};\n }\n\n body {\n overflow: hidden auto;\n\n min-height: 100vh;\n margin: 0;\n padding: 0;\n\n font-family: ${token.fontFamily};\n font-size: ${token.fontSize}px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1;\n color: ${token.colorTextBase};\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n word-wrap: break-word;\n vertical-align: baseline;\n\n background-color: ${token.colorBgLayout};\n\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n code {\n font-family: ${token.fontFamilyCode} !important;\n\n span {\n font-family: ${token.fontFamilyCode} !important;\n }\n }\n\n ::selection {\n color: #000;\n background: ${token.yellow9};\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n scrollbar-color: ${token.colorFill} transparent;\n scrollbar-width: thin;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n #${LOBE_THEME_APP_ID} {\n /* https://base-ui.com/react/overview/quick-start#set-up-portals */\n isolation: isolate;\n }\n @layer lobe-popup {\n .${CLASSNAMES.ContextTrigger}[data-popup-open],\n .${CLASSNAMES.DropdownMenuTrigger}[data-popup-open] {\n background: ${token.colorFillTertiary};\n }\n }\n\n @layer lobe-base {\n :where(.lobe-flex) {\n /* Define defaults on the element itself to avoid CSS variable inheritance leaking to nested Flex */\n --lobe-flex: 0 1 auto;\n --lobe-flex-direction: column;\n --lobe-flex-wrap: nowrap;\n --lobe-flex-justify: flex-start;\n --lobe-flex-align: stretch;\n --lobe-flex-width: auto;\n --lobe-flex-height: auto;\n --lobe-flex-padding: 0;\n /* Keep padding-inline/block aligned with padding by default, and prevent inheriting from parent */\n --lobe-flex-padding-inline: var(--lobe-flex-padding);\n --lobe-flex-padding-block: var(--lobe-flex-padding);\n --lobe-flex-gap: 0;\n\n display: flex;\n\n flex: var(--lobe-flex);\n flex-direction: var(--lobe-flex-direction);\n flex-wrap: var(--lobe-flex-wrap);\n justify-content: var(--lobe-flex-justify);\n align-items: var(--lobe-flex-align);\n\n width: var(--lobe-flex-width);\n height: var(--lobe-flex-height);\n\n padding: var(--lobe-flex-padding);\n padding-inline: var(--lobe-flex-padding-inline);\n padding-block: var(--lobe-flex-padding-block);\n\n gap: var(--lobe-flex-gap);\n }\n\n .lobe-flex--hidden {\n display: none;\n }\n }\n\n /* Brand Loading */\n @keyframes draw {\n 0% {\n stroke-dashoffset: 1000;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n }\n\n @keyframes fill {\n 30% {\n fill-opacity: 5%;\n }\n\n 100% {\n fill-opacity: 100%;\n }\n }\n\n .lobe-brand-loading path {\n fill: currentcolor;\n fill-opacity: 0%;\n stroke: currentcolor;\n stroke-dasharray: 1000;\n stroke-dashoffset: 1000;\n stroke-width: 0.25em;\n\n animation:\n draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,\n fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n`;\n"],"mappings":";;;;;AAMA,sBAAgB,UAAiB,GAAG;;;;;;;;;;oBAUhB,MAAM,aAAa,SAAS,QAAQ;;;;;;;;;;mBAUrC,MAAM,WAAW;iBACnB,MAAM,SAAS;;;;;;aAMnB,MAAM,cAAc;;;;;;wBAMT,MAAM,cAAc;;;;;;;mBAOzB,MAAM,eAAe;;;qBAGnB,MAAM,eAAe;;;;;;kBAMxB,MAAM,QAAQ;;;;;;uBAMT,MAAM,UAAU;;;;;KAKlC,kBAAkB;;;;;OAKhB,WAAW,eAAe;SACxB,WAAW,oBAAoB;oBACpB,MAAM,kBAAkB"}
1
+ {"version":3,"file":"global.mjs","names":[],"sources":["../../../src/ThemeProvider/GlobalStyle/global.ts"],"sourcesContent":["import { css, type Theme } from 'antd-style';\n\nimport { CLASSNAMES } from '@/styles/classNames';\n\nexport default (token: Theme) => css`\n :root {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n text-autospace: normal;\n }\n\n html {\n overscroll-behavior: none;\n color-scheme: ${token.isDarkMode ? 'dark' : 'light'};\n }\n\n body {\n overflow: hidden auto;\n\n min-height: 100vh;\n margin: 0;\n padding: 0;\n\n font-family: ${token.fontFamily};\n font-size: ${token.fontSize}px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1;\n color: ${token.colorTextBase};\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n word-wrap: break-word;\n vertical-align: baseline;\n\n background-color: ${token.colorBgLayout};\n\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n code {\n font-family: ${token.fontFamilyCode} !important;\n\n span {\n font-family: ${token.fontFamilyCode} !important;\n }\n }\n\n ::selection {\n color: #000;\n background: ${token.yellow9};\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n scrollbar-color: ${token.colorFill} transparent;\n scrollbar-width: thin;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n\n @layer lobe-popup {\n .${CLASSNAMES.ContextTrigger}[data-popup-open],\n .${CLASSNAMES.DropdownMenuTrigger}[data-popup-open] {\n background: ${token.colorFillTertiary};\n }\n }\n\n @layer lobe-base {\n :where(.lobe-flex) {\n /* Define defaults on the element itself to avoid CSS variable inheritance leaking to nested Flex */\n --lobe-flex: 0 1 auto;\n --lobe-flex-direction: column;\n --lobe-flex-wrap: nowrap;\n --lobe-flex-justify: flex-start;\n --lobe-flex-align: stretch;\n --lobe-flex-width: auto;\n --lobe-flex-height: auto;\n --lobe-flex-padding: 0;\n\n /* Keep padding-inline/block aligned with padding by default, and prevent inheriting from parent */\n --lobe-flex-padding-inline: var(--lobe-flex-padding);\n --lobe-flex-padding-block: var(--lobe-flex-padding);\n --lobe-flex-gap: 0;\n\n display: flex;\n flex: var(--lobe-flex);\n flex-flow: var(--lobe-flex-direction) var(--lobe-flex-wrap);\n gap: var(--lobe-flex-gap);\n align-items: var(--lobe-flex-align);\n justify-content: var(--lobe-flex-justify);\n\n width: var(--lobe-flex-width);\n height: var(--lobe-flex-height);\n padding: var(--lobe-flex-padding);\n padding-block: var(--lobe-flex-padding-block);\n padding-inline: var(--lobe-flex-padding-inline);\n }\n\n .lobe-flex-hidden {\n display: none;\n }\n }\n\n /* Brand Loading */\n @keyframes draw {\n 0% {\n stroke-dashoffset: 1000;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n }\n\n @keyframes fill {\n 30% {\n fill-opacity: 0.05;\n }\n\n 100% {\n fill-opacity: 1;\n }\n }\n\n .lobe-brand-loading path {\n fill: currentcolor;\n fill-opacity: 0;\n stroke: currentcolor;\n stroke-dasharray: 1000;\n stroke-dashoffset: 1000;\n stroke-width: 0.25em;\n\n animation:\n draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,\n fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n`;\n"],"mappings":";;;;AAIA,sBAAgB,UAAiB,GAAG;;;;;;;;;;oBAUhB,MAAM,aAAa,SAAS,QAAQ;;;;;;;;;;mBAUrC,MAAM,WAAW;iBACnB,MAAM,SAAS;;;;;;aAMnB,MAAM,cAAc;;;;;;wBAMT,MAAM,cAAc;;;;;;;mBAOzB,MAAM,eAAe;;;qBAGnB,MAAM,eAAe;;;;;;kBAMxB,MAAM,QAAQ;;;;;;uBAMT,MAAM,UAAU;;;;;;;OAOhC,WAAW,eAAe;SACxB,WAAW,oBAAoB;oBACpB,MAAM,kBAAkB"}
@@ -1,8 +1,8 @@
1
1
  import { ThemeProviderProps } from "./type.mjs";
2
- import * as react10 from "react";
2
+ import * as react31 from "react";
3
3
 
4
4
  //#region src/ThemeProvider/ThemeProvider.d.ts
5
- declare const ThemeProvider: react10.NamedExoticComponent<ThemeProviderProps>;
5
+ declare const ThemeProvider: react31.NamedExoticComponent<ThemeProviderProps>;
6
6
  //#endregion
7
7
  export { ThemeProvider };
8
8
  //# sourceMappingURL=ThemeProvider.d.mts.map
@@ -3,20 +3,50 @@
3
3
  import { useCdnFn } from "../ConfigProvider/index.mjs";
4
4
  import { generateCustomStylish } from "../styles/theme/customStylish.mjs";
5
5
  import { generateCustomToken } from "../styles/theme/customToken.mjs";
6
- import { LOBE_THEME_APP_ID } from "./constants.mjs";
7
6
  import FontLoader_default from "../FontLoader/index.mjs";
7
+ import { LOBE_THEME_APP_ID } from "./constants.mjs";
8
8
  import { createLobeAntdTheme } from "../styles/theme/antdTheme.mjs";
9
9
  import ConfigProvider_default from "./ConfigProvider.mjs";
10
10
  import GlobalStyle_default from "./GlobalStyle/index.mjs";
11
- import { memo, useCallback, useMemo } from "react";
11
+ import { memo, useCallback, useLayoutEffect, useMemo, useRef } from "react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { App } from "antd";
14
14
  import { ThemeProvider } from "antd-style";
15
15
  import { merge } from "es-toolkit/compat";
16
16
 
17
17
  //#region src/ThemeProvider/ThemeProvider.tsx
18
+ const CSS_VAR_PREFIX = "css-var-";
18
19
  const ThemeProvider$1 = memo(({ children, customStylish, customToken, enableCustomFonts = true, enableGlobalStyle = true, customFonts, customTheme = {}, className, style, theme: antdTheme, ...rest }) => {
19
20
  const genCdnUrl = useCdnFn();
21
+ const appRef = useRef(null);
22
+ useLayoutEffect(() => {
23
+ const node = appRef.current;
24
+ if (!node) return;
25
+ const htmlEl = document.documentElement;
26
+ let currentClasses = [];
27
+ const syncCssVarClasses = () => {
28
+ for (const cls of currentClasses) htmlEl.classList.remove(cls);
29
+ const newClasses = [];
30
+ let el$1 = node;
31
+ while (el$1 && el$1 !== htmlEl) {
32
+ for (const cls of el$1.classList) if (cls.startsWith(CSS_VAR_PREFIX)) newClasses.push(cls);
33
+ el$1 = el$1.parentElement;
34
+ }
35
+ for (const cls of newClasses) htmlEl.classList.add(cls);
36
+ currentClasses = newClasses;
37
+ };
38
+ syncCssVarClasses();
39
+ const observer = new MutationObserver(syncCssVarClasses);
40
+ let el = node;
41
+ while (el && el !== htmlEl) {
42
+ observer.observe(el, { attributeFilter: ["class"] });
43
+ el = el.parentElement;
44
+ }
45
+ return () => {
46
+ observer.disconnect();
47
+ for (const cls of currentClasses) htmlEl.classList.remove(cls);
48
+ };
49
+ }, []);
20
50
  const webfontUrls = useMemo(() => customFonts || [
21
51
  genCdnUrl({
22
52
  path: "css/index.css",
@@ -62,12 +92,14 @@ const ThemeProvider$1 = memo(({ children, customStylish, customToken, enableCust
62
92
  children: /* @__PURE__ */ jsxs(ConfigProvider_default, { children: [enableGlobalStyle && /* @__PURE__ */ jsx(GlobalStyle_default, {}), /* @__PURE__ */ jsx(App, {
63
93
  className,
64
94
  style: {
95
+ isolation: "isolate",
65
96
  minHeight: "inherit",
66
97
  width: "inherit",
67
98
  ...style
68
99
  },
69
100
  children: /* @__PURE__ */ jsx("div", {
70
101
  id: LOBE_THEME_APP_ID,
102
+ ref: appRef,
71
103
  style: { display: "contents" },
72
104
  children
73
105
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.mjs","names":["ThemeProvider","lobeCustomStylish","theme","lobeCustomToken","FontLoader","AntdThemeProvider","AntdConfigProvider","GlobalStyle"],"sources":["../../src/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["'use client';\n\nimport { App } from 'antd';\nimport {\n type CustomStylishParams,\n type CustomTokenParams,\n type GetAntdTheme,\n ThemeProvider as AntdThemeProvider,\n} from 'antd-style';\nimport { merge } from 'es-toolkit/compat';\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { useCdnFn } from '@/ConfigProvider';\nimport FontLoader from '@/FontLoader';\nimport { lobeCustomStylish, lobeCustomToken } from '@/styles';\nimport { createLobeAntdTheme } from '@/styles/theme/antdTheme';\nimport { type LobeCustomToken } from '@/types/customToken';\n\nimport AntdConfigProvider from './ConfigProvider';\nimport { LOBE_THEME_APP_ID } from './constants';\nimport GlobalStyle from './GlobalStyle';\nimport { type ThemeProviderProps } from './type';\n\nconst ThemeProvider = memo<ThemeProviderProps>(\n ({\n children,\n customStylish,\n customToken,\n enableCustomFonts = true,\n enableGlobalStyle = true,\n customFonts,\n customTheme = {},\n className,\n style,\n theme: antdTheme,\n ...rest\n }) => {\n const genCdnUrl = useCdnFn();\n\n const webfontUrls = useMemo(\n () =>\n customFonts || [\n genCdnUrl({ path: 'css/index.css', pkg: '@lobehub/webfont-mono' }),\n genCdnUrl({\n path: 'css/index.css',\n pkg: '@lobehub/webfont-harmony-sans',\n }),\n genCdnUrl({\n path: 'css/index.css',\n pkg: '@lobehub/webfont-harmony-sans-sc',\n }),\n genCdnUrl({ path: 'dist/katex.min.css', pkg: 'katex' }),\n ],\n [customFonts, genCdnUrl],\n );\n\n const stylish = useCallback(\n (theme: CustomStylishParams) => ({ ...lobeCustomStylish(theme), ...customStylish?.(theme) }),\n [customStylish],\n );\n\n const token = useCallback(\n (theme: CustomTokenParams) => ({ ...lobeCustomToken(theme), ...customToken?.(theme) }),\n [customToken],\n );\n\n const theme = useCallback<GetAntdTheme>(\n (appearance) => {\n const lobeTheme = createLobeAntdTheme({\n appearance,\n neutralColor: customTheme.neutralColor,\n primaryColor: customTheme.primaryColor,\n });\n return merge(lobeTheme, antdTheme);\n },\n [customTheme.primaryColor, customTheme.neutralColor, antdTheme],\n );\n\n return (\n <>\n {enableCustomFonts &&\n webfontUrls?.length > 0 &&\n webfontUrls.map((webfont) => <FontLoader key={webfont} url={webfont} />)}\n <AntdThemeProvider<LobeCustomToken>\n customStylish={stylish}\n customToken={token}\n theme={theme}\n {...rest}\n >\n <AntdConfigProvider>\n {enableGlobalStyle && <GlobalStyle />}\n\n <App className={className} style={{ minHeight: 'inherit', width: 'inherit', ...style }}>\n <div id={LOBE_THEME_APP_ID} style={{ display: 'contents' }}>\n {children}\n </div>\n </App>\n </AntdConfigProvider>\n </AntdThemeProvider>\n </>\n );\n },\n);\n\nThemeProvider.displayName = 'LobeThemeProvider';\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAMA,kBAAgB,MACnB,EACC,UACA,eACA,aACA,oBAAoB,MACpB,oBAAoB,MACpB,aACA,cAAc,EAAE,EAChB,WACA,OACA,OAAO,WACP,GAAG,WACC;CACJ,MAAM,YAAY,UAAU;CAE5B,MAAM,cAAc,cAEhB,eAAe;EACb,UAAU;GAAE,MAAM;GAAiB,KAAK;GAAyB,CAAC;EAClE,UAAU;GACR,MAAM;GACN,KAAK;GACN,CAAC;EACF,UAAU;GACR,MAAM;GACN,KAAK;GACN,CAAC;EACF,UAAU;GAAE,MAAM;GAAsB,KAAK;GAAS,CAAC;EACxD,EACH,CAAC,aAAa,UAAU,CACzB;CAED,MAAM,UAAU,aACb,aAAgC;EAAE,GAAGC,sBAAkBC,QAAM;EAAE,GAAG,gBAAgBA,QAAM;EAAE,GAC3F,CAAC,cAAc,CAChB;CAED,MAAM,QAAQ,aACX,aAA8B;EAAE,GAAGC,oBAAgBD,QAAM;EAAE,GAAG,cAAcA,QAAM;EAAE,GACrF,CAAC,YAAY,CACd;CAED,MAAM,QAAQ,aACX,eAAe;AAMd,SAAO,MALW,oBAAoB;GACpC;GACA,cAAc,YAAY;GAC1B,cAAc,YAAY;GAC3B,CAAC,EACsB,UAAU;IAEpC;EAAC,YAAY;EAAc,YAAY;EAAc;EAAU,CAChE;AAED,QACE,8CACG,qBACC,aAAa,SAAS,KACtB,YAAY,KAAK,YAAY,oBAACE,sBAAyB,KAAK,WAAd,QAAyB,CAAC,EAC1E,oBAACC;EACC,eAAe;EACf,aAAa;EACN;EACP,GAAI;YAEJ,qBAACC,qCACE,qBAAqB,oBAACC,wBAAc,EAErC,oBAAC;GAAe;GAAW,OAAO;IAAE,WAAW;IAAW,OAAO;IAAW,GAAG;IAAO;aACpF,oBAAC;IAAI,IAAI;IAAmB,OAAO,EAAE,SAAS,YAAY;IACvD;KACG;IACF,IACa;GACH,IACnB;EAGR;AAED,gBAAc,cAAc;AAE5B,4BAAeP"}
1
+ {"version":3,"file":"ThemeProvider.mjs","names":["ThemeProvider","currentClasses: string[]","newClasses: string[]","el: HTMLElement | null","el","lobeCustomStylish","theme","lobeCustomToken","FontLoader","AntdThemeProvider","AntdConfigProvider","GlobalStyle"],"sources":["../../src/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["'use client';\n\nimport { App } from 'antd';\nimport {\n type CustomStylishParams,\n type CustomTokenParams,\n type GetAntdTheme,\n ThemeProvider as AntdThemeProvider,\n} from 'antd-style';\nimport { merge } from 'es-toolkit/compat';\nimport { memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';\n\nimport { useCdnFn } from '@/ConfigProvider';\nimport FontLoader from '@/FontLoader';\nimport { lobeCustomStylish, lobeCustomToken } from '@/styles';\nimport { createLobeAntdTheme } from '@/styles/theme/antdTheme';\nimport { type LobeCustomToken } from '@/types/customToken';\n\nimport AntdConfigProvider from './ConfigProvider';\nimport { LOBE_THEME_APP_ID } from './constants';\nimport GlobalStyle from './GlobalStyle';\nimport { type ThemeProviderProps } from './type';\n\nconst CSS_VAR_PREFIX = 'css-var-';\n\nconst ThemeProvider = memo<ThemeProviderProps>(\n ({\n children,\n customStylish,\n customToken,\n enableCustomFonts = true,\n enableGlobalStyle = true,\n customFonts,\n customTheme = {},\n className,\n style,\n theme: antdTheme,\n ...rest\n }) => {\n const genCdnUrl = useCdnFn();\n const appRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n const node = appRef.current;\n if (!node) return;\n\n const htmlEl = document.documentElement;\n let currentClasses: string[] = [];\n\n const syncCssVarClasses = () => {\n for (const cls of currentClasses) {\n htmlEl.classList.remove(cls);\n }\n\n const newClasses: string[] = [];\n let el: HTMLElement | null = node;\n while (el && el !== htmlEl) {\n for (const cls of el.classList) {\n if (cls.startsWith(CSS_VAR_PREFIX)) {\n newClasses.push(cls);\n }\n }\n el = el.parentElement;\n }\n\n for (const cls of newClasses) {\n htmlEl.classList.add(cls);\n }\n currentClasses = newClasses;\n };\n\n syncCssVarClasses();\n\n const observer = new MutationObserver(syncCssVarClasses);\n let el: HTMLElement | null = node;\n while (el && el !== htmlEl) {\n observer.observe(el, { attributeFilter: ['class'] });\n el = el.parentElement;\n }\n\n return () => {\n observer.disconnect();\n for (const cls of currentClasses) {\n htmlEl.classList.remove(cls);\n }\n };\n }, []);\n\n const webfontUrls = useMemo(\n () =>\n customFonts || [\n genCdnUrl({ path: 'css/index.css', pkg: '@lobehub/webfont-mono' }),\n genCdnUrl({\n path: 'css/index.css',\n pkg: '@lobehub/webfont-harmony-sans',\n }),\n genCdnUrl({\n path: 'css/index.css',\n pkg: '@lobehub/webfont-harmony-sans-sc',\n }),\n genCdnUrl({ path: 'dist/katex.min.css', pkg: 'katex' }),\n ],\n [customFonts, genCdnUrl],\n );\n\n const stylish = useCallback(\n (theme: CustomStylishParams) => ({ ...lobeCustomStylish(theme), ...customStylish?.(theme) }),\n [customStylish],\n );\n\n const token = useCallback(\n (theme: CustomTokenParams) => ({ ...lobeCustomToken(theme), ...customToken?.(theme) }),\n [customToken],\n );\n\n const theme = useCallback<GetAntdTheme>(\n (appearance) => {\n const lobeTheme = createLobeAntdTheme({\n appearance,\n neutralColor: customTheme.neutralColor,\n primaryColor: customTheme.primaryColor,\n });\n return merge(lobeTheme, antdTheme);\n },\n [customTheme.primaryColor, customTheme.neutralColor, antdTheme],\n );\n\n return (\n <>\n {enableCustomFonts &&\n webfontUrls?.length > 0 &&\n webfontUrls.map((webfont) => <FontLoader key={webfont} url={webfont} />)}\n <AntdThemeProvider<LobeCustomToken>\n customStylish={stylish}\n customToken={token}\n theme={theme}\n {...rest}\n >\n <AntdConfigProvider>\n {enableGlobalStyle && <GlobalStyle />}\n\n <App\n className={className}\n style={{ isolation: 'isolate', minHeight: 'inherit', width: 'inherit', ...style }}\n >\n <div id={LOBE_THEME_APP_ID} ref={appRef} style={{ display: 'contents' }}>\n {children}\n </div>\n </App>\n </AntdConfigProvider>\n </AntdThemeProvider>\n </>\n );\n },\n);\n\nThemeProvider.displayName = 'LobeThemeProvider';\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAM,iBAAiB;AAEvB,MAAMA,kBAAgB,MACnB,EACC,UACA,eACA,aACA,oBAAoB,MACpB,oBAAoB,MACpB,aACA,cAAc,EAAE,EAChB,WACA,OACA,OAAO,WACP,GAAG,WACC;CACJ,MAAM,YAAY,UAAU;CAC5B,MAAM,SAAS,OAAuB,KAAK;AAE3C,uBAAsB;EACpB,MAAM,OAAO,OAAO;AACpB,MAAI,CAAC,KAAM;EAEX,MAAM,SAAS,SAAS;EACxB,IAAIC,iBAA2B,EAAE;EAEjC,MAAM,0BAA0B;AAC9B,QAAK,MAAM,OAAO,eAChB,QAAO,UAAU,OAAO,IAAI;GAG9B,MAAMC,aAAuB,EAAE;GAC/B,IAAIC,OAAyB;AAC7B,UAAOC,QAAMA,SAAO,QAAQ;AAC1B,SAAK,MAAM,OAAOA,KAAG,UACnB,KAAI,IAAI,WAAW,eAAe,CAChC,YAAW,KAAK,IAAI;AAGxB,WAAKA,KAAG;;AAGV,QAAK,MAAM,OAAO,WAChB,QAAO,UAAU,IAAI,IAAI;AAE3B,oBAAiB;;AAGnB,qBAAmB;EAEnB,MAAM,WAAW,IAAI,iBAAiB,kBAAkB;EACxD,IAAID,KAAyB;AAC7B,SAAO,MAAM,OAAO,QAAQ;AAC1B,YAAS,QAAQ,IAAI,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC;AACpD,QAAK,GAAG;;AAGV,eAAa;AACX,YAAS,YAAY;AACrB,QAAK,MAAM,OAAO,eAChB,QAAO,UAAU,OAAO,IAAI;;IAG/B,EAAE,CAAC;CAEN,MAAM,cAAc,cAEhB,eAAe;EACb,UAAU;GAAE,MAAM;GAAiB,KAAK;GAAyB,CAAC;EAClE,UAAU;GACR,MAAM;GACN,KAAK;GACN,CAAC;EACF,UAAU;GACR,MAAM;GACN,KAAK;GACN,CAAC;EACF,UAAU;GAAE,MAAM;GAAsB,KAAK;GAAS,CAAC;EACxD,EACH,CAAC,aAAa,UAAU,CACzB;CAED,MAAM,UAAU,aACb,aAAgC;EAAE,GAAGE,sBAAkBC,QAAM;EAAE,GAAG,gBAAgBA,QAAM;EAAE,GAC3F,CAAC,cAAc,CAChB;CAED,MAAM,QAAQ,aACX,aAA8B;EAAE,GAAGC,oBAAgBD,QAAM;EAAE,GAAG,cAAcA,QAAM;EAAE,GACrF,CAAC,YAAY,CACd;CAED,MAAM,QAAQ,aACX,eAAe;AAMd,SAAO,MALW,oBAAoB;GACpC;GACA,cAAc,YAAY;GAC1B,cAAc,YAAY;GAC3B,CAAC,EACsB,UAAU;IAEpC;EAAC,YAAY;EAAc,YAAY;EAAc;EAAU,CAChE;AAED,QACE,8CACG,qBACC,aAAa,SAAS,KACtB,YAAY,KAAK,YAAY,oBAACE,sBAAyB,KAAK,WAAd,QAAyB,CAAC,EAC1E,oBAACC;EACC,eAAe;EACf,aAAa;EACN;EACP,GAAI;YAEJ,qBAACC,qCACE,qBAAqB,oBAACC,wBAAc,EAErC,oBAAC;GACY;GACX,OAAO;IAAE,WAAW;IAAW,WAAW;IAAW,OAAO;IAAW,GAAG;IAAO;aAEjF,oBAAC;IAAI,IAAI;IAAmB,KAAK;IAAQ,OAAO,EAAE,SAAS,YAAY;IACpE;KACG;IACF,IACa;GACH,IACnB;EAGR;AAED,gBAAc,cAAc;AAE5B,4BAAeX"}
@@ -1,5 +1,5 @@
1
1
  import { ToastAPI, ToastPosition } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react28 from "react";
3
3
 
4
4
  //#region src/Toast/imperative.d.ts
5
5
  declare const toast: ToastAPI;
@@ -31,14 +31,14 @@ interface ToastHostProps {
31
31
  */
32
32
  swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];
33
33
  }
34
- declare const ToastHost: react15.MemoExoticComponent<({
34
+ declare const ToastHost: react28.MemoExoticComponent<({
35
35
  root,
36
36
  className,
37
37
  duration,
38
38
  limit,
39
39
  position,
40
40
  swipeDirection
41
- }: ToastHostProps) => react15.ReactPortal | null>;
41
+ }: ToastHostProps) => react28.ReactPortal | null>;
42
42
  declare const useToast: () => ToastAPI;
43
43
  //#endregion
44
44
  export { TOAST_CONTAINER_ATTR, ToastHost, ToastHostProps, toast, useToast };