replicas-cli 0.3.143 → 0.3.144

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.
Files changed (2) hide show
  1. package/dist/index.cjs +21 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -26438,7 +26438,7 @@ var FONT_SANS = '"General Sans", system-ui, -apple-system, "Segoe UI", sans-seri
26438
26438
  var FONT_MONO = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace';
26439
26439
  var CHART_COLORS = {
26440
26440
  dark: ["#199e70", "#3987e5", "#d95926", "#9085e9", "#c98500", "#d55181"],
26441
- light: ["#2f9d57", "#2a78d6", "#eb6834", "#4a3aa7", "#eda100", "#e87ba4"]
26441
+ light: ["#2f9d57", "#2a78d6", "#eb6834", "#4a3aa7", "#976202", "#d84497"]
26442
26442
  };
26443
26443
  function visualTheme(appearance, fontUrl) {
26444
26444
  const colors = DESIGN_COLORS[appearance];
@@ -26471,12 +26471,14 @@ var VISUAL_PAGE_RULES = `- Write one self-contained HTML file with inline <style
26471
26471
  - Let content set the height. Never use 100vh, height:100%, or min-height:100vh on html, body, or the outer element; publishing refuses a page whose height follows the frame. Give charts fixed pixel heights.
26472
26472
  - Color everything with the theme variables so the page follows light and dark mode live: --foreground, --muted-foreground (secondary text), --background, --muted (subtle fills), --accent, --border, --primary and --primary-foreground (Replicas green), --destructive, --warning, --code-background, --code-foreground, and --chart-1 to --chart-6 for series (use them in order and label series directly). Never hardcode a light or dark palette. A canvas or chart library that needs literal colors can read them with getComputedStyle(document.documentElement) and redraw on matchMedia("(prefers-color-scheme: dark)") changes.
26473
26473
  - Text is 13px General Sans, like the chat; --font-sans and --font-mono are set. Keep Replicas' flat look: separate sections with 1px var(--border) lines or var(--muted) fills, without shadows or rounded cards. Use var(--radius) only on small controls.
26474
+ - A mockup of a specific product's UI, such as a client's app or a competitor's screen, is the exception: give it its own panel with at least 16px of padding and use that product's real colors, fonts, corners, and shadows inside it, so it looks like the product. Everything around the panel follows the rules above.
26474
26475
  - Interaction is welcome: hover details, tabs, toggles, sliders. Links open in a new browser tab.
26475
26476
  - Keep the top-right corner (about 110\xD740px) free of anything essential: the chat shows the visual's actions there on hover.`;
26476
26477
  var THEME_FRAGMENT_KEY = "replicas-theme";
26477
26478
  var HOST_CONTEXT_CHANGED_METHOD = "ui/notifications/host-context-changed";
26478
26479
  var SIZE_CHANGED_METHOD = "ui/notifications/size-changed";
26479
26480
  var OPEN_LINK_METHOD = "ui/open-link";
26481
+ var OPEN_IMAGE_METHOD = "replicas/open-image";
26480
26482
  function visualThemeFragment(theme) {
26481
26483
  return `#${THEME_FRAGMENT_KEY}=${encodeURIComponent(JSON.stringify(theme))}`;
26482
26484
  }
@@ -26524,6 +26526,23 @@ var BOOTSTRAP_SCRIPT = `
26524
26526
  }, true);
26525
26527
  }
26526
26528
  if (!framed && !nativeView) return;
26529
+ window.addEventListener('click', (event) => {
26530
+ const image = event.composedPath()[0];
26531
+ if (!event.isTrusted || event.defaultPrevented || !(image instanceof HTMLImageElement) || image.closest('a[href], button')) return;
26532
+ let src = image.currentSrc || image.src;
26533
+ if (/^blob:/i.test(src) || (nativeView && /^data:image\\/svg|\\.svg(?:[?#]|$)/i.test(src))) {
26534
+ try {
26535
+ const canvas = document.createElement('canvas');
26536
+ canvas.width = (image.naturalWidth || image.width) * 2;
26537
+ canvas.height = (image.naturalHeight || image.height) * 2;
26538
+ canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height);
26539
+ src = canvas.toDataURL('image/png');
26540
+ } catch {
26541
+ return;
26542
+ }
26543
+ }
26544
+ if (src) post({ jsonrpc: '2.0', method: '${OPEN_IMAGE_METHOD}', params: { src, name: image.alt } });
26545
+ });
26527
26546
  let reportedHeight;
26528
26547
  const reportHeight = () => {
26529
26548
  const height = ${VISUAL_CONTENT_HEIGHT_EXPRESSION};
@@ -29023,7 +29042,7 @@ var headlessAgentRequestSchema = external_exports.object({
29023
29042
  });
29024
29043
 
29025
29044
  // ../shared/src/cli-version.ts
29026
- var CLI_VERSION = "0.3.143";
29045
+ var CLI_VERSION = "0.3.144";
29027
29046
 
29028
29047
  // ../shared/src/version.ts
29029
29048
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.143",
3
+ "version": "0.3.144",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {