@hachej/boring-ui-kit 0.4.58 → 0.4.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/bin/boring-ui-blocks.mjs +49 -4
  2. package/package.json +6 -6
  3. package/r/_shared.json +19 -0
  4. package/r/agent-target.json +4 -4
  5. package/r/app-shell.json +17 -17
  6. package/r/board-viewer.json +10 -10
  7. package/r/button.json +4 -4
  8. package/r/data-table.json +21 -0
  9. package/r/diagram-viewer.json +6 -4
  10. package/r/dock.json +1 -1
  11. package/r/documents.json +13 -14
  12. package/r/drawing-viewer.json +6 -4
  13. package/r/empty-state.json +22 -0
  14. package/r/feedback.json +14 -14
  15. package/r/file-tree.json +4 -4
  16. package/r/highlights.json +3 -3
  17. package/r/html-viewer.json +3 -3
  18. package/r/inline-question.json +22 -0
  19. package/r/kpi-stat.json +22 -0
  20. package/r/list-row.json +21 -0
  21. package/r/looks-viewer.json +6 -6
  22. package/r/maquette-viewer.json +7 -6
  23. package/r/markdown-editor.json +10 -9
  24. package/r/mockup-viewer.json +5 -5
  25. package/r/page-header.json +22 -0
  26. package/r/pi-ambient.json +12 -12
  27. package/r/pi-app-kinds.json +10 -10
  28. package/r/pi-app.json +17 -17
  29. package/r/pi-artifacts.json +4 -4
  30. package/r/pi-chat-approval.json +4 -4
  31. package/r/pi-chat-attachments.json +4 -4
  32. package/r/pi-chat-markdown.json +3 -3
  33. package/r/pi-chat-mentions.json +4 -4
  34. package/r/pi-chat-pickers.json +4 -4
  35. package/r/pi-chat-plugins.json +11 -11
  36. package/r/pi-chat-question.json +3 -3
  37. package/r/pi-chat-slash.json +5 -5
  38. package/r/pi-chat-subagent.json +4 -4
  39. package/r/pi-chat-voice.json +7 -7
  40. package/r/pi-chat.json +18 -18
  41. package/r/pi-workspace.json +3 -3
  42. package/r/placed-agent.json +7 -7
  43. package/r/provider-setup.json +4 -4
  44. package/r/record-viewer.json +5 -3
  45. package/r/registry.json +577 -280
  46. package/r/shared-chat.json +11 -11
  47. package/r/space-card.json +22 -0
  48. package/r/spaces.json +7 -5
  49. package/r/status-narrative.json +22 -0
  50. package/r/task-list-viewer.json +28 -3
  51. package/r/theme.json +118 -50
  52. package/r/version-history.json +2 -2
  53. package/r/viewer-code.json +5 -5
  54. package/r/viewer-frame.json +9 -9
  55. package/r/viewer-html.json +7 -7
  56. package/r/viewer-image.json +5 -5
  57. package/r/viewer-markdown.json +7 -7
  58. package/r/viewer-pdf.json +6 -6
  59. package/r/viewers.json +6 -6
  60. package/r/windows.json +4 -4
  61. package/r/wiring-chips.json +22 -0
@@ -24,8 +24,46 @@ const borderWidth = /(?<![\w-])border(?:-[trblxyse])?(?:-(?:\d+|\[(?:\d|\.)[^\]]
24
24
  const color = /#[0-9a-fA-F]{3,8}\b|\b(?:rgb|rgba|hsl|hsla|oklch|oklab)\([^)]*\)|\b(?:bg|text|border|ring|fill|stroke|outline|decoration|shadow)-(?:white|black|(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\d{2,3})(?:\/\d+)?\b/g;
25
25
  const font = /\bfont-\[(?!var\(|--)[^\]]+\]|\bfont-family\s*:\s*(?!\s*(?:var\(|inherit\b))[^;\n}]+|\bfontFamily\s*:\s*['"](?!var\()[^'"]+['"]|\bfont\s*:\s*[^;\n}]*\b(?:serif|monospace|system-ui)\b[^;\n}]*/g;
