Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ jobs:
# (the previously published tag during a tag push) always has it.
$main = @(
'package main',
'import "github.com/monstercameron/GoWebComponents/ui"',
'import "github.com/monstercameron/GoWebComponents/v4/ui"',
'var _ = ui.Text("release-smoke")',
'func main() {}'
) -join "`n"
Set-Content -Path (Join-Path $workDir "main.go") -Value $main -Encoding utf8
go get github.com/monstercameron/GoWebComponents@latest
if ($LASTEXITCODE -ne 0) { throw "go get GoWebComponents@latest failed" }
go get github.com/monstercameron/GoWebComponents/v4@latest
if ($LASTEXITCODE -ne 0) { throw "go get GoWebComponents/v4@latest failed" }
go build ./...
if ($LASTEXITCODE -ne 0) { throw "native consumer build failed" }
$env:GOOS = "js"; $env:GOARCH = "wasm"
Expand Down
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ apply at once.
Module path
github.com/monstercameron/GoWebComponents
Import public packages by that path, e.g.
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/html"
. "github.com/monstercameron/GoWebComponents/html/shorthand" // dot-import sugar
"github.com/monstercameron/GoWebComponents/v4/ui"
"github.com/monstercameron/GoWebComponents/v4/html"
. "github.com/monstercameron/GoWebComponents/v4/html/shorthand" // dot-import sugar

Mental model
React-style components + hooks on a fiber runtime, written in Go, compiled to
Expand All @@ -199,8 +199,8 @@ Minimal app (entry file MUST be js/wasm - see build constraint)
package main

