@tempots/beatui 0.90.0 → 0.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ar-MUKILk4c.js → ar-8Cko5i-Z.js} +18 -10
- package/dist/{ar-CBrjAlIY.cjs → ar-D2DjoXta.cjs} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-DvVmqjnk.js → auth-divider-B4n8lGx5.js} +7 -7
- package/dist/{auth-divider-Cj-xJxF_.cjs → auth-divider-VzrKnv2d.cjs} +1 -1
- package/dist/beatui.css +299 -287
- package/dist/beatui.tailwind.css +299 -287
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +5 -5
- package/dist/{de-CEsW1rVX.js → de-Bt-d2iKj.js} +12 -4
- package/dist/{de-CrBw41po.cjs → de-Cdf3432J.cjs} +1 -1
- package/dist/deep-merge-CI1g9sjh.cjs +1 -0
- package/dist/{deep-merge-OvVqSLSN.js → deep-merge-DxUvbsBl.js} +42 -38
- package/dist/{duration-input-BCXujp0V.js → duration-input-DQTX3S_A.js} +4 -4
- package/dist/{duration-input-MJz6UO6E.cjs → duration-input-a1fCTfKl.cjs} +1 -1
- package/dist/{editor-toolbar-group-Cnta0SOa.js → editor-toolbar-group-CzdBZ1yr.js} +2 -2
- package/dist/{editor-toolbar-group-BgWLVgMZ.cjs → editor-toolbar-group-DhKJdqER.cjs} +1 -1
- package/dist/{es-ChP-aFwC.js → es-2llfNFX2.js} +10 -2
- package/dist/{es-Ca5xT3NE.cjs → es-6fFPkKHL.cjs} +1 -1
- package/dist/{fa-CNsrlIqh.js → fa-CQVIBjKP.js} +18 -10
- package/dist/{fa-DhZJYuC6.cjs → fa-GXyNzAXz.cjs} +1 -1
- package/dist/{fr-1nSKSIlw.cjs → fr-C6EYTwSH.cjs} +1 -1
- package/dist/{fr-DgEFKpML.js → fr-CC3smTlW.js} +19 -11
- package/dist/{he-DhcurPt5.cjs → he-CJUgxvi8.cjs} +1 -1
- package/dist/{he-B4TqfISZ.js → he-CZilsN75.js} +16 -8
- package/dist/{hi-TSoDsngT.js → hi-CAZjwGv-.js} +16 -8
- package/dist/{hi-CxsIxbfM.cjs → hi-DqIR4VtX.cjs} +1 -1
- package/dist/{index-D4ZFV8Rs.cjs → index-B-cwxUsP.cjs} +1 -1
- package/dist/{index-DOc1_-Nm.js → index-BFzxpY7y.js} +1 -1
- package/dist/{index-D3QVPAme.cjs → index-BOC0cVoY.cjs} +2 -2
- package/dist/{index-D_aTUfqS.js → index-DJ9YIJcG.js} +6 -6
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1847 -1822
- package/dist/{input-container-BBWCDGTv.js → input-container-9r1F3KuX.js} +1 -1
- package/dist/{input-container-B31Seozh.cjs → input-container-DiYEl_y8.cjs} +1 -1
- package/dist/{it-D_IcaYxp.cjs → it-BvHsJ7fH.cjs} +1 -1
- package/dist/{it-BrbebXg4.js → it-D6RXFIL6.js} +19 -11
- package/dist/{ja-CMGqpPo7.cjs → ja-B2gP7OHY.cjs} +1 -1
- package/dist/{ja-DcfOktrV.js → ja-D7zsz4Ij.js} +15 -7
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +11 -12
- 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 +6 -6
- package/dist/{ko-BPl5rP97.cjs → ko-BddhddIA.cjs} +1 -1
- package/dist/{ko-73e6t369.js → ko-taN2Npr4.js} +12 -4
- package/dist/lexical/index.cjs.js +30 -30
- package/dist/lexical/index.es.js +5847 -5625
- package/dist/lexical.css +79 -74
- package/dist/{modal-jJMS0ZlW.cjs → modal-C-d5Btti.cjs} +1 -1
- package/dist/{modal-BBJWY7NB.js → modal-DTz98Dk7.js} +3 -3
- package/dist/{nl-BSfaHFt0.cjs → nl-COrtZUnH.cjs} +1 -1
- package/dist/{nl-Bq-1-ulc.js → nl-CRC6r4Q4.js} +22 -14
- package/dist/{notice-9lpZ-VDn.cjs → notice-BDTfBGtx.cjs} +1 -1
- package/dist/{notice-AUVH8Lho.js → notice-CZuh-h6a.js} +4 -4
- package/dist/{oneof-branch-detection-BsGhMslW.cjs → oneof-branch-detection-D6Xa8qNR.cjs} +1 -1
- package/dist/{oneof-branch-detection-BQnRjp9P.js → oneof-branch-detection-DCPwyutI.js} +1 -1
- package/dist/{pl-D-O4sCnr.cjs → pl-BHI4zBgV.cjs} +1 -1
- package/dist/{pl-Du9-VCfW.js → pl-C6qNs0Lq.js} +19 -11
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-chEEYLlt.cjs → pt-BGzC9MhU.cjs} +1 -1
- package/dist/{pt-B2UqqSAB.js → pt-CcWPLqBh.js} +20 -12
- package/dist/{ru-B46hVpFF.cjs → ru-CXeFbIPb.cjs} +1 -1
- package/dist/{ru-DiWa2inw.js → ru-Dt9-9m0E.js} +20 -12
- package/dist/styles-url-BIeImEjl.js +4 -0
- package/dist/styles-url-CkPTI32j.cjs +1 -0
- package/dist/tailwind/vite-plugin.es.js +0 -1
- package/dist/{text-input-6FD7p7hN.js → text-input-BgPx8BbG.js} +1 -1
- package/dist/{text-input-w0eVcqk5.cjs → text-input-DUnhBUd6.cjs} +1 -1
- package/dist/{toolbar-Cr0JGj5h.js → toolbar-DKOh_gbA.js} +1 -1
- package/dist/{toolbar-BR8In7O0.cjs → toolbar-Dkc2y1dI.cjs} +1 -1
- package/dist/{tr-Culcm2Zb.js → tr-CDTWeRY0.js} +14 -6
- package/dist/{tr-CaMaflJL.cjs → tr-CdOtQAtA.cjs} +1 -1
- package/dist/{translations-CZ0KOii3.cjs → translations-BdCtLBZt.cjs} +1 -1
- package/dist/{translations-uEUkO6gJ.js → translations-CiBhB2FV.js} +135 -127
- package/dist/translations-Cy9hoMGV.cjs +1 -0
- package/dist/{translations-Cttn6w0G.js → translations-NBY7SubC.js} +1 -1
- package/dist/types/beatui-i18n/default.d.ts +8 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +8 -0
- package/dist/types/beatui-i18n/translations.d.ts +8 -0
- package/dist/types/components/form/input/index.d.ts +2 -0
- package/dist/types/components/form/input/nullable-color-input.d.ts +31 -0
- package/dist/types/components/form/input/nullable-color-swatch-input.d.ts +39 -0
- package/dist/types/components/lexical/table/table-controls.d.ts +3 -1
- package/dist/types/components/lexical/toolbar/index.d.ts +1 -0
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +16 -0
- package/dist/types/lexical/index.d.ts +2 -1
- package/dist/types/lexical/plugins/element-style.d.ts +29 -0
- package/dist/types/lexical/plugins/index.d.ts +1 -0
- package/dist/types/lexical/types.d.ts +48 -2
- package/dist/{ur-CvGP14xo.cjs → ur-C7itXvnC.cjs} +1 -1
- package/dist/{ur-Deb-uH6b.js → ur-CLrK5FPQ.js} +16 -8
- package/dist/{use-form-lg6-7Brc.js → use-form-Cd8YFWaN.js} +3 -3
- package/dist/{use-form-i97PToWB.cjs → use-form-DQVN_Zjb.cjs} +2 -2
- package/dist/{vi-CUsCVh3n.js → vi-B1_QDUQJ.js} +21 -13
- package/dist/{vi-Df4WZe9y.cjs → vi-CQrUWB3y.cjs} +1 -1
- package/dist/{widget-customization-CDD72zYs.js → widget-customization-Cs422IGY.js} +25 -25
- package/dist/{widget-customization-BLvD4Lqt.cjs → widget-customization-eyQ2pxvu.cjs} +1 -1
- package/dist/{zh-C5a9NGFW.cjs → zh-DWswYYTS.cjs} +1 -1
- package/dist/{zh-Dil2Jft8.js → zh-rDtQ92Pp.js} +12 -4
- package/package.json +1 -1
- package/dist/deep-merge-Dgy9xj6w.cjs +0 -1
- package/dist/styles-url-4g2WnNJ8.js +0 -4
- package/dist/styles-url-mlDYoWbF.cjs +0 -1
- package/dist/translations-gVgMyNno.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),L=require("../auth-divider-Cj-xJxF_.cjs"),I=require("../translations-gVgMyNno.cjs"),w=require("../notice-9lpZ-VDn.cjs"),y=require("../stack-4VUGISn6.cjs"),b=require("../input-container-B31Seozh.cjs"),v=require("../text-input-w0eVcqk5.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-VzrKnv2d.cjs"),I=require("../translations-Cy9hoMGV.cjs"),w=require("../notice-BDTfBGtx.cjs"),y=require("../stack-4VUGISn6.cjs"),b=require("../input-container-DiYEl_y8.cjs"),v=require("../text-input-DUnhBUd6.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-B4n8lGx5.js";
|
|
3
|
+
import { m as N } from "../translations-CiBhB2FV.js";
|
|
4
|
+
import { N as v, P as V, E as x } from "../notice-CZuh-h6a.js";
|
|
5
5
|
import { S as P } from "../stack-Bm-UZosx.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-9r1F3KuX.js";
|
|
7
|
+
import { T as I } from "../text-input-BgPx8BbG.js";
|
|
8
8
|
function F(t, e) {
|
|
9
9
|
return t.error ? (e.onError?.({
|
|
10
10
|
message: t.error.message,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as
|
|
1
|
+
import { f as a } from "./translations-CiBhB2FV.js";
|
|
2
2
|
const s = {
|
|
3
3
|
loadingExtended: "Lädt, bitte warten",
|
|
4
4
|
loadingShort: "Lädt...",
|
|
@@ -63,10 +63,10 @@ const s = {
|
|
|
63
63
|
if (e || n) {
|
|
64
64
|
const i = [];
|
|
65
65
|
if (e != null && e > 1 && i.push(`bis zu ${e} Dateien`), n && t) {
|
|
66
|
-
const
|
|
66
|
+
const l = a(n, {
|
|
67
67
|
units: t
|
|
68
68
|
});
|
|
69
|
-
i.push(`max ${
|
|
69
|
+
i.push(`max ${l} je Datei`);
|
|
70
70
|
}
|
|
71
71
|
i.length > 0 && (r += ` (${i.join(", ")})`);
|
|
72
72
|
}
|
|
@@ -144,7 +144,15 @@ const s = {
|
|
|
144
144
|
noCommandsFound: "Keine Befehle gefunden",
|
|
145
145
|
changeBlockType: "Blocktyp ändern",
|
|
146
146
|
blockTypes: "Blocktypen",
|
|
147
|
-
enterUrl: "URL eingeben:"
|
|
147
|
+
enterUrl: "URL eingeben:",
|
|
148
|
+
tableActions: "Table actions",
|
|
149
|
+
insertRowAbove: "Insert row above",
|
|
150
|
+
insertRowBelow: "Insert row below",
|
|
151
|
+
insertColumnLeft: "Insert column left",
|
|
152
|
+
insertColumnRight: "Insert column right",
|
|
153
|
+
deleteRow: "Delete row",
|
|
154
|
+
deleteColumn: "Delete column",
|
|
155
|
+
deleteTable: "Delete table"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./translations-Cy9hoMGV.cjs"),a={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,i)=>{let r=e==null||e>1?"Klicken zum Auswählen oder Dateien hierher ziehen":"Klicken zum Auswählen oder Datei hierher ziehen";if(e||n){const t=[];if(e!=null&&e>1&&t.push(`bis zu ${e} Dateien`),n&&i){const l=o.formatFileSize(n,{units:i});t.push(`max ${l} je Datei`)}t.length>0&&(r+=` (${t.join(", ")})`)}return r},paginationLabel:"Seitennavigation",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",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"},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=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("@tempots/dom"),w=require("./translations-Cy9hoMGV.cjs"),It=require("./colors-BI0YhONJ.cjs"),Vt=require("./timer-BJHOsuS6.cjs"),Ct=require("@tempots/ui"),B=require("./input-container-DiYEl_y8.cjs"),M=require("./use-form-DQVN_Zjb.cjs"),L=require("./text-input-DUnhBUd6.cjs"),st=require("./stack-4VUGISn6.cjs");let Y=null;async function Z(){const n=globalThis;return n.Temporal?n.Temporal:(Y||(Y=Promise.resolve().then(()=>require("./index.esm-C6lZ02yY.cjs")).then(e=>{const l=e.Temporal;return n.Temporal||(n.Temporal=l),l})),Y)}const it=(n,e)=>e?t.Task(Z,{then:n,pending:e.pending,error:e.error}):t.Task(Z,n);function q({onChange:n,value:e,accept:l="*/*",enableClick:r=!0,content:o,disabled:m=!1,allowMultiple:a}){return t.Use(w.BeatUII18n,h=>{const p=t.Value.deriveProp(e??[]),b=t.prop(!1),f=c=>{c.preventDefault(),c.stopPropagation(),b.value=!0},d=c=>{c.preventDefault(),c.stopPropagation(),(!c.currentTarget||!c.currentTarget.contains(c.relatedTarget))&&(b.value=!1)},v=c=>{c.preventDefault(),c.stopPropagation(),b.value=!1;const g=Array.from(c.dataTransfer?.files||[]);g.length>0&&(p.value=g,n(g,"dragdrop"))},s=c=>{t.Value.get(r)&&c.currentTarget.querySelector('input[type="file"]')?.click()};let u=null;const V=()=>{if(u==null)return;const c=Array.from(u.files??[]);c.length>0&&(p.value=c,n(c,"click")),u.value=""},k=c=>{t.Value.get(r)&&(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),s(c))};return t.html.div(t.attr.role("button"),t.attr.tabindex(t.Value.map(r,c=>c?0:-1)),t.attr.style("position: relative;"),t.on.dragover(f),t.on.dragleave(d),t.on.drop(v),t.on.click(s),t.on.keydown(k),t.html.input(t.attr.type("file"),t.attr.disabled(m),t.attr.accept(l),t.attr.multiple(a),t.attr.style("position: absolute; left: -9999px; opacity: 0; pointer-events: none;"),t.on.change(V),t.WithElement(c=>(u=c,p.on(g=>{const _=globalThis.DataTransfer;if(_!=null){const C=new _;g.forEach(O=>C.items.add(O)),c.files=C.files}}),t.Empty))),t.aria.label(t.bind(h.$.dropZoneInstructions)(r)),o({files:p,clear:()=>p.value=[],change:c=>p.set(c)}))})}function wt(n,e){return n.length===e.length&&n.every((l,r)=>l===e[r])}function _t(n,e,l){const r=["bc-segmented-input",`bc-segmented-input--size-${n}`];return l==="squared"&&r.push("bc-segmented-input--squared"),e&&r.push("bc-segmented-input--disabled"),r.join(" ")}function kt(n){if(n==null)return"";const e=new Map,l=w.backgroundValue(n,"solid","light"),r=w.backgroundValue(n,"solid","dark");return e.set("--si-indicator-bg",l.backgroundColor),e.set("--si-active-text",l.textColor),e.set("--si-indicator-bg-dark",r.backgroundColor),e.set("--si-active-text-dark",r.textColor),Array.from(e.entries()).map(([o,m])=>`${o}: ${m}`).join("; ")}function Dt({options:n,value:e,onChange:l,size:r="md",disabled:o=!1,variant:m="pill",color:a},...h){const p=It.l(n).map(([b,f])=>({key:b,label:f}));return t.WithElement(()=>{const b=Object.fromEntries(p.map((d,v)=>[d.key,v])),f=t.prop(p.map(()=>({left:0,width:0})),wt);return t.html.div(t.attr.class(t.computedOf(r,o,m)((d,v,s)=>_t(d??"md",v??!1,s??"pill"))),t.attr.style(a!=null?t.Value.map(a,d=>kt(d)):""),t.html.div(t.attr.class("bc-segmented-input__container"),t.html.div(t.attr.class("bc-segmented-input__indicator"),t.style.width(t.computedOf(e,f)((d,v)=>{const{width:s}=v[b[d]??0];return`${s}px`})),t.style.left(t.computedOf(e,f)((d,v)=>{const{left:s}=v[b[d]??0];return`${s}px`}))),p.map(({label:d,key:v},s)=>t.html.button(t.attr.type("button"),t.on.click(u=>{u.preventDefault(),t.Value.get(o)||l?.(v)}),t.attr.disabled(o),t.attr.class("bc-segmented-input__segment"),t.attr.class(t.Value.map(e,u=>u===v?"bc-segmented-input__segment--active":"bc-segmented-input__segment--inactive")),Ct.ElementRect(u=>{function V(){f.update(c=>{const g=[...c];return g[s]={width:u.value.width,left:u.value.localLeft},g})}const k=Vt.g(V);return t.OnDispose(k,u.on(V))}),d))),...h)})}function Et(n){const e=n.type.toLowerCase();return e.startsWith("image/")&&(e.includes("jpeg")||e.includes("jpg")||e.includes("png")||e.includes("gif")||e.includes("webp")||e.includes("svg"))}function Ut(n){const e=n.type.toLowerCase();return e.startsWith("image/")?"vscode-icons:file-type-image":e.startsWith("video/")?"vscode-icons:file-type-video":e.startsWith("audio/")?"vscode-icons:file-type-audio":e.includes("pdf")?"vscode-icons:file-type-pdf2":e.includes("word")||e.includes("document")?"vscode-icons:file-type-word":e.includes("excel")||e.includes("spreadsheet")?"vscode-icons:file-type-excel":e.includes("powerpoint")||e.includes("presentation")?"vscode-icons:file-type-powerpoint":e.includes("zip")||e.includes("archive")?"vscode-icons:file-type-zip":e.includes("text")?"vscode-icons:file-type-text":e.includes("json")?"vscode-icons:file-type-json-official":e.includes("csv")?"vscode-icons:file-type-csv":e.includes("xml")?"vscode-icons:file-type-xml":e.includes("yaml")?"vscode-icons:file-type-yaml-official":"vscode-icons:file-type-binary"}function G(n){return t.When(n.map(Et),()=>{const e=t.prop(null);return n.on(l=>{e.value&&URL.revokeObjectURL(e.value);const r=URL.createObjectURL(l);e.value=r}),t.html.div(t.OnDispose(()=>{e.value&&URL.revokeObjectURL(e.value)}),t.attr.class("bc-file-input__thumbnail-container"),t.html.img(t.attr.src(e),t.attr.alt(n.map(l=>l.name)),t.attr.class("bc-file-input__thumbnail")))},()=>w.Icon({icon:n.map(Ut)}))}const Ot=(n,...e)=>{const{value:l=t.prop([]),accept:r="*/*",maxFiles:o,maxFileSize:m,onChange:a,onBlur:h,disabled:p,hasError:b,mode:f="default",showFileList:d=!0,...v}=n,s=l,u=t.Value.map(f,I=>I==="input"),V=t.Value.map(f,I=>I==="compact"),k=I=>{let i=I;if(o!=null){const x=t.Value.get(o);i=i.slice(0,x)}if(m){const x=t.Value.get(m);i=i.filter(D=>D.size<=x)}a?.(i)},c=I=>{const x=s.value.filter((D,E)=>E!==I);a?.(x)},g=()=>{a?.([])},_=({files:I,clear:i,change:x})=>t.Use(w.BeatUII18n,D=>t.html.div(t.attr.class("bc-file-input__drop-zone"),t.html.div(t.attr.class("bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"),w.Icon({icon:"mdi:cloud-upload-outline",size:"xl"}),t.html.div(t.attr.class("bc-file-input__drop-zone-text"),t.bind(D.$.filesInputInstructions)(o,m,D.$.fileSizeUnits.value))))),C=({files:I})=>t.Use(w.BeatUII18n,i=>t.html.div(t.attr.class("bc-file-input__compact-drop-zone"),t.When(I.map(x=>x.length>0),()=>t.html.div(t.attr.class("bc-file-input__compact-file-list"),t.ForEach(I,(x,D)=>{const E=D.index;return t.html.div(t.attr.class("bc-file-input__compact-file-item"),t.html.div(t.attr.class("bc-file-input__compact-file-icon"),G(x)),t.html.div(t.attr.class("bc-file-input__compact-file-info"),t.html.div(t.attr.class("bc-file-input__compact-file-name"),t.attr.title(x.$.name),x.$.name),t.html.div(t.attr.class("bc-file-input__compact-file-meta"),t.computedOf(x.$.size,i.$.fileSizeUnits)((y,U)=>w.formatFileSize(y,{units:U}))," • ",t.computedOf(x.$.type,i.$.unknownType)((y,U)=>y||U))),M.CloseButton({size:"sm",label:i.$.removeFile,disabled:p,onClick:()=>c(E)},t.attr.class("bc-file-input__compact-remove-button")))})),()=>t.html.div(t.attr.class("bc-file-input__compact-placeholder"),w.Icon({icon:"mdi:cloud-upload-outline",size:"lg"}),t.html.div(t.attr.class("bc-file-input__compact-placeholder-text"),t.bind(i.$.filesInputInstructions)(o,m,i.$.fileSizeUnits.value)))))),O=({files:I})=>t.Use(w.BeatUII18n,i=>t.html.div(t.attr.class("bc-file-input__compact-input"),t.When(I.map(x=>x.length>0),()=>t.html.span(t.attr.class("bc-file-input__compact-value"),t.ForEach(I,x=>t.html.span(t.attr.class("bc-file-input__compact-value-item"),G(x),t.html.span(t.attr.class("bc-file-input__compact-value-item-name"),x.$.name)))),()=>t.html.span(t.attr.class("bc-file-input__compact-placeholder"),w.Icon({icon:"mdi:cloud-upload-outline",size:"md"})," ",t.bind(i.$.filesInputInstructions)(o,m,i.$.fileSizeUnits.value)))));return t.Use(w.BeatUII18n,I=>B.InputContainer({baseContainer:t.Value.map(u,i=>!i),disabled:p,hasError:b,after:t.When(u,()=>t.When(s.map(({length:i})=>i>0),()=>M.CloseButton({size:"sm",label:I.$.clearAllFiles,disabled:p,onClick:g},t.attr.class("bc-file-input__compact-clear")))),...v,input:t.When(u,()=>t.html.div(t.attr.class("bc-file-input bc-file-input--input"),q({value:s,accept:r,enableClick:!0,allowMultiple:t.Value.map(o??1/0,i=>i>1),disabled:p,onChange:k,content:O})),()=>t.When(V,()=>t.html.div(t.attr.class("bc-file-input bc-file-input--compact"),q({value:s,accept:r,enableClick:!0,allowMultiple:t.Value.map(o??1/0,i=>i>1),disabled:p,onChange:k,content:C})),()=>t.html.div(t.attr.class("bc-file-input"),q({value:s,accept:r,enableClick:!0,allowMultiple:t.Value.map(o??1/0,i=>i>1),disabled:p,onChange:k,content:_}),t.When(d,()=>t.NotEmpty(s,()=>t.Fragment(t.html.div(t.attr.class("bc-file-input__file-list"),t.ForEach(s,(i,x)=>{const D=x.index;return t.html.div(t.attr.class("bc-file-input__file-item"),t.html.div(t.attr.class("bc-file-input__file-icon"),G(i)),t.html.div(t.attr.class("bc-file-input__file-info"),t.html.div(t.attr.class("bc-file-input__file-name"),t.attr.title(i.$.name),i.$.name),t.html.div(t.attr.class("bc-file-input__file-meta"),t.computedOf(i.$.size,I.$.fileSizeUnits)((E,y)=>w.formatFileSize(E,{units:y}))," • ",t.computedOf(i.$.type,I.$.unknownType)((E,y)=>E||y))),M.CloseButton({size:"sm",label:I.$.removeFile,disabled:p,onClick:()=>c(D)},t.attr.class("bc-file-input__remove-button")))})),t.When(s.map(({length:i})=>i>1),()=>t.html.div(t.attr.class("bc-file-input__clear-all-button-container"),t.html.button(t.attr.type("button"),t.attr.class("bc-file-input__clear-all-button"),t.attr.disabled(p),I.$.clearAllFiles,t.on.click(i=>{i.preventDefault(),i.stopPropagation(),g()}))))))))))},...e))};function X(n,e,l){const r=t.Value.map(n,a=>a!=null),o=t.computedOf(r,e??!1)((a,h)=>!a||h),m=w.defaultMessages.clearValue;return t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__reset"),t.aria.label(m),t.attr.title(m),t.attr.disabled(o),w.Icon({icon:"mdi:close",size:"sm"}),t.on.click(a=>{a.stopPropagation(),l?.(null)}))}const Q="$$tts-exp-",ut=(n,e)=>t.WithElement(l=>{const r=`${Q}${n}`;return t.OnDispose(t.Value.on(e,o=>Reflect.set(l,r,o)))}),Mt=(n,e)=>{const l=`${Q}${n}`;return r=>{e(Reflect.get(r.target,l))}},ct=(n,e)=>{const l=`${Q}${n}`;return r=>{const o=r.target,m=o.selectedIndex,a=o.options[m];e(Reflect.get(a,l))}};function J(...n){return t.html.div(t.attr.class("bc-group"),...n)}const pt=(n,e,l)=>t.Ensure(n,r=>t.OneOfType(r,{value:o=>{const m=t.computedOf(o,l)((a,h)=>e(a.value,h));return t.html.option(t.attr.selected(m),ut("value",o.$.value),o.$.label)},group:o=>t.html.optgroup(t.attr.label(o.$.group),t.ForEach(o.$.options,m=>pt(m,e,l))),break:()=>t.html.hr()})),ft=n=>{const{value:e,onBlur:l,onChange:r,options:o,unselectedLabel:m,equality:a=(b,f)=>b===f,after:h}=n;let p;return B.InputContainer({...n,after:t.Fragment(B.InputIcon({icon:"ph:caret-down-bold",color:"neutral",size:"sm"}),h),input:t.html.select(t.WithElement(b=>{p=b;const f=new MutationObserver(d=>{const{removedNodes:v}=d[0];v.length>0&&(p.selectedIndex=0)});return f.observe(b,{childList:!0}),t.OnDispose(()=>f.disconnect())}),L.CommonInputAttributes(n),t.attr.class("bc-native-select bc-input"),t.Use(w.BeatUII18n,b=>t.html.option(t.attr.hidden("hidden"),t.coalesce(m,b.$.selectOne))),t.ForEach(o,b=>pt(b,a,e)),l!=null?t.on.blur(l):t.Empty,r!=null?t.on.change(ct("value",b=>r(b))):t.Empty)},t.on.click(()=>{if(p?.focus(),typeof p?.showPicker=="function")try{p.showPicker()}catch{}}))};function dt(n){const{controller:e,onChange:l,onBlur:r,...o}=n;return ft({...o,value:e.signal,onChange:M.makeOnChangeHandler(e,l),onBlur:M.makeOnBlurHandler(e,r)})}function $t(n){return M.InputWrapper({...n,content:dt(n)})}function mt(n,e,l){const r=n.length.map(o=>o);return t.Repeat(r,o=>{const m=n.item(o.index),a=[];return t.Fragment(t.OnDispose(()=>{a.forEach(h=>h())}),e({list:n,item:m,position:o,remove:()=>n.removeAt(o.index),move:h=>{switch(h){case"up":if(o.index===0)return;n.move(o.index,o.index-1);break;case"down":if(o.index===n.length.value-1)return;n.move(o.index,o.index+1);break;case"first":n.move(o.index,0);break;case"last":n.move(o.index,n.length.value-1)}},canMove:h=>{const p=(()=>{switch(h){case"up":return t.signal(o.index>0);case"down":return n.length.map(b=>o.index<b-1)}})();return a.push(()=>p.dispose()),p},cannotMove:h=>{const p=(()=>{switch(h){case"up":return t.signal(o.index===0);case"down":return n.length.map(b=>o.index===b-1)}})();return a.push(()=>p.dispose()),p}}))},l)}const nt={9:{pattern:/^[0-9]$/},A:{pattern:/^[A-Za-z]$/,transform:n=>n.toUpperCase()},"*":{pattern:/^.$/}},Bt=n=>n instanceof RegExp;function ht(n,e,l){if(n==null)return[];const r=l?{...nt,...e}:e??nt,o=(a,h)=>{const p=r[h];p?a.push({type:"pattern",name:h,...p}):a.push({type:"literal",char:h})},m=[];if(typeof n=="string"){for(const a of n)o(m,a);return m}for(const a of n)if(typeof a=="string")if(a.length<=1)o(m,a);else for(const h of a)o(m,h);else Bt(a)?m.push({type:"pattern",pattern:a}):typeof a=="object"&&a&&m.push(a);return m}function St(n,e){return l=>{switch(n){case"digits":return/[0-9]/.test(l);case"letters":return/[A-Za-z]/.test(l);case"alphanumeric":return/[A-Za-z0-9]/.test(l);case"custom":return e?.(l)??!0;default:return!0}}}function lt(n,e,l,r,o,m){const a={raw:n,previousConformed:e,cursor:o??n.length,completed:!1},h=r.definitions??{},p=typeof l=="function"?l(n,a):l,b=ht(p,h,r.useDefaultDefinitions??!0),f=St(r.allowMode,r.allow),d=new Set;for(const y of b)y.type==="literal"&&d.add(y.char);if(r.prefix)for(const y of r.prefix)d.add(y);if(r.suffix)for(const y of r.suffix)d.add(y);const v=Array.from(n).filter(y=>f(y)&&!d.has(y));if(v.length===0)return{value:"",cursor:0,completed:!1};const s=[],u=[];let V=0,k=0,c=0,g=-1;for(const y of b){if(y.type==="literal"){s.push(y.char),u.push({kind:"literal",filled:!0});continue}k+=y.optional?0:1;const U=v[V];if(U==null)break;if(y.type==="any"){c++,s.push(y.transform?y.transform(U):U),u.push({kind:"slot",filled:!0}),g=u.length-1,V++;continue}if(y.type==="pattern")if(y.pattern.test(U)){c++;const S=y.transform?y.transform(U):U;s.push(S),u.push({kind:"slot",filled:!0}),g=u.length-1,V++}else{V++;continue}}const _=s.join(""),C=(r.prefix??"")+_+(r.suffix??"");let I=(r.prefix??"").length;if(g>=0){let y=g+1;if((m?.policy??"smart")!=="sticky")for(;y<u.length&&u[y].kind==="literal";)y++;I+=y}const i=r.completion?.mode==="min"?(r.completion.minChars??0)<=c:r.completion?.mode==="custom"?!!r.completion.isComplete?.(C):k>0&&c>=k,x=r.pipe?.(C,{...a,completed:i});let D,E=I;return x===!1?(D=e,E=e.length):typeof x=="string"?(D=x,E=x.length):typeof x=="object"&&x?(D=x.value,E=x.cursor??x.value.length):D=C,{value:D,cursor:E,completed:i}}function Tt(n,e){const l=e?.strategy??"none";return l==="custom"&&e?.unmask?e.unmask(n):l==="strip"?n.replace(/[^A-Za-z0-9]/g,""):n}const K=n=>{const{value:e,onBlur:l,onChange:r,onInput:o,onAccept:m,onComplete:a,mask:h,definitions:p,useDefaultDefinitions:b,extraLiterals:f,prefix:d,suffix:v,autofix:s,pipe:u,completion:V,unmask:k,allowMode:c,allow:g,placeholder:_,placeholderOptions:C}=n,O=t.computedOf(e,h,p,b,f,d,v,s,V,k,c,_,C)((i,x,D,E,y,U,S,W,R,N,A,P,T)=>x?lt(i??"","",x,{definitions:D??{},useDefaultDefinitions:E??!0,extraLiterals:y??[],autofix:W??"none",completion:R??{mode:"mask"},pipe:u??($=>$),unmask:N??{strategy:"none"},allowMode:A??"all",allow:g,prefix:U,suffix:S}).value:i??""),I=(i,x)=>{const D=i.value??"",E=t.Value.get(e)??"",y=h!=null?t.Value.get(h):null,U=p!=null?t.Value.get(p):void 0,S=b!=null?t.Value.get(b):void 0,W=f!=null?t.Value.get(f):void 0,R=s!=null?t.Value.get(s):void 0,N=V!=null?t.Value.get(V):void 0,A=k!=null?t.Value.get(k):void 0,P=c!=null?t.Value.get(c):void 0,T=d!=null?t.Value.get(d):void 0,$=v!=null?t.Value.get(v):void 0,{value:F,cursor:H,completed:tt}=y?lt(D,E,y,{definitions:U??{},useDefaultDefinitions:S??!0,extraLiterals:W??[],autofix:R??"none",completion:N??{mode:"mask"},pipe:u??(yt=>yt),unmask:A??{strategy:"none"},allowMode:P??"all",allow:g,prefix:T,suffix:$},i.selectionStart??D.length,n.cursor?t.Value.get(n.cursor):void 0):{value:D,cursor:D.length,completed:!0};if(F!==D){i.value=F;try{i.setSelectionRange(H,H)}catch{}}const et=Tt(F,A);m?.({raw:et,conformed:F,completed:tt,cursor:H}),x==="input"?o?.(F):(r?.(F),tt&&a?.({raw:et,conformed:F}))};return B.InputContainer({...n,input:t.input.text(L.CommonInputAttributes(n),t.attr.value(O),t.attr.class("bc-input"),l!=null?t.on.blur(l):t.Empty,t.WithElement(i=>i instanceof HTMLInputElement?t.Fragment(t.on.input(()=>I(i,"input")),t.on.change(()=>I(i,"change")),t.on.keydown(x=>{if(x.key!=="Backspace"||!(n.cursor?t.Value.get(n.cursor)?.backspaceRubberBand??!0:!0))return;const E=i.selectionStart??0,y=i.selectionEnd??E;if(E!==y||E<=0)return;const U=i.value??"",S=h!=null?t.Value.get(h):null;if(!S)return;const W=p!=null?t.Value.get(p):void 0,R=b!=null?t.Value.get(b):!0,N=d!=null?t.Value.get(d):void 0,A=v!=null?t.Value.get(v):void 0,P=ht(typeof S=="function"?S(U,{raw:U,previousConformed:U,cursor:E,completed:!1}):S,W??{},R??!0),T=new Set;for(const $ of P)$.type==="literal"&&T.add($.char);if(N)for(const $ of N)T.add($);if(A)for(const $ of A)T.add($);if(T.has(U[E-1])){let $=E-1;for(;$>=0&&T.has(U[$]);)$--;$>=0&&(x.preventDefault(),x.stopPropagation(),i.value=U.slice(0,$)+U.slice($+1),I(i,"input"))}})):t.Empty))})},At=n=>{const{value:e,onBlur:l,onChange:r,onInput:o,rows:m}=n;return B.InputContainer({baseContainer:!0,...n,input:t.html.textarea(t.attr.class(t.computedOf(n.size??"md")(a=>B.generateInputContainerInputClasses(!1,a??"md"))),L.CommonInputAttributes(n),t.attr.rows(m??3),t.attr.value(e),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,r!=null?t.on.change(t.emitValue(r)):t.Empty,o!=null?t.on.input(t.emitValue(o)):t.Empty)})};function Ft(n){const e=String(n),l=e.indexOf(".");return l===-1?0:e.length-l-1}function z(n,e){const l=Ft(e);if(l===0)return Math.round(n);const r=Math.pow(10,l);return Math.round(n*r)/r}const zt=n=>{const{value:e,step:l,min:r,max:o,onBlur:m,onChange:a,onInput:h,after:p}=n,b=v=>{const s=r!=null?t.Value.get(r):void 0,u=o!=null?t.Value.get(o):void 0;return s!=null&&v<s?s:u!=null&&v>u?u:v},f=l!=null?t.Use(w.BeatUII18n,v=>{const s=t.computedOf(e,r)((c,g)=>g==null?!0:(c??0)>g),u=t.computedOf(e,o)((c,g)=>g==null?!0:(c??0)<g),V=c=>{const g=t.Value.get(e)??0,_=t.Value.get(l),C=c?.shiftKey?10:1,O=z(g-_*C,_),I=r!=null?t.Value.get(r):void 0;if(I!=null&&O<I)return;const i=b(O);i!==g&&a&&a(i)},k=c=>{const g=t.Value.get(e)??0,_=t.Value.get(l),C=c?.shiftKey?10:1,O=z(g+_*C,_),I=o!=null?t.Value.get(o):void 0;if(I!=null&&O>I)return;const i=b(O);i!==g&&a&&a(i)};return st.Stack(t.attr.class("bc-number-input-steppers"),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(u,n.disabled??!1)((c,g)=>!c||g)),t.on.click(c=>k(c)),t.aria.label(v.$.incrementValue),w.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(s,n.disabled??!1)((c,g)=>!c||g)),t.on.click(c=>V(c)),t.aria.label(v.$.decrementValue),w.Icon({icon:"line-md:minus",size:"xs"})))}):null,d=p!=null&&f!=null?t.Fragment(f,p):p??f;return B.InputContainer({...n,input:t.input.number(r!=null?t.attr.min(r):t.Empty,o!=null?t.attr.max(o):t.Empty,L.CommonInputAttributes(n),t.attr.valueAsNumber(e),t.attr.step(l),t.attr.class("bc-input bc-number-input"),m!=null?t.on.blur(t.emitValue(m)):t.Empty,a!=null?t.on.change(t.emitValueAsNumber(a)):t.Empty,h!=null?t.on.input(t.emitValueAsNumber(h)):t.Empty,l!=null?t.on.wheel(v=>{v.preventDefault();const s=t.Value.get(e)??0,u=t.Value.get(l),V=v.shiftKey?10:1,k=v.deltaY<0?u*V:-u*V,c=b(z(s+k,u));c!==s&&a&&a(c)}):t.Empty),after:d})},rt=n=>{if(n==null||n==="")return null;const e=Number(n);return Number.isNaN(e)?null:e},Lt=n=>{const{value:e,step:l,min:r,max:o,onBlur:m,onChange:a,onInput:h,after:p}=n,b=s=>{const u=r!=null?t.Value.get(r):void 0,V=o!=null?t.Value.get(o):void 0;return u!=null&&s<u?u:V!=null&&s>V?V:s},f=(()=>{if(l==null)return null;const s=t.computedOf(e,r)((g,_)=>{const C=g??0;return _==null?!0:C>_}),u=t.computedOf(e,o)((g,_)=>{const C=g??0;return _==null?!0:C<_}),V=g=>{const _=t.Value.get(e)??0,C=t.Value.get(l),O=g?.shiftKey?10:1,I=z(_-C*O,C),i=r!=null?t.Value.get(r):void 0;if(i!=null&&I<i)return;const x=b(I);x!==_&&a&&a(x)},k=g=>{const _=t.Value.get(e)??0,C=t.Value.get(l),O=g?.shiftKey?10:1,I=z(_+C*O,C),i=o!=null?t.Value.get(o):void 0;if(i!=null&&I>i)return;const x=b(I);x!==_&&a&&a(x)};return((g,_)=>st.Stack(t.attr.class("bc-number-input-steppers"),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(u,n.disabled??!1)((C,O)=>!C||O)),t.on.click(C=>k(C)),t.aria.label(g),w.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(s,n.disabled??!1)((C,O)=>!C||O)),t.on.click(C=>V(C)),t.aria.label(_),w.Icon({icon:"line-md:minus",size:"xs"}))))(w.defaultMessages.incrementValue,w.defaultMessages.decrementValue)})(),d=X(e,n.disabled,a??h),v=p!=null&&f!=null?t.Fragment(f,d,p):p!=null?t.Fragment(d,p):f!=null?t.Fragment(f,d):d;return B.InputContainer({...n,input:t.input.number(r!=null?t.attr.min(r):t.Empty,o!=null?t.attr.max(o):t.Empty,L.CommonInputAttributes(n),t.attr.value(t.Value.map(e,s=>s==null?"":String(s))),t.attr.step(l),t.attr.class("bc-input bc-number-input"),m!=null?t.on.blur(t.emitValue(m)):t.Empty,a!=null?t.on.change(t.emitValue(s=>{const u=rt(s);a(u)})):t.Empty,h!=null?t.on.input(t.emitValue(s=>{const u=rt(s);h(u)})):t.Empty,l!=null?t.on.wheel(s=>{s.preventDefault();const u=t.Value.get(e)??0,V=t.Value.get(l),k=s.shiftKey?10:1,c=s.deltaY<0?V*k:-V*k,g=b(z(u+c,V));g!==u&&a&&a(g)}):t.Empty),after:v})},Nt=n=>{const e={type:"pattern",pattern:/[0-9A-Fa-f]/,transform:r=>r.toLowerCase()};return K({...n,mask:[e,e,e,e,e,e,e,e,"-",e,e,e,e,"-",e,e,e,e,"-",e,e,e,e,"-",e,e,e,e,e,e,e,e,e,e,e,e],placeholder:n.placeholder??"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"})},Wt=/^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i,Rt=/^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;function bt(n){return{mask:null,allowMode:"custom",allow:e=>/[0-9ptwdhms]/i.test(e),pipe:e=>{const l=e.toUpperCase();return l.length===0?l:!l.startsWith("P")||!Wt.test(l)?!1:l},completion:{mode:"custom",isComplete:e=>{const l=e.toUpperCase();if(!Rt.test(l))return!1;try{return n(l),!0}catch{return!1}}}}}const ot=(n,e)=>{if(n==null)return null;try{return n.Duration.from(e)}catch{return null}},Pt=n=>{const{value:e,onChange:l,onInput:r,after:o,disabled:m,onBlur:a}=n,h=()=>{const f=X(e,m,l??r);return o!=null?t.Fragment(f,o):f},p=n.placeholder!=null?t.Empty:t.attr.placeholder("P0DT0H0M0S");return it(f=>K({...n,value:t.Value.map(e,d=>d?.toString()??""),onChange:l?d=>l(d===""?null:f.Duration.from(d)):void 0,onInput:void 0,...bt(f.Duration.from),placeholder:"P0DT0H0M0S",after:h()}),{pending:()=>{const f=d=>v=>{const u=v.currentTarget?.value??"";if(u===""){d(null);return}const V=globalThis.Temporal,k=ot(V,u);if(k!=null){d(k);return}Z().then(c=>{const g=ot(c,u);g!=null&&d(g)}).catch(()=>{})};return B.InputContainer({...n,input:t.input.text(L.CommonInputAttributes(n),t.attr.value(t.Value.map(e,d=>d?.toString()??"")),t.attr.class("bc-input"),p,a!=null?t.on.blur(()=>a()):t.Empty,l!=null?t.on.change(f(l)):t.Empty,r!=null?t.on.input(f(r)):t.Empty),after:h()})}})},jt=n=>{const{value:e,onBlur:l,onChange:r,onInput:o}=n;return B.InputContainer({...n,input:t.input.url(L.CommonInputAttributes(n),t.attr.value(e),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,r!=null?t.on.change(t.emitValue(r)):t.Empty,o!=null?t.on.input(t.emitValue(o)):t.Empty)})};function gt(n,e){const{onMove:l,cannotMoveUp:r,cannotMoveDown:o,onRemove:m,showMove:a=!0,showRemove:h=!0,removeDisabled:p,showMoveButtons:b=!0,layout:f="aside"}=n,d=t.Value.toSignal(f).map(u=>u==="aside"),v=t.When(a,()=>t.html.div(t.attr.class("bc-list-item-controls__move"),B.Button({size:"xs",roundedness:"full",variant:"text",onClick:()=>l("up"),disabled:r},t.Use(w.BeatUII18n,u=>w.Icon({size:"xs",icon:"line-md:arrow-up",title:u.$.incrementValue}))),B.Button({size:"xs",roundedness:"full",variant:"text",onClick:()=>l("down"),disabled:o},t.Use(w.BeatUII18n,u=>w.Icon({size:"xs",icon:"line-md:arrow-down",title:u.$.decrementValue}))))),s=t.When(h,()=>t.Use(w.BeatUII18n,u=>M.CloseButton({size:"xs",label:t.Value.map(u.$.removeItem,V=>V.toLowerCase()),color:"danger",disabled:p,onClick:m})));return t.When(d,()=>t.html.div(t.attr.class("bc-list-item-controls bc-list-item-controls--aside"),t.html.div(t.attr.class("bc-list-item-controls__content"),e),t.html.div(t.attr.class("bc-list-item-controls__actions"),t.When(b,()=>v),s)),()=>t.html.div(t.attr.class("bc-list-item-controls bc-list-item-controls--below"),t.html.div(t.attr.class("bc-list-item-controls__content"),e),t.html.div(t.attr.class("bc-list-item-controls__actions"),t.When(b,()=>v,()=>t.html.div()),s)))}const vt=n=>{const{controller:e,element:l,separator:r,showMove:o=!0,showRemove:m=!0,showAdd:a=!0,createItem:h,addLabel:p,controlsLayout:b="aside",removeDisabled:f,addDisabled:d}=n,v=t.When(t.computedOf(a,h)((s,u)=>s&&u!=null),()=>J(t.attr.class("bc-group--gap-2 bc-group--align-center bc-group--justify-center"),B.Button({size:"sm",variant:"filled",onClick:()=>e.push(h()),disabled:t.computedOf(e.disabled,d??!1)((s,u)=>s||u)},t.Use(w.BeatUII18n,s=>J(t.attr.class("bc-group--gap-2"),w.Icon({icon:"line-md:plus"}),p??s.$.addLabel)))));return t.Fragment(mt(e,s=>gt({onMove:s.move,cannotMoveUp:s.cannotMove("up"),cannotMoveDown:s.cannotMove("down"),onRemove:s.remove,showMove:o,showRemove:m,removeDisabled:f,showMoveButtons:e.signal.map(u=>u.length>1),layout:b},l(s)),r),v)},qt=(n,...e)=>{const{controller:l,element:r,separator:o,showMove:m,showRemove:a,showAdd:h,createItem:p,addLabel:b,controlsLayout:f,removeDisabled:d,addDisabled:v,...s}=n;return M.InputWrapper({...s,content:vt({controller:l,element:r,separator:o,showMove:m,showRemove:a,showAdd:h,createItem:p,addLabel:b,controlsLayout:f,removeDisabled:d,addDisabled:v})},...e)};class Zt extends M.Controller{branches;activeBranch;#e;#t=new Map;constructor(e,l,r,o,m,a,h=M.O){super(e,l,r,o,m,h),this.branches=a;const p=f=>{for(const d of a)if(d.detect(f))return d.key;return a[0]?.key??"unknown"};this.activeBranch=r.map(p,M.O);const b=f=>{if(this.#t.has(f))return this.#t.get(f);const d=a.find(s=>s.key===f);if(!d)throw new Error(`Unknown branch: ${f}`);const v=new M.Controller([...e,f],s=>{this.change(s)},this.signal.map(s=>d.detect(s)?s:d.defaultValue(),h),o.map(M.makeMapValidation([f])),{disabled:this.disabled,validationMode:this.parent.validationMode},h);return this.#t.set(f,v),v};this.#e=this.activeBranch.map(f=>b(f),M.O),this.onDispose(()=>{for(const f of this.#t.values())f.dispose();this.#t.clear(),this.activeBranch.dispose(),this.#e.dispose()})}get activeController(){return t.Value.get(this.#e)}getBranchController(e){const l=this.branches.find(o=>o.key===e);if(!l)throw new Error(`Unknown branch: ${e}`);if(this.#t.has(e))return this.#t.get(e);const r=new M.Controller([...this.path,e],o=>{this.change(o)},this.signal.map(o=>l.detect(o)?o:l.defaultValue(),M.O),this.status.map(M.makeMapValidation([e])),{disabled:this.disabled,validationMode:this.parent.validationMode},M.O);return this.#t.set(e,r),r}switchToBranch(e,l=!1){const r=this.branches.find(a=>a.key===e);if(!r)throw new Error(`Unknown branch: ${e}`);const o=t.Value.get(this.signal);if(r.detect(o))return!0;if(r.convert){const a=r.convert(o);if(a.ok)return this.change(a.value),!0}if(l&&typeof window=="object"&&typeof window.confirm=="function"&&!window.confirm(w.defaultMessages.changeTypeConfirmation))return!1;const m=r.defaultValue();return this.change(m),!0}get activeBranchDefinition(){const e=t.Value.get(this.activeBranch);return this.branches.find(l=>l.key===e)}}function Ht(n){return n.transform(e=>e??null,e=>e??void 0)}function Yt(n){return n.transform(e=>e??"",e=>e===""?void 0:e)}function Gt(n){return n.transform(e=>e??void 0,e=>e??null)}function j(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.prototype.toString.call(n)==="[object Object]"}function xt(n,e){if(e==null)return at(n);if(n==null)return e;if(j(n)&&j(e)){const l={...e};for(const r of Object.keys(n))l[r]===void 0?l[r]=at(n[r]):j(n[r])&&j(l[r])&&(l[r]=xt(n[r],l[r]));return l}return e}function at(n){return typeof structuredClone=="function"?structuredClone(n):JSON.parse(JSON.stringify(n))}exports.BaseListControl=vt;exports.BaseNativeSelectControl=dt;exports.Expando=ut;exports.FilesInput=Ot;exports.Group=J;exports.ListControl=qt;exports.ListInput=mt;exports.ListItemControls=gt;exports.MaskInput=K;exports.NativeSelect=ft;exports.NativeSelectControl=$t;exports.NullableDurationInput=Pt;exports.NullableNumberInput=Lt;exports.NullableResetAfter=X;exports.NumberInput=zt;exports.SegmentedInput=Dt;exports.TextArea=At;exports.UUIDInput=Nt;exports.UnionController=Zt;exports.UnstyledDropZone=q;exports.UrlInput=jt;exports.WithTemporal=it;exports.deepMergeDefaults=xt;exports.durationMaskConfig=bt;exports.emitExpando=Mt;exports.emitOptionExpando=ct;exports.ensureTemporal=Z;exports.roundToStep=z;exports.transformEmptyStringToUndefined=Yt;exports.transformNullToUndefined=Ht;exports.transformUndefinedToNull=Gt;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Task as ye, Use as O, Value as f, prop as ae, html as h, attr as l, on as C, WithElement as te, Empty as S, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Re, Fragment as N, ForEach as ee, coalesce as Ne, Ensure as Pe, OneOfType as je, Repeat as We, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
|
|
2
|
-
import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-
|
|
2
|
+
import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-CiBhB2FV.js";
|
|
3
3
|
import { l as Ze } from "./colors-BY0Ja_bf.js";
|
|
4
4
|
import { g as He } from "./timer-Rd2sKnvH.js";
|
|
5
5
|
import { ElementRect as qe } from "@tempots/ui";
|
|
6
|
-
import { I as W, a as Ye, g as Ge, B as be } from "./input-container-
|
|
7
|
-
import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-
|
|
8
|
-
import { C as q } from "./text-input-
|
|
6
|
+
import { I as W, a as Ye, g as Ge, B as be } from "./input-container-9r1F3KuX.js";
|
|
7
|
+
import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-Cd8YFWaN.js";
|
|
8
|
+
import { C as q } from "./text-input-BgPx8BbG.js";
|
|
9
9
|
import { S as Ae } from "./stack-Bm-UZosx.js";
|
|
10
10
|
let pe = null;
|
|
11
11
|
async function he() {
|
|
@@ -83,7 +83,11 @@ function de({
|
|
|
83
83
|
// Screen reader instructions
|
|
84
84
|
J.label(ie(g.$.dropZoneInstructions)(s)),
|
|
85
85
|
// Content
|
|
86
|
-
r({
|
|
86
|
+
r({
|
|
87
|
+
files: p,
|
|
88
|
+
clear: () => p.value = [],
|
|
89
|
+
change: (u) => p.set(u)
|
|
90
|
+
})
|
|
87
91
|
);
|
|
88
92
|
});
|
|
89
93
|
}
|
|
@@ -511,7 +515,25 @@ const St = (t, ...e) => {
|
|
|
511
515
|
...e
|
|
512
516
|
)
|
|
513
517
|
);
|
|
514
|
-
}
|
|
518
|
+
};
|
|
519
|
+
function Le(t, e, n) {
|
|
520
|
+
const s = f.map(t, (i) => i != null), r = V(
|
|
521
|
+
s,
|
|
522
|
+
e ?? !1
|
|
523
|
+
)((i, g) => !i || g), b = ce.clearValue;
|
|
524
|
+
return h.button(
|
|
525
|
+
l.type("button"),
|
|
526
|
+
l.class("bc-input-container__reset"),
|
|
527
|
+
J.label(b),
|
|
528
|
+
l.title(b),
|
|
529
|
+
l.disabled(r),
|
|
530
|
+
E({ icon: "mdi:close", size: "sm" }),
|
|
531
|
+
C.click((i) => {
|
|
532
|
+
i.stopPropagation(), n?.(null);
|
|
533
|
+
})
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
const ge = "$$tts-exp-", lt = (t, e) => te((n) => {
|
|
515
537
|
const s = `${ge}${t}`;
|
|
516
538
|
return ne(f.on(e, (r) => Reflect.set(n, s, r)));
|
|
517
539
|
}), Tt = (t, e) => {
|
|
@@ -529,7 +551,7 @@ const St = (t, ...e) => {
|
|
|
529
551
|
function $e(...t) {
|
|
530
552
|
return h.div(l.class("bc-group"), ...t);
|
|
531
553
|
}
|
|
532
|
-
const
|
|
554
|
+
const Ue = (t, e, n) => Pe(
|
|
533
555
|
t,
|
|
534
556
|
(s) => je(s, {
|
|
535
557
|
value: (r) => {
|
|
@@ -547,7 +569,7 @@ const Le = (t, e, n) => Pe(
|
|
|
547
569
|
l.label(r.$.group),
|
|
548
570
|
ee(
|
|
549
571
|
r.$.options,
|
|
550
|
-
(b) =>
|
|
572
|
+
(b) => Ue(
|
|
551
573
|
b,
|
|
552
574
|
e,
|
|
553
575
|
n
|
|
@@ -596,7 +618,7 @@ const Le = (t, e, n) => Pe(
|
|
|
596
618
|
Ne(b, v.$.selectOne)
|
|
597
619
|
)
|
|
598
620
|
),
|
|
599
|
-
ee(r, (v) =>
|
|
621
|
+
ee(r, (v) => Ue(v, i, e)),
|
|
600
622
|
n != null ? C.blur(n) : S,
|
|
601
623
|
s != null ? C.change(rt("value", (v) => s(v))) : S
|
|
602
624
|
)
|
|
@@ -690,7 +712,7 @@ const Me = {
|
|
|
690
712
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
691
713
|
"*": { pattern: /^.$/ }
|
|
692
714
|
}, at = (t) => t instanceof RegExp;
|
|
693
|
-
function
|
|
715
|
+
function Ee(t, e, n) {
|
|
694
716
|
if (t == null) return [];
|
|
695
717
|
const s = n ? { ...Me, ...e } : e ?? Me, r = (i, g) => {
|
|
696
718
|
const p = s[g];
|
|
@@ -729,7 +751,7 @@ function Se(t, e, n, s, r, b) {
|
|
|
729
751
|
previousConformed: e,
|
|
730
752
|
cursor: r ?? t.length,
|
|
731
753
|
completed: !1
|
|
732
|
-
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v =
|
|
754
|
+
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Ee(
|
|
733
755
|
p,
|
|
734
756
|
g,
|
|
735
757
|
s.useDefaultDefinitions ?? !0
|
|
@@ -780,7 +802,7 @@ function ft(t, e) {
|
|
|
780
802
|
const n = e?.strategy ?? "none";
|
|
781
803
|
return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
782
804
|
}
|
|
783
|
-
const
|
|
805
|
+
const Oe = (t) => {
|
|
784
806
|
const {
|
|
785
807
|
value: e,
|
|
786
808
|
onBlur: n,
|
|
@@ -885,7 +907,7 @@ const Ee = (t) => {
|
|
|
885
907
|
if (z !== _ || z <= 0) return;
|
|
886
908
|
const B = c.value ?? "", R = g != null ? f.get(g) : null;
|
|
887
909
|
if (!R) return;
|
|
888
|
-
const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le =
|
|
910
|
+
const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le = Ee(
|
|
889
911
|
typeof R == "function" ? R(B, {
|
|
890
912
|
raw: B,
|
|
891
913
|
previousConformed: B,
|
|
@@ -909,25 +931,7 @@ const Ee = (t) => {
|
|
|
909
931
|
)
|
|
910
932
|
)
|
|
911
933
|
});
|
|
912
|
-
}
|
|
913
|
-
function Oe(t, e, n) {
|
|
914
|
-
const s = f.map(t, (i) => i != null), r = V(
|
|
915
|
-
s,
|
|
916
|
-
e ?? !1
|
|
917
|
-
)((i, g) => !i || g), b = ce.clearValue;
|
|
918
|
-
return h.button(
|
|
919
|
-
l.type("button"),
|
|
920
|
-
l.class("bc-input-container__reset"),
|
|
921
|
-
J.label(b),
|
|
922
|
-
l.title(b),
|
|
923
|
-
l.disabled(r),
|
|
924
|
-
E({ icon: "mdi:close", size: "sm" }),
|
|
925
|
-
C.click((i) => {
|
|
926
|
-
i.stopPropagation(), n?.(null);
|
|
927
|
-
})
|
|
928
|
-
);
|
|
929
|
-
}
|
|
930
|
-
const Bt = (t) => {
|
|
934
|
+
}, Bt = (t) => {
|
|
931
935
|
const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
|
|
932
936
|
return W({
|
|
933
937
|
baseContainer: !0,
|
|
@@ -1117,7 +1121,7 @@ const Vt = (t) => {
|
|
|
1117
1121
|
ce.incrementValue,
|
|
1118
1122
|
ce.decrementValue
|
|
1119
1123
|
);
|
|
1120
|
-
})(), m =
|
|
1124
|
+
})(), m = Le(
|
|
1121
1125
|
e,
|
|
1122
1126
|
t.disabled,
|
|
1123
1127
|
i ?? g
|
|
@@ -1161,7 +1165,7 @@ const Vt = (t) => {
|
|
|
1161
1165
|
pattern: /[0-9A-Fa-f]/,
|
|
1162
1166
|
transform: (s) => s.toLowerCase()
|
|
1163
1167
|
};
|
|
1164
|
-
return
|
|
1168
|
+
return Oe({
|
|
1165
1169
|
...t,
|
|
1166
1170
|
mask: [
|
|
1167
1171
|
e,
|
|
@@ -1237,11 +1241,11 @@ const ze = (t, e) => {
|
|
|
1237
1241
|
}
|
|
1238
1242
|
}, Ut = (t) => {
|
|
1239
1243
|
const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
|
|
1240
|
-
const d =
|
|
1244
|
+
const d = Le(e, b, n ?? s);
|
|
1241
1245
|
return r != null ? N(d, r) : d;
|
|
1242
1246
|
}, p = t.placeholder != null ? S : l.placeholder("P0DT0H0M0S");
|
|
1243
1247
|
return Qe(
|
|
1244
|
-
(d) =>
|
|
1248
|
+
(d) => Oe({
|
|
1245
1249
|
...t,
|
|
1246
1250
|
value: f.map(e, (m) => m?.toString() ?? ""),
|
|
1247
1251
|
onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
|
|
@@ -1674,8 +1678,8 @@ export {
|
|
|
1674
1678
|
St as F,
|
|
1675
1679
|
$e as G,
|
|
1676
1680
|
Ot as L,
|
|
1677
|
-
|
|
1678
|
-
|
|
1681
|
+
Oe as M,
|
|
1682
|
+
Le as N,
|
|
1679
1683
|
Mt as S,
|
|
1680
1684
|
Bt as T,
|
|
1681
1685
|
Lt as U,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Value as s, Use as H, computedOf as S, html as k, attr as o, on as T, aria as F, Fragment as B, input as R, Empty as N, emitValue as x } from "@tempots/dom";
|
|
2
|
-
import { F as X, M as z, N as j, W as A, d as Y } from "./deep-merge-
|
|
3
|
-
import { B as q, I as M } from "./translations-
|
|
2
|
+
import { F as X, M as z, N as j, W as A, d as Y } from "./deep-merge-DxUvbsBl.js";
|
|
3
|
+
import { B as q, I as M } from "./translations-CiBhB2FV.js";
|
|
4
4
|
import { S as G } from "./stack-Bm-UZosx.js";
|
|
5
|
-
import { I as L } from "./input-container-
|
|
6
|
-
import { C as Q } from "./text-input-
|
|
5
|
+
import { I as L } from "./input-container-9r1F3KuX.js";
|
|
6
|
+
import { C as Q } from "./text-input-BgPx8BbG.js";
|
|
7
7
|
const un = (n) => {
|
|
8
8
|
const {
|
|
9
9
|
value: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("@tempots/dom"),V=require("./deep-merge-
|
|
1
|
+
"use strict";const t=require("@tempots/dom"),V=require("./deep-merge-CI1g9sjh.cjs"),y=require("./translations-Cy9hoMGV.cjs"),q=require("./stack-4VUGISn6.cjs"),A=require("./input-container-DiYEl_y8.cjs"),$=require("./text-input-DUnhBUd6.cjs"),E=n=>{const{value:e,onInput:p,onChange:i,...a}=n;return V.FilesInput({...a,maxFiles:1,value:t.Value.map(e,r=>r==null?[]:[r]),onChange:r=>{i?.(r[0])},onInput:r=>{p?.(r[0])}})},F=n=>{try{return BigInt(n)}catch{return null}},w=n=>{const{value:e,step:p,min:i,max:a,onChange:r,onInput:d,after:I}=n,f=c=>{const u=i!=null?t.Value.get(i):void 0,o=a!=null?t.Value.get(a):void 0;return u!=null&&c<u?u:o!=null&&c>o?o:c},g=p!=null?t.Use(y.BeatUII18n,c=>{const u=t.computedOf(e,i)((s,l)=>l==null?!0:(s??0n)>l),o=t.computedOf(e,a)((s,l)=>l==null?!0:(s??0n)<l),T=(s,l)=>{const b=t.Value.get(e)??0n,h=t.Value.get(p),O=l?.shiftKey?10n:1n,C=b+h*O*s,v=i!=null?t.Value.get(i):void 0,S=a!=null?t.Value.get(a):void 0;if(s<0n&&v!=null&&C<v||s>0n&&S!=null&&C>S)return;const D=f(C);D!==b&&r&&r(D)};return q.Stack(t.attr.class("bc-number-input-steppers"),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(o,n.disabled??!1)((s,l)=>!s||l)),t.on.click(s=>T(1n,s)),t.aria.label(c.$.incrementValue),y.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(u,n.disabled??!1)((s,l)=>!s||l)),t.on.click(s=>T(-1n,s)),t.aria.label(c.$.decrementValue),y.Icon({icon:"line-md:minus",size:"xs"})))}):null,m=I!=null&&g!=null?t.Fragment(g,I):I??g,B=r?c=>{const u=F(c);u!=null&&r(f(u))}:void 0,k=d?c=>{const u=F(c);u!=null&&d(f(u))}:void 0;return V.MaskInput({...n,value:t.Value.map(e,c=>c.toString()),onChange:B,onInput:k,after:m,mask:null,allowMode:"digits",classes:{...n.classes,input:n.classes?.input?t.Value.map(n.classes.input,c=>`bc-number-input ${c}`):"bc-number-input"}})},M=n=>{if(n==null||n==="")return null;try{return BigInt(n)}catch{return null}},z=n=>{const{value:e,step:p,min:i,max:a,onChange:r,onInput:d,after:I}=n,f=u=>{const o=i!=null?t.Value.get(i):void 0,T=a!=null?t.Value.get(a):void 0;return o!=null&&u<o?o:T!=null&&u>T?T:u},g=p!=null?t.Use(y.BeatUII18n,u=>{const o=t.computedOf(e,i)((l,b)=>{const h=l??0n;return b==null?!0:h>b}),T=t.computedOf(e,a)((l,b)=>{const h=l??0n;return b==null?!0:h<b}),s=(l,b)=>{const h=t.Value.get(e)??0n,O=t.Value.get(p),C=b?.shiftKey?10n:1n,v=h+O*C*l,S=i!=null?t.Value.get(i):void 0,D=a!=null?t.Value.get(a):void 0;if(l<0n&&S!=null&&v<S||l>0n&&D!=null&&v>D)return;const x=f(v);x!==h&&r&&r(x)};return q.Stack(t.attr.class("bc-number-input-steppers"),t.attr.type("button"),t.html.button(t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(T,n.disabled??!1)((l,b)=>!l||b)),t.on.click(l=>s(1n,l)),t.aria.label(u.$.incrementValue),y.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.type("button"),t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(o,n.disabled??!1)((l,b)=>!l||b)),t.on.click(l=>s(-1n,l)),t.aria.label(u.$.decrementValue),y.Icon({icon:"line-md:minus",size:"xs"})))}):null,m=V.NullableResetAfter(e,n.disabled,r??d),B=I!=null&&g!=null?t.Fragment(g,m,I):I!=null?t.Fragment(m,I):g!=null?t.Fragment(g,m):m,k=r?u=>{const o=M(u);r(o===null?null:f(o))}:void 0,c=d?u=>{const o=M(u);d(o===null?null:f(o))}:void 0;return V.MaskInput({...n,value:t.Value.map(e,u=>u==null?"":u.toString()),onChange:k,onInput:c,after:B,mask:null,allowMode:"digits",classes:{...n.classes,input:n.classes?.input?t.Value.map(n.classes.input,u=>`bc-number-input ${u}`):"bc-number-input"}})};function P(n){return e=>{const{value:p,onBlur:i,onChange:a}=e;return V.WithTemporal(r=>A.InputContainer({...e,input:t.input[n.inputType]($.CommonInputAttributes(e),t.attr.value(t.Value.map(p,n.valueToString)),t.attr.class("bc-input"),i!=null?t.on.blur(t.emitValue(i)):t.Empty,a!=null?t.on.change(t.emitValue(d=>a(n.parseValue(r,d)))):t.Empty)}))}}function N(n){return e=>{const{value:p,onBlur:i,onChange:a,onInput:r,after:d,disabled:I}=e,f=V.NullableResetAfter(p,I,a??r);return V.WithTemporal(g=>A.InputContainer({...e,input:t.input[n.inputType]($.CommonInputAttributes(e),t.attr.value(t.Value.map(p,m=>m==null?"":n.valueToString(m))),t.attr.class("bc-input"),i!=null?t.on.blur(t.emitValue(i)):t.Empty,a!=null?t.on.change(t.emitValue(m=>a(m===""?null:n.parseValue(g,m)))):t.Empty,r!=null?t.on.input(t.emitValue(m=>r(m===""?null:n.parseValue(g,m)))):t.Empty),after:d!=null?t.Fragment(f,d):f}))}}const U=P({inputType:"date",valueToString:n=>n.toString(),parseValue:(n,e)=>n.PlainDate.from(e)}),W=N({inputType:"date",valueToString:n=>n.toString(),parseValue:(n,e)=>n.PlainDate.from(e)}),J=P({inputType:"time",valueToString:n=>n.toString(),parseValue:(n,e)=>n.PlainTime.from(e)}),K=N({inputType:"time",valueToString:n=>n.toString(),parseValue:(n,e)=>n.PlainTime.from(e)}),R=P({inputType:"datetime-local",valueToString:n=>n.toJSON(),parseValue:(n,e)=>n.PlainDateTime.from(e)}),H=N({inputType:"datetime-local",valueToString:n=>n.toJSON(),parseValue:(n,e)=>n.PlainDateTime.from(e)}),j=n=>{const{value:e,onChange:p}=n;return V.WithTemporal(i=>V.MaskInput({...n,value:t.Value.map(e,a=>a.toString()),onChange:p?a=>p(i.Duration.from(a)):void 0,onInput:void 0,...V.durationMaskConfig(i.Duration.from),placeholder:"P0DT0H0M0S"}))};exports.BigintInput=w;exports.DurationInput=j;exports.FileInput=E;exports.NullableBigintInput=z;exports.NullablePlainDateInput=W;exports.NullablePlainDateTimeInput=H;exports.NullablePlainTimeInput=K;exports.PlainDateInput=U;exports.PlainDateTimeInput=R;exports.PlainTimeInput=J;exports.createNullableTemporalInput=N;exports.createTemporalInput=P;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { When as e, attr as i, aria as u, computedOf as b } from "@tempots/dom";
|
|
2
|
-
import { T as m, a as d } from "./toolbar-
|
|
3
|
-
import { I as f } from "./translations-
|
|
2
|
+
import { T as m, a as d } from "./toolbar-DKOh_gbA.js";
|
|
3
|
+
import { I as f } from "./translations-CiBhB2FV.js";
|
|
4
4
|
function v(t) {
|
|
5
5
|
const { active: o, display: a, onClick: n, disabled: s, label: l, icon: c, size: r } = t;
|
|
6
6
|
return e(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("@tempots/dom"),n=require("./toolbar-
|
|
1
|
+
"use strict";const o=require("@tempots/dom"),n=require("./toolbar-Dkc2y1dI.cjs"),b=require("./translations-Cy9hoMGV.cjs");function d(r){const{active:t,display:a,onClick:i,disabled:l,label:s,icon:u,size:e}=r;return o.When(a,()=>n.ToolbarButton({onClick:i,disabled:l,size:e},o.attr.class(t.map(c=>c?"bc-toolbar__button--active":"")),o.aria.pressed(t),o.attr.title(s),b.Icon({icon:u,size:e})))}function p({display:r},...t){return o.When(o.computedOf(...r)((...a)=>a.some(Boolean)),()=>n.ToolbarGroup(...t))}exports.EditorToolbarButton=d;exports.EditorToolbarGroup=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as t } from "./translations-
|
|
1
|
+
import { f as t } from "./translations-CiBhB2FV.js";
|
|
2
2
|
const c = {
|
|
3
3
|
loadingExtended: "Cargando, por favor espere",
|
|
4
4
|
loadingShort: "Cargando...",
|
|
@@ -144,7 +144,15 @@ const c = {
|
|
|
144
144
|
noCommandsFound: "No se encontraron comandos",
|
|
145
145
|
changeBlockType: "Cambiar tipo de bloque",
|
|
146
146
|
blockTypes: "Tipos de bloque",
|
|
147
|
-
enterUrl: "Introducir URL:"
|
|
147
|
+
enterUrl: "Introducir URL:",
|
|
148
|
+
tableActions: "Acciones de tabla",
|
|
149
|
+
insertRowAbove: "Insertar fila arriba",
|
|
150
|
+
insertRowBelow: "Insertar fila abajo",
|
|
151
|
+
insertColumnLeft: "Insertar columna izquierda",
|
|
152
|
+
insertColumnRight: "Insertar columna derecha",
|
|
153
|
+
deleteRow: "Eliminar fila",
|
|
154
|
+
deleteColumn: "Eliminar columna",
|
|
155
|
+
deleteTable: "Eliminar tabla"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./translations-Cy9hoMGV.cjs"),l={loadingExtended:"Cargando, por favor espere",loadingShort:"Cargando...",locale:"Idioma",iconDescription:"Icono",loadingIcon:"Icono de carga",failedToLoadIcon:"Error al cargar el icono",editLabel:"Editar",selectOne:"Seleccionar uno",selectNone:"Ninguno",selectMany:"Seleccionar varios",noResults:"Sin resultados",passwordPlaceholderText:"Contraseña Secreta",togglePasswordVisibility:"Alternar visibilidad de contraseña",toggleMenu:"Alternar menú",toggleAside:"Alternar panel lateral",mainNavigation:"Navegación principal",sidebar:"Barra lateral",closeDrawer:"Cerrar cajón",closeModal:"Cerrar modal",confirm:"Confirmar",cancel:"Cancelar",addLabel:"Agregar",removeItem:"Eliminar elemento",currentLocale:"Español",ar:"Árabe",de:"Alemán",en:"Inglés",es:"Español",fr:"Francés",hi:"Hindi",it:"Italiano",ja:"Japonés",ko:"Coreano",nl:"Neerlandés",pl:"Polaco",pt:"Portugués",ru:"Ruso",tr:"Turco",vi:"Vietnamita",zh:"Chino",he:"Hebreo",fa:"Persa",ur:"Urdu",emailPlaceholderText:"Correo electrónico",incrementValue:"Incrementar valor",decrementValue:"Decrementar valor",dropZoneInstructions:a=>a?"Haz clic para elegir o arrastra archivos aquí, o presiona Enter o Espacio para abrir el selector de archivos":"Arrastra archivos aquí",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Eliminar archivo",clearAllFiles:"Borrar todos los archivos",clearValue:"Borrar valor",unknownType:"Tipo desconocido",filesInputInstructions:(a,e,r)=>{let i=a==null||a>1?"Haz clic para elegir o arrastra archivos aquí":"Haz clic para elegir o arrastra un archivo aquí";if(a||e){const o=[];if(a!=null&&a>1&&o.push(`hasta ${a} archivos`),e&&r){const n=t.formatFileSize(e,{units:r});o.push(`máx ${n} cada uno`)}o.length>0&&(i+=` (${o.join(", ")})`)}return i},paginationLabel:"Paginación",firstPage:"Primera página",previousPage:"Página anterior",nextPage:"Página siguiente",lastPage:"Última página",breadcrumbs:"Migas de pan",commandPalette:"Paleta de comandos",typeACommand:"Escribir un comando...",noResultsFound:"No se encontraron resultados",noMatchingCommands:"No hay comandos coincidentes",appearanceSystem:"Sistema",appearanceLight:"Claro",appearanceDark:"Oscuro",ok:"OK",changeTypeConfirmation:"Cambiar el tipo borrará el valor actual. ¿Continuar?",notifications:"Notificaciones",markAllAsRead:"Marcar todo como leído",noNotifications:"No hay notificaciones",schemaConflictsDetected:"Conflictos de esquema detectados",schemaViolationsDetected:"Violaciones de esquema detectadas",properties:"Propiedades",uploading:"Subiendo...",dropFilesOrBrowse:"Arrastra archivos aquí o haz clic para explorar",acceptedTypes:a=>`Tipos aceptados: ${a}`,enterUrlPrompt:"Introducir URL:",exceeded:"(excedido)",pdfPreview:"Vista previa de PDF",lexical:{fontFamily:"Familia tipográfica",fontSize:"Tamaño de fuente",fontColor:"Color de fuente",highlightColor:"Color de resaltado",backgroundColor:"Color de fondo",bold:"Negrita",italic:"Cursiva",underline:"Subrayado",strikethrough:"Tachado",code:"Código",clearFormatting:"Borrar formato",normal:"Normal",heading:a=>`Encabezado ${a}`,bulletList:"Lista con viñetas",orderedList:"Lista numerada",checkList:"Lista de verificación",indent:"Aumentar sangría",outdent:"Disminuir sangría",blockquote:"Cita",codeBlock:"Bloque de código",horizontalRule:"Línea horizontal",insertTable:"Insertar tabla",link:"Enlace",undo:"Deshacer",redo:"Rehacer",cut:"Cortar",copy:"Copiar",paste:"Pegar",defaultOption:"Predeterminado",slashCommands:"Comandos de barra",noCommandsFound:"No se encontraron comandos",changeBlockType:"Cambiar tipo de bloque",blockTypes:"Tipos de bloque",enterUrl:"Introducir URL:",tableActions:"Acciones de tabla",insertRowAbove:"Insertar fila arriba",insertRowBelow:"Insertar fila abajo",insertColumnLeft:"Insertar columna izquierda",insertColumnRight:"Insertar columna derecha",deleteRow:"Eliminar fila",deleteColumn:"Eliminar columna",deleteTable:"Eliminar tabla"},prosemirror:{bold:"Negrita",italic:"Cursiva",code:"Código en línea",link:"Insertar enlace",removeLink:"Eliminar enlace",heading:a=>`Encabezado ${a}`,bulletList:"Lista con viñetas",orderedList:"Lista numerada",blockquote:"Cita",codeBlock:"Bloque de código",horizontalRule:"Línea horizontal",linkUrlPlaceholder:"https://ejemplo.com"},pdfPageViewer:{loading:"Cargando PDF...",loadFailed:"Error al cargar el PDF",invalidPdf:"Archivo PDF inválido",pageOutOfRange:(a,e)=>`La página ${a} está fuera de rango (1-${e})`,renderFailed:"Error al renderizar la página del PDF"}};exports.default=l;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as i } from "./translations-
|
|
1
|
+
import { f as i } from "./translations-CiBhB2FV.js";
|
|
2
2
|
const d = {
|
|
3
3
|
loadingExtended: "در حال بارگذاری، لطفاً صبر کنید",
|
|
4
4
|
loadingShort: "در حال بارگذاری...",
|
|
@@ -58,19 +58,19 @@ const d = {
|
|
|
58
58
|
// inputs reset
|
|
59
59
|
clearValue: "حذف مقدار",
|
|
60
60
|
unknownType: "نوع ناشناخته",
|
|
61
|
-
filesInputInstructions: (e, o,
|
|
62
|
-
let
|
|
61
|
+
filesInputInstructions: (e, o, l) => {
|
|
62
|
+
let n = e == null || e > 1 ? "برای انتخاب کلیک کنید یا فایلها را بکشید" : "برای انتخاب کلیک کنید یا فایل را بکشید";
|
|
63
63
|
if (e || o) {
|
|
64
64
|
const t = [];
|
|
65
|
-
if (e != null && e > 1 && t.push(`تا ${e} فایل`), o &&
|
|
66
|
-
const
|
|
67
|
-
units:
|
|
65
|
+
if (e != null && e > 1 && t.push(`تا ${e} فایل`), o && l) {
|
|
66
|
+
const a = i(o, {
|
|
67
|
+
units: l
|
|
68
68
|
});
|
|
69
|
-
t.push(`حداکثر ${
|
|
69
|
+
t.push(`حداکثر ${a} هر کدام`);
|
|
70
70
|
}
|
|
71
|
-
t.length > 0 && (
|
|
71
|
+
t.length > 0 && (n += ` (${t.join("، ")})`);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return n;
|
|
74
74
|
},
|
|
75
75
|
// Pagination
|
|
76
76
|
paginationLabel: "صفحهبندی",
|
|
@@ -144,7 +144,15 @@ const d = {
|
|
|
144
144
|
noCommandsFound: "فرمانی یافت نشد",
|
|
145
145
|
changeBlockType: "تغییر نوع بلوک",
|
|
146
146
|
blockTypes: "انواع بلوک",
|
|
147
|
-
enterUrl: "آدرس URL را وارد کنید:"
|
|
147
|
+
enterUrl: "آدرس URL را وارد کنید:",
|
|
148
|
+
tableActions: "Table actions",
|
|
149
|
+
insertRowAbove: "Insert row above",
|
|
150
|
+
insertRowBelow: "Insert row below",
|
|
151
|
+
insertColumnLeft: "Insert column left",
|
|
152
|
+
insertColumnRight: "Insert column right",
|
|
153
|
+
deleteRow: "Delete row",
|
|
154
|
+
deleteColumn: "Delete column",
|
|
155
|
+
deleteTable: "Delete table"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-Cy9hoMGV.cjs"),r={loadingExtended:"در حال بارگذاری، لطفاً صبر کنید",loadingShort:"در حال بارگذاری...",locale:"زبان",iconDescription:"نماد",loadingIcon:"نماد بارگذاری",failedToLoadIcon:"بارگذاری نماد ناموفق بود",editLabel:"ویرایش",selectOne:"یکی را انتخاب کنید",selectNone:"هیچکدام",selectMany:"چند مورد را انتخاب کنید",noResults:"بدون نتیجه",passwordPlaceholderText:"رمز عبور محرمانه",togglePasswordVisibility:"نمایش/مخفی کردن رمز عبور",toggleMenu:"نمایش/مخفی کردن منو",toggleAside:"نمایش/مخفی کردن پانل کناری",mainNavigation:"ناوبری اصلی",sidebar:"نوار کناری",closeDrawer:"بستن کشو",closeModal:"بستن پنجره",confirm:"تأیید",cancel:"لغو",addLabel:"افزودن",removeItem:"حذف مورد",currentLocale:"فارسی",ar:"عربی",de:"آلمانی",en:"انگلیسی",es:"اسپانیایی",fr:"فرانسوی",he:"عبری",hi:"هندی",it:"ایتالیایی",ja:"ژاپنی",ko:"کرهای",nl:"هلندی",pl:"لهستانی",pt:"پرتغالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"ایمیل خود را وارد کنید",incrementValue:"افزایش مقدار",decrementValue:"کاهش مقدار",dropZoneInstructions:e=>e?"برای انتخاب کلیک کنید یا فایلها را بکشید، یا Enter یا Space را فشار دهید تا انتخابگر فایل باز شود":"فایلها را بکشید",fileSizeUnits:["بایت","کیلوبایت","مگابایت","گیگابایت","ترابایت"],removeFile:"حذف فایل",clearAllFiles:"حذف همه فایلها",clearValue:"حذف مقدار",unknownType:"نوع ناشناخته",filesInputInstructions:(e,o,n)=>{let l=e==null||e>1?"برای انتخاب کلیک کنید یا فایلها را بکشید":"برای انتخاب کلیک کنید یا فایل را بکشید";if(e||o){const t=[];if(e!=null&&e>1&&t.push(`تا ${e} فایل`),o&&n){const a=i.formatFileSize(o,{units:n});t.push(`حداکثر ${a} هر کدام`)}t.length>0&&(l+=` (${t.join("، ")})`)}return l},paginationLabel:"صفحهبندی",firstPage:"صفحه اول",previousPage:"صفحه قبلی",nextPage:"صفحه بعدی",lastPage:"صفحه آخر",breadcrumbs:"مسیر ناوبری",commandPalette:"پالت فرمان",typeACommand:"یک فرمان تایپ کنید...",noResultsFound:"نتیجهای یافت نشد",noMatchingCommands:"فرمان منطبقی یافت نشد",appearanceSystem:"سیستم",appearanceLight:"روشن",appearanceDark:"تاریک",ok:"OK",changeTypeConfirmation:"تغییر نوع مقدار فعلی را پاک میکند. ادامه میدهید؟",notifications:"اعلانها",markAllAsRead:"علامتگذاری همه به عنوان خواندهشده",noNotifications:"اعلانی وجود ندارد",schemaConflictsDetected:"تعارضهای طرحواره شناسایی شد",schemaViolationsDetected:"نقضهای طرحواره شناسایی شد",properties:"ویژگیها",uploading:"در حال بارگذاری...",dropFilesOrBrowse:"فایلها را اینجا رها کنید یا برای مرور کلیک کنید",acceptedTypes:e=>`انواع مجاز: ${e}`,enterUrlPrompt:"آدرس URL را وارد کنید:",exceeded:"(بیش از حد)",pdfPreview:"پیشنمایش PDF",lexical:{fontFamily:"خانواده فونت",fontSize:"اندازه فونت",fontColor:"رنگ فونت",highlightColor:"رنگ هایلایت",backgroundColor:"رنگ پسزمینه",bold:"درشت",italic:"کج",underline:"زیرخط",strikethrough:"خطخورده",code:"کد",clearFormatting:"پاک کردن قالببندی",normal:"عادی",heading:e=>`سرتیتر ${e}`,bulletList:"فهرست نقطهای",orderedList:"فهرست شمارهدار",checkList:"فهرست چکباکس",indent:"تورفتگی",outdent:"کاهش تورفتگی",blockquote:"نقلقول",codeBlock:"بلوک کد",horizontalRule:"خط افقی",insertTable:"درج جدول",link:"پیوند",undo:"واگرد",redo:"ازنو",cut:"برش",copy:"کپی",paste:"چسباندن",defaultOption:"پیشفرض",slashCommands:"فرمانهای اسلش",noCommandsFound:"فرمانی یافت نشد",changeBlockType:"تغییر نوع بلوک",blockTypes:"انواع بلوک",enterUrl:"آدرس URL را وارد کنید:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,o)=>`Page ${e} is out of range (1-${o})`,renderFailed:"Failed to render PDF page"}};exports.default=r;
|