@automattic/charts 1.9.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +5661 -5466
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +40 -28
- package/dist/index.d.cts +31 -7
- package/dist/index.d.ts +32 -8
- package/dist/index.js +1239 -1046
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +7 -7
- package/src/charts/geo-chart/geo-chart.tsx +148 -3
- package/src/charts/geo-chart/index.ts +1 -1
- package/src/charts/geo-chart/test/geo-chart.test.tsx +122 -2
- package/src/charts/geo-chart/types.ts +11 -0
- package/src/charts/heatmap-chart/heatmap-chart.module.scss +11 -11
- package/src/charts/heatmap-chart/heatmap-chart.tsx +37 -36
- package/src/charts/heatmap-chart/private/build-calendar-data.ts +17 -1
- package/src/charts/heatmap-chart/private/heatmap-context.ts +10 -0
- package/src/charts/heatmap-chart/private/heatmap-legend.tsx +3 -2
- package/src/charts/heatmap-chart/private/index.ts +2 -0
- package/src/charts/heatmap-chart/test/build-calendar-data.test.ts +23 -1
- package/src/charts/heatmap-chart/test/heatmap-chart.test.tsx +10 -3
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +15 -3
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +65 -37
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +46 -0
- package/src/charts/line-chart/line-chart.module.scss +2 -2
- package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +1 -1
- package/src/charts/private/x-zoom.module.scss +2 -2
- package/src/components/trend-indicator/trend-indicator.module.scss +3 -3
- package/src/hooks/test/use-chart-margin.test.tsx +8 -5
- package/src/hooks/use-chart-margin.tsx +11 -1
- package/src/index.ts +1 -1
- package/src/providers/chart-context/global-charts-provider.tsx +7 -0
- package/src/providers/chart-context/test/chart-context.test.tsx +40 -0
- package/src/providers/chart-context/themes.ts +17 -14
- package/src/providers/chart-context/types.ts +3 -0
- package/src/types.ts +9 -6
- package/src/utils/color-utils.ts +28 -0
- package/src/utils/test/color-utils.test.ts +29 -0
package/dist/index.js
CHANGED
|
@@ -4,27 +4,27 @@ import { AnimatedAreaSeries, AnimatedAreaStack, AreaSeries, Axis, BarGroup, BarS
|
|
|
4
4
|
import { __, sprintf } from "@wordpress/i18n";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { Children, Fragment, Fragment as Fragment$2, createContext, createContext as createContext$1, createElement, forwardRef, forwardRef as forwardRef$1,
|
|
7
|
+
import { Children, Fragment, Fragment as Fragment$2, createContext, createContext as createContext$1, createElement, forwardRef, forwardRef as forwardRef$1, isValidElement, memo, useCallback, useCallback as useCallback$1, useContext, useContext as useContext$1, useEffect, useEffect as useEffect$1, useId, useImperativeHandle, useLayoutEffect, useMemo, useMemo as useMemo$1, useRef, useRef as useRef$1, useState, useState as useState$1 } from "react";
|
|
8
8
|
import { color, hsl } from "@visx/vendor/d3-color";
|
|
9
9
|
import { addDays, differenceInCalendarWeeks, differenceInHours, differenceInYears, format, isValid, parse, parseISO, startOfWeek } from "date-fns";
|
|
10
10
|
import { Text, getStringWidth } from "@visx/text";
|
|
11
11
|
import deepmerge from "deepmerge";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
|
|
13
14
|
import { createScale, getTicks, scaleBand, scaleOrdinal, scaleTime } from "@visx/scale";
|
|
14
15
|
import { Group } from "@visx/group";
|
|
15
16
|
import { LegendItem, LegendLabel, LegendOrdinal, LegendShape } from "@visx/legend";
|
|
17
|
+
import { __assign } from "tslib";
|
|
18
|
+
import { Icon, chevronRight } from "@wordpress/icons";
|
|
16
19
|
import { LinearGradient } from "@visx/gradient";
|
|
17
20
|
import { curveCatmullRom, curveLinear, curveMonotoneX } from "@visx/curve";
|
|
18
21
|
import { useParentSize } from "@visx/responsive";
|
|
19
22
|
import { Annotation, CircleSubject, Connector, HtmlLabel, Label, LineSubject } from "@visx/annotation";
|
|
20
23
|
import { PatternCircles, PatternHexagons, PatternLines, PatternWaves } from "@visx/pattern";
|
|
21
|
-
import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
|
|
22
24
|
import { Chart } from "react-google-charts";
|
|
23
25
|
import DOMPurify from "dompurify";
|
|
24
|
-
import { __assign } from "tslib";
|
|
25
26
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
26
27
|
import "@babel/runtime/helpers/extends";
|
|
27
|
-
import { Icon, chevronRight } from "@wordpress/icons";
|
|
28
28
|
import { Pie } from "@visx/shape";
|
|
29
29
|
//#region \0rolldown/runtime.js
|
|
30
30
|
var __create = Object.create;
|
|
@@ -445,6 +445,22 @@ const lightenHexColor = (hex, blend) => {
|
|
|
445
445
|
return `#${newR.toString(16).padStart(2, "0")}${newG.toString(16).padStart(2, "0")}${newB.toString(16).padStart(2, "0")}`;
|
|
446
446
|
};
|
|
447
447
|
/**
|
|
448
|
+
* Blend one hex color toward another, per-channel in sRGB.
|
|
449
|
+
*
|
|
450
|
+
* @param fromHex - Starting hex color, returned when blend is 0
|
|
451
|
+
* @param toHex - Target hex color, returned when blend is 1
|
|
452
|
+
* @param blend - Amount toward toHex, clamped to [0, 1]
|
|
453
|
+
* @return Blended hex color string
|
|
454
|
+
* @throws {Error} if either hex string is malformed
|
|
455
|
+
*/
|
|
456
|
+
const mixHexColors = (fromHex, toHex, blend) => {
|
|
457
|
+
validateHexColor(fromHex);
|
|
458
|
+
validateHexColor(toHex);
|
|
459
|
+
const amount = Math.min(1, Math.max(0, blend));
|
|
460
|
+
const channel = (start, end) => Math.round(start + (end - start) * amount).toString(16).padStart(2, "0");
|
|
461
|
+
return `#${channel(parseInt(fromHex.slice(1, 3), 16), parseInt(toHex.slice(1, 3), 16))}${channel(parseInt(fromHex.slice(3, 5), 16), parseInt(toHex.slice(3, 5), 16))}${channel(parseInt(fromHex.slice(5, 7), 16), parseInt(toHex.slice(5, 7), 16))}`;
|
|
462
|
+
};
|
|
463
|
+
/**
|
|
448
464
|
* WCAG relative luminance of a hex color (0 = black, 1 = white).
|
|
449
465
|
*
|
|
450
466
|
* @param hex - Hex color string (e.g., '#98C8DF')
|
|
@@ -706,7 +722,7 @@ const getChartColor = (index, colorCache) => {
|
|
|
706
722
|
* Default theme configuration
|
|
707
723
|
*/
|
|
708
724
|
const defaultTheme = {
|
|
709
|
-
backgroundColor: "var(--wpds-color-
|
|
725
|
+
backgroundColor: "var(--wpds-color-background-surface-neutral-strong, #fff)",
|
|
710
726
|
labelBackgroundColor: "transparent",
|
|
711
727
|
labelTextColor: "#FFFFFF",
|
|
712
728
|
colors: [
|
|
@@ -732,44 +748,44 @@ const defaultTheme = {
|
|
|
732
748
|
strokeWidth: 1
|
|
733
749
|
},
|
|
734
750
|
legend: {
|
|
735
|
-
labelStyles: { color: "var(--wpds-color-
|
|
751
|
+
labelStyles: { color: "var(--wpds-color-foreground-content-neutral, #1e1e1e)" },
|
|
736
752
|
containerStyles: {},
|
|
737
753
|
shapeStyles: []
|
|
738
754
|
},
|
|
739
755
|
seriesLineStyles: [],
|
|
740
756
|
glyphs: [],
|
|
741
757
|
svgLabelSmall: {
|
|
742
|
-
fill: "var(--wpds-color-
|
|
758
|
+
fill: "var(--wpds-color-foreground-content-neutral, #1e1e1e)",
|
|
743
759
|
fontFamily: "inherit"
|
|
744
760
|
},
|
|
745
761
|
svgLabelBig: { fontFamily: "inherit" },
|
|
746
762
|
annotationStyles: {
|
|
747
763
|
label: {
|
|
748
|
-
anchorLineStroke: "var(--wpds-color-
|
|
749
|
-
backgroundFill: "var(--wpds-color-
|
|
764
|
+
anchorLineStroke: "var(--wpds-color-foreground-content-neutral, #1e1e1e)",
|
|
765
|
+
backgroundFill: "var(--wpds-color-background-surface-neutral-strong, #fff)"
|
|
750
766
|
},
|
|
751
|
-
connector: { stroke: "var(--wpds-color-
|
|
767
|
+
connector: { stroke: "var(--wpds-color-foreground-content-neutral, #1e1e1e)" },
|
|
752
768
|
circleSubject: {
|
|
753
769
|
stroke: "transparent",
|
|
754
|
-
fill: "var(--wpds-color-
|
|
770
|
+
fill: "var(--wpds-color-foreground-content-neutral, #1e1e1e)",
|
|
755
771
|
radius: 5
|
|
756
772
|
}
|
|
757
773
|
},
|
|
758
|
-
geoChart: { featureFillColor: "var(--wpds-color-
|
|
774
|
+
geoChart: { featureFillColor: "var(--wpds-color-background-surface-neutral-weak, #f4f4f4)" },
|
|
759
775
|
leaderboardChart: {
|
|
760
776
|
rowGap: 12,
|
|
761
777
|
columnGap: 4,
|
|
762
778
|
labelSpacing: "xs",
|
|
763
779
|
deltaColors: [
|
|
764
|
-
"var(--wpds-color-
|
|
765
|
-
"var(--wpds-color-
|
|
766
|
-
"var(--wpds-color-
|
|
780
|
+
"var(--wpds-color-foreground-content-error-weak, #cc1818)",
|
|
781
|
+
"var(--wpds-color-foreground-content-neutral-weak, #707070)",
|
|
782
|
+
"var(--wpds-color-foreground-content-success-weak, #008030)"
|
|
767
783
|
]
|
|
768
784
|
},
|
|
769
785
|
conversionFunnelChart: {
|
|
770
|
-
backgroundColor: "var(--wpds-color-
|
|
771
|
-
positiveChangeColor: "var(--wpds-color-
|
|
772
|
-
negativeChangeColor: "var(--wpds-color-
|
|
786
|
+
backgroundColor: "var(--wpds-color-background-surface-neutral-weak, #f4f4f4)",
|
|
787
|
+
positiveChangeColor: "var(--wpds-color-foreground-content-success-weak, #008030)",
|
|
788
|
+
negativeChangeColor: "var(--wpds-color-foreground-content-error-weak, #cc1818)"
|
|
773
789
|
},
|
|
774
790
|
lineChart: { lineStyles: { comparison: {
|
|
775
791
|
strokeDasharray: "4 4",
|
|
@@ -879,6 +895,7 @@ const GlobalChartsProvider = ({ children, theme }) => {
|
|
|
879
895
|
}
|
|
880
896
|
return getChartColor(index, colorCache);
|
|
881
897
|
}, [colorCache, groupToColorMap]);
|
|
898
|
+
const resolveThemeColor = useCallback((value) => value ? normalizeColorToHex(value, wrapperRef.current, resolveCssVariable) : "", []);
|
|
882
899
|
const getElementStyles = useCallback(({ data, index, overrideColor, legendShape }) => {
|
|
883
900
|
const isSeriesData = data && typeof data === "object" && "data" in data && "options" in data;
|
|
884
901
|
const isPointPercentageData = data && typeof data === "object" && "value" in data && typeof data.value === "number" && !("data" in data);
|
|
@@ -921,6 +938,7 @@ const GlobalChartsProvider = ({ children, theme }) => {
|
|
|
921
938
|
getChartData,
|
|
922
939
|
theme: providerTheme,
|
|
923
940
|
getElementStyles,
|
|
941
|
+
resolveThemeColor,
|
|
924
942
|
toggleSeriesVisibility,
|
|
925
943
|
isSeriesVisible,
|
|
926
944
|
getHiddenSeries,
|
|
@@ -932,6 +950,7 @@ const GlobalChartsProvider = ({ children, theme }) => {
|
|
|
932
950
|
getChartData,
|
|
933
951
|
providerTheme,
|
|
934
952
|
getElementStyles,
|
|
953
|
+
resolveThemeColor,
|
|
935
954
|
toggleSeriesVisibility,
|
|
936
955
|
isSeriesVisible,
|
|
937
956
|
getHiddenSeries,
|
|
@@ -1140,7 +1159,9 @@ const useChartMargin = (height, options, data, theme, horizontal = false) => {
|
|
|
1140
1159
|
};
|
|
1141
1160
|
const yAxisOrientation = options.axis?.y?.orientation;
|
|
1142
1161
|
const yAxisStyles = yAxisOrientation === "right" ? theme.axisStyles.y.right : theme.axisStyles.y.left;
|
|
1143
|
-
const
|
|
1162
|
+
const yTickWidth = getLongestTickWidth(yTicks, options.axis?.y?.tickFormat, yAxisStyles.axisLabel);
|
|
1163
|
+
const yTickLabelFontSize = resolveFontSize(yAxisStyles?.tickLabel?.fontSize) || DEFAULT_FONT_SIZE;
|
|
1164
|
+
const yMarginValue = (yTickWidth ?? DEFAULT_Y_TICK_WIDTH) + (yAxisStyles?.tickLength ?? 0) + Math.ceil(yTickLabelFontSize * .25);
|
|
1144
1165
|
if (yAxisOrientation === "right") defaultMargin.right = yMarginValue;
|
|
1145
1166
|
else defaultMargin.left = yMarginValue;
|
|
1146
1167
|
const xOrientation = options.axis?.x?.orientation === "top" ? "top" : "bottom";
|
|
@@ -1227,7 +1248,8 @@ function useTextTruncation(enabled = true) {
|
|
|
1227
1248
|
}
|
|
1228
1249
|
if (node && enabled) {
|
|
1229
1250
|
const checkTruncation = () => {
|
|
1230
|
-
|
|
1251
|
+
const truncated = node.scrollWidth > node.clientWidth;
|
|
1252
|
+
setIsTruncated(truncated);
|
|
1231
1253
|
};
|
|
1232
1254
|
checkTruncation();
|
|
1233
1255
|
const resizeObserver = new ResizeObserver(checkTruncation);
|
|
@@ -1428,168 +1450,102 @@ const useGlobalChartsTheme = () => {
|
|
|
1428
1450
|
return useContext(GlobalChartsContext)?.theme ?? defaultTheme;
|
|
1429
1451
|
};
|
|
1430
1452
|
//#endregion
|
|
1431
|
-
//#region ../../../node_modules/.pnpm
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1453
|
+
//#region ../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
1454
|
+
/*!
|
|
1455
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1456
|
+
*
|
|
1457
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
1458
|
+
* Released under the MIT License.
|
|
1459
|
+
*/
|
|
1460
|
+
function isObject(o) {
|
|
1461
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
1462
|
+
}
|
|
1463
|
+
function isPlainObject(o) {
|
|
1464
|
+
var ctor, prot;
|
|
1465
|
+
if (isObject(o) === false) return false;
|
|
1466
|
+
ctor = o.constructor;
|
|
1467
|
+
if (ctor === void 0) return true;
|
|
1468
|
+
prot = ctor.prototype;
|
|
1469
|
+
if (isObject(prot) === false) return false;
|
|
1470
|
+
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
1471
|
+
return true;
|
|
1439
1472
|
}
|
|
1440
1473
|
//#endregion
|
|
1441
|
-
//#region ../../../node_modules/.pnpm
|
|
1442
|
-
const EMPTY_PROPS = {};
|
|
1474
|
+
//#region ../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js
|
|
1443
1475
|
/**
|
|
1444
|
-
*
|
|
1445
|
-
* the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.
|
|
1446
|
-
*
|
|
1447
|
-
* Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).
|
|
1448
|
-
* For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing
|
|
1449
|
-
* by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),
|
|
1450
|
-
* all handlers always execute without prevention capability.
|
|
1451
|
-
*
|
|
1452
|
-
* The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).
|
|
1453
|
-
* The `style` prop is merged with rightmost styles overwriting the prior ones.
|
|
1454
|
-
*
|
|
1455
|
-
* Props can either be provided as objects or as functions that take the previous props as an argument.
|
|
1456
|
-
* The function will receive the merged props up to that point (going from left to right):
|
|
1457
|
-
* so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.
|
|
1458
|
-
* The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).
|
|
1459
|
-
*
|
|
1460
|
-
* Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.
|
|
1461
|
-
* They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.
|
|
1462
|
-
*
|
|
1463
|
-
* @important **`ref` is not merged.**
|
|
1464
|
-
* @param a Props object to merge.
|
|
1465
|
-
* @param b Props object to merge. The function will overwrite conflicting props from `a`.
|
|
1466
|
-
* @param c Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1467
|
-
* @param d Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1468
|
-
* @param e Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1469
|
-
* @returns The merged props.
|
|
1470
|
-
* @public
|
|
1476
|
+
* Lower case as a function.
|
|
1471
1477
|
*/
|
|
1472
|
-
function
|
|
1473
|
-
|
|
1474
|
-
let merged = createInitialMergedProps(a);
|
|
1475
|
-
if (b) merged = mergeInto(merged, b);
|
|
1476
|
-
if (c) merged = mergeInto(merged, c);
|
|
1477
|
-
if (d) merged = mergeInto(merged, d);
|
|
1478
|
-
if (e) merged = mergeInto(merged, e);
|
|
1479
|
-
return merged;
|
|
1478
|
+
function lowerCase(str) {
|
|
1479
|
+
return str.toLowerCase();
|
|
1480
1480
|
}
|
|
1481
|
+
//#endregion
|
|
1482
|
+
//#region ../../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js
|
|
1483
|
+
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
1484
|
+
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
1481
1485
|
/**
|
|
1482
|
-
*
|
|
1483
|
-
* This function accepts an array of props instead of individual arguments.
|
|
1484
|
-
*
|
|
1485
|
-
* This has slightly lower performance than {@link mergeProps} due to accepting an array
|
|
1486
|
-
* instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or
|
|
1487
|
-
* fewer prop sets for better performance.
|
|
1488
|
-
*
|
|
1489
|
-
* @param props Array of props to merge.
|
|
1490
|
-
* @returns The merged props.
|
|
1491
|
-
* @see mergeProps
|
|
1492
|
-
* @public
|
|
1486
|
+
* Normalize the string into something other libraries can manipulate easier.
|
|
1493
1487
|
*/
|
|
1494
|
-
function
|
|
1495
|
-
if (
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
return copyInitialProps(inputProps);
|
|
1504
|
-
}
|
|
1505
|
-
function mergeInto(merged, inputProps) {
|
|
1506
|
-
if (isPropsGetter(inputProps)) return resolvePropsGetter(inputProps, merged);
|
|
1507
|
-
return mutablyMergeInto(merged, inputProps);
|
|
1508
|
-
}
|
|
1509
|
-
function copyInitialProps(inputProps) {
|
|
1510
|
-
const copiedProps = { ...inputProps };
|
|
1511
|
-
for (const propName in copiedProps) {
|
|
1512
|
-
const propValue = copiedProps[propName];
|
|
1513
|
-
if (isEventHandler(propName, propValue)) copiedProps[propName] = wrapEventHandler(propValue);
|
|
1514
|
-
}
|
|
1515
|
-
return copiedProps;
|
|
1488
|
+
function noCase(input, options) {
|
|
1489
|
+
if (options === void 0) options = {};
|
|
1490
|
+
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
1491
|
+
var result = replace$1(replace$1(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
1492
|
+
var start = 0;
|
|
1493
|
+
var end = result.length;
|
|
1494
|
+
while (result.charAt(start) === "\0") start++;
|
|
1495
|
+
while (result.charAt(end - 1) === "\0") end--;
|
|
1496
|
+
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
1516
1497
|
}
|
|
1517
1498
|
/**
|
|
1518
|
-
*
|
|
1499
|
+
* Replace `re` in the input string with the replacement value.
|
|
1519
1500
|
*/
|
|
1520
|
-
function
|
|
1521
|
-
if (
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
case "style":
|
|
1526
|
-
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
|
|
1527
|
-
break;
|
|
1528
|
-
case "className":
|
|
1529
|
-
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
|
|
1530
|
-
break;
|
|
1531
|
-
default: if (isEventHandler(propName, externalPropValue)) mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
|
|
1532
|
-
else mergedProps[propName] = externalPropValue;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
return mergedProps;
|
|
1501
|
+
function replace$1(input, re, value) {
|
|
1502
|
+
if (re instanceof RegExp) return input.replace(re, value);
|
|
1503
|
+
return re.reduce(function(input, re) {
|
|
1504
|
+
return input.replace(re, value);
|
|
1505
|
+
}, input);
|
|
1536
1506
|
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
return
|
|
1507
|
+
//#endregion
|
|
1508
|
+
//#region ../../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist.es2015/index.js
|
|
1509
|
+
function dotCase(input, options) {
|
|
1510
|
+
if (options === void 0) options = {};
|
|
1511
|
+
return noCase(input, __assign({ delimiter: "." }, options));
|
|
1542
1512
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region ../../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js
|
|
1515
|
+
function paramCase(input, options) {
|
|
1516
|
+
if (options === void 0) options = {};
|
|
1517
|
+
return dotCase(input, __assign({ delimiter: "-" }, options));
|
|
1545
1518
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1519
|
+
//#endregion
|
|
1520
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/useRefWithInit.mjs
|
|
1521
|
+
const UNINITIALIZED = {};
|
|
1522
|
+
/**
|
|
1523
|
+
* A React.useRef() that is initialized with a function. Note that it accepts an optional
|
|
1524
|
+
* initialization argument, so the initialization function doesn't need to be an inline closure.
|
|
1525
|
+
*
|
|
1526
|
+
* @usage
|
|
1527
|
+
* const ref = useRefWithInit(sortColumns, columns)
|
|
1528
|
+
*/
|
|
1529
|
+
function useRefWithInit(init, initArg) {
|
|
1530
|
+
const ref = React.useRef(UNINITIALIZED);
|
|
1531
|
+
if (ref.current === UNINITIALIZED) ref.current = init(initArg);
|
|
1532
|
+
return ref;
|
|
1549
1533
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
return result;
|
|
1534
|
+
//#endregion
|
|
1535
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/warn.mjs
|
|
1536
|
+
let set;
|
|
1537
|
+
if (process.env.NODE_ENV !== "production") set = /* @__PURE__ */ new Set();
|
|
1538
|
+
function warn(...messages) {
|
|
1539
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1540
|
+
const messageKey = messages.join(" ");
|
|
1541
|
+
if (!set.has(messageKey)) {
|
|
1542
|
+
set.add(messageKey);
|
|
1543
|
+
console.warn(`Base UI: ${messageKey}`);
|
|
1561
1544
|
}
|
|
1562
|
-
const result = theirHandler(...args);
|
|
1563
|
-
ourHandler?.(...args);
|
|
1564
|
-
return result;
|
|
1565
|
-
};
|
|
1566
|
-
}
|
|
1567
|
-
function wrapEventHandler(handler) {
|
|
1568
|
-
if (!handler) return handler;
|
|
1569
|
-
return (...args) => {
|
|
1570
|
-
const event = args[0];
|
|
1571
|
-
if (isSyntheticEvent(event)) makeEventPreventable(event);
|
|
1572
|
-
return handler(...args);
|
|
1573
|
-
};
|
|
1574
|
-
}
|
|
1575
|
-
function makeEventPreventable(event) {
|
|
1576
|
-
event.preventBaseUIHandler = () => {
|
|
1577
|
-
event.baseUIHandlerPrevented = true;
|
|
1578
|
-
};
|
|
1579
|
-
return event;
|
|
1580
|
-
}
|
|
1581
|
-
function mergeClassNames(ourClassName, theirClassName) {
|
|
1582
|
-
if (theirClassName) {
|
|
1583
|
-
if (ourClassName) return theirClassName + " " + ourClassName;
|
|
1584
|
-
return theirClassName;
|
|
1585
1545
|
}
|
|
1586
|
-
return ourClassName;
|
|
1587
|
-
}
|
|
1588
|
-
function isSyntheticEvent(event) {
|
|
1589
|
-
return event != null && typeof event === "object" && "nativeEvent" in event;
|
|
1590
1546
|
}
|
|
1591
1547
|
//#endregion
|
|
1592
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.
|
|
1548
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/formatErrorMessage.mjs
|
|
1593
1549
|
/**
|
|
1594
1550
|
* Creates a formatErrorMessage function with a custom URL and prefix.
|
|
1595
1551
|
* @param baseUrl - The base URL for the error page (e.g., 'https://base-ui.com/production-error')
|
|
@@ -1615,22 +1571,7 @@ function createFormatErrorMessage(baseUrl, prefix) {
|
|
|
1615
1571
|
*/
|
|
1616
1572
|
const formatErrorMessage = createFormatErrorMessage("https://base-ui.com/production-error", "Base UI");
|
|
1617
1573
|
//#endregion
|
|
1618
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.
|
|
1619
|
-
const UNINITIALIZED = {};
|
|
1620
|
-
/**
|
|
1621
|
-
* A React.useRef() that is initialized with a function. Note that it accepts an optional
|
|
1622
|
-
* initialization argument, so the initialization function doesn't need to be an inline closure.
|
|
1623
|
-
*
|
|
1624
|
-
* @usage
|
|
1625
|
-
* const ref = useRefWithInit(sortColumns, columns)
|
|
1626
|
-
*/
|
|
1627
|
-
function useRefWithInit(init, initArg) {
|
|
1628
|
-
const ref = React.useRef(UNINITIALIZED);
|
|
1629
|
-
if (ref.current === UNINITIALIZED) ref.current = init(initArg);
|
|
1630
|
-
return ref;
|
|
1631
|
-
}
|
|
1632
|
-
//#endregion
|
|
1633
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
1574
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/useMergedRefs.mjs
|
|
1634
1575
|
/**
|
|
1635
1576
|
* Merges refs into a single memoized callback ref or `null`.
|
|
1636
1577
|
* This makes sure multiple refs are updated together and have the same value.
|
|
@@ -1721,13 +1662,13 @@ function update(forkRef, refs) {
|
|
|
1721
1662
|
};
|
|
1722
1663
|
}
|
|
1723
1664
|
//#endregion
|
|
1724
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.
|
|
1665
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/reactVersion.mjs
|
|
1725
1666
|
const majorVersion = parseInt(React.version, 10);
|
|
1726
1667
|
function isReactVersionAtLeast(reactVersionToCheck) {
|
|
1727
1668
|
return majorVersion >= reactVersionToCheck;
|
|
1728
1669
|
}
|
|
1729
1670
|
//#endregion
|
|
1730
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.
|
|
1671
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/getReactElementRef.mjs
|
|
1731
1672
|
/**
|
|
1732
1673
|
* Extracts the `ref` from a React element, handling different React versions.
|
|
1733
1674
|
*/
|
|
@@ -1738,24 +1679,21 @@ function getReactElementRef(element) {
|
|
|
1738
1679
|
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
|
|
1739
1680
|
}
|
|
1740
1681
|
//#endregion
|
|
1741
|
-
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.
|
|
1742
|
-
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1745
|
-
if (
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
//#region ../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
|
|
1757
|
-
function getStateAttributesProps(state, customMapping) {
|
|
1758
|
-
const props = {};
|
|
1682
|
+
//#region ../../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/mergeObjects.mjs
|
|
1683
|
+
function mergeObjects(a, b) {
|
|
1684
|
+
if (a && !b) return a;
|
|
1685
|
+
if (!a && b) return b;
|
|
1686
|
+
if (a || b) return {
|
|
1687
|
+
...a,
|
|
1688
|
+
...b
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
Object.freeze([]);
|
|
1692
|
+
const EMPTY_OBJECT = Object.freeze({});
|
|
1693
|
+
//#endregion
|
|
1694
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
|
|
1695
|
+
function getStateAttributesProps(state, customMapping) {
|
|
1696
|
+
const props = {};
|
|
1759
1697
|
for (const key in state) {
|
|
1760
1698
|
const value = state[key];
|
|
1761
1699
|
if (customMapping?.hasOwnProperty(key)) {
|
|
@@ -1769,7 +1707,7 @@ function getStateAttributesProps(state, customMapping) {
|
|
|
1769
1707
|
return props;
|
|
1770
1708
|
}
|
|
1771
1709
|
//#endregion
|
|
1772
|
-
//#region ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
1710
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/resolveClassName.mjs
|
|
1773
1711
|
/**
|
|
1774
1712
|
* If the provided className is a string, it will be returned as is.
|
|
1775
1713
|
* Otherwise, the function will call the className function with the state as the first argument.
|
|
@@ -1781,7 +1719,7 @@ function resolveClassName(className, state) {
|
|
|
1781
1719
|
return typeof className === "function" ? className(state) : className;
|
|
1782
1720
|
}
|
|
1783
1721
|
//#endregion
|
|
1784
|
-
//#region ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
1722
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/resolveStyle.mjs
|
|
1785
1723
|
/**
|
|
1786
1724
|
* If the provided style is an object, it will be returned as is.
|
|
1787
1725
|
* Otherwise, the function will call the style function with the state as the first argument.
|
|
@@ -1793,7 +1731,158 @@ function resolveStyle(style, state) {
|
|
|
1793
1731
|
return typeof style === "function" ? style(state) : style;
|
|
1794
1732
|
}
|
|
1795
1733
|
//#endregion
|
|
1796
|
-
//#region ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
1734
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/merge-props/mergeProps.mjs
|
|
1735
|
+
const EMPTY_PROPS = {};
|
|
1736
|
+
/**
|
|
1737
|
+
* Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite
|
|
1738
|
+
* the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.
|
|
1739
|
+
*
|
|
1740
|
+
* Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).
|
|
1741
|
+
* For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing
|
|
1742
|
+
* by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),
|
|
1743
|
+
* all handlers always execute without prevention capability.
|
|
1744
|
+
*
|
|
1745
|
+
* The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).
|
|
1746
|
+
* The `style` prop is merged with rightmost styles overwriting the prior ones.
|
|
1747
|
+
*
|
|
1748
|
+
* Props can either be provided as objects or as functions that take the previous props as an argument.
|
|
1749
|
+
* The function will receive the merged props up to that point (going from left to right):
|
|
1750
|
+
* so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.
|
|
1751
|
+
* The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).
|
|
1752
|
+
*
|
|
1753
|
+
* Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.
|
|
1754
|
+
* They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.
|
|
1755
|
+
*
|
|
1756
|
+
* @important **`ref` is not merged.**
|
|
1757
|
+
* @param a Props object to merge.
|
|
1758
|
+
* @param b Props object to merge. The function will overwrite conflicting props from `a`.
|
|
1759
|
+
* @param c Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1760
|
+
* @param d Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1761
|
+
* @param e Props object to merge. The function will overwrite conflicting props from previous parameters.
|
|
1762
|
+
* @returns The merged props.
|
|
1763
|
+
* @public
|
|
1764
|
+
*/
|
|
1765
|
+
function mergeProps(a, b, c, d, e) {
|
|
1766
|
+
if (!c && !d && !e && !a) return createInitialMergedProps(b);
|
|
1767
|
+
let merged = createInitialMergedProps(a);
|
|
1768
|
+
if (b) merged = mergeInto(merged, b);
|
|
1769
|
+
if (c) merged = mergeInto(merged, c);
|
|
1770
|
+
if (d) merged = mergeInto(merged, d);
|
|
1771
|
+
if (e) merged = mergeInto(merged, e);
|
|
1772
|
+
return merged;
|
|
1773
|
+
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Merges an arbitrary number of React props using the same logic as {@link mergeProps}.
|
|
1776
|
+
* This function accepts an array of props instead of individual arguments.
|
|
1777
|
+
*
|
|
1778
|
+
* This has slightly lower performance than {@link mergeProps} due to accepting an array
|
|
1779
|
+
* instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or
|
|
1780
|
+
* fewer prop sets for better performance.
|
|
1781
|
+
*
|
|
1782
|
+
* @param props Array of props to merge.
|
|
1783
|
+
* @returns The merged props.
|
|
1784
|
+
* @see mergeProps
|
|
1785
|
+
* @public
|
|
1786
|
+
*/
|
|
1787
|
+
function mergePropsN(props) {
|
|
1788
|
+
if (props.length === 0) return EMPTY_PROPS;
|
|
1789
|
+
if (props.length === 1) return createInitialMergedProps(props[0]);
|
|
1790
|
+
let merged = createInitialMergedProps(props[0]);
|
|
1791
|
+
for (let i = 1; i < props.length; i += 1) merged = mergeInto(merged, props[i]);
|
|
1792
|
+
return merged;
|
|
1793
|
+
}
|
|
1794
|
+
function createInitialMergedProps(inputProps) {
|
|
1795
|
+
if (isPropsGetter(inputProps)) return { ...resolvePropsGetter(inputProps, EMPTY_PROPS) };
|
|
1796
|
+
return copyInitialProps(inputProps);
|
|
1797
|
+
}
|
|
1798
|
+
function mergeInto(merged, inputProps) {
|
|
1799
|
+
if (isPropsGetter(inputProps)) return resolvePropsGetter(inputProps, merged);
|
|
1800
|
+
return mutablyMergeInto(merged, inputProps);
|
|
1801
|
+
}
|
|
1802
|
+
function copyInitialProps(inputProps) {
|
|
1803
|
+
const copiedProps = { ...inputProps };
|
|
1804
|
+
for (const propName in copiedProps) {
|
|
1805
|
+
const propValue = copiedProps[propName];
|
|
1806
|
+
if (isEventHandler(propName, propValue)) copiedProps[propName] = wrapEventHandler(propValue);
|
|
1807
|
+
}
|
|
1808
|
+
return copiedProps;
|
|
1809
|
+
}
|
|
1810
|
+
/**
|
|
1811
|
+
* Merges two sets of props. In case of conflicts, the external props take precedence.
|
|
1812
|
+
*/
|
|
1813
|
+
function mutablyMergeInto(mergedProps, externalProps) {
|
|
1814
|
+
if (!externalProps) return mergedProps;
|
|
1815
|
+
for (const propName in externalProps) {
|
|
1816
|
+
const externalPropValue = externalProps[propName];
|
|
1817
|
+
switch (propName) {
|
|
1818
|
+
case "style":
|
|
1819
|
+
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
|
|
1820
|
+
break;
|
|
1821
|
+
case "className":
|
|
1822
|
+
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
|
|
1823
|
+
break;
|
|
1824
|
+
default: if (isEventHandler(propName, externalPropValue)) mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
|
|
1825
|
+
else mergedProps[propName] = externalPropValue;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
return mergedProps;
|
|
1829
|
+
}
|
|
1830
|
+
function isEventHandler(key, value) {
|
|
1831
|
+
const code0 = key.charCodeAt(0);
|
|
1832
|
+
const code1 = key.charCodeAt(1);
|
|
1833
|
+
const code2 = key.charCodeAt(2);
|
|
1834
|
+
return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
|
|
1835
|
+
}
|
|
1836
|
+
function isPropsGetter(inputProps) {
|
|
1837
|
+
return typeof inputProps === "function";
|
|
1838
|
+
}
|
|
1839
|
+
function resolvePropsGetter(inputProps, previousProps) {
|
|
1840
|
+
if (isPropsGetter(inputProps)) return inputProps(previousProps);
|
|
1841
|
+
return inputProps ?? EMPTY_PROPS;
|
|
1842
|
+
}
|
|
1843
|
+
function mergeEventHandlers(ourHandler, theirHandler) {
|
|
1844
|
+
if (!theirHandler) return ourHandler;
|
|
1845
|
+
if (!ourHandler) return wrapEventHandler(theirHandler);
|
|
1846
|
+
return (...args) => {
|
|
1847
|
+
const event = args[0];
|
|
1848
|
+
if (isSyntheticEvent(event)) {
|
|
1849
|
+
const baseUIEvent = event;
|
|
1850
|
+
makeEventPreventable(baseUIEvent);
|
|
1851
|
+
const result = theirHandler(...args);
|
|
1852
|
+
if (!baseUIEvent.baseUIHandlerPrevented) ourHandler?.(...args);
|
|
1853
|
+
return result;
|
|
1854
|
+
}
|
|
1855
|
+
const result = theirHandler(...args);
|
|
1856
|
+
ourHandler?.(...args);
|
|
1857
|
+
return result;
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
function wrapEventHandler(handler) {
|
|
1861
|
+
if (!handler) return handler;
|
|
1862
|
+
return (...args) => {
|
|
1863
|
+
const event = args[0];
|
|
1864
|
+
if (isSyntheticEvent(event)) makeEventPreventable(event);
|
|
1865
|
+
return handler(...args);
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
function makeEventPreventable(event) {
|
|
1869
|
+
event.preventBaseUIHandler = () => {
|
|
1870
|
+
event.baseUIHandlerPrevented = true;
|
|
1871
|
+
};
|
|
1872
|
+
return event;
|
|
1873
|
+
}
|
|
1874
|
+
function mergeClassNames(ourClassName, theirClassName) {
|
|
1875
|
+
if (theirClassName) {
|
|
1876
|
+
if (ourClassName) return theirClassName + " " + ourClassName;
|
|
1877
|
+
return theirClassName;
|
|
1878
|
+
}
|
|
1879
|
+
return ourClassName;
|
|
1880
|
+
}
|
|
1881
|
+
function isSyntheticEvent(event) {
|
|
1882
|
+
return event != null && typeof event === "object" && "nativeEvent" in event;
|
|
1883
|
+
}
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/internals/useRenderElement.mjs
|
|
1797
1886
|
/**
|
|
1798
1887
|
* Renders a Base UI element.
|
|
1799
1888
|
*
|
|
@@ -1882,7 +1971,7 @@ function renderTag(Tag, props) {
|
|
|
1882
1971
|
return /*#__PURE__*/ React.createElement(Tag, props);
|
|
1883
1972
|
}
|
|
1884
1973
|
//#endregion
|
|
1885
|
-
//#region ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
1974
|
+
//#region ../../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/use-render/useRender.mjs
|
|
1886
1975
|
/**
|
|
1887
1976
|
* Renders a Base UI element.
|
|
1888
1977
|
*
|
|
@@ -1892,7 +1981,7 @@ function useRender(params) {
|
|
|
1892
1981
|
return useRenderElement(params.defaultTagName ?? "div", params, params);
|
|
1893
1982
|
}
|
|
1894
1983
|
//#endregion
|
|
1895
|
-
//#region ../../../node_modules/.pnpm/@wordpress+ui@0.
|
|
1984
|
+
//#region ../../../node_modules/.pnpm/@wordpress+ui@0.17.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/ui/build-module/text/text.mjs
|
|
1896
1985
|
var STYLE_HASH_ATTRIBUTE$1 = "data-wp-hash";
|
|
1897
1986
|
function getRuntime$1() {
|
|
1898
1987
|
const globalScope = globalThis;
|
|
@@ -1948,35 +2037,39 @@ function registerStyle$1(hash, css) {
|
|
|
1948
2037
|
runtime.styles.set(hash, css);
|
|
1949
2038
|
for (const targetDocument of runtime.documents.keys()) injectStyle$1(targetDocument, hash, css);
|
|
1950
2039
|
}
|
|
1951
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle$1("
|
|
1952
|
-
var style_default$1 = {
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
"
|
|
1960
|
-
"
|
|
2040
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle$1("0c5702ddca", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,\"Segoe UI\",\"Roboto\",\"Oxygen-Sans\",\"Ubuntu\",\"Cantarell\",\"Helvetica Neue\",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,\"Segoe UI\",\"Roboto\",\"Oxygen-Sans\",\"Ubuntu\",\"Cantarell\",\"Helvetica Neue\",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,\"Segoe UI\",\"Roboto\",\"Oxygen-Sans\",\"Ubuntu\",\"Cantarell\",\"Helvetica Neue\",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\"Segoe UI\",\"Roboto\",\"Oxygen-Sans\",\"Ubuntu\",\"Cantarell\",\"Helvetica Neue\",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\"Segoe UI\",\"Roboto\",\"Oxygen-Sans\",\"Ubuntu\",\"Cantarell\",\"Helvetica Neue\",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}");
|
|
2041
|
+
var style_default$1 = {
|
|
2042
|
+
"text": "_83ed8a8da5dd50ea__text",
|
|
2043
|
+
"heading-2xl": "_14437cfb77831647__heading-2xl",
|
|
2044
|
+
"heading-xl": "_3c78b7fa9b4072dd__heading-xl",
|
|
2045
|
+
"heading-lg": "aa58f227716bcde2__heading-lg",
|
|
2046
|
+
"heading-md": "fc4da56d8dfe52c4__heading-md",
|
|
2047
|
+
"heading-sm": "a9b78c7c82e8dff7__heading-sm",
|
|
2048
|
+
"body-xl": "_305ff559e52180d5__body-xl",
|
|
2049
|
+
"body-lg": "ca1aa3fc2029e958__body-lg",
|
|
2050
|
+
"body-md": "_131101940be12424__body-md",
|
|
2051
|
+
"body-sm": "_0e8d87a42c1f75fa__body-sm"
|
|
2052
|
+
};
|
|
2053
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle$1("d390e935a7", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");
|
|
2054
|
+
var global_css_defense_default = {
|
|
2055
|
+
"button": "_6defc79820e382c6__button",
|
|
2056
|
+
"input": "d2cff2e5dea83bd1__input",
|
|
2057
|
+
"textarea": "_547d86373d02e108__textarea",
|
|
2058
|
+
"div": "_8c15fd0ed9f28ba4__div",
|
|
2059
|
+
"p": "_43cec3e1eec1066d__p",
|
|
2060
|
+
"heading": "e97669c6d9a38497__heading",
|
|
2061
|
+
"a": "_2c0831b0499dbd6e__a"
|
|
1961
2062
|
};
|
|
1962
|
-
var
|
|
2063
|
+
var Text$1 = forwardRef$1(function Text2({ variant = "body-md", render, className, ...props }, ref) {
|
|
1963
2064
|
return useRender({
|
|
1964
2065
|
render,
|
|
2066
|
+
defaultTagName: "span",
|
|
1965
2067
|
ref,
|
|
1966
|
-
props: mergeProps(props, {
|
|
1967
|
-
style: {
|
|
1968
|
-
gap: gap && gapTokens[gap],
|
|
1969
|
-
alignItems: align,
|
|
1970
|
-
justifyContent: justify,
|
|
1971
|
-
flexDirection: direction,
|
|
1972
|
-
flexWrap: wrap
|
|
1973
|
-
},
|
|
1974
|
-
className: style_default$1.stack
|
|
1975
|
-
})
|
|
2068
|
+
props: mergeProps(props, { className: clsx(style_default$1.text, global_css_defense_default.heading, global_css_defense_default.p, style_default$1[variant], className) })
|
|
1976
2069
|
});
|
|
1977
2070
|
});
|
|
1978
2071
|
//#endregion
|
|
1979
|
-
//#region ../../../node_modules/.pnpm/@wordpress+ui@0.
|
|
2072
|
+
//#region ../../../node_modules/.pnpm/@wordpress+ui@0.17.0_@types+react@18.3.28_date-fns@4.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/ui/build-module/stack/stack.mjs
|
|
1980
2073
|
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
1981
2074
|
function getRuntime() {
|
|
1982
2075
|
const globalScope = globalThis;
|
|
@@ -2032,35 +2125,31 @@ function registerStyle(hash, css) {
|
|
|
2032
2125
|
runtime.styles.set(hash, css);
|
|
2033
2126
|
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
2034
2127
|
}
|
|
2035
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("
|
|
2036
|
-
var style_default = {
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
"
|
|
2044
|
-
"
|
|
2045
|
-
"body-md": "_131101940be12424__body-md",
|
|
2046
|
-
"body-sm": "_0e8d87a42c1f75fa__body-sm"
|
|
2047
|
-
};
|
|
2048
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("1fb29d3a3c", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");
|
|
2049
|
-
var global_css_defense_default = {
|
|
2050
|
-
"button": "_6defc79820e382c6__button",
|
|
2051
|
-
"input": "d2cff2e5dea83bd1__input",
|
|
2052
|
-
"textarea": "_547d86373d02e108__textarea",
|
|
2053
|
-
"div": "_8c15fd0ed9f28ba4__div",
|
|
2054
|
-
"p": "_43cec3e1eec1066d__p",
|
|
2055
|
-
"heading": "e97669c6d9a38497__heading",
|
|
2056
|
-
"a": "_2c0831b0499dbd6e__a"
|
|
2128
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
|
|
2129
|
+
var style_default = { "stack": "_19ce0419607e1896__stack" };
|
|
2130
|
+
var gapTokens = {
|
|
2131
|
+
xs: "var(--wpds-dimension-gap-xs, 4px)",
|
|
2132
|
+
sm: "var(--wpds-dimension-gap-sm, 8px)",
|
|
2133
|
+
md: "var(--wpds-dimension-gap-md, 12px)",
|
|
2134
|
+
lg: "var(--wpds-dimension-gap-lg, 16px)",
|
|
2135
|
+
xl: "var(--wpds-dimension-gap-xl, 24px)",
|
|
2136
|
+
"2xl": "var(--wpds-dimension-gap-2xl, 32px)",
|
|
2137
|
+
"3xl": "var(--wpds-dimension-gap-3xl, 40px)"
|
|
2057
2138
|
};
|
|
2058
|
-
var
|
|
2139
|
+
var Stack = forwardRef$1(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
|
|
2059
2140
|
return useRender({
|
|
2060
2141
|
render,
|
|
2061
|
-
defaultTagName: "span",
|
|
2062
2142
|
ref,
|
|
2063
|
-
props: mergeProps(props, {
|
|
2143
|
+
props: mergeProps(props, {
|
|
2144
|
+
style: {
|
|
2145
|
+
gap: gap && gapTokens[gap],
|
|
2146
|
+
alignItems: align,
|
|
2147
|
+
justifyContent: justify,
|
|
2148
|
+
flexDirection: direction,
|
|
2149
|
+
flexWrap: wrap
|
|
2150
|
+
},
|
|
2151
|
+
className: style_default.stack
|
|
2152
|
+
})
|
|
2064
2153
|
});
|
|
2065
2154
|
});
|
|
2066
2155
|
//#endregion
|
|
@@ -3081,90 +3170,6 @@ var line_chart_module_default = {
|
|
|
3081
3170
|
"line-chart--animated": "a8ccharts-inuQka-line-chart--animated",
|
|
3082
3171
|
"rise": "a8ccharts-inuQka-rise"
|
|
3083
3172
|
};
|
|
3084
|
-
//#endregion
|
|
3085
|
-
//#region src/charts/line-chart/private/line-chart-annotations-overlay.tsx
|
|
3086
|
-
const LineChartAnnotationsOverlay = ({ children }) => {
|
|
3087
|
-
const { chartRef, chartWidth, chartHeight } = useSingleChartContext();
|
|
3088
|
-
const [scales, setScales] = useState(null);
|
|
3089
|
-
const [scalesStable, setScalesStable] = useState(false);
|
|
3090
|
-
const createScaleSignature = useCallback((scaleData) => {
|
|
3091
|
-
const xDomain = scaleData.xScale.domain();
|
|
3092
|
-
const yDomain = scaleData.yScale.domain();
|
|
3093
|
-
const xRange = scaleData.xScale.range();
|
|
3094
|
-
const yRange = scaleData.yScale.range();
|
|
3095
|
-
return `${xDomain.join(",")}-${yDomain.join(",")}-${xRange.join(",")}-${yRange.join(",")}`;
|
|
3096
|
-
}, []);
|
|
3097
|
-
const getScalesData = useCallback(() => {
|
|
3098
|
-
if (chartRef?.current) {
|
|
3099
|
-
const scaleData = chartRef.current.getScales();
|
|
3100
|
-
if (scaleData) {
|
|
3101
|
-
const scaleInfo = {
|
|
3102
|
-
xScale: scaleData.xScale,
|
|
3103
|
-
yScale: scaleData.yScale
|
|
3104
|
-
};
|
|
3105
|
-
return {
|
|
3106
|
-
scales: scaleInfo,
|
|
3107
|
-
signature: createScaleSignature(scaleInfo)
|
|
3108
|
-
};
|
|
3109
|
-
}
|
|
3110
|
-
}
|
|
3111
|
-
return null;
|
|
3112
|
-
}, [chartRef, createScaleSignature]);
|
|
3113
|
-
useEffect(() => {
|
|
3114
|
-
let timeoutId = null;
|
|
3115
|
-
let lastSignature = null;
|
|
3116
|
-
let retryCount = 0;
|
|
3117
|
-
const maxRetries = 20;
|
|
3118
|
-
const checkInterval = 50;
|
|
3119
|
-
setScalesStable(false);
|
|
3120
|
-
const monitorScales = () => {
|
|
3121
|
-
const currentScaleData = getScalesData();
|
|
3122
|
-
if (currentScaleData) {
|
|
3123
|
-
if (lastSignature && currentScaleData.signature === lastSignature) {
|
|
3124
|
-
setScalesStable(true);
|
|
3125
|
-
return;
|
|
3126
|
-
}
|
|
3127
|
-
setScales(currentScaleData.scales);
|
|
3128
|
-
lastSignature = currentScaleData.signature;
|
|
3129
|
-
}
|
|
3130
|
-
if (retryCount < maxRetries) {
|
|
3131
|
-
retryCount++;
|
|
3132
|
-
timeoutId = setTimeout(monitorScales, checkInterval);
|
|
3133
|
-
}
|
|
3134
|
-
};
|
|
3135
|
-
monitorScales();
|
|
3136
|
-
return () => {
|
|
3137
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
3138
|
-
};
|
|
3139
|
-
}, [
|
|
3140
|
-
getScalesData,
|
|
3141
|
-
chartWidth,
|
|
3142
|
-
chartHeight
|
|
3143
|
-
]);
|
|
3144
|
-
if (!chartRef || !children || !chartWidth || !chartHeight) return null;
|
|
3145
|
-
if (!scales || !scalesStable) return null;
|
|
3146
|
-
const dataContextValue = {
|
|
3147
|
-
xScale: scales.xScale,
|
|
3148
|
-
yScale: scales.yScale,
|
|
3149
|
-
margin: {
|
|
3150
|
-
top: 0,
|
|
3151
|
-
right: 0,
|
|
3152
|
-
bottom: 0,
|
|
3153
|
-
left: 0
|
|
3154
|
-
},
|
|
3155
|
-
width: chartWidth,
|
|
3156
|
-
height: chartHeight
|
|
3157
|
-
};
|
|
3158
|
-
return /* @__PURE__ */ jsx(DataContext.Provider, {
|
|
3159
|
-
value: dataContextValue,
|
|
3160
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
3161
|
-
width: chartWidth,
|
|
3162
|
-
height: chartHeight,
|
|
3163
|
-
className: line_chart_module_default["line-chart__annotations-overlay"],
|
|
3164
|
-
children
|
|
3165
|
-
})
|
|
3166
|
-
});
|
|
3167
|
-
};
|
|
3168
3173
|
const CloseIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
3169
3174
|
width: "16",
|
|
3170
3175
|
height: "16",
|
|
@@ -3246,6 +3251,90 @@ const LineChartAnnotationLabelWithPopover = ({ title, subtitle, renderLabel, ren
|
|
|
3246
3251
|
});
|
|
3247
3252
|
};
|
|
3248
3253
|
//#endregion
|
|
3254
|
+
//#region src/charts/line-chart/private/line-chart-annotations-overlay.tsx
|
|
3255
|
+
const LineChartAnnotationsOverlay = ({ children }) => {
|
|
3256
|
+
const { chartRef, chartWidth, chartHeight } = useSingleChartContext();
|
|
3257
|
+
const [scales, setScales] = useState(null);
|
|
3258
|
+
const [scalesStable, setScalesStable] = useState(false);
|
|
3259
|
+
const createScaleSignature = useCallback((scaleData) => {
|
|
3260
|
+
const xDomain = scaleData.xScale.domain();
|
|
3261
|
+
const yDomain = scaleData.yScale.domain();
|
|
3262
|
+
const xRange = scaleData.xScale.range();
|
|
3263
|
+
const yRange = scaleData.yScale.range();
|
|
3264
|
+
return `${xDomain.join(",")}-${yDomain.join(",")}-${xRange.join(",")}-${yRange.join(",")}`;
|
|
3265
|
+
}, []);
|
|
3266
|
+
const getScalesData = useCallback(() => {
|
|
3267
|
+
if (chartRef?.current) {
|
|
3268
|
+
const scaleData = chartRef.current.getScales();
|
|
3269
|
+
if (scaleData) {
|
|
3270
|
+
const scaleInfo = {
|
|
3271
|
+
xScale: scaleData.xScale,
|
|
3272
|
+
yScale: scaleData.yScale
|
|
3273
|
+
};
|
|
3274
|
+
return {
|
|
3275
|
+
scales: scaleInfo,
|
|
3276
|
+
signature: createScaleSignature(scaleInfo)
|
|
3277
|
+
};
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
return null;
|
|
3281
|
+
}, [chartRef, createScaleSignature]);
|
|
3282
|
+
useEffect(() => {
|
|
3283
|
+
let timeoutId = null;
|
|
3284
|
+
let lastSignature = null;
|
|
3285
|
+
let retryCount = 0;
|
|
3286
|
+
const maxRetries = 20;
|
|
3287
|
+
const checkInterval = 50;
|
|
3288
|
+
setScalesStable(false);
|
|
3289
|
+
const monitorScales = () => {
|
|
3290
|
+
const currentScaleData = getScalesData();
|
|
3291
|
+
if (currentScaleData) {
|
|
3292
|
+
if (lastSignature && currentScaleData.signature === lastSignature) {
|
|
3293
|
+
setScalesStable(true);
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
setScales(currentScaleData.scales);
|
|
3297
|
+
lastSignature = currentScaleData.signature;
|
|
3298
|
+
}
|
|
3299
|
+
if (retryCount < maxRetries) {
|
|
3300
|
+
retryCount++;
|
|
3301
|
+
timeoutId = setTimeout(monitorScales, checkInterval);
|
|
3302
|
+
}
|
|
3303
|
+
};
|
|
3304
|
+
monitorScales();
|
|
3305
|
+
return () => {
|
|
3306
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
3307
|
+
};
|
|
3308
|
+
}, [
|
|
3309
|
+
getScalesData,
|
|
3310
|
+
chartWidth,
|
|
3311
|
+
chartHeight
|
|
3312
|
+
]);
|
|
3313
|
+
if (!chartRef || !children || !chartWidth || !chartHeight) return null;
|
|
3314
|
+
if (!scales || !scalesStable) return null;
|
|
3315
|
+
const dataContextValue = {
|
|
3316
|
+
xScale: scales.xScale,
|
|
3317
|
+
yScale: scales.yScale,
|
|
3318
|
+
margin: {
|
|
3319
|
+
top: 0,
|
|
3320
|
+
right: 0,
|
|
3321
|
+
bottom: 0,
|
|
3322
|
+
left: 0
|
|
3323
|
+
},
|
|
3324
|
+
width: chartWidth,
|
|
3325
|
+
height: chartHeight
|
|
3326
|
+
};
|
|
3327
|
+
return /* @__PURE__ */ jsx(DataContext.Provider, {
|
|
3328
|
+
value: dataContextValue,
|
|
3329
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
3330
|
+
width: chartWidth,
|
|
3331
|
+
height: chartHeight,
|
|
3332
|
+
className: line_chart_module_default["line-chart__annotations-overlay"],
|
|
3333
|
+
children
|
|
3334
|
+
})
|
|
3335
|
+
});
|
|
3336
|
+
};
|
|
3337
|
+
//#endregion
|
|
3249
3338
|
//#region src/charts/line-chart/private/line-chart-annotation.tsx
|
|
3250
3339
|
const ANNOTATION_MAX_WIDTH = 125;
|
|
3251
3340
|
const ANNOTATION_INIT_HEIGHT = 100;
|
|
@@ -3309,7 +3398,10 @@ const LineChartAnnotation = ({ datum, title, subtitle, subjectType = "circle", s
|
|
|
3309
3398
|
const styles = deepmerge(providerTheme.annotationStyles ?? {}, datumStyles ?? {});
|
|
3310
3399
|
const resolveColor = (value) => value ? resolveCssVariable(value) ?? value : value;
|
|
3311
3400
|
useEffect(() => {
|
|
3312
|
-
if (labelRef.current?.getBBox)
|
|
3401
|
+
if (labelRef.current?.getBBox) {
|
|
3402
|
+
const bbox = labelRef.current.getBBox();
|
|
3403
|
+
setHeight(bbox.height);
|
|
3404
|
+
}
|
|
3313
3405
|
}, []);
|
|
3314
3406
|
const positionData = useMemo(() => {
|
|
3315
3407
|
if (!datum || !datum.date || datum.value == null || !xScale || !yScale) return null;
|
|
@@ -4950,8 +5042,9 @@ const BarChartInternal = ({ data, chartId: providedChartId, width, height, class
|
|
|
4950
5042
|
if (dataPointIndex >= maxDataPoints || seriesIndex >= primaryCount) return "";
|
|
4951
5043
|
const seriesData = primaryEntries[seriesIndex]?.series;
|
|
4952
5044
|
if (!seriesData || dataPointIndex >= seriesData.data.length) return "";
|
|
5045
|
+
const actualBarIndex = seriesIndex * maxDataPoints + dataPointIndex;
|
|
4953
5046
|
return `
|
|
4954
|
-
.bar-chart[data-chart-id="bar-chart-${chartId}"] .visx-bar-group .visx-bar:nth-child(${
|
|
5047
|
+
.bar-chart[data-chart-id="bar-chart-${chartId}"] .visx-bar-group .visx-bar:nth-child(${actualBarIndex + 1}) {
|
|
4955
5048
|
stroke: #005fcc;
|
|
4956
5049
|
stroke-width: 2px;
|
|
4957
5050
|
}
|
|
@@ -5171,16 +5264,18 @@ const AxisRenderer = ({ ticks, tickLabelProps, yOffset, labelPosition, valuePosi
|
|
|
5171
5264
|
const getDefaultYOffset = (data, yScaleConfig, height, isMultiSeries) => {
|
|
5172
5265
|
if (!isMultiSeries) return 0;
|
|
5173
5266
|
const dataKeys = data.map(({ label }) => label);
|
|
5174
|
-
|
|
5267
|
+
const yScale = createScale({
|
|
5268
|
+
type: "band",
|
|
5269
|
+
range: [0, height],
|
|
5175
5270
|
domain: dataKeys,
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
}))],
|
|
5271
|
+
...yScaleConfig
|
|
5272
|
+
});
|
|
5273
|
+
const groupScale = scaleBand({
|
|
5274
|
+
domain: dataKeys,
|
|
5275
|
+
range: [0, getScaleBandwidth(yScale)],
|
|
5182
5276
|
padding: yScaleConfig.paddingInner
|
|
5183
|
-
})
|
|
5277
|
+
});
|
|
5278
|
+
return -(getScaleBandwidth(groupScale) + 6);
|
|
5184
5279
|
};
|
|
5185
5280
|
const BarListChartInternal = ({ data, width, height, options = {}, margin = {
|
|
5186
5281
|
left: 0,
|
|
@@ -5671,6 +5766,51 @@ const GEO_CHART_PACKAGES = [
|
|
|
5671
5766
|
"controls",
|
|
5672
5767
|
"geochart"
|
|
5673
5768
|
];
|
|
5769
|
+
const GOOGLE_CHARTS_ERROR_ID_PREFIX = "google-visualization-errors-";
|
|
5770
|
+
const GOOGLE_CHARTS_ERROR_WRAPPER_INFIX = "-all-";
|
|
5771
|
+
/**
|
|
5772
|
+
* Collects Google Charts error elements rendered inside a chart container.
|
|
5773
|
+
*
|
|
5774
|
+
* @param container - The chart container element to scan.
|
|
5775
|
+
* @return Errors found in the container, one per error span.
|
|
5776
|
+
*/
|
|
5777
|
+
function collectRenderedGeoChartErrors(container) {
|
|
5778
|
+
const elements = container.querySelectorAll(`[id^="${GOOGLE_CHARTS_ERROR_ID_PREFIX}"]`);
|
|
5779
|
+
return Array.from(elements).filter((element) => !element.id.includes(GOOGLE_CHARTS_ERROR_WRAPPER_INFIX)).map((element) => ({
|
|
5780
|
+
id: element.id,
|
|
5781
|
+
message: element.textContent?.trim() ?? ""
|
|
5782
|
+
})).filter((error) => error.message.length > 0);
|
|
5783
|
+
}
|
|
5784
|
+
/**
|
|
5785
|
+
* Whether a node added to the chart container is — or contains — a Google
|
|
5786
|
+
* Charts error element. Also matches text appended into an existing error
|
|
5787
|
+
* span, in case Google fills the message after inserting the element.
|
|
5788
|
+
*
|
|
5789
|
+
* @param node - The added DOM node to inspect.
|
|
5790
|
+
* @return Whether the node involves a Google Charts error element.
|
|
5791
|
+
*/
|
|
5792
|
+
function involvesGeoChartErrorElement(node) {
|
|
5793
|
+
if (node.nodeType === Node.TEXT_NODE) return !!node.parentElement?.id.startsWith(GOOGLE_CHARTS_ERROR_ID_PREFIX);
|
|
5794
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
5795
|
+
return node.id.startsWith(GOOGLE_CHARTS_ERROR_ID_PREFIX) || node.querySelector(`[id^="${GOOGLE_CHARTS_ERROR_ID_PREFIX}"]`) !== null;
|
|
5796
|
+
}
|
|
5797
|
+
/**
|
|
5798
|
+
* Normalizes the raw Google Charts error event into the GeoChart error shape.
|
|
5799
|
+
*
|
|
5800
|
+
* @param eventArgs - Error event payload from react-google-charts.
|
|
5801
|
+
* @return Normalized GeoChart error.
|
|
5802
|
+
*/
|
|
5803
|
+
function normalizeGeoChartError(eventArgs) {
|
|
5804
|
+
const payload = Array.isArray(eventArgs) ? eventArgs[0] : eventArgs;
|
|
5805
|
+
if (!payload || typeof payload !== "object") return {};
|
|
5806
|
+
const { id, message, detailedMessage, options } = payload;
|
|
5807
|
+
return {
|
|
5808
|
+
...typeof id === "string" && { id },
|
|
5809
|
+
...typeof message === "string" && { message },
|
|
5810
|
+
...typeof detailedMessage === "string" && { detailedMessage },
|
|
5811
|
+
...options && typeof options === "object" && !Array.isArray(options) && { options }
|
|
5812
|
+
};
|
|
5813
|
+
}
|
|
5674
5814
|
/**
|
|
5675
5815
|
* Renders a geographical chart using Google Charts GeoChart to visualize data.
|
|
5676
5816
|
*
|
|
@@ -5686,12 +5826,35 @@ const GEO_CHART_PACKAGES = [
|
|
|
5686
5826
|
* @param props.height - Height of the chart in pixels
|
|
5687
5827
|
* @param props.region - Region to display ('world', 'US', or ISO 3166-1 alpha-2 code)
|
|
5688
5828
|
* @param props.resolution - Resolution level ('countries', 'provinces', or 'metros')
|
|
5829
|
+
* @param props.onError - Optional callback for Google Charts errors
|
|
5689
5830
|
* @param props.className - Additional CSS class name for the chart container
|
|
5690
5831
|
* @param props.renderPlaceholder - Optional render function for the loading placeholder
|
|
5691
5832
|
* @return A React component displaying an interactive map with data visualization
|
|
5692
5833
|
*/
|
|
5693
|
-
const GeoChartInternal = ({ className, data, width, height, region = "world", resolution = "countries", renderPlaceholder }) => {
|
|
5834
|
+
const GeoChartInternal = ({ className, data, width, height, region = "world", resolution = "countries", onError, renderPlaceholder }) => {
|
|
5694
5835
|
const { getElementStyles, theme: { geoChart: { featureFillColor }, backgroundColor } } = useGlobalChartsContext();
|
|
5836
|
+
const containerRef = useRef(null);
|
|
5837
|
+
const reportedErrorIdsRef = useRef(/* @__PURE__ */ new Set());
|
|
5838
|
+
useEffect(() => {
|
|
5839
|
+
const container = containerRef.current;
|
|
5840
|
+
if (!onError || !container || typeof MutationObserver === "undefined") return;
|
|
5841
|
+
const reportRenderedErrors = () => {
|
|
5842
|
+
for (const error of collectRenderedGeoChartErrors(container)) {
|
|
5843
|
+
if (reportedErrorIdsRef.current.has(error.id)) continue;
|
|
5844
|
+
reportedErrorIdsRef.current.add(error.id);
|
|
5845
|
+
onError(error);
|
|
5846
|
+
}
|
|
5847
|
+
};
|
|
5848
|
+
const observer = new MutationObserver((records) => {
|
|
5849
|
+
if (records.some((record) => Array.from(record.addedNodes).some(involvesGeoChartErrorElement))) reportRenderedErrors();
|
|
5850
|
+
});
|
|
5851
|
+
observer.observe(container, {
|
|
5852
|
+
childList: true,
|
|
5853
|
+
subtree: true
|
|
5854
|
+
});
|
|
5855
|
+
reportRenderedErrors();
|
|
5856
|
+
return () => observer.disconnect();
|
|
5857
|
+
}, [onError]);
|
|
5695
5858
|
const loadingPlaceholder = /* @__PURE__ */ jsx(Center, {
|
|
5696
5859
|
className: clsx("geo-chart", geo_chart_module_default.container, className),
|
|
5697
5860
|
style: {
|
|
@@ -5750,7 +5913,17 @@ const GeoChartInternal = ({ className, data, width, height, region = "world", re
|
|
|
5750
5913
|
defaultFillColorHex,
|
|
5751
5914
|
sanitizedData.hasHtmlTooltips
|
|
5752
5915
|
]);
|
|
5916
|
+
const chartEvents = useMemo(() => {
|
|
5917
|
+
if (!onError) return;
|
|
5918
|
+
return [{
|
|
5919
|
+
eventName: "error",
|
|
5920
|
+
callback: ({ eventArgs }) => {
|
|
5921
|
+
onError(normalizeGeoChartError(eventArgs));
|
|
5922
|
+
}
|
|
5923
|
+
}];
|
|
5924
|
+
}, [onError]);
|
|
5753
5925
|
return /* @__PURE__ */ jsx(Center, {
|
|
5926
|
+
ref: containerRef,
|
|
5754
5927
|
className: clsx("geo-chart", geo_chart_module_default.container, className),
|
|
5755
5928
|
style: {
|
|
5756
5929
|
width,
|
|
@@ -5764,6 +5937,7 @@ const GeoChartInternal = ({ className, data, width, height, region = "world", re
|
|
|
5764
5937
|
height,
|
|
5765
5938
|
data: sanitizedData.data,
|
|
5766
5939
|
options,
|
|
5940
|
+
chartEvents,
|
|
5767
5941
|
loader: loadingPlaceholder
|
|
5768
5942
|
})
|
|
5769
5943
|
});
|
|
@@ -5858,12 +6032,17 @@ const buildCalendarHeatmapData = (series, options = {}) => {
|
|
|
5858
6032
|
const gridStart = startOfWeek(minDate, { weekStartsOn });
|
|
5859
6033
|
const weekCount = differenceInCalendarWeeks(maxDate, gridStart, { weekStartsOn }) + 1;
|
|
5860
6034
|
const rowLabels = Array.from({ length: 7 }, (_, row) => LABELLED_ROWS.includes(row) ? format(addDays(gridStart, row), "EEE") : "");
|
|
6035
|
+
const MIN_FIRST_MONTH_WEEKS = 2;
|
|
6036
|
+
const firstMonth = gridStart.getMonth();
|
|
6037
|
+
let firstMonthWeeks = 0;
|
|
6038
|
+
while (firstMonthWeeks < weekCount && addDays(gridStart, firstMonthWeeks * 7).getMonth() === firstMonth) firstMonthWeeks++;
|
|
6039
|
+
const showFirstMonthLabel = !(firstMonthWeeks < weekCount) || firstMonthWeeks >= MIN_FIRST_MONTH_WEEKS;
|
|
5861
6040
|
const data = [];
|
|
5862
6041
|
let previousMonth = -1;
|
|
5863
6042
|
for (let week = 0; week < weekCount; week++) {
|
|
5864
6043
|
const columnStart = addDays(gridStart, week * 7);
|
|
5865
6044
|
const month = columnStart.getMonth();
|
|
5866
|
-
const label = month !== previousMonth ? format(columnStart, "MMM") : "";
|
|
6045
|
+
const label = month !== previousMonth && (week !== 0 || showFirstMonthLabel) ? format(columnStart, "MMM") : "";
|
|
5867
6046
|
previousMonth = month;
|
|
5868
6047
|
const cells = [];
|
|
5869
6048
|
for (let row = 0; row < 7; row++) {
|
|
@@ -5885,10 +6064,14 @@ const buildCalendarHeatmapData = (series, options = {}) => {
|
|
|
5885
6064
|
};
|
|
5886
6065
|
};
|
|
5887
6066
|
//#endregion
|
|
6067
|
+
//#region src/charts/heatmap-chart/private/heatmap-context.ts
|
|
6068
|
+
/** Shared by the chart and legend without importing back from `heatmap-chart.tsx`. */
|
|
6069
|
+
const HeatmapContext = createContext(null);
|
|
6070
|
+
//#endregion
|
|
5888
6071
|
//#region src/charts/heatmap-chart/private/heatmap-legend.tsx
|
|
5889
6072
|
const HeatmapLegend = ({ steps = 5, lessLabel, moreLabel }) => {
|
|
5890
6073
|
const context = useContext(HeatmapContext);
|
|
5891
|
-
const { legend } = useGlobalChartsTheme();
|
|
6074
|
+
const { legend, backgroundColor } = useGlobalChartsTheme();
|
|
5892
6075
|
if (!context) return null;
|
|
5893
6076
|
const { primaryColorHex } = context;
|
|
5894
6077
|
const labelStyle = legend.labelStyles;
|
|
@@ -5912,6 +6095,7 @@ const HeatmapLegend = ({ steps = 5, lessLabel, moreLabel }) => {
|
|
|
5912
6095
|
className: heatmap_chart_module_default["heatmap-chart__legend-swatch"],
|
|
5913
6096
|
style: {
|
|
5914
6097
|
"--heatmap-primary": primaryColorHex,
|
|
6098
|
+
"--heatmap-bg": backgroundColor,
|
|
5915
6099
|
"--intensity": intensity
|
|
5916
6100
|
}
|
|
5917
6101
|
}, index);
|
|
@@ -5927,11 +6111,10 @@ const HeatmapLegend = ({ steps = 5, lessLabel, moreLabel }) => {
|
|
|
5927
6111
|
};
|
|
5928
6112
|
//#endregion
|
|
5929
6113
|
//#region src/charts/heatmap-chart/heatmap-chart.tsx
|
|
5930
|
-
const HeatmapContext = createContext(null);
|
|
5931
6114
|
const CELL_MIX_FLOOR = .15;
|
|
5932
6115
|
const HeatmapChartInternal = ({ data, chartId: providedChartId, width = 0, height = 0, className, compact = false, showValues, rowLabels = [], primaryColor, gap = "md", withTooltips = false, renderTooltip, children }) => {
|
|
5933
6116
|
const chartId = useChartId(providedChartId);
|
|
5934
|
-
const { getElementStyles, theme } = useGlobalChartsContext();
|
|
6117
|
+
const { getElementStyles, resolveThemeColor, theme } = useGlobalChartsContext();
|
|
5935
6118
|
const { heatmapChart: heatmapChartSettings } = theme;
|
|
5936
6119
|
const { nonLegendChildren } = useChartChildren(children, "HeatmapChart");
|
|
5937
6120
|
const [selectedIndex, setSelectedIndex] = useState();
|
|
@@ -5946,8 +6129,9 @@ const HeatmapChartInternal = ({ data, chartId: providedChartId, width = 0, heigh
|
|
|
5946
6129
|
index: 0,
|
|
5947
6130
|
overrideColor: primaryColor || heatmapChartSettings.primaryColor
|
|
5948
6131
|
});
|
|
6132
|
+
const chartBackgroundHex = resolveThemeColor(theme.backgroundColor);
|
|
5949
6133
|
const primaryHex = normalizeColorToHex(primaryColorHex);
|
|
5950
|
-
const cellHasLightText = (intensity) => isValidHexColor(primaryHex) && prefersLightText(
|
|
6134
|
+
const cellHasLightText = (intensity) => isValidHexColor(primaryHex) && isValidHexColor(chartBackgroundHex) && prefersLightText(mixHexColors(primaryHex, chartBackgroundHex, 1 - (CELL_MIX_FLOOR + (1 - CELL_MIX_FLOOR) * intensity)));
|
|
5951
6135
|
const extent = useMemo(() => getValueExtent(data), [data]);
|
|
5952
6136
|
const heatmapContext = useMemo(() => ({
|
|
5953
6137
|
extent,
|
|
@@ -6061,6 +6245,7 @@ const HeatmapChartInternal = ({ data, chartId: providedChartId, width = 0, heigh
|
|
|
6061
6245
|
const trackSize = compact ? "var(--heatmap-cell-size)" : "minmax(0, 1fr)";
|
|
6062
6246
|
const gridStyle = {
|
|
6063
6247
|
"--heatmap-primary": primaryColorHex,
|
|
6248
|
+
"--heatmap-bg": theme.backgroundColor,
|
|
6064
6249
|
gridTemplateColumns: `auto repeat(${columns}, ${trackSize})`,
|
|
6065
6250
|
gridTemplateRows: `auto repeat(${rows}, ${trackSize})`
|
|
6066
6251
|
};
|
|
@@ -6096,55 +6281,55 @@ const HeatmapChartInternal = ({ data, chartId: providedChartId, width = 0, heigh
|
|
|
6096
6281
|
onKeyDown: onChartKeyDown,
|
|
6097
6282
|
className: clsx(heatmap_chart_module_default["heatmap-chart__grid"], { [heatmap_chart_module_default["heatmap-chart__grid--compact"]]: compact }),
|
|
6098
6283
|
style: gridStyle,
|
|
6099
|
-
children: [
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6284
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
6285
|
+
role: "row",
|
|
6286
|
+
"aria-hidden": "true",
|
|
6287
|
+
className: heatmap_chart_module_default["heatmap-chart__row"],
|
|
6288
|
+
children: [/* @__PURE__ */ jsx("span", {}), data.map((column, columnIndex) => /* @__PURE__ */ jsx("span", {
|
|
6103
6289
|
className: heatmap_chart_module_default["heatmap-chart__col-label"],
|
|
6104
6290
|
children: column.label
|
|
6105
|
-
}, `col-${columnIndex}`))
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
]
|
|
6291
|
+
}, `col-${columnIndex}`))]
|
|
6292
|
+
}), Array.from({ length: rows }).map((_row, rowIndex) => {
|
|
6293
|
+
const labelVisible = !compact || rowIndex % 2 === 0;
|
|
6294
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6295
|
+
role: "row",
|
|
6296
|
+
"aria-rowindex": rowIndex + 1,
|
|
6297
|
+
className: heatmap_chart_module_default["heatmap-chart__row"],
|
|
6298
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
6299
|
+
"aria-hidden": "true",
|
|
6300
|
+
className: heatmap_chart_module_default["heatmap-chart__row-label"],
|
|
6301
|
+
children: labelVisible ? rowLabels[rowIndex] ?? "" : ""
|
|
6302
|
+
}), data.map((column, columnIndex) => {
|
|
6303
|
+
const value = column.data[rowIndex]?.value ?? null;
|
|
6304
|
+
const present = isPresent(value);
|
|
6305
|
+
const normalized = present ? getNormalizedValue(value, extent) : 0;
|
|
6306
|
+
const flatIndex = columnIndex * rows + rowIndex;
|
|
6307
|
+
const info = buildTooltipData(columnIndex, rowIndex);
|
|
6308
|
+
const accessibleLabel = `${info.cellLabel || `${info.columnLabel ?? ""} ${info.rowLabel ?? ""}`.trim()}: ${info.value === null ? __("No data", "jetpack-charts") : formatNumber(info.value)}`;
|
|
6309
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6310
|
+
id: `${chartId}-cell-${columnIndex}-${rowIndex}`,
|
|
6311
|
+
role: "gridcell",
|
|
6312
|
+
tabIndex: -1,
|
|
6313
|
+
"aria-colindex": columnIndex + 1,
|
|
6314
|
+
"aria-label": accessibleLabel,
|
|
6315
|
+
"data-column": columnIndex,
|
|
6316
|
+
"data-row": rowIndex,
|
|
6317
|
+
className: clsx(heatmap_chart_module_default["heatmap-chart__cell"], {
|
|
6318
|
+
[heatmap_chart_module_default["heatmap-chart__cell--filled"]]: present,
|
|
6319
|
+
[heatmap_chart_module_default["heatmap-chart__cell--strong"]]: present && cellHasLightText(normalized),
|
|
6320
|
+
[heatmap_chart_module_default["heatmap-chart__cell--selected"]]: selectedIndex === flatIndex
|
|
6321
|
+
}),
|
|
6322
|
+
style: present ? { "--intensity": normalized } : void 0,
|
|
6323
|
+
onMouseMove: handleCellMouseMove,
|
|
6324
|
+
onMouseLeave: handleCellMouseLeave,
|
|
6325
|
+
children: drawValues && present && /* @__PURE__ */ jsx("span", {
|
|
6326
|
+
className: heatmap_chart_module_default["heatmap-chart__cell-value"],
|
|
6327
|
+
children: formatNumberCompact(value)
|
|
6328
|
+
})
|
|
6329
|
+
}, `cell-${columnIndex}-${rowIndex}`);
|
|
6330
|
+
})]
|
|
6331
|
+
}, `row-${rowIndex}`);
|
|
6332
|
+
})]
|
|
6148
6333
|
}), withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */ jsx(TooltipInPortal, {
|
|
6149
6334
|
top: tooltipTop,
|
|
6150
6335
|
left: tooltipLeft,
|
|
@@ -6172,457 +6357,171 @@ const HeatmapChartResponsiveInner = (props) => /* @__PURE__ */ jsx(HeatmapChartW
|
|
|
6172
6357
|
HeatmapChartResponsiveInner.displayName = "HeatmapChart";
|
|
6173
6358
|
const HeatmapChartResponsive = attachSubComponents(withResponsive(HeatmapChartResponsiveInner), { Legend: HeatmapLegend });
|
|
6174
6359
|
//#endregion
|
|
6175
|
-
//#region ../../../node_modules/.pnpm/@wordpress+
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
}
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
console.warn(message);
|
|
6186
|
-
try {
|
|
6187
|
-
throw Error(message);
|
|
6188
|
-
} catch {}
|
|
6189
|
-
logged.add(message);
|
|
6360
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
6361
|
+
function useUpdateEffect(effect, deps) {
|
|
6362
|
+
const mountedRef = useRef$1(false);
|
|
6363
|
+
useEffect$1(() => {
|
|
6364
|
+
if (mountedRef.current) return effect();
|
|
6365
|
+
mountedRef.current = true;
|
|
6366
|
+
}, deps);
|
|
6367
|
+
useEffect$1(() => () => {
|
|
6368
|
+
mountedRef.current = false;
|
|
6369
|
+
}, []);
|
|
6190
6370
|
}
|
|
6371
|
+
var use_update_effect_default = useUpdateEffect;
|
|
6191
6372
|
//#endregion
|
|
6192
|
-
//#region ../../../node_modules/.pnpm/@
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
//#region ../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js
|
|
6198
|
-
/**
|
|
6199
|
-
* Lower case as a function.
|
|
6200
|
-
*/
|
|
6201
|
-
function lowerCase(str) {
|
|
6202
|
-
return str.toLowerCase();
|
|
6373
|
+
//#region ../../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
6374
|
+
function sheetForTag(tag) {
|
|
6375
|
+
if (tag.sheet) return tag.sheet;
|
|
6376
|
+
/* istanbul ignore next */
|
|
6377
|
+
for (var i = 0; i < document.styleSheets.length; i++) if (document.styleSheets[i].ownerNode === tag) return document.styleSheets[i];
|
|
6203
6378
|
}
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
function noCase(input, options) {
|
|
6212
|
-
if (options === void 0) options = {};
|
|
6213
|
-
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
6214
|
-
var result = replace$1(replace$1(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
6215
|
-
var start = 0;
|
|
6216
|
-
var end = result.length;
|
|
6217
|
-
while (result.charAt(start) === "\0") start++;
|
|
6218
|
-
while (result.charAt(end - 1) === "\0") end--;
|
|
6219
|
-
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
6220
|
-
}
|
|
6221
|
-
/**
|
|
6222
|
-
* Replace `re` in the input string with the replacement value.
|
|
6223
|
-
*/
|
|
6224
|
-
function replace$1(input, re, value) {
|
|
6225
|
-
if (re instanceof RegExp) return input.replace(re, value);
|
|
6226
|
-
return re.reduce(function(input, re) {
|
|
6227
|
-
return input.replace(re, value);
|
|
6228
|
-
}, input);
|
|
6379
|
+
function createStyleElement(options) {
|
|
6380
|
+
var tag = document.createElement("style");
|
|
6381
|
+
tag.setAttribute("data-emotion", options.key);
|
|
6382
|
+
if (options.nonce !== void 0) tag.setAttribute("nonce", options.nonce);
|
|
6383
|
+
tag.appendChild(document.createTextNode(""));
|
|
6384
|
+
tag.setAttribute("data-s", "");
|
|
6385
|
+
return tag;
|
|
6229
6386
|
}
|
|
6387
|
+
var StyleSheet = /*#__PURE__*/ function() {
|
|
6388
|
+
function StyleSheet(options) {
|
|
6389
|
+
var _this = this;
|
|
6390
|
+
this._insertTag = function(tag) {
|
|
6391
|
+
var before;
|
|
6392
|
+
if (_this.tags.length === 0) if (_this.insertionPoint) before = _this.insertionPoint.nextSibling;
|
|
6393
|
+
else if (_this.prepend) before = _this.container.firstChild;
|
|
6394
|
+
else before = _this.before;
|
|
6395
|
+
else before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
6396
|
+
_this.container.insertBefore(tag, before);
|
|
6397
|
+
_this.tags.push(tag);
|
|
6398
|
+
};
|
|
6399
|
+
this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
|
|
6400
|
+
this.tags = [];
|
|
6401
|
+
this.ctr = 0;
|
|
6402
|
+
this.nonce = options.nonce;
|
|
6403
|
+
this.key = options.key;
|
|
6404
|
+
this.container = options.container;
|
|
6405
|
+
this.prepend = options.prepend;
|
|
6406
|
+
this.insertionPoint = options.insertionPoint;
|
|
6407
|
+
this.before = null;
|
|
6408
|
+
}
|
|
6409
|
+
var _proto = StyleSheet.prototype;
|
|
6410
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
6411
|
+
nodes.forEach(this._insertTag);
|
|
6412
|
+
};
|
|
6413
|
+
_proto.insert = function insert(rule) {
|
|
6414
|
+
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) this._insertTag(createStyleElement(this));
|
|
6415
|
+
var tag = this.tags[this.tags.length - 1];
|
|
6416
|
+
if (this.isSpeedy) {
|
|
6417
|
+
var sheet = sheetForTag(tag);
|
|
6418
|
+
try {
|
|
6419
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
6420
|
+
} catch (e) {}
|
|
6421
|
+
} else tag.appendChild(document.createTextNode(rule));
|
|
6422
|
+
this.ctr++;
|
|
6423
|
+
};
|
|
6424
|
+
_proto.flush = function flush() {
|
|
6425
|
+
this.tags.forEach(function(tag) {
|
|
6426
|
+
var _tag$parentNode;
|
|
6427
|
+
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
6428
|
+
});
|
|
6429
|
+
this.tags = [];
|
|
6430
|
+
this.ctr = 0;
|
|
6431
|
+
};
|
|
6432
|
+
return StyleSheet;
|
|
6433
|
+
}();
|
|
6230
6434
|
//#endregion
|
|
6231
|
-
//#region ../../../node_modules/.pnpm/
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6435
|
+
//#region ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
|
|
6436
|
+
var MS = "-ms-";
|
|
6437
|
+
var MOZ = "-moz-";
|
|
6438
|
+
var WEBKIT = "-webkit-";
|
|
6439
|
+
var COMMENT = "comm";
|
|
6440
|
+
var RULESET = "rule";
|
|
6441
|
+
var DECLARATION = "decl";
|
|
6442
|
+
var IMPORT = "@import";
|
|
6443
|
+
var KEYFRAMES = "@keyframes";
|
|
6444
|
+
var LAYER = "@layer";
|
|
6236
6445
|
//#endregion
|
|
6237
|
-
//#region ../../../node_modules/.pnpm/
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6446
|
+
//#region ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
|
|
6447
|
+
/**
|
|
6448
|
+
* @param {number}
|
|
6449
|
+
* @return {number}
|
|
6450
|
+
*/
|
|
6451
|
+
var abs = Math.abs;
|
|
6452
|
+
/**
|
|
6453
|
+
* @param {number}
|
|
6454
|
+
* @return {string}
|
|
6455
|
+
*/
|
|
6456
|
+
var from = String.fromCharCode;
|
|
6457
|
+
/**
|
|
6458
|
+
* @param {object}
|
|
6459
|
+
* @return {object}
|
|
6460
|
+
*/
|
|
6461
|
+
var assign = Object.assign;
|
|
6462
|
+
/**
|
|
6463
|
+
* @param {string} value
|
|
6464
|
+
* @param {number} length
|
|
6465
|
+
* @return {number}
|
|
6466
|
+
*/
|
|
6467
|
+
function hash(value, length) {
|
|
6468
|
+
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
6241
6469
|
}
|
|
6242
|
-
//#endregion
|
|
6243
|
-
//#region ../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js
|
|
6244
6470
|
/**
|
|
6245
|
-
*
|
|
6246
|
-
*
|
|
6247
|
-
* @typedef MemizeOptions
|
|
6248
|
-
*
|
|
6249
|
-
* @property {number} [maxSize] Maximum size of the cache.
|
|
6471
|
+
* @param {string} value
|
|
6472
|
+
* @return {string}
|
|
6250
6473
|
*/
|
|
6474
|
+
function trim(value) {
|
|
6475
|
+
return value.trim();
|
|
6476
|
+
}
|
|
6251
6477
|
/**
|
|
6252
|
-
*
|
|
6253
|
-
*
|
|
6254
|
-
* @
|
|
6255
|
-
*
|
|
6256
|
-
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
|
|
6257
|
-
* @property {?MemizeCacheNode|undefined} [next] Next node.
|
|
6258
|
-
* @property {Array<*>} args Function arguments for cache
|
|
6259
|
-
* entry.
|
|
6260
|
-
* @property {*} val Function result.
|
|
6478
|
+
* @param {string} value
|
|
6479
|
+
* @param {RegExp} pattern
|
|
6480
|
+
* @return {string?}
|
|
6261
6481
|
*/
|
|
6482
|
+
function match(value, pattern) {
|
|
6483
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
6484
|
+
}
|
|
6262
6485
|
/**
|
|
6263
|
-
*
|
|
6264
|
-
*
|
|
6265
|
-
* @
|
|
6266
|
-
*
|
|
6267
|
-
* @property {()=>void} clear Clear the cache.
|
|
6486
|
+
* @param {string} value
|
|
6487
|
+
* @param {(string|RegExp)} pattern
|
|
6488
|
+
* @param {string} replacement
|
|
6489
|
+
* @return {string}
|
|
6268
6490
|
*/
|
|
6491
|
+
function replace(value, pattern, replacement) {
|
|
6492
|
+
return value.replace(pattern, replacement);
|
|
6493
|
+
}
|
|
6269
6494
|
/**
|
|
6270
|
-
*
|
|
6271
|
-
*
|
|
6272
|
-
*
|
|
6273
|
-
* @template {(...args: any[]) => any} F
|
|
6274
|
-
*
|
|
6275
|
-
* @param {F} fn Function to memoize.
|
|
6276
|
-
* @param {MemizeOptions} [options] Options object.
|
|
6277
|
-
*
|
|
6278
|
-
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
|
|
6495
|
+
* @param {string} value
|
|
6496
|
+
* @param {string} search
|
|
6497
|
+
* @return {number}
|
|
6279
6498
|
*/
|
|
6280
|
-
function
|
|
6281
|
-
|
|
6282
|
-
/** @type {?MemizeCacheNode|undefined} */
|
|
6283
|
-
var head;
|
|
6284
|
-
/** @type {?MemizeCacheNode|undefined} */
|
|
6285
|
-
var tail;
|
|
6286
|
-
options = options || {};
|
|
6287
|
-
function memoized() {
|
|
6288
|
-
var node = head, len = arguments.length, args, i;
|
|
6289
|
-
searchCache: while (node) {
|
|
6290
|
-
if (node.args.length !== arguments.length) {
|
|
6291
|
-
node = node.next;
|
|
6292
|
-
continue;
|
|
6293
|
-
}
|
|
6294
|
-
for (i = 0; i < len; i++) if (node.args[i] !== arguments[i]) {
|
|
6295
|
-
node = node.next;
|
|
6296
|
-
continue searchCache;
|
|
6297
|
-
}
|
|
6298
|
-
if (node !== head) {
|
|
6299
|
-
if (node === tail) tail = node.prev;
|
|
6300
|
-
/** @type {MemizeCacheNode} */ node.prev.next = node.next;
|
|
6301
|
-
if (node.next) node.next.prev = node.prev;
|
|
6302
|
-
node.next = head;
|
|
6303
|
-
node.prev = null;
|
|
6304
|
-
/** @type {MemizeCacheNode} */ head.prev = node;
|
|
6305
|
-
head = node;
|
|
6306
|
-
}
|
|
6307
|
-
return node.val;
|
|
6308
|
-
}
|
|
6309
|
-
args = new Array(len);
|
|
6310
|
-
for (i = 0; i < len; i++) args[i] = arguments[i];
|
|
6311
|
-
node = {
|
|
6312
|
-
args,
|
|
6313
|
-
val: fn.apply(null, args)
|
|
6314
|
-
};
|
|
6315
|
-
if (head) {
|
|
6316
|
-
head.prev = node;
|
|
6317
|
-
node.next = head;
|
|
6318
|
-
} else tail = node;
|
|
6319
|
-
if (size === options.maxSize) {
|
|
6320
|
-
tail = tail.prev;
|
|
6321
|
-
/** @type {MemizeCacheNode} */ tail.next = null;
|
|
6322
|
-
} else size++;
|
|
6323
|
-
head = node;
|
|
6324
|
-
return node.val;
|
|
6325
|
-
}
|
|
6326
|
-
memoized.clear = function() {
|
|
6327
|
-
head = null;
|
|
6328
|
-
tail = null;
|
|
6329
|
-
size = 0;
|
|
6330
|
-
};
|
|
6331
|
-
return memoized;
|
|
6499
|
+
function indexof(value, search) {
|
|
6500
|
+
return value.indexOf(search);
|
|
6332
6501
|
}
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6502
|
+
/**
|
|
6503
|
+
* @param {string} value
|
|
6504
|
+
* @param {number} index
|
|
6505
|
+
* @return {number}
|
|
6506
|
+
*/
|
|
6507
|
+
function charat(value, index) {
|
|
6508
|
+
return value.charCodeAt(index) | 0;
|
|
6337
6509
|
}
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6510
|
+
/**
|
|
6511
|
+
* @param {string} value
|
|
6512
|
+
* @param {number} begin
|
|
6513
|
+
* @param {number} end
|
|
6514
|
+
* @return {string}
|
|
6515
|
+
*/
|
|
6516
|
+
function substr(value, begin, end) {
|
|
6517
|
+
return value.slice(begin, end);
|
|
6343
6518
|
}
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
return Object.assign(WrappedComponent, {
|
|
6351
|
-
[CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],
|
|
6352
|
-
displayName: namespace,
|
|
6353
|
-
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
6354
|
-
});
|
|
6355
|
-
}
|
|
6356
|
-
//#endregion
|
|
6357
|
-
//#region ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js
|
|
6358
|
-
var require_es6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6359
|
-
module.exports = function equal(a, b) {
|
|
6360
|
-
if (a === b) return true;
|
|
6361
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
6362
|
-
if (a.constructor !== b.constructor) return false;
|
|
6363
|
-
var length, i, keys;
|
|
6364
|
-
if (Array.isArray(a)) {
|
|
6365
|
-
length = a.length;
|
|
6366
|
-
if (length != b.length) return false;
|
|
6367
|
-
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
6368
|
-
return true;
|
|
6369
|
-
}
|
|
6370
|
-
if (a instanceof Map && b instanceof Map) {
|
|
6371
|
-
if (a.size !== b.size) return false;
|
|
6372
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
6373
|
-
for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
|
|
6374
|
-
return true;
|
|
6375
|
-
}
|
|
6376
|
-
if (a instanceof Set && b instanceof Set) {
|
|
6377
|
-
if (a.size !== b.size) return false;
|
|
6378
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
6379
|
-
return true;
|
|
6380
|
-
}
|
|
6381
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
6382
|
-
length = a.length;
|
|
6383
|
-
if (length != b.length) return false;
|
|
6384
|
-
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
6385
|
-
return true;
|
|
6386
|
-
}
|
|
6387
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
6388
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
6389
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
6390
|
-
keys = Object.keys(a);
|
|
6391
|
-
length = keys.length;
|
|
6392
|
-
if (length !== Object.keys(b).length) return false;
|
|
6393
|
-
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
6394
|
-
for (i = length; i-- !== 0;) {
|
|
6395
|
-
var key = keys[i];
|
|
6396
|
-
if (!equal(a[key], b[key])) return false;
|
|
6397
|
-
}
|
|
6398
|
-
return true;
|
|
6399
|
-
}
|
|
6400
|
-
return a !== a && b !== b;
|
|
6401
|
-
};
|
|
6402
|
-
}));
|
|
6403
|
-
//#endregion
|
|
6404
|
-
//#region ../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
6405
|
-
/*!
|
|
6406
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
6407
|
-
*
|
|
6408
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6409
|
-
* Released under the MIT License.
|
|
6410
|
-
*/
|
|
6411
|
-
function isObject(o) {
|
|
6412
|
-
return Object.prototype.toString.call(o) === "[object Object]";
|
|
6413
|
-
}
|
|
6414
|
-
function isPlainObject(o) {
|
|
6415
|
-
var ctor, prot;
|
|
6416
|
-
if (isObject(o) === false) return false;
|
|
6417
|
-
ctor = o.constructor;
|
|
6418
|
-
if (ctor === void 0) return true;
|
|
6419
|
-
prot = ctor.prototype;
|
|
6420
|
-
if (isObject(prot) === false) return false;
|
|
6421
|
-
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
6422
|
-
return true;
|
|
6423
|
-
}
|
|
6424
|
-
//#endregion
|
|
6425
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
6426
|
-
function useUpdateEffect(effect, deps) {
|
|
6427
|
-
const mountedRef = useRef$1(false);
|
|
6428
|
-
useEffect$1(() => {
|
|
6429
|
-
if (mountedRef.current) return effect();
|
|
6430
|
-
mountedRef.current = true;
|
|
6431
|
-
}, deps);
|
|
6432
|
-
useEffect$1(() => () => {
|
|
6433
|
-
mountedRef.current = false;
|
|
6434
|
-
}, []);
|
|
6435
|
-
}
|
|
6436
|
-
var use_update_effect_default = useUpdateEffect;
|
|
6437
|
-
//#endregion
|
|
6438
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
6439
|
-
var import_es6 = /* @__PURE__ */ __toESM(require_es6(), 1);
|
|
6440
|
-
var ComponentsContext = createContext$1(
|
|
6441
|
-
/** @type {Record<string, any>} */
|
|
6442
|
-
{}
|
|
6443
|
-
);
|
|
6444
|
-
ComponentsContext.displayName = "ComponentsContext";
|
|
6445
|
-
var useComponentsContext = () => useContext$1(ComponentsContext);
|
|
6446
|
-
function useContextSystemBridge({ value }) {
|
|
6447
|
-
const parentContext = useComponentsContext();
|
|
6448
|
-
const valueRef = useRef$1(value);
|
|
6449
|
-
use_update_effect_default(() => {
|
|
6450
|
-
if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) globalThis.SCRIPT_DEBUG === true && warning(`Please memoize your context: ${JSON.stringify(value)}`);
|
|
6451
|
-
}, [value]);
|
|
6452
|
-
return useMemo$1(() => {
|
|
6453
|
-
return deepmerge(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
|
|
6454
|
-
}, [parentContext, value]);
|
|
6455
|
-
}
|
|
6456
|
-
var BaseContextSystemProvider = ({ children, value }) => {
|
|
6457
|
-
const contextValue = useContextSystemBridge({ value });
|
|
6458
|
-
return /* @__PURE__ */ jsx(ComponentsContext.Provider, {
|
|
6459
|
-
value: contextValue,
|
|
6460
|
-
children
|
|
6461
|
-
});
|
|
6462
|
-
};
|
|
6463
|
-
memo(BaseContextSystemProvider);
|
|
6464
|
-
//#endregion
|
|
6465
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
6466
|
-
function getNamespace(componentName) {
|
|
6467
|
-
return { [COMPONENT_NAMESPACE]: componentName };
|
|
6468
|
-
}
|
|
6469
|
-
function getConnectedNamespace() {
|
|
6470
|
-
return { [CONNECTED_NAMESPACE]: true };
|
|
6471
|
-
}
|
|
6472
|
-
//#endregion
|
|
6473
|
-
//#region ../../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
6474
|
-
var isDevelopment$3 = false;
|
|
6475
|
-
function sheetForTag(tag) {
|
|
6476
|
-
if (tag.sheet) return tag.sheet;
|
|
6477
|
-
/* istanbul ignore next */
|
|
6478
|
-
for (var i = 0; i < document.styleSheets.length; i++) if (document.styleSheets[i].ownerNode === tag) return document.styleSheets[i];
|
|
6479
|
-
}
|
|
6480
|
-
function createStyleElement(options) {
|
|
6481
|
-
var tag = document.createElement("style");
|
|
6482
|
-
tag.setAttribute("data-emotion", options.key);
|
|
6483
|
-
if (options.nonce !== void 0) tag.setAttribute("nonce", options.nonce);
|
|
6484
|
-
tag.appendChild(document.createTextNode(""));
|
|
6485
|
-
tag.setAttribute("data-s", "");
|
|
6486
|
-
return tag;
|
|
6487
|
-
}
|
|
6488
|
-
var StyleSheet = /*#__PURE__*/ function() {
|
|
6489
|
-
function StyleSheet(options) {
|
|
6490
|
-
var _this = this;
|
|
6491
|
-
this._insertTag = function(tag) {
|
|
6492
|
-
var before;
|
|
6493
|
-
if (_this.tags.length === 0) if (_this.insertionPoint) before = _this.insertionPoint.nextSibling;
|
|
6494
|
-
else if (_this.prepend) before = _this.container.firstChild;
|
|
6495
|
-
else before = _this.before;
|
|
6496
|
-
else before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
6497
|
-
_this.container.insertBefore(tag, before);
|
|
6498
|
-
_this.tags.push(tag);
|
|
6499
|
-
};
|
|
6500
|
-
this.isSpeedy = options.speedy === void 0 ? !isDevelopment$3 : options.speedy;
|
|
6501
|
-
this.tags = [];
|
|
6502
|
-
this.ctr = 0;
|
|
6503
|
-
this.nonce = options.nonce;
|
|
6504
|
-
this.key = options.key;
|
|
6505
|
-
this.container = options.container;
|
|
6506
|
-
this.prepend = options.prepend;
|
|
6507
|
-
this.insertionPoint = options.insertionPoint;
|
|
6508
|
-
this.before = null;
|
|
6509
|
-
}
|
|
6510
|
-
var _proto = StyleSheet.prototype;
|
|
6511
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
6512
|
-
nodes.forEach(this._insertTag);
|
|
6513
|
-
};
|
|
6514
|
-
_proto.insert = function insert(rule) {
|
|
6515
|
-
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) this._insertTag(createStyleElement(this));
|
|
6516
|
-
var tag = this.tags[this.tags.length - 1];
|
|
6517
|
-
if (this.isSpeedy) {
|
|
6518
|
-
var sheet = sheetForTag(tag);
|
|
6519
|
-
try {
|
|
6520
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
6521
|
-
} catch (e) {}
|
|
6522
|
-
} else tag.appendChild(document.createTextNode(rule));
|
|
6523
|
-
this.ctr++;
|
|
6524
|
-
};
|
|
6525
|
-
_proto.flush = function flush() {
|
|
6526
|
-
this.tags.forEach(function(tag) {
|
|
6527
|
-
var _tag$parentNode;
|
|
6528
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
6529
|
-
});
|
|
6530
|
-
this.tags = [];
|
|
6531
|
-
this.ctr = 0;
|
|
6532
|
-
};
|
|
6533
|
-
return StyleSheet;
|
|
6534
|
-
}();
|
|
6535
|
-
//#endregion
|
|
6536
|
-
//#region ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
|
|
6537
|
-
var MS = "-ms-";
|
|
6538
|
-
var MOZ = "-moz-";
|
|
6539
|
-
var WEBKIT = "-webkit-";
|
|
6540
|
-
var COMMENT = "comm";
|
|
6541
|
-
var RULESET = "rule";
|
|
6542
|
-
var DECLARATION = "decl";
|
|
6543
|
-
var IMPORT = "@import";
|
|
6544
|
-
var KEYFRAMES = "@keyframes";
|
|
6545
|
-
var LAYER = "@layer";
|
|
6546
|
-
//#endregion
|
|
6547
|
-
//#region ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
|
|
6548
|
-
/**
|
|
6549
|
-
* @param {number}
|
|
6550
|
-
* @return {number}
|
|
6551
|
-
*/
|
|
6552
|
-
var abs = Math.abs;
|
|
6553
|
-
/**
|
|
6554
|
-
* @param {number}
|
|
6555
|
-
* @return {string}
|
|
6556
|
-
*/
|
|
6557
|
-
var from = String.fromCharCode;
|
|
6558
|
-
/**
|
|
6559
|
-
* @param {object}
|
|
6560
|
-
* @return {object}
|
|
6561
|
-
*/
|
|
6562
|
-
var assign = Object.assign;
|
|
6563
|
-
/**
|
|
6564
|
-
* @param {string} value
|
|
6565
|
-
* @param {number} length
|
|
6566
|
-
* @return {number}
|
|
6567
|
-
*/
|
|
6568
|
-
function hash(value, length) {
|
|
6569
|
-
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
6570
|
-
}
|
|
6571
|
-
/**
|
|
6572
|
-
* @param {string} value
|
|
6573
|
-
* @return {string}
|
|
6574
|
-
*/
|
|
6575
|
-
function trim(value) {
|
|
6576
|
-
return value.trim();
|
|
6577
|
-
}
|
|
6578
|
-
/**
|
|
6579
|
-
* @param {string} value
|
|
6580
|
-
* @param {RegExp} pattern
|
|
6581
|
-
* @return {string?}
|
|
6582
|
-
*/
|
|
6583
|
-
function match(value, pattern) {
|
|
6584
|
-
return (value = pattern.exec(value)) ? value[0] : value;
|
|
6585
|
-
}
|
|
6586
|
-
/**
|
|
6587
|
-
* @param {string} value
|
|
6588
|
-
* @param {(string|RegExp)} pattern
|
|
6589
|
-
* @param {string} replacement
|
|
6590
|
-
* @return {string}
|
|
6591
|
-
*/
|
|
6592
|
-
function replace(value, pattern, replacement) {
|
|
6593
|
-
return value.replace(pattern, replacement);
|
|
6594
|
-
}
|
|
6595
|
-
/**
|
|
6596
|
-
* @param {string} value
|
|
6597
|
-
* @param {string} search
|
|
6598
|
-
* @return {number}
|
|
6599
|
-
*/
|
|
6600
|
-
function indexof(value, search) {
|
|
6601
|
-
return value.indexOf(search);
|
|
6602
|
-
}
|
|
6603
|
-
/**
|
|
6604
|
-
* @param {string} value
|
|
6605
|
-
* @param {number} index
|
|
6606
|
-
* @return {number}
|
|
6607
|
-
*/
|
|
6608
|
-
function charat(value, index) {
|
|
6609
|
-
return value.charCodeAt(index) | 0;
|
|
6610
|
-
}
|
|
6611
|
-
/**
|
|
6612
|
-
* @param {string} value
|
|
6613
|
-
* @param {number} begin
|
|
6614
|
-
* @param {number} end
|
|
6615
|
-
* @return {string}
|
|
6616
|
-
*/
|
|
6617
|
-
function substr(value, begin, end) {
|
|
6618
|
-
return value.slice(begin, end);
|
|
6619
|
-
}
|
|
6620
|
-
/**
|
|
6621
|
-
* @param {string} value
|
|
6622
|
-
* @return {number}
|
|
6623
|
-
*/
|
|
6624
|
-
function strlen(value) {
|
|
6625
|
-
return value.length;
|
|
6519
|
+
/**
|
|
6520
|
+
* @param {string} value
|
|
6521
|
+
* @return {number}
|
|
6522
|
+
*/
|
|
6523
|
+
function strlen(value) {
|
|
6524
|
+
return value.length;
|
|
6626
6525
|
}
|
|
6627
6526
|
/**
|
|
6628
6527
|
* @param {any[]} value
|
|
@@ -7293,7 +7192,25 @@ var createCache = function createCache(options) {
|
|
|
7293
7192
|
* LICENSE file in the root directory of this source tree.
|
|
7294
7193
|
*/
|
|
7295
7194
|
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7296
|
-
var b = "function" === typeof Symbol && Symbol.for
|
|
7195
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
7196
|
+
var c = b ? Symbol.for("react.element") : 60103;
|
|
7197
|
+
var d = b ? Symbol.for("react.portal") : 60106;
|
|
7198
|
+
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
7199
|
+
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
7200
|
+
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
7201
|
+
var h = b ? Symbol.for("react.provider") : 60109;
|
|
7202
|
+
var k = b ? Symbol.for("react.context") : 60110;
|
|
7203
|
+
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
7204
|
+
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
7205
|
+
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
7206
|
+
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
7207
|
+
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
7208
|
+
var r = b ? Symbol.for("react.memo") : 60115;
|
|
7209
|
+
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
7210
|
+
var v = b ? Symbol.for("react.block") : 60121;
|
|
7211
|
+
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
7212
|
+
var x = b ? Symbol.for("react.responder") : 60118;
|
|
7213
|
+
var y = b ? Symbol.for("react.scope") : 60119;
|
|
7297
7214
|
function z(a) {
|
|
7298
7215
|
if ("object" === typeof a && null !== a) {
|
|
7299
7216
|
var u = a.$$typeof;
|
|
@@ -7616,7 +7533,6 @@ var require_hoist_non_react_statics_cjs = /* @__PURE__ */ __commonJSMin(((export
|
|
|
7616
7533
|
}));
|
|
7617
7534
|
//#endregion
|
|
7618
7535
|
//#region ../../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
|
|
7619
|
-
var isBrowser = true;
|
|
7620
7536
|
function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
7621
7537
|
var rawClassName = "";
|
|
7622
7538
|
classNames.split(" ").forEach(function(className) {
|
|
@@ -7627,7 +7543,7 @@ function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
|
7627
7543
|
}
|
|
7628
7544
|
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
7629
7545
|
var className = cache.key + "-" + serialized.name;
|
|
7630
|
-
if ((isStringTag === false ||
|
|
7546
|
+
if ((isStringTag === false || false) && cache.registered[className] === void 0) cache.registered[className] = serialized.styles;
|
|
7631
7547
|
};
|
|
7632
7548
|
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
7633
7549
|
registerStyles(cache, serialized, isStringTag);
|
|
@@ -7999,11 +7915,12 @@ var classnames = function classnames(args) {
|
|
|
7999
7915
|
}
|
|
8000
7916
|
}
|
|
8001
7917
|
return cls;
|
|
8002
|
-
}
|
|
8003
|
-
_createEmotion.flush;
|
|
8004
|
-
_createEmotion.hydrate;
|
|
7918
|
+
};
|
|
8005
7919
|
//#endregion
|
|
8006
7920
|
//#region ../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/dist/emotion-css.esm.js
|
|
7921
|
+
var _createEmotion = createEmotion({ key: "css" });
|
|
7922
|
+
_createEmotion.flush;
|
|
7923
|
+
_createEmotion.hydrate;
|
|
8007
7924
|
var cx = _createEmotion.cx;
|
|
8008
7925
|
_createEmotion.merge;
|
|
8009
7926
|
_createEmotion.getRegisteredStyles;
|
|
@@ -8029,6 +7946,368 @@ var useCx = () => {
|
|
|
8029
7946
|
}, [cache]);
|
|
8030
7947
|
};
|
|
8031
7948
|
//#endregion
|
|
7949
|
+
//#region ../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js
|
|
7950
|
+
/**
|
|
7951
|
+
* Memize options object.
|
|
7952
|
+
*
|
|
7953
|
+
* @typedef MemizeOptions
|
|
7954
|
+
*
|
|
7955
|
+
* @property {number} [maxSize] Maximum size of the cache.
|
|
7956
|
+
*/
|
|
7957
|
+
/**
|
|
7958
|
+
* Internal cache entry.
|
|
7959
|
+
*
|
|
7960
|
+
* @typedef MemizeCacheNode
|
|
7961
|
+
*
|
|
7962
|
+
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
|
|
7963
|
+
* @property {?MemizeCacheNode|undefined} [next] Next node.
|
|
7964
|
+
* @property {Array<*>} args Function arguments for cache
|
|
7965
|
+
* entry.
|
|
7966
|
+
* @property {*} val Function result.
|
|
7967
|
+
*/
|
|
7968
|
+
/**
|
|
7969
|
+
* Properties of the enhanced function for controlling cache.
|
|
7970
|
+
*
|
|
7971
|
+
* @typedef MemizeMemoizedFunction
|
|
7972
|
+
*
|
|
7973
|
+
* @property {()=>void} clear Clear the cache.
|
|
7974
|
+
*/
|
|
7975
|
+
/**
|
|
7976
|
+
* Accepts a function to be memoized, and returns a new memoized function, with
|
|
7977
|
+
* optional options.
|
|
7978
|
+
*
|
|
7979
|
+
* @template {(...args: any[]) => any} F
|
|
7980
|
+
*
|
|
7981
|
+
* @param {F} fn Function to memoize.
|
|
7982
|
+
* @param {MemizeOptions} [options] Options object.
|
|
7983
|
+
*
|
|
7984
|
+
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
|
|
7985
|
+
*/
|
|
7986
|
+
function memize(fn, options) {
|
|
7987
|
+
var size = 0;
|
|
7988
|
+
/** @type {?MemizeCacheNode|undefined} */
|
|
7989
|
+
var head;
|
|
7990
|
+
/** @type {?MemizeCacheNode|undefined} */
|
|
7991
|
+
var tail;
|
|
7992
|
+
options = options || {};
|
|
7993
|
+
function memoized() {
|
|
7994
|
+
var node = head, len = arguments.length, args, i;
|
|
7995
|
+
searchCache: while (node) {
|
|
7996
|
+
if (node.args.length !== arguments.length) {
|
|
7997
|
+
node = node.next;
|
|
7998
|
+
continue;
|
|
7999
|
+
}
|
|
8000
|
+
for (i = 0; i < len; i++) if (node.args[i] !== arguments[i]) {
|
|
8001
|
+
node = node.next;
|
|
8002
|
+
continue searchCache;
|
|
8003
|
+
}
|
|
8004
|
+
if (node !== head) {
|
|
8005
|
+
if (node === tail) tail = node.prev;
|
|
8006
|
+
/** @type {MemizeCacheNode} */ node.prev.next = node.next;
|
|
8007
|
+
if (node.next) node.next.prev = node.prev;
|
|
8008
|
+
node.next = head;
|
|
8009
|
+
node.prev = null;
|
|
8010
|
+
/** @type {MemizeCacheNode} */ head.prev = node;
|
|
8011
|
+
head = node;
|
|
8012
|
+
}
|
|
8013
|
+
return node.val;
|
|
8014
|
+
}
|
|
8015
|
+
args = new Array(len);
|
|
8016
|
+
for (i = 0; i < len; i++) args[i] = arguments[i];
|
|
8017
|
+
node = {
|
|
8018
|
+
args,
|
|
8019
|
+
val: fn.apply(null, args)
|
|
8020
|
+
};
|
|
8021
|
+
if (head) {
|
|
8022
|
+
head.prev = node;
|
|
8023
|
+
node.next = head;
|
|
8024
|
+
} else tail = node;
|
|
8025
|
+
if (size === options.maxSize) {
|
|
8026
|
+
tail = tail.prev;
|
|
8027
|
+
/** @type {MemizeCacheNode} */ tail.next = null;
|
|
8028
|
+
} else size++;
|
|
8029
|
+
head = node;
|
|
8030
|
+
return node.val;
|
|
8031
|
+
}
|
|
8032
|
+
memoized.clear = function() {
|
|
8033
|
+
head = null;
|
|
8034
|
+
tail = null;
|
|
8035
|
+
size = 0;
|
|
8036
|
+
};
|
|
8037
|
+
return memoized;
|
|
8038
|
+
}
|
|
8039
|
+
//#endregion
|
|
8040
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
8041
|
+
var white = "#fff";
|
|
8042
|
+
var GRAY = {
|
|
8043
|
+
900: "#1e1e1e",
|
|
8044
|
+
800: "#2f2f2f",
|
|
8045
|
+
/** Meets 4.6:1 text contrast against white. */
|
|
8046
|
+
700: "#757575",
|
|
8047
|
+
/** Meets 3:1 UI or large text contrast against white. */
|
|
8048
|
+
600: "#949494",
|
|
8049
|
+
400: "#ccc",
|
|
8050
|
+
/** Used for most borders. */
|
|
8051
|
+
300: "#ddd",
|
|
8052
|
+
/** Used sparingly for light borders. */
|
|
8053
|
+
200: "#e0e0e0",
|
|
8054
|
+
/** Used for light gray backgrounds. */
|
|
8055
|
+
100: "#f0f0f0"
|
|
8056
|
+
};
|
|
8057
|
+
var ALERT = {
|
|
8058
|
+
yellow: "#f0b849",
|
|
8059
|
+
red: "#d94f4f",
|
|
8060
|
+
green: "#4ab866"
|
|
8061
|
+
};
|
|
8062
|
+
var THEME = {
|
|
8063
|
+
accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,
|
|
8064
|
+
accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,
|
|
8065
|
+
accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,
|
|
8066
|
+
/** Used when placing text on the accent color. */
|
|
8067
|
+
accentInverted: `var(--wp-components-color-accent-inverted, var(--wpds-color-foreground-interactive-brand-strong, #fff))`,
|
|
8068
|
+
background: `var(--wp-components-color-background, var(--wpds-color-background-surface-neutral-strong, #fff))`,
|
|
8069
|
+
foreground: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8070
|
+
/** Used when placing text on the foreground color. */
|
|
8071
|
+
foregroundInverted: `var(--wp-components-color-foreground-inverted, var(--wpds-color-background-surface-neutral, #fcfcfc))`,
|
|
8072
|
+
gray: {
|
|
8073
|
+
/** @deprecated Use `COLORS.theme.foreground` instead. */
|
|
8074
|
+
900: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8075
|
+
800: `var(--wp-components-color-gray-800, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8076
|
+
700: `var(--wp-components-color-gray-700, var(--wpds-color-foreground-content-neutral-weak, #707070))`,
|
|
8077
|
+
600: `var(--wp-components-color-gray-600, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
8078
|
+
400: `var(--wp-components-color-gray-400, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
8079
|
+
300: `var(--wp-components-color-gray-300, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
8080
|
+
200: `var(--wp-components-color-gray-200, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
8081
|
+
100: `var(--wp-components-color-gray-100, var(--wpds-color-background-surface-neutral, #fcfcfc))`
|
|
8082
|
+
}
|
|
8083
|
+
};
|
|
8084
|
+
var UI = {
|
|
8085
|
+
background: THEME.background,
|
|
8086
|
+
backgroundDisabled: THEME.gray[100],
|
|
8087
|
+
border: THEME.gray[600],
|
|
8088
|
+
borderHover: THEME.gray[700],
|
|
8089
|
+
borderFocus: THEME.accent,
|
|
8090
|
+
borderDisabled: THEME.gray[400],
|
|
8091
|
+
textDisabled: THEME.gray[600],
|
|
8092
|
+
darkGrayPlaceholder: `color-mix(in srgb, ${THEME.foreground}, transparent 38%)`,
|
|
8093
|
+
lightGrayPlaceholder: `color-mix(in srgb, ${THEME.background}, transparent 35%)`
|
|
8094
|
+
};
|
|
8095
|
+
var COLORS = Object.freeze({
|
|
8096
|
+
/**
|
|
8097
|
+
* The main gray color object.
|
|
8098
|
+
*
|
|
8099
|
+
* @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.
|
|
8100
|
+
*/
|
|
8101
|
+
gray: GRAY,
|
|
8102
|
+
/**
|
|
8103
|
+
* @deprecated Prefer theme-ready variables in `COLORS.theme`.
|
|
8104
|
+
*/
|
|
8105
|
+
white,
|
|
8106
|
+
alert: ALERT,
|
|
8107
|
+
/**
|
|
8108
|
+
* Theme-ready variables with fallbacks.
|
|
8109
|
+
*
|
|
8110
|
+
* Prefer semantic aliases in `COLORS.ui` when applicable.
|
|
8111
|
+
*/
|
|
8112
|
+
theme: THEME,
|
|
8113
|
+
/**
|
|
8114
|
+
* Semantic aliases (prefer these over raw variables when applicable).
|
|
8115
|
+
*/
|
|
8116
|
+
ui: UI
|
|
8117
|
+
});
|
|
8118
|
+
//#endregion
|
|
8119
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
8120
|
+
var CONTROL_HEIGHT = "36px";
|
|
8121
|
+
var CONTROL_PROPS = {
|
|
8122
|
+
controlPaddingX: 12,
|
|
8123
|
+
controlPaddingXSmall: 8,
|
|
8124
|
+
controlPaddingXLarge: 12 * 1.3334,
|
|
8125
|
+
controlBoxShadowFocus: `0 0 0 0.5px ${COLORS.theme.accent}`,
|
|
8126
|
+
controlHeight: CONTROL_HEIGHT,
|
|
8127
|
+
controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
|
|
8128
|
+
controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
|
|
8129
|
+
controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
|
|
8130
|
+
controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
|
|
8131
|
+
};
|
|
8132
|
+
var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
8133
|
+
colorDivider: "rgba(0, 0, 0, 0.1)",
|
|
8134
|
+
colorScrollbarThumb: "rgba(0, 0, 0, 0.2)",
|
|
8135
|
+
colorScrollbarThumbHover: "rgba(0, 0, 0, 0.5)",
|
|
8136
|
+
colorScrollbarTrack: "rgba(0, 0, 0, 0.04)",
|
|
8137
|
+
elevationIntensity: 1,
|
|
8138
|
+
radiusXSmall: "1px",
|
|
8139
|
+
radiusSmall: "2px",
|
|
8140
|
+
radiusMedium: "4px",
|
|
8141
|
+
radiusLarge: "8px",
|
|
8142
|
+
radiusFull: "9999px",
|
|
8143
|
+
radiusRound: "50%",
|
|
8144
|
+
borderWidth: "1px",
|
|
8145
|
+
borderWidthFocus: "1.5px",
|
|
8146
|
+
borderWidthTab: "4px",
|
|
8147
|
+
spinnerSize: 16,
|
|
8148
|
+
fontSize: "13px",
|
|
8149
|
+
fontSizeH1: "calc(2.44 * 13px)",
|
|
8150
|
+
fontSizeH2: "calc(1.95 * 13px)",
|
|
8151
|
+
fontSizeH3: "calc(1.56 * 13px)",
|
|
8152
|
+
fontSizeH4: "calc(1.25 * 13px)",
|
|
8153
|
+
fontSizeH5: "13px",
|
|
8154
|
+
fontSizeH6: "calc(0.8 * 13px)",
|
|
8155
|
+
fontSizeInputMobile: "16px",
|
|
8156
|
+
fontSizeMobile: "15px",
|
|
8157
|
+
fontSizeSmall: "calc(0.92 * 13px)",
|
|
8158
|
+
fontSizeXSmall: "calc(0.75 * 13px)",
|
|
8159
|
+
fontLineHeightBase: "1.4",
|
|
8160
|
+
fontWeight: "normal",
|
|
8161
|
+
fontWeightMedium: "499",
|
|
8162
|
+
fontWeightHeading: "600",
|
|
8163
|
+
gridBase: "4px",
|
|
8164
|
+
elevationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,
|
|
8165
|
+
elevationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,
|
|
8166
|
+
elevationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,
|
|
8167
|
+
elevationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,
|
|
8168
|
+
surfaceBackgroundColor: COLORS.white,
|
|
8169
|
+
surfaceBackgroundSubtleColor: "#F3F3F3",
|
|
8170
|
+
surfaceBackgroundTintColor: "#F5F5F5",
|
|
8171
|
+
surfaceBorderColor: "rgba(0, 0, 0, 0.1)",
|
|
8172
|
+
surfaceBorderBoldColor: "rgba(0, 0, 0, 0.15)",
|
|
8173
|
+
surfaceBorderSubtleColor: "rgba(0, 0, 0, 0.05)",
|
|
8174
|
+
surfaceBackgroundTertiaryColor: COLORS.white,
|
|
8175
|
+
surfaceColor: COLORS.white,
|
|
8176
|
+
transitionDuration: "200ms",
|
|
8177
|
+
transitionDurationFast: "160ms",
|
|
8178
|
+
transitionDurationFaster: "120ms",
|
|
8179
|
+
transitionDurationFastest: "100ms",
|
|
8180
|
+
transitionTimingFunction: "cubic-bezier(0.08, 0.52, 0.52, 1)",
|
|
8181
|
+
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
8182
|
+
});
|
|
8183
|
+
//#endregion
|
|
8184
|
+
//#region ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js
|
|
8185
|
+
var require_es6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8186
|
+
module.exports = function equal(a, b) {
|
|
8187
|
+
if (a === b) return true;
|
|
8188
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
8189
|
+
if (a.constructor !== b.constructor) return false;
|
|
8190
|
+
var length, i, keys;
|
|
8191
|
+
if (Array.isArray(a)) {
|
|
8192
|
+
length = a.length;
|
|
8193
|
+
if (length != b.length) return false;
|
|
8194
|
+
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
8195
|
+
return true;
|
|
8196
|
+
}
|
|
8197
|
+
if (a instanceof Map && b instanceof Map) {
|
|
8198
|
+
if (a.size !== b.size) return false;
|
|
8199
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
8200
|
+
for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
|
|
8201
|
+
return true;
|
|
8202
|
+
}
|
|
8203
|
+
if (a instanceof Set && b instanceof Set) {
|
|
8204
|
+
if (a.size !== b.size) return false;
|
|
8205
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
8206
|
+
return true;
|
|
8207
|
+
}
|
|
8208
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
8209
|
+
length = a.length;
|
|
8210
|
+
if (length != b.length) return false;
|
|
8211
|
+
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
8212
|
+
return true;
|
|
8213
|
+
}
|
|
8214
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
8215
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
8216
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
8217
|
+
keys = Object.keys(a);
|
|
8218
|
+
length = keys.length;
|
|
8219
|
+
if (length !== Object.keys(b).length) return false;
|
|
8220
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
8221
|
+
for (i = length; i-- !== 0;) {
|
|
8222
|
+
var key = keys[i];
|
|
8223
|
+
if (!equal(a[key], b[key])) return false;
|
|
8224
|
+
}
|
|
8225
|
+
return true;
|
|
8226
|
+
}
|
|
8227
|
+
return a !== a && b !== b;
|
|
8228
|
+
};
|
|
8229
|
+
}));
|
|
8230
|
+
//#endregion
|
|
8231
|
+
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.50.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
8232
|
+
var logged = /* @__PURE__ */ new Set();
|
|
8233
|
+
//#endregion
|
|
8234
|
+
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.50.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
8235
|
+
function isDev() {
|
|
8236
|
+
return globalThis.SCRIPT_DEBUG === true;
|
|
8237
|
+
}
|
|
8238
|
+
function warning(message) {
|
|
8239
|
+
if (!isDev()) return;
|
|
8240
|
+
if (logged.has(message)) return;
|
|
8241
|
+
console.warn(message);
|
|
8242
|
+
try {
|
|
8243
|
+
throw Error(message);
|
|
8244
|
+
} catch {}
|
|
8245
|
+
logged.add(message);
|
|
8246
|
+
}
|
|
8247
|
+
//#endregion
|
|
8248
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
8249
|
+
var import_es6 = /* @__PURE__ */ __toESM(require_es6(), 1);
|
|
8250
|
+
var ComponentsContext = createContext$1(
|
|
8251
|
+
/** @type {Record<string, any>} */
|
|
8252
|
+
{}
|
|
8253
|
+
);
|
|
8254
|
+
ComponentsContext.displayName = "ComponentsContext";
|
|
8255
|
+
var useComponentsContext = () => useContext$1(ComponentsContext);
|
|
8256
|
+
function useContextSystemBridge({ value }) {
|
|
8257
|
+
const parentContext = useComponentsContext();
|
|
8258
|
+
const valueRef = useRef$1(value);
|
|
8259
|
+
use_update_effect_default(() => {
|
|
8260
|
+
if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) globalThis.SCRIPT_DEBUG === true && warning(`Please memoize your context: ${JSON.stringify(value)}`);
|
|
8261
|
+
}, [value]);
|
|
8262
|
+
return useMemo$1(() => {
|
|
8263
|
+
return deepmerge(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
|
|
8264
|
+
}, [parentContext, value]);
|
|
8265
|
+
}
|
|
8266
|
+
var BaseContextSystemProvider = ({ children, value }) => {
|
|
8267
|
+
const contextValue = useContextSystemBridge({ value });
|
|
8268
|
+
return /* @__PURE__ */ jsx(ComponentsContext.Provider, {
|
|
8269
|
+
value: contextValue,
|
|
8270
|
+
children
|
|
8271
|
+
});
|
|
8272
|
+
};
|
|
8273
|
+
memo(BaseContextSystemProvider);
|
|
8274
|
+
//#endregion
|
|
8275
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
8276
|
+
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
8277
|
+
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
8278
|
+
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
8279
|
+
//#endregion
|
|
8280
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
8281
|
+
function getStyledClassName(namespace) {
|
|
8282
|
+
return `components-${paramCase(namespace)}`;
|
|
8283
|
+
}
|
|
8284
|
+
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
8285
|
+
//#endregion
|
|
8286
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
8287
|
+
function contextConnect(Component, namespace) {
|
|
8288
|
+
return _contextConnect(Component, namespace, { forwardsRef: true });
|
|
8289
|
+
}
|
|
8290
|
+
function _contextConnect(Component, namespace, options) {
|
|
8291
|
+
const WrappedComponent = options?.forwardsRef ? forwardRef$1(Component) : Component;
|
|
8292
|
+
if (typeof namespace === "undefined") globalThis.SCRIPT_DEBUG === true && warning("contextConnect: Please provide a namespace");
|
|
8293
|
+
let mergedNamespace = WrappedComponent["__contextSystemKey__"] || [namespace];
|
|
8294
|
+
if (Array.isArray(namespace)) mergedNamespace = [...mergedNamespace, ...namespace];
|
|
8295
|
+
if (typeof namespace === "string") mergedNamespace = [...mergedNamespace, namespace];
|
|
8296
|
+
return Object.assign(WrappedComponent, {
|
|
8297
|
+
[CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],
|
|
8298
|
+
displayName: namespace,
|
|
8299
|
+
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
8300
|
+
});
|
|
8301
|
+
}
|
|
8302
|
+
//#endregion
|
|
8303
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
8304
|
+
function getNamespace(componentName) {
|
|
8305
|
+
return { [COMPONENT_NAMESPACE]: componentName };
|
|
8306
|
+
}
|
|
8307
|
+
function getConnectedNamespace() {
|
|
8308
|
+
return { [CONNECTED_NAMESPACE]: true };
|
|
8309
|
+
}
|
|
8310
|
+
//#endregion
|
|
8032
8311
|
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
8033
8312
|
function useContextSystem(props, namespace) {
|
|
8034
8313
|
const contextSystemProps = useComponentsContext();
|
|
@@ -8049,6 +8328,22 @@ function useContextSystem(props, namespace) {
|
|
|
8049
8328
|
return finalComponentProps;
|
|
8050
8329
|
}
|
|
8051
8330
|
//#endregion
|
|
8331
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/visually-hidden/styles.mjs
|
|
8332
|
+
var visuallyHidden = {
|
|
8333
|
+
border: 0,
|
|
8334
|
+
clip: "rect(1px, 1px, 1px, 1px)",
|
|
8335
|
+
WebkitClipPath: "inset( 50% )",
|
|
8336
|
+
clipPath: "inset( 50% )",
|
|
8337
|
+
height: "1px",
|
|
8338
|
+
margin: "-1px",
|
|
8339
|
+
overflow: "hidden",
|
|
8340
|
+
padding: 0,
|
|
8341
|
+
position: "absolute",
|
|
8342
|
+
width: "1px",
|
|
8343
|
+
wordWrap: "normal",
|
|
8344
|
+
wordBreak: "normal"
|
|
8345
|
+
};
|
|
8346
|
+
//#endregion
|
|
8052
8347
|
//#region ../../../node_modules/.pnpm/@emotion+is-prop-valid@1.4.0/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
|
|
8053
8348
|
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
8054
8349
|
var isPropValid = /* #__PURE__ */ memoize(function(prop) {
|
|
@@ -8164,7 +8459,56 @@ function UnforwardedView({ as, ...restProps }, ref) {
|
|
|
8164
8459
|
...restProps
|
|
8165
8460
|
});
|
|
8166
8461
|
}
|
|
8167
|
-
var component_default$
|
|
8462
|
+
var component_default$2 = Object.assign(forwardRef$1(UnforwardedView), { selector: ".components-view" });
|
|
8463
|
+
//#endregion
|
|
8464
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/visually-hidden/component.mjs
|
|
8465
|
+
function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
8466
|
+
const { style: styleProp, ...contextProps } = useContextSystem(props, "VisuallyHidden");
|
|
8467
|
+
return /* @__PURE__ */ jsx(component_default$2, {
|
|
8468
|
+
ref: forwardedRef,
|
|
8469
|
+
...contextProps,
|
|
8470
|
+
"data-visually-hidden": "",
|
|
8471
|
+
style: {
|
|
8472
|
+
...visuallyHidden,
|
|
8473
|
+
...styleProp || {}
|
|
8474
|
+
}
|
|
8475
|
+
});
|
|
8476
|
+
}
|
|
8477
|
+
var component_default$1 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
|
|
8478
|
+
//#endregion
|
|
8479
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
8480
|
+
var breakpoints = [
|
|
8481
|
+
"40em",
|
|
8482
|
+
"52em",
|
|
8483
|
+
"64em"
|
|
8484
|
+
];
|
|
8485
|
+
var useBreakpointIndex = (options = {}) => {
|
|
8486
|
+
const { defaultIndex = 0 } = options;
|
|
8487
|
+
if (typeof defaultIndex !== "number") throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
|
|
8488
|
+
else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);
|
|
8489
|
+
const [value, setValue] = useState$1(defaultIndex);
|
|
8490
|
+
useEffect$1(() => {
|
|
8491
|
+
const getIndex = () => breakpoints.filter((bp) => {
|
|
8492
|
+
return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
|
|
8493
|
+
}).length;
|
|
8494
|
+
const onResize = () => {
|
|
8495
|
+
const newValue = getIndex();
|
|
8496
|
+
if (value !== newValue) setValue(newValue);
|
|
8497
|
+
};
|
|
8498
|
+
onResize();
|
|
8499
|
+
if (typeof window !== "undefined") window.addEventListener("resize", onResize);
|
|
8500
|
+
return () => {
|
|
8501
|
+
if (typeof window !== "undefined") window.removeEventListener("resize", onResize);
|
|
8502
|
+
};
|
|
8503
|
+
}, [value]);
|
|
8504
|
+
return value;
|
|
8505
|
+
};
|
|
8506
|
+
function useResponsiveValue(values, options = {}) {
|
|
8507
|
+
const index = useBreakpointIndex(options);
|
|
8508
|
+
if (!Array.isArray(values) && typeof values !== "function") return values;
|
|
8509
|
+
const array = values || [];
|
|
8510
|
+
return array[index >= array.length ? array.length - 1 : index];
|
|
8511
|
+
}
|
|
8168
8512
|
//#endregion
|
|
8169
8513
|
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
8170
8514
|
var ALIGNMENTS = {
|
|
@@ -8214,184 +8558,6 @@ function getAlignmentProps(alignment) {
|
|
|
8214
8558
|
return alignment ? ALIGNMENTS[alignment] : {};
|
|
8215
8559
|
}
|
|
8216
8560
|
//#endregion
|
|
8217
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
8218
|
-
var breakpoints = [
|
|
8219
|
-
"40em",
|
|
8220
|
-
"52em",
|
|
8221
|
-
"64em"
|
|
8222
|
-
];
|
|
8223
|
-
var useBreakpointIndex = (options = {}) => {
|
|
8224
|
-
const { defaultIndex = 0 } = options;
|
|
8225
|
-
if (typeof defaultIndex !== "number") throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
|
|
8226
|
-
else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);
|
|
8227
|
-
const [value, setValue] = useState$1(defaultIndex);
|
|
8228
|
-
useEffect$1(() => {
|
|
8229
|
-
const getIndex = () => breakpoints.filter((bp) => {
|
|
8230
|
-
return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
|
|
8231
|
-
}).length;
|
|
8232
|
-
const onResize = () => {
|
|
8233
|
-
const newValue = getIndex();
|
|
8234
|
-
if (value !== newValue) setValue(newValue);
|
|
8235
|
-
};
|
|
8236
|
-
onResize();
|
|
8237
|
-
if (typeof window !== "undefined") window.addEventListener("resize", onResize);
|
|
8238
|
-
return () => {
|
|
8239
|
-
if (typeof window !== "undefined") window.removeEventListener("resize", onResize);
|
|
8240
|
-
};
|
|
8241
|
-
}, [value]);
|
|
8242
|
-
return value;
|
|
8243
|
-
};
|
|
8244
|
-
function useResponsiveValue(values, options = {}) {
|
|
8245
|
-
const index = useBreakpointIndex(options);
|
|
8246
|
-
if (!Array.isArray(values) && typeof values !== "function") return values;
|
|
8247
|
-
const array = values || [];
|
|
8248
|
-
return array[index >= array.length ? array.length - 1 : index];
|
|
8249
|
-
}
|
|
8250
|
-
//#endregion
|
|
8251
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
8252
|
-
var white = "#fff";
|
|
8253
|
-
var GRAY = {
|
|
8254
|
-
900: "#1e1e1e",
|
|
8255
|
-
800: "#2f2f2f",
|
|
8256
|
-
/** Meets 4.6:1 text contrast against white. */
|
|
8257
|
-
700: "#757575",
|
|
8258
|
-
/** Meets 3:1 UI or large text contrast against white. */
|
|
8259
|
-
600: "#949494",
|
|
8260
|
-
400: "#ccc",
|
|
8261
|
-
/** Used for most borders. */
|
|
8262
|
-
300: "#ddd",
|
|
8263
|
-
/** Used sparingly for light borders. */
|
|
8264
|
-
200: "#e0e0e0",
|
|
8265
|
-
/** Used for light gray backgrounds. */
|
|
8266
|
-
100: "#f0f0f0"
|
|
8267
|
-
};
|
|
8268
|
-
var ALERT = {
|
|
8269
|
-
yellow: "#f0b849",
|
|
8270
|
-
red: "#d94f4f",
|
|
8271
|
-
green: "#4ab866"
|
|
8272
|
-
};
|
|
8273
|
-
var THEME = {
|
|
8274
|
-
accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,
|
|
8275
|
-
accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,
|
|
8276
|
-
accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,
|
|
8277
|
-
/** Used when placing text on the accent color. */
|
|
8278
|
-
accentInverted: `var(--wp-components-color-accent-inverted, var(--wpds-color-foreground-interactive-brand-strong, #fff))`,
|
|
8279
|
-
background: `var(--wp-components-color-background, var(--wpds-color-background-surface-neutral-strong, #fff))`,
|
|
8280
|
-
foreground: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8281
|
-
/** Used when placing text on the foreground color. */
|
|
8282
|
-
foregroundInverted: `var(--wp-components-color-foreground-inverted, var(--wpds-color-background-surface-neutral, #fcfcfc))`,
|
|
8283
|
-
gray: {
|
|
8284
|
-
/** @deprecated Use `COLORS.theme.foreground` instead. */
|
|
8285
|
-
900: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8286
|
-
800: `var(--wp-components-color-gray-800, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
8287
|
-
700: `var(--wp-components-color-gray-700, var(--wpds-color-foreground-content-neutral-weak, #707070))`,
|
|
8288
|
-
600: `var(--wp-components-color-gray-600, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
8289
|
-
400: `var(--wp-components-color-gray-400, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
8290
|
-
300: `var(--wp-components-color-gray-300, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
8291
|
-
200: `var(--wp-components-color-gray-200, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
8292
|
-
100: `var(--wp-components-color-gray-100, var(--wpds-color-background-surface-neutral, #fcfcfc))`
|
|
8293
|
-
}
|
|
8294
|
-
};
|
|
8295
|
-
var UI = {
|
|
8296
|
-
background: THEME.background,
|
|
8297
|
-
backgroundDisabled: THEME.gray[100],
|
|
8298
|
-
border: THEME.gray[600],
|
|
8299
|
-
borderHover: THEME.gray[700],
|
|
8300
|
-
borderFocus: THEME.accent,
|
|
8301
|
-
borderDisabled: THEME.gray[400],
|
|
8302
|
-
textDisabled: THEME.gray[600],
|
|
8303
|
-
darkGrayPlaceholder: `color-mix(in srgb, ${THEME.foreground}, transparent 38%)`,
|
|
8304
|
-
lightGrayPlaceholder: `color-mix(in srgb, ${THEME.background}, transparent 35%)`
|
|
8305
|
-
};
|
|
8306
|
-
var COLORS = Object.freeze({
|
|
8307
|
-
/**
|
|
8308
|
-
* The main gray color object.
|
|
8309
|
-
*
|
|
8310
|
-
* @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.
|
|
8311
|
-
*/
|
|
8312
|
-
gray: GRAY,
|
|
8313
|
-
/**
|
|
8314
|
-
* @deprecated Prefer theme-ready variables in `COLORS.theme`.
|
|
8315
|
-
*/
|
|
8316
|
-
white,
|
|
8317
|
-
alert: ALERT,
|
|
8318
|
-
/**
|
|
8319
|
-
* Theme-ready variables with fallbacks.
|
|
8320
|
-
*
|
|
8321
|
-
* Prefer semantic aliases in `COLORS.ui` when applicable.
|
|
8322
|
-
*/
|
|
8323
|
-
theme: THEME,
|
|
8324
|
-
/**
|
|
8325
|
-
* Semantic aliases (prefer these over raw variables when applicable).
|
|
8326
|
-
*/
|
|
8327
|
-
ui: UI
|
|
8328
|
-
});
|
|
8329
|
-
//#endregion
|
|
8330
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
8331
|
-
var CONTROL_HEIGHT = "36px";
|
|
8332
|
-
var CONTROL_PROPS = {
|
|
8333
|
-
controlPaddingX: 12,
|
|
8334
|
-
controlPaddingXSmall: 8,
|
|
8335
|
-
controlPaddingXLarge: 12 * 1.3334,
|
|
8336
|
-
controlBoxShadowFocus: `0 0 0 0.5px ${COLORS.theme.accent}`,
|
|
8337
|
-
controlHeight: CONTROL_HEIGHT,
|
|
8338
|
-
controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
|
|
8339
|
-
controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
|
|
8340
|
-
controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
|
|
8341
|
-
controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
|
|
8342
|
-
};
|
|
8343
|
-
var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
8344
|
-
colorDivider: "rgba(0, 0, 0, 0.1)",
|
|
8345
|
-
colorScrollbarThumb: "rgba(0, 0, 0, 0.2)",
|
|
8346
|
-
colorScrollbarThumbHover: "rgba(0, 0, 0, 0.5)",
|
|
8347
|
-
colorScrollbarTrack: "rgba(0, 0, 0, 0.04)",
|
|
8348
|
-
elevationIntensity: 1,
|
|
8349
|
-
radiusXSmall: "1px",
|
|
8350
|
-
radiusSmall: "2px",
|
|
8351
|
-
radiusMedium: "4px",
|
|
8352
|
-
radiusLarge: "8px",
|
|
8353
|
-
radiusFull: "9999px",
|
|
8354
|
-
radiusRound: "50%",
|
|
8355
|
-
borderWidth: "1px",
|
|
8356
|
-
borderWidthFocus: "1.5px",
|
|
8357
|
-
borderWidthTab: "4px",
|
|
8358
|
-
spinnerSize: 16,
|
|
8359
|
-
fontSize: "13px",
|
|
8360
|
-
fontSizeH1: "calc(2.44 * 13px)",
|
|
8361
|
-
fontSizeH2: "calc(1.95 * 13px)",
|
|
8362
|
-
fontSizeH3: "calc(1.56 * 13px)",
|
|
8363
|
-
fontSizeH4: "calc(1.25 * 13px)",
|
|
8364
|
-
fontSizeH5: "13px",
|
|
8365
|
-
fontSizeH6: "calc(0.8 * 13px)",
|
|
8366
|
-
fontSizeInputMobile: "16px",
|
|
8367
|
-
fontSizeMobile: "15px",
|
|
8368
|
-
fontSizeSmall: "calc(0.92 * 13px)",
|
|
8369
|
-
fontSizeXSmall: "calc(0.75 * 13px)",
|
|
8370
|
-
fontLineHeightBase: "1.4",
|
|
8371
|
-
fontWeight: "normal",
|
|
8372
|
-
fontWeightMedium: "499",
|
|
8373
|
-
fontWeightHeading: "600",
|
|
8374
|
-
gridBase: "4px",
|
|
8375
|
-
elevationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,
|
|
8376
|
-
elevationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,
|
|
8377
|
-
elevationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,
|
|
8378
|
-
elevationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,
|
|
8379
|
-
surfaceBackgroundColor: COLORS.white,
|
|
8380
|
-
surfaceBackgroundSubtleColor: "#F3F3F3",
|
|
8381
|
-
surfaceBackgroundTintColor: "#F5F5F5",
|
|
8382
|
-
surfaceBorderColor: "rgba(0, 0, 0, 0.1)",
|
|
8383
|
-
surfaceBorderBoldColor: "rgba(0, 0, 0, 0.15)",
|
|
8384
|
-
surfaceBorderSubtleColor: "rgba(0, 0, 0, 0.05)",
|
|
8385
|
-
surfaceBackgroundTertiaryColor: COLORS.white,
|
|
8386
|
-
surfaceColor: COLORS.white,
|
|
8387
|
-
transitionDuration: "200ms",
|
|
8388
|
-
transitionDurationFast: "160ms",
|
|
8389
|
-
transitionDurationFaster: "120ms",
|
|
8390
|
-
transitionDurationFastest: "100ms",
|
|
8391
|
-
transitionTimingFunction: "cubic-bezier(0.08, 0.52, 0.52, 1)",
|
|
8392
|
-
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
8393
|
-
});
|
|
8394
|
-
//#endregion
|
|
8395
8561
|
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
8396
8562
|
function useGrid(props) {
|
|
8397
8563
|
const { align, alignment, className, columnGap, columns = 2, gap = 3, isInline = false, justify, rowGap, rows, templateColumns, templateRows, ...otherProps } = useContextSystem(props, "Grid");
|
|
@@ -8402,7 +8568,7 @@ function useGrid(props) {
|
|
|
8402
8568
|
const cx = useCx();
|
|
8403
8569
|
const classes = useMemo$1(() => {
|
|
8404
8570
|
const alignmentProps = getAlignmentProps(alignment);
|
|
8405
|
-
|
|
8571
|
+
const gridClasses = /* @__PURE__ */ css$1({
|
|
8406
8572
|
alignItems: align,
|
|
8407
8573
|
display: isInline ? "inline-grid" : "grid",
|
|
8408
8574
|
gap: `calc( ${config_values_default.gridBase} * ${gap} )`,
|
|
@@ -8413,7 +8579,8 @@ function useGrid(props) {
|
|
|
8413
8579
|
justifyContent: justify,
|
|
8414
8580
|
verticalAlign: isInline ? "middle" : void 0,
|
|
8415
8581
|
...alignmentProps
|
|
8416
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:gridClasses;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdURzQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGdldEFsaWdubWVudFByb3BzIH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1c2VSZXNwb25zaXZlVmFsdWUgfSBmcm9tICcuLi91dGlscy91c2UtcmVzcG9uc2l2ZS12YWx1ZSc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuaW1wb3J0IHsgdXNlQ3ggfSBmcm9tICcuLi91dGlscy9ob29rcy91c2UtY3gnO1xuaW1wb3J0IHR5cGUgeyBHcmlkUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdXNlR3JpZChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBHcmlkUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y29sdW1ucyA9IDIsXG5cdFx0Z2FwID0gMyxcblx0XHRpc0lubGluZSA9IGZhbHNlLFxuXHRcdGp1c3RpZnksXG5cdFx0cm93R2FwLFxuXHRcdHJvd3MsXG5cdFx0dGVtcGxhdGVDb2x1bW5zLFxuXHRcdHRlbXBsYXRlUm93cyxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0dyaWQnICk7XG5cblx0Y29uc3QgY29sdW1uc0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCBjb2x1bW5zICkgPyBjb2x1bW5zIDogWyBjb2x1bW5zIF07XG5cdGNvbnN0IGNvbHVtbiA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggY29sdW1uc0FzQXJyYXkgKTtcblx0Y29uc3Qgcm93c0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCByb3dzICkgPyByb3dzIDogWyByb3dzIF07XG5cdGNvbnN0IHJvdyA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggcm93c0FzQXJyYXkgKTtcblxuXHRjb25zdCBncmlkVGVtcGxhdGVDb2x1bW5zID1cblx0XHR0ZW1wbGF0ZUNvbHVtbnMgfHwgKCAhISBjb2x1bW5zICYmIGByZXBlYXQoICR7IGNvbHVtbiB9LCAxZnIgKWAgKTtcblx0Y29uc3QgZ3JpZFRlbXBsYXRlUm93cyA9XG5cdFx0dGVtcGxhdGVSb3dzIHx8ICggISEgcm93cyAmJiBgcmVwZWF0KCAkeyByb3cgfSwgMWZyIClgICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3QgYWxpZ25tZW50UHJvcHMgPSBnZXRBbGlnbm1lbnRQcm9wcyggYWxpZ25tZW50ICk7XG5cblx0XHRjb25zdCBncmlkQ2xhc3NlcyA9IGNzcygge1xuXHRcdFx0YWxpZ25JdGVtczogYWxpZ24sXG5cdFx0XHRkaXNwbGF5OiBpc0lubGluZSA/ICdpbmxpbmUtZ3JpZCcgOiAnZ3JpZCcsXG5cdFx0XHRnYXA6IGBjYWxjKCAkeyBDT05GSUcuZ3JpZEJhc2UgfSAqICR7IGdhcCB9IClgLFxuXHRcdFx0Z3JpZFRlbXBsYXRlQ29sdW1uczogZ3JpZFRlbXBsYXRlQ29sdW1ucyB8fCB1bmRlZmluZWQsXG5cdFx0XHRncmlkVGVtcGxhdGVSb3dzOiBncmlkVGVtcGxhdGVSb3dzIHx8IHVuZGVmaW5lZCxcblx0XHRcdGdyaWRSb3dHYXA6IHJvd0dhcCxcblx0XHRcdGdyaWRDb2x1bW5HYXA6IGNvbHVtbkdhcCxcblx0XHRcdGp1c3RpZnlDb250ZW50OiBqdXN0aWZ5LFxuXHRcdFx0dmVydGljYWxBbGlnbjogaXNJbmxpbmUgPyAnbWlkZGxlJyA6IHVuZGVmaW5lZCxcblx0XHRcdC4uLmFsaWdubWVudFByb3BzLFxuXHRcdH0gKTtcblxuXHRcdHJldHVybiBjeCggZ3JpZENsYXNzZXMsIGNsYXNzTmFtZSApO1xuXHR9LCBbXG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y3gsXG5cdFx0Z2FwLFxuXHRcdGdyaWRUZW1wbGF0ZUNvbHVtbnMsXG5cdFx0Z3JpZFRlbXBsYXRlUm93cyxcblx0XHRpc0lubGluZSxcblx0XHRqdXN0aWZ5LFxuXHRcdHJvd0dhcCxcblx0XSApO1xuXG5cdHJldHVybiB7IC4uLm90aGVyUHJvcHMsIGNsYXNzTmFtZTogY2xhc3NlcyB9O1xufVxuIl19 */")
|
|
8582
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:gridClasses;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdURzQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGdldEFsaWdubWVudFByb3BzIH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1c2VSZXNwb25zaXZlVmFsdWUgfSBmcm9tICcuLi91dGlscy91c2UtcmVzcG9uc2l2ZS12YWx1ZSc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuaW1wb3J0IHsgdXNlQ3ggfSBmcm9tICcuLi91dGlscy9ob29rcy91c2UtY3gnO1xuaW1wb3J0IHR5cGUgeyBHcmlkUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdXNlR3JpZChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBHcmlkUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y29sdW1ucyA9IDIsXG5cdFx0Z2FwID0gMyxcblx0XHRpc0lubGluZSA9IGZhbHNlLFxuXHRcdGp1c3RpZnksXG5cdFx0cm93R2FwLFxuXHRcdHJvd3MsXG5cdFx0dGVtcGxhdGVDb2x1bW5zLFxuXHRcdHRlbXBsYXRlUm93cyxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0dyaWQnICk7XG5cblx0Y29uc3QgY29sdW1uc0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCBjb2x1bW5zICkgPyBjb2x1bW5zIDogWyBjb2x1bW5zIF07XG5cdGNvbnN0IGNvbHVtbiA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggY29sdW1uc0FzQXJyYXkgKTtcblx0Y29uc3Qgcm93c0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCByb3dzICkgPyByb3dzIDogWyByb3dzIF07XG5cdGNvbnN0IHJvdyA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggcm93c0FzQXJyYXkgKTtcblxuXHRjb25zdCBncmlkVGVtcGxhdGVDb2x1bW5zID1cblx0XHR0ZW1wbGF0ZUNvbHVtbnMgfHwgKCAhISBjb2x1bW5zICYmIGByZXBlYXQoICR7IGNvbHVtbiB9LCAxZnIgKWAgKTtcblx0Y29uc3QgZ3JpZFRlbXBsYXRlUm93cyA9XG5cdFx0dGVtcGxhdGVSb3dzIHx8ICggISEgcm93cyAmJiBgcmVwZWF0KCAkeyByb3cgfSwgMWZyIClgICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3QgYWxpZ25tZW50UHJvcHMgPSBnZXRBbGlnbm1lbnRQcm9wcyggYWxpZ25tZW50ICk7XG5cblx0XHRjb25zdCBncmlkQ2xhc3NlcyA9IGNzcygge1xuXHRcdFx0YWxpZ25JdGVtczogYWxpZ24sXG5cdFx0XHRkaXNwbGF5OiBpc0lubGluZSA/ICdpbmxpbmUtZ3JpZCcgOiAnZ3JpZCcsXG5cdFx0XHRnYXA6IGBjYWxjKCAkeyBDT05GSUcuZ3JpZEJhc2UgfSAqICR7IGdhcCB9IClgLFxuXHRcdFx0Z3JpZFRlbXBsYXRlQ29sdW1uczogZ3JpZFRlbXBsYXRlQ29sdW1ucyB8fCB1bmRlZmluZWQsXG5cdFx0XHRncmlkVGVtcGxhdGVSb3dzOiBncmlkVGVtcGxhdGVSb3dzIHx8IHVuZGVmaW5lZCxcblx0XHRcdGdyaWRSb3dHYXA6IHJvd0dhcCxcblx0XHRcdGdyaWRDb2x1bW5HYXA6IGNvbHVtbkdhcCxcblx0XHRcdGp1c3RpZnlDb250ZW50OiBqdXN0aWZ5LFxuXHRcdFx0dmVydGljYWxBbGlnbjogaXNJbmxpbmUgPyAnbWlkZGxlJyA6IHVuZGVmaW5lZCxcblx0XHRcdC4uLmFsaWdubWVudFByb3BzLFxuXHRcdH0gKTtcblxuXHRcdHJldHVybiBjeCggZ3JpZENsYXNzZXMsIGNsYXNzTmFtZSApO1xuXHR9LCBbXG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y3gsXG5cdFx0Z2FwLFxuXHRcdGdyaWRUZW1wbGF0ZUNvbHVtbnMsXG5cdFx0Z3JpZFRlbXBsYXRlUm93cyxcblx0XHRpc0lubGluZSxcblx0XHRqdXN0aWZ5LFxuXHRcdHJvd0dhcCxcblx0XSApO1xuXG5cdHJldHVybiB7IC4uLm90aGVyUHJvcHMsIGNsYXNzTmFtZTogY2xhc3NlcyB9O1xufVxuIl19 */");
|
|
8583
|
+
return cx(gridClasses, className);
|
|
8417
8584
|
}, [
|
|
8418
8585
|
align,
|
|
8419
8586
|
alignment,
|
|
@@ -8435,7 +8602,7 @@ function useGrid(props) {
|
|
|
8435
8602
|
//#endregion
|
|
8436
8603
|
//#region ../../../node_modules/.pnpm/@wordpress+components@36.1.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
8437
8604
|
function UnconnectedGrid(props, forwardedRef) {
|
|
8438
|
-
return /* @__PURE__ */ jsx(component_default$
|
|
8605
|
+
return /* @__PURE__ */ jsx(component_default$2, {
|
|
8439
8606
|
...useGrid(props),
|
|
8440
8607
|
ref: forwardedRef
|
|
8441
8608
|
});
|
|
@@ -8499,6 +8666,8 @@ var leaderboard_chart_module_default = {
|
|
|
8499
8666
|
"bar--animated": "a8ccharts-GovfoW-bar--animated",
|
|
8500
8667
|
"barWithLabelContainer": "a8ccharts-GovfoW-barWithLabelContainer",
|
|
8501
8668
|
"chevron": "a8ccharts-GovfoW-chevron",
|
|
8669
|
+
"deltaPlaceholder": "a8ccharts-GovfoW-deltaPlaceholder",
|
|
8670
|
+
"deltaValue": "a8ccharts-GovfoW-deltaValue",
|
|
8502
8671
|
"emptyState": "a8ccharts-GovfoW-emptyState",
|
|
8503
8672
|
"interactiveRow": "a8ccharts-GovfoW-interactiveRow",
|
|
8504
8673
|
"is-overlay": "a8ccharts-GovfoW-is-overlay",
|
|
@@ -8549,30 +8718,34 @@ const defaultDeltaFormatter = (value) => {
|
|
|
8549
8718
|
* @return A CSS width value.
|
|
8550
8719
|
*/
|
|
8551
8720
|
const getBarWidth = (share) => `calc(${share}% - var(--a8c--charts--leaderboard--bar--hover-inset, 0px) * ${share} / 100)`;
|
|
8721
|
+
const hasComparisonValue = (entry) => entry.previousValue != null && entry.previousShare != null && entry.delta != null;
|
|
8552
8722
|
const BarLabel = ({ label }) => /* @__PURE__ */ jsx(Fragment$1, { children: typeof label === "string" ? /* @__PURE__ */ jsx(Text$1, {
|
|
8553
8723
|
className: leaderboard_chart_module_default.label,
|
|
8554
8724
|
children: label
|
|
8555
8725
|
}) : label });
|
|
8556
|
-
const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, secondaryColor, animation, isPrimaryVisible = true, isComparisonVisible = true }) =>
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
})
|
|
8726
|
+
const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, secondaryColor, animation, isPrimaryVisible = true, isComparisonVisible = true }) => {
|
|
8727
|
+
const showComparisonBar = withComparison && !withOverlayLabel && isComparisonVisible;
|
|
8728
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8729
|
+
className: clsx(leaderboard_chart_module_default.barWithLabelContainer, { [leaderboard_chart_module_default["is-overlay"]]: withOverlayLabel }),
|
|
8730
|
+
children: [
|
|
8731
|
+
/* @__PURE__ */ jsx(BarLabel, { label: entry.label }),
|
|
8732
|
+
isPrimaryVisible && /* @__PURE__ */ jsx("div", {
|
|
8733
|
+
className: clsx(leaderboard_chart_module_default.bar, { [leaderboard_chart_module_default["bar--animated"]]: animation }),
|
|
8734
|
+
style: {
|
|
8735
|
+
width: getBarWidth(entry.currentShare),
|
|
8736
|
+
backgroundColor: primaryColor
|
|
8737
|
+
}
|
|
8738
|
+
}),
|
|
8739
|
+
showComparisonBar && hasComparisonValue(entry) && /* @__PURE__ */ jsx("div", {
|
|
8740
|
+
className: clsx(leaderboard_chart_module_default.bar, { [leaderboard_chart_module_default["bar--animated"]]: animation }),
|
|
8741
|
+
style: {
|
|
8742
|
+
width: getBarWidth(entry.previousShare),
|
|
8743
|
+
backgroundColor: secondaryColor
|
|
8744
|
+
}
|
|
8745
|
+
})
|
|
8746
|
+
]
|
|
8747
|
+
});
|
|
8748
|
+
};
|
|
8576
8749
|
/**
|
|
8577
8750
|
* LeaderboardChart component displays a ranked list of data with progress bars
|
|
8578
8751
|
* and optional comparison values.
|
|
@@ -8730,7 +8903,12 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
8730
8903
|
rowGap,
|
|
8731
8904
|
columnGap,
|
|
8732
8905
|
children: data.map((entry) => {
|
|
8733
|
-
const
|
|
8906
|
+
const showComparisonColumn = withComparison && isComparisonVisible;
|
|
8907
|
+
const hasDeltaValue = hasComparisonValue(entry);
|
|
8908
|
+
const showComparisonValue = showComparisonColumn && hasDeltaValue;
|
|
8909
|
+
const showComparisonPlaceholder = showComparisonColumn && !hasDeltaValue;
|
|
8910
|
+
const colorIndex = showComparisonValue ? Math.sign(entry.delta) + 1 : 1;
|
|
8911
|
+
const deltaColor = deltaColors[colorIndex];
|
|
8734
8912
|
const rowCells = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Stack, {
|
|
8735
8913
|
direction: "column",
|
|
8736
8914
|
gap: labelSpacing,
|
|
@@ -8748,10 +8926,25 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
8748
8926
|
direction: "row",
|
|
8749
8927
|
gap: "xs",
|
|
8750
8928
|
className: clsx(leaderboard_chart_module_default.valueContainer, { [leaderboard_chart_module_default.overlayLabel]: withOverlayLabel }),
|
|
8751
|
-
children: [
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8929
|
+
children: [
|
|
8930
|
+
isPrimaryVisible && /* @__PURE__ */ jsx(Text$1, { children: valueFormatter(entry.currentValue) }),
|
|
8931
|
+
showComparisonValue && /* @__PURE__ */ jsx(Text$1, {
|
|
8932
|
+
className: leaderboard_chart_module_default.deltaValue,
|
|
8933
|
+
style: { color: deltaColor },
|
|
8934
|
+
children: deltaFormatter(entry.delta)
|
|
8935
|
+
}),
|
|
8936
|
+
showComparisonPlaceholder && /* @__PURE__ */ jsxs(Text$1, {
|
|
8937
|
+
className: clsx(leaderboard_chart_module_default.deltaValue, leaderboard_chart_module_default.deltaPlaceholder),
|
|
8938
|
+
style: { color: deltaColor },
|
|
8939
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
8940
|
+
"aria-hidden": "true",
|
|
8941
|
+
children: "-"
|
|
8942
|
+
}), /* @__PURE__ */ jsx(component_default$1, {
|
|
8943
|
+
as: "span",
|
|
8944
|
+
children: __("No comparison data", "jetpack-charts")
|
|
8945
|
+
})]
|
|
8946
|
+
})
|
|
8947
|
+
]
|
|
8755
8948
|
})] });
|
|
8756
8949
|
if (entry.onClick) return /* @__PURE__ */ jsxs("button", {
|
|
8757
8950
|
type: "button",
|
|
@@ -9560,6 +9753,6 @@ function TrendIndicator({ direction, value, className, style, showIcon = true })
|
|
|
9560
9753
|
});
|
|
9561
9754
|
}
|
|
9562
9755
|
//#endregion
|
|
9563
|
-
export { AccessibleTooltip, AreaChartResponsive as AreaChart, AreaChart as AreaChartUnresponsive, BarChartResponsive as BarChart, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, BarListChart as BarListChartUnresponsive, BaseTooltip, ConversionFunnelChartWithProvider as ConversionFunnelChart, GeoChartResponsive as GeoChart, GeoChartWithProvider as GeoChartUnresponsive, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, HeatmapChartResponsive as HeatmapChart, HeatmapChart as HeatmapChartUnresponsive, LeaderboardChartResponsive as LeaderboardChart, LeaderboardChart as LeaderboardChartUnresponsive, Legend, LineChartResponsive as LineChart, LineChart as LineChartUnresponsive, PieChartResponsive as PieChart, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, PieSemiCircleChart as PieSemiCircleChartUnresponsive, Sparkline, SparklineUnresponsive, TrendIndicator, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
|
|
9756
|
+
export { AccessibleTooltip, AreaChartResponsive as AreaChart, AreaChart as AreaChartUnresponsive, BarChartResponsive as BarChart, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, BarListChart as BarListChartUnresponsive, BaseTooltip, ConversionFunnelChartWithProvider as ConversionFunnelChart, GeoChartResponsive as GeoChart, GeoChartWithProvider as GeoChartUnresponsive, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, HeatmapChartResponsive as HeatmapChart, HeatmapChart as HeatmapChartUnresponsive, LeaderboardChartResponsive as LeaderboardChart, LeaderboardChart as LeaderboardChartUnresponsive, Legend, LineChartResponsive as LineChart, LineChart as LineChartUnresponsive, PieChartResponsive as PieChart, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, PieSemiCircleChart as PieSemiCircleChartUnresponsive, Sparkline, SparklineUnresponsive, TrendIndicator, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
|
|
9564
9757
|
|
|
9565
9758
|
//# sourceMappingURL=index.js.map
|