From 9243d142e9479beee77cf688b6e8fdc410eb4510 Mon Sep 17 00:00:00 2001 From: Max Amundsen Date: Mon, 13 Jul 2026 09:17:11 -0400 Subject: [PATCH] move tsx kit -> uikit --- CLAUDE.md | 2 +- go/bundler/alias.go | 2 +- go/bundler/config.go | 6 +++--- go/bundler/crosstree_test.go | 6 +++--- go/bundler/css.go | 2 +- go/bundler/faicons.go | 2 +- web/auth/ProtectedRoute.ts | 2 +- web/{kit => uikit}/Accordion.tsx | 0 web/{kit => uikit}/Alerts.tsx | 0 web/{kit => uikit}/AutoTable.tsx | 13 +++++++------ web/{kit => uikit}/Badges.tsx | 0 web/{kit => uikit}/Buttons.tsx | 0 web/{kit => uikit}/Calendar.tsx | 0 web/{kit => uikit}/Cards.tsx | 0 web/{kit => uikit}/CellGrid.tsx | 0 web/{kit => uikit}/Chart.tsx | 0 web/{kit => uikit}/CrmTabs.tsx | 0 web/{kit => uikit}/DatePicker.tsx | 0 web/{kit => uikit}/EnvBadge.tsx | 0 web/{kit => uikit}/Floating.tsx | 0 web/{kit => uikit}/Formatters.ts | 0 web/{kit => uikit}/Forms.tsx | 0 web/{kit => uikit}/FuzzyMatch.tsx | 0 web/{kit => uikit}/General.tsx | 4 ++-- web/{kit => uikit}/Icons.tsx | 0 web/{kit => uikit}/Menu.tsx | 0 web/{kit => uikit}/Modal.tsx | 0 web/{kit => uikit}/Popovers.tsx | 0 web/{kit => uikit}/PrettyTable.tsx | 0 web/{kit => uikit}/RemoteUpdateFlash.tsx | 0 web/{kit => uikit}/Sidebar.tsx | 0 web/{kit => uikit}/Tabs.tsx | 0 web/{kit => uikit}/Toast.tsx | 0 web/{kit => uikit}/ToggleSwitch.tsx | 0 web/{kit => uikit}/Tooltips.tsx | 0 web/{kit => uikit}/Tutorial.tsx | 0 web/{kit => uikit}/Validation.ts | 0 37 files changed, 20 insertions(+), 19 deletions(-) rename web/{kit => uikit}/Accordion.tsx (100%) rename web/{kit => uikit}/Alerts.tsx (100%) rename web/{kit => uikit}/AutoTable.tsx (99%) rename web/{kit => uikit}/Badges.tsx (100%) rename web/{kit => uikit}/Buttons.tsx (100%) rename web/{kit => uikit}/Calendar.tsx (100%) rename web/{kit => uikit}/Cards.tsx (100%) rename web/{kit => uikit}/CellGrid.tsx (100%) rename web/{kit => uikit}/Chart.tsx (100%) rename web/{kit => uikit}/CrmTabs.tsx (100%) rename web/{kit => uikit}/DatePicker.tsx (100%) rename web/{kit => uikit}/EnvBadge.tsx (100%) rename web/{kit => uikit}/Floating.tsx (100%) rename web/{kit => uikit}/Formatters.ts (100%) rename web/{kit => uikit}/Forms.tsx (100%) rename web/{kit => uikit}/FuzzyMatch.tsx (100%) rename web/{kit => uikit}/General.tsx (95%) rename web/{kit => uikit}/Icons.tsx (100%) rename web/{kit => uikit}/Menu.tsx (100%) rename web/{kit => uikit}/Modal.tsx (100%) rename web/{kit => uikit}/Popovers.tsx (100%) rename web/{kit => uikit}/PrettyTable.tsx (100%) rename web/{kit => uikit}/RemoteUpdateFlash.tsx (100%) rename web/{kit => uikit}/Sidebar.tsx (100%) rename web/{kit => uikit}/Tabs.tsx (100%) rename web/{kit => uikit}/Toast.tsx (100%) rename web/{kit => uikit}/ToggleSwitch.tsx (100%) rename web/{kit => uikit}/Tooltips.tsx (100%) rename web/{kit => uikit}/Tutorial.tsx (100%) rename web/{kit => uikit}/Validation.ts (100%) diff --git a/CLAUDE.md b/CLAUDE.md index 32163973..f3810310 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,7 +57,7 @@ go -C go test ./... scaffolding. Apps import as `@kjol/*`. (Concrete permission constants stay app-side.) **Frontend import aliases** (resolved by the bundler and mirrored in each app's tsconfig -`paths`): `@ui/*` → `web/kit`, `@kjol/*` → `web/`, `@appgen/*` → the app's generated dir +`paths`): `@ui/*` → `web/uikit`, `@kjol/*` → `web/`, `@appgen/*` → the app's generated dir (e.g. the FA `faIcons` registry — app-owned, gitignored, regenerated each build). The kit's own imports of sibling components stay relative (`./Buttons.tsx`). diff --git a/go/bundler/alias.go b/go/bundler/alias.go index a30c5151..7716e6f5 100644 --- a/go/bundler/alias.go +++ b/go/bundler/alias.go @@ -19,7 +19,7 @@ import ( func aliasRoots() map[string]string { abs := func(p string) string { a, _ := filepath.Abs(p); return a } return map[string]string{ - "@ui": abs(kitSrcDir()), + "@ui": abs(uikitDir()), "@kjol": abs(webRoot()), "@appgen": abs(genTSDir), } diff --git a/go/bundler/config.go b/go/bundler/config.go index e5331cd7..047af08b 100644 --- a/go/bundler/config.go +++ b/go/bundler/config.go @@ -57,10 +57,10 @@ func webRoot() string { return frontendDir } -// kitSrcDir is where the shared Solid component kit lives (@ui/* root). -func kitSrcDir() string { +// uikitDir is where the shared Solid component kit lives (@ui/* root). +func uikitDir() string { if webDir != "" { - return filepath.Join(webDir, "kit") + return filepath.Join(webDir, "uikit") } return filepath.Join(frontendDir, "src", "ui") } diff --git a/go/bundler/crosstree_test.go b/go/bundler/crosstree_test.go index caa0768d..1309382a 100644 --- a/go/bundler/crosstree_test.go +++ b/go/bundler/crosstree_test.go @@ -9,7 +9,7 @@ import ( // TestCrossTreeJSBundle proves the bundler resolves the shared kit across the // app/kjol tree boundary: a temp app entry imports @ui/Buttons, which pulls the -// real kjol web/kit (Buttons -> ./Icons -> @appgen/faIcons stub) and the solid +// real kjol web/uikit (Buttons -> ./Icons -> @appgen/faIcons stub) and the solid // runtime from web/runtime. If the alias plugin, merged vendor manifest, and // multi-dir NodePaths all work, esbuild produces a non-empty bundle. func TestCrossTreeJSBundle(t *testing.T) { @@ -17,7 +17,7 @@ func TestCrossTreeJSBundle(t *testing.T) { if err != nil { t.Fatal(err) } - if _, err := os.Stat(filepath.Join(webAbs, "kit", "Buttons.tsx")); err != nil { + if _, err := os.Stat(filepath.Join(webAbs, "uikit", "Buttons.tsx")); err != nil { t.Skipf("kjol web kit not present (%v)", err) } @@ -62,7 +62,7 @@ func TestCrossTreeCSS(t *testing.T) { if err != nil { t.Fatal(err) } - if _, err := os.Stat(filepath.Join(webAbs, "kit")); err != nil { + if _, err := os.Stat(filepath.Join(webAbs, "uikit")); err != nil { t.Skipf("kjol web kit not present (%v)", err) } diff --git a/go/bundler/css.go b/go/bundler/css.go index 9fba82cc..d5b6464b 100644 --- a/go/bundler/css.go +++ b/go/bundler/css.go @@ -73,7 +73,7 @@ func compileCSSBundle(label string, twSources []string, outName string) (bundleS // dir) plus the shared kit tree scanned directly, so kit component classes are // present even though the kit lives outside the app frontend. candidates := scanSources(cssDir, twSources) - kitCands := scanSources(kitSrcDir(), []string{"**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"}) + kitCands := scanSources(uikitDir(), []string{"**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"}) candidates = dedupStrings(append(candidates, kitCands...)) // Prepend the shared @theme scaffold (kjol web/styles/theme.css) ahead of the diff --git a/go/bundler/faicons.go b/go/bundler/faicons.go index 47a296d4..50d70696 100644 --- a/go/bundler/faicons.go +++ b/go/bundler/faicons.go @@ -48,7 +48,7 @@ func generateFAIcons() error { // Scan both the app pages and the shared kit so every icon either tree // references ends up in this app's registry. - names, custom, err := scanIconNames([]string{filepath.Join(frontendDir, "src"), kitSrcDir()}) + names, custom, err := scanIconNames([]string{filepath.Join(frontendDir, "src"), uikitDir()}) if err != nil { return fmt.Errorf("scanning icon names: %w", err) } diff --git a/web/auth/ProtectedRoute.ts b/web/auth/ProtectedRoute.ts index bba811fb..408d7b8c 100644 --- a/web/auth/ProtectedRoute.ts +++ b/web/auth/ProtectedRoute.ts @@ -3,7 +3,7 @@ import html from "solid-js/html"; import { useAuth } from "./AuthContext.ts"; import { getToken } from "./useAuthFetch.js"; import { hasPermission } from "./permissions.ts"; -import { Loader } from "../kit/General.tsx"; +import { Loader } from "../uikit/General.tsx"; interface ProtectedRouteProps { permissions?: string[]; diff --git a/web/kit/Accordion.tsx b/web/uikit/Accordion.tsx similarity index 100% rename from web/kit/Accordion.tsx rename to web/uikit/Accordion.tsx diff --git a/web/kit/Alerts.tsx b/web/uikit/Alerts.tsx similarity index 100% rename from web/kit/Alerts.tsx rename to web/uikit/Alerts.tsx diff --git a/web/kit/AutoTable.tsx b/web/uikit/AutoTable.tsx similarity index 99% rename from web/kit/AutoTable.tsx rename to web/uikit/AutoTable.tsx index f7d123b5..14c8c3e3 100644 --- a/web/kit/AutoTable.tsx +++ b/web/uikit/AutoTable.tsx @@ -4183,31 +4183,32 @@ function PaginationButton(props: JSX.ButtonHTMLAttributes) { interface TdProps { class?: string; + style?: string; children: any; } export function TdLeft(props: TdProps) { - return {props.children}; + return {props.children}; } export function TdRight(props: TdProps) { - return {props.children}; + return {props.children}; } export function TdCenter(props: TdProps) { - return {props.children}; + return {props.children}; } export function TdUniformLeft(props: TdProps) { - return {props.children}; + return {props.children}; } export function TdUniformRight(props: TdProps) { - return {props.children}; + return {props.children}; } export function TdUniformCenter(props: TdProps) { - return {props.children}; + return {props.children}; } export default AutoTable; diff --git a/web/kit/Badges.tsx b/web/uikit/Badges.tsx similarity index 100% rename from web/kit/Badges.tsx rename to web/uikit/Badges.tsx diff --git a/web/kit/Buttons.tsx b/web/uikit/Buttons.tsx similarity index 100% rename from web/kit/Buttons.tsx rename to web/uikit/Buttons.tsx diff --git a/web/kit/Calendar.tsx b/web/uikit/Calendar.tsx similarity index 100% rename from web/kit/Calendar.tsx rename to web/uikit/Calendar.tsx diff --git a/web/kit/Cards.tsx b/web/uikit/Cards.tsx similarity index 100% rename from web/kit/Cards.tsx rename to web/uikit/Cards.tsx diff --git a/web/kit/CellGrid.tsx b/web/uikit/CellGrid.tsx similarity index 100% rename from web/kit/CellGrid.tsx rename to web/uikit/CellGrid.tsx diff --git a/web/kit/Chart.tsx b/web/uikit/Chart.tsx similarity index 100% rename from web/kit/Chart.tsx rename to web/uikit/Chart.tsx diff --git a/web/kit/CrmTabs.tsx b/web/uikit/CrmTabs.tsx similarity index 100% rename from web/kit/CrmTabs.tsx rename to web/uikit/CrmTabs.tsx diff --git a/web/kit/DatePicker.tsx b/web/uikit/DatePicker.tsx similarity index 100% rename from web/kit/DatePicker.tsx rename to web/uikit/DatePicker.tsx diff --git a/web/kit/EnvBadge.tsx b/web/uikit/EnvBadge.tsx similarity index 100% rename from web/kit/EnvBadge.tsx rename to web/uikit/EnvBadge.tsx diff --git a/web/kit/Floating.tsx b/web/uikit/Floating.tsx similarity index 100% rename from web/kit/Floating.tsx rename to web/uikit/Floating.tsx diff --git a/web/kit/Formatters.ts b/web/uikit/Formatters.ts similarity index 100% rename from web/kit/Formatters.ts rename to web/uikit/Formatters.ts diff --git a/web/kit/Forms.tsx b/web/uikit/Forms.tsx similarity index 100% rename from web/kit/Forms.tsx rename to web/uikit/Forms.tsx diff --git a/web/kit/FuzzyMatch.tsx b/web/uikit/FuzzyMatch.tsx similarity index 100% rename from web/kit/FuzzyMatch.tsx rename to web/uikit/FuzzyMatch.tsx diff --git a/web/kit/General.tsx b/web/uikit/General.tsx similarity index 95% rename from web/kit/General.tsx rename to web/uikit/General.tsx index ebc29a91..b461c705 100644 --- a/web/kit/General.tsx +++ b/web/uikit/General.tsx @@ -60,9 +60,9 @@ export function PageLink(props: PageLinkProps) { ); } -export function Loader() { +export function Loader(props: { class?: string; style?: string }) { return ( -
+
); diff --git a/web/kit/Icons.tsx b/web/uikit/Icons.tsx similarity index 100% rename from web/kit/Icons.tsx rename to web/uikit/Icons.tsx diff --git a/web/kit/Menu.tsx b/web/uikit/Menu.tsx similarity index 100% rename from web/kit/Menu.tsx rename to web/uikit/Menu.tsx diff --git a/web/kit/Modal.tsx b/web/uikit/Modal.tsx similarity index 100% rename from web/kit/Modal.tsx rename to web/uikit/Modal.tsx diff --git a/web/kit/Popovers.tsx b/web/uikit/Popovers.tsx similarity index 100% rename from web/kit/Popovers.tsx rename to web/uikit/Popovers.tsx diff --git a/web/kit/PrettyTable.tsx b/web/uikit/PrettyTable.tsx similarity index 100% rename from web/kit/PrettyTable.tsx rename to web/uikit/PrettyTable.tsx diff --git a/web/kit/RemoteUpdateFlash.tsx b/web/uikit/RemoteUpdateFlash.tsx similarity index 100% rename from web/kit/RemoteUpdateFlash.tsx rename to web/uikit/RemoteUpdateFlash.tsx diff --git a/web/kit/Sidebar.tsx b/web/uikit/Sidebar.tsx similarity index 100% rename from web/kit/Sidebar.tsx rename to web/uikit/Sidebar.tsx diff --git a/web/kit/Tabs.tsx b/web/uikit/Tabs.tsx similarity index 100% rename from web/kit/Tabs.tsx rename to web/uikit/Tabs.tsx diff --git a/web/kit/Toast.tsx b/web/uikit/Toast.tsx similarity index 100% rename from web/kit/Toast.tsx rename to web/uikit/Toast.tsx diff --git a/web/kit/ToggleSwitch.tsx b/web/uikit/ToggleSwitch.tsx similarity index 100% rename from web/kit/ToggleSwitch.tsx rename to web/uikit/ToggleSwitch.tsx diff --git a/web/kit/Tooltips.tsx b/web/uikit/Tooltips.tsx similarity index 100% rename from web/kit/Tooltips.tsx rename to web/uikit/Tooltips.tsx diff --git a/web/kit/Tutorial.tsx b/web/uikit/Tutorial.tsx similarity index 100% rename from web/kit/Tutorial.tsx rename to web/uikit/Tutorial.tsx diff --git a/web/kit/Validation.ts b/web/uikit/Validation.ts similarity index 100% rename from web/kit/Validation.ts rename to web/uikit/Validation.ts