@graphysdk/react-renderer 1.9.0-beta.1792407460425 → 1.9.0-beta.1792409717036
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.mjs +49 -49
- package/dist/history-chords-C7IuqY3m.cjs +2 -0
- package/dist/{history-chords-BcKFOh7E.js → history-chords-CABMe8pp.js} +1899 -1889
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.mjs +251 -239
- package/package.json +2 -2
- package/dist/history-chords-B9ozn71x.cjs +0 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Dn, A as Et, An as _n, B as
|
|
1
|
+
import { $ as Dn, $t as jl, A as Et, An as _n, B as Xl, C as Zl, D as Yl, Dt as Jl, E as Ql, En as R, Et as es, F as ts, Ft as ns, G as ee, Ht as rs, I as as, J as Sr, K as W, Kt as os, L, Mt as et, Nt as ne, O as Ma, On as H, P as is, Pt as ls, Q as Fn, Qt as Ea, S as ss, Sn as Oa, St as cs, T as Me, Tt as ds, U as us, Ut as Ra, W as hs, X as ps, Xt as ms, Y as gs, Z as j, Zt as vs, _ as Ne, an as Be, at as zn, b as Na, bt as M, c as Da, ct as fs, d as bs, dt as ys, et as _a, f as Ss, ft as me, g as Fa, h as Ot, hn as Cs, ht as Rt, i as Bn, in as Hn, it as za, k as un, l as xs, lt as ws, m as ks, mn as Ts, n as le, nn as Ba, nt as Nt, o as As, p as Ha, pt as ue, q as Ps, r as U, rn as ce, rt as Ls, st as Is, t as Ms, tn as Ga, tt as Gn, u as Es, ut as Cr, v as Os, vn as Rs, vt as Ns, wn as K, wt as De, x as Ds, xt as Va, y as _s, yt as Fs } from "./history-chords-CABMe8pp.js";
|
|
2
2
|
import { ARROW_DEFAULTS as zs, ARROW_STICKER_DECLARATIONS as Bs, ARROW_STROKE_WIDTHS_PX as Jt, AddAnnotationCommand as Te, AddHighlightCommand as Hs, BORDER_RADIUS_TOKENS as xr, COMBO_TYPES as wr, CONSTANT_VARIABLES as Gs, DASH_PRESETS as Vs, DEFAULT_BAR_CORNER_RADIUS as $s, DEFAULT_GEOM_COLOR as Ws, DEFAULT_POINT_SIZE_PX as $a, DEFAULT_STROKE_WIDTH_PX as Us, DIFFERENCE_ARROW_DEFAULTS as Wa, DIFFERENCE_ARROW_SIZE_DECLARATIONS as kr, InternalError as Ks, MAX_BAR_WIDTH_FRACTION as qs, MIN_BAR_WIDTH_FRACTION as js, MoveAnnotationCommand as Xs, RESTING_HOVER_STATE as Vn, RemoveAnnotationCommand as $e, RemoveHighlightCommand as Zs, SHAPE_DEFAULTS as Ys, SequenceCommand as qe, SetAxisLabelCommand as Ua, SetAxisPositionCommand as Ka, SetAxisTickModeCommand as qa, SetAxisTicksVisibilityCommand as Js, SetAxisVisibilityCommand as hn, SetBarCornerRadiusCommand as Qs, SetBarWidthCommand as ja, SetChartTypeCommand as $n, SetContentCaptionCommand as Xa, SetContentSourceCommand as ec, SetContentSubtitleCommand as Za, SetContentTitleCommand as Ya, SetDataLabelsFormatCommand as Ja, SetDifferenceArrowStyleCommand as tc, SetGridLineStyleCommand as Qa, SetGridVisibilityCommand as pn, SetHeadlineCompareWithCommand as nc, SetHeadlinePositionCommand as rc, SetHeadlineShowCommand as Tr, SetHeadlineSizeCommand as ac, SetHighlightDimStyleCommand as oc, SetLayerYScaleTypeCommand as ic, SetLegendAlignCommand as lc, SetLegendDisplayCommand as sc, SetLegendPlacementCommand as cc, SetLegendPositionCommand as mn, SetLineCurveCommand as eo, SetLineMissingValuesCommand as to, SetLineStyleCommand as Ce, SetMappingCommand as dc, SetNumberFormatAbbreviationCommand as uc, SetNumberFormatDecimalsCommand as Ar, SetObservationsColorCommand as hc, SetPointSizeCommand as Wn, SetPolarInnerRadiusCommand as pc, SetPolarStartAngleCommand as mc, SetRuleLabelCommand as gc, SetRuleValueCommand as vc, SetScaleDomainCommand as Ze, SetScaleRangeCommand as fc, SetScaleReverseCommand as bc, SetScaleTransformCommand as no, SetStatLineCommand as yc, SetStyleRuleCommand as Oe, TEXT_ANNOTATION_DEFAULTS as Sc, TEXT_ANNOTATION_FADE_ALPHA as Cc, ToggleCategoryLabelsCommand as ro, ToggleContentVisibilityCommand as Dt, ToggleDataLabelsCommand as ao, ToggleGoalLineCommand as xc, ToggleLinePointsCommand as Un, ToggleStackTotalsCommand as oo, UpdateAnnotationCommand as ge, alignUnitFractions as wc, areAnchorsEqual as io, areEditTargetsEqual as Kn, areEndpointsComparable as kc, buildEditMenuTriggerRegion as Tc, buildLayerStyleAddress as Ge, buildObservationPredicate as Ac, buildObservationsTarget as tt, buildObservationsTargetAtValue as lo, canAnchorDirectLabels as Pc, canBecomeCombo as Lc, canBecomeHeatmap as Ic, clampAnnotationTranslation as Mc, combineKindStyleDeclarations as Pr, computeArrow as so, createObservationAnchorBuilder as Ec, createObservationAnchorParser as Oc, createStyleResolver as Rc, createStyleRuleMatcher as Nc, createValueFormatter as co, createXValueReader as Dc, filterLayersByGeoms as gn, findAnnotation as _c, findAverageLineLayer as Fc, findAxisGuide as uo, findCompanionLayers as ho, findGoalLineLayer as zc, findHighlightsAtObservation as Bc, findHostLayer as _t, findKindStyleDeclarations as bt, findLayerByGeom as po, findLayerById as Z, findObservationAttachment as Hc, findStyleRule as Pe, findTrendLineLayer as Gc, formatDifferenceLabel as Vc, getBoundingRect as vn, getGroupVariables as mo, getXBand as $c, getYBand as Wc, hasMainAxisBand as Uc, hasMultipleGroups as go, inferDefaultDifferenceArrowEndpoints as Kc, inferDifferenceArrowEndpoints as qc, isComboChartType as se, isCompanionLayer as vo, isGeomStyleRule as jc, isLayerSpecOf as Ft, isObservationAttachmentKind as Xc, isPointWithinEditMenuTrigger as qn, isSafeUrl as Zc, isZeroAnchoredAxis as fo, measureObservationsBoxes as bo, projectAnchorToPanel as yt, readBroadestObservationsScope as Yc, readChartType as zt, readColorChoices as Jc, readComboLineLayerId as Qc, readCompanionRowsAtScopeKey as ed, readConstantValue as td, readEditTargetKey as Bt, readGeomColor as nd, readHighlightDimStyle as rd, readMainAxis as ad, readMappableAesthetics as od, readMappedVariable as id, readObservationIndex as yo, readObservationsColor as ld, readObservationsColorRoute as jn, readReachableLevels as sd, readRowScopeKey as cd, readRowsAtScopeKey as dd, readScopeXVariable as ud, readStyleCoord as de, readStyleRulesBeneath as hd, readVariableName as Ht, resolveArrowAnnotationStyle as Xn, resolveBarBandFraction as So, resolveComparisonBasis as pd, resolveDifferenceArrowAnnotationStyle as md, resolveEditOutlineStyle as gd, resolveLayerAxisValueFormat as vd, resolveObservationPoint as Co, resolveObservationsTarget as Je, stepDifferenceArrowEndpoint as fd, toDashPreset as Re, toPaintColor as St, toPanelCursor as Gt, toStrokeDasharray as xo } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as wo, createContext as Ee, memo as ko, useCallback as re, useContext as ve, useEffect as z, useId as Le, useLayoutEffect as Ie, useMemo as E, useRef as ae, useState as X } from "react";
|
|
4
4
|
import { Fragment as $, jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
@@ -2500,7 +2500,7 @@ import './editable.css';var $d = {
|
|
|
2500
2500
|
"en-US": Jd,
|
|
2501
2501
|
ar: Kd,
|
|
2502
2502
|
"pt-PT": nu
|
|
2503
|
-
}, au = [ru,
|
|
2503
|
+
}, au = [ru, cs], ou = ({ children: e, ...t }) => /* @__PURE__ */ r(Fs, {
|
|
2504
2504
|
dictionaries: au,
|
|
2505
2505
|
...t,
|
|
2506
2506
|
children: /* @__PURE__ */ r(iu, { children: e })
|
|
@@ -2698,7 +2698,7 @@ var fu = {
|
|
|
2698
2698
|
}, Ou = ({ value: e, onChange: t, onCommit: n, popupAttributes: a, variant: o = "default" }) => {
|
|
2699
2699
|
const i = M(), l = We(), [s, c] = X(!1), d = (p) => {
|
|
2700
2700
|
c(p), p || n?.();
|
|
2701
|
-
}, u = e !== null &&
|
|
2701
|
+
}, u = e !== null && jl(e) ? e : "#000000", h = Ea(u) ? u.toUpperCase() : "#000000";
|
|
2702
2702
|
return /* @__PURE__ */ v(Q.Root, {
|
|
2703
2703
|
open: s,
|
|
2704
2704
|
onOpenChange: d,
|
|
@@ -3224,7 +3224,7 @@ var qo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
3224
3224
|
});
|
|
3225
3225
|
}, F = () => ve(yn);
|
|
3226
3226
|
var Sh = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", Ch = "d0bl00";
|
|
3227
|
-
var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn =
|
|
3227
|
+
var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Ba.map((e) => ce[e]), Th = Object.fromEntries(Ba.map((e) => [ce[e], e])), Ah = (e) => Sn.some((t) => t.toLowerCase() === e.toLowerCase()), Ph = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: d = !1 }) => {
|
|
3228
3228
|
const u = M(), { ColorSwatches: h, Slider: p } = F(), g = Mh(), m = d ? [_o, ...Sn] : Sn, f = (b) => {
|
|
3229
3229
|
t(b), a(!1);
|
|
3230
3230
|
};
|
|
@@ -3289,7 +3289,7 @@ var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Da.map((e) => ce[e]), Th = Obj
|
|
|
3289
3289
|
})]
|
|
3290
3290
|
});
|
|
3291
3291
|
}, Lh = (e, t) => {
|
|
3292
|
-
if (
|
|
3292
|
+
if (Ea(e)) return e;
|
|
3293
3293
|
const n = Th[e];
|
|
3294
3294
|
return n === void 0 ? e : t[n];
|
|
3295
3295
|
}, Ih = ({ value: e, onChange: t, popupAttributes: n }) => {
|
|
@@ -3806,7 +3806,7 @@ var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Da.map((e) => ce[e]), Th = Obj
|
|
|
3806
3806
|
"aria-label": t
|
|
3807
3807
|
})]
|
|
3808
3808
|
}), yp = 200, ar = ({ content: e, extensions: t, isEditable: n, onUpdate: a, updateDebounceMs: o = yp }) => {
|
|
3809
|
-
const i = ae(Dr(e)), l = ae(i.current), s =
|
|
3809
|
+
const i = ae(Dr(e)), l = ae(i.current), s = Jl((d) => {
|
|
3810
3810
|
l.current = d, a?.(d);
|
|
3811
3811
|
}, o), c = _d({
|
|
3812
3812
|
extensions: t,
|
|
@@ -3862,7 +3862,7 @@ var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Da.map((e) => ce[e]), Th = Obj
|
|
|
3862
3862
|
});
|
|
3863
3863
|
return /* @__PURE__ */ r("div", {
|
|
3864
3864
|
"data-testid": "caption-editor",
|
|
3865
|
-
style:
|
|
3865
|
+
style: Ra(t),
|
|
3866
3866
|
children: /* @__PURE__ */ r(ai, {
|
|
3867
3867
|
editor: a,
|
|
3868
3868
|
ariaLabel: "Chart caption"
|
|
@@ -3897,12 +3897,12 @@ var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Da.map((e) => ce[e]), Th = Obj
|
|
|
3897
3897
|
i?.commands.focus("end", { scrollIntoView: !1 });
|
|
3898
3898
|
}, [i]), /* @__PURE__ */ r(Lo, {
|
|
3899
3899
|
"aria-label": t("graph.annotations.text.editLabel"),
|
|
3900
|
-
className:
|
|
3900
|
+
className: Ss,
|
|
3901
3901
|
editor: i,
|
|
3902
3902
|
"data-testid": "text-annotation-editor"
|
|
3903
3903
|
});
|
|
3904
3904
|
}, _r = (e) => {
|
|
3905
|
-
const t =
|
|
3905
|
+
const t = ys(e);
|
|
3906
3906
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
3907
3907
|
}, Tp = To.create({
|
|
3908
3908
|
name: "annotationTextStyleAttributes",
|
|
@@ -4013,7 +4013,7 @@ var xh = "d0bl03", wh = "d0bl04", kh = 0.01, Sn = Da.map((e) => ce[e]), Th = Obj
|
|
|
4013
4013
|
className: Np,
|
|
4014
4014
|
"data-testid": "title-editor",
|
|
4015
4015
|
style: {
|
|
4016
|
-
...
|
|
4016
|
+
...Ra(o),
|
|
4017
4017
|
...rs(Rp, i)
|
|
4018
4018
|
},
|
|
4019
4019
|
children: /* @__PURE__ */ r(ai, {
|
|
@@ -4171,7 +4171,7 @@ var Up = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4171
4171
|
return g.from < g.to ? g : p;
|
|
4172
4172
|
}, Zp = (e) => {
|
|
4173
4173
|
const [t] = e;
|
|
4174
|
-
return t !== void 0 && e.some((n) => !
|
|
4174
|
+
return t !== void 0 && e.some((n) => !ns(n, t));
|
|
4175
4175
|
}, xn = (e) => ({
|
|
4176
4176
|
from: e.x,
|
|
4177
4177
|
to: e.x + e.width
|
|
@@ -4185,7 +4185,7 @@ var Up = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4185
4185
|
const h = s.current, p = /* @__PURE__ */ new Map(), m = Gp(d, {
|
|
4186
4186
|
panelRect: n,
|
|
4187
4187
|
look: a,
|
|
4188
|
-
readGridLineWidth: (C) =>
|
|
4188
|
+
readGridLineWidth: (C) => Da(i, C).strokeWidth,
|
|
4189
4189
|
measurePathBox: (C) => {
|
|
4190
4190
|
const P = h.get(C) ?? Bp(t.ownerDocument, C);
|
|
4191
4191
|
return p.set(C, P), P;
|
|
@@ -4225,7 +4225,7 @@ var Up = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4225
4225
|
d: e,
|
|
4226
4226
|
...a
|
|
4227
4227
|
}), e1 = ({ pathData: e, source: t, ...n }) => {
|
|
4228
|
-
const a =
|
|
4228
|
+
const a = Ts(e, Cs, t);
|
|
4229
4229
|
return /* @__PURE__ */ r(bd.path, {
|
|
4230
4230
|
d: a,
|
|
4231
4231
|
...n
|
|
@@ -6179,7 +6179,7 @@ var Yr = [
|
|
|
6179
6179
|
return {
|
|
6180
6180
|
value: d,
|
|
6181
6181
|
label: n(`editor.overlayMenu.legendPlaces.${d}`),
|
|
6182
|
-
icon: /* @__PURE__ */ r(
|
|
6182
|
+
icon: /* @__PURE__ */ r(as, {
|
|
6183
6183
|
title: "",
|
|
6184
6184
|
size: "xs",
|
|
6185
6185
|
style: { transform: `rotate(${xm(c)}deg)` }
|
|
@@ -6569,12 +6569,12 @@ var Jr = (e, t) => {
|
|
|
6569
6569
|
});
|
|
6570
6570
|
}
|
|
6571
6571
|
}, Bm = (e) => {
|
|
6572
|
-
const t = `[${
|
|
6573
|
-
return e.kind !== "axis" ? t : `${t}[${
|
|
6572
|
+
const t = `[${Yl}="${e.kind}"]`;
|
|
6573
|
+
return e.kind !== "axis" ? t : `${t}[${Ql}="${e.axis}"]`;
|
|
6574
6574
|
}, Hm = (e) => {
|
|
6575
6575
|
const t = /* @__PURE__ */ new Map();
|
|
6576
6576
|
for (const n of e) {
|
|
6577
|
-
const a =
|
|
6577
|
+
const a = is(n);
|
|
6578
6578
|
a !== null && t.set(a.legendIndex, [...t.get(a.legendIndex) ?? [], n]);
|
|
6579
6579
|
}
|
|
6580
6580
|
return t;
|
|
@@ -6637,7 +6637,7 @@ var Jr = (e, t) => {
|
|
|
6637
6637
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
6638
6638
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
6639
6639
|
}, Wm = [], Um = (e, { frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) => {
|
|
6640
|
-
const i = R((f) => f.coordSystem), l =
|
|
6640
|
+
const i = R((f) => f.coordSystem), l = os(), s = Oa(), c = qm(e.kind === "guide" ? e.target : null, {
|
|
6641
6641
|
frameElement: t,
|
|
6642
6642
|
frameSize: n
|
|
6643
6643
|
}), d = Km(t, n), u = E(() => ({
|
|
@@ -6863,7 +6863,7 @@ var Jr = (e, t) => {
|
|
|
6863
6863
|
vertex: null
|
|
6864
6864
|
};
|
|
6865
6865
|
}, Jm = ["x", "y"], Qm = ko(function({ frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) {
|
|
6866
|
-
const i =
|
|
6866
|
+
const i = ms(gd, K()), l = Xm(), s = Dm(l?.outlined ?? null);
|
|
6867
6867
|
if (l === null && s === null) return null;
|
|
6868
6868
|
const c = {
|
|
6869
6869
|
frameElement: t,
|
|
@@ -6982,7 +6982,7 @@ var Jr = (e, t) => {
|
|
|
6982
6982
|
return n * Math.max(1, Math.round(2 * Math.PI * e / t)) * t;
|
|
6983
6983
|
}, ag = (e, t, n) => {
|
|
6984
6984
|
const a = n.offset + rt(n);
|
|
6985
|
-
return
|
|
6985
|
+
return Hn(Be({
|
|
6986
6986
|
x: 0,
|
|
6987
6987
|
y: 0,
|
|
6988
6988
|
...e
|
|
@@ -7049,7 +7049,7 @@ var Jr = (e, t) => {
|
|
|
7049
7049
|
}, i);
|
|
7050
7050
|
}
|
|
7051
7051
|
}), lg = ({ boxes: e, borderRadius: t }) => {
|
|
7052
|
-
const n = e.map((a) =>
|
|
7052
|
+
const n = e.map((a) => Hn(a, t)).join("");
|
|
7053
7053
|
return n === "" ? null : /* @__PURE__ */ r("path", {
|
|
7054
7054
|
d: n,
|
|
7055
7055
|
"data-testid": "edit-outline-boxes"
|
|
@@ -7057,7 +7057,7 @@ var Jr = (e, t) => {
|
|
|
7057
7057
|
}, sg = ({ target: e, shapes: t, borderRadius: n, dashPeriod: a }) => {
|
|
7058
7058
|
const o = K();
|
|
7059
7059
|
if (e.kind === "grid") return Jm.map((l) => {
|
|
7060
|
-
const s = li(
|
|
7060
|
+
const s = li(Da(o, l).strokeWidth), c = t.map((u) => cg(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
|
|
7061
7061
|
return /* @__PURE__ */ v(wo, { children: [c !== "" && /* @__PURE__ */ r("path", {
|
|
7062
7062
|
d: c,
|
|
7063
7063
|
...s
|
|
@@ -7067,7 +7067,7 @@ var Jr = (e, t) => {
|
|
|
7067
7067
|
...s
|
|
7068
7068
|
}, h))] }, l);
|
|
7069
7069
|
});
|
|
7070
|
-
const i = t.map((l) => l.kind === "box" ?
|
|
7070
|
+
const i = t.map((l) => l.kind === "box" ? Hn(l.rect, n) : "").join("");
|
|
7071
7071
|
return i === "" ? null : /* @__PURE__ */ r("path", { d: i });
|
|
7072
7072
|
}, cg = (e, t) => e.kind === "line" && e.axis === t ? `M${e.from.x},${e.from.y}L${e.to.x},${e.to.y}` : "", dg = ({ center: e, radius: t }) => {
|
|
7073
7073
|
const n = `${e.x},${e.y - t}`;
|
|
@@ -7083,7 +7083,7 @@ var Jr = (e, t) => {
|
|
|
7083
7083
|
height: n.height,
|
|
7084
7084
|
overflow: "visible",
|
|
7085
7085
|
children: /* @__PURE__ */ r("line", {
|
|
7086
|
-
...
|
|
7086
|
+
...Zl(a, i, n),
|
|
7087
7087
|
stroke: t.stroke,
|
|
7088
7088
|
strokeOpacity: t.strokeAlpha,
|
|
7089
7089
|
strokeWidth: t.strokeWidth,
|
|
@@ -7118,7 +7118,7 @@ var Jr = (e, t) => {
|
|
|
7118
7118
|
return z(() => {
|
|
7119
7119
|
t(!0);
|
|
7120
7120
|
}, []), e;
|
|
7121
|
-
}, vg = (e) =>
|
|
7121
|
+
}, vg = (e) => ls.some((t) => t === e), na = (e, t, n) => n === 0 ? 0 : e * t / n, fg = {
|
|
7122
7122
|
x: 8,
|
|
7123
7123
|
y: 8
|
|
7124
7124
|
}, bg = {
|
|
@@ -7434,7 +7434,7 @@ var Jr = (e, t) => {
|
|
|
7434
7434
|
ariaLabel: n("editor.overlayMenu.selection")
|
|
7435
7435
|
});
|
|
7436
7436
|
}, Mg = ({ scene: e, pressed: t, groupOptions: n, locale: a, t: o, hasOverlayMenu: i }) => {
|
|
7437
|
-
const l = t === null ? null :
|
|
7437
|
+
const l = t === null ? null : gs(t, e.layers, e.config.parsingLocale);
|
|
7438
7438
|
if (t === null || l === null) return null;
|
|
7439
7439
|
const { layer: s, observation: c } = l, { observationIndex: d, selectedFor: u } = t, { parsingLocale: h } = e.config, p = sd({
|
|
7440
7440
|
layer: s,
|
|
@@ -7565,7 +7565,7 @@ var Jr = (e, t) => {
|
|
|
7565
7565
|
c === null || d === null || o(d.offsetWidth > c.clientWidth);
|
|
7566
7566
|
}, []);
|
|
7567
7567
|
Ie(i, [i, e.whole]);
|
|
7568
|
-
const { setElement: l } =
|
|
7568
|
+
const { setElement: l } = es({ onResize: i }), s = re((c) => {
|
|
7569
7569
|
t.current = c, l(c);
|
|
7570
7570
|
}, [l]);
|
|
7571
7571
|
return /* @__PURE__ */ v($, { children: [/* @__PURE__ */ r(Q.Title, {
|
|
@@ -8316,7 +8316,7 @@ var l2 = (e) => {
|
|
|
8316
8316
|
icon: /* @__PURE__ */ r(Zi, {}),
|
|
8317
8317
|
children: /* @__PURE__ */ r("div", {
|
|
8318
8318
|
className: k2,
|
|
8319
|
-
children: Object.entries(
|
|
8319
|
+
children: Object.entries(xs).map(([i, l]) => /* @__PURE__ */ r(Ae.Item, {
|
|
8320
8320
|
className: T2,
|
|
8321
8321
|
"aria-label": i,
|
|
8322
8322
|
onClick: () => o(i),
|
|
@@ -8721,7 +8721,7 @@ var l2 = (e) => {
|
|
|
8721
8721
|
}, {
|
|
8722
8722
|
value: "none",
|
|
8723
8723
|
key: "graph.annotations.arrowToolbar.arrowhead.none",
|
|
8724
|
-
Icon:
|
|
8724
|
+
Icon: ts
|
|
8725
8725
|
}], ia = [
|
|
8726
8726
|
{
|
|
8727
8727
|
value: "solid",
|
|
@@ -8949,7 +8949,7 @@ var i0 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, it = class {
|
|
|
8949
8949
|
}
|
|
8950
8950
|
readOwn(e) {
|
|
8951
8951
|
const { annotationId: t, endpoint: n } = this.params;
|
|
8952
|
-
return
|
|
8952
|
+
return Gn(j(e, "arrow-endpoint-drag"), t, n);
|
|
8953
8953
|
}
|
|
8954
8954
|
resolvePreview(e) {
|
|
8955
8955
|
const { annotationId: t, endpoint: n, press: a, readInputs: o } = this.params, { annotations: i, arrow: l, panelRect: s } = o(), c = Pt(i, t, n);
|
|
@@ -9025,7 +9025,7 @@ var i0 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, it = class {
|
|
|
9025
9025
|
s
|
|
9026
9026
|
]), re((c) => ({ onKeyDown: (d) => {
|
|
9027
9027
|
if (d.altKey || d.ctrlKey || d.metaKey || d.shiftKey) return;
|
|
9028
|
-
const u = o.getState(), h =
|
|
9028
|
+
const u = o.getState(), h = Gn(j(u, "arrow-endpoint-drag"), e, c);
|
|
9029
9029
|
if (c0.includes(d.key)) {
|
|
9030
9030
|
if (d.preventDefault(), d.repeat) return;
|
|
9031
9031
|
if (h !== null) {
|
|
@@ -9070,7 +9070,7 @@ var i0 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, it = class {
|
|
|
9070
9070
|
a
|
|
9071
9071
|
]);
|
|
9072
9072
|
}, sa = ({ editorStore: e, annotationId: t, endpoint: n, annotations: a, dispatch: o }) => {
|
|
9073
|
-
const i = e.getState(), l =
|
|
9073
|
+
const i = e.getState(), l = Gn(j(i, "arrow-endpoint-drag"), t, n);
|
|
9074
9074
|
if (l === null) return;
|
|
9075
9075
|
i.releaseInteraction("arrow-endpoint-drag");
|
|
9076
9076
|
const s = Pt(a, t, n);
|
|
@@ -9545,7 +9545,7 @@ var I0 = "ydgo3h1", M0 = "ydgo3h2", E0 = "ydgo3h3", O0 = ({ clientPoint: e, pane
|
|
|
9545
9545
|
...e
|
|
9546
9546
|
});
|
|
9547
9547
|
}, G0 = ({ annotationId: e, ...t }) => {
|
|
9548
|
-
const n =
|
|
9548
|
+
const n = us(), a = E(() => n.find((o) => o.id === e), [n, e]);
|
|
9549
9549
|
return a === void 0 ? null : /* @__PURE__ */ r(V0, {
|
|
9550
9550
|
committedArrow: a.committedArrow,
|
|
9551
9551
|
color: a.color,
|
|
@@ -9687,7 +9687,7 @@ var K0 = {
|
|
|
9687
9687
|
hovered: "_1ee8fau5 _1ee8fau4",
|
|
9688
9688
|
selected: "_1ee8fau6 _1ee8fau4"
|
|
9689
9689
|
}, j0 = ({ panelRect: e }) => {
|
|
9690
|
-
const t = Ne(e), n =
|
|
9690
|
+
const t = Ne(e), n = za(), a = K(), o = ot(), i = ee((f) => j(f, "move-drag")), l = ee((f) => j(f, "shape-resize-drag")), s = ee((f) => j(f, "arrow-endpoint-drag")), c = ee((f) => j(f, "text-resize-drag")), d = ee(Ps), u = E(() => ({
|
|
9691
9691
|
panel: {
|
|
9692
9692
|
width: e.width,
|
|
9693
9693
|
height: e.height
|
|
@@ -9702,7 +9702,7 @@ var K0 = {
|
|
|
9702
9702
|
]), h = ha(t, o, u), p = ha(t, d === o ? null : d, u), g = (f) => {
|
|
9703
9703
|
if (l?.annotationId === f.id) {
|
|
9704
9704
|
const b = t.shapes.find((C) => C.id === f.id);
|
|
9705
|
-
return b === void 0 ? f.geometry :
|
|
9705
|
+
return b === void 0 ? f.geometry : Na(pr(l.region), a.annotation.shape(b.id).get("strokeWidth"), u.panel);
|
|
9706
9706
|
}
|
|
9707
9707
|
if (s?.annotationId === f.id) {
|
|
9708
9708
|
const b = t.arrows.find((C) => C.id === f.id);
|
|
@@ -9730,7 +9730,7 @@ var K0 = {
|
|
|
9730
9730
|
})] });
|
|
9731
9731
|
}, ha = (e, t, n) => {
|
|
9732
9732
|
if (t === null) return null;
|
|
9733
|
-
const a =
|
|
9733
|
+
const a = ss(e, t, n);
|
|
9734
9734
|
return a === null ? null : {
|
|
9735
9735
|
id: t,
|
|
9736
9736
|
geometry: a
|
|
@@ -9791,7 +9791,7 @@ var K0 = {
|
|
|
9791
9791
|
});
|
|
9792
9792
|
}, Z0 = ({ annotation: e, panel: t }) => {
|
|
9793
9793
|
const n = Ls(e.id);
|
|
9794
|
-
return /* @__PURE__ */ r(
|
|
9794
|
+
return /* @__PURE__ */ r(bs, {
|
|
9795
9795
|
annotation: e,
|
|
9796
9796
|
panel: t,
|
|
9797
9797
|
style: K().annotation.text(e.id).resolve(),
|
|
@@ -9839,7 +9839,7 @@ var K0 = {
|
|
|
9839
9839
|
shape: e,
|
|
9840
9840
|
style: K().annotation.shape(e.id).resolve(),
|
|
9841
9841
|
panel: t
|
|
9842
|
-
}), tv = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(
|
|
9842
|
+
}), tv = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(ks, {
|
|
9843
9843
|
image: e,
|
|
9844
9844
|
panel: t,
|
|
9845
9845
|
style: K().annotation.image(e.id).resolve()
|
|
@@ -10150,7 +10150,7 @@ var K0 = {
|
|
|
10150
10150
|
}), d = uv({
|
|
10151
10151
|
annotationId: e.id,
|
|
10152
10152
|
panelRect: o
|
|
10153
|
-
}), u = K().annotation.shape(e.id).resolve(), { rect: h } =
|
|
10153
|
+
}), u = K().annotation.shape(e.id).resolve(), { rect: h } = Na(pr(t), u.strokeWidth, o);
|
|
10154
10154
|
return /* @__PURE__ */ v("div", {
|
|
10155
10155
|
"data-testid": "shape-selection",
|
|
10156
10156
|
"data-annotation-id": e.id,
|
|
@@ -10260,7 +10260,7 @@ var bl = [
|
|
|
10260
10260
|
].map(({ id: e, key: t }) => ({
|
|
10261
10261
|
id: e,
|
|
10262
10262
|
key: t,
|
|
10263
|
-
fontFamily:
|
|
10263
|
+
fontFamily: ws[e] ?? e
|
|
10264
10264
|
})), Iv = (e) => bl.find((t) => t.id === (e ?? "modern")) ?? null;
|
|
10265
10265
|
var yl = [
|
|
10266
10266
|
{
|
|
@@ -10602,7 +10602,7 @@ var Sl = ({ width: e }) => pe(60, e), Fv = (e, t) => ({
|
|
|
10602
10602
|
resized: Fn(j(t, "text-resize-drag"), e),
|
|
10603
10603
|
isMoved: Nt(j(t, "move-drag"), e) !== null
|
|
10604
10604
|
})), jv = (e, t, n) => {
|
|
10605
|
-
const a = Ne(e), o =
|
|
10605
|
+
const a = Ne(e), o = za(), i = K(), l = E(() => ({
|
|
10606
10606
|
panel: {
|
|
10607
10607
|
width: e.width,
|
|
10608
10608
|
height: e.height
|
|
@@ -10949,7 +10949,7 @@ var Qv = "_1tyillx2", ef = {
|
|
|
10949
10949
|
});
|
|
10950
10950
|
f.current = B, B.start();
|
|
10951
10951
|
}, k = (w, A) => {
|
|
10952
|
-
const B = l.getState(), { layers: te, config: D } = s.getState().scene, S = A.kind === "select-observations" && A.observationIndex !== null ?
|
|
10952
|
+
const B = l.getState(), { layers: te, config: D } = s.getState().scene, S = A.kind === "select-observations" && A.observationIndex !== null ? ps(A.observationIndex, te, A.target, D.parsingLocale) : null;
|
|
10953
10953
|
switch (c.getState().setPressedObservation(S), A.kind) {
|
|
10954
10954
|
case "select-annotation":
|
|
10955
10955
|
B.setSelection([A.target]), P(w, A.target);
|
|
@@ -11118,10 +11118,10 @@ var Qv = "_1tyillx2", ef = {
|
|
|
11118
11118
|
a
|
|
11119
11119
|
]);
|
|
11120
11120
|
}, Pf = () => {
|
|
11121
|
-
const e = De[Me()].observationMenu, t =
|
|
11121
|
+
const e = De[Me()].observationMenu, t = fs((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = R(xe((l) => ({
|
|
11122
11122
|
layers: l.layers,
|
|
11123
11123
|
coordSystem: l.coordSystem
|
|
11124
|
-
}))), { anchorResolver: o } = H(), i =
|
|
11124
|
+
}))), { anchorResolver: o } = H(), i = Oa();
|
|
11125
11125
|
return E(() => {
|
|
11126
11126
|
if (t === null) return null;
|
|
11127
11127
|
const l = n.find((d) => d.id === t.layerId);
|
|
@@ -11283,7 +11283,7 @@ var Qv = "_1tyillx2", ef = {
|
|
|
11283
11283
|
c
|
|
11284
11284
|
]);
|
|
11285
11285
|
}, Nf = ({ frameElement: e, panelRect: t, formattedAxes: n, shouldAnimateTransitions: a }) => {
|
|
11286
|
-
const { measureRef: o, screenRect: i } =
|
|
11286
|
+
const { measureRef: o, screenRect: i } = ds(), { selectionStore: l } = H(), s = W(), c = ee((h) => h.caret?.annotationId ?? null), d = Me(), u = ae(d);
|
|
11287
11287
|
return z(() => (o(e), () => o(null)), [o, e]), z(() => () => {
|
|
11288
11288
|
const h = s.getState();
|
|
11289
11289
|
h.releaseInteraction("menu"), h.setCaret(null), h.setPressedObservation(null);
|
|
@@ -11345,7 +11345,7 @@ var Qv = "_1tyillx2", ef = {
|
|
|
11345
11345
|
shouldAnimateTransitions: i
|
|
11346
11346
|
}), /* @__PURE__ */ r(qg, { frameRect: t })] }), /* @__PURE__ */ r(zp, {
|
|
11347
11347
|
rect: t,
|
|
11348
|
-
zIndex:
|
|
11348
|
+
zIndex: vs.editorOverlay,
|
|
11349
11349
|
container: l,
|
|
11350
11350
|
"data-testid": "editor-overlay",
|
|
11351
11351
|
boxRef: o,
|
|
@@ -11393,11 +11393,11 @@ var Qv = "_1tyillx2", ef = {
|
|
|
11393
11393
|
locale: zn(),
|
|
11394
11394
|
children: /* @__PURE__ */ r(Mm, {
|
|
11395
11395
|
editMenus: a,
|
|
11396
|
-
children: /* @__PURE__ */ r(
|
|
11396
|
+
children: /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(om, {
|
|
11397
11397
|
value: n,
|
|
11398
|
-
children: /* @__PURE__ */ r(
|
|
11398
|
+
children: /* @__PURE__ */ r(Xl, {
|
|
11399
11399
|
editors: _p,
|
|
11400
|
-
children: /* @__PURE__ */ r(
|
|
11400
|
+
children: /* @__PURE__ */ r(As, {
|
|
11401
11401
|
slots: E(() => ({
|
|
11402
11402
|
EditorSurface: Nf,
|
|
11403
11403
|
...e
|