@arbidocs/blocks 0.4.127 → 0.4.128

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 (90) hide show
  1. package/dist/agents/index.cjs +303 -303
  2. package/dist/agents/index.js +11 -11
  3. package/dist/calls/index.cjs +1 -1
  4. package/dist/calls/index.js +1 -1
  5. package/dist/chat/index.cjs +152 -135
  6. package/dist/chat/index.d.ts +1 -0
  7. package/dist/chat/index.js +5 -4
  8. package/dist/chat/open-document.d.ts +66 -0
  9. package/dist/{chunk-DZI7WOUD.cjs → chunk-3BJLNKOB.cjs} +6 -2
  10. package/dist/chunk-3BJLNKOB.cjs.map +1 -0
  11. package/dist/{chunk-2PNNCEPH.js → chunk-54ANPPMV.js} +4 -4
  12. package/dist/{chunk-2PNNCEPH.js.map → chunk-54ANPPMV.js.map} +1 -1
  13. package/dist/{chunk-T6I6ZCBE.js → chunk-7BJRLP3U.js} +7 -4
  14. package/dist/chunk-7BJRLP3U.js.map +1 -0
  15. package/dist/{chunk-2DFDFOM7.js → chunk-7HAM7Y5U.js} +3 -3
  16. package/dist/{chunk-2DFDFOM7.js.map → chunk-7HAM7Y5U.js.map} +1 -1
  17. package/dist/{chunk-6Z72CXZR.js → chunk-CJBN5HIS.js} +6 -2
  18. package/dist/chunk-CJBN5HIS.js.map +1 -0
  19. package/dist/{chunk-PUCY3UXN.js → chunk-CXLVI3SB.js} +3 -3
  20. package/dist/{chunk-PUCY3UXN.js.map → chunk-CXLVI3SB.js.map} +1 -1
  21. package/dist/{chunk-KYDRUFWT.cjs → chunk-D4YR56FV.cjs} +5 -5
  22. package/dist/{chunk-KYDRUFWT.cjs.map → chunk-D4YR56FV.cjs.map} +1 -1
  23. package/dist/{chunk-ZLRQ5K77.cjs → chunk-FSBY2S4V.cjs} +8 -5
  24. package/dist/chunk-FSBY2S4V.cjs.map +1 -0
  25. package/dist/chunk-GYCQ3FNL.js +60 -0
  26. package/dist/chunk-GYCQ3FNL.js.map +1 -0
  27. package/dist/{chunk-6AALMYPS.cjs → chunk-HM23LXUP.cjs} +3 -3
  28. package/dist/{chunk-6AALMYPS.cjs.map → chunk-HM23LXUP.cjs.map} +1 -1
  29. package/dist/{chunk-T2CVFK2I.js → chunk-KLOSOT26.js} +11 -11
  30. package/dist/{chunk-T2CVFK2I.js.map → chunk-KLOSOT26.js.map} +1 -1
  31. package/dist/{chunk-SARREDFP.cjs → chunk-LC2KJSUS.cjs} +46 -46
  32. package/dist/{chunk-SARREDFP.cjs.map → chunk-LC2KJSUS.cjs.map} +1 -1
  33. package/dist/{chunk-XFKF3WRN.cjs → chunk-NZUQFF35.cjs} +5 -5
  34. package/dist/{chunk-XFKF3WRN.cjs.map → chunk-NZUQFF35.cjs.map} +1 -1
  35. package/dist/{chunk-5Y7JRY7Y.js → chunk-P5ST47VY.js} +3 -3
  36. package/dist/{chunk-5Y7JRY7Y.js.map → chunk-P5ST47VY.js.map} +1 -1
  37. package/dist/chunk-SWQX6CTT.cjs +65 -0
  38. package/dist/chunk-SWQX6CTT.cjs.map +1 -0
  39. package/dist/{chunk-ENDP7JER.js → chunk-VW2C2AZL.js} +3 -3
  40. package/dist/{chunk-ENDP7JER.js.map → chunk-VW2C2AZL.js.map} +1 -1
  41. package/dist/{chunk-MCPRNDOJ.cjs → chunk-W27VK32R.cjs} +79 -79
  42. package/dist/{chunk-MCPRNDOJ.cjs.map → chunk-W27VK32R.cjs.map} +1 -1
  43. package/dist/{chunk-PJJY6CYL.cjs → chunk-WV4IDVDQ.cjs} +11 -11
  44. package/dist/{chunk-PJJY6CYL.cjs.map → chunk-WV4IDVDQ.cjs.map} +1 -1
  45. package/dist/{chunk-UUXKB3WQ.js → chunk-ZCHSJUCI.js} +3 -3
  46. package/dist/{chunk-UUXKB3WQ.js.map → chunk-ZCHSJUCI.js.map} +1 -1
  47. package/dist/{chunk-NYHGG2IA.cjs → chunk-ZV3BKLFY.cjs} +3 -3
  48. package/dist/{chunk-NYHGG2IA.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
  49. package/dist/collaboration/index.cjs +9 -9
  50. package/dist/collaboration/index.js +1 -1
  51. package/dist/connect/docx.cjs +4 -3
  52. package/dist/connect/docx.cjs.map +1 -1
  53. package/dist/connect/docx.js +3 -2
  54. package/dist/connect/docx.js.map +1 -1
  55. package/dist/connect/index.cjs +53 -51
  56. package/dist/connect/index.cjs.map +1 -1
  57. package/dist/connect/index.js +19 -17
  58. package/dist/connect/index.js.map +1 -1
  59. package/dist/connection/mail/types.d.ts +2 -6
  60. package/dist/document-tools/index.cjs +1 -1
  61. package/dist/document-tools/index.js +1 -1
  62. package/dist/facts/index.cjs +1 -1
  63. package/dist/facts/index.js +1 -1
  64. package/dist/files/index.cjs +1 -1
  65. package/dist/files/index.js +1 -1
  66. package/dist/home/index.cjs +17 -17
  67. package/dist/home/index.js +3 -3
  68. package/dist/index.cjs +645 -628
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.js +21 -20
  71. package/dist/index.js.map +1 -1
  72. package/dist/settings/index.cjs +11 -11
  73. package/dist/settings/index.js +3 -3
  74. package/dist/shell/index.cjs +1 -1
  75. package/dist/shell/index.js +1 -1
  76. package/dist/site/index.cjs +5 -5
  77. package/dist/site/index.js +1 -1
  78. package/dist/studio/index.cjs +7 -6
  79. package/dist/studio/index.cjs.map +1 -1
  80. package/dist/studio/index.js +6 -5
  81. package/dist/studio/index.js.map +1 -1
  82. package/dist/workflow-canvas/index.cjs +62 -62
  83. package/dist/workflow-canvas/index.js +11 -11
  84. package/node_modules/@arbidocs/coedit/package.json +1 -1
  85. package/package.json +5 -5
  86. package/src/docx/README.md +7 -3
  87. package/dist/chunk-6Z72CXZR.js.map +0 -1
  88. package/dist/chunk-DZI7WOUD.cjs.map +0 -1
  89. package/dist/chunk-T6I6ZCBE.js.map +0 -1
  90. package/dist/chunk-ZLRQ5K77.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toolbar.tsx","../src/components/EntityIdentityBar.tsx","../src/components/EntityTooltip.tsx","../src/components/AskBar.tsx","../src/tags/TagDetail.tsx","../src/tags/TagsNav.tsx","../src/tags/glossary.ts"],"names":["jsxs","cn","jsx","Search","Input","useState","useEffect","Textarea","Pencil","useRef","Button","Sparkles","DEFAULT_TAG_TABLE_LABELS","DetailLoading","rowLinks","DetailBody","DetailSection","DetailFields","DetailField","TagTableCell","DetailLinkList","DetailLinkItem","FileText","DetailEmpty","Lightbulb","MessagesSquare","text","X","Plus","groupDefinitions","compareDefinitions","minuteUtc","page","paragraph","cell","documentXml","docxPackage","TABLE_DOCUMENT_STYLES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,OAAA,CAAQ;AAAA,EACtB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,iBAAA,GAAoB,cAAA;AAAA,EACpB,OAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAQG;AACD,EAAA,uBACEA,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAWC,KAAA;AAAA,QACT,oEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,aAAA,EAAa,MAAA;AAAA,MAEb,QAAA,EAAA;AAAA,wBAAAD,eAAA,CAAC,KAAA,EAAA,EAAI,WAAU,0CAAA,EACZ,QAAA,EAAA;AAAA,UAAA,QAAA,oBACCA,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0BAAA,EACb,QAAA,EAAA;AAAA,4BAAAE,cAAA,CAACC,kBAAA,EAAA,EAAO,WAAU,6FAAA,EAA8F,CAAA;AAAA,4BAChHD,cAAA;AAAA,cAACE,QAAA;AAAA,cAAA;AAAA,gBACC,KAAA,EAAO,MAAA;AAAA,gBACP,UAAU,CAAC,CAAA,KAAM,QAAA,CAAS,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,gBACxC,WAAA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AO,IAAA,EAAM,CAAC,CAAC,SAAS,MAAM,CAAA;AAAA,GAC/F;AACF;AAGO,SAAS,YAAA,CACd,SACA,OAAA,EACY;AACZ,EAAA,MAAM,EAAA,GAAK,IAAI,IAAA,CAAK,OAAA,CAAQ,MAAM,IAAA,CAAK,GAAA,EAAK,CAAA,CAAE,WAAA,EAAY;AAC1D,EAAA,OAAOG,6BAAA,CAAY;AAAA,IACjB,UAAU,mBAAA,CAAoB,OAAA,EAAS,EAAE,GAAG,OAAA,EAAS,IAAI,CAAA;AAAA,IACzD,MAAA,EAAQC,uCAAA;AAAA,IACR,OAAO,OAAA,CAAQ,KAAA;AAAA,IACf;AAAA,GACD,CAAA;AACH;AAGO,SAAS,gBAAA,CAAiB,OAAe,SAAA,EAAkC;AAChF,EAAA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,gBAAA,EAAkB,GAAG,EAAE,IAAA,EAAK,IAAK,UAAU,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AAClF","file":"index.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { Search } from 'lucide-react'\nimport { Input, cn } from '@arbidocs/react/ui'\n\n/** Search + filter bar used above every list view. */\nexport function Toolbar({\n search,\n onSearch,\n searchPlaceholder = 'Search…',\n filters,\n actions,\n className,\n testId,\n}: {\n search?: string\n onSearch?: (v: string) => void\n searchPlaceholder?: string\n filters?: ReactNode\n actions?: ReactNode\n className?: string\n testId?: string\n}) {\n return (\n <div\n className={cn(\n 'flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between',\n className\n )}\n data-testid={testId}\n >\n <div className=\"flex flex-1 flex-wrap items-center gap-2\">\n {onSearch && (\n <div className=\"relative w-full max-w-xs\">\n <Search className=\"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n value={search}\n onChange={(e) => onSearch(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"bg-card text-sm placeholder:text-muted-foreground focus-visible:border-ring/60 focus-visible:ring-2 focus-visible:ring-ring pl-8\"\n data-testid={testId ? `${testId}-search` : 'toolbar-search'}\n />\n </div>\n )}\n {filters}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { Pencil } from 'lucide-react'\nimport { Input, Textarea, cn } from '@arbidocs/react/ui'\n\n/** Longest a name may be. Exported so a form editing the same field agrees. */\nexport const IDENTITY_NAME_MAX_LENGTH = 50\n\n/** Shown once the remaining allowance gets this low, not for the whole time. */\nconst COUNTER_THRESHOLD = 10\n\nexport interface EntityIdentityField {\n /** Row caption. Rendered with a trailing colon. */\n label: string\n value: string\n /** Stands in for an empty value, in italics — never a blank row. */\n placeholder: string\n /** Commits the edit. Not called when the value is unchanged. */\n onSave: (next: string) => void\n /** A description needs line breaks; a name does not. */\n multiline?: boolean\n /** Caps the input and shows a counter as it fills. Names only, by default. */\n maxLength?: number\n /** Classes for the read-mode value, e.g. a larger weight for the name. */\n valueClassName?: string\n /**\n * Content pinned to the RIGHT END of this row — e.g. the owning project\n * beside a name, a member stack beside a status. Rows without one let their\n * value run the full width, which is what a description wants.\n */\n trailing?: ReactNode\n /**\n * Content rendered immediately BEFORE the value — the entity's own mark.\n * Sits outside the edit swap, so starting to edit the name doesn't make the\n * icon jump or disappear.\n */\n leading?: ReactNode\n /**\n * Drops the caption from view for this row, leaving the value flush left.\n * For a field whose value already says what it is — a workspace's name and\n * description read as exactly that — the caption is a word the eye has to\n * step over on the way in. The caption stays in the markup for screen\n * readers, which have no such visual cue to fall back on.\n */\n hideLabel?: boolean\n /** Row test id; the pencil and input derive `-edit` and `-input`. */\n testId?: string\n}\n\nexport interface EntityIdentityBarProps {\n /** The editable text fields, in order. Usually name then description. */\n fields: EntityIdentityField[]\n /**\n * Read-only rows shown after the editable ones — anything whose control the\n * consumer owns (a project picker, an owner avatar, a status). Rendered with\n * the same caption column so every row lines up.\n */\n extraRows?: { label: string; content: ReactNode; trailing?: ReactNode; testId?: string }[]\n /** Hides every pencil. A viewer without permission sees values, not controls. */\n canEdit?: boolean\n /** Trailing controls, pinned right — e.g. a member stack, a status. */\n actions?: ReactNode\n /**\n * Controls that act on the ENTITY rather than on any one field — typically an\n * overflow menu holding delete or leave. Sits under the field list, where a\n * destructive action is findable but not in the path of everyday reading.\n */\n footer?: ReactNode\n className?: string\n testId?: string\n}\n\n/**\n * The \"what am I looking at\" bar for an entity's own page.\n *\n * A caption column (`Name:`, `Description:`, `Project:`) and a value column. The\n * captions are the point: a bare bold string at the top of a page reads equally\n * as a workspace, a project, a case file or a folder, and people read it as\n * whichever they expected. Saying which field is which costs one column and\n * removes the ambiguity entirely.\n *\n * Editing happens in place. The pencil is always visible to someone who can use\n * it rather than revealed on hover — a control you have to go hunting for is one\n * most people never find, and hover doesn't exist on touch. Commit is on blur\n * and on Enter (single-line fields only, so a description can hold line\n * breaks); Escape abandons the edit.\n *\n * Deliberately NOT a form: no submit, no dirty state, no field-level errors.\n * When a consumer needs visibility toggles, destructive actions or validation\n * messages, those belong in its settings form — this bar is the identity of the\n * thing, shown where you are working on it.\n *\n * Styled with SEMANTIC tokens only, so every host gets it in its own colours.\n */\nexport function EntityIdentityBar({\n fields,\n extraRows = [],\n canEdit = false,\n actions,\n footer,\n className,\n testId,\n}: EntityIdentityBarProps) {\n return (\n <div\n className={cn('flex flex-wrap items-start justify-between gap-x-6 gap-y-3', className)}\n data-testid={testId}\n >\n <dl className=\"min-w-0 flex-1 space-y-1.5\">\n {fields.map((field) => (\n <IdentityFieldRow key={field.label} field={field} canEdit={canEdit} />\n ))}\n {extraRows.map((row) => (\n <div\n key={row.label}\n className=\"flex min-h-7 min-w-0 items-center gap-2\"\n data-testid={row.testId}\n >\n <dt className=\"w-24 shrink-0 text-sm font-medium text-muted-foreground\">\n {row.label}:\n </dt>\n <dd className=\"flex min-w-0 flex-1 items-center gap-2\">\n {row.content}\n {row.trailing ? (\n <div className=\"min-w-0 shrink-0 sm:ml-auto\">{row.trailing}</div>\n ) : null}\n </dd>\n </div>\n ))}\n {footer ? <div className=\"flex items-center pt-0.5\">{footer}</div> : null}\n </dl>\n {actions ? <div className=\"flex shrink-0 items-center gap-2\">{actions}</div> : null}\n </div>\n )\n}\n\nfunction IdentityFieldRow({ field, canEdit }: { field: EntityIdentityField; canEdit: boolean }) {\n const {\n label,\n value,\n placeholder,\n onSave,\n multiline = false,\n maxLength,\n valueClassName,\n leading,\n hideLabel,\n trailing,\n testId,\n } = field\n\n const [isEditing, setIsEditing] = useState(false)\n const [draft, setDraft] = useState(value)\n\n // Track the value while not editing, so an update from elsewhere (another\n // tab, a websocket) doesn't get overwritten by a stale draft on the next edit.\n useEffect(() => {\n if (!isEditing) setDraft(value)\n }, [value, isEditing])\n\n const commit = () => {\n setIsEditing(false)\n const next = draft.trim()\n if (next !== value) onSave(next)\n }\n\n const cancel = () => {\n setDraft(value)\n setIsEditing(false)\n }\n\n const charsLeft = maxLength === undefined ? null : maxLength - draft.length\n\n // Editing must not move anything. The input carries the read view's exact\n // typography and padding, drops the border and shadow entirely, and marks\n // focus with a contrasting FIELD instead — a box appearing around the text\n // (and the row growing to fit it) reads as the page jumping under the cursor.\n const fieldClass =\n 'h-auto rounded border-0 bg-muted px-1.5 py-0.5 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0'\n\n const shared = {\n autoFocus: true,\n value: draft,\n placeholder,\n maxLength,\n 'aria-label': label,\n 'data-testid': testId && `${testId}-input`,\n onBlur: commit,\n onChange: (e: { target: { value: string } }) => setDraft(e.target.value),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n cancel()\n } else if (e.key === 'Enter' && !multiline) {\n e.preventDefault()\n commit()\n }\n },\n }\n\n // Every row shares one minimum height: that of the small controls (h-7) a\n // row may carry at its trailing end. A row that is only text then sits in\n // the same rhythm as one holding a button, so the captions fall on an even\n // beat down the bar instead of bunching up wherever a row has no control.\n return (\n <div className={cn('flex min-h-7 min-w-0 gap-2', multiline ? 'items-start' : 'items-center')}>\n <dt\n className={cn(\n hideLabel\n ? 'sr-only'\n : cn('w-24 shrink-0 text-sm font-medium text-muted-foreground', multiline && 'pt-1')\n )}\n >\n {label}:\n </dt>\n {/* Wraps under sm: the trailing controls drop to their own line instead of overflowing. */}\n <dd className=\"flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1.5 sm:flex-nowrap\">\n {leading}\n {isEditing ? (\n <div className=\"relative min-w-0 flex-1 max-sm:basis-[calc(100%-2.5rem)]\">\n {multiline ? (\n <Textarea\n {...shared}\n rows={2}\n className={cn(fieldClass, 'min-h-0 resize-none leading-snug', valueClassName)}\n />\n ) : (\n <Input {...shared} className={cn(fieldClass, 'pr-20', valueClassName)} />\n )}\n {charsLeft !== null && charsLeft <= COUNTER_THRESHOLD && (\n <span\n className={cn(\n 'pointer-events-none absolute right-3 top-1/2 hidden -translate-y-1/2 text-sm lg:block',\n charsLeft < 0 ? 'text-destructive' : 'text-muted-foreground'\n )}\n data-testid={testId && `${testId}-counter`}\n >\n {charsLeft < 0 ? `${-charsLeft} over` : `${charsLeft} left`}\n </span>\n )}\n </div>\n ) : (\n // `identity-field` (not the generic `group`) scopes the pencil's hover\n // to THIS field only — an ancestor card also carries `group`, so a\n // `.group:hover` rule would reveal every field's pencil at once.\n <span className=\"identity-field flex min-w-0 flex-1 items-center gap-1.5 sm:flex-none\">\n {/* Same padding as the input above — the swap must not nudge the\n text sideways or change the row's height. */}\n <span className={cn('px-1.5 py-0.5', valueClassName)} data-testid={testId}>\n {value || <span className=\"italic text-muted-foreground\">{placeholder}</span>}\n </span>\n {canEdit && (\n <button\n type=\"button\"\n onClick={() => setIsEditing(true)}\n aria-label={`Edit ${label.toLowerCase()}`}\n title={`Edit ${label.toLowerCase()}`}\n // Quiet by default — the pencil only surfaces when the row is\n // hovered so it reads as clean text, and stays reachable by\n // keyboard (focus-visible).\n //\n // NB: use the ungated `[.identity-field:hover_&]` selector rather\n // than Tailwind's `group-hover:`. The latter compiles behind\n // `@media (hover: hover)`, so on a touchscreen (whose PRIMARY\n // pointer reports `hover: none`) the rule is disabled even when a\n // real mouse is firing hover events — the pencil then stays at\n // opacity-0 forever. The arbitrary selector has no media gate, so\n // it reveals on any genuine `:hover`.\n className=\"shrink-0 cursor-pointer rounded p-1 text-muted-foreground opacity-60 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground focus-visible:opacity-100 pointer-coarse:p-[15px] [.identity-field:hover_&]:opacity-100\"\n data-testid={testId && `${testId}-edit`}\n >\n <Pencil className=\"size-3.5\" />\n </button>\n )}\n </span>\n )}\n {trailing ? (\n <div className=\"min-w-0 shrink-0 max-sm:w-full sm:ml-auto\">{trailing}</div>\n ) : null}\n </dd>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\n/**\n * Parts for the hover card of an entity pill (workspace, user, tag, ...): a header, optional\n * stat rows, bordered sections and an action hint. The host fills them from its own data.\n */\n\nexport function EntityTooltip({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"entity-tooltip\" className={cn('flex flex-col gap-2', className)}>\n {children}\n </div>\n )\n}\n\nexport interface EntityTooltipHeaderProps {\n /** Icon / avatar before the title. */\n lead: ReactNode\n title: ReactNode\n subtitle?: ReactNode\n /** Right-hand badge. */\n trailing?: ReactNode\n /** Extra glyph after the title (e.g. an agent mark). */\n titleAccessory?: ReactNode\n}\n\nexport function EntityTooltipHeader({\n lead,\n title,\n subtitle,\n trailing,\n titleAccessory,\n}: EntityTooltipHeaderProps) {\n return (\n <div className=\"flex items-center gap-2\">\n {lead}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"flex items-center gap-1.5\">\n <span className=\"truncate text-sm font-medium\">{title}</span>\n {titleAccessory}\n </div>\n {subtitle && <span className=\"truncate text-xs text-muted-foreground\">{subtitle}</span>}\n </div>\n {trailing}\n </div>\n )\n}\n\nexport interface EntityTooltipStat {\n key: string\n icon: ReactNode\n label: ReactNode\n value: ReactNode\n}\n\n/** Label/value rows between two rules. */\nexport function EntityTooltipStats({ stats }: { stats: EntityTooltipStat[] }) {\n return (\n <div className=\"flex flex-col gap-1.5 border-y border-border py-2\">\n {stats.map((s) => (\n <div key={s.key} className=\"flex items-center justify-between text-sm\">\n <div className=\"flex items-center gap-2\">\n {s.icon}\n <span className=\"text-muted-foreground\">{s.label}</span>\n </div>\n <span className=\"font-medium\">{s.value}</span>\n </div>\n ))}\n </div>\n )\n}\n\n/** A secondary section under a rule, optionally headed by an icon + text. */\nexport function EntityTooltipSection({\n icon,\n heading,\n children,\n}: {\n icon?: ReactNode\n heading?: ReactNode\n children?: ReactNode\n}) {\n return (\n <div className=\"flex flex-col gap-1.5 border-t border-border pt-2\">\n {heading && (\n <div className=\"flex items-center gap-2 text-xs text-muted-foreground\">\n {icon}\n <span>{heading}</span>\n </div>\n )}\n {children}\n </div>\n )\n}\n\n/** Muted one-liner at the foot of the card, e.g. \"Click to send message\". */\nexport function EntityTooltipHint({\n icon,\n children,\n isRuled,\n}: {\n icon?: ReactNode\n children: ReactNode\n /** Draw the rule above (the hint closes a card that already has sections). */\n isRuled?: boolean\n}) {\n return (\n <div\n className={cn(\n 'flex items-center gap-1.5 text-xs text-muted-foreground',\n isRuled && 'border-t border-border pt-1'\n )}\n >\n {icon}\n <span>{children}</span>\n </div>\n )\n}\n","/**\n * A question box that IS the product's front door, not a link to one.\n *\n * One input, two destinations: Enter (or the arrow) ASKS — hands the trimmed\n * text to `onAsk`, the conversational answer — while the Search button beside\n * it hands the same text to `onSearch`, the retrieval experience. The split\n * matters because queries come in both registers (\"what does\n * this term mean\" vs \"find every mention of it\") and making them choose a\n * page before typing kills the impulse. Omit `onSearch` and the bar is a plain\n * ask composer.\n *\n * The consumer owns what asking and searching mean (start a chat, run smart\n * search, open a record). Suggestion chips prefill the input rather than\n * firing immediately: a suggestion is a starting point you edit, not a button\n * you regret.\n *\n * Styled with SEMANTIC tokens only (card, border, foreground, muted-foreground,\n * primary), so every host gets it in its own colours.\n */\n\nimport { useRef, useState, type KeyboardEventHandler, type ReactNode, type RefObject } from 'react'\nimport { Search, Sparkles } from 'lucide-react'\nimport { Button, cn } from '@arbidocs/react/ui'\n\nexport interface AskBarProps {\n /** Receives the trimmed question; the caller owns what asking means. */\n onAsk: (text: string) => void\n /** Second destination for the same text — retrieval. Omit to hide. */\n onSearch?: (text: string) => void\n /** Prefill-on-click starter questions, shown under the input. */\n suggestions?: string[]\n placeholder?: string\n askLabel?: string\n searchLabel?: string\n /** Controlled value. Omit for the bar to own its own text. */\n value?: string\n onValueChange?: (value: string) => void\n /** Raw keydown on the input — lets a consumer run an autocomplete\n * (arrow/Enter/Tab/Escape) before the form's own submit handling.\n * preventDefault() on Enter suppresses the submit. */\n onInputKeyDown?: KeyboardEventHandler<HTMLInputElement>\n /** Popover anchored to the pill (e.g. a slash-command menu). Rendered in a\n * relative wrapper around the form, so absolute children position against\n * the pill. */\n menu?: ReactNode\n /** External input ref, for consumers that refocus after menu selection. */\n inputRef?: RefObject<HTMLInputElement | null>\n className?: string\n /** Root test id; children derive `-input`, `-submit`, `-search`, `-suggestion`. */\n testId?: string\n}\n\nexport function AskBar({\n onAsk,\n onSearch,\n suggestions = [],\n placeholder = 'Ask anything…',\n askLabel = 'Ask',\n searchLabel = 'Search',\n value,\n onValueChange,\n onInputKeyDown,\n menu,\n inputRef: externalInputRef,\n className,\n testId = 'ask-bar',\n}: AskBarProps) {\n const [innerText, setInnerText] = useState('')\n const text = value !== undefined ? value : innerText\n const setText = (next: string) => {\n onValueChange?.(next)\n if (value === undefined) setInnerText(next)\n }\n const localInputRef = useRef<HTMLInputElement>(null)\n const inputRef = externalInputRef ?? localInputRef\n\n const submitTo = (handler: (text: string) => void) => {\n const question = text.trim()\n if (!question) return\n handler(question)\n setText('')\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)} data-testid={testId}>\n <div className=\"relative\">\n {menu}\n <form\n onSubmit={(e) => {\n e.preventDefault()\n submitTo(onAsk)\n }}\n // The AppHeader search pill's language exactly — rounded-md,\n // border-input, magnifier left, muted text — so the bar sits in a\n // topbar the way a ⌘K trigger does, not like a chat composer\n // dropped into a header.\n className=\"flex h-12 items-center gap-1.5 rounded-md border border-border/50 bg-background pl-3 pr-1.5 transition-colors focus-within:border-border\"\n >\n <Search className=\"pointer-events-none size-4 shrink-0 text-muted-foreground\" />\n <input\n ref={inputRef}\n type=\"text\"\n value={text}\n onChange={(e) => setText(e.target.value)}\n onKeyDown={onInputKeyDown}\n placeholder={placeholder}\n className=\"h-8 min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n data-testid={testId && `${testId}-input`}\n />\n {onSearch && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n disabled={!text.trim()}\n onClick={() => submitTo(onSearch)}\n className=\"h-8 shrink-0 px-2.5 text-xs font-medium text-muted-foreground hover:text-foreground\"\n data-testid={testId && `${testId}-search`}\n >\n {searchLabel}\n </Button>\n )}\n {/* The primary door wears the Ask AI anatomy: Sparkles + label. */}\n <Button\n type=\"submit\"\n size=\"sm\"\n disabled={!text.trim()}\n className=\"h-8 shrink-0 px-3 text-xs font-medium\"\n data-testid={testId && `${testId}-submit`}\n >\n <Sparkles className=\"size-3.5\" />\n {askLabel}\n </Button>\n </form>\n </div>\n {suggestions.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {suggestions.map((s) => (\n <button\n key={s}\n type=\"button\"\n onClick={() => {\n setText(s)\n inputRef.current?.focus()\n }}\n className=\"rounded-full border border-border/50 bg-card px-3 py-1 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground\"\n data-testid={testId && `${testId}-suggestion`}\n >\n {s}\n </button>\n ))}\n </div>\n )}\n </div>\n )\n}\n","/**\n * One tag in full: its values for its kind's fields (position, role, status, …) editable in place,\n * then everything across the workspace that carries it — the documents (with the value or note the\n * tag has on each, and how many passages back it), the facts and the threads. The data is the tag\n * read with its links (`TagTableRow`) and its kind's fields; every write goes back through the host.\n * Laid out with the shared detail parts (`DetailPanel`), as a database row is.\n */\n\nimport type { ReactNode } from 'react'\nimport { FileText, Lightbulb, MessagesSquare } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport {\n DetailBody,\n DetailEmpty,\n DetailField,\n DetailFields,\n DetailLinkItem,\n DetailLinkList,\n DetailLoading,\n DetailSection,\n} from '../components/DetailPanel'\nimport {\n DEFAULT_TAG_TABLE_LABELS,\n TagTableCell,\n type TagTableLabels,\n type TagTableProps,\n} from './TagTable'\nimport { rowLinks, type TagTableField, type TagTableRow } from './tagTableModel'\n\nexport interface TagDetailLabels {\n fields: string\n documents: string\n facts: string\n threads: string\n /** `{shown}` of `{count}` listed. */\n showing: string\n noDocuments: string\n noFacts: string\n /** An annotation with no value on a document. */\n noValue: string\n noThreads: string\n untitledThread: string\n /** When a thread was last active: `{date}`. */\n threadUpdated: string\n /** `{count}` passages cited. */\n passages: string\n passage: string\n loading: string\n}\n\nexport const DEFAULT_TAG_DETAIL_LABELS: TagDetailLabels = {\n fields: 'Fields',\n documents: 'Documents',\n facts: 'Facts',\n threads: 'Threads',\n showing: 'Showing {shown} of {count}',\n noDocuments: 'No document carries this tag yet.',\n noFacts: 'No fact carries this tag yet.',\n noValue: 'No note',\n noThreads: 'No thread carries this tag yet.',\n untitledThread: 'Untitled thread',\n threadUpdated: 'Updated {date}',\n passages: '{count} passages',\n passage: '1 passage',\n loading: 'Loading…',\n}\n\nexport interface TagDetailProps extends Pick<\n TagTableProps,\n | 'onChangeValue'\n | 'onOpenDocument'\n | 'onOpenFact'\n | 'onOpenThread'\n | 'people'\n | 'tags'\n | 'onOpenTag'\n> {\n /** The tag with its values and links (documents, facts, threads). */\n row: TagTableRow | undefined\n /** Its kind's fields in the workspace (none: no Fields section). */\n fields?: TagTableField[]\n /**\n * What the tag's note on a document is, e.g. \"Note\" for an annotation or \"Role\" for a person.\n * Given, each document row names it before the note.\n */\n noteLabel?: string\n /**\n * The note is the point of the row (an annotation's value): shown prominently, and a document\n * without one says so.\n */\n noteIsValue?: boolean\n /**\n * Render a document's cited passages in place of the plain \"N passages\" count (e.g. a popover\n * listing them); `label` is that count's text. Called only for a document with passages.\n */\n renderPassages?: (\n doc: { doc_ext_id: string; citations_count: number },\n label: string\n ) => ReactNode\n isLoading?: boolean\n labels?: Partial<TagDetailLabels>\n /** Labels of the field inputs (the empty choice). */\n fieldLabels?: Partial<TagTableLabels>\n className?: string\n testId?: string\n}\n\n/** A timestamp as a day in the viewer's locale (\"18 Oct 2026\"). */\nconst formatDay = (iso: string) => {\n const at = new Date(iso)\n return Number.isNaN(at.getTime())\n ? iso\n : at.toLocaleDateString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })\n}\n\nexport function TagDetail({\n row,\n fields = [],\n isLoading,\n people,\n tags,\n onOpenTag,\n onChangeValue,\n onOpenDocument,\n onOpenFact,\n onOpenThread,\n noteLabel,\n noteIsValue = false,\n renderPassages,\n labels,\n fieldLabels,\n className,\n testId = 'tag-detail',\n}: TagDetailProps) {\n const l = { ...DEFAULT_TAG_DETAIL_LABELS, ...labels }\n const cellLabels = { ...DEFAULT_TAG_TABLE_LABELS, ...fieldLabels }\n if (isLoading || !row) return <DetailLoading label={l.loading} />\n const links = rowLinks(row)\n const docs = links.docs ?? []\n const facts = links.facts ?? []\n const threads = links.threads ?? []\n const passages = (n: number) => (n === 1 ? l.passage : l.passages.replace('{count}', String(n)))\n\n return (\n <DetailBody className={className} testId={testId}>\n {fields.length > 0 && (\n <DetailSection title={l.fields} testId={`${testId}-fields`}>\n <DetailFields>\n {fields.map((field) => (\n <DetailField key={field.id} label={field.name}>\n <TagTableCell\n row={row}\n column={field}\n people={people}\n tags={tags}\n onOpenTag={onOpenTag}\n onChange={onChangeValue}\n l={cellLabels}\n testId={`${testId}-field-${field.id}`}\n />\n </DetailField>\n ))}\n </DetailFields>\n </DetailSection>\n )}\n\n <DetailSection\n title={l.documents}\n count={links.doc_count}\n shown={docs.length}\n showingLabel={l.showing}\n testId={`${testId}-documents`}\n >\n {docs.length ? (\n <DetailLinkList>\n {docs.map((d) => (\n <DetailLinkItem\n key={d.doc_ext_id}\n icon={<FileText className=\"size-4\" />}\n onClick={onOpenDocument ? () => onOpenDocument(d.doc_ext_id) : undefined}\n testId={`${testId}-doc-${d.doc_ext_id}`}\n trailing={\n d.citations_count > 0 &&\n !renderPassages && (\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {passages(d.citations_count)}\n </span>\n )\n }\n after={\n d.citations_count > 0 &&\n renderPassages && (\n <span className=\"shrink-0 px-3 py-2 text-xs\">\n {renderPassages(d, passages(d.citations_count))}\n </span>\n )\n }\n >\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium\">{d.file_name}</span>\n {(d.note || noteIsValue) && (\n <span\n className={cn(\n 'mt-0.5 flex min-w-0 items-baseline gap-2',\n noteIsValue ? 'text-base text-foreground' : 'text-muted-foreground'\n )}\n data-testid={`${testId}-doc-${d.doc_ext_id}-note`}\n >\n {noteLabel && (\n <span className=\"shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {noteLabel}\n </span>\n )}\n <span\n className={cn(\n 'line-clamp-3 min-w-0 whitespace-pre-line',\n noteIsValue && 'font-semibold',\n !d.note && 'font-normal italic text-muted-foreground'\n )}\n >\n {d.note || l.noValue}\n </span>\n </span>\n )}\n </span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noDocuments}</DetailEmpty>\n )}\n </DetailSection>\n\n <DetailSection\n title={l.facts}\n count={links.fact_count}\n shown={facts.length}\n showingLabel={l.showing}\n testId={`${testId}-facts`}\n >\n {facts.length ? (\n <DetailLinkList>\n {facts.map((f) => (\n <DetailLinkItem\n key={f.fact_ext_id}\n icon={<Lightbulb className=\"size-4\" />}\n onClick={onOpenFact ? () => onOpenFact(f.fact_ext_id) : undefined}\n testId={`${testId}-fact-${f.fact_ext_id}`}\n >\n <span className=\"line-clamp-3 min-w-0 flex-1\">{f.text}</span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noFacts}</DetailEmpty>\n )}\n </DetailSection>\n\n <DetailSection\n title={l.threads}\n count={links.thread_count}\n shown={threads.length}\n showingLabel={l.showing}\n testId={`${testId}-threads`}\n >\n {threads.length ? (\n <DetailLinkList>\n {threads.map((t) => (\n <DetailLinkItem\n key={t.conversation_ext_id}\n icon={<MessagesSquare className=\"size-4\" />}\n onClick={onOpenThread ? () => onOpenThread(t.conversation_ext_id) : undefined}\n testId={`${testId}-thread-${t.conversation_ext_id}`}\n trailing={\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {l.threadUpdated.replace('{date}', formatDay(t.updated_at))}\n </span>\n }\n >\n <span className=\"min-w-0 flex-1 truncate font-medium\">\n {t.title || l.untitledThread}\n </span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noThreads}</DetailEmpty>\n )}\n </DetailSection>\n </DetailBody>\n )\n}\n","/**\n * The side navigation of a Tags page: the workspace's tags grouped by kind (labels, annotations,\n * issues, people, organisations, searches), each group with its count, each tag with how much\n * carries it, and nested tags (sub-labels) under their parent. A group heading selects the whole\n * kind; a tag selects that tag. One box finds and adds: typing filters the list, and a name that is\n * not there yet is offered as a new tag (\"Create …\", or Enter). Data-free: the host passes the\n * groups and creates.\n */\n\nimport { useState, type ReactNode } from 'react'\nimport { Plus, Search, X } from 'lucide-react'\nimport { Input, cn } from '@arbidocs/react/ui'\n\nexport interface TagsNavItem {\n id: string\n name: string\n /** How many documents and facts carry it. */\n count?: number\n /** A swatch colour (any CSS colour). */\n color?: string\n /** Nested tags (e.g. sub-labels). */\n children?: TagsNavItem[]\n /** Other text the filter matches (e.g. the tag's field values). */\n keywords?: string\n}\n\nexport interface TagsNavGroup {\n id: string\n label: string\n icon?: ReactNode\n items: TagsNavItem[]\n}\n\n/** What is selected: a whole group, or one tag of it. */\nexport type TagsNavSelection = { groupId: string; itemId?: string }\n\nexport interface TagsNavLabels {\n filter: string\n clearFilter: string\n empty: string\n noMatch: string\n /** Offer to add the typed name: `{name}`. */\n create: string\n}\n\nexport const DEFAULT_TAGS_NAV_LABELS: TagsNavLabels = {\n filter: 'Find or add a tag…',\n clearFilter: 'Clear',\n empty: 'None yet',\n noMatch: 'No match',\n create: 'Create \"{name}\"',\n}\n\nexport interface TagsNavProps {\n groups: TagsNavGroup[]\n selected: TagsNavSelection | null\n onSelect: (selection: TagsNavSelection) => void\n /**\n * Add a tag by the name typed in the box when no tag has that name (any case). Absent: the box\n * only finds.\n */\n onCreate?: (name: string) => void | Promise<unknown>\n /**\n * The filter text, when the box lives elsewhere (e.g. the page header's filter): the list then\n * renders no box of its own and filters by this; `onFilterChange` hears a create clearing it.\n */\n filter?: string\n onFilterChange?: (text: string) => void\n /** Match items' `keywords` as well as their names. */\n matchKeywords?: boolean\n labels?: Partial<TagsNavLabels>\n className?: string\n testId?: string\n}\n\nconst total = (items: TagsNavItem[]): number =>\n items.reduce((n, item) => n + 1 + total(item.children ?? []), 0)\n\n/** The tag named `name` (any case) in these groups, with its group; nested ones included. */\nexport function findTagsNavItem(\n groups: TagsNavGroup[],\n name: string\n): { groupId: string; item: TagsNavItem } | undefined {\n const text = name.trim()\n if (!text) return undefined\n for (const g of groups) {\n const item = findByName(g.items, text)\n if (item) return { groupId: g.id, item }\n }\n return undefined\n}\n\n/** The item named `name` (any case), nested ones included. */\nfunction findByName(items: TagsNavItem[], name: string): TagsNavItem | undefined {\n const needle = name.toLowerCase()\n for (const item of items) {\n if (item.name.trim().toLowerCase() === needle) return item\n const nested = findByName(item.children ?? [], name)\n if (nested) return nested\n }\n return undefined\n}\n\n/** The items whose name (or keywords, or a nested item's) contains `text`, nesting kept. */\nfunction filterItems(items: TagsNavItem[], text: string, keywords = false): TagsNavItem[] {\n if (!text) return items\n const needle = text.toLowerCase()\n return items.flatMap((item) => {\n const children = filterItems(item.children ?? [], text, keywords)\n const hit =\n item.name.toLowerCase().includes(needle) ||\n (keywords && !!item.keywords?.toLowerCase().includes(needle))\n return hit || children.length ? [{ ...item, children }] : []\n })\n}\n\nexport function TagsNav({\n groups,\n selected,\n onSelect,\n onCreate,\n filter: controlledFilter,\n onFilterChange,\n matchKeywords = false,\n labels,\n className,\n testId = 'tags-nav',\n}: TagsNavProps) {\n const l = { ...DEFAULT_TAGS_NAV_LABELS, ...labels }\n const [ownFilter, setOwnFilter] = useState('')\n const hasOwnBox = controlledFilter === undefined\n const filter = hasOwnBox ? ownFilter : controlledFilter\n const setFilter = (text: string) => (hasOwnBox ? setOwnFilter(text) : onFilterChange?.(text))\n const [creating, setCreating] = useState(false)\n const text = filter.trim()\n const exact = findTagsNavItem(groups, text)\n const canCreate = !!onCreate && !!text && !exact\n const filterGroup = (items: TagsNavItem[]) => filterItems(items, text, matchKeywords)\n\n const create = async () => {\n if (!canCreate || creating) return\n setCreating(true)\n try {\n await onCreate?.(text)\n setFilter('')\n } finally {\n setCreating(false)\n }\n }\n\n const row = (groupId: string, item: TagsNavItem, depth: number): ReactNode => {\n const active = selected?.groupId === groupId && selected.itemId === item.id\n return (\n <li key={item.id}>\n <button\n type=\"button\"\n onClick={() => onSelect({ groupId, itemId: item.id })}\n aria-current={active ? 'true' : undefined}\n className={cn(\n 'flex w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left text-sm transition-colors hover:bg-muted pointer-coarse:min-h-11',\n active && 'bg-primary/10 font-medium text-primary hover:bg-primary/10'\n )}\n style={{ paddingLeft: 12 + depth * 16 }}\n data-testid={`${testId}-item-${item.id}`}\n >\n {item.color && (\n <span\n className=\"size-2 shrink-0 rounded-full\"\n style={{ backgroundColor: item.color }}\n aria-hidden\n />\n )}\n <span className=\"min-w-0 flex-1 truncate\" title={item.name}>\n {item.name}\n </span>\n {item.count !== undefined && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {item.count}\n </span>\n )}\n </button>\n {!!item.children?.length && (\n <ul>{item.children.map((child) => row(groupId, child, depth + 1))}</ul>\n )}\n </li>\n )\n }\n\n return (\n <nav className={cn('flex flex-col gap-3', className)} data-testid={testId}>\n {hasOwnBox && (\n <div className=\"relative\">\n <Search className=\"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n value={filter}\n onChange={(e) => setFilter(e.target.value)}\n onKeyDown={(e) => {\n if (e.key !== 'Enter') return\n e.preventDefault()\n if (canCreate) void create()\n else if (exact?.item) onSelect({ groupId: exact.groupId, itemId: exact.item.id })\n }}\n placeholder={l.filter}\n aria-label={l.filter}\n className=\"h-8 pl-8 pr-8 text-sm\"\n data-testid={`${testId}-filter`}\n />\n {filter && (\n <button\n type=\"button\"\n onClick={() => setFilter('')}\n aria-label={l.clearFilter}\n className=\"absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground\"\n >\n <X className=\"size-3.5\" />\n </button>\n )}\n </div>\n )}\n {canCreate && (\n <button\n type=\"button\"\n onClick={() => void create()}\n disabled={creating}\n className=\"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm text-primary transition-colors hover:bg-muted disabled:opacity-60 pointer-coarse:min-h-11\"\n data-testid={`${testId}-create`}\n >\n <Plus className=\"size-4 shrink-0\" />\n <span className=\"min-w-0 flex-1 truncate\">{l.create.replace('{name}', text)}</span>\n </button>\n )}\n {groups.map((group) => {\n const items = filterGroup(group.items)\n if (text && !items.length) return null\n const active = selected?.groupId === group.id && !selected.itemId\n return (\n <section key={group.id} data-testid={`${testId}-group-${group.id}`}>\n <button\n type=\"button\"\n onClick={() => onSelect({ groupId: group.id })}\n aria-current={active ? 'true' : undefined}\n className={cn(\n 'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:bg-muted hover:text-foreground pointer-coarse:min-h-11',\n active && 'bg-primary/10 text-primary hover:bg-primary/10 hover:text-primary'\n )}\n data-testid={`${testId}-group-${group.id}-heading`}\n >\n {group.icon && <span className=\"shrink-0 [&_svg]:size-4\">{group.icon}</span>}\n <span className=\"flex-1\">{group.label}</span>\n <span className=\"tabular-nums\" data-testid={`${testId}-group-${group.id}-count`}>\n {total(group.items)}\n </span>\n </button>\n {items.length ? (\n <ul className=\"mt-0.5\">{items.map((item) => row(group.id, item, 0))}</ul>\n ) : (\n <p className=\"px-3 py-1 text-xs text-muted-foreground\">{l.empty}</p>\n )}\n </section>\n )\n })}\n {text && !canCreate && groups.every((g) => !filterGroup(g.items).length) && (\n <p className=\"px-2 text-sm text-muted-foreground\">{l.noMatch}</p>\n )}\n </nav>\n )\n}\n","/**\n * The glossary: every definition fact (optionally one agreement's), alphabetical by term, as a\n * three-column table — Term, Definition, Source — printed as a Word document or as Markdown with\n * the same WordprocessingML the tag tables export with (`ooxml.ts`).\n */\n\nimport {\n cell,\n docxPackage,\n documentXml,\n minuteUtc,\n page,\n paragraph,\n TABLE_DOCUMENT_STYLES,\n} from './ooxml'\nimport { compareDefinitions, groupDefinitions, type DefinitionSource } from './definitions'\n\n/** One glossary row. */\nexport interface GlossaryEntry {\n /** Empty for a definition whose text names no term (listed last, as written). */\n term: string\n definition: string\n source: string\n factId: string\n}\n\nexport interface GlossaryLabels {\n term: string\n definition: string\n source: string\n /** `{at}` is when it was printed, `YYYY-MM-DD HH:MM UTC`. */\n takenAt: string\n empty: string\n}\n\nexport const DEFAULT_GLOSSARY_LABELS: GlossaryLabels = {\n term: 'Term',\n definition: 'Definition',\n source: 'Source',\n takenAt: 'Printed {at}',\n empty: 'No definitions.',\n}\n\nexport interface GlossaryOptions {\n title: string\n /** When it was printed (ISO); default now. */\n at?: string\n labels?: Partial<GlossaryLabels>\n}\n\n/** What follows the term, a leading colon or dash dropped: `means the issued shares.` */\nconst body = (rest: string) => rest.replace(/^\\s*[:—–-]\\s*/, '').trim()\n\n/**\n * The glossary's rows: every definition, alphabetical by term and, within a term, the preferred one\n * first. Definitions whose text names no term follow, as written. `labelId` keeps one label's.\n */\nexport function glossaryEntries(\n sources: readonly DefinitionSource[],\n options: { labelId?: string | null } = {}\n): GlossaryEntry[] {\n const { groups, unparsed } = groupDefinitions(sources, options)\n return [\n ...groups.flatMap((g) =>\n g.definitions.map((d) => ({\n term: d.term,\n definition: body(d.rest),\n source: d.source ?? '',\n factId: d.id,\n }))\n ),\n ...[...unparsed].sort(compareDefinitions).map((d) => ({\n term: '',\n definition: d.text.trim(),\n source: d.source ?? '',\n factId: d.id,\n })),\n ]\n}\n\nconst escapeCell = (text: string) => text.replace(/\\|/g, '\\\\|').replace(/\\n+/g, ' ')\n\n/** The glossary as a Markdown document: a heading, when it was printed, and one table. */\nexport function glossaryMarkdown(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): string {\n const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels }\n const at = minuteUtc(options.at ?? new Date().toISOString())\n const lines = [\n `# ${options.title}`,\n '',\n `_${l.takenAt.replace('{at}', `${at} UTC`)}_`,\n '',\n `| ${l.term} | ${l.definition} | ${l.source} |`,\n '| --- | --- | --- |',\n ...entries.map(\n (e) =>\n `| ${e.term ? `**${escapeCell(e.term)}**` : ''} | ${escapeCell(e.definition)} | ${escapeCell(e.source)} |`\n ),\n ]\n if (!entries.length) lines.push('', l.empty)\n return `${lines.join('\\n')}\\n`\n}\n\n/** `word/document.xml` of the glossary (exposed for tests). */\nexport function glossaryDocumentXml(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): string {\n const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels }\n const { textWidth, sectPr } = page(false)\n const widths = [2, 6, 2].map((w) => Math.floor((textWidth * w) / 10))\n const at = minuteUtc(options.at ?? new Date().toISOString())\n const text = (t: string, bold = false) => [paragraph([{ text: t, bold }], 'TagTableCell')]\n const header = `<w:tr><w:trPr><w:tblHeader/><w:cantSplit/></w:trPr>${[\n l.term,\n l.definition,\n l.source,\n ]\n .map((h, i) => cell(text(h, true), widths[i], 'E7E6E6'))\n .join('')}</w:tr>`\n const rows = entries.map(\n (e) =>\n `<w:tr><w:trPr><w:cantSplit/></w:trPr>${cell(e.term ? text(e.term, true) : [], widths[0])}${cell(\n text(e.definition),\n widths[1]\n )}${cell(e.source ? text(e.source) : [], widths[2])}</w:tr>`\n )\n const table = `<w:tbl><w:tblPr><w:tblStyle w:val=\"TagTableGrid\"/><w:tblW w:w=\"${textWidth}\" w:type=\"dxa\"/><w:tblLayout w:type=\"fixed\"/><w:tblLook w:val=\"04A0\" w:firstRow=\"1\" w:lastRow=\"0\" w:firstColumn=\"1\" w:lastColumn=\"0\" w:noHBand=\"0\" w:noVBand=\"1\"/></w:tblPr><w:tblGrid>${widths\n .map((w) => `<w:gridCol w:w=\"${w}\"/>`)\n .join('')}</w:tblGrid>${header}${rows.join('')}</w:tbl>`\n return documentXml(\n `${paragraph([{ text: options.title }], 'Title')}${paragraph([\n { text: l.takenAt.replace('{at}', `${at} UTC`), muted: true },\n ])}${table}${entries.length ? '' : paragraph([{ text: l.empty, muted: true }])}<w:p/>${sectPr}`\n )\n}\n\n/** The glossary as `.docx` bytes. */\nexport function glossaryDocx(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): Uint8Array {\n const at = new Date(options.at ?? Date.now()).toISOString()\n return docxPackage({\n document: glossaryDocumentXml(entries, { ...options, at }),\n styles: TABLE_DOCUMENT_STYLES,\n title: options.title,\n at,\n })\n}\n\n/** A file name for the glossary: `Glossary - SPA.docx`. */\nexport function glossaryFileName(title: string, extension: 'docx' | 'md'): string {\n return `${title.replace(/[\\\\/:*?\"<>|]+/g, ' ').trim() || 'Glossary'}.${extension}`\n}\n"]}
1
+ {"version":3,"sources":["../src/components/Toolbar.tsx","../src/components/EntityIdentityBar.tsx","../src/components/EntityTooltip.tsx","../src/components/AskBar.tsx","../src/tags/TagDetail.tsx","../src/tags/TagsNav.tsx","../src/tags/glossary.ts"],"names":["jsxs","cn","jsx","Search","Input","useState","useEffect","Textarea","Pencil","useRef","Button","Sparkles","DEFAULT_TAG_TABLE_LABELS","DetailLoading","rowLinks","DetailBody","DetailSection","DetailFields","DetailField","TagTableCell","DetailLinkList","DetailLinkItem","FileText","DetailEmpty","Lightbulb","MessagesSquare","text","X","Plus","groupDefinitions","compareDefinitions","minuteUtc","page","paragraph","cell","documentXml","docxPackage","TABLE_DOCUMENT_STYLES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,OAAA,CAAQ;AAAA,EACtB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,iBAAA,GAAoB,cAAA;AAAA,EACpB,OAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAQG;AACD,EAAA,uBACEA,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAWC,KAAA;AAAA,QACT,oEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,aAAA,EAAa,MAAA;AAAA,MAEb,QAAA,EAAA;AAAA,wBAAAD,eAAA,CAAC,KAAA,EAAA,EAAI,WAAU,0CAAA,EACZ,QAAA,EAAA;AAAA,UAAA,QAAA,oBACCA,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0BAAA,EACb,QAAA,EAAA;AAAA,4BAAAE,cAAA,CAACC,kBAAA,EAAA,EAAO,WAAU,6FAAA,EAA8F,CAAA;AAAA,4BAChHD,cAAA;AAAA,cAACE,QAAA;AAAA,cAAA;AAAA,gBACC,KAAA,EAAO,MAAA;AAAA,gBACP,UAAU,CAAC,CAAA,KAAM,QAAA,CAAS,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,gBACxC,WAAA,EAAa,iBAAA;AAAA,gBACb,SAAA,EAAU,kIAAA;AAAA,gBACV,aAAA,EAAa,MAAA,GAAS,CAAA,EAAG,MAAM,CAAA,OAAA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AA,MAAM,EAAA,GAAK,IAAI,IAAA,CAAK,OAAA,CAAQ,MAAM,IAAA,CAAK,GAAA,EAAK,CAAA,CAAE,WAAA,EAAY;AAC1D,EAAA,OAAOG,6BAAA,CAAY;AAAA,IACjB,UAAU,mBAAA,CAAoB,OAAA,EAAS,EAAE,GAAG,OAAA,EAAS,IAAI,CAAA;AAAA,IACzD,MAAA,EAAQC,uCAAA;AAAA,IACR,OAAO,OAAA,CAAQ,KAAA;AAAA,IACf;AAAA,GACD,CAAA;AACH;AAGO,SAAS,gBAAA,CAAiB,OAAe,SAAA,EAAkC;AAChF,EAAA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,gBAAA,EAAkB,GAAG,EAAE,IAAA,EAAK,IAAK,UAAU,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AAClF","file":"index.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { Search } from 'lucide-react'\nimport { Input, cn } from '@arbidocs/react/ui'\n\n/** Search + filter bar used above every list view. */\nexport function Toolbar({\n search,\n onSearch,\n searchPlaceholder = 'Search…',\n filters,\n actions,\n className,\n testId,\n}: {\n search?: string\n onSearch?: (v: string) => void\n searchPlaceholder?: string\n filters?: ReactNode\n actions?: ReactNode\n className?: string\n testId?: string\n}) {\n return (\n <div\n className={cn(\n 'flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between',\n className\n )}\n data-testid={testId}\n >\n <div className=\"flex flex-1 flex-wrap items-center gap-2\">\n {onSearch && (\n <div className=\"relative w-full max-w-xs\">\n <Search className=\"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n value={search}\n onChange={(e) => onSearch(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"bg-card text-sm placeholder:text-muted-foreground focus-visible:border-ring/60 focus-visible:ring-2 focus-visible:ring-ring pl-8\"\n data-testid={testId ? `${testId}-search` : 'toolbar-search'}\n />\n </div>\n )}\n {filters}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { Pencil } from 'lucide-react'\nimport { Input, Textarea, cn } from '@arbidocs/react/ui'\n\n/** Longest a name may be. Exported so a form editing the same field agrees. */\nexport const IDENTITY_NAME_MAX_LENGTH = 50\n\n/** Shown once the remaining allowance gets this low, not for the whole time. */\nconst COUNTER_THRESHOLD = 10\n\nexport interface EntityIdentityField {\n /** Row caption. Rendered with a trailing colon. */\n label: string\n value: string\n /** Stands in for an empty value, in italics — never a blank row. */\n placeholder: string\n /** Commits the edit. Not called when the value is unchanged. */\n onSave: (next: string) => void\n /** A description needs line breaks; a name does not. */\n multiline?: boolean\n /** Caps the input and shows a counter as it fills. Names only, by default. */\n maxLength?: number\n /** Classes for the read-mode value, e.g. a larger weight for the name. */\n valueClassName?: string\n /**\n * Content pinned to the RIGHT END of this row — e.g. the owning project\n * beside a name, a member stack beside a status. Rows without one let their\n * value run the full width, which is what a description wants.\n */\n trailing?: ReactNode\n /**\n * Content rendered immediately BEFORE the value — the entity's own mark.\n * Sits outside the edit swap, so starting to edit the name doesn't make the\n * icon jump or disappear.\n */\n leading?: ReactNode\n /**\n * Drops the caption from view for this row, leaving the value flush left.\n * For a field whose value already says what it is — a workspace's name and\n * description read as exactly that — the caption is a word the eye has to\n * step over on the way in. The caption stays in the markup for screen\n * readers, which have no such visual cue to fall back on.\n */\n hideLabel?: boolean\n /** Row test id; the pencil and input derive `-edit` and `-input`. */\n testId?: string\n}\n\nexport interface EntityIdentityBarProps {\n /** The editable text fields, in order. Usually name then description. */\n fields: EntityIdentityField[]\n /**\n * Read-only rows shown after the editable ones — anything whose control the\n * consumer owns (a project picker, an owner avatar, a status). Rendered with\n * the same caption column so every row lines up.\n */\n extraRows?: { label: string; content: ReactNode; trailing?: ReactNode; testId?: string }[]\n /** Hides every pencil. A viewer without permission sees values, not controls. */\n canEdit?: boolean\n /** Trailing controls, pinned right — e.g. a member stack, a status. */\n actions?: ReactNode\n /**\n * Controls that act on the ENTITY rather than on any one field — typically an\n * overflow menu holding delete or leave. Sits under the field list, where a\n * destructive action is findable but not in the path of everyday reading.\n */\n footer?: ReactNode\n className?: string\n testId?: string\n}\n\n/**\n * The \"what am I looking at\" bar for an entity's own page.\n *\n * A caption column (`Name:`, `Description:`, `Project:`) and a value column. The\n * captions are the point: a bare bold string at the top of a page reads equally\n * as a workspace, a project, a case file or a folder, and people read it as\n * whichever they expected. Saying which field is which costs one column and\n * removes the ambiguity entirely.\n *\n * Editing happens in place. The pencil is always visible to someone who can use\n * it rather than revealed on hover — a control you have to go hunting for is one\n * most people never find, and hover doesn't exist on touch. Commit is on blur\n * and on Enter (single-line fields only, so a description can hold line\n * breaks); Escape abandons the edit.\n *\n * Deliberately NOT a form: no submit, no dirty state, no field-level errors.\n * When a consumer needs visibility toggles, destructive actions or validation\n * messages, those belong in its settings form — this bar is the identity of the\n * thing, shown where you are working on it.\n *\n * Styled with SEMANTIC tokens only, so every host gets it in its own colours.\n */\nexport function EntityIdentityBar({\n fields,\n extraRows = [],\n canEdit = false,\n actions,\n footer,\n className,\n testId,\n}: EntityIdentityBarProps) {\n return (\n <div\n className={cn('flex flex-wrap items-start justify-between gap-x-6 gap-y-3', className)}\n data-testid={testId}\n >\n <dl className=\"min-w-0 flex-1 space-y-1.5\">\n {fields.map((field) => (\n <IdentityFieldRow key={field.label} field={field} canEdit={canEdit} />\n ))}\n {extraRows.map((row) => (\n <div\n key={row.label}\n className=\"flex min-h-7 min-w-0 items-center gap-2\"\n data-testid={row.testId}\n >\n <dt className=\"w-24 shrink-0 text-sm font-medium text-muted-foreground\">\n {row.label}:\n </dt>\n <dd className=\"flex min-w-0 flex-1 items-center gap-2\">\n {row.content}\n {row.trailing ? (\n <div className=\"min-w-0 shrink-0 sm:ml-auto\">{row.trailing}</div>\n ) : null}\n </dd>\n </div>\n ))}\n {footer ? <div className=\"flex items-center pt-0.5\">{footer}</div> : null}\n </dl>\n {actions ? <div className=\"flex shrink-0 items-center gap-2\">{actions}</div> : null}\n </div>\n )\n}\n\nfunction IdentityFieldRow({ field, canEdit }: { field: EntityIdentityField; canEdit: boolean }) {\n const {\n label,\n value,\n placeholder,\n onSave,\n multiline = false,\n maxLength,\n valueClassName,\n leading,\n hideLabel,\n trailing,\n testId,\n } = field\n\n const [isEditing, setIsEditing] = useState(false)\n const [draft, setDraft] = useState(value)\n\n // Track the value while not editing, so an update from elsewhere (another\n // tab, a websocket) doesn't get overwritten by a stale draft on the next edit.\n useEffect(() => {\n if (!isEditing) setDraft(value)\n }, [value, isEditing])\n\n const commit = () => {\n setIsEditing(false)\n const next = draft.trim()\n if (next !== value) onSave(next)\n }\n\n const cancel = () => {\n setDraft(value)\n setIsEditing(false)\n }\n\n const charsLeft = maxLength === undefined ? null : maxLength - draft.length\n\n // Editing must not move anything. The input carries the read view's exact\n // typography and padding, drops the border and shadow entirely, and marks\n // focus with a contrasting FIELD instead — a box appearing around the text\n // (and the row growing to fit it) reads as the page jumping under the cursor.\n const fieldClass =\n 'h-auto rounded border-0 bg-muted px-1.5 py-0.5 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0'\n\n const shared = {\n autoFocus: true,\n value: draft,\n placeholder,\n maxLength,\n 'aria-label': label,\n 'data-testid': testId && `${testId}-input`,\n onBlur: commit,\n onChange: (e: { target: { value: string } }) => setDraft(e.target.value),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n cancel()\n } else if (e.key === 'Enter' && !multiline) {\n e.preventDefault()\n commit()\n }\n },\n }\n\n // Every row shares one minimum height: that of the small controls (h-7) a\n // row may carry at its trailing end. A row that is only text then sits in\n // the same rhythm as one holding a button, so the captions fall on an even\n // beat down the bar instead of bunching up wherever a row has no control.\n return (\n <div className={cn('flex min-h-7 min-w-0 gap-2', multiline ? 'items-start' : 'items-center')}>\n <dt\n className={cn(\n hideLabel\n ? 'sr-only'\n : cn('w-24 shrink-0 text-sm font-medium text-muted-foreground', multiline && 'pt-1')\n )}\n >\n {label}:\n </dt>\n {/* Wraps under sm: the trailing controls drop to their own line instead of overflowing. */}\n <dd className=\"flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1.5 sm:flex-nowrap\">\n {leading}\n {isEditing ? (\n <div className=\"relative min-w-0 flex-1 max-sm:basis-[calc(100%-2.5rem)]\">\n {multiline ? (\n <Textarea\n {...shared}\n rows={2}\n className={cn(fieldClass, 'min-h-0 resize-none leading-snug', valueClassName)}\n />\n ) : (\n <Input {...shared} className={cn(fieldClass, 'pr-20', valueClassName)} />\n )}\n {charsLeft !== null && charsLeft <= COUNTER_THRESHOLD && (\n <span\n className={cn(\n 'pointer-events-none absolute right-3 top-1/2 hidden -translate-y-1/2 text-sm lg:block',\n charsLeft < 0 ? 'text-destructive' : 'text-muted-foreground'\n )}\n data-testid={testId && `${testId}-counter`}\n >\n {charsLeft < 0 ? `${-charsLeft} over` : `${charsLeft} left`}\n </span>\n )}\n </div>\n ) : (\n // `identity-field` (not the generic `group`) scopes the pencil's hover\n // to THIS field only — an ancestor card also carries `group`, so a\n // `.group:hover` rule would reveal every field's pencil at once.\n <span className=\"identity-field flex min-w-0 flex-1 items-center gap-1.5 sm:flex-none\">\n {/* Same padding as the input above — the swap must not nudge the\n text sideways or change the row's height. */}\n <span className={cn('px-1.5 py-0.5', valueClassName)} data-testid={testId}>\n {value || <span className=\"italic text-muted-foreground\">{placeholder}</span>}\n </span>\n {canEdit && (\n <button\n type=\"button\"\n onClick={() => setIsEditing(true)}\n aria-label={`Edit ${label.toLowerCase()}`}\n title={`Edit ${label.toLowerCase()}`}\n // Quiet by default — the pencil only surfaces when the row is\n // hovered so it reads as clean text, and stays reachable by\n // keyboard (focus-visible).\n //\n // NB: use the ungated `[.identity-field:hover_&]` selector rather\n // than Tailwind's `group-hover:`. The latter compiles behind\n // `@media (hover: hover)`, so on a touchscreen (whose PRIMARY\n // pointer reports `hover: none`) the rule is disabled even when a\n // real mouse is firing hover events — the pencil then stays at\n // opacity-0 forever. The arbitrary selector has no media gate, so\n // it reveals on any genuine `:hover`.\n className=\"shrink-0 cursor-pointer rounded p-1 text-muted-foreground opacity-60 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground focus-visible:opacity-100 pointer-coarse:p-[15px] [.identity-field:hover_&]:opacity-100\"\n data-testid={testId && `${testId}-edit`}\n >\n <Pencil className=\"size-3.5\" />\n </button>\n )}\n </span>\n )}\n {trailing ? (\n <div className=\"min-w-0 shrink-0 max-sm:w-full sm:ml-auto\">{trailing}</div>\n ) : null}\n </dd>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\n/**\n * Parts for the hover card of an entity pill (workspace, user, tag, ...): a header, optional\n * stat rows, bordered sections and an action hint. The host fills them from its own data.\n */\n\nexport function EntityTooltip({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"entity-tooltip\" className={cn('flex flex-col gap-2', className)}>\n {children}\n </div>\n )\n}\n\nexport interface EntityTooltipHeaderProps {\n /** Icon / avatar before the title. */\n lead: ReactNode\n title: ReactNode\n subtitle?: ReactNode\n /** Right-hand badge. */\n trailing?: ReactNode\n /** Extra glyph after the title (e.g. an agent mark). */\n titleAccessory?: ReactNode\n}\n\nexport function EntityTooltipHeader({\n lead,\n title,\n subtitle,\n trailing,\n titleAccessory,\n}: EntityTooltipHeaderProps) {\n return (\n <div className=\"flex items-center gap-2\">\n {lead}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"flex items-center gap-1.5\">\n <span className=\"truncate text-sm font-medium\">{title}</span>\n {titleAccessory}\n </div>\n {subtitle && <span className=\"truncate text-xs text-muted-foreground\">{subtitle}</span>}\n </div>\n {trailing}\n </div>\n )\n}\n\nexport interface EntityTooltipStat {\n key: string\n icon: ReactNode\n label: ReactNode\n value: ReactNode\n}\n\n/** Label/value rows between two rules. */\nexport function EntityTooltipStats({ stats }: { stats: EntityTooltipStat[] }) {\n return (\n <div className=\"flex flex-col gap-1.5 border-y border-border py-2\">\n {stats.map((s) => (\n <div key={s.key} className=\"flex items-center justify-between text-sm\">\n <div className=\"flex items-center gap-2\">\n {s.icon}\n <span className=\"text-muted-foreground\">{s.label}</span>\n </div>\n <span className=\"font-medium\">{s.value}</span>\n </div>\n ))}\n </div>\n )\n}\n\n/** A secondary section under a rule, optionally headed by an icon + text. */\nexport function EntityTooltipSection({\n icon,\n heading,\n children,\n}: {\n icon?: ReactNode\n heading?: ReactNode\n children?: ReactNode\n}) {\n return (\n <div className=\"flex flex-col gap-1.5 border-t border-border pt-2\">\n {heading && (\n <div className=\"flex items-center gap-2 text-xs text-muted-foreground\">\n {icon}\n <span>{heading}</span>\n </div>\n )}\n {children}\n </div>\n )\n}\n\n/** Muted one-liner at the foot of the card, e.g. \"Click to send message\". */\nexport function EntityTooltipHint({\n icon,\n children,\n isRuled,\n}: {\n icon?: ReactNode\n children: ReactNode\n /** Draw the rule above (the hint closes a card that already has sections). */\n isRuled?: boolean\n}) {\n return (\n <div\n className={cn(\n 'flex items-center gap-1.5 text-xs text-muted-foreground',\n isRuled && 'border-t border-border pt-1'\n )}\n >\n {icon}\n <span>{children}</span>\n </div>\n )\n}\n","/**\n * A question box that IS the product's front door, not a link to one.\n *\n * One input, two destinations: Enter (or the arrow) ASKS — hands the trimmed\n * text to `onAsk`, the conversational answer — while the Search button beside\n * it hands the same text to `onSearch`, the retrieval experience. The split\n * matters because queries come in both registers (\"what does\n * this term mean\" vs \"find every mention of it\") and making them choose a\n * page before typing kills the impulse. Omit `onSearch` and the bar is a plain\n * ask composer.\n *\n * The consumer owns what asking and searching mean (start a chat, run smart\n * search, open a record). Suggestion chips prefill the input rather than\n * firing immediately: a suggestion is a starting point you edit, not a button\n * you regret.\n *\n * Styled with SEMANTIC tokens only (card, border, foreground, muted-foreground,\n * primary), so every host gets it in its own colours.\n */\n\nimport { useRef, useState, type KeyboardEventHandler, type ReactNode, type RefObject } from 'react'\nimport { Search, Sparkles } from 'lucide-react'\nimport { Button, cn } from '@arbidocs/react/ui'\n\nexport interface AskBarProps {\n /** Receives the trimmed question; the caller owns what asking means. */\n onAsk: (text: string) => void\n /** Second destination for the same text — retrieval. Omit to hide. */\n onSearch?: (text: string) => void\n /** Prefill-on-click starter questions, shown under the input. */\n suggestions?: string[]\n placeholder?: string\n askLabel?: string\n searchLabel?: string\n /** Controlled value. Omit for the bar to own its own text. */\n value?: string\n onValueChange?: (value: string) => void\n /** Raw keydown on the input — lets a consumer run an autocomplete\n * (arrow/Enter/Tab/Escape) before the form's own submit handling.\n * preventDefault() on Enter suppresses the submit. */\n onInputKeyDown?: KeyboardEventHandler<HTMLInputElement>\n /** Popover anchored to the pill (e.g. a slash-command menu). Rendered in a\n * relative wrapper around the form, so absolute children position against\n * the pill. */\n menu?: ReactNode\n /** External input ref, for consumers that refocus after menu selection. */\n inputRef?: RefObject<HTMLInputElement | null>\n className?: string\n /** Root test id; children derive `-input`, `-submit`, `-search`, `-suggestion`. */\n testId?: string\n}\n\nexport function AskBar({\n onAsk,\n onSearch,\n suggestions = [],\n placeholder = 'Ask anything…',\n askLabel = 'Ask',\n searchLabel = 'Search',\n value,\n onValueChange,\n onInputKeyDown,\n menu,\n inputRef: externalInputRef,\n className,\n testId = 'ask-bar',\n}: AskBarProps) {\n const [innerText, setInnerText] = useState('')\n const text = value !== undefined ? value : innerText\n const setText = (next: string) => {\n onValueChange?.(next)\n if (value === undefined) setInnerText(next)\n }\n const localInputRef = useRef<HTMLInputElement>(null)\n const inputRef = externalInputRef ?? localInputRef\n\n const submitTo = (handler: (text: string) => void) => {\n const question = text.trim()\n if (!question) return\n handler(question)\n setText('')\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)} data-testid={testId}>\n <div className=\"relative\">\n {menu}\n <form\n onSubmit={(e) => {\n e.preventDefault()\n submitTo(onAsk)\n }}\n // The AppHeader search pill's language exactly — rounded-md,\n // border-input, magnifier left, muted text — so the bar sits in a\n // topbar the way a ⌘K trigger does, not like a chat composer\n // dropped into a header.\n className=\"flex h-12 items-center gap-1.5 rounded-md border border-border/50 bg-background pl-3 pr-1.5 transition-colors focus-within:border-border\"\n >\n <Search className=\"pointer-events-none size-4 shrink-0 text-muted-foreground\" />\n <input\n ref={inputRef}\n type=\"text\"\n value={text}\n onChange={(e) => setText(e.target.value)}\n onKeyDown={onInputKeyDown}\n placeholder={placeholder}\n className=\"h-8 min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n data-testid={testId && `${testId}-input`}\n />\n {onSearch && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n disabled={!text.trim()}\n onClick={() => submitTo(onSearch)}\n className=\"h-8 shrink-0 px-2.5 text-xs font-medium text-muted-foreground hover:text-foreground\"\n data-testid={testId && `${testId}-search`}\n >\n {searchLabel}\n </Button>\n )}\n {/* The primary door wears the Ask AI anatomy: Sparkles + label. */}\n <Button\n type=\"submit\"\n size=\"sm\"\n disabled={!text.trim()}\n className=\"h-8 shrink-0 px-3 text-xs font-medium\"\n data-testid={testId && `${testId}-submit`}\n >\n <Sparkles className=\"size-3.5\" />\n {askLabel}\n </Button>\n </form>\n </div>\n {suggestions.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {suggestions.map((s) => (\n <button\n key={s}\n type=\"button\"\n onClick={() => {\n setText(s)\n inputRef.current?.focus()\n }}\n className=\"rounded-full border border-border/50 bg-card px-3 py-1 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground\"\n data-testid={testId && `${testId}-suggestion`}\n >\n {s}\n </button>\n ))}\n </div>\n )}\n </div>\n )\n}\n","/**\n * One tag in full: its values for its kind's fields (position, role, status, …) editable in place,\n * then everything across the workspace that carries it — the documents (with the value or note the\n * tag has on each, and how many passages back it), the facts and the threads. The data is the tag\n * read with its links (`TagTableRow`) and its kind's fields; every write goes back through the host.\n * Laid out with the shared detail parts (`DetailPanel`), as a database row is.\n */\n\nimport type { ReactNode } from 'react'\nimport { FileText, Lightbulb, MessagesSquare } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport {\n DetailBody,\n DetailEmpty,\n DetailField,\n DetailFields,\n DetailLinkItem,\n DetailLinkList,\n DetailLoading,\n DetailSection,\n} from '../components/DetailPanel'\nimport {\n DEFAULT_TAG_TABLE_LABELS,\n TagTableCell,\n type TagTableLabels,\n type TagTableProps,\n} from './TagTable'\nimport { rowLinks, type TagTableField, type TagTableRow } from './tagTableModel'\n\nexport interface TagDetailLabels {\n fields: string\n documents: string\n facts: string\n threads: string\n /** `{shown}` of `{count}` listed. */\n showing: string\n noDocuments: string\n noFacts: string\n /** An annotation with no value on a document. */\n noValue: string\n noThreads: string\n untitledThread: string\n /** When a thread was last active: `{date}`. */\n threadUpdated: string\n /** `{count}` passages cited. */\n passages: string\n passage: string\n loading: string\n}\n\nexport const DEFAULT_TAG_DETAIL_LABELS: TagDetailLabels = {\n fields: 'Fields',\n documents: 'Documents',\n facts: 'Facts',\n threads: 'Threads',\n showing: 'Showing {shown} of {count}',\n noDocuments: 'No document carries this tag yet.',\n noFacts: 'No fact carries this tag yet.',\n noValue: 'No note',\n noThreads: 'No thread carries this tag yet.',\n untitledThread: 'Untitled thread',\n threadUpdated: 'Updated {date}',\n passages: '{count} passages',\n passage: '1 passage',\n loading: 'Loading…',\n}\n\nexport interface TagDetailProps extends Pick<\n TagTableProps,\n | 'onChangeValue'\n | 'onOpenDocument'\n | 'onOpenFact'\n | 'onOpenThread'\n | 'people'\n | 'tags'\n | 'onOpenTag'\n> {\n /** The tag with its values and links (documents, facts, threads). */\n row: TagTableRow | undefined\n /** Its kind's fields in the workspace (none: no Fields section). */\n fields?: TagTableField[]\n /**\n * What the tag's note on a document is, e.g. \"Note\" for an annotation or \"Role\" for a person.\n * Given, each document row names it before the note.\n */\n noteLabel?: string\n /**\n * The note is the point of the row (an annotation's value): shown prominently, and a document\n * without one says so.\n */\n noteIsValue?: boolean\n /**\n * Render a document's cited passages in place of the plain \"N passages\" count (e.g. a popover\n * listing them); `label` is that count's text. Called only for a document with passages.\n */\n renderPassages?: (\n doc: { doc_ext_id: string; citations_count: number },\n label: string\n ) => ReactNode\n isLoading?: boolean\n labels?: Partial<TagDetailLabels>\n /** Labels of the field inputs (the empty choice). */\n fieldLabels?: Partial<TagTableLabels>\n className?: string\n testId?: string\n}\n\n/** A timestamp as a day in the viewer's locale (\"18 Oct 2026\"). */\nconst formatDay = (iso: string) => {\n const at = new Date(iso)\n return Number.isNaN(at.getTime())\n ? iso\n : at.toLocaleDateString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })\n}\n\nexport function TagDetail({\n row,\n fields = [],\n isLoading,\n people,\n tags,\n onOpenTag,\n onChangeValue,\n onOpenDocument,\n onOpenFact,\n onOpenThread,\n noteLabel,\n noteIsValue = false,\n renderPassages,\n labels,\n fieldLabels,\n className,\n testId = 'tag-detail',\n}: TagDetailProps) {\n const l = { ...DEFAULT_TAG_DETAIL_LABELS, ...labels }\n const cellLabels = { ...DEFAULT_TAG_TABLE_LABELS, ...fieldLabels }\n if (isLoading || !row) return <DetailLoading label={l.loading} />\n const links = rowLinks(row)\n const docs = links.docs ?? []\n const facts = links.facts ?? []\n const threads = links.threads ?? []\n const passages = (n: number) => (n === 1 ? l.passage : l.passages.replace('{count}', String(n)))\n\n return (\n <DetailBody className={className} testId={testId}>\n {fields.length > 0 && (\n <DetailSection title={l.fields} testId={`${testId}-fields`}>\n <DetailFields>\n {fields.map((field) => (\n <DetailField key={field.id} label={field.name}>\n <TagTableCell\n row={row}\n column={field}\n people={people}\n tags={tags}\n onOpenTag={onOpenTag}\n onChange={onChangeValue}\n l={cellLabels}\n testId={`${testId}-field-${field.id}`}\n />\n </DetailField>\n ))}\n </DetailFields>\n </DetailSection>\n )}\n\n <DetailSection\n title={l.documents}\n count={links.doc_count}\n shown={docs.length}\n showingLabel={l.showing}\n testId={`${testId}-documents`}\n >\n {docs.length ? (\n <DetailLinkList>\n {docs.map((d) => (\n <DetailLinkItem\n key={d.doc_ext_id}\n icon={<FileText className=\"size-4\" />}\n onClick={onOpenDocument ? () => onOpenDocument(d.doc_ext_id) : undefined}\n testId={`${testId}-doc-${d.doc_ext_id}`}\n trailing={\n d.citations_count > 0 &&\n !renderPassages && (\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {passages(d.citations_count)}\n </span>\n )\n }\n after={\n d.citations_count > 0 &&\n renderPassages && (\n <span className=\"shrink-0 px-3 py-2 text-xs\">\n {renderPassages(d, passages(d.citations_count))}\n </span>\n )\n }\n >\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium\">{d.file_name}</span>\n {(d.note || noteIsValue) && (\n <span\n className={cn(\n 'mt-0.5 flex min-w-0 items-baseline gap-2',\n noteIsValue ? 'text-base text-foreground' : 'text-muted-foreground'\n )}\n data-testid={`${testId}-doc-${d.doc_ext_id}-note`}\n >\n {noteLabel && (\n <span className=\"shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {noteLabel}\n </span>\n )}\n <span\n className={cn(\n 'line-clamp-3 min-w-0 whitespace-pre-line',\n noteIsValue && 'font-semibold',\n !d.note && 'font-normal italic text-muted-foreground'\n )}\n >\n {d.note || l.noValue}\n </span>\n </span>\n )}\n </span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noDocuments}</DetailEmpty>\n )}\n </DetailSection>\n\n <DetailSection\n title={l.facts}\n count={links.fact_count}\n shown={facts.length}\n showingLabel={l.showing}\n testId={`${testId}-facts`}\n >\n {facts.length ? (\n <DetailLinkList>\n {facts.map((f) => (\n <DetailLinkItem\n key={f.fact_ext_id}\n icon={<Lightbulb className=\"size-4\" />}\n onClick={onOpenFact ? () => onOpenFact(f.fact_ext_id) : undefined}\n testId={`${testId}-fact-${f.fact_ext_id}`}\n >\n <span className=\"line-clamp-3 min-w-0 flex-1\">{f.text}</span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noFacts}</DetailEmpty>\n )}\n </DetailSection>\n\n <DetailSection\n title={l.threads}\n count={links.thread_count}\n shown={threads.length}\n showingLabel={l.showing}\n testId={`${testId}-threads`}\n >\n {threads.length ? (\n <DetailLinkList>\n {threads.map((t) => (\n <DetailLinkItem\n key={t.conversation_ext_id}\n icon={<MessagesSquare className=\"size-4\" />}\n onClick={onOpenThread ? () => onOpenThread(t.conversation_ext_id) : undefined}\n testId={`${testId}-thread-${t.conversation_ext_id}`}\n trailing={\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {l.threadUpdated.replace('{date}', formatDay(t.updated_at))}\n </span>\n }\n >\n <span className=\"min-w-0 flex-1 truncate font-medium\">\n {t.title || l.untitledThread}\n </span>\n </DetailLinkItem>\n ))}\n </DetailLinkList>\n ) : (\n <DetailEmpty>{l.noThreads}</DetailEmpty>\n )}\n </DetailSection>\n </DetailBody>\n )\n}\n","/**\n * The side navigation of a Tags page: the workspace's tags grouped by kind (labels, annotations,\n * issues, people, organisations, searches), each group with its count, each tag with how much\n * carries it, and nested tags (sub-labels) under their parent. A group heading selects the whole\n * kind; a tag selects that tag. One box finds and adds: typing filters the list, and a name that is\n * not there yet is offered as a new tag (\"Create …\", or Enter). Data-free: the host passes the\n * groups and creates.\n */\n\nimport { useState, type ReactNode } from 'react'\nimport { Plus, Search, X } from 'lucide-react'\nimport { Input, cn } from '@arbidocs/react/ui'\n\nexport interface TagsNavItem {\n id: string\n name: string\n /** How many documents and facts carry it. */\n count?: number\n /** A swatch colour (any CSS colour). */\n color?: string\n /** Nested tags (e.g. sub-labels). */\n children?: TagsNavItem[]\n /** Other text the filter matches (e.g. the tag's field values). */\n keywords?: string\n}\n\nexport interface TagsNavGroup {\n id: string\n label: string\n icon?: ReactNode\n items: TagsNavItem[]\n}\n\n/** What is selected: a whole group, or one tag of it. */\nexport type TagsNavSelection = { groupId: string; itemId?: string }\n\nexport interface TagsNavLabels {\n filter: string\n clearFilter: string\n empty: string\n noMatch: string\n /** Offer to add the typed name: `{name}`. */\n create: string\n}\n\nexport const DEFAULT_TAGS_NAV_LABELS: TagsNavLabels = {\n filter: 'Find or add a tag…',\n clearFilter: 'Clear',\n empty: 'None yet',\n noMatch: 'No match',\n create: 'Create \"{name}\"',\n}\n\nexport interface TagsNavProps {\n groups: TagsNavGroup[]\n selected: TagsNavSelection | null\n onSelect: (selection: TagsNavSelection) => void\n /**\n * Add a tag by the name typed in the box when no tag has that name (any case). Absent: the box\n * only finds.\n */\n onCreate?: (name: string) => void | Promise<unknown>\n /**\n * The filter text, when the box lives elsewhere (e.g. the page header's filter): the list then\n * renders no box of its own and filters by this; `onFilterChange` hears a create clearing it.\n */\n filter?: string\n onFilterChange?: (text: string) => void\n /** Match items' `keywords` as well as their names. */\n matchKeywords?: boolean\n labels?: Partial<TagsNavLabels>\n className?: string\n testId?: string\n}\n\nconst total = (items: TagsNavItem[]): number =>\n items.reduce((n, item) => n + 1 + total(item.children ?? []), 0)\n\n/** The tag named `name` (any case) in these groups, with its group; nested ones included. */\nexport function findTagsNavItem(\n groups: TagsNavGroup[],\n name: string\n): { groupId: string; item: TagsNavItem } | undefined {\n const text = name.trim()\n if (!text) return undefined\n for (const g of groups) {\n const item = findByName(g.items, text)\n if (item) return { groupId: g.id, item }\n }\n return undefined\n}\n\n/** The item named `name` (any case), nested ones included. */\nfunction findByName(items: TagsNavItem[], name: string): TagsNavItem | undefined {\n const needle = name.toLowerCase()\n for (const item of items) {\n if (item.name.trim().toLowerCase() === needle) return item\n const nested = findByName(item.children ?? [], name)\n if (nested) return nested\n }\n return undefined\n}\n\n/** The items whose name (or keywords, or a nested item's) contains `text`, nesting kept. */\nfunction filterItems(items: TagsNavItem[], text: string, keywords = false): TagsNavItem[] {\n if (!text) return items\n const needle = text.toLowerCase()\n return items.flatMap((item) => {\n const children = filterItems(item.children ?? [], text, keywords)\n const hit =\n item.name.toLowerCase().includes(needle) ||\n (keywords && !!item.keywords?.toLowerCase().includes(needle))\n return hit || children.length ? [{ ...item, children }] : []\n })\n}\n\nexport function TagsNav({\n groups,\n selected,\n onSelect,\n onCreate,\n filter: controlledFilter,\n onFilterChange,\n matchKeywords = false,\n labels,\n className,\n testId = 'tags-nav',\n}: TagsNavProps) {\n const l = { ...DEFAULT_TAGS_NAV_LABELS, ...labels }\n const [ownFilter, setOwnFilter] = useState('')\n const hasOwnBox = controlledFilter === undefined\n const filter = hasOwnBox ? ownFilter : controlledFilter\n const setFilter = (text: string) => (hasOwnBox ? setOwnFilter(text) : onFilterChange?.(text))\n const [creating, setCreating] = useState(false)\n const text = filter.trim()\n const exact = findTagsNavItem(groups, text)\n const canCreate = !!onCreate && !!text && !exact\n const filterGroup = (items: TagsNavItem[]) => filterItems(items, text, matchKeywords)\n\n const create = async () => {\n if (!canCreate || creating) return\n setCreating(true)\n try {\n await onCreate?.(text)\n setFilter('')\n } finally {\n setCreating(false)\n }\n }\n\n const row = (groupId: string, item: TagsNavItem, depth: number): ReactNode => {\n const active = selected?.groupId === groupId && selected.itemId === item.id\n return (\n <li key={item.id}>\n <button\n type=\"button\"\n onClick={() => onSelect({ groupId, itemId: item.id })}\n aria-current={active ? 'true' : undefined}\n className={cn(\n 'flex w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left text-sm transition-colors hover:bg-muted pointer-coarse:min-h-11',\n active && 'bg-primary/10 font-medium text-primary hover:bg-primary/10'\n )}\n style={{ paddingLeft: 12 + depth * 16 }}\n data-testid={`${testId}-item-${item.id}`}\n >\n {item.color && (\n <span\n className=\"size-2 shrink-0 rounded-full\"\n style={{ backgroundColor: item.color }}\n aria-hidden\n />\n )}\n <span className=\"min-w-0 flex-1 truncate\" title={item.name}>\n {item.name}\n </span>\n {item.count !== undefined && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {item.count}\n </span>\n )}\n </button>\n {!!item.children?.length && (\n <ul>{item.children.map((child) => row(groupId, child, depth + 1))}</ul>\n )}\n </li>\n )\n }\n\n return (\n <nav className={cn('flex flex-col gap-3', className)} data-testid={testId}>\n {hasOwnBox && (\n <div className=\"relative\">\n <Search className=\"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n value={filter}\n onChange={(e) => setFilter(e.target.value)}\n onKeyDown={(e) => {\n if (e.key !== 'Enter') return\n e.preventDefault()\n if (canCreate) void create()\n else if (exact?.item) onSelect({ groupId: exact.groupId, itemId: exact.item.id })\n }}\n placeholder={l.filter}\n aria-label={l.filter}\n className=\"h-8 pl-8 pr-8 text-sm\"\n data-testid={`${testId}-filter`}\n />\n {filter && (\n <button\n type=\"button\"\n onClick={() => setFilter('')}\n aria-label={l.clearFilter}\n className=\"absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground\"\n >\n <X className=\"size-3.5\" />\n </button>\n )}\n </div>\n )}\n {canCreate && (\n <button\n type=\"button\"\n onClick={() => void create()}\n disabled={creating}\n className=\"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm text-primary transition-colors hover:bg-muted disabled:opacity-60 pointer-coarse:min-h-11\"\n data-testid={`${testId}-create`}\n >\n <Plus className=\"size-4 shrink-0\" />\n <span className=\"min-w-0 flex-1 truncate\">{l.create.replace('{name}', text)}</span>\n </button>\n )}\n {groups.map((group) => {\n const items = filterGroup(group.items)\n if (text && !items.length) return null\n const active = selected?.groupId === group.id && !selected.itemId\n return (\n <section key={group.id} data-testid={`${testId}-group-${group.id}`}>\n <button\n type=\"button\"\n onClick={() => onSelect({ groupId: group.id })}\n aria-current={active ? 'true' : undefined}\n className={cn(\n 'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:bg-muted hover:text-foreground pointer-coarse:min-h-11',\n active && 'bg-primary/10 text-primary hover:bg-primary/10 hover:text-primary'\n )}\n data-testid={`${testId}-group-${group.id}-heading`}\n >\n {group.icon && <span className=\"shrink-0 [&_svg]:size-4\">{group.icon}</span>}\n <span className=\"flex-1\">{group.label}</span>\n <span className=\"tabular-nums\" data-testid={`${testId}-group-${group.id}-count`}>\n {total(group.items)}\n </span>\n </button>\n {items.length ? (\n <ul className=\"mt-0.5\">{items.map((item) => row(group.id, item, 0))}</ul>\n ) : (\n <p className=\"px-3 py-1 text-xs text-muted-foreground\">{l.empty}</p>\n )}\n </section>\n )\n })}\n {text && !canCreate && groups.every((g) => !filterGroup(g.items).length) && (\n <p className=\"px-2 text-sm text-muted-foreground\">{l.noMatch}</p>\n )}\n </nav>\n )\n}\n","/**\n * The glossary: every definition fact (optionally one agreement's), alphabetical by term, as a\n * three-column table — Term, Definition, Source — printed as a Word document or as Markdown with\n * the same WordprocessingML the tag tables export with (`ooxml.ts`).\n */\n\nimport {\n cell,\n docxPackage,\n documentXml,\n minuteUtc,\n page,\n paragraph,\n TABLE_DOCUMENT_STYLES,\n} from './ooxml'\nimport { compareDefinitions, groupDefinitions, type DefinitionSource } from './definitions'\n\n/** One glossary row. */\nexport interface GlossaryEntry {\n /** Empty for a definition whose text names no term (listed last, as written). */\n term: string\n definition: string\n source: string\n factId: string\n}\n\nexport interface GlossaryLabels {\n term: string\n definition: string\n source: string\n /** `{at}` is when it was printed, `YYYY-MM-DD HH:MM UTC`. */\n takenAt: string\n empty: string\n}\n\nexport const DEFAULT_GLOSSARY_LABELS: GlossaryLabels = {\n term: 'Term',\n definition: 'Definition',\n source: 'Source',\n takenAt: 'Printed {at}',\n empty: 'No definitions.',\n}\n\nexport interface GlossaryOptions {\n title: string\n /** When it was printed (ISO); default now. */\n at?: string\n labels?: Partial<GlossaryLabels>\n}\n\n/** What follows the term, a leading colon or dash dropped: `means the issued shares.` */\nconst body = (rest: string) => rest.replace(/^\\s*[:—–-]\\s*/, '').trim()\n\n/**\n * The glossary's rows: every definition, alphabetical by term and, within a term, the preferred one\n * first. Definitions whose text names no term follow, as written. `labelId` keeps one label's.\n */\nexport function glossaryEntries(\n sources: readonly DefinitionSource[],\n options: { labelId?: string | null } = {}\n): GlossaryEntry[] {\n const { groups, unparsed } = groupDefinitions(sources, options)\n return [\n ...groups.flatMap((g) =>\n g.definitions.map((d) => ({\n term: d.term,\n definition: body(d.rest),\n source: d.source ?? '',\n factId: d.id,\n }))\n ),\n ...[...unparsed].sort(compareDefinitions).map((d) => ({\n term: '',\n definition: d.text.trim(),\n source: d.source ?? '',\n factId: d.id,\n })),\n ]\n}\n\nconst escapeCell = (text: string) => text.replace(/\\|/g, '\\\\|').replace(/\\n+/g, ' ')\n\n/** The glossary as a Markdown document: a heading, when it was printed, and one table. */\nexport function glossaryMarkdown(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): string {\n const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels }\n const at = minuteUtc(options.at ?? new Date().toISOString())\n const lines = [\n `# ${options.title}`,\n '',\n `_${l.takenAt.replace('{at}', `${at} UTC`)}_`,\n '',\n `| ${l.term} | ${l.definition} | ${l.source} |`,\n '| --- | --- | --- |',\n ...entries.map(\n (e) =>\n `| ${e.term ? `**${escapeCell(e.term)}**` : ''} | ${escapeCell(e.definition)} | ${escapeCell(e.source)} |`\n ),\n ]\n if (!entries.length) lines.push('', l.empty)\n return `${lines.join('\\n')}\\n`\n}\n\n/** `word/document.xml` of the glossary (exposed for tests). */\nexport function glossaryDocumentXml(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): string {\n const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels }\n const { textWidth, sectPr } = page(false)\n const widths = [2, 6, 2].map((w) => Math.floor((textWidth * w) / 10))\n const at = minuteUtc(options.at ?? new Date().toISOString())\n const text = (t: string, bold = false) => [paragraph([{ text: t, bold }], 'TagTableCell')]\n const header = `<w:tr><w:trPr><w:tblHeader/><w:cantSplit/></w:trPr>${[\n l.term,\n l.definition,\n l.source,\n ]\n .map((h, i) => cell(text(h, true), widths[i], 'E7E6E6'))\n .join('')}</w:tr>`\n const rows = entries.map(\n (e) =>\n `<w:tr><w:trPr><w:cantSplit/></w:trPr>${cell(e.term ? text(e.term, true) : [], widths[0])}${cell(\n text(e.definition),\n widths[1]\n )}${cell(e.source ? text(e.source) : [], widths[2])}</w:tr>`\n )\n const table = `<w:tbl><w:tblPr><w:tblStyle w:val=\"TagTableGrid\"/><w:tblW w:w=\"${textWidth}\" w:type=\"dxa\"/><w:tblLayout w:type=\"fixed\"/><w:tblLook w:val=\"04A0\" w:firstRow=\"1\" w:lastRow=\"0\" w:firstColumn=\"1\" w:lastColumn=\"0\" w:noHBand=\"0\" w:noVBand=\"1\"/></w:tblPr><w:tblGrid>${widths\n .map((w) => `<w:gridCol w:w=\"${w}\"/>`)\n .join('')}</w:tblGrid>${header}${rows.join('')}</w:tbl>`\n return documentXml(\n `${paragraph([{ text: options.title }], 'Title')}${paragraph([\n { text: l.takenAt.replace('{at}', `${at} UTC`), muted: true },\n ])}${table}${entries.length ? '' : paragraph([{ text: l.empty, muted: true }])}<w:p/>${sectPr}`\n )\n}\n\n/** The glossary as `.docx` bytes. */\nexport function glossaryDocx(\n entries: readonly GlossaryEntry[],\n options: GlossaryOptions\n): Uint8Array {\n const at = new Date(options.at ?? Date.now()).toISOString()\n return docxPackage({\n document: glossaryDocumentXml(entries, { ...options, at }),\n styles: TABLE_DOCUMENT_STYLES,\n title: options.title,\n at,\n })\n}\n\n/** A file name for the glossary: `Glossary - SPA.docx`. */\nexport function glossaryFileName(title: string, extension: 'docx' | 'md'): string {\n return `${title.replace(/[\\\\/:*?\"<>|]+/g, ' ').trim() || 'Glossary'}.${extension}`\n}\n"]}
package/dist/index.js CHANGED
@@ -2,51 +2,52 @@
2
2
  export { MemberAvatarStack } from './chunk-XNOASBGW.js';
3
3
  export { ApplyLabelButton, ApplyLabelDialog, DEFAULT_APPLY_LABEL_DIALOG_LABELS, DEFAULT_RELEVANCE_STEPS, DEFAULT_SEARCH_BAR_LABELS, DEFAULT_SEARCH_EMPTY_STATE_LABELS, DEFAULT_SEARCH_GROUP_HEADER_LABELS, DEFAULT_SEARCH_NO_RESULTS_LABELS, DEFAULT_SEARCH_PAGINATION_LABELS, DEFAULT_SEARCH_TOTALS_LABELS, DOCUMENT_SEARCH_NOUNS, Highlight, RelevanceThreshold, SearchBar, SearchControlsBar, SearchEmptyState, SearchErrorBanner, SearchGroupCard, SearchGroupHeader, SearchNoResults, SearchPageBody, SearchPageFrame, SearchPageHeader, SearchPagination, SearchPillToggle, SearchResultList, SearchResultsInner, SearchResultsMain, SearchToolbarRow, SearchTotalsHeadline, getPageNumbers, highlightTerms, searchNouns, splitByTerms, stripMarkdownLinks } from './chunk-2MJWWPHY.js';
4
4
  export { UsageMeter, usageMeterState } from './chunk-IBZJYCYM.js';
5
- export { ArticleList, Chart, CheckList, CollectionDetail, CtaBand, DefinitionList, EditorialHeading, EditorialHero, EditorialProse, EditorialSection, Eyebrow, PanelGrid, ProofStrip, PullQuote, Reveal, TagList } from './chunk-LYUO3E6V.js';
6
5
  export { ActionCluster, AskField, AskRow, AskTrigger, DEFAULT_ASK_FIELD_LABELS, DEFAULT_INSTALL_PROMPT_LABELS, DEFAULT_MOBILE_BARS_LABELS, DEFAULT_OFFLINE_PILL_LABELS, DEFAULT_REMOTE_CONTROL_PILL_LABELS, DEFAULT_SIDEBAR_LABELS, DEFAULT_TIP_CARD_LABELS, DEFAULT_WORKSPACE_KIND_LABELS, DEFAULT_WORKSPACE_SWITCHER_LABELS, INSTALL_PROMPT_DISMISSED_KEY, InfoBar, InstallPrompt, MobileAppBar, MobileTabBar, NotificationBell, OfflinePill, RemoteControlPill, STATUS_ROW_BASE_CLASS, STATUS_ROW_TONES, Sidebar, SidebarBadgeRow, SidebarRowAction, SidebarRowHoverContext, SplitLayout, StatusBadge, StatusRow, TipCard, UserMenu, WorkspaceIdentity, WorkspaceSwitcher, getInstallInstructions, initInstallPrompt, isIosDevice, promptAppInstall, resolveSidebarLayout, useInstallPrompt, useSidebarContext, useSidebarSettle, workspaceKindColor, workspaceKindMeta } from './chunk-D3N67Q4D.js';
6
+ export { ArticleList, Chart, CheckList, CollectionDetail, CtaBand, DefinitionList, EditorialHeading, EditorialHero, EditorialProse, EditorialSection, Eyebrow, PanelGrid, ProofStrip, PullQuote, Reveal, TagList } from './chunk-LYUO3E6V.js';
7
7
  export { DataTable, DataTableBlock, MetricCard, PageHeader, StatGroup } from './chunk-ZCF2JJFA.js';
8
8
  export { Accordion, AvatarBlock, Banner, BlockImage, BlockLink, CTABanner, Columns, ContactForm, Container, FAQ, FONT_PAIRINGS, FeatureGrid, Footer, Gallery, Hero, ListBlock, LogoCloud, MediaText, Navbar, PricingTable, ProfileCard, RichTextBlock, SectionHeading, Spacer, Steps, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, VideoEmbed, applyFontVars, applyStoredTheme, applyThemeVars, clearFontVars, clearThemeVars, createThemeStore, fontPackages, getFontPairing, matchFontPairing, tid, toEmbedUrl, toHslTriplet } from './chunk-DLBUFHLY.js';
9
+ export { Callout } from './chunk-UJE32SST.js';
9
10
  export { Timeline } from './chunk-OVEQERPO.js';
10
11
  export { ActionMenu, AddContactsForm, AddContactsResults, ContactCard, DEFAULT_ADD_CONTACTS_LABELS, DEFAULT_CONTACT_CARD_LABELS, DEFAULT_CONTACT_OUTCOME_LABELS, DEFAULT_DM_ACCESS_REQUEST_BANNER_LABELS, DEFAULT_DM_GRANT_ACCESS_DIALOG_LABELS, DEFAULT_DM_INVITE_CHIP_LABELS, DEFAULT_DM_THREAD_FRAME_LABELS, DEFAULT_MAIL_FOLDER_TREE_LABELS, DEFAULT_RECIPIENT_PICKER_LABELS, DmAccessRequestBanner, DmGrantAccessDialogView, DmInviteAvatar, DmInviteChip, DmNewTabIcon, DmThreadFrame, DmThreadHeader, MAX_INVITE_EMAILS, MailFolderTree, MemberBulkActions, MemberListLoading, MemberMutedText, MemberNameCell, MemberRoleCell, RecipientPicker, RoleSelect, WorkspaceDeleteButton, buildMailFolderTree, contactToVCard, descendantFolderIds, downloadVCard, isInboxFolder, parseEmails, toAddContactsRow, toAddContactsRows, toggleMailFolder, vCardFilename } from './chunk-5HFPRI3W.js';
11
12
  import './chunk-NBV56SGU.js';
12
- export { DEFAULT_SHARE_CONTROL_LABELS, ShareControl } from './chunk-K4BGOPGG.js';
13
- import { DEFAULT_TAG_TABLE_LABELS, rowLinks, TagTableCell } from './chunk-ENDP7JER.js';
14
- export { DEFAULT_TAG_COLUMNS_EDITOR_LABELS, DEFAULT_TAG_TABLE_DOCX_LABELS, DEFAULT_TAG_TABLE_LABELS, DEFAULT_THREAD_FOLLOW_LABELS, DEFAULT_WORKSPACE_ACTIVITY_LABELS, DEFAULT_WORKSPACE_NOTIFICATION_MENU_LABELS, TAG_TABLE_DOCX_LANDSCAPE_AFTER, TagColumnsEditor, TagTable, TagTableCell, ThreadFollowButton, ThreadFollowMenuItem, WorkspaceActivityList, WorkspaceNotificationMenu, cellText, cellValue, fieldWrites, isGap, parseCell, rowLinks, tagTableDocumentXml, tagTableDocx, tagTableMarkdown, workspaceActivityHeadline, workspaceActivityTarget } from './chunk-ENDP7JER.js';
13
+ import { DEFAULT_TAG_TABLE_LABELS, rowLinks, TagTableCell } from './chunk-VW2C2AZL.js';
14
+ export { DEFAULT_TAG_COLUMNS_EDITOR_LABELS, DEFAULT_TAG_TABLE_DOCX_LABELS, DEFAULT_TAG_TABLE_LABELS, DEFAULT_THREAD_FOLLOW_LABELS, DEFAULT_WORKSPACE_ACTIVITY_LABELS, DEFAULT_WORKSPACE_NOTIFICATION_MENU_LABELS, TAG_TABLE_DOCX_LANDSCAPE_AFTER, TagColumnsEditor, TagTable, TagTableCell, ThreadFollowButton, ThreadFollowMenuItem, WorkspaceActivityList, WorkspaceNotificationMenu, cellText, cellValue, fieldWrites, isGap, parseCell, rowLinks, tagTableDocumentXml, tagTableDocx, tagTableMarkdown, workspaceActivityHeadline, workspaceActivityTarget } from './chunk-VW2C2AZL.js';
15
15
  export { MailDeliveryBadge, MailDeliveryList, MailDocumentPicker, MailGrid, MailMessagePreview, MailMessageView, NEEDS_CONNECTION, PlainMailBodyEditor, draftMailCompose, emptyMailCompose, hasCalendarPart, mailAddressLabel, parseMailRecipients, replyMailCompose } from './chunk-6HCJ3ZEU.js';
16
16
  import { DetailLoading, DetailBody, DetailSection, DetailFields, DetailField, DetailLinkList, DetailLinkItem, DetailEmpty } from './chunk-ZCOVDK2E.js';
17
17
  export { DEFAULT_DETAIL_PANEL_LABELS, DetailBody, DetailEmpty, DetailField, DetailFields, DetailLinkItem, DetailLinkList, DetailLoading, DetailPanel, DetailSection } from './chunk-ZCOVDK2E.js';
18
- export { DEFAULT_SEARCH_HIT_LABELS, SearchHit } from './chunk-A2YAC22G.js';
19
- export { TIMELINE_ZOOM, TimelineCalendar, TimelineGantt, TimelineZoomControl, dayKey, formatSpan, monthLabel, parseIso, utcDay } from './chunk-4EZVCGRL.js';
20
18
  import { groupDefinitions, compareDefinitions, minuteUtc, page, cell, documentXml, paragraph, docxPackage, TABLE_DOCUMENT_STYLES } from './chunk-QXMR5YHC.js';
21
19
  export { DEFINITIONS_LABEL, DEFINITION_BOOKMARK_PREFIX, compareDefinitions, compareTerms, definitionBookmark, definitionIdOfBookmark, definitionLabels, filterTermGroups, groupDefinitions, parseDefinition, termKey, toDefinition } from './chunk-QXMR5YHC.js';
20
+ export { DEFAULT_SEARCH_HIT_LABELS, SearchHit } from './chunk-A2YAC22G.js';
21
+ export { TIMELINE_ZOOM, TimelineCalendar, TimelineGantt, TimelineZoomControl, dayKey, formatSpan, monthLabel, parseIso, utcDay } from './chunk-4EZVCGRL.js';
22
22
  import './chunk-AF6RDAJF.js';
23
- export { Callout } from './chunk-UJE32SST.js';
24
- export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowRunStatus, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from './chunk-T2CVFK2I.js';
25
- import './chunk-RFXJYIDV.js';
23
+ export { DEFAULT_SHARE_CONTROL_LABELS, ShareControl } from './chunk-K4BGOPGG.js';
24
+ export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowRunStatus, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from './chunk-KLOSOT26.js';
25
+ import './chunk-P5ST47VY.js';
26
26
  import './chunk-4XJZ6AAY.js';
27
- export { Dot, ToneBadge } from './chunk-5LXQPP2K.js';
28
27
  export { EmptyState } from './chunk-P6GHJSLR.js';
29
- export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, SchemaForm, SendBackControl, TaskActivityTimeline, WorkflowRunner, activeStepId, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, isIncompleteSignal, layoutFromPlanSteps, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, useWorkflowView } from './chunk-2PNNCEPH.js';
30
- import './chunk-EVUEIBNU.js';
28
+ export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, SchemaForm, SendBackControl, TaskActivityTimeline, WorkflowRunner, activeStepId, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, isIncompleteSignal, layoutFromPlanSteps, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, useWorkflowView } from './chunk-54ANPPMV.js';
29
+ import './chunk-XD2M6LIG.js';
31
30
  import './chunk-6S5FLMWG.js';
