@acryldev/blends-frame 0.1.6 → 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.
@@ -4,6 +4,6 @@
4
4
  * DSH's real Settings and nothing else. The Desktop's Settings... menu item reaches the same launcher through a window event.
5
5
  */
6
6
  import type { PropsRuntime } from '@acryldev/ui/frame';
7
- /** The window event the Desktop's Settings... menu item sends (`plugins/desktop/frame.ts`, `openFrameSettings`); keep the string in step. */
7
+ /** The window event the Desktop's Settings... menu item sends (`plugins/desktop-shell/frame.ts`, `openFrameSettings`); keep the string in step. */
8
8
  export declare const OPEN_SETTINGS_EVENT = "acryl:open-settings";
9
9
  export declare function SettingsLauncher({ settingsOpen, openSettings, settingsShortcut }: PropsRuntime<'settings.launcher'>): import("react").JSX.Element;
@@ -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;
@@ -6,7 +6,7 @@
6
6
  * for this one's answer and replace a live app page (section 30) - and nothing here reloads on its own: only `navigate` and `reload`, which only a
7
7
  * person or the door calls.
8
8
  */
9
- /** The key the door publishes `{ windowId }` on the page's window (plugins/acryl-door/src/page/index.ts, `PAGE_KEY`). */
9
+ /** The key the door publishes `{ windowId }` on the page's window (plugins/door/src/page/index.ts, `PAGE_KEY`). */
10
10
  export declare const DOOR_PAGE_KEY: symbol;
