@ggui-ai/dev-stack 0.2.0-alpha.3 → 0.2.0-alpha.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-proxy.d.ts","sourceRoot":"","sources":["../../src/dev-server/sandbox-proxy.ts"],"names":[],"mappings":"AAoDA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AAuKD;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAuEnC"}
1
+ {"version":3,"file":"sandbox-proxy.d.ts","sourceRoot":"","sources":["../../src/dev-server/sandbox-proxy.ts"],"names":[],"mappings":"AAoDA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AA4KD;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAuEnC"}
@@ -103,7 +103,12 @@ const SANDBOX_HTML = `<!doctype html>
103
103
  <meta name="color-scheme" content="light dark">
104
104
  <title>ggui sandbox proxy</title>
105
105
  <style>
106
- html, body { margin: 0; height: 100vh; width: 100vw; background-color: transparent; }
106
+ /* True viewport fill — this proxy doc is the iframe's top-level page.
107
+ 'vh' first as the universally-supported floor; 'dvh' (dynamic
108
+ viewport height) overrides on browsers that support it so mobile
109
+ URL-bar collapse doesn't clip the surface. 'width: 100%' avoids the
110
+ '100vw' horizontal-scrollbar overflow without needing 'dvw'. */
111
+ html, body { margin: 0; height: 100vh; height: 100dvh; width: 100%; background-color: transparent; }
107
112
  body { display: flex; flex-direction: column; }
108
113
  * { box-sizing: border-box; }
109
114
  iframe {
@@ -39069,7 +39069,7 @@ var KNOWN_PERMISSION_NAMES_SET2 = new Set(KNOWN_PERMISSION_NAMES);
39069
39069
  var import_react3 = __toESM(require_react(), 1);
39070
39070
  var DECODER = new TextDecoder();
39071
39071
 
39072
- // ../ggui-react/dist/chunk-T7BUC3L2.mjs
39072
+ // ../ggui-react/dist/chunk-HGBOTWNI.mjs
39073
39073
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
39074
39074
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
39075
39075
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
@@ -42095,6 +42095,78 @@ function getDefaultThemeId() {
42095
42095
  return "ggui";
42096
42096
  }
42097
42097
  var ThemeContext = (0, import_react10.createContext)(null);
42098
+ var COLOR_MIX_SUPPORTS = "@supports (color: color-mix(in srgb, red, blue))";
42099
+ function resolvePrimary500Hex(cssVariables) {
42100
+ const match = cssVariables.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);
42101
+ return match ? match[1] : null;
42102
+ }
42103
+ function hexToRgb2(hex3) {
42104
+ let h2 = hex3.replace("#", "");
42105
+ if (h2.length === 3) {
42106
+ h2 = h2.split("").map((c) => c + c).join("");
42107
+ }
42108
+ if (h2.length !== 6)
42109
+ return null;
42110
+ const r = Number.parseInt(h2.slice(0, 2), 16);
42111
+ const g2 = Number.parseInt(h2.slice(2, 4), 16);
42112
+ const b2 = Number.parseInt(h2.slice(4, 6), 16);
42113
+ if (Number.isNaN(r) || Number.isNaN(g2) || Number.isNaN(b2))
42114
+ return null;
42115
+ return { r, g: g2, b: b2 };
42116
+ }
42117
+ function precomputePrimaryColorMix(value, primary500Hex) {
42118
+ const rgb = hexToRgb2(primary500Hex);
42119
+ if (!rgb)
42120
+ return value;
42121
+ return value.replace(/color-mix\(\s*in srgb\s*,\s*var\(--ggui-color-primary-500\)\s+(\d+(?:\.\d+)?)%\s*,\s*transparent\s*\)/g, (_match, pct) => {
42122
+ const alpha = Number(pct) / 100;
42123
+ const a = Number(alpha.toFixed(4)).toString();
42124
+ return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${a})`;
42125
+ });
42126
+ }
42127
+ function partitionColorMixDeclarations(block) {
42128
+ const open = block.indexOf("{");
42129
+ const close = block.lastIndexOf("}");
42130
+ if (open === -1 || close === -1)
42131
+ return { base: block, colorMix: [] };
42132
+ const selector = block.slice(0, open + 1);
42133
+ const body = block.slice(open + 1, close);
42134
+ const baseLines = [];
42135
+ const colorMixLines = [];
42136
+ for (const rawLine of body.split("\n")) {
42137
+ if (rawLine.trim() === "")
42138
+ continue;
42139
+ if (rawLine.includes("color-mix("))
42140
+ colorMixLines.push(rawLine);
42141
+ else
42142
+ baseLines.push(rawLine);
42143
+ }
42144
+ return {
42145
+ base: `${selector}
42146
+ ${baseLines.join("\n")}
42147
+ }`,
42148
+ colorMix: colorMixLines
42149
+ };
42150
+ }
42151
+ function withColorMixFallback(block, selectorPrefix, primary500Hex) {
42152
+ if (!primary500Hex || !block.includes("color-mix("))
42153
+ return block;
42154
+ const { base, colorMix } = partitionColorMixDeclarations(block);
42155
+ if (colorMix.length === 0)
42156
+ return block;
42157
+ const fallbackLines = colorMix.map((line) => precomputePrimaryColorMix(line, primary500Hex));
42158
+ const fallbackBlock = `${selectorPrefix} {
42159
+ ${fallbackLines.join("\n")}
42160
+ }`;
42161
+ const modernBlock = `${COLOR_MIX_SUPPORTS} {
42162
+ ${selectorPrefix} {
42163
+ ${colorMix.join("\n")}
42164
+ }
42165
+ }`;
42166
+ return `${base}
42167
+ ${fallbackBlock}
42168
+ ${modernBlock}`;
42169
+ }
42098
42170
  function getScopedCssTokens(scopeClass, mode = "light") {
42099
42171
  return getScopedThemeCss(getDefaultThemeId(), scopeClass, mode);
42100
42172
  }
@@ -42106,18 +42178,14 @@ function getScopedThemeCss(themeId, scopeClass, mode = "light") {
42106
42178
  return "";
42107
42179
  return getScopedThemeCss(defaultId, scopeClass, mode);
42108
42180
  }
42109
- const scoped = theme8.cssVariables.replace(/^:root\s*\{/, `.${scopeClass} {`);
42181
+ const primary500 = resolvePrimary500Hex(theme8.cssVariables);
42182
+ const scoped = withColorMixFallback(theme8.cssVariables.replace(/^:root\s*\{/, `.${scopeClass} {`), `.${scopeClass}`, primary500);
42110
42183
  const baseInherits = `.${scopeClass} {
42111
42184
  font-family: var(--ggui-font-family-sans);
42112
42185
  color: var(--ggui-color-onSurface);
42113
42186
  background-color: transparent;
42114
42187
  }`;
42115
- const gradientTokens = `.${scopeClass} {
42116
- --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);
42117
- --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-surface)) 100%);
42118
- --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);
42119
- --ggui-effect-glow-primary-strong: 0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset;
42120
- }`;
42188
+ const gradientTokens = buildGradientTokens(scopeClass, primary500);
42121
42189
  return `${scoped}
42122
42190
  ${baseInherits}
42123
42191
  ${gradientTokens}
@@ -42125,6 +42193,39 @@ ${theme8.cssKeyframes}
42125
42193
  .${scopeClass} *, .${scopeClass} *::before, .${scopeClass} *::after { box-sizing: border-box; }
42126
42194
  .${scopeClass} h1, .${scopeClass} h2, .${scopeClass} h3, .${scopeClass} h4, .${scopeClass} h5, .${scopeClass} h6, .${scopeClass} button, .${scopeClass} input, .${scopeClass} textarea, .${scopeClass} select { font-family: inherit; }`;
42127
42195
  }
42196
+ function buildGradientTokens(scopeClass, primary500Hex) {
42197
+ const selector = `.${scopeClass}`;
42198
+ const primaryGradient = ` --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);`;
42199
+ const surfaceGradientModern = ` --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-surface)) 100%);`;
42200
+ const glowModern = ` --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);`;
42201
+ const glowStrongModern = ` --ggui-effect-glow-primary-strong: 0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset;`;
42202
+ if (!primary500Hex) {
42203
+ return `${selector} {
42204
+ ${primaryGradient}
42205
+ ${surfaceGradientModern}
42206
+ ${glowModern}
42207
+ ${glowStrongModern}
42208
+ }`;
42209
+ }
42210
+ const surfaceGradientFallback = ` --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);`;
42211
+ const glowFallback = ` --ggui-effect-glow-primary: ${precomputePrimaryColorMix("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)", primary500Hex)};`;
42212
+ const glowStrongFallback = ` --ggui-effect-glow-primary-strong: ${precomputePrimaryColorMix("0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset", primary500Hex)};`;
42213
+ const baseBlock = `${selector} {
42214
+ ${primaryGradient}
42215
+ ${surfaceGradientFallback}
42216
+ ${glowFallback}
42217
+ ${glowStrongFallback}
42218
+ }`;
42219
+ const modernBlock = `${COLOR_MIX_SUPPORTS} {
42220
+ ${selector} {
42221
+ ${surfaceGradientModern}
42222
+ ${glowModern}
42223
+ ${glowStrongModern}
42224
+ }
42225
+ }`;
42226
+ return `${baseBlock}
42227
+ ${modernBlock}`;
42228
+ }
42128
42229
  var WIRE_EXPORTS = [
42129
42230
  // Hooks
42130
42231
  "useAction",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/dev-stack",
3
- "version": "0.2.0-alpha.3",
3
+ "version": "0.2.0-alpha.4",
4
4
  "description": "Shared local dev engine for the ggui protocol: local UI registry discovery, compile-on-demand, filesystem watcher with SSE, and a read-only HTTP surface for dev tooling. Framework-neutral — agent runtime supervision plugs in via an adapter seam, so no agent SDK is hardcoded.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -29,9 +29,9 @@
29
29
  "chokidar": "^4.0.3",
30
30
  "esbuild": "^0.25.12",
31
31
  "tinyglobby": "^0.2.16",
32
- "@ggui-ai/agent-runtime": "0.2.0-alpha.3",
33
- "@ggui-ai/ui-registry": "0.2.0-alpha.3",
34
- "@ggui-ai/project-config": "0.2.0-alpha.3"
32
+ "@ggui-ai/agent-runtime": "0.2.0-alpha.4",
33
+ "@ggui-ai/ui-registry": "0.2.0-alpha.4",
34
+ "@ggui-ai/project-config": "0.2.0-alpha.4"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^24.0.0",
@@ -41,9 +41,9 @@
41
41
  "react-dom": "^19.0.0",
42
42
  "typescript": "^5.0.0",
43
43
  "vitest": "^3.0.0",
44
- "@ggui-ai/design": "0.2.0-alpha.3",
45
- "@ggui-ai/react": "0.2.0-alpha.3",
46
- "@ggui-ai/wire": "0.2.0-alpha.3"
44
+ "@ggui-ai/react": "0.2.0-alpha.4",
45
+ "@ggui-ai/design": "0.2.0-alpha.4",
46
+ "@ggui-ai/wire": "0.2.0-alpha.4"
47
47
  },
48
48
  "repository": {
49
49
  "type": "git",