@x18n/ui 0.0.3 → 0.0.6
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/index.d.mts +27 -1
- package/dist/index.mjs +62 -12
- package/dist/nitro.json +3 -3
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/B4prFwj0.js +3 -0
- package/dist/public/_nuxt/BAuZ_bOg.js +1 -0
- package/dist/public/_nuxt/BDNMzG2s.js +1 -0
- package/dist/public/_nuxt/BF0GwwSj.js +1 -0
- package/dist/public/_nuxt/BL7WZl0t.js +1 -0
- package/dist/public/_nuxt/BOzFHLxb.js +1 -0
- package/dist/public/_nuxt/BPDtdGtS.js +1 -0
- package/dist/public/_nuxt/BQsRGoRo.js +1 -0
- package/dist/public/_nuxt/BhEbR39R.js +1 -0
- package/dist/public/_nuxt/BriO7i_e.js +1 -0
- package/dist/public/_nuxt/{2T7o9vZw.js → Bw3sjlsE.js} +1 -1
- package/dist/public/_nuxt/Bx_-K8sr.js +1 -0
- package/dist/public/_nuxt/C7ReGOzp.js +1 -0
- package/dist/public/_nuxt/CSj9m9n-.js +1 -0
- package/dist/public/_nuxt/C_0Sx1sV.js +1 -0
- package/dist/public/_nuxt/Ccxs59XZ.js +1 -0
- package/dist/public/_nuxt/ChbLIx1c.js +1 -0
- package/dist/public/_nuxt/CiBP4H8h.js +1 -0
- package/dist/public/_nuxt/CleZzkRG.js +1 -0
- package/dist/public/_nuxt/CoPvbHfg.js +1 -0
- package/dist/public/_nuxt/CvZr1WUA.js +1 -0
- package/dist/public/_nuxt/D0iElgch.js +1 -0
- package/dist/public/_nuxt/D1ZHlQ5G.js +1 -0
- package/dist/public/_nuxt/D4dwYDex.js +2 -0
- package/dist/public/_nuxt/DCrEftnh.js +1 -0
- package/dist/public/_nuxt/DH5mSOoi.js +1 -0
- package/dist/public/_nuxt/{B2lY2QM5.js → Df7YC0e0.js} +1 -1
- package/dist/public/_nuxt/DiDiLO9x.js +1 -0
- package/dist/public/_nuxt/DoHg1T7s.js +2 -0
- package/dist/public/_nuxt/DqvFL0Kd.js +1 -0
- package/dist/public/_nuxt/OQ06FBli.js +1 -0
- package/dist/public/_nuxt/UNS2zuJ1.js +1 -0
- package/dist/public/_nuxt/_cWgq-kS.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/a7ef99ac-b138-4298-b2dc-ae64ec7bd8dc.json +1 -0
- package/dist/public/_nuxt/entry.By1Oc4Ii.css +1 -0
- package/dist/public/_nuxt/error-404.B3F8lAkA.css +1 -0
- package/dist/public/_nuxt/error-500.BO-H0E44.css +1 -0
- package/dist/public/_nuxt/g7nJ86t7.js +5 -0
- package/dist/public/_nuxt/k4SpML6D.js +1 -0
- package/dist/public/_nuxt/pmF1D2Eh.js +1 -0
- package/dist/public/_nuxt/xKaCciGs.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +15 -13
- package/dist/public/_nuxt/6U3VBVNw.js +0 -3
- package/dist/public/_nuxt/B3c8VNtz.js +0 -1
- package/dist/public/_nuxt/B_NBUgT3.js +0 -1
- package/dist/public/_nuxt/C-abT7Ra.js +0 -1
- package/dist/public/_nuxt/CKRUbA4H.js +0 -1
- package/dist/public/_nuxt/CUAtu6-x.js +0 -1
- package/dist/public/_nuxt/CuHl-Wxz.js +0 -1
- package/dist/public/_nuxt/CvRF2CKC.js +0 -1
- package/dist/public/_nuxt/D6gh7el6.js +0 -1
- package/dist/public/_nuxt/DCQwHjae.js +0 -4
- package/dist/public/_nuxt/DgJ_0G3r.js +0 -1
- package/dist/public/_nuxt/DgTv_6EB.js +0 -1
- package/dist/public/_nuxt/DvXI0X_5.js +0 -1
- package/dist/public/_nuxt/UAC6JKNO.js +0 -1
- package/dist/public/_nuxt/builds/meta/45c30525-030d-44d4-bb10-65a4ca3668c9.json +0 -1
- package/dist/public/_nuxt/entry.puki6KUo.css +0 -1
- package/dist/public/_nuxt/error-404.BJfOvlY_.css +0 -1
- package/dist/public/_nuxt/error-500.DRhgjSut.css +0 -1
- package/dist/public/_nuxt/kCfYtaXI.js +0 -1
- package/dist/public/_nuxt/qB8tKtt1.js +0 -2
- package/dist/public/_nuxt/xg14vwJh.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Et as t,H as n,M as r,P as i,_ as a,c as o,d as s,h as c,it as l,j as u,l as d,m as f,r as p,s as m,tt as h,u as g}from"./B4prFwj0.js";import{S as _,c as v,t as y}from"./BPDtdGtS.js";import{t as b}from"./pmF1D2Eh.js";import{t as x}from"./BhEbR39R.js";import{t as S}from"./CoPvbHfg.js";var C={class:`flex-auto font-mono text-xs`},w={class:`label`},T={class:`flex cursor-pointer list-none items-center gap-2 px-4 py-1.5 hover:bg-hover`},E={class:`font-mono text-xs`},D={class:`label`},O={class:`grid gap-1 pb-2 pl-10 pr-4`},k={class:`grid md:grid-cols-2`},A={class:`flex-auto`},j={class:`color-faint`},M={class:`tabular-nums`},N={class:`flex-auto`},P={class:`color-faint`},F={class:`tabular-nums color-muted`},I={class:`font-mono text-xs`},L={class:`flex-auto`},R={class:`color-muted`},z={class:`of-x-auto p-4 font-mono text-xs leading-5 color-muted`},B=a({__name:`project`,setup(a){let B=h();u(async()=>{B.value=await y.value.explain()});let V=m(()=>B.value?.projects.find(e=>e.name===v.value));return(a,u)=>V.value?(r(),d(x,{key:0},{default:n(()=>[c(S,{index:`01`,title:l(_)(`project.presets`)},{default:n(()=>[(r(!0),s(p,null,i(V.value.presets,n=>(r(),s(`div`,{key:n.name,class:`flex items-center gap-2 border-b border-base px-4 py-1.5 last:border-b-0`},[o(`span`,{class:e(n.reason===`listed`||n.reason===`detected`?`i-ph-check-circle color-ok`:`i-ph-circle color-faint`)},null,2),o(`span`,C,t(n.name),1),o(`span`,w,t(n.reason),1)]))),128))]),_:1},8,[`title`]),c(S,{index:`02`,title:l(_)(`project.finders`)},{default:n(()=>[(r(!0),s(p,null,i(V.value.finders,e=>(r(),s(`details`,{key:e.id,class:`group border-b border-base last:border-b-0`},[o(`summary`,T,[u[0]||=o(`span`,{class:`i-ph-caret-right text-xs color-muted transition-transform group-open:rotate-90`},null,-1),o(`span`,E,t(e.id),1),o(`span`,D,t(l(_)(`project.resources`,{count:e.resources.length})),1)]),o(`div`,O,[(r(!0),s(p,null,i(e.resources,e=>(r(),d(b,{key:e,path:e},null,8,[`path`]))),128))])]))),128))]),_:1},8,[`title`]),o(`div`,k,[c(S,{index:`03`,title:l(_)(`project.formats`),class:`md:border-r`},{default:n(()=>[(r(!0),s(p,null,i(V.value.formats.filter(e=>e.resources>0),e=>(r(),s(`div`,{key:e.id,class:`flex gap-2 border-b border-base px-4 py-1.5 font-mono text-xs last:border-b-0`},[o(`span`,A,[f(t(e.id)+` `,1),o(`span`,j,t(e.extensions.join(`, `)),1)]),o(`span`,M,t(e.resources),1)]))),128))]),_:1},8,[`title`]),c(S,{index:`04`,title:l(_)(`project.scanners`)},{default:n(()=>[(r(!0),s(p,null,i(V.value.scanners,e=>(r(),s(`div`,{key:e.id,class:`flex gap-2 border-b border-base px-4 py-1.5 font-mono text-xs last:border-b-0`},[o(`span`,N,[f(t(e.id)+` `,1),o(`span`,P,t(e.extensions.join(`, `)),1)]),o(`span`,F,t(l(_)(`project.files`,{count:e.files})),1)]))),128))]),_:1},8,[`title`])]),V.value.errors.length||V.value.conflicts.length?(r(),d(S,{key:0,index:`05`,title:l(_)(`project.problems`)},{default:n(()=>[(r(!0),s(p,null,i(V.value.errors,(e,n)=>(r(),s(`div`,{key:`e${n}`,class:`flex items-center gap-2 border-b border-base px-4 py-1.5 color-error last:border-b-0`},[o(`span`,I,t(e.code),1),f(` `+t(e.message)+` `,1),e.path?(r(),d(b,{key:0,path:e.path},null,8,[`path`])):g(``,!0)]))),128)),(r(!0),s(p,null,i(V.value.conflicts,e=>(r(),s(`div`,{key:e.extension,class:`border-b border-base px-4 py-1.5 color-warn last:border-b-0`},t(l(_)(`project.conflict`,{extension:e.extension,winner:e.winner,loser:e.loser})),1))),128))]),_:1},8,[`title`])):g(``,!0),c(S,{index:`06`,title:l(_)(`project.config`)},{default:n(()=>[(r(!0),s(p,null,i(V.value.config.origins,(e,n)=>(r(),s(`div`,{key:n,class:`flex gap-2 border-b border-base px-4 py-1.5 font-mono text-xs`},[o(`span`,L,t(n),1),o(`span`,R,t(e),1)]))),128)),o(`pre`,z,t(JSON.stringify(V.value.config,null,2)),1)]),_:1},8,[`title`])]),_:1})):g(``,!0)}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$ as e,G as t,K as n,X as r,v as i,x as a}from"./B4prFwj0.js";function o(e,...t){return typeof e==`function`?e(...t):e}var s=Error.captureStackTrace,c=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,s?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function l(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function u(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],s=a.docs===!1?void 0:a.docs||l(r,i),u=(e={},n={})=>{let r=new c({code:i,why:o(a.why,e),fix:o(a.fix,e),docs:s,cause:e.cause,sources:e.sources,data:o(a.data,e)},u);for(let e of t)e(r,n);return r};n[i]=u}return n}function d(e={}){let{docsBase:t,reporters:n=[]}=e;return new Proxy({},{get(e,r){if(typeof r!=`string`)return;let i=(e={},a={})=>{let o=l(t,r),s=new c({code:r,why:o??``,docs:o,cause:e.cause,sources:e.sources},i);for(let e of n)e(s,a);return s};return i}})}function f(e){return`https://nuxt.com/docs/4.x/errors/${e.replace(`NUXT_`,``).toLowerCase()}`}var p=[e=>{console.error(`[${e.name}]`)}],m=d({docsBase:f,reporters:p}),h=globalThis.__nuxt_app_ctx__||={};function g(e){return h[e]||=(()=>{let e;return{use:()=>{if(e===void 0)throw Error(`Context is not available`);return e},tryUse:()=>e??null,set:t=>{e=t},unset:()=>{e=void 0},call:(t,n)=>(e=t,n()),callAsync:(t,n)=>(e=t,Promise.resolve(n()))}})()}function _(e,t){return g(e)}function v(e,t={},n){for(let r in e){let i=e[r],a=n?`${n}:${r}`:r;typeof i==`object`&&i?v(i,t,a):typeof i==`function`&&(t[a]=i)}return t}var y=(()=>{if(console.createTask)return console.createTask;let e={run:e=>e()};return()=>e})();function b(e,t,n,r){for(let i=n;i<e.length;i+=1)try{let n=r?r.run(()=>e[i](...t)):e[i](...t);if(n&&typeof n.then==`function`)return Promise.resolve(n).then(()=>b(e,t,i+1,r))}catch(e){return Promise.reject(e)}}function x(e,t,n){if(e.length>0)return b(e,t,0,y(n))}function S(e,t,n){if(e.length>0){let r=y(n);return Promise.all(e.map(e=>r.run(()=>e(...t))))}}function C(e,t){for(let n of[...e])n(t)}var w=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,n={}){if(!e||typeof t!=`function`)return()=>{};let r=e,i;for(;this._deprecatedHooks[e];)i=this._deprecatedHooks[e],e=i.to;if(i&&!n.allowDeprecated){let e=i.message;e||=`${r} hook has been deprecated`+(i.to?`, please use ${i.to}`:``),this._deprecatedMessages||=new Set,this._deprecatedMessages.has(e)||(console.warn(e),this._deprecatedMessages.add(e))}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>`_`+e.replace(/\W+/g,`_`)+`_hook_cb`,configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)}}hookOnce(e,t){let n,r=(...e)=>(typeof n==`function`&&n(),n=void 0,r=void 0,t(...e));return n=this.hook(e,r),n}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}clearHook(e){this._hooks[e]=void 0}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t==`string`?{to:t}:t;let n=this._hooks[e]||[];this._hooks[e]=void 0;for(let t of n)this.hook(e,t)}deprecateHooks(e){for(let t in e)this.deprecateHook(t,e[t])}addHooks(e){let t=v(e),n=Object.keys(t).map(e=>this.hook(e,t[e]));return()=>{for(let e of n)e();n.length=0}}removeHooks(e){let t=v(e);for(let e in t)this.removeHook(e,t[e])}removeAllHooks(){this._hooks={}}callHook(e,...t){return this.callHookWith(x,e,t)}callHookParallel(e,...t){return this.callHookWith(S,e,t)}callHookWith(e,t,n){let r=this._before||this._after?{name:t,args:n,context:{}}:void 0;this._before&&C(this._before,r);let i=e(this._hooks[t]?[...this._hooks[t]]:[],n,t);return i instanceof Promise?i.finally(()=>{this._after&&r&&C(this._after,r)}):(this._after&&r&&C(this._after,r),i)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){let t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){let t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}};function T(){return new w}var E=class{_hooks;constructor(){this._hooks={}}hook(e,t){return!e||typeof t!=`function`?()=>{}:(this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)})}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}callHook(e,...t){let n=this._hooks[e];if(n&&n.length!==0)return b(n.slice(),t,0)}},D={meta:[{name:`viewport`,content:`width=device-width,initial-scale=1`},{charset:`utf-8`}],link:[{rel:`icon`,href:`./logo.svg`,type:`image/svg+xml`}],style:[],script:[{innerHTML:`{const p=new URLSearchParams(location.hash.slice(1)),c=p.get('devframe_otp');if(c){sessionStorage.setItem('x18n:otp',c);history.replaceState(null,'',location.pathname+location.search+'#'+(p.get('route')||'/'))}}`}],noscript:[],title:`x18n`,viewport:`width=device-width,initial-scale=1`},O={id:`__nuxt-loader`},k={componentName:`NuxtLink`,prefetch:!0,prefetchOn:{visibility:!0}},A=`#__nuxt`,j=`nuxt-app`,M=36e5,N=`vite:preloadError`;function P(e=`nuxt-app`){return _(e,{asyncContext:!1})}var F=`__nuxt_plugin`;function I(i){let a=0,o={_id:i.id||`nuxt-app`,_scope:t(),provide:void 0,versions:{get nuxt(){return`4.6.2`},get vue(){return o.vueApp.version}},payload:e({...i.ssrContext?.payload||{},data:e({}),state:r({}),once:new Set,_errors:e({})}),static:{data:{}},runWithContext(e){return o._scope.active&&!n()?o._scope.run(()=>B(o,e)):B(o,e)},isHydrating:!0,deferHydration(){if(!o.isHydrating)return()=>{};a++;let e=!1;return()=>{if(!e&&(e=!0,a--,a===0))return o.isHydrating=!1,o.callHook(`app:suspense:resolve`)}},_asyncDataPromises:{},_asyncData:e({}),_state:e({}),_payloadRevivers:{},...i};{let e=window.__NUXT__;if(e)for(let t in e)switch(t){case`data`:case`state`:case`_errors`:Object.assign(o.payload[t],e[t]);break;default:o.payload[t]=e[t]}}o.hooks=T(),o.hook=o.hooks.hook;{let e=o.hooks.callHook;o.hooks.callHook=(t,...n)=>Promise.resolve().then(()=>e(t,...n))}o.callHook=o.hooks.callHook,o.provide=(e,t)=>{let n=`$`+e;W(o,n,t),W(o.vueApp.config.globalProperties,n,t)},W(o.vueApp,`$nuxt`,o),W(o.vueApp.config.globalProperties,`$nuxt`,o);{window.addEventListener(N,e=>{o.callHook(`app:chunkError`,{error:e.payload}),e.payload?.message?.includes(`Unable to preload CSS`)&&e.preventDefault()}),window.useNuxtApp||=H;let e=o.hook(`app:error`,(...e)=>{m.NUXT_E1005({cause:e.length>1?e:e[0]})});o.hook(`app:mounted`,e)}let s=o.payload.config;return o.provide(`config`,s),o}async function L(e,t){if(typeof t==`function`){let{provide:n}=await e.runWithContext(()=>t(e))||{};if(n&&typeof n==`object`)for(let t in n)e.provide(t,n[t])}}async function R(e,t){let n;for(let r of t)try{await L(e,r)}catch(t){if(!e.payload.error)throw t;n||=t}if(n)throw e.payload.error||n}function z(e){if(typeof e==`function`)return e;let t=e._name||e.name;return delete e.name,Object.assign(e.setup||(()=>{}),e,{[F]:!0,_name:t})}function B(e,t,n){return P(e._id).set(e),e.vueApp.runWithContext(()=>n?t(...n):t())}function V(e){let t;return a()&&(t=i()?.appContext.app.$nuxt),t||=P(e).tryUse(),t||null}function H(e){let t=V(e);if(!t)throw m.NUXT_E1001();return t}function U(e){return H().$config}function W(e,t,n){Object.defineProperty(e,t,{get:()=>n})}export{u as _,H as a,j as c,M as d,A as f,p as g,f as h,V as i,O as l,m,I as n,U as o,E as p,z as r,D as s,R as t,k as u,d as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Et as t,H as n,M as r,P as i,Tt as a,_ as o,c as s,d as c,h as l,it as u,l as d,m as f,r as p,s as m,u as h}from"./B4prFwj0.js";import{C as g,S as _,h as v,l as y,n as b,v as x,y as S}from"./BPDtdGtS.js";import{r as C,t as w}from"#entry";import{t as T}from"./BhEbR39R.js";import{t as E}from"./CoPvbHfg.js";import{t as D}from"./DH5mSOoi.js";var O={class:`flex flex-col gap-1 px-4 py-3`},k={class:`font-mono text-2xl tabular-nums`},A={class:`label`},j=o({__name:`UiStat`,props:{label:{},value:{}},setup(e){return(n,i)=>(r(),c(`div`,O,[s(`span`,k,t(e.value.toLocaleString(u(g))),1),s(`span`,A,t(e.label),1)]))}}),M={class:`grid grid-cols-2 border-b border-base md:grid-cols-4`},N={key:0,class:`px-4 py-3 color-muted`},P={class:`flex items-center gap-2 font-mono`},F={key:0,class:`badge`},I=[`title`],L={class:`text-xs color-muted tabular-nums`},R={key:0,class:`color-warn`},z={class:`grid md:grid-cols-2`},B={class:`font-mono text-xs color-error tabular-nums`},V={class:`font-mono text-xs color-warn tabular-nums`},H={key:0,class:`px-4 py-3 color-muted`},U={class:`flex-auto font-mono text-xs`},W={class:`font-mono tabular-nums`},G={class:`flex flex-wrap gap-1 px-4 py-3`},K={key:0,class:`color-muted`},q={class:`flex flex-wrap gap-1 px-4 py-3`},J={key:0,class:`color-muted`},Y={class:`truncate font-mono text-xs`},X={class:`flex items-center gap-2 font-mono text-xs`},Z=o({__name:`index`,setup(o){function g(e){return e.total===0?0:e.outdated/e.total*100}let O=m(()=>b.value&&[{label:_(`overview.keys`),value:b.value.keys,to:`/keys`},{label:_(`overview.resources`),value:b.value.resources,to:`/project`},{label:_(`overview.usages`),value:b.value.usages,to:`/usages`},{label:_(`overview.locales`),value:b.value.locales.length,to:`/keys`}]);return(o,m)=>u(b)?(r(),d(T,{key:0},{default:n(()=>[s(`div`,M,[(r(!0),c(p,null,i(O.value,e=>(r(),d(u(C),{key:e.label,to:e.to,class:`focus-ring border-r border-base transition-colors last:border-r-0 hover:bg-hover`},{default:n(()=>[l(j,{label:e.label,value:e.value},null,8,[`label`,`value`])]),_:2},1032,[`to`]))),128))]),l(E,{index:`01`,title:u(_)(`overview.coverage`)},{default:n(()=>[u(v).length?h(``,!0):(r(),c(`p`,N,t(u(_)(`localeBar.noneShown`)),1)),(r(!0),c(p,null,i(u(v),i=>(r(),d(u(C),{key:i.code,to:`/locales/${encodeURIComponent(i.code)}`,class:`focus-ring grid grid-cols-[7rem_1fr_4.5rem_14rem] items-center gap-4 border-b border-base px-4 py-2 transition-colors last:border-b-0 hover:bg-hover`},{default:n(()=>[s(`span`,P,[l(w,{code:i.code},null,8,[`code`]),f(` `+t(i.code)+` `,1),i.code===u(b).sourceLocale?(r(),c(`span`,F,t(u(_)(`overview.source`)),1)):h(``,!0)]),s(`span`,{class:`h-1.5 flex border border-strong`,title:u(S)(i.code)},[s(`span`,{class:`h-full bg-inverse`,style:a({width:`${Math.max(0,i.percent-g(i))}%`})},null,4),s(`span`,{class:`h-full bg-[var(--x-warn)]`,style:a({width:`${g(i)}%`})},null,4)],8,I),s(`span`,{class:e([`text-right font-mono tabular-nums`,i.percent>=100&&`color-ok`])},t(u(x)(i.percent)),3),s(`span`,L,[f(t(u(_)(`overview.missing`,{missing:i.missing,empty:i.empty}))+` `,1),i.outdated?(r(),c(`span`,R,`· `+t(u(_)(`overview.outdated`,{count:i.outdated})),1)):h(``,!0)])]),_:2},1032,[`to`]))),128))]),_:1},8,[`title`]),s(`div`,z,[l(E,{index:`02`,title:u(_)(`overview.diagnostics`),class:`md:border-r`},{aside:n(()=>[m[0]||=s(`span`,{class:`flex-auto`},null,-1),s(`span`,B,t(u(_)(`overview.errors`,{count:u(b).diagnostics.errors})),1),s(`span`,V,t(u(_)(`overview.warnings`,{count:u(b).diagnostics.warnings})),1)]),default:n(()=>[u(b).diagnostics.byCode.length?h(``,!0):(r(),c(`p`,H,t(u(_)(`overview.clean`)),1)),(r(!0),c(p,null,i(u(b).diagnostics.byCode,n=>(r(),c(`div`,{key:n.code,class:`flex items-center gap-2 px-4 py-1.5`},[s(`span`,{class:e(n.severity===`error`?`i-ph-x-circle color-error`:`i-ph-warning color-warn`)},null,2),s(`span`,U,t(n.code),1),s(`span`,W,t(n.count),1)]))),128))]),_:1},8,[`title`]),s(`div`,null,[l(E,{index:`03`,title:u(_)(`overview.presets`)},{default:n(()=>[s(`div`,G,[(r(!0),c(p,null,i(u(b).presets,e=>(r(),c(`span`,{key:e,class:`border border-strong px-1.5 font-mono text-xs`},t(e),1))),128)),u(b).presets.length?h(``,!0):(r(),c(`span`,K,t(u(_)(`overview.noPresets`)),1))])]),_:1},8,[`title`]),l(E,{index:`04`,title:u(_)(`overview.recent`)},{default:n(()=>[s(`div`,q,[(r(!0),c(p,null,i(u(y),e=>(r(),d(u(C),{key:e,to:`/keys/${encodeURIComponent(e)}`,class:`focus-ring border border-base px-1.5 font-mono text-xs hover:border-inverse`},{default:n(()=>[f(t(e),1)]),_:2},1032,[`to`]))),128)),u(y).length?h(``,!0):(r(),c(`span`,J,t(u(_)(`overview.noRecent`)),1))])]),_:1},8,[`title`])])]),u(b).changes.length?(r(),d(E,{key:0,index:`05`,title:u(_)(`history.title`)},{default:n(()=>[(r(!0),c(p,null,i(u(b).changes,e=>(r(),d(u(C),{key:`${e.key}:${e.locale}`,to:`/keys/${encodeURIComponent(e.key)}`,class:`focus-ring grid grid-cols-[minmax(0,20rem)_6rem_1fr] items-center gap-4 border-b border-base px-4 py-1.5 transition-colors last:border-b-0 hover:bg-hover`},{default:n(()=>[s(`span`,Y,t(e.key),1),s(`span`,X,[l(w,{code:e.locale},null,8,[`code`]),f(t(e.locale),1)]),l(D,{change:e},null,8,[`change`])]),_:2},1032,[`to`]))),128))]),_:1},8,[`title`])):h(``,!0)]),_:1})):h(``,!0)}});export{Z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Et as t,M as n,P as r,R as i,_ as a,d as o,r as s,w as c}from"./B4prFwj0.js";var l=[`aria-label`],u=[`aria-selected`,`onClick`],d=a({__name:`UiSegmented`,props:c({options:{},label:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(a){let c=i(a,`modelValue`);return(i,d)=>(n(),o(`div`,{role:`tablist`,"aria-label":a.label,class:`inline-flex w-fit border border-strong`},[(n(!0),o(s,null,r(a.options,(r,i)=>(n(),o(`button`,{key:r.value,type:`button`,role:`tab`,"aria-selected":c.value===r.value,class:e([`focus-ring h-8 px-3 text-xs font-medium transition-colors`,[c.value===r.value?`bg-inverse color-inverse`:`color-muted hover:color-base hover:bg-hover`,i>0&&`border-l border-strong`]]),onClick:e=>c.value=r.value},t(r.label),11,u))),128))],8,l))}});export{d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Et as t,M as n,Q as r,_ as i,c as a,d as o,it as s,m as c,u as l}from"./B4prFwj0.js";import{S as u,t as d}from"./BPDtdGtS.js";var f=[`title`],p=i({__name:`CopyPrompt`,props:{query:{},label:{}},setup(i){let p=i,m=r(!1);async function h(){await navigator.clipboard.writeText(await d.value.translatePrompt(p.query)),m.value=!0,setTimeout(()=>m.value=!1,1500)}return(r,p)=>s(d)?.capabilities.prompts?(n(),o(`button`,{key:0,class:`btn-outline h-7`,title:i.query.stale?s(u)(`prompt.staleHint`):s(u)(`prompt.hint`),onClick:h},[a(`span`,{class:e(m.value?`i-ph-check`:`i-ph-clipboard-text`)},null,2),c(` `+t(m.value?s(u)(`prompt.copied`):i.label??s(u)(`prompt.copy`)),1)],8,f)):l(``,!0)}});export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={app:{error:`Connexion impossible\xA0: {message}`,language:`Langue`,loading:`Chargement du projet…`,name:`x18n`,project:`Projet`,static:`Rapport en lecture seule`,staticHint:"Instantané généré avec `x18n build`. Lancez `x18n ui` pour modifier."},auth:{code:`Code d’authentification`,hint:"Saisissez le code à 6 chiffres affiché par `x18n ui` dans le terminal.",label:`Authentification`,rejected:`Ce code n’a pas fonctionné. Consultez le terminal pour obtenir le code actuel.`,submit:`Se connecter`,title:`Se connecter à x18n`},detail:{back:`Retour aux clés`,diagnostics:`Problèmes`,edit:`Modifier`,label:`Clé`,noUsages:`Aucun code n’utilise cette clé.`,notFound:`Cette clé n’est pas définie.`,openInEditor:`Ouvrir dans l’éditeur`,possible:`possible`,usages:`Utilisations ({count})`,values:`Valeurs`},edit:{dismiss:`Ignorer`,placeholdersExtra:`espaces réservés inattendus {names}`,placeholdersMissing:`espaces réservés manquants {names}`,rejected:`Non enregistré\xA0: {key} en {locale}\xA0: {message}.`,saveAnyway:`Enregistrer quand même`},extract:{apply:`Extraire ({count})`,done:`Clés extraites\xA0: {count}. Fichiers modifiés\xA0: {files}.`,hint:`Chaînes codées en dur avec une clé proposée. Modifiez les clés, décochez les chaînes à ignorer, puis appliquez.`,key:`Clé`,none:`Aucune chaîne codée en dur trouvée.`,strings:`Chaînes\xA0: {count}`},keys:{allNamespaces:`Tous les espaces de noms`,anyLocale:`Toute langue`,count:`{shown} clés sur {total}`,diagnosticsHint:`Problèmes sur cette clé`,editValue:`Valeur de {key} en {locale}`,empty:`Aucune clé ne correspond.`,grid:`Clés et valeurs par langue`,helpEdit:`Entrée pour modifier, Échap pour annuler`,helpMove:`Flèches ou j/k pour se déplacer`,helpOpen:`o pour ouvrir la clé`,helpSearch:`/ pour rechercher`,key:`Clé`,missingIn:`Manquante en`,missingInLocale:`Manquante en {locale}`,namespace:`Espace de noms`,search:`Rechercher clés et valeurs`,unused:`Inutilisées`,unusedHint:`Aucun code n’utilise cette clé`,withDiagnostics:`Avec problèmes`,outdated:`Obsolètes`,sort:`Tri`,sortKey:`Clé`,sortRecent:`Modifiées récemment`},locale:{complete:`Toutes les clés sont traduites.`,empty:`Vides ({count})`,label:`Langue`,missing:`Manquantes ({count})`,notFound:`Ce projet ne contient pas cette langue.`,openInGrid:`Afficher dans la grille`,problems:`Problèmes d’espaces réservés et de syntaxe ({count})`,progress:`{translated} sur {total} traduites ({percent})`,outdated:`Obsolètes ({count})`},localeBar:{bar:`Langues à afficher`,noneShown:`Toutes les langues sont masquées. Choisissez-en une dans la barre ci-dessus.`,showAll:`Tout afficher`,shown:`{shown} sur {total} affichées`,title:`Langues`,toggle:`Afficher ou masquer {locale}`,resetOrder:`Réinitialiser l’ordre`,flags:`Afficher les drapeaux`,reorder:`Faites glisser, ou appuyez sur Alt et une flèche, pour réordonner.`},nav:{extract:`Extraire`,keys:`Clés`,overview:`Aperçu`,project:`Projet`,usages:`Utilisations`},overview:{clean:`Aucun problème détecté.`,coverage:`Couverture`,diagnostics:`Diagnostics`,errors:`Erreurs\xA0: {count}`,keys:`Clés`,locales:`Langues`,missing:`{missing} manquantes, {empty} vides`,noPresets:`Aucun preset détecté.`,noRecent:`Aucune modification depuis l’ouverture de la page.`,presets:`Presets`,recent:`Modifications récentes`,resources:`Ressources`,source:`source`,usages:`Utilisations`,warnings:`Avertissements\xA0: {count}`,outdated:`{count} obsolètes`},project:{config:`Configuration et origine de chaque valeur`,conflict:`.{extension}\xA0: {winner} l’emporte sur {loser}`,files:`Fichiers\xA0: {count}`,finders:`Détecteurs de langues`,formats:`Formats`,presets:`Presets`,problems:`Problèmes`,resources:`Ressources\xA0: {count}`,scanners:`Scanners`},prompt:{copied:`Copié`,copy:`Copier le prompt de traduction`,hint:`Copier un prompt pour un LLM ou un agent qui traduit les messages manquants`,copyStale:`Copier le prompt avec les obsolètes`,staleHint:`Copier un prompt pour un LLM ou un agent qui traduit les messages manquants et met à jour les obsolètes`},usages:{all:`Toutes ({count})`,dynamic:`Dynamiques ({count})`,dynamicHint:`Utilisations avec une clé calculée. Les clés sous leur préfixe comptent comme utilisées.`,filter:`Filtrer par fichier ou clé`,missing:`Non définies ({count})`,missingHint:`Clés utilisées dans le code mais non définies dans la langue source.`,unused:`Inutilisées ({count})`,unusedHint:`Clés définies dans la langue source qu’aucun code n’utilise.`},value:{empty:`vide`,missing:`manquant`},history:{title:`Historique`,local:`modifié localement`,outdated:`obsolète`,outdatedHint:`Le message source a changé après cette traduction`,sourceThen:`Source alors`,sourceNow:`Source actuelle`}};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,Et as t,H as n,M as r,P as i,Q as a,U as o,_ as s,c,d as l,h as u,it as d,l as f,r as p,s as m,u as h}from"./B4prFwj0.js";import{i as g,o as _}from"./DoHg1T7s.js";import{S as v,c as y,m as b,t as x}from"./BPDtdGtS.js";import{t as S}from"./pmF1D2Eh.js";import{t as C}from"./BhEbR39R.js";import{t as w}from"./CoPvbHfg.js";var T={class:`flex items-center gap-3 border-b border-base px-4 py-3`},E={class:`flex-auto color-muted`},D={key:0,class:`color-ok`},O=[`disabled`],k={key:0,class:`px-4 py-3 color-muted`},A=[`onUpdate:modelValue`,`disabled`],j={class:`text-right font-mono text-xs color-faint tabular-nums`},M=[`title`],N=[`onUpdate:modelValue`,`readonly`,`aria-label`],P=s({__name:`extract`,setup(s){let P=b((e,t)=>e.extractCandidates(t)),F=a([]);e(P,e=>{F.value=(e??[]).map(e=>({candidate:e,key:e.key,picked:!0}))});let I=m(()=>{let e=new Map;for(let t of F.value){let n=e.get(t.candidate.path)??[];e.set(t.candidate.path,n),n.push(t)}return[...e]}),L=m(()=>F.value.filter(e=>e.picked)),R=a();async function z(){let e=L.value.map(({candidate:e,key:t})=>({path:e.path,range:e.range,original:e.original,key:t,value:e.value,replacement:e.replacement.replace(e.key,t),imports:e.imports})),t=await x.value.extractApply({project:y.value,items:e});R.value={count:t.keys.length,files:t.changes.length}}return(e,a)=>(r(),f(C,null,{default:n(()=>[c(`header`,T,[c(`p`,E,t(d(v)(`extract.hint`)),1),R.value?(r(),l(`span`,D,t(d(v)(`extract.done`,R.value)),1)):h(``,!0),d(x)?.capabilities.write?(r(),l(`button`,{key:1,class:`btn-solid`,disabled:!L.value.length,onClick:z},t(d(v)(`extract.apply`,{count:L.value.length})),9,O)):h(``,!0)]),d(P)&&!F.value.length?(r(),l(`p`,k,t(d(v)(`extract.none`)),1)):h(``,!0),(r(!0),l(p,null,i(I.value,([e,a],s)=>(r(),f(w,{key:e,index:String(s+1).padStart(2,`0`),title:d(v)(`extract.strings`,{count:a.length})},{aside:n(()=>[u(S,{path:e,class:`ml-2`},null,8,[`path`])]),default:n(()=>[(r(!0),l(p,null,i(a,e=>(r(),l(`label`,{key:e.candidate.range.start,class:`grid grid-cols-[auto_3rem_1fr_18rem] items-center gap-3 border-b border-base px-4 py-1.5 last:border-b-0`},[o(c(`input`,{"onUpdate:modelValue":t=>e.picked=t,type:`checkbox`,class:`accent-[var(--x-fg)]`,disabled:!d(x)?.capabilities.write},null,8,A),[[g,e.picked]]),c(`span`,j,t(e.candidate.line),1),c(`span`,{class:`truncate`,title:e.candidate.text},t(e.candidate.text),9,M),o(c(`input`,{"onUpdate:modelValue":t=>e.key=t,class:`input font-mono text-xs`,readonly:!d(x)?.capabilities.write,"aria-label":d(v)(`extract.key`)},null,8,N),[[_,e.key]])]))),128))]),_:2},1032,[`index`,`title`]))),128))]),_:1}))}});export{P as default};
|