31
+ import './chunk-RFXJYIDV.js';
32
+ export { Dot, ToneBadge } from './chunk-5LXQPP2K.js';
33
+ export { ActionLink } from './chunk-S7PSMMRG.js';
34
+ import './chunk-EVUEIBNU.js';
32
35
  import './chunk-NUNKSZKU.js';
33
36
  export { DEFAULT_FILTER_FIELDS, DEFAULT_FILTER_INPUT_LABELS, FilterInput } from './chunk-YU2KUMGE.js';
34
37
  import './chunk-N5YEF3LC.js';
35
- import './chunk-5Y7JRY7Y.js';
36
- export { ActionLink } from './chunk-S7PSMMRG.js';
37
- import './chunk-XD2M6LIG.js';
38
38
  export { AccountRecoveryDialog, AuthAlert, AuthConsent, AuthDivider, AuthField, AuthFieldBadge, AuthFooterLinks, AuthHeading, AuthHero, AuthInput, AuthLayout, AuthLink, AuthNote, AuthOfflineBadge, AuthSubmitButton, AuthTabs, DEFAULT_ACCOUNT_RECOVERY_DIALOG_LABELS, DEFAULT_AUTH_CONSENT_LABELS, DEFAULT_AUTH_FOOTER_LINKS_LABELS, DEFAULT_AUTH_OFFLINE_BADGE_LABELS, DEFAULT_RECOVERY_KEY_DIALOG_LABELS, DEFAULT_REVEALABLE_PASSWORD_INPUT_LABELS, DEFAULT_SSO_LOGIN_BUTTON_LABELS, RecoveryKeyDialog, RevealablePasswordInput, SsoLoginButton } from './chunk-SFXVNFES.js';
