microboard-ui-temp 0.1.132 → 0.1.134

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/dist/index.js CHANGED
@@ -375393,18 +375393,17 @@ function SetBackgroundImage({ rounded = "none" }) {
375393
375393
  const account = useAccount2();
375394
375394
  const inputRef = import_react294.useRef(null);
375395
375395
  const { t: t10 } = useTranslation();
375396
+ const single = board.selection.items.getSingle();
375397
+ if (!single || !(single instanceof Screen)) {
375398
+ return null;
375399
+ }
375396
375400
  const handleClick = () => {
375397
375401
  const input2 = inputRef.current;
375398
375402
  if (!input2) {
375399
375403
  return;
375400
375404
  }
375401
- board.tools.cancel();
375402
375405
  input2.click();
375403
375406
  };
375404
- const single = board.selection.items.getSingle();
375405
- if (!single || !(single instanceof Screen)) {
375406
- return null;
375407
- }
375408
375407
  const handleChange = async (ev) => {
375409
375408
  const input2 = ev.target;
375410
375409
  const file = input2.files?.[0];
@@ -375419,7 +375418,7 @@ function SetBackgroundImage({ rounded = "none" }) {
375419
375418
  }
375420
375419
  uploadImages([file], board.getBoardId(), account.accessToken).then((url3) => single.setBackgroundUrl(url3[0])).finally(() => input2.value = "");
375421
375420
  };
375422
- return /* @__PURE__ */ import_react294.default.createElement(UiButton, {
375421
+ return /* @__PURE__ */ import_react294.default.createElement(import_react294.default.Fragment, null, /* @__PURE__ */ import_react294.default.createElement(UiButton, {
375423
375422
  className: ContextPanelButton_module_default.contextPanelButton,
375424
375423
  id: "set-background-image",
375425
375424
  tooltip: t10("contextPanel.gameItems.screen.setBackgroundImage"),
@@ -375429,7 +375428,7 @@ function SetBackgroundImage({ rounded = "none" }) {
375429
375428
  rounded
375430
375429
  }, /* @__PURE__ */ import_react294.default.createElement(Icon, {
375431
375430
  iconName: "Image"
375432
- }), /* @__PURE__ */ import_react294.default.createElement("input", {
375431
+ })), /* @__PURE__ */ import_react294.default.createElement("input", {
375433
375432
  multiple: false,
375434
375433
  onChange: handleChange,
375435
375434
  ref: inputRef,
package/dist/spa.js CHANGED
@@ -375393,18 +375393,17 @@ function SetBackgroundImage({ rounded = "none" }) {
375393
375393
  const account = useAccount2();
375394
375394
  const inputRef = import_react294.useRef(null);
375395
375395
  const { t: t10 } = useTranslation();
375396
+ const single = board.selection.items.getSingle();
375397
+ if (!single || !(single instanceof Screen)) {
375398
+ return null;
375399
+ }
375396
375400
  const handleClick = () => {
375397
375401
  const input2 = inputRef.current;
375398
375402
  if (!input2) {
375399
375403
  return;
375400
375404
  }
375401
- board.tools.cancel();
375402
375405
  input2.click();
375403
375406
  };
375404
- const single = board.selection.items.getSingle();
375405
- if (!single || !(single instanceof Screen)) {
375406
- return null;
375407
- }
375408
375407
  const handleChange = async (ev) => {
375409
375408
  const input2 = ev.target;
375410
375409
  const file = input2.files?.[0];
@@ -375419,7 +375418,7 @@ function SetBackgroundImage({ rounded = "none" }) {
375419
375418
  }
375420
375419
  uploadImages([file], board.getBoardId(), account.accessToken).then((url3) => single.setBackgroundUrl(url3[0])).finally(() => input2.value = "");
375421
375420
  };
375422
- return /* @__PURE__ */ import_react294.default.createElement(UiButton, {
375421
+ return /* @__PURE__ */ import_react294.default.createElement(import_react294.default.Fragment, null, /* @__PURE__ */ import_react294.default.createElement(UiButton, {
375423
375422
  className: ContextPanelButton_module_default.contextPanelButton,
375424
375423
  id: "set-background-image",
375425
375424
  tooltip: t10("contextPanel.gameItems.screen.setBackgroundImage"),
@@ -375429,7 +375428,7 @@ function SetBackgroundImage({ rounded = "none" }) {
375429
375428
  rounded
375430
375429
  }, /* @__PURE__ */ import_react294.default.createElement(Icon, {
375431
375430
  iconName: "Image"
375432
- }), /* @__PURE__ */ import_react294.default.createElement("input", {
375431
+ })), /* @__PURE__ */ import_react294.default.createElement("input", {
375433
375432
  multiple: false,
375434
375433
  onChange: handleChange,
375435
375434
  ref: inputRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.132",
3
+ "version": "0.1.134",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",