@ggui-ai/dev-stack 0.15.0 → 0.16.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.
@@ -20408,7 +20408,7 @@ var KNOWN_PERMISSION_NAMES = [
20408
20408
  var KNOWN_PERMISSION_NAMES_SET = new Set(KNOWN_PERMISSION_NAMES);
20409
20409
 
20410
20410
  // ../protocol/dist/version.js
20411
- var PROTOCOL_VERSION = "draft-2026-09-04";
20411
+ var PROTOCOL_VERSION = "draft-2026-09-10";
20412
20412
  var PROTOCOL_SCHEMA_VERSION = PROTOCOL_VERSION;
20413
20413
  var CLIENT_SUPPORTED_VERSIONS = Object.freeze([
20414
20414
  PROTOCOL_SCHEMA_VERSION
@@ -20450,8 +20450,7 @@ __export(dist_exports, {
20450
20450
  StreamBus: () => StreamBus,
20451
20451
  buildActionEnvelope: () => buildActionEnvelope,
20452
20452
  buildWireConfig: () => buildWireConfig,
20453
- connectionStore: () => connectionStore,
20454
- createConnectionStore: () => createConnectionStore,
20453
+ connectionSource: () => connectionSource,
20455
20454
  useAction: () => useAction,
20456
20455
  useApp: () => useApp,
20457
20456
  useAuth: () => useAuth,
@@ -20604,10 +20603,46 @@ function useApp() {
20604
20603
  var import_react5 = __toESM(require_react(), 1);
20605
20604
 
20606
20605
  // ../wire/dist/connection-store.js
20606
+ var ConnectionWriterConflictError = class extends Error {
20607
+ owner;
20608
+ attemptedBy;
20609
+ constructor(owner, attemptedBy) {
20610
+ super(owner === attemptedBy ? `connection writer: '${owner}' already holds the claim and '${attemptedBy}' is claiming it again \u2014 two copies of '${owner}' in one document (a duplicate bundle of the runtime)` : `connection writer: '${owner}' holds the claim; '${attemptedBy}' cannot take it \u2014 exactly one party writes the connection state`);
20611
+ this.name = "ConnectionWriterConflictError";
20612
+ this.owner = owner;
20613
+ this.attemptedBy = attemptedBy;
20614
+ }
20615
+ };
20616
+ var ConnectionWriterReleasedError = class extends Error {
20617
+ claimant;
20618
+ constructor(claimant) {
20619
+ super(`connection writer: '${claimant}' released its claim and cannot set the connection state`);
20620
+ this.name = "ConnectionWriterReleasedError";
20621
+ this.claimant = claimant;
20622
+ }
20623
+ };
20624
+ var DOCUMENT_STORE_KEY = /* @__PURE__ */ Symbol.for("ai.ggui.wire/connection-store");
20625
+ var ConnectionStoreSlotError = class extends Error {
20626
+ key;
20627
+ constructor(key) {
20628
+ super(`connection store: the document slot ${String(key)} holds a value that is not a connection store \u2014 another copy of @ggui-ai/wire with an incompatible shape, or a foreign object. Refusing to adopt or overwrite it.`);
20629
+ this.key = key;
20630
+ this.name = "ConnectionStoreSlotError";
20631
+ }
20632
+ };
20633
+ function isConnectionStore(value) {
20634
+ if (typeof value !== "object" || value === null)
20635
+ return false;
20636
+ const source = Reflect.get(value, "source");
20637
+ if (typeof source !== "object" || source === null)
20638
+ return false;
20639
+ return typeof Reflect.get(value, "claim") === "function" && typeof Reflect.get(source, "subscribe") === "function" && typeof Reflect.get(source, "getSnapshot") === "function";
20640
+ }
20607
20641
  function createConnectionStore(initial = true) {
20608
20642
  let value = initial;
20643
+ let owner;
20609
20644
  const listeners = /* @__PURE__ */ new Set();
20610
- return {
20645
+ const source = {
20611
20646
  subscribe(listener) {
20612
20647
  listeners.add(listener);
20613
20648
  return () => {
@@ -20616,22 +20651,53 @@ function createConnectionStore(initial = true) {
20616
20651
  },
20617
20652
  getSnapshot() {
20618
20653
  return value;
20619
- },
20620
- set(connected) {
20621
- if (connected === value)
20622
- return;
20623
- value = connected;
20624
- for (const l of listeners)
20625
- l();
20626
20654
  }
20627
20655
  };
20656
+ return {
20657
+ source,
20658
+ claim(claimant) {
20659
+ if (owner !== void 0)
20660
+ throw new ConnectionWriterConflictError(owner, claimant);
20661
+ owner = claimant;
20662
+ let released = false;
20663
+ return {
20664
+ set(connected) {
20665
+ if (released)
20666
+ throw new ConnectionWriterReleasedError(claimant);
20667
+ if (connected === value)
20668
+ return;
20669
+ value = connected;
20670
+ for (const l of listeners)
20671
+ l();
20672
+ },
20673
+ release() {
20674
+ if (released)
20675
+ return;
20676
+ released = true;
20677
+ owner = void 0;
20678
+ }
20679
+ };
20680
+ }
20681
+ };
20682
+ }
20683
+ function documentConnectionStore() {
20684
+ const existing = Reflect.get(globalThis, DOCUMENT_STORE_KEY);
20685
+ if (existing !== void 0) {
20686
+ if (isConnectionStore(existing))
20687
+ return existing;
20688
+ throw new ConnectionStoreSlotError(DOCUMENT_STORE_KEY);
20689
+ }
20690
+ const created = createConnectionStore(true);
20691
+ Reflect.set(globalThis, DOCUMENT_STORE_KEY, created);
20692
+ return created;
20628
20693
  }
20629
- var connectionStore = createConnectionStore(true);
20694
+ var documentStore = documentConnectionStore();
20695
+ var connectionSource = documentStore.source;
20630
20696
 
20631
20697
  // ../wire/dist/useRender.js
20632
20698
  function useRender() {
20633
20699
  const { render } = useWireContext();
20634
- const isConnected = (0, import_react5.useSyncExternalStore)(connectionStore.subscribe, connectionStore.getSnapshot, connectionStore.getSnapshot);
20700
+ const isConnected = (0, import_react5.useSyncExternalStore)(connectionSource.subscribe, connectionSource.getSnapshot, connectionSource.getSnapshot);
20635
20701
  return { sessionId: render.sessionId, isConnected };
20636
20702
  }
20637
20703
 
@@ -20901,6 +20967,42 @@ __export2(primitives_exports, {
20901
20967
  useAnimationKey: () => useAnimationKey,
20902
20968
  useMotion: () => useMotion
20903
20969
  });
20970
+ var spacing = {
20971
+ 0: "0",
20972
+ 0.5: "2px",
20973
+ 1: "4px",
20974
+ 1.5: "6px",
20975
+ 2: "8px",
20976
+ 2.5: "10px",
20977
+ 3: "12px",
20978
+ 3.5: "14px",
20979
+ 4: "16px",
20980
+ 5: "20px",
20981
+ 6: "24px",
20982
+ 7: "28px",
20983
+ 8: "32px",
20984
+ 9: "36px",
20985
+ 10: "40px",
20986
+ 11: "44px",
20987
+ 12: "48px",
20988
+ 14: "56px",
20989
+ 16: "64px",
20990
+ 20: "80px",
20991
+ 24: "96px",
20992
+ 28: "112px",
20993
+ 32: "128px",
20994
+ 36: "144px",
20995
+ 40: "160px",
20996
+ 44: "176px",
20997
+ 48: "192px",
20998
+ 52: "208px",
20999
+ 56: "224px",
21000
+ 60: "240px",
21001
+ 64: "256px",
21002
+ 72: "288px",
21003
+ 80: "320px",
21004
+ 96: "384px"
21005
+ };
20904
21006
  var maxWidth = {
20905
21007
  xs: "320px",
20906
21008
  sm: "480px",
@@ -20992,22 +21094,23 @@ function renderWithTrait(trait, traitProps, root, children) {
20992
21094
  function resolveToneCss(tone) {
20993
21095
  switch (tone) {
20994
21096
  case "default":
20995
- return "var(--ggui-color-onSurface, #18181b)";
21097
+ return "var(--ggui-color-onContainer, #18181b)";
20996
21098
  case "muted":
20997
- return "var(--ggui-color-onSurfaceVariant, #52525b)";
21099
+ return "var(--ggui-color-onSunken, #52525b)";
20998
21100
  case "subtle":
20999
21101
  return "var(--ggui-color-neutral-500, #71717a)";
21000
21102
  case "emphasized":
21001
21103
  return "var(--ggui-color-primary-700, #0369a1)";
21002
21104
  case "loud":
21003
21105
  return "var(--ggui-color-primary-500, #0ea5e9)";
21106
+ case "error":
21107
+ return `var(--ggui-color-error, var(--ggui-color-error-500, ${SEMANTIC_TONE_FALLBACK.error}))`;
21004
21108
  case "success":
21005
21109
  case "warning":
21006
- case "error":
21007
21110
  case "info":
21008
21111
  return `var(--ggui-color-${tone}-500, ${SEMANTIC_TONE_FALLBACK[tone]})`;
21009
21112
  case "inverse":
21010
- return "var(--ggui-color-surface, #ffffff)";
21113
+ return "var(--ggui-color-container, #ffffff)";
21011
21114
  case "inherit":
21012
21115
  return "inherit";
21013
21116
  }
@@ -21021,14 +21124,15 @@ var SEMANTIC_TONE_FALLBACK = {
21021
21124
  function resolveSurfaceCss(surface) {
21022
21125
  switch (surface) {
21023
21126
  case "default":
21127
+ return "var(--ggui-color-container, #ffffff)";
21024
21128
  case "elevated":
21025
- return "var(--ggui-color-surface, #ffffff)";
21129
+ return "var(--ggui-color-elevated, #ffffff)";
21026
21130
  case "sunken":
21027
- return "var(--ggui-color-surfaceVariant, #f4f4f5)";
21131
+ return "var(--ggui-color-sunken, #f4f4f5)";
21028
21132
  case "accent":
21029
21133
  return "var(--ggui-color-primary-50, #f0f9ff)";
21030
21134
  case "inverted":
21031
- return "var(--ggui-color-onSurface, #18181b)";
21135
+ return "var(--ggui-color-onContainer, #18181b)";
21032
21136
  case "transparent":
21033
21137
  return "transparent";
21034
21138
  }
@@ -21248,7 +21352,7 @@ var lineHeightMap = {
21248
21352
  "4xl": 1.25
21249
21353
  };
21250
21354
  function Text({ children, size = "base", weight = "normal", caps = false, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
21251
- const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
21355
+ const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onContainer, #18181b)";
21252
21356
  const textStyle = {
21253
21357
  fontSize: sizeMap[size],
21254
21358
  fontWeight: weightMap[weight],
@@ -21270,6 +21374,10 @@ function Text({ children, size = "base", weight = "normal", caps = false, tone,
21270
21374
  const elementProps = { id, htmlFor, className, style: textStyle };
21271
21375
  return (0, import_react11.createElement)(is, elementProps, children);
21272
21376
  }
21377
+ var fontFamily = {
21378
+ sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
21379
+ mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'
21380
+ };
21273
21381
  var fontSize = {
21274
21382
  xs: "12px",
21275
21383
  sm: "14px",
@@ -21347,10 +21455,25 @@ var headingStyles = {
21347
21455
  letterSpacing: letterSpacing.normal
21348
21456
  }
21349
21457
  };
21458
+ var HEADING_SIZE = {
21459
+ h1: "var(--ggui-font-size-4xl, 36px)",
21460
+ h2: "var(--ggui-font-size-3xl, 30px)",
21461
+ h3: "var(--ggui-font-size-2xl, 24px)",
21462
+ h4: "var(--ggui-font-size-xl, 20px)",
21463
+ h5: "var(--ggui-font-size-lg, 18px)",
21464
+ h6: "var(--ggui-font-size-base, 16px)"
21465
+ };
21350
21466
  function Heading({ children, level = 2, tone, align, style, className }) {
21351
21467
  const tag = `h${level}`;
21352
- const headingStyle = headingStyles[tag] || headingStyles.h2;
21353
- const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
21468
+ const fallback = headingStyles[tag] || headingStyles.h2;
21469
+ const headingStyle = {
21470
+ fontSize: HEADING_SIZE[tag],
21471
+ fontWeight: `var(--ggui-font-weight-heading, ${fallback.fontWeight})`,
21472
+ fontFamily: "var(--ggui-font-family-heading, var(--ggui-font-family-sans, inherit))",
21473
+ lineHeight: fallback.lineHeight,
21474
+ letterSpacing: `var(--ggui-letter-spacing-heading, ${fallback.letterSpacing})`
21475
+ };
21476
+ const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onContainer, #18181b)";
21354
21477
  return (0, import_react12.createElement)(tag, {
21355
21478
  className,
21356
21479
  style: {
@@ -21424,8 +21547,8 @@ var variantStyles = {
21424
21547
  border: "none"
21425
21548
  },
21426
21549
  secondary: {
21427
- backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
21428
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
21550
+ backgroundColor: "var(--ggui-color-sunken, #f4f4f5)",
21551
+ color: "var(--ggui-color-onSunken, #52525b)",
21429
21552
  border: "none"
21430
21553
  },
21431
21554
  outline: {
@@ -21435,7 +21558,7 @@ var variantStyles = {
21435
21558
  },
21436
21559
  ghost: {
21437
21560
  backgroundColor: "transparent",
21438
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
21561
+ color: "var(--ggui-color-onSunken, #52525b)",
21439
21562
  border: "none"
21440
21563
  },
21441
21564
  danger: {
@@ -21492,19 +21615,19 @@ function Input({ label, placeholder, value, onChange, type = "text", error: erro
21492
21615
  }, children: [label && (0, import_jsx_runtime9.jsxs)("label", { htmlFor: inputId, style: {
21493
21616
  fontSize: "var(--ggui-font-size-sm, 14px)",
21494
21617
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21495
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21618
+ color: "var(--ggui-color-onSunken, #52525b)"
21496
21619
  }, children: [label, required && (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": "true", style: { color: "var(--ggui-color-error-500, #ef4444)", marginLeft: "2px" }, children: "*" })] }), (0, import_jsx_runtime9.jsx)("input", { id: inputId, type, placeholder, value, onChange: (e) => onChange?.(e.target.value), disabled, required, "aria-invalid": hasError || void 0, "aria-describedby": hasMessage ? messageId : void 0, style: {
21497
21620
  ...sizeStyles2[size],
21498
21621
  width: "100%",
21499
21622
  borderRadius: "var(--ggui-shape-radius-md, 8px)",
21500
21623
  border: `1px solid ${hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-outline, #d4d4d8)"}`,
21501
- backgroundColor: disabled ? "var(--ggui-color-surface, #fafafa)" : "var(--ggui-color-surface, #ffffff)",
21502
- color: "var(--ggui-color-onSurface, #18181b)",
21624
+ backgroundColor: disabled ? "var(--ggui-color-sunken, #fafafa)" : "var(--ggui-color-sunken, #ffffff)",
21625
+ color: "var(--ggui-color-onContainer, #18181b)",
21503
21626
  transition: `border-color ${duration.normal} ${easing.easeInOut}, box-shadow ${duration.normal} ${easing.easeInOut}`,
21504
21627
  boxSizing: "border-box"
21505
21628
  }, ...rest }), hasMessage && (0, import_jsx_runtime9.jsx)("span", { id: messageId, role: hasError ? "alert" : void 0, style: {
21506
21629
  fontSize: "var(--ggui-font-size-xs, 12px)",
21507
- color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSurfaceVariant, #52525b)"
21630
+ color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSunken, #52525b)"
21508
21631
  }, children: error2 || helperText })] });
21509
21632
  }
21510
21633
  function TextArea({ label, placeholder, value, onChange, rows = 4, error: error2, helperText, required, disabled, maxLength, showCount, autoResize, style, className, ...rest }) {
@@ -21522,14 +21645,14 @@ function TextArea({ label, placeholder, value, onChange, rows = 4, error: error2
21522
21645
  }, children: [label && (0, import_jsx_runtime10.jsxs)("label", { htmlFor: textareaId, style: {
21523
21646
  fontSize: "var(--ggui-font-size-sm, 14px)",
21524
21647
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21525
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21648
+ color: "var(--ggui-color-onSunken, #52525b)"
21526
21649
  }, children: [label, required && (0, import_jsx_runtime10.jsx)("span", { "aria-hidden": "true", style: { color: "var(--ggui-color-error-500, #ef4444)", marginLeft: "2px" }, children: "*" })] }), (0, import_jsx_runtime10.jsx)("textarea", { id: textareaId, placeholder, value, onChange: (e) => onChange?.(e.target.value), rows, disabled, required, maxLength, "aria-invalid": hasError || void 0, "aria-describedby": hasMessage ? messageId : void 0, style: {
21527
21650
  padding: "10px 12px",
21528
21651
  width: "100%",
21529
21652
  borderRadius: "var(--ggui-shape-radius-md, 8px)",
21530
21653
  border: `1px solid ${hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-outline, #d4d4d8)"}`,
21531
- backgroundColor: disabled ? "var(--ggui-color-surface, #fafafa)" : "var(--ggui-color-surface, #ffffff)",
21532
- color: "var(--ggui-color-onSurface, #18181b)",
21654
+ backgroundColor: disabled ? "var(--ggui-color-sunken, #fafafa)" : "var(--ggui-color-sunken, #ffffff)",
21655
+ color: "var(--ggui-color-onContainer, #18181b)",
21533
21656
  fontSize: "var(--ggui-font-size-sm, 14px)",
21534
21657
  fontFamily: "inherit",
21535
21658
  transition: `border-color ${duration.normal} ${easing.easeInOut}, box-shadow ${duration.normal} ${easing.easeInOut}`,
@@ -21537,10 +21660,10 @@ function TextArea({ label, placeholder, value, onChange, rows = 4, error: error2
21537
21660
  resize: autoResize ? "none" : "vertical"
21538
21661
  }, ...rest }), (0, import_jsx_runtime10.jsxs)("div", { style: { display: "flex", justifyContent: "space-between" }, children: [hasMessage && (0, import_jsx_runtime10.jsx)("span", { id: messageId, role: hasError ? "alert" : void 0, style: {
21539
21662
  fontSize: "var(--ggui-font-size-xs, 12px)",
21540
- color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSurfaceVariant, #52525b)"
21663
+ color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSunken, #52525b)"
21541
21664
  }, children: error2 || helperText }), showCount && maxLength && (0, import_jsx_runtime10.jsxs)("span", { style: {
21542
21665
  fontSize: "var(--ggui-font-size-xs, 12px)",
21543
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
21666
+ color: "var(--ggui-color-onSunken, #52525b)",
21544
21667
  marginLeft: "auto"
21545
21668
  }, children: [charCount, "/", maxLength] })] })] });
21546
21669
  }
@@ -21558,14 +21681,14 @@ function Select({ label, value, onChange, options, placeholder, error: error2, h
21558
21681
  return (0, import_jsx_runtime11.jsxs)("div", { className, style: { display: "flex", flexDirection: "column", gap: "var(--ggui-spacing-1, 4px)", ...style }, children: [label && (0, import_jsx_runtime11.jsxs)("label", { htmlFor: selectId, style: {
21559
21682
  fontSize: "var(--ggui-font-size-sm, 14px)",
21560
21683
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21561
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21684
+ color: "var(--ggui-color-onSunken, #52525b)"
21562
21685
  }, children: [label, required && (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", style: { color: "var(--ggui-color-error-500, #ef4444)", marginLeft: "2px" }, children: "*" })] }), (0, import_jsx_runtime11.jsxs)("select", { id: selectId, value, onChange: (e) => onChange?.(e.target.value), disabled, required, "aria-invalid": hasError || void 0, "aria-describedby": hasMessage ? messageId : void 0, style: {
21563
21686
  ...sizeStyles3[size],
21564
21687
  width: "100%",
21565
21688
  borderRadius: "var(--ggui-shape-radius-md, 8px)",
21566
21689
  border: `1px solid ${hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-outline, #d4d4d8)"}`,
21567
- backgroundColor: disabled ? "var(--ggui-color-surface, #fafafa)" : "var(--ggui-color-surface, #ffffff)",
21568
- color: value ? "var(--ggui-color-onSurface, #18181b)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
21690
+ backgroundColor: disabled ? "var(--ggui-color-sunken, #fafafa)" : "var(--ggui-color-sunken, #ffffff)",
21691
+ color: value ? "var(--ggui-color-onContainer, #18181b)" : "var(--ggui-color-onSunken, #52525b)",
21569
21692
  cursor: disabled ? "not-allowed" : "pointer",
21570
21693
  appearance: "none",
21571
21694
  backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")`,
@@ -21576,7 +21699,7 @@ function Select({ label, value, onChange, options, placeholder, error: error2, h
21576
21699
  transition: `border-color ${duration.normal} ${easing.easeInOut}, box-shadow ${duration.normal} ${easing.easeInOut}`
21577
21700
  }, ...rest, children: [placeholder && (0, import_jsx_runtime11.jsx)("option", { value: "", disabled: true, children: placeholder }), options.map((opt) => (0, import_jsx_runtime11.jsx)("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))] }), hasMessage && (0, import_jsx_runtime11.jsx)("span", { id: messageId, role: hasError ? "alert" : void 0, style: {
21578
21701
  fontSize: "var(--ggui-font-size-xs, 12px)",
21579
- color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSurfaceVariant, #52525b)"
21702
+ color: hasError ? "var(--ggui-color-error-500, #ef4444)" : "var(--ggui-color-onSunken, #52525b)"
21580
21703
  }, children: error2 || helperText })] });
21581
21704
  }
21582
21705
  function Checkbox({ label, checked, onChange, disabled, description, indeterminate, style, className }) {
@@ -21608,7 +21731,7 @@ function Checkbox({ label, checked, onChange, disabled, description, indetermina
21608
21731
  height: "18px",
21609
21732
  borderRadius: "var(--ggui-shape-radius-sm, 4px)",
21610
21733
  border: `2px solid ${checked || indeterminate ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-outline, #d4d4d8)"}`,
21611
- backgroundColor: checked || indeterminate ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-surface, #ffffff)",
21734
+ backgroundColor: checked || indeterminate ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-sunken, #ffffff)",
21612
21735
  display: "flex",
21613
21736
  alignItems: "center",
21614
21737
  justifyContent: "center",
@@ -21616,10 +21739,10 @@ function Checkbox({ label, checked, onChange, disabled, description, indetermina
21616
21739
  }, children: (checked || indeterminate) && (0, import_jsx_runtime12.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { color: "var(--ggui-color-onPrimary, #ffffff)" }, children: indeterminate ? (0, import_jsx_runtime12.jsx)("path", { d: "M2.5 6H9.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) : (0, import_jsx_runtime12.jsx)("path", { d: "M2.5 6L5 8.5L9.5 3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), (label || description) && (0, import_jsx_runtime12.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [label && (0, import_jsx_runtime12.jsx)("span", { style: {
21617
21740
  fontSize: "var(--ggui-font-size-sm, 14px)",
21618
21741
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21619
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21742
+ color: "var(--ggui-color-onSunken, #52525b)"
21620
21743
  }, children: label }), description && (0, import_jsx_runtime12.jsx)("span", { style: {
21621
21744
  fontSize: "var(--ggui-font-size-xs, 12px)",
21622
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21745
+ color: "var(--ggui-color-onSunken, #52525b)"
21623
21746
  }, children: description })] })] });
21624
21747
  }
21625
21748
  var sizeConfig = {
@@ -21667,7 +21790,7 @@ function Toggle({ label, checked, onChange, disabled, size = "md", style, classN
21667
21790
  } }) }), label && (0, import_jsx_runtime13.jsx)("span", { style: {
21668
21791
  fontSize: "var(--ggui-font-size-sm, 14px)",
21669
21792
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21670
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21793
+ color: "var(--ggui-color-onSunken, #52525b)"
21671
21794
  }, children: label })] });
21672
21795
  }
21673
21796
  function RadioGroup({ label, value, onChange, options, direction = "vertical", disabled, error: error2, style, className }) {
@@ -21679,7 +21802,7 @@ function RadioGroup({ label, value, onChange, options, direction = "vertical", d
21679
21802
  return (0, import_jsx_runtime14.jsxs)("div", { role: "radiogroup", "aria-labelledby": label ? labelId : void 0, "aria-describedby": hasError ? errorId : void 0, className, style: { display: "flex", flexDirection: "column", gap: "var(--ggui-spacing-2, 8px)", ...style }, children: [label && (0, import_jsx_runtime14.jsx)("span", { id: labelId, style: {
21680
21803
  fontSize: "var(--ggui-font-size-sm, 14px)",
21681
21804
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21682
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21805
+ color: "var(--ggui-color-onSunken, #52525b)"
21683
21806
  }, children: label }), (0, import_jsx_runtime14.jsx)("div", { style: {
21684
21807
  display: "flex",
21685
21808
  flexDirection: direction === "vertical" ? "column" : "row",
@@ -21712,7 +21835,7 @@ function RadioGroup({ label, value, onChange, options, direction = "vertical", d
21712
21835
  height: "18px",
21713
21836
  borderRadius: "var(--ggui-shape-radius-full, 9999px)",
21714
21837
  border: `2px solid ${isSelected ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-outline, #d4d4d8)"}`,
21715
- backgroundColor: "var(--ggui-color-surface, #ffffff)",
21838
+ backgroundColor: "var(--ggui-color-sunken, #ffffff)",
21716
21839
  display: "flex",
21717
21840
  alignItems: "center",
21718
21841
  justifyContent: "center",
@@ -21725,10 +21848,10 @@ function RadioGroup({ label, value, onChange, options, direction = "vertical", d
21725
21848
  } }) })] }), (0, import_jsx_runtime14.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [(0, import_jsx_runtime14.jsx)("span", { style: {
21726
21849
  fontSize: "var(--ggui-font-size-sm, 14px)",
21727
21850
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21728
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21851
+ color: "var(--ggui-color-onSunken, #52525b)"
21729
21852
  }, children: option.label }), option.description && (0, import_jsx_runtime14.jsx)("span", { style: {
21730
21853
  fontSize: "var(--ggui-font-size-xs, 12px)",
21731
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21854
+ color: "var(--ggui-color-onSunken, #52525b)"
21732
21855
  }, children: option.description })] })] }, option.value);
21733
21856
  }) }), error2 && (0, import_jsx_runtime14.jsx)("span", { id: errorId, role: "alert", style: {
21734
21857
  fontSize: "var(--ggui-font-size-xs, 12px)",
@@ -21743,7 +21866,7 @@ function Slider({ label, value = 0, onChange, min = 0, max = 100, step = 1, disa
21743
21866
  return (0, import_jsx_runtime15.jsxs)("div", { className, style: { display: "flex", flexDirection: "column", gap: "var(--ggui-spacing-2, 8px)", ...style }, children: [(label || showValue) && (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [label && (0, import_jsx_runtime15.jsx)("span", { id: labelId, style: {
21744
21867
  fontSize: "var(--ggui-font-size-sm, 14px)",
21745
21868
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21746
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21869
+ color: "var(--ggui-color-onSunken, #52525b)"
21747
21870
  }, children: label }), showValue && (0, import_jsx_runtime15.jsx)("span", { style: {
21748
21871
  fontSize: "var(--ggui-font-size-sm, 14px)",
21749
21872
  fontWeight: "var(--ggui-font-weight-medium, 500)",
@@ -21784,8 +21907,8 @@ function Slider({ label, value = 0, onChange, min = 0, max = 100, step = 1, disa
21784
21907
  }
21785
21908
  var variantStyles2 = {
21786
21909
  default: {
21787
- backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
21788
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
21910
+ backgroundColor: "var(--ggui-color-sunken, #f4f4f5)",
21911
+ color: "var(--ggui-color-onSunken, #52525b)"
21789
21912
  },
21790
21913
  primary: {
21791
21914
  backgroundColor: "var(--ggui-color-primary-100, #e0f2fe)",
@@ -21793,7 +21916,7 @@ var variantStyles2 = {
21793
21916
  },
21794
21917
  secondary: {
21795
21918
  backgroundColor: "var(--ggui-color-outlineVariant, #e4e4e7)",
21796
- color: "var(--ggui-color-onSurface, #18181b)"
21919
+ color: "var(--ggui-color-onContainer, #18181b)"
21797
21920
  },
21798
21921
  success: {
21799
21922
  backgroundColor: "var(--ggui-color-success-100, #dcfce7)",
@@ -21810,6 +21933,11 @@ var variantStyles2 = {
21810
21933
  info: {
21811
21934
  backgroundColor: "var(--ggui-color-info-100, #cffafe)",
21812
21935
  color: "var(--ggui-color-info-700, #0e7490)"
21936
+ },
21937
+ // The second accent (ggui#987 §2.1): the tertiary container pair.
21938
+ tertiary: {
21939
+ backgroundColor: "var(--ggui-color-tertiaryContainer, #ccfbf1)",
21940
+ color: "var(--ggui-color-onTertiaryContainer, #134e4a)"
21813
21941
  }
21814
21942
  };
21815
21943
  var sizeStyles4 = {
@@ -21841,7 +21969,7 @@ function Skeleton({ variant = "rect", width, height, radius: radius2 = "sm", sty
21841
21969
  width: resolvedWidth,
21842
21970
  height: resolvedHeight,
21843
21971
  borderRadius: isCircle ? "9999px" : resolveRadius(radius2),
21844
- backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
21972
+ backgroundColor: "var(--ggui-color-sunken, #f4f4f5)",
21845
21973
  animation: "ggui-skeleton-pulse 1.5s ease-in-out infinite",
21846
21974
  ...style
21847
21975
  };
@@ -21971,10 +22099,10 @@ function Progress({ value, max = 100, variant = "default", size = "md", label, s
21971
22099
  const height = sizeHeights[size];
21972
22100
  const barColor = variantColors[variant];
21973
22101
  const accessibleName = label ?? "Progress";
21974
- return (0, import_jsx_runtime20.jsxs)("div", { className, style: { display: "flex", flexDirection: "column", gap: "var(--ggui-spacing-1, 4px)", ...style }, children: [showLabel && (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [(0, import_jsx_runtime20.jsx)("span", { style: { fontSize: "var(--ggui-font-size-sm, 14px)", color: "var(--ggui-color-onSurfaceVariant, #52525b)" }, children: accessibleName }), (0, import_jsx_runtime20.jsxs)("span", { style: {
22102
+ return (0, import_jsx_runtime20.jsxs)("div", { className, style: { display: "flex", flexDirection: "column", gap: "var(--ggui-spacing-1, 4px)", ...style }, children: [showLabel && (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [(0, import_jsx_runtime20.jsx)("span", { style: { fontSize: "var(--ggui-font-size-sm, 14px)", color: "var(--ggui-color-onSunken, #52525b)" }, children: accessibleName }), (0, import_jsx_runtime20.jsxs)("span", { style: {
21975
22103
  fontSize: "var(--ggui-font-size-sm, 14px)",
21976
22104
  fontWeight: "var(--ggui-font-weight-medium, 500)",
21977
- color: "var(--ggui-color-onSurface, #18181b)"
22105
+ color: "var(--ggui-color-onContainer, #18181b)"
21978
22106
  }, children: [Math.round(percentage), "%"] })] }), (0, import_jsx_runtime20.jsxs)("div", { role: "progressbar", "aria-valuenow": indeterminate ? void 0 : value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": accessibleName, style: {
21979
22107
  width: "100%",
21980
22108
  height,
@@ -22012,7 +22140,7 @@ function Image({ src, alt, width, height, objectFit = "cover", radius: radius2,
22012
22140
  width: resolveSize2(width) || "100%",
22013
22141
  height: resolveSize2(height) || "auto",
22014
22142
  borderRadius: resolveRadius(radius2),
22015
- backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
22143
+ backgroundColor: "var(--ggui-color-sunken, #f4f4f5)",
22016
22144
  display: "flex",
22017
22145
  alignItems: "center",
22018
22146
  justifyContent: "center",
@@ -26050,7 +26178,7 @@ function Icon({ name, size = 24, tone, children, style, className, "aria-label":
26050
26178
  }, children: "?" });
26051
26179
  }
26052
26180
  function Link({ children, href, external, tone, underline = "hover", style, className, ...rest }) {
26053
- const linkColor = tone ? resolveToneCss(tone) : "var(--ggui-color-primary-600, #0284c7)";
26181
+ const linkColor = tone ? resolveToneCss(tone) : "var(--ggui-color-link, var(--ggui-color-primary-600, #0284c7))";
26054
26182
  const underlineStyle = {
26055
26183
  always: "underline",
26056
26184
  hover: "none",
@@ -26142,10 +26270,10 @@ function Tooltip({ children, content, position = "top", delay = 200, style, clas
26142
26270
  top: coords.top,
26143
26271
  left: coords.left,
26144
26272
  transform: getTransform(),
26145
- backgroundColor: "var(--ggui-color-onSurface, #18181b)",
26146
- // Inverse pair: text on the inverted (onSurface) ground is
26147
- // the surface color — white was only right for light themes.
26148
- color: "var(--ggui-color-surface, #ffffff)",
26273
+ // The inverse container pair (ggui#987 §2.1): a tooltip is
26274
+ // legible by inversion, not by lift — never `elevated`.
26275
+ backgroundColor: "var(--ggui-color-onContainer, #18181b)",
26276
+ color: "var(--ggui-color-container, #ffffff)",
26149
26277
  padding: "6px 10px",
26150
26278
  borderRadius: "var(--ggui-shape-radius-md, 8px)",
26151
26279
  fontSize: "var(--ggui-font-size-xs, 12px)",
@@ -26177,7 +26305,7 @@ function Table({ columns, data, sortKey, sortDirection = "asc", onSort, striped
26177
26305
  textAlign: "left",
26178
26306
  fontWeight: "var(--ggui-font-weight-semibold, 600)",
26179
26307
  fontSize: "var(--ggui-font-size-xs, 12px)",
26180
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
26308
+ color: "var(--ggui-color-onSunken, #52525b)",
26181
26309
  textTransform: "uppercase",
26182
26310
  letterSpacing: "0.05em",
26183
26311
  borderBottom: "2px solid var(--ggui-color-outlineVariant, #e4e4e7)",
@@ -26193,11 +26321,11 @@ function Table({ columns, data, sortKey, sortDirection = "asc", onSort, striped
26193
26321
  width: "100%",
26194
26322
  borderCollapse: "collapse",
26195
26323
  fontSize: "var(--ggui-font-size-sm, 14px)",
26196
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
26324
+ color: "var(--ggui-color-onSunken, #52525b)"
26197
26325
  }, children: [caption && (0, import_jsx_runtime25.jsx)("caption", { style: {
26198
26326
  padding: cellPadding,
26199
26327
  fontSize: "var(--ggui-font-size-sm, 14px)",
26200
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
26328
+ color: "var(--ggui-color-onSunken, #52525b)",
26201
26329
  textAlign: "left",
26202
26330
  captionSide: "top"
26203
26331
  }, children: caption }), (0, import_jsx_runtime25.jsx)("thead", { children: (0, import_jsx_runtime25.jsx)("tr", { children: columns.map((col) => (0, import_jsx_runtime25.jsx)("th", { scope: "col", "aria-sort": sortKey === col.key ? sortDirection === "asc" ? "ascending" : "descending" : void 0, onClick: col.sortable ? () => handleSort(col.key) : void 0, onKeyDown: col.sortable ? (e) => {
@@ -26211,13 +26339,13 @@ function Table({ columns, data, sortKey, sortDirection = "asc", onSort, striped
26211
26339
  width: col.width,
26212
26340
  cursor: col.sortable ? "pointer" : "default"
26213
26341
  }, children: (0, import_jsx_runtime25.jsxs)("span", { style: { display: "inline-flex", alignItems: "center" }, children: [col.header, col.sortable && sortIndicator(sortKey === col.key, sortDirection)] }) }, col.key)) }) }), (0, import_jsx_runtime25.jsx)("tbody", { children: data.map((row, rowIndex) => (0, import_jsx_runtime25.jsx)("tr", { onMouseEnter: hoverable ? () => setHoveredRow(rowIndex) : void 0, onMouseLeave: hoverable ? () => setHoveredRow(null) : void 0, style: {
26214
- backgroundColor: hoverable && hoveredRow === rowIndex ? "var(--ggui-color-surface, #fafafa)" : striped && rowIndex % 2 === 1 ? "var(--ggui-color-surface, #fafafa)" : "transparent",
26342
+ backgroundColor: hoverable && hoveredRow === rowIndex ? "var(--ggui-color-sunken, #fafafa)" : striped && rowIndex % 2 === 1 ? "var(--ggui-color-sunken, #fafafa)" : "transparent",
26215
26343
  transition: "background-color 0.15s ease"
26216
26344
  }, children: columns.map((col) => (0, import_jsx_runtime25.jsx)("td", { style: {
26217
26345
  padding: cellPadding,
26218
26346
  textAlign: col.align || "left",
26219
- borderBottom: "1px solid var(--ggui-color-surfaceVariant, #f4f4f5)",
26220
- borderRight: bordered ? "1px solid var(--ggui-color-surfaceVariant, #f4f4f5)" : void 0
26347
+ borderBottom: "1px solid var(--ggui-color-sunken, #f4f4f5)",
26348
+ borderRight: bordered ? "1px solid var(--ggui-color-sunken, #f4f4f5)" : void 0
26221
26349
  }, children: col.render ? col.render(row[col.key], row, rowIndex) : row[col.key] }, col.key)) }, rowIndex)) })] }) });
26222
26350
  }
26223
26351
  var sizeStyles5 = {
@@ -26290,7 +26418,7 @@ function Tabs({ items, activeKey, onChange, variant = "line", size = "md", fullW
26290
26418
  if (variant === "line") {
26291
26419
  return {
26292
26420
  ...base,
26293
- color: isActive ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
26421
+ color: isActive ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-onSunken, #52525b)",
26294
26422
  borderBottom: isActive ? "2px solid var(--ggui-color-primary-600, #0284c7)" : "2px solid transparent",
26295
26423
  marginBottom: "-1px"
26296
26424
  };
@@ -26298,17 +26426,17 @@ function Tabs({ items, activeKey, onChange, variant = "line", size = "md", fullW
26298
26426
  if (variant === "pills") {
26299
26427
  return {
26300
26428
  ...base,
26301
- color: isActive ? "var(--ggui-color-onPrimary, #ffffff)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
26429
+ color: isActive ? "var(--ggui-color-onPrimary, #ffffff)" : "var(--ggui-color-onSunken, #52525b)",
26302
26430
  backgroundColor: isActive ? "var(--ggui-color-primary-600, #0284c7)" : "transparent",
26303
26431
  borderRadius: "var(--ggui-shape-radius-md, 6px)"
26304
26432
  };
26305
26433
  }
26306
26434
  return {
26307
26435
  ...base,
26308
- color: isActive ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
26309
- backgroundColor: isActive ? "var(--ggui-color-surface, #ffffff)" : "transparent",
26436
+ color: isActive ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-onSunken, #52525b)",
26437
+ backgroundColor: isActive ? "var(--ggui-color-container, #ffffff)" : "transparent",
26310
26438
  border: isActive ? "1px solid var(--ggui-color-outlineVariant, #e4e4e7)" : "1px solid transparent",
26311
- borderBottom: isActive ? "1px solid var(--ggui-color-surface, #ffffff)" : "1px solid transparent",
26439
+ borderBottom: isActive ? "1px solid var(--ggui-color-container, #ffffff)" : "1px solid transparent",
26312
26440
  borderRadius: "var(--ggui-shape-radius-md, 6px) var(--ggui-shape-radius-md, 6px) 0 0",
26313
26441
  marginBottom: "-1px"
26314
26442
  };
@@ -26317,7 +26445,7 @@ function Tabs({ items, activeKey, onChange, variant = "line", size = "md", fullW
26317
26445
  display: "flex",
26318
26446
  gap: variant === "pills" ? "var(--ggui-spacing-1, 4px)" : "0",
26319
26447
  borderBottom: variant === "line" || variant === "enclosed" ? "1px solid var(--ggui-color-outlineVariant, #e4e4e7)" : void 0,
26320
- backgroundColor: variant === "pills" ? "var(--ggui-color-surfaceVariant, #f4f4f5)" : void 0,
26448
+ backgroundColor: variant === "pills" ? "var(--ggui-color-sunken, #f4f4f5)" : void 0,
26321
26449
  borderRadius: variant === "pills" ? "var(--ggui-shape-radius-lg, 8px)" : void 0,
26322
26450
  padding: variant === "pills" ? "var(--ggui-spacing-1, 4px)" : void 0
26323
26451
  };
@@ -26480,25 +26608,25 @@ var reducedMotionCSS = `@media (prefers-reduced-motion: reduce) {
26480
26608
  }`;
26481
26609
  var variantStyles4 = {
26482
26610
  info: {
26483
- bg: "var(--ggui-color-info-50, #ecfeff)",
26611
+ bg: "var(--ggui-color-elevated, #ecfeff)",
26484
26612
  border: "var(--ggui-color-info-200, #a5f3fc)",
26485
26613
  text: "var(--ggui-color-info-800, #155e75)",
26486
26614
  icon: "var(--ggui-color-info-500, #06b6d4)"
26487
26615
  },
26488
26616
  success: {
26489
- bg: "var(--ggui-color-success-50, #f0fdf4)",
26617
+ bg: "var(--ggui-color-elevated, #f0fdf4)",
26490
26618
  border: "var(--ggui-color-success-200, #bbf7d0)",
26491
26619
  text: "var(--ggui-color-success-800, #166534)",
26492
26620
  icon: "var(--ggui-color-success-500, #22c55e)"
26493
26621
  },
26494
26622
  warning: {
26495
- bg: "var(--ggui-color-warning-50, #fffbeb)",
26623
+ bg: "var(--ggui-color-elevated, #fffbeb)",
26496
26624
  border: "var(--ggui-color-warning-200, #fde68a)",
26497
26625
  text: "var(--ggui-color-warning-800, #92400e)",
26498
26626
  icon: "var(--ggui-color-warning-500, #f59e0b)"
26499
26627
  },
26500
26628
  error: {
26501
- bg: "var(--ggui-color-error-50, #fef2f2)",
26629
+ bg: "var(--ggui-color-elevated, #fef2f2)",
26502
26630
  border: "var(--ggui-color-error-200, #fecaca)",
26503
26631
  text: "var(--ggui-color-error-800, #991b1b)",
26504
26632
  icon: "var(--ggui-color-error-500, #ef4444)"
@@ -26635,7 +26763,7 @@ function Accordion({ items, expandedKeys, onChange, multiple = false, variant =
26635
26763
  opacity: isDisabled ? 0.5 : 1,
26636
26764
  fontSize: "var(--ggui-font-size-sm, 14px)",
26637
26765
  fontWeight: "var(--ggui-font-weight-medium, 500)",
26638
- color: "var(--ggui-color-onSurface, #18181b)",
26766
+ color: "var(--ggui-color-onContainer, #18181b)",
26639
26767
  textAlign: "left",
26640
26768
  transition: `background-color ${duration.fast} ${easing.easeInOut}`
26641
26769
  }, children: [(0, import_jsx_runtime28.jsx)("span", { children: item.title }), chevron(isExpanded)] }) }), (0, import_jsx_runtime28.jsx)("div", { id: `${uniqueId}-panel-${item.key}`, role: "region", "aria-labelledby": `${uniqueId}-header-${item.key}`, hidden: !isExpanded, style: {
@@ -26643,7 +26771,7 @@ function Accordion({ items, expandedKeys, onChange, multiple = false, variant =
26643
26771
  }, children: isExpanded && (0, import_jsx_runtime28.jsx)("div", { style: {
26644
26772
  padding: "0 var(--ggui-spacing-4, 16px) var(--ggui-spacing-4, 16px)",
26645
26773
  fontSize: "var(--ggui-font-size-sm, 14px)",
26646
- color: "var(--ggui-color-onSurfaceVariant, #52525b)",
26774
+ color: "var(--ggui-color-onSunken, #52525b)",
26647
26775
  lineHeight: "var(--ggui-font-lineHeight-normal, 1.5)"
26648
26776
  }, children: item.content }) })] }, item.key);
26649
26777
  }) });
@@ -26890,9 +27018,9 @@ function FormField({ label, children, error: error2, helperText, required, descr
26890
27018
  }, children: error2 || helperText })] });
26891
27019
  }
26892
27020
  function MenuItem({ label, icon, rightElement, onClick, disabled, active, danger, style, className }) {
26893
- const baseColor = danger ? colors.error[600] : colors.gray[700];
26894
- const hoverBg = danger ? colors.error[50] : colors.gray[100];
26895
- const activeBg = danger ? colors.error[100] : colors.primary[50];
27021
+ const baseColor = danger ? "var(--ggui-color-error-600, #dc2626)" : "var(--ggui-color-onElevated, #3f3f46)";
27022
+ const hoverBg = danger ? "var(--ggui-color-error-50, #fef2f2)" : "var(--ggui-color-sunken, #f4f4f5)";
27023
+ const activeBg = danger ? "var(--ggui-color-error-100, #fee2e2)" : "var(--ggui-color-primary-50, #f0f9ff)";
26896
27024
  return (0, import_jsx_runtime31.jsxs)("button", { onClick: disabled ? void 0 : onClick, disabled, className, style: {
26897
27025
  display: "flex",
26898
27026
  alignItems: "center",
@@ -27032,7 +27160,8 @@ function Dropdown({ trigger, options, value, onChange, placement = "bottom-start
27032
27160
  position: "absolute",
27033
27161
  ...getMenuPosition(),
27034
27162
  minWidth: "160px",
27035
- backgroundColor: colors.white,
27163
+ backgroundColor: "var(--ggui-color-elevated, #ffffff)",
27164
+ color: "var(--ggui-color-onElevated, #18181b)",
27036
27165
  border: `1px solid ${colors.gray[200]}`,
27037
27166
  borderRadius: radius.lg,
27038
27167
  boxShadow: shadow.lg,
@@ -27250,9 +27379,9 @@ var markerStyles = {
27250
27379
  color: "var(--ggui-color-onPrimary, #ffffff)"
27251
27380
  },
27252
27381
  upcoming: {
27253
- backgroundColor: "var(--ggui-color-surface, #fafafa)",
27382
+ backgroundColor: "var(--ggui-color-sunken, #fafafa)",
27254
27383
  border: "1px solid var(--ggui-color-outline, #d4d4d8)",
27255
- color: "var(--ggui-color-onSurfaceVariant, #52525b)"
27384
+ color: "var(--ggui-color-onSunken, #52525b)"
27256
27385
  }
27257
27386
  };
27258
27387
  function Marker({ index, state }) {
@@ -27653,15 +27782,15 @@ function parseRichText(text) {
27653
27782
  var CODE_INLINE = {
27654
27783
  fontFamily: "var(--ggui-font-family-mono, ui-monospace, monospace)",
27655
27784
  fontSize: "0.9em",
27656
- background: "var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))",
27657
- borderRadius: "var(--ggui-radius-sm, 4px)",
27785
+ background: "var(--ggui-color-sunken, rgba(0,0,0,0.06))",
27786
+ borderRadius: "var(--ggui-shape-radius-sm, 4px)",
27658
27787
  padding: "0.1em 0.35em"
27659
27788
  };
27660
27789
  var CODE_FENCE = {
27661
27790
  fontFamily: "var(--ggui-font-family-mono, ui-monospace, monospace)",
27662
27791
  fontSize: "var(--ggui-font-size-sm, 14px)",
27663
- background: "var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))",
27664
- borderRadius: "var(--ggui-radius-md, 8px)",
27792
+ background: "var(--ggui-color-sunken, rgba(0,0,0,0.06))",
27793
+ borderRadius: "var(--ggui-shape-radius-md, 8px)",
27665
27794
  padding: "var(--ggui-spacing-sm, 12px)",
27666
27795
  overflowX: "auto",
27667
27796
  whiteSpace: "pre",
@@ -27690,7 +27819,7 @@ var TABLE_CELL = {
27690
27819
  var TABLE_HEADER_CELL = {
27691
27820
  ...TABLE_CELL,
27692
27821
  fontWeight: "var(--ggui-font-weight-semibold, 600)",
27693
- background: "var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))"
27822
+ background: "var(--ggui-color-sunken, rgba(0,0,0,0.06))"
27694
27823
  };
27695
27824
  function renderRichTextInlines(inlines) {
27696
27825
  return inlines.map((node, i) => {
@@ -28268,7 +28397,8 @@ function Modal({ open, onClose, title, children, footer, size = "md", closeOnOve
28268
28397
  width: sizeWidths[size],
28269
28398
  maxWidth: isFullscreen ? "100%" : "calc(100vw - 48px)",
28270
28399
  maxHeight: isFullscreen ? "100%" : "calc(100vh - 48px)",
28271
- backgroundColor: colors.white,
28400
+ backgroundColor: "var(--ggui-color-elevated, #ffffff)",
28401
+ color: "var(--ggui-color-onElevated, #18181b)",
28272
28402
  borderRadius: isFullscreen ? 0 : radius.xl,
28273
28403
  boxShadow: shadow["2xl"],
28274
28404
  display: "flex",
@@ -28700,95 +28830,12 @@ var Pressable = (0, import_react40.forwardRef)(function Pressable2({ children, o
28700
28830
  function stripMarkers(code) {
28701
28831
  return code.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g, "").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g, "");
28702
28832
  }
28703
- function formatValue(token) {
28704
- const v = token.$value;
28705
- if (Array.isArray(v)) {
28706
- return v.join(", ");
28707
- }
28708
- if (v !== null && typeof v === "object") {
28709
- const obj = v;
28710
- if (token.$type === "shadow" && "offsetX" in obj) {
28711
- return `${obj.offsetX} ${obj.offsetY} ${obj.blur} ${obj.spread} ${obj.color}`;
28712
- }
28713
- if (token.$type === "transition" && "duration" in obj && "timingFunction" in obj) {
28714
- const prop = typeof obj.property === "string" && obj.property ? `${obj.property} ` : "";
28715
- return `${prop}${obj.duration} ${obj.timingFunction}`;
28716
- }
28717
- }
28718
- return String(v);
28719
- }
28720
- function walkTokens(obj, prefix, out) {
28721
- for (const [key, value] of Object.entries(obj)) {
28722
- if (key.startsWith("$"))
28723
- continue;
28724
- if (value !== null && typeof value === "object" && "$value" in value) {
28725
- out.push(` --ggui-${prefix}-${key}: ${formatValue(value)};`);
28726
- } else if (value !== null && typeof value === "object") {
28727
- walkTokens(value, `${prefix}-${key}`, out);
28728
- }
28729
- }
28730
- }
28731
- function buildCssVariables(theme9) {
28732
- const lines = [];
28733
- walkTokens(theme9.color, "color", lines);
28734
- walkTokens(theme9.font, "font", lines);
28735
- walkTokens(theme9.spacing, "spacing", lines);
28736
- walkTokens(theme9.shape, "shape", lines);
28737
- walkTokens({
28738
- duration: theme9.motion.duration,
28739
- easing: theme9.motion.easing,
28740
- transition: theme9.motion.transition
28741
- }, "motion", lines);
28742
- walkTokens(theme9.accessibility, "accessibility", lines);
28743
- walkTokens(theme9.zIndex, "zIndex", lines);
28744
- return lines.join("\n");
28745
- }
28746
- function expandKeyframe(name, compact) {
28747
- const stopRegex = /([\d.]+%|from|to)\s*\{([^}]*)\}/g;
28748
- const stops = [];
28749
- let match;
28750
- while ((match = stopRegex.exec(compact)) !== null) {
28751
- const selector = match[1];
28752
- const rawProps = match[2].trim();
28753
- const props = rawProps.split(";").map((p) => p.trim()).filter(Boolean).map((p) => p.endsWith(";") ? p : `${p};`).join(" ");
28754
- stops.push(` ${selector} { ${props} }`);
28755
- }
28756
- return `@keyframes ggui-${name} {
28757
- ${stops.join("\n")}
28758
- }`;
28759
- }
28760
- function buildCssKeyframes(theme9) {
28761
- const blocks = [];
28762
- for (const [name, token] of Object.entries(theme9.motion.keyframes)) {
28763
- if (name.startsWith("$"))
28764
- continue;
28765
- blocks.push(expandKeyframe(name, String(token.$value)));
28766
- }
28767
- return blocks.join("\n\n");
28768
- }
28769
- function parseTheme(id, theme9) {
28770
- const cssVariablesBody = buildCssVariables(theme9);
28771
- const cssVariables = `:root {
28772
- ${cssVariablesBody}
28773
- }`;
28774
- const cssKeyframes = buildCssKeyframes(theme9);
28775
- const css = cssKeyframes ? `${cssVariables}
28776
-
28777
- ${cssKeyframes}` : cssVariables;
28778
- return {
28779
- id,
28780
- name: theme9.$name,
28781
- description: theme9.$description,
28782
- metadata: theme9.$metadata,
28783
- cssVariables,
28784
- cssKeyframes,
28785
- css
28786
- };
28787
- }
28788
28833
  var consumed_tokens_manifest_default = {
28789
- version: 1,
28834
+ version: 2,
28790
28835
  tokens: [
28791
28836
  "--ggui-color-container",
28837
+ "--ggui-color-elevated",
28838
+ "--ggui-color-error",
28792
28839
  "--ggui-color-error-100",
28793
28840
  "--ggui-color-error-200",
28794
28841
  "--ggui-color-error-50",
@@ -28796,12 +28843,16 @@ var consumed_tokens_manifest_default = {
28796
28843
  "--ggui-color-error-600",
28797
28844
  "--ggui-color-error-700",
28798
28845
  "--ggui-color-error-800",
28846
+ "--ggui-color-ground",
28847
+ "--ggui-color-ground-gradient",
28848
+ "--ggui-color-ground-subtle",
28799
28849
  "--ggui-color-info-100",
28800
28850
  "--ggui-color-info-200",
28801
28851
  "--ggui-color-info-50",
28802
28852
  "--ggui-color-info-500",
28803
28853
  "--ggui-color-info-700",
28804
28854
  "--ggui-color-info-800",
28855
+ "--ggui-color-link",
28805
28856
  "--ggui-color-neutral-100",
28806
28857
  "--ggui-color-neutral-200",
28807
28858
  "--ggui-color-neutral-300",
@@ -28809,11 +28860,14 @@ var consumed_tokens_manifest_default = {
28809
28860
  "--ggui-color-neutral-50",
28810
28861
  "--ggui-color-neutral-500",
28811
28862
  "--ggui-color-neutral-600",
28863
+ "--ggui-color-neutral-900",
28812
28864
  "--ggui-color-onContainer",
28865
+ "--ggui-color-onElevated",
28813
28866
  "--ggui-color-onError",
28867
+ "--ggui-color-onGround",
28814
28868
  "--ggui-color-onPrimary",
28815
- "--ggui-color-onSurface",
28816
- "--ggui-color-onSurfaceVariant",
28869
+ "--ggui-color-onSunken",
28870
+ "--ggui-color-onTertiaryContainer",
28817
28871
  "--ggui-color-outline",
28818
28872
  "--ggui-color-outlineVariant",
28819
28873
  "--ggui-color-primary",
@@ -28833,11 +28887,8 @@ var consumed_tokens_manifest_default = {
28833
28887
  "--ggui-color-success-500",
28834
28888
  "--ggui-color-success-700",
28835
28889
  "--ggui-color-success-800",
28836
- "--ggui-color-surface",
28837
- "--ggui-color-surface-gradient",
28838
- "--ggui-color-surface-subtle",
28839
- "--ggui-color-surface-sunken",
28840
- "--ggui-color-surfaceVariant",
28890
+ "--ggui-color-sunken",
28891
+ "--ggui-color-tertiaryContainer",
28841
28892
  "--ggui-color-warning-100",
28842
28893
  "--ggui-color-warning-200",
28843
28894
  "--ggui-color-warning-50",
@@ -28845,6 +28896,7 @@ var consumed_tokens_manifest_default = {
28845
28896
  "--ggui-color-warning-700",
28846
28897
  "--ggui-color-warning-800",
28847
28898
  "--ggui-flash-color",
28899
+ "--ggui-font-family-heading",
28848
28900
  "--ggui-font-family-mono",
28849
28901
  "--ggui-font-family-sans",
28850
28902
  "--ggui-font-lineHeight-normal",
@@ -28857,11 +28909,11 @@ var consumed_tokens_manifest_default = {
28857
28909
  "--ggui-font-size-xl",
28858
28910
  "--ggui-font-size-xs",
28859
28911
  "--ggui-font-weight-bold",
28912
+ "--ggui-font-weight-heading",
28860
28913
  "--ggui-font-weight-medium",
28861
28914
  "--ggui-font-weight-normal",
28862
28915
  "--ggui-font-weight-semibold",
28863
- "--ggui-radius-md",
28864
- "--ggui-radius-sm",
28916
+ "--ggui-letter-spacing-heading",
28865
28917
  "--ggui-shape-radius-full",
28866
28918
  "--ggui-shape-radius-lg",
28867
28919
  "--ggui-shape-radius-md",
@@ -28889,6 +28941,312 @@ var consumed_tokens_manifest_default = {
28889
28941
  ]
28890
28942
  };
28891
28943
  var consumedTokenManifest = consumed_tokens_manifest_default.tokens;
28944
+ var NON_THEME_DEFINABLE_TOKENS = [
28945
+ "--ggui-color-primary",
28946
+ "--ggui-color-ground-gradient",
28947
+ "--ggui-color-ground-subtle",
28948
+ "--ggui-flash-color"
28949
+ ];
28950
+ var ThemeDocumentInvalidError = class extends Error {
28951
+ missing;
28952
+ constructor(missing) {
28953
+ super(`theme document invalid: missing ${missing.join(", ")}`);
28954
+ this.name = "ThemeDocumentInvalidError";
28955
+ this.missing = missing;
28956
+ }
28957
+ };
28958
+ function clamp01(v) {
28959
+ return v < 0 ? 0 : v > 1 ? 1 : v;
28960
+ }
28961
+ function srgbToLinear(c) {
28962
+ const v = c / 255;
28963
+ return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
28964
+ }
28965
+ function linearToSrgb8(v) {
28966
+ const c = v <= 31308e-7 ? 12.92 * v : 1.055 * v ** (1 / 2.4) - 0.055;
28967
+ return Math.round(clamp01(c) * 255);
28968
+ }
28969
+ function parseHex(hex) {
28970
+ const h = hex.trim().replace(/^#/, "");
28971
+ const full = h.length === 3 ? h.split("").map((ch) => ch + ch).join("") : h;
28972
+ if (!/^[0-9a-fA-F]{6}$/.test(full))
28973
+ throw new ThemeDocumentInvalidError([`colour ${JSON.stringify(hex)} is not 6-digit hex`]);
28974
+ return [parseInt(full.slice(0, 2), 16), parseInt(full.slice(2, 4), 16), parseInt(full.slice(4, 6), 16)];
28975
+ }
28976
+ function linearToOklab(r, g, b) {
28977
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
28978
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
28979
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
28980
+ return [
28981
+ 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
28982
+ 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
28983
+ 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s
28984
+ ];
28985
+ }
28986
+ function oklabToLinear(L, a, b) {
28987
+ const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
28988
+ const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
28989
+ const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
28990
+ return [
28991
+ 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
28992
+ -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
28993
+ -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
28994
+ ];
28995
+ }
28996
+ function hexToOklch(hex) {
28997
+ const [r8, g8, b8] = parseHex(hex);
28998
+ const [L, a, b] = linearToOklab(srgbToLinear(r8), srgbToLinear(g8), srgbToLinear(b8));
28999
+ const c = Math.hypot(a, b);
29000
+ const h = c < 1e-6 ? 0 : (Math.atan2(b, a) * 180 / Math.PI + 360) % 360;
29001
+ return { l: L, c, h };
29002
+ }
29003
+ var round4 = (v) => Math.round(v * 1e4) / 1e4;
29004
+ function inGamut(rgb) {
29005
+ const eps = 1e-6;
29006
+ return rgb.every((v) => v >= -eps && v <= 1 + eps);
29007
+ }
29008
+ function oklchToHex(color) {
29009
+ const l = clamp01(round4(color.l));
29010
+ const h = round4((color.h % 360 + 360) % 360);
29011
+ let c = Math.max(0, round4(color.c));
29012
+ const toLinear = (chroma) => {
29013
+ const rad = h * Math.PI / 180;
29014
+ return oklabToLinear(l, chroma * Math.cos(rad), chroma * Math.sin(rad));
29015
+ };
29016
+ let rgb = toLinear(c);
29017
+ if (!inGamut(rgb)) {
29018
+ let lo = 0;
29019
+ let hi = c;
29020
+ for (let i = 0; i < 24; i++) {
29021
+ const mid = (lo + hi) / 2;
29022
+ if (inGamut(toLinear(mid)))
29023
+ lo = mid;
29024
+ else
29025
+ hi = mid;
29026
+ }
29027
+ c = lo;
29028
+ rgb = toLinear(c);
29029
+ }
29030
+ const [r, g, b] = rgb.map(clamp01);
29031
+ return `#${[r, g, b].map((v) => linearToSrgb8(v).toString(16).padStart(2, "0")).join("")}`;
29032
+ }
29033
+ function mixOklch(a, b, t) {
29034
+ const A = hexToOklch(a);
29035
+ const B = hexToOklch(b);
29036
+ let dh = B.h - A.h;
29037
+ if (A.c < 1e-4)
29038
+ dh = 0;
29039
+ else if (B.c < 1e-4)
29040
+ dh = 0;
29041
+ else if (dh > 180)
29042
+ dh -= 360;
29043
+ else if (dh < -180)
29044
+ dh += 360;
29045
+ const h = A.c < 1e-4 ? B.h : A.h + dh * t;
29046
+ return oklchToHex({ l: A.l + (B.l - A.l) * t, c: A.c + (B.c - A.c) * t, h });
29047
+ }
29048
+ function relativeLuminance(hex) {
29049
+ const [r8, g8, b8] = parseHex(hex);
29050
+ return 0.2126 * srgbToLinear(r8) + 0.7152 * srgbToLinear(g8) + 0.0722 * srgbToLinear(b8);
29051
+ }
29052
+ function contrastRatio(a, b) {
29053
+ const la = relativeLuminance(a);
29054
+ const lb = relativeLuminance(b);
29055
+ const [hi, lo] = la > lb ? [la, lb] : [lb, la];
29056
+ return (hi + 0.05) / (lo + 0.05);
29057
+ }
29058
+ var STOPS = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
29059
+ var RAMP_L = [0.97, 0.93, 0.86, 0.76, 0.66, NaN, 0.5, 0.42, 0.34, 0.26];
29060
+ var RAMP_C = [0.15, 0.3, 0.5, 0.75, 0.9, 1, 0.95, 0.85, 0.7, 0.55];
29061
+ var NEUTRAL_T = [0.04, 0.08, 0.16, 0.28, 0.44, 0.58, 0.7, 0.8, 0.9, 0.96];
29062
+ var FAMILIES = ["primary", "tertiary", "success", "warning", "error", "info"];
29063
+ var NAMED_SPACING = { xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" };
29064
+ var SIZE_EXP = { xs: -2, sm: -1, base: 0, lg: 1, xl: 2, "2xl": 3, "3xl": 4, "4xl": 5 };
29065
+ function tokenValue(t) {
29066
+ if (t === void 0 || t === null || typeof t !== "object" || !("$value" in t))
29067
+ return void 0;
29068
+ const v = t.$value;
29069
+ if (typeof v === "number")
29070
+ return String(v);
29071
+ if (typeof v !== "string")
29072
+ return void 0;
29073
+ return /^#[0-9a-fA-F]{3,6}$/.test(v) ? `#${parseHex(v).map((n) => n.toString(16).padStart(2, "0")).join("")}` : v;
29074
+ }
29075
+ function stated(group, key) {
29076
+ return tokenValue(group?.[key]);
29077
+ }
29078
+ function familyRamp(group, anchor) {
29079
+ const a = hexToOklch(anchor);
29080
+ const out = {};
29081
+ STOPS.forEach((stop, i) => {
29082
+ const s = stated(group, stop);
29083
+ if (s !== void 0) {
29084
+ out[stop] = s;
29085
+ return;
29086
+ }
29087
+ out[stop] = stop === "500" ? anchor : oklchToHex({ l: RAMP_L[i], c: a.c * RAMP_C[i], h: a.h });
29088
+ });
29089
+ return out;
29090
+ }
29091
+ function onColourFor(base) {
29092
+ return contrastRatio("#ffffff", base) >= contrastRatio("#000000", base) ? "#ffffff" : "#000000";
29093
+ }
29094
+ function parseSize(value) {
29095
+ const m = /^([0-9.]+)\s*(rem|px|em)$/.exec(value.trim());
29096
+ return m ? { n: Number(m[1]), unit: m[2] } : void 0;
29097
+ }
29098
+ function deriveThemeVariables(doc, mode) {
29099
+ const c = Object.fromEntries(Object.entries(doc.color));
29100
+ const single = (key) => tokenValue(c[key]);
29101
+ const group = (key) => c[key];
29102
+ const V = {};
29103
+ const missing = [];
29104
+ const need = (key) => {
29105
+ const v = single(key);
29106
+ if (v === void 0)
29107
+ missing.push(`color.${key}`);
29108
+ return v ?? "#000000";
29109
+ };
29110
+ const ground = need("ground");
29111
+ const onGround = need("onGround");
29112
+ const container = need("container");
29113
+ const onContainer = need("onContainer");
29114
+ const sunken = need("sunken");
29115
+ const onSunken = need("onSunken");
29116
+ Object.assign(V, {
29117
+ "--ggui-color-ground": ground,
29118
+ "--ggui-color-onGround": onGround,
29119
+ "--ggui-color-container": container,
29120
+ "--ggui-color-onContainer": onContainer,
29121
+ "--ggui-color-sunken": sunken,
29122
+ "--ggui-color-onSunken": onSunken,
29123
+ "--ggui-color-elevated": mode === "light" ? container : mixOklch(container, onContainer, 0.08),
29124
+ "--ggui-color-onElevated": onContainer
29125
+ });
29126
+ const neutral = group("neutral");
29127
+ STOPS.forEach((stop, i) => {
29128
+ V[`--ggui-color-neutral-${stop}`] = stated(neutral, stop) ?? mixOklch(ground, onGround, NEUTRAL_T[i]);
29129
+ });
29130
+ V["--ggui-color-outline"] = single("outline") ?? V["--ggui-color-neutral-300"];
29131
+ V["--ggui-color-outlineVariant"] = single("outlineVariant") ?? V["--ggui-color-neutral-200"];
29132
+ const primaryAnchor = stated(group("primary"), "500");
29133
+ if (primaryAnchor === void 0)
29134
+ missing.push("color.primary.500");
29135
+ for (const fam of FAMILIES) {
29136
+ const g = group(fam);
29137
+ let anchor = fam === "tertiary" ? single("tertiary") : stated(g, "500");
29138
+ if (anchor === void 0) {
29139
+ if (fam === "tertiary")
29140
+ anchor = primaryAnchor ?? "#000000";
29141
+ else {
29142
+ missing.push(`color.${fam}.500`);
29143
+ anchor = "#000000";
29144
+ }
29145
+ }
29146
+ const ramp2 = familyRamp(g, anchor);
29147
+ for (const stop of STOPS)
29148
+ V[`--ggui-color-${fam}-${stop}`] = ramp2[stop];
29149
+ const cap = fam[0].toUpperCase() + fam.slice(1);
29150
+ V[`--ggui-color-on${cap}`] = single(`on${cap}`) ?? onColourFor(ramp2["500"]);
29151
+ V[`--ggui-color-${fam}Container`] = single(`${fam}Container`) ?? (mode === "light" ? ramp2["100"] : ramp2["800"]);
29152
+ V[`--ggui-color-on${cap}Container`] = single(`on${cap}Container`) ?? (mode === "light" ? ramp2["900"] : ramp2["100"]);
29153
+ }
29154
+ V["--ggui-color-error"] = V["--ggui-color-error-500"];
29155
+ V["--ggui-color-link"] = single("link") ?? V["--ggui-color-primary-600"];
29156
+ const family = doc.font.family;
29157
+ const sans = tokenValue(family.sans) ?? fontFamily.sans;
29158
+ V["--ggui-font-family-sans"] = sans;
29159
+ V["--ggui-font-family-mono"] = tokenValue(family.mono) ?? fontFamily.mono;
29160
+ V["--ggui-font-family-heading"] = tokenValue(family.heading) ?? sans;
29161
+ const weights = doc.font.weight;
29162
+ for (const w of ["normal", "medium", "semibold", "bold"])
29163
+ V[`--ggui-font-weight-${w}`] = stated(weights, w) ?? String(fontWeight[w]);
29164
+ V["--ggui-font-weight-heading"] = stated(weights, "heading") ?? String(fontWeight.bold);
29165
+ const spacingT = doc.font.letterSpacing;
29166
+ V["--ggui-letter-spacing-body"] = stated(spacingT, "body") ?? "0em";
29167
+ V["--ggui-letter-spacing-heading"] = stated(spacingT, "heading") ?? "-0.01em";
29168
+ for (const lh of Object.keys(lineHeight))
29169
+ V[`--ggui-font-lineHeight-${lh}`] = String(lineHeight[lh]);
29170
+ const ramp = doc.font.ramp;
29171
+ const base = ramp ? parseSize(tokenValue(ramp.base) ?? "") : void 0;
29172
+ const ratio = ramp ? Number(tokenValue(ramp.ratio)) : NaN;
29173
+ for (const [stop, exp] of Object.entries(SIZE_EXP)) {
29174
+ V[`--ggui-font-size-${stop}`] = base && Number.isFinite(ratio) && ratio > 0 ? `${Math.round(base.n * ratio ** exp * 1e3) / 1e3}${base.unit}` : fontSize[stop];
29175
+ }
29176
+ const sp = doc.spacing;
29177
+ for (const [key, value] of Object.entries(spacing))
29178
+ V[`--ggui-spacing-${key}`] = stated(sp, key) ?? String(value);
29179
+ for (const [key, value] of Object.entries(NAMED_SPACING))
29180
+ V[`--ggui-spacing-${key}`] = stated(sp, key) ?? value;
29181
+ const rad = doc.shape?.radius;
29182
+ for (const [key, value] of Object.entries(radius))
29183
+ V[`--ggui-shape-radius-${key}`] = stated(rad, key) ?? String(value);
29184
+ const sh = doc.shape?.shadow;
29185
+ for (const [key, value] of Object.entries(shadow))
29186
+ V[`--ggui-shape-shadow-${key}`] = stated(sh, key) ?? String(value);
29187
+ if (missing.length > 0)
29188
+ throw new ThemeDocumentInvalidError(missing);
29189
+ const floor = new Set(NON_THEME_DEFINABLE_TOKENS);
29190
+ const out = {};
29191
+ const gaps = [];
29192
+ for (const name of consumedTokenManifest) {
29193
+ if (floor.has(name))
29194
+ continue;
29195
+ const v = V[name];
29196
+ if (v === void 0)
29197
+ gaps.push(name);
29198
+ else
29199
+ out[name] = v;
29200
+ }
29201
+ if (gaps.length > 0)
29202
+ throw new Error(`deriveThemeVariables: no rule for manifest token(s) ${gaps.join(", ")} \u2014 extend the \xA72.4 table`);
29203
+ return out;
29204
+ }
29205
+ function buildCssVariables(theme9, mode) {
29206
+ return Object.entries(deriveThemeVariables(theme9, mode)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([name, value]) => ` ${name}: ${value};`).join("\n");
29207
+ }
29208
+ function expandKeyframe(name, compact) {
29209
+ const stopRegex = /([\d.]+%|from|to)\s*\{([^}]*)\}/g;
29210
+ const stops = [];
29211
+ let match;
29212
+ while ((match = stopRegex.exec(compact)) !== null) {
29213
+ const selector = match[1];
29214
+ const rawProps = match[2].trim();
29215
+ const props = rawProps.split(";").map((p) => p.trim()).filter(Boolean).map((p) => p.endsWith(";") ? p : `${p};`).join(" ");
29216
+ stops.push(` ${selector} { ${props} }`);
29217
+ }
29218
+ return `@keyframes ggui-${name} {
29219
+ ${stops.join("\n")}
29220
+ }`;
29221
+ }
29222
+ function buildCssKeyframes(theme9) {
29223
+ const blocks = [];
29224
+ for (const [name, token] of Object.entries(theme9.motion.keyframes)) {
29225
+ if (name.startsWith("$"))
29226
+ continue;
29227
+ blocks.push(expandKeyframe(name, String(token.$value)));
29228
+ }
29229
+ return blocks.join("\n\n");
29230
+ }
29231
+ function parseTheme(id, theme9, mode = "light") {
29232
+ const cssVariablesBody = buildCssVariables(theme9, mode);
29233
+ const cssVariables = `:root {
29234
+ ${cssVariablesBody}
29235
+ }`;
29236
+ const cssKeyframes = buildCssKeyframes(theme9);
29237
+ const css = cssKeyframes ? `${cssVariables}
29238
+
29239
+ ${cssKeyframes}` : cssVariables;
29240
+ return {
29241
+ id,
29242
+ name: theme9.$name,
29243
+ description: theme9.$description,
29244
+ metadata: theme9.$metadata,
29245
+ cssVariables,
29246
+ cssKeyframes,
29247
+ css
29248
+ };
29249
+ }
28892
29250
  var standardSemanticScales = {
28893
29251
  light: {
28894
29252
  success: {
@@ -29044,28 +29402,11 @@ var shared = {
29044
29402
  $type: "fontFamily"
29045
29403
  }
29046
29404
  },
29047
- size: {
29048
- sm: { $value: "0.8125rem", $type: "dimension" },
29049
- // 13px
29050
- base: { $value: "0.875rem", $type: "dimension" },
29051
- // 14px — brand-kit body
29052
- lg: { $value: "1rem", $type: "dimension" },
29053
- // 16px
29054
- xl: { $value: "1.125rem", $type: "dimension" },
29055
- // 18px
29056
- "2xl": { $value: "1.375rem", $type: "dimension" }
29057
- // 22px — brand-kit hero tag
29058
- },
29059
29405
  weight: {
29060
29406
  normal: { $value: "400", $type: "fontWeight" },
29061
29407
  medium: { $value: "500", $type: "fontWeight" },
29062
29408
  semibold: { $value: "600", $type: "fontWeight" },
29063
29409
  bold: { $value: "700", $type: "fontWeight" }
29064
- },
29065
- lineHeight: {
29066
- tight: { $value: "1.2", $type: "number" },
29067
- normal: { $value: "1.5", $type: "number" },
29068
- relaxed: { $value: "1.6", $type: "number" }
29069
29410
  }
29070
29411
  },
29071
29412
  spacing: {
@@ -29126,26 +29467,6 @@ var shared = {
29126
29467
  }
29127
29468
  },
29128
29469
  motion: {
29129
- duration: {
29130
- fast: { $value: "120ms", $type: "duration" },
29131
- normal: { $value: "200ms", $type: "duration" },
29132
- slow: { $value: "400ms", $type: "duration" },
29133
- ambient: { $value: "2000ms", $type: "duration" }
29134
- },
29135
- easing: {
29136
- default: {
29137
- $value: "cubic-bezier(0.4, 0, 0.2, 1)",
29138
- $type: "cubicBezier"
29139
- },
29140
- bounce: {
29141
- $value: "cubic-bezier(0.34, 1.56, 0.64, 1)",
29142
- $type: "cubicBezier"
29143
- },
29144
- spring: {
29145
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
29146
- $type: "cubicBezier"
29147
- }
29148
- },
29149
29470
  transition: standardTransitions,
29150
29471
  keyframes: {
29151
29472
  "accent-pulse": {
@@ -29168,7 +29489,6 @@ var gguiLight = {
29168
29489
  $description: "The default ggui theme \u2014 monochrome paper + ink, architectural, no decorative flourish.",
29169
29490
  $metadata: {
29170
29491
  font: "Inter",
29171
- fontUrl: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",
29172
29492
  philosophy: "The interface is the artifact, not the chrome around it."
29173
29493
  },
29174
29494
  color: {
@@ -29261,15 +29581,15 @@ var gguiLight = {
29261
29581
  "800": { $value: "#181818", $type: "color" }
29262
29582
  },
29263
29583
  // Semantic surface roles
29264
- surface: { $value: "#f4f3ed", $type: "color" },
29584
+ ground: { $value: "#f4f3ed", $type: "color" },
29265
29585
  // paper
29266
- onSurface: { $value: "#292929", $type: "color" },
29586
+ onGround: { $value: "#292929", $type: "color" },
29267
29587
  // ink
29268
- surfaceVariant: { $value: "#ebe9e1", $type: "color" },
29588
+ sunken: { $value: "#ebe9e1", $type: "color" },
29269
29589
  // paper-2
29270
- onSurfaceVariant: { $value: "#5a5a5a", $type: "color" },
29590
+ onSunken: { $value: "#5a5a5a", $type: "color" },
29271
29591
  // ink-3
29272
- container: { $value: "#ebe9e1", $type: "color" },
29592
+ container: { $value: "#f4f3ed", $type: "color" },
29273
29593
  // paper-2
29274
29594
  onContainer: { $value: "#292929", $type: "color" },
29275
29595
  // ink
@@ -29324,7 +29644,6 @@ var gguiDark = {
29324
29644
  $description: "The default ggui theme (dark) \u2014 ink canvas, paper text, architectural and flat.",
29325
29645
  $metadata: {
29326
29646
  font: "Inter",
29327
- fontUrl: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",
29328
29647
  philosophy: "The interface is the artifact, not the chrome around it."
29329
29648
  },
29330
29649
  color: {
@@ -29414,15 +29733,15 @@ var gguiDark = {
29414
29733
  "700": { $value: "#e8e8e8", $type: "color" },
29415
29734
  "800": { $value: "#f0f0f0", $type: "color" }
29416
29735
  },
29417
- surface: { $value: "#1f1f1f", $type: "color" },
29736
+ ground: { $value: "#1f1f1f", $type: "color" },
29418
29737
  // surface above ink base
29419
- onSurface: { $value: "#f4f3ed", $type: "color" },
29738
+ onGround: { $value: "#f4f3ed", $type: "color" },
29420
29739
  // paper
29421
- surfaceVariant: { $value: "#292929", $type: "color" },
29740
+ sunken: { $value: "#292929", $type: "color" },
29422
29741
  // ink
29423
- onSurfaceVariant: { $value: "#d9d9d9", $type: "color" },
29742
+ onSunken: { $value: "#d9d9d9", $type: "color" },
29424
29743
  // chrome
29425
- container: { $value: "#292929", $type: "color" },
29744
+ container: { $value: "#1f1f1f", $type: "color" },
29426
29745
  // ink
29427
29746
  onContainer: { $value: "#f4f3ed", $type: "color" },
29428
29747
  // paper
@@ -29485,23 +29804,11 @@ var shared2 = {
29485
29804
  $type: "fontFamily"
29486
29805
  }
29487
29806
  },
29488
- size: {
29489
- sm: { $value: "0.8rem", $type: "dimension" },
29490
- base: { $value: "0.95rem", $type: "dimension" },
29491
- lg: { $value: "1.1rem", $type: "dimension" },
29492
- xl: { $value: "1.3rem", $type: "dimension" },
29493
- "2xl": { $value: "1.6rem", $type: "dimension" }
29494
- },
29495
29807
  weight: {
29496
29808
  normal: { $value: "400", $type: "fontWeight" },
29497
29809
  medium: { $value: "500", $type: "fontWeight" },
29498
29810
  semibold: { $value: "600", $type: "fontWeight" },
29499
29811
  bold: { $value: "700", $type: "fontWeight" }
29500
- },
29501
- lineHeight: {
29502
- tight: { $value: "1.2", $type: "number" },
29503
- normal: { $value: "1.5", $type: "number" },
29504
- relaxed: { $value: "1.7", $type: "number" }
29505
29812
  }
29506
29813
  },
29507
29814
  spacing: {
@@ -29534,26 +29841,6 @@ var shared2 = {
29534
29841
  }
29535
29842
  },
29536
29843
  motion: {
29537
- duration: {
29538
- fast: { $value: "100ms", $type: "duration" },
29539
- normal: { $value: "200ms", $type: "duration" },
29540
- slow: { $value: "600ms", $type: "duration" },
29541
- ambient: { $value: "2000ms", $type: "duration" }
29542
- },
29543
- easing: {
29544
- default: {
29545
- $value: "cubic-bezier(0.4, 0, 0.2, 1)",
29546
- $type: "cubicBezier"
29547
- },
29548
- bounce: {
29549
- $value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
29550
- $type: "cubicBezier"
29551
- },
29552
- spring: {
29553
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
29554
- $type: "cubicBezier"
29555
- }
29556
- },
29557
29844
  keyframes: {
29558
29845
  "glitch-flicker": {
29559
29846
  $value: "0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}",
@@ -29604,7 +29891,6 @@ var cyberpunkLight = {
29604
29891
  $description: "Neon-lit dystopian tech \u2014 cyan neon on dark chrome with glitch animations.",
29605
29892
  $metadata: {
29606
29893
  font: "Orbitron",
29607
- fontUrl: "https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",
29608
29894
  philosophy: "Chromatic noise, electric tension, digital rebellion."
29609
29895
  },
29610
29896
  color: {
@@ -29673,12 +29959,12 @@ var cyberpunkLight = {
29673
29959
  "800": { $value: "#005266", $type: "color" }
29674
29960
  },
29675
29961
  // Semantic roles (dark theme — inverted neutral scale)
29676
- surface: { $value: "#0a0a0f", $type: "color" },
29677
- onSurface: { $value: "#e8e8f0", $type: "color" },
29678
- surfaceVariant: { $value: "#111118", $type: "color" },
29679
- onSurfaceVariant: { $value: "#8888a0", $type: "color" },
29680
- container: { $value: "#155e75", $type: "color" },
29681
- onContainer: { $value: "#cffafe", $type: "color" },
29962
+ ground: { $value: "#0a0a0f", $type: "color" },
29963
+ onGround: { $value: "#e8e8f0", $type: "color" },
29964
+ sunken: { $value: "#111118", $type: "color" },
29965
+ onSunken: { $value: "#8888a0", $type: "color" },
29966
+ container: { $value: "#0a0a0f", $type: "color" },
29967
+ onContainer: { $value: "#e8e8f0", $type: "color" },
29682
29968
  outline: { $value: "#3a3a48", $type: "color" },
29683
29969
  outlineVariant: { $value: "#25252f", $type: "color" },
29684
29970
  // Primary role pair — onPrimary is the deep night chrome, container
@@ -29725,7 +30011,6 @@ var cyberpunkDark = {
29725
30011
  $description: "Neon-lit dystopian tech (dark) \u2014 brighter cyan on pure-black chrome, cranked neon contrast.",
29726
30012
  $metadata: {
29727
30013
  font: "Orbitron",
29728
- fontUrl: "https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",
29729
30014
  philosophy: "Chromatic noise, electric tension, digital rebellion."
29730
30015
  },
29731
30016
  color: {
@@ -29800,13 +30085,13 @@ var cyberpunkDark = {
29800
30085
  "700": { $value: "#85e6ff", $type: "color" },
29801
30086
  "800": { $value: "#adeeff", $type: "color" }
29802
30087
  },
29803
- surface: { $value: "#000005", $type: "color" },
29804
- onSurface: { $value: "#e8e8f0", $type: "color" },
29805
- surfaceVariant: { $value: "#0a0a0f", $type: "color" },
29806
- onSurfaceVariant: { $value: "#aaaabe", $type: "color" },
29807
- container: { $value: "#0e7490", $type: "color" },
30088
+ ground: { $value: "#000005", $type: "color" },
30089
+ onGround: { $value: "#e8e8f0", $type: "color" },
30090
+ sunken: { $value: "#0a0a0f", $type: "color" },
30091
+ onSunken: { $value: "#aaaabe", $type: "color" },
30092
+ container: { $value: "#000005", $type: "color" },
29808
30093
  // deeper teal
29809
- onContainer: { $value: "#cffafe", $type: "color" },
30094
+ onContainer: { $value: "#e8e8f0", $type: "color" },
29810
30095
  outline: { $value: "#1a1a24", $type: "color" },
29811
30096
  outlineVariant: { $value: "#111118", $type: "color" },
29812
30097
  // Primary role pair — dark: onPrimary is pure-black-ish, container = deeper teal.
@@ -29860,23 +30145,11 @@ var shared3 = {
29860
30145
  $type: "fontFamily"
29861
30146
  }
29862
30147
  },
29863
- size: {
29864
- sm: { $value: "0.875rem", $type: "dimension" },
29865
- base: { $value: "1rem", $type: "dimension" },
29866
- lg: { $value: "1.125rem", $type: "dimension" },
29867
- xl: { $value: "1.3rem", $type: "dimension" },
29868
- "2xl": { $value: "1.6rem", $type: "dimension" }
29869
- },
29870
30148
  weight: {
29871
30149
  normal: { $value: "400", $type: "fontWeight" },
29872
30150
  medium: { $value: "500", $type: "fontWeight" },
29873
30151
  semibold: { $value: "600", $type: "fontWeight" },
29874
30152
  bold: { $value: "700", $type: "fontWeight" }
29875
- },
29876
- lineHeight: {
29877
- tight: { $value: "1.3", $type: "number" },
29878
- normal: { $value: "1.6", $type: "number" },
29879
- relaxed: { $value: "1.9", $type: "number" }
29880
30153
  }
29881
30154
  },
29882
30155
  spacing: {
@@ -29918,26 +30191,6 @@ var shared3 = {
29918
30191
  }
29919
30192
  },
29920
30193
  motion: {
29921
- duration: {
29922
- fast: { $value: "200ms", $type: "duration" },
29923
- normal: { $value: "500ms", $type: "duration" },
29924
- slow: { $value: "1500ms", $type: "duration" },
29925
- ambient: { $value: "6000ms", $type: "duration" }
29926
- },
29927
- easing: {
29928
- default: {
29929
- $value: "cubic-bezier(0.33, 0, 0.67, 1)",
29930
- $type: "cubicBezier"
29931
- },
29932
- bounce: {
29933
- $value: "cubic-bezier(0.34, 1.2, 0.64, 1)",
29934
- $type: "cubicBezier"
29935
- },
29936
- spring: {
29937
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
29938
- $type: "cubicBezier"
29939
- }
29940
- },
29941
30194
  keyframes: {
29942
30195
  "slow-breathe": {
29943
30196
  $value: "0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}",
@@ -29967,7 +30220,6 @@ var zenLight = {
29967
30220
  $description: "Minimalist Japanese aesthetic \u2014 warm stone tones, deliberate space, and unhurried motion.",
29968
30221
  $metadata: {
29969
30222
  font: "Noto Serif JP",
29970
- fontUrl: "https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",
29971
30223
  philosophy: "Beauty in imperfection. Stillness as presence."
29972
30224
  },
29973
30225
  color: {
@@ -30035,12 +30287,12 @@ var zenLight = {
30035
30287
  "800": { $type: "color", $value: "#2c3d46" }
30036
30288
  },
30037
30289
  // Semantic roles
30038
- surface: { $value: "#faf9f7", $type: "color" },
30039
- onSurface: { $value: "#2a2724", $type: "color" },
30040
- surfaceVariant: { $value: "#f3f1ed", $type: "color" },
30041
- onSurfaceVariant: { $value: "#6b635b", $type: "color" },
30042
- container: { $value: "#e8ebe2", $type: "color" },
30043
- onContainer: { $value: "#33392e", $type: "color" },
30290
+ ground: { $value: "#faf9f7", $type: "color" },
30291
+ onGround: { $value: "#2a2724", $type: "color" },
30292
+ sunken: { $value: "#f3f1ed", $type: "color" },
30293
+ onSunken: { $value: "#6b635b", $type: "color" },
30294
+ container: { $value: "#faf9f7", $type: "color" },
30295
+ onContainer: { $value: "#2a2724", $type: "color" },
30044
30296
  outline: { $value: "#d5d0c8", $type: "color" },
30045
30297
  outlineVariant: { $value: "#e7e4de", $type: "color" },
30046
30298
  // Primary role pair — onPrimary is stone ivory on moss.
@@ -30084,7 +30336,6 @@ var zenDark = {
30084
30336
  $description: "Minimalist Japanese aesthetic (dark) \u2014 dusk stone surfaces with restrained moss accents and unhurried motion.",
30085
30337
  $metadata: {
30086
30338
  font: "Noto Serif JP",
30087
- fontUrl: "https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",
30088
30339
  philosophy: "Beauty in imperfection. Stillness as presence."
30089
30340
  },
30090
30341
  color: {
@@ -30153,14 +30404,14 @@ var zenDark = {
30153
30404
  "700": { $type: "color", $value: "#546771" },
30154
30405
  "800": { $type: "color", $value: "#38454d" }
30155
30406
  },
30156
- surface: { $value: "#2a2724", $type: "color" },
30157
- onSurface: { $value: "#f3f1ed", $type: "color" },
30407
+ ground: { $value: "#2a2724", $type: "color" },
30408
+ onGround: { $value: "#f3f1ed", $type: "color" },
30158
30409
  // muted off-cream, not pure white
30159
- surfaceVariant: { $value: "#3e3a36", $type: "color" },
30160
- onSurfaceVariant: { $value: "#b8b0a4", $type: "color" },
30161
- container: { $value: "#48543d", $type: "color" },
30410
+ sunken: { $value: "#3e3a36", $type: "color" },
30411
+ onSunken: { $value: "#b8b0a4", $type: "color" },
30412
+ container: { $value: "#2a2724", $type: "color" },
30162
30413
  // deep moss
30163
- onContainer: { $value: "#e8ebe2", $type: "color" },
30414
+ onContainer: { $value: "#f3f1ed", $type: "color" },
30164
30415
  // primary-100 in dark tree
30165
30416
  outline: { $value: "#5e5650", $type: "color" },
30166
30417
  outlineVariant: { $value: "#3e3a36", $type: "color" },
@@ -30214,23 +30465,11 @@ var shared4 = {
30214
30465
  $type: "fontFamily"
30215
30466
  }
30216
30467
  },
30217
- size: {
30218
- sm: { $value: "0.875rem", $type: "dimension" },
30219
- base: { $value: "1rem", $type: "dimension" },
30220
- lg: { $value: "1.125rem", $type: "dimension" },
30221
- xl: { $value: "1.25rem", $type: "dimension" },
30222
- "2xl": { $value: "1.5rem", $type: "dimension" }
30223
- },
30224
30468
  weight: {
30225
30469
  normal: { $value: "400", $type: "fontWeight" },
30226
30470
  medium: { $value: "500", $type: "fontWeight" },
30227
30471
  semibold: { $value: "600", $type: "fontWeight" },
30228
30472
  bold: { $value: "700", $type: "fontWeight" }
30229
- },
30230
- lineHeight: {
30231
- tight: { $value: "1.25", $type: "number" },
30232
- normal: { $value: "1.5", $type: "number" },
30233
- relaxed: { $value: "1.75", $type: "number" }
30234
30473
  }
30235
30474
  },
30236
30475
  spacing: {
@@ -30263,26 +30502,6 @@ var shared4 = {
30263
30502
  }
30264
30503
  },
30265
30504
  motion: {
30266
- duration: {
30267
- fast: { $value: "120ms", $type: "duration" },
30268
- normal: { $value: "250ms", $type: "duration" },
30269
- slow: { $value: "800ms", $type: "duration" },
30270
- ambient: { $value: "2500ms", $type: "duration" }
30271
- },
30272
- easing: {
30273
- default: {
30274
- $value: "cubic-bezier(0.4, 0, 0.2, 1)",
30275
- $type: "cubicBezier"
30276
- },
30277
- bounce: {
30278
- $value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
30279
- $type: "cubicBezier"
30280
- },
30281
- spring: {
30282
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
30283
- $type: "cubicBezier"
30284
- }
30285
- },
30286
30505
  transition: {
30287
30506
  fast: {
30288
30507
  $value: "120ms cubic-bezier(0.4, 0, 0.2, 1)",
@@ -30330,7 +30549,6 @@ var neonNoirLight = {
30330
30549
  $description: "Hot pink neon on dark \u2014 electric glow effects, neon flicker, and flowing magenta particles.",
30331
30550
  $metadata: {
30332
30551
  font: "Outfit",
30333
- fontUrl: "https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",
30334
30552
  philosophy: "Midnight electricity. The city never sleeps."
30335
30553
  },
30336
30554
  color: {
@@ -30375,12 +30593,12 @@ var neonNoirLight = {
30375
30593
  "500": { $value: "#38bdf8", $type: "color" }
30376
30594
  },
30377
30595
  // Semantic roles (dark theme — inverted neutral scale)
30378
- surface: { $value: "#09090b", $type: "color" },
30379
- onSurface: { $value: "#ececf0", $type: "color" },
30380
- surfaceVariant: { $value: "#111114", $type: "color" },
30381
- onSurfaceVariant: { $value: "#8a8a9a", $type: "color" },
30382
- container: { $value: "#9d174d", $type: "color" },
30383
- onContainer: { $value: "#fce7f3", $type: "color" },
30596
+ ground: { $value: "#09090b", $type: "color" },
30597
+ onGround: { $value: "#ececf0", $type: "color" },
30598
+ sunken: { $value: "#111114", $type: "color" },
30599
+ onSunken: { $value: "#8a8a9a", $type: "color" },
30600
+ container: { $value: "#09090b", $type: "color" },
30601
+ onContainer: { $value: "#ececf0", $type: "color" },
30384
30602
  outline: { $value: "#3b3b44", $type: "color" },
30385
30603
  outlineVariant: { $value: "#232329", $type: "color" },
30386
30604
  // Primary role pair — onPrimary is deep noir so hot pink CTAs pop.
@@ -30422,7 +30640,6 @@ var neonNoirDark = {
30422
30640
  $description: "Hot pink neon on pure black (dark) \u2014 sharper noir contrast, brighter electric glow, deeper magenta containers.",
30423
30641
  $metadata: {
30424
30642
  font: "Outfit",
30425
- fontUrl: "https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",
30426
30643
  philosophy: "Midnight electricity. The city never sleeps."
30427
30644
  },
30428
30645
  color: {
@@ -30468,13 +30685,13 @@ var neonNoirDark = {
30468
30685
  ...standardSemanticScales.dark.info,
30469
30686
  "500": { $value: "#5acdff", $type: "color" }
30470
30687
  },
30471
- surface: { $value: "#000000", $type: "color" },
30472
- onSurface: { $value: "#ececf0", $type: "color" },
30473
- surfaceVariant: { $value: "#09090b", $type: "color" },
30474
- onSurfaceVariant: { $value: "#b0b0be", $type: "color" },
30475
- container: { $value: "#be185d", $type: "color" },
30688
+ ground: { $value: "#000000", $type: "color" },
30689
+ onGround: { $value: "#ececf0", $type: "color" },
30690
+ sunken: { $value: "#09090b", $type: "color" },
30691
+ onSunken: { $value: "#b0b0be", $type: "color" },
30692
+ container: { $value: "#000000", $type: "color" },
30476
30693
  // richer magenta
30477
- onContainer: { $value: "#fce7f3", $type: "color" },
30694
+ onContainer: { $value: "#ececf0", $type: "color" },
30478
30695
  outline: { $value: "#19191e", $type: "color" },
30479
30696
  outlineVariant: { $value: "#111114", $type: "color" },
30480
30697
  // Primary role pair — dark: onPrimary is pure black, container = richer magenta.
@@ -30524,23 +30741,11 @@ var shared5 = {
30524
30741
  $type: "fontFamily"
30525
30742
  }
30526
30743
  },
30527
- size: {
30528
- sm: { $value: "0.875rem", $type: "dimension" },
30529
- base: { $value: "1rem", $type: "dimension" },
30530
- lg: { $value: "1.15rem", $type: "dimension" },
30531
- xl: { $value: "1.3rem", $type: "dimension" },
30532
- "2xl": { $value: "1.625rem", $type: "dimension" }
30533
- },
30534
30744
  weight: {
30535
30745
  normal: { $value: "400", $type: "fontWeight" },
30536
30746
  medium: { $value: "500", $type: "fontWeight" },
30537
30747
  semibold: { $value: "600", $type: "fontWeight" },
30538
30748
  bold: { $value: "700", $type: "fontWeight" }
30539
- },
30540
- lineHeight: {
30541
- tight: { $value: "1.3", $type: "number" },
30542
- normal: { $value: "1.6", $type: "number" },
30543
- relaxed: { $value: "1.85", $type: "number" }
30544
30749
  }
30545
30750
  },
30546
30751
  spacing: {
@@ -30582,26 +30787,6 @@ var shared5 = {
30582
30787
  }
30583
30788
  },
30584
30789
  motion: {
30585
- duration: {
30586
- fast: { $value: "200ms", $type: "duration" },
30587
- normal: { $value: "400ms", $type: "duration" },
30588
- slow: { $value: "1200ms", $type: "duration" },
30589
- ambient: { $value: "5000ms", $type: "duration" }
30590
- },
30591
- easing: {
30592
- default: {
30593
- $value: "cubic-bezier(0.4, 0, 0.2, 1)",
30594
- $type: "cubicBezier"
30595
- },
30596
- bounce: {
30597
- $value: "cubic-bezier(0.34, 1.3, 0.64, 1)",
30598
- $type: "cubicBezier"
30599
- },
30600
- spring: {
30601
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
30602
- $type: "cubicBezier"
30603
- }
30604
- },
30605
30790
  keyframes: {
30606
30791
  "leaf-float": {
30607
30792
  $value: "0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}",
@@ -30624,7 +30809,6 @@ var botanicalLight = {
30624
30809
  $description: "Organic greens on warm cream \u2014 leaf-float animations and vine-grow motion.",
30625
30810
  $metadata: {
30626
30811
  font: "Lora",
30627
- fontUrl: "https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",
30628
30812
  philosophy: "Rooted in nature. Growing with intention."
30629
30813
  },
30630
30814
  color: {
@@ -30673,12 +30857,12 @@ var botanicalLight = {
30673
30857
  },
30674
30858
  info: standardSemanticScales.light.info,
30675
30859
  // Semantic roles
30676
- surface: { $value: "#fefcf8", $type: "color" },
30677
- onSurface: { $value: "#352e20", $type: "color" },
30678
- surfaceVariant: { $value: "#fdf8ef", $type: "color" },
30679
- onSurfaceVariant: { $value: "#746448", $type: "color" },
30680
- container: { $value: "#dcfce7", $type: "color" },
30681
- onContainer: { $value: "#14532d", $type: "color" },
30860
+ ground: { $value: "#fefcf8", $type: "color" },
30861
+ onGround: { $value: "#352e20", $type: "color" },
30862
+ sunken: { $value: "#fdf8ef", $type: "color" },
30863
+ onSunken: { $value: "#746448", $type: "color" },
30864
+ container: { $value: "#fefcf8", $type: "color" },
30865
+ onContainer: { $value: "#352e20", $type: "color" },
30682
30866
  outline: { $value: "#f0e4c9", $type: "color" },
30683
30867
  outlineVariant: { $value: "#f8f0df", $type: "color" },
30684
30868
  // Primary role pair — onPrimary is cream for the leaf-green brand hex.
@@ -30720,7 +30904,6 @@ var botanicalDark = {
30720
30904
  $description: "Forest at night (dark) \u2014 deep soil surfaces with lifted leaf-green accents and gentle organic motion.",
30721
30905
  $metadata: {
30722
30906
  font: "Lora",
30723
- fontUrl: "https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",
30724
30907
  philosophy: "Rooted in nature. Growing with intention."
30725
30908
  },
30726
30909
  color: {
@@ -30755,13 +30938,13 @@ var botanicalDark = {
30755
30938
  warning: standardSemanticScales.dark.warning,
30756
30939
  error: standardSemanticScales.dark.error,
30757
30940
  info: standardSemanticScales.dark.info,
30758
- surface: { $value: "#1f1c18", $type: "color" },
30759
- onSurface: { $value: "#fefcf8", $type: "color" },
30760
- surfaceVariant: { $value: "#352e20", $type: "color" },
30761
- onSurfaceVariant: { $value: "#dccba5", $type: "color" },
30762
- container: { $value: "#166534", $type: "color" },
30941
+ ground: { $value: "#1f1c18", $type: "color" },
30942
+ onGround: { $value: "#fefcf8", $type: "color" },
30943
+ sunken: { $value: "#352e20", $type: "color" },
30944
+ onSunken: { $value: "#dccba5", $type: "color" },
30945
+ container: { $value: "#1f1c18", $type: "color" },
30763
30946
  // deep forest
30764
- onContainer: { $value: "#dcfce7", $type: "color" },
30947
+ onContainer: { $value: "#fefcf8", $type: "color" },
30765
30948
  outline: { $value: "#504530", $type: "color" },
30766
30949
  outlineVariant: { $value: "#352e20", $type: "color" },
30767
30950
  // Primary role pair — dark: lifted leaf-green, onPrimary = forest soil.
@@ -30828,24 +31011,11 @@ var shared6 = {
30828
31011
  $type: "fontFamily"
30829
31012
  }
30830
31013
  },
30831
- size: {
30832
- sm: { $value: "0.875rem", $type: "dimension" },
30833
- base: { $value: "1rem", $type: "dimension" },
30834
- lg: { $value: "1.125rem", $type: "dimension" },
30835
- xl: { $value: "1.25rem", $type: "dimension" },
30836
- "2xl": { $value: "1.5rem", $type: "dimension" }
30837
- },
30838
31014
  weight: {
30839
31015
  normal: { $value: "400", $type: "fontWeight" },
30840
31016
  medium: { $value: "500", $type: "fontWeight" },
30841
31017
  semibold: { $value: "600", $type: "fontWeight" },
30842
31018
  bold: { $value: "700", $type: "fontWeight" }
30843
- },
30844
- lineHeight: {
30845
- tight: { $value: "1.25", $type: "number" },
30846
- normal: { $value: "1.55", $type: "number" },
30847
- // claude.ai-ish — slightly looser than Indigo
30848
- relaxed: { $value: "1.75", $type: "number" }
30849
31019
  }
30850
31020
  },
30851
31021
  // Same dual-key spacing scale as Indigo so primitives that
@@ -30903,21 +31073,6 @@ var shared6 = {
30903
31073
  motion: {
30904
31074
  // Claudic is calmer than Indigo — no `ambient` 3s breathing
30905
31075
  // duration is exposed. Animations stay snappy + functional only.
30906
- duration: {
30907
- fast: { $value: "120ms", $type: "duration" },
30908
- normal: { $value: "240ms", $type: "duration" },
30909
- slow: { $value: "480ms", $type: "duration" }
30910
- },
30911
- easing: {
30912
- default: {
30913
- $value: "cubic-bezier(0.4, 0, 0.2, 1)",
30914
- $type: "cubicBezier"
30915
- },
30916
- spring: {
30917
- $value: "cubic-bezier(0.22, 1, 0.36, 1)",
30918
- $type: "cubicBezier"
30919
- }
30920
- },
30921
31076
  keyframes: {
30922
31077
  entrance: {
30923
31078
  $value: "0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",
@@ -31018,15 +31173,15 @@ var claudicLight = {
31018
31173
  "800": { $value: "#363432", $type: "color" }
31019
31174
  },
31020
31175
  // Two-tier semantic roles
31021
- surface: { $value: "#faf9f5", $type: "color" },
31176
+ ground: { $value: "#faf9f5", $type: "color" },
31022
31177
  // Ivory
31023
- onSurface: { $value: "#141413", $type: "color" },
31178
+ onGround: { $value: "#141413", $type: "color" },
31024
31179
  // Slate
31025
- surfaceVariant: { $value: "#f5f4ee", $type: "color" },
31026
- onSurfaceVariant: { $value: "#56544f", $type: "color" },
31027
- container: { $value: "#fbf2ee", $type: "color" },
31180
+ sunken: { $value: "#f5f4ee", $type: "color" },
31181
+ onSunken: { $value: "#56544f", $type: "color" },
31182
+ container: { $value: "#faf9f5", $type: "color" },
31028
31183
  // primary-50
31029
- onContainer: { $value: "#4d2920", $type: "color" },
31184
+ onContainer: { $value: "#141413", $type: "color" },
31030
31185
  // primary-900
31031
31186
  outline: { $value: "#dad8cc", $type: "color" },
31032
31187
  outlineVariant: { $value: "#ebe9df", $type: "color" },
@@ -31158,14 +31313,14 @@ var claudicDark = {
31158
31313
  "700": { $value: "#d1cfca", $type: "color" },
31159
31314
  "800": { $value: "#e6e4e0", $type: "color" }
31160
31315
  },
31161
- surface: { $value: "#262624", $type: "color" },
31316
+ ground: { $value: "#262624", $type: "color" },
31162
31317
  // Charcoal
31163
- onSurface: { $value: "#faf9f5", $type: "color" },
31318
+ onGround: { $value: "#faf9f5", $type: "color" },
31164
31319
  // Ivory
31165
- surfaceVariant: { $value: "#2d2c2a", $type: "color" },
31166
- onSurfaceVariant: { $value: "#a8a59f", $type: "color" },
31167
- container: { $value: "#3d3b39", $type: "color" },
31168
- onContainer: { $value: "#fbf2ee", $type: "color" },
31320
+ sunken: { $value: "#2d2c2a", $type: "color" },
31321
+ onSunken: { $value: "#a8a59f", $type: "color" },
31322
+ container: { $value: "#262624", $type: "color" },
31323
+ onContainer: { $value: "#faf9f5", $type: "color" },
31169
31324
  outline: { $value: "#3d3b39", $type: "color" },
31170
31325
  outlineVariant: { $value: "#2d2c2a", $type: "color" },
31171
31326
  // Primary role pair — dark: onPrimary is charcoal so text reads on the
@@ -31230,31 +31385,12 @@ var shared7 = {
31230
31385
  $type: "fontFamily"
31231
31386
  }
31232
31387
  },
31233
- size: {
31234
- sm: { $value: "0.8125rem", $type: "dimension" },
31235
- // 13px
31236
- base: { $value: "0.9375rem", $type: "dimension" },
31237
- // 15px
31238
- lg: { $value: "1.0625rem", $type: "dimension" },
31239
- // 17px
31240
- xl: { $value: "1.3125rem", $type: "dimension" },
31241
- // 21px — bumped for display headings
31242
- "2xl": { $value: "1.75rem", $type: "dimension" }
31243
- // 28px — generous display
31244
- },
31245
31388
  weight: {
31246
31389
  normal: { $value: "400", $type: "fontWeight" },
31247
31390
  medium: { $value: "500", $type: "fontWeight" },
31248
31391
  semibold: { $value: "600", $type: "fontWeight" },
31249
31392
  bold: { $value: "680", $type: "fontWeight" }
31250
31393
  // variable-axis weight; reads bold without going harsh on Inter
31251
- },
31252
- lineHeight: {
31253
- tight: { $value: "1.1", $type: "number" },
31254
- // headings
31255
- normal: { $value: "1.55", $type: "number" },
31256
- // body — generous, editorial
31257
- relaxed: { $value: "1.7", $type: "number" }
31258
31394
  }
31259
31395
  },
31260
31396
  spacing: {
@@ -31311,24 +31447,6 @@ var shared7 = {
31311
31447
  }
31312
31448
  },
31313
31449
  motion: {
31314
- duration: {
31315
- fast: { $value: "150ms", $type: "duration" },
31316
- normal: { $value: "250ms", $type: "duration" },
31317
- slow: { $value: "420ms", $type: "duration" },
31318
- ambient: { $value: "8000ms", $type: "duration" }
31319
- // background breathing
31320
- },
31321
- easing: {
31322
- // Linear's signature easing — confident, slightly overshoots arrival.
31323
- default: {
31324
- $value: "cubic-bezier(0.32, 0.72, 0, 1)",
31325
- $type: "cubicBezier"
31326
- },
31327
- spring: {
31328
- $value: "cubic-bezier(0.16, 1, 0.3, 1)",
31329
- $type: "cubicBezier"
31330
- }
31331
- },
31332
31450
  keyframes: {
31333
31451
  entrance: {
31334
31452
  $value: "0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}",
@@ -31427,15 +31545,15 @@ var indigoLight = {
31427
31545
  "700": { $value: "#155e75", $type: "color" },
31428
31546
  "800": { $value: "#164e63", $type: "color" }
31429
31547
  },
31430
- surface: { $value: "#fafaf7", $type: "color" },
31548
+ ground: { $value: "#fafaf7", $type: "color" },
31431
31549
  // Paper
31432
- onSurface: { $value: "#15131f", $type: "color" },
31550
+ onGround: { $value: "#15131f", $type: "color" },
31433
31551
  // Ink
31434
- surfaceVariant: { $value: "#f4f4f0", $type: "color" },
31435
- onSurfaceVariant: { $value: "#4a4954", $type: "color" },
31436
- container: { $value: "#eef2ff", $type: "color" },
31552
+ sunken: { $value: "#f4f4f0", $type: "color" },
31553
+ onSunken: { $value: "#4a4954", $type: "color" },
31554
+ container: { $value: "#fafaf7", $type: "color" },
31437
31555
  // primary-50 — pale indigo whisper
31438
- onContainer: { $value: "#1e1b4b", $type: "color" },
31556
+ onContainer: { $value: "#15131f", $type: "color" },
31439
31557
  // primary-900
31440
31558
  outline: { $value: "#d4d3cf", $type: "color" },
31441
31559
  outlineVariant: { $value: "#e8e7e3", $type: "color" },
@@ -31569,13 +31687,13 @@ var indigoDark = {
31569
31687
  // indistinguishable from default. Variant is now #221e35 (visible
31570
31688
  // 1-tier step) and outline #3e3c50 (matches neutral-400, gives
31571
31689
  // borders a hairline visibility on dark).
31572
- surface: { $value: "#15131f", $type: "color" },
31573
- onSurface: { $value: "#f5f4f9", $type: "color" },
31574
- surfaceVariant: { $value: "#221e35", $type: "color" },
31575
- onSurfaceVariant: { $value: "#c8c6d2", $type: "color" },
31576
- container: { $value: "#312e81", $type: "color" },
31690
+ ground: { $value: "#15131f", $type: "color" },
31691
+ onGround: { $value: "#f5f4f9", $type: "color" },
31692
+ sunken: { $value: "#221e35", $type: "color" },
31693
+ onSunken: { $value: "#c8c6d2", $type: "color" },
31694
+ container: { $value: "#15131f", $type: "color" },
31577
31695
  // primary-100 dark
31578
- onContainer: { $value: "#eef2ff", $type: "color" },
31696
+ onContainer: { $value: "#f5f4f9", $type: "color" },
31579
31697
  outline: { $value: "#3e3c50", $type: "color" },
31580
31698
  outlineVariant: { $value: "#2a2839", $type: "color" },
31581
31699
  // Primary role pair — dark: onPrimary is midnight, container = deep indigo.
@@ -31634,23 +31752,11 @@ var shared8 = {
31634
31752
  $type: "fontFamily"
31635
31753
  }
31636
31754
  },
31637
- size: {
31638
- sm: { $value: "0.875rem", $type: "dimension" },
31639
- base: { $value: "1rem", $type: "dimension" },
31640
- lg: { $value: "1.125rem", $type: "dimension" },
31641
- xl: { $value: "1.25rem", $type: "dimension" },
31642
- "2xl": { $value: "1.5rem", $type: "dimension" }
31643
- },
31644
31755
  weight: {
31645
31756
  normal: { $value: "400", $type: "fontWeight" },
31646
31757
  medium: { $value: "500", $type: "fontWeight" },
31647
31758
  semibold: { $value: "600", $type: "fontWeight" },
31648
31759
  bold: { $value: "700", $type: "fontWeight" }
31649
- },
31650
- lineHeight: {
31651
- tight: { $value: "1.25", $type: "number" },
31652
- normal: { $value: "1.5", $type: "number" },
31653
- relaxed: { $value: "1.75", $type: "number" }
31654
31760
  }
31655
31761
  },
31656
31762
  spacing: {
@@ -31670,20 +31776,6 @@ var shared8 = {
31670
31776
  // round-3 "borders looking ugly" residual's shadow half), light
31671
31777
  // wants classic soft grey.
31672
31778
  motion: {
31673
- duration: {
31674
- fast: { $value: "120ms", $type: "duration" },
31675
- normal: { $value: "200ms", $type: "duration" },
31676
- slow: { $value: "400ms", $type: "duration" },
31677
- ambient: { $value: "2000ms", $type: "duration" }
31678
- },
31679
- easing: {
31680
- default: { $value: "cubic-bezier(0.4, 0, 0.2, 1)", $type: "cubicBezier" },
31681
- bounce: {
31682
- $value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
31683
- $type: "cubicBezier"
31684
- },
31685
- spring: { $value: "cubic-bezier(0.22, 1, 0.36, 1)", $type: "cubicBezier" }
31686
- },
31687
31779
  transition: {
31688
31780
  fast: { $value: "120ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
31689
31781
  normal: { $value: "200ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
@@ -31752,7 +31844,6 @@ var guueyBrandDark = {
31752
31844
  $description: "The guuey product brand (dark) \u2014 slate-ink surfaces, slime #B8FF3A accent, DM Sans.",
31753
31845
  $metadata: {
31754
31846
  font: "DM Sans",
31755
- fontUrl: "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap",
31756
31847
  philosophy: "Agent-native. Slime on slate.",
31757
31848
  // Round 5 (founder-ruled): the guuey host clips the view with its
31758
31849
  // own rounded rim — the HOST owns the card silhouette; the theme
@@ -31842,11 +31933,11 @@ var guueyBrandDark = {
31842
31933
  "800": { $value: "#BFECFF", $type: "color" }
31843
31934
  },
31844
31935
  // M3 roles — portal values verbatim.
31845
- surface: { $value: "#1A1D24", $type: "color" },
31846
- onSurface: { $value: "#F6F5EE", $type: "color" },
31847
- surfaceVariant: { $value: "#242938", $type: "color" },
31848
- onSurfaceVariant: { $value: "#B7BAC4", $type: "color" },
31849
- container: { $value: "#232630", $type: "color" },
31936
+ ground: { $value: "#1A1D24", $type: "color" },
31937
+ onGround: { $value: "#F6F5EE", $type: "color" },
31938
+ sunken: { $value: "#242938", $type: "color" },
31939
+ onSunken: { $value: "#B7BAC4", $type: "color" },
31940
+ container: { $value: "#1A1D24", $type: "color" },
31850
31941
  // elevated
31851
31942
  onContainer: { $value: "#F6F5EE", $type: "color" },
31852
31943
  // Round 4 (portal stops): .14 IS the base hairline; .18 is the
@@ -31945,11 +32036,11 @@ var guueyBrandLight = {
31945
32036
  "700": { $value: "#06455D", $type: "color" },
31946
32037
  "800": { $value: "#0A3346", $type: "color" }
31947
32038
  },
31948
- surface: { $value: "#FFFFFF", $type: "color" },
31949
- onSurface: { $value: "#1A1D24", $type: "color" },
31950
- surfaceVariant: { $value: "#F6F5EE", $type: "color" },
31951
- onSurfaceVariant: { $value: "#4A4F5C", $type: "color" },
31952
- container: { $value: "#FBFAF6", $type: "color" },
32039
+ ground: { $value: "#FFFFFF", $type: "color" },
32040
+ onGround: { $value: "#1A1D24", $type: "color" },
32041
+ sunken: { $value: "#F6F5EE", $type: "color" },
32042
+ onSunken: { $value: "#4A4F5C", $type: "color" },
32043
+ container: { $value: "#FFFFFF", $type: "color" },
31953
32044
  onContainer: { $value: "#1A1D24", $type: "color" },
31954
32045
  outline: { $value: "rgba(26, 29, 36, 0.18)", $type: "color" },
31955
32046
  outlineVariant: { $value: "rgba(26, 29, 36, 0.10)", $type: "color" },
@@ -32093,28 +32184,34 @@ function getScopedThemeCss(themeId, scopeClass, mode = "light") {
32093
32184
  }
32094
32185
  const primary500 = resolvePrimary500Hex(theme9.cssVariables);
32095
32186
  const scoped = withColorMixFallback(theme9.cssVariables.replace(/^:root\s*\{/, `.${scopeClass} {`), `.${scopeClass}`, primary500);
32096
- const baseInherits = `.${scopeClass} {
32097
- font-family: var(--ggui-font-family-sans);
32098
- color: var(--ggui-color-onSurface);
32099
- background-color: transparent;
32100
- }`;
32187
+ const baseInherits = baseInheritsRule(scopeClass);
32101
32188
  const gradientTokens = buildGradientTokens(scopeClass, primary500);
32102
- const framelessRule = theme9.metadata?.frameless === true ? `
32103
- .${scopeClass} > :where(:not(style)) { border: none !important; }` : "";
32189
+ const framelessRule = theme9.metadata?.frameless === true ? framelessSuppressionRule(scopeClass) : "";
32104
32190
  return `${scoped}
32105
32191
  ${baseInherits}
32106
32192
  ${gradientTokens}
32107
32193
  ${theme9.cssKeyframes}
32108
32194
  ${structuralScaffolding(scopeClass)}${framelessRule}`;
32109
32195
  }
32196
+ function framelessSuppressionRule(scopeClass) {
32197
+ return `
32198
+ .${scopeClass} > :where(:not(style)) { border: none !important; }`;
32199
+ }
32110
32200
  function structuralScaffolding(scopeClass) {
32111
32201
  return `.${scopeClass} *, .${scopeClass} *::before, .${scopeClass} *::after { box-sizing: border-box; }
32112
32202
  .${scopeClass} h1, .${scopeClass} h2, .${scopeClass} h3, .${scopeClass} h4, .${scopeClass} h5, .${scopeClass} h6, .${scopeClass} button, .${scopeClass} input, .${scopeClass} textarea, .${scopeClass} select { font-family: inherit; }`;
32113
32203
  }
32204
+ function baseInheritsRule(scopeClass) {
32205
+ return `.${scopeClass} {
32206
+ font-family: var(--ggui-font-family-sans);
32207
+ color: var(--ggui-color-onGround);
32208
+ background-color: transparent;
32209
+ }`;
32210
+ }
32114
32211
  function buildGradientTokens(scopeClass, primary500Hex) {
32115
32212
  const selector = `.${scopeClass}`;
32116
32213
  const primaryGradient = ` --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);`;
32117
- 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%);`;
32214
+ const surfaceGradientModern = ` --ggui-color-ground-gradient: linear-gradient(180deg, var(--ggui-color-ground) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-ground)) 100%);`;
32118
32215
  const glowModern = ` --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);`;
32119
32216
  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;`;
32120
32217
  if (!primary500Hex) {
@@ -32125,7 +32222,7 @@ ${glowModern}
32125
32222
  ${glowStrongModern}
32126
32223
  }`;
32127
32224
  }
32128
- const surfaceGradientFallback = ` --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);`;
32225
+ const surfaceGradientFallback = ` --ggui-color-ground-gradient: linear-gradient(180deg, var(--ggui-color-ground) 0%, var(--ggui-color-ground) 100%);`;
32129
32226
  const glowFallback = ` --ggui-effect-glow-primary: ${precomputePrimaryColorMix("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)", primary500Hex)};`;
32130
32227
  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)};`;
32131
32228
  const baseBlock = `${selector} {
@@ -32486,6 +32583,20 @@ var ASSET_SHIM_FOR_SPECIFIER = {
32486
32583
  "@ggui-ai/wire": "wire",
32487
32584
  "@ggui-ai/gadgets": "gadgets"
32488
32585
  };
32586
+ function findBareImportSpecifiers(code) {
32587
+ const out = /* @__PURE__ */ new Set();
32588
+ const re = /(?:^|[^.\w$])(?:import|from)\s*['"]([^'"]+)['"]/g;
32589
+ let m;
32590
+ while ((m = re.exec(code)) !== null) {
32591
+ const spec = m[1];
32592
+ if (spec === void 0)
32593
+ continue;
32594
+ if (/^(?:[a-z][a-z0-9+.-]*:|\.{0,2}\/)/i.test(spec))
32595
+ continue;
32596
+ out.add(spec);
32597
+ }
32598
+ return [...out];
32599
+ }
32489
32600
  function rewriteAssetUrl(code, opts) {
32490
32601
  const base = opts.shimBaseUrl.replace(/\/$/, "");
32491
32602
  for (const [specifier, shimName] of Object.entries(ASSET_SHIM_FOR_SPECIFIER)) {
@@ -32500,7 +32611,21 @@ function rewriteImportmap(code, opts) {
32500
32611
  code = replaceSpecifier(code, "react", base);
32501
32612
  return code;
32502
32613
  }
32614
+ var FORBIDDEN_IMPORT_SPECIFIERS = ["@ggui-ai/wire/internal"];
32615
+ var ForbiddenImportSpecifierError = class extends Error {
32616
+ specifier;
32617
+ constructor(specifier) {
32618
+ super(`import rewriter: generated component code imported '${specifier}', which is not available to components \u2014 it is the writer side of the wire; components read \`useRender().isConnected\` and never write it`);
32619
+ this.name = "ForbiddenImportSpecifierError";
32620
+ this.specifier = specifier;
32621
+ }
32622
+ };
32503
32623
  function rewriteImports(code, options) {
32624
+ const bare = findBareImportSpecifiers(code);
32625
+ for (const specifier of FORBIDDEN_IMPORT_SPECIFIERS) {
32626
+ if (bare.includes(specifier))
32627
+ throw new ForbiddenImportSpecifierError(specifier);
32628
+ }
32504
32629
  switch (options.mode) {
32505
32630
  case "data-url":
32506
32631
  return rewriteDataUrl(code, options);
@@ -32579,7 +32704,7 @@ var ErrorBoundary = class extends import_react8.default.Component {
32579
32704
  gap: 8,
32580
32705
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
32581
32706
  fontSize: 13,
32582
- color: "var(--ggui-color-onSurface, inherit)",
32707
+ color: "var(--ggui-color-onContainer, inherit)",
32583
32708
  opacity: 0.6
32584
32709
  }, children: [
32585
32710
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: {
@@ -32604,7 +32729,7 @@ var ErrorBoundary = class extends import_react8.default.Component {
32604
32729
  gap: 12,
32605
32730
  textAlign: "center",
32606
32731
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
32607
- color: "var(--ggui-color-onSurface, inherit)"
32732
+ color: "var(--ggui-color-onContainer, inherit)"
32608
32733
  }, children: [
32609
32734
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: {
32610
32735
  width: 48,