@tempots/beatui 0.80.0 → 0.82.0
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/dist/{ar-DwHLVgKj.cjs → ar-D7CXDmVZ.cjs} +1 -1
- package/dist/{ar-Bo_FZZi7.js → ar-nOSKXpIW.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +101 -99
- package/dist/beatui.css +393 -0
- package/dist/beatui.tailwind.css +393 -0
- package/dist/{de-zI5mdV4M.cjs → de-WzsOu9Gn.cjs} +1 -1
- package/dist/{de-CCqwOkqN.js → de-f2xcEb34.js} +1 -1
- package/dist/{deep-merge-1uN6CG6K.js → deep-merge-CiOwVWn8.js} +269 -284
- package/dist/deep-merge-DxZqCkE5.cjs +1 -0
- package/dist/{duration-input-C9kpsw-t.js → duration-input-B3vnnwBZ.js} +30 -29
- package/dist/duration-input-Dg5SX3lM.cjs +1 -0
- package/dist/{es-BF02UrPL.js → es-CDqqzpCw.js} +1 -1
- package/dist/{es-Cw90CAbu.cjs → es-Ds2Xf3wV.cjs} +1 -1
- package/dist/{fa-DPQV4YB8.js → fa-C7tE_hR3.js} +1 -1
- package/dist/{fa-B4lssnzR.cjs → fa-Ct1UtDB7.cjs} +1 -1
- package/dist/{fr-1Kd6z1F-.cjs → fr-CzAkRFed.cjs} +1 -1
- package/dist/{fr-dmxPhwkD.js → fr-yOW_68YY.js} +1 -1
- package/dist/{he-BtQbrVt3.js → he-D2oUloCJ.js} +1 -1
- package/dist/{he-CJ3XnuPm.cjs → he-DlXALrK7.cjs} +1 -1
- package/dist/{hi-BpfnFKHp.cjs → hi-3dBhLwDs.cjs} +1 -1
- package/dist/{hi-D_Le4Yka.js → hi-D5ZlZoQq.js} +1 -1
- package/dist/{index-CfaWytS2.cjs → index-C5YCCgnn.cjs} +1 -1
- package/dist/{index-K6u33-GC.cjs → index-ChsRjiIp.cjs} +17 -17
- package/dist/{index-CGEzILlC.js → index-CiAVfKIZ.js} +1 -1
- package/dist/{index-YtW7SCWB.js → index-DT6-HMMz.js} +8 -7
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +296 -291
- package/dist/{it-DyHjSuHN.js → it-6e6X-4BB.js} +1 -1
- package/dist/{it-COCZ9NyB.cjs → it-DohtcWi9.cjs} +1 -1
- package/dist/{ja-X43lABza.js → ja-BxNuNo2H.js} +1 -1
- package/dist/{ja--NdggLU9.cjs → ja-eyTArrgS.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -8
- package/dist/json-schema/index.es.js +1391 -7471
- package/dist/json-schema-display/index.cjs.js +1 -0
- package/dist/json-schema-display/index.es.js +846 -0
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +89 -87
- package/dist/{ko-BUvb0ggK.cjs → ko-BFLCDMMs.cjs} +1 -1
- package/dist/{ko-B9g9iw99.js → ko-Ch0jFsBV.js} +1 -1
- package/dist/modal-D2xE47kr.cjs +1 -0
- package/dist/{modal-CSHIhHvI.js → modal-hkQD1bqZ.js} +22 -21
- package/dist/{nl-0S25Gsld.cjs → nl-Bx2ACvr4.cjs} +1 -1
- package/dist/{nl-Ew5jnSsT.js → nl-NuTdZO1s.js} +1 -1
- package/dist/notice-C0SmlheE.cjs +1 -0
- package/dist/{notice-C-964yaY.js → notice-CZHWWwOQ.js} +52 -51
- package/dist/oneof-branch-detection-BVNoKU9d.js +6281 -0
- package/dist/oneof-branch-detection-C8g3eWnx.cjs +8 -0
- package/dist/{pl-C9f6UBSe.js → pl-Bs4nLJ__.js} +1 -1
- package/dist/{pl-B3k-K3S4.cjs → pl-QHl6sl8f.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-DYtAvbrw.js → pt-BETjHZrL.js} +1 -1
- package/dist/{pt-CKoikRO5.cjs → pt-DZGw2Z-1.cjs} +1 -1
- package/dist/{ru-ZexN-b8V.js → ru-Bi1_DEKM.js} +1 -1
- package/dist/{ru-COb7RSDt.cjs → ru-D03IuLqh.cjs} +1 -1
- package/dist/stack-BJgsPJ9A.js +873 -0
- package/dist/stack-DcZ_u50f.cjs +1 -0
- package/dist/string-B9vVyfq3.cjs +1 -0
- package/dist/string-DYyMxBl-.js +19 -0
- package/dist/text-input-CByq5OIo.cjs +1 -0
- package/dist/text-input-CFJntP7G.js +287 -0
- package/dist/{toolbar-DNpBIoJo.js → toolbar-DR2Zd4Oo.js} +1 -1
- package/dist/toolbar-TPWYzoiF.cjs +1 -0
- package/dist/{tr-tO_EH-Y2.cjs → tr-B_-_1wua.cjs} +1 -1
- package/dist/{tr-BDvn05-H.js → tr-DiYB-FwX.js} +1 -1
- package/dist/translations-B4-Zd2LM.cjs +1 -0
- package/dist/translations-Cq8bUKJP.js +584 -0
- package/dist/{translations-DwGC_94w.cjs → translations-D62qqNV9.cjs} +1 -1
- package/dist/{translations-CfWR4loD.js → translations-DPr6c05Z.js} +1 -1
- package/dist/types/components/json-schema/schema-conditionals.d.ts +11 -0
- package/dist/types/components/json-schema/schema-context.d.ts +1 -1
- package/dist/types/components/json-schema-display/display-widget-customization.d.ts +61 -0
- package/dist/types/components/json-schema-display/display-wrapper.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/any-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/array-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/boolean-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/composition-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/enum-const-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/generic-display.d.ts +18 -0
- package/dist/types/components/json-schema-display/displays/null-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/number-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/object-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/string-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/index.d.ts +14 -0
- package/dist/types/components/json-schema-display/json-schema-display.d.ts +25 -0
- package/dist/types/components/json-schema-display/mismatch.d.ts +14 -0
- package/dist/types/json-schema-display/index.d.ts +1 -0
- package/dist/{ur-DbEqQgS6.js → ur-B69X-xNs.js} +1 -1
- package/dist/{ur-BbnYJ3HS.cjs → ur-DyUSmIbo.cjs} +1 -1
- package/dist/use-form-CgZyrACX.js +864 -0
- package/dist/use-form-JjeKCINk.cjs +2 -0
- package/dist/utils-DEbsp9Q9.js +129 -0
- package/dist/utils-DIUEhA-Z.cjs +1 -0
- package/dist/{vi-CpZUeuSj.js → vi-BdzxA60L.js} +1 -1
- package/dist/{vi-ByBwvGQY.cjs → vi-CBmPaHxg.cjs} +1 -1
- package/dist/widget-customization-DRA7E9Zf.js +1072 -0
- package/dist/widget-customization-G-QLB1rw.cjs +1 -0
- package/dist/{zh-DnxK0ieB.cjs → zh-Cb1b8uik.cjs} +1 -1
- package/dist/{zh-DJyhKO0I.js → zh-Dn1UJiZa.js} +1 -1
- package/package.json +13 -7
- package/dist/deep-merge-CBIkQM4E.cjs +0 -1
- package/dist/duration-input-DHWhQJnn.cjs +0 -1
- package/dist/modal-cc8Ehngz.cjs +0 -1
- package/dist/notice-C_BWqu2K.cjs +0 -1
- package/dist/toolbar-D5FcnRju.cjs +0 -1
- package/dist/translations-0tLX4x7M.js +0 -866
- package/dist/translations-WPN3ibDg.cjs +0 -1
- package/dist/use-form-D4JFOcjo.cjs +0 -2
- package/dist/use-form-D4rqJkvG.js +0 -1731
- package/dist/widget-customization-BSjJz3_Y.js +0 -1195
- package/dist/widget-customization-CrFVrt4V.cjs +0 -1
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { makeProviderMark as B, localStorageProp as w, computedOf as p, Use as $, html as g, attr as u, When as k, Fragment as v, aria as f, coalesce as V, style as I, prop as x } from "@tempots/dom";
|
|
2
|
+
import { WhenInViewport as F, Query as T } from "@tempots/ui";
|
|
3
|
+
import { b as j, g as R } from "./colors-DPo9GEJR.js";
|
|
4
|
+
function N(e, {
|
|
5
|
+
units: t = ["B", "KB", "MB", "GB", "TB"],
|
|
6
|
+
decimalPlaces: o = 0,
|
|
7
|
+
locale: a
|
|
8
|
+
} = {}) {
|
|
9
|
+
if (e === 0 || e === 0n)
|
|
10
|
+
return new Intl.NumberFormat(a, {
|
|
11
|
+
style: "unit",
|
|
12
|
+
unit: "byte",
|
|
13
|
+
unitDisplay: "short",
|
|
14
|
+
maximumFractionDigits: 0
|
|
15
|
+
}).format(0).replace("byte", t[0]);
|
|
16
|
+
let n, r;
|
|
17
|
+
if (typeof e == "bigint") {
|
|
18
|
+
let l = e < 0n ? -e : e;
|
|
19
|
+
for (n = 0; l >= 1024n && n < t.length - 1; )
|
|
20
|
+
l = l / 1024n, n++;
|
|
21
|
+
r = Number(e) / Math.pow(1024, n);
|
|
22
|
+
} else
|
|
23
|
+
n = Math.floor(Math.log(Math.abs(e)) / Math.log(1024)), n = Math.min(n, t.length - 1), r = e / Math.pow(1024, n);
|
|
24
|
+
return new Intl.NumberFormat(a, {
|
|
25
|
+
style: "unit",
|
|
26
|
+
unit: "byte",
|
|
27
|
+
unitDisplay: "short",
|
|
28
|
+
minimumFractionDigits: n === 0 ? 0 : o,
|
|
29
|
+
maximumFractionDigits: n === 0 ? 0 : o
|
|
30
|
+
}).format(r).replace("byte", t[n]);
|
|
31
|
+
}
|
|
32
|
+
const O = {
|
|
33
|
+
loadingExtended: "Loading, please wait",
|
|
34
|
+
loadingShort: "Loading...",
|
|
35
|
+
locale: "Locale",
|
|
36
|
+
iconDescription: "Icon",
|
|
37
|
+
loadingIcon: "Loading icon",
|
|
38
|
+
failedToLoadIcon: "Failed to load icon",
|
|
39
|
+
editLabel: "Edit",
|
|
40
|
+
selectOne: "Select one",
|
|
41
|
+
selectNone: "None",
|
|
42
|
+
selectMany: "Select many",
|
|
43
|
+
noResults: "No results",
|
|
44
|
+
passwordPlaceholderText: "Secret Password",
|
|
45
|
+
togglePasswordVisibility: "Toggle password visibility",
|
|
46
|
+
toggleMenu: "Toggle menu",
|
|
47
|
+
toggleAside: "Toggle aside",
|
|
48
|
+
mainNavigation: "Main navigation",
|
|
49
|
+
sidebar: "Sidebar",
|
|
50
|
+
closeDrawer: "Close drawer",
|
|
51
|
+
closeModal: "Close modal",
|
|
52
|
+
confirm: "Confirm",
|
|
53
|
+
cancel: "Cancel",
|
|
54
|
+
addLabel: "Add",
|
|
55
|
+
removeItem: "Remove item",
|
|
56
|
+
// languages
|
|
57
|
+
currentLocale: "English",
|
|
58
|
+
ar: "Arabic",
|
|
59
|
+
de: "German",
|
|
60
|
+
en: "English",
|
|
61
|
+
es: "Spanish",
|
|
62
|
+
fr: "French",
|
|
63
|
+
hi: "Hindi",
|
|
64
|
+
it: "Italian",
|
|
65
|
+
ja: "Japanese",
|
|
66
|
+
ko: "Korean",
|
|
67
|
+
nl: "Dutch",
|
|
68
|
+
pl: "Polish",
|
|
69
|
+
pt: "Portuguese",
|
|
70
|
+
ru: "Russian",
|
|
71
|
+
tr: "Turkish",
|
|
72
|
+
vi: "Vietnamese",
|
|
73
|
+
zh: "Chinese",
|
|
74
|
+
he: "Hebrew",
|
|
75
|
+
fa: "Persian",
|
|
76
|
+
ur: "Urdu",
|
|
77
|
+
// input
|
|
78
|
+
emailPlaceholderText: "Enter your email",
|
|
79
|
+
incrementValue: "Increment value",
|
|
80
|
+
decrementValue: "Decrement value",
|
|
81
|
+
// drop zone
|
|
82
|
+
dropZoneInstructions: (e) => e ? "Click to choose or drag files here, or press Enter or Space to open file selector" : "Drag files here",
|
|
83
|
+
// size
|
|
84
|
+
fileSizeUnits: ["Bytes", "KB", "MB", "GB", "TB"],
|
|
85
|
+
// file input
|
|
86
|
+
removeFile: "Remove file",
|
|
87
|
+
clearAllFiles: "Clear all files",
|
|
88
|
+
// inputs reset
|
|
89
|
+
clearValue: "Reset",
|
|
90
|
+
unknownType: "Unknown type",
|
|
91
|
+
filesInputInstructions: (e, t, o) => {
|
|
92
|
+
let a = e == null || e > 1 ? "Click to choose or drag files here" : "Click to choose or drag a file here";
|
|
93
|
+
if (e || t) {
|
|
94
|
+
const n = [];
|
|
95
|
+
if (e != null && e > 1 && n.push(`up to ${e} files`), t && o) {
|
|
96
|
+
const r = N(t, {
|
|
97
|
+
units: o
|
|
98
|
+
});
|
|
99
|
+
n.push(`max ${r} each`);
|
|
100
|
+
}
|
|
101
|
+
n.length > 0 && (a += ` (${n.join(", ")})`);
|
|
102
|
+
}
|
|
103
|
+
return a;
|
|
104
|
+
},
|
|
105
|
+
// ProseMirror editor
|
|
106
|
+
prosemirror: {
|
|
107
|
+
bold: "Bold",
|
|
108
|
+
italic: "Italic",
|
|
109
|
+
code: "Inline code",
|
|
110
|
+
link: "Insert link",
|
|
111
|
+
removeLink: "Remove link",
|
|
112
|
+
heading: (e) => `Heading ${e}`,
|
|
113
|
+
bulletList: "Bullet list",
|
|
114
|
+
orderedList: "Ordered list",
|
|
115
|
+
blockquote: "Blockquote",
|
|
116
|
+
codeBlock: "Code block",
|
|
117
|
+
horizontalRule: "Horizontal rule",
|
|
118
|
+
linkUrlPlaceholder: "https://example.com"
|
|
119
|
+
},
|
|
120
|
+
// PDF Page Viewer
|
|
121
|
+
pdfPageViewer: {
|
|
122
|
+
loading: "Loading PDF...",
|
|
123
|
+
loadFailed: "Failed to load PDF",
|
|
124
|
+
invalidPdf: "Invalid PDF file",
|
|
125
|
+
pageOutOfRange: (e, t) => `Page ${e} is out of range (1-${t})`,
|
|
126
|
+
renderFailed: "Failed to render PDF page"
|
|
127
|
+
}
|
|
128
|
+
}, C = O, P = "en", E = /* @__PURE__ */ new Set([
|
|
129
|
+
"ar",
|
|
130
|
+
// Arabic
|
|
131
|
+
"he",
|
|
132
|
+
// Hebrew
|
|
133
|
+
"fa",
|
|
134
|
+
// Persian/Farsi
|
|
135
|
+
"ur",
|
|
136
|
+
// Urdu
|
|
137
|
+
"ps",
|
|
138
|
+
// Pashto
|
|
139
|
+
"sd",
|
|
140
|
+
// Sindhi
|
|
141
|
+
"ku",
|
|
142
|
+
// Kurdish
|
|
143
|
+
"dv",
|
|
144
|
+
// Divehi/Maldivian
|
|
145
|
+
"yi",
|
|
146
|
+
// Yiddish
|
|
147
|
+
"ji",
|
|
148
|
+
// Yiddish (alternative code)
|
|
149
|
+
"iw",
|
|
150
|
+
// Hebrew (deprecated, but still used)
|
|
151
|
+
"in"
|
|
152
|
+
// Indonesian (deprecated, but sometimes confused)
|
|
153
|
+
]);
|
|
154
|
+
function D(e) {
|
|
155
|
+
if (!e) return "ltr";
|
|
156
|
+
const t = e.split(/[-_]/)[0].toLowerCase();
|
|
157
|
+
return E.has(t) ? "rtl" : "ltr";
|
|
158
|
+
}
|
|
159
|
+
function A(e, t) {
|
|
160
|
+
return e === "auto" ? D(t) : e;
|
|
161
|
+
}
|
|
162
|
+
function ue(e) {
|
|
163
|
+
return `b-${e}`;
|
|
164
|
+
}
|
|
165
|
+
function de(e) {
|
|
166
|
+
return D(e) === "rtl";
|
|
167
|
+
}
|
|
168
|
+
function fe(e) {
|
|
169
|
+
return e === "ltr" ? "rtl" : "ltr";
|
|
170
|
+
}
|
|
171
|
+
const U = {
|
|
172
|
+
ltr: {
|
|
173
|
+
"inline-start": "left",
|
|
174
|
+
"inline-end": "right",
|
|
175
|
+
"block-start": "top",
|
|
176
|
+
"block-end": "bottom"
|
|
177
|
+
},
|
|
178
|
+
rtl: {
|
|
179
|
+
"inline-start": "right",
|
|
180
|
+
"inline-end": "left",
|
|
181
|
+
"block-start": "top",
|
|
182
|
+
"block-end": "bottom"
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
function he(e, t) {
|
|
186
|
+
return U[t][e];
|
|
187
|
+
}
|
|
188
|
+
const _ = {
|
|
189
|
+
mark: B("Locale"),
|
|
190
|
+
create: (e) => {
|
|
191
|
+
const t = w({
|
|
192
|
+
defaultValue: navigator.language ?? "en-US",
|
|
193
|
+
key: "beatui-locale"
|
|
194
|
+
}), o = w({
|
|
195
|
+
defaultValue: "auto",
|
|
196
|
+
key: "beatui-direction-preference"
|
|
197
|
+
}), a = p(
|
|
198
|
+
t,
|
|
199
|
+
o
|
|
200
|
+
)(
|
|
201
|
+
(r, i) => A(i, r)
|
|
202
|
+
);
|
|
203
|
+
return {
|
|
204
|
+
value: {
|
|
205
|
+
locale: t,
|
|
206
|
+
setLocale: (r) => t.set(r),
|
|
207
|
+
direction: a,
|
|
208
|
+
directionPreference: o,
|
|
209
|
+
setDirectionPreference: (r) => o.set(r)
|
|
210
|
+
},
|
|
211
|
+
dispose: () => {
|
|
212
|
+
t.dispose(), o.dispose(), a.dispose();
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
variants: G,
|
|
218
|
+
special: q,
|
|
219
|
+
overrides: y
|
|
220
|
+
} = j;
|
|
221
|
+
function d(e, t) {
|
|
222
|
+
switch (e) {
|
|
223
|
+
case "white":
|
|
224
|
+
return "var(--color-white)";
|
|
225
|
+
case "black":
|
|
226
|
+
return "var(--color-black)";
|
|
227
|
+
case "transparent":
|
|
228
|
+
return "transparent";
|
|
229
|
+
default:
|
|
230
|
+
return R(e, t);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function S(e, t) {
|
|
234
|
+
const o = q[e];
|
|
235
|
+
if (!o) return;
|
|
236
|
+
if (t === "light")
|
|
237
|
+
return o;
|
|
238
|
+
const a = y[e];
|
|
239
|
+
return a ? a[t] : o;
|
|
240
|
+
}
|
|
241
|
+
function ge(e, t, o) {
|
|
242
|
+
const a = y[e];
|
|
243
|
+
if (a) {
|
|
244
|
+
const r = a[o];
|
|
245
|
+
if (r)
|
|
246
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
247
|
+
}
|
|
248
|
+
if (t === "solid") {
|
|
249
|
+
const r = S(e, o);
|
|
250
|
+
if (r)
|
|
251
|
+
return {
|
|
252
|
+
backgroundColor: r.backgroundColor,
|
|
253
|
+
textColor: r.color
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
const n = G[t][o];
|
|
257
|
+
return {
|
|
258
|
+
backgroundColor: d(e, n.bgShade),
|
|
259
|
+
textColor: n.textColor
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const H = {
|
|
263
|
+
light: { shade: 600, textColor: "var(--color-white)" },
|
|
264
|
+
dark: { shade: 600, textColor: "var(--text-inverted-dark)" }
|
|
265
|
+
}, z = {
|
|
266
|
+
light: { shade: 300, textColor: "var(--text-normal-light)" },
|
|
267
|
+
dark: { shade: 700, textColor: "var(--text-normal-dark)" }
|
|
268
|
+
}, K = {
|
|
269
|
+
light: { shade: 400, textColor: "var(--text-normal-light)" },
|
|
270
|
+
dark: { shade: 600, textColor: "var(--text-normal-dark)" }
|
|
271
|
+
};
|
|
272
|
+
function pe(e, t, o) {
|
|
273
|
+
const a = y[e];
|
|
274
|
+
if (a) {
|
|
275
|
+
const r = a[o];
|
|
276
|
+
if (r)
|
|
277
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
278
|
+
}
|
|
279
|
+
if (t === "solid") {
|
|
280
|
+
const r = S(e, o);
|
|
281
|
+
if (r)
|
|
282
|
+
return {
|
|
283
|
+
backgroundColor: r.backgroundColor,
|
|
284
|
+
textColor: r.color
|
|
285
|
+
};
|
|
286
|
+
const i = H[o];
|
|
287
|
+
return {
|
|
288
|
+
backgroundColor: d(e, i.shade),
|
|
289
|
+
textColor: i.textColor
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
const n = t === "light" ? z[o] : K[o];
|
|
293
|
+
return {
|
|
294
|
+
backgroundColor: d(e, n.shade),
|
|
295
|
+
textColor: n.textColor
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function me(e, t) {
|
|
299
|
+
const o = t === "light" ? 500 : 600;
|
|
300
|
+
switch (e) {
|
|
301
|
+
case "white":
|
|
302
|
+
return t === "light" ? "var(--text-inverse-light)" : "var(--text-inverted-dark)";
|
|
303
|
+
case "black":
|
|
304
|
+
return "var(--color-black)";
|
|
305
|
+
case "transparent":
|
|
306
|
+
return "transparent";
|
|
307
|
+
default:
|
|
308
|
+
return d(e, o);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function be(e, t) {
|
|
312
|
+
return e === "white" ? "var(--color-white)" : e === "black" ? "var(--color-black)" : e === "transparent" ? "inherit" : d(e, t === "light" ? 800 : 200);
|
|
313
|
+
}
|
|
314
|
+
function L(e, t, o) {
|
|
315
|
+
return t === "soft" ? d(e, o === "light" ? 300 : 700) : d(e, o === "light" ? 500 : 600);
|
|
316
|
+
}
|
|
317
|
+
const W = "bui-icons", m = /* @__PURE__ */ new Map(), M = (() => {
|
|
318
|
+
try {
|
|
319
|
+
return typeof indexedDB < "u" && indexedDB !== null;
|
|
320
|
+
} catch {
|
|
321
|
+
return !1;
|
|
322
|
+
}
|
|
323
|
+
})();
|
|
324
|
+
function J() {
|
|
325
|
+
return M ? new Promise((e, t) => {
|
|
326
|
+
const o = indexedDB.open(W, 1);
|
|
327
|
+
o.onupgradeneeded = function(a) {
|
|
328
|
+
const n = a.target.result;
|
|
329
|
+
n.objectStoreNames.contains("icons") || n.createObjectStore("icons");
|
|
330
|
+
}, o.onsuccess = function() {
|
|
331
|
+
e(o.result);
|
|
332
|
+
}, o.onerror = function() {
|
|
333
|
+
t(o.error);
|
|
334
|
+
};
|
|
335
|
+
}) : Promise.reject(new Error("IndexedDB not available"));
|
|
336
|
+
}
|
|
337
|
+
const b = M ? J() : null;
|
|
338
|
+
async function Q(e, t) {
|
|
339
|
+
try {
|
|
340
|
+
if (b) {
|
|
341
|
+
const o = await b;
|
|
342
|
+
return new Promise((a, n) => {
|
|
343
|
+
const r = o.transaction("icons", "readwrite");
|
|
344
|
+
r.objectStore("icons").put(t, e), r.oncomplete = () => a(), r.onerror = n;
|
|
345
|
+
});
|
|
346
|
+
} else
|
|
347
|
+
m.set(e, t);
|
|
348
|
+
} catch {
|
|
349
|
+
m.set(e, t);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
async function Y(e) {
|
|
353
|
+
try {
|
|
354
|
+
if (b) {
|
|
355
|
+
const t = await b;
|
|
356
|
+
return new Promise((o, a) => {
|
|
357
|
+
const i = t.transaction("icons", "readonly").objectStore("icons").get(e);
|
|
358
|
+
i.onsuccess = function() {
|
|
359
|
+
o(i.result);
|
|
360
|
+
}, i.onerror = a;
|
|
361
|
+
});
|
|
362
|
+
} else
|
|
363
|
+
return m.get(e) || null;
|
|
364
|
+
} catch {
|
|
365
|
+
return m.get(e) || null;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
async function Z(e) {
|
|
369
|
+
const t = `https://api.iconify.design/${e}.svg`;
|
|
370
|
+
return fetch(t).then((o) => {
|
|
371
|
+
if (o.status === 200)
|
|
372
|
+
return o.text();
|
|
373
|
+
throw new Error(`Failed to load icon: ${e}`);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
async function X(e) {
|
|
377
|
+
const t = e.replace(":", "/"), o = await Y(t);
|
|
378
|
+
if (o)
|
|
379
|
+
return o;
|
|
380
|
+
const a = await Z(t);
|
|
381
|
+
return await Q(t, a), a;
|
|
382
|
+
}
|
|
383
|
+
function ee(e) {
|
|
384
|
+
return ["bc-icon", `bc-icon--${e}`].join(" ");
|
|
385
|
+
}
|
|
386
|
+
function te(e, t = "solid") {
|
|
387
|
+
if (!e) return "";
|
|
388
|
+
const o = L(e, t, "light"), a = L(e, t, "dark");
|
|
389
|
+
return `--icon-color: ${o}; --icon-color-dark: ${a}`;
|
|
390
|
+
}
|
|
391
|
+
function ke({
|
|
392
|
+
icon: e,
|
|
393
|
+
size: t = "md",
|
|
394
|
+
color: o,
|
|
395
|
+
title: a,
|
|
396
|
+
accessibility: n = "auto",
|
|
397
|
+
tone: r = "solid"
|
|
398
|
+
}, ...i) {
|
|
399
|
+
const c = p(
|
|
400
|
+
n,
|
|
401
|
+
a
|
|
402
|
+
)((l, s) => l === "decorative" ? !1 : l === "informative" ? !0 : s != null && s !== "");
|
|
403
|
+
return $(
|
|
404
|
+
ie,
|
|
405
|
+
(l) => g.span(
|
|
406
|
+
u.class(
|
|
407
|
+
p(t, o)((s) => ee(s ?? "md"))
|
|
408
|
+
),
|
|
409
|
+
u.style(
|
|
410
|
+
p(
|
|
411
|
+
o,
|
|
412
|
+
r
|
|
413
|
+
)(
|
|
414
|
+
(s, h) => te(s ?? void 0, h ?? "solid")
|
|
415
|
+
)
|
|
416
|
+
),
|
|
417
|
+
// Add accessibility attributes based on icon type
|
|
418
|
+
k(
|
|
419
|
+
c,
|
|
420
|
+
() => v(
|
|
421
|
+
u.role("img"),
|
|
422
|
+
f.label(V(a, l.$.iconDescription))
|
|
423
|
+
),
|
|
424
|
+
() => f.hidden(!0)
|
|
425
|
+
),
|
|
426
|
+
F(
|
|
427
|
+
{ once: !0 },
|
|
428
|
+
() => T({
|
|
429
|
+
request: e,
|
|
430
|
+
load: ({ request: s }) => X(s),
|
|
431
|
+
convertError: String,
|
|
432
|
+
success: ({ value: s }) => g.span(
|
|
433
|
+
I.width("100%"),
|
|
434
|
+
I.height("100%"),
|
|
435
|
+
u.innerHTML(s)
|
|
436
|
+
),
|
|
437
|
+
pending: () => g.span(
|
|
438
|
+
u.class("animate-spin"),
|
|
439
|
+
// Loading state accessibility
|
|
440
|
+
k(
|
|
441
|
+
c,
|
|
442
|
+
() => v(u.role("img"), f.label(l.$.loadingIcon)),
|
|
443
|
+
() => f.hidden(!0)
|
|
444
|
+
),
|
|
445
|
+
"↻"
|
|
446
|
+
),
|
|
447
|
+
failure: ({ error: s }) => g.span(
|
|
448
|
+
u.title(s),
|
|
449
|
+
u.class("text-red-500"),
|
|
450
|
+
// Error state accessibility
|
|
451
|
+
k(
|
|
452
|
+
c,
|
|
453
|
+
() => v(u.role("img"), f.label(l.$.failedToLoadIcon)),
|
|
454
|
+
() => f.hidden(!0)
|
|
455
|
+
),
|
|
456
|
+
"🚫"
|
|
457
|
+
)
|
|
458
|
+
})
|
|
459
|
+
),
|
|
460
|
+
...i
|
|
461
|
+
)
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
function oe(e) {
|
|
465
|
+
const t = e.split("-"), o = [e];
|
|
466
|
+
return t.length > 1 && o.push(t[0]), o;
|
|
467
|
+
}
|
|
468
|
+
function re({
|
|
469
|
+
locale: e,
|
|
470
|
+
defaultLocale: t = "en-US",
|
|
471
|
+
defaultMessages: o,
|
|
472
|
+
localeLoader: a
|
|
473
|
+
}) {
|
|
474
|
+
const n = x(t), r = x(o), i = e.on(async (c) => {
|
|
475
|
+
if (c === n.value) return;
|
|
476
|
+
n.set(c);
|
|
477
|
+
const l = oe(c);
|
|
478
|
+
for (const s of l)
|
|
479
|
+
try {
|
|
480
|
+
const h = await a(s);
|
|
481
|
+
if (
|
|
482
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
483
|
+
typeof h.default == "object" && Object.keys(h).length === 1
|
|
484
|
+
) {
|
|
485
|
+
console.error(
|
|
486
|
+
"It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function."
|
|
487
|
+
);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
if (c === n.value) {
|
|
491
|
+
r.set(h);
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
} catch {
|
|
495
|
+
continue;
|
|
496
|
+
}
|
|
497
|
+
console.warn(`No locale found for "${e.value}", using fallback`), c === n.value && r.set(o);
|
|
498
|
+
});
|
|
499
|
+
return {
|
|
500
|
+
/** Clean up all resources and event listeners */
|
|
501
|
+
dispose: () => {
|
|
502
|
+
i(), n.dispose(), r.dispose();
|
|
503
|
+
},
|
|
504
|
+
/** Translation functions that return reactive signals */
|
|
505
|
+
t: r
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
function ne({
|
|
509
|
+
defaultLocale: e,
|
|
510
|
+
defaultMessages: t,
|
|
511
|
+
localeLoader: o,
|
|
512
|
+
providerName: a = "I18nProvider"
|
|
513
|
+
}) {
|
|
514
|
+
return {
|
|
515
|
+
mark: B(a),
|
|
516
|
+
create: (n, r) => {
|
|
517
|
+
const {
|
|
518
|
+
value: { locale: i }
|
|
519
|
+
} = r.getProvider(_.mark), { t: c, dispose: l } = re({
|
|
520
|
+
locale: i,
|
|
521
|
+
defaultMessages: t,
|
|
522
|
+
defaultLocale: e,
|
|
523
|
+
localeLoader: o
|
|
524
|
+
});
|
|
525
|
+
return {
|
|
526
|
+
value: c,
|
|
527
|
+
dispose: l
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
const ae = /* @__PURE__ */ Object.assign({
|
|
533
|
+
"./locales/ar.ts": () => import("./ar-nOSKXpIW.js").then((e) => e.default),
|
|
534
|
+
"./locales/de.ts": () => import("./de-f2xcEb34.js").then((e) => e.default),
|
|
535
|
+
"./locales/es.ts": () => import("./es-CDqqzpCw.js").then((e) => e.default),
|
|
536
|
+
"./locales/fa.ts": () => import("./fa-C7tE_hR3.js").then((e) => e.default),
|
|
537
|
+
"./locales/fr.ts": () => import("./fr-yOW_68YY.js").then((e) => e.default),
|
|
538
|
+
"./locales/he.ts": () => import("./he-D2oUloCJ.js").then((e) => e.default),
|
|
539
|
+
"./locales/hi.ts": () => import("./hi-D5ZlZoQq.js").then((e) => e.default),
|
|
540
|
+
"./locales/it.ts": () => import("./it-6e6X-4BB.js").then((e) => e.default),
|
|
541
|
+
"./locales/ja.ts": () => import("./ja-BxNuNo2H.js").then((e) => e.default),
|
|
542
|
+
"./locales/ko.ts": () => import("./ko-Ch0jFsBV.js").then((e) => e.default),
|
|
543
|
+
"./locales/nl.ts": () => import("./nl-NuTdZO1s.js").then((e) => e.default),
|
|
544
|
+
"./locales/pl.ts": () => import("./pl-Bs4nLJ__.js").then((e) => e.default),
|
|
545
|
+
"./locales/pt.ts": () => import("./pt-BETjHZrL.js").then((e) => e.default),
|
|
546
|
+
"./locales/ru.ts": () => import("./ru-Bi1_DEKM.js").then((e) => e.default),
|
|
547
|
+
"./locales/tr.ts": () => import("./tr-DiYB-FwX.js").then((e) => e.default),
|
|
548
|
+
"./locales/ur.ts": () => import("./ur-B69X-xNs.js").then((e) => e.default),
|
|
549
|
+
"./locales/vi.ts": () => import("./vi-BdzxA60L.js").then((e) => e.default),
|
|
550
|
+
"./locales/zh.ts": () => import("./zh-Dn1UJiZa.js").then((e) => e.default)
|
|
551
|
+
}), ie = ne({
|
|
552
|
+
defaultLocale: P,
|
|
553
|
+
defaultMessages: C,
|
|
554
|
+
localeLoader: async (e) => {
|
|
555
|
+
if (e === P) return C;
|
|
556
|
+
const t = ae[`./locales/${e}.ts`];
|
|
557
|
+
return t ? await t() : C;
|
|
558
|
+
},
|
|
559
|
+
providerName: "BeatUII18n"
|
|
560
|
+
});
|
|
561
|
+
export {
|
|
562
|
+
ie as B,
|
|
563
|
+
ke as I,
|
|
564
|
+
_ as L,
|
|
565
|
+
me as a,
|
|
566
|
+
ge as b,
|
|
567
|
+
P as c,
|
|
568
|
+
C as d,
|
|
569
|
+
re as e,
|
|
570
|
+
N as f,
|
|
571
|
+
Y as g,
|
|
572
|
+
pe as h,
|
|
573
|
+
M as i,
|
|
574
|
+
D as j,
|
|
575
|
+
ue as k,
|
|
576
|
+
de as l,
|
|
577
|
+
ne as m,
|
|
578
|
+
fe as n,
|
|
579
|
+
U as o,
|
|
580
|
+
he as p,
|
|
581
|
+
A as r,
|
|
582
|
+
Q as s,
|
|
583
|
+
be as t
|
|
584
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./translations-B4-Zd2LM.cjs"),n={signInTitle:"Sign In",signInButton:"Sign In",emailLabel:"Email",passwordLabel:"Password",rememberMeLabel:"Remember me",forgotPasswordLink:"Forgot password?",noAccountLink:"Don't have an account? Sign up",signUpTitle:"Sign Up",signUpButton:"Sign Up",nameLabel:"Name",confirmPasswordLabel:"Confirm Password",acceptTermsLabel:"I accept the terms and conditions",hasAccountLink:"Already have an account? Sign in",resetPasswordTitle:"Reset Password",resetPasswordButton:"Reset Password",resetPasswordDescription:"Enter your email to reset your password.",backToSignInLink:"Back to sign in",continueWithProvider:e=>`Continue with ${e}`,passwordStrengthWeak:"Weak",passwordStrengthFair:"Fair",passwordStrengthGood:"Good",passwordStrengthStrong:"Strong",orDivider:"or",error:"An error occurred",required:"Required",authenticationTitle:"Authentication"},r=n,s="en",a=Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-BsUm-TCn.cjs")).then(e=>e.default),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-BUFLEyKr.cjs")).then(e=>e.default),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-BxBeTRCv.cjs")).then(e=>e.default),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-DxPseW3g.cjs")).then(e=>e.default),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Cdyopuz3.cjs")).then(e=>e.default),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-DarDNPn0.cjs")).then(e=>e.default),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-tATwsXJ6.cjs")).then(e=>e.default),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-BmFag7j0.cjs")).then(e=>e.default),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-Dj-bAKLf.cjs")).then(e=>e.default),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BomUE-yQ.cjs")).then(e=>e.default),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-Dr-l6zUy.cjs")).then(e=>e.default),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-BK0i_yvq.cjs")).then(e=>e.default),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-oBMmVYcu.cjs")).then(e=>e.default),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CtxMmoa6.cjs")).then(e=>e.default),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-CgJ8uhZu.cjs")).then(e=>e.default),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-DvqAg9gW.cjs")).then(e=>e.default),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-D5R3YcU0.cjs")).then(e=>e.default),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-CCGXcj5r.cjs")).then(e=>e.default)}),l=o.makeI18nProvider({defaultLocale:s,defaultMessages:r,localeLoader:async e=>{if(e===s)return r;const t=a[`./locales/${e}.ts`];return t?await t():r},providerName:"AuthI18n"});exports.AuthI18n=l;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type Ajv from 'ajv';
|
|
2
2
|
import type { JSONSchema, SchemaConflict, NotViolation } from './schema-types';
|
|
3
|
+
/**
|
|
4
|
+
* Check if a JSON schema uses any conditional features that require
|
|
5
|
+
* re-evaluating the effective schema when the value changes.
|
|
6
|
+
*
|
|
7
|
+
* These features include:
|
|
8
|
+
* - `if`/`then`/`else` (conditional subschemas)
|
|
9
|
+
* - `dependentRequired` (2020-12)
|
|
10
|
+
* - `dependentSchemas` (2019-09/2020-12)
|
|
11
|
+
* - `dependencies` (draft-07)
|
|
12
|
+
*/
|
|
13
|
+
export declare function hasConditionalFeatures(schema: JSONSchema | null | undefined): boolean;
|
|
3
14
|
/**
|
|
4
15
|
* Evaluate `not` subschema against the current value using AJV.
|
|
5
16
|
* Returns a NotViolation if the value matches the disallowed schema.
|
|
@@ -6,7 +6,7 @@ import type { ControllerValidation } from '../form/controller/controller-validat
|
|
|
6
6
|
import type { ValidationMode } from '../form/controller/union-controller';
|
|
7
7
|
export type { JSONSchema, JSONSchemaDefinition, JSONSchemaType, SchemaConflict, AllOfMergeResult, NotViolation, } from './schema-types';
|
|
8
8
|
export { mergeAllOf } from './schema-merge';
|
|
9
|
-
export { evaluateNotViolation, composeEffectiveObjectSchema, evaluateIfThenElseOverlay, getEvaluatedProperties, } from './schema-conditionals';
|
|
9
|
+
export { evaluateNotViolation, composeEffectiveObjectSchema, evaluateIfThenElseOverlay, getEvaluatedProperties, hasConditionalFeatures, } from './schema-conditionals';
|
|
10
10
|
export type SchemaContextOptions = {
|
|
11
11
|
schema: JSONSchemaDefinition;
|
|
12
12
|
definition: JSONSchemaDefinition;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Renderable } from '@tempots/dom';
|
|
2
|
+
import type { Value } from '@tempots/dom';
|
|
3
|
+
import type { SchemaContext } from '../json-schema/schema-context';
|
|
4
|
+
import type { Mismatch } from './mismatch';
|
|
5
|
+
import { type ResolvedWidget } from '../json-schema/widgets/utils';
|
|
6
|
+
/**
|
|
7
|
+
* Display widget factory function signature.
|
|
8
|
+
* Unlike form WidgetFactory, takes a read-only Value<unknown> instead of Controller<T>.
|
|
9
|
+
*/
|
|
10
|
+
export type DisplayWidgetFactory = (props: {
|
|
11
|
+
value: Value<unknown>;
|
|
12
|
+
ctx: SchemaContext;
|
|
13
|
+
mismatches?: Mismatch[];
|
|
14
|
+
options?: Record<string, unknown>;
|
|
15
|
+
}) => Renderable;
|
|
16
|
+
/**
|
|
17
|
+
* Display widget registration entry
|
|
18
|
+
*/
|
|
19
|
+
export interface DisplayWidgetRegistration {
|
|
20
|
+
/** Widget factory function */
|
|
21
|
+
factory: DisplayWidgetFactory;
|
|
22
|
+
/** Custom matcher function for widget selection */
|
|
23
|
+
matcher: (ctx: SchemaContext) => boolean;
|
|
24
|
+
/** Widget priority (higher = preferred, default: 50) */
|
|
25
|
+
priority?: number;
|
|
26
|
+
/** Widget display name (for debugging) */
|
|
27
|
+
displayName?: string;
|
|
28
|
+
/** Widget description */
|
|
29
|
+
description?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Array of custom display widget registrations
|
|
33
|
+
*/
|
|
34
|
+
export type CustomDisplayWidgets = DisplayWidgetRegistration[];
|
|
35
|
+
/**
|
|
36
|
+
* Display widget registry for managing custom display widgets
|
|
37
|
+
*/
|
|
38
|
+
export declare class DisplayWidgetRegistry {
|
|
39
|
+
private widgets;
|
|
40
|
+
register(registration: DisplayWidgetRegistration): void;
|
|
41
|
+
/**
|
|
42
|
+
* Find the best display widget for a schema context.
|
|
43
|
+
* Returns the factory if found, undefined otherwise.
|
|
44
|
+
*/
|
|
45
|
+
findBestWidget(ctx: SchemaContext): {
|
|
46
|
+
factory: DisplayWidgetFactory;
|
|
47
|
+
resolved?: ResolvedWidget;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Create a custom display widget registration that matches by explicit x:ui widget name.
|
|
52
|
+
*/
|
|
53
|
+
export declare function forDisplayXUI(widgetName: string, factory: DisplayWidgetFactory, options?: Partial<Omit<DisplayWidgetRegistration, 'factory' | 'matcher'>>): DisplayWidgetRegistration;
|
|
54
|
+
/**
|
|
55
|
+
* Create a custom display widget registration that matches by schema format.
|
|
56
|
+
*/
|
|
57
|
+
export declare function forDisplayFormat(format: string, factory: DisplayWidgetFactory, options?: Partial<Omit<DisplayWidgetRegistration, 'factory' | 'matcher'>>): DisplayWidgetRegistration;
|
|
58
|
+
/**
|
|
59
|
+
* Create a custom display widget registration that matches by type + format combination.
|
|
60
|
+
*/
|
|
61
|
+
export declare function forDisplayTypeAndFormat(type: string, format: string, factory: DisplayWidgetFactory, options?: Partial<Omit<DisplayWidgetRegistration, 'factory' | 'matcher'>>): DisplayWidgetRegistration;
|