@acryldev/blends-frame 0.1.6 → 0.2.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # acryl-blends-frame
1
+ # @acryldev/blends-frame
2
2
 
3
3
  The workbench around an app made with ACRYL Blends, as the owner's mockup draws it (`docs/design/blends-frame-mockup.html`):
4
4
 
@@ -18,14 +18,14 @@ through `window.parent`; a page opened directly is unchanged.
18
18
 
19
19
  A feedback note shows its screenshot as a thumbnail, and handing it to the chat puts the page and selector text in the composer with the picture as a real attachment. Settings > Plugins shares a local plugin: the frame packages it under the app's home (`plugin-packages/<name>`; the builder's package shape,
20
20
  plus the Loader patch the plugin-hub needs) and first says what it will do, for example "Create repository ana/notes on GitHub and publish
21
- v0.1.0? It will be private.", with Cancel as the default. Only on the person's yes does it publish, with `@webboxes/plugin-hub` through the user's
21
+ v0.1.0? It will be private.", with Cancel as the default. Only on the person's yes does it publish, with `@acryldev/plugin-hub-core` through the user's
22
22
  own `gh` and `git`, exactly that repository, version and visibility; when the plan changed meanwhile nothing is sent. The Host refuses a share
23
23
  that does not carry the confirmed plan. The row then shows the repository and version. A second app installs it with `acrylblends add <the
24
24
  package folder>`; the plugin-hub refuses a package with secrets before anything is sent. `shareOwner` in the frame row's config names the GitHub
25
25
  account or organization (the signed-in account when absent); a rehearsal sets a test organization there (`shareOwner: inboxxobni`). A version
26
26
  already released there is planned as the next patch, and the question says so.
27
27
 
28
- It owns the page's `root` slot, so it is mounted instead of the IDE's workbench (`acryl-workspace`), never beside it. The Host half serves one
28
+ It owns the page's `root` slot, so it is mounted instead of the IDE's workbench (`@acryldev/workspace`), never beside it. The Host half serves one
29
29
  private route, `GET /api/acryl-blends-frame/state` (the app's name, folder, page and branches); `appPage` in the row's config says where the
30
30
  app's page is served.
31
31
 
@@ -92,7 +92,7 @@ line typed in an editor or a `git switch` shows in the canvas without a restart
92
92
  the Host loads the app's code again whenever `blend.yaml` or a file under `src/` or `plugins/` changes, whoever changed it (300 ms after the last
93
93
  change).
94
94
 
95
- How it works: the launcher (`scripts/ide-host.mjs`) loads `acryl-blends-frame/app-generation` before anything of the app does. It installs a resolve
95
+ How it works: the launcher (`scripts/ide-host.mjs`) loads `@acryldev/blends-frame/app-generation` before anything of the app does. It installs a resolve
96
96
  hook that, once the Host raises the generation, gives every file of the app's `src/`, of its own plugins (the
97
97
  folders of `plugins/` that `plugins/library.json` does not list) and of the generated `frame/` rows a `?gen=N` query, so a new import of them - and
98
98
  of everything they import - is a fresh copy. Nothing in `node_modules` or the library copies in `plugins/` gets one, so their services stay single
package/cordis.patch.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  - insert:
2
2
  - id: acryl-blends-frame
3
- name: '@acryldev/blends-frame'
3
+ name: '@acryldev/blends-frame'
@@ -4,7 +4,7 @@
4
4
  * `extensions` row finds it). `blend.yaml` is edited by lines, so its comments and layout stay as the person wrote them. The running app takes a
5
5
  * switch when its Loader row (`app-plugins`) loads again, which the client asks for.
6
6
  */
7
- import { type PublishGitPort, type RepositoryHostPort } from '@webboxes/plugin-hub';
7
+ import { type PublishGitPort, type RepositoryHostPort } from '@acryldev/plugin-hub-core';
8
8
  import { type AppPluginView, type FramePluginState, type FramePluginView, type SavedPluginResult, type SavedPluginView, type ShareVisibility, type SharedPluginView, type SharePlan } from './contract.ts';
9
9
  /** One row of `blend.yaml`'s `spec.rows`: where its block starts and ends (line indexes, end exclusive). */
