@unovis/react 1.7.0-mcp.0 → 1.7.0-mcp.2

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 (115) hide show
  1. package/README.md +4 -0
  2. package/components/annotations/index.d.ts +12 -11
  3. package/components/annotations/index.js +30 -27
  4. package/components/annotations/index.js.map +1 -1
  5. package/components/area/index.d.ts +13 -12
  6. package/components/area/index.js +31 -29
  7. package/components/area/index.js.map +1 -1
  8. package/components/axis/index.d.ts +13 -12
  9. package/components/axis/index.js +31 -29
  10. package/components/axis/index.js.map +1 -1
  11. package/components/boxplot/index.d.ts +13 -12
  12. package/components/boxplot/index.js +31 -29
  13. package/components/boxplot/index.js.map +1 -1
  14. package/components/brush/index.d.ts +13 -12
  15. package/components/brush/index.js +31 -29
  16. package/components/brush/index.js.map +1 -1
  17. package/components/chord-diagram/index.d.ts +17 -16
  18. package/components/chord-diagram/index.js +31 -29
  19. package/components/chord-diagram/index.js.map +1 -1
  20. package/components/crosshair/index.d.ts +13 -12
  21. package/components/crosshair/index.js +31 -29
  22. package/components/crosshair/index.js.map +1 -1
  23. package/components/donut/index.d.ts +13 -12
  24. package/components/donut/index.js +31 -29
  25. package/components/donut/index.js.map +1 -1
  26. package/components/free-brush/index.d.ts +13 -12
  27. package/components/free-brush/index.js +31 -29
  28. package/components/free-brush/index.js.map +1 -1
  29. package/components/graph/index.d.ts +39 -38
  30. package/components/graph/index.js +31 -29
  31. package/components/graph/index.js.map +1 -1
  32. package/components/grouped-bar/index.d.ts +13 -12
  33. package/components/grouped-bar/index.js +31 -29
  34. package/components/grouped-bar/index.js.map +1 -1
  35. package/components/heatmap/index.d.ts +13 -12
  36. package/components/heatmap/index.js +31 -29
  37. package/components/heatmap/index.js.map +1 -1
  38. package/components/line/index.d.ts +13 -12
  39. package/components/line/index.js +31 -29
  40. package/components/line/index.js.map +1 -1
  41. package/components/nested-donut/index.d.ts +13 -12
  42. package/components/nested-donut/index.js +31 -29
  43. package/components/nested-donut/index.js.map +1 -1
  44. package/components/plotband/index.d.ts +12 -11
  45. package/components/plotband/index.js +30 -27
  46. package/components/plotband/index.js.map +1 -1
  47. package/components/plotline/index.d.ts +12 -11
  48. package/components/plotline/index.js +30 -27
  49. package/components/plotline/index.js.map +1 -1
  50. package/components/radial-bar/index.d.ts +13 -12
  51. package/components/radial-bar/index.js +31 -29
  52. package/components/radial-bar/index.js.map +1 -1
  53. package/components/sankey/index.d.ts +17 -16
  54. package/components/sankey/index.js +31 -29
  55. package/components/sankey/index.js.map +1 -1
  56. package/components/scatter/index.d.ts +13 -12
  57. package/components/scatter/index.js +31 -29
  58. package/components/scatter/index.js.map +1 -1
  59. package/components/stacked-bar/index.d.ts +13 -12
  60. package/components/stacked-bar/index.js +31 -29
  61. package/components/stacked-bar/index.js.map +1 -1
  62. package/components/timeline/index.d.ts +13 -12
  63. package/components/timeline/index.js +31 -29
  64. package/components/timeline/index.js.map +1 -1
  65. package/components/tooltip/index.d.ts +12 -11
  66. package/components/tooltip/index.js +30 -27
  67. package/components/tooltip/index.js.map +1 -1
  68. package/components/topojson-map/index.d.ts +17 -16
  69. package/components/topojson-map/index.js +31 -29
  70. package/components/topojson-map/index.js.map +1 -1
  71. package/components/treemap/index.d.ts +13 -12
  72. package/components/treemap/index.js +31 -29
  73. package/components/treemap/index.js.map +1 -1
  74. package/components/xy-labels/index.d.ts +13 -12
  75. package/components/xy-labels/index.js +31 -29
  76. package/components/xy-labels/index.js.map +1 -1
  77. package/components.d.ts +30 -30
  78. package/composites/time-series/index.d.ts +55 -54
  79. package/composites/time-series/index.js +65 -61
  80. package/composites/time-series/index.js.map +1 -1
  81. package/composites/time-series/style.module.css.js +14 -7
  82. package/composites/time-series/style.module.css.js.map +1 -1
  83. package/composites.d.ts +1 -1
  84. package/containers/single-container/index.d.ts +9 -8
  85. package/containers/single-container/index.js +50 -49
  86. package/containers/single-container/index.js.map +1 -1
  87. package/containers/xy-container/index.d.ts +10 -9
  88. package/containers/xy-container/index.js +54 -59
  89. package/containers/xy-container/index.js.map +1 -1
  90. package/containers.d.ts +2 -2
  91. package/html-components/bullet-legend/index.d.ts +13 -12
  92. package/html-components/bullet-legend/index.js +30 -27
  93. package/html-components/bullet-legend/index.js.map +1 -1
  94. package/html-components/flow-legend/index.d.ts +13 -12
  95. package/html-components/flow-legend/index.js +30 -27
  96. package/html-components/flow-legend/index.js.map +1 -1
  97. package/html-components/leaflet-flow-map/index.d.ts +18 -17
  98. package/html-components/leaflet-flow-map/index.js +31 -29
  99. package/html-components/leaflet-flow-map/index.js.map +1 -1
  100. package/html-components/leaflet-map/index.d.ts +15 -14
  101. package/html-components/leaflet-map/index.js +31 -29
  102. package/html-components/leaflet-map/index.js.map +1 -1
  103. package/html-components/rolling-pin-legend/index.d.ts +13 -12
  104. package/html-components/rolling-pin-legend/index.js +30 -27
  105. package/html-components/rolling-pin-legend/index.js.map +1 -1
  106. package/index.d.ts +3 -3
  107. package/index.js +111 -33
  108. package/index.js.map +1 -1
  109. package/package.json +15 -16
  110. package/types/dom.d.ts +3 -3
  111. package/utils/react.d.ts +5 -4
  112. package/utils/react.js +22 -29
  113. package/utils/react.js.map +1 -1
  114. package/external/.pnpm/style-inject@0.3.0/external/style-inject/dist/style-inject.es.js +0 -29
  115. package/external/.pnpm/style-inject@0.3.0/external/style-inject/dist/style-inject.es.js.map +0 -1
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { LeafletMap } from '@unovis/ts/components/leaflet-map';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisLeafletMapSelectors = LeafletMap.selectors;
6
- function VisLeafletMapFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new LeafletMap(ref.current, props, props.data);
12
- componentRef.current = c;
13
- element.__component__ = c;
14
- return () => {
15
- componentRef.current = undefined;
16
- c.destroy();
17
- };
18
- }, []);
19
- useEffect(() => {
20
- const component = componentRef.current;
21
- if (props.data)
22
- component === null || component === void 0 ? void 0 : component.setData(props.data);
23
- component === null || component === void 0 ? void 0 : component.setConfig(props);
24
- });
25
- useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
26
- return React.createElement("div", { className: props.className, ref: ref });
27
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { LeafletMap } from "@unovis/ts/components/leaflet-map";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisLeafletMapSelectors = LeafletMap.selectors;
5
+ function VisLeafletMapFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new LeafletMap(ref.current, props, props.data);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("div", { className: props.className, ref });
27
+ }
28
28
  const VisLeafletMap = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual);
