@nimblebrain/synapse 0.14.0 → 0.15.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.
@@ -11,7 +11,7 @@ interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">
11
11
  }
12
12
  declare function Avatar({ name, src, size, style, ...rest }: AvatarProps): react_jsx_runtime.JSX.Element;
13
13
 
14
- type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger" | "processing" | "warm";
14
+ type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger" | "processing";
15
15
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
16
16
  tone?: BadgeTone;
17
17
  children?: ReactNode;
@@ -325,10 +325,13 @@ declare function Divider({ orientation, style, ...rest }: DividerProps): react_j
325
325
  * with no React re-render: the host swaps the `:root` vars and every `var()`
326
326
  * re-resolves.
327
327
  *
328
- * The fallbacks are deliberately **neutral** (system fonts, neutral grays, a
329
- * generic blue) — NOT NimbleBrain brand. Brand arrives by injection when the
330
- * app runs inside the NimbleBrain host; standalone/static renders get a sane
328
+ * The fallbacks are deliberately **unbranded** — system fonts, neutral grays, a
329
+ * generic blue, and generic semantic hues for the status channels. NOT
330
+ * NimbleBrain brand. Brand arrives by injection when the app runs inside the
331
+ * NimbleBrain host; standalone/static renders get a sane
331
332
  * unbranded default. This keeps the library host-agnostic.
333
+ * `__tests__/ui/tokens.test.ts` holds the line: every hex in these fallbacks
334
+ * must be in the sanctioned set, same as `theme-defaults.ts`.
332
335
  *
333
336
  * Components import the static `tokens` object and style with CSS `var()`, so
334
337
  * theming (incl. light/dark) resolves in CSS with no re-render.
@@ -350,14 +353,12 @@ declare const tokens: {
350
353
  readonly danger: "var(--nb-color-danger, #dc2626)";
351
354
  readonly success: "var(--nb-color-success, #059669)";
352
355
  readonly warning: "var(--nb-color-warning, #f59e0b)";
353
- readonly warm: "var(--nb-color-warm, #d4620a)";
354
- readonly warmLight: "var(--nb-color-warm-light, #fef5ee)";
355
356
  readonly processing: "var(--nb-color-processing, #7c3aed)";
356
357
  readonly processingLight: "var(--nb-color-processing-light, #f3eeff)";
357
358
  readonly infoLight: "var(--nb-color-info-light, #eef4ff)";
358
359
  readonly fontSans: "var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)";
359
360
  readonly fontMono: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace)";
360
- readonly fontHeading: "var(--nb-font-heading, Georgia, 'Times New Roman', serif)";
361
+ readonly fontHeading: "var(--nb-font-heading, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)";
361
362
  readonly weightNormal: "var(--font-weight-normal, 400)";
362
363
  readonly weightMedium: "var(--font-weight-medium, 500)";
363
364
  readonly weightSemibold: "var(--font-weight-semibold, 600)";
@@ -11,7 +11,7 @@ interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">
11
11
  }
12
12
  declare function Avatar({ name, src, size, style, ...rest }: AvatarProps): react_jsx_runtime.JSX.Element;
13
13
 
14
- type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger" | "processing" | "warm";
14
+ type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger" | "processing";
15
15
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
16
16
  tone?: BadgeTone;
17
17
  children?: ReactNode;
@@ -325,10 +325,13 @@ declare function Divider({ orientation, style, ...rest }: DividerProps): react_j
325
325
  * with no React re-render: the host swaps the `:root` vars and every `var()`
326
326
  * re-resolves.
327
327
  *
328
- * The fallbacks are deliberately **neutral** (system fonts, neutral grays, a
329
- * generic blue) — NOT NimbleBrain brand. Brand arrives by injection when the
330
- * app runs inside the NimbleBrain host; standalone/static renders get a sane
328
+ * The fallbacks are deliberately **unbranded** — system fonts, neutral grays, a
329
+ * generic blue, and generic semantic hues for the status channels. NOT
330
+ * NimbleBrain brand. Brand arrives by injection when the app runs inside the
331
+ * NimbleBrain host; standalone/static renders get a sane
331
332
  * unbranded default. This keeps the library host-agnostic.
