@pixerate/editor-react 0.133.0 → 0.134.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.
@@ -2755,6 +2755,21 @@ var SelectionOptionsBar = ({
2755
2755
  setSegmenting(false);
2756
2756
  }
2757
2757
  };
2758
+ const [skying, setSkying] = useState11(false);
2759
+ const [skyStatus, setSkyStatus] = useState11(null);
2760
+ const selectSky = async () => {
2761
+ if (skying) return;
2762
+ setSkying(true);
2763
+ setSkyStatus(null);
2764
+ try {
2765
+ const { note } = await controller.selectSky({ mode: options.mode });
2766
+ setSkyStatus(note ?? null);
2767
+ } catch (err) {
2768
+ setSkyStatus(err instanceof Error ? err.message : String(err));
2769
+ } finally {
2770
+ setSkying(false);
2771
+ }
2772
+ };
2758
2773
  const [focusing, setFocusing] = useState11(false);
2759
2774
  const [focusStatus, setFocusStatus] = useState11(null);
2760
2775
  const selectFocusArea = async () => {
@@ -3035,6 +3050,10 @@ var SelectionOptionsBar = ({
3035
3050
  ]
3036
3051
  }
3037
3052
  ),
3053
+ /* @__PURE__ */ jsxs13("div", { "data-testid": "select-sky", className: "flex flex-col gap-1", children: [
3054
+ /* @__PURE__ */ jsx15("button", { type: "button", className: btn(false), disabled: skying, "aria-busy": skying, onClick: () => void selectSky(), children: skying ? "Selecting\u2026" : "Select Sky" }),
3055
+ skyStatus && /* @__PURE__ */ jsx15("p", { role: "status", className: "text-muted-foreground", children: skyStatus })
3056
+ ] }),
3038
3057
  /* @__PURE__ */ jsxs13("details", { "data-testid": "focus-area", className: "flex flex-col gap-2", children: [
3039
3058
  /* @__PURE__ */ jsx15("summary", { className: "cursor-pointer text-foreground", children: "Focus Area" }),
3040
3059
  /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2 pt-2", children: [
@@ -4686,6 +4686,21 @@ var SelectionOptionsBar = ({
4686
4686
  setSegmenting(false);
4687
4687
  }
4688
4688
  };
4689
+ const [skying, setSkying] = (0, import_react25.useState)(false);
4690
+ const [skyStatus, setSkyStatus] = (0, import_react25.useState)(null);
4691
+ const selectSky = async () => {
4692
+ if (skying) return;
4693
+ setSkying(true);
4694
+ setSkyStatus(null);
4695
+ try {
4696
+ const { note } = await controller.selectSky({ mode: options.mode });
4697
+ setSkyStatus(note ?? null);
4698
+ } catch (err) {
4699
+ setSkyStatus(err instanceof Error ? err.message : String(err));
4700
+ } finally {
4701
+ setSkying(false);
4702
+ }
4703
+ };
4689
4704
  const [focusing, setFocusing] = (0, import_react25.useState)(false);
4690
4705
  const [focusStatus, setFocusStatus] = (0, import_react25.useState)(null);
4691
4706
  const selectFocusArea = async () => {
@@ -4966,6 +4981,10 @@ var SelectionOptionsBar = ({
4966
4981
  ]
4967
4982
  }
4968
4983
  ),
4984
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "select-sky", className: "flex flex-col gap-1", children: [
4985
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { type: "button", className: btn(false), disabled: skying, "aria-busy": skying, onClick: () => void selectSky(), children: skying ? "Selecting\u2026" : "Select Sky" }),
4986
+ skyStatus && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { role: "status", className: "text-muted-foreground", children: skyStatus })
4987
+ ] }),
4969
4988
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("details", { "data-testid": "focus-area", className: "flex flex-col gap-2", children: [
4970
4989
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("summary", { className: "cursor-pointer text-foreground", children: "Focus Area" }),
4971
4990
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-2 pt-2", children: [
@@ -27,7 +27,7 @@ import {
27
27
  useImageEditorControls,
28
28
  useImageEffectsTools,
29
29
  useImageHistogram
30
- } from "../chunk-PJKBVUYL.js";
30
+ } from "../chunk-KSNNMR22.js";
31
31
  import "../chunk-AJCWF6SN.js";
32
32
  import "../chunk-6BWTJ3EE.js";
33
33
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -8400,6 +8400,21 @@ var SelectionOptionsBar = ({
8400
8400
  setSegmenting(false);
8401
8401
  }
8402
8402
  };
8403
+ const [skying, setSkying] = (0, import_react61.useState)(false);
8404
+ const [skyStatus, setSkyStatus] = (0, import_react61.useState)(null);
8405
+ const selectSky = async () => {
8406
+ if (skying) return;
8407
+ setSkying(true);
8408
+ setSkyStatus(null);
8409
+ try {
8410
+ const { note } = await controller.selectSky({ mode: options.mode });
8411
+ setSkyStatus(note ?? null);
8412
+ } catch (err) {
8413
+ setSkyStatus(err instanceof Error ? err.message : String(err));
8414
+ } finally {
8415
+ setSkying(false);
8416
+ }
8417
+ };
8403
8418
  const [focusing, setFocusing] = (0, import_react61.useState)(false);
8404
8419
  const [focusStatus, setFocusStatus] = (0, import_react61.useState)(null);
8405
8420
  const selectFocusArea = async () => {
@@ -8680,6 +8695,10 @@ var SelectionOptionsBar = ({
8680
8695
  ]
8681
8696
  }
8682
8697
  ),
8698
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "select-sky", className: "flex flex-col gap-1", children: [
8699
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { type: "button", className: btn(false), disabled: skying, "aria-busy": skying, onClick: () => void selectSky(), children: skying ? "Selecting\u2026" : "Select Sky" }),
8700
+ skyStatus && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { role: "status", className: "text-muted-foreground", children: skyStatus })
8701
+ ] }),
8683
8702
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("details", { "data-testid": "focus-area", className: "flex flex-col gap-2", children: [
8684
8703
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("summary", { className: "cursor-pointer text-foreground", children: "Focus Area" }),
8685
8704
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col gap-2 pt-2", children: [
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ import {
51
51
  useImageEditorControls,
52
52
  useImageEffectsTools,
53
53
  useImageHistogram
54
- } from "./chunk-PJKBVUYL.js";
54
+ } from "./chunk-KSNNMR22.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.133.0",
3
+ "version": "0.134.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.200.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.201.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.200.0"
308
+ "@pixerate/editor": "0.201.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",