microboard-temp 0.4.0 → 0.4.2
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/cjs/browser.js +8 -3
- package/dist/cjs/index.js +8 -3
- package/dist/cjs/node.js +8 -3
- package/dist/esm/browser.js +8 -3
- package/dist/esm/index.js +8 -3
- package/dist/esm/node.js +8 -3
- package/dist/types/Settings.d.ts +3 -3
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -52679,7 +52679,9 @@ class Board {
|
|
|
52679
52679
|
return;
|
|
52680
52680
|
}
|
|
52681
52681
|
removeVoidComments() {
|
|
52682
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
52682
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
52683
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
52684
|
+
});
|
|
52683
52685
|
if (voidComments) {
|
|
52684
52686
|
for (const comment2 of voidComments) {
|
|
52685
52687
|
this.remove(comment2);
|
|
@@ -52692,7 +52694,7 @@ class Board {
|
|
|
52692
52694
|
return [];
|
|
52693
52695
|
}
|
|
52694
52696
|
const parentItem = this.items.findById(parentId);
|
|
52695
|
-
if (!parentItem || parentItem
|
|
52697
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
52696
52698
|
return [];
|
|
52697
52699
|
}
|
|
52698
52700
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -52803,7 +52805,10 @@ class Board {
|
|
|
52803
52805
|
applyPasteOperation(itemsMap) {
|
|
52804
52806
|
const items = [];
|
|
52805
52807
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
52806
|
-
|
|
52808
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
52809
|
+
return dataA.zIndex - dataB.zIndex;
|
|
52810
|
+
}
|
|
52811
|
+
return 0;
|
|
52807
52812
|
});
|
|
52808
52813
|
const pasteItem = (itemId, data) => {
|
|
52809
52814
|
if (!data) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -52679,7 +52679,9 @@ class Board {
|
|
|
52679
52679
|
return;
|
|
52680
52680
|
}
|
|
52681
52681
|
removeVoidComments() {
|
|
52682
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
52682
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
52683
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
52684
|
+
});
|
|
52683
52685
|
if (voidComments) {
|
|
52684
52686
|
for (const comment2 of voidComments) {
|
|
52685
52687
|
this.remove(comment2);
|
|
@@ -52692,7 +52694,7 @@ class Board {
|
|
|
52692
52694
|
return [];
|
|
52693
52695
|
}
|
|
52694
52696
|
const parentItem = this.items.findById(parentId);
|
|
52695
|
-
if (!parentItem || parentItem
|
|
52697
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
52696
52698
|
return [];
|
|
52697
52699
|
}
|
|
52698
52700
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -52803,7 +52805,10 @@ class Board {
|
|
|
52803
52805
|
applyPasteOperation(itemsMap) {
|
|
52804
52806
|
const items = [];
|
|
52805
52807
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
52806
|
-
|
|
52808
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
52809
|
+
return dataA.zIndex - dataB.zIndex;
|
|
52810
|
+
}
|
|
52811
|
+
return 0;
|
|
52807
52812
|
});
|
|
52808
52813
|
const pasteItem = (itemId, data) => {
|
|
52809
52814
|
if (!data) {
|
package/dist/cjs/node.js
CHANGED
|
@@ -55152,7 +55152,9 @@ class Board {
|
|
|
55152
55152
|
return;
|
|
55153
55153
|
}
|
|
55154
55154
|
removeVoidComments() {
|
|
55155
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
55155
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
55156
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
55157
|
+
});
|
|
55156
55158
|
if (voidComments) {
|
|
55157
55159
|
for (const comment2 of voidComments) {
|
|
55158
55160
|
this.remove(comment2);
|
|
@@ -55165,7 +55167,7 @@ class Board {
|
|
|
55165
55167
|
return [];
|
|
55166
55168
|
}
|
|
55167
55169
|
const parentItem = this.items.findById(parentId);
|
|
55168
|
-
if (!parentItem || parentItem
|
|
55170
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
55169
55171
|
return [];
|
|
55170
55172
|
}
|
|
55171
55173
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -55276,7 +55278,10 @@ class Board {
|
|
|
55276
55278
|
applyPasteOperation(itemsMap) {
|
|
55277
55279
|
const items = [];
|
|
55278
55280
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
55279
|
-
|
|
55281
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
55282
|
+
return dataA.zIndex - dataB.zIndex;
|
|
55283
|
+
}
|
|
55284
|
+
return 0;
|
|
55280
55285
|
});
|
|
55281
55286
|
const pasteItem = (itemId, data) => {
|
|
55282
55287
|
if (!data) {
|
package/dist/esm/browser.js
CHANGED
|
@@ -52532,7 +52532,9 @@ class Board {
|
|
|
52532
52532
|
return;
|
|
52533
52533
|
}
|
|
52534
52534
|
removeVoidComments() {
|
|
52535
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
52535
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
52536
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
52537
|
+
});
|
|
52536
52538
|
if (voidComments) {
|
|
52537
52539
|
for (const comment2 of voidComments) {
|
|
52538
52540
|
this.remove(comment2);
|
|
@@ -52545,7 +52547,7 @@ class Board {
|
|
|
52545
52547
|
return [];
|
|
52546
52548
|
}
|
|
52547
52549
|
const parentItem = this.items.findById(parentId);
|
|
52548
|
-
if (!parentItem || parentItem
|
|
52550
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
52549
52551
|
return [];
|
|
52550
52552
|
}
|
|
52551
52553
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -52656,7 +52658,10 @@ class Board {
|
|
|
52656
52658
|
applyPasteOperation(itemsMap) {
|
|
52657
52659
|
const items = [];
|
|
52658
52660
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
52659
|
-
|
|
52661
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
52662
|
+
return dataA.zIndex - dataB.zIndex;
|
|
52663
|
+
}
|
|
52664
|
+
return 0;
|
|
52660
52665
|
});
|
|
52661
52666
|
const pasteItem = (itemId, data) => {
|
|
52662
52667
|
if (!data) {
|
package/dist/esm/index.js
CHANGED
|
@@ -52525,7 +52525,9 @@ class Board {
|
|
|
52525
52525
|
return;
|
|
52526
52526
|
}
|
|
52527
52527
|
removeVoidComments() {
|
|
52528
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
52528
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
52529
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
52530
|
+
});
|
|
52529
52531
|
if (voidComments) {
|
|
52530
52532
|
for (const comment2 of voidComments) {
|
|
52531
52533
|
this.remove(comment2);
|
|
@@ -52538,7 +52540,7 @@ class Board {
|
|
|
52538
52540
|
return [];
|
|
52539
52541
|
}
|
|
52540
52542
|
const parentItem = this.items.findById(parentId);
|
|
52541
|
-
if (!parentItem || parentItem
|
|
52543
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
52542
52544
|
return [];
|
|
52543
52545
|
}
|
|
52544
52546
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -52649,7 +52651,10 @@ class Board {
|
|
|
52649
52651
|
applyPasteOperation(itemsMap) {
|
|
52650
52652
|
const items = [];
|
|
52651
52653
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
52652
|
-
|
|
52654
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
52655
|
+
return dataA.zIndex - dataB.zIndex;
|
|
52656
|
+
}
|
|
52657
|
+
return 0;
|
|
52653
52658
|
});
|
|
52654
52659
|
const pasteItem = (itemId, data) => {
|
|
52655
52660
|
if (!data) {
|
package/dist/esm/node.js
CHANGED
|
@@ -54993,7 +54993,9 @@ class Board {
|
|
|
54993
54993
|
return;
|
|
54994
54994
|
}
|
|
54995
54995
|
removeVoidComments() {
|
|
54996
|
-
const voidComments = this.items.listAll().filter((item) =>
|
|
54996
|
+
const voidComments = this.items.listAll().filter((item) => {
|
|
54997
|
+
return item instanceof Comment2 && !item.getThread().length;
|
|
54998
|
+
});
|
|
54997
54999
|
if (voidComments) {
|
|
54998
55000
|
for (const comment2 of voidComments) {
|
|
54999
55001
|
this.remove(comment2);
|
|
@@ -55006,7 +55008,7 @@ class Board {
|
|
|
55006
55008
|
return [];
|
|
55007
55009
|
}
|
|
55008
55010
|
const parentItem = this.items.findById(parentId);
|
|
55009
|
-
if (!parentItem || parentItem
|
|
55011
|
+
if (!parentItem || !(parentItem instanceof AINode)) {
|
|
55010
55012
|
return [];
|
|
55011
55013
|
}
|
|
55012
55014
|
return [parentItem, ...this.getParentAINodes(parentItem)];
|
|
@@ -55117,7 +55119,10 @@ class Board {
|
|
|
55117
55119
|
applyPasteOperation(itemsMap) {
|
|
55118
55120
|
const items = [];
|
|
55119
55121
|
const sortedItemsMap = Object.entries(itemsMap).sort(([, dataA], [, dataB]) => {
|
|
55120
|
-
|
|
55122
|
+
if ("zIndex" in dataA && "zIndex" in dataB) {
|
|
55123
|
+
return dataA.zIndex - dataB.zIndex;
|
|
55124
|
+
}
|
|
55125
|
+
return 0;
|
|
55121
55126
|
});
|
|
55122
55127
|
const pasteItem = (itemId, data) => {
|
|
55123
55128
|
if (!data) {
|
package/dist/types/Settings.d.ts
CHANGED
|
@@ -124,9 +124,9 @@ export declare const conf: {
|
|
|
124
124
|
measureCtx: CanvasRenderingContext2D;
|
|
125
125
|
i18n: import("i18next").i18n;
|
|
126
126
|
hooks: {
|
|
127
|
-
beforeMediaUpload: (...args:
|
|
128
|
-
beforeMediaRemove: (...args:
|
|
129
|
-
onUploadMediaError: (...args:
|
|
127
|
+
beforeMediaUpload: (...args: any[]) => Promise<boolean>;
|
|
128
|
+
beforeMediaRemove: (...args: any[]) => Promise<boolean>;
|
|
129
|
+
onUploadMediaError: (...args: any[]) => Promise<boolean>;
|
|
130
130
|
};
|
|
131
131
|
openModal: OpenModalFunction;
|
|
132
132
|
notify: NotifyWrapperFunction;
|