29
-
30
- export { VisLeafletMap, VisLeafletMapSelectors };
29
+ export {
30
+ VisLeafletMap,
31
+ VisLeafletMapSelectors
32
+ };
31
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletMap } from '@unovis/ts/components/leaflet-map'\nimport { LeafletMapConfigInterface } from '@unovis/ts/components/leaflet-map/config'\nimport { GenericDataRecord } from '@unovis/ts/types/data'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisLeafletMapRef<Datum extends GenericDataRecord> = {\n component?: LeafletMap<Datum>;\n}\n\nexport type VisLeafletMapProps<Datum extends GenericDataRecord> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport const VisLeafletMapSelectors = LeafletMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletMapFC<Datum extends GenericDataRecord> (props: VisLeafletMapProps<Datum>, fRef: ForwardedRef<VisLeafletMapRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<LeafletMap<Datum>, HTMLDivElement>>(null)\n const componentRef = useRef<LeafletMap<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<LeafletMap<Datum>, HTMLDivElement>)\n\n const c = new LeafletMap<Datum>(ref.current as VisComponentElement<LeafletMap<Datum>, HTMLDivElement>, props, props.data)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletMap: (<Datum extends GenericDataRecord>(props: VisLeafletMapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAsBa,MAAA,sBAAsB,GAAG,UAAU,CAAC,UAAS;AAG1D,SAAS,eAAe,CAAmC,KAAgC,EAAE,IAA2C,EAAA;AACtI,IAAA,MAAM,GAAG,GAAG,MAAM,CAAyD,IAAI,CAAC,CAAA;AAChF,IAAA,MAAM,YAAY,GAAG,MAAM,CAAgC,SAAS,CAAC,CAAA;IAGrE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAkE,CAAA;AAEvF,QAAA,MAAM,CAAC,GAAG,IAAI,UAAU,CAAQ,GAAG,CAAC,OAAiE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;AACzH,QAAA,YAAY,CAAC,OAAO,GAAG,CAAC,CAAA;AACxB,QAAA,OAAO,CAAC,aAAa,GAAG,CAAC,CAAA;AAEzB,QAAA,OAAO,MAAK;AACV,YAAA,YAAY,CAAC,OAAO,GAAG,SAAS,CAAA;YAChC,CAAC,CAAC,OAAO,EAAE,CAAA;AACb,SAAC,CAAA;KACF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAA;QACtC,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,YAAY,CAAC,OAAO,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3F,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,aAAa,GAAgG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletMap } from '@unovis/ts/components/leaflet-map'\nimport { LeafletMapConfigInterface } from '@unovis/ts/components/leaflet-map/config'\nimport { GenericDataRecord } from '@unovis/ts/types/data'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisLeafletMapRef<Datum extends GenericDataRecord> = {\n component?: LeafletMap<Datum>;\n}\n\nexport type VisLeafletMapProps<Datum extends GenericDataRecord> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport const VisLeafletMapSelectors = LeafletMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletMapFC<Datum extends GenericDataRecord> (props: VisLeafletMapProps<Datum>, fRef: ForwardedRef<VisLeafletMapRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<LeafletMap<Datum>, HTMLDivElement>>(null)\n const componentRef = useRef<LeafletMap<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<LeafletMap<Datum>, HTMLDivElement>)\n\n const c = new LeafletMap<Datum>(ref.current as VisComponentElement<LeafletMap<Datum>, HTMLDivElement>, props, props.data)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletMap: (<Datum extends GenericDataRecord>(props: VisLeafletMapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;AAsBO,MAAM,yBAAyB,WAAW;AAGjD,SAAS,gBAAkD,OAAkC,MAA2D;AACtJ,QAAM,MAAM,OAA+D,IAAI;AAC/E,QAAM,eAAe,OAAsC,MAAS;AAGpE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,WAAkB,IAAI,SAAmE,OAAO,MAAM,IAAI;AACxH,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,OAAA,EAAI,WAAW,MAAM,WAAW,KAAU;AACpD;AAIO,MAAM,gBAA6G,MAAM,KAAK,MAAM,WAAW,eAAe,GAAG,aAAa;"}
@@ -1,12 +1,13 @@
1
- import { Ref } from 'react';
2
- import { RollingPinLegend } from '@unovis/ts/components/rolling-pin-legend';
3
- import { RollingPinLegendConfigInterface } from '@unovis/ts/components/rolling-pin-legend/config';
4
- export declare type VisRollingPinLegendRef = {
5
- component?: RollingPinLegend;
6
- };
7
- export declare type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {
8
- ref?: Ref<VisRollingPinLegendRef>;
9
- className?: string;
10
- };
11
- export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/components/rolling-pin-legend/style");
12
- export declare const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { RollingPinLegend } from '@unovis/ts/components/rolling-pin-legend';
3
+ import { RollingPinLegendConfigInterface } from '@unovis/ts/components/rolling-pin-legend/config';
4
+
5
+ export type VisRollingPinLegendRef = {
6
+ component?: RollingPinLegend;
7
+ };
8
+ export type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {
9
+ ref?: Ref<VisRollingPinLegendRef>;
10
+ className?: string;
11
+ };
12
+ export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/components/rolling-pin-legend/style");
13
+ export declare const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null);
@@ -1,29 +1,32 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { RollingPinLegend } from '@unovis/ts/components/rolling-pin-legend';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisRollingPinLegendSelectors = RollingPinLegend.selectors;
6
- function VisRollingPinLegendFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new RollingPinLegend(ref.current, props);
12
- componentRef.current = c;
13
- element.__component__ = c;
14
- return () => {
15
- componentRef.current = undefined;
16
- c.destroy();
17
- };
18
- }, []);
19
- useEffect(() => {
20
- const component = componentRef.current;
21
- component === null || component === void 0 ? void 0 : component.setConfig(props);
22
- });
23
- useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
24
- return React.createElement("div", { className: props.className, ref: ref });
25
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { RollingPinLegend } from "@unovis/ts/components/rolling-pin-legend";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisRollingPinLegendSelectors = RollingPinLegend.selectors;
5
+ function VisRollingPinLegendFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new RollingPinLegend(ref.current, props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ component?.setConfig(props);
21
+ });
22
+ useImperativeHandle(fRef, () => ({ get component() {
23
+ return componentRef.current;
24
+ } }), []);
25
+ return /* @__PURE__ */ React.createElement("div", { className: props.className, ref });
26
+ }
26
27
  const VisRollingPinLegend = React.memo(React.forwardRef(VisRollingPinLegendFC), arePropsEqual);
