@tangle-network/agent-app 0.51.6 → 0.51.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{DesignCanvasEditor-ZHKJIDOB.js → DesignCanvasEditor-Z6UUPJKS.js} +3 -3
  2. package/dist/chat-routes/index.d.ts +1 -0
  3. package/dist/chat-routes/index.js +106 -4
  4. package/dist/chat-routes/index.js.map +1 -1
  5. package/dist/chat-routes/intelligence.d.ts +32 -0
  6. package/dist/{chunk-KU5YAGLB.js → chunk-2YSXWBBL.js} +2 -2
  7. package/dist/chunk-C4V2LIUC.js +150 -0
  8. package/dist/chunk-C4V2LIUC.js.map +1 -0
  9. package/dist/{chunk-CBRYWGUO.js → chunk-D3OYEEHO.js} +2 -2
  10. package/dist/{chunk-CBRYWGUO.js.map → chunk-D3OYEEHO.js.map} +1 -1
  11. package/dist/{chunk-2PDKWV2S.js → chunk-E4SBLZRW.js} +2 -2
  12. package/dist/{chunk-PF3AZD5G.js → chunk-EYTU3Z7T.js} +4 -4
  13. package/dist/{chunk-SYIV74NB.js → chunk-KGUC7S72.js} +2 -2
  14. package/dist/{chunk-IYLPQKAH.js → chunk-SOGWOBFF.js} +2 -2
  15. package/dist/{chunk-QGSVF6DZ.js → chunk-ZVNPAJ7Z.js} +18 -8
  16. package/dist/chunk-ZVNPAJ7Z.js.map +1 -0
  17. package/dist/design-canvas-react/index.js +3 -3
  18. package/dist/design-canvas-react/lazy.js +1 -1
  19. package/dist/preset-cloudflare/index.js +2 -2
  20. package/dist/sandbox/index.js +4 -4
  21. package/dist/theme/brand.generated.d.ts +91 -0
  22. package/dist/theme/index.d.ts +1 -1
  23. package/dist/theme/index.js +1 -1
  24. package/dist/theme/tailwind-preset.d.ts +13 -17
  25. package/dist/theme/tailwind-preset.js +24 -64
  26. package/dist/theme/tailwind-preset.js.map +1 -1
  27. package/dist/theme/theme.d.ts +3 -15
  28. package/dist/theme/tokens.css +1051 -608
  29. package/dist/theme-contract/cli.js +1 -1
  30. package/dist/theme-contract/index.js +1 -1
  31. package/dist/tools/index.js +4 -4
  32. package/dist/work-product/index.js +2 -2
  33. package/package.json +7 -4
  34. package/dist/chunk-Q2QKEV6J.js +0 -144
  35. package/dist/chunk-Q2QKEV6J.js.map +0 -1
  36. package/dist/chunk-QGSVF6DZ.js.map +0 -1
  37. /package/dist/{DesignCanvasEditor-ZHKJIDOB.js.map → DesignCanvasEditor-Z6UUPJKS.js.map} +0 -0
  38. /package/dist/{chunk-KU5YAGLB.js.map → chunk-2YSXWBBL.js.map} +0 -0
  39. /package/dist/{chunk-2PDKWV2S.js.map → chunk-E4SBLZRW.js.map} +0 -0
  40. /package/dist/{chunk-PF3AZD5G.js.map → chunk-EYTU3Z7T.js.map} +0 -0
  41. /package/dist/{chunk-SYIV74NB.js.map → chunk-KGUC7S72.js.map} +0 -0
  42. /package/dist/{chunk-IYLPQKAH.js.map → chunk-SOGWOBFF.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  OPENUI_NODE_JSON_SCHEMA,
6
6
  OPENUI_NODE_TYPES
7
- } from "./chunk-CBRYWGUO.js";
7
+ } from "./chunk-D3OYEEHO.js";
8
8
 
9
9
  // src/tools/openai.ts
10
10
  var APP_TOOL_NAMES = ["submit_proposal", "schedule_followup", "render_ui", "add_citation"];
@@ -112,4 +112,4 @@ export {
112
112
  customToolToOpenAI,
113
113
  findCustomTool
114
114
  };
115
- //# sourceMappingURL=chunk-2PDKWV2S.js.map
115
+ //# sourceMappingURL=chunk-E4SBLZRW.js.map
@@ -6,7 +6,7 @@ import {
6
6
  buildAppToolOpenAITools,
7
7
  findCustomTool,
8
8
  isAppToolName
9
- } from "./chunk-2PDKWV2S.js";
9
+ } from "./chunk-E4SBLZRW.js";
10
10
  import {
11
11
  base64UrlDecodeText,
12
12
  base64UrlEncodeText,
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-S5SRJJQG.js";
16
16
  import {
17
17
  assertRenderUiSchema
18
- } from "./chunk-IYLPQKAH.js";
18
+ } from "./chunk-SOGWOBFF.js";
19
19
  import {
20
20
  ToolInputError
21
- } from "./chunk-CBRYWGUO.js";
21
+ } from "./chunk-D3OYEEHO.js";
22
22
 
23
23
  // src/tools/capability.ts
24
24
  async function createCapabilityToken(userId, opts) {
@@ -270,4 +270,4 @@ export {
270
270
  createAppToolRuntimeExecutor,
271
271
  handleAppToolRequest
272
272
  };
273
- //# sourceMappingURL=chunk-PF3AZD5G.js.map
273
+ //# sourceMappingURL=chunk-EYTU3Z7T.js.map
@@ -1,7 +1,7 @@
1
1
  // src/design-canvas-react/lazy.tsx
2
2
  import { lazy } from "react";
3
3
  var DesignCanvasLazy = lazy(
4
- () => import("./DesignCanvasEditor-ZHKJIDOB.js").then((m) => ({ default: m.DesignCanvasEditor }))
4
+ () => import("./DesignCanvasEditor-Z6UUPJKS.js").then((m) => ({ default: m.DesignCanvasEditor }))
5
5
  );
6
6
  var DesignCanvasChromeLazy = lazy(
7
7
  () => import("./DesignCanvas-H6PVRRLU.js").then((m) => ({ default: m.DesignCanvas }))
@@ -11,4 +11,4 @@ export {
11
11
  DesignCanvasLazy,
12
12
  DesignCanvasChromeLazy
13
13
  };
14
- //# sourceMappingURL=chunk-SYIV74NB.js.map
14
+ //# sourceMappingURL=chunk-KGUC7S72.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ToolInputError,
3
3
  validateOpenUIJsonNode
4
- } from "./chunk-CBRYWGUO.js";
4
+ } from "./chunk-D3OYEEHO.js";
5
5
 
6
6
  // src/tools/render-ui-schema.ts
