@hachej/boring-ui-kit 0.4.37 → 0.4.38
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/dist/shared-chat/room.js +23 -7
- package/dist/shared-chat/source.d.ts +3 -0
- package/package.json +2 -2
- package/r/agent-target.json +4 -4
- package/r/app-shell.json +10 -10
- package/r/board-viewer.json +6 -6
- package/r/button.json +1 -1
- package/r/dock.json +1 -1
- package/r/documents.json +12 -12
- package/r/feedback-preview.json +1 -1
- package/r/feedback.json +6 -6
- package/r/file-tree.json +4 -4
- package/r/highlights.json +3 -3
- package/r/html-viewer.json +3 -3
- package/r/looks-viewer.json +2 -2
- package/r/maquette-viewer.json +1 -1
- package/r/markdown-editor.json +3 -3
- package/r/mockup-viewer.json +1 -1
- package/r/pi-ambient.json +8 -8
- package/r/pi-app-kinds.json +10 -10
- package/r/pi-app.json +10 -10
- package/r/pi-artifacts.json +2 -2
- package/r/pi-chat-approval.json +2 -2
- 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 +2 -2
- package/r/pi-chat-subagent.json +1 -1
- package/r/pi-chat-voice.json +3 -3
- package/r/pi-chat.json +5 -5
- package/r/pi-workspace.json +3 -3
- package/r/placed-agent.json +4 -4
- package/r/pm-panel.json +14 -14
- package/r/provider-setup.json +1 -1
- package/r/registry.json +183 -183
- package/r/requests-board.json +1 -1
- package/r/shared-chat.json +9 -9
- package/r/task-board.json +2 -2
- package/r/task-list-viewer.json +2 -2
- package/r/task-mentions.json +4 -4
- package/r/version-history.json +2 -2
- package/r/viewer-code.json +2 -2
- package/r/viewer-frame.json +4 -4
- package/r/viewer-html.json +4 -4
- package/r/viewer-image.json +2 -2
- package/r/viewer-markdown.json +5 -5
- package/r/viewer-pdf.json +3 -3
- package/r/viewers.json +6 -6
- package/r/windows.json +1 -1
package/r/pi-chat-plugins.json
CHANGED
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
"react@^19.0.0"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
11
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
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.
|
|
17
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
18
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
19
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
20
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
10
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat.json",
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-markdown.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-slash.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-mentions.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-pickers.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-voice.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-attachments.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-question.json",
|
|
18
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-approval.json",
|
|
19
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-subagent.json",
|
|
20
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-artifacts.json"
|
|
21
21
|
],
|
|
22
22
|
"files": [
|
|
23
23
|
{
|
package/r/pi-chat-question.json
CHANGED
package/r/pi-chat-slash.json
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Pi chat slash menu",
|
|
5
5
|
"description": "The composer's `/` menu of commands and skills (and the Commands entry of the + menu). Plug it in with `slash={{ ...config, Picker: SlashPicker }}`; without it pi-chat has no `/` menu.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.38",
|
|
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.
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat.json"
|
|
13
13
|
],
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
package/r/pi-chat-subagent.json
CHANGED
package/r/pi-chat-voice.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "Pi chat voice messages",
|
|
5
5
|
"description": "Tap-to-record voice messages: a compatibility export of the kit's chat-react/voice recorder hook, the composer's record button and the pending voice bubble, plus useHoldToRecord. Plug it in with `voiceMessage={{ ...config, ...voiceMessagePlugin }}`; without it pi-chat has no voice button.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.38",
|
|
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.
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/utils.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat.json"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
package/r/pi-chat.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"title": "Pi chat",
|
|
5
5
|
"description": "A complete Tailwind chat over the borrowed native chat controller: composer, messages, one collapsible activity block per turn (tool calls and reasoning), message queue, history and feedback cards for the opt-in feedback tool (lists, and Show offers that the host page resolves). Chat only: no layout. Owned, editable source; no AI SDK. The question, approval, sub-agent and artifact cards are separate items (pi-chat-question, pi-chat-approval, pi-chat-subagent, pi-artifacts); without them a question or an approval shows a \"waiting for your answer\" notice, a sub-agent call is an ordinary tool step and no artifact is offered. The optional pi-ambient and pi-workspace blocks build on it.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
9
|
-
"@hachej/boring-feedback@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.38",
|
|
8
|
+
"@hachej/boring-files@^0.4.38",
|
|
9
|
+
"@hachej/boring-feedback@^0.4.38",
|
|
10
10
|
"react@^19.0.0",
|
|
11
11
|
"react-dom@^19.0.0",
|
|
12
12
|
"@base-ui/react@1.9.0",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"zod@^4.6.5"
|
|
20
20
|
],
|
|
21
21
|
"registryDependencies": [
|
|
22
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
23
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
22
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/utils.json",
|
|
23
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/button.json"
|
|
24
24
|
],
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
package/r/pi-workspace.json
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"react-dom@^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.
|
|
13
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/utils.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/dock.json"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
package/r/placed-agent.json
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
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.
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-app.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-ambient.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/app-shell.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/utils.json"
|
|
16
16
|
],
|
|
17
17
|
"files": [
|
|
18
18
|
{
|
package/r/pm-panel.json
CHANGED
|
@@ -4,25 +4,25 @@
|
|
|
4
4
|
"title": "Shared PM composer and in-app panel",
|
|
5
5
|
"description": "« Améliorer l'app »: one PmComposer (touch and desktop presets, FR/EN strings) with « Montrer », the point strip, numbered pins and timestamped chips; AppShell improve composes the in-flow sheet, strip and the full panel, and PmChat gives Studio the same conversation. Pins and chips come from the public feedback picker; the request card and « Mes demandes » render through StudioTaskBoardSeam (D-417).",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-feedback@^0.4.
|
|
9
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.38",
|
|
8
|
+
"@hachej/boring-feedback@^0.4.38",
|
|
9
|
+
"@hachej/boring-files@^0.4.38",
|
|
10
10
|
"@earendil-works/pi-durable@~1.4.0",
|
|
11
11
|
"lucide-react@^1.51.0",
|
|
12
12
|
"react@^19.0.0",
|
|
13
13
|
"react-dom@^19.0.0"
|
|
14
14
|
],
|
|
15
15
|
"registryDependencies": [
|
|
16
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
17
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
18
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
19
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
20
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
21
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
22
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
23
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
24
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
25
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-markdown.json",
|
|
18
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-plugins.json",
|
|
19
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-chat-voice.json",
|
|
20
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/feedback.json",
|
|
21
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/task-board.json",
|
|
22
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/task-mentions.json",
|
|
23
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/utils.json",
|
|
24
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/pi-artifacts.json",
|
|
25
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.38/r/viewer-frame.json"
|
|
26
26
|
],
|
|
27
27
|
"files": [
|
|
28
28
|
{
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"path": "registry/pm-panel/pm-mockups.tsx",
|
|
102
|
-
"content": "'use client';\n\nimport { createContext, useContext, useEffect, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { ChevronRightIcon } from 'lucide-react';\nimport type { ArtifactDescriptor, PresentedArtifact } from '@hachej/boring-ui-kit/chat-view';\nimport {
|
|
102
|
+
"content": "'use client';\n\nimport { createContext, useContext, useEffect, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { ChevronRightIcon } from 'lucide-react';\nimport type { ArtifactDescriptor, PresentedArtifact } from '@hachej/boring-ui-kit/chat-view';\nimport { recogniseArtifact } from '@hachej/boring-ui-kit/chat-view';\nimport { Button } from '@/components/ui/button';\nimport { InteractiveFrame } from '../viewer-frame/interactive-html';\nimport { Markdown } from '../pi-chat-markdown/markdown';\nimport { Shimmer } from '../pi-chat/shimmer';\nimport type { ChatArtifactCardProps, ChatArtifactsConfig } from '../pi-chat/config';\nimport type { PmText } from './pm-text';\n\n/**\n * Reads a file the PM presented (`present`, a `boring.artifact` descriptor) as text, at the descriptor's revision; undefined when it can't.\n * The one line reads it through the app's PM door (`{base}/resources`, see `use-improve-agent.ts`).\n */\nexport type PmReadArtifact = (artifact: ArtifactDescriptor, signal: AbortSignal) => Promise<string | undefined>;\n\n/** Room agents can present the same path/revision from different providers or views. */\nconst mockupKey = (artifact: ArtifactDescriptor): string => JSON.stringify([artifact.target, artifact.revision]);\n\ntype Loaded = { readonly text: string } | { readonly failed: true } | undefined;\ninterface Mockups { readonly read: PmReadArtifact | undefined; readonly text: PmText; readonly cache: Map<string, Promise<string | undefined>> }\nconst MockupContext = createContext<Mockups | null>(null);\n\n/** The panel's presented files: the reader and its cache (one read per revision, shared by the thumbnail and the full view). */\nexport function PmMockupProvider({ read, text, children }: { readonly read: PmReadArtifact | undefined; readonly text: PmText; readonly children: ReactNode }) {\n const [cache] = useState(() => new Map<string, Promise<string | undefined>>());\n const value = useMemo(() => ({ read, text, cache }), [read, text, cache]);\n return <MockupContext.Provider value={value}>{children}</MockupContext.Provider>;\n}\n\nfunction useMockup(artifact: ArtifactDescriptor | undefined): Loaded {\n const context = useContext(MockupContext);\n const [loaded, setLoaded] = useState<{ readonly key: string; readonly value: Loaded }>();\n const key = artifact ? mockupKey(artifact) : undefined;\n useEffect(() => {\n if (!artifact || !key || !context) return;\n const read = context.read;\n if (!read) return;\n let pending = context.cache.get(key);\n if (!pending) {\n const abort = new AbortController();\n pending = read(artifact, abort.signal).catch(() => undefined);\n context.cache.set(key, pending);\n void pending.then(text => { if (text === undefined) context.cache.delete(key); });\n }\n let current = true;\n void pending.then(text => { if (current) setLoaded({ key, value: text === undefined ? { failed: true } : { text } }); });\n return () => { current = false; };\n }, [artifact, key, context]);\n if (artifact && context && !context.read) return { failed: true };\n return loaded && loaded.key === key ? loaded.value : undefined;\n}\n\n/** The mockup itself: HTML and SVG in a sandboxed frame (scripts only, opaque origin, no network), Markdown drawn, anything else as text. */\nfunction MockupBody({ artifact, text, testId }: { readonly artifact: ArtifactDescriptor; readonly text: string; readonly testId: string }) {\n if (artifact.type === 'html' || artifact.type === 'svg') return <InteractiveFrame text={text} sources={[]} title={artifact.title} testId={testId} />;\n if (artifact.type === 'markdown') return <div data-testid={`${testId}-markdown`} className=\"min-h-0 flex-1 overflow-auto p-4 text-[15px]\"><Markdown text={text} /></div>;\n return <pre data-testid={`${testId}-text`} className=\"m-0 min-h-0 flex-1 overflow-auto p-4 text-xs whitespace-pre-wrap\">{text}</pre>;\n}\n\nconst descriptorOf = (artifact: ChatArtifactCardProps['artifact']): ArtifactDescriptor | undefined => {\n const descriptor = artifact.state === 'ready' ? artifact.descriptor as PresentedArtifact : undefined;\n return descriptor && descriptor.type !== 'task' ? descriptor : undefined;\n};\n\n/**\n * A presented mockup in the member thread (C7): one row per mockup, so two or three presented in a row read as a vertical list. A small\n * live thumbnail (the sandboxed page at phone width, scaled down), the title and « Ouvrir › »; the whole row (min 64px) opens it full height.\n */\nexport function PmArtifactCard({ artifact, open, onOpen }: ChatArtifactCardProps) {\n const context = useContext(MockupContext);\n const descriptor = descriptorOf(artifact);\n const loaded = useMockup(descriptor);\n const title = descriptor?.title ?? artifact.title ?? '';\n return <div data-testid=\"pm-mockup\" data-state={artifact.state} data-open={open ? 'true' : undefined} className=\"relative my-1 flex min-h-16 w-full max-w-sm items-center gap-3 rounded-pm-box bg-background p-2 ring-1 ring-border\">\n <div aria-hidden=\"true\" inert className=\"relative h-24 w-16 shrink-0 overflow-hidden rounded-pm-control bg-muted ring-1 ring-border\">\n {descriptor && loaded && 'text' in loaded && <div className=\"pointer-events-none absolute top-0 left-0 flex h-[585px] w-[390px] origin-top-left scale-[0.1641] flex-col\">\n <MockupBody artifact={descriptor} text={loaded.text} testId=\"pm-mockup-thumb\" />\n </div>}\n </div>\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span data-testid=\"pm-mockup-title\" className=\"truncate text-sm font-medium\">{artifact.state === 'ready' ? title : <Shimmer>{title}</Shimmer>}</span>\n {loaded && 'failed' in loaded ? <span className=\"text-[13px] text-muted-foreground\">{context?.text.mockupUnavailable}</span>\n : artifact.state === 'ready' && <span className=\"flex items-center text-[13px] text-muted-foreground\">{context?.text.openMockup}<ChevronRightIcon className=\"size-3.5\" aria-hidden=\"true\" /></span>}\n </span>\n {descriptor && onOpen && <Button variant=\"link\" data-testid=\"pm-mockup-open\" aria-label={`${context?.text.openMockup ?? ''} ${title}`} onClick={onOpen} className=\"absolute inset-0 h-auto w-full\" />}\n </div>;\n}\n\n/** The opened mockup, full height inside the sheet, under « ‹ Retour ». */\nexport function PmMockupView({ artifact, text, onBack }: { readonly artifact: ArtifactDescriptor; readonly text: PmText; readonly onBack: () => void }) {\n const loaded = useMockup(artifact);\n return <div data-testid=\"pm-mockup-view\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex shrink-0 items-center gap-1 py-1 pr-4 pl-2\">\n <Button variant=\"ghost\" data-testid=\"pm-mockup-back\" onClick={onBack} className=\"min-h-11\">{text.back}</Button>\n <span data-testid=\"pm-mockup-view-title\" className=\"min-w-0 flex-1 truncate text-right text-[13px] text-muted-foreground\">{artifact.title}</span>\n </div>\n {loaded && 'text' in loaded ? <MockupBody artifact={artifact} text={loaded.text} testId=\"pm-mockup-full\" />\n : <p role=\"status\" className=\"m-0 p-4 text-sm text-muted-foreground\">{loaded ? text.mockupUnavailable : text.mockupLoading}</p>}\n </div>;\n}\n\n/** The panel's artifacts config when the host gives none: `present` results become `PmArtifactCard`s that open in the sheet. */\nexport function pmArtifacts(open: (artifact: ArtifactDescriptor) => void, shown: ArtifactDescriptor | undefined): ChatArtifactsConfig {\n return {\n open: ((artifact: PresentedArtifact) => { if (artifact.type !== 'task') open(artifact); }) as ChatArtifactsConfig['open'],\n isOpen: ((artifact: PresentedArtifact) => shown !== undefined && artifact.type !== 'task' && mockupKey(artifact) === mockupKey(shown)) as NonNullable<ChatArtifactsConfig['isOpen']>,\n recognise: recogniseArtifact, Card: PmArtifactCard,\n };\n}\n",
|
|
103
103
|
"type": "registry:component",
|
|
104
104
|
"target": "components/pm-panel/pm-mockups.tsx"
|
|
105
105
|
}
|
package/r/provider-setup.json
CHANGED