@sybilion/uilib 1.4.27 → 1.4.29

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 (43) hide show
  1. package/assets/globals.css +4 -4
  2. package/dist/agent-glossary/content-prompt.generated.ts +8 -2
  3. package/dist/agent-glossary/content.generated.ts +8 -2
  4. package/dist/agent-glossary/content.md +8 -2
  5. package/dist/agent-glossary/content.prompt.md +8 -2
  6. package/dist/agent-glossary/workspace.generated.ts +3 -9
  7. package/dist/agent-glossary/workspace.index.md +3 -9
  8. package/dist/agent-glossary/workspace.md +3 -9
  9. package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
  10. package/dist/esm/src/components/ui/Chat/ChatPrompt/useChatPromptEditor.js +7 -4
  11. package/dist/esm/src/components/ui/Page/PageFooter/PageFooter.styl.js +1 -1
  12. package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js +16 -5
  13. package/dist/esm/types/src/docs/pages/PageEmptyCanvasPage.d.ts +1 -0
  14. package/dist/esm/types/tests/sidebarMenuButton.test.d.ts +1 -0
  15. package/package.json +1 -1
  16. package/src/components/ui/Chat/AGENT.md +18 -0
  17. package/src/components/ui/Chat/ChatChrome/AGENT.md +55 -0
  18. package/src/components/ui/Chat/ChatPrompt/useChatPromptEditor.ts +7 -4
  19. package/src/{docs/agent-guidance/chat-sheet.md → components/ui/Chat/ChatSheet/AGENT.md} +2 -2
  20. package/src/components/ui/Page/AGENT.md +8 -2
  21. package/src/components/ui/Page/PageEmptyCanvas/AGENT.md +17 -0
  22. package/src/components/ui/Page/PageFooter/PageFooter.styl +8 -2
  23. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.tsx +37 -23
  24. package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +41 -39
  25. package/src/docs/pages/ChatComposerPrefillPage.tsx +31 -29
  26. package/src/docs/pages/ChatPage.styl +1 -1
  27. package/src/docs/pages/ChatSheetPage.tsx +2 -2
  28. package/src/docs/pages/ChatSlashCommandsPage.tsx +32 -30
  29. package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +30 -28
  30. package/src/docs/pages/PageColumnsPage.tsx +1 -1
  31. package/src/docs/pages/PageEmptyCanvasPage.tsx +86 -0
  32. package/src/docs/pages/PageFooterPage.tsx +21 -2
  33. package/src/docs/pages/PagePage.tsx +1 -1
  34. package/src/docs/pages/PageTabsPage.tsx +1 -1
  35. package/src/docs/registry.ts +6 -0
  36. package/src/docs/agent-guidance/chat-attachments-dropzone.md +0 -15
  37. package/src/docs/agent-guidance/chat-composer-prefill.md +0 -15
  38. package/src/docs/agent-guidance/chat-slash-commands.md +0 -15
  39. package/src/docs/agent-guidance/chat-user-csv-attachment.md +0 -14
  40. package/src/docs/agent-guidance/page-columns.md +0 -19
  41. package/src/docs/agent-guidance/page-footer.md +0 -15
  42. package/src/docs/agent-guidance/page-tabs.md +0 -19
  43. package/src/docs/agent-guidance/page.md +0 -15
@@ -1,11 +1,10 @@
1
- import cn from 'classnames';
2
-
3
1
  import { Button } from '#uilib/components/ui/Button';
4
2
  import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
5
- import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
6
3
  import { ChevronRight } from 'lucide-react';
7
-
8
4
  import S from './SidebarMenuButton.styl';
5
+ import { Slottable } from '@radix-ui/react-slot';
6
+ import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
7
+ import cn from 'classnames';
9
8
 
