@hachej/boring-ui-kit 0.4.12 → 0.4.13
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/package.json +2 -2
- package/r/agent-target.json +4 -4
- package/r/app-shell.json +9 -9
- package/r/board-viewer.json +12 -6
- package/r/button.json +1 -1
- package/r/diagram-viewer.json +8 -2
- package/r/dock.json +1 -1
- package/r/documents.json +14 -12
- package/r/feedback-preview.json +1 -1
- package/r/feedback.json +6 -6
- package/r/file-tree.json +5 -5
- package/r/highlights.json +3 -3
- package/r/html-viewer.json +3 -3
- package/r/looks-viewer.json +9 -3
- package/r/maquette-viewer.json +9 -3
- package/r/markdown-editor.json +3 -3
- package/r/mockup-viewer.json +14 -2
- package/r/pi-ambient.json +10 -10
- package/r/pi-app.json +31 -20
- package/r/pi-artifacts.json +3 -3
- package/r/pi-chat-approval.json +1 -1
- package/r/pi-chat-attachments.json +1 -1
- package/r/pi-chat-markdown.json +2 -2
- package/r/pi-chat-mentions.json +1 -1
- package/r/pi-chat-pickers.json +1 -1
- package/r/pi-chat-plugins.json +11 -11
- package/r/pi-chat-question.json +1 -1
- package/r/pi-chat-slash.json +1 -1
- package/r/pi-chat-subagent.json +1 -1
- package/r/pi-chat-voice.json +2 -2
- package/r/pi-chat.json +5 -5
- package/r/pi-workspace.json +4 -4
- package/r/placed-agent.json +4 -4
- package/r/provider-setup.json +2 -2
- package/r/record-viewer.json +8 -2
- package/r/registry.json +396 -203
- package/r/requests-board.json +1 -1
- package/r/shared-chat.json +6 -6
- package/r/task-list-viewer.json +2 -2
- package/r/version-history.json +3 -3
- package/r/viewer-code.json +36 -0
- package/r/viewer-frame.json +447 -0
- package/r/viewer-html.json +32 -0
- package/r/viewer-image.json +36 -0
- package/r/viewer-markdown.json +47 -0
- package/r/viewer-pdf.json +45 -0
- package/r/viewers.json +8 -491
- package/r/windows.json +1 -1
package/r/requests-board.json
CHANGED
package/r/shared-chat.json
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"title": "Shared chat",
|
|
5
5
|
"description": "Optional multi-party host log presentation over PiChat's generic composition seams. No agent runtime or speaking policy.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.13",
|
|
8
8
|
"react@^19.0.0",
|
|
9
9
|
"lucide-react@^1.51.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
12
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
13
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
14
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
15
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
16
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/pi-chat.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/pi-chat-plugins.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/pi-chat-markdown.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/pi-chat-mentions.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/theme.json",
|
|
17
17
|
"avatar",
|
|
18
18
|
"badge",
|
|
19
19
|
"button",
|
package/r/task-list-viewer.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"title": "Consumer task-list viewer",
|
|
5
5
|
"description": "A consumer-defined task-list schema and controller over the shared text buffer, with a restylable borrowed React renderer.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.13",
|
|
8
|
+
"@hachej/boring-files@^0.4.13",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"react-dom@^19.0.0",
|
|
11
11
|
"zod@^4.6.5"
|
package/r/version-history.json
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Version history rows",
|
|
5
5
|
"description": "Shared view-only version rows and menu metadata with relative time, provenance and Current. No file reads, publication or restoration.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-files@^0.4.13",
|
|
8
8
|
"react@^19.0.0"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
11
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
12
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/theme.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/button.json",
|
|
13
13
|
"button"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "viewer-code",
|
|
4
|
+
"title": "Code viewers",
|
|
5
|
+
"description": "The SVG and CSV kinds: `svgKind` (a preview from a blob URL, or its source) and `csvKind` (a table), drawn inside the artifact panel's bar. Each view loads the first time its artifact opens; other code stays in the panel's code block.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"react@^19.0.0",
|
|
8
|
+
"lucide-react@^1.51.0"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/viewer-frame.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.13/r/pi-chat.json",
|
|
13
|
+
"table"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
{
|
|
17
|
+
"path": "registry/viewer-code/code-kinds.ts",
|
|
18
|
+
"content": "import type { ComponentType } from 'react';\nimport type { CodeViewProps } from './svg-view';\n\n/**\n * The code kinds (D-257): an SVG artifact (preview from a blob URL, or its source) and a CSV artifact (a table). Both draw inside the\n * panel's viewer bar, with its copy and download. This module is cheap; each view loads the first time its artifact opens. Other code\n * and text stay in the panel's own code block.\n */\nexport interface CodeKind {\n readonly match: (target: { readonly resource: { readonly path: string } }, artifact: { readonly type: string; readonly language?: string | undefined }) => boolean;\n readonly label?: string | undefined;\n /** A default viewer for a type: a host's `viewers.svg` or `viewers.code` wins over it. */\n readonly fallback: true;\n readonly load: () => Promise<{ readonly default: ComponentType<CodeViewProps> }>;\n}\n\nexport const svgKind: CodeKind = {\n match: (_target, artifact) => artifact.type === 'svg',\n fallback: true,\n load: () => import('./svg-view').then(module => ({ default: module.SvgView })),\n};\n\nexport const csvKind: CodeKind = {\n match: (_target, artifact) => artifact.type === 'code' && artifact.language === 'csv',\n fallback: true,\n load: () => import('./csv-table').then(module => ({ default: module.CsvView })),\n};\n",
|
|
19
|
+
"type": "registry:lib",
|
|
20
|
+
"target": "components/viewer-code/code-kinds.ts"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "registry/viewer-code/svg-view.tsx",
|
|
24
|
+
"content": "'use client';\n\nimport { useEffect, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { CodeXmlIcon, EyeIcon } from 'lucide-react';\nimport { CodeBlock } from '../pi-chat/code-block';\nimport { ViewerToggle } from '../viewer-frame/viewer-frame';\nimport { useViewerText } from '../viewer-frame/viewer-window';\n\n/** What the code kinds' views read of the panel's kind props (structurally `ArtifactKindViewProps` of pi-artifacts). */\nexport interface CodeViewProps {\n readonly text: string;\n readonly artifact: { readonly title: string };\n /** The panel bar's controls slot (the preview and source toggle goes there). */\n readonly setControls?: ((controls: ReactNode) => void) | undefined;\n}\n\n/** An SVG artifact: a preview, or its source. The preview is an image from a blob URL: it never becomes markup in this page, so its scripts cannot run. */\nexport function SvgView({ text, artifact, setControls }: CodeViewProps) {\n const { labels } = useViewerText();\n const [mode, setMode] = useState<'preview' | 'source'>('preview');\n const url = useMemo(() => URL.createObjectURL(new Blob([text], { type: 'image/svg+xml' })), [text]);\n useEffect(() => () => URL.revokeObjectURL(url), [url]);\n useEffect(() => {\n setControls?.(<ViewerToggle label={labels.view} value={mode} onChange={setMode} options={[\n { id: 'preview', label: labels.preview, text: labels.preview, icon: <EyeIcon className=\"size-4\" aria-hidden=\"true\" />, testId: 'artifact-mode' },\n { id: 'source', label: labels.source, text: labels.source, icon: <CodeXmlIcon className=\"size-4\" aria-hidden=\"true\" />, testId: 'artifact-mode' }]} />);\n return () => setControls?.(undefined);\n }, [setControls, mode, labels.view, labels.preview, labels.source]);\n return mode === 'preview'\n ? <div className=\"boring-viewer-checker flex h-full min-h-0 items-center justify-center overflow-auto p-6\"><img data-testid=\"artifact-svg\" src={url} alt={artifact.title} className=\"max-h-full max-w-full\" /></div>\n : <div className=\"min-h-0 p-3\"><CodeBlock code={text} language=\"svg\" /></div>;\n}\n",
|
|
25
|
+
"type": "registry:component",
|
|
26
|
+
"target": "components/viewer-code/svg-view.tsx"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "registry/viewer-code/csv-table.tsx",
|
|
30
|
+
"content": "'use client';\n\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';\nimport type { CodeViewProps } from './svg-view';\n\n/** Rows of a CSV text (comma or semicolon separated, double-quoted cells with `\"\"` escapes), at most 2000. */\nexport function csvRows(text: string): string[][] {\n const rows: string[][] = []; let row: string[] = [], cell = '', quoted = false;\n for (let i = 0; i < text.length && rows.length < 2000; i++) {\n const c = text[i];\n if (quoted) { if (c === '\"' && text[i + 1] === '\"') { cell += '\"'; i++; } else if (c === '\"') quoted = false; else cell += c; }\n else if (c === '\"') quoted = true;\n else if (c === ',' || c === ';') { row.push(cell); cell = ''; }\n else if (c === '\\n' || c === '\\r') { if (c === '\\r' && text[i + 1] === '\\n') i++; row.push(cell); rows.push(row); row = []; cell = ''; }\n else cell += c;\n }\n if ((cell || row.length) && rows.length < 2000) { row.push(cell); rows.push(row); }\n return rows;\n}\n\n/** A CSV artifact as a table: the first row is the header. */\nexport function CsvView({ text }: CodeViewProps) {\n const [head = [], ...rows] = csvRows(text);\n return <Table data-testid=\"artifact-csv\">\n <TableHeader><TableRow>{head.map((cell, i) => <TableHead key={i}>{cell}</TableHead>)}</TableRow></TableHeader>\n <TableBody>{rows.map((row, i) => <TableRow key={i}>{row.map((cell, j) => <TableCell key={j} className=\"align-top\">{cell}</TableCell>)}</TableRow>)}</TableBody>\n </Table>;\n}\n",
|
|
31
|
+
"type": "registry:component",
|
|
32
|
+
"target": "components/viewer-code/csv-table.tsx"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"type": "registry:component"
|
|
36
|
+
}
|