10
10
  export interface BlendRow {
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * The turn-end signal is DSH's own: its `workspace-changes` plugin diffs the working tree around every turn (the person's earlier unsaved edits never
7
7
  * enter a turn's list) and appends a `workspace/changes` session event only when files changed, so a turn that changed nothing makes no version here.
8
- * The Host hears that event on `session/event`, reads the turn's file list from `ctx.workspaceChanges.summary`, and saves through `acryl-versions`.
8
+ * The Host hears that event on `session/event`, reads the turn's file list from `ctx.workspaceChanges.summary`, and saves through `@acryldev/versions`.
9
9
  */
10
10
  import type { TurnSaveView } from './contract.ts';
11
11
  /** The person's request, shortened into a version's name: its first sentence or clause, one line, cut at a word. */
package/lib/client.js CHANGED
@@ -5,8 +5,8 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  require("@deepseek-ai/dsh-client-ui-renderer/client");
8
- let acryl_app_shell_client = require("@acryldev/app-shell/client");
9
- let acryl_versions_client = require("@acryldev/versions/client");
8
+ let _acryldev_app_shell_client = require("@acryldev/app-shell/client");
9
+ let _acryldev_versions_client = require("@acryldev/versions/client");
10
10
  let react = require("react");
11
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
12
  // src/contract.ts
@@ -2384,7 +2384,7 @@ window.__ModuleLoader__.load({
2384
2384
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { children: [
2385
2385
  note.element === void 0 ? "nothing specific" : `pinned on ${note.element.label}`,
2386
2386
  " · ",
2387
- (0, acryl_versions_client.formatRelativeTime)(note.at)
2387
+ (0, _acryldev_versions_client.formatRelativeTime)(note.at)
2388
2388
  ] }),
2389
2389
  note.screenshot !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
2390
2390
  className: "acrylBlendsFeedbackThumb",
@@ -2988,7 +2988,7 @@ window.__ModuleLoader__.load({
2988
2988
  ]
2989
2989
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2990
2990
  className: "acrylBlendsMeta",
2991
- children: (0, acryl_versions_client.formatRelativeTime)(entry.at)
2991
+ children: (0, _acryldev_versions_client.formatRelativeTime)(entry.at)
2992
2992
  })]
2993
2993
  }, entry.hash))
2994
2994
  ]
@@ -3636,7 +3636,7 @@ window.__ModuleLoader__.load({
3636
3636
  "aria-hidden": "true",
3637
3637
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M8 3v10M3 8h10" })
3638
3638
  });
3639
- const PTY_NOTE = "Claude, Codex and Pi run as they are, in a terminal. They drive the app from inside: they know the ACRYL app's architecture through its skills, extend it with Cordis plugins, and use the app's UI through acryl-control.";
3639
+ const PTY_NOTE = "Claude, Codex and Pi run as they are, in a terminal. They drive the app from inside: they know the ACRYL app's architecture through its skills, extend it with Cordis plugins, and use the app's UI through @acryldev/control.";
3640
3640
  const baseName = (path) => path.slice(path.lastIndexOf("/") + 1);
3641
3641
  /** The strip's content width, kept current as the panel opens, closes or resizes. */