39
39
  export { DEFAULT_PASSWORD_STRENGTH_INPUT_LABELS, PasswordStrengthInput } from './chunk-VILAPTCB.js';
40
- import './chunk-TX2ZICS7.js';
41
40
  export { DEFAULT_TAB_HEADER_LABELS, TabHeader } from './chunk-4WWM3GQ5.js';
42
- export { AssistantToaster, BranchControls, ComposerAccessories, ComposerTools, ContextActionButton, ContextCheckRow, ContextPanelContent, ContextPanelFooter, ContextPanelTabs, ContextPickerList, ContextPickerRow, ContextSearchInput, ContextSelectList, ContextSelectRow, Conversation, ConversationBody, ConversationFilter, ConversationHeader, ConversationHeaderActions, ConversationHistoryPane, ConversationLoading, ConversationMain, ConversationRoot, ConversationSearchView, ConversationSettingsButton, DEFAULT_BRANCH_CONTROLS_LABELS, DEFAULT_CONVERSATION_LAYOUT_LABELS, DEFAULT_CONVERSATION_PARTS_LABELS, DEFAULT_CONVERSATION_SEARCH_LABELS, DEFAULT_DRAFTING_DOC_CHIP_LABELS, DEFAULT_LABEL_PIN_ROW_LABELS, DEFAULT_MODEL_PRICING_TIP_LABELS, DEFAULT_PENDING_ANSWER_BAR_LABELS, DEFAULT_PINNED_DOC_CHIP_LABELS, DEFAULT_SLASH_MENU_LABELS, DEFAULT_THREAD_MAP_LABELS, DraftingDocChip, LabelPinRow, ModelAutoIcon, ModelConfigureButton, ModelDot, ModelMenuDivider, ModelMenuMessage, ModelOption, ModelOptionLabel, ModelPickerPopover, ModelPickerTrigger, ModelPricingTip, ModelTierIcon, ModelTierOption, ModelTriggerContent, NewChatButton, NewPaChatButton, PaModeBadge, PendingAnswerBar, PinnedDocChip, ProvisionalTranscriptLine, SlashMenu, ThreadMap, ThreadMapDiagram, ThreadMapError, ThreadMapLoading, TranscriptLine, flashMessage, getParticipantTints, hasMessageBody, isLongPastedText, transcriptRuns, useDismissibleCard, useLongPaste, useRecipientDraft } from './chunk-UUXKB3WQ.js';
41
+ import './chunk-TX2ZICS7.js';
42
+ export { AssistantToaster, BranchControls, ComposerAccessories, ComposerTools, ContextActionButton, ContextCheckRow, ContextPanelContent, ContextPanelFooter, ContextPanelTabs, ContextPickerList, ContextPickerRow, ContextSearchInput, ContextSelectList, ContextSelectRow, Conversation, ConversationBody, ConversationFilter, ConversationHeader, ConversationHeaderActions, ConversationHistoryPane, ConversationLoading, ConversationMain, ConversationRoot, ConversationSearchView, ConversationSettingsButton, DEFAULT_BRANCH_CONTROLS_LABELS, DEFAULT_CONVERSATION_LAYOUT_LABELS, DEFAULT_CONVERSATION_PARTS_LABELS, DEFAULT_CONVERSATION_SEARCH_LABELS, DEFAULT_DRAFTING_DOC_CHIP_LABELS, DEFAULT_LABEL_PIN_ROW_LABELS, DEFAULT_MODEL_PRICING_TIP_LABELS, DEFAULT_PENDING_ANSWER_BAR_LABELS, DEFAULT_PINNED_DOC_CHIP_LABELS, DEFAULT_SLASH_MENU_LABELS, DEFAULT_THREAD_MAP_LABELS, DraftingDocChip, LabelPinRow, ModelAutoIcon, ModelConfigureButton, ModelDot, ModelMenuDivider, ModelMenuMessage, ModelOption, ModelOptionLabel, ModelPickerPopover, ModelPickerTrigger, ModelPricingTip, ModelTierIcon, ModelTierOption, ModelTriggerContent, NewChatButton, NewPaChatButton, PaModeBadge, PendingAnswerBar, PinnedDocChip, ProvisionalTranscriptLine, SlashMenu, ThreadMap, ThreadMapDiagram, ThreadMapError, ThreadMapLoading, TranscriptLine, flashMessage, getParticipantTints, hasMessageBody, isLongPastedText, transcriptRuns, useDismissibleCard, useLongPaste, useRecipientDraft } from './chunk-ZCHSJUCI.js';
43
43
  export { DEFAULT_DOCK_WIDTH, Toaster } from './chunk-OKERRHLH.js';
