|
4 | 4 | <meta charset="utf-8" /> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
6 | 6 | <title>Package Registry — BasisVR</title> |
7 | | - <meta name="description" content="Built-in, curated, and community packages for BasisVR — install them straight from the Basis Package Manager." /> |
| 7 | + <meta name="description" content="Built-in, official, and community packages for BasisVR — install them straight from the Basis Package Manager." /> |
8 | 8 | <meta name="theme-color" content="#ef1237" media="(prefers-color-scheme: light)"> |
9 | 9 | <meta name="theme-color" content="#100f27" media="(prefers-color-scheme: dark)"> |
10 | 10 | <meta name="color-scheme" content="light dark" /> |
@@ -85,7 +85,7 @@ <h1 class="mt-3 text-4xl font-extrabold sm:text-5xl"> |
85 | 85 | <span class="bg-gradient-to-r from-brand to-purple-600 bg-clip-text text-transparent">Find packages for Basis</span> |
86 | 86 | </h1> |
87 | 87 | <p class="mt-4 text-base text-gray-600 dark:text-gray-300"> |
88 | | - Built-in, curated, and community add-ons for Basis. Clone the Basis project with the |
| 88 | + Built-in, official, and community add-ons for Basis. Clone the Basis project with the |
89 | 89 | <a href="https://github.com/BasisVR/BasisPackageManager" target="_blank" class="text-brand hover:underline">Basis Package Manager</a>, |
90 | 90 | then install these — hosted on GitHub or GitLab. |
91 | 91 | </p> |
@@ -166,8 +166,8 @@ <h4 class="mb-2 text-xs font-semibold uppercase tracking-wide text-gray-400">Bun |
166 | 166 | // Only ever put http/https links in an href — an escaped "javascript:…" is still a clickable script. |
167 | 167 | const safeUrl = u => { try { const x = new URL(u, location.href); return (x.protocol==='http:'||x.protocol==='https:') ? x.href : '#'; } catch { return '#'; } }; |
168 | 168 | const hostOf = p => { const u=(p.repoUrl||p.gitUrl||'').toLowerCase(); return u.includes('gitlab')?'GitLab':u.includes('github')?'GitHub':''; }; |
169 | | -// curated = hosted under the Basis org (github.com/BasisVR/…); anything else is community. |
170 | | -const deriveSource = (repoUrl, gitUrl) => { const m=(repoUrl||gitUrl||'').toLowerCase().match(/github\.com[/:]+([^/?#]+)/); return (m && m[1]==='basisvr') ? 'curated' : 'community'; }; |
| 169 | +// official = hosted under the Basis org (github.com/BasisVR/…); anything else is community. |
| 170 | +const deriveSource = (repoUrl, gitUrl) => { const m=(repoUrl||gitUrl||'').toLowerCase().match(/github\.com[/:]+([^/?#]+)/); return (m && m[1]==='basisvr') ? 'official' : 'community'; }; |
171 | 171 | // The Unity UPM revision from a git URL (#tag / #commit / #branch); HEAD when none. |
172 | 172 | const refOf = u => { const m=(u||'').match(/#(.+)$/); return m ? m[1].trim() : 'HEAD'; }; |
173 | 173 | // A repo-relative sub-path from ?path= (Unity allows a leading slash), normalised with a trailing /. |
@@ -227,10 +227,10 @@ <h4 class="mb-2 text-xs font-semibold uppercase tracking-wide text-gray-400">Bun |
227 | 227 | } |
228 | 228 | const fmtNum = n => n>=1e9?(n/1e9).toFixed(1).replace(/\.0$/,'')+'B':n>=1e6?(n/1e6).toFixed(1).replace(/\.0$/,'')+'M':n>=1e3?(n/1e3).toFixed(1).replace(/\.0$/,'')+'K':''+n; |
229 | 229 | const badgeCls = s => s==='built-in' ? 'bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 ring-1 ring-emerald-500/30' |
230 | | - : s==='curated' ? 'bg-brand/15 text-brand ring-1 ring-brand/30' |
| 230 | + : s==='official' ? 'bg-brand/15 text-brand ring-1 ring-brand/30' |
231 | 231 | : s==='community' ? 'bg-purple-500/15 text-purple-600 dark:text-purple-400 ring-1 ring-purple-500/30' |
232 | 232 | : 'bg-gray-500/15 text-gray-500 ring-1 ring-gray-500/20'; |
233 | | -const dotCls = k => k==='built-in'?'bg-emerald-500':k==='curated'?'bg-brand':k==='community'?'bg-purple-500':'bg-gray-400'; |
| 233 | +const dotCls = k => k==='built-in'?'bg-emerald-500':k==='official'?'bg-brand':k==='community'?'bg-purple-500':'bg-gray-400'; |
234 | 234 | // Package image is a self-hosted path (icons/<id>.png) or null → fall back to the emoji icon. |
235 | 235 | const imgOrIcon = p => p.image |
236 | 236 | ? `<img src="${esc(p.image)}" alt="" loading="lazy" referrerpolicy="no-referrer" class="h-full w-full object-cover" onerror="this.replaceWith(document.createTextNode('📦'))">` |
@@ -340,7 +340,7 @@ <h4 class="mb-2 text-xs font-semibold uppercase tracking-wide text-gray-400">Bun |
340 | 340 | const sources = [ |
341 | 341 | {key:'all',label:'All packages',count:all.length}, |
342 | 342 | {key:'built-in',label:'Built-in',count:bySource('built-in')}, |
343 | | - {key:'curated',label:'Curated',count:bySource('curated')}, |
| 343 | + {key:'official',label:'Official',count:bySource('official')}, |
344 | 344 | {key:'community',label:'Community',count:bySource('community')}, |
345 | 345 | ]; |
346 | 346 | const chip = (active) => 'flex w-full items-center justify-between rounded-xl px-3 py-2 text-sm transition ' |
@@ -640,7 +640,7 @@ <h2 class="text-xl font-bold">${esc(b.name)}</h2> |
640 | 640 | </div> |
641 | 641 | <div class="grid gap-4 sm:grid-cols-2"> |
642 | 642 | <label class="${SUB_field}"><span class="${SUB_label}">Source (auto)</span> |
643 | | - <div class="${SUB_input} flex items-center justify-between"><span id="srcAuto" class="font-semibold">${src}</span><span id="srcHint" class="text-xs text-gray-400">${src==='curated'?'under github.com/BasisVR':'hosted elsewhere'}</span></div></label> |
| 643 | + <div class="${SUB_input} flex items-center justify-between"><span id="srcAuto" class="font-semibold">${src}</span><span id="srcHint" class="text-xs text-gray-400">${src==='official'?'under github.com/BasisVR':'hosted elsewhere'}</span></div></label> |
644 | 644 | <label class="${SUB_field}"><span class="${SUB_label}">Version</span><input name="version" class="${SUB_input}" value="${esc(p.version||'')}" placeholder="1.0.0"></label> |
645 | 645 | </div> |
646 | 646 | <label class="${SUB_field}"><span class="${SUB_label}">Git URL (UPM) *</span><input name="gitUrl" required class="${SUB_input}" value="${esc(submitState.git)}"></label> |
@@ -687,7 +687,7 @@ <h2 class="text-xl font-bold">${esc(b.name)}</h2> |
687 | 687 | const upd = () => { |
688 | 688 | const s = deriveSource(f.elements.repoUrl.value, f.elements.gitUrl.value); |
689 | 689 | document.getElementById('srcAuto').textContent = s; |
690 | | - document.getElementById('srcHint').textContent = s==='curated' ? 'under github.com/BasisVR' : 'hosted elsewhere'; |
| 690 | + document.getElementById('srcHint').textContent = s==='official' ? 'under github.com/BasisVR' : 'hosted elsewhere'; |
691 | 691 | updImg(); |
692 | 692 | }; |
693 | 693 | f.elements.gitUrl.oninput = upd; f.elements.repoUrl.oninput = upd; f.elements.image.oninput = updImg; |
|
0 commit comments