@tempots/beatui 0.94.0 → 1.0.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-CuI1Jgt6.cjs +1 -0
- package/dist/{ar-8Cko5i-Z.js → ar-DaKbK_t8.js} +88 -11
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BQIhr3-R.js} +99 -98
- package/dist/auth-divider-DvnUModP.cjs +1 -0
- package/dist/beatui.css +1628 -541
- package/dist/beatui.tailwind.css +1629 -542
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +9 -9
- package/dist/codehighlight/index.cjs.js +22 -0
- package/dist/codehighlight/index.es.js +76 -0
- package/dist/colors-B-p6IzX9.cjs +1 -0
- package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
- package/dist/{de-Bt-d2iKj.js → de-3MTPDS1i.js} +83 -6
- package/dist/de-DthHehbh.cjs +1 -0
- package/dist/{deep-merge-CoLO4id0.js → deep-merge-BzIheQtH.js} +511 -517
- package/dist/deep-merge-EkjEgK0N.cjs +1 -0
- package/dist/{duration-input-47x7nbGh.cjs → duration-input-ClgYjeBa.cjs} +1 -1
- package/dist/{duration-input-DrVonjKK.js → duration-input-DGzmIImj.js} +5 -5
- package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
- package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
- package/dist/es-B6GJLk9h.cjs +1 -0
- package/dist/{es-2llfNFX2.js → es-DwMUvBeU.js} +95 -18
- package/dist/{fa-CQVIBjKP.js → fa-0rvQiKrJ.js} +88 -11
- package/dist/fa-BwgP93iV.cjs +1 -0
- package/dist/{fr-CC3smTlW.js → fr-B4i6NzLl.js} +87 -10
- package/dist/fr-CQzk5zqY.cjs +1 -0
- package/dist/{he-CZilsN75.js → he-C71n-hsn.js} +88 -11
- package/dist/he-DcxxvRfs.cjs +1 -0
- package/dist/hi-D-KHVWg4.cjs +1 -0
- package/dist/{hi-CAZjwGv-.js → hi-xmrXpeVU.js} +88 -11
- package/dist/index-B5MAsOC-.cjs +1 -0
- package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +8055 -5285
- package/dist/input-container-BvEcp7FU.js +275 -0
- package/dist/input-container-Di1YvVB_.cjs +1 -0
- package/dist/{it-D6RXFIL6.js → it-CDZTtOBC.js} +84 -7
- package/dist/it-D344Dutu.cjs +1 -0
- package/dist/ja-BNgnDZ27.cjs +1 -0
- package/dist/{ja-D7zsz4Ij.js → ja-Zz1LzidW.js} +92 -15
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +261 -257
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +132 -133
- package/dist/{ko-taN2Npr4.js → ko-9laUsZDL.js} +91 -14
- package/dist/ko-D-WJ9NK7.cjs +1 -0
- package/dist/lexical/index.cjs.js +2 -39
- package/dist/lexical/index.es.js +2102 -20521
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +41 -4
- package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
- package/dist/menu-B92oSDct.cjs +1 -0
- package/dist/modal-BT0jjDqX.cjs +1 -0
- package/dist/{modal-ZitwUeXx.js → modal-DBguyX-b.js} +9 -9
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +7 -7
- package/dist/nl-CrqUlFie.cjs +1 -0
- package/dist/{nl-CRC6r4Q4.js → nl-Dcll9fVA.js} +87 -10
- package/dist/{notice-E_p2hg1G.js → notice-E19wu9lA.js} +51 -51
- package/dist/notice-_9XhdrFw.cjs +1 -0
- package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
- package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
- package/dist/pl-9UksIrvX.cjs +1 -0
- package/dist/{pl-C6qNs0Lq.js → pl-Dm9N9Gbr.js} +84 -7
- package/dist/prosemirror/index.cjs.js +3 -1
- package/dist/prosemirror/index.es.js +636 -4
- package/dist/{pt-CcWPLqBh.js → pt-CFi5cn0k.js} +89 -12
- package/dist/pt-_kfdzwqi.cjs +1 -0
- package/dist/{ru-Dt9-9m0E.js → ru-CEhZUw8R.js} +92 -15
- package/dist/ru-CW1WNNlr.cjs +1 -0
- package/dist/stack-BLMteGTn.js +15 -0
- package/dist/stack-dwLevGa2.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-DfqXolVe.js +55 -0
- package/dist/text-input-X_q01NsY.cjs +1 -0
- package/dist/toolbar-DY0ax2Qd.js +130 -0
- package/dist/toolbar-DoKdYXIL.cjs +1 -0
- package/dist/tr-B6GIRegf.cjs +1 -0
- package/dist/{tr-CDTWeRY0.js → tr-ZmnVDhLP.js} +83 -6
- package/dist/{translations-NBY7SubC.js → translations-A4kR7CW8.js} +1 -1
- package/dist/{translations-CiBhB2FV.js → translations-B1_yyDUK.js} +185 -106
- package/dist/{translations-BdCtLBZt.cjs → translations-C81buKAw.cjs} +1 -1
- package/dist/translations-Dbx7L7Q1.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +72 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +72 -0
- package/dist/types/beatui-i18n/translations.d.ts +72 -0
- package/dist/types/codehighlight/code-highlight.d.ts +21 -0
- package/dist/types/codehighlight/index.d.ts +14 -0
- package/dist/types/components/button/toggle-button.d.ts +4 -4
- package/dist/types/components/data/avatar.d.ts +3 -1
- package/dist/types/components/data/badge.d.ts +10 -18
- package/dist/types/components/data/column-filter-panel.d.ts +31 -0
- package/dist/types/components/data/column-filter.d.ts +110 -0
- package/dist/types/components/data/column-header-menu.d.ts +42 -0
- package/dist/types/components/data/data-source.d.ts +190 -0
- package/dist/types/components/data/data-table-body.d.ts +12 -0
- package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
- package/dist/types/components/data/data-table-context.d.ts +53 -0
- package/dist/types/components/data/data-table-header.d.ts +6 -0
- package/dist/types/components/data/data-table-resolve.d.ts +26 -0
- package/dist/types/components/data/data-table-types.d.ts +201 -0
- package/dist/types/components/data/data-table.d.ts +38 -0
- package/dist/types/components/data/data-toolbar.d.ts +44 -0
- package/dist/types/components/data/date-picker-shared.d.ts +55 -0
- package/dist/types/components/data/date-picker.d.ts +58 -0
- package/dist/types/components/data/date-range-picker.d.ts +56 -0
- package/dist/types/components/data/filter.d.ts +268 -0
- package/dist/types/components/data/index.d.ts +13 -4
- package/dist/types/components/data/indicator.d.ts +41 -0
- package/dist/types/components/data/progress-bar.d.ts +2 -2
- package/dist/types/components/data/selection-checkbox.d.ts +63 -0
- package/dist/types/components/data/skeleton.d.ts +1 -1
- package/dist/types/components/data/sortable-header.d.ts +55 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
- package/dist/types/components/form/control/control.d.ts +9 -9
- package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
- package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
- package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
- package/dist/types/components/form/input/color-input.d.ts +1 -1
- package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
- package/dist/types/components/form/input/combobox-input.d.ts +5 -5
- package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
- package/dist/types/components/form/input/date-input.d.ts +4 -4
- package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
- package/dist/types/components/form/input/editable-text.d.ts +2 -2
- package/dist/types/components/form/input/email-input.d.ts +4 -4
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +28 -1
- package/dist/types/components/form/input/mask-input.d.ts +8 -2
- package/dist/types/components/form/input/native-select.d.ts +3 -3
- package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
- package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
- package/dist/types/components/form/input/number-input.d.ts +3 -3
- package/dist/types/components/form/input/otp-input.d.ts +12 -12
- package/dist/types/components/form/input/rating-input.d.ts +7 -8
- package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/switch.d.ts +2 -2
- package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -2
- package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/collapse.d.ts +2 -2
- package/dist/types/components/layout/flex.d.ts +26 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
- package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
- package/dist/types/components/misc/index.d.ts +1 -0
- package/dist/types/components/misc/loading-overlay.d.ts +29 -0
- package/dist/types/components/misc/notice.d.ts +4 -4
- package/dist/types/components/misc/notification-provider.d.ts +9 -3
- package/dist/types/components/misc/notification.d.ts +9 -9
- package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
- package/dist/types/components/navigation/menu.d.ts +6 -6
- package/dist/types/components/navigation/pagination.d.ts +17 -4
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
- package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
- package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
- package/dist/types/components/overlay/dialogs.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +9 -2
- package/dist/types/components/overlay/tooltip.d.ts +6 -6
- package/dist/types/components/theme/types.d.ts +15 -4
- package/dist/types/lexical/index.d.ts +2 -2
- package/dist/types/lexical/plugins/index.d.ts +1 -1
- package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
- package/dist/types/lexical/plugins/text.d.ts +5 -0
- package/dist/types/lexical/types.d.ts +126 -5
- package/dist/types/lexical-i18n/default.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
- package/dist/types/tokens/z-index.d.ts +18 -18
- package/dist/types/utils/use-animated-toggle.d.ts +12 -4
- package/dist/ur-CtFl_tz6.cjs +1 -0
- package/dist/{ur-CLrK5FPQ.js → ur-yYgj3NmT.js} +88 -11
- package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
- package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
- package/dist/use-form-CaW192gw.cjs +2 -0
- package/dist/{use-form-BQRVnIp9.js → use-form-Dn6v2tEh.js} +153 -152
- package/dist/utils-DmEuG3Np.cjs +1 -0
- package/dist/utils-vUtP6iPG.js +165 -0
- package/dist/{vi-B1_QDUQJ.js → vi-D5u4CLQO.js} +89 -12
- package/dist/vi-DyCZSpsk.cjs +1 -0
- package/dist/widget-customization-DgW1SXN6.cjs +1 -0
- package/dist/{widget-customization-C-fSx3RB.js → widget-customization-Dkx7kNSe.js} +413 -398
- package/dist/{zh-rDtQ92Pp.js → zh-B0kwMMer.js} +91 -14
- package/dist/zh-C3ZxMQKb.cjs +1 -0
- package/package.json +209 -38
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/ar-D2DjoXta.cjs +0 -1
- package/dist/auth-divider-C3E16pml.cjs +0 -1
- package/dist/colors-BI0YhONJ.cjs +0 -1
- package/dist/de-Cdf3432J.cjs +0 -1
- package/dist/deep-merge-Blrucd-E.cjs +0 -1
- package/dist/es-6fFPkKHL.cjs +0 -1
- package/dist/fa-GXyNzAXz.cjs +0 -1
- package/dist/fr-C6EYTwSH.cjs +0 -1
- package/dist/he-CJUgxvi8.cjs +0 -1
- package/dist/hi-DqIR4VtX.cjs +0 -1
- package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
- package/dist/hls.light.min-hEMf_E8u.js +0 -8311
- package/dist/index-1JaBwDB-.js +0 -921
- package/dist/index-B-cwxUsP.cjs +0 -1
- package/dist/index-BFzxpY7y.js +0 -68
- package/dist/index-BOC0cVoY.cjs +0 -36
- package/dist/index-CN10Cyqr.cjs +0 -1
- package/dist/index-CTcbhnPw.cjs +0 -4
- package/dist/index-DF7RFzD9.cjs +0 -1
- package/dist/index-DJ9YIJcG.js +0 -14308
- package/dist/index-DfPkCwdC.js +0 -2709
- package/dist/input-container-9r1F3KuX.js +0 -263
- package/dist/input-container-DiYEl_y8.cjs +0 -1
- package/dist/it-BvHsJ7fH.cjs +0 -1
- package/dist/ja-B2gP7OHY.cjs +0 -1
- package/dist/ko-BddhddIA.cjs +0 -1
- package/dist/menu-De_-sGeb.cjs +0 -1
- package/dist/modal-DUlqGUW7.cjs +0 -1
- package/dist/nl-COrtZUnH.cjs +0 -1
- package/dist/notice-DAVOTnfA.cjs +0 -1
- package/dist/oneof-branch-detection-D6Xa8qNR.cjs +0 -8
- package/dist/oneof-branch-detection-DCPwyutI.js +0 -6290
- package/dist/pl-BHI4zBgV.cjs +0 -1
- package/dist/pt-BGzC9MhU.cjs +0 -1
- package/dist/ru-CXeFbIPb.cjs +0 -1
- package/dist/stack-4VUGISn6.cjs +0 -1
- package/dist/stack-Bm-UZosx.js +0 -879
- package/dist/string-B9vVyfq3.cjs +0 -1
- package/dist/string-DYyMxBl-.js +0 -19
- package/dist/text-input-BgPx8BbG.js +0 -45
- package/dist/text-input-DUnhBUd6.cjs +0 -1
- package/dist/timer-BJHOsuS6.cjs +0 -1
- package/dist/timer-Rd2sKnvH.js +0 -65
- package/dist/toolbar-DKOh_gbA.js +0 -118
- package/dist/toolbar-Dkc2y1dI.cjs +0 -1
- package/dist/tr-CdOtQAtA.cjs +0 -1
- package/dist/translations-Cy9hoMGV.cjs +0 -1
- package/dist/types/components/data/calendar-shared.d.ts +0 -59
- package/dist/types/components/data/calendar.d.ts +0 -107
- package/dist/types/components/data/icon-badge.d.ts +0 -14
- package/dist/types/components/data/range-calendar.d.ts +0 -104
- package/dist/types/components/data/tag.d.ts +0 -51
- package/dist/ur-C7itXvnC.cjs +0 -1
- package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
- package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
- package/dist/use-form-DTyNw0kM.cjs +0 -2
- package/dist/utils-DEbsp9Q9.js +0 -129
- package/dist/utils-DIUEhA-Z.cjs +0 -1
- package/dist/vi-CQrUWB3y.cjs +0 -1
- package/dist/widget-customization-xEBfEPhQ.cjs +0 -1
- package/dist/zh-DWswYYTS.cjs +0 -1
package/dist/ur-C7itXvnC.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-Cy9hoMGV.cjs"),r={loadingExtended:"لوڈ ہو رہا ہے، براہ کرم انتظار کریں",loadingShort:"لوڈ ہو رہا ہے...",locale:"زبان",iconDescription:"آئیکن",loadingIcon:"لوڈنگ آئیکن",failedToLoadIcon:"آئیکن لوڈ کرنے میں ناکام",editLabel:"ترمیم",selectOne:"ایک منتخب کریں",selectNone:"کوئی نہیں",selectMany:"متعدد منتخب کریں",noResults:"کوئی نتیجہ نہیں",passwordPlaceholderText:"خفیہ پاس ورڈ",togglePasswordVisibility:"پاس ورڈ کی مرئیت تبدیل کریں",toggleMenu:"مینو ٹوگل کریں",toggleAside:"سائیڈ پینل ٹوگل کریں",mainNavigation:"بنیادی نیویگیشن",sidebar:"سائیڈ بار",closeDrawer:"دراز بند کریں",closeModal:"ماڈل بند کریں",confirm:"تصدیق",cancel:"منسوخ",addLabel:"شامل کریں",removeItem:"آئٹم ہٹائیں",currentLocale:"اردو",ar:"عربی",de:"جرمن",en:"انگریزی",es:"ہسپانوی",fr:"فرانسیسی",he:"عبرانی",hi:"ہندی",it:"اطالوی",ja:"جاپانی",ko:"کوریائی",nl:"ڈچ",pl:"پولش",pt:"پرتگالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"اپنا ای میل داخل کریں",incrementValue:"قدر اضافہ کریں",decrementValue:"قدر کم کریں",dropZoneInstructions:e=>e?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں":"فائلیں یہاں گھسیٹیں",fileSizeUnits:["بائٹس","KB","MB","GB","TB"],removeFile:"فائل حذف کریں",clearAllFiles:"تمام فائلیں صاف کریں",clearValue:"قدر صاف کریں",unknownType:"نامعلوم قسم",filesInputInstructions:(e,o,n)=>{let l=e==null||e>1?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں":"منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";if(e||o){const t=[];if(e!=null&&e>1&&t.push(`زیادہ سے زیادہ ${e} فائلیں`),o&&n){const a=i.formatFileSize(o,{units:n});t.push(`ہر ایک زیادہ سے زیادہ ${a}`)}t.length>0&&(l+=` (${t.join("، ")})`)}return l},paginationLabel:"صفحہ بندی",firstPage:"پہلا صفحہ",previousPage:"پچھلا صفحہ",nextPage:"اگلا صفحہ",lastPage:"آخری صفحہ",breadcrumbs:"بریڈ کرمبز",commandPalette:"کمانڈ پیلیٹ",typeACommand:"کمانڈ ٹائپ کریں...",noResultsFound:"کوئی نتیجہ نہیں ملا",noMatchingCommands:"کوئی مماثل کمانڈ نہیں ملی",appearanceSystem:"سسٹم",appearanceLight:"ہلکا",appearanceDark:"گہرا",ok:"OK",changeTypeConfirmation:"قسم تبدیل کرنے سے موجودہ قدر صاف ہو جائے گی۔ جاری رکھیں؟",notifications:"اطلاعات",markAllAsRead:"سب کو پڑھا ہوا نشان زد کریں",noNotifications:"کوئی اطلاع نہیں",schemaConflictsDetected:"اسکیما تنازعات کا پتا چلا",schemaViolationsDetected:"اسکیما خلاف ورزیوں کا پتا چلا",properties:"خصوصیات",uploading:"اپ لوڈ ہو رہا ہے...",dropFilesOrBrowse:"فائلیں یہاں چھوڑیں یا براؤز کرنے کے لیے کلک کریں",acceptedTypes:e=>`قابل قبول اقسام: ${e}`,enterUrlPrompt:"URL درج کریں:",exceeded:"(حد سے تجاوز)",pdfPreview:"PDF پیش نظارہ",lexical:{fontFamily:"فونٹ فیملی",fontSize:"فونٹ سائز",fontColor:"فونٹ رنگ",highlightColor:"ہائی لائٹ رنگ",backgroundColor:"پس منظر رنگ",bold:"بولڈ",italic:"ترچھا",underline:"خط کشیدہ",strikethrough:"کٹا ہوا",code:"کوڈ",clearFormatting:"فارمیٹنگ صاف کریں",normal:"عام",heading:e=>`سرخی ${e}`,bulletList:"بلٹ فہرست",orderedList:"نمبر شدہ فہرست",checkList:"چیک فہرست",indent:"اندر کریں",outdent:"باہر کریں",blockquote:"اقتباس",codeBlock:"کوڈ بلاک",horizontalRule:"افقی لکیر",insertTable:"ٹیبل داخل کریں",link:"لنک",undo:"واپس",redo:"دوبارہ",cut:"کاٹیں",copy:"نقل",paste:"چسپاں",defaultOption:"پہلے سے طے شدہ",slashCommands:"سلیش کمانڈز",noCommandsFound:"کوئی کمانڈ نہیں ملی",changeBlockType:"بلاک کی قسم تبدیل کریں",blockTypes:"بلاک کی اقسام",enterUrl:"URL درج کریں:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},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:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,o)=>`Page ${e} is out of range (1-${o})`,renderFailed:"Failed to render PDF page"}};exports.default=r;
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { WithElement as v, Fragment as E, OnDispose as T, computedOf as g, attr as x, Value as m, prop as w } from "@tempots/dom";
|
|
2
|
-
import { g as f, I as A } from "./timer-Rd2sKnvH.js";
|
|
3
|
-
function b({
|
|
4
|
-
initialStatus: n = "closed",
|
|
5
|
-
openedAfter: t,
|
|
6
|
-
closedAfter: i
|
|
7
|
-
}) {
|
|
8
|
-
const e = w(n), o = () => {
|
|
9
|
-
e.set("start-opening");
|
|
10
|
-
}, l = () => {
|
|
11
|
-
e.set("start-closing");
|
|
12
|
-
}, a = e.map(
|
|
13
|
-
(s) => s !== "closed" && s !== "start-closing" && s !== "closing"
|
|
14
|
-
), u = (s) => {
|
|
15
|
-
s ? o() : l();
|
|
16
|
-
}, c = () => {
|
|
17
|
-
u(!a.value);
|
|
18
|
-
}, r = [], p = (s) => {
|
|
19
|
-
r.push(
|
|
20
|
-
e.on((P) => {
|
|
21
|
-
P === "closed" && s();
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
let d = () => {
|
|
26
|
-
};
|
|
27
|
-
e.on((s) => {
|
|
28
|
-
switch (d(), s) {
|
|
29
|
-
case "start-opening":
|
|
30
|
-
d = f(() => e.set("opening"));
|
|
31
|
-
break;
|
|
32
|
-
case "opening":
|
|
33
|
-
d = t(() => e.set("opened"));
|
|
34
|
-
break;
|
|
35
|
-
case "start-closing":
|
|
36
|
-
d = f(() => e.set("closing"));
|
|
37
|
-
break;
|
|
38
|
-
case "closing":
|
|
39
|
-
d = i(() => e.set("closed"));
|
|
40
|
-
break;
|
|
41
|
-
case "closed":
|
|
42
|
-
d = () => {
|
|
43
|
-
};
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}), e.onDispose(() => {
|
|
47
|
-
r.forEach((s) => s()), d();
|
|
48
|
-
});
|
|
49
|
-
const k = e.map((s) => s === "closed"), O = e.map((s) => s === "start-opening"), L = e.map((s) => s === "opening"), S = e.map((s) => s === "opened"), $ = e.map((s) => s === "closing"), C = e.map((s) => s === "start-closing");
|
|
50
|
-
return {
|
|
51
|
-
status: e,
|
|
52
|
-
open: o,
|
|
53
|
-
close: l,
|
|
54
|
-
toggle: c,
|
|
55
|
-
setOpen: u,
|
|
56
|
-
display: a,
|
|
57
|
-
isClosed: k,
|
|
58
|
-
isStartOpening: O,
|
|
59
|
-
isOpening: L,
|
|
60
|
-
isOpened: S,
|
|
61
|
-
isClosing: $,
|
|
62
|
-
isStartClosing: C,
|
|
63
|
-
dispose: () => e.dispose(),
|
|
64
|
-
listenOnClosed: p
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function K({
|
|
68
|
-
initialStatus: n = "closed",
|
|
69
|
-
duration: t,
|
|
70
|
-
openDuration: i = t ?? 500,
|
|
71
|
-
closeDuration: e = t ?? 500
|
|
72
|
-
} = {}) {
|
|
73
|
-
return b({
|
|
74
|
-
initialStatus: n,
|
|
75
|
-
openedAfter: (o) => A(o, i),
|
|
76
|
-
closedAfter: (o) => A(o, e)
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function y(n, t) {
|
|
80
|
-
let i = !1, e = null;
|
|
81
|
-
function o() {
|
|
82
|
-
i || (i = !0, n.removeEventListener("transitionend", l), n.removeEventListener("animationend", a), e && (clearTimeout(e), e = null), t());
|
|
83
|
-
}
|
|
84
|
-
function l(r) {
|
|
85
|
-
r.target === n && o();
|
|
86
|
-
}
|
|
87
|
-
function a(r) {
|
|
88
|
-
r.target === n && o();
|
|
89
|
-
}
|
|
90
|
-
const c = f(() => {
|
|
91
|
-
if (typeof n.getAnimations > "u") {
|
|
92
|
-
e = setTimeout(o, 16);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
n.addEventListener("transitionend", l), n.addEventListener("animationend", a), n.getAnimations().length === 0 && (e = setTimeout(o, 1e3));
|
|
96
|
-
});
|
|
97
|
-
return () => {
|
|
98
|
-
i = !0, c(), e && (clearTimeout(e), e = null), n.removeEventListener("transitionend", l), n.removeEventListener("animationend", a);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function B({
|
|
102
|
-
initialStatus: n = "closed",
|
|
103
|
-
element: t
|
|
104
|
-
} = {}) {
|
|
105
|
-
let i = t;
|
|
106
|
-
return {
|
|
107
|
-
setElement: (e) => {
|
|
108
|
-
i = e;
|
|
109
|
-
},
|
|
110
|
-
...b({
|
|
111
|
-
initialStatus: n,
|
|
112
|
-
openedAfter: (e) => i == null ? (e(), () => {
|
|
113
|
-
}) : y(i, e),
|
|
114
|
-
closedAfter: (e) => i == null ? (e(), () => {
|
|
115
|
-
}) : y(i, e)
|
|
116
|
-
})
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function D(n) {
|
|
120
|
-
if (n == null) return [];
|
|
121
|
-
const t = [];
|
|
122
|
-
return n.fade && t.push("fade"), n.slide && t.push(`slide-${n.slide}`), n.scale != null && t.push("scale"), t.length > 0 ? t : ["none"];
|
|
123
|
-
}
|
|
124
|
-
function N(n) {
|
|
125
|
-
if (n == null) return [];
|
|
126
|
-
const t = [];
|
|
127
|
-
return n.scale != null && typeof n.scale == "number" && t.push(["--scale-factor", String(n.scale)]), n.transformOrigin != null && t.push(["--transform-origin", n.transformOrigin]), n.duration != null && t.push(["--animation-duration", `${n.duration}ms`]), n.easing != null && t.push(["--animation-easing", n.easing]), t;
|
|
128
|
-
}
|
|
129
|
-
function h(n, t) {
|
|
130
|
-
if (n == null) return;
|
|
131
|
-
const i = t === "start-opening" || t === "opening" || t === "opened";
|
|
132
|
-
return "enter" in n || "exit" in n ? i ? n.enter : n.exit : n;
|
|
133
|
-
}
|
|
134
|
-
function j({
|
|
135
|
-
animation: n,
|
|
136
|
-
status: t
|
|
137
|
-
}) {
|
|
138
|
-
const i = g(
|
|
139
|
-
n,
|
|
140
|
-
t
|
|
141
|
-
)((e, o) => {
|
|
142
|
-
const l = h(e, o), u = D(l).map((c) => `bc-animated-toggle--${c}`).join(" ");
|
|
143
|
-
return u ? `bc-animated-toggle ${u} bc-animated-toggle--${o}` : `bc-animated-toggle bc-animated-toggle--${o}`;
|
|
144
|
-
});
|
|
145
|
-
return E(
|
|
146
|
-
x.class(i),
|
|
147
|
-
v((e) => {
|
|
148
|
-
let o = [];
|
|
149
|
-
function l(c) {
|
|
150
|
-
for (const r of o)
|
|
151
|
-
e.style.removeProperty(r);
|
|
152
|
-
o = c.map(([r]) => r);
|
|
153
|
-
for (const [r, p] of c)
|
|
154
|
-
e.style.setProperty(r, p);
|
|
155
|
-
}
|
|
156
|
-
const a = g(
|
|
157
|
-
n,
|
|
158
|
-
t
|
|
159
|
-
)((c, r) => {
|
|
160
|
-
const p = h(c, r);
|
|
161
|
-
return N(p);
|
|
162
|
-
});
|
|
163
|
-
l(m.get(a));
|
|
164
|
-
const u = m.on(a, l);
|
|
165
|
-
return T(() => {
|
|
166
|
-
u();
|
|
167
|
-
for (const c of o)
|
|
168
|
-
e.style.removeProperty(c);
|
|
169
|
-
});
|
|
170
|
-
})
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
function V({
|
|
174
|
-
initialStatus: n = "closed",
|
|
175
|
-
animation: t
|
|
176
|
-
}, i) {
|
|
177
|
-
return v((e) => {
|
|
178
|
-
const { setElement: o, dispose: l, ...a } = B({
|
|
179
|
-
initialStatus: n,
|
|
180
|
-
element: e
|
|
181
|
-
});
|
|
182
|
-
return o(e), E(
|
|
183
|
-
j({ status: a.status, animation: t }),
|
|
184
|
-
T(l),
|
|
185
|
-
i(a)
|
|
186
|
-
);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
export {
|
|
190
|
-
j as A,
|
|
191
|
-
V as a,
|
|
192
|
-
b,
|
|
193
|
-
K as c,
|
|
194
|
-
B as u
|
|
195
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("@tempots/dom"),f=require("./timer-BJHOsuS6.cjs");function m({initialStatus:n="closed",openedAfter:t,closedAfter:i}){const e=u.prop(n),o=()=>{e.set("start-opening")},l=()=>{e.set("start-closing")},c=e.map(s=>s!=="closed"&&s!=="start-closing"&&s!=="closing"),d=s=>{s?o():l()},a=()=>{d(!c.value)},r=[],p=s=>{r.push(e.on(C=>{C==="closed"&&s()}))};let g=()=>{};e.on(s=>{switch(g(),s){case"start-opening":g=f.g(()=>e.set("opening"));break;case"opening":g=t(()=>e.set("opened"));break;case"start-closing":g=f.g(()=>e.set("closing"));break;case"closing":g=i(()=>e.set("closed"));break;case"closed":g=()=>{};break}}),e.onDispose(()=>{r.forEach(s=>s()),g()});const h=e.map(s=>s==="closed"),v=e.map(s=>s==="start-opening"),O=e.map(s=>s==="opening"),b=e.map(s=>s==="opened"),k=e.map(s=>s==="closing"),L=e.map(s=>s==="start-closing");return{status:e,open:o,close:l,toggle:a,setOpen:d,display:c,isClosed:h,isStartOpening:v,isOpening:O,isOpened:b,isClosing:k,isStartClosing:L,dispose:()=>e.dispose(),listenOnClosed:p}}function S({initialStatus:n="closed",duration:t,openDuration:i=t??500,closeDuration:e=t??500}={}){return m({initialStatus:n,openedAfter:o=>f.I(o,i),closedAfter:o=>f.I(o,e)})}function A(n,t){let i=!1,e=null;function o(){i||(i=!0,n.removeEventListener("transitionend",l),n.removeEventListener("animationend",c),e&&(clearTimeout(e),e=null),t())}function l(r){r.target===n&&o()}function c(r){r.target===n&&o()}const d=()=>{if(typeof n.getAnimations>"u"){e=setTimeout(o,16);return}n.addEventListener("transitionend",l),n.addEventListener("animationend",c),n.getAnimations().length===0&&(e=setTimeout(o,1e3))},a=f.g(d);return()=>{i=!0,a(),e&&(clearTimeout(e),e=null),n.removeEventListener("transitionend",l),n.removeEventListener("animationend",c)}}function y({initialStatus:n="closed",element:t}={}){let i=t;return{setElement:e=>{i=e},...m({initialStatus:n,openedAfter:e=>i==null?(e(),()=>{}):A(i,e),closedAfter:e=>i==null?(e(),()=>{}):A(i,e)})}}function $(n){if(n==null)return[];const t=[];return n.fade&&t.push("fade"),n.slide&&t.push(`slide-${n.slide}`),n.scale!=null&&t.push("scale"),t.length>0?t:["none"]}function P(n){if(n==null)return[];const t=[];return n.scale!=null&&typeof n.scale=="number"&&t.push(["--scale-factor",String(n.scale)]),n.transformOrigin!=null&&t.push(["--transform-origin",n.transformOrigin]),n.duration!=null&&t.push(["--animation-duration",`${n.duration}ms`]),n.easing!=null&&t.push(["--animation-easing",n.easing]),t}function T(n,t){if(n==null)return;const i=t==="start-opening"||t==="opening"||t==="opened";return"enter"in n||"exit"in n?i?n.enter:n.exit:n}function E({animation:n,status:t}){const i=u.computedOf(n,t)((e,o)=>{const l=T(e,o),d=$(l).map(a=>`bc-animated-toggle--${a}`).join(" ");return d?`bc-animated-toggle ${d} bc-animated-toggle--${o}`:`bc-animated-toggle bc-animated-toggle--${o}`});return u.Fragment(u.attr.class(i),u.WithElement(e=>{let o=[];function l(a){for(const r of o)e.style.removeProperty(r);o=a.map(([r])=>r);for(const[r,p]of a)e.style.setProperty(r,p)}const c=u.computedOf(n,t)((a,r)=>{const p=T(a,r);return P(p)});l(u.Value.get(c));const d=u.Value.on(c,l);return u.OnDispose(()=>{d();for(const a of o)e.style.removeProperty(a)})}))}function w({initialStatus:n="closed",animation:t},i){return u.WithElement(e=>{const{setElement:o,dispose:l,...c}=y({initialStatus:n,element:e});return o(e),u.Fragment(E({status:c.status,animation:t}),u.OnDispose(l),i(c))})}exports.AnimatedToggle=w;exports.AnimatedToggleClass=E;exports.useAnimatedElementToggle=y;exports.useAnimatedToggle=m;exports.useTimedToggle=S;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("@tempots/dom"),E=require("./translations-Cy9hoMGV.cjs"),j=require("./input-container-DiYEl_y8.cjs"),f=require("./stack-4VUGISn6.cjs"),_=require("./session-id-B5lJMzbB.cjs"),D=(n,e)=>n===e||n!==n&&e!==e;function G({size:n="sm",icon:e="line-md:close",disabled:s,roundedness:i="full",color:r="base",onClick:l,label:o},...a){return t.Use(E.BeatUII18n,c=>{const d=t.coalesce(o,c.$.closeModal);return j.Button({variant:"text",size:n,roundedness:i,disabled:s,color:r,onClick:l},t.attr.title(d),t.aria.label(d),...a,E.Icon({icon:e,size:n??"sm"}))})}const J=n=>{const{value:e,onBlur:s,onChange:i,onInput:r,placeholder:l,disabled:o,id:a,checkedIcon:c,uncheckedIcon:d,iconSize:u="lg"}=n,p=a??_.sessionId("checkbox"),g=`${p}-label`,y=()=>{if(t.Value.get(o??!1))return;const h=t.Value.get(e);i?.(!h),r?.(!h)},m=h=>{t.Value.get(o??!1)||(h.key===" "||h.key==="Enter")&&(h.preventDefault(),y())};return j.InputContainer({baseContainer:!0,growInput:!1,...n,input:t.html.span(t.attr.class("bc-checkbox-input"),t.html.span(t.attr.class("bc-checkbox-input__checkbox"),t.attr.class(t.Value.map(e,h=>h?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),t.attr.class(t.Value.map(o??!1,h=>h?"bc-checkbox-input__checkbox--disabled":"")),t.attr.id(p),t.attr.role("checkbox"),t.attr.tabindex(t.Value.map(o??!1,h=>h?-1:0)),t.aria.checked(e),t.aria.disabled(o),l!=null?t.aria.labelledby(g):t.Empty,t.on.keydown(m),s!=null?t.on.blur(s):t.Empty,E.Icon({icon:t.computedOf(e,c,d)((h,v,w)=>h?v??"akar-icons/check-box-fill":w??"akar-icons/box"),accessibility:"decorative",size:u})),l!=null?t.html.label(t.attr.class("bc-checkbox-input__label"),t.attr.id(g),t.attr.for(p),f.MutedLabel(l)):t.Empty)},t.on.click(y))},P=t.html.span(t.attr.class("bc-input-wrapper__required")," *");function Q(n){const e=["bc-input-wrapper"];return n!=="vertical"&&e.push(`bc-input-wrapper--${n}`),e.join(" ")}function X(n,e){const s=["bc-input-wrapper__label-text"];return n?s.push("bc-input-wrapper__label-text--error"):e?s.push("bc-input-wrapper__label-text--disabled"):s.push("bc-input-wrapper__label-text--default"),s.join(" ")}function Y(n,e){if(n==="horizontal-fixed"&&e!=null)return`--input-wrapper-label-width: ${e}`}const M=({fullWidth:n=!1,required:e,label:s,labelChildren:i,context:r,description:l,content:o,error:a,labelFor:c,hasError:d,disabled:u,layout:p,labelWidth:g},...y)=>{const m=d??a!=null,h=u??!1,v=p??"vertical",w=_.sessionId("input-wrapper"),I=l?`${w}-description`:void 0,V=a!=null?`${w}-error`:void 0,B=t.computedOf(v)(b=>b!=="vertical"),K=t.computedOf(v,g??void 0)((b,C)=>Y(b,C));return t.html.div(t.attr.class(t.Value.map(v,b=>Q(b))),t.attr.class(t.Value.map(n,b=>b?"bc-input-wrapper--full-width":"")),t.attr.style(K),s!=null||r!=null?t.html.div(t.attr.class("bc-input-wrapper__header"),t.html.div(t.attr.class("bc-input-wrapper__label-section"),t.html.label(t.attr.class("bc-input-wrapper__label"),c!=null?t.attr.for(c):t.Empty,t.html.span(t.attr.class(t.computedOf(m,h)((b,C)=>X(b??!1,C??!1))),s),s!=null&&e?P:t.Empty),t.When(t.computedOf(B,l)((b,C)=>b&&C!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),t.attr.id(I),l))),r!=null?f.Label(r):t.Empty,i):t.Empty,t.html.div(t.attr.class("bc-input-wrapper__content"),[I,V].filter(Boolean).length>0?t.dataAttr.describedby([I,V].filter(Boolean).join(" ")):t.Empty,e?t.dataAttr.required("true"):t.Empty,t.When(m,()=>t.dataAttr.invalid("true")),o),t.When(t.computedOf(B,l)((b,C)=>!b&&C!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description"),t.attr.id(I),l)),t.When(m,()=>t.html.div(t.attr.class("bc-input-wrapper__error"),t.attr.id(V),t.aria.live("polite"),t.attr.role("alert"),a)),...y)},H=((n,e)=>()=>{n.markTouched(),e?.()}),O=(n,e)=>s=>{n.change(s),e?.(s)};function x(n,e){const{controller:s,onBlur:i,onChange:r,id:l,triggerOn:o,...a}=e;return n({id:l??s.name,disabled:s.disabled,value:s.signal,hasError:s.errorVisible,name:s.name,...a,onInput:o==="input"?O(s,r):void 0,onChange:o!=="input"?O(s,r):void 0,onBlur:H(s,i)})}function Z(n,{id:e,labelFor:s,...i},...r){const l=e??i.controller.name??_.sessionId("control"),o=s??l;return M({...i,hasError:i.controller.errorVisible,error:t.TextNode(i.controller.error.map(a=>a??"")),labelFor:o,content:x(a=>n({...a,id:l}),i)},...r)}function F(n,e){const{toInput:s,fromInput:i,controller:r,...l}=e,o=r.transform(s,i);return x(n,{...l,controller:o})}function ee(n,{id:e,labelFor:s,...i},...r){const l=e??i.controller.name??_.sessionId("control");return M({...i,labelFor:s??l,content:F(n,{...i,id:l})},...r)}function te(n){return n.split(".").map(s=>{const i=s.match(/^\[(\d+)\]$/);return i?Number(i[1]):s})}function $(n){return typeof n=="number"?`[${n}]`:`.${n}`}function W(n){if(n.length===0)return"";const[e,...s]=n;return[typeof e=="number"?`[${e}]`:e,...s.map($)].join("")}const se={valid:f.i.valid,invalid(n){return f.i.invalid({message:n})},invalidFields(n){const e={};for(const[s,i]of Object.entries(n))e[s]=typeof i=="string"?{message:i}:i;return f.i.invalid({dependencies:e})},fromError(n){return f.i.invalid(n)}};function T(n){return function(s){if(s.type==="valid")return s;let i=s.error;for(const r of n)if(i=i?.dependencies?.[r],i==null)return f.i.valid;return f.i.invalid(i)}}class k{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:t.prop(!1),touched:t.prop(!1)};#s;#t=t.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(e,s,i,r,l,o=D){this.path=e,this.change=s,this.signal=i,this.status=r,this.#s=o,this.#t.set(i.value),this.error=r.map(a=>a?.type==="invalid"?a.error?.message:void 0),this.hasError=this.error.map(a=>a!=null),this.touched=this.#e.touched,l.validationMode?this.errorVisible=t.computedOf(this.hasError,this.touched,l.validationMode)((a,c,d)=>d==="eager"?!!a:!!a&&!!c):this.errorVisible=t.computedOf(this.hasError,this.touched)((a,c)=>!!a&&!!c),this.dirty=t.computedOf(this.signal,this.#t)((a,c)=>!this.#s(a,c)),this.dependencyErrors=r.map(a=>a?.type==="invalid"?a.error?.dependencies:void 0),this.parent=l,this.disabled=t.computedOf(this.#e.disabled,l.disabled)((a,c)=>a||c),this.disabledOrHasErrors=t.computedOf(this.disabled,this.hasError)((a,c)=>a||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return W(this.path)}onDispose=e=>{this.#n.push(e)};dispose=()=>{for(const e of this.#n)try{e()}catch(s){console.error("Error in dispose callback:",s)}this.#n.length=0};setDisabled=e=>{this.#e.disabled.set(e)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.signal.value)};reset=()=>{this.change(this.#t.value)};array=(e=D)=>new q(this.path,this.change,this.signal,this.status,this.parent,e);object=(e=D)=>new N(this.path,this.change,this.signal,this.status,this.parent,e);transform=(e,s,i=[],r=D)=>new k([...this.path,...i],l=>this.change(s(l)),this.signal.map(e,r),this.status.map(T(i)),this.parent,r);asyncTransform=(e,s,i,r=[],l=D)=>new k([...this.path,...r],o=>{s(o).then(a=>this.change(a))},this.signal.mapAsync(e,i,void 0,l),this.status.map(T(r)),this.parent,l)}class N extends k{#e=new Map;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,l,o){super(e,s,i.map(c=>c??{},o),r,l,o),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const a=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#i.values())c();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),a()})}field=e=>{if(this.#e.has(e))return this.#e.get(e);const s=async o=>{this.change({...this.signal.value,[e]:o})},i=new k([...this.path,e],s,this.signal.map(o=>o[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(e,i);const r=i.touched.on(o=>{this.#s.set(e,o),this.#l()});this.#t.set(e,r);const l=i.dirty.on(o=>{this.#r.set(e,o),this.#a()});return this.#i.set(e,l),i};markAllTouched=()=>{this.markTouched();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markTouched();for(const s of this.#e.values())s.markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markPristine?.();for(const s of this.#e.values())s.markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}class q extends k{#e=new Array;length;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,l,o){const a=i.map(u=>u??[],o);super(e,s,a,r,l,o);const c=a.on(u=>{const p=this.#e.length-u.length;p>0&&(this.#e.splice(u.length,p).forEach((g,y)=>{const m=u.length+y;g.dispose(),this.#t.get(m)?.(),this.#t.delete(m),this.#s.delete(m),this.#i.get(m)?.(),this.#i.delete(m),this.#r.delete(m)}),this.#l(),this.#a())});this.length=a.map(u=>u.length),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const d=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const u of this.#e)u.dispose();this.length.dispose(),this.#e.length=0,c(),a.dispose();for(const u of this.#t.values())u();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const u of this.#i.values())u();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),d()})}item=e=>{if(this.#e[e])return this.#e[e];const s=async o=>{const a=this.signal.value.slice();a[e]=o,this.change(a)},i=new k([...this.path,e],s,this.signal.map(o=>o[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[e]=i;const r=i.touched.on(o=>{this.#s.set(e,o),this.#l()});this.#t.set(e,r);const l=i.dirty.on(o=>{this.#r.set(e,o),this.#a()});return this.#i.set(e,l),i};push=(...e)=>{this.change([...this.signal.value,...e])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...e)=>{this.change([...e,...this.signal.value])};removeAt=e=>{this.splice(e,1)};splice=(e,s)=>{const i=this.signal.value.slice();i.splice(e,s),this.change(i)};move=(e,s,i=1)=>{if(i<1||e===s)return;const r=this.signal.value.slice(),l=r.splice(e,i);r.splice(s,0,...l),this.change(r)};markAllTouched=()=>{this.markTouched();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}function z(n){function e(s){return typeof s=="number"?s:s.toString()}return n.map(s=>typeof s=="object"&&s.key!=null?e(s.key):e(s))}function L(n){const e=n.filter(r=>r.path==null||r.path.length===0).map(r=>r.message),s=n.filter(r=>r.path!=null&&r.path.length>0).reduce((r,l)=>{const o=z(l.path),a=o.pop();let c=r;for(const d of o)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[a]={message:l.message},r},{}),i=e.join(`
|
|
2
|
-
`);return{...s,message:i!=""?i:void 0}}function R({initialValue:n,onChange:e,validate:s,equals:i,validationMode:r,validateDebounceMs:l}){const o=t.Value.deriveProp(n),a=t.prop(f.i.valid),c=t.prop(!1),d=t.prop(r??"onTouched"),u=h=>{a.set(h)};let p;const g=async h=>{if(s!=null){const v=await s(h);u(v)}},y=async h=>{o.set(h),e?.(h);const v=d.value;if(s!=null){if(v==="onSubmit")return;const w=l??0;w>0?(p&&clearTimeout(p),p=setTimeout(()=>{g(h)},w)):await g(h)}},m=new k([],y,o,a,{disabled:c,validationMode:d},i??D);return m.onDispose(()=>{c.dispose(),o.dispose(),a.dispose(),d.dispose(),p&&clearTimeout(p)}),{controller:m,setStatus:u}}function A(n){return t.Fragment(t.attr.disabled(n.disabled),t.attr.name(n.name))}function ne(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.value(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValue(n.change)))}function ie(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.valueAsNumber(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValueAsNumber(n.change)))}function S(n){return n.issues!=null?f.i.invalid(L(n.issues)):f.i.valid}async function re({task:n,errorMessage:e,errorPath:s=["root"],validation:i}){try{const r=await n();return i!=null?i(r):f.i.valid}catch(r){const l=e??(r instanceof Error?r.message:"Operation failed");return s.length===1&&s[0]==="root"?f.i.invalid({message:l}):f.i.invalid({dependencies:U(s,l)})}}function U(n,e){if(n.length===1)return{[n[0]]:{message:e}};const[s,...i]=n;return{[s]:{dependencies:U(i,e)}}}function ae({initialValue:n={},schema:e,onSubmit:s=async()=>f.i.valid,validationMode:i,validateDebounceMs:r}){const{controller:l,setStatus:o}=R({initialValue:n,validationMode:i??"onTouched",validateDebounceMs:r,validate:(i??"onTouched")==="onSubmit"||e==null?void 0:async u=>S(await e["~standard"].validate(u))}),a=t.prop(!1),c=l.object();return c.onDispose(()=>a.dispose()),{controller:c,setStatus:o,submit:async u=>{if(a.set(!0),u?.preventDefault(),c.markAllTouched(),e!=null){const g=c.signal.value,y=S(await e["~standard"].validate(g));if(o(y),y.type==="invalid"){a.set(!1);return}}const p=await s(c.signal.value);a.set(!1),p.type==="invalid"&&o(p)},submitting:a}}exports.ArrayController=q;exports.BaseControl=x;exports.BaseMappedControl=F;exports.CheckboxInput=J;exports.CloseButton=G;exports.Control=Z;exports.Controller=k;exports.ControllerValidation=se;exports.InputWrapper=M;exports.MappedControl=ee;exports.O=D;exports.ObjectController=N;exports.RequiredSymbol=P;exports.connectCommonAttributes=A;exports.connectNumberInput=ie;exports.connectStringInput=ne;exports.convertStandardSchemaIssues=L;exports.convertStandardSchemaPathToPath=z;exports.makeMapValidation=T;exports.makeOnBlurHandler=H;exports.makeOnChangeHandler=O;exports.parsePath=te;exports.pathToString=W;exports.standardSchemaResultToValidation=S;exports.taskToValidation=re;exports.useController=R;exports.useForm=ae;exports.wrapSegment=$;
|
package/dist/utils-DEbsp9Q9.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { html as n, attr as i, computedOf as l } from "@tempots/dom";
|
|
2
|
-
function g(e, r, t) {
|
|
3
|
-
const u = ["bc-card"];
|
|
4
|
-
return e !== "default" && u.push(`bc-card--${e}`), r !== "md" && u.push(`bc-card--padding-${r}`), t !== "lg" && u.push(`bc-card--rounded-${t}`), u.join(" ");
|
|
5
|
-
}
|
|
6
|
-
function y({ variant: e = "default", size: r = "md", roundedness: t = "lg" } = {}, ...u) {
|
|
7
|
-
return n.div(
|
|
8
|
-
i.class(
|
|
9
|
-
l(
|
|
10
|
-
e,
|
|
11
|
-
r,
|
|
12
|
-
t
|
|
13
|
-
)(
|
|
14
|
-
(c, s, o) => g(
|
|
15
|
-
c ?? "default",
|
|
16
|
-
s ?? "md",
|
|
17
|
-
o ?? "lg"
|
|
18
|
-
)
|
|
19
|
-
)
|
|
20
|
-
),
|
|
21
|
-
...u
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
const a = ["description", "comment", "notes", "text"];
|
|
25
|
-
function p(e) {
|
|
26
|
-
if (typeof e == "boolean") return a;
|
|
27
|
-
const r = e["x:ui"];
|
|
28
|
-
return r && Array.isArray(r.textAreaTriggers) ? [...a, ...r.textAreaTriggers] : a;
|
|
29
|
-
}
|
|
30
|
-
function d(e) {
|
|
31
|
-
if (typeof e == "boolean") return;
|
|
32
|
-
const r = e["x:ui"];
|
|
33
|
-
if (r != null && (typeof r == "string" || typeof r == "object" && r !== null))
|
|
34
|
-
return r;
|
|
35
|
-
}
|
|
36
|
-
function x(e, r) {
|
|
37
|
-
if (typeof e == "boolean") return;
|
|
38
|
-
const t = d(e);
|
|
39
|
-
if (typeof t == "object" && typeof t.widget == "string")
|
|
40
|
-
return {
|
|
41
|
-
widget: t.widget,
|
|
42
|
-
source: "explicit-widget",
|
|
43
|
-
options: t
|
|
44
|
-
};
|
|
45
|
-
const u = typeof t == "string" ? t : typeof t == "object" && typeof t.format == "string" ? t.format : void 0;
|
|
46
|
-
if (u)
|
|
47
|
-
return {
|
|
48
|
-
widget: u,
|
|
49
|
-
source: "explicit-format",
|
|
50
|
-
options: typeof t == "object" ? t : void 0
|
|
51
|
-
};
|
|
52
|
-
if (typeof e.format == "string")
|
|
53
|
-
return {
|
|
54
|
-
widget: {
|
|
55
|
-
datetime: "date-time",
|
|
56
|
-
base64: "binary",
|
|
57
|
-
bytes: "binary",
|
|
58
|
-
iri: "uri",
|
|
59
|
-
"iri-reference": "uri-reference",
|
|
60
|
-
"idn-hostname": "hostname"
|
|
61
|
-
}[e.format] || e.format,
|
|
62
|
-
source: "schema-format"
|
|
63
|
-
};
|
|
64
|
-
if (e.contentMediaType === "text/markdown")
|
|
65
|
-
return {
|
|
66
|
-
widget: "markdown",
|
|
67
|
-
source: "schema-media"
|
|
68
|
-
};
|
|
69
|
-
if (e.contentMediaType != null || e.contentEncoding === "base64")
|
|
70
|
-
return {
|
|
71
|
-
widget: "binary",
|
|
72
|
-
source: "schema-media",
|
|
73
|
-
options: {
|
|
74
|
-
mediaType: e.contentMediaType,
|
|
75
|
-
encoding: e.contentEncoding
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
if (e.enum != null)
|
|
79
|
-
return {
|
|
80
|
-
widget: "enum",
|
|
81
|
-
source: "constraints"
|
|
82
|
-
};
|
|
83
|
-
if (e.const != null)
|
|
84
|
-
return {
|
|
85
|
-
widget: "const",
|
|
86
|
-
source: "constraints"
|
|
87
|
-
};
|
|
88
|
-
if ((e.type === "number" || e.type === "integer" || Array.isArray(e.type) && e.type.some((s) => s === "number" || s === "integer")) && e.minimum != null && e.maximum != null)
|
|
89
|
-
return e.maximum - e.minimum <= 5 && e.minimum >= 0 && e.minimum <= 1 && (e.multipleOf == null || e.multipleOf >= 1) ? {
|
|
90
|
-
widget: "rating",
|
|
91
|
-
source: "constraints",
|
|
92
|
-
options: { max: e.maximum }
|
|
93
|
-
} : {
|
|
94
|
-
widget: "slider",
|
|
95
|
-
source: "constraints",
|
|
96
|
-
options: {
|
|
97
|
-
min: e.minimum,
|
|
98
|
-
max: e.maximum,
|
|
99
|
-
step: e.multipleOf
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
if (e.type === "string") {
|
|
103
|
-
if (e.minLength != null && e.minLength > 20 || e.maxLength != null && e.maxLength > 100)
|
|
104
|
-
return {
|
|
105
|
-
widget: "textarea",
|
|
106
|
-
source: "heuristics"
|
|
107
|
-
};
|
|
108
|
-
if (r) {
|
|
109
|
-
const s = r.toLowerCase();
|
|
110
|
-
if (s.includes("password") || s.includes("secret"))
|
|
111
|
-
return { widget: "password", source: "heuristics" };
|
|
112
|
-
if (s.includes("email"))
|
|
113
|
-
return { widget: "email", source: "heuristics" };
|
|
114
|
-
if (s.includes("url") || s.includes("link"))
|
|
115
|
-
return { widget: "url", source: "heuristics" };
|
|
116
|
-
if (s.includes("color"))
|
|
117
|
-
return { widget: "color", source: "heuristics" };
|
|
118
|
-
if (p(e).some(
|
|
119
|
-
(m) => s.includes(m.toLowerCase())
|
|
120
|
-
))
|
|
121
|
-
return { widget: "textarea", source: "heuristics" };
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
export {
|
|
126
|
-
y as C,
|
|
127
|
-
d as g,
|
|
128
|
-
x as r
|
|
129
|
-
};
|
package/dist/utils-DIUEhA-Z.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("@tempots/dom");function l(e,r,t){const u=["bc-card"];return e!=="default"&&u.push(`bc-card--${e}`),r!=="md"&&u.push(`bc-card--padding-${r}`),t!=="lg"&&u.push(`bc-card--rounded-${t}`),u.join(" ")}function g({variant:e="default",size:r="md",roundedness:t="lg"}={},...u){return c.html.div(c.attr.class(c.computedOf(e,r,t)((o,s,m)=>l(o??"default",s??"md",m??"lg"))),...u)}const a=["description","comment","notes","text"];function p(e){if(typeof e=="boolean")return a;const r=e["x:ui"];return r&&Array.isArray(r.textAreaTriggers)?[...a,...r.textAreaTriggers]:a}function n(e){if(typeof e=="boolean")return;const r=e["x:ui"];if(r!=null&&(typeof r=="string"||typeof r=="object"&&r!==null))return r}function d(e,r){if(typeof e=="boolean")return;const t=n(e);if(typeof t=="object"&&typeof t.widget=="string")return{widget:t.widget,source:"explicit-widget",options:t};const u=typeof t=="string"?t:typeof t=="object"&&typeof t.format=="string"?t.format:void 0;if(u)return{widget:u,source:"explicit-format",options:typeof t=="object"?t:void 0};if(typeof e.format=="string")return{widget:{datetime:"date-time",base64:"binary",bytes:"binary",iri:"uri","iri-reference":"uri-reference","idn-hostname":"hostname"}[e.format]||e.format,source:"schema-format"};if(e.contentMediaType==="text/markdown")return{widget:"markdown",source:"schema-media"};if(e.contentMediaType!=null||e.contentEncoding==="base64")return{widget:"binary",source:"schema-media",options:{mediaType:e.contentMediaType,encoding:e.contentEncoding}};if(e.enum!=null)return{widget:"enum",source:"constraints"};if(e.const!=null)return{widget:"const",source:"constraints"};if((e.type==="number"||e.type==="integer"||Array.isArray(e.type)&&e.type.some(s=>s==="number"||s==="integer"))&&e.minimum!=null&&e.maximum!=null)return e.maximum-e.minimum<=5&&e.minimum>=0&&e.minimum<=1&&(e.multipleOf==null||e.multipleOf>=1)?{widget:"rating",source:"constraints",options:{max:e.maximum}}:{widget:"slider",source:"constraints",options:{min:e.minimum,max:e.maximum,step:e.multipleOf}};if(e.type==="string"){if(e.minLength!=null&&e.minLength>20||e.maxLength!=null&&e.maxLength>100)return{widget:"textarea",source:"heuristics"};if(r){const s=r.toLowerCase();if(s.includes("password")||s.includes("secret"))return{widget:"password",source:"heuristics"};if(s.includes("email"))return{widget:"email",source:"heuristics"};if(s.includes("url")||s.includes("link"))return{widget:"url",source:"heuristics"};if(s.includes("color"))return{widget:"color",source:"heuristics"};if(p(e).some(i=>s.includes(i.toLowerCase())))return{widget:"textarea",source:"heuristics"}}}}exports.Card=g;exports.getXUIConfig=n;exports.resolveWidget=d;
|
package/dist/vi-CQrUWB3y.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-Cy9hoMGV.cjs"),l={loadingExtended:"Đang tải, vui lòng đợi",loadingShort:"Đang tải...",locale:"Ngôn ngữ",iconDescription:"Biểu tượng",loadingIcon:"Biểu tượng tải",failedToLoadIcon:"Không thể tải biểu tượng",editLabel:"Chỉnh sửa",selectOne:"Chọn một",selectNone:"Không có",selectMany:"Chọn nhiều",noResults:"Không có kết quả",passwordPlaceholderText:"Mật khẩu bí mật",togglePasswordVisibility:"Chuyển đổi hiển thị mật khẩu",toggleMenu:"Chuyển đổi menu",toggleAside:"Chuyển đổi bảng bên",mainNavigation:"Điều hướng chính",sidebar:"Thanh bên",closeDrawer:"Đóng ngăn kéo",closeModal:"Đóng modal",confirm:"Xác nhận",cancel:"Hủy",addLabel:"Thêm",removeItem:"Xóa mục",currentLocale:"Tiếng Việt",ar:"Tiếng Ả Rập",de:"Tiếng Đức",en:"Tiếng Anh",es:"Tiếng Tây Ban Nha",fr:"Tiếng Pháp",hi:"Tiếng Hindi",it:"Tiếng Ý",ja:"Tiếng Nhật",ko:"Tiếng Hàn",nl:"Tiếng Hà Lan",pl:"Tiếng Ba Lan",pt:"Tiếng Bồ Đào Nha",ru:"Tiếng Nga",tr:"Tiếng Thổ Nhĩ Kỳ",vi:"Tiếng Việt",zh:"Tiếng Trung",he:"Tiếng Do Thái",fa:"Tiếng Ba Tư",ur:"Tiếng Urdu",emailPlaceholderText:"Nhập email của bạn",incrementValue:"Tăng giá trị",decrementValue:"Giảm giá trị",dropZoneInstructions:n=>n?"Nhấp để chọn hoặc kéo tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp":"Kéo tệp vào đây",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Xóa tệp",clearAllFiles:"Xóa tất cả tệp",clearValue:"Xóa giá trị",unknownType:"Loại không xác định",filesInputInstructions:(n,e,i)=>{let o=n==null||n>1?"Nhấp để chọn hoặc kéo tệp vào đây":"Nhấp để chọn hoặc kéo một tệp vào đây";if(n||e){const t=[];if(n!=null&&n>1&&t.push(`tối đa ${n} tệp`),e&&i){const h=a.formatFileSize(e,{units:i});t.push(`mỗi tệp tối đa ${h}`)}t.length>0&&(o+=` (${t.join(", ")})`)}return o},paginationLabel:"Phân trang",firstPage:"Trang đầu",previousPage:"Trang trước",nextPage:"Trang tiếp",lastPage:"Trang cuối",breadcrumbs:"Thanh điều hướng",commandPalette:"Bảng lệnh",typeACommand:"Nhập lệnh...",noResultsFound:"Không tìm thấy kết quả",noMatchingCommands:"Không có lệnh phù hợp",appearanceSystem:"Hệ thống",appearanceLight:"Sáng",appearanceDark:"Tối",ok:"OK",changeTypeConfirmation:"Thay đổi loại sẽ xóa giá trị hiện tại. Tiếp tục?",notifications:"Thông báo",markAllAsRead:"Đánh dấu tất cả đã đọc",noNotifications:"Không có thông báo",schemaConflictsDetected:"Phát hiện xung đột lược đồ",schemaViolationsDetected:"Phát hiện vi phạm lược đồ",properties:"Thuộc tính",uploading:"Đang tải lên...",dropFilesOrBrowse:"Kéo thả tệp vào đây hoặc nhấp để duyệt",acceptedTypes:n=>`Loại tệp được chấp nhận: ${n}`,enterUrlPrompt:"Nhập URL:",exceeded:"(vượt quá)",pdfPreview:"Xem trước PDF",lexical:{fontFamily:"Phông chữ",fontSize:"Cỡ chữ",fontColor:"Màu chữ",highlightColor:"Màu đánh dấu",backgroundColor:"Màu nền",bold:"Đậm",italic:"Nghiêng",underline:"Gạch chân",strikethrough:"Gạch ngang",code:"Mã",clearFormatting:"Xóa định dạng",normal:"Bình thường",heading:n=>`Tiêu đề ${n}`,bulletList:"Danh sách dấu đầu dòng",orderedList:"Danh sách đánh số",checkList:"Danh sách kiểm tra",indent:"Thụt lề",outdent:"Giảm thụt lề",blockquote:"Trích dẫn",codeBlock:"Khối mã",horizontalRule:"Đường kẻ ngang",insertTable:"Chèn bảng",link:"Liên kết",undo:"Hoàn tác",redo:"Làm lại",cut:"Cắt",copy:"Sao chép",paste:"Dán",defaultOption:"Mặc định",slashCommands:"Lệnh gạch chéo",noCommandsFound:"Không tìm thấy lệnh",changeBlockType:"Đổi loại khối",blockTypes:"Loại khối",enterUrl:"Nhập URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:n=>`Heading ${n}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Đang tải PDF...",loadFailed:"Không thể tải PDF",invalidPdf:"Tệp PDF không hợp lệ",pageOutOfRange:(n,e)=>`Trang ${n} nằm ngoài phạm vi (1-${e})`,renderFailed:"Không thể hiển thị trang PDF"}};exports.default=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("@tempots/dom"),k=require("./deep-merge-Blrucd-E.cjs"),ct=require("./string-B9vVyfq3.cjs"),D=require("./input-container-DiYEl_y8.cjs"),S=require("./text-input-DUnhBUd6.cjs"),N=require("./translations-Cy9hoMGV.cjs"),ut=require("@tempots/ui"),z=require("./notice-DAVOTnfA.cjs"),pt=require("./session-id-B5lJMzbB.cjs"),dt=require("./utils-DIUEhA-Z.cjs");function q(e){if(typeof e!="string")return!1;const n=e.startsWith("#")?e.slice(1):e;return/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(n)}function X(e){if(typeof e!="string")return!1;const n=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,s=e.match(n);if(!s)return!1;const[,a,o,r]=s,l=parseInt(a,10),i=parseInt(o,10),c=parseInt(r,10);return l>=0&&l<=255&&i>=0&&i<=255&&c>=0&&c<=255}function Y(e){if(typeof e!="string")return!1;const n=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i,s=e.match(n);if(!s)return!1;const[,a,o,r,l]=s,i=parseInt(a,10),c=parseInt(o,10),u=parseInt(r,10),p=parseFloat(l);return i>=0&&i<=255&&c>=0&&c<=255&&u>=0&&u<=255&&p>=0&&p<=1}function G(e){if(typeof e!="string")return!1;const n=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/i,s=e.match(n);if(!s)return!1;const[,a,o,r]=s,l=parseInt(a,10),i=parseInt(o,10),c=parseInt(r,10);return l>=0&&l<=360&&i>=0&&i<=100&&c>=0&&c<=100}function gt(e){return q(e)||X(e)||Y(e)||G(e)}function K(e){if(!q(e))return null;let n=e.startsWith("#")?e.slice(1):e;return n.length===3&&(n=n.split("").map(s=>s+s).join("")),`#${n.toLowerCase()}`}function W(e,n,s){const a=o=>{const r=Math.round(Math.max(0,Math.min(255,o))).toString(16);return r.length===1?"0"+r:r};return`#${a(e)}${a(n)}${a(s)}`}function E(e){const n=K(e);if(!n)return null;const s=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return s?{r:parseInt(s[1],16),g:parseInt(s[2],16),b:parseInt(s[3],16)}:null}function ht(e,n){const s=E(e),a=E(n);if(!s||!a)return null;const o=(u,p,h)=>{const[m,g,f]=[u,p,h].map(I=>(I=I/255,I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4)));return .2126*m+.7152*g+.0722*f},r=o(s.r,s.g,s.b),l=o(a.r,a.g,a.b),i=Math.max(r,l),c=Math.min(r,l);return(i+.05)/(c+.05)}function Q(e){if(!e)return[0,0,0,1];const s=e.trim().match(/^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/);if(s){const u=s[1];if(u.length===8){const p=parseInt(u.slice(0,2),16),h=parseInt(u.slice(2,4),16),m=parseInt(u.slice(4,6),16),g=parseInt(u.slice(6,8),16)/255;return[p,h,m,g]}if(u.length===6)return[parseInt(u.slice(0,2),16),parseInt(u.slice(2,4),16),parseInt(u.slice(4,6),16),1];if(u.length===4){const p=parseInt(u[0]+u[0],16),h=parseInt(u[1]+u[1],16),m=parseInt(u[2]+u[2],16),g=parseInt(u[3]+u[3],16)/255;return[p,h,m,g]}if(u.length===3){const p=parseInt(u[0]+u[0],16),h=parseInt(u[1]+u[1],16),m=parseInt(u[2]+u[2],16);return[p,h,m,1]}}const a=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i);if(a)return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];const o=e.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(o)return[parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),1];const r=e.match(/^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(r){const u=parseFloat(r[1]),p=parseFloat(r[2]),h=parseFloat(r[3]),m=r[4]!=null?parseFloat(r[4]):1,[g,f,I]=j(u,p/100,h/100);return[g,f,I,m]}const l=e.match(/^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(l){const u=parseFloat(l[1]),p=parseFloat(l[2])/100,h=parseFloat(l[3])/100,m=l[4]!=null?parseFloat(l[4]):1,[g,f,I]=tt(u,p,h);return[g,f,I,m]}const i=e.match(/^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(i){const u=i[1],p=parseFloat(i[2]),h=parseFloat(i[3]),m=i[4]!=null?parseFloat(i[4]):1,g=u.endsWith("%")?Math.max(0,Math.min(1,parseFloat(u)/100)):Math.max(0,Math.min(1,parseFloat(u))),[f,I,V]=nt(g,p,h);return[f,I,V,m]}const c=E(e);return c?[c.r,c.g,c.b,1]:[0,0,0,1]}function Z(e,n,s,a){return`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(s)}, ${Math.max(0,Math.min(1,Math.round(a*100)/100))})`}function J(e){let n=e+1831565813;return function(){return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function j(e,n,s){e=(e%360+360)%360;const a=(1-Math.abs(2*s-1))*n,o=a*(1-Math.abs(e/60%2-1)),r=s-a/2;let l,i,c;return 0<=e&&e<60?[l,i,c]=[a,o,0]:60<=e&&e<120?[l,i,c]=[o,a,0]:120<=e&&e<180?[l,i,c]=[0,a,o]:180<=e&&e<240?[l,i,c]=[0,o,a]:240<=e&&e<300?[l,i,c]=[o,0,a]:[l,i,c]=[a,0,o],[Math.round((l+r)*255),Math.round((i+r)*255),Math.round((c+r)*255)]}function tt(e,n,s){e=(e%360+360)%360;const a=n+s;a>1&&(n/=a,s/=a);const[o,r,l]=j(e,1,.5).map(h=>h/255),i=1-n-s,c=o*i+n,u=r*i+n,p=l*i+n;return[Math.round(c*255),Math.round(u*255),Math.round(p*255)]}function H(e,n,s){e/=255,n/=255,s/=255;const a=Math.max(e,n,s),o=Math.min(e,n,s);let r=0,l=0;const i=(a+o)/2,c=a-o;if(c!==0){switch(l=i>.5?c/(2-a-o):c/(a+o),a){case e:r=(n-s)/c+(n<s?6:0);break;case n:r=(s-e)/c+2;break;default:r=(e-n)/c+4}r*=60}return[Math.round(r),Math.round(l*100),Math.round(i*100)]}function et(e,n,s){const[a]=H(e,n,s),o=e/255,r=n/255,l=s/255,i=Math.min(o,r,l),c=1-Math.max(o,r,l);return[a,Math.round(i*100),Math.round(c*100)]}function O(e){const n=e/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function U(e){const n=e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(Math.max(0,Math.min(1,n))*255)}function nt(e,n,s){const a=s*Math.PI/180,o=Math.cos(a)*n,r=Math.sin(a)*n,l=e+.3963377774*o+.2158037573*r,i=e-.1055613458*o-.0638541728*r,c=e-.0894841775*o-1.291485548*r,u=l*l*l,p=i*i*i,h=c*c*c,m=4.0767416621*u-3.3077115913*p+.2309699292*h,g=-1.2684380046*u+2.6097574011*p-.3413193965*h,f=-.0041960863*u-.7034186147*p+1.707614701*h;return[U(m),U(g),U(f)]}function at(e,n,s){const a=O(e),o=O(n),r=O(s),l=.4122214708*a+.5363325363*o+.0514459929*r,i=.2119034982*a+.6806995451*o+.1073969566*r,c=.0883024619*a+.2817188376*o+.6299787005*r,u=Math.cbrt(l),p=Math.cbrt(i),h=Math.cbrt(c),m=.2104542553*u+.793617785*p-.0040720468*h,g=1.9779984951*u-2.428592205*p+.4505937099*h,f=.0259040371*u+.7827717662*p-.808675766*h,I=Math.sqrt(g*g+f*f);let V=Math.atan2(f,g)*180/Math.PI;return V<0&&(V+=360),[m,I,V]}function R(e,n,s,a,o,r){switch(o){case"hex":if(r){const l=c=>c.toString(16).padStart(2,"0"),i=Math.max(0,Math.min(255,Math.round(a*255)));return`#${l(e)}${l(n)}${l(s)}${l(i)}`}return W(e,n,s);case"rgb":return`rgb(${e}, ${n}, ${s})`;case"rgba":return`rgba(${e}, ${n}, ${s}, ${Math.round(a*100)/100})`;case"hsl":{const[l,i,c]=H(e,n,s);return`hsl(${l}, ${i}%, ${c}%)`}case"hsla":{const[l,i,c]=H(e,n,s);return`hsla(${l}, ${i}%, ${c}%, ${Math.round(a*100)/100})`}case"hwb":{const[l,i,c]=et(e,n,s);return a<1?`hwb(${l} ${i}% ${c}% / ${Math.round(a*100)/100})`:`hwb(${l} ${i}% ${c}%)`}case"oklch":{const[l,i,c]=at(e,n,s),u=(Math.round(l*1e3)/1e3).toFixed(3),p=(Math.round(i*1e3)/1e3).toFixed(3),h=(Math.round(c*10)/10).toFixed(1),m=Math.round(a*100)/100;return r||a<1?`oklch(${u} ${p} ${h} / ${m})`:`oklch(${u} ${p} ${h})`}}}function v(e,n){return n?e==="rgb"?"rgba":e==="hsl"?"hsla":e:e==="rgba"?"rgb":e==="hsla"?"hsl":e}async function rt(e){return new Promise((n,s)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>{const o=a.result;n(o.split(",")[1])},a.onerror=o=>s(o)})}function mt(e){return Promise.all(e.map(rt))}function ft(e){if(e.length>=4){if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return"image/png";if(e[0]===255&&e[1]===216)return"image/jpeg";if(e[0]===71&&e[1]===73&&e[2]===70)return"image/gif";if(e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80)return"image/webp"}try{if(new TextDecoder("utf-8").decode(e.slice(0,256)).includes("<svg"))return"image/svg+xml"}catch{}return"application/octet-stream"}function bt(e){const n=ct.$t(e??""),s=n.length,a=new Uint8Array(s);for(let o=0;o<s;o++)a[o]=n.charCodeAt(o);return a}function st(e){const{value:n,onChange:s,onInput:a,...o}=e,r=new Map,l=t.Value.toSignal(n).map(p=>p.map((h,m)=>{const g=r.get(h),f=bt(h??""),I=g?.type||ft(f),V=g?.name??`file-${m}`,y=f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength),$=new Blob([y],{type:I});return new File([$],V,{type:I})})),i=p=>h=>{p&&mt(h).then(m=>{for(const[g,f]of m.entries())r.set(f,{name:h[g].name,type:h[g].type});p(m)})},c=i(s),u=i(a);return k.FilesInput({...o,value:l,onChange:c,onInput:u})}function yt(e){const{value:n,onInput:s,onChange:a,...o}=e;return st({...o,maxFiles:1,value:t.Value.map(n,r=>r==null?[]:[r]),onChange:r=>{a?.(r[0])},onInput:r=>{s?.(r[0])}})}function It(e,n){const[s,a,o]=e,r=s<<16^a<<8^o,l=J(r),i=6+Math.floor(l()*5),c=.18+l()*.06,u=[];for(let g=0;g<i;g++){const f=g/i*Math.PI*2,I=n*(1+(l()*2-1)*c),V=Math.cos(f)*I,y=Math.sin(f)*I;u.push({x:V,y})}const p=(u[0].x+u[i-1].x)/2,h=(u[0].y+u[i-1].y)/2;let m=`M ${p.toFixed(3)} ${h.toFixed(3)}`;for(let g=0;g<i;g++){const f=u[g],I=u[(g+1)%i],V=(f.x+I.x)/2,y=(f.y+I.y)/2;m+=` Q ${f.x.toFixed(3)} ${f.y.toFixed(3)} ${V.toFixed(3)} ${y.toFixed(3)}`}return m+=" Z",m}const wt=e=>{const{value:n,onBlur:s,onChange:a,onInput:o,displayValue:r,size:l,withAlpha:i}=e,c=t.Value.map(l??32,d=>d),u=t.Value.map(n,d=>Q(d??"#000000")),p=t.Value.map(u,([d,w,M])=>[d,w,M]),h=t.Value.map(u,([,,,d])=>d),m=t.prop(t.Value.get(h)??1),g=t.Value.map(i??!1,d=>d),f=t.Value.map(e.colorTextFormat??"rgb",d=>d),I=t.computedOf(p,m,f,g)(([d,w,M],_,A,T)=>R(d,w,M,_??1,v(A,T),T)),V=t.Value.map(e.colorTextFormat??"hex",d=>d),y=t.Value.map(c,d=>`${-d/2} ${-d/2} ${d} ${d}`),$=t.computedOf(p,c)((d,w)=>It(d,w/2)),b=t.computedOf(p,m,g)(([d,w,M],_,A)=>A||_<1?Z(d,w,M,_):W(d,w,M)),C=t.html.div(t.attr.class("bc-color-swatch-input__control"),t.attr.class(t.Value.map(g,d=>d?"bc-color-swatch-input__control--alpha":"")),t.attr.style(t.computedOf(c)(d=>`min-width:${d+2}px;height:${d+2}px`)),t.svg.svg(t.attr.class("bc-color-swatch-input__svg"),t.svgAttr.viewBox(y),t.svg.path(t.svgAttr.d($),t.svgAttr.fill(b))),t.html.input(t.attr.type("color"),S.CommonInputAttributes(e),t.attr.value(t.Value.map(p,([d,w,M])=>W(d,w,M))),t.attr.class("bc-input bc-color-swatch-input bc-color-swatch-input__native"),s!=null?t.on.blur(s):t.Empty,a!=null?t.on.change(d=>{const w=d.target.value;if(!a)return;const{r:M,g:_,b:A}=E(w)??{r:0,g:0,b:0},T=t.Value.get(m)??1,F=v(t.Value.get(V),t.Value.get(g)),L=R(M,_,A,T,F,t.Value.get(g));a(L)}):t.Empty,o!=null?t.on.input(d=>{const w=d.target.value;if(!o)return;const{r:M,g:_,b:A}=E(w)??{r:0,g:0,b:0},T=t.Value.get(m)??1,F=v(t.Value.get(V),t.Value.get(g)),L=R(M,_,A,T,F,t.Value.get(g));o(L)}):t.Empty)),x=t.When(g,()=>t.html.input(t.attr.type("range"),t.attr.class("bc-color-swatch-input__alpha"),t.attr.min(0),t.attr.max(1),t.attr.step(.01),t.attr.value(t.Value.map(m,d=>String(d??1))),t.attr.disabled(e.disabled),t.on.input(d=>{const w=parseFloat(d.target.value);m.set(w);const[M,_,A]=t.Value.get(p),T=v(t.Value.get(V),t.Value.get(g)),F=R(M,_,A,w,T,t.Value.get(g));o?.(F)}),t.on.change(d=>{const w=parseFloat(d.target.value);m.set(w);const[M,_,A]=t.Value.get(p),T=v(t.Value.get(V),t.Value.get(g)),F=R(M,_,A,w,T,t.Value.get(g));a?.(F)})));return D.InputContainer({baseContainer:!0,...e,growInput:!1,input:C,after:t.Fragment(t.When(r??!1,()=>t.html.span(t.attr.class("bc-color-swatch-input__rgb"),I)),x,e.after)})},P=e=>typeof e=="string"&&e.trim()===""?null:e,ot=e=>e??"";function B(e){return n=>{const{value:s,onBlur:a,onChange:o,onInput:r,after:l,disabled:i,...c}=n,u=k.NullableResetAfter(s,i,o??r);return e({...c,disabled:i,value:t.Value.map(s,ot),onChange:o!=null?p=>o(P(p)):void 0,onInput:r!=null?p=>r(P(p)):void 0,onBlur:a,after:l!=null?t.Fragment(u,l):u})}}const Vt=({startEditing:e,value:n,onChange:s,placeholder:a,disabled:o})=>{const r=t.Value.deriveProp(e??!1),l=t.prop(!1),i=t.Value.map(o??!1,c=>c);return t.html.div(t.attr.class("bc-editable-text"),t.attr.class(t.Value.map(i,c=>c?"bc-editable-text--disabled":"")),t.aria.disabled(i),t.When(r,()=>t.html.input(t.attr.placeholder(a),t.attr.value(n),t.attr.class("bc-editable-text__input"),ut.AutoSelect(),t.on.keydown(c=>{c.key==="Enter"?r.set(!1):c.key==="Escape"&&(l.set(!0),r.set(!1))}),t.on.blur(t.emitValue(c=>{if(r.set(!1),l.value){l.set(!1);return}s(c)}))),()=>t.html.span(t.on.click(()=>{t.Value.get(i)||r.set(!0)}),t.attr.class("bc-editable-text__display"),t.When(t.Value.map(n,c=>c!=null&&c.trim()!==""),()=>t.html.span(t.attr.class("bc-editable-text__text"),n),()=>t.html.span(t.attr.class("bc-editable-text__placeholder"),a)),t.When(t.Value.map(i,c=>!c),()=>t.html.button(t.attr.type("button"),t.attr.class("bc-editable-text__edit-button"),t.Use(N.BeatUII18n,c=>t.aria.label(c.$.editLabel)),t.on.click(()=>r.set(!0)),N.Icon({icon:"line-md/pencil",color:"neutral"}))))))},Mt=e=>{const{value:n,onBlur:s,onChange:a,onInput:o,after:r,disabled:l}=e,i=k.NullableResetAfter(n,l,a??o);return D.InputContainer({...e,input:t.input.date(S.CommonInputAttributes(e),t.attr.valueAsDate(n),t.attr.class("bc-input"),s!=null?t.on.blur(t.emitValue(s)):t.Empty,a!=null?t.on.change(t.emitValueAsNullableDate(a)):t.Empty,o!=null?t.on.input(t.emitValueAsNullableDate(o)):t.Empty),after:r!=null?t.Fragment(i,r):i})},$t=e=>{const n=e.getFullYear(),s=e.getMonth()+1,a=e.getDate(),o=e.getHours(),r=e.getMinutes(),l=e.getSeconds();return`${n}-${s.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}`},xt=e=>{const{value:n,onBlur:s,onChange:a,onInput:o,after:r,disabled:l}=e,i=t.Value.map(n,u=>u!=null?$t(u):null),c=k.NullableResetAfter(n,l,a??o);return D.InputContainer({...e,input:t.input["datetime-local"](S.CommonInputAttributes(e),t.attr.value(t.Value.map(i,u=>u??null)),t.attr.class("bc-input"),s!=null?t.on.blur(t.emitValue(s)):t.Empty,a!=null?t.on.change(t.emitValueAsNullableDateTime(a)):t.Empty,o!=null?t.on.input(t.emitValueAsNullableDateTime(o)):t.Empty),after:r!=null?t.Fragment(c,r):c})},_t=B(z.EmailInput),Ct=B(S.TextInput),At=B(z.PasswordInput),Tt=B(k.TextArea),kt=({value:e,onChange:n,onInput:s,onBlur:a,offLabel:o,onLabel:r,disabled:l=!1,size:i="md",id:c,color:u="primary",tabIndex:p=0,matchInputHeight:h=!0})=>{const m=c??pt.sessionId("switch");function g(y,$){const b=["bc-switch",`bc-switch--size-${$}`,`bc-switch--${$}`];return h&&b.push("bc-switch--match-input"),y&&b.push("bc-switch--disabled"),b.join(" ")}function f(y){const $=y??"primary",b=new Map,C=N.backgroundValue($,"solid","light"),x=N.backgroundValue($,"solid","dark");return b.set("--switch-track-on-bg",C.backgroundColor),b.set("--switch-track-on-label",C.textColor),b.set("--switch-track-on-bg-dark",x.backgroundColor),b.set("--switch-track-on-label-dark",x.textColor),b.set("--switch-track-on-border-dark",N.borderColorValue($,"dark")),Array.from(b.entries()).map(([d,w])=>`${d}: ${w}`).join("; ")}const I=()=>{t.Value.get(l)||(n?.(!t.Value.get(e)),s?.(!t.Value.get(e)))},V=y=>{t.Value.get(l)||(y.key===" "||y.key==="Enter")&&(y.preventDefault(),I())};return t.html.div(t.attr.class(t.computedOf(l??!1,i)((y,$)=>g(y??!1,$??"md"))),t.attr.style(t.computedOf(u)(y=>f(y))),t.attr.id(m),t.attr.role("switch"),t.attr.tabindex(t.computedOf(l??!1,p)((y,$)=>y?-1:$??0)),t.aria.checked(e),t.aria.disabled(l),t.on.click(I),t.on.keydown(V),a!=null?t.on.blur(a):null,t.html.div(t.attr.class("bc-switch__track"),t.attr.class(t.Value.map(e,y=>y?"bc-switch__track--on":"bc-switch__track--off")),o!=null?t.html.div(t.aria.hidden(!0),t.attr.class("bc-switch__track-label bc-switch__track-label--off"),t.attr.class(t.Value.map(e,y=>y?"bc-switch__track-label--hidden":"bc-switch__track-label--visible")),o):null,r!=null?t.html.div(t.attr.class("bc-switch__track-label bc-switch__track-label--on"),t.attr.class(t.Value.map(e,y=>y?"bc-switch__track-label--visible":"bc-switch__track-label--hidden")),r):null,t.html.div(t.attr.class("bc-switch__thumb"),t.attr.class(t.Value.map(e,y=>y?"bc-switch__thumb--on":"bc-switch__thumb--off")))))},Ft=B(k.UUIDInput),Nt="line-md:star-alt-filled",St="line-md:star-alt",lt=e=>{const{value:n,onChange:s,onInput:a,disabled:o,max:r=5,fullColor:l="yellow",emptyColor:i="neutral",fullIcon:c=Nt,emptyIcon:u=St,size:p="md",onBlur:h,rounding:m=1}=e,g=()=>{const b=t.Value.get(m);return b>0?b:1},f=b=>Math.min(Math.max(b,0),t.Value.get(r)),I=(b,C)=>{if(t.Value.get(o??!1))return;const d=b.currentTarget.getBoundingClientRect(),w=(b.clientX-d.left)/d.width,M=C-1+w,_=g(),A=Math.ceil(M/_)*_,T=f(A);s?.(T),a?.(T)},V=b=>{if(t.Value.get(o??!1))return;const C=g(),x=t.Value.get(n)??0;let d;switch(b.key){case"ArrowRight":case"ArrowUp":d=f(x+C);break;case"ArrowLeft":case"ArrowDown":d=f(x-C);break;case"Home":d=0;break;case"End":d=t.Value.get(r);break;default:return}b.preventDefault(),s?.(d),a?.(d)},y=t.Value.map(p,b=>`bc-icon--${b}`),$=({index:b,counter:C})=>t.html.span(t.attr.class("bc-rating-input__icon-container"),t.attr.class(y),N.Icon({icon:u,size:p,color:i,tone:"soft"},t.attr.class("bc-rating-input__icon-empty")),t.html.span(t.attr.class("bc-rating-input__icon-clipper"),t.attr.class(y),t.style.width(t.Value.map(n,x=>{const d=Math.floor(x);return d>b?"100%":d<b?"0%":`${(x-b)*100}%`})),N.Icon({icon:c,size:p,color:l,tone:"soft"},t.attr.class("bc-rating-input__icon-full"))),t.on.click(t.emit(x=>I(x,C),{preventDefault:!0,stopPropagation:!0})));return D.InputContainer({baseContainer:!0,growInput:!1,focusableSelector:'[role="slider"]',...e,input:t.html.div(S.CommonInputAttributes(e),t.attr.class("bc-rating-input"),t.attr.role("slider"),t.attr.tabindex(t.Value.map(o??!1,b=>b?-1:0)),t.aria.disabled(o??!1),t.aria.valuemin(0),t.aria.valuemax(t.Value.map(r,b=>b??0)),t.aria.valuenow(t.Value.map(n,b=>b??0)),t.aria.valuetext(t.computedOf(n,r)((b,C)=>{const x=b??0,d=C??0;return`${String(x)} / ${String(d)}`})),t.on.keydown(V),h!=null?t.on.blur(h):null,t.Repeat(r,$))})},Rt=e=>{const{value:n,onChange:s,onInput:a,onBlur:o,after:r,disabled:l,...i}=e,c=k.NullableResetAfter(n,l,s??a);return lt({...i,value:t.Value.map(n,u=>u??0),onChange:s,onInput:a,onBlur:o,after:r!=null?t.Fragment(c,r):c})},vt=e=>{const{value:n,step:s,min:a,max:o,onBlur:r,onChange:l,onInput:i}=e;return D.InputContainer({...e,focusableSelector:'input[type="range"]',input:t.html.input(t.attr.type("range"),S.CommonInputAttributes(e),t.attr.min(a),t.attr.max(o),t.attr.step(s),t.attr.valueAsNumber(n),t.attr.class("bc-input bc-slider-input"),r!=null?t.on.blur(t.emitValueAsNumber(r)):t.Empty,l!=null?t.on.change(t.emitValueAsNumber(l)):t.Empty,i!=null?t.on.input(t.emitValueAsNumber(i)):t.Empty)})},Et=e=>{const{value:n,step:s,min:a,max:o,onBlur:r,onChange:l,onInput:i}=e,c=t.Value.map(n,p=>{if(p!=null)return p;const h=a!=null?t.Value.get(a):void 0;return typeof h=="number"?h:0}),u=k.NullableResetAfter(n,e.disabled,l??i);return D.InputContainer({...e,focusableSelector:'input[type="range"]',after:u,input:t.html.input(t.attr.type("range"),S.CommonInputAttributes(e),t.attr.min(a),t.attr.max(o),t.attr.step(s),t.attr.valueAsNumber(c),t.attr.class("bc-input bc-slider-input"),r!=null?t.on.blur(t.emitValueAsNumber(r)):t.Empty,l!=null?t.on.change(t.emitValueAsNumber(p=>{l(p)})):t.Empty,i!=null?t.on.input(t.emitValueAsNumber(p=>{i(p)})):t.Empty)})},Dt=B(k.UrlInput);class it{widgets=new Map;typeMapping=new Map;register(n,s){if(this.widgets.set(n,s),s.supportedTypes)for(const a of s.supportedTypes)this.typeMapping.has(a)||this.typeMapping.set(a,[]),this.typeMapping.get(a).push(n),this.typeMapping.get(a).sort((o,r)=>{const l=this.widgets.get(o)?.priority||0;return(this.widgets.get(r)?.priority||0)-l})}unregister(n){const s=this.widgets.get(n);if(s&&(this.widgets.delete(n),s.supportedTypes))for(const a of s.supportedTypes){const o=this.typeMapping.get(a);if(o){const r=o.indexOf(n);r>=0&&o.splice(r,1),o.length===0&&this.typeMapping.delete(a)}}}get(n){return this.widgets.get(n)}getAll(){return new Map(this.widgets)}getForType(n){return(this.typeMapping.get(n)||[]).map(a=>this.widgets.get(a)).filter(Boolean)}findBestWidget(n){const s=dt.resolveWidget(n.definition,n.name);if(s?.widget){const o=this.widgets.get(s.widget);if(o)return{name:s.widget,registration:o,resolved:s}}const a=[];for(const[o,r]of this.widgets.entries())if(r.matcher)try{r.matcher(n)&&a.push({name:o,registration:r,priority:r.priority??0})}catch(l){console.warn(`Error in matcher for widget "${o}":`,l)}if(a.length>0){a.sort((r,l)=>l.priority-r.priority);const o=a[0];return{name:o.name,registration:o.registration,resolved:{widget:o.name,source:"heuristics"}}}if(typeof n.definition=="object"&&n.definition.type){const o=Array.isArray(n.definition.type)?n.definition.type[0]:n.definition.type,r=this.getForType(o);if(r.length>0){const l=this.typeMapping.get(o)[0];return{name:l,registration:r[0],resolved:{widget:l,source:"type-fallback"}}}}return null}}const Bt=new it;function Ot(e,n,s){return{factory:n,matcher:a=>{const r=a.definition["x:ui"];return r===e||typeof r=="object"&&r!==null&&r.widget===e},displayName:s?.displayName??e,priority:s?.priority??100,...s}}function Ut(e,n,s){return{factory:n,matcher:a=>a.definition.format===e,displayName:s?.displayName??`${e} widget`,priority:s?.priority??75,...s}}function Wt(e,n,s,a){return{factory:s,matcher:o=>{const r=o.definition;return r.type===e&&r.format===n},displayName:a?.displayName??`${e}:${n} widget`,priority:a?.priority??80,...a}}function Ht(e){const n=e?.logPrefix??"WIDGET_DIAG",s=e?.filterFn??(()=>!0);return{factory:()=>null,displayName:"Diagnostic Widget (never matches)",priority:-1e3,matcher:a=>{if(!s(a))return!1;const o=a.definition,r={name:a.name,path:a.path.map(String),type:o?.type,hasRegistry:a.widgetRegistry!==void 0,definition:o};return console.log(`[${n}] name="${r.name??"ROOT"}" path=[${r.path.join(", ")}] type="${r.type??"unknown"}" hasRegistry=${r.hasRegistry}`),e?.onProcess?.(r),!1}}}exports.Base64Input=yt;exports.Base64sInput=st;exports.ColorSwatchInput=wt;exports.EditableText=Vt;exports.NullableDateInput=Mt;exports.NullableDateTimeInput=xt;exports.NullableEmailInput=_t;exports.NullablePasswordInput=At;exports.NullableRatingInput=Rt;exports.NullableSliderInput=Et;exports.NullableTextArea=Tt;exports.NullableTextInput=Ct;exports.NullableUUIDInput=Ft;exports.NullableUrlInput=Dt;exports.RatingInput=lt;exports.SliderInput=vt;exports.Switch=kt;exports.WidgetRegistry=it;exports.createDiagnosticWidget=Ht;exports.emptyToNull=P;exports.fileToBase64=rt;exports.forFormat=Ut;exports.forTypeAndFormat=Wt;exports.forXUI=Ot;exports.formatColor=R;exports.getContrastRatio=ht;exports.globalWidgetRegistry=Bt;exports.hexToRgb=E;exports.hslToRgb=j;exports.hwbToRgb=tt;exports.isValidColor=gt;exports.isValidHexColor=q;exports.isValidHslColor=G;exports.isValidRgbColor=X;exports.isValidRgbaColor=Y;exports.linearToSrgb=U;exports.mulberry32=J;exports.normalizeHexColor=K;exports.nullToEmpty=ot;exports.oklchToRgb=nt;exports.parseAnyColor=Q;exports.resolveEffectiveFormat=v;exports.rgbToHex=W;exports.rgbToHsl=H;exports.rgbToHwb=et;exports.rgbToOklch=at;exports.srgbToLinear=O;exports.toRgbaString=Z;
|
package/dist/zh-DWswYYTS.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-Cy9hoMGV.cjs"),r={loadingExtended:"正在加载,请稍候",loadingShort:"加载中...",locale:"语言",iconDescription:"图标",loadingIcon:"加载图标",failedToLoadIcon:"图标加载失败",editLabel:"编辑",selectOne:"选择一个",selectNone:"无",selectMany:"选择多个",noResults:"无结果",passwordPlaceholderText:"密码",togglePasswordVisibility:"切换密码可见性",toggleMenu:"切换菜单",toggleAside:"切换侧边栏",mainNavigation:"主导航",sidebar:"侧边栏",closeDrawer:"关闭抽屉",closeModal:"关闭模态框",confirm:"确认",cancel:"取消",addLabel:"添加",removeItem:"删除项目",currentLocale:"简体中文",ar:"阿拉伯语",de:"德语",en:"英语",es:"西班牙语",fr:"法语",hi:" Hindi",it:"意大利语",ja:"日语",ko:"韩语",nl:"荷兰语",pl:"波兰语",pt:"葡萄牙语",ru:"俄语",tr:"土耳其语",vi:"越南语",zh:"简体中文",he:"希伯来语",fa:"波斯语",ur:"乌尔都语",emailPlaceholderText:"请输入邮箱",incrementValue:"增加值",decrementValue:"减少值",dropZoneInstructions:e=>e?"点击选择或将文件拖拽到此处,或按 Enter 或空格键打开文件选择器":"将文件拖拽到此处",fileSizeUnits:["字节","KB","MB","GB","TB"],removeFile:"删除文件",clearAllFiles:"清除所有文件",clearValue:"清除值",unknownType:"未知类型",filesInputInstructions:(e,o,n)=>{let l=(e==null||e>1,"点击选择或将文件拖拽到此处");if(e||o){const t=[];if(e!=null&&e>1&&t.push(`最多${e}个文件`),o&&n){const i=a.formatFileSize(o,{units:n});t.push(`每个最大${i}`)}t.length>0&&(l+=` (${t.join(",")})`)}return l},paginationLabel:"分页",firstPage:"第一页",previousPage:"上一页",nextPage:"下一页",lastPage:"最后一页",breadcrumbs:"面包屑导航",commandPalette:"命令面板",typeACommand:"输入命令...",noResultsFound:"未找到结果",noMatchingCommands:"没有匹配的命令",appearanceSystem:"跟随系统",appearanceLight:"浅色",appearanceDark:"深色",ok:"OK",changeTypeConfirmation:"更改类型将清除当前值。是否继续?",notifications:"通知",markAllAsRead:"全部标为已读",noNotifications:"没有通知",schemaConflictsDetected:"检测到架构冲突",schemaViolationsDetected:"检测到架构违规",properties:"属性",uploading:"上传中...",dropFilesOrBrowse:"将文件拖放到此处或点击浏览",acceptedTypes:e=>`支持的类型:${e}`,enterUrlPrompt:"请输入网址:",exceeded:"(已超出)",pdfPreview:"PDF 预览",lexical:{fontFamily:"字体",fontSize:"字号",fontColor:"字体颜色",highlightColor:"高亮颜色",backgroundColor:"背景颜色",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",code:"代码",clearFormatting:"清除格式",normal:"正文",heading:e=>`标题 ${e}`,bulletList:"无序列表",orderedList:"有序列表",checkList:"任务列表",indent:"增加缩进",outdent:"减少缩进",blockquote:"引用",codeBlock:"代码块",horizontalRule:"水平分割线",insertTable:"插入表格",link:"链接",undo:"撤销",redo:"重做",cut:"剪切",copy:"复制",paste:"粘贴",defaultOption:"默认",slashCommands:"斜杠命令",noCommandsFound:"未找到命令",changeBlockType:"更改块类型",blockTypes:"块类型",enterUrl:"输入网址:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},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;
|