@superdoc-dev/cli 0.4.0-next.5 → 0.4.0-next.6
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/README.md +1 -1
- package/dist/index.js +94 -46
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -368,7 +368,7 @@ Error:
|
|
|
368
368
|
|
|
369
369
|
## Part of SuperDoc
|
|
370
370
|
|
|
371
|
-
This CLI is part of
|
|
371
|
+
This CLI is part of [SuperDoc](https://github.com/superdoc-dev/superdoc) — open-source DOCX editing and tooling. Renders, edits, and automates .docx in the browser and on the server.
|
|
372
372
|
|
|
373
373
|
## License
|
|
374
374
|
|
package/dist/index.js
CHANGED
|
@@ -138857,11 +138857,20 @@ var assign, keys2, forEach2 = (obj, f2) => {
|
|
|
138857
138857
|
}
|
|
138858
138858
|
}
|
|
138859
138859
|
return true;
|
|
138860
|
-
}, hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key), equalFlat = (a, b) => a === b || size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && equals(b[key], val))
|
|
138860
|
+
}, hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key), equalFlat = (a, b) => a === b || size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && equals(b[key], val)), freeze, deepFreeze = (o) => {
|
|
138861
|
+
for (const key in o) {
|
|
138862
|
+
const c = o[key];
|
|
138863
|
+
if (typeof c === "object" || typeof c === "function") {
|
|
138864
|
+
deepFreeze(o[key]);
|
|
138865
|
+
}
|
|
138866
|
+
}
|
|
138867
|
+
return freeze(o);
|
|
138868
|
+
};
|
|
138861
138869
|
var init_object = __esm(() => {
|
|
138862
138870
|
init_equality();
|
|
138863
138871
|
assign = Object.assign;
|
|
138864
138872
|
keys2 = Object.keys;
|
|
138873
|
+
freeze = Object.freeze;
|
|
138865
138874
|
});
|
|
138866
138875
|
|
|
138867
138876
|
// ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js
|
|
@@ -139160,7 +139169,7 @@ var createIterator = (next) => ({
|
|
|
139160
139169
|
return { done, value: done ? undefined : fmap(value) };
|
|
139161
139170
|
});
|
|
139162
139171
|
|
|
139163
|
-
// ../../node_modules/.pnpm/yjs@13.6.
|
|
139172
|
+
// ../../node_modules/.pnpm/yjs@13.6.30/node_modules/yjs/dist/yjs.mjs
|
|
139164
139173
|
class DeleteItem {
|
|
139165
139174
|
constructor(clock, len3) {
|
|
139166
139175
|
this.clock = clock;
|
|
@@ -139858,6 +139867,7 @@ class ContentJSON {
|
|
|
139858
139867
|
class ContentAny {
|
|
139859
139868
|
constructor(arr) {
|
|
139860
139869
|
this.arr = arr;
|
|
139870
|
+
isDevMode && deepFreeze(arr);
|
|
139861
139871
|
}
|
|
139862
139872
|
getLength() {
|
|
139863
139873
|
return this.arr.length;
|
|
@@ -140005,9 +140015,12 @@ class ContentType {
|
|
|
140005
140015
|
}
|
|
140006
140016
|
var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes, clientid) => {
|
|
140007
140017
|
const structs = transaction.doc.store.clients.get(clientid);
|
|
140008
|
-
|
|
140009
|
-
const
|
|
140010
|
-
|
|
140018
|
+
if (structs != null) {
|
|
140019
|
+
const lastStruct = structs[structs.length - 1];
|
|
140020
|
+
const clockState = lastStruct.id.clock + lastStruct.length;
|
|
140021
|
+
for (let i4 = 0, del = deletes[i4];i4 < deletes.length && del.clock < clockState; del = deletes[++i4]) {
|
|
140022
|
+
iterateStructs(transaction, structs, del.clock, del.len, f2);
|
|
140023
|
+
}
|
|
140011
140024
|
}
|
|
140012
140025
|
}), findIndexDS = (dis, clock) => {
|
|
140013
140026
|
let left = 0;
|
|
@@ -140037,7 +140050,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140037
140050
|
const left = dels[j - 1];
|
|
140038
140051
|
const right = dels[i4];
|
|
140039
140052
|
if (left.clock + left.len >= right.clock) {
|
|
140040
|
-
left.
|
|
140053
|
+
dels[j - 1] = new DeleteItem(left.clock, max(left.len, right.clock + right.len - left.clock));
|
|
140041
140054
|
} else {
|
|
140042
140055
|
if (j < i4) {
|
|
140043
140056
|
dels[j] = right;
|
|
@@ -140260,13 +140273,13 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140260
140273
|
const addStackToRestSS = () => {
|
|
140261
140274
|
for (const item of stack2) {
|
|
140262
140275
|
const client = item.id.client;
|
|
140263
|
-
const
|
|
140264
|
-
if (
|
|
140265
|
-
|
|
140266
|
-
restStructs.clients.set(client,
|
|
140276
|
+
const inapplicableItems = clientsStructRefs.get(client);
|
|
140277
|
+
if (inapplicableItems) {
|
|
140278
|
+
inapplicableItems.i--;
|
|
140279
|
+
restStructs.clients.set(client, inapplicableItems.refs.slice(inapplicableItems.i));
|
|
140267
140280
|
clientsStructRefs.delete(client);
|
|
140268
|
-
|
|
140269
|
-
|
|
140281
|
+
inapplicableItems.i = 0;
|
|
140282
|
+
inapplicableItems.refs = [];
|
|
140270
140283
|
} else {
|
|
140271
140284
|
restStructs.clients.set(client, [item]);
|
|
140272
140285
|
}
|
|
@@ -140464,6 +140477,13 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140464
140477
|
t = t.right;
|
|
140465
140478
|
}
|
|
140466
140479
|
return createRelativePosition(type, null, assoc);
|
|
140480
|
+
}, getItemWithOffset = (store, id2) => {
|
|
140481
|
+
const item = getItem(store, id2);
|
|
140482
|
+
const diff = id2.clock - item.id.clock;
|
|
140483
|
+
return {
|
|
140484
|
+
item,
|
|
140485
|
+
diff
|
|
140486
|
+
};
|
|
140467
140487
|
}, createAbsolutePositionFromRelativePosition = (rpos, doc3, followUndoneDeletions = true) => {
|
|
140468
140488
|
const store = doc3.store;
|
|
140469
140489
|
const rightID = rpos.item;
|
|
@@ -140476,7 +140496,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140476
140496
|
if (getState(store, rightID.client) <= rightID.clock) {
|
|
140477
140497
|
return null;
|
|
140478
140498
|
}
|
|
140479
|
-
const res = followUndoneDeletions ? followRedone(store, rightID) :
|
|
140499
|
+
const res = followUndoneDeletions ? followRedone(store, rightID) : getItemWithOffset(store, rightID);
|
|
140480
140500
|
const right = res.item;
|
|
140481
140501
|
if (!(right instanceof Item4)) {
|
|
140482
140502
|
return null;
|
|
@@ -140702,15 +140722,19 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140702
140722
|
event._path = null;
|
|
140703
140723
|
});
|
|
140704
140724
|
events.sort((event1, event2) => event1.path.length - event2.path.length);
|
|
140705
|
-
|
|
140725
|
+
fs.push(() => {
|
|
140726
|
+
callEventHandlerListeners(type._dEH, events, transaction);
|
|
140727
|
+
});
|
|
140728
|
+
}
|
|
140729
|
+
});
|
|
140730
|
+
fs.push(() => doc3.emit("afterTransaction", [transaction, doc3]));
|
|
140731
|
+
fs.push(() => {
|
|
140732
|
+
if (transaction._needFormattingCleanup) {
|
|
140733
|
+
cleanupYTextAfterTransaction(transaction);
|
|
140706
140734
|
}
|
|
140707
140735
|
});
|
|
140708
140736
|
});
|
|
140709
|
-
fs.push(() => doc3.emit("afterTransaction", [transaction, doc3]));
|
|
140710
140737
|
callAll(fs, []);
|
|
140711
|
-
if (transaction._needFormattingCleanup) {
|
|
140712
|
-
cleanupYTextAfterTransaction(transaction);
|
|
140713
|
-
}
|
|
140714
140738
|
} finally {
|
|
140715
140739
|
if (doc3.gc) {
|
|
140716
140740
|
tryGcDeleteSet(ds, store, doc3.gcFilter);
|
|
@@ -140806,7 +140830,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140806
140830
|
return result;
|
|
140807
140831
|
}, clearUndoManagerStackItem = (tr, um, stackItem) => {
|
|
140808
140832
|
iterateDeletedStructs(tr, stackItem.deletions, (item) => {
|
|
140809
|
-
if (item instanceof Item4 && um.scope.some((type) => isParentOf(type, item))) {
|
|
140833
|
+
if (item instanceof Item4 && um.scope.some((type) => type === tr.doc || isParentOf(type, item))) {
|
|
140810
140834
|
keepItem(item, false);
|
|
140811
140835
|
}
|
|
140812
140836
|
});
|
|
@@ -140830,13 +140854,13 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
140830
140854
|
}
|
|
140831
140855
|
struct = item;
|
|
140832
140856
|
}
|
|
140833
|
-
if (!struct.deleted && scope.some((type) => isParentOf(type, struct))) {
|
|
140857
|
+
if (!struct.deleted && scope.some((type) => type === transaction.doc || isParentOf(type, struct))) {
|
|
140834
140858
|
itemsToDelete.push(struct);
|
|
140835
140859
|
}
|
|
140836
140860
|
}
|
|
140837
140861
|
});
|
|
140838
140862
|
iterateDeletedStructs(transaction, stackItem.deletions, (struct) => {
|
|
140839
|
-
if (struct instanceof Item4 && scope.some((type) => isParentOf(type, struct)) && !isDeleted(stackItem.insertions, struct.id)) {
|
|
140863
|
+
if (struct instanceof Item4 && scope.some((type) => type === transaction.doc || isParentOf(type, struct)) && !isDeleted(stackItem.insertions, struct.id)) {
|
|
140840
140864
|
itemsToRedo.add(struct);
|
|
140841
140865
|
}
|
|
140842
140866
|
});
|
|
@@ -141052,6 +141076,8 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141052
141076
|
child = child._item.parent;
|
|
141053
141077
|
}
|
|
141054
141078
|
return path2;
|
|
141079
|
+
}, warnPrematureAccess = () => {
|
|
141080
|
+
warn2("Invalid access: Add Yjs type to a document before reading data.");
|
|
141055
141081
|
}, maxSearchMarker = 80, globalSearchMarkerTimestamp = 0, refreshMarkerTimestamp = (marker) => {
|
|
141056
141082
|
marker.timestamp = globalSearchMarkerTimestamp++;
|
|
141057
141083
|
}, overwriteMarker = (marker, p2, index2) => {
|
|
@@ -141144,6 +141170,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141144
141170
|
}
|
|
141145
141171
|
callEventHandlerListeners(changedType._eH, event, transaction);
|
|
141146
141172
|
}, typeListSlice = (type, start, end) => {
|
|
141173
|
+
type.doc ?? warnPrematureAccess();
|
|
141147
141174
|
if (start < 0) {
|
|
141148
141175
|
start = type._length + start;
|
|
141149
141176
|
}
|
|
@@ -141170,6 +141197,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141170
141197
|
}
|
|
141171
141198
|
return cs;
|
|
141172
141199
|
}, typeListToArray = (type) => {
|
|
141200
|
+
type.doc ?? warnPrematureAccess();
|
|
141173
141201
|
const cs = [];
|
|
141174
141202
|
let n = type._start;
|
|
141175
141203
|
while (n !== null) {
|
|
@@ -141198,6 +141226,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141198
141226
|
}, typeListForEach = (type, f2) => {
|
|
141199
141227
|
let index2 = 0;
|
|
141200
141228
|
let n = type._start;
|
|
141229
|
+
type.doc ?? warnPrematureAccess();
|
|
141201
141230
|
while (n !== null) {
|
|
141202
141231
|
if (n.countable && !n.deleted) {
|
|
141203
141232
|
const c = n.content.getContent();
|
|
@@ -141247,6 +141276,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141247
141276
|
}
|
|
141248
141277
|
};
|
|
141249
141278
|
}, typeListGet = (type, index2) => {
|
|
141279
|
+
type.doc ?? warnPrematureAccess();
|
|
141250
141280
|
const marker = findMarker(type, index2);
|
|
141251
141281
|
let n = type._start;
|
|
141252
141282
|
if (marker !== null) {
|
|
@@ -141411,6 +141441,8 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141411
141441
|
case Boolean:
|
|
141412
141442
|
case Array:
|
|
141413
141443
|
case String:
|
|
141444
|
+
case Date:
|
|
141445
|
+
case BigInt:
|
|
141414
141446
|
content2 = new ContentAny([value]);
|
|
141415
141447
|
break;
|
|
141416
141448
|
case Uint8Array:
|
|
@@ -141429,10 +141461,12 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141429
141461
|
}
|
|
141430
141462
|
new Item4(createID(ownClientId, getState(doc3.store, ownClientId)), left, left && left.lastId, null, null, parent, key, content2).integrate(transaction, 0);
|
|
141431
141463
|
}, typeMapGet = (parent, key) => {
|
|
141464
|
+
parent.doc ?? warnPrematureAccess();
|
|
141432
141465
|
const val = parent._map.get(key);
|
|
141433
141466
|
return val !== undefined && !val.deleted ? val.content.getContent()[val.length - 1] : undefined;
|
|
141434
141467
|
}, typeMapGetAll = (parent) => {
|
|
141435
141468
|
const res = {};
|
|
141469
|
+
parent.doc ?? warnPrematureAccess();
|
|
141436
141470
|
parent._map.forEach((value, key) => {
|
|
141437
141471
|
if (!value.deleted) {
|
|
141438
141472
|
res[key] = value.content.getContent()[value.length - 1];
|
|
@@ -141440,6 +141474,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141440
141474
|
});
|
|
141441
141475
|
return res;
|
|
141442
141476
|
}, typeMapHas = (parent, key) => {
|
|
141477
|
+
parent.doc ?? warnPrematureAccess();
|
|
141443
141478
|
const val = parent._map.get(key);
|
|
141444
141479
|
return val !== undefined && !val.deleted;
|
|
141445
141480
|
}, typeMapGetAllSnapshot = (parent, snapshot2) => {
|
|
@@ -141454,7 +141489,10 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141454
141489
|
}
|
|
141455
141490
|
});
|
|
141456
141491
|
return res;
|
|
141457
|
-
}, createMapIterator = (
|
|
141492
|
+
}, createMapIterator = (type) => {
|
|
141493
|
+
type.doc ?? warnPrematureAccess();
|
|
141494
|
+
return iteratorFilter(type._map.entries(), (entry) => !entry[1].deleted);
|
|
141495
|
+
}, YArrayEvent, YArray, readYArray = (_decoder) => new YArray, YMapEvent, YMap, readYMap = (_decoder) => new YMap, equalAttrs = (a, b) => a === b || typeof a === "object" && typeof b === "object" && a && b && equalFlat(a, b), findNextPosition = (transaction, pos, count) => {
|
|
141458
141496
|
while (pos.right !== null && count > 0) {
|
|
141459
141497
|
switch (pos.right.content.constructor) {
|
|
141460
141498
|
case ContentFormat:
|
|
@@ -141759,7 +141797,7 @@ var iterateDeletedStructs = (transaction, ds, f2) => ds.clients.forEach((deletes
|
|
|
141759
141797
|
}
|
|
141760
141798
|
}
|
|
141761
141799
|
return new ContentJSON(cs);
|
|
141762
|
-
}, readContentAny = (decoder) => {
|
|
141800
|
+
}, isDevMode, readContentAny = (decoder) => {
|
|
141763
141801
|
const len3 = decoder.readLen();
|
|
141764
141802
|
const cs = [];
|
|
141765
141803
|
for (let i4 = 0;i4 < len3; i4++) {
|
|
@@ -141893,6 +141931,7 @@ var init_yjs = __esm(() => {
|
|
|
141893
141931
|
init_logging_node();
|
|
141894
141932
|
init_time();
|
|
141895
141933
|
init_object();
|
|
141934
|
+
init_environment();
|
|
141896
141935
|
generateNewClientId = uint32;
|
|
141897
141936
|
Doc = class Doc extends ObservableV2 {
|
|
141898
141937
|
constructor({ guid = uuidv4(), collectionid = null, gc = true, gcFilter = () => true, meta = null, autoLoad = false, shouldLoad = true } = {}) {
|
|
@@ -142253,7 +142292,7 @@ var init_yjs = __esm(() => {
|
|
|
142253
142292
|
deleteFilter = () => true,
|
|
142254
142293
|
trackedOrigins = new Set([null]),
|
|
142255
142294
|
ignoreRemoteMapChanges = false,
|
|
142256
|
-
doc: doc3 = isArray2(typeScope) ? typeScope[0].doc : typeScope.doc
|
|
142295
|
+
doc: doc3 = isArray2(typeScope) ? typeScope[0].doc : typeScope instanceof Doc ? typeScope : typeScope.doc
|
|
142257
142296
|
} = {}) {
|
|
142258
142297
|
super();
|
|
142259
142298
|
this.scope = [];
|
|
@@ -142272,7 +142311,7 @@ var init_yjs = __esm(() => {
|
|
|
142272
142311
|
this.ignoreRemoteMapChanges = ignoreRemoteMapChanges;
|
|
142273
142312
|
this.captureTimeout = captureTimeout;
|
|
142274
142313
|
this.afterTransactionHandler = (transaction) => {
|
|
142275
|
-
if (!this.captureTransaction(transaction) || !this.scope.some((type) => transaction.changedParentTypes.has(type)) || !this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))) {
|
|
142314
|
+
if (!this.captureTransaction(transaction) || !this.scope.some((type) => transaction.changedParentTypes.has(type) || type === this.doc) || !this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))) {
|
|
142276
142315
|
return;
|
|
142277
142316
|
}
|
|
142278
142317
|
const undoing = this.undoing;
|
|
@@ -142305,7 +142344,7 @@ var init_yjs = __esm(() => {
|
|
|
142305
142344
|
this.lastChange = now;
|
|
142306
142345
|
}
|
|
142307
142346
|
iterateDeletedStructs(transaction, transaction.deleteSet, (item) => {
|
|
142308
|
-
if (item instanceof Item4 && this.scope.some((type) => isParentOf(type, item))) {
|
|
142347
|
+
if (item instanceof Item4 && this.scope.some((type) => type === transaction.doc || isParentOf(type, item))) {
|
|
142309
142348
|
keepItem(item, true);
|
|
142310
142349
|
}
|
|
142311
142350
|
});
|
|
@@ -142322,10 +142361,12 @@ var init_yjs = __esm(() => {
|
|
|
142322
142361
|
});
|
|
142323
142362
|
}
|
|
142324
142363
|
addToScope(ytypes) {
|
|
142364
|
+
const tmpSet = new Set(this.scope);
|
|
142325
142365
|
ytypes = isArray2(ytypes) ? ytypes : [ytypes];
|
|
142326
142366
|
ytypes.forEach((ytype) => {
|
|
142327
|
-
if (
|
|
142328
|
-
|
|
142367
|
+
if (!tmpSet.has(ytype)) {
|
|
142368
|
+
tmpSet.add(ytype);
|
|
142369
|
+
if (ytype instanceof AbstractType ? ytype.doc !== this.doc : ytype !== this.doc)
|
|
142329
142370
|
warn2("[yjs#509] Not same Y.Doc");
|
|
142330
142371
|
this.scope.push(ytype);
|
|
142331
142372
|
}
|
|
@@ -142414,7 +142455,8 @@ var init_yjs = __esm(() => {
|
|
|
142414
142455
|
return arr;
|
|
142415
142456
|
}
|
|
142416
142457
|
get length() {
|
|
142417
|
-
|
|
142458
|
+
this.doc ?? warnPrematureAccess();
|
|
142459
|
+
return this._length;
|
|
142418
142460
|
}
|
|
142419
142461
|
_callObserver(transaction, parentSubs) {
|
|
142420
142462
|
super._callObserver(transaction, parentSubs);
|
|
@@ -142512,6 +142554,7 @@ var init_yjs = __esm(() => {
|
|
|
142512
142554
|
callTypeObservers(this, transaction, new YMapEvent(this, transaction, parentSubs));
|
|
142513
142555
|
}
|
|
142514
142556
|
toJSON() {
|
|
142557
|
+
this.doc ?? warnPrematureAccess();
|
|
142515
142558
|
const map6 = {};
|
|
142516
142559
|
this._map.forEach((item, key) => {
|
|
142517
142560
|
if (!item.deleted) {
|
|
@@ -142522,18 +142565,19 @@ var init_yjs = __esm(() => {
|
|
|
142522
142565
|
return map6;
|
|
142523
142566
|
}
|
|
142524
142567
|
get size() {
|
|
142525
|
-
return [...createMapIterator(this
|
|
142568
|
+
return [...createMapIterator(this)].length;
|
|
142526
142569
|
}
|
|
142527
142570
|
keys() {
|
|
142528
|
-
return iteratorMap(createMapIterator(this
|
|
142571
|
+
return iteratorMap(createMapIterator(this), (v) => v[0]);
|
|
142529
142572
|
}
|
|
142530
142573
|
values() {
|
|
142531
|
-
return iteratorMap(createMapIterator(this
|
|
142574
|
+
return iteratorMap(createMapIterator(this), (v) => v[1].content.getContent()[v[1].length - 1]);
|
|
142532
142575
|
}
|
|
142533
142576
|
entries() {
|
|
142534
|
-
return iteratorMap(createMapIterator(this
|
|
142577
|
+
return iteratorMap(createMapIterator(this), (v) => [v[0], v[1].content.getContent()[v[1].length - 1]]);
|
|
142535
142578
|
}
|
|
142536
142579
|
forEach(f2) {
|
|
142580
|
+
this.doc ?? warnPrematureAccess();
|
|
142537
142581
|
this._map.forEach((item, key) => {
|
|
142538
142582
|
if (!item.deleted) {
|
|
142539
142583
|
f2(item.content.getContent()[item.length - 1], key, this);
|
|
@@ -142787,6 +142831,7 @@ var init_yjs = __esm(() => {
|
|
|
142787
142831
|
this._hasFormatting = false;
|
|
142788
142832
|
}
|
|
142789
142833
|
get length() {
|
|
142834
|
+
this.doc ?? warnPrematureAccess();
|
|
142790
142835
|
return this._length;
|
|
142791
142836
|
}
|
|
142792
142837
|
_integrate(y, item) {
|
|
@@ -142815,6 +142860,7 @@ var init_yjs = __esm(() => {
|
|
|
142815
142860
|
}
|
|
142816
142861
|
}
|
|
142817
142862
|
toString() {
|
|
142863
|
+
this.doc ?? warnPrematureAccess();
|
|
142818
142864
|
let str = "";
|
|
142819
142865
|
let n = this._start;
|
|
142820
142866
|
while (n !== null) {
|
|
@@ -142852,6 +142898,7 @@ var init_yjs = __esm(() => {
|
|
|
142852
142898
|
}
|
|
142853
142899
|
}
|
|
142854
142900
|
toDelta(snapshot2, prevSnapshot, computeYChange) {
|
|
142901
|
+
this.doc ?? warnPrematureAccess();
|
|
142855
142902
|
const ops = [];
|
|
142856
142903
|
const currentAttributes = new Map;
|
|
142857
142904
|
const doc3 = this.doc;
|
|
@@ -143034,6 +143081,7 @@ var init_yjs = __esm(() => {
|
|
|
143034
143081
|
this._root = root2;
|
|
143035
143082
|
this._currentNode = root2._start;
|
|
143036
143083
|
this._firstCall = true;
|
|
143084
|
+
root2.doc ?? warnPrematureAccess();
|
|
143037
143085
|
}
|
|
143038
143086
|
[Symbol.iterator]() {
|
|
143039
143087
|
return this;
|
|
@@ -143048,8 +143096,9 @@ var init_yjs = __esm(() => {
|
|
|
143048
143096
|
n = type._start;
|
|
143049
143097
|
} else {
|
|
143050
143098
|
while (n !== null) {
|
|
143051
|
-
|
|
143052
|
-
|
|
143099
|
+
const nxt = n.next;
|
|
143100
|
+
if (nxt !== null) {
|
|
143101
|
+
n = nxt;
|
|
143053
143102
|
break;
|
|
143054
143103
|
} else if (n.parent === this._root) {
|
|
143055
143104
|
n = null;
|
|
@@ -143091,6 +143140,7 @@ var init_yjs = __esm(() => {
|
|
|
143091
143140
|
return el;
|
|
143092
143141
|
}
|
|
143093
143142
|
get length() {
|
|
143143
|
+
this.doc ?? warnPrematureAccess();
|
|
143094
143144
|
return this._prelimContent === null ? this._length : this._prelimContent.length;
|
|
143095
143145
|
}
|
|
143096
143146
|
createTreeWalker(filter) {
|
|
@@ -143212,11 +143262,9 @@ var init_yjs = __esm(() => {
|
|
|
143212
143262
|
const el = new YXmlElement(this.nodeName);
|
|
143213
143263
|
const attrs = this.getAttributes();
|
|
143214
143264
|
forEach2(attrs, (value, key) => {
|
|
143215
|
-
|
|
143216
|
-
el.setAttribute(key, value);
|
|
143217
|
-
}
|
|
143265
|
+
el.setAttribute(key, value);
|
|
143218
143266
|
});
|
|
143219
|
-
el.insert(0, this.toArray().map((
|
|
143267
|
+
el.insert(0, this.toArray().map((v) => v instanceof AbstractType ? v.clone() : v));
|
|
143220
143268
|
return el;
|
|
143221
143269
|
}
|
|
143222
143270
|
toString() {
|
|
@@ -143420,6 +143468,7 @@ var init_yjs = __esm(() => {
|
|
|
143420
143468
|
return null;
|
|
143421
143469
|
}
|
|
143422
143470
|
};
|
|
143471
|
+
isDevMode = getVariable("node_env") === "development";
|
|
143423
143472
|
typeRefs = [
|
|
143424
143473
|
readYArray,
|
|
143425
143474
|
readYMap,
|
|
@@ -143496,8 +143545,7 @@ var init_yjs = __esm(() => {
|
|
|
143496
143545
|
if (this.left && this.left.constructor === Item4) {
|
|
143497
143546
|
this.parent = this.left.parent;
|
|
143498
143547
|
this.parentSub = this.left.parentSub;
|
|
143499
|
-
}
|
|
143500
|
-
if (this.right && this.right.constructor === Item4) {
|
|
143548
|
+
} else if (this.right && this.right.constructor === Item4) {
|
|
143501
143549
|
this.parent = this.right.parent;
|
|
143502
143550
|
this.parentSub = this.right.parentSub;
|
|
143503
143551
|
}
|
|
@@ -318342,7 +318390,7 @@ var require_src = __commonJS((exports) => {
|
|
|
318342
318390
|
exports.retry = retry;
|
|
318343
318391
|
});
|
|
318344
318392
|
|
|
318345
|
-
// ../../node_modules/.pnpm/@hocuspocus+provider@2.15.3_y-protocols@1.0.7_yjs@13.6.
|
|
318393
|
+
// ../../node_modules/.pnpm/@hocuspocus+provider@2.15.3_y-protocols@1.0.7_yjs@13.6.30__yjs@13.6.30/node_modules/@hocuspocus/provider/dist/hocuspocus-provider.esm.js
|
|
318346
318394
|
class VarStoragePolyfill3 {
|
|
318347
318395
|
constructor() {
|
|
318348
318396
|
this.map = new Map;
|
|
@@ -320029,7 +320077,7 @@ var init_broadcastchannel = __esm(() => {
|
|
|
320029
320077
|
BC2 = typeof BroadcastChannel === "undefined" ? LocalStoragePolyfill2 : BroadcastChannel;
|
|
320030
320078
|
});
|
|
320031
320079
|
|
|
320032
|
-
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.
|
|
320080
|
+
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.30/node_modules/y-protocols/sync.js
|
|
320033
320081
|
var messageYjsSyncStep12 = 0, messageYjsSyncStep22 = 1, messageYjsUpdate2 = 2, writeSyncStep12 = (encoder, doc4) => {
|
|
320034
320082
|
writeVarUint(encoder, messageYjsSyncStep12);
|
|
320035
320083
|
const sv = encodeStateVector(doc4);
|
|
@@ -320072,7 +320120,7 @@ var init_sync = __esm(() => {
|
|
|
320072
320120
|
readUpdate2 = readSyncStep22;
|
|
320073
320121
|
});
|
|
320074
320122
|
|
|
320075
|
-
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.
|
|
320123
|
+
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.30/node_modules/y-protocols/auth.js
|
|
320076
320124
|
var messagePermissionDenied = 0, readAuthMessage2 = (decoder, y3, permissionDeniedHandler) => {
|
|
320077
320125
|
switch (readVarUint(decoder)) {
|
|
320078
320126
|
case messagePermissionDenied:
|
|
@@ -320083,7 +320131,7 @@ var init_auth = __esm(() => {
|
|
|
320083
320131
|
init_decoding();
|
|
320084
320132
|
});
|
|
320085
320133
|
|
|
320086
|
-
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.
|
|
320134
|
+
// ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.30/node_modules/y-protocols/awareness.js
|
|
320087
320135
|
var outdatedTimeout2 = 30000, Awareness2, removeAwarenessStates2 = (awareness, clients, origin) => {
|
|
320088
320136
|
const removed = [];
|
|
320089
320137
|
for (let i4 = 0;i4 < clients.length; i4++) {
|
|
@@ -320272,7 +320320,7 @@ var init_url = __esm(() => {
|
|
|
320272
320320
|
init_object();
|
|
320273
320321
|
});
|
|
320274
320322
|
|
|
320275
|
-
// ../../node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.
|
|
320323
|
+
// ../../node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.30/node_modules/y-websocket/src/y-websocket.js
|
|
320276
320324
|
var messageSync = 0, messageQueryAwareness = 3, messageAwareness = 1, messageAuth = 2, messageHandlers, messageReconnectTimeout = 30000, permissionDeniedHandler = (provider, reason2) => console.warn(`Permission denied to access ${provider.url}.
|
|
320277
320325
|
${reason2}`), readMessage = (provider, buf, emitSynced) => {
|
|
320278
320326
|
const decoder = createDecoder(buf);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -14,27 +14,27 @@
|
|
|
14
14
|
"fast-glob": "^3.3.3",
|
|
15
15
|
"happy-dom": "^20.3.4",
|
|
16
16
|
"y-websocket": "^3.0.0",
|
|
17
|
-
"yjs": "13.6.19"
|
|
17
|
+
"yjs": "^13.6.19"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/bun": "^1.3.8",
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
23
|
"@superdoc/document-api": "0.0.1",
|
|
24
|
+
"superdoc": "1.21.0",
|
|
24
25
|
"@superdoc/super-editor": "0.0.1",
|
|
25
|
-
"@superdoc/pm-adapter": "0.0.0"
|
|
26
|
-
"superdoc": "1.21.0"
|
|
26
|
+
"@superdoc/pm-adapter": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.4.0-next.
|
|
34
|
-
"@superdoc-dev/cli-darwin-x64": "0.4.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-x64": "0.4.0-next.
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.4.0-next.6",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.4.0-next.6",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.4.0-next.6",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.4.0-next.6",
|
|
37
|
+
"@superdoc-dev/cli-linux-arm64": "0.4.0-next.6"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"predev": "node scripts/ensure-superdoc-build.js",
|