@tiny-codes/react-easy 1.7.5 → 1.7.7

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 (138) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/es/components/Animation/Pulse/index.d.ts +18 -2
  3. package/es/components/Animation/Pulse/index.js +1 -1
  4. package/es/components/Animation/Pulse/index.js.map +1 -1
  5. package/es/components/BreakLines/index.d.ts +7 -7
  6. package/es/components/BreakLines/index.js.map +1 -1
  7. package/es/components/ColumnSetting/index.d.ts +7 -2
  8. package/es/components/ColumnSetting/index.js +29 -17
  9. package/es/components/ColumnSetting/index.js.map +1 -1
  10. package/es/components/ConfigProvider/context.d.ts +38 -0
  11. package/es/components/ConfigProvider/context.js +2 -1
  12. package/es/components/ConfigProvider/context.js.map +1 -1
  13. package/es/components/ConfigProvider/index.d.ts +22 -4
  14. package/es/components/ConfigProvider/index.js +22 -10
  15. package/es/components/ConfigProvider/index.js.map +1 -1
  16. package/es/components/ConfigProvider/style/index.js +1 -1
  17. package/es/components/ConfigProvider/style/index.js.map +1 -1
  18. package/es/components/ContextMenu/index.d.ts +16 -0
  19. package/es/components/ContextMenu/index.js +3 -2
  20. package/es/components/ContextMenu/index.js.map +1 -1
  21. package/es/components/ContextMenu/style/index.js.map +1 -1
  22. package/es/components/DeleteConfirmAction/withDeleteConfirmAction.d.ts +3 -3
  23. package/es/components/EditableText/form.d.ts +4 -0
  24. package/es/components/EditableText/form.js.map +1 -1
  25. package/es/components/EditableText/index.d.ts +6 -2
  26. package/es/components/EditableText/index.js +3 -2
  27. package/es/components/EditableText/index.js.map +1 -1
  28. package/es/components/FloatDrawer/index.d.ts +10 -0
  29. package/es/components/FloatDrawer/index.js +3 -2
  30. package/es/components/FloatDrawer/index.js.map +1 -1
  31. package/es/components/FloatDrawer/style/index.js +1 -1
  32. package/es/components/FloatDrawer/style/index.js.map +1 -1
  33. package/es/components/Iconfont/createIconfont.d.ts +28 -0
  34. package/es/components/Iconfont/createIconfont.js +57 -0
  35. package/es/components/Iconfont/createIconfont.js.map +1 -0
  36. package/es/components/Iconfont/index.d.ts +1 -0
  37. package/es/components/Iconfont/index.js +2 -0
  38. package/es/components/Iconfont/index.js.map +1 -0
  39. package/es/components/Loading/index.js +3 -2
  40. package/es/components/Loading/index.js.map +1 -1
  41. package/es/components/Loading/style/index.js +1 -1
  42. package/es/components/Loading/style/index.js.map +1 -1
  43. package/es/components/OverflowTags/index.d.ts +2 -0
  44. package/es/components/OverflowTags/index.js +3 -2
  45. package/es/components/OverflowTags/index.js.map +1 -1
  46. package/es/components/OverflowTags/style/index.js +1 -1
  47. package/es/components/OverflowTags/style/index.js.map +1 -1
  48. package/es/components/index.d.ts +1 -0
  49. package/es/components/index.js +1 -0
  50. package/es/components/index.js.map +1 -1
  51. package/es/hooks/index.d.ts +2 -0
  52. package/es/hooks/index.js +2 -0
  53. package/es/hooks/index.js.map +1 -1
  54. package/es/hooks/style/useSplitter.d.ts +3 -0
  55. package/es/hooks/style/useSplitter.js +40 -0
  56. package/es/hooks/style/useSplitter.js.map +1 -0
  57. package/es/hooks/useLocalStorage.d.ts +16 -0
  58. package/es/hooks/useLocalStorage.js +115 -0
  59. package/es/hooks/useLocalStorage.js.map +1 -0
  60. package/es/hooks/useMovable.js +2 -2
  61. package/es/hooks/useMovable.js.map +1 -1
  62. package/es/hooks/useSplitter.d.ts +52 -9
  63. package/es/hooks/useSplitter.js +69 -39
  64. package/es/hooks/useSplitter.js.map +1 -1
  65. package/es/locales/index.js +1 -1
  66. package/es/locales/index.js.map +1 -1
  67. package/es/utils/math.d.ts +11 -3
  68. package/es/utils/math.js +62 -9
  69. package/es/utils/math.js.map +1 -1
  70. package/lib/components/Animation/Pulse/index.d.ts +18 -2
  71. package/lib/components/Animation/Pulse/index.js +0 -5
  72. package/lib/components/Animation/Pulse/index.js.map +2 -2
  73. package/lib/components/BreakLines/index.d.ts +7 -7
  74. package/lib/components/BreakLines/index.js.map +1 -1
  75. package/lib/components/ColumnSetting/index.d.ts +7 -2
  76. package/lib/components/ColumnSetting/index.js +20 -15
  77. package/lib/components/ColumnSetting/index.js.map +3 -3
  78. package/lib/components/ConfigProvider/context.d.ts +38 -0
  79. package/lib/components/ConfigProvider/context.js +2 -1
  80. package/lib/components/ConfigProvider/context.js.map +2 -2
  81. package/lib/components/ConfigProvider/index.d.ts +22 -4
  82. package/lib/components/ConfigProvider/index.js +17 -6
  83. package/lib/components/ConfigProvider/index.js.map +2 -2
  84. package/lib/components/ConfigProvider/style/index.js +1 -1
  85. package/lib/components/ConfigProvider/style/index.js.map +2 -2
  86. package/lib/components/ContextMenu/index.d.ts +16 -0
  87. package/lib/components/ContextMenu/index.js +2 -1
  88. package/lib/components/ContextMenu/index.js.map +3 -3
  89. package/lib/components/ContextMenu/style/index.js.map +2 -2
  90. package/lib/components/DeleteConfirmAction/withDeleteConfirmAction.d.ts +3 -3
  91. package/lib/components/EditableText/form.d.ts +4 -0
  92. package/lib/components/EditableText/form.js.map +2 -2
  93. package/lib/components/EditableText/index.d.ts +6 -2
  94. package/lib/components/EditableText/index.js +3 -2
  95. package/lib/components/EditableText/index.js.map +3 -3
  96. package/lib/components/FloatDrawer/index.d.ts +10 -0
  97. package/lib/components/FloatDrawer/index.js +3 -2
  98. package/lib/components/FloatDrawer/index.js.map +3 -3
  99. package/lib/components/FloatDrawer/style/index.js +1 -1
  100. package/lib/components/FloatDrawer/style/index.js.map +2 -2
  101. package/lib/components/Iconfont/createIconfont.d.ts +28 -0
  102. package/lib/components/Iconfont/createIconfont.js +65 -0
  103. package/lib/components/Iconfont/createIconfont.js.map +7 -0
  104. package/lib/components/Iconfont/index.d.ts +1 -0
  105. package/lib/components/Iconfont/index.js +24 -0
  106. package/lib/components/Iconfont/index.js.map +7 -0
  107. package/lib/components/Loading/index.js +3 -2
  108. package/lib/components/Loading/index.js.map +3 -3
  109. package/lib/components/Loading/style/index.js +1 -1
  110. package/lib/components/Loading/style/index.js.map +2 -2
  111. package/lib/components/OverflowTags/index.d.ts +2 -0
  112. package/lib/components/OverflowTags/index.js +3 -2
  113. package/lib/components/OverflowTags/index.js.map +3 -3
  114. package/lib/components/OverflowTags/style/index.js +1 -1
  115. package/lib/components/OverflowTags/style/index.js.map +2 -2
  116. package/lib/components/index.d.ts +1 -0
  117. package/lib/components/index.js +3 -1
  118. package/lib/components/index.js.map +2 -2
  119. package/lib/hooks/index.d.ts +2 -0
  120. package/lib/hooks/index.js +5 -0
  121. package/lib/hooks/index.js.map +2 -2
  122. package/lib/hooks/style/useSplitter.d.ts +3 -0
  123. package/lib/hooks/style/useSplitter.js +72 -0
  124. package/lib/hooks/style/useSplitter.js.map +7 -0
  125. package/lib/hooks/useLocalStorage.d.ts +16 -0
  126. package/lib/hooks/useLocalStorage.js +120 -0
  127. package/lib/hooks/useLocalStorage.js.map +7 -0
  128. package/lib/hooks/useMovable.js +2 -2
  129. package/lib/hooks/useMovable.js.map +3 -3
  130. package/lib/hooks/useSplitter.d.ts +52 -9
  131. package/lib/hooks/useSplitter.js +56 -26
  132. package/lib/hooks/useSplitter.js.map +3 -3
  133. package/lib/locales/index.js +1 -1
  134. package/lib/locales/index.js.map +1 -1
  135. package/lib/utils/math.d.ts +11 -3
  136. package/lib/utils/math.js +43 -8
  137. package/lib/utils/math.js.map +3 -3
  138. package/package.json +14 -7
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Iconfont/createIconfont.tsx"],
4
+ "sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport classNames from 'classnames';\nimport { createFromIconfontCN } from '@ant-design/icons';\nimport type { IconFontProps as AntIconFontProps } from '@ant-design/icons/es/components/IconFont';\nimport ConfigProvider from '../ConfigProvider';\n\n/**\n * - **EN:** Props for the Iconfont component\n * - **CN:** Iconfont 组件的props\n */\nexport interface IconfontProps<T extends string = string> extends Omit<AntIconFontProps<T>, 'type' | 'size'> {\n /**\n * - **EN:** Icon name. Find an icon in iconfont and click `Copy Code`\n * - **CN:** 图标名称。在 iconfont 中找到某个图标,点击`复制代码`\n */\n type: T;\n /**\n * - **EN:** Icon size, an alias for `style.fontSize`\n * - **CN:** 图标尺寸,是 `style.fontSize` 的别名\n */\n size?: CSSProperties['fontSize'];\n}\n\n/**\n * - **EN:** Create an Iconfont component with a specified iconfont script URL.\n * - **CN:** 创建一个Iconfont组件,指定iconfont的脚本地址\n *\n * @param scriptUrl - Path to the iconfont script | 字体图标的路径\n */\nexport const createIconfont = <T extends string = string>(\n scriptUrl: string,\n options?: {\n /** Icon name prefix | 图标名称前缀 */\n iconPrefix?: string;\n }\n): FC<IconfontProps<T>> => {\n const { iconPrefix = '' } = options || {};\n const AntdIconfont = createFromIconfontCN({ scriptUrl });\n /**\n * - **EN:** Render an iconfont icon, setting the `type` prop to the iconfont icon name.\n * - **CN:** 渲染一个 iconfont 的图标,把 `type` 属性设置为 iconfont 字体的图标名\n */\n const Iconfont: FC<IconfontProps<T>> = (props) => {\n const { type, className, size, style, ...iconProps } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const iconType = type.startsWith(iconPrefix) ? type : `${iconPrefix}-${type}`;\n\n return (\n <AntdIconfont\n type={iconType}\n className={classNames(getPrefixCls('iconfont'), className)}\n style={{\n ...style,\n fontSize: style?.fontSize ?? size,\n }}\n {...iconProps}\n />\n );\n };\n return Iconfont;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AACxD,wBAAuB;AACvB,mBAAqC;AAErC,4BAA2B;AAyBpB,IAAM,iBAAiB,CAC5B,WACA,YAIyB;AACzB,QAAM,EAAE,aAAa,GAAG,IAAI,WAAW,CAAC;AACxC,QAAM,mBAAe,mCAAqB,EAAE,UAAU,CAAC;AAKvD,QAAM,WAAiC,CAAC,UAAU;AAChD,UAAM,EAAE,MAAM,WAAW,MAAM,OAAO,GAAG,UAAU,IAAI;AACvD,UAAM,EAAE,aAAa,QAAI,yBAAW,sBAAAA,QAAe,aAAa;AAChE,UAAM,WAAW,KAAK,WAAW,UAAU,IAAI,OAAO,GAAG,cAAc;AAEvE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,eAAW,kBAAAC,SAAW,aAAa,UAAU,GAAG,SAAS;AAAA,QACzD,OAAO;AAAA,UACL,GAAG;AAAA,UACH,WAAU,+BAAO,aAAY;AAAA,QAC/B;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACA,SAAO;AACT;",
6
+ "names": ["ConfigProvider", "classNames"]
7
+ }
@@ -0,0 +1 @@
1
+ export * from './createIconfont';
@@ -0,0 +1,24 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/components/Iconfont/index.tsx
17
+ var Iconfont_exports = {};
18
+ module.exports = __toCommonJS(Iconfont_exports);
19
+ __reExport(Iconfont_exports, require("./createIconfont"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("./createIconfont")
23
+ });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Iconfont/index.tsx"],
4
+ "sourcesContent": ["export * from './createIconfont';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,6BAAd;",
6
+ "names": []
7
+ }
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(Loading_exports);
35
35
  var import_react = require("react");
