@acryldev/blends-frame 0.2.0 → 0.2.1
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/app-share.d.ts +22 -0
- package/lib/client.js +258 -5
- package/lib/client.js.map +1 -1
- package/lib/contract.d.ts +26 -0
- package/lib/index.d.ts +4 -1
- package/lib/index.js +143 -1
- package/lib/index.js.map +1 -1
- package/lib/types/client/ShareAppSection.d.ts +20 -0
- package/lib/types/client/ShareChooser.d.ts +10 -0
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/contract.d.ts +26 -0
- package/package.json +5 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings > Share, in every app (window or browser tab): send the whole app, as it is now, to a GitHub repository of the person's own. The plan
|
|
3
|
+
* comes first (which repository, who can see it, what is saved first) and nothing leaves the computer until the person says yes. GitHub is
|
|
4
|
+
* connected here the way the Plugins page connects it. Laid out as the App page is: a title, one line under it, one bordered row per thing.
|
|
5
|
+
*/
|
|
6
|
+
import { type AppSharedView, type AppSharePlanView, type AppShareRequest } from '../contract.ts';
|
|
7
|
+
import type { RegistryApi } from './registry-api.ts';
|
|
8
|
+
export interface ShareAppApi {
|
|
9
|
+
plan(request: AppShareRequest): Promise<AppSharePlanView>;
|
|
10
|
+
share(request: AppShareRequest, confirm: AppSharePlanView): Promise<AppSharedView>;
|
|
11
|
+
}
|
|
12
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
13
|
+
export declare function createShareAppApi(fetcher?: FetchLike): ShareAppApi;
|
|
14
|
+
export interface ShareAppSectionInjected {
|
|
15
|
+
readonly share: ShareAppApi;
|
|
16
|
+
/** Whether this computer can reach GitHub, and connecting it (the Plugins page's own). */
|
|
17
|
+
readonly registry: Pick<RegistryApi, 'github' | 'connect'>;
|
|
18
|
+
}
|
|
19
|
+
export declare function ShareAppSection({ share, registry }: ShareAppSectionInjected): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -18,4 +18,14 @@ export interface ShareChooserProps {
|
|
|
18
18
|
readonly onShared: (shared: SharedPluginView) => void;
|
|
19
19
|
readonly onClose: () => void;
|
|
20
20
|
}
|
|
21
|
+
export type Github = GithubReadiness | {
|
|
22
|
+
readonly status: 'checking';
|
|
23
|
+
};
|
|
21
24
|
export declare function ShareChooser({ plugin, readGithub, connectGithub, copy, onSaved, onShared, onClose }: ShareChooserProps): import("react").JSX.Element;
|
|
25
|
+
/** Why the three GitHub choices are greyed out, and the one thing to do about it: Connect GitHub (or, without it, the Terminal command). */
|
|
26
|
+
export declare function GithubNote({ github, copy, connect, onConnected }: {
|
|
27
|
+
readonly github: Github;
|
|
28
|
+
readonly copy: (text: string) => Promise<boolean>;
|
|
29
|
+
readonly connect: GithubConnectApi | undefined;
|
|
30
|
+
readonly onConnected: () => void;
|
|
31
|
+
}): import("react").JSX.Element | null;
|
|
@@ -14,7 +14,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
14
14
|
}
|
|
15
15
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
16
16
|
interface LocaleNamespaceMap {
|
|
17
|
-
'acryl.blendsFrame': 'plugins' | 'app';
|
|
17
|
+
'acryl.blendsFrame': 'plugins' | 'app' | 'share';
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
/** The Loader row that composes the app's own plugins (`frame/app-plugins.mjs`): loading it again applies a switch in `blend.yaml`. */
|
package/lib/types/contract.d.ts
CHANGED
|
@@ -144,6 +144,32 @@ export declare function parseFrameState(value: unknown): FrameState;
|
|
|
144
144
|
export declare const FRAME_PLUGINS_PATH = "/api/acryl-blends-frame/plugins";
|
|
145
145
|
export declare const FRAME_PLUGINS_SWITCH_PATH = "/api/acryl-blends-frame/plugins/switch";
|
|
146
146
|
/** POST `{ name }`: what sharing this local plugin would do (a {@link SharePlan}); nothing leaves the machine. */
|
|
147
|
+
/** POST `{ owner?, visibility? }`: what sharing the whole app to GitHub would send (Settings > Share); sends nothing. */
|
|
148
|
+
export declare const FRAME_APP_SHARE_PLAN_PATH = "/api/acryl-blends-frame/app/share-plan";
|
|
149
|
+
/** POST `{ owner?, visibility?, confirm }`: share the app exactly as the confirmed plan says, or nothing. */
|
|
150
|
+
export declare const FRAME_APP_SHARE_PATH = "/api/acryl-blends-frame/app/share";
|
|
151
|
+
/** Who may see a shared app, and under which account; both optional (the signed-in account, blend.yaml's visibility). */
|
|
152
|
+
export interface AppShareRequest {
|
|
153
|
+
readonly owner?: string;
|
|
154
|
+
readonly visibility?: 'private' | 'public';
|
|
155
|
+
}
|
|
156
|
+
/** What sharing the app sends: the save plugin's plan, shown before anything leaves the computer. */
|
|
157
|
+
export interface AppSharePlanView {
|
|
158
|
+
/** `owner/name` of a repository the share creates, or the address of the one the app already pushes to. */
|
|
159
|
+
readonly repository: string;
|
|
160
|
+
readonly create: boolean;
|
|
161
|
+
readonly visibility: 'private' | 'public';
|
|
162
|
+
/** Files changed since the last save; the share saves them first. */
|
|
163
|
+
readonly changes: number;
|
|
164
|
+
}
|
|
165
|
+
/** Where the app went. */
|
|
166
|
+
export interface AppSharedView {
|
|
167
|
+
readonly remote: string;
|
|
168
|
+
readonly created: boolean;
|
|
169
|
+
}
|
|
170
|
+
export declare function parseAppSharePlan(value: unknown): AppSharePlanView;
|
|
171
|
+
export declare function parseAppShared(value: unknown): AppSharedView;
|
|
172
|
+
export declare function parseAppShareRequest(value: unknown): AppShareRequest | undefined;
|
|
147
173
|
export declare const FRAME_PLUGINS_SHARE_PLAN_PATH = "/api/acryl-blends-frame/plugins/share-plan";
|
|
148
174
|
/** POST `{ name, confirm }`: publish it, only when `confirm` is the plan the person said yes to and it still holds. */
|
|
149
175
|
export declare const FRAME_PLUGINS_SHARE_PATH = "/api/acryl-blends-frame/plugins/share";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acryldev/blends-frame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
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,24 +52,25 @@
|
|
|
52
52
|
"node": "^22.19.0 || >=24.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@acryldev/blends-core": "^0.6.0",
|
|
56
|
-
"@acryldev/plugin-hub-core": "^0.2.2",
|
|
57
55
|
"@acryldev/app-shell": "0.2.0",
|
|
56
|
+
"@acryldev/blends-core": "^0.6.0",
|
|
58
57
|
"@acryldev/loopback-http": "0.2.0",
|
|
58
|
+
"@acryldev/plugin-hub-core": "^0.2.2",
|
|
59
59
|
"@acryldev/versions": "0.2.0",
|
|
60
60
|
"@acryldev/workspace": "0.2.0",
|
|
61
61
|
"yaml": "2.9.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
+
"@acryldev/blends": "^1.0.0",
|
|
64
65
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
65
66
|
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
|
|
66
67
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
|
|
67
68
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
68
|
-
"@acryldev/blends": "^1.0.0",
|
|
69
69
|
"react": "18.3.1",
|
|
70
70
|
"react-dom": "18.3.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
+
"@acryldev/blends": "1.7.3",
|
|
73
74
|
"@acryldev/ui": "0.4.0",
|
|
74
75
|
"@deepseek-ai/cordis": "4.0.4",
|
|
75
76
|
"@deepseek-ai/cordis-plugin-loader": "1.0.5",
|
|
@@ -86,7 +87,6 @@
|
|
|
86
87
|
"@types/node": "^24.0.0",
|
|
87
88
|
"@types/react": "^18",
|
|
88
89
|
"@types/react-dom": "^18",
|
|
89
|
-
"@acryldev/blends": "1.7.0",
|
|
90
90
|
"cytoscape": "3.34.3",
|
|
91
91
|
"jsdom": "29.1.1",
|
|
92
92
|
"react": "18.3.1",
|