diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e916b6b..519b984 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,11 +38,8 @@ jobs: - chat - todos - live-preview - - todos-progressive - - profile-progressive - ws-disabled - login - - todos-components - shared-notepad - flash-messages diff --git a/CLAUDE.md b/CLAUDE.md index ef9c994..9d7a1f8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,8 +63,7 @@ When a form is submitted, the framework resolves the action in this order: ### Reference Examples -- `todos-progressive/` — Canonical Tier 1 example (zero `lvt-*` attributes) -- `profile-progressive/` — Simple Tier 1 form with validation +- `todos/` — Canonical Tier 1 example: CRUD, auth, pagination, modal + toast components - `live-preview/` — Tier 1 with `Change()` method for live updates - `chat/` — Tier 1+2 (uses `lvt-scroll` for auto-scroll) @@ -74,6 +73,7 @@ Before writing code, always consult the LiveTemplate reference docs and guides: - **References:** `https://github.com/livetemplate/livetemplate/tree/main/docs/references/` — client attributes, server API, action routing - **Guides:** `https://github.com/livetemplate/livetemplate/tree/main/docs/guides/` — progressive complexity, patterns, best practices +- **Ephemeral Components:** `https://github.com/livetemplate/livetemplate/tree/main/docs/guides/ephemeral-components.md` — implementing client-side toasts, alerts, and banners without server diffs Use framework-native solutions instead of custom JavaScript. Common patterns: - `input type="search"` has a browser-native clear button; the framework handles the `search` event automatically (no custom JS needed) diff --git a/README.md b/README.md index c7215dd..8072da3 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,10 @@ All examples follow the [progressive complexity](https://github.com/livetemplate |---------|------|-------------|--------------------| | `counter/` | 1 | Counter with logging + graceful shutdown | None | | `chat/` | 1+2 | Real-time multi-user chat | `lvt-scroll` | -| `todos/` | 1 | Full CRUD with SQLite | None | -| `todos-progressive/` | 1 | Zero-attribute CRUD demo | None | -| `todos-components/` | 1+2 | Component library (modal, toast) | Component-internal | +| `todos/` | 1+2 | Full CRUD with SQLite, auth, modal + toast components | Component-internal | | `flash-messages/` | 1 | Flash notification patterns | None | | `avatar-upload/` | 1+2 | File upload with progress | `lvt-upload` | | `progressive-enhancement/` | 1 | Works with/without JS | None | -| `profile-progressive/` | 1 | Form validation | None | | `ws-disabled/` | 1 | HTTP-only mode | None | | `live-preview/` | 1 | Change() live updates | None | | `login/` | 1 | Authentication + sessions | None | diff --git a/go.mod b/go.mod index d8f1f1b..6c999d7 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,10 @@ require ( github.com/chromedp/cdproto v0.0.0-20250803210736-d308e07a266d github.com/chromedp/chromedp v0.14.2 github.com/go-playground/validator/v10 v10.30.1 - github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 github.com/livetemplate/livetemplate v0.8.12 - github.com/livetemplate/lvt v0.0.0-20260327182801-53d6d40e692e - github.com/livetemplate/lvt/components v0.0.0-20260327182801-53d6d40e692e + github.com/livetemplate/lvt v0.0.0-20260402031847-f267dc4e1614 + github.com/livetemplate/lvt/components v0.0.0-20260402031847-f267dc4e1614 modernc.org/sqlite v1.43.0 ) @@ -26,6 +25,7 @@ require ( github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/gobwas/ws v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/go.sum b/go.sum index 47cc436..3182d8a 100644 --- a/go.sum +++ b/go.sum @@ -92,18 +92,12 @@ github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kUL github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/livetemplate/livetemplate v0.8.10 h1:Lg62gb297Iq3/EShPnEUyqDFN8aeyTYchbW3wUFU370= -github.com/livetemplate/livetemplate v0.8.10/go.mod h1:GMvZKyPUq8LSGfgD3pftKOHa6v+I+RDYyff2mNjeAYs= -github.com/livetemplate/livetemplate v0.8.11 h1:s7yFfHp53tv5W7WNViQUK7EBq6ZmBth+mGA34+/zL9s= -github.com/livetemplate/livetemplate v0.8.11/go.mod h1:GMvZKyPUq8LSGfgD3pftKOHa6v+I+RDYyff2mNjeAYs= -github.com/livetemplate/livetemplate v0.8.12-0.20260401033655-c6263289f218 h1:qOcImuTin52xJefrRBm/vJfOaYrRYG+GnU1gB6/47aw= -github.com/livetemplate/livetemplate v0.8.12-0.20260401033655-c6263289f218/go.mod h1:GMvZKyPUq8LSGfgD3pftKOHa6v+I+RDYyff2mNjeAYs= github.com/livetemplate/livetemplate v0.8.12 h1:OeGWVFgLzFOUBGnTFSGSlJKAgIZVyuEjlaWYoBT8iqI= github.com/livetemplate/livetemplate v0.8.12/go.mod h1:GMvZKyPUq8LSGfgD3pftKOHa6v+I+RDYyff2mNjeAYs= -github.com/livetemplate/lvt v0.0.0-20260327182801-53d6d40e692e h1:nAV7BaOatFcbSaP6m9CgLrRsGPeWtbjPDZ8dOI6Zb+c= -github.com/livetemplate/lvt v0.0.0-20260327182801-53d6d40e692e/go.mod h1:17cFl500ntymD3gx8h+ZODnVnTictHgG8Wmz/By75sU= -github.com/livetemplate/lvt/components v0.0.0-20260327182801-53d6d40e692e h1:vuR0pQtEQHZOD2/HvTJfHPKEdoD77XUs1mq1kdjgVig= -github.com/livetemplate/lvt/components v0.0.0-20260327182801-53d6d40e692e/go.mod h1:G9PElN3LRf8xoRtoxbOAcTkV/4FhrCE/Laczkz5bfL4= +github.com/livetemplate/lvt v0.0.0-20260402031847-f267dc4e1614 h1:qBplgu0fjou8+phELQ2af51yS6Gg8BfWX54Zk9G45e0= +github.com/livetemplate/lvt v0.0.0-20260402031847-f267dc4e1614/go.mod h1:17cFl500ntymD3gx8h+ZODnVnTictHgG8Wmz/By75sU= +github.com/livetemplate/lvt/components v0.0.0-20260402031847-f267dc4e1614 h1:unRurl2UPMy/Znlq5O07tsCvg2xmpkjVo+2nAF+kWrU= +github.com/livetemplate/lvt/components v0.0.0-20260402031847-f267dc4e1614/go.mod h1:G9PElN3LRf8xoRtoxbOAcTkV/4FhrCE/Laczkz5bfL4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= diff --git a/profile-progressive/README.md b/profile-progressive/README.md deleted file mode 100644 index a51e7c2..0000000 --- a/profile-progressive/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Profile Editor — Progressive Complexity (Tier 1) - -A profile editing form built with **zero `lvt-*` attributes**. The form auto-submits to the conventional `Submit()` method. - -This demonstrates LiveTemplate's [progressive complexity model](https://github.com/livetemplate/livetemplate/blob/main/docs/guides/progressive-complexity.md) — the simplest possible form. - -## What It Shows - -- **Auto-submit**: `
-``` - -The framework auto-intercepts the form and routes it to `Submit()` — the conventional default when no button name or form name is specified. - -## Next Steps - -- Add `