@rebasepro/types 0.10.0 → 0.10.1-canary.0a881d4

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 (96) hide show
  1. package/dist/call_context.d.ts +51 -0
  2. package/dist/controllers/auth_state.d.ts +23 -0
  3. package/dist/controllers/client.d.ts +3 -1
  4. package/dist/controllers/collection_registry.d.ts +5 -1
  5. package/dist/controllers/data_driver.d.ts +31 -2
  6. package/dist/controllers/index.d.ts +1 -10
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.es.js +374 -1
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/types/admin_block.d.ts +34 -0
  11. package/dist/types/backend.d.ts +30 -1
  12. package/dist/types/channel_bus.d.ts +192 -0
  13. package/dist/types/collection_contract.d.ts +43 -0
  14. package/dist/types/collections.d.ts +17 -789
  15. package/dist/types/component_ref.d.ts +39 -6
  16. package/dist/types/entity_callbacks.d.ts +1 -1
  17. package/dist/types/index.d.ts +7 -15
  18. package/dist/types/project_manifest.d.ts +336 -0
  19. package/dist/types/properties.d.ts +12 -157
  20. package/dist/types/schema_version.d.ts +18 -0
  21. package/dist/types/security_rules.d.ts +320 -0
  22. package/dist/types/storage_authorize.d.ts +74 -0
  23. package/package.json +3 -6
  24. package/src/call_context.ts +56 -0
  25. package/src/controllers/auth_state.ts +24 -0
  26. package/src/controllers/client.ts +3 -2
  27. package/src/controllers/collection_registry.ts +5 -1
  28. package/src/controllers/data_driver.ts +58 -2
  29. package/src/controllers/index.ts +1 -10
  30. package/src/index.ts +1 -1
  31. package/src/types/admin_block.ts +75 -0
  32. package/src/types/backend.ts +33 -1
  33. package/src/types/channel_bus.ts +202 -0
  34. package/src/types/collection_contract.ts +278 -0
  35. package/src/types/collections.ts +25 -848
  36. package/src/types/component_ref.ts +40 -6
  37. package/src/types/entity_callbacks.ts +1 -1
  38. package/src/types/index.ts +7 -15
  39. package/src/types/policy.ts +25 -11
  40. package/src/types/project_manifest.ts +362 -0
  41. package/src/types/properties.ts +11 -169
  42. package/src/types/schema_version.ts +112 -0
  43. package/src/types/security_rules.ts +344 -0
  44. package/src/types/storage_authorize.ts +77 -0
  45. package/dist/controllers/analytics_controller.d.ts +0 -7
  46. package/dist/controllers/auth.d.ts +0 -110
  47. package/dist/controllers/customization_controller.d.ts +0 -61
  48. package/dist/controllers/dialogs_controller.d.ts +0 -36
  49. package/dist/controllers/local_config_persistence.d.ts +0 -20
  50. package/dist/controllers/navigation.d.ts +0 -225
  51. package/dist/controllers/registry.d.ts +0 -80
  52. package/dist/controllers/side_dialogs_controller.d.ts +0 -67
  53. package/dist/controllers/side_panel_controller.d.ts +0 -97
  54. package/dist/controllers/snackbar.d.ts +0 -24
  55. package/dist/rebase_context.d.ts +0 -110
  56. package/dist/types/breadcrumbs.d.ts +0 -26
  57. package/dist/types/builders.d.ts +0 -15
  58. package/dist/types/component_overrides.d.ts +0 -196
  59. package/dist/types/entity_actions.d.ts +0 -104
  60. package/dist/types/entity_link_builder.d.ts +0 -7
  61. package/dist/types/entity_views.d.ts +0 -95
  62. package/dist/types/export_import.d.ts +0 -21
  63. package/dist/types/formex.d.ts +0 -40
  64. package/dist/types/locales.d.ts +0 -4
  65. package/dist/types/modify_collections.d.ts +0 -5
  66. package/dist/types/plugins.d.ts +0 -277
  67. package/dist/types/property_config.d.ts +0 -74
  68. package/dist/types/slots.d.ts +0 -262
  69. package/dist/types/translations.d.ts +0 -915
  70. package/dist/types/user_management_delegate.d.ts +0 -22
  71. package/src/controllers/analytics_controller.tsx +0 -57
  72. package/src/controllers/auth.tsx +0 -121
  73. package/src/controllers/customization_controller.tsx +0 -72
  74. package/src/controllers/dialogs_controller.tsx +0 -37
  75. package/src/controllers/local_config_persistence.tsx +0 -22
  76. package/src/controllers/navigation.ts +0 -267
  77. package/src/controllers/registry.ts +0 -95
  78. package/src/controllers/side_dialogs_controller.tsx +0 -82
  79. package/src/controllers/side_panel_controller.tsx +0 -112
  80. package/src/controllers/snackbar.ts +0 -29
  81. package/src/rebase_context.tsx +0 -130
  82. package/src/types/breadcrumbs.ts +0 -27
  83. package/src/types/builders.ts +0 -17
  84. package/src/types/component_overrides.ts +0 -244
  85. package/src/types/entity_actions.tsx +0 -125
  86. package/src/types/entity_link_builder.ts +0 -8
  87. package/src/types/entity_views.tsx +0 -114
  88. package/src/types/export_import.ts +0 -26
  89. package/src/types/formex.ts +0 -45
  90. package/src/types/locales.ts +0 -81
  91. package/src/types/modify_collections.tsx +0 -6
  92. package/src/types/plugins.tsx +0 -346
  93. package/src/types/property_config.tsx +0 -95
  94. package/src/types/slots.tsx +0 -307
  95. package/src/types/translations.ts +0 -1026
  96. package/src/types/user_management_delegate.ts +0 -23
