@levo-so/studio 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.
@@ -8,7 +8,7 @@ var s = {
8
8
  title: "_title_s7k8g_7",
9
9
  subtitle: "_subtitle_s7k8g_14",
10
10
  formWrapper: "_formWrapper_s7k8g_20"
11
- }, c = r(() => import("./PendingApprovalCard-CCbhY8p3.js")), l = ({ logo: r, siteName: l, page: u }) => {
11
+ }, c = r(() => import("./PendingApprovalCard-DbYp0nSk.js")), l = ({ logo: r, siteName: l, page: u }) => {
12
12
  let [d, f] = i(!1), [p, m] = i(!1), h = u.access?.find((e) => e.kind === "gating" && e.enabled)?.options;
13
13
  return p ? /* @__PURE__ */ a(n, {
14
14
  fallback: /* @__PURE__ */ a("div", {}),
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as e } from "./dist-2bXx8eVI.js";
2
+ import { r as e } from "./dist-D5mTOitS.js";
3
3
  import { t } from "./card-5ooLmYSr.js";
4
4
  import { t as n } from "./MessageFooter-K4Zd_eFO.js";
5
5
  import { useState as r } from "react";
@@ -3,9 +3,9 @@ import { n as t, t as n } from "./fontSize-B-ba6pvx.js";
3
3
  import { n as r, r as i, t as a } from "./inlineRteTheme-BOAno9MG.js";
4
4
  import { i as o, r as s, t as c } from "./Dialog-CPE8yUqK.js";
5
5
  import { t as l } from "./inlineCollectionTheme-uhBXoF1F.js";
6
- import { _ as u, a as d, d as f, g as p, i as m, l as h, r as g } from "./usePopupRedirect-BThP_YPW-jXtfhYu6.js";
6
+ import { c as u, g as d, h as f, i as p, m, r as h, u as g } from "./usePopupRedirect-CAAdcpaW-DdME0F7f.js";
7
7
  import { c as _ } from "react/compiler-runtime";
8
- import { useLevo as v } from "@levo-so/react";
8
+ import { LevoProvider as v } from "@levo-so/react";
9
9
  import { Suspense as y, lazy as b, useMemo as x, useState as S } from "react";
10
10
  import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
11
  import E from "clsx";
@@ -33,7 +33,7 @@ import { Underline as J } from "@tiptap/extension-underline";
33
33
  import { UniqueID as Y } from "@tiptap/extension-unique-id";
34
34
  import { generateJSON as X } from "@tiptap/html";
35
35
  import { renderToReactElement as Z } from "@tiptap/static-renderer/pm/react";
36
- //#region ../../libraries/popups/dist/PopupBody-DZVwDLkg.js
36
+ //#region ../../libraries/popups/dist/PopupBody-BI-MJqmd.js
37
37
  var Q = [
38
38
  O,
39
39
  H,
@@ -75,26 +75,26 @@ var Q = [
75
75
  ...i,
76
76
  children: o
77
77
  }) : null;
78
- }, te = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = b(() => import("./dist-2bXx8eVI.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = a({ baseSpacing: ".625rem" }), ie = { style: l({ form: { gap: "1rem" } }) }, ae = {
79
- left: h,
80
- center: g,
81
- right: m
78
+ }, te = /* @__PURE__ */ d({ PopupBody: () => oe }), ne = b(() => import("./dist-D5mTOitS.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = a({ baseSpacing: ".625rem" }), ie = { style: l({ form: { gap: "1rem" } }) }, ae = {
79
+ left: u,
80
+ center: h,
81
+ right: p
82
82
  }, oe = (t) => {
83
- let n = _(33), { popup: r, disableInteraction: i } = t, a = d(), l = a?.callbacks?.onAction, u = p(r), m = !a, { content: h } = r, { workspace: g } = v(), [b, x] = S(!1), E;
84
- n[0] !== h.action || n[1] !== l || n[2] !== r ? (E = () => {
83
+ let n = _(33), { disableInteraction: r } = t, { popup: i, callbacks: a, client: l, preview: u } = m(), d = a?.onAction, p = f(i), { content: h } = i, [b, x] = S(!1), E;
84
+ n[0] !== h.action || n[1] !== d || n[2] !== i ? (E = () => {
85
85
  if (h.action?.type !== "redirect" || !h.action.copyValue) return;
86
86
  let e = h.action.copyValue;
87
87
  navigator.clipboard.writeText(e).then(() => {
88
- x(!0), setTimeout(() => x(!1), 2e3), l?.(r, {
88
+ x(!0), setTimeout(() => x(!1), 2e3), d?.(i, {
89
89
  action_type: "copy",
90
90
  copy_value: e
91
91
  });
92
92
  });
93
- }, n[0] = h.action, n[1] = l, n[2] = r, n[3] = E) : E = n[3];
93
+ }, n[0] = h.action, n[1] = d, n[2] = i, n[3] = E) : E = n[3];
94
94
  let D = E, O = h.align ?? "left", k = h.size ?? "medium", M;
95
- n[4] === k ? M = n[5] : (M = f({ size: k }), n[4] = k, n[5] = M);
95
+ n[4] === k ? M = n[5] : (M = g({ size: k }), n[4] = k, n[5] = M);
96
96
  let N;
97
- n[6] === i ? N = n[7] : (N = i ? { pointerEvents: "none" } : void 0, n[6] = i, n[7] = N);
97
+ n[6] === r ? N = n[7] : (N = r ? { pointerEvents: "none" } : void 0, n[6] = r, n[7] = N);
98
98
  let P;
99
99
  n[8] !== O || n[9] !== h.description || n[10] !== h.heading ? (P = (h.heading || h.description) && /* @__PURE__ */ T(c, {
100
100
  className: "zv6sjd4",
@@ -108,38 +108,41 @@ var Q = [
108
108
  content: h.body
109
109
  }), n[12] = h.body, n[13] = F);
110
110
  let I;
111
- n[14] !== O || n[15] !== h.action || n[16] !== m || n[17] !== l || n[18] !== r || n[19] !== g ? (I = h.action?.type === "form" && /* @__PURE__ */ w("div", {
111
+ n[14] !== O || n[15] !== l || n[16] !== h.action || n[17] !== d || n[18] !== i || n[19] !== u ? (I = h.action?.type === "form" && l && /* @__PURE__ */ w("div", {
112
112
  className: "zv6sjd7",
113
- children: /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(ne, {
114
- collection_id: h.action.collectionKey,
115
- formVariant: h.action.formVariant,
116
- theme: ie,
117
- uiConfig: {
118
- hideFormHeading: !0,
119
- hideSectionHeadings: !0
120
- },
121
- successConfig: h.action.successRedirectUrl ? { action: {
122
- type: "redirect",
123
- value: h.action.successRedirectUrl
124
- } } : void 0,
125
- submitButtonConfig: {
126
- show: !0,
127
- text: h.action.label || "Submit",
128
- styles: h.action.fullWidth && (h.action.formVariant ?? "default") === "default" ? "zv6sjdb" : ae[O]
129
- },
130
- workspace_id: g,
131
- containerStyles: "zv6sjd6",
132
- preview: m,
133
- onSuccess: () => {
134
- h.action?.type === "form" && l?.(r, {
135
- action_type: "form_submit",
136
- collection_key: h.action.collectionKey
137
- });
138
- }
113
+ children: /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(v, {
114
+ client: l,
115
+ children: /* @__PURE__ */ w(ne, {
116
+ collection_id: h.action.collectionKey,
117
+ formVariant: h.action.formVariant,
118
+ theme: ie,
119
+ uiConfig: {
120
+ hideFormHeading: !0,
121
+ hideSectionHeadings: !0
122
+ },
123
+ successConfig: h.action.successRedirectUrl ? { action: {
124
+ type: "redirect",
125
+ value: h.action.successRedirectUrl
126
+ } } : void 0,
127
+ submitButtonConfig: {
128
+ show: !0,
129
+ text: h.action.label || "Submit",
130
+ styles: h.action.fullWidth && (h.action.formVariant ?? "default") === "default" ? "zv6sjdb" : ae[O]
131
+ },
132
+ workspace_id: l.workspace,
133
+ containerStyles: "zv6sjd6",
134
+ preview: u,
135
+ onSuccess: () => {
136
+ h.action?.type === "form" && d?.(i, {
137
+ action_type: "form_submit",
138
+ collection_key: h.action.collectionKey
139
+ });
140
+ }
141
+ })
139
142
  }) })
140
- }), n[14] = O, n[15] = h.action, n[16] = m, n[17] = l, n[18] = r, n[19] = g, n[20] = I) : I = n[20];
143
+ }), n[14] = O, n[15] = l, n[16] = h.action, n[17] = d, n[18] = i, n[19] = u, n[20] = I) : I = n[20];
141
144
  let L;
142
- n[21] !== h.action || n[22] !== b || n[23] !== D || n[24] !== u ? (L = h.action?.type === "redirect" && /* @__PURE__ */ T(C, { children: [h.action.copyValue && /* @__PURE__ */ T("button", {
145
+ n[21] !== h.action || n[22] !== b || n[23] !== D || n[24] !== p ? (L = h.action?.type === "redirect" && /* @__PURE__ */ T(C, { children: [h.action.copyValue && /* @__PURE__ */ T("button", {
143
146
  type: "button",
144
147
  className: "zv6sjdd",
145
148
  onClick: D,
@@ -152,9 +155,9 @@ var Q = [
152
155
  })]
153
156
  }), /* @__PURE__ */ w(e, {
154
157
  className: "zv6sjdc",
155
- onClick: () => u?.(),
158
+ onClick: () => p?.(),
156
159
  children: h.action.label || "Button"
157
- })] }), n[21] = h.action, n[22] = b, n[23] = D, n[24] = u, n[25] = L) : L = n[25];
160
+ })] }), n[21] = h.action, n[22] = b, n[23] = D, n[24] = p, n[25] = L) : L = n[25];
158
161
  let R;
159
162
  return n[26] !== M || n[27] !== N || n[28] !== P || n[29] !== F || n[30] !== I || n[31] !== L ? (R = /* @__PURE__ */ T("div", {
160
163
  className: M,