@cratis/event-models 0.112.0 → 0.114.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 (207) hide show
  1. package/README.md +67 -0
  2. package/dist/Collections/suppliesBoardEditing.d.ts +2 -0
  3. package/dist/index.js +1347 -1347
  4. package/dist/index.js.map +1 -1
  5. package/dist/screen-editor/BlueprintPreview/blueprintPreviewCatalog.d.ts +57 -0
  6. package/dist/screen-editor/BlueprintPreview/initialPackageSelection.d.ts +18 -0
  7. package/dist/screen-editor/IconLibraries/Lucide/index.d.ts +4 -0
  8. package/dist/screen-editor/IconLibraries/Lucide/lucideAdapter.d.ts +2 -0
  9. package/dist/screen-editor/IconLibraries/Lucide/lucideCatalog.d.ts +2 -0
  10. package/dist/screen-editor/IconLibraries/Lucide/lucideManifest.d.ts +3 -0
  11. package/dist/screen-editor/IconLibraries/Lucide/lucidePackage.d.ts +2 -0
  12. package/dist/screen-editor/Icons/IconPickerCatalogState.d.ts +5 -0
  13. package/dist/screen-editor/Icons/IconPropertyField.d.ts +25 -0
  14. package/dist/screen-editor/Icons/IconPropertyFieldStrings.d.ts +8 -0
  15. package/dist/screen-editor/Icons/IconValueProblem.d.ts +7 -0
  16. package/dist/screen-editor/Icons/UseIconPickerCatalogResult.d.ts +7 -0
  17. package/dist/screen-editor/Icons/describeIconValueProblem.d.ts +3 -0
  18. package/dist/screen-editor/Icons/diagnoseIconValue.d.ts +5 -0
  19. package/dist/screen-editor/Icons/effectiveIconCatalogOf.d.ts +3 -0
  20. package/dist/screen-editor/Icons/iconCatalogSourcesOf.d.ts +3 -0
  21. package/dist/screen-editor/Icons/toIconPickerCatalog.d.ts +5 -0
  22. package/dist/screen-editor/Icons/useIconPickerCatalog.d.ts +4 -0
  23. package/dist/screen-editor/ScreenEditor/Actions/ActionModel.d.ts +7 -0
  24. package/dist/screen-editor/ScreenEditor/Actions/ActionPresentation.d.ts +5 -0
  25. package/dist/screen-editor/ScreenEditor/Actions/StateChangeSlice.d.ts +10 -0
  26. package/dist/screen-editor/ScreenEditor/Actions/actionBehavior.d.ts +8 -0
  27. package/dist/screen-editor/ScreenEditor/Actions/diagnoseAction.d.ts +14 -0
  28. package/dist/screen-editor/ScreenEditor/Binding/availableSourcesFor.d.ts +2 -0
  29. package/dist/screen-editor/ScreenEditor/Binding/bindingScopeTypes.d.ts +2 -0
  30. package/dist/screen-editor/ScreenEditor/Binding/previewState.d.ts +17 -0
  31. package/dist/screen-editor/ScreenEditor/Binding/queryBindingModel.d.ts +8 -0
  32. package/dist/screen-editor/ScreenEditor/Binding/settleBinding.d.ts +7 -0
  33. package/dist/screen-editor/ScreenEditor/Binding/toSceneCandidates.d.ts +22 -0
  34. package/dist/screen-editor/ScreenEditor/Collections/orderedItems.d.ts +11 -0
  35. package/dist/screen-editor/ScreenEditor/Defaults/defaultComponentIcons.d.ts +3 -0
  36. package/dist/screen-editor/ScreenEditor/Defaults/defaultLayoutIcons.d.ts +2 -0
  37. package/dist/screen-editor/ScreenEditor/Defaults/defaultLayoutLabels.d.ts +2 -0
  38. package/dist/screen-editor/ScreenEditor/Defaults/defaultPackageIcons.d.ts +6 -0
  39. package/dist/screen-editor/ScreenEditor/Defaults/defaultPaletteIcons.d.ts +2 -0
  40. package/dist/screen-editor/ScreenEditor/Defaults/defaultPaletteSources.d.ts +2 -0
  41. package/dist/screen-editor/ScreenEditor/Defaults/defaultScreenEditorStrings.d.ts +2 -0
  42. package/dist/screen-editor/ScreenEditor/Document/canvasMoveEdits.d.ts +4 -0
  43. package/dist/screen-editor/ScreenEditor/Document/createExternalComponent.d.ts +2 -0
  44. package/dist/screen-editor/ScreenEditor/Document/createPanel.d.ts +6 -0
  45. package/dist/screen-editor/ScreenEditor/Document/frameworkElement.d.ts +21 -0
  46. package/dist/screen-editor/ScreenEditor/Document/placeOnCanvas.d.ts +10 -0
  47. package/dist/screen-editor/ScreenEditor/Document/readSceneDocument.d.ts +15 -0
  48. package/dist/screen-editor/ScreenEditor/Document/studioScreen.d.ts +10 -0
  49. package/dist/screen-editor/ScreenEditor/DropRegions/DropRegion.d.ts +12 -0
  50. package/dist/screen-editor/ScreenEditor/DropRegions/DropRegionKind.d.ts +4 -0
  51. package/dist/screen-editor/ScreenEditor/DropRegions/InsertionAxis.d.ts +5 -0
  52. package/dist/screen-editor/ScreenEditor/DropRegions/computeDropRegions.d.ts +6 -0
  53. package/dist/screen-editor/ScreenEditor/Exposure/exposureEdits.d.ts +10 -0
  54. package/dist/screen-editor/ScreenEditor/Host/DefaultPaletteHost.d.ts +6 -0
  55. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorBoundary.d.ts +8 -0
  56. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorControlProviders.d.ts +7 -0
  57. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +44 -0
  58. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorFileUpload.d.ts +5 -0
  59. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorHost.d.ts +36 -0
  60. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorOverlay.d.ts +24 -0
  61. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorPrimeReactProvider.d.ts +3 -0
  62. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorWindow.d.ts +28 -0
  63. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorWorkspace.d.ts +21 -0
  64. package/dist/screen-editor/ScreenEditor/Host/UnreadableScreen.d.ts +8 -0
  65. package/dist/screen-editor/ScreenEditor/Host/WindowTitleBar.d.ts +5 -0
  66. package/dist/screen-editor/ScreenEditor/Host/createScreenEditorEnvironment.d.ts +16 -0
  67. package/dist/screen-editor/ScreenEditor/Host/mergeComponentDefaults.d.ts +3 -0
  68. package/dist/screen-editor/ScreenEditor/Host/nextElementId.d.ts +1 -0
  69. package/dist/screen-editor/ScreenEditor/Host/openSubject.d.ts +14 -0
  70. package/dist/screen-editor/ScreenEditor/Host/screenEditorPrimeReactDefaults.d.ts +2 -0
  71. package/dist/screen-editor/ScreenEditor/Host/useScreenEditor.d.ts +4 -0
  72. package/dist/screen-editor/ScreenEditor/Inspector/ActionEditor.d.ts +13 -0
  73. package/dist/screen-editor/ScreenEditor/Inspector/DiagnosticList.d.ts +6 -0
  74. package/dist/screen-editor/ScreenEditor/Inspector/ExposureSection.d.ts +11 -0
  75. package/dist/screen-editor/ScreenEditor/Inspector/IconProperties.d.ts +14 -0
  76. package/dist/screen-editor/ScreenEditor/Inspector/InspectorTab.d.ts +4 -0
  77. package/dist/screen-editor/ScreenEditor/Inspector/LayoutTypeSection.d.ts +10 -0
  78. package/dist/screen-editor/ScreenEditor/Inspector/OwnershipBadge.d.ts +6 -0
  79. package/dist/screen-editor/ScreenEditor/Inspector/PropertiesPanel.d.ts +17 -0
  80. package/dist/screen-editor/ScreenEditor/Inspector/QueryBindingEditor.d.ts +12 -0
  81. package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +109 -0
  82. package/dist/screen-editor/ScreenEditor/Inspector/ScreenInspector.d.ts +13 -0
  83. package/dist/screen-editor/ScreenEditor/Inspector/StructureTree.d.ts +14 -0
  84. package/dist/screen-editor/ScreenEditor/Inspector/StructureTreeRow.d.ts +21 -0
  85. package/dist/screen-editor/ScreenEditor/Inspector/ViewportControls.d.ts +9 -0
  86. package/dist/screen-editor/ScreenEditor/Inspector/pointerDropZone.d.ts +2 -0
  87. package/dist/screen-editor/ScreenEditor/Layouts/LayoutCatalogEntry.d.ts +11 -0
  88. package/dist/screen-editor/ScreenEditor/Layouts/LayoutItem.d.ts +8 -0
  89. package/dist/screen-editor/ScreenEditor/Layouts/PanelConstruct.d.ts +7 -0
  90. package/dist/screen-editor/ScreenEditor/Layouts/layoutCatalog.d.ts +2 -0
  91. package/dist/screen-editor/ScreenEditor/Layouts/layoutChange.d.ts +13 -0
  92. package/dist/screen-editor/ScreenEditor/Layouts/toLayoutContainerDescriptors.d.ts +9 -0
  93. package/dist/screen-editor/ScreenEditor/Palette/PaletteEntry.d.ts +10 -0
  94. package/dist/screen-editor/ScreenEditor/Palette/PaletteFolders.d.ts +7 -0
  95. package/dist/screen-editor/ScreenEditor/Palette/buildPalette.d.ts +23 -0
  96. package/dist/screen-editor/ScreenEditor/Palette/insertedComponentName.d.ts +2 -0
  97. package/dist/screen-editor/ScreenEditor/Properties/allowedIconChoices.d.ts +3 -0
  98. package/dist/screen-editor/ScreenEditor/Properties/choiceKeys.d.ts +6 -0
  99. package/dist/screen-editor/ScreenEditor/Properties/iconDiagnostics.d.ts +7 -0
  100. package/dist/screen-editor/ScreenEditor/Properties/propertyEdits.d.ts +3 -0
  101. package/dist/screen-editor/ScreenEditor/Properties/toPropertyGroups.d.ts +9 -0
  102. package/dist/screen-editor/ScreenEditor/Properties/visibleProperties.d.ts +2 -0
  103. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftKind.d.ts +6 -0
  104. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftOutcome.d.ts +13 -0
  105. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftState.d.ts +4 -0
  106. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblem.d.ts +5 -0
  107. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblemKind.d.ts +6 -0
  108. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProperties.d.ts +9 -0
  109. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyField.d.ts +13 -0
  110. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyFieldStrings.d.ts +9 -0
  111. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonReading.d.ts +8 -0
  112. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/defaultJsonPropertyFieldStrings.d.ts +2 -0
  113. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/describeJsonProblem.d.ts +3 -0
  114. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/formatJson.d.ts +1 -0
  115. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/isJsonValueType.d.ts +4 -0
  116. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/jsonDraft.d.ts +11 -0
  117. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/numberLiteralsOf.d.ts +1 -0
  118. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/readJson.d.ts +2 -0
  119. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/sameJson.d.ts +1 -0
  120. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/useJsonDraft.d.ts +9 -0
  121. package/dist/screen-editor/ScreenEditor/PrototypeProjection/LegacyExtras.d.ts +11 -0
  122. package/dist/screen-editor/ScreenEditor/PrototypeProjection/applyLegacyState.d.ts +3 -0
  123. package/dist/screen-editor/ScreenEditor/PrototypeProjection/layoutContainerItems.d.ts +4 -0
  124. package/dist/screen-editor/ScreenEditor/PrototypeProjection/legacyPlacement.d.ts +5 -0
  125. package/dist/screen-editor/ScreenEditor/PrototypeProjection/projectToLegacyElements.d.ts +3 -0
  126. package/dist/screen-editor/ScreenEditor/PrototypeProjection/sceneComponentName.d.ts +3 -0
  127. package/dist/screen-editor/ScreenEditor/PrototypeProjection/withoutNulls.d.ts +1 -0
  128. package/dist/screen-editor/ScreenEditor/Runtime/profileColorScheme.d.ts +2 -0
  129. package/dist/screen-editor/ScreenEditor/Runtime/profileTheme.d.ts +3 -0
  130. package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntime.d.ts +17 -0
  131. package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntimeForProfile.d.ts +4 -0
  132. package/dist/screen-editor/ScreenEditor/Runtime/serverPrototypeTypes.d.ts +3 -0
  133. package/dist/screen-editor/ScreenEditor/Runtime/useLoadedIconCatalog.d.ts +2 -0
  134. package/dist/screen-editor/ScreenEditor/Runtime/withActionPresentation.d.ts +2 -0
  135. package/dist/screen-editor/ScreenEditor/Runtime/withPlacementProperties.d.ts +3 -0
  136. package/dist/screen-editor/ScreenEditor/Runtime/withSampleContentProperties.d.ts +3 -0
  137. package/dist/screen-editor/ScreenEditor/Selection/panelLayoutItem.d.ts +3 -0
  138. package/dist/screen-editor/ScreenEditor/Selection/sceneStructureAdapter.d.ts +4 -0
  139. package/dist/screen-editor/ScreenEditor/Selection/sceneTree.d.ts +6 -0
  140. package/dist/screen-editor/ScreenEditor/Selection/surfaceArrangementOfRoot.d.ts +3 -0
  141. package/dist/screen-editor/ScreenEditor/Selection/surfaceLayoutOfRoot.d.ts +3 -0
  142. package/dist/screen-editor/ScreenEditor/Selection/toSceneEdits.d.ts +5 -0
  143. package/dist/screen-editor/ScreenEditor/Session/EditSession.d.ts +25 -0
  144. package/dist/screen-editor/ScreenEditor/Session/SessionCell.d.ts +8 -0
  145. package/dist/screen-editor/ScreenEditor/Structure/DropZone.d.ts +5 -0
  146. package/dist/screen-editor/ScreenEditor/Structure/MoveIntent.d.ts +6 -0
  147. package/dist/screen-editor/ScreenEditor/Structure/Ownership.d.ts +5 -0
  148. package/dist/screen-editor/ScreenEditor/Structure/OwnershipResolver.d.ts +2 -0
  149. package/dist/screen-editor/ScreenEditor/Structure/StructureEdit.d.ts +5 -0
  150. package/dist/screen-editor/ScreenEditor/Structure/StructureEditRejection.d.ts +9 -0
  151. package/dist/screen-editor/ScreenEditor/Structure/StructureLocation.d.ts +6 -0
  152. package/dist/screen-editor/ScreenEditor/Structure/StructureOperation.d.ts +9 -0
  153. package/dist/screen-editor/ScreenEditor/Structure/StructureRow.d.ts +8 -0
  154. package/dist/screen-editor/ScreenEditor/Structure/StructureTreeAdapter.d.ts +11 -0
  155. package/dist/screen-editor/ScreenEditor/Structure/findStructureNode.d.ts +4 -0
  156. package/dist/screen-editor/ScreenEditor/Structure/flattenStructure.d.ts +3 -0
  157. package/dist/screen-editor/ScreenEditor/Structure/isDeleteKey.d.ts +15 -0
  158. package/dist/screen-editor/ScreenEditor/Structure/isOperationPermitted.d.ts +3 -0
  159. package/dist/screen-editor/ScreenEditor/Structure/removal.d.ts +3 -0
  160. package/dist/screen-editor/ScreenEditor/Structure/resolveMoveIntentEdit.d.ts +4 -0
  161. package/dist/screen-editor/ScreenEditor/Structure/resolveTreeDrop.d.ts +4 -0
  162. package/dist/screen-editor/ScreenEditor/Structure/surfaceMoveEdit.d.ts +3 -0
  163. package/dist/screen-editor/ScreenEditor/Structure/validateStructureEdit.d.ts +4 -0
  164. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimeComponent.d.ts +4 -0
  165. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimePlaceholder.d.ts +7 -0
  166. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimePlaceholderTone.d.ts +5 -0
  167. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/OverlayPreview.d.ts +12 -0
  168. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/SurfaceStrings.d.ts +12 -0
  169. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/designTimeRegistry.d.ts +3 -0
  170. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/designTimeSamples.d.ts +7 -0
  171. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/overlayKinds.d.ts +8 -0
  172. package/dist/screen-editor/ScreenEditor/Surface/DesignTime/useRendersVisibleContent.d.ts +3 -0
  173. package/dist/screen-editor/ScreenEditor/Surface/DropIndicator.d.ts +6 -0
  174. package/dist/screen-editor/ScreenEditor/Surface/ScreenSurface.d.ts +14 -0
  175. package/dist/screen-editor/ScreenEditor/Surface/dragPayload.d.ts +12 -0
  176. package/dist/screen-editor/ScreenEditor/Surface/dropRegionRects.d.ts +13 -0
  177. package/dist/screen-editor/ScreenEditor/Surface/elementRect.d.ts +2 -0
  178. package/dist/screen-editor/ScreenEditor/Surface/resolveDropTarget.d.ts +6 -0
  179. package/dist/screen-editor/ScreenEditor/Surface/sameMeasurement.d.ts +5 -0
  180. package/dist/screen-editor/ScreenEditor/Surface/useSurfaceDrop.d.ts +22 -0
  181. package/dist/screen-editor/ScreenEditor/Surface/useSurfaceMeasurement.d.ts +9 -0
  182. package/dist/screen-editor/ScreenEditor/Templates/composeEditorScreen.d.ts +8 -0
  183. package/dist/screen-editor/ScreenEditor/Templates/templateProvenance.d.ts +6 -0
  184. package/dist/screen-editor/ScreenEditor/Viewport/ViewportPreset.d.ts +4 -0
  185. package/dist/screen-editor/ScreenEditor/Viewport/ViewportSize.d.ts +4 -0
  186. package/dist/screen-editor/ScreenEditor/Viewport/detectViewportPreset.d.ts +3 -0
  187. package/dist/screen-editor/ScreenEditor/Viewport/resolveViewportSizeClass.d.ts +3 -0
  188. package/dist/screen-editor/ScreenEditor/Viewport/toWindowSize.d.ts +3 -0
  189. package/dist/screen-editor/ScreenEditor/Viewport/viewportPresets.d.ts +4 -0
  190. package/dist/screen-editor/ScreenEditor/index.d.ts +32 -0
  191. package/dist/screen-editor/UiProfile/PackageInclusion.d.ts +9 -0
  192. package/dist/screen-editor/UiProfile/PersistedUiProfile.d.ts +19 -0
  193. package/dist/screen-editor/UiProfile/ResolvedPackageEntry.d.ts +19 -0
  194. package/dist/screen-editor/UiProfile/ResolvedUiProfile.d.ts +20 -0
  195. package/dist/screen-editor/UiProfile/UiProfileSettings.d.ts +29 -0
  196. package/dist/screen-editor/UiProfile/defaultUiProfileSettings.d.ts +13 -0
  197. package/dist/screen-editor/UiProfile/explicitPackageNames.d.ts +10 -0
  198. package/dist/screen-editor/UiProfile/formatMessage.d.ts +11 -0
  199. package/dist/screen-editor/UiProfile/resolveUiProfile.d.ts +18 -0
  200. package/dist/screen-editor/UiProfile/shellLayoutOf.d.ts +10 -0
  201. package/dist/screen-editor/UiProfile/toSceneUiProfile.d.ts +12 -0
  202. package/dist/screen-editor/UiProfileDesigner/filterCompatibleThemes.d.ts +12 -0
  203. package/dist/screen-editor/UiProfileDesigner/findComponentCollisions.d.ts +15 -0
  204. package/dist/screen-editor/catalog-CZx3FR-E.js +4 -0
  205. package/dist/screen-editor/index.js +4705 -0
  206. package/dist/screen-editor/screen-editor.css +2 -0
  207. package/package.json +105 -13
