microboard-temp 0.5.13 → 0.5.15

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 (209) hide show
  1. package/dist/cjs/browser.js +5 -32
  2. package/dist/cjs/index.js +5 -32
  3. package/dist/cjs/node.js +5 -32
  4. package/dist/esm/browser.js +5 -32
  5. package/dist/esm/index.js +5 -32
  6. package/dist/esm/node.js +5 -32
  7. package/dist/types/Board.d.ts +18 -18
  8. package/dist/types/BoardCommand.d.ts +1 -1
  9. package/dist/types/Camera/Camera.d.ts +4 -4
  10. package/dist/types/Events/Command.d.ts +2 -2
  11. package/dist/types/Events/Events.d.ts +4 -4
  12. package/dist/types/Events/EventsCommand.d.ts +1 -1
  13. package/dist/types/Events/EventsOperations.d.ts +6 -6
  14. package/dist/types/Events/Log/EventsLog.d.ts +1 -1
  15. package/dist/types/Events/Log/deserializeAndApplyToList.d.ts +1 -1
  16. package/dist/types/Events/Log/deserializeIntoList.d.ts +1 -1
  17. package/dist/types/Events/Log/getSnapshotFromList.d.ts +1 -1
  18. package/dist/types/Events/Log/insertEventsFromOtherConnectionsIntoList.d.ts +1 -1
  19. package/dist/types/Events/MessageRouter/boardMessageInterface.d.ts +2 -2
  20. package/dist/types/Events/MessageRouter/createMessageRouter.d.ts +1 -1
  21. package/dist/types/Events/MessageRouter/handleAiChatMassage.d.ts +1 -1
  22. package/dist/types/Events/MessageRouter/handleBoardEventMessage.d.ts +1 -1
  23. package/dist/types/Events/MessageRouter/handleBoardSubscriptionCompletedMsg.d.ts +1 -1
  24. package/dist/types/Events/MessageRouter/handleConfirmation.d.ts +1 -1
  25. package/dist/types/Events/MessageRouter/handleCreateSnapshotRequestMessage.d.ts +1 -1
  26. package/dist/types/Events/MessageRouter/handleModeMessage.d.ts +1 -1
  27. package/dist/types/Events/MessageRouter/handlePresenceEventMessage.d.ts +2 -2
  28. package/dist/types/Events/SyncLog.d.ts +1 -1
  29. package/dist/types/Events/Transform/Transform.d.ts +1 -1
  30. package/dist/types/Events/handleRemoveSnappedObject.d.ts +1 -1
  31. package/dist/types/Items/AINode/AINode.d.ts +16 -16
  32. package/dist/types/Items/AINode/AINodeData.d.ts +6 -6
  33. package/dist/types/Items/Anchor/Anchor.d.ts +1 -1
  34. package/dist/types/Items/Audio/Audio.d.ts +7 -11
  35. package/dist/types/Items/Audio/AudioCommand.d.ts +1 -1
  36. package/dist/types/Items/Audio/AudioHelpers.d.ts +3 -3
  37. package/dist/types/Items/BaseItem/BaseItem.d.ts +11 -11
  38. package/dist/types/Items/Comment/Comment.d.ts +3 -3
  39. package/dist/types/Items/Connector/Connector.d.ts +5 -5
  40. package/dist/types/Items/Connector/Pointers/Pointers.d.ts +2 -2
  41. package/dist/types/Items/Connector/Pointers/index.d.ts +1 -1
  42. package/dist/types/Items/Connector/getLine/findOrthogonalPath.d.ts +1 -1
  43. package/dist/types/Items/Connector/getLine/getOrthogonalLine.d.ts +1 -1
  44. package/dist/types/Items/Connector/getLine/getStraightLine.d.ts +1 -1
  45. package/dist/types/Items/Drawing/Drawing.d.ts +5 -5
  46. package/dist/types/Items/Drawing/DrawingCommand.d.ts +1 -1
  47. package/dist/types/Items/DrawingContext.d.ts +1 -1
  48. package/dist/types/Items/Examples/CardGame/Card/Card.d.ts +7 -7
  49. package/dist/types/Items/Examples/CardGame/Card/CardOperation.d.ts +1 -1
  50. package/dist/types/Items/Examples/CardGame/Deck/Deck.d.ts +6 -6
  51. package/dist/types/Items/Examples/CardGame/Deck/DeckOperation.d.ts +1 -1
  52. package/dist/types/Items/Examples/CardGame/Dice/AddDice.d.ts +2 -2
  53. package/dist/types/Items/Examples/CardGame/Dice/DiceOperation.d.ts +1 -1
  54. package/dist/types/Items/Examples/CardGame/Screen/AddScreen.d.ts +2 -2
  55. package/dist/types/Items/Examples/CardGame/Screen/Screen.d.ts +4 -4
  56. package/dist/types/Items/Examples/CardGame/Screen/ScreenOperation.d.ts +1 -1
  57. package/dist/types/Items/Examples/Counter/AddCounter.d.ts +2 -2
  58. package/dist/types/Items/Examples/Counter/Counter.d.ts +8 -8
  59. package/dist/types/Items/Examples/Counter/CounterOperation.d.ts +1 -1
  60. package/dist/types/Items/Examples/Star/AddStar.d.ts +2 -2
  61. package/dist/types/Items/Examples/Star/Star.d.ts +9 -9
  62. package/dist/types/Items/Examples/Star/StarOperation.d.ts +1 -1
  63. package/dist/types/Items/Frame/Basic/1-1/index.d.ts +1 -1
  64. package/dist/types/Items/Frame/Basic/16-9/index.d.ts +1 -1
  65. package/dist/types/Items/Frame/Basic/3-2/index.d.ts +1 -1
  66. package/dist/types/Items/Frame/Basic/4-3/index.d.ts +1 -1
  67. package/dist/types/Items/Frame/Basic/9-18/index.d.ts +1 -1
  68. package/dist/types/Items/Frame/Basic/A4/index.d.ts +1 -1
  69. package/dist/types/Items/Frame/Basic/Custom/index.d.ts +1 -1
  70. package/dist/types/Items/Frame/Basic/Letter/index.d.ts +1 -1
  71. package/dist/types/Items/Frame/Frame.d.ts +6 -6
  72. package/dist/types/Items/Group/Group.d.ts +5 -5
  73. package/dist/types/Items/Image/Image.d.ts +5 -5
  74. package/dist/types/Items/Image/ImageCommand.d.ts +1 -1
  75. package/dist/types/Items/Image/calculatePosition.d.ts +2 -2
  76. package/dist/types/Items/Item.d.ts +1 -1
  77. package/dist/types/Items/LinkTo/LinkTo.d.ts +23 -0
  78. package/dist/types/Items/Mbr/Mbr.d.ts +2 -2
  79. package/dist/types/Items/Mbr/updateRects.d.ts +3 -3
  80. package/dist/types/Items/Path/Path.d.ts +2 -2
  81. package/dist/types/Items/Path/Paths.d.ts +1 -1
  82. package/dist/types/Items/Placeholder/Placeholder.d.ts +3 -3
  83. package/dist/types/Items/RegisterItem.d.ts +2 -2
  84. package/dist/types/Items/RichText/EditorContainer.d.ts +3 -3
  85. package/dist/types/Items/RichText/RichText.d.ts +7 -7
  86. package/dist/types/Items/RichText/RichTextCommand.d.ts +2 -2
  87. package/dist/types/Items/RichText/RichTextOperations.d.ts +1 -1
  88. package/dist/types/Items/RichText/editorHelpers/common/createParagraphNode.d.ts +2 -2
  89. package/dist/types/Items/RichText/editorHelpers/common/getAllTextNodesInSelection.d.ts +1 -1
  90. package/dist/types/Items/RichText/editorHelpers/common/getSelectedBlockNode.d.ts +1 -1
  91. package/dist/types/Items/RichText/editorHelpers/common/getSelectionMarks.d.ts +1 -1
  92. package/dist/types/Items/RichText/editorHelpers/common/isBlockActive.d.ts +1 -1
  93. package/dist/types/Items/RichText/editorHelpers/lists/getBlockParentList.d.ts +1 -1
  94. package/dist/types/Items/RichText/editorHelpers/lists/getListTypeAtSelectionStart.d.ts +1 -1
  95. package/dist/types/Items/RichText/editorHelpers/lists/toggleListType.d.ts +1 -1
  96. package/dist/types/Items/RichText/editorHelpers/lists/toggleListTypeForSelection.d.ts +1 -1
  97. package/dist/types/Items/RichText/editorHelpers/lists/wrapIntoList.d.ts +1 -1
  98. package/dist/types/Items/RichText/editorHelpers/markdown/markdownProcessor.d.ts +2 -2
  99. package/dist/types/Items/RichText/editorHelpers/selectionOps/insertCopiedNodes.d.ts +1 -1
  100. package/dist/types/Items/RichText/editorHelpers/selectionOps/setSelectionFontStyle.d.ts +1 -1
  101. package/dist/types/Items/RichText/editorHelpers/selectionOps/setSelectionHorisontalAlignment.d.ts +1 -1
  102. package/dist/types/Items/RichText/setNodeStyles.d.ts +2 -2
  103. package/dist/types/Items/Shape/BPMN/BPMN_Annotation/index.d.ts +1 -1
  104. package/dist/types/Items/Shape/BPMN/BPMN_DataObject/index.d.ts +1 -1
  105. package/dist/types/Items/Shape/BPMN/BPMN_DataStore/index.d.ts +1 -1
  106. package/dist/types/Items/Shape/BPMN/BPMN_EndEvent/index.d.ts +1 -1
  107. package/dist/types/Items/Shape/BPMN/BPMN_EventSubprocess/index.d.ts +1 -1
  108. package/dist/types/Items/Shape/BPMN/BPMN_Gateway/index.d.ts +1 -1
  109. package/dist/types/Items/Shape/BPMN/BPMN_GatewayParallel/index.d.ts +1 -1
  110. package/dist/types/Items/Shape/BPMN/BPMN_GatewayXOR/index.d.ts +1 -1
  111. package/dist/types/Items/Shape/BPMN/BPMN_Group/index.d.ts +1 -1
  112. package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEvent/index.d.ts +1 -1
  113. package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEventNoneInterrupting/index.d.ts +1 -1
  114. package/dist/types/Items/Shape/BPMN/BPMN_Participant/index.d.ts +1 -1
  115. package/dist/types/Items/Shape/BPMN/BPMN_StartEvent/index.d.ts +1 -1
  116. package/dist/types/Items/Shape/BPMN/BPMN_StartEventNoneInterrupting/index.d.ts +1 -1
  117. package/dist/types/Items/Shape/BPMN/BPMN_Task/index.d.ts +1 -1
  118. package/dist/types/Items/Shape/BPMN/BPMN_Transaction/index.d.ts +1 -1
  119. package/dist/types/Items/Shape/Basic/ArrowBlockLeft/index.d.ts +1 -1
  120. package/dist/types/Items/Shape/Basic/ArrowBlockRigth/index.d.ts +1 -1
  121. package/dist/types/Items/Shape/Basic/ArrowLeft/index.d.ts +1 -1
  122. package/dist/types/Items/Shape/Basic/ArrowLeftRight/index.d.ts +1 -1
  123. package/dist/types/Items/Shape/Basic/ArrowRight/index.d.ts +1 -1
  124. package/dist/types/Items/Shape/Basic/BracesLeft/index.d.ts +1 -1
  125. package/dist/types/Items/Shape/Basic/BracesRight/index.d.ts +1 -1
  126. package/dist/types/Items/Shape/Basic/Circle/index.d.ts +1 -1
  127. package/dist/types/Items/Shape/Basic/Cloud/index.d.ts +1 -1
  128. package/dist/types/Items/Shape/Basic/Cross/index.d.ts +1 -1
  129. package/dist/types/Items/Shape/Basic/Cylinder/index.d.ts +1 -1
  130. package/dist/types/Items/Shape/Basic/Hexagon/index.d.ts +1 -1
  131. package/dist/types/Items/Shape/Basic/Octagon/index.d.ts +1 -1
  132. package/dist/types/Items/Shape/Basic/Parallelogram/index.d.ts +1 -1
  133. package/dist/types/Items/Shape/Basic/Pentagon/index.d.ts +1 -1
  134. package/dist/types/Items/Shape/Basic/PredefinedProcess/index.d.ts +1 -1
  135. package/dist/types/Items/Shape/Basic/Rectangle/index.d.ts +1 -1
  136. package/dist/types/Items/Shape/Basic/ReversedParallelogram/index.d.ts +1 -1
  137. package/dist/types/Items/Shape/Basic/ReversedTriangle/index.d.ts +1 -1
  138. package/dist/types/Items/Shape/Basic/Rhombus/index.d.ts +1 -1
  139. package/dist/types/Items/Shape/Basic/RoundedRectangle/index.d.ts +1 -1
  140. package/dist/types/Items/Shape/Basic/SpeachBubble/index.d.ts +1 -1
  141. package/dist/types/Items/Shape/Basic/Star/index.d.ts +1 -1
  142. package/dist/types/Items/Shape/Basic/Trapezoid/index.d.ts +1 -1
  143. package/dist/types/Items/Shape/Basic/Triangle/index.d.ts +1 -1
  144. package/dist/types/Items/Shape/Shape.d.ts +6 -6
  145. package/dist/types/Items/Sticker/Sticker.d.ts +4 -4
  146. package/dist/types/Items/Sticker/StickerOperation.d.ts +1 -1
  147. package/dist/types/Items/Transformation/Transformation.d.ts +1 -1
  148. package/dist/types/Items/Video/Video.d.ts +11 -11
  149. package/dist/types/Items/Video/VideoCommand.d.ts +1 -1
  150. package/dist/types/Items/Video/VideoHelpers.d.ts +1 -1
  151. package/dist/types/Keyboard/checkHotkeys.d.ts +1 -1
  152. package/dist/types/Keyboard/logHotkey.d.ts +1 -1
  153. package/dist/types/Keyboard/types.d.ts +1 -1
  154. package/dist/types/Pointer/Pointer.d.ts +2 -2
  155. package/dist/types/Presence/Presence.d.ts +5 -5
  156. package/dist/types/Selection/ConnectorTransformer/ConnectorTransformer.d.ts +5 -5
  157. package/dist/types/Selection/QuickAddButtons/QuickAddButtons.d.ts +4 -4
  158. package/dist/types/Selection/QuickAddButtons/quickAddHelpers.d.ts +5 -5
  159. package/dist/types/Selection/Selection.d.ts +14 -14
  160. package/dist/types/Selection/SelectionItems.d.ts +1 -1
  161. package/dist/types/Selection/SelectionTransformer.d.ts +4 -4
  162. package/dist/types/Selection/Transformer/TextTransformer/getTextResizeType.d.ts +1 -1
  163. package/dist/types/Selection/Transformer/Transformer.d.ts +8 -8
  164. package/dist/types/Selection/Transformer/TransformerHelpers/getFollowingComments.d.ts +3 -3
  165. package/dist/types/Selection/Transformer/TransformerHelpers/getOppositePoint.d.ts +1 -1
  166. package/dist/types/Selection/Transformer/TransformerHelpers/getResizeMatrix.d.ts +1 -1
  167. package/dist/types/Selection/Transformer/TransformerHelpers/getResizeType.d.ts +1 -1
  168. package/dist/types/Selection/Transformer/TransformerHelpers/getResizedMbr.d.ts +1 -1
  169. package/dist/types/Selection/Transformer/TransformerHelpers/handleMultipleItemsResize.d.ts +5 -5
  170. package/dist/types/Selection/Transformer/TransformerHelpers/switchResizeType.d.ts +1 -1
  171. package/dist/types/Selection/Transformer/TransformerHelpers/transformAINode.d.ts +6 -6
  172. package/dist/types/Selection/Transformer/TransformerHelpers/transformItems.d.ts +9 -9
  173. package/dist/types/Selection/Transformer/TransformerHelpers/transformRichText.d.ts +8 -8
  174. package/dist/types/Selection/Transformer/TransformerHelpers/transformShape.d.ts +9 -9
  175. package/dist/types/Selection/Transformer/TransformerHelpers/updateFrameChildren.d.ts +3 -3
  176. package/dist/types/SessionStorage.d.ts +8 -8
  177. package/dist/types/Settings.d.ts +2 -2
  178. package/dist/types/SpatialIndex/LayeredIndex/index.d.ts +2 -2
  179. package/dist/types/SpatialIndex/RTreeIndex/index.d.ts +2 -2
  180. package/dist/types/SpatialIndex/SpacialIndex.d.ts +7 -7
  181. package/dist/types/Tools/AddComment/AddComment.d.ts +2 -2
  182. package/dist/types/Tools/AddConnector/AddConnector.d.ts +9 -9
  183. package/dist/types/Tools/AddDrawing/AddDrawing.d.ts +6 -6
  184. package/dist/types/Tools/AddDrawing/AddHighlighter.d.ts +2 -2
  185. package/dist/types/Tools/AddFrame/AddFrame.d.ts +6 -6
  186. package/dist/types/Tools/AddShape/AddShape.d.ts +6 -6
  187. package/dist/types/Tools/AddSticker/AddSticker.d.ts +5 -5
  188. package/dist/types/Tools/AddText/AddText.d.ts +4 -4
  189. package/dist/types/Tools/BoardTool.d.ts +1 -1
  190. package/dist/types/Tools/BoardToolContext.d.ts +1 -1
  191. package/dist/types/Tools/CustomTool.d.ts +8 -8
  192. package/dist/types/Tools/Eraser/Eraser.d.ts +5 -5
  193. package/dist/types/Tools/ExportSnapshot/ExportSnapshot.d.ts +6 -6
  194. package/dist/types/Tools/ExportSnapshot/exportBoardSnapshot.d.ts +2 -2
  195. package/dist/types/Tools/ExportSnapshot/getDecorationResizeType.d.ts +2 -2
  196. package/dist/types/Tools/Navigate/Navigate.d.ts +2 -2
  197. package/dist/types/Tools/NestingHighlighter/NestingHighlighter.d.ts +3 -3
  198. package/dist/types/Tools/RelativeAlignment/RelativeAlignment.d.ts +7 -7
  199. package/dist/types/Tools/Select/Select.d.ts +6 -6
  200. package/dist/types/Tools/Tool.d.ts +1 -1
  201. package/dist/types/Tools/ToolContext.d.ts +1 -1
  202. package/dist/types/Tools/Tools.d.ts +5 -5
  203. package/dist/types/Validators/Validators.d.ts +1 -1
  204. package/dist/types/api/initBrowserSettings.d.ts +1 -1
  205. package/dist/types/api/initNodeSettings.d.ts +1 -1
  206. package/dist/types/index.d.ts +1 -1
  207. package/dist/types/itemFactories.d.ts +2 -2
  208. package/dist/types/parserHTML.d.ts +1 -1
  209. package/package.json +2 -1
