@acryldev/blends-frame 0.2.8 → 0.2.9
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/lib/client.js +126 -5
- package/lib/client.js.map +1 -1
- package/lib/contract.d.ts +4 -1
- package/lib/github-connect.d.ts +39 -22
- package/lib/index.d.ts +2 -0
- package/lib/index.js +130 -112
- package/lib/index.js.map +1 -1
- package/lib/types/client/frame-control.d.ts +39 -0
- package/lib/types/client/registry-api.d.ts +2 -0
- package/lib/types/contract.d.ts +4 -1
- package/package.json +3 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The frame's own UI, operable by the agent (the door's `frame` verb): the left panel (branches and versions), the right panel (the agents), Build and
|
|
3
|
+
* Preview, and Settings. These are not part of the app page, so the door's page script, which runs in the canvas page, cannot see or click them; the
|
|
4
|
+
* frame publishes this control on its own window and the page reaches it through `window.parent`, the way {@link installFrameView} publishes the mode.
|
|
5
|
+
* The shapes match the door's page protocol (plugins/door/src/page/protocol.ts: `FRAME_CONTROL_KEY`, `FrameControl`); keep them in step.
|
|
6
|
+
*/
|
|
7
|
+
import type { FrameMode } from './view-state.ts';
|
|
8
|
+
export declare const FRAME_CONTROL_KEY: symbol;
|
|
9
|
+
export type FramePanel = 'left' | 'right';
|
|
10
|
+
export interface FrameControlState {
|
|
11
|
+
readonly left: boolean;
|
|
12
|
+
readonly right: boolean;
|
|
13
|
+
readonly mode: FrameMode;
|
|
14
|
+
readonly settings: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface FrameControlRequest {
|
|
17
|
+
readonly action: 'state' | 'open' | 'close' | 'toggle' | 'settings' | 'build' | 'preview';
|
|
18
|
+
readonly panel?: FramePanel;
|
|
19
|
+
readonly section?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The part of the frame's view state the control uses (./view-state.ts). */
|
|
22
|
+
export interface FrameControlView {
|
|
23
|
+
getSnapshot(): {
|
|
24
|
+
readonly left: boolean;
|
|
25
|
+
readonly right: boolean;
|
|
26
|
+
readonly mode: FrameMode;
|
|
27
|
+
};
|
|
28
|
+
toggleLeft(): void;
|
|
29
|
+
toggleRight(): void;
|
|
30
|
+
showLeft(): void;
|
|
31
|
+
showRight(): void;
|
|
32
|
+
setMode(mode: FrameMode): void;
|
|
33
|
+
}
|
|
34
|
+
export declare function frameControl(view: FrameControlView, doc?: Document): {
|
|
35
|
+
state(): FrameControlState;
|
|
36
|
+
run(request: FrameControlRequest): Promise<string>;
|
|
37
|
+
};
|
|
38
|
+
/** Publish the control on the frame's window. @returns the disposer. */
|
|
39
|
+
export declare function installFrameControl(view: FrameControlView): () => void;
|
|
@@ -16,6 +16,8 @@ export interface GithubConnectApi {
|
|
|
16
16
|
start(): Promise<GithubConnectState>;
|
|
17
17
|
/** Where the sign-in is now. */
|
|
18
18
|
state(): Promise<GithubConnectState>;
|
|
19
|
+
/** Forget the GitHub connection ACRYL made (in Control Center too); answers with the readiness that is left. */
|
|
20
|
+
disconnect(): Promise<GithubReadiness>;
|
|
19
21
|
}
|
|
20
22
|
export declare function createRegistryApi(fetcher?: FetchLike): RegistryApi;
|
|
21
23
|
export {};
|
package/lib/types/contract.d.ts
CHANGED
|
@@ -439,9 +439,12 @@ export interface PulledPluginView {
|
|
|
439
439
|
/** @throws when the value is not what a pull answers. */
|
|
440
440
|
export declare function parsePulledPlugin(value: unknown): PulledPluginView;
|
|
441
441
|
/** Whether the person can share to GitHub now, and when not, the single thing to do about it. */
|
|
442
|
-
export type GithubReadiness =
|
|
442
|
+
export type GithubReadiness =
|
|
443
|
+
/** `via: 'acryl'`: the connection made with ACRYL's own sign-in (shared with Control Center), which the person can disconnect; absent: gh's own login or the person's own token. */
|
|
444
|
+
{
|
|
443
445
|
readonly status: 'ready';
|
|
444
446
|
readonly account: string;
|
|
447
|
+
readonly via?: 'acryl';
|
|
445
448
|
} | {
|
|
446
449
|
readonly status: 'signed-out';
|
|
447
450
|
readonly say: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acryldev/blends-frame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "ACRYL Blends frame: the workbench around an app being built - a top bar, the branches and versions on the left, the app alone in the centre, and the agents on the right - as one Cordis plugin with a Host and a client half",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"node": "^22.19.0 || >=24.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
+
"@acryldev/app-persistence": "^0.1.5",
|
|
55
56
|
"@acryldev/app-shell": "0.2.1",
|
|
56
57
|
"@acryldev/blends-core": "^0.6.0",
|
|
57
58
|
"@acryldev/loopback-http": "0.2.0",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"react-dom": "18.3.1"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
|
-
"@acryldev/blends": "1.7.
|
|
74
|
+
"@acryldev/blends": "1.7.11",
|
|
74
75
|
"@acryldev/ui": "0.4.0",
|
|
75
76
|
"@deepseek-ai/cordis": "4.0.4",
|
|
76
77
|
"@deepseek-ai/cordis-plugin-loader": "1.0.5",
|