@tempots/beatui 0.87.3 → 0.88.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-DjMvIww5.js → ar-MUKILk4c.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-V_Se6Qhe.cjs → auth-divider-Cj-xJxF_.cjs} +1 -1
- package/dist/{auth-divider-BIefTDoO.js → auth-divider-DvVmqjnk.js} +101 -103
- package/dist/beatui.css +732 -671
- package/dist/beatui.tailwind.css +714 -662
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +12 -12
- package/dist/{colors-BmLYKmoH.js → colors-BY0Ja_bf.js} +12 -12
- package/dist/{de-wChFYqM4.js → de-CEsW1rVX.js} +1 -1
- package/dist/deep-merge-Dgy9xj6w.cjs +1 -0
- package/dist/{deep-merge-BRqRzEQs.js → deep-merge-OvVqSLSN.js} +443 -429
- package/dist/{duration-input-BDEb1Bb7.js → duration-input-BCXujp0V.js} +5 -5
- package/dist/{duration-input-BtFL5Vjx.cjs → duration-input-MJz6UO6E.cjs} +1 -1
- package/dist/{editor-toolbar-group-CwCCGzEC.js → editor-toolbar-group-Cnta0SOa.js} +6 -3
- package/dist/{es-CmPF3IGl.js → es-ChP-aFwC.js} +1 -1
- package/dist/{fa-D696e75R.js → fa-CNsrlIqh.js} +1 -1
- package/dist/{fr-B0jeX1Hx.js → fr-DgEFKpML.js} +1 -1
- package/dist/{he-SgAsIYJA.js → he-B4TqfISZ.js} +1 -1
- package/dist/{hi-s9oiIihq.js → hi-TSoDsngT.js} +1 -1
- package/dist/{index-KNk3k6NI.js → index-1JaBwDB-.js} +1 -1
- package/dist/index-B8cqD9ny.js +838 -0
- package/dist/index-CN10Cyqr.cjs +1 -0
- package/dist/{index-yMrXbIdg.cjs → index-CTcbhnPw.cjs} +1 -1
- package/dist/{index-CaWDj1Vg.cjs → index-D3QVPAme.cjs} +10 -10
- package/dist/{index-qa82MK4Z.cjs → index-D4ZFV8Rs.cjs} +1 -1
- package/dist/{index-anrXec7K.cjs → index-DF7RFzD9.cjs} +1 -1
- package/dist/{index-B0t-nt7i.js → index-DOc1_-Nm.js} +4 -4
- package/dist/{index-DdqGL9Jk.js → index-D_aTUfqS.js} +701 -684
- package/dist/{index-BFe-x3-z.js → index-DfPkCwdC.js} +2 -2
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +2285 -2260
- package/dist/{index.esm-ChUrm4xR.js → index.esm-By0m3ki1.js} +3 -3
- package/dist/{input-container-DhUiLmXE.js → input-container-BBWCDGTv.js} +1 -1
- package/dist/{it-Dc4IMciD.js → it-BrbebXg4.js} +1 -1
- package/dist/{ja-D2t2g5xj.js → ja-DcfOktrV.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +97 -103
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +15 -15
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +349 -351
- package/dist/{ko-BRylA5JZ.js → ko-73e6t369.js} +1 -1
- package/dist/lexical/index.cjs.js +5 -12
- package/dist/lexical/index.es.js +57 -87
- package/dist/lexical.css +24 -23
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/markdown.css +7 -7
- package/dist/{menu-Ui4lUPHM.js → menu-CV85y3Xf.js} +1 -1
- package/dist/{modal-Dkje8L_l.js → modal-BBJWY7NB.js} +5 -5
- package/dist/{modal-Coenk8Fy.cjs → modal-jJMS0ZlW.cjs} +1 -1
- package/dist/monaco/index.es.js +1 -1
- package/dist/{nl-Dh7LUWAn.js → nl-Bq-1-ulc.js} +1 -1
- package/dist/notice-9lpZ-VDn.cjs +1 -0
- package/dist/{notice-BmkckDsD.js → notice-AUVH8Lho.js} +26 -28
- package/dist/{oneof-branch-detection-BED_n2MT.js → oneof-branch-detection-BQnRjp9P.js} +1740 -1734
- package/dist/{oneof-branch-detection-Vov_e3kI.cjs → oneof-branch-detection-BsGhMslW.cjs} +6 -6
- package/dist/{pl-XEG-p1Q9.js → pl-Du9-VCfW.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/prosemirror.css +7 -7
- package/dist/{pt-DYsDA2sZ.js → pt-B2UqqSAB.js} +1 -1
- package/dist/{ru-BTKBykp-.js → ru-DiWa2inw.js} +1 -1
- package/dist/stack-4VUGISn6.cjs +1 -0
- package/dist/{stack-BJgsPJ9A.js → stack-Bm-UZosx.js} +145 -139
- package/dist/styles-url-4g2WnNJ8.js +4 -0
- package/dist/{styles-url-DZhZ-9Bf.js → styles-url-CJYy5nML.js} +1 -1
- package/dist/{styles-url-YAJ6Q1GS.cjs → styles-url-D8nVwSmZ.cjs} +1 -1
- package/dist/{styles-url-BSUFsmMD.cjs → styles-url-evUdl8tK.cjs} +1 -1
- package/dist/{styles-url-BvcVGpBJ.js → styles-url-hKxIOumK.js} +1 -1
- package/dist/styles-url-mlDYoWbF.cjs +1 -0
- 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/{text-input-BZmAB3_o.js → text-input-6FD7p7hN.js} +5 -5
- package/dist/{theme-BzpMLdvH.js → theme-kQZEeusG.js} +4 -4
- package/dist/{toolbar-Pdj-F80l.js → toolbar-Cr0JGj5h.js} +1 -1
- package/dist/{tr-Cp8ZCUic.js → tr-Culcm2Zb.js} +1 -1
- package/dist/{translations-jUYta1_1.js → translations-Cttn6w0G.js} +1 -1
- package/dist/{translations-BGblCUBj.js → translations-uEUkO6gJ.js} +30 -30
- package/dist/types/auth-i18n/translations.d.ts +2 -2
- package/dist/types/beatui-i18n/translations.d.ts +2 -2
- package/dist/types/better-auth/components/authenticated.d.ts +2 -2
- package/dist/types/better-auth/components/better-auth-container.d.ts +1 -1
- package/dist/types/better-auth/i18n/translations.d.ts +2 -2
- package/dist/types/better-auth/provider.d.ts +2 -2
- package/dist/types/components/auth/auth-container.d.ts +1 -1
- package/dist/types/components/auth/auth-email-prop.d.ts +1 -1
- package/dist/types/components/beatui.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/content/native-pdf-preview.d.ts +1 -1
- package/dist/types/components/content/pdfjs-preview.d.ts +1 -1
- package/dist/types/components/data/icon.d.ts +1 -1
- package/dist/types/components/data/page-drop-zone.d.ts +1 -1
- package/dist/types/components/data/unstyled-drop-zone.d.ts +1 -1
- package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +1 -1
- package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +1 -1
- package/dist/types/components/form/control/control.d.ts +2 -2
- package/dist/types/components/form/control/ensure-control.d.ts +1 -1
- package/dist/types/components/form/control/list-control.d.ts +1 -1
- package/dist/types/components/form/controller/color-controller.d.ts +4 -4
- package/dist/types/components/form/input/appearance-selector.d.ts +2 -2
- package/dist/types/components/form/input/base64-input.d.ts +1 -1
- package/dist/types/components/form/input/base64s-input.d.ts +1 -1
- package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
- package/dist/types/components/form/input/email-input.d.ts +1 -1
- package/dist/types/components/form/input/file-input.d.ts +1 -1
- package/dist/types/components/form/input/files-input.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +1 -1
- package/dist/types/components/form/input/list-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-base64-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +12 -12
- package/dist/types/components/form/input/password-input.d.ts +1 -1
- package/dist/types/components/form/input/plain-date-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-date-time-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-time-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-year-month-input.d.ts +12 -12
- package/dist/types/components/form/input/select-tags-input.d.ts +3 -3
- package/dist/types/components/form/input/step-utils.d.ts +5 -0
- package/dist/types/components/form/use-form.d.ts +3 -3
- package/dist/types/components/i18n/locale-direction.d.ts +1 -1
- package/dist/types/components/i18n/locale-selector.d.ts +1 -1
- package/dist/types/components/i18n/locale.d.ts +1 -1
- package/dist/types/components/i18n/make-i18nprovider.d.ts +2 -2
- package/dist/types/components/layout/app-shell.d.ts +1 -1
- package/dist/types/components/lexical/code/language-selector.d.ts +1 -1
- package/dist/types/components/lexical/floating/block-handle.d.ts +1 -1
- package/dist/types/components/lexical/floating/floating-toolbar.d.ts +1 -1
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +1 -1
- package/dist/types/components/lexical/table/table-controls.d.ts +1 -1
- package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +1 -1
- package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +2 -2
- package/dist/types/components/media/pdf-page-viewer.d.ts +1 -1
- package/dist/types/components/misc/notification-provider.d.ts +2 -2
- package/dist/types/components/navigation/link/button-link.d.ts +1 -1
- package/dist/types/components/navigation/link/link.d.ts +1 -1
- package/dist/types/components/navigation/link/navigation-link.d.ts +1 -1
- package/dist/types/components/navigation/pagination.d.ts +1 -1
- package/dist/types/components/navigation/sidebar/sidebar.d.ts +2 -2
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +1 -1
- package/dist/types/components/prosemirror/link-control.d.ts +1 -1
- package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +1 -1
- package/dist/types/components/prosemirror/utils.d.ts +2 -2
- package/dist/types/components/theme/theme.d.ts +2 -2
- package/dist/types/i18n/translate.d.ts +1 -1
- package/dist/types/tailwind/preset.d.ts +1 -1
- package/dist/types/tailwind/vite-plugin.d.ts +1 -1
- package/dist/types/tokens/borders.d.ts +104 -0
- package/dist/types/tokens/controls.d.ts +127 -0
- package/dist/types/tokens/index.d.ts +2 -0
- package/dist/types/tokens/radius.d.ts +14 -14
- package/dist/types/tokens/typography.d.ts +33 -33
- package/dist/types/utils/delay-signal.d.ts +1 -1
- package/dist/types/utils/use-animated-toggle.d.ts +22 -22
- package/dist/{ur-DkIYJxsF.js → ur-Deb-uH6b.js} +1 -1
- package/dist/{use-animated-toggle-89fKlXxy.js → use-animated-toggle-C7PTmnZi.js} +7 -7
- package/dist/{use-form-B_mCauP0.cjs → use-form-i97PToWB.cjs} +1 -1
- package/dist/{use-form-BSvvERhX.js → use-form-lg6-7Brc.js} +14 -13
- package/dist/{vi-DKw6PBja.js → vi-CUsCVh3n.js} +1 -1
- package/dist/widget-customization-BLvD4Lqt.cjs +1 -0
- package/dist/{widget-customization-DFr3ycD7.js → widget-customization-CDD72zYs.js} +29 -29
- package/dist/{zh-CaKHseXJ.js → zh-Dil2Jft8.js} +1 -1
- package/package.json +35 -31
- package/dist/deep-merge-CvN7Xvd1.cjs +0 -1
- package/dist/index-BywbRDsb.cjs +0 -1
- package/dist/index-D2_J_-XS.js +0 -671
- package/dist/notice-DMK7dx9a.cjs +0 -1
- package/dist/stack-DcZ_u50f.cjs +0 -1
- package/dist/styles-url-CCopc5pG.js +0 -4
- package/dist/styles-url-CEDSZTyZ.cjs +0 -1
- package/dist/widget-customization-BASfRpF7.cjs +0 -1
package/dist/lexical/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as rd } from "../_commonjsHelpers-DaMA6jEr.js";
|
|
2
2
|
import { Use as Tr, html as q, Task as Cc, attr as L, Value as _e, WithElement as mn, OnDispose as _n, Ensure as wc, signal as ie, When as zn, on as ln, prop as $e, style as Z, aria as Na, ForEach as K_, computedOf as W_ } from "@tempots/dom";
|
|
3
3
|
import { L as vc } from "../link-portal-Cr2l9f3k.js";
|
|
4
|
-
import { T as Ec } from "../theme-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { I as V_ } from "../input-container-
|
|
4
|
+
import { T as Ec } from "../theme-kQZEeusG.js";
|
|
5
|
+
import { M as j_, b as H_ } from "../menu-CV85y3Xf.js";
|
|
6
|
+
import { B as Vo, I as Aa } from "../translations-uEUkO6gJ.js";
|
|
7
|
+
import { E as J_, a as vt } from "../editor-toolbar-group-Cnta0SOa.js";
|
|
8
|
+
import { b as G_ } from "../toolbar-Cr0JGj5h.js";
|
|
9
|
+
import { I as V_ } from "../input-container-BBWCDGTv.js";
|
|
10
10
|
function D(n, ...e) {
|
|
11
11
|
const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
12
12
|
r.append("code", n);
|
|
@@ -995,7 +995,7 @@ function ja(n, e, t) {
|
|
|
995
995
|
function By(n) {
|
|
996
996
|
return n;
|
|
997
997
|
}
|
|
998
|
-
const gg = Symbol.for("ephemeral");
|
|
998
|
+
const gg = /* @__PURE__ */ Symbol.for("ephemeral");
|
|
999
999
|
function xo(n) {
|
|
1000
1000
|
return n[gg] || !1;
|
|
1001
1001
|
}
|
|
@@ -5836,7 +5836,7 @@ function Gb(n, e) {
|
|
|
5836
5836
|
r !== void 0 && n.setData(t, r);
|
|
5837
5837
|
}
|
|
5838
5838
|
}
|
|
5839
|
-
const Vb = Symbol.for("preact-signals");
|
|
5839
|
+
const Vb = /* @__PURE__ */ Symbol.for("preact-signals");
|
|
5840
5840
|
function vl() {
|
|
5841
5841
|
if (Bn > 1) return void Bn--;
|
|
5842
5842
|
let n, e = !1;
|
|
@@ -6225,7 +6225,7 @@ const rx = { config: { setOptions: sf, updateOptions: sf }, init: ({ $initialEdi
|
|
|
6225
6225
|
}
|
|
6226
6226
|
return () => {
|
|
6227
6227
|
};
|
|
6228
|
-
}, name: "@lexical/extension/InitialState", nodes: [$r, lt, Nr, Ar, Ir] }, of = Symbol.for("@lexical/extension/LexicalBuilder");
|
|
6228
|
+
}, name: "@lexical/extension/InitialState", nodes: [$r, lt, Nr, Ar, Ir] }, of = /* @__PURE__ */ Symbol.for("@lexical/extension/LexicalBuilder");
|
|
6229
6229
|
function lf() {
|
|
6230
6230
|
}
|
|
6231
6231
|
function ix(n) {
|
|
@@ -8786,14 +8786,6 @@ var da = { exports: {} }, Df;
|
|
|
8786
8786
|
function qx() {
|
|
8787
8787
|
return Df || (Df = 1, (function(n) {
|
|
8788
8788
|
var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
8789
|
-
/**
|
|
8790
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
8791
|
-
*
|
|
8792
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
8793
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
8794
|
-
* @namespace
|
|
8795
|
-
* @public
|
|
8796
|
-
*/
|
|
8797
8789
|
var t = (function(r) {
|
|
8798
8790
|
var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, s = 0, o = {}, l = {
|
|
8799
8791
|
/**
|
|
@@ -13358,7 +13350,7 @@ try {
|
|
|
13358
13350
|
typeof localStorage < "u" && localStorage && (xm = localStorage, WC = !1);
|
|
13359
13351
|
} catch {
|
|
13360
13352
|
}
|
|
13361
|
-
const jC = xm, ds = Symbol("Equality"), Sm = (n, e) => n === e || !!n?.[ds]?.(e) || !1, HC = (n) => typeof n == "object", JC = Object.assign, GC = Object.keys, VC = (n, e) => {
|
|
13353
|
+
const jC = xm, ds = /* @__PURE__ */ Symbol("Equality"), Sm = (n, e) => n === e || !!n?.[ds]?.(e) || !1, HC = (n) => typeof n == "object", JC = Object.assign, GC = Object.keys, VC = (n, e) => {
|
|
13362
13354
|
for (const t in n)
|
|
13363
13355
|
e(n[t], t);
|
|
13364
13356
|
}, Uo = (n) => GC(n).length, YC = (n) => {
|
|
@@ -13474,7 +13466,7 @@ const sn = (n, e) => new rw(n, e), Eh = (n) => n.next() >= 0.5, Sa = (n, e, t) =
|
|
|
13474
13466
|
for (let s = 0; s < r; s++)
|
|
13475
13467
|
i += iw(n);
|
|
13476
13468
|
return i;
|
|
13477
|
-
}, Ca = (n, e) => e[Ou(n, 0, e.length - 1)], ow = Symbol("0schema");
|
|
13469
|
+
}, Ca = (n, e) => e[Ou(n, 0, e.length - 1)], ow = /* @__PURE__ */ Symbol("0schema");
|
|
13478
13470
|
class lw {
|
|
13479
13471
|
constructor() {
|
|
13480
13472
|
this._rerrs = [];
|
|
@@ -13720,7 +13712,7 @@ class cw extends at {
|
|
|
13720
13712
|
}
|
|
13721
13713
|
}
|
|
13722
13714
|
Ne(cw);
|
|
13723
|
-
const uw = Symbol("optional");
|
|
13715
|
+
const uw = /* @__PURE__ */ Symbol("optional");
|
|
13724
13716
|
class Tm extends at {
|
|
13725
13717
|
/**
|
|
13726
13718
|
* @param {S} shape
|
|
@@ -15915,37 +15907,20 @@ class Sc {
|
|
|
15915
15907
|
* Only call this if you know that this.right is defined
|
|
15916
15908
|
*/
|
|
15917
15909
|
forward() {
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
this.right.content
|
|
15924
|
-
);
|
|
15925
|
-
break;
|
|
15926
|
-
default:
|
|
15927
|
-
this.right.deleted || (this.index += this.right.length);
|
|
15928
|
-
break;
|
|
15929
|
-
}
|
|
15930
|
-
this.left = this.right, this.right = this.right.right;
|
|
15910
|
+
this.right === null && Cn(), this.right.content.constructor === ze ? this.right.deleted || Ei(
|
|
15911
|
+
this.currentAttributes,
|
|
15912
|
+
/** @type {ContentFormat} */
|
|
15913
|
+
this.right.content
|
|
15914
|
+
) : this.right.deleted || (this.index += this.right.length), this.left = this.right, this.right = this.right.right;
|
|
15931
15915
|
}
|
|
15932
15916
|
}
|
|
15933
15917
|
const Fh = (n, e, t) => {
|
|
15934
|
-
for (; e.right !== null && t > 0; )
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
e.right.content
|
|
15941
|
-
);
|
|
15942
|
-
break;
|
|
15943
|
-
default:
|
|
15944
|
-
e.right.deleted || (t < e.right.length && Gn(n, Se(e.right.id.client, e.right.id.clock + t)), e.index += e.right.length, t -= e.right.length);
|
|
15945
|
-
break;
|
|
15946
|
-
}
|
|
15947
|
-
e.left = e.right, e.right = e.right.right;
|
|
15948
|
-
}
|
|
15918
|
+
for (; e.right !== null && t > 0; )
|
|
15919
|
+
e.right.content.constructor === ze ? e.right.deleted || Ei(
|
|
15920
|
+
e.currentAttributes,
|
|
15921
|
+
/** @type {ContentFormat} */
|
|
15922
|
+
e.right.content
|
|
15923
|
+
) : e.right.deleted || (t < e.right.length && Gn(n, Se(e.right.id.client, e.right.id.clock + t)), e.index += e.right.length, t -= e.right.length), e.left = e.right, e.right = e.right.right;
|
|
15949
15924
|
return e;
|
|
15950
15925
|
}, Xs = (n, e, t, r) => {
|
|
15951
15926
|
const i = /* @__PURE__ */ new Map(), s = r ? Pl(e, t) : null;
|
|
@@ -16068,19 +16043,16 @@ const Fh = (n, e, t) => {
|
|
|
16068
16043
|
for (; e !== s; ) {
|
|
16069
16044
|
if (t === e && (a = !0), !e.deleted) {
|
|
16070
16045
|
const c = e.content;
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
);
|
|
16082
|
-
break;
|
|
16083
|
-
}
|
|
16046
|
+
if (c.constructor === ze) {
|
|
16047
|
+
const { key: u, value: d } = (
|
|
16048
|
+
/** @type {ContentFormat} */
|
|
16049
|
+
c
|
|
16050
|
+
), f = r.get(u) ?? null;
|
|
16051
|
+
(o.get(u) !== c || f === d) && (e.delete(n), l++, !a && (i.get(u) ?? null) === d && f !== d && (f === null ? i.delete(u) : i.set(u, f))), !a && !e.deleted && Ei(
|
|
16052
|
+
i,
|
|
16053
|
+
/** @type {ContentFormat} */
|
|
16054
|
+
c
|
|
16055
|
+
);
|
|
16084
16056
|
}
|
|
16085
16057
|
}
|
|
16086
16058
|
e = /** @type {Item} */
|
|
@@ -16112,22 +16084,12 @@ const Fh = (n, e, t) => {
|
|
|
16112
16084
|
n._start
|
|
16113
16085
|
), i = n._start, s = Zt();
|
|
16114
16086
|
const o = gc(s);
|
|
16115
|
-
for (; i; )
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
/** @type {ContentFormat} */
|
|
16122
|
-
i.content
|
|
16123
|
-
);
|
|
16124
|
-
break;
|
|
16125
|
-
default:
|
|
16126
|
-
e += p_(t, r, i, s, o), s = gc(o), r = i;
|
|
16127
|
-
break;
|
|
16128
|
-
}
|
|
16129
|
-
i = i.right;
|
|
16130
|
-
}
|
|
16087
|
+
for (; i; )
|
|
16088
|
+
i.deleted === !1 && (i.content.constructor === ze ? Ei(
|
|
16089
|
+
o,
|
|
16090
|
+
/** @type {ContentFormat} */
|
|
16091
|
+
i.content
|
|
16092
|
+
) : (e += p_(t, r, i, s, o), s = gc(o), r = i)), i = i.right;
|
|
16131
16093
|
}
|
|
16132
16094
|
), e;
|
|
16133
16095
|
}, Ev = (n) => {
|
|
@@ -19263,7 +19225,7 @@ const i0 = (n) => {
|
|
|
19263
19225
|
({ appearance: g }) => q.div(
|
|
19264
19226
|
// CSS injection via LinkPortal
|
|
19265
19227
|
Cc(
|
|
19266
|
-
() => import("../styles-url-
|
|
19228
|
+
() => import("../styles-url-4g2WnNJ8.js"),
|
|
19267
19229
|
({ default: p }) => vc({ id: "beatui-lexical-css", href: p })
|
|
19268
19230
|
),
|
|
19269
19231
|
L.class("bc-lexical-editor-container"),
|
|
@@ -19274,7 +19236,8 @@ const i0 = (n) => {
|
|
|
19274
19236
|
L.class("bc-lexical-editor"),
|
|
19275
19237
|
L.class(`bc-lexical-editor--${a}`),
|
|
19276
19238
|
L.contenteditable(
|
|
19277
|
-
|
|
19239
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19240
|
+
i != null ? _e.map(i, (p) => !p) : !0
|
|
19278
19241
|
),
|
|
19279
19242
|
i != null ? L.class(
|
|
19280
19243
|
_e.map(
|
|
@@ -19526,7 +19489,7 @@ function k_(n, e, t) {
|
|
|
19526
19489
|
};
|
|
19527
19490
|
}
|
|
19528
19491
|
function T_(n, e) {
|
|
19529
|
-
return (t) => (r) =>
|
|
19492
|
+
return (t) => (r) => J_({
|
|
19530
19493
|
...r,
|
|
19531
19494
|
display: t,
|
|
19532
19495
|
disabled: n,
|
|
@@ -19700,7 +19663,7 @@ function l0({
|
|
|
19700
19663
|
}
|
|
19701
19664
|
}), U.focus());
|
|
19702
19665
|
};
|
|
19703
|
-
return
|
|
19666
|
+
return G_(
|
|
19704
19667
|
L.class("bc-lexical-toolbar"),
|
|
19705
19668
|
// Font group (font family and font size selects)
|
|
19706
19669
|
zn(
|
|
@@ -20161,7 +20124,7 @@ const V0 = (n) => {
|
|
|
20161
20124
|
({ appearance: y }) => q.div(
|
|
20162
20125
|
// CSS injection via LinkPortal
|
|
20163
20126
|
Cc(
|
|
20164
|
-
() => import("../styles-url-
|
|
20127
|
+
() => import("../styles-url-4g2WnNJ8.js"),
|
|
20165
20128
|
({ default: S }) => vc({ id: "beatui-lexical-css", href: S })
|
|
20166
20129
|
),
|
|
20167
20130
|
L.class("bc-lexical-editor-container"),
|
|
@@ -20189,7 +20152,10 @@ const V0 = (n) => {
|
|
|
20189
20152
|
L.class("bc-lexical-editor"),
|
|
20190
20153
|
L.class(`bc-lexical-editor--${a}`),
|
|
20191
20154
|
L.contenteditable(
|
|
20192
|
-
i != null ?
|
|
20155
|
+
i != null ? (
|
|
20156
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20157
|
+
_e.map(i, (S) => !S)
|
|
20158
|
+
) : !0
|
|
20193
20159
|
),
|
|
20194
20160
|
i != null ? L.class(
|
|
20195
20161
|
_e.map(
|
|
@@ -20706,6 +20672,7 @@ function q0({
|
|
|
20706
20672
|
L.class("bc-slash-command-palette__item"),
|
|
20707
20673
|
L.id(p),
|
|
20708
20674
|
L.role("option"),
|
|
20675
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20709
20676
|
Na.selected(g),
|
|
20710
20677
|
// Mouse hover handlers
|
|
20711
20678
|
mn((m) => {
|
|
@@ -20969,9 +20936,9 @@ function u0({
|
|
|
20969
20936
|
}), _n(() => $.disconnect());
|
|
20970
20937
|
}),
|
|
20971
20938
|
// Block type menu (uses BeatUI Menu + MenuItem)
|
|
20972
|
-
|
|
20939
|
+
j_({
|
|
20973
20940
|
items: () => r.map(
|
|
20974
|
-
(k) =>
|
|
20941
|
+
(k) => H_({
|
|
20975
20942
|
key: k.id,
|
|
20976
20943
|
content: k.label,
|
|
20977
20944
|
startContent: Aa({ icon: k.icon, size: "sm" }),
|
|
@@ -21023,7 +20990,7 @@ const Z0 = (n) => {
|
|
|
21023
20990
|
({ appearance: y }) => q.div(
|
|
21024
20991
|
// CSS injection via LinkPortal
|
|
21025
20992
|
Cc(
|
|
21026
|
-
() => import("../styles-url-
|
|
20993
|
+
() => import("../styles-url-4g2WnNJ8.js"),
|
|
21027
20994
|
({ default: S }) => vc({ id: "beatui-lexical-css", href: S })
|
|
21028
20995
|
),
|
|
21029
20996
|
L.class("bc-lexical-editor-container"),
|
|
@@ -21053,7 +21020,10 @@ const Z0 = (n) => {
|
|
|
21053
21020
|
L.class("bc-lexical-editor"),
|
|
21054
21021
|
L.class(`bc-lexical-editor--${a}`),
|
|
21055
21022
|
L.contenteditable(
|
|
21056
|
-
i != null ?
|
|
21023
|
+
i != null ? (
|
|
21024
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21025
|
+
_e.map(i, (S) => !S)
|
|
21026
|
+
) : !0
|
|
21057
21027
|
),
|
|
21058
21028
|
i != null ? L.class(
|
|
21059
21029
|
_e.map(
|
package/dist/lexical.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
.bc-lexical-editor-container {
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
|
-
border:
|
|
8
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
9
9
|
border-radius: var(--radius-control, var(--radius-md));
|
|
10
10
|
background-color: var(--color-neutral-50);
|
|
11
11
|
overflow: hidden;
|
|
@@ -168,7 +168,8 @@
|
|
|
168
168
|
.bc-lexical-editor blockquote {
|
|
169
169
|
margin: 1rem 0;
|
|
170
170
|
padding-left: 1rem;
|
|
171
|
-
border-left:
|
|
171
|
+
border-left: calc(2 * var(--border-width-medium)) solid
|
|
172
|
+
var(--color-neutral-300);
|
|
172
173
|
color: var(--color-neutral-700);
|
|
173
174
|
font-style: italic;
|
|
174
175
|
}
|
|
@@ -206,7 +207,7 @@
|
|
|
206
207
|
background-color: var(--color-neutral-100);
|
|
207
208
|
border-radius: var(--radius-md, 0.5rem);
|
|
208
209
|
overflow-x: auto;
|
|
209
|
-
border:
|
|
210
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
.bc-lexical-editor pre code {
|
|
@@ -231,7 +232,7 @@
|
|
|
231
232
|
.bc-lexical-editor hr {
|
|
232
233
|
margin: 1.5rem 0;
|
|
233
234
|
border: none;
|
|
234
|
-
border-top:
|
|
235
|
+
border-top: var(--border-width-medium) solid var(--color-neutral-200);
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
.bc-lexical-editor strong,
|
|
@@ -285,7 +286,7 @@
|
|
|
285
286
|
top: 0.35em;
|
|
286
287
|
width: 1em;
|
|
287
288
|
height: 1em;
|
|
288
|
-
border:
|
|
289
|
+
border: var(--border-width-medium) solid var(--color-neutral-400);
|
|
289
290
|
border-radius: var(--radius-xs, 0.25rem);
|
|
290
291
|
cursor: pointer;
|
|
291
292
|
}
|
|
@@ -302,8 +303,8 @@
|
|
|
302
303
|
top: 0.45em;
|
|
303
304
|
width: 0.5em;
|
|
304
305
|
height: 0.25em;
|
|
305
|
-
border-left:
|
|
306
|
-
border-bottom:
|
|
306
|
+
border-left: var(--border-width-medium) solid white;
|
|
307
|
+
border-bottom: var(--border-width-medium) solid white;
|
|
307
308
|
transform: rotate(-45deg);
|
|
308
309
|
}
|
|
309
310
|
|
|
@@ -442,7 +443,7 @@
|
|
|
442
443
|
|
|
443
444
|
@media (prefers-contrast: high) {
|
|
444
445
|
.bc-lexical-editor-container {
|
|
445
|
-
border-width:
|
|
446
|
+
border-width: var(--border-width-medium);
|
|
446
447
|
}
|
|
447
448
|
|
|
448
449
|
.bc-lexical-editor-container:focus-within {
|
|
@@ -460,7 +461,7 @@
|
|
|
460
461
|
|
|
461
462
|
/* Toolbar positioned at top of editor container */
|
|
462
463
|
.bc-lexical-toolbar {
|
|
463
|
-
border-bottom:
|
|
464
|
+
border-bottom: var(--border-width-thin) solid var(--color-neutral-200);
|
|
464
465
|
border-radius: 0;
|
|
465
466
|
border: none;
|
|
466
467
|
background-color: var(--color-neutral-50);
|
|
@@ -474,7 +475,7 @@
|
|
|
474
475
|
|
|
475
476
|
/* When toolbar is inside the editor container, add bottom border */
|
|
476
477
|
.bc-lexical-editor-container > .bc-lexical-toolbar {
|
|
477
|
-
border-bottom:
|
|
478
|
+
border-bottom: var(--border-width-thin) solid var(--color-neutral-200);
|
|
478
479
|
}
|
|
479
480
|
|
|
480
481
|
.dark .bc-lexical-editor-container > .bc-lexical-toolbar {
|
|
@@ -484,7 +485,7 @@
|
|
|
484
485
|
/* Bottom position variant */
|
|
485
486
|
.bc-lexical-toolbar--bottom {
|
|
486
487
|
border-bottom: none;
|
|
487
|
-
border-top:
|
|
488
|
+
border-top: var(--border-width-thin) solid var(--color-neutral-200);
|
|
488
489
|
}
|
|
489
490
|
|
|
490
491
|
.dark .bc-lexical-toolbar--bottom {
|
|
@@ -500,7 +501,7 @@
|
|
|
500
501
|
.bc-lexical-toolbar-select {
|
|
501
502
|
height: 28px;
|
|
502
503
|
padding: 0 var(--spacing-xs);
|
|
503
|
-
border:
|
|
504
|
+
border: var(--border-width-thin) solid var(--color-neutral-300);
|
|
504
505
|
border-radius: var(--radius-sm);
|
|
505
506
|
background-color: var(--bg-surface);
|
|
506
507
|
color: var(--color-neutral-900);
|
|
@@ -549,7 +550,7 @@
|
|
|
549
550
|
font-size: 0.875rem;
|
|
550
551
|
font-weight: 700;
|
|
551
552
|
pointer-events: none;
|
|
552
|
-
line-height:
|
|
553
|
+
line-height: var(--line-height-none);
|
|
553
554
|
}
|
|
554
555
|
|
|
555
556
|
.bc-lexical-toolbar-color-icon--highlight {
|
|
@@ -581,7 +582,7 @@
|
|
|
581
582
|
padding: var(--spacing-xs);
|
|
582
583
|
border-radius: var(--radius-md);
|
|
583
584
|
background-color: var(--color-white);
|
|
584
|
-
border:
|
|
585
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
585
586
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
586
587
|
z-index: 1000;
|
|
587
588
|
animation: bc-floating-toolbar-enter 0.15s ease-out;
|
|
@@ -613,7 +614,7 @@
|
|
|
613
614
|
overflow-y: auto;
|
|
614
615
|
border-radius: var(--radius-md);
|
|
615
616
|
background-color: var(--color-white);
|
|
616
|
-
border:
|
|
617
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
617
618
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
|
618
619
|
padding: var(--spacing-xs);
|
|
619
620
|
z-index: 1000;
|
|
@@ -733,7 +734,7 @@
|
|
|
733
734
|
justify-content: center;
|
|
734
735
|
width: 24px;
|
|
735
736
|
height: 24px;
|
|
736
|
-
border:
|
|
737
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
737
738
|
border-radius: var(--radius-sm);
|
|
738
739
|
background-color: var(--color-white);
|
|
739
740
|
color: var(--color-neutral-400);
|
|
@@ -780,12 +781,12 @@
|
|
|
780
781
|
}
|
|
781
782
|
|
|
782
783
|
.bc-lexical-table-row {
|
|
783
|
-
border-bottom:
|
|
784
|
+
border-bottom: var(--border-width-thin) solid var(--color-neutral-200);
|
|
784
785
|
}
|
|
785
786
|
|
|
786
787
|
.bc-lexical-table-cell,
|
|
787
788
|
.bc-lexical-table-cell-header {
|
|
788
|
-
border:
|
|
789
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
789
790
|
padding: 0.5rem 0.75rem;
|
|
790
791
|
position: relative;
|
|
791
792
|
vertical-align: top;
|
|
@@ -801,8 +802,8 @@
|
|
|
801
802
|
/* Selected cell highlight */
|
|
802
803
|
.bc-lexical-table-cell--selected {
|
|
803
804
|
background-color: var(--color-primary-50);
|
|
804
|
-
outline:
|
|
805
|
-
outline-offset: -
|
|
805
|
+
outline: var(--outline-width-focus) solid var(--color-primary-500);
|
|
806
|
+
outline-offset: calc(-1 * var(--outline-width-focus));
|
|
806
807
|
}
|
|
807
808
|
|
|
808
809
|
/* Table context menu */
|
|
@@ -884,7 +885,7 @@
|
|
|
884
885
|
@media (prefers-contrast: high) {
|
|
885
886
|
.bc-lexical-table-cell,
|
|
886
887
|
.bc-lexical-table-cell-header {
|
|
887
|
-
border-width:
|
|
888
|
+
border-width: var(--border-width-medium);
|
|
888
889
|
}
|
|
889
890
|
|
|
890
891
|
.bc-lexical-table-cell--selected {
|
|
@@ -902,7 +903,7 @@
|
|
|
902
903
|
margin: 1rem 0;
|
|
903
904
|
padding: 1rem;
|
|
904
905
|
background-color: var(--color-neutral-50);
|
|
905
|
-
border:
|
|
906
|
+
border: var(--border-width-thin) solid var(--color-neutral-200);
|
|
906
907
|
border-radius: var(--radius-md);
|
|
907
908
|
overflow-x: auto;
|
|
908
909
|
font-family:
|
|
@@ -1115,7 +1116,7 @@
|
|
|
1115
1116
|
|
|
1116
1117
|
@media (prefers-contrast: high) {
|
|
1117
1118
|
.bc-lexical-code-block {
|
|
1118
|
-
border-width:
|
|
1119
|
+
border-width: var(--border-width-medium);
|
|
1119
1120
|
}
|
|
1120
1121
|
}
|
|
1121
1122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tempots/dom");const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tempots/dom");const e=require("../index-CTcbhnPw.cjs");require("../link-portal-_tiDFZqh.cjs");exports.Markdown=e.Markdown;
|
package/dist/markdown.css
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
font-family: var(
|
|
44
44
|
--font-prose,
|
|
45
45
|
var(
|
|
46
|
-
--default-prose
|
|
46
|
+
--font-family-default-prose,
|
|
47
47
|
var(--font-body, var(--font-family-sans))
|
|
48
48
|
)
|
|
49
49
|
);
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
font-family: var(
|
|
59
59
|
--font-heading,
|
|
60
60
|
var(
|
|
61
|
-
--default-heading
|
|
61
|
+
--font-family-default-heading,
|
|
62
62
|
var(--font-body, var(--font-family-sans))
|
|
63
63
|
)
|
|
64
64
|
);
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
font-family: var(
|
|
73
73
|
--font-heading,
|
|
74
74
|
var(
|
|
75
|
-
--default-heading
|
|
75
|
+
--font-family-default-heading,
|
|
76
76
|
var(--font-body, var(--font-family-sans))
|
|
77
77
|
)
|
|
78
78
|
);
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
font-family: var(
|
|
87
87
|
--font-heading,
|
|
88
88
|
var(
|
|
89
|
-
--default-heading
|
|
89
|
+
--font-family-default-heading,
|
|
90
90
|
var(--font-body, var(--font-family-sans))
|
|
91
91
|
)
|
|
92
92
|
);
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
font-family: var(
|
|
101
101
|
--font-heading,
|
|
102
102
|
var(
|
|
103
|
-
--default-heading
|
|
103
|
+
--font-family-default-heading,
|
|
104
104
|
var(--font-body, var(--font-family-sans))
|
|
105
105
|
)
|
|
106
106
|
);
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
font-family: var(
|
|
115
115
|
--font-heading,
|
|
116
116
|
var(
|
|
117
|
-
--default-heading
|
|
117
|
+
--font-family-default-heading,
|
|
118
118
|
var(--font-body, var(--font-family-sans))
|
|
119
119
|
)
|
|
120
120
|
);
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
font-family: var(
|
|
129
129
|
--font-heading,
|
|
130
130
|
var(
|
|
131
|
-
--default-heading
|
|
131
|
+
--font-family-default-heading,
|
|
132
132
|
var(--font-body, var(--font-family-sans))
|
|
133
133
|
)
|
|
134
134
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { prop as H, WithElement as q, Fragment as v, aria as u, OneOfValue as j, OnDispose as z, on as p, Value as E, attr as s, html as D, Empty as W, computedOf as G, dataAttr as J } from "@tempots/dom";
|
|
2
2
|
import { PopOver as Q } from "@tempots/ui";
|
|
3
3
|
import { g as R } from "./timer-Rd2sKnvH.js";
|
|
4
|
-
import { u as X, A as Y } from "./use-animated-toggle-
|
|
4
|
+
import { u as X, A as Y } from "./use-animated-toggle-C7PTmnZi.js";
|
|
5
5
|
import { s as B } from "./session-id-3KiilioY.js";
|
|
6
6
|
function Z(m) {
|
|
7
7
|
const l = { fade: !0, scale: !0 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { WithElement as q, OnDispose as W, WithBrowserCtx as z, Value as j, render as R, html as E, dataAttr as F, attr as f, computedOf as A, prop as U, aria as B, on as H, When as O,
|
|
2
|
-
import { u as G } from "./use-animated-toggle-
|
|
1
|
+
import { WithElement as q, OnDispose as W, WithBrowserCtx as z, Value as j, render as R, html as E, dataAttr as F, attr as f, computedOf as A, Use as _, prop as U, aria as B, on as H, When as O, Fragment as K, coalesce as S } from "@tempots/dom";
|
|
2
|
+
import { u as G } from "./use-animated-toggle-C7PTmnZi.js";
|
|
3
3
|
import { g as J } from "./timer-Rd2sKnvH.js";
|
|
4
4
|
import { s as N } from "./session-id-3KiilioY.js";
|
|
5
|
-
import { B as P } from "./translations-
|
|
6
|
-
import { C as Q } from "./use-form-
|
|
7
|
-
import { B as D } from "./input-container-
|
|
5
|
+
import { B as P } from "./translations-uEUkO6gJ.js";
|
|
6
|
+
import { C as Q } from "./use-form-lg6-7Brc.js";
|
|
7
|
+
import { B as D } from "./input-container-BBWCDGTv.js";
|
|
8
8
|
const X = [
|
|
9
9
|
"a[href]",
|
|
10
10
|
"button:not([disabled])",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("@tempots/dom"),S=require("./use-animated-toggle-DrqK7nUS.cjs"),$=require("./timer-BJHOsuS6.cjs"),D=require("./session-id-B5lJMzbB.cjs"),q=require("./translations-gVgMyNno.cjs"),j=require("./use-form-
|
|
1
|
+
"use strict";const n=require("@tempots/dom"),S=require("./use-animated-toggle-DrqK7nUS.cjs"),$=require("./timer-BJHOsuS6.cjs"),D=require("./session-id-B5lJMzbB.cjs"),q=require("./translations-gVgMyNno.cjs"),j=require("./use-form-i97PToWB.cjs"),B=require("./input-container-B31Seozh.cjs"),W=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","details[open]"].join(", ");function _(u){return Array.from(u.querySelectorAll(W)).filter(e=>{const s=e;return s.offsetWidth>0&&s.offsetHeight>0&&!s.hasAttribute("inert")&&window.getComputedStyle(s).visibility!=="hidden"})}function V(u={}){const{active:e=!0,escapeDeactivates:s=!0,onEscape:t,initialFocus:a,returnFocus:i,clickOutsideDeactivates:c=!1,onClickOutside:d}=u;return n.WithElement(g=>{let h=e,f=null,l=[],b=null,p=null,m=null;typeof document<"u"&&(f=document.activeElement);const y=()=>{l=_(g)},C=r=>{if(h){if(s&&r.key==="Escape"){r.preventDefault(),t?.();return}if(r.key==="Tab"){if(y(),l.length===0){r.preventDefault();return}const o=l.indexOf(document.activeElement);r.shiftKey?o<=0&&(r.preventDefault(),l[l.length-1]?.focus()):o>=l.length-1&&(r.preventDefault(),l[0]?.focus())}}},v=r=>{if(!h||!c)return;const o=r.target;g.contains(o)||d?.()},x=()=>{if(!h)return;y();let r=null;typeof a=="function"?r=a():a?r=a:l.length>0&&(r=l[0]),r&&(p=setTimeout(()=>{p=null,r?.focus()},50)),document.addEventListener("keydown",C,!0),c&&document.addEventListener("click",v,!0)},w=()=>{h=!1,document.removeEventListener("keydown",C,!0),document.removeEventListener("click",v,!0);let r=null;typeof i=="function"?r=i():i?r=i:f&&(r=f),r&&document.body.contains(r)&&(m=setTimeout(()=>{m=null,r?.focus()},0))};return b=setTimeout(()=>{b=null,x()},0),n.OnDispose(()=>{b!=null&&clearTimeout(b),p!=null&&clearTimeout(p),m!=null&&clearTimeout(m),w()})})}function P(u={}){return{activate:()=>V({...u,active:!0}),deactivate:()=>V({...u,active:!1})}}function I(u){return{"~standard":{version:1,vendor:"beatui-custom",validate:s=>{const t=u.validate(s);return t.success?{value:t.data}:{issues:t.errors.map(a=>({message:a.message,path:a.path}))}},types:void 0},safeParse:s=>{const t=u.validate(s);return t.success?{success:!0,data:t.data}:{success:!1,error:{errors:t.errors.map(a=>({message:a.message,path:a.path?.map(i=>typeof i=="object"&&"key"in i?i.key.toString():i.toString())||[]}))}}}}}class k{optional(){return new U(this)}default(e){return new z(this,e)}schema(){return I(this)}}class E extends k{minLength;maxLength;pattern;customValidations=[];validate(e){if(typeof e!="string")return{success:!1,errors:[{message:"Expected string"}]};const s=[];this.minLength!==void 0&&e.length<this.minLength&&s.push({message:`Must be at least ${this.minLength} characters`}),this.maxLength!==void 0&&e.length>this.maxLength&&s.push({message:`Must be at most ${this.maxLength} characters`}),this.pattern&&!this.pattern.test(e)&&s.push({message:"Invalid format"});for(const t of this.customValidations){const a=t(e);a&&s.push({message:a})}return s.length>0?{success:!1,errors:s}:{success:!0,data:e}}min(e,s){const t=new E;return t.minLength=e,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length<e?s:null),t}max(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=e,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length>e?s:null),t}regex(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=e,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>e.test(a)?null:s),t}email(e="Please enter a valid email address"){const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations,a=>s.test(a)?null:e],t}refine(e){const s=new E;return s.minLength=this.minLength,s.maxLength=this.maxLength,s.pattern=this.pattern,s.customValidations=[...this.customValidations,e],s}}class T extends k{mustBeTrue=!1;trueMessage;validate(e){return typeof e!="boolean"?{success:!1,errors:[{message:"Expected boolean"}]}:this.mustBeTrue&&e!==!0?{success:!1,errors:[{message:this.trueMessage||"Must be true"}]}:{success:!0,data:e}}refine(e,s){const t=new T;t.mustBeTrue=this.mustBeTrue,t.trueMessage=this.trueMessage;const a=t.validate.bind(t);return t.validate=i=>{const c=a(i);return c.success?e(c.data)?c:{success:!1,errors:[{message:s}]}:c},t}literal(e,s){const t=new T;return t.mustBeTrue=!0,t.trueMessage=s,t}}class U extends k{constructor(e){super(),this.inner=e}validate(e){if(e===void 0)return{success:!0,data:void 0};const s=this.inner.validate(e);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.errors}}}class z extends k{constructor(e,s){super(),this.inner=e,this.defaultValue=s}validate(e){return e===void 0?{success:!0,data:this.defaultValue}:this.inner.validate(e)}}class F extends k{constructor(e){super(),this.shape=e}validate(e){if(typeof e!="object"||e===null||Array.isArray(e))return{success:!1,errors:[{message:"Expected object"}]};const s=e,t={},a=[];for(const[i,c]of Object.entries(this.shape)){const d=c.validate(s[i]);if(d.success)t[i]=d.data;else for(const g of d.errors)a.push({message:g.message,path:[i,...g.path||[]]})}return a.length>0?{success:!1,errors:a}:{success:!0,data:t}}refine(e,s){const t=new F(this.shape),a=t.validate.bind(t);return t.validate=i=>{const c=a(i);if(!c.success)return c;const d=e(c.data);return d?{success:!1,errors:[{message:d,path:s?.path}]}:{success:!0,data:c.data}},t}}const R=()=>new E,H=()=>new T,K=u=>new F(u);function O(u){return n.WithBrowserCtx(e=>{const s=[],t=()=>s.forEach(i=>i());return u(({effect:i="opaque",mode:c="capturing",onClickOutside:d,onEscape:g,content:h,container:f="body"})=>{f==="body"&&(e=e.makePortal("body"));const l=S.useAnimatedElementToggle();l.listenOnClosed(t);let b=()=>{},p=()=>{};const m=r=>{r.key==="Escape"&&(g?.(),l.close())},y=()=>{d?.(),l.close()},C=r=>{b(),p(),r==="capturing"?(document.addEventListener("keydown",m),b=()=>document.removeEventListener("keydown",m),e.element.addEventListener("mousedown",y),p=()=>e.element.removeEventListener("mousedown",y)):(b=()=>{},p=()=>{})},v=n.Value.on(c,C);s.push(v),s.push(()=>{l.dispose(),b(),p()});const x=()=>{const r=new Set;for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))o.hasAttribute("inert")?r.add(o):o.setAttribute("inert","");return s.push(()=>{for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))r.has(o)||o.removeAttribute("inert");r.clear()}),document.activeElement?.blur?.(),n.html.div(n.WithElement(o=>l.setElement(o)),n.dataAttr.status(l.status.map(String)),n.dataAttr.overlay("true"),n.attr.class(n.computedOf(i??"opaque",c)((o,L)=>`bc-overlay bc-overlay--effect-${o} bc-overlay--mode-${L}`)),h)},w=n.render(x(),e.element,{disposeWithParent:!0,clear:!1,providers:e.providers});s.push(w),$.g(()=>l.open())},t)})}function M(u,e){const{size:s="md",dismissable:t=!0,showCloseButton:a=!0,onClose:i,overlayEffect:c="opaque",container:d="body",position:g="center"}=u;return O((h,f)=>{let l=()=>{};return e(m=>{l=f;const y=n.prop("capturing");n.Value.on(t,o=>{y.set(o?"capturing":"non-capturing")});const C=n.computedOf(m.header!=null,a)((o,L)=>o||L),v=D.sessionId("modal"),x=`${v}-header`,w=`${v}-body`,r=n.html.div(n.attr.class(n.computedOf(s,g)((o,L)=>`bc-modal bc-modal--size-${o} bc-modal--container-${d} bc-modal--position-${L}`)),n.attr.role("dialog"),n.aria.modal(!0),...m.header?[n.aria.labelledby(x)]:[],n.aria.describedby(w),n.attr.tabindex(-1),n.attr.id(v),n.dataAttr.focusTrap("true"),n.on.mousedown(o=>o.stopPropagation()),V({escapeDeactivates:!1,initialFocus:()=>{const o=document.getElementById(v);if(!o)return null;const L=o.querySelector('[aria-label="Close modal"]');if(L)return L;const A=o.querySelector('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');return A||o}}),n.html.div(n.attr.class("bc-modal__content"),n.When(C,()=>n.html.div(n.attr.class("bc-modal__header"),n.html.div(n.attr.class("bc-modal__title"),...m.header?[n.attr.id(x)]:[],m.header),n.When(a,()=>n.Use(q.BeatUII18n,o=>j.CloseButton({size:"sm",label:o.$.closeModal,onClick:()=>{l(),f()}}))))),n.html.div(n.attr.class("bc-modal__body"),n.attr.id(w),m.body),m.footer&&n.html.div(n.attr.class("bc-modal__footer"),m.footer)));h({mode:y,effect:c??"opaque",container:d,content:r,onClickOutside:()=>{i?.(),f()},onEscape:()=>{i?.(),f()}})},()=>{l(),f()})})}function G(u,e){const{confirmText:s,cancelText:t,onConfirm:a,onCancel:i,...c}=u;return n.Use(q.BeatUII18n,d=>M({showCloseButton:!1,...c},(g,h)=>{const f=()=>{a?.(),h()},l=()=>{i?.(),h()};return e(p=>{g({body:p,footer:n.Fragment(n.attr.class("bc-modal__actions"),B.Button({variant:"outline",onClick:l},n.coalesce(t,d.$.cancel)),B.Button({color:"primary",variant:"filled",onClick:f},n.coalesce(s,d.$.confirm)))})},h)}))}exports.BooleanValidator=T;exports.ConfirmModal=G;exports.FocusTrap=V;exports.Modal=M;exports.ObjectValidator=F;exports.Overlay=O;exports.StringValidator=E;exports.boolean=H;exports.createStandardSchema=I;exports.object=K;exports.string=R;exports.useFocusTrap=P;
|
package/dist/monaco/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import { x as _ } from "../timer-Rd2sKnvH.js";
|
|
3
3
|
import { L as z } from "../link-portal-Cr2l9f3k.js";
|
|
4
|
-
import { T as N } from "../theme-
|
|
4
|
+
import { T as N } from "../theme-kQZEeusG.js";
|
|
5
5
|
const g = "https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/", G = (e) => {
|
|
6
6
|
if (!e || typeof e != "object") return !1;
|
|
7
7
|
const o = e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const v=require("./text-input-w0eVcqk5.cjs"),t=require("@tempots/dom"),V=require("./input-container-B31Seozh.cjs"),f=require("./translations-gVgMyNno.cjs"),_=require("./use-form-i97PToWB.cjs"),O=n=>{const r={name:"email",autocomplete:"email",...n},{value:s,before:l,onBlur:o,onChange:p,onInput:c,placeholder:h}=r,m=l??V.InputIcon({icon:"line-md:email",size:n.size,color:"neutral"});return t.Use(f.BeatUII18n,d=>V.InputContainer({...n,before:m,input:t.input.email(v.CommonInputAttributes(r),t.attr.placeholder(t.coalesce(h,d.$.emailPlaceholderText)),t.attr.value(s),t.attr.class("bc-input"),o!=null?t.on.blur(t.emitValue(o)):t.Empty,p!=null?t.on.change(t.emitValue(p)):t.Empty,c!=null?t.on.input(t.emitValue(c)):t.Empty)}))},B=n=>{const{value:r,onBlur:s,onChange:l,onInput:o,before:p,after:c,hasError:h,disabled:m,autocomplete:d,placeholder:g,...b}=n,y={name:"password",disabled:m,...b},i=t.prop(!0),a=t.computedOf(i,d)((e,u)=>e?u??"current-password":"off");return t.Use(f.BeatUII18n,e=>{const u=t.computedOf(e.$.passwordPlaceholderText,i,g)((I,C,E)=>C?"•••••••••••••••":E??I),w=t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__password-toggle"),t.aria.label(e.$.togglePasswordVisibility),t.on.click(()=>i.update(I=>!I)),t.When(i,()=>f.Icon({icon:"line-md:watch"}),()=>f.Icon({icon:"line-md:watch-off"})));return V.InputContainer({before:p,disabled:m,hasError:h,input:t.html.input(v.CommonInputAttributes({...y,autocomplete:a,placeholder:u}),t.When(i,()=>t.attr.type("password"),()=>t.attr.type("text")),t.attr.class("bc-input"),t.attr.value(r),s!=null?t.on.blur(t.emitValue(s)):t.Empty,l!=null?t.on.change(t.emitValue(l)):t.Empty,o!=null?t.on.input(t.emitValue(o)):t.Empty),after:c!=null?t.Fragment(w,c):w})})};function U(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";default:return"material-symbols:info-outline"}}function P(n){switch(n){case"success":return"success";case"warning":return"warning";case"danger":return"danger";default:return"info"}}function T(n,r,s,l){const o=["bc-notice",`bc-notice--${n}`,`bc-notice--tone-${r}`];return s&&o.push("bc-notice--dismissible"),l&&l.length>0&&o.push(l),o.join(" ")}function $({variant:n="info",tone:r="subtle",role:s,title:l,icon:o,closable:p=!1,onDismiss:c,class:h},...m){const d=t.prop(!0);return t.When(d,()=>{const g=t.Value.map(p,a=>!!a||c!=null),b=t.Value.map(n,a=>a??"info"),y=t.Value.map(r,a=>a??"subtle"),i=t.computedOf(s,b)((a,e)=>a??(e==="danger"?"alert":"status"));return t.Use(f.BeatUII18n,a=>t.html.div(t.attr.class(t.computedOf(b,y,g,h)((e,u,w,I)=>T(e,u,w,I))),t.attr.role(t.Value.map(i,e=>e)),t.Unless(t.Value.map(o,e=>e===!1),()=>t.html.div(t.attr.class("bc-notice__icon"),f.Icon({icon:t.computedOf(o,b)((e,u)=>e===void 0?U(u):String(e)),size:"md",color:t.Value.map(b,P)}))),t.html.div(t.attr.class("bc-notice__body"),t.Ensure(l,e=>t.html.div(t.attr.class("bc-notice__title"),e)),t.html.div(t.attr.class("bc-notice__content"),...m)),t.When(g,()=>_.CloseButton({size:"xs",label:a.$.closeModal,onClick:()=>{d.set(!1),c?.()}}))))})}exports.EmailInput=O;exports.Notice=$;exports.PasswordInput=B;
|