@tempots/beatui 0.77.0 → 0.78.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/dist/{ar-CefikVG3.cjs → ar-DNoFBb9J.cjs} +1 -1
- package/dist/{ar-BbgpGwJp.js → ar-D__6gR_P.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +5 -5
- package/dist/{colors-B9fcMxa_.cjs → colors-B2yrgHSW.cjs} +1 -1
- package/dist/{colors-pQZlNrwM.js → colors-DPo9GEJR.js} +6 -6
- package/dist/{de-ZRnkggf5.cjs → de-AwUkK0rS.cjs} +1 -1
- package/dist/{de-R7lPfyZ4.js → de-DmKpCTuQ.js} +1 -1
- package/dist/{deep-merge-E6b9KE6l.js → deep-merge-Bsqkvp9-.js} +5 -5
- package/dist/{deep-merge-DBUbjJYt.cjs → deep-merge-cQgRrtGF.cjs} +1 -1
- package/dist/{duration-input-j7bVks-S.js → duration-input-DcZf0Dyd.js} +3 -3
- package/dist/{duration-input-CsygvJJ_.cjs → duration-input-Dt6riwzu.cjs} +1 -1
- package/dist/{es-DV0Jr_BZ.js → es-BDZ5UJLS.js} +1 -1
- package/dist/{es-IkNtVSp2.cjs → es-D-d2AIlX.cjs} +1 -1
- package/dist/{fa-DXvHejs9.js → fa-CuPgy1cj.js} +1 -1
- package/dist/{fa-B-byOhgU.cjs → fa-D7rRdG8c.cjs} +1 -1
- package/dist/{fr-F0ZegdR2.cjs → fr-0er_BWMt.cjs} +1 -1
- package/dist/{fr-D8FOMX0o.js → fr-DmyMO3lB.js} +1 -1
- package/dist/{he-B19Qsx-u.js → he-C3RHfs6R.js} +1 -1
- package/dist/{he-BcEFNuYz.cjs → he-R2veUyP3.cjs} +1 -1
- package/dist/{hi-CarXvOJD.cjs → hi-C9UP7NGG.cjs} +1 -1
- package/dist/{hi-DozFnE3b.js → hi-YnvrXBht.js} +1 -1
- package/dist/hls.light.min-Bhrf47iR.cjs +27 -0
- package/dist/{hls.light.min-BHW1Af0w.js → hls.light.min-C6VwviEa.js} +1095 -1087
- package/dist/{index-B7lXSIXm.cjs → index-BGwNJNop.cjs} +19 -19
- package/dist/{index-DKl26ILa.js → index-CCMjK4fD.js} +1 -1
- package/dist/{index-gSTSk9KZ.cjs → index-CdVc1Y2V.cjs} +1 -1
- package/dist/{index-CyyNsVT9.cjs → index-DE2tjivA.cjs} +1 -1
- package/dist/{index-DdpYvBeh.js → index-Dbu1ZPpw.js} +1095 -1044
- package/dist/{index-wPyoqxuj.js → index-DiEcd7ZV.js} +2 -6
- package/dist/{index-CpZh_Snx.js → index-DklKfzD4.js} +1 -1
- package/dist/{index-CYb1YxDX.js → index-mPVib4v9.js} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +21 -21
- package/dist/index.esm-C6lZ02yY.cjs +1 -0
- package/dist/{index.esm-DPNh6inz.js → index.esm-ChUrm4xR.js} +80 -80
- package/dist/{it-But8uzNi.js → it-CWLwlDXe.js} +1 -1
- package/dist/{it-ops3Czzi.cjs → it-Cxt1_D4h.cjs} +1 -1
- package/dist/{ja-2dzONSkh.cjs → ja-CpDovHPb.cjs} +1 -1
- package/dist/{ja-DkwTnFdU.js → ja-DthjgDtM.js} +1 -1
- package/dist/json-schema/index.cjs.js +8 -8
- package/dist/json-schema/index.es.js +3970 -3923
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +5 -5
- package/dist/{ko-uVJEhtyQ.cjs → ko-M_MCTNuN.cjs} +1 -1
- package/dist/{ko-Cqv-IjhX.js → ko-joDK7ONT.js} +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/{modal-rLbLQYhb.cjs → modal-D3NQ6ZgO.cjs} +1 -1
- package/dist/{modal--5-j6x0s.js → modal-oWbT46Rc.js} +28 -28
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +11 -11
- package/dist/{nl-DXnbYulJ.cjs → nl-DGhIOGxN.cjs} +1 -1
- package/dist/{nl-YSiU3rFI.js → nl-DmoWeXUt.js} +1 -1
- package/dist/{notice-BvS1_9Va.js → notice-C0Brmeyi.js} +2 -2
- package/dist/{notice-BGaJ4k0O.cjs → notice-DYBLXglS.cjs} +1 -1
- package/dist/{pl-DXmHc2Nh.js → pl-8hl5VXnm.js} +1 -1
- package/dist/{pl-RbiIBA3C.cjs → pl-DocnXix_.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-Bf3z_-26.js → pt-BfYK9Rl3.js} +1 -1
- package/dist/{pt-BAecyAv-.cjs → pt-DO2Zcuqv.cjs} +1 -1
- package/dist/{ru-DZ4gJ6yr.cjs → ru-D9KCOBqN.cjs} +1 -1
- package/dist/{ru-Sy00qUeG.js → ru-eA_dNkJz.js} +1 -1
- package/dist/tailwind/index.cjs.js +1 -1
- package/dist/tailwind/index.es.js +1 -1
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/timer-BJHOsuS6.cjs +1 -0
- package/dist/timer-Rd2sKnvH.js +65 -0
- package/dist/{toolbar-C_Ec0_XC.js → toolbar-CdY5huSG.js} +1 -1
- package/dist/{toolbar-wEm8iNet.cjs → toolbar-DoRPrs-s.cjs} +1 -1
- package/dist/{tr-7jGF_acJ.cjs → tr-BBmQvRSa.cjs} +1 -1
- package/dist/{tr-BDxG3qd6.js → tr-CdqbnopM.js} +1 -1
- package/dist/{translations-DQxouiBG.js → translations-BEMKy6-W.js} +19 -19
- package/dist/{translations-BmsRhth7.js → translations-CVfr2JXG.js} +1 -1
- package/dist/{translations-C7HVMcOQ.cjs → translations-D_Vu2mbd.cjs} +1 -1
- package/dist/{translations-hMQlZmD4.cjs → translations-eUtMHN9s.cjs} +1 -1
- package/dist/{ur-55zdT2TQ.js → ur-D9sr_I1M.js} +1 -1
- package/dist/{ur-ZT6fZFId.cjs → ur-u5qjZsKM.cjs} +1 -1
- package/dist/use-form-DMiCxK26.js +1731 -0
- package/dist/use-form-pSErMD6z.cjs +2 -0
- package/dist/{vi-C7K7W0hM.js → vi-0f97dtZb.js} +1 -1
- package/dist/{vi-tNs62pgs.cjs → vi-_w5RE8el.cjs} +1 -1
- package/dist/{widget-customization-DKlfR6Qb.cjs → widget-customization-WNWmH_gX.cjs} +1 -1
- package/dist/{widget-customization-DfBf7gGp.js → widget-customization-nxbAoCx5.js} +4 -4
- package/dist/{zh-CBnP8_Lf.cjs → zh-6cQcHbf6.cjs} +1 -1
- package/dist/{zh-DvJBV9D8.js → zh-C7HcUKhE.js} +1 -1
- package/package.json +7 -4
- package/dist/hls.light.min-D3hUMpII.cjs +0 -27
- package/dist/index.esm-DJRz9AE-.cjs +0 -1
- package/dist/timer-DK_yKNwE.cjs +0 -1
- package/dist/timer-DzWb416P.js +0 -51
- package/dist/use-form-B4D58mxd.cjs +0 -2
- package/dist/use-form-DzA1RSrN.js +0 -1325
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WithElement as S, OnDispose as z, prop as R, computedOf as
|
|
2
|
-
import { g as $,
|
|
3
|
-
import { s as Y, C as Z } from "./use-form-
|
|
4
|
-
import { a as K, B as P } from "./translations-
|
|
1
|
+
import { WithElement as S, OnDispose as z, prop as R, computedOf as A, Fragment as M, attr as g, WithBrowserCtx as J, Value as U, render as Q, html as k, dataAttr as B, aria as V, on as X, When as j, Use as H, coalesce as q } from "@tempots/dom";
|
|
2
|
+
import { g as $, I as _ } from "./timer-Rd2sKnvH.js";
|
|
3
|
+
import { s as Y, C as Z } from "./use-form-DMiCxK26.js";
|
|
4
|
+
import { a as K, B as P } from "./translations-BEMKy6-W.js";
|
|
5
5
|
const ee = [
|
|
6
6
|
"a[href]",
|
|
7
7
|
"button:not([disabled])",
|
|
@@ -101,8 +101,8 @@ function N({
|
|
|
101
101
|
u(!a.value);
|
|
102
102
|
}, f = [], p = (i) => {
|
|
103
103
|
f.push(
|
|
104
|
-
e.on((
|
|
105
|
-
|
|
104
|
+
e.on((w) => {
|
|
105
|
+
w === "closed" && i();
|
|
106
106
|
})
|
|
107
107
|
);
|
|
108
108
|
};
|
|
@@ -214,7 +214,7 @@ function oe({
|
|
|
214
214
|
animation: o,
|
|
215
215
|
status: t
|
|
216
216
|
}) {
|
|
217
|
-
const s =
|
|
217
|
+
const s = A(
|
|
218
218
|
o,
|
|
219
219
|
t
|
|
220
220
|
)((n, r) => {
|
|
@@ -223,7 +223,7 @@ function oe({
|
|
|
223
223
|
const a = r === "start-opening" || r === "opening" || r === "opened";
|
|
224
224
|
let u;
|
|
225
225
|
return "enter" in n || "exit" in n ? u = a ? n.enter : n.exit : u = n, `bc-animated-toggle bc-animated-toggle--${se(u)} bc-animated-toggle--${r}`;
|
|
226
|
-
}), e =
|
|
226
|
+
}), e = A(
|
|
227
227
|
o,
|
|
228
228
|
t
|
|
229
229
|
)((n, r) => {
|
|
@@ -282,7 +282,7 @@ function re(o) {
|
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class T {
|
|
286
286
|
optional() {
|
|
287
287
|
return new ae(this);
|
|
288
288
|
}
|
|
@@ -293,7 +293,7 @@ class A {
|
|
|
293
293
|
return re(this);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
class C extends
|
|
296
|
+
class C extends T {
|
|
297
297
|
minLength;
|
|
298
298
|
maxLength;
|
|
299
299
|
pattern;
|
|
@@ -339,7 +339,7 @@ class C extends A {
|
|
|
339
339
|
return s.minLength = this.minLength, s.maxLength = this.maxLength, s.pattern = this.pattern, s.customValidations = [...this.customValidations, t], s;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
class O extends
|
|
342
|
+
class O extends T {
|
|
343
343
|
mustBeTrue = !1;
|
|
344
344
|
trueMessage;
|
|
345
345
|
validate(t) {
|
|
@@ -362,7 +362,7 @@ class O extends A {
|
|
|
362
362
|
return e.mustBeTrue = !0, e.trueMessage = s, e;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
class ae extends
|
|
365
|
+
class ae extends T {
|
|
366
366
|
constructor(t) {
|
|
367
367
|
super(), this.inner = t;
|
|
368
368
|
}
|
|
@@ -373,7 +373,7 @@ class ae extends A {
|
|
|
373
373
|
return s.success ? { success: !0, data: s.data } : { success: !1, errors: s.errors };
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
class ie extends
|
|
376
|
+
class ie extends T {
|
|
377
377
|
constructor(t, s) {
|
|
378
378
|
super(), this.inner = t, this.defaultValue = s;
|
|
379
379
|
}
|
|
@@ -381,7 +381,7 @@ class ie extends A {
|
|
|
381
381
|
return t === void 0 ? { success: !0, data: this.defaultValue } : this.inner.validate(t);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
class D extends
|
|
384
|
+
class D extends T {
|
|
385
385
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
386
386
|
constructor(t) {
|
|
387
387
|
super(), this.shape = t;
|
|
@@ -451,7 +451,7 @@ function ce(o) {
|
|
|
451
451
|
s.push(l), s.push(() => {
|
|
452
452
|
c.dispose(), v(), b();
|
|
453
453
|
});
|
|
454
|
-
const
|
|
454
|
+
const w = Q((() => {
|
|
455
455
|
const E = /* @__PURE__ */ new Set();
|
|
456
456
|
for (const d of t.element.querySelectorAll(
|
|
457
457
|
":scope > :not([data-overlay])"
|
|
@@ -468,7 +468,7 @@ function ce(o) {
|
|
|
468
468
|
B.status(c.status.map(String)),
|
|
469
469
|
B.overlay("true"),
|
|
470
470
|
g.class(
|
|
471
|
-
|
|
471
|
+
A(
|
|
472
472
|
r ?? "opaque",
|
|
473
473
|
a
|
|
474
474
|
)(
|
|
@@ -482,7 +482,7 @@ function ce(o) {
|
|
|
482
482
|
clear: !1,
|
|
483
483
|
providers: t.providers
|
|
484
484
|
});
|
|
485
|
-
s.push(
|
|
485
|
+
s.push(w), $(() => c.open());
|
|
486
486
|
}, e);
|
|
487
487
|
});
|
|
488
488
|
}
|
|
@@ -505,12 +505,12 @@ function le(o, t) {
|
|
|
505
505
|
U.on(e, (d) => {
|
|
506
506
|
y.set(d ? "capturing" : "non-capturing");
|
|
507
507
|
});
|
|
508
|
-
const x =
|
|
508
|
+
const x = A(
|
|
509
509
|
h.header != null,
|
|
510
510
|
n
|
|
511
|
-
)((d, L) => d || L), l = Y("modal"), i = `${l}-header`,
|
|
511
|
+
)((d, L) => d || L), l = Y("modal"), i = `${l}-header`, w = `${l}-body`, E = k.div(
|
|
512
512
|
g.class(
|
|
513
|
-
|
|
513
|
+
A(
|
|
514
514
|
s,
|
|
515
515
|
m
|
|
516
516
|
)(
|
|
@@ -521,7 +521,7 @@ function le(o, t) {
|
|
|
521
521
|
g.role("dialog"),
|
|
522
522
|
V.modal(!0),
|
|
523
523
|
...h.header ? [V.labelledby(i)] : [],
|
|
524
|
-
V.describedby(
|
|
524
|
+
V.describedby(w),
|
|
525
525
|
g.tabindex(-1),
|
|
526
526
|
// Make modal focusable for initial focus
|
|
527
527
|
g.id(l),
|
|
@@ -540,17 +540,17 @@ function le(o, t) {
|
|
|
540
540
|
'[aria-label="Close modal"]'
|
|
541
541
|
);
|
|
542
542
|
if (L) return L;
|
|
543
|
-
const
|
|
543
|
+
const I = d.querySelector(
|
|
544
544
|
'button, input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
545
545
|
);
|
|
546
|
-
return
|
|
546
|
+
return I || d;
|
|
547
547
|
}
|
|
548
548
|
}),
|
|
549
549
|
// Modal content container
|
|
550
550
|
k.div(
|
|
551
551
|
g.class("bc-modal__content"),
|
|
552
552
|
// Header section
|
|
553
|
-
|
|
553
|
+
j(
|
|
554
554
|
x,
|
|
555
555
|
() => k.div(
|
|
556
556
|
g.class("bc-modal__header"),
|
|
@@ -559,7 +559,7 @@ function le(o, t) {
|
|
|
559
559
|
...h.header ? [g.id(i)] : [],
|
|
560
560
|
h.header
|
|
561
561
|
),
|
|
562
|
-
|
|
562
|
+
j(
|
|
563
563
|
n,
|
|
564
564
|
() => H(
|
|
565
565
|
K,
|
|
@@ -575,7 +575,7 @@ function le(o, t) {
|
|
|
575
575
|
)
|
|
576
576
|
),
|
|
577
577
|
// Body section
|
|
578
|
-
k.div(g.class("bc-modal__body"), g.id(
|
|
578
|
+
k.div(g.class("bc-modal__body"), g.id(w), h.body),
|
|
579
579
|
// Footer section
|
|
580
580
|
h.footer && k.div(g.class("bc-modal__footer"), h.footer)
|
|
581
581
|
)
|
|
@@ -617,7 +617,7 @@ function Ee(o, t) {
|
|
|
617
617
|
variant: "outline",
|
|
618
618
|
onClick: c
|
|
619
619
|
},
|
|
620
|
-
|
|
620
|
+
q(e, u.$.cancel)
|
|
621
621
|
),
|
|
622
622
|
P(
|
|
623
623
|
{
|
|
@@ -625,7 +625,7 @@ function Ee(o, t) {
|
|
|
625
625
|
variant: "filled",
|
|
626
626
|
onClick: p
|
|
627
627
|
},
|
|
628
|
-
|
|
628
|
+
q(s, u.$.confirm)
|
|
629
629
|
)
|
|
630
630
|
)
|
|
631
631
|
});
|
package/dist/monaco/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@tempots/dom"),A=require("../timer-
|
|
2
|
-
`),i=new Blob([a],{type:"text/javascript"});return URL.createObjectURL(i)};self.MonacoEnvironment={getWorkerUrl(a,i){return t()}}}const F=e=>new Promise((t,a)=>{if(document.querySelector(`script[src="${e}"]`))return t();const s=document.createElement("script");s.src=e,s.async=!0;const l=document.querySelector("script[nonce]")?.getAttribute("nonce");l&&s.setAttribute("nonce",l),s.onload=()=>t(),s.onerror=h=>{console.error("[BeatUI] Failed to load script",e,h),a(new Error(`Failed to load script ${e}`))},document.head.appendChild(s)}),R=async()=>{const e=window;if((!e.require||!e.require.config)&&(await F(`${p}vs/loader.js`),await new Promise(t=>setTimeout(t,100)),!e.require))throw new Error("AMD loader failed to initialize");return e.require.config?.({baseUrl:p,paths:{vs:"vs"}}),e.require},$=async()=>{const e=window;if(e.monaco&&W(e.monaco))return e.monaco;M();const t=await R();if(await new Promise((a,i)=>{const s=setTimeout(()=>i(new Error("Timeout loading editor.main")),3e4);try{t(["vs/editor/editor.main"],()=>{clearTimeout(s),a()},l=>{clearTimeout(s),i(l)})}catch(l){clearTimeout(s),i(l)}}),!e.monaco)throw new Error("Monaco failed to initialize after loading editor.main");return e.monaco};let w=null;const v=new Map;let g=!1;async function S(){if(w)return w;!g&&typeof window<"u"&&(M(),g=!0);const e=await $();return w=e,e}async function _(e){if(v.has(e))return v.get(e);const t=(async()=>{const a=await S();switch(e){case"typescript":case"javascript":{a.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),a.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1});break}case"json":{a.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[],enableSchemaRequest:!0});break}case"css":case"scss":case"less":{a.languages.css.cssDefaults.setOptions({validate:!0});break}case"html":break;case"markdown":break;case"yaml":{a.languages.getLanguages().some(s=>s.id==="yaml")||a.languages.register({id:"yaml",extensions:[".yml",".yaml"]});break}}})();return v.set(e,t),t}async function O(e){const[t]=await Promise.all([S(),_(e)]);return t}function z(e){if(typeof window>"u")return;const t=window;e?(t.MonacoEnvironment={getWorker:e},g=!0):t.MonacoEnvironment||(M(),g=!0)}const N=e=>{const{value:t,onChange:a,onBlur:i,language:s="plaintext",readOnly:l=!1,editorOptions:h,jsonSchemas:V,autofocus:j,class:q,disabled:D,hasError:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@tempots/dom"),A=require("../timer-BJHOsuS6.cjs"),B=require("../link-portal-_tiDFZqh.cjs"),I=require("../theme-Dt6lCAvY.cjs"),p="https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/",W=e=>{if(!e||typeof e!="object")return!1;const t=e;return!!(t.editor&&typeof t.editor.create=="function"&&t.languages)};function M(){if(typeof self>"u")return;const e=self.MonacoEnvironment;if(e&&(typeof e.getWorkerUrl=="function"||typeof e.getWorker=="function"))return;const t=()=>{const a=[`self.MonacoEnvironment = { baseUrl: '${p}' };`,`importScripts('${p}vs/base/worker/workerMain.js');`].join(`
|
|
2
|
+
`),i=new Blob([a],{type:"text/javascript"});return URL.createObjectURL(i)};self.MonacoEnvironment={getWorkerUrl(a,i){return t()}}}const F=e=>new Promise((t,a)=>{if(document.querySelector(`script[src="${e}"]`))return t();const s=document.createElement("script");s.src=e,s.async=!0;const l=document.querySelector("script[nonce]")?.getAttribute("nonce");l&&s.setAttribute("nonce",l),s.onload=()=>t(),s.onerror=h=>{console.error("[BeatUI] Failed to load script",e,h),a(new Error(`Failed to load script ${e}`))},document.head.appendChild(s)}),R=async()=>{const e=window;if((!e.require||!e.require.config)&&(await F(`${p}vs/loader.js`),await new Promise(t=>setTimeout(t,100)),!e.require))throw new Error("AMD loader failed to initialize");return e.require.config?.({baseUrl:p,paths:{vs:"vs"}}),e.require},$=async()=>{const e=window;if(e.monaco&&W(e.monaco))return e.monaco;M();const t=await R();if(await new Promise((a,i)=>{const s=setTimeout(()=>i(new Error("Timeout loading editor.main")),3e4);try{t(["vs/editor/editor.main"],()=>{clearTimeout(s),a()},l=>{clearTimeout(s),i(l)})}catch(l){clearTimeout(s),i(l)}}),!e.monaco)throw new Error("Monaco failed to initialize after loading editor.main");return e.monaco};let w=null;const v=new Map;let g=!1;async function S(){if(w)return w;!g&&typeof window<"u"&&(M(),g=!0);const e=await $();return w=e,e}async function _(e){if(v.has(e))return v.get(e);const t=(async()=>{const a=await S();switch(e){case"typescript":case"javascript":{a.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),a.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1});break}case"json":{a.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[],enableSchemaRequest:!0});break}case"css":case"scss":case"less":{a.languages.css.cssDefaults.setOptions({validate:!0});break}case"html":break;case"markdown":break;case"yaml":{a.languages.getLanguages().some(s=>s.id==="yaml")||a.languages.register({id:"yaml",extensions:[".yml",".yaml"]});break}}})();return v.set(e,t),t}async function O(e){const[t]=await Promise.all([S(),_(e)]);return t}function z(e){if(typeof window>"u")return;const t=window;e?(t.MonacoEnvironment={getWorker:e},g=!0):t.MonacoEnvironment||(M(),g=!0)}const N=e=>{const{value:t,onChange:a,onBlur:i,language:s="plaintext",readOnly:l=!1,editorOptions:h,jsonSchemas:V,autofocus:j,class:q,disabled:D,hasError:x,id:C,name:L,placeholder:P}=e,b=o.Value.toSignal(l);return o.Use(I.Theme,({appearance:T})=>o.html.div((e.cssInjection??"none")==="none"?null:o.Task(()=>Promise.resolve().then(()=>require("../styles-url-CZUL_YRT.cjs")),({default:u})=>B.LinkPortal({id:"beatui-monaco-css",href:u})),o.attr.class("bc-monaco-editor-container"),o.attr.class(q),o.attr.class(o.Value.map(x??!1,u=>u?"bc-input-container--error":"")),o.attr.id(C),o.attr.name(L),o.WithElement(u=>{let m=null;const c=[];return(async()=>{try{let d=function(){const n=r.getValue();a?.(n)};const f=o.Value.get(s)??"plaintext";if(m=(await O(f)).editor.create(u,{value:o.Value.get(t)??"",language:f,readOnly:o.Value.get(b)??!1,automaticLayout:!0,minimap:{enabled:!1},...h??{}}),!m)throw new Error("Failed to create Monaco editor");const r=m;c.push(o.effectOf(s,V)(async(n,y)=>{const E=await O(n);if(n==="json"){const U={validate:!0,enableSchemaRequest:!0,schemas:!!(y&&y.length)?y:[]};E.languages.json.jsonDefaults.setDiagnosticsOptions(U)}const k=r.getModel();k&&E.editor.setModelLanguage(k,n)})),c.push(r.onDidChangeModelContent(A.x(500,d)).dispose),c.push(r.onDidBlurEditorText(()=>{d(),i?.()}).dispose),c.push(o.Value.on(t,n=>{n!==r.getValue()&&r.setValue(n??"")})),c.push(o.Value.on(b,n=>{r.updateOptions({readOnly:n??!1})})),c.push(o.Value.on(D??!1,n=>{r.updateOptions({readOnly:n??!1})})),c.push(o.Value.on(j??!1,n=>{n&&r.focus()})),c.push(o.Value.on(P??"",n=>{r.updateOptions({placeholder:n??""})})),c.push(T.on(n=>{r.updateOptions({theme:n==="dark"?"vs-dark":"vs"})}))}catch(d){console.error("[BeatUI] Failed to initialize Monaco editor:",d);const f=u;f.textContent="Failed to load Monaco Editor. Please ensure monaco-editor is installed."}})(),o.OnDispose(()=>{try{c.forEach(d=>d())}catch{}try{m?.dispose()}catch{}})})))};exports.MonacoEditorInput=N;exports.configureMonacoEnvironment=z;
|
package/dist/monaco/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Value as c, Use as B, html as
|
|
2
|
-
import {
|
|
1
|
+
import { Value as c, Use as B, html as W, Task as F, attr as m, WithElement as I, OnDispose as R, effectOf as $ } from "@tempots/dom";
|
|
2
|
+
import { x as _ } from "../timer-Rd2sKnvH.js";
|
|
3
3
|
import { L as z } from "../link-portal-Cr2l9f3k.js";
|
|
4
4
|
import { T as N } from "../theme-B5pmbvQ_.js";
|
|
5
5
|
const g = "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/", G = (e) => {
|
|
@@ -147,9 +147,9 @@ const se = (e) => {
|
|
|
147
147
|
readOnly: l = !1,
|
|
148
148
|
editorOptions: w,
|
|
149
149
|
jsonSchemas: D,
|
|
150
|
-
autofocus:
|
|
151
|
-
class:
|
|
152
|
-
disabled:
|
|
150
|
+
autofocus: x,
|
|
151
|
+
class: L,
|
|
152
|
+
disabled: q,
|
|
153
153
|
hasError: C,
|
|
154
154
|
id: T,
|
|
155
155
|
name: U,
|
|
@@ -157,13 +157,13 @@ const se = (e) => {
|
|
|
157
157
|
} = e, E = c.toSignal(l);
|
|
158
158
|
return B(
|
|
159
159
|
N,
|
|
160
|
-
({ appearance: A }) =>
|
|
161
|
-
(e.cssInjection ?? "none") === "none" ? null :
|
|
160
|
+
({ appearance: A }) => W.div(
|
|
161
|
+
(e.cssInjection ?? "none") === "none" ? null : F(
|
|
162
162
|
() => import("../styles-url-DpP5gepF.js"),
|
|
163
163
|
({ default: u }) => z({ id: "beatui-monaco-css", href: u })
|
|
164
164
|
),
|
|
165
165
|
m.class("bc-monaco-editor-container"),
|
|
166
|
-
m.class(
|
|
166
|
+
m.class(L),
|
|
167
167
|
m.class(
|
|
168
168
|
c.map(
|
|
169
169
|
C ?? !1,
|
|
@@ -172,7 +172,7 @@ const se = (e) => {
|
|
|
172
172
|
),
|
|
173
173
|
m.id(T),
|
|
174
174
|
m.name(U),
|
|
175
|
-
|
|
175
|
+
I((u) => {
|
|
176
176
|
let f = null;
|
|
177
177
|
const i = [];
|
|
178
178
|
return (async () => {
|
|
@@ -226,11 +226,11 @@ const se = (e) => {
|
|
|
226
226
|
s.updateOptions({ readOnly: t ?? !1 });
|
|
227
227
|
})
|
|
228
228
|
), i.push(
|
|
229
|
-
c.on(
|
|
229
|
+
c.on(q ?? !1, (t) => {
|
|
230
230
|
s.updateOptions({ readOnly: t ?? !1 });
|
|
231
231
|
})
|
|
232
232
|
), i.push(
|
|
233
|
-
c.on(
|
|
233
|
+
c.on(x ?? !1, (t) => {
|
|
234
234
|
t && s.focus();
|
|
235
235
|
})
|
|
236
236
|
), i.push(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-eUtMHN9s.cjs"),t={loadingExtended:"Laden, even geduld",loadingShort:"Laden...",locale:"Landinstelling",iconDescription:"Pictogram",loadingIcon:"Laadpictogram",failedToLoadIcon:"Pictogram laden mislukt",editLabel:"Bewerken",selectOne:"Selecteer een",selectMany:"Selecteer meerdere",noResults:"Geen resultaten",passwordPlaceholderText:"Geheim wachtwoord",togglePasswordVisibility:"Wachtwoord zichtbaarheid wisselen",toggleMenu:"Menu wisselen",toggleAside:"Zijpaneel wisselen",mainNavigation:"Hoofdnavigatie",sidebar:"Zijbalk",closeDrawer:"Lade sluiten",closeModal:"Modaal sluiten",confirm:"Bevestigen",cancel:"Annuleren",addLabel:"Toevoegen",removeItem:"Item verwijderen",currentLocale:"Nederlands",ar:"Arabisch",de:"Duits",en:"Engels",es:"Spaans",fr:"Frans",hi:"Hindi",it:"Italiaans",ja:"Japans",ko:"Koreaans",nl:"Nederlands",pl:"Pools",pt:"Portugees",ru:"Russisch",tr:"Turks",vi:"Vietnamees",zh:"Chinees",he:"Hebreeuws",fa:"Perzisch",ur:"Urdu",emailPlaceholderText:"Voer je e-mail in",incrementValue:"Waarde verhogen",decrementValue:"Waarde verlagen",dropZoneInstructions:e=>e?"Klik om te kiezen of sleep bestanden hierheen, of druk op Enter of Spatie om bestandskiezer te openen":"Sleep bestanden hierheen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Bestand verwijderen",clearAllFiles:"Alle bestanden wissen",clearValue:"Waarde wissen",unknownType:"Onbekend type",filesInputInstructions:(e,n,l)=>{let a=e==null||e>1?"Klik om te kiezen of sleep bestanden hierheen":"Klik om te kiezen of sleep een bestand hierheen";if(e||n){const i=[];if(e!=null&&e>1&&i.push(`tot ${e} bestanden`),n&&l){const o=r.formatFileSize(n,{units:l});i.push(`max ${o} elk`)}i.length>0&&(a+=` (${i.join(", ")})`)}return a},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF laden...",loadFailed:"PDF laden mislukt",invalidPdf:"Ongeldig PDF-bestand",pageOutOfRange:(e,n)=>`Pagina ${e} valt buiten bereik (1-${n})`,renderFailed:"PDF-pagina weergeven mislukt"}};exports.default=t;exports.nl=t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as j, a as V, b as z, C as O, c as E } from "./translations-
|
|
1
|
+
import { I as j, a as V, b as z, C as O, c as E } from "./translations-BEMKy6-W.js";
|
|
2
2
|
import { Use as x, input as A, attr as n, coalesce as F, on as m, Empty as w, emitValue as v, prop as k, computedOf as C, html as p, aria as M, When as T, Fragment as B, Value as g, Unless as R, Ensure as S } from "@tempots/dom";
|
|
3
|
-
import { C as W } from "./use-form-
|
|
3
|
+
import { C as W } from "./use-form-DMiCxK26.js";
|
|
4
4
|
const L = (t) => {
|
|
5
5
|
const l = {
|
|
6
6
|
name: "email",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./translations-
|
|
1
|
+
"use strict";const l=require("./translations-eUtMHN9s.cjs"),t=require("@tempots/dom"),C=require("./use-form-pSErMD6z.cjs"),E=n=>{const r={name:"email",autocomplete:"email",...n},{value:c,before:s,onBlur:a,onChange:p,onInput:i,placeholder:h}=r,d=s??l.InputIcon({icon:"line-md:email",size:n.size,color:"neutral"});return t.Use(l.BeatUII18n,b=>l.InputContainer({...n,before:d,input:t.input.email(l.CommonInputAttributes(r),t.attr.placeholder(t.coalesce(h,b.$.emailPlaceholderText)),t.attr.value(c),t.attr.class("bc-input"),a!=null?t.on.blur(t.emitValue(a)):t.Empty,p!=null?t.on.change(t.emitValue(p)):t.Empty,i!=null?t.on.input(t.emitValue(i)):t.Empty)}))},_=n=>{const{value:r,onBlur:c,onChange:s,onInput:a,before:p,after:i,hasError:h,disabled:d,autocomplete:b,placeholder:I,...f}=n,y={name:"password",disabled:d,...f},u=t.prop(!0),o=t.computedOf(u,b)((e,m)=>e?m??"current-password":"off");return t.Use(l.BeatUII18n,e=>{const m=t.computedOf(e.$.passwordPlaceholderText,u,I)((g,V,v)=>V?"•••••••••••••••":v??g),w=t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__password-toggle"),t.aria.label(e.$.togglePasswordVisibility),t.on.click(()=>u.update(g=>!g)),t.When(u,()=>l.Icon({icon:"line-md:watch"}),()=>l.Icon({icon:"line-md:watch-off"})));return l.InputContainer({before:p,disabled:d,hasError:h,input:t.html.input(l.CommonInputAttributes({...y,autocomplete:o,placeholder:m}),t.When(u,()=>t.Fragment(t.attr.type("password")),()=>t.Fragment(t.attr.type("text"))),t.attr.class("bc-input"),t.attr.value(r),c!=null?t.on.blur(t.emitValue(c)):t.Empty,s!=null?t.on.change(t.emitValue(s)):t.Empty,a!=null?t.on.input(t.emitValue(a)):t.Empty),after:i!=null?t.Fragment(w,i):w})})};function O(n){switch(n){case"success":return"material-symbols:check-circle-outline";case"warning":return"material-symbols:warning-outline";case"danger":return"material-symbols:error-outline";case"info":default:return"material-symbols:info-outline"}}function B(n){switch(n){case"success":return"success";case"warning":return"warning";case"danger":return"danger";case"info":default:return"info"}}function U(n,r,c,s){const a=["bc-notice",`bc-notice--${n}`,`bc-notice--tone-${r}`];return c&&a.push("bc-notice--dismissible"),s&&s.length>0&&a.push(s),a.join(" ")}function P({variant:n="info",tone:r="subtle",role:c,title:s,icon:a,closable:p=!1,onDismiss:i,class:h},...d){const b=t.prop(!0);return t.When(b,()=>{const I=t.Value.map(p,o=>!!o||i!=null),f=t.Value.map(n,o=>o??"info"),y=t.Value.map(r,o=>o??"subtle"),u=t.computedOf(c,f)((o,e)=>o??(e==="danger"?"alert":"status"));return t.Use(l.BeatUII18n,o=>t.html.div(t.attr.class(t.computedOf(f,y,I,h)((e,m,w,g)=>U(e,m,w,g))),t.attr.role(t.Value.map(u,e=>e)),t.Unless(t.Value.map(a,e=>e===!1),()=>t.html.div(t.attr.class("bc-notice__icon"),l.Icon({icon:t.computedOf(a,f)((e,m)=>e===void 0?O(m):String(e)),size:"md",color:t.Value.map(f,B)}))),t.html.div(t.attr.class("bc-notice__body"),t.Ensure(s,e=>t.html.div(t.attr.class("bc-notice__title"),e)),t.html.div(t.attr.class("bc-notice__content"),...d)),t.When(I,()=>C.CloseButton({size:"xs",label:o.$.closeModal,onClick:()=>{b.set(!1),i?.()}}))))})}exports.EmailInput=E;exports.Notice=P;exports.PasswordInput=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-eUtMHN9s.cjs"),l={loadingExtended:"Ładowanie, proszę czekać",loadingShort:"Ładowanie...",locale:"Język",iconDescription:"Ikona",loadingIcon:"Ikona ładowania",failedToLoadIcon:"Nie udało się załadować ikony",editLabel:"Edytuj",selectOne:"Wybierz jeden",selectMany:"Wybierz wiele",noResults:"Brak wyników",passwordPlaceholderText:"Tajne hasło",togglePasswordVisibility:"Przełącz widoczność hasła",toggleMenu:"Przełącz menu",toggleAside:"Przełącz panel boczny",mainNavigation:"Główna nawigacja",sidebar:"Pasek boczny",closeDrawer:"Zamknij szufladę",closeModal:"Zamknij modal",confirm:"Potwierdź",cancel:"Anuluj",addLabel:"Dodaj",removeItem:"Usuń element",currentLocale:"Polski",ar:"Arabski",de:"Niemiecki",en:"Angielski",es:"Hiszpański",fr:"Francuski",hi:"Hindi",it:"Włoski",ja:"Japoński",ko:"Koreański",nl:"Holenderski",pl:"Polski",pt:"Portugalski",ru:"Rosyjski",tr:"Turecki",vi:"Wietnamski",zh:"Chiński",he:"Hebrajski",fa:"Perski",ur:"Urdu",emailPlaceholderText:"Wprowadź adres e-mail",incrementValue:"Zwiększ wartość",decrementValue:"Zmniejsz wartość",dropZoneInstructions:e=>e?"Kliknij aby wybrać lub przeciągnij pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików":"Przeciągnij pliki tutaj",fileSizeUnits:["Bajty","KB","MB","GB","TB"],removeFile:"Usuń plik",clearAllFiles:"Usuń wszystkie pliki",clearValue:"Wyczyść wartość",unknownType:"Nieznany typ",filesInputInstructions:(e,i,o)=>{let n=e==null||e>1?"Kliknij aby wybrać lub przeciągnij pliki tutaj":"Kliknij aby wybrać lub przeciągnij plik tutaj";if(e||i){const a=[];if(e!=null&&e>1&&a.push(`do ${e} plików`),i&&o){const r=t.formatFileSize(i,{units:o});a.push(`maks ${r} każdy`)}a.length>0&&(n+=` (${a.join(", ")})`)}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Ładowanie PDF...",loadFailed:"Nie udało się załadować PDF",invalidPdf:"Nieprawidłowy plik PDF",pageOutOfRange:(e,i)=>`Strona ${e} jest poza zakresem (1-${i})`,renderFailed:"Nie udało się wyrenderować strony PDF"}};exports.default=l;exports.pl=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-BGwNJNop.cjs");exports.DEFAULT_FEATURES=r.DEFAULT_FEATURES;exports.ProseMirrorMarkdownInput=r.ProseMirrorMarkdownInput;exports.ProseMirrorToolbar=r.ProseMirrorToolbar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./translations-eUtMHN9s.cjs"),t={loadingExtended:"Carregando, por favor aguarde",loadingShort:"Carregando...",locale:"Idioma",iconDescription:"Ícone",loadingIcon:"Ícone de carregamento",failedToLoadIcon:"Falha ao carregar ícone",editLabel:"Editar",selectOne:"Selecionar um",selectMany:"Selecionar vários",noResults:"Sem resultados",passwordPlaceholderText:"Senha Secreta",togglePasswordVisibility:"Alternar visibilidade da senha",toggleMenu:"Alternar menu",toggleAside:"Alternar painel lateral",mainNavigation:"Navegação principal",sidebar:"Barra lateral",closeDrawer:"Fechar gaveta",closeModal:"Fechar modal",confirm:"Confirmar",cancel:"Cancelar",addLabel:"Adicionar",removeItem:"Remover item",currentLocale:"Português",ar:"Árabe",de:"Alemão",en:"Inglês",es:"Espanhol",fr:"Francês",hi:"Hindi",it:"Italiano",ja:"Japonês",ko:"Coreano",nl:"Holandês",pl:"Polonês",pt:"Português",ru:"Russo",tr:"Turco",vi:"Vietnamita",zh:"Chinês",he:"Hebraico",fa:"Persa",ur:"Urdu",emailPlaceholderText:"Digite seu e-mail",incrementValue:"Incrementar valor",decrementValue:"Decrementar valor",dropZoneInstructions:e=>e?"Clique para escolher ou arraste arquivos aqui, ou pressione Enter ou Espaço para abrir o seletor de arquivos":"Arraste arquivos aqui",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remover arquivo",clearAllFiles:"Limpar todos os arquivos",clearValue:"Limpar valor",unknownType:"Tipo desconhecido",filesInputInstructions:(e,a,o)=>{let i=e==null||e>1?"Clique para escolher ou arraste arquivos aqui":"Clique para escolher ou arraste um arquivo aqui";if(e||a){const r=[];if(e!=null&&e>1&&r.push(`até ${e} arquivos`),a&&o){const l=n.formatFileSize(a,{units:o});r.push(`máx ${l} cada`)}r.length>0&&(i+=` (${r.join(", ")})`)}return i},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Carregando PDF...",loadFailed:"Falha ao carregar PDF",invalidPdf:"Arquivo PDF inválido",pageOutOfRange:(e,a)=>`A página ${e} está fora do intervalo (1-${a})`,renderFailed:"Falha ao renderizar página do PDF"}};exports.default=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-eUtMHN9s.cjs"),r={loadingExtended:"Загрузка, пожалуйста подождите",loadingShort:"Загрузка...",locale:"Локаль",iconDescription:"Иконка",loadingIcon:"Иконка загрузки",failedToLoadIcon:"Не удалось загрузить иконку",editLabel:"Редактировать",selectOne:"Выберите один",selectMany:"Выберите несколько",noResults:"Нет результатов",passwordPlaceholderText:"Секретный пароль",togglePasswordVisibility:"Переключить видимость пароля",toggleMenu:"Переключить меню",toggleAside:"Переключить боковую панель",mainNavigation:"Основная навигация",sidebar:"Боковая панель",closeDrawer:"Закрыть выдвижную панель",closeModal:"Закрыть модальное окно",confirm:"Подтвердить",cancel:"Отменить",addLabel:"Добавить",removeItem:"Удалить элемент",currentLocale:"Русский",ar:"Арабский",de:"Немецкий",en:"Английский",es:"Испанский",fr:"Французский",hi:"Хинди",it:"Итальянский",ja:"Японский",ko:"Корейский",nl:"Нидерландский",pl:"Польский",pt:"Португальский",ru:"Русский",tr:"Турецкий",vi:"Вьетнамский",zh:"Китайский",he:"Иврит",fa:"Персидский",ur:"Урду",emailPlaceholderText:"Введите электронную почту",incrementValue:"Увеличить значение",decrementValue:"Уменьшить значение",dropZoneInstructions:e=>e?"Нажмите для выбора или перетащите файлы сюда, или нажмите Enter или Пробел, чтобы открыть выбор файлов":"Перетащите файлы сюда",fileSizeUnits:["Байт","КБ","МБ","ГБ","ТБ"],removeFile:"Удалить файл",clearAllFiles:"Очистить все файлы",clearValue:"Очистить значение",unknownType:"Неизвестный тип",filesInputInstructions:(e,o,n)=>{let i=e==null||e>1?"Нажмите для выбора или перетащите файлы сюда":"Нажмите для выбора или перетащите файл сюда";if(e||o){const l=[];if(e!=null&&e>1){let t="файлов";e<=4&&(t="файла"),l.push(`до ${e} ${t}`)}if(o&&n){const t=a.formatFileSize(o,{units:n});l.push(`макс ${t} каждый`)}l.length>0&&(i+=` (${l.join(", ")})`)}return i},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Загрузка PDF...",loadFailed:"Не удалось загрузить PDF",invalidPdf:"Недействительный файл PDF",pageOutOfRange:(e,o)=>`Страница ${e} вне диапазона (1-${o})`,renderFailed:"Не удалось отобразить страницу PDF"}};exports.default=r;exports.ru=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DE2tjivA.cjs");exports.beatuiPreset=e.beatuiPreset;exports.createBeatuiPreset=e.createBeatuiPreset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DE2tjivA.cjs");require("../colors-B2yrgHSW.cjs");exports.beatuiPreset=e.beatuiPreset;exports.createBeatuiPreset=e.createBeatuiPreset;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("node:fs"),l=require("node:path"),te=require("node:module"),ne=require("node:url"),G=require("../index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("node:fs"),l=require("node:path"),te=require("node:module"),ne=require("node:url"),G=require("../index-DE2tjivA.cjs"),k=require("node:fs/promises"),se=require("node:crypto");var B=typeof document<"u"?document.currentScript:null;const ae="https://fonts.googleapis.com/css2",W="normal",re=400,Q="Mozilla/5.0 (compatible; BeatUI Tailwind Plugin; +https://tempots.com)";async function oe(e){const{projectRoot:t,requests:n,logger:s}=e;if(!n||n.length===0)return null;const r=e.cacheDir?l.resolve(e.cacheDir):l.join(t,"node_modules",".beatui","google-fonts"),a=[],u=new Map;await k.mkdir(r,{recursive:!0}).catch(h=>{s?.(`Unable to create BeatUI Google Fonts cache directory: ${h}`)});for(const h of n)try{const d=X(h),m=await ie({request:h,cssUrl:d,cacheRoot:r,logger:s});if(!m)continue;const T=await he({cssText:m,cacheRoot:r,assetMap:u,logger:s});a.push(T)}catch(d){s?.(`Unexpected error while downloading Google Font "${h.family}": ${String(d)}`)}return a.length===0||u.size===0?null:{cssText:a.join(`
|
|
2
2
|
`),assets:Array.from(u.values())}}async function ie({request:e,cssUrl:t,cacheRoot:n,logger:s}){const r=l.join(n,ce(e,t));try{const a=await fetch(t,{headers:{"User-Agent":Q}});if(!a.ok)throw new Error(`Failed to download Google Font CSS: ${a.status} ${a.statusText}`);const u=await a.text();return await k.writeFile(r,u),u}catch(a){if(y.existsSync(r))try{const u=await k.readFile(r,"utf8");return s?.(`Using cached Google Font CSS for ${e.family} because download failed.`),u}catch(u){s?.(`Failed to read cached Google Font CSS for ${e.family}: ${u}`)}return s?.(`Unable to download Google Font CSS for ${e.family}: ${a}`),null}}function ce(e,t){const n=se.createHash("sha1").update(t).digest("hex").slice(0,10);return`${e.family.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"font"}-${n}.css`}function X(e){const{family:t}=e,n=t.trim().replace(/\s+/g," "),s=le(e.weights),r=ue(e.styles),a=new URLSearchParams;return a.append("family",de(n,s,r)),e.display&&a.append("display",e.display),e.subsets&&e.subsets.length>0&&a.append("subset",e.subsets.join(",")),e.text&&a.append("text",e.text),`${ae}?${a.toString()}`}function le(e){return!e||e.length===0?[]:Array.from(new Set(e)).sort((t,n)=>t-n)}function ue(e){if(!e||e.length===0)return[W];const t=Array.from(new Set(e)),n=t.includes("italic"),s=t.includes("normal");return!n&&!s&&t.push(W),t.sort((r,a)=>r===a?0:r==="normal"?-1:1)}function de(e,t,n){if(t.length===0&&n.every(d=>d==="normal"))return e;const s=n.includes("italic"),r=n.includes("normal"),a=t.length>0?t:[re];if(!s)return`${e}:wght@${a.join(";")}`;const u=new Set;r&&a.forEach(d=>{u.add(`0,${d}`)}),a.forEach(d=>{u.add(`1,${d}`)});const h=Array.from(u).sort((d,m)=>{const[T,R]=d.split(",").map(Number),[E,U]=m.split(",").map(Number);return T-E||R-U});return`${e}:ital,wght@${h.join(";")}`}const fe=/url\(([^)]+)\)/g;async function he({cssText:e,cacheRoot:t,assetMap:n,logger:s}){let r=e;const a=new Set;let u;for(;(u=fe.exec(e))!==null;){const d=u[1].trim().replace(/^['"]|['"]$/g,"");d.startsWith("http")&&a.add(d)}for(const h of a){const d=await me(h,t,n,s);if(!d)continue;const m=h.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),T=new RegExp(`url\\((['"])${m}\\1\\)`,"g"),R=new RegExp(`url\\(${m}\\)`,"g");r=r.replace(T,`url(${d.placeholder})`),r=r.replace(R,`url(${d.placeholder})`)}return r}async function me(e,t,n,s){const r=n.get(e);if(r)return r;let a;try{const m=new URL(e);a=l.basename(m.pathname)}catch(m){return s?.(`Invalid Google Font URL skipped: ${e} (${m})`),null}if(!a)return s?.(`Unable to derive file name for Google Font URL: ${e}`),null;const u=l.join(t,a),h=`__BEATUI_GOOGLE_FONT_${n.size}__`;if(!y.existsSync(u))try{const m=await fetch(e,{headers:{"User-Agent":Q}});if(!m.ok)return s?.(`Failed to download Google Font asset ${a}: ${m.status} ${m.statusText}`),null;const T=Buffer.from(await m.arrayBuffer());await k.writeFile(u,T)}catch(m){return s?.(`Unexpected error while downloading Google Font asset ${a}: ${String(m)}`),null}const d={url:e,fileName:a,localPath:u,placeholder:h};return n.set(e,d),d}function K(e){const t=typeof e=="string"?new URL(e):e;if(t.protocol!=="file:")throw new TypeError(`Expected file URL, received: ${t.href}`);const n=t.hostname,s=n===""||n==="localhost",r=decodeURIComponent(t.pathname);if(process.platform==="win32"){let a=r.replace(/\//g,"\\");return!s&&n?`\\\\${n}${a}`:(a.startsWith("\\")&&(a=a.slice(1)),a)}return!s&&n?`//${n}${r}`:r}function ge(e){return typeof e=="object"&&e!==null}function pe(e){if(typeof e=="string")return e;if(typeof e=="function")return e.name;if(ge(e)){const t=e.name;if(typeof t=="string")return t;const n=e.postcssPlugin;if(typeof n=="string")return n}}const z="@tempots/beatui/tailwind.css",$="beatui.tailwind.css",b=l.dirname(K(typeof document>"u"?require("url").pathToFileURL(__filename).href:B&&B.tagName.toUpperCase()==="SCRIPT"&&B.src||new URL("tailwind/vite-plugin.cjs.js",document.baseURI).href)),L=we(b)??b;function H(e){if(Object.keys(e).length===0)return"";let t=`:root {
|
|
3
3
|
`;for(const[n,s]of Object.entries(e))t+=` ${n}: ${s};
|
|
4
4
|
`;return t+=`}
|
|
@@ -2,7 +2,7 @@ import y from "node:fs";
|
|
|
2
2
|
import c from "node:path";
|
|
3
3
|
import { createRequire as Z } from "node:module";
|
|
4
4
|
import { pathToFileURL as q } from "node:url";
|
|
5
|
-
import { g as ee, a as te, c as se } from "../index-
|
|
5
|
+
import { g as ee, a as te, c as se } from "../index-DklKfzD4.js";
|
|
6
6
|
import { mkdir as ne, writeFile as V, readFile as ae } from "node:fs/promises";
|
|
7
7
|
import { createHash as oe } from "node:crypto";
|
|
8
8
|
const re = "https://fonts.googleapis.com/css2", B = "normal", ie = 400, J = "Mozilla/5.0 (compatible; BeatUI Tailwind Plugin; +https://tempots.com)";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=(t,n)=>{let e=()=>{};const o=setTimeout(()=>{const l=t();l!=null&&(e=l)},n);return()=>{clearTimeout(o),e()}},I=(t,n)=>{let e=()=>{};const o=setInterval(()=>{const l=t();l!=null&&(e=l)},n);return()=>{clearInterval(o),e()}};function w(t,n,e={}){const{noTrailing:o=!1,noLeading:l=!1,debounceMode:u}=e;let i,f=!1,a=0;function m(){i&&clearTimeout(i)}function v(s){const{upcomingOnly:r=!1}=s||{};m(),f=!r}function d(...s){if(f)return;const r=this,T=Date.now()-a;function c(){a=Date.now(),n.apply(r,s)}function g(){i=void 0}!l&&u&&!i&&c(),m(),u===void 0&&T>t?l?(a=Date.now(),o||(i=setTimeout(u?g:c,t))):c():o||(i=setTimeout(u?g:c,u===void 0?Math.max(0,t-T):t))}return d.cancel=v,d}function x(t,n,{atBegin:e=!1}={}){return w(t,n,{debounceMode:e!==!1})}const A=t=>{let n=null;const e=o=>{n=null,t(o)};return n==null&&(n=requestAnimationFrame(e)),()=>{n!=null&&(cancelAnimationFrame(n),n=null)}};exports.I=p;exports.T=I;exports.g=A;exports.x=x;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const w = (t, n) => {
|
|
2
|
+
let e = () => {
|
|
3
|
+
};
|
|
4
|
+
const o = setTimeout(() => {
|
|
5
|
+
const l = t();
|
|
6
|
+
l != null && (e = l);
|
|
7
|
+
}, n);
|
|
8
|
+
return () => {
|
|
9
|
+
clearTimeout(o), e();
|
|
10
|
+
};
|
|
11
|
+
}, x = (t, n) => {
|
|
12
|
+
let e = () => {
|
|
13
|
+
};
|
|
14
|
+
const o = setInterval(() => {
|
|
15
|
+
const l = t();
|
|
16
|
+
l != null && (e = l);
|
|
17
|
+
}, n);
|
|
18
|
+
return () => {
|
|
19
|
+
clearInterval(o), e();
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
function p(t, n, e = {}) {
|
|
23
|
+
const { noTrailing: o = !1, noLeading: l = !1, debounceMode: u } = e;
|
|
24
|
+
let i, f = !1, a = 0;
|
|
25
|
+
function m() {
|
|
26
|
+
i && clearTimeout(i);
|
|
27
|
+
}
|
|
28
|
+
function g(s) {
|
|
29
|
+
const { upcomingOnly: r = !1 } = s || {};
|
|
30
|
+
m(), f = !r;
|
|
31
|
+
}
|
|
32
|
+
function d(...s) {
|
|
33
|
+
if (f) return;
|
|
34
|
+
const r = this, T = Date.now() - a;
|
|
35
|
+
function c() {
|
|
36
|
+
a = Date.now(), n.apply(r, s);
|
|
37
|
+
}
|
|
38
|
+
function v() {
|
|
39
|
+
i = void 0;
|
|
40
|
+
}
|
|
41
|
+
!l && u && !i && c(), m(), u === void 0 && T > t ? l ? (a = Date.now(), o || (i = setTimeout(u ? v : c, t))) : c() : o || (i = setTimeout(
|
|
42
|
+
u ? v : c,
|
|
43
|
+
u === void 0 ? Math.max(0, t - T) : t
|
|
44
|
+
));
|
|
45
|
+
}
|
|
46
|
+
return d.cancel = g, d;
|
|
47
|
+
}
|
|
48
|
+
function A(t, n, { atBegin: e = !1 } = {}) {
|
|
49
|
+
return p(t, n, { debounceMode: e !== !1 });
|
|
50
|
+
}
|
|
51
|
+
const D = (t) => {
|
|
52
|
+
let n = null;
|
|
53
|
+
const e = (o) => {
|
|
54
|
+
n = null, t(o);
|
|
55
|
+
};
|
|
56
|
+
return n == null && (n = requestAnimationFrame(e)), () => {
|
|
57
|
+
n != null && (cancelAnimationFrame(n), n = null);
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
w as I,
|
|
62
|
+
x as T,
|
|
63
|
+
D as g,
|
|
64
|
+
A as x
|
|
65
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html as c, attr as n, aria as m, WithElement as v, OnDispose as A } from "@tempots/dom";
|
|
2
|
-
import { B as x } from "./translations-
|
|
2
|
+
import { B as x } from "./translations-BEMKy6-W.js";
|
|
3
3
|
const l = [
|
|
4
4
|
"button:not([disabled])",
|
|
5
5
|
'[role="button"]:not([aria-disabled="true"])',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("@tempots/dom"),h=require("./translations-
|
|
1
|
+
"use strict";const e=require("@tempots/dom"),h=require("./translations-eUtMHN9s.cjs"),l=["button:not([disabled])",'[role="button"]:not([aria-disabled="true"])',"a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function m(...a){return e.html.div(e.attr.class("bc-toolbar"),e.attr.role("toolbar"),e.aria.orientation("horizontal"),e.WithElement(n=>{const f=()=>{const r=Array.from(n.querySelectorAll(l));r.length!==0&&r.forEach((t,o)=>t.setAttribute("tabindex",o===0?"0":"-1"))},c=r=>{const t=Array.from(n.querySelectorAll(l));if(t.length===0)return;const o=t.findIndex(u=>u===document.activeElement);let i=(o===-1?0:o)+r;i<0&&(i=t.length-1),i>=t.length&&(i=0),t.forEach(u=>u.setAttribute("tabindex","-1"));const d=t[i];d.setAttribute("tabindex","0"),d.focus()};setTimeout(f,0);const b=r=>{switch(r.key){case"ArrowRight":r.preventDefault(),c(1);break;case"ArrowLeft":r.preventDefault(),c(-1);break;case"Home":r.preventDefault(),c(-1);{const t=Array.from(n.querySelectorAll(l));if(t.length){t.forEach(s=>s.setAttribute("tabindex","-1"));const o=t[0];o.setAttribute("tabindex","0"),o.focus()}}break;case"End":r.preventDefault();{const t=Array.from(n.querySelectorAll(l));if(t.length){t.forEach(s=>s.setAttribute("tabindex","-1"));const o=t[t.length-1];o.setAttribute("tabindex","0"),o.focus()}}break}};return n.addEventListener("keydown",b),e.OnDispose(()=>{n.removeEventListener("keydown",b)})}),...a)}function v(a,...n){return h.Button({color:"neutral",roundedness:"md",variant:"light",...a},e.attr.class("bc-toolbar__button"),...n)}function A(...a){return e.html.div(e.attr.class("bc-toolbar__group"),e.attr.role("group"),...a)}function x(){return e.html.div(e.attr.class("bc-toolbar__divider"),e.attr.role("separator"),e.aria.orientation("vertical"))}function p(){return e.html.div(e.attr.class("bc-toolbar__spacer"))}exports.Toolbar=m;exports.ToolbarButton=v;exports.ToolbarDivider=x;exports.ToolbarGroup=A;exports.ToolbarSpacer=p;
|
|
@@ -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-eUtMHN9s.cjs"),t={loadingExtended:"Yükleniyor, lütfen bekleyin",loadingShort:"Yükleniyor...",locale:"Yerel",iconDescription:"Simge",loadingIcon:"Yükleme simgesi",failedToLoadIcon:"Simge yüklenemedi",editLabel:"Düzenle",selectOne:"Birini seç",selectMany:"Birden fazlasını seç",noResults:"Sonuç yok",passwordPlaceholderText:"Gizli Şifre",togglePasswordVisibility:"Şifre görünürlüğünü değiştir",toggleMenu:"Menüyü değiştir",toggleAside:"Yan paneli değiştir",mainNavigation:"Ana navigasyon",sidebar:"Kenar çubuğu",closeDrawer:"Çekmeceyi kapat",closeModal:"Modalı kapat",confirm:"Onayla",cancel:"İptal",addLabel:"Ekle",removeItem:"Öğeyi kaldır",currentLocale:"Türkçe",ar:"Arapça",de:"Almanca",en:"İngilizce",es:"İspanyolca",fr:"Fransızca",hi:"Hintçe",it:"İtalyanca",ja:"Japonca",ko:"Korece",nl:"Flemenkçe",pl:"Lehçe",pt:"Portekizce",ru:"Rusça",tr:"Türkçe",vi:"Vietnamca",zh:"Çince",he:"İbranice",fa:"Farsça",ur:"Urduca",emailPlaceholderText:"E-postanızı girin",incrementValue:"Değer artır",decrementValue:"Değer azalt",dropZoneInstructions:e=>e?"Seçmek için tıklayın veya dosyaları buraya sürükleyin, veya dosya seçiciyi açmak için Enter veya Boşluk tuşuna basın":"Dosyaları buraya sürükleyin",fileSizeUnits:["Bayt","KB","MB","GB","TB"],removeFile:"Dosyayı kaldır",clearAllFiles:"Tüm dosyaları temizle",clearValue:"Değeri temizle",unknownType:"Bilinmeyen tür",filesInputInstructions:(e,a,n)=>{let l=e==null||e>1?"Seçmek için tıklayın veya dosyaları buraya sürükleyin":"Seçmek için tıklayın veya dosyayı buraya sürükleyin";if(e||a){const i=[];if(e!=null&&e>1&&i.push(`en fazla ${e} dosya`),a&&n){const r=o.formatFileSize(a,{units:n});i.push(`her biri en fazla ${r}`)}i.length>0&&(l+=` (${i.join(", ")})`)}return l},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF yükleniyor...",loadFailed:"PDF yüklenemedi",invalidPdf:"Geçersiz PDF dosyası",pageOutOfRange:(e,a)=>`Sayfa ${e} aralık dışında (1-${a})`,renderFailed:"PDF sayfası oluşturulamadı"}};exports.default=t;
|