@layers-app/editor 0.0.6 → 0.0.8

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as C } from "react/jsx-runtime";
2
2
  import { useMemo as I, useState as D, useRef as S, useCallback as $, useEffect as R } from "react";
3
- import { b as V, a as j, w as P, R as x, C as k, l as b, N as E, k as w, K as v, e as B, r as y, B as A, m as T, n as W } from "./DSD.Beb77L-c.js";
3
+ import { b as V, a as j, w as P, R as x, C as k, l as b, N as E, k as w, K as v, e as B, r as y, B as A, m as T, n as W } from "./DSD.CSTfGzR0.js";
4
4
  function O(...t) {
5
5
  return t.filter(Boolean).join(" ");
6
6
  }
@@ -14,7 +14,7 @@ function L({
14
14
  totalVotes: a,
15
15
  withPollNode: p
16
16
  }) {
17
- const { clientID: r } = T(), _ = S(null), m = t.votes, f = m.indexOf(r) !== -1, i = m.length, h = t.text;
17
+ const { clientID: r } = W(), _ = S(null), m = t.votes, f = m.indexOf(r) !== -1, i = m.length, h = t.text;
18
18
  return /* @__PURE__ */ C("div", { className: "PollNode__optionContainer", children: [
19
19
  /* @__PURE__ */ o(
20
20
  "div",
@@ -136,7 +136,7 @@ function z({
136
136
  );
137
137
  }, u = () => {
138
138
  d((e) => {
139
- e.addOption(W());
139
+ e.addOption(T());
140
140
  });
141
141
  }, N = P(g) && r;
142
142
  return /* @__PURE__ */ o(
@@ -1,8 +1,8 @@
1
- import { a6 as p, a7 as k, m as E } from "./DSD.Beb77L-c.js";
1
+ import { a6 as p, a7 as k, n as E } from "./DSD.CSTfGzR0.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) {
5
- return e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
6
  }
7
7
  var C = K(function(e) {
8
8
  const t = new URLSearchParams();
@@ -19,18 +19,18 @@ function S({ initialEditor: e, children: t, initialNodes: o, initialTheme: g, sk
19
19
  i == null && C(9);
20
20
  const [l, { getTheme: w }] = i, x = D(() => {
21
21
  const a = g || w() || void 0, y = k(i, a);
22
- if (a !== void 0 && (e._config.theme = a), e._parentEditor = l, o) for (let r of o) {
23
- let s = null, n = null;
24
- if (typeof r != "function") {
25
- const d = r;
26
- r = d.replace, s = d.with, n = d.withKlass || null;
22
+ if (a !== void 0 && (e._config.theme = a), e._parentEditor = l, o) for (let n of o) {
23
+ let s = null, r = null;
24
+ if (typeof n != "function") {
25
+ const d = n;
26
+ n = d.replace, s = d.with, r = d.withKlass || null;
27
27
  }
28
- const u = e._nodes.get(r.getType());
29
- e._nodes.set(r.getType(), { exportDOM: u ? u.exportDOM : void 0, klass: r, replace: s, replaceWithKlass: n, transforms: m(r) });
28
+ const u = e._nodes.get(n.getType());
29
+ e._nodes.set(n.getType(), { exportDOM: u ? u.exportDOM : void 0, klass: n, replace: s, replaceWithKlass: r, transforms: m(n) });
30
30
  }
31
31
  else {
32
- const r = e._nodes = new Map(l._nodes);
33
- for (const [s, n] of r) e._nodes.set(s, { exportDOM: n.exportDOM, klass: n.klass, replace: n.replace, replaceWithKlass: n.replaceWithKlass, transforms: m(n.klass) });
32
+ const n = e._nodes = new Map(l._nodes);
33
+ for (const [s, r] of n) e._nodes.set(s, { exportDOM: r.exportDOM, klass: r.klass, replace: r.replace, replaceWithKlass: r.replaceWithKlass, transforms: m(r.klass) });
34
34
  }
35
35
  return e._config.namespace = l._config.namespace, e._editable = l._editable, [e, y];
36
36
  }, []), { isCollabActive: M, yjsDocMap: b } = E(), c = v || f.current || b.has(e.getKey());
@@ -1,7 +1,7 @@
1
1
  import { jsx as g, jsxs as $, Fragment as F } from "react/jsx-runtime";
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.Beb77L-c.js";
4
- import { d as xe, P as Pe } from "./DSD.B-5jBun5.js";
2
+ import { useState as U, useMemo as V, useLayoutEffect as Y, useEffect as b, Suspense as q, 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, n 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.CSTfGzR0.js";
4
+ import { d as xe, P as Pe } from "./DSD.jxt3R0iB.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) {
@@ -274,9 +274,9 @@ function Ge({
274
274
  /* @__PURE__ */ g(
275
275
  Oe,
276
276
  {
277
- contentEditable: /* @__PURE__ */ g(Re, { className: "StickyNode__contentEditable" }),
277
+ contentEditable: /* @__PURE__ */ g(Se, { className: "StickyNode__contentEditable" }),
278
278
  placeholder: /* @__PURE__ */ g(Pe, { className: "StickyNode__placeholder", children: "What's up?" }),
279
- ErrorBoundary: Se
279
+ ErrorBoundary: Re
280
280
  }
281
281
  )
282
282
  ] })