27
-
28
- export { VisRollingPinLegend, VisRollingPinLegendSelectors };
28
+ export {
29
+ VisRollingPinLegend,
30
+ VisRollingPinLegendSelectors
31
+ };
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { RollingPinLegend } from '@unovis/ts/components/rolling-pin-legend'\nimport { RollingPinLegendConfigInterface } from '@unovis/ts/components/rolling-pin-legend/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisRollingPinLegendRef = {\n component?: RollingPinLegend;\n}\n\nexport type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {\n ref?: Ref<VisRollingPinLegendRef>;\n className?: string;\n}\n\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisRollingPinLegendFC (props: VisRollingPinLegendProps, fRef: ForwardedRef<VisRollingPinLegendRef>): ReactElement {\n const ref = useRef<VisComponentElement<RollingPinLegend, HTMLDivElement>>(null)\n const componentRef = useRef<RollingPinLegend | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<RollingPinLegend, HTMLDivElement>)\n\n const c = new RollingPinLegend(ref.current as VisComponentElement<RollingPinLegend, HTMLDivElement>, props)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null) = React.memo(React.forwardRef(VisRollingPinLegendFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAoBa,MAAA,4BAA4B,GAAG,gBAAgB,CAAC,UAAS;AAGtE,SAAS,qBAAqB,CAAE,KAA+B,EAAE,IAA0C,EAAA;AACzG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAwD,IAAI,CAAC,CAAA;AAC/E,IAAA,MAAM,YAAY,GAAG,MAAM,CAA+B,SAAS,CAAC,CAAA;IAGpE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAiE,CAAA;QAEtF,MAAM,CAAC,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,OAAgE,EAAE,KAAK,CAAC,CAAA;AAC3G,QAAA,YAAY,CAAC,OAAO,GAAG,CAAC,CAAA;AACxB,QAAA,OAAO,CAAC,aAAa,GAAG,CAAC,CAAA;AAEzB,QAAA,OAAO,MAAK;AACV,YAAA,YAAY,CAAC,OAAO,GAAG,SAAS,CAAA;YAChC,CAAC,CAAC,OAAO,EAAE,CAAA;AACb,SAAC,CAAA;KACF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAA;QAEtC,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,YAAY,CAAC,OAAO,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3F,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,mBAAmB,GAA8D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { RollingPinLegend } from '@unovis/ts/components/rolling-pin-legend'\nimport { RollingPinLegendConfigInterface } from '@unovis/ts/components/rolling-pin-legend/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisRollingPinLegendRef = {\n component?: RollingPinLegend;\n}\n\nexport type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {\n ref?: Ref<VisRollingPinLegendRef>;\n className?: string;\n}\n\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisRollingPinLegendFC (props: VisRollingPinLegendProps, fRef: ForwardedRef<VisRollingPinLegendRef>): ReactElement {\n const ref = useRef<VisComponentElement<RollingPinLegend, HTMLDivElement>>(null)\n const componentRef = useRef<RollingPinLegend | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<RollingPinLegend, HTMLDivElement>)\n\n const c = new RollingPinLegend(ref.current as VisComponentElement<RollingPinLegend, HTMLDivElement>, props)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null) = React.memo(React.forwardRef(VisRollingPinLegendFC), arePropsEqual)\n"],"names":[],"mappings":";;;AAoBO,MAAM,+BAA+B,iBAAiB;AAG7D,SAAS,sBAAuB,OAAiC,MAA0D;AACzH,QAAM,MAAM,OAA8D,IAAI;AAC9E,QAAM,eAAe,OAAqC,MAAS;AAGnE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,iBAAiB,IAAI,SAAkE,KAAK;AAC1G,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAE/B,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,OAAA,EAAI,WAAW,MAAM,WAAW,KAAU;AACpD;AAIO,MAAM,sBAAiF,MAAM,KAAK,MAAM,WAAW,qBAAqB,GAAG,aAAa;"}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './containers';
2
- export * from './components';
3
- export * from './composites';
1
+ export * from './containers';
2
+ export * from './components';
3
+ export * from './composites';
package/index.js CHANGED
@@ -1,34 +1,112 @@
1
- export { VisXYContainer, VisXYContainerFC } from './containers/xy-container/index.js';
2
- export { VisSingleContainer } from './containers/single-container/index.js';
3
- export { VisLine, VisLineSelectors } from './components/line/index.js';
4
- export { VisArea, VisAreaSelectors } from './components/area/index.js';
5
- export { VisAxis, VisAxisSelectors } from './components/axis/index.js';
6
- export { VisBoxplot, VisBoxplotSelectors } from './components/boxplot/index.js';
7
- export { VisBrush, VisBrushSelectors } from './components/brush/index.js';
8
- export { VisChordDiagram, VisChordDiagramSelectors } from './components/chord-diagram/index.js';
9
- export { VisCrosshair, VisCrosshairSelectors } from './components/crosshair/index.js';
10
- export { VisDonut, VisDonutSelectors } from './components/donut/index.js';
11
- export { VisFreeBrush, VisFreeBrushSelectors } from './components/free-brush/index.js';
12
- export { VisGraph, VisGraphSelectors } from './components/graph/index.js';
13
- export { VisGroupedBar, VisGroupedBarSelectors } from './components/grouped-bar/index.js';
14
- export { VisHeatmap, VisHeatmapSelectors } from './components/heatmap/index.js';
15
- export { VisNestedDonut, VisNestedDonutSelectors } from './components/nested-donut/index.js';
16
- export { VisScatter, VisScatterSelectors } from './components/scatter/index.js';
17
- export { VisSankey, VisSankeySelectors } from './components/sankey/index.js';
18
- export { VisStackedBar, VisStackedBarSelectors } from './components/stacked-bar/index.js';
19
- export { VisTooltip, VisTooltipSelectors } from './components/tooltip/index.js';
20
- export { VisTimeline, VisTimelineSelectors } from './components/timeline/index.js';
21
- export { VisTopoJSONMap, VisTopoJSONMapSelectors } from './components/topojson-map/index.js';
22
- export { VisXYLabels, VisXYLabelsSelectors } from './components/xy-labels/index.js';
23
- export { VisAnnotations, VisAnnotationsSelectors } from './components/annotations/index.js';
24
- export { VisPlotband, VisPlotbandSelectors } from './components/plotband/index.js';
25
- export { VisTreemap, VisTreemapSelectors } from './components/treemap/index.js';
26
- export { VisPlotline, VisPlotlineSelectors } from './components/plotline/index.js';
27
- export { VisRadialBar, VisRadialBarSelectors } from './components/radial-bar/index.js';
28
- export { VisBulletLegend, VisBulletLegendSelectors } from './html-components/bullet-legend/index.js';
29
- export { VisRollingPinLegend, VisRollingPinLegendSelectors } from './html-components/rolling-pin-legend/index.js';
30
- export { VisLeafletMap, VisLeafletMapSelectors } from './html-components/leaflet-map/index.js';
31
- export { VisLeafletFlowMap, VisLeafletFlowMapSelectors } from './html-components/leaflet-flow-map/index.js';
32
- export { VisFlowLegend, VisFlowLegendSelectors } from './html-components/flow-legend/index.js';
33
- export { VisTimeSeries } from './composites/time-series/index.js';
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._timeSeriesContainer_1ayv5_1 {\n position: relative;\n height: 400px;\n width: 100%;\n font-family: sans-serif;\n}\n\n._timeSeriesModule_1ayv5_8 {\n width: 100%;\n height: 70%;\n position: relative;\n}\n\n._navigationModule_1ayv5_14 {\n width: 100%;\n height: 30%;\n position: relative;\n}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ import { VisAnnotations, VisAnnotationsSelectors } from "./components/annotations/index.js";
14
+ import { VisArea, VisAreaSelectors } from "./components/area/index.js";
15
+ import { VisAxis, VisAxisSelectors } from "./components/axis/index.js";
16
+ import { VisBoxplot, VisBoxplotSelectors } from "./components/boxplot/index.js";
17
+ import { VisBrush, VisBrushSelectors } from "./components/brush/index.js";
18
+ import { VisBulletLegend, VisBulletLegendSelectors } from "./html-components/bullet-legend/index.js";
19
+ import { VisChordDiagram, VisChordDiagramSelectors } from "./components/chord-diagram/index.js";
20
+ import { VisCrosshair, VisCrosshairSelectors } from "./components/crosshair/index.js";
21
+ import { VisDonut, VisDonutSelectors } from "./components/donut/index.js";
22
+ import { VisFlowLegend, VisFlowLegendSelectors } from "./html-components/flow-legend/index.js";
23
+ import { VisFreeBrush, VisFreeBrushSelectors } from "./components/free-brush/index.js";
24
+ import { VisGraph, VisGraphSelectors } from "./components/graph/index.js";
25
+ import { VisGroupedBar, VisGroupedBarSelectors } from "./components/grouped-bar/index.js";
26
+ import { VisHeatmap, VisHeatmapSelectors } from "./components/heatmap/index.js";
27
+ import { VisLeafletFlowMap, VisLeafletFlowMapSelectors } from "./html-components/leaflet-flow-map/index.js";
28
+ import { VisLeafletMap, VisLeafletMapSelectors } from "./html-components/leaflet-map/index.js";
29
+ import { VisLine, VisLineSelectors } from "./components/line/index.js";
30
+ import { VisNestedDonut, VisNestedDonutSelectors } from "./components/nested-donut/index.js";
31
+ import { VisPlotband, VisPlotbandSelectors } from "./components/plotband/index.js";
32
+ import { VisPlotline, VisPlotlineSelectors } from "./components/plotline/index.js";
33
+ import { VisRadialBar, VisRadialBarSelectors } from "./components/radial-bar/index.js";
34
+ import { VisRollingPinLegend, VisRollingPinLegendSelectors } from "./html-components/rolling-pin-legend/index.js";
35
+ import { VisSankey, VisSankeySelectors } from "./components/sankey/index.js";
36
+ import { VisScatter, VisScatterSelectors } from "./components/scatter/index.js";
37
+ import { VisSingleContainer } from "./containers/single-container/index.js";
38
+ import { VisStackedBar, VisStackedBarSelectors } from "./components/stacked-bar/index.js";
39
+ import { VisTimeSeries } from "./composites/time-series/index.js";
40
+ import { VisTimeline, VisTimelineSelectors } from "./components/timeline/index.js";
41
+ import { VisTooltip, VisTooltipSelectors } from "./components/tooltip/index.js";
42
+ import { VisTopoJSONMap, VisTopoJSONMapSelectors } from "./components/topojson-map/index.js";
43
+ import { VisTreemap, VisTreemapSelectors } from "./components/treemap/index.js";
44
+ import { VisXYContainer, VisXYContainerFC } from "./containers/xy-container/index.js";
45
+ import { VisXYLabels, VisXYLabelsSelectors } from "./components/xy-labels/index.js";
46
+ export {
47
+ VisAnnotations,
48
+ VisAnnotationsSelectors,
49
+ VisArea,
50
+ VisAreaSelectors,
51
+ VisAxis,
52
+ VisAxisSelectors,
53
+ VisBoxplot,
54
+ VisBoxplotSelectors,
55
+ VisBrush,
56
+ VisBrushSelectors,
57
+ VisBulletLegend,
58
+ VisBulletLegendSelectors,
59
+ VisChordDiagram,
60
+ VisChordDiagramSelectors,
61
+ VisCrosshair,
62
+ VisCrosshairSelectors,
63
+ VisDonut,
64
+ VisDonutSelectors,
65
+ VisFlowLegend,
66
+ VisFlowLegendSelectors,
67
+ VisFreeBrush,
68
+ VisFreeBrushSelectors,
69
+ VisGraph,
70
+ VisGraphSelectors,
71
+ VisGroupedBar,
72
+ VisGroupedBarSelectors,
73
+ VisHeatmap,
74
+ VisHeatmapSelectors,
75
+ VisLeafletFlowMap,
76
+ VisLeafletFlowMapSelectors,
77
+ VisLeafletMap,
78
+ VisLeafletMapSelectors,
79
+ VisLine,
80
+ VisLineSelectors,
81
+ VisNestedDonut,
82
+ VisNestedDonutSelectors,
83
+ VisPlotband,
84
+ VisPlotbandSelectors,
85
+ VisPlotline,
86
+ VisPlotlineSelectors,
87
+ VisRadialBar,
88
+ VisRadialBarSelectors,
89
+ VisRollingPinLegend,
90
+ VisRollingPinLegendSelectors,
91
+ VisSankey,
92
+ VisSankeySelectors,
93
+ VisScatter,
94
+ VisScatterSelectors,
95
+ VisSingleContainer,
96
+ VisStackedBar,
97
+ VisStackedBarSelectors,
98
+ VisTimeSeries,
99
+ VisTimeline,
100
+ VisTimelineSelectors,
101
+ VisTooltip,
102
+ VisTooltipSelectors,
103
+ VisTopoJSONMap,
104
+ VisTopoJSONMapSelectors,
105
+ VisTreemap,
106
+ VisTreemapSelectors,
107
+ VisXYContainer,
108
+ VisXYContainerFC,
109
+ VisXYLabels,
110
+ VisXYLabelsSelectors
111
+ };
34
112
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unovis/react",
3
3
  "description": "Modular data visualization framework for React, Angular, Svelte, Vue, Solid, and vanilla TypeScript or JavaScript",
