move tsx kit -> uikit

This commit is contained in:
2026-07-13 09:17:11 -04:00
parent 98978e4930
commit 9243d142e9
37 changed files with 20 additions and 19 deletions

View File

@@ -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),
}

View File

@@ -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")
}

View File

@@ -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)
}

View File

@@ -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

View File

@@ -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)
}