26
26
 
27
- /** The repository's rules (registry blocks and kit sources). */
27
+ /**
28
+ * `design-no-x-scroll`: a file that renders a table holds no horizontal scroll container (`overflow-x-auto`, `overflow-x-scroll`, the
29
+ * CSS or React style property). Tables truncate their cells and stack below their container width instead. Lexical and file-scoped: the
30
+ * shadcn `table` wrapper (`overflow-x-auto`) must not be imported by a file that renders a table.
31
+ */
32
+ const tableMarkup = /<table\b|<Table\b|@\/components\/ui\/table\b|\bDataTable\b|role=["']table["']|\bdisplay\s*:\s*['"]?table\b/;
33
+ const horizontalScroll = /(?<![\w-])overflow-x-(?:auto|scroll)(?![\w-])|\boverflowX\s*:\s*['"]?(?:auto|scroll)\b|\boverflow-x\s*:\s*(?:auto|scroll)\b/g;
34
+ export function noXScroll(source) {
35
+ return tableMarkup.test(source) ? [...source.matchAll(horizontalScroll)].map(match => ({ index: match.index, value: match[0] })) : [];
36
+ }
37
+
38
+
39
+ // The flat card: a Card's own className carries no border, shadow or ring. The shadcn Card's ring lives in its generated file, which blocks never restyle.
40
+ const cardFlat = /<Card\b[^>]*?\bclassName\s*=\s*(?:"[^"]*\b(?:border|shadow|ring)\b[^"]*"|\{[^}\n]*\b(?:border|shadow|ring)\b[^}\n]*\})/g;
41
+
42
+ /** `<Card` tags opened inside another open `<Card>` (a self-closing Card and a Card in a prop are not nesting). Lexical, over JSX tags. */
43
+ function nestedCards(source) {
44
+ const found = [], open = [], tag = /<(\/?)Card\b/g;
45
+ for (let match; (match = tag.exec(source));) {
46
+ if (match[1]) { open.pop(); continue; }
47
+ let depth = 0, quote = null, end = match.index + match[0].length;
48
+ for (; end < source.length; end++) {
49
+ const char = source[end];
50
+ if (quote) { if (char === quote) quote = null; }
51
+ else if (/["'`]/.test(char)) quote = char;
52
+ else if (char === '{') depth++;
53
+ else if (char === '}') depth--;
54
+ else if (char === '>' && depth === 0) break;
55
+ }
56
+ if (open.length) found.push({ index: match.index, value: source.slice(match.index, end + 1).split('\n')[0] });
57
+ if (source[end - 1] !== '/') open.push(match.index);
58
+ tag.lastIndex = end + 1;
59
+ }
60
+ return found;
61
+ }
62
+
63
+ /** The repository's rules (registry blocks and kit sources). A rule is a global regex, or a function from the source to `{ index, value }` findings. */
28
64
  export const DESIGN_RULES = [
65
+ ['design-card-flat', cardFlat],
66
+ ['design-no-nested-card', nestedCards],
29
67
  ['shadow', shadow],
30
68
  ['radius', radius],
31
69
  ['border-width', borderWidth],
@@ -34,6 +72,7 @@ export const DESIGN_RULES = [
34
72
  ['motion', /\b(?:duration|delay)-\d+\b|\b(?:transition(?:-[\w-]+)?|animation(?:-[\w-]+)?|transitionDuration|animationDuration)\s*:\s*[^;\n}]*?\b\d*\.?\d+m?s\b[^;\n}]*/g],
35
73
  ['style', /\bradix(?:-[\w-]+)?\b/gi],
36
74
  ['primitive', /\b(?:function|const|class)\s+(?:Button|IconButton|ActionMenu|\w*Popover|\w*Tooltip|\w*Dialog|\w*Menu)\b|<(?:button|input|textarea|select)\b/g],
75
+ ['design-no-x-scroll', noXScroll],
37
76
  ];
38
77
 
39
78
  /**
@@ -44,6 +83,8 @@ export const DESIGN_RULES = [
44
83
  */
45
84
  const LENGTH = String.raw`(?<![\w.#-])(?!1px\b)\d*\.?\d+(?:px|rem|em)\b`;
46
85
  export const APP_RULES = [
86
+ ['design-card-flat', cardFlat],
87
+ ['design-no-nested-card', nestedCards],
47
88
  ['color', color],
48
89
  ['arbitrary-value', /(?<![\w-])(?:bg|text|border(?:-[trblxyse])?|ring(?:-offset)?|outline|fill|stroke|decoration|shadow|drop-shadow|inset-shadow|rounded(?:-[trblse]{1,2})?|font|tracking|leading|from|via|to|divide(?:-[xy])?|placeholder|caret|accent)-\[(?!var\(|--|#|(?:rgb|rgba|hsl|hsla|oklch|oklab)\()[^\]]+\]/g],
49
90
  ['border-width', /(?<![\w-])border(?:-[trblxyse])?-(?!0(?![\w.]))\d+(?![\w-])/g],
@@ -51,15 +92,19 @@ export const APP_RULES = [
51
92
  ['font', /\bfont-family\s*:\s*(?!\s*(?:var\(|inherit\b))[^;\n}]+|\bfontFamily\s*:\s*['"](?!var\()[^'"]+['"]|\bfont\s*:\s*(?!\s*(?:var\(|inherit\b))[^;\n}]+/g],
52
93
  ['literal-value', /\b(?:border-radius|borderRadius|box-shadow|boxShadow|font-size|fontSize|letter-spacing|letterSpacing)\s*:\s*['"]?(?!\s*(?:var\(|calc\(\s*var\(|inherit\b|initial\b|unset\b|none\b|0(?![\w.])))(?=[^;\n}"']*\d)[^;\n}"']*/g],
53
94
  ['dark', /(?<![\w-])dark:[^\s"'`]+/g],
95
+ ['design-no-x-scroll', noXScroll],
54
96
  ];
55
97
 
56
98
  /** Findings `{ file, line, column, rule, value }` of `rules` in `text`; CSS block comments are ignored. */
57
99
  export function scanDesign(file, text, rules = DESIGN_RULES) {
58
100
  const findings = [];
59
101
  const source = text.replace(/\/\*[\s\S]*?\*\//g, match => match.replace(/[^\n]/g, ' '));
60
- for (const [rule, pattern] of rules) for (const match of source.matchAll(pattern)) {
61
- const before = text.slice(0, match.index), line = before.split('\n').length;
62
- findings.push({ file, line, column: match.index - before.lastIndexOf('\n'), rule, value: match[0] });
102
+ for (const [rule, pattern] of rules) {
103
+ const matches = typeof pattern === 'function' ? pattern(source) : [...source.matchAll(pattern)].map(match => ({ index: match.index, value: match[0] }));
104
+ for (const { index, value } of matches) {
105
+ const before = text.slice(0, index), line = before.split('\n').length;
106
+ findings.push({ file, line, column: index - before.lastIndexOf('\n'), rule, value });
107
+ }
63
108
  }
64
109
  return findings;
65
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-ui-kit",
3
- "version": "0.4.58",
3
+ "version": "0.4.60",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",
@@ -154,7 +154,7 @@
154
154
  }
155
155
  },
156
156
  "peerDependencies": {
157
- "@hachej/boring-files": "^0.4.58",
157
+ "@hachej/boring-files": "^0.4.60",
158
158
  "@earendil-works/pi-durable": "~1.4.0",
159
159
  "react": "^19.0.0",
160
160
  "react-dom": "^19.0.0",
@@ -173,13 +173,13 @@
173
173
  "@tiptap/extension-floating-menu": "^3.31.4",
174
174
  "@earendil-works/chord": "~1.4.0",
175
175
  "@earendil-works/pi-ai": "~1.4.0",
176
- "tldraw": "^5.5.2",
177
- "@tldraw/editor": "^5.5.2",
178
- "@tldraw/store": "^5.5.2",
176
+ "tldraw": "^5.6.0",
177
+ "@tldraw/editor": "^5.6.0",
178
+ "@tldraw/store": "^5.6.0",
179
179
  "@json-render/core": "^0.21.0",
180
180
  "@json-render/react": "^0.21.0",
181
181
  "zod": "^4.6.5",
182
- "@tldraw/tlschema": "^5.5.2",
182
+ "@tldraw/tlschema": "^5.6.0",
183
183
  "lucide-react": "^1.51.0",
184
184
  "@base-ui/react": "1.9.0"
185
185
  },
package/r/_shared.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "_shared",
4
+ "title": "Kit icons",
5
+ "description": "One fixed semantic icon-symbol map for all kit blocks and bundled primitives. Real Phosphor defaults; hosts may replace this shared module or use existing icon props, independently of theme tokens.",
6
+ "dependencies": [
7
+ "@phosphor-icons/react@2.1.10",
8
+ "react@^19.0.0"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/_shared/icons.ts",
13
+ "content": "'use client';\n\n// Fixed semantic symbols for registry blocks and bundled shadcn primitives. Hosts may swap this module\n// or use existing icon props; theme tokens and DESIGN.md alone do not select an icon library.\nimport { createElement, forwardRef } from 'react';\nimport { CircleIcon as PhosphorCircle } from '@phosphor-icons/react';\nimport type { IconProps } from '@phosphor-icons/react';\n\nexport {\n WarningCircleIcon as AlertCircleIcon,\n ArchiveIcon,\n TrayArrowUpIcon as ArchiveRestoreIcon,\n ArrowDownIcon,\n ArrowLeftIcon,\n ArrowUpIcon,\n ArrowUpRightIcon,\n BellIcon,\n CubeIcon as BoxIcon,\n BrainIcon,\n CameraIcon,\n CheckIcon,\n CaretDownIcon as ChevronDownIcon,\n CaretLeftIcon as ChevronLeftIcon,\n CaretRightIcon as ChevronRightIcon,\n CaretUpIcon as ChevronUpIcon,\n CaretDoubleLeftIcon as ChevronsLeftIcon,\n CaretDoubleRightIcon as ChevronsRightIcon,\n CaretUpDownIcon as ChevronsUpDownIcon,\n WarningCircleIcon as CircleAlertIcon,\n CheckCircleIcon as CircleCheckIcon,\n ProhibitIcon as CircleSlashIcon,\n ClockIcon,\n CodeIcon as CodeXmlIcon,\n CompassIcon,\n CopyIcon,\n ArrowElbowDownRightIcon as CornerDownRightIcon,\n DownloadSimpleIcon as DownloadIcon,\n DotsThreeIcon as EllipsisIcon,\n ArrowSquareOutIcon as ExternalLinkIcon,\n EyeIcon,\n FileAudioIcon,\n FileCodeIcon,\n FileIcon,\n FileXlsIcon as FileSpreadsheetIcon,\n FileTextIcon,\n FolderIcon,\n GitForkIcon,\n GlobeIcon,\n DotsSixIcon as GripIcon,\n DotsSixVerticalIcon as GripVerticalIcon,\n HammerIcon,\n HandIcon,\n ClockCounterClockwiseIcon as HistoryIcon,\n ImageIcon,\n ImageBrokenIcon as ImageOffIcon,\n TrayIcon as InboxIcon,\n InfoIcon,\n SquaresFourIcon as LayoutDashboardIcon,\n LayoutIcon as LayoutTemplateIcon,\n BooksIcon as LibraryIcon,\n QueueIcon as ListEndIcon,\n ListIcon,\n ListChecksIcon as ListTodoIcon,\n CircleNotchIcon as Loader2Icon,\n CircleNotchIcon as LoaderCircleIcon,\n CrosshairIcon as LocateFixedIcon,\n SignOutIcon as LogOutIcon,\n ArrowsOutSimpleIcon as Maximize2Icon,\n ArrowsOutIcon as MaximizeIcon,\n ListIcon as MenuIcon,\n ChatCircleDotsIcon as MessageCircleQuestionIcon,\n ChatIcon as MessageSquareIcon,\n ChatDotsIcon as MessageSquarePlusIcon,\n ChatTextIcon as MessageSquareTextIcon,\n ChatsIcon as MessagesSquareIcon,\n MicrophoneIcon as MicIcon,\n ArrowsInSimpleIcon as Minimize2Icon,\n MinusIcon,\n MoonIcon,\n DotsThreeIcon as MoreHorizontalIcon,\n CursorIcon as MousePointer2Icon,\n XCircleIcon as OctagonXIcon,\n PaletteIcon,\n SquareSplitVerticalIcon as PanelBottomIcon,\n SidebarSimpleIcon as PanelLeftIcon,\n SquareSplitHorizontalIcon as PanelRightIcon,\n AppWindowIcon as PanelsTopLeftIcon,\n PaperclipIcon,\n PauseIcon,\n PenNibIcon as PenToolIcon,\n PencilIcon,\n PencilLineIcon,\n PictureInPictureIcon as PictureInPicture2Icon,\n PushPinIcon as PinIcon,\n PlayIcon,\n PlusIcon,\n PresentationIcon,\n ArrowUUpRightIcon as Redo2Icon,\n ArrowsClockwiseIcon as RefreshCwIcon,\n ArrowBendUpLeftIcon as ReplyIcon,\n ArrowCounterClockwiseIcon as RotateCcwIcon,\n PathIcon as RouteIcon,\n RowsIcon as Rows3Icon,\n FloppyDiskIcon as SaveIcon,\n ScanIcon,\n MagnifyingGlassIcon as SearchCheckIcon,\n MagnifyingGlassIcon as SearchIcon,\n PaperPlaneRightIcon as SendIcon,\n GearIcon as SettingsIcon,\n ShapesIcon,\n ShareNetworkIcon as Share2Icon,\n ShieldWarningIcon as ShieldAlertIcon,\n LineSegmentIcon as SlashIcon,\n SparkleIcon,\n SparkleIcon as SparklesIcon,\n SquareIcon,\n NotePencilIcon as SquarePenIcon,\n NoteIcon as StickyNoteIcon,\n ThumbsDownIcon,\n ThumbsUpIcon,\n TrashIcon as Trash2Icon,\n WarningIcon as TriangleAlertIcon,\n TextTIcon as TypeIcon,\n ArrowUUpLeftIcon as Undo2Icon,\n UserIcon,\n UserMinusIcon,\n FlowArrowIcon as WorkflowIcon,\n WrenchIcon,\n XIcon,\n MagnifyingGlassPlusIcon as ZoomInIcon,\n MagnifyingGlassMinusIcon as ZoomOutIcon,\n ArrowDownIcon as ArrowDown,\n ArrowUpIcon as ArrowUp,\n CaretRightIcon as ChevronRight,\n TrayIcon as Inbox,\n MinusIcon as Minus,\n SquareSplitVerticalIcon as PanelBottom,\n SquareSplitHorizontalIcon as PanelRight,\n SparkleIcon as Sparkles,\n} from '@phosphor-icons/react';\n\n// Every kit CircleIcon is a filled status/recording dot. Phosphor's regular circle is a\n// path outline, so SVG fill/strokeWidth (used by existing callers) cannot fill its centre.\n// Keep the native SVG props and ref, while allowing an explicit native weight override.\nexport const CircleIcon = forwardRef<SVGSVGElement, IconProps>((props, ref) =>\n createElement(PhosphorCircle, { weight: 'fill', ...props, ref }));\n",
14
+ "type": "registry:lib",
15
+ "target": "components/_shared/icons.ts"
16
+ }
17
+ ],
18
+ "type": "registry:lib"
19
+ }
@@ -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.58",
8
- "@hachej/boring-feedback@^0.4.58",
7
+ "@hachej/boring-ui-kit@^0.4.60",
8
+ "@hachej/boring-feedback@^0.4.60",
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.58/r/app-shell.json",
15
- "https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.58/r/pi-chat.json"
14
+ "https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.60/r/app-shell.json",
15
+ "https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@0.4.60/r/pi-chat.json"
16
16
  ],
17
17
  "files": [
18
18
  {