@seed-hypermedia/client 0.0.20 → 0.0.22
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.
|
@@ -1149,8 +1149,7 @@ function unpackHmId(hypermediaId) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
const version = parsed.query.v || null;
|
|
1151
1151
|
const fragment = parseFragment(parsed.fragment);
|
|
1152
|
-
const
|
|
1153
|
-
const latest = hasBlockRef ? false : parsed.query.l === null || parsed.query.l === "" || !version;
|
|
1152
|
+
const latest = parsed.query.l === null || parsed.query.l === "" || !version;
|
|
1154
1153
|
let blockRange = null;
|
|
1155
1154
|
if (fragment) {
|
|
1156
1155
|
if ("start" in fragment) {
|
package/dist/hm-types.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
serializeBlockRange,
|
|
17
17
|
toNumber,
|
|
18
18
|
unpackHmId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KDTQQR2L.mjs";
|
|
20
20
|
|
|
21
21
|
// src/capability.ts
|
|
22
22
|
import { encode as cborEncode2 } from "@ipld/dag-cbor";
|
|
@@ -3044,6 +3044,9 @@ function computeReplaceOps(oldMap, matchedTree, parentId = "") {
|
|
|
3044
3044
|
if (node.block.childrenType !== void 0) {
|
|
3045
3045
|
block.childrenType = node.block.childrenType;
|
|
3046
3046
|
}
|
|
3047
|
+
if (node.block.link !== void 0) {
|
|
3048
|
+
block.link = node.block.link;
|
|
3049
|
+
}
|
|
3047
3050
|
if (isNew) {
|
|
3048
3051
|
ops.push({ type: "ReplaceBlock", block });
|
|
3049
3052
|
} else {
|
|
@@ -3088,6 +3091,7 @@ function collectIds(nodes, set) {
|
|
|
3088
3091
|
function isBlockContentEqual(old, newBlock) {
|
|
3089
3092
|
if (old.type !== newBlock.type) return false;
|
|
3090
3093
|
if ((old.text || "") !== (newBlock.text || "")) return false;
|
|
3094
|
+
if ((old.link || "") !== (newBlock.link || "")) return false;
|
|
3091
3095
|
const oldAnn = old.annotations || [];
|
|
3092
3096
|
const newAnn = newBlock.annotations || [];
|
|
3093
3097
|
if (oldAnn.length !== newAnn.length) return false;
|