@object-ui/types 0.3.0 → 0.5.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 (169) hide show
  1. package/README.md +19 -11
  2. package/dist/api-types.d.ts +7 -0
  3. package/dist/api-types.d.ts.map +1 -1
  4. package/dist/api-types.js +4 -6
  5. package/dist/app.d.ts +17 -0
  6. package/dist/app.d.ts.map +1 -1
  7. package/dist/app.js +4 -3
  8. package/dist/base.d.ts +7 -0
  9. package/dist/base.d.ts.map +1 -1
  10. package/dist/base.js +4 -6
  11. package/dist/blocks.d.ts +332 -0
  12. package/dist/blocks.d.ts.map +1 -0
  13. package/dist/blocks.js +8 -0
  14. package/dist/complex.d.ts +68 -1
  15. package/dist/complex.d.ts.map +1 -1
  16. package/dist/complex.js +4 -5
  17. package/dist/crud.d.ts +181 -3
  18. package/dist/crud.d.ts.map +1 -1
  19. package/dist/crud.js +4 -6
  20. package/dist/data-display.d.ts +54 -2
  21. package/dist/data-display.d.ts.map +1 -1
  22. package/dist/data-display.js +4 -5
  23. package/dist/data-protocol.d.ts +1268 -0
  24. package/dist/data-protocol.d.ts.map +1 -0
  25. package/dist/data-protocol.js +8 -0
  26. package/dist/data.d.ts +22 -1
  27. package/dist/data.d.ts.map +1 -1
  28. package/dist/data.js +4 -6
  29. package/dist/disclosure.d.ts +70 -1
  30. package/dist/disclosure.d.ts.map +1 -1
  31. package/dist/disclosure.js +4 -5
  32. package/dist/feedback.d.ts +68 -1
  33. package/dist/feedback.d.ts.map +1 -1
  34. package/dist/feedback.js +4 -5
  35. package/dist/field-types.d.ts +728 -0
  36. package/dist/field-types.d.ts.map +1 -0
  37. package/dist/field-types.js +8 -0
  38. package/dist/form.d.ts +123 -1
  39. package/dist/form.d.ts.map +1 -1
  40. package/dist/form.js +4 -5
  41. package/dist/index.d.ts +48 -13
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +4 -37
  44. package/dist/layout.d.ts +66 -16
  45. package/dist/layout.d.ts.map +1 -1
  46. package/dist/layout.js +4 -6
  47. package/dist/navigation.d.ts +102 -2
  48. package/dist/navigation.d.ts.map +1 -1
  49. package/dist/navigation.js +4 -5
  50. package/dist/objectql.d.ts +491 -54
  51. package/dist/objectql.d.ts.map +1 -1
  52. package/dist/objectql.js +4 -6
  53. package/dist/overlay.d.ts +31 -1
  54. package/dist/overlay.d.ts.map +1 -1
  55. package/dist/overlay.js +4 -5
  56. package/dist/plugin-scope.d.ts +194 -0
  57. package/dist/plugin-scope.d.ts.map +1 -0
  58. package/dist/plugin-scope.js +8 -0
  59. package/dist/registry.d.ts +7 -0
  60. package/dist/registry.d.ts.map +1 -1
  61. package/dist/registry.js +7 -0
  62. package/dist/reports.d.ts +336 -0
  63. package/dist/reports.d.ts.map +1 -0
  64. package/dist/reports.js +8 -0
  65. package/dist/theme.d.ts +289 -0
  66. package/dist/theme.d.ts.map +1 -0
  67. package/dist/theme.js +8 -0
  68. package/dist/ui-action.d.ts +175 -0
  69. package/dist/ui-action.d.ts.map +1 -0
  70. package/dist/ui-action.js +8 -0
  71. package/dist/views.d.ts +417 -0
  72. package/dist/views.d.ts.map +1 -0
  73. package/dist/views.js +8 -0
  74. package/dist/zod/app.zod.d.ts +120 -0
  75. package/dist/zod/app.zod.d.ts.map +1 -0
  76. package/dist/zod/app.zod.js +60 -0
  77. package/dist/zod/base.zod.d.ts +202 -0
  78. package/dist/zod/base.zod.d.ts.map +1 -0
  79. package/dist/zod/base.zod.js +198 -0
  80. package/dist/zod/blocks.zod.d.ts +834 -0
  81. package/dist/zod/blocks.zod.d.ts.map +1 -0
  82. package/dist/zod/blocks.zod.js +145 -0
  83. package/dist/zod/complex.zod.d.ts +742 -0
  84. package/dist/zod/complex.zod.d.ts.map +1 -0
  85. package/dist/zod/complex.zod.js +233 -0
  86. package/dist/zod/crud.zod.d.ts +598 -0
  87. package/dist/zod/crud.zod.d.ts.map +1 -0
  88. package/dist/zod/crud.zod.js +230 -0
  89. package/dist/zod/data-display.zod.d.ts +996 -0
  90. package/dist/zod/data-display.zod.d.ts.map +1 -0
  91. package/dist/zod/data-display.zod.js +266 -0
  92. package/dist/zod/disclosure.zod.d.ts +267 -0
  93. package/dist/zod/disclosure.zod.d.ts.map +1 -0
  94. package/dist/zod/disclosure.zod.js +84 -0
  95. package/dist/zod/feedback.zod.d.ts +538 -0
  96. package/dist/zod/feedback.zod.d.ts.map +1 -0
  97. package/dist/zod/feedback.zod.js +127 -0
  98. package/dist/zod/form.zod.d.ts +1308 -0
  99. package/dist/zod/form.zod.d.ts.map +1 -0
  100. package/dist/zod/form.zod.js +406 -0
  101. package/dist/zod/index.zod.d.ts +4985 -0
  102. package/dist/zod/index.zod.d.ts.map +1 -0
  103. package/dist/zod/index.zod.js +183 -0
  104. package/dist/zod/layout.zod.d.ts +1048 -0
  105. package/dist/zod/layout.zod.d.ts.map +1 -0
  106. package/dist/zod/layout.zod.js +241 -0
  107. package/dist/zod/navigation.zod.d.ts +486 -0
  108. package/dist/zod/navigation.zod.d.ts.map +1 -0
  109. package/dist/zod/navigation.zod.js +142 -0
  110. package/dist/zod/objectql.zod.d.ts +1261 -0
  111. package/dist/zod/objectql.zod.d.ts.map +1 -0
  112. package/dist/zod/objectql.zod.js +248 -0
  113. package/dist/zod/overlay.zod.d.ts +691 -0
  114. package/dist/zod/overlay.zod.d.ts.map +1 -0
  115. package/dist/zod/overlay.zod.js +179 -0
  116. package/dist/zod/reports.zod.d.ts +1628 -0
  117. package/dist/zod/reports.zod.d.ts.map +1 -0
  118. package/dist/zod/reports.zod.js +152 -0
  119. package/dist/zod/theme.zod.d.ts +611 -0
  120. package/dist/zod/theme.zod.d.ts.map +1 -0
  121. package/dist/zod/theme.zod.js +130 -0
  122. package/dist/zod/views.zod.d.ts +675 -0
  123. package/dist/zod/views.zod.d.ts.map +1 -0
  124. package/dist/zod/views.zod.js +159 -0
  125. package/package.json +9 -1
  126. package/src/__tests__/namespace-exports.test.ts +80 -0
  127. package/src/__tests__/phase2-schemas.test.ts +639 -0
  128. package/src/api-types.ts +8 -0
  129. package/src/app.ts +20 -0
  130. package/src/base.ts +8 -0
  131. package/src/blocks.ts +405 -0
  132. package/src/complex.ts +69 -1
  133. package/src/crud.ts +185 -3
  134. package/src/data-display.ts +60 -2
  135. package/src/data-protocol.ts +1679 -0
  136. package/src/data.ts +21 -1
  137. package/src/disclosure.ts +74 -1
  138. package/src/feedback.ts +76 -2
  139. package/src/field-types.ts +846 -0
  140. package/src/form.ts +131 -1
  141. package/src/index.ts +305 -8
  142. package/src/layout.ts +70 -15
  143. package/src/navigation.ts +109 -2
  144. package/src/objectql.ts +563 -59
  145. package/src/overlay.ts +35 -1
  146. package/src/plugin-scope.ts +210 -0
  147. package/src/registry.ts +8 -0
  148. package/src/reports.ts +408 -0
  149. package/src/theme.ts +351 -0
  150. package/src/ui-action.ts +276 -0
  151. package/src/views.ts +429 -0
  152. package/src/zod/README.md +329 -0
  153. package/src/zod/app.zod.ts +72 -0
  154. package/src/zod/base.zod.ts +229 -0
  155. package/src/zod/blocks.zod.ts +170 -0
  156. package/src/zod/complex.zod.ts +258 -0
  157. package/src/zod/crud.zod.ts +259 -0
  158. package/src/zod/data-display.zod.ts +290 -0
  159. package/src/zod/disclosure.zod.ts +92 -0
  160. package/src/zod/feedback.zod.ts +138 -0
  161. package/src/zod/form.zod.ts +434 -0
  162. package/src/zod/index.zod.ts +425 -0
  163. package/src/zod/layout.zod.ts +262 -0
  164. package/src/zod/navigation.zod.ts +159 -0
  165. package/src/zod/objectql.zod.ts +268 -0
  166. package/src/zod/overlay.zod.ts +196 -0
  167. package/src/zod/reports.zod.ts +183 -0
  168. package/src/zod/theme.zod.ts +155 -0
  169. package/src/zod/views.zod.ts +182 -0
