@pixerate/editor-react 0.114.3 → 0.116.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.
Files changed (36) hide show
  1. package/dist/animation-editor/index.cjs +20 -2
  2. package/dist/animation-editor/index.js +2 -2
  3. package/dist/canvas/index.cjs +20 -2
  4. package/dist/canvas/index.js +2 -2
  5. package/dist/{chunk-354TA5QV.js → chunk-5RPB4WGT.js} +20 -2
  6. package/dist/{chunk-TOGMXZM4.js → chunk-6BWTJ3EE.js} +1 -1
  7. package/dist/{chunk-SH63DFOO.js → chunk-ZQ54FEXL.js} +170 -98
  8. package/dist/effects/index.cjs +20 -2
  9. package/dist/effects/index.js +2 -2
  10. package/dist/image-editor/ImageProviderEffectsPanel.d.cts +5 -4
  11. package/dist/image-editor/ImageProviderEffectsPanel.d.ts +5 -4
  12. package/dist/image-editor/LayerEffectsPanel.d.cts +5 -0
  13. package/dist/image-editor/LayerEffectsPanel.d.ts +5 -0
  14. package/dist/image-editor/controls/controls.d.cts +19 -0
  15. package/dist/image-editor/controls/controls.d.ts +19 -0
  16. package/dist/image-editor/controls/parameterControls.d.cts +1 -1
  17. package/dist/image-editor/controls/parameterControls.d.ts +1 -1
  18. package/dist/image-editor/index.cjs +183 -92
  19. package/dist/image-editor/index.d.cts +1 -1
  20. package/dist/image-editor/index.d.ts +1 -1
  21. package/dist/image-editor/index.js +5 -3
  22. package/dist/index.cjs +183 -92
  23. package/dist/index.js +5 -3
  24. package/dist/paint-editor/index.cjs +20 -2
  25. package/dist/paint-editor/index.js +2 -2
  26. package/dist/parameters/controls.d.cts +20 -0
  27. package/dist/parameters/controls.d.ts +20 -0
  28. package/dist/parameters/fields.d.cts +1 -1
  29. package/dist/parameters/fields.d.ts +1 -1
  30. package/dist/parameters/index.cjs +20 -2
  31. package/dist/parameters/index.js +1 -1
  32. package/dist/vector/index.cjs +20 -2
  33. package/dist/vector/index.js +2 -2
  34. package/dist/video-editor/index.cjs +20 -2
  35. package/dist/video-editor/index.js +2 -2
  36. package/package.json +3 -3
@@ -1168,7 +1168,8 @@ function resolveParameterComponents(explicit, context) {
1168
1168
  return {
1169
1169
  input: explicit?.input ?? context?.input,
1170
1170
  slider: explicit?.slider ?? context?.slider,
1171
- select: explicit?.select ?? context?.select
1171
+ select: explicit?.select ?? context?.select,
1172
+ color: explicit?.color ?? context?.color
1172
1173
  };
1173
1174
  }
1174
1175
 
@@ -1402,7 +1403,8 @@ function ParameterSelect(props) {
1402
1403
  }
1403
1404
  );
1404
1405
  }
1405
- function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }) {
1406
+ function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id, components }) {
1407
+ const CustomColor = resolveParameterComponents(components, useParameterComponents()).color;
1406
1408
  const [open, setOpen] = (0, import_react6.useState)(false);
1407
1409
  const containerRef = (0, import_react6.useRef)(null);
1408
1410
  const buttonRef = (0, import_react6.useRef)(null);
@@ -1434,6 +1436,22 @@ function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd,
1434
1436
  window.removeEventListener("keydown", onKeyDown, true);
1435
1437
  };
1436
1438
  }, [open]);
1439
+ if (CustomColor) {
1440
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1441
+ CustomColor,
1442
+ {
1443
+ id,
1444
+ value: shown,
1445
+ alpha,
1446
+ swatches: field.swatches,
1447
+ disabled: off,
1448
+ label: name,
1449
+ onChange,
1450
+ onGestureStart,
1451
+ onGestureEnd
1452
+ }
1453
+ );
1454
+ }
1437
1455
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ref: containerRef, className: "relative space-y-1.5", children: [
1438
1456
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
1439
1457
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -22,7 +22,7 @@ import {
22
22
  parameterSelectStyle,
23
23
  resolveParameterComponents,
24
24
  useParameterComponents
25
- } from "../chunk-354TA5QV.js";
25
+ } from "../chunk-5RPB4WGT.js";
26
26
  import "../chunk-KIRIU53A.js";
27
27
  import "../chunk-3I7FOSLF.js";
