lib0 1.0.0-rc.10 → 1.0.0-rc.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lib0",
3
- "version": "1.0.0-rc.10",
3
+ "version": "1.0.0-rc.11",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -270,8 +270,8 @@
270
270
  }
271
271
  },
272
272
  "devDependencies": {
273
- "@types/node": "^24.11.0",
274
- "c8": "^10.1.3",
273
+ "@types/node": "^25.5.2",
274
+ "c8": "^11.0.0",
275
275
  "dpdm": "^4.0.1",
276
276
  "standard": "^17.1.0",
277
277
  "typescript": "^5.9.3"
@@ -1335,7 +1335,7 @@ export class DeltaBuilder extends Delta {
1335
1335
  if ($textOp.check(end) && checkMergedEquals(end)) {
1336
1336
  end._updateInsert(end.insert + insert)
1337
1337
  } else if (insert.length > 0) {
1338
- list.pushEnd(this.children, new TextOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))
1338
+ list.pushEnd(this.children, new TextOp(insert, mergedAttributes, mergedAttribution))
1339
1339
  }
1340
1340
  this.childCnt += insert.length
1341
1341
  } else if (arr.isArray(insert)) {
@@ -1344,7 +1344,7 @@ export class DeltaBuilder extends Delta {
1344
1344
  end.insert.push(...insert)
1345
1345
  end._fingerprint = null
1346
1346
  } else if (insert.length > 0) {
1347
- list.pushEnd(this.children, new InsertOp(insert.slice() /* ensures that we don't reuse an existing array */, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))
1347
+ list.pushEnd(this.children, new InsertOp(insert.slice() /* ensures that we don't reuse an existing array */, mergedAttributes, mergedAttribution))
1348
1348
  }
1349
1349
  this.childCnt += insert.length
1350
1350
  }
@@ -1362,7 +1362,7 @@ export class DeltaBuilder extends Delta {
1362
1362
  modDeltaCheck(this)
1363
1363
  const mergedAttributes = mergeAttrs(this.usedAttributes, formatting)
1364
1364
  const mergedAttribution = mergeAttrs(this.usedAttribution, attribution)
1365
- list.pushEnd(this.children, new ModifyOp(modify, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))
1365
+ list.pushEnd(this.children, new ModifyOp(modify, mergedAttributes, mergedAttribution))
1366
1366
  this.childCnt += 1
1367
1367
  return /** @type {any} */ (this)
1368
1368
  }
@@ -1910,7 +1910,7 @@ const updateOpFormat = (op, formatUpdate) => {
1910
1910
  /** @type {any} */ (op).format = object.assign({}, op.format, { [k]: v })
1911
1911
  } else if (op.format != null) {
1912
1912
  const { [k]: _, ...rest } = op.format
1913
- ;/** @type {any} */ (op).format = object.isEmpty(rest) ? null : rest
1913
+ ;/** @type {any} */ (op).format = rest ? null : rest
1914
1914
  }
1915
1915
  }
1916
1916
  }
@@ -2038,9 +2038,9 @@ export const $deltaBuilderAny = /** @type {s.Schema<DeltaBuilderAny>} */ (/* @__
2038
2038
  * @param {T | null} a
2039
2039
  * @param {T | null} b
2040
2040
  */
2041
- export const mergeAttrs = (a, b) => object.isEmpty(a)
2042
- ? (object.isEmpty(b) ? null : b)
2043
- : (object.isEmpty(b) ? a : object.assign({}, a, b))
2041
+ export const mergeAttrs = (a, b) => a == null
2042
+ ? b
2043
+ : (b == null ? a : object.assign({}, a, b))
2044
2044
 
2045
2045
  /**
2046
2046
  * @template {DeltaAny|null} D