@nerd-bible/wordgard 0.5.3-beta2 → 0.5.3-beta4
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/collab.js +1 -1
- package/dist/doc.js +6 -3
- package/dist/editor.js +1 -1
- package/dist/table.js +1 -1
- package/package.json +1 -1
package/dist/collab.js
CHANGED
|
@@ -73,7 +73,7 @@ const collabField = /*@__PURE__*/GardState.Field.define({
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
function collab(config = {}) {
|
|
76
|
-
return [collabField, collabConfig.of({ generatedID: Math.floor(Math.random() *
|
|
76
|
+
return [collabField, collabConfig.of({ generatedID: Math.floor(Math.random() * 1e15).toString(36), ...config })];
|
|
77
77
|
}
|
|
78
78
|
;collab = /*@__PURE__*/(function (collab_1) {
|
|
79
79
|
function receive(state, updates) {
|
package/dist/doc.js
CHANGED
|
@@ -3154,9 +3154,12 @@ function fitReplacement(doc, from, to, slice, context) {
|
|
|
3154
3154
|
cx = cx.parent;
|
|
3155
3155
|
}
|
|
3156
3156
|
}
|
|
3157
|
-
for (let i =
|
|
3158
|
-
if (
|
|
3159
|
-
|
|
3157
|
+
for (let i = -1; i < context.length; i++) {
|
|
3158
|
+
if (i == preferredContext)
|
|
3159
|
+
continue;
|
|
3160
|
+
let depth = i < 0 ? preferredContext : i;
|
|
3161
|
+
if (doc.schema.canContain(from.parent.node.type, context[depth].type)) {
|
|
3162
|
+
slice = closeSlice(doc.schema, slice, context, depth + 1, true);
|
|
3160
3163
|
break;
|
|
3161
3164
|
}
|
|
3162
3165
|
}
|
package/dist/editor.js
CHANGED
|
@@ -3427,7 +3427,7 @@ function rangeForClick(wg, pos, type) {
|
|
|
3427
3427
|
return GardSelection.near(wg.state, pos.pos, pos.side || -1);
|
|
3428
3428
|
}
|
|
3429
3429
|
}
|
|
3430
|
-
const Y_STEP =
|
|
3430
|
+
const Y_STEP = 2;
|
|
3431
3431
|
function moveVertically(wg, start, forward, distance = 0, selectNode = false) {
|
|
3432
3432
|
let editorRect = wg.contentDOM.getBoundingClientRect();
|
|
3433
3433
|
let coords = wg.coordsAtPos(start.head, start.headSide);
|
package/dist/table.js
CHANGED
|
@@ -790,7 +790,7 @@ function pastedCells(schema, slice, context) {
|
|
|
790
790
|
tok.type == Table.type) {
|
|
791
791
|
table = tok;
|
|
792
792
|
}
|
|
793
|
-
else if (context.
|
|
793
|
+
else if (context.some(tag => isTableContent(schema, tag.type)) ||
|
|
794
794
|
slice.content.some(tok => tok.tokenType != Token.Type.Close && isTableContent(schema, tok.type))) {
|
|
795
795
|
table = fitSlice(schema, Table, slice, context);
|
|
796
796
|
}
|