@pixerate/editor-react 0.125.0 → 0.127.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,54 @@ 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 === "type" || options.tool === "type-vertical") && /* @__PURE__ */ jsxs13("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
2809
+ /* @__PURE__ */ jsxs13("p", { className: "text-muted-foreground", children: [
2810
+ 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).",
2811
+ " Shift-click adds, Alt-click subtracts."
2812
+ ] }),
2813
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
2814
+ "Text",
2815
+ /* @__PURE__ */ jsx15(
2816
+ "input",
2817
+ {
2818
+ type: "text",
2819
+ "aria-label": "Type mask text",
2820
+ value: options.typeText ?? "Type",
2821
+ onChange: (e) => set({ typeText: e.target.value }),
2822
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
2823
+ }
2824
+ )
2825
+ ] }),
2826
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
2827
+ "Size",
2828
+ /* @__PURE__ */ jsx15(
2829
+ "input",
2830
+ {
2831
+ type: "number",
2832
+ min: 1,
2833
+ step: 1,
2834
+ "aria-label": "Type mask size",
2835
+ value: options.typeSize ?? 72,
2836
+ onChange: (e) => set({ typeSize: Math.max(1, Number(e.target.value) || 1) }),
2837
+ className: numberInput
2838
+ }
2839
+ ),
2840
+ "px"
2841
+ ] }),
2842
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
2843
+ "Font",
2844
+ /* @__PURE__ */ jsx15(
2845
+ "input",
2846
+ {
2847
+ type: "text",
2848
+ "aria-label": "Type mask font",
2849
+ value: options.typeFamily ?? "sans-serif",
2850
+ onChange: (e) => set({ typeFamily: e.target.value }),
2851
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
2852
+ }
2853
+ )
2854
+ ] })
2855
+ ] }),
2808
2856
  options.tool === "range" && /* @__PURE__ */ jsxs13("div", { "data-testid": "color-range-options", className: "flex flex-col gap-2", children: [
2809
2857
  /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Click a colour to select it; Shift-click adds a colour, Alt-click removes one." }),
2810
2858
  /* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
@@ -4736,6 +4736,54 @@ 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 === "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
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-muted-foreground", children: [
4741
+ 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).",
4742
+ " Shift-click adds, Alt-click subtracts."
4743
+ ] }),
4744
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
4745
+ "Text",
4746
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4747
+ "input",
4748
+ {
4749
+ type: "text",
4750
+ "aria-label": "Type mask text",
4751
+ value: options.typeText ?? "Type",
4752
+ onChange: (e) => set({ typeText: e.target.value }),
4753
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
4754
+ }
4755
+ )
4756
+ ] }),
4757
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
4758
+ "Size",
4759
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4760
+ "input",
4761
+ {
4762
+ type: "number",
4763
+ min: 1,
4764
+ step: 1,
4765
+ "aria-label": "Type mask size",
4766
+ value: options.typeSize ?? 72,
4767
+ onChange: (e) => set({ typeSize: Math.max(1, Number(e.target.value) || 1) }),
4768
+ className: numberInput
4769
+ }
4770
+ ),
4771
+ "px"
4772
+ ] }),
4773
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
4774
+ "Font",
4775
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4776
+ "input",
4777
+ {
4778
+ type: "text",
4779
+ "aria-label": "Type mask font",
4780
+ value: options.typeFamily ?? "sans-serif",
4781
+ onChange: (e) => set({ typeFamily: e.target.value }),
4782
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
4783
+ }
4784
+ )
4785
+ ] })
4786
+ ] }),
4739
4787
  options.tool === "range" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "color-range-options", className: "flex flex-col gap-2", children: [
4740
4788
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Click a colour to select it; Shift-click adds a colour, Alt-click removes one." }),
4741
4789
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
@@ -27,7 +27,7 @@ import {
27
27
  useImageEditorControls,
28
28
  useImageEffectsTools,
29
29
  useImageHistogram
30
- } from "../chunk-FS5J4CY3.js";
30
+ } from "../chunk-KNLBDEW6.js";
31
31
  import "../chunk-AJCWF6SN.js";
32
32
  import "../chunk-6BWTJ3EE.js";
33
33
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -8450,6 +8450,54 @@ 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 === "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
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-muted-foreground", children: [
8455
+ 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).",
8456
+ " Shift-click adds, Alt-click subtracts."
8457
+ ] }),
8458
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
8459
+ "Text",
8460
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8461
+ "input",
8462
+ {
8463
+ type: "text",
8464
+ "aria-label": "Type mask text",
8465
+ value: options.typeText ?? "Type",
8466
+ onChange: (e) => set({ typeText: e.target.value }),
8467
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
8468
+ }
8469
+ )
8470
+ ] }),
8471
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
8472
+ "Size",
8473
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8474
+ "input",
8475
+ {
8476
+ type: "number",
8477
+ min: 1,
8478
+ step: 1,
8479
+ "aria-label": "Type mask size",
8480
+ value: options.typeSize ?? 72,
8481
+ onChange: (e) => set({ typeSize: Math.max(1, Number(e.target.value) || 1) }),
8482
+ className: numberInput
8483
+ }
8484
+ ),
8485
+ "px"
8486
+ ] }),
8487
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
8488
+ "Font",
8489
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8490
+ "input",
8491
+ {
8492
+ type: "text",
8493
+ "aria-label": "Type mask font",
8494
+ value: options.typeFamily ?? "sans-serif",
8495
+ onChange: (e) => set({ typeFamily: e.target.value }),
8496
+ className: "min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
8497
+ }
8498
+ )
8499
+ ] })
8500
+ ] }),
8453
8501
  options.tool === "range" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "color-range-options", className: "flex flex-col gap-2", children: [
8454
8502
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Click a colour to select it; Shift-click adds a colour, Alt-click removes one." }),
8455
8503
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ import {
51
51
  useImageEditorControls,
52
52
  useImageEffectsTools,
53
53
  useImageHistogram
54
- } from "./chunk-FS5J4CY3.js";
54
+ } from "./chunk-KNLBDEW6.js";
55
55
  import "./chunk-AJCWF6SN.js";
56
56
  import "./chunk-6BWTJ3EE.js";
57
57
  import "./chunk-5RPB4WGT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.125.0",
3
+ "version": "0.127.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.190.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.192.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.190.0"
308
+ "@pixerate/editor": "0.192.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",