@arbidocs/blocks 0.4.81 → 0.4.83

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 (55) hide show
  1. package/dist/agents/index.cjs +278 -278
  2. package/dist/agents/index.js +3 -3
  3. package/dist/agents/workflows/StepBarFrame.d.ts +12 -4
  4. package/dist/{chunk-THCFZKTM.js → chunk-CONIA2ZA.js} +8 -8
  5. package/dist/chunk-CONIA2ZA.js.map +1 -0
  6. package/dist/{chunk-SWSVPQNB.js → chunk-RSKSXEPW.js} +199 -18
  7. package/dist/chunk-RSKSXEPW.js.map +1 -0
  8. package/dist/{chunk-I56ORHPY.js → chunk-RX35SMPR.js} +5 -5
  9. package/dist/{chunk-I56ORHPY.js.map → chunk-RX35SMPR.js.map} +1 -1
  10. package/dist/{chunk-BX7JWZWE.cjs → chunk-RYYYHPFU.cjs} +8 -8
  11. package/dist/chunk-RYYYHPFU.cjs.map +1 -0
  12. package/dist/{chunk-F5WIETZY.cjs → chunk-XA5S4776.cjs} +44 -44
  13. package/dist/chunk-XA5S4776.cjs.map +1 -0
  14. package/dist/{chunk-UA2AMDR6.cjs → chunk-ZQYE7J3J.cjs} +201 -13
  15. package/dist/chunk-ZQYE7J3J.cjs.map +1 -0
  16. package/dist/connect/index.cjs +49 -28
  17. package/dist/connect/index.cjs.map +1 -1
  18. package/dist/connect/index.js +34 -13
  19. package/dist/connect/index.js.map +1 -1
  20. package/dist/connection/ConnectedTagMatrix.d.ts +6 -3
  21. package/dist/connection/ConnectedWorkflowBuilder.d.ts +9 -2
  22. package/dist/facts/index.cjs +1 -1
  23. package/dist/facts/index.js +1 -1
  24. package/dist/files/index.cjs +20 -1
  25. package/dist/files/index.cjs.map +1 -1
  26. package/dist/files/index.js +20 -2
  27. package/dist/files/index.js.map +1 -1
  28. package/dist/files/views/TagFormParts.d.ts +8 -0
  29. package/dist/files/views/index.d.ts +1 -1
  30. package/dist/home/index.cjs +1 -1
  31. package/dist/home/index.js +1 -1
  32. package/dist/index.cjs +696 -398
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +279 -8
  35. package/dist/index.js.map +1 -1
  36. package/dist/shell/index.cjs +1 -1
  37. package/dist/shell/index.js +1 -1
  38. package/dist/studio/index.cjs +1 -1
  39. package/dist/studio/index.js +1 -1
  40. package/dist/tags/TagDetail.d.ts +38 -0
  41. package/dist/tags/TagMatrix.d.ts +31 -8
  42. package/dist/tags/TagsNav.d.ts +44 -0
  43. package/dist/tags/index.d.ts +9 -3
  44. package/dist/tags/tagMatrixDocx.d.ts +45 -0
  45. package/dist/tags/tagMatrixModel.d.ts +10 -6
  46. package/dist/workflow-canvas/index.cjs +81 -63
  47. package/dist/workflow-canvas/index.cjs.map +1 -1
  48. package/dist/workflow-canvas/index.js +39 -21
  49. package/dist/workflow-canvas/index.js.map +1 -1
  50. package/package.json +4 -4
  51. package/dist/chunk-BX7JWZWE.cjs.map +0 -1
  52. package/dist/chunk-F5WIETZY.cjs.map +0 -1
  53. package/dist/chunk-SWSVPQNB.js.map +0 -1
  54. package/dist/chunk-THCFZKTM.js.map +0 -1
  55. package/dist/chunk-UA2AMDR6.cjs.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toolbar.tsx","../src/components/EntityIdentityBar.tsx","../src/components/EntityTooltip.tsx","../src/components/AskBar.tsx"],"names":["jsxs","cn","jsx","Input","useState","Search"],"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,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,oE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;AAAA,gBACL,QAAA,EAAU,CAAC,IAAA,CAAK,IAAA,EAAK;AAAA,gBACrB,SAAA,EAAU,uCAAA;AAAA,gBACV,aAAA,EAAa,MAAA,IAAU,CAAA,EAAG,MAAM,CAAA,OAAA,CAAA;AAAA,gBAEhC,QAAA,EAAA;AAAA,kCAAAE,GAAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,UAAA,EAAW,CAAA;AAAA,kBAC9B;AAAA;AAAA;AAAA;AACH;AAAA;AAAA;AACF,KAAA,EACF,CAAA;AAAA,IACC,WAAA,CAAY,MAAA,GAAS,CAAA,oBACpBA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wBAAA,EACZ,QAAA,EAAA,WAAA,CAAY,GAAA,CAAI,CAAC,CAAA,qBAChBA,GAAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QAEC,IAAA,EAAK,QAAA;AAAA,QACL,SAAS,MAAM;AACb,UAAA,OAAA,CAAQ,CAAC,CAAA;AACT,UAAA,QAAA,CAAS,SAAS,KAAA,EAAM;AAAA,QAC1B,CAAA;AAAA,QACA,SAAA,EAAU,kKAAA;AAAA,QACV,aAAA,EAAa,MAAA,IAAU,CAAA,EAAG,MAAM,CAAA,WAAA,CAAA;AAAA,QAE/B,QAAA,EAAA;AAAA,OAAA;AAAA,MATI;AAAA,KAWR,CAAA,EACH;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"index.js","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"]}
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"],"names":["jsxs","cn","jsx","Input","useState","Search"],"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,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,oEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,aAAA,EAAa,MAAA;AAAA,MAEb,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,0CAAA,EACZ,QAAA,EAAA;AAAA,UAAA,QAAA,oBACC,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0BAAA,EACb,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,MAAA,EAAA,EAAO,WAAU,6FAAA,EAA8F,CAAA;AAAA,4BAChH,GAAA;AAAA,cAAC,KAAA;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,EA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,YAEvC,QAAA,EAAA;AAAA,cAAA,KAAA,CAAM,wBAAQC,GAAAA,CAAC,UAAK,SAAA,EAAU,yBAAA,EAA2B,gBAAM,IAAA,EAAK,CAAA;AAAA,8BACrEA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,QAAA,EAAU,gBAAM,KAAA,EAAM,CAAA;AAAA,8BACtCA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,gBAAe,aAAA,EAAa,CAAA,EAAG,MAAM,CAAA,OAAA,EAAU,MAAM,EAAE,CAAA,MAAA,CAAA,EACpE,QAAA,EAAA,KAAA,CAAM,KAAA,CAAM,KAAK,CAAA,EACpB;AAAA;AAAA;AAAA,SACF;AAAA,QACC,KAAA,CAAM,MAAA,mBACLA,GAAAA,CAAC,IAAA,EAAA,EAAG,WAAU,QAAA,EAAU,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,KAAS,GAAA,CAAI,MAAM,EAAA,EAAI,IAAA,EAAM,CAAC,CAAC,CAAA,EAAE,CAAA,mBAEpEA,GAAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,yCAAA,EAA2C,QAAA,EAAA,CAAA,CAAE,KAAA,EAAM;AAAA,OAAA,EAAA,EApBtD,MAAM,EAsBpB,CAAA;AAAA,IAEJ,CAAC,CAAA;AAAA,IACA,QAAQ,MAAA,CAAO,KAAA,CAAM,CAAC,CAAA,KAAM,CAAC,YAAY,CAAA,CAAE,KAAA,EAAO,IAAI,CAAA,CAAE,MAAM,qBAC7DA,GAAAA,CAAC,OAAE,SAAA,EAAU,oCAAA,EAAsC,YAAE,OAAA,EAAQ;AAAA,GAAA,EAEjE,CAAA;AAEJ","file":"index.js","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 own fields (aliases, role, status, …) editable in place, then everything\n * across the workspace that carries it — the documents (with the value or note the tag has on\n * each, and how many passages back it), the facts and the threads. The data is one row of the tag matrix\n * (`TagMatrixRowData`); every write goes back through the host.\n */\n\nimport type { ReactNode } from 'react'\nimport { FileText, Lightbulb, Loader2, MessagesSquare } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport {\n DEFAULT_TAG_MATRIX_LABELS,\n TagMatrixCell,\n type TagMatrixLabels,\n type TagMatrixProps,\n} from './TagMatrix'\nimport type { TagMatrixRowData } from './tagMatrixModel'\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 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 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 TagMatrixProps,\n 'onChangeValue' | 'onOpenDocument' | 'onOpenFact' | 'onOpenThread' | 'people'\n> {\n /** The tag's matrix row (its fields, values, documents and facts). */\n row: TagMatrixRowData | undefined\n isLoading?: boolean\n labels?: Partial<TagDetailLabels>\n /** Labels of the field inputs (the empty choice). */\n fieldLabels?: Partial<TagMatrixLabels>\n className?: string\n testId?: string\n}\n\nfunction Section({\n title,\n count,\n shown,\n l,\n children,\n testId,\n}: {\n title: string\n count?: number\n shown?: number\n l: TagDetailLabels\n children: ReactNode\n testId: string\n}) {\n return (\n <section className=\"flex flex-col gap-2\" data-testid={testId}>\n <div className=\"flex items-baseline gap-2\">\n <h2 className=\"text-sm font-semibold\">{title}</h2>\n {count !== undefined && (\n <span className=\"text-sm tabular-nums text-muted-foreground\">{count}</span>\n )}\n {count !== undefined && shown !== undefined && shown < count && (\n <span className=\"ml-auto text-xs text-muted-foreground\">\n {l.showing.replace('{shown}', String(shown)).replace('{count}', String(count))}\n </span>\n )}\n </div>\n {children}\n </section>\n )\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\nconst LIST = 'divide-y divide-border overflow-hidden rounded-lg border border-border'\nconst ITEM =\n 'flex w-full items-start gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-muted/50 disabled:hover:bg-transparent'\n\nexport function TagDetail({\n row,\n isLoading,\n people,\n onChangeValue,\n onOpenDocument,\n onOpenFact,\n onOpenThread,\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_MATRIX_LABELS, ...fieldLabels }\n if (isLoading || !row)\n return (\n <p className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin\" /> {l.loading}\n </p>\n )\n const fields = row.tag.fields ?? []\n const docs = row.docs ?? []\n const facts = row.facts ?? []\n const threads = row.threads ?? []\n const passages = (n: number) => (n === 1 ? l.passage : l.passages.replace('{count}', String(n)))\n\n return (\n <div className={cn('flex flex-col gap-6', className)} data-testid={testId}>\n {fields.length > 0 && (\n <Section title={l.fields} l={l} testId={`${testId}-fields`}>\n <dl className=\"grid grid-cols-1 gap-x-4 gap-y-2 sm:grid-cols-[minmax(8rem,auto)_1fr]\">\n {fields.map((field) => (\n <div key={field.id} className=\"contents\">\n <dt className=\"pt-1.5 text-sm text-muted-foreground\">{field.name}</dt>\n <dd className=\"min-w-0\">\n <TagMatrixCell\n row={row}\n column={field}\n people={people}\n onChange={onChangeValue}\n l={cellLabels}\n testId={`${testId}-field-${field.id}`}\n />\n </dd>\n </div>\n ))}\n </dl>\n </Section>\n )}\n\n <Section\n title={l.documents}\n count={row.doc_count}\n shown={docs.length}\n l={l}\n testId={`${testId}-documents`}\n >\n {docs.length ? (\n <ul className={LIST}>\n {docs.map((d) => (\n <li key={d.doc_ext_id}>\n <button\n type=\"button\"\n className={ITEM}\n disabled={!onOpenDocument}\n onClick={() => onOpenDocument?.(d.doc_ext_id)}\n data-testid={`${testId}-doc-${d.doc_ext_id}`}\n >\n <FileText className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium\">{d.file_name}</span>\n {d.note && (\n <span className=\"line-clamp-2 whitespace-pre-line text-muted-foreground\">\n {d.note}\n </span>\n )}\n </span>\n {d.citations_count > 0 && (\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {passages(d.citations_count)}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.noDocuments}</p>\n )}\n </Section>\n\n <Section\n title={l.facts}\n count={row.fact_count}\n shown={facts.length}\n l={l}\n testId={`${testId}-facts`}\n >\n {facts.length ? (\n <ul className={LIST}>\n {facts.map((f) => (\n <li key={f.fact_ext_id}>\n <button\n type=\"button\"\n className={ITEM}\n disabled={!onOpenFact}\n onClick={() => onOpenFact?.(f.fact_ext_id)}\n data-testid={`${testId}-fact-${f.fact_ext_id}`}\n >\n <Lightbulb className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <span className=\"line-clamp-3 min-w-0 flex-1\">{f.text}</span>\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.noFacts}</p>\n )}\n </Section>\n\n <Section\n title={l.threads}\n count={row.thread_count}\n shown={threads.length}\n l={l}\n testId={`${testId}-threads`}\n >\n {threads.length ? (\n <ul className={LIST}>\n {threads.map((t) => (\n <li key={t.conversation_ext_id}>\n <button\n type=\"button\"\n className={ITEM}\n disabled={!onOpenThread}\n onClick={() => onOpenThread?.(t.conversation_ext_id)}\n data-testid={`${testId}-thread-${t.conversation_ext_id}`}\n >\n <MessagesSquare className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <span className=\"min-w-0 flex-1 truncate font-medium\">\n {t.title || l.untitledThread}\n </span>\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {l.threadUpdated.replace('{date}', formatDay(t.updated_at))}\n </span>\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.noThreads}</p>\n )}\n </Section>\n </div>\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 (an issue list's issues) under their parent. A group heading selects\n * the whole kind; a tag selects that tag. Data-free: the host passes the groups.\n */\n\nimport { useState, type ReactNode } from 'react'\nimport { 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. an issue list's issues). */\n children?: TagsNavItem[]\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}\n\nexport const DEFAULT_TAGS_NAV_LABELS: TagsNavLabels = {\n filter: 'Find a tag…',\n clearFilter: 'Clear',\n empty: 'None yet',\n noMatch: 'No match',\n}\n\nexport interface TagsNavProps {\n groups: TagsNavGroup[]\n selected: TagsNavSelection | null\n onSelect: (selection: TagsNavSelection) => void\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 items whose name (or a nested item's name) contains `text`, nesting kept. */\nfunction filterItems(items: TagsNavItem[], text: string): TagsNavItem[] {\n if (!text) return items\n const needle = text.toLowerCase()\n return items.flatMap((item) => {\n const children = filterItems(item.children ?? [], text)\n return item.name.toLowerCase().includes(needle) || children.length\n ? [{ ...item, children }]\n : []\n })\n}\n\nexport function TagsNav({\n groups,\n selected,\n onSelect,\n labels,\n className,\n testId = 'tags-nav',\n}: TagsNavProps) {\n const l = { ...DEFAULT_TAGS_NAV_LABELS, ...labels }\n const [filter, setFilter] = useState('')\n const text = filter.trim()\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 <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 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 {groups.map((group) => {\n const items = filterItems(group.items, text)\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 && groups.every((g) => !filterItems(g.items, text).length) && (\n <p className=\"px-2 text-sm text-muted-foreground\">{l.noMatch}</p>\n )}\n </nav>\n )\n}\n"]}
@@ -5,11 +5,11 @@ var chunkNYBIKDWI_cjs = require('../chunk-NYBIKDWI.cjs');
5
5
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
6
6
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
7
7
  require('../chunk-OB5F4577.cjs');
