@marktiderman/genesis-ui 2.14.0 → 2.15.0
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/SKILL.md +32 -0
- package/dist/{chunk-5OFA2CQR.js → chunk-DTQHAZWN.js} +3 -3
- package/dist/{chunk-5OFA2CQR.js.map → chunk-DTQHAZWN.js.map} +1 -1
- package/dist/chunk-TP6QNFDG.js +81 -0
- package/dist/chunk-TP6QNFDG.js.map +1 -0
- package/dist/{chunk-D3U5SBLW.js → chunk-ZEUUIJ57.js} +3 -3
- package/dist/{chunk-D3U5SBLW.js.map → chunk-ZEUUIJ57.js.map} +1 -1
- package/dist/components/data/index.js +6 -6
- package/dist/components/layout/builder-layout.d.ts +96 -0
- package/dist/components/layout/builder-layout.js +5 -0
- package/dist/components/layout/builder-layout.js.map +1 -0
- package/dist/components/layout/index.d.ts +249 -2
- package/dist/components/layout/index.js +315 -3
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/patterns/index.js +4 -4
- package/dist/components/resource/index.js +2 -2
- package/dist/components/rich-text/rich-text-editor.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/SKILL.md
CHANGED
|
@@ -134,6 +134,7 @@ and use it the same way.
|
|
|
134
134
|
| A whole CRUD list page over a resource | `ResourcePage` | `/data` |
|
|
135
135
|
| Record detail side panel | `DetailPanel` | `/data` |
|
|
136
136
|
| Dashboard / settings / form / detail page shape | `DashboardPage`, `SettingsPage`, `FormPage`, `DetailPage` | `/dashboard-page`, `/settings-page`, `/form-page`, `/detail-page` |
|
|
137
|
+
| A builder's outline, editor and live preview columns | `BuilderLayout` (no tabs, rail or header: those are the shell's) | `/builder-layout` |
|
|
137
138
|
| KPI tile | `StatCard` | `/data` |
|
|
138
139
|
| The page around one publishable thing (a form, a course, a lesson): header, readiness chip, headline numbers, summary cards, follow-ups, settings with jump links, Share | `ResourceHeader`, `ReadinessChip`, `HeadlineNumbers`, `SummaryCard`, `FollowUpList`, `ResponsesToolbar`, `ResourceSettingsPage`, `SettingsSection`, `ShareDialog` (+ `readinessOf`, `dayLabel`, `prefilledUrl` on the server) | `/resource` (`/resource/rules`) |
|
|
139
140
|
| Table cells: dates, numbers, money, badges, links, thumbnails | `DateCell`, `NumberCell`, `CurrencyCell`, `BadgeCell`, `LinkCell`, `ThumbnailCell` | `/data` |
|
|
@@ -148,6 +149,37 @@ and use it the same way.
|
|
|
148
149
|
| Persisted page size / density | `useViewSettings` | `/hooks/use-view-settings` |
|
|
149
150
|
| Client-side links, navigate, URL filters on your router | `ReactRouterLink` / `TanStackRouterLink` and their `use…Navigate`, `use…SearchParams`, `use…ActivePath` hooks | `/router/react-router`, `/router/tanstack-router` |
|
|
150
151
|
|
|
152
|
+
## Builder columns
|
|
153
|
+
|
|
154
|
+
`BuilderLayout` lays out a builder (forms, courses, lessons): `outline` on the left, `editor` in
|
|
155
|
+
the centre (the only required slot), `preview` on the right. Container queries, so it follows
|
|
156
|
+
the space it is given: three columns from a 56rem container (13rem / editor / 20rem), wider side
|
|
157
|
+
columns from 76rem (16rem / editor / 24.5rem), the preview under the editor below 56rem, and
|
|
158
|
+
everything stacked below 34rem. Outline and editor alone: 13rem from 34rem, 16rem from 48rem.
|
|
159
|
+
The preview keeps its place in the tree, so swapping `editor` (another section, another selected
|
|
160
|
+
item) never remounts it; `previewHidden` hides it without unmounting and gives its column to the
|
|
161
|
+
editor. `sticky` pins the outline and/or preview (`{ preview: true }` for one), `scrollSticky`
|
|
162
|
+
gives a pinned column its own scroll, and `outlineLabel` / `previewLabel` make them `nav` /
|
|
163
|
+
`aside` landmarks. `outlineProps`, `editorProps` and `previewProps` pass a class or test id to
|
|
164
|
+
each wrapper.
|
|
165
|
+
|
|
166
|
+
It does not own tabs, the app rail or a header. A builder's sections go in `useAppShellSubNav`
|
|
167
|
+
(or your own tabs inside `editor`), its title, status and actions in `AppShellPageHeader`. To
|
|
168
|
+
keep one preview across sections, render one `BuilderLayout` around them and swap `editor`;
|
|
169
|
+
nest an outline-and-editor `BuilderLayout` inside a section that has an outline (genesis-forms-builder
|
|
170
|
+
does both).
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
<BuilderLayout
|
|
174
|
+
outline={<StepList />}
|
|
175
|
+
outlineLabel="Outline"
|
|
176
|
+
editor={<StepEditor key={selectedId} />}
|
|
177
|
+
preview={<LivePreview />}
|
|
178
|
+
previewLabel="Preview"
|
|
179
|
+
sticky
|
|
180
|
+
/>
|
|
181
|
+
```
|
|
182
|
+
|
|
151
183
|
## Import rule
|
|
152
184
|
|
|
153
185
|
Import by subpath, never the root barrel in app code: `@marktiderman/genesis-ui/button`,
|
|
@@ -4,10 +4,10 @@ import { Collapsible, CollapsibleContent } from './chunk-B2GIBUQD.js';
|
|
|
4
4
|
import { Badge } from './chunk-NPNADZHM.js';
|
|
5
5
|
import { Tooltip } from './chunk-G5YKBPBF.js';
|
|
6
6
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-22XB3Q6H.js';
|
|
7
|
+
import { Button } from './chunk-NWSCYLPT.js';
|
|
7
8
|
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from './chunk-QJ6P2DW6.js';
|
|
8
9
|
import { Switch } from './chunk-27ELYTGE.js';
|
|
9
10
|
import { Label } from './chunk-F47U5KNW.js';
|
|
10
|
-
import { Button } from './chunk-NWSCYLPT.js';
|
|
11
11
|
import { cn } from './chunk-NZ5WBA4R.js';
|
|
12
12
|
import { isPathActive, resolveNavigation, DefaultLink } from './chunk-J45FHL7D.js';
|
|
13
13
|
import { createContext, useId, useState, useEffect, useMemo, useCallback, useContext, useRef, useLayoutEffect, useSyncExternalStore } from 'react';
|
|
@@ -1855,5 +1855,5 @@ function AppShell({
|
|
|
1855
1855
|
}
|
|
1856
1856
|
|
|
1857
1857
|
export { AppShell, AppShellPageHeader, AppShellSubNavEnd, PageHeader, SubNavTabs, useAppShellSubNav };
|
|
1858
|
-
//# sourceMappingURL=chunk-
|
|
1859
|
-
//# sourceMappingURL=chunk-
|
|
1858
|
+
//# sourceMappingURL=chunk-DTQHAZWN.js.map
|
|
1859
|
+
//# sourceMappingURL=chunk-DTQHAZWN.js.map
|