7
7
  function assertRenderUiSchema(value) {
@@ -14,4 +14,4 @@ function assertRenderUiSchema(value) {
14
14
  export {
15
15
  assertRenderUiSchema
16
16
  };
17
- //# sourceMappingURL=chunk-IYLPQKAH.js.map
17
+ //# sourceMappingURL=chunk-SOGWOBFF.js.map
@@ -4,12 +4,13 @@ import {
4
4
 
5
5
  // src/theme-contract/index.ts
6
6
  import { existsSync, readFileSync } from "fs";
7
- import { relative } from "path";
7
+ import { createRequire } from "module";
8
+ import { dirname, relative, resolve } from "path";
8
9
  import { fileURLToPath } from "url";
9
10
  var DANGEROUS_UTILITIES = [
10
- { suffix: "surface-container-highest", varName: "--secondary" },
11
- { suffix: "surface-container-high", varName: "--popover" },
12
- { suffix: "surface-container", varName: "--card" },
11
+ { suffix: "surface-container-highest", varName: "--md3-surface-container-highest" },
12
+ { suffix: "surface-container-high", varName: "--md3-surface-container-high" },
13
+ { suffix: "surface-container", varName: "--md3-surface-container" },
13
14
  { suffix: "card-foreground", varName: "--card-foreground" },
14
15
  { suffix: "popover-foreground", varName: "--popover-foreground" },
15
16
  { suffix: "card", varName: "--card" },
@@ -21,15 +22,24 @@ function buildUtilityRe(suffix) {
21
22
  }
22
23
  function definedVars(cssFiles) {
23
24
  const defs = /* @__PURE__ */ new Set();
24
- for (const file of cssFiles) {
25
+ const visited = /* @__PURE__ */ new Set();
26
+ const visit = (file) => {
27
+ if (visited.has(file)) return;
28
+ visited.add(file);
25
29
  let css;
26
30
  try {
27
31
  css = readFileSync(file, "utf8");
28
32
  } catch {
29
- continue;
33
+ return;
30
34
  }
31
35
  for (const m of css.matchAll(/^\s*(--[a-z0-9-]+)\s*:/gim)) if (m[1]) defs.add(m[1]);
32
- }
36
+ for (const m of css.matchAll(/@import\s+['"]([^'"]+)['"]/g)) {
37
+ if (!m[1]) continue;
38
+ const imported = m[1].startsWith(".") ? resolve(dirname(file), m[1]) : createRequire(file).resolve(m[1]);
39
+ visit(imported);
40
+ }
41
+ };
42
+ for (const file of cssFiles) visit(file);
33
43
  return defs;
34
44
  }
35
45
  function defaultTokensCss() {
@@ -86,4 +96,4 @@ function displayPath(file) {
86
96
  export {
87
97
  checkThemeContract
88
98
  };
89
- //# sourceMappingURL=chunk-QGSVF6DZ.js.map
99
+ //# sourceMappingURL=chunk-ZVNPAJ7Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme-contract/index.ts"],"sourcesContent":["/**\n * Exportable theme-token contract checker — the incident guard for the\n * invisible-popover class of bugs.\n *\n * The failure mode (tax-agent's transparent model dropdown; the whole\n * `bg-surface-container-*` family): a consumer app ships a component that\n * references a theme token — either as `var(--popover)` or as a Tailwind class\n * like `bg-surface-container-high` that the agent-app preset maps to\n * `hsl(var(--popover))` — but the app's OWN build never emits that custom\n * property (it forgot `import '@tangle-network/agent-app/styles'`, or dropped a\n * token in its local tokens.css). CSS resolves the missing var to nothing, the\n * surface paints transparent, and NOTHING errors. It ships invisible.\n *\n * `tests/theme/tokens-contract.test.ts` guards agent-app's OWN components. This\n * module lifts that walking logic into a function every CONSUMER app can run\n * against ITS OWN source in CI, comparing references to the tokens.css agent-app\n * ships plus any extra CSS the app defines.\n *\n * ── What each check covers (scope is deliberately honest) ────────────────────\n *\n * 1. var(--…) check — COMPLETE. Every `var(--name)` literal in the scanned\n * source (inline styles, `bg-[var(--name)]` arbitrary Tailwind values, CSS\n * template strings) is matched and compared against the defined token set.\n * This is exact: a `var(--x)` reference is unambiguous. It is a raw-text\n * scan (no AST), so a `var(--x)` written inside a comment or string literal\n * counts too — deliberate: it keeps the single-source logic identical to the\n * agent-app self-test, and a dangling `var(--x)` in a comment is a smell\n * worth surfacing. Suppress a deliberate one with `allowlist`.\n *\n * 2. Tailwind-utility check — INTENTIONALLY PARTIAL. Bare classes like\n * `bg-card` carry no `var(--)` and so are invisible to check 1; Tailwind\n * resolves them to `hsl(var(--card))` at build via the preset. Fully\n * resolving arbitrary Tailwind config is out of scope (it would mean\n * re-implementing Tailwind). Instead we check the SPECIFIC known-dangerous\n * families that have actually shipped invisible: the MD3 surface ladder\n * (`surface-container` / `-high` / `-highest`) and the `card` / `popover`\n * elevation pairs — exactly the utilities the agent-app tailwind-preset\n * registers onto elevation tokens (see src/theme/tailwind-preset.ts, the\n * source of truth for this mapping). The canvas/sequence aliases\n * (`--bg-input`, `--text-primary`, …) are consumed as `bg-[var(--…)]`\n * arbitrary values and so are already covered fully by check 1 — they need\n * no entry here.\n *\n * Node-only (reads the filesystem) → this lives in the `./theme-contract`\n * subpath, NOT `./theme`, which must stay browser-clean (it's in the\n * browser-safe manifest test).\n */\n\nimport { existsSync, readFileSync } from 'node:fs'\nimport { createRequire } from 'node:module'\nimport { dirname, relative, resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { walkSources } from '../legibility/walk-sources'\n\n/** Define options for scanning source directories and CSS token files in a theme contract */\nexport interface ThemeContractOptions {\n /** Consumer source directories to scan for token references (recursively). */\n srcDirs: string[]\n /**\n * Path to the base tokens.css whose `--name:` definitions are the ground\n * truth. Defaults to the tokens.css agent-app ships (`./styles`) — the set a\n * consumer gets from `import '@tangle-network/agent-app/styles'`.\n */\n tokensCss?: string\n /**\n * Additional CSS files whose `--name:` definitions also count as defined —\n * the app's own overrides/extensions layered on top of the base tokens.\n */\n extraTokensCss?: string[]\n /**\n * Token names (e.g. `--my-app-accent`) to treat as always-defined, suppressing\n * them from the missing list. For app-specific vars defined outside any CSS\n * the checker can see (injected at runtime, from a third-party stylesheet, …).\n */\n allowlist?: string[]\n}\n\n/** Describe a missing theme contract variable and where it was referenced */\nexport interface ThemeContractMiss {\n /** The undefined custom property, e.g. `--popover`. */\n varName: string\n /**\n * Where it was referenced: `path/to/file.tsx`, or\n * `path/to/file.tsx (via bg-surface-container-high)` when the reference is a\n * Tailwind utility that resolves to the token rather than a literal var().\n */\n referencedIn: string\n}\n\n/** Describe the result of validating a theme contract including success status and missing items */\nexport interface ThemeContractResult {\n ok: boolean\n missing: ThemeContractMiss[]\n}\n\n/**\n * Known-dangerous Tailwind utility families and the elevation token each\n * resolves to, mirroring src/theme/tailwind-preset.ts. Ordered longest-suffix\n * first so `surface-container-highest` is matched before `surface-container`.\n * The negative look-around in {@link buildUtilityRe} makes ordering belt-and-\n * suspenders rather than load-bearing.\n */\nconst DANGEROUS_UTILITIES: ReadonlyArray<{ suffix: string; varName: string }> = [\n { suffix: 'surface-container-highest', varName: '--md3-surface-container-highest' },\n { suffix: 'surface-container-high', varName: '--md3-surface-container-high' },\n { suffix: 'surface-container', varName: '--md3-surface-container' },\n { suffix: 'card-foreground', varName: '--card-foreground' },\n { suffix: 'popover-foreground', varName: '--popover-foreground' },\n { suffix: 'card', varName: '--card' },\n { suffix: 'popover', varName: '--popover' },\n]\n\n/** Tailwind color-utility prefixes that can carry a background/text/border color. */\nconst UTILITY_PREFIXES = 'bg|text|border|ring|fill|stroke'\n\n/**\n * Match a whole utility class for `suffix`, tolerant of variants (`hover:`,\n * `dark:`) and opacity (`/95`) but not of longer siblings: the trailing\n * `(?![\\w-])` stops `bg-surface-container` from matching inside\n * `bg-surface-container-high`, and `bg-card` from matching inside\n * `bg-card-foreground`.\n */\nfunction buildUtilityRe(suffix: string): RegExp {\n return new RegExp(`(?<![\\\\w-])(?:${UTILITY_PREFIXES})-${suffix}(?![\\\\w-])`, 'g')\n}\n\n/**\n * Every `--name:` DEFINITION across the given CSS files. A definition is\n * `--name:` at the start of a (trimmed) line; RHS references like\n * `hsl(var(--card))` are mid-line and are never counted as definitions.\n */\nfunction definedVars(cssFiles: string[]): Set<string> {\n const defs = new Set<string>()\n const visited = new Set<string>()\n const visit = (file: string): void => {\n if (visited.has(file)) return\n visited.add(file)\n let css: string\n try {\n css = readFileSync(file, 'utf8')\n } catch {\n return\n }\n for (const m of css.matchAll(/^\\s*(--[a-z0-9-]+)\\s*:/gim)) if (m[1]) defs.add(m[1])\n // Source tokens.css imports the published Brand sheet and its checked\n // projection. The packed public sheet has already inlined both. Follow\n // local imports here so the source and installed consumer see the same\n // definitions without making Brand a runtime dependency of the package.\n for (const m of css.matchAll(/@import\\s+['\"]([^'\"]+)['\"]/g)) {\n if (!m[1]) continue\n const imported = m[1].startsWith('.')\n ? resolve(dirname(file), m[1])\n : createRequire(file).resolve(m[1])\n visit(imported)\n }\n }\n for (const file of cssFiles) visit(file)\n return defs\n}\n\n/**\n * Default tokens.css: the one agent-app ships as `./styles`. Resolved relative\n * to this module's URL, but tolerant of where the bundler lands the running\n * code — tsup code-splits shared logic into a chunk at the dist ROOT, so the\n * tokens.css sits one directory DIFFERENTLY depending on layout:\n * - source (src/theme-contract/index.ts) → ../theme/tokens.css (src/theme)\n * - split chunk (dist/contract-*.js) → ./theme/tokens.css (dist/theme)\n * - unsplit entry (dist/theme-contract/index.js) → ../theme/tokens.css\n * Probe both and return the one that exists; fall back to the first for a\n * sensible error path if neither is present.\n */\nfunction defaultTokensCss(): string {\n const candidates = ['../theme/tokens.css', './theme/tokens.css'].map((rel) =>\n fileURLToPath(new URL(rel, import.meta.url)),\n )\n return candidates.find((p) => existsSync(p)) ?? candidates[0]!\n}\n\n/**\n * Check that every theme token a consumer's source references is actually\n * defined in the CSS that consumer ships. Returns the full missing set; the\n * caller decides how to fail (the bin exits non-zero on any miss).\n */\nexport function checkThemeContract(opts: ThemeContractOptions): ThemeContractResult {\n const tokensCss = opts.tokensCss ?? defaultTokensCss()\n const defined = definedVars([tokensCss, ...(opts.extraTokensCss ?? [])])\n const allow = new Set(opts.allowlist ?? [])\n const isDefined = (name: string) => defined.has(name) || allow.has(name)\n\n const files = opts.srcDirs.flatMap((dir) => walkSources(dir, ['.d.ts']))\n const utilityMatchers = DANGEROUS_UTILITIES.map((u) => ({ ...u, re: buildUtilityRe(u.suffix) }))\n\n // Dedupe by varName (literal check) and by varName+utility (utility check),\n // keeping the FIRST referencing file — enough to locate the offender without\n // drowning the report when one token is referenced across many files.\n const seenVar = new Map<string, string>()\n const seenUtility = new Map<string, string>()\n\n for (const file of files) {\n let text: string\n try {\n text = readFileSync(file, 'utf8')\n } catch {\n continue\n }\n const where = displayPath(file)\n\n // Check 1 — literal var(--…) references.\n for (const m of text.matchAll(/var\\(\\s*(--[a-z0-9-]+)/gi)) {\n const name = m[1]\n if (!name || isDefined(name) || seenVar.has(name)) continue\n seenVar.set(name, where)\n }\n\n // Check 2 — known-dangerous Tailwind utility classes.\n for (const u of utilityMatchers) {\n if (isDefined(u.varName)) continue\n const key = `${u.varName}::${u.suffix}`\n if (seenUtility.has(key)) continue\n u.re.lastIndex = 0\n if (u.re.test(text)) seenUtility.set(key, `${where} (via ${firstUtilityHit(text, u.suffix)})`)\n }\n }\n\n const missing: ThemeContractMiss[] = [\n ...[...seenVar].map(([varName, referencedIn]) => ({ varName, referencedIn })),\n ...[...seenUtility].map(([key, referencedIn]) => ({ varName: key.split('::')[0]!, referencedIn })),\n ]\n return { ok: missing.length === 0, missing }\n}\n\n/** The literal utility class (with prefix) first seen in `text` for `suffix`, for the report. */\nfunction firstUtilityHit(text: string, suffix: string): string {\n const m = buildUtilityRe(suffix).exec(text)\n return m?.[0] ?? `<utility>-${suffix}`\n}\n\n/** Path relative to cwd when it stays inside it, else the path as given — for readable reports. */\nfunction displayPath(file: string): string {\n const rel = relative(process.cwd(), file)\n return rel && !rel.startsWith('..') ? rel : file\n}\n"],"mappings":";;;;;AAgDA,SAAS,YAAY,oBAAoB;AACzC,SAAS,qBAAqB;AAC9B,SAAS,SAAS,UAAU,eAAe;AAC3C,SAAS,qBAAqB;AAmD9B,IAAM,sBAA0E;AAAA,EAC9E,EAAE,QAAQ,6BAA6B,SAAS,kCAAkC;AAAA,EAClF,EAAE,QAAQ,0BAA0B,SAAS,+BAA+B;AAAA,EAC5E,EAAE,QAAQ,qBAAqB,SAAS,0BAA0B;AAAA,EAClE,EAAE,QAAQ,mBAAmB,SAAS,oBAAoB;AAAA,EAC1D,EAAE,QAAQ,sBAAsB,SAAS,uBAAuB;AAAA,EAChE,EAAE,QAAQ,QAAQ,SAAS,SAAS;AAAA,EACpC,EAAE,QAAQ,WAAW,SAAS,YAAY;AAC5C;AAGA,IAAM,mBAAmB;AASzB,SAAS,eAAe,QAAwB;AAC9C,SAAO,IAAI,OAAO,iBAAiB,gBAAgB,KAAK,MAAM,cAAc,GAAG;AACjF;AAOA,SAAS,YAAY,UAAiC;AACpD,QAAM,OAAO,oBAAI,IAAY;AAC7B,QAAM,UAAU,oBA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AK,aAAa,MAAM;AACtC;AAGA,SAAS,YAAY,MAAsB;AACzC,QAAM,MAAM,SAAS,QAAQ,IAAI,GAAG,IAAI;AACxC,SAAO,OAAO,CAAC,IAAI,WAAW,IAAI,IAAI,MAAM;AAC9C;","names":[]}
@@ -12,7 +12,7 @@ import {
12
12
  downloadDataUrl,
13
13
  exportDocumentJson,
14
14
  exportPageDataUrl
15
- } from "../chunk-KU5YAGLB.js";
15
+ } from "../chunk-2YSXWBBL.js";
16
16
  import {
17
17
  BTN,
18
18
  BTN_ACTIVE,
@@ -42,7 +42,7 @@ import {
42
42
  formatRulerLabel,
43
43
  selectTickStep
44
44
  } from "../chunk-YJYPXMDL.js";
45
- import "../chunk-Q2QKEV6J.js";
45
+ import "../chunk-C4V2LIUC.js";
46
46
  import "../chunk-ZN5J47UX.js";
47
47
  import {
48
48
  DEFAULT_INSERT_TEMPLATES,
@@ -88,7 +88,7 @@ import {
88
88
  import {
89
89
  DesignCanvasChromeLazy,
90
90
  DesignCanvasLazy
91
- } from "../chunk-SYIV74NB.js";
91
+ } from "../chunk-KGUC7S72.js";
92
92
  import {
93
93
  assertSceneMediaSrc,
94
94
  bleedAwareExportBounds,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DesignCanvasChromeLazy,
3
3
  DesignCanvasLazy
4
- } from "../chunk-SYIV74NB.js";
4
+ } from "../chunk-KGUC7S72.js";
5
5
  export {
6
6
  DesignCanvasChromeLazy,
7
7
  DesignCanvasLazy
@@ -6,8 +6,8 @@ import {
6
6
  } from "../chunk-4ZJYNI53.js";
7
7
  import {
8
8
  assertRenderUiSchema
9
- } from "../chunk-IYLPQKAH.js";
10
- import "../chunk-CBRYWGUO.js";
9
+ } from "../chunk-SOGWOBFF.js";
10
+ import "../chunk-D3OYEEHO.js";
11
11
 
12
12
  // src/preset-cloudflare/workflow-instance.ts
13
13
  async function ensureCloudflareWorkflowInstance(binding, input) {
@@ -102,13 +102,13 @@ import {
102
102
  } from "../chunk-2TZLCQ5U.js";
103
103
  import "../chunk-MCYJON3F.js";
104
104
  import "../chunk-LWSJK546.js";
105
- import "../chunk-PF3AZD5G.js";
105
+ import "../chunk-EYTU3Z7T.js";
106
106
  import "../chunk-6A7MYOUI.js";
107
- import "../chunk-2PDKWV2S.js";
107
+ import "../chunk-E4SBLZRW.js";
108
108
  import "../chunk-UGWQLQDS.js";
109
109
  import "../chunk-S5SRJJQG.js";
110
- import "../chunk-IYLPQKAH.js";
111
- import "../chunk-CBRYWGUO.js";
110
+ import "../chunk-SOGWOBFF.js";
111
+ import "../chunk-D3OYEEHO.js";
112
112
  import "../chunk-JML7WKWU.js";
113
113
  export {
114
114
  DEFAULT_FOREGROUND_PROVISION_CLAIM_TTL_SECONDS,
@@ -0,0 +1,91 @@
1
+ /** GENERATED from @tangle-network/brand/styles/legacy-light.css
2
+ * SHA-256: ebbcc4fd742c1b1b7f7b64f0fbcfb3d356ecedbde531e58bc221f78f96012f3f
3
+ * Run node src/theme/build.mjs --write; do not edit colors or ratios here. */
4
+ export declare const brandThemes: {
5
+ readonly light: {
6
+ readonly background: "0 0% 91.7647%";
7
+ readonly foreground: "0 0% 17.6471%";
8
+ readonly card: "0 0% 100%";
9
+ readonly cardForeground: "0 0% 17.6471%";
10
+ readonly popover: "0 0% 100%";
11
+ readonly popoverForeground: "0 0% 17.6471%";
12
+ readonly primary: "243.2927 80.3922% 60%";
13
+ readonly primaryForeground: "0 0% 100%";
14
+ readonly secondary: "0 0% 94.902%";
15
+ readonly secondaryForeground: "0 0% 17.6471%";
16
+ readonly muted: "0 0% 94.902%";
17
+ readonly mutedForeground: "0 0% 29.8039%";
18
+ readonly accent: "0 0% 94.902%";
19
+ readonly accentForeground: "0 0% 17.6471%";
20
+ readonly destructive: "0 73.7089% 41.7647%";
21
+ readonly destructiveForeground: "0 0% 100%";
22
+ readonly border: "0 0% 81.5686%";
23
+ readonly input: "0 0% 29.8039%";
24
+ readonly ring: "246 54% 51%";
25
+ readonly success: "162.931 93.5484% 24.3137%";
26
+ readonly warning: "41 96% 50%";
27
+ readonly successForeground: "0 0% 100%";
28
+ readonly warningForeground: "0 0% 0%";
29
+ readonly warningStrong: "25.9259 90% 35.2941%";
30
+ readonly inputFill: "hsl(0 0% 96.0784%)";
31
+ readonly canvasBackdrop: "#dadada";
32
+ readonly borderSoft: "rgba(0, 0, 0, 0.10)";
33
+ readonly cardEdge: "rgba(0, 0, 0, 0.14)";
34
+ readonly canvasRender: {
35
+ readonly grid: "#d0d0d0";
36
+ readonly snapGrid: "#787878";
37
+ readonly snapGuide: "#0369a1";
38
+ readonly snapPage: "#ab4f09";
39
+ readonly snapElement: "#b91c1c";
40
+ readonly selectionStroke: "#5047eb";
41
+ readonly selectionAnchorFill: "#ffffff";
42
+ readonly placeholderFill: "#f7f7f7";
43
+ readonly placeholderStroke: "#d0d0d0";
44
+ readonly brokenFill: "#f2f2f2";
45
+ readonly brokenStroke: "#787878";
46
+ };
47
+ };
48
+ readonly dark: {
49
+ readonly background: "0 0% 8.6275%";
50
+ readonly foreground: "0 0% 90.1961%";
51
+ readonly card: "0 0% 18.8235%";
52
+ readonly cardForeground: "0 0% 90.1961%";
53
+ readonly popover: "0 0% 20.7843%";
54
+ readonly popoverForeground: "0 0% 90.1961%";
55
+ readonly primary: "229.6552 93.5484% 81.7647%";
56
+ readonly primaryForeground: "0 0% 0%";
57
+ readonly secondary: "0 0% 20.7843%";
58
+ readonly secondaryForeground: "0 0% 90.1961%";
59
+ readonly muted: "0 0% 20.7843%";
60
+ readonly mutedForeground: "0 0% 70.9804%";
61
+ readonly accent: "0 0% 20.7843%";
62
+ readonly accentForeground: "0 0% 90.1961%";
63
+ readonly destructive: "2.7907 100% 83.1373%";
64
+ readonly destructiveForeground: "0 0% 0%";
65
+ readonly border: "0 0% 29.8039%";
66
+ readonly input: "0 0% 70.9804%";
67
+ readonly ring: "233 100% 87%";
68
+ readonly success: "154.7107 60.199% 60.5882%";
69
+ readonly warning: "40 94% 56%";
70
+ readonly successForeground: "0 0% 0%";
71
+ readonly warningForeground: "0 0% 0%";
72
+ readonly warningStrong: "41.4545 88.2353% 63.3333%";
73
+ readonly inputFill: "hsl(0 0% 12.1569%)";
74
+ readonly canvasBackdrop: "#101010";
75
+ readonly borderSoft: "rgba(255, 255, 255, 0.10)";
76
+ readonly cardEdge: "rgba(255, 255, 255, 0.16)";
77
+ readonly canvasRender: {
78
+ readonly grid: "#4c4c4c";
79
+ readonly snapGrid: "#8e8e8e";
80
+ readonly snapGuide: "#67cdff";
81
+ readonly snapPage: "#f4c14f";
82
+ readonly snapElement: "#ffada9";
83
+ readonly selectionStroke: "#a5b4fc";
84
+ readonly selectionAnchorFill: "#3b3b3b";
85
+ readonly placeholderFill: "#242424";
86
+ readonly placeholderStroke: "#4c4c4c";
87
+ readonly brokenFill: "#353535";
88
+ readonly brokenStroke: "#8e8e8e";
89
+ };
90
+ };
91
+ };
@@ -5,6 +5,6 @@
5
5
  * import preset from '@tangle-network/agent-app/tailwind-preset' // shadcn name → var map
6
6
  * import { darkTheme, themeToCssVars } from '@tangle-network/agent-app/theme' // JS/runtime
7
7
  *
8
- * The CSS file is the canonical source; this module is the typed JS mirror.
8
+ * Brand is the canonical source; this module exposes the generated compatibility mirror.
9
9
  */
10
10
  export * from './theme';
@@ -3,7 +3,7 @@ import {
3
3
  lightTheme,
4
4
  themeColor,
5
5
  themeToCssVars
6
- } from "../chunk-Q2QKEV6J.js";
6
+ } from "../chunk-C4V2LIUC.js";
7
7
  export {
8
8
  darkTheme,
9
9
  lightTheme,
@@ -1,20 +1,3 @@
1
- /**
2
- * Tailwind preset mapping the shadcn semantic color names used by web-react
3
- * (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in
4
- * tokens.css — so a consuming app themes every agent-app surface from one source.
5
- *
6
- * // tailwind.config.{js,ts}
7
- * import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'
8
- * export default { presets: [agentAppPreset], content: [...] }
9
- *
10
- * Pair with `import '@tangle-network/agent-app/styles'` for the variable values.
11
- * design-canvas/sequences need no preset — they consume vars via arbitrary
12
- * values (bg-[var(--bg-input)]), which Tailwind supports without color config.
13
- *
14
- * Beyond colour this preset also maps the border TIERS, the semantic radius
15
- * steps, the motion scale, and the elevation shadows. See docs/design-tokens.md.
16
- */
17
- /** Define a preset configuration for dark mode and extended theme colors with foreground variants */
18
1
  declare const agentAppPreset: {
19
2
  darkMode: [string, string];
20
3
  theme: {
@@ -24,6 +7,7 @@ declare const agentAppPreset: {
24
7
  foreground: string;
25
8
  border: string;
26
9
  input: string;
10
+ 'input-fill': string;
27
11
  ring: string;
28
12
  success: {
29
13
  DEFAULT: string;
@@ -62,10 +46,22 @@ declare const agentAppPreset: {
62
46
  DEFAULT: string;
63
47
  foreground: string;
64
48
  };
49
+ 'surface-container-lowest': string;
50
+ 'surface-container-low': string;
65
51
  'surface-container': string;
66
52
  'surface-container-high': string;
67
53
  'surface-container-highest': string;
68
54
  };
55
+ backgroundColor: {
56
+ input: string;
57
+ };
58
+ textColor: {
59
+ warning: {
60
+ DEFAULT: string;
61
+ foreground: string;
62
+ strong: string;
63
+ };
64
+ };
69
65
  boxShadow: {
70
66
  raised: string;
71
67
  overlay: string;
@@ -13,13 +13,9 @@ var agentAppPreset = {
13
13
  foreground: "hsl(var(--foreground))",
14
14
  border: "hsl(var(--border))",
15
15
  input: "hsl(var(--input))",
16
+ "input-fill": "var(--bg-input)",
16
17
  ring: "hsl(var(--ring))",
17
18
  success: withForeground("success"),
18
- // `strong` sits alongside DEFAULT/foreground rather than replacing
19
- // either: `--warning` is the dot/border/tint hue, `--warning-foreground`
20
- // is what goes on a SOLID gold chip, and `text-warning-strong` is the
21
- // only one of the three that stays legible as text on a warning TINT in
22
- // both themes.
23
19
  warning: { ...withForeground("warning"), strong: "hsl(var(--warning-strong))" },
24
20
  card: withForeground("card"),
25
21
  popover: withForeground("popover"),
@@ -28,59 +24,34 @@ var agentAppPreset = {
28
24
  muted: withForeground("muted"),
29
25
  accent: withForeground("accent"),
30
26
  destructive: withForeground("destructive"),
31
- // MD3 surface ladder — wires sandbox-ui's `bg-surface-container*`
32
- // utilities (used by AgentComposer + its pickers) onto the shadcn
33
- // elevation triples, so those components render on-palette here.
34
- // Monotonic in the dark theme: card (L 0.235) < secondary (0.285) <
35
- // popover (0.325) — the rungs a container climbs as it floats higher.
36
- "surface-container": "hsl(var(--card))",
37
- "surface-container-high": "hsl(var(--secondary))",
38
- "surface-container-highest": "hsl(var(--popover))"
27
+ // Do not compress Brand's MD3 ladder onto three shadcn surfaces.
28
+ "surface-container-lowest": "var(--md3-surface-container-lowest)",
29
+ "surface-container-low": "var(--md3-surface-container-low)",
30
+ "surface-container": "var(--md3-surface-container)",
31
+ "surface-container-high": "var(--md3-surface-container-high)",
32
+ "surface-container-highest": "var(--md3-surface-container-highest)"
39
33
  },
40
- // Elevation shadows — `shadow-raised` for the floating composer,
41
- // `shadow-overlay` for popovers/dialogs. Both re-theme through
42
- // tokens.css (dark doubles the alpha at the token).
43
- boxShadow: {
44
- raised: "var(--shadow-raised)",
45
- overlay: "var(--shadow-overlay)"
34
+ // A field's well and edge are separate Brand roles. Keep border-input
35
+ // on --input while bg-input paints the full-color recessed well.
36
+ backgroundColor: {
37
+ input: "color-mix(in oklch, var(--bg-input) calc(<alpha-value> * 100%), transparent)"
46
38
  },
47
- // Border tiers. `borderColor` is a separate scale from `colors`, so
48
- // pointing `border-border` at the soft tier here leaves `bg-border` /
49
- // `text-border` (and the `--border` triple itself) at full strength.
50
- //
51
- // This is the one place a single edit reaches every `border-border` in
52
- // the fleet — 151 in this package alone — which is the only reason the
53
- // tiers are worth having. Editing 151 call sites to say `border-soft`
54
- // would be the same change spelled 151 times, and the next component
55
- // written would still say `border-border`.
56
- //
57
- // `border-input` is untouched on purpose: a form field's edge is a
58
- // control affordance, not a divider.
59
- //
60
- // Opting out is one line in the consumer's own config
61
- // (`borderColor: { border: 'hsl(var(--border))' }`) or one line in its
62
- // CSS (`--border-soft: hsl(var(--border))`), and the second also restores
63
- // the pre-tier look for any consumer-owned `--color-border` mapping,
64
- // which a Tailwind v4 app defines in its own `@theme` and this preset
65
- // cannot reach.
39
+ // Approval cards use a light tint; their label needs Brand's stronger
40
+ // warning ink. The solid warning chip keeps its own foreground pairing.
41
+ textColor: {
42
+ warning: {
43
+ DEFAULT: "hsl(var(--warning-strong))",
44
+ foreground: "hsl(var(--warning-foreground))",
45
+ strong: "hsl(var(--warning-strong))"
46
+ }
47
+ },
48
+ boxShadow: { raised: "var(--shadow-raised)", overlay: "var(--shadow-overlay)" },
66
49
  borderColor: {
67
50
  border: tier("--border-soft"),
68
51
  "card-edge": tier("--card-edge"),
69
52
  strong: "hsl(var(--border))"
70
53
  },
71
- // Semantic radius. Deliberately NOT a remap of Tailwind's `rounded-md` /
72
- // `rounded-lg`: those names collide with the token ladder's names at
73
- // DIFFERENT values (`--radius-md` is 8px, `rounded-md` is 6px), so
74
- // remapping would silently resize 302 existing `rounded-*` usages across
75
- // four products. New names, opt-in, no resize.
76
- borderRadius: {
77
- control: "var(--radius-sm)",
78
- card: "var(--radius-lg)",
79
- surface: "var(--radius-2xl)"
80
- },
81
- // Motion. Additive names alongside Tailwind's numeric durations and
82
- // in/out/in-out curves, so `duration-fast` and `ease-entrance` compile
83
- // without displacing `duration-150` or `ease-out`.
54
+ borderRadius: { control: "var(--radius-sm)", card: "var(--radius-lg)", surface: "var(--radius-2xl)" },
84
55
  transitionDuration: {
85
56
  instant: "var(--duration-instant)",
86
57
  fast: "var(--duration-fast)",
@@ -92,20 +63,9 @@ var agentAppPreset = {
92
63
  entrance: "var(--ease-entrance)",
93
64
  exit: "var(--ease-exit)"
94
65
  },
95
- // Radix-collapsible row reveals, used by @tangle-network/ui's RunRowShell
96
- // (the shared run-row grammar this package composes). Named exactly as the
97
- // shell references them (`animate-slideDown`/`animate-slideUp`); height
98
- // animates against Radix's measured --radix-collapsible-content-height,
99
- // not a max-height guess.
100
66
  keyframes: {
101
- slideDown: {
102
- from: { height: "0" },
103
- to: { height: "var(--radix-collapsible-content-height)" }
104
- },
105
- slideUp: {
106
- from: { height: "var(--radix-collapsible-content-height)" },
107
- to: { height: "0" }
108
- }
67
+ slideDown: { from: { height: "0" }, to: { height: "var(--radix-collapsible-content-height)" } },
68
+ slideUp: { from: { height: "var(--radix-collapsible-content-height)" }, to: { height: "0" } }
109
69
  },
110
70
  animation: {
111
71
  slideDown: "slideDown var(--duration-base) var(--ease-entrance)",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind preset mapping the shadcn semantic color names used by web-react\n * (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in\n * tokens.css — so a consuming app themes every agent-app surface from one source.\n *\n * // tailwind.config.{js,ts}\n * import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'\n * export default { presets: [agentAppPreset], content: [...] }\n *\n * Pair with `import '@tangle-network/agent-app/styles'` for the variable values.\n * design-canvas/sequences need no preset — they consume vars via arbitrary\n * values (bg-[var(--bg-input)]), which Tailwind supports without color config.\n *\n * Beyond colour this preset also maps the border TIERS, the semantic radius\n * steps, the motion scale, and the elevation shadows. See docs/design-tokens.md.\n */\n\nconst withForeground = (name: string) => ({\n DEFAULT: `hsl(var(--${name}))`,\n foreground: `hsl(var(--${name}-foreground))`,\n})\n\n/**\n * A border tier as a Tailwind colour that still honours the `/40` opacity\n * modifier.\n *\n * The tier tokens are `color-mix()` results, not channel triples, and Tailwind\n * cannot inject an alpha into a value it cannot parse — pointing `border-border`\n * straight at `var(--border-soft)` makes Tailwind DROP `border-border/50`\n * entirely rather than emit it without the modifier, which is silent: the\n * element falls back to `currentColor` and nothing errors. This package has 18\n * such usages. Wrapping the token in a `color-mix` that consumes\n * `<alpha-value>` keeps the token as the source AND composes with the modifier:\n * bare → 100% of the tier, `/50` → half of it.\n */\nconst tier = (token: string) => `color-mix(in oklch, var(${token}) calc(<alpha-value> * 100%), transparent)`\n\n/** Define a preset configuration for dark mode and extended theme colors with foreground variants */\nconst agentAppPreset = {\n darkMode: ['class', '[data-theme=\"dark\"]'] as [string, string],\n theme: {\n extend: {\n colors: {\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n success: withForeground('success'),\n // `strong` sits alongside DEFAULT/foreground rather than replacing\n // either: `--warning` is the dot/border/tint hue, `--warning-foreground`\n // is what goes on a SOLID gold chip, and `text-warning-strong` is the\n // only one of the three that stays legible as text on a warning TINT in\n // both themes.\n warning: { ...withForeground('warning'), strong: 'hsl(var(--warning-strong))' },\n card: withForeground('card'),\n popover: withForeground('popover'),\n primary: withForeground('primary'),\n secondary: withForeground('secondary'),\n muted: withForeground('muted'),\n accent: withForeground('accent'),\n destructive: withForeground('destructive'),\n // MD3 surface ladder — wires sandbox-ui's `bg-surface-container*`\n // utilities (used by AgentComposer + its pickers) onto the shadcn\n // elevation triples, so those components render on-palette here.\n // Monotonic in the dark theme: card (L 0.235) < secondary (0.285) <\n // popover (0.325) — the rungs a container climbs as it floats higher.\n 'surface-container': 'hsl(var(--card))',\n 'surface-container-high': 'hsl(var(--secondary))',\n 'surface-container-highest': 'hsl(var(--popover))',\n },\n // Elevation shadows — `shadow-raised` for the floating composer,\n // `shadow-overlay` for popovers/dialogs. Both re-theme through\n // tokens.css (dark doubles the alpha at the token).\n boxShadow: {\n raised: 'var(--shadow-raised)',\n overlay: 'var(--shadow-overlay)',\n },\n // Border tiers. `borderColor` is a separate scale from `colors`, so\n // pointing `border-border` at the soft tier here leaves `bg-border` /\n // `text-border` (and the `--border` triple itself) at full strength.\n //\n // This is the one place a single edit reaches every `border-border` in\n // the fleet — 151 in this package alone — which is the only reason the\n // tiers are worth having. Editing 151 call sites to say `border-soft`\n // would be the same change spelled 151 times, and the next component\n // written would still say `border-border`.\n //\n // `border-input` is untouched on purpose: a form field's edge is a\n // control affordance, not a divider.\n //\n // Opting out is one line in the consumer's own config\n // (`borderColor: { border: 'hsl(var(--border))' }`) or one line in its\n // CSS (`--border-soft: hsl(var(--border))`), and the second also restores\n // the pre-tier look for any consumer-owned `--color-border` mapping,\n // which a Tailwind v4 app defines in its own `@theme` and this preset\n // cannot reach.\n borderColor: {\n border: tier('--border-soft'),\n 'card-edge': tier('--card-edge'),\n strong: 'hsl(var(--border))',\n },\n // Semantic radius. Deliberately NOT a remap of Tailwind's `rounded-md` /\n // `rounded-lg`: those names collide with the token ladder's names at\n // DIFFERENT values (`--radius-md` is 8px, `rounded-md` is 6px), so\n // remapping would silently resize 302 existing `rounded-*` usages across\n // four products. New names, opt-in, no resize.\n borderRadius: {\n control: 'var(--radius-sm)',\n card: 'var(--radius-lg)',\n surface: 'var(--radius-2xl)',\n },\n // Motion. Additive names alongside Tailwind's numeric durations and\n // in/out/in-out curves, so `duration-fast` and `ease-entrance` compile\n // without displacing `duration-150` or `ease-out`.\n transitionDuration: {\n instant: 'var(--duration-instant)',\n fast: 'var(--duration-fast)',\n base: 'var(--duration-base)',\n slow: 'var(--duration-slow)',\n },\n transitionTimingFunction: {\n standard: 'var(--ease-standard)',\n entrance: 'var(--ease-entrance)',\n exit: 'var(--ease-exit)',\n },\n // Radix-collapsible row reveals, used by @tangle-network/ui's RunRowShell\n // (the shared run-row grammar this package composes). Named exactly as the\n // shell references them (`animate-slideDown`/`animate-slideUp`); height\n // animates against Radix's measured --radix-collapsible-content-height,\n // not a max-height guess.\n keyframes: {\n slideDown: {\n from: { height: '0' },\n to: { height: 'var(--radix-collapsible-content-height)' },\n },\n slideUp: {\n from: { height: 'var(--radix-collapsible-content-height)' },\n to: { height: '0' },\n },\n },\n animation: {\n slideDown: 'slideDown var(--duration-base) var(--ease-entrance)',\n slideUp: 'slideUp var(--duration-fast) var(--ease-exit)',\n },\n },\n },\n}\n\nexport default agentAppPreset\n"],"mappings":";AAiBA,IAAM,iBAAiB,CAAC,UAAkB;AAAA,EACxC,SAAS,aAAa,IAAI;AAAA,EAC1B,YAAY,aAAa,IAAI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AAA,MACR;AAAA,MACA,0BAA0B;AAAA,QACxB,UAAU;AAAA,QACV,UAAU;AAAA,QACV,MAAM;AAAA,MACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA,WAAW;AAAA,QACT,WAAW;AAAA,UACT,MAAM,EAAE,QAAQ,IAAI;AAAA,UACpB,IAAI,EAAE,QAAQ,0CAA0C;AAAA,QAC1D;AAAA,QACA,SAAS;AAAA,UACP,MAAM,EAAE,QAAQ,0CAA0C;AAAA,UAC1D,IAAI,EAAE,QAAQ,IAAI;AAAA,QACpB;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,0BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../src/theme/tailwind-preset.ts"],"sourcesContent":["/** Agent App's compatibility names over Brand's current tokens. Pair with ./styles. */\nconst withForeground = (name: string) => ({\n DEFAULT: `hsl(var(--${name}))`,\n foreground: `hsl(var(--${name}-foreground))`,\n})\n// Full-color tiers need an explicit alpha placeholder for Tailwind v3 /50 users.\nconst tier = (token: string) => `color-mix(in oklch, var(${token}) calc(<alpha-value> * 100%), transparent)`\n\nconst agentAppPreset = {\n darkMode: ['class', '[data-theme=\"dark\"]'] as [string, string],\n theme: {\n extend: {\n colors: {\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n 'input-fill': 'var(--bg-input)',\n ring: 'hsl(var(--ring))',\n success: withForeground('success'),\n warning: { ...withForeground('warning'), strong: 'hsl(var(--warning-strong))' },\n card: withForeground('card'),\n popover: withForeground('popover'),\n primary: withForeground('primary'),\n secondary: withForeground('secondary'),\n muted: withForeground('muted'),\n accent: withForeground('accent'),\n destructive: withForeground('destructive'),\n // Do not compress Brand's MD3 ladder onto three shadcn surfaces.\n 'surface-container-lowest': 'var(--md3-surface-container-lowest)',\n 'surface-container-low': 'var(--md3-surface-container-low)',\n 'surface-container': 'var(--md3-surface-container)',\n 'surface-container-high': 'var(--md3-surface-container-high)',\n 'surface-container-highest': 'var(--md3-surface-container-highest)',\n },\n // A field's well and edge are separate Brand roles. Keep border-input\n // on --input while bg-input paints the full-color recessed well.\n backgroundColor: {\n input: 'color-mix(in oklch, var(--bg-input) calc(<alpha-value> * 100%), transparent)',\n },\n // Approval cards use a light tint; their label needs Brand's stronger\n // warning ink. The solid warning chip keeps its own foreground pairing.\n textColor: {\n warning: {\n DEFAULT: 'hsl(var(--warning-strong))',\n foreground: 'hsl(var(--warning-foreground))',\n strong: 'hsl(var(--warning-strong))',\n },\n },\n boxShadow: { raised: 'var(--shadow-raised)', overlay: 'var(--shadow-overlay)' },\n borderColor: {\n border: tier('--border-soft'),\n 'card-edge': tier('--card-edge'),\n strong: 'hsl(var(--border))',\n },\n borderRadius: { control: 'var(--radius-sm)', card: 'var(--radius-lg)', surface: 'var(--radius-2xl)' },\n transitionDuration: {\n instant: 'var(--duration-instant)', fast: 'var(--duration-fast)',\n base: 'var(--duration-base)', slow: 'var(--duration-slow)',\n },\n transitionTimingFunction: {\n standard: 'var(--ease-standard)', entrance: 'var(--ease-entrance)', exit: 'var(--ease-exit)',\n },\n keyframes: {\n slideDown: { from: { height: '0' }, to: { height: 'var(--radix-collapsible-content-height)' } },\n slideUp: { from: { height: 'var(--radix-collapsible-content-height)' }, to: { height: '0' } },\n },\n animation: {\n slideDown: 'slideDown var(--duration-base) var(--ease-entrance)',\n slideUp: 'slideUp var(--duration-fast) var(--ease-exit)',\n },\n },\n },\n}\nexport default agentAppPreset\n"],"mappings":";AACA,IAAM,iBAAiB,CAAC,UAAkB;AAAA,EACxC,SAAS,aAAa,IAAI;AAAA,EAC1B,YAAY,aAAa,IAAI;AAC/B;AAEA,IAAM,OAAO,CAAC,UAAkB,2BAA2B,KAAK;AAEhE,IAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC,SAAS,qBAAqB;AAAA,EACzC,OAAO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,EAAE,QAAQ,IAAI,GAAG,IAAI,EAAE,QAAQ,0CAA0C,EAAE;AAAA,QAC9F,SAAS,EAAE,MAAM,EAAE,QAAQ,0CAA0C,GAAG,IAAI,EAAE,QAAQ,IAAI,EAAE;AAAA,MAC9F;AAAA,MACA,WAAW;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;AACA,IAAO,0BAAQ;","names":[]}
@@ -1,17 +1,3 @@
1
- /**
2
- * Typed mirror of tokens.css for runtime/JS theming. The canonical source is
3
- * tokens.css (`import '@tangle-network/agent-app/styles'`); this module is for
4
- * apps that compute theme variables in JS, or read color values where CSS
5
- * custom properties cannot reach — notably Konva canvas render code, which
6
- * paints to a bitmap and cannot resolve `var(--…)`.
7
- *
8
- * Values are shadcn-style HSL channel triples ("H S% L%"); wrap with `color()`.
9
- *
10
- * The neutral triples are the RESOLVED form of tokens.css's `--neutral-*` ramp
11
- * (that file states them as `var(--neutral-NN-hsl)`; JS has no cascade to
12
- * resolve through, so they are inlined here). `tests/theme/tokens-contract.test.ts`
13
- * resolves the CSS one level and fails if this mirror has drifted.
14
- */
15
1
  export interface AgentAppTheme {
16
2
  background: string;
17
3
  foreground: string;
@@ -31,6 +17,8 @@ export interface AgentAppTheme {
31
17
  destructiveForeground: string;
32
18
  border: string;
33
19
  input: string;
20
+ /** Full field fill, distinct from the input border. Optional for existing custom themes. */
21
+ inputFill?: string;
34
22
  ring: string;
35
23
  success: string;
36
24
  successForeground: string;
@@ -89,7 +77,7 @@ export interface CanvasRenderPalette {
89
77
  }
90
78
  /** Define a light color theme with specific background, foreground, and accent color values */
91
79
  export declare const lightTheme: AgentAppTheme;
92
- /** Define a dark color scheme for the Agent app interface with specific background and foreground hues */
80
+ /** Canonical Brand dark values projected for legacy JS and bitmap callers. */
93
81
  export declare const darkTheme: AgentAppTheme;
94
82
  /**
95
83
  * Wrap a channel triple in `hsl()`; pass through values already in a color form.