@hachej/boring-ui-kit 0.4.49 → 0.4.51
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/THIRD_PARTY_NOTICES.md +208 -0
- package/dist/chat-react-controller.d.ts +4 -1
- package/dist/chat-react-controller.js +4 -0
- package/dist/chat-react-remote.d.ts +16 -1
- package/dist/chat-react-remote.js +69 -10
- package/dist/chat-react-session.d.ts +2 -3
- package/dist/chat-react-session.js +38 -4
- package/dist/drawio-viewer.d.ts +4 -0
- package/dist/drawio-viewer.js +6 -0
- package/dist/native-chat.d.ts +8 -1
- package/dist/native-chat.js +45 -8
- package/dist/remote-chat.js +51 -5
- package/dist/vendor/drawio-viewer-static.d.ts +3 -0
- package/dist/vendor/drawio-viewer-static.js +5 -0
- package/package.json +6 -2
- package/r/agent-target.json +4 -4
- package/r/app-shell.json +9 -9
- 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/drawing-viewer.json +57 -0
- 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 +11 -11
- 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 +8 -8
- package/r/pi-workspace.json +3 -3
- package/r/placed-agent.json +4 -4
- package/r/provider-setup.json +1 -1
- package/r/registry.json +210 -161
- package/r/shared-chat.json +6 -6
- package/r/spaces.json +1 -1
- package/r/task-list-viewer.json +2 -2
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-ui-kit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.51",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -99,6 +99,10 @@
|
|
|
99
99
|
"types": "./dist/html-viewer.d.ts",
|
|
100
100
|
"import": "./dist/html-viewer.js"
|
|
101
101
|
},
|
|
102
|
+
"./drawio-viewer": {
|
|
103
|
+
"types": "./dist/drawio-viewer.d.ts",
|
|
104
|
+
"import": "./dist/drawio-viewer.js"
|
|
105
|
+
},
|
|
102
106
|
"./artifact-viewer": {
|
|
103
107
|
"types": "./dist/artifact-viewer.d.ts",
|
|
104
108
|
"import": "./dist/artifact-viewer.js"
|
|
@@ -150,7 +154,7 @@
|
|
|
150
154
|
}
|
|
151
155
|
},
|
|
152
156
|
"peerDependencies": {
|
|
153
|
-
"@hachej/boring-files": "^0.4.
|
|
157
|
+
"@hachej/boring-files": "^0.4.51",
|
|
154
158
|
"@earendil-works/pi-durable": "~1.4.0",
|
|
155
159
|
"react": "^19.0.0",
|
|
156
160
|
"react-dom": "^19.0.0",
|
package/r/agent-target.json
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
"title": "Point and dictate on app data",
|
|
5
5
|
"description": "Tap explicitly marked JSON app context, dictate once and show the same app agent’s native reply without opening chat. Host-controlled presentation; no feedback report or second controller.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-feedback@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-feedback@^0.4.51",
|
|
9
9
|
"@earendil-works/pi-durable@~1.4.0",
|
|
10
10
|
"react@^19.0.0",
|
|
11
11
|
"react-dom@^19.0.0"
|
|
12
12
|
],
|
|
13
13
|
"registryDependencies": [
|
|
14
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
15
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/app-shell.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat.json"
|
|
16
16
|
],
|
|
17
17
|
"files": [
|
|
18
18
|
{
|
package/r/app-shell.json
CHANGED
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
"title": "App shell: layouts, list/detail and agent layer",
|
|
5
5
|
"description": "AppShell with three layouts. B \"workspace\" puts a ListDetail on a screen (phone: the list, then the detail as a stack step with Back; wide: a 20rem list and the detail side by side, sidebar as an icon rail). C \"chat\" wraps the app's own AgentWorkspace (untouched, passed as the nav item's render; install the pi-app item yourself) in the same sidebar, account menu and header; it takes no shell agent. A \"screen\": one screen at a time, every screen kept mounted. On a phone bottom tabs (at most four; more give three plus a « Plus » sheet) and an avatar button that opens the account sheet; on a wide screen the shadcn sidebar (icon rail, NavUser). One header per screen through useScreenHeader (title, subtitle, back, up to two actions, the rest behind « … »). The account menu holds « Améliorer l'app » (the improve agent), the app's own entries and sign out. AppSheet is the one bottom sheet (one open at a time, Back closes it). It mounts the AgentLayer: one agent's PiChat above the app (phone: a drawer with peek, half and full snap points; wide: a right panel), the improve agent in the same layer, optional push-to-talk and point mode. Also useAgentContext and readAgentContext (the screen on show travels as `context` with each submit) and useBackLayer, the one Back manager. Built on explicitly pinned Base UI drawer and dropdown-menu recipes, plus the sidebar and avatar of the host's own shadcn style.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-feedback@^0.4.
|
|
8
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
7
|
+
"@hachej/boring-feedback@^0.4.51",
|
|
8
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
9
9
|
"@base-ui/react@^1.9.0",
|
|
10
10
|
"react@^19.0.0",
|
|
11
11
|
"react-dom@^19.0.0",
|
|
12
12
|
"lucide-react@^1.51.0"
|
|
13
13
|
],
|
|
14
14
|
"registryDependencies": [
|
|
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.
|
|
21
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat-plugins.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat-voice.json",
|
|
18
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/dock.json",
|
|
19
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/feedback.json",
|
|
20
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json",
|
|
21
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/button.json"
|
|
22
22
|
],
|
|
23
23
|
"files": [
|
|
24
24
|
{
|
package/r/board-viewer.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"title": "Board viewer",
|
|
5
5
|
"description": "A board@1 artifact kind for *.board.json. Lazy native tldraw projection of maquette screens, sandboxed HTML mock-ups, goto arrows and notes. Conditional board-file autosave; phone viewing without accidental frame edits. Hosts supply their resource client, asset URLs and license key.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"lucide-react@1.51.0",
|
|
11
11
|
"tldraw@5.5.2"
|
|
12
12
|
],
|
|
13
13
|
"registryDependencies": [
|
|
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.
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/maquette-viewer.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/mockup-viewer.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-artifacts.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json"
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
20
20
|
{
|
package/r/button.json
CHANGED
package/r/dock.json
CHANGED
package/r/documents.json
CHANGED
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
"title": "Documents: the Library, a file and its revisions",
|
|
5
5
|
"description": "The workspace's Library as the list, the chosen file in its viewer and its retained revisions beside it (an older one opens read-only). DocumentSheet opens one document over the app for a host's « Voir la fiche », with an optional « Toutes les fiches ». Every read goes through one revisionProvider binding.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"lucide-react@^1.51.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
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.
|
|
21
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
22
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/button.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-artifacts.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-app.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-app-kinds.json",
|
|
18
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/app-shell.json",
|
|
19
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/file-tree.json",
|
|
20
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-frame.json",
|
|
21
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-image.json",
|
|
22
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-pdf.json"
|
|
23
23
|
],
|
|
24
24
|
"files": [
|
|
25
25
|
{
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "drawing-viewer",
|
|
4
|
+
"title": "Drawing viewer",
|
|
5
|
+
"description": "DrawingViewer, drawingKind and describeDrawing: an Excalidraw (.excalidraw) or draw.io (.drawio) file, read-only, drawn by the tool's own renderer on a white page fitted to the shapes: Excalidraw's exportToSvg (its fonts served by the app, never its CDN) and the official diagrams.net viewer, vendored in the kit (@hachej/boring-ui-kit/drawio-viewer), in a sandboxed frame without network. Shown as an image, so nothing in the file runs; an unreadable file shows an inline error. onRead hands the shapes and arrows the renderer read (kind, place, size, label, colours, from and to). Each renderer loads the first time a drawing of its format opens; the kind is not in the pi-app-kinds default list, so apps without drawings install nothing.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"react@^19.0.0",
|
|
9
|
+
"lucide-react@^1.51.0",
|
|
10
|
+
"@excalidraw/excalidraw@0.18.1"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "registry/drawing-viewer/drawing.ts",
|
|
15
|
+
"content": "// What a drawing is once read (D-1398): the shapes and arrows the native library loaded, in the drawing's own coordinates. The drawing\n// viewer hands it to `onRead`, so an app can describe a drawing to a model without parsing the file again. This module is cheap: it\n// loads neither Excalidraw nor the draw.io viewer, which the viewer imports only when a drawing of that format opens.\n\n/** The two formats: an Excalidraw scene (JSON) and a draw.io file (XML, plain or compressed). */\nexport type DrawingFormat = 'excalidraw' | 'drawio';\n\n/** A shape: its kind in the native vocabulary (Excalidraw `rectangle`, `ellipse`, `diamond`, `text`, `freedraw`, …; draw.io `rectangle`, `ellipse`, `rhombus`, `swimlane`, …). */\nexport interface DrawingShape {\n readonly id: string;\n readonly kind: string;\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n /** Degrees clockwise around the box's centre, when the shape is turned (x, y, width and height are the unturned box). */\n readonly rotation?: number | undefined;\n /** Its text: a container's bound text, or a text element's own; HTML stripped. */\n readonly label?: string | undefined;\n readonly stroke?: string | undefined;\n readonly fill?: string | undefined;\n /** The group or container it sits in, when there is one. */\n readonly parent?: string | undefined;\n}\n\n/** An arrow or a line: the shapes it joins (absent when an end is free) and its points, from start to end, on their outlines. */\nexport interface DrawingArrow {\n readonly id: string;\n readonly kind: 'arrow' | 'line';\n readonly from?: string | undefined;\n readonly to?: string | undefined;\n readonly points: readonly (readonly [number, number])[];\n readonly label?: string | undefined;\n readonly stroke?: string | undefined;\n}\n\nexport interface Drawing {\n readonly format: DrawingFormat;\n /** The bounds of everything drawn, in the drawing's coordinates. */\n readonly bounds: { readonly x: number; readonly y: number; readonly width: number; readonly height: number };\n readonly shapes: readonly DrawingShape[];\n readonly arrows: readonly DrawingArrow[];\n}\n\n/** The format of a file by its name (`.excalidraw`, `.excalidraw.json`, `.drawio`, `.drawio.xml`, `.dio`), else by its text. */\nexport function drawingFormat(path: string | undefined, text?: string): DrawingFormat | undefined {\n const name = (path ?? '').toLowerCase();\n if (/\\.excalidraw(?:\\.json)?$/.test(name)) return 'excalidraw';\n if (/\\.(?:drawio(?:\\.xml)?|dio)$/.test(name)) return 'drawio';\n const start = (text ?? '').trimStart();\n if (start.startsWith('{') && /\"type\"\\s*:\\s*\"excalidraw\"/.test(start.slice(0, 400))) return 'excalidraw';\n if (start.startsWith('<') && /<(?:mxfile|mxGraphModel|diagram)\\b/.test(start.slice(0, 8000))) return 'drawio';\n return undefined;\n}\n\n/** Whether a path names a drawing file. */\nexport const isDrawingPath = (path: string): boolean => drawingFormat(path) !== undefined;\n\nconst round = (value: number) => Math.round(value);\nconst name = (drawing: Drawing, id: string | undefined) => {\n if (!id) return 'nothing';\n const shape = drawing.shapes.find(entry => entry.id === id);\n return shape ? (shape.label ? `\"${shape.label}\"` : `${shape.kind} ${id}`) : id;\n};\n\n/** A plain-text account of a drawing for a model: every shape with its place, size, label and colours, then every arrow with its ends. */\nexport function describeDrawing(drawing: Drawing): string {\n const lines = [`A ${drawing.format === 'drawio' ? 'draw.io' : 'Excalidraw'} drawing of ${drawing.shapes.length} shapes and ${drawing.arrows.length} arrows, ${round(drawing.bounds.width)}×${round(drawing.bounds.height)}.`];\n for (const shape of drawing.shapes) {\n const colours = [shape.stroke && `stroke ${shape.stroke}`, shape.fill && `fill ${shape.fill}`].filter(Boolean).join(', ');\n lines.push(`- ${shape.kind} ${shape.id}${shape.label ? ` \"${shape.label}\"` : ''} at (${round(shape.x)}, ${round(shape.y)}), ${round(shape.width)}×${round(shape.height)}${colours ? `, ${colours}` : ''}${shape.parent ? `, in ${name(drawing, shape.parent)}` : ''}`);\n }\n for (const arrow of drawing.arrows) lines.push(`- ${arrow.kind} ${arrow.id}${arrow.label ? ` \"${arrow.label}\"` : ''} from ${name(drawing, arrow.from)} to ${name(drawing, arrow.to)}`);\n return lines.join('\\n');\n}\n\n/** Why a drawing could not be shown: the file is not one (`unreadable`), it draws nothing (`empty`) or the native renderer failed (`renderer`). */\nexport type DrawingFailure = 'unreadable' | 'empty' | 'renderer';\n\nexport class DrawingError extends Error {\n readonly reason: DrawingFailure;\n constructor(reason: DrawingFailure, message?: string) { super(message ?? reason); this.name = 'DrawingError'; this.reason = reason; }\n}\n\n/** A drawing as the native library drew it: an SVG document (shown as an image, so nothing in it runs) and what it read. */\nexport interface RenderedDrawing {\n readonly svg: string;\n readonly width: number;\n readonly height: number;\n readonly drawing: Drawing;\n /** What the renderer was refused (a draw.io image, stencil or font from the network): those parts are not drawn. */\n readonly blocked: readonly string[];\n}\n\n/** The bounds of boxes, or an empty box at the origin. */\nexport function boundsOf(boxes: readonly { readonly x: number; readonly y: number; readonly width: number; readonly height: number }[]): Drawing['bounds'] {\n if (!boxes.length) return { x: 0, y: 0, width: 0, height: 0 };\n const left = Math.min(...boxes.map(box => box.x)), top = Math.min(...boxes.map(box => box.y));\n const right = Math.max(...boxes.map(box => box.x + box.width)), bottom = Math.max(...boxes.map(box => box.y + box.height));\n return { x: left, y: top, width: right - left, height: bottom - top };\n}\n",
|
|
16
|
+
"type": "registry:lib",
|
|
17
|
+
"target": "components/drawing-viewer/drawing.ts"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "registry/drawing-viewer/drawing-labels.ts",
|
|
21
|
+
"content": "/* The drawing viewer's words in English and French. `locale` picks the base set; a host's `labels` still override any of them. */\nimport type { DrawingFailure, DrawingFormat } from './drawing';\n\nexport type DrawingLocale = 'en' | 'fr';\n\nexport const defaultDrawingLabels = {\n /** The kind's name on the artifact card and in the panel bar. */\n kind: 'Drawing',\n loading: 'Drawing…',\n /** The image's text alternative. */\n image: (format: DrawingFormat, shapes: number, arrows: number) => `${format === 'drawio' ? 'draw.io' : 'Excalidraw'} drawing: ${shapes} shapes, ${arrows} arrows`,\n errorTitle: 'This drawing cannot be shown',\n error: (reason: DrawingFailure) => reason === 'unreadable' ? 'The file is not an Excalidraw (.excalidraw) or draw.io (.drawio) drawing, or it is damaged.'\n : reason === 'empty' ? 'The drawing is empty: there is nothing to draw.' : 'The drawing could not be drawn. Try opening it again.',\n};\nexport type DrawingLabels = typeof defaultDrawingLabels;\n\n/** Typed as `DrawingLabels`, so a key added in English must be added here too. */\nexport const frenchDrawingLabels: DrawingLabels = {\n kind: 'Dessin',\n loading: 'Dessin en cours…',\n image: (format, shapes, arrows) => `Dessin ${format === 'drawio' ? 'draw.io' : 'Excalidraw'} : ${shapes} formes, ${arrows} flèches`,\n errorTitle: 'Ce dessin ne peut pas être affiché',\n error: reason => reason === 'unreadable' ? 'Le fichier n’est pas un dessin Excalidraw (.excalidraw) ou draw.io (.drawio), ou il est abîmé.'\n : reason === 'empty' ? 'Le dessin est vide : il n’y a rien à dessiner.' : 'Le dessin n’a pas pu être tracé. Rouvrez-le.',\n};\n\n/** The viewer's words for `locale` (English by default) with the host's overrides. */\nexport const drawingLabelsFor = (locale: DrawingLocale | undefined, labels?: Partial<DrawingLabels>): DrawingLabels =>\n ({ ...(locale === 'fr' ? frenchDrawingLabels : defaultDrawingLabels), ...labels });\n",
|
|
22
|
+
"type": "registry:lib",
|
|
23
|
+
"target": "components/drawing-viewer/drawing-labels.ts"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/drawing-viewer/excalidraw-render.ts",
|
|
27
|
+
"content": "// An Excalidraw scene drawn by Excalidraw itself (D-1398): `restore` (the library's own reader: defaults, migrations, bound text) then\n// `exportToSvg` on a white page, so the drawing has Excalidraw's hand-drawn strokes, fills and fonts. The library loads with this module,\n// which the viewer imports only when an Excalidraw file opens. Fonts come from the app (`assets`, the folder that serves Excalidraw's\n// `dist/prod/fonts`). Excalidraw falls back to its CDN (esm.sh) for a font it cannot get from there; while an export runs, this module\n// refuses the CDN (a font fetch, and the CDN sources of the font faces it creates), so a drawing never fetches from it; an export that fails is drawn\n// again without fonts. The page's `fetch` and `FontFace` are given back as they were once no drawing is being made.\nimport type { DrawingArrow, DrawingShape, RenderedDrawing } from './drawing';\nimport { DrawingError } from './drawing';\n\ndeclare global { interface Window { EXCALIDRAW_ASSET_PATH?: string | string[] } }\n\n/** The fields of an Excalidraw element this module reads (the library's element type, structurally). */\ninterface Element {\n readonly id: string;\n readonly type: string;\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly angle?: number;\n readonly isDeleted?: boolean;\n readonly strokeColor?: string;\n readonly backgroundColor?: string;\n readonly frameId?: string | null;\n readonly containerId?: string | null;\n readonly text?: string;\n readonly originalText?: string;\n readonly points?: readonly (readonly [number, number])[];\n readonly startBinding?: { readonly elementId: string } | null;\n readonly endBinding?: { readonly elementId: string } | null;\n}\n\ntype Point = readonly [number, number];\n\nconst FONT_PROBE = 'fonts/Virgil/Virgil-Regular.woff2';\n/** Where Excalidraw 0.18 falls back for its fonts (`ExcalidrawFontFace.ASSETS_FALLBACK_URL`). */\nconst FONT_CDN = /^https:\\/\\/esm\\.sh\\/@excalidraw\\/excalidraw(?:@|\\/)/;\nconst colour = (value: string | undefined) => value && value !== 'transparent' ? value : undefined;\n\n/** A `FontFace` source list without Excalidraw's CDN entries (`url(https://esm.sh/@excalidraw/…) format('woff2')`). */\nfunction withoutCdnSources(source: string): string {\n const kept = source.split(/,\\s*(?=url\\(|local\\()/).filter(part => !FONT_CDN.test(part.replace(/^url\\(\\s*[\"']?/, '')));\n return kept.length ? kept.join(', ') : 'local(\"Excalidraw font not served\")';\n}\n\nlet running = 0;\nlet restore: (() => void) | undefined;\n/**\n * Runs `work` (Excalidraw's import and export) with its CDN refused, by the two ways Excalidraw reaches it: a `fetch` of a font to inline\n * is refused, and a `FontFace` it creates drops its CDN sources. Every other request and font goes through unchanged. Both are in place\n * only while work runs (counted, for drawings side by side) and are given back after the last one, unless the page replaced them meanwhile.\n */\nasync function withoutFontCdn<T>(work: () => Promise<T>): Promise<T> {\n if (running++ === 0) {\n const pageFetch = globalThis.fetch, PageFontFace = globalThis.FontFace;\n const fetchGuard = typeof pageFetch === 'function' ? (input: RequestInfo | URL, init?: RequestInit) => {\n const url = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;\n return FONT_CDN.test(url) ? Promise.reject(new TypeError('The drawing viewer does not fetch Excalidraw fonts from its CDN.')) : pageFetch(input, init);\n } : undefined;\n const fontGuard = typeof PageFontFace === 'function' ? new Proxy(PageFontFace, {\n construct: (target, [family, source, descriptors]: ConstructorParameters<typeof FontFace>) =>\n new target(family, typeof source === 'string' ? withoutCdnSources(source) : source, descriptors),\n }) : undefined;\n if (fetchGuard) globalThis.fetch = fetchGuard;\n if (fontGuard) globalThis.FontFace = fontGuard;\n restore = () => {\n if (fetchGuard && globalThis.fetch === fetchGuard) globalThis.fetch = pageFetch;\n if (fontGuard && globalThis.FontFace === fontGuard) globalThis.FontFace = PageFontFace;\n };\n }\n try { return await work(); }\n finally { if (--running === 0) { restore?.(); restore = undefined; } }\n}\n\n/** The base URL Excalidraw resolves its fonts against, as the library normalises it. */\nfunction baseOf(assets: string): URL {\n return new URL(`${assets.replace(/\\/+$/, '')}/`, globalThis.location?.href);\n}\n\n/** Whether the app serves Excalidraw's fonts under `assets` (a font, not an HTML fallback page). */\nasync function fontsServed(assets: string): Promise<boolean> {\n try {\n const response = await fetch(new URL(FONT_PROBE, baseOf(assets)), { cache: 'force-cache' });\n return response.ok && !/html/i.test(response.headers.get('content-type') ?? '');\n } catch { return false; }\n}\n\n/** `point` turned by `angle` (radians, clockwise on screen as Excalidraw draws) around `centre`. */\nfunction turn([x, y]: Point, [cx, cy]: Point, angle: number): Point {\n if (!angle) return [x, y];\n const cos = Math.cos(angle), sin = Math.sin(angle);\n return [cx + (x - cx) * cos - (y - cy) * sin, cy + (x - cx) * sin + (y - cy) * cos];\n}\n\n/** A linear element's points on the page: its local points moved to its place and turned by its angle around their own box's centre. */\nfunction pagePoints(element: Element): Point[] {\n const local = element.points ?? [];\n if (!local.length) return [];\n const xs = local.map(([x]) => x), ys = local.map(([, y]) => y);\n const centre: Point = [element.x + (Math.min(...xs) + Math.max(...xs)) / 2, element.y + (Math.min(...ys) + Math.max(...ys)) / 2];\n return local.map(([x, y]) => turn([element.x + x, element.y + y], centre, element.angle ?? 0));\n}\n\n/** The scene's shapes and arrows from the restored elements: a container's text is its label, deleted elements are left out. */\nexport function readExcalidraw(elements: readonly Element[]): { readonly shapes: DrawingShape[]; readonly arrows: DrawingArrow[] } {\n const live = elements.filter(element => !element.isDeleted);\n const bound = new Map(live.filter(element => element.type === 'text' && element.containerId).map(element => [element.containerId!, element.originalText ?? element.text ?? '']));\n const shapes: DrawingShape[] = [], arrows: DrawingArrow[] = [];\n for (const element of live) {\n if (element.type === 'text' && element.containerId && live.some(other => other.id === element.containerId)) continue;\n const label = element.type === 'text' ? element.originalText ?? element.text : bound.get(element.id);\n if (element.type === 'arrow' || element.type === 'line') {\n arrows.push({ id: element.id, kind: element.type, from: element.startBinding?.elementId, to: element.endBinding?.elementId, points: pagePoints(element), label: label || undefined, stroke: colour(element.strokeColor) });\n continue;\n }\n const rotation = element.angle ? Math.round((element.angle * 180 / Math.PI) * 100) / 100 : undefined;\n shapes.push({ id: element.id, kind: element.type, x: element.x, y: element.y, width: element.width, height: element.height, ...(rotation ? { rotation } : {}), label: label || undefined,\n stroke: colour(element.strokeColor), fill: colour(element.backgroundColor), parent: element.frameId ?? undefined });\n }\n return { shapes, arrows };\n}\n\n/** Draws an `.excalidraw` file's text; throws a `DrawingError` for a file that is not a scene or draws nothing. */\nexport async function renderExcalidraw(text: string, { assets }: { readonly assets: string | false }): Promise<RenderedDrawing> {\n let data: unknown;\n try { data = JSON.parse(text); } catch { throw new DrawingError('unreadable', 'The file is not JSON.'); }\n const scene = data as { readonly type?: unknown; readonly elements?: unknown } | null;\n if (!scene || typeof scene !== 'object' || scene.type !== 'excalidraw' || !Array.isArray(scene.elements)) throw new DrawingError('unreadable', 'The file is not an Excalidraw scene.');\n // Where the fonts are must be known before the library loads: its font faces take their sources when it is first imported.\n const own = globalThis.window?.EXCALIDRAW_ASSET_PATH;\n const base = typeof own === 'string' ? own : assets;\n const fonts = base !== false && await fontsServed(base);\n if (fonts && base !== false && own === undefined) window.EXCALIDRAW_ASSET_PATH = baseOf(base).href;\n return withoutFontCdn(() => draw(data, fonts));\n}\n\nasync function draw(data: unknown, fonts: boolean): Promise<RenderedDrawing> {\n const excalidraw = await import('@excalidraw/excalidraw');\n let restored: ReturnType<typeof excalidraw.restore>;\n try { restored = excalidraw.restore(data as Parameters<typeof excalidraw.restore>[0], null, null); }\n catch (error) { throw new DrawingError('unreadable', String(error)); }\n const elements = restored.elements.filter(element => !element.isDeleted);\n if (!elements.length) throw new DrawingError('empty', 'The scene draws nothing.');\n const exportSvg = (inline: boolean) => excalidraw.exportToSvg({\n elements,\n appState: { ...restored.appState, exportBackground: true, viewBackgroundColor: '#ffffff', exportWithDarkMode: false, exportEmbedScene: false },\n files: restored.files ?? null,\n exportPadding: 16,\n ...(inline ? {} : { skipInliningFonts: true as const }),\n });\n let svg: SVGSVGElement;\n try { svg = await exportSvg(fonts); }\n catch (error) {\n if (!fonts) throw new DrawingError('renderer', String(error));\n svg = await exportSvg(false);\n }\n const read = readExcalidraw(elements as unknown as readonly Element[]);\n // Excalidraw's own bounds of what it drew: each shape's geometry turned by its angle, bound text included.\n const [left, top, right, bottom] = excalidraw.getCommonBounds(elements);\n const width = Number.parseFloat(svg.getAttribute('width') ?? '') || 0, height = Number.parseFloat(svg.getAttribute('height') ?? '') || 0;\n return { svg: new XMLSerializer().serializeToString(svg), width, height, blocked: [],\n drawing: { format: 'excalidraw', bounds: { x: left, y: top, width: right - left, height: bottom - top }, ...read } };\n}\n",
|
|
28
|
+
"type": "registry:lib",
|
|
29
|
+
"target": "components/drawing-viewer/excalidraw-render.ts"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "registry/drawing-viewer/drawio-frame.ts",
|
|
33
|
+
"content": "// The document of the sandboxed frame in which the official diagrams.net viewer draws a draw.io file (D-1398). The frame is an opaque\n// origin (`sandbox=\"allow-scripts\"` only, so it shares nothing with this page) and its Content-Security-Policy allows no network at all and only the\n// scripts carrying this frame's nonce: the boot script below and the viewer it inserts. A label's HTML is sanitised by draw.io and, even if\n// it carried a handler or a script, the policy refuses it; `mxUtils.eval` (function bodies in a file) fails, since the policy allows no eval.\n// The boot script waits for one message from the parent with a port, the viewer's text and the file; it answers once on that port with\n// the SVG draw.io exports (`Graph.getSvg`, white page) and what the viewer's own model read, or with an error.\n\n/** The policy of the frame: no fetch, frame, image or font from anywhere but inline data, and only nonce scripts. */\nexport const drawioPolicy = (nonce: string) =>\n `default-src 'none'; script-src 'nonce-${nonce}'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; form-action 'none'; base-uri 'none'`;\n\n/** Runs in the frame (ES5, before and after the viewer): reads the model the viewer decoded and exports its SVG. */\nconst BOOT = String.raw`(function () {\n var nonce = document.currentScript && document.currentScript.nonce, port = null;\n try { window.localStorage; } catch (error) {\n var memory = function () { var items = {}; return { getItem: function (key) { return Object.prototype.hasOwnProperty.call(items, key) ? items[key] : null; },\n setItem: function (key, value) { items[key] = String(value); }, removeItem: function (key) { delete items[key]; }, clear: function () { items = {}; },\n key: function (index) { return Object.keys(items)[index] || null; }, get length() { return Object.keys(items).length; } }; };\n try { Object.defineProperty(window, 'localStorage', { configurable: true, value: memory() }); Object.defineProperty(window, 'sessionStorage', { configurable: true, value: memory() }); } catch (ignored) {}\n }\n window.mxLoadResources = false; window.mxLoadStylesheets = false; window.mxForceIncludes = false;\n var blocked = [];\n document.addEventListener('securitypolicyviolation', function (event) { if (blocked.length < 50) blocked.push(String(event.effectiveDirective || event.violatedDirective) + ' ' + String(event.blockedURI)); });\n function answer(message) { if (port) { port.postMessage(message); port.close(); port = null; } }\n function fail(reason, error) { answer({ type: 'error', reason: reason, message: String(error && error.message || error || reason) }); }\n function plain(value, html) {\n var text = value == null ? '' : String(value);\n if (html) {\n var parsed = new DOMParser().parseFromString(text.replace(/<br\\s*\\/?>/gi, '\\n').replace(/<\\/(div|p|li|h[1-6])>/gi, '\\n</$1>'), 'text/html');\n var hidden = parsed.querySelectorAll('script, style, template');\n for (var h = 0; h < hidden.length; h++) hidden[h].remove();\n text = parsed.body ? parsed.body.textContent || '' : '';\n }\n return text.replace(/ /g, ' ').replace(/[ \\t]+\\n/g, '\\n').replace(/\\n{2,}/g, '\\n').trim();\n }\n function colour(value) { return value && value !== 'none' ? String(value) : undefined; }\n function read(graph) {\n var model = graph.getModel(), view = graph.view, scale = view.scale, dx = view.translate.x, dy = view.translate.y, shapes = [], arrows = [], labels = Object.create(null);\n var place = function (state) { return { x: state.x / scale - dx, y: state.y / scale - dy, width: state.width / scale, height: state.height / scale }; };\n var label = function (cell) { return plain(graph.convertValueToString(cell), graph.isHtmlLabel(cell)) || undefined; };\n for (var id in model.cells) {\n var cell = model.cells[id], state = view.getState(cell), parent = model.getParent(cell);\n if (!state || !(model.isVertex(cell) || model.isEdge(cell))) continue;\n if (model.isVertex(cell) && model.isEdge(parent)) { var text = label(cell); if (text) labels[parent.id] = labels[parent.id] ? labels[parent.id] + '\\n' + text : text; continue; }\n var style = state.style || {};\n if (model.isEdge(cell)) {\n var source = model.getTerminal(cell, true), target = model.getTerminal(cell, false), points = [];\n for (var i = 0; i < (state.absolutePoints || []).length; i++) { var point = state.absolutePoints[i]; if (point) points.push([point.x / scale - dx, point.y / scale - dy]); }\n // The viewer drops a style value of 'none', so a plain line has neither marker at all.\n var marked = function (marker) { return !!marker && marker !== 'none'; };\n var arrowhead = marked(style.endArrow) || marked(style.startArrow);\n arrows.push({ id: String(cell.id), kind: arrowhead ? 'arrow' : 'line', from: source ? String(source.id) : undefined, to: target ? String(target.id) : undefined, points: points, label: label(cell), stroke: colour(style.strokeColor) });\n } else {\n var box = place(state);\n shapes.push({ id: String(cell.id), kind: String(style.shape || 'rectangle'), x: box.x, y: box.y, width: box.width, height: box.height, label: label(cell),\n stroke: colour(style.strokeColor), fill: colour(style.fillColor), parent: model.isVertex(parent) ? String(parent.id) : undefined });\n }\n }\n for (var a = 0; a < arrows.length; a++) if (labels[arrows[a].id]) arrows[a].label = arrows[a].label ? arrows[a].label + '\\n' + labels[arrows[a].id] : labels[arrows[a].id];\n var bounds = graph.getGraphBounds();\n return { format: 'drawio', bounds: { x: bounds.x / scale - dx, y: bounds.y / scale - dy, width: bounds.width / scale, height: bounds.height / scale }, shapes: shapes, arrows: arrows };\n }\n function draw(xml) {\n var document_ = mxUtils.parseXml(xml), root = document_ && document_.documentElement;\n if (!root || ['mxfile', 'mxGraphModel', 'diagram'].indexOf(root.nodeName) < 0) return fail('unreadable', 'not a draw.io file');\n var node;\n try { node = Editor.extractGraphModel(root); } catch (error) { return fail('unreadable', error); }\n if (!node) return fail('unreadable', 'no diagram in the file');\n var graph = new Graph(document.getElementById('graph'));\n graph.setEnabled(false);\n try { new mxCodec(node.ownerDocument).decode(node, graph.getModel()); } catch (error) { return fail('unreadable', error); }\n var drawing = read(graph);\n if (!drawing.shapes.length && !drawing.arrows.length) return fail('empty', 'the diagram draws nothing');\n var svg = graph.getSvg('#ffffff', 1, 16, false, null, true);\n var width = parseFloat(svg.getAttribute('width')) || drawing.bounds.width + 32, height = parseFloat(svg.getAttribute('height')) || drawing.bounds.height + 32;\n var exported = mxUtils.getXml(svg);\n // Refused requests are reported as tasks after the attempt: give them a moment so the answer names what was not drawn.\n setTimeout(function () { answer({ type: 'drawn', svg: exported, width: width, height: height, drawing: drawing, blocked: blocked.slice() }); }, 250);\n }\n window.addEventListener('message', function (event) {\n if (port || event.source !== window.parent || !event.ports || !event.ports[0] || !event.data || event.data.type !== 'draw') return;\n port = event.ports[0];\n try {\n var viewer = document.createElement('script');\n viewer.nonce = nonce; viewer.textContent = String(event.data.viewer);\n document.head.appendChild(viewer);\n if (typeof Graph === 'undefined' || typeof Editor === 'undefined') return fail('renderer', 'the draw.io viewer did not load');\n } catch (error) { return fail('renderer', error); }\n try { draw(String(event.data.xml)); } catch (error) { fail('renderer', error); }\n });\n})();`;\n\n/** The frame's whole document for `nonce` (fresh per drawing). */\nexport function drawioFrameDocument(nonce: string): string {\n return `<!doctype html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"Content-Security-Policy\" content=\"${drawioPolicy(nonce)}\">`\n + `<style>html,body{margin:0;background:#fff}#graph{position:absolute;left:0;top:0;width:2000px;height:2000px;overflow:hidden}</style>`\n + `<script nonce=\"${nonce}\">${BOOT}</script></head><body><div id=\"graph\"></div></body></html>`;\n}\n",
|
|
34
|
+
"type": "registry:lib",
|
|
35
|
+
"target": "components/drawing-viewer/drawio-frame.ts"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "registry/drawing-viewer/drawio-render.ts",
|
|
39
|
+
"content": "// A draw.io file drawn by the official diagrams.net viewer (D-1398), vendored and pinned in the kit (`@hachej/boring-ui-kit/drawio-viewer`)\n// and run in a hidden sandboxed frame (drawio-frame.ts) that cannot reach the network or this page. The viewer decodes the file (plain or\n// compressed `<diagram>`), draws every shape and style as draw.io does and exports the SVG; the frame is removed once it answers. This\n// module and the viewer's text load only when a draw.io file opens.\nimport type { Drawing, DrawingArrow, DrawingShape, RenderedDrawing } from './drawing';\nimport { DrawingError } from './drawing';\nimport { drawioFrameDocument } from './drawio-frame';\n\n/** How long the viewer may take to answer before the drawing shows an error. */\nconst ANSWER_MS = 30000;\n\nconst finite = (value: unknown) => typeof value === 'number' && Number.isFinite(value) ? value : 0;\nconst text = (value: unknown) => typeof value === 'string' && value ? value : undefined;\nconst list = (value: unknown): readonly Record<string, unknown>[] => Array.isArray(value) ? value.filter(entry => entry && typeof entry === 'object') : [];\n\n/** What the frame read, kept to the fields and types of a `Drawing` (the frame is not trusted to send only those). */\nfunction cleanDrawing(value: unknown): Drawing {\n const raw = (value && typeof value === 'object' ? value : {}) as Record<string, unknown>;\n const bounds = (raw.bounds && typeof raw.bounds === 'object' ? raw.bounds : {}) as Record<string, unknown>;\n const shapes: DrawingShape[] = list(raw.shapes).map(shape => ({ id: String(shape.id), kind: text(shape.kind) ?? 'rectangle', x: finite(shape.x), y: finite(shape.y),\n width: finite(shape.width), height: finite(shape.height), label: text(shape.label), stroke: text(shape.stroke), fill: text(shape.fill), parent: text(shape.parent) }));\n const arrows: DrawingArrow[] = list(raw.arrows).map(arrow => ({ id: String(arrow.id), kind: arrow.kind === 'line' ? 'line' : 'arrow', from: text(arrow.from), to: text(arrow.to),\n points: (Array.isArray(arrow.points) ? arrow.points : []).filter(Array.isArray).map(point => [finite(point[0]), finite(point[1])] as const), label: text(arrow.label), stroke: text(arrow.stroke) }));\n return { format: 'drawio', bounds: { x: finite(bounds.x), y: finite(bounds.y), width: finite(bounds.width), height: finite(bounds.height) }, shapes, arrows };\n}\n\nfunction nonce(): string {\n const bytes = new Uint8Array(16);\n crypto.getRandomValues(bytes);\n return Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');\n}\n\n/** Draws a `.drawio` file's text; throws a `DrawingError` for a file that is not one, draws nothing or that the viewer could not draw. */\nexport async function renderDrawio(source: string, { signal }: { readonly signal?: AbortSignal | undefined } = {}): Promise<RenderedDrawing> {\n if (!/<(?:mxfile|mxGraphModel|diagram)\\b/.test(source)) throw new DrawingError('unreadable', 'The file is not a draw.io diagram.');\n const { DRAWIO_VIEWER_SCRIPT } = await import('@hachej/boring-ui-kit/drawio-viewer');\n signal?.throwIfAborted();\n const frame = document.createElement('iframe');\n frame.setAttribute('sandbox', 'allow-scripts');\n frame.setAttribute('aria-hidden', 'true');\n frame.setAttribute('data-boring', 'drawio-frame');\n frame.tabIndex = -1;\n frame.title = 'draw.io';\n frame.style.cssText = 'position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;visibility:hidden;pointer-events:none';\n frame.srcdoc = drawioFrameDocument(nonce());\n return new Promise<RenderedDrawing>((resolve, reject) => {\n const channel = new MessageChannel();\n const done = () => { clearTimeout(timer); channel.port1.close(); frame.remove(); signal?.removeEventListener('abort', aborted); };\n const aborted = () => { done(); reject(signal?.reason); };\n const timer = setTimeout(() => { done(); reject(new DrawingError('renderer', 'The draw.io viewer did not answer.')); }, ANSWER_MS);\n channel.port1.onmessage = event => {\n const data = (event.data && typeof event.data === 'object' ? event.data : {}) as Record<string, unknown>;\n done();\n const blocked = (Array.isArray(data.blocked) ? data.blocked : []).filter((entry): entry is string => typeof entry === 'string').slice(0, 50);\n if (data.type === 'drawn' && typeof data.svg === 'string') resolve({ svg: data.svg, width: finite(data.width), height: finite(data.height), drawing: cleanDrawing(data.drawing), blocked });\n else reject(new DrawingError(data.reason === 'unreadable' || data.reason === 'empty' ? data.reason : 'renderer', text(data.message)));\n };\n signal?.addEventListener('abort', aborted, { once: true });\n frame.addEventListener('load', () => frame.contentWindow?.postMessage({ type: 'draw', viewer: DRAWIO_VIEWER_SCRIPT, xml: source }, '*', [channel.port2]), { once: true });\n document.body.append(frame);\n });\n}\n",
|
|
40
|
+
"type": "registry:lib",
|
|
41
|
+
"target": "components/drawing-viewer/drawio-render.ts"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"path": "registry/drawing-viewer/drawing-viewer.tsx",
|
|
45
|
+
"content": "'use client';\n\n// The drawing viewer (D-1398): an Excalidraw or draw.io file, read-only, drawn by the tool's own renderer on a white page fitted to the\n// shapes. Excalidraw draws with its library (`exportToSvg`); draw.io with the official diagrams.net viewer in a sandboxed frame without\n// network. Each renderer loads the first time a drawing of its format opens. The result is shown as an image from a blob URL, so nothing\n// in the file runs on this page, and what the renderer read goes to `onRead` (shapes and arrows, see drawing.ts) for describing it to a model.\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { TriangleAlertIcon } from 'lucide-react';\nimport { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';\nimport { Spinner } from '@/components/ui/spinner';\nimport { DrawingError, drawingFormat } from './drawing';\nimport type { Drawing, DrawingFailure, DrawingFormat, RenderedDrawing } from './drawing';\nimport { drawingLabelsFor } from './drawing-labels';\nimport type { DrawingLabels, DrawingLocale } from './drawing-labels';\n\nexport { boundsOf, describeDrawing, DrawingError, drawingFormat, isDrawingPath } from './drawing';\nexport type { Drawing, DrawingArrow, DrawingFailure, DrawingFormat, DrawingShape, RenderedDrawing } from './drawing';\nexport { defaultDrawingLabels, drawingLabelsFor, frenchDrawingLabels } from './drawing-labels';\nexport type { DrawingLabels, DrawingLocale } from './drawing-labels';\n\n/** Where the app serves Excalidraw's fonts by default: the package's `dist/prod` folder (its `fonts/` inside) at this path. */\nexport const DEFAULT_EXCALIDRAW_ASSETS = '/excalidraw/';\n\nexport interface DrawingViewerProps {\n /** The file's text. */\n readonly text: string;\n /** The file's path or name: `.excalidraw` or `.drawio` picks the format; without it the text decides. */\n readonly path?: string | undefined;\n /** The format, when the app knows it better than the path. */\n readonly format?: DrawingFormat | undefined;\n /** The drawing's name, for the reader. */\n readonly title?: string | undefined;\n /** Called with what the renderer read once the drawing is drawn, and what it was refused from the network (those parts are not drawn). */\n readonly onRead?: ((drawing: Drawing, details: { readonly blocked: readonly string[] }) => void) | undefined;\n /**\n * The URL of the folder where the app serves `@excalidraw/excalidraw/dist/prod/` (Excalidraw looks for `fonts/` in it), unless the page\n * set `window.EXCALIDRAW_ASSET_PATH` itself. `false`, or a folder that serves no font, draws text without Excalidraw's fonts; the\n * viewer never lets Excalidraw fetch them from its CDN.\n */\n readonly excalidrawAssets?: string | false | undefined;\n /** The base words: English by default. */\n readonly locale?: DrawingLocale | undefined;\n /** Any word over the locale's. */\n readonly labels?: Partial<DrawingLabels> | undefined;\n}\n\ntype State =\n | { readonly kind: 'loading' }\n | { readonly kind: 'drawn'; readonly rendered: RenderedDrawing; readonly url: string }\n | { readonly kind: 'error'; readonly reason: DrawingFailure };\n\nasync function render(format: DrawingFormat, text: string, assets: string | false, signal: AbortSignal): Promise<RenderedDrawing> {\n if (format === 'excalidraw') return (await import('./excalidraw-render')).renderExcalidraw(text, { assets });\n return (await import('./drawio-render')).renderDrawio(text, { signal });\n}\n\n/** One drawing; an unreadable or empty file shows an inline error. */\nexport function DrawingViewer({ text, path, format: given, title, onRead, excalidrawAssets = DEFAULT_EXCALIDRAW_ASSETS, locale, labels: words }: DrawingViewerProps) {\n const labels = useMemo(() => drawingLabelsFor(locale, words), [locale, words]);\n const format = given ?? drawingFormat(path, text);\n // The outcome of the drawing it was rendered for: another text, format or font folder shows loading until its own outcome lands.\n const [outcome, setOutcome] = useState<{ readonly text: string; readonly format: DrawingFormat; readonly assets: string | false; readonly state: State }>();\n const state: State = !format ? { kind: 'error', reason: 'unreadable' }\n : outcome && outcome.text === text && outcome.format === format && outcome.assets === excalidrawAssets ? outcome.state : { kind: 'loading' };\n const read = useRef(onRead);\n useLayoutEffect(() => { read.current = onRead; });\n // A drawn outcome's image lives until another outcome replaces it or the viewer unmounts, so going back to an earlier text never shows a\n // revoked image; that text is drawn again anyway.\n // Every image made is tracked from its creation, so one whose outcome never commits (onRead hid the viewer first) is still released, once.\n const made = useRef(new Set<string>());\n useEffect(() => {\n const url = outcome?.state.kind === 'drawn' ? outcome.state.url : undefined;\n const live = made.current;\n return () => { if (url && live.delete(url)) URL.revokeObjectURL(url); };\n }, [outcome]);\n useEffect(() => { const live = made.current; return () => { for (const url of live) URL.revokeObjectURL(url); live.clear(); }; }, []);\n useEffect(() => {\n if (!format) return;\n const abort = new AbortController();\n render(format, text, excalidrawAssets, abort.signal).then(rendered => {\n if (abort.signal.aborted) return;\n const url = URL.createObjectURL(new Blob([rendered.svg], { type: 'image/svg+xml' }));\n made.current.add(url);\n setOutcome({ text, format, assets: excalidrawAssets, state: { kind: 'drawn', rendered, url } });\n read.current?.(rendered.drawing, { blocked: rendered.blocked });\n }, (error: unknown) => {\n if (abort.signal.aborted) return;\n setOutcome({ text, format, assets: excalidrawAssets, state: { kind: 'error', reason: error instanceof DrawingError ? error.reason : 'renderer' } });\n });\n return () => abort.abort();\n }, [format, text, excalidrawAssets]);\n return <section data-boring=\"drawing-viewer\" data-state={state.kind} data-format={format} data-blocked={state.kind === 'drawn' ? state.rendered.blocked.length : undefined} aria-label={title ?? labels.kind} aria-busy={state.kind === 'loading' || undefined}\n className=\"flex w-full min-w-0 flex-col gap-3 px-3 pt-2 pb-4 sm:px-6\">\n {state.kind === 'loading' && <p role=\"status\" className=\"m-0 flex items-center justify-center gap-2 p-6 text-sm text-muted-foreground\"><Spinner />{labels.loading}</p>}\n {state.kind === 'error' && <Alert variant=\"destructive\" data-testid=\"drawing-error\" data-reason={state.reason}><TriangleAlertIcon aria-hidden=\"true\" />\n <AlertTitle>{labels.errorTitle}</AlertTitle><AlertDescription>{labels.error(state.reason)}</AlertDescription></Alert>}\n {state.kind === 'drawn' && <figure className=\"m-0 min-w-0 overflow-auto bg-muted p-2\">\n <img data-testid=\"drawing-image\" src={state.url} width={Math.round(state.rendered.width) || undefined} height={Math.round(state.rendered.height) || undefined}\n alt={labels.image(state.rendered.drawing.format, state.rendered.drawing.shapes.length, state.rendered.drawing.arrows.length)}\n className=\"mx-auto block h-auto max-w-full\" draggable={false} />\n </figure>}\n </section>;\n}\n",
|
|
46
|
+
"type": "registry:component",
|
|
47
|
+
"target": "components/drawing-viewer/drawing-viewer.tsx"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"path": "registry/drawing-viewer/drawing-kind.tsx",
|
|
51
|
+
"content": "'use client';\n\nimport { lazy } from 'react';\nimport type { ComponentType, ReactNode } from 'react';\nimport { PenToolIcon } from 'lucide-react';\nimport { isDrawingPath } from './drawing';\nimport { drawingLabelsFor } from './drawing-labels';\nimport type { DrawingLabels, DrawingLocale } from './drawing-labels';\n\nconst DrawingViewer = lazy(() => import('./drawing-viewer').then(module => ({ default: module.DrawingViewer })));\n\n/**\n * The artifact kind of a drawing file (structurally an `ArtifactKind` of pi-artifacts): it matches `.excalidraw` and `.drawio` files, names\n * them and draws them with `DrawingViewer`, loaded on first open. It is not in the pi-app-kinds default list: an app that shows drawings\n * adds it to its `artifactKinds` (and installs this item), so apps without drawings never install Excalidraw.\n */\nexport interface DrawingKind {\n readonly match: (target: { readonly resource: { readonly path: string } }) => boolean;\n readonly label: string;\n readonly icon: ComponentType<{ readonly className?: string; readonly 'aria-hidden'?: boolean | 'true' }>;\n /** Takes the artifact panel's view props (`ArtifactKindViewProps` of pi-artifacts): the file's name comes from `artifact.target`. */\n readonly renderer: (props: { readonly text: string; readonly artifact?: { readonly title?: string | undefined; readonly target: { readonly resource: { readonly path: string } } } | undefined }) => ReactNode;\n}\n\n/** A drawing kind in `locale` (\"Drawing\", \"Dessin\") with any word overridden, and where the app serves Excalidraw's fonts. */\nexport function createDrawingKind({ locale, labels, excalidrawAssets }: { readonly locale?: DrawingLocale | undefined; readonly labels?: Partial<DrawingLabels> | undefined; readonly excalidrawAssets?: string | false | undefined } = {}): DrawingKind {\n return {\n match: target => isDrawingPath(target.resource.path),\n label: drawingLabelsFor(locale, labels).kind,\n icon: PenToolIcon,\n renderer: ({ text, artifact }) => <DrawingViewer text={text} path={artifact?.target.resource.path} title={artifact?.title} locale={locale} labels={labels} excalidrawAssets={excalidrawAssets} />,\n };\n}\n\n/** The drawing kind, in English, with Excalidraw's fonts at the default path. */\nexport const drawingKind: DrawingKind = createDrawingKind();\n",
|
|
52
|
+
"type": "registry:component",
|
|
53
|
+
"target": "components/drawing-viewer/drawing-kind.tsx"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"type": "registry:component"
|
|
57
|
+
}
|
package/r/feedback.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"title": "Feedback",
|
|
5
5
|
"description": "Feedback from the chat composer: one Feedback button starts feedback mode on the application page (hover, click to pin a numbered note, hold ⌥ to use the app, optional voice), and one chip carries the notes to the next message. FeedbackBar, NoteBubble, FeedbackChip with its review, useComposerFeedback for the pi-chat composer, and PickerOverlay styles. Optional, not mounted by default: PointButton, AnnotateSheet, FeedbackList and FeedbackReport. Picking, masking, anchoring and placement stay in @hachej/boring-feedback/page and /ui, so restyling cannot weaken them.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-feedback@^0.4.
|
|
8
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
9
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-feedback@^0.4.51",
|
|
8
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
9
|
+
"@hachej/boring-files@^0.4.51",
|
|
10
10
|
"react@^19.0.0",
|
|
11
11
|
"react-dom@^19.0.0",
|
|
12
12
|
"lucide-react@^1.51.0"
|
|
13
13
|
],
|
|
14
14
|
"registryDependencies": [
|
|
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.
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat-voice.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json"
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
20
20
|
{
|
package/r/file-tree.json
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
"title": "File tree",
|
|
5
5
|
"description": "Browse, search, upload, rename, move, delete and inspect retained versions through one revisionProvider binding. Uses the consumer's shadcn Button, dropdown-menu and dialog with shared version-history rows; Base UI style only.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"lucide-react@^1.51.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
13
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
14
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/version-history.json"
|
|
15
15
|
],
|
|
16
16
|
"files": [
|
|
17
17
|
{
|
package/r/highlights.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "Anchored highlights",
|
|
5
5
|
"description": "Exact Markdown highlights and comments in a conditional workspace sidecar.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"react-dom@^19.0.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
13
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/markdown-editor.json"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
package/r/html-viewer.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "HTML source and passive preview",
|
|
5
5
|
"description": "Exact HTML source editing with a reconstructed passive preview and borrowed controller. Browser security qualification remains separate.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"react-dom@^19.0.0"
|
|
11
11
|
],
|
|
12
12
|
"registryDependencies": [
|
|
13
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/button.json"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
package/r/looks-viewer.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"lucide-react@^1.51.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.51/r/mockup-viewer.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json"
|
|
13
13
|
],
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
package/r/maquette-viewer.json
CHANGED
package/r/markdown-editor.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"title": "Markdown editor",
|
|
5
5
|
"description": "A host-owned styled wrapper over the concrete borrowed Markdown controller.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
8
|
-
"@hachej/boring-files@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
|
+
"@hachej/boring-files@^0.4.51",
|
|
9
9
|
"react@^19.0.0",
|
|
10
10
|
"react-dom@^19.0.0",
|
|
11
11
|
"marked@^17.0.6",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"lucide-react@^1.51.0"
|
|
25
25
|
],
|
|
26
26
|
"registryDependencies": [
|
|
27
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
27
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/button.json"
|
|
28
28
|
],
|
|
29
29
|
"files": [
|
|
30
30
|
{
|
package/r/mockup-viewer.json
CHANGED
package/r/pi-ambient.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Pi ambient agent",
|
|
5
5
|
"description": "AmbientChat, a compact floating agent bar that grows into a chat window over an existing page, and AgentNotifications, toasts over the kit's shared chat-react run notifications (with the one guarded browser Notification helper). A block over the pi-chat item; its in-window artifact panel uses the pi-workspace layout.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@hachej/boring-ui-kit@^0.4.
|
|
7
|
+
"@hachej/boring-ui-kit@^0.4.51",
|
|
8
8
|
"react@^19.0.0",
|
|
9
9
|
"react-dom@^19.0.0",
|
|
10
10
|
"@earendil-works/pi-durable@~1.4.0",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"lucide-react@^1.51.0"
|
|
13
13
|
],
|
|
14
14
|
"registryDependencies": [
|
|
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.
|
|
21
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat-plugins.json",
|
|
17
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-chat-question.json",
|
|
18
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-artifacts.json",
|
|
19
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-workspace.json",
|
|
20
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/utils.json",
|
|
21
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/button.json"
|
|
22
22
|
],
|
|
23
23
|
"files": [
|
|
24
24
|
{
|
package/r/pi-app-kinds.json
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"title": "Pi agent app default kinds",
|
|
5
5
|
"description": "defaultKinds({ locale, comments }): the artifact kinds the pi-app item draws with by default, in order: maquette, diagram, mock-up and records, then Markdown, HTML, SVG, CSV, image and PDF (documentKinds). Pass it as AgentWorkspace's artifactKinds (or ViewerOptions.kinds), with an app's own kinds before it. Each kind loads its viewer on first open.",
|
|
6
6
|
"registryDependencies": [
|
|
7
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
8
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
9
|
-
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.
|
|
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.
|
|
7
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/pi-app.json",
|
|
8
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-markdown.json",
|
|
9
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-html.json",
|
|
10
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-image.json",
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-pdf.json",
|
|
12
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/viewer-code.json",
|
|
13
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/maquette-viewer.json",
|
|
14
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/diagram-viewer.json",
|
|
15
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/mockup-viewer.json",
|
|
16
|
+
"https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.51/r/record-viewer.json"
|
|
17
17
|
],
|
|
18
18
|
"files": [
|
|
19
19
|
{
|