@graphysdk/react-renderer 1.9.0-beta.1795681189498 → 1.9.0-beta.1795686990387
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/dist/editable.cjs +1 -1
- package/dist/editable.d.ts +8 -0
- package/dist/editable.mjs +120 -120
- package/dist/history-chords-7P8sFd-9.cjs +2 -0
- package/dist/{history-chords-tJ7oLfJq.js → history-chords-LuhZmV5N.js} +3783 -3633
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.mjs +578 -549
- package/package.json +4 -4
- package/dist/history-chords-BvxAsm-U.cjs +0 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Tu, A as Pu,
|
|
1
|
+
import { $ as Tu, A as Pu, B as Yr, C as Pl, Cr as Eo, Ct as Ro, D as Ll, Dn as Lu, Dr as Iu, Dt as tr, E as Mu, En as Ou, Et as Eu, F as Ru, Fn as Nu, Ft as _e, G as Du, Gt as Il, Ht as _u, I as Fu, In as Le, It as ze, J as F, Jn as Bu, Jt as zu, K as Ml, Kt as z, Ln as No, Lt as Hu, M as Gu, Mn as nr, Mt as $u, N as Vu, Nn as Wu, Nt as Ea, O as Ku, On as Uu, Or as q, Ot as rr, Pn as Xu, Pt as Do, Q as ju, R as Zr, Rn as gt, Rt as qu, S as xe, Sn as Ol, St as El, T as Yu, Tt as Rl, V as or, Wt as Zu, Xn as Ju, Xt as Qu, Y as eh, Yn as Nl, Yt as th, Z as nh, Zt as rh, _ as oh, _r as Dl, _t as ah, at as ih, b as _l, bt as Ra, c as lh, cr as sh, ct as ch, d as dh, dn as Oe, dt as uh, er as hh, f as _o, ft as J, g as ph, gr as gh, gt as mh, h as vh, hr as ye, ht as Fo, i as on, in as fh, ir as yh, it as Fl, j as bh, jn as Sh, jt as Bl, k as wh, kn as xh, kr as Ce, ln as zl, lr as Ch, lt as Na, m as kh, mt as Ah, n as Ee, nn as Re, o as Th, ot as te, p as Ph, pr as Lh, pt as Bo, q as Ih, qt as Hl, r as de, rn as Mh, rt as Oh, s as Da, st as le, t as Gl, u as $l, un as Jr, ut as Eh, v as Vl, vt as Rh, w as pt, wn as Wl, wt as an, x as zo, xr as G, xt as Gn, y as Kl, yn as Nh, yr as ne, yt as Qr, z as Ul, zt as ar } from "./history-chords-LuhZmV5N.js";
|
|
2
2
|
import { ARROW_DEFAULTS as Xl, ARROW_STICKER_DECLARATIONS as Dh, ARROW_STROKE_WIDTHS_PX as Mr, ARROW_TARGET_GAP_PX as _t, AUTO_COLOR as Et, AddAnnotationCommand as Ie, AddHighlightCommand as _h, COMBO_TYPES as _a, CONSTANT_VARIABLES as Ho, DASH_PRESETS as Fh, DEFAULT_BAR_CORNER_RADII as Bh, DEFAULT_GEOM_COLOR as zh, DEFAULT_POINT_SIZE_PX as jl, DEFAULT_STROKE_WIDTH_PX as Hh, DIFFERENCE_ARROW_DEFAULTS as ql, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Dn, InternalError as Gh, MAX_BAR_WIDTH_FRACTION as $h, MIN_BAR_WIDTH_FRACTION as Vh, MoveAnnotationCommand as Yl, PANEL_FRACTION_BOUNDS as Go, POSITION_VARIABLES as lt, RESTING_HOVER_STATE as ln, RemoveAnnotationCommand as ir, RemoveHighlightCommand as Fa, SELECTION_PADDING_DEFAULT as Wh, SHAPE_DEFAULTS as Zl, SequenceCommand as it, SetAxisLabelCommand as Jl, SetAxisPositionCommand as Ql, SetAxisTickModeCommand as eo, SetAxisTicksVisibilityCommand as Ba, SetAxisVisibilityCommand as $n, SetBarCornerRadiusCommand as Kh, SetBarWidthCommand as es, SetContentCaptionCommand as ts, SetContentSourceCommand as Uh, SetContentSubtitleCommand as ns, SetContentTitleCommand as rs, SetDataLabelsCommand as os, SetDataLabelsFormatCommand as as, SetDifferenceArrowStyleCommand as Xh, SetGraphTypeCommand as $o, SetGridLineStyleCommand as is, SetGridVisibilityCommand as to, SetHeadlineCompareWithCommand as jh, SetHeadlinePositionCommand as qh, SetHeadlineShowCommand as za, SetHeadlineSizeCommand as Yh, SetHighlightDimStyleCommand as Zh, SetLayerYScaleTypeCommand as Jh, SetLegendAlignCommand as Qh, SetLegendDisplayCommand as ep, SetLegendPlacementCommand as tp, SetLegendPositionCommand as no, SetLineCurveCommand as ls, SetLineMissingValuesCommand as ss, SetLineStyleCommand as qe, SetMappingCommand as np, SetNumberFormatAbbreviationCommand as rp, SetNumberFormatDecimalsCommand as Ha, SetObservationsColorCommand as op, SetPointSizeCommand as lr, SetPointSymbolCommand as Vo, SetPolarInnerRadiusCommand as ap, SetPolarStartAngleCommand as ip, SetRuleLabelCommand as lp, SetRuleValueCommand as sp, SetScaleDomainCommand as at, SetScaleRangeCommand as cs, SetScaleTransformCommand as ds, SetStatLineCommand as cp, SetStyleRuleCommand as st, TEXT_ANNOTATION_DEFAULTS as ro, TEXT_ANNOTATION_FADE_ALPHA as dp, ToggleCategoryLabelsCommand as us, ToggleContentVisibilityCommand as mt, ToggleDataLabelsCommand as hs, ToggleGoalLineCommand as up, ToggleLinePointsCommand as Wo, ToggleStackTotalsCommand as ps, UpdateAnnotationCommand as me, alignUnitFractions as Ft, areAnchorsEqual as sr, areEditTargetsEqual as Ko, areEndpointsComparable as hp, areSameStackEndpoints as pp, buildColormapRange as gp, buildDivergingRange as Ga, buildLayerStyleAddress as Rt, buildObservationPredicate as gs, buildObservationsTarget as nt, buildObservationsTargetAtValue as ms, buildPointSymbolInBox as mp, canAnchorDirectLabels as vp, canBecomeCombo as fp, canBecomeHeatmap as yp, clampAnnotationTranslation as vs, collectDependentAnnotationIds as Uo, combineKindStyleDeclarations as $a, computeArrow as fs, createObservationAnchorBuilder as ys, createObservationAnchorLander as bp, createObservationAnchorParser as Sp, createStyleResolver as wp, createStyleRuleMatcher as xp, createValueFormatter as Xo, createXValueReader as Cp, filterLayersByGeoms as oo, findAnnotation as ao, findAverageLineLayer as kp, findAxisGuide as bs, findCompanionLayers as Ss, findGoalLineLayer as Ap, findHighlightsAtObservation as Tp, findHostLayer as cr, findKindStyleDeclarations as Vn, findLayerByGeom as ws, findLayerById as se, findObservationAttachment as Pp, findOverflowedPanelEdges as Lp, findPointerRegion as Ip, findStyleRule as ct, findTrendLineLayer as Mp, formatDifferenceLabel as Op, getBoundingRect as io, getGroupVariables as jo, getScaledAesthetic as Ep, getXBand as Rp, getYBand as Np, hasMainAxisBand as Dp, hasMultipleGroups as dr, indexSceneAnnotations as xs, inferDefaultDifferenceArrowEndpoints as _p, inferDifferenceArrowEndpoints as Fp, isComboGraphType as Me, isCompanionLayer as Cs, isGeomStyleRule as Bp, isGeometricSymbol as qt, isImageSymbol as lo, isLayerSpecOf as Bt, isObservationAttachmentKind as zp, isPlacedRegionAnchor as so, isPointTarget as ks, isSafeUrl as Hp, isZeroAnchoredAxis as As, measureObservationsBoxes as Ts, omitLegacyDifferenceArrowLabelPlate as Gp, polarToUnit as $p, projectAnchorToPanel as ke, projectBoxToPanel as Nt, projectRegionToPanel as qo, readAnnotationBox as Yo, readBroadestObservationsScope as Vp, readColorChoices as Ps, readColorPart as Wp, readColormapColor as Kp, readComboLineLayerId as Up, readCompanionRowsAtScopeKey as Xp, readConstantValue as jp, readDivergingColor as Va, readEditTargetKey as sn, readFacingAlign as Zo, readGeomColor as qp, readGraphType as ur, readHighlightDimStyle as Yp, readMainAxis as Zp, readMappableAesthetics as Jp, readMappedVariable as Qp, readObservationIndex as cn, readObservationsColor as eg, readObservationsColorPart as tg, readObservationsColorRoute as hr, readOutwardGapOffset as pr, readReachableLevels as ng, readRectPoint as Ze, readRowScopeKey as rg, readRowsAtScopeKey as og, readScopeXVariable as ag, readStyleCoord as De, readStyleRulesBeneath as ig, readVariableName as We, resolveArrowAnnotationStyle as Jo, resolveBarBandFraction as Ls, resolveComparisonBasis as lg, resolveDifferenceArrowAnnotationStyle as sg, resolveEditOutlineStyle as cg, resolveLayerAxisValueFormat as dg, resolveObservationPoint as ug, resolveObservationsTarget as ft, resolvePointPlacement as gr, resolveRegionPlacement as hg, resolveTextAnnotationStyle as Is, stepDifferenceArrowEndpoint as pg, toDashPreset as yt, toFontSpec as gg, toPaintColor as dt, toPanelCursor as zt, toPlacedRegionPoint as mg, toStrokeDasharray as mr } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as Ms, createContext as rt, memo as Os, useCallback as pe, useContext as Ae, useEffect as V, useId as Je, useLayoutEffect as Qe, useMemo as W, useRef as oe, useState as ae, useSyncExternalStore as vg } from "react";
|
|
4
4
|
import { Fragment as re, jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
@@ -382,7 +382,7 @@ var Vs = "_14ty2ng0", Ka = "_14ty2ng1", nm = "_14ty2ng2", rm = "_14ty2ng3", Ws =
|
|
|
382
382
|
}, wm = ({ value: e, onChange: t, onCommit: n, popupAttributes: r, variant: o = "default" }) => {
|
|
383
383
|
const i = z(), l = fr(), [s, c] = ae(!1), d = (p) => {
|
|
384
384
|
c(p), p || n?.();
|
|
385
|
-
}, u = e !== null &&
|
|
385
|
+
}, u = e !== null && xh(e) ? e : "#000000", h = Uu(u) ? u.toUpperCase() : "#000000";
|
|
386
386
|
return /* @__PURE__ */ b(ue.Root, {
|
|
387
387
|
open: s,
|
|
388
388
|
onOpenChange: d,
|
|
@@ -454,7 +454,7 @@ var Vs = "_14ty2ng0", Ka = "_14ty2ng1", nm = "_14ty2ng2", rm = "_14ty2ng3", Ws =
|
|
|
454
454
|
return /* @__PURE__ */ a("div", {
|
|
455
455
|
onKeyDown: (i) => {
|
|
456
456
|
if (t?.(i), !r || i.defaultPrevented) return;
|
|
457
|
-
const l =
|
|
457
|
+
const l = Gl(i.nativeEvent);
|
|
458
458
|
l && (i.preventDefault(), l === "undo" ? r.undo() : r.redo());
|
|
459
459
|
},
|
|
460
460
|
...n,
|
|
@@ -2589,7 +2589,7 @@ var bC = 512 * 1024, P1 = (e) => new Promise((t) => {
|
|
|
2589
2589
|
})
|
|
2590
2590
|
});
|
|
2591
2591
|
}, aa = ({ symbol: e, coordType: t, onChange: n }) => {
|
|
2592
|
-
const r = z(), { RadioGrid: o } = j(), [i, l] = ae(null), s = Ae(yr), c =
|
|
2592
|
+
const r = z(), { RadioGrid: o } = j(), [i, l] = ae(null), s = Ae(yr), c = Ch(), d = Ol(), u = s ? s.getPointSymbols(t) : d("point", t)?.symbols, h = s ? new Map(s.getGlyphs().map(({ name: x, definition: O }) => [x, O])) : c;
|
|
2593
2593
|
if (u === void 0 || u.length === 0) return null;
|
|
2594
2594
|
const p = (x) => typeof x == "string" && u.includes(x), g = (x) => p(x) || lo(x) || !qt(x) && h.has(x), m = (x) => !qt(x) || L1.some((O) => O === x), v = [...h.keys()].filter((x) => !qt(x) && !p(x)), y = [...u.filter(m), ...v], f = e === null ? "" : xn(e), C = e === null || y.some((x) => xn(x) === f) || !g(e) ? y : [...y, e], S = (x) => qt(x) ? r(`editor.graphPanel.pointSymbol.symbols.${x}`) : lo(x) ? r("editor.graphPanel.pointSymbol.custom") : x, k = (x) => {
|
|
2595
2595
|
l(null);
|
|
@@ -2667,7 +2667,7 @@ var bC = 512 * 1024, P1 = (e) => new Promise((t) => {
|
|
|
2667
2667
|
}, M1 = ({ symbol: e, glyphs: t }) => {
|
|
2668
2668
|
if (qt(e)) return /* @__PURE__ */ a(x1, { symbol: e });
|
|
2669
2669
|
const n = O1(e, t);
|
|
2670
|
-
if (n !== null &&
|
|
2670
|
+
if (n !== null && sh(n)) return /* @__PURE__ */ a("span", {
|
|
2671
2671
|
className: T1,
|
|
2672
2672
|
style: { maskImage: `url(${JSON.stringify(n)})` }
|
|
2673
2673
|
});
|
|
@@ -2682,7 +2682,7 @@ var bC = 512 * 1024, P1 = (e) => new Promise((t) => {
|
|
|
2682
2682
|
width: 16,
|
|
2683
2683
|
height: 16,
|
|
2684
2684
|
"aria-hidden": "true",
|
|
2685
|
-
children: /* @__PURE__ */ a(
|
|
2685
|
+
children: /* @__PURE__ */ a(yh, {
|
|
2686
2686
|
symbol: e,
|
|
2687
2687
|
glyphs: t,
|
|
2688
2688
|
size: 12,
|
|
@@ -2749,7 +2749,7 @@ var bC = 512 * 1024, P1 = (e) => new Promise((t) => {
|
|
|
2749
2749
|
"inside",
|
|
2750
2750
|
"outside"
|
|
2751
2751
|
], gc = () => {
|
|
2752
|
-
const e = G((w) => w), t = ne(), n =
|
|
2752
|
+
const e = G((w) => w), t = ne(), n = Eo(), r = Ee(), o = z(), { Switch: i, ToggleGroup: l } = j(), s = mc(e.layers, e.coordSystem.type, n), c = (w) => s.filter(({ support: N }) => w(N)).map(({ layer: N }) => N), d = B1(e, t), u = d.filter((w) => w.smooth !== null), h = d.filter((w) => w.missingValues !== null && w.missingValueOptions.length > 1), p = ho.filter((w) => h.some((N) => N.missingValueOptions.includes(w))), g = $1(u), m = V1(h), v = (w) => {
|
|
2753
2753
|
r.dispatch(new it({ commands: d.map((N) => new Wo({
|
|
2754
2754
|
layerId: N.layerId,
|
|
2755
2755
|
showPoints: w
|
|
@@ -3148,7 +3148,7 @@ var si = [
|
|
|
3148
3148
|
return {
|
|
3149
3149
|
value: d,
|
|
3150
3150
|
label: n(`editor.overlayMenu.legendPlaces.${d}`),
|
|
3151
|
-
icon: /* @__PURE__ */ a(
|
|
3151
|
+
icon: /* @__PURE__ */ a(Ih, {
|
|
3152
3152
|
title: "",
|
|
3153
3153
|
size: "xs",
|
|
3154
3154
|
style: { transform: `rotate(${Z1(c)}deg)` }
|
|
@@ -3683,7 +3683,7 @@ var df = (e) => {
|
|
|
3683
3683
|
}, Bc = (e) => {
|
|
3684
3684
|
const t = ye({
|
|
3685
3685
|
spec: G((n) => n.spec.annotations),
|
|
3686
|
-
scene:
|
|
3686
|
+
scene: xe(e),
|
|
3687
3687
|
panelRect: e
|
|
3688
3688
|
});
|
|
3689
3689
|
return pe((n) => {
|
|
@@ -3884,7 +3884,7 @@ var Ef = "vez73g6", Rf = "vez73g7", Nf = "vez73g8", $c = "vez73g9", Vc = "vez73g
|
|
|
3884
3884
|
}, Fn = ca((e, t) => cf(t, e)), mi = ca(Lc), Hf = ca(Ic), Gf = ({ anchor: e, readHighlightOptions: t }) => {
|
|
3885
3885
|
const { layer: n, observation: r, observationIndex: o, at: i } = e, l = la(), s = z(), { dispatch: c, paintPreview: d, clearPreview: u } = Ee(), { selectionStore: h, findGeom: p } = q(), g = xf(), m = oe(null), v = oe(u);
|
|
3886
3886
|
v.current = u;
|
|
3887
|
-
const { Button: y } = j(), f = G((E) => E), C = f.spec.annotations, S = f.config.parsingLocale, k = f.config.numberFormat, x =
|
|
3887
|
+
const { Button: y } = j(), f = G((E) => E), C = f.spec.annotations, S = f.config.parsingLocale, k = f.config.numberFormat, x = rr(), O = {
|
|
3888
3888
|
scene: f,
|
|
3889
3889
|
layer: n,
|
|
3890
3890
|
observation: r,
|
|
@@ -4378,7 +4378,7 @@ var r2 = ({ graph: e, target: t }) => {
|
|
|
4378
4378
|
children: t
|
|
4379
4379
|
});
|
|
4380
4380
|
}, a2 = (e) => {
|
|
4381
|
-
const t = Ae(da), n = G((l) => l), { findGeom: r } = q(), o =
|
|
4381
|
+
const t = Ae(da), n = G((l) => l), { findGeom: r } = q(), o = Eo(), i = Zc(Ce());
|
|
4382
4382
|
return W(() => e === null ? null : Jc(e, t, {
|
|
4383
4383
|
scene: n,
|
|
4384
4384
|
dataLabelPlacement: o,
|
|
@@ -4392,7 +4392,7 @@ var r2 = ({ graph: e, target: t }) => {
|
|
|
4392
4392
|
i
|
|
4393
4393
|
]);
|
|
4394
4394
|
}, i2 = () => {
|
|
4395
|
-
const e = Ae(da), { store: t, findGeom: n } = q(), r =
|
|
4395
|
+
const e = Ae(da), { store: t, findGeom: n } = q(), r = Eo(), o = Zc(Ce());
|
|
4396
4396
|
return pe((i) => Jc(i, e, {
|
|
4397
4397
|
scene: t.getState().scene,
|
|
4398
4398
|
dataLabelPlacement: r,
|
|
@@ -7083,12 +7083,12 @@ var r2 = ({ graph: e, target: t }) => {
|
|
|
7083
7083
|
"en-US": v2,
|
|
7084
7084
|
ar: d2,
|
|
7085
7085
|
"pt-PT": S2
|
|
7086
|
-
}, x2 = [w2,
|
|
7086
|
+
}, x2 = [w2, zu], Qc = ({ children: e, ...t }) => /* @__PURE__ */ a(Zu, {
|
|
7087
7087
|
dictionaries: x2,
|
|
7088
7088
|
...t,
|
|
7089
7089
|
children: /* @__PURE__ */ a(C2, { children: e })
|
|
7090
7090
|
}), C2 = ({ children: e }) => /* @__PURE__ */ a(ea, {
|
|
7091
|
-
direction:
|
|
7091
|
+
direction: Hl(),
|
|
7092
7092
|
children: e
|
|
7093
7093
|
}), k2 = "data-variant", ed = _s.extend({ addAttributes() {
|
|
7094
7094
|
return { variant: {
|
|
@@ -7170,7 +7170,7 @@ var r2 = ({ graph: e, target: t }) => {
|
|
|
7170
7170
|
color: "#000000",
|
|
7171
7171
|
phrase: "canvasBlack"
|
|
7172
7172
|
},
|
|
7173
|
-
...
|
|
7173
|
+
...Nu.filter(I2).map((e) => ({
|
|
7174
7174
|
color: Le[e],
|
|
7175
7175
|
phrase: e
|
|
7176
7176
|
})),
|
|
@@ -7267,7 +7267,7 @@ var E2 = "d0bl03", R2 = "d0bl04", hn = (e) => /* @__PURE__ */ a(et, {
|
|
|
7267
7267
|
const { CustomColor: r } = j(), { themeValues: o } = ar();
|
|
7268
7268
|
return /* @__PURE__ */ a(r, {
|
|
7269
7269
|
variant: "chip",
|
|
7270
|
-
value: e === null || e === Et ? null :
|
|
7270
|
+
value: e === null || e === Et ? null : ph(e, o),
|
|
7271
7271
|
onChange: t,
|
|
7272
7272
|
popupAttributes: n
|
|
7273
7273
|
});
|
|
@@ -7369,12 +7369,12 @@ var Z2 = ({ value: e, onChange: t, label: n, open: r, onOpenChange: o, popupAttr
|
|
|
7369
7369
|
StickerPicker: Z2,
|
|
7370
7370
|
MenuPopup: W2,
|
|
7371
7371
|
MenuItem: K2
|
|
7372
|
-
}, n0 = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", r0 = `'Aeonik', 'Aeonik Fallback', ${
|
|
7372
|
+
}, n0 = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", r0 = `'Aeonik', 'Aeonik Fallback', ${nr}`, o0 = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", a0 = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", So = [
|
|
7373
7373
|
{
|
|
7374
7374
|
id: "modern",
|
|
7375
7375
|
label: "Modern",
|
|
7376
7376
|
preview: "Aa",
|
|
7377
|
-
fontFamily:
|
|
7377
|
+
fontFamily: nr
|
|
7378
7378
|
},
|
|
7379
7379
|
{
|
|
7380
7380
|
id: "fresh",
|
|
@@ -7828,7 +7828,7 @@ var Z2 = ({ value: e, onChange: t, label: n, open: r, onOpenChange: o, popupAttr
|
|
|
7828
7828
|
"aria-label": t
|
|
7829
7829
|
})]
|
|
7830
7830
|
}), E0 = 200, pa = ({ content: e, extensions: t, editable: n, onUpdate: r, updateDebounceMs: o = E0 }) => {
|
|
7831
|
-
const i = oe(Ci(e)), l = oe(i.current), s =
|
|
7831
|
+
const i = oe(Ci(e)), l = oe(i.current), s = rh((d) => {
|
|
7832
7832
|
l.current = d, r?.(d);
|
|
7833
7833
|
}, o), c = _g({
|
|
7834
7834
|
extensions: t,
|
|
@@ -7884,7 +7884,7 @@ var Z2 = ({ value: e, onChange: t, label: n, open: r, onOpenChange: o, popupAttr
|
|
|
7884
7884
|
});
|
|
7885
7885
|
return /* @__PURE__ */ a("div", {
|
|
7886
7886
|
"data-testid": "caption-editor",
|
|
7887
|
-
style:
|
|
7887
|
+
style: Nh(t),
|
|
7888
7888
|
children: /* @__PURE__ */ a(pd, {
|
|
7889
7889
|
editor: r,
|
|
7890
7890
|
ariaLabel: "Chart caption"
|
|
@@ -7963,16 +7963,16 @@ var tn = "textStyle", gd = /* @__PURE__ */ new Set(["paragraph", "heading"]), md
|
|
|
7963
7963
|
});
|
|
7964
7964
|
return /* @__PURE__ */ a(Fs, {
|
|
7965
7965
|
"aria-label": t("graph.annotations.text.editLabel"),
|
|
7966
|
-
className:
|
|
7966
|
+
className: oh,
|
|
7967
7967
|
editor: i,
|
|
7968
7968
|
style: {
|
|
7969
7969
|
...l === null ? {} : { fontSize: `calc(${l}px * ${Le.textScale})` },
|
|
7970
|
-
...s === null ? {} : { fontFamily:
|
|
7970
|
+
...s === null ? {} : { fontFamily: Do(s) }
|
|
7971
7971
|
},
|
|
7972
7972
|
"data-testid": "text-annotation-editor"
|
|
7973
7973
|
});
|
|
7974
7974
|
}, ki = (e) => {
|
|
7975
|
-
const t =
|
|
7975
|
+
const t = Do(e);
|
|
7976
7976
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
7977
7977
|
}, K0 = Ns.create({
|
|
7978
7978
|
name: "annotationTextStyleAttributes",
|
|
@@ -8003,11 +8003,11 @@ var tn = "textStyle", gd = /* @__PURE__ */ new Set(["paragraph", "heading"]), md
|
|
|
8003
8003
|
showSubtitle: n
|
|
8004
8004
|
}), [t, n]);
|
|
8005
8005
|
return /* @__PURE__ */ a("div", {
|
|
8006
|
-
className:
|
|
8006
|
+
className: nh,
|
|
8007
8007
|
"data-testid": "title-editor",
|
|
8008
8008
|
children: /* @__PURE__ */ a(pd, {
|
|
8009
8009
|
editor: pa({
|
|
8010
|
-
content: W(() =>
|
|
8010
|
+
content: W(() => ju({
|
|
8011
8011
|
title: e,
|
|
8012
8012
|
showTitle: t,
|
|
8013
8013
|
subtitle: r,
|
|
@@ -8064,7 +8064,7 @@ var tn = "textStyle", gd = /* @__PURE__ */ new Set(["paragraph", "heading"]), md
|
|
|
8064
8064
|
return V(() => {
|
|
8065
8065
|
t(!0);
|
|
8066
8066
|
}, []), e;
|
|
8067
|
-
}, ny = (e) =>
|
|
8067
|
+
}, ny = (e) => Mh.some((t) => t === e), Ai = (e, t, n) => n === 0 ? 0 : e * t / n, ry = {
|
|
8068
8068
|
x: 8,
|
|
8069
8069
|
y: 8
|
|
8070
8070
|
}, oy = {
|
|
@@ -8136,7 +8136,7 @@ var tn = "textStyle", gd = /* @__PURE__ */ new Set(["paragraph", "heading"]), md
|
|
|
8136
8136
|
compiled: l.annotations,
|
|
8137
8137
|
layers: l.layers,
|
|
8138
8138
|
coordSystem: l.coordSystem
|
|
8139
|
-
}))), r =
|
|
8139
|
+
}))), r = xe(e), o = tr(), i = zo(e);
|
|
8140
8140
|
return ye({
|
|
8141
8141
|
...n,
|
|
8142
8142
|
scene: r,
|
|
@@ -8213,14 +8213,14 @@ var tn = "textStyle", gd = /* @__PURE__ */ new Set(["paragraph", "heading"]), md
|
|
|
8213
8213
|
height: 0
|
|
8214
8214
|
};
|
|
8215
8215
|
}, cy = 2, Td = () => {
|
|
8216
|
-
const e = z(), t = ne(), n =
|
|
8216
|
+
const e = z(), t = ne(), n = Wl();
|
|
8217
8217
|
return ({ annotationId: r, anchorX: o, align: i, panelWidth: l, minWidth: s, paddingInline: c, pickedFontSize: d = null, pickedFont: u = null }) => {
|
|
8218
8218
|
if (l <= 0) return s;
|
|
8219
|
-
const h = t.annotation.text(r).resolve(), p = t.graph().get("textScale"), g = d === null ? h.fontSize : d * p, m =
|
|
8219
|
+
const h = t.annotation.text(r).resolve(), p = t.graph().get("textScale"), g = d === null ? h.fontSize : d * p, m = Do(u) ?? h.fontFamily, v = (n.measureText(e("graph.annotations.text.placeholder"), gg({
|
|
8220
8220
|
...h,
|
|
8221
8221
|
fontSize: g,
|
|
8222
8222
|
fontFamily: m
|
|
8223
|
-
},
|
|
8223
|
+
}, nr)).width + (c ?? h.paddingInline) * 2 + cy) / l;
|
|
8224
8224
|
return Math.max(s, Math.min(v, dy(o, Ft(i).x)));
|
|
8225
8225
|
};
|
|
8226
8226
|
}, dy = (e, t) => {
|
|
@@ -8427,7 +8427,7 @@ var pn = {
|
|
|
8427
8427
|
id: B
|
|
8428
8428
|
}]), o.getState().setCaret(B, l.stack.getSnapshot().undoStack.at(-1)?.id ?? null), o.getState().setPlotMenu(null);
|
|
8429
8429
|
}, K = (A) => {
|
|
8430
|
-
const H =
|
|
8430
|
+
const H = bh(A, x);
|
|
8431
8431
|
if (H === null) return;
|
|
8432
8432
|
const { at: $ } = P(H, "center"), X = new Ie({
|
|
8433
8433
|
kind: "sticker",
|
|
@@ -8702,7 +8702,7 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8702
8702
|
return g.from < g.to ? g : p;
|
|
8703
8703
|
}, Ny = (e) => {
|
|
8704
8704
|
const [t] = e;
|
|
8705
|
-
return t !== void 0 && e.some((n) => !
|
|
8705
|
+
return t !== void 0 && e.some((n) => !fh(n, t));
|
|
8706
8706
|
}, wo = (e) => ({
|
|
8707
8707
|
from: e.x,
|
|
8708
8708
|
to: e.x + e.width
|
|
@@ -8716,7 +8716,7 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8716
8716
|
const h = s.current, p = /* @__PURE__ */ new Map(), m = Cy(d, {
|
|
8717
8717
|
panelRect: n,
|
|
8718
8718
|
look: r,
|
|
8719
|
-
readGridLineWidth: (f) =>
|
|
8719
|
+
readGridLineWidth: (f) => $l(i, f).strokeWidth,
|
|
8720
8720
|
measurePathBox: (f) => {
|
|
8721
8721
|
const C = h.get(f) ?? wy(t.ownerDocument, f);
|
|
8722
8722
|
return p.set(f, C), C;
|
|
@@ -8756,8 +8756,8 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8756
8756
|
}) : /* @__PURE__ */ a("path", {
|
|
8757
8757
|
d: e,
|
|
8758
8758
|
...r
|
|
8759
|
-
}), By = ({ pathData: e, source: t, ...n }) => /* @__PURE__ */ a(
|
|
8760
|
-
d:
|
|
8759
|
+
}), By = ({ pathData: e, source: t, ...n }) => /* @__PURE__ */ a(Lh, {
|
|
8760
|
+
d: Bu(e, gh, t),
|
|
8761
8761
|
...n
|
|
8762
8762
|
}), zy = "var(--dppmab0)", Hy = "data-edit-outline-stroke", Pd = (e) => ({
|
|
8763
8763
|
[Hy]: "",
|
|
@@ -8815,7 +8815,7 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8815
8815
|
const e = i2(), { store: t } = q();
|
|
8816
8816
|
return pe((n) => e(n) || Ld(n, t.getState().scene) !== null, [e, t]);
|
|
8817
8817
|
}, mn = (e, t) => e.geom === "boxplot" && Ep(t, "outlier") !== null, Gy = () => {
|
|
8818
|
-
const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Id(), s =
|
|
8818
|
+
const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Id(), s = Bl((c) => e ? c.hover.primary : null);
|
|
8819
8819
|
return W(() => {
|
|
8820
8820
|
if (s === null) return null;
|
|
8821
8821
|
const c = t.find((u) => u.id === s.layerId);
|
|
@@ -8876,11 +8876,11 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8876
8876
|
e
|
|
8877
8877
|
]);
|
|
8878
8878
|
}, Id = () => {
|
|
8879
|
-
const { showMenuTriggerOnHover: e } = Oe[
|
|
8879
|
+
const { showMenuTriggerOnHover: e } = Oe[Ce()], t = G(Te((i) => ({
|
|
8880
8880
|
layers: i.layers,
|
|
8881
8881
|
coordSystem: i.coordSystem,
|
|
8882
8882
|
parsingLocale: i.config.parsingLocale
|
|
8883
|
-
}))), { anchorResolver: n } = q(), r =
|
|
8883
|
+
}))), { anchorResolver: n } = q(), r = Dl(), o = $t();
|
|
8884
8884
|
return {
|
|
8885
8885
|
showMenuTriggerOnHover: e,
|
|
8886
8886
|
...t,
|
|
@@ -8974,7 +8974,7 @@ var Iy = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8974
8974
|
return null;
|
|
8975
8975
|
}
|
|
8976
8976
|
}, Uy = () => {
|
|
8977
|
-
const e = Gy(), t =
|
|
8977
|
+
const e = Gy(), t = Bl((s) => s.hover.intersection?.intersects === !0), n = pt()[0] ?? null, r = te((s) => s.standingInteraction), o = te((s) => s.plotMenu), { layers: i, parsingLocale: l } = G(Te((s) => ({
|
|
8978
8978
|
layers: s.layers,
|
|
8979
8979
|
parsingLocale: s.config.parsingLocale
|
|
8980
8980
|
})));
|
|
@@ -9103,7 +9103,7 @@ var Oi = (e, t) => {
|
|
|
9103
9103
|
return $r([...eb(i.filter((s) => !tb(s)))].flatMap(([s, c]) => r[s] === "direct" ? c.map(l) : [io(c.map(l))]));
|
|
9104
9104
|
case "grid":
|
|
9105
9105
|
return i.flatMap((s) => {
|
|
9106
|
-
const c =
|
|
9106
|
+
const c = or([s], e);
|
|
9107
9107
|
if (c?.kind !== "grid" || c.target.axis === "both") return [];
|
|
9108
9108
|
const { axis: d } = c.target;
|
|
9109
9109
|
return t.axis === "both" || d === t.axis ? [nb(s, l(s), d)] : [];
|
|
@@ -9115,7 +9115,7 @@ var Oi = (e, t) => {
|
|
|
9115
9115
|
}, eb = (e) => {
|
|
9116
9116
|
const t = /* @__PURE__ */ new Map();
|
|
9117
9117
|
for (const n of e) {
|
|
9118
|
-
const r =
|
|
9118
|
+
const r = Du(n);
|
|
9119
9119
|
r !== null && t.set(r.legendIndex, [...t.get(r.legendIndex) ?? [], n]);
|
|
9120
9120
|
}
|
|
9121
9121
|
return t;
|
|
@@ -9178,7 +9178,7 @@ var Oi = (e, t) => {
|
|
|
9178
9178
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
9179
9179
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
9180
9180
|
}, ob = [], ab = (e, { frameElement: t, frameSize: n, panelRect: r }) => {
|
|
9181
|
-
const { animateTransitions: o } =
|
|
9181
|
+
const { animateTransitions: o } = Nl(), i = G((v) => v.coordSystem), l = Ol(), s = Dl(), c = lb(e.kind === "guide" ? e.target : null, {
|
|
9182
9182
|
frameElement: t,
|
|
9183
9183
|
frameSize: n
|
|
9184
9184
|
}), d = ib(t, n), u = W(() => ({
|
|
@@ -9267,7 +9267,7 @@ var Oi = (e, t) => {
|
|
|
9267
9267
|
})
|
|
9268
9268
|
};
|
|
9269
9269
|
}, lb = (e, { frameElement: t, frameSize: n }) => {
|
|
9270
|
-
const r =
|
|
9270
|
+
const r = Ju(e !== null), o = G((p) => p.coordSystem.type), i = G(Te((p) => p.guides.legends.drawn.map((g) => g.display))), l = G((p) => e === null ? null : p), [s, c] = ae([]), d = ye(e), u = oe(!1), h = pe(() => {
|
|
9271
9271
|
const p = d.current;
|
|
9272
9272
|
if (p === null) return;
|
|
9273
9273
|
const g = Jy({
|
|
@@ -9336,7 +9336,7 @@ var Oi = (e, t) => {
|
|
|
9336
9336
|
};
|
|
9337
9337
|
}
|
|
9338
9338
|
}, cb = ["x", "y"], db = Os(function({ frameElement: t, frameSize: n, panelRect: r }) {
|
|
9339
|
-
const o =
|
|
9339
|
+
const o = Ou(cg, ne()), i = Wy(), l = qy(i?.outlined ?? null), { selectObservationsOnPress: s, selectGraphOnPress: c, selectGuidesOnPress: d } = Oe[Ce()], u = Uy(), h = s || c || d, p = h ? l : u;
|
|
9340
9340
|
if (i === null && p === null) return null;
|
|
9341
9341
|
const g = {
|
|
9342
9342
|
frameElement: t,
|
|
@@ -9462,7 +9462,7 @@ var Oi = (e, t) => {
|
|
|
9462
9462
|
return n * Math.max(1, Math.round(2 * Math.PI * e / t)) * t;
|
|
9463
9463
|
}, mb = (e, t, n) => {
|
|
9464
9464
|
const r = n.offset + gn(n);
|
|
9465
|
-
return
|
|
9465
|
+
return No(gt({
|
|
9466
9466
|
x: 0,
|
|
9467
9467
|
y: 0,
|
|
9468
9468
|
...e
|
|
@@ -9533,13 +9533,13 @@ var Oi = (e, t) => {
|
|
|
9533
9533
|
}, i);
|
|
9534
9534
|
case "dots":
|
|
9535
9535
|
return r.centers.length === 0 ? null : /* @__PURE__ */ a("path", {
|
|
9536
|
-
d:
|
|
9536
|
+
d: hh(r.centers, r.size / 2),
|
|
9537
9537
|
pathLength: Ed(r.size / 2, n, r.centers.length),
|
|
9538
9538
|
"data-geom": t.geom
|
|
9539
9539
|
}, i);
|
|
9540
9540
|
}
|
|
9541
9541
|
}), yb = ({ boxes: e, borderRadius: t }) => {
|
|
9542
|
-
const n = e.map((r) =>
|
|
9542
|
+
const n = e.map((r) => No(r, t)).join("");
|
|
9543
9543
|
return n === "" ? null : /* @__PURE__ */ a("path", {
|
|
9544
9544
|
d: n,
|
|
9545
9545
|
"data-testid": "edit-outline-boxes"
|
|
@@ -9547,7 +9547,7 @@ var Oi = (e, t) => {
|
|
|
9547
9547
|
}, bb = ({ target: e, shapes: t, borderRadius: n, dashPeriod: r }) => {
|
|
9548
9548
|
const o = ne();
|
|
9549
9549
|
if (e.kind === "grid") return cb.map((l) => {
|
|
9550
|
-
const s = Pd(
|
|
9550
|
+
const s = Pd($l(o, l).strokeWidth), c = t.map((u) => Sb(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
|
|
9551
9551
|
return /* @__PURE__ */ b(Ms, { children: [c !== "" && /* @__PURE__ */ a("path", {
|
|
9552
9552
|
d: c,
|
|
9553
9553
|
...s
|
|
@@ -9557,7 +9557,7 @@ var Oi = (e, t) => {
|
|
|
9557
9557
|
...s
|
|
9558
9558
|
}, h))] }, l);
|
|
9559
9559
|
});
|
|
9560
|
-
const i = t.map((l) => l.kind === "box" ?
|
|
9560
|
+
const i = t.map((l) => l.kind === "box" ? No(l.rect, n) : "").join("");
|
|
9561
9561
|
return i === "" ? null : /* @__PURE__ */ a("path", { d: i });
|
|
9562
9562
|
}, Sb = (e, t) => e.kind === "line" && e.axis === t ? `M${e.from.x},${e.from.y}L${e.to.x},${e.to.y}` : "", wb = ({ center: e, radius: t }) => {
|
|
9563
9563
|
const n = `${e.x},${e.y - t}`;
|
|
@@ -9713,7 +9713,7 @@ var Oi = (e, t) => {
|
|
|
9713
9713
|
xValue: Ab,
|
|
9714
9714
|
group: Tb
|
|
9715
9715
|
}, Lb = () => {
|
|
9716
|
-
const { selectionStore: e } = q(), t = le(), n = z(), r =
|
|
9716
|
+
const { selectionStore: e } = q(), t = le(), n = z(), r = rr(), o = G((y) => y), i = wr(o, r), l = te((y) => y.pressedObservation), s = $t(), c = W(() => Ib({
|
|
9717
9717
|
scene: o,
|
|
9718
9718
|
pressed: l,
|
|
9719
9719
|
groupOptions: i,
|
|
@@ -9755,7 +9755,7 @@ var Oi = (e, t) => {
|
|
|
9755
9755
|
ariaLabel: n("editor.overlayMenu.selection")
|
|
9756
9756
|
});
|
|
9757
9757
|
}, Ib = ({ scene: e, pressed: t, groupOptions: n, locale: r, t: o, hasOverlayMenu: i }) => {
|
|
9758
|
-
const l = t === null ? null :
|
|
9758
|
+
const l = t === null ? null : Eh(t, e.layers, e.config.parsingLocale);
|
|
9759
9759
|
if (t === null || l === null) return null;
|
|
9760
9760
|
const { layer: s, observation: c } = l, { observationIndex: d, selectedFor: u } = t, { parsingLocale: h } = e.config, p = ng({
|
|
9761
9761
|
layer: s,
|
|
@@ -9891,7 +9891,7 @@ var Oi = (e, t) => {
|
|
|
9891
9891
|
return e;
|
|
9892
9892
|
}
|
|
9893
9893
|
}, Vb = ({ target: e }) => {
|
|
9894
|
-
const t = z(), n =
|
|
9894
|
+
const t = z(), n = rr(), r = G((l) => l), o = wr(r, n), i = W(() => Kb({
|
|
9895
9895
|
target: e,
|
|
9896
9896
|
scene: r,
|
|
9897
9897
|
groupOptions: o,
|
|
@@ -9911,7 +9911,7 @@ var Oi = (e, t) => {
|
|
|
9911
9911
|
c === null || d === null || o(d.offsetWidth > c.clientWidth);
|
|
9912
9912
|
}, []);
|
|
9913
9913
|
Qe(i, [i, e.whole]);
|
|
9914
|
-
const { setElement: l } =
|
|
9914
|
+
const { setElement: l } = Qu({ onResize: i }), s = pe((c) => {
|
|
9915
9915
|
t.current = c, l(c);
|
|
9916
9916
|
}, [l]);
|
|
9917
9917
|
return /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ a(ue.Title, {
|
|
@@ -9947,7 +9947,7 @@ var Oi = (e, t) => {
|
|
|
9947
9947
|
t: o
|
|
9948
9948
|
}, e.scope);
|
|
9949
9949
|
}, Ub = ({ frameElement: e, panelRect: t }) => {
|
|
9950
|
-
const n = Bc(t), { selectionStore: r } = q(), o = Xb(te((p) => p.selectedOutline)), i = te((p) => p.annotatePress), l = Oe[
|
|
9950
|
+
const n = Bc(t), { selectionStore: r } = q(), o = Xb(te((p) => p.selectedOutline)), i = te((p) => p.annotatePress), l = Oe[Ce()].showMenuTriggerOnHover, s = a2(o?.target ?? null), c = $t(), d = o === null ? null : sn(o.target), u = W(() => l && d !== null ? Db(i, d) : null, [
|
|
9951
9951
|
l,
|
|
9952
9952
|
i,
|
|
9953
9953
|
d
|
|
@@ -10053,7 +10053,7 @@ var Oi = (e, t) => {
|
|
|
10053
10053
|
};
|
|
10054
10054
|
}, Di = (e, t, n, r) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : ut(t, Math.min(n - e, 0), Math.max(r - e, 0)), xr = ({ stroke: e, strokeAlpha: t }) => `color-mix(in srgb, ${e} ${t * 100}%, transparent)`, Nd = (e, t, n, r) => {
|
|
10055
10055
|
const o = e.textAnnotations.find((i) => i.id === t);
|
|
10056
|
-
return o === void 0 ? null :
|
|
10056
|
+
return o === void 0 ? null : Ku(Ph(o, n), r);
|
|
10057
10057
|
}, Vt = () => {
|
|
10058
10058
|
const e = pt();
|
|
10059
10059
|
return Ot(e);
|
|
@@ -10069,7 +10069,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10069
10069
|
x: e.x * t.width,
|
|
10070
10070
|
y: e.y * t.height
|
|
10071
10071
|
}), t5 = ({ panelRect: e }) => {
|
|
10072
|
-
const t =
|
|
10072
|
+
const t = xe(e), n = tr(), r = ne(), o = Vt(), i = te((f) => J(f, "move-drag")), l = te((f) => J(f, "shape-resize-drag")), s = te((f) => J(f, "arrow-endpoint-drag")), c = te((f) => J(f, "text-resize-drag")), d = te(ch), u = {
|
|
10073
10073
|
panel: {
|
|
10074
10074
|
width: e.width,
|
|
10075
10075
|
height: e.height
|
|
@@ -10107,7 +10107,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10107
10107
|
})] });
|
|
10108
10108
|
}, _i = (e, t, n) => {
|
|
10109
10109
|
if (t === null) return null;
|
|
10110
|
-
const r =
|
|
10110
|
+
const r = wh(e, t, n);
|
|
10111
10111
|
return r === null ? null : {
|
|
10112
10112
|
id: t,
|
|
10113
10113
|
geometry: r
|
|
@@ -10150,7 +10150,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10150
10150
|
top: t.y + e.y
|
|
10151
10151
|
}
|
|
10152
10152
|
}), wa = "c44vv80", n5 = ({ panelRect: e }) => {
|
|
10153
|
-
const t = te((l) => J(l, "move-drag")), n =
|
|
10153
|
+
const t = te((l) => J(l, "move-drag")), n = xe(e);
|
|
10154
10154
|
if (t === null) return null;
|
|
10155
10155
|
const r = Rl(t) !== null, o = r ? {
|
|
10156
10156
|
x: 0,
|
|
@@ -10171,7 +10171,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10171
10171
|
});
|
|
10172
10172
|
}, r5 = ({ annotation: e, panelSize: t }) => {
|
|
10173
10173
|
const n = Eu(e.id);
|
|
10174
|
-
return /* @__PURE__ */ a(
|
|
10174
|
+
return /* @__PURE__ */ a(kh, {
|
|
10175
10175
|
annotation: e,
|
|
10176
10176
|
panel: t,
|
|
10177
10177
|
style: Is(ne(), e.id),
|
|
@@ -10214,20 +10214,20 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10214
10214
|
panelWidth: t.width,
|
|
10215
10215
|
panelHeight: t.height
|
|
10216
10216
|
});
|
|
10217
|
-
return r === null ? null : /* @__PURE__ */ a(
|
|
10217
|
+
return r === null ? null : /* @__PURE__ */ a(_l, {
|
|
10218
10218
|
computed: r,
|
|
10219
10219
|
style: n,
|
|
10220
10220
|
addressable: !1
|
|
10221
10221
|
});
|
|
10222
|
-
}, l5 = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(
|
|
10222
|
+
}, l5 = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(Vl, {
|
|
10223
10223
|
shape: e,
|
|
10224
10224
|
style: ne().annotation.shape(e.id).resolve(),
|
|
10225
10225
|
panel: t
|
|
10226
|
-
}), s5 = ({ sticker: e, panelSize: t }) => /* @__PURE__ */ a(
|
|
10226
|
+
}), s5 = ({ sticker: e, panelSize: t }) => /* @__PURE__ */ a(dh, {
|
|
10227
10227
|
sticker: e,
|
|
10228
10228
|
panel: t,
|
|
10229
10229
|
textScale: ne().graph().get("textScale")
|
|
10230
|
-
}), c5 = ({ image: e, panelSize: t }) => /* @__PURE__ */ a(
|
|
10230
|
+
}), c5 = ({ image: e, panelSize: t }) => /* @__PURE__ */ a(Kl, {
|
|
10231
10231
|
image: e,
|
|
10232
10232
|
panel: t,
|
|
10233
10233
|
style: ne().annotation.image(e.id).resolve()
|
|
@@ -10389,7 +10389,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10389
10389
|
strokeWidth: e.strokeWidth,
|
|
10390
10390
|
strokeDasharray: mr(e.dashArray, e.strokeWidth)
|
|
10391
10391
|
}), g5 = (e) => e.target.type === "observation" ? e.target.box : e.target.rect, m5 = (e) => e.target.type === "observation" ? String(e.target.point.anchor.anchorValue) : e.target.id, v5 = ({ panelRect: e }) => {
|
|
10392
|
-
const t = te((s) => J(s, "arrow-endpoint-drag")), n =
|
|
10392
|
+
const t = te((s) => J(s, "arrow-endpoint-drag")), n = xe(e).arrows, r = ne();
|
|
10393
10393
|
if (t === null) return null;
|
|
10394
10394
|
const o = n.find((s) => s.id === t.annotationId);
|
|
10395
10395
|
if (o === void 0) return null;
|
|
@@ -10410,7 +10410,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10410
10410
|
},
|
|
10411
10411
|
"data-testid": "arrow-endpoint-preview",
|
|
10412
10412
|
"data-annotation-id": t.annotationId,
|
|
10413
|
-
children: /* @__PURE__ */ a(
|
|
10413
|
+
children: /* @__PURE__ */ a(_l, {
|
|
10414
10414
|
computed: l,
|
|
10415
10415
|
style: i,
|
|
10416
10416
|
addressable: !1
|
|
@@ -10595,7 +10595,7 @@ var Qb = "_1am0al61", e5 = "_1am0al62", Sa = (e, t, n) => ({
|
|
|
10595
10595
|
});
|
|
10596
10596
|
}, E5 = ({ color: e, opacity: t }) => /* @__PURE__ */ a("span", {
|
|
10597
10597
|
className: x5,
|
|
10598
|
-
style: { background: t === void 0 ? e :
|
|
10598
|
+
style: { background: t === void 0 ? e : Sh(e, t) }
|
|
10599
10599
|
}), R5 = ({ label: e, onClick: t, children: n }) => /* @__PURE__ */ a(hn, {
|
|
10600
10600
|
label: e,
|
|
10601
10601
|
children: /* @__PURE__ */ a(ve.Button, {
|
|
@@ -11482,7 +11482,7 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11482
11482
|
}
|
|
11483
11483
|
readOwn(e) {
|
|
11484
11484
|
const { annotationId: t, endpoint: n } = this.params;
|
|
11485
|
-
return
|
|
11485
|
+
return Ro(J(e, "arrow-endpoint-drag"), t, n);
|
|
11486
11486
|
}
|
|
11487
11487
|
resolvePreview(e, t) {
|
|
11488
11488
|
const { annotationId: n, endpoint: r, press: o, readInputs: i, engine: l, anchorResolver: s, editorStore: c } = this.params, d = i(), { spec: u, arrow: h, scene: p, panelRect: g, layers: m, coordSystem: v, measuredBoxes: y, readObservationBox: f } = d, C = Bn(u, n, r);
|
|
@@ -11553,7 +11553,7 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11553
11553
|
spec: m.spec.annotations,
|
|
11554
11554
|
layers: m.layers,
|
|
11555
11555
|
coordSystem: m.coordSystem
|
|
11556
|
-
}))), d =
|
|
11556
|
+
}))), d = xe(n), u = tr(), h = zo(n), p = ye({
|
|
11557
11557
|
...c,
|
|
11558
11558
|
arrow: t,
|
|
11559
11559
|
scene: d,
|
|
@@ -11613,7 +11613,7 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11613
11613
|
c
|
|
11614
11614
|
]), pe((d) => ({ onKeyDown: (u) => {
|
|
11615
11615
|
if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
|
|
11616
|
-
const h = i.getState(), p =
|
|
11616
|
+
const h = i.getState(), p = Ro(J(h, "arrow-endpoint-drag"), e, d);
|
|
11617
11617
|
if (tS.includes(u.key)) {
|
|
11618
11618
|
if (u.preventDefault(), u.repeat) return;
|
|
11619
11619
|
if (p !== null) {
|
|
@@ -11664,7 +11664,7 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11664
11664
|
o
|
|
11665
11665
|
]);
|
|
11666
11666
|
}, Ki = ({ editorStore: e, annotationId: t, endpoint: n, annotations: r, dispatch: o }) => {
|
|
11667
|
-
const i = e.getState(), l =
|
|
11667
|
+
const i = e.getState(), l = Ro(J(i, "arrow-endpoint-drag"), t, n);
|
|
11668
11668
|
if (l === null) return;
|
|
11669
11669
|
i.releaseInteraction("arrow-endpoint-drag");
|
|
11670
11670
|
const s = Cd(r, t, n);
|
|
@@ -11758,7 +11758,7 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11758
11758
|
const t = G((n) => n.spec.annotations.arrows);
|
|
11759
11759
|
return e === null ? null : t.find((n) => n.id === e) ?? null;
|
|
11760
11760
|
}, sS = (e, t) => {
|
|
11761
|
-
const n =
|
|
11761
|
+
const n = xe(e).arrows;
|
|
11762
11762
|
return t === null ? null : n.find((r) => r.id === t) ?? null;
|
|
11763
11763
|
}, cS = (e) => te(Te((t) => {
|
|
11764
11764
|
if (e === null) return {
|
|
@@ -11788,12 +11788,12 @@ var Ye = (e, t) => t ? e.altKey : !e.altKey, Kd = (e, t) => Math.hypot(t.x - e.x
|
|
|
11788
11788
|
engine: l,
|
|
11789
11789
|
anchorResolver: s
|
|
11790
11790
|
});
|
|
11791
|
-
if (p === null ||
|
|
11791
|
+
if (p === null || ah(p.startPoint, p.endPoint)) return;
|
|
11792
11792
|
const g = new Ie({
|
|
11793
11793
|
kind: "arrow",
|
|
11794
11794
|
annotation: {
|
|
11795
11795
|
...Xl,
|
|
11796
|
-
...
|
|
11796
|
+
...mh(u.heads),
|
|
11797
11797
|
start: u.start,
|
|
11798
11798
|
end: p.placement.anchor
|
|
11799
11799
|
}
|
|
@@ -11930,7 +11930,7 @@ var Ui = 24, pS = /* @__PURE__ */ new Set(), Xi = /* @__PURE__ */ new WeakMap(),
|
|
|
11930
11930
|
const n = Math.max(t.x - e.x, 0, e.x - (t.x + t.width)), r = Math.max(t.y - e.y, 0, e.y - (t.y + t.height));
|
|
11931
11931
|
return Math.hypot(n, r);
|
|
11932
11932
|
}, Wr = [], bS = ({ frameElement: e, panelRect: t }) => {
|
|
11933
|
-
const { chartId: n, commands: r, selectionStore: o, anchorResolver: i } = q(), { engine: l } = Re(), s = le(), c = la(), d = Gt(t, e), u = d.current, h = ne().snapTarget.nearby().resolve(), p = Oe[
|
|
11933
|
+
const { chartId: n, commands: r, selectionStore: o, anchorResolver: i } = q(), { engine: l } = Re(), s = le(), c = la(), d = Gt(t, e), u = d.current, h = ne().snapTarget.nearby().resolve(), p = Oe[Ce()].showMenuTriggerOnHover, g = G((D) => D.coordSystem.type === "polar"), m = pt().length > 0, v = te((D) => D.standingInteraction !== null || D.plotMenu !== null || D.caret !== null), y = p && !g && !m && !v, [f, C] = ae(Wr), S = oe(null), k = oe(null);
|
|
11934
11934
|
if (V(() => {
|
|
11935
11935
|
if (!y) {
|
|
11936
11936
|
S.current = null, C(Wr);
|
|
@@ -12091,11 +12091,11 @@ var wS = "ydgo3h1", xS = "ydgo3h2", CS = "ydgo3h3", kS = "ydgo3h4", qi = {
|
|
|
12091
12091
|
});
|
|
12092
12092
|
return r !== void 0 ? r : n.find((o) => Dn[o].arrow.strokeWidth === e.strokeWidth);
|
|
12093
12093
|
}, TS = (e, t, n) => !(t.fontSize !== void 0 && e.fontSize !== t.fontSize * n || t.fontWeight !== void 0 && e.fontWeight !== t.fontWeight || t.paddingInline !== void 0 && e.paddingInline !== t.paddingInline || t.paddingBlock !== void 0 && e.paddingBlock !== t.paddingBlock || t.strokeWidth !== void 0 && e.strokeWidth !== t.strokeWidth), PS = "q7gcrz0", LS = "q7gcrz1", IS = "q7gcrz2";
|
|
12094
|
-
var MS = 4, OS = 6, ES =
|
|
12094
|
+
var MS = 4, OS = 6, ES = eh.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, labelKindName: n, labelKindValue: r, sizeLabel: o }) => {
|
|
12095
12095
|
const i = {
|
|
12096
|
-
family:
|
|
12097
|
-
size:
|
|
12098
|
-
weight:
|
|
12096
|
+
family: nr,
|
|
12097
|
+
size: Gu(Wu.md, t),
|
|
12098
|
+
weight: Xu.medium
|
|
12099
12099
|
}, l = (u) => u.length === 0 ? 0 : e.measureText(u, i).width, s = (u) => u === 0 ? 0 : u * MS, c = [n, r].filter((u) => u.length > 0).length, d = o.length === 0 ? 0 : 1;
|
|
12100
12100
|
return l(n) + l(r) + l(o) + s(c) + s(d) + DS();
|
|
12101
12101
|
}, DS = () => 36 + 34 * RS + OS * 4 + ES * 2, _S = [
|
|
@@ -12138,7 +12138,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
12138
12138
|
key: "graph.annotations.differenceArrowToolbar.size.large"
|
|
12139
12139
|
}
|
|
12140
12140
|
], HS = ({ arrow: e, color: t, labelBox: n, start: r, end: o, panelRect: i, frameWidth: l, frameHeight: s, frameElement: c }) => {
|
|
12141
|
-
const d = z(), u =
|
|
12141
|
+
const d = z(), u = Wl(), { commands: h } = q(), p = G((A) => A.spec.styles.overrides), g = G((A) => De(A.spec)), m = vn(), v = zS(e), y = ne(), f = sg(y, e.id), C = y.graph().get("textScale"), S = W(() => ({
|
|
12142
12142
|
target: "annotation",
|
|
12143
12143
|
kind: "differenceArrow",
|
|
12144
12144
|
annotation: e.id
|
|
@@ -12477,7 +12477,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
12477
12477
|
})
|
|
12478
12478
|
})?.point ?? null;
|
|
12479
12479
|
}, qS = (e) => {
|
|
12480
|
-
const t = Vt(), n =
|
|
12480
|
+
const t = Vt(), n = Fl(), r = pe((o) => {
|
|
12481
12481
|
const i = e.frameElement.querySelector('[data-testid="pointer-capture-layer"]');
|
|
12482
12482
|
i !== null && i.dispatchEvent(new PointerEvent("pointerdown", {
|
|
12483
12483
|
bubbles: !0,
|
|
@@ -12504,7 +12504,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
12504
12504
|
}, o.id))]
|
|
12505
12505
|
});
|
|
12506
12506
|
}, YS = ({ annotationId: e, panelOrigin: t, ...n }) => {
|
|
12507
|
-
const r =
|
|
12507
|
+
const r = Fl(), o = W(() => r.find((i) => i.id === e), [r, e]);
|
|
12508
12508
|
return o === void 0 ? null : /* @__PURE__ */ a(ZS, {
|
|
12509
12509
|
committedArrow: o.committedArrow,
|
|
12510
12510
|
color: o.color,
|
|
@@ -12682,7 +12682,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
12682
12682
|
y: o
|
|
12683
12683
|
};
|
|
12684
12684
|
}, rw = (e, t) => {
|
|
12685
|
-
const { selectionStore: n, chartId: r, history: o, store: i, anchorResolver: l } = q(), { store: s, engine: c, overlayRef: d } = Re(), u = $t(), h = le(), p = ye(G((R) => R.spec.annotations.textAnnotations)), g = oe(null), m = oe(null), v = oe(!0), y = oe(/* @__PURE__ */ new WeakSet()), { showAnnotations: f, showMenuTriggerOnHover: C } = Oe[
|
|
12685
|
+
const { selectionStore: n, chartId: r, history: o, store: i, anchorResolver: l } = q(), { store: s, engine: c, overlayRef: d } = Re(), u = $t(), h = le(), p = ye(G((R) => R.spec.annotations.textAnnotations)), g = oe(null), m = oe(null), v = oe(!0), y = oe(/* @__PURE__ */ new WeakSet()), { showAnnotations: f, showMenuTriggerOnHover: C } = Oe[Ce()], S = St(t), k = pe((R) => {
|
|
12686
12686
|
const { selection: P } = n.getState(), D = f ? Ot(P) : null;
|
|
12687
12687
|
D !== null && (R.preventDefault(), S(D), e.focus({ preventScroll: !0 }));
|
|
12688
12688
|
}, [
|
|
@@ -12830,7 +12830,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
12830
12830
|
}, aw = (e, t, n, r) => {
|
|
12831
12831
|
const o = iw(t.primary, n, r);
|
|
12832
12832
|
if (o !== null) {
|
|
12833
|
-
const i = e.query(o, { tolerance:
|
|
12833
|
+
const i = e.query(o, { tolerance: zl });
|
|
12834
12834
|
if (Hn(Lt(i.primary), Lt(t.primary))) return {
|
|
12835
12835
|
primary: i.primary,
|
|
12836
12836
|
group: [...i.group],
|
|
@@ -13024,7 +13024,7 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
13024
13024
|
x: e.start.x * n.width,
|
|
13025
13025
|
y: e.start.y * n.height
|
|
13026
13026
|
}, nl = (e, t, n) => Math.min(Math.max(e, t), n), pw = ({ panelRect: e }) => {
|
|
13027
|
-
const t = te((s) => J(s, "shape-resize-drag")), { shapes: n, images: r } =
|
|
13027
|
+
const t = te((s) => J(s, "shape-resize-drag")), { shapes: n, images: r } = xe(e), o = ne();
|
|
13028
13028
|
if (t === null) return null;
|
|
13029
13029
|
const i = t.annotationKind === "image" ? r.find((s) => s.id === t.annotationId) : void 0, l = t.annotationKind === "shape" ? n.find((s) => s.id === t.annotationId) : void 0;
|
|
13030
13030
|
return l === void 0 && i === void 0 ? null : /* @__PURE__ */ b("svg", {
|
|
@@ -13038,14 +13038,14 @@ var MS = 4, OS = 6, ES = Ju.sm, RS = 3, NS = ({ textMeasurer: e, textScale: t, l
|
|
|
13038
13038
|
},
|
|
13039
13039
|
"data-testid": "shape-resize-preview",
|
|
13040
13040
|
"data-annotation-id": t.annotationId,
|
|
13041
|
-
children: [l !== void 0 && /* @__PURE__ */ a(
|
|
13041
|
+
children: [l !== void 0 && /* @__PURE__ */ a(Vl, {
|
|
13042
13042
|
shape: {
|
|
13043
13043
|
...l,
|
|
13044
13044
|
region: t.region
|
|
13045
13045
|
},
|
|
13046
13046
|
style: o.annotation.shape(l.id).resolve(),
|
|
13047
13047
|
panel: e
|
|
13048
|
-
}), i !== void 0 && /* @__PURE__ */ a(
|
|
13048
|
+
}), i !== void 0 && /* @__PURE__ */ a(Kl, {
|
|
13049
13049
|
image: {
|
|
13050
13050
|
...i,
|
|
13051
13051
|
region: t.region
|
|
@@ -13388,7 +13388,7 @@ var ww = ({ width: e, height: t }) => ({
|
|
|
13388
13388
|
const n = G((o) => o.spec.annotations), r = G((o) => o.layers);
|
|
13389
13389
|
return ye({
|
|
13390
13390
|
spec: n,
|
|
13391
|
-
scene:
|
|
13391
|
+
scene: xe(e),
|
|
13392
13392
|
panelRect: e,
|
|
13393
13393
|
frameElement: t,
|
|
13394
13394
|
layers: r,
|
|
@@ -13452,7 +13452,7 @@ var ww = ({ width: e, height: t }) => ({
|
|
|
13452
13452
|
if (g === null) return null;
|
|
13453
13453
|
const m = c(d), v = s.resolve(u, g, { altKey: !1 }, m?.unsnappedRegion ?? d.region);
|
|
13454
13454
|
if (v === null) return null;
|
|
13455
|
-
const y = m?.initialPreview ?? null, f = y !== null && Iw(y.region, v.unsnappedRegion, p.panelRect) ? y : v.preview, C =
|
|
13455
|
+
const y = m?.initialPreview ?? null, f = y !== null && Iw(y.region, v.unsnappedRegion, p.panelRect) ? y : v.preview, C = Ah(d, f) ? d : f;
|
|
13456
13456
|
return l.current = {
|
|
13457
13457
|
preview: C,
|
|
13458
13458
|
initialPreview: y,
|
|
@@ -13567,7 +13567,7 @@ var ww = ({ width: e, height: t }) => ({
|
|
|
13567
13567
|
annotation: i
|
|
13568
13568
|
};
|
|
13569
13569
|
})), Dw = (e, t) => {
|
|
13570
|
-
const { shapes: n, images: r } =
|
|
13570
|
+
const { shapes: n, images: r } = xe(e);
|
|
13571
13571
|
if (t === null) return null;
|
|
13572
13572
|
const o = (t.kind === "shape" ? n : r).find((d) => d.id === t.annotation.id);
|
|
13573
13573
|
if (o === void 0) return null;
|
|
@@ -13703,7 +13703,7 @@ var Fw = (e, t, n) => {
|
|
|
13703
13703
|
]
|
|
13704
13704
|
});
|
|
13705
13705
|
}, zw = ({ panelRect: e, frameRect: t, frameElement: n }) => {
|
|
13706
|
-
const r = Vt(), o = G((d) => d.spec.annotations.stickers.find((u) => u.id === r)), i =
|
|
13706
|
+
const r = Vt(), o = G((d) => d.spec.annotations.stickers.find((u) => u.id === r)), i = xe(e).stickers.find((d) => d.id === r), l = ne().graph().get("textScale"), s = te((d) => J(d, "move-drag")?.annotationId === r);
|
|
13707
13707
|
if (o === void 0 || i === void 0) return null;
|
|
13708
13708
|
const c = Pu(i, e, l);
|
|
13709
13709
|
return c === null ? null : /* @__PURE__ */ b("div", {
|
|
@@ -13811,7 +13811,7 @@ var du = [
|
|
|
13811
13811
|
}), C = Jt({
|
|
13812
13812
|
editor: y,
|
|
13813
13813
|
selector: () => vd(y)
|
|
13814
|
-
}), S = Gw(v.font ?? C), k = $w(v.fontSize ?? f), x =
|
|
13814
|
+
}), S = Gw(v.font ?? C), k = $w(v.fontSize ?? f), x = vh(m), O = v.color ?? x, R = W(() => ({
|
|
13815
13815
|
target: "annotation",
|
|
13816
13816
|
kind: "text",
|
|
13817
13817
|
annotation: e.id
|
|
@@ -14062,7 +14062,7 @@ var uu = ({ width: e }) => Q(60, e), il = (e, t) => ({
|
|
|
14062
14062
|
}, Yw = ({ annotationId: e, panelRect: t, frameElement: n }) => {
|
|
14063
14063
|
const { commands: r } = q(), o = le(), i = ye({
|
|
14064
14064
|
annotations: G((l) => l.spec.annotations),
|
|
14065
|
-
painted:
|
|
14065
|
+
painted: xe(t),
|
|
14066
14066
|
cartesian: G((l) => l.coordSystem.type === "cartesian"),
|
|
14067
14067
|
panelRect: t,
|
|
14068
14068
|
frameElement: n
|
|
@@ -14076,7 +14076,7 @@ var uu = ({ width: e }) => Q(60, e), il = (e, t) => ({
|
|
|
14076
14076
|
dispatch: r.dispatch
|
|
14077
14077
|
}));
|
|
14078
14078
|
}, Zw = 4, Jw = ({ annotationId: e, panelRect: t, frameElement: n }) => {
|
|
14079
|
-
const { commands: r } = q(), o = le(), i = G((d) => d.spec.annotations), l =
|
|
14079
|
+
const { commands: r } = q(), o = le(), i = G((d) => d.spec.annotations), l = xe(t), s = G((d) => d.coordSystem.type === "cartesian"), c = (d, u) => {
|
|
14080
14080
|
const h = er(i, e, l, s);
|
|
14081
14081
|
return h === null ? null : {
|
|
14082
14082
|
kind: "text-resize-drag",
|
|
@@ -14142,7 +14142,7 @@ var uu = ({ width: e }) => Q(60, e), il = (e, t) => ({
|
|
|
14142
14142
|
annotationId: e.id,
|
|
14143
14143
|
panelRect: l,
|
|
14144
14144
|
frameElement: c
|
|
14145
|
-
}), p =
|
|
14145
|
+
}), p = xe(l).textAnnotations.find((g) => g.id === e.id);
|
|
14146
14146
|
return /* @__PURE__ */ b("div", {
|
|
14147
14147
|
"data-testid": "text-selection",
|
|
14148
14148
|
"data-annotation-id": e.id,
|
|
@@ -14198,7 +14198,7 @@ var uu = ({ width: e }) => Q(60, e), il = (e, t) => ({
|
|
|
14198
14198
|
resized: Bo(J(t, "text-resize-drag"), e),
|
|
14199
14199
|
moving: an(J(t, "move-drag"), e) !== null
|
|
14200
14200
|
})), ox = (e, t, n) => {
|
|
14201
|
-
const r =
|
|
14201
|
+
const r = xe(e), o = tr(), i = ne(), l = W(() => ({
|
|
14202
14202
|
panel: {
|
|
14203
14203
|
width: e.width,
|
|
14204
14204
|
height: e.height
|
|
@@ -14212,7 +14212,7 @@ var uu = ({ width: e }) => Q(60, e), il = (e, t) => ({
|
|
|
14212
14212
|
i
|
|
14213
14213
|
]);
|
|
14214
14214
|
return t === null ? null : Nd(r, t, n, l)?.rect ?? null;
|
|
14215
|
-
}, Pa = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], ax = (e, t, n) =>
|
|
14215
|
+
}, Pa = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], ax = (e, t, n) => or(Pa(e, t), n), ix = "_1rpuha50";
|
|
14216
14216
|
var ll = [
|
|
14217
14217
|
"pointerdown",
|
|
14218
14218
|
"mousedown",
|
|
@@ -14220,7 +14220,7 @@ var ll = [
|
|
|
14220
14220
|
"mouseup",
|
|
14221
14221
|
"click"
|
|
14222
14222
|
], Po = (e) => e instanceof Element && e.closest("[data-menu-shield]") !== null, lx = () => {
|
|
14223
|
-
const e = te((c) => c.plotMenu !== null), t = te((c) => dx(c.standingInteraction?.kind)), n = pt()[0]?.kind === "observations", r = Oe[
|
|
14223
|
+
const e = te((c) => c.plotMenu !== null), t = te((c) => dx(c.standingInteraction?.kind)), n = pt()[0]?.kind === "observations", r = Oe[Ce()].showMenuTriggerOnHover, { store: o } = Re(), i = le(), l = r && !t && (e || n), s = oe(null);
|
|
14224
14224
|
return V(() => {
|
|
14225
14225
|
if (!l) return;
|
|
14226
14226
|
const c = o.getState();
|
|
@@ -14251,7 +14251,7 @@ var ll = [
|
|
|
14251
14251
|
button: e.button,
|
|
14252
14252
|
buttons: e.buttons
|
|
14253
14253
|
}), dx = (e) => e === "arrow-draw" || e === "box-draw", ux = 1, hx = 10, px = 1e-7, gx = (e, t) => {
|
|
14254
|
-
const { selectionStore: n, commands: r, chartId: o, anchorResolver: i, store: l, history: s } = q(), { engine: c } = Re(), d = le(), u = Gt(t, e), { showAnnotations: h } = Oe[
|
|
14254
|
+
const { selectionStore: n, commands: r, chartId: o, anchorResolver: i, store: l, history: s } = q(), { engine: c } = Re(), d = le(), u = Gt(t, e), { showAnnotations: h } = Oe[Ce()], p = ye(h);
|
|
14255
14255
|
V(() => {
|
|
14256
14256
|
let g = null, m = {
|
|
14257
14257
|
x: 0,
|
|
@@ -14311,7 +14311,7 @@ var ll = [
|
|
|
14311
14311
|
f || D();
|
|
14312
14312
|
}), w = (A) => {
|
|
14313
14313
|
if (!Ve(A.target, e, o) || vr(A.target) || It(A.target, o) || bt(A.target) || d.getState().caret !== null || mx(A.target, e)) return;
|
|
14314
|
-
if (
|
|
14314
|
+
if (Gl(A) !== null) {
|
|
14315
14315
|
P();
|
|
14316
14316
|
return;
|
|
14317
14317
|
}
|
|
@@ -14562,7 +14562,7 @@ var ll = [
|
|
|
14562
14562
|
stamped: null,
|
|
14563
14563
|
elements: []
|
|
14564
14564
|
};
|
|
14565
|
-
const c = e || r ? Pa(n.clientX, n.clientY) : n.target instanceof Element ? [n.target] : [], d =
|
|
14565
|
+
const c = e || r ? Pa(n.clientX, n.clientY) : n.target instanceof Element ? [n.target] : [], d = or(c, i);
|
|
14566
14566
|
return d === null ? {
|
|
14567
14567
|
stamped: null,
|
|
14568
14568
|
elements: c
|
|
@@ -14586,7 +14586,7 @@ var ll = [
|
|
|
14586
14586
|
x: e.x - t.left,
|
|
14587
14587
|
y: e.y - t.top
|
|
14588
14588
|
}, { primary: s, intersection: c } = n.query(zt(l, t), {
|
|
14589
|
-
tolerance:
|
|
14589
|
+
tolerance: zl,
|
|
14590
14590
|
viewport: {
|
|
14591
14591
|
width: t.width,
|
|
14592
14592
|
height: t.height
|
|
@@ -14718,7 +14718,7 @@ var ll = [
|
|
|
14718
14718
|
target: e,
|
|
14719
14719
|
observationIndex: n ? t : null
|
|
14720
14720
|
}, Bx = `[${Ru}], [${Zr}="axis"], [${Zr}="legend"]`, zx = (e, t, n, r) => {
|
|
14721
|
-
const { commands: o, history: i, selectionStore: l, store: s, anchorResolver: c, chartId: d } = q(), { engine: u } = Re(), h = le(), p =
|
|
14721
|
+
const { commands: o, history: i, selectionStore: l, store: s, anchorResolver: c, chartId: d } = q(), { engine: u } = Re(), h = le(), p = Ce(), { selectGraphOnPress: g } = Oe[p], m = ye(g), v = ye(p === Jr.annotate), y = ye(p === Jr.annotate), f = Gt(t, e), C = St(t), S = ye(r), k = oe(null);
|
|
14722
14722
|
V(() => () => k.current?.finish(!1), []), V(() => l.subscribe(({ selection: x }) => {
|
|
14723
14723
|
const O = h.getState().pressedObservation, [R, ...P] = x, D = R !== void 0 && P.length === 0 && O !== null && Ko(R, O.selectedFor);
|
|
14724
14724
|
O !== null && !D && h.getState().setPressedObservation(null);
|
|
@@ -14730,9 +14730,9 @@ var ll = [
|
|
|
14730
14730
|
}, n()).targetAtPoint, O = (T) => {
|
|
14731
14731
|
if (!(T.target instanceof Element)) return !1;
|
|
14732
14732
|
const I = T.target.closest(Ul);
|
|
14733
|
-
return I !== null && e.contains(I) &&
|
|
14733
|
+
return I !== null && e.contains(I) && or([T.target], e) === null;
|
|
14734
14734
|
}, R = (T, I) => {
|
|
14735
|
-
if (k.current !== null || !
|
|
14735
|
+
if (k.current !== null || !Yu(f.current.spec, I.id)) return;
|
|
14736
14736
|
try {
|
|
14737
14737
|
e.setPointerCapture(T.pointerId);
|
|
14738
14738
|
} catch {
|
|
@@ -14758,7 +14758,7 @@ var ll = [
|
|
|
14758
14758
|
});
|
|
14759
14759
|
k.current = M, M.start();
|
|
14760
14760
|
}, P = (T, I) => {
|
|
14761
|
-
const M = l.getState(), { layers: w, config: N, coordSystem: K } = s.getState().scene, A = I.kind === "select-observations" && I.observationIndex !== null ?
|
|
14761
|
+
const M = l.getState(), { layers: w, config: N, coordSystem: K } = s.getState().scene, A = I.kind === "select-observations" && I.observationIndex !== null ? uh(I.observationIndex, w, I.target, N.parsingLocale) : null;
|
|
14762
14762
|
if (h.getState().setPressedObservation(A), v.current && (I.kind === "select-observations" || I.kind === "select-band")) {
|
|
14763
14763
|
const H = se(w, I.target.layerId);
|
|
14764
14764
|
if (H !== void 0 && Nb(H.geom, K.type)) {
|
|
@@ -14836,7 +14836,7 @@ var ll = [
|
|
|
14836
14836
|
return;
|
|
14837
14837
|
}
|
|
14838
14838
|
const wt = Ra(ce, Y, A);
|
|
14839
|
-
if (wt === null || Y === null ||
|
|
14839
|
+
if (wt === null || Y === null || Rh(K.start, wt, Y)) return;
|
|
14840
14840
|
const Kt = eu(K.start, rn(ce, e, f.current.panelRect), Ye({ altKey: T.altKey }, h.getState().snapping), f.current), Xe = new Ie({
|
|
14841
14841
|
kind: "shape",
|
|
14842
14842
|
annotation: {
|
|
@@ -14973,7 +14973,7 @@ var ll = [
|
|
|
14973
14973
|
d
|
|
14974
14974
|
]);
|
|
14975
14975
|
}, Hx = (e, t) => bt(e) || gl(e) || t.some(gl), gl = (e) => e instanceof Element && e.closest(Bx) !== null, Gx = (e) => {
|
|
14976
|
-
const { store: t } = q(), { engine: n, overlayRef: r } = Re(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Oe[
|
|
14976
|
+
const { store: t } = q(), { engine: n, overlayRef: r } = Re(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Oe[Ce()], { waitingForView: c } = Nl(), d = $t(), u = i && !c;
|
|
14977
14977
|
return pe(() => ({
|
|
14978
14978
|
frameElement: e,
|
|
14979
14979
|
captureRect: r.current,
|
|
@@ -15032,7 +15032,7 @@ var ll = [
|
|
|
15032
15032
|
c
|
|
15033
15033
|
]);
|
|
15034
15034
|
}, Ux = (e, t) => {
|
|
15035
|
-
const n = le(), { store: r } = q(), { store: o } = Re(), { selectObservationsOnPress: i } = Oe[
|
|
15035
|
+
const n = le(), { store: r } = q(), { store: o } = Re(), { selectObservationsOnPress: i } = Oe[Ce()];
|
|
15036
15036
|
V(() => (o.getState().setEditorOwnsQuery(i), () => o.getState().setEditorOwnsQuery(!1)), [o, i]), V(() => {
|
|
15037
15037
|
let l = null, s = null, c = !1;
|
|
15038
15038
|
const d = (C) => {
|
|
@@ -15098,7 +15098,7 @@ var ll = [
|
|
|
15098
15098
|
return !1;
|
|
15099
15099
|
}
|
|
15100
15100
|
}, jx = (e, t, n, r, o) => {
|
|
15101
|
-
const i = Vx(), { store: l } = Re(), s = pt().length > 0, { freezeHoverWhileSelected: c } = Oe[
|
|
15101
|
+
const i = Vx(), { store: l } = Re(), s = pt().length > 0, { freezeHoverWhileSelected: c } = Oe[Ce()], d = Gx(e);
|
|
15102
15102
|
Ux(e, d), zx(e, n, d, o), Kx(i, t, n), bx(e), rw(e, n), gx(e, n), yx(e, r);
|
|
15103
15103
|
const u = s && c;
|
|
15104
15104
|
V(() => (l.getState().setSuspendsHover(u), () => l.getState().setSuspendsHover(!1)), [l, u]), V(() => {
|
|
@@ -15126,7 +15126,7 @@ var ll = [
|
|
|
15126
15126
|
};
|
|
15127
15127
|
}, [e]);
|
|
15128
15128
|
}, Zx = ({ frameElement: e, panelRect: t, formattedAxes: n }) => {
|
|
15129
|
-
const { measureRef: r, screenRect: o } =
|
|
15129
|
+
const { measureRef: r, screenRect: o } = th(), { selectionStore: i, store: l, history: s } = q(), c = le(), d = St(t), u = oe(() => {
|
|
15130
15130
|
});
|
|
15131
15131
|
V(() => {
|
|
15132
15132
|
u.current = () => {
|
|
@@ -15153,7 +15153,7 @@ var ll = [
|
|
|
15153
15153
|
p,
|
|
15154
15154
|
c
|
|
15155
15155
|
]);
|
|
15156
|
-
const m = te((f) => f.caret?.annotationId ?? null), v =
|
|
15156
|
+
const m = te((f) => f.caret?.annotationId ?? null), v = Ce(), y = oe(v);
|
|
15157
15157
|
return V(() => (r(e), () => r(null)), [r, e]), V(() => () => {
|
|
15158
15158
|
u.current();
|
|
15159
15159
|
const f = c.getState();
|
|
@@ -15177,7 +15177,7 @@ var ll = [
|
|
|
15177
15177
|
formattedAxes: n
|
|
15178
15178
|
})] });
|
|
15179
15179
|
}, Jx = ({ annotationId: e, panelRect: t }) => {
|
|
15180
|
-
const n = le(), { textAnnotations: r } =
|
|
15180
|
+
const n = le(), { textAnnotations: r } = xe(t);
|
|
15181
15181
|
return V(() => {
|
|
15182
15182
|
r.some(({ id: o }) => o === e) || n.getState().setCaret(null);
|
|
15183
15183
|
}, [
|
|
@@ -15205,7 +15205,7 @@ var ll = [
|
|
|
15205
15205
|
}, e3 = ({ frameElement: e, frameRect: t, panelOrigin: n, panelRect: r, boxRef: o }) => {
|
|
15206
15206
|
const i = fr();
|
|
15207
15207
|
Yx(i);
|
|
15208
|
-
const { showAnnotations: l } = Oe[
|
|
15208
|
+
const { showAnnotations: l } = Oe[Ce()];
|
|
15209
15209
|
return /* @__PURE__ */ b(re, { children: [
|
|
15210
15210
|
/* @__PURE__ */ a(db, {
|
|
15211
15211
|
frameElement: e,
|
|
@@ -15218,7 +15218,7 @@ var ll = [
|
|
|
15218
15218
|
/* @__PURE__ */ a(jb, { frameRect: t }),
|
|
15219
15219
|
/* @__PURE__ */ a(Y0, {
|
|
15220
15220
|
rect: t,
|
|
15221
|
-
zIndex:
|
|
15221
|
+
zIndex: Lu.editorOverlay,
|
|
15222
15222
|
container: i,
|
|
15223
15223
|
"data-testid": "editor-overlay",
|
|
15224
15224
|
boxRef: o,
|
|
@@ -15277,7 +15277,7 @@ var ll = [
|
|
|
15277
15277
|
})
|
|
15278
15278
|
] });
|
|
15279
15279
|
}, t3 = {}, SC = ({ slots: e, palettePresets: t = t3, editMenus: n, ...r }) => {
|
|
15280
|
-
const o = Il(
|
|
15280
|
+
const o = Il(rr()), i = Ce(), l = W(() => ({
|
|
15281
15281
|
EditorSurface: Zx,
|
|
15282
15282
|
...e
|
|
15283
15283
|
}), [e]);
|
|
@@ -15287,9 +15287,9 @@ var ll = [
|
|
|
15287
15287
|
editMenus: n,
|
|
15288
15288
|
children: /* @__PURE__ */ a(ih, { children: /* @__PURE__ */ a(E1, {
|
|
15289
15289
|
value: t,
|
|
15290
|
-
children: /* @__PURE__ */ a(
|
|
15290
|
+
children: /* @__PURE__ */ a(Oh, {
|
|
15291
15291
|
editors: j0(i),
|
|
15292
|
-
children: /* @__PURE__ */ a(
|
|
15292
|
+
children: /* @__PURE__ */ a(Th, {
|
|
15293
15293
|
slots: l,
|
|
15294
15294
|
...r
|
|
15295
15295
|
})
|
|
@@ -15321,9 +15321,9 @@ var d3 = () => () => {
|
|
|
15321
15321
|
const t = vg(e?.subscribe ?? d3, () => e?.getScene()?.config.parsingLocale);
|
|
15322
15322
|
return e?.formattingLocale ?? t;
|
|
15323
15323
|
}, h3 = (e) => {
|
|
15324
|
-
const t = Ae(
|
|
15324
|
+
const t = Ae(Iu), n = Il(u3(on(e.handle))), r = qu();
|
|
15325
15325
|
let o = /* @__PURE__ */ a(p3, { ...e });
|
|
15326
|
-
return !r && t && (o = /* @__PURE__ */ a(
|
|
15326
|
+
return !r && t && (o = /* @__PURE__ */ a(Hu, {
|
|
15327
15327
|
colorScheme: t.colorScheme,
|
|
15328
15328
|
children: o
|
|
15329
15329
|
})), /* @__PURE__ */ a(Qc, {
|
|
@@ -16648,7 +16648,7 @@ var qr = [
|
|
|
16648
16648
|
"pill",
|
|
16649
16649
|
"direct"
|
|
16650
16650
|
], RC = ({ positions: e, title: t, layout: n = "collapsible", preview: r }) => {
|
|
16651
|
-
const o = he(), i = de(o), l = z(), { ToggleGroup: s } = j(), c =
|
|
16651
|
+
const o = he(), i = de(o), l = z(), { ToggleGroup: s } = j(), c = Hl();
|
|
16652
16652
|
if (!i) return null;
|
|
16653
16653
|
const d = i.config.legend.position, u = e ?? qr, h = i.guides.legends.drawn[0], p = vp({
|
|
16654
16654
|
legendPosition: i.guides.legends.position,
|