@astra-spec/ui 0.0.4 → 0.0.5

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 (89) hide show
  1. package/TOKENS.md +14 -8
  2. package/dist/blocks/findings-list.d.ts.map +1 -1
  3. package/dist/blocks/findings-list.js +2 -1
  4. package/dist/blocks/findings-list.js.map +1 -1
  5. package/dist/blocks/section.d.ts.map +1 -1
  6. package/dist/blocks/section.js +3 -2
  7. package/dist/blocks/section.js.map +1 -1
  8. package/dist/components/insight-trigger.d.ts.map +1 -1
  9. package/dist/components/insight-trigger.js +3 -2
  10. package/dist/components/insight-trigger.js.map +1 -1
  11. package/dist/components/paper-detail.d.ts.map +1 -1
  12. package/dist/components/paper-detail.js +2 -2
  13. package/dist/components/paper-detail.js.map +1 -1
  14. package/dist/components/record-preview.d.ts.map +1 -1
  15. package/dist/components/record-preview.js +8 -7
  16. package/dist/components/record-preview.js.map +1 -1
  17. package/dist/model/kind.d.ts +1 -1
  18. package/dist/model/kind.d.ts.map +1 -1
  19. package/dist/model/kind.js +3 -3
  20. package/dist/model/kind.js.map +1 -1
  21. package/dist/primitives/index.d.ts +4 -0
  22. package/dist/primitives/index.d.ts.map +1 -1
  23. package/dist/primitives/index.js +2 -0
  24. package/dist/primitives/index.js.map +1 -1
  25. package/dist/primitives/inline-reference.d.ts +9 -0
  26. package/dist/primitives/inline-reference.d.ts.map +1 -0
  27. package/dist/primitives/inline-reference.js +14 -0
  28. package/dist/primitives/inline-reference.js.map +1 -0
  29. package/dist/primitives/kind-glyph.d.ts +8 -0
  30. package/dist/primitives/kind-glyph.d.ts.map +1 -0
  31. package/dist/primitives/kind-glyph.js +9 -0
  32. package/dist/primitives/kind-glyph.js.map +1 -0
  33. package/dist/primitives/preview-popover.d.ts +1 -1
  34. package/dist/primitives/preview-popover.d.ts.map +1 -1
  35. package/dist/primitives/record-list.d.ts.map +1 -1
  36. package/dist/primitives/record-list.js +3 -2
  37. package/dist/primitives/record-list.js.map +1 -1
  38. package/dist/primitives/relation-list.d.ts.map +1 -1
  39. package/dist/primitives/relation-list.js +3 -2
  40. package/dist/primitives/relation-list.js.map +1 -1
  41. package/isolate.css +7 -0
  42. package/package.json +5 -3
  43. package/primitives.css +2 -0
  44. package/src/blocks/findings-list.tsx +2 -1
  45. package/src/blocks/section.tsx +3 -2
  46. package/src/components/insight-trigger.tsx +3 -2
  47. package/src/components/paper-detail.tsx +2 -2
  48. package/src/components/record-preview.tsx +8 -14
  49. package/src/model/kind.ts +3 -3
  50. package/src/primitives/index.ts +4 -0
  51. package/src/primitives/inline-reference.tsx +25 -0
  52. package/src/primitives/kind-glyph.tsx +24 -0
  53. package/src/primitives/preview-popover.tsx +1 -1
  54. package/src/primitives/record-list.tsx +3 -4
  55. package/src/primitives/relation-list.tsx +4 -7
  56. package/styles/blocks/analysis-tree.css +4 -4
  57. package/styles/blocks/decisions-list.css +6 -6
  58. package/styles/blocks/outputs-list.css +34 -34
  59. package/styles/blocks/papers-list.css +12 -12
  60. package/styles/blocks/records.css +13 -13
  61. package/styles/components/artifact-preview.css +15 -15
  62. package/styles/components/decision-detail.css +23 -23
  63. package/styles/components/evidence.css +2 -7
  64. package/styles/components/finding-detail.css +11 -11
  65. package/styles/components/input-detail.css +7 -7
  66. package/styles/components/insight-detail.css +17 -17
  67. package/styles/components/insight-list.css +6 -6
  68. package/styles/components/insight-trigger.css +5 -5
  69. package/styles/components/output-detail.css +51 -51
  70. package/styles/components/paper-detail.css +22 -22
  71. package/styles/components/paper-doi.css +2 -2
  72. package/styles/components/paper-pdf-viewer.css +6 -6
  73. package/styles/components/record-preview.css +444 -268
  74. package/styles/primitives/badge.css +1 -1
  75. package/styles/primitives/button.css +25 -25
  76. package/styles/primitives/count-heading.css +3 -3
  77. package/styles/primitives/detail-layout.css +20 -20
  78. package/styles/primitives/dialog.css +77 -77
  79. package/styles/primitives/empty-state.css +1 -1
  80. package/styles/primitives/inline-reference.css +37 -0
  81. package/styles/primitives/kind-glyph.css +31 -0
  82. package/styles/primitives/kind.css +6 -0
  83. package/styles/primitives/preview-popover.css +6 -11
  84. package/styles/primitives/prose.css +1 -1
  85. package/styles/primitives/record-list.css +32 -48
  86. package/styles/primitives/relation-list.css +14 -36
  87. package/styles/primitives/surface-header.css +15 -11
  88. package/styles/tokens.css +19 -9
  89. package/styles/views/inventory.css +25 -27
