@pixerate/editor-react 0.128.0 → 0.130.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.
|
@@ -2805,6 +2805,57 @@ var SelectionOptionsBar = ({
|
|
|
2805
2805
|
] })
|
|
2806
2806
|
] }),
|
|
2807
2807
|
options.tool === "polygon" && /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
|
|
2808
|
+
options.tool === "magnetic" && /* @__PURE__ */ jsxs13("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
|
|
2809
|
+
/* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
|
|
2810
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
|
|
2811
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
2812
|
+
/* @__PURE__ */ jsx15("span", { children: "Width" }),
|
|
2813
|
+
/* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
|
|
2814
|
+
options.magneticWidth ?? 10,
|
|
2815
|
+
" px"
|
|
2816
|
+
] })
|
|
2817
|
+
] }),
|
|
2818
|
+
/* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
|
|
2819
|
+
] }),
|
|
2820
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
|
|
2821
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
2822
|
+
/* @__PURE__ */ jsx15("span", { children: "Contrast" }),
|
|
2823
|
+
/* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
|
|
2824
|
+
options.magneticContrast ?? 10,
|
|
2825
|
+
"%"
|
|
2826
|
+
] })
|
|
2827
|
+
] }),
|
|
2828
|
+
/* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
|
|
2829
|
+
] }),
|
|
2830
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
|
|
2831
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
2832
|
+
/* @__PURE__ */ jsx15("span", { children: "Frequency" }),
|
|
2833
|
+
/* @__PURE__ */ jsx15("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
|
|
2834
|
+
] }),
|
|
2835
|
+
/* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
|
|
2836
|
+
] })
|
|
2837
|
+
] }),
|
|
2838
|
+
options.tool === "quick" && /* @__PURE__ */ jsxs13("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
|
|
2839
|
+
/* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
|
|
2840
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
|
|
2841
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
2842
|
+
/* @__PURE__ */ jsx15("span", { children: "Size" }),
|
|
2843
|
+
/* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
|
|
2844
|
+
options.quickSize ?? 30,
|
|
2845
|
+
" px"
|
|
2846
|
+
] })
|
|
2847
|
+
] }),
|
|
2848
|
+
/* @__PURE__ */ jsx15(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
|
|
2849
|
+
] }),
|
|
2850
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
2851
|
+
/* @__PURE__ */ jsx15(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
|
|
2852
|
+
"Sample all layers"
|
|
2853
|
+
] }),
|
|
2854
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx15(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
|
|
2856
|
+
"Auto-enhance edges"
|
|
2857
|
+
] })
|
|
2858
|
+
] }),
|
|
2808
2859
|
(options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ jsxs13("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
|
|
2809
2860
|
/* @__PURE__ */ jsxs13("p", { className: "text-muted-foreground", children: [
|
|
2810
2861
|
options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
|
|
@@ -4736,6 +4736,57 @@ var SelectionOptionsBar = ({
|
|
|
4736
4736
|
] })
|
|
4737
4737
|
] }),
|
|
4738
4738
|
options.tool === "polygon" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
|
|
4739
|
+
options.tool === "magnetic" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
|
|
4740
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
|
|
4741
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
4742
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
4743
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Width" }),
|
|
4744
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
|
|
4745
|
+
options.magneticWidth ?? 10,
|
|
4746
|
+
" px"
|
|
4747
|
+
] })
|
|
4748
|
+
] }),
|
|
4749
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
|
|
4750
|
+
] }),
|
|
4751
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
4752
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
4753
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Contrast" }),
|
|
4754
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
|
|
4755
|
+
options.magneticContrast ?? 10,
|
|
4756
|
+
"%"
|
|
4757
|
+
] })
|
|
4758
|
+
] }),
|
|
4759
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
|
|
4760
|
+
] }),
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
4762
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
4763
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Frequency" }),
|
|
4764
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
|
|
4765
|
+
] }),
|
|
4766
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
|
|
4767
|
+
] })
|
|
4768
|
+
] }),
|
|
4769
|
+
options.tool === "quick" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
|
|
4770
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
4772
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
4773
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Size" }),
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
|
|
4775
|
+
options.quickSize ?? 30,
|
|
4776
|
+
" px"
|
|
4777
|
+
] })
|
|
4778
|
+
] }),
|
|
4779
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
|
|
4780
|
+
] }),
|
|
4781
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
4782
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
|
|
4783
|
+
"Sample all layers"
|
|
4784
|
+
] }),
|
|
4785
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
4786
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
|
|
4787
|
+
"Auto-enhance edges"
|
|
4788
|
+
] })
|
|
4789
|
+
] }),
|
|
4739
4790
|
(options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
|
|
4740
4791
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-muted-foreground", children: [
|
|
4741
4792
|
options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
|
package/dist/index.cjs
CHANGED
|
@@ -8450,6 +8450,57 @@ var SelectionOptionsBar = ({
|
|
|
8450
8450
|
] })
|
|
8451
8451
|
] }),
|
|
8452
8452
|
options.tool === "polygon" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
|
|
8453
|
+
options.tool === "magnetic" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
|
|
8454
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
|
|
8455
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
8456
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
8457
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Width" }),
|
|
8458
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
|
|
8459
|
+
options.magneticWidth ?? 10,
|
|
8460
|
+
" px"
|
|
8461
|
+
] })
|
|
8462
|
+
] }),
|
|
8463
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
|
|
8464
|
+
] }),
|
|
8465
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
8467
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Contrast" }),
|
|
8468
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
|
|
8469
|
+
options.magneticContrast ?? 10,
|
|
8470
|
+
"%"
|
|
8471
|
+
] })
|
|
8472
|
+
] }),
|
|
8473
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
|
|
8474
|
+
] }),
|
|
8475
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
8476
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
8477
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Frequency" }),
|
|
8478
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
|
|
8479
|
+
] }),
|
|
8480
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
|
|
8481
|
+
] })
|
|
8482
|
+
] }),
|
|
8483
|
+
options.tool === "quick" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
|
|
8484
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
|
|
8485
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
8486
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
|
|
8487
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Size" }),
|
|
8488
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
|
|
8489
|
+
options.quickSize ?? 30,
|
|
8490
|
+
" px"
|
|
8491
|
+
] })
|
|
8492
|
+
] }),
|
|
8493
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
|
|
8494
|
+
] }),
|
|
8495
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
8496
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
|
|
8497
|
+
"Sample all layers"
|
|
8498
|
+
] }),
|
|
8499
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
8500
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
|
|
8501
|
+
"Auto-enhance edges"
|
|
8502
|
+
] })
|
|
8503
|
+
] }),
|
|
8453
8504
|
(options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
|
|
8454
8505
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-muted-foreground", children: [
|
|
8455
8506
|
options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"dependencies": {},
|
|
255
255
|
"peerDependencies": {
|
|
256
256
|
"@dagrejs/dagre": "^1.1.8",
|
|
257
|
-
"@pixerate/editor": ">=0.
|
|
257
|
+
"@pixerate/editor": ">=0.197.0 <1.0.0-0",
|
|
258
258
|
"@tiptap/core": "^2.27.3",
|
|
259
259
|
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
260
260
|
"@tiptap/extension-placeholder": "^2.27.3",
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
"tsup": "^9.0.0",
|
|
306
306
|
"typescript": "^5.7.3",
|
|
307
307
|
"vitest": "^5.0.5",
|
|
308
|
-
"@pixerate/editor": "0.
|
|
308
|
+
"@pixerate/editor": "0.197.0"
|
|
309
309
|
},
|
|
310
310
|
"scripts": {
|
|
311
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|