3642
3642
  function useStripWidth(ref) {
@@ -4272,6 +4272,7 @@ window.__ModuleLoader__.load({
4272
4272
  "data-mode": frameView.mode,
4273
4273
  "data-left": leftOpen ? "open" : "closed",
4274
4274
  "data-right": rightOpen ? "open" : "closed",
4275
+ "data-frame-state": state.status,
4275
4276
  children: [
4276
4277
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
4277
4278
  className: "acrylBlendsBar",
@@ -4512,7 +4513,7 @@ window.__ModuleLoader__.load({
4512
4513
  * 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
4513
4514
  * person or the door calls.
4514
4515
  */
4515
- /** The key the door publishes `{ windowId }` on the page's window (plugins/acryl-door/src/page/index.ts, `PAGE_KEY`). */
4516
+ /** The key the door publishes `{ windowId }` on the page's window (plugins/door/src/page/index.ts, `PAGE_KEY`). */
4516
4517
  const DOOR_PAGE_KEY = Symbol.for("acryl.door.page");
4517
4518
  /** The canvas as the frame renders it; one instance per client plugin lifetime. */
4518
4519
  var AppCanvasState = class {
@@ -4662,11 +4663,19 @@ window.__ModuleLoader__.load({
4662
4663
  * What the frame shows around the app, from the Host's state route. The frame reads it again while the page is visible, so a version an agent saves
4663
4664
  * or a file it changes shows without a reload; a failed re-read keeps what is shown, and an unchanged answer tells no one.
4664
4665
  */
4666
+ /**
4667
+ * Whether a scheduled read should run: while the page is visible, and always until the first successful answer. The canvas waits on that first
4668
+ * answer, and a page the browser reports hidden (a headless tab, a window behind another) would otherwise never retry a failed one.
4669
+ */
4670
+ function shouldReadOnTick(visibility, status) {
4671
+ return visibility === "visible" || status !== "ready";
4672
+ }
4665
4673
  var FrameStateStore = class {
4666
4674
  fetchImpl;
4667
4675
  view = Object.freeze({ status: "loading" });
4668
4676
  listeners = /* @__PURE__ */ new Set();
4669
4677
  generation = 0;
4678
+ inFlight;
4670
4679
  constructor(fetchImpl = (input, init) => fetch(input, init)) {
4671
4680
  this.fetchImpl = fetchImpl;
4672
4681
  }
@@ -4691,9 +4700,21 @@ window.__ModuleLoader__.load({
4691
4700
  const next = await this.read();
4692
4701
  return next.status === "ready" ? next.state : void 0;
4693
4702
  }
4703
+ /**
4704
+ * 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
4705
+ * 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
4706
+ * and the page stayed 'loading' forever (the canvas never appeared: verify-ide-template's flake).
4707
+ */
4708
+ read() {
4709
+ if (this.inFlight !== void 0) return this.inFlight;
4710
+ const run = this.readOnce(++this.generation).finally(() => {
4711
+ if (this.inFlight === run) this.inFlight = void 0;
4712
+ });
4713
+ this.inFlight = run;
4714
+ return run;
4715
+ }
4694
4716
  /** One read of the Host's state, published to the page unless a newer read started meanwhile; returns what this read got. */
4695
- async read() {
4696
- const mine = ++this.generation;
4717
+ async readOnce(mine) {
4697
4718
  let next;
4698
4719
  try {
4699
4720
  const response = await this.fetchImpl(FRAME_STATE_PATH, { credentials: "same-origin" });
@@ -4716,7 +4737,7 @@ window.__ModuleLoader__.load({
4716
4737
  return next;
4717
4738
  }
4718
4739
  };
4719
- // ../acryl-workspace/lib/ui.js
4740
+ // ../workspace/lib/ui.js
4720
4741
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4721
4742
  var _virtual_xterm_css_default = "/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n * Fabrice Bellard's javascript vt100 for jslinux:\n * http://bellard.org/jslinux/\n * Copyright (c) 2011 Fabrice Bellard\n * The original design remains. The terminal itself\n * has been extended to include xterm CSI codes, among\n * other features.\n */\n\n/**\n * Default styles for xterm.js\n */\n\n.xterm {\n cursor: text;\n position: relative;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n outline: none;\n}\n\n.xterm .xterm-helpers {\n position: absolute;\n top: 0;\n /**\n * The z-index of the helpers must be higher than the canvases in order for\n * IMEs to appear on top.\n */\n z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n padding: 0;\n border: 0;\n margin: 0;\n /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n position: absolute;\n opacity: 0;\n left: -9999em;\n top: 0;\n width: 0;\n height: 0;\n z-index: -5;\n /** Prevent wrapping so the IME appears against the textarea at the correct position */\n white-space: nowrap;\n overflow: hidden;\n resize: none;\n}\n\n.xterm .composition-view {\n /* TODO: Composition position got messed up somewhere */\n background: #000;\n color: #FFF;\n display: none;\n position: absolute;\n white-space: nowrap;\n z-index: 1;\n}\n\n.xterm .composition-view.active {\n display: block;\n}\n\n.xterm .xterm-viewport {\n /* On OS X this is required in order for the scroll bar to appear fully opaque */\n background-color: #000;\n overflow-y: scroll;\n cursor: default;\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.xterm .xterm-screen {\n position: relative;\n}\n\n.xterm .xterm-screen canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.xterm .xterm-scroll-area {\n visibility: hidden;\n}\n\n.xterm-char-measure-element {\n display: inline-block;\n visibility: hidden;\n position: absolute;\n top: 0;\n left: -9999em;\n line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n cursor: pointer;\n}\n\n.xterm.column-select.focus {\n /* Column selection mode */\n cursor: crosshair;\n}\n\n.xterm .xterm-accessibility:not(.debug),\n.xterm .xterm-message {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 10;\n color: transparent;\n pointer-events: none;\n}\n\n.xterm .xterm-accessibility-tree:not(.debug) *::selection {\n color: transparent;\n}\n\n.xterm .xterm-accessibility-tree {\n user-select: text;\n white-space: pre;\n}\n\n.xterm .live-region {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.xterm-dim {\n /* Dim should not apply to background, so the opacity of the foreground color is applied\n * explicitly in the generated class and reset to 1 here */\n opacity: 1 !important;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-overline {\n text-decoration: overline;\n}\n\n.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }\n.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }\n.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }\n.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }\n.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }\n\n.xterm-strikethrough {\n text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n z-index: 6;\n position: absolute;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {\n z-index: 7;\n}\n\n.xterm-decoration-overview-ruler {\n z-index: 8;\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: none;\n}\n\n.xterm-decoration-top {\n z-index: 2;\n position: relative;\n}\n";
4722
4743
  var require_addon_fit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15190,7 +15211,7 @@ window.__ModuleLoader__.load({
15190
15211
  error: value.error
15191
15212
  };
15192
15213
  }
15193
- throw new Error("acryl-workspace: invalid terminal stream message");
15214
+ throw new Error("@acryldev/workspace: invalid terminal stream message");
15194
15215
  }
15195
15216
  /**
15196
15217
  * The browser end of one terminal's live stream (see `src/pty/stream.ts`).
@@ -15616,7 +15637,7 @@ window.__ModuleLoader__.load({
15616
15637
  return value !== null && typeof value === "object" && !Array.isArray(value);
15617
15638
  }
15618
15639
  function parseView(value) {
15619
- if (!isObject$1(value) || typeof value.id !== "string" || value.status !== "starting" && value.status !== "running" && value.status !== "exited" && value.status !== "error" || typeof value.output !== "string" || value.exitCode !== null && typeof value.exitCode !== "number" || value.error !== null && typeof value.error !== "string") throw new Error("acryl-workspace: invalid workspace PTY response");
15640
+ if (!isObject$1(value) || typeof value.id !== "string" || value.status !== "starting" && value.status !== "running" && value.status !== "exited" && value.status !== "error" || typeof value.output !== "string" || value.exitCode !== null && typeof value.exitCode !== "number" || value.error !== null && typeof value.error !== "string") throw new Error("@acryldev/workspace: invalid workspace PTY response");
15620
15641
  return {
15621
15642
  id: value.id,
15622
15643
  status: value.status,
@@ -15657,7 +15678,7 @@ window.__ModuleLoader__.load({
15657
15678
  credentials: "same-origin"
15658
15679
  });
15659
15680
  const body = await readJson(response);
15660
- if (!response.ok) throw new Error("acryl-workspace: workspace PTY read failed");
15681
+ if (!response.ok) throw new Error("@acryldev/workspace: workspace PTY read failed");
15661
15682
  return parseView(body);
15662
15683
  },
15663
15684
  async write(id, data) {
@@ -15669,7 +15690,7 @@ window.__ModuleLoader__.load({
15669
15690
  id,
15670
15691
  data
15671
15692
  })
15672
- })).ok) throw new Error("acryl-workspace: workspace PTY write failed");
15693
+ })).ok) throw new Error("@acryldev/workspace: workspace PTY write failed");
15673
15694
  },
15674
15695
  async resize(id, cols, rows) {
15675
15696
  if (!(await fetcher("/api/acryl-workspace/pty/resize", {
@@ -15681,7 +15702,7 @@ window.__ModuleLoader__.load({
15681
15702
  cols,
15682
15703
  rows
15683
15704
  })
15684
- })).ok) throw new Error("acryl-workspace: workspace PTY resize failed");
15705
+ })).ok) throw new Error("@acryldev/workspace: workspace PTY resize failed");
15685
15706
  },
15686
15707
  async close(id) {
15687
15708
  if (!(await fetcher("/api/acryl-workspace/pty/close", {
@@ -15689,7 +15710,7 @@ window.__ModuleLoader__.load({
15689
15710
  credentials: "same-origin",
15690
15711
  headers: { "content-type": "application/json" },
15691
15712
  body: JSON.stringify({ id })
15692
- })).ok) throw new Error("acryl-workspace: workspace PTY close failed");
15713
+ })).ok) throw new Error("@acryldev/workspace: workspace PTY close failed");
15693
15714
  }
15694
15715
  };
15695
15716
  }
@@ -16352,8 +16373,8 @@ window.__ModuleLoader__.load({
16352
16373
  ctx.effect(() => ctx.locale.register(SETTINGS_LOCALE_NAMESPACE, {
16353
16374
  zh,
16354
16375
  en
16355
- }), "acryl-workspace settings: dictionaries");
16356
- ctx.effect(() => installSettingsStyles(), "acryl-workspace settings: styles");
16376
+ }), "@acryldev/workspace settings: dictionaries");
16377
+ ctx.effect(() => installSettingsStyles(), "@acryldev/workspace settings: styles");
16357
16378
  }
16358
16379
  };
16359
16380
  }
@@ -48933,7 +48954,7 @@ body[data-bf-settings-full] { --bf-pane-h: calc(100vh - 24px); }
48933
48954
  });
48934
48955
  }
48935
48956
  // src/client/SettingsLauncher.tsx
48936
- /** The window event the Desktop's Settings... menu item sends (`plugins/desktop/frame.ts`, `openFrameSettings`); keep the string in step. */
48957
+ /** The window event the Desktop's Settings... menu item sends (`plugins/desktop-shell/frame.ts`, `openFrameSettings`); keep the string in step. */
48937
48958
  const OPEN_SETTINGS_EVENT = "acryl:open-settings";
48938
48959
  const GearIcon = () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
48939
48960
  viewBox: "0 0 24 24",
@@ -49618,7 +49639,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
49618
49639
  };
49619
49640
  // src/client/tools.ts
49620
49641
  /**
49621
- * The right panel's tools, from the workspace's reusable client layers (`acryl-workspace/ui`): the live terminal sessions and the PTY, files and
49642
+ * The right panel's tools, from the workspace's reusable client layers (`@acryldev/workspace/ui`): the live terminal sessions and the PTY, files and
49622
49643
  * 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
49623
49644
  * releases the sessions.
49624
49645
  */
@@ -49881,7 +49902,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
49881
49902
  // src/client/index.ts
49882
49903
  /**
49883
49904
  * 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).
49884
- * It composes no IDE workbench: the ACRYL IDE keeps its own root owner (`acryl-workspace` through `acryl-app-shell`), and a Blueprint mounts one
49905
+ * It composes no IDE workbench: the ACRYL IDE keeps its own root owner (`@acryldev/workspace` through `@acryldev/app-shell`), and a Blueprint mounts one
49885
49906
  * of the two, never both, since `root` is a single slot.
49886
49907
  */
49887
49908
  const LOCALE_NAMESPACE = "acryl.blendsFrame";
@@ -49902,7 +49923,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
49902
49923
  }
49903
49924
  }
49904
49925
  function apply(ctx) {
49905
- const layout = new acryl_app_shell_client.DesktopLayoutState();
49926
+ const layout = new _acryldev_app_shell_client.DesktopLayoutState();
49906
49927
  const canvas = new AppCanvasState();
49907
49928
  const selection = new SelectionStore();
49908
49929
  const frameState = new FrameStateStore();
@@ -49936,7 +49957,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
49936
49957
  return active?.kind === "chat" && active.session !== void 0 && active.branch === checkedOut() ? active.session : void 0;
49937
49958
  }
49938
49959
  });
49939
- const versionsApi = (0, acryl_versions_client.createVersionsApi)();
49960
+ const versionsApi = (0, _acryldev_versions_client.createVersionsApi)();
49940
49961
  const sharedVersionsApi = createSharedVersionsApi();
49941
49962
  const branchesApi = createBranchesApi();
49942
49963
  const gitSyncApi = createGitSyncApi();
@@ -49987,15 +50008,15 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
49987
50008
  return draftInChat(ctx, current.id, feedbackTask(note));
49988
50009
  }
49989
50010
  };
49990
- ctx.effect(() => (0, acryl_app_shell_client.provideDesktopLayout)(ctx, layout), "acryl-blends-frame: layout service");
49991
- ctx.effect(() => ctx.slots.provideRoot({ hooks: { panelInfo: layout.panelInfo } }), "acryl-blends-frame: panel info");
50011
+ ctx.effect(() => (0, _acryldev_app_shell_client.provideDesktopLayout)(ctx, layout), "@acryldev/blends-frame: layout service");
50012
+ ctx.effect(() => ctx.slots.provideRoot({ hooks: { panelInfo: layout.panelInfo } }), "@acryldev/blends-frame: panel info");
49992
50013
  ctx.effect(() => {
49993
50014
  const dispose = ctx.reflect.provide("appCanvas", canvas);
49994
50015
  return () => {
49995
50016
  dispose();
49996
50017
  };
49997
- }, "acryl-blends-frame: the canvas service");
49998
- ctx.effect(() => installFrameView(canvas, view), "acryl-blends-frame: the app page view");
50018
+ }, "@acryldev/blends-frame: the canvas service");
50019
+ ctx.effect(() => installFrameView(canvas, view), "@acryldev/blends-frame: the app page view");
49999
50020
  let sidebarRight;
50000
50021
  const sidebarOpens = /* @__PURE__ */ new Set();
50001
50022
  ctx.inject(["sidebarRight"], (child) => {
@@ -50008,7 +50029,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50008
50029
  stop();
50009
50030
  sidebarRight = void 0;
50010
50031
  };
50011
- }, "acryl-blends-frame: the right sidebar");
50032
+ }, "@acryldev/blends-frame: the right sidebar");
50012
50033
  });
