@levo-so/studio 0.3.6 → 0.3.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.
Files changed (59) hide show
  1. package/{BillingStep-DhK0Mkjr.js → BillingStep-vBBLXLzk.js} +1 -1
  2. package/{Button-Ho7QJuCT.js → Button-BZDul09m.js} +29 -32
  3. package/{CollectionField-CD6ok1A3.js → CollectionField-BZmxRB5D.js} +68 -68
  4. package/DateTimeWidget-Bt1UcCnx.js +255 -0
  5. package/{Dialog-IrII0ugb.js → Dialog-CPE8yUqK.js} +10 -10
  6. package/{EntryCard-BfwGbFzQ.js → EntryCard-DLPs2PaP.js} +4 -4
  7. package/{KBChatWidget-0dtBwnDA.js → KBChatWidget-B-SNBtoX.js} +1 -1
  8. package/{LoginCard-CMeVif-w.js → LoginCard-EtzpuqYB.js} +3 -3
  9. package/{LoginForm-DhGQD4uI.js → LoginForm-kI_b_7Tc.js} +2 -2
  10. package/{LoginModal-Ui2GnSje.js → LoginModal-C-9BhmoO.js} +4 -4
  11. package/{MessageCard-CJltLT2a.js → MessageCard-Nsxr98n6.js} +2 -2
  12. package/{MessageFooter-CrhrI-su.js → MessageFooter-K4Zd_eFO.js} +2 -2
  13. package/{ModalManager-BW3Dol7F.js → ModalManager-CzH36UIk.js} +1 -1
  14. package/{PendingApprovalCard-BlyH59Vy.js → PendingApprovalCard-CCbhY8p3.js} +3 -3
  15. package/{PhoneWidget-BQEfbyV4.js → PhoneWidget-BkzFjfKW.js} +9 -9
  16. package/{Popover-V2O1gz6N.js → Popover-Iis-qOn1.js} +1 -1
  17. package/PopupBody-DZVwDLkg-PiECxgmc.js +171 -0
  18. package/PopupRenderer-BjW1jg70-C1UDgSfJ.js +388 -0
  19. package/{ProfileCard-DFgmQMUO.js → ProfileCard-DzEBPrax.js} +5 -5
  20. package/{RichTextWidget-CStx2PMn.js → RichTextWidget-C3Y-0pNy.js} +181 -181
  21. package/{RteThemeProvider-DxYOzcck.js → RteThemeProvider-owl5oajj.js} +4 -4
  22. package/{Spinner-HCqR1eGW.js → Spinner-D5spB_Mv.js} +1 -1
  23. package/{StripePaymentModal-Cw-AlxTS.js → StripePaymentModal-CiKqmQwK.js} +1 -1
  24. package/{Button-lUfKisu8.js → ThemeProvider-CqPHzkW9.js} +58 -58
  25. package/{Tooltip-DTnCNEcE.js → Tooltip-DHU1QD-n.js} +1 -1
  26. package/{VerifyButton-kdxRhJWI.js → VerifyButton-BwTbzSwS.js} +21 -21
  27. package/{bookingCard-DUMPxFp4.js → bookingCard-kEYdGZJ-.js} +5 -5
  28. package/collection.d.ts +171 -0
  29. package/collection.js +2 -0
  30. package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-C0PSYy0J.js} +2 -2
  31. package/{dialog-RrTP-MGm.js → dialog-8LH_ihs4.js} +1 -1
  32. package/dist-2bXx8eVI.js +3657 -0
  33. package/{PopupRenderer-DBKtkdmH-Ws7F9GmP.js → fontSize-B-ba6pvx.js} +17 -750
  34. package/{inlineCollectionTheme-D2w17LHX.js → generateRadiusScale-RROt8ppa.js} +4 -19
  35. package/index.js +3921 -3918
  36. package/inlineCollectionTheme-uhBXoF1F.js +19 -0
  37. package/{nodeAlignment-DS9_DLGB.js → inlineRteTheme-BOAno9MG.js} +16 -19
  38. package/{kbChat-BuTZ4Ytf.js → kbChat-zJcrfsqJ.js} +2 -2
  39. package/package.json +9 -5
  40. package/popupState-JmpeKzgM-UECLsSbL.js +100 -0
  41. package/rteTheme.cssm-W4gTOijw.js +4 -0
  42. package/studio.css +1 -1
  43. package/theme.cssm-Czj9sF4X.js +4 -0
  44. package/themeMapping-Bi9Rcr5G-C7UXWE6o.js +61 -0
  45. package/{useLogin-BhysESLW.js → useLogin-CfnGrLdO.js} +1 -1
  46. package/usePopupRedirect-BThP_YPW-jXtfhYu6.js +80 -0
  47. package/DateTimeWidget-DHUmirf1.js +0 -255
  48. package/dist-Ckw19x6H.js +0 -3639
  49. package/rolldown-runtime-CAFD8bLK.js +0 -11
  50. /package/{AuthProvider-CFQqiIf1.js → AuthProvider-B5NfFwbG.js} +0 -0
  51. /package/{Beams-DVEhileN.js → Beams-WJN38XSv.js} +0 -0
  52. /package/{Dots-vp0H1Md3.js → Dots-DggLz5I7.js} +0 -0
  53. /package/{Gradient-_5G8Qm5s.js → Gradient-BSWJAu0a.js} +0 -0
  54. /package/{Grid-D694XUrO.js → Grid-BFKl0MUt.js} +0 -0
  55. /package/{Waves-DeNoq6Bo.js → Waves-BPEgTYoO.js} +0 -0
  56. /package/{authentication-TdyaDNTn.js → authentication-BXQbxiPP.js} +0 -0
  57. /package/{card-Cb4m0p4i.js → card-5ooLmYSr.js} +0 -0
  58. /package/{cn-BL52QQS4.js → cn-B6c1DjO_.js} +0 -0
  59. /package/{pillChrome-CrJ9a5vj.js → pillChrome-CYoMtUAv.js} +0 -0
