@tempots/beatui 1.1.2 → 1.1.4
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-CFd5Xkva.cjs +1 -0
- package/dist/{ar-DaKbK_t8.js → ar-CZ07-PLK.js} +8 -7
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-3t_-R0sL.cjs → auth-divider-BHAbd_PS.cjs} +1 -1
- package/dist/{auth-divider-Cp3xGpHr.js → auth-divider-CvQ0TQwi.js} +7 -7
- package/dist/beatui.css +54 -0
- package/dist/beatui.tailwind.css +54 -0
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +5 -5
- package/dist/de-BJG9UqDS.cjs +1 -0
- package/dist/{de-3MTPDS1i.js → de-Dpx6i3Pv.js} +8 -7
- package/dist/{deep-merge-Da602mAN.js → deep-merge-D1cBNWZX.js} +4 -4
- package/dist/{deep-merge-Bz9HHpRt.cjs → deep-merge-DEEd-Tte.cjs} +1 -1
- package/dist/{duration-input-g-cQ3cs1.cjs → duration-input-CdgMuk2b.cjs} +1 -1
- package/dist/{duration-input-HM1i6RRY.js → duration-input-Dpqj2Am9.js} +4 -4
- package/dist/{editor-toolbar-group-Crlu1QJw.js → editor-toolbar-group-7eMZbEvH.js} +2 -2
- package/dist/{editor-toolbar-group-mkL4QozO.cjs → editor-toolbar-group-BJWRgYtv.cjs} +1 -1
- package/dist/es-BBqPUxJF.cjs +1 -0
- package/dist/{es-DwMUvBeU.js → es-apq3F_om.js} +8 -7
- package/dist/{fa-0rvQiKrJ.js → fa-BYpfIkLu.js} +8 -7
- package/dist/fa-d0o3KlIu.cjs +1 -0
- package/dist/{fr-B4i6NzLl.js → fr-Ba5_hcn7.js} +8 -7
- package/dist/fr-DzXA-sjH.cjs +1 -0
- package/dist/he-Cnx-qg1P.cjs +1 -0
- package/dist/{he-C71n-hsn.js → he-Dff_I80g.js} +8 -7
- package/dist/{hi-xmrXpeVU.js → hi-7G-frHVR.js} +8 -7
- package/dist/hi-BeJ8Q4O6.cjs +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +2736 -2755
- package/dist/{input-container-Di1YvVB_.cjs → input-container-BZwpJgx6.cjs} +1 -1
- package/dist/{input-container-BvEcp7FU.js → input-container-Q9wL2BUl.js} +1 -1
- package/dist/it-DE3pe-gS.cjs +1 -0
- package/dist/{it-CDZTtOBC.js → it-dSE5UgTZ.js} +8 -7
- package/dist/{ja-Zz1LzidW.js → ja-DRzjr2YR.js} +8 -7
- package/dist/ja-yzk8mwox.cjs +1 -0
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +10 -10
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +5 -5
- package/dist/{ko-9laUsZDL.js → ko-7gpweMh7.js} +8 -7
- package/dist/ko-rKqndOMO.cjs +1 -0
- package/dist/lexical/index.cjs.js +2 -2
- package/dist/lexical/index.es.js +1412 -1414
- package/dist/menu-B60Q9j3-.cjs +1 -0
- package/dist/menu-BkqFGcXg.js +366 -0
- package/dist/{modal-BT0jjDqX.cjs → modal-ClnvWxzi.cjs} +1 -1
- package/dist/{modal-DBguyX-b.js → modal-DXWQ-HUs.js} +3 -3
- package/dist/{nl-Dcll9fVA.js → nl-DAe4B7fb.js} +9 -8
- package/dist/nl-DKHslb-6.cjs +1 -0
- package/dist/{notice-Dtz7ADVH.js → notice-Dx4D1UOf.js} +4 -4
- package/dist/{notice-BNghd0oS.cjs → notice-dOOD80F7.cjs} +1 -1
- package/dist/{oneof-branch-detection-J_DYEEcD.js → oneof-branch-detection-B57ZDbzM.js} +1 -1
- package/dist/{oneof-branch-detection-ZUBZ6hqy.cjs → oneof-branch-detection-bQKKfV32.cjs} +1 -1
- package/dist/{pl-Dm9N9Gbr.js → pl-4xrzOC4A.js} +8 -7
- package/dist/pl-9yeqi1Kn.cjs +1 -0
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +4 -4
- package/dist/pt-CCfVWHz4.cjs +1 -0
- package/dist/{pt-CFi5cn0k.js → pt-DYQOe1Td.js} +8 -7
- package/dist/ru-Cct0jttM.cjs +1 -0
- package/dist/{ru-CEhZUw8R.js → ru-FofxuqAJ.js} +10 -9
- package/dist/{text-input-DL9FvpTZ.cjs → text-input-CynkbBpH.cjs} +1 -1
- package/dist/{text-input-dDUEUmlC.js → text-input-DEAddaOi.js} +1 -1
- package/dist/{toolbar-DoKdYXIL.cjs → toolbar-Dz7R1kV3.cjs} +1 -1
- package/dist/{toolbar-DY0ax2Qd.js → toolbar-e9POle8o.js} +1 -1
- package/dist/{tr-ZmnVDhLP.js → tr-BfKjkfhE.js} +9 -8
- package/dist/tr-DhKxAXK0.cjs +1 -0
- package/dist/{translations-B1_yyDUK.js → translations-B96REXIk.js} +87 -86
- package/dist/translations-BDGa_4jx.cjs +1 -0
- package/dist/{translations-A4kR7CW8.js → translations-BplmL3nb.js} +1 -1
- package/dist/{translations-C81buKAw.cjs → translations-D8Jwi_d0.cjs} +1 -1
- package/dist/types/beatui-i18n/default.d.ts +1 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +1 -0
- package/dist/types/beatui-i18n/translations.d.ts +1 -0
- package/dist/types/components/data/data-table.d.ts +8 -1
- package/dist/types/components/navigation/flyout.d.ts +15 -5
- package/dist/{ur-yYgj3NmT.js → ur-COVuSAxC.js} +8 -7
- package/dist/ur-DmfFC6MV.cjs +1 -0
- package/dist/{use-form-Dn6v2tEh.js → use-form-CEY-gUUT.js} +2 -2
- package/dist/{use-form-CaW192gw.cjs → use-form-Ca0kF4af.cjs} +1 -1
- package/dist/{vi-D5u4CLQO.js → vi-DI3te8d5.js} +8 -7
- package/dist/vi-DvY-zvIr.cjs +1 -0
- package/dist/{widget-customization-YhVcA-KM.js → widget-customization-BZ8aKWRK.js} +5 -5
- package/dist/{widget-customization-DOWmUuPU.cjs → widget-customization-CHxaaaEV.cjs} +1 -1
- package/dist/zh-DJhzbpi2.cjs +1 -0
- package/dist/{zh-B0kwMMer.js → zh-DKIbNXv8.js} +9 -8
- package/package.json +1 -1
- package/dist/ar-CuI1Jgt6.cjs +0 -1
- package/dist/de-DthHehbh.cjs +0 -1
- package/dist/es-B6GJLk9h.cjs +0 -1
- package/dist/fa-BwgP93iV.cjs +0 -1
- package/dist/fr-CQzk5zqY.cjs +0 -1
- package/dist/he-DcxxvRfs.cjs +0 -1
- package/dist/hi-D-KHVWg4.cjs +0 -1
- package/dist/it-D344Dutu.cjs +0 -1
- package/dist/ja-BNgnDZ27.cjs +0 -1
- package/dist/ko-D-WJ9NK7.cjs +0 -1
- package/dist/menu-B8yoDMRS.js +0 -373
- package/dist/menu-B92oSDct.cjs +0 -1
- package/dist/nl-CrqUlFie.cjs +0 -1
- package/dist/pl-9UksIrvX.cjs +0 -1
- package/dist/pt-_kfdzwqi.cjs +0 -1
- package/dist/ru-CW1WNNlr.cjs +0 -1
- package/dist/tr-B6GIRegf.cjs +0 -1
- package/dist/translations-Dbx7L7Q1.cjs +0 -1
- package/dist/ur-CtFl_tz6.cjs +0 -1
- package/dist/vi-DyCZSpsk.cjs +0 -1
- package/dist/zh-C3ZxMQKb.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-BDGa_4jx.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:"الهندية",it:"الإيطالية",ja:"اليابانية",ko:"الكورية",nl:"الهولندية",pl:"البولندية",pt:"البرتغالية",ru:"الروسية",tr:"التركية",vi:"الفيتنامية",zh:"الصينية",he:"العبرية",fa:"الفارسية",ur:"الأردية",emailPlaceholderText:"بريدك الإلكتروني",incrementValue:"زيادة القيمة",decrementValue:"تقليل القيمة",dropZoneInstructions:e=>e?"انقر للاختيار أو اسحب الملفات هنا، أو اضغط Enter أو Space لفتح محدد الملفات":"اسحب الملفات هنا",fileSizeUnits:["بايت","ك.ب","م.ب","ج.ب","ت.ب"],removeFile:"إزالة الملف",clearAllFiles:"مسح كل الملفات",clearValue:"مسح القيمة",unknownType:"نوع غير معروف",filesInputInstructions:(e,t,l)=>{let o=e==null||e>1?"انقر للاختيار أو اسحب الملفات هنا":"انقر للاختيار أو اسحب ملف هنا";if(e||t){const n=[];if(e!=null&&e>1&&n.push(`حتى ${e} ملفات`),t&&l){const a=i.formatFileSize(t,{units:l});n.push(`حد أقصى ${a} لكل ملف`)}n.length>0&&(o+=` (${n.join("، ")})`)}return o},paginationLabel:"ترقيم الصفحات",paginationRange:(e,t,l,o)=>o>l?`الصفوف ${e} إلى ${t} من ${l} من أصل ${o}`:`الصفوف ${e} إلى ${t} من ${l}`,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:"حجم الخط",lineHeight:"ارتفاع السطر",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"},dataTable:{sortAscending:"ترتيب تصاعدي",sortDescending:"ترتيب تنازلي",clearSort:"مسح الترتيب",filterPlaceholder:"تصفية...",clearFilter:"مسح التصفية",selectAll:"تحديد الكل",deselectAll:"إلغاء تحديد الكل",selectedCount:e=>`${e} محدد`,resetAll:"إعادة تعيين الكل",noResults:"لم يتم العثور على نتائج",loading:"جارٍ التحميل...",filterPanelAddCondition:"إضافة شرط",filterPanelApply:"تطبيق",filterPanelClear:"مسح الفلاتر",filterPanelAnd:"و",filterPanelOr:"أو",filterPanelContains:"يحتوي على",filterPanelNotContains:"لا يحتوي على",filterPanelEquals:"يساوي",filterPanelNotEquals:"لا يساوي",filterPanelStartsWith:"يبدأ بـ",filterPanelEndsWith:"ينتهي بـ",filterPanelIsNull:"فارغ",filterPanelIsNotNull:"غير فارغ",filterPanelGt:"أكبر من",filterPanelGte:"أكبر من أو يساوي",filterPanelLt:"أقل من",filterPanelLte:"أقل من أو يساوي",filterPanelBetween:"بين",filterPanelValuePlaceholder:"القيمة...",sortMultiHint:"اضغط Shift للترتيب حسب أعمدة متعددة",columnVisibility:"الأعمدة",showAllColumns:"إظهار الكل",menuSortAsc:"ترتيب تصاعدي",menuSortDesc:"ترتيب تنازلي",menuClearSort:"مسح الترتيب",menuHideColumn:"إخفاء العمود",menuChooseColumns:"اختيار الأعمدة",menuResetColumns:"إعادة تعيين الأعمدة",menuFilter:"تصفية",rowCount:(e,t)=>`الصفوف: ${e} إجمالي الصفوف: ${t}`,filterTagsPlaceholder:"اختر القيم...",groupCount:e=>`${e} عناصر`,collapseGroup:"طي المجموعة",expandGroup:"توسيع المجموعة",describeFilter:{textContains:(e,t)=>`${e} يحتوي على "${t}"`,textNotContains:(e,t)=>`${e} لا يحتوي على "${t}"`,textEquals:(e,t)=>`${e} يساوي "${t}"`,textNotEquals:(e,t)=>`${e} لا يساوي "${t}"`,textStartsWith:(e,t)=>`${e} يبدأ بـ "${t}"`,textEndsWith:(e,t)=>`${e} ينتهي بـ "${t}"`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,l)=>`${e} بين ${t} و ${l}`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} ضمن [${t}]`,setNotIn:(e,t)=>`${e} ليس ضمن [${t}]`,booleanIs:(e,t)=>`${e} هو ${t}`,isNull:e=>`${e} فارغ`,isNotNull:e=>`${e} ليس فارغاً`,compositeAnd:e=>e.join(" و "),compositeOr:e=>e.join(" أو ")}},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,t)=>`Page ${e} is out of range (1-${t})`,renderFailed:"Failed to render PDF page"}};exports.default=r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as i } from "./translations-
|
|
1
|
+
import { f as i } from "./translations-B96REXIk.js";
|
|
2
2
|
const s = {
|
|
3
3
|
loadingExtended: "جاري التحميل، يرجى الانتظار",
|
|
4
4
|
loadingShort: "جاري التحميل...",
|
|
@@ -59,21 +59,22 @@ const s = {
|
|
|
59
59
|
clearValue: "مسح القيمة",
|
|
60
60
|
unknownType: "نوع غير معروف",
|
|
61
61
|
filesInputInstructions: (e, t, l) => {
|
|
62
|
-
let
|
|
62
|
+
let o = e == null || e > 1 ? "انقر للاختيار أو اسحب الملفات هنا" : "انقر للاختيار أو اسحب ملف هنا";
|
|
63
63
|
if (e || t) {
|
|
64
|
-
const
|
|
65
|
-
if (e != null && e > 1 &&
|
|
64
|
+
const n = [];
|
|
65
|
+
if (e != null && e > 1 && n.push(`حتى ${e} ملفات`), t && l) {
|
|
66
66
|
const a = i(t, {
|
|
67
67
|
units: l
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
n.push(`حد أقصى ${a} لكل ملف`);
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
n.length > 0 && (o += ` (${n.join("، ")})`);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return o;
|
|
74
74
|
},
|
|
75
75
|
// Pagination
|
|
76
76
|
paginationLabel: "ترقيم الصفحات",
|
|
77
|
+
paginationRange: (e, t, l, o) => o > l ? `الصفوف ${e} إلى ${t} من ${l} من أصل ${o}` : `الصفوف ${e} إلى ${t} من ${l}`,
|
|
77
78
|
firstPage: "الصفحة الأولى",
|
|
78
79
|
previousPage: "الصفحة السابقة",
|
|
79
80
|
nextPage: "الصفحة التالية",
|
package/dist/auth/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../auth-divider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../auth-divider-BHAbd_PS.cjs");exports.AmazonLoginButton=o.AmazonLoginButton;exports.AppleLoginButton=o.AppleLoginButton;exports.AuthContainer=o.AuthContainer;exports.AuthDivider=o.AuthDivider;exports.AuthModal=o.AuthModal;exports.DiscordLoginButton=o.DiscordLoginButton;exports.EpicLoginButton=o.EpicLoginButton;exports.FacebookLoginButton=o.FacebookLoginButton;exports.GitHubLoginButton=o.GitHubLoginButton;exports.GoogleLoginButton=o.GoogleLoginButton;exports.InstagramLoginButton=o.InstagramLoginButton;exports.LinkedInLoginButton=o.LinkedInLoginButton;exports.MicrosoftLoginButton=o.MicrosoftLoginButton;exports.PasswordStrengthBar=o.PasswordStrengthBar;exports.PasswordStrengthIndicator=o.PasswordStrengthIndicator;exports.PasswordStrengthText=o.PasswordStrengthText;exports.PayPalLoginButton=o.PayPalLoginButton;exports.PinterestLoginButton=o.PinterestLoginButton;exports.PlayStationLoginButton=o.PlayStationLoginButton;exports.RedditLoginButton=o.RedditLoginButton;exports.ResetPasswordForm=o.ResetPasswordForm;exports.SignInForm=o.SignInForm;exports.SignUpForm=o.SignUpForm;exports.SnapchatLoginButton=o.SnapchatLoginButton;exports.SocialLoginButton=o.SocialLoginButton;exports.SocialLoginButtons=o.SocialLoginButtons;exports.SocialProviders=o.SocialProviders;exports.SteamLoginButton=o.SteamLoginButton;exports.TiktokLoginButton=o.TiktokLoginButton;exports.TwitchLoginButton=o.TwitchLoginButton;exports.TwitterLoginButton=o.TwitterLoginButton;exports.WeChatLoginButton=o.WeChatLoginButton;exports.WhatsAppLoginButton=o.WhatsAppLoginButton;exports.XLoginButtin=o.XLoginButtin;exports.XboxLoginButton=o.XboxLoginButton;exports.YahooLoginButton=o.YahooLoginButton;exports.authSchemas=o.authSchemas;exports.calculatePasswordStrength=o.calculatePasswordStrength;exports.createEmailSchema=o.createEmailSchema;exports.createPasswordSchema=o.createPasswordSchema;exports.createSignInSchema=o.createSignInSchema;exports.createSignUpSchema=o.createSignUpSchema;exports.createSocialLoginUrl=o.createSocialLoginUrl;exports.defaultPasswordRules=o.defaultPasswordRules;exports.defaultSignInSchema=o.defaultSignInSchema;exports.defaultSignUpSchema=o.defaultSignUpSchema;exports.emailSchema=o.emailSchema;exports.formatAuthError=o.formatAuthError;exports.formatProviderName=o.formatProviderName;exports.formatSocialLoginText=o.formatSocialLoginText;exports.generateRandomString=o.generateRandomString;exports.getProviderColor=o.getProviderColor;exports.getProviderIcon=o.getProviderIcon;exports.isBrowser=o.isBrowser;exports.isValidEmail=o.isValidEmail;exports.openSocialLoginPopup=o.openSocialLoginPopup;exports.providerInfo=o.providerInfo;exports.requestToControllerValidation=o.requestToControllerValidation;exports.resetPasswordSchema=o.resetPasswordSchema;exports.socialProviderInfo=o.socialProviderInfo;exports.useAuthEmailProp=o.useAuthEmailProp;exports.validateEmail=o.validateEmail;exports.validatePassword=o.validatePassword;
|
package/dist/auth/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as t, a as s, b as n, c as i, d as e, D as r, E as g, F as u, G as c, e as l, I as d, L, M as S, P as B, f as m, g as h, h as P, i as p, j as w, R as f, k as v, S as I, l as A, m as E, n as T, o as k, p as x, q as C, T as F, r as R, s as U, W as b, t as y, X as D, u as G, Y as M, v as V, w as W, x as X, y as q, z, B as H, C as N, H as Y, J as j, K as J, N as K, O, Q, U as Z, V as _, Z as $, _ as aa, $ as oa, a0 as ta, a1 as sa, a2 as na, a3 as ia, a4 as ea, a5 as ra, a6 as ga, a7 as ua, a8 as ca } from "../auth-divider-
|
|
1
|
+
import { A as t, a as s, b as n, c as i, d as e, D as r, E as g, F as u, G as c, e as l, I as d, L, M as S, P as B, f as m, g as h, h as P, i as p, j as w, R as f, k as v, S as I, l as A, m as E, n as T, o as k, p as x, q as C, T as F, r as R, s as U, W as b, t as y, X as D, u as G, Y as M, v as V, w as W, x as X, y as q, z, B as H, C as N, H as Y, J as j, K as J, N as K, O, Q, U as Z, V as _, Z as $, _ as aa, $ as oa, a0 as ta, a1 as sa, a2 as na, a3 as ia, a4 as ea, a5 as ra, a6 as ga, a7 as ua, a8 as ca } from "../auth-divider-CvQ0TQwi.js";
|
|
2
2
|
export {
|
|
3
3
|
t as AmazonLoginButton,
|
|
4
4
|
s as AppleLoginButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("@tempots/dom"),q=require("./stack-dwLevGa2.cjs"),L=require("./use-form-CaW192gw.cjs"),f=require("./modal-BT0jjDqX.cjs"),G=require("@tempots/std"),m=require("./translations-C81buKAw.cjs"),P=require("./notice-BNghd0oS.cjs"),C=require("./input-container-Di1YvVB_.cjs"),ee=require("./text-input-DL9FvpTZ.cjs"),te=require("./translations-Dbx7L7Q1.cjs"),oe=require("@tempots/ui"),T={google:{name:"Google",icon:"logos:google-icon",color:"#4285f4"},github:{name:"GitHub",icon:"logos:github-icon",color:"#333"},apple:{name:"Apple",icon:"logos:apple",color:"#000"},facebook:{name:"Facebook",icon:"logos:facebook",color:"#1877f2"},twitter:{name:"Twitter",icon:"logos:twitter",color:"#1da1f2"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"#00a4ef"},discord:{name:"Discord",icon:"logos:discord-icon",color:"#5865f2"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"#0077b5"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"#e4405f"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"#000"},snapchat:{name:"Snapchat",icon:"logos:snapchat-icon",color:"#fffc00"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"#ff4500"},pinterest:{name:"Pinterest",icon:"logos:pinterest-icon",color:"#bd081c"},twitch:{name:"Twitch",icon:"logos:twitch",color:"#9146ff"},steam:{name:"Steam",icon:"logos:steam-icon",color:"#000"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"#313131"},playstation:{name:"PlayStation",icon:"logos:playstation-icon",color:"#003791"},xbox:{name:"Xbox",icon:"logos:xbox-icon",color:"#107c10"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"#25d366"},wechat:{name:"WeChat",icon:"logos:wechat-icon",color:"#1aad19"},amazon:{name:"Amazon",icon:"logos:amazon-icon",color:"#ff9900"},yahoo:{name:"Yahoo",icon:"logos:yahoo-icon",color:"#720e9e"},paypal:{name:"PayPal",icon:"logos:paypal",color:"#0070ba"},x:{name:"X",icon:"simple-icons:x",color:"#000"}};function j(t){return T[t]?.name||t}function ae(t){return T[t]?.icon||"mdi:account"}function ne(t){return T[t]?.color||"#666"}function re(t,o="Continue with {provider}"){return o.replace("{provider}",j(t))}const y={minLength:8,requireUppercase:!0,requireLowercase:!0,requireNumbers:!0,requireSymbols:!1};function se(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function H(t=32){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let a=0;a<t;a++)n+=o.charAt(Math.floor(Math.random()*o.length));return n}function ie(t,o,n,a=[],c={}){const s={google:"https://accounts.google.com/oauth/authorize",github:"https://github.com/login/oauth/authorize",apple:"https://appleid.apple.com/auth/authorize",facebook:"https://www.facebook.com/v18.0/dialog/oauth",twitter:"https://twitter.com/i/oauth2/authorize",microsoft:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",discord:"https://discord.com/api/oauth2/authorize",linkedin:"https://www.linkedin.com/oauth/v2/authorization",instagram:"https://api.instagram.com/oauth/authorize",tiktok:"https://www.tiktok.com/v2/auth/authorize",snapchat:"https://accounts.snapchat.com/accounts/oauth2/authorize",reddit:"https://www.reddit.com/api/v1/authorize",pinterest:"https://api.pinterest.com/oauth/",twitch:"https://id.twitch.tv/oauth2/authorize",steam:"https://steamcommunity.com/oauth/authorize",epic:"https://auth.epicgames.com/authorize",playstation:"https://auth.api.sonyentertainmentnetwork.com/oauth/authorize",xbox:"https://login.live.com/oauth20_authorize.srf",whatsapp:"https://web.whatsapp.com/oauth/authorize",wechat:"https://open.weixin.qq.com/connect/qrconnect",amazon:"https://www.amazon.com/ap/oa",yahoo:"https://api.login.yahoo.com/oauth2/request_auth",paypal:"https://www.paypal.com/signin/authorize",x:"https://api.twitter.com/oauth2/authorize"},u={google:["openid","email","profile"],github:["user:email"],apple:["email","name"],facebook:["email"],twitter:["users.read"],microsoft:["openid","email","profile"],discord:["identify","email"],linkedin:["r_liteprofile","r_emailaddress"],instagram:["user_profile","user_media"],tiktok:["user.info.basic","user.external.id"],snapchat:["user.info.basic","user.external.id"],reddit:["identity","email"],pinterest:["read_public","read_relationships"],twitch:["openid","email","profile"],steam:["openid","email","profile"],epic:["openid","email","profile"],playstation:["openid","email","profile"],xbox:["openid","email","profile"],whatsapp:["openid","email","profile"],wechat:["openid","email","profile"],amazon:["openid","email","profile"],yahoo:["openid","email","profile"],paypal:["openid","email","profile"],x:["openid","email","profile"]},r=s[t];if(!r)throw new Error(`Unsupported provider: ${t}`);const l=a.length>0?a:u[t],i=H(),h=new URLSearchParams({client_id:o,redirect_uri:n,scope:l.join(" "),state:i,response_type:"code",...c});return`${r}?${h.toString()}`}function ce(t,o,n,a){const c=window.open(t,`${o}_login`,"width=500,height=600,scrollbars=yes,resizable=yes");if(!c){a?.(new Error("Failed to open popup window"));return}const s=setInterval(()=>{c.closed&&(clearInterval(s),a?.(new Error("Login cancelled")))},1e3),u=r=>{r.origin===window.location.origin&&(r.data.type==="SOCIAL_LOGIN_SUCCESS"?(clearInterval(s),c.close(),window.removeEventListener("message",u),n?.(r.data.result)):r.data.type==="SOCIAL_LOGIN_ERROR"&&(clearInterval(s),c.close(),window.removeEventListener("message",u),a?.(new Error(r.data.error))))};window.addEventListener("message",u)}function le(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unexpected error occurred"}function ue(){return typeof window<"u"&&typeof document<"u"}function $({task:t,message:o,onStart:n,onEnd:a}){return async c=>{n?.();const s=await L.taskToValidation({task:t!=null?()=>t(c):async()=>null,errorMessage:o,errorPath:["root"],validation:u=>u!=null?G.Validation.invalid({message:u}):G.Validation.valid});return a?.(),s}}function E(t=y,o){const n=o??m.defaultMessages;let a=f.string();return t.minLength&&(a=a.min(t.minLength,(n.passwordMinLength??m.defaultMessages.passwordMinLength)(t.minLength))),t.requireUppercase&&(a=a.regex(/[A-Z]/,n.passwordRequireUppercase??m.defaultMessages.passwordRequireUppercase)),t.requireLowercase&&(a=a.regex(/[a-z]/,n.passwordRequireLowercase??m.defaultMessages.passwordRequireLowercase)),t.requireNumbers&&(a=a.regex(/[0-9]/,n.passwordRequireNumber??m.defaultMessages.passwordRequireNumber)),t.requireSymbols&&(a=a.regex(/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/,n.passwordRequireSpecialChar??m.defaultMessages.passwordRequireSpecialChar)),t.customValidation&&(a=a.refine(c=>t.customValidation(c))),a}function A(t){const o=t??m.defaultMessages;return f.string().min(1,o.emailRequired??m.defaultMessages.emailRequired).email(o.invalidEmail??m.defaultMessages.invalidEmail)}const V=A();function M(t,o){const n=o??m.defaultMessages,a=t?E(t,o):f.string().refine(c=>c.length>0?null:n.passwordRequired??m.defaultMessages.passwordRequired);return f.object({email:A(o),password:a,rememberMe:f.boolean().default(!1)}).schema()}function z(t=y,o,n){const a=n??m.defaultMessages,c=E(t,n),s=o?.showNameField!==!1,u=o?.showConfirmPassword!==!1,r=o?.showAcceptTermsAndConditions!==!1,l={name:s?f.string().min(1,a.nameRequired??m.defaultMessages.nameRequired).optional():f.string().optional(),email:A(n),password:c,confirmPassword:u?f.string().min(1,a.confirmPasswordRequired??m.defaultMessages.confirmPasswordRequired):f.string(),acceptTerms:r?f.boolean().refine(h=>h===!0,a.acceptTermsRequired??m.defaultMessages.acceptTermsRequired):f.boolean().default(!0)},i=f.object(l);return u?i.refine(h=>h.password===h.confirmPassword?null:a.passwordsDoNotMatch??m.defaultMessages.passwordsDoNotMatch,{path:["confirmPassword"]}).schema():i.schema()}const N=f.object({email:V}).schema(),me=M(),de=z(),pe={signIn:M,signUp:z,resetPassword:()=>N};function he(t,o){const n=o??m.defaultMessages,c=(o?A(o):V).validate(t);return c.success?null:c.errors[0]?.message||(n.invalidEmailAddress??m.defaultMessages.invalidEmailAddress)}function ge(t,o=y,n){const a=n??m.defaultMessages,s=E(o,n).validate(t);return s.success?null:s.errors[0]?.message||(a.invalidPassword??m.defaultMessages.invalidPassword)}function R(t,o=y){const n={length:t.length>=(o.minLength||8),uppercase:/[A-Z]/.test(t),lowercase:/[a-z]/.test(t),numbers:/[0-9]/.test(t),symbols:/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(t),custom:o.customValidation?o.customValidation(t)===null:t.length>0},a=[!0,o.requireUppercase,o.requireLowercase,o.requireNumbers,o.requireSymbols,!!o.customValidation].filter(Boolean).length,c=[n.length,o.requireUppercase?n.uppercase:null,o.requireLowercase?n.lowercase:null,o.requireNumbers?n.numbers:null,o.requireSymbols?n.symbols:null,o.customValidation?n.custom:null].filter(r=>r===!0).length,s=a>0?Math.round(c/a*100):0;let u;return s<40?u="weak":s<60?u="fair":s<80?u="good":u="strong",{strength:u,score:s,checks:n}}const D=()=>e.localStorageProp({key:"bui_auth_email",defaultValue:null});function X({onSignIn:t,passwordRules:o,labels:n,showRememberMe:a}){const c=e.prop(!1),s=D(),u=M(o),r=L.useForm({schema:u,onSubmit:$({task:t,message:"Reset password failed",onStart:()=>{c.set(!0),r.controller.disable()},onEnd:()=>{c.set(!1),r.controller.enable()}}),initialValue:{email:"",password:""}}),{controller:l,submit:i}=r;c.on(l.setDisabled);const h=l.field("email"),w=l.field("password");return s.on(b=>{b!=null&&h.change(b)}),h.signal.on(b=>{s.value!=null&&(s.value=b)}),e.Use(m.AuthI18n,b=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(i),q.Stack(e.attr.class("bc-auth-form__fields"),e.Ensure(l.error,_=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(_))),L.Control(P.EmailInput,{controller:h,label:e.coalesce(n?.emailLabel,b.$.emailLabel)}),L.Control(P.PasswordInput,{controller:w,label:e.coalesce(n?.passwordLabel,b.$.passwordLabel)}),e.When(a??!0,()=>e.html.div(e.attr.class("bc-auth-form__remember-me"),e.html.label(e.attr.class("bc-auth-form__checkbox-label"),L.CheckboxInput({value:s.map(_=>_!=null),after:e.html.span(e.coalesce(n?.rememberMeLabel,b.$.rememberMeLabel)),onChange:_=>{_?s.value=h.signal.value??"":s.value=null}}))))),C.Button({type:"submit",variant:"filled",color:"primary",loading:c,disabled:l.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(n?.signInButton,b.$.signInButton))))}function Y({password:t,rules:o=y,showLabel:n=!0,className:a}){const c=e.computedOf(t)(i=>!i||i.length===0?{strength:"weak",score:0,checks:{length:!1,uppercase:!1,lowercase:!1,numbers:!1,symbols:!1,custom:!1}}:R(i,o)),s=c.map(i=>i.strength),u=c.map(i=>i.score),r=c.map(i=>i.checks),l=e.computedOf(s,a)((i,h)=>["bc-password-strength",`bc-password-strength--${i}`,h].filter(Boolean).join(" "));return e.html.div(e.attr.class(l),e.html.div(e.attr.class("bc-password-strength__bar"),e.html.div(e.attr.class("bc-password-strength__fill"),e.attr.style(u.map(i=>`width: ${i}%`)))),e.When(n,()=>e.Use(m.AuthI18n,i=>e.html.div(e.attr.class("bc-password-strength__label"),e.computedOf(s,i)((h,w)=>{switch(h){case"weak":return w.passwordStrengthWeak;case"fair":return w.passwordStrengthFair;case"good":return w.passwordStrengthGood;case"strong":return w.passwordStrengthStrong;default:return w.passwordStrengthWeak}})))),e.html.div(e.attr.class("bc-password-strength__requirements"),e.When(o.minLength!==void 0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.length?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.length?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),`At least ${o.minLength} characters`))),e.When(o.requireUppercase===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.uppercase?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.uppercase?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One uppercase letter"))),e.When(o.requireLowercase===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.lowercase?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.lowercase?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One lowercase letter"))),e.When(o.requireNumbers===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.numbers?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.numbers?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One number"))),e.When(o.requireSymbols===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.symbols?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.symbols?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One special character")))))}function fe({password:t,rules:o=y,className:n}){const a=e.computedOf(t)(r=>!r||r.length===0?{strength:"weak",score:0}:R(r,o)),c=a.map(r=>r.strength),s=a.map(r=>r.score),u=e.computedOf(c,n)((r,l)=>["bc-password-strength-bar",`bc-password-strength-bar--${r}`,l].filter(Boolean).join(" "));return e.html.div(e.attr.class(u),e.html.div(e.attr.class("bc-password-strength-bar__fill"),e.attr.style(s.map(r=>`width: ${r}%`))))}function we({password:t,rules:o=y,className:n}){const a=e.computedOf(t)(s=>!s||s.length===0?"weak":R(s,o).strength),c=e.computedOf(a,n)((s,u)=>["bc-password-strength-text",`bc-password-strength-text--${s}`,u].filter(Boolean).join(" "));return e.Use(m.AuthI18n,s=>e.html.span(e.attr.class(c),e.computedOf(a,s)((u,r)=>{switch(u){case"weak":return r.passwordStrengthWeak;case"fair":return r.passwordStrengthFair;case"good":return r.passwordStrengthGood;case"strong":return r.passwordStrengthStrong;default:return r.passwordStrengthWeak}})))}function Z({passwordRules:t,labels:o,initialEmail:n,initialName:a,showPasswordStrength:c,onSignUp:s,showNameField:u,showConfirmPassword:r,showAcceptTermsAndConditions:l,termsAndConditions:i}){const h=e.prop(!1),w=t||y,b=z(w,{showNameField:u!==!1,showConfirmPassword:r!==!1,showAcceptTermsAndConditions:l!==!1}),_=L.useForm({schema:b,onSubmit:$({task:s!=null?g=>s({email:g.email,password:g.password,name:g.name,acceptTerms:g.acceptTerms}):void 0,message:"Reset password failed",onStart:()=>{h.set(!0),_.controller.disable()},onEnd:()=>{h.set(!1),_.controller.enable()}}),initialValue:{name:a??"",email:n??"",password:"",confirmPassword:"",acceptTerms:!1}}),{controller:v,submit:U}=_;h.on(v.setDisabled);const B=v.field("name"),S=v.field("email"),x=v.field("password"),O=v.field("confirmPassword"),I=v.field("acceptTerms");return e.Use(m.AuthI18n,g=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(U),q.Stack(e.attr.class("bc-auth-form__fields"),e.Ensure(v.error,k=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(k))),e.When(u!==!1,()=>L.Control(ee.TextInput,{controller:B.transform(k=>k??"",k=>k===""?void 0:k),label:e.coalesce(o?.nameLabel,g.$.nameLabel)})),L.Control(P.EmailInput,{controller:S,label:e.coalesce(o?.emailLabel,g.$.emailLabel)}),L.Control(P.PasswordInput,{controller:x,label:e.coalesce(o?.passwordLabel,g.$.passwordLabel)}),e.When(c??!1,()=>Y({password:x.signal,rules:w,showLabel:!0})),e.When(r??!1,()=>L.Control(P.PasswordInput,{controller:O,label:e.coalesce(o?.confirmPasswordLabel,g.$.confirmPasswordLabel)})),e.When(l??!1,()=>e.html.div(e.attr.class("bc-auth-form__terms"),e.html.label(e.attr.class("bc-auth-form__checkbox-label"),L.CheckboxInput({value:I.signal.map(k=>k??!1),onChange:k=>I.change(k)}),e.html.span(i||e.coalesce(o?.acceptTermsLabel,g.$.acceptTermsLabel))),e.When(I.errorVisible,()=>e.html.div(e.attr.class("bc-auth-form__field-error"),I.error.map(k=>k||"")))))),C.Button({type:"submit",variant:"filled",color:"primary",loading:h,disabled:v.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(o?.signUpButton,g.$.signUpButton))))}function J({onResetPassword:t,labels:o={}}){const n=D(),a=e.prop(!1),c=L.useForm({schema:N,onSubmit:$({task:t,message:"Reset password failed",onStart:()=>{a.set(!0),c.controller.disable()},onEnd:()=>{a.set(!1),c.controller.enable()}}),initialValue:{email:""}}),{controller:s,submit:u}=c;a.on(s.setDisabled);const r=s.field("email");return n.on(l=>{l!=null&&r.change(l)}),e.Use(m.AuthI18n,l=>e.html.form(e.attr.class("bc-auth-form__form"),e.Ensure(s.error,i=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(i))),e.html.p(e.attr.class("bc-auth-form__description"),e.coalesce(o?.resetPasswordDescription,l.$.resetPasswordDescription)),e.on.submit(u),q.Stack(e.attr.class("bc-auth-form__fields"),L.Control(P.EmailInput,{controller:r,label:e.coalesce(o?.emailLabel,l.$.emailLabel)})),C.Button({loading:a,type:"submit",variant:"filled",color:"primary",disabled:s.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(o?.resetPasswordButton,l.$.resetPasswordButton))))}function p({provider:t,onClick:o,size:n="md",name:a,icon:c,color:s,flow:u,labels:r}){const l=async()=>{if(o)try{u==="popup"?await o():await o()}catch(i){console.error(`Social login error for ${t} (${u||"redirect"} flow):`,i)}};return C.Button({type:"button",variant:"filled",size:n,color:s,onClick:l,roundedness:"full"},e.attr.class("bc-social-login-button"),e.attr.class(e.computedOf(t)(i=>`bc-social-login-button--${i}`)),e.html.span(e.attr.class("bc-social-login-button__inner"),e.html.span(e.attr.class("bc-social-login-button__icon"),te.Icon({icon:c,size:n},e.attr.class("bc-social-login-button__icon-inner"))),e.Use(m.AuthI18n,i=>e.html.span(e.attr.class("bc-social-login-button__label"),e.bind(e.coalesce(r?.continueWithProvider,i.$.continueWithProvider))(a)))))}function K({providers:t,onProviderClick:o,size:n="md",className:a}){return q.Stack(e.attr.class("bc-social-login-buttons"),e.attr.class(a),e.ForEach(t,c=>p({provider:c.$.provider,flow:c.$.flow,color:c.map(({provider:s})=>d[s].color),name:c.map(({provider:s})=>d[s].name),icon:c.map(({provider:s})=>d[s].icon),onClick:async()=>{o&&await o(c.$.provider.value)},size:n})))}const d={google:{name:"Google",icon:"logos:google-icon",color:"red"},github:{name:"GitHub",icon:"logos:github-icon",color:"black"},apple:{name:"Apple",icon:"logos:apple",color:"stone"},facebook:{name:"Facebook",icon:"logos:facebook",color:"blue"},twitter:{name:"Twitter",icon:"logos:twitter",color:"sky"},x:{name:"X",icon:"logos:x",color:"zinc"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"amber"},discord:{name:"Discord",icon:"logos:discord-icon",color:"indigo"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"cyan"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"fuchsia"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"teal"},snapchat:{name:"Snapchat",icon:"simple-icons:snapchat",color:"yellow"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"orange"},pinterest:{name:"Pinterest",icon:"logos:pinterest",color:"rose"},twitch:{name:"Twitch",icon:"logos:twitch",color:"purple"},steam:{name:"Steam",icon:"logos:steam",color:"slate"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"neutral"},playstation:{name:"PlayStation",icon:"simple-icons:playstation",color:"violet"},xbox:{name:"Xbox",icon:"simple-icons:xbox",color:"green"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"emerald"},wechat:{name:"WeChat",icon:"simple-icons:wechat",color:"lime"},amazon:{name:"Amazon",icon:"simple-icons:amazon",color:"red"},yahoo:{name:"Yahoo",icon:"logos:yahoo",color:"rose"},paypal:{name:"PayPal",icon:"logos:paypal",color:"blue"}},be=t=>p({...t,...d.google,provider:"google"}),Le=t=>p({...t,...d.github,provider:"github"}),_e=t=>p({...t,...d.apple,provider:"apple"}),ke=t=>p({...t,...d.facebook,provider:"facebook"}),ve=t=>p({...t,...d.x,provider:"x"}),Se=t=>p({...t,...d.twitter,provider:"twitter"}),Pe=t=>p({...t,...d.microsoft,provider:"microsoft"}),ye=t=>p({...t,...d.discord,provider:"discord"}),Be=t=>p({...t,...d.linkedin,provider:"linkedin"}),qe=t=>p({...t,...d.instagram,provider:"instagram"}),Ie=t=>p({...t,...d.tiktok,provider:"tiktok"}),xe=t=>p({...t,...d.snapchat,provider:"snapchat"}),Ae=t=>p({...t,...d.reddit,provider:"reddit"}),Ce=t=>p({...t,...d.pinterest,provider:"pinterest"}),Te=t=>p({...t,...d.twitch,provider:"twitch"}),$e=t=>p({...t,...d.steam,provider:"steam"}),Ee=t=>p({...t,...d.epic,provider:"epic"}),Me=t=>p({...t,...d.playstation,provider:"playstation"}),ze=t=>p({...t,...d.xbox,provider:"xbox"}),Re=t=>p({...t,...d.whatsapp,provider:"whatsapp"}),Ue=t=>p({...t,...d.wechat,provider:"wechat"}),Oe=t=>p({...t,...d.amazon,provider:"amazon"}),We=t=>p({...t,...d.yahoo,provider:"yahoo"}),Fe=t=>p({...t,...d.paypal,provider:"paypal"});function W({providers:t,onSocialLogin:o}){return q.Stack(K({providers:t,onProviderClick:o}))}function Q({mode:t,socialProviders:o,initialName:n,initialEmail:a,passwordRules:c,showRememberMe:s,showSocialDivider:u,showPasswordStrength:r,labels:l,onSignIn:i,onSignUp:h,onResetPassword:w,onModeChange:b,onSocialLogin:_,showContainer:v},...U){const B=t!=null?e.Value.deriveProp(t):e.prop("signin");return B.on(S=>b?.(S)),e.Use(m.AuthI18n,S=>{function x(){const g=e.coalesce(l?.hasAccountLink,S.$.hasAccountLink);return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("signin")),g)}function O(){return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("signup")),e.coalesce(l?.noAccountLink,S.$.noAccountLink))}function I(){return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("reset-password")),e.coalesce(l?.forgotPasswordLink,S.$.forgotPasswordLink))}return e.html.div(oe.classes({"bc-auth-container":!0,"bc-auth-container--styled":e.Value.map(v??!0,g=>g)}),e.attr.class(B.map(g=>`bc-auth-container--${g}`)),e.attr.class("bc-auth-form"),e.OneOfValue(B,{signin:()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.signInTitle,S.$.signInTitle)),o!=null?e.Fragment(W({providers:o,onSocialLogin:_}),e.When(u??!1,F)):null,X({onSignIn:i,showRememberMe:s,passwordRules:c,labels:{emailLabel:l?.emailLabel,passwordLabel:l?.passwordLabel,rememberMeLabel:l?.rememberMeLabel,signInButton:l?.signInButton,forgotPasswordLink:l?.forgotPasswordLink,noAccountLink:l?.noAccountLink}}),q.Stack(e.attr.class("bc-auth-form__footer"),O(),I())),signup:()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.signUpTitle,S.$.signUpTitle)),o!=null?e.Fragment(W({providers:o,onSocialLogin:_}),e.When(u??!1,F)):null,Z({labels:{nameLabel:l?.nameLabel,emailLabel:l?.emailLabel,passwordLabel:l?.passwordLabel,confirmPasswordLabel:l?.confirmPasswordLabel,acceptTermsLabel:l?.acceptTermsLabel,signUpButton:l?.signUpButton,hasAccountLink:l?.hasAccountLink},initialEmail:a,initialName:n,onSignUp:h,passwordRules:c,showPasswordStrength:r}),q.Stack(e.attr.class("bc-auth-form__footer"),x())),"reset-password":()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.resetPasswordTitle,S.$.resetPasswordTitle)),J({labels:{backToSignInLink:l?.backToSignInLink,emailLabel:l?.emailLabel,resetPasswordButton:l?.resetPasswordButton,resetPasswordDescription:l?.resetPasswordDescription},onResetPassword:w}),q.Stack(e.attr.class("bc-auth-form__footer"),x()))}),...U)})}function Ve(t){return f.Modal({size:"sm",dismissable:!0,showCloseButton:!0},(o,n)=>t(a=>o({body:Q({showContainer:!1,...a}),header:e.Use(m.AuthI18n,c=>e.coalesce(a.modalTitle,c.$.authenticationTitle))})))}function F({labels:t,className:o}={}){return e.html.div(e.attr.class("bc-auth-divider"),e.attr.class(o),e.html.div(e.attr.class("bc-auth-divider__line")),e.Use(m.AuthI18n,n=>e.html.span(e.attr.class("bc-auth-divider__text"),e.coalesce(t?.text,n.$.orDivider))),e.html.div(e.attr.class("bc-auth-divider__line")))}exports.AmazonLoginButton=Oe;exports.AppleLoginButton=_e;exports.AuthContainer=Q;exports.AuthDivider=F;exports.AuthModal=Ve;exports.DiscordLoginButton=ye;exports.EpicLoginButton=Ee;exports.FacebookLoginButton=ke;exports.GitHubLoginButton=Le;exports.GoogleLoginButton=be;exports.InstagramLoginButton=qe;exports.LinkedInLoginButton=Be;exports.MicrosoftLoginButton=Pe;exports.PasswordStrengthBar=fe;exports.PasswordStrengthIndicator=Y;exports.PasswordStrengthText=we;exports.PayPalLoginButton=Fe;exports.PinterestLoginButton=Ce;exports.PlayStationLoginButton=Me;exports.RedditLoginButton=Ae;exports.ResetPasswordForm=J;exports.SignInForm=X;exports.SignUpForm=Z;exports.SnapchatLoginButton=xe;exports.SocialLoginButton=p;exports.SocialLoginButtons=K;exports.SocialProviders=W;exports.SteamLoginButton=$e;exports.TiktokLoginButton=Ie;exports.TwitchLoginButton=Te;exports.TwitterLoginButton=Se;exports.WeChatLoginButton=Ue;exports.WhatsAppLoginButton=Re;exports.XLoginButtin=ve;exports.XboxLoginButton=ze;exports.YahooLoginButton=We;exports.authSchemas=pe;exports.calculatePasswordStrength=R;exports.createEmailSchema=A;exports.createPasswordSchema=E;exports.createSignInSchema=M;exports.createSignUpSchema=z;exports.createSocialLoginUrl=ie;exports.defaultPasswordRules=y;exports.defaultSignInSchema=me;exports.defaultSignUpSchema=de;exports.emailSchema=V;exports.formatAuthError=le;exports.formatProviderName=j;exports.formatSocialLoginText=re;exports.generateRandomString=H;exports.getProviderColor=ne;exports.getProviderIcon=ae;exports.isBrowser=ue;exports.isValidEmail=se;exports.openSocialLoginPopup=ce;exports.providerInfo=T;exports.requestToControllerValidation=$;exports.resetPasswordSchema=N;exports.socialProviderInfo=d;exports.useAuthEmailProp=D;exports.validateEmail=he;exports.validatePassword=ge;
|
|
1
|
+
"use strict";const e=require("@tempots/dom"),q=require("./stack-dwLevGa2.cjs"),L=require("./use-form-Ca0kF4af.cjs"),f=require("./modal-ClnvWxzi.cjs"),G=require("@tempots/std"),m=require("./translations-D8Jwi_d0.cjs"),P=require("./notice-dOOD80F7.cjs"),C=require("./input-container-BZwpJgx6.cjs"),ee=require("./text-input-CynkbBpH.cjs"),te=require("./translations-BDGa_4jx.cjs"),oe=require("@tempots/ui"),T={google:{name:"Google",icon:"logos:google-icon",color:"#4285f4"},github:{name:"GitHub",icon:"logos:github-icon",color:"#333"},apple:{name:"Apple",icon:"logos:apple",color:"#000"},facebook:{name:"Facebook",icon:"logos:facebook",color:"#1877f2"},twitter:{name:"Twitter",icon:"logos:twitter",color:"#1da1f2"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"#00a4ef"},discord:{name:"Discord",icon:"logos:discord-icon",color:"#5865f2"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"#0077b5"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"#e4405f"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"#000"},snapchat:{name:"Snapchat",icon:"logos:snapchat-icon",color:"#fffc00"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"#ff4500"},pinterest:{name:"Pinterest",icon:"logos:pinterest-icon",color:"#bd081c"},twitch:{name:"Twitch",icon:"logos:twitch",color:"#9146ff"},steam:{name:"Steam",icon:"logos:steam-icon",color:"#000"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"#313131"},playstation:{name:"PlayStation",icon:"logos:playstation-icon",color:"#003791"},xbox:{name:"Xbox",icon:"logos:xbox-icon",color:"#107c10"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"#25d366"},wechat:{name:"WeChat",icon:"logos:wechat-icon",color:"#1aad19"},amazon:{name:"Amazon",icon:"logos:amazon-icon",color:"#ff9900"},yahoo:{name:"Yahoo",icon:"logos:yahoo-icon",color:"#720e9e"},paypal:{name:"PayPal",icon:"logos:paypal",color:"#0070ba"},x:{name:"X",icon:"simple-icons:x",color:"#000"}};function j(t){return T[t]?.name||t}function ae(t){return T[t]?.icon||"mdi:account"}function ne(t){return T[t]?.color||"#666"}function re(t,o="Continue with {provider}"){return o.replace("{provider}",j(t))}const y={minLength:8,requireUppercase:!0,requireLowercase:!0,requireNumbers:!0,requireSymbols:!1};function se(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function H(t=32){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let a=0;a<t;a++)n+=o.charAt(Math.floor(Math.random()*o.length));return n}function ie(t,o,n,a=[],c={}){const s={google:"https://accounts.google.com/oauth/authorize",github:"https://github.com/login/oauth/authorize",apple:"https://appleid.apple.com/auth/authorize",facebook:"https://www.facebook.com/v18.0/dialog/oauth",twitter:"https://twitter.com/i/oauth2/authorize",microsoft:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",discord:"https://discord.com/api/oauth2/authorize",linkedin:"https://www.linkedin.com/oauth/v2/authorization",instagram:"https://api.instagram.com/oauth/authorize",tiktok:"https://www.tiktok.com/v2/auth/authorize",snapchat:"https://accounts.snapchat.com/accounts/oauth2/authorize",reddit:"https://www.reddit.com/api/v1/authorize",pinterest:"https://api.pinterest.com/oauth/",twitch:"https://id.twitch.tv/oauth2/authorize",steam:"https://steamcommunity.com/oauth/authorize",epic:"https://auth.epicgames.com/authorize",playstation:"https://auth.api.sonyentertainmentnetwork.com/oauth/authorize",xbox:"https://login.live.com/oauth20_authorize.srf",whatsapp:"https://web.whatsapp.com/oauth/authorize",wechat:"https://open.weixin.qq.com/connect/qrconnect",amazon:"https://www.amazon.com/ap/oa",yahoo:"https://api.login.yahoo.com/oauth2/request_auth",paypal:"https://www.paypal.com/signin/authorize",x:"https://api.twitter.com/oauth2/authorize"},u={google:["openid","email","profile"],github:["user:email"],apple:["email","name"],facebook:["email"],twitter:["users.read"],microsoft:["openid","email","profile"],discord:["identify","email"],linkedin:["r_liteprofile","r_emailaddress"],instagram:["user_profile","user_media"],tiktok:["user.info.basic","user.external.id"],snapchat:["user.info.basic","user.external.id"],reddit:["identity","email"],pinterest:["read_public","read_relationships"],twitch:["openid","email","profile"],steam:["openid","email","profile"],epic:["openid","email","profile"],playstation:["openid","email","profile"],xbox:["openid","email","profile"],whatsapp:["openid","email","profile"],wechat:["openid","email","profile"],amazon:["openid","email","profile"],yahoo:["openid","email","profile"],paypal:["openid","email","profile"],x:["openid","email","profile"]},r=s[t];if(!r)throw new Error(`Unsupported provider: ${t}`);const l=a.length>0?a:u[t],i=H(),h=new URLSearchParams({client_id:o,redirect_uri:n,scope:l.join(" "),state:i,response_type:"code",...c});return`${r}?${h.toString()}`}function ce(t,o,n,a){const c=window.open(t,`${o}_login`,"width=500,height=600,scrollbars=yes,resizable=yes");if(!c){a?.(new Error("Failed to open popup window"));return}const s=setInterval(()=>{c.closed&&(clearInterval(s),a?.(new Error("Login cancelled")))},1e3),u=r=>{r.origin===window.location.origin&&(r.data.type==="SOCIAL_LOGIN_SUCCESS"?(clearInterval(s),c.close(),window.removeEventListener("message",u),n?.(r.data.result)):r.data.type==="SOCIAL_LOGIN_ERROR"&&(clearInterval(s),c.close(),window.removeEventListener("message",u),a?.(new Error(r.data.error))))};window.addEventListener("message",u)}function le(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unexpected error occurred"}function ue(){return typeof window<"u"&&typeof document<"u"}function $({task:t,message:o,onStart:n,onEnd:a}){return async c=>{n?.();const s=await L.taskToValidation({task:t!=null?()=>t(c):async()=>null,errorMessage:o,errorPath:["root"],validation:u=>u!=null?G.Validation.invalid({message:u}):G.Validation.valid});return a?.(),s}}function E(t=y,o){const n=o??m.defaultMessages;let a=f.string();return t.minLength&&(a=a.min(t.minLength,(n.passwordMinLength??m.defaultMessages.passwordMinLength)(t.minLength))),t.requireUppercase&&(a=a.regex(/[A-Z]/,n.passwordRequireUppercase??m.defaultMessages.passwordRequireUppercase)),t.requireLowercase&&(a=a.regex(/[a-z]/,n.passwordRequireLowercase??m.defaultMessages.passwordRequireLowercase)),t.requireNumbers&&(a=a.regex(/[0-9]/,n.passwordRequireNumber??m.defaultMessages.passwordRequireNumber)),t.requireSymbols&&(a=a.regex(/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/,n.passwordRequireSpecialChar??m.defaultMessages.passwordRequireSpecialChar)),t.customValidation&&(a=a.refine(c=>t.customValidation(c))),a}function A(t){const o=t??m.defaultMessages;return f.string().min(1,o.emailRequired??m.defaultMessages.emailRequired).email(o.invalidEmail??m.defaultMessages.invalidEmail)}const V=A();function M(t,o){const n=o??m.defaultMessages,a=t?E(t,o):f.string().refine(c=>c.length>0?null:n.passwordRequired??m.defaultMessages.passwordRequired);return f.object({email:A(o),password:a,rememberMe:f.boolean().default(!1)}).schema()}function z(t=y,o,n){const a=n??m.defaultMessages,c=E(t,n),s=o?.showNameField!==!1,u=o?.showConfirmPassword!==!1,r=o?.showAcceptTermsAndConditions!==!1,l={name:s?f.string().min(1,a.nameRequired??m.defaultMessages.nameRequired).optional():f.string().optional(),email:A(n),password:c,confirmPassword:u?f.string().min(1,a.confirmPasswordRequired??m.defaultMessages.confirmPasswordRequired):f.string(),acceptTerms:r?f.boolean().refine(h=>h===!0,a.acceptTermsRequired??m.defaultMessages.acceptTermsRequired):f.boolean().default(!0)},i=f.object(l);return u?i.refine(h=>h.password===h.confirmPassword?null:a.passwordsDoNotMatch??m.defaultMessages.passwordsDoNotMatch,{path:["confirmPassword"]}).schema():i.schema()}const N=f.object({email:V}).schema(),me=M(),de=z(),pe={signIn:M,signUp:z,resetPassword:()=>N};function he(t,o){const n=o??m.defaultMessages,c=(o?A(o):V).validate(t);return c.success?null:c.errors[0]?.message||(n.invalidEmailAddress??m.defaultMessages.invalidEmailAddress)}function ge(t,o=y,n){const a=n??m.defaultMessages,s=E(o,n).validate(t);return s.success?null:s.errors[0]?.message||(a.invalidPassword??m.defaultMessages.invalidPassword)}function R(t,o=y){const n={length:t.length>=(o.minLength||8),uppercase:/[A-Z]/.test(t),lowercase:/[a-z]/.test(t),numbers:/[0-9]/.test(t),symbols:/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(t),custom:o.customValidation?o.customValidation(t)===null:t.length>0},a=[!0,o.requireUppercase,o.requireLowercase,o.requireNumbers,o.requireSymbols,!!o.customValidation].filter(Boolean).length,c=[n.length,o.requireUppercase?n.uppercase:null,o.requireLowercase?n.lowercase:null,o.requireNumbers?n.numbers:null,o.requireSymbols?n.symbols:null,o.customValidation?n.custom:null].filter(r=>r===!0).length,s=a>0?Math.round(c/a*100):0;let u;return s<40?u="weak":s<60?u="fair":s<80?u="good":u="strong",{strength:u,score:s,checks:n}}const D=()=>e.localStorageProp({key:"bui_auth_email",defaultValue:null});function X({onSignIn:t,passwordRules:o,labels:n,showRememberMe:a}){const c=e.prop(!1),s=D(),u=M(o),r=L.useForm({schema:u,onSubmit:$({task:t,message:"Reset password failed",onStart:()=>{c.set(!0),r.controller.disable()},onEnd:()=>{c.set(!1),r.controller.enable()}}),initialValue:{email:"",password:""}}),{controller:l,submit:i}=r;c.on(l.setDisabled);const h=l.field("email"),w=l.field("password");return s.on(b=>{b!=null&&h.change(b)}),h.signal.on(b=>{s.value!=null&&(s.value=b)}),e.Use(m.AuthI18n,b=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(i),q.Stack(e.attr.class("bc-auth-form__fields"),e.Ensure(l.error,_=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(_))),L.Control(P.EmailInput,{controller:h,label:e.coalesce(n?.emailLabel,b.$.emailLabel)}),L.Control(P.PasswordInput,{controller:w,label:e.coalesce(n?.passwordLabel,b.$.passwordLabel)}),e.When(a??!0,()=>e.html.div(e.attr.class("bc-auth-form__remember-me"),e.html.label(e.attr.class("bc-auth-form__checkbox-label"),L.CheckboxInput({value:s.map(_=>_!=null),after:e.html.span(e.coalesce(n?.rememberMeLabel,b.$.rememberMeLabel)),onChange:_=>{_?s.value=h.signal.value??"":s.value=null}}))))),C.Button({type:"submit",variant:"filled",color:"primary",loading:c,disabled:l.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(n?.signInButton,b.$.signInButton))))}function Y({password:t,rules:o=y,showLabel:n=!0,className:a}){const c=e.computedOf(t)(i=>!i||i.length===0?{strength:"weak",score:0,checks:{length:!1,uppercase:!1,lowercase:!1,numbers:!1,symbols:!1,custom:!1}}:R(i,o)),s=c.map(i=>i.strength),u=c.map(i=>i.score),r=c.map(i=>i.checks),l=e.computedOf(s,a)((i,h)=>["bc-password-strength",`bc-password-strength--${i}`,h].filter(Boolean).join(" "));return e.html.div(e.attr.class(l),e.html.div(e.attr.class("bc-password-strength__bar"),e.html.div(e.attr.class("bc-password-strength__fill"),e.attr.style(u.map(i=>`width: ${i}%`)))),e.When(n,()=>e.Use(m.AuthI18n,i=>e.html.div(e.attr.class("bc-password-strength__label"),e.computedOf(s,i)((h,w)=>{switch(h){case"weak":return w.passwordStrengthWeak;case"fair":return w.passwordStrengthFair;case"good":return w.passwordStrengthGood;case"strong":return w.passwordStrengthStrong;default:return w.passwordStrengthWeak}})))),e.html.div(e.attr.class("bc-password-strength__requirements"),e.When(o.minLength!==void 0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.length?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.length?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),`At least ${o.minLength} characters`))),e.When(o.requireUppercase===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.uppercase?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.uppercase?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One uppercase letter"))),e.When(o.requireLowercase===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.lowercase?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.lowercase?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One lowercase letter"))),e.When(o.requireNumbers===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.numbers?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.numbers?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One number"))),e.When(o.requireSymbols===!0,()=>e.html.div(e.attr.class("bc-password-strength__requirement"),e.attr.class(e.computedOf(r)(i=>i.symbols?"bc-password-strength__requirement--met":"")),e.html.span(e.attr.class("bc-password-strength__requirement-icon"),e.computedOf(r)(i=>i.symbols?"✓":"○")),e.html.span(e.attr.class("bc-password-strength__requirement-text"),"One special character")))))}function fe({password:t,rules:o=y,className:n}){const a=e.computedOf(t)(r=>!r||r.length===0?{strength:"weak",score:0}:R(r,o)),c=a.map(r=>r.strength),s=a.map(r=>r.score),u=e.computedOf(c,n)((r,l)=>["bc-password-strength-bar",`bc-password-strength-bar--${r}`,l].filter(Boolean).join(" "));return e.html.div(e.attr.class(u),e.html.div(e.attr.class("bc-password-strength-bar__fill"),e.attr.style(s.map(r=>`width: ${r}%`))))}function we({password:t,rules:o=y,className:n}){const a=e.computedOf(t)(s=>!s||s.length===0?"weak":R(s,o).strength),c=e.computedOf(a,n)((s,u)=>["bc-password-strength-text",`bc-password-strength-text--${s}`,u].filter(Boolean).join(" "));return e.Use(m.AuthI18n,s=>e.html.span(e.attr.class(c),e.computedOf(a,s)((u,r)=>{switch(u){case"weak":return r.passwordStrengthWeak;case"fair":return r.passwordStrengthFair;case"good":return r.passwordStrengthGood;case"strong":return r.passwordStrengthStrong;default:return r.passwordStrengthWeak}})))}function Z({passwordRules:t,labels:o,initialEmail:n,initialName:a,showPasswordStrength:c,onSignUp:s,showNameField:u,showConfirmPassword:r,showAcceptTermsAndConditions:l,termsAndConditions:i}){const h=e.prop(!1),w=t||y,b=z(w,{showNameField:u!==!1,showConfirmPassword:r!==!1,showAcceptTermsAndConditions:l!==!1}),_=L.useForm({schema:b,onSubmit:$({task:s!=null?g=>s({email:g.email,password:g.password,name:g.name,acceptTerms:g.acceptTerms}):void 0,message:"Reset password failed",onStart:()=>{h.set(!0),_.controller.disable()},onEnd:()=>{h.set(!1),_.controller.enable()}}),initialValue:{name:a??"",email:n??"",password:"",confirmPassword:"",acceptTerms:!1}}),{controller:v,submit:U}=_;h.on(v.setDisabled);const B=v.field("name"),S=v.field("email"),x=v.field("password"),O=v.field("confirmPassword"),I=v.field("acceptTerms");return e.Use(m.AuthI18n,g=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(U),q.Stack(e.attr.class("bc-auth-form__fields"),e.Ensure(v.error,k=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(k))),e.When(u!==!1,()=>L.Control(ee.TextInput,{controller:B.transform(k=>k??"",k=>k===""?void 0:k),label:e.coalesce(o?.nameLabel,g.$.nameLabel)})),L.Control(P.EmailInput,{controller:S,label:e.coalesce(o?.emailLabel,g.$.emailLabel)}),L.Control(P.PasswordInput,{controller:x,label:e.coalesce(o?.passwordLabel,g.$.passwordLabel)}),e.When(c??!1,()=>Y({password:x.signal,rules:w,showLabel:!0})),e.When(r??!1,()=>L.Control(P.PasswordInput,{controller:O,label:e.coalesce(o?.confirmPasswordLabel,g.$.confirmPasswordLabel)})),e.When(l??!1,()=>e.html.div(e.attr.class("bc-auth-form__terms"),e.html.label(e.attr.class("bc-auth-form__checkbox-label"),L.CheckboxInput({value:I.signal.map(k=>k??!1),onChange:k=>I.change(k)}),e.html.span(i||e.coalesce(o?.acceptTermsLabel,g.$.acceptTermsLabel))),e.When(I.errorVisible,()=>e.html.div(e.attr.class("bc-auth-form__field-error"),I.error.map(k=>k||"")))))),C.Button({type:"submit",variant:"filled",color:"primary",loading:h,disabled:v.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(o?.signUpButton,g.$.signUpButton))))}function J({onResetPassword:t,labels:o={}}){const n=D(),a=e.prop(!1),c=L.useForm({schema:N,onSubmit:$({task:t,message:"Reset password failed",onStart:()=>{a.set(!0),c.controller.disable()},onEnd:()=>{a.set(!1),c.controller.enable()}}),initialValue:{email:""}}),{controller:s,submit:u}=c;a.on(s.setDisabled);const r=s.field("email");return n.on(l=>{l!=null&&r.change(l)}),e.Use(m.AuthI18n,l=>e.html.form(e.attr.class("bc-auth-form__form"),e.Ensure(s.error,i=>P.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(i))),e.html.p(e.attr.class("bc-auth-form__description"),e.coalesce(o?.resetPasswordDescription,l.$.resetPasswordDescription)),e.on.submit(u),q.Stack(e.attr.class("bc-auth-form__fields"),L.Control(P.EmailInput,{controller:r,label:e.coalesce(o?.emailLabel,l.$.emailLabel)})),C.Button({loading:a,type:"submit",variant:"filled",color:"primary",disabled:s.disabledOrHasErrors},e.attr.class("bc-auth-form__submit"),e.coalesce(o?.resetPasswordButton,l.$.resetPasswordButton))))}function p({provider:t,onClick:o,size:n="md",name:a,icon:c,color:s,flow:u,labels:r}){const l=async()=>{if(o)try{u==="popup"?await o():await o()}catch(i){console.error(`Social login error for ${t} (${u||"redirect"} flow):`,i)}};return C.Button({type:"button",variant:"filled",size:n,color:s,onClick:l,roundedness:"full"},e.attr.class("bc-social-login-button"),e.attr.class(e.computedOf(t)(i=>`bc-social-login-button--${i}`)),e.html.span(e.attr.class("bc-social-login-button__inner"),e.html.span(e.attr.class("bc-social-login-button__icon"),te.Icon({icon:c,size:n},e.attr.class("bc-social-login-button__icon-inner"))),e.Use(m.AuthI18n,i=>e.html.span(e.attr.class("bc-social-login-button__label"),e.bind(e.coalesce(r?.continueWithProvider,i.$.continueWithProvider))(a)))))}function K({providers:t,onProviderClick:o,size:n="md",className:a}){return q.Stack(e.attr.class("bc-social-login-buttons"),e.attr.class(a),e.ForEach(t,c=>p({provider:c.$.provider,flow:c.$.flow,color:c.map(({provider:s})=>d[s].color),name:c.map(({provider:s})=>d[s].name),icon:c.map(({provider:s})=>d[s].icon),onClick:async()=>{o&&await o(c.$.provider.value)},size:n})))}const d={google:{name:"Google",icon:"logos:google-icon",color:"red"},github:{name:"GitHub",icon:"logos:github-icon",color:"black"},apple:{name:"Apple",icon:"logos:apple",color:"stone"},facebook:{name:"Facebook",icon:"logos:facebook",color:"blue"},twitter:{name:"Twitter",icon:"logos:twitter",color:"sky"},x:{name:"X",icon:"logos:x",color:"zinc"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"amber"},discord:{name:"Discord",icon:"logos:discord-icon",color:"indigo"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"cyan"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"fuchsia"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"teal"},snapchat:{name:"Snapchat",icon:"simple-icons:snapchat",color:"yellow"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"orange"},pinterest:{name:"Pinterest",icon:"logos:pinterest",color:"rose"},twitch:{name:"Twitch",icon:"logos:twitch",color:"purple"},steam:{name:"Steam",icon:"logos:steam",color:"slate"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"neutral"},playstation:{name:"PlayStation",icon:"simple-icons:playstation",color:"violet"},xbox:{name:"Xbox",icon:"simple-icons:xbox",color:"green"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"emerald"},wechat:{name:"WeChat",icon:"simple-icons:wechat",color:"lime"},amazon:{name:"Amazon",icon:"simple-icons:amazon",color:"red"},yahoo:{name:"Yahoo",icon:"logos:yahoo",color:"rose"},paypal:{name:"PayPal",icon:"logos:paypal",color:"blue"}},be=t=>p({...t,...d.google,provider:"google"}),Le=t=>p({...t,...d.github,provider:"github"}),_e=t=>p({...t,...d.apple,provider:"apple"}),ke=t=>p({...t,...d.facebook,provider:"facebook"}),ve=t=>p({...t,...d.x,provider:"x"}),Se=t=>p({...t,...d.twitter,provider:"twitter"}),Pe=t=>p({...t,...d.microsoft,provider:"microsoft"}),ye=t=>p({...t,...d.discord,provider:"discord"}),Be=t=>p({...t,...d.linkedin,provider:"linkedin"}),qe=t=>p({...t,...d.instagram,provider:"instagram"}),Ie=t=>p({...t,...d.tiktok,provider:"tiktok"}),xe=t=>p({...t,...d.snapchat,provider:"snapchat"}),Ae=t=>p({...t,...d.reddit,provider:"reddit"}),Ce=t=>p({...t,...d.pinterest,provider:"pinterest"}),Te=t=>p({...t,...d.twitch,provider:"twitch"}),$e=t=>p({...t,...d.steam,provider:"steam"}),Ee=t=>p({...t,...d.epic,provider:"epic"}),Me=t=>p({...t,...d.playstation,provider:"playstation"}),ze=t=>p({...t,...d.xbox,provider:"xbox"}),Re=t=>p({...t,...d.whatsapp,provider:"whatsapp"}),Ue=t=>p({...t,...d.wechat,provider:"wechat"}),Oe=t=>p({...t,...d.amazon,provider:"amazon"}),We=t=>p({...t,...d.yahoo,provider:"yahoo"}),Fe=t=>p({...t,...d.paypal,provider:"paypal"});function W({providers:t,onSocialLogin:o}){return q.Stack(K({providers:t,onProviderClick:o}))}function Q({mode:t,socialProviders:o,initialName:n,initialEmail:a,passwordRules:c,showRememberMe:s,showSocialDivider:u,showPasswordStrength:r,labels:l,onSignIn:i,onSignUp:h,onResetPassword:w,onModeChange:b,onSocialLogin:_,showContainer:v},...U){const B=t!=null?e.Value.deriveProp(t):e.prop("signin");return B.on(S=>b?.(S)),e.Use(m.AuthI18n,S=>{function x(){const g=e.coalesce(l?.hasAccountLink,S.$.hasAccountLink);return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("signin")),g)}function O(){return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("signup")),e.coalesce(l?.noAccountLink,S.$.noAccountLink))}function I(){return e.html.button(e.attr.type("button"),e.attr.class("bc-auth-form__link"),e.on.click(()=>B.set("reset-password")),e.coalesce(l?.forgotPasswordLink,S.$.forgotPasswordLink))}return e.html.div(oe.classes({"bc-auth-container":!0,"bc-auth-container--styled":e.Value.map(v??!0,g=>g)}),e.attr.class(B.map(g=>`bc-auth-container--${g}`)),e.attr.class("bc-auth-form"),e.OneOfValue(B,{signin:()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.signInTitle,S.$.signInTitle)),o!=null?e.Fragment(W({providers:o,onSocialLogin:_}),e.When(u??!1,F)):null,X({onSignIn:i,showRememberMe:s,passwordRules:c,labels:{emailLabel:l?.emailLabel,passwordLabel:l?.passwordLabel,rememberMeLabel:l?.rememberMeLabel,signInButton:l?.signInButton,forgotPasswordLink:l?.forgotPasswordLink,noAccountLink:l?.noAccountLink}}),q.Stack(e.attr.class("bc-auth-form__footer"),O(),I())),signup:()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.signUpTitle,S.$.signUpTitle)),o!=null?e.Fragment(W({providers:o,onSocialLogin:_}),e.When(u??!1,F)):null,Z({labels:{nameLabel:l?.nameLabel,emailLabel:l?.emailLabel,passwordLabel:l?.passwordLabel,confirmPasswordLabel:l?.confirmPasswordLabel,acceptTermsLabel:l?.acceptTermsLabel,signUpButton:l?.signUpButton,hasAccountLink:l?.hasAccountLink},initialEmail:a,initialName:n,onSignUp:h,passwordRules:c,showPasswordStrength:r}),q.Stack(e.attr.class("bc-auth-form__footer"),x())),"reset-password":()=>e.Fragment(e.html.h2(e.attr.class("bc-auth-form__title"),e.coalesce(l?.resetPasswordTitle,S.$.resetPasswordTitle)),J({labels:{backToSignInLink:l?.backToSignInLink,emailLabel:l?.emailLabel,resetPasswordButton:l?.resetPasswordButton,resetPasswordDescription:l?.resetPasswordDescription},onResetPassword:w}),q.Stack(e.attr.class("bc-auth-form__footer"),x()))}),...U)})}function Ve(t){return f.Modal({size:"sm",dismissable:!0,showCloseButton:!0},(o,n)=>t(a=>o({body:Q({showContainer:!1,...a}),header:e.Use(m.AuthI18n,c=>e.coalesce(a.modalTitle,c.$.authenticationTitle))})))}function F({labels:t,className:o}={}){return e.html.div(e.attr.class("bc-auth-divider"),e.attr.class(o),e.html.div(e.attr.class("bc-auth-divider__line")),e.Use(m.AuthI18n,n=>e.html.span(e.attr.class("bc-auth-divider__text"),e.coalesce(t?.text,n.$.orDivider))),e.html.div(e.attr.class("bc-auth-divider__line")))}exports.AmazonLoginButton=Oe;exports.AppleLoginButton=_e;exports.AuthContainer=Q;exports.AuthDivider=F;exports.AuthModal=Ve;exports.DiscordLoginButton=ye;exports.EpicLoginButton=Ee;exports.FacebookLoginButton=ke;exports.GitHubLoginButton=Le;exports.GoogleLoginButton=be;exports.InstagramLoginButton=qe;exports.LinkedInLoginButton=Be;exports.MicrosoftLoginButton=Pe;exports.PasswordStrengthBar=fe;exports.PasswordStrengthIndicator=Y;exports.PasswordStrengthText=we;exports.PayPalLoginButton=Fe;exports.PinterestLoginButton=Ce;exports.PlayStationLoginButton=Me;exports.RedditLoginButton=Ae;exports.ResetPasswordForm=J;exports.SignInForm=X;exports.SignUpForm=Z;exports.SnapchatLoginButton=xe;exports.SocialLoginButton=p;exports.SocialLoginButtons=K;exports.SocialProviders=W;exports.SteamLoginButton=$e;exports.TiktokLoginButton=Ie;exports.TwitchLoginButton=Te;exports.TwitterLoginButton=Se;exports.WeChatLoginButton=Ue;exports.WhatsAppLoginButton=Re;exports.XLoginButtin=ve;exports.XboxLoginButton=ze;exports.YahooLoginButton=We;exports.authSchemas=pe;exports.calculatePasswordStrength=R;exports.createEmailSchema=A;exports.createPasswordSchema=E;exports.createSignInSchema=M;exports.createSignUpSchema=z;exports.createSocialLoginUrl=ie;exports.defaultPasswordRules=y;exports.defaultSignInSchema=me;exports.defaultSignUpSchema=de;exports.emailSchema=V;exports.formatAuthError=le;exports.formatProviderName=j;exports.formatSocialLoginText=re;exports.generateRandomString=H;exports.getProviderColor=ne;exports.getProviderIcon=ae;exports.isBrowser=ue;exports.isValidEmail=se;exports.openSocialLoginPopup=ce;exports.providerInfo=T;exports.requestToControllerValidation=$;exports.resetPasswordSchema=N;exports.socialProviderInfo=d;exports.useAuthEmailProp=D;exports.validateEmail=he;exports.validatePassword=ge;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { localStorageProp as le, prop as U, Use as q, html as l, attr as t, on as z, When as _, coalesce as g, Ensure as W, computedOf as b, bind as me, ForEach as ue, Value as oe, OneOfValue as pe, Fragment as R } from "@tempots/dom";
|
|
2
2
|
import { S as T } from "./stack-BLMteGTn.js";
|
|
3
|
-
import { t as de, u as G, a as ne, b as A } from "./use-form-
|
|
4
|
-
import { o as H, b as F, s as C, M as he } from "./modal-
|
|
3
|
+
import { t as de, u as G, a as ne, b as A } from "./use-form-CEY-gUUT.js";
|
|
4
|
+
import { o as H, b as F, s as C, M as he } from "./modal-DXWQ-HUs.js";
|
|
5
5
|
import { Validation as te } from "@tempots/std";
|
|
6
|
-
import { d as f, A as x } from "./translations-
|
|
7
|
-
import { P as O, E as j, N as X } from "./notice-
|
|
8
|
-
import { B as M } from "./input-container-
|
|
9
|
-
import { T as ge } from "./text-input-
|
|
10
|
-
import { I as fe } from "./translations-
|
|
6
|
+
import { d as f, A as x } from "./translations-BplmL3nb.js";
|
|
7
|
+
import { P as O, E as j, N as X } from "./notice-Dx4D1UOf.js";
|
|
8
|
+
import { B as M } from "./input-container-Q9wL2BUl.js";
|
|
9
|
+
import { T as ge } from "./text-input-DEAddaOi.js";
|
|
10
|
+
import { I as fe } from "./translations-B96REXIk.js";
|
|
11
11
|
import { classes as be } from "@tempots/ui";
|
|
12
12
|
const Y = {
|
|
13
13
|
google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
|
package/dist/beatui.css
CHANGED
|
@@ -12108,9 +12108,17 @@ span.bc-sidebar-link {
|
|
|
12108
12108
|
/* Container for sticky header - needs to be scrollable */
|
|
12109
12109
|
.bc-table-container--sticky {
|
|
12110
12110
|
max-height: 100%;
|
|
12111
|
+
height: 100%;
|
|
12111
12112
|
overflow: auto;
|
|
12112
12113
|
}
|
|
12113
12114
|
|
|
12115
|
+
/* When inside a DataTable sticky container, the parent wrapper handles scrolling */
|
|
12116
|
+
.bc-data-table > .bc-data-table__wrapper > .bc-table-container--sticky {
|
|
12117
|
+
max-height: none;
|
|
12118
|
+
height: auto;
|
|
12119
|
+
overflow: visible;
|
|
12120
|
+
}
|
|
12121
|
+
|
|
12114
12122
|
/* Full width container */
|
|
12115
12123
|
.bc-table-container--full-width {
|
|
12116
12124
|
display: block;
|
|
@@ -16581,10 +16589,56 @@ span.bc-sidebar-link {
|
|
|
16581
16589
|
color: var(--color-danger-600);
|
|
16582
16590
|
}
|
|
16583
16591
|
|
|
16592
|
+
/* Data Table — sticky layout container */
|
|
16593
|
+
.bc-data-table {
|
|
16594
|
+
display: flex;
|
|
16595
|
+
flex-direction: column;
|
|
16596
|
+
height: 100%;
|
|
16597
|
+
min-height: 0;
|
|
16598
|
+
}
|
|
16599
|
+
|
|
16600
|
+
.bc-data-table > .bc-data-toolbar {
|
|
16601
|
+
flex-shrink: 0;
|
|
16602
|
+
margin-bottom: 0;
|
|
16603
|
+
border-radius: var(--radius-control) var(--radius-control) 0 0;
|
|
16604
|
+
border-bottom: none;
|
|
16605
|
+
}
|
|
16606
|
+
|
|
16607
|
+
.bc-data-table > .bc-data-table__wrapper {
|
|
16608
|
+
flex: 1 1 0;
|
|
16609
|
+
min-height: 0;
|
|
16610
|
+
overflow-y: auto;
|
|
16611
|
+
}
|
|
16612
|
+
|
|
16613
|
+
.bc-data-table > .bc-data-table__wrapper > .bc-table-container {
|
|
16614
|
+
height: auto;
|
|
16615
|
+
max-height: none;
|
|
16616
|
+
overflow: visible;
|
|
16617
|
+
}
|
|
16618
|
+
|
|
16619
|
+
.bc-data-table
|
|
16620
|
+
> .bc-data-table__wrapper
|
|
16621
|
+
> .bc-table-container--with-table-border {
|
|
16622
|
+
border-radius: 0;
|
|
16623
|
+
}
|
|
16624
|
+
|
|
16625
|
+
.bc-data-table > .bc-data-table__pagination {
|
|
16626
|
+
flex-shrink: 0;
|
|
16627
|
+
border: var(--border-width-thin) solid var(--border-default);
|
|
16628
|
+
border-top: none;
|
|
16629
|
+
border-radius: 0 0 var(--radius-control) var(--radius-control);
|
|
16630
|
+
background-color: var(--bg-surface);
|
|
16631
|
+
}
|
|
16632
|
+
|
|
16633
|
+
.bc-data-table > .bc-data-table__column-toggle {
|
|
16634
|
+
flex-shrink: 0;
|
|
16635
|
+
}
|
|
16636
|
+
|
|
16584
16637
|
/* Data Table */
|
|
16585
16638
|
.bc-data-table__wrapper {
|
|
16586
16639
|
position: relative;
|
|
16587
16640
|
min-height: 120px;
|
|
16641
|
+
height: 100%;
|
|
16588
16642
|
}
|
|
16589
16643
|
|
|
16590
16644
|
.bc-data-table__filter-row > th {
|
package/dist/beatui.tailwind.css
CHANGED
|
@@ -11774,9 +11774,17 @@ span.bc-sidebar-link {
|
|
|
11774
11774
|
/* Container for sticky header - needs to be scrollable */
|
|
11775
11775
|
.bc-table-container--sticky {
|
|
11776
11776
|
max-height: 100%;
|
|
11777
|
+
height: 100%;
|
|
11777
11778
|
overflow: auto;
|
|
11778
11779
|
}
|
|
11779
11780
|
|
|
11781
|
+
/* When inside a DataTable sticky container, the parent wrapper handles scrolling */
|
|
11782
|
+
.bc-data-table > .bc-data-table__wrapper > .bc-table-container--sticky {
|
|
11783
|
+
max-height: none;
|
|
11784
|
+
height: auto;
|
|
11785
|
+
overflow: visible;
|
|
11786
|
+
}
|
|
11787
|
+
|
|
11780
11788
|
/* Full width container */
|
|
11781
11789
|
.bc-table-container--full-width {
|
|
11782
11790
|
display: block;
|
|
@@ -16247,10 +16255,56 @@ span.bc-sidebar-link {
|
|
|
16247
16255
|
color: var(--color-danger-600);
|
|
16248
16256
|
}
|
|
16249
16257
|
|
|
16258
|
+
/* Data Table — sticky layout container */
|
|
16259
|
+
.bc-data-table {
|
|
16260
|
+
display: flex;
|
|
16261
|
+
flex-direction: column;
|
|
16262
|
+
height: 100%;
|
|
16263
|
+
min-height: 0;
|
|
16264
|
+
}
|
|
16265
|
+
|
|
16266
|
+
.bc-data-table > .bc-data-toolbar {
|
|
16267
|
+
flex-shrink: 0;
|
|
16268
|
+
margin-bottom: 0;
|
|
16269
|
+
border-radius: var(--radius-control) var(--radius-control) 0 0;
|
|
16270
|
+
border-bottom: none;
|
|
16271
|
+
}
|
|
16272
|
+
|
|
16273
|
+
.bc-data-table > .bc-data-table__wrapper {
|
|
16274
|
+
flex: 1 1 0;
|
|
16275
|
+
min-height: 0;
|
|
16276
|
+
overflow-y: auto;
|
|
16277
|
+
}
|
|
16278
|
+
|
|
16279
|
+
.bc-data-table > .bc-data-table__wrapper > .bc-table-container {
|
|
16280
|
+
height: auto;
|
|
16281
|
+
max-height: none;
|
|
16282
|
+
overflow: visible;
|
|
16283
|
+
}
|
|
16284
|
+
|
|
16285
|
+
.bc-data-table
|
|
16286
|
+
> .bc-data-table__wrapper
|
|
16287
|
+
> .bc-table-container--with-table-border {
|
|
16288
|
+
border-radius: 0;
|
|
16289
|
+
}
|
|
16290
|
+
|
|
16291
|
+
.bc-data-table > .bc-data-table__pagination {
|
|
16292
|
+
flex-shrink: 0;
|
|
16293
|
+
border: var(--border-width-thin) solid var(--border-default);
|
|
16294
|
+
border-top: none;
|
|
16295
|
+
border-radius: 0 0 var(--radius-control) var(--radius-control);
|
|
16296
|
+
background-color: var(--bg-surface);
|
|
16297
|
+
}
|
|
16298
|
+
|
|
16299
|
+
.bc-data-table > .bc-data-table__column-toggle {
|
|
16300
|
+
flex-shrink: 0;
|
|
16301
|
+
}
|
|
16302
|
+
|
|
16250
16303
|
/* Data Table */
|
|
16251
16304
|
.bc-data-table__wrapper {
|
|
16252
16305
|
position: relative;
|
|
16253
16306
|
min-height: 120px;
|
|
16307
|
+
height: 100%;
|
|
16254
16308
|
}
|
|
16255
16309
|
|
|
16256
16310
|
.bc-data-table__filter-row > th {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),L=require("../auth-divider-3t_-R0sL.cjs"),I=require("../translations-Dbx7L7Q1.cjs"),w=require("../notice-BNghd0oS.cjs"),y=require("../stack-dwLevGa2.cjs"),b=require("../input-container-Di1YvVB_.cjs"),v=require("../text-input-DL9FvpTZ.cjs");function g(a,t){return a.error?(t.onError?.({message:a.error.message,status:a.error.status}),a.error.message):null}function F(a,t,s){return async n=>{const i=await a.signIn.email({email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function A(a,t,s){return async n=>{const i=await a.signUp.email({name:n.name,email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function U(a,t){return async s=>{const n=await a.requestPasswordReset({email:s.email,redirectTo:t.callbackURL});return g(n,t)}}function $(a,t){return async s=>{const n=await a.signIn.social({provider:s,callbackURL:t.callbackURL,errorCallbackURL:t.errorCallbackURL});g(n,t)}}function P(a,t={}){const s=e.prop(null),n=e.prop(!0),i=e.computedOf(s)(h=>h?.user??null),o=e.computedOf(s)(h=>h!=null);let u;async function d(){try{const h=await a.getSession();h.error||!h.data?s.set(null):s.set({user:h.data.user,session:h.data.session})}catch{s.set(null)}finally{n.set(!1)}}t.onSessionChange&&s.on(t.onSessionChange),d(),t.refreshInterval&&t.refreshInterval>0&&(u=setInterval(d,t.refreshInterval));function p(){u!=null&&(clearInterval(u),u=void 0),s.dispose(),n.dispose(),i.dispose(),o.dispose()}return{session:s,isPending:n,user:i,isAuthenticated:o,refresh:d,dispose:p}}function _(a){return a.map(t=>({provider:t}))}function C(a,t={}){const s=P(a,{refreshInterval:t.refreshInterval,onSessionChange:t.onSessionChange}),n=()=>s.refresh(),i=F(a,t,n),o=A(a,t,n),u=U(a,t),d=$(a,t),p=t.socialProviders?_(t.socialProviders):[],h={onSignIn:i,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,labels:t.labels?{emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,rememberMeLabel:t.labels.rememberMeLabel,signInButton:t.labels.signInButton,forgotPasswordLink:t.labels.forgotPasswordLink,noAccountLink:t.labels.noAccountLink}:void 0},c={onSignUp:o,passwordRules:t.passwordRules,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels?{nameLabel:t.labels.nameLabel,emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,confirmPasswordLabel:t.labels.confirmPasswordLabel,acceptTermsLabel:t.labels.acceptTermsLabel,signUpButton:t.labels.signUpButton,hasAccountLink:t.labels.hasAccountLink}:void 0},m={onResetPassword:u,labels:t.labels?{resetPasswordButton:t.labels.resetPasswordButton,resetPasswordDescription:t.labels.resetPasswordDescription,emailLabel:t.labels.emailLabel,backToSignInLink:t.labels.backToSignInLink}:void 0},l={onSignIn:i,onSignUp:o,onResetPassword:u,onSocialLogin:d,socialProviders:p.length>0?p:void 0,showSocialDivider:p.length>0,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels};async function r(){await a.signOut(),await n()}function f(){s.dispose()}return{session:s.session,isPending:s.isPending,user:s.user,isAuthenticated:s.isAuthenticated,containerOptions:l,signInOptions:h,signUpOptions:c,resetOptions:m,socialProviders:p,signOut:r,refreshSession:n,dispose:f}}const R={mark:e.makeProviderMark("BetterAuth"),create:a=>{if(!a)throw new Error("BetterAuth provider requires a client option");const t=C(a.client,a);return{value:t,dispose:()=>t.dispose()}}};function E(a,t,...s){return L.AuthContainer({...a.containerOptions,...t},...s)}function O(a,t){return L.AuthModal(s=>t(n=>s({...a.containerOptions,...n})))}function M(a,t){return e.When(a.isAuthenticated,t)}function D(a,t){return e.Unless(a.isAuthenticated,t)}const T={twoFactorSetupDescription:"Enter your password to enable two-factor authentication.",twoFactorEnableButton:"Enable 2FA",twoFactorVerifyButton:"Verify",twoFactorScanDescription:"Scan the code below with your authenticator app, then enter the verification code.",twoFactorBackupCodesDescription:"Save these backup codes in a safe place. You can use them to sign in if you lose access to your authenticator.",twoFactorCodePlaceholder:"Enter 6-digit code",twoFactorBackupCodePlaceholder:"Enter backup code",twoFactorEnabled:"Two-factor authentication has been enabled.",twoFactorTotpDescription:"Enter the code from your authenticator app.",twoFactorOtpDescription:"Enter the one-time code sent to you.",twoFactorBackupDescription:"Enter one of your backup codes.",twoFactorSendOtpButton:"Send Code",twoFactorMethodLabel:a=>{switch(a){case"totp":return"Authenticator";case"otp":return"Email/SMS";case"backup":return"Backup Code";default:return a}},passwordPlaceholder:"Enter your password",magicLinkDescription:"Enter your email to receive a sign-in link.",magicLinkSendButton:"Send Magic Link",magicLinkSent:"A sign-in link has been sent to your email.",passkeySignInButton:"Sign in with Passkey",passkeyAddButton:"Add Passkey",passkeyDeleteButton:"Delete",passkeyRenameButton:"Rename",passkeySaveButton:"Save",passkeyCancelButton:"Cancel",passkeyNamePlaceholder:"Passkey name (optional)",passkeyUnnamed:"Unnamed passkey"},B=T,S="en",N=Object.assign({}),k=I.makeI18nProvider({defaultLocale:S,defaultMessages:B,localeLoader:async a=>{if(a===S)return B;const t=N[`./locales/${a}.ts`];return t?await t():B},providerName:"BetterAuthI18n"});function q({twoFactor:a,issuer:t,onComplete:s}){const n=e.prop(""),i=e.prop(null),o=e.prop([]),u=e.prop(""),d=e.prop(null),p=e.prop(!1),h=e.prop("password");async function c(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.enable({password:n.value,issuer:t});if(p.set(!1),r.error){d.set(r.error.message);return}r.data&&(i.set(r.data.totpURI),o.set(r.data.backupCodes),h.set("verify"))}async function m(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.verifyTotp({code:u.value});if(p.set(!1),r.error){d.set(r.error.message);return}h.set("complete"),s?.()}return e.Use(k,l=>e.html.div(e.attr.class("bc-two-factor"),e.Ensure(d,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.OneOfValue(h,{password:()=>e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(c),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),l.$.twoFactorSetupDescription),w.PasswordInput({value:n,onChange:r=>n.set(r),placeholder:l.$.passwordPlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorEnableButton))),verify:()=>e.Fragment(e.Ensure(i,r=>e.html.div(e.attr.class("bc-two-factor__totp-uri"),e.html.p(l.$.twoFactorScanDescription),e.html.code(e.attr.class("bc-two-factor__code-display"),r))),e.NotEmpty(o,()=>e.html.div(e.attr.class("bc-two-factor__backup-codes"),e.html.p(l.$.twoFactorBackupCodesDescription),e.html.ul(e.ForEach(o,r=>e.html.li(r))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(m),y.Stack(v.TextInput({value:u,onChange:r=>u.set(r),placeholder:l.$.twoFactorCodePlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorVerifyButton)))),complete:()=>e.html.div(e.attr.class("bc-two-factor__complete"),w.Notice({variant:"success",tone:"prominent"},e.html.div(l.$.twoFactorEnabled)))})))}function x({twoFactor:a,methods:t=["totp","backup"],trustDevice:s,onVerified:n}){const i=e.prop(""),o=e.prop(null),u=e.prop(!1),d=e.prop(t[0]??"totp");async function p(c){c.preventDefault(),u.set(!0),o.set(null);const m=d.value;let l;if(m==="totp")l=await a.verifyTotp({code:i.value,trustDevice:s});else if(m==="otp"&&a.verifyOtp)l=await a.verifyOtp({code:i.value,trustDevice:s});else if(m==="backup")l=await a.verifyBackupCode({code:i.value});else{o.set("Unsupported verification method"),u.set(!1);return}if(u.set(!1),l.error){o.set(l.error.message);return}n?.()}async function h(){if(!a.sendOtp)return;u.set(!0),o.set(null);const c=await a.sendOtp({trustDevice:s});u.set(!1),c.error&&o.set(c.error.message)}return e.Use(k,c=>{const m=e.computedOf(d,c)((r,f)=>r==="totp"?f.twoFactorTotpDescription:r==="otp"?f.twoFactorOtpDescription:f.twoFactorBackupDescription),l=e.computedOf(d,c)((r,f)=>r==="backup"?f.twoFactorBackupCodePlaceholder:f.twoFactorCodePlaceholder);return e.html.div(e.attr.class("bc-two-factor"),e.Ensure(o,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.When(t.length>1,()=>e.html.div(e.attr.class("bc-two-factor__methods"),...t.map(r=>e.html.button(e.attr.type("button"),e.attr.class("bc-two-factor__method-button"),e.attr.class(d.map(f=>f===r?"bc-two-factor__method-button--active":"")),e.on.click(()=>{d.set(r),i.set(""),o.set(null)}),c.$.twoFactorMethodLabel.map(f=>f(r)))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(p),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),m),e.When(d.map(r=>r==="otp"&&a.sendOtp!=null),()=>b.Button({type:"button",variant:"outline",color:"primary",onClick:h,loading:u},c.$.twoFactorSendOtpButton)),v.TextInput({value:i,onChange:r=>i.set(r),placeholder:l}),b.Button({type:"submit",variant:"filled",color:"primary",loading:u},e.attr.class("bc-auth-form__submit"),c.$.twoFactorVerifyButton))))})}function V({client:a,callbackURL:t}){const s=e.prop(""),n=e.prop(null),i=e.prop(!1),o=e.prop(!1);async function u(d){if(d.preventDefault(),!a.signIn.magicLink){n.set("Magic link sign-in is not configured");return}i.set(!0),n.set(null);const p=await a.signIn.magicLink({email:s.value,callbackURL:t});if(i.set(!1),p.error){n.set(p.error.message);return}o.set(!0)}return e.Use(k,d=>e.html.div(e.attr.class("bc-auth-form"),e.Ensure(n,p=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(p))),e.Unless(o,()=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(u),y.Stack(e.attr.class("bc-auth-form__fields"),e.html.p(e.attr.class("bc-auth-form__description"),d.$.magicLinkDescription),w.EmailInput({value:s,onChange:p=>s.set(p)}),b.Button({type:"submit",variant:"filled",color:"primary",loading:i},e.attr.class("bc-auth-form__submit"),d.$.magicLinkSendButton)))),e.When(o,()=>w.Notice({variant:"success",tone:"prominent"},e.html.div(d.$.magicLinkSent)))))}function W({client:a,autoFill:t,onSuccess:s,onError:n}){const i=e.prop(!1);async function o(){if(!a.signIn.passkey)return;i.set(!0);const u=await a.signIn.passkey({autoFill:t});if(i.set(!1),u.error){n?.({message:u.error.message,status:u.error.status});return}s?.()}return e.Use(k,u=>b.Button({type:"button",variant:"outline",color:"primary",onClick:o,loading:i},e.attr.class("bc-passkey-signin"),u.$.passkeySignInButton))}function z({passkey:a}){const t=e.prop([]),s=e.prop(null),n=e.prop(!1),i=e.prop("");async function o(c,m){n.set(!0),s.set(null);const l=await c();if(n.set(!1),l.error){s.set(l.error.message);return}await m?.(l.data)}async function u(){await o(()=>a.listUserPasskeys(),c=>t.set(c??[]))}async function d(){const c=i.value||void 0;await o(()=>a.addPasskey({name:c}),async()=>{i.set(""),await u()})}async function p(c){await o(()=>a.deletePasskey({id:c}),()=>u())}async function h(c,m){await o(()=>a.updatePasskey({id:c,name:m}),()=>u())}return u(),e.Use(k,c=>e.html.div(e.attr.class("bc-passkey-management"),e.Ensure(s,m=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(m))),e.html.div(e.attr.class("bc-passkey-list"),e.ForEach(t,m=>{const l=e.prop(!1),r=e.prop(m.$.name?.value??"");return e.html.div(e.attr.class("bc-passkey-item"),e.Unless(l,()=>e.html.div(e.attr.class("bc-passkey-item__info"),e.html.span(e.attr.class("bc-passkey-item__name"),m.$.name?.map(f=>f??c.$.passkeyUnnamed.value)??c.$.passkeyUnnamed),e.html.span(e.attr.class("bc-passkey-item__date"),m.$.createdAt))),e.When(l,()=>e.html.div(e.attr.class("bc-passkey-item__edit"),v.TextInput({value:r,onChange:f=>r.set(f)}))),e.html.div(e.attr.class("bc-passkey-item__actions"),e.Unless(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:()=>{r.set(m.$.name?.value??""),l.set(!0)}},c.$.passkeyRenameButton),b.Button({type:"button",variant:"text",size:"sm",color:"danger",onClick:()=>p(m.$.id.value)},c.$.passkeyDeleteButton))),e.When(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:async()=>{await h(m.$.id.value,r.value),l.set(!1)}},c.$.passkeySaveButton),b.Button({type:"button",variant:"text",size:"sm",onClick:()=>l.set(!1)},c.$.passkeyCancelButton)))))})),e.html.div(e.attr.class("bc-passkey-add"),y.Stack(v.TextInput({value:i,onChange:m=>i.set(m),placeholder:c.$.passkeyNamePlaceholder}),b.Button({type:"button",variant:"filled",color:"primary",onClick:d,loading:n},c.$.passkeyAddButton)))))}exports.Authenticated=M;exports.BetterAuth=R;exports.BetterAuthContainer=E;exports.BetterAuthI18n=k;exports.BetterAuthModal=O;exports.MagicLinkForm=V;exports.PasskeyManagement=z;exports.PasskeySignIn=W;exports.TwoFactorSetup=q;exports.TwoFactorVerify=x;exports.Unauthenticated=D;exports.createBetterAuthBridge=C;exports.createSessionManager=P;exports.mapSocialProviders=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),L=require("../auth-divider-BHAbd_PS.cjs"),I=require("../translations-BDGa_4jx.cjs"),w=require("../notice-dOOD80F7.cjs"),y=require("../stack-dwLevGa2.cjs"),b=require("../input-container-BZwpJgx6.cjs"),v=require("../text-input-CynkbBpH.cjs");function g(a,t){return a.error?(t.onError?.({message:a.error.message,status:a.error.status}),a.error.message):null}function F(a,t,s){return async n=>{const i=await a.signIn.email({email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function A(a,t,s){return async n=>{const i=await a.signUp.email({name:n.name,email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function U(a,t){return async s=>{const n=await a.requestPasswordReset({email:s.email,redirectTo:t.callbackURL});return g(n,t)}}function $(a,t){return async s=>{const n=await a.signIn.social({provider:s,callbackURL:t.callbackURL,errorCallbackURL:t.errorCallbackURL});g(n,t)}}function P(a,t={}){const s=e.prop(null),n=e.prop(!0),i=e.computedOf(s)(h=>h?.user??null),o=e.computedOf(s)(h=>h!=null);let u;async function d(){try{const h=await a.getSession();h.error||!h.data?s.set(null):s.set({user:h.data.user,session:h.data.session})}catch{s.set(null)}finally{n.set(!1)}}t.onSessionChange&&s.on(t.onSessionChange),d(),t.refreshInterval&&t.refreshInterval>0&&(u=setInterval(d,t.refreshInterval));function p(){u!=null&&(clearInterval(u),u=void 0),s.dispose(),n.dispose(),i.dispose(),o.dispose()}return{session:s,isPending:n,user:i,isAuthenticated:o,refresh:d,dispose:p}}function _(a){return a.map(t=>({provider:t}))}function C(a,t={}){const s=P(a,{refreshInterval:t.refreshInterval,onSessionChange:t.onSessionChange}),n=()=>s.refresh(),i=F(a,t,n),o=A(a,t,n),u=U(a,t),d=$(a,t),p=t.socialProviders?_(t.socialProviders):[],h={onSignIn:i,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,labels:t.labels?{emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,rememberMeLabel:t.labels.rememberMeLabel,signInButton:t.labels.signInButton,forgotPasswordLink:t.labels.forgotPasswordLink,noAccountLink:t.labels.noAccountLink}:void 0},c={onSignUp:o,passwordRules:t.passwordRules,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels?{nameLabel:t.labels.nameLabel,emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,confirmPasswordLabel:t.labels.confirmPasswordLabel,acceptTermsLabel:t.labels.acceptTermsLabel,signUpButton:t.labels.signUpButton,hasAccountLink:t.labels.hasAccountLink}:void 0},m={onResetPassword:u,labels:t.labels?{resetPasswordButton:t.labels.resetPasswordButton,resetPasswordDescription:t.labels.resetPasswordDescription,emailLabel:t.labels.emailLabel,backToSignInLink:t.labels.backToSignInLink}:void 0},l={onSignIn:i,onSignUp:o,onResetPassword:u,onSocialLogin:d,socialProviders:p.length>0?p:void 0,showSocialDivider:p.length>0,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels};async function r(){await a.signOut(),await n()}function f(){s.dispose()}return{session:s.session,isPending:s.isPending,user:s.user,isAuthenticated:s.isAuthenticated,containerOptions:l,signInOptions:h,signUpOptions:c,resetOptions:m,socialProviders:p,signOut:r,refreshSession:n,dispose:f}}const R={mark:e.makeProviderMark("BetterAuth"),create:a=>{if(!a)throw new Error("BetterAuth provider requires a client option");const t=C(a.client,a);return{value:t,dispose:()=>t.dispose()}}};function E(a,t,...s){return L.AuthContainer({...a.containerOptions,...t},...s)}function O(a,t){return L.AuthModal(s=>t(n=>s({...a.containerOptions,...n})))}function M(a,t){return e.When(a.isAuthenticated,t)}function D(a,t){return e.Unless(a.isAuthenticated,t)}const T={twoFactorSetupDescription:"Enter your password to enable two-factor authentication.",twoFactorEnableButton:"Enable 2FA",twoFactorVerifyButton:"Verify",twoFactorScanDescription:"Scan the code below with your authenticator app, then enter the verification code.",twoFactorBackupCodesDescription:"Save these backup codes in a safe place. You can use them to sign in if you lose access to your authenticator.",twoFactorCodePlaceholder:"Enter 6-digit code",twoFactorBackupCodePlaceholder:"Enter backup code",twoFactorEnabled:"Two-factor authentication has been enabled.",twoFactorTotpDescription:"Enter the code from your authenticator app.",twoFactorOtpDescription:"Enter the one-time code sent to you.",twoFactorBackupDescription:"Enter one of your backup codes.",twoFactorSendOtpButton:"Send Code",twoFactorMethodLabel:a=>{switch(a){case"totp":return"Authenticator";case"otp":return"Email/SMS";case"backup":return"Backup Code";default:return a}},passwordPlaceholder:"Enter your password",magicLinkDescription:"Enter your email to receive a sign-in link.",magicLinkSendButton:"Send Magic Link",magicLinkSent:"A sign-in link has been sent to your email.",passkeySignInButton:"Sign in with Passkey",passkeyAddButton:"Add Passkey",passkeyDeleteButton:"Delete",passkeyRenameButton:"Rename",passkeySaveButton:"Save",passkeyCancelButton:"Cancel",passkeyNamePlaceholder:"Passkey name (optional)",passkeyUnnamed:"Unnamed passkey"},B=T,S="en",N=Object.assign({}),k=I.makeI18nProvider({defaultLocale:S,defaultMessages:B,localeLoader:async a=>{if(a===S)return B;const t=N[`./locales/${a}.ts`];return t?await t():B},providerName:"BetterAuthI18n"});function q({twoFactor:a,issuer:t,onComplete:s}){const n=e.prop(""),i=e.prop(null),o=e.prop([]),u=e.prop(""),d=e.prop(null),p=e.prop(!1),h=e.prop("password");async function c(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.enable({password:n.value,issuer:t});if(p.set(!1),r.error){d.set(r.error.message);return}r.data&&(i.set(r.data.totpURI),o.set(r.data.backupCodes),h.set("verify"))}async function m(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.verifyTotp({code:u.value});if(p.set(!1),r.error){d.set(r.error.message);return}h.set("complete"),s?.()}return e.Use(k,l=>e.html.div(e.attr.class("bc-two-factor"),e.Ensure(d,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.OneOfValue(h,{password:()=>e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(c),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),l.$.twoFactorSetupDescription),w.PasswordInput({value:n,onChange:r=>n.set(r),placeholder:l.$.passwordPlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorEnableButton))),verify:()=>e.Fragment(e.Ensure(i,r=>e.html.div(e.attr.class("bc-two-factor__totp-uri"),e.html.p(l.$.twoFactorScanDescription),e.html.code(e.attr.class("bc-two-factor__code-display"),r))),e.NotEmpty(o,()=>e.html.div(e.attr.class("bc-two-factor__backup-codes"),e.html.p(l.$.twoFactorBackupCodesDescription),e.html.ul(e.ForEach(o,r=>e.html.li(r))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(m),y.Stack(v.TextInput({value:u,onChange:r=>u.set(r),placeholder:l.$.twoFactorCodePlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorVerifyButton)))),complete:()=>e.html.div(e.attr.class("bc-two-factor__complete"),w.Notice({variant:"success",tone:"prominent"},e.html.div(l.$.twoFactorEnabled)))})))}function x({twoFactor:a,methods:t=["totp","backup"],trustDevice:s,onVerified:n}){const i=e.prop(""),o=e.prop(null),u=e.prop(!1),d=e.prop(t[0]??"totp");async function p(c){c.preventDefault(),u.set(!0),o.set(null);const m=d.value;let l;if(m==="totp")l=await a.verifyTotp({code:i.value,trustDevice:s});else if(m==="otp"&&a.verifyOtp)l=await a.verifyOtp({code:i.value,trustDevice:s});else if(m==="backup")l=await a.verifyBackupCode({code:i.value});else{o.set("Unsupported verification method"),u.set(!1);return}if(u.set(!1),l.error){o.set(l.error.message);return}n?.()}async function h(){if(!a.sendOtp)return;u.set(!0),o.set(null);const c=await a.sendOtp({trustDevice:s});u.set(!1),c.error&&o.set(c.error.message)}return e.Use(k,c=>{const m=e.computedOf(d,c)((r,f)=>r==="totp"?f.twoFactorTotpDescription:r==="otp"?f.twoFactorOtpDescription:f.twoFactorBackupDescription),l=e.computedOf(d,c)((r,f)=>r==="backup"?f.twoFactorBackupCodePlaceholder:f.twoFactorCodePlaceholder);return e.html.div(e.attr.class("bc-two-factor"),e.Ensure(o,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.When(t.length>1,()=>e.html.div(e.attr.class("bc-two-factor__methods"),...t.map(r=>e.html.button(e.attr.type("button"),e.attr.class("bc-two-factor__method-button"),e.attr.class(d.map(f=>f===r?"bc-two-factor__method-button--active":"")),e.on.click(()=>{d.set(r),i.set(""),o.set(null)}),c.$.twoFactorMethodLabel.map(f=>f(r)))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(p),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),m),e.When(d.map(r=>r==="otp"&&a.sendOtp!=null),()=>b.Button({type:"button",variant:"outline",color:"primary",onClick:h,loading:u},c.$.twoFactorSendOtpButton)),v.TextInput({value:i,onChange:r=>i.set(r),placeholder:l}),b.Button({type:"submit",variant:"filled",color:"primary",loading:u},e.attr.class("bc-auth-form__submit"),c.$.twoFactorVerifyButton))))})}function V({client:a,callbackURL:t}){const s=e.prop(""),n=e.prop(null),i=e.prop(!1),o=e.prop(!1);async function u(d){if(d.preventDefault(),!a.signIn.magicLink){n.set("Magic link sign-in is not configured");return}i.set(!0),n.set(null);const p=await a.signIn.magicLink({email:s.value,callbackURL:t});if(i.set(!1),p.error){n.set(p.error.message);return}o.set(!0)}return e.Use(k,d=>e.html.div(e.attr.class("bc-auth-form"),e.Ensure(n,p=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(p))),e.Unless(o,()=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(u),y.Stack(e.attr.class("bc-auth-form__fields"),e.html.p(e.attr.class("bc-auth-form__description"),d.$.magicLinkDescription),w.EmailInput({value:s,onChange:p=>s.set(p)}),b.Button({type:"submit",variant:"filled",color:"primary",loading:i},e.attr.class("bc-auth-form__submit"),d.$.magicLinkSendButton)))),e.When(o,()=>w.Notice({variant:"success",tone:"prominent"},e.html.div(d.$.magicLinkSent)))))}function W({client:a,autoFill:t,onSuccess:s,onError:n}){const i=e.prop(!1);async function o(){if(!a.signIn.passkey)return;i.set(!0);const u=await a.signIn.passkey({autoFill:t});if(i.set(!1),u.error){n?.({message:u.error.message,status:u.error.status});return}s?.()}return e.Use(k,u=>b.Button({type:"button",variant:"outline",color:"primary",onClick:o,loading:i},e.attr.class("bc-passkey-signin"),u.$.passkeySignInButton))}function z({passkey:a}){const t=e.prop([]),s=e.prop(null),n=e.prop(!1),i=e.prop("");async function o(c,m){n.set(!0),s.set(null);const l=await c();if(n.set(!1),l.error){s.set(l.error.message);return}await m?.(l.data)}async function u(){await o(()=>a.listUserPasskeys(),c=>t.set(c??[]))}async function d(){const c=i.value||void 0;await o(()=>a.addPasskey({name:c}),async()=>{i.set(""),await u()})}async function p(c){await o(()=>a.deletePasskey({id:c}),()=>u())}async function h(c,m){await o(()=>a.updatePasskey({id:c,name:m}),()=>u())}return u(),e.Use(k,c=>e.html.div(e.attr.class("bc-passkey-management"),e.Ensure(s,m=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(m))),e.html.div(e.attr.class("bc-passkey-list"),e.ForEach(t,m=>{const l=e.prop(!1),r=e.prop(m.$.name?.value??"");return e.html.div(e.attr.class("bc-passkey-item"),e.Unless(l,()=>e.html.div(e.attr.class("bc-passkey-item__info"),e.html.span(e.attr.class("bc-passkey-item__name"),m.$.name?.map(f=>f??c.$.passkeyUnnamed.value)??c.$.passkeyUnnamed),e.html.span(e.attr.class("bc-passkey-item__date"),m.$.createdAt))),e.When(l,()=>e.html.div(e.attr.class("bc-passkey-item__edit"),v.TextInput({value:r,onChange:f=>r.set(f)}))),e.html.div(e.attr.class("bc-passkey-item__actions"),e.Unless(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:()=>{r.set(m.$.name?.value??""),l.set(!0)}},c.$.passkeyRenameButton),b.Button({type:"button",variant:"text",size:"sm",color:"danger",onClick:()=>p(m.$.id.value)},c.$.passkeyDeleteButton))),e.When(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:async()=>{await h(m.$.id.value,r.value),l.set(!1)}},c.$.passkeySaveButton),b.Button({type:"button",variant:"text",size:"sm",onClick:()=>l.set(!1)},c.$.passkeyCancelButton)))))})),e.html.div(e.attr.class("bc-passkey-add"),y.Stack(v.TextInput({value:i,onChange:m=>i.set(m),placeholder:c.$.passkeyNamePlaceholder}),b.Button({type:"button",variant:"filled",color:"primary",onClick:d,loading:n},c.$.passkeyAddButton)))))}exports.Authenticated=M;exports.BetterAuth=R;exports.BetterAuthContainer=E;exports.BetterAuthI18n=k;exports.BetterAuthModal=O;exports.MagicLinkForm=V;exports.PasskeyManagement=z;exports.PasskeySignIn=W;exports.TwoFactorSetup=q;exports.TwoFactorVerify=x;exports.Unauthenticated=D;exports.createBetterAuthBridge=C;exports.createSessionManager=P;exports.mapSocialProviders=_;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { prop as b, computedOf as B, makeProviderMark as U, When as y, Unless as C, Use as S, html as r, attr as l, Ensure as g, OneOfValue as D, Fragment as E, NotEmpty as O, ForEach as A, on as L } from "@tempots/dom";
|
|
2
|
-
import { b as M, d as T } from "../auth-divider-
|
|
3
|
-
import { m as N } from "../translations-
|
|
4
|
-
import { N as v, P as V, E as x } from "../notice-
|
|
2
|
+
import { b as M, d as T } from "../auth-divider-CvQ0TQwi.js";
|
|
3
|
+
import { m as N } from "../translations-B96REXIk.js";
|
|
4
|
+
import { N as v, P as V, E as x } from "../notice-Dx4D1UOf.js";
|
|
5
5
|
import { S as P } from "../stack-BLMteGTn.js";
|
|
6
|
-
import { B as k } from "../input-container-
|
|
7
|
-
import { T as I } from "../text-input-
|
|
6
|
+
import { B as k } from "../input-container-Q9wL2BUl.js";
|
|
7
|
+
import { T as I } from "../text-input-DEAddaOi.js";
|
|
8
8
|
function F(t, e) {
|
|
9
9
|
return t.error ? (e.onError?.({
|
|
10
10
|
message: t.error.message,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-BDGa_4jx.cjs"),o={loadingExtended:"Lädt, bitte warten",loadingShort:"Lädt...",iconDescription:"Symbol",loadingIcon:"Ladesymbol",locale:"Landesvariante",failedToLoadIcon:"Symbol konnte nicht geladen werden",editLabel:"Bearbeiten",selectOne:"Eines auswählen",selectNone:"Keines",selectMany:"Mehrere auswählen",noResults:"Keine Ergebnisse",passwordPlaceholderText:"Geheimes Passwort",togglePasswordVisibility:"Passwort-Sichtbarkeit umschalten",toggleMenu:"Menü umschalten",toggleAside:"Seitenleiste umschalten",mainNavigation:"Hauptnavigation",sidebar:"Seitenleiste",closeDrawer:"Schublade schließen",closeModal:"Modal schließen",confirm:"Bestätigen",cancel:"Abbrechen",addLabel:"Hinzufügen",removeItem:"Element entfernen",currentLocale:"Deutsch",ar:"Arabisch",de:"Deutsch",en:"Englisch",es:"Spanisch",fr:"Französisch",hi:"Hindi",it:"Italienisch",ja:"Japanisch",ko:"Koreanisch",nl:"Niederländisch",pl:"Polnisch",pt:"Portugiesisch",ru:"Russisch",tr:"Türkisch",vi:"Vietnamesisch",zh:"Chinesisch",he:"Hebräisch",fa:"Persisch",ur:"Urdu",emailPlaceholderText:"E-Mail eingeben",incrementValue:"Wert erhöhen",decrementValue:"Wert verringern",dropZoneInstructions:e=>e?"Klicken zum Auswählen oder Dateien hierher ziehen, oder Enter oder Leertaste drücken, um Dateiauswahl zu öffnen":"Dateien hierher ziehen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Datei entfernen",clearAllFiles:"Alle Dateien löschen",clearValue:"Wert löschen",unknownType:"Unbekannter Typ",filesInputInstructions:(e,n,t)=>{let i=e==null||e>1?"Klicken zum Auswählen oder Dateien hierher ziehen":"Klicken zum Auswählen oder Datei hierher ziehen";if(e||n){const l=[];if(e!=null&&e>1&&l.push(`bis zu ${e} Dateien`),n&&t){const r=a.formatFileSize(n,{units:t});l.push(`max ${r} je Datei`)}l.length>0&&(i+=` (${l.join(", ")})`)}return i},paginationLabel:"Seitennavigation",paginationRange:(e,n,t,i)=>i>t?`Zeilen ${e} bis ${n} von ${t} von ${i}`:`Zeilen ${e} bis ${n} von ${t}`,firstPage:"Erste Seite",previousPage:"Vorherige Seite",nextPage:"Nächste Seite",lastPage:"Letzte Seite",breadcrumbs:"Brotkrümelnavigation",commandPalette:"Befehlspalette",typeACommand:"Befehl eingeben...",noResultsFound:"Keine Ergebnisse gefunden",noMatchingCommands:"Keine passenden Befehle",appearanceSystem:"System",appearanceLight:"Hell",appearanceDark:"Dunkel",ok:"OK",changeTypeConfirmation:"Typänderung löscht den aktuellen Wert. Fortfahren?",notifications:"Benachrichtigungen",markAllAsRead:"Alle als gelesen markieren",noNotifications:"Keine Benachrichtigungen",schemaConflictsDetected:"Schemakonflikte erkannt",schemaViolationsDetected:"Schemaverletzungen erkannt",properties:"Eigenschaften",uploading:"Wird hochgeladen...",dropFilesOrBrowse:"Dateien hierher ziehen oder klicken zum Durchsuchen",acceptedTypes:e=>`Akzeptierte Typen: ${e}`,enterUrlPrompt:"URL eingeben:",exceeded:"(überschritten)",pdfPreview:"PDF-Vorschau",lexical:{fontFamily:"Schriftart",fontSize:"Schriftgröße",lineHeight:"Zeilenhöhe",fontColor:"Schriftfarbe",highlightColor:"Hervorhebungsfarbe",backgroundColor:"Hintergrundfarbe",bold:"Fett",italic:"Kursiv",underline:"Unterstrichen",strikethrough:"Durchgestrichen",code:"Code",clearFormatting:"Formatierung löschen",normal:"Normal",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",checkList:"Checkliste",indent:"Einzug vergrößern",outdent:"Einzug verkleinern",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",insertTable:"Tabelle einfügen",link:"Link",undo:"Rückgängig",redo:"Wiederholen",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen",defaultOption:"Standard",slashCommands:"Schrägstrich-Befehle",noCommandsFound:"Keine Befehle gefunden",changeBlockType:"Blocktyp ändern",blockTypes:"Blocktypen",enterUrl:"URL eingeben:",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"},dataTable:{sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren",clearSort:"Sortierung aufheben",filterPlaceholder:"Filtern...",clearFilter:"Filter löschen",selectAll:"Alle auswählen",deselectAll:"Alle abwählen",selectedCount:e=>`${e} ausgewählt`,resetAll:"Alles zurücksetzen",noResults:"Keine Ergebnisse gefunden",loading:"Wird geladen...",filterPanelAddCondition:"Bedingung hinzufügen",filterPanelApply:"Anwenden",filterPanelClear:"Filter löschen",filterPanelAnd:"UND",filterPanelOr:"ODER",filterPanelContains:"Enthält",filterPanelNotContains:"Enthält nicht",filterPanelEquals:"Gleich",filterPanelNotEquals:"Ungleich",filterPanelStartsWith:"Beginnt mit",filterPanelEndsWith:"Endet mit",filterPanelIsNull:"Ist leer",filterPanelIsNotNull:"Ist nicht leer",filterPanelGt:"Größer als",filterPanelGte:"Größer oder gleich",filterPanelLt:"Kleiner als",filterPanelLte:"Kleiner oder gleich",filterPanelBetween:"Zwischen",filterPanelValuePlaceholder:"Wert...",sortMultiHint:"Shift gedrückt halten, um mehrere Spalten zu sortieren",columnVisibility:"Spalten",showAllColumns:"Alle anzeigen",menuSortAsc:"Aufsteigend sortieren",menuSortDesc:"Absteigend sortieren",menuClearSort:"Sortierung aufheben",menuHideColumn:"Spalte ausblenden",menuChooseColumns:"Spalten auswählen",menuResetColumns:"Spalten zurücksetzen",menuFilter:"Filtern",rowCount:(e,n)=>`Zeilen: ${e} Zeilen gesamt: ${n}`,filterTagsPlaceholder:"Werte auswählen...",groupCount:e=>`${e} Einträge`,collapseGroup:"Gruppe einklappen",expandGroup:"Gruppe ausklappen",describeFilter:{textContains:(e,n)=>`${e} enthält "${n}"`,textNotContains:(e,n)=>`${e} enthält nicht "${n}"`,textEquals:(e,n)=>`${e} ist gleich "${n}"`,textNotEquals:(e,n)=>`${e} ist ungleich "${n}"`,textStartsWith:(e,n)=>`${e} beginnt mit "${n}"`,textEndsWith:(e,n)=>`${e} endet mit "${n}"`,compareEq:(e,n)=>`${e} = ${n}`,compareNeq:(e,n)=>`${e} ≠ ${n}`,compareGt:(e,n)=>`${e} > ${n}`,compareGte:(e,n)=>`${e} ≥ ${n}`,compareLt:(e,n)=>`${e} < ${n}`,compareLte:(e,n)=>`${e} ≤ ${n}`,rangeBetween:(e,n,t)=>`${e} zwischen ${n} und ${t}`,rangeGte:(e,n)=>`${e} ≥ ${n}`,rangeLte:(e,n)=>`${e} ≤ ${n}`,setIn:(e,n)=>`${e} in [${n}]`,setNotIn:(e,n)=>`${e} nicht in [${n}]`,booleanIs:(e,n)=>`${e} ist ${n}`,isNull:e=>`${e} ist leer`,isNotNull:e=>`${e} ist nicht leer`,compositeAnd:e=>e.join(" UND "),compositeOr:e=>e.join(" ODER ")}},prosemirror:{bold:"Fett",italic:"Kursiv",code:"Inline-Code",link:"Link einfügen",removeLink:"Link entfernen",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",linkUrlPlaceholder:"https://beispiel.com"},pdfPageViewer:{loading:"PDF wird geladen...",loadFailed:"PDF konnte nicht geladen werden",invalidPdf:"Ungültige PDF-Datei",pageOutOfRange:(e,n)=>`Seite ${e} liegt außerhalb des Bereichs (1-${n})`,renderFailed:"PDF-Seite konnte nicht gerendert werden"}};exports.default=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as a } from "./translations-
|
|
1
|
+
import { f as a } from "./translations-B96REXIk.js";
|
|
2
2
|
const s = {
|
|
3
3
|
loadingExtended: "Lädt, bitte warten",
|
|
4
4
|
loadingShort: "Lädt...",
|
|
@@ -59,21 +59,22 @@ const s = {
|
|
|
59
59
|
clearValue: "Wert löschen",
|
|
60
60
|
unknownType: "Unbekannter Typ",
|
|
61
61
|
filesInputInstructions: (e, n, t) => {
|
|
62
|
-
let
|
|
62
|
+
let i = e == null || e > 1 ? "Klicken zum Auswählen oder Dateien hierher ziehen" : "Klicken zum Auswählen oder Datei hierher ziehen";
|
|
63
63
|
if (e || n) {
|
|
64
|
-
const
|
|
65
|
-
if (e != null && e > 1 &&
|
|
64
|
+
const l = [];
|
|
65
|
+
if (e != null && e > 1 && l.push(`bis zu ${e} Dateien`), n && t) {
|
|
66
66
|
const r = a(n, {
|
|
67
67
|
units: t
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
l.push(`max ${r} je Datei`);
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
l.length > 0 && (i += ` (${l.join(", ")})`);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return i;
|
|
74
74
|
},
|
|
75
75
|
// Pagination
|
|
76
76
|
paginationLabel: "Seitennavigation",
|
|
77
|
+
paginationRange: (e, n, t, i) => i > t ? `Zeilen ${e} bis ${n} von ${t} von ${i}` : `Zeilen ${e} bis ${n} von ${t}`,
|
|
77
78
|
firstPage: "Erste Seite",
|
|
78
79
|
previousPage: "Vorherige Seite",
|
|
79
80
|
nextPage: "Nächste Seite",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Task as ye, Use as O, Value as f, prop as ae, html as g, attr as l, on as C, WithElement as te, Empty as M, aria as J, bind as ie, OnDispose as ne, coalesce as Ne, ForEach as ee, Fragment as N, Ensure as Pe, OneOfType as je, computedOf as A, input as se, emitValue as P, emitValueAsNumber as we, style as _e, When as U, NotEmpty as We, Repeat as Ze, signal as ke } from "@tempots/dom";
|
|
2
|
-
import { I as W, a as He, B as be } from "./input-container-
|
|
3
|
-
import { C as q, m as qe } from "./text-input-
|
|
4
|
-
import { I as Ae, m as Ye, c as Ge, C as oe, d as pe, e as Ce } from "./use-form-
|
|
5
|
-
import { B as F, d as ce, I as E, b as De, f as Ie } from "./translations-
|
|
2
|
+
import { I as W, a as He, B as be } from "./input-container-Q9wL2BUl.js";
|
|
3
|
+
import { C as q, m as qe } from "./text-input-DEAddaOi.js";
|
|
4
|
+
import { I as Ae, m as Ye, c as Ge, C as oe, d as pe, e as Ce } from "./use-form-CEY-gUUT.js";
|
|
5
|
+
import { B as F, d as ce, I as E, b as De, f as Ie } from "./translations-B96REXIk.js";
|
|
6
6
|
import { S as Le } from "./stack-BLMteGTn.js";
|
|
7
7
|
import { objectEntries as Je, delayedAnimationFrame as Xe, strictEqual as K } from "@tempots/std";
|
|
8
8
|
import { ElementRect as Qe } from "@tempots/ui";
|