@12ui/design 0.2.93 → 0.2.94
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/SKILL.md +1 -1
- package/dist/cli-workspace-command.d.ts.map +1 -1
- package/dist/cli-workspace-command.js +3 -0
- package/dist/cli-workspace-command.js.map +1 -1
- package/dist/mcp-slate-tools.d.ts +8 -1
- package/dist/mcp-slate-tools.d.ts.map +1 -1
- package/dist/mcp-slate-tools.js +67 -35
- package/dist/mcp-slate-tools.js.map +1 -1
- package/dist/mcp-slate-ui-script-inspiration-gallery.d.ts +4 -2
- package/dist/mcp-slate-ui-script-inspiration-gallery.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script-inspiration-gallery.js +21 -3
- package/dist/mcp-slate-ui-script-inspiration-gallery.js.map +1 -1
- package/dist/mcp-slate-ui-script-loading.d.ts +11 -0
- package/dist/mcp-slate-ui-script-loading.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-loading.js +19 -0
- package/dist/mcp-slate-ui-script-loading.js.map +1 -0
- package/dist/mcp-slate-ui-script-references.d.ts +7 -2
- package/dist/mcp-slate-ui-script-references.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script-references.js +16 -5
- package/dist/mcp-slate-ui-script-references.js.map +1 -1
- package/dist/mcp-slate-ui-script-state.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script-state.js +3 -1
- package/dist/mcp-slate-ui-script-state.js.map +1 -1
- package/dist/mcp-slate-ui-script.d.ts +1 -1
- package/dist/mcp-slate-ui-script.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script.js +2 -0
- package/dist/mcp-slate-ui-script.js.map +1 -1
- package/dist/mcp-slate-ui-styles-loading-effects.d.ts +14 -0
- package/dist/mcp-slate-ui-styles-loading-effects.d.ts.map +1 -0
- package/dist/mcp-slate-ui-styles-loading-effects.js +67 -0
- package/dist/mcp-slate-ui-styles-loading-effects.js.map +1 -0
- package/dist/mcp-slate-ui-styles-loading.d.ts +11 -4
- package/dist/mcp-slate-ui-styles-loading.d.ts.map +1 -1
- package/dist/mcp-slate-ui-styles-loading.js +17 -14
- package/dist/mcp-slate-ui-styles-loading.js.map +1 -1
- package/dist/mcp-slate-workspace-tools.js +2 -2
- package/dist/mcp-slate-workspace-tools.js.map +1 -1
- package/dist/prototype-browsers.d.ts +8 -2
- package/dist/prototype-browsers.d.ts.map +1 -1
- package/dist/prototype-browsers.js +11 -5
- package/dist/prototype-browsers.js.map +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/slate-site-gathering.d.ts +13 -0
- package/dist/slate-site-gathering.d.ts.map +1 -0
- package/dist/slate-site-gathering.js +21 -0
- package/dist/slate-site-gathering.js.map +1 -0
- package/dist/slate-site-references-capture.d.ts +25 -4
- package/dist/slate-site-references-capture.d.ts.map +1 -1
- package/dist/slate-site-references-capture.js +66 -22
- package/dist/slate-site-references-capture.js.map +1 -1
- package/dist/slate-site-references-client.d.ts +3 -1
- package/dist/slate-site-references-client.d.ts.map +1 -1
- package/dist/slate-site-references-client.js +2 -0
- package/dist/slate-site-references-client.js.map +1 -1
- package/dist/slate-site-references-local.d.ts +9 -3
- package/dist/slate-site-references-local.d.ts.map +1 -1
- package/dist/slate-site-references-local.js +42 -17
- package/dist/slate-site-references-local.js.map +1 -1
- package/dist/slate-site-references.d.ts +24 -4
- package/dist/slate-site-references.d.ts.map +1 -1
- package/dist/slate-site-references.js +104 -20
- package/dist/slate-site-references.js.map +1 -1
- package/dist/slate-view-contract.d.ts +11 -0
- package/dist/slate-view-contract.d.ts.map +1 -1
- package/dist/slate-view.d.ts +7 -0
- package/dist/slate-view.d.ts.map +1 -1
- package/dist/slate-view.js +18 -2
- package/dist/slate-view.js.map +1 -1
- package/dist/slate-workspace-parse.d.ts.map +1 -1
- package/dist/slate-workspace-parse.js +1 -0
- package/dist/slate-workspace-parse.js.map +1 -1
- package/dist/slate-workspace-types.d.ts +2 -0
- package/dist/slate-workspace-types.d.ts.map +1 -1
- package/open-design.json +2 -2
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -23,7 +23,7 @@ candidates.
|
|
|
23
23
|
Use `12ui` when it is available on `PATH`. Otherwise invoke the pinned CLI that
|
|
24
24
|
the plugin's `open-design.json` MCP entry uses:
|
|
25
25
|
|
|
26
|
-
npx -y @12ui/design@0.2.
|
|
26
|
+
npx -y @12ui/design@0.2.94 <command> ...
|
|
27
27
|
|
|
28
28
|
Run `12ui auth status --json` (or its pinned `npx` equivalent) first. A desktop user can authenticate with `12ui auth login`; a headless
|
|
29
29
|
run supplies `TWELVE_UI_API_KEY`. Never put a credential into project files,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-workspace-command.d.ts","sourceRoot":"","sources":["../src/cli-workspace-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ5E,OAAO,EAAE,uBAAuB,EAA2B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-workspace-command.d.ts","sourceRoot":"","sources":["../src/cli-workspace-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ5E,OAAO,EAAE,uBAAuB,EAA2B,MAAM,2BAA2B,CAAC;AAI7F;;;;;;;;;GASG;AAEH,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,CAAC,EAAE,OAAO,uBAAuB,CAAC;IACvC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM;QAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAChE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAClD,CAAC;AAwCF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,SAAS,MAAM,EAAE,EAC1B,OAAO,QAAQ,EACf,eAAc,4BAAiC,KAC9C,OAAO,CAAC,IAAI,CA8Cd,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { findLatestSlateRunDir } from './mcp-slate-latest.js';
|
|
|
7
7
|
import { resolveSlateRunDir } from './mcp-slate-run.js';
|
|
8
8
|
import { startSlateBrowserServer } from './slate-browser-server.js';
|
|
9
9
|
import { lazyCorpus } from './slate-corpus.js';
|
|
10
|
+
import { startLocalTabs } from './slate-site-references-local.js';
|
|
10
11
|
const ALLOWED_FLAGS = new Set(['wait', 'no-open', 'latest', 'port', 'origin', 'api-key']);
|
|
11
12
|
const stopSignals = () => {
|
|
12
13
|
let release = () => undefined;
|
|
@@ -67,6 +68,8 @@ export const runWorkspaceCommand = async (command, flags, dependencies = {}) =>
|
|
|
67
68
|
context: {
|
|
68
69
|
cwd: process.cwd(),
|
|
69
70
|
corpus: lazyCorpus(() => readCorpusConfig({ origin: stringFlag(flags, 'origin'), apiKey: stringFlag(flags, 'api-key') })),
|
|
71
|
+
// The page's first show starts the References tab's websites, as under `12ui mcp`.
|
|
72
|
+
gatherReferences: startLocalTabs,
|
|
70
73
|
},
|
|
71
74
|
onDecision: (decision) => { if (wait)
|
|
72
75
|
settle(decision);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-workspace-command.js","sourceRoot":"","sources":["../src/cli-workspace-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAA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C;YACd,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,MAAM,OAAO,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -3,6 +3,13 @@ import { type SlateToolContext } from './slate-runtime.js';
|
|
|
3
3
|
export { SLATE_TOOL_DEFINITIONS } from './mcp-slate-tool-defs.js';
|
|
4
4
|
export type { SlateToolContext } from './slate-runtime.js';
|
|
5
5
|
export declare const isSlateTool: (name: string) => boolean;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The runtime is built once per server: its readiness answer and corpus client are cached for the session.
|
|
8
|
+
*
|
|
9
|
+
* The References tab's websites are gathered in the background once per workspace per server, from the earliest call
|
|
10
|
+
* that names the workspace on its screen: the screen being shown (show, open) or, for a screen the host put back without
|
|
11
|
+
* a show call (a thread reopened after the server restarted), the person's first use of its Inspiration tool. So the
|
|
12
|
+
* sites are already landing when the person clicks across to References. The agent's data read starts nothing.
|
|
13
|
+
*/
|
|
7
14
|
export declare const createSlateToolHandler: (context?: SlateToolContext) => (name: string, argumentsValue: unknown) => Promise<CallToolResult>;
|
|
8
15
|
//# sourceMappingURL=mcp-slate-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-tools.d.ts","sourceRoot":"","sources":["../src/mcp-slate-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-slate-tools.d.ts","sourceRoot":"","sources":["../src/mcp-slate-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AA+BzE,OAAO,EAA0C,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAInG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,OAE1C,CAAC;AAUF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAS,gBAAqB,MAgDrD,MAAM,MAAM,EAAE,gBAAgB,OAAO,KAAG,OAAO,CAAC,cAAc,CAQ7E,CAAC"}
|
package/dist/mcp-slate-tools.js
CHANGED
|
@@ -1,48 +1,80 @@
|
|
|
1
1
|
import { SLATE_DATA_TOOL, SLATE_HANDOFF_TOOL, SLATE_IMAGE_TOOL, SLATE_INSPIRATION_TOOL, SLATE_INSPIRE_TOOL, SLATE_OPEN_TOOL, SLATE_PICK_TOOL, SLATE_REFERENCE_TOOL, SLATE_RESUME_TOOL, SLATE_RUN_TOOL, SLATE_SHOW_TOOL, SLATE_STATUS_TOOL, SLATE_TOOL_NAMES, } from './mcp-slate-names.js';
|
|
2
2
|
import { handoffResult, imageResult, inspirationResult, inspireResult, openWorkspace, pickResult, referenceResult, resumeResult, runResult, showWorkspace, statusResult, } from './mcp-slate-workspace-tools.js';
|
|
3
|
+
import { resolveSlateRunDir } from './mcp-slate-run.js';
|
|
3
4
|
import { errorResult, inputRecord, slateRuntime } from './slate-runtime.js';
|
|
5
|
+
import { withGathering } from './slate-view.js';
|
|
4
6
|
export { SLATE_TOOL_DEFINITIONS } from './mcp-slate-tool-defs.js';
|
|
5
7
|
export const isSlateTool = (name) => (SLATE_TOOL_NAMES.includes(name));
|
|
6
|
-
/** The
|
|
8
|
+
/** The screen's calls on its Inspiration tool: the person searching, choosing references, or the tab showing their pictures. */
|
|
9
|
+
const INSPIRATION_TOOLS = new Set([SLATE_INSPIRE_TOOL, SLATE_INSPIRATION_TOOL, SLATE_REFERENCE_TOOL]);
|
|
10
|
+
const viewRunDir = (result) => {
|
|
11
|
+
const runDir = result.structuredContent?.runDir;
|
|
12
|
+
return typeof runDir === 'string' && runDir ? runDir : null;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The runtime is built once per server: its readiness answer and corpus client are cached for the session.
|
|
16
|
+
*
|
|
17
|
+
* The References tab's websites are gathered in the background once per workspace per server, from the earliest call
|
|
18
|
+
* that names the workspace on its screen: the screen being shown (show, open) or, for a screen the host put back without
|
|
19
|
+
* a show call (a thread reopened after the server restarted), the person's first use of its Inspiration tool. So the
|
|
20
|
+
* sites are already landing when the person clicks across to References. The agent's data read starts nothing.
|
|
21
|
+
*/
|
|
7
22
|
export const createSlateToolHandler = (context = {}) => {
|
|
8
23
|
const runtime = slateRuntime(context);
|
|
24
|
+
const gathered = new Set();
|
|
25
|
+
const gatherOnce = (root) => {
|
|
26
|
+
if (root === null || gathered.has(root))
|
|
27
|
+
return;
|
|
28
|
+
gathered.add(root);
|
|
29
|
+
runtime.gatherReferences(root);
|
|
30
|
+
};
|
|
31
|
+
/** Starts the gather a call calls for; a show or open view built just before it started says it runs. */
|
|
32
|
+
const gatherFor = async (name, input, result) => {
|
|
33
|
+
if (result.isError)
|
|
34
|
+
return result;
|
|
35
|
+
if (name === SLATE_SHOW_TOOL || name === SLATE_OPEN_TOOL) {
|
|
36
|
+
gatherOnce(viewRunDir(result));
|
|
37
|
+
if (viewRunDir(result) === null)
|
|
38
|
+
return result;
|
|
39
|
+
return { ...result, structuredContent: withGathering(result.structuredContent) };
|
|
40
|
+
}
|
|
41
|
+
if (INSPIRATION_TOOLS.has(name))
|
|
42
|
+
gatherOnce(await resolveSlateRunDir(input.runDir).catch(() => null));
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
const dispatch = async (name, input) => {
|
|
46
|
+
switch (name) {
|
|
47
|
+
case SLATE_SHOW_TOOL:
|
|
48
|
+
case SLATE_DATA_TOOL:
|
|
49
|
+
return await showWorkspace(input, runtime);
|
|
50
|
+
case SLATE_OPEN_TOOL:
|
|
51
|
+
return await openWorkspace(runtime);
|
|
52
|
+
case SLATE_IMAGE_TOOL:
|
|
53
|
+
return await imageResult(input, runtime);
|
|
54
|
+
case SLATE_REFERENCE_TOOL:
|
|
55
|
+
return await referenceResult(input, runtime);
|
|
56
|
+
case SLATE_INSPIRE_TOOL:
|
|
57
|
+
return await inspireResult(input, runtime);
|
|
58
|
+
case SLATE_INSPIRATION_TOOL:
|
|
59
|
+
return await inspirationResult(input, runtime);
|
|
60
|
+
case SLATE_PICK_TOOL:
|
|
61
|
+
return await pickResult(input, runtime);
|
|
62
|
+
case SLATE_HANDOFF_TOOL:
|
|
63
|
+
return await handoffResult(input, runtime);
|
|
64
|
+
case SLATE_STATUS_TOOL:
|
|
65
|
+
return await statusResult(input, runtime);
|
|
66
|
+
case SLATE_RUN_TOOL:
|
|
67
|
+
return await runResult(input, runtime);
|
|
68
|
+
case SLATE_RESUME_TOOL:
|
|
69
|
+
return await resumeResult(input, runtime);
|
|
70
|
+
default:
|
|
71
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
9
74
|
return async (name, argumentsValue) => {
|
|
10
75
|
try {
|
|
11
76
|
const input = inputRecord(argumentsValue);
|
|
12
|
-
|
|
13
|
-
case SLATE_SHOW_TOOL: {
|
|
14
|
-
// The screen is being shown: its References tab's websites are gathered (once per workspace and server).
|
|
15
|
-
const shown = await showWorkspace(input, runtime);
|
|
16
|
-
const runDir = shown.structuredContent?.runDir;
|
|
17
|
-
if (typeof runDir === 'string' && runDir)
|
|
18
|
-
runtime.gatherReferences(runDir);
|
|
19
|
-
return shown;
|
|
20
|
-
}
|
|
21
|
-
case SLATE_DATA_TOOL:
|
|
22
|
-
return await showWorkspace(input, runtime);
|
|
23
|
-
case SLATE_OPEN_TOOL:
|
|
24
|
-
return await openWorkspace(runtime);
|
|
25
|
-
case SLATE_IMAGE_TOOL:
|
|
26
|
-
return await imageResult(input, runtime);
|
|
27
|
-
case SLATE_REFERENCE_TOOL:
|
|
28
|
-
return await referenceResult(input, runtime);
|
|
29
|
-
case SLATE_INSPIRE_TOOL:
|
|
30
|
-
return await inspireResult(input, runtime);
|
|
31
|
-
case SLATE_INSPIRATION_TOOL:
|
|
32
|
-
return await inspirationResult(input, runtime);
|
|
33
|
-
case SLATE_PICK_TOOL:
|
|
34
|
-
return await pickResult(input, runtime);
|
|
35
|
-
case SLATE_HANDOFF_TOOL:
|
|
36
|
-
return await handoffResult(input, runtime);
|
|
37
|
-
case SLATE_STATUS_TOOL:
|
|
38
|
-
return await statusResult(input, runtime);
|
|
39
|
-
case SLATE_RUN_TOOL:
|
|
40
|
-
return await runResult(input, runtime);
|
|
41
|
-
case SLATE_RESUME_TOOL:
|
|
42
|
-
return await resumeResult(input, runtime);
|
|
43
|
-
default:
|
|
44
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
45
|
-
}
|
|
77
|
+
return await gatherFor(name, input, await dispatch(name, input));
|
|
46
78
|
}
|
|
47
79
|
catch (error) {
|
|
48
80
|
return errorResult(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-tools.js","sourceRoot":"","sources":["../src/mcp-slate-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAyB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-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CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `createGallery({ where, root, isSelected, onToggle })` returns `{ node, set(key, items), sync(), layout() }`.
|
|
5
5
|
*
|
|
6
|
-
* - An item is `{ id, label, thumbUrl, imageUrl, title?, sourceUrl?, srcset?, width?, height?, aspect?, load?, pending? }`:
|
|
6
|
+
* - An item is `{ id, label, thumbUrl, imageUrl, title?, sourceUrl?, srcset?, width?, height?, aspect?, load?, pending?, picture? }`:
|
|
7
7
|
* `thumbUrl` for the tile and `imageUrl` for the large view (and the hover peek), straight from their origin (`srcset`
|
|
8
8
|
* lets the browser pick by the tile's laid-out width); `load(img, size)` fills a picture another way when there is no
|
|
9
9
|
* URL. A `pending` item has no picture yet: its tile is the loading surface and cannot be selected.
|
|
10
10
|
* - `caption: true` puts the item's title and its site's domain (a link to the live page) under each picture.
|
|
11
11
|
* - `set(key, items)`: a new key is a new list (the tiles are built again from the top); the same key with a longer
|
|
12
12
|
* list only adds what is new at the end, and refills in place a tile whose item stopped being `pending` (a reference
|
|
13
|
-
* site whose screenshot landed)
|
|
13
|
+
* site whose screenshot landed), and swaps in place the picture of a tile whose `picture` key changed (a site's
|
|
14
|
+
* settled frame): the old picture stays until the new one has loaded, so the tile never flashes empty; a list whose
|
|
15
|
+
* shown part changed otherwise is built again. The first page shows at once and the next page appears as the person nears
|
|
14
16
|
* the end of the grid (an IntersectionObserver on a marker after the last block, under `root()`, the element that
|
|
15
17
|
* scrolls the grid, or the window), until the list ends. Each page is its own collage block, so nothing already on
|
|
16
18
|
* screen ever moves: not on a click, not when a page is added.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-inspiration-gallery.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration-gallery.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-inspiration-gallery.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration-gallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,4BAA4B,QA4PxC,CAAC"}
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `createGallery({ where, root, isSelected, onToggle })` returns `{ node, set(key, items), sync(), layout() }`.
|
|
5
5
|
*
|
|
6
|
-
* - An item is `{ id, label, thumbUrl, imageUrl, title?, sourceUrl?, srcset?, width?, height?, aspect?, load?, pending? }`:
|
|
6
|
+
* - An item is `{ id, label, thumbUrl, imageUrl, title?, sourceUrl?, srcset?, width?, height?, aspect?, load?, pending?, picture? }`:
|
|
7
7
|
* `thumbUrl` for the tile and `imageUrl` for the large view (and the hover peek), straight from their origin (`srcset`
|
|
8
8
|
* lets the browser pick by the tile's laid-out width); `load(img, size)` fills a picture another way when there is no
|
|
9
9
|
* URL. A `pending` item has no picture yet: its tile is the loading surface and cannot be selected.
|
|
10
10
|
* - `caption: true` puts the item's title and its site's domain (a link to the live page) under each picture.
|
|
11
11
|
* - `set(key, items)`: a new key is a new list (the tiles are built again from the top); the same key with a longer
|
|
12
12
|
* list only adds what is new at the end, and refills in place a tile whose item stopped being `pending` (a reference
|
|
13
|
-
* site whose screenshot landed)
|
|
13
|
+
* site whose screenshot landed), and swaps in place the picture of a tile whose `picture` key changed (a site's
|
|
14
|
+
* settled frame): the old picture stays until the new one has loaded, so the tile never flashes empty; a list whose
|
|
15
|
+
* shown part changed otherwise is built again. The first page shows at once and the next page appears as the person nears
|
|
14
16
|
* the end of the grid (an IntersectionObserver on a marker after the last block, under `root()`, the element that
|
|
15
17
|
* scrolls the grid, or the window), until the list ends. Each page is its own collage block, so nothing already on
|
|
16
18
|
* screen ever moves: not on a click, not when a page is added.
|
|
@@ -63,7 +65,10 @@ export const SLATE_UI_INSPIRATION_GALLERY = String.raw `
|
|
|
63
65
|
if (!kept) { g.key = null; g.set(key, items); return; }
|
|
64
66
|
g.items = items.slice();
|
|
65
67
|
var shownTiles = g.node.querySelectorAll(".gtile");
|
|
66
|
-
for (var i = 0; i < g.shown; i++)
|
|
68
|
+
for (var i = 0; i < g.shown; i++) {
|
|
69
|
+
if (!!before[i].pending !== !!items[i].pending) refillTile(g, shownTiles[i], i);
|
|
70
|
+
else if (!items[i].pending && (before[i].picture || "") !== (items[i].picture || "")) swapPicture(g, shownTiles[i], items[i]);
|
|
71
|
+
}
|
|
67
72
|
// The list had ended on screen (a short last page): what joins it shows at once, in that block.
|
|
68
73
|
if (g.shown % GALLERY_PAGE !== 0) revealPage(g);
|
|
69
74
|
}
|
|
@@ -86,6 +91,19 @@ export const SLATE_UI_INSPIRATION_GALLERY = String.raw `
|
|
|
86
91
|
if (img && freshImg && img.sizes) freshImg.sizes = img.sizes;
|
|
87
92
|
tile.parentNode.replaceChild(fresh, tile);
|
|
88
93
|
}
|
|
94
|
+
// A tile's new picture (a site's settled frame) is set on the picture already shown: the browser keeps showing the
|
|
95
|
+
// old one until the new one has loaded, so the tile never shows an empty frame. The large view, when it shows this
|
|
96
|
+
// item, swaps its picture the same way.
|
|
97
|
+
function swapPicture(g, tile, item) {
|
|
98
|
+
var img = tile && tile.querySelector("img.thumb");
|
|
99
|
+
if (!img) return;
|
|
100
|
+
if (item.thumbUrl) img.src = item.thumbUrl;
|
|
101
|
+
else if (item.load) item.load(img, "thumb");
|
|
102
|
+
if (item.imageUrl && item.imageUrl !== item.thumbUrl) img.setAttribute("data-large", item.imageUrl);
|
|
103
|
+
if (!largeView || largeView.g !== g || largeView.shownId !== item.id) return;
|
|
104
|
+
if (item.imageUrl) largeView.els.img.src = item.imageUrl;
|
|
105
|
+
else if (item.load) item.load(largeView.els.img, "ref");
|
|
106
|
+
}
|
|
89
107
|
// The next page of the list as one collage block, before the end marker; a short last block is topped up first, so
|
|
90
108
|
// sites arriving one by one fill its rows instead of stacking short blocks. Returns whether anything was added.
|
|
91
109
|
function revealPage(g) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-inspiration-gallery.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration-gallery.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-inspiration-gallery.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration-gallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4PrD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The loading surface keeps one clock. Every loading tile is a window onto one wave fixed to the frame
|
|
3
|
+
* (mcp-slate-ui-styles-loading.ts), but a CSS animation counts from when its element appeared: a tile built later (a
|
|
4
|
+
* picture landed and the grid was rebuilt, a reference placeholder arrived) would start its pass over and break the
|
|
5
|
+
* wave at its edges. So each loading animation, as it starts, is set onto the document's clock (start time 0), and
|
|
6
|
+
* every tile on screen shows the same moment of the same pass.
|
|
7
|
+
*
|
|
8
|
+
* Fragment of the view's script; String.raw, no backtick, no dollar-brace.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SLATE_UI_LOADING: string;
|
|
11
|
+
//# sourceMappingURL=mcp-slate-ui-script-loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-loading.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-loading.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,QAQ5B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The loading surface keeps one clock. Every loading tile is a window onto one wave fixed to the frame
|
|
3
|
+
* (mcp-slate-ui-styles-loading.ts), but a CSS animation counts from when its element appeared: a tile built later (a
|
|
4
|
+
* picture landed and the grid was rebuilt, a reference placeholder arrived) would start its pass over and break the
|
|
5
|
+
* wave at its edges. So each loading animation, as it starts, is set onto the document's clock (start time 0), and
|
|
6
|
+
* every tile on screen shows the same moment of the same pass.
|
|
7
|
+
*
|
|
8
|
+
* Fragment of the view's script; String.raw, no backtick, no dollar-brace.
|
|
9
|
+
*/
|
|
10
|
+
export const SLATE_UI_LOADING = String.raw `
|
|
11
|
+
// ---- the loading surface keeps the frame's clock ----
|
|
12
|
+
document.addEventListener("animationstart", function (e) {
|
|
13
|
+
if (String(e.animationName).indexOf("dotwave") !== 0 || !e.target || !e.target.getAnimations) return;
|
|
14
|
+
e.target.getAnimations({ subtree: true }).forEach(function (a) {
|
|
15
|
+
if (String(a.animationName).indexOf("dotwave") === 0 && a.startTime !== 0) a.startTime = 0;
|
|
16
|
+
});
|
|
17
|
+
}, true);
|
|
18
|
+
`;
|
|
19
|
+
//# sourceMappingURL=mcp-slate-ui-script-loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-loading.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-loading.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQzC,CAAC"}
|
|
@@ -12,8 +12,13 @@
|
|
|
12
12
|
* - The large view adds Open site, which opens the live page through the host.
|
|
13
13
|
* - Pictures load straight from their URLs (`imageUrl`, `thumbUrl`); where a server gives none (the local plugin) they
|
|
14
14
|
* come through the reference tool like any reference.
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
15
|
+
* - A site's settled frame may replace its first picture later (`thumbUrl` changes, or the local plugin's
|
|
16
|
+
* `pictureVersion`): the tile keeps its place and its picture, which swaps in place once the new one has loaded. The
|
|
17
|
+
* tab's own watch keeps asking while the local host gathers, so a settled frame that lands after the twelfth site
|
|
18
|
+
* still reaches its tile.
|
|
19
|
+
* - Nothing yet: one short line, "Finding sites…" while the screen's own host says it is gathering (`gatheringSites`,
|
|
20
|
+
* the local plugin) or gathering is possible (the gather window is open and a runner or the draw command holds a
|
|
21
|
+
* running round), else "No websites".
|
|
17
22
|
*
|
|
18
23
|
* Fragment of the view's script; String.raw, no backtick, no dollar-brace.
|
|
19
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-references.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-references.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-references.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,QAuH/B,CAAC"}
|
|
@@ -12,27 +12,37 @@
|
|
|
12
12
|
* - The large view adds Open site, which opens the live page through the host.
|
|
13
13
|
* - Pictures load straight from their URLs (`imageUrl`, `thumbUrl`); where a server gives none (the local plugin) they
|
|
14
14
|
* come through the reference tool like any reference.
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
15
|
+
* - A site's settled frame may replace its first picture later (`thumbUrl` changes, or the local plugin's
|
|
16
|
+
* `pictureVersion`): the tile keeps its place and its picture, which swaps in place once the new one has loaded. The
|
|
17
|
+
* tab's own watch keeps asking while the local host gathers, so a settled frame that lands after the twelfth site
|
|
18
|
+
* still reaches its tile.
|
|
19
|
+
* - Nothing yet: one short line, "Finding sites…" while the screen's own host says it is gathering (`gatheringSites`,
|
|
20
|
+
* the local plugin) or gathering is possible (the gather window is open and a runner or the draw command holds a
|
|
21
|
+
* running round), else "No websites".
|
|
17
22
|
*
|
|
18
23
|
* Fragment of the view's script; String.raw, no backtick, no dollar-brace.
|
|
19
24
|
*/
|
|
20
25
|
export const SLATE_UI_REFERENCES = String.raw `
|
|
21
26
|
// While the tab is open and the sites are still landing, it asks for the view every few seconds by itself (the
|
|
22
27
|
// status poll runs only while a request runs, and the local plugin gathers with none), for a few minutes at most.
|
|
28
|
+
// A dozen sites ends the watch only once the host no longer says it gathers: until then a site's settled frame may
|
|
29
|
+
// still replace its early one.
|
|
23
30
|
var SITES_EXPECTED = 12;
|
|
24
31
|
var SITE_WATCH = { forMs: 300000, everyMs: 3000 };
|
|
25
32
|
var siteWatch = { runDir: null, until: 0, timer: null };
|
|
26
33
|
function armSiteWatch() {
|
|
27
34
|
if (state.view && state.view.runDir && siteWatch.runDir !== state.view.runDir) { siteWatch.runDir = state.view.runDir; siteWatch.until = Date.now() + SITE_WATCH.forMs; }
|
|
28
35
|
}
|
|
36
|
+
// The screen's own host says it is gathering (the local plugin), until the gather ends.
|
|
37
|
+
function gatheringSites() { return !!(state.view && state.view.gatheringSites); }
|
|
29
38
|
// Gathering is possible only while the gather window is open and a runner or the draw command holds a running round.
|
|
30
39
|
function stillFinding() {
|
|
31
|
-
return Date.now() < siteWatch.until && runningOps().some(function (op) { return !!(op.runner && op.runner.alive); });
|
|
40
|
+
return gatheringSites() || (Date.now() < siteWatch.until && runningOps().some(function (op) { return !!(op.runner && op.runner.alive); }));
|
|
32
41
|
}
|
|
33
42
|
function watchSites() {
|
|
34
43
|
if (siteWatch.timer !== null || !state.view || !state.view.runDir) return;
|
|
35
|
-
|
|
44
|
+
var allLanded = siteList().length >= SITES_EXPECTED && !gatheringSites();
|
|
45
|
+
if (state.tab !== "references" || allLanded || (Date.now() > siteWatch.until && !gatheringSites()) || runningOps().length > 0) return;
|
|
36
46
|
siteWatch.timer = setTimeout(function () { siteWatch.timer = null; refreshOnce(); watchSites(); }, SITE_WATCH.everyMs);
|
|
37
47
|
}
|
|
38
48
|
|
|
@@ -65,7 +75,8 @@ export const SLATE_UI_REFERENCES = String.raw `
|
|
|
65
75
|
// A site as the gallery shows it.
|
|
66
76
|
function siteItem(site) {
|
|
67
77
|
var item = { id: site.id, label: site.title + " (" + siteDomain(site) + ")", title: site.title, sourceUrl: site.sourceUrl, domain: siteDomain(site),
|
|
68
|
-
aspect: "landscape", width: 1600, height: 1000, thumbUrl: site.thumbUrl || null, imageUrl: site.imageUrl || site.thumbUrl || null, srcset: ""
|
|
78
|
+
aspect: "landscape", width: 1600, height: 1000, thumbUrl: site.thumbUrl || null, imageUrl: site.imageUrl || site.thumbUrl || null, srcset: "",
|
|
79
|
+
picture: (site.thumbUrl || "") + "#" + (site.pictureVersion || 0) };
|
|
69
80
|
if (!item.thumbUrl) item.load = function (img, size) { fillImage(img, wantReference(site.id, size === "thumb" ? "thumb" : "ref", false)); };
|
|
70
81
|
return item;
|
|
71
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-references.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-references.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-references.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuH5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-state.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-state.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,QAgU1B,CAAC"}
|
|
@@ -188,7 +188,9 @@ export const SLATE_UI_STATE = String.raw `
|
|
|
188
188
|
var site = siteById(id);
|
|
189
189
|
var url = site && (size === "thumb" ? site.thumbUrl : site.imageUrl);
|
|
190
190
|
if (url) return Promise.resolve(url);
|
|
191
|
-
|
|
191
|
+
// A site's replaced screenshot is a new picture under the same id.
|
|
192
|
+
var version = site && site.pictureVersion ? ":" + site.pictureVersion : "";
|
|
193
|
+
return enqueue("ref:" + size + ":" + id + version, state.refs, TOOLS.reference, { runDir: state.view.runDir, referenceId: id, size: size }, urgent);
|
|
192
194
|
}
|
|
193
195
|
function pump() {
|
|
194
196
|
while (visible() && loader.active < loader.max && loader.queue.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script-state.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-state.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgUvC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The workspace view's script, assembled from single-purpose fragments that
|
|
3
3
|
* share one scope: bridge (host protocol), state (view state, picture queue,
|
|
4
4
|
* polling, what the ops say), l10n (the person's language and every word, `t(key)`), inline (the card), select (Select), inspiration (the tabs and the Inspiration tab), stage
|
|
5
|
-
* (fullscreen), pause (the inspiration pause of the hosted server), edit (what the large view's Edit sends), more (the Generate more tile and its panel), scribble (the drawing layer of Edit), the hosted and browser targets' words, then the handshake, last, so every function and
|
|
5
|
+
* (fullscreen), pause (the inspiration pause of the hosted server), edit (what the large view's Edit sends), more (the Generate more tile and its panel), scribble (the drawing layer of Edit), the hosted and browser targets' words, the hover peek, the loading surface's clock, then the handshake, last, so every function and
|
|
6
6
|
* variable exists before the first message can arrive. The tool names come
|
|
7
7
|
* from the view contract (SLATE_UI_TOOLS), not from the server's own module.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AA2B3D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,aAAa,KAAG,MA0B/C,CAAC;AAEb,eAAO,MAAM,eAAe,QAA8B,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { SLATE_UI_DESIGNS } from './mcp-slate-ui-script-designs.js';
|
|
|
8
8
|
import { SLATE_UI_EDIT } from './mcp-slate-ui-script-edit.js';
|
|
9
9
|
import { SLATE_UI_INLINE } from './mcp-slate-ui-script-inline.js';
|
|
10
10
|
import { SLATE_UI_INSPIRATION } from './mcp-slate-ui-script-inspiration.js';
|
|
11
|
+
import { SLATE_UI_LOADING } from './mcp-slate-ui-script-loading.js';
|
|
11
12
|
import { buildSlateUiL10n } from './mcp-slate-ui-script-l10n.js';
|
|
12
13
|
import { SLATE_UI_MORE } from './mcp-slate-ui-script-more.js';
|
|
13
14
|
import { SLATE_UI_PEEK } from './mcp-slate-ui-script-peek.js';
|
|
@@ -70,6 +71,7 @@ export const buildSlateUiScript = (target) => [
|
|
|
70
71
|
SLATE_UI_REMOTE,
|
|
71
72
|
SLATE_UI_BROWSER,
|
|
72
73
|
SLATE_UI_PEEK,
|
|
74
|
+
SLATE_UI_LOADING,
|
|
73
75
|
HANDSHAKE,
|
|
74
76
|
'})();',
|
|
75
77
|
].join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-slate-ui-script.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa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iBAAiB,CAAC,CAAC;IAC1E,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,gBAAgB;IAChB,SAAS;IACT,OAAO;CACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What plays across the loading surface's dots (mcp-slate-ui-styles-loading.ts picks one with LOADING_EFFECT). Each is
|
|
3
|
+
* a background painted under the dot mask, fixed to the frame so every loading tile is a window onto the same field,
|
|
4
|
+
* and each keyframe loop ends exactly where it starts, so every pass is identical.
|
|
5
|
+
*
|
|
6
|
+
* The dots' own ink is `--dot` (dim, at rest), `--dot-mid` and `--dot-hi` (the crest); the colour effects mix the host's
|
|
7
|
+
* accent (`--ring`) toward two neighbouring hues in oklch, so they follow the person's Codex accent and theme.
|
|
8
|
+
*
|
|
9
|
+
* Every animation name starts with `dotwave`: the script keeps all of them on the frame's clock
|
|
10
|
+
* (mcp-slate-ui-script-loading.ts), so a tile built later joins the wave in step.
|
|
11
|
+
*/
|
|
12
|
+
export type LoadingEffect = 'shimmer' | 'ripple' | 'hue' | 'aurora' | 'fireflies';
|
|
13
|
+
export declare const LOADING_EFFECTS: Record<LoadingEffect, string>;
|
|
14
|
+
//# sourceMappingURL=mcp-slate-ui-styles-loading-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-loading-effects.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-loading-effects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC;AAelF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CA0DzD,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const SEL = 'img.shimmer, .shimmer:not(img)::before';
|
|
2
|
+
/**
|
|
3
|
+
* The band effects' geometry. The gradient is one picture 360% of the frame, larger than the frame at every keyframe,
|
|
4
|
+
* so the frame never sees two copies of it: a picture smaller than its travel tiles, and a slanted band does not meet
|
|
5
|
+
* itself across the seam between tiles (the cut-off second pass, evidence 12ui/loading-dots). The band's stops sit
|
|
6
|
+
* close to the middle so it is as wide on screen as before; from -205 to -42 it starts and ends just off the frame.
|
|
7
|
+
*/
|
|
8
|
+
const BAND = String.raw `
|
|
9
|
+
background-size: 360vw 360vh;
|
|
10
|
+
background-repeat: no-repeat;`;
|
|
11
|
+
const BAND_KEYFRAMES = (name) => `@keyframes ${name} { from { background-position: -205vw -205vh; } to { background-position: -42vw -42vh; } }`;
|
|
12
|
+
export const LOADING_EFFECTS = {
|
|
13
|
+
// A soft crest of brighter ink with a faint echo behind it, travelling diagonally.
|
|
14
|
+
shimmer: String.raw `
|
|
15
|
+
${SEL} {
|
|
16
|
+
background-image: linear-gradient(118deg, var(--dot) 41.1%, var(--dot-mid) 43.9%, var(--dot) 45.8%, var(--dot-mid) 47.5%, var(--dot-hi) 50%, var(--dot-mid) 52.2%, var(--dot) 55%);${BAND}
|
|
17
|
+
animation: dotwave 2.4s cubic-bezier(.45, .05, .55, .95) infinite;
|
|
18
|
+
}
|
|
19
|
+
${BAND_KEYFRAMES('dotwave')}`,
|
|
20
|
+
// Rings spreading from the middle of the frame like water, a sharp front and a soft wake; one ring spacing per loop.
|
|
21
|
+
ripple: String.raw `
|
|
22
|
+
@property --dotwave-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
23
|
+
${SEL} {
|
|
24
|
+
background-image: repeating-radial-gradient(circle at 50% 50%, var(--dot) var(--dotwave-r), var(--dot) calc(var(--dotwave-r) + 64px), var(--dot-mid) calc(var(--dotwave-r) + 128px), var(--dot-hi) calc(var(--dotwave-r) + 158px), var(--dot) calc(var(--dotwave-r) + 176px), var(--dot) calc(var(--dotwave-r) + 210px));
|
|
25
|
+
animation: dotwave-ripple 2.6s linear infinite;
|
|
26
|
+
}
|
|
27
|
+
@keyframes dotwave-ripple { from { --dotwave-r: 0px; } to { --dotwave-r: 210px; } }`,
|
|
28
|
+
// The shimmer's crest in colour: the accent, flanked by its two neighbouring hues.
|
|
29
|
+
hue: String.raw `
|
|
30
|
+
${SEL} {
|
|
31
|
+
--hue-a: color-mix(in oklch, var(--ring) 55%, #19c3c0);
|
|
32
|
+
--hue-b: color-mix(in oklch, var(--ring) 55%, #d24dff);
|
|
33
|
+
background-image: linear-gradient(118deg, var(--dot) 40%, color-mix(in srgb, var(--hue-a) 30%, transparent) 43.5%, color-mix(in srgb, var(--hue-a) 70%, transparent) 46.5%, var(--ring) 50%, color-mix(in srgb, var(--hue-b) 70%, transparent) 53%, color-mix(in srgb, var(--hue-b) 30%, transparent) 55.5%, var(--dot) 58%);${BAND}
|
|
34
|
+
animation: dotwave-hue 2.8s cubic-bezier(.45, .05, .55, .95) infinite;
|
|
35
|
+
}
|
|
36
|
+
${BAND_KEYFRAMES('dotwave-hue')}`,
|
|
37
|
+
// Slow drifting glows in the accent's hues behind the dim ink, wandering and returning (alternate), never looping.
|
|
38
|
+
aurora: String.raw `
|
|
39
|
+
${SEL} {
|
|
40
|
+
--aur-a: color-mix(in srgb, color-mix(in oklch, var(--ring) 60%, #19c3c0) 62%, transparent);
|
|
41
|
+
--aur-b: color-mix(in srgb, color-mix(in oklch, var(--ring) 55%, #d24dff) 58%, transparent);
|
|
42
|
+
--aur-c: color-mix(in srgb, var(--ring) 55%, transparent);
|
|
43
|
+
background-color: var(--dot);
|
|
44
|
+
background-image: radial-gradient(closest-side, var(--aur-a), transparent), radial-gradient(closest-side, var(--aur-b), transparent), radial-gradient(closest-side, var(--aur-c), transparent);
|
|
45
|
+
background-size: 90vw 70vh, 80vw 90vh, 70vw 60vh;
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
animation: dotwave-aurora 7s ease-in-out infinite alternate;
|
|
48
|
+
}
|
|
49
|
+
@keyframes dotwave-aurora {
|
|
50
|
+
0% { background-position: -30vw -20vh, 60vw 40vh, 10vw 70vh; }
|
|
51
|
+
50% { background-position: 30vw 30vh, 0vw -20vh, 60vw 10vh; }
|
|
52
|
+
100% { background-position: 50vw -10vh, -20vw 50vh, 40vw 60vh; }
|
|
53
|
+
}`,
|
|
54
|
+
// Soft glints drifting through the dots on two crossing paths, one of them in the accent, like fireflies.
|
|
55
|
+
fireflies: String.raw `
|
|
56
|
+
${SEL} {
|
|
57
|
+
--fly-a: color-mix(in srgb, var(--text) 50%, transparent);
|
|
58
|
+
--fly-b: color-mix(in srgb, var(--ring) 70%, transparent);
|
|
59
|
+
background-color: var(--dot);
|
|
60
|
+
background-image: radial-gradient(circle, var(--fly-a), transparent 26px), radial-gradient(circle, var(--fly-b), transparent 32px), radial-gradient(circle, var(--dot-mid), transparent 44px);
|
|
61
|
+
background-size: 157px 139px, 233px 211px, 307px 277px;
|
|
62
|
+
background-position: 0 0, 0 0, 0 0;
|
|
63
|
+
animation: dotwave-fireflies 7s linear infinite;
|
|
64
|
+
}
|
|
65
|
+
@keyframes dotwave-fireflies { to { background-position: 157px 139px, -233px 211px, 307px -277px; } }`,
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=mcp-slate-ui-styles-loading-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-loading-effects.js","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-loading-effects.ts"],"names":[],"mappings":"AAaA,MAAM,GAAG,GAAG,wCAAwC,CAAC;AAErD;;;;;GAKG;AACH,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;kCAEW,CAAC;AACnC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,cAAc,IAAI,4FAA4F,CAAC;AAExJ,MAAM,CAAC,MAAM,eAAe,GAAkC;IAC5D,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC,GAAG,CAAA;IACjB,GAAG;yLACkL,IAAI;;;IAGzL,cAAc,CAAC,SAAS,CAAC,EAAE;IAE7B,qHAAqH;IACrH,MAAM,EAAE,MAAM,CAAC,GAAG,CAAA;;IAEhB,GAAG;;;;sFAI+E;IAEpF,mFAAmF;IACnF,GAAG,EAAE,MAAM,CAAC,GAAG,CAAA;IACb,GAAG;;;mUAG4T,IAAI;;;IAGnU,cAAc,CAAC,aAAa,CAAC,EAAE;IAEjC,mHAAmH;IACnH,MAAM,EAAE,MAAM,CAAC,GAAG,CAAA;IAChB,GAAG;;;;;;;;;;;;;;IAcH;IAEF,0GAA0G;IAC1G,SAAS,EAAE,MAAM,CAAC,GAAG,CAAA;IACnB,GAAG;;;;;;;;;wGASiG;CACvG,CAAC"}
|