@object-ui/types 2.0.0 → 3.0.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/dist/complex.d.ts +2 -0
- package/dist/complex.d.ts.map +1 -1
- package/dist/data-display.d.ts +5 -0
- package/dist/data-display.d.ts.map +1 -1
- package/dist/data.d.ts +9 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/index.d.ts +14 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/objectql.d.ts +13 -1
- package/dist/objectql.d.ts.map +1 -1
- package/dist/views.d.ts +10 -0
- package/dist/views.d.ts.map +1 -1
- package/dist/zod/blocks.zod.d.ts +2 -2
- package/dist/zod/blocks.zod.d.ts.map +1 -1
- package/dist/zod/blocks.zod.js +1 -1
- package/dist/zod/complex.zod.d.ts +2 -2
- package/dist/zod/complex.zod.d.ts.map +1 -1
- package/dist/zod/complex.zod.js +1 -1
- package/dist/zod/data-display.zod.d.ts +2 -2
- package/dist/zod/data-display.zod.d.ts.map +1 -1
- package/dist/zod/data-display.zod.js +1 -1
- package/dist/zod/disclosure.zod.d.ts +2 -2
- package/dist/zod/disclosure.zod.d.ts.map +1 -1
- package/dist/zod/disclosure.zod.js +1 -1
- package/dist/zod/feedback.zod.d.ts +2 -2
- package/dist/zod/feedback.zod.d.ts.map +1 -1
- package/dist/zod/feedback.zod.js +1 -1
- package/dist/zod/form.zod.d.ts +2 -2
- package/dist/zod/form.zod.d.ts.map +1 -1
- package/dist/zod/form.zod.js +1 -1
- package/dist/zod/index.zod.d.ts +14 -14
- package/dist/zod/index.zod.d.ts.map +1 -1
- package/dist/zod/layout.zod.d.ts +2 -2
- package/dist/zod/layout.zod.d.ts.map +1 -1
- package/dist/zod/layout.zod.js +1 -1
- package/dist/zod/navigation.zod.d.ts +2 -2
- package/dist/zod/navigation.zod.d.ts.map +1 -1
- package/dist/zod/navigation.zod.js +1 -1
- package/dist/zod/overlay.zod.d.ts +2 -2
- package/dist/zod/overlay.zod.d.ts.map +1 -1
- package/dist/zod/overlay.zod.js +1 -1
- package/dist/zod/reports.zod.d.ts +2 -2
- package/dist/zod/reports.zod.d.ts.map +1 -1
- package/dist/zod/reports.zod.js +1 -1
- package/dist/zod/theme.zod.d.ts +2 -2
- package/dist/zod/theme.zod.d.ts.map +1 -1
- package/dist/zod/theme.zod.js +1 -1
- package/dist/zod/views.zod.d.ts +2 -2
- package/dist/zod/views.zod.d.ts.map +1 -1
- package/dist/zod/views.zod.js +1 -1
- package/package.json +2 -2
- package/src/__tests__/namespace-exports.test.ts +3 -4
- package/src/complex.ts +2 -0
- package/src/data-display.ts +5 -0
- package/src/data.ts +10 -0
- package/src/index.ts +181 -4
- package/src/objectql.ts +16 -0
- package/src/views.ts +10 -0
- package/src/zod/blocks.zod.ts +1 -1
- package/src/zod/complex.zod.ts +1 -1
- package/src/zod/data-display.zod.ts +1 -1
- package/src/zod/disclosure.zod.ts +1 -1
- package/src/zod/feedback.zod.ts +1 -1
- package/src/zod/form.zod.ts +1 -1
- package/src/zod/layout.zod.ts +1 -1
- package/src/zod/navigation.zod.ts +1 -1
- package/src/zod/overlay.zod.ts +1 -1
- package/src/zod/reports.zod.ts +1 -1
- package/src/zod/theme.zod.ts +1 -1
- package/src/zod/views.zod.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -788,7 +788,7 @@ export type {
|
|
|
788
788
|
System,
|
|
789
789
|
AI,
|
|
790
790
|
API,
|
|
791
|
-
|
|
791
|
+
Cloud,
|
|
792
792
|
Automation,
|
|
793
793
|
Shared,
|
|
794
794
|
QA,
|
|
@@ -801,14 +801,14 @@ export type {
|
|
|
801
801
|
} from '@objectstack/spec';
|
|
802
802
|
|
|
803
803
|
// ============================================================================
|
|
804
|
-
// ObjectStack Protocol Utilities - defineStack
|
|
804
|
+
// ObjectStack Protocol Utilities - defineStack
|
|
805
805
|
// ============================================================================
|
|
806
806
|
/**
|
|
807
807
|
* Re-export ObjectStack Protocol utility functions and top-level types.
|
|
808
808
|
*
|
|
809
809
|
* @example
|
|
810
810
|
* ```typescript
|
|
811
|
-
* import { defineStack
|
|
811
|
+
* import { defineStack } from '@object-ui/types';
|
|
812
812
|
*
|
|
813
813
|
* export default defineStack({
|
|
814
814
|
* manifest: { id: 'com.example.app', version: '1.0.0', type: 'app', name: 'My App' },
|
|
@@ -819,7 +819,6 @@ export type {
|
|
|
819
819
|
*/
|
|
820
820
|
export {
|
|
821
821
|
defineStack,
|
|
822
|
-
definePlugin,
|
|
823
822
|
ObjectStackSchema,
|
|
824
823
|
ObjectStackDefinitionSchema,
|
|
825
824
|
ObjectStackCapabilitiesSchema,
|
|
@@ -838,6 +837,184 @@ export type {
|
|
|
838
837
|
ObjectUICapabilities,
|
|
839
838
|
} from '@objectstack/spec';
|
|
840
839
|
|
|
840
|
+
// ============================================================================
|
|
841
|
+
// v2.0.7 Spec UI Types — Drag and Drop
|
|
842
|
+
// ============================================================================
|
|
843
|
+
export type {
|
|
844
|
+
DndConfig,
|
|
845
|
+
DndConfigSchema,
|
|
846
|
+
DragItem,
|
|
847
|
+
DragItemSchema,
|
|
848
|
+
DropZone,
|
|
849
|
+
DropZoneSchema,
|
|
850
|
+
DragConstraint,
|
|
851
|
+
DragConstraintSchema,
|
|
852
|
+
DragHandle,
|
|
853
|
+
DragHandleSchema,
|
|
854
|
+
DropEffect,
|
|
855
|
+
DropEffectSchema,
|
|
856
|
+
} from '@objectstack/spec/ui';
|
|
857
|
+
|
|
858
|
+
// ============================================================================
|
|
859
|
+
// v2.0.7 Spec UI Types — Focus & Keyboard Navigation
|
|
860
|
+
// ============================================================================
|
|
861
|
+
export type {
|
|
862
|
+
FocusManagement,
|
|
863
|
+
FocusManagementSchema,
|
|
864
|
+
FocusTrapConfig,
|
|
865
|
+
FocusTrapConfigSchema,
|
|
866
|
+
KeyboardNavigationConfig,
|
|
867
|
+
KeyboardNavigationConfigSchema,
|
|
868
|
+
KeyboardShortcut,
|
|
869
|
+
KeyboardShortcutSchema,
|
|
870
|
+
} from '@objectstack/spec/ui';
|
|
871
|
+
|
|
872
|
+
// ============================================================================
|
|
873
|
+
// v2.0.7 Spec UI Types — Animation & Motion
|
|
874
|
+
// ============================================================================
|
|
875
|
+
export type {
|
|
876
|
+
ComponentAnimation,
|
|
877
|
+
ComponentAnimationSchema,
|
|
878
|
+
AnimationTrigger,
|
|
879
|
+
AnimationTriggerSchema,
|
|
880
|
+
MotionConfig,
|
|
881
|
+
MotionConfigSchema,
|
|
882
|
+
TransitionConfig,
|
|
883
|
+
TransitionConfigSchema,
|
|
884
|
+
TransitionPreset,
|
|
885
|
+
TransitionPresetSchema,
|
|
886
|
+
EasingFunction,
|
|
887
|
+
EasingFunctionSchema,
|
|
888
|
+
} from '@objectstack/spec/ui';
|
|
889
|
+
|
|
890
|
+
// ============================================================================
|
|
891
|
+
// v2.0.7 Spec UI Types — Notifications
|
|
892
|
+
// ============================================================================
|
|
893
|
+
export type {
|
|
894
|
+
Notification,
|
|
895
|
+
NotificationSchema,
|
|
896
|
+
NotificationConfig,
|
|
897
|
+
NotificationConfigSchema,
|
|
898
|
+
NotificationAction,
|
|
899
|
+
NotificationActionSchema,
|
|
900
|
+
NotificationPosition,
|
|
901
|
+
NotificationPositionSchema,
|
|
902
|
+
NotificationSeverity,
|
|
903
|
+
NotificationSeveritySchema,
|
|
904
|
+
NotificationType,
|
|
905
|
+
NotificationTypeSchema,
|
|
906
|
+
} from '@objectstack/spec/ui';
|
|
907
|
+
|
|
908
|
+
// ============================================================================
|
|
909
|
+
// v2.0.7 Spec UI Types — Gestures & Touch
|
|
910
|
+
// ============================================================================
|
|
911
|
+
export type {
|
|
912
|
+
GestureConfig as SpecGestureConfig,
|
|
913
|
+
GestureConfigSchema as SpecGestureConfigSchema,
|
|
914
|
+
GestureType as SpecGestureType,
|
|
915
|
+
GestureTypeSchema as SpecGestureTypeSchema,
|
|
916
|
+
SwipeGestureConfig,
|
|
917
|
+
SwipeGestureConfigSchema,
|
|
918
|
+
SwipeDirection,
|
|
919
|
+
SwipeDirectionSchema,
|
|
920
|
+
PinchGestureConfig,
|
|
921
|
+
PinchGestureConfigSchema,
|
|
922
|
+
LongPressGestureConfig,
|
|
923
|
+
LongPressGestureConfigSchema,
|
|
924
|
+
TouchInteraction,
|
|
925
|
+
TouchInteractionSchema,
|
|
926
|
+
TouchTargetConfig,
|
|
927
|
+
TouchTargetConfigSchema,
|
|
928
|
+
} from '@objectstack/spec/ui';
|
|
929
|
+
|
|
930
|
+
// ============================================================================
|
|
931
|
+
// v2.0.7 Spec UI Types — Offline & Sync
|
|
932
|
+
// ============================================================================
|
|
933
|
+
export type {
|
|
934
|
+
OfflineConfig as SpecOfflineConfig,
|
|
935
|
+
OfflineConfigSchema as SpecOfflineConfigSchema,
|
|
936
|
+
OfflineCacheConfig,
|
|
937
|
+
OfflineCacheConfigSchema,
|
|
938
|
+
OfflineStrategy,
|
|
939
|
+
OfflineStrategySchema,
|
|
940
|
+
SyncConfig,
|
|
941
|
+
SyncConfigSchema,
|
|
942
|
+
ConflictResolution,
|
|
943
|
+
ConflictResolutionSchema,
|
|
944
|
+
PersistStorage,
|
|
945
|
+
PersistStorageSchema,
|
|
946
|
+
EvictionPolicy,
|
|
947
|
+
EvictionPolicySchema,
|
|
948
|
+
} from '@objectstack/spec/ui';
|
|
949
|
+
|
|
950
|
+
// ============================================================================
|
|
951
|
+
// v2.0.7 Spec UI Types — View Enhancements
|
|
952
|
+
// ============================================================================
|
|
953
|
+
export type {
|
|
954
|
+
ColumnSummary,
|
|
955
|
+
ColumnSummarySchema,
|
|
956
|
+
GalleryConfig,
|
|
957
|
+
GalleryConfigSchema,
|
|
958
|
+
GroupingConfig,
|
|
959
|
+
GroupingConfigSchema,
|
|
960
|
+
RowColorConfig,
|
|
961
|
+
RowColorConfigSchema,
|
|
962
|
+
RowHeight,
|
|
963
|
+
RowHeightSchema,
|
|
964
|
+
DensityMode,
|
|
965
|
+
ViewSharing,
|
|
966
|
+
ViewSharingSchema,
|
|
967
|
+
} from '@objectstack/spec/ui';
|
|
968
|
+
|
|
969
|
+
// ============================================================================
|
|
970
|
+
// v2.0.7 Spec UI Types — Performance & Page Transitions
|
|
971
|
+
// ============================================================================
|
|
972
|
+
export type {
|
|
973
|
+
PerformanceConfig,
|
|
974
|
+
PerformanceConfigSchema,
|
|
975
|
+
PageTransition,
|
|
976
|
+
PageTransitionSchema,
|
|
977
|
+
PageComponentType,
|
|
978
|
+
} from '@objectstack/spec/ui';
|
|
979
|
+
|
|
980
|
+
// ============================================================================
|
|
981
|
+
// v2.0.7 Spec UI Types — Accessibility
|
|
982
|
+
// ============================================================================
|
|
983
|
+
export type {
|
|
984
|
+
AriaProps,
|
|
985
|
+
AriaPropsSchema,
|
|
986
|
+
WcagContrastLevel,
|
|
987
|
+
} from '@objectstack/spec/ui';
|
|
988
|
+
|
|
989
|
+
// ============================================================================
|
|
990
|
+
// v2.0.7 Spec UI Types — I18n
|
|
991
|
+
// ============================================================================
|
|
992
|
+
export type {
|
|
993
|
+
I18nLabel,
|
|
994
|
+
I18nLabelSchema,
|
|
995
|
+
I18nObject,
|
|
996
|
+
I18nObjectSchema,
|
|
997
|
+
LocaleConfig,
|
|
998
|
+
LocaleConfigSchema,
|
|
999
|
+
PluralRule,
|
|
1000
|
+
PluralRuleSchema,
|
|
1001
|
+
DateFormat,
|
|
1002
|
+
DateFormatSchema,
|
|
1003
|
+
NumberFormat,
|
|
1004
|
+
NumberFormatSchema,
|
|
1005
|
+
} from '@objectstack/spec/ui';
|
|
1006
|
+
|
|
1007
|
+
// ============================================================================
|
|
1008
|
+
// v2.0.7 Spec UI Types — Responsive Design
|
|
1009
|
+
// ============================================================================
|
|
1010
|
+
export type {
|
|
1011
|
+
ResponsiveConfig as SpecResponsiveConfig,
|
|
1012
|
+
ResponsiveConfigSchema as SpecResponsiveConfigSchema,
|
|
1013
|
+
BreakpointColumnMapSchema,
|
|
1014
|
+
BreakpointOrderMapSchema,
|
|
1015
|
+
BreakpointName as SpecBreakpointName,
|
|
1016
|
+
} from '@objectstack/spec/ui';
|
|
1017
|
+
|
|
841
1018
|
// ============================================================================
|
|
842
1019
|
// Widget System - Runtime Widget Registration (Section 1.6)
|
|
843
1020
|
// ============================================================================
|
package/src/objectql.ts
CHANGED
|
@@ -76,6 +76,8 @@ import type {
|
|
|
76
76
|
ListColumn,
|
|
77
77
|
SelectionConfig,
|
|
78
78
|
PaginationConfig,
|
|
79
|
+
GroupingConfig,
|
|
80
|
+
RowColorConfig,
|
|
79
81
|
} from '@objectstack/spec/ui';
|
|
80
82
|
|
|
81
83
|
/**
|
|
@@ -383,6 +385,20 @@ export interface ObjectGridSchema extends BaseSchema {
|
|
|
383
385
|
*/
|
|
384
386
|
editable?: boolean;
|
|
385
387
|
|
|
388
|
+
/**
|
|
389
|
+
* Grouping Configuration (Airtable-style)
|
|
390
|
+
* Groups rows by specified fields with collapsible sections.
|
|
391
|
+
* Aligned with @objectstack/spec GroupingConfigSchema.
|
|
392
|
+
*/
|
|
393
|
+
grouping?: GroupingConfig;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Row Color Configuration (Airtable-style)
|
|
397
|
+
* Colors rows based on field values.
|
|
398
|
+
* Aligned with @objectstack/spec RowColorConfigSchema.
|
|
399
|
+
*/
|
|
400
|
+
rowColor?: RowColorConfig;
|
|
401
|
+
|
|
386
402
|
/**
|
|
387
403
|
* Enable keyboard navigation (Grid mode)
|
|
388
404
|
* Arrow keys, Tab, Enter for cell navigation
|
package/src/views.ts
CHANGED
|
@@ -104,6 +104,16 @@ export interface DetailViewSection {
|
|
|
104
104
|
* Section visibility condition
|
|
105
105
|
*/
|
|
106
106
|
visible?: boolean | string;
|
|
107
|
+
/**
|
|
108
|
+
* Show border around section
|
|
109
|
+
* @default true
|
|
110
|
+
*/
|
|
111
|
+
showBorder?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Header background color (Tailwind class)
|
|
114
|
+
* @example 'muted', 'primary/10'
|
|
115
|
+
*/
|
|
116
|
+
headerColor?: string;
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
/**
|
package/src/zod/blocks.zod.ts
CHANGED
|
@@ -148,7 +148,7 @@ export const ComponentSchema = BaseSchema.extend({
|
|
|
148
148
|
/**
|
|
149
149
|
* Union of all block schemas
|
|
150
150
|
*/
|
|
151
|
-
export const BlockComponentSchema = z.
|
|
151
|
+
export const BlockComponentSchema = z.discriminatedUnion('type', [
|
|
152
152
|
BlockSchema,
|
|
153
153
|
BlockLibrarySchema,
|
|
154
154
|
BlockEditorSchema,
|
package/src/zod/complex.zod.ts
CHANGED
|
@@ -248,7 +248,7 @@ export const DashboardSchema = BaseSchema.extend({
|
|
|
248
248
|
/**
|
|
249
249
|
* Complex Schema Union - All complex component schemas
|
|
250
250
|
*/
|
|
251
|
-
export const ComplexSchema = z.
|
|
251
|
+
export const ComplexSchema = z.discriminatedUnion('type', [
|
|
252
252
|
KanbanSchema,
|
|
253
253
|
CalendarViewSchema,
|
|
254
254
|
FilterBuilderSchema,
|
|
@@ -273,7 +273,7 @@ export const HtmlSchema = BaseSchema.extend({
|
|
|
273
273
|
/**
|
|
274
274
|
* Data Display Schema Union - All data display component schemas
|
|
275
275
|
*/
|
|
276
|
-
export const DataDisplaySchema = z.
|
|
276
|
+
export const DataDisplaySchema = z.discriminatedUnion('type', [
|
|
277
277
|
AlertSchema,
|
|
278
278
|
StatisticSchema,
|
|
279
279
|
BadgeSchema,
|
|
@@ -85,7 +85,7 @@ export const ToggleGroupSchema = BaseSchema.extend({
|
|
|
85
85
|
/**
|
|
86
86
|
* Disclosure Schema Union - All disclosure component schemas
|
|
87
87
|
*/
|
|
88
|
-
export const DisclosureSchema = z.
|
|
88
|
+
export const DisclosureSchema = z.discriminatedUnion('type', [
|
|
89
89
|
AccordionSchema,
|
|
90
90
|
CollapsibleSchema,
|
|
91
91
|
ToggleGroupSchema,
|
package/src/zod/feedback.zod.ts
CHANGED
|
@@ -126,7 +126,7 @@ export const SonnerSchema = BaseSchema.extend({
|
|
|
126
126
|
/**
|
|
127
127
|
* Feedback Schema Union - All feedback component schemas
|
|
128
128
|
*/
|
|
129
|
-
export const FeedbackSchema = z.
|
|
129
|
+
export const FeedbackSchema = z.discriminatedUnion('type', [
|
|
130
130
|
LoadingSchema,
|
|
131
131
|
ProgressSchema,
|
|
132
132
|
SkeletonSchema,
|
package/src/zod/form.zod.ts
CHANGED
|
@@ -413,7 +413,7 @@ export const FormSchema = BaseSchema.extend({
|
|
|
413
413
|
/**
|
|
414
414
|
* Form Component Schema Union - All form component schemas
|
|
415
415
|
*/
|
|
416
|
-
export const FormComponentSchema = z.
|
|
416
|
+
export const FormComponentSchema = z.discriminatedUnion('type', [
|
|
417
417
|
ButtonSchema,
|
|
418
418
|
InputSchema,
|
|
419
419
|
TextareaSchema,
|
package/src/zod/layout.zod.ts
CHANGED
|
@@ -280,7 +280,7 @@ export const PageSchema = BaseSchema.extend({
|
|
|
280
280
|
/**
|
|
281
281
|
* Layout Schema Union - All layout component schemas
|
|
282
282
|
*/
|
|
283
|
-
export const LayoutSchema = z.
|
|
283
|
+
export const LayoutSchema = z.discriminatedUnion('type', [
|
|
284
284
|
DivSchema,
|
|
285
285
|
SpanSchema,
|
|
286
286
|
TextSchema,
|
|
@@ -149,7 +149,7 @@ export const ButtonGroupSchema = BaseSchema.extend({
|
|
|
149
149
|
/**
|
|
150
150
|
* Navigation Schema Union - All navigation component schemas
|
|
151
151
|
*/
|
|
152
|
-
export const NavigationSchema = z.
|
|
152
|
+
export const NavigationSchema = z.discriminatedUnion('type', [
|
|
153
153
|
HeaderBarSchema,
|
|
154
154
|
SidebarSchema,
|
|
155
155
|
BreadcrumbSchema,
|
package/src/zod/overlay.zod.ts
CHANGED
|
@@ -182,7 +182,7 @@ export const MenubarSchema = BaseSchema.extend({
|
|
|
182
182
|
/**
|
|
183
183
|
* Overlay Schema Union - All overlay component schemas
|
|
184
184
|
*/
|
|
185
|
-
export const OverlaySchema = z.
|
|
185
|
+
export const OverlaySchema = z.discriminatedUnion('type', [
|
|
186
186
|
DialogSchema,
|
|
187
187
|
AlertDialogSchema,
|
|
188
188
|
SheetSchema,
|
package/src/zod/reports.zod.ts
CHANGED
|
@@ -160,7 +160,7 @@ export const ReportViewerSchema = BaseSchema.extend({
|
|
|
160
160
|
/**
|
|
161
161
|
* Union of all report schemas
|
|
162
162
|
*/
|
|
163
|
-
export const ReportComponentSchema = z.
|
|
163
|
+
export const ReportComponentSchema = z.discriminatedUnion('type', [
|
|
164
164
|
ReportSchema,
|
|
165
165
|
ReportBuilderSchema,
|
|
166
166
|
ReportViewerSchema,
|
package/src/zod/theme.zod.ts
CHANGED
|
@@ -266,7 +266,7 @@ export const ThemeSchema = ThemeComponentSchema;
|
|
|
266
266
|
/**
|
|
267
267
|
* Union of all theme component schemas (for AnyComponentSchema union).
|
|
268
268
|
*/
|
|
269
|
-
export const ThemeUnionSchema = z.
|
|
269
|
+
export const ThemeUnionSchema = z.discriminatedUnion('type', [
|
|
270
270
|
ThemeComponentSchema,
|
|
271
271
|
ThemeSwitcherSchema,
|
|
272
272
|
ThemePreviewSchema,
|
package/src/zod/views.zod.ts
CHANGED
|
@@ -162,7 +162,7 @@ export const SortUISchema = BaseSchema.extend({
|
|
|
162
162
|
/**
|
|
163
163
|
* Union of all view schemas
|
|
164
164
|
*/
|
|
165
|
-
export const ViewComponentSchema = z.
|
|
165
|
+
export const ViewComponentSchema = z.discriminatedUnion('type', [
|
|
166
166
|
DetailViewSchema,
|
|
167
167
|
ViewSwitcherSchema,
|
|
168
168
|
FilterUISchema,
|