10
9
  export function SidebarMenuButton({
11
10
  asChild = false,
@@ -45,38 +44,53 @@ export function SidebarMenuButton({
45
44
  </span>
46
45
  ) : null;
47
46
 
48
- const userContent = (
49
- <>
50
- {label}
51
- {addon}
52
- </>
47
+ const buttonClassName = cn(
48
+ variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
49
+ S[`size-${size}`],
50
+ className,
53
51
  );
54
52
 
53
+ if (effectiveAsChild) {
54
+ // The consumer supplies the root element (e.g. <NavLink/>). Radix Slot
55
+ // requires exactly one element child, so the consumer's element is wrapped
56
+ // in <Slottable/> and icon/addon stay as siblings — Slot clones the
57
+ // consumer's element with Button's props and injects the siblings as its
58
+ // children. SmartTextTruncate is intentionally omitted: wrapping the
59
+ // consumer's element would nest the rendered <a> inside a truncate
60
+ // container and break the slot contract.
61
+ return (
62
+ <Button
63
+ asChild
64
+ variant={variant}
65
+ size={size}
66
+ data-slot="sidebar-menu-button"
67
+ data-sidebar="menu-button"
68
+ data-active={isActive}
69
+ className={buttonClassName}
70
+ {...props}
71
+ >
72
+ {icon}
73
+ <Slottable>{children}</Slottable>
74
+ {addon}
75
+ </Button>
76
+ );
77
+ }
78
+
55
79
  return (
56
80
  <Button
57
- asChild={effectiveAsChild}
58
81
  variant={variant}
59
82
  size={size}
60
83
  data-slot="sidebar-menu-button"
61
84
  data-sidebar="menu-button"
62
85
  data-active={isActive}
63
86
  aria-expanded={hasSubItems ? isExpanded : undefined}
64
- className={cn(
65
- variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
66
- S[`size-${size}`],
67
- className,
68
- )}
87
+ className={buttonClassName}
69
88
  {...props}
70
89
  >
71
90
  {icon}
72
- {effectiveAsChild ? (
73
- userContent
74
- ) : (
75
- <>
76
- {userContent}
77
- {chevron}
78
- </>
79
- )}
91
+ {label}
92
+ {addon}
93
+ {chevron}
80
94
  </Button>
81
95
  );
82
96
  }
@@ -7,8 +7,8 @@ import {
7
7
  MessageRole,
8
8
  TEXT_ATTACHMENT_ACCEPT_PARTS,
9
9
  } from '#uilib/components/ui/Chat';
10
+ import chatAttachmentsDropzoneGuidance from '#uilib/components/ui/Chat/ChatChrome/AGENT.md';
10
11
  import { PageContentSection } from '#uilib/components/ui/Page';
11
- import chatAttachmentsDropzoneGuidance from '#uilib/docs/agent-guidance/chat-attachments-dropzone.md';
12
12
  import { ScrollRef } from '@homecode/ui';
13
13
 
14
14
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -111,44 +111,46 @@ export default function ChatAttachmentsDropzonePage() {
111
111
  send to post it. Office and PDF parsers load on demand when you attach
112
112
  those types; PDF also requires <code>allowPdfAttachments</code>.
113
113
  </p>
114
- <ChatChrome
115
- variant="clean"
116
- showResizeHandle={false}
117
- resizeHandle={undefined}
118
- onClose={undefined}
119
- isEmpty={isEmpty}
120
- renderPresets={() => null}
121
- messages={messages}
122
- onQuickReply={() => {}}
123
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
124
- isLoading={isLoading}
125
- scriptContinueLabel={undefined}
126
- onScriptContinue={undefined}
127
- showSyntheticBranchButtons={false}
128
- unusedBranchKeys={[]}
129
- showInlinePresets={false}
130
- isLastMessageFromUser={isLastMessageFromUser}
131
- scrollRef={scrollRef}
132
- effectiveScopeId="docs-chat-attachments-dropzone"
133
- onPromptSubmit={onPromptSubmit}
134
- onChatDeleted={() => {}}
135
- allowedAttachments={TEXT_ATTACHMENT_ACCEPT_PARTS}
136
- allowPdfAttachments
137
- emptyState={{
138
- title: 'Drop a text, Office, or PDF file',
139
- description:
140
- 'Drag a file onto this panel, review it above the composer, then send. DOCX and XLSX are parsed in the browser.',
141
- additionalContent: (
142
- <p style={{ fontSize: 13, opacity: 0.85 }}>
143
- Accepted types include <code>.txt</code>, <code>.csv</code>,{' '}
144
- <code>.md</code>, <code>.json</code>, <code>.docx</code>,{' '}
145
- <code>.xlsx</code>, and more (
146
- {TEXT_ATTACHMENT_ACCEPT_PARTS.length} entries in the text
147
- allowlist).
148
- </p>
149
- ),
150
- }}
151
- />
114
+ <div style={{ minHeight: 600 }}>
115
+ <ChatChrome
116
+ variant="clean"
117
+ showResizeHandle={false}
118
+ resizeHandle={undefined}
119
+ onClose={undefined}
120
+ isEmpty={isEmpty}
121
+ renderPresets={() => null}
122
+ messages={messages}
123
+ onQuickReply={() => {}}
124
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
125
+ isLoading={isLoading}
126
+ scriptContinueLabel={undefined}
127
+ onScriptContinue={undefined}
128
+ showSyntheticBranchButtons={false}
129
+ unusedBranchKeys={[]}
130
+ showInlinePresets={false}
131
+ isLastMessageFromUser={isLastMessageFromUser}
132
+ scrollRef={scrollRef}
133
+ effectiveScopeId="docs-chat-attachments-dropzone"
134
+ onPromptSubmit={onPromptSubmit}
135
+ onChatDeleted={() => {}}
136
+ allowedAttachments={TEXT_ATTACHMENT_ACCEPT_PARTS}
137
+ allowPdfAttachments
138
+ emptyState={{
139
+ title: 'Drop a text, Office, or PDF file',
140
+ description:
141
+ 'Drag a file onto this panel, review it above the composer, then send. DOCX and XLSX are parsed in the browser.',
142
+ additionalContent: (
143
+ <p style={{ fontSize: 13, opacity: 0.85 }}>
144
+ Accepted types include <code>.txt</code>, <code>.csv</code>,{' '}
145
+ <code>.md</code>, <code>.json</code>, <code>.docx</code>,{' '}
146
+ <code>.xlsx</code>, and more (
147
+ {TEXT_ATTACHMENT_ACCEPT_PARTS.length} entries in the text
148
+ allowlist).
149
+ </p>
150
+ ),
151
+ }}
152
+ />
153
+ </div>
152
154
  </PageContentSection>
153
155
  </>
154
156
  );
@@ -7,8 +7,8 @@ import {
7
7
  type Message,
8
8
  MessageRole,
9
9
  } from '#uilib/components/ui/Chat';
10
+ import chatComposerPrefillGuidance from '#uilib/components/ui/Chat/AGENT.md';
10
11
  import { PageContentSection } from '#uilib/components/ui/Page';
11
- import chatComposerPrefillGuidance from '#uilib/docs/agent-guidance/chat-composer-prefill.md';
12
12
  import { ScrollRef } from '@homecode/ui';
13
13
  import { MessageSquare } from 'lucide-react';
14
14
 
@@ -172,34 +172,36 @@ export default function ChatComposerPrefillPage() {
172
172
  opens chat with prefill once
173
173
  </li>
174
174
  </ul>
175
- <ChatChrome
176
- variant="clean"
177
- showResizeHandle={false}
178
- resizeHandle={undefined}
179
- onClose={undefined}
180
- isEmpty={isEmpty}
181
- renderPresets={() => null}
182
- messages={messages}
183
- onQuickReply={() => {}}
184
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
185
- isLoading={isLoading}
186
- scriptContinueLabel={undefined}
187
- onScriptContinue={undefined}
188
- showSyntheticBranchButtons={false}
189
- unusedBranchKeys={[]}
190
- showInlinePresets={false}
191
- isLastMessageFromUser={isLastMessageFromUser}
192
- scrollRef={scrollRef}
193
- effectiveScopeId="docs-chat-composer-prefill-inline"
194
- onPromptSubmit={onSubmit}
195
- onChatDeleted={() => {}}
196
- promptPrefill={inlinePrefill}
197
- emptyState={{
198
- title: 'Inline prefill demo',
199
- description:
200
- 'Click “Prefill inline composer” or type below. Portal and ?prompt= use the header ChatSheet.',
201
- }}
202
- />
175
+ <div style={{ minHeight: 600 }}>
176
+ <ChatChrome
177
+ variant="clean"
178
+ showResizeHandle={false}
179
+ resizeHandle={undefined}
180
+ onClose={undefined}
181
+ isEmpty={isEmpty}
182
+ renderPresets={() => null}
183
+ messages={messages}
184
+ onQuickReply={() => {}}
185
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
186
+ isLoading={isLoading}
187
+ scriptContinueLabel={undefined}
188
+ onScriptContinue={undefined}
189
+ showSyntheticBranchButtons={false}
190
+ unusedBranchKeys={[]}
191
+ showInlinePresets={false}
192
+ isLastMessageFromUser={isLastMessageFromUser}
193
+ scrollRef={scrollRef}
194
+ effectiveScopeId="docs-chat-composer-prefill-inline"
195
+ onPromptSubmit={onSubmit}
196
+ onChatDeleted={() => {}}
197
+ promptPrefill={inlinePrefill}
198
+ emptyState={{
199
+ title: 'Inline prefill demo',
200
+ description:
201
+ 'Click “Prefill inline composer” or type below. Portal and ?prompt= use the header ChatSheet.',
202
+ }}
203
+ />
204
+ </div>
203
205
  </PageContentSection>
204
206
  </>
205
207
  );
@@ -3,4 +3,4 @@
3
3
  flex-direction column
4
4
  flex 1
5
5
  // Bounded height so ChatChrome flex column can place presets above the prompt
6
- min-height 480px
6
+ min-height 600px
@@ -1,6 +1,6 @@
1
1
  import type { SlashCommandItem } from '#uilib/components/ui/Chat';
2
+ import chatSheetGuidance from '#uilib/components/ui/Chat/ChatSheet/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
- import chatSheetGuidance from '#uilib/docs/agent-guidance/chat-sheet.md';
4
4
  import { MessageSquare } from 'lucide-react';
5
5
 
6
6
  import {
@@ -28,7 +28,7 @@ export default function ChatSheetPage() {
28
28
  <AppPageHeader
29
29
  breadcrumbs={[{ label: 'Chat' }, { label: 'Chat sheet' }]}
30
30
  title="Chat sheet (portal)"
31
- subheader={`Same integration as the app dataset page: ChatSheet in header actions with dataset-scoped presets for "${DOCS_SAMPLE_DATASET_NAME}". Panel portaled into the shell chat slot.`}
31
+ subheader={`Same integration pattern as the app dataset page: portal ChatSheet with dataset-scoped presets for "${DOCS_SAMPLE_DATASET_NAME}" (this demo uses header actions for the trigger). Panel portaled into the shell chat slot.`}
32
32
  actions={
33
33
  <DocsHeaderActions
34
34
  scopeId={DOCS_CHAT_SHEET_SCOPE_ID}
@@ -7,8 +7,8 @@ import {
7
7
  MessageRole,
8
8
  type SlashCommandItem,
9
9
  } from '#uilib/components/ui/Chat';
10
+ import chatSlashCommandsGuidance from '#uilib/components/ui/Chat/ChatChrome/AGENT.md';
10
11
  import { PageContentSection } from '#uilib/components/ui/Page';
11
- import chatSlashCommandsGuidance from '#uilib/docs/agent-guidance/chat-slash-commands.md';
12
12
  import { ScrollRef } from '@homecode/ui';
13
13
 
14
14
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -117,35 +117,37 @@ export default function ChatSlashCommandsPage() {
117
117
  font-size: 150%;
118
118
  }
119
119
  `}</style>
120
- <ChatChrome
121
- variant="clean"
122
- showResizeHandle={false}
123
- resizeHandle={undefined}
124
- onClose={undefined}
125
- isEmpty={isEmpty}
126
- renderPresets={() => null}
127
- messages={messages}
128
- onQuickReply={() => {}}
129
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
130
- isLoading={isLoading}
131
- scriptContinueLabel={undefined}
132
- onScriptContinue={undefined}
133
- showSyntheticBranchButtons={false}
134
- unusedBranchKeys={[]}
135
- showInlinePresets={false}
136
- isLastMessageFromUser={isLastMessageFromUser}
137
- scrollRef={scrollRef}
138
- effectiveScopeId="docs-chat-slash-inline"
139
- onPromptSubmit={onSubmit}
140
- onChatDeleted={() => {}}
141
- slashCommandItems={DOCS_SLASH_ITEMS}
142
- promptPlaceholder='Ask something or type "/" for demo commands…'
143
- emptyState={{
144
- title: 'Try slash commands',
145
- description:
146
- 'Pick a command from the palette to insert a mention chip with optional className and color.',
147
- }}
148
- />
120
+ <div style={{ minHeight: 600 }}>
121
+ <ChatChrome
122
+ variant="clean"
123
+ showResizeHandle={false}
124
+ resizeHandle={undefined}
125
+ onClose={undefined}
126
+ isEmpty={isEmpty}
127
+ renderPresets={() => null}
128
+ messages={messages}
129
+ onQuickReply={() => {}}
130
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
131
+ isLoading={isLoading}
132
+ scriptContinueLabel={undefined}
133
+ onScriptContinue={undefined}
134
+ showSyntheticBranchButtons={false}
135
+ unusedBranchKeys={[]}
136
+ showInlinePresets={false}
137
+ isLastMessageFromUser={isLastMessageFromUser}
138
+ scrollRef={scrollRef}
139
+ effectiveScopeId="docs-chat-slash-inline"
140
+ onPromptSubmit={onSubmit}
141
+ onChatDeleted={() => {}}
142
+ slashCommandItems={DOCS_SLASH_ITEMS}
143
+ promptPlaceholder='Ask something or type "/" for demo commands…'
144
+ emptyState={{
145
+ title: 'Try slash commands',
146
+ description:
147
+ 'Pick a command from the palette to insert a mention chip with optional className and color.',
148
+ }}
149
+ />
150
+ </div>
149
151
  </PageContentSection>
150
152
  </>
151
153
  );
@@ -6,8 +6,8 @@ import {
6
6
  type Message,
7
7
  MessageRole,
8
8
  } from '#uilib/components/ui/Chat';
9
+ import chatUserCsvAttachmentGuidance from '#uilib/components/ui/Chat/ChatChrome/AGENT.md';
9
10
  import { PageContentSection } from '#uilib/components/ui/Page';
10
- import chatUserCsvAttachmentGuidance from '#uilib/docs/agent-guidance/chat-user-csv-attachment.md';
11
11
  import { ScrollRef } from '@homecode/ui';
12
12
 
13
13
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -139,33 +139,35 @@ export default function ChatUserCsvAttachmentPage() {
139
139
  Load preset-style message + CSV attachment
140
140
  </Button>
141
141
  </p>
142
- <ChatChrome
143
- variant="clean"
144
- showResizeHandle={false}
145
- resizeHandle={undefined}
146
- onClose={undefined}
147
- isEmpty={isEmpty}
148
- renderPresets={() => null}
149
- messages={messages}
150
- onQuickReply={() => {}}
151
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
152
- isLoading={isLoading}
153
- scriptContinueLabel={undefined}
154
- onScriptContinue={undefined}
155
- showSyntheticBranchButtons={false}
156
- unusedBranchKeys={[]}
157
- showInlinePresets={false}
158
- isLastMessageFromUser={isLastMessageFromUser}
159
- scrollRef={scrollRef}
160
- effectiveScopeId="docs-chat-user-csv"
161
- onPromptSubmit={onSubmit}
162
- onChatDeleted={() => {}}
163
- emptyState={{
164
- title: 'CSV attachment demo',
165
- description:
166
- 'Click the button above or send any message. The CSV row uses the same UI as dashboard presets.',
167
- }}
168
- />
142
+ <div style={{ minHeight: 600 }}>
143
+ <ChatChrome
144
+ variant="clean"
145
+ showResizeHandle={false}
146
+ resizeHandle={undefined}
147
+ onClose={undefined}
148
+ isEmpty={isEmpty}
149
+ renderPresets={() => null}
150
+ messages={messages}
151
+ onQuickReply={() => {}}
152
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
153
+ isLoading={isLoading}
154
+ scriptContinueLabel={undefined}
155
+ onScriptContinue={undefined}
156
+ showSyntheticBranchButtons={false}
157
+ unusedBranchKeys={[]}
158
+ showInlinePresets={false}
159
+ isLastMessageFromUser={isLastMessageFromUser}
160
+ scrollRef={scrollRef}
161
+ effectiveScopeId="docs-chat-user-csv"
162
+ onPromptSubmit={onSubmit}
163
+ onChatDeleted={() => {}}
164
+ emptyState={{
165
+ title: 'CSV attachment demo',
166
+ description:
167
+ 'Click the button above or send any message. The CSV row uses the same UI as dashboard presets.',
168
+ }}
169
+ />
170
+ </div>
169
171
  </PageContentSection>
170
172
  </>
171
173
  );
@@ -1,7 +1,7 @@
1
1
  import type { CSSProperties } from 'react';
2
2
 
3
3
  import { PageColumns, PageContentSection } from '#uilib/components/ui/Page';
4
- import pageColumnsGuidance from '#uilib/docs/agent-guidance/page-columns.md';
4
+ import pageColumnsGuidance from '#uilib/components/ui/Page/AGENT.md';
5
5
 
6
6
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
7
7
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -0,0 +1,86 @@
1
+ import { Button } from '#uilib/components/ui/Button';
2
+ import {
3
+ PageContent,
4
+ PageContentSection,
5
+ PageEmptyCanvas,
6
+ } from '#uilib/components/ui/Page';
7
+ import pageEmptyCanvasGuidance from '#uilib/components/ui/Page/PageEmptyCanvas/AGENT.md';
8
+
9
+ import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
10
+ import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
11
+ import { DocsHeaderActions } from '../docsHeaderActions';
12
+
13
+ const demoFrameStyle = {
14
+ border: '2px dashed var(--border)',
15
+ borderRadius: 'var(--p-3)',
16
+ minHeight: 320,
17
+ display: 'flex',
18
+ } as const;
19
+
20
+ export default function PageEmptyCanvasPage() {
21
+ return (
22
+ <>
23
+ <AppPageHeader
24
+ breadcrumbs={[{ label: 'PageEmptyCanvas' }]}
25
+ title="PageEmptyCanvas"
26
+ subheader="Centered empty state with title, hint, and optional CTA. Use when a route has no data yet."
27
+ actions={<DocsHeaderActions />}
28
+ />
29
+ <DocsGuidance source={pageEmptyCanvasGuidance} />
30
+ <PageContentSection
31
+ style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
32
+ >
33
+ <section>
34
+ <h3>Title and hint</h3>
35
+ <p
36
+ style={{
37
+ marginBottom: '1rem',
38
+ color: 'var(--muted-foreground)',
39
+ }}
40
+ >
41
+ Minimal empty state: a short <code>title</code> plus a{' '}
42
+ <code>hint</code> describing what to do next.
43
+ </p>
44
+ <div style={demoFrameStyle}>
45
+ <PageEmptyCanvas
46
+ title="No alerts yet"
47
+ hint="When a news alert fires, it will appear here."
48
+ />
49
+ </div>
50
+ </section>
51
+
52
+ <section>
53
+ <h3>Extended example</h3>
54
+ <p
55
+ style={{
56
+ marginBottom: '1rem',
57
+ color: 'var(--muted-foreground)',
58
+ }}
59
+ >
60
+ Real-world placement: render directly under <code>PageContent</code>
61
+ ; the canvas centers and grows itself.
62
+ </p>
63
+ <div style={{ ...demoFrameStyle, minHeight: 360 }}>
64
+ <PageContent variant="clean">
65
+ <PageEmptyCanvas
66
+ title="This workspace is empty"
67
+ hint="Connect a data source to populate your dashboard with drivers and forecasts."
68
+ >
69
+ <Button type="button" variant="default">
70
+ Connect data source
71
+ </Button>
72
+ <a
73
+ href="https://sybilion.com"
74
+ target="_blank"
75
+ rel="noopener noreferrer"
76
+ >
77
+ Learn how to connect a data source
78
+ </a>
79
+ </PageEmptyCanvas>
80
+ </PageContent>
81
+ </div>
82
+ </section>
83
+ </PageContentSection>
84
+ </>
85
+ );
86
+ }
@@ -8,7 +8,6 @@ import {
8
8
  } from '#uilib/components/ui/Page';
9
9
  import type { PageFooterLinkItem } from '#uilib/components/ui/Page/PageFooter/PageFooter';
10
10
  import { Switch } from '#uilib/components/ui/Switch';
11
- import pageFooterGuidance from '#uilib/docs/agent-guidance/page-footer.md';
12
11
  import { GlobeIcon, Hash, MailIcon, MessageCircle } from 'lucide-react';
13
12
 
14
13
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -16,6 +15,26 @@ import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
16
15
  import { DocsHeaderActions } from '../docsHeaderActions';
17
16
  import S from './PageFooterPage.styl';
18
17
 
18
+ /** Human-maintainer docs only — not in agent glossary (shell-wired via AppLayout). */
19
+ const PAGE_FOOTER_GUIDANCE = `PageFooter renders the page-level footer with copyright, a version label, and an optional row of links that wrap on narrow viewports. Links accept an icon and label and open external destinations.
20
+
21
+ **Shell-only.** Standalone apps wire this in \`AppLayout\` via \`AppShellMainContent footer={…}\`; agents composing route pages do not import or render PageFooter.
22
+
23
+ ## When to use
24
+
25
+ - At the bottom of an application shell to show copyright, version, and support links.
26
+ - When you need a consistent set of external links, such as website, email, or community channels.
27
+
28
+ ## When not to use
29
+
30
+ - For page actions or navigation within the app; keep those in the header or sidebar.
31
+ - Inside individual sections or cards; the footer belongs to the page shell.
32
+
33
+ ## Do
34
+
35
+ - Keep the link list short so it remains scannable when it wraps on mobile.
36
+ `;
37
+
19
38
  const DEMO_LINKS: PageFooterLinkItem[] = [
20
39
  {
21
40
  id: 'site',
@@ -70,7 +89,7 @@ export default function PageFooterPage() {
70
89
  subheader="Copyright + optional link row with gap and wrapping."
71
90
  actions={<DocsHeaderActions />}
72
91
  />
73
- <DocsGuidance source={pageFooterGuidance} />
92
+ <DocsGuidance source={PAGE_FOOTER_GUIDANCE} />
74
93
  <PageContent>
75
94
  <PageContentSection title="With links prop">
76
95
  <div
@@ -1,5 +1,5 @@
1
1
  import { PageContent, PageContentSection } from '#uilib/components/ui/Page';
2
- import pageGuidance from '#uilib/docs/agent-guidance/page.md';
2
+ import pageGuidance from '#uilib/components/ui/Page/AGENT.md';
3
3
 
4
4
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
5
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -1,5 +1,5 @@
1
1
  import { PageContentSection, PageTabs } from '#uilib/components/ui/Page';
2
- import pageTabsGuidance from '#uilib/docs/agent-guidance/page-tabs.md';
2
+ import pageTabsGuidance from '#uilib/components/ui/Page/AGENT.md';
3
3
 
4
4
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
5
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -428,6 +428,12 @@ export const DOC_REGISTRY: DocEntry[] = [
428
428
  section: 'Layout',
429
429
  load: () => import('./pages/PageColumnsPage'),
430
430
  },
431
+ {
432
+ slug: 'page-empty-canvas',
433
+ title: 'PageEmptyCanvas',
434
+ section: 'Layout',
435
+ load: () => import('./pages/PageEmptyCanvasPage'),
436
+ },
431
437
  {
432
438
  slug: 'page-footer',
433
439
  title: 'PageFooter',
@@ -1,15 +0,0 @@
1
- ChatChrome supports a file dropzone: users drag text, Office, or PDF files onto the chat panel and the parsed content attaches to the prompt until they send. Configure accepted types via allowedAttachments and enable PDFs with allowPdfAttachments.
2
-
3
- ## When to use
4
-
5
- - When users need to give the assistant file context, such as CSV data or documents.
6
- - When attached files should be reviewed alongside the typed prompt before sending.
7
-
8
- ## When not to use
9
-
10
- - For persistent file uploads to storage; use a dedicated upload flow.
11
- - When only plain text input is expected; omit the attachment props to disable the dropzone.
12
-
13
- ## Do
14
-
15
- - Office and PDF parsers load on demand, so the first attachment of those types incurs a one-off load.
@@ -1,15 +0,0 @@
1
- The chat composer can be prefilled without auto-sending: pass promptPrefill to ChatChrome, call ChatSheetActions.openNewChatWithPrefill for the portal sheet, or use a ?prompt= deep link. Focus lands at the end of the text so users can edit before submitting.
2
-
3
- ## When to use
4
-
5
- - To seed the composer from a call to action, such as a suggested question on a dataset page.
6
- - To deep link into the product with a prepared prompt via ?prompt=.
7
- - When opening a new chat session that should start from a template prompt.
8
-
9
- ## When not to use
10
-
11
- - To send a message automatically on behalf of the user; prefill never submits.
12
-
13
- ## Do
14
-
15
- - Keep prefilled text short and editable; it is a starting point, not a command.