@verbb/formie-browser 1.0.0 → 1.0.2
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/CHANGELOG.md +16 -0
- package/dist/chunks/address-finder-CQW81kY0.js +37 -0
- package/dist/chunks/bpoint-D8OjLmsn.js +26 -0
- package/dist/chunks/calculations-BqZsENCq.js +147 -0
- package/dist/chunks/captcha-eu-DIa6aUWz.js +34 -0
- package/dist/chunks/checkbox-radio-BI-UjgMF.js +136 -0
- package/dist/chunks/conditions-BVl6jTYo.js +433 -0
- package/dist/chunks/date-picker-69TgvErA.js +4994 -0
- package/dist/chunks/eway-1GPxH6DU.js +74 -0
- package/dist/chunks/file-upload-BDZZftgL.js +281 -0
- package/dist/chunks/friendly-captcha-v1-DA2QPKA3.js +33 -0
- package/dist/chunks/friendly-captcha-v2-BorOWiz_.js +38 -0
- package/dist/chunks/go-cardless-DwBgERcA.js +24 -0
- package/dist/chunks/google-address-BcTBncyS.js +162 -0
- package/dist/chunks/hcaptcha-BchdVCqq.js +56 -0
- package/dist/chunks/hidden-D8RqSPt7.js +31 -0
- package/dist/chunks/index-BEsfee-D.js +1839 -0
- package/dist/chunks/index-BP7Unm5Y.js +863 -0
- package/dist/chunks/index-C1ZOKiAi.js +4229 -0
- package/dist/chunks/loqate-nXuTX7In.js +55 -0
- package/dist/chunks/mollie-qdCynQCd.js +24 -0
- package/dist/chunks/moneris-BNEA-laO.js +101 -0
- package/dist/chunks/opayo-BJtXOkuK.js +122 -0
- package/dist/chunks/paddle-D72Pa8kr.js +60 -0
- package/dist/chunks/paypal-Cqt2bned.js +100 -0
- package/dist/chunks/payway-BjCqsc0H.js +56 -0
- package/dist/chunks/phone-country-K9pYAlzM.js +3765 -0
- package/dist/chunks/place-kit-Dg6f_UoM.js +42 -0
- package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
- package/dist/chunks/recaptcha-enterprise--VYAeeqz.js +71 -0
- package/dist/chunks/recaptcha-shared-PSIEEEe1.js +15 -0
- package/dist/chunks/recaptcha-v2-checkbox-atBNe5ml.js +41 -0
- package/dist/chunks/recaptcha-v2-invisible-DnBufNPT.js +59 -0
- package/dist/chunks/recaptcha-v3-CF6O8rDj.js +28 -0
- package/dist/chunks/repeater-CB7Yojvx.js +124 -0
- package/dist/chunks/rich-text-nAV_SQZo.js +304 -0
- package/dist/chunks/scripts-BkAAux0i.js +36 -0
- package/dist/chunks/sdk-3SicTWby.js +1559 -0
- package/dist/chunks/shared-DGqeMvcJ.js +80 -0
- package/dist/chunks/signature-BT6CsQ6n.js +550 -0
- package/dist/chunks/snaptcha-C7qQo02f.js +8 -0
- package/dist/chunks/square-C5AH3trb.js +46 -0
- package/dist/chunks/stripe-EJK0RyUv.js +202 -0
- package/dist/chunks/styles-C3aqgtek.js +21 -0
- package/dist/chunks/summary-DC_ipXCU.js +126 -0
- package/dist/chunks/table-BEAI99qo.js +95 -0
- package/dist/chunks/text-limit-Blgq5G-G.js +135 -0
- package/dist/chunks/turnstile-_uCRwnU-.js +59 -0
- package/dist/chunks/utils-BntI3W4S.js +6149 -0
- package/dist/index.js +39 -3205
- package/package.json +5 -5
- package/src/js/modules/fields/file-upload.ts +1 -1
- package/src/js/modules/fields/repeater.ts +1 -1
- package/src/js/modules/fields/rich-text.ts +2 -2
- package/src/js/modules/fields/signature.ts +1 -1
- package/src/js/modules/fields/summary.ts +1 -1
- package/src/js/modules/fields/table.ts +1 -1
- package/src/js/modules/fields/text-limit.ts +1 -1
- package/src/js/modules/payments/paypal.ts +1 -1
- package/src/js/modules/payments/payway.ts +1 -1
- package/src/js/modules/payments/stripe.ts +1 -1
- package/dist/chunks/address-finder-DfMCiW89.js +0 -47
- package/dist/chunks/api-CbqEMQT5.js +0 -181
- package/dist/chunks/api-DE7LfK-R.js +0 -960
- package/dist/chunks/api-DOfDzYC_.js +0 -538
- package/dist/chunks/async-B3DUf1GZ.js +0 -26
- package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
- package/dist/chunks/calculations-CkYAqO_-.js +0 -197
- package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
- package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
- package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
- package/dist/chunks/conditions-4fXKhEJS.js +0 -609
- package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
- package/dist/chunks/debug-KnZeKYBI.js +0 -39
- package/dist/chunks/dist-D09GnXMW.js +0 -2663
- package/dist/chunks/event-names-DamGPtXR.js +0 -51
- package/dist/chunks/eway-DEAYcwT0.js +0 -86
- package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
- package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
- package/dist/chunks/file-upload-Bh63PQSE.js +0 -430
- package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
- package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
- package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
- package/dist/chunks/go-cardless-CuND59rR.js +0 -26
- package/dist/chunks/google-address--uR8WDSm.js +0 -208
- package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
- package/dist/chunks/hidden-CYnZYple.js +0 -36
- package/dist/chunks/http-18nn97DZ.js +0 -29
- package/dist/chunks/i18n-vUh-KGiH.js +0 -55
- package/dist/chunks/loqate-BICNJlVK.js +0 -97
- package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
- package/dist/chunks/moneris-B_IFZFTx.js +0 -159
- package/dist/chunks/opayo-U2x_TOII.js +0 -192
- package/dist/chunks/paddle-BqXFrc79.js +0 -75
- package/dist/chunks/paypal-Cn_DYGDb.js +0 -121
- package/dist/chunks/payway-Rnq796eC.js +0 -75
- package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
- package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
- package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
- package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
- package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
- package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
- package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
- package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
- package/dist/chunks/repeater-CXD1eLSn.js +0 -151
- package/dist/chunks/rich-text-DkmZRhGj.js +0 -442
- package/dist/chunks/scripts-BGD_iU_6.js +0 -41
- package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
- package/dist/chunks/shared-DC6_1u8X.js +0 -85
- package/dist/chunks/signature-E9KyYXS1.js +0 -765
- package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
- package/dist/chunks/square-BLqK51rS.js +0 -61
- package/dist/chunks/stripe-B8gHpZNC.js +0 -273
- package/dist/chunks/styles-BIh6g7V_.js +0 -22
- package/dist/chunks/summary-EcNE0cvg.js +0 -191
- package/dist/chunks/table-yxEDL6kA.js +0 -124
- package/dist/chunks/text-limit-D0H_Ca2c.js +0 -179
- package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
- package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
- package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
|
@@ -1,442 +0,0 @@
|
|
|
1
|
-
import { t as __commonJSMin } from "./chunk-K6L4z4UQ.js";
|
|
2
|
-
import { t as ensureModuleStyles } from "./styles-BIh6g7V_.js";
|
|
3
|
-
import { r as getModuleFieldContainers, t as dispatchFieldEvent } from "./shared-DC6_1u8X.js";
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region ../../node_modules/pell/dist/pell.min.css?inline
|
|
6
|
-
var import_pell_min = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
|
-
(function(t, e) {
|
|
8
|
-
"object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.pell = {});
|
|
9
|
-
})(exports, function(t) {
|
|
10
|
-
"use strict";
|
|
11
|
-
var e = Object.assign || function(t) {
|
|
12
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
13
|
-
var n = arguments[e];
|
|
14
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
15
|
-
}
|
|
16
|
-
return t;
|
|
17
|
-
}, c = "defaultParagraphSeparator", l = "formatBlock", a = function(t, e, n) {
|
|
18
|
-
return t.addEventListener(e, n);
|
|
19
|
-
}, s = function(t, e) {
|
|
20
|
-
return t.appendChild(e);
|
|
21
|
-
}, d = function(t) {
|
|
22
|
-
return document.createElement(t);
|
|
23
|
-
}, n = function(t) {
|
|
24
|
-
return document.queryCommandState(t);
|
|
25
|
-
}, f = function(t) {
|
|
26
|
-
var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null;
|
|
27
|
-
return document.execCommand(t, !1, e);
|
|
28
|
-
}, p = {
|
|
29
|
-
bold: {
|
|
30
|
-
icon: "<b>B</b>",
|
|
31
|
-
title: "Bold",
|
|
32
|
-
state: function() {
|
|
33
|
-
return n("bold");
|
|
34
|
-
},
|
|
35
|
-
result: function() {
|
|
36
|
-
return f("bold");
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
italic: {
|
|
40
|
-
icon: "<i>I</i>",
|
|
41
|
-
title: "Italic",
|
|
42
|
-
state: function() {
|
|
43
|
-
return n("italic");
|
|
44
|
-
},
|
|
45
|
-
result: function() {
|
|
46
|
-
return f("italic");
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
underline: {
|
|
50
|
-
icon: "<u>U</u>",
|
|
51
|
-
title: "Underline",
|
|
52
|
-
state: function() {
|
|
53
|
-
return n("underline");
|
|
54
|
-
},
|
|
55
|
-
result: function() {
|
|
56
|
-
return f("underline");
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
strikethrough: {
|
|
60
|
-
icon: "<strike>S</strike>",
|
|
61
|
-
title: "Strike-through",
|
|
62
|
-
state: function() {
|
|
63
|
-
return n("strikeThrough");
|
|
64
|
-
},
|
|
65
|
-
result: function() {
|
|
66
|
-
return f("strikeThrough");
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
heading1: {
|
|
70
|
-
icon: "<b>H<sub>1</sub></b>",
|
|
71
|
-
title: "Heading 1",
|
|
72
|
-
result: function() {
|
|
73
|
-
return f(l, "<h1>");
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
heading2: {
|
|
77
|
-
icon: "<b>H<sub>2</sub></b>",
|
|
78
|
-
title: "Heading 2",
|
|
79
|
-
result: function() {
|
|
80
|
-
return f(l, "<h2>");
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
paragraph: {
|
|
84
|
-
icon: "¶",
|
|
85
|
-
title: "Paragraph",
|
|
86
|
-
result: function() {
|
|
87
|
-
return f(l, "<p>");
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
quote: {
|
|
91
|
-
icon: "“ ”",
|
|
92
|
-
title: "Quote",
|
|
93
|
-
result: function() {
|
|
94
|
-
return f(l, "<blockquote>");
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
olist: {
|
|
98
|
-
icon: "#",
|
|
99
|
-
title: "Ordered List",
|
|
100
|
-
result: function() {
|
|
101
|
-
return f("insertOrderedList");
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
ulist: {
|
|
105
|
-
icon: "•",
|
|
106
|
-
title: "Unordered List",
|
|
107
|
-
result: function() {
|
|
108
|
-
return f("insertUnorderedList");
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
code: {
|
|
112
|
-
icon: "</>",
|
|
113
|
-
title: "Code",
|
|
114
|
-
result: function() {
|
|
115
|
-
return f(l, "<pre>");
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
line: {
|
|
119
|
-
icon: "―",
|
|
120
|
-
title: "Horizontal Line",
|
|
121
|
-
result: function() {
|
|
122
|
-
return f("insertHorizontalRule");
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
link: {
|
|
126
|
-
icon: "🔗",
|
|
127
|
-
title: "Link",
|
|
128
|
-
result: function() {
|
|
129
|
-
var t = window.prompt("Enter the link URL");
|
|
130
|
-
t && f("createLink", t);
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
image: {
|
|
134
|
-
icon: "📷",
|
|
135
|
-
title: "Image",
|
|
136
|
-
result: function() {
|
|
137
|
-
var t = window.prompt("Enter the image URL");
|
|
138
|
-
t && f("insertImage", t);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}, m = {
|
|
142
|
-
actionbar: "pell-actionbar",
|
|
143
|
-
button: "pell-button",
|
|
144
|
-
content: "pell-content",
|
|
145
|
-
selected: "pell-button-selected"
|
|
146
|
-
}, r = function(n) {
|
|
147
|
-
var t = n.actions ? n.actions.map(function(t) {
|
|
148
|
-
return "string" == typeof t ? p[t] : p[t.name] ? e({}, p[t.name], t) : t;
|
|
149
|
-
}) : Object.keys(p).map(function(t) {
|
|
150
|
-
return p[t];
|
|
151
|
-
}), r = e({}, m, n.classes), i = n[c] || "div", o = d("div");
|
|
152
|
-
o.className = r.actionbar, s(n.element, o);
|
|
153
|
-
var u = n.element.content = d("div");
|
|
154
|
-
return u.contentEditable = !0, u.className = r.content, u.oninput = function(t) {
|
|
155
|
-
var e = t.target.firstChild;
|
|
156
|
-
e && 3 === e.nodeType ? f(l, "<" + i + ">") : "<br>" === u.innerHTML && (u.innerHTML = ""), n.onChange(u.innerHTML);
|
|
157
|
-
}, u.onkeydown = function(t) {
|
|
158
|
-
var e;
|
|
159
|
-
"Enter" === t.key && "blockquote" === (e = l, document.queryCommandValue(e)) && setTimeout(function() {
|
|
160
|
-
return f(l, "<" + i + ">");
|
|
161
|
-
}, 0);
|
|
162
|
-
}, s(n.element, u), t.forEach(function(t) {
|
|
163
|
-
var e = d("button");
|
|
164
|
-
if (e.className = r.button, e.innerHTML = t.icon, e.title = t.title, e.setAttribute("type", "button"), e.onclick = function() {
|
|
165
|
-
return t.result() && u.focus();
|
|
166
|
-
}, t.state) {
|
|
167
|
-
var n = function() {
|
|
168
|
-
return e.classList[t.state() ? "add" : "remove"](r.selected);
|
|
169
|
-
};
|
|
170
|
-
a(u, "keyup", n), a(u, "mouseup", n), a(e, "click", n);
|
|
171
|
-
}
|
|
172
|
-
s(o, e);
|
|
173
|
-
}), n.styleWithCSS && f("styleWithCSS"), f(c, i), n.element;
|
|
174
|
-
}, i = {
|
|
175
|
-
exec: f,
|
|
176
|
-
init: r
|
|
177
|
-
};
|
|
178
|
-
t.exec = f, t.init = r, t.default = i, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
179
|
-
});
|
|
180
|
-
})))();
|
|
181
|
-
var pell_min_default = ".pell{border:1px solid #0a0a0a1a}.pell,.pell-content{box-sizing:border-box}.pell-content{outline:0;height:300px;padding:10px;overflow-y:auto}.pell-actionbar{background-color:#fff;border-bottom:1px solid #0a0a0a1a}.pell-button{cursor:pointer;vertical-align:bottom;background-color:#0000;border:none;outline:0;width:30px;height:30px}.pell-button-selected{background-color:#f0f0f0}";
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region src/css/theme/_tokens.css?inline
|
|
184
|
-
var _tokens_default = "@layer formie-theme{.formie-form{--formie-font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;--formie-font-size-xs:.75rem;--formie-font-size-sm:.875rem;--formie-font-size-base:1rem;--formie-font-size-lg:1.125rem;--formie-font-size-xl:1.375rem;--formie-font-size-2xl:1.75rem;--formie-font-weight-normal:400;--formie-font-weight-medium:500;--formie-font-weight-semibold:600;--formie-font-weight-bold:700;--formie-line-height-tight:1.25;--formie-line-height-base:1.5;--formie-line-height-relaxed:1.4;--formie-letter-spacing-tight:-.02em;--formie-space-1:.25rem;--formie-space-1-5:.375rem;--formie-space-2:.5rem;--formie-space-2-5:.625rem;--formie-space-3:.75rem;--formie-space-3-5:.875rem;--formie-space-4:1rem;--formie-space-4-5:1.125rem;--formie-space-5:1.25rem;--formie-space-5-5:1.375rem;--formie-space-6:1.5rem;--formie-space-7:1.75rem;--formie-space-8:2rem;--formie-space-9:2.25rem;--formie-space-10:2.5rem;--formie-space-11:2.75rem;--formie-space-12:3rem;--formie-radius-sm:.25rem;--formie-radius-md:.375rem;--formie-radius-lg:.5rem;--formie-radius-full:999px;--formie-border-width:1px;--formie-black:#000;--formie-white:#fff;--formie-neutral-50:#f8fafc;--formie-neutral-100:#f1f5f9;--formie-neutral-200:#e2e8f0;--formie-neutral-300:#cbd5e1;--formie-neutral-400:#94a3b8;--formie-neutral-500:#64748b;--formie-neutral-600:#475569;--formie-neutral-700:#334155;--formie-neutral-800:#1e293b;--formie-neutral-900:#0f172a;--formie-neutral-950:#020617;--formie-primary-50:#e8ecfc;--formie-primary-100:#d2d9f9;--formie-primary-200:#a4b3f4;--formie-primary-300:#778dee;--formie-primary-400:#4967e9;--formie-primary-500:#1c41e3;--formie-primary-600:#1634b6;--formie-primary-700:#112788;--formie-primary-800:#0b1a5b;--formie-primary-900:#060d2d;--formie-primary-950:#040920;--formie-danger-50:#fef2f2;--formie-danger-100:#fee2e2;--formie-danger-200:#fecaca;--formie-danger-300:#fca5a5;--formie-danger-400:#f87171;--formie-danger-500:#ef4444;--formie-danger-600:#dc2626;--formie-danger-700:#b91c1c;--formie-danger-800:#991b1b;--formie-danger-900:#7f1d1d;--formie-danger-950:#450a0a;--formie-success-50:#f0fdf4;--formie-success-100:#dcfce7;--formie-success-200:#bbf7d0;--formie-success-300:#86efac;--formie-success-400:#4ade80;--formie-success-500:#22c55e;--formie-success-600:#16a34a;--formie-success-700:#15803d;--formie-success-800:#166534;--formie-success-900:#14532d;--formie-success-950:#052e16;--formie-color-background:var(--formie-white);--formie-color-surface:var(--formie-white);--formie-color-surface-subtle:var(--formie-neutral-50);--formie-color-surface-muted:var(--formie-neutral-100);--formie-color-text:var(--formie-neutral-700);--formie-color-text-muted:var(--formie-neutral-500);--formie-color-heading:var(--formie-neutral-900);--formie-color-border:var(--formie-neutral-300);--formie-color-border-soft:var(--formie-neutral-200);--formie-color-primary:var(--formie-primary-400);--formie-color-primary-hover:var(--formie-primary-500);--formie-color-primary-border:var(--formie-primary-500);--formie-color-primary-soft:var(--formie-primary-100);--formie-color-focus-ring:var(--formie-primary-300);--formie-color-danger:var(--formie-danger-500);--formie-color-danger-soft:var(--formie-danger-50);--formie-color-danger-dark:var(--formie-danger-900);--formie-color-success:var(--formie-success-500);--formie-color-success-soft:var(--formie-success-50);--formie-color-success-dark:var(--formie-success-900);--formie-color-button-text:var(--formie-color-surface);--formie-focus-ring-border-color:var(--formie-color-focus-ring);--formie-shadow-focus:0 0 0 3px #778dee73;--formie-shadow-danger-focus:0 0 0 3px #f8b4b473;--formie-title-form-size:1.4rem;--formie-body-size:.9375rem;--formie-gap-form:0;--formie-gap-form-header:var(--formie-space-4);--formie-gap-form-messages:var(--formie-space-4);--formie-gap-form-navigation:var(--formie-space-4);--formie-gap-form-body:0;--formie-gap-form-footer:var(--formie-space-4);--formie-message-padding:var(--formie-space-4);--formie-message-margin-bottom:var(--formie-space-4);--formie-message-size:var(--formie-font-size-sm);--formie-message-line-height:var(--formie-line-height-relaxed);--formie-button-border:var(--formie-border-width) solid var(--formie-color-border);--formie-button-border-hover:var(--formie-button-secondary-border-hover);--formie-button-border-radius:var(--formie-radius-sm);--formie-button-background:var(--formie-neutral-100);--formie-button-background-hover:var(--formie-neutral-200);--formie-button-text-color:var(--formie-color-heading);--formie-button-color:var(--formie-button-text-color);--formie-button-line-height:var(--formie-line-height-tight);--formie-button-font-weight:var(--formie-font-weight-medium);--formie-button-min-height:var(--formie-space-10);--formie-button-padding-y:var(--formie-space-2);--formie-button-padding-x:var(--formie-space-4);--formie-button-font-size:var(--formie-font-size-sm);--formie-button-gap:var(--formie-space-2);--formie-button-icon-size:.9375rem;--formie-button-icon-button-size:1.875rem;--formie-button-icon-border-radius:var(--formie-radius-full);--formie-button-icon-background:var(--formie-neutral-100);--formie-button-icon-background-hover:var(--formie-neutral-200);--formie-button-icon-border:var(--formie-border-width) solid var(--formie-neutral-300);--formie-button-icon-border-hover:var(--formie-border-width) solid var(--formie-neutral-400);--formie-button-icon-color:var(--formie-neutral-950);--formie-button-opacity-disabled:.7;--formie-button-shadow-focus:0 0 0 3px var(--formie-color-border-soft);--formie-icon-mask-plus:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23000' d='M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z'/%3E%3C/svg%3E\");--formie-icon-mask-arrow-left:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23000' d='M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/%3E%3C/svg%3E\");--formie-icon-mask-arrow-right:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23000' d='M278.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z'/%3E%3C/svg%3E\");--formie-icon-mask-close:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23000' d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z'/%3E%3C/svg%3E\");--formie-button-primary-background:var(--formie-color-primary);--formie-button-primary-background-hover:var(--formie-color-primary-hover);--formie-button-primary-text-color:var(--formie-white);--formie-button-primary-border:var(--formie-border-width) solid transparent;--formie-button-primary-border-hover:var(--formie-border-width) solid var(--formie-color-primary-hover);--formie-button-primary-shadow-focus:0 0 0 3px var(--formie-primary-300);--formie-button-secondary-border:var(--formie-border-width) solid var(--formie-color-border);--formie-button-secondary-border-hover:var(--formie-button-secondary-border);--formie-button-secondary-background:var(--formie-color-surface);--formie-button-secondary-background-hover:var(--formie-neutral-100);--formie-button-secondary-text-color:var(--formie-color-heading);--formie-button-ghost-border:var(--formie-border-width) solid transparent;--formie-button-ghost-border-hover:var(--formie-button-ghost-border);--formie-button-ghost-background:transparent;--formie-button-ghost-background-hover:var(--formie-neutral-100);--formie-button-ghost-text-color:var(--formie-color-heading);--formie-button-ghost-shadow-focus:var(--formie-button-shadow-focus);--formie-button-link-text-color:var(--formie-color-primary);--formie-button-link-text-color-hover:var(--formie-color-primary-hover);--formie-tab-padding-y:var(--formie-space-2);--formie-tab-padding-x:var(--formie-space-4);--formie-tab-font-size:var(--formie-font-size-sm);--formie-gap-tabs:var(--formie-space-4);--formie-progress-height:1.2rem;--formie-progress-padding:var(--formie-space-4);--formie-progress-size:.8rem;--formie-loading-size:var(--formie-space-4);--formie-loading-margin-top:calc(var(--formie-loading-size) * -.5);--formie-loading-margin-left:calc(var(--formie-loading-size) * -.5);--formie-loading-border-width:2px;--formie-loading-animation:loading .5s infinite linear;--formie-loading-left:50%;--formie-loading-top:50%;--formie-loading-z-index:1;--formie-gap-pages:0;--formie-gap-page:var(--formie-space-4);--formie-gap-page-container:0;--formie-gap-page-header:var(--formie-space-4);--formie-gap-page-body:var(--formie-space-4);--formie-gap-page-footer:var(--formie-space-4);--formie-gap-page-buttons:var(--formie-space-4);--formie-title-page-size:var(--formie-font-size-lg);--formie-gap-rows:var(--formie-space-4);--formie-gap-row:var(--formie-space-4);--formie-gap-subfield-rows:var(--formie-space-2);--formie-gap-subfield-row:var(--formie-space-2);--formie-gap-nested-field-rows:var(--formie-space-2);--formie-gap-nested-field-row:var(--formie-space-2);--formie-subfield-row-column-min-width:12rem;--formie-nested-field-row-column-min-width:16rem;--formie-gap-errors:var(--formie-space-2);--formie-gap-field-errors:var(--formie-space-2);--formie-label-size:var(--formie-font-size-sm);--formie-meta-size:var(--formie-font-size-sm);--formie-control-height:2.375rem;--formie-control-padding-y:var(--formie-space-2);--formie-control-padding-x:var(--formie-space-3);--formie-control-font-size:var(--formie-font-size-sm);--formie-textarea-min-height:9rem;--formie-select-indicator-size:1.4rem;--formie-list-indent:var(--formie-space-5);--formie-link-underline-offset:.15em;--formie-gap-field:var(--formie-space-2);--formie-gap-field-layout:var(--formie-space-2);--formie-gap-field-content:var(--formie-space-2);--formie-gap-field-control:var(--formie-space-2);--formie-gap-options:var(--formie-space-2);--formie-summary-padding:var(--formie-space-4);--formie-gap-summary:var(--formie-space-4);--formie-file-summary-padding:var(--formie-space-4);--formie-gap-file-summary:var(--formie-space-3);--formie-rich-text-min-height:12rem;--formie-signature-width:100%;--formie-signature-height:8rem;--formie-signature-background:var(--formie-color-surface-subtle);--formie-signature-border:1px solid var(--formie-color-border);--formie-signature-border-radius:var(--formie-radius-sm);--formie-signature-remove-button-top:0;--formie-signature-remove-button-right:-14px;--formie-signature-remove-button-transform:translate(0, -50%);--formie-check-font-size:var(--formie-font-size-sm);--formie-check-line-height:var(--formie-line-height-base);--formie-check-margin-bottom:var(--formie-space-2);--formie-check-margin-right:var(--formie-space-4);--formie-check-background-color:var(--formie-color-surface-muted);--formie-check-size:var(--formie-space-4);--formie-check-label-padding-left:var(--formie-space-6);--formie-check-label-line-height:var(--formie-space-6);--formie-check-label-top:.3125rem;--formie-check-label-transition:all .15s cubic-bezier(.4, 0, .2, 1);--formie-check-label-background-color:var(--formie-color-surface);--formie-check-check-border-radius:2px;--formie-check-check-background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E\");--formie-check-check-background-size:8px auto;--formie-check-radio-border-radius:50%;--formie-check-radio-background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E\");--formie-check-radio-background-size:8px auto;--formie-group-border:1px solid var(--formie-color-border);--formie-group-border-radius:var(--formie-radius-sm);--formie-group-padding:var(--formie-space-4);--formie-repeater-add-button-padding-left:var(--formie-space-8);--formie-repeater-add-button-icon-mask:var(--formie-icon-mask-plus);--formie-repeater-add-button-height:14px;--formie-repeater-add-button-width:14px;--formie-repeater-add-button-left:var(--formie-space-3);--formie-repeater-remove-button-top:0;--formie-repeater-remove-button-right:-14px;--formie-repeater-remove-button-transform:translate(0, -50%);--formie-table-width:100%;--formie-table-margin-bottom:1rem;--formie-table-border-collapse:collapse;--formie-table-row-padding:.2rem;--formie-table-th-text-align:inherit;--formie-table-th-font-size:.75rem;--formie-table-th-font-weight:600;--formie-table-add-button-padding-left:var(--formie-space-8);--formie-table-add-button-icon-mask:var(--formie-icon-mask-plus);--formie-table-add-button-height:14px;--formie-table-add-button-width:14px;--formie-table-add-button-left:var(--formie-space-3);--formie-table-remove-button-top:0;--formie-table-remove-button-right:-14px;--formie-table-remove-button-transform:translate(0, -50%);font-family:var(--formie-font-family);font-size:var(--formie-body-size);line-height:var(--formie-line-height-base);color:var(--formie-color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}";
|
|
185
|
-
//#endregion
|
|
186
|
-
//#region src/css/theme/fields/_rich-text.css?inline
|
|
187
|
-
var _rich_text_default = "@layer formie-theme{.formie-rich-text{border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);background:var(--formie-color-surface);box-sizing:border-box;padding:0;transition:border-color .15s,box-shadow .15s,background-color .15s;overflow:hidden}.formie-rich-text:focus-within{border-color:var(--formie-color-focus-ring);box-shadow:var(--formie-shadow-focus)}.formie-field-has-error .formie-rich-text{border-color:var(--formie-color-danger)}.formie-field-has-error .formie-rich-text:focus-within{box-shadow:var(--formie-shadow-danger-focus)}.formie-rich-text-toolbar{padding:var(--formie-space-1);border-bottom:var(--formie-border-width) solid var(--formie-color-border);background:#fff;flex-wrap:wrap;align-items:center;gap:0;display:flex;box-shadow:0 1px 2px #1118270f}.formie-rich-text .formie-rich-text-button{width:var(--formie-space-8);height:var(--formie-space-8);border-radius:var(--formie-radius-sm);color:var(--formie-color-heading);font-size:var(--formie-font-size-sm);cursor:pointer;box-shadow:none;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;line-height:1;transition:background-color .15s,color .15s,box-shadow .15s;display:inline-flex}.formie-rich-text .formie-rich-text-button:hover,.formie-rich-text .formie-rich-text-button.formie-rich-text-selected{background:var(--formie-color-surface-muted)}.formie-rich-text .formie-rich-text-button:focus-visible{box-shadow:0 0 0 2px var(--formie-color-surface), 0 0 0 4px color-mix(in srgb, var(--formie-color-focus-ring) 60%, transparent);outline:0}.formie-rich-text [contenteditable=true]{min-height:var(--formie-rich-text-min-height);padding:var(--formie-space-3) calc(var(--formie-space-3) + var(--formie-space-1) / 2);box-shadow:none;overflow-wrap:anywhere;line-height:var(--formie-line-height-base);color:var(--formie-color-text);background:0 0;border:0;border-radius:0;outline:0}.formie-rich-text [contenteditable=true]>:first-child{margin-top:0}.formie-rich-text [contenteditable=true]>:last-child{margin-bottom:0}.formie-rich-text-content p,.formie-rich-text-content ul,.formie-rich-text-content ol,.formie-rich-text-content blockquote,.formie-rich-text-content dl,.formie-rich-text-content dd,.formie-rich-text-content figure,.formie-rich-text-content hr,.formie-rich-text-content pre{margin:0 0 var(--formie-space-4)}.formie-rich-text-content h1,.formie-rich-text-content h2,.formie-rich-text-content h3,.formie-rich-text-content h4,.formie-rich-text-content h5,.formie-rich-text-content h6{margin:0 0 var(--formie-space-3);color:var(--formie-color-heading);font-weight:var(--formie-font-weight-semibold);line-height:var(--formie-line-height-tight)}.formie-rich-text-content h1{font-size:var(--formie-font-size-2xl)}.formie-rich-text-content h2{font-size:var(--formie-font-size-xl)}.formie-rich-text-content h3{font-size:var(--formie-font-size-lg)}.formie-rich-text-content h4{font-size:var(--formie-font-size-base)}.formie-rich-text-content h5,.formie-rich-text-content h6{font-size:var(--formie-font-size-sm)}.formie-rich-text-content ul,.formie-rich-text-content ol{padding-inline-start:var(--formie-list-indent)}.formie-rich-text-content ul{list-style:outside}.formie-rich-text-content ol{list-style:decimal}.formie-rich-text-content li+li{margin-top:var(--formie-space-1)}.formie-rich-text-content a{color:var(--formie-color-primary);text-underline-offset:var(--formie-link-underline-offset);text-decoration:underline}.formie-rich-text-content blockquote{color:var(--formie-color-text-muted);border-inline-start:4px solid var(--formie-color-border-soft);padding-inline-start:var(--formie-space-4)}.formie-rich-text-content pre{padding:var(--formie-space-4);border-radius:var(--formie-radius-md);background:var(--formie-color-surface-muted);overflow-x:auto}.formie-rich-text-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95em}.formie-rich-text-content :not(pre)>code{border-radius:var(--formie-radius-sm);background:var(--formie-color-surface-muted);padding:.12em .35em}.formie-rich-text-content pre code{background:0 0;border-radius:0;padding:0}.formie-rich-text-content hr{border:0;border-top:var(--formie-border-width) solid var(--formie-color-border);height:0}.formie-rich-text-content img{max-width:100%;height:auto;display:block}.formie-rich-text-content[data-placeholder]:empty:before{content:attr(data-placeholder);color:var(--formie-color-text-muted);pointer-events:none}}";
|
|
188
|
-
//#endregion
|
|
189
|
-
//#region src/icons/rich-text/aligncenter.svg?raw
|
|
190
|
-
var aligncenter_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M7 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M7 18h10\" />\n</svg>\n";
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region src/icons/rich-text/alignleft.svg?raw
|
|
193
|
-
var alignleft_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M4 18h10\" />\n</svg>\n";
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/icons/rich-text/alignright.svg?raw
|
|
196
|
-
var alignright_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M10 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M10 18h10\" />\n</svg>\n";
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/icons/rich-text/bold.svg?raw
|
|
199
|
-
var bold_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M7 6h6a3 3 0 0 1 0 6H7z\" />\n <path d=\"M7 12h7a3 3 0 0 1 0 6H7z\" />\n</svg>\n";
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/icons/rich-text/clear.svg?raw
|
|
202
|
-
var clear_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m4 20 8-8\" />\n <path d=\"m12 12 7-7\" />\n <path d=\"m5 15-2-2a2 2 0 0 1 0-2.83L9.17 4a2 2 0 0 1 2.83 0l4 4\" />\n <path d=\"M16 20H8\" />\n</svg>\n";
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/icons/rich-text/code.svg?raw
|
|
205
|
-
var code_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m9 18-6-6 6-6\" />\n <path d=\"m15 6 6 6-6 6\" />\n</svg>\n";
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/icons/rich-text/heading1.svg?raw
|
|
208
|
-
var heading1_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">H1</text>\n</svg>\n";
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/icons/rich-text/heading2.svg?raw
|
|
211
|
-
var heading2_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">H2</text>\n</svg>\n";
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/icons/rich-text/image.svg?raw
|
|
214
|
-
var image_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m8 13 3-3 5 5\" />\n <path d=\"m13 12 2-2 4 4\" />\n <circle cx=\"8.5\" cy=\"9.5\" r=\"1\" />\n</svg>\n";
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region src/icons/rich-text/italic.svg?raw
|
|
217
|
-
var italic_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M13 6h6\" />\n <path d=\"M5 18h6\" />\n <path d=\"M14 6 10 18\" />\n</svg>\n";
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region src/icons/rich-text/line.svg?raw
|
|
220
|
-
var line_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 12h16\" />\n</svg>\n";
|
|
221
|
-
//#endregion
|
|
222
|
-
//#region src/icons/rich-text/link.svg?raw
|
|
223
|
-
var link_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 13a5 5 0 0 0 7.07 0l1.41-1.41a5 5 0 0 0-7.07-7.07L10 5\" />\n <path d=\"M14 11a5 5 0 0 0-7.07 0L5.5 12.43a5 5 0 0 0 7.07 7.07L14 19\" />\n</svg>\n";
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/icons/rich-text/olist.svg?raw
|
|
226
|
-
var olist_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 6h10\" />\n <path d=\"M10 12h10\" />\n <path d=\"M10 18h10\" />\n <path d=\"M4 6h.01\" />\n <path d=\"M4 12h.01\" />\n <path d=\"M4 18h.01\" />\n</svg>\n";
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/icons/rich-text/paragraph.svg?raw
|
|
229
|
-
var paragraph_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">P</text>\n</svg>\n";
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/icons/rich-text/quote.svg?raw
|
|
232
|
-
var quote_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M8 10H6a2 2 0 0 0-2 2v2h4v-4z\" />\n <path d=\"M18 10h-2a2 2 0 0 0-2 2v2h4v-4z\" />\n</svg>\n";
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/icons/rich-text/strikethrough.svg?raw
|
|
235
|
-
var strikethrough_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M6 12h12\" />\n <path d=\"M9 7a3 3 0 0 1 6 0c0 4-6 2-6 6a3 3 0 0 0 6 0\" />\n</svg>\n";
|
|
236
|
-
//#endregion
|
|
237
|
-
//#region src/icons/rich-text/ulist.svg?raw
|
|
238
|
-
var ulist_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 6h10\" />\n <path d=\"M10 12h10\" />\n <path d=\"M10 18h10\" />\n <circle cx=\"4\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"4\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"4\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n</svg>\n";
|
|
239
|
-
//#endregion
|
|
240
|
-
//#region src/icons/rich-text/underline.svg?raw
|
|
241
|
-
var underline_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M8 6v5a4 4 0 0 0 8 0V6\" />\n <path d=\"M6 20h12\" />\n</svg>\n";
|
|
242
|
-
//#endregion
|
|
243
|
-
//#region src/js/modules/fields/rich-text.ts
|
|
244
|
-
var CONTAINER_SELECTOR = "[data-formie-rich-text]";
|
|
245
|
-
var FIELD_SELECTOR = "[data-formie-field], [data-formie-field-handle]";
|
|
246
|
-
var INPUT_SELECTOR = "textarea[data-formie-multi-line-text-input]";
|
|
247
|
-
var MODULE_ID = "rich-text";
|
|
248
|
-
ensureModuleStyles(MODULE_ID, [
|
|
249
|
-
_tokens_default,
|
|
250
|
-
pell_min_default,
|
|
251
|
-
_rich_text_default
|
|
252
|
-
]);
|
|
253
|
-
var RICH_TEXT_ICONS = {
|
|
254
|
-
bold: bold_default,
|
|
255
|
-
italic: italic_default,
|
|
256
|
-
underline: underline_default,
|
|
257
|
-
strikethrough: strikethrough_default,
|
|
258
|
-
heading1: heading1_default,
|
|
259
|
-
heading2: heading2_default,
|
|
260
|
-
paragraph: paragraph_default,
|
|
261
|
-
quote: quote_default,
|
|
262
|
-
olist: olist_default,
|
|
263
|
-
ulist: ulist_default,
|
|
264
|
-
code: code_default,
|
|
265
|
-
line: line_default,
|
|
266
|
-
link: link_default,
|
|
267
|
-
image: image_default,
|
|
268
|
-
alignleft: alignleft_default,
|
|
269
|
-
aligncenter: aligncenter_default,
|
|
270
|
-
alignright: alignright_default,
|
|
271
|
-
clear: clear_default
|
|
272
|
-
};
|
|
273
|
-
function hasRichTextField(target) {
|
|
274
|
-
if (target.matches(FIELD_SELECTOR)) return !!target.querySelector(CONTAINER_SELECTOR) && !!target.querySelector(INPUT_SELECTOR);
|
|
275
|
-
return Array.from(target.querySelectorAll(FIELD_SELECTOR)).some((field) => {
|
|
276
|
-
return !!field.querySelector(CONTAINER_SELECTOR) && !!field.querySelector(INPUT_SELECTOR);
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
function getActionDefinitions() {
|
|
280
|
-
return [
|
|
281
|
-
{
|
|
282
|
-
name: "bold",
|
|
283
|
-
icon: RICH_TEXT_ICONS.bold
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: "italic",
|
|
287
|
-
icon: RICH_TEXT_ICONS.italic
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
name: "underline",
|
|
291
|
-
icon: RICH_TEXT_ICONS.underline
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
name: "strikethrough",
|
|
295
|
-
icon: RICH_TEXT_ICONS.strikethrough
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: "heading1",
|
|
299
|
-
icon: RICH_TEXT_ICONS.heading1
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
name: "heading2",
|
|
303
|
-
icon: RICH_TEXT_ICONS.heading2
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
name: "paragraph",
|
|
307
|
-
icon: RICH_TEXT_ICONS.paragraph
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
name: "quote",
|
|
311
|
-
icon: RICH_TEXT_ICONS.quote
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
name: "olist",
|
|
315
|
-
icon: RICH_TEXT_ICONS.olist
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
name: "ulist",
|
|
319
|
-
icon: RICH_TEXT_ICONS.ulist
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
name: "code",
|
|
323
|
-
icon: RICH_TEXT_ICONS.code
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
name: "line",
|
|
327
|
-
icon: RICH_TEXT_ICONS.line
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: "link",
|
|
331
|
-
icon: RICH_TEXT_ICONS.link
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
name: "image",
|
|
335
|
-
icon: RICH_TEXT_ICONS.image
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
name: "alignleft",
|
|
339
|
-
icon: RICH_TEXT_ICONS.alignleft,
|
|
340
|
-
title: "Align Left",
|
|
341
|
-
result: () => (0, import_pell_min.exec)("justifyLeft", "")
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
name: "aligncenter",
|
|
345
|
-
icon: RICH_TEXT_ICONS.aligncenter,
|
|
346
|
-
title: "Align Center",
|
|
347
|
-
result: () => (0, import_pell_min.exec)("justifyCenter", "")
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
name: "alignright",
|
|
351
|
-
icon: RICH_TEXT_ICONS.alignright,
|
|
352
|
-
title: "Align Right",
|
|
353
|
-
result: () => (0, import_pell_min.exec)("justifyRight", "")
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
name: "clear",
|
|
357
|
-
icon: RICH_TEXT_ICONS.clear,
|
|
358
|
-
title: "Clear",
|
|
359
|
-
result: () => {
|
|
360
|
-
const selection = window.getSelection()?.toString() || "";
|
|
361
|
-
if (selection) {
|
|
362
|
-
const linesToDelete = selection.split("\n").join("<br>");
|
|
363
|
-
(0, import_pell_min.exec)("formatBlock", "<p>");
|
|
364
|
-
document.execCommand("insertHTML", false, linesToDelete);
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
(0, import_pell_min.exec)("formatBlock", "<p>");
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
];
|
|
371
|
-
}
|
|
372
|
-
function getActions(buttons) {
|
|
373
|
-
const selectedButtons = buttons?.length ? buttons : ["bold", "italic"];
|
|
374
|
-
const definitions = getActionDefinitions();
|
|
375
|
-
return selectedButtons.map((button) => {
|
|
376
|
-
return definitions.find((definition) => {
|
|
377
|
-
return definition.name === button;
|
|
378
|
-
});
|
|
379
|
-
}).filter((definition) => {
|
|
380
|
-
return !!definition;
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
function initRichTextField(container, input, options) {
|
|
384
|
-
const pellOptions = {
|
|
385
|
-
element: container,
|
|
386
|
-
defaultParagraphSeparator: "p",
|
|
387
|
-
styleWithCSS: true,
|
|
388
|
-
actions: getActions(options.buttons),
|
|
389
|
-
onChange: (html) => {
|
|
390
|
-
input.value = input.placeholder && html === "<p><br></p>" ? "" : html;
|
|
391
|
-
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
392
|
-
dispatchFieldEvent(input, MODULE_ID, "populate", {
|
|
393
|
-
richText: input,
|
|
394
|
-
value: input.value
|
|
395
|
-
});
|
|
396
|
-
},
|
|
397
|
-
classes: {
|
|
398
|
-
actionbar: "formie-rich-text-toolbar",
|
|
399
|
-
button: "formie-rich-text-button",
|
|
400
|
-
content: "formie-input formie-rich-text-content",
|
|
401
|
-
selected: "formie-rich-text-selected"
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
dispatchFieldEvent(input, MODULE_ID, "before-init", {
|
|
405
|
-
richText: input,
|
|
406
|
-
options: pellOptions
|
|
407
|
-
});
|
|
408
|
-
const editor = (0, import_pell_min.init)(pellOptions);
|
|
409
|
-
input.richText = editor;
|
|
410
|
-
editor.content.innerHTML = input.value || "";
|
|
411
|
-
if (input.placeholder) editor.content.setAttribute("data-placeholder", input.placeholder);
|
|
412
|
-
dispatchFieldEvent(input, MODULE_ID, "after-init", { richText: editor });
|
|
413
|
-
return () => {
|
|
414
|
-
container.innerHTML = "";
|
|
415
|
-
delete input.richText;
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
var richTextModule = {
|
|
419
|
-
id: MODULE_ID,
|
|
420
|
-
kind: "field",
|
|
421
|
-
match: (ctx) => {
|
|
422
|
-
return ctx.target instanceof HTMLElement && hasRichTextField(ctx.target);
|
|
423
|
-
},
|
|
424
|
-
setup: async (ctx) => {
|
|
425
|
-
const options = ctx.options || {};
|
|
426
|
-
const cleanups = getModuleFieldContainers(ctx).map((field) => {
|
|
427
|
-
const container = field.querySelector(CONTAINER_SELECTOR);
|
|
428
|
-
const input = field.querySelector(INPUT_SELECTOR);
|
|
429
|
-
if (!(container instanceof HTMLElement) || !(input instanceof HTMLTextAreaElement)) return () => {};
|
|
430
|
-
return initRichTextField(container, input, options);
|
|
431
|
-
});
|
|
432
|
-
await ctx.emit("formie:module:rich-text:init", { count: cleanups.length });
|
|
433
|
-
return { destroy: () => {
|
|
434
|
-
cleanups.forEach((cleanup) => {
|
|
435
|
-
cleanup();
|
|
436
|
-
});
|
|
437
|
-
ctx.emit("formie:module:rich-text:destroy", {});
|
|
438
|
-
} };
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
//#endregion
|
|
442
|
-
export { richTextModule };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as waitFor } from "./async-B3DUf1GZ.js";
|
|
2
|
-
//#region src/js/utils/scripts.ts
|
|
3
|
-
var scriptLoadCache = /* @__PURE__ */ new Map();
|
|
4
|
-
async function ensureGlobal(globalName, timeoutMs = 5e3) {
|
|
5
|
-
return waitFor(() => {
|
|
6
|
-
const value = window[globalName];
|
|
7
|
-
if (typeof value === "undefined" || value === null) return null;
|
|
8
|
-
return value;
|
|
9
|
-
}, {
|
|
10
|
-
timeoutMs,
|
|
11
|
-
intervalMs: 30
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
async function loadExternalScript({ id, src, async = true, defer = true }) {
|
|
15
|
-
const existing = document.getElementById(id);
|
|
16
|
-
if (existing) return existing;
|
|
17
|
-
if (!scriptLoadCache.has(id)) scriptLoadCache.set(id, new Promise((resolve, reject) => {
|
|
18
|
-
const script = document.createElement("script");
|
|
19
|
-
script.id = id;
|
|
20
|
-
script.src = src;
|
|
21
|
-
script.async = async;
|
|
22
|
-
script.defer = defer;
|
|
23
|
-
script.onload = () => {
|
|
24
|
-
resolve(script);
|
|
25
|
-
};
|
|
26
|
-
script.onerror = () => {
|
|
27
|
-
scriptLoadCache.delete(id);
|
|
28
|
-
reject(/* @__PURE__ */ new Error(`Failed to load external script: ${src}`));
|
|
29
|
-
};
|
|
30
|
-
document.body.appendChild(script);
|
|
31
|
-
}));
|
|
32
|
-
return scriptLoadCache.get(id);
|
|
33
|
-
}
|
|
34
|
-
async function loadScriptAndEnsureGlobal(globalName, options) {
|
|
35
|
-
const existing = window[globalName];
|
|
36
|
-
if (typeof existing !== "undefined" && existing !== null) return existing;
|
|
37
|
-
await loadExternalScript(options);
|
|
38
|
-
return ensureGlobal(globalName, options.timeoutMs);
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { loadExternalScript as n, loadScriptAndEnsureGlobal as r, ensureGlobal as t };
|