50013
50034
  const sidebar = {
50014
50035
  close: () => {
@@ -50025,12 +50046,12 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50025
50046
  }
50026
50047
  };
50027
50048
  ctx.effect(() => {
50028
- const stripped = (0, acryl_app_shell_client.stripLaunchToken)(window.location.href);
50049
+ const stripped = (0, _acryldev_app_shell_client.stripLaunchToken)(window.location.href);
50029
50050
  if (stripped !== void 0) window.history.replaceState(window.history.state, "", stripped);
50030
50051
  return () => {};
50031
- }, "acryl-blends-frame: strip the launch token");
50032
- ctx.effect(() => installFrameStyles(), "acryl-blends-frame: styles");
50033
- ctx.effect(() => installXtermStyles(), "acryl-blends-frame: terminal styles");
50052
+ }, "@acryldev/blends-frame: strip the launch token");
50053
+ ctx.effect(() => installFrameStyles(), "@acryldev/blends-frame: styles");
50054
+ ctx.effect(() => installXtermStyles(), "@acryldev/blends-frame: terminal styles");
50034
50055
  ctx.effect(() => {
50035
50056
  const closeTabOf = (terminalId) => {
50036
50057
  const tab = tabOfTerminal(tabs.getSnapshot(), terminalId);
@@ -50048,7 +50069,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50048
50069
  offTitle();
50049
50070
  tools.terminals.disposeAll();
50050
50071
  };
50051
- }, "acryl-blends-frame: terminal sessions");
50072
+ }, "@acryldev/blends-frame: terminal sessions");
50052
50073
  ctx.effect(() => {
50053
50074
  const quickOpen = (event) => {
50054
50075
  if (event.key.toLowerCase() !== "p" || !(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) return;
@@ -50063,7 +50084,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50063
50084
  return () => {
50064
50085
  window.removeEventListener("keydown", quickOpen, true);
50065
50086
  };
50066
- }, "acryl-blends-frame: quick open");
50087
+ }, "@acryldev/blends-frame: quick open");
50067
50088
  ctx.slots.inject("settings.launcher", () => ctx.slots.register({ name: "settings.launcher" }, SettingsLauncher));
