@marktiderman/genesis-ui 2.11.0 → 2.12.1

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 (128) hide show
  1. package/SKILL.md +57 -0
  2. package/dist/AppShell-D5nD0mcL.d.ts +348 -0
  3. package/dist/chunk-424PT5DM.js +21 -0
  4. package/dist/chunk-424PT5DM.js.map +1 -0
  5. package/dist/{chunk-UYI3GLFJ.js → chunk-6N6MUN3T.js} +722 -159
  6. package/dist/chunk-6N6MUN3T.js.map +1 -0
  7. package/dist/chunk-J45FHL7D.js +46 -0
  8. package/dist/chunk-J45FHL7D.js.map +1 -0
  9. package/dist/{chunk-OITWCIG2.js → chunk-PMCUHSZS.js} +3 -3
  10. package/dist/{chunk-OITWCIG2.js.map → chunk-PMCUHSZS.js.map} +1 -1
  11. package/dist/{chunk-5GOQ72WB.js → chunk-STZVZUYO.js} +3 -3
  12. package/dist/{chunk-5GOQ72WB.js.map → chunk-STZVZUYO.js.map} +1 -1
  13. package/dist/chunk-WALJMVEF.js +10 -0
  14. package/dist/chunk-WALJMVEF.js.map +1 -0
  15. package/dist/components/data/index.d.ts +7 -6
  16. package/dist/components/data/index.js +15 -13
  17. package/dist/components/data/index.js.map +1 -1
  18. package/dist/components/layout/dashboard-page.js +1 -0
  19. package/dist/components/layout/detail-page.js +1 -0
  20. package/dist/components/layout/form-page.js +1 -0
  21. package/dist/components/layout/index.d.ts +3 -2
  22. package/dist/components/layout/index.js +4 -2
  23. package/dist/components/layout/settings-page.js +1 -0
  24. package/dist/components/patterns/empty-state.js +1 -0
  25. package/dist/components/patterns/form-field.js +1 -0
  26. package/dist/components/patterns/index.js +1 -0
  27. package/dist/components/patterns/page-loading.js +1 -0
  28. package/dist/components/patterns/settings-row.js +1 -0
  29. package/dist/components/patterns/sortable-list.js +1 -0
  30. package/dist/components/patterns/status-badge.js +1 -0
  31. package/dist/components/patterns/toggle-row.js +1 -0
  32. package/dist/components/patterns/user-avatar.js +1 -0
  33. package/dist/components/rich-text/rich-text-editor.js +2 -1
  34. package/dist/components/rich-text/rich-text-editor.js.map +1 -1
  35. package/dist/components/rich-text/rich-text.js +1 -0
  36. package/dist/components/sheet-grid/sheet-grid.js +1 -0
  37. package/dist/components/sheet-grid/sheet-grid.js.map +1 -1
  38. package/dist/components/ui/accessible-icon.js +1 -0
  39. package/dist/components/ui/accordion.js +1 -0
  40. package/dist/components/ui/alert-dialog.js +1 -0
  41. package/dist/components/ui/alert.js +1 -0
  42. package/dist/components/ui/aspect-ratio.js +1 -0
  43. package/dist/components/ui/avatar.js +1 -0
  44. package/dist/components/ui/badge.js +1 -0
  45. package/dist/components/ui/breadcrumb.js +1 -0
  46. package/dist/components/ui/button-group.js +1 -0
  47. package/dist/components/ui/button.js +1 -0
  48. package/dist/components/ui/calendar.js +1 -0
  49. package/dist/components/ui/card.js +1 -0
  50. package/dist/components/ui/carousel.js +1 -0
  51. package/dist/components/ui/chart.js +1 -0
  52. package/dist/components/ui/checkbox.js +1 -0
  53. package/dist/components/ui/collapsible.js +1 -0
  54. package/dist/components/ui/command-palette.js +1 -0
  55. package/dist/components/ui/command.js +1 -0
  56. package/dist/components/ui/context-menu.js +1 -0
  57. package/dist/components/ui/date-picker.js +1 -0
  58. package/dist/components/ui/dialog.js +1 -0
  59. package/dist/components/ui/drawer.js +1 -0
  60. package/dist/components/ui/dropdown-menu.js +1 -0
  61. package/dist/components/ui/hover-card.js +1 -0
  62. package/dist/components/ui/input-group.js +1 -0
  63. package/dist/components/ui/input-otp.js +1 -0
  64. package/dist/components/ui/input.js +1 -0
  65. package/dist/components/ui/kbd.js +1 -0
  66. package/dist/components/ui/label.js +1 -0
  67. package/dist/components/ui/menubar.js +1 -0
  68. package/dist/components/ui/navigation-menu.js +1 -0
  69. package/dist/components/ui/pagination.js +1 -0
  70. package/dist/components/ui/password-toggle-field.js +1 -0
  71. package/dist/components/ui/popover.js +1 -0
  72. package/dist/components/ui/progress.js +1 -0
  73. package/dist/components/ui/radio-group.js +1 -0
  74. package/dist/components/ui/resizable.js +1 -0
  75. package/dist/components/ui/scroll-area.js +1 -0
  76. package/dist/components/ui/select.js +1 -0
  77. package/dist/components/ui/separator.js +1 -0
  78. package/dist/components/ui/sheet.js +1 -0
  79. package/dist/components/ui/skeleton.js +1 -0
  80. package/dist/components/ui/slider.js +1 -0
  81. package/dist/components/ui/sonner.js +1 -0
  82. package/dist/components/ui/spinner.js +1 -0
  83. package/dist/components/ui/switch.js +1 -0
  84. package/dist/components/ui/table.js +1 -0
  85. package/dist/components/ui/tabs.js +1 -0
  86. package/dist/components/ui/textarea.js +1 -0
  87. package/dist/components/ui/toggle-group.js +1 -0
  88. package/dist/components/ui/toggle.js +1 -0
  89. package/dist/components/ui/toolbar.js +1 -0
  90. package/dist/components/ui/tooltip.js +1 -0
  91. package/dist/components/ui/typography.js +1 -0
  92. package/dist/components/ui/visually-hidden.js +1 -0
  93. package/dist/hooks/index.d.ts +3 -3
  94. package/dist/hooks/index.js +4 -3
  95. package/dist/hooks/use-data-filters.d.ts +1 -1
  96. package/dist/hooks/use-data-filters.js +3 -2
  97. package/dist/hooks/use-keyboard-navigation.js +1 -0
  98. package/dist/hooks/use-mobile.js +1 -0
  99. package/dist/hooks/use-prefetch.js +1 -0
  100. package/dist/hooks/use-resource-page.js +1 -0
  101. package/dist/hooks/use-resource-url-state.d.ts +1 -1
  102. package/dist/hooks/use-resource-url-state.js +1 -0
  103. package/dist/hooks/use-saved-views.js +1 -0
  104. package/dist/hooks/use-view-preference.js +1 -0
  105. package/dist/hooks/use-view-settings.js +1 -0
  106. package/dist/index.d.ts +3 -2
  107. package/dist/index.js +361 -3
  108. package/dist/index.js.map +1 -1
  109. package/dist/navigation-vmFJ6r1m.d.ts +90 -0
  110. package/dist/router/react-router.d.ts +1 -1
  111. package/dist/router/react-router.js +1 -0
  112. package/dist/router/react-router.js.map +1 -1
  113. package/dist/router/tanstack-router.d.ts +1 -1
  114. package/dist/router/tanstack-router.js +2 -1
  115. package/dist/router/tanstack-router.js.map +1 -1
  116. package/dist/status-colors.js +2 -0
  117. package/dist/status-colors.js.map +1 -1
  118. package/dist/{use-resource-table-Dx1OZRne.d.ts → use-resource-table-easmRDQI.d.ts} +2 -2
  119. package/dist/utils.js +1 -0
  120. package/package.json +6 -5
  121. package/dist/AppShell-BVr4V0UK.d.ts +0 -174
  122. package/dist/chunk-7S7LKQBD.js +0 -12
  123. package/dist/chunk-7S7LKQBD.js.map +0 -1
  124. package/dist/chunk-UYI3GLFJ.js.map +0 -1
  125. package/dist/chunk-WGMEVX3Y.js +0 -141
  126. package/dist/chunk-WGMEVX3Y.js.map +0 -1
  127. package/dist/navigation-Bha0R3Fu.d.ts +0 -166
  128. package/dist/slots-tR0wf89f.d.ts +0 -60
@@ -1,60 +0,0 @@
1
- import { ComponentType, ReactNode } from 'react';
2
-
3
- /**
4
- * The slot contract — genesis's escape hatch from an all-or-nothing pattern.
5
- *
6
- * A pattern component (`ResourcePage`, `DataPageShell`, …) is a composition of
7
- * interior parts. Without a way to reach those parts, a consumer who needs ONE
8
- * of them to differ has exactly two options: accept the whole thing as shipped,
9
- * or fork it. Both are bad, and the second is what actually happens — which is
10
- * how a downstream app ends up maintaining its own copy of a header it only
11
- * wanted to change one button in.
12
- *
13
- * Genesis offers a customisation ladder, and this is its missing rung:
14
- *
15
- * 1. the pattern `<ResourcePage title="Questions" />`
16
- * 2. the pattern + slots ← here: keep the wiring, swap or drop one part
17
- * 3. the primitives `<DataPageShell><DataTable/></DataPageShell>`
18
- * 4. the hook `useResourcePage()`, render it all yourself
19
- *
20
- * Rungs 1, 3 and 4 already existed (75 subpath exports, 9 hooks). Rung 2 is
21
- * the one that keeps a consumer ON the ladder: dropping to rung 3 because a
22
- * single part was wrong means re-deriving all the wiring that was already
23
- * right, and that re-derivation is where the forks come from.
24
- *
25
- * Two knobs, following the `slots`/`slotProps` convention Material UI settled
26
- * on (mui/material-ui#33416) so the shape is one a React developer already
27
- * knows rather than one genesis invented:
28
- *
29
- * `slots` — REPLACE a part. Your component receives exactly the props
30
- * genesis would have passed the default, so it can wrap the
31
- * default and change one thing rather than reimplement it.
32
- * `slotProps` — KEEP the part, pass it more props. The common case: a
33
- * `className`, a `data-testid`, an `aria-label`.
34
- *
35
- * And the eject button: `slots={{ bulkBar: null }}` drops that part entirely.
36
- * A pattern is a default, not a mandate — a consumer who wants the shell and
37
- * the grid but none of the bulk bar should not have to leave to get that.
38
- */
39
- /** Replace a part (`ComponentType`), or eject it (`null`). */
40
- type SlotOverride<P> = ComponentType<P> | null;
41
- /** `{ [part]: Component | null }` — see {@link renderSlot}. */
42
- type Slots<M extends Record<string, object>> = {
43
- [K in keyof M]?: SlotOverride<M[K]>;
44
- };
45
- /** `{ [part]: extraProps }` — merged over what genesis passes. */
46
- type SlotPropsFor<M extends Record<string, object>> = {
47
- [K in keyof M]?: Partial<M[K]>;
48
- };
49
- /**
50
- * Renders one slot: the override if given, the default otherwise, nothing if
51
- * ejected with `null`.
52
- *
53
- * `extra` merges LAST, so `slotProps` wins over genesis's own value. That is
54
- * deliberate: a consumer reaching for `slotProps` is overriding on purpose,
55
- * and a hatch that silently loses to the default is not a hatch. `className`
56
- * is the one prop a caller should merge with `cn()` instead of replacing.
57
- */
58
- declare function renderSlot<P extends object>(Default: ComponentType<P>, override: SlotOverride<P> | undefined, props: P, extra?: Partial<P>): ReactNode;
59
-
60
- export { type SlotOverride as S, type SlotPropsFor as a, type Slots as b, renderSlot as r };