replicas-cli 0.3.436 → 0.3.437
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/dist/index.cjs +7 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26296,7 +26296,7 @@ function injectVisualBootstrap(html) {
|
|
|
26296
26296
|
const at = htmlOpen ? htmlOpen.index + htmlOpen[0].length : doctype ? doctype[0].length : 0;
|
|
26297
26297
|
return `${prefix}${html.slice(0, at)}<head>${markup}</head>${html.slice(at)}`;
|
|
26298
26298
|
}
|
|
26299
|
-
var VISUAL_MEASURE_WIDTHS, VISUAL_COLUMN_WIDTH, VISUAL_PHONE_WIDTH, VISUAL_MIN_HEIGHT, VISUAL_MAX_HEIGHT, VISUAL_FONT_PATH, FONT_SANS, FONT_MONO, VISUAL_PAGE_RULES, THEME_FRAGMENT_KEY, HOST_CONTEXT_CHANGED_METHOD, SIZE_CHANGED_METHOD, OPEN_LINK_METHOD, OPEN_IMAGE_METHOD, VISUAL_CONTENT_HEIGHT_EXPRESSION, BASE_CSS, THEME_STYLE_ID, BOOTSTRAP_SCRIPT, blankNonMarkup;
|
|
26299
|
+
var VISUAL_MEASURE_WIDTHS, VISUAL_COLUMN_WIDTH, VISUAL_PHONE_WIDTH, VISUAL_MIN_HEIGHT, VISUAL_MAX_HEIGHT, VISUAL_FONT_PATH, FONT_FAMILIES, FONT_SANS, FONT_MONO, VISUAL_PAGE_RULES, THEME_FRAGMENT_KEY, HOST_CONTEXT_CHANGED_METHOD, SIZE_CHANGED_METHOD, OPEN_LINK_METHOD, OPEN_IMAGE_METHOD, VISUAL_CONTENT_HEIGHT_EXPRESSION, BASE_CSS, THEME_STYLE_ID, BOOTSTRAP_SCRIPT, blankNonMarkup;
|
|
26300
26300
|
var init_visuals = __esm({
|
|
26301
26301
|
"../shared/src/visuals.ts"() {
|
|
26302
26302
|
"use strict";
|
|
@@ -26307,14 +26307,15 @@ var init_visuals = __esm({
|
|
|
26307
26307
|
VISUAL_PHONE_WIDTH = 390;
|
|
26308
26308
|
VISUAL_MIN_HEIGHT = 24;
|
|
26309
26309
|
VISUAL_MAX_HEIGHT = 2e4;
|
|
26310
|
-
VISUAL_FONT_PATH = "/fonts/
|
|
26311
|
-
|
|
26310
|
+
VISUAL_FONT_PATH = "/fonts/InterVariable.woff2";
|
|
26311
|
+
FONT_FAMILIES = ["Inter", "General Sans"];
|
|
26312
|
+
FONT_SANS = `${FONT_FAMILIES.map((family) => `"${family}"`).join(", ")}, system-ui, -apple-system, "Segoe UI", sans-serif`;
|
|
26312
26313
|
FONT_MONO = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace';
|
|
26313
26314
|
VISUAL_PAGE_RULES = `- Write one self-contained HTML file with inline <style> and <script>; a fragment without <html> or <head> is fine. Put data inline instead of fetching it. Libraries may load from public CDNs such as cdn.jsdelivr.net. Local images written as absolute paths (src="/abs/shot.png", url(/abs/bg.webp)) are inlined when you publish.
|
|
26314
26315
|
- The page sits directly on the chat background, as wide as your reply (about ${VISUAL_COLUMN_WIDTH}px on desktop, ${VISUAL_PHONE_WIDTH - 30}px on phones), with its left edge aligned to your text. Leave html and body transparent, use a fluid width with no outer padding, and add no outer card, border, or title banner: the page is part of your reply.
|
|
26315
26316
|
- 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.
|
|
26316
26317
|
- 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 (the brand accent, for emphasis), --success (passed, done, or added), --destructive, --warning, --code-background, --code-foreground, and --chart-1 to --chart-8 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.
|
|
26317
|
-
- Text is 13px
|
|
26318
|
+
- Text is 13px Inter, 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.
|
|
26318
26319
|
- 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.
|
|
26319
26320
|
- Interaction is welcome: hover details, tabs, toggles, sliders. Links open in a new browser tab.
|
|
26320
26321
|
- Keep the top-right corner (about 110\xD740px) free of anything essential: the chat shows the visual's actions there on hover.`;
|
|
@@ -26334,7 +26335,7 @@ var init_visuals = __esm({
|
|
|
26334
26335
|
const post = (message) => nativeView ? nativeView.postMessage(JSON.stringify(message)) : window.parent.postMessage(message, '*');
|
|
26335
26336
|
const applyTheme = (theme) => {
|
|
26336
26337
|
const variables = Object.entries(theme.variables).map(([name, value]) => name + ':' + value + ';').join('');
|
|
26337
|
-
const font = theme.fontUrl ? '@font-face{font-family:"
|
|
26338
|
+
const font = theme.fontUrl ? ${JSON.stringify(FONT_FAMILIES)}.map((family) => '@font-face{font-family:"' + family + '";src:url("' + theme.fontUrl + '") format("woff2");font-weight:100 900;font-display:swap}').join('') : '';
|
|
26338
26339
|
style.textContent = ':root{color-scheme:' + theme.appearance + ';' + variables + '}' + font + ${JSON.stringify(BASE_CSS)};
|
|
26339
26340
|
};
|
|
26340
26341
|
try {
|
|
@@ -38646,7 +38647,7 @@ var CLI_VERSION;
|
|
|
38646
38647
|
var init_cli_version = __esm({
|
|
38647
38648
|
"../shared/src/cli-version.ts"() {
|
|
38648
38649
|
"use strict";
|
|
38649
|
-
CLI_VERSION = "0.3.
|
|
38650
|
+
CLI_VERSION = "0.3.437";
|
|
38650
38651
|
}
|
|
38651
38652
|
});
|
|
38652
38653
|
|