microboard-ui-temp 0.10.0 → 0.10.1

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.
@@ -265469,7 +265469,7 @@ class BaseItem extends Mbr {
265469
265469
  if (!this.isHoverHighlighted) {
265470
265470
  return;
265471
265471
  }
265472
- const mbr = this.getMbr();
265472
+ const mbr = this.getWorldMbr();
265473
265473
  mbr.strokeWidth = 2 / context.matrix.scaleX;
265474
265474
  mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
265475
265475
  mbr.render(context);
@@ -288931,8 +288931,9 @@ function getQuickAddButtons(selection, board) {
288931
288931
  let quickAddItems = undefined;
288932
288932
  function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
288933
288933
  const connectorStorage = new SessionStorage;
288934
- const currMbr = selectedItem.getPathMbr();
288934
+ const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
288935
288935
  const selectedItemData = selectedItem.serialize();
288936
+ const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
288936
288937
  const width2 = currMbr.getWidth();
288937
288938
  const height3 = currMbr.getHeight();
288938
288939
  let offsetX = width2;
@@ -288972,8 +288973,8 @@ function getQuickAddButtons(selection, board) {
288972
288973
  const adjustment = baseAdjustments[index2];
288973
288974
  const newItemData = { ...itemData };
288974
288975
  if (newItemData.transformation) {
288975
- newItemData.transformation.translateX = adjustment.translateX + (selectedItemData.transformation?.translateX || 0);
288976
- newItemData.transformation.translateY = adjustment.translateY + (selectedItemData.transformation?.translateY || 0) + height3 / 2 - newHeight / 2;
288976
+ newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
288977
+ newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
288977
288978
  }
288978
288979
  const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
288979
288980
  let step = 1;
@@ -289064,7 +289065,7 @@ function getQuickAddButtons(selection, board) {
289064
289065
  }
289065
289066
  function getQuickButtonsPositions(customMbr) {
289066
289067
  const single = selection.items.getSingle();
289067
- const itemMbr = customMbr ? customMbr : single?.getMbr();
289068
+ const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
289068
289069
  if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
289069
289070
  return;
289070
289071
  }
@@ -296469,9 +296470,9 @@ class BoardSelection {
296469
296470
  }
296470
296471
  const selectedMbr = selected.reduce((acc, item) => {
296471
296472
  if (!acc) {
296472
- return item.getMbr();
296473
+ return item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296473
296474
  }
296474
- return acc.combine(item.getMbr());
296475
+ return acc.combine(item instanceof BaseItem ? item.getWorldMbr() : item.getMbr());
296475
296476
  }, undefined);
296476
296477
  if (selectedMbr) {
296477
296478
  const selectedMap = Object.fromEntries(selected.map((item) => [item.getId(), { item, nested: false }]));
@@ -296503,7 +296504,7 @@ class BoardSelection {
296503
296504
  const childrenIds = val.item.getChildrenIds();
296504
296505
  if (childrenIds) {
296505
296506
  const currGroup = val.item;
296506
- const currMbr = currGroup.getMbr();
296507
+ const currMbr = currGroup.getWorldMbr();
296507
296508
  const children = childrenIds.map((childId) => this.board.items.getById(childId)).filter((item) => !!item);
296508
296509
  const underGroup = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board" || item.parent === currGroup.getId());
296509
296510
  const uniqueItems = new Set;
@@ -296984,7 +296985,7 @@ class BoardSelection {
296984
296985
  };
296985
296986
  }
296986
296987
  renderItemMbr(context, item, customScale) {
296987
- const mbr = item.getMbr();
296988
+ const mbr = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296988
296989
  mbr.strokeWidth = !customScale ? 1 / context.matrix.scaleX : 1 / customScale;
296989
296990
  const selectionColor = item.transformation.isLocked ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
296990
296991
  mbr.borderColor = selectionColor;
@@ -297041,7 +297042,7 @@ class BoardSelection {
297041
297042
  path22.setBackgroundColor("none");
297042
297043
  path22.render(context);
297043
297044
  } else {
297044
- const itemRect = item.getMbr();
297045
+ const itemRect = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
297045
297046
  itemRect.borderColor = CONTEXT_NODE_HIGHLIGHT_COLOR;
297046
297047
  itemRect.strokeWidth = 2;
297047
297048
  itemRect.render(context);
package/dist/example.html CHANGED
@@ -44,7 +44,7 @@
44
44
  document.documentElement.setAttribute("data-theme", t);
45
45
  })();
46
46
  </script>
47
- <link rel="stylesheet" crossorigin href="/chunk-ccbp3q1g.css"><script type="module" crossorigin src="/chunk-kh8veacg.js"></script></head>
47
+ <link rel="stylesheet" crossorigin href="/chunk-ccbp3q1g.css"><script type="module" crossorigin src="/chunk-63m1m4n2.js"></script></head>
48
48
 
49
49
  <body
50
50
  style="
package/dist/index.html CHANGED
@@ -44,7 +44,7 @@
44
44
  document.documentElement.setAttribute("data-theme", t);
45
45
  })();
46
46
  </script>
47
- <link rel="stylesheet" crossorigin href="/chunk-ccbp3q1g.css"><script type="module" crossorigin src="/chunk-kh8veacg.js"></script></head>
47
+ <link rel="stylesheet" crossorigin href="/chunk-ccbp3q1g.css"><script type="module" crossorigin src="/chunk-63m1m4n2.js"></script></head>
48
48
 
49
49
  <body
50
50
  style="
package/dist/index.js CHANGED
@@ -265469,7 +265469,7 @@ class BaseItem extends Mbr {
265469
265469
  if (!this.isHoverHighlighted) {
265470
265470
  return;
265471
265471
  }
265472
- const mbr = this.getMbr();
265472
+ const mbr = this.getWorldMbr();
265473
265473
  mbr.strokeWidth = 2 / context.matrix.scaleX;
265474
265474
  mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
265475
265475
  mbr.render(context);
@@ -288931,8 +288931,9 @@ function getQuickAddButtons(selection, board) {
288931
288931
  let quickAddItems = undefined;
288932
288932
  function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
288933
288933
  const connectorStorage = new SessionStorage;
288934
- const currMbr = selectedItem.getPathMbr();
288934
+ const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
288935
288935
  const selectedItemData = selectedItem.serialize();
288936
+ const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
288936
288937
  const width2 = currMbr.getWidth();
288937
288938
  const height3 = currMbr.getHeight();
288938
288939
  let offsetX = width2;
@@ -288972,8 +288973,8 @@ function getQuickAddButtons(selection, board) {
288972
288973
  const adjustment = baseAdjustments[index2];
288973
288974
  const newItemData = { ...itemData };
288974
288975
  if (newItemData.transformation) {
288975
- newItemData.transformation.translateX = adjustment.translateX + (selectedItemData.transformation?.translateX || 0);
288976
- newItemData.transformation.translateY = adjustment.translateY + (selectedItemData.transformation?.translateY || 0) + height3 / 2 - newHeight / 2;
288976
+ newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
288977
+ newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
288977
288978
  }
288978
288979
  const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
288979
288980
  let step = 1;
@@ -289064,7 +289065,7 @@ function getQuickAddButtons(selection, board) {
289064
289065
  }
289065
289066
  function getQuickButtonsPositions(customMbr) {
289066
289067
  const single = selection.items.getSingle();
289067
- const itemMbr = customMbr ? customMbr : single?.getMbr();
289068
+ const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
289068
289069
  if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
289069
289070
  return;
289070
289071
  }
@@ -296469,9 +296470,9 @@ class BoardSelection {
296469
296470
  }
296470
296471
  const selectedMbr = selected.reduce((acc, item) => {
296471
296472
  if (!acc) {
296472
- return item.getMbr();
296473
+ return item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296473
296474
  }
296474
- return acc.combine(item.getMbr());
296475
+ return acc.combine(item instanceof BaseItem ? item.getWorldMbr() : item.getMbr());
296475
296476
  }, undefined);
296476
296477
  if (selectedMbr) {
296477
296478
  const selectedMap = Object.fromEntries(selected.map((item) => [item.getId(), { item, nested: false }]));
@@ -296503,7 +296504,7 @@ class BoardSelection {
296503
296504
  const childrenIds = val.item.getChildrenIds();
296504
296505
  if (childrenIds) {
296505
296506
  const currGroup = val.item;
296506
- const currMbr = currGroup.getMbr();
296507
+ const currMbr = currGroup.getWorldMbr();
296507
296508
  const children = childrenIds.map((childId) => this.board.items.getById(childId)).filter((item) => !!item);
296508
296509
  const underGroup = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board" || item.parent === currGroup.getId());
296509
296510
  const uniqueItems = new Set;
@@ -296984,7 +296985,7 @@ class BoardSelection {
296984
296985
  };
296985
296986
  }
296986
296987
  renderItemMbr(context, item, customScale) {
296987
- const mbr = item.getMbr();
296988
+ const mbr = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296988
296989
  mbr.strokeWidth = !customScale ? 1 / context.matrix.scaleX : 1 / customScale;
296989
296990
  const selectionColor = item.transformation.isLocked ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
296990
296991
  mbr.borderColor = selectionColor;
@@ -297041,7 +297042,7 @@ class BoardSelection {
297041
297042
  path22.setBackgroundColor("none");
297042
297043
  path22.render(context);
297043
297044
  } else {
297044
- const itemRect = item.getMbr();
297045
+ const itemRect = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
297045
297046
  itemRect.borderColor = CONTEXT_NODE_HIGHLIGHT_COLOR;
297046
297047
  itemRect.strokeWidth = 2;
297047
297048
  itemRect.render(context);
package/dist/spa.js CHANGED
@@ -43029,14 +43029,14 @@ __export(exports_SignatureEnvelope, {
43029
43029
  validate: () => validate7,
43030
43030
  types: () => types9,
43031
43031
  toRpc: () => toRpc5,
43032
- serialize: () => serialize5,
43032
+ serialize: () => serialize3,
43033
43033
  magicBytes: () => magicBytes3,
43034
43034
  getType: () => getType,
43035
43035
  fromRpc: () => fromRpc4,
43036
43036
  from: () => from15,
43037
43037
  extractPublicKey: () => extractPublicKey,
43038
43038
  extractAddress: () => extractAddress,
43039
- deserialize: () => deserialize6,
43039
+ deserialize: () => deserialize5,
43040
43040
  assert: () => assert11,
43041
43041
  VerificationError: () => VerificationError2,
43042
43042
  MissingPropertiesError: () => MissingPropertiesError2,
@@ -43128,7 +43128,7 @@ function extractPublicKey(options) {
43128
43128
  return extractPublicKey({ payload, signature: signature.inner });
43129
43129
  }
43130
43130
  }
43131
- function deserialize6(value) {
43131
+ function deserialize5(value) {
43132
43132
  const serialized = value.endsWith(magicBytes3.slice(2)) ? slice6(value, 0, -size5(magicBytes3)) : value;
43133
43133
  const size8 = size5(serialized);
43134
43134
  if (size8 === 65) {
@@ -43204,7 +43204,7 @@ function deserialize6(value) {
43204
43204
  }
43205
43205
  if (typeId === serializedKeychainType || typeId === serializedKeychainV2Type) {
43206
43206
  const userAddress = slice6(data, 0, 20);
43207
- const inner = deserialize6(slice6(data, 20));
43207
+ const inner = deserialize5(slice6(data, 20));
43208
43208
  return {
43209
43209
  userAddress,
43210
43210
  inner,
@@ -43219,7 +43219,7 @@ function deserialize6(value) {
43219
43219
  }
43220
43220
  function from15(value, options) {
43221
43221
  if (typeof value === "string")
43222
- return deserialize6(value);
43222
+ return deserialize5(value);
43223
43223
  if (typeof value === "object" && value !== null && "r" in value && "s" in value && "yParity" in value)
43224
43224
  return { signature: value, type: "secp256k1" };
43225
43225
  const type = getType(value);
@@ -43333,7 +43333,7 @@ function getType(envelope) {
43333
43333
  envelope
43334
43334
  });
43335
43335
  }
43336
- function serialize5(envelope, options = {}) {
43336
+ function serialize3(envelope, options = {}) {
43337
43337
  const type = getType(envelope);
43338
43338
  if (type === "secp256k1") {
43339
43339
  const secp256k14 = envelope;
@@ -43351,7 +43351,7 @@ function serialize5(envelope, options = {}) {
43351
43351
  if (type === "keychain") {
43352
43352
  const keychain = envelope;
43353
43353
  const keychainTypeId = keychain.version === "v1" ? serializedKeychainType : serializedKeychainV2Type;
43354
- return concat5(keychainTypeId, keychain.userAddress, serialize5(keychain.inner), options.magic ? magicBytes3 : "0x");
43354
+ return concat5(keychainTypeId, keychain.userAddress, serialize3(keychain.inner), options.magic ? magicBytes3 : "0x");
43355
43355
  }
43356
43356
  throw new CoercionError({ envelope });
43357
43357
  }
@@ -43611,7 +43611,7 @@ function fromTuple2(tuple) {
43611
43611
  } : {}
43612
43612
  };
43613
43613
  if (signatureSerialized)
43614
- args.signature = deserialize6(signatureSerialized);
43614
+ args.signature = deserialize5(signatureSerialized);
43615
43615
  return from16(args);
43616
43616
  }
43617
43617
  function toRpc6(authorization) {
@@ -43630,7 +43630,7 @@ function toRpc6(authorization) {
43630
43630
  }
43631
43631
  function toTuple3(authorization) {
43632
43632
  const { address, chainId, expiry, limits } = authorization;
43633
- const signature = authorization.signature ? serialize5(authorization.signature) : undefined;
43633
+ const signature = authorization.signature ? serialize3(authorization.signature) : undefined;
43634
43634
  const type = (() => {
43635
43635
  switch (authorization.type) {
43636
43636
  case "secp256k1":
@@ -43801,7 +43801,7 @@ function fromTuple3(tuple) {
43801
43801
  nonce: nonce === "0x" ? 0n : BigInt(nonce)
43802
43802
  };
43803
43803
  if (signatureSerialized)
43804
- args.signature = deserialize6(signatureSerialized);
43804
+ args.signature = deserialize5(signatureSerialized);
43805
43805
  return from17(args);
43806
43806
  }
43807
43807
  function fromTupleList(tupleList) {
@@ -43824,7 +43824,7 @@ function toRpcList2(authorizationList) {
43824
43824
  }
43825
43825
  function toTuple4(authorization) {
43826
43826
  const { address, chainId, nonce } = authorization;
43827
- const signature = authorization.signature ? serialize5(authorization.signature) : undefined;
43827
+ const signature = authorization.signature ? serialize3(authorization.signature) : undefined;
43828
43828
  return [
43829
43829
  chainId ? fromNumber(chainId) : "0x",
43830
43830
  address,
@@ -44196,13 +44196,13 @@ __export(exports_TxEnvelopeTempo, {
44196
44196
  validate: () => validate8,
44197
44197
  type: () => type,
44198
44198
  serializedType: () => serializedType,
44199
- serialize: () => serialize6,
44199
+ serialize: () => serialize5,
44200
44200
  hash: () => hash5,
44201
44201
  getSignPayload: () => getSignPayload3,
44202
44202
  getFeePayerSignPayload: () => getFeePayerSignPayload,
44203
44203
  from: () => from18,
44204
44204
  feePayerMagic: () => feePayerMagic,
44205
- deserialize: () => deserialize7,
44205
+ deserialize: () => deserialize6,
44206
44206
  assert: () => assert12,
44207
44207
  InvalidValidityWindowError: () => InvalidValidityWindowError,
44208
44208
  CallsEmptyError: () => CallsEmptyError
@@ -44234,7 +44234,7 @@ function assert12(envelope) {
44234
44234
  maxPriorityFeePerGas
44235
44235
  });
44236
44236
  }
44237
- function deserialize7(serialized) {
44237
+ function deserialize6(serialized) {
44238
44238
  const transactionArray = toHex4(slice6(serialized, 1));
44239
44239
  const [chainId, maxPriorityFeePerGas, maxFeePerGas, gas, calls, accessList, nonceKey, nonce, validBefore, validAfter, feeToken, feePayerSignatureOrSender, authorizationList, keyAuthorizationOrSignature, maybeSignature] = transactionArray;
44240
44240
  const keyAuthorization = Array.isArray(keyAuthorizationOrSignature) ? keyAuthorizationOrSignature : undefined;
@@ -44311,7 +44311,7 @@ function deserialize7(serialized) {
44311
44311
  }
44312
44312
  if (keyAuthorization)
44313
44313
  transaction.keyAuthorization = fromTuple2(keyAuthorization);
44314
- const signatureEnvelope = signature ? deserialize6(signature) : undefined;
44314
+ const signatureEnvelope = signature ? deserialize5(signature) : undefined;
44315
44315
  if (signatureEnvelope)
44316
44316
  transaction = {
44317
44317
  ...transaction,
@@ -44331,7 +44331,7 @@ function deserialize7(serialized) {
44331
44331
  }
44332
44332
  function from18(envelope, options = {}) {
44333
44333
  const { feePayerSignature, signature } = options;
44334
- const envelope_ = typeof envelope === "string" ? deserialize7(envelope) : envelope;
44334
+ const envelope_ = typeof envelope === "string" ? deserialize6(envelope) : envelope;
44335
44335
  if (envelope_.from)
44336
44336
  envelope_.from = resolve2(envelope_.from);
44337
44337
  if (envelope_.calls)
@@ -44347,7 +44347,7 @@ function from18(envelope, options = {}) {
44347
44347
  type: "tempo"
44348
44348
  };
44349
44349
  }
44350
- function serialize6(envelope, options = {}) {
44350
+ function serialize5(envelope, options = {}) {
44351
44351
  const { accessList, authorizationList, calls, chainId, feeToken, gas, keyAuthorization, nonce, nonceKey, maxFeePerGas, maxPriorityFeePerGas, validBefore, validAfter } = envelope;
44352
44352
  assert12(envelope);
44353
44353
  const accessTupleList = toTupleList2(accessList);
@@ -44398,7 +44398,7 @@ function serialize6(envelope, options = {}) {
44398
44398
  feePayerSignatureOrSender,
44399
44399
  authorizationTupleList,
44400
44400
  ...keyAuthorization ? [toTuple3(keyAuthorization)] : [],
44401
- ...signature ? [serialize5(from15(signature))] : []
44401
+ ...signature ? [serialize3(from15(signature))] : []
44402
44402
  ];
44403
44403
  return concat5(options.format === "feePayer" ? feePayerMagic : serializedType, fromHex4(serialized));
44404
44404
  }
@@ -44409,7 +44409,7 @@ function getSignPayload3(envelope, options = {}) {
44409
44409
  return sigHash;
44410
44410
  }
44411
44411
  function hash5(envelope, options = {}) {
44412
- const serialized = serialize6({
44412
+ const serialized = serialize5({
44413
44413
  ...envelope,
44414
44414
  ...options.presign ? {
44415
44415
  signature: undefined,
@@ -44420,7 +44420,7 @@ function hash5(envelope, options = {}) {
44420
44420
  }
44421
44421
  function getFeePayerSignPayload(envelope, options) {
44422
44422
  const sender = resolve2(options.sender);
44423
- const serialized = serialize6({ ...envelope, signature: undefined }, {
44423
+ const serialized = serialize5({ ...envelope, signature: undefined }, {
44424
44424
  sender,
44425
44425
  format: "feePayer"
44426
44426
  });
@@ -44500,7 +44500,7 @@ function isTempo(transaction) {
44500
44500
  return false;
44501
44501
  }
44502
44502
  }
44503
- async function serialize7(transaction, signature) {
44503
+ async function serialize6(transaction, signature) {
44504
44504
  if (!isTempo(transaction)) {
44505
44505
  if (signature && "type" in signature && signature.type !== "secp256k1")
44506
44506
  throw new Error("Unsupported signature type. Expected `secp256k1` but got `" + signature.type + "`.");
@@ -44761,7 +44761,7 @@ var init_chainConfig5 = __esm(() => {
44761
44761
  { runAt: ["beforeFillTransaction", "afterFillParameters"] }
44762
44762
  ],
44763
44763
  serializers: {
44764
- transaction: (transaction, signature) => serialize7(transaction, signature)
44764
+ transaction: (transaction, signature) => serialize6(transaction, signature)
44765
44765
  },
44766
44766
  async verifyHash(client, parameters) {
44767
44767
  const { address, hash: hash6, signature } = parameters;
@@ -52146,7 +52146,7 @@ function isValidCode(code3) {
52146
52146
  }
52147
52147
  return false;
52148
52148
  }
52149
- function serialize8(error2, { shouldIncludeStack = false } = {}) {
52149
+ function serialize7(error2, { shouldIncludeStack = false } = {}) {
52150
52150
  const serialized = {};
52151
52151
  if (error2 && typeof error2 === "object" && !Array.isArray(error2) && hasKey(error2, "code") && isValidCode(error2.code)) {
52152
52152
  const _error = error2;
@@ -53372,7 +53372,7 @@ var init_Communicator = __esm(() => {
53372
53372
 
53373
53373
  // node_modules/wagmi/node_modules/@wagmi/connectors/node_modules/@base-org/account/dist/core/error/serialize.js
53374
53374
  function serializeError(error2) {
53375
- const serialized = serialize8(getErrorObject(error2), {
53375
+ const serialized = serialize7(getErrorObject(error2), {
53376
53376
  shouldIncludeStack: true
53377
53377
  });
53378
53378
  const docUrl = new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");
@@ -61104,7 +61104,7 @@ var defaultGetStoreFunc;
61104
61104
  var init_dist = () => {};
61105
61105
 
61106
61106
  // node_modules/wagmi/node_modules/@wagmi/connectors/node_modules/@base-org/account/dist/kms/crypto-key/storage.js
61107
- function createStorage3(scope, name) {
61107
+ function createStorage2(scope, name) {
61108
61108
  const store2 = typeof indexedDB !== "undefined" ? createStore4(scope, name) : undefined;
61109
61109
  return {
61110
61110
  getItem: async (key) => {
@@ -61209,7 +61209,7 @@ var init_crypto_key = __esm(() => {
61209
61209
  init__esm2();
61210
61210
  init__esm();
61211
61211
  init_storage();
61212
- storage = createStorage3(STORAGE_SCOPE, STORAGE_NAME);
61212
+ storage = createStorage2(STORAGE_SCOPE, STORAGE_NAME);
61213
61213
  });
61214
61214
 
61215
61215
  // node_modules/wagmi/node_modules/@wagmi/connectors/node_modules/@base-org/account/dist/sign/base-account/SCWKeyManager.js
@@ -113650,10 +113650,10 @@ var require_createWalletClient = __commonJS((exports2) => {
113650
113650
  // node_modules/viem/_cjs/clients/transports/createTransport.js
113651
113651
  var require_createTransport = __commonJS((exports2) => {
113652
113652
  Object.defineProperty(exports2, "__esModule", { value: true });
113653
- exports2.createTransport = createTransport3;
113653
+ exports2.createTransport = createTransport2;
113654
113654
  var buildRequest_js_1 = require_buildRequest();
113655
113655
  var uid_js_1 = require_uid();
113656
- function createTransport3({ key, methods: methods3, name, request: request2, retryCount = 3, retryDelay = 150, timeout: timeout2, type: type2 }, value2) {
113656
+ function createTransport2({ key, methods: methods3, name, request: request2, retryCount = 3, retryDelay = 150, timeout: timeout2, type: type2 }, value2) {
113657
113657
  const uid4 = (0, uid_js_1.uid)();
113658
113658
  return {
113659
113659
  config: {
@@ -126347,7 +126347,7 @@ var init_unstorage_zVDD2mZo = () => {};
126347
126347
  function defineDriver(factory) {
126348
126348
  return factory;
126349
126349
  }
126350
- function createStorage4(options2 = {}) {
126350
+ function createStorage3(options2 = {}) {
126351
126351
  const context = {
126352
126352
  mounts: { "": options2.driver || memory() },
126353
126353
  mountpoints: [""],
@@ -126730,7 +126730,7 @@ var init_dist4 = __esm(() => {
126730
126730
  // node_modules/@walletconnect/keyvaluestorage/dist/index.es.js
126731
126731
  class _4 {
126732
126732
  constructor() {
126733
- this.indexedDb = createStorage4({ driver: z4({ dbName: D4, storeName: E2 }) });
126733
+ this.indexedDb = createStorage3({ driver: z4({ dbName: D4, storeName: E2 }) });
126734
126734
  }
126735
126735
  async getKeys() {
126736
126736
  return this.indexedDb.getKeys();
@@ -265469,7 +265469,7 @@ class BaseItem extends Mbr {
265469
265469
  if (!this.isHoverHighlighted) {
265470
265470
  return;
265471
265471
  }
265472
- const mbr = this.getMbr();
265472
+ const mbr = this.getWorldMbr();
265473
265473
  mbr.strokeWidth = 2 / context.matrix.scaleX;
265474
265474
  mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
265475
265475
  mbr.render(context);
@@ -288931,8 +288931,9 @@ function getQuickAddButtons(selection, board) {
288931
288931
  let quickAddItems = undefined;
288932
288932
  function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
288933
288933
  const connectorStorage = new SessionStorage;
288934
- const currMbr = selectedItem.getPathMbr();
288934
+ const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
288935
288935
  const selectedItemData = selectedItem.serialize();
288936
+ const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
288936
288937
  const width2 = currMbr.getWidth();
288937
288938
  const height3 = currMbr.getHeight();
288938
288939
  let offsetX = width2;
@@ -288972,8 +288973,8 @@ function getQuickAddButtons(selection, board) {
288972
288973
  const adjustment = baseAdjustments[index2];
288973
288974
  const newItemData = { ...itemData };
288974
288975
  if (newItemData.transformation) {
288975
- newItemData.transformation.translateX = adjustment.translateX + (selectedItemData.transformation?.translateX || 0);
288976
- newItemData.transformation.translateY = adjustment.translateY + (selectedItemData.transformation?.translateY || 0) + height3 / 2 - newHeight / 2;
288976
+ newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
288977
+ newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
288977
288978
  }
288978
288979
  const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
288979
288980
  let step = 1;
@@ -289064,7 +289065,7 @@ function getQuickAddButtons(selection, board) {
289064
289065
  }
289065
289066
  function getQuickButtonsPositions(customMbr) {
289066
289067
  const single = selection.items.getSingle();
289067
- const itemMbr = customMbr ? customMbr : single?.getMbr();
289068
+ const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
289068
289069
  if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
289069
289070
  return;
289070
289071
  }
@@ -296469,9 +296470,9 @@ class BoardSelection {
296469
296470
  }
296470
296471
  const selectedMbr = selected.reduce((acc, item) => {
296471
296472
  if (!acc) {
296472
- return item.getMbr();
296473
+ return item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296473
296474
  }
296474
- return acc.combine(item.getMbr());
296475
+ return acc.combine(item instanceof BaseItem ? item.getWorldMbr() : item.getMbr());
296475
296476
  }, undefined);
296476
296477
  if (selectedMbr) {
296477
296478
  const selectedMap = Object.fromEntries(selected.map((item) => [item.getId(), { item, nested: false }]));
@@ -296503,7 +296504,7 @@ class BoardSelection {
296503
296504
  const childrenIds = val.item.getChildrenIds();
296504
296505
  if (childrenIds) {
296505
296506
  const currGroup = val.item;
296506
- const currMbr = currGroup.getMbr();
296507
+ const currMbr = currGroup.getWorldMbr();
296507
296508
  const children = childrenIds.map((childId) => this.board.items.getById(childId)).filter((item) => !!item);
296508
296509
  const underGroup = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board" || item.parent === currGroup.getId());
296509
296510
  const uniqueItems = new Set;
@@ -296984,7 +296985,7 @@ class BoardSelection {
296984
296985
  };
296985
296986
  }
296986
296987
  renderItemMbr(context, item, customScale) {
296987
- const mbr = item.getMbr();
296988
+ const mbr = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
296988
296989
  mbr.strokeWidth = !customScale ? 1 / context.matrix.scaleX : 1 / customScale;
296989
296990
  const selectionColor = item.transformation.isLocked ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
296990
296991
  mbr.borderColor = selectionColor;
@@ -297041,7 +297042,7 @@ class BoardSelection {
297041
297042
  path22.setBackgroundColor("none");
297042
297043
  path22.render(context);
297043
297044
  } else {
297044
- const itemRect = item.getMbr();
297045
+ const itemRect = item instanceof BaseItem ? item.getWorldMbr() : item.getMbr();
297045
297046
  itemRect.borderColor = CONTEXT_NODE_HIGHLIGHT_COLOR;
297046
297047
  itemRect.strokeWidth = 2;
297047
297048
  itemRect.render(context);
@@ -423234,7 +423235,7 @@ function comment$1(value2, root4, parent3) {
423234
423235
  function declaration(value2, root4, parent3, length22) {
423235
423236
  return node4(value2, root4, parent3, DECLARATION, substr(value2, 0, length22), substr(value2, length22 + 1, -1), length22);
423236
423237
  }
423237
- function serialize9(children, callback) {
423238
+ function serialize8(children, callback) {
423238
423239
  var output2 = "";
423239
423240
  var length22 = sizeof(children);
423240
423241
  for (var i22 = 0;i22 < length22; i22++)
@@ -423252,11 +423253,11 @@ function stringify14(element5, index4, children, callback) {
423252
423253
  case COMMENT2:
423253
423254
  return "";
423254
423255
  case KEYFRAMES:
423255
- return element5.return = element5.value + "{" + serialize9(element5.children, callback) + "}";
423256
+ return element5.return = element5.value + "{" + serialize8(element5.children, callback) + "}";
423256
423257
  case RULESET:
423257
423258
  element5.value = element5.props.join(",");
423258
423259
  }
423259
- return strlen(children = serialize9(element5.children, callback)) ? element5.return = element5.value + "{" + children + "}" : "";
423260
+ return strlen(children = serialize8(element5.children, callback)) ? element5.return = element5.value + "{" + children + "}" : "";
423260
423261
  }
423261
423262
  function middleware(collection) {
423262
423263
  var length22 = sizeof(collection);
@@ -423479,7 +423480,7 @@ var prefixer = function prefixer2(element5, index4, children, callback) {
423479
423480
  element5["return"] = prefix2(element5.value, element5.length);
423480
423481
  break;
423481
423482
  case KEYFRAMES:
423482
- return serialize9([copy7(element5, {
423483
+ return serialize8([copy7(element5, {
423483
423484
  value: replace(element5.value, "@", "@" + WEBKIT)
423484
423485
  })], callback);
423485
423486
  case RULESET:
@@ -423488,11 +423489,11 @@ var prefixer = function prefixer2(element5, index4, children, callback) {
423488
423489
  switch (match(value2, /(::plac\w+|:read-\w+)/)) {
423489
423490
  case ":read-only":
423490
423491
  case ":read-write":
423491
- return serialize9([copy7(element5, {
423492
+ return serialize8([copy7(element5, {
423492
423493
  props: [replace(value2, /:(read-\w+)/, ":" + MOZ + "$1")]
423493
423494
  })], callback);
423494
423495
  case "::placeholder":
423495
- return serialize9([copy7(element5, {
423496
+ return serialize8([copy7(element5, {
423496
423497
  props: [replace(value2, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
423497
423498
  }), copy7(element5, {
423498
423499
  props: [replace(value2, /:(plac\w+)/, ":" + MOZ + "$1")]
@@ -423542,7 +423543,7 @@ var createCache = function createCache2(options2) {
423542
423543
  })];
423543
423544
  var serializer2 = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
423544
423545
  var stylis = function stylis2(styles2) {
423545
- return serialize9(compile(styles2), serializer2);
423546
+ return serialize8(compile(styles2), serializer2);
423546
423547
  };
423547
423548
  _insert = function insert2(selector, serialized, sheet, shouldCache) {
423548
423549
  currentSheet = sheet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -79,7 +79,7 @@
79
79
  "i18next-browser-languagedetector": "^8.2.0",
80
80
  "js-cookie": "^3.0.5",
81
81
  "jwt-decode": "^4.0.0",
82
- "microboard-temp": "0.12.7",
82
+ "microboard-temp": "0.12.9",
83
83
  "nanoid": "^5.1.5",
84
84
  "prop-types": "^15.8.1",
85
85
  "react-hot-toast": "2.4.1",