@@ -0,0 +1,19 @@
1
+ import { t as e } from "./createThemeExtension-C0PSYy0J.js";
2
+ //#region ../../libraries/react-collection/dist/theme/collectionThemeVars.cssm.js
3
+ var t = {
4
+ form: {
5
+ maxWidth: "var(--_1092q7b0)",
6
+ gap: "var(--_1092q7b1)",
7
+ borderRadius: "var(--_1092q7b2)",
8
+ labelFontSize: "var(--_1092q7b3)",
9
+ helpFontSize: "var(--_1092q7b4)"
10
+ },
11
+ input: {
12
+ fontSize: "var(--_1092q7b5)",
13
+ height: "var(--_1092q7b6)",
14
+ borderRadius: "var(--_1092q7b7)"
15
+ },
16
+ checkbox: { labelFontSize: "var(--_1092q7b8)" }
17
+ }, n = e(t);
18
+ //#endregion
19
+ export { t as n, n as t };
@@ -1,16 +1,9 @@
1
- import { n as e } from "./theme.cssm-2YTdd8Yh.js";
1
+ import { t as e } from "./createThemeExtension-C0PSYy0J.js";
2
2
  import { Extension as t, findParentNodeClosestToPos as n } from "@tiptap/core";
3
3
  import { NodeSelection as r } from "@tiptap/pm/state";
4
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 = "u2k86a0", c = e({
7
- baseSpacing: "var(--_1q6hy0o0)",
8
- highlight: "var(--_1q6hy0o1)",
9
- highlightForeground: "var(--_1q6hy0o2)"
10
- });
11
- //#endregion
12
5
  //#region ../../libraries/editor-core/dist/utils/getSelectedNodeOfType.js
