@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.
- package/README.md +67 -0
- package/dist/Collections/suppliesBoardEditing.d.ts +2 -0
- package/dist/index.js +1347 -1347
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/BlueprintPreview/blueprintPreviewCatalog.d.ts +57 -0
- package/dist/screen-editor/BlueprintPreview/initialPackageSelection.d.ts +18 -0
- package/dist/screen-editor/IconLibraries/Lucide/index.d.ts +4 -0
- package/dist/screen-editor/IconLibraries/Lucide/lucideAdapter.d.ts +2 -0
- package/dist/screen-editor/IconLibraries/Lucide/lucideCatalog.d.ts +2 -0
- package/dist/screen-editor/IconLibraries/Lucide/lucideManifest.d.ts +3 -0
- package/dist/screen-editor/IconLibraries/Lucide/lucidePackage.d.ts +2 -0
- package/dist/screen-editor/Icons/IconPickerCatalogState.d.ts +5 -0
- package/dist/screen-editor/Icons/IconPropertyField.d.ts +25 -0
- package/dist/screen-editor/Icons/IconPropertyFieldStrings.d.ts +8 -0
- package/dist/screen-editor/Icons/IconValueProblem.d.ts +7 -0
- package/dist/screen-editor/Icons/UseIconPickerCatalogResult.d.ts +7 -0
- package/dist/screen-editor/Icons/describeIconValueProblem.d.ts +3 -0
- package/dist/screen-editor/Icons/diagnoseIconValue.d.ts +5 -0
- package/dist/screen-editor/Icons/effectiveIconCatalogOf.d.ts +3 -0
- package/dist/screen-editor/Icons/iconCatalogSourcesOf.d.ts +3 -0
- package/dist/screen-editor/Icons/toIconPickerCatalog.d.ts +5 -0
- package/dist/screen-editor/Icons/useIconPickerCatalog.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Actions/ActionModel.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Actions/ActionPresentation.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Actions/StateChangeSlice.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Actions/actionBehavior.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Actions/diagnoseAction.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Binding/availableSourcesFor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Binding/bindingScopeTypes.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Binding/previewState.d.ts +17 -0
- package/dist/screen-editor/ScreenEditor/Binding/queryBindingModel.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Binding/settleBinding.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Binding/toSceneCandidates.d.ts +22 -0
- package/dist/screen-editor/ScreenEditor/Collections/orderedItems.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultComponentIcons.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultLayoutIcons.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultLayoutLabels.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultPackageIcons.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultPaletteIcons.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultPaletteSources.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Defaults/defaultScreenEditorStrings.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Document/canvasMoveEdits.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Document/createExternalComponent.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Document/createPanel.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Document/frameworkElement.d.ts +21 -0
- package/dist/screen-editor/ScreenEditor/Document/placeOnCanvas.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Document/readSceneDocument.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Document/studioScreen.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/DropRegions/DropRegion.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/DropRegions/DropRegionKind.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/DropRegions/InsertionAxis.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/DropRegions/computeDropRegions.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Exposure/exposureEdits.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Host/DefaultPaletteHost.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorBoundary.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorControlProviders.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +44 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorFileUpload.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorHost.d.ts +36 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorOverlay.d.ts +24 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorPrimeReactProvider.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorWindow.d.ts +28 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorWorkspace.d.ts +21 -0
- package/dist/screen-editor/ScreenEditor/Host/UnreadableScreen.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Host/WindowTitleBar.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Host/createScreenEditorEnvironment.d.ts +16 -0
- package/dist/screen-editor/ScreenEditor/Host/mergeComponentDefaults.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Host/nextElementId.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/openSubject.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Host/screenEditorPrimeReactDefaults.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Host/useScreenEditor.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ActionEditor.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Inspector/DiagnosticList.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ExposureSection.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Inspector/IconProperties.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Inspector/InspectorTab.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Inspector/LayoutTypeSection.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Inspector/OwnershipBadge.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Inspector/PropertiesPanel.d.ts +17 -0
- package/dist/screen-editor/ScreenEditor/Inspector/QueryBindingEditor.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +109 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenInspector.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Inspector/StructureTree.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Inspector/StructureTreeRow.d.ts +21 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ViewportControls.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Inspector/pointerDropZone.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Layouts/LayoutCatalogEntry.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Layouts/LayoutItem.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Layouts/PanelConstruct.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Layouts/layoutCatalog.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Layouts/layoutChange.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Layouts/toLayoutContainerDescriptors.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Palette/PaletteEntry.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Palette/PaletteFolders.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Palette/buildPalette.d.ts +23 -0
- package/dist/screen-editor/ScreenEditor/Palette/insertedComponentName.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Properties/allowedIconChoices.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Properties/choiceKeys.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Properties/iconDiagnostics.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Properties/propertyEdits.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Properties/toPropertyGroups.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Properties/visibleProperties.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftKind.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftOutcome.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftState.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblem.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblemKind.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProperties.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyField.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyFieldStrings.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonReading.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/defaultJsonPropertyFieldStrings.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/describeJsonProblem.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/formatJson.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/isJsonValueType.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/jsonDraft.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/numberLiteralsOf.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/readJson.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/sameJson.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/useJsonDraft.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/LegacyExtras.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/applyLegacyState.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/layoutContainerItems.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/legacyPlacement.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/projectToLegacyElements.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/sceneComponentName.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PrototypeProjection/withoutNulls.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Runtime/profileColorScheme.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Runtime/profileTheme.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntime.d.ts +17 -0
- package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntimeForProfile.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Runtime/serverPrototypeTypes.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Runtime/useLoadedIconCatalog.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Runtime/withActionPresentation.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Runtime/withPlacementProperties.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Runtime/withSampleContentProperties.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Selection/panelLayoutItem.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Selection/sceneStructureAdapter.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Selection/sceneTree.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Selection/surfaceArrangementOfRoot.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Selection/surfaceLayoutOfRoot.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Selection/toSceneEdits.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Session/EditSession.d.ts +25 -0
- package/dist/screen-editor/ScreenEditor/Session/SessionCell.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Structure/DropZone.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Structure/MoveIntent.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Structure/Ownership.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Structure/OwnershipResolver.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureEdit.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureEditRejection.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureLocation.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureOperation.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureRow.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Structure/StructureTreeAdapter.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Structure/findStructureNode.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Structure/flattenStructure.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Structure/isDeleteKey.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Structure/isOperationPermitted.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Structure/removal.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Structure/resolveMoveIntentEdit.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Structure/resolveTreeDrop.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Structure/surfaceMoveEdit.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Structure/validateStructureEdit.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimeComponent.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimePlaceholder.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/DesignTimePlaceholderTone.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/OverlayPreview.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/SurfaceStrings.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/designTimeRegistry.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/designTimeSamples.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/overlayKinds.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Surface/DesignTime/useRendersVisibleContent.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Surface/DropIndicator.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Surface/ScreenSurface.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Surface/dragPayload.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Surface/dropRegionRects.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Surface/elementRect.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Surface/resolveDropTarget.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Surface/sameMeasurement.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Surface/useSurfaceDrop.d.ts +22 -0
- package/dist/screen-editor/ScreenEditor/Surface/useSurfaceMeasurement.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Templates/composeEditorScreen.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Templates/templateProvenance.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Viewport/ViewportPreset.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Viewport/ViewportSize.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Viewport/detectViewportPreset.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Viewport/resolveViewportSizeClass.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Viewport/toWindowSize.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Viewport/viewportPresets.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/index.d.ts +32 -0
- package/dist/screen-editor/UiProfile/PackageInclusion.d.ts +9 -0
- package/dist/screen-editor/UiProfile/PersistedUiProfile.d.ts +19 -0
- package/dist/screen-editor/UiProfile/ResolvedPackageEntry.d.ts +19 -0
- package/dist/screen-editor/UiProfile/ResolvedUiProfile.d.ts +20 -0
- package/dist/screen-editor/UiProfile/UiProfileSettings.d.ts +29 -0
- package/dist/screen-editor/UiProfile/defaultUiProfileSettings.d.ts +13 -0
- package/dist/screen-editor/UiProfile/explicitPackageNames.d.ts +10 -0
- package/dist/screen-editor/UiProfile/formatMessage.d.ts +11 -0
- package/dist/screen-editor/UiProfile/resolveUiProfile.d.ts +18 -0
- package/dist/screen-editor/UiProfile/shellLayoutOf.d.ts +10 -0
- package/dist/screen-editor/UiProfile/toSceneUiProfile.d.ts +12 -0
- package/dist/screen-editor/UiProfileDesigner/filterCompatibleThemes.d.ts +12 -0
- package/dist/screen-editor/UiProfileDesigner/findComponentCollisions.d.ts +15 -0
- package/dist/screen-editor/catalog-CZx3FR-E.js +4 -0
- package/dist/screen-editor/index.js +4705 -0
- package/dist/screen-editor/screen-editor.css +2 -0
- package/package.json +105 -13
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InspectedProperty } from '@cratis/scene.model';
|
|
2
|
+
import type { JsonPropertyFieldStrings } from './JsonPropertyFieldStrings';
|
|
3
|
+
export interface JsonPropertiesProps {
|
|
4
|
+
properties: readonly InspectedProperty[];
|
|
5
|
+
componentId: string;
|
|
6
|
+
setProperty: (property: InspectedProperty, value: unknown) => void;
|
|
7
|
+
strings?: JsonPropertyFieldStrings;
|
|
8
|
+
}
|
|
9
|
+
export declare const JsonProperties: ({ properties, componentId, setProperty, strings }: JsonPropertiesProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JsonPropertyFieldStrings } from './JsonPropertyFieldStrings';
|
|
2
|
+
export interface JsonPropertyFieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onApply: (value: unknown) => void;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
reason?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
strings: JsonPropertyFieldStrings;
|
|
11
|
+
rows?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const JsonPropertyField: ({ label, description, value, onApply, readOnly, reason, required, strings, rows }: JsonPropertyFieldProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatJson: (value: unknown) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PropertyValueType, type InspectedProperty } from '@cratis/scene.model';
|
|
2
|
+
export declare const jsonValueType = PropertyValueType.Json;
|
|
3
|
+
export declare const isJsonValueType: (valueType: string) => boolean;
|
|
4
|
+
export declare const isJsonProperty: (property: InspectedProperty) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JsonDraftOutcome } from './JsonDraftOutcome';
|
|
2
|
+
import type { JsonDraftState } from './JsonDraftState';
|
|
3
|
+
export declare const startJsonDraft: (value: unknown) => JsonDraftState;
|
|
4
|
+
export declare const editJsonDraft: (state: JsonDraftState, text: string) => JsonDraftState;
|
|
5
|
+
export declare const syncJsonDraft: (state: JsonDraftState, value: unknown) => JsonDraftState;
|
|
6
|
+
export declare const revertJsonDraft: (state: JsonDraftState) => JsonDraftState;
|
|
7
|
+
export declare function resolveJsonDraft(state: JsonDraftState, required: boolean): JsonDraftOutcome;
|
|
8
|
+
export declare function commitJsonDraft(state: JsonDraftState, required: boolean): {
|
|
9
|
+
state: JsonDraftState;
|
|
10
|
+
outcome: JsonDraftOutcome;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function numberLiteralsOf(text: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sameJson(left: unknown, right: unknown): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JsonDraftOutcome } from './JsonDraftOutcome';
|
|
2
|
+
export interface JsonDraft {
|
|
3
|
+
text: string;
|
|
4
|
+
outcome: JsonDraftOutcome;
|
|
5
|
+
edit: (text: string) => void;
|
|
6
|
+
commit: () => void;
|
|
7
|
+
revert: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useJsonDraft(value: unknown, required: boolean, onApply: (value: unknown) => void): JsonDraft;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayoutItem } from '../Layouts/LayoutItem';
|
|
2
|
+
export declare const legacyLayoutLibrary = "StudioLayout";
|
|
3
|
+
export declare function layoutItemOfLegacyType(legacyType: string): LayoutItem | undefined;
|
|
4
|
+
export declare function legacyTypeOfLayoutItem(item: LayoutItem): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withoutNulls<T>(value: T): T;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type DescriptorCatalog, type EffectiveIconCatalog, type PackageCatalog } from '@cratis/scene.engine';
|
|
2
|
+
import type { ComponentDescriptor, UiProfile } from '@cratis/scene.model';
|
|
3
|
+
import { type ComponentRegistry, type IconAdapterRegistry, type ScenePackageBundle } from '@cratis/scene.react';
|
|
4
|
+
export interface ScreenEditorRuntime {
|
|
5
|
+
id: number;
|
|
6
|
+
bundles: ScenePackageBundle[];
|
|
7
|
+
registry: ComponentRegistry;
|
|
8
|
+
packages: PackageCatalog;
|
|
9
|
+
descriptors: ComponentDescriptor[];
|
|
10
|
+
catalog: DescriptorCatalog;
|
|
11
|
+
profile: UiProfile;
|
|
12
|
+
icons: EffectiveIconCatalog;
|
|
13
|
+
iconAdapters: IconAdapterRegistry;
|
|
14
|
+
isKnownComponent: (bareName: string) => boolean;
|
|
15
|
+
legacyTypeOf: (componentName: string) => string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare function createScreenEditorRuntime(bundles: ScenePackageBundle[], profile: UiProfile): ScreenEditorRuntime;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ScenePackageBundle } from '@cratis/scene.react';
|
|
2
|
+
import type { PersistedUiProfile } from '../../UiProfile/PersistedUiProfile';
|
|
3
|
+
import { type ScreenEditorRuntime } from './screenEditorRuntime';
|
|
4
|
+
export declare function screenEditorRuntimeForProfile(applied?: PersistedUiProfile, bundles?: ScenePackageBundle[]): ScreenEditorRuntime;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SceneElement } from '@cratis/scene.model';
|
|
2
|
+
import type { OwnershipResolver } from '../Structure/OwnershipResolver';
|
|
3
|
+
import type { StructureTreeAdapter } from '../Structure/StructureTreeAdapter';
|
|
4
|
+
export declare function createSceneStructureAdapter(ownershipOf: OwnershipResolver): StructureTreeAdapter<SceneElement>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SceneElement } from '@cratis/scene.model';
|
|
2
|
+
export declare function childrenOfElement(element: SceneElement): SceneElement[];
|
|
3
|
+
export declare function everyElementId(roots: readonly SceneElement[]): string[];
|
|
4
|
+
export declare function findSceneElement(roots: readonly SceneElement[], id: string): SceneElement | undefined;
|
|
5
|
+
export declare function parentOf(roots: readonly SceneElement[], id: string): SceneElement | undefined;
|
|
6
|
+
export declare function isCanvasHolding(roots: readonly SceneElement[], id: string): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type InsertNodeEdit, type MoveNodeEdit, type RemoveNodeEdit, type SceneElement } from '@cratis/scene.model';
|
|
2
|
+
import type { StructureEdit } from '../Structure/StructureEdit';
|
|
3
|
+
export declare function toMoveNodeEdit(edit: StructureEdit): MoveNodeEdit | undefined;
|
|
4
|
+
export declare function toInsertNodeEdit(parentId: string, index: number, element: SceneElement): InsertNodeEdit;
|
|
5
|
+
export declare function toRemoveNodeEdit(elementId: string): RemoveNodeEdit;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SceneDiagnostic, SceneDocument, SceneEdit } from '@cratis/scene.model';
|
|
2
|
+
import { type EditingContext } from '@cratis/scene.engine';
|
|
3
|
+
interface Step {
|
|
4
|
+
before: SceneDocument;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScreenEditSession {
|
|
8
|
+
document: SceneDocument;
|
|
9
|
+
undoable: readonly Step[];
|
|
10
|
+
redoable: readonly Step[];
|
|
11
|
+
diagnostics: SceneDiagnostic[];
|
|
12
|
+
isDirty: boolean;
|
|
13
|
+
savedDocument: SceneDocument;
|
|
14
|
+
}
|
|
15
|
+
export declare const maximumHistory = 100;
|
|
16
|
+
export declare function openSession(document: SceneDocument): ScreenEditSession;
|
|
17
|
+
export declare function applyToSession(session: ScreenEditSession, edit: SceneEdit, context: EditingContext, label: string): ScreenEditSession;
|
|
18
|
+
export declare function applyAllToSession(session: ScreenEditSession, edits: SceneEdit[], context: EditingContext, label: string): ScreenEditSession;
|
|
19
|
+
export declare const canUndo: (session: ScreenEditSession) => boolean;
|
|
20
|
+
export declare const canRedo: (session: ScreenEditSession) => boolean;
|
|
21
|
+
export declare function undo(session: ScreenEditSession): ScreenEditSession;
|
|
22
|
+
export declare function redo(session: ScreenEditSession): ScreenEditSession;
|
|
23
|
+
export declare function resetSession(document: SceneDocument): ScreenEditSession;
|
|
24
|
+
export declare function markSaved(session: ScreenEditSession): ScreenEditSession;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ScreenEditSession } from './EditSession';
|
|
2
|
+
export declare class SessionCell {
|
|
3
|
+
private latest;
|
|
4
|
+
private readonly publish;
|
|
5
|
+
constructor(latest: ScreenEditSession, publish: (session: ScreenEditSession) => void);
|
|
6
|
+
get current(): ScreenEditSession;
|
|
7
|
+
commit(change: (current: ScreenEditSession) => ScreenEditSession): ScreenEditSession;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum StructureEditRejection {
|
|
2
|
+
NodeNotFound = "nodeNotFound",
|
|
3
|
+
TargetNotFound = "targetNotFound",
|
|
4
|
+
TargetNotContainer = "targetNotContainer",
|
|
5
|
+
WouldCreateCycle = "wouldCreateCycle",
|
|
6
|
+
NodeLocked = "nodeLocked",
|
|
7
|
+
TargetLocked = "targetLocked",
|
|
8
|
+
NoChange = "noChange"
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LayoutArrangement } from '@cratis/scene/ScreenEditor';
|
|
2
|
+
import type { Ownership } from './Ownership';
|
|
3
|
+
export interface StructureTreeAdapter<T> {
|
|
4
|
+
idOf(node: T): string;
|
|
5
|
+
nameOf(node: T): string;
|
|
6
|
+
childrenOf(node: T): T[];
|
|
7
|
+
withChildren(node: T, children: T[]): T;
|
|
8
|
+
acceptsChildren(node: T): boolean;
|
|
9
|
+
ownershipOf(node: T): Ownership;
|
|
10
|
+
arrangementOf(node: T): LayoutArrangement | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StructureLocation } from './StructureLocation';
|
|
2
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
3
|
+
export declare function findStructureNode<T>(roots: T[], id: string, adapter: StructureTreeAdapter<T>, parent?: T | null): StructureLocation<T> | undefined;
|
|
4
|
+
export declare function isWithinStructureNode<T>(node: T, id: string, adapter: StructureTreeAdapter<T>): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StructureRow } from './StructureRow';
|
|
2
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
3
|
+
export declare function flattenStructure<T>(roots: T[], expandedIds: ReadonlySet<string>, adapter: StructureTreeAdapter<T>, depth?: number, parentId?: string | null): StructureRow<T>[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const isTypingTarget: (target: EventTarget | null) => boolean;
|
|
2
|
+
export interface DeleteKeyEvent {
|
|
3
|
+
key: string;
|
|
4
|
+
ctrlKey: boolean;
|
|
5
|
+
metaKey: boolean;
|
|
6
|
+
altKey: boolean;
|
|
7
|
+
shiftKey: boolean;
|
|
8
|
+
defaultPrevented: boolean;
|
|
9
|
+
repeat?: boolean;
|
|
10
|
+
target: EventTarget | null;
|
|
11
|
+
nativeEvent?: {
|
|
12
|
+
isComposing?: boolean;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const isDeleteKey: (event: DeleteKeyEvent) => boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
2
|
+
export declare function isRemovable<T>(roots: T[], id: string, adapter: StructureTreeAdapter<T>): boolean;
|
|
3
|
+
export declare function selectionAfterRemoval<T>(roots: T[], id: string, adapter: StructureTreeAdapter<T>): string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MoveIntent } from './MoveIntent';
|
|
2
|
+
import type { StructureEdit } from './StructureEdit';
|
|
3
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
4
|
+
export declare function resolveMoveIntentEdit<T>(roots: T[], nodeId: string, intent: MoveIntent, adapter: StructureTreeAdapter<T>): StructureEdit | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropZone } from './DropZone';
|
|
2
|
+
import type { StructureEdit } from './StructureEdit';
|
|
3
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
4
|
+
export declare function resolveTreeDrop<T>(roots: T[], movedId: string, targetId: string, zone: DropZone, adapter: StructureTreeAdapter<T>): StructureEdit | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StructureEdit } from './StructureEdit';
|
|
2
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
3
|
+
export declare function surfaceMoveEdit<T>(roots: T[], adapter: StructureTreeAdapter<T>, movedId: string, containerId: string, markerIndex: number): StructureEdit | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StructureEdit } from './StructureEdit';
|
|
2
|
+
import { StructureEditRejection } from './StructureEditRejection';
|
|
3
|
+
import type { StructureTreeAdapter } from './StructureTreeAdapter';
|
|
4
|
+
export declare function validateStructureEdit<T>(roots: T[], edit: StructureEdit, adapter: StructureTreeAdapter<T>): StructureEditRejection | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import type { RegisteredComponentProps } from '@cratis/scene.react';
|
|
3
|
+
import type { SurfaceStrings } from './SurfaceStrings';
|
|
4
|
+
export declare function designTimeComponent(registryKey: string, Component: ComponentType<RegisteredComponentProps>, strings: SurfaceStrings, message?: ComponentType<RegisteredComponentProps>): ComponentType<RegisteredComponentProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DesignTimePlaceholderTone } from './DesignTimePlaceholderTone';
|
|
2
|
+
export interface DesignTimePlaceholderProps {
|
|
3
|
+
elementId: string;
|
|
4
|
+
tone: DesignTimePlaceholderTone;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DesignTimePlaceholder: ({ elementId, tone, text }: DesignTimePlaceholderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { ExternalComponent } from '@cratis/scene.model';
|
|
3
|
+
import type { RegisteredComponentProps } from '@cratis/scene.react';
|
|
4
|
+
import { OverlayKind } from './overlayKinds';
|
|
5
|
+
export interface OverlayPreviewProps {
|
|
6
|
+
kind: OverlayKind;
|
|
7
|
+
tag: string;
|
|
8
|
+
element: ExternalComponent;
|
|
9
|
+
slots: Record<string, ReactNode[]>;
|
|
10
|
+
message?: ComponentType<RegisteredComponentProps>;
|
|
11
|
+
}
|
|
12
|
+
export declare function OverlayPreview({ kind, tag, element, slots, message }: OverlayPreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SurfaceStrings {
|
|
2
|
+
emptyContainer: string;
|
|
3
|
+
moveHandle: (name: string) => string;
|
|
4
|
+
dropTarget: (where: 'into' | 'between') => string;
|
|
5
|
+
dropDenied: string;
|
|
6
|
+
nothingToShow: (name: string) => string;
|
|
7
|
+
declaration: (name: string) => string;
|
|
8
|
+
sampleContent: (properties: string[]) => string;
|
|
9
|
+
overlay: (name: string) => string;
|
|
10
|
+
unavailable: (name: string) => string;
|
|
11
|
+
failedToDraw: (name: string, reason: string) => string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SampleProperties = Readonly<Record<string, unknown>>;
|
|
2
|
+
export declare const designTimeSamples: Readonly<Record<string, SampleProperties>>;
|
|
3
|
+
export declare const declarationComponents: ReadonlySet<string>;
|
|
4
|
+
export declare const bareNameOf: (componentName: string) => string;
|
|
5
|
+
export declare const sampleOf: (registryKey: string, componentName: string) => SampleProperties | undefined;
|
|
6
|
+
export declare function withSampleProperties(registryKey: string, componentName: string, properties: Readonly<Record<string, unknown>> | undefined): Record<string, unknown>;
|
|
7
|
+
export declare function sampleKeysInUse(registryKey: string, componentName: string, properties: Readonly<Record<string, unknown>> | undefined): string[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BindingResolver } from '@cratis/scene.engine';
|
|
2
|
+
import type { EffectiveConfiguration } from '@cratis/scene.model';
|
|
3
|
+
import type { ScreenEditorController } from '../Host/ScreenEditorController';
|
|
4
|
+
import type { ScreenEditorEnvironment } from '../Host/ScreenEditorHost';
|
|
5
|
+
import type { SurfaceStrings } from './DesignTime/SurfaceStrings';
|
|
6
|
+
export interface ScreenSurfaceProps {
|
|
7
|
+
controller: ScreenEditorController;
|
|
8
|
+
environment: ScreenEditorEnvironment;
|
|
9
|
+
resolveBinding: BindingResolver;
|
|
10
|
+
configuration?: EffectiveConfiguration;
|
|
11
|
+
strings: SurfaceStrings;
|
|
12
|
+
viewportHeight?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const ScreenSurface: ({ controller, environment, resolveBinding, configuration, strings, viewportHeight }: ScreenSurfaceProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DragEvent } from 'react';
|
|
2
|
+
import { type PalettePayload } from '../Palette/PaletteEntry';
|
|
3
|
+
export declare const paletteMediaType = "application/x-studio-palette-item";
|
|
4
|
+
export declare const elementMediaType = "application/x-studio-element";
|
|
5
|
+
export declare function setDragPreview(event: Pick<DragEvent, 'dataTransfer'>, label: string, icon?: Element | null): void;
|
|
6
|
+
export declare const setPaletteDrag: (event: DragEvent, payload: PalettePayload, label?: string) => void;
|
|
7
|
+
export declare const setElementDrag: (event: DragEvent, elementId: string, label: string) => void;
|
|
8
|
+
export declare const readElementDrag: (event: Pick<DragEvent, 'dataTransfer'>) => string | undefined;
|
|
9
|
+
export declare const isElementDrag: (event: Pick<DragEvent, 'dataTransfer'>) => boolean;
|
|
10
|
+
export declare const isSurfaceDrag: (event: Pick<DragEvent, 'dataTransfer'>) => boolean;
|
|
11
|
+
export declare function readPaletteDrag(event: Pick<DragEvent, 'dataTransfer'>): PalettePayload | undefined;
|
|
12
|
+
export declare const isPaletteDrag: (event: Pick<DragEvent, 'dataTransfer'>) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DropRegion } from '../DropRegions/DropRegion';
|
|
2
|
+
export interface Rect {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export type RectOf = (elementId: string) => Rect | undefined;
|
|
9
|
+
export interface PlacedRegion {
|
|
10
|
+
region: DropRegion;
|
|
11
|
+
rect: Rect;
|
|
12
|
+
}
|
|
13
|
+
export declare function placeRegion(region: DropRegion, surface: Rect, rectOf: RectOf): Rect | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlacedRegion, Rect } from './dropRegionRects';
|
|
2
|
+
export interface ResolvedDrop {
|
|
3
|
+
target: PlacedRegion;
|
|
4
|
+
container: Rect;
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveDropTarget(regions: readonly PlacedRegion[], x: number, y: number, edge?: number): ResolvedDrop | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PlacedRegion, Rect } from './dropRegionRects';
|
|
2
|
+
declare const sameRect: (left: Rect | undefined, right: Rect | undefined) => boolean;
|
|
3
|
+
export declare const sameRegions: (left: readonly PlacedRegion[], right: readonly PlacedRegion[]) => boolean;
|
|
4
|
+
export declare const sameSelection: typeof sameRect;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type DragEvent, type RefObject } from 'react';
|
|
2
|
+
import type { ScreenEditorController } from '../Host/ScreenEditorController';
|
|
3
|
+
import type { PlacedRegion } from './dropRegionRects';
|
|
4
|
+
import { type ResolvedDrop } from './resolveDropTarget';
|
|
5
|
+
export interface DragFeedback {
|
|
6
|
+
drop?: ResolvedDrop;
|
|
7
|
+
denied: boolean;
|
|
8
|
+
}
|
|
9
|
+
type Controller = Pick<ScreenEditorController, 'insertComponent' | 'insertLayout' | 'ownershipOf' | 'move' | 'validateMove' | 'composition' | 'adapter'>;
|
|
10
|
+
export declare function useSurfaceDrop(surface: RefObject<HTMLDivElement | null>, measureNow: () => PlacedRegion[], controller: Controller): {
|
|
11
|
+
feedback: DragFeedback | undefined;
|
|
12
|
+
draggedId: string | undefined;
|
|
13
|
+
startMoving: (elementId: string) => void;
|
|
14
|
+
endMoving: () => void;
|
|
15
|
+
handlers: {
|
|
16
|
+
onDragEnter: (event: DragEvent) => void;
|
|
17
|
+
onDragOver: (event: DragEvent) => void;
|
|
18
|
+
onDragLeave: (event: DragEvent) => void;
|
|
19
|
+
onDrop: (event: DragEvent) => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {};
|