4
- "version": "1.7.0-mcp.0",
4
+ "version": "1.7.0-mcp.2",
5
5
  "packageManager": "pnpm@10.23.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -29,38 +29,37 @@
29
29
  "main": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "type": "module",
32
- "sideEffects": false,
32
+ "sideEffects": [
33
+ "composites/time-series/style.module.css.js",
34
+ "dist/composites/time-series/style.module.css.js"
35
+ ],
33
36
  "scripts": {
34
- "build": "rimraf dist && tsc --project tsconfig.lib.json --emitDeclarationOnly && rollup --config; rm -rf dist/.cache; cp LICENSE README.md package.json ./dist",
37
+ "build": "vite build; rm -rf dist/.cache; cp LICENSE README.md package.json ./dist",
35
38
  "tsc": "tsc",
36
- "generate": "rollup -c ./autogen/rollup.config.js; node .autogen.cjs; rm .autogen.cjs",
39
+ "generate": "tsx ./autogen/index.ts",
37
40
  "publish:dist": "cd ./dist; npm publish",
38
41
  "license:check": "pnpm license-report --config=../../lic-report-config.json > licences.md"
39
42
  },
40
43
  "peerDependencies": {
41
- "@unovis/ts": "1.7.0-mcp.0",
44
+ "@unovis/ts": "1.7.0-mcp.2",
42
45
  "react": ">=16.8.0 || ^17 || ^18 || ^19",
43
46
  "react-dom": ">=16.8.0 || ^17 || ^18 || ^19"
44
47
  },