50068
50089
  ctx.slots.inject("settings.action", () => ctx.slots.register({
50069
50090
  name: "settings.action",
@@ -50071,7 +50092,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50071
50092
  order: 20
50072
50093
  }, SettingsExpand));
50073
50094
  ctx.effect(() => {
50074
- const presenter = new acryl_app_shell_client.DesktopThemePresenter();
50095
+ const presenter = new _acryldev_app_shell_client.DesktopThemePresenter();
50075
50096
  presenter.apply(ctx.theme.getTheme());
50076
50097
  const off = ctx.on("theme/change", (snapshot) => {
50077
50098
  presenter.apply(snapshot);
@@ -50081,10 +50102,10 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50081
50102
  off();
50082
50103
  presenter.dispose();
50083
50104
  };
50084
- }, "acryl-blends-frame: theme presenter");
50105
+ }, "@acryldev/blends-frame: theme presenter");
50085
50106
  ctx.effect(() => {
50086
50107
  const read = () => {
50087
- if (document.visibilityState === "visible") frameState.refresh();
50108
+ if (shouldReadOnTick(document.visibilityState, frameState.getSnapshot().status)) frameState.refresh();
50088
50109
  };
50089
50110
  frameState.refresh();
50090
50111
  const timer = window.setInterval(read, FRAME_STATE_INTERVAL_MS);
@@ -50095,14 +50116,14 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50095
50116
  document.removeEventListener("visibilitychange", read);
50096
50117
  window.removeEventListener("focus", read);
50097
50118
  };
50098
- }, "acryl-blends-frame: read the frame state");
50119
+ }, "@acryldev/blends-frame: read the frame state");
50099
50120
  ctx.effect(() => {
50100
50121
  const controller = new AbortController();
50101
50122
  appReload.run(controller.signal);
50102
50123
  return () => {
50103
50124
  controller.abort();
50104
50125
  };
50105
- }, "acryl-blends-frame: follow the app's code");
50126
+ }, "@acryldev/blends-frame: follow the app's code");
50106
50127
  ctx.effect(() => {
50107
50128
  branchChats.load();
50108
50129
  const reconcile = () => {
@@ -50134,12 +50155,12 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50134
50155
  offChats();
50135
50156
  offPrune();
50136
50157
  };
50137
- }, "acryl-blends-frame: the chat on screen is the checked-out branch's");
50158
+ }, "@acryldev/blends-frame: the chat on screen is the checked-out branch's");
50138
50159
  const agents = new AgentsState(createWorkspaceAgentsApi());
