@levo-so/site-runtime 0.3.7 → 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 (37) hide show
  1. package/CollectionField-C-6a1ud4.js +270 -0
  2. package/{CollectionInput-B1qV4QEH.js → CollectionInput-BJ__qcbk.js} +40 -40
  3. package/DateTimeWidget-hFjcn3o6.js +255 -0
  4. package/{Dialog-DVB4WpBS.js → Dialog-dT7y641z.js} +43 -43
  5. package/{KBChatWidget-Cnq0DCOQ.js → KBChatWidget-ClHFDgJ5.js} +236 -236
  6. package/{LevoProvider-nmIbMlsk.js → LevoProvider-Bsjkcwc8.js} +8 -8
  7. package/PhoneWidget-BmBO-kvA.js +99 -0
  8. package/{Popover-C7zZHBIc.js → Popover-3N88sRp4.js} +20 -20
  9. package/{PopupBody-DZVwDLkg-yrot8Uqb.js → PopupBody-DZVwDLkg-Cfy3lWGs.js} +33 -33
  10. package/{PopupRenderer-BjW1jg70-Biwj2bIc.js → PopupRenderer-BjW1jg70-W2y-PEPH.js} +81 -81
  11. package/{RichTextWidget-BOrVIR2j.js → RichTextWidget-DkKHEq4j.js} +139 -139
  12. package/ThemeProvider-DutrjSTF.js +116 -0
  13. package/{Tooltip-BIgrpetu.js → Tooltip-CQB0LyxK.js} +20 -20
  14. package/{VerifyButton-CA1GtEZJ.js → VerifyButton-BUT70lgz.js} +65 -65
  15. package/dist-CRDgdAkQ.js +3631 -0
  16. package/{dist-Cb6sb7nO.js → dist-DPmVG7VB.js} +13 -13
  17. package/index.d.ts +560 -3
  18. package/index.js +1203 -713
  19. package/inlineBaseTheme-BB9e6h5f.js +9 -0
  20. package/{inlineCollectionTheme-DYYMrmcE.js → inlineCollectionTheme-CWcMCUti.js} +1 -1
  21. package/{kbChat-DIb4AS7E.js → kbChat-C00LVlxP.js} +27 -27
  22. package/{nodeAlignment-D70kOcui.js → nodeAlignment-BnJljFlw.js} +1 -1
  23. package/package.json +3 -3
  24. package/popups.js +1 -1
  25. package/{react-6kO0cqgr.js → react-CV3jf2mc.js} +1 -1
  26. package/styles.css +1 -1
  27. package/{generateRadiusScale-54mE9ikx.js → themeVars.cssm-ByhhC2Jm.js} +17 -17
  28. package/usePopupRedirect-BThP_YPW-COUseDik.js +80 -0
  29. package/CollectionField-C59pmeQw.js +0 -270
  30. package/DateTimeWidget-Cctsvcrs.js +0 -255
  31. package/PhoneWidget-J3VTMWJH.js +0 -99
  32. package/ThemeProvider-BQmIB5tr.js +0 -116
  33. package/dist-C8gLeklT.js +0 -3559
  34. package/inlineBaseTheme-B6E9zzyp.js +0 -9
  35. package/usePopupRedirect-BThP_YPW-DoixMAB9.js +0 -80
  36. /package/{createThemeExtension-DhGk81nV.js → createThemeExtension-4AUn51iJ.js} +0 -0
  37. /package/{theme.cssm-mkQwezuj.js → theme.cssm-DUzmx76l.js} +0 -0