45
48
  "devDependencies": {
46
49
  "@unovis/ts": "workspace:*",
47
- "@rollup/plugin-node-resolve": "^13.0.4",
50
+ "@unovis/shared": "workspace:*",
51
+ "@vitejs/plugin-react": "^4.3.4",
48
52
  "@types/react": "^17.0.22",
49
53
  "@types/node": "^16.11.17",
50
54
  "@types/d3-dispatch": "3.0.6",
51
- "@zerollup/ts-transform-paths": "^1.7.18",
52
55
  "buffer-from": "^1.1.2",
53
56
  "react": "^18.3.1",
54
57
  "react-dom": "^18.3.1",
55
58
  "rimraf": "^3.0.2",
56
- "rollup": "^2.61.1",
57
- "rollup-plugin-peer-deps-external": "^2.2.4",
58
- "rollup-plugin-postcss": "^4.0.2",
59
- "rollup-plugin-rename-node-modules": "^1.3.1",
60
- "rollup-plugin-typescript2": "^0.31.1",
61
- "tsconfig-paths-webpack-plugin": "^3.5.2",
62
- "tslib": "^2.3.1",
63
- "ttypescript": "^1.5.13",
64
- "typescript": "~4.2.4"
59
+ "typescript": "catalog:",
60
+ "tsx": "^4.19.1",
61
+ "vite": "catalog:",
62
+ "vite-plugin-css-injected-by-js": "^3.3.0",
63
+ "vite-plugin-dts": "^3.5.3"
65
64
  }
