@pixerate/editor-react 0.113.1 → 0.114.0
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/README.md +3 -0
- package/dist/chart/ChartCanvas.d.cts +6 -2
- package/dist/chart/ChartCanvas.d.ts +6 -2
- package/dist/chart/index.cjs +71 -23
- package/dist/chart/index.js +1 -1
- package/dist/{chunk-CVYTRTFT.js → chunk-2INOKIJN.js} +2 -2
- package/dist/{chunk-3MUK5ASL.js → chunk-N2F53ESC.js} +80 -30
- package/dist/image-editor/index.cjs +1 -1
- package/dist/image-editor/index.js +1 -1
- package/dist/index.cjs +72 -24
- package/dist/index.js +2 -2
- package/package.json +28 -8
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@ React bindings for [`@pixerate/editor`](https://www.npmjs.com/package/@pixerate/
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install @pixerate/editor-react @pixerate/editor react react-dom
|
|
7
|
+
# only if you use the rich-text or prompt editors (the root entry): TipTap, and the rich-text peers
|
|
8
|
+
# listed in the @pixerate/editor README
|
|
9
|
+
npm install @tiptap/react @tiptap/extension-bubble-menu @tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/extension-placeholder
|
|
7
10
|
# only if you use @pixerate/editor-react/canvas:
|
|
8
11
|
npm install @xyflow/react @dagrejs/dagre
|
|
9
12
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ChartController, type ChartMark, type ChartPresence, type ChartScene, type ChartTextMeasure, type ChartTheme } from '@pixerate/editor/chart';
|
|
2
|
+
import { type ChartController, type ChartMark, type ChartPresence, type ChartScene, type ChartTextMeasure, type ChartTheme, type ChartTooltip, type ChartTooltipMode } from '@pixerate/editor/chart';
|
|
3
3
|
export interface ChartCanvasProps {
|
|
4
4
|
controller: ChartController;
|
|
5
5
|
/** Scene width; with `responsive` this is only the fallback before the container is measured (default 640). */
|
|
@@ -22,6 +22,10 @@ export interface ChartCanvasProps {
|
|
|
22
22
|
sceneRef?: {
|
|
23
23
|
current: ChartScene | null;
|
|
24
24
|
};
|
|
25
|
+
/** Show a tooltip on hover: `point` (or `true`) for the bar, point or slice under the pointer, `category` for every series in the category under it (default off). */
|
|
26
|
+
tooltip?: boolean | ChartTooltipMode;
|
|
27
|
+
/** Draws the tooltip's content instead of the category label and one row per series. */
|
|
28
|
+
renderTooltip?: (tooltip: ChartTooltip) => React.ReactNode;
|
|
25
29
|
}
|
|
26
30
|
/** SVG attributes for one mark (colours go in `style` so CSS variables work). */
|
|
27
31
|
export declare function renderChartMark(mark: ChartMark, fontFamily: string, interactive: boolean): React.ReactNode;
|
|
@@ -41,4 +45,4 @@ export declare function ChartSceneSvg({ scene, label, className }: {
|
|
|
41
45
|
* charts, Ctrl / ⌘ to skip snapping, Escape to cancel), and with the chart focused use
|
|
42
46
|
* ← → ↑ ↓, Delete and Escape (see `handleChartKey`).
|
|
43
47
|
*/
|
|
44
|
-
export declare function ChartCanvas({ controller, width, height, responsive, theme, editable, measureText, emptyMessage, className, presence, sceneRef }: ChartCanvasProps): React.JSX.Element;
|
|
48
|
+
export declare function ChartCanvas({ controller, width, height, responsive, theme, editable, measureText, emptyMessage, className, presence, sceneRef, tooltip, renderTooltip }: ChartCanvasProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ChartController, type ChartMark, type ChartPresence, type ChartScene, type ChartTextMeasure, type ChartTheme } from '@pixerate/editor/chart';
|
|
2
|
+
import { type ChartController, type ChartMark, type ChartPresence, type ChartScene, type ChartTextMeasure, type ChartTheme, type ChartTooltip, type ChartTooltipMode } from '@pixerate/editor/chart';
|
|
3
3
|
export interface ChartCanvasProps {
|
|
4
4
|
controller: ChartController;
|
|
5
5
|
/** Scene width; with `responsive` this is only the fallback before the container is measured (default 640). */
|
|
@@ -22,6 +22,10 @@ export interface ChartCanvasProps {
|
|
|
22
22
|
sceneRef?: {
|
|
23
23
|
current: ChartScene | null;
|
|
24
24
|
};
|
|
25
|
+
/** Show a tooltip on hover: `point` (or `true`) for the bar, point or slice under the pointer, `category` for every series in the category under it (default off). */
|
|
26
|
+
tooltip?: boolean | ChartTooltipMode;
|
|
27
|
+
/** Draws the tooltip's content instead of the category label and one row per series. */
|
|
28
|
+
renderTooltip?: (tooltip: ChartTooltip) => React.ReactNode;
|
|
25
29
|
}
|
|
26
30
|
/** SVG attributes for one mark (colours go in `style` so CSS variables work). */
|
|
27
31
|
export declare function renderChartMark(mark: ChartMark, fontFamily: string, interactive: boolean): React.ReactNode;
|
|
@@ -41,4 +45,4 @@ export declare function ChartSceneSvg({ scene, label, className }: {
|
|
|
41
45
|
* charts, Ctrl / ⌘ to skip snapping, Escape to cancel), and with the chart focused use
|
|
42
46
|
* ← → ↑ ↓, Delete and Escape (see `handleChartKey`).
|
|
43
47
|
*/
|
|
44
|
-
export declare function ChartCanvas({ controller, width, height, responsive, theme, editable, measureText, emptyMessage, className, presence, sceneRef }: ChartCanvasProps): React.JSX.Element;
|
|
48
|
+
export declare function ChartCanvas({ controller, width, height, responsive, theme, editable, measureText, emptyMessage, className, presence, sceneRef, tooltip, renderTooltip }: ChartCanvasProps): React.JSX.Element;
|
package/dist/chart/index.cjs
CHANGED
|
@@ -215,16 +215,29 @@ function ChartPresenceLayer({ presence }) {
|
|
|
215
215
|
] })
|
|
216
216
|
] }, a.id)) });
|
|
217
217
|
}
|
|
218
|
+
function ChartTooltipContent({ tooltip }) {
|
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
220
|
+
tooltip.title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-1 font-medium", children: tooltip.title }),
|
|
221
|
+
tooltip.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "h-2 w-2 shrink-0 rounded-full", style: { background: item.color } }),
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "var(--muted-foreground, #64748b)" }, children: item.name }),
|
|
224
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: item.text })
|
|
225
|
+
] }, item.seriesId))
|
|
226
|
+
] });
|
|
227
|
+
}
|
|
218
228
|
function ChartSceneSvg({ scene, label, className }) {
|
|
219
229
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: scene.width, height: scene.height, viewBox: `0 0 ${scene.width} ${scene.height}`, role: "img", "aria-label": label, className: `block max-w-full ${className ?? ""}`, children: scene.marks.map((m) => renderChartMark(m, scene.theme.fontFamily, false)) });
|
|
220
230
|
}
|
|
221
|
-
function ChartCanvas({ controller, width = 640, height = 400, responsive = true, theme, editable = true, measureText, emptyMessage, className, presence, sceneRef }) {
|
|
231
|
+
function ChartCanvas({ controller, width = 640, height = 400, responsive = true, theme, editable = true, measureText, emptyMessage, className, presence, sceneRef, tooltip = false, renderTooltip }) {
|
|
222
232
|
const state = useChartState(controller);
|
|
223
233
|
const wrapper = (0, import_react2.useRef)(null);
|
|
224
234
|
const svg = (0, import_react2.useRef)(null);
|
|
225
235
|
const drag = (0, import_react2.useRef)(null);
|
|
226
236
|
const [measured, setMeasured] = (0, import_react2.useState)(null);
|
|
227
237
|
const [frozen, setFrozen] = (0, import_react2.useState)(null);
|
|
238
|
+
const tooltipMode = tooltip === true ? "point" : tooltip || null;
|
|
239
|
+
const [tip, setTip] = (0, import_react2.useState)(null);
|
|
240
|
+
const [tipAt, setTipAt] = (0, import_react2.useState)({ left: 0, top: 0, flip: false });
|
|
228
241
|
(0, import_react2.useEffect)(() => {
|
|
229
242
|
const el = wrapper.current;
|
|
230
243
|
if (!responsive || !el || typeof ResizeObserver === "undefined") return;
|
|
@@ -265,12 +278,26 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
265
278
|
drag.current = (0, import_chart2.startChartPointDrag)(controller, scene, target, scenePoint(e));
|
|
266
279
|
if (drag.current) {
|
|
267
280
|
const d = drag.current;
|
|
281
|
+
setTip(null);
|
|
268
282
|
setFrozen({ valueDomain: d.valueDomain, valueDomain2: d.valueDomain2 ?? null, xDomain: d.xDomain ?? null, readout: d.target });
|
|
269
283
|
svg.current?.setPointerCapture?.(e.pointerId);
|
|
270
284
|
}
|
|
271
285
|
};
|
|
272
286
|
const onPointerMove = (e) => {
|
|
273
287
|
if (drag.current) drag.current.move(scenePoint(e), { fine: e.altKey, lockAxis: e.shiftKey, noSnap: e.ctrlKey || e.metaKey });
|
|
288
|
+
hover(e);
|
|
289
|
+
};
|
|
290
|
+
const hover = (e) => {
|
|
291
|
+
if (!tooltipMode || drag.current || !wrapper.current) {
|
|
292
|
+
setTip(null);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const next = (0, import_chart2.chartTooltipAt)(state.spec, scene, scenePoint(e), { mode: tooltipMode, measureText });
|
|
296
|
+
setTip((prev) => (0, import_chart2.sameChartTooltip)(prev, next) ? prev : next);
|
|
297
|
+
if (!next) return;
|
|
298
|
+
const box = wrapper.current.getBoundingClientRect();
|
|
299
|
+
const left = e.clientX - box.left;
|
|
300
|
+
setTipAt({ left, top: e.clientY - box.top, flip: left > box.width * 0.6 });
|
|
274
301
|
};
|
|
275
302
|
const endDrag = () => {
|
|
276
303
|
drag.current?.end();
|
|
@@ -288,28 +315,49 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
288
315
|
if (editable && (0, import_chart2.handleChartKey)(controller, scene, e)) e.preventDefault();
|
|
289
316
|
};
|
|
290
317
|
const label = state.spec.title || "Chart";
|
|
291
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: wrapper, className: `relative w-full ${className ?? ""}`, "data-chart-canvas": "", children: [
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
320
|
+
"svg",
|
|
321
|
+
{
|
|
322
|
+
ref: svg,
|
|
323
|
+
width: sceneWidth,
|
|
324
|
+
height,
|
|
325
|
+
viewBox: `0 0 ${scene.width} ${scene.height}`,
|
|
326
|
+
role: "img",
|
|
327
|
+
"aria-label": editable ? `${label}. ${(0, import_chart2.describeChartSelection)(controller, state.selection)}` : label,
|
|
328
|
+
tabIndex: editable ? 0 : void 0,
|
|
329
|
+
className: "block max-w-full touch-none select-none rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
330
|
+
onPointerDown,
|
|
331
|
+
onPointerMove,
|
|
332
|
+
onPointerUp: endDrag,
|
|
333
|
+
onPointerCancel: endDrag,
|
|
334
|
+
onPointerLeave: () => setTip(null),
|
|
335
|
+
onKeyDown,
|
|
336
|
+
children: [
|
|
337
|
+
scene.marks.map((m) => renderChartMark(m, scene.theme.fontFamily, editable)),
|
|
338
|
+
presence && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartPresenceLayer, { presence })
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
),
|
|
342
|
+
tip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
343
|
+
"div",
|
|
344
|
+
{
|
|
345
|
+
role: "tooltip",
|
|
346
|
+
"data-chart-tooltip": "",
|
|
347
|
+
className: "pointer-events-none absolute z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md",
|
|
348
|
+
style: {
|
|
349
|
+
left: tipAt.left,
|
|
350
|
+
top: tipAt.top,
|
|
351
|
+
transform: `translate(${tipAt.flip ? "calc(-100% - 12px)" : "12px"}, calc(-100% - 8px))`,
|
|
352
|
+
background: "var(--popover, #ffffff)",
|
|
353
|
+
color: "var(--popover-foreground, #0f172a)",
|
|
354
|
+
borderColor: "var(--border, #e2e8f0)",
|
|
355
|
+
fontFamily: scene.theme.fontFamily
|
|
356
|
+
},
|
|
357
|
+
children: renderTooltip ? renderTooltip(tip) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartTooltipContent, { tooltip: tip })
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
] });
|
|
313
361
|
}
|
|
314
362
|
|
|
315
363
|
// src/chart/ChartDataGrid.tsx
|
package/dist/chart/index.js
CHANGED
|
@@ -2045,7 +2045,7 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
2045
2045
|
|
|
2046
2046
|
// src/image-editor/ImageProviderEffectsPanel.tsx
|
|
2047
2047
|
import React7, { useEffect as useEffect7, useState as useState8 } from "react";
|
|
2048
|
-
import { findLayer } from "@pixerate/editor/image-editor";
|
|
2048
|
+
import { EFFECT_LAYER_USES, findLayer } from "@pixerate/editor/image-editor";
|
|
2049
2049
|
|
|
2050
2050
|
// src/image-editor/ImageEffectControls.tsx
|
|
2051
2051
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -2100,7 +2100,7 @@ function ImageProviderEffectsPanel({ controller, className = "" }) {
|
|
|
2100
2100
|
] }),
|
|
2101
2101
|
!provider && /* @__PURE__ */ jsx10("p", { className: "text-[11px] text-muted-foreground", children: "No effects provider is registered. Effects in the document are kept." }),
|
|
2102
2102
|
browse === "filter" && layer && /* @__PURE__ */ jsx10(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
|
|
2103
|
-
browse === "layer" && /* @__PURE__ */ jsx10(EffectsBrowser, { provider, uses:
|
|
2103
|
+
browse === "layer" && /* @__PURE__ */ jsx10(EffectsBrowser, { provider, uses: EFFECT_LAYER_USES, title: "Generators and overlays", onPick: (e) => (setBrowse(null), run(() => controller.addEffectLayer(e.id))) }),
|
|
2104
2104
|
generator && layer && /* @__PURE__ */ jsxs10("div", { className: "space-y-1", "data-effect-part": "generator", children: [
|
|
2105
2105
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
|
|
2106
2106
|
/* @__PURE__ */ jsx10("span", { className: "flex-1 font-medium text-foreground", children: generator.name ?? generator.effect }),
|
|
@@ -101,13 +101,15 @@ import {
|
|
|
101
101
|
CSS_VARIABLE_CHART_THEME,
|
|
102
102
|
chartClientToScene,
|
|
103
103
|
chartTextBaseline,
|
|
104
|
+
chartTooltipAt,
|
|
104
105
|
chartTextTransform,
|
|
105
106
|
describeChartSelection,
|
|
106
107
|
handleChartKey,
|
|
107
108
|
layoutChart as layoutChart2,
|
|
109
|
+
sameChartTooltip,
|
|
108
110
|
startChartPointDrag
|
|
109
111
|
} from "@pixerate/editor/chart";
|
|
110
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
112
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
111
113
|
function renderChartMark(mark, fontFamily, interactive) {
|
|
112
114
|
const common = {
|
|
113
115
|
"data-role": mark.role,
|
|
@@ -164,16 +166,29 @@ function ChartPresenceLayer({ presence }) {
|
|
|
164
166
|
] })
|
|
165
167
|
] }, a.id)) });
|
|
166
168
|
}
|
|
169
|
+
function ChartTooltipContent({ tooltip }) {
|
|
170
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
171
|
+
tooltip.title && /* @__PURE__ */ jsx("div", { className: "mb-1 font-medium", children: tooltip.title }),
|
|
172
|
+
tooltip.items.map((item) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
173
|
+
/* @__PURE__ */ jsx("span", { className: "h-2 w-2 shrink-0 rounded-full", style: { background: item.color } }),
|
|
174
|
+
/* @__PURE__ */ jsx("span", { style: { color: "var(--muted-foreground, #64748b)" }, children: item.name }),
|
|
175
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: item.text })
|
|
176
|
+
] }, item.seriesId))
|
|
177
|
+
] });
|
|
178
|
+
}
|
|
167
179
|
function ChartSceneSvg({ scene, label, className }) {
|
|
168
180
|
return /* @__PURE__ */ jsx("svg", { width: scene.width, height: scene.height, viewBox: `0 0 ${scene.width} ${scene.height}`, role: "img", "aria-label": label, className: `block max-w-full ${className ?? ""}`, children: scene.marks.map((m) => renderChartMark(m, scene.theme.fontFamily, false)) });
|
|
169
181
|
}
|
|
170
|
-
function ChartCanvas({ controller, width = 640, height = 400, responsive = true, theme, editable = true, measureText, emptyMessage, className, presence, sceneRef }) {
|
|
182
|
+
function ChartCanvas({ controller, width = 640, height = 400, responsive = true, theme, editable = true, measureText, emptyMessage, className, presence, sceneRef, tooltip = false, renderTooltip }) {
|
|
171
183
|
const state = useChartState(controller);
|
|
172
184
|
const wrapper = useRef2(null);
|
|
173
185
|
const svg = useRef2(null);
|
|
174
186
|
const drag = useRef2(null);
|
|
175
187
|
const [measured, setMeasured] = useState(null);
|
|
176
188
|
const [frozen, setFrozen] = useState(null);
|
|
189
|
+
const tooltipMode = tooltip === true ? "point" : tooltip || null;
|
|
190
|
+
const [tip, setTip] = useState(null);
|
|
191
|
+
const [tipAt, setTipAt] = useState({ left: 0, top: 0, flip: false });
|
|
177
192
|
useEffect2(() => {
|
|
178
193
|
const el = wrapper.current;
|
|
179
194
|
if (!responsive || !el || typeof ResizeObserver === "undefined") return;
|
|
@@ -214,12 +229,26 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
214
229
|
drag.current = startChartPointDrag(controller, scene, target, scenePoint(e));
|
|
215
230
|
if (drag.current) {
|
|
216
231
|
const d = drag.current;
|
|
232
|
+
setTip(null);
|
|
217
233
|
setFrozen({ valueDomain: d.valueDomain, valueDomain2: d.valueDomain2 ?? null, xDomain: d.xDomain ?? null, readout: d.target });
|
|
218
234
|
svg.current?.setPointerCapture?.(e.pointerId);
|
|
219
235
|
}
|
|
220
236
|
};
|
|
221
237
|
const onPointerMove = (e) => {
|
|
222
238
|
if (drag.current) drag.current.move(scenePoint(e), { fine: e.altKey, lockAxis: e.shiftKey, noSnap: e.ctrlKey || e.metaKey });
|
|
239
|
+
hover(e);
|
|
240
|
+
};
|
|
241
|
+
const hover = (e) => {
|
|
242
|
+
if (!tooltipMode || drag.current || !wrapper.current) {
|
|
243
|
+
setTip(null);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const next = chartTooltipAt(state.spec, scene, scenePoint(e), { mode: tooltipMode, measureText });
|
|
247
|
+
setTip((prev) => sameChartTooltip(prev, next) ? prev : next);
|
|
248
|
+
if (!next) return;
|
|
249
|
+
const box = wrapper.current.getBoundingClientRect();
|
|
250
|
+
const left = e.clientX - box.left;
|
|
251
|
+
setTipAt({ left, top: e.clientY - box.top, flip: left > box.width * 0.6 });
|
|
223
252
|
};
|
|
224
253
|
const endDrag = () => {
|
|
225
254
|
drag.current?.end();
|
|
@@ -237,28 +266,49 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
237
266
|
if (editable && handleChartKey(controller, scene, e)) e.preventDefault();
|
|
238
267
|
};
|
|
239
268
|
const label = state.spec.title || "Chart";
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
269
|
+
return /* @__PURE__ */ jsxs("div", { ref: wrapper, className: `relative w-full ${className ?? ""}`, "data-chart-canvas": "", children: [
|
|
270
|
+
/* @__PURE__ */ jsxs(
|
|
271
|
+
"svg",
|
|
272
|
+
{
|
|
273
|
+
ref: svg,
|
|
274
|
+
width: sceneWidth,
|
|
275
|
+
height,
|
|
276
|
+
viewBox: `0 0 ${scene.width} ${scene.height}`,
|
|
277
|
+
role: "img",
|
|
278
|
+
"aria-label": editable ? `${label}. ${describeChartSelection(controller, state.selection)}` : label,
|
|
279
|
+
tabIndex: editable ? 0 : void 0,
|
|
280
|
+
className: "block max-w-full touch-none select-none rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
281
|
+
onPointerDown,
|
|
282
|
+
onPointerMove,
|
|
283
|
+
onPointerUp: endDrag,
|
|
284
|
+
onPointerCancel: endDrag,
|
|
285
|
+
onPointerLeave: () => setTip(null),
|
|
286
|
+
onKeyDown,
|
|
287
|
+
children: [
|
|
288
|
+
scene.marks.map((m) => renderChartMark(m, scene.theme.fontFamily, editable)),
|
|
289
|
+
presence && /* @__PURE__ */ jsx(ChartPresenceLayer, { presence })
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
tip && /* @__PURE__ */ jsx(
|
|
294
|
+
"div",
|
|
295
|
+
{
|
|
296
|
+
role: "tooltip",
|
|
297
|
+
"data-chart-tooltip": "",
|
|
298
|
+
className: "pointer-events-none absolute z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md",
|
|
299
|
+
style: {
|
|
300
|
+
left: tipAt.left,
|
|
301
|
+
top: tipAt.top,
|
|
302
|
+
transform: `translate(${tipAt.flip ? "calc(-100% - 12px)" : "12px"}, calc(-100% - 8px))`,
|
|
303
|
+
background: "var(--popover, #ffffff)",
|
|
304
|
+
color: "var(--popover-foreground, #0f172a)",
|
|
305
|
+
borderColor: "var(--border, #e2e8f0)",
|
|
306
|
+
fontFamily: scene.theme.fontFamily
|
|
307
|
+
},
|
|
308
|
+
children: renderTooltip ? renderTooltip(tip) : /* @__PURE__ */ jsx(ChartTooltipContent, { tooltip: tip })
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] });
|
|
262
312
|
}
|
|
263
313
|
|
|
264
314
|
// src/chart/styles.ts
|
|
@@ -287,7 +337,7 @@ import {
|
|
|
287
337
|
setChartTreeRowName,
|
|
288
338
|
setChartTreeRowValue
|
|
289
339
|
} from "@pixerate/editor/chart";
|
|
290
|
-
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
340
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
291
341
|
function ChartCommitInput({ value, onCommit, onKeyDown, onBlur, ...rest }) {
|
|
292
342
|
const [draft, setDraft] = useState2(value);
|
|
293
343
|
const typing = useRef3(false);
|
|
@@ -443,7 +493,7 @@ function ChartDataGrid({ controller, categoryHeader = "Category", readOnly = fal
|
|
|
443
493
|
className: `${chartInputClass} h-6 min-w-[5rem] border-transparent bg-transparent font-medium ${s.hidden ? "text-muted-foreground line-through" : ""}`
|
|
444
494
|
}
|
|
445
495
|
),
|
|
446
|
-
!readOnly && /* @__PURE__ */ jsxs2(
|
|
496
|
+
!readOnly && /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
447
497
|
/* @__PURE__ */ jsx2(
|
|
448
498
|
"button",
|
|
449
499
|
{
|
|
@@ -553,7 +603,7 @@ import {
|
|
|
553
603
|
listChartMaps,
|
|
554
604
|
suggestChartReferences
|
|
555
605
|
} from "@pixerate/editor/chart";
|
|
556
|
-
import { Fragment as
|
|
606
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
557
607
|
var cap = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
558
608
|
function Field({ label, htmlFor, children }) {
|
|
559
609
|
return /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
|
|
@@ -630,7 +680,7 @@ function AxisSection({ controller, axis, value, idBase, horizontal, numeric = fa
|
|
|
630
680
|
onCommit: (text) => set({ step: text.trim() === "" ? null : Number(text) }).ok
|
|
631
681
|
}
|
|
632
682
|
) }),
|
|
633
|
-
valueAxis && /* @__PURE__ */ jsxs3(
|
|
683
|
+
valueAxis && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
634
684
|
/* @__PURE__ */ jsx3(Field, { label: "Min / max", children: /* @__PURE__ */ jsxs3("div", { className: "flex gap-1", children: [
|
|
635
685
|
bound("min"),
|
|
636
686
|
bound("max")
|
|
@@ -689,7 +739,7 @@ function ErrorBarFields({ controller, series, which, idBase }) {
|
|
|
689
739
|
CHART_ERROR_BAR_TYPES.map((t) => /* @__PURE__ */ jsx3("option", { value: t, children: CHART_ERROR_BAR_LABELS[t] }, t))
|
|
690
740
|
] }) }),
|
|
691
741
|
bars && (bars.type === "fixed" || bars.type === "percent" || bars.type === "stddev") && /* @__PURE__ */ jsx3(Field, { label: bars.type === "percent" ? "Percent" : bars.type === "stddev" ? "Deviations" : "Amount", htmlFor: `${id}-value`, children: /* @__PURE__ */ jsx3(ChartCommitInput, { id: `${id}-value`, value: String(bars.value ?? defaultChartErrorBarValue(bars.type)), inputMode: "decimal", "data-option": `${key}.value`, className: chartInputClass, onCommit: (text) => !!patch({ value: text.trim() === "" ? void 0 : Number(text) })?.ok }) }),
|
|
692
|
-
bars?.type === "custom" && /* @__PURE__ */ jsxs3(
|
|
742
|
+
bars?.type === "custom" && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
693
743
|
/* @__PURE__ */ jsx3(Field, { label: "Plus", htmlFor: `${id}-plus`, children: /* @__PURE__ */ jsx3(ChartCommitInput, { id: `${id}-plus`, value: formatChartAmountList(bars.plus), placeholder: "1, 2, -, 0.5", "data-option": `${key}.plus`, className: chartInputClass, onCommit: (text) => !!patch({ plus: parseChartAmountList(text) })?.ok }) }),
|
|
694
744
|
/* @__PURE__ */ jsx3(Field, { label: "Minus", htmlFor: `${id}-minus`, children: /* @__PURE__ */ jsx3(
|
|
695
745
|
ChartCommitInput,
|
|
@@ -859,7 +909,7 @@ function ChartInspector({ controller, sections, className }) {
|
|
|
859
909
|
] }),
|
|
860
910
|
spec.legend.show && /* @__PURE__ */ jsx3("div", { className: "flex gap-0.5 rounded-md bg-muted p-0.5", children: CHART_LEGEND_POSITIONS.map((p) => /* @__PURE__ */ jsx3("button", { type: "button", "aria-pressed": spec.legend.position === p, "data-option": `legend.${p}`, className: chartSegmentClass(spec.legend.position === p), onClick: () => controller.setLegend({ position: p }), children: cap(p) }, p)) })
|
|
861
911
|
] }),
|
|
862
|
-
show("axes") && hasAxes && /* @__PURE__ */ jsxs3(
|
|
912
|
+
show("axes") && hasAxes && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
863
913
|
family !== "box" && family !== "histogram" && /* @__PURE__ */ jsx3(AxisSection, { controller, axis: "x", value: spec.xAxis, idBase, horizontal: spec.orientation === "horizontal", numeric: family === "xy", scales }),
|
|
864
914
|
/* @__PURE__ */ jsx3(AxisSection, { controller, axis: "y", value: spec.yAxis, idBase, horizontal: spec.orientation === "horizontal", scales }),
|
|
865
915
|
usesSecondary && /* @__PURE__ */ jsx3(AxisSection, { controller, axis: "y2", value: spec.yAxis2, idBase, horizontal: spec.orientation === "horizontal", scales })
|
|
@@ -3794,7 +3794,7 @@ function ImageProviderEffectsPanel({ controller, className = "" }) {
|
|
|
3794
3794
|
] }),
|
|
3795
3795
|
!provider && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No effects provider is registered. Effects in the document are kept." }),
|
|
3796
3796
|
browse === "filter" && layer && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
|
|
3797
|
-
browse === "layer" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EffectsBrowser, { provider, uses:
|
|
3797
|
+
browse === "layer" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EffectsBrowser, { provider, uses: import_image_editor9.EFFECT_LAYER_USES, title: "Generators and overlays", onPick: (e) => (setBrowse(null), run(() => controller.addEffectLayer(e.id))) }),
|
|
3798
3798
|
generator && layer && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1", "data-effect-part": "generator", children: [
|
|
3799
3799
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3800
3800
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex-1 font-medium text-foreground", children: generator.name ?? generator.effect }),
|
package/dist/index.cjs
CHANGED
|
@@ -7504,7 +7504,7 @@ function ImageProviderEffectsPanel({ controller, className = "" }) {
|
|
|
7504
7504
|
] }),
|
|
7505
7505
|
!provider && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No effects provider is registered. Effects in the document are kept." }),
|
|
7506
7506
|
browse === "filter" && layer && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
|
|
7507
|
-
browse === "layer" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EffectsBrowser, { provider, uses:
|
|
7507
|
+
browse === "layer" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EffectsBrowser, { provider, uses: import_image_editor9.EFFECT_LAYER_USES, title: "Generators and overlays", onPick: (e) => (setBrowse(null), run(() => controller.addEffectLayer(e.id))) }),
|
|
7508
7508
|
generator && layer && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", "data-effect-part": "generator", children: [
|
|
7509
7509
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
7510
7510
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "flex-1 font-medium text-foreground", children: generator.name ?? generator.effect }),
|
|
@@ -11250,13 +11250,26 @@ function ChartPresenceLayer({ presence }) {
|
|
|
11250
11250
|
] })
|
|
11251
11251
|
] }, a.id)) });
|
|
11252
11252
|
}
|
|
11253
|
-
function
|
|
11253
|
+
function ChartTooltipContent({ tooltip }) {
|
|
11254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
11255
|
+
tooltip.title && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-1 font-medium", children: tooltip.title }),
|
|
11256
|
+
tooltip.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11257
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "h-2 w-2 shrink-0 rounded-full", style: { background: item.color } }),
|
|
11258
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { style: { color: "var(--muted-foreground, #64748b)" }, children: item.name }),
|
|
11259
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ml-auto pl-3 font-medium tabular-nums", children: item.text })
|
|
11260
|
+
] }, item.seriesId))
|
|
11261
|
+
] });
|
|
11262
|
+
}
|
|
11263
|
+
function ChartCanvas({ controller, width = 640, height = 400, responsive = true, theme, editable = true, measureText, emptyMessage, className, presence, sceneRef, tooltip = false, renderTooltip }) {
|
|
11254
11264
|
const state = useChartState(controller);
|
|
11255
11265
|
const wrapper = (0, import_react84.useRef)(null);
|
|
11256
11266
|
const svg = (0, import_react84.useRef)(null);
|
|
11257
11267
|
const drag = (0, import_react84.useRef)(null);
|
|
11258
11268
|
const [measured, setMeasured] = (0, import_react84.useState)(null);
|
|
11259
11269
|
const [frozen, setFrozen] = (0, import_react84.useState)(null);
|
|
11270
|
+
const tooltipMode = tooltip === true ? "point" : tooltip || null;
|
|
11271
|
+
const [tip, setTip] = (0, import_react84.useState)(null);
|
|
11272
|
+
const [tipAt, setTipAt] = (0, import_react84.useState)({ left: 0, top: 0, flip: false });
|
|
11260
11273
|
(0, import_react84.useEffect)(() => {
|
|
11261
11274
|
const el = wrapper.current;
|
|
11262
11275
|
if (!responsive || !el || typeof ResizeObserver === "undefined") return;
|
|
@@ -11297,12 +11310,26 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
11297
11310
|
drag.current = (0, import_chart2.startChartPointDrag)(controller, scene, target, scenePoint(e));
|
|
11298
11311
|
if (drag.current) {
|
|
11299
11312
|
const d = drag.current;
|
|
11313
|
+
setTip(null);
|
|
11300
11314
|
setFrozen({ valueDomain: d.valueDomain, valueDomain2: d.valueDomain2 ?? null, xDomain: d.xDomain ?? null, readout: d.target });
|
|
11301
11315
|
svg.current?.setPointerCapture?.(e.pointerId);
|
|
11302
11316
|
}
|
|
11303
11317
|
};
|
|
11304
11318
|
const onPointerMove = (e) => {
|
|
11305
11319
|
if (drag.current) drag.current.move(scenePoint(e), { fine: e.altKey, lockAxis: e.shiftKey, noSnap: e.ctrlKey || e.metaKey });
|
|
11320
|
+
hover(e);
|
|
11321
|
+
};
|
|
11322
|
+
const hover = (e) => {
|
|
11323
|
+
if (!tooltipMode || drag.current || !wrapper.current) {
|
|
11324
|
+
setTip(null);
|
|
11325
|
+
return;
|
|
11326
|
+
}
|
|
11327
|
+
const next = (0, import_chart2.chartTooltipAt)(state.spec, scene, scenePoint(e), { mode: tooltipMode, measureText });
|
|
11328
|
+
setTip((prev) => (0, import_chart2.sameChartTooltip)(prev, next) ? prev : next);
|
|
11329
|
+
if (!next) return;
|
|
11330
|
+
const box = wrapper.current.getBoundingClientRect();
|
|
11331
|
+
const left = e.clientX - box.left;
|
|
11332
|
+
setTipAt({ left, top: e.clientY - box.top, flip: left > box.width * 0.6 });
|
|
11306
11333
|
};
|
|
11307
11334
|
const endDrag = () => {
|
|
11308
11335
|
drag.current?.end();
|
|
@@ -11320,28 +11347,49 @@ function ChartCanvas({ controller, width = 640, height = 400, responsive = true,
|
|
|
11320
11347
|
if (editable && (0, import_chart2.handleChartKey)(controller, scene, e)) e.preventDefault();
|
|
11321
11348
|
};
|
|
11322
11349
|
const label = state.spec.title || "Chart";
|
|
11323
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref: wrapper, className: `relative w-full ${className ?? ""}`, "data-chart-canvas": "", children: [
|
|
11351
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
11352
|
+
"svg",
|
|
11353
|
+
{
|
|
11354
|
+
ref: svg,
|
|
11355
|
+
width: sceneWidth,
|
|
11356
|
+
height,
|
|
11357
|
+
viewBox: `0 0 ${scene.width} ${scene.height}`,
|
|
11358
|
+
role: "img",
|
|
11359
|
+
"aria-label": editable ? `${label}. ${(0, import_chart2.describeChartSelection)(controller, state.selection)}` : label,
|
|
11360
|
+
tabIndex: editable ? 0 : void 0,
|
|
11361
|
+
className: "block max-w-full touch-none select-none rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
11362
|
+
onPointerDown,
|
|
11363
|
+
onPointerMove,
|
|
11364
|
+
onPointerUp: endDrag,
|
|
11365
|
+
onPointerCancel: endDrag,
|
|
11366
|
+
onPointerLeave: () => setTip(null),
|
|
11367
|
+
onKeyDown,
|
|
11368
|
+
children: [
|
|
11369
|
+
scene.marks.map((m) => renderChartMark(m, scene.theme.fontFamily, editable)),
|
|
11370
|
+
presence && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ChartPresenceLayer, { presence })
|
|
11371
|
+
]
|
|
11372
|
+
}
|
|
11373
|
+
),
|
|
11374
|
+
tip && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11375
|
+
"div",
|
|
11376
|
+
{
|
|
11377
|
+
role: "tooltip",
|
|
11378
|
+
"data-chart-tooltip": "",
|
|
11379
|
+
className: "pointer-events-none absolute z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md",
|
|
11380
|
+
style: {
|
|
11381
|
+
left: tipAt.left,
|
|
11382
|
+
top: tipAt.top,
|
|
11383
|
+
transform: `translate(${tipAt.flip ? "calc(-100% - 12px)" : "12px"}, calc(-100% - 8px))`,
|
|
11384
|
+
background: "var(--popover, #ffffff)",
|
|
11385
|
+
color: "var(--popover-foreground, #0f172a)",
|
|
11386
|
+
borderColor: "var(--border, #e2e8f0)",
|
|
11387
|
+
fontFamily: scene.theme.fontFamily
|
|
11388
|
+
},
|
|
11389
|
+
children: renderTooltip ? renderTooltip(tip) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ChartTooltipContent, { tooltip: tip })
|
|
11390
|
+
}
|
|
11391
|
+
)
|
|
11392
|
+
] });
|
|
11345
11393
|
}
|
|
11346
11394
|
|
|
11347
11395
|
// src/chart/ChartDataGrid.tsx
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ChartDataGrid,
|
|
7
7
|
ChartInspector,
|
|
8
8
|
chartButtonClass
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N2F53ESC.js";
|
|
10
10
|
import {
|
|
11
11
|
FormulaHints,
|
|
12
12
|
NameManager,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
useImageEditorControls,
|
|
50
50
|
useImageEffectsTools,
|
|
51
51
|
useImageHistogram
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-2INOKIJN.js";
|
|
53
53
|
import "./chunk-AJCWF6SN.js";
|
|
54
54
|
import "./chunk-BWEARAWR.js";
|
|
55
55
|
import "./chunk-5LFQ2UQZ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.114.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -251,17 +251,16 @@
|
|
|
251
251
|
"dist"
|
|
252
252
|
],
|
|
253
253
|
"sideEffects": false,
|
|
254
|
-
"dependencies": {
|
|
255
|
-
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
256
|
-
"@tiptap/extension-placeholder": "^2.27.3",
|
|
257
|
-
"@tiptap/starter-kit": "^2.27.3"
|
|
258
|
-
},
|
|
254
|
+
"dependencies": {},
|
|
259
255
|
"peerDependencies": {
|
|
260
256
|
"@dagrejs/dagre": "^1.1.8",
|
|
261
|
-
"@pixerate/editor": ">=0.
|
|
257
|
+
"@pixerate/editor": ">=0.172.0 <1.0.0-0",
|
|
262
258
|
"@tiptap/core": "^2.27.3",
|
|
259
|
+
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
260
|
+
"@tiptap/extension-placeholder": "^2.27.3",
|
|
263
261
|
"@tiptap/pm": "^2.27.3",
|
|
264
262
|
"@tiptap/react": "^2.27.3",
|
|
263
|
+
"@tiptap/starter-kit": "^2.27.3",
|
|
265
264
|
"@xyflow/react": "^12.0.0",
|
|
266
265
|
"react": ">=18.0.0",
|
|
267
266
|
"react-dom": ">=18.0.0"
|
|
@@ -270,14 +269,35 @@
|
|
|
270
269
|
"@dagrejs/dagre": {
|
|
271
270
|
"optional": true
|
|
272
271
|
},
|
|
272
|
+
"@tiptap/core": {
|
|
273
|
+
"optional": true
|
|
274
|
+
},
|
|
275
|
+
"@tiptap/extension-bubble-menu": {
|
|
276
|
+
"optional": true
|
|
277
|
+
},
|
|
278
|
+
"@tiptap/extension-placeholder": {
|
|
279
|
+
"optional": true
|
|
280
|
+
},
|
|
281
|
+
"@tiptap/pm": {
|
|
282
|
+
"optional": true
|
|
283
|
+
},
|
|
284
|
+
"@tiptap/react": {
|
|
285
|
+
"optional": true
|
|
286
|
+
},
|
|
287
|
+
"@tiptap/starter-kit": {
|
|
288
|
+
"optional": true
|
|
289
|
+
},
|
|
273
290
|
"@xyflow/react": {
|
|
274
291
|
"optional": true
|
|
275
292
|
}
|
|
276
293
|
},
|
|
277
294
|
"devDependencies": {
|
|
278
295
|
"@tiptap/core": "^2.27.3",
|
|
296
|
+
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
297
|
+
"@tiptap/extension-placeholder": "^2.27.3",
|
|
279
298
|
"@tiptap/pm": "^2.27.3",
|
|
280
299
|
"@tiptap/react": "^2.27.3",
|
|
300
|
+
"@tiptap/starter-kit": "^2.27.3",
|
|
281
301
|
"@types/react": "^19.3.0",
|
|
282
302
|
"@types/react-dom": "^19.3.0",
|
|
283
303
|
"react": "^19.3.1",
|
|
@@ -285,7 +305,7 @@
|
|
|
285
305
|
"tsup": "^9.0.0",
|
|
286
306
|
"typescript": "^5.7.3",
|
|
287
307
|
"vitest": "^5.0.5",
|
|
288
|
-
"@pixerate/editor": "0.
|
|
308
|
+
"@pixerate/editor": "0.172.0"
|
|
289
309
|
},
|
|
290
310
|
"scripts": {
|
|
291
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|