@loadbare/app 0.18.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/build/assemble.d.ts +7 -1
- package/dist/build/assemble.d.ts.map +1 -1
- package/dist/build/assemble.js +81 -11
- package/dist/build/assemble.js.map +1 -1
- package/dist/build/cli.d.ts +3 -0
- package/dist/build/cli.d.ts.map +1 -1
- package/dist/build/cli.js +6 -1
- package/dist/build/cli.js.map +1 -1
- package/dist/build/declared.d.ts +25 -0
- package/dist/build/declared.d.ts.map +1 -0
- package/dist/build/declared.js +62 -0
- package/dist/build/declared.js.map +1 -0
- package/dist/build/pages.d.ts +6 -0
- package/dist/build/pages.d.ts.map +1 -1
- package/dist/build/pages.js +32 -12
- package/dist/build/pages.js.map +1 -1
- package/dist/core/lb-types.d.ts +6 -3
- package/dist/core/lb-types.d.ts.map +1 -1
- package/dist/core/lb-types.js.map +1 -1
- package/dist/hub/lb-apply.d.ts.map +1 -1
- package/dist/hub/lb-apply.js +10 -3
- package/dist/hub/lb-apply.js.map +1 -1
- package/dist/server/lb-server.d.ts +5 -2
- package/dist/server/lb-server.d.ts.map +1 -1
- package/dist/server/lb-server.js +12 -3
- package/dist/server/lb-server.js.map +1 -1
- package/docs/TECHREF-1.0.md +33 -85
- package/docs/comparison.md +695 -482
- package/docs/departures.md +63 -0
- package/docs/miswarts.md +140 -0
- package/docs/opinions.md +155 -0
- package/docs/reference/builder.md +9 -2
- package/docs/reference/chrome.md +2 -1
- package/docs/reference/css.md +163 -0
- package/docs/reference/custom-elements.md +1 -1
- package/docs/reference/data-binding.md +44 -10
- package/docs/reference/page-files.md +38 -5
- package/docs/reference/widgets.md +24 -2
- package/docs/roadmap.md +55 -43
- package/docs/testing.md +62 -28
- package/docs/theory.md +348 -108
- package/package.json +1 -1
- package/skills/loadbare-app/SKILL.md +16 -9
- package/skills/loadbare-app/references/TECHREF-1.0.md +33 -85
- package/skills/loadbare-app/references/builder.md +9 -2
- package/skills/loadbare-app/references/chrome.md +2 -1
- package/skills/loadbare-app/references/css.md +163 -0
- package/skills/loadbare-app/references/custom-elements.md +1 -1
- package/skills/loadbare-app/references/data-binding.md +44 -10
- package/skills/loadbare-app/references/miswarts.md +140 -0
- package/skills/loadbare-app/references/page-files.md +38 -5
- package/skills/loadbare-app/references/widgets.md +24 -2
- package/docs/possible-ideas.md +0 -314
- package/docs/theory-old.md +0 -839
- package/docs/what-does-loadbare-extend.md +0 -124
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# What Does Loadbare Extend?
|
|
2
|
-
|
|
3
|
-
> **LLM-authored, not yet revised by a person.** Drafted by Claude on
|
|
4
|
-
> 2026-09-27 against `@loadbare/app` 0.10.0.
|
|
5
|
-
|
|
6
|
-
The question: what is `@loadbare/app`'s foundation, the thing it adds to
|
|
7
|
-
rather than replaces, and does the package stand on that foundation the way
|
|
8
|
-
`@loadbare/db` stands on Postgres?
|
|
9
|
-
|
|
10
|
-
The short answer: the browser half of `@loadbare/app` is honestly "HTML+", in
|
|
11
|
-
the same way `@loadbare/db` is "Postgres+". The package as a whole is not.
|
|
12
|
-
The framing that covers all of it, and ties it to db, is relational rather
|
|
13
|
-
than HTML.
|
|
14
|
-
|
|
15
|
-
## The precise reading
|
|
16
|
-
|
|
17
|
-
### Where "extension to HTML" is literally true
|
|
18
|
-
|
|
19
|
-
- **It uses the platform's own extension point.** Custom elements are how
|
|
20
|
-
HTML is meant to be extended. The whole browser runtime is one custom
|
|
21
|
-
element, `<lb-hub>`. Custom elements are also the only way Loadbare lets an
|
|
22
|
-
application split up markup or ship behaviour. There are no components, no
|
|
23
|
-
JSX, and no expressions evaluated at run time.
|
|
24
|
-
- **The attributes copy HTML's own ideas.** [Theory](./theory.md#data-binding)
|
|
25
|
-
already sets this out in a table:
|
|
26
|
-
- `lb-column` works like `name`.
|
|
27
|
-
- `lb-query` works like `<form>` or `<select>`, a container of records.
|
|
28
|
-
- `lb-show` works like `hidden`.
|
|
29
|
-
- `lb-key-value` works like an `<option>`'s `value` sitting apart from its
|
|
30
|
-
text.
|
|
31
|
-
- **HTML decides behaviour wherever it already has an opinion.** Commits
|
|
32
|
-
follow HTML's events: a form on submit, a control on change, anything else
|
|
33
|
-
on click. Gathering follows the form owner, including `form="…"`. Resets
|
|
34
|
-
go through `formResetCallback`. Busy state uses `aria-busy`. The unknown
|
|
35
|
-
page is a real `<dialog>`, and links are real `<a href>`.
|
|
36
|
-
- **What ships is plain HTML.** It can be read in view-source, it uses light
|
|
37
|
-
DOM, and CSS is left untouched. A page that shows no data is just an HTML
|
|
38
|
-
file.
|
|
39
|
-
- **There is historical precedent.** IE4's `datasrc`/`datafld` really was
|
|
40
|
-
data binding added to HTML, and [Prior art](./prior-art.md) finds its
|
|
41
|
-
vocabulary maps almost one to one onto Loadbare's.
|
|
42
|
-
|
|
43
|
-
### Where it is inaccurate or strained
|
|
44
|
-
|
|
45
|
-
- **The attributes don't conform to the spec.** HTML sets aside `data-*` for
|
|
46
|
-
author attributes, and a validator will flag `lb-*`. htmx and Alpine have
|
|
47
|
-
the same problem, so it's defensible. But a literal claim of "extension to
|
|
48
|
-
HTML" is only half true: Loadbare uses one of the sanctioned extension
|
|
49
|
-
points (custom elements) fully and skips the other (`data-*`).
|
|
50
|
-
- **Build-time expansion is a preprocessor.** `exp-` parameters and `{{…}}`
|
|
51
|
-
are a small template language that runs before HTML exists. The output is
|
|
52
|
-
HTML; the source a developer writes is not quite HTML.
|
|
53
|
-
- **Navigation overrides HTML's model on purpose.** HTML's model is one
|
|
54
|
-
document per URL. Loadbare ships every page as a `<template>` in one
|
|
55
|
-
document and answers every route with `app.html`, with no 404. Keeping the
|
|
56
|
-
address bar truthful softens this, but it is still a replacement.
|
|
57
|
-
- **The wire is JSON, not hypermedia.** In the ecosystem, "extends HTML"
|
|
58
|
-
usually means htmx's argument that HTML is unfinished hypertext. Loadbare
|
|
59
|
-
rejects that model after the first load. Calling it an HTML extension
|
|
60
|
-
invites exactly the comparison [Theory](./theory.md) spends paragraphs
|
|
61
|
-
getting out of.
|
|
62
|
-
- **Half of what a developer writes isn't HTML.** `queries.ts` and
|
|
63
|
-
`requests.ts`, with `row`/`rows`/`patch`, crud entries and refresh lists,
|
|
64
|
-
have no HTML counterpart at all.
|
|
65
|
-
|
|
66
|
-
## The db comparison
|
|
67
|
-
|
|
68
|
-
db earns "Postgres+" because it passes four tests:
|
|
69
|
-
|
|
70
|
-
1. What it builds is plain Postgres, inspectable with psql.
|
|
71
|
-
2. Its vocabulary extends Postgres's own concepts: the foreign key becomes the
|
|
72
|
-
channel for values flowing down and aggregates flowing up.
|
|
73
|
-
3. A developer can drop to plain SQL anywhere.
|
|
74
|
-
4. Postgres does the heavy lifting.
|
|
75
|
-
|
|
76
|
-
The browser half of app passes all four:
|
|
77
|
-
|
|
78
|
-
1. The output is plain HTML.
|
|
79
|
-
2. The vocabulary extends `name`, `form` and `hidden`.
|
|
80
|
-
3. Any HTML works, and a custom element is still just a custom element.
|
|
81
|
-
4. The platform does the work: `cloneNode` of templates, the selector engine,
|
|
82
|
-
form owners, `showModal`, the History API.
|
|
83
|
-
|
|
84
|
-
The rule behind it is the same as db's: **defer where the foundation has an
|
|
85
|
-
answer, and add only where it is silent.** HTML is silent about data, and
|
|
86
|
-
that's where the seven attributes live.
|
|
87
|
-
|
|
88
|
-
The difference is that db never overrides Postgres. It adds to Postgres and
|
|
89
|
-
replaces the application's logic layer. app overrides HTML twice, in
|
|
90
|
-
navigation and on the wire, both for the 300ms budget. Those are deliberate
|
|
91
|
-
departures, not add-ons.
|
|
92
|
-
|
|
93
|
-
## How it feels
|
|
94
|
-
|
|
95
|
-
- **Writing a page** feels like writing HTML: forms and tables with a few
|
|
96
|
-
attributes, much like data-bound HTML in 1999 without the ActiveX.
|
|
97
|
-
- **Writing a widget** feels like writing web components.
|
|
98
|
-
- **Writing `requests.ts`** feels like neither. A nested declaration such as
|
|
99
|
-
`crud.invoiceLines.rowDelete.{run, refresh}` feels like a framework's
|
|
100
|
-
configuration map. db has no equivalent seam, because its DSL reads as DDL
|
|
101
|
-
all the way down. That file is where the "HTML+" feel breaks.
|
|
102
|
-
|
|
103
|
-
## A better framing
|
|
104
|
-
|
|
105
|
-
The idea that runs through every layer of app is not HTML. It is the
|
|
106
|
-
**row**: query, row, rows, column and key. That's where the scope decision in
|
|
107
|
-
[Theory](./theory.md#data-binding) lands, and it's what the protocol carries.
|
|
108
|
-
HTML is the surface, and relations are the substance.
|
|
109
|
-
|
|
110
|
-
Framed that way, the two packages form one story rather than two:
|
|
111
|
-
|
|
112
|
-
- **db** is the relational model with derived values, built on Postgres.
|
|
113
|
-
- **app** is the relational model shown and edited on screen, with HTML as its
|
|
114
|
-
surface.
|
|
115
|
-
- **The row** is the only thing that crosses between them.
|
|
116
|
-
|
|
117
|
-
So "Relational+ from end to end, with Postgres at one end and HTML at the
|
|
118
|
-
other" is accurate everywhere. "HTML+" is accurate only for page and widget
|
|
119
|
-
authoring. It also explains the server half: `queries.ts` and `requests.ts`
|
|
120
|
-
aren't HTML because they're the relational half of the contract.
|
|
121
|
-
|
|
122
|
-
"HTML+" still works as a description of how page authoring feels. It fails
|
|
123
|
-
as a statement of what the package is, and it pulls readers toward the
|
|
124
|
-
hypermedia comparison Loadbare would rather avoid.
|