333
+ * `__tests__/ui/tokens.test.ts` holds the line: every hex in these fallbacks
334
+ * must be in the sanctioned set, same as `theme-defaults.ts`.
332
335
  *
333
336
  * Components import the static `tokens` object and style with CSS `var()`, so
334
337
  * theming (incl. light/dark) resolves in CSS with no re-render.
@@ -350,14 +353,12 @@ declare const tokens: {
350
353
  readonly danger: "var(--nb-color-danger, #dc2626)";
351
354
  readonly success: "var(--nb-color-success, #059669)";
352
355
  readonly warning: "var(--nb-color-warning, #f59e0b)";
353
- readonly warm: "var(--nb-color-warm, #d4620a)";
354
- readonly warmLight: "var(--nb-color-warm-light, #fef5ee)";
355
356
  readonly processing: "var(--nb-color-processing, #7c3aed)";
356
357
  readonly processingLight: "var(--nb-color-processing-light, #f3eeff)";
357
358
  readonly infoLight: "var(--nb-color-info-light, #eef4ff)";
358
359
  readonly fontSans: "var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)";
359
360
  readonly fontMono: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace)";
360
- readonly fontHeading: "var(--nb-font-heading, Georgia, 'Times New Roman', serif)";
361
+ readonly fontHeading: "var(--nb-font-heading, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)";
361
362
  readonly weightNormal: "var(--font-weight-normal, 400)";
362
363
  readonly weightMedium: "var(--font-weight-medium, 500)";
363
364
  readonly weightSemibold: "var(--font-weight-semibold, 600)";
package/dist/ui/index.js CHANGED
@@ -22,15 +22,13 @@ var tokens = {
22
22
  danger: "var(--nb-color-danger, #dc2626)",
23
23
  success: "var(--nb-color-success, #059669)",
24
24
  warning: "var(--nb-color-warning, #f59e0b)",
25
- warm: "var(--nb-color-warm, #d4620a)",
26
- warmLight: "var(--nb-color-warm-light, #fef5ee)",
27
25
  processing: "var(--nb-color-processing, #7c3aed)",
28
26
  processingLight: "var(--nb-color-processing-light, #f3eeff)",
29
27
  infoLight: "var(--nb-color-info-light, #eef4ff)",
30
28
  // ── Typography ──
31
29
  fontSans: "var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)",
32
30
  fontMono: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",
33
- fontHeading: "var(--nb-font-heading, Georgia, 'Times New Roman', serif)",
31
+ fontHeading: "var(--nb-font-heading, system-ui, -apple-system, BlinkMacSystemFont, sans-serif)",
34
32
  weightNormal: "var(--font-weight-normal, 400)",
35
33
  weightMedium: "var(--font-weight-medium, 500)",
36
34
  weightSemibold: "var(--font-weight-semibold, 600)",
@@ -133,8 +131,7 @@ var TONE = {
133
131
  success: { bg: `color-mix(in oklab, ${tokens.success} 14%, transparent)`, fg: tokens.success },
134
132
  warning: { bg: `color-mix(in oklab, ${tokens.warning} 14%, transparent)`, fg: tokens.warning },
135
133
  danger: { bg: `color-mix(in oklab, ${tokens.danger} 14%, transparent)`, fg: tokens.danger },
136
- processing: { bg: tokens.processingLight, fg: tokens.processing },
137
- warm: { bg: tokens.warmLight, fg: tokens.warm }
134
+ processing: { bg: tokens.processingLight, fg: tokens.processing }
138
135
  };
139
136
  function Badge({ tone = "neutral", style, children, ...rest }) {
140
137
  const { bg, fg } = TONE[tone];