@graview/core 0.1.10 → 0.1.14
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 +41 -9
- package/dist/address.d.ts +31 -0
- package/dist/address.d.ts.map +1 -0
- package/dist/address.js +53 -0
- package/dist/address.js.map +1 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/arrange.d.ts +13 -183
- package/dist/arrange.d.ts.map +1 -1
- package/dist/arrange.js +12 -470
- package/dist/arrange.js.map +1 -1
- package/dist/arrangement.d.ts +169 -0
- package/dist/arrangement.d.ts.map +1 -0
- package/dist/arrangement.js +220 -0
- package/dist/arrangement.js.map +1 -0
- package/dist/arranging.d.ts +28 -0
- package/dist/arranging.d.ts.map +1 -0
- package/dist/arranging.js +264 -0
- package/dist/arranging.js.map +1 -0
- package/dist/blocks.d.ts +5 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +14 -0
- package/dist/blocks.js.map +1 -0
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/check.d.ts +8 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +19 -0
- package/dist/check.js.map +1 -0
- package/dist/cli/check/brand.d.ts.map +1 -1
- package/dist/cli/check/brand.js +21 -0
- package/dist/cli/check/brand.js.map +1 -1
- package/dist/cli/check/hidden-reads.d.ts +4 -0
- package/dist/cli/check/hidden-reads.d.ts.map +1 -0
- package/dist/cli/check/hidden-reads.js +183 -0
- package/dist/cli/check/hidden-reads.js.map +1 -0
- package/dist/cli/check/index.d.ts +1 -0
- package/dist/cli/check/index.d.ts.map +1 -1
- package/dist/cli/check/index.js +1 -0
- package/dist/cli/check/index.js.map +1 -1
- package/dist/cli/check/lenses.d.ts.map +1 -1
- package/dist/cli/check/lenses.js +29 -1
- package/dist/cli/check/lenses.js.map +1 -1
- package/dist/cli/check/views.d.ts.map +1 -1
- package/dist/cli/check/views.js +5 -1
- package/dist/cli/check/views.js.map +1 -1
- package/dist/cli/check.d.ts.map +1 -1
- package/dist/cli/check.js +2 -1
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +1 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/describe.d.ts.map +1 -1
- package/dist/cli/describe.js +23 -1
- package/dist/cli/describe.js.map +1 -1
- package/dist/cli/docs.js +1 -1
- package/dist/cli/docs.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/columns.d.ts +105 -0
- package/dist/columns.d.ts.map +1 -0
- package/dist/columns.js +143 -0
- package/dist/columns.js.map +1 -0
- package/dist/conformance/fixtures.d.ts.map +1 -1
- package/dist/conformance/fixtures.js +19 -1
- package/dist/conformance/fixtures.js.map +1 -1
- package/dist/conformance/index.js +1 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/describe.d.ts +2 -0
- package/dist/describe.d.ts.map +1 -1
- package/dist/describe.js +7 -0
- package/dist/describe.js.map +1 -1
- package/dist/document/act-findings.d.ts +5 -0
- package/dist/document/act-findings.d.ts.map +1 -0
- package/dist/document/act-findings.js +84 -0
- package/dist/document/act-findings.js.map +1 -0
- package/dist/document/blocks.d.ts +11 -6
- package/dist/document/blocks.d.ts.map +1 -1
- package/dist/document/blocks.js +21 -31
- package/dist/document/blocks.js.map +1 -1
- package/dist/document/compile-checked.d.ts +8 -0
- package/dist/document/compile-checked.d.ts.map +1 -0
- package/dist/document/compile-checked.js +43 -0
- package/dist/document/compile-checked.js.map +1 -0
- package/dist/document/compile.d.ts +22 -9
- package/dist/document/compile.d.ts.map +1 -1
- package/dist/document/compile.js +116 -52
- package/dist/document/compile.js.map +1 -1
- package/dist/document/describe-coverage.d.ts +37 -0
- package/dist/document/describe-coverage.d.ts.map +1 -0
- package/dist/document/describe-coverage.js +162 -0
- package/dist/document/describe-coverage.js.map +1 -0
- package/dist/document/describe-place.d.ts.map +1 -1
- package/dist/document/describe-place.js +43 -1
- package/dist/document/describe-place.js.map +1 -1
- package/dist/document/diff.d.ts +5 -0
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +18 -4
- package/dist/document/diff.js.map +1 -1
- package/dist/document/edit.d.ts +1 -1
- package/dist/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +155 -10
- package/dist/document/edit.js.map +1 -1
- package/dist/document/expr/analyze.d.ts.map +1 -1
- package/dist/document/expr/analyze.js +2 -1
- package/dist/document/expr/analyze.js.map +1 -1
- package/dist/document/expr/evaluate.d.ts.map +1 -1
- package/dist/document/expr/evaluate.js +26 -2
- package/dist/document/expr/evaluate.js.map +1 -1
- package/dist/document/expr/parse.d.ts +2 -1
- package/dist/document/expr/parse.d.ts.map +1 -1
- package/dist/document/expr/parse.js +6 -3
- package/dist/document/expr/parse.js.map +1 -1
- package/dist/document/expr/print.d.ts.map +1 -1
- package/dist/document/expr/print.js +4 -2
- package/dist/document/expr/print.js.map +1 -1
- package/dist/document/far-end.d.ts +15 -0
- package/dist/document/far-end.d.ts.map +1 -0
- package/dist/document/far-end.js +26 -0
- package/dist/document/far-end.js.map +1 -0
- package/dist/document/graview-template.d.ts +20 -12
- package/dist/document/graview-template.d.ts.map +1 -1
- package/dist/document/graview-template.js +5 -44
- package/dist/document/graview-template.js.map +1 -1
- package/dist/document/index.d.ts +5 -11
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +3 -6
- package/dist/document/index.js.map +1 -1
- package/dist/document/instantiate-template.d.ts +14 -0
- package/dist/document/instantiate-template.d.ts.map +1 -0
- package/dist/document/instantiate-template.js +46 -0
- package/dist/document/instantiate-template.js.map +1 -0
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +7 -5
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/range.d.ts +17 -0
- package/dist/document/range.d.ts.map +1 -0
- package/dist/document/range.js +46 -0
- package/dist/document/range.js.map +1 -0
- package/dist/document/schema.d.ts +34 -2
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +25 -1
- package/dist/document/schema.js.map +1 -1
- package/dist/document/template.d.ts +18 -2
- package/dist/document/template.d.ts.map +1 -1
- package/dist/document/template.js +27 -9
- package/dist/document/template.js.map +1 -1
- package/dist/document/thumbnail.d.ts +26 -4
- package/dist/document/thumbnail.d.ts.map +1 -1
- package/dist/document/thumbnail.js +165 -50
- package/dist/document/thumbnail.js.map +1 -1
- package/dist/document/to-document.d.ts.map +1 -1
- package/dist/document/to-document.js +18 -2
- package/dist/document/to-document.js.map +1 -1
- package/dist/document/views.d.ts +11 -0
- package/dist/document/views.d.ts.map +1 -1
- package/dist/document/views.js +76 -12
- package/dist/document/views.js.map +1 -1
- package/dist/figures.d.ts +3 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +14 -0
- package/dist/figures.js.map +1 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/mutations/define-mutation.d.ts.map +1 -1
- package/dist/mutations/define-mutation.js +9 -1
- package/dist/mutations/define-mutation.js.map +1 -1
- package/dist/mutations/derive-edits.d.ts +8 -0
- package/dist/mutations/derive-edits.d.ts.map +1 -1
- package/dist/mutations/derive-edits.js +30 -7
- package/dist/mutations/derive-edits.js.map +1 -1
- package/dist/mutations/form.d.ts +2 -0
- package/dist/mutations/form.d.ts.map +1 -1
- package/dist/mutations/form.js +1 -0
- package/dist/mutations/form.js.map +1 -1
- package/dist/mutations/node-ref.d.ts +4 -1
- package/dist/mutations/node-ref.d.ts.map +1 -1
- package/dist/mutations/node-ref.js +6 -0
- package/dist/mutations/node-ref.js.map +1 -1
- package/dist/mutations/types.d.ts +28 -0
- package/dist/mutations/types.d.ts.map +1 -1
- package/dist/places.d.ts +11 -0
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +19 -1
- package/dist/places.js.map +1 -1
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +4 -0
- package/dist/refusal.js.map +1 -1
- package/dist/refused.d.ts +20 -0
- package/dist/refused.d.ts.map +1 -0
- package/dist/refused.js +24 -0
- package/dist/refused.js.map +1 -0
- package/dist/scaffold/domain.js +1 -1
- package/dist/scaffold/from-template.d.ts.map +1 -1
- package/dist/scaffold/from-template.js +3 -3
- package/dist/scaffold/from-template.js.map +1 -1
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +7 -0
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scene-districts.d.ts +5 -1
- package/dist/scene-districts.d.ts.map +1 -1
- package/dist/scene-districts.js +11 -4
- package/dist/scene-districts.js.map +1 -1
- package/dist/scene.d.ts +7 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +16 -0
- package/dist/scene.js.map +1 -0
- package/dist/search.d.ts +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +1 -1
- package/dist/search.js.map +1 -1
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/theme/derive.js +5 -4
- package/dist/theme/derive.js.map +1 -1
- package/dist/theme/types.d.ts +9 -0
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js +5 -0
- package/dist/theme/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +21 -1
package/README.md
CHANGED
|
@@ -7,7 +7,10 @@ Everything a Graview app declares, and the checker that verifies it.
|
|
|
7
7
|
- **Graph** — nodes and edges, with a tracked reader so a mutation records
|
|
8
8
|
what it read as well as what it wrote.
|
|
9
9
|
- **Mutations** — `defineMutation`. Every change is a typed, named,
|
|
10
|
-
describable act; nothing writes the graph directly.
|
|
10
|
+
describable act; nothing writes the graph directly. Each kind gets a
|
|
11
|
+
derived `edit-<kind>` offering the fields no other act writes; it takes
|
|
12
|
+
only those, and an act refused as asked throws an `ActRefusal` whose
|
|
13
|
+
`reason` and `sentence` a host can show (`refusalOf` reads one).
|
|
11
14
|
- **Invariants** — rules that judge the graph and name the mutations that
|
|
12
15
|
would repair them. That naming is the seam derived affordances ride on.
|
|
13
16
|
- **Operation log** — the graph is a fold over it. Author, intent, reads and
|
|
@@ -21,17 +24,46 @@ Everything a Graview app declares, and the checker that verifies it.
|
|
|
21
24
|
resolved for a brand by `shapeOf` and `typographyOf` — so a page outside
|
|
22
25
|
the app can dress as one without importing a stylesheet.
|
|
23
26
|
- **`graview check`** — reads a declaration and reports what is wrong with it,
|
|
24
|
-
in terms an agent can act on.
|
|
27
|
+
in terms an agent can act on. In code it is `@graview/core/check`:
|
|
28
|
+
`checkApp`, `describeApp`, the agent docs (`generateLlmsTxt`), and
|
|
29
|
+
`compileDocument`, a document compiled and checked.
|
|
25
30
|
- **Documents** — `@graview/core/document`: a whole app as one JSON object,
|
|
26
|
-
compiled by `
|
|
27
|
-
never run as code
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
compiled by `compileDocumentWithoutCheck` into the same app `defineApp`
|
|
32
|
+
declares and never run as code (`compileDocument` from
|
|
33
|
+
`@graview/core/check` also asks the checker); `toDocument` writes an app
|
|
34
|
+
back out. Rules say what must hold in a small, budgeted language
|
|
35
|
+
(`expressionRule`). Every command that takes an entry takes
|
|
36
|
+
`--document <file>`. A view's blocks resolve with `@graview/core/blocks`.
|
|
37
|
+
A number field may say its range (`min`, `max`, `step`), which every form,
|
|
38
|
+
tool and apply honours; an act's `connects` links from whichever end
|
|
39
|
+
of the relation its subject is, `replaces` severs the links it supersedes and set the record at the
|
|
40
|
+
other end (its "setsOther" key). `editDocument`, `diffDocuments` and
|
|
41
|
+
`planMigration` change a document and say what the change does to stored
|
|
42
|
+
data.
|
|
43
|
+
- **The city** — `@graview/core/scene`: `sceneThumbnail` draws a document
|
|
44
|
+
(or an app) as the Scene draws it from altitude — the same districts on
|
|
45
|
+
the same map, in their hues — as one SVG string, with no DOM, for a host
|
|
46
|
+
listing apps; `sceneDistricts` is the same answer as data. At a card's
|
|
47
|
+
size, `fit: "content"` fits it to what stands: each district on its whole
|
|
48
|
+
block from the same corner, cropped to the plots, with a few blocks no
|
|
49
|
+
narrower than `minBuilding` pixels (16 by default) rather than a speck per
|
|
50
|
+
record. A kind's
|
|
51
|
+
figures are `@graview/core/figures`.
|
|
52
|
+
- **What a page loads first** — `@graview/core` and `@graview/core/document`
|
|
53
|
+
hold only what a page draws with. The checker, the city, the figures and
|
|
54
|
+
the block resolver are on the subpaths above because a bundler places a
|
|
55
|
+
whole module in every chunk that can reach it: a hosted page imports both
|
|
56
|
+
barrels up front, and would otherwise carry them before a face is fetched.
|
|
57
|
+
- **A place's address** — `addressOf(place, { basePath })` spells a place
|
|
58
|
+
from `placesOf` as the routed face links to it under a host's base path,
|
|
59
|
+
`pathWithin` reads an address back, and `basePathOf` normalises a base.
|
|
33
60
|
- **Conformance** — `@graview/core/conformance`: fixtures a host runs against
|
|
34
61
|
a version (`conformance()`) to prove it reads, compiles and derives the same.
|
|
62
|
+
- **A status board's moves** — `@graview/core/describe`: `columnReach` says
|
|
63
|
+
which acts move a card to which column — the named steps that set the
|
|
64
|
+
field to that column's value, or else an act told the value — and
|
|
65
|
+
`columnMoves` the ones one seat may run on one record, its conditions
|
|
66
|
+
judged.
|
|
35
67
|
|
|
36
68
|
```sh
|
|
37
69
|
npx graview create my-app # a product on Graview, started (also: npm create graview)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AN APP'S ADDRESS UNDER A HOST'S BASE PATH (FR-106).
|
|
3
|
+
*
|
|
4
|
+
* A host that owns the page gives the routed face the address bar
|
|
5
|
+
* (`routing: "address"` on the embed), and serves the app at `/` or under a
|
|
6
|
+
* path of its own — `/apps/<id>/`, say. `placesOf(app)` says each place's
|
|
7
|
+
* address relative to the app (`/`, `/<plural>`, `/places/<as>`); these say
|
|
8
|
+
* it under the base, spelled the way the face's own links are, and read an
|
|
9
|
+
* address in the bar back to the app's own path.
|
|
10
|
+
*/
|
|
11
|
+
/** A base path as the router holds it: a leading slash, no trailing one, and the root as `""`. */
|
|
12
|
+
export declare function basePathOf(basePath: string | undefined): string;
|
|
13
|
+
/**
|
|
14
|
+
* A place's address under a base: `addressOf("/places/the-board", { basePath:
|
|
15
|
+
* "/apps/a1/" })` is `/apps/a1/places/the-board`. The home is the base itself
|
|
16
|
+
* (`/apps/a1`), as the routed face's own link home spells it. Takes an
|
|
17
|
+
* `AppPlace` from `placesOf` or its `address`; what is encoded stays encoded.
|
|
18
|
+
*/
|
|
19
|
+
export declare function addressOf(place: string | {
|
|
20
|
+
readonly address: string;
|
|
21
|
+
}, options?: {
|
|
22
|
+
readonly basePath?: string;
|
|
23
|
+
}): string;
|
|
24
|
+
/**
|
|
25
|
+
* An address in the bar, read back to the app's own path: `/apps/a1/tasks`
|
|
26
|
+
* under `/apps/a1` is `/tasks`, the base itself is `/`, and an address that
|
|
27
|
+
* is not under the base at all is `null`. Compared as the router compares,
|
|
28
|
+
* ignoring case; what is encoded stays encoded.
|
|
29
|
+
*/
|
|
30
|
+
export declare function pathWithin(pathname: string, basePath: string | undefined): string | null;
|
|
31
|
+
//# sourceMappingURL=address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../src/address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAI/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAQ5H;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAOxF"}
|
package/dist/address.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AN APP'S ADDRESS UNDER A HOST'S BASE PATH (FR-106).
|
|
3
|
+
*
|
|
4
|
+
* A host that owns the page gives the routed face the address bar
|
|
5
|
+
* (`routing: "address"` on the embed), and serves the app at `/` or under a
|
|
6
|
+
* path of its own — `/apps/<id>/`, say. `placesOf(app)` says each place's
|
|
7
|
+
* address relative to the app (`/`, `/<plural>`, `/places/<as>`); these say
|
|
8
|
+
* it under the base, spelled the way the face's own links are, and read an
|
|
9
|
+
* address in the bar back to the app's own path.
|
|
10
|
+
*/
|
|
11
|
+
/** A base path as the router holds it: a leading slash, no trailing one, and the root as `""`. */
|
|
12
|
+
export function basePathOf(basePath) {
|
|
13
|
+
const trimmed = (basePath ?? "").replace(/\/+$/, "");
|
|
14
|
+
if (trimmed === "")
|
|
15
|
+
return "";
|
|
16
|
+
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A place's address under a base: `addressOf("/places/the-board", { basePath:
|
|
20
|
+
* "/apps/a1/" })` is `/apps/a1/places/the-board`. The home is the base itself
|
|
21
|
+
* (`/apps/a1`), as the routed face's own link home spells it. Takes an
|
|
22
|
+
* `AppPlace` from `placesOf` or its `address`; what is encoded stays encoded.
|
|
23
|
+
*/
|
|
24
|
+
export function addressOf(place, options = {}) {
|
|
25
|
+
const address = typeof place === "string" ? place : place.address;
|
|
26
|
+
const base = basePathOf(options.basePath);
|
|
27
|
+
const path = address.startsWith("/") ? address : `/${address}`;
|
|
28
|
+
if (base === "")
|
|
29
|
+
return path;
|
|
30
|
+
if (path === "/")
|
|
31
|
+
return base;
|
|
32
|
+
if (path.startsWith("/?") || path.startsWith("/#"))
|
|
33
|
+
return `${base}${path.slice(1)}`;
|
|
34
|
+
return `${base}${path}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* An address in the bar, read back to the app's own path: `/apps/a1/tasks`
|
|
38
|
+
* under `/apps/a1` is `/tasks`, the base itself is `/`, and an address that
|
|
39
|
+
* is not under the base at all is `null`. Compared as the router compares,
|
|
40
|
+
* ignoring case; what is encoded stays encoded.
|
|
41
|
+
*/
|
|
42
|
+
export function pathWithin(pathname, basePath) {
|
|
43
|
+
const base = basePathOf(basePath);
|
|
44
|
+
if (base === "")
|
|
45
|
+
return pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
46
|
+
if (!pathname.toLowerCase().startsWith(base.toLowerCase()))
|
|
47
|
+
return null;
|
|
48
|
+
const rest = pathname.slice(base.length);
|
|
49
|
+
if (rest === "" || rest === "/")
|
|
50
|
+
return "/";
|
|
51
|
+
return rest.startsWith("/") ? rest : null;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../src/address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kGAAkG;AAClG,MAAM,UAAU,UAAU,CAAC,QAA4B;IACrD,MAAM,OAAO,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACrD,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAA4C,EAAE,UAA0C,EAAE;IAClH,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAA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ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArrangementWords } from "./
|
|
1
|
+
import type { ArrangementWords } from "./arrangement.js";
|
|
2
2
|
import type { InvariantDefinition } from "./invariants/types.js";
|
|
3
3
|
import type { AnyMutationDefinition } from "./mutations/types.js";
|
|
4
4
|
import type { Policy } from "./permissions/types.js";
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;GAIG;AACH;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAA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;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,SAAS,sBAAsB,EAAE,CAYxF;AAED,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,GAAG,MAAM,CAW7E;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAEhF"}
|
package/dist/arrange.d.ts
CHANGED
|
@@ -1,186 +1,16 @@
|
|
|
1
|
-
import type { AnySchema } from "./schema/schema.js";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* `@graview/core/arrange` — WHAT A KIND CAN BE ARRANGED BY, AND ARRANGING IT.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
/** `label`, a field name, or an edge kind (by the far end's label). */
|
|
18
|
-
readonly by: string;
|
|
19
|
-
readonly direction: SortDirection;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* One condition; a filter is the conjunction of several.
|
|
23
|
-
*
|
|
24
|
-
* `key` is a field name, an edge kind, or `is`. The value's grammar depends
|
|
25
|
-
* on the key: a boolean, enum or text field takes one of its values; a date
|
|
26
|
-
* field takes `before:<date>`, `after:<date>` or `on:<date>`; a number field
|
|
27
|
-
* takes `at-most:<n>`, `at-least:<n>` or a value; an edge takes a
|
|
28
|
-
* node id, `*` (tied to anything) or `none`; `is` takes `current`, `past`,
|
|
29
|
-
* `any`, `flagged` or `clear`. Anything else is dropped, not thrown.
|
|
30
|
-
*/
|
|
31
|
-
export interface Condition {
|
|
32
|
-
readonly key: string;
|
|
33
|
-
readonly value: string;
|
|
34
|
-
}
|
|
35
|
-
/** How wide a date group is. A year and a decade are what a catalogue of thirty years reads by. */
|
|
36
|
-
export type DateBucket = "day" | "week" | "month" | "year" | "decade";
|
|
37
|
-
export interface Grouping {
|
|
38
|
-
/** A field name or an edge kind. */
|
|
39
|
-
readonly by: string;
|
|
40
|
-
/** For a date field: how wide a group is. Day when unsaid. */
|
|
41
|
-
readonly bucket?: DateBucket;
|
|
42
|
-
}
|
|
43
|
-
export interface Arrangement {
|
|
44
|
-
readonly sort?: Sort;
|
|
45
|
-
readonly filter?: readonly Condition[];
|
|
46
|
-
readonly group?: Grouping;
|
|
47
|
-
/**
|
|
48
|
-
* Words to look for: a node stays when its label or any scalar field
|
|
49
|
-
* contains them, case aside. The narrowing a person types, beside the
|
|
50
|
-
* conditions a person picks — and the same matcher a search would use.
|
|
51
|
-
*/
|
|
52
|
-
readonly query?: string;
|
|
53
|
-
}
|
|
54
|
-
export declare const NO_ARRANGEMENT: Arrangement;
|
|
55
|
-
/** What a lens says to decline arrangement, wholly or a part at a time. */
|
|
56
|
-
export type ArrangeOption = boolean | {
|
|
57
|
-
readonly sort?: boolean;
|
|
58
|
-
readonly filter?: boolean;
|
|
59
|
-
readonly group?: boolean;
|
|
60
|
-
};
|
|
61
|
-
/** Whether a lens offers a part, given what it declared. Everything is on unless declined. */
|
|
62
|
-
export declare function arrangeAllows(option: ArrangeOption | undefined, part: "sort" | "filter" | "group"): boolean;
|
|
63
|
-
export type OfferType = "text" | "number" | "date" | "boolean" | "choice";
|
|
64
|
-
/** One thing a kind can be sorted, filtered or grouped by, in the declaration's own words. */
|
|
65
|
-
export interface ArrangeOffer {
|
|
66
|
-
readonly key: string;
|
|
67
|
-
/** The words for it: the field's reading, the edge kind humanised, or the reserved word's sentence. */
|
|
68
|
-
readonly label: string;
|
|
69
|
-
readonly about: "label" | "field" | "edge" | "is";
|
|
70
|
-
readonly type?: OfferType;
|
|
71
|
-
/** For a choice field, its options; for `is`, its words; for an edge, nothing — the far ends are the graph's. */
|
|
72
|
-
readonly options?: readonly string[];
|
|
73
|
-
/** For a date field, how it may be bucketed when grouped. */
|
|
74
|
-
readonly buckets?: readonly DateBucket[];
|
|
75
|
-
/** For an edge: the kinds at the far end, and how it reads from this kind. */
|
|
76
|
-
readonly far?: readonly string[];
|
|
77
|
-
}
|
|
78
|
-
export interface Arrangeable {
|
|
79
|
-
readonly kind: string;
|
|
80
|
-
readonly sorts: readonly ArrangeOffer[];
|
|
81
|
-
readonly filters: readonly ArrangeOffer[];
|
|
82
|
-
readonly groups: readonly ArrangeOffer[];
|
|
83
|
-
/** The kind's natural order, when `fieldRoles.order` names one. */
|
|
84
|
-
readonly natural?: Sort;
|
|
85
|
-
}
|
|
86
|
-
/** The edges this kind takes part in, from either end, with how each reads from here. */
|
|
87
|
-
export declare function edgesOf(schema: AnySchema, kind: string): readonly ArrangeOffer[];
|
|
88
|
-
/**
|
|
89
|
-
* Whether a condition names one of a kind's RETIRED states — `status:demo`
|
|
90
|
-
* where demos are behind the horizon — which is asking for the past by
|
|
91
|
-
* name. The search box and the list page both left the past out for it and
|
|
92
|
-
* found nothing.
|
|
93
|
-
*/
|
|
94
|
-
export declare function asksForThePast(definition: {
|
|
95
|
-
readonly lifecycle?: {
|
|
96
|
-
readonly field: string;
|
|
97
|
-
readonly retired: readonly unknown[] | "date";
|
|
98
|
-
};
|
|
99
|
-
} | undefined, conditions: readonly {
|
|
100
|
-
readonly key: string;
|
|
101
|
-
readonly value: string;
|
|
102
|
-
}[]): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* What a kind can be arranged by, derived from its declaration alone.
|
|
105
|
-
*
|
|
106
|
-
* Sorts: the label, every field with a scalar type, every edge (by the far
|
|
107
|
-
* end's label). Filters: boolean and choice fields by value, date fields by
|
|
108
|
-
* before/after/on, every edge by a node or by having one at all, and `is`
|
|
109
|
-
* for the lifecycle and the standing. Groups: boolean and choice fields,
|
|
110
|
-
* date fields by day, week or month, and every edge by its far end. A field
|
|
111
|
-
* the declaration hides is not offered — an ordering key is not a thing a
|
|
112
|
-
* person groups by.
|
|
113
|
-
*/
|
|
114
|
-
export declare function arrangeable(schema: AnySchema, kind: string): Arrangeable;
|
|
115
|
-
export interface ArrangementWords {
|
|
116
|
-
readonly sort?: string;
|
|
117
|
-
readonly filter?: string;
|
|
118
|
-
readonly group?: string;
|
|
119
|
-
readonly q?: string;
|
|
120
|
-
}
|
|
121
|
-
export declare function parseArrangement(words: ArrangementWords): Arrangement;
|
|
122
|
-
export declare function formatArrangement(arrangement: Arrangement): ArrangementWords;
|
|
123
|
-
/**
|
|
124
|
-
* Keeps only the parts a kind can actually be arranged by, and says which
|
|
125
|
-
* were dropped — a stale link names a field that was renamed, and the
|
|
126
|
-
* honest thing is to show the rest arranged and say what was ignored.
|
|
127
|
-
*/
|
|
128
|
-
export declare function admitArrangement(arrangement: Arrangement, offers: Arrangeable): {
|
|
129
|
-
readonly arrangement: Arrangement;
|
|
130
|
-
readonly dropped: readonly string[];
|
|
131
|
-
};
|
|
132
|
-
/** What arranging needs of a node: its identity. Fields are read off it by name. */
|
|
133
|
-
export type ArrangeNode = {
|
|
134
|
-
readonly id: string;
|
|
135
|
-
readonly kind: string;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* The little of a graph arranging needs, said structurally so a `Graph<S>`
|
|
139
|
-
* over any concrete schema fits — `GraphReader`'s generic `nodesOfKind`
|
|
140
|
-
* does not, once the kinds are literal.
|
|
141
|
-
*/
|
|
142
|
-
export interface ArrangeGraph {
|
|
143
|
-
getNode(id: string): ArrangeNode | undefined;
|
|
144
|
-
allNodes(): readonly ArrangeNode[];
|
|
145
|
-
out(id: string, kind?: string): readonly ArrangeNode[];
|
|
146
|
-
in(id: string, kind?: string): readonly ArrangeNode[];
|
|
147
|
-
}
|
|
148
|
-
export interface ArrangeContext {
|
|
149
|
-
readonly schema: AnySchema;
|
|
150
|
-
readonly graph: ArrangeGraph;
|
|
151
|
-
/** Node ids the rules currently implicate, for `is:flagged` and `is:clear`. */
|
|
152
|
-
readonly flagged?: ReadonlySet<string>;
|
|
153
|
-
/** For the lifecycle: today, as YYYY-MM-DD. */
|
|
154
|
-
readonly today?: string;
|
|
155
|
-
}
|
|
156
|
-
export interface ArrangedGroup<N extends ArrangeNode = ArrangeNode> {
|
|
157
|
-
/** Stable, sortable: the value, the date bucket's first day, the far end's id, or `` for none. */
|
|
158
|
-
readonly key: string;
|
|
159
|
-
/** The words for the group: a value as it reads, a date, a far end's label, or "No <reading>". */
|
|
160
|
-
readonly label: string;
|
|
161
|
-
readonly nodes: readonly N[];
|
|
162
|
-
}
|
|
163
|
-
export interface Arranged<N extends ArrangeNode = ArrangeNode> {
|
|
164
|
-
/** The nodes that passed the filter, in order. */
|
|
165
|
-
readonly nodes: readonly N[];
|
|
166
|
-
/** The same nodes, grouped when a grouping was asked; one unnamed group otherwise. */
|
|
167
|
-
readonly groups: readonly ArrangedGroup<N>[];
|
|
168
|
-
readonly grouped: boolean;
|
|
169
|
-
}
|
|
170
|
-
/** The first day of the bucket a date falls in, as YYYY-MM-DD; weeks start on Monday, in UTC. */
|
|
171
|
-
export declare function bucketStart(date: string, bucket: DateBucket): string | undefined;
|
|
172
|
-
/** Whether a node meets one condition of a filter. Search judges its `key:value` tokens with this too. */
|
|
173
|
-
export declare function conditionHolds(ctx: ArrangeContext, node: ArrangeNode, condition: Condition): boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Whether the words find the node — search's own matcher, so a list's `q`
|
|
176
|
-
* and the Find box never disagree: every word the start of a word in the
|
|
177
|
-
* label or a readable field, case, diacritics and punctuation aside.
|
|
178
|
-
*/
|
|
179
|
-
export declare function matches(ctx: ArrangeContext, node: ArrangeNode, query: string): boolean;
|
|
180
|
-
/**
|
|
181
|
-
* Filters, sorts and groups. The filter is a conjunction; the sort is
|
|
182
|
-
* stable; a grouping puts the group with nothing to say last. Nodes whose
|
|
183
|
-
* kind the context cannot describe are kept and sort by what they carry.
|
|
184
|
-
*/
|
|
185
|
-
export declare function arrange<N extends ArrangeNode>(nodes: readonly N[], arrangement: Arrangement, ctx: ArrangeContext): Arranged<N>;
|
|
4
|
+
* The offers a kind's declaration makes (`arrangeable`), the grammar that
|
|
5
|
+
* carries a chosen arrangement in an address (`parseArrangement`,
|
|
6
|
+
* `formatArrangement`), and the filtering, sorting and grouping itself
|
|
7
|
+
* (`arrange`). Apart from `@graview/core` because a bundler places a whole
|
|
8
|
+
* file in a page's first chunk when the first chunk can reach it and any
|
|
9
|
+
* chunk uses it: a page that has drawn no list yet carries none of the
|
|
10
|
+
* arranging. The types stay on `@graview/core`, where a declaration names
|
|
11
|
+
* them.
|
|
12
|
+
*/
|
|
13
|
+
export { arrangeable, asksForThePast, conditionHolds, edgesOf, NO_ARRANGEMENT, parseArrangement } from "./arrangement.js";
|
|
14
|
+
export { admitArrangement, arrange, arrangeAllows, bucketStart, formatArrangement, matches } from "./arranging.js";
|
|
15
|
+
export type { Arrangeable, ArrangeContext, Arranged, ArrangeGraph, ArrangedGroup, Arrangement, ArrangementWords, ArrangeNode, ArrangeOffer, ArrangeOption, Condition, DateBucket, Grouping, OfferType, Sort, SortDirection, } from "./arrangement.js";
|
|
186
16
|
//# sourceMappingURL=arrange.d.ts.map
|
package/dist/arrange.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrange.d.ts","sourceRoot":"","sources":["../src/arrange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arrange.d.ts","sourceRoot":"","sources":["../src/arrange.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1H,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACnH,YAAY,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,aAAa,GACd,MAAM,kBAAkB,CAAC"}
|