@@ -41467,16 +41467,14 @@ class AudioItem extends BaseItem {
41467
41467
  url = "";
41468
41468
  isPlaying = false;
41469
41469
  currentTime = 0;
41470
- isStorageUrl = true;
41471
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41470
+ constructor(board, url, events, id = "", extension2) {
41472
41471
  super(board, id);
41473
41472
  this.events = events;
41474
41473
  this.extension = extension2;
41475
41474
  this.linkTo = new LinkTo(this.id, events);
41476
41475
  this.board = board;
41477
- this.isStorageUrl = isStorageUrl;
41478
41476
  if (url) {
41479
- this.applyUrl(url);
41477
+ this.url = url;
41480
41478
  }
41481
41479
  this.transformation = new Transformation(id, events);
41482
41480
  this.linkTo.subject.subscribe(() => {
@@ -41494,9 +41492,6 @@ class AudioItem extends BaseItem {
41494
41492
  getCurrentTime() {
41495
41493
  return this.currentTime;
41496
41494
  }
41497
- getIsStorageUrl() {
41498
- return this.isStorageUrl;
41499
- }
41500
41495
  onTransform = () => {
41501
41496
  this.updateMbr();
41502
41497
  this.subject.publish(this);
@@ -41515,17 +41510,8 @@ class AudioItem extends BaseItem {
41515
41510
  getIsPlaying() {
41516
41511
  return this.isPlaying;
41517
41512
  }
41518
- applyUrl(url) {
41519
- if (this.isStorageUrl) {
41520
- try {
41521
- const newUrl = new URL(url);
41522
- this.url = `${window.location.origin}${newUrl.pathname}`;
41523
- } catch (_) {}
41524
- } else {
41525
- this.url = url;
41526
- }
41527
- }
41528
41513
  setUrl(url) {
41514
+ this.url = url;
41529
41515
  this.emit({
41530
41516
  class: "Audio",
41531
41517
  method: "setUrl",
@@ -41534,9 +41520,6 @@ class AudioItem extends BaseItem {
41534
41520
  });
41535
41521
  }
41536
41522
  getStorageId() {
41537
- if (!this.isStorageUrl) {
41538
- return;
41539
- }
41540
41523
  return this.url.split("/").pop();
41541
41524
  }
41542
41525
  getUrl() {
@@ -41596,9 +41579,6 @@ class AudioItem extends BaseItem {
41596
41579
  if (this.extension) {
41597
41580
  div.setAttribute("extension", this.extension);
41598
41581
  }
41599
- if (this.isStorageUrl) {
41600
- div.setAttribute("is-storage-url", "true");
41601
- }
41602
41582
  div.setAttribute("data-link-to", "");
41603
41583
  return div;
41604
41584
  }
@@ -41607,14 +41587,10 @@ class AudioItem extends BaseItem {
41607
41587
  itemType: "Audio",
41608
41588
  url: this.url,
41609
41589
  transformation: this.transformation.serialize(),
41610
- isStorageUrl: this.isStorageUrl,
41611
41590
  extension: this.extension
41612
41591
  };
41613
41592
  }
41614
41593
  deserialize(data) {
41615
- if (data.isStorageUrl) {
41616
- this.isStorageUrl = data.isStorageUrl;
41617
- }
41618
41594
  if (data.transformation) {
41619
41595
  this.transformation.deserialize(data.transformation);
41620
41596
  }
@@ -41636,7 +41612,7 @@ class AudioItem extends BaseItem {
41636
41612
  break;
41637
41613
  case "Audio":
41638
41614
  if (op.method === "setUrl") {
41639
- this.applyUrl(op.url);
41615
+ this.url = op.url;
41640
41616
  }
41641
41617
  this.subject.publish(this);
41642
41618
  break;
@@ -42109,10 +42085,7 @@ class ImageItem extends BaseItem {
42109
42085
  this.transformation.subject.subscribe(this.onTransform);
42110
42086
  }
42111
42087
  setStorageLink(link2) {
42112
- try {
42113
- const url = new URL(link2);
42114
- this.storageLink = `${window?.location.origin}${url.pathname}`;
42115
- } catch (_) {}
42088
+ this.storageLink = link2;
42116
42089
  }
42117
42090
  getStorageId() {
42118
42091
  return this.storageLink.split("/").pop();
package/dist/cjs/index.js CHANGED
@@ -41467,16 +41467,14 @@ class AudioItem extends BaseItem {
41467
41467
  url = "";
41468
41468
  isPlaying = false;
41469
41469
  currentTime = 0;
41470
- isStorageUrl = true;
41471
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41470
+ constructor(board, url, events, id = "", extension2) {
41472
41471
  super(board, id);
41473
41472
  this.events = events;
41474
41473
  this.extension = extension2;
41475
41474
  this.linkTo = new LinkTo(this.id, events);
41476
41475
  this.board = board;
41477
- this.isStorageUrl = isStorageUrl;
41478
41476
  if (url) {
41479
- this.applyUrl(url);
41477
+ this.url = url;
41480
41478
  }
41481
41479
  this.transformation = new Transformation(id, events);
41482
41480
  this.linkTo.subject.subscribe(() => {
@@ -41494,9 +41492,6 @@ class AudioItem extends BaseItem {
41494
41492
  getCurrentTime() {
41495
41493
  return this.currentTime;
41496
41494
  }
41497
- getIsStorageUrl() {
41498
- return this.isStorageUrl;
41499
- }
41500
41495
  onTransform = () => {
41501
41496
  this.updateMbr();
41502
41497
  this.subject.publish(this);
@@ -41515,17 +41510,8 @@ class AudioItem extends BaseItem {
41515
41510
  getIsPlaying() {
41516
41511
  return this.isPlaying;
41517
41512
  }
41518
- applyUrl(url) {
41519
- if (this.isStorageUrl) {
41520
- try {
41521
- const newUrl = new URL(url);
41522
- this.url = `${window.location.origin}${newUrl.pathname}`;
41523
- } catch (_) {}
41524
- } else {
41525
- this.url = url;
41526
- }
41527
- }
41528
41513
  setUrl(url) {
41514
+ this.url = url;
41529
41515
  this.emit({
41530
41516
  class: "Audio",
41531
41517
  method: "setUrl",
@@ -41534,9 +41520,6 @@ class AudioItem extends BaseItem {
41534
41520
  });
41535
41521
  }
41536
41522
  getStorageId() {
41537
- if (!this.isStorageUrl) {
41538
- return;
41539
- }
41540
41523
  return this.url.split("/").pop();
41541
41524
  }
41542
41525
  getUrl() {
@@ -41596,9 +41579,6 @@ class AudioItem extends BaseItem {
41596
41579
  if (this.extension) {
41597
41580
  div.setAttribute("extension", this.extension);
41598
41581
  }
41599
- if (this.isStorageUrl) {
41600
- div.setAttribute("is-storage-url", "true");
41601
- }
41602
41582
  div.setAttribute("data-link-to", "");
41603
41583
  return div;
41604
41584
  }
@@ -41607,14 +41587,10 @@ class AudioItem extends BaseItem {
41607
41587
  itemType: "Audio",
41608
41588
  url: this.url,
41609
41589
  transformation: this.transformation.serialize(),
41610
- isStorageUrl: this.isStorageUrl,
41611
41590
  extension: this.extension
41612
41591
  };
41613
41592
  }
41614
41593
  deserialize(data) {
41615
- if (data.isStorageUrl) {
41616
- this.isStorageUrl = data.isStorageUrl;
41617
- }
41618
41594
  if (data.transformation) {
41619
41595
  this.transformation.deserialize(data.transformation);
41620
41596
  }
@@ -41636,7 +41612,7 @@ class AudioItem extends BaseItem {
41636
41612
  break;
41637
41613
  case "Audio":
41638
41614
  if (op.method === "setUrl") {
41639
- this.applyUrl(op.url);
41615
+ this.url = op.url;
41640
41616
  }
41641
41617
  this.subject.publish(this);
41642
41618
  break;
@@ -42109,10 +42085,7 @@ class ImageItem extends BaseItem {
42109
42085
  this.transformation.subject.subscribe(this.onTransform);
42110
42086
  }
42111
42087
  setStorageLink(link2) {
42112
- try {
42113
- const url = new URL(link2);
42114
- this.storageLink = `${window?.location.origin}${url.pathname}`;
42115
- } catch (_) {}
42088
+ this.storageLink = link2;
42116
42089
  }
42117
42090
  getStorageId() {
42118
42091
  return this.storageLink.split("/").pop();
package/dist/cjs/node.js CHANGED
@@ -43940,16 +43940,14 @@ class AudioItem extends BaseItem {
43940
43940
  url = "";
43941
43941
  isPlaying = false;
43942
43942
  currentTime = 0;
43943
- isStorageUrl = true;
43944
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
43943
+ constructor(board, url, events, id = "", extension2) {
43945
43944
  super(board, id);
43946
43945
  this.events = events;
43947
43946
  this.extension = extension2;
43948
43947
  this.linkTo = new LinkTo(this.id, events);
43949
43948
  this.board = board;
43950
- this.isStorageUrl = isStorageUrl;
43951
43949
  if (url) {
43952
- this.applyUrl(url);
43950
+ this.url = url;
43953
43951
  }
43954
43952
  this.transformation = new Transformation(id, events);
43955
43953
  this.linkTo.subject.subscribe(() => {
@@ -43967,9 +43965,6 @@ class AudioItem extends BaseItem {
43967
43965
  getCurrentTime() {
43968
43966
  return this.currentTime;
43969
43967
  }
43970
- getIsStorageUrl() {
43971
- return this.isStorageUrl;
43972
- }
43973
43968
  onTransform = () => {
43974
43969
  this.updateMbr();
43975
43970
  this.subject.publish(this);
@@ -43988,17 +43983,8 @@ class AudioItem extends BaseItem {
43988
43983
  getIsPlaying() {
43989
43984
  return this.isPlaying;
43990
43985
  }
43991
- applyUrl(url) {
43992
- if (this.isStorageUrl) {
43993
- try {
43994
- const newUrl = new URL(url);
43995
- this.url = `${window.location.origin}${newUrl.pathname}`;
43996
- } catch (_) {}
43997
- } else {
43998
- this.url = url;
43999
- }
44000
- }
44001
43986
  setUrl(url) {
43987
+ this.url = url;
44002
43988
  this.emit({
44003
43989
  class: "Audio",
44004
43990
  method: "setUrl",
@@ -44007,9 +43993,6 @@ class AudioItem extends BaseItem {
44007
43993
  });
44008
43994
  }
44009
43995
  getStorageId() {
44010
- if (!this.isStorageUrl) {
44011
- return;
44012
- }
44013
43996
  return this.url.split("/").pop();
44014
43997
  }
44015
43998
  getUrl() {
@@ -44069,9 +44052,6 @@ class AudioItem extends BaseItem {
44069
44052
  if (this.extension) {
44070
44053
  div.setAttribute("extension", this.extension);
44071
44054
  }
44072
- if (this.isStorageUrl) {
44073
- div.setAttribute("is-storage-url", "true");
44074
- }
44075
44055
  div.setAttribute("data-link-to", "");
44076
44056
  return div;
44077
44057
  }
@@ -44080,14 +44060,10 @@ class AudioItem extends BaseItem {
44080
44060
  itemType: "Audio",
44081
44061
  url: this.url,
44082
44062
  transformation: this.transformation.serialize(),
44083
- isStorageUrl: this.isStorageUrl,
44084
44063
  extension: this.extension
44085
44064
  };
44086
44065
  }
44087
44066
  deserialize(data) {
44088
- if (data.isStorageUrl) {
44089
- this.isStorageUrl = data.isStorageUrl;
44090
- }
44091
44067
  if (data.transformation) {
44092
44068
  this.transformation.deserialize(data.transformation);
44093
44069
  }
@@ -44109,7 +44085,7 @@ class AudioItem extends BaseItem {
44109
44085
  break;
44110
44086
  case "Audio":
44111
44087
  if (op.method === "setUrl") {
44112
- this.applyUrl(op.url);
44088
+ this.url = op.url;
44113
44089
  }
44114
44090
  this.subject.publish(this);
44115
44091
  break;
@@ -44582,10 +44558,7 @@ class ImageItem extends BaseItem {
44582
44558
  this.transformation.subject.subscribe(this.onTransform);
44583
44559
  }
44584
44560
  setStorageLink(link2) {
44585
- try {
44586
- const url = new URL(link2);
44587
- this.storageLink = `${window?.location.origin}${url.pathname}`;
44588
- } catch (_) {}
44561
+ this.storageLink = link2;
44589
44562
  }
44590
44563
  getStorageId() {
44591
44564
  return this.storageLink.split("/").pop();
@@ -41313,16 +41313,14 @@ class AudioItem extends BaseItem {
41313
41313
  url = "";
41314
41314
  isPlaying = false;
41315
41315
  currentTime = 0;
41316
- isStorageUrl = true;
41317
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41316
+ constructor(board, url, events, id = "", extension2) {
41318
41317
  super(board, id);
41319
41318
  this.events = events;
41320
41319
  this.extension = extension2;
41321
41320
  this.linkTo = new LinkTo(this.id, events);
41322
41321
  this.board = board;
41323
- this.isStorageUrl = isStorageUrl;
41324
41322
  if (url) {
41325
- this.applyUrl(url);
41323
+ this.url = url;
41326
41324
  }
41327
41325
  this.transformation = new Transformation(id, events);
41328
41326
  this.linkTo.subject.subscribe(() => {
@@ -41340,9 +41338,6 @@ class AudioItem extends BaseItem {
41340
41338
  getCurrentTime() {
41341
41339
  return this.currentTime;
41342
41340
  }
41343
- getIsStorageUrl() {
41344
- return this.isStorageUrl;
41345
- }
41346
41341
  onTransform = () => {
41347
41342
  this.updateMbr();
41348
41343
  this.subject.publish(this);
@@ -41361,17 +41356,8 @@ class AudioItem extends BaseItem {
41361
41356
  getIsPlaying() {
41362
41357
  return this.isPlaying;
41363
41358
  }
41364
- applyUrl(url) {
41365
- if (this.isStorageUrl) {
41366
- try {
41367
- const newUrl = new URL(url);
41368
- this.url = `${window.location.origin}${newUrl.pathname}`;
41369
- } catch (_) {}
41370
- } else {
41371
- this.url = url;
41372
- }
41373
- }
41374
41359
  setUrl(url) {
41360
+ this.url = url;
41375
41361
  this.emit({
41376
41362
  class: "Audio",
41377
41363
  method: "setUrl",
@@ -41380,9 +41366,6 @@ class AudioItem extends BaseItem {
41380
41366
  });
41381
41367
  }
41382
41368
  getStorageId() {
41383
- if (!this.isStorageUrl) {
41384
- return;
41385
- }
41386
41369
  return this.url.split("/").pop();
41387
41370
  }
41388
41371
  getUrl() {
@@ -41442,9 +41425,6 @@ class AudioItem extends BaseItem {
41442
41425
  if (this.extension) {
41443
41426
  div.setAttribute("extension", this.extension);
41444
41427
  }
41445
- if (this.isStorageUrl) {
41446
- div.setAttribute("is-storage-url", "true");
41447
- }
41448
41428
  div.setAttribute("data-link-to", "");
41449
41429
  return div;
41450
41430
  }
@@ -41453,14 +41433,10 @@ class AudioItem extends BaseItem {
41453
41433
  itemType: "Audio",
41454
41434
  url: this.url,
41455
41435
  transformation: this.transformation.serialize(),
41456
- isStorageUrl: this.isStorageUrl,
41457
41436
  extension: this.extension
41458
41437
  };
41459
41438
  }
41460
41439
  deserialize(data) {
41461
- if (data.isStorageUrl) {
41462
- this.isStorageUrl = data.isStorageUrl;
41463
- }
41464
41440
  if (data.transformation) {
41465
41441
  this.transformation.deserialize(data.transformation);
41466
41442
  }
@@ -41482,7 +41458,7 @@ class AudioItem extends BaseItem {
41482
41458
  break;
41483
41459
  case "Audio":
41484
41460
  if (op.method === "setUrl") {
41485
- this.applyUrl(op.url);
41461
+ this.url = op.url;
41486
41462
  }
41487
41463
  this.subject.publish(this);
41488
41464
  break;
@@ -41955,10 +41931,7 @@ class ImageItem extends BaseItem {
41955
41931
  this.transformation.subject.subscribe(this.onTransform);
41956
41932
  }
41957
41933
  setStorageLink(link2) {
41958
- try {
41959
- const url = new URL(link2);
41960
- this.storageLink = `${window?.location.origin}${url.pathname}`;
41961
- } catch (_) {}
41934
+ this.storageLink = link2;
41962
41935
  }
41963
41936
  getStorageId() {
41964
41937
  return this.storageLink.split("/").pop();
package/dist/esm/index.js CHANGED
@@ -41306,16 +41306,14 @@ class AudioItem extends BaseItem {
41306
41306
  url = "";
41307
41307
  isPlaying = false;
41308
41308
  currentTime = 0;
41309
- isStorageUrl = true;
41310
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41309
+ constructor(board, url, events, id = "", extension2) {
41311
41310
  super(board, id);
41312
41311
  this.events = events;
41313
41312
  this.extension = extension2;
41314
41313
  this.linkTo = new LinkTo(this.id, events);
41315
41314
  this.board = board;
41316
- this.isStorageUrl = isStorageUrl;
41317
41315
  if (url) {
41318
- this.applyUrl(url);
41316
+ this.url = url;
41319
41317
  }
41320
41318
  this.transformation = new Transformation(id, events);
41321
41319
  this.linkTo.subject.subscribe(() => {
@@ -41333,9 +41331,6 @@ class AudioItem extends BaseItem {
41333
41331
  getCurrentTime() {
41334
41332
  return this.currentTime;
41335
41333
  }
41336
- getIsStorageUrl() {
41337
- return this.isStorageUrl;
41338
- }
41339
41334
  onTransform = () => {
41340
41335
  this.updateMbr();
41341
41336
  this.subject.publish(this);
@@ -41354,17 +41349,8 @@ class AudioItem extends BaseItem {
41354
41349
  getIsPlaying() {
41355
41350
  return this.isPlaying;
41356
41351
  }
41357
- applyUrl(url) {
41358
- if (this.isStorageUrl) {
41359
- try {
41360
- const newUrl = new URL(url);
41361
- this.url = `${window.location.origin}${newUrl.pathname}`;
41362
- } catch (_) {}
41363
- } else {
41364
- this.url = url;
41365
- }
41366
- }
41367
41352
  setUrl(url) {
41353
+ this.url = url;
41368
41354
  this.emit({
41369
41355
  class: "Audio",
41370
41356
  method: "setUrl",
@@ -41373,9 +41359,6 @@ class AudioItem extends BaseItem {
41373
41359
  });
41374
41360
  }
41375
41361
  getStorageId() {
41376
- if (!this.isStorageUrl) {
41377
- return;
41378
- }
41379
41362
  return this.url.split("/").pop();
41380
41363
  }
41381
41364
  getUrl() {
@@ -41435,9 +41418,6 @@ class AudioItem extends BaseItem {
41435
41418
  if (this.extension) {
41436
41419
  div.setAttribute("extension", this.extension);
41437
41420
  }
41438
- if (this.isStorageUrl) {
41439
- div.setAttribute("is-storage-url", "true");
41440
- }
41441
41421
  div.setAttribute("data-link-to", "");
41442
41422
  return div;
41443
41423
  }
@@ -41446,14 +41426,10 @@ class AudioItem extends BaseItem {
41446
41426
  itemType: "Audio",
41447
41427
  url: this.url,
41448
41428
  transformation: this.transformation.serialize(),
41449
- isStorageUrl: this.isStorageUrl,
41450
41429
  extension: this.extension
41451
41430
  };
41452
41431
  }
41453
41432
  deserialize(data) {
41454
- if (data.isStorageUrl) {
41455
- this.isStorageUrl = data.isStorageUrl;
41456
- }
41457
41433
  if (data.transformation) {
41458
41434
  this.transformation.deserialize(data.transformation);
41459
41435
  }
@@ -41475,7 +41451,7 @@ class AudioItem extends BaseItem {
41475
41451
  break;
41476
41452
  case "Audio":
41477
41453
  if (op.method === "setUrl") {
41478
- this.applyUrl(op.url);
41454
+ this.url = op.url;
41479
41455
  }
41480
41456
  this.subject.publish(this);
41481
41457
  break;
@@ -41948,10 +41924,7 @@ class ImageItem extends BaseItem {
41948
41924
  this.transformation.subject.subscribe(this.onTransform);
41949
41925
  }
41950
41926
  setStorageLink(link2) {
41951
- try {
41952
- const url = new URL(link2);
41953
- this.storageLink = `${window?.location.origin}${url.pathname}`;
41954
- } catch (_) {}
41927
+ this.storageLink = link2;
41955
41928
  }
41956
41929
  getStorageId() {
41957
41930
  return this.storageLink.split("/").pop();
package/dist/esm/node.js CHANGED
@@ -43774,16 +43774,14 @@ class AudioItem extends BaseItem {
43774
43774
  url = "";
43775
43775
  isPlaying = false;
43776
43776
  currentTime = 0;
43777
- isStorageUrl = true;
43778
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
43777
+ constructor(board, url, events, id = "", extension2) {
43779
43778
  super(board, id);
43780
43779
  this.events = events;
43781
43780
  this.extension = extension2;
43782
43781
  this.linkTo = new LinkTo(this.id, events);
43783
43782
  this.board = board;
43784
- this.isStorageUrl = isStorageUrl;
43785
43783
  if (url) {
43786
- this.applyUrl(url);
43784
+ this.url = url;
43787
43785
  }
43788
43786
  this.transformation = new Transformation(id, events);
43789
43787
  this.linkTo.subject.subscribe(() => {
@@ -43801,9 +43799,6 @@ class AudioItem extends BaseItem {
43801
43799
  getCurrentTime() {
43802
43800
  return this.currentTime;
43803
43801
  }
43804
- getIsStorageUrl() {
43805
- return this.isStorageUrl;
43806
- }
43807
43802
  onTransform = () => {
43808
43803
  this.updateMbr();
43809
43804
  this.subject.publish(this);
@@ -43822,17 +43817,8 @@ class AudioItem extends BaseItem {
43822
43817
  getIsPlaying() {
43823
43818
  return this.isPlaying;
43824
43819
  }
43825
- applyUrl(url) {
43826
- if (this.isStorageUrl) {
43827
- try {
43828
- const newUrl = new URL(url);
43829
- this.url = `${window.location.origin}${newUrl.pathname}`;
43830
- } catch (_) {}
43831
- } else {
43832
- this.url = url;
43833
- }
43834
- }
43835
43820
  setUrl(url) {
43821
+ this.url = url;
43836
43822
  this.emit({
43837
43823
  class: "Audio",
43838
43824
  method: "setUrl",
@@ -43841,9 +43827,6 @@ class AudioItem extends BaseItem {
43841
43827
  });
43842
43828
  }
43843
43829
  getStorageId() {
43844
- if (!this.isStorageUrl) {
43845
- return;
43846
- }
43847
43830
  return this.url.split("/").pop();
43848
43831
  }
43849
43832
  getUrl() {
@@ -43903,9 +43886,6 @@ class AudioItem extends BaseItem {
43903
43886
  if (this.extension) {
43904
43887
  div.setAttribute("extension", this.extension);
43905
43888
  }
43906
- if (this.isStorageUrl) {
43907
- div.setAttribute("is-storage-url", "true");
43908
- }
43909
43889
  div.setAttribute("data-link-to", "");
43910
43890
  return div;
43911
43891
  }
@@ -43914,14 +43894,10 @@ class AudioItem extends BaseItem {
43914
43894
  itemType: "Audio",
43915
43895
  url: this.url,
43916
43896
  transformation: this.transformation.serialize(),
43917
- isStorageUrl: this.isStorageUrl,
43918
43897
  extension: this.extension
43919
43898
  };
43920
43899
  }
43921
43900
  deserialize(data) {
43922
- if (data.isStorageUrl) {
43923
- this.isStorageUrl = data.isStorageUrl;
43924
- }
43925
43901
  if (data.transformation) {
43926
43902
  this.transformation.deserialize(data.transformation);
43927
43903
  }
@@ -43943,7 +43919,7 @@ class AudioItem extends BaseItem {
43943
43919
  break;
43944
43920
  case "Audio":
43945
43921
  if (op.method === "setUrl") {
43946
- this.applyUrl(op.url);
43922
+ this.url = op.url;
43947
43923
  }
43948
43924
  this.subject.publish(this);
43949
43925
  break;
@@ -44416,10 +44392,7 @@ class ImageItem extends BaseItem {
44416
44392
  this.transformation.subject.subscribe(this.onTransform);
44417
44393
  }
44418
44394
  setStorageLink(link2) {
44419
- try {
44420
- const url = new URL(link2);
44421
- this.storageLink = `${window?.location.origin}${url.pathname}`;
44422
- } catch (_) {}
44395
+ this.storageLink = link2;
44423
44396
  }
44424
44397
  getStorageId() {
44425
44398
  return this.storageLink.split("/").pop();
@@ -1,20 +1,20 @@
1
- import { BoardOps, ItemsIndexRecord } from "BoardOperations";
2
- import { Camera } from "Camera";
3
- import { Events, Operation } from "Events";
4
- import { SyncBoardEvent } from "Events/Events";
5
- import { FrameData, Item, ItemData, Matrix, Mbr } from "Items";
6
- import { AINode } from "Items/AINode";
7
- import { DrawingContext } from "Items/DrawingContext";
8
- import { Group } from "Items/Group";
9
- import { ImageItem } from "Items/Image";
10
- import { Keyboard } from "Keyboard";
11
- import { Pointer } from "Pointer";
12
- import { Presence } from "Presence/Presence";
13
- import { BoardSelection } from "Selection";
14
- import { SpatialIndex } from "SpatialIndex";
15
- import { Subject } from "Subject";
16
- import { Tools } from "Tools";
17
- import { ItemsMap } from "Validators";
1
+ import { BoardOps, ItemsIndexRecord } from "./BoardOperations";
2
+ import { Camera } from "./Camera";
3
+ import { Events, Operation } from "./Events";
4
+ import { SyncBoardEvent } from "./Events/Events";
5
+ import { FrameData, Item, ItemData, Matrix, Mbr } from "./Items";
6
+ import { AINode } from "./Items/AINode";
7
+ import { DrawingContext } from "./Items/DrawingContext";
8
+ import { Group } from "./Items/Group";
9
+ import { ImageItem } from "./Items/Image";
10
+ import { Keyboard } from "./Keyboard";
11
+ import { Pointer } from "./Pointer";
12
+ import { Presence } from "./Presence/Presence";
13
+ import { BoardSelection } from "./Selection";
14
+ import { SpatialIndex } from "./SpatialIndex";
15
+ import { Subject } from "./Subject";
16
+ import { Tools } from "./Tools";
17
+ import { ItemsMap } from "./Validators";
18
18
  import { ItemDataWithId } from "./Items/Item";
19
19
  export type InterfaceType = "edit" | "view" | "loading";
20
20
  export declare class Board {
@@ -32,7 +32,7 @@ export declare class Board {
32
32
  readonly camera: Camera;
33
33
  readonly presence: Presence;
34
34
  index: SpatialIndex;
35
- items: import("SpatialIndex").Items;
35
+ items: import("./SpatialIndex").Items;
36
36
  readonly keyboard: Keyboard;
37
37
  private drawingContext;
38
38
  private interfaceType;
@@ -1,6 +1,6 @@
1
1
  import { Command } from './Events';
2
2
  import { BoardOps } from './BoardOperations';
3
- import { Board } from 'Board';
3
+ import { Board } from './Board';
4
4
  export declare class BoardCommand implements Command {
5
5
  private board;
6
6
  private operation;
@@ -1,7 +1,7 @@
1
- import { Matrix, Point, Mbr, Item } from 'Items';
2
- import { Keyboard } from 'Keyboard';
3
- import { Pointer } from 'Pointer';
4
- import { Subject } from 'Subject';
1
+ import { Matrix, Point, Mbr, Item } from '../Items';
2
+ import { Keyboard } from '../Keyboard';
3
+ import { Pointer } from '../Pointer';
4
+ import { Subject } from '../Subject';
5
5
  export declare class Camera {
6
6
  private boardPointer;
7
7
  subject: Subject<Camera>;
@@ -1,6 +1,6 @@
1
- import { Board } from 'Board';
1
+ import { Board } from '../Board';
2
2
  import { BaseOperation, ItemOperation, Operation } from './EventsOperations';
3
- import { Item, TransformationOperation } from 'Items';
3
+ import { Item, TransformationOperation } from '../Items';
4
4
  export interface Command {
5
5
  apply(): void;
6
6
  revert(): void;