44
- export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, DEFAULT_WORKFLOW_STEP_CHIP_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageAuthor, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, WorkflowStepChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement } from './chunk-PUCY3UXN.js';
44
+ export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, DEFAULT_WORKFLOW_STEP_CHIP_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageAuthor, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, WorkflowStepChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement } from './chunk-CXLVI3SB.js';
45
45
  export { BlocksTooltipProvider, DEFAULT_OVERLAY_ZONE_ID, DEFAULT_PAGE_CONTAINER_PADDING, DEFAULT_SIDEBAR_TOGGLE_BUTTON_LABELS, PageContainer, SHELL_BOTTOM_INSET_VAR, Shell, SidebarToggleButton, ToolButton, useDrawerBehavior, useOverlayZoneId, useShellBottomInset } from './chunk-7XF5SFJ2.js';
46
- export { DEFAULT_ASSIGNEE_WORDING, DEFAULT_STEP_DOCUMENT_LABELS, DEFAULT_STEP_KIND_LABELS, DEFAULT_STEP_RECORD_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STEP_KIND_ICONS, StepDocumentButton, StepDocumentCards, StepRecord, WORKFLOW_STEP_KINDS, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepDocuments, stepFields, stepKindOf, stepLevels, stepPhase, stepStatesFromActivity, upstreamSteps, useMentionAutocomplete, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from './chunk-2DFDFOM7.js';
46
+ export { savedDocumentIdFor, takeOpenDocumentForTurn, useOpenDocumentId, useRegisterOpenDocument } from './chunk-GYCQ3FNL.js';
47
+ export { DEFAULT_ASSIGNEE_WORDING, DEFAULT_STEP_DOCUMENT_LABELS, DEFAULT_STEP_KIND_LABELS, DEFAULT_STEP_RECORD_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STEP_KIND_ICONS, StepDocumentButton, StepDocumentCards, StepRecord, WORKFLOW_STEP_KINDS, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepDocuments, stepFields, stepKindOf, stepLevels, stepPhase, stepStatesFromActivity, upstreamSteps, useMentionAutocomplete, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from './chunk-7HAM7Y5U.js';
48
+ export { DEFAULT_MENTION_LABELS, MENTION_HREF_PREFIX, MentionChip, MentionMenu, extractMentions, filterMentionCandidates, findMentionQuery, insertMention, linkMentions, mentionFromHref, toMessageMentions, useListKeyNav } from './chunk-AA3PT6KR.js';
47
49
  export { TONES, isTone } from './chunk-AUS3KBHJ.js';
48
50
  export { BREAKPOINT_QUERIES, useIsNarrow, useIsPhone, useIsTouchScreen, useMediaQuery } from './chunk-SLSBJRWW.js';
49
- export { DEFAULT_MENTION_LABELS, MENTION_HREF_PREFIX, MentionChip, MentionMenu, extractMentions, filterMentionCandidates, findMentionQuery, insertMention, linkMentions, mentionFromHref, toMessageMentions, useListKeyNav } from './chunk-AA3PT6KR.js';
50
51
  import './chunk-Z3AZ7Q5X.js';
51
52
  import './chunk-NPLYHR2E.js';
52
53
  import './chunk-7F6CBP3Z.js';