66
65
  }
package/types/dom.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare type VisComponentElement<T, E = HTMLElement> = E & {
2
- __component__: T;
3
- };
1
+ export type VisComponentElement<T, E = HTMLElement> = E & {
2
+ __component__: T;
3
+ };
package/utils/react.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { ReactNode } from 'react';
2
- export declare function arePropsEqual<PropTypes extends {
3
- children?: ReactNode;
4
- }>(prevProps: PropTypes, nextProps: PropTypes): boolean;
1
+ import { ReactNode } from 'react';
2
+
3
+ export declare function arePropsEqual<PropTypes extends {
4
+ children?: ReactNode;
5
+ }>(prevProps: PropTypes, nextProps: PropTypes): boolean;
package/utils/react.js CHANGED
@@ -1,31 +1,24 @@
1
- import { Children } from 'react';
2
- import { isEqual } from '@unovis/ts/utils/data';
3
-
4
- function arePropsEqual(prevProps, nextProps) {
5
- var _a, _b;
6
- if (typeof prevProps.children !== typeof nextProps.children)
7
- return false;
8
- if (prevProps.children && nextProps.children) {
9
- const prevChildren = Children.toArray(prevProps.children);
10
- const nextChildren = Children.toArray(nextProps.children);
11
- if (prevChildren.length !== nextChildren.length)
12
- return false;
13
- for (let i = 0; i < nextChildren.length; i += 1) {
14
- if (!isEqual((_a = prevChildren[i]) === null || _a === void 0 ? void 0 : _a.props, (_b = nextChildren[i]) === null || _b === void 0 ? void 0 : _b.props))
15
- return false;
16
- if (!isEqual(prevChildren[i].props, nextChildren[i].props))
17
- return false;
18
- }
19
- }
20
- const propKeys = Array.from(new Set([...Object.keys(prevProps), ...Object.keys(nextProps)]));
21
- for (const key of propKeys) {
22
- if (key === 'children')
23
- continue;
24
- if (!(isEqual(prevProps[key], nextProps[key])))
25
- return false;
26
- }
27
- return true;
1
+ import { Children } from "react";
2
+ import { isEqual } from "@unovis/ts/utils/data";
3
+ function arePropsEqual(prevProps, nextProps) {
4
+ if (typeof prevProps.children !== typeof nextProps.children) return false;
5
+ if (prevProps.children && nextProps.children) {
6
+ const prevChildren = Children.toArray(prevProps.children);
7
+ const nextChildren = Children.toArray(nextProps.children);
8
+ if (prevChildren.length !== nextChildren.length) return false;
9
+ for (let i = 0; i < nextChildren.length; i += 1) {
10
+ if (!isEqual(prevChildren[i]?.props, nextChildren[i]?.props)) return false;
11
+ if (!isEqual(prevChildren[i].props, nextChildren[i].props)) return false;
12
+ }
13
+ }
14
+ const propKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(prevProps), ...Object.keys(nextProps)]));
15
+ for (const key of propKeys) {
16
+ if (key === "children") continue;
17
+ if (!isEqual(prevProps[key], nextProps[key])) return false;
18
+ }
19
+ return true;
28
20
  }