36
36
  var import_antd = require("antd");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_ConfigProvider = __toESM(require("../ConfigProvider"));
38
39
  var import_style = __toESM(require("./style"));
39
40
  var Loading = (props) => {
40
41
  const {
@@ -47,8 +48,8 @@ var Loading = (props) => {
47
48
  className,
48
49
  ...spinProps
49
50
  } = props;
50
- const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
51
- const prefixCls = getPrefixCls("easy-loading", prefixClsInProps);
51
+ const { getPrefixCls } = (0, import_react.useContext)(import_ConfigProvider.default.ConfigContext);
52
+ const prefixCls = getPrefixCls("loading", prefixClsInProps);
52
53
  const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
53
54
  return children ? (
54
55
  // Use spin to wrap children when children is provided,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Loading/index.tsx"],
4
- "sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AAExD,kBAAqC;AACrC,wBAAuB;AACvB,mBAAqB;AAmErB,IAAM,UAA4B,CAAC,UAAU;AAC3C,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,gBAAgB,gBAAgB;AAC/D,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,SAAO;AAAA;AAAA;AAAA,IAGH;AAAA,MACE,oCAAC,oBAAK,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS,GAAG,UAAqB,GAAG,aAC3F,QACH;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAGA,YACE;AAAA,MACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,aAAa,GAAG,uBAAuB,GAAG;AAAA,UACrD;AAAA,UACA,OAAO;AAAA;AAAA,QAEP,oCAAC,oBAAK,WAAsB,UAAqB,GAAG,WAAW;AAAA,MACjE;AAAA,IACF;AAAA;AACR;AAEA,IAAO,kBAAQ;",
6
- "names": ["useStyle", "classNames"]
4
+ "sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { Spin } from 'antd';\nimport classNames from 'classnames';\nimport ConfigProvider from '../ConfigProvider';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AAExD,kBAAqB;AACrB,wBAAuB;AACvB,4BAA2B;AAC3B,mBAAqB;AAmErB,IAAM,UAA4B,CAAC,UAAU;AAC3C,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,aAAa,QAAI,yBAAW,sBAAAA,QAAe,aAAa;AAChE,QAAM,YAAY,aAAa,WAAW,gBAAgB;AAC1D,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAC,SAAS,SAAS;AAE1D,SAAO;AAAA;AAAA;AAAA,IAGH;AAAA,MACE,oCAAC,oBAAK,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS,GAAG,UAAqB,GAAG,aAC3F,QACH;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAGA,YACE;AAAA,MACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,aAAa,GAAG,uBAAuB,GAAG;AAAA,UACrD;AAAA,UACA,OAAO;AAAA;AAAA,QAEP,oCAAC,oBAAK,WAAsB,UAAqB,GAAG,WAAW;AAAA,MACjE;AAAA,IACF;AAAA;AACR;AAEA,IAAO,kBAAQ;",
6
+ "names": ["ConfigProvider", "useStyle", "classNames"]
7
7
  }
@@ -46,5 +46,5 @@ var genStyle = (token) => {
46
46
  }
47
47
  };
48
48
  };
