@graphysdk/react-renderer 1.9.0-beta.1792518514317 → 1.9.0-beta.1792575115573
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 +56 -56
- package/dist/{history-chords-Bf7f1kij.js → history-chords-CkXZ_0Gc.js} +607 -605
- package/dist/history-chords-XJ9tQsgG.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +111 -110
- package/package.json +4 -4
- package/dist/history-chords-w_1drv6K.cjs +0 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Dn, $t as Xl, A as Mt, An as
|
|
1
|
+
import { $ as Dn, $t as Xl, A as Mt, An as Zl, B as Yl, C as Jl, Ct as Ma, D as Ql, Dn as W, Dt as es, E as ts, Et as Ne, F as ns, Ft as ne, G as ee, Gt as Sr, I as rs, It as as, J as Cr, K as U, Kt as os, L, Lt as is, Nn as _n, O as Oa, Ot as ls, P as ss, Pt as et, Q as Fn, S as cs, St as E, T as Ee, Tn as Ra, U as ds, W as us, X as hs, Y as ps, Yt as ms, Z as j, _ as De, _n as gs, an as Na, at as zn, b as Da, bt as vs, c as _a, cn as Be, ct as fs, d as bs, dt as ys, en as Ss, et as Fa, f as Cs, ft as ge, g as za, gt as Ot, h as Rt, ht as xs, i as Bn, in as Ba, it as Ha, jn as H, k as un, kn as R, kt as ws, l as ks, lt as Ts, m as As, mt as Ps, n as le, nn as Ls, nt as Nt, o as Is, on as ce, p as Ga, pt as ue, q as Es, r as K, rt as Ms, sn as Hn, st as Os, t as Rs, tn as Va, tt as Gn, u as Ns, ut as xr, v as Ds, vn as _s, wt as Fs, x as zs, xn as Bs, xt as Hs, y as Gs, yt as Vs } from "./history-chords-CkXZ_0Gc.js";
|
|
2
2
|
import { ARROW_DEFAULTS as $s, ARROW_STICKER_DECLARATIONS as Ws, ARROW_STROKE_WIDTHS_PX as Jt, AddAnnotationCommand as Te, AddHighlightCommand as Us, BORDER_RADIUS_TOKENS as wr, COMBO_TYPES as kr, CONSTANT_VARIABLES as Ks, DASH_PRESETS as qs, DEFAULT_BAR_CORNER_RADIUS as js, DEFAULT_GEOM_COLOR as Xs, DEFAULT_POINT_SIZE_PX as $a, DEFAULT_STROKE_WIDTH_PX as Zs, DIFFERENCE_ARROW_DEFAULTS as Wa, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Tr, InternalError as Ys, MAX_BAR_WIDTH_FRACTION as Js, MIN_BAR_WIDTH_FRACTION as Qs, MoveAnnotationCommand as ec, RESTING_HOVER_STATE as Vn, RemoveAnnotationCommand as $e, RemoveHighlightCommand as tc, SHAPE_DEFAULTS as nc, SequenceCommand as qe, SetAxisLabelCommand as Ua, SetAxisPositionCommand as Ka, SetAxisTickModeCommand as qa, SetAxisTicksVisibilityCommand as rc, SetAxisVisibilityCommand as hn, SetBarCornerRadiusCommand as ac, SetBarWidthCommand as ja, SetChartTypeCommand as $n, SetContentCaptionCommand as Xa, SetContentSourceCommand as oc, SetContentSubtitleCommand as Za, SetContentTitleCommand as Ya, SetDataLabelsFormatCommand as Ja, SetDifferenceArrowStyleCommand as ic, SetGridLineStyleCommand as Qa, SetGridVisibilityCommand as pn, SetHeadlineCompareWithCommand as lc, SetHeadlinePositionCommand as sc, SetHeadlineShowCommand as Ar, SetHeadlineSizeCommand as cc, SetHighlightDimStyleCommand as dc, SetLayerYScaleTypeCommand as uc, SetLegendAlignCommand as hc, SetLegendDisplayCommand as pc, SetLegendPlacementCommand as mc, SetLegendPositionCommand as mn, SetLineCurveCommand as eo, SetLineMissingValuesCommand as to, SetLineStyleCommand as Ce, SetMappingCommand as gc, SetNumberFormatAbbreviationCommand as vc, SetNumberFormatDecimalsCommand as Pr, SetObservationsColorCommand as fc, SetPointSizeCommand as Wn, SetPolarInnerRadiusCommand as bc, SetPolarStartAngleCommand as yc, SetRuleLabelCommand as Sc, SetRuleValueCommand as Cc, SetScaleDomainCommand as Ze, SetScaleRangeCommand as xc, SetScaleReverseCommand as wc, SetScaleTransformCommand as no, SetStatLineCommand as kc, SetStyleRuleCommand as Oe, TEXT_ANNOTATION_DEFAULTS as Tc, TEXT_ANNOTATION_FADE_ALPHA as Ac, ToggleCategoryLabelsCommand as ro, ToggleContentVisibilityCommand as Dt, ToggleDataLabelsCommand as ao, ToggleGoalLineCommand as Pc, ToggleLinePointsCommand as Un, ToggleStackTotalsCommand as oo, UpdateAnnotationCommand as ve, alignUnitFractions as Lc, areAnchorsEqual as io, areEditTargetsEqual as Kn, areEndpointsComparable as Ic, buildEditMenuTriggerRegion as Ec, buildLayerStyleAddress as Ge, buildObservationPredicate as Mc, buildObservationsTarget as tt, buildObservationsTargetAtValue as lo, canAnchorDirectLabels as Oc, canBecomeCombo as Rc, canBecomeHeatmap as Nc, clampAnnotationTranslation as Dc, combineKindStyleDeclarations as Lr, computeArrow as so, createObservationAnchorBuilder as _c, createObservationAnchorParser as Fc, createStyleResolver as zc, createStyleRuleMatcher as Bc, createValueFormatter as co, createXValueReader as Hc, filterLayersByGeoms as gn, findAnnotation as Gc, findAverageLineLayer as Vc, findAxisGuide as uo, findCompanionLayers as ho, findGoalLineLayer as $c, findHighlightsAtObservation as Wc, findHostLayer as _t, findKindStyleDeclarations as bt, findLayerByGeom as po, findLayerById as Z, findObservationAttachment as Uc, findStyleRule as Pe, findTrendLineLayer as Kc, formatDifferenceLabel as qc, getBoundingRect as vn, getGroupVariables as mo, getXBand as jc, getYBand as Xc, hasMainAxisBand as Zc, hasMultipleGroups as go, inferDefaultDifferenceArrowEndpoints as Yc, inferDifferenceArrowEndpoints as Jc, isComboChartType as se, isCompanionLayer as vo, isGeomStyleRule as Qc, isLayerSpecOf as Ft, isObservationAttachmentKind as ed, isPointWithinEditMenuTrigger as qn, isSafeUrl as td, isZeroAnchoredAxis as fo, measureObservationsBoxes as bo, projectAnchorToPanel as yt, readBroadestObservationsScope as nd, readChartType as zt, readColorChoices as rd, readComboLineLayerId as ad, readCompanionRowsAtScopeKey as od, readConstantValue as id, readEditTargetKey as Bt, readGeomColor as ld, readHighlightDimStyle as sd, readMainAxis as cd, readMappableAesthetics as dd, readMappedVariable as ud, readObservationIndex as yo, readObservationsColor as hd, readObservationsColorRoute as jn, readReachableLevels as pd, readRowScopeKey as md, readRowsAtScopeKey as gd, readScopeXVariable as vd, readStyleCoord as de, readStyleRulesBeneath as fd, readVariableName as Ht, resolveArrowAnnotationStyle as Xn, resolveBarBandFraction as So, resolveComparisonBasis as bd, resolveDifferenceArrowAnnotationStyle as yd, resolveEditOutlineStyle as Sd, resolveLayerAxisValueFormat as Cd, resolveObservationPoint as Co, resolveObservationsTarget as Je, stepDifferenceArrowEndpoint as xd, toDashPreset as Re, toPaintColor as St, toPanelCursor as Gt, toStrokeDasharray as xo } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as wo, createContext as Me, memo as ko, useCallback as re, useContext as he, useEffect as z, useId as Le, useLayoutEffect as Ie, useMemo as M, useRef as ae, useState as X, useSyncExternalStore as wd } 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 Xd = {
|
|
|
2500
2500
|
"en-US": au,
|
|
2501
2501
|
ar: Jd,
|
|
2502
2502
|
"pt-PT": su
|
|
2503
|
-
}, du = [cu,
|
|
2503
|
+
}, du = [cu, Fs], Mo = ({ children: e, ...t }) => /* @__PURE__ */ r(vs, {
|
|
2504
2504
|
dictionaries: du,
|
|
2505
2505
|
...t,
|
|
2506
2506
|
children: /* @__PURE__ */ r(uu, { children: e })
|
|
@@ -2698,7 +2698,7 @@ var xu = {
|
|
|
2698
2698
|
}, Fu = ({ value: e, onChange: t, onCommit: n, popupAttributes: a, variant: o = "default" }) => {
|
|
2699
2699
|
const i = E(), l = We(), [s, c] = X(!1), d = (p) => {
|
|
2700
2700
|
c(p), p || n?.();
|
|
2701
|
-
}, u = e !== null &&
|
|
2701
|
+
}, u = e !== null && Ls(e) ? e : "#000000", h = Va(u) ? u.toUpperCase() : "#000000";
|
|
2702
2702
|
return /* @__PURE__ */ v(Q.Root, {
|
|
2703
2703
|
open: s,
|
|
2704
2704
|
onOpenChange: d,
|
|
@@ -2769,7 +2769,7 @@ var xu = {
|
|
|
2769
2769
|
return /* @__PURE__ */ r("div", {
|
|
2770
2770
|
onKeyDown: (i) => {
|
|
2771
2771
|
if (t?.(i), !a || i.defaultPrevented) return;
|
|
2772
|
-
const l =
|
|
2772
|
+
const l = Rs(i.nativeEvent);
|
|
2773
2773
|
l && (i.preventDefault(), l === "undo" ? a.undo() : a.redo());
|
|
2774
2774
|
},
|
|
2775
2775
|
...n,
|
|
@@ -3224,7 +3224,7 @@ var jo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
3224
3224
|
});
|
|
3225
3225
|
}, F = () => he(yn);
|
|
3226
3226
|
var Th = "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))", Ah = "d0bl00";
|
|
3227
|
-
var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn =
|
|
3227
|
+
var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = Na.map((e) => ce[e]), Eh = Object.fromEntries(Na.map((e) => [ce[e], e])), Mh = (e) => Sn.some((t) => t.toLowerCase() === e.toLowerCase()), Oh = ({ color: e, onChange: t, open: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: d = !1 }) => {
|
|
3228
3228
|
const u = E(), { ColorSwatches: h, Slider: p } = F(), g = Dh(), m = d ? [Fo, ...Sn] : Sn, f = (b) => {
|
|
3229
3229
|
t(b), a(!1);
|
|
3230
3230
|
};
|
|
@@ -3289,7 +3289,7 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
3289
3289
|
})]
|
|
3290
3290
|
});
|
|
3291
3291
|
}, Rh = (e, t) => {
|
|
3292
|
-
if (
|
|
3292
|
+
if (Va(e)) return e;
|
|
3293
3293
|
const n = Eh[e];
|
|
3294
3294
|
return n === void 0 ? e : t[n];
|
|
3295
3295
|
}, Nh = ({ value: e, onChange: t, popupAttributes: n }) => {
|
|
@@ -3351,12 +3351,12 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
3351
3351
|
ColorPicker: Oh,
|
|
3352
3352
|
MenuPopup: Vh,
|
|
3353
3353
|
MenuItem: $h
|
|
3354
|
-
}, jh = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Xh = `'Aeonik', 'Aeonik Fallback', ${
|
|
3354
|
+
}, jh = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Xh = `'Aeonik', 'Aeonik Fallback', ${Ba}`, Zh = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Yh = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Cn = [
|
|
3355
3355
|
{
|
|
3356
3356
|
id: "modern",
|
|
3357
3357
|
label: "Modern",
|
|
3358
3358
|
preview: "Aa",
|
|
3359
|
-
fontFamily:
|
|
3359
|
+
fontFamily: Ba
|
|
3360
3360
|
},
|
|
3361
3361
|
{
|
|
3362
3362
|
id: "fresh",
|
|
@@ -3806,7 +3806,7 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
3806
3806
|
"aria-label": t
|
|
3807
3807
|
})]
|
|
3808
3808
|
}), kp = 200, ar = ({ content: e, extensions: t, editable: n, onUpdate: a, updateDebounceMs: o = kp }) => {
|
|
3809
|
-
const i = ae(_r(e)), l = ae(i.current), s =
|
|
3809
|
+
const i = ae(_r(e)), l = ae(i.current), s = ws((d) => {
|
|
3810
3810
|
l.current = d, a?.(d);
|
|
3811
3811
|
}, o), c = Vd({
|
|
3812
3812
|
extensions: t,
|
|
@@ -3862,7 +3862,7 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
3862
3862
|
});
|
|
3863
3863
|
return /* @__PURE__ */ r("div", {
|
|
3864
3864
|
"data-testid": "caption-editor",
|
|
3865
|
-
style:
|
|
3865
|
+
style: os(t),
|
|
3866
3866
|
children: /* @__PURE__ */ r(oi, {
|
|
3867
3867
|
editor: a,
|
|
3868
3868
|
ariaLabel: "Chart caption"
|
|
@@ -3902,7 +3902,7 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
3902
3902
|
"data-testid": "text-annotation-editor"
|
|
3903
3903
|
});
|
|
3904
3904
|
}, Fr = (e) => {
|
|
3905
|
-
const t =
|
|
3905
|
+
const t = ys(e);
|
|
3906
3906
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
3907
3907
|
}, Ep = To.create({
|
|
3908
3908
|
name: "annotationTextStyleAttributes",
|
|
@@ -4031,8 +4031,8 @@ var Ph = "d0bl03", Lh = "d0bl04", Ih = 0.01, Sn = za.map((e) => ce[e]), Eh = Obj
|
|
|
4031
4031
|
className: zp,
|
|
4032
4032
|
"data-testid": "title-editor",
|
|
4033
4033
|
style: {
|
|
4034
|
-
...
|
|
4035
|
-
...
|
|
4034
|
+
...Sr(Bp, o),
|
|
4035
|
+
...Sr(Hp, i)
|
|
4036
4036
|
},
|
|
4037
4037
|
children: /* @__PURE__ */ r(oi, {
|
|
4038
4038
|
editor: c,
|
|
@@ -4203,7 +4203,7 @@ var Yp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4203
4203
|
const h = s.current, p = /* @__PURE__ */ new Map(), m = qp(d, {
|
|
4204
4204
|
panelRect: n,
|
|
4205
4205
|
look: a,
|
|
4206
|
-
readGridLineWidth: (C) =>
|
|
4206
|
+
readGridLineWidth: (C) => _a(i, C).strokeWidth,
|
|
4207
4207
|
measurePathBox: (C) => {
|
|
4208
4208
|
const P = h.get(C) ?? Up(t.ownerDocument, C);
|
|
4209
4209
|
return p.set(C, P), P;
|
|
@@ -4243,7 +4243,7 @@ var Yp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4243
4243
|
d: e,
|
|
4244
4244
|
...a
|
|
4245
4245
|
}), i1 = ({ pathData: e, source: t, ...n }) => {
|
|
4246
|
-
const a =
|
|
4246
|
+
const a = gs(e, _s, t);
|
|
4247
4247
|
return /* @__PURE__ */ r(kd.path, {
|
|
4248
4248
|
d: a,
|
|
4249
4249
|
...n
|
|
@@ -6593,8 +6593,8 @@ var Qr = (e, t) => {
|
|
|
6593
6593
|
});
|
|
6594
6594
|
}
|
|
6595
6595
|
}, Km = (e) => {
|
|
6596
|
-
const t = `[${
|
|
6597
|
-
return e.kind !== "axis" ? t : `${t}[${
|
|
6596
|
+
const t = `[${Ql}="${e.kind}"]`;
|
|
6597
|
+
return e.kind !== "axis" ? t : `${t}[${ts}="${e.axis}"]`;
|
|
6598
6598
|
}, qm = (e) => {
|
|
6599
6599
|
const t = /* @__PURE__ */ new Map();
|
|
6600
6600
|
for (const n of e) {
|
|
@@ -6661,7 +6661,7 @@ var Qr = (e, t) => {
|
|
|
6661
6661
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
6662
6662
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
6663
6663
|
}, Ym = [], Jm = (e, { frameElement: t, frameSize: n, panelRect: a, animateTransitions: o }) => {
|
|
6664
|
-
const i = R((f) => f.coordSystem), l =
|
|
6664
|
+
const i = R((f) => f.coordSystem), l = ms(), s = Ra(), c = eg(e.kind === "guide" ? e.target : null, {
|
|
6665
6665
|
frameElement: t,
|
|
6666
6666
|
frameSize: n
|
|
6667
6667
|
}), d = Qm(t, n), u = M(() => ({
|
|
@@ -6887,7 +6887,7 @@ var Qr = (e, t) => {
|
|
|
6887
6887
|
vertex: null
|
|
6888
6888
|
};
|
|
6889
6889
|
}, og = ["x", "y"], ig = ko(function({ frameElement: t, frameSize: n, panelRect: a, animateTransitions: o }) {
|
|
6890
|
-
const i =
|
|
6890
|
+
const i = Xl(Sd, W()), l = ng(), s = Vm(l?.outlined ?? null);
|
|
6891
6891
|
if (l === null && s === null) return null;
|
|
6892
6892
|
const c = {
|
|
6893
6893
|
frameElement: t,
|
|
@@ -7067,7 +7067,7 @@ var Qr = (e, t) => {
|
|
|
7067
7067
|
}, i);
|
|
7068
7068
|
case "dots":
|
|
7069
7069
|
return a.centers.length === 0 ? null : /* @__PURE__ */ r("path", {
|
|
7070
|
-
d:
|
|
7070
|
+
d: Bs(a.centers, a.size / 2),
|
|
7071
7071
|
pathLength: Fi(a.size / 2, n, a.centers.length),
|
|
7072
7072
|
"data-geom": t.geom
|
|
7073
7073
|
}, i);
|
|
@@ -7081,7 +7081,7 @@ var Qr = (e, t) => {
|
|
|
7081
7081
|
}, gg = ({ target: e, shapes: t, borderRadius: n, dashPeriod: a }) => {
|
|
7082
7082
|
const o = W();
|
|
7083
7083
|
if (e.kind === "grid") return og.map((l) => {
|
|
7084
|
-
const s = si(
|
|
7084
|
+
const s = si(_a(o, l).strokeWidth), c = t.map((u) => vg(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
|
|
7085
7085
|
return /* @__PURE__ */ v(wo, { children: [c !== "" && /* @__PURE__ */ r("path", {
|
|
7086
7086
|
d: c,
|
|
7087
7087
|
...s
|
|
@@ -7107,7 +7107,7 @@ var Qr = (e, t) => {
|
|
|
7107
7107
|
height: n.height,
|
|
7108
7108
|
overflow: "visible",
|
|
7109
7109
|
children: /* @__PURE__ */ r("line", {
|
|
7110
|
-
...
|
|
7110
|
+
...Jl(a, i, n),
|
|
7111
7111
|
stroke: t.stroke,
|
|
7112
7112
|
strokeOpacity: t.strokeAlpha,
|
|
7113
7113
|
strokeWidth: t.strokeWidth,
|
|
@@ -7458,7 +7458,7 @@ var Qr = (e, t) => {
|
|
|
7458
7458
|
ariaLabel: n("editor.overlayMenu.selection")
|
|
7459
7459
|
});
|
|
7460
7460
|
}, Fg = ({ scene: e, pressed: t, groupOptions: n, locale: a, t: o, hasOverlayMenu: i }) => {
|
|
7461
|
-
const l = t === null ? null :
|
|
7461
|
+
const l = t === null ? null : ps(t, e.layers, e.config.parsingLocale);
|
|
7462
7462
|
if (t === null || l === null) return null;
|
|
7463
7463
|
const { layer: s, observation: c } = l, { observationIndex: d, selectedFor: u } = t, { parsingLocale: h } = e.config, p = pd({
|
|
7464
7464
|
layer: s,
|
|
@@ -8340,7 +8340,7 @@ var m2 = (e) => {
|
|
|
8340
8340
|
icon: /* @__PURE__ */ r(Yi, {}),
|
|
8341
8341
|
children: /* @__PURE__ */ r("div", {
|
|
8342
8342
|
className: M2,
|
|
8343
|
-
children: Object.entries(
|
|
8343
|
+
children: Object.entries(ks).map(([i, l]) => /* @__PURE__ */ r(Ae.Item, {
|
|
8344
8344
|
className: O2,
|
|
8345
8345
|
"aria-label": i,
|
|
8346
8346
|
onClick: () => o(i),
|
|
@@ -8508,7 +8508,7 @@ var m2 = (e) => {
|
|
|
8508
8508
|
},
|
|
8509
8509
|
"data-testid": "arrow-endpoint-preview",
|
|
8510
8510
|
"data-annotation-id": t.annotationId,
|
|
8511
|
-
children: /* @__PURE__ */ r(
|
|
8511
|
+
children: /* @__PURE__ */ r(za, {
|
|
8512
8512
|
computed: l,
|
|
8513
8513
|
style: i,
|
|
8514
8514
|
addressable: !1
|
|
@@ -8745,7 +8745,7 @@ var m2 = (e) => {
|
|
|
8745
8745
|
}, {
|
|
8746
8746
|
value: "none",
|
|
8747
8747
|
key: "graph.annotations.arrowToolbar.arrowhead.none",
|
|
8748
|
-
Icon:
|
|
8748
|
+
Icon: ns
|
|
8749
8749
|
}], la = [
|
|
8750
8750
|
{
|
|
8751
8751
|
value: "solid",
|
|
@@ -9406,7 +9406,7 @@ var _0 = "ydgo3h1", F0 = "ydgo3h2", z0 = "ydgo3h3", B0 = ({ clientPoint: e, pane
|
|
|
9406
9406
|
}
|
|
9407
9407
|
readOwn(e) {
|
|
9408
9408
|
const { endpoint: t, readInputs: n } = this.params;
|
|
9409
|
-
return
|
|
9409
|
+
return Fa(j(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
|
|
9410
9410
|
}
|
|
9411
9411
|
resolvePreview(e) {
|
|
9412
9412
|
const { endpoint: t, readInputs: n, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem: d } = n(), u = B0({
|
|
@@ -9489,7 +9489,7 @@ var _0 = "ydgo3h1", F0 = "ydgo3h2", z0 = "ydgo3h3", B0 = ({ clientPoint: e, pane
|
|
|
9489
9489
|
j(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
|
|
9490
9490
|
}, [a, s]), re((c) => ({ onKeyDown: (d) => {
|
|
9491
9491
|
if (d.altKey || d.ctrlKey || d.metaKey || d.shiftKey) return;
|
|
9492
|
-
const u = a.getState(), h =
|
|
9492
|
+
const u = a.getState(), h = Fa(j(u, "difference-arrow-endpoint-drag"), e.id, c);
|
|
9493
9493
|
if ($0.includes(d.key)) {
|
|
9494
9494
|
if (d.preventDefault(), d.repeat) return;
|
|
9495
9495
|
if (h === null) return u.claimInteraction({
|
|
@@ -9569,7 +9569,7 @@ var _0 = "ydgo3h1", F0 = "ydgo3h2", z0 = "ydgo3h3", B0 = ({ clientPoint: e, pane
|
|
|
9569
9569
|
...e
|
|
9570
9570
|
});
|
|
9571
9571
|
}, j0 = ({ annotationId: e, ...t }) => {
|
|
9572
|
-
const n =
|
|
9572
|
+
const n = ds(), a = M(() => n.find((o) => o.id === e), [n, e]);
|
|
9573
9573
|
return a === void 0 ? null : /* @__PURE__ */ r(X0, {
|
|
9574
9574
|
committedArrow: a.committedArrow,
|
|
9575
9575
|
color: a.color,
|
|
@@ -9702,7 +9702,7 @@ var sl = ({ width: e, height: t }) => ({
|
|
|
9702
9702
|
};
|
|
9703
9703
|
}, dl = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, ul = (e) => e === "top-left" || e === "bottom-left", hl = (e) => e === "top-left" || e === "top-right", pl = (e, t, n, a) => {
|
|
9704
9704
|
const o = e.textAnnotations.find((i) => i.id === t);
|
|
9705
|
-
return o === void 0 ? null :
|
|
9705
|
+
return o === void 0 ? null : zs(Ns(o, n), a);
|
|
9706
9706
|
}, J0 = "var(--_1ee8fau0)";
|
|
9707
9707
|
var Q0 = {
|
|
9708
9708
|
hovered: "_1ee8fau2 _1ee8fau1",
|
|
@@ -9711,7 +9711,7 @@ var Q0 = {
|
|
|
9711
9711
|
hovered: "_1ee8fau5 _1ee8fau4",
|
|
9712
9712
|
selected: "_1ee8fau6 _1ee8fau4"
|
|
9713
9713
|
}, tv = ({ panelRect: e }) => {
|
|
9714
|
-
const t = De(e), n =
|
|
9714
|
+
const t = De(e), n = Ha(), a = W(), 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(Es), u = M(() => ({
|
|
9715
9715
|
panel: {
|
|
9716
9716
|
width: e.width,
|
|
9717
9717
|
height: e.height
|
|
@@ -9726,7 +9726,7 @@ var Q0 = {
|
|
|
9726
9726
|
]), h = pa(t, o, u), p = pa(t, d === o ? null : d, u), g = (f) => {
|
|
9727
9727
|
if (l?.annotationId === f.id) {
|
|
9728
9728
|
const b = t.shapes.find((C) => C.id === f.id);
|
|
9729
|
-
return b === void 0 ? f.geometry :
|
|
9729
|
+
return b === void 0 ? f.geometry : Da(pr(l.region), a.annotation.shape(b.id).get("strokeWidth"), u.panel);
|
|
9730
9730
|
}
|
|
9731
9731
|
if (s?.annotationId === f.id) {
|
|
9732
9732
|
const b = t.arrows.find((C) => C.id === f.id);
|
|
@@ -9754,7 +9754,7 @@ var Q0 = {
|
|
|
9754
9754
|
})] });
|
|
9755
9755
|
}, pa = (e, t, n) => {
|
|
9756
9756
|
if (t === null) return null;
|
|
9757
|
-
const a =
|
|
9757
|
+
const a = cs(e, t, n);
|
|
9758
9758
|
return a === null ? null : {
|
|
9759
9759
|
id: t,
|
|
9760
9760
|
geometry: a
|
|
@@ -9814,8 +9814,8 @@ var Q0 = {
|
|
|
9814
9814
|
children: ov(n, t.annotationId, e)
|
|
9815
9815
|
});
|
|
9816
9816
|
}, rv = ({ annotation: e, panel: t }) => {
|
|
9817
|
-
const n =
|
|
9818
|
-
return /* @__PURE__ */ r(
|
|
9817
|
+
const n = Ms(e.id);
|
|
9818
|
+
return /* @__PURE__ */ r(bs, {
|
|
9819
9819
|
annotation: e,
|
|
9820
9820
|
panel: t,
|
|
9821
9821
|
style: W().annotation.text(e.id).resolve(),
|
|
@@ -9854,16 +9854,16 @@ var Q0 = {
|
|
|
9854
9854
|
panelWidth: t.width,
|
|
9855
9855
|
panelHeight: t.height
|
|
9856
9856
|
});
|
|
9857
|
-
return a === null ? null : /* @__PURE__ */ r(
|
|
9857
|
+
return a === null ? null : /* @__PURE__ */ r(za, {
|
|
9858
9858
|
computed: a,
|
|
9859
9859
|
style: n,
|
|
9860
9860
|
addressable: !1
|
|
9861
9861
|
});
|
|
9862
|
-
}, lv = ({ shape: e, panelSize: t }) => /* @__PURE__ */ r(
|
|
9862
|
+
}, lv = ({ shape: e, panelSize: t }) => /* @__PURE__ */ r(Ga, {
|
|
9863
9863
|
shape: e,
|
|
9864
9864
|
style: W().annotation.shape(e.id).resolve(),
|
|
9865
9865
|
panel: t
|
|
9866
|
-
}), sv = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(
|
|
9866
|
+
}), sv = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(As, {
|
|
9867
9867
|
image: e,
|
|
9868
9868
|
panel: t,
|
|
9869
9869
|
style: W().annotation.image(e.id).resolve()
|
|
@@ -9882,7 +9882,7 @@ var Q0 = {
|
|
|
9882
9882
|
},
|
|
9883
9883
|
"data-testid": "shape-resize-preview",
|
|
9884
9884
|
"data-annotation-id": t.annotationId,
|
|
9885
|
-
children: /* @__PURE__ */ r(
|
|
9885
|
+
children: /* @__PURE__ */ r(Ga, {
|
|
9886
9886
|
shape: {
|
|
9887
9887
|
...o,
|
|
9888
9888
|
region: pr(t.region)
|
|
@@ -10174,7 +10174,7 @@ var Q0 = {
|
|
|
10174
10174
|
}), d = bv({
|
|
10175
10175
|
annotationId: e.id,
|
|
10176
10176
|
panelRect: o
|
|
10177
|
-
}), u = W().annotation.shape(e.id).resolve(), { rect: h } =
|
|
10177
|
+
}), u = W().annotation.shape(e.id).resolve(), { rect: h } = Da(pr(t), u.strokeWidth, o);
|
|
10178
10178
|
return /* @__PURE__ */ v("div", {
|
|
10179
10179
|
"data-testid": "shape-selection",
|
|
10180
10180
|
"data-annotation-id": e.id,
|
|
@@ -10284,7 +10284,7 @@ var yl = [
|
|
|
10284
10284
|
].map(({ id: e, key: t }) => ({
|
|
10285
10285
|
id: e,
|
|
10286
10286
|
key: t,
|
|
10287
|
-
fontFamily:
|
|
10287
|
+
fontFamily: Ts[e] ?? e
|
|
10288
10288
|
})), _v = (e) => yl.find((t) => t.id === (e ?? "modern")) ?? null;
|
|
10289
10289
|
var Sl = [
|
|
10290
10290
|
{
|
|
@@ -10626,7 +10626,7 @@ var Cl = ({ width: e }) => me(60, e), Wv = (e, t) => ({
|
|
|
10626
10626
|
resized: Fn(j(t, "text-resize-drag"), e),
|
|
10627
10627
|
moving: Nt(j(t, "move-drag"), e) !== null
|
|
10628
10628
|
})), tf = (e, t, n) => {
|
|
10629
|
-
const a = De(e), o =
|
|
10629
|
+
const a = De(e), o = Ha(), i = W(), l = M(() => ({
|
|
10630
10630
|
panel: {
|
|
10631
10631
|
width: e.width,
|
|
10632
10632
|
height: e.height
|
|
@@ -10838,7 +10838,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
10838
10838
|
y: o - c.y
|
|
10839
10839
|
}, s);
|
|
10840
10840
|
if (!(n instanceof Element && i.contains(n))) return {
|
|
10841
|
-
targetAtPoint:
|
|
10841
|
+
targetAtPoint: Cr({
|
|
10842
10842
|
overMenuTrigger: h,
|
|
10843
10843
|
stamped: ba(!1, !1, e, t),
|
|
10844
10844
|
observations: null
|
|
@@ -10850,7 +10850,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
10850
10850
|
layers: u.layers,
|
|
10851
10851
|
scales: u.scales,
|
|
10852
10852
|
parsingLocale: u.config.parsingLocale
|
|
10853
|
-
}), b = f !== null && t.hasOverlayMenu(f.target) ? f : null, C =
|
|
10853
|
+
}), b = f !== null && t.hasOverlayMenu(f.target) ? f : null, C = Cr({
|
|
10854
10854
|
overMenuTrigger: h,
|
|
10855
10855
|
stamped: ba(p, b !== null, e, t),
|
|
10856
10856
|
observations: b
|
|
@@ -10949,7 +10949,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
10949
10949
|
const A = w.target.closest(Oa);
|
|
10950
10950
|
return A !== null && e.contains(A) && Mt([w.target], e) === null;
|
|
10951
10951
|
}, P = (w, A) => {
|
|
10952
|
-
if (f.current !== null || !
|
|
10952
|
+
if (f.current !== null || !Ds(p.current.annotations, A.id)) return;
|
|
10953
10953
|
try {
|
|
10954
10954
|
e.setPointerCapture(w.pointerId);
|
|
10955
10955
|
} catch {
|
|
@@ -10973,7 +10973,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
10973
10973
|
});
|
|
10974
10974
|
f.current = B, B.start();
|
|
10975
10975
|
}, k = (w, A) => {
|
|
10976
|
-
const B = l.getState(), { layers: te, config: D } = s.getState().scene, S = A.kind === "select-observations" && A.observationIndex !== null ?
|
|
10976
|
+
const B = l.getState(), { layers: te, config: D } = s.getState().scene, S = A.kind === "select-observations" && A.observationIndex !== null ? hs(A.observationIndex, te, A.target, D.parsingLocale) : null;
|
|
10977
10977
|
switch (c.getState().setPressedObservation(S), A.kind) {
|
|
10978
10978
|
case "select-annotation":
|
|
10979
10979
|
B.setSelection([A.target]), P(w, A.target);
|
|
@@ -11115,7 +11115,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
11115
11115
|
o
|
|
11116
11116
|
]);
|
|
11117
11117
|
}, Of = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), Rf = (e, t) => {
|
|
11118
|
-
const n = U(), { store: a } = H(), { engine: o, overlayRef: i } = et(), l = ne(t), { annotations: s, observationsPress: c, guidePress: d, tolerance: u } = Ne[Ee()], h =
|
|
11118
|
+
const n = U(), { store: a } = H(), { engine: o, overlayRef: i } = et(), l = ne(t), { annotations: s, observationsPress: c, guidePress: d, tolerance: u } = Ne[Ee()], h = Os(), p = Wt(), g = c && !h;
|
|
11119
11119
|
return re(() => ({
|
|
11120
11120
|
frameElement: e,
|
|
11121
11121
|
captureRect: i.current,
|
|
@@ -11142,10 +11142,10 @@ var lf = "_1tyillx2", sf = {
|
|
|
11142
11142
|
a
|
|
11143
11143
|
]);
|
|
11144
11144
|
}, Nf = () => {
|
|
11145
|
-
const e = Ne[Ee()].observationMenu, t =
|
|
11145
|
+
const e = Ne[Ee()].observationMenu, t = fs((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = R(xe((l) => ({
|
|
11146
11146
|
layers: l.layers,
|
|
11147
11147
|
coordSystem: l.coordSystem
|
|
11148
|
-
}))), { anchorResolver: o } = H(), i =
|
|
11148
|
+
}))), { anchorResolver: o } = H(), i = Ra();
|
|
11149
11149
|
return M(() => {
|
|
11150
11150
|
if (t === null) return null;
|
|
11151
11151
|
const l = n.find((d) => d.id === t.layerId);
|
|
@@ -11307,7 +11307,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
11307
11307
|
c
|
|
11308
11308
|
]);
|
|
11309
11309
|
}, Gf = ({ frameElement: e, panelRect: t, formattedAxes: n, animateTransitions: a }) => {
|
|
11310
|
-
const { measureRef: o, screenRect: i } =
|
|
11310
|
+
const { measureRef: o, screenRect: i } = es(), { selectionStore: l } = H(), s = U(), c = ee((h) => h.caret?.annotationId ?? null), d = Ee(), u = ae(d);
|
|
11311
11311
|
return z(() => (o(e), () => o(null)), [o, e]), z(() => () => {
|
|
11312
11312
|
const h = s.getState();
|
|
11313
11313
|
h.releaseInteraction("menu"), h.setCaret(null), h.setPressedObservation(null);
|
|
@@ -11369,7 +11369,7 @@ var lf = "_1tyillx2", sf = {
|
|
|
11369
11369
|
animateTransitions: i
|
|
11370
11370
|
}), /* @__PURE__ */ r(e2, { frameRect: t })] }), /* @__PURE__ */ r(Wp, {
|
|
11371
11371
|
rect: t,
|
|
11372
|
-
zIndex:
|
|
11372
|
+
zIndex: Ss.editorOverlay,
|
|
11373
11373
|
container: l,
|
|
11374
11374
|
"data-testid": "editor-overlay",
|
|
11375
11375
|
boxRef: o,
|
|
@@ -11417,11 +11417,11 @@ var lf = "_1tyillx2", sf = {
|
|
|
11417
11417
|
locale: zn(),
|
|
11418
11418
|
children: /* @__PURE__ */ r(Fm, {
|
|
11419
11419
|
editMenus: a,
|
|
11420
|
-
children: /* @__PURE__ */ r(
|
|
11420
|
+
children: /* @__PURE__ */ r(us, { children: /* @__PURE__ */ r(hm, {
|
|
11421
11421
|
value: n,
|
|
11422
|
-
children: /* @__PURE__ */ r(
|
|
11422
|
+
children: /* @__PURE__ */ r(Yl, {
|
|
11423
11423
|
editors: Vp,
|
|
11424
|
-
children: /* @__PURE__ */ r(
|
|
11424
|
+
children: /* @__PURE__ */ r(Is, {
|
|
11425
11425
|
slots: M(() => ({
|
|
11426
11426
|
EditorSurface: Gf,
|
|
11427
11427
|
...e
|
|
@@ -11456,9 +11456,9 @@ var e5 = () => () => {
|
|
|
11456
11456
|
const t = wd(e?.store.subscribe ?? e5, () => e?.store.getState().scene.config.parsingLocale);
|
|
11457
11457
|
return e?.formattingLocale ?? t;
|
|
11458
11458
|
}, n5 = (e) => {
|
|
11459
|
-
const t = he(
|
|
11459
|
+
const t = he(Zl), n = t5(t), a = Hs(), o = xs();
|
|
11460
11460
|
let i = /* @__PURE__ */ r(r5, { ...e });
|
|
11461
|
-
return !o && t && (i = /* @__PURE__ */ r(
|
|
11461
|
+
return !o && t && (i = /* @__PURE__ */ r(Ps, {
|
|
11462
11462
|
colorScheme: t.colorScheme,
|
|
11463
11463
|
children: i
|
|
11464
11464
|
})), a || (i = /* @__PURE__ */ r(Mo, {
|