@loadbare/app 0.25.0 → 0.26.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.
Files changed (55) hide show
  1. package/dist/build/assemble.d.ts +1 -2
  2. package/dist/build/assemble.d.ts.map +1 -1
  3. package/dist/build/assemble.js +11 -53
  4. package/dist/build/assemble.js.map +1 -1
  5. package/dist/build/cli.d.ts +4 -10
  6. package/dist/build/cli.d.ts.map +1 -1
  7. package/dist/build/cli.js +11 -33
  8. package/dist/build/cli.js.map +1 -1
  9. package/dist/build/declared.js +1 -1
  10. package/dist/build/declared.js.map +1 -1
  11. package/dist/core/lb-constants.d.ts +8 -18
  12. package/dist/core/lb-constants.d.ts.map +1 -1
  13. package/dist/core/lb-constants.js +32 -72
  14. package/dist/core/lb-constants.js.map +1 -1
  15. package/dist/core/lb-types.d.ts +12 -11
  16. package/dist/core/lb-types.d.ts.map +1 -1
  17. package/dist/core/lb-types.js +7 -0
  18. package/dist/core/lb-types.js.map +1 -1
  19. package/dist/hub/lb-apply.d.ts +10 -37
  20. package/dist/hub/lb-apply.d.ts.map +1 -1
  21. package/dist/hub/lb-apply.js +139 -522
  22. package/dist/hub/lb-apply.js.map +1 -1
  23. package/dist/hub/lb-hub.browser.d.ts.map +1 -1
  24. package/dist/hub/lb-hub.browser.js +115 -126
  25. package/dist/hub/lb-hub.browser.js.map +1 -1
  26. package/dist/hub/lb-lifecycle.d.ts +2 -2
  27. package/dist/hub/lb-lifecycle.d.ts.map +1 -1
  28. package/dist/hub/lb-lifecycle.js +9 -17
  29. package/dist/hub/lb-lifecycle.js.map +1 -1
  30. package/dist/server/lb-express.d.ts.map +1 -1
  31. package/dist/server/lb-express.js +3 -3
  32. package/dist/server/lb-express.js.map +1 -1
  33. package/dist/server/lb-server.d.ts +35 -19
  34. package/dist/server/lb-server.d.ts.map +1 -1
  35. package/dist/server/lb-server.js +141 -88
  36. package/dist/server/lb-server.js.map +1 -1
  37. package/docs/binding-cases.md +150 -0
  38. package/docs/comparison.md +18 -29
  39. package/docs/miswarts.md +2 -2
  40. package/docs/reference/css.md +2 -15
  41. package/docs/reference/custom-elements.md +6 -8
  42. package/docs/reference/data-binding.md +37 -180
  43. package/docs/reference/names.md +10 -26
  44. package/docs/reference/page-files.md +1 -12
  45. package/docs/reference/server.md +0 -1
  46. package/docs/testing.md +2 -5
  47. package/package.json +1 -1
  48. package/skills/loadbare-app/SKILL.md +52 -54
  49. package/skills/loadbare-app/references/css.md +2 -15
  50. package/skills/loadbare-app/references/custom-elements.md +6 -8
  51. package/skills/loadbare-app/references/data-binding.md +37 -180
  52. package/skills/loadbare-app/references/miswarts.md +2 -2
  53. package/skills/loadbare-app/references/names.md +10 -26
  54. package/skills/loadbare-app/references/page-files.md +1 -12
  55. package/skills/loadbare-app/references/server.md +0 -1
@@ -14,10 +14,9 @@ that declares a query, a handler or a `crud` entry whose name begins with
14
14
 
15
15
  | Flag | Default | Names | Defined in |
16
16
  | ---------- | ------- | ----------------------------------------- | --------------------------------------------------- |
17
- | `--src` | `src` | The application's own tree, scanned whole | [Running the builder](./builder.md#running-the-builder) |
18
- | `--out` | `dist` | Where the builder writes | [Running the builder](./builder.md#running-the-builder) |
19
- | `--watch` | off | Rebuild on change under `--src` | [Running the builder](./builder.md#running-the-builder) |
20
- | `--minify` | off | Minify `client.js` and `app.css` | [Running the builder](./builder.md#running-the-builder) |
17
+ | `--src` | `src` | The application's own tree, scanned whole | [Running the builder](./builder.md) |
18
+ | `--out` | `dist` | Where the builder writes | [Running the builder](./builder.md) |
19
+ | `--minify` | off | Minify `client.js` and `app.css` | [Running the builder](./builder.md) |
21
20
 
22
21
  ## Reserved file names
23
22
 
@@ -66,7 +65,7 @@ A widget package declares these. An application never does.
66
65
 
67
66
  ## Attributes
68
67
 
69
- The developer writes eighteen attributes in pages and the chrome, and the
68
+ The developer writes fourteen attributes in pages and the chrome, and the
70
69
  builder refuses any other `lb-` attribute there. `lb-exp-slot` and
71
70
  `lb-exp-template` are written for expansion, which removes them before the
72
71
  check. The hub and the builder write the rest, as stamps, and script never
@@ -80,9 +79,6 @@ assigns one.
80
79
  | `lb-order` | Developer | [Order](./data-binding.md#order) |
81
80
  | `lb-filter` | Developer | [Filters](./data-binding.md#filters) |
82
81
  | `lb-manual` | Developer | [Placing by hand](./data-binding.md#placing-by-hand) |
83
- | `lb-group` | Developer | [Groups](./data-binding.md#groups) |
84
- | `lb-count`, `lb-sum`, `lb-avg`, `lb-min`, `lb-max` | Developer | [Aggregates](./data-binding.md#aggregates) |
85
- | `lb-select` | Developer | [Selecting rows](./data-binding.md#selecting-rows) |
86
82
  | `lb-request` | Developer | [Requests](./data-binding.md#requests) |
87
83
  | `lb-url-link` | Developer | [Links](./chrome.md#links) |
88
84
  | `lb-url-parm` | Developer | [A link from a row](./chrome.md#a-link-from-a-row) |
@@ -96,11 +92,9 @@ assigns one.
96
92
  | `lb-query-row-count` | Hub | [Counting rows](./data-binding.md#counting-rows) |
97
93
  | `lb-query-unplaced-count`, `lb-row-unplaced` | Hub | [Placing by hand](./data-binding.md#placing-by-hand) |
98
94
  | `lb-query-order` | Hub | [Order](./data-binding.md#order) |
99
- | `lb-group-live`, `lb-group-column`, `lb-group-value` | Hub | [Groups](./data-binding.md#groups) |
100
95
  | `lb-row-created`, `lb-row-changed`, `lb-row-moved`, `lb-row-requested` | Hub | [What happened to a row](./data-binding.md#what-happened-to-a-row) |
101
- | `lb-row-leaving`, `lb-group-leaving` | Hub | [What happened to a row](./data-binding.md#what-happened-to-a-row) |
96
+ | `lb-row-leaving` | Hub | [What happened to a row](./data-binding.md#what-happened-to-a-row) |
102
97
  | `lb-row-editing` | Hub | [Editing a row in one form](./data-binding.md#editing-a-row-in-one-form) |
103
- | `lb-row-selected` | Hub | [Selecting rows](./data-binding.md#selecting-rows) |
104
98
  | `lb-request-pending` | Hub | [Request state](./data-binding.md#request-state) |
105
99
  | `lb-request-error` | Hub | [Request state](./data-binding.md#request-state) |
106
100
  | `lb-request-refused` | Hub | [Refusals](./data-binding.md#refusals) |
@@ -116,9 +110,9 @@ them, and a page declares none.
116
110
 
117
111
  | Query | Kind | Key | Columns | Defined in |
118
112
  | ------------ | ----- | --------- | --------------------------------------------------------------- | ------------------------------------- |
119
- | `lb-url` | `row` | `lb-path` | `lb-path`, `lb-page-label`, `lb-page-unknown`, every query parm | [The URL](./chrome.md#the-url) |
113
+ | `lb-url` | `row` | `lb-path` | `lb-path`, `lb-page-label`, every query parm | [The URL](./chrome.md#the-url) |
120
114
  | `lb-choices` | `row` | `lb-path` | `lb-path`, every choice | [Choices](./data-binding.md#choices) |
121
- | `lb-hub` | `row` | `lb-path` | `lb-path`, `lb-load-state`, `lb-server-state`, `lb-error`, `lb-pending`, `lb-as-of` | [The hub's state](./chrome.md#the-hubs-state) |
115
+ | `lb-hub-status` | `row` | `lb-path` | `lb-path`, `lb-load-state`, `lb-server-state`, `lb-error`, `lb-pending`, `lb-as-of` | [The hub's state](./chrome.md#the-hubs-state) |
122
116
 
123
117
  No query parm is reserved: a column of `lb-url` whose name begins with
124
118
  `lb-` is never a query parm.
@@ -202,13 +196,6 @@ imports them rather than writing a string.
202
196
  | `ATTR_QUERY_ROW_COUNT` | `lb-query-row-count` |
203
197
  | `ATTR_QUERY_UNPLACED_COUNT` | `lb-query-unplaced-count` |
204
198
  | `ATTR_QUERY_ORDER` | `lb-query-order` |
205
- | `ATTR_GROUP` | `lb-group` |
206
- | `ATTR_GROUP_LIVE` | `lb-group-live` |
207
- | `ATTR_GROUP_COLUMN` | `lb-group-column` |
208
- | `ATTR_GROUP_VALUE` | `lb-group-value` |
209
- | `LIVE_GROUP` | `[lb-group-live]`, the selector for a group's element |
210
- | `ATTR_COUNT`, `ATTR_SUM`, `ATTR_AVG`, `ATTR_MIN`, `ATTR_MAX` | `lb-count`, `lb-sum`, `lb-avg`, `lb-min`, `lb-max` |
211
- | `AGGREGATES` | All five aggregate attributes |
212
199
  | `ORDER_DESCENDING` | `-`, written before a column in an order |
213
200
  | `COLUMN_TYPES` | `number`, `boolean`, `text` |
214
201
  | `CHOICES_QUERY` | `lb-choices` |
@@ -224,7 +211,6 @@ imports them rather than writing a string.
224
211
  | `REQUESTED_CREATED`, `REQUESTED_CHANGED`, `REQUESTED_MOVED` | `created`, `changed`, `moved` |
225
212
  | `ATTR_ROW_UNPLACED` | `lb-row-unplaced` |
226
213
  | `ATTR_ROW_LEAVING` | `lb-row-leaving` |
227
- | `ATTR_GROUP_LEAVING` | `lb-group-leaving` |
228
214
  | `ATTR_REQUEST` | `lb-request` |
229
215
  | `LB_EVENT_NAME` | `lb-request`, the event every request travels as |
230
216
  | `LB_DONE_EVENT_NAME` | `lb-request-done` |
@@ -236,13 +222,12 @@ imports them rather than writing a string.
236
222
  | `LB_COMMANDS` | All four commands |
237
223
  | `LB_COMMAND_PREFIX` | `--lb-` |
238
224
  | `ATTR_ROW_EDITING` | `lb-row-editing` |
239
- | `ATTR_SELECT` | `lb-select` |
240
- | `ATTR_ROW_SELECTED` | `lb-row-selected` |
241
225
  | `LB_RESERVED_PREFIX` | `lb-` |
242
226
  | `REQUEST_ROW_INSERT` | `lb-row-insert` |
243
227
  | `REQUEST_ROW_UPDATE` | `lb-row-update` |
244
228
  | `REQUEST_ROW_DELETE` | `lb-row-delete` |
245
229
  | `LB_ROW_REQUESTS` | All three request names |
230
+ | `REQUEST_READ` | `lb-read`, the hub's own read of a bound form's lists; markup never writes it |
246
231
  | `LB_METHODS` | The four reserved methods |
247
232
  | `BROWSER_LIFECYCLE` | The browser callbacks the build refuses |
248
233
  | `KIND_ROW` | `row` |
@@ -250,8 +235,7 @@ imports them rather than writing a string.
250
235
  | `URL_QUERY` | `lb-url` |
251
236
  | `URL_COLUMN_PATH` | `lb-path` |
252
237
  | `URL_COLUMN_PAGE_LABEL` | `lb-page-label` |
253
- | `URL_COLUMN_PAGE_UNKNOWN` | `lb-page-unknown` |
254
- | `HUB_QUERY` | `lb-hub` |
238
+ | `HUB_QUERY` | `lb-hub-status` |
255
239
  | `HUB_COLUMN_LOAD_STATE` | `lb-load-state` |
256
240
  | `HUB_COLUMN_SERVER_STATE` | `lb-server-state` |
257
241
  | `HUB_COLUMN_ERROR` | `lb-error` |
@@ -268,7 +252,7 @@ imports them rather than writing a string.
268
252
  | `ATTR_EXP_TEMPLATE` | `lb-exp-template` |
269
253
  | `ATTR_PAGE` | `lb-page` |
270
254
  | `ATTR_PAGE_TITLE` | `lb-page-title` |
271
- | `DEVELOPER_ATTRIBUTES` | The eighteen attributes a developer writes |
255
+ | `DEVELOPER_ATTRIBUTES` | The fourteen attributes a developer writes |
272
256
  | `HUB_TAG_NAME` | `lb-hub` |
273
257
  | `LB_ENDPOINT` | `/lb` |
274
258
  | `LB_REQUEST_TIMEOUT_MS` | `10000` |
@@ -165,14 +165,11 @@ name:
165
165
  | `name` | The request name, from `lb-request` |
166
166
  | `query` | The query the request is for |
167
167
  | `key` | The key of the row the request is for |
168
- | `keys` | The keys of the rows selected, in place of `key` |
169
168
  | `rows` | A form's nested rows, by query: each `key` and `values` |
170
169
  | `values` | The gathered control values, by column |
171
170
 
172
171
  The hub sends `query`, `key` and `values` when it finds them; see
173
- [Gathering](./data-binding.md#gathering). It sends `keys` for a request that
174
- acts on the rows the user selected; see
175
- [Selecting rows](./data-binding.md#selecting-rows).
172
+ [Gathering](./data-binding.md#gathering).
176
173
 
177
174
  ### onPageEnter
178
175
 
@@ -264,12 +261,6 @@ are one vocabulary:
264
261
  | `lb-row-update` | `rowUpdate` | `query`, `key`, `values`, and `rows` from a form |
265
262
  | `lb-row-delete` | `rowDelete` | `query`, `key` |
266
263
 
267
- An `lb-row-update` or `lb-row-delete` carrying `keys` runs `rowUpdate` or
268
- `rowDelete` once for each key, with that key, so a handler written for one
269
- row serves several. The patches the runs return are laid together, and the
270
- refresh set runs once. A `url()` returned for one of several rows is
271
- reported and ignored. A declared request receives `keys` as it is.
272
-
273
264
  `rows` holds the rows of a query nested in the form the request came from,
274
265
  by query name, each with its `key` and the `values` of its own controls; see
275
266
  [A form over a set of rows](./data-binding.md#a-form-over-a-set-of-rows).
@@ -386,8 +377,6 @@ A change that seems to need a refresh usually has a patch:
386
377
  [order](./data-binding.md#order), or leaves it where it stands under the
387
378
  list's [`lb-manual`](./data-binding.md#placing-by-hand); a refresh would do
388
379
  the same.
389
- - A group that appears or goes: the hub makes a group with its first row
390
- and removes it with its last, so no row stands in for an empty one.
391
380
  - A row whose other columns change with the edit: re-read the row and patch
392
381
  it.
393
382
  - Rows the database removes with a deleted one: select their keys before the
@@ -199,7 +199,6 @@ interface HubRequest {
199
199
  name: string;
200
200
  query?: string;
201
201
  key?: string;
202
- keys?: string[];
203
202
  values?: Record<string, string>;
204
203
  rows?: Record<string, { key: string; values: Record<string, string> }[]>;
205
204
  }