49
- var style_default = (0, import_internal.genStyleHooks)("EasyLoading", genStyle);
49
+ var style_default = (0, import_internal.genStyleHooks)("Loading", genStyle);
50
50
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/Loading/style/index.ts"],
4
- "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('EasyLoading' as never, genStyle);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,UAAU;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,cAAc;AAAA,QACZ,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,MACA,CAAC,YAAY,MAAM,cAAc,GAAG;AAAA,QAClC,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,eAAwB,QAAQ;",
4
+ "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype LoadingToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<LoadingToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('Loading' as never, genStyle);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAAwC,CAAC,UAAqB;AAClE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,UAAU;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,cAAc;AAAA,QACZ,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,MACA,CAAC,YAAY,MAAM,cAAc,GAAG;AAAA,QAClC,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,WAAoB,QAAQ;",
6
6
  "names": []
7
7
  }
@@ -55,6 +55,8 @@ export interface OverflowTagsProps<T> extends Omit<OverflowProps<T>, 'renderItem
55
55
  * contain a `color` property to specify the color, and the latter takes precedence.
56
56
  *
57
57
  * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。
58
+ *
59
+ * @default false
58
60
  */
59
61
  randomColors?: boolean;
60
62
  }
@@ -38,6 +38,7 @@ var import_internal = require("antd/es/theme/internal");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_rc_overflow = __toESM(require("rc-overflow"));
40
40
  var import_math = require("../../utils/math");
41
+ var import_ConfigProvider = __toESM(require("../ConfigProvider"));
41
42
  var import_style = __toESM(require("./style"));