8
- require('../chunk-C54XEN5T.cjs');
9
8
  var chunkXKSFJYOD_cjs = require('../chunk-XKSFJYOD.cjs');
10
9
  var chunkVGOFFCMT_cjs = require('../chunk-VGOFFCMT.cjs');
11
10
  var chunkFX3K6LNZ_cjs = require('../chunk-FX3K6LNZ.cjs');
12
11
  require('../chunk-PPCATBOY.cjs');
12
+ require('../chunk-C54XEN5T.cjs');
13
13
  require('../chunk-MHVNT4J3.cjs');
14
14
  require('../chunk-DES3K4SD.cjs');
15
15
 
@@ -3,11 +3,11 @@ export { ActionCluster, AskField, AskRow, AskTrigger, DEFAULT_ASK_FIELD_LABELS,
3
3
  export { DEFAULT_TAB_HEADER_LABELS, TabHeader } from '../chunk-4WWM3GQ5.js';
4
4
  export { DEFAULT_FILTER_FIELDS, DEFAULT_FILTER_INPUT_LABELS, FilterInput } from '../chunk-YU2KUMGE.js';
5
5
  import '../chunk-S7PSMMRG.js';
6
- import '../chunk-76JDDMSP.js';
7
6
  export { DEFAULT_DOCK_WIDTH, Toaster } from '../chunk-BV7FEMSI.js';
8
7
  export { 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-KZJAG7T3.js';
9
8
  export { BREAKPOINT_QUERIES, useIsNarrow, useIsPhone, useIsTouchScreen, useMediaQuery } from '../chunk-SLSBJRWW.js';
10
9
  import '../chunk-NPLYHR2E.js';
10
+ import '../chunk-76JDDMSP.js';
11
11
  import '../chunk-7F6CBP3Z.js';
12
12
  import '../chunk-VUNV25KB.js';
13
13
  //# sourceMappingURL=index.js.map
@@ -10,12 +10,12 @@ require('../chunk-VPPX5XUF.cjs');
10
10
  var chunkPCB2BPN3_cjs = require('../chunk-PCB2BPN3.cjs');
11
11
  var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
12
12
  require('../chunk-OB5F4577.cjs');
13
- var chunkC54XEN5T_cjs = require('../chunk-C54XEN5T.cjs');
14
13
  require('../chunk-MP6FK43E.cjs');
15
14
  require('../chunk-VGOFFCMT.cjs');
16
15
  require('../chunk-B4SRYJLM.cjs');
17
16
  require('../chunk-7UTB4PHM.cjs');
18
17
  require('../chunk-PPCATBOY.cjs');
18
+ var chunkC54XEN5T_cjs = require('../chunk-C54XEN5T.cjs');
19
19
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
20
20
  require('../chunk-MHVNT4J3.cjs');
21
21
  require('../chunk-DES3K4SD.cjs');
@@ -9,12 +9,12 @@ import '../chunk-4EZVCGRL.js';
9
9
  import { Callout } from '../chunk-UJE32SST.js';
10
10
  import { EmptyState } from '../chunk-P6GHJSLR.js';
11
11
  import '../chunk-S7PSMMRG.js';
12
- import { useBlocksEnvironment } from '../chunk-76JDDMSP.js';
13
12
  import '../chunk-EWSEQEPL.js';
14
13
  import '../chunk-KZJAG7T3.js';
15
14
  import '../chunk-HOXKR26S.js';
16
15
  import '../chunk-AA3PT6KR.js';
17
16
  import '../chunk-NPLYHR2E.js';
17
+ import { useBlocksEnvironment } from '../chunk-76JDDMSP.js';
18
18
  import { formatCount } from '../chunk-OXF2IFXG.js';
19
19
  import '../chunk-7F6CBP3Z.js';
20
20
  import '../chunk-VUNV25KB.js';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * One tag in full: its own fields (aliases, role, status, …) editable in place, then everything
3
+ * across the workspace that carries it — the documents (with the value or note the tag has on
4
+ * each, and how many passages back it), the facts and the threads. The data is one row of the tag matrix
5
+ * (`TagMatrixRowData`); every write goes back through the host.
6
+ */
7
+ import { type TagMatrixLabels, type TagMatrixProps } from './TagMatrix';
8
+ import type { TagMatrixRowData } from './tagMatrixModel';
9
+ export interface TagDetailLabels {
10
+ fields: string;
11
+ documents: string;
12
+ facts: string;
13
+ threads: string;
14
+ /** `{shown}` of `{count}` listed. */
15
+ showing: string;
16
+ noDocuments: string;
17
+ noFacts: string;
18
+ noThreads: string;
19
+ untitledThread: string;
20
+ /** When a thread was last active: `{date}`. */
21
+ threadUpdated: string;
22
+ /** `{count}` passages cited. */
23
+ passages: string;
24
+ passage: string;
25
+ loading: string;
26
+ }
27
+ export declare const DEFAULT_TAG_DETAIL_LABELS: TagDetailLabels;
28
+ export interface TagDetailProps extends Pick<TagMatrixProps, 'onChangeValue' | 'onOpenDocument' | 'onOpenFact' | 'onOpenThread' | 'people'> {
29
+ /** The tag's matrix row (its fields, values, documents and facts). */
30
+ row: TagMatrixRowData | undefined;
31
+ isLoading?: boolean;
32
+ labels?: Partial<TagDetailLabels>;
33
+ /** Labels of the field inputs (the empty choice). */
34
+ fieldLabels?: Partial<TagMatrixLabels>;
35
+ className?: string;
36
+ testId?: string;
37
+ }
38
+ export declare function TagDetail({ row, isLoading, people, onChangeValue, onOpenDocument, onOpenFact, onOpenThread, labels, fieldLabels, className, testId, }: TagDetailProps): import("react").JSX.Element;
@@ -1,12 +1,13 @@
1
1
  /**
2
- * A label's children as a matrix: one row per child label, a column per field they share,
3
- * editable in place by type (text, number, date, checkbox, choice, person), and the evidence behind
4
- * each row (its linked documents and facts, with counts). Rows with no evidence are marked as
5
- * gaps. A row can be added (a new child label), and the matrix exported as a document snapshot.
2
+ * A label's children (or every tag of a kind: every person, every issue) as a matrix: one row per
3
+ * tag, a column per field they share, editable in place by type (text, number, date, checkbox,
4
+ * choice, person), and the evidence behind each row (its linked documents, facts and threads, with
5
+ * counts). Rows with no evidence are marked as gaps. A row can be added, and the matrix exported as
6
+ * a Word document snapshot (filed in the workspace) or downloaded.
6
7
  * The data and every write come from the host (`ConnectedTagMatrix` binds them to ARBI).
7
8
  */
8
9
  import { type ReactNode } from 'react';
9
- import { type TagMatrixData } from './tagMatrixModel';
10
+ import { type TagMatrixData, type TagMatrixField, type TagMatrixRowData } from './tagMatrixModel';
10
11
  export interface TagMatrixLabels {
11
12
  row: string;
12
13
  evidence: string;
@@ -14,9 +15,14 @@ export interface TagMatrixLabels {
14
15
  documents: string;
15
16
  /** `{count}` facts linked. */
16
17
  facts: string;
17
- /** One document, one fact. */
18
+ /** `{count}` threads linked. */
19
+ threads: string;
20
+ /** One document, one fact, one thread. */
18
21
  document: string;
19
22
  fact: string;
23
+ thread: string;
24
+ /** A thread without a title. */
25
+ untitledThread: string;
20
26
  /** `{count}` more links than shown. */
21
27
  more: string;
22
28
  gap: string;
@@ -28,6 +34,7 @@ export interface TagMatrixLabels {
28
34
  add: string;
29
35
  export: string;
30
36
  exporting: string;
37
+ download: string;
31
38
  empty: string;
32
39
  loading: string;
33
40
  noColumns: string;
@@ -46,10 +53,14 @@ export interface TagMatrixProps {
46
53
  onOpenDocument?: (documentId: string) => void;
47
54
  /** Open a linked fact. */
48
55
  onOpenFact?: (factId: string) => void;
56
+ /** Open a linked thread (conversation). */
57
+ onOpenThread?: (conversationId: string) => void;
49
58
  /** Open a row's label (all its evidence). */
50
59
  onOpenRow?: (tagId: string) => void;
51
- /** Export the matrix as it stands. Absent: no export button. */
60
+ /** Export the matrix as it stands (filed as a document). Absent: no export button. */
52
61
  onExport?: () => void | Promise<unknown>;
62
+ /** Download the matrix as it stands as a file. Absent: no download button. */
63
+ onDownload?: () => void | Promise<unknown>;
53
64
  /** Who a person column offers. */
54
65
  people?: ReadonlyArray<{
55
66
  value: string;
@@ -61,4 +72,16 @@ export interface TagMatrixProps {
61
72
  className?: string;
62
73
  testId?: string;
63
74
  }
64
- export declare function TagMatrix({ matrix, isLoading, onChangeValue, onAddRow, onOpenDocument, onOpenFact, onOpenRow, onExport, people, actions, labels, className, testId, }: TagMatrixProps): import("react").JSX.Element;
75
+ /**
76
+ * One editable field value of a tag, by its type: committed on blur or Enter (a checkbox and a
77
+ * choice at once). A matrix cell, and a field of a single tag's form (`TagFields`).
78
+ */
79
+ export declare function TagMatrixCell({ row, column, people, onChange, l, testId, }: {
80
+ row: TagMatrixRowData;
81
+ column: TagMatrixField;
82
+ people?: TagMatrixProps['people'];
83
+ onChange?: TagMatrixProps['onChangeValue'];
84
+ l: TagMatrixLabels;
85
+ testId: string;
86
+ }): import("react").JSX.Element;
87
+ export declare function TagMatrix({ matrix, isLoading, onChangeValue, onAddRow, onOpenDocument, onOpenFact, onOpenThread, onOpenRow, onExport, onDownload, people, actions, labels, className, testId, }: TagMatrixProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The side navigation of a Tags page: the workspace's tags grouped by kind (labels, annotations,
3
+ * issues, people, organisations, searches), each group with its count, each tag with how much
4
+ * carries it, and nested tags (an issue list's issues) under their parent. A group heading selects
5
+ * the whole kind; a tag selects that tag. Data-free: the host passes the groups.
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ export interface TagsNavItem {
9
+ id: string;
10
+ name: string;
11
+ /** How many documents and facts carry it. */
12
+ count?: number;
13
+ /** A swatch colour (any CSS colour). */
14
+ color?: string;
15
+ /** Nested tags (e.g. an issue list's issues). */
16
+ children?: TagsNavItem[];
17
+ }
18
+ export interface TagsNavGroup {
19
+ id: string;
20
+ label: string;
21
+ icon?: ReactNode;
22
+ items: TagsNavItem[];
23
+ }
24
+ /** What is selected: a whole group, or one tag of it. */
25
+ export type TagsNavSelection = {
26
+ groupId: string;
27
+ itemId?: string;
28
+ };
29
+ export interface TagsNavLabels {
30
+ filter: string;
31
+ clearFilter: string;
32
+ empty: string;
33
+ noMatch: string;
34
+ }
35
+ export declare const DEFAULT_TAGS_NAV_LABELS: TagsNavLabels;
36
+ export interface TagsNavProps {
37
+ groups: TagsNavGroup[];
38
+ selected: TagsNavSelection | null;
39
+ onSelect: (selection: TagsNavSelection) => void;
40
+ labels?: Partial<TagsNavLabels>;
41
+ className?: string;
42
+ testId?: string;
43
+ }
44
+ export declare function TagsNav({ groups, selected, onSelect, labels, className, testId, }: TagsNavProps): import("react").JSX.Element;
@@ -1,3 +1,9 @@
1
- /** A label's children as an editable matrix with their evidence (`TagMatrix`). */
2
- export { TagMatrix, DEFAULT_TAG_MATRIX_LABELS, type TagMatrixProps, type TagMatrixLabels, } from './TagMatrix';
3
- export { tagMatrixColumns, tagMatrixMarkdown, cellValue, cellText, parseCell, isGap, type TagMatrixData, type TagMatrixRowData, type TagMatrixField, type TagMatrixFieldType, type TagMatrixMarkdownOptions, } from './tagMatrixModel';
1
+ /**
2
+ * Tags: a set of tags as an editable matrix with their evidence (`TagMatrix`), one tag in full
3
+ * (`TagDetail`), and the kind-grouped navigation of a Tags page (`TagsNav`).
4
+ */
5
+ export { TagMatrix, TagMatrixCell, DEFAULT_TAG_MATRIX_LABELS, type TagMatrixProps, type TagMatrixLabels, } from './TagMatrix';
6
+ export { TagDetail, DEFAULT_TAG_DETAIL_LABELS, type TagDetailProps, type TagDetailLabels, } from './TagDetail';
7
+ export { TagsNav, DEFAULT_TAGS_NAV_LABELS, type TagsNavProps, type TagsNavLabels, type TagsNavGroup, type TagsNavItem, type TagsNavSelection, } from './TagsNav';
8
+ export { tagMatrixColumns, tagMatrixMarkdown, cellValue, rowFieldId, cellText, parseCell, isGap, type TagMatrixData, type TagMatrixRowData, type TagMatrixField, type TagMatrixFieldType, type TagMatrixMarkdownOptions, } from './tagMatrixModel';
9
+ export { tagMatrixDocx, tagMatrixDocumentXml, DEFAULT_TAG_MATRIX_DOCX_LABELS, TAG_MATRIX_DOCX_LANDSCAPE_AFTER, type TagMatrixDocxLabels, type TagMatrixDocxOptions, } from './tagMatrixDocx';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The tag matrix as a Word document: a title, when the snapshot was taken, then one table with a
3
+ * row per item, a column per field, the evidence behind it (linked document names and fact
4
+ * excerpts) and its gaps. Written straight as WordprocessingML and zipped with `fflate` (already a
5
+ * dependency, and what `docx/export.ts` uses), so the result opens in the native Word editor and
6
+ * in Word without pulling the editor engine into the tags module.
7
+ */
8
+ import { type TagMatrixData } from './tagMatrixModel';
9
+ export declare const DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
10
+ /** More table columns than this (item, fields, evidence, gaps) turn the page to landscape. */
11
+ export declare const TAG_MATRIX_DOCX_LANDSCAPE_AFTER = 6;
12
+ export interface TagMatrixDocxLabels {
13
+ /** The row column's heading. */
14
+ row: string;
15
+ evidence: string;
16
+ gaps: string;
17
+ /** `{at}` is the snapshot time, `YYYY-MM-DD HH:MM UTC`. */
18
+ takenAt: string;
19
+ /** A row with no linked document, fact or thread. */
20
+ noEvidence: string;
21
+ /** `{fields}`: the row's empty fields. */
22
+ missing: string;
23
+ /** `{count}` more links than listed. */
24
+ more: string;
25
+ document: string;
26
+ documents: string;
27
+ fact: string;
28
+ facts: string;
29
+ thread: string;
30
+ threads: string;
31
+ untitledThread: string;
32
+ empty: string;
33
+ }
34
+ export declare const DEFAULT_TAG_MATRIX_DOCX_LABELS: TagMatrixDocxLabels;
35
+ export interface TagMatrixDocxOptions {
36
+ title: string;
37
+ nameOf?: (id: string) => string | undefined;
38
+ /** When the snapshot was taken (ISO); default now. */
39
+ at?: string;
40
+ labels?: Partial<TagMatrixDocxLabels>;
41
+ }
42
+ /** `word/document.xml` for the matrix (exposed for tests and for hosts that assemble their own package). */
43
+ export declare function tagMatrixDocumentXml(matrix: TagMatrixData, options: TagMatrixDocxOptions): string;
44
+ /** The matrix as `.docx` bytes. */
45
+ export declare function tagMatrixDocx(matrix: TagMatrixData, options: TagMatrixDocxOptions): Uint8Array;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * The tag matrix as data: a parent label's child labels are the rows, the fields they share (the
3
- * parent's, then any a row adds) the columns, and each row's linked documents and facts its
4
- * evidence. Pure helpers for `TagMatrix`: the columns, a row's value, the gaps, and the snapshot
2
+ * The tag matrix as data: a parent label's child labels (or every tag of a kind) are the rows, the
3
+ * fields they share (the parent's, then any a row adds) the columns, and each row's linked
4
+ * documents, facts and threads its evidence. Pure helpers for `TagMatrix`: the columns, a row's value, the gaps, and the snapshot
5
5
  * as a Markdown document.
6
6
  */
7
7
  import type { components } from '@arbidocs/client';
@@ -10,13 +10,17 @@ export type TagMatrixRowData = components['schemas']['TagMatrixRow'];
10
10
  export type TagMatrixField = components['schemas']['TagField'];
11
11
  export type TagMatrixFieldType = TagMatrixField['type'];
12
12
  /**
13
- * The columns: the parent's fields (shared by every row), then fields only some rows define,
14
- * each once, in the order first seen. Mirrors the SDK's `tagMatrixColumns`.
13
+ * The columns: the parent's fields (shared by every row), then fields only some rows define, in
14
+ * the order first seen. Rows that each define the same field share one column — every person has
15
+ * its own "Role", and a matrix of people has one Role column (the SDK's `tagMatrixColumns` keeps
16
+ * one column per field id).
15
17
  */
16
18
  export declare function tagMatrixColumns(matrix: TagMatrixData | null | undefined): TagMatrixField[];
19
+ /** The id of a row's field behind a column: the column's own, or the row's field of that name. */
20
+ export declare function rowFieldId(row: TagMatrixRowData, column: TagMatrixField): string;
17
21
  /** A row's value for a column (values are keyed by field id). */
18
22
  export declare const cellValue: (row: TagMatrixRowData, column: TagMatrixField) => unknown;
19
- /** A row with nothing behind it: no linked document and no fact. */
23
+ /** A row with nothing behind it: no linked document, fact or thread. */
20
24
  export declare const isGap: (row: TagMatrixRowData) => boolean;
21
25
  /** A value as text (a person by name, a checkbox as yes or no, blank as empty). */
22
26
  export declare function cellText(value: unknown, column: Pick<TagMatrixField, 'type'>, nameOf?: (id: string) => string | undefined): string;