@levo-so/studio 0.1.95 → 0.1.96
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.
- package/{BillingStep-BLwl9IDQ.js → BillingStep-C3jJkLXQ.js} +1 -1
- package/{Button-C6BOkG_z.js → Button-CwN6jTXH.js} +1 -1
- package/CollectionField-DnbpB0Z5.js +254 -0
- package/CollectionInput-BoNAc4sq.js +132 -0
- package/DateTimeWidget-IRleQI-3.js +255 -0
- package/{EntryCard-B-feJvrB.js → EntryCard-CZIUBwtE.js} +3 -3
- package/{LoginCard-CF9JbU-y.js → LoginCard-Bthy9dcf.js} +3 -3
- package/{LoginForm-CdpNCQJa.js → LoginForm-CPMtCyMF.js} +4 -0
- package/{LoginModal-ngTHCyli.js → LoginModal-BPI5tOIZ.js} +3 -3
- package/{MessageCard-D2uja800.js → MessageCard-BYxgc9dl.js} +2 -2
- package/{ModalManager-B7pCzvK1.js → ModalManager-BaIL6HG-.js} +1 -1
- package/{PendingApprovalCard-Dut-Xiw1.js → PendingApprovalCard-DEnawzxD.js} +3 -3
- package/PhoneWidget-CjhHfwuG.js +100 -0
- package/Popover-DHVZdJuv.js +56 -0
- package/RichTextWidget-CgT1_zC3.js +1135 -0
- package/Tooltip-ByJRyayB.js +78 -0
- package/VerifyButton-DFKzKYxC.js +283 -0
- package/{bookingCard-BU_MdmS9.js → bookingCard-Bw4tvDYh.js} +3 -3
- package/collection.d.ts +81 -46
- package/collection.js +8 -5
- package/dist-D_jY4Tf1.js +3168 -0
- package/getFieldValidations-qVzuq6mv.js +195 -0
- package/index.d.ts +5 -5
- package/index.js +1229 -1434
- package/nodeAlignment-CG3qmAuQ.js +180 -0
- package/package.json +3 -4
- package/studio.css +1 -1
- package/theme.cssm-De_pl52g.js +4 -0
- package/{utils-KqbqLlMF.js → utils-F6eBcsyI.js} +1 -1
- package/widgets-Dvyv5_uj.js +215 -0
- package/dist-DDKHTnIW.js +0 -3653
- package/widgets-B84lq4lO.js +0 -351
- /package/{Beams-CCNNOvfW.js → Beams-Blr-zwvz.js} +0 -0
- /package/{Dots-89WGkd-z.js → Dots-DeBKuibU.js} +0 -0
- /package/{Gradient-vTa_uWCj.js → Gradient-DGFxOjft.js} +0 -0
- /package/{Grid-CrtztrxK.js → Grid-A7HRCQ0T.js} +0 -0
- /package/{MessageFooter-Bu-jyPkJ.js → MessageFooter-C6DivT4m.js} +0 -0
- /package/{StripePaymentModal-CajqohNM.js → StripePaymentModal-BcePXzmC.js} +0 -0
- /package/{Waves-BhA6CLEI.js → Waves-CIT6Ngng.js} +0 -0
- /package/{card-DCbhJCO9.js → card-izMd2DvE.js} +0 -0
- /package/{dialog-CILIXExr.js → dialog-CCWrvmHd.js} +0 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { a as e } from "./getFieldValidations-qVzuq6mv.js";
|
|
2
|
+
import { t } from "./theme.cssm-De_pl52g.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
5
|
+
import i from "clsx";
|
|
6
|
+
import { NodeSelection as a } from "@tiptap/pm/state";
|
|
7
|
+
import { Extension as o, findParentNodeClosestToPos as s } from "@tiptap/core";
|
|
8
|
+
import { CellSelection as c, cellAround as l } from "@tiptap/pm/tables";
|
|
9
|
+
//#region ../../libraries/rich-text-editor/dist/styles/content.cssm.js
|
|
10
|
+
var u = "d3c9ok0", d = "_7afiv40", f = (a) => {
|
|
11
|
+
let o = r(6), { children: s, theme: c } = a, l = c?.className, u;
|
|
12
|
+
o[0] === l ? u = o[1] : (u = i(t, d, l), o[0] = l, o[1] = u);
|
|
13
|
+
let f = c?.style, p;
|
|
14
|
+
return o[2] !== s || o[3] !== u || o[4] !== f ? (p = /* @__PURE__ */ n(e, {
|
|
15
|
+
className: u,
|
|
16
|
+
style: f,
|
|
17
|
+
children: s
|
|
18
|
+
}), o[2] = s, o[3] = u, o[4] = f, o[5] = p) : p = o[5], p;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../../libraries/rich-text-editor/dist/utils/isValidPosition.js
|
|
22
|
+
function p(e) {
|
|
23
|
+
return typeof e == "number" && e >= 0;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region ../../libraries/rich-text-editor/dist/utils/getSelectedNodeOfType.js
|
|
27
|
+
function m(e, t) {
|
|
28
|
+
let n = [], r = new Set(t);
|
|
29
|
+
if (e instanceof c) return e.forEachCell((e, t) => {
|
|
30
|
+
r.has(e.type.name) && n.push({
|
|
31
|
+
node: e,
|
|
32
|
+
pos: t
|
|
33
|
+
});
|
|
34
|
+
}), n;
|
|
35
|
+
if (e instanceof a) {
|
|
36
|
+
let { node: t, from: i } = e;
|
|
37
|
+
return t && r.has(t.type.name) && n.push({
|
|
38
|
+
node: t,
|
|
39
|
+
pos: i
|
|
40
|
+
}), n;
|
|
41
|
+
}
|
|
42
|
+
let { $anchor: i } = e, o = l(i);
|
|
43
|
+
if (o) {
|
|
44
|
+
let t = e.$anchor.doc.nodeAt(o.pos);
|
|
45
|
+
if (t && r.has(t.type.name)) return n.push({
|
|
46
|
+
node: t,
|
|
47
|
+
pos: o.pos
|
|
48
|
+
}), n;
|
|
49
|
+
}
|
|
50
|
+
let u = s(i, (e) => r.has(e.type.name));
|
|
51
|
+
return u && n.push({
|
|
52
|
+
node: u.node,
|
|
53
|
+
pos: u.pos
|
|
54
|
+
}), n;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../libraries/rich-text-editor/dist/utils/updateNodesAttr.js
|
|
58
|
+
function h(e, t, n, r) {
|
|
59
|
+
if (!t.length) return !1;
|
|
60
|
+
let i = !1;
|
|
61
|
+
for (let { pos: a } of t) {
|
|
62
|
+
let t = e.doc.nodeAt(a);
|
|
63
|
+
if (!t) continue;
|
|
64
|
+
let o = t.attrs[n], s = typeof r == "function" ? r(o) : r;
|
|
65
|
+
if (o === s) continue;
|
|
66
|
+
let c = { ...t.attrs };
|
|
67
|
+
s === void 0 ? delete c[n] : c[n] = s, e.setNodeMarkup(a, void 0, c), i = !0;
|
|
68
|
+
}
|
|
69
|
+
return i;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../../libraries/rich-text-editor/dist/features/nodeStyling/extension/nodeAlignment.js
|
|
73
|
+
function g(e, t, n) {
|
|
74
|
+
if (e.length === 0) return null;
|
|
75
|
+
for (let r of e) if ((r.node.attrs?.[t] ?? null) !== n) return n;
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
var _ = o.create({
|
|
79
|
+
name: "textAlign",
|
|
80
|
+
addOptions() {
|
|
81
|
+
return {
|
|
82
|
+
types: [
|
|
83
|
+
"paragraph",
|
|
84
|
+
"heading",
|
|
85
|
+
"quote",
|
|
86
|
+
"blockquoteFigure",
|
|
87
|
+
"tableCell",
|
|
88
|
+
"tableHeader"
|
|
89
|
+
],
|
|
90
|
+
useStyle: !0,
|
|
91
|
+
textAlignValues: [
|
|
92
|
+
"left",
|
|
93
|
+
"center",
|
|
94
|
+
"right",
|
|
95
|
+
"justify"
|
|
96
|
+
],
|
|
97
|
+
verticalAlignValues: [
|
|
98
|
+
"top",
|
|
99
|
+
"middle",
|
|
100
|
+
"bottom"
|
|
101
|
+
]
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
addGlobalAttributes() {
|
|
105
|
+
return [{
|
|
106
|
+
types: this.options.types,
|
|
107
|
+
attributes: {
|
|
108
|
+
textAlign: {
|
|
109
|
+
default: null,
|
|
110
|
+
parseHTML: (e) => {
|
|
111
|
+
let t = e.style?.textAlign;
|
|
112
|
+
if (t && this.options.textAlignValues.includes(t)) return t;
|
|
113
|
+
let n = e.getAttribute("data-text-align");
|
|
114
|
+
return n && this.options.textAlignValues.includes(n) ? n : null;
|
|
115
|
+
},
|
|
116
|
+
renderHTML: (e) => {
|
|
117
|
+
let t = e.textAlign;
|
|
118
|
+
return !t || !this.options.textAlignValues.includes(t) ? {} : this.options.useStyle ? { style: `text-align: ${t}` } : { "data-text-align": t };
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
nodeVerticalAlign: {
|
|
122
|
+
default: null,
|
|
123
|
+
parseHTML: (e) => {
|
|
124
|
+
let t = e.style?.verticalAlign;
|
|
125
|
+
if (t && this.options.verticalAlignValues.includes(t)) return t;
|
|
126
|
+
let n = e.getAttribute("data-vertical-align");
|
|
127
|
+
return n && this.options.verticalAlignValues.includes(n) ? n : null;
|
|
128
|
+
},
|
|
129
|
+
renderHTML: (e) => {
|
|
130
|
+
let t = e.nodeVerticalAlign;
|
|
131
|
+
return !t || !this.options.verticalAlignValues.includes(t) ? {} : this.options.useStyle ? { style: `vertical-align: ${t}` } : { "data-vertical-align": t };
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}];
|
|
136
|
+
},
|
|
137
|
+
addCommands() {
|
|
138
|
+
let e = (e, t) => (n) => ({ state: r, tr: i }) => {
|
|
139
|
+
let a = m(r.selection, this.options.types);
|
|
140
|
+
return a.length === 0 ? !1 : h(i, a, e, t(a, n));
|
|
141
|
+
};
|
|
142
|
+
return {
|
|
143
|
+
setNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : t),
|
|
144
|
+
unsetNodeTextAlign: e("textAlign", () => null),
|
|
145
|
+
toggleNodeTextAlign: e("textAlign", (e, t) => !t || !this.options.textAlignValues.includes(t) ? null : g(e, "textAlign", t)),
|
|
146
|
+
setNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : t),
|
|
147
|
+
unsetNodeVAlign: e("nodeVerticalAlign", () => null),
|
|
148
|
+
toggleNodeVAlign: e("nodeVerticalAlign", (e, t) => !t || !this.options.verticalAlignValues.includes(t) ? null : g(e, "nodeVerticalAlign", t)),
|
|
149
|
+
setNodeAlignment: (e, t) => ({ state: n, tr: r }) => {
|
|
150
|
+
let i = m(n.selection, this.options.types);
|
|
151
|
+
if (i.length === 0) return !1;
|
|
152
|
+
let a = !1;
|
|
153
|
+
for (let { node: n, pos: o } of i) {
|
|
154
|
+
let i = { ...n.attrs };
|
|
155
|
+
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);
|
|
156
|
+
}
|
|
157
|
+
return a;
|
|
158
|
+
},
|
|
159
|
+
unsetNodeAlignment: () => ({ state: e, tr: t }) => {
|
|
160
|
+
let n = m(e.selection, this.options.types);
|
|
161
|
+
if (n.length === 0) return !1;
|
|
162
|
+
let r = !1;
|
|
163
|
+
for (let { node: e, pos: i } of n) {
|
|
164
|
+
let n = e.attrs?.textAlign ?? null, a = e.attrs?.nodeVerticalAlign ?? null;
|
|
165
|
+
if (n || a) {
|
|
166
|
+
let n = {
|
|
167
|
+
...e.attrs,
|
|
168
|
+
textAlign: null,
|
|
169
|
+
nodeVerticalAlign: null
|
|
170
|
+
};
|
|
171
|
+
t.setNodeMarkup(i, void 0, n), r = !0;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return r;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//#endregion
|
|
180
|
+
export { f as a, p as i, h as n, u as o, m as r, _ as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.96",
|
|
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",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"yup": "1.7.1",
|
|
60
60
|
"@base-ui/react": "1.1.0",
|
|
61
61
|
"@tabler/icons-react": "3.34.1",
|
|
62
|
-
"@vanilla-extract/css": "1.19.0",
|
|
63
62
|
"@vanilla-extract/dynamic": "2.1.5",
|
|
64
63
|
"@vanilla-extract/recipes": "0.5.7",
|
|
65
64
|
"clsx": "2.1.1",
|
|
@@ -81,13 +80,13 @@
|
|
|
81
80
|
"@tiptap/extension-code-block": "3.19.0",
|
|
82
81
|
"@tiptap/extension-code-block-lowlight": "3.19.0",
|
|
83
82
|
"@tiptap/extension-color": "3.19.0",
|
|
84
|
-
"@tiptap/extension-document": "3.19.0",
|
|
85
83
|
"@tiptap/extension-details": "3.19.0",
|
|
86
84
|
"@tiptap/extension-details-content": "2.27.2",
|
|
87
85
|
"@tiptap/extension-details-summary": "2.27.2",
|
|
88
|
-
"@tiptap/extension-
|
|
86
|
+
"@tiptap/extension-document": "3.19.0",
|
|
89
87
|
"@tiptap/extension-drag-handle": "3.19.0",
|
|
90
88
|
"@tiptap/extension-drag-handle-react": "3.19.0",
|
|
89
|
+
"@tiptap/extension-dropcursor": "3.19.0",
|
|
91
90
|
"@tiptap/extension-emoji": "3.19.0",
|
|
92
91
|
"@tiptap/extension-file-handler": "3.19.0",
|
|
93
92
|
"@tiptap/extension-focus": "3.19.0",
|