@levo-so/site-runtime 0.3.8 → 0.3.10

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.
Files changed (33) hide show
  1. package/{DateTimeWidget-hFjcn3o6.js → DateTimeWidget-U3lD0q1q.js} +1 -1
  2. package/{KBChatWidget-ClHFDgJ5.js → KBChatWidget-ByOwQQNg.js} +404 -397
  3. package/PopupBody-BI-MJqmd-DW3qWKam.js +159 -0
  4. package/PopupRenderer-D66Gx63H-BnOmWsyj.js +388 -0
  5. package/RichTextWidget-DfakML79.js +749 -0
  6. package/RteThemeProvider-BQmfSXSl.js +20 -0
  7. package/{nodeAlignment-BnJljFlw.js → content.cssm-XdMsTGIB.js} +24 -32
  8. package/{dist-CRDgdAkQ.js → dist-BdNHqoWi.js} +498 -466
  9. package/{dist-DPmVG7VB.js → dist-Cl_sKk9y.js} +3 -3
  10. package/index.d.ts +539 -9
  11. package/index.js +998 -798
  12. package/inlineRteTheme-CRPtkNXy.js +10 -0
  13. package/{kbChat-C00LVlxP.js → kbChat-GBcfFoss.js} +15 -15
  14. package/package.json +41 -27
  15. package/pillChrome-_hpGdrBS.js +50 -0
  16. package/popups.js +1 -1
  17. package/{PopupBody-DZVwDLkg-Cfy3lWGs.js → react-Cj_U6VZQ.js} +816 -850
  18. package/rich-text.d.ts +25 -0
  19. package/rich-text.js +1644 -0
  20. package/routes-CyKmkoRM.js +316 -0
  21. package/start.d.ts +38 -0
  22. package/start.js +19 -0
  23. package/styles.css +1 -1
  24. package/{usePopupRedirect-BThP_YPW-COUseDik.js → usePopupRedirect-CAAdcpaW-Ddjyf4KK.js} +15 -13
  25. package/PopupRenderer-BjW1jg70-W2y-PEPH.js +0 -387
  26. package/RichTextWidget-DkKHEq4j.js +0 -759
  27. package/pillChrome-BAu5AfCT.js +0 -30
  28. /package/{PhoneWidget-BmBO-kvA.js → PhoneWidget-DQQa4bL6.js} +0 -0
  29. /package/{Popover-3N88sRp4.js → Popover-C29yJ7rz.js} +0 -0
  30. /package/{es-CztjLuNy.js → es-ByBbirnH.js} +0 -0
  31. /package/{popupState-JmpeKzgM-qhNTV79U.js → popupState-JmpeKzgM-D_77LiAa.js} +0 -0
  32. /package/{react-CV3jf2mc.js → react-B9yvlbH0.js} +0 -0
  33. /package/{rteTheme.cssm-xg0gJ28J.js → rteTheme.cssm-W4gTOijw.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import { n as e } from "./ThemeProvider-DutrjSTF.js";
2
+ import { t } from "./theme.cssm-DUzmx76l.js";
3
+ import { t as n } from "./rteTheme.cssm-W4gTOijw.js";
4
+ import { c as r } from "react/compiler-runtime";
5
+ import i from "clsx";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ //#region ../../libraries/editor-core/dist/theme/RteThemeProvider.js
8
+ var o = (o) => {
9
+ let s = r(7), { children: c, theme: l } = o, u = l?.className, d;
10
+ s[0] === u ? d = s[1] : (d = i(t, n, u), s[0] = u, s[1] = d);
11
+ let f = l?.style, p = l?.portalToThemeRoot, m;
12
+ return s[2] !== c || s[3] !== d || s[4] !== f || s[5] !== p ? (m = /* @__PURE__ */ a(e, {
13
+ className: d,
14
+ style: f,
15
+ portalToThemeRoot: p,
16
+ children: c
17
+ }), s[2] = c, s[3] = d, s[4] = f, s[5] = p, s[6] = m) : m = s[6], m;
18
+ };
19
+ //#endregion
20
+ export { o as t };
@@ -1,31 +1,23 @@
1
- import { t as e } from "./createThemeExtension-4AUn51iJ.js";
2
- import { Extension as t, findParentNodeClosestToPos as n } from "@tiptap/core";
3
- import { NodeSelection as r } from "@tiptap/pm/state";
4
- import { CellSelection as i, cellAround as a } from "@tiptap/pm/tables";
5
- //#region ../../libraries/editor-core/dist/styles/content.cssm.js
6
- var o = "_12oclrg0", s = e({
7
- baseSpacing: "var(--_1q6hy0o0)",
8
- highlight: "var(--_1q6hy0o1)",
9
- highlightForeground: "var(--_1q6hy0o2)"
10
- });
11
- //#endregion
1
+ import { Extension as e, findParentNodeClosestToPos as t } from "@tiptap/core";
2
+ import { NodeSelection as n } from "@tiptap/pm/state";
3
+ import { CellSelection as r, cellAround as i } from "@tiptap/pm/tables";
12
4
  //#region ../../libraries/editor-core/dist/utils/getSelectedNodeOfType.js
13
- function c(e, t) {
14
- let o = [], s = new Set(t);
15
- if (e instanceof i) return e.forEachCell((e, t) => {
5
+ function a(e, a) {
6
+ let o = [], s = new Set(a);
7
+ if (e instanceof r) return e.forEachCell((e, t) => {
16
8
  s.has(e.type.name) && o.push({
17
9
  node: e,
18
10
  pos: t
19
11
  });
20
12
  }), o;
21
- if (e instanceof r) {
13
+ if (e instanceof n) {
22
14
  let { node: t, from: n } = e;
23
15
  return t && s.has(t.type.name) && o.push({
24
16
  node: t,
25
17
  pos: n
26
18
  }), o;
27
19
  }
28
- let { $anchor: c } = e, l = a(c);
20
+ let { $anchor: c } = e, l = i(c);
29
21
  if (l) {
30
22
  let t = e.$anchor.doc.nodeAt(l.pos);
31
23
  if (t && s.has(t.type.name)) return o.push({
@@ -33,7 +25,7 @@ function c(e, t) {
33
25
  pos: l.pos
34
26
  }), o;
35
27
  }
36
- let u = n(c, (e) => s.has(e.type.name));
28
+ let u = t(c, (e) => s.has(e.type.name));
37
29
  return u && o.push({
38
30
  node: u.node,
39
31
  pos: u.pos
@@ -41,7 +33,7 @@ function c(e, t) {
41
33
  }
42
34
  //#endregion
43
35
  //#region ../../libraries/editor-core/dist/utils/updateNodesAttr.js
44
- function l(e, t, n, r) {
36
+ function o(e, t, n, r) {
45
37
  if (!t.length) return !1;
46
38
  let i = !1;
47
39
  for (let { pos: a } of t) {
@@ -56,12 +48,12 @@ function l(e, t, n, r) {
56
48
  }
57
49
  //#endregion
58
50
  //#region ../../libraries/editor-core/dist/extensions/nodeStyling/nodeAlignment.js
59
- function u(e, t, n) {
51
+ function s(e, t, n) {
60
52
  if (e.length === 0) return null;
61
53
  for (let r of e) if ((r.node.attrs?.[t] ?? null) !== n) return n;
62
54
  return null;
63
55
  }
64
- var d = t.create({
56
+ var c = e.create({
65
57
  name: "textAlign",
66
58
  addOptions() {
67
59
  return {
@@ -122,28 +114,28 @@ var d = t.create({
122
114
  },
123
115
  addCommands() {
124
116
  let e = (e, t) => (n) => ({ state: r, tr: i }) => {
125
- let a = c(r.selection, this.options.types);
126
- return a.length === 0 ? !1 : l(i, a, e, t(a, n));
117
+ let s = a(r.selection, this.options.types);
118
+ return s.length === 0 ? !1 : o(i, s, e, t(s, n));
127
119
  };
128
120
  return {
129
121
  setNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : t),
130
122
  unsetNodeTextAlign: e("textAlign", () => null),
131
- toggleNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : u(e, "textAlign", t)),
123
+ toggleNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : s(e, "textAlign", t)),
132
124
  setNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : t),
133
125
  unsetNodeVAlign: e("nodeVerticalAlign", () => null),
134
- toggleNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : u(e, "nodeVerticalAlign", t)),
126
+ toggleNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : s(e, "nodeVerticalAlign", t)),
135
127
  setNodeAlignment: (e, t) => ({ state: n, tr: r }) => {
136
- let i = c(n.selection, this.options.types);
128
+ let i = a(n.selection, this.options.types);
137
129
  if (i.length === 0) return !1;
138
- let a = !1;
139
- for (let { node: n, pos: o } of i) {
130
+ let o = !1;
131
+ for (let { node: n, pos: a } of i) {
140
132
  let i = { ...n.attrs };
141
- e && this.options.textAlignValues.includes(e) && (i.textAlign = e, a = !0), t && this.options.verticalAlignValues.includes(t) && (i.nodeVerticalAlign = t, a = !0), a && r.setNodeMarkup(o, void 0, i);
133
+ e && this.options.textAlignValues.includes(e) && (i.textAlign = e, o = !0), t && this.options.verticalAlignValues.includes(t) && (i.nodeVerticalAlign = t, o = !0), o && r.setNodeMarkup(a, void 0, i);
142
134
  }
143
- return a;
135
+ return o;
144
136
  },
145
137
  unsetNodeAlignment: () => ({ state: e, tr: t }) => {
146
- let n = c(e.selection, this.options.types);
138
+ let n = a(e.selection, this.options.types);
147
139
  if (n.length === 0) return !1;
148
140
  let r = !1;
149
141
  for (let { node: e, pos: i } of n) {
@@ -161,6 +153,6 @@ var d = t.create({
161
153
  }
162
154
  };
163
155
  }
164
- });
156
+ }), l = "_12oclrg0";
165
157
  //#endregion
166
- export { s as n, o as r, d as t };
158
+ export { a as i, c as n, o as r, l as t };