import (
. "github.com/monstercameron/GoWebComponents/html/shorthand"
"github.com/monstercameron/GoWebComponents/ui"
. "github.com/monstercameron/GoWebComponents/v4/html/shorthand"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

// App renders the root component.
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ Import public packages from the module path exactly as declared in `go.mod`:

```go
import (
"github.com/monstercameron/GoWebComponents/css"
"github.com/monstercameron/GoWebComponents/css/u"
"github.com/monstercameron/GoWebComponents/fetch"
"github.com/monstercameron/GoWebComponents/flags"
"github.com/monstercameron/GoWebComponents/hotreload"
"github.com/monstercameron/GoWebComponents/html"
. "github.com/monstercameron/GoWebComponents/html/shorthand"
"github.com/monstercameron/GoWebComponents/router"
"github.com/monstercameron/GoWebComponents/state"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/css"
"github.com/monstercameron/GoWebComponents/v4/css/u"
"github.com/monstercameron/GoWebComponents/v4/fetch"
"github.com/monstercameron/GoWebComponents/v4/flags"
"github.com/monstercameron/GoWebComponents/v4/hotreload"
"github.com/monstercameron/GoWebComponents/v4/html"
. "github.com/monstercameron/GoWebComponents/v4/html/shorthand"
"github.com/monstercameron/GoWebComponents/v4/router"
"github.com/monstercameron/GoWebComponents/v4/state"
"github.com/monstercameron/GoWebComponents/v4/ui"
)
```

Expand Down Expand Up @@ -127,10 +127,10 @@ package main
import (
"fmt"

"github.com/monstercameron/GoWebComponents/css"
"github.com/monstercameron/GoWebComponents/css/u"
. "github.com/monstercameron/GoWebComponents/html/shorthand"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/css"
"github.com/monstercameron/GoWebComponents/v4/css/u"
. "github.com/monstercameron/GoWebComponents/v4/html/shorthand"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

type StarterAppProps struct {
Expand Down
4 changes: 2 additions & 2 deletions a11y/a11y.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"time"

"github.com/monstercameron/GoWebComponents/html"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/html"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

// Item describes one option in headless composite widgets.
Expand Down
2 changes: 1 addition & 1 deletion a11y/a11y_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

func TestHeadlessMenuAndComboboxExposeARIAContracts(parseT *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions a11y/dialog.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package a11y
import (
"strings"

"github.com/monstercameron/GoWebComponents/html"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/html"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

// DialogButton is one action button in a dialog.
Expand Down
4 changes: 2 additions & 2 deletions a11y/dialog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/a11y"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/a11y"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

func TestAlertDialogEmitsARIA(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions a11y/radiogroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/a11y"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/a11y"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

func renderRadioGroup(t *testing.T, parseProps a11y.RadioGroupProps) string {
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/audit_coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// TestMountIsAuditedAndReversible pins DEFECT-1/DEFECT-2 fixes: a successful
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"sync/atomic"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// AgentSocket abstracts one bidirectional frame-oriented transport. The
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// fakeSocket is an in-memory AgentSocket for testing the client loop. Frames
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/client_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"syscall/js"
"time"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

var activeConsoleCaptureRelease consoleCaptureRelease
Expand Down
6 changes: 3 additions & 3 deletions agentbridge/commands_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"time"

"github.com/monstercameron/GoWebComponents/events"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/router"
"github.com/monstercameron/GoWebComponents/v4/events"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/router"
)

// RegisterControlCommands installs bridge.wait-for and bridge.describe.
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/commands_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

func TestRegisterControlCommandsRegistersWaitForAndDescribe(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/commands_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// readSnapshotPayload is the decoded payload for the bridge.snapshot command.
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/commands_read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// TestRegisterReadCommandsRegistersCommands pins that RegisterReadCommands
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/commands_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// RegisterRenderCommands installs bridge.render-tree, which interprets a JSON
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/commands_render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

func TestRenderBuildElementAllowsSafeTreeAndSanitizesAttrs(parseT *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/commands_replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"sync"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// replayMu guards the replay recording flag and the captured event buffer.
Expand Down
6 changes: 3 additions & 3 deletions agentbridge/commands_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"sync"

"github.com/monstercameron/GoWebComponents/events"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/state"
"github.com/monstercameron/GoWebComponents/v4/events"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/state"
)

// RegisterWriteCommands installs the four input-level mutation commands on the
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/commands_write_setatom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package agentbridge
import (
"testing"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/state"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/state"
)

// seedAtom registers an atom id with a starting value in the global runtime so
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/commands_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// ---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/commands_write_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package agentbridge
import (
"encoding/json"

"github.com/monstercameron/GoWebComponents/router"
"github.com/monstercameron/GoWebComponents/v4/router"
)

// writeNavigatePlatform calls router.Navigate on wasm builds where the global
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/mount_introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agentbridge
import (
"sort"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// writeRemount re-mounts a previously-mounted component, reversing a
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/mount_introspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// TestListMountComponents pins that RegisterMountComponent makes a component
Expand Down
2 changes: 1 addition & 1 deletion agentbridge/mount_race_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// TestMountConcurrentReservationNeverOverlaps pins the TOCTOU fix: when many
Expand Down
4 changes: 2 additions & 2 deletions agentbridge/render_detached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// TestRenderDetachedDoesNotClobberAppRoot pins the root-isolation fix: rendering
Expand Down
6 changes: 3 additions & 3 deletions agentbridge/safety_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/json"
"testing"

"github.com/monstercameron/GoWebComponents/events"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/state"
"github.com/monstercameron/GoWebComponents/v4/events"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/state"
)

// TestSetAtomUndoRestoresPriorValue pins that a set-atom is reversible: after
Expand Down
4 changes: 2 additions & 2 deletions agentui/agentui.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"slices"
"sort"

"github.com/monstercameron/GoWebComponents/html"
"github.com/monstercameron/GoWebComponents/ui"
"github.com/monstercameron/GoWebComponents/v4/html"
"github.com/monstercameron/GoWebComponents/v4/ui"
)

// Node is the typed, JSON-serializable renderable schema an agent emits.
Expand Down
6 changes: 3 additions & 3 deletions agentui/agentui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"
"testing"

"github.com/monstercameron/GoWebComponents/agentui"
"github.com/monstercameron/GoWebComponents/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/internal/runtime"
"github.com/monstercameron/GoWebComponents/v4/agentui"
"github.com/monstercameron/GoWebComponents/v4/internal/platform/mockdom"
"github.com/monstercameron/GoWebComponents/v4/internal/runtime"
)

// sampleAgentSchema is the kind of JSON an agent emits server-side: a small dashboard view
Expand Down
2 changes: 1 addition & 1 deletion agentui/api_baseline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agentui_test
import (
"testing"

"github.com/monstercameron/GoWebComponents/internal/apidump"
"github.com/monstercameron/GoWebComponents/v4/internal/apidump"
)

// TestPublicAPIBaseline pins this package's exported surface. A change to any exported
Expand Down
2 changes: 1 addition & 1 deletion anim/api_baseline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package anim_test
import (
"testing"

"github.com/monstercameron/GoWebComponents/internal/apidump"
"github.com/monstercameron/GoWebComponents/v4/internal/apidump"
)

// TestPublicAPIBaseline pins this package's exported surface. A change to any exported
Expand Down
2 changes: 1 addition & 1 deletion css/css.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"sync"

"github.com/monstercameron/GoWebComponents/html"
"github.com/monstercameron/GoWebComponents/v4/html"
)

// Sheet is a generated class name (or space-separated names). It satisfies
Expand Down
Loading
Loading