42
43
  var OverflowTags = (props) => {
43
44
  const {
@@ -53,8 +54,8 @@ var OverflowTags = (props) => {
53
54
  ...restProps
54
55
  } = props;
55
56
  const { token } = import_antd.theme.useToken();
56
- const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
57
- const prefixCls = getPrefixCls("easy-overflow-tags", prefixClsInProps);
57
+ const { getPrefixCls } = (0, import_react.useContext)(import_ConfigProvider.default.ConfigContext);
58
+ const prefixCls = getPrefixCls("overflow-tags", prefixClsInProps);
58
59
  const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
59
60
  const colors = (0, import_react.useMemo)(
60
61
  () => import_internal.PresetColors.filter((c) => !["lime", "yellow", "magenta"].includes(c)).map((color) => token[`${color}-3`]),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/OverflowTags/index.tsx"],
4
- "sourcesContent": ["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { DropdownProps, TagProps } from 'antd';\nimport { ConfigProvider, Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T> extends Omit<OverflowProps<T>, 'renderItem'> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.label` or `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.label`或`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.value` or `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.value`或`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n\n /**\n * **EN**: Custom tag rendering function\n *\n * **CN**: 标签渲染函数\n */\n renderTag?: OverflowProps<T>['renderItem'];\n /**\n * **EN**: Custom properties for the tag component\n *\n * **CN**: 自定义标签的组件属性\n */\n tagProps?: TagProps | ((tag: T, options: { tags: T[] }) => TagProps);\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps | ((tag: T, options: { omittedItems: T[]; allTags: T[] }) => TagProps);\n /**\n * **EN**: Custom properties for the dropdown component when tags are overflowed\n *\n * **CN**: 当标签溢出时,下拉菜单的自定义属性\n */\n ellipsisDropdownProps?: DropdownProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n */\n randomColors?: boolean;\n}\n\n/**\n * - **EN:** Overflow tags component, used to display a collection of tags that can overflow and be\n * truncated. It supports displaying tags in a dropdown when the number of tags exceeds the\n * maximum display count. It also supports custom tag rendering and properties.\n * - **CN:** 溢出标签组件,用于显示一组可以溢出和截断的标签集合。当标签数量超过最大显示数量时,支持在下拉菜单中显示标签。还支持自定义标签渲染和属性。\n *\n * @example\n * <OverflowTags\n * tags={[\n * { value: 1, label: 'Tag1', icon: <Icon1 /> },\n * { value: 2, label: 'Tag2', icon: <Icon2 /> },\n * ]}\n * tagProps={{ color: 'blue' }}\n * ellipsisTagProps={{ color: 'grey' }}\n * />;\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T,>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n tagProps,\n ellipsisTagProps,\n ellipsisDropdownProps,\n className,\n prefixCls: prefixClsInProps,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-overflow-tags', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n const colors = useMemo(\n () => PresetColors.filter((c) => !['lime', 'yellow', 'magenta'].includes(c)).map((color) => token[`${color}-3`]),\n [token]\n );\n const getValue = useCallback((tag: T | undefined, field: string) => {\n if (tag != null && typeof tag === 'object') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const record = tag as Record<string, any>;\n return record[field];\n }\n return undefined;\n }, []);\n const getTagName = useCallback(\n (tag: T) => {\n return getTagNameInProps\n ? getTagNameInProps(tag)\n : (getValue(tag, 'label') ?? getValue(tag, 'name') ?? tag?.toString());\n },\n [getTagNameInProps, getValue]\n );\n const renderTag = (item: T) => {\n return (\n <Tag\n icon={getValue(item, 'icon')}\n color={randomColors ? colors[random(0, colors.length - 1)] : getValue(item, 'color') || 'default'}\n {...(typeof tagProps === 'function' ? tagProps(item, { tags }) : tagProps)}\n >\n {getTagName(item)}\n </Tag>\n );\n };\n\n return wrapCSSVar(\n <Overflow<T>\n className={classNames(hashId, cssVarCls, prefixCls, className)}\n data={tags}\n maxCount=\"responsive\"\n renderItem={renderTag}\n renderRest={(omittedItems) => (\n <Dropdown\n {...ellipsisDropdownProps}\n menu={{\n items: omittedItems.map((tag) => ({\n type: 'item',\n key: getTagKey ? getTagKey(tag) : (getValue(tag, 'value') ?? getValue(tag, 'id') ?? getTagName(tag)),\n label: getTagName(tag),\n })),\n ...ellipsisDropdownProps?.menu,\n }}\n >\n <Tag\n {...(typeof ellipsisTagProps === 'function'\n ? ellipsisTagProps(omittedItems[0], { omittedItems, allTags: tags })\n : ellipsisTagProps)}\n >\n + {omittedItems.length}...\n </Tag>\n </Dropdown>\n )}\n {...restProps}\n />\n );\n};\n\nexport default OverflowTags;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiD;AAEjD,kBAAqD;AACrD,sBAA6B;AAC7B,wBAAuB;AAEvB,yBAAqB;AACrB,kBAAuB;AACvB,mBAAqB;AAyErB,IAAM,eAAe,CAAK,UAAgC;AACxD,QAAM;AAAA,IACJ,OAAO,CAAC;AAAA,IACR;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,MAAM,IAAI,kBAAM,SAAS;AACjC,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,sBAAsB,gBAAgB;AACrE,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,QAAM,aAAS;AAAA,IACb,MAAM,6BAAa,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,UAAU,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,MAAM,GAAG,SAAS,CAAC;AAAA,IAC/G,CAAC,KAAK;AAAA,EACR;AACA,QAAM,eAAW,0BAAY,CAAC,KAAoB,UAAkB;AAClE,QAAI,OAAO,QAAQ,OAAO,QAAQ,UAAU;AAE1C,YAAM,SAAS;AACf,aAAO,OAAO,KAAK;AAAA,IACrB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,iBAAa;AAAA,IACjB,CAAC,QAAW;AACV,aAAO,oBACH,kBAAkB,GAAG,IACpB,SAAS,KAAK,OAAO,KAAK,SAAS,KAAK,MAAM,MAAK,2BAAK;AAAA,IAC/D;AAAA,IACA,CAAC,mBAAmB,QAAQ;AAAA,EAC9B;AACA,QAAM,YAAY,CAAC,SAAY;AAC7B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS,MAAM,MAAM;AAAA,QAC3B,OAAO,eAAe,WAAO,oBAAO,GAAG,OAAO,SAAS,CAAC,CAAC,IAAI,SAAS,MAAM,OAAO,KAAK;AAAA,QACvF,GAAI,OAAO,aAAa,aAAa,SAAS,MAAM,EAAE,KAAK,CAAC,IAAI;AAAA;AAAA,MAEhE,WAAW,IAAI;AAAA,IAClB;AAAA,EAEJ;AAEA,SAAO;AAAA,IACL;AAAA,MAAC,mBAAAC;AAAA,MAAA;AAAA,QACC,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS;AAAA,QAC7D,MAAM;AAAA,QACN,UAAS;AAAA,QACT,YAAY;AAAA,QACZ,YAAY,CAAC,iBACX;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,MAAM;AAAA,cACJ,OAAO,aAAa,IAAI,CAAC,SAAS;AAAA,gBAChC,MAAM;AAAA,gBACN,KAAK,YAAY,UAAU,GAAG,IAAK,SAAS,KAAK,OAAO,KAAK,SAAS,KAAK,IAAI,KAAK,WAAW,GAAG;AAAA,gBAClG,OAAO,WAAW,GAAG;AAAA,cACvB,EAAE;AAAA,cACF,GAAG,+DAAuB;AAAA,YAC5B;AAAA;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACE,GAAI,OAAO,qBAAqB,aAC7B,iBAAiB,aAAa,CAAC,GAAG,EAAE,cAAc,SAAS,KAAK,CAAC,IACjE;AAAA;AAAA,YACL;AAAA,YACI,aAAa;AAAA,YAAO;AAAA,UACzB;AAAA,QACF;AAAA,QAED,GAAG;AAAA;AAAA,IACN;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
6
- "names": ["useStyle", "Overflow", "classNames"]
4
+ "sourcesContent": ["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { DropdownProps, TagProps } from 'antd';\nimport { Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport ConfigProvider from '../ConfigProvider';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T> extends Omit<OverflowProps<T>, 'renderItem'> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.label` or `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.label`或`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.value` or `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.value`或`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n\n /**\n * **EN**: Custom tag rendering function\n *\n * **CN**: 标签渲染函数\n */\n renderTag?: OverflowProps<T>['renderItem'];\n /**\n * **EN**: Custom properties for the tag component\n *\n * **CN**: 自定义标签的组件属性\n */\n tagProps?: TagProps | ((tag: T, options: { tags: T[] }) => TagProps);\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps | ((tag: T, options: { omittedItems: T[]; allTags: T[] }) => TagProps);\n /**\n * **EN**: Custom properties for the dropdown component when tags are overflowed\n *\n * **CN**: 当标签溢出时,下拉菜单的自定义属性\n */\n ellipsisDropdownProps?: DropdownProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n *\n * @default false\n */\n randomColors?: boolean;\n}\n\n/**\n * - **EN:** Overflow tags component, used to display a collection of tags that can overflow and be\n * truncated. It supports displaying tags in a dropdown when the number of tags exceeds the\n * maximum display count. It also supports custom tag rendering and properties.\n * - **CN:** 溢出标签组件,用于显示一组可以溢出和截断的标签集合。当标签数量超过最大显示数量时,支持在下拉菜单中显示标签。还支持自定义标签渲染和属性。\n *\n * @example\n * <OverflowTags\n * tags={[\n * { value: 1, label: 'Tag1', icon: <Icon1 /> },\n * { value: 2, label: 'Tag2', icon: <Icon2 /> },\n * ]}\n * tagProps={{ color: 'blue' }}\n * ellipsisTagProps={{ color: 'grey' }}\n * />;\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T,>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n tagProps,\n ellipsisTagProps,\n ellipsisDropdownProps,\n className,\n prefixCls: prefixClsInProps,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('overflow-tags', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n const colors = useMemo(\n () => PresetColors.filter((c) => !['lime', 'yellow', 'magenta'].includes(c)).map((color) => token[`${color}-3`]),\n [token]\n );\n const getValue = useCallback((tag: T | undefined, field: string) => {\n if (tag != null && typeof tag === 'object') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const record = tag as Record<string, any>;\n return record[field];\n }\n return undefined;\n }, []);\n const getTagName = useCallback(\n (tag: T) => {\n return getTagNameInProps\n ? getTagNameInProps(tag)\n : (getValue(tag, 'label') ?? getValue(tag, 'name') ?? tag?.toString());\n },\n [getTagNameInProps, getValue]\n );\n const renderTag = (item: T) => {\n return (\n <Tag\n icon={getValue(item, 'icon')}\n color={randomColors ? colors[random(0, colors.length - 1)] : getValue(item, 'color') || 'default'}\n {...(typeof tagProps === 'function' ? tagProps(item, { tags }) : tagProps)}\n >\n {getTagName(item)}\n </Tag>\n );\n };\n\n return wrapCSSVar(\n <Overflow<T>\n className={classNames(hashId, cssVarCls, prefixCls, className)}\n data={tags}\n maxCount=\"responsive\"\n renderItem={renderTag}\n renderRest={(omittedItems) => (\n <Dropdown\n {...ellipsisDropdownProps}\n menu={{\n items: omittedItems.map((tag) => ({\n type: 'item',\n key: getTagKey ? getTagKey(tag) : (getValue(tag, 'value') ?? getValue(tag, 'id') ?? getTagName(tag)),\n label: getTagName(tag),\n })),\n ...ellipsisDropdownProps?.menu,\n }}\n >\n <Tag\n {...(typeof ellipsisTagProps === 'function'\n ? ellipsisTagProps(omittedItems[0], { omittedItems, allTags: tags })\n : ellipsisTagProps)}\n >\n + {omittedItems.length}...\n </Tag>\n </Dropdown>\n )}\n {...restProps}\n />\n );\n};\n\nexport default OverflowTags;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiD;AAEjD,kBAAqC;AACrC,sBAA6B;AAC7B,wBAAuB;AAEvB,yBAAqB;AACrB,kBAAuB;AACvB,4BAA2B;AAC3B,mBAAqB;AA2ErB,IAAM,eAAe,CAAK,UAAgC;AACxD,QAAM;AAAA,IACJ,OAAO,CAAC;AAAA,IACR;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,MAAM,IAAI,kBAAM,SAAS;AACjC,QAAM,EAAE,aAAa,QAAI,yBAAW,sBAAAA,QAAe,aAAa;AAChE,QAAM,YAAY,aAAa,iBAAiB,gBAAgB;AAChE,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAC,SAAS,SAAS;AAE1D,QAAM,aAAS;AAAA,IACb,MAAM,6BAAa,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,UAAU,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,MAAM,GAAG,SAAS,CAAC;AAAA,IAC/G,CAAC,KAAK;AAAA,EACR;AACA,QAAM,eAAW,0BAAY,CAAC,KAAoB,UAAkB;AAClE,QAAI,OAAO,QAAQ,OAAO,QAAQ,UAAU;AAE1C,YAAM,SAAS;AACf,aAAO,OAAO,KAAK;AAAA,IACrB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,iBAAa;AAAA,IACjB,CAAC,QAAW;AACV,aAAO,oBACH,kBAAkB,GAAG,IACpB,SAAS,KAAK,OAAO,KAAK,SAAS,KAAK,MAAM,MAAK,2BAAK;AAAA,IAC/D;AAAA,IACA,CAAC,mBAAmB,QAAQ;AAAA,EAC9B;AACA,QAAM,YAAY,CAAC,SAAY;AAC7B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS,MAAM,MAAM;AAAA,QAC3B,OAAO,eAAe,WAAO,oBAAO,GAAG,OAAO,SAAS,CAAC,CAAC,IAAI,SAAS,MAAM,OAAO,KAAK;AAAA,QACvF,GAAI,OAAO,aAAa,aAAa,SAAS,MAAM,EAAE,KAAK,CAAC,IAAI;AAAA;AAAA,MAEhE,WAAW,IAAI;AAAA,IAClB;AAAA,EAEJ;AAEA,SAAO;AAAA,IACL;AAAA,MAAC,mBAAAC;AAAA,MAAA;AAAA,QACC,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS;AAAA,QAC7D,MAAM;AAAA,QACN,UAAS;AAAA,QACT,YAAY;AAAA,QACZ,YAAY,CAAC,iBACX;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,MAAM;AAAA,cACJ,OAAO,aAAa,IAAI,CAAC,SAAS;AAAA,gBAChC,MAAM;AAAA,gBACN,KAAK,YAAY,UAAU,GAAG,IAAK,SAAS,KAAK,OAAO,KAAK,SAAS,KAAK,IAAI,KAAK,WAAW,GAAG;AAAA,gBAClG,OAAO,WAAW,GAAG;AAAA,cACvB,EAAE;AAAA,cACF,GAAG,+DAAuB;AAAA,YAC5B;AAAA;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACE,GAAI,OAAO,qBAAqB,aAC7B,iBAAiB,aAAa,CAAC,GAAG,EAAE,cAAc,SAAS,KAAK,CAAC,IACjE;AAAA;AAAA,YACL;AAAA,YACI,aAAa;AAAA,YAAO;AAAA,UACzB;AAAA,QACF;AAAA,QAED,GAAG;AAAA;AAAA,IACN;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
6
+ "names": ["ConfigProvider", "useStyle", "Overflow", "classNames"]
7
7
  }
@@ -36,5 +36,5 @@ var genStyle = (token) => {
36
36
  }
37
37
  };
38
38
  };
39
- var style_default = (0, import_internal.genStyleHooks)("EasyOverflowTags", genStyle);
39
+ var style_default = (0, import_internal.genStyleHooks)("OverflowTags", genStyle);
40
40
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/OverflowTags/style/index.ts"],
4
- "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\nexport default genStyleHooks('EasyOverflowTags' as never, genStyle);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,oBAA6B,QAAQ;",
4
+ "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\nexport default genStyleHooks('OverflowTags' as never, genStyle);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,gBAAyB,QAAQ;",
6
6
  "names": []
7
7
  }
@@ -28,6 +28,7 @@ export type { FloatDrawerProps } from './FloatDrawer';
28
28
  export { default as FloatDrawer } from './FloatDrawer';
29
29
  export type { FormItemControlProps } from './FormItemControl';
30
30
  export { default as FormItemControl } from './FormItemControl';
31
+ export * from './Iconfont';
31
32
  export type { LoadingProps } from './Loading';
32
33
  export { default as Loading } from './Loading';
33
34
  export type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';
@@ -76,6 +76,7 @@ __reExport(components_exports, require("./EllipsisTypography/EllipsisLink"), mod
76
76
  var import_EllipsisLink = __toESM(require("./EllipsisTypography/EllipsisLink"));
77
77
  var import_FloatDrawer = __toESM(require("./FloatDrawer"));
78
78
  var import_FormItemControl = __toESM(require("./FormItemControl"));
79
+ __reExport(components_exports, require("./Iconfont"), module.exports);
79
80
  var import_Loading = __toESM(require("./Loading"));
80
81
  var import_ModalAction = require("./ModalAction");
81
82
  var import_ModalAction2 = __toESM(require("./ModalAction"));
@@ -109,6 +110,7 @@ var import_Pulse = __toESM(require("./Animation/Pulse"));
109
110
  ...require("./EllipsisTypography/EllipsisParagraph"),
110
111
  ...require("./EllipsisTypography/EllipsisText"),
111
112
  ...require("./EllipsisTypography/EllipsisTitle"),
112
- ...require("./EllipsisTypography/EllipsisLink")
113
+ ...require("./EllipsisTypography/EllipsisLink"),
114
+ ...require("./Iconfont")
113
115
  });