@@ -0,0 +1,9 @@
1
+ import { type RefObject } from 'react';
2
+ import type { DropRegion } from '../DropRegions/DropRegion';
3
+ import { type PlacedRegion, type Rect } from './dropRegionRects';
4
+ export interface SurfaceMeasurement {
5
+ placed: PlacedRegion[];
6
+ selectionRect: Rect | undefined;
7
+ measureNow: () => PlacedRegion[];
8
+ }
9
+ export declare function useSurfaceMeasurement(surface: RefObject<HTMLDivElement | null>, dropRegions: readonly DropRegion[], selectedId: string | undefined): SurfaceMeasurement;
@@ -0,0 +1,8 @@
1
+ import { type Panel, type SceneDocument, type SceneElement } from '@cratis/scene.model';
2
+ export declare const compositionId = "composition";
3
+ export interface EditorComposition {
4
+ element: Panel;
5
+ roots: SceneElement[];
6
+ templates: string[];
7
+ }
8
+ export declare function composeEditorScreen(document: SceneDocument, authoredTemplate?: string): EditorComposition;
@@ -0,0 +1,6 @@
1
+ import { ProvenanceKind, type SceneDocument, type SceneElement } from '@cratis/scene.model';
2
+ import { type EditingContext } from '@cratis/scene.engine';
3
+ import { Ownership } from '../Structure/Ownership';
4
+ import type { OwnershipResolver } from '../Structure/OwnershipResolver';
5
+ export declare function ownershipOfProvenance(kind: `${ProvenanceKind}`): Ownership;
6
+ export declare function resolveOwnership(document: SceneDocument, roots: SceneElement[], context: EditingContext): OwnershipResolver;
@@ -0,0 +1,4 @@
1
+ export declare enum ViewportPreset {
2
+ Desktop = "desktop",
3
+ Mobile = "mobile"
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface ViewportSize {
2
+ width: number;
3
+ height: number;
4
+ }
@@ -0,0 +1,3 @@
1
+ import { ViewportPreset } from './ViewportPreset';
2
+ import type { ViewportSize } from './ViewportSize';
3
+ export declare function detectViewportPreset(windowSize: ViewportSize, available: ViewportSize): ViewportPreset | undefined;
@@ -0,0 +1,3 @@
1
+ import type { SizeClass } from '@cratis/scene.model';
2
+ import type { ViewportSize } from './ViewportSize';
3
+ export declare function resolveViewportSizeClass(windowSize: ViewportSize): SizeClass;
@@ -0,0 +1,3 @@
1
+ import type { ViewportSize } from './ViewportSize';
2
+ export declare function toWindowSize(viewport: ViewportSize, available: ViewportSize): ViewportSize;
3
+ export declare function toViewport(windowSize: ViewportSize): ViewportSize;
@@ -0,0 +1,4 @@
1
+ import { ViewportPreset } from './ViewportPreset';
2
+ import type { ViewportSize } from './ViewportSize';
3
+ export declare const windowChromeHeight = 40;
4
+ export declare const viewportPresetSizes: Record<ViewportPreset, ViewportSize>;
@@ -0,0 +1,32 @@
1
+ export * from './Host/ScreenEditorOverlay';
2
+ export * from './Host/ScreenEditorPrimeReactProvider';
3
+ export * from './Host/screenEditorPrimeReactDefaults';
4
+ export * from './Host/ScreenEditorWorkspace';
5
+ export * from './Host/ScreenEditorWindow';
6
+ export * from './Host/ScreenEditorController';
7
+ export * from './Host/ScreenEditorHost';
8
+ export * from './Host/ScreenEditorFileUpload';
9
+ export * from './Host/createScreenEditorEnvironment';
10
+ export * from './Runtime/screenEditorRuntime';
11
+ export * from './Runtime/screenEditorRuntimeForProfile';
12
+ export * from './Inspector/ScreenEditorStrings';
13
+ export * from './Defaults/defaultScreenEditorStrings';
14
+ export * from './PropertyEditors/Json/JsonPropertyField';
15
+ export * from './PropertyEditors/Json/JsonPropertyFieldStrings';
16
+ export * from './PropertyEditors/Json/defaultJsonPropertyFieldStrings';
17
+ export * from './PropertyEditors/Json/isJsonValueType';
18
+ export * from './PropertyEditors/Json/readJson';
19
+ export * from './PropertyEditors/Json/formatJson';
20
+ export * from './Defaults/defaultLayoutLabels';
21
+ export * from './Defaults/defaultLayoutIcons';
22
+ export * from './Defaults/defaultPaletteIcons';
23
+ export * from './Defaults/defaultPaletteSources';
24
+ export * from './Layouts/LayoutItem';
25
+ export * from './Layouts/toLayoutContainerDescriptors';
26
+ export * from './Palette/buildPalette';
27
+ export * from './Actions/StateChangeSlice';
28
+ export * from './Binding/toSceneCandidates';
29
+ export * from './Document/readSceneDocument';
30
+ export * from './Structure/Ownership';
31
+ export * from './Structure/StructureEditRejection';
32
+ export type { PersistedUiProfile } from '../UiProfile/PersistedUiProfile';
@@ -0,0 +1,9 @@
1
+ /** Why a package is part of the resolved profile. */
2
+ export declare enum PackageInclusion {
3
+ /** Always present: Scene's `core`, the final fallback every name resolves against. */
4
+ Fallback = "fallback",
5
+ /** Chosen by the user - as a library, the shell or a template pack. */
6
+ Explicit = "explicit",
7
+ /** Not chosen; present only because another package in the profile requires it. */
8
+ Automatic = "automatic"
9
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A UI profile as it is stored: plain strings, so the host's generated proxy class satisfies it
3
+ * structurally without this package knowing about the host.
4
+ *
5
+ * It carries the resolved package order and the shell's layout as well as the choices, so a consumer that
6
+ * has no package catalog - Play, for one - can still build a Scene `UiProfile` from it.
7
+ */
8
+ export interface PersistedUiProfile {
9
+ packages: string[];
10
+ shell: string;
11
+ templatePacks: string[];
12
+ resolvedPackages: string[];
13
+ layout: string;
14
+ theme: string;
15
+ colorScheme: string;
16
+ navigationMode: string;
17
+ accent: string;
18
+ defaultScreenTemplate: string;
19
+ }
@@ -0,0 +1,19 @@
1
+ import { PackageKind } from '@cratis/scene.model';
2
+ import { PackageInclusion } from './PackageInclusion';
3
+ /** One package of the resolved profile, with the reason it is there. */
4
+ export interface ResolvedPackageEntry {
5
+ /** The package name. */
6
+ name: string;
7
+ /** The name to show: the manifest's display name, else the package name. */
8
+ displayName: string;
9
+ /** The manifest's one-line description, when it has one. */
10
+ description?: string;
11
+ /** The package's version. */
12
+ version: string;
13
+ /** What the package contributes. */
14
+ kind: PackageKind;
15
+ /** Why the package is present. */
16
+ inclusion: PackageInclusion;
17
+ /** The other resolved packages that declare a dependency on this one, in resolved order. */
18
+ requiredBy: string[];
19
+ }
@@ -0,0 +1,20 @@
1
+ import { Theme, UiProfile } from '@cratis/scene.model';
2
+ import { ComponentResolution, PackageSelection } from '@cratis/scene.engine';
3
+ import { ResolvedPackageEntry } from './ResolvedPackageEntry';
4
+ /** What a {@link UiProfileSettings} amounts to once Scene's resolver has expanded and ordered it. */
5
+ export interface ResolvedUiProfile {
6
+ /** The resolver's own outcome: the ordered packages, what it added, and everything wrong. */
7
+ selection: PackageSelection;
8
+ /** The Scene profile preview, screen editor and Play render through. */
9
+ profile: UiProfile;
10
+ /** The resolved packages in override-priority order, each with its reason. */
11
+ entries: ResolvedPackageEntry[];
12
+ /** Every bare component name more than one active package declares, and which one wins it. */
13
+ collisions: ComponentResolution[];
14
+ /** The themes compatible with every package of the profile. */
15
+ compatibleThemes: Theme[];
16
+ /** The layout of the chosen shell, or empty when there is no usable shell. */
17
+ layout: string;
18
+ /** Whether the resolver found nothing missing, conflicting or cyclic. */
19
+ isValid: boolean;
20
+ }
@@ -0,0 +1,29 @@
1
+ import { ColorScheme, LayoutMode } from '@cratis/scene.blueprint.default';
2
+ /**
3
+ * The choices that make up an application's UI profile - what a draft edits and what applying persists.
4
+ *
5
+ * Only the choices are stored. Which packages those choices pull in, in what order and why is always
6
+ * recomputed by Scene's resolver (`resolveUiProfile`), so a stored profile can never disagree with the
7
+ * packages it names about what they require.
8
+ */
9
+ export interface UiProfileSettings {
10
+ /**
11
+ * The packages chosen explicitly - component libraries, styling, and any other group such as icons -
12
+ * in ascending override priority. `core` is never listed: it is always the final fallback.
13
+ */
14
+ packages: string[];
15
+ /** The blueprint supplying the application shell, or empty when none is chosen. */
16
+ shell: string;
17
+ /** Further blueprints whose reusable templates are available without changing the shell. */
18
+ templatePacks: string[];
19
+ /** The name of the theme, or empty to take the first one compatible with the profile. */
20
+ theme: string;
21
+ /** Whether the shell renders light or dark. */
22
+ colorScheme: ColorScheme;
23
+ /** How the shell lays out its navigation. */
24
+ navigationMode: LayoutMode;
25
+ /** An accent color as `#rrggbb`, or empty to keep the theme's own. */
26
+ accent: string;
27
+ /** The screen template new screens start from, or empty for none. Chosen per level by Cratis/StudioIssues#396. */
28
+ defaultScreenTemplate: string;
29
+ }
@@ -0,0 +1,13 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ import { UiProfileSettings } from './UiProfileSettings';
3
+ /**
4
+ * The profile an application has before anyone applies one: the base component library, the styling
5
+ * packages and the first blueprint the catalog offers as the shell.
6
+ *
7
+ * Preview, the screen editor and Play all fall back to this when nothing has been applied, so an
8
+ * application without a stored profile still renders the same everywhere.
9
+ *
10
+ * @param bundles Every known package bundle.
11
+ * @returns The default settings.
12
+ */
13
+ export declare function defaultUiProfileSettings(bundles: ScenePackageBundle[]): UiProfileSettings;
@@ -0,0 +1,10 @@
1
+ import { UiProfileSettings } from './UiProfileSettings';
2
+ /**
3
+ * Every package the settings name, in the order they are handed to the resolver: `core` first, then the
4
+ * libraries in priority order, then the shell, then the template packs. The resolver is a stable sort, so
5
+ * this order is what decides override priority among packages nothing forces apart.
6
+ *
7
+ * @param settings The settings to read.
8
+ * @returns The distinct explicit package names.
9
+ */
10
+ export declare function explicitPackageNames(settings: UiProfileSettings): string[];
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Fills the `{name}` placeholders of a message.
3
+ *
4
+ * A placeholder with no value is left visible rather than removed, so a missing argument shows up as
5
+ * `{subject}` on screen instead of as a sentence with a silent hole in it.
6
+ *
7
+ * @param template The message, possibly containing `{name}` placeholders.
8
+ * @param values The values to substitute, by placeholder name.
9
+ * @returns The message with every known placeholder replaced.
10
+ */
11
+ export declare function formatMessage(template: string, values: Record<string, string | undefined>): string;
@@ -0,0 +1,18 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ import { ResolvedUiProfile } from './ResolvedUiProfile';
3
+ import { UiProfileSettings } from './UiProfileSettings';
4
+ /** The name of the Scene profile the workspace builds. */
5
+ export declare const uiProfileName = "UI Profile";
6
+ /**
7
+ * Expands the settings into the effective profile.
8
+ *
9
+ * Nothing here decides anything itself: `resolvePackageDependencies` expands and orders the packages,
10
+ * `findComponentCollisions` (`resolveComponentName` over the catalog) says who wins each shared name and
11
+ * `filterCompatibleThemes` narrows the themes. This function only records, per package, whether the user
12
+ * chose it and which resolved packages need it - the part a picker has to explain.
13
+ *
14
+ * @param settings The settings to resolve.
15
+ * @param bundles Every known package bundle.
16
+ * @returns The {@link ResolvedUiProfile}.
17
+ */
18
+ export declare function resolveUiProfile(settings: UiProfileSettings, bundles: ScenePackageBundle[]): ResolvedUiProfile;
@@ -0,0 +1,10 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ /**
3
+ * The layout a blueprint contributes as the application shell: the first one its manifest declares.
4
+ *
5
+ * @param bundles Every known package bundle.
6
+ * @param shell The name of the blueprint.
7
+ * @returns The layout name, or empty when the blueprint is unknown or declares no layout (a template-only
8
+ * blueprint cannot be the shell).
9
+ */
10
+ export declare function shellLayoutOf(bundles: ScenePackageBundle[], shell: string): string;
@@ -0,0 +1,12 @@
1
+ import { UiProfile } from '@cratis/scene.model';
2
+ import { PersistedUiProfile } from './PersistedUiProfile';
3
+ /**
4
+ * Builds the Scene profile a stored UI profile stands for, without needing the package catalog.
5
+ *
6
+ * This is the one place a consumer other than the UI Profile page should turn the stored profile into a
7
+ * Scene `UiProfile`, so the screen editor and anything else rendering a screen agree with the preview.
8
+ *
9
+ * @param persisted The stored profile.
10
+ * @returns The Scene {@link UiProfile}.
11
+ */
12
+ export declare function toSceneUiProfile(persisted: PersistedUiProfile): UiProfile;
@@ -0,0 +1,12 @@
1
+ import { Theme, UiProfile } from '@cratis/scene.model';
2
+ /**
3
+ * Filters a theme list down to the ones a {@link UiProfile} can actually pick - part of StudioIssues#160's
4
+ * theme picker, filtered by the active profile's package list. Reuses `isThemeCompatible` (Cratis/Scene#5)
5
+ * unmodified as the filter predicate, per the issue's own wording ("reusing the exact compiler
6
+ * compatibility check as the filter logic rather than duplicating it").
7
+ *
8
+ * @param profile The active {@link UiProfile}.
9
+ * @param themes Every known {@link Theme}.
10
+ * @returns Only the themes declared compatible with every package `profile` lists.
11
+ */
12
+ export declare function filterCompatibleThemes(profile: UiProfile, themes: Theme[]): Theme[];
@@ -0,0 +1,15 @@
1
+ import { UiProfile } from '@cratis/scene.model';
2
+ import { ComponentResolution, PackageCatalog } from '@cratis/scene.engine';
3
+ /**
4
+ * Finds every bare component name that more than one of a {@link UiProfile}'s active packages declares -
5
+ * part of StudioIssues#160's "component name collision surfacing", so the designer can flag which package
6
+ * currently wins by priority rather than only warning at build time. Reuses `resolveComponentName`
7
+ * (Cratis/Scene#3) unmodified for every catalog name - a collision is exactly a resolution whose
8
+ * `shadows` isn't empty, so no separate collision-detection algorithm exists to drift from resolution
9
+ * itself.
10
+ *
11
+ * @param profile The {@link UiProfile} to check.
12
+ * @param catalog Every active package's declared component names, keyed by package name.
13
+ * @returns The {@link ComponentResolution} for every bare name declared by more than one active package, sorted by name.
14
+ */
15
+ export declare function findComponentCollisions(profile: UiProfile, catalog: PackageCatalog): ComponentResolution[];