@graview/guest 0.1.44 → 0.1.45
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 +45 -7
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -4
- package/dist/cli.js.map +1 -1
- package/dist/headless/describe.d.ts.map +1 -1
- package/dist/headless/describe.js +5 -0
- package/dist/headless/describe.js.map +1 -1
- package/dist/headless/draw.d.ts +5 -2
- package/dist/headless/draw.d.ts.map +1 -1
- package/dist/headless/draw.js +6 -5
- package/dist/headless/draw.js.map +1 -1
- package/dist/headless/index.d.ts +24 -0
- package/dist/headless/index.d.ts.map +1 -1
- package/dist/headless/index.js +19 -7
- package/dist/headless/index.js.map +1 -1
- package/dist/headless/judge.d.ts +8 -2
- package/dist/headless/judge.d.ts.map +1 -1
- package/dist/headless/judge.js +8 -3
- package/dist/headless/judge.js.map +1 -1
- package/dist/headless/press.d.ts +51 -0
- package/dist/headless/press.d.ts.map +1 -0
- package/dist/headless/press.js +135 -0
- package/dist/headless/press.js.map +1 -0
- package/dist/headless/protocol.d.ts +21 -2
- package/dist/headless/protocol.d.ts.map +1 -1
- package/dist/headless/runtime.generated.d.ts.map +1 -1
- package/dist/headless/runtime.generated.js +1 -1
- package/dist/headless/runtime.generated.js.map +1 -1
- package/dist/headless/runtime.js +18 -1
- package/dist/headless/runtime.js.map +1 -1
- package/dist/host/css.d.ts +7 -0
- package/dist/host/css.d.ts.map +1 -1
- package/dist/host/css.js +23 -0
- package/dist/host/css.js.map +1 -1
- package/dist/host/external-links.d.ts +20 -0
- package/dist/host/external-links.d.ts.map +1 -0
- package/dist/host/external-links.js +102 -0
- package/dist/host/external-links.js.map +1 -0
- package/dist/host/links.d.ts +6 -2
- package/dist/host/links.d.ts.map +1 -1
- package/dist/host/links.js +37 -13
- package/dist/host/links.js.map +1 -1
- package/dist/host/manifest.d.ts +11 -0
- package/dist/host/manifest.d.ts.map +1 -1
- package/dist/host/manifest.js +2 -0
- package/dist/host/manifest.js.map +1 -1
- package/dist/host/open-draw.d.ts +12 -5
- package/dist/host/open-draw.d.ts.map +1 -1
- package/dist/host/open-draw.js +13 -4
- package/dist/host/open-draw.js.map +1 -1
- package/dist/host/open-judge.d.ts +9 -1
- package/dist/host/open-judge.d.ts.map +1 -1
- package/dist/host/open-judge.js +5 -1
- package/dist/host/open-judge.js.map +1 -1
- package/dist/host/open-render.d.ts.map +1 -1
- package/dist/host/open-render.js +6 -0
- package/dist/host/open-render.js.map +1 -1
- package/dist/host/press.d.ts +15 -1
- package/dist/host/press.d.ts.map +1 -1
- package/dist/host/press.js +42 -3
- package/dist/host/press.js.map +1 -1
- package/dist/host/pressable.d.ts +37 -0
- package/dist/host/pressable.d.ts.map +1 -0
- package/dist/host/pressable.js +113 -0
- package/dist/host/pressable.js.map +1 -0
- package/dist/host/session.d.ts +2 -2
- package/dist/host/session.d.ts.map +1 -1
- package/dist/host/session.js +2 -2
- package/dist/host/session.js.map +1 -1
- package/dist/host/view-runtime.generated.d.ts.map +1 -1
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view-runtime.generated.js.map +1 -1
- package/dist/host/view.d.ts +13 -0
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +32 -11
- package/dist/host/view.js.map +1 -1
- package/dist/host/worker-react.d.ts +4 -0
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +19 -3
- package/dist/host/worker-react.js.map +1 -1
- package/dist/open-kit.d.ts +6 -2
- package/dist/open-kit.d.ts.map +1 -1
- package/dist/open-kit.js +9 -3
- package/dist/open-kit.js.map +1 -1
- package/dist/protocol.d.ts +3 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/worker/view-global.d.ts +3 -0
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +15 -5
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.js +2 -2
- package/package.json +3 -3
package/dist/headless/judge.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import type { DescribedPart, DescribedProblem } from "@graview/core/describe";
|
|
2
2
|
import type { ViewRefusal } from "../host/open-draw.js";
|
|
3
3
|
import { type ImageHost } from "../host/open-judge.js";
|
|
4
|
+
import { type DrawnTranscript } from "./draw.js";
|
|
4
5
|
import type { HeadlessFailureReason, HeadlessInput, HeadlessTranscript } from "./protocol.js";
|
|
5
|
-
export type Judged =
|
|
6
|
+
export type Judged =
|
|
7
|
+
/** `drawn`: the drawing itself, for the host to read a press against (0.1.45). */
|
|
8
|
+
{
|
|
6
9
|
readonly ok: true;
|
|
7
10
|
readonly parts: readonly DescribedPart[];
|
|
8
11
|
readonly problems: readonly DescribedProblem[];
|
|
12
|
+
readonly drawn: DrawnTranscript;
|
|
9
13
|
} | {
|
|
10
14
|
readonly ok: false;
|
|
11
15
|
readonly reason: HeadlessFailureReason;
|
|
12
16
|
readonly detail: string;
|
|
13
17
|
};
|
|
14
18
|
/** One refusal of the open kit's, said to the author of the view, offering only what its host draws. */
|
|
15
|
-
export declare function sayRefusal(refusal: ViewRefusal, host?: ImageHost
|
|
19
|
+
export declare function sayRefusal(refusal: ViewRefusal, host?: ImageHost & {
|
|
20
|
+
readonly linkOrigins?: readonly string[];
|
|
21
|
+
}): DescribedProblem;
|
|
16
22
|
export declare function judgeTranscript(transcript: HeadlessTranscript, input: HeadlessInput): Judged;
|
|
17
23
|
//# sourceMappingURL=judge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge.d.ts","sourceRoot":"","sources":["../../src/headless/judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"judge.d.ts","sourceRoot":"","sources":["../../src/headless/judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAE1E,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAW9F,MAAM,MAAM,MAAM;AAChB,kFAAkF;AAChF;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;CAAE,GAChJ;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5F,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,GAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAAG,gBAAgB,CAsBtI;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,kBAAkB,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,CAyB5F"}
|
package/dist/headless/judge.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { placeNamed, placesSaid, quoted } from "../host/links-words.js";
|
|
2
|
+
import { handedLinks, judgeLink, linkRefusedWords } from "../host/external-links.js";
|
|
2
3
|
import { imageRefusedWords } from "../host/open-judge.js";
|
|
3
4
|
import { describeDrawing } from "./describe.js";
|
|
4
5
|
import { drawTranscript } from "./draw.js";
|
|
@@ -14,6 +15,8 @@ export function sayRefusal(refusal, host = {}) {
|
|
|
14
15
|
case "value":
|
|
15
16
|
return { at: `drawing ${element}${name}`, says: `Not drawn: the value of${name} is not one the open kit takes.` };
|
|
16
17
|
case "url":
|
|
18
|
+
if ("element" in refusal && refusal.element === "a" && refusal.address !== undefined)
|
|
19
|
+
return { at: `drawing ${element}${name}`, says: `Not drawn: ${linkRefusedWords(refusal.address, host.linkOrigins)}` };
|
|
17
20
|
return { at: `drawing ${element}${name}`, says: refusal.address !== undefined && "element" in refusal && refusal.element === "img" ? `Not drawn: ${imageRefusedWords(refusal.address, host, "length" in refusal ? refusal.length : undefined)}` : `Not drawn: an address. A view loads nothing; an image is a data: image.` };
|
|
18
21
|
case "child":
|
|
19
22
|
return { at: `drawing ${element}`, says: `Not drawn: ${element} holds nothing.` };
|
|
@@ -34,8 +37,10 @@ export function judgeTranscript(transcript, input) {
|
|
|
34
37
|
if (!acts.has(asked.name))
|
|
35
38
|
return { ok: false, reason: "act", detail: `It asks for the act "${asked.name}", which its manifest does not name.` };
|
|
36
39
|
}
|
|
40
|
+
/* A link out goes where the records the view was shown say, or to an origin the host lists, as on the page. */
|
|
41
|
+
const handed = handedLinks(input.props);
|
|
37
42
|
/* Nothing loads in a run: the app's own image is drawn as the path the live host resolves, where the host says it does. */
|
|
38
|
-
const drawn = drawTranscript(transcript.renders, transcript.
|
|
43
|
+
const drawn = drawTranscript(transcript.renders, transcript.sheets, { maxNodes: limits.maxNodes, ...(input.origin ? { origin: input.origin } : {}), ...(input.imageOrigins ? { imageOrigins: input.imageOrigins } : {}), ...(input.assets ? { asset: (path) => path } : {}), link: (value) => judgeLink(value, { handed, ...(input.linkOrigins ? { origins: input.linkOrigins } : {}) }) });
|
|
39
44
|
if (drawn.over)
|
|
40
45
|
return { ok: false, reason: "nodes", detail: `It drew more than the ${limits.maxNodes.toLocaleString("en-US")} things a view may draw.` };
|
|
41
46
|
// A kind's list is somewhere a view may go by name too, by its plural or the kind's name.
|
|
@@ -45,7 +50,7 @@ export function judgeTranscript(transcript, input) {
|
|
|
45
50
|
if (!acts.has(act))
|
|
46
51
|
return { ok: false, reason: "act", detail: `It binds a press to the act "${act}" (data-act), which its manifest does not name.` };
|
|
47
52
|
}
|
|
48
|
-
const problems = [...drawn.refused.map((one) => sayRefusal(one, { ...(input.imageOrigins ? { origins: input.imageOrigins } : {}), assets: input.assets === true })), ...said.problems];
|
|
53
|
+
const problems = [...drawn.refused.map((one) => sayRefusal(one, { ...(input.imageOrigins ? { origins: input.imageOrigins } : {}), assets: input.assets === true, ...(input.linkOrigins ? { linkOrigins: input.linkOrigins } : {}) })), ...said.problems];
|
|
49
54
|
for (const went of transcript.went) {
|
|
50
55
|
/* A bare string is a record first, then a place by that slug, as the host follows it. */
|
|
51
56
|
if ("record" in went && !(input.props.node?.id === went.record || (input.props.nodes ?? []).some((node) => node.id === went.record) || placeNamed(goes, went.record)))
|
|
@@ -53,6 +58,6 @@ export function judgeTranscript(transcript, input) {
|
|
|
53
58
|
if ("place" in went && !placeNamed(goes, went.place))
|
|
54
59
|
problems.push({ at: "navigate", says: `It goes to the place ${quoted(went.place)}, which this app does not have.${placesSaid(goes)}` });
|
|
55
60
|
}
|
|
56
|
-
return { ok: true, parts: said.parts, problems };
|
|
61
|
+
return { ok: true, parts: said.parts, problems, drawn };
|
|
57
62
|
}
|
|
58
63
|
//# sourceMappingURL=judge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge.js","sourceRoot":"","sources":["../../src/headless/judge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAkB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAA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CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9Z,IAAI,OAAO,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,wBAAwB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,kCAAkC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAChM,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type AnySchema, type Principal, type Store } from "@graview/core";
|
|
2
|
+
import { type Arrival, type GuestList } from "../host/links.js";
|
|
3
|
+
import type { WorkerViewManifest } from "../host/manifest.js";
|
|
4
|
+
import type { GuestPlace, GuestRefusal } from "../protocol.js";
|
|
5
|
+
import type { DrawnTranscript } from "./draw.js";
|
|
6
|
+
import type { HeadlessTranscript } from "./protocol.js";
|
|
7
|
+
/** What a press the run made would have done. Nothing was applied. */
|
|
8
|
+
export interface HeadlessPress {
|
|
9
|
+
readonly selector: string;
|
|
10
|
+
/** The element it matched, as the drawing names it (`<div class="card" data-record="threat:7">`); none when it matched nothing. */
|
|
11
|
+
readonly element?: string;
|
|
12
|
+
/** Where the host would go: the link the press lands in, judged. */
|
|
13
|
+
readonly opens?: Arrival;
|
|
14
|
+
/** The link it lands in goes nowhere: why. */
|
|
15
|
+
readonly lost?: string;
|
|
16
|
+
/** The act a bound press would ask for: applied for this seat, rehearsed, with its arguments and its sentence; or refused, with the view's `pressed`. */
|
|
17
|
+
readonly act?: {
|
|
18
|
+
readonly as: string;
|
|
19
|
+
readonly ok: true;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
22
|
+
readonly intent: string;
|
|
23
|
+
readonly changes: boolean;
|
|
24
|
+
} | {
|
|
25
|
+
readonly as: string;
|
|
26
|
+
readonly ok: false;
|
|
27
|
+
readonly reason: GuestRefusal;
|
|
28
|
+
readonly message: string;
|
|
29
|
+
};
|
|
30
|
+
/** What the view's own code asked for when it heard the click, and where it asked to go. Nothing was applied. */
|
|
31
|
+
readonly asked: HeadlessTranscript["asked"];
|
|
32
|
+
readonly went: HeadlessTranscript["went"];
|
|
33
|
+
/** It drew again when it heard the click. */
|
|
34
|
+
readonly redrew: boolean;
|
|
35
|
+
/** All of it, in a sentence or two. */
|
|
36
|
+
readonly says: string;
|
|
37
|
+
}
|
|
38
|
+
export interface HeadlessPressContext<S extends AnySchema> {
|
|
39
|
+
readonly store: Store<S>;
|
|
40
|
+
readonly principal: Principal;
|
|
41
|
+
readonly manifest: WorkerViewManifest;
|
|
42
|
+
/** The records the view was shown. */
|
|
43
|
+
readonly shown: ReadonlySet<string>;
|
|
44
|
+
readonly places: readonly GuestPlace[];
|
|
45
|
+
readonly lists: readonly GuestList[];
|
|
46
|
+
/** What the person typed, or picked, by the field's name. Every other field holds what the view left in it. */
|
|
47
|
+
readonly typed?: Readonly<Record<string, string | number | boolean>>;
|
|
48
|
+
}
|
|
49
|
+
/** A press the run made, judged as the live host would judge it, over what the view drew before it. */
|
|
50
|
+
export declare function judgeHeadlessPress<S extends AnySchema>(pressed: NonNullable<HeadlessTranscript["pressed"]>, before: DrawnTranscript, transcript: HeadlessTranscript, context: HeadlessPressContext<S>): HeadlessPress;
|
|
51
|
+
//# sourceMappingURL=press.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"press.d.ts","sourceRoot":"","sources":["../../src/headless/press.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAoB,KAAK,OAAO,EAAE,K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kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC1C,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,SAAS;IACvD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,+GAA+G;IAC/G,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CACtE;AAuDD,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,aAAa,CA+DrN"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { PermissionDeniedError } from "@graview/core";
|
|
2
|
+
import { judgeDestination } from "../host/links.js";
|
|
3
|
+
import { whereOfWords } from "../host/links-words.js";
|
|
4
|
+
import { isEntry, isPress, linkPressed, notPressable, opensOnPress } from "../host/pressable.js";
|
|
5
|
+
import { judgePress, prefillOf } from "../host/press.js";
|
|
6
|
+
import { TreeElement } from "./tree.js";
|
|
7
|
+
const below = function* (element) {
|
|
8
|
+
for (const child of element.childNodes) {
|
|
9
|
+
if (!(child instanceof TreeElement))
|
|
10
|
+
continue;
|
|
11
|
+
yield child;
|
|
12
|
+
yield* below(child);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const up = (element, root, test) => {
|
|
16
|
+
for (let on = element; on && on !== root; on = on.parentElement)
|
|
17
|
+
if (test(on))
|
|
18
|
+
return on;
|
|
19
|
+
return undefined;
|
|
20
|
+
};
|
|
21
|
+
const named = (element) => {
|
|
22
|
+
const said = ["id", "class", "data-record", "data-place", "data-act", "role", "name"].flatMap((name) => (element.getAttribute(name) === null ? [] : [` ${name}="${element.getAttribute(name).slice(0, 80)}"`]));
|
|
23
|
+
return `<${element.localName}${said.join("")}>`;
|
|
24
|
+
};
|
|
25
|
+
const textOf = (element) => element.childNodes.map((child) => (child instanceof TreeElement ? textOf(child) : child.nodeType === 3 ? child.textContent : "")).join("");
|
|
26
|
+
/** The fields in a press's scope as the host would read them: typed where `typed` says, and the view's, or the host's prefill, everywhere else. */
|
|
27
|
+
function fieldsOf(scope, record, context) {
|
|
28
|
+
const typed = context.typed ?? {};
|
|
29
|
+
const fields = [];
|
|
30
|
+
const acts = [...below(scope)].filter((one) => one.getAttribute("data-act") !== null).map((one) => one.getAttribute("data-act"));
|
|
31
|
+
for (const field of below(scope)) {
|
|
32
|
+
const name = field.getAttribute("name");
|
|
33
|
+
if (!name || !["input", "select", "textarea"].includes(field.localName))
|
|
34
|
+
continue;
|
|
35
|
+
const type = (field.getAttribute("type") ?? "text").toLowerCase();
|
|
36
|
+
const mine = Object.hasOwn(typed, name);
|
|
37
|
+
if (type === "radio") {
|
|
38
|
+
const value = field.getAttribute("value") ?? "on";
|
|
39
|
+
if (mine ? String(typed[name]) !== value : !field.checked)
|
|
40
|
+
continue;
|
|
41
|
+
fields.push({ name, value, typed: mine, empty: false, chosen: true });
|
|
42
|
+
}
|
|
43
|
+
else if (field.localName === "select") {
|
|
44
|
+
const options = [...below(field)].filter((one) => one.localName === "option");
|
|
45
|
+
const picked = options.find((one) => one.selected || one.getAttribute("selected") !== null) ?? options[0];
|
|
46
|
+
const value = mine ? String(typed[name]) : picked ? (picked.getAttribute("value") ?? textOf(picked).trim()) : "";
|
|
47
|
+
fields.push({ name, value, typed: mine, empty: value === "" && !mine, chosen: true });
|
|
48
|
+
}
|
|
49
|
+
else if (type === "checkbox") {
|
|
50
|
+
const checked = mine ? typed[name] === true || typed[name] === "true" || typed[name] === "on" : field.checked;
|
|
51
|
+
fields.push({ name, value: checked, typed: mine, empty: !checked && !mine });
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
/* What the host fills from the record (FR-150), as it fills it: an empty field marked data-prefill with its own name. */
|
|
55
|
+
const around = up(field, scope, (one) => one.getAttribute("data-record") !== null)?.getAttribute("data-record") ?? record;
|
|
56
|
+
const fill = field.value === "" && field.getAttribute("data-prefill") === name && around ? prefillOf(context.store, context.principal, context.manifest, context.shown, { record: around, field: name, acts }) : undefined;
|
|
57
|
+
const from = fill !== undefined ? { record: around, field: name, value: fill } : undefined;
|
|
58
|
+
const said = mine ? typed[name] : (fill ?? field.value);
|
|
59
|
+
const numeric = type === "number" || type === "range";
|
|
60
|
+
const value = numeric && said !== "" && Number.isFinite(Number(said)) ? Number(said) : typeof said === "boolean" ? String(said) : said;
|
|
61
|
+
fields.push({ name, value, typed: mine || from !== undefined, empty: value === "" && !mine && !from, ...(from ? { from } : {}) });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return fields;
|
|
65
|
+
}
|
|
66
|
+
/** A press the run made, judged as the live host would judge it, over what the view drew before it. */
|
|
67
|
+
export function judgeHeadlessPress(pressed, before, transcript, context) {
|
|
68
|
+
const asked = transcript.asked.slice(pressed.asked);
|
|
69
|
+
const went = transcript.went.slice(pressed.went);
|
|
70
|
+
const redrew = transcript.renders.length > pressed.renders;
|
|
71
|
+
const element = pressed.target !== undefined ? before.elementOf(pressed.target) : undefined;
|
|
72
|
+
const code = [
|
|
73
|
+
...asked.map((one) => `its code asked for "${one.name}"`),
|
|
74
|
+
...went.map((one) => `its code asked to go to "${"record" in one ? one.record : one.place}"`),
|
|
75
|
+
...(redrew ? ["it drew again"] : []),
|
|
76
|
+
];
|
|
77
|
+
const also = code.length > 0 ? ` When the view heard the click, ${code.join(", ")}.` : "";
|
|
78
|
+
if (!element)
|
|
79
|
+
return { selector: pressed.selector, asked, went, redrew, says: `"${pressed.selector}" matches nothing the view drew: there is nothing there to press.` };
|
|
80
|
+
const root = before.root;
|
|
81
|
+
const out = {};
|
|
82
|
+
const said = [];
|
|
83
|
+
/* A link first, as the host follows one, unless the press lands on a press of its own on the way. */
|
|
84
|
+
const link = linkPressed(element, root, (one) => opensOnPress(one, [...below(one)].some(isEntry)));
|
|
85
|
+
if (link) {
|
|
86
|
+
const filter = link.getAttribute("data-filter");
|
|
87
|
+
const section = link.getAttribute("data-section");
|
|
88
|
+
const record = link.getAttribute("data-record");
|
|
89
|
+
const where = { ...(filter ? { where: whereOfWords(filter) } : {}), ...(section ? { section } : {}) };
|
|
90
|
+
const to = record ? { record, ...where } : { place: link.getAttribute("data-place") ?? "", ...where };
|
|
91
|
+
const judged = judgeDestination(to, { sees: (id) => context.shown.has(id), places: context.places, lists: context.lists, schema: context.store.schema });
|
|
92
|
+
if (judged.ok) {
|
|
93
|
+
out.opens = judged.arrival;
|
|
94
|
+
const arrival = judged.arrival;
|
|
95
|
+
const narrowed = "filter" in arrival && arrival.filter ? `, narrowed to ${arrival.filter}` : "";
|
|
96
|
+
said.push(`It opens ${"record" in arrival ? `the record "${arrival.record}"` : "place" in arrival ? `the place "${arrival.place}"` : `the list of ${arrival.list}`}${narrowed}${arrival.section ? `, at "${arrival.section}"` : ""}.`);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
out.lost = judged.says;
|
|
100
|
+
said.push(`It lands in a link that goes nowhere: ${judged.says}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/* A bound press, as the host reads and judges one. */
|
|
104
|
+
const bound = up(element, root, (one) => one.getAttribute("data-act") !== null);
|
|
105
|
+
if (bound) {
|
|
106
|
+
const as = bound.getAttribute("data-act");
|
|
107
|
+
const why = notPressable(bound);
|
|
108
|
+
if (why) {
|
|
109
|
+
said.push(`It is bound to "${as}", and is never pressed: ${why}`);
|
|
110
|
+
}
|
|
111
|
+
else if (isPress(bound)) {
|
|
112
|
+
const recordAt = up(bound, root, (one) => one.getAttribute("data-record") !== null)?.getAttribute("data-record") ?? undefined;
|
|
113
|
+
const scope = up(bound, root, (one) => one.localName === "fieldset" || one.getAttribute("role") === "group") ?? root;
|
|
114
|
+
const press = { as, ...(recordAt !== undefined ? { record: recordAt } : {}), fields: fieldsOf(scope, recordAt, context) };
|
|
115
|
+
const judged = judgePress(context.store, context.manifest, context.shown, press);
|
|
116
|
+
if (!judged.ok)
|
|
117
|
+
out.act = { as, ok: false, reason: judged.reason, message: judged.message };
|
|
118
|
+
else {
|
|
119
|
+
try {
|
|
120
|
+
const rehearsed = context.store.previewAll([{ name: judged.name, args: judged.args }], { author: context.principal, via: `view:${context.manifest.name}` });
|
|
121
|
+
out.act = { as, ok: true, name: judged.name, args: judged.args, intent: rehearsed.intent, changes: rehearsed.ops.length > 0 };
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
out.act = error instanceof PermissionDeniedError ? { as, ok: false, reason: "refused", message: error.refusal.message } : { as, ok: false, reason: "failed", message: "The act could not be applied." };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const act = out.act;
|
|
128
|
+
said.push(act.ok ? `It asks for "${act.name}" with ${JSON.stringify(act.args)}: ${act.changes ? `“${act.intent}”, applied for this seat, were it pressed.` : "applied for this seat, it would change nothing."}` : `It asks for "${as}", which the host refuses (${act.reason}): ${act.message}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (said.length === 0)
|
|
132
|
+
said.push(`It is bound to no act and lands in no link: the host does nothing there${code.length > 0 ? "" : ", and the view's code does nothing either"}.`);
|
|
133
|
+
return { selector: pressed.selector, element: named(element), ...out, asked, went, redrew, says: `A press on ${named(element)}: ${said.join(" ")}${also}` };
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=press.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"press.js","sourceRoot":"","sources":["../../src/headless/press.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA8C,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAgC,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAoB,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKzD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA2DxC,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,OAAoB;IAC3C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;YAAE,SAAS;QAC9C,MAAM,KAAK,CAAC;QACZ,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACH,CAAC,CAAC;AACF,MAAM,EAAE,GAAG,CAAC,OAAoB,EAAE,IAAiB,EAAE,IAAmC,EAA2B,EAAE;IACnH,KAAK,IAAI,EAAE,GAAuB,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa;QAAE,IAAI,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;IAC7G,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF,MAAM,KAAK,GAAG,CAAC,OAAoB,EAAE,E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AAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACpS,CAAC;IACH,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,0EAA0E,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,2CAA2C,GAAG,CAAC,CAAC;IAClL,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC;AAC9J,CAAC"}
|
|
@@ -18,6 +18,8 @@ export interface HeadlessInput {
|
|
|
18
18
|
}[];
|
|
19
19
|
/** The `https:` origins the host lists for a view's images (WorkerViewOptions.images). */
|
|
20
20
|
readonly imageOrigins?: readonly string[];
|
|
21
|
+
/** The `https:` origins the host lists for a view's links beyond what it was handed (WorkerViewOptions.links). */
|
|
22
|
+
readonly linkOrigins?: readonly string[];
|
|
21
23
|
/** The live host says where the app's own images live (WorkerViewOptions.asset): an image by that path is drawn. */
|
|
22
24
|
readonly assets?: boolean;
|
|
23
25
|
/** The app's page's origin, so the page's own address for one of its images is that image. */
|
|
@@ -31,13 +33,17 @@ export interface HeadlessInput {
|
|
|
31
33
|
readonly messages: number;
|
|
32
34
|
readonly pushMs: number;
|
|
33
35
|
};
|
|
36
|
+
/** Press what this selector matches, once it has drawn: the view hears the click as it would on a page (0.1.45). */
|
|
37
|
+
readonly press?: {
|
|
38
|
+
readonly selector: string;
|
|
39
|
+
};
|
|
34
40
|
}
|
|
35
41
|
/** What the view said, in order: every message the host would have heard. */
|
|
36
42
|
export interface HeadlessTranscript {
|
|
37
43
|
/** Each batch of Remote DOM mutation records it sent. */
|
|
38
44
|
readonly renders: readonly unknown[][];
|
|
39
|
-
/** Its
|
|
40
|
-
readonly
|
|
45
|
+
/** Its stylesheets, every one it gave, in order, as it gave them. */
|
|
46
|
+
readonly sheets?: readonly string[];
|
|
41
47
|
/** The acts it asked for from its code. Nothing is applied in a headless run. */
|
|
42
48
|
readonly asked: readonly {
|
|
43
49
|
readonly name: string;
|
|
@@ -64,6 +70,19 @@ export interface HeadlessTranscript {
|
|
|
64
70
|
readonly event: string;
|
|
65
71
|
readonly selector: string;
|
|
66
72
|
}[];
|
|
73
|
+
/**
|
|
74
|
+
* The press the run was asked to make (0.1.45): its selector, the id of
|
|
75
|
+
* the element it matched (none when it matched nothing), and how many
|
|
76
|
+
* acts asked, places gone to and batches drawn there were before it, so
|
|
77
|
+
* what came after is what the press did.
|
|
78
|
+
*/
|
|
79
|
+
readonly pressed?: {
|
|
80
|
+
readonly selector: string;
|
|
81
|
+
readonly target?: string;
|
|
82
|
+
readonly asked: number;
|
|
83
|
+
readonly went: number;
|
|
84
|
+
readonly renders: number;
|
|
85
|
+
};
|
|
67
86
|
}
|
|
68
87
|
/**
|
|
69
88
|
* Why a headless run says a view will not do: the live host's reasons
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/headless/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAYzD,kFAAkF;AAClF,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,wGAAwG;AACxG,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,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,GACP,OAAO,GACP,MAAM;AACR,oGAAoG;GAClG,KAAK;AACP,8FAA8F;GAC5F,SAAS,CAAC;AAEd,yEAAyE;AACzE,MAAM,MAAM,eAAe,GACvB;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,kGAAkG;IAClG,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;KAAE,CAAC;IAC7G,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;CAC5E,GACD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.generated.d.ts","sourceRoot":"","sources":["../../src/headless/runtime.generated.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.generated.d.ts","sourceRoot":"","sources":["../../src/headless/runtime.generated.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,EAAE,MAAy0jH,CAAC"}
|