114
116
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/index.tsx"],
4
- "sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ColumnSettingProps } from './ColumnSetting';\nexport { default as ColumnSetting } from './ColumnSetting';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport * from './EllipsisTypography/EllipsisParagraph';\nexport { default as EllipsisParagraph } from './EllipsisTypography/EllipsisParagraph';\n\nexport * from './EllipsisTypography/EllipsisText';\nexport { default as EllipsisText } from './EllipsisTypography/EllipsisText';\n\nexport * from './EllipsisTypography/EllipsisTitle';\nexport { default as EllipsisTitle } from './EllipsisTypography/EllipsisTitle';\n\nexport * from './EllipsisTypography/EllipsisLink';\nexport { default as EllipsisLink } from './EllipsisTypography/EllipsisLink';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { FormItemControlProps } from './FormItemControl';\nexport { default as FormItemControl } from './FormItemControl';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n\nexport type { PulseAnimationProps } from './Animation/Pulse';\nexport { default as PulseAnimation } from './Animation/Pulse';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,2BAAyC;AAGzC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,+BAA6C;AAC7C,IAAAA,wBAAyC;AASzC,yBAAuC;AAGvC,iCAA+C;AAC/C,qCAAmD;AAGnD,0BAAwC;AAExC,+BAAc,mDAhCd;AAiCA,+BAA6C;AAE7C,+BAAc,8CAnCd;AAoCA,0BAAwC;AAExC,+BAAc,+CAtCd;AAuCA,2BAAyC;AAEzC,+BAAc,8CAzCd;AA0CA,0BAAwC;AAGxC,yBAAuC;AAGvC,6BAA2C;AAG3C,qBAAmC;AAGnC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;AAGxC,mBAA0C;",
4
+ "sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ColumnSettingProps } from './ColumnSetting';\nexport { default as ColumnSetting } from './ColumnSetting';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport * from './EllipsisTypography/EllipsisParagraph';\nexport { default as EllipsisParagraph } from './EllipsisTypography/EllipsisParagraph';\n\nexport * from './EllipsisTypography/EllipsisText';\nexport { default as EllipsisText } from './EllipsisTypography/EllipsisText';\n\nexport * from './EllipsisTypography/EllipsisTitle';\nexport { default as EllipsisTitle } from './EllipsisTypography/EllipsisTitle';\n\nexport * from './EllipsisTypography/EllipsisLink';\nexport { default as EllipsisLink } from './EllipsisTypography/EllipsisLink';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { FormItemControlProps } from './FormItemControl';\nexport { default as FormItemControl } from './FormItemControl';\n\nexport * from './Iconfont';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n\nexport type { PulseAnimationProps } from './Animation/Pulse';\nexport { default as PulseAnimation } from './Animation/Pulse';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,2BAAyC;AAGzC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,+BAA6C;AAC7C,IAAAA,wBAAyC;AASzC,yBAAuC;AAGvC,iCAA+C;AAC/C,qCAAmD;AAGnD,0BAAwC;AAExC,+BAAc,mDAhCd;AAiCA,+BAA6C;AAE7C,+BAAc,8CAnCd;AAoCA,0BAAwC;AAExC,+BAAc,+CAtCd;AAuCA,2BAAyC;AAEzC,+BAAc,8CAzCd;AA0CA,0BAAwC;AAGxC,yBAAuC;AAGvC,6BAA2C;AAE3C,+BAAc,uBAlDd;AAqDA,qBAAmC;AAGnC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;AAGxC,mBAA0C;",
6
6
  "names": ["import_ConfirmAction", "import_ModalAction"]
7
7
  }
@@ -1,5 +1,7 @@
1
1
  export { default as useAudioPlayer } from './useAudioPlayer';
2
2
  export { default as useDebounce } from './useDebounce';
3
+ export * from './useLocalStorage';
4
+ export { default as useLocalStorage } from './useLocalStorage';
3
5
  export * from './useMovable';
