PageSourceSearch

https://langkey.win/_nuxt/BtvHLQuL.js

js langkey.win collected 2026-10-02 02:12:03 UTC 9,430 bytes, 1 lines download raw bytes

1import{d as O,u as G,ao as K,as as W,s as X,c as n,a as e,b as m,e as p,t as s,f as t,j as A,w as J,v as Q,i as Y,n as B,F as y,r as f,m as x,p as b,k as Z,o as l,_ as ee,h as te,g as w,aK as se}from"./CxesHY2y.js";import{o as F}from"./B1yRRTRB.js";const oe={class:"min-h-screen bg-default"},ae={class:"relative overflow-hidden border-b border-default"},ie={class:"relative mx-auto max-w-6xl px-4 py-12 sm:px-6 lg:px-8"},re={class:"flex flex-wrap items-end justify-between gap-6"},le={class:"max-w-2xl"},ne={class:"mb-4 inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/8 px-3 py-1.5 text-sm font-medium text-primary"},de={class:"text-3xl font-bold tracking-tight text-highlighted sm:text-4xl"},ce={class:"mt-3 text-base leading-7 text-muted"},me={class:"grid w-full max-w-xs grid-cols-2 gap-3 sm:w-auto"},ue={class:"rounded-xl border border-default bg-default/75 px-4 py-3 backdrop-blur"},pe={class:"text-[11px] font-medium uppercase tracking-wider text-muted"},xe={class:"mt-1 text-lg font-semibold text-highlighted"},he={class:"rounded-xl border border-default bg-default/75 px-4 py-3 backdrop-blur"},_e={class:"text-[11px] font-medium uppercase tracking-wider text-muted"},ge={class:"mt-1 text-lg font-semibold text-highlighted"},ye={class:"mx-auto max-w-6xl px-4 py-8 sm:px-6 lg:px-8"},fe={class:"mb-6 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-primary/15 bg-primary/5 px-4 py-3 text-sm text-primary"},be={class:"flex items-center gap-2"},ve={class:"mb-6 flex flex-wrap items-center gap-3"},ke=["placeholder"],we={class:"flex flex-wrap gap-1.5"},ze=["onClick"],Ce={key:0,class:"flex items-center gap-2 rounded-xl border border-default bg-elevated/40 px-4 py-6 text-sm text-muted"},De={key:1,class:"rounded-xl border border-rose-300/40 bg-rose-50/60 px-4 py-6 text-sm text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-200"},je={key:2,class:"rounded-2xl border border-dashed border-default px-6 py-12 text-center text-sm text-muted"},Me={key:3,class:"space-y-9"},$e={class:"flex items-center gap-2"},Ae={class:"text-sm font-semibold text-highlighted"},Be={class:"text-xs text-muted"},Fe={class:"mt-1 text-xs text-muted"},Ie={class:"mt-3 grid gap-3 sm:grid-cols-2 lg:grid-cols-3"},Ne={class:"flex items-start gap-3"},Se={class:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10"},Le={class:"min-w-0"},Te={class:"flex flex-wrap items-center gap-2 text-sm font-medium text-highlighted"},Ve={class:"mt-1 text-[11px] leading-5 text-muted"},Pe={key:0,class:"mt-3 flex flex-wrap gap-1.5"},Ue={key:0,class:"rounded-full bg-elevated px-2 py-0.5 text-[11px] font-medium text-muted"},qe={key:1,class:"mt-3 text-[11px] text-muted"},Ee=["onClick"],Re={key:2,class:"mt-3 space-y-2 border-t border-default pt-3 text-[11px] leading-5"},He={class:"font-semibold text-highlighted"},Oe={class:"font-mono text-muted"},Ge={class:"font-semibold text-highlighted"},Ke={class:"text-muted"},We={class:"font-semibold text-highlighted"},Xe={class:"text-muted"},Je={class:"font-semibold text-highlighted"},Qe={class:"text-muted"},I=3,tt=O({__name:"index",setup(Ye){const{t:o,te:z}=G(),N=K();W({title:()=>o("learn.seo.title"),meta:[{name:"description",content:()=>o("learn.seo.description")}]});const h=x(F),S=x(!1),L=x(!1);X(async()=>{try{const a=await $fetch("/api/plugin-platform/manifests");Array.isArray(a)&&a.length&&(h.value=a)}catch{h.value=F}});const g=x(""),u=x("all"),C=["source","mode","service"],T=b(()=>{const a=g.value.trim().toLowerCase();return h.value.filter(r=>u.value!=="all"&&r.role!==u.value?!1:a?[M(r),$(r),r.id].some(c=>c.toLowerCase().includes(a)):!0)}),D=b(()=>C.map(a=>({role:a,plugins:T.value.filter(r=>r.role===a)})).filter(a=>a.plugins.length>0)),j=b(()=>h.value.filter(a=>a.implemented!==!1).length),V=b(()=>h.value.length-j.value),_=x(null);function P(a){_.value=_.value===a.id?null:a.id}function M(a){const r="learn.plugins."+a.id.replace(/\./g,"-")+".name";return z(r)?o(r):a.name}function $(a){const r="learn.plugins."+a.id.replace(/\./g,"-")+".desc";return z(r)?o(r):a.description}const U={"com.langkey.youtube":"i-simple-icons-youtube","com.langkey.python":"i-simple-icons-python","com.langkey.math":"i-lucide-sigma","com.langkey.vocabulary":"i-lucide-book-marked","com.langkey.fsrs":"i-lucide-repeat-2","com.langkey.wordbank":"i-lucide-library","com.langkey.dictation":"i-lucide-keyboard","com.langkey.cloze":"i-lucide-square-dashed-bottom-code","com.langkey.typing":"i-lucide-keyboard-music","com.langkey.shadowing":"i-lucide-audio-lines","com.langkey.conversation":"i-lucide-messages-square","com.langkey.code-judge":"i-lucide-badge-check"};function q(a){return U[a.id]??"i-lucide-puzzle"}function v(a){return{shown:a.domains.slice(0,I),hidden:Math.max(0,a.domains.length-I)}}const E={source:"i-lucide-library",mode:"i-lucide-dumbbell",service:"i-lucide-layers"};return(a,r)=>{const c=ee,R=Z,H=se;return l(),n("main",oe,[e("section",ae,[r[2]||(r[2]=e("div",{class:"absolute inset-0 bg-[radial-gradient(circle_at_15%_15%,rgba(56,189,248,.15),transparent_26%),radial-gradient(circle_at_85%_35%,rgba(139,92,246,.13),transparent_30%)]"},null,-1)),e("div",ie,[e("div",re,[e("div",le,[e("div",ne,[m(c,{name:"i-lucide-boxes",class:"size-4"}),p(" "+s(t(o)("learn.hero.badge")),1)]),e("h1",de,s(t(o)("learn.hero.title")),1),e("p",ce,s(t(o)("learn.hero.desc")),1
1)]),e("div",me,[e("div",ue,[e("p",pe,s(t(o)("learn.registry.stats.available")),1),e("p",xe,s(t(j)),1)]),e("div",he,[e("p",_e,s(t(o)("learn.registry.stats.comingSoon")),1),e("p",ge,s(t(V)),1)])])])])]),e("section",ye,[e("div",fe,[e("span",be,[m(c,{name:"i-lucide-info",class:"size-4 shrink-0"}),p(" "+s(t(o)("learn.registry.enableHint")),1)]),m(R,{size:"xs",icon:"i-lucide-arrow-right",trailing:"",to:t(N)("/study")},{default:A(()=>[p(s(t(o)("learn.registry.goToWorkspaces")),1)]),_:1},8,["to"])]),e("div",ve,[J(e("input",{"onUpdate:modelValue":r[0]||(r[0]=d=>Y(g)?g.value=d:null),type:"search",placeholder:t(o)("learn.registry.searchPlaceholder"),class:"min-w-0 flex-1 rounded-lg border border-default bg-default px-3 py-2 text-sm text-highlighted outline-none focus:border-primary sm:max-w-xs"},null,8,ke),[[Q,t(g)]]),e("div",we,[e("button",{type:"button",class:B(["rounded-full border px-3 py-1 text-xs transition",t(u)==="all"?"border-primary bg-primary/10 text-primary":"border-default text-muted hover:border-primary/40"]),onClick:r[1]||(r[1]=d=>u.value="all")},s(t(o)("learn.registry.allRoles")),3),(l(),n(y,null,f(C,d=>e("button",{key:d,type:"button",class:B(["rounded-full border px-3 py-1 text-xs transition",t(u)===d?"border-primary bg-primary/10 text-primary":"border-default text-muted hover:border-primary/40"]),onClick:i=>u.value=d},s(t(o)("workspaces.settings.roles."+d)),11,ze)),64))])]),t(S)?(l(),n("div",Ce,[m(c,{name:"i-lucide-loader-circle",class:"size-4 animate-spin"}),e("span",null,s(t(o)("common.loading")),1)])):t(L)?(l(),n("p",De,s(t(o)("learn.registry.loadFailed")),1)):t(D).length?(l(),n("div",Me,[(l(!0),n(y,null,f(t(D),d=>(l(),n("div",{key:d.role},[e("div",$e,[m(c,{name:E[d.role],class:"size-4 text-primary"},null,8,["name"]),e("h2",Ae,s(t(o)("workspaces.settings.roles."+d.role)),1),e("span",Be,s(d.plugins.length),1)]),e("p",Fe,s(t(o)("workspaces.settings.roleDesc."+d.role)),1),e("div",Ie,[(l(!0),n(y,null,f(d.plugins,i=>(l(),n("article",{key:i.id,class:"flex flex-col rounded-2xl border border-default bg-elevated/20 p-4"},[e("div",Ne,[e("div",Se,[m(c,{name:q(i),class:"size-4 text-primary"},null,8,["name"])]),e("div",Le,[e("p",Te,[p(s(M(i))+" ",1),i.implemented===!1?(l(),te(H,{key:0,size:"sm",variant:"soft",color:"neutral"},{default:A(()=>[p(s(t(o)("learn.status.comingSoon")),1)]),_:1})):w("",!0)]),e("p",Ve,s($(i)),1)])]),i.domains.length?(l(),n("div",Pe,[(l(!0),n(y,null,f(v(i).shown,k=>(l(),n("span",{key:k,class:"rounded-full bg-elevated px-2 py-0.5 text-[11px] font-medium text-muted"},s(t(o)("workspaces.domains."+k)),1))),128)),v(i).hidden?(l(),n("span",Ue,s(t(o)("learn.registry.moreDomains",{count:v(i).hidden})),1)):w("",!0)])):(l(),n("p",qe,s(t(o)("learn.registry.anyDomain")),1)),e("button",{type:"button",class:"mt-auto flex items-center gap-1 pt-4 text-[11px] font-medium text-primary",onClick:k=>P(i)},[m(c,{name:t(_)===i.id?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5"},null,8,["name"]),p(" "+s(t(_)===i.id?t(o)("learn.registry.hideDetail"):t(o)("learn.registry.showDetail")),1)],8,Ee),t(_)===i.id?(l(),n("dl",Re,[e("div",null,[e("dt",He,s(t(o)("learn.registry.identifier")),1),e("dd",Oe,s(i.id)+" · v"+s(i.version),1)]),e("div",null,[e("dt",Ge,s(t(o)("learn.detail.permissions")),1),e("dd",Ke,s(i.permissions.length?i.permissions.join("、"):t(o)("learn.detail.none")),1)]),e("div",null,[e("dt",We,s(t(o)("learn.detail.dependencies")),1),e("dd",Xe,s(i.dependencies.length?i.dependencies.join("、"):t(o)("learn.detail.noDeps")),1)]),e("div",null,[e("dt",Je,s(t(o)("learn.registry.materialFlow")),1),e("dd",Qe,s(i.capabilities.provides.length?t(o)("learn.registry.provides",{types:i.capabilities.provides.join("、")}):"")+" "+s(i.capabilities.consumes.length?t(o)("learn.registry.consumes",{types:i.capabilities.consumes.join("、")}):"")+" "+s(!i.capabilities.provides.length&&!i.capabilities.consumes.length?t(o)("learn.registry.materialAgnostic"):""),1)])])):w("",!0)]))),128))])]))),128))])):(l(),n("p",je,s(t(o)("learn.registry.noMatch")),1))])])}}});export{tt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.