28
28
  import {
@@ -4306,7 +4306,8 @@ function resolveParameterComponents(explicit, context) {
4306
4306
  return {
4307
4307
  input: explicit?.input ?? context?.input,
4308
4308
  slider: explicit?.slider ?? context?.slider,
4309
- select: explicit?.select ?? context?.select
4309
+ select: explicit?.select ?? context?.select,
4310
+ color: explicit?.color ?? context?.color
4310
4311
  };
4311
4312
  }
4312
4313
 
@@ -4540,7 +4541,8 @@ function ParameterSelect(props) {
4540
4541
  }
4541
4542
  );
4542
4543
  }
4543
- function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }) {
4544
+ function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id, components }) {
4545
+ const CustomColor = resolveParameterComponents(components, useParameterComponents()).color;
4544
4546
  const [open, setOpen] = (0, import_react22.useState)(false);
4545
4547
  const containerRef = (0, import_react22.useRef)(null);
4546
4548
  const buttonRef = (0, import_react22.useRef)(null);
@@ -4572,6 +4574,22 @@ function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd,
4572
4574
  window.removeEventListener("keydown", onKeyDown, true);
4573
4575
  };
4574
4576
  }, [open]);
4577
+ if (CustomColor) {
4578
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4579
+ CustomColor,
4580
+ {
4581
+ id,
4582
+ value: shown,
4583
+ alpha,
4584
+ swatches: field.swatches,
4585
+ disabled: off,
4586
+ label: name,
4587
+ onChange,
4588
+ onGestureStart,
4589
+ onGestureEnd
4590
+ }
4591
+ );
4592
+ }
4575
4593
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { ref: containerRef, className: "relative space-y-1.5", children: [
4576
4594
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
4577
4595
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -3,8 +3,8 @@ import {
3
3
  EffectsBrowser,
4
4
  useEffectDescription,
5
5
  useEffects
6
- } from "../chunk-TOGMXZM4.js";
7
- import "../chunk-354TA5QV.js";
6
+ } from "../chunk-6BWTJ3EE.js";
7
+ import "../chunk-5RPB4WGT.js";
8
8
  import "../chunk-KIRIU53A.js";
9
9
  import "../chunk-3I7FOSLF.js";
10
10
  import {
@@ -2812,7 +2812,8 @@ function resolveParameterComponents(explicit, context) {
2812
2812
  return {
2813
2813
  input: explicit?.input ?? context?.input,
2814
2814
  slider: explicit?.slider ?? context?.slider,
2815
- select: explicit?.select ?? context?.select
2815
+ select: explicit?.select ?? context?.select,
2816
+ color: explicit?.color ?? context?.color
2816
2817
  };
2817
2818
  }
2818
2819
 
@@ -3046,7 +3047,8 @@ function ParameterSelect(props) {
3046
3047
  }
3047
3048
  );
3048
3049
  }
3049
- function ParameterColor({ field: field2, value, onChange, onGestureStart, onGestureEnd, disabled, id }) {
3050
+ function ParameterColor({ field: field2, value, onChange, onGestureStart, onGestureEnd, disabled, id, components }) {
3051
+ const CustomColor = resolveParameterComponents(components, useParameterComponents()).color;
3050
3052
  const [open, setOpen] = (0, import_react21.useState)(false);
3051
3053
  const containerRef = (0, import_react21.useRef)(null);
3052
3054
  const buttonRef = (0, import_react21.useRef)(null);
@@ -3078,6 +3080,22 @@ function ParameterColor({ field: field2, value, onChange, onGestureStart, onGest
3078
3080
  window.removeEventListener("keydown", onKeyDown, true);
3079
3081
  };
3080
3082
  }, [open]);
3083
+ if (CustomColor) {
3084
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3085
+ CustomColor,
3086
+ {
3087
+ id,
3088
+ value: shown,
3089
+ alpha,
3090
+ swatches: field2.swatches,
3091
+ disabled: off,
3092
+ label: name,
3093
+ onChange,
3094
+ onGestureStart,
3095
+ onGestureEnd
3096
+ }
3097
+ );
3098
+ }
3081
3099
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: containerRef, className: "relative space-y-1.5", children: [
3082
3100
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
3083
3101
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -4,8 +4,8 @@ import {
4
4
  EffectsBrowser,
5
5
  useEffectDescription,
6
6
  useEffects
7
- } from "../chunk-TOGMXZM4.js";
8
- import "../chunk-354TA5QV.js";
7
+ } from "../chunk-6BWTJ3EE.js";
8
+ import "../chunk-5RPB4WGT.js";
9
9
  import "../chunk-KIRIU53A.js";
10
10
  import "../chunk-3I7FOSLF.js";
11
11
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.114.3",
3
+ "version": "0.116.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.175.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.176.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.175.0"
308
+ "@pixerate/editor": "0.176.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",