@hailer/mcp 1.3.14 → 1.3.23
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/.claude/skills/create-and-publish-app/SKILL.md +44 -56
- package/.claude/skills/hailer-app-builder/SKILL.md +414 -970
- package/.claude/skills/hailer-app-primitives/SKILL.md +742 -0
- package/.claude/skills/hailer-apps-pictures/SKILL.md +191 -87
- package/.claude/skills/hailer-design-patterns/SKILL.md +317 -0
- package/.claude/skills/hailer-design-system/SKILL.md +202 -149
- package/.claude/skills/hailer-workflow-archetypes/SKILL.md +301 -0
- package/.claude/skills/insight-join-patterns/SKILL.md +313 -0
- package/.claude/skills/publish-hailer-app/SKILL.md +211 -0
- package/.claude/skills/sdk-activity-patterns/SKILL.md +257 -105
- package/.claude/skills/sdk-function-fields/SKILL.md +253 -492
- package/.claude/skills/sdk-insight-calculations/SKILL.md +364 -0
- package/.claude/skills/sdk-insight-queries/SKILL.md +192 -397
- package/.claude/skills/sdk-ws-config-skill/SKILL.md +265 -720
- package/.claude/skills/tool-response-verification/SKILL.md +143 -0
- package/CLAUDE.md +50 -19
- package/dist/bot/bot.d.ts.map +1 -1
- package/dist/bot/bot.js +26 -34
- package/dist/bot/bot.js.map +1 -1
- package/dist/bot/services/helper-prompt.d.ts +1 -1
- package/dist/bot/services/helper-prompt.d.ts.map +1 -1
- package/dist/bot/services/helper-prompt.js +62 -82
- package/dist/bot/services/helper-prompt.js.map +1 -1
- package/dist/bot/services/system-prompt.js +4 -4
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/mcp/hailer-rpc.d.ts +1 -0
- package/dist/mcp/hailer-rpc.d.ts.map +1 -1
- package/dist/mcp/hailer-rpc.js +4 -0
- package/dist/mcp/hailer-rpc.js.map +1 -1
- package/dist/mcp/tools/activity.d.ts.map +1 -1
- package/dist/mcp/tools/activity.js +8 -2
- package/dist/mcp/tools/activity.js.map +1 -1
- package/dist/mcp/tools/app-core.d.ts.map +1 -1
- package/dist/mcp/tools/app-core.js +6 -3
- package/dist/mcp/tools/app-core.js.map +1 -1
- package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
- package/dist/mcp/tools/app-marketplace.js +5 -1
- package/dist/mcp/tools/app-marketplace.js.map +1 -1
- package/dist/mcp/webhook-handler.d.ts.map +1 -1
- package/dist/mcp/webhook-handler.js +27 -0
- package/dist/mcp/webhook-handler.js.map +1 -1
- package/dist/public-chat/graduate.d.ts.map +1 -1
- package/dist/public-chat/graduate.js +153 -53
- package/dist/public-chat/graduate.js.map +1 -1
- package/dist/public-chat/rate-limit.js +1 -1
- package/dist/public-chat/rate-limit.js.map +1 -1
- package/dist/public-chat/studio-prewarm.js +2 -2
- package/dist/public-chat/studio-prewarm.js.map +1 -1
- package/dist/public-chat/system-prompt.d.ts.map +1 -1
- package/dist/public-chat/system-prompt.js +41 -25
- package/dist/public-chat/system-prompt.js.map +1 -1
- package/package.json +1 -1
- package/.claude/skills/hailer-project-protocol/SKILL.md +0 -398
- package/.opencode/package-lock.json +0 -117
|
@@ -1,112 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hailer-design-system
|
|
3
|
-
description: Chakra UI v2 theme, colors, icons, and component patterns for Hailer apps
|
|
4
|
-
version: 2.
|
|
5
|
-
triggers:
|
|
3
|
+
description: Chakra UI v2 theme, colors, icons, and component patterns for Hailer apps — load when building any app UI, choosing component variants, styling for dark/light mode, or using icons
|
|
4
|
+
version: 2.4.0
|
|
5
|
+
triggers:
|
|
6
|
+
- build app
|
|
7
|
+
- UI components
|
|
8
|
+
- styling
|
|
9
|
+
- theme
|
|
10
|
+
- colors
|
|
11
|
+
- icons
|
|
12
|
+
- buttons
|
|
13
|
+
- forms
|
|
6
14
|
---
|
|
7
15
|
|
|
8
16
|
# Hailer Design System
|
|
9
17
|
|
|
10
|
-
Chakra UI v2 with
|
|
11
|
-
|
|
12
|
-
**Full reference:** Read `docs/design-system/HAILER_DESIGN_SYSTEM.md` for comprehensive documentation (all icons, all components, full examples).
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Design Principles
|
|
17
|
-
|
|
18
|
-
### Layout
|
|
19
|
-
|
|
20
|
-
Common layout patterns (use Chakra Flex/Grid to implement):
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
Dashboard: [Sidebar 240px] [Main Content flex-1]
|
|
24
|
-
List View: [Filters 280px] [Table/Cards flex-1]
|
|
25
|
-
Detail View: [Main 2/3] [Sidebar 1/3]
|
|
26
|
-
Form: [Labels 1/3] [Inputs 2/3] or stacked on mobile
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Grid: 12-column, 1200–1400px max-width, centered. Gutters 16–24px.
|
|
30
|
-
|
|
31
|
-
### Spacing Scale
|
|
32
|
-
|
|
33
|
-
| Token | px | Use |
|
|
34
|
-
|-------|----|-----|
|
|
35
|
-
| 1 | 4px | Icon padding |
|
|
36
|
-
| 2 | 8px | Compact (button padding) |
|
|
37
|
-
| 4 | 16px | Default (card padding, list gaps) |
|
|
38
|
-
| 6 | 24px | Section gaps |
|
|
39
|
-
| 8 | 32px | Page sections |
|
|
40
|
-
| 12 | 48px | Major sections |
|
|
41
|
-
|
|
42
|
-
### Visual Hierarchy
|
|
43
|
-
|
|
44
|
-
**Size scale:**
|
|
45
|
-
|
|
46
|
-
| Level | Size | Weight |
|
|
47
|
-
|-------|------|--------|
|
|
48
|
-
| Page title | 32–48px (`2xl`) | Bold |
|
|
49
|
-
| Section header | 24–28px (`xl`) | Semibold |
|
|
50
|
-
| Card title | 18–20px (`lg`/`md`) | Medium |
|
|
51
|
-
| Body | 14–16px | Regular |
|
|
52
|
-
| Caption/label | 12–13px (`sm`) | Regular/Medium |
|
|
53
|
-
|
|
54
|
-
**Emphasis:** size > weight > color > whitespace > position (F-pattern: top-left reads first).
|
|
55
|
-
|
|
56
|
-
**Density:** Bold labels + regular values for scannability. Group related info in cards. Show summary first, details on demand.
|
|
57
|
-
|
|
58
|
-
### Responsive Breakpoints
|
|
59
|
-
|
|
60
|
-
| Breakpoint | Width | Layout |
|
|
61
|
-
|------------|-------|--------|
|
|
62
|
-
| Mobile | < 640px | 1 column, stacked |
|
|
63
|
-
| Tablet | 640–1024px | 2 columns, sidebar hidden |
|
|
64
|
-
| Desktop | > 1024px | Full layout |
|
|
65
|
-
| Wide | > 1440px | max-width container |
|
|
66
|
-
|
|
67
|
-
Mobile adaptations: stack layouts vertically, hamburger menu, 44px min touch targets, bottom sheets over modals.
|
|
68
|
-
|
|
69
|
-
### Empty States
|
|
70
|
-
|
|
71
|
-
Always design for empty — never leave a blank panel:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
[Illustration / Icon]
|
|
75
|
-
No items yet
|
|
76
|
-
Add your first item
|
|
77
|
-
[+ Add Item]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Use `VStack` centered in the container with muted icon, `Text` heading, helper text, and a primary action button.
|
|
81
|
-
|
|
82
|
-
### Loading States
|
|
83
|
-
|
|
84
|
-
- **Skeleton** — gray boxes mimicking content shape (initial page loads)
|
|
85
|
-
- **Spinner** — for triggered actions, not initial loads
|
|
86
|
-
- **Progress** — multi-step or long operations
|
|
87
|
-
- **Optimistic** — show expected result immediately, revert on error
|
|
88
|
-
|
|
89
|
-
---
|
|
18
|
+
Chakra UI v2 with the Hailer custom theme. The scaffold wires `<ChakraProvider theme={hailerTheme}>` in `main.tsx` — every stock Chakra component is already on Hailer brand out of the box.
|
|
90
19
|
|
|
91
20
|
## Setup
|
|
92
21
|
|
|
93
|
-
The `react-ts` scaffold template already includes the design system at `src/hailer/theme/`. **Do NOT copy from other projects.**
|
|
94
|
-
|
|
95
22
|
```tsx
|
|
96
|
-
// Already set up by scaffold in main.tsx
|
|
97
23
|
import { ChakraProvider } from '@chakra-ui/react';
|
|
98
|
-
import
|
|
24
|
+
import hailerTheme from './hailer/theme/theme'; // default export named hailerTheme
|
|
99
25
|
|
|
100
|
-
<ChakraProvider theme={
|
|
26
|
+
<ChakraProvider theme={hailerTheme}>
|
|
101
27
|
<App />
|
|
102
28
|
</ChakraProvider>
|
|
103
29
|
```
|
|
104
30
|
|
|
31
|
+
## Design System Location
|
|
32
|
+
|
|
33
|
+
The theme ships with `@hailer/create-app` at `src/hailer/theme/` (theme + `icons/`) — nothing to copy. `main.tsx` already wires `<ChakraProvider theme={hailerTheme}>`.
|
|
34
|
+
|
|
105
35
|
---
|
|
106
36
|
|
|
107
37
|
## Colors
|
|
108
38
|
|
|
109
|
-
|
|
39
|
+
Let the theme handle colors automatically. Rarely specify manually.
|
|
110
40
|
|
|
111
41
|
| Use | Color |
|
|
112
42
|
|-----|-------|
|
|
@@ -116,42 +46,49 @@ import { theme } from './hailer/theme/theme';
|
|
|
116
46
|
| Neutral | `colorScheme="gray"` |
|
|
117
47
|
|
|
118
48
|
**Semantic tokens (auto light/dark):**
|
|
119
|
-
- `subtleText`
|
|
120
|
-
- `bodyText`
|
|
121
|
-
- `chakra-body-bg`
|
|
49
|
+
- `subtleText` — muted text
|
|
50
|
+
- `bodyText` — main text
|
|
51
|
+
- `chakra-body-bg` — page background
|
|
52
|
+
|
|
53
|
+
---
|
|
122
54
|
|
|
123
|
-
|
|
124
|
-
- Page: `gray.50` or white
|
|
125
|
-
- Card: white (with subtle shadow)
|
|
126
|
-
- Hover: `gray.100`
|
|
127
|
-
- Selected: `brand.50` or `blue.50`
|
|
128
|
-
- Disabled: `gray.100` with `gray.400` text
|
|
55
|
+
## Dark Mode
|
|
129
56
|
|
|
130
|
-
|
|
57
|
+
`useSystemColorMode: true` — theme respects the user's OS setting automatically.
|
|
131
58
|
|
|
132
59
|
---
|
|
133
60
|
|
|
134
61
|
## Buttons
|
|
135
62
|
|
|
136
63
|
**Variants:**
|
|
137
|
-
- `solid` (default)
|
|
138
|
-
- `outline`
|
|
139
|
-
- `ghost`
|
|
64
|
+
- `solid` (default) — for 1–2 button groups
|
|
65
|
+
- `outline` — for 3+ buttons in a series (note: overrides `color` prop — text renders in theme color, not specified color)
|
|
66
|
+
- `ghost` — subtle secondary actions
|
|
67
|
+
- `unstyled` — full color control; requires explicit `display="flex"`, `alignItems="center"`, `border`, `bg`, `color`, `px`, `h`, `borderRadius` props
|
|
68
|
+
|
|
69
|
+
**Automatic button styling (applied by theme, do not override):**
|
|
70
|
+
- `textTransform: uppercase`, `letterSpacing: wider`, `fontWeight: bold`, `borderRadius: 30px` (pill), `lineHeight: 1`
|
|
71
|
+
|
|
72
|
+
**Sizes:** `xs`, `sm`, `md`, `lg`
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
<Button isLoading loadingText="Saving...">Save</Button>
|
|
76
|
+
<Button isDisabled>Unavailable</Button>
|
|
77
|
+
```
|
|
140
78
|
|
|
141
79
|
**Critical rules:**
|
|
142
80
|
- Max 2 color schemes per button group
|
|
143
81
|
- Right-align button groups (`justify="flex-end"`)
|
|
144
|
-
- Primary action on the
|
|
145
|
-
- Add Hailer icon to primary button
|
|
82
|
+
- Primary action on the right; add a Hailer icon to the primary button
|
|
146
83
|
|
|
147
84
|
```tsx
|
|
148
|
-
// Two buttons
|
|
85
|
+
// Two buttons
|
|
149
86
|
<HStack spacing={3} justify="flex-end">
|
|
150
87
|
<Button colorScheme="gray">Cancel</Button>
|
|
151
88
|
<Button colorScheme="green">Save</Button>
|
|
152
89
|
</HStack>
|
|
153
90
|
|
|
154
|
-
// 3+ buttons
|
|
91
|
+
// 3+ buttons — use outline
|
|
155
92
|
<HStack spacing={3}>
|
|
156
93
|
<Button variant="outline" colorScheme="green" leftIcon={<HailerPlus />}>Create</Button>
|
|
157
94
|
<Button variant="outline" colorScheme="gray">Export</Button>
|
|
@@ -163,26 +100,34 @@ import { theme } from './hailer/theme/theme';
|
|
|
163
100
|
|
|
164
101
|
## Icons
|
|
165
102
|
|
|
166
|
-
**
|
|
103
|
+
**Only use Hailer icons. Never external libraries.**
|
|
167
104
|
|
|
168
105
|
```tsx
|
|
169
|
-
|
|
106
|
+
// Named exports, one file per icon — no barrel index, so import per-file:
|
|
107
|
+
import { HailerPlus } from './hailer/theme/icons/HailerPlus';
|
|
108
|
+
import { HailerSettings } from './hailer/theme/icons/HailerSettings';
|
|
170
109
|
|
|
171
110
|
<HailerPlus boxSize={6} />
|
|
172
111
|
<Button leftIcon={<HailerPlus />}>Add</Button>
|
|
173
112
|
<IconButton icon={<HailerSettings />} aria-label="Settings" />
|
|
174
113
|
```
|
|
175
114
|
|
|
176
|
-
**Common icons:**
|
|
115
|
+
**Common UI icons:**
|
|
177
116
|
- Actions: `HailerPlus`, `HailerEdit`, `HailerTrash`, `HailerSave`
|
|
178
117
|
- Navigation: `HailerChevron`, `HailerMenu`, `HailerSearch`
|
|
179
118
|
- Status: `HailerWarning`, `HailerInfo`, `HailerTick`
|
|
180
119
|
- Objects: `HailerUser`, `HailerCalendar`, `HailerFile`, `HailerActivities`
|
|
181
120
|
|
|
121
|
+
**Document icons** (all prefixed `HailerDoc*`; plain `HailerImage`/`HailerVideo` are general-purpose, not the file-type variants):
|
|
122
|
+
- `HailerDocArchive`, `HailerDocCode`, `HailerDocDocument`, `HailerDocImage`, `HailerDocMusic`
|
|
123
|
+
- `HailerDocPdf`, `HailerDocPresentation`, `HailerDocSpreadsheet`, `HailerDocVideo`
|
|
124
|
+
|
|
182
125
|
---
|
|
183
126
|
|
|
184
127
|
## Typography
|
|
185
128
|
|
|
129
|
+
**Font family:** Nunito Sans for body text and headings.
|
|
130
|
+
|
|
186
131
|
| Size | Use |
|
|
187
132
|
|------|-----|
|
|
188
133
|
| `2xl` | Page title |
|
|
@@ -196,15 +141,13 @@ import { HailerPlus, HailerSettings } from './hailer/theme/icons';
|
|
|
196
141
|
<Text fontSize="sm" color="subtleText">Caption</Text>
|
|
197
142
|
```
|
|
198
143
|
|
|
199
|
-
Text alignment: left-align body, center short headings/CTAs, right-align numbers in tables. Never justify body text.
|
|
200
|
-
|
|
201
144
|
---
|
|
202
145
|
|
|
203
146
|
## Spacing
|
|
204
147
|
|
|
205
148
|
```tsx
|
|
206
|
-
<Box p={8} maxW="1400px" mx="auto">
|
|
207
|
-
<VStack spacing={6} align="stretch">
|
|
149
|
+
<Box p={8} maxW="1400px" mx="auto">
|
|
150
|
+
<VStack spacing={6} align="stretch">
|
|
208
151
|
{/* Content */}
|
|
209
152
|
</VStack>
|
|
210
153
|
</Box>
|
|
@@ -212,6 +155,17 @@ Text alignment: left-align body, center short headings/CTAs, right-align numbers
|
|
|
212
155
|
|
|
213
156
|
---
|
|
214
157
|
|
|
158
|
+
## Component Sizes Reference
|
|
159
|
+
|
|
160
|
+
| Component | Available sizes |
|
|
161
|
+
|-----------|----------------|
|
|
162
|
+
| Button | `xs`, `sm`, `md`, `lg` |
|
|
163
|
+
| Avatar | `hailer-sm`, `hailer-md` (default), `hailer-lg` |
|
|
164
|
+
| Table | `sm`, `md` (default), `lg` |
|
|
165
|
+
| Modal | `md` (default), `7xl` (Hailer custom — full viewport) |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
215
169
|
## Forms
|
|
216
170
|
|
|
217
171
|
```tsx
|
|
@@ -223,43 +177,31 @@ Text alignment: left-align body, center short headings/CTAs, right-align numbers
|
|
|
223
177
|
</FormControl>
|
|
224
178
|
```
|
|
225
179
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
Labels above inputs (mobile-friendly). Group related fields in sections.
|
|
180
|
+
Checkbox, Radio, and Switch only work correctly with `colorScheme="green"`.
|
|
229
181
|
|
|
230
182
|
---
|
|
231
183
|
|
|
232
184
|
## Tables
|
|
233
185
|
|
|
234
|
-
|
|
186
|
+
Use Chakra Table components, not HTML `<table>`:
|
|
235
187
|
|
|
236
188
|
```tsx
|
|
237
189
|
<TableContainer>
|
|
238
190
|
<Table variant="simple" size="md">
|
|
239
|
-
<Thead>
|
|
240
|
-
<Tr>
|
|
241
|
-
<Th>Name</Th>
|
|
242
|
-
<Th isNumeric>Count</Th>
|
|
243
|
-
</Tr>
|
|
244
|
-
</Thead>
|
|
191
|
+
<Thead><Tr><Th>Name</Th><Th isNumeric>Count</Th></Tr></Thead>
|
|
245
192
|
<Tbody>
|
|
246
|
-
<Tr
|
|
247
|
-
<Td>Item</Td>
|
|
248
|
-
<Td isNumeric>42</Td>
|
|
249
|
-
</Tr>
|
|
193
|
+
<Tr><Td>Item</Td><Td isNumeric>42</Td></Tr>
|
|
250
194
|
</Tbody>
|
|
251
195
|
</Table>
|
|
252
196
|
</TableContainer>
|
|
253
197
|
```
|
|
254
198
|
|
|
255
|
-
Responsive: hide secondary columns on mobile with `display={{ base: 'none', md: 'table-cell' }}`.
|
|
256
|
-
|
|
257
199
|
---
|
|
258
200
|
|
|
259
201
|
## Modals
|
|
260
202
|
|
|
261
203
|
```tsx
|
|
262
|
-
<Modal isOpen={isOpen} onClose={onClose} size="md">
|
|
204
|
+
<Modal isOpen={isOpen} onClose={onClose} size="md" trapFocus={false} autoFocus={false}>
|
|
263
205
|
<ModalOverlay />
|
|
264
206
|
<ModalContent>
|
|
265
207
|
<ModalHeader>Title</ModalHeader>
|
|
@@ -273,18 +215,90 @@ Responsive: hide secondary columns on mobile with `display={{ base: 'none', md:
|
|
|
273
215
|
</Modal>
|
|
274
216
|
```
|
|
275
217
|
|
|
218
|
+
Use `size="7xl"` for full-viewport modals.
|
|
219
|
+
|
|
220
|
+
**Iframe focus gotcha:** `trapFocus` defaults to `true` — steals focus from the Hailer sidebar when running in an iframe. Always add `trapFocus={false} autoFocus={false}` to every `Modal` and `AlertDialog`. Apply to `Drawer` too.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Tabs
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
<Tabs variant="hailer" isFitted>
|
|
228
|
+
<TabList>
|
|
229
|
+
<Tab>Overview</Tab>
|
|
230
|
+
<Tab>Details</Tab>
|
|
231
|
+
</TabList>
|
|
232
|
+
<TabPanels>
|
|
233
|
+
<TabPanel>...</TabPanel>
|
|
234
|
+
<TabPanel>...</TabPanel>
|
|
235
|
+
</TabPanels>
|
|
236
|
+
</Tabs>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Tooltip
|
|
242
|
+
|
|
243
|
+
```tsx
|
|
244
|
+
<Tooltip variant="hailer" label="More info">
|
|
245
|
+
<Icon as={HailerInfo} />
|
|
246
|
+
</Tooltip>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Stats
|
|
252
|
+
|
|
253
|
+
Always use Stat components, not manual Box/Text:
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
<Stat>
|
|
257
|
+
<StatLabel>Total Users</StatLabel>
|
|
258
|
+
<StatNumber>1,234</StatNumber>
|
|
259
|
+
<StatHelpText><StatArrow type="increase" />23%</StatHelpText>
|
|
260
|
+
</Stat>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Badge / Tag
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
<Badge colorScheme="green">Active</Badge>
|
|
269
|
+
<Badge colorScheme="red">Overdue</Badge>
|
|
270
|
+
<Badge colorScheme="gray">Draft</Badge>
|
|
271
|
+
|
|
272
|
+
<Tag colorScheme="green">
|
|
273
|
+
<TagLabel>Category</TagLabel>
|
|
274
|
+
<TagCloseButton />
|
|
275
|
+
</Tag>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
| Status | Color |
|
|
279
|
+
|--------|-------|
|
|
280
|
+
| Success/Active | `green` |
|
|
281
|
+
| Warning | `orange` |
|
|
282
|
+
| Error/Overdue | `red` |
|
|
283
|
+
| Neutral/Draft | `gray` |
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Skeleton (Loading States)
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
<Skeleton height="20px" />
|
|
291
|
+
<SkeletonText noOfLines={3} spacing={4} />
|
|
292
|
+
<Skeleton isLoaded={dataReady}><Text>{data.name}</Text></Skeleton>
|
|
293
|
+
```
|
|
294
|
+
|
|
276
295
|
---
|
|
277
296
|
|
|
278
297
|
## Feedback
|
|
279
298
|
|
|
280
|
-
**
|
|
299
|
+
**Snackbar (preferred inside Hailer apps):**
|
|
281
300
|
```tsx
|
|
282
|
-
|
|
283
|
-
description: "Your changes have been saved.",
|
|
284
|
-
status: "success",
|
|
285
|
-
duration: 3000,
|
|
286
|
-
isClosable: true
|
|
287
|
-
});
|
|
301
|
+
hailer.ui.snackbar.open('Your changes have been saved.', 'OK', 3000);
|
|
288
302
|
```
|
|
289
303
|
|
|
290
304
|
**Alert:**
|
|
@@ -297,27 +311,66 @@ toast({
|
|
|
297
311
|
|
|
298
312
|
---
|
|
299
313
|
|
|
300
|
-
##
|
|
314
|
+
## Topbar Convention
|
|
315
|
+
|
|
316
|
+
If the app has a topbar, height should be **56px**.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Theme Sync with Hailer
|
|
301
321
|
|
|
302
|
-
|
|
322
|
+
`HailerSettings` (`{ theme: 'light' | 'dark', preferredLanguages: string[] }`) arrives via the `settings` callback — it is NOT returned by `useHailer()` by default. Extend the store to expose it:
|
|
303
323
|
|
|
304
324
|
```tsx
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
325
|
+
// In HailerApi options:
|
|
326
|
+
settings: (data) => {
|
|
327
|
+
window.__hailerStore!.setState({ hailerSettings: data });
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
// In components:
|
|
331
|
+
const { hailerSettings } = useHailer();
|
|
332
|
+
const { setColorMode } = useColorMode();
|
|
333
|
+
useEffect(() => {
|
|
334
|
+
if (hailerSettings) setColorMode(hailerSettings.theme === 'dark' ? 'dark' : 'light');
|
|
335
|
+
}, [hailerSettings, setColorMode]);
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Beyond Chakra — Ready-Made Components
|
|
341
|
+
|
|
342
|
+
| Need | Library | Type | Notes |
|
|
343
|
+
|------|---------|------|-------|
|
|
344
|
+
| Sortable/filterable tables | TanStack Table | Headless | Style with Chakra Table components |
|
|
345
|
+
| Charts and dashboards | Recharts | Themeable | Pass `green.500`, `blue.500` etc. as colors |
|
|
346
|
+
| Drag and drop / kanban | dnd-kit | Headless | Works in iframes |
|
|
347
|
+
| Rich text editing | TipTap | CSS-based | Override fonts with Nunito Sans |
|
|
348
|
+
| File upload with drag-drop | react-dropzone | Headless | Style drop zone with Chakra `Box` |
|
|
349
|
+
| Calendar / scheduling views | react-big-calendar | CSS-based | CSS overrides for Hailer colors |
|
|
350
|
+
|
|
351
|
+
Rules: prefer headless libraries; all overrides must support dark mode (`useColorModeValue`); still use Hailer icons, not library icons.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Gotchas in Hailer Iframe
|
|
356
|
+
|
|
357
|
+
### Recharts `XAxis interval={0}`
|
|
358
|
+
|
|
359
|
+
Default `interval="preserveEnd"` drops the first label. Always set `interval={0}` for dashboards:
|
|
360
|
+
|
|
361
|
+
```tsx
|
|
362
|
+
<XAxis dataKey="label" interval={0} />
|
|
313
363
|
```
|
|
314
364
|
|
|
365
|
+
### Modal focus trap conflicts with sidebar
|
|
366
|
+
|
|
367
|
+
Always add `trapFocus={false} autoFocus={false}` to every `Modal` and `AlertDialog` — without it, the Modal steals focus from the Hailer sidebar on re-render.
|
|
368
|
+
|
|
315
369
|
---
|
|
316
370
|
|
|
317
371
|
## Content Tone
|
|
318
372
|
|
|
319
|
-
- Clear, supportive, human
|
|
320
|
-
- Use contractions ("you're", "we'll")
|
|
373
|
+
- Clear, supportive, human; use contractions
|
|
321
374
|
- Never blame the user
|
|
322
375
|
- Warm success messages: "Your changes have been saved."
|
|
323
376
|
- Helpful errors: "We couldn't save your changes. Please try again."
|