29
-
30
- export { arePropsEqual };
21
+ export {
22
+ arePropsEqual
23
+ };
31
24
  //# sourceMappingURL=react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":["../../src/utils/react.ts"],"sourcesContent":["import { Children, ReactElement, ReactNode } from 'react'\nimport { isEqual } from '@unovis/ts/utils/data'\n\nexport function arePropsEqual<PropTypes extends { children?: ReactNode }> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n if (typeof prevProps.children !== typeof nextProps.children) return false\n\n if (prevProps.children && nextProps.children) {\n const prevChildren = Children.toArray(prevProps.children) as ReactElement[]\n const nextChildren = Children.toArray(nextProps.children) as ReactElement[]\n if (prevChildren.length !== nextChildren.length) return false\n\n for (let i = 0; i < nextChildren.length; i += 1) {\n if (!isEqual(prevChildren[i]?.props, nextChildren[i]?.props)) return false\n if (!isEqual(prevChildren[i].props, nextChildren[i].props)) return false\n }\n }\n\n const propKeys = Array.from(new Set([...Object.keys(prevProps), ...Object.keys(nextProps)])) as (keyof PropTypes)[]\n for (const key of propKeys) {\n if (key === 'children') continue\n if (!(isEqual(prevProps[key], nextProps[key]))) return false\n }\n\n return true\n}\n"],"names":[],"mappings":";;;AAGgB,SAAA,aAAa,CAA8C,SAAoB,EAAE,SAAoB,EAAA;;IACnH,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,OAAO,SAAS,CAAC,QAAQ;AAAE,QAAA,OAAO,KAAK,CAAA;AAEzE,IAAA,IAAI,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,QAAQ,EAAE;QAC5C,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAmB,CAAA;QAC3E,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAmB,CAAA;AAC3E,QAAA,IAAI,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK,CAAA;AAE7D,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AAC/C,YAAA,IAAI,CAAC,OAAO,CAAC,MAAA,YAAY,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,KAAK,EAAE,MAAA,YAAY,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,KAAK,CAAC;AAAE,gBAAA,OAAO,KAAK,CAAA;AAC1E,YAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAAE,gBAAA,OAAO,KAAK,CAAA;AACzE,SAAA;AACF,KAAA;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAwB,CAAA;AACnH,IAAA,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;QAC1B,IAAI,GAAG,KAAK,UAAU;YAAE,SAAQ;AAChC,QAAA,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK,CAAA;AAC7D,KAAA;AAED,IAAA,OAAO,IAAI,CAAA;AACb;;;;"}
