@object-ui/types 0.3.1 → 2.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.
Files changed (141) hide show
  1. package/README.md +1 -1
  2. package/dist/ai.d.ts +376 -0
  3. package/dist/ai.d.ts.map +1 -0
  4. package/dist/ai.js +8 -0
  5. package/dist/app.d.ts +10 -0
  6. package/dist/app.d.ts.map +1 -1
  7. package/dist/blocks.d.ts +332 -0
  8. package/dist/blocks.d.ts.map +1 -0
  9. package/dist/blocks.js +8 -0
  10. package/dist/crud.d.ts +177 -3
  11. package/dist/crud.d.ts.map +1 -1
  12. package/dist/data-display.d.ts +35 -0
  13. package/dist/data-display.d.ts.map +1 -1
  14. package/dist/data-protocol.d.ts +1268 -0
  15. package/dist/data-protocol.d.ts.map +1 -0
  16. package/dist/data-protocol.js +8 -0
  17. package/dist/data.d.ts +74 -1
  18. package/dist/data.d.ts.map +1 -1
  19. package/dist/designer.d.ts +473 -0
  20. package/dist/designer.d.ts.map +1 -0
  21. package/dist/designer.js +8 -0
  22. package/dist/field-types.d.ts +353 -11
  23. package/dist/field-types.d.ts.map +1 -1
  24. package/dist/form.d.ts +35 -1
  25. package/dist/form.d.ts.map +1 -1
  26. package/dist/index.d.ts +58 -4
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +18 -0
  29. package/dist/layout.d.ts +63 -8
  30. package/dist/layout.d.ts.map +1 -1
  31. package/dist/mobile.d.ts +186 -0
  32. package/dist/mobile.d.ts.map +1 -0
  33. package/dist/mobile.js +8 -0
  34. package/dist/objectql.d.ts +337 -89
  35. package/dist/objectql.d.ts.map +1 -1
  36. package/dist/permissions.d.ts +150 -0
  37. package/dist/permissions.d.ts.map +1 -0
  38. package/dist/permissions.js +8 -0
  39. package/dist/plugin-scope.d.ts +194 -0
  40. package/dist/plugin-scope.d.ts.map +1 -0
  41. package/dist/plugin-scope.js +8 -0
  42. package/dist/reports.d.ts +336 -0
  43. package/dist/reports.d.ts.map +1 -0
  44. package/dist/reports.js +8 -0
  45. package/dist/tenant.d.ts +138 -0
  46. package/dist/tenant.d.ts.map +1 -0
  47. package/dist/tenant.js +8 -0
  48. package/dist/theme.d.ts +180 -0
  49. package/dist/theme.d.ts.map +1 -0
  50. package/dist/theme.js +8 -0
  51. package/dist/ui-action.d.ts +290 -0
  52. package/dist/ui-action.d.ts.map +1 -0
  53. package/dist/ui-action.js +8 -0
  54. package/dist/views.d.ts +427 -0
  55. package/dist/views.d.ts.map +1 -0
  56. package/dist/views.js +8 -0
  57. package/dist/widget.d.ts +181 -0
  58. package/dist/widget.d.ts.map +1 -0
  59. package/dist/widget.js +8 -0
  60. package/dist/workflow.d.ts +340 -0
  61. package/dist/workflow.d.ts.map +1 -0
  62. package/dist/workflow.js +8 -0
  63. package/dist/zod/app.zod.d.ts +120 -0
  64. package/dist/zod/app.zod.d.ts.map +1 -0
  65. package/dist/zod/app.zod.js +60 -0
  66. package/dist/zod/blocks.zod.d.ts +834 -0
  67. package/dist/zod/blocks.zod.d.ts.map +1 -0
  68. package/dist/zod/blocks.zod.js +145 -0
  69. package/dist/zod/complex.zod.d.ts +4 -4
  70. package/dist/zod/complex.zod.js +1 -1
  71. package/dist/zod/crud.zod.d.ts +598 -0
  72. package/dist/zod/crud.zod.d.ts.map +1 -0
  73. package/dist/zod/crud.zod.js +230 -0
  74. package/dist/zod/data-display.zod.js +1 -1
  75. package/dist/zod/disclosure.zod.js +1 -1
  76. package/dist/zod/feedback.zod.d.ts +10 -10
  77. package/dist/zod/feedback.zod.js +1 -1
  78. package/dist/zod/form.zod.d.ts +4 -4
  79. package/dist/zod/form.zod.js +1 -1
  80. package/dist/zod/index.zod.d.ts +2032 -30
  81. package/dist/zod/index.zod.d.ts.map +1 -1
  82. package/dist/zod/index.zod.js +96 -19
  83. package/dist/zod/layout.zod.d.ts +134 -2
  84. package/dist/zod/layout.zod.d.ts.map +1 -1
  85. package/dist/zod/layout.zod.js +35 -1
  86. package/dist/zod/navigation.zod.js +1 -1
  87. package/dist/zod/objectql.zod.d.ts +34 -18
  88. package/dist/zod/objectql.zod.d.ts.map +1 -1
  89. package/dist/zod/objectql.zod.js +9 -1
  90. package/dist/zod/overlay.zod.js +1 -1
  91. package/dist/zod/reports.zod.d.ts +1628 -0
  92. package/dist/zod/reports.zod.d.ts.map +1 -0
  93. package/dist/zod/reports.zod.js +152 -0
  94. package/dist/zod/theme.zod.d.ts +1292 -0
  95. package/dist/zod/theme.zod.d.ts.map +1 -0
  96. package/dist/zod/theme.zod.js +260 -0
  97. package/dist/zod/views.zod.d.ts +675 -0
  98. package/dist/zod/views.zod.d.ts.map +1 -0
  99. package/dist/zod/views.zod.js +159 -0
  100. package/package.json +3 -2
  101. package/src/__tests__/namespace-exports.test.ts +36 -0
  102. package/src/__tests__/phase2-schemas.test.ts +634 -0
  103. package/src/ai.ts +454 -0
  104. package/src/app.ts +12 -0
  105. package/src/blocks.ts +405 -0
  106. package/src/crud.ts +180 -3
  107. package/src/data-display.ts +31 -0
  108. package/src/data-protocol.ts +1679 -0
  109. package/src/data.ts +84 -1
  110. package/src/designer.ts +509 -0
  111. package/src/field-types.ts +392 -11
  112. package/src/form.ts +35 -1
  113. package/src/index.ts +426 -0
  114. package/src/layout.ts +66 -8
  115. package/src/mobile.ts +205 -0
  116. package/src/objectql.ts +412 -94
  117. package/src/permissions.ts +166 -0
  118. package/src/plugin-scope.ts +210 -0
  119. package/src/reports.ts +408 -0
  120. package/src/tenant.ts +153 -0
  121. package/src/theme.ts +238 -0
  122. package/src/ui-action.ts +415 -0
  123. package/src/views.ts +436 -0
  124. package/src/widget.ts +197 -0
  125. package/src/workflow.ts +409 -0
  126. package/src/zod/app.zod.ts +72 -0
  127. package/src/zod/blocks.zod.ts +170 -0
  128. package/src/zod/complex.zod.ts +1 -1
  129. package/src/zod/crud.zod.ts +259 -0
  130. package/src/zod/data-display.zod.ts +1 -1
  131. package/src/zod/disclosure.zod.ts +1 -1
  132. package/src/zod/feedback.zod.ts +1 -1
  133. package/src/zod/form.zod.ts +1 -1
  134. package/src/zod/index.zod.ts +178 -19
  135. package/src/zod/layout.zod.ts +39 -1
  136. package/src/zod/navigation.zod.ts +1 -1
  137. package/src/zod/objectql.zod.ts +9 -1
  138. package/src/zod/overlay.zod.ts +1 -1
  139. package/src/zod/reports.zod.ts +183 -0
  140. package/src/zod/theme.zod.ts +296 -0
  141. package/src/zod/views.zod.ts +182 -0
