@graview/core 0.1.38 → 0.1.40
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/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/cli/check/code-describe.d.ts +14 -0
- package/dist/cli/check/code-describe.d.ts.map +1 -0
- package/dist/cli/check/code-describe.js +141 -0
- package/dist/cli/check/code-describe.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 +22 -1
- package/dist/cli/check/lenses.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/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +7 -1
- package/dist/document/edit.js.map +1 -1
- package/dist/document/index.d.ts +1 -0
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +1 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/lens-options.d.ts +14 -0
- package/dist/document/lens-options.d.ts.map +1 -0
- package/dist/document/lens-options.js +35 -0
- package/dist/document/lens-options.js.map +1 -0
- package/dist/document/views.d.ts.map +1 -1
- package/dist/document/views.js +13 -2
- package/dist/document/views.js.map +1 -1
- package/dist/document.schema.json +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/mutations/made.d.ts +14 -0
- package/dist/mutations/made.d.ts.map +1 -0
- package/dist/mutations/made.js +21 -0
- package/dist/mutations/made.js.map +1 -0
- package/dist/places.d.ts +10 -0
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +13 -3
- package/dist/places.js.map +1 -1
- package/dist/scaffold/domain.d.ts.map +1 -1
- package/dist/scaffold/domain.js +4 -1
- package/dist/scaffold/domain.js.map +1 -1
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +20 -109
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/ui.d.ts.map +1 -1
- package/dist/scaffold/ui.js +19 -4
- package/dist/scaffold/ui.js.map +1 -1
- package/dist/schema/files.d.ts +10 -0
- package/dist/schema/files.d.ts.map +1 -1
- package/dist/schema/files.js +7 -1
- package/dist/schema/files.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +20 -11
- package/dist/store.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/village.d.ts +9 -1
- package/dist/village.d.ts.map +1 -1
- package/dist/village.js +8 -2
- package/dist/village.js.map +1 -1
- package/dist/watched.d.ts +13 -4
- package/dist/watched.d.ts.map +1 -1
- package/dist/watched.js +38 -1
- package/dist/watched.js.map +1 -1
- package/package.json +1 -1
package/dist/watched.js
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT A WATCHING HARNESS IS TOLD.
|
|
3
|
+
*
|
|
4
|
+
* The browser harnesses judge every screen they reach against the rules that
|
|
5
|
+
* hold everywhere (`scripts/lib/watch.mjs`). Two of those rules need what
|
|
6
|
+
* only the store knows: which strings are the declaration's own names — an
|
|
7
|
+
* act called `close-deal`, a role called `sales-manager`, a seat called
|
|
8
|
+
* `user-lena` — so that text showing one to a person can be caught exactly
|
|
9
|
+
* rather than guessed at; and which acts a press reached that the policy
|
|
10
|
+
* then refused, which is an act offered to somebody who may not take it.
|
|
11
|
+
*
|
|
12
|
+
* A page is watched when the harness defined `globalThis.__graviewWatch`
|
|
13
|
+
* before the app ran. Anywhere else this is one property read. The store
|
|
14
|
+
* hands itself over and the watch works out the names, what a seat may not
|
|
15
|
+
* see and who has signed what — work that was done here, and downloaded by
|
|
16
|
+
* every reader of a hosted page for a harness's sake, until the ninth walk
|
|
17
|
+
* needed the room (the hosted page's budget).
|
|
18
|
+
*/
|
|
19
|
+
import { InvalidArguments } from "./mutations/invalid-arguments.js";
|
|
1
20
|
const theWatch = () => globalThis.__graviewWatch;
|
|
2
21
|
/**
|
|
3
22
|
* THE STORE ITSELF, for a harness that measures whether a person got a job
|
|
@@ -25,7 +44,25 @@ export function tellTheWatchOfARefusal(refusal, author) {
|
|
|
25
44
|
* the watch knows and the store does not.
|
|
26
45
|
*/
|
|
27
46
|
export function tellTheWatchOfAnInputRefusal(refusal, author) {
|
|
28
|
-
|
|
47
|
+
const watch = theWatch();
|
|
48
|
+
if (!watch?.refusedInput)
|
|
49
|
+
return;
|
|
50
|
+
const message = refusal.issues.map((issue) => `${issue.path.map(String).join(".")}: ${issue.message}`).join("; ");
|
|
51
|
+
watch.refusedInput({ mutation: refusal.mutation, message, ...(author === undefined ? {} : { author }) });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A PRESS'S OWN PREVIEW, REFUSED BY THE ACT'S INPUT (carried from W-228 and
|
|
55
|
+
* W-238). The scene's strip and the quick ask show what an act would do
|
|
56
|
+
* before they apply it, so the act's input refused it in the preview and
|
|
57
|
+
* the apply that tells the watch never ran: an act offered whole and
|
|
58
|
+
* refused on press was a finding on the pages and passed on the scene. A
|
|
59
|
+
* surface previewing the press it is about to apply tells the watch here;
|
|
60
|
+
* a preview of what an act would do before anything is pressed tells
|
|
61
|
+
* nothing.
|
|
62
|
+
*/
|
|
63
|
+
export function tellTheWatchOfAPressRefusedByItsInput(error, author) {
|
|
64
|
+
if (error instanceof InvalidArguments)
|
|
65
|
+
tellTheWatchOfAnInputRefusal(error, author);
|
|
29
66
|
}
|
|
30
67
|
/**
|
|
31
68
|
* WHAT THIS SEAT MAY NOT SEE, and who has signed what, for a watching
|
package/dist/watched.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watched.js","sourceRoot":"","sources":["../src/watched.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file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