13
- function l(e, t) {
6
+ function o(e, t) {
14
7
  let o = [], s = new Set(t);
15
8
  if (e instanceof i) return e.forEachCell((e, t) => {
16
9
  s.has(e.type.name) && o.push({
@@ -41,7 +34,7 @@ function l(e, t) {
41
34
  }
42
35
  //#endregion
43
36
  //#region ../../libraries/editor-core/dist/utils/updateNodesAttr.js
44
- function u(e, t, n, r) {
37
+ function s(e, t, n, r) {
45
38
  if (!t.length) return !1;
46
39
  let i = !1;
47
40
  for (let { pos: a } of t) {
@@ -56,12 +49,12 @@ function u(e, t, n, r) {
56
49
  }
57
50
  //#endregion
58
51
  //#region ../../libraries/editor-core/dist/extensions/nodeStyling/nodeAlignment.js
59
- function d(e, t, n) {
52
+ function c(e, t, n) {
60
53
  if (e.length === 0) return null;
61
54
  for (let r of e) if ((r.node.attrs?.[t] ?? null) !== n) return n;
62
55
  return null;
63
56
  }
64
- var f = t.create({
57
+ var l = t.create({
65
58
  name: "textAlign",
66
59
  addOptions() {
67
60
  return {
@@ -122,18 +115,18 @@ var f = t.create({
122
115
  },
123
116
  addCommands() {
124
117
  let e = (e, t) => (n) => ({ state: r, tr: i }) => {
125
- let a = l(r.selection, this.options.types);
126
- return a.length === 0 ? !1 : u(i, a, e, t(a, n));
118
+ let a = o(r.selection, this.options.types);
119
+ return a.length === 0 ? !1 : s(i, a, e, t(a, n));
127
120
  };
128
121
  return {
129
122
  setNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : t),
130
123
  unsetNodeTextAlign: e("textAlign", () => null),
131
- toggleNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : d(e, "textAlign", t)),
124
+ toggleNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : c(e, "textAlign", t)),
132
125
  setNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : t),
133
126
  unsetNodeVAlign: e("nodeVerticalAlign", () => null),
134
- toggleNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : d(e, "nodeVerticalAlign", t)),
127
+ toggleNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : c(e, "nodeVerticalAlign", t)),
135
128
  setNodeAlignment: (e, t) => ({ state: n, tr: r }) => {
136
- let i = l(n.selection, this.options.types);
129
+ let i = o(n.selection, this.options.types);
137
130
  if (i.length === 0) return !1;
138
131
  let a = !1;
139
132
  for (let { node: n, pos: o } of i) {
@@ -143,7 +136,7 @@ var f = t.create({
143
136
  return a;
144
137
  },
145
138
  unsetNodeAlignment: () => ({ state: e, tr: t }) => {
146
- let n = l(e.selection, this.options.types);
139
+ let n = o(e.selection, this.options.types);
147
140
  if (n.length === 0) return !1;
148
141
  let r = !1;
149
142
  for (let { node: e, pos: i } of n) {
@@ -161,6 +154,10 @@ var f = t.create({
161
154
  }
162
155
  };
163
156
  }
157
+ }), u = "_12oclrg0", d = e({
158
+ baseSpacing: "var(--_1q6hy0o0)",
159
+ highlight: "var(--_1q6hy0o1)",
160
+ highlightForeground: "var(--_1q6hy0o2)"
164
161
  });
165
162
  //#endregion
166
- export { s as a, c as i, u as n, o, l as r, f as t };
163
+ export { o as a, s as i, u as n, l as r, d as t };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as e, c as t, f as n, h as r, l as i, m as a, n as o, o as s, p as c, r as l, t as u, u as d, y as f } from "./pillChrome-CrJ9a5vj.js";
2
+ import { a as e, c as t, f as n, h as r, l as i, m as a, n as o, o as s, p as c, r as l, t as u, u as d, y as f } from "./pillChrome-CYoMtUAv.js";
3
3
  import { useEffect as p, useRef as m, useState as h } from "react";
4
4
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
5
5
  import { ArrowUp as v, Sparkles as y } from "lucide-react";
@@ -64,7 +64,7 @@ var b = (e) => f("active_agent", e), x = (e) => {
64
64
  e,
65
65
  r
66
66
  ]), i;
67
- }, w = (...e) => e.filter(Boolean).join(" "), T = () => import("./KBChatWidget-0dtBwnDA.js"), E = (e) => {
67
+ }, w = (...e) => e.filter(Boolean).join(" "), T = () => import("./KBChatWidget-B-SNBtoX.js"), E = (e) => {
68
68
  let [t, n] = h(null), [r, i] = h(!1), [a, o] = h("");
69
69
  return t ? /* @__PURE__ */ g(t, {
70
70
  initialOpen: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/studio",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo Studio components and utilities for building block-based pages",
6
6
  "type": "module",
@@ -18,7 +18,11 @@
18
18
  "types": "./index.d.ts",
19
19
  "default": "./index.js"
20
20
  },
21
- "./setup.css": "./studio.css"
21
+ "./setup.css": "./studio.css",
22
+ "./collection": {
23
+ "types": "./collection.d.ts",
24
+ "default": "./collection.js"
25
+ }
22
26
  },
23
27
  "files": [
24
28
  "**/*",
@@ -119,8 +123,8 @@
119
123
  "react": ">=19",
120
124
  "next": ">=14",
121
125
  "react-dom": ">=19",
122
- "@levo-so/insights": "0.2.1",
123
- "@levo-so/react": "0.2.1",
124
- "@levo-so/core": "0.2.1"
126
+ "@levo-so/insights": "0.3.8",
127
+ "@levo-so/core": "0.3.8",
128
+ "@levo-so/react": "0.3.8"
125
129
  }
126
130
  }
@@ -0,0 +1,100 @@
1
+ import { persistentAtom as e } from "@nanostores/persistent";
2
+ import { atom as t, computed as n } from "nanostores";
3
+ //#region ../../libraries/popups/dist/popupState-JmpeKzgM.js
4
+ var r = 6e4, i = "lv_popups_session", a = {
5
+ active_popup_id: null,
6
+ shown_popup_ids: [],
7
+ last_closed_at: null
8
+ }, o = e("lv_popups_state", {}, {
9
+ encode: JSON.stringify,
10
+ decode: JSON.parse
11
+ }), s = (e) => {
12
+ if (!e) return a;
13
+ try {
14
+ return {
15
+ ...JSON.parse(e),
16
+ active_popup_id: null
17
+ };
18
+ } catch {
19
+ return a;
20
+ }
21
+ }, c = t((() => {
22
+ if (typeof sessionStorage > "u") return a;
23
+ try {
24
+ return s(sessionStorage.getItem(i));
25
+ } catch {
26
+ return a;
27
+ }
28
+ })()), l = c.set;
29
+ c.set = (e) => {
30
+ l(e);
31
+ try {
32
+ sessionStorage.setItem(i, JSON.stringify(e));
33
+ } catch {}
34
+ };
35
+ var u = n([c, o], (e, t) => ({
36
+ active_popup_id: e.active_popup_id,
37
+ shown_popup_ids: e.shown_popup_ids,
38
+ last_closed_at: e.last_closed_at,
39
+ previous_popups: t
40
+ })), d = t([]), f = (e) => {
41
+ d.set(e);
42
+ }, p = t(!0), m = (e) => {
43
+ p.set(e);
44
+ }, h = () => u.get(), g = (e, t) => e.includes(t) ? e : [...e, t], _ = "manual", v = () => _, y = null, b = () => y, x = [], S = null, C = () => {
45
+ if (S) return;
46
+ let { last_closed_at: e } = c.get();
47
+ if (!e) return;
48
+ let t = r - (Date.now() - e);
49
+ if (t <= 0) {
50
+ w();
51
+ return;
52
+ }
53
+ S = setTimeout(() => {
54
+ S = null, w();
55
+ }, t);
56
+ }, w = () => {
57
+ let e = c.get();
58
+ if (!e.active_popup_id) {
59
+ if (e.last_closed_at && Date.now() - e.last_closed_at < 6e4) {
60
+ C();
61
+ return;
62
+ }
63
+ for (; x.length > 0;) {
64
+ let e = x.shift();
65
+ if (D(e.popup, { trigger_type: e.trigger_type })) return;
66
+ }
67
+ }
68
+ }, T = (e, t) => {
69
+ x.some((t) => t.popup.id === e.id) || (x.push({
70
+ popup: e,
71
+ trigger_type: t
72
+ }), C());
73
+ }, E = (e, t) => {
74
+ let n = h();
75
+ if (t?.type === "always") return !n.shown_popup_ids.includes(e);
76
+ let r = n.previous_popups[e];
77
+ return r ? !t || t.type === "once" ? !1 : t.type === "interval" && t.interval_ms ? Date.now() - r.triggered_at >= t.interval_ms : !0 : !0;
78
+ }, D = (e, t = {}) => {
79
+ let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, s = c.get();
80
+ return s.active_popup_id === i ? !0 : !n && (s.active_popup_id || s.last_closed_at && Date.now() - s.last_closed_at < 6e4 || !E(i, a)) ? !1 : (S &&= (clearTimeout(S), null), _ = r, y = Date.now(), c.set({
81
+ active_popup_id: i,
82
+ shown_popup_ids: g(s.shown_popup_ids, i),
83
+ last_closed_at: s.last_closed_at
84
+ }), a?.type !== "always" && o.set({
85
+ ...o.get(),
86
+ [i]: { triggered_at: Date.now() }
87
+ }), !0);
88
+ }, O = (e, t = {}) => {
89
+ let { trigger_type: n = "manual" } = t;
90
+ return D(e, { trigger_type: n }) ? !0 : (E(e.id, e.settings?.display_frequency) && T(e, n), !1);
91
+ }, k = (e) => {
92
+ let t = c.get();
93
+ t.active_popup_id === e && (_ = "manual", y = null, c.set({
94
+ ...t,
95
+ active_popup_id: null,
96
+ last_closed_at: Date.now()
97
+ }), setTimeout(w, 0));
98
+ };
99
+ //#endregion
100
+ export { d as a, k as c, u as d, v as f, c as i, m as l, O as n, f as o, b as r, h as s, D as t, p as u };
@@ -0,0 +1,4 @@
1
+ //#region ../../libraries/editor-core/dist/styles/rteTheme.cssm.js
2
+ var e = "u2k86a0";
3
+ //#endregion
4
+ export { e as t };