@docx-editor.dev/pro 2.34.0 → 2.35.0-canary.20261102190412.sha-b9a04a3
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/{chunk-5HK5RAD7.cjs → chunk-DAGAKPSQ.cjs} +10 -10
- package/dist/{chunk-UPKBD6AH.cjs → chunk-NAEQFCGW.cjs} +1 -1
- package/dist/{chunk-IFDU5O5J.js → chunk-QFU3NZVB.js} +1 -1
- package/dist/{chunk-4TS2D6OV.js → chunk-XBJ7HZKY.js} +10 -10
- package/dist/collaboration/hocuspocus.cjs +1 -1
- package/dist/collaboration/hocuspocus.js +1 -1
- package/dist/collaboration/index.cjs +2 -2
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration/webrtc.cjs +1 -1
- package/dist/collaboration/webrtc.js +1 -1
- package/dist/document-session-6PS5LUM4.cjs +1 -0
- package/dist/document-session-DAM6C3TK.js +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +4 -4
- package/dist/document-session-RPP3WEJ7.cjs +0 -1
- package/dist/document-session-S2N54WP6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDAGAKPSQ_cjs=require('./chunk-DAGAKPSQ.cjs'),i=require('yjs');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var i__namespace=/*#__PURE__*/_interopNamespace(i);var C="roomGeneration",k="docx-room-generation",M=4409,R=2,u=new Set,_=1024;async function D(n,e){let t=n.buffer instanceof ArrayBuffer?n:n.slice(),o=new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",t)),r="";for(let a of o)r+=a.toString(16).padStart(2,"0");return `${e}:${r}`}function N(n){if(u.size>=_){let e=u.values().next().value;e!==void 0&&u.delete(e);}u.add(n);}function G(n){let e=n.getMap(chunkDAGAKPSQ_cjs.e).get(C);return typeof e=="string"?e:""}async function j(n,e={}){let t=e.minimumGain??R,o=await D(n,t);if(u.has(o))return null;let r=new i__namespace.Doc;try{i__namespace.applyUpdate(r,n);let s=r.getMap(chunkDAGAKPSQ_cjs.e).get("documentId");if(typeof s!="string")throw new chunkDAGAKPSQ_cjs.b("not-initialized");let l=await B(chunkDAGAKPSQ_cjs.q(r),s,{keepBound:!0});return n.byteLength/Math.max(1,l.byteLength)>=t?l:(N(o),null)}finally{r.destroy();}}async function B(n,e,t={}){let o=new i__namespace.Doc,r=chunkDAGAKPSQ_cjs.a(o),a=new chunkDAGAKPSQ_cjs.f(o);try{let s=new chunkDAGAKPSQ_cjs.k(o.getMap(chunkDAGAKPSQ_cjs.j)),l=await chunkDAGAKPSQ_cjs.g(a,chunkDAGAKPSQ_cjs.l(n,t.maxBytes,{keepBound:t.keepBound===!0}),s);if(!l.ok)throw new chunkDAGAKPSQ_cjs.b(l.code);return o.transact(()=>{a.schema.meta.set("documentId",e),a.schema.meta.set(C,globalThis.crypto.randomUUID()),chunkDAGAKPSQ_cjs.m(o);}),chunkDAGAKPSQ_cjs.n(o),i__namespace.encodeStateAsUpdate(o)}finally{a.destroy(),r(),o.destroy();}}function J(n){let e=n.getMap(chunkDAGAKPSQ_cjs.e).get("initialized")===true;return JSON.stringify({type:k,generation:e?G(n):null})}function V(n){return n.code===M||n.reason==="room-generation-changed"}var I=new Set([0,1,3,4,6]),U=5,w=Symbol("docx-room-generation-checked");function W(n){let e=Y(n.update);if(!e)throw m();if(e.type===U){let t=T(e.payload);if(t===void 0)return;if(t!==null&&t!==G(n.document))throw m();n.context[w]=true;return}if(I.has(e.type)&&n.context[w]!==true)throw m()}function m(){return Object.assign(new Error("room-generation-changed"),{code:M,reason:"room-generation-changed"})}function T(n){if(n===null||n.length>512)return;let e;try{e=JSON.parse(n);}catch{return}if(typeof e!="object"||e===null)return;let t=e;if(t.type===k)return t.generation===null?null:typeof t.generation=="string"&&t.generation.length<=128?t.generation:void 0}function Y(n){let e={at:0};if(x(n,e)===null)return null;let o=O(n,e);return o===null?null:{type:o,payload:o===U?x(n,e):null}}function O(n,e){let t=0,o=1;for(let r=0;r<8;r+=1){let a=n[e.at];if(a===void 0)return null;if(e.at+=1,t+=(a&127)*o,a<128)return t;o*=128;}return null}function x(n,e){let t=O(n,e);if(t===null||e.at+t>n.length)return null;let o=new TextDecoder().decode(n.subarray(e.at,e.at+t));return e.at+=t,o}exports.a=G;exports.b=j;exports.c=B;exports.d=J;exports.e=V;exports.f=W;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e,b,q,a,f,k as k$1,j as j$1,g,l,m as m$1,n}from'./chunk-
|
|
1
|
+
import {e,b,q,a,f,k as k$1,j as j$1,g,l,m as m$1,n}from'./chunk-XBJ7HZKY.js';import*as i from'yjs';var C="roomGeneration",k="docx-room-generation",M=4409,R=2,u=new Set,_=1024;async function D(n,e){let t=n.buffer instanceof ArrayBuffer?n:n.slice(),o=new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",t)),r="";for(let a of o)r+=a.toString(16).padStart(2,"0");return `${e}:${r}`}function N(n){if(u.size>=_){let e=u.values().next().value;e!==void 0&&u.delete(e);}u.add(n);}function G(n){let e$1=n.getMap(e).get(C);return typeof e$1=="string"?e$1:""}async function j(n,e$1={}){let t=e$1.minimumGain??R,o=await D(n,t);if(u.has(o))return null;let r=new i.Doc;try{i.applyUpdate(r,n);let s=r.getMap(e).get("documentId");if(typeof s!="string")throw new b("not-initialized");let l=await B(q(r),s,{keepBound:!0});return n.byteLength/Math.max(1,l.byteLength)>=t?l:(N(o),null)}finally{r.destroy();}}async function B(n$1,e,t={}){let o=new i.Doc,r=a(o),a$1=new f(o);try{let s=new k$1(o.getMap(j$1)),l$1=await g(a$1,l(n$1,t.maxBytes,{keepBound:t.keepBound===!0}),s);if(!l$1.ok)throw new b(l$1.code);return o.transact(()=>{a$1.schema.meta.set("documentId",e),a$1.schema.meta.set(C,globalThis.crypto.randomUUID()),m$1(o);}),n(o),i.encodeStateAsUpdate(o)}finally{a$1.destroy(),r(),o.destroy();}}function J(n){let e$1=n.getMap(e).get("initialized")===true;return JSON.stringify({type:k,generation:e$1?G(n):null})}function V(n){return n.code===M||n.reason==="room-generation-changed"}var I=new Set([0,1,3,4,6]),U=5,w=Symbol("docx-room-generation-checked");function W(n){let e=Y(n.update);if(!e)throw m();if(e.type===U){let t=T(e.payload);if(t===void 0)return;if(t!==null&&t!==G(n.document))throw m();n.context[w]=true;return}if(I.has(e.type)&&n.context[w]!==true)throw m()}function m(){return Object.assign(new Error("room-generation-changed"),{code:M,reason:"room-generation-changed"})}function T(n){if(n===null||n.length>512)return;let e;try{e=JSON.parse(n);}catch{return}if(typeof e!="object"||e===null)return;let t=e;if(t.type===k)return t.generation===null?null:typeof t.generation=="string"&&t.generation.length<=128?t.generation:void 0}function Y(n){let e={at:0};if(x(n,e)===null)return null;let o=O(n,e);return o===null?null:{type:o,payload:o===U?x(n,e):null}}function O(n,e){let t=0,o=1;for(let r=0;r<8;r+=1){let a=n[e.at];if(a===void 0)return null;if(e.at+=1,t+=(a&127)*o,a<128)return t;o*=128;}return null}function x(n,e){let t=O(n,e);if(t===null||e.at+t>n.length)return null;let o=new TextDecoder().decode(n.subarray(e.at,e.at+t));return e.at+=t,o}export{G as a,j as b,B as c,J as d,V as e,W as f};
|