@@ -1 +1 @@
1
- {"version":3,"file":"preview-popover.d.ts","sourceRoot":"","sources":["../../src/primitives/preview-popover.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpD,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxD,CAAC,SAAS,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5E,yBAAyB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1D;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpE,+EAA+E;IAC/E,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,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AAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC;AAED,4DAA4D;AAC5D,eAAO,MAAM,cAAc,iHAgBzB,CAAC;AAEH,eAAO,MAAM,UAAU,uIAItB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { KindGlyph } from './kind-glyph.js';
2
3
  import { forwardRef } from 'react';
3
4
  import { cn } from '../lib/cn.js';
4
- import { surfaceGlyph } from '../model/kind.js';
5
+ import {} from '../model/kind.js';
5
6
  /** A column-aligned list of clickable record rows. */
6
7
  export const RecordList = forwardRef(function RecordList({ label, columns, columnTemplate, rows, className, style, ...props }, ref) {
7
8
  const gridStyle = { ...style, '--astra-record-columns': columnTemplate };
@@ -9,7 +10,7 @@ export const RecordList = forwardRef(function RecordList({ label, columns, colum
9
10
  });
10
11
  /** Glyph, title, and optional subtitle for a record row. */
11
12
  export const RecordIdentity = forwardRef(function RecordIdentity({ kind, title, subtitle, className, ...props }, ref) {
12
- return (_jsxs("span", { "data-slot": "record-identity", ...props, ref: ref, className: cn('astra-record-list__name', className), children: [_jsx("span", { className: "astra-record-list__glyph", "data-kind": kind, "aria-hidden": "true", children: surfaceGlyph(kind) }), _jsxs("span", { children: [_jsx("strong", { children: title }), subtitle != null ? _jsx("small", { children: subtitle }) : null] })] }));
13
+ return (_jsxs("span", { "data-slot": "record-identity", ...props, ref: ref, className: cn('astra-record-list__name', className), children: [_jsx(KindGlyph, { className: "astra-record-list__glyph", kind: kind }), _jsxs("span", { children: [_jsx("strong", { children: title }), subtitle != null ? _jsx("small", { children: subtitle }) : null] })] }));
13
14
  });
14
15
  export const EmptyState = forwardRef(function EmptyState({ className, ...props }, ref) {
15
16
  return _jsx("p", { "data-slot": "empty-state", ...props, ref: ref, className: cn('astra-empty-state', className) });
@@ -1 +1 @@
1
- {"version":3,"file":"record-list.js","sourceRoot":"","sources":["../../src/primitives/record-list.tsx"],"names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,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACrC;AAiBD,iGAAiG;AACjG,eAAO,MAAM,YAAY,2GAkDvB,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { KindGlyph } from './kind-glyph.js';
2
3
  import { forwardRef } from 'react';
3
4
  import { cn } from '../lib/cn.js';
4
5
  import { CountHeading } from './detail-layout.js';
5
- import { surfaceGlyph } from '../model/kind.js';
6
+ import {} from '../model/kind.js';
6
7
  function RelationItemContent({ item }) {
7
- return (_jsxs(_Fragment, { children: [_jsx("span", { className: "astra-relation-item__glyph", ...(item.kind ? {} : { 'data-empty': '' }), "aria-hidden": "true", children: item.kind ? surfaceGlyph(item.kind) : '' }), _jsxs("span", { className: "astra-relation-item__copy", children: [_jsx("span", { className: "astra-relation-item__label", children: item.label }), item.identifier != null ? _jsx("code", { children: item.identifier }) : null] }), item.detail != null ? _jsx("small", { children: item.detail }) : null] }));
8
+ return (_jsxs(_Fragment, { children: [_jsx("span", { className: "astra-relation-item__glyph", "data-empty": !item.kind ? '' : undefined, "aria-hidden": "true", children: item.kind ? _jsx(KindGlyph, { kind: item.kind }) : null }), _jsxs("span", { className: "astra-relation-item__copy", children: [_jsx("span", { className: "astra-relation-item__label", children: item.label }), item.identifier != null ? _jsx("code", { children: item.identifier }) : null] }), item.detail != null ? _jsx("small", { children: item.detail }) : null] }));
8
9
  }
9
10
  /** A titled, counted list of related records; items with `onOpen` become navigation triggers. */
10
11
  export const RelationList = forwardRef(function RelationList({ title, items, empty, headerAction, description, className, ...props }, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"relation-list.js","sourceRoot":"","sources":["../../src/primitives/relation-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;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C,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,GAAI,EAClD,YAAY,IACT,CACP,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,GAAI,CACpD,EACA,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAC,kCAAkC,YAAE,WAAW,GAAK,CAClE,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,uBACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,0BAEa,IAAI,CAAC,IAAI,KAChB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,SAAS,EAAE,IAAI,CAAC,SAAS,YAExB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CACb,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,8BAA8B,gBAC5B,IAAI,CAAC,eAAe,EAChC,OAAO,EAAE,IAAI,CAAC,MAAM,aAEpB,KAAC,mBAAmB,IAAC,IAAI,EAAE,IAAI,GAAI,EACnC,8BAAkB,MAAM,uBAAS,IAC1B,CACV,CAAC,CAAC,CAAC,CACF,KAAC,mBAAmB,IAAC,IAAI,EAAE,IAAI,GAAI,CACpC,IAjBI,IAAI,CAAC,GAAG,CAkBV,CACN,CAAC,GACC,CACN,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,sBAAI,KAAK,GAAK,CAAC,CAAC,CAAC,IAAI,IACjC,CACX,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/isolate.css ADDED
@@ -0,0 +1,7 @@
1
+ /* Opt in on each owned UI root and portal with `astra-isolate`.
2
+ * Restore shared layers where an embedding application styles native elements.
3
+ * Host chrome should use its own layer; inline styles and user-important rules remain effective.
4
+ */
5
+ .astra-ui.astra-isolate :is(a, button, input, select, textarea, code, kbd, pre, samp, tt, p, li, blockquote, h1, h2, h3, h4, h5, h6) {
6
+ all: revert-layer;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astra-spec/ui",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "React components for rendering resolved ASTRA analyses",
5
5
  "license": "BSD-3-Clause",
6
6
  "homepage": "https://github.com/LightconeResearch/astra-ui#readme",
@@ -91,7 +91,8 @@
91
91
  "./components.css": "./components.css",
92
92
  "./primitives.css": "./primitives.css",
93
93
  "./styles/*": "./styles/*",
94
- "./package.json": "./package.json"
94
+ "./package.json": "./package.json",
95
+ "./isolate.css": "./isolate.css"
95
96
  },
96
97
  "files": [
97
98
  "dist",
@@ -104,7 +105,8 @@
104
105
  "primitives.css",
105
106
  "README.md",
106
107
  "TOKENS.md",
107
- "LICENSE"
108
+ "LICENSE",
109
+ "isolate.css"
108
110
  ],
109
111
  "scripts": {
110
112
  "clean": "node --input-type=module -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\" && tsc -b tsconfig.json --clean",
package/primitives.css CHANGED
@@ -14,3 +14,5 @@
14
14
  @import "./styles/primitives/record-list.css";
15
15
  @import "./styles/primitives/empty-state.css";
16
16
  @import "./styles/primitives/prose.css";
17
+ @import "./styles/primitives/kind-glyph.css";
18
+ @import "./styles/primitives/inline-reference.css";
@@ -1,3 +1,4 @@
1
+ import { KindGlyph } from '../primitives/kind-glyph.js';
1
2
  import type { ResolvedAnalysisNode, ResolvedInsight } from '@astra-spec/sdk';
2
3
  import { forwardRef, type HTMLAttributes } from 'react';
3
4
  import { recordTitle } from '../model/records.js';
@@ -44,7 +45,7 @@ export const FindingsList = forwardRef<HTMLDivElement, FindingsListProps>(functi
44
45
  onOpen: () => { onOpenRecord(record, analysis); },
45
46
  cells: [
46
47
  <span className="astra-record-list__name" data-variant="claim">
47
- <span className="astra-record-list__glyph" aria-hidden="true">●</span>
48
+ <KindGlyph className="astra-record-list__glyph" kind="finding" />
48
49
  <span>
49
50
  {record.label ? <small>{record.label}</small> : null}
50
51
  <strong>{record.claim}</strong>
@@ -1,6 +1,7 @@
1
+ import { KindGlyph } from '../primitives/kind-glyph.js';
1
2
  import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';
2
3
  import { cn } from '../lib/cn.js';
3
- import { surfaceGlyph, type InventorySectionId, type SurfaceKind } from '../model/kind.js';
4
+ import { type InventorySectionId, type SurfaceKind } from '../model/kind.js';
4
5
  import { useLabels } from '../lib/labels.js';
5
6
 
6
7
  export interface InventorySectionProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
@@ -79,7 +80,7 @@ export const InventoryOutline = forwardRef<HTMLElement, InventoryOutlineProps>(f
79
80
  {entries.map((entry) => (
80
81
  <a key={entry.id} href={`#${entry.id}`}>
81
82
  <span className="astra-inventory-outline__glyph" {...(entry.kind ? { 'data-kind': entry.kind } : {})} aria-hidden="true">
82
- {entry.kind ? surfaceGlyph(entry.kind) : null}
83
+ {entry.kind ? <KindGlyph kind={entry.kind} /> : null}
83
84
  </span>
84
85
  <span>{entry.label}</span>
85
86
  {entry.count !== undefined ? <span>{entry.count}</span> : null}
@@ -1,3 +1,4 @@
1
+ import { KindGlyph } from '../primitives/kind-glyph.js';
1
2
  import type { ResolvedInsight } from '@astra-spec/sdk';
2
3
  import {
3
4
  forwardRef,
@@ -20,7 +21,7 @@ export interface InsightEvidenceTitleProps {
20
21
  export function InsightEvidenceTitle({ name, tag }: InsightEvidenceTitleProps) {
21
22
  return (
22
23
  <span className="astra-evidence__title">
23
- <span className="astra-evidence__glyph--insight" aria-hidden="true">◈</span>
24
+ <KindGlyph className="astra-evidence__glyph--insight" kind="prior_insight" />
24
25
  <span className="astra-evidence__name">{name}</span>
25
26
  {tag ? <span className="astra-evidence__tag">{tag}</span> : null}
26
27
  </span>
@@ -78,7 +79,7 @@ export const InsightTrigger = forwardRef<HTMLElement, InsightTriggerProps>(funct
78
79
  onClick={open}
79
80
  onKeyDown={keyOpen}
80
81
  >
81
- <span className="astra-evidence__glyph--insight" aria-hidden="true">◈</span>
82
+ <KindGlyph className="astra-evidence__glyph--insight" kind="prior_insight" />
82
83
  <div className="astra-insight-trigger__claim">
83
84
  <Prose text={insight.claim} field="claim" renderText={renderText} />
84
85
  </div>
@@ -1,3 +1,4 @@
1
+ import { KindGlyph } from '../primitives/kind-glyph.js';
1
2
  import type { ResolvedDecision, ResolvedEvidence, ResolvedInsight } from '@astra-spec/sdk';
2
3
  import { forwardRef, useCallback, useMemo, useRef, useState, type HTMLAttributes } from 'react';
3
4
  import { doiHref } from '../model/doi.js';
@@ -8,7 +9,6 @@ import { cn } from '../lib/cn.js';
8
9
  import { useLabels } from '../lib/labels.js';
9
10
  import { CountHeading } from '../primitives/detail-layout.js';
10
11
  import { DetailDialog, DialogAction, type DetailDialogProps } from '../primitives/dialog.js';
11
- import { surfaceGlyph } from '../model/kind.js';
12
12
  import type { TextRenderer } from '../lib/prose.js';
13
13
  import { InsightTrigger } from './insight-trigger.js';
14
14
  import { PaperPdfViewer, type PdfPassage } from './paper-pdf-viewer.js';
@@ -138,7 +138,7 @@ export const PaperDetail = forwardRef<HTMLDivElement, PaperDetailProps>(function
138
138
  setDecisionFilter(active ? undefined : decision.canonicalPath);
139
139
  }}
140
140
  >
141
- <span aria-hidden="true">{surfaceGlyph('decision')}</span>
141
+ <KindGlyph kind="decision" />
142
142
  <span>{recordTitle(decision)}</span>
143
143
  </button>
144
144
  );
@@ -1,3 +1,4 @@
1
+ import { KindGlyph } from '../primitives/kind-glyph.js';
1
2
  import type {
2
3
  AnalysisIndex,
3
4
  ResolvedAnalysisDocument,
@@ -22,7 +23,7 @@ import { analysisTitle, recordTitle } from '../model/records.js';
22
23
  import { decisionInsights } from '../model/relations.js';
23
24
  import { Prose } from '../primitives/prose.js';
24
25
  import type { TextRenderer } from '../lib/prose.js';
25
- import { surfaceGlyph, type SurfaceKind } from '../model/kind.js';
26
+ import { type SurfaceKind } from '../model/kind.js';
26
27
  import { SurfaceHeader } from '../primitives/surface-header.js';
27
28
  import type { ArtifactRenderer } from './artifact-preview.js';
28
29
  import { primaryLiteratureEvidence } from '../model/papers.js';
@@ -115,7 +116,7 @@ function relationTitle(record: ResolvedRecord): string {
115
116
  function KindEyebrow({ kind, label }: { kind: SurfaceKind; label: ReactNode }) {
116
117
  return (
117
118
  <span className="astra-record-preview__kind">
118
- <span aria-hidden="true">{surfaceGlyph(kind)}</span>
119
+ <KindGlyph kind={kind} />
119
120
  {label}
120
121
  </span>
121
122
  );
@@ -126,7 +127,7 @@ function PreviewHeader({
126
127
  kindLabel,
127
128
  title,
128
129
  }: {
129
- kind: SurfaceKind;
130
+ kind?: SurfaceKind | undefined;
130
131
  kindLabel: ReactNode;
131
132
  title?: ReactNode | undefined;
132
133
  }) {
@@ -135,7 +136,7 @@ function PreviewHeader({
135
136
  density="compact"
136
137
  kind={kind}
137
138
  titleAs="h3"
138
- eyebrow={<KindEyebrow kind={kind} label={kindLabel} />}
139
+ eyebrow={kind ? <KindEyebrow kind={kind} label={kindLabel} /> : kindLabel}
139
140
  title={title}
140
141
  className="astra-record-preview__header"
141
142
  />
@@ -184,9 +185,7 @@ function RelatedRecord({
184
185
  const label = relationTitle(record);
185
186
  const copy = (
186
187
  <>
187
- <span className="astra-record-preview__relation-glyph" aria-hidden="true">
188
- {surfaceGlyph(record.kind)}
189
- </span>
188
+ <KindGlyph className="astra-record-preview__relation-glyph" kind={record.kind} />
190
189
  <span className="astra-record-preview__relation-label">{label}</span>
191
190
  {detail != null ? (
192
191
  <small className="astra-record-preview__relation-detail">{detail}</small>
@@ -370,12 +369,7 @@ function FindingPreview({
370
369
  className="astra-record-preview__relation-trigger"
371
370
  data-kind="output"
372
371
  >
373
- <span
374
- className="astra-record-preview__relation-glyph"
375
- aria-hidden="true"
376
- >
377
- {surfaceGlyph('output')}
378
- </span>
372
+ <KindGlyph className="astra-record-preview__relation-glyph" kind="output" />
379
373
  <span className="astra-record-preview__relation-label">
380
374
  {evidence.artifact}
381
375
  </span>
@@ -653,7 +647,6 @@ function ValuePreview({
653
647
  return (
654
648
  <>
655
649
  <PreviewHeader
656
- kind={record.kind}
657
650
  kindLabel={kindLabel}
658
651
  title={
659
652
  <span className="astra-record-preview__value">
@@ -735,6 +728,7 @@ export const RecordPreview = forwardRef<HTMLElement, RecordPreviewProps>(
735
728
  <article
736
729
  data-slot="record-preview"
737
730
  data-entry-kind={entry.kind}
731
+ data-value-product={entry.kind === 'value' && entry.product ? '' : undefined}
738
732
  data-kind={previewKind(entry)}
739
733
  {...props}
740
734
  ref={ref}
package/src/model/kind.ts CHANGED
@@ -5,15 +5,15 @@ export type SurfaceKind = ResolvedRecord['kind'] | 'analysis' | 'paper';
5
5
 
6
6
  const SURFACE_GLYPHS: Record<SurfaceKind, string> = {
7
7
  analysis: '◐',
8
- input: '↳',
8
+ input: '▤',
9
9
  decision: '◇',
10
10
  output: '◆',
11
11
  finding: '●',
12
12
  prior_insight: '◈',
13
- paper: '▧',
13
+ paper: '📄',
14
14
  };
15
15
 
16
- /** The glyph that identifies a kind in lists, relations, and headers. */
16
+ /** Plain-text kind mark. Use KindGlyph for consistent, themed UI rendering. */
17
17
  export function surfaceGlyph(kind: SurfaceKind): string {
18
18
  return SURFACE_GLYPHS[kind];
19
19
  }
@@ -46,3 +46,7 @@ export { CountHeading, DetailLayout, DetailMain, DetailRail, DetailSection } fro
46
46
  export type { CountHeadingProps, DetailLayoutMode, DetailLayoutProps, DetailRailProps, DetailSectionProps } from './detail-layout.js';
47
47
  export { Prose } from './prose.js';
48
48
  export type { ProseProps } from './prose.js';
49
+ export { KindGlyph } from './kind-glyph.js';
50
+ export type { KindGlyphProps } from './kind-glyph.js';
51
+ export { InlineReference } from './inline-reference.js';
52
+ export type { InlineReferenceProps } from './inline-reference.js';
@@ -0,0 +1,25 @@
1
+ import { Children, cloneElement, forwardRef, type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
2
+ import type { SurfaceKind } from '../model/kind.js';
3
+ import { cn } from '../lib/cn.js';
4
+ import { Slot } from './slot.js';
5
+ import { KindGlyph } from './kind-glyph.js';
6
+
7
+ export interface InlineReferenceProps extends HTMLAttributes<HTMLSpanElement> {
8
+ kind?: SurfaceKind | 'value' | 'option' | undefined;
9
+ asChild?: boolean | undefined;
10
+ }
11
+
12
+ /** Editorial inline token. Hosts own its text, navigation and preview interaction. */
13
+ export const InlineReference = forwardRef<HTMLSpanElement, InlineReferenceProps>(function InlineReference({
14
+ kind, asChild = false, className, children, ...props
15
+ }, ref) {
16
+ const Component = asChild ? Slot : 'span';
17
+ const glyph = kind && kind !== 'value' ? <KindGlyph kind={kind === 'option' ? 'decision' : kind} /> : null;
18
+ const child = asChild ? Children.only(children) as ReactElement<{ children?: ReactNode }> : undefined;
19
+ const content = child ? cloneElement(child, {}, glyph, child.props.children) : <>{glyph}{children}</>;
20
+ return (
21
+ <Component data-slot="inline-reference" {...props} ref={ref} className={cn('astra-ui astra-inline-reference', className)} data-kind={kind}>
22
+ {content}
23
+ </Component>
24
+ );
25
+ });
@@ -0,0 +1,24 @@
1
+ import { forwardRef, type HTMLAttributes } from 'react';
2
+ import { surfaceGlyph, type SurfaceKind } from '../model/kind.js';
3
+ import { cn } from '../lib/cn.js';
4
+
5
+ export interface KindGlyphProps extends HTMLAttributes<HTMLSpanElement> {
6
+ kind: SurfaceKind;
7
+ }
8
+
9
+ /** Decorative kind mark. Its kind selects both symbol and colour; typography is shared across surfaces. */
10
+ export const KindGlyph = forwardRef<HTMLSpanElement, KindGlyphProps>(function KindGlyph({
11
+ kind, className, ...props
12
+ }, ref) {
13
+ return (
14
+ <span data-slot="kind-glyph" {...props} ref={ref} className={cn('astra-kind-glyph', className)} data-kind={kind} aria-hidden="true">
15
+ {kind === 'paper' ? (
16
+ <svg viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor"
17
+ strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false">
18
+ <path d="M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8l-5-5Z" />
19
+ <path d="M14 3v5h5M8 12h8M8 16h6" />
20
+ </svg>
21
+ ) : surfaceGlyph(kind)}
22
+ </span>
23
+ );
24
+ });
@@ -57,7 +57,7 @@ export interface PreviewPopoverProps
57
57
  children: ReactNode;
58
58
  /** Accessible name for the non-modal preview dialog. */
59
59
  label: string;
60
- kind?: SurfaceKind | undefined;
60
+ kind?: SurfaceKind | 'value' | undefined;
61
61
  disabled?: boolean | undefined;
62
62
  open?: boolean | undefined;
63
63
  defaultOpen?: boolean | undefined;
@@ -1,6 +1,7 @@
1
+ import { KindGlyph } from './kind-glyph.js';
1
2
  import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
2
3
  import { cn } from '../lib/cn.js';
3
- import { surfaceGlyph, type SurfaceKind } from '../model/kind.js';
4
+ import { type SurfaceKind } from '../model/kind.js';
4
5
 
5
6
  export interface RecordListColumn {
6
7
  label?: string | undefined;
@@ -85,9 +86,7 @@ export const RecordIdentity = forwardRef<HTMLSpanElement, RecordIdentityProps>(f
85
86
  }, ref) {
86
87
  return (
87
88
  <span data-slot="record-identity" {...props} ref={ref} className={cn('astra-record-list__name', className)}>
88
- <span className="astra-record-list__glyph" data-kind={kind} aria-hidden="true">
89
- {surfaceGlyph(kind)}
90
- </span>
89
+ <KindGlyph className="astra-record-list__glyph" kind={kind} />
91
90
  <span>
92
91
  <strong>{title}</strong>
93
92
  {subtitle != null ? <small>{subtitle}</small> : null}
@@ -1,7 +1,8 @@
1
+ import { KindGlyph } from './kind-glyph.js';
1
2
  import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';
2
3
  import { cn } from '../lib/cn.js';
3
4
  import { CountHeading } from './detail-layout.js';
4
- import { surfaceGlyph, type SurfaceKind } from '../model/kind.js';
5
+ import { type SurfaceKind } from '../model/kind.js';
5
6
 
6
7
  export interface RelationItem {
7
8
  key: string;
@@ -25,12 +26,8 @@ export interface RelationListProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
25
26
  function RelationItemContent({ item }: { item: RelationItem }) {
26
27
  return (
27
28
  <>
28
- <span
29
- className="astra-relation-item__glyph"
30
- {...(item.kind ? {} : { 'data-empty': '' })}
31
- aria-hidden="true"
32
- >
33
- {item.kind ? surfaceGlyph(item.kind) : ''}
29
+ <span className="astra-relation-item__glyph" data-empty={!item.kind ? '' : undefined} aria-hidden="true">
30
+ {item.kind ? <KindGlyph kind={item.kind} /> : null}
34
31
  </span>
35
32
  <span className="astra-relation-item__copy">
36
33
  <span className="astra-relation-item__label">{item.label}</span>
@@ -7,7 +7,7 @@
7
7
  }
8
8
 
9
9
  :where(.astra-ui) .astra-analysis-tree h2 {
10
- margin: 0 0 0.5rem;
10
+ margin: 0 0 8px;
11
11
  color: var(--astra-color-text-subtle);
12
12
  font-size: var(--astra-font-size-2xs);
13
13
  font-weight: 700;
@@ -25,13 +25,13 @@
25
25
  display: flex;
26
26
  width: 100%;
27
27
  align-items: center;
28
- gap: 0.5rem;
28
+ gap: 8px;
29
29
  cursor: pointer;
30
30
  border: 0;
31
- border-radius: 0.25rem;
31
+ border-radius: 4px;
32
32
  background: transparent;
33
33
  color: var(--astra-color-text-muted);
34
- padding: 0.375rem 0.5rem;
34
+ padding: 6px 8px;
35
35
  font: inherit;
36
36
  font-size: var(--astra-font-size-sm);
37
37
  line-height: 1.3;
@@ -19,7 +19,7 @@
19
19
 
20
20
  /* The filter stacks on the width of its records block (the query container
21
21
  declared in records.css); :where() keeps the specificity unchanged. */
22
- @container (max-width: 38rem) {
22
+ @container (max-width: 608px) {
23
23
  :where(.astra-ui) :where(.astra-inventory-records) .astra-inventory-filter {
24
24
  align-items: flex-start;
25
25
  flex-direction: column;
@@ -30,19 +30,19 @@
30
30
  display: flex;
31
31
  align-items: center;
32
32
  justify-content: space-between;
33
- gap: 1rem;
34
- margin: 0 0 0.625rem;
33
+ gap: 16px;
34
+ margin: 0 0 10px;
35
35
  }
36
36
 
37
37
  :where(.astra-ui) .astra-inventory-filter__chips {
38
38
  display: flex;
39
39
  flex-wrap: wrap;
40
- gap: 0.375rem;
40
+ gap: 6px;
41
41
  }
42
42
 
43
43
  :where(.astra-ui) .astra-inventory-filter__chips button {
44
44
  min-height: 0;
45
- padding: 0.25rem 0.625rem;
45
+ padding: 4px 10px;
46
46
  border: 1px solid var(--astra-color-border-strong);
47
47
  border-radius: 999px;
48
48
  background: transparent;
@@ -63,7 +63,7 @@
63
63
  font: 400 var(--astra-font-size-xs)/1.2 var(--astra-font-ui);
64
64
  }
65
65
 
66
- @container (max-width: 34rem) {
66
+ @container (max-width: 544px) {
67
67
  :where(.astra-ui) :where(.astra-inventory-records) .astra-inventory-filter {
68
68
  align-items: flex-start;
69
69
  flex-direction: column;