4
6
  export { default as useMovable } from './useMovable';
5
7
  export * from './useProcessingText';
@@ -32,6 +32,7 @@ var hooks_exports = {};
32
32
  __export(hooks_exports, {
33
33
  useAudioPlayer: () => import_useAudioPlayer.default,
34
34
  useDebounce: () => import_useDebounce.default,
35
+ useLocalStorage: () => import_useLocalStorage.default,
35
36
  useMovable: () => import_useMovable.default,
36
37
  useProcessingText: () => import_useProcessingText.default,
37
38
  useRefFunction: () => import_useRefFunction.default,
@@ -47,6 +48,8 @@ __export(hooks_exports, {
47
48
  module.exports = __toCommonJS(hooks_exports);
48
49
  var import_useAudioPlayer = __toESM(require("./useAudioPlayer"));
49
50
  var import_useDebounce = __toESM(require("./useDebounce"));
51
+ __reExport(hooks_exports, require("./useLocalStorage"), module.exports);
52
+ var import_useLocalStorage = __toESM(require("./useLocalStorage"));
50
53
  __reExport(hooks_exports, require("./useMovable"), module.exports);
51
54
  var import_useMovable = __toESM(require("./useMovable"));
52
55
  __reExport(hooks_exports, require("./useProcessingText"), module.exports);
@@ -68,6 +71,7 @@ var import_useValidatorBuilder = __toESM(require("./useValidatorBuilder"));
68
71
  0 && (module.exports = {
69
72
  useAudioPlayer,
70
73
  useDebounce,
74
+ useLocalStorage,
71
75
  useMovable,
72
76
  useProcessingText,
73
77
  useRefFunction,
@@ -79,6 +83,7 @@ var import_useValidatorBuilder = __toESM(require("./useValidatorBuilder"));
79
83
  useValidator,
80
84
  useValidatorBuilder,
81
85
  useValidators,
86
+ ...require("./useLocalStorage"),
82
87
  ...require("./useMovable"),
83
88
  ...require("./useProcessingText"),
84
89
  ...require("./useSplitter"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/index.ts"],
4
- "sourcesContent": ["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAE1C,yBAAuC;AAEvC,0BAAc,yBAJd;AAKA,wBAAsC;AAEtC,0BAAc,gCAPd;AAQA,+BAA6C;AAE7C,yBAAuC;AAEvC,4BAA0C;AAE1C,0BAAc,0BAdd;AAeA,yBAAuC;AAEvC,0BAAc,qBAjBd;AAkBA,oBAAkC;AAElC,0BAAc,6BApBd;AAqBA,4BAA0C;AAE1C,0BAAc,2BAvBd;AAwBA,0BAAwC;AAGxC,2BAAyC;AAEzC,0BAAwC;AAGxC,iCAA+C;",
4
+ "sourcesContent": ["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useLocalStorage';\nexport { default as useLocalStorage } from './useLocalStorage';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAE1C,yBAAuC;AAEvC,0BAAc,8BAJd;AAKA,6BAA2C;AAE3C,0BAAc,yBAPd;AAQA,wBAAsC;AAEtC,0BAAc,gCAVd;AAWA,+BAA6C;AAE7C,yBAAuC;AAEvC,4BAA0C;AAE1C,0BAAc,0BAjBd;AAkBA,yBAAuC;AAEvC,0BAAc,qBApBd;AAqBA,oBAAkC;AAElC,0BAAc,6BAvBd;AAwBA,4BAA0C;AAE1C,0BAAc,2BA1Bd;AA2BA,0BAAwC;AAGxC,2BAAyC;AAEzC,0BAAwC;AAGxC,iCAA+C;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (prefixCls: string, rootCls?: string | undefined) => readonly [(node: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, string, string];
3
+ export default _default;
@@ -0,0 +1,72 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/style/useSplitter.ts
20
+ var useSplitter_exports = {};
21
+ __export(useSplitter_exports, {
22
+ default: () => useSplitter_default
23
+ });
24
+ module.exports = __toCommonJS(useSplitter_exports);
25
+ var import_internal = require("antd/es/theme/internal");
26
+ var genStyle = (token) => {
27
+ const { componentCls, EasySplitter: { splitterDefaultWidth = 1 } = {} } = token;
28
+ return {
29
+ [componentCls]: {
30
+ flex: "none",
31
+ userSelect: "none",
32
+ [`&${componentCls}-vertical`]: {
33
+ cursor: "col-resize",
34
+ padding: "0 4px",
35
+ height: "100%",
36
+ [`${componentCls}-handle`]: {
37
+ width: `var(--splitter-width, ${splitterDefaultWidth}px)`,
38
+ height: "100%"
39
+ }
40
+ },
41
+ [`&${componentCls}-horizontal`]: {
42
+ cursor: "row-resize",
43
+ padding: "4px 0",
44
+ width: "100%",
45
+ [`${componentCls}-handle`]: {
46
+ width: "100%",
47
+ height: `var(--splitter-width, ${splitterDefaultWidth}px)`
48
+ }
49
+ },
50
+ "&:hover": {
51
+ [`${componentCls}-handle`]: {
52
+ background: token.colorPrimaryActive
53
+ }
54
+ },
55
+ [`&${componentCls}-dragging`]: {
56
+ [`${componentCls}-handle`]: {
57
+ background: token.colorPrimaryHover
58
+ }
59
+ },
60
+ [`&${componentCls}-hover`]: {
61
+ [`${componentCls}-handle`]: {
62
+ background: token.colorPrimaryActive
63
+ }
64
+ },
65
+ [`${componentCls}-handle`]: {
66
+ background: token.colorBorder
67
+ }
68
+ }
69
+ };
70
+ };
71
+ var useSplitter_default = (0, import_internal.genStyleHooks)("EasySplitter", genStyle);
72
+ //# sourceMappingURL=useSplitter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/style/useSplitter.ts"],
4
+ "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype UseSplitterToken = FullToken<\n {\n EasySplitter?: {\n splitterDefaultWidth?: number;\n };\n },\n AliasToken,\n 'EasySplitter'\n>;\n\nconst genStyle: GenerateStyle<UseSplitterToken> = (token): CSSObject => {\n const { componentCls, EasySplitter: { splitterDefaultWidth = 1 } = {} } = token;\n return {\n [componentCls]: {\n flex: 'none',\n userSelect: 'none',\n [`&${componentCls}-vertical`]: {\n cursor: 'col-resize',\n padding: '0 4px',\n height: '100%',\n [`${componentCls}-handle`]: {\n width: `var(--splitter-width, ${splitterDefaultWidth}px)`,\n height: '100%',\n },\n },\n [`&${componentCls}-horizontal`]: {\n cursor: 'row-resize',\n padding: '4px 0',\n width: '100%',\n [`${componentCls}-handle`]: {\n width: '100%',\n height: `var(--splitter-width, ${splitterDefaultWidth}px)`,\n },\n },\n '&:hover': {\n [`${componentCls}-handle`]: {\n background: token.colorPrimaryActive,\n },\n },\n [`&${componentCls}-dragging`]: {\n [`${componentCls}-handle`]: {\n background: token.colorPrimaryHover,\n },\n },\n [`&${componentCls}-hover`]: {\n [`${componentCls}-handle`]: {\n background: token.colorPrimaryActive,\n },\n },\n [`${componentCls}-handle`]: {\n background: token.colorBorder,\n },\n },\n };\n};\n\nexport default genStyleHooks('EasySplitter' as never, genStyle);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAe9B,IAAM,WAA4C,CAAC,UAAqB;AACtE,QAAM,EAAE,cAAc,cAAc,EAAE,uBAAuB,EAAE,IAAI,CAAC,EAAE,IAAI;AAC1E,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,CAAC,IAAI,uBAAuB,GAAG;AAAA,QAC7B,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,CAAC,GAAG,qBAAqB,GAAG;AAAA,UAC1B,OAAO,yBAAyB;AAAA,UAChC,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,MACA,CAAC,IAAI,yBAAyB,GAAG;AAAA,QAC/B,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,OAAO;AAAA,QACP,CAAC,GAAG,qBAAqB,GAAG;AAAA,UAC1B,OAAO;AAAA,UACP,QAAQ,yBAAyB;AAAA,QACnC;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,CAAC,GAAG,qBAAqB,GAAG;AAAA,UAC1B,YAAY,MAAM;AAAA,QACpB;AAAA,MACF;AAAA,MACA,CAAC,IAAI,uBAAuB,GAAG;AAAA,QAC7B,CAAC,GAAG,qBAAqB,GAAG;AAAA,UAC1B,YAAY,MAAM;AAAA,QACpB;AAAA,MACF;AAAA,MACA,CAAC,IAAI,oBAAoB,GAAG;AAAA,QAC1B,CAAC,GAAG,qBAAqB,GAAG;AAAA,UAC1B,YAAY,MAAM;AAAA,QACpB;AAAA,MACF;AAAA,MACA,CAAC,GAAG,qBAAqB,GAAG;AAAA,QAC1B,YAAY,MAAM;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,0BAAQ,+BAAc,gBAAyB,QAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ type SetStateAction<T> = T | ((prev: T) => T);
2
+ export interface UseLocalStorageOptions<T> {
3
+ /** When true, listen to `storage` events and keep state in sync across tabs. Defaults to true. */
4
+ sync?: boolean;
5
+ /** Custom serializer. Defaults to JSON.stringify. */
6
+ serialize?: (value: T) => string;
7
+ /** Custom deserializer. Defaults to JSON.parse. */
8
+ deserialize?: (raw: string) => T;
9
+ }
10
+ /**
11
+ * useLocalStorage
12
+ *
13
+ * - If `key` is empty/falsy, behaves like useState and does not touch localStorage.
14
+ */
15
+ declare function useLocalStorage<T>(key?: string | null, initialValue?: T | (() => T), options?: UseLocalStorageOptions<T>): [T, (action: SetStateAction<T>) => void, () => void];
16
+ export default useLocalStorage;
@@ -0,0 +1,120 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useLocalStorage.ts
20
+ var useLocalStorage_exports = {};
21
+ __export(useLocalStorage_exports, {
22
+ default: () => useLocalStorage_default
23
+ });
24
+ module.exports = __toCommonJS(useLocalStorage_exports);
25
+ var import_react = require("react");
26
+ function isBrowser() {
27
+ return typeof window !== "undefined" && typeof window.localStorage !== "undefined";
28
+ }
29
+ function defaultSerialize(value) {
30
+ return JSON.stringify(value);
31
+ }
32
+ function defaultDeserialize(raw) {
33
+ return JSON.parse(raw);
34
+ }
35
+ function useLocalStorage(key, initialValue, options) {
36
+ const storageKey = (key ?? "").trim();
37
+ const enabled = storageKey.length > 0;
38
+ const sync = (options == null ? void 0 : options.sync) ?? true;
39
+ const serialize = (options == null ? void 0 : options.serialize) ?? defaultSerialize;
40
+ const deserialize = (options == null ? void 0 : options.deserialize) ?? defaultDeserialize;
41
+ const initialValueRef = (0, import_react.useRef)(initialValue);
42
+ initialValueRef.current = initialValue;
43
+ const getInitial = (0, import_react.useCallback)(() => {
44
+ const fallback = (() => {
45
+ const v = initialValueRef.current;
46
+ return typeof v === "function" ? v() : v;
47
+ })();
48
+ if (!enabled || !isBrowser())
49
+ return fallback;
50
+ try {
51
+ const raw = window.localStorage.getItem(storageKey);
52
+ if (raw == null)
53
+ return fallback;
54
+ return deserialize(raw);
55
+ } catch {
56
+ return fallback;
57
+ }
58
+ }, [deserialize, enabled, storageKey]);
59
+ const [value, setValueState] = (0, import_react.useState)(getInitial);
60
+ const writeStorage = (0, import_react.useCallback)(
61
+ (nextValue) => {
62
+ if (!enabled || !isBrowser())
63
+ return;
64
+ try {
65
+ window.localStorage.setItem(storageKey, serialize(nextValue));
66
+ } catch {
67
+ }
68
+ },
69
+ [enabled, serialize, storageKey]
70
+ );
71
+ const setValue = (0, import_react.useCallback)(
72
+ (action) => {
73
+ setValueState((prev) => {
74
+ const next = typeof action === "function" ? action(prev) : action;
75
+ writeStorage(next);
76
+ return next;
77
+ });
78
+ },
79
+ [writeStorage]
80
+ );
81
+ const remove = (0, import_react.useCallback)(() => {
82
+ const next = (() => {
83
+ const v = initialValueRef.current;
84
+ return typeof v === "function" ? v() : v;
85
+ })();
86
+ setValueState(next);
87
+ if (!enabled || !isBrowser())
88
+ return;
89
+ try {
90
+ window.localStorage.removeItem(storageKey);
91
+ } catch {
92
+ }
93
+ }, [enabled, storageKey]);
94
+ (0, import_react.useEffect)(() => {
95
+ setValueState(getInitial());
96
+ }, [getInitial]);
97
+ (0, import_react.useEffect)(() => {
98
+ if (!enabled || !sync || !isBrowser())
99
+ return;
100
+ const onStorage = (e) => {
101
+ if (e.storageArea !== window.localStorage)
102
+ return;
103
+ if (e.key !== storageKey)
104
+ return;
105
+ if (e.newValue == null) {
106
+ setValueState(getInitial());
107
+ return;
108
+ }
109
+ try {
110
+ setValueState(deserialize(e.newValue));
111
+ } catch {
112
+ }
113
+ };
114
+ window.addEventListener("storage", onStorage);
115
+ return () => window.removeEventListener("storage", onStorage);
116
+ }, [deserialize, enabled, getInitial, storageKey, sync]);
117
+ return (0, import_react.useMemo)(() => [value, setValue, remove], [remove, setValue, value]);
118
+ }
119
+ var useLocalStorage_default = useLocalStorage;
120
+ //# sourceMappingURL=useLocalStorage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/hooks/useLocalStorage.ts"],
4
+ "sourcesContent": ["import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\ntype SetStateAction<T> = T | ((prev: T) => T);\n\nexport interface UseLocalStorageOptions<T> {\n /** When true, listen to `storage` events and keep state in sync across tabs. Defaults to true. */\n sync?: boolean;\n /** Custom serializer. Defaults to JSON.stringify. */\n serialize?: (value: T) => string;\n /** Custom deserializer. Defaults to JSON.parse. */\n deserialize?: (raw: string) => T;\n}\n\nfunction isBrowser() {\n return typeof window !== 'undefined' && typeof window.localStorage !== 'undefined';\n}\n\nfunction defaultSerialize<T>(value: T) {\n return JSON.stringify(value);\n}\n\nfunction defaultDeserialize<T>(raw: string) {\n return JSON.parse(raw) as T;\n}\n\n/**\n * useLocalStorage\n *\n * - If `key` is empty/falsy, behaves like useState and does not touch localStorage.\n */\nfunction useLocalStorage<T>(\n key?: string | null,\n initialValue?: T | (() => T),\n options?: UseLocalStorageOptions<T>\n): [T, (action: SetStateAction<T>) => void, () => void] {\n const storageKey = (key ?? '').trim();\n const enabled = storageKey.length > 0;\n const sync = options?.sync ?? true;\n const serialize = options?.serialize ?? defaultSerialize;\n const deserialize = options?.deserialize ?? defaultDeserialize;\n\n const initialValueRef = useRef(initialValue);\n initialValueRef.current = initialValue;\n\n const getInitial = useCallback((): T => {\n const fallback = (() => {\n const v = initialValueRef.current;\n return (typeof v === 'function' ? (v as () => T)() : (v as T)) as T;\n })();\n\n if (!enabled || !isBrowser()) return fallback;\n\n try {\n const raw = window.localStorage.getItem(storageKey);\n if (raw == null) return fallback;\n return deserialize(raw);\n } catch {\n return fallback;\n }\n }, [deserialize, enabled, storageKey]);\n\n const [value, setValueState] = useState<T>(getInitial);\n\n const writeStorage = useCallback(\n (nextValue: T) => {\n if (!enabled || !isBrowser()) return;\n try {\n window.localStorage.setItem(storageKey, serialize(nextValue));\n } catch {\n // ignore write errors (e.g., quota exceeded, blocked storage)\n }\n },\n [enabled, serialize, storageKey]\n );\n\n const setValue = useCallback(\n (action: SetStateAction<T>) => {\n setValueState((prev) => {\n const next = typeof action === 'function' ? (action as (p: T) => T)(prev) : action;\n writeStorage(next);\n return next;\n });\n },\n [writeStorage]\n );\n\n const remove = useCallback(() => {\n // If key is empty/falsy, just reset to initial value.\n const next = (() => {\n const v = initialValueRef.current;\n return (typeof v === 'function' ? (v as () => T)() : (v as T)) as T;\n })();\n\n setValueState(next);\n\n if (!enabled || !isBrowser()) return;\n try {\n window.localStorage.removeItem(storageKey);\n } catch {\n // ignore\n }\n }, [enabled, storageKey]);\n\n // Keep state updated if key changes.\n useEffect(() => {\n setValueState(getInitial());\n }, [getInitial]);\n\n // Cross-tab sync.\n useEffect(() => {\n if (!enabled || !sync || !isBrowser()) return;\n\n const onStorage = (e: StorageEvent) => {\n if (e.storageArea !== window.localStorage) return;\n if (e.key !== storageKey) return;\n\n // When removed, fall back to initial.\n if (e.newValue == null) {\n setValueState(getInitial());\n return;\n }\n\n try {\n setValueState(deserialize(e.newValue));\n } catch {\n // ignore parse errors\n }\n };\n\n window.addEventListener('storage', onStorage);\n return () => window.removeEventListener('storage', onStorage);\n }, [deserialize, enabled, getInitial, storageKey, sync]);\n\n // Stable tuple identity.\n return useMemo(() => [value, setValue, remove] as const, [remove, setValue, value]);\n}\n\nexport default useLocalStorage;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkE;AAalE,SAAS,YAAY;AACnB,SAAO,OAAO,WAAW,eAAe,OAAO,OAAO,iBAAiB;AACzE;AAEA,SAAS,iBAAoB,OAAU;AACrC,SAAO,KAAK,UAAU,KAAK;AAC7B;AAEA,SAAS,mBAAsB,KAAa;AAC1C,SAAO,KAAK,MAAM,GAAG;AACvB;AAOA,SAAS,gBACP,KACA,cACA,SACsD;AACtD,QAAM,cAAc,OAAO,IAAI,KAAK;AACpC,QAAM,UAAU,WAAW,SAAS;AACpC,QAAM,QAAO,mCAAS,SAAQ;AAC9B,QAAM,aAAY,mCAAS,cAAa;AACxC,QAAM,eAAc,mCAAS,gBAAe;AAE5C,QAAM,sBAAkB,qBAAO,YAAY;AAC3C,kBAAgB,UAAU;AAE1B,QAAM,iBAAa,0BAAY,MAAS;AACtC,UAAM,YAAY,MAAM;AACtB,YAAM,IAAI,gBAAgB;AAC1B,aAAQ,OAAO,MAAM,aAAc,EAAc,IAAK;AAAA,IACxD,GAAG;AAEH,QAAI,CAAC,WAAW,CAAC,UAAU;AAAG,aAAO;AAErC,QAAI;AACF,YAAM,MAAM,OAAO,aAAa,QAAQ,UAAU;AAClD,UAAI,OAAO;AAAM,eAAO;AACxB,aAAO,YAAY,GAAG;AAAA,IACxB,QAAE;AACA,aAAO;AAAA,IACT;AAAA,EACF,GAAG,CAAC,aAAa,SAAS,UAAU,CAAC;AAErC,QAAM,CAAC,OAAO,aAAa,QAAI,uBAAY,UAAU;AAErD,QAAM,mBAAe;AAAA,IACnB,CAAC,cAAiB;AAChB,UAAI,CAAC,WAAW,CAAC,UAAU;AAAG;AAC9B,UAAI;AACF,eAAO,aAAa,QAAQ,YAAY,UAAU,SAAS,CAAC;AAAA,MAC9D,QAAE;AAAA,MAEF;AAAA,IACF;AAAA,IACA,CAAC,SAAS,WAAW,UAAU;AAAA,EACjC;AAEA,QAAM,eAAW;AAAA,IACf,CAAC,WAA8B;AAC7B,oBAAc,CAAC,SAAS;AACtB,cAAM,OAAO,OAAO,WAAW,aAAc,OAAuB,IAAI,IAAI;AAC5E,qBAAa,IAAI;AACjB,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,QAAM,aAAS,0BAAY,MAAM;AAE/B,UAAM,QAAQ,MAAM;AAClB,YAAM,IAAI,gBAAgB;AAC1B,aAAQ,OAAO,MAAM,aAAc,EAAc,IAAK;AAAA,IACxD,GAAG;AAEH,kBAAc,IAAI;AAElB,QAAI,CAAC,WAAW,CAAC,UAAU;AAAG;AAC9B,QAAI;AACF,aAAO,aAAa,WAAW,UAAU;AAAA,IAC3C,QAAE;AAAA,IAEF;AAAA,EACF,GAAG,CAAC,SAAS,UAAU,CAAC;AAGxB,8BAAU,MAAM;AACd,kBAAc,WAAW,CAAC;AAAA,EAC5B,GAAG,CAAC,UAAU,CAAC;AAGf,8BAAU,MAAM;AACd,QAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU;AAAG;AAEvC,UAAM,YAAY,CAAC,MAAoB;AACrC,UAAI,EAAE,gBAAgB,OAAO;AAAc;AAC3C,UAAI,EAAE,QAAQ;AAAY;AAG1B,UAAI,EAAE,YAAY,MAAM;AACtB,sBAAc,WAAW,CAAC;AAC1B;AAAA,MACF;AAEA,UAAI;AACF,sBAAc,YAAY,EAAE,QAAQ,CAAC;AAAA,MACvC,QAAE;AAAA,MAEF;AAAA,IACF;AAEA,WAAO,iBAAiB,WAAW,SAAS;AAC5C,WAAO,MAAM,OAAO,oBAAoB,WAAW,SAAS;AAAA,EAC9D,GAAG,CAAC,aAAa,SAAS,YAAY,YAAY,IAAI,CAAC;AAGvD,aAAO,sBAAQ,MAAM,CAAC,OAAO,UAAU,MAAM,GAAY,CAAC,QAAQ,UAAU,KAAK,CAAC;AACpF;AAEA,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -33,13 +33,13 @@ __export(useMovable_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(useMovable_exports);
35
35
  var import_react = require("react");
36
- var import_react_use = require("react-use");
36
+ var import_useLocalStorage = __toESM(require("./useLocalStorage"));
37
37
  var import_useRefFunction = __toESM(require("./useRefFunction"));
38
38
  var import_useRefValue = __toESM(require("./useRefValue"));
39
39
  var useMovable = (props) => {
40
40
  const { enabled, containerRef, ignoreSelectors, storageKey } = props;
41
41
  const storageKeyRef = (0, import_useRefValue.default)(storageKey);
42
- const [savedPosition, savePosition] = (0, import_react_use.useLocalStorage)(storageKey ?? "");
42
+ const [savedPosition, savePosition] = (0, import_useLocalStorage.default)(storageKey ?? "");
43
43
  const savePositionRef = (0, import_useRefValue.default)(savePosition);
44
44
  const [position, setPosition] = (0, import_react.useState)(savedPosition ?? void 0);
45
45
  const positionRef = (0, import_useRefValue.default)(position);