chore: initialize @limitless/ui git repo + add AppShell

This brings the long-untracked @limitless/ui source tree under version
control. Until now /srv/k8s/templates/limitless-ui has been a plain
file: dependency consumed by gscChronos / gscCRM / gscAdmin, with
copies scattered across web/gsc{Portal,WWW,Aether,Register}/ and
apps/gsc{Meet,Share}/. None were git-tracked.

Treating /srv/k8s/templates/limitless-ui as the canonical going
forward; secondary copies should be replaced with this version
in their consumers' Dockerfiles when they next get touched.

Changes in this initial commit beyond the snapshot:
- Add src/layout/AppShell.tsx — runtime-loaded chrome (header,
  sidebar, footer) backed by gsc-shell-api. Public surface:
    AppShell, ShellProvider, useShell, ShellConfig types
  Framework-agnostic (no Next.js dep). Apps pass appKey + apiUrl +
  getToken; AppShell composes the existing PageShell / Navbar /
  Sidebar / Footer primitives with API data.
- Re-export AppShell from src/index.ts.
- Fix build script: `tsc -p tsconfig.json --noEmit false`. The bare
  `tsc` command was a no-op because tsconfig.json sets noEmit:true
  for typecheck speed. Existing dist/ only existed because of an
  earlier emit; clean rebuilds were silently broken.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-05-10 09:42:57 +02:00
commit cf068ce4ec
115 changed files with 36542 additions and 0 deletions

60
src/components/Nav.tsx Normal file
View File

@@ -0,0 +1,60 @@
import React from 'react';
export type NavItem = {
key: string;
label: React.ReactNode;
href?: string;
active?: boolean;
disabled?: boolean;
onClick?: () => void;
};
export type NavProps = {
items: NavItem[];
variant?: 'tabs' | 'pills' | 'underline';
fill?: boolean;
justify?: boolean;
vertical?: boolean;
className?: string;
};
export function Nav({ items, variant = 'tabs', fill, justify, vertical, className = '' }: NavProps) {
const classes = [
'nav',
variant === 'tabs' ? 'nav-tabs' : variant === 'pills' ? 'nav-pills' : 'nav-underline',
fill ? 'nav-fill' : '',
justify ? 'nav-justified' : '',
vertical ? 'flex-column' : '',
className
]
.filter(Boolean)
.join(' ');
return (
<ul className={classes}>
{items.map(item => (
<li className="nav-item" key={item.key}>
{item.href ? (
<a
className={`nav-link ${item.active ? 'active' : ''} ${item.disabled ? 'disabled' : ''}`.trim()}
href={item.href}
onClick={item.onClick}
aria-disabled={item.disabled}
>
{item.label}
</a>
) : (
<button
type="button"
className={`nav-link ${item.active ? 'active' : ''} ${item.disabled ? 'disabled' : ''}`.trim()}
onClick={item.onClick}
disabled={item.disabled}
>
{item.label}
</button>
)}
</li>
))}
</ul>
);
}