@byline/ui 2.5.2 → 2.6.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.
Files changed (211) hide show
  1. package/dist/dnd/draggable-sortable/demo/draggable-list-demo.js +1 -1
  2. package/dist/react.d.ts +18 -54
  3. package/dist/react.js +0 -35
  4. package/dist/uikit.d.ts +1 -0
  5. package/dist/uikit.js +1 -0
  6. package/package.json +2 -8
  7. package/src/dnd/draggable-sortable/demo/draggable-list-demo.tsx +1 -1
  8. package/src/react.ts +20 -68
  9. package/src/uikit.ts +1 -0
  10. package/dist/admin/group.d.ts +0 -27
  11. package/dist/admin/group.js +0 -14
  12. package/dist/admin/group.module.js +0 -6
  13. package/dist/admin/group_module.css +0 -19
  14. package/dist/admin/row.d.ts +0 -25
  15. package/dist/admin/row.js +0 -8
  16. package/dist/admin/row.module.js +0 -5
  17. package/dist/admin/row_module.css +0 -18
  18. package/dist/admin/tabs.d.ts +0 -25
  19. package/dist/admin/tabs.js +0 -35
  20. package/dist/admin/tabs.module.js +0 -10
  21. package/dist/admin/tabs_module.css +0 -68
  22. package/dist/fields/array/array-field.d.ts +0 -14
  23. package/dist/fields/array/array-field.js +0 -176
  24. package/dist/fields/array/array-field.module.js +0 -11
  25. package/dist/fields/array/array-field_module.css +0 -32
  26. package/dist/fields/blocks/blocks-field.d.ts +0 -13
  27. package/dist/fields/blocks/blocks-field.js +0 -244
  28. package/dist/fields/blocks/blocks-field.module.js +0 -26
  29. package/dist/fields/blocks/blocks-field_module.css +0 -107
  30. package/dist/fields/checkbox/checkbox-field.d.ts +0 -16
  31. package/dist/fields/checkbox/checkbox-field.js +0 -28
  32. package/dist/fields/checkbox/checkbox-field.module.js +0 -6
  33. package/dist/fields/checkbox/checkbox-field_module.css +0 -4
  34. package/dist/fields/column-formatter.d.ts +0 -20
  35. package/dist/fields/column-formatter.js +0 -15
  36. package/dist/fields/date-time-formatter.d.ts +0 -16
  37. package/dist/fields/date-time-formatter.js +0 -8
  38. package/dist/fields/datetime/datetime-field.d.ts +0 -16
  39. package/dist/fields/datetime/datetime-field.js +0 -37
  40. package/dist/fields/datetime/datetime-field.module.js +0 -5
  41. package/dist/fields/datetime/datetime-field_module.css +0 -4
  42. package/dist/fields/draggable-context-menu.d.ts +0 -6
  43. package/dist/fields/draggable-context-menu.js +0 -83
  44. package/dist/fields/draggable-context-menu.module.js +0 -15
  45. package/dist/fields/draggable-context-menu_module.css +0 -91
  46. package/dist/fields/field-helpers.d.ts +0 -26
  47. package/dist/fields/field-helpers.js +0 -50
  48. package/dist/fields/field-renderer.d.ts +0 -37
  49. package/dist/fields/field-renderer.js +0 -206
  50. package/dist/fields/field-renderer.module.js +0 -8
  51. package/dist/fields/field-renderer_module.css +0 -11
  52. package/dist/fields/file/file-field.d.ts +0 -19
  53. package/dist/fields/file/file-field.js +0 -226
  54. package/dist/fields/file/file-field.module.js +0 -18
  55. package/dist/fields/file/file-field_module.css +0 -131
  56. package/dist/fields/file/file-upload-field.d.ts +0 -21
  57. package/dist/fields/file/file-upload-field.js +0 -128
  58. package/dist/fields/file/file-upload-field.module.js +0 -15
  59. package/dist/fields/file/file-upload-field_module.css +0 -74
  60. package/dist/fields/group/group-field.d.ts +0 -15
  61. package/dist/fields/group/group-field.js +0 -59
  62. package/dist/fields/group/group-field.module.js +0 -9
  63. package/dist/fields/group/group-field_module.css +0 -27
  64. package/dist/fields/image/image-field.d.ts +0 -19
  65. package/dist/fields/image/image-field.js +0 -242
  66. package/dist/fields/image/image-field.module.js +0 -22
  67. package/dist/fields/image/image-field_module.css +0 -121
  68. package/dist/fields/image/image-upload-field.d.ts +0 -21
  69. package/dist/fields/image/image-upload-field.js +0 -187
  70. package/dist/fields/image/image-upload-field.module.js +0 -19
  71. package/dist/fields/image/image-upload-field_module.css +0 -92
  72. package/dist/fields/local-date-time.d.ts +0 -27
  73. package/dist/fields/local-date-time.js +0 -49
  74. package/dist/fields/locale-badge.d.ts +0 -18
  75. package/dist/fields/locale-badge.js +0 -10
  76. package/dist/fields/locale-badge.module.js +0 -5
  77. package/dist/fields/locale-badge_module.css +0 -27
  78. package/dist/fields/numerical/numerical-field.d.ts +0 -18
  79. package/dist/fields/numerical/numerical-field.js +0 -74
  80. package/dist/fields/relation/relation-display.d.ts +0 -40
  81. package/dist/fields/relation/relation-display.js +0 -58
  82. package/dist/fields/relation/relation-display.module.js +0 -9
  83. package/dist/fields/relation/relation-display_module.css +0 -21
  84. package/dist/fields/relation/relation-field.d.ts +0 -18
  85. package/dist/fields/relation/relation-field.js +0 -146
  86. package/dist/fields/relation/relation-field.module.js +0 -13
  87. package/dist/fields/relation/relation-field_module.css +0 -62
  88. package/dist/fields/relation/relation-picker.d.ts +0 -49
  89. package/dist/fields/relation/relation-picker.js +0 -233
  90. package/dist/fields/relation/relation-picker.module.js +0 -26
  91. package/dist/fields/relation/relation-picker_module.css +0 -124
  92. package/dist/fields/relation/relation-summary.d.ts +0 -31
  93. package/dist/fields/relation/relation-summary.js +0 -50
  94. package/dist/fields/relation/relation-summary.module.js +0 -11
  95. package/dist/fields/relation/relation-summary_module.css +0 -37
  96. package/dist/fields/select/select-field.d.ts +0 -16
  97. package/dist/fields/select/select-field.js +0 -50
  98. package/dist/fields/select/select-field.module.js +0 -5
  99. package/dist/fields/select/select-field_module.css +0 -4
  100. package/dist/fields/sortable-item.d.ts +0 -15
  101. package/dist/fields/sortable-item.js +0 -80
  102. package/dist/fields/sortable-item.module.js +0 -22
  103. package/dist/fields/sortable-item_module.css +0 -124
  104. package/dist/fields/text/text-field.d.ts +0 -20
  105. package/dist/fields/text/text-field.js +0 -104
  106. package/dist/fields/text/text-field.module.js +0 -6
  107. package/dist/fields/text/text-field_module.css +0 -5
  108. package/dist/fields/text-area/text-area-field.d.ts +0 -20
  109. package/dist/fields/text-area/text-area-field.js +0 -105
  110. package/dist/fields/text-area/text-area-field.module.js +0 -6
  111. package/dist/fields/text-area/text-area-field_module.css +0 -5
  112. package/dist/fields/use-field-change-handler.d.ts +0 -23
  113. package/dist/fields/use-field-change-handler.js +0 -52
  114. package/dist/forms/document-actions.d.ts +0 -48
  115. package/dist/forms/document-actions.js +0 -469
  116. package/dist/forms/document-actions.module.js +0 -34
  117. package/dist/forms/document-actions_module.css +0 -118
  118. package/dist/forms/form-context.d.ts +0 -89
  119. package/dist/forms/form-context.js +0 -466
  120. package/dist/forms/form-renderer.d.ts +0 -98
  121. package/dist/forms/form-renderer.js +0 -591
  122. package/dist/forms/form-renderer.module.js +0 -46
  123. package/dist/forms/form-renderer_module.css +0 -245
  124. package/dist/forms/navigation-guard.d.ts +0 -54
  125. package/dist/forms/navigation-guard.js +0 -22
  126. package/dist/forms/path-widget.d.ts +0 -36
  127. package/dist/forms/path-widget.js +0 -107
  128. package/dist/forms/path-widget.module.js +0 -8
  129. package/dist/forms/path-widget_module.css +0 -29
  130. package/dist/forms/upload-executor.d.ts +0 -57
  131. package/dist/forms/upload-executor.js +0 -92
  132. package/dist/services/field-services-context.d.ts +0 -16
  133. package/dist/services/field-services-context.js +0 -13
  134. package/dist/services/field-services-types.d.ts +0 -63
  135. package/dist/services/field-services-types.js +0 -1
  136. package/dist/widgets/diff-viewer/diff-modal.d.ts +0 -22
  137. package/dist/widgets/diff-viewer/diff-modal.js +0 -146
  138. package/dist/widgets/diff-viewer/diff-modal.module.js +0 -14
  139. package/dist/widgets/diff-viewer/diff-modal_module.css +0 -56
  140. package/dist/widgets/status-badge/status-badge.d.ts +0 -25
  141. package/dist/widgets/status-badge/status-badge.js +0 -35
  142. package/dist/widgets/status-badge/status-badge.module.js +0 -7
  143. package/dist/widgets/status-badge/status-badge_module.css +0 -20
  144. package/src/admin/group.module.css +0 -41
  145. package/src/admin/group.tsx +0 -40
  146. package/src/admin/row.module.css +0 -32
  147. package/src/admin/row.tsx +0 -33
  148. package/src/admin/tabs.module.css +0 -107
  149. package/src/admin/tabs.tsx +0 -82
  150. package/src/fields/array/array-field.module.css +0 -48
  151. package/src/fields/array/array-field.tsx +0 -266
  152. package/src/fields/blocks/blocks-field.module.css +0 -148
  153. package/src/fields/blocks/blocks-field.tsx +0 -312
  154. package/src/fields/checkbox/checkbox-field.module.css +0 -4
  155. package/src/fields/checkbox/checkbox-field.tsx +0 -54
  156. package/src/fields/column-formatter.tsx +0 -31
  157. package/src/fields/date-time-formatter.tsx +0 -22
  158. package/src/fields/datetime/datetime-field.module.css +0 -13
  159. package/src/fields/datetime/datetime-field.tsx +0 -54
  160. package/src/fields/draggable-context-menu.module.css +0 -127
  161. package/src/fields/draggable-context-menu.tsx +0 -85
  162. package/src/fields/field-helpers.ts +0 -69
  163. package/src/fields/field-renderer.module.css +0 -22
  164. package/src/fields/field-renderer.tsx +0 -288
  165. package/src/fields/file/file-field.module.css +0 -153
  166. package/src/fields/file/file-field.tsx +0 -271
  167. package/src/fields/file/file-upload-field.module.css +0 -101
  168. package/src/fields/file/file-upload-field.tsx +0 -183
  169. package/src/fields/group/group-field.module.css +0 -43
  170. package/src/fields/group/group-field.tsx +0 -84
  171. package/src/fields/image/image-field.module.css +0 -155
  172. package/src/fields/image/image-field.tsx +0 -291
  173. package/src/fields/image/image-upload-field.module.css +0 -123
  174. package/src/fields/image/image-upload-field.tsx +0 -270
  175. package/src/fields/local-date-time.tsx +0 -88
  176. package/src/fields/locale-badge.module.css +0 -37
  177. package/src/fields/locale-badge.tsx +0 -32
  178. package/src/fields/numerical/numerical-field.tsx +0 -114
  179. package/src/fields/relation/relation-display.module.css +0 -36
  180. package/src/fields/relation/relation-display.tsx +0 -130
  181. package/src/fields/relation/relation-field.module.css +0 -83
  182. package/src/fields/relation/relation-field.tsx +0 -206
  183. package/src/fields/relation/relation-picker.module.css +0 -168
  184. package/src/fields/relation/relation-picker.tsx +0 -325
  185. package/src/fields/relation/relation-summary.module.css +0 -55
  186. package/src/fields/relation/relation-summary.tsx +0 -123
  187. package/src/fields/select/select-field.module.css +0 -13
  188. package/src/fields/select/select-field.tsx +0 -61
  189. package/src/fields/sortable-item.module.css +0 -167
  190. package/src/fields/sortable-item.tsx +0 -101
  191. package/src/fields/text/text-field.module.css +0 -13
  192. package/src/fields/text/text-field.tsx +0 -146
  193. package/src/fields/text-area/text-area-field.module.css +0 -13
  194. package/src/fields/text-area/text-area-field.tsx +0 -147
  195. package/src/fields/use-field-change-handler.ts +0 -112
  196. package/src/forms/document-actions.module.css +0 -160
  197. package/src/forms/document-actions.tsx +0 -487
  198. package/src/forms/form-context.tsx +0 -704
  199. package/src/forms/form-renderer.module.css +0 -321
  200. package/src/forms/form-renderer.tsx +0 -888
  201. package/src/forms/navigation-guard.tsx +0 -98
  202. package/src/forms/path-widget.module.css +0 -41
  203. package/src/forms/path-widget.test.tsx +0 -217
  204. package/src/forms/path-widget.tsx +0 -181
  205. package/src/forms/upload-executor.ts +0 -190
  206. package/src/services/field-services-context.tsx +0 -35
  207. package/src/services/field-services-types.ts +0 -68
  208. package/src/widgets/diff-viewer/diff-modal.module.css +0 -79
  209. package/src/widgets/diff-viewer/diff-modal.tsx +0 -184
  210. package/src/widgets/status-badge/status-badge.module.css +0 -31
  211. package/src/widgets/status-badge/status-badge.tsx +0 -69
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
+ import { Card, GripperVerticalIcon } from "@byline/ui/react";
4
5
  import classnames from "classnames";
