deepsea-components 5.7.4 → 5.7.5

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 (78) hide show
  1. package/dist/cjs/components/AutoFit.js +1 -1
  2. package/dist/cjs/components/AutoFit.js.map +2 -2
  3. package/dist/cjs/components/AutoScroll.js +1 -1
  4. package/dist/cjs/components/AutoScroll.js.map +2 -2
  5. package/dist/cjs/components/AutoSizeTextarea.js +1 -1
  6. package/dist/cjs/components/AutoSizeTextarea.js.map +2 -2
  7. package/dist/cjs/components/CopyButton.d.ts +7 -3
  8. package/dist/cjs/components/CopyButton.js.map +2 -2
  9. package/dist/cjs/components/Echart.d.ts +2 -2
  10. package/dist/cjs/components/Echart.js.map +1 -1
  11. package/dist/cjs/components/Flow.js +1 -1
  12. package/dist/cjs/components/Flow.js.map +2 -2
  13. package/dist/cjs/components/FormLabel.d.ts +2 -2
  14. package/dist/cjs/components/FormLabel.js +1 -1
  15. package/dist/cjs/components/FormLabel.js.map +2 -2
  16. package/dist/cjs/components/InfiniteScroll.d.ts +26 -3
  17. package/dist/cjs/components/InfiniteScroll.js +1 -1
  18. package/dist/cjs/components/InfiniteScroll.js.map +2 -2
  19. package/dist/cjs/components/LoopSwiper.js +1 -1
  20. package/dist/cjs/components/LoopSwiper.js.map +2 -2
  21. package/dist/cjs/components/Ring.js.map +1 -1
  22. package/dist/cjs/components/Scroll.d.ts +1 -1
  23. package/dist/cjs/components/Scroll.js +1 -1
  24. package/dist/cjs/components/Scroll.js.map +2 -2
  25. package/dist/cjs/components/Skeleton.js +1 -1
  26. package/dist/cjs/components/Skeleton.js.map +2 -2
  27. package/dist/cjs/components/Title.d.ts +2 -2
  28. package/dist/cjs/components/Title.js.map +2 -2
  29. package/dist/cjs/components/TransitionBox.js.map +1 -1
  30. package/dist/cjs/components/Trapezium.js +1 -1
  31. package/dist/cjs/components/Trapezium.js.map +2 -2
  32. package/dist/esm/components/AutoFit.js +1 -1
  33. package/dist/esm/components/AutoFit.js.map +1 -1
  34. package/dist/esm/components/AutoScroll.js +1 -1
  35. package/dist/esm/components/AutoScroll.js.map +1 -1
  36. package/dist/esm/components/AutoSizeTextarea.js +1 -1
  37. package/dist/esm/components/AutoSizeTextarea.js.map +1 -1
  38. package/dist/esm/components/CopyButton.d.ts +7 -3
  39. package/dist/esm/components/CopyButton.js.map +1 -1
  40. package/dist/esm/components/Echart.d.ts +2 -2
  41. package/dist/esm/components/Echart.js.map +1 -1
  42. package/dist/esm/components/Flow.js +1 -1
  43. package/dist/esm/components/Flow.js.map +1 -1
  44. package/dist/esm/components/FormLabel.d.ts +2 -2
  45. package/dist/esm/components/FormLabel.js +1 -1
  46. package/dist/esm/components/FormLabel.js.map +1 -1
  47. package/dist/esm/components/InfiniteScroll.d.ts +26 -3
  48. package/dist/esm/components/InfiniteScroll.js +1 -1
  49. package/dist/esm/components/InfiniteScroll.js.map +1 -1
  50. package/dist/esm/components/LoopSwiper.js +1 -1
  51. package/dist/esm/components/LoopSwiper.js.map +1 -1
  52. package/dist/esm/components/Ring.js.map +1 -1
  53. package/dist/esm/components/Scroll.d.ts +1 -1
  54. package/dist/esm/components/Scroll.js +1 -1
  55. package/dist/esm/components/Scroll.js.map +1 -1
  56. package/dist/esm/components/Skeleton.js +1 -1
  57. package/dist/esm/components/Skeleton.js.map +1 -1
  58. package/dist/esm/components/Title.d.ts +2 -2
  59. package/dist/esm/components/Title.js.map +1 -1
  60. package/dist/esm/components/TransitionBox.js.map +1 -1
  61. package/dist/esm/components/Trapezium.js +1 -1
  62. package/dist/esm/components/Trapezium.js.map +1 -1
  63. package/package.json +2 -2
  64. package/src/components/AutoFit.tsx +3 -2
  65. package/src/components/AutoScroll.tsx +3 -2
  66. package/src/components/AutoSizeTextarea.tsx +3 -2
  67. package/src/components/CopyButton.tsx +2 -2
  68. package/src/components/Echart.tsx +5 -5
  69. package/src/components/Flow.tsx +2 -1
  70. package/src/components/FormLabel.tsx +4 -3
  71. package/src/components/InfiniteScroll.tsx +4 -3
  72. package/src/components/LoopSwiper.tsx +3 -2
  73. package/src/components/Ring.tsx +1 -1
  74. package/src/components/Scroll.tsx +5 -3
  75. package/src/components/Skeleton.tsx +3 -2
  76. package/src/components/Title.tsx +3 -2
  77. package/src/components/TransitionBox.tsx +1 -1
  78. package/src/components/Trapezium.tsx +2 -1
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","jsx","_jsx","Ring","props","ref","outerWidth","innerWidth","style","rest","outerRadius","innerRadius","width","height","clipPath"],"sources":["../../../src/components/Ring.tsx"],"sourcesContent":["\"use client\"\n\nimport { forwardRef, HTMLAttributes } from \"react\"\n\nexport interface RingProps extends HTMLAttributes<HTMLDivElement> {\n outerWidth: number\n innerWidth: number\n}\n\n/** 环形组件 */\nexport const Ring = forwardRef<HTMLDivElement, RingProps>((props, ref) => {\n const { outerWidth, innerWidth, style, ...rest } = props\n\n const outerRadius = outerWidth / 2\n\n const innerRadius = innerWidth / 2\n\n return (\n <div\n ref={ref}\n style={{\n ...style,\n width: `${outerWidth}px`,\n height: `${outerWidth}px`,\n clipPath: `path(\"M0,${outerRadius} a${outerRadius},${outerRadius},0,1,0,${outerWidth},0 a${outerRadius},${outerRadius},0,1,0,-${outerWidth},0 l${outerRadius - innerRadius},0 a${innerRadius},${innerRadius},0,0,1,${innerRadius * 2},0 a${innerRadius},${innerRadius},0,0,1,-${innerRadius * 2},0 Z\")`,\n }}\n {...rest}\n />\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,UAAU,QAAwB,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOlD;AACA,OAAO,MAAMC,IAAI,gBAAGH,UAAU,CAA4B,CAACI,KAAK,EAAEC,GAAG,KAAK;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAExD,MAAMM,WAAW,GAAGJ,UAAU,GAAG,CAAC;EAElC,MAAMK,WAAW,GAAGJ,UAAU,GAAG,CAAC;EAElC,oBACIL,IAAA;IACIG,GAAG,EAAEA,GAAI;IACTG,KAAK,EAAE;MACH,GAAGA,KAAK;MACRI,KAAK,EAAG,GAAEN,UAAW,IAAG;MACxBO,MAAM,EAAG,GAAEP,UAAW,IAAG;MACzBQ,QAAQ,EAAG,YAAWJ,WAAY,KAAIA,WAAY,IAAGA,WAAY,UAASJ,UAAW,OAAMI,WAAY,IAAGA,WAAY,WAAUJ,UAAW,OAAMI,WAAW,GAAGC,WAAY,OAAMA,WAAY,IAAGA,WAAY,UAASA,WAAW,GAAG,CAAE,OAAMA,WAAY,IAAGA,WAAY,WAAUA,WAAW,GAAG,CAAE;IACpS,CAAE;IAAA,GACEF;EAAI,CACX,CAAC;AAEV,CAAC,CAAC"}
1
+ {"version":3,"names":["forwardRef","jsx","_jsx","Ring","props","ref","outerWidth","innerWidth","style","rest","outerRadius","innerRadius","width","height","clipPath"],"sources":["../../../src/components/Ring.tsx"],"sourcesContent":["\"use client\"\n\nimport { HTMLAttributes, forwardRef } from \"react\"\n\nexport interface RingProps extends HTMLAttributes<HTMLDivElement> {\n outerWidth: number\n innerWidth: number\n}\n\n/** 环形组件 */\nexport const Ring = forwardRef<HTMLDivElement, RingProps>((props, ref) => {\n const { outerWidth, innerWidth, style, ...rest } = props\n\n const outerRadius = outerWidth / 2\n\n const innerRadius = innerWidth / 2\n\n return (\n <div\n ref={ref}\n style={{\n ...style,\n width: `${outerWidth}px`,\n height: `${outerWidth}px`,\n clipPath: `path(\"M0,${outerRadius} a${outerRadius},${outerRadius},0,1,0,${outerWidth},0 a${outerRadius},${outerRadius},0,1,0,-${outerWidth},0 l${outerRadius - innerRadius},0 a${innerRadius},${innerRadius},0,0,1,${innerRadius * 2},0 a${innerRadius},${innerRadius},0,0,1,-${innerRadius * 2},0 Z\")`,\n }}\n {...rest}\n />\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAAyBA,UAAU,QAAQ,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOlD;AACA,OAAO,MAAMC,IAAI,gBAAGH,UAAU,CAA4B,CAACI,KAAK,EAAEC,GAAG,KAAK;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAExD,MAAMM,WAAW,GAAGJ,UAAU,GAAG,CAAC;EAElC,MAAMK,WAAW,GAAGJ,UAAU,GAAG,CAAC;EAElC,oBACIL,IAAA;IACIG,GAAG,EAAEA,GAAI;IACTG,KAAK,EAAE;MACH,GAAGA,KAAK;MACRI,KAAK,EAAG,GAAEN,UAAW,IAAG;MACxBO,MAAM,EAAG,GAAEP,UAAW,IAAG;MACzBQ,QAAQ,EAAG,YAAWJ,WAAY,KAAIA,WAAY,IAAGA,WAAY,UAASJ,UAAW,OAAMI,WAAY,IAAGA,WAAY,WAAUJ,UAAW,OAAMI,WAAW,GAAGC,WAAY,OAAMA,WAAY,IAAGA,WAAY,UAASA,WAAW,GAAG,CAAE,OAAMA,WAAY,IAAGA,WAAY,WAAUA,WAAW,GAAG,CAAE;IACpS,CAAE;IAAA,GACEF;EAAI,CACX,CAAC;AAEV,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, ForwardedRef, HTMLAttributes } from "react";
2
2
  import Scrollbar from "smooth-scrollbar";
3
- import type { ScrollbarOptions, ScrollListener } from "smooth-scrollbar/interfaces";
3
+ import type { ScrollListener, ScrollbarOptions } from "smooth-scrollbar/interfaces";
4
4
  export { default as Scrollbar } from "smooth-scrollbar";
5
5
  export * from "smooth-scrollbar/interfaces";
6
6
  export interface ScrollOptions extends Partial<ScrollbarOptions> {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
- import { css } from "@emotion/css";
4
3
  import { clsx } from "deepsea-tools";
5
4
  import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
6
5
  import Scrollbar from "smooth-scrollbar";
6
+ import { css } from "@emotion/css";
7
7
  import { px, transformCSSVariable } from "../utils";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  export { default as Scrollbar } from "smooth-scrollbar";
@@ -1 +1 @@
1
- {"version":3,"names":["css","clsx","forwardRef","useEffect","useImperativeHandle","useLayoutEffect","useRef","Scrollbar","px","transformCSSVariable","jsx","_jsx","default","Scroll","props","ref","children","options","className","style","scrollbar","onScrollbar","rest","thumbWidth","thumbRadius","thumbColor","trackColor","scrollbarOptions","ele","bar","current","init","destroy","addListener","removeListener","undefined"],"sources":["../../../src/components/Scroll.tsx"],"sourcesContent":["\"use client\"\n\nimport { css } from \"@emotion/css\"\nimport { clsx } from \"deepsea-tools\"\nimport { CSSProperties, ForwardedRef, forwardRef, HTMLAttributes, useEffect, useImperativeHandle, useLayoutEffect, useRef } from \"react\"\nimport Scrollbar from \"smooth-scrollbar\"\nimport type { ScrollbarOptions, ScrollListener } from \"smooth-scrollbar/interfaces\"\nimport { px, transformCSSVariable } from \"../utils\"\nexport { default as Scrollbar } from \"smooth-scrollbar\"\nexport * from \"smooth-scrollbar/interfaces\"\n\nexport interface ScrollOptions extends Partial<ScrollbarOptions> {\n /** 滑块宽度 */\n thumbWidth?: number | string\n /** 滑块圆角大小 */\n thumbRadius?: number | string\n /** 滑块背景颜色 */\n thumbColor?: CSSProperties[\"backgroundColor\"]\n /** 滚动条背景颜色 */\n trackColor?: CSSProperties[\"backgroundColor\"]\n}\n\nexport interface ScrollProps extends HTMLAttributes<HTMLDivElement> {\n /** 滚动的配置 */\n options?: ScrollOptions\n /** 滚动条实例 */\n scrollbar?: ForwardedRef<Scrollbar>\n /** 滚动条滚动事件 */\n onScrollbar?: ScrollListener\n}\n\nexport const Scroll = forwardRef<HTMLDivElement, ScrollProps>((props, ref) => {\n const { children, options, className, style, scrollbar, onScrollbar, ...rest } = props\n const { thumbWidth, thumbRadius, thumbColor, trackColor, ...scrollbarOptions } = options || {}\n const ele = useRef<HTMLDivElement>(null)\n const bar = useRef<Scrollbar | null>(null)\n\n useLayoutEffect(() => {\n bar.current = Scrollbar.init(ele.current!, scrollbarOptions)\n return () => bar.current?.destroy()\n }, [])\n\n useImperativeHandle(ref, () => ele.current!, [])\n\n useImperativeHandle(scrollbar, () => bar.current!, [])\n\n useEffect(() => {\n if (!onScrollbar) return\n bar.current?.addListener(onScrollbar)\n return () => bar.current?.removeListener(onScrollbar)\n }, [onScrollbar])\n\n return (\n <div\n ref={ele}\n className={clsx(\n css`\n .scrollbar-track.scrollbar-track-x {\n ${thumbWidth !== undefined ? \"height: var(--thumb-width);\" : \"\"}\n ${trackColor !== undefined ? \"background-color: var(--track-color);\" : \"\"}\n }\n\n .scrollbar-thumb.scrollbar-thumb-x {\n ${thumbWidth !== undefined ? \"height: var(--thumb-width);\" : \"\"}\n ${thumbRadius !== undefined ? \"border-radius: var(--thumb-radius);\" : \"\"}\n ${thumbColor !== undefined ? \"background-color: var(--thumb-color);\" : \"\"}\n }\n\n .scrollbar-track.scrollbar-track-y {\n ${thumbWidth !== undefined ? \"width: var(--thumb-width);\" : \"\"}\n ${trackColor !== undefined ? \"background-color: var(--track-color);\" : \"\"}\n }\n\n .scrollbar-thumb.scrollbar-thumb-y {\n ${thumbWidth !== undefined ? \"width: var(--thumb-width);\" : \"\"}\n ${thumbRadius !== undefined ? \"border-radius: var(--thumb-radius);\" : \"\"}\n ${thumbColor !== undefined ? \"background-color: var(--thumb-color);\" : \"\"}\n }\n `,\n className,\n )}\n style={transformCSSVariable(\n {\n thumbWidth: px(thumbWidth),\n thumbRadius: px(thumbRadius),\n thumbColor,\n trackColor,\n },\n style,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,GAAG,QAAQ,cAAc;AAClC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAAsCC,UAAU,EAAkBC,SAAS,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACxI,OAAOC,SAAS,MA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AAEa,GAAI;IACTV,SAAS,EAAEjB,IAAI,CACXD,GAAI;AACpB;AACA,0BAA0BuB,UAAU,KAAKY,SAAS,GAAG,6BAA6B,GAAG,EAAG;AACxF,0BAA0BT,UAAU,KAAKS,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA;AACA;AACA,0BAA0BZ,UAAU,KAAKY,SAAS,GAAG,6BAA6B,GAAG,EAAG;AACxF,0BAA0BX,WAAW,KAAKW,SAAS,GAAG,qCAAqC,GAAG,EAAG;AACjG,0BAA0BV,UAAU,KAAKU,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA;AACA;AACA,0BAA0BZ,UAAU,KAAKY,SAAS,GAAG,4BAA4B,GAAG,EAAG;AACvF,0BAA0BT,UAAU,KAAKS,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA;AACA;AACA,0BAA0BZ,UAAU,KAAKY,SAAS,GAAG,4BAA4B,GAAG,EAAG;AACvF,0BAA0BX,WAAW,KAAKW,SAAS,GAAG,qCAAqC,GAAG,EAAG;AACjG,0BAA0BV,UAAU,KAAKU,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA,iBAAiB,EACDjB,SACJ,CAAE;IACFC,KAAK,EAAEV,oBAAoB,CACvB;MACIc,UAAU,EAAEf,EAAE,CAACe,UAAU,CAAC;MAC1BC,WAAW,EAAEhB,EAAE,CAACgB,WAAW,CAAC;MAC5BC,UAAU;MACVC;IACJ,CAAC,EACDP,KACJ,CAAE;IAAA,GACEG,IAAI;IAAAN,QAAA,EAEPA;EAAQ,CACR,CAAC;AAEd,CAAC,CAAC"}
1
+ {"version":3,"names":["clsx","forwardRef","useEffect","useImperativeHandle","useLayoutEffect","useRef","Scrollbar","css","px","transformCSSVariable","jsx","_jsx","default","Scroll","props","ref","children","options","className","style","scrollbar","onScrollbar","rest","thumbWidth","thumbRadius","thumbColor","trackColor","scrollbarOptions","ele","bar","current","init","destroy","addListener","removeListener","undefined"],"sources":["../../../src/components/Scroll.tsx"],"sourcesContent":["\"use client\"\n\nimport { clsx } from \"deepsea-tools\"\nimport { CSSProperties, ForwardedRef, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from \"react\"\nimport Scrollbar from \"smooth-scrollbar\"\nimport type { ScrollListener, ScrollbarOptions } from \"smooth-scrollbar/interfaces\"\n\nimport { css } from \"@emotion/css\"\nimport { px, transformCSSVariable } from \"../utils\"\n\nexport { default as Scrollbar } from \"smooth-scrollbar\"\nexport * from \"smooth-scrollbar/interfaces\"\n\nexport interface ScrollOptions extends Partial<ScrollbarOptions> {\n /** 滑块宽度 */\n thumbWidth?: number | string\n /** 滑块圆角大小 */\n thumbRadius?: number | string\n /** 滑块背景颜色 */\n thumbColor?: CSSProperties[\"backgroundColor\"]\n /** 滚动条背景颜色 */\n trackColor?: CSSProperties[\"backgroundColor\"]\n}\n\nexport interface ScrollProps extends HTMLAttributes<HTMLDivElement> {\n /** 滚动的配置 */\n options?: ScrollOptions\n /** 滚动条实例 */\n scrollbar?: ForwardedRef<Scrollbar>\n /** 滚动条滚动事件 */\n onScrollbar?: ScrollListener\n}\n\nexport const Scroll = forwardRef<HTMLDivElement, ScrollProps>((props, ref) => {\n const { children, options, className, style, scrollbar, onScrollbar, ...rest } = props\n const { thumbWidth, thumbRadius, thumbColor, trackColor, ...scrollbarOptions } = options || {}\n const ele = useRef<HTMLDivElement>(null)\n const bar = useRef<Scrollbar | null>(null)\n\n useLayoutEffect(() => {\n bar.current = Scrollbar.init(ele.current!, scrollbarOptions)\n return () => bar.current?.destroy()\n }, [])\n\n useImperativeHandle(ref, () => ele.current!, [])\n\n useImperativeHandle(scrollbar, () => bar.current!, [])\n\n useEffect(() => {\n if (!onScrollbar) return\n bar.current?.addListener(onScrollbar)\n return () => bar.current?.removeListener(onScrollbar)\n }, [onScrollbar])\n\n return (\n <div\n ref={ele}\n className={clsx(\n css`\n .scrollbar-track.scrollbar-track-x {\n ${thumbWidth !== undefined ? \"height: var(--thumb-width);\" : \"\"}\n ${trackColor !== undefined ? \"background-color: var(--track-color);\" : \"\"}\n }\n\n .scrollbar-thumb.scrollbar-thumb-x {\n ${thumbWidth !== undefined ? \"height: var(--thumb-width);\" : \"\"}\n ${thumbRadius !== undefined ? \"border-radius: var(--thumb-radius);\" : \"\"}\n ${thumbColor !== undefined ? \"background-color: var(--thumb-color);\" : \"\"}\n }\n\n .scrollbar-track.scrollbar-track-y {\n ${thumbWidth !== undefined ? \"width: var(--thumb-width);\" : \"\"}\n ${trackColor !== undefined ? \"background-color: var(--track-color);\" : \"\"}\n }\n\n .scrollbar-thumb.scrollbar-thumb-y {\n ${thumbWidth !== undefined ? \"width: var(--thumb-width);\" : \"\"}\n ${thumbRadius !== undefined ? \"border-radius: var(--thumb-radius);\" : \"\"}\n ${thumbColor !== undefined ? \"background-color: var(--thumb-color);\" : \"\"}\n }\n `,\n className,\n )}\n style={transformCSSVariable(\n {\n thumbWidth: px(thumbWidth),\n thumbRadius: px(thumbRadius),\n thumbColor,\n trackColor,\n },\n style,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,IAAI,QAAQ,eAAe;AACpC,SAAsDC,UAAU,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACxI,OAAOC,SAAS,MAAM,kBAAkB;AAGxC,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASC,EAAE,EAAEC,oBAAoB;AAAkB,SAAAC,GAAA,IAAAC,IAAA;AAEnD,SAASC,OAAO,IAAIN,SAAS,QAAQ,kBAAkB;AACvD,cAAc,6BAA6B;AAsB3C,OAAO,MAAMO,MAAM,gBAAGZ,UAAU,CAA8B,CAACa,KAAK,EAAEC,GAAG,KAAK;EAC1E,MAAM;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,SAAS;IAAEC,KAAK;IAAEC,SAAS;IAAEC,WAAW;IAAE,GAAGC;EAAK,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KU,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA;AACA;AACA,0BAA0BZ,UAAU,KAAKY,SAAS,GAAG,4BAA4B,GAAG,EAAG;AACvF,0BAA0BT,UAAU,KAAKS,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA;AACA;AACA,0BAA0BZ,UAAU,KAAKY,SAAS,GAAG,4BAA4B,GAAG,EAAG;AACvF,0BAA0BX,WAAW,KAAKW,SAAS,GAAG,qCAAqC,GAAG,EAAG;AACjG,0BAA0BV,UAAU,KAAKU,SAAS,GAAG,uCAAuC,GAAG,EAAG;AAClG;AACA,iBAAiB,EACDjB,SACJ,CAAE;IACFC,KAAK,EAAEV,oBAAoB,CACvB;MACIc,UAAU,EAAEf,EAAE,CAACe,UAAU,CAAC;MAC1BC,WAAW,EAAEhB,EAAE,CAACgB,WAAW,CAAC;MAC5BC,UAAU;MACVC;IACJ,CAAC,EACDP,KACJ,CAAE;IAAA,GACEG,IAAI;IAAAN,QAAA,EAEPA;EAAQ,CACR,CAAC;AAEd,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { css } from "@emotion/css";
4
3
  import { clsx } from "deepsea-tools";
5
4
  import { forwardRef } from "react";
5
+ import { css } from "@emotion/css";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export const Skeleton = /*#__PURE__*/forwardRef((props, ref) => {
8
8
  let {
@@ -1 +1 @@
1
- {"version":3,"names":["css","clsx","forwardRef","jsx","_jsx","Skeleton","props","ref","className","loading","children","rest","undefined"],"sources":["../../../src/components/Skeleton.tsx"],"sourcesContent":["\"use client\"\n\nimport { css } from \"@emotion/css\"\nimport { clsx } from \"deepsea-tools\"\nimport { forwardRef, HTMLAttributes } from \"react\"\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n loading?: boolean\n}\n\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>((props, ref) => {\n let { className, loading, children, ...rest } = props\n\n loading ??= children === undefined || children === null\n\n return (\n <div\n ref={ref}\n className={clsx(\n css`\n @keyframes shimmer {\n 0% {\n background-position: -400px 0px;\n }\n 100% {\n background-position: 400px 0px;\n }\n }\n `,\n loading &&\n css`\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.067) 8%, rgba(0, 0, 0, 0.133) 18%, rgba(0, 0, 0, 0.067) 33%);\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: shimmer;\n animation-timing-function: linear;\n background-size: 800px 104px;\n `,\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,GAAG,QAAQ,cAAc;AAClC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,UAAU,QAAwB,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMlD,OAAO,MAAMC,QAAQ,gBAAGH,UAAU,CAAgC,CAACI,KAAK,EAAEC,GAAG,KAAK;EAC9E,IAAI;IAAEC,SAAS;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAErDG,OAAO,KAAKC,QAAQ,KAAKE,SAAS,IAAIF,QAAQ,KAAK,IAAI;EAEvD,oBACIN,IAAA;IACIG,GAAG,EAAEA,GAAI;IACTC,SAAS,EAAEP,IAAI,CACXD,GAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EACDS,OAAO,IACHT,GAAI;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EACLQ,SACJ,CAAE;IAAA,GACEG,IAAI;IAAAD,QAAA,EAEPA;EAAQ,CACR,CAAC;AAEd,CAAC,CAAC"}
1
+ {"version":3,"names":["clsx","forwardRef","css","jsx","_jsx","Skeleton","props","ref","className","loading","children","rest","undefined"],"sources":["../../../src/components/Skeleton.tsx"],"sourcesContent":["\"use client\"\n\nimport { clsx } from \"deepsea-tools\"\nimport { HTMLAttributes, forwardRef } from \"react\"\n\nimport { css } from \"@emotion/css\"\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n loading?: boolean\n}\n\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>((props, ref) => {\n let { className, loading, children, ...rest } = props\n\n loading ??= children === undefined || children === null\n\n return (\n <div\n ref={ref}\n className={clsx(\n css`\n @keyframes shimmer {\n 0% {\n background-position: -400px 0px;\n }\n 100% {\n background-position: 400px 0px;\n }\n }\n `,\n loading &&\n css`\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.067) 8%, rgba(0, 0, 0, 0.133) 18%, rgba(0, 0, 0, 0.067) 33%);\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: shimmer;\n animation-timing-function: linear;\n background-size: 800px 104px;\n `,\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,IAAI,QAAQ,eAAe;AACpC,SAAyBC,UAAU,QAAQ,OAAO;AAElD,SAASC,GAAG,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMlC,OAAO,MAAMC,QAAQ,gBAAGJ,UAAU,CAAgC,CAACK,KAAK,EAAEC,GAAG,KAAK;EAC9E,IAAI;IAAEC,SAAS;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAErDG,OAAO,KAAKC,QAAQ,KAAKE,SAAS,IAAIF,QAAQ,KAAK,IAAI;EAEvD,oBACIN,IAAA;IACIG,GAAG,EAAEA,GAAI;IACTC,SAAS,EAAER,IAAI,CACXE,GAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EACDO,OAAO,IACHP,GAAI;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EACLM,SACJ,CAAE;IAAA,GACEG,IAAI;IAAAD,QAAA,EAEPA;EAAQ,CACR,CAAC;AAEd,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import { ComponentProps } from "react";
2
- export type TitleProps = ComponentProps<"title">;
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ export type TitleProps = ComponentPropsWithoutRef<"title">;
3
3
  export declare const Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>, "ref"> & import("react").RefAttributes<HTMLTitleElement>>;
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useImperativeHandle","useLayoutEffect","useRef","createPortal","getReactVersion","jsx","_jsx","major","Title","props","ref","ele","current","title","document","head","querySelector","insertBefore"],"sources":["../../../src/components/Title.tsx"],"sourcesContent":["import { ComponentProps, forwardRef, useImperativeHandle, useLayoutEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\nimport { getReactVersion } from \"../utils/getReactVersion\"\n\nexport type TitleProps = ComponentProps<\"title\">\n\nconst [major] = getReactVersion()\n\nexport const Title = forwardRef<HTMLTitleElement, TitleProps>((props, ref) => {\n if (major >= 19) return <title ref={ref} {...props} />\n\n const ele = useRef<HTMLTitleElement>(null)\n\n useImperativeHandle(ref, () => ele.current as HTMLTitleElement, [ele.current])\n\n useLayoutEffect(() => {\n const title = document.head.querySelector(\"title\")\n if (title === ele.current) return\n document.head.insertBefore(ele.current as HTMLTitleElement, title)\n }, [])\n\n return createPortal(<title ref={ele} {...props} />, document.head)\n})\n"],"mappings":"AAAA,SAAyBA,UAAU,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAChG,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,eAAe;AAAkC,SAAAC,GAAA,IAAAC,IAAA;AAI1D,MAAM,CAACC,KAAK,CAAC,GAAGH,eAAe,CAAC,CAAC;AAEjC,OAAO,MAAMI,KAAK,gBAAGT,UAAU,CAA+B,CAACU,KAAK,EAAEC,GAAG,KAAK;EAC1E,IAAIH,KAAK,IAAI,EAAE,EAAE,oBAAOD,IAAA;IAAOI,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;EAEtD,MAAME,GAAG,GAAGT,MAAM,CAAmB,IAAI,CAAC;EAE1CF,mBAAmB,CAACU,GAAG,EAAE,MAAMC,GAAG,CAACC,OAA2B,EAAE,CAACD,GAAG,CAACC,OAAO,CAAC,CAAC;EAE9EX,eAAe,CAAC,MAAM;IAClB,MAAMY,KAAK,GAAGC,QAAQ,CAACC,IAAI,CAACC,aAAa,CAAC,OAAO,CAAC;IAClD,IAAIH,KAAK,KAAKF,GAAG,CAACC,OAAO,EAAE;IAC3BE,QAAQ,CAACC,IAAI,CAACE,YAAY,CAACN,GAAG,CAACC,OAAO,EAAsBC,KAAK,CAAC;EACtE,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAOV,YAAY,eAACG,IAAA;IAAOI,GAAG,EAAEC,GAAI;IAAA,GAAKF;EAAK,CAAG,CAAC,EAAEK,QAAQ,CAACC,IAAI,CAAC;AACtE,CAAC,CAAC"}
1
+ {"version":3,"names":["forwardRef","useImperativeHandle","useLayoutEffect","useRef","createPortal","getReactVersion","jsx","_jsx","major","Title","props","ref","ele","current","title","document","head","querySelector","insertBefore"],"sources":["../../../src/components/Title.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, forwardRef, useImperativeHandle, useLayoutEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nimport { getReactVersion } from \"../utils/getReactVersion\"\n\nexport type TitleProps = ComponentPropsWithoutRef<\"title\">\n\nconst [major] = getReactVersion()\n\nexport const Title = forwardRef<HTMLTitleElement, TitleProps>((props, ref) => {\n if (major >= 19) return <title ref={ref} {...props} />\n\n const ele = useRef<HTMLTitleElement>(null)\n\n useImperativeHandle(ref, () => ele.current as HTMLTitleElement, [ele.current])\n\n useLayoutEffect(() => {\n const title = document.head.querySelector(\"title\")\n if (title === ele.current) return\n document.head.insertBefore(ele.current as HTMLTitleElement, title)\n }, [])\n\n return createPortal(<title ref={ele} {...props} />, document.head)\n})\n"],"mappings":"AAAA,SAAmCA,UAAU,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAC1G,SAASC,YAAY,QAAQ,WAAW;AAExC,SAASC,eAAe;AAAkC,SAAAC,GAAA,IAAAC,IAAA;AAI1D,MAAM,CAACC,KAAK,CAAC,GAAGH,eAAe,CAAC,CAAC;AAEjC,OAAO,MAAMI,KAAK,gBAAGT,UAAU,CAA+B,CAACU,KAAK,EAAEC,GAAG,KAAK;EAC1E,IAAIH,KAAK,IAAI,EAAE,EAAE,oBAAOD,IAAA;IAAOI,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;EAEtD,MAAME,GAAG,GAAGT,MAAM,CAAmB,IAAI,CAAC;EAE1CF,mBAAmB,CAACU,GAAG,EAAE,MAAMC,GAAG,CAACC,OAA2B,EAAE,CAACD,GAAG,CAACC,OAAO,CAAC,CAAC;EAE9EX,eAAe,CAAC,MAAM;IAClB,MAAMY,KAAK,GAAGC,QAAQ,CAACC,IAAI,CAACC,aAAa,CAAC,OAAO,CAAC;IAClD,IAAIH,KAAK,KAAKF,GAAG,CAACC,OAAO,EAAE;IAC3BE,QAAQ,CAACC,IAAI,CAACE,YAAY,CAACN,GAAG,CAACC,OAAO,EAAsBC,KAAK,CAAC;EACtE,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAOV,YAAY,eAACG,IAAA;IAAOI,GAAG,EAAEC,GAAI;IAAA,GAAKF;EAAK,CAAG,CAAC,EAAEK,QAAQ,CAACC,IAAI,CAAC;AACtE,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["useSize","forwardRef","useEffect","useRef","useState","jsx","_jsx","TransitionBox","props","ref","style","containerClassName","containerStyle","children","vertical","horizontal","time","rest","container","size","width","height","count","setCount","Math","min","outerStyle","transitionProperty","filter","Boolean","join","undefined","transitionDuration","overflow","position","className"],"sources":["../../../src/components/TransitionBox.tsx"],"sourcesContent":["\"use client\"\n\nimport { useSize } from \"ahooks\"\nimport { CSSProperties, FC, forwardRef, HTMLAttributes, useEffect, useRef, useState } from \"react\"\n\nexport interface TransitionBoxProps extends HTMLAttributes<HTMLDivElement> {\n containerClassName?: string\n containerStyle?: CSSProperties\n vertical?: boolean\n horizontal?: boolean\n time?: number\n}\n\n/** 尺寸渐变的组件 */\nexport const TransitionBox: FC<TransitionBoxProps> = forwardRef<HTMLDivElement, TransitionBoxProps>((props, ref) => {\n const { style, containerClassName, containerStyle, children, vertical = true, horizontal = true, time = 3000, ...rest } = props\n const container = useRef<HTMLDivElement>(null)\n const size = useSize(container)\n const width = size?.width ?? 0\n const height = size?.height ?? 0\n const [count, setCount] = useState(0)\n\n useEffect(() => {\n setCount(count => Math.min(count + 1, 3))\n }, [width, height])\n\n const outerStyle: CSSProperties = {\n transitionProperty: count === 3 ? [horizontal && \"width\", vertical && \"height\"].filter(Boolean).join(\", \") : undefined,\n transitionDuration: count === 3 ? `${time}ms` : undefined,\n width,\n height,\n overflow: \"hidden\",\n position: \"relative\",\n ...style,\n }\n\n return (\n <div ref={ref} style={outerStyle} {...rest}>\n <div className={containerClassName} style={{ position: \"absolute\", ...containerStyle }} ref={container}>\n {children}\n </div>\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,OAAO,QAAQ,QAAQ;AAChC,SAA4BC,UAAU,EAAkBC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUlG;AACA,OAAO,MAAMC,aAAqC,gBAAGN,UAAU,CAAqC,CAACO,KAAK,EAAEC,GAAG,KAAK;EAChH,MAAM;IAAEC,KAAK;IAAEC,kBAAkB;IAAEC,cAAc;IAAEC,QAAQ;IAAEC,QAAQ,GAAG,IAAI;IAAEC,UAAU,GAAG,IAAI;IAAEC,IAAI,GAAG,IAAI;IAAE,GAAGC;EAAK,CAAC,GAA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","useRef","useState","jsx","_jsx","TransitionBox","props","ref","style","containerClassName","containerStyle","children","vertical","horizontal","time","rest","container","size","width","height","count","setCount","Math","min","outerStyle","transitionProperty","filter","Boolean","join","undefined","transitionDuration","overflow","position","className"],"sources":["../../../src/components/TransitionBox.tsx"],"sourcesContent":["\"use client\"\n\nimport { useSize } from \"ahooks\"\nimport { CSSProperties, FC, HTMLAttributes, forwardRef, useEffect, useRef, useState } from \"react\"\n\nexport interface TransitionBoxProps extends HTMLAttributes<HTMLDivElement> {\n containerClassName?: string\n containerStyle?: CSSProperties\n vertical?: boolean\n horizontal?: boolean\n time?: number\n}\n\n/** 尺寸渐变的组件 */\nexport const TransitionBox: FC<TransitionBoxProps> = forwardRef<HTMLDivElement, TransitionBoxProps>((props, ref) => {\n const { style, containerClassName, containerStyle, children, vertical = true, horizontal = true, time = 3000, ...rest } = props\n const container = useRef<HTMLDivElement>(null)\n const size = useSize(container)\n const width = size?.width ?? 0\n const height = size?.height ?? 0\n const [count, setCount] = useState(0)\n\n useEffect(() => {\n setCount(count => Math.min(count + 1, 3))\n }, [width, height])\n\n const outerStyle: CSSProperties = {\n transitionProperty: count === 3 ? [horizontal && \"width\", vertical && \"height\"].filter(Boolean).join(\", \") : undefined,\n transitionDuration: count === 3 ? `${time}ms` : undefined,\n width,\n height,\n overflow: \"hidden\",\n position: \"relative\",\n ...style,\n }\n\n return (\n <div ref={ref} style={outerStyle} {...rest}>\n <div className={containerClassName} style={{ position: \"absolute\", ...containerStyle }} ref={container}>\n {children}\n </div>\n </div>\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,OAAO,QAAQ,QAAQ;AAChC,SAA4CC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUlG;AACA,OAAO,MAAMC,aAAqC,gBAAGN,UAAU,CAAqC,CAACO,KAAK,EAAEC,GAAG,KAAK;EAChH,MAAM;IAAEC,KA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AAE,GAAGtB;MAAe,CAAE;MAACH,GAAG,EAAES,SAAU;MAAAL,QAAA,EAClGA;IAAQ,CACR;EAAC,CACL,CAAC;AAEd,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { css } from "@emotion/css";
4
3
  import { clsx } from "deepsea-tools";
5
4
  import { forwardRef } from "react";
5
+ import { css } from "@emotion/css";
6
6
  import { px, transformCSSVariable } from "../utils";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  /** 梯形组件 */
@@ -1 +1 @@
1
- {"version":3,"names":["css","clsx","forwardRef","px","transformCSSVariable","jsx","_jsx","Trapezium","props","ref","top","bottom","height","borderRadius","className","style","rest","diff","a","Math","atan","b","tan","c","cos","d","sin","e","PI","f","g","h","width","clipath"],"sources":["../../../src/components/Trapezium.tsx"],"sourcesContent":["\"use client\"\n\nimport { css } from \"@emotion/css\"\nimport { clsx } from \"deepsea-tools\"\nimport { HTMLAttributes, forwardRef } from \"react\"\nimport { px, transformCSSVariable } from \"../utils\"\n\nexport interface TrapeziumProps extends HTMLAttributes<HTMLDivElement> {\n top: number\n bottom: number\n height: number\n borderRadius: number\n}\n\n/** 梯形组件 */\nexport const Trapezium = forwardRef<HTMLDivElement, TrapeziumProps>((props, ref) => {\n const { top, bottom, height, borderRadius, className, style, ...rest } = props\n\n const diff = (bottom - top) / 2\n\n const a = Math.atan(height / diff) / 2\n\n const b = borderRadius / Math.tan(a)\n\n const c = b * Math.cos(a * 2)\n\n const d = b * Math.sin(a * 2)\n\n const e = Math.PI / 2 - a\n\n const f = borderRadius / Math.tan(e)\n\n const g = f * Math.cos(a * 2)\n\n const h = f * Math.sin(a * 2)\n\n return (\n <div\n ref={ref}\n className={clsx(\n css`\n width: var(--width);\n height: var(--height);\n clip-path: var(--clip-path);\n `,\n className,\n )}\n style={transformCSSVariable(\n {\n width: px(bottom),\n height: px(height),\n clipath: `path(\"M ${diff + f} ${0} A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} ${0} Z\")`,\n },\n style,\n )}\n {...rest}\n />\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,GAAG,QAAQ,cAAc;AAClC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAAyBC,UAAU,QAAQ,OAAO;AAClD,SAASC,EAAE,EAAEC,oBAAoB;AAAkB,SAAAC,GAAA,IAAAC,IAAA;AASnD;AACA,OAAO,MAAMC,SAAS,gBAAGL,UAAU,CAAiC,CAACM,KAAK,EAAEC,GAAG,KAAK;EAChF,MAAM;IAAEC,GAAG;IAAEC,MAAM;IAAEC,MAAM;IAAEC,YAAY;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGR,KAAK;EAE9E,MAAMS,IAAI,GAAG,CAACN,MAAM,GAAGD,GAAG,IAAI,CAAC;EAE/B,MAAMQ,CAAC,GAAGC,IAAI,CAACC,IAAI,CAACR,MAAM,GAAGK,IAAI,CAAC,GAAG,CAAC;EAEtC,MAAMI,CAAC,GAAGR,YAAY,GAAGM,IAAI,CAACG,GAAG,CAACJ,CAAC,CAAC;EAEpC,MAAMK,CAAC,GAAGF,CAAC,GAAGF,IAAI,CAACK,GAAG,CAACN,CAAC,GAAG,CAAC,CAAC;EAE7B,MAAMO,CAAC,GAAGJ,CAAC,GAAGF,IAAI,CAACO,GAAG,CAACR,CAAC,GAAG,CAAC,CAAC;EAE7B,MAAMS,CAAC,GAAGR,IAAI,CAACS,EAAE,GAAG,CAAC,GAAGV,CAAC;EAEzB,MAAMW,CAAC,GAAGhB,YAAY,GAAGM,IAAI,CAACG,GAAG,CAACK,CAAC,CAAC;EAEpC,MAAMG,CAAC,GAAGD,CAAC,GAAGV,IAAI,CAACK,GAAG,CAACN,CAAC,GAAG,CAAC,CAAC;EAE7B,MAAMa,CAAC,GAAGF,CAAC,GAAGV,IAAI,CAACO,GAAG,CAACR,CAAC,GAAG,CAAC,CAAC;EAE7B,oBACIZ,IAAA;IACIG,GAAG,EAAEA,GAAI;IACTK,SAAS,EAAEb,IAAI,CACXD,GAAI;AACpB;AACA;AACA;AACA,iBAAiB,EACDc,SACJ,CAAE;IACFC,KAAK,EAAEX,oBAAoB,CACvB;MACI4B,KAAK,EAAE7B,EAAE,CAACQ,MAAM,CAAC;MACjBC,MAAM,EAAET,EAAE,CAACS,MAAM,CAAC;MAClBqB,OAAO,EAAG,WAAUhB,IAAI,GAAGY,CAAE,IAAG,CAAE,OAAMhB,YAAa,IAAGA,YAAa,UAASI,IAAI,GAAGa,CAAE,IAAGC,CAAE,MAAKR,CAAE,IAAGX,MAAM,GAAGa,CAAE,MAAKZ,YAAa,IAAGA,YAAa,UAASQ,CAAE,IAAGT,MAAO,MAAKD,MAAM,GAAGU,CAAE,IAAGT,MAAO,MAAKC,YAAa,IAAGA,YAAa,UAASF,MAAM,GAAGY,CAAE,IAAGX,MAAM,GAAGa,CAAE,MAAKf,GAAG,GAAGO,IAAI,GAAGa,CAAE,IAAGC,CAAE,MAAKlB,YAAa,IAAGA,YAAa,UAASH,GAAG,GAAGO,IAAI,GAAGY,CAAE,IAAG,CAAE;IAClW,CAAC,EACDd,KACJ,CAAE;IAAA,GACEC;EAAI,CACX,CAAC;AAEV,CAAC,CAAC"}
1
+ {"version":3,"names":["clsx","forwardRef","css","px","transformCSSVariable","jsx","_jsx","Trapezium","props","ref","top","bottom","height","borderRadius","className","style","rest","diff","a","Math","atan","b","tan","c","cos","d","sin","e","PI","f","g","h","width","clipath"],"sources":["../../../src/components/Trapezium.tsx"],"sourcesContent":["\"use client\"\n\nimport { clsx } from \"deepsea-tools\"\nimport { HTMLAttributes, forwardRef } from \"react\"\n\nimport { css } from \"@emotion/css\"\nimport { px, transformCSSVariable } from \"../utils\"\n\nexport interface TrapeziumProps extends HTMLAttributes<HTMLDivElement> {\n top: number\n bottom: number\n height: number\n borderRadius: number\n}\n\n/** 梯形组件 */\nexport const Trapezium = forwardRef<HTMLDivElement, TrapeziumProps>((props, ref) => {\n const { top, bottom, height, borderRadius, className, style, ...rest } = props\n\n const diff = (bottom - top) / 2\n\n const a = Math.atan(height / diff) / 2\n\n const b = borderRadius / Math.tan(a)\n\n const c = b * Math.cos(a * 2)\n\n const d = b * Math.sin(a * 2)\n\n const e = Math.PI / 2 - a\n\n const f = borderRadius / Math.tan(e)\n\n const g = f * Math.cos(a * 2)\n\n const h = f * Math.sin(a * 2)\n\n return (\n <div\n ref={ref}\n className={clsx(\n css`\n width: var(--width);\n height: var(--height);\n clip-path: var(--clip-path);\n `,\n className,\n )}\n style={transformCSSVariable(\n {\n width: px(bottom),\n height: px(height),\n clipath: `path(\"M ${diff + f} ${0} A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} ${0} Z\")`,\n },\n style,\n )}\n {...rest}\n />\n )\n})\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,IAAI,QAAQ,eAAe;AACpC,SAAyBC,UAAU,QAAQ,OAAO;AAElD,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASC,EAAE,EAAEC,oBAAoB;AAAkB,SAAAC,GAAA,IAAAC,IAAA;AASnD;AACA,OAAO,MAAMC,SAAS,gBAAGN,UAAU,CAAiC,CAACO,KAAK,EAAEC,GAAG,KAAK;EAChF,MAAM;IAAEC,GAAG;IAAEC,MAAM;IAAEC,MAAM;IAAEC,YAAY;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGR,KAAK;E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,CAAE,IAAGT,MAAO,MAAKC,YAAa,IAAGA,YAAa,UAASF,MAAM,GAAGY,CAAE,IAAGX,MAAM,GAAGa,CAAE,MAAKf,GAAG,GAAGO,IAAI,GAAGa,CAAE,IAAGC,CAAE,MAAKlB,YAAa,IAAGA,YAAa,UAASH,GAAG,GAAGO,IAAI,GAAGY,CAAE,IAAG,CAAE;IAClW,CAAC,EACDd,KACJ,CAAE;IAAA,GACEC;EAAI,CACX,CAAC;AAEV,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepsea-components",
3
- "version": "5.7.4",
3
+ "version": "5.7.5",
4
4
  "description": "格数科技自用组件库",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -32,7 +32,7 @@
32
32
  "hls.js": "^1.5.17",
33
33
  "smooth-scrollbar": "^8.8.4",
34
34
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
35
- "deepsea-tools": "5.14.1"
35
+ "deepsea-tools": "5.15.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@types/react": "^18.3.1",
@@ -1,8 +1,9 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
- import { forwardRef, HTMLAttributes, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
4
+ import { HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
5
+
6
+ import { css } from "@emotion/css"
6
7
  import { px, transformCSSVariable } from "../utils"
7
8
 
8
9
  export interface AutoFitProps extends HTMLAttributes<HTMLDivElement> {
@@ -1,11 +1,12 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { useSize } from "ahooks"
5
4
  import { clsx, getArray } from "deepsea-tools"
6
- import { CSSProperties, forwardRef, MouseEvent as ReactMouseEvent, useEffect, useImperativeHandle, useRef } from "react"
5
+ import { CSSProperties, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
7
6
  import Scrollbar from "smooth-scrollbar"
8
7
  import { ScrollStatus } from "smooth-scrollbar/interfaces/scrollbar"
8
+
9
+ import { css } from "@emotion/css"
9
10
  import { px, transformCSSVariable } from "../utils"
10
11
  import { Scroll, ScrollProps } from "./Scroll"
11
12
 
@@ -1,8 +1,9 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
- import { forwardRef, TextareaHTMLAttributes, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
4
+ import { TextareaHTMLAttributes, forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
5
+
6
+ import { css } from "@emotion/css"
6
7
  import { px, transformCSSVariable } from "../utils"
7
8
 
8
9
  /**
@@ -1,10 +1,10 @@
1
1
  import { useLatest } from "ahooks"
2
2
  import ClipboardJS, { Event } from "clipboard"
3
- import { ComponentProps, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
3
+ import { ComponentPropsWithoutRef, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
4
4
 
5
5
  export { Event } from "clipboard"
6
6
 
7
- export type CopyButtonProps = ComponentProps<"button"> & {
7
+ export type CopyButtonProps = ComponentPropsWithoutRef<"button"> & {
8
8
  text?: string
9
9
  onCopySuccess?: (e: Event) => void
10
10
  onCopyError?: (e: Event) => void
@@ -4,18 +4,18 @@ import {
4
4
  DatasetComponentOption,
5
5
  ECharts,
6
6
  GridComponentOption,
7
- init,
8
7
  LineSeriesOption,
9
8
  PieSeriesOption,
10
9
  TitleComponentOption,
11
10
  TooltipComponentOption,
11
+ init,
12
12
  } from "echarts"
13
13
  import {
14
- ComponentProps,
15
- ForwardedRef,
16
- forwardRef,
14
+ ComponentPropsWithoutRef,
17
15
  ForwardRefExoticComponent,
16
+ ForwardedRef,
18
17
  RefAttributes,
18
+ forwardRef,
19
19
  useEffect,
20
20
  useImperativeHandle,
21
21
  useLayoutEffect,
@@ -28,7 +28,7 @@ export type BarOption = ComposeOption<BarSeriesOption | TitleComponentOption | D
28
28
 
29
29
  export type LineOption = ComposeOption<LineSeriesOption | TitleComponentOption | DatasetComponentOption | GridComponentOption | TooltipComponentOption>
30
30
 
31
- export interface EchartProps<T extends any = any> extends Omit<ComponentProps<"div">, "children"> {
31
+ export interface EchartProps<T extends any = any> extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
32
32
  width: number
33
33
  height: number
34
34
  option: T
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { useSize } from "ahooks"
5
4
  import { clsx } from "deepsea-tools"
6
5
  import { CSSProperties, HTMLAttributes, Key, ReactNode, RefObject, useEffect, useImperativeHandle, useRef, useState } from "react"
6
+
7
+ import { css } from "@emotion/css"
7
8
  import { px, transformCSSVariable } from "../utils"
8
9
 
9
10
  export interface FlowSizeData {
@@ -1,8 +1,9 @@
1
- import { css } from "@emotion/css"
2
1
  import { clsx } from "deepsea-tools"
3
- import { ComponentProps, FC, Fragment } from "react"
2
+ import { ComponentPropsWithoutRef, FC, Fragment } from "react"
3
+
4
+ import { css } from "@emotion/css"
4
5
 
5
- export type FormLabelProps = ComponentProps<"div"> & {
6
+ export type FormLabelProps = ComponentPropsWithoutRef<"div"> & {
6
7
  /**
7
8
  * Label 的宽度.
8
9
  */
@@ -1,9 +1,10 @@
1
- import { css } from "@emotion/css"
2
1
  import { useSize } from "ahooks"
3
2
  import { clsx } from "deepsea-tools"
4
- import { ComponentProps, CSSProperties, forwardRef, MouseEvent as ReactMouseEvent, useEffect, useImperativeHandle, useRef } from "react"
3
+ import { CSSProperties, ComponentPropsWithoutRef, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
4
+
5
+ import { css } from "@emotion/css"
5
6
 
6
- export type InfiniteScrollProps = ComponentProps<"div"> & {
7
+ export type InfiniteScrollProps = ComponentPropsWithoutRef<"div"> & {
7
8
  /**
8
9
  * 滚动的方向
9
10
  * @default "vertical"
@@ -1,8 +1,9 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
- import { CSSProperties, forwardRef, HTMLAttributes, useEffect, useImperativeHandle, useRef, useState } from "react"
4
+ import { CSSProperties, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react"
5
+
6
+ import { css } from "@emotion/css"
6
7
 
7
8
  export interface LoopSwiperProps extends HTMLAttributes<HTMLDivElement> {
8
9
  direction?: "horizontal" | "vertical"
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
 
3
- import { forwardRef, HTMLAttributes } from "react"
3
+ import { HTMLAttributes, forwardRef } from "react"
4
4
 
5
5
  export interface RingProps extends HTMLAttributes<HTMLDivElement> {
6
6
  outerWidth: number
@@ -1,11 +1,13 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
- import { CSSProperties, ForwardedRef, forwardRef, HTMLAttributes, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
4
+ import { CSSProperties, ForwardedRef, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
6
5
  import Scrollbar from "smooth-scrollbar"
7
- import type { ScrollbarOptions, ScrollListener } from "smooth-scrollbar/interfaces"
6
+ import type { ScrollListener, ScrollbarOptions } from "smooth-scrollbar/interfaces"
7
+
8
+ import { css } from "@emotion/css"
8
9
  import { px, transformCSSVariable } from "../utils"
10
+
9
11
  export { default as Scrollbar } from "smooth-scrollbar"
10
12
  export * from "smooth-scrollbar/interfaces"
11
13
 
@@ -1,8 +1,9 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
- import { forwardRef, HTMLAttributes } from "react"
4
+ import { HTMLAttributes, forwardRef } from "react"
5
+
6
+ import { css } from "@emotion/css"
6
7
 
7
8
  export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
8
9
  loading?: boolean
@@ -1,8 +1,9 @@
1
- import { ComponentProps, forwardRef, useImperativeHandle, useLayoutEffect, useRef } from "react"
1
+ import { ComponentPropsWithoutRef, forwardRef, useImperativeHandle, useLayoutEffect, useRef } from "react"
2
2
  import { createPortal } from "react-dom"
3
+
3
4
  import { getReactVersion } from "../utils/getReactVersion"
4
5
 
5
- export type TitleProps = ComponentProps<"title">
6
+ export type TitleProps = ComponentPropsWithoutRef<"title">
6
7
 
7
8
  const [major] = getReactVersion()
8
9
 
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { useSize } from "ahooks"
4
- import { CSSProperties, FC, forwardRef, HTMLAttributes, useEffect, useRef, useState } from "react"
4
+ import { CSSProperties, FC, HTMLAttributes, forwardRef, useEffect, useRef, useState } from "react"
5
5
 
6
6
  export interface TransitionBoxProps extends HTMLAttributes<HTMLDivElement> {
7
7
  containerClassName?: string
@@ -1,8 +1,9 @@
1
1
  "use client"
2
2
 
3
- import { css } from "@emotion/css"
4
3
  import { clsx } from "deepsea-tools"
5
4
  import { HTMLAttributes, forwardRef } from "react"
5
+
6
+ import { css } from "@emotion/css"
6
7
  import { px, transformCSSVariable } from "../utils"
7
8
 
8
9
  export interface TrapeziumProps extends HTMLAttributes<HTMLDivElement> {