@@ -1,307 +0,0 @@
1
- import React from "react";
2
- import type { CollectionActionsProps, EntityTableController, SelectionController, CollectionConfig } from "./collections";
3
- import type { Entity } from "./entities";
4
- import type { PluginFormActionProps, PluginGenericProps, PluginHomePageActionsProps, PluginHomePageAdditionalCardsProps } from "./plugins";
5
- import type { Property } from "./properties";
6
- import type { RebaseContext } from "../rebase_context";
7
-
8
- /**
9
- * Registry mapping slot names to their component prop types.
10
- * Each key represents a UI extension point in the CMS.
11
- * @group Plugins
12
- */
13
- export interface SlotRegistry {
14
- // ── Home page ─────────────────────────────────────────────────────
15
- "home.actions": PluginGenericProps;
16
- "home.cards": PluginHomePageAdditionalCardsProps;
17
- "home.children.start": PluginGenericProps;
18
- "home.children.end": PluginGenericProps;
19
- /** Compact insight widget rendered inline in a home page collection card. */
20
- "home.card.insight": HomeCardInsightSlotProps;
21
- "home.collection.actions": PluginHomePageActionsProps;
22
-
23
- // ── Navigation / Drawer ───────────────────────────────────────────
24
- /** Rendered below the logo in the sidebar drawer. */
25
- "navigation.header": NavigationSlotProps;
26
- /** Rendered above the collapse toggle at the bottom of the drawer. */
27
- "navigation.footer": NavigationSlotProps;
28
-
29
- // ── Collection view ───────────────────────────────────────────────
30
- "collection.actions": CollectionActionsProps;
31
- "collection.actions.start": CollectionActionsProps;
32
- "collection.header.action": CollectionHeaderActionProps;
33
- "collection.add-column": CollectionAddColumnProps;
34
- "collection.error": CollectionErrorProps;
35
- /** Extra widgets rendered inside the collection toolbar row. */
36
- "collection.toolbar": CollectionToolbarProps;
37
- /** Custom empty-state component when a collection has no data. */
38
- "collection.empty-state": CollectionEmptyStateProps;
39
- /** Insight widgets rendered above the collection table. */
40
- "collection.insights": CollectionInsightsSlotProps;
41
-
42
- // ── Entity / Form ─────────────────────────────────────────────────
43
- "form.actions": PluginFormActionProps;
44
- "form.actions.top": PluginFormActionProps;
45
- /** Rendered before the form title / field list. */
46
- "form.before": PluginFormActionProps;
47
- /** Rendered after the form field list. */
48
- "form.after": PluginFormActionProps;
49
-
50
- // ── Entity row actions ────────────────────────────────────────────
51
- /** Per-row actions in entity tables (e.g. bulk actions, row context menus). */
52
- "entity.row.actions": EntityRowActionsProps;
53
-
54
- // ── Entity field decoration ───────────────────────────────────────
55
- /** Inject UI before an individual form field. */
56
- "entity.field.before": EntityFieldSlotProps;
57
- /** Inject UI after an individual form field. */
58
- "entity.field.after": EntityFieldSlotProps;
59
-
60
- // ── Collection filter panel ───────────────────────────────────────
61
- /** Custom filter sidebar for a collection. */
62
- "collection.filter-panel": CollectionFilterPanelProps;
63
-
64
- // ── Dashboard ─────────────────────────────────────────────────────
65
- /** Widget rendered on the dashboard / home page. */
66
- "dashboard.widget": DashboardWidgetProps;
67
-
68
- // ── Global ────────────────────────────────────────────────────────
69
- /** Cross-collection search bar component. */
70
- "global.search": GlobalSearchProps;
71
- /** Top-level toolbar actions rendered in the shell toolbar area. */
72
- "shell.toolbar": ShellToolbarProps;
73
-
74
- // ── Kanban ────────────────────────────────────────────────────────
75
- "kanban.setup": KanbanSetupProps;
76
- "kanban.add-column": KanbanAddColumnProps;
77
- }
78
-
79
- /**
80
- * Valid slot names for UI extension points.
81
- * @group Plugins
82
- */
83
- export type SlotName = keyof SlotRegistry;
84
-
85
- /**
86
- * A single UI component contribution to a named slot.
87
- * @group Plugins
88
- */
89
- export interface SlotContribution<K extends SlotName = SlotName> {
90
- /**
91
- * Which slot to contribute to.
92
- */
93
- slot: K;
94
-
95
- /**
96
- * The component to render in the slot.
97
- * Typed loosely so mixed-slot arrays work.
98
- * Type safety is provided at the `useSlot` call site.
99
- */
100
- Component: React.ComponentType<any>;
101
-
102
- /**
103
- * Additional props to merge into the slot props before rendering.
104
- */
105
- props?: Record<string, unknown>;
106
-
107
- /**
108
- * Ordering hint. Lower values render first. Defaults to 50.
109
- */
110
- order?: number;
111
- }
112
-
113
- // ── Prop interfaces for slots ─────────────────────────────────────────
114
-
115
- /**
116
- * Props for `navigation.header` and `navigation.footer` slots.
117
- * @group Plugins
118
- */
119
- export interface NavigationSlotProps {
120
- drawerOpen: boolean;
121
- drawerHovered: boolean;
122
- context: RebaseContext;
123
- }
124
-
125
- /**
126
- * Props for the `collection.toolbar` slot.
127
- * @group Plugins
128
- */
129
- export interface CollectionToolbarProps {
130
- path: string;
131
- collection: CollectionConfig;
132
- parentCollectionSlugs: string[];
133
- parentEntityIds: string[];
134
- tableController: EntityTableController;
135
- selectionController: SelectionController;
136
- }
137
-
138
- /**
139
- * Props for the `collection.empty-state` slot.
140
- * @group Plugins
141
- */
142
- export interface CollectionEmptyStateProps {
143
- path: string;
144
- collection: CollectionConfig;
145
- parentCollectionSlugs: string[];
146
- parentEntityIds: string[];
147
- canCreate: boolean;
148
- onNewClick?: () => void;
149
- }
150
-
151
- /**
152
- * Props for the `collection.header.action` slot.
153
- * @group Plugins
154
- */
155
- export interface CollectionHeaderActionProps {
156
- property: Property;
157
- propertyKey: string;
158
- path: string;
159
- parentCollectionSlugs: string[];
160
- parentEntityIds: string[];
161
- onHover: boolean;
162
- collection: CollectionConfig;
163
- tableController: EntityTableController;
164
- }
165
-
166
- /**
167
- * Props for the `collection.add-column` slot.
168
- * @group Plugins
169
- */
170
- export interface CollectionAddColumnProps {
171
- path: string;
172
- parentCollectionSlugs: string[];
173
- parentEntityIds: string[];
174
- collection: CollectionConfig;
175
- tableController: EntityTableController;
176
- }
177
-
178
- /**
179
- * Props for the `collection.error` slot.
180
- * @group Plugins
181
- */
182
- export interface CollectionErrorProps {
183
- path: string;
184
- collection: CollectionConfig;
185
- parentCollectionSlugs?: string[];
186
- parentEntityIds?: string[];
187
- error: Error;
188
- }
189
-
190
- /**
191
- * Props for the `kanban.setup` slot.
192
- * @group Plugins
193
- */
194
- export interface KanbanSetupProps {
195
- collection: CollectionConfig;
196
- fullPath: string;
197
- parentCollectionSlugs: string[];
198
- parentEntityIds: string[];
199
- }
200
-
201
- /**
202
- * Props for the `kanban.add-column` slot.
203
- * @group Plugins
204
- */
205
- export interface KanbanAddColumnProps {
206
- collection: CollectionConfig;
207
- fullPath: string;
208
- parentCollectionSlugs: string[];
209
- parentEntityIds: string[];
210
- columnProperty: string;
211
- }
212
-
213
- // ── New slot prop interfaces ──────────────────────────────────────────
214
-
215
- /**
216
- * Props for `entity.row.actions` slot.
217
- * Rendered for each row in a entity collection table.
218
- * @group Plugins
219
- */
220
- export interface EntityRowActionsProps {
221
- entity: Entity;
222
- entityId: string;
223
- path: string;
224
- collection: CollectionConfig;
225
- parentCollectionSlugs: string[];
226
- parentEntityIds: string[];
227
- selectionController: SelectionController;
228
- context: RebaseContext;
229
- }
230
-
231
- /**
232
- * Props for `entity.field.before` and `entity.field.after` slots.
233
- * Rendered around individual form fields in the entity edit view.
234
- * @group Plugins
235
- */
236
- export interface EntityFieldSlotProps {
237
- propertyKey: string;
238
- property: Property;
239
- path: string;
240
- entityId?: string | number;
241
- collection: CollectionConfig;
242
- context: RebaseContext;
243
- }
244
-
245
- /**
246
- * Props for `collection.filter-panel` slot.
247
- * Custom filter sidebar rendered alongside the collection table.
248
- * @group Plugins
249
- */
250
- export interface CollectionFilterPanelProps {
251
- path: string;
252
- collection: CollectionConfig;
253
- parentCollectionSlugs: string[];
254
- parentEntityIds: string[];
255
- tableController: EntityTableController;
256
- context: RebaseContext;
257
- }
258
-
259
- /**
260
- * Props for `dashboard.widget` slot.
261
- * Widgets rendered on the home / dashboard page.
262
- * @group Plugins
263
- */
264
- export interface DashboardWidgetProps {
265
- context: RebaseContext;
266
- }
267
-
268
- /**
269
- * Props for `global.search` slot.
270
- * Cross-collection search bar rendered in the app shell.
271
- * @group Plugins
272
- */
273
- export interface GlobalSearchProps {
274
- context: RebaseContext;
275
- }
276
-
277
- /**
278
- * Props for `shell.toolbar` slot.
279
- * Actions rendered in the top-level toolbar / app bar area.
280
- * @group Plugins
281
- */
282
- export interface ShellToolbarProps {
283
- context: RebaseContext;
284
- }
285
-
286
- /**
287
- * Props for `collection.insights` slot.
288
- * Insight widgets rendered above the collection table.
289
- * @group Plugins
290
- */
291
- export interface CollectionInsightsSlotProps {
292
- path: string;
293
- collection: CollectionConfig;
294
- parentCollectionSlugs: string[];
295
- parentEntityIds: string[];
296
- }
297
-
298
- /**
299
- * Props for `home.card.insight` slot.
300
- * Compact insight rendered inline in a home page collection card.
301
- * @group Plugins
302
- */
303
- export interface HomeCardInsightSlotProps {
304
- slug: string;
305
- collection: CollectionConfig;
306
- context: RebaseContext;
307
- }