@@ -0,0 +1,9 @@
1
+ import { t as e } from "./createThemeExtension-4AUn51iJ.js";
2
+ import { n as t, t as n } from "./themeVars.cssm-ByhhC2Jm.js";
3
+ //#region ../../libraries/levocn/dist/styles/inlineBaseTheme.js
4
+ var r = e(n), i = (e) => e ? e.radius && !e.radiusScale ? r({
5
+ ...e,
6
+ radiusScale: t(e.radius)
7
+ }) : r(e) : {};
8
+ //#endregion
9
+ export { i as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createThemeExtension-DhGk81nV.js";
1
+ import { t as e } from "./createThemeExtension-4AUn51iJ.js";
2
2
  //#region ../../libraries/react-collection/dist/theme/collectionThemeVars.cssm.js
3
3
  var t = {
4
4
  form: {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
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-BAu5AfCT.js";
3
- import { useEffect as p, useRef as m, useState as h } from "react";
4
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
3
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
4
+ import { useEffect as h, useRef as g, useState as _ } from "react";
5
5
  import { ArrowUp as v, Sparkles as y } from "lucide-react";
6
6
  //#region ../../libraries/ai-chat/src/useActiveAgent.ts
7
7
  var b = (e) => f("active_agent", e), x = (e) => {
@@ -21,16 +21,16 @@ var b = (e) => f("active_agent", e), x = (e) => {
21
21
  t === null ? window.sessionStorage.removeItem(n) : window.sessionStorage.setItem(n, JSON.stringify(t));
22
22
  } catch {}
23
23
  }, C = ({ url: e, workspaceId: t, headers: n, path: r }) => {
24
- let [i, a] = h({ status: "loading" });
25
- p(() => {
24
+ let [i, a] = _({ status: "loading" });
25
+ h(() => {
26
26
  let e = x(t);
27
27
  a(e ? {
28
28
  status: "ready",
29
29
  agent: e
30
30
  } : (e) => e.status === "ready" ? { status: "loading" } : e);
31
31
  }, [t]);
32
- let o = m(n);
33
- return o.current = n, p(() => {
32
+ let o = g(n);
33
+ return o.current = n, h(() => {
34
34
  if (!t || !e) return;
35
35
  let n = r ? `${e}${e.includes("?") ? "&" : "?"}path=${encodeURIComponent(r)}` : e, i = new AbortController();
36
36
  return (async () => {
@@ -64,13 +64,13 @@ 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-Cnq0DCOQ.js"), E = (e) => {
68
- let [t, n] = h(null), [r, i] = h(!1), [a, o] = h("");
69
- return t ? /* @__PURE__ */ g(t, {
67
+ }, w = (...e) => e.filter(Boolean).join(" "), T = () => import("./KBChatWidget-ClHFDgJ5.js"), E = (e) => {
68
+ let [t, n] = _(null), [r, i] = _(!1), [a, o] = _("");
69
+ return t ? /* @__PURE__ */ p(t, {
70
70
  initialOpen: !0,
71
71
  initialDraft: a,
72
72
  ...e
73
- }) : /* @__PURE__ */ g(O, {
73
+ }) : /* @__PURE__ */ p(O, {
74
74
  siteName: e.siteName,
75
75
  draft: a,
76
76
  loading: r,
@@ -84,38 +84,38 @@ var b = (e) => f("active_agent", e), x = (e) => {
84
84
  T().catch(() => {});
85
85
  }
86
86
  });
87
- }, D = () => /* @__PURE__ */ g("span", {
87
+ }, D = () => /* @__PURE__ */ p("span", {
88
88
  "aria-hidden": !0,
89
89
  className: "h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent"
90
- }), O = ({ siteName: f, draft: p, loading: b, onDraftChange: x, onActivate: S, onPrefetch: C }) => {
91
- let T = m(null), E = m(null), O = r(f), [k, A] = h(!1);
92
- return /* @__PURE__ */ g("div", {
90
+ }), O = ({ siteName: f, draft: h, loading: b, onDraftChange: x, onActivate: S, onPrefetch: C }) => {
91
+ let T = g(null), E = g(null), O = r(f), [k, A] = _(!1);
92
+ return /* @__PURE__ */ p("div", {
93
93
  onPointerEnter: C,
94
94
  className: w("ai-chat-launcher fixed bottom-8 left-1/2 z-[60] -translate-x-1/2", c),
95
- children: /* @__PURE__ */ g("div", {
95
+ children: /* @__PURE__ */ p("div", {
96
96
  className: w(o, t, "ai-chat-intro-morph"),
97
- children: /* @__PURE__ */ _("div", {
97
+ children: /* @__PURE__ */ m("div", {
98
98
  ref: E,
99
99
  className: w(d, k && "ai-chat-pill-surface--stacked"),
100
100
  children: [
101
- /* @__PURE__ */ g("button", {
101
+ /* @__PURE__ */ p("button", {
102
102
  type: "button",
103
103
  onClick: S,
104
104
  onFocus: C,
105
105
  "aria-label": "Open AI chat",
106
106
  className: i,
107
- children: b ? /* @__PURE__ */ g(D, {}) : /* @__PURE__ */ g(y, { className: "h-5 w-5" })
107
+ children: b ? /* @__PURE__ */ p(D, {}) : /* @__PURE__ */ p(y, { className: "h-5 w-5" })
108
108
  }),
109
- /* @__PURE__ */ _("div", {
109
+ /* @__PURE__ */ m("div", {
110
110
  className: l,
111
- children: [/* @__PURE__ */ g("textarea", {
111
+ children: [/* @__PURE__ */ p("textarea", {
112
112
  ref: T,
113
113
  rows: 1,
114
114
  autoComplete: "off",
115
115
  autoCorrect: "off",
116
116
  autoCapitalize: "none",
117
117
  inputMode: "text",
118
- value: p,
118
+ value: h,
119
119
  "aria-label": O,
120
120
  onFocus: S,
121
121
  onChange: (e) => {
@@ -123,21 +123,21 @@ var b = (e) => f("active_agent", e), x = (e) => {
123
123
  x(t.value), E.current && A(a(E.current, t));
124
124
  },
125
125
  className: n
126
- }), !p && /* @__PURE__ */ g("span", {
126
+ }), !h && /* @__PURE__ */ p("span", {
127
127
  className: w("ai-chat-pill-label pointer-events-none absolute inset-y-0 left-0 flex max-w-full items-center truncate bg-clip-text font-semibold text-[15px] text-transparent", "ai-chat-intro-label"),
128
128
  "aria-hidden": !0,
129
129
  children: O
130
130
  })]
131
131
  }),
132
- /* @__PURE__ */ g("div", {
132
+ /* @__PURE__ */ p("div", {
133
133
  className: u,
134
- children: /* @__PURE__ */ g("button", {
134
+ children: /* @__PURE__ */ p("button", {
135
135
  type: "button",
136
136
  onClick: S,
137
137
  "aria-label": "Open AI chat",
138
138
  className: e,
139
139
  style: s,
140
- children: b ? /* @__PURE__ */ g(D, {}) : /* @__PURE__ */ g(v, { className: "h-5 w-5 stroke-[2.5px]" })
140
+ children: b ? /* @__PURE__ */ p(D, {}) : /* @__PURE__ */ p(v, { className: "h-5 w-5 stroke-[2.5px]" })
141
141
  })
142
142
  })
143
143
  ]
@@ -154,9 +154,9 @@ var b = (e) => f("active_agent", e), x = (e) => {
154
154
  } : a,
155
155
  path: c
156
156
  });
157
- return l.status === "ready" ? /* @__PURE__ */ g("div", {
157
+ return l.status === "ready" ? /* @__PURE__ */ p("div", {
158
158
  "data-ai-chat-root": !0,
159
- children: /* @__PURE__ */ g(E, {
159
+ children: /* @__PURE__ */ p(E, {
160
160
  workspaceId: e,
161
161
  siteName: t,
162
162
  siteLogo: n,
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createThemeExtension-DhGk81nV.js";
1
+ import { t as e } from "./createThemeExtension-4AUn51iJ.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/site-runtime",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Runtime for Levo Studio v3 sites — the editor preview inspector, page head metadata, and the Levo data client.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -77,8 +77,8 @@
77
77
  "@stripe/react-stripe-js": "^3.1.1",
78
78
  "@stripe/stripe-js": "^5.5.0",
79
79
  "react-razorpay": "^3.0.1",
80
- "@levo-so/core": "0.3.7",
81
- "@levo-so/insights": "0.3.7"
80
+ "@levo-so/core": "0.3.8",
81
+ "@levo-so/insights": "0.3.8"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@base-ui/react": "^1.5.0",
package/popups.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./dist-Cb6sb7nO.js";
1
+ import { t as e } from "./dist-DPmVG7VB.js";
2
2
  //#region src/popups/usePopup.ts
3
3
  var t = () => e();
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as e } from "./inlineBaseTheme-B6E9zzyp.js";
1
+ import { t as e } from "./inlineBaseTheme-BB9e6h5f.js";
2
2
  import { useCallback as t, useRef as n, useSyncExternalStore as r } from "react";
3
3
  //#region ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/listen-keys/index.js
4
4
  function i(e, t, n) {