@cueloop/client 0.1.0-alpha.54 → 0.1.0-alpha.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cueloop/client",
3
- "version": "0.1.0-alpha.54",
3
+ "version": "0.1.0-alpha.56",
4
4
  "description": "The cueloop review UI: projection renderer, keyboard grammar, review rail",
5
5
  "homepage": "https://github.com/mmurakaru/cueloop#readme",
6
6
  "bugs": {
@@ -26,10 +26,10 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@cueloop/daemon": "0.1.0-alpha.54",
30
- "@cueloop/extension-api": "0.1.0-alpha.54",
31
- "@cueloop/integration-obsidian": "0.1.0-alpha.54",
32
- "@cueloop/schema": "0.1.0-alpha.54",
29
+ "@cueloop/daemon": "0.1.0-alpha.56",
30
+ "@cueloop/extension-api": "0.1.0-alpha.56",
31
+ "@cueloop/integration-obsidian": "0.1.0-alpha.56",
32
+ "@cueloop/schema": "0.1.0-alpha.56",
33
33
  "@opentui/core": "^0.5.8",
34
34
  "@opentui/keymap": "0.5.8",
35
35
  "@opentui/react": "^0.5.8",
@@ -140,6 +140,16 @@ export async function launchPrototypeRenderer(options: LaunchOptions): Promise<P
140
140
  // `load` waits for images and styles but skips networkidle0's fixed 500ms
141
141
  // idle window, which a static local file would otherwise always pay
142
142
  await page.goto(pathToFileURL(options.filePath).href, { waitUntil: "load" });
143
+ // Render the mockup on the terminal's own surface rather than on an opaque
144
+ // page: strip the root background so it never paints a square box, and the
145
+ // capture (taken with alpha, below) lets the active terminal theme show
146
+ // through around the mockup's own components - the prototype emerges into
147
+ // whatever theme is running instead of sitting in a grey card.
148
+ await page.evaluate(() => {
149
+ for (const element of [document.documentElement, document.body]) {
150
+ element?.style.setProperty("background", "transparent", "important");
151
+ }
152
+ });
143
153
  } catch (error) {
144
154
  await page.close().catch(() => undefined);
145
155
  throw error;
@@ -148,7 +158,13 @@ export async function launchPrototypeRenderer(options: LaunchOptions): Promise<P
148
158
  return {
149
159
  viewport: options.viewport,
150
160
  async screenshot() {
151
- const buffer = await page.screenshot({ type: "png", encoding: "binary" });
161
+ // omitBackground keeps the alpha from the stripped page background, so the
162
+ // terminal composites the mockup over its own theme surface.
163
+ const buffer = await page.screenshot({
164
+ type: "png",
165
+ encoding: "binary",
166
+ omitBackground: true,
167
+ });
152
168
  return new Uint8Array(buffer as Buffer);
153
169
  },
154
170
  async elementAt(cssX, cssY) {