package/src/theme.ts ADDED
@@ -0,0 +1,351 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ /**
10
+ * @object-ui/types - Theme Schema
11
+ *
12
+ * Defines theme configuration for dynamic theme switching and customization.
13
+ */
14
+
15
+ import type { BaseSchema } from './base';
16
+
17
+ /**
18
+ * Color Palette Definition
19
+ */
20
+ export interface ColorPalette {
21
+ /**
22
+ * Primary brand color
23
+ */
24
+ primary?: string;
25
+
26
+ /**
27
+ * Secondary color
28
+ */
29
+ secondary?: string;
30
+
31
+ /**
32
+ * Accent color
33
+ */
34
+ accent?: string;
35
+
36
+ /**
37
+ * Background color
38
+ */
39
+ background?: string;
40
+
41
+ /**
42
+ * Foreground/text color
43
+ */
44
+ foreground?: string;
45
+
46
+ /**
47
+ * Muted color (for less prominent elements)
48
+ */
49
+ muted?: string;
50
+
51
+ /**
52
+ * Muted foreground color
53
+ */
54
+ mutedForeground?: string;
55
+
56
+ /**
57
+ * Border color
58
+ */
59
+ border?: string;
60
+
61
+ /**
62
+ * Input border color
63
+ */
64
+ input?: string;
65
+
66
+ /**
67
+ * Ring/focus color
68
+ */
69
+ ring?: string;
70
+
71
+ /**
72
+ * Success color
73
+ */
74
+ success?: string;
75
+
76
+ /**
77
+ * Warning color
78
+ */
79
+ warning?: string;
80
+
81
+ /**
82
+ * Error/destructive color
83
+ */
84
+ destructive?: string;
85
+
86
+ /**
87
+ * Info color
88
+ */
89
+ info?: string;
90
+
91
+ /**
92
+ * Card background color
93
+ */
94
+ card?: string;
95
+
96
+ /**
97
+ * Card foreground color
98
+ */
99
+ cardForeground?: string;
100
+
101
+ /**
102
+ * Popover background color
103
+ */
104
+ popover?: string;
105
+
106
+ /**
107
+ * Popover foreground color
108
+ */
109
+ popoverForeground?: string;
110
+ }
111
+
112
+ /**
113
+ * Typography Configuration
114
+ */
115
+ export interface Typography {
116
+ /**
117
+ * Font family for sans-serif text
118
+ */
119
+ fontSans?: string[];
120
+
121
+ /**
122
+ * Font family for serif text
123
+ */
124
+ fontSerif?: string[];
125
+
126
+ /**
127
+ * Font family for monospace text
128
+ */
129
+ fontMono?: string[];
130
+
131
+ /**
132
+ * Base font size (in rem)
133
+ */
134
+ fontSize?: number;
135
+
136
+ /**
137
+ * Line height
138
+ */
139
+ lineHeight?: number;
140
+
141
+ /**
142
+ * Font weight for headings
143
+ */
144
+ headingWeight?: number;
145
+
146
+ /**
147
+ * Font weight for body text
148
+ */
149
+ bodyWeight?: number;
150
+ }
151
+
152
+ /**
153
+ * Spacing Scale Configuration
154
+ */
155
+ export interface SpacingScale {
156
+ /**
157
+ * Base spacing unit (in rem)
158
+ */
159
+ base?: number;
160
+
161
+ /**
162
+ * Custom spacing values
163
+ */
164
+ scale?: Record<string, string>;
165
+ }
166
+
167
+ /**
168
+ * Border Radius Configuration
169
+ */
170
+ export interface BorderRadius {
171
+ /**
172
+ * Small radius
173
+ */
174
+ sm?: string;
175
+
176
+ /**
177
+ * Default radius
178
+ */
179
+ default?: string;
180
+
181
+ /**
182
+ * Medium radius
183
+ */
184
+ md?: string;
185
+
186
+ /**
187
+ * Large radius
188
+ */
189
+ lg?: string;
190
+
191
+ /**
192
+ * Extra large radius
193
+ */
194
+ xl?: string;
195
+ }
196
+
197
+ /**
198
+ * Theme Mode
199
+ */
200
+ export type ThemeMode = 'light' | 'dark' | 'system';
201
+
202
+ /**
203
+ * Complete Theme Definition
204
+ */
205
+ export interface ThemeDefinition {
206
+ /**
207
+ * Theme name/identifier
208
+ */
209
+ name: string;
210
+
211
+ /**
212
+ * Theme display label
213
+ */
214
+ label?: string;
215
+
216
+ /**
217
+ * Light mode color palette
218
+ */
219
+ light?: ColorPalette;
220
+
221
+ /**
222
+ * Dark mode color palette
223
+ */
224
+ dark?: ColorPalette;
225
+
226
+ /**
227
+ * Typography configuration
228
+ */
229
+ typography?: Typography;
230
+
231
+ /**
232
+ * Spacing scale configuration
233
+ */
234
+ spacing?: SpacingScale;
235
+
236
+ /**
237
+ * Border radius configuration
238
+ */
239
+ radius?: BorderRadius;
240
+
241
+ /**
242
+ * Custom CSS variables
243
+ */
244
+ cssVariables?: Record<string, string>;
245
+
246
+ /**
247
+ * Tailwind configuration overrides
248
+ */
249
+ tailwind?: Record<string, any>;
250
+ }
251
+
252
+ /**
253
+ * Theme Schema - Theme configuration and switching
254
+ */
255
+ export interface ThemeSchema extends BaseSchema {
256
+ type: 'theme';
257
+
258
+ /**
259
+ * Current theme mode
260
+ */
261
+ mode?: ThemeMode;
262
+
263
+ /**
264
+ * Available themes
265
+ */
266
+ themes?: ThemeDefinition[];
267
+
268
+ /**
269
+ * Active theme name
270
+ */
271
+ activeTheme?: string;
272
+
273
+ /**
274
+ * Allow user theme switching
275
+ */
276
+ allowSwitching?: boolean;
277
+
278
+ /**
279
+ * Persist theme preference
280
+ */
281
+ persistPreference?: boolean;
282
+
283
+ /**
284
+ * Storage key for persisting theme
285
+ */
286
+ storageKey?: string;
287
+ }
288
+
289
+ /**
290
+ * Theme Switcher Component Schema
291
+ */
292
+ export interface ThemeSwitcherSchema extends BaseSchema {
293
+ type: 'theme-switcher';
294
+
295
+ /**
296
+ * Switcher variant
297
+ */
298
+ variant?: 'dropdown' | 'toggle' | 'buttons';
299
+
300
+ /**
301
+ * Show mode selector (light/dark)
302
+ */
303
+ showMode?: boolean;
304
+
305
+ /**
306
+ * Show theme selector
307
+ */
308
+ showThemes?: boolean;
309
+
310
+ /**
311
+ * Icon for light mode
312
+ */
313
+ lightIcon?: string;
314
+
315
+ /**
316
+ * Icon for dark mode
317
+ */
318
+ darkIcon?: string;
319
+ }
320
+
321
+ /**
322
+ * Theme Preview Component Schema
323
+ */
324
+ export interface ThemePreviewSchema extends BaseSchema {
325
+ type: 'theme-preview';
326
+
327
+ /**
328
+ * Theme to preview
329
+ */
330
+ theme?: ThemeDefinition;
331
+
332
+ /**
333
+ * Preview mode
334
+ */
335
+ mode?: ThemeMode;
336
+
337
+ /**
338
+ * Show color palette
339
+ */
340
+ showColors?: boolean;
341
+
342
+ /**
343
+ * Show typography samples
344
+ */
345
+ showTypography?: boolean;
346
+
347
+ /**
348
+ * Show component samples
349
+ */
350
+ showComponents?: boolean;
351
+ }
@@ -0,0 +1,276 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ /**
10
+ * @object-ui/types - UI Action Schema
11
+ *
12
+ * ObjectStack Spec v0.7.1 compliant action schema with enhanced capabilities:
13
+ * - Location-based action placement
14
+ * - Parameter collection
15
+ * - Conditional visibility and enablement
16
+ * - Rich feedback mechanisms
17
+ *
18
+ * @module ui-action
19
+ * @packageDocumentation
20
+ */
21
+
22
+ /**
23
+ * Field type for action parameters
24
+ * Simplified type definition for parameter inputs
25
+ */
26
+ export type ActionParamFieldType =
27
+ | 'text'
28
+ | 'textarea'
29
+ | 'number'
30
+ | 'boolean'
31
+ | 'date'
32
+ | 'datetime'
33
+ | 'time'
34
+ | 'select'
35
+ | 'email'
36
+ | 'phone'
37
+ | 'url'
38
+ | 'password'
39
+ | 'file'
40
+ | 'color'
41
+ | 'slider'
42
+ | 'rating';
43
+
44
+ /**
45
+ * Action placement locations (ObjectStack Spec v0.7.1)
46
+ */
47
+ export type ActionLocation =
48
+ | 'list_toolbar' // Top toolbar in list views
49
+ | 'list_item' // Per-item actions in list
50
+ | 'record_header' // Header area of record detail
51
+ | 'record_more' // More menu in record detail
52
+ | 'record_related' // Related lists section
53
+ | 'global_nav'; // Global navigation bar
54
+
55
+ /**
56
+ * Visual component type for actions (ObjectStack Spec v0.7.1)
57
+ */
58
+ export type ActionComponent =
59
+ | 'action:button' // Standard button
60
+ | 'action:icon' // Icon-only button
61
+ | 'action:menu' // Menu item
62
+ | 'action:group'; // Action group/dropdown
63
+
64
+ /**
65
+ * Action execution type (ObjectStack Spec v0.7.1)
66
+ */
67
+ export type ActionType =
68
+ | 'script' // Execute JavaScript/expression
69
+ | 'url' // Navigate to URL
70
+ | 'modal' // Open modal dialog
71
+ | 'flow' // Start workflow/automation
72
+ | 'api'; // Call API endpoint
73
+
74
+ /**
75
+ * Action parameter definition (ObjectStack Spec v0.7.1)
76
+ */
77
+ export interface ActionParam {
78
+ /** Parameter name (snake_case) */
79
+ name: string;
80
+
81
+ /** Display label */
82
+ label: string;
83
+
84
+ /** Field type for input */
85
+ type: ActionParamFieldType;
86
+
87
+ /** Whether parameter is required */
88
+ required?: boolean;
89
+
90
+ /** Options for select/picklist types */
91
+ options?: Array<{ label: string; value: string }>;
92
+
93
+ /** Default value */
94
+ defaultValue?: unknown;
95
+
96
+ /** Help text */
97
+ helpText?: string;
98
+
99
+ /** Placeholder text */
100
+ placeholder?: string;
101
+
102
+ /** Validation expression */
103
+ validation?: string;
104
+ }
105
+
106
+ /**
107
+ * Enhanced Action Schema (ObjectStack Spec v0.7.1)
108
+ *
109
+ * This is the primary action schema that should be used for all new implementations.
110
+ * The legacy ActionSchema in crud.ts is maintained for backward compatibility.
111
+ */
112
+ export interface ActionSchema {
113
+ /** Unique action identifier (snake_case) */
114
+ name: string;
115
+
116
+ /** Display label */
117
+ label: string;
118
+
119
+ /** Optional icon (Lucide icon name) */
120
+ icon?: string;
121
+
122
+ // === Placement ===
123
+
124
+ /** Where to show this action (defaults to ['record_header']) */
125
+ locations?: ActionLocation[];
126
+
127
+ /** Visual component type (defaults to 'action:button') */
128
+ component?: ActionComponent;
129
+
130
+ // === Behavior ===
131
+
132
+ /** Action execution type */
133
+ type: ActionType;
134
+
135
+ /** Target for the action (URL, script name, etc.) */
136
+ target?: string;
137
+
138
+ /** Script to execute (for type: 'script') */
139
+ execute?: string;
140
+
141
+ /** API endpoint (for type: 'api') */
142
+ endpoint?: string;
143
+
144
+ /** HTTP method (for type: 'api') */
145
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
146
+
147
+ // === Parameters ===
148
+
149
+ /** Input parameters to collect before execution */
150
+ params?: ActionParam[];
151
+
152
+ // === Feedback ===
153
+
154
+ /** Confirmation text to show before execution */
155
+ confirmText?: string;
156
+
157
+ /** Success message to show after execution */
158
+ successMessage?: string;
159
+
160
+ /** Error message to show on failure */
161
+ errorMessage?: string;
162
+
163
+ /** Whether to refresh data after execution */
164
+ refreshAfter?: boolean;
165
+
166
+ /** Toast notification configuration */
167
+ toast?: {
168
+ /** Show toast on success */
169
+ showOnSuccess?: boolean;
170
+
171
+ /** Show toast on error */
172
+ showOnError?: boolean;
173
+
174
+ /** Toast duration in milliseconds */
175
+ duration?: number;
176
+ };
177
+
178
+ // === Conditional ===
179
+
180
+ /** Expression controlling visibility (e.g., "status === 'draft'") */
181
+ visible?: string;
182
+
183
+ /** Expression controlling enabled state (e.g., "hasPermission('edit')") */
184
+ enabled?: string;
185
+
186
+ // === Styling ===
187
+
188
+ /** Button variant */
189
+ variant?: 'default' | 'primary' | 'secondary' | 'destructive' | 'outline' | 'ghost';
190
+
191
+ /** Button size */
192
+ size?: 'sm' | 'md' | 'lg';
193
+
194
+ /** Custom CSS class */
195
+ className?: string;
196
+
197
+ // === Metadata ===
198
+
199
+ /** Action description */
200
+ description?: string;
201
+
202
+ /** Permission required to execute */
203
+ permission?: string;
204
+
205
+ /** Tags for categorization */
206
+ tags?: string[];
207
+ }
208
+
209
+ /**
210
+ * Action group for organizing related actions
211
+ */
212
+ export interface ActionGroup {
213
+ /** Group name */
214
+ name: string;
215
+
216
+ /** Display label */
217
+ label: string;
218
+
219
+ /** Optional icon */
220
+ icon?: string;
221
+
222
+ /** Actions in this group */
223
+ actions: ActionSchema[];
224
+
225
+ /** Group visibility condition */
226
+ visible?: string;
227
+
228
+ /** Display as dropdown or inline */
229
+ display?: 'dropdown' | 'inline';
230
+ }
231
+
232
+ /**
233
+ * Action execution context
234
+ */
235
+ export interface ActionContext {
236
+ /** Current record data */
237
+ record?: Record<string, any>;
238
+
239
+ /** Selected records (for list actions) */
240
+ selectedRecords?: Record<string, any>[];
241
+
242
+ /** Current user */
243
+ user?: Record<string, any>;
244
+
245
+ /** Additional context data */
246
+ [key: string]: any;
247
+ }
248
+
249
+ /**
250
+ * Action execution result
251
+ */
252
+ export interface ActionResult {
253
+ /** Whether action succeeded */
254
+ success: boolean;
255
+
256
+ /** Result data */
257
+ data?: any;
258
+
259
+ /** Error message if failed */
260
+ error?: string;
261
+
262
+ /** Whether to refresh data */
263
+ refresh?: boolean;
264
+
265
+ /** Whether to close dialog/modal */
266
+ close?: boolean;
267
+ }
268
+
269
+ /**
270
+ * Action executor function type
271
+ */
272
+ export type ActionExecutor = (
273
+ action: ActionSchema,
274
+ context: ActionContext,
275
+ params?: Record<string, any>
276
+ ) => Promise<ActionResult>;