@loadbare/app 0.11.0 → 0.13.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/dist/build/assemble.d.ts.map +1 -1
- package/dist/build/assemble.js +61 -1
- package/dist/build/assemble.js.map +1 -1
- package/dist/build/cli.js +2 -1
- package/dist/build/cli.js.map +1 -1
- package/dist/build/elements.d.ts +9 -1
- package/dist/build/elements.d.ts.map +1 -1
- package/dist/build/elements.js +50 -0
- package/dist/build/elements.js.map +1 -1
- package/dist/build/origins.d.ts +2 -0
- package/dist/build/origins.d.ts.map +1 -1
- package/dist/build/origins.js +1 -1
- package/dist/build/origins.js.map +1 -1
- package/dist/core/lb-constants.d.ts +26 -1
- package/dist/core/lb-constants.d.ts.map +1 -1
- package/dist/core/lb-constants.js +79 -0
- package/dist/core/lb-constants.js.map +1 -1
- package/dist/core/lb-types.d.ts +58 -18
- package/dist/core/lb-types.d.ts.map +1 -1
- package/dist/core/lb-types.js +74 -11
- package/dist/core/lb-types.js.map +1 -1
- package/dist/hub/lb-apply.d.ts +44 -16
- package/dist/hub/lb-apply.d.ts.map +1 -1
- package/dist/hub/lb-apply.js +694 -49
- package/dist/hub/lb-apply.js.map +1 -1
- package/dist/hub/lb-hub.browser.d.ts.map +1 -1
- package/dist/hub/lb-hub.browser.js +168 -36
- package/dist/hub/lb-hub.browser.js.map +1 -1
- package/dist/server/lb-express.d.ts +6 -4
- package/dist/server/lb-express.d.ts.map +1 -1
- package/dist/server/lb-express.js +32 -14
- package/dist/server/lb-express.js.map +1 -1
- package/dist/server/lb-server.d.ts +49 -10
- package/dist/server/lb-server.d.ts.map +1 -1
- package/dist/server/lb-server.js +87 -28
- package/dist/server/lb-server.js.map +1 -1
- package/docs/TECHREF-1.0.md +364 -72
- package/docs/comparison.md +16 -10
- package/docs/possible-ideas.md +188 -0
- package/docs/reference/chrome.md +22 -1
- package/docs/reference/custom-elements.md +90 -29
- package/docs/reference/data-binding.md +132 -7
- package/docs/reference/page-files.md +48 -11
- package/docs/reference/server.md +4 -0
- package/docs/reference/widgets.md +94 -24
- package/docs/roadmap.md +10 -6
- package/docs/testing.md +21 -10
- package/package.json +2 -3
- package/skills/loadbare-app/SKILL.md +85 -12
- package/skills/loadbare-app/references/TECHREF-1.0.md +364 -72
- package/skills/loadbare-app/references/chrome.md +22 -1
- package/skills/loadbare-app/references/custom-elements.md +90 -29
- package/skills/loadbare-app/references/data-binding.md +132 -7
- package/skills/loadbare-app/references/page-files.md +48 -11
- package/skills/loadbare-app/references/server.md +4 -0
- package/skills/loadbare-app/references/widgets.md +94 -24
package/dist/hub/lb-apply.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare function within(root: Element, selector: string): Element[];
|
|
|
30
30
|
* ancestor, so its own `lb-column` reads from the row around it and is left
|
|
31
31
|
* alone here.
|
|
32
32
|
*/
|
|
33
|
-
export declare function applyRow(root: Element, row: Row, liveRow?: boolean): void;
|
|
33
|
+
export declare function applyRow(root: Element, row: Row, liveRow?: boolean, stop?: string): void;
|
|
34
34
|
/**
|
|
35
35
|
* The row template: the first `<template>` among the element's descendants,
|
|
36
36
|
* outside any nested `lb-query`. A template holding an absent branch is not a
|
|
@@ -38,26 +38,54 @@ export declare function applyRow(root: Element, row: Row, liveRow?: boolean): vo
|
|
|
38
38
|
* live row comes first in document order.
|
|
39
39
|
*/
|
|
40
40
|
export declare function templateIn(el: Element): HTMLTemplateElement | null;
|
|
41
|
+
/** How a list of rows lands: in what order, and whether a request asked. */
|
|
42
|
+
export interface RowsOptions {
|
|
43
|
+
/** The order to place rows by, as an order's text. */
|
|
44
|
+
order?: string;
|
|
45
|
+
/** The landing answers a request from this page. */
|
|
46
|
+
requested?: boolean;
|
|
47
|
+
}
|
|
41
48
|
/**
|
|
42
49
|
* Land rows through a row template.
|
|
43
50
|
*
|
|
44
|
-
* All rows decide membership
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* position.
|
|
51
|
+
* All rows decide membership: a row whose key did not arrive leaves. A patch
|
|
52
|
+
* disturbs only what it names — a row it did not mention keeps its contents,
|
|
53
|
+
* and keeps its place unless a row the patch named now sorts around it.
|
|
48
54
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
55
|
+
* Every live row is placed by the order. With none, all rows show in the
|
|
56
|
+
* order they arrived, and a patch's new rows go last. A row moves only when
|
|
57
|
+
* the order put it somewhere else, so landing the same rows again moves
|
|
58
|
+
* nothing.
|
|
53
59
|
*/
|
|
54
|
-
export declare function applyRows(el: Element, template: HTMLTemplateElement, keyColumn: string, result: RowsResult): void;
|
|
60
|
+
export declare function applyRows(el: Element, template: HTMLTemplateElement, keyColumn: string, result: RowsResult, options?: RowsOptions): void;
|
|
61
|
+
/** The answer kept for a query, as all of its rows. */
|
|
62
|
+
export declare function keptAnswer(root: ParentNode, query: string): ResponseItem | undefined;
|
|
55
63
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
* Drop what landing kept for a root. The hub calls it when it replaces the
|
|
65
|
+
* page, since another page's query of the same name is another query.
|
|
66
|
+
*/
|
|
67
|
+
export declare function forget(root: ParentNode): void;
|
|
68
|
+
/** How response items land. */
|
|
69
|
+
export interface LandOptions {
|
|
70
|
+
/**
|
|
71
|
+
* Queries that may have nowhere to land without a warning: the hub's own
|
|
72
|
+
* `lb-url` lands wherever a chrome or page names it, and nowhere otherwise.
|
|
73
|
+
*/
|
|
74
|
+
quiet?: readonly string[];
|
|
75
|
+
/** The user's order for a query, which replaces the server's. */
|
|
76
|
+
orderFor?: (query: string) => string | undefined;
|
|
77
|
+
/** The items answer a request from this page. */
|
|
78
|
+
requested?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Land response items. Every answer arrives through here, and is kept for
|
|
82
|
+
* `root`, so that what arrives after it is filled from it — see forget().
|
|
83
|
+
*/
|
|
84
|
+
export declare function applyResponse(root: ParentNode, items: ResponseItem[], options?: LandOptions): void;
|
|
85
|
+
/**
|
|
86
|
+
* Land a query's kept answer again, as all of its rows: what the hub does
|
|
87
|
+
* when the user's order for it changes and the rows themselves have not.
|
|
88
|
+
* False when no answer is kept.
|
|
61
89
|
*/
|
|
62
|
-
export declare function
|
|
90
|
+
export declare function reland(root: ParentNode, query: string): boolean;
|
|
63
91
|
//# sourceMappingURL=lb-apply.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lb-apply.d.ts","sourceRoot":"","sources":["../../hub/lb-apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lb-apply.d.ts","sourceRoot":"","sources":["../../hub/lb-apply.ts"],"names":[],"mappings":"AAsEA,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,GAAG,EAER,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AA0B7B,mEAAmE;AACnE,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACtC,KAAK,EAAE,MAAM,CAAC;CACf;AAiBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,OAAO,CAEpD;AA6DD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,CAMjE;AAoED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,GAAG,EACR,OAAO,UAAQ,EACf,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAuBN;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAKlE;AAshBD,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,sD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