@supernova-studio/client 0.47.40 → 0.47.42
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/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/utils/hash.ts +20 -3
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +1 -0
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -5681,9 +5681,23 @@ var DTOUserWorkspaceMembershipsResponse = _zod.z.object({
|
|
|
5681
5681
|
});
|
|
5682
5682
|
|
|
5683
5683
|
// src/utils/hash.ts
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5684
|
+
function hash(input) {
|
|
5685
|
+
return farmhash(input).toString(16);
|
|
5686
|
+
}
|
|
5687
|
+
function farmhash(input) {
|
|
5688
|
+
const seed = 2654435769;
|
|
5689
|
+
let hash2 = seed;
|
|
5690
|
+
for (let i = 0; i < input.length; i++) {
|
|
5691
|
+
const charCode = input.charCodeAt(i);
|
|
5692
|
+
hash2 ^= charCode;
|
|
5693
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5694
|
+
hash2 ^= hash2 >>> 15;
|
|
5695
|
+
}
|
|
5696
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5697
|
+
hash2 ^= hash2 >>> 13;
|
|
5698
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5699
|
+
hash2 ^= hash2 >>> 15;
|
|
5700
|
+
return hash2 >>> 0;
|
|
5687
5701
|
}
|
|
5688
5702
|
function prepareObject(obj) {
|
|
5689
5703
|
if (obj === null || typeof obj !== "object") {
|
|
@@ -7037,6 +7051,7 @@ function serializeTableNode(node) {
|
|
|
7037
7051
|
id: node.id,
|
|
7038
7052
|
props: {
|
|
7039
7053
|
image: {
|
|
7054
|
+
caption: node.caption,
|
|
7040
7055
|
value: node.value
|
|
7041
7056
|
}
|
|
7042
7057
|
}
|
|
@@ -9226,7 +9241,8 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
9226
9241
|
return {
|
|
9227
9242
|
type: "Image",
|
|
9228
9243
|
id,
|
|
9229
|
-
value: imagePropertyValueParseResult.data.value
|
|
9244
|
+
value: imagePropertyValueParseResult.data.value,
|
|
9245
|
+
caption: imagePropertyValueParseResult.data.caption
|
|
9230
9246
|
};
|
|
9231
9247
|
default:
|
|
9232
9248
|
return null;
|