5
- import { Card, GripperVerticalIcon } from "../../../uikit.js";
6
6
  import { DraggableSortable, moveItem, useSortable } from "../index.js";
7
7
  import draggable_list_demo_module from "./draggable-list-demo.module.js";
8
8
  const sourceItems = [
package/dist/react.d.ts CHANGED
@@ -2,62 +2,26 @@
2
2
  * NOTE: We put a .js ending on imports here to satisfy
3
3
  * TS / dist output.
4
4
  *
5
- * Single unified entry point for `@byline/ui`. Everything React-side
6
- * exports through this barrel — uikit foundations, drag-and-drop
7
- * helpers, presentational admin layout primitives, field widgets, form
8
- * runtime, and the field-side service contracts.
5
+ * Single unified entry point for `@byline/ui`.
9
6
  *
10
- * Why one barrel: previous releases split this into per-area subpath
11
- * exports (`./react/admin`, `./react/fields`, `./react/forms`,
12
- * `./react/services`). Bundlers that pre-bundle subpaths individually
13
- * (e.g. Vite's `optimizeDeps.include`) would inline a private copy of
14
- * the React Contexts in `services/*` per subpath — provider mounted on
15
- * one Context identity, hooks reading another. Collapsing to a single
16
- * specifier eliminates the trap structurally. Tree-shaking inside the
17
- * single ESM bundle handles unused exports for public-site consumers
18
- * (sideEffects is set to CSS only).
7
+ * Scope: framework-agnostic React primitives uikit foundations
8
+ * (Button, Input, Modal, Drawer, Alert, Table, icons, …) plus the
9
+ * widgets that remained generic after the admin extraction (datepicker,
10
+ * search, timeline, image-lightbox). No CMS concepts, no admin-specific
11
+ * Contexts.
19
12
  *
20
- * Admin-domain components (admin users, roles, permissions, account
21
- * self-service, sign-in form, admin services context) live in
22
- * `@byline/admin` under per-vertical subpaths they are no longer
23
- * exported from here. This package is the kit + form runtime +
24
- * collection-editor-shared widgets.
13
+ * Admin-domain React surface forms, fields, presentational form
14
+ * layout (tabs/rows/groups), drag-and-drop helpers used by sortable
15
+ * fields, the field-side services Context, and the editor-shared
16
+ * widgets (status-badge, diff-viewer) lives in `@byline/admin/react`.
17
+ * Server-only admin modules (admin-users, admin-roles, etc.) stay on
18
+ * their own per-vertical subpaths inside `@byline/admin`.
19
+ *
20
+ * One barrel rather than per-area subpath exports: bundlers that
21
+ * pre-bundle subpaths individually (e.g. Vite's `optimizeDeps.include`)
22
+ * would inline a private copy of any React Context per subpath —
23
+ * provider mounted on one identity, hooks reading another. Collapsing
24
+ * to a single specifier eliminates the trap structurally.
25
25
  */
26
- export * from './admin/group.js';
27
- export * from './admin/row.js';
28
- export * from './admin/tabs.js';
29
26
  export * from './dnd/draggable-sortable/index.js';
30
- export * from './fields/array/array-field.js';
31
- export * from './fields/blocks/blocks-field.js';
32
- export * from './fields/checkbox/checkbox-field.js';
33
- export * from './fields/column-formatter.js';
34
- export * from './fields/date-time-formatter.js';
35
- export * from './fields/datetime/datetime-field.js';
36
- export * from './fields/draggable-context-menu.js';
37
- export * from './fields/field-helpers.js';
38
- export * from './fields/field-renderer.js';
39
- export * from './fields/file/file-field.js';
40
- export * from './fields/file/file-upload-field.js';
41
- export * from './fields/group/group-field.js';
42
- export * from './fields/image/image-field.js';
43
- export * from './fields/image/image-upload-field.js';
44
- export * from './fields/local-date-time.js';
45
- export * from './fields/locale-badge.js';
46
- export * from './fields/numerical/numerical-field.js';
47
- export * from './fields/relation/relation-field.js';
48
- export * from './fields/relation/relation-picker.js';
49
- export * from './fields/select/select-field.js';
50
- export * from './fields/sortable-item.js';
51
- export * from './fields/text/text-field.js';
52
- export * from './fields/text-area/text-area-field.js';
53
- export * from './fields/use-field-change-handler.js';
54
- export * from './forms/document-actions.js';
55
- export * from './forms/form-context.js';
56
- export * from './forms/form-renderer.js';
57
- export * from './forms/navigation-guard.js';
58
- export * from './forms/path-widget.js';
59
- export * from './services/field-services-context.js';
60
27
  export * from './uikit.js';
61
- export * from './widgets/diff-viewer/diff-modal.js';
62
- export * from './widgets/status-badge/status-badge.js';
63
- export type { BylineFieldServices, CollectionListDoc, CollectionListParams, CollectionListResponse, GetCollectionDocumentsFn, UploadedFileResult, UploadFieldFn, } from './services/field-services-types.js';
package/dist/react.js CHANGED
@@ -1,37 +1,2 @@
1
- export * from "./admin/group.js";
2
- export * from "./admin/row.js";
3
- export * from "./admin/tabs.js";
4
1
  export * from "./dnd/draggable-sortable/index.js";
5
- export * from "./fields/array/array-field.js";
6
- export * from "./fields/blocks/blocks-field.js";
7
- export * from "./fields/checkbox/checkbox-field.js";
8
- export * from "./fields/column-formatter.js";
9
- export * from "./fields/date-time-formatter.js";
10
- export * from "./fields/datetime/datetime-field.js";
11
- export * from "./fields/draggable-context-menu.js";
12
- export * from "./fields/field-helpers.js";
13
- export * from "./fields/field-renderer.js";
14
- export * from "./fields/file/file-field.js";
15
- export * from "./fields/file/file-upload-field.js";
16
- export * from "./fields/group/group-field.js";
17
- export * from "./fields/image/image-field.js";
18
- export * from "./fields/image/image-upload-field.js";
19
- export * from "./fields/local-date-time.js";
20
- export * from "./fields/locale-badge.js";
21
- export * from "./fields/numerical/numerical-field.js";
22
- export * from "./fields/relation/relation-field.js";
23
- export * from "./fields/relation/relation-picker.js";
24
- export * from "./fields/select/select-field.js";
25
- export * from "./fields/sortable-item.js";
26
- export * from "./fields/text/text-field.js";
27
- export * from "./fields/text-area/text-area-field.js";
28
- export * from "./fields/use-field-change-handler.js";
29
- export * from "./forms/document-actions.js";
30
- export * from "./forms/form-context.js";
31
- export * from "./forms/form-renderer.js";
32
- export * from "./forms/navigation-guard.js";
33
- export * from "./forms/path-widget.js";
34
- export * from "./services/field-services-context.js";
35
2
  export * from "./uikit.js";
36
- export * from "./widgets/diff-viewer/diff-modal.js";
37
- export * from "./widgets/status-badge/status-badge.js";
package/dist/uikit.d.ts CHANGED
@@ -95,6 +95,7 @@ export * from './icons/stopwatch-icon.js';
95
95
  export * from './icons/success-icon.js';
96
96
  export * from './icons/user-icon.js';
97
97
  export * from './icons/users-icon.js';
98
+ export * from './icons/video-icon.js';
98
99
  export * from './icons/wallet-icon.js';
99
100
  export * from './icons/warning-icon.js';
100
101
  export * from './icons/x-icon.js';
package/dist/uikit.js CHANGED
@@ -90,6 +90,7 @@ export * from "./icons/stopwatch-icon.js";
90
90
  export * from "./icons/success-icon.js";
91
91
  export * from "./icons/user-icon.js";
92
92
  export * from "./icons/users-icon.js";
93
+ export * from "./icons/video-icon.js";
93
94
  export * from "./icons/wallet-icon.js";
94
95
  export * from "./icons/warning-icon.js";
95
96
  export * from "./icons/x-icon.js";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "2.5.2",
6
+ "version": "2.6.0",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -56,17 +56,13 @@
56
56
  "@dnd-kit/modifiers": "^9.0.0",
57
57
  "@dnd-kit/sortable": "^10.0.0",
58
58
  "@dnd-kit/utilities": "^3.2.2",
59
- "@tanstack/react-form-start": "^1.32.0",
60
59
  "classnames": "^2.5.1",
61
60
  "date-fns": "^4.2.1",
62
- "lodash-es": "^4.18.1",
63
61
  "motion": "^12.40.0",
64
62
  "npm-run-all": "^4.1.5",
65
63
  "react-day-picker": "^10.0.1",
66
- "react-diff-viewer-continued": "^4.2.2",
67
64
  "zod": "^4.4.3",
68
- "zod-form-data": "^3.0.1",
69
- "@byline/core": "2.5.2"
65
+ "@byline/core": "2.6.0"
70
66
  },
71
67
  "peerDependencies": {
72
68
  "react": "^19.0.0",
@@ -76,8 +72,6 @@
76
72
  "@biomejs/biome": "2.4.15",
77
73
  "@rsbuild/plugin-react": "^2.0.0",
78
74
  "@rslib/core": "^0.21.5",
79
- "@types/lodash": "^4.17.24",
80
- "@types/lodash-es": "^4.17.12",
81
75
  "@types/node": "^25.9.1",
82
76
  "@types/react": "19.2.15",
83
77
  "@types/react-dom": "19.2.3",
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { useState } from 'react'
4
4
 
5
+ import { Card, GripperVerticalIcon } from '@byline/ui/react'
5
6
  import cx from 'classnames'
6
7
 
7
- import { Card, GripperVerticalIcon } from '../../../uikit.js'
8
8
  import { DraggableSortable, moveItem, useSortable } from '..'
9
9
  import styles from './draggable-list-demo.module.css'
10
10
 
package/src/react.ts CHANGED
@@ -2,79 +2,31 @@
2
2
  * NOTE: We put a .js ending on imports here to satisfy
3
3
  * TS / dist output.
4
4
  *
5
- * Single unified entry point for `@byline/ui`. Everything React-side
6
- * exports through this barrel — uikit foundations, drag-and-drop
7
- * helpers, presentational admin layout primitives, field widgets, form
8
- * runtime, and the field-side service contracts.
5
+ * Single unified entry point for `@byline/ui`.
9
6
  *
10
- * Why one barrel: previous releases split this into per-area subpath
11
- * exports (`./react/admin`, `./react/fields`, `./react/forms`,
12
- * `./react/services`). Bundlers that pre-bundle subpaths individually
13
- * (e.g. Vite's `optimizeDeps.include`) would inline a private copy of
14
- * the React Contexts in `services/*` per subpath — provider mounted on
15
- * one Context identity, hooks reading another. Collapsing to a single
16
- * specifier eliminates the trap structurally. Tree-shaking inside the
17
- * single ESM bundle handles unused exports for public-site consumers
18
- * (sideEffects is set to CSS only).
7
+ * Scope: framework-agnostic React primitives uikit foundations
8
+ * (Button, Input, Modal, Drawer, Alert, Table, icons, …) plus the
9
+ * widgets that remained generic after the admin extraction (datepicker,
10
+ * search, timeline, image-lightbox). No CMS concepts, no admin-specific
11
+ * Contexts.
19
12
  *
20
- * Admin-domain components (admin users, roles, permissions, account
21
- * self-service, sign-in form, admin services context) live in
22
- * `@byline/admin` under per-vertical subpaths they are no longer
23
- * exported from here. This package is the kit + form runtime +
24
- * collection-editor-shared widgets.
13
+ * Admin-domain React surface forms, fields, presentational form
14
+ * layout (tabs/rows/groups), drag-and-drop helpers used by sortable
15
+ * fields, the field-side services Context, and the editor-shared
16
+ * widgets (status-badge, diff-viewer) lives in `@byline/admin/react`.
17
+ * Server-only admin modules (admin-users, admin-roles, etc.) stay on
18
+ * their own per-vertical subpaths inside `@byline/admin`.
19
+ *
20
+ * One barrel rather than per-area subpath exports: bundlers that
21
+ * pre-bundle subpaths individually (e.g. Vite's `optimizeDeps.include`)
22
+ * would inline a private copy of any React Context per subpath —
23
+ * provider mounted on one identity, hooks reading another. Collapsing
24
+ * to a single specifier eliminates the trap structurally.
25
25
  */
26
26
 
27
- // Presentational admin layout primitives.
28
- export * from './admin/group.js'
29
- export * from './admin/row.js'
30
- export * from './admin/tabs.js'
31
- // Drag-and-drop helpers.
27
+ // Generic vertical-list sortable helpers over @dnd-kit/sortable. No
28
+ // CMS concepts in the API — callers pass ids + an onDragEnd callback.
32
29
  export * from './dnd/draggable-sortable/index.js'
33
- // Field widgets.
34
- export * from './fields/array/array-field.js'
35
- export * from './fields/blocks/blocks-field.js'
36
- export * from './fields/checkbox/checkbox-field.js'
37
- export * from './fields/column-formatter.js'
38
- export * from './fields/date-time-formatter.js'
39
- export * from './fields/datetime/datetime-field.js'
40
- export * from './fields/draggable-context-menu.js'
41
- export * from './fields/field-helpers.js'
42
- export * from './fields/field-renderer.js'
43
- export * from './fields/file/file-field.js'
44
- export * from './fields/file/file-upload-field.js'
45
- export * from './fields/group/group-field.js'
46
- export * from './fields/image/image-field.js'
47
- export * from './fields/image/image-upload-field.js'
48
- export * from './fields/local-date-time.js'
49
- export * from './fields/locale-badge.js'
50
- export * from './fields/numerical/numerical-field.js'
51
- export * from './fields/relation/relation-field.js'
52
- export * from './fields/relation/relation-picker.js'
53
- export * from './fields/select/select-field.js'
54
- export * from './fields/sortable-item.js'
55
- export * from './fields/text/text-field.js'
56
- export * from './fields/text-area/text-area-field.js'
57
- export * from './fields/use-field-change-handler.js'
58
- // Form runtime.
59
- export * from './forms/document-actions.js'
60
- export * from './forms/form-context.js'
61
- export * from './forms/form-renderer.js'
62
- export * from './forms/navigation-guard.js'
63
- export * from './forms/path-widget.js'
64
- // Field-side service contract types + Context provider/hook.
65
- export * from './services/field-services-context.js'
66
30
  // Foundational surface — synced from @infonomic/uikit. See
67
31
  // scripts/sync-from-uikit.sh and src/.uikit-sync.json.
68
32
  export * from './uikit.js'
69
- // Collection-editor-shared widgets.
70
- export * from './widgets/diff-viewer/diff-modal.js'
71
- export * from './widgets/status-badge/status-badge.js'
72
- export type {
73
- BylineFieldServices,
74
- CollectionListDoc,
75
- CollectionListParams,
76
- CollectionListResponse,
77
- GetCollectionDocumentsFn,
78
- UploadedFileResult,
79
- UploadFieldFn,
80
- } from './services/field-services-types.js'
package/src/uikit.ts CHANGED
@@ -103,6 +103,7 @@ export * from './icons/stopwatch-icon.js'
103
103
  export * from './icons/success-icon.js'
104
104
  export * from './icons/user-icon.js'
105
105
  export * from './icons/users-icon.js'
106
+ export * from './icons/video-icon.js'
106
107
  export * from './icons/wallet-icon.js'
107
108
  export * from './icons/warning-icon.js'
108
109
  export * from './icons/x-icon.js'
@@ -1,27 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
- import type { ReactNode } from 'react';
9
- interface AdminGroupProps {
10
- /** Optional heading rendered as a `<legend>` above the cluster. */
11
- label?: string;
12
- children: ReactNode;
13
- className?: string;
14
- }
15
- /**
16
- * Labelled fieldset clustering related fields together.
17
- *
18
- * Used by `FormRenderer` when a `CollectionAdminConfig` declares a `groups`
19
- * primitive. Renders a bordered, padded `<fieldset>` with an optional
20
- * `<legend>` for the label.
21
- *
22
- * Stable override handles: `.byline-admin-group` on the fieldset and
23
- * `.byline-admin-group-legend` on the legend (alongside the hashed
24
- * CSS-modules locals).
25
- */
26
- export declare const AdminGroup: ({ label, children, className }: AdminGroupProps) => import("react").JSX.Element;
27
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import group_module from "./group.module.js";
4
- const AdminGroup = ({ label, children, className })=>/*#__PURE__*/ jsxs("fieldset", {
5
- className: classnames('byline-admin-group', group_module.group, className),
6
- children: [
7
- label && /*#__PURE__*/ jsx("legend", {
8
- className: classnames('byline-admin-group-legend', group_module.legend),
9
- children: label
10
- }),
11
- children
12
- ]
13
- });
14
- export { AdminGroup };
@@ -1,6 +0,0 @@
1
- import "./group_module.css";
2
- const group_module = {
3
- group: "group-pmMFT_",
4
- legend: "legend-oOuePJ"
5
- };
6
- export default group_module;
@@ -1,19 +0,0 @@
1
- :is(.group-pmMFT_, .byline-admin-group) {
2
- gap: var(--spacing-16);
3
- padding: var(--spacing-12);
4
- border: var(--border-width-thin) var(--border-style-solid) var(--gray-200);
5
- border-radius: var(--border-radius-md);
6
- flex-direction: column;
7
- display: flex;
8
- }
9
-
10
- :is(.legend-oOuePJ, .byline-admin-group-legend) {
11
- padding-inline: var(--spacing-4);
12
- font-size: var(--font-size-sm);
13
- font-weight: var(--font-weight-medium);
14
- }
15
-
16
- :is(:is([data-theme="dark"], .dark) .group-pmMFT_, :is([data-theme="dark"], .dark) .byline-admin-group) {
17
- border-color: var(--gray-700);
18
- }
19
-
@@ -1,25 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
- import type { ReactNode } from 'react';
9
- interface AdminRowProps {
10
- children: ReactNode;
11
- className?: string;
12
- }
13
- /**
14
- * Horizontal flex-row layout for admin form fields.
15
- *
16
- * Used by `FormRenderer` when a `CollectionAdminConfig` declares a `rows`
17
- * primitive. Members are rendered side-by-side above the `sm` breakpoint
18
- * and stack vertically below it. `flex-1` + `min-width: 0` lets two text
19
- * inputs share the row evenly without overflowing.
20
- *
21
- * The element carries `.byline-admin-row` as a stable global class for
22
- * host overrides (alongside the hashed CSS-modules local).
23
- */
24
- export declare const AdminRow: ({ children, className }: AdminRowProps) => import("react").JSX.Element;
25
- export {};
package/dist/admin/row.js DELETED
@@ -1,8 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import row_module from "./row.module.js";
4
- const AdminRow = ({ children, className })=>/*#__PURE__*/ jsx("div", {
5
- className: classnames('byline-admin-row', row_module.row, className),
6
- children: children
7
- });
8
- export { AdminRow };
@@ -1,5 +0,0 @@
1
- import "./row_module.css";
2
- const row_module = {
3
- row: "row-Sq48i8"
4
- };
5
- export default row_module;
@@ -1,18 +0,0 @@
1
- :is(.row-Sq48i8, .byline-admin-row) {
2
- align-items: flex-start;
3
- gap: var(--spacing-16);
4
- flex-direction: column;
5
- display: flex;
6
- }
7
-
8
- :is(.row-Sq48i8 > *, .byline-admin-row > *) {
9
- flex: 1;
10
- min-width: 0;
11
- }
12
-
13
- @media (min-width: 40rem) {
14
- :is(.row-Sq48i8, .byline-admin-row) {
15
- flex-direction: row;
16
- }
17
- }
18
-
@@ -1,25 +0,0 @@
1
- export interface AdminTabItem {
2
- name: string;
3
- label: string;
4
- }
5
- interface AdminTabsProps {
6
- tabs: AdminTabItem[];
7
- activeTab: string;
8
- onChange: (name: string) => void;
9
- /** Error counts keyed by tab name — shows a danger badge when > 0. */
10
- errorCounts?: Record<string, number>;
11
- className?: string;
12
- }
13
- /**
14
- * Tabs navigation bar for admin form layouts.
15
- *
16
- * Used by FormRenderer when a CollectionAdminConfig declares a `tabs` array.
17
- * Each tab is a simple button with a bottom-border active indicator.
18
- * Inactive tabs show a subtle hover state. Fully dark-mode aware.
19
- *
20
- * Stable override handles: `.byline-admin-tabs`, `.byline-admin-tab`,
21
- * `.byline-admin-tab-active`, `.byline-admin-tab-label`,
22
- * `.byline-admin-tab-badge`.
23
- */
24
- export declare const AdminTabs: ({ tabs, activeTab, onChange, errorCounts, className, }: AdminTabsProps) => import("react").JSX.Element;
25
- export {};
@@ -1,35 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import classnames from "classnames";
4
- import { Badge } from "../uikit.js";
5
- import tabs_module from "./tabs.module.js";
6
- const AdminTabs = ({ tabs, activeTab, onChange, errorCounts, className })=>/*#__PURE__*/ jsx("div", {
7
- role: "tablist",
8
- "aria-label": "Form tabs",
9
- className: classnames('byline-admin-tabs', tabs_module.tabs, className),
10
- children: tabs.map((tab)=>{
11
- const isActive = tab.name === activeTab;
12
- return /*#__PURE__*/ jsx("button", {
13
- type: "button",
14
- role: "tab",
15
- "aria-selected": isActive,
16
- onClick: ()=>onChange(tab.name),
17
- className: classnames('byline-admin-tab', tabs_module.tab, isActive && [
18
- 'byline-admin-tab-active',
19
- tabs_module["tab-active"]
20
- ]),
21
- children: /*#__PURE__*/ jsxs("span", {
22
- className: classnames('byline-admin-tab-label', tabs_module.label),
23
- children: [
24
- tab.label,
25
- (errorCounts?.[tab.name] ?? 0) > 0 && /*#__PURE__*/ jsx(Badge, {
26
- intent: "danger",
27
- className: classnames('byline-admin-tab-badge', tabs_module.badge),
28
- children: errorCounts?.[tab.name]
29
- })
30
- ]
31
- })
32
- }, tab.name);
33
- })
34
- });
35
- export { AdminTabs };
@@ -1,10 +0,0 @@
1
- import "./tabs_module.css";
2
- const tabs_module = {
3
- tabs: "tabs-j6CvRO",
4
- tab: "tab-BdAWTm",
5
- "tab-active": "tab-active-bc05XN",
6
- tabActive: "tab-active-bc05XN",
7
- label: "label-Tdf1rn",
8
- badge: "badge-Pq1O6d"
9
- };
10
- export default tabs_module;
@@ -1,68 +0,0 @@
1
- :is(.tabs-j6CvRO, .byline-admin-tabs) {
2
- gap: var(--spacing-16);
3
- border-bottom: var(--border-width-thin) var(--border-style-solid) var(--gray-200);
4
- display: flex;
5
- }
6
-
7
- :is(.tab-BdAWTm, .byline-admin-tab) {
8
- color: var(--gray-500);
9
- font-size: 1.1rem;
10
- font-weight: var(--font-weight-medium);
11
- cursor: pointer;
12
- background: none;
13
- border-bottom: 2px solid #0000;
14
- outline: none;
15
- margin-bottom: -1px;
16
- padding: .625rem 0;
17
- transition: color .15s, border-color .15s;
18
- position: relative;
19
- }
20
-
21
- :is(.tab-BdAWTm:hover, .byline-admin-tab:hover) {
22
- color: var(--gray-800);
23
- border-bottom-color: var(--gray-300);
24
- }
25
-
26
- :is(.tab-BdAWTm:focus-visible, .byline-admin-tab:focus-visible) {
27
- box-shadow: 0 0 0 2px var(--blue-500);
28
- }
29
-
30
- :is(.tab-active-bc05XN, .byline-admin-tab-active), :is(.tab-active-bc05XN:hover, .byline-admin-tab-active:hover) {
31
- color: var(--primary-600);
32
- border-bottom-color: var(--primary-400);
33
- }
34
-
35
- :is(.label-Tdf1rn, .byline-admin-tab-label) {
36
- align-items: center;
37
- gap: .375rem;
38
- display: flex;
39
- }
40
-
41
- :is(.badge-Pq1O6d, .byline-admin-tab-badge) {
42
- justify-content: center;
43
- align-items: center;
44
- min-width: 1.25rem;
45
- height: 1.25rem;
46
- padding: 0 .375rem;
47
- font-size: .7rem;
48
- display: flex;
49
- }
50
-
51
- :is(:is([data-theme="dark"], .dark) .tabs-j6CvRO, :is([data-theme="dark"], .dark) .byline-admin-tabs) {
52
- border-bottom-color: var(--gray-700);
53
- }
54
-
55
- :is(:is([data-theme="dark"], .dark) .tab-BdAWTm, :is([data-theme="dark"], .dark) .byline-admin-tab) {
56
- color: var(--gray-400);
57
- }
58
-
59
- :is(:is([data-theme="dark"], .dark) .tab-BdAWTm:hover, :is([data-theme="dark"], .dark) .byline-admin-tab:hover) {
60
- color: var(--gray-200);
61
- border-bottom-color: var(--gray-600);
62
- }
63
-
64
- :is(:is([data-theme="dark"], .dark) .tab-active-bc05XN, :is([data-theme="dark"], .dark) .byline-admin-tab-active), :is(:is([data-theme="dark"], .dark) .tab-active-bc05XN:hover, :is([data-theme="dark"], .dark) .byline-admin-tab-active:hover) {
65
- color: var(--primary-200);
66
- border-bottom-color: var(--primary-400);
67
- }
68
-
@@ -1,14 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
- import type { ArrayField as ArrayFieldType } from '@byline/core';
9
- export declare const ArrayField: ({ field, defaultValue, path, disableSorting, }: {
10
- field: ArrayFieldType;
11
- defaultValue: any;
12
- path: string;
13
- disableSorting?: boolean;
14
- }) => import("react").JSX.Element;