package/src/index.ts CHANGED
@@ -94,6 +94,10 @@ export type {
94
94
  AspectRatioSchema,
95
95
  LayoutSchema,
96
96
  PageSchema,
97
+ PageType,
98
+ PageRegion,
99
+ PageRegionWidth,
100
+ PageVariable,
97
101
  } from './layout';
98
102
 
99
103
  // ============================================================================
@@ -249,6 +253,7 @@ export type {
249
253
  DataBinding,
250
254
  ValidationError,
251
255
  APIError,
256
+ FileUploadResult,
252
257
  } from './data';
253
258
 
254
259
  // ============================================================================
@@ -290,7 +295,10 @@ export type {
290
295
  ListViewSchema,
291
296
  ObjectGridSchema,
292
297
  ObjectFormSchema,
298
+ ObjectFormSection,
293
299
  ObjectViewSchema,
300
+ NamedListView,
301
+ ViewNavigationConfig,
294
302
  ObjectQLComponentSchema,
295
303
  } from './objectql';
296
304
 
@@ -299,6 +307,8 @@ export type {
299
307
  // ============================================================================
300
308
  export type {
301
309
  BaseFieldMetadata,
310
+ VisibilityCondition,
311
+ ValidationFunction as FieldValidationFunction,
302
312
  TextFieldMetadata,
303
313
  TextareaFieldMetadata,
304
314
  MarkdownFieldMetadata,
@@ -328,10 +338,191 @@ export type {
328
338
  ObjectFieldMetadata,
329
339
  VectorFieldMetadata,
330
340
  GridFieldMetadata,
341
+ GridColumnDefinition,
342
+ ColorFieldMetadata,
343
+ CodeFieldMetadata,
344
+ AvatarFieldMetadata,
345
+ SignatureFieldMetadata,
346
+ QRCodeFieldMetadata,
347
+ AddressFieldMetadata,
348
+ GeolocationFieldMetadata,
349
+ SliderFieldMetadata,
350
+ RatingFieldMetadata,
351
+ MasterDetailFieldMetadata,
331
352
  FieldMetadata,
353
+ ObjectTrigger,
354
+ ObjectPermission,
355
+ SharingRule,
332
356
  ObjectSchemaMetadata,
357
+ ObjectIndex,
358
+ ObjectRelationship,
333
359
  } from './field-types';
334
360
 
361
+ // ============================================================================
362
+ // Phase 3: Data Protocol Advanced Types
363
+ // ============================================================================
364
+ export type {
365
+ // Query AST (Phase 3.3)
366
+ QueryASTNodeType,
367
+ QueryASTNode,
368
+ SelectNode,
369
+ FromNode,
370
+ WhereNode,
371
+ JoinNode,
372
+ JoinStrategy,
373
+ GroupByNode,
374
+ OrderByNode,
375
+ LimitNode,
376
+ OffsetNode,
377
+ SubqueryNode,
378
+ AggregateNode,
379
+ WindowNode,
380
+ WindowFunction,
381
+ WindowFrame,
382
+ WindowFrameUnit,
383
+ WindowFrameBoundary,
384
+ FieldNode,
385
+ LiteralNode,
386
+ OperatorNode,
387
+ FunctionNode,
388
+ ComparisonOperator,
389
+ LogicalOperator,
390
+ QueryAST,
391
+ QuerySchema,
392
+ QuerySortConfig,
393
+ JoinConfig,
394
+ AggregationConfig,
395
+ WindowConfig,
396
+ // Filter Schema (Phase 3.4)
397
+ AdvancedFilterSchema,
398
+ AdvancedFilterCondition,
399
+ AdvancedFilterOperator,
400
+ DateRangeFilter,
401
+ DateRangePreset,
402
+ FilterBuilderConfig,
403
+ FilterFieldConfig,
404
+ // Validation Schema (Phase 3.5)
405
+ AdvancedValidationSchema,
406
+ AdvancedValidationRule,
407
+ ValidationRuleType,
408
+ ValidationFunction,
409
+ AsyncValidationFunction,
410
+ ValidationContext,
411
+ AdvancedValidationResult,
412
+ AdvancedValidationError,
413
+ // ObjectStack Spec v2.0.1 Validation
414
+ BaseValidation,
415
+ ScriptValidation,
416
+ UniquenessValidation,
417
+ StateMachineValidation,
418
+ CrossFieldValidation,
419
+ AsyncValidation,
420
+ ConditionalValidation,
421
+ FormatValidation,
422
+ RangeValidation,
423
+ ObjectValidationRule,
424
+ // Driver Interface (Phase 3.6)
425
+ DriverInterface,
426
+ ConnectionConfig,
427
+ DriverQueryResult,
428
+ BatchOperation,
429
+ BatchResult,
430
+ TransactionContext,
431
+ CacheManager,
432
+ ConnectionPool,
433
+ // Datasource Schema (Phase 3.7)
434
+ DatasourceSchema,
435
+ DatasourceType,
436
+ DatasourceMetric,
437
+ DatasourceAlert,
438
+ DatasourceManager,
439
+ HealthCheckResult,
440
+ DatasourceMetrics,
441
+ } from './data-protocol';
442
+
443
+ // ============================================================================
444
+ // Permission & RBAC Types (Q2 2026)
445
+ // ============================================================================
446
+ export type {
447
+ PermissionAction,
448
+ PermissionEffect,
449
+ RoleDefinition,
450
+ ObjectLevelPermission,
451
+ FieldLevelPermission,
452
+ RowLevelPermission,
453
+ PermissionCondition,
454
+ ObjectPermissionConfig,
455
+ SharingRuleConfig,
456
+ PermissionCheckResult,
457
+ PermissionContext,
458
+ PermissionGuardConfig,
459
+ } from './permissions';
460
+
461
+ // ============================================================================
462
+ // Multi-Tenancy Types (Q2 2026)
463
+ // ============================================================================
464
+ export type {
465
+ TenantIsolationStrategy,
466
+ TenantStatus,
467
+ TenantPlan,
468
+ TenantConfig,
469
+ TenantBranding,
470
+ TenantLimits,
471
+ TenantContext,
472
+ TenantResolutionStrategy,
473
+ TenantProviderConfig,
474
+ TenantScopedQueryConfig,
475
+ } from './tenant';
476
+
477
+ // ============================================================================
478
+ // Mobile Optimization Types (Q2 2026)
479
+ // ============================================================================
480
+ export type {
481
+ BreakpointName,
482
+ ResponsiveValue,
483
+ ResponsiveConfig,
484
+ MobileOverrides,
485
+ PWAConfig,
486
+ PWAIcon,
487
+ CacheStrategy,
488
+ OfflineConfig,
489
+ OfflineRoute,
490
+ GestureType,
491
+ GestureConfig,
492
+ GestureContext,
493
+ MobileComponentConfig,
494
+ } from './mobile';
495
+
496
+ // ============================================================================
497
+ // Visual Designer Types (Q2 2026)
498
+ // ============================================================================
499
+ export type {
500
+ DesignerPosition,
501
+ DesignerCanvasConfig,
502
+ DesignerComponent,
503
+ PageDesignerSchema,
504
+ DesignerPaletteCategory,
505
+ DesignerPaletteItem,
506
+ DataModelEntity,
507
+ DataModelField,
508
+ DataModelRelationship,
509
+ DataModelDesignerSchema,
510
+ BPMNNodeType,
511
+ BPMNNode,
512
+ BPMNEdge,
513
+ BPMNLane,
514
+ ProcessDesignerSchema,
515
+ ReportSectionType,
516
+ ReportDesignerElement,
517
+ ReportDesignerSection,
518
+ ReportDesignerSchema,
519
+ CollaborationPresence,
520
+ CollaborationOperation,
521
+ CollaborationConfig,
522
+ ViewDesignerColumn,
523
+ ViewDesignerSchema,
524
+ } from './designer';
525
+
335
526
  // ============================================================================
336
527
  // API and Events - API Integration and Event Handling
337
528
  // ============================================================================
@@ -365,6 +556,110 @@ import type { CRUDComponentSchema } from './crud';
365
556
  import type { ObjectQLComponentSchema, ListViewSchema } from './objectql';
366
557
  import type { AppSchema } from './app';
367
558
 
559
+ // ============================================================================
560
+ // Phase 2 Schemas - New Additions
561
+ // ============================================================================
562
+ export type {
563
+ // Theme System (aligned with @objectstack/spec)
564
+ Theme,
565
+ ThemeSchema,
566
+ ThemeMode,
567
+ ColorPalette,
568
+ Typography,
569
+ Spacing,
570
+ BorderRadius,
571
+ Shadow,
572
+ Breakpoints,
573
+ Animation,
574
+ ZIndex,
575
+ ThemeLogo,
576
+ ThemeSwitcherSchema,
577
+ ThemePreviewSchema,
578
+ // Legacy aliases
579
+ ThemeDefinition,
580
+ SpacingScale,
581
+ } from './theme';
582
+
583
+ export type {
584
+ // Report System
585
+ ReportSchema,
586
+ ReportExportFormat,
587
+ ReportScheduleFrequency,
588
+ ReportAggregationType,
589
+ ReportField,
590
+ ReportFilter,
591
+ ReportGroupBy,
592
+ ReportSection,
593
+ ReportSchedule,
594
+ ReportExportConfig,
595
+ ReportBuilderSchema,
596
+ ReportViewerSchema,
597
+ } from './reports';
598
+
599
+ export type {
600
+ // Workflow System
601
+ WorkflowStatus,
602
+ WorkflowNodeType,
603
+ WorkflowEdgeType,
604
+ WorkflowNode,
605
+ WorkflowNodeAction,
606
+ WorkflowEdge,
607
+ ApprovalRule,
608
+ WorkflowVariable,
609
+ WorkflowSchema,
610
+ WorkflowDesignerSchema,
611
+ ApprovalHistoryItem,
612
+ ApprovalProcessSchema,
613
+ WorkflowInstanceSchema,
614
+ } from './workflow';
615
+
616
+ export type {
617
+ // AI System
618
+ AIProvider,
619
+ AIModelType,
620
+ AIConfig,
621
+ AIFieldSuggestion,
622
+ AIFormAssistSchema,
623
+ AIRecommendationItem,
624
+ AIRecommendationsSchema,
625
+ NLQueryResult,
626
+ NLQuerySchema,
627
+ AIInsightsSchema,
628
+ } from './ai';
629
+
630
+ export type {
631
+ // Block System
632
+ BlockSchema,
633
+ BlockMetadata,
634
+ BlockVariable,
635
+ BlockSlot,
636
+ BlockLibraryItem,
637
+ BlockLibrarySchema,
638
+ BlockEditorSchema,
639
+ BlockInstanceSchema,
640
+ ComponentSchema,
641
+ } from './blocks';
642
+
643
+ export type {
644
+ // View System Enhancements
645
+ ViewType,
646
+ DetailViewSchema,
647
+ DetailViewField,
648
+ DetailViewSection,
649
+ DetailViewTab,
650
+ ViewSwitcherSchema,
651
+ FilterUISchema,
652
+ SortUISchema,
653
+ ViewComponentSchema,
654
+ } from './views';
655
+
656
+ export type {
657
+ // Enhanced Action System (Phase 2)
658
+ ActionExecutionMode,
659
+ ActionCallback,
660
+ ActionCondition,
661
+ } from './crud';
662
+
368
663
  /**
369
664
  * Union of all component schemas.
370
665
  * Use this for generic component rendering where the type is determined at runtime.
@@ -431,3 +726,134 @@ export type {
431
726
  SchemaRegistry,
432
727
  ComponentType,
433
728
  } from './registry';
729
+
730
+ // ============================================================================
731
+ // Plugin Scope Isolation - Section 3.3
732
+ // ============================================================================
733
+ export type {
734
+ PluginScope,
735
+ PluginScopeConfig,
736
+ ComponentMeta as PluginComponentMeta,
737
+ ComponentInput as PluginComponentInput,
738
+ PluginEventHandler,
739
+ } from './plugin-scope';
740
+
741
+ // ============================================================================
742
+ // UI Actions - Enhanced Action Schema (ObjectStack Spec v2.0.1)
743
+ // ============================================================================
744
+ /**
745
+ * Enhanced action schema with location-based placement, parameter collection,
746
+ * conditional visibility, and rich feedback mechanisms.
747
+ */
748
+ export type {
749
+ ActionLocation,
750
+ ActionComponent,
751
+ ActionType,
752
+ ActionParam,
753
+ ActionSchema as UIActionSchema,
754
+ ActionGroup,
755
+ ActionContext,
756
+ ActionResult,
757
+ ActionExecutor,
758
+ BatchOperationConfig,
759
+ BatchOperationResult,
760
+ TransactionIsolationLevel,
761
+ TransactionConfig,
762
+ TransactionResult,
763
+ UndoRedoEntry,
764
+ UndoRedoConfig,
765
+ UndoRedoState,
766
+ } from './ui-action';
767
+
768
+ // ============================================================================
769
+ // ObjectStack Protocol Namespaces - Protocol Re-exports
770
+ // ============================================================================
771
+ /**
772
+ * Re-export ObjectStack Protocol namespaces for convenience.
773
+ *
774
+ * This allows consumers to access the full ObjectStack protocol through
775
+ * @object-ui/types without needing to install @objectstack/spec separately.
776
+ *
777
+ * @example
778
+ * ```typescript
779
+ * import { Data, UI, System, AI, API, Kernel } from '@object-ui/types';
780
+ *
781
+ * const field: Data.Field = { name: 'task_name', type: 'text' };
782
+ * const view: UI.ListView = { name: 'all', label: 'All Records', ... };
783
+ * ```
784
+ */
785
+ export type {
786
+ Data,
787
+ UI,
788
+ System,
789
+ AI,
790
+ API,
791
+ Hub,
792
+ Automation,
793
+ Shared,
794
+ QA,
795
+ Kernel,
796
+ Contracts,
797
+ Integration,
798
+ Studio,
799
+ Identity,
800
+ Security,
801
+ } from '@objectstack/spec';
802
+
803
+ // ============================================================================
804
+ // ObjectStack Protocol Utilities - defineStack, definePlugin
805
+ // ============================================================================
806
+ /**
807
+ * Re-export ObjectStack Protocol utility functions and top-level types.
808
+ *
809
+ * @example
810
+ * ```typescript
811
+ * import { defineStack, definePlugin } from '@object-ui/types';
812
+ *
813
+ * export default defineStack({
814
+ * manifest: { id: 'com.example.app', version: '1.0.0', type: 'app', name: 'My App' },
815
+ * objects: [],
816
+ * apps: [],
817
+ * });
818
+ * ```
819
+ */
820
+ export {
821
+ defineStack,
822
+ definePlugin,
823
+ ObjectStackSchema,
824
+ ObjectStackDefinitionSchema,
825
+ ObjectStackCapabilitiesSchema,
826
+ ObjectOSCapabilitiesSchema,
827
+ ObjectQLCapabilitiesSchema,
828
+ ObjectUICapabilitiesSchema,
829
+ } from '@objectstack/spec';
830
+
831
+ export type {
832
+ PluginContext,
833
+ ObjectStack,
834
+ ObjectStackDefinition,
835
+ ObjectStackCapabilities,
836
+ ObjectOSCapabilities,
837
+ ObjectQLCapabilities,
838
+ ObjectUICapabilities,
839
+ } from '@objectstack/spec';
840
+
841
+ // ============================================================================
842
+ // Widget System - Runtime Widget Registration (Section 1.6)
843
+ // ============================================================================
844
+ /**
845
+ * Widget manifest and registry types for runtime widget registration,
846
+ * plugin auto-discovery, and custom widget registry.
847
+ */
848
+ export type {
849
+ WidgetManifest,
850
+ WidgetSource,
851
+ WidgetSourceModule,
852
+ WidgetSourceInline,
853
+ WidgetSourceRegistry,
854
+ WidgetInput,
855
+ WidgetCapabilities,
856
+ ResolvedWidget,
857
+ WidgetRegistryEvent,
858
+ WidgetRegistryListener,
859
+ } from './widget';
package/src/layout.ts CHANGED
@@ -424,35 +424,64 @@ export interface AspectRatioSchema extends BaseSchema {
424
424
  children?: SchemaNode | SchemaNode[];
425
425
  }
426
426
 
427
+ /**
428
+ * Page Type
429
+ * Determines page behavior and default layout template.
430
+ * Aligned with @objectstack/spec Page.type
431
+ */
432
+ export type PageType = 'record' | 'home' | 'app' | 'utility';
433
+
434
+ /**
435
+ * Page Variable
436
+ * Local page state that can be read/written by components and expressions.
437
+ * Aligned with @objectstack/spec PageVariableSchema
438
+ */
439
+ export interface PageVariable {
440
+ /** Variable name */
441
+ name: string;
442
+ /** Variable type @default 'string' */
443
+ type?: 'string' | 'number' | 'boolean' | 'object' | 'array';
444
+ /** Default value for initialization */
445
+ defaultValue?: any;
446
+ }
447
+
448
+ /**
449
+ * Page Region Size
450
+ * Aligned with @objectstack/spec PageRegionSchema.width
451
+ */
452
+ export type PageRegionWidth = 'small' | 'medium' | 'large' | 'full';
453
+
427
454
  /**
428
455
  * Page Region (Header, Sidebar, Main, etc)
456
+ * Aligned with @objectstack/spec PageRegionSchema
429
457
  */
430
458
  export interface PageRegion {
431
459
  /**
432
- * Region name/id
460
+ * Region name/id (e.g. "sidebar", "main", "header")
433
461
  */
434
462
  name: string;
435
463
  /**
436
- * Region type
464
+ * Region type — semantic role for layout rendering
437
465
  */
438
466
  type?: 'header' | 'sidebar' | 'main' | 'footer' | 'aside';
439
467
  /**
440
- * Width (flex basis)
468
+ * Region width (spec-aligned enum)
441
469
  */
442
- width?: string;
470
+ width?: PageRegionWidth | string;
443
471
  /**
444
472
  * Components in this region
445
473
  */
446
474
  components: SchemaNode[];
447
475
  /**
448
- * CSS class
476
+ * CSS class overrides
449
477
  */
450
478
  className?: string;
451
479
  }
452
480
 
453
481
  /**
454
482
  * Page layout component
455
- * Top-level container for a page route
483
+ * Top-level container for a page route.
484
+ * Aligned with @objectstack/spec PageSchema
456
485
  */
457
486
  export interface PageSchema extends BaseSchema {
458
487
  type: 'page';
@@ -461,13 +490,33 @@ export interface PageSchema extends BaseSchema {
461
490
  */
462
491
  title?: string;
463
492
  /**
464
- * Page icon (Lucide icon name)
465
- */
493
+ * Page icon (Lucide icon name)
494
+ */
466
495
  icon?: string;
467
496
  /**
468
497
  * Page description
469
498
  */
470
499
  description?: string;
500
+ /**
501
+ * Page type — determines default layout and behavior
502
+ * @default 'record'
503
+ */
504
+ pageType?: PageType;
505
+ /**
506
+ * Bound object name (for record pages)
507
+ * Provides record context to components in regions
508
+ */
509
+ object?: string;
510
+ /**
511
+ * Layout template name (e.g. "default", "header-sidebar-main")
512
+ * @default 'default'
513
+ */
514
+ template?: string;
515
+ /**
516
+ * Local page state variables
517
+ * Initialized on mount and available to all components via context
518
+ */
519
+ variables?: PageVariable[];
471
520
  /**
472
521
  * Page layout regions
473
522
  * (Aligned with @objectstack/spec Page.regions)
@@ -481,6 +530,15 @@ export interface PageSchema extends BaseSchema {
481
530
  * Alternative content prop
482
531
  */
483
532
  children?: SchemaNode | SchemaNode[];
533
+ /**
534
+ * Whether this is the default page for the object/app
535
+ * @default false
536
+ */
537
+ isDefault?: boolean;
538
+ /**
539
+ * Profiles that can access this page
540
+ */
541
+ assignedProfiles?: string[];
484
542
  }
485
543
 
486
544
  /**