@layers-app/editor 0.0.2 → 0.0.4
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 +8 -8
- package/dist/{DSD.CjmkQe7N.js → DSD.B4zOTE_q.js} +11 -6
- package/dist/{DSD.CdYWFL0O.js → DSD.BwAjvxen.js} +1 -1
- package/dist/{DSD.BJ38UQLe.js → DSD.D5yIMAX4.js} +108143 -106892
- package/dist/{DSD.C11ukNU9.js → DSD.KRbYP03K.js} +67 -32
- package/dist/{DSD.BL_py6LH.js → DSD.yNW5052Q.js} +36 -21
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +88 -88
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -48,26 +48,26 @@ const json = {
|
|
|
48
48
|
style: '',
|
|
49
49
|
text: text,
|
|
50
50
|
type: 'text',
|
|
51
|
-
version: 1
|
|
52
|
-
}
|
|
51
|
+
version: 1,
|
|
52
|
+
},
|
|
53
53
|
],
|
|
54
54
|
direction: 'ltr',
|
|
55
55
|
format: '',
|
|
56
56
|
indent: 0,
|
|
57
57
|
type: 'paragraph',
|
|
58
|
-
version: 1
|
|
59
|
-
}
|
|
58
|
+
version: 1,
|
|
59
|
+
},
|
|
60
60
|
],
|
|
61
61
|
direction: 'ltr',
|
|
62
62
|
format: '',
|
|
63
63
|
indent: 0,
|
|
64
64
|
type: 'root',
|
|
65
|
-
version: 1
|
|
66
|
-
}
|
|
65
|
+
version: 1,
|
|
66
|
+
},
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const onChange = (
|
|
70
|
-
data // json
|
|
70
|
+
data, // json
|
|
71
71
|
) => <Editor initialContent={json} onChange={onChange} />;
|
|
72
72
|
```
|
|
73
73
|
|
|
@@ -301,7 +301,7 @@ Dropzone.Idle is visible when the user is not dragging any file into the drop zo
|
|
|
301
301
|
getActiveUsers: (users) => {
|
|
302
302
|
// Returns active users editing the document
|
|
303
303
|
setActiveUsers(users);
|
|
304
|
-
}
|
|
304
|
+
},
|
|
305
305
|
}}
|
|
306
306
|
/>
|
|
307
307
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as g, jsxs as $, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import { useState as U, useEffect as b, useMemo as V, Suspense as q, useLayoutEffect as Y, useRef as W } from "react";
|
|
3
|
-
import { N as T, D as G, R as a, o as c, p as u, q as J, s as Q, v as A, x as Z, A as ee, z as te, H as ne, d as re, y as M, e as oe, E as S, k as se, G as ie, I as O, J as X, M as ae, O as ce, P as le, Q as ue, S as de, T as fe, U as me, V as ge, b as B, W as pe, X as Ce, Y as he, Z as ye, _ as ve, a0 as Ee, a1 as we, m as ke, a2 as De, a3 as be, a4 as Le, g as Re, i as Se, C as x, a5 as P } from "./DSD.
|
|
4
|
-
import { d as xe, P as Pe } from "./DSD.
|
|
3
|
+
import { N as T, D as G, R as a, o as c, p as u, q as J, s as Q, v as A, x as Z, A as ee, z as te, H as ne, d as re, y as M, e as oe, E as S, k as se, G as ie, I as O, J as X, M as ae, O as ce, P as le, Q as ue, S as de, T as fe, U as me, V as ge, b as B, W as pe, X as Ce, Y as he, Z as ye, _ as ve, a0 as Ee, a1 as we, m as ke, a2 as De, a3 as be, a4 as Le, g as Re, i as Se, C as x, a5 as P } from "./DSD.D5yIMAX4.js";
|
|
4
|
+
import { d as xe, P as Pe } from "./DSD.BwAjvxen.js";
|
|
5
5
|
import { flushSync as $e, createPortal as Ne } from "react-dom";
|
|
6
6
|
const E = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Te = E && "documentMode" in document ? document.documentMode : null, Be = !(!E || !("InputEvent" in window) || Te) && "getTargetRanges" in new window.InputEvent("input"), _e = E && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), z = E && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, We = E && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ae = E && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !We;
|
|
7
7
|
function I(n, t) {
|
|
@@ -187,9 +187,11 @@ function Ge({
|
|
|
187
187
|
const _ = d.current;
|
|
188
188
|
_ !== null && L(_, r);
|
|
189
189
|
}
|
|
190
|
-
}), f = o.registerRootListener(
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
}), f = o.registerRootListener(
|
|
191
|
+
(h, p) => {
|
|
192
|
+
p !== null && l.unobserve(p), h !== null && l.observe(h);
|
|
193
|
+
}
|
|
194
|
+
), C = () => {
|
|
193
195
|
const h = o.getRootElement(), p = d.current;
|
|
194
196
|
h !== null && p !== null && (r.rootElementRect = h.getBoundingClientRect(), L(p, r));
|
|
195
197
|
};
|
|
@@ -199,7 +201,10 @@ function Ge({
|
|
|
199
201
|
}, [o]), b(() => {
|
|
200
202
|
const r = d.current;
|
|
201
203
|
r !== null && setTimeout(() => {
|
|
202
|
-
r.style.setProperty(
|
|
204
|
+
r.style.setProperty(
|
|
205
|
+
"transition",
|
|
206
|
+
"top 0.3s ease 0s, left 0.3s ease 0s"
|
|
207
|
+
);
|
|
203
208
|
}, 500);
|
|
204
209
|
}, []);
|
|
205
210
|
const y = (r) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as p, a7 as k, m as E } from "./DSD.
|
|
1
|
+
import { a6 as p, a7 as k, m as E } from "./DSD.D5yIMAX4.js";
|
|
2
2
|
import { useRef as O, useContext as P, useMemo as D, useEffect as h } from "react";
|
|
3
3
|
import { jsx as _ } from "react/jsx-runtime";
|
|
4
4
|
function K(e) {
|