@neuronection/assistant-ui 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +1 -0
- package/dist/chat-markdown.js +1 -1
- package/dist/chat-message.js +1 -1
- package/dist/chat-transcript.js +1 -1
- package/dist/{chunk-NOAKHVBJ.js → chunk-56QSIK4Y.js} +3 -3
- package/dist/{chunk-NOAKHVBJ.js.map → chunk-56QSIK4Y.js.map} +1 -1
- package/dist/chunk-65JY3ATO.js +94 -0
- package/dist/chunk-65JY3ATO.js.map +1 -0
- package/dist/chunk-6G7H6YP6.js +180 -0
- package/dist/chunk-6G7H6YP6.js.map +1 -0
- package/dist/chunk-7IP3JP3Z.js +54 -0
- package/dist/chunk-7IP3JP3Z.js.map +1 -0
- package/dist/{chunk-HXU6P5FD.js → chunk-E2NNTHFB.js} +4 -4
- package/dist/{chunk-HXU6P5FD.js.map → chunk-E2NNTHFB.js.map} +1 -1
- package/dist/chunk-FQXVZVA5.js +68 -0
- package/dist/chunk-FQXVZVA5.js.map +1 -0
- package/dist/chunk-FY3NCPFO.js +112 -0
- package/dist/chunk-FY3NCPFO.js.map +1 -0
- package/dist/chunk-KKZLR3YD.js +3 -0
- package/dist/chunk-KKZLR3YD.js.map +1 -0
- package/dist/{chunk-KQLKITZL.js → chunk-KLCULTOQ.js} +3 -3
- package/dist/chunk-KLCULTOQ.js.map +1 -0
- package/dist/chunk-RRT3DOPJ.js +3 -0
- package/dist/chunk-RRT3DOPJ.js.map +1 -0
- package/dist/{chunk-I4R5BRC7.js → chunk-TLFEVL42.js} +3 -3
- package/dist/{chunk-I4R5BRC7.js.map → chunk-TLFEVL42.js.map} +1 -1
- package/dist/chunk-YDQW2WJH.js +70 -0
- package/dist/chunk-YDQW2WJH.js.map +1 -0
- package/dist/index.d.ts +206 -1
- package/dist/index.js +18 -12
- package/dist/markdown-diff-view.js +1 -1
- package/dist/provider-logo.d.ts +16 -0
- package/dist/provider-logo.js +3 -0
- package/dist/provider-logo.js.map +1 -0
- package/dist/provider-setup-form.d.ts +74 -0
- package/dist/provider-setup-form.js +3 -0
- package/dist/provider-setup-form.js.map +1 -0
- package/dist/provider-setup-tiles.d.ts +41 -0
- package/dist/provider-setup-tiles.js +3 -0
- package/dist/provider-setup-tiles.js.map +1 -0
- package/dist/setup-first-run-card.d.ts +23 -0
- package/dist/setup-first-run-card.js +3 -0
- package/dist/setup-first-run-card.js.map +1 -0
- package/dist/setup-review.d.ts +51 -0
- package/dist/setup-review.js +3 -0
- package/dist/setup-review.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/switch-row.d.ts +19 -0
- package/dist/switch-row.js +3 -0
- package/dist/switch-row.js.map +1 -0
- package/package.json +25 -1
- package/dist/chunk-KQLKITZL.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-markdown/MarkdownCodeBlock.tsx","../src/components/chat-markdown/MermaidDiagram.tsx","../src/components/chat-markdown/MarkdownSurface.tsx"],"names":["React","MarkdownCodeBlock","React2","MermaidDiagram","jsx","MarkdownSurface","jsxs"],"mappings":";;;;;;;;;;AAuBO,IAAM,iBAAA,GAA0BA,MAAA,CAAA,UAAA;AAAA,EACrC,SAASC,kBAAAA,CAAkB,EAAE,IAAA,EAAM,QAAA,EAAU,eAAe,IAAA,EAAM,MAAA,EAAQ,SAAA,EAAU,EAAG,GAAA,EAAK;AAC1F,IAAA,MAAM,SAAA,GAAY,QAAQ,IAAA,IAAQ,WAAA;AAClC,IAAA,MAAM,SAAA,GAAY,QAAQ,IAAA,IAAQ,MAAA;AAClC,IAAA,uBACE,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAQ,qBAAA;AAAA,QACR,SAAA,EAAW,EAAA;AAAA,UACT,6HAAA;AAAA,UACA;AAAA,SACF;AAAA,QAEC,QAAA,EAAA;AAAA,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AAuD,CAAA,EACtG,IACE,IAAA,EACN;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ,CAAC;AACH","file":"chunk-KLCULTOQ.js","sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../../lib/utils'\nimport { CopyButton } from '../copy-button/CopyButton'\n\nexport interface MarkdownCodeBlockLabels {\n copy: string\n code: string\n}\n\nexport interface MarkdownCodeBlockProps {\n code: string\n language?: string\n showLanguage?: boolean\n labels?: Partial<MarkdownCodeBlockLabels>\n className?: string\n}\n\n/**\n * Standalone fenced-code surface: mono block, optional language tag, hover\n * copy. Plain by design — no highlighting engine bundled (apps may wrap or\n * slot their own renderer through `MarkdownSurface.components`).\n */\nexport const MarkdownCodeBlock = React.forwardRef<HTMLDivElement, MarkdownCodeBlockProps>(\n function MarkdownCodeBlock({ code, language, showLanguage = true, labels, className }, ref) {\n const copyLabel = labels?.copy ?? 'Copy code'\n const codeLabel = labels?.code ?? 'Code'\n return (\n <div\n ref={ref}\n data-as=\"markdown-code-block\"\n className={cn(\n 'group/code relative my-3 overflow-hidden rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)]',\n className,\n )}\n >\n {showLanguage && language ? (\n <div className=\"flex items-center justify-between border-b border-[var(--as-border)] px-3 py-1 font-sans text-[10px] font-medium uppercase tracking-wide text-[var(--as-muted-fg)]\">\n <span>{language}</span>\n <CopyButton value={code} label={copyLabel} className=\"opacity-60 transition-opacity group-hover/code:opacity-100\" />\n </div>\n ) : (\n <CopyButton\n value={code}\n label={copyLabel}\n className=\"absolute right-2 top-2 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/code:opacity-100\"\n />\n )}\n <pre className={cn('overflow-x-auto p-3 font-mono text-xs leading-relaxed', !showLanguage && 'pt-3')}>\n <code aria-label={language ? `${language} ${codeLabel}` : codeLabel}>{code}</code>\n </pre>\n </div>\n )\n },\n)\n","import * as React from 'react'\n\nimport { cn } from '../../lib/utils'\nimport { MarkdownCodeBlock } from './MarkdownCodeBlock'\n\nexport interface MermaidDiagramProps {\n code: string\n theme?: 'neutral' | 'default' | 'dark' | 'forest'\n labels?: { diagram?: string }\n className?: string\n}\n\nlet mermaidInitialized = false\n\nasync function renderMermaid(id: string, code: string, theme: NonNullable<MermaidDiagramProps['theme']>): Promise<string> {\n const mermaid = (await import('mermaid')).default\n if (!mermaidInitialized) {\n mermaid.initialize({ startOnLoad: false, securityLevel: 'strict', theme })\n mermaidInitialized = true\n }\n const { svg } = await mermaid.render(id, code)\n return svg\n}\n\nexport function extractText(node: React.ReactNode): string {\n if (node === null || node === undefined || typeof node === 'boolean') {\n return ''\n }\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node)\n }\n if (Array.isArray(node)) {\n return node.map(extractText).join('')\n }\n if (React.isValidElement(node)) {\n return extractText((node.props as { children?: React.ReactNode }).children)\n }\n return ''\n}\n\n/**\n * Lazily-rendered mermaid diagram (dynamic `import('mermaid')`, strict\n * security). Falls back to the plain code block when rendering fails —\n * study-assistant's proven behavior.\n */\nexport const MermaidDiagram = React.forwardRef<HTMLDivElement, MermaidDiagramProps>(\n function MermaidDiagram({ code, theme = 'neutral', labels, className }, ref) {\n const reactId = React.useId().replace(/[^a-zA-Z0-9]/g, '')\n const [svg, setSvg] = React.useState<string | null>(null)\n const [failed, setFailed] = React.useState(false)\n\n React.useEffect(() => {\n let cancelled = false\n setFailed(false)\n setSvg(null)\n renderMermaid(`as-mermaid-${reactId}`, code, theme)\n .then((result) => {\n if (!cancelled) {\n setSvg(result)\n }\n })\n .catch(() => {\n if (!cancelled) {\n setFailed(true)\n }\n })\n return () => {\n cancelled = true\n }\n }, [code, theme, reactId])\n\n if (failed || svg === null) {\n return (\n <MarkdownCodeBlock\n ref={failed ? ref : undefined}\n code={code}\n language=\"mermaid\"\n labels={{ code: labels?.diagram ?? 'Diagram' }}\n className={cn('my-3', svg === null && !failed ? 'opacity-60' : undefined, className)}\n />\n )\n }\n return (\n <div\n ref={ref}\n data-as=\"mermaid-diagram\"\n className={cn(\n 'my-3 flex justify-center overflow-x-auto rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] p-3 [&_svg]:max-w-full',\n className,\n )}\n // mermaid runs with securityLevel 'strict' — no user styles, scripts or links survive\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n )\n },\n)\n","import * as React from 'react'\nimport { defaultUrlTransform, type Components, type Options as ReactMarkdownOptions, type UrlTransform } from 'react-markdown'\nimport ReactMarkdown from 'react-markdown'\nimport rehypeKatex from 'rehype-katex'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\n\nimport { cn } from '../../lib/utils'\nimport { Modal, ModalContent } from '../modal/Modal'\nimport { MarkdownCodeBlock, type MarkdownCodeBlockLabels } from './MarkdownCodeBlock'\nimport { extractText, MermaidDiagram } from './MermaidDiagram'\n\nexport type MarkdownComponents = Components\nexport type { MarkdownCodeBlockLabels }\n\nexport interface MarkdownSurfaceProps {\n /** Markdown source (model output is untrusted — raw HTML never renders). */\n value: string\n /** Live turn: defers mermaid to the final render (streaming floods break diagrams). */\n streaming?: boolean\n /** Search highlight: case-insensitive matches wrap in `<mark data-as=\"chat-search-match\">`. */\n query?: string\n /** Click-to-zoom images in a modal (health's medical images, study screenshots). Default false. */\n lightbox?: boolean\n gfm?: boolean\n math?: boolean\n /** Render ```mermaid fences as diagrams (forced off while `streaming`). */\n mermaid?: boolean\n mermaidTheme?: 'neutral' | 'default' | 'dark' | 'forest'\n /** Per-key overrides of the default renderers (mentions, citations, links…). */\n components?: MarkdownComponents\n urlTransform?: UrlTransform\n showCodeLanguage?: boolean\n labels?: Partial<MarkdownCodeBlockLabels & { zoomImage: string; closeImage: string }>\n className?: string\n}\n\nconst fenceLanguage = (className: string | undefined): string | undefined =>\n /language-([\\w+-]+)/.exec(className ?? '')?.[1]\n\ninterface HastNode {\n type: string\n tagName?: string\n value?: string\n properties?: Record<string, unknown>\n children?: HastNode[]\n}\n\nfunction splitMatches(value: string, needle: string): { text: string; match: boolean }[] {\n const segments: { text: string; match: boolean }[] = []\n const lower = value.toLowerCase()\n let index = 0\n for (;;) {\n const found = lower.indexOf(needle, index)\n if (found === -1) {\n segments.push({ text: value.slice(index), match: false })\n break\n }\n if (found > index) {\n segments.push({ text: value.slice(index, found), match: false })\n }\n segments.push({ text: value.slice(found, found + needle.length), match: true })\n index = found + needle.length\n }\n return segments.filter((segment) => segment.text !== '')\n}\n\nfunction highlightTree(node: HastNode, needle: string): void {\n const children = node.children\n if (children === undefined) {\n return\n }\n for (let index = 0; index < children.length; index += 1) {\n const child = children[index]!\n if (child.type === 'text' && child.value !== undefined) {\n const segments = splitMatches(child.value, needle)\n if (segments.length > 1 || (segments.length === 1 && segments[0]!.match)) {\n const replaced = segments.map((segment) =>\n segment.match\n ? ({\n type: 'element',\n tagName: 'mark',\n properties: { 'data-as': 'chat-search-match' },\n children: [{ type: 'text', value: segment.text }],\n } satisfies HastNode)\n : { type: 'text', value: segment.text },\n )\n children.splice(index, 1, ...(replaced as HastNode[]))\n index += replaced.length - 1\n }\n } else {\n highlightTree(child, needle)\n }\n }\n}\n\nfunction rehypeHighlightMatches(needle: string) {\n return () => (tree: HastNode) => {\n highlightTree(tree, needle)\n }\n}\n\n/**\n * The family's read-only streaming markdown surface: GFM tables, KaTeX math\n * (error-tolerant while streaming), lazily-imported mermaid diagrams, and\n * copyable code blocks with language tags. Raw HTML is never rendered\n * (no `rehype-raw`) — model output is untrusted input (ai-features §7).\n */\nexport const MarkdownSurface = React.memo(\n React.forwardRef<HTMLDivElement, MarkdownSurfaceProps>(function MarkdownSurface(\n {\n value,\n streaming = false,\n query,\n lightbox = false,\n gfm = true,\n math = true,\n mermaid = true,\n mermaidTheme = 'neutral',\n components,\n urlTransform = defaultUrlTransform,\n showCodeLanguage = true,\n labels,\n className,\n },\n ref,\n ) {\n const mermaidEnabled = mermaid && !streaming\n const highlightQuery =\n query !== undefined && query.trim().length > 0 ? query.trim().toLowerCase() : null\n const [zoom, setZoom] = React.useState<{ src: string; alt: string } | null>(null)\n\n const defaultComponents = React.useMemo<MarkdownComponents>(\n () => ({\n pre: ({ children }) => {\n const child = Array.isArray(children) ? children[0] : children\n if (React.isValidElement(child)) {\n const childProps = child.props as { className?: string; children?: React.ReactNode }\n const text = extractText(childProps.children).replace(/\\n$/, '')\n const language = fenceLanguage(childProps.className)\n if (language === 'mermaid' && mermaidEnabled) {\n return <MermaidDiagram code={text} theme={mermaidTheme} labels={{ diagram: labels?.code }} />\n }\n return (\n <MarkdownCodeBlock code={text} language={language} showLanguage={showCodeLanguage} labels={labels} />\n )\n }\n return <pre>{children}</pre>\n },\n code: ({ className: codeClassName, children, ...rest }) => (\n <code\n className={cn(\n 'rounded-[var(--as-radius-sm)] bg-[var(--as-surface-raised)] px-1 py-0.5 font-mono text-[0.85em]',\n codeClassName,\n )}\n {...rest}\n >\n {children}\n </code>\n ),\n a: ({ href, children, ...rest }) => {\n const external =\n typeof href === 'string' && (href.startsWith('http://') || href.startsWith('https://'))\n return (\n <a\n href={href}\n className=\"text-[var(--as-primary)] underline underline-offset-2\"\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...rest}\n >\n {children}\n </a>\n )\n },\n table: ({ children, ...rest }) => (\n <div className=\"my-3 overflow-x-auto rounded-[var(--as-radius)] border border-[var(--as-border)]\">\n <table className=\"w-full border-collapse text-[0.875em]\" {...rest}>\n {children}\n </table>\n </div>\n ),\n img: ({ alt, ...rest }) => {\n const image = <img alt={alt ?? ''} className=\"my-2 max-w-full rounded-[var(--as-radius)]\" loading=\"lazy\" {...rest} />\n if (!lightbox || typeof rest.src !== 'string') {\n return image\n }\n const zoomLabel = `${labels?.zoomImage ?? 'Zoom image'}${alt ? `: ${alt}` : ''}`\n return (\n <button\n type=\"button\"\n aria-label={zoomLabel}\n title={zoomLabel}\n onClick={() => setZoom({ src: rest.src as string, alt: alt ?? '' })}\n className=\"block cursor-zoom-in rounded-[var(--as-radius)] transition-opacity hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--as-focus-ring)]\"\n >\n {image}\n </button>\n )\n },\n }),\n [labels, mermaidEnabled, mermaidTheme, showCodeLanguage, lightbox],\n )\n\n const mergedComponents = React.useMemo(\n () => ({ ...defaultComponents, ...components }),\n [defaultComponents, components],\n )\n\n const remarkPlugins = React.useMemo(\n () => [gfm ? remarkGfm : null, math ? remarkMath : null].filter((plugin) => plugin !== null),\n [gfm, math],\n )\n const rehypePlugins = React.useMemo<ReactMarkdownOptions['rehypePlugins']>(() => {\n const plugins: ReactMarkdownOptions['rehypePlugins'] = []\n if (math) {\n plugins.push([rehypeKatex, { strict: false, throwOnError: false, output: 'html' }])\n }\n if (highlightQuery !== null) {\n plugins.push(rehypeHighlightMatches(highlightQuery))\n }\n return plugins\n }, [math, highlightQuery])\n\n return (\n <div\n ref={ref}\n data-as=\"chat-markdown\"\n data-streaming={streaming || undefined}\n className={cn('min-w-0', className)}\n >\n <ReactMarkdown\n remarkPlugins={remarkPlugins}\n rehypePlugins={rehypePlugins}\n components={mergedComponents}\n urlTransform={urlTransform}\n >\n {value}\n </ReactMarkdown>\n <Modal open={zoom !== null} onOpenChange={(open) => (open ? undefined : setZoom(null))}>\n {zoom !== null ? (\n <ModalContent closeLabel={labels?.closeImage ?? 'Close image'} className=\"w-fit max-w-[92vw] items-center justify-center p-3\">\n <img src={zoom.src} alt={zoom.alt} className=\"max-h-[78vh] max-w-[86vw] rounded-[var(--as-radius)]\" />\n </ModalContent>\n ) : null}\n </Modal>\n </div>\n )\n }),\n)\n\nexport { MarkdownCodeBlock }\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-RRT3DOPJ.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computeUnitDiff } from './chunk-QLP7K3PY.js';
|
|
2
|
-
import { MarkdownSurface } from './chunk-
|
|
2
|
+
import { MarkdownSurface } from './chunk-KLCULTOQ.js';
|
|
3
3
|
import { cn } from './chunk-RVVXVTH3.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useState, useRef, useMemo, useEffect } from 'react';
|
|
@@ -353,5 +353,5 @@ var MarkdownDiffView = React.forwardRef(function MarkdownDiffView2({
|
|
|
353
353
|
});
|
|
354
354
|
|
|
355
355
|
export { MarkdownDiffView, splitMarkdownBlocks };
|
|
356
|
-
//# sourceMappingURL=chunk-
|
|
357
|
-
//# sourceMappingURL=chunk-
|
|
356
|
+
//# sourceMappingURL=chunk-TLFEVL42.js.map
|
|
357
|
+
//# sourceMappingURL=chunk-TLFEVL42.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/markdown-diff-view/blockSplit.ts","../src/components/markdown-diff-view/MarkdownDiffView.tsx"],"names":["MarkdownDiffView","useRef"],"mappings":";;;;;;;;;AAAA,SAAS,cACP,OAAA,EACwC;AACxC,EAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,IAAA,CAAK,OAAO,CAAA;AAC3C,EAAA,MAAM,MAAA,GAAS,OAAO,CAAC,CAAA,IAAK,iBAAiB,IAAA,CAAK,OAAO,IAAI,CAAC,CAAA;AAC9D,EAAA,IAAI,MAAA,KAAW,MAAA,IAAa,MAAA,CAAO,MAAA,KAAW,CAAA,EAAG;AAC/C,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,EAAE,MAAM,MAAA,CAAO,MAAA,CAAO,CAAC,CAAA,EAAG,IAAA,EAAM,SAAS,IAAA,EAAK;AACvD;AAEO,SAAS,oBAAoB,QAAA,EAA4B;AAC9D,EAAA,MAAM,QAAQ,QAAA,CAAS,OAAA,CAAQ,UAAU,IAAI,CAAA,CAAE,MAAM,IAAI,CAAA;AACzD,EAAA,MAAM,SAAmB,EAAC;AAC1B,EAAA,IAAI,UAAoB,EAAC;AACzB,EAAA,IAAI,SAAA,GAA2B,IAAA;AAC/B,EAAA,IAAI,MAAA,GAAS,KAAA;AAEb,EAAA,M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SAAA,EAAW,EAAA,CAAG,kCAAkC,aAAa,CAAA,EAC/E,QAAA,EAAA,QAAA,CAAS,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,KAAU,UAAU,KAAA,EAAO,KAAK,CAAC,CAAA,EACzD;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC","file":"chunk-I4R5BRC7.js","sourcesContent":["function fenceMarkerOf(\n trimmed: string,\n): { char: string; bare: boolean } | null {\n const bare = /^(`{3,}|~{3,})$/.exec(trimmed)\n const marker = bare?.[1] ?? /^(`{3,}|~{3,})/.exec(trimmed)?.[1]\n if (marker === undefined || marker.length === 0) {\n return null\n }\n return { char: marker.charAt(0), bare: bare !== null }\n}\n\nexport function splitMarkdownBlocks(markdown: string): string[] {\n const lines = markdown.replace(/\\r\\n?/g, '\\n').split('\\n')\n const blocks: string[] = []\n let current: string[] = []\n let fenceChar: string | null = null\n let inMath = false\n\n const flush = () => {\n if (current.some((line) => line.trim() !== '')) {\n blocks.push(current.join('\\n').trim())\n }\n current = []\n }\n\n for (const line of lines) {\n const trimmed = line.trim()\n const marker = fenceMarkerOf(trimmed)\n if (fenceChar !== null) {\n current.push(line)\n if (marker !== null && marker.bare && marker.char === fenceChar) {\n fenceChar = null\n }\n continue\n }\n if (marker !== null) {\n flush()\n fenceChar = marker.char\n current.push(line)\n continue\n }\n if (inMath) {\n current.push(line)\n if (trimmed.endsWith('$$')) {\n inMath = false\n }\n continue\n }\n if (trimmed === '$$') {\n flush()\n inMath = true\n current.push(line)\n continue\n }\n if (trimmed.startsWith('$$')) {\n flush()\n current.push(line)\n if (!trimmed.endsWith('$$') || trimmed.length <= 4) {\n inMath = true\n }\n continue\n }\n if (trimmed === '') {\n flush()\n continue\n }\n current.push(line)\n }\n flush()\n return blocks\n}\n","import * as React from 'react'\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport {\n ChevronDown,\n ChevronRight,\n ChevronUp,\n Minus,\n Plus,\n} from 'lucide-react'\n\nimport { cn } from '../../lib/utils'\nimport { MarkdownSurface } from '../chat-markdown'\nimport { computeUnitDiff, type DiffRow } from '../text-diff-view/lineDiff'\n\nimport { splitMarkdownBlocks } from './blockSplit'\n\nexport interface MarkdownDiffViewLabels {\n original?: string\n suggested?: string\n /** Fold summary for a run of hidden unchanged blocks. */\n unchangedBlocks?: (count: number) => string\n showLess?: string\n prevChange?: string\n nextChange?: string\n changePosition?: (index: number, total: number) => string\n noChanges?: string\n}\n\nconst DEFAULT_LABELS: Required<MarkdownDiffViewLabels> = {\n original: 'Original',\n suggested: 'Suggested',\n unchangedBlocks: (count) =>\n count === 1 ? '1 unchanged block' : `${count} unchanged blocks`,\n showLess: 'Show less',\n prevChange: 'Previous change',\n nextChange: 'Next change',\n changePosition: (index, total) => `${index}/${total}`,\n noChanges: 'No changes',\n}\n\nexport interface MarkdownDiffViewProps {\n original: string\n suggested: string\n /** Unchanged blocks kept visible around each change; the rest fold. Default 1. */\n contextBlocks?: number\n showHeader?: boolean\n showNav?: boolean\n labels?: Partial<MarkdownDiffViewLabels>\n /** Applied to the outer box. */\n className?: string\n /** Applied to the scrolling body — size the view here (e.g. `max-h-80`). */\n bodyClassName?: string\n}\n\nfunction isChangedRow(row: DiffRow): boolean {\n return (\n row.kind === 'pair' &&\n (row.left?.kind === 'del' || row.right?.kind === 'add')\n )\n}\n\ninterface FlatRow {\n key: string\n row: DiffRow\n foldOf?: number\n collapseOf?: number\n}\n\nfunction BlockSurface({ value }: { value: string }) {\n return <MarkdownSurface value={value} className=\"min-w-0 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0\" />\n}\n\nexport const MarkdownDiffView = React.forwardRef<\n HTMLDivElement,\n MarkdownDiffViewProps\n>(function MarkdownDiffView(\n {\n original,\n suggested,\n contextBlocks = 1,\n showHeader = true,\n showNav = true,\n labels,\n className,\n bodyClassName,\n },\n ref,\n) {\n const mergedLabels = { ...DEFAULT_LABELS, ...labels }\n const [expanded, setExpanded] = useState<Set<number>>(new Set())\n const [activeGroup, setActiveGroup] = useState(0)\n const scrollRef = React.useRef<HTMLDivElement | null>(null)\n const rowRefs = useRef(new Map<number, HTMLDivElement>())\n\n const diff = useMemo(\n () =>\n computeUnitDiff(splitMarkdownBlocks(original), splitMarkdownBlocks(suggested), {\n contextUnits: contextBlocks,\n }),\n [original, suggested, contextBlocks],\n )\n\n const flatRows = useMemo<FlatRow[]>(() => {\n const out: FlatRow[] = []\n diff.rows.forEach((row, index) => {\n if (row.kind === 'fold' && expanded.has(index)) {\n row.hidden.forEach((hiddenRow, hiddenIndex) => {\n out.push({ key: `${index}.${hiddenIndex}`, row: hiddenRow })\n })\n out.push({ key: `${index}.collapse`, row, collapseOf: index })\n } else {\n out.push({\n key: String(index),\n row,\n foldOf: row.kind === 'fold' ? index : undefined,\n })\n }\n })\n return out\n }, [diff.rows, expanded])\n\n const changeGroups = useMemo<number[]>(() => {\n const groups: number[] = []\n let inGroup = false\n flatRows.forEach((entry, index) => {\n const changed = isChangedRow(entry.row)\n if (changed && !inGroup) {\n groups.push(index)\n }\n inGroup = changed\n })\n return groups\n }, [flatRows])\n\n useEffect(() => {\n setExpanded(new Set())\n setActiveGroup(0)\n }, [original, suggested])\n\n useEffect(() => {\n if (activeGroup >= changeGroups.length) {\n setActiveGroup(0)\n }\n }, [activeGroup, changeGroups.length])\n\n useEffect(() => {\n const target = changeGroups[activeGroup]\n if (target === undefined) {\n return\n }\n const element = rowRefs.current.get(target)\n if (element && typeof element.scrollIntoView === 'function') {\n element.scrollIntoView({ block: 'center' })\n }\n }, [activeGroup, changeGroups])\n\n if (diff.added === 0 && diff.removed === 0) {\n return (\n <div\n ref={ref}\n data-as=\"markdown-diff-view\"\n className={cn(\n 'text-[var(--as-muted-fg)] border-[var(--as-border)] bg-[var(--as-subtle)] rounded-md border p-3 text-xs',\n className,\n )}\n >\n {mergedLabels.noChanges}\n </div>\n )\n }\n\n const activeGroupStart = changeGroups[activeGroup]\n const activeGroupEnd =\n activeGroupStart === undefined\n ? undefined\n : (() => {\n for (\n let index = activeGroupStart + 1;\n index < flatRows.length;\n index += 1\n ) {\n const entry = flatRows[index]\n if (entry !== undefined && isChangedRow(entry.row)) {\n return index\n }\n }\n return flatRows.length\n })()\n\n const renderRow = (entry: FlatRow, index: number) => {\n const row = entry.row\n if (row.kind === 'fold') {\n if (entry.collapseOf !== undefined) {\n const collapseOf = entry.collapseOf\n return (\n <button\n key={entry.key}\n type=\"button\"\n onClick={() =>\n setExpanded((current) => {\n const next = new Set(current)\n next.delete(collapseOf)\n return next\n })\n }\n className=\"text-[var(--as-muted-fg)] hover:bg-[var(--as-subtle)] hover:text-[var(--as-fg)] flex w-full items-center gap-1 px-3 py-0.5 text-left text-[11px]\"\n >\n <ChevronDown className=\"size-3\" aria-hidden />\n {mergedLabels.showLess}\n </button>\n )\n }\n const foldOf = entry.foldOf\n return (\n <button\n key={entry.key}\n type=\"button\"\n onClick={() => {\n if (foldOf !== undefined) {\n setExpanded((current) => {\n const next = new Set(current)\n next.add(foldOf)\n return next\n })\n }\n }}\n className=\"text-[var(--as-muted-fg)] hover:bg-[var(--as-subtle)] hover:text-[var(--as-fg)] flex w-full items-center gap-1 px-3 py-0.5 text-left text-[11px]\"\n >\n <ChevronRight className=\"size-3\" aria-hidden />\n {mergedLabels.unchangedBlocks(row.count)}\n </button>\n )\n }\n const changed = isChangedRow(row)\n const active =\n activeGroupStart !== undefined &&\n activeGroupEnd !== undefined &&\n index >= activeGroupStart &&\n index < activeGroupEnd\n if (!changed) {\n const text = row.left?.text ?? row.right?.text ?? ''\n return (\n <div\n key={entry.key}\n ref={(node) => {\n if (node) {\n rowRefs.current.set(index, node)\n } else {\n rowRefs.current.delete(index)\n }\n }}\n data-context=\"\"\n className={cn('border-[var(--as-border)] px-3 py-1.5', active && 'bg-[var(--as-primary)]/5')}\n >\n <BlockSurface value={text} />\n </div>\n )\n }\n return (\n <div\n key={entry.key}\n ref={(node) => {\n if (node) {\n rowRefs.current.set(index, node)\n } else {\n rowRefs.current.delete(index)\n }\n }}\n className={cn('grid grid-cols-2', active && 'bg-[var(--as-primary)]/5')}\n data-changed={changed || undefined}\n data-active={active || undefined}\n >\n {(['left', 'right'] as const).map((side) => {\n const cell = row[side]\n const isAdd = cell?.kind === 'add'\n const isDel = cell?.kind === 'del'\n return (\n <div\n key={side}\n data-kind={isAdd ? 'add' : isDel ? 'del' : undefined}\n className={cn(\n 'min-w-0 px-3 py-1.5',\n isAdd && 'bg-[var(--as-success)]/10',\n isDel && 'bg-[var(--as-danger)]/10',\n cell === null && 'bg-[var(--as-subtle)]/50',\n )}\n >\n {cell === null ? null : <BlockSurface value={cell.text} />}\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n data-as=\"markdown-diff-view\"\n className={cn(\n 'bg-[var(--as-surface)] border-[var(--as-border)] flex flex-col overflow-hidden rounded-md border text-sm leading-relaxed',\n className,\n )}\n >\n {showHeader ? (\n <div className=\"border-[var(--as-border)] text-[var(--as-muted-fg)] grid grid-cols-[1fr_auto_1fr] items-center gap-2 border-b px-3 py-1.5 text-[11px] font-medium tracking-wide uppercase\">\n <span className=\"flex items-center gap-1\">\n <Minus className=\"size-3 text-[var(--as-danger)]\" aria-hidden />\n {mergedLabels.original}\n </span>\n <span className=\"flex items-center gap-2\">\n <span>\n <span className=\"text-[var(--as-success)]\">+{diff.added}</span>{' '}\n <span className=\"text-[var(--as-danger)]\">−{diff.removed}</span>\n </span>\n {showNav && changeGroups.length > 0 ? (\n <span className=\"flex items-center gap-0.5\">\n <button\n type=\"button\"\n aria-label={mergedLabels.prevChange}\n title={mergedLabels.prevChange}\n disabled={activeGroup === 0}\n onClick={() => setActiveGroup((value) => Math.max(0, value - 1))}\n className=\"hover:bg-[var(--as-border)] hover:text-[var(--as-fg)] rounded p-0.5 disabled:opacity-40\"\n >\n <ChevronUp className=\"size-3.5\" aria-hidden />\n </button>\n <span className=\"tabular-nums\">\n {mergedLabels.changePosition(activeGroup + 1, changeGroups.length)}\n </span>\n <button\n type=\"button\"\n aria-label={mergedLabels.nextChange}\n title={mergedLabels.nextChange}\n disabled={activeGroup >= changeGroups.length - 1}\n onClick={() =>\n setActiveGroup((value) => Math.min(changeGroups.length - 1, value + 1))\n }\n className=\"hover:bg-[var(--as-border)] hover:text-[var(--as-fg)] rounded p-0.5 disabled:opacity-40\"\n >\n <ChevronDown className=\"size-3.5\" aria-hidden />\n </button>\n </span>\n ) : null}\n </span>\n <span className=\"flex items-center justify-end gap-1\">\n {mergedLabels.suggested}\n <Plus className=\"size-3 text-[var(--as-success)]\" aria-hidden />\n </span>\n </div>\n ) : null}\n <div ref={scrollRef} className={cn('min-h-0 flex-1 overflow-y-auto', bodyClassName)}>\n {flatRows.map((entry, index) => renderRow(entry, index))}\n </div>\n </div>\n )\n})\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/markdown-diff-view/blockSplit.ts","../src/components/markdown-diff-view/MarkdownDiffView.tsx"],"names":["MarkdownDiffView","useRef"],"mappings":";;;;;;;;;AAAA,SAAS,cACP,OAAA,EACwC;AACxC,EAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,IAAA,CAAK,OAAO,CAAA;AAC3C,EAAA,MAAM,MAAA,GAAS,OAAO,CAAC,CAAA,IAAK,iBAAiB,IAAA,CAAK,OAAO,IAAI,CAAC,CAAA;AAC9D,EAAA,IAAI,MAAA,KAAW,MAAA,IAAa,MAAA,CAAO,MAAA,KAAW,CAAA,EAAG;AAC/C,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,EAAE,MAAM,MAAA,CAAO,MAAA,CAAO,CAAC,CAAA,EAAG,IAAA,EAAM,SAAS,IAAA,EAAK;AACvD;AAEO,SAAS,oBAAoB,QAAA,EAA4B;AAC9D,EAAA,MAAM,QAAQ,QAAA,CAAS,OAAA,CAAQ,UAAU,IAAI,CAAA,CAAE,MAAM,IAAI,CAAA;AACzD,EAAA,MAAM,SAAmB,EAAC;AAC1B,EAAA,IAAI,UAAoB,EAAC;AACzB,EAAA,IAAI,SA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F,CAAA,GACE,IAAA;AAAA,4BACH,KAAA,EAAA,EAAI,GAAA,EAAK,WAAW,SAAA,EAAW,EAAA,CAAG,kCAAkC,aAAa,CAAA,EAC/E,QAAA,EAAA,QAAA,CAAS,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,KAAU,UAAU,KAAA,EAAO,KAAK,CAAC,CAAA,EACzD;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC","file":"chunk-TLFEVL42.js","sourcesContent":["function fenceMarkerOf(\n trimmed: string,\n): { char: string; bare: boolean } | null {\n const bare = /^(`{3,}|~{3,})$/.exec(trimmed)\n const marker = bare?.[1] ?? /^(`{3,}|~{3,})/.exec(trimmed)?.[1]\n if (marker === undefined || marker.length === 0) {\n return null\n }\n return { char: marker.charAt(0), bare: bare !== null }\n}\n\nexport function splitMarkdownBlocks(markdown: string): string[] {\n const lines = markdown.replace(/\\r\\n?/g, '\\n').split('\\n')\n const blocks: string[] = []\n let current: string[] = []\n let fenceChar: string | null = null\n let inMath = false\n\n const flush = () => {\n if (current.some((line) => line.trim() !== '')) {\n blocks.push(current.join('\\n').trim())\n }\n current = []\n }\n\n for (const line of lines) {\n const trimmed = line.trim()\n const marker = fenceMarkerOf(trimmed)\n if (fenceChar !== null) {\n current.push(line)\n if (marker !== null && marker.bare && marker.char === fenceChar) {\n fenceChar = null\n }\n continue\n }\n if (marker !== null) {\n flush()\n fenceChar = marker.char\n current.push(line)\n continue\n }\n if (inMath) {\n current.push(line)\n if (trimmed.endsWith('$$')) {\n inMath = false\n }\n continue\n }\n if (trimmed === '$$') {\n flush()\n inMath = true\n current.push(line)\n continue\n }\n if (trimmed.startsWith('$$')) {\n flush()\n current.push(line)\n if (!trimmed.endsWith('$$') || trimmed.length <= 4) {\n inMath = true\n }\n continue\n }\n if (trimmed === '') {\n flush()\n continue\n }\n current.push(line)\n }\n flush()\n return blocks\n}\n","import * as React from 'react'\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport {\n ChevronDown,\n ChevronRight,\n ChevronUp,\n Minus,\n Plus,\n} from 'lucide-react'\n\nimport { cn } from '../../lib/utils'\nimport { MarkdownSurface } from '../chat-markdown'\nimport { computeUnitDiff, type DiffRow } from '../text-diff-view/lineDiff'\n\nimport { splitMarkdownBlocks } from './blockSplit'\n\nexport interface MarkdownDiffViewLabels {\n original?: string\n suggested?: string\n /** Fold summary for a run of hidden unchanged blocks. */\n unchangedBlocks?: (count: number) => string\n showLess?: string\n prevChange?: string\n nextChange?: string\n changePosition?: (index: number, total: number) => string\n noChanges?: string\n}\n\nconst DEFAULT_LABELS: Required<MarkdownDiffViewLabels> = {\n original: 'Original',\n suggested: 'Suggested',\n unchangedBlocks: (count) =>\n count === 1 ? '1 unchanged block' : `${count} unchanged blocks`,\n showLess: 'Show less',\n prevChange: 'Previous change',\n nextChange: 'Next change',\n changePosition: (index, total) => `${index}/${total}`,\n noChanges: 'No changes',\n}\n\nexport interface MarkdownDiffViewProps {\n original: string\n suggested: string\n /** Unchanged blocks kept visible around each change; the rest fold. Default 1. */\n contextBlocks?: number\n showHeader?: boolean\n showNav?: boolean\n labels?: Partial<MarkdownDiffViewLabels>\n /** Applied to the outer box. */\n className?: string\n /** Applied to the scrolling body — size the view here (e.g. `max-h-80`). */\n bodyClassName?: string\n}\n\nfunction isChangedRow(row: DiffRow): boolean {\n return (\n row.kind === 'pair' &&\n (row.left?.kind === 'del' || row.right?.kind === 'add')\n )\n}\n\ninterface FlatRow {\n key: string\n row: DiffRow\n foldOf?: number\n collapseOf?: number\n}\n\nfunction BlockSurface({ value }: { value: string }) {\n return <MarkdownSurface value={value} className=\"min-w-0 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0\" />\n}\n\nexport const MarkdownDiffView = React.forwardRef<\n HTMLDivElement,\n MarkdownDiffViewProps\n>(function MarkdownDiffView(\n {\n original,\n suggested,\n contextBlocks = 1,\n showHeader = true,\n showNav = true,\n labels,\n className,\n bodyClassName,\n },\n ref,\n) {\n const mergedLabels = { ...DEFAULT_LABELS, ...labels }\n const [expanded, setExpanded] = useState<Set<number>>(new Set())\n const [activeGroup, setActiveGroup] = useState(0)\n const scrollRef = React.useRef<HTMLDivElement | null>(null)\n const rowRefs = useRef(new Map<number, HTMLDivElement>())\n\n const diff = useMemo(\n () =>\n computeUnitDiff(splitMarkdownBlocks(original), splitMarkdownBlocks(suggested), {\n contextUnits: contextBlocks,\n }),\n [original, suggested, contextBlocks],\n )\n\n const flatRows = useMemo<FlatRow[]>(() => {\n const out: FlatRow[] = []\n diff.rows.forEach((row, index) => {\n if (row.kind === 'fold' && expanded.has(index)) {\n row.hidden.forEach((hiddenRow, hiddenIndex) => {\n out.push({ key: `${index}.${hiddenIndex}`, row: hiddenRow })\n })\n out.push({ key: `${index}.collapse`, row, collapseOf: index })\n } else {\n out.push({\n key: String(index),\n row,\n foldOf: row.kind === 'fold' ? index : undefined,\n })\n }\n })\n return out\n }, [diff.rows, expanded])\n\n const changeGroups = useMemo<number[]>(() => {\n const groups: number[] = []\n let inGroup = false\n flatRows.forEach((entry, index) => {\n const changed = isChangedRow(entry.row)\n if (changed && !inGroup) {\n groups.push(index)\n }\n inGroup = changed\n })\n return groups\n }, [flatRows])\n\n useEffect(() => {\n setExpanded(new Set())\n setActiveGroup(0)\n }, [original, suggested])\n\n useEffect(() => {\n if (activeGroup >= changeGroups.length) {\n setActiveGroup(0)\n }\n }, [activeGroup, changeGroups.length])\n\n useEffect(() => {\n const target = changeGroups[activeGroup]\n if (target === undefined) {\n return\n }\n const element = rowRefs.current.get(target)\n if (element && typeof element.scrollIntoView === 'function') {\n element.scrollIntoView({ block: 'center' })\n }\n }, [activeGroup, changeGroups])\n\n if (diff.added === 0 && diff.removed === 0) {\n return (\n <div\n ref={ref}\n data-as=\"markdown-diff-view\"\n className={cn(\n 'text-[var(--as-muted-fg)] border-[var(--as-border)] bg-[var(--as-subtle)] rounded-md border p-3 text-xs',\n className,\n )}\n >\n {mergedLabels.noChanges}\n </div>\n )\n }\n\n const activeGroupStart = changeGroups[activeGroup]\n const activeGroupEnd =\n activeGroupStart === undefined\n ? undefined\n : (() => {\n for (\n let index = activeGroupStart + 1;\n index < flatRows.length;\n index += 1\n ) {\n const entry = flatRows[index]\n if (entry !== undefined && isChangedRow(entry.row)) {\n return index\n }\n }\n return flatRows.length\n })()\n\n const renderRow = (entry: FlatRow, index: number) => {\n const row = entry.row\n if (row.kind === 'fold') {\n if (entry.collapseOf !== undefined) {\n const collapseOf = entry.collapseOf\n return (\n <button\n key={entry.key}\n type=\"button\"\n onClick={() =>\n setExpanded((current) => {\n const next = new Set(current)\n next.delete(collapseOf)\n return next\n })\n }\n className=\"text-[var(--as-muted-fg)] hover:bg-[var(--as-subtle)] hover:text-[var(--as-fg)] flex w-full items-center gap-1 px-3 py-0.5 text-left text-[11px]\"\n >\n <ChevronDown className=\"size-3\" aria-hidden />\n {mergedLabels.showLess}\n </button>\n )\n }\n const foldOf = entry.foldOf\n return (\n <button\n key={entry.key}\n type=\"button\"\n onClick={() => {\n if (foldOf !== undefined) {\n setExpanded((current) => {\n const next = new Set(current)\n next.add(foldOf)\n return next\n })\n }\n }}\n className=\"text-[var(--as-muted-fg)] hover:bg-[var(--as-subtle)] hover:text-[var(--as-fg)] flex w-full items-center gap-1 px-3 py-0.5 text-left text-[11px]\"\n >\n <ChevronRight className=\"size-3\" aria-hidden />\n {mergedLabels.unchangedBlocks(row.count)}\n </button>\n )\n }\n const changed = isChangedRow(row)\n const active =\n activeGroupStart !== undefined &&\n activeGroupEnd !== undefined &&\n index >= activeGroupStart &&\n index < activeGroupEnd\n if (!changed) {\n const text = row.left?.text ?? row.right?.text ?? ''\n return (\n <div\n key={entry.key}\n ref={(node) => {\n if (node) {\n rowRefs.current.set(index, node)\n } else {\n rowRefs.current.delete(index)\n }\n }}\n data-context=\"\"\n className={cn('border-[var(--as-border)] px-3 py-1.5', active && 'bg-[var(--as-primary)]/5')}\n >\n <BlockSurface value={text} />\n </div>\n )\n }\n return (\n <div\n key={entry.key}\n ref={(node) => {\n if (node) {\n rowRefs.current.set(index, node)\n } else {\n rowRefs.current.delete(index)\n }\n }}\n className={cn('grid grid-cols-2', active && 'bg-[var(--as-primary)]/5')}\n data-changed={changed || undefined}\n data-active={active || undefined}\n >\n {(['left', 'right'] as const).map((side) => {\n const cell = row[side]\n const isAdd = cell?.kind === 'add'\n const isDel = cell?.kind === 'del'\n return (\n <div\n key={side}\n data-kind={isAdd ? 'add' : isDel ? 'del' : undefined}\n className={cn(\n 'min-w-0 px-3 py-1.5',\n isAdd && 'bg-[var(--as-success)]/10',\n isDel && 'bg-[var(--as-danger)]/10',\n cell === null && 'bg-[var(--as-subtle)]/50',\n )}\n >\n {cell === null ? null : <BlockSurface value={cell.text} />}\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n data-as=\"markdown-diff-view\"\n className={cn(\n 'bg-[var(--as-surface)] border-[var(--as-border)] flex flex-col overflow-hidden rounded-md border text-sm leading-relaxed',\n className,\n )}\n >\n {showHeader ? (\n <div className=\"border-[var(--as-border)] text-[var(--as-muted-fg)] grid grid-cols-[1fr_auto_1fr] items-center gap-2 border-b px-3 py-1.5 text-[11px] font-medium tracking-wide uppercase\">\n <span className=\"flex items-center gap-1\">\n <Minus className=\"size-3 text-[var(--as-danger)]\" aria-hidden />\n {mergedLabels.original}\n </span>\n <span className=\"flex items-center gap-2\">\n <span>\n <span className=\"text-[var(--as-success)]\">+{diff.added}</span>{' '}\n <span className=\"text-[var(--as-danger)]\">−{diff.removed}</span>\n </span>\n {showNav && changeGroups.length > 0 ? (\n <span className=\"flex items-center gap-0.5\">\n <button\n type=\"button\"\n aria-label={mergedLabels.prevChange}\n title={mergedLabels.prevChange}\n disabled={activeGroup === 0}\n onClick={() => setActiveGroup((value) => Math.max(0, value - 1))}\n className=\"hover:bg-[var(--as-border)] hover:text-[var(--as-fg)] rounded p-0.5 disabled:opacity-40\"\n >\n <ChevronUp className=\"size-3.5\" aria-hidden />\n </button>\n <span className=\"tabular-nums\">\n {mergedLabels.changePosition(activeGroup + 1, changeGroups.length)}\n </span>\n <button\n type=\"button\"\n aria-label={mergedLabels.nextChange}\n title={mergedLabels.nextChange}\n disabled={activeGroup >= changeGroups.length - 1}\n onClick={() =>\n setActiveGroup((value) => Math.min(changeGroups.length - 1, value + 1))\n }\n className=\"hover:bg-[var(--as-border)] hover:text-[var(--as-fg)] rounded p-0.5 disabled:opacity-40\"\n >\n <ChevronDown className=\"size-3.5\" aria-hidden />\n </button>\n </span>\n ) : null}\n </span>\n <span className=\"flex items-center justify-end gap-1\">\n {mergedLabels.suggested}\n <Plus className=\"size-3 text-[var(--as-success)]\" aria-hidden />\n </span>\n </div>\n ) : null}\n <div ref={scrollRef} className={cn('min-h-0 flex-1 overflow-y-auto', bodyClassName)}>\n {flatRows.map((entry, index) => renderRow(entry, index))}\n </div>\n </div>\n )\n})\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Button } from './chunk-4WBBF5LH.js';
|
|
2
|
+
import { cn } from './chunk-RVVXVTH3.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Sparkles, Loader2 } from 'lucide-react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var SetupFirstRunCard = React.forwardRef(function SetupFirstRunCard2({
|
|
8
|
+
title,
|
|
9
|
+
body,
|
|
10
|
+
localProbing = false,
|
|
11
|
+
onSetup,
|
|
12
|
+
onDismiss,
|
|
13
|
+
children,
|
|
14
|
+
setupLabel = "Set up a provider",
|
|
15
|
+
dismissLabel = "Dismiss",
|
|
16
|
+
probingLabel = "Checking for a local engine\u2026",
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) {
|
|
20
|
+
const titleId = React.useId();
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
22
|
+
"section",
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
"data-as": "setup-first-run-card",
|
|
26
|
+
"aria-labelledby": titleId,
|
|
27
|
+
className: cn(
|
|
28
|
+
"flex flex-col gap-3 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] p-4",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
34
|
+
/* @__PURE__ */ jsxs(
|
|
35
|
+
"h3",
|
|
36
|
+
{
|
|
37
|
+
id: titleId,
|
|
38
|
+
className: "flex items-center gap-2 text-base font-semibold text-[var(--as-fg)]",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "size-4 shrink-0 text-[var(--as-primary)]", "aria-hidden": true }),
|
|
41
|
+
title
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
body ? /* @__PURE__ */ jsx("p", { className: "text-sm text-[var(--as-muted-fg)]", children: body }) : null
|
|
46
|
+
] }),
|
|
47
|
+
children,
|
|
48
|
+
localProbing ? /* @__PURE__ */ jsxs(
|
|
49
|
+
"p",
|
|
50
|
+
{
|
|
51
|
+
role: "status",
|
|
52
|
+
className: "flex items-center gap-2 text-sm text-[var(--as-muted-fg)]",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": true }),
|
|
55
|
+
probingLabel
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) : null,
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: onSetup, children: setupLabel }),
|
|
61
|
+
onDismiss ? /* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", onClick: onDismiss, children: dismissLabel }) : null
|
|
62
|
+
] })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { SetupFirstRunCard };
|
|
69
|
+
//# sourceMappingURL=chunk-YDQW2WJH.js.map
|
|
70
|
+
//# sourceMappingURL=chunk-YDQW2WJH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/setup-first-run-card/SetupFirstRunCard.tsx"],"names":["SetupFirstRunCard"],"mappings":";;;;;;AAyBO,IAAM,iBAAA,GAA0B,KAAA,CAAA,UAAA,CAGrC,SAASA,kBAAAA,CACT;AAAA,EACE,KAAA;AAAA,EACA,IAAA;AAAA,EACA,YAAA,GAAe,KAAA;AAAA,EACf,OAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA,GAAa,mBAAA;AAAA,EACb,YAAA,GAAe,SAAA;AAAA,EACf,YAAA,GAAe,mCAAA;AAAA,EACf,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EACA,GAAA,EACA;AACA,EAAA,MAAM,UAAgB,KAAA,CAAA,KAAA,EAAM;AAC5B,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAQ,sBAAA;AAAA,MACR,iBAAA,EAAiB,OAAA;AAAA,MACjB,SAAA,EAAW,EAAA;AAAA,QACT,4GAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,qBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,IAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,EAAA,EAAI,OAAA;AAAA,cACJ,SAAA,EAAU,qEAAA;AAAA,cAEV,QAAA,EAAA;AAAA,gCAAA,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,0CAAA,EAA2C,aAAA,EAAW,IAAA,EAAC,CAAA;AAAA,gBAC1E;AAAA;AAAA;AAAA,WACH;AAAA,UACC,uBACC,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,mCAAA,EAAqC,gBAAK,CAAA,GACrD;AAAA,SAAA,EACN,CAAA;AAAA,QACC,QAAA;AAAA,QACA,YAAA,mBACC,IAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,QAAA;AAAA,YACL,SAAA,EAAU,2DAAA;AAAA,YAEV,QAAA,EAAA;AAAA,8BAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAU,qBAAA,EAAsB,aAAA,EAAW,IAAA,EAAC,CAAA;AAAA,cACpD;AAAA;AAAA;AAAA,SACH,GACE,IAAA;AAAA,wBACJ,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,MAAA,EAAA,EAAO,IAAA,EAAK,IAAA,EAAK,OAAA,EAAS,SACxB,QAAA,EAAA,UAAA,EACH,CAAA;AAAA,UACC,SAAA,mBACC,GAAA,CAAC,MAAA,EAAA,EAAO,IAAA,EAAK,IAAA,EAAK,SAAQ,OAAA,EAAQ,OAAA,EAAS,SAAA,EACxC,QAAA,EAAA,YAAA,EACH,CAAA,GACE;AAAA,SAAA,EACN;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC","file":"chunk-YDQW2WJH.js","sourcesContent":["import * as React from 'react'\nimport { Loader2, Sparkles } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { Button } from '../button/Button'\n\nexport interface SetupFirstRunCardProps\n extends Omit<React.ComponentProps<'section'>, 'title'> {\n title: React.ReactNode\n body?: React.ReactNode\n /** The app is probing for a local engine (e.g. Ollama) — renders the\n * `probingLabel` status line while it runs. */\n localProbing?: boolean\n onSetup: () => void\n /** Optional dismiss — omit to render the card without a dismiss action. */\n onDismiss?: () => void\n /** App content between body and actions (e.g. a detected-local banner). */\n children?: React.ReactNode\n setupLabel?: string\n dismissLabel?: string\n probingLabel?: string\n}\n\n/** Empty-state CTA for the AI-settings surface when no provider is\n * configured yet (plan 26 §6) — the entry point of the setup flow. Chat\n * empty states deep-link to the settings surface that renders this card. */\nexport const SetupFirstRunCard = React.forwardRef<\n HTMLElement,\n SetupFirstRunCardProps\n>(function SetupFirstRunCard(\n {\n title,\n body,\n localProbing = false,\n onSetup,\n onDismiss,\n children,\n setupLabel = 'Set up a provider',\n dismissLabel = 'Dismiss',\n probingLabel = 'Checking for a local engine…',\n className,\n ...props\n },\n ref,\n) {\n const titleId = React.useId()\n return (\n <section\n ref={ref}\n data-as=\"setup-first-run-card\"\n aria-labelledby={titleId}\n className={cn(\n 'flex flex-col gap-3 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] p-4',\n className,\n )}\n {...props}\n >\n <div className=\"flex flex-col gap-1\">\n <h3\n id={titleId}\n className=\"flex items-center gap-2 text-base font-semibold text-[var(--as-fg)]\"\n >\n <Sparkles className=\"size-4 shrink-0 text-[var(--as-primary)]\" aria-hidden />\n {title}\n </h3>\n {body ? (\n <p className=\"text-sm text-[var(--as-muted-fg)]\">{body}</p>\n ) : null}\n </div>\n {children}\n {localProbing ? (\n <p\n role=\"status\"\n className=\"flex items-center gap-2 text-sm text-[var(--as-muted-fg)]\"\n >\n <Loader2 className=\"size-4 animate-spin\" aria-hidden />\n {probingLabel}\n </p>\n ) : null}\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" onClick={onSetup}>\n {setupLabel}\n </Button>\n {onDismiss ? (\n <Button size=\"sm\" variant=\"ghost\" onClick={onDismiss}>\n {dismissLabel}\n </Button>\n ) : null}\n </div>\n </section>\n )\n})\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -597,6 +597,211 @@ interface ProviderFormProps extends React.ComponentProps<'div'> {
|
|
|
597
597
|
*/
|
|
598
598
|
declare const ProviderForm: React.ForwardRefExoticComponent<Omit<ProviderFormProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
599
599
|
|
|
600
|
+
/** One preset entry (ADR-006: the catalog is app data — the tiles only
|
|
601
|
+
* render it, in the order given, with equal weight). */
|
|
602
|
+
interface ProviderSetupTileData {
|
|
603
|
+
key: string;
|
|
604
|
+
name: string;
|
|
605
|
+
/** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */
|
|
606
|
+
local?: boolean;
|
|
607
|
+
/** Disabled tiles render inert with their reason (health's overlay). */
|
|
608
|
+
disabled?: boolean;
|
|
609
|
+
disabledReason?: string;
|
|
610
|
+
/** The preset ships a key-prefix hint (informational for the app). */
|
|
611
|
+
hasKeyPrefixHint?: boolean;
|
|
612
|
+
}
|
|
613
|
+
interface ProviderSetupTilesProps extends Omit<React.ComponentProps<'div'>, 'onSelect' | 'children'> {
|
|
614
|
+
/** Presets in the app's family order — the grid keeps it verbatim. */
|
|
615
|
+
presets: ProviderSetupTileData[];
|
|
616
|
+
/** Preset keys already configured (renders the `configuredLabel` badge). */
|
|
617
|
+
configured?: string[];
|
|
618
|
+
/** Key of a tile the app's paste-prefix match suggests (highlight only —
|
|
619
|
+
* never a "recommended" ranking; all tiles stay equal weight). */
|
|
620
|
+
suggestedKey?: string;
|
|
621
|
+
/** Fires with the preset key of the activated tile. */
|
|
622
|
+
onSelect: (key: string) => void;
|
|
623
|
+
/** Extra grid cell (e.g. the "Manual / custom" tile) — app-composed. */
|
|
624
|
+
children?: React.ReactNode;
|
|
625
|
+
label?: string;
|
|
626
|
+
localLabel?: string;
|
|
627
|
+
configuredLabel?: string;
|
|
628
|
+
/** Visually-hidden text marking the suggested tile. */
|
|
629
|
+
suggestedLabel?: string;
|
|
630
|
+
}
|
|
631
|
+
/** Neutral, equal-weight provider picker grid — step one of the family's
|
|
632
|
+
* one-click setup (plan 26 §6): tiles in family order, no "recommended"
|
|
633
|
+
* anywhere, local presets visible, disabled presets explain themselves. */
|
|
634
|
+
declare const ProviderSetupTiles: React.ForwardRefExoticComponent<Omit<ProviderSetupTilesProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
635
|
+
/** The "manual / custom" tile apps append as `children` of the grid. */
|
|
636
|
+
declare const ProviderSetupManualTile: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
637
|
+
|
|
638
|
+
/** The shared §15 error-routing enum (family contract — apps key their i18n
|
|
639
|
+
* off exactly these codes). */
|
|
640
|
+
declare const SETUP_ERROR_CODES: readonly ["invalid_key", "insufficient_credit", "new_user_quota", "region_unavailable", "timeout", "local_not_running", "unknown"];
|
|
641
|
+
type SetupErrorCode = (typeof SETUP_ERROR_CODES)[number];
|
|
642
|
+
/** English fallback copy per code — apps inject translated labels via
|
|
643
|
+
* `errorLabels` (the library ships no i18n engine, ADR-006). */
|
|
644
|
+
declare const DEFAULT_SETUP_ERROR_COPY: Record<SetupErrorCode, string>;
|
|
645
|
+
/** Guided-setup preset slice (app data; snake_case API fields map app-side). */
|
|
646
|
+
interface ProviderSetupFormPreset {
|
|
647
|
+
name: string;
|
|
648
|
+
keyUrl?: string;
|
|
649
|
+
steps?: string[];
|
|
650
|
+
freeTierNote?: string;
|
|
651
|
+
fixedBase?: boolean;
|
|
652
|
+
baseUrl: string;
|
|
653
|
+
/** Keyless local preset — renders `noKeyLabel` instead of the key field. */
|
|
654
|
+
local?: boolean;
|
|
655
|
+
}
|
|
656
|
+
interface ProviderSetupFormValue {
|
|
657
|
+
name: string;
|
|
658
|
+
apiKey: string;
|
|
659
|
+
baseUrl?: string;
|
|
660
|
+
}
|
|
661
|
+
/** Classified setup failure (§15 error routing) — copy comes from
|
|
662
|
+
* `errorLabels`, keyed off the code. */
|
|
663
|
+
interface ProviderSetupFormError {
|
|
664
|
+
code: SetupErrorCode | string;
|
|
665
|
+
suspectedVendor?: string | null;
|
|
666
|
+
}
|
|
667
|
+
interface ProviderSetupFormProps extends Omit<React.ComponentProps<'form'>, 'onChange' | 'onSubmit'> {
|
|
668
|
+
preset: ProviderSetupFormPreset;
|
|
669
|
+
/** Controlled field values. */
|
|
670
|
+
value: ProviderSetupFormValue;
|
|
671
|
+
error?: ProviderSetupFormError | null;
|
|
672
|
+
/** Validation/connection test in flight — disables + marks the submit. */
|
|
673
|
+
testing?: boolean;
|
|
674
|
+
onSubmit: (value: ProviderSetupFormValue) => void;
|
|
675
|
+
onCancel?: () => void;
|
|
676
|
+
onChange: (value: ProviderSetupFormValue) => void;
|
|
677
|
+
/** Translated error copy per §15 code (`{vendor}` interpolates in the hint). */
|
|
678
|
+
errorLabels?: Partial<Record<string, string>>;
|
|
679
|
+
suspectedVendorHint?: string;
|
|
680
|
+
/** Notified when a checklist step is copied (Electron apps mirror the copy
|
|
681
|
+
* through their IPC clipboard; the browser write always happens). */
|
|
682
|
+
onCopyStep?: (step: string) => void;
|
|
683
|
+
/** Opens the key page — render an anchor by default; Electron apps pass
|
|
684
|
+
* their `openExternal` bridge to get a button instead. */
|
|
685
|
+
onOpenKeyUrl?: (url: string) => void;
|
|
686
|
+
/** Extra app content inside the Advanced disclosure (hosting toggle,
|
|
687
|
+
* country select — study/health pattern). */
|
|
688
|
+
advancedExtra?: React.ReactNode;
|
|
689
|
+
checklistLabel?: string;
|
|
690
|
+
copyLabel?: string;
|
|
691
|
+
getKeyLabel?: string;
|
|
692
|
+
nameLabel?: string;
|
|
693
|
+
apiKeyLabel?: string;
|
|
694
|
+
keyPlaceholder?: string;
|
|
695
|
+
noKeyLabel?: string;
|
|
696
|
+
advancedLabel?: string;
|
|
697
|
+
baseUrlLabel?: string;
|
|
698
|
+
baseUrlHint?: string;
|
|
699
|
+
submitLabel?: string;
|
|
700
|
+
cancelLabel?: string;
|
|
701
|
+
}
|
|
702
|
+
/** Guided one-click setup form (plan 26 §6): vendor checklist with copy
|
|
703
|
+
* buttons and key link, connection name, write-only API key
|
|
704
|
+
* (`autoComplete="new-password"`), and an Advanced disclosure whose base URL
|
|
705
|
+
* is read-only for fixed-endpoint presets. Validation, secrets and IPC are
|
|
706
|
+
* the app's business (ADR-006) — the form reports `onSubmit`. */
|
|
707
|
+
declare const ProviderSetupForm: React.ForwardRefExoticComponent<Omit<ProviderSetupFormProps, "ref"> & React.RefAttributes<HTMLFormElement>>;
|
|
708
|
+
|
|
709
|
+
/** One curated model card (capability icons render from `caps`). */
|
|
710
|
+
interface SetupReviewModel {
|
|
711
|
+
id: string;
|
|
712
|
+
name: string;
|
|
713
|
+
caps?: string[];
|
|
714
|
+
selected: boolean;
|
|
715
|
+
}
|
|
716
|
+
/** The five-bind option keys of the §15 options body (camelCase — desktop
|
|
717
|
+
* IPC; Python apps convert to snake_case app-side). */
|
|
718
|
+
type SetupReviewOptionsKey = 'bindChat' | 'bindVision' | 'bindStt' | 'bindDecision';
|
|
719
|
+
/** One gap-fill switch. Pass one slot per `optionsKey` — chat presets show
|
|
720
|
+
* text/vision/stt slots, decision-only presets show the decision slot only;
|
|
721
|
+
* the current value of every slot the bind would fill rides `currentValue`. */
|
|
722
|
+
interface SetupReviewSlot {
|
|
723
|
+
id: string;
|
|
724
|
+
label: string;
|
|
725
|
+
bind: boolean;
|
|
726
|
+
currentValue?: string;
|
|
727
|
+
optionsKey: SetupReviewOptionsKey;
|
|
728
|
+
}
|
|
729
|
+
/** The options body a setup run carries (plan 26 D14) — `curatedIds` in the
|
|
730
|
+
* order the cards are given, one bind flag per capability group. */
|
|
731
|
+
interface SetupReviewOptions {
|
|
732
|
+
curatedIds: string[];
|
|
733
|
+
bindChat: boolean;
|
|
734
|
+
bindVision: boolean;
|
|
735
|
+
bindStt: boolean;
|
|
736
|
+
bindDecision: boolean;
|
|
737
|
+
}
|
|
738
|
+
interface SetupReviewProps extends React.ComponentProps<'div'> {
|
|
739
|
+
models: SetupReviewModel[];
|
|
740
|
+
slots: SetupReviewSlot[];
|
|
741
|
+
/** Emits the full options body on every card/switch edit — controlled:
|
|
742
|
+
* feed the changed state back through `models`/`slots`. */
|
|
743
|
+
onOptionsChange: (options: SetupReviewOptions) => void;
|
|
744
|
+
/** Per-capability icon override (capability string → icon). */
|
|
745
|
+
capIcons?: Partial<Record<string, LucideIcon>>;
|
|
746
|
+
modelsLabel?: string;
|
|
747
|
+
footnote?: string;
|
|
748
|
+
}
|
|
749
|
+
/** Editable pre-flight review (plan 26 §6): model-select cards with
|
|
750
|
+
* capability icons plus gap-fill switch rows with `now:` sub-lines and the
|
|
751
|
+
* never-removes footnote. Emits the five-bind options body
|
|
752
|
+
* `{curatedIds, bindChat, bindVision, bindStt, bindDecision}` — append
|
|
753
|
+
* semantics mean nothing existing is ever removed. */
|
|
754
|
+
declare const SetupReview: React.ForwardRefExoticComponent<Omit<SetupReviewProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
755
|
+
|
|
756
|
+
interface SetupFirstRunCardProps extends Omit<React.ComponentProps<'section'>, 'title'> {
|
|
757
|
+
title: React.ReactNode;
|
|
758
|
+
body?: React.ReactNode;
|
|
759
|
+
/** The app is probing for a local engine (e.g. Ollama) — renders the
|
|
760
|
+
* `probingLabel` status line while it runs. */
|
|
761
|
+
localProbing?: boolean;
|
|
762
|
+
onSetup: () => void;
|
|
763
|
+
/** Optional dismiss — omit to render the card without a dismiss action. */
|
|
764
|
+
onDismiss?: () => void;
|
|
765
|
+
/** App content between body and actions (e.g. a detected-local banner). */
|
|
766
|
+
children?: React.ReactNode;
|
|
767
|
+
setupLabel?: string;
|
|
768
|
+
dismissLabel?: string;
|
|
769
|
+
probingLabel?: string;
|
|
770
|
+
}
|
|
771
|
+
/** Empty-state CTA for the AI-settings surface when no provider is
|
|
772
|
+
* configured yet (plan 26 §6) — the entry point of the setup flow. Chat
|
|
773
|
+
* empty states deep-link to the settings surface that renders this card. */
|
|
774
|
+
declare const SetupFirstRunCard: React.ForwardRefExoticComponent<Omit<SetupFirstRunCardProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
775
|
+
|
|
776
|
+
interface SwitchRowProps extends Omit<React.ComponentProps<'button'>, 'onChange'> {
|
|
777
|
+
/** Visible row label — doubles as the switch's accessible name. */
|
|
778
|
+
label: React.ReactNode;
|
|
779
|
+
/** Controlled on/off state. */
|
|
780
|
+
checked: boolean;
|
|
781
|
+
/** Controlled toggle. */
|
|
782
|
+
onCheckedChange: (checked: boolean) => void;
|
|
783
|
+
/** Sub-line under the label — apps pass the current value ("now: gpt-5"). */
|
|
784
|
+
currentValue?: React.ReactNode;
|
|
785
|
+
disabled?: boolean;
|
|
786
|
+
}
|
|
787
|
+
/** Labeled `role="switch"` row with an animated knob — the standalone
|
|
788
|
+
* settings toggle the family's setup surfaces (desktop/study/health)
|
|
789
|
+
* previously hand-rolled. */
|
|
790
|
+
declare const SwitchRow: React.ForwardRefExoticComponent<Omit<SwitchRowProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
791
|
+
|
|
792
|
+
interface ProviderLogoProps extends React.ComponentProps<'span'> {
|
|
793
|
+
/** Preset key (`'openai'`, `'gemini'`, …) — unknown/unshipped marks fall
|
|
794
|
+
* back to a monogram of the key's first letter. */
|
|
795
|
+
preset: string;
|
|
796
|
+
/** Square icon size in px. */
|
|
797
|
+
size?: number;
|
|
798
|
+
}
|
|
799
|
+
/** Provider mark for setup tiles and rows: simple-icons path data keyed by
|
|
800
|
+
* preset key, monogram fallback (openai/groq marks are gone upstream),
|
|
801
|
+
* `currentColor` so it inherits app identity. Decorative by default
|
|
802
|
+
* (`aria-hidden`) — name the tile/button it lives in. */
|
|
803
|
+
declare const ProviderLogo: React.ForwardRefExoticComponent<Omit<ProviderLogoProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
804
|
+
|
|
600
805
|
interface SettingsNavItem {
|
|
601
806
|
id: string;
|
|
602
807
|
label: string;
|
|
@@ -3487,4 +3692,4 @@ interface ChatLauncherProps {
|
|
|
3487
3692
|
*/
|
|
3488
3693
|
declare const ChatLauncher: React.ForwardRefExoticComponent<ChatLauncherProps & React.RefAttributes<HTMLButtonElement>>;
|
|
3489
3694
|
|
|
3490
|
-
export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatPending, type ChatPendingProps, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSearchField, type ChatSearchFieldLabels, type ChatSearchFieldProps, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatSuggestionCard, type ChatSuggestionCardProps, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, ChatWelcome, type ChatWelcomeProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, type ProviderPresetOption, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, describeInstanceModeError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
|
|
3695
|
+
export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatPending, type ChatPendingProps, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSearchField, type ChatSearchFieldLabels, type ChatSearchFieldProps, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatSuggestionCard, type ChatSuggestionCardProps, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, ChatWelcome, type ChatWelcomeProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DEFAULT_SETUP_ERROR_COPY, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, ProviderLogo, type ProviderLogoProps, type ProviderPresetOption, ProviderSetupForm, type ProviderSetupFormError, type ProviderSetupFormPreset, type ProviderSetupFormProps, type ProviderSetupFormValue, ProviderSetupManualTile, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, SETUP_ERROR_CODES, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, type SetupErrorCode, SetupFirstRunCard, type SetupFirstRunCardProps, SetupReview, type SetupReviewModel, type SetupReviewOptions, type SetupReviewOptionsKey, type SetupReviewProps, type SetupReviewSlot, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, SwitchRow, type SwitchRowProps, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, describeInstanceModeError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
export { UndoNotice } from './chunk-AT32ANZW.js';
|
|
2
|
-
export { ViewToggle } from './chunk-XZIJIGEB.js';
|
|
3
1
|
export { Stepper, Wizard } from './chunk-ZNVWHGKM.js';
|
|
4
|
-
export { TaskAssignmentPicker } from './chunk-3YIVKKT6.js';
|
|
5
|
-
export { SettingsShell } from './chunk-YPDIA54W.js';
|
|
6
2
|
export { SidebarNav } from './chunk-VAUB5TDF.js';
|
|
7
3
|
export { UserMenu } from './chunk-CYK3ZLAB.js';
|
|
8
4
|
export { ThemeScope } from './chunk-TGU3PKNM.js';
|
|
9
5
|
export { TimeList } from './chunk-67W2OLOQ.js';
|
|
10
6
|
export { TimePicker, TimePickerContent } from './chunk-WQ5MPOYG.js';
|
|
11
7
|
export { InfoTooltip, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './chunk-NDZ22QGX.js';
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
8
|
+
export { UndoNotice } from './chunk-AT32ANZW.js';
|
|
9
|
+
export { ViewToggle } from './chunk-XZIJIGEB.js';
|
|
14
10
|
export { SegmentedTabs } from './chunk-5IEBIDXQ.js';
|
|
15
11
|
export { SelectionBar } from './chunk-LXKRUJIS.js';
|
|
16
12
|
export { Skeleton, SkeletonText } from './chunk-4OJXAFGA.js';
|
|
17
13
|
export { HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger } from './chunk-PNYJ5VX2.js';
|
|
18
14
|
export { Table } from './chunk-53JFRZAO.js';
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
15
|
+
export { TaskAssignmentPicker } from './chunk-3YIVKKT6.js';
|
|
16
|
+
export { SettingsShell } from './chunk-YPDIA54W.js';
|
|
21
17
|
export { RangeBar } from './chunk-3UDWLHLD.js';
|
|
22
18
|
export { ScaleSlider, scaleColorForValue } from './chunk-NLHODVBI.js';
|
|
23
19
|
export { SearchInput } from './chunk-UUIMMMSJ.js';
|
|
20
|
+
export { ModelRegistry } from './chunk-I5H4KYEZ.js';
|
|
21
|
+
export { CapabilityChips } from './chunk-SY5FR4HC.js';
|
|
22
|
+
export { ProfileSwitcher } from './chunk-6ANLDUGL.js';
|
|
23
|
+
export { CUSTOM_PRESET_KEY, ProviderForm } from './chunk-UMI4M4MF.js';
|
|
24
|
+
export { DEFAULT_SETUP_ERROR_COPY, ProviderSetupForm, SETUP_ERROR_CODES } from './chunk-6G7H6YP6.js';
|
|
25
|
+
export { ProviderSetupManualTile, ProviderSetupTiles } from './chunk-65JY3ATO.js';
|
|
26
|
+
export { ProviderLogo } from './chunk-7IP3JP3Z.js';
|
|
27
|
+
export { SetupFirstRunCard } from './chunk-YDQW2WJH.js';
|
|
28
|
+
export { SetupReview } from './chunk-FY3NCPFO.js';
|
|
29
|
+
export { SwitchRow } from './chunk-FQXVZVA5.js';
|
|
24
30
|
export { MarqueeBand, MarqueeSurface, hitTestIds, marqueeRect, rectsIntersect, useMarquee } from './chunk-RU3DEF2O.js';
|
|
25
|
-
export { MarkdownDiffView, splitMarkdownBlocks } from './chunk-
|
|
31
|
+
export { MarkdownDiffView, splitMarkdownBlocks } from './chunk-TLFEVL42.js';
|
|
26
32
|
export { ModelPicker } from './chunk-CCFVDJHU.js';
|
|
27
33
|
export { PanelModal } from './chunk-6O4LOWZG.js';
|
|
28
34
|
export { LoginForm } from './chunk-3V5EBB4N.js';
|
|
@@ -64,10 +70,10 @@ export { ChatPending } from './chunk-F4BTJQLK.js';
|
|
|
64
70
|
export { ChatTurnStatus } from './chunk-GIQZNEG5.js';
|
|
65
71
|
export { ChatWelcome } from './chunk-OOQO6VGO.js';
|
|
66
72
|
export { ChatSuggestionCard } from './chunk-PABMR4RA.js';
|
|
67
|
-
export { ChatSearchField, ChatTranscript } from './chunk-
|
|
68
|
-
export { MarkdownCodeBlock, MarkdownSurface, MermaidDiagram } from './chunk-
|
|
73
|
+
export { ChatSearchField, ChatTranscript } from './chunk-E2NNTHFB.js';
|
|
74
|
+
export { MarkdownCodeBlock, MarkdownSurface, MermaidDiagram } from './chunk-KLCULTOQ.js';
|
|
69
75
|
export { CopyButton } from './chunk-XFYCNCPS.js';
|
|
70
|
-
export { ChatMessage, ChatMessageEditor, MessageVariantSwitcher } from './chunk-
|
|
76
|
+
export { ChatMessage, ChatMessageEditor, MessageVariantSwitcher } from './chunk-56QSIK4Y.js';
|
|
71
77
|
export { ChatBranchTree } from './chunk-BG44GKXQ.js';
|
|
72
78
|
export { AiMagicFill } from './chunk-X6L5Z5LV.js';
|
|
73
79
|
export { FormModal } from './chunk-QPY2Y532.js';
|