50139
50160
  ctx.effect(() => {
50140
50161
  agents.refresh();
50141
50162
  return () => {};
50142
- }, "acryl-blends-frame: load the agents");
50163
+ }, "@acryldev/blends-frame: load the agents");
50143
50164
  ctx.plugin(settingsSharedPlugin());
50144
50165
  ctx.plugin(agentsSettingsPlugin(agents));
50145
50166
  const appPlugins = createAppPluginsApi();
@@ -50227,7 +50248,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50227
50248
  plugins: "插件",
50228
50249
  app: "应用"
50229
50250
  }
50230
- }), "acryl-blends-frame: dictionary");
50251
+ }), "@acryldev/blends-frame: dictionary");
50231
50252
  const t = child.locale.bind(LOCALE_NAMESPACE);
50232
50253
  if (desktop !== void 0) child.slots.inject("settings.section", () => child.slots.register({
50233
50254
  name: "settings.section",
@@ -50273,7 +50294,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50273
50294
  })
50274
50295
  }, TurnSaveFooter));
50275
50296
  ctx.inject(["sessions"], (child) => {
50276
- child.effect(() => chats.watch(child.sessions), "acryl-blends-frame: chats follow the sessions");
50297
+ child.effect(() => chats.watch(child.sessions), "@acryldev/blends-frame: chats follow the sessions");
50277
50298
  });
50278
50299
  ctx.plugin({
50279
50300
  name: "acryl-blends-frame-element-selection",
@@ -50360,7 +50381,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50360
50381
  log: (path) => versionsApi.log(path),
50361
50382
  save: async (path, message) => {
50362
50383
  await snapshot.capture().catch((cause) => {
50363
- console.warn(`acryl-blends-frame: the version was saved without a capture: ${cause instanceof Error ? cause.message : String(cause)}`);
50384
+ console.warn(`@acryldev/blends-frame: the version was saved without a capture: ${cause instanceof Error ? cause.message : String(cause)}`);
50364
50385
  });
50365
50386
  return versionsApi.save(path, message);
50366
50387
  },
@@ -50389,7 +50410,7 @@ body[data-bf-settings-full] [data-shortcut-modal="settings"] { width: calc(100vw
50389
50410
  }
50390
50411
  }
50391
50412
  })
50392
- }, BlendsFrame), "acryl-blends-frame: root slot");
50413
+ }, BlendsFrame), "@acryldev/blends-frame: root slot");
50393
50414
  }
50394
50415
  exports.apply = apply;
50395
50416
  exports.inject = inject;