refactor folder structure

This commit is contained in:
2026-07-17 12:52:05 -04:00
parent dda0e738d4
commit 85d07f069e
80 changed files with 93 additions and 85 deletions

View File

@@ -1,7 +1,7 @@
package app
import (
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -1,7 +1,7 @@
package app
import (
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
)
// The C layer's documentation.
@@ -471,7 +471,7 @@ const unityTUSnippet = `// The whole layer, as one translation unit — the only
// compiler. Order matters: it is textual inclusion, not linking.
#include "base/base_inc.c" // core, arena, strings. Everything below needs it.
// The five backends declare their helpers `+ "`internal`" + ` (file-static), so they
// The five backends declare their helpers ` + "`internal`" + ` (file-static), so they
// belong in the SAME TU as the dispatch that calls them.
#include "lexer/lexer.c"
#include "lexer/lexer_c.c"
@@ -488,7 +488,7 @@ const unityTUSnippet = `// The whole layer, as one translation unit — the only
// ...and then your own program, compiled with all of it:
#include "app/app.c"`
const baseCoreSnippet = `// The three meanings of `+ "`static`" + ` in C, given three names.
const baseCoreSnippet = `// The three meanings of ` + "`static`" + ` in C, given three names.
#define internal static // a function private to this file
#define global static // a variable owned by this translation unit
#define local_persist static // a local that survives the call

View File

@@ -5,8 +5,8 @@
package app
import (
"kjol/rsc"
"kjol/vdom"
"kjol/wasmruntime/rsc"
"kjol/wasmruntime/vdom"
)
// ServerCounter is a generated client stub for the server component of the same name.

View File

@@ -4,8 +4,8 @@ import (
"strings"
"time"
. "kjol/vdom"
"kjol/wasmruntime"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -5,7 +5,7 @@ import (
"strings"
"kjol/httputil"
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -4,7 +4,7 @@ import (
"strings"
"kjol/lexer" // syntax highlighting for the code blocks — a string in, HTML out
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
// The host API is dual-build — real under js/wasm, no-ops natively — so neutral page
// code can measure the browser and still server-render. This page uses it for exactly
// one thing: reading the clock when hydration commits.

View File

@@ -1,7 +1,7 @@
package app
import (
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -3,7 +3,7 @@ package app
import (
"strings"
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -15,7 +15,7 @@ import (
"strconv"
"strings"
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -1,7 +1,7 @@
// Code generated by wasmgen. DO NOT EDIT.
package app
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Routes maps each //gowasm:page path to its instantiated render function.
func Routes(d Deps) map[string]func() *vdom.VNode {

View File

@@ -4,7 +4,7 @@
package app
import "kjol/rsc"
import "kjol/wasmruntime/rsc"
func init() {
rsc.Register("ServerCounter", ServerCounter)

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"time"
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
"kjol/webui"
)

View File

@@ -1,7 +1,7 @@
package app
import (
. "kjol/vdom"
. "kjol/wasmruntime/vdom"
ui "kjol/webui"
)

View File

@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// The two-runtime demo.s whole claim is that its two panes are ONE function: the live

View File

@@ -16,8 +16,8 @@ import (
"net/http"
"kjol/httputil"
"kjol/vdom"
"kjol/wasmdevserver"
"kjol/wasmruntime/vdom"
"kjol/webui"
"kjolwebsite/app"
@@ -42,10 +42,10 @@ func main() {
Watch: *watch,
WatchDirs: []string{
"app", "wasm", "css", // the Go/WASM app
"frontend", // the Solid app — a .tsx save rebuilds the JS bundle
"../../webui", "../../vdom", "../../wasmruntime", "../../rsc", // the wasm engine
"../../lexer", // the code-block highlighter
"../../jsruntime/uikit", "../../jsruntime/styles", // the Solid kit + the shared theme
"frontend", // the Solid app — a .tsx save rebuilds the JS bundle
"../../webui", "../../wasmruntime", // the wasm engine (vdom + rsc now live UNDER wasmruntime, and the watcher walks subdirs)
"../../lexer", // the code-block highlighter
"../../jsruntime/uikit", "../../jsruntime/styles", // the Solid kit + the shared theme
},
Build: build.All,
BuildCSS: build.Tailwind, // a .css save skips codegen+wasm and hot-swaps the stylesheet

View File

@@ -5,9 +5,9 @@
package main
import (
"kjolwebsite/app"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
"kjolwebsite/app"
)
func main() {

View File

@@ -155,7 +155,7 @@ func write(path, tmpl string, data genData) {
const routesTmpl = `// Code generated by wasmgen. DO NOT EDIT.
package app
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Routes maps each //gowasm:page path to its instantiated render function.
func Routes(d Deps) map[string]func() *vdom.VNode {
@@ -191,7 +191,7 @@ const serverTmpl = `// Code generated by wasmgen. DO NOT EDIT.
package app
import "kjol/rsc"
import "kjol/wasmruntime/rsc"
func init() {
{{range .Servers}} rsc.Register("{{.}}", {{.}})
@@ -205,8 +205,8 @@ const clientTmpl = `// Code generated by wasmgen. DO NOT EDIT.
package app
import (
"kjol/rsc"
"kjol/vdom"
"kjol/wasmruntime/rsc"
"kjol/wasmruntime/vdom"
)
{{range .Servers}}// {{.}} is a generated client stub for the server component of the same name.

View File

@@ -29,7 +29,7 @@ import (
"sync"
"time"
"kjol/rsc"
"kjol/wasmruntime/rsc"
)
// Config wires an app into the dev server. Render and Document are called per

View File

@@ -2,7 +2,7 @@
package wasmruntime
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// The server half of the host API (see host.go). Nothing here touches a browser,
// because there isn't one: measurements are zero, listeners are never installed,

View File

@@ -7,7 +7,7 @@ import (
"syscall/js"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Run from kjol/go:

View File

@@ -5,7 +5,7 @@ package wasmruntime
import (
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// The browser half of the host API (see host.go for the contract and the two

View File

@@ -7,7 +7,7 @@ import (
"syscall/js"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// buildServerDOM fakes what the HTML parser hands us: a real DOM tree, built from

View File

@@ -5,7 +5,7 @@ package wasmruntime
import (
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
var (

View File

@@ -5,7 +5,7 @@ package wasmruntime
import (
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// State preservation across an in-place hot swap (see the dev server's

View File

@@ -6,7 +6,7 @@ import (
"syscall/js"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Run from kjol/go:

View File

@@ -8,7 +8,7 @@ package wasmruntime
import (
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
var document = js.Global().Get("document")

View File

@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// The reconciler is wasm-only and needs a DOM, so these do not run under a plain

View File

@@ -5,7 +5,7 @@ package wasmruntime
import (
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Router holds the current path in a signal, so reading Path() during render

View File

@@ -7,7 +7,7 @@ import (
"encoding/gob"
"syscall/js"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Mount connects to a server component by name and returns a render function.

View File

@@ -8,7 +8,7 @@ import (
"sort"
"sync"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// registry maps a server-component name to its factory (created by generated

View File

@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Floating.Panel and Modal both declare their initial inline style in the style

View File

@@ -5,7 +5,7 @@ package wasmruntime
import (
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// An <svg> built with document.createElement() is NOT an SVG element — it is an

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/Accordion.tsx.
//

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/Alerts.tsx. The TSX exports one component per color
// (AlertWhite, AlertBlue, …); here that's Alert(color, header, children).

View File

@@ -43,8 +43,8 @@ import (
"strings"
"time"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// ColumnPosition is a cell/header alignment (mirrors the TSX 0|1|2 union).

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/Badges.tsx.

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/Buttons.tsx.

View File

@@ -5,7 +5,7 @@ import (
"strconv"
"time"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Day-of-week and month labels (module-level in the TSX). Prefixed to stay

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/Cards.tsx. The `ui-card`/`no-flex` marker classes are kept so
// any page CSS targeting them still applies; baseline styling is Tailwind.

View File

@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/CellGrid.tsx — an editable, sortable spreadsheet-style grid.

View File

@@ -24,8 +24,8 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
type ChartKind string

View File

@@ -3,7 +3,7 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/CrmTabs.tsx.

View File

@@ -22,8 +22,8 @@ import (
"strings"
"time"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// -- Tailwind class strings, verbatim from DatePicker.tsx (cmd/twcss scans these) --

View File

@@ -5,7 +5,7 @@ package webui
import (
"strings"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// IsNonProdEnv reports whether env is a non-empty, non-production deployment

View File

@@ -3,8 +3,8 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Floating is the live controller for one floating panel — the Go answer to the

View File

@@ -4,8 +4,8 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/Forms.tsx. Reactive accessors collapse to plain values, and

View File

@@ -3,8 +3,8 @@ package webui
import (
"strings"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// The three form controls the first pass left out, plus the two input masks. All of

View File

@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// ---- input masks ----

View File

@@ -5,7 +5,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// fakeEvent is a vdom.Event with no DOM behind it — enough to drive Floating's

View File

@@ -6,7 +6,7 @@ import (
"strings"
"unicode"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/FuzzyMatch.tsx.

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/General.tsx. Anchor components render plain <a href>; the app
// wires SPA navigation on top (e.g. its layout nav uses Button/OnClick).

View File

@@ -3,7 +3,7 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/Icons.tsx. The TSX resolves FontAwesome glyphs from an

View File

@@ -8,7 +8,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// An unregistered icon name renders as an empty box: right size, no glyph. Nothing

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of jsruntime/uikit/Menu.tsx, rebuilt on the Floating controller (floating.go).
//

View File

@@ -3,8 +3,8 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Port of jsruntime/uikit/Modal.tsx.

View File

@@ -27,7 +27,7 @@
// }
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
const popoverCls = "bg-surface rounded-default shadow-lg border border-line"

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/PrettyTable.tsx.
//

View File

@@ -2,7 +2,7 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// RemoteFlash is the trigger/signal pair from createRemoteFlash: Fire() shows
// the flash, Visible() reports whether it is currently shown, and Clear() hides

View File

@@ -2,7 +2,7 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
const sidebarNavRoot = "bg-surface rounded-default shadow-sm border border-line py-2"
const sidebarNavList = "list-none m-0 p-0"

View File

@@ -4,8 +4,8 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Port of FormSignaturePad (jsruntime/uikit/Forms.tsx) — freehand signing.

View File

@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// The pad's value IS the markup it shows — that is the whole reason it draws into an SVG

View File

@@ -4,7 +4,7 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// Port of web/kit/Tabs.tsx.

View File

@@ -1,8 +1,8 @@
package webui
import (
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Dark mode.

View File

@@ -3,8 +3,8 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Port of jsruntime/uikit/Toast.tsx.

View File

@@ -1,6 +1,6 @@
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
// Port of web/kit/ToggleSwitch.tsx. Reactive accessors collapse to plain values.

View File

@@ -35,7 +35,7 @@
// trigger lived inside, which yanked the trigger out from under the cursor.
package webui
import "kjol/vdom"
import "kjol/wasmruntime/vdom"
const tooltipCls = "bg-neutral-800 text-white text-sm px-2.5 py-1.5 rounded-default shadow-lg max-w-80 relative"

View File

@@ -3,8 +3,8 @@ package webui
import (
"strconv"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// Port of jsruntime/uikit/Tutorial.tsx — a guided tour: it dims the page, cuts a

View File

@@ -16,8 +16,8 @@ import (
"strconv"
"strings"
"kjol/vdom"
"kjol/wasmruntime"
"kjol/wasmruntime/vdom"
)
// ── the albersUsa projection (ported from d3-geo; scale 1280, translate [480,300]) ──────

View File

@@ -46,7 +46,7 @@ package webui
import (
"strings"
"kjol/vdom"
"kjol/wasmruntime/vdom"
)
// cx joins non-empty class fragments with single spaces (a tiny clsx). Trailing