@graphysdk/react-renderer 1.9.0-beta.1793788324987 → 1.9.0-beta.1793799752548
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 +21 -21
- package/dist/{history-chords-CSUG-Nyi.js → history-chords-DC1G9pA2.js} +2218 -2204
- package/dist/history-chords-DDANG01l.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +57 -21
- package/dist/index.mjs +258 -256
- package/package.json +3 -3
- package/dist/history-chords-QMnUaJIS.cjs +0 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Zo,
|
|
1
|
+
import { $ as Zo, At as ge, Bn as xs, C as ws, Ct as E, D as Yo, Dt as ks, E as Ts, Et as As, F as Ps, Fn as Jo, G as X, H as Ls, I, It as tt, J as Is, Jt as Es, K as Ms, Ln as K, Lt as ee, Mn as Os, Mt as Oe, N as Rs, O as yn, Ot as Ns, P as Ds, Q as $n, Rt as _s, S as Fs, Sn as zs, St as Qo, T as Bs, Tn as Hs, Tt as Gs, U as Vs, Un as Wn, V as $s, Vn as H, W as Q, X as q, Y as Ws, Z as Un, Zt as Us, _ as ze, b as ea, c as ta, cn as de, ct as Ks, d as js, dt as qs, et as Kn, f as Xs, ft as me, g as na, gt as Dt, h as nt, ht as Zs, i as rt, in as Ys, it as jn, jt as Js, k as _t, l as Qs, ln as qn, lt as ec, m as tc, mt as nc, n as se, nn as rc, nt as oc, o as ac, on as ra, p as oa, pt as Se, q as Ir, qt as Er, r as W, rn as aa, rt as ia, sn as la, st as ic, t as lc, tn as sc, tt as Ft, u as cc, un as He, ut as Mr, v as dc, wt as sa, x as uc, xn as hc, xt as pc, y as gc, yt as mc, zn as R, zt as vc } from "./history-chords-DC1G9pA2.js";
|
|
2
2
|
import { ARROW_DEFAULTS as fc, ARROW_STICKER_DECLARATIONS as bc, ARROW_STROKE_WIDTHS_PX as nn, AddAnnotationCommand as Ie, AddHighlightCommand as yc, COMBO_TYPES as Or, CONSTANT_VARIABLES as Sc, DASH_PRESETS as Cc, DEFAULT_BAR_CORNER_RADII as xc, DEFAULT_GEOM_COLOR as wc, DEFAULT_POINT_SIZE_PX as ca, DEFAULT_STROKE_WIDTH_PX as kc, DIFFERENCE_ARROW_DEFAULTS as da, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Rr, InternalError as Tc, MAX_BAR_WIDTH_FRACTION as Ac, MIN_BAR_WIDTH_FRACTION as Pc, MoveAnnotationCommand as Lc, RESTING_HOVER_STATE as Xn, RemoveAnnotationCommand as We, RemoveHighlightCommand as Ic, SHAPE_DEFAULTS as Ec, STYLE_POINT_SYMBOLS as rn, SequenceCommand as Ze, SetAxisLabelCommand as ua, SetAxisPositionCommand as ha, SetAxisTickModeCommand as pa, SetAxisTicksVisibilityCommand as Mc, SetAxisVisibilityCommand as Sn, SetBarCornerRadiusCommand as Oc, SetBarWidthCommand as ga, SetContentCaptionCommand as ma, SetContentSourceCommand as Rc, SetContentSubtitleCommand as va, SetContentTitleCommand as fa, SetDataLabelsFormatCommand as ba, SetDifferenceArrowStyleCommand as Nc, SetGraphTypeCommand as Zn, SetGridLineStyleCommand as ya, SetGridVisibilityCommand as Cn, SetHeadlineCompareWithCommand as Dc, SetHeadlinePositionCommand as _c, SetHeadlineShowCommand as Nr, SetHeadlineSizeCommand as Fc, SetHighlightDimStyleCommand as zc, SetLayerYScaleTypeCommand as Bc, SetLegendAlignCommand as Hc, SetLegendDisplayCommand as Gc, SetLegendPlacementCommand as Vc, SetLegendPositionCommand as xn, SetLineCurveCommand as Sa, SetLineMissingValuesCommand as Ca, SetLineStyleCommand as ke, SetMappingCommand as $c, SetNumberFormatAbbreviationCommand as Wc, SetNumberFormatDecimalsCommand as Dr, SetObservationsColorCommand as Uc, SetPointSizeCommand as zt, SetPointSymbolCommand as Yn, SetPolarInnerRadiusCommand as Kc, SetPolarStartAngleCommand as jc, SetRuleLabelCommand as qc, SetRuleValueCommand as Xc, SetScaleDomainCommand as Je, SetScaleRangeCommand as xa, SetScaleReverseCommand as Zc, SetScaleTransformCommand as wa, SetStatLineCommand as Yc, SetStyleRuleCommand as De, TEXT_ANNOTATION_DEFAULTS as Jc, TEXT_ANNOTATION_FADE_ALPHA as Qc, ToggleCategoryLabelsCommand as ka, ToggleContentVisibilityCommand as Ne, ToggleDataLabelsCommand as Ta, ToggleGoalLineCommand as ed, ToggleLinePointsCommand as Jn, ToggleStackTotalsCommand as Aa, UpdateAnnotationCommand as ve, alignUnitFractions as td, areAnchorsEqual as Pa, areEditTargetsEqual as Qn, areEndpointsComparable as nd, buildColormapRange as rd, buildDivergingRange as _r, buildEditMenuTriggerRegion as od, buildLayerStyleAddress as Ve, buildObservationPredicate as ad, buildObservationsTarget as Ue, buildObservationsTargetAtValue as La, buildPointSymbolInBox as id, canAnchorDirectLabels as ld, canBecomeCombo as sd, canBecomeHeatmap as cd, clampAnnotationTranslation as dd, combineKindStyleDeclarations as Fr, computeArrow as Ia, createObservationAnchorBuilder as ud, createObservationAnchorParser as hd, createStyleResolver as pd, createStyleRuleMatcher as gd, createValueFormatter as Ea, createXValueReader as md, filterLayersByGeoms as wn, findAnnotation as vd, findAverageLineLayer as fd, findAxisGuide as Ma, findCompanionLayers as Oa, findGoalLineLayer as bd, findHighlightsAtObservation as yd, findHostLayer as Bt, findKindStyleDeclarations as xt, findLayerByGeom as Ra, findLayerById as $, findObservationAttachment as Sd, findStyleRule as Ee, findTrendLineLayer as Cd, formatDifferenceLabel as xd, getBoundingRect as kn, getGroupVariables as Na, getXBand as wd, getYBand as kd, hasMainAxisBand as Td, hasMultipleGroups as Ht, inferDefaultDifferenceArrowEndpoints as Ad, inferDifferenceArrowEndpoints as Pd, isComboGraphType as le, isCompanionLayer as Da, isGeomStyleRule as Ld, isLayerSpecOf as Ke, isObservationAttachmentKind as Id, isPointWithinEditMenuTrigger as er, isSafeUrl as Ed, isZeroAnchoredAxis as _a, measureObservationsBoxes as Fa, projectAnchorToPanel as wt, readBroadestObservationsScope as Md, readColorChoices as za, readColorPart as Od, readColormapColor as Rd, readComboLineLayerId as Nd, readCompanionRowsAtScopeKey as Dd, readConstantValue as _d, readDivergingColor as zr, readEditTargetKey as Gt, readGeomColor as Fd, readGraphType as Vt, readHighlightDimStyle as zd, readMainAxis as Bd, readMappableAesthetics as Hd, readMappedVariable as Gd, readObservationIndex as tr, readObservationsColor as Vd, readObservationsColorPart as $d, readObservationsColorRoute as $t, readReachableLevels as Wd, readRowScopeKey as Ud, readRowsAtScopeKey as Kd, readScopeXVariable as jd, readStyleCoord as ue, readStyleRulesBeneath as qd, readVariableName as ot, resolveArrowAnnotationStyle as nr, resolveBarBandFraction as Ba, resolveComparisonBasis as Xd, resolveDifferenceArrowAnnotationStyle as Zd, resolveEditOutlineStyle as Yd, resolveLayerAxisValueFormat as Jd, resolveObservationPoint as Ha, resolveObservationsTarget as _e, stepDifferenceArrowEndpoint as Qd, toDashPreset as Fe, toPaintColor as kt, toPanelCursor as Wt, toStrokeDasharray as Ga } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as Va, createContext as Re, memo as $a, useCallback as te, useContext as ce, useEffect as B, useId as Te, useLayoutEffect as Me, useMemo as M, useRef as ne, useState as U, useSyncExternalStore as eu } from "react";
|
|
4
4
|
import { Fragment as V, jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
@@ -2357,7 +2357,7 @@ var j3 = 512 * 1024, $p = (e) => new Promise((t) => {
|
|
|
2357
2357
|
})
|
|
2358
2358
|
});
|
|
2359
2359
|
}, cr = ({ symbol: e, onChange: t }) => {
|
|
2360
|
-
const n = E(), { ToggleGroup: o } = _(), [a, i] = U(null), l = ce(jt), s =
|
|
2360
|
+
const n = E(), { ToggleGroup: o } = _(), [a, i] = U(null), l = ce(jt), s = Os(), c = l ? l.getGlyphs().map((h) => h.name) : [...s.keys()], d = [...new Set(c)].filter((h) => !rn.some((p) => p === h)), u = (h) => {
|
|
2361
2361
|
i(null);
|
|
2362
2362
|
const p = rn.find((g) => g === h);
|
|
2363
2363
|
if (p !== void 0) {
|
|
@@ -2861,7 +2861,7 @@ var to = [
|
|
|
2861
2861
|
return {
|
|
2862
2862
|
value: d,
|
|
2863
2863
|
label: n(`editor.overlayMenu.legendPlaces.${d}`),
|
|
2864
|
-
icon: /* @__PURE__ */ r(
|
|
2864
|
+
icon: /* @__PURE__ */ r(Ps, {
|
|
2865
2865
|
title: "",
|
|
2866
2866
|
size: "xs",
|
|
2867
2867
|
style: { transform: `rotate(${c1(c)}deg)` }
|
|
@@ -6407,7 +6407,7 @@ var Z1 = ({ graph: e, target: t }) => {
|
|
|
6407
6407
|
"en-US": cg,
|
|
6408
6408
|
ar: rg,
|
|
6409
6409
|
"pt-PT": pg
|
|
6410
|
-
}, mg = [gg,
|
|
6410
|
+
}, mg = [gg, Gs], rl = ({ children: e, ...t }) => /* @__PURE__ */ r(pc, {
|
|
6411
6411
|
dictionaries: mg,
|
|
6412
6412
|
...t,
|
|
6413
6413
|
children: /* @__PURE__ */ r(vg, { children: e })
|
|
@@ -7125,7 +7125,7 @@ var kg = "d0bl03", Tg = "d0bl04", Ag = 0.01, On = la.map((e) => de[e]), Pg = Obj
|
|
|
7125
7125
|
});
|
|
7126
7126
|
return /* @__PURE__ */ r("div", {
|
|
7127
7127
|
"data-testid": "caption-editor",
|
|
7128
|
-
style:
|
|
7128
|
+
style: Es(t),
|
|
7129
7129
|
children: /* @__PURE__ */ r(gl, {
|
|
7130
7130
|
editor: o,
|
|
7131
7131
|
ariaLabel: "Chart caption"
|
|
@@ -7506,7 +7506,7 @@ var qm = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
7506
7506
|
d: e,
|
|
7507
7507
|
...o
|
|
7508
7508
|
}), r2 = ({ pathData: e, source: t, ...n }) => {
|
|
7509
|
-
const o =
|
|
7509
|
+
const o = hc(e, zs, t);
|
|
7510
7510
|
return /* @__PURE__ */ r(tu.path, {
|
|
7511
7511
|
d: o,
|
|
7512
7512
|
...n
|
|
@@ -7689,7 +7689,7 @@ var fo = (e, t) => {
|
|
|
7689
7689
|
});
|
|
7690
7690
|
}
|
|
7691
7691
|
}, h2 = (e) => {
|
|
7692
|
-
const t = `[${
|
|
7692
|
+
const t = `[${Ts}="${e.kind}"]`;
|
|
7693
7693
|
return e.kind !== "axis" ? t : `${t}[${Bs}="${e.axis}"]`;
|
|
7694
7694
|
}, p2 = (e) => {
|
|
7695
7695
|
const t = /* @__PURE__ */ new Map();
|
|
@@ -7757,7 +7757,7 @@ var fo = (e, t) => {
|
|
|
7757
7757
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
7758
7758
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
7759
7759
|
}, f2 = [], b2 = (e, { frameElement: t, frameSize: n, panelRect: o, animateTransitions: a }) => {
|
|
7760
|
-
const i = R((f) => f.coordSystem), l =
|
|
7760
|
+
const i = R((f) => f.coordSystem), l = Us(), s = Jo(), c = S2(e.kind === "guide" ? e.target : null, {
|
|
7761
7761
|
frameElement: t,
|
|
7762
7762
|
frameSize: n
|
|
7763
7763
|
}), d = y2(t, n), u = M(() => ({
|
|
@@ -8172,7 +8172,7 @@ var fo = (e, t) => {
|
|
|
8172
8172
|
}, i);
|
|
8173
8173
|
case "dots":
|
|
8174
8174
|
return o.centers.length === 0 ? null : /* @__PURE__ */ r("path", {
|
|
8175
|
-
d:
|
|
8175
|
+
d: Hs(o.centers, o.size / 2),
|
|
8176
8176
|
pathLength: yl(o.size / 2, n, o.centers.length),
|
|
8177
8177
|
"data-geom": t.geom
|
|
8178
8178
|
}, i);
|
|
@@ -8247,7 +8247,7 @@ var fo = (e, t) => {
|
|
|
8247
8247
|
return B(() => {
|
|
8248
8248
|
t(!0);
|
|
8249
8249
|
}, []), e;
|
|
8250
|
-
}, U2 = (e) =>
|
|
8250
|
+
}, U2 = (e) => _s.some((t) => t === e), So = (e, t, n) => n === 0 ? 0 : e * t / n, K2 = {
|
|
8251
8251
|
x: 8,
|
|
8252
8252
|
y: 8
|
|
8253
8253
|
}, j2 = {
|
|
@@ -8450,7 +8450,7 @@ var fo = (e, t) => {
|
|
|
8450
8450
|
ariaLabel: n("editor.overlayMenu.selection")
|
|
8451
8451
|
});
|
|
8452
8452
|
}, i0 = ({ scene: e, pressed: t, groupOptions: n, locale: o, t: a, hasOverlayMenu: i }) => {
|
|
8453
|
-
const l = t === null ? null :
|
|
8453
|
+
const l = t === null ? null : Is(t, e.layers, e.config.parsingLocale);
|
|
8454
8454
|
if (t === null || l === null) return null;
|
|
8455
8455
|
const { layer: s, observation: c } = l, { observationIndex: d, selectedFor: u } = t, { parsingLocale: h } = e.config, p = Wd({
|
|
8456
8456
|
layer: s,
|
|
@@ -8581,7 +8581,7 @@ var fo = (e, t) => {
|
|
|
8581
8581
|
c === null || d === null || a(d.offsetWidth > c.clientWidth);
|
|
8582
8582
|
}, []);
|
|
8583
8583
|
Me(i, [i, e.whole]);
|
|
8584
|
-
const { setElement: l } =
|
|
8584
|
+
const { setElement: l } = ks({ onResize: i }), s = te((c) => {
|
|
8585
8585
|
t.current = c, l(c);
|
|
8586
8586
|
}, [l]);
|
|
8587
8587
|
return /* @__PURE__ */ v(V, { children: [/* @__PURE__ */ r(J.Title, {
|
|
@@ -9788,7 +9788,7 @@ var xv = "ydgo3h1", wv = "ydgo3h2", kv = "ydgo3h3", Tv = ({ clientPoint: e, pane
|
|
|
9788
9788
|
...e
|
|
9789
9789
|
});
|
|
9790
9790
|
}, Nv = ({ annotationId: e, ...t }) => {
|
|
9791
|
-
const n =
|
|
9791
|
+
const n = Ls(), o = M(() => n.find((a) => a.id === e), [n, e]);
|
|
9792
9792
|
return o === void 0 ? null : /* @__PURE__ */ r(Dv, {
|
|
9793
9793
|
committedArrow: o.committedArrow,
|
|
9794
9794
|
color: o.color,
|
|
@@ -9930,7 +9930,7 @@ var Bv = {
|
|
|
9930
9930
|
hovered: "_1ee8fau5 _1ee8fau4",
|
|
9931
9931
|
selected: "_1ee8fau6 _1ee8fau4"
|
|
9932
9932
|
}, Gv = ({ panelRect: e }) => {
|
|
9933
|
-
const t = ze(e), n = ia(), o = K(), a = lt(), i = Q((f) => q(f, "move-drag")), l = Q((f) => q(f, "shape-resize-drag")), s = Q((f) => q(f, "arrow-endpoint-drag")), c = Q((f) => q(f, "text-resize-drag")), d = Q(
|
|
9933
|
+
const t = ze(e), n = ia(), o = K(), a = lt(), i = Q((f) => q(f, "move-drag")), l = Q((f) => q(f, "shape-resize-drag")), s = Q((f) => q(f, "arrow-endpoint-drag")), c = Q((f) => q(f, "text-resize-drag")), d = Q(Ms), u = M(() => ({
|
|
9934
9934
|
panel: {
|
|
9935
9935
|
width: e.width,
|
|
9936
9936
|
height: e.height
|
|
@@ -9949,7 +9949,7 @@ var Bv = {
|
|
|
9949
9949
|
}
|
|
9950
9950
|
if (s?.annotationId === f.id) {
|
|
9951
9951
|
const b = t.arrows.find((C) => C.id === f.id);
|
|
9952
|
-
return b === void 0 ? f.geometry :
|
|
9952
|
+
return b === void 0 ? f.geometry : gc(yr(b, s), u.panel) ?? f.geometry;
|
|
9953
9953
|
}
|
|
9954
9954
|
return c?.annotationId === f.id ? Dl(t, f.id, c, u) ?? f.geometry : f.geometry;
|
|
9955
9955
|
}, m = (f) => {
|
|
@@ -9973,7 +9973,7 @@ var Bv = {
|
|
|
9973
9973
|
})] });
|
|
9974
9974
|
}, Eo = (e, t, n) => {
|
|
9975
9975
|
if (t === null) return null;
|
|
9976
|
-
const o =
|
|
9976
|
+
const o = Fs(e, t, n);
|
|
9977
9977
|
return o === null ? null : {
|
|
9978
9978
|
id: t,
|
|
9979
9979
|
geometry: o
|
|
@@ -11255,7 +11255,7 @@ var jf = "_1tyillx2", qf = {
|
|
|
11255
11255
|
});
|
|
11256
11256
|
f.current = O, O.start();
|
|
11257
11257
|
}, x = (T, P) => {
|
|
11258
|
-
const O = l.getState(), { layers: ie, config: F } = s.getState().scene, S = P.kind === "select-observations" && P.observationIndex !== null ?
|
|
11258
|
+
const O = l.getState(), { layers: ie, config: F } = s.getState().scene, S = P.kind === "select-observations" && P.observationIndex !== null ? Ws(P.observationIndex, ie, P.target, F.parsingLocale) : null;
|
|
11259
11259
|
switch (c.getState().setPressedObservation(S), P.kind) {
|
|
11260
11260
|
case "select-annotation":
|
|
11261
11261
|
O.setSelection([P.target]), A(T, P.target);
|
|
@@ -11589,7 +11589,7 @@ var jf = "_1tyillx2", qf = {
|
|
|
11589
11589
|
c
|
|
11590
11590
|
]);
|
|
11591
11591
|
}, P5 = ({ frameElement: e, panelRect: t, formattedAxes: n, animateTransitions: o }) => {
|
|
11592
|
-
const { measureRef: a, screenRect: i } =
|
|
11592
|
+
const { measureRef: a, screenRect: i } = As(), { selectionStore: l } = H(), s = X(), c = Q((h) => h.caret?.annotationId ?? null), d = ge(), u = ne(d);
|
|
11593
11593
|
return B(() => (a(e), () => a(null)), [a, e]), B(() => () => {
|
|
11594
11594
|
const h = s.getState();
|
|
11595
11595
|
h.setCaret(null), h.setPressedObservation(null), l.getState().clearSelection();
|
|
@@ -11703,9 +11703,9 @@ var jf = "_1tyillx2", qf = {
|
|
|
11703
11703
|
...i,
|
|
11704
11704
|
children: /* @__PURE__ */ r(Y1, {
|
|
11705
11705
|
editMenus: o,
|
|
11706
|
-
children: /* @__PURE__ */ r(
|
|
11706
|
+
children: /* @__PURE__ */ r(Vs, { children: /* @__PURE__ */ r(Up, {
|
|
11707
11707
|
value: n,
|
|
11708
|
-
children: /* @__PURE__ */ r(
|
|
11708
|
+
children: /* @__PURE__ */ r($s, {
|
|
11709
11709
|
editors: Bm,
|
|
11710
11710
|
children: /* @__PURE__ */ r(ac, {
|
|
11711
11711
|
slots: l,
|
|
@@ -11740,7 +11740,7 @@ var H5 = () => () => {
|
|
|
11740
11740
|
const t = eu(e?.subscribe ?? H5, () => e?.getScene()?.config.parsingLocale);
|
|
11741
11741
|
return e?.formattingLocale ?? t;
|
|
11742
11742
|
}, V5 = (e) => {
|
|
11743
|
-
const t = ce(
|
|
11743
|
+
const t = ce(xs), n = Qo(G5(rt(e.handle))), o = Zs();
|
|
11744
11744
|
let a = /* @__PURE__ */ r($5, { ...e });
|
|
11745
11745
|
return !o && t && (a = /* @__PURE__ */ r(nc, {
|
|
11746
11746
|
colorScheme: t.colorScheme,
|