1
+ {"version":3,"file":"react.js","sources":["../../src/utils/react.ts"],"sourcesContent":["import { Children, ReactElement, ReactNode } from 'react'\nimport { isEqual } from '@unovis/ts/utils/data'\n\nexport function arePropsEqual<PropTypes extends { children?: ReactNode }> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n if (typeof prevProps.children !== typeof nextProps.children) return false\n\n if (prevProps.children && nextProps.children) {\n const prevChildren = Children.toArray(prevProps.children) as ReactElement[]\n const nextChildren = Children.toArray(nextProps.children) as ReactElement[]\n if (prevChildren.length !== nextChildren.length) return false\n\n for (let i = 0; i < nextChildren.length; i += 1) {\n if (!isEqual(prevChildren[i]?.props, nextChildren[i]?.props)) return false\n if (!isEqual(prevChildren[i].props, nextChildren[i].props)) return false\n }\n }\n\n const propKeys = Array.from(new Set([...Object.keys(prevProps), ...Object.keys(nextProps)])) as (keyof PropTypes)[]\n for (const key of propKeys) {\n if (key === 'children') continue\n if (!(isEqual(prevProps[key], nextProps[key]))) return false\n }\n\n return true\n}\n"],"names":[],"mappings":";;AAGO,SAAS,cAA2D,WAAsB,WAA+B;AAC9H,MAAI,OAAO,UAAU,aAAa,OAAO,UAAU,SAAU,QAAO;AAEpE,MAAI,UAAU,YAAY,UAAU,UAAU;AAC5C,UAAM,eAAe,SAAS,QAAQ,UAAU,QAAQ;AACxD,UAAM,eAAe,SAAS,QAAQ,UAAU,QAAQ;AACxD,QAAI,aAAa,WAAW,aAAa,OAAQ,QAAO;AAExD,aAAS,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK,GAAG;AAC/C,UAAI,CAAC,QAAQ,aAAa,CAAC,GAAG,OAAO,aAAa,CAAC,GAAG,KAAK,EAAG,QAAO;AACrE,UAAI,CAAC,QAAQ,aAAa,CAAC,EAAE,OAAO,aAAa,CAAC,EAAE,KAAK,EAAG,QAAO;AAAA,IACrE;AAAA,EACF;AAEA,QAAM,WAAW,MAAM,KAAK,oBAAI,IAAI,CAAC,GAAG,OAAO,KAAK,SAAS,GAAG,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC;AAC3F,aAAW,OAAO,UAAU;AAC1B,QAAI,QAAQ,WAAY;AACxB,QAAI,CAAE,QAAQ,UAAU,GAAG,GAAG,UAAU,GAAG,CAAC,EAAI,QAAO;AAAA,EACzD;AAEA,SAAO;AACT;"}
@@ -1,29 +0,0 @@
1
- function styleInject(css, ref) {
2
- if ( ref === void 0 ) ref = {};
3
- var insertAt = ref.insertAt;
4
-
5
- if (!css || typeof document === 'undefined') { return; }
6
-
7
- var head = document.head || document.getElementsByTagName('head')[0];
8
- var style = document.createElement('style');
9
- style.type = 'text/css';
10
-
11
- if (insertAt === 'top') {
12
- if (head.firstChild) {
13
- head.insertBefore(style, head.firstChild);
14
- } else {
15
- head.appendChild(style);
16
- }
17
- } else {
18
- head.appendChild(style);
19
- }
20
-
21
- if (style.styleSheet) {
22
- style.styleSheet.cssText = css;
23
- } else {
24
- style.appendChild(document.createTextNode(css));
25
- }
26
- }
27
-
28
- export { styleInject as default };
29
- //# sourceMappingURL=style-inject.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-inject.es.js","sources":["../../../../../../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;"}