11
11
  export interface AppCanvasView {
12
12
  /** The absolute address of the app's own page, or undefined when the Host serves none. */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Writing into the chat's composer: DSH's conversation input for a session (`conversation.input.for(scope).setDraft`), the same seam
3
- * `@acryl/ui`'s `acrylChat.notice` uses. The services are read at the call and checked, so a page without a chat answers false.
3
+ * `@acryldev/ui`'s `acrylChat.notice` uses. The services are read at the call and checked, so a page without a chat answers false.
4
4
  */
5
5
  import type { Context } from '@deepseek-ai/cordis';
6
6
  /** Put `text` in the composer of chat `sessionId` and focus it. @returns false when this page holds no composer for that chat. */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The chats as the frame lists them: DSH's sessions, newest first, the one DSH's main view retains marked current. Opening one asks DSH's own
3
- * navigation (`uiWorkspace`) when it is composed, so DSH stays the one owner of which session is shown (the reason is in acryl-workspace's
3
+ * navigation (`uiWorkspace`) when it is composed, so DSH stays the one owner of which session is shown (the reason is in @acryldev/workspace's
4
4
  * `sessions/main-session.ts`); without it, the frame holds the main-view reference itself.
5
5
  *
6
6
  * Which branch a chat belongs to, and which chats are open, is the branch-chats record (`./branch-chats.ts`), the one source of truth. The rule this
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The app as a desktop product keeps it (specs/049-framework-architecture/app-storage.md in ACRYL): its name, its folder, export, import and start over.
3
- * A product's window gets `window.acrylBlendsApp` from its preload (acrylblends `plugins/desktop/preload.cjs`, answered by `plugins/desktop/app-page.ts`);
3
+ * A product's window gets `window.acrylBlendsApp` from its preload (acrylblends `plugins/desktop-shell/preload.cjs`, answered by `plugins/desktop-shell/app-page.ts`);
4
4
  * a browser tab and an app run with `npm run dev` have none, and the frame then shows no App page. The operation names and shapes are that module's:
5
5
  * keep them in step.
6
6
  */
@@ -13,11 +13,17 @@ export type FrameStateView = {
13
13
  readonly message: string;
14
14
  };
15
15
  type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
16
+ /**
17
+ * Whether a scheduled read should run: while the page is visible, and always until the first successful answer. The canvas waits on that first
18
+ * answer, and a page the browser reports hidden (a headless tab, a window behind another) would otherwise never retry a failed one.
19
+ */
20
+ export declare function shouldReadOnTick(visibility: string, status: FrameStateView['status']): boolean;
16
21
  export declare class FrameStateStore {
17
22
  private readonly fetchImpl;
18
23
  private view;
19
24
  private readonly listeners;
20
25
  private generation;
26
+ private inFlight;
21
27
  constructor(fetchImpl?: FetchLike);
22
28
  getSnapshot(): FrameStateView;
23
29
  subscribe(listener: () => void): () => void;
@@ -28,7 +34,13 @@ export declare class FrameStateStore {
28
34
  * of trusting what the last poll showed. Undefined when this read failed, even though the page keeps showing the last good state.
29
35
  */
30
36
  current(): Promise<FrameState | undefined>;
31
- /** One read of the Host's state, published to the page unless a newer read started meanwhile; returns what this read got. */
37
+ /**
38
+ * One read at a time: a tick while a read is still in flight joins that read instead of starting another, whose start would make the first
39
+ * answer stale and drop it. With the Host's git-heavy read slower than the 5 s tick under load, every answer was superseded before it landed
40
+ * and the page stayed 'loading' forever (the canvas never appeared: verify-ide-template's flake).
41
+ */
32
42
  private read;
43
+ /** One read of the Host's state, published to the page unless a newer read started meanwhile; returns what this read got. */
44
+ private readOnce;
33
45
  }
34
46
  export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Cordis Client plugin: the Blends frame owns the page's `root` slot and draws the workbench around the app (docs/design/blends-frame-mockup.html).
3
- * It composes no IDE workbench: the ACRYL IDE keeps its own root owner (`acryl-workspace` through `acryl-app-shell`), and a Blueprint mounts one
3
+ * It composes no IDE workbench: the ACRYL IDE keeps its own root owner (`@acryldev/workspace` through `@acryldev/app-shell`), and a Blueprint mounts one
4
4
  * of the two, never both, since `root` is a single slot.
5
5
  */
6
6
  import '@deepseek-ai/dsh-client-ui-renderer/client';
@@ -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`. */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The right panel's tools, from the workspace's reusable client layers (`acryl-workspace/ui`): the live terminal sessions and the PTY, files and
2
+ * The right panel's tools, from the workspace's reusable client layers (`@acryldev/workspace/ui`): the live terminal sessions and the PTY, files and
3
3
  * git routes its Host half serves (run by this frame's Host, see `../index.ts`). Built once per client activation; the effect that builds it
4
4
  * releases the sessions.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The versions the left panel lists, through `acryl-versions`: the calls it makes, how a version is numbered, how its time reads, and which
2
+ * The versions the left panel lists, through `@acryldev/versions`: the calls it makes, how a version is numbered, how its time reads, and which
3
3
  * versions are shared (also on another branch or the remote, which the frame's Host answers).
4
4
  */
5
5
  import type { VersionsEntry, VersionsLogView } from '@acryldev/versions';
@@ -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,16 +1,16 @@
1
1
  {
2
2
  "name": "@acryldev/blends-frame",
3
- "version": "0.1.6",
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": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/acryldev/acryl.git",
9
- "directory": "plugins/acryl-blends-frame"
9
+ "directory": "plugins/blends-frame"
10
10
  },
11
- "homepage": "https://github.com/acrylblends/acrylblends/tree/main/ide/acryl-blends-frame#readme",
11
+ "homepage": "https://github.com/acryldev/acryl/tree/main/plugins/blends-frame#readme",
12
12
  "bugs": {
13
- "url": "https://github.com/acrylblends/acrylblends/issues"
13
+ "url": "https://github.com/acryldev/acryl/issues"
14
14
  },
15
15
  "type": "module",
16
16
  "main": "lib/index.js",
@@ -51,33 +51,27 @@
51
51
  "engines": {
52
52
  "node": "^22.19.0 || >=24.0.0"
53
53
  },
54
- "scripts": {
55
- "build": "node scripts/clean.mjs && tsdown && tsc -p tsconfig.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
56
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
57
- "test": "vitest run",
58
- "check": "pnpm run build && pnpm run typecheck && pnpm run test",
59
- "prepack": "pnpm run check"
60
- },
61
54
  "dependencies": {
62
- "@webboxes/blends-core": "0.5.0",
63
- "@webboxes/plugin-hub": "0.2.2",
64
- "@acryldev/app-shell": "^0.1.1",
65
- "@acryldev/loopback-http": "^0.1.0",
66
- "@acryldev/versions": "^0.1.1",
67
- "@acryldev/workspace": "^0.1.1",
55
+ "@acryldev/app-shell": "0.2.0",
56
+ "@acryldev/blends-core": "^0.6.0",
57
+ "@acryldev/loopback-http": "0.2.0",
58
+ "@acryldev/plugin-hub-core": "^0.2.2",
59
+ "@acryldev/versions": "0.2.0",
60
+ "@acryldev/workspace": "0.2.0",
68
61
  "yaml": "2.9.0"
69
62
  },
70
63
  "peerDependencies": {
71
- "@deepseek-ai/cordis": "^4.0.4",
64
+ "@acryldev/blends": "^1.0.0",
65
+ "@deepseek-ai/cordis": "^4.0.2",
72
66
  "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
73
67
  "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
74
68
  "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
75
- "acrylblends": "^1.0.0",
76
69
  "react": "18.3.1",
77
70
  "react-dom": "18.3.1"
78
71
  },
79
72
  "devDependencies": {
80
- "@acryldev/ui": "^0.3.0",
73
+ "@acryldev/blends": "1.7.3",
74
+ "@acryldev/ui": "0.4.0",
81
75
  "@deepseek-ai/cordis": "4.0.4",
82
76
  "@deepseek-ai/cordis-plugin-loader": "1.0.5",
83
77
  "@deepseek-ai/dsh-client-modules": "0.2.0-rc.2",
@@ -93,7 +87,6 @@
93
87
  "@types/node": "^24.0.0",
94
88
  "@types/react": "^18",
95
89
  "@types/react-dom": "^18",
96
- "acrylblends": "^0.1.6",
97
90
  "cytoscape": "3.34.3",
98
91
  "jsdom": "29.1.1",
99
92
  "react": "18.3.1",
@@ -124,5 +117,11 @@
124
117
  "capabilities": [
125
118
  "blends-frame"
126
119
  ]
120
+ },
121
+ "scripts": {
122
+ "build": "node scripts/clean.mjs && tsdown && tsc -p tsconfig.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
123
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
124
+ "test": "vitest run",
125
+ "check": "pnpm run build && pnpm run typecheck && pnpm run test"
127
126
  }
128
- }
127
+ }