@dexhq/canvas 0.14.0 → 0.15.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/CHANGELOG.md +36 -0
- package/README.md +5 -3
- package/app/canvas/activity.tsx +8 -15
- package/app/canvas/anchoring.ts +3 -5
- package/app/canvas/canvas-input.ts +151 -14
- package/app/canvas/canvas-keys.ts +9 -0
- package/app/canvas/canvas-model.ts +5 -42
- package/app/canvas/canvas-panels.ts +1 -17
- package/app/canvas/canvas-scene.ts +7 -3
- package/app/canvas/canvas-ui.ts +2 -1
- package/app/canvas/canvas.css +61 -26
- package/app/canvas/change-notice.tsx +10 -1
- package/app/canvas/comment-layer.tsx +2 -1
- package/app/canvas/comments.tsx +204 -82
- package/app/canvas/element-picker.ts +200 -27
- package/app/canvas/engine/canvas-gestures.ts +72 -17
- package/app/canvas/engine/canvas-store.ts +17 -1
- package/app/canvas/engine/engine.css +6 -3
- package/app/canvas/find-bar.tsx +817 -0
- package/app/canvas/find-model.ts +135 -0
- package/app/canvas/flow-canvas.tsx +18 -2
- package/app/canvas/follow-pin.ts +26 -6
- package/app/canvas/frame-node.tsx +9 -9
- package/app/canvas/imported-reviews.tsx +12 -22
- package/app/canvas/layout.ts +27 -0
- package/app/canvas/live-page.ts +142 -19
- package/app/canvas/page-find.ts +220 -0
- package/app/canvas/page-style.ts +23 -0
- package/app/canvas/section-node.tsx +2 -0
- package/app/canvas/spec-threads.ts +24 -23
- package/app/canvas/thread-focus.tsx +14 -12
- package/app/canvas/use-activity.ts +0 -8
- package/app/canvas/use-agent-changes.tsx +34 -40
- package/app/canvas/use-canvas-clipboard.tsx +11 -14
- package/app/canvas/xray.ts +3 -12
- package/app/frame.tsx +5 -0
- package/app/i18n/locales/en/messages.po +88 -8
- package/app/i18n/locales/en/messages.ts +1 -1
- package/app/i18n/locales/pseudo/messages.po +88 -8
- package/app/i18n/locales/pseudo/messages.ts +1 -1
- package/app/icons/glyphs.tsx +4 -0
- package/app/main.tsx +3 -0
- package/app/pages/canvas.tsx +27 -8
- package/app/pages/commands-settings.tsx +16 -2
- package/app/shell/feedback-form.tsx +10 -21
- package/app/shell/feedback-link.tsx +2 -1
- package/app/shell/scaled-frame.tsx +21 -9
- package/app/types.ts +21 -205
- package/app/ui/file-drop.ts +128 -0
- package/app/ui/shadcn/input-group.tsx +2 -2
- package/dist/cli/banner.d.mts +4 -2
- package/dist/cli/banner.mjs +34 -11
- package/dist/cli/commands/app.mjs +19 -11
- package/dist/cli/commands/hook.mjs +2 -1
- package/dist/config/project-files.d.mts +6 -0
- package/dist/config/project-files.mjs +14 -2
- package/dist/config/renamed.d.mts +0 -2
- package/dist/config/renamed.mjs +1 -3
- package/dist/content/capture.d.mts +2 -2
- package/dist/content/capture.mjs +2 -2
- package/dist/content/content.d.mts +3 -141
- package/dist/content/content.mjs +7 -62
- package/dist/content/flow-specs.mjs +1 -1
- package/dist/content/prototype-summary.d.mts +3 -39
- package/dist/content/prototype-summary.mjs +2 -3
- package/dist/content/prototypes.mjs +1 -1
- package/dist/content/text-replace.d.mts +30 -0
- package/dist/content/text-replace.mjs +309 -0
- package/dist/content/thread-module.mjs +1 -1
- package/dist/content/threads.mjs +1 -1
- package/dist/paste/paste.mjs +1 -1
- package/dist/paths.d.mts +0 -2
- package/dist/paths.mjs +1 -3
- package/dist/server/agent-env.d.mts +5 -1
- package/dist/server/agent-env.mjs +7 -2
- package/dist/server/agent-session.d.mts +14 -1
- package/dist/server/agent-session.mjs +84 -19
- package/dist/server/build-pictures.mjs +1 -1
- package/dist/server/channel.d.mts +13 -24
- package/dist/server/channel.mjs +55 -37
- package/dist/server/claimed-presence.d.mts +3 -2
- package/dist/server/claimed-presence.mjs +15 -7
- package/dist/server/close-check.mjs +2 -2
- package/dist/server/comments/actions.d.mts +153 -0
- package/dist/server/comments/actions.mjs +154 -0
- package/dist/server/comments/routes.d.mts +25 -0
- package/dist/server/comments/routes.mjs +88 -0
- package/dist/server/comments/tools.d.mts +6 -0
- package/dist/server/comments/tools.mjs +154 -0
- package/dist/server/dev-server.mjs +27 -13
- package/dist/server/file-lock.d.mts +2 -2
- package/dist/server/file-lock.mjs +130 -36
- package/dist/server/mcp.d.mts +0 -2
- package/dist/server/mcp.mjs +7 -8
- package/dist/server/me.d.mts +1 -1
- package/dist/server/open-page.d.mts +22 -0
- package/dist/server/open-page.mjs +20 -2
- package/dist/server/outcome.d.mts +22 -0
- package/dist/server/outcome.mjs +8 -0
- package/dist/server/own-copies.mjs +2 -2
- package/dist/server/people.d.mts +1 -1
- package/dist/server/port.d.mts +12 -0
- package/dist/server/port.mjs +66 -14
- package/dist/server/presence.d.mts +4 -1
- package/dist/server/presence.mjs +2 -2
- package/dist/server/requests.d.mts +5 -1
- package/dist/server/requests.mjs +33 -48
- package/dist/server/studio-for.d.mts +5 -0
- package/dist/server/studio-for.mjs +17 -3
- package/dist/server/sync-install.d.mts +8 -12
- package/dist/server/sync-install.mjs +12 -30
- package/dist/server/thread-source.mjs +2 -2
- package/dist/server/tools/describe.d.mts +1 -1
- package/dist/server/tools/describe.mjs +1 -1
- package/dist/server/tools/feedback.d.mts +1 -1
- package/dist/server/tools/reading.mjs +13 -4
- package/dist/server/tools/show.d.mts +1 -1
- package/dist/server/tools/snapshot.d.mts +1 -1
- package/dist/server/tools/thread-list.mjs +1 -1
- package/dist/server/tools/watch.mjs +5 -3
- package/dist/server/vite.mjs +2 -2
- package/dist/server/web-app.mjs +4 -7
- package/dist/server/work-groups.mjs +1 -1
- package/dist/setup/create.d.mts +4 -2
- package/dist/setup/create.mjs +67 -17
- package/dist/setup/design-system-checks.mjs +3 -12
- package/dist/setup/desktop-app-script.mjs +4 -3
- package/dist/setup/desktop-app-start.d.mts +8 -2
- package/dist/setup/desktop-app-start.mjs +64 -29
- package/dist/setup/desktop-app.d.mts +8 -0
- package/dist/setup/desktop-app.mjs +19 -3
- package/dist/setup/detect.d.mts +0 -2
- package/dist/setup/detect.mjs +1 -3
- package/dist/setup/doctor.mjs +1 -1
- package/dist/setup/migrate/row-titles.mjs +1 -1
- package/dist/setup/project.d.mts +6 -1
- package/dist/setup/project.mjs +9 -9
- package/dist/setup/starters.d.mts +2 -0
- package/dist/setup/starters.mjs +7 -1
- package/dist/shared/annotations-core.mjs +1 -1
- package/dist/shared/canvas-core.mjs +1 -1
- package/dist/shared/canvas-file.d.mts +201 -0
- package/dist/shared/canvas-file.mjs +1 -0
- package/dist/shared/comments/routes.d.mts +53 -0
- package/dist/shared/comments/routes.mjs +37 -0
- package/dist/shared/feedback.d.mts +8 -0
- package/dist/shared/feedback.mjs +10 -2
- package/dist/shared/page-review.d.mts +2 -11
- package/dist/shared/page-review.mjs +4 -13
- package/dist/shared/presence-core.d.mts +11 -0
- package/dist/shared/presence-core.mjs +11 -2
- package/dist/shared/review-file.d.mts +5 -0
- package/dist/shared/review-file.mjs +23 -13
- package/dist/shared/server-page.mjs +1 -1
- package/dist/shared/signup.d.mts +2 -5
- package/dist/shared/signup.mjs +2 -35
- package/dist/shared/studio-events.d.mts +0 -6
- package/dist/shared/studio-events.mjs +1 -5
- package/dist/shared/studio-files.d.mts +12 -0
- package/dist/shared/studio-files.mjs +6 -1
- package/dist/shared/studio-routes.d.mts +16 -62
- package/dist/shared/studio-routes.mjs +1 -69
- package/dist/shared/threads-core.d.mts +2 -2
- package/dist/shared/threads-core.mjs +1 -1
- package/extension/dist/feedback.js +148 -138
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/picker.js +146 -136
- package/package.json +2 -2
- package/src/cli/banner.ts +45 -11
- package/src/cli/commands/app.ts +23 -8
- package/src/cli/commands/hook.ts +4 -1
- package/src/config/project-files.ts +21 -6
- package/src/config/renamed.ts +0 -3
- package/src/content/capture.ts +6 -12
- package/src/content/content.ts +7 -241
- package/src/content/flow-specs.ts +2 -1
- package/src/content/prototype-summary.ts +4 -44
- package/src/content/review-pages.ts +2 -1
- package/src/content/text-replace.ts +449 -0
- package/src/paths.ts +0 -8
- package/src/server/agent-env.ts +12 -2
- package/src/server/agent-session.ts +124 -34
- package/src/server/channel.ts +94 -52
- package/src/server/claimed-presence.ts +26 -10
- package/src/server/comments/actions.ts +352 -0
- package/src/server/comments/routes.ts +176 -0
- package/src/server/comments/tools.ts +317 -0
- package/src/server/dev-server.ts +36 -15
- package/src/server/file-lock.ts +205 -54
- package/src/server/mcp.ts +13 -14
- package/src/server/me.ts +2 -5
- package/src/server/open-page.ts +54 -4
- package/src/server/outcome.ts +26 -0
- package/src/server/people.ts +2 -1
- package/src/server/port.ts +94 -20
- package/src/server/presence.ts +11 -3
- package/src/server/requests.ts +60 -70
- package/src/server/studio-for.ts +26 -2
- package/src/server/sync-install.ts +35 -26
- package/src/server/thread-place.ts +2 -4
- package/src/server/tools/reading.ts +16 -3
- package/src/server/tools/watch.ts +7 -7
- package/src/server/web-app.ts +11 -9
- package/src/setup/create.ts +91 -17
- package/src/setup/design-system-checks.ts +7 -15
- package/src/setup/desktop-app-script.ts +4 -3
- package/src/setup/desktop-app-start.ts +94 -26
- package/src/setup/desktop-app.ts +23 -2
- package/src/setup/detect.ts +0 -4
- package/src/setup/project.ts +9 -8
- package/src/setup/starters.ts +8 -1
- package/src/shared/canvas-file.ts +205 -0
- package/src/shared/comments/routes.ts +79 -0
- package/src/shared/feedback.ts +14 -4
- package/src/shared/page-review.ts +11 -16
- package/src/shared/presence-core.ts +16 -2
- package/src/shared/review-file.ts +28 -12
- package/src/shared/server-page.ts +2 -1
- package/src/shared/signup.ts +4 -28
- package/src/shared/studio-events.ts +0 -13
- package/src/shared/studio-files.ts +14 -0
- package/src/shared/studio-routes.ts +21 -64
- package/src/shared/threads-core.ts +2 -2
- package/dist/server/tools/close-reply.d.mts +0 -6
- package/dist/server/tools/close-reply.mjs +0 -138
- package/dist/server/tools/comment.d.mts +0 -6
- package/dist/server/tools/comment.mjs +0 -49
- package/src/server/tools/close-reply.ts +0 -271
- package/src/server/tools/comment.ts +0 -96
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/content/text-replace.d.ts
|
|
2
|
+
/** What a replacement did, and how to put it back. */
|
|
3
|
+
export interface Replaced {
|
|
4
|
+
/** The files changed, relative to the folder. */
|
|
5
|
+
files: string[];
|
|
6
|
+
/** Files left as they were: changed since they were read, or unwritable. */
|
|
7
|
+
left?: number;
|
|
8
|
+
/** How many places were changed. */
|
|
9
|
+
replaced: number;
|
|
10
|
+
/** Text found but not changed: the new words cannot be written there. */
|
|
11
|
+
skipped: number;
|
|
12
|
+
/** Puts it all back (undoReplace), while nothing has changed since. */
|
|
13
|
+
undo?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Change `find` to `to`, ignoring case, wherever the modules in `folder`
|
|
17
|
+
* write it as text that one of the `seen` texts (what the frames showed)
|
|
18
|
+
* holds. Each changed file can be put back with the `undo` it answers with.
|
|
19
|
+
*/
|
|
20
|
+
export declare function replaceText(folder: string, find: string, to: string, seen: readonly string[]): Promise<Replaced>;
|
|
21
|
+
/**
|
|
22
|
+
* Put back a replacement: each file it changed, unless it has changed again
|
|
23
|
+
* since, which keeps the newer change. Answers with the files put back and
|
|
24
|
+
* the ones left, relative to `folder`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function undoReplace(folder: string, undo: string): Promise<{
|
|
27
|
+
kept: string[];
|
|
28
|
+
restored: string[];
|
|
29
|
+
}>;
|
|
30
|
+
//#endregion
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { parseJsx } from "./jsx-source.mjs";
|
|
2
|
+
import { join, relative } from "node:path";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { readFile, readdir, writeFile } from "node:fs/promises";
|
|
5
|
+
//#region src/content/text-replace.ts
|
|
6
|
+
const SOURCE_RE = /\.(?:tsx|ts|jsx|js)$/;
|
|
7
|
+
const SKIPPED = /* @__PURE__ */ new Set([
|
|
8
|
+
"comments",
|
|
9
|
+
"docs",
|
|
10
|
+
"node_modules"
|
|
11
|
+
]);
|
|
12
|
+
const JSX_UNSAFE_RE = /[{}<>]/;
|
|
13
|
+
const SPACES_RE = /\s+/g;
|
|
14
|
+
const REGEX_CHARS_RE = /[.*+?^${}()|[\]\\]/g;
|
|
15
|
+
const MAX_LENGTH = 2e3;
|
|
16
|
+
/** How many replacements can still be put back, newest kept. */
|
|
17
|
+
const UNDO_KEPT = 20;
|
|
18
|
+
/** Calls whose strings are class names, or a module's path. */
|
|
19
|
+
const CODE_CALLS = /* @__PURE__ */ new Set([
|
|
20
|
+
"classNames",
|
|
21
|
+
"clsx",
|
|
22
|
+
"cn",
|
|
23
|
+
"cva",
|
|
24
|
+
"cx",
|
|
25
|
+
"require",
|
|
26
|
+
"tv",
|
|
27
|
+
"twMerge"
|
|
28
|
+
]);
|
|
29
|
+
/** Props whose strings say how something looks or works, not what it says. */
|
|
30
|
+
const CODE_PROPS = /* @__PURE__ */ new Set([
|
|
31
|
+
"as",
|
|
32
|
+
"className",
|
|
33
|
+
"class",
|
|
34
|
+
"href",
|
|
35
|
+
"htmlFor",
|
|
36
|
+
"icon",
|
|
37
|
+
"id",
|
|
38
|
+
"key",
|
|
39
|
+
"name",
|
|
40
|
+
"rel",
|
|
41
|
+
"role",
|
|
42
|
+
"size",
|
|
43
|
+
"src",
|
|
44
|
+
"style",
|
|
45
|
+
"target",
|
|
46
|
+
"type",
|
|
47
|
+
"variant"
|
|
48
|
+
]);
|
|
49
|
+
const COMPARISONS = /* @__PURE__ */ new Set([
|
|
50
|
+
"==",
|
|
51
|
+
"===",
|
|
52
|
+
"!=",
|
|
53
|
+
"!=="
|
|
54
|
+
]);
|
|
55
|
+
const undos = /* @__PURE__ */ new Map();
|
|
56
|
+
async function sourceFiles(dir) {
|
|
57
|
+
let entries;
|
|
58
|
+
try {
|
|
59
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
60
|
+
} catch {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const files = [];
|
|
64
|
+
for (const entry of entries) {
|
|
65
|
+
if (SKIPPED.has(entry.name) || entry.isSymbolicLink()) continue;
|
|
66
|
+
const path = join(dir, entry.name);
|
|
67
|
+
if (entry.isDirectory()) files.push(...await sourceFiles(path));
|
|
68
|
+
else if (SOURCE_RE.test(entry.name)) files.push(path);
|
|
69
|
+
}
|
|
70
|
+
return files;
|
|
71
|
+
}
|
|
72
|
+
const words = (text) => text.replace(SPACES_RE, " ").trim();
|
|
73
|
+
const isNode = (value) => typeof value === "object" && value !== null && typeof value.type === "string";
|
|
74
|
+
const calleeName = (node) => {
|
|
75
|
+
const callee = node.callee;
|
|
76
|
+
if (callee?.type === "Identifier") return callee.name;
|
|
77
|
+
};
|
|
78
|
+
/** An object property's name, when it is written as a name or a string. */
|
|
79
|
+
const keyName = (node) => {
|
|
80
|
+
const named = node.key;
|
|
81
|
+
if (named?.type === "Identifier") return named.name;
|
|
82
|
+
return named?.type === "StringLiteral" ? named.value : void 0;
|
|
83
|
+
};
|
|
84
|
+
const propName = (node) => {
|
|
85
|
+
const name = node.name;
|
|
86
|
+
return name?.type === "JSXIdentifier" ? name.name : void 0;
|
|
87
|
+
};
|
|
88
|
+
const CALLS = /* @__PURE__ */ new Set(["CallExpression", "NewExpression"]);
|
|
89
|
+
const FUNCTIONS = /* @__PURE__ */ new Set([
|
|
90
|
+
"ArrowFunctionExpression",
|
|
91
|
+
"FunctionDeclaration",
|
|
92
|
+
"FunctionExpression"
|
|
93
|
+
]);
|
|
94
|
+
/**
|
|
95
|
+
* What a call is given is the call's to read, not the page's words:
|
|
96
|
+
* useState("Save"), getItem(draft ? "Save" : "Old"), import("./save").
|
|
97
|
+
* A callback it is given is words again: what it renders shows.
|
|
98
|
+
*/
|
|
99
|
+
const givenToCall = (parent, key) => CALLS.has(parent.type) && key === "arguments";
|
|
100
|
+
/** Whether a string at this place in the tree is code, not words. */
|
|
101
|
+
const isCode = (parent, key) => {
|
|
102
|
+
if (parent.type.startsWith("TS")) return key !== "expression";
|
|
103
|
+
switch (parent.type) {
|
|
104
|
+
case "ImportDeclaration":
|
|
105
|
+
case "ImportExpression":
|
|
106
|
+
case "SwitchCase": return true;
|
|
107
|
+
case "ExportAllDeclaration":
|
|
108
|
+
case "ExportNamedDeclaration": return key === "source";
|
|
109
|
+
case "ObjectProperty": return key === "key" || CODE_PROPS.has(keyName(parent) ?? "");
|
|
110
|
+
case "ObjectMethod":
|
|
111
|
+
case "ClassProperty":
|
|
112
|
+
case "MemberExpression":
|
|
113
|
+
case "OptionalMemberExpression": return key === "key" || key === "property";
|
|
114
|
+
case "BinaryExpression": return COMPARISONS.has(parent.operator);
|
|
115
|
+
case "CallExpression": return CODE_CALLS.has(calleeName(parent) ?? "");
|
|
116
|
+
case "JSXAttribute": {
|
|
117
|
+
const name = propName(parent) ?? "";
|
|
118
|
+
return CODE_PROPS.has(name) || name.startsWith("data-") || name.startsWith("aria-");
|
|
119
|
+
}
|
|
120
|
+
default: return false;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
/** Every run of words in a module that is not code. */
|
|
124
|
+
function textRuns(code, filename) {
|
|
125
|
+
const program = parseJsx(code, filename);
|
|
126
|
+
if (!program) return [];
|
|
127
|
+
const runs = [];
|
|
128
|
+
const walk = (node, inCode) => {
|
|
129
|
+
for (const [key, value] of Object.entries(node)) {
|
|
130
|
+
if (key === "loc" || key === "extra" || key.endsWith("Comments")) continue;
|
|
131
|
+
for (const child of Array.isArray(value) ? value : [value]) if (isNode(child)) visit(child, node, key, inCode);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const visit = (node, parent, key, inCode) => {
|
|
135
|
+
let asCode = inCode || isCode(parent, key);
|
|
136
|
+
if (!asCode && givenToCall(parent, key)) asCode = "given";
|
|
137
|
+
if (asCode === "given" && FUNCTIONS.has(node.type)) asCode = false;
|
|
138
|
+
const { start, end } = node;
|
|
139
|
+
if (typeof start !== "number" || typeof end !== "number") {
|
|
140
|
+
walk(node, asCode);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (node.type === "JSXText") {
|
|
144
|
+
runs.push({
|
|
145
|
+
kind: "jsx",
|
|
146
|
+
part: false,
|
|
147
|
+
start,
|
|
148
|
+
end,
|
|
149
|
+
value: node.value
|
|
150
|
+
});
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (asCode) {
|
|
154
|
+
walk(node, asCode);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (node.type === "StringLiteral") {
|
|
158
|
+
const quote = code[start];
|
|
159
|
+
runs.push({
|
|
160
|
+
attribute: parent.type === "JSXAttribute",
|
|
161
|
+
kind: quote,
|
|
162
|
+
part: parent.type === "BinaryExpression",
|
|
163
|
+
start: start + 1,
|
|
164
|
+
end: end - 1,
|
|
165
|
+
value: node.value
|
|
166
|
+
});
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (node.type === "TemplateElement") {
|
|
170
|
+
const cooked = node.value?.cooked;
|
|
171
|
+
runs.push({
|
|
172
|
+
kind: "`",
|
|
173
|
+
part: true,
|
|
174
|
+
start,
|
|
175
|
+
end,
|
|
176
|
+
value: cooked ?? ""
|
|
177
|
+
});
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
walk(node, asCode);
|
|
181
|
+
};
|
|
182
|
+
walk(program, false);
|
|
183
|
+
return runs;
|
|
184
|
+
}
|
|
185
|
+
/** The new words as they must be written in a run, or undefined if they cannot. */
|
|
186
|
+
const written = ({ attribute, kind }, value) => {
|
|
187
|
+
if (kind === "jsx") return JSX_UNSAFE_RE.test(value) ? void 0 : value;
|
|
188
|
+
if (attribute) return value.includes(kind) ? void 0 : value;
|
|
189
|
+
const escaped = value.replaceAll("\\", "\\\\").replaceAll(kind, `\\${kind}`);
|
|
190
|
+
return kind === "`" ? escaped.replaceAll("${", "\\${") : escaped;
|
|
191
|
+
};
|
|
192
|
+
const finder = (find) => new RegExp(find.replace(REGEX_CHARS_RE, "\\$&"), "gi");
|
|
193
|
+
/** One module with `find` changed to `to` in its runs the pages showed. */
|
|
194
|
+
function replaceIn(code, filename, find, to, seen) {
|
|
195
|
+
const matches = finder(find);
|
|
196
|
+
let replaced = 0;
|
|
197
|
+
let skipped = 0;
|
|
198
|
+
let next = code;
|
|
199
|
+
const runs = textRuns(code, filename).filter(({ part, value }) => {
|
|
200
|
+
const said = words(value);
|
|
201
|
+
return said.search(matches) !== -1 && (part ? seen.some((text) => text.includes(said)) : seen.includes(said));
|
|
202
|
+
}).sort((a, b) => b.start - a.start);
|
|
203
|
+
for (const run of runs) {
|
|
204
|
+
const raw = code.slice(run.start, run.end);
|
|
205
|
+
const value = written(run, to);
|
|
206
|
+
const count = raw.match(finder(find))?.length ?? 0;
|
|
207
|
+
if (value === void 0) {
|
|
208
|
+
skipped += count;
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
if (count === 0) {
|
|
212
|
+
skipped += 1;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
next = next.slice(0, run.start) + raw.replace(finder(find), () => value) + next.slice(run.end);
|
|
216
|
+
replaced += count;
|
|
217
|
+
}
|
|
218
|
+
if (next !== code && !parseJsx(next, filename)) return {
|
|
219
|
+
next: code,
|
|
220
|
+
replaced: 0,
|
|
221
|
+
skipped: skipped + replaced
|
|
222
|
+
};
|
|
223
|
+
return {
|
|
224
|
+
next,
|
|
225
|
+
replaced,
|
|
226
|
+
skipped
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Change `find` to `to`, ignoring case, wherever the modules in `folder`
|
|
231
|
+
* write it as text that one of the `seen` texts (what the frames showed)
|
|
232
|
+
* holds. Each changed file can be put back with the `undo` it answers with.
|
|
233
|
+
*/
|
|
234
|
+
async function replaceText(folder, find, to, seen) {
|
|
235
|
+
const nothing = {
|
|
236
|
+
files: [],
|
|
237
|
+
replaced: 0,
|
|
238
|
+
skipped: 0
|
|
239
|
+
};
|
|
240
|
+
if (!find.trim() || find.length > MAX_LENGTH || to.length > MAX_LENGTH) return nothing;
|
|
241
|
+
const shown = seen.map(words);
|
|
242
|
+
const changed = [];
|
|
243
|
+
let skipped = 0;
|
|
244
|
+
for (const path of await sourceFiles(folder)) {
|
|
245
|
+
const before = await readFile(path, "utf8");
|
|
246
|
+
if (before.search(finder(find)) === -1) continue;
|
|
247
|
+
const result = replaceIn(before, path, find, to, shown);
|
|
248
|
+
skipped += result.skipped;
|
|
249
|
+
if (result.next !== before) changed.push({
|
|
250
|
+
path,
|
|
251
|
+
before,
|
|
252
|
+
after: result.next,
|
|
253
|
+
replaced: result.replaced
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const saved = [];
|
|
257
|
+
let replaced = 0;
|
|
258
|
+
for (const change of changed) try {
|
|
259
|
+
if (await readFile(change.path, "utf8") === change.before) {
|
|
260
|
+
await writeFile(change.path, change.after);
|
|
261
|
+
saved.push(change);
|
|
262
|
+
replaced += change.replaced ?? 0;
|
|
263
|
+
}
|
|
264
|
+
} catch {}
|
|
265
|
+
const left = changed.length - saved.length;
|
|
266
|
+
if (saved.length === 0) return {
|
|
267
|
+
...nothing,
|
|
268
|
+
skipped,
|
|
269
|
+
...left > 0 ? { left } : {}
|
|
270
|
+
};
|
|
271
|
+
const undo = randomUUID();
|
|
272
|
+
undos.set(undo, saved);
|
|
273
|
+
for (const old of undos.keys()) {
|
|
274
|
+
if (undos.size <= UNDO_KEPT) break;
|
|
275
|
+
undos.delete(old);
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
files: saved.map(({ path }) => relative(folder, path)),
|
|
279
|
+
...left > 0 ? { left } : {},
|
|
280
|
+
replaced,
|
|
281
|
+
skipped,
|
|
282
|
+
undo
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Put back a replacement: each file it changed, unless it has changed again
|
|
287
|
+
* since, which keeps the newer change. Answers with the files put back and
|
|
288
|
+
* the ones left, relative to `folder`.
|
|
289
|
+
*/
|
|
290
|
+
async function undoReplace(folder, undo) {
|
|
291
|
+
const changed = undos.get(undo) ?? [];
|
|
292
|
+
undos.delete(undo);
|
|
293
|
+
const restored = [];
|
|
294
|
+
const kept = [];
|
|
295
|
+
for (const { path, before, after } of changed) {
|
|
296
|
+
const now = await readFile(path, "utf8").catch(() => void 0);
|
|
297
|
+
const name = relative(folder, path);
|
|
298
|
+
if (now === after) {
|
|
299
|
+
await writeFile(path, before);
|
|
300
|
+
restored.push(name);
|
|
301
|
+
} else kept.push(name);
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
kept,
|
|
305
|
+
restored
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
export { replaceText, undoReplace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { splitPrototypeName } from "../shared/prototypes-core.mjs";
|
|
2
|
-
import { legacyFile, legacyNameOf } from "./prototypes.mjs";
|
|
3
2
|
import { AGENT_ACTIONS, agentChange, changeProblems, describeThread, statusFilter, threadProblems } from "../shared/threads-core.mjs";
|
|
3
|
+
import { legacyFile, legacyNameOf } from "./prototypes.mjs";
|
|
4
4
|
import { reviewFor } from "../shared/review-file.mjs";
|
|
5
5
|
import { fileStore, openStore } from "./store.mjs";
|
|
6
6
|
//#region src/content/thread-module.ts
|
package/dist/content/threads.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { THREAD_ID_RE, changeConflicts, changeThread, newThread } from "../shared/threads-core.mjs";
|
|
1
2
|
import { withLock } from "../server/file-lock.mjs";
|
|
2
3
|
import { prepareState, studioState } from "../server/state.mjs";
|
|
3
4
|
import { askForMerges } from "./merge-rules.mjs";
|
|
4
5
|
import { listPrototypes, prototypePaths } from "./prototypes.mjs";
|
|
5
|
-
import { THREAD_ID_RE, changeConflicts, changeThread, newThread } from "../shared/threads-core.mjs";
|
|
6
6
|
import { changeEvent, eventLine, foldEvents, parseEvents, snapshotEvent, startEvent } from "./comments-log.mjs";
|
|
7
7
|
import { reviewEvents } from "./review-import.mjs";
|
|
8
8
|
import { existsSync } from "node:fs";
|
package/dist/paste/paste.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { MAX_SIDE } from "../content/capture.mjs";
|
|
1
2
|
import { isSnapshotClipboard, snapshotFrom } from "../shared/snapshot-clipboard.mjs";
|
|
2
3
|
import { fontBringer } from "./fonts.mjs";
|
|
3
|
-
import { MAX_SIDE } from "../content/capture.mjs";
|
|
4
4
|
import { PASTED_IMAGE_TYPES } from "../shared/pasted-image.mjs";
|
|
5
5
|
import { imageDataUrl, withImages } from "../shared/snapshot-images.mjs";
|
|
6
6
|
import { isFigmaClipboard } from "./figma/decode.mjs";
|
package/dist/paths.d.mts
CHANGED
|
@@ -23,8 +23,6 @@ export declare const STUDIO_REACT: {
|
|
|
23
23
|
range: string;
|
|
24
24
|
major: number;
|
|
25
25
|
};
|
|
26
|
-
/** The range the studio asks of a peer dependency: "^2.1.10". */
|
|
27
|
-
export declare const studioPeer: (name: string) => string | undefined;
|
|
28
26
|
/**
|
|
29
27
|
* The highest major a version or range allows ("^18 || ^19" → 19), or
|
|
30
28
|
* undefined when it names none ("catalog:", "latest").
|
package/dist/paths.mjs
CHANGED
|
@@ -36,8 +36,6 @@ const STUDIO_REACT = (() => {
|
|
|
36
36
|
major: Number(range.match(MAJOR_RE)?.[0])
|
|
37
37
|
};
|
|
38
38
|
})();
|
|
39
|
-
/** The range the studio asks of a peer dependency: "^2.1.10". */
|
|
40
|
-
const studioPeer = (name) => JSON.parse(readFileSync(join(PACKAGE_ROOT, "package.json"), "utf8")).peerDependencies?.[name];
|
|
41
39
|
/**
|
|
42
40
|
* The highest major a version or range allows ("^18 || ^19" → 19), or
|
|
43
41
|
* undefined when it names none ("catalog:", "latest").
|
|
@@ -135,4 +133,4 @@ function installedDex(from, fallback) {
|
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
135
|
//#endregion
|
|
138
|
-
export { APP_DIR, EXTENSION_DIR, PACKAGE_NAME, PACKAGE_ROOT, STUDIO_REACT, TEMPLATES_DIR, compareVersions, highestMajor, installedBin, installedDex, isDirectory, isFile, isOlder, posix, readTemplate, runningVersion, shownFrom,
|
|
136
|
+
export { APP_DIR, EXTENSION_DIR, PACKAGE_NAME, PACKAGE_ROOT, STUDIO_REACT, TEMPLATES_DIR, compareVersions, highestMajor, installedBin, installedDex, isDirectory, isFile, isOlder, posix, readTemplate, runningVersion, shownFrom, studioVersion };
|
|
@@ -7,6 +7,10 @@ export declare const withoutAgentSession: (env: NodeJS.ProcessEnv) => NodeJS.Pro
|
|
|
7
7
|
* profile sets the rest, as in any new window. However the terminal app was
|
|
8
8
|
* started, even by an agent's session, nothing of that session reaches what
|
|
9
9
|
* runs. A shell of the same kind stays open once `command` ends.
|
|
10
|
+
*
|
|
11
|
+
* `runtime`, the Node running Dex, goes first on that shell's PATH: a
|
|
12
|
+
* profile may not put Node there at all (nvm loaded only in some shells),
|
|
13
|
+
* and `dex`, its hooks and its MCP server all run on it.
|
|
10
14
|
*/
|
|
11
|
-
export declare const inFreshShell: (command: string) => string;
|
|
15
|
+
export declare const inFreshShell: (command: string, runtime?: string) => string;
|
|
12
16
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dirname } from "node:path";
|
|
1
2
|
//#region src/server/agent-env.ts
|
|
2
3
|
const SESSION_MARKERS = [
|
|
3
4
|
"CLAUDECODE",
|
|
@@ -37,10 +38,14 @@ const quoted = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
|
37
38
|
* profile sets the rest, as in any new window. However the terminal app was
|
|
38
39
|
* started, even by an agent's session, nothing of that session reaches what
|
|
39
40
|
* runs. A shell of the same kind stays open once `command` ends.
|
|
41
|
+
*
|
|
42
|
+
* `runtime`, the Node running Dex, goes first on that shell's PATH: a
|
|
43
|
+
* profile may not put Node there at all (nvm loaded only in some shells),
|
|
44
|
+
* and `dex`, its hooks and its MCP server all run on it.
|
|
40
45
|
*/
|
|
41
|
-
const inFreshShell = (command) => {
|
|
46
|
+
const inFreshShell = (command, runtime = process.execPath) => {
|
|
42
47
|
const kept = KEPT_FOR_LOGIN.map((name) => `${name}="$${name}"`).join(" ");
|
|
43
|
-
const then = `${command}; exec "$SHELL" -l`;
|
|
48
|
+
const then = `${`export PATH=${quoted(dirname(runtime))}:"$PATH"`}; ${command}; exec "$SHELL" -l`;
|
|
44
49
|
return `exec /usr/bin/env -i ${kept} "$SHELL" -lic ${quoted(then)}`;
|
|
45
50
|
};
|
|
46
51
|
//#endregion
|
|
@@ -24,12 +24,18 @@ export declare const presenceTargetOf: (thread: ThreadWithPrototype) => Presence
|
|
|
24
24
|
* acting on `threads`. Presence is best effort: a mark that fails never
|
|
25
25
|
* fails the action.
|
|
26
26
|
*/
|
|
27
|
-
export declare function openAgentSession(root: string, threads: ThreadModule, { agent, id, presence }: {
|
|
27
|
+
export declare function openAgentSession(root: string, threads: ThreadModule, { agent, claudeSession, id, presence }: {
|
|
28
28
|
agent: () => string;
|
|
29
|
+
/**
|
|
30
|
+
* The Claude Code session it serves, when it does: Claude's hook marks
|
|
31
|
+
* that agent's edits under its id.
|
|
32
|
+
*/
|
|
33
|
+
claudeSession?: string;
|
|
29
34
|
id?: string;
|
|
30
35
|
presence?: SessionPresence;
|
|
31
36
|
}): {
|
|
32
37
|
id: string;
|
|
38
|
+
marksUnder: string[];
|
|
33
39
|
act: (threadId: string, action: UnsignedAction) => Promise<ThreadAnswer | undefined>;
|
|
34
40
|
/**
|
|
35
41
|
* Claim a thread for this session: it is acknowledged (👀), and the
|
|
@@ -44,6 +50,13 @@ export declare function openAgentSession(root: string, threads: ThreadModule, {
|
|
|
44
50
|
adopt: (threadIds: string[]) => void;
|
|
45
51
|
/** The threads the session holds now, for the server after this one. */
|
|
46
52
|
holding: () => string[];
|
|
53
|
+
/**
|
|
54
|
+
* The agent waits for work (`watch`): holding none, it is at work
|
|
55
|
+
* nowhere, as when its turn ends, so nothing it marked shows. Holding
|
|
56
|
+
* some, its marks stay with them. A comment a person closed or answered
|
|
57
|
+
* while it held it is no longer its own, and counts for none.
|
|
58
|
+
*/
|
|
59
|
+
waits: () => Promise<void>;
|
|
47
60
|
/** Hear how many threads the session holds, each time that changes. */
|
|
48
61
|
onHoldingChange: (listener: (count: number) => void) => void;
|
|
49
62
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { claimOf } from "../shared/threads-core.mjs";
|
|
1
2
|
import { openPresence } from "./presence.mjs";
|
|
2
3
|
import { randomUUID } from "node:crypto";
|
|
3
4
|
//#region src/server/agent-session.ts
|
|
@@ -34,17 +35,19 @@ const presenceTargetOf = (thread) => {
|
|
|
34
35
|
* acting on `threads`. Presence is best effort: a mark that fails never
|
|
35
36
|
* fails the action.
|
|
36
37
|
*/
|
|
37
|
-
function openAgentSession(root, threads, { agent, id = newSessionId(), presence = openPresence(root) }) {
|
|
38
|
-
/**
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
function openAgentSession(root, threads, { agent, claudeSession, id = newSessionId(), presence = openPresence(root) }) {
|
|
39
|
+
/** Whom its marks are under: itself, and the Claude Code session it serves. */
|
|
40
|
+
const marksUnder = claudeSession && claudeSession !== id ? [id, claudeSession] : [id];
|
|
41
|
+
/**
|
|
42
|
+
* Clear its marks, its sub-agents' too, on one view or doc or everywhere.
|
|
43
|
+
* Presence only shows the work: a clear that fails changes nothing, and
|
|
44
|
+
* marks expire.
|
|
45
|
+
*/
|
|
46
|
+
const clearMarks = async (where) => {
|
|
47
|
+
await Promise.allSettled(marksUnder.map((within) => presence.clear({
|
|
48
|
+
...where,
|
|
49
|
+
within
|
|
50
|
+
})));
|
|
48
51
|
};
|
|
49
52
|
/** Threads this session claimed and has not yet closed or answered. */
|
|
50
53
|
const held = /* @__PURE__ */ new Set();
|
|
@@ -58,6 +61,53 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
58
61
|
};
|
|
59
62
|
/** Given to another server (mcp-handover.ts): this one lets go of nothing. */
|
|
60
63
|
let handedOver = false;
|
|
64
|
+
/** Where each thread it holds is on the canvas, once it has looked. */
|
|
65
|
+
const places = /* @__PURE__ */ new Map();
|
|
66
|
+
const placeOf = async (threadId) => {
|
|
67
|
+
if (!places.has(threadId)) {
|
|
68
|
+
const thread = await threads.find(threadId);
|
|
69
|
+
places.set(threadId, thread && presenceTargetOf(thread));
|
|
70
|
+
}
|
|
71
|
+
return places.get(threadId);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Let go of the threads it holds that a person closed or answered since
|
|
75
|
+
* it claimed them, which are no longer its own. One claimed meanwhile
|
|
76
|
+
* stays held.
|
|
77
|
+
*/
|
|
78
|
+
const letGoOfClosed = async () => {
|
|
79
|
+
const ids = [...held];
|
|
80
|
+
if (ids.length === 0) return;
|
|
81
|
+
const own = new Set((await threads.list({ status: "acknowledged" })).filter((thread) => claimOf(thread)?.session === id).map((thread) => thread.id));
|
|
82
|
+
const closed = ids.filter((each) => !own.has(each));
|
|
83
|
+
if (closed.length > 0) holdingChange(() => {
|
|
84
|
+
for (const each of closed) {
|
|
85
|
+
held.delete(each);
|
|
86
|
+
places.delete(each);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
/** Whether it holds a thread on `where`, as far as it knows. */
|
|
91
|
+
const holdsOn = async (where) => (await Promise.all([...held].map(placeOf))).some((on) => on?.slug === where.slug && on.target === where.target);
|
|
92
|
+
/**
|
|
93
|
+
* Its work on `thread` (or on nothing, waiting) is over: the thread's view
|
|
94
|
+
* shows nobody at work for it, unless it holds another there, and once
|
|
95
|
+
* it holds nothing, nothing it marked does (the file's shared code, other
|
|
96
|
+
* views it changed on the way). What it holds is looked at again first
|
|
97
|
+
* with `recheck`, or when another it holds would keep the view's marks,
|
|
98
|
+
* as a person may have closed it meanwhile. Handed over, its marks are
|
|
99
|
+
* the next server's.
|
|
100
|
+
*/
|
|
101
|
+
const workEnded = async (thread, recheck) => {
|
|
102
|
+
if (handedOver) return;
|
|
103
|
+
const where = thread && presenceTargetOf(thread);
|
|
104
|
+
if (recheck || where && await holdsOn(where)) await letGoOfClosed().catch(() => void 0);
|
|
105
|
+
if (held.size === 0) {
|
|
106
|
+
await clearMarks();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (where && !await holdsOn(where)) await clearMarks(where);
|
|
110
|
+
};
|
|
61
111
|
/**
|
|
62
112
|
* An action on a thread, signed by this session: the thread after it, the
|
|
63
113
|
* problems that stopped it, or undefined when there is no such thread.
|
|
@@ -68,12 +118,17 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
68
118
|
author: agent(),
|
|
69
119
|
session: id
|
|
70
120
|
});
|
|
71
|
-
if (answer?.thread
|
|
72
|
-
|
|
121
|
+
if (action.action === "release" || Boolean(answer?.thread && LETS_GO.has(action.action))) {
|
|
122
|
+
const finished = held.has(threadId);
|
|
123
|
+
holdingChange(() => held.delete(threadId));
|
|
124
|
+
places.delete(threadId);
|
|
125
|
+
await workEnded(answer?.thread, finished).catch(() => void 0);
|
|
126
|
+
}
|
|
73
127
|
return answer;
|
|
74
128
|
};
|
|
75
129
|
return {
|
|
76
130
|
id,
|
|
131
|
+
marksUnder,
|
|
77
132
|
act,
|
|
78
133
|
/**
|
|
79
134
|
* Claim a thread for this session: it is acknowledged (👀), and the
|
|
@@ -82,7 +137,10 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
82
137
|
*/
|
|
83
138
|
claim: async (threadId) => {
|
|
84
139
|
const answer = await act(threadId, { action: "acknowledge" });
|
|
85
|
-
if (answer?.thread)
|
|
140
|
+
if (answer?.thread) {
|
|
141
|
+
places.set(threadId, presenceTargetOf(answer.thread));
|
|
142
|
+
holdingChange(() => held.add(threadId));
|
|
143
|
+
}
|
|
86
144
|
return answer;
|
|
87
145
|
},
|
|
88
146
|
/**
|
|
@@ -96,6 +154,13 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
96
154
|
},
|
|
97
155
|
/** The threads the session holds now, for the server after this one. */
|
|
98
156
|
holding: () => [...held],
|
|
157
|
+
/**
|
|
158
|
+
* The agent waits for work (`watch`): holding none, it is at work
|
|
159
|
+
* nowhere, as when its turn ends, so nothing it marked shows. Holding
|
|
160
|
+
* some, its marks stay with them. A comment a person closed or answered
|
|
161
|
+
* while it held it is no longer its own, and counts for none.
|
|
162
|
+
*/
|
|
163
|
+
waits: () => workEnded(void 0, true).catch(() => void 0),
|
|
99
164
|
/** Hear how many threads the session holds, each time that changes. */
|
|
100
165
|
onHoldingChange: (listener) => {
|
|
101
166
|
holdingListeners.add(listener);
|
|
@@ -108,7 +173,10 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
108
173
|
handOver: (given) => {
|
|
109
174
|
handedOver = true;
|
|
110
175
|
holdingChange(() => {
|
|
111
|
-
for (const threadId of given)
|
|
176
|
+
for (const threadId of given) {
|
|
177
|
+
held.delete(threadId);
|
|
178
|
+
places.delete(threadId);
|
|
179
|
+
}
|
|
112
180
|
});
|
|
113
181
|
},
|
|
114
182
|
/**
|
|
@@ -120,10 +188,7 @@ function openAgentSession(root, threads, { agent, id = newSessionId(), presence
|
|
|
120
188
|
const unfinished = [...held];
|
|
121
189
|
holdingChange(() => held.clear());
|
|
122
190
|
await Promise.allSettled(unfinished.map((threadId) => act(threadId, { action: "release" })));
|
|
123
|
-
if (handedOver)
|
|
124
|
-
try {
|
|
125
|
-
await presence.clear({ session: id });
|
|
126
|
-
} catch {}
|
|
191
|
+
if (!handedOver) await clearMarks();
|
|
127
192
|
}
|
|
128
193
|
};
|
|
129
194
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { prototypePage } from "../shared/prototypes-core.mjs";
|
|
2
|
-
import { listPrototypes } from "../content/prototypes.mjs";
|
|
3
2
|
import { canvasFrames, kinded, viewFramePage } from "../shared/canvas-core.mjs";
|
|
3
|
+
import { listPrototypes } from "../content/prototypes.mjs";
|
|
4
4
|
import { contentType } from "./content-type.mjs";
|
|
5
5
|
import { readCanvas } from "../content/content.mjs";
|
|
6
6
|
import { INSTALL_BROWSER, browserInstalled, closeScreenshotBrowser, pictureOfFrame } from "../content/screenshot.mjs";
|