@loadbare/app 0.24.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 (56) 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 +61 -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 +23 -37
  20. package/dist/hub/lb-apply.d.ts.map +1 -1
  21. package/dist/hub/lb-apply.js +205 -518
  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 +159 -132
  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 +20 -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 +100 -185
  43. package/docs/reference/names.md +11 -27
  44. package/docs/reference/page-files.md +4 -14
  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 +66 -56
  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 +100 -185
  52. package/skills/loadbare-app/references/miswarts.md +2 -2
  53. package/skills/loadbare-app/references/names.md +11 -27
  54. package/skills/loadbare-app/references/page-files.md +4 -14
  55. package/skills/loadbare-app/references/server.md +0 -1
  56. package/docs/temp-proposals.md +0 -251
@@ -36,11 +36,6 @@ export declare function gatherInto(values: Record<string, ParmValue>, column: st
36
36
  * showing.
37
37
  */
38
38
  export declare function within(root: Element, selector: string): Element[];
39
- /**
40
- * Tick or clear an `lb-select` checkbox, and stamp the live row it selects
41
- * to match.
42
- */
43
- export declare function select(box: Element, on: boolean): void;
44
39
  /**
45
40
  * Fill from one row: every `lb-column` and `lb-show` in root's query.
46
41
  *
@@ -49,10 +44,8 @@ export declare function select(box: Element, on: boolean): void;
49
44
  * it displays. An element a `row` lands on is not its own ancestor, so its
50
45
  * own `lb-column` reads from the row around it and is left alone here. Root's
51
46
  * own `lb-show` never counts.
52
- *
53
- * `stop` passes over everything matching it and inside it.
54
47
  */
55
- export declare function applyRow(root: Element, row: Row, self?: boolean, stop?: string): void;
48
+ export declare function applyRow(root: Element, row: Row, self?: boolean): void;
56
49
  /**
57
50
  * A row naming every column root's query shows, each null: what landing it
58
51
  * leaves is root as it stands with no row. Absent branches are counted, so a
@@ -73,14 +66,27 @@ export declare function templateIn(el: Element): HTMLTemplateElement | null;
73
66
  * `lb-show` branch is passed over.
74
67
  */
75
68
  export declare function focusIn(root: Element): void;
69
+ /**
70
+ * Put a row not yet entered into a list: a live row copied from its row
71
+ * template, keyed by the empty key, its controls at their HTML defaults and
72
+ * its `lb-show` branches as for a row whose columns are all null. It sends
73
+ * nothing; the submit of the form around the list carries it. False when the
74
+ * element holds no row template.
75
+ */
76
+ export declare function addUnentered(el: Element): boolean;
77
+ /**
78
+ * Take a row not yet entered out of its list, as a row leaves. False when
79
+ * the row is not one `--lb-new` put in a list.
80
+ */
81
+ export declare function discardUnentered(row: Element): boolean;
76
82
  /** How a list of rows lands: in what order, and whether a request asked. */
77
83
  export interface RowsOptions {
78
- /** The order the server declared, as an order's text. */
84
+ /** The query's resolved order, from its row of `lb-sort`. */
79
85
  order?: string;
80
86
  /** The column types the server declared. */
81
87
  types?: ColumnTypes;
82
- /** The user's choices: the row of `lb-choices`. */
83
- choices?: Row;
88
+ /** The query's row of `lb-filters`. */
89
+ filters?: Row;
84
90
  /**
85
91
  * The landing answers a request from this page, so a side the list
86
92
  * places by hand leaves its rows where they stand.
@@ -100,29 +106,9 @@ export interface RowsOptions {
100
106
  doc?: Document;
101
107
  }
102
108
  /**
103
- * Land rows through a row template.
104
- *
105
- * Two loops do the work, on rows in no document. The creation loop makes a
106
- * live row for each key not yet shown, with its key and no values. The
107
- * landing loop lands each arriving row's values on its live row, as a `row`
108
- * lands, passing over a column that already shows its value. Then every live
109
- * row is placed by the order in one fragment, and the browser styles once.
110
- *
111
- * All rows decide membership: a row whose key did not arrive leaves. A patch
112
- * disturbs only what it names — a row it did not mention keeps its contents,
113
- * and keeps its place unless a row the patch named now sorts around it.
114
- *
115
- * With no order, all rows show in the order they arrived, and a patch's new
116
- * rows go last. A row that stands where it stood is not touched, so landing
117
- * the same rows again moves nothing. A row a filter the user chose does not
118
- * pass is `hidden`.
119
- *
120
- * A landing that answers a request leaves alone each side `lb-manual` names
121
- * on the element, whole or a patch. Under `order`, nothing already showing
122
- * moves, and a new row goes last in its group. Under `filter`, a row the
123
- * answer changed or created stays showing. A row left where the order or
124
- * the filter would not leave it is stamped unplaced until the rows are next
125
- * placed.
109
+ * Land rows through a row template: a live row per key, placed by the order.
110
+ * A patch disturbs only what it names — rows it leaves out keep their
111
+ * contents and their place.
126
112
  */
127
113
  export declare function applyRows(el: Element, template: HTMLTemplateElement, keyColumn: string, result: RowsResult, options?: RowsOptions): void;
128
114
  /** The answer kept for a query, as all of its rows. */
@@ -147,9 +133,9 @@ export interface LandOptions {
147
133
  /**
148
134
  * Land response items. Every answer arrives through here, and is kept for
149
135
  * `root`, so that what arrives after it is filled from it — see forget().
150
- * An answer to `lb-choices` places again the rows its choices change. Once
151
- * everything has landed, each custom element placed since the last landing
152
- * is attached.
136
+ * An answer to `lb-sort` or `lb-filters` places again the rows it changes.
137
+ * Once everything has landed, each custom element placed since the last
138
+ * landing is attached.
153
139
  */
154
140
  export declare function applyResponse(root: ParentNode, items: ResponseItem[], options?: LandOptions): void;
155
141
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"lb-apply.d.ts","sourceRoot":"","sources":["../../hub/lb-apply.ts"],"names":[],"mappings":"AAuFA,OAAO,EASL,KAAK,WAAW,EAGhB,KAAK,SAAS,EAGd,KAAK,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AA0B7B,mEAAmE;AACnE,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACtC,KAAK,EAAE,MAAM,CAAC;CACf;AA4BD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAE5C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAGrD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,OAAO,CAIpD;AAkCD;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,E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