@ggui-ai/dev-stack 0.17.0 → 0.18.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.
@@ -29579,6 +29579,8 @@ var NEUTRAL_T = [0.04, 0.08, 0.16, 0.28, 0.44, 0.58, 0.7, 0.8, 0.9, 0.96];
29579
29579
  var FAMILIES = ["primary", "tertiary", "success", "warning", "error", "info"];
29580
29580
  var NAMED_SPACING = { xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" };
29581
29581
  var SIZE_EXP = { xs: -2, sm: -1, base: 0, lg: 1, xl: 2, "2xl": 3, "3xl": 4, "4xl": 5 };
29582
+ var ROLE_STOP = { display: "4xl", h1: "3xl", h2: "2xl", body: "base", label: "xs" };
29583
+ var LAYER1_SPACING_UNIT_PX = 4;
29582
29584
  function tokenValue(t) {
29583
29585
  if (t === void 0 || t === null || typeof t !== "object" || !("$value" in t))
29584
29586
  return void 0;
@@ -29734,11 +29736,51 @@ function deriveThemeVariables(doc, mode) {
29734
29736
  for (const [stop, exp] of Object.entries(SIZE_EXP)) {
29735
29737
  V[`--ggui-font-size-${stop}`] = base && Number.isFinite(ratio) && ratio > 0 ? `${Math.round(base.n * ratio ** exp * 1e3) / 1e3}${base.unit}` : fontSize[stop];
29736
29738
  }
29739
+ const typeScale = doc.typeScale;
29740
+ if (typeScale !== void 0) {
29741
+ const bodySize = parseSize(tokenValue(typeScale.body?.size) ?? "");
29742
+ if (bodySize !== void 0) {
29743
+ const r = Number.isFinite(ratio) && ratio > 0 ? ratio : 1.25;
29744
+ for (const [stop, exp] of Object.entries(SIZE_EXP)) {
29745
+ V[`--ggui-font-size-${stop}`] = `${Math.round(bodySize.n * r ** exp * 1e3) / 1e3}${bodySize.unit}`;
29746
+ }
29747
+ }
29748
+ for (const [role, stop] of Object.entries(ROLE_STOP)) {
29749
+ const size = tokenValue(typeScale[role]?.size);
29750
+ if (size !== void 0)
29751
+ V[`--ggui-font-size-${stop}`] = size;
29752
+ }
29753
+ const headingWeight = tokenValue(typeScale.h1?.weight);
29754
+ if (headingWeight !== void 0)
29755
+ V["--ggui-font-weight-heading"] = headingWeight;
29756
+ const bodyWeight = tokenValue(typeScale.body?.weight);
29757
+ if (bodyWeight !== void 0)
29758
+ V["--ggui-font-weight-normal"] = bodyWeight;
29759
+ const headingTracking = tokenValue(typeScale.h1?.tracking);
29760
+ if (headingTracking !== void 0)
29761
+ V["--ggui-letter-spacing-heading"] = headingTracking;
29762
+ const bodyTracking = tokenValue(typeScale.body?.tracking);
29763
+ if (bodyTracking !== void 0)
29764
+ V["--ggui-letter-spacing-body"] = bodyTracking;
29765
+ const bodyLeading = tokenValue(typeScale.body?.leading);
29766
+ if (bodyLeading !== void 0)
29767
+ V["--ggui-font-lineHeight-normal"] = bodyLeading;
29768
+ }
29737
29769
  const sp = doc.spacing;
29770
+ const rhythmBase = doc.rhythm ? parseSize(tokenValue(doc.rhythm.base) ?? "") : void 0;
29771
+ const onRhythm = (layer1) => {
29772
+ if (rhythmBase === void 0)
29773
+ return void 0;
29774
+ const step = parseSize(layer1);
29775
+ if (step === void 0)
29776
+ return void 0;
29777
+ const scaled = step.n / LAYER1_SPACING_UNIT_PX * rhythmBase.n;
29778
+ return `${Math.round(scaled * 1e3) / 1e3}${rhythmBase.unit}`;
29779
+ };
29738
29780
  for (const [key, value] of Object.entries(spacing))
29739
- V[`--ggui-spacing-${key}`] = stated(sp, key) ?? String(value);
29781
+ V[`--ggui-spacing-${key}`] = onRhythm(String(value)) ?? stated(sp, key) ?? String(value);
29740
29782
  for (const [key, value] of Object.entries(NAMED_SPACING))
29741
- V[`--ggui-spacing-${key}`] = stated(sp, key) ?? value;
29783
+ V[`--ggui-spacing-${key}`] = onRhythm(value) ?? stated(sp, key) ?? value;
29742
29784
  const rad = doc.shape?.radius;
29743
29785
  for (const [key, value] of Object.entries(radius))
29744
29786
  V[`--ggui-shape-radius-${key}`] = stated(rad, key) ?? String(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/dev-stack",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
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",
@@ -28,9 +28,9 @@
28
28
  "dependencies": {
29
29
  "chokidar": "^4.0.3",
30
30
  "esbuild": "^0.28.2",
31
- "@ggui-ai/agent-runtime": "0.17.0",
32
- "@ggui-ai/project-config": "0.17.0",
33
- "@ggui-ai/ui-registry": "0.17.0"
31
+ "@ggui-ai/agent-runtime": "0.18.0",
32
+ "@ggui-ai/project-config": "0.18.0",
33
+ "@ggui-ai/ui-registry": "0.18.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^24.0.0",
@@ -40,9 +40,9 @@
40
40
  "react-dom": "^19.0.0",
41
41
  "typescript": "^5.0.0",
42
42
  "vitest": "^3.2.6",
43
- "@ggui-ai/design": "0.17.0",
44
- "@ggui-ai/mcp-apps-react": "0.17.0",
45
- "@ggui-ai/wire": "0.17.0"
43
+ "@ggui-ai/design": "0.18.0",
44
+ "@ggui-ai/mcp-apps-react": "0.18.0",
45
+ "@ggui-ai/wire": "0.18.0"
46
46
  },
47
47
  "repository": {
48
48
  "type": "git",