@cratis/scene.model 4.2.0 → 4.3.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/common/DestinationReference.ts +18 -0
- package/common/IconReference.ts +22 -0
- package/common/index.ts +2 -0
- package/descriptors/CollectionItemDescriptor.ts +20 -0
- package/descriptors/CollectionOperation.ts +20 -0
- package/descriptors/ComponentDescriptor.ts +33 -0
- package/descriptors/LayoutCapabilities.ts +32 -0
- package/descriptors/LayoutChildPlacement.ts +16 -0
- package/descriptors/LayoutType.ts +28 -0
- package/descriptors/LayoutTypeDescriptor.ts +25 -0
- package/descriptors/PropertyChoice.ts +13 -0
- package/descriptors/PropertyConstraints.ts +41 -0
- package/descriptors/PropertyDescriptor.ts +55 -0
- package/descriptors/PropertyValueType.ts +30 -0
- package/descriptors/index.ts +14 -0
- package/dist/cjs/common/DestinationReference.js +11 -0
- package/dist/cjs/common/DestinationReference.js.map +1 -0
- package/dist/cjs/common/IconReference.js +18 -0
- package/dist/cjs/common/IconReference.js.map +1 -0
- package/dist/cjs/descriptors/CollectionItemDescriptor.js +11 -0
- package/dist/cjs/descriptors/CollectionItemDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/CollectionOperation.js +17 -0
- package/dist/cjs/descriptors/CollectionOperation.js.map +1 -0
- package/dist/cjs/descriptors/ComponentDescriptor.js +14 -0
- package/dist/cjs/descriptors/ComponentDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/LayoutCapabilities.js +15 -0
- package/dist/cjs/descriptors/LayoutCapabilities.js.map +1 -0
- package/dist/cjs/descriptors/LayoutChildPlacement.js +15 -0
- package/dist/cjs/descriptors/LayoutChildPlacement.js.map +1 -0
- package/dist/cjs/descriptors/LayoutType.js +25 -0
- package/dist/cjs/descriptors/LayoutType.js.map +1 -0
- package/dist/cjs/descriptors/LayoutTypeDescriptor.js +14 -0
- package/dist/cjs/descriptors/LayoutTypeDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/PropertyChoice.js +14 -0
- package/dist/cjs/descriptors/PropertyChoice.js.map +1 -0
- package/dist/cjs/descriptors/PropertyConstraints.js +19 -0
- package/dist/cjs/descriptors/PropertyConstraints.js.map +1 -0
- package/dist/cjs/descriptors/PropertyDescriptor.js +20 -0
- package/dist/cjs/descriptors/PropertyDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/PropertyValueType.js +22 -0
- package/dist/cjs/descriptors/PropertyValueType.js.map +1 -0
- package/dist/cjs/editing/AddCollectionItemEdit.js +15 -0
- package/dist/cjs/editing/AddCollectionItemEdit.js.map +1 -0
- package/dist/cjs/editing/ChangeLayoutTypeEdit.js +13 -0
- package/dist/cjs/editing/ChangeLayoutTypeEdit.js.map +1 -0
- package/dist/cjs/editing/DiagnosticCode.js +57 -0
- package/dist/cjs/editing/DiagnosticCode.js.map +1 -0
- package/dist/cjs/editing/DiagnosticSeverity.js +15 -0
- package/dist/cjs/editing/DiagnosticSeverity.js.map +1 -0
- package/dist/cjs/editing/EditCollectionItemEdit.js +16 -0
- package/dist/cjs/editing/EditCollectionItemEdit.js.map +1 -0
- package/dist/cjs/editing/EditTarget.js +14 -0
- package/dist/cjs/editing/EditTarget.js.map +1 -0
- package/dist/cjs/editing/EditingScope.js +12 -0
- package/dist/cjs/editing/EditingScope.js.map +1 -0
- package/dist/cjs/editing/EditingScopeKind.js +16 -0
- package/dist/cjs/editing/EditingScopeKind.js.map +1 -0
- package/dist/cjs/editing/EffectiveCollectionItem.js +15 -0
- package/dist/cjs/editing/EffectiveCollectionItem.js.map +1 -0
- package/dist/cjs/editing/EffectiveComponentConfiguration.js +13 -0
- package/dist/cjs/editing/EffectiveComponentConfiguration.js.map +1 -0
- package/dist/cjs/editing/EffectiveConfiguration.js +11 -0
- package/dist/cjs/editing/EffectiveConfiguration.js.map +1 -0
- package/dist/cjs/editing/EffectivePropertyValue.js +15 -0
- package/dist/cjs/editing/EffectivePropertyValue.js.map +1 -0
- package/dist/cjs/editing/ExposePropertyEdit.js +12 -0
- package/dist/cjs/editing/ExposePropertyEdit.js.map +1 -0
- package/dist/cjs/editing/InsertNodeEdit.js +15 -0
- package/dist/cjs/editing/InsertNodeEdit.js.map +1 -0
- package/dist/cjs/editing/InspectedCollectionItem.js +15 -0
- package/dist/cjs/editing/InspectedCollectionItem.js.map +1 -0
- package/dist/cjs/editing/InspectedProperty.js +18 -0
- package/dist/cjs/editing/InspectedProperty.js.map +1 -0
- package/dist/cjs/editing/MoveNodeEdit.js +14 -0
- package/dist/cjs/editing/MoveNodeEdit.js.map +1 -0
- package/dist/cjs/editing/NodeInspection.js +19 -0
- package/dist/cjs/editing/NodeInspection.js.map +1 -0
- package/dist/cjs/editing/NodeProvenance.js +11 -0
- package/dist/cjs/editing/NodeProvenance.js.map +1 -0
- package/dist/cjs/editing/ProvenanceKind.js +15 -0
- package/dist/cjs/editing/ProvenanceKind.js.map +1 -0
- package/dist/cjs/editing/RemoveCollectionItemEdit.js +14 -0
- package/dist/cjs/editing/RemoveCollectionItemEdit.js.map +1 -0
- package/dist/cjs/editing/RemoveNodeEdit.js +11 -0
- package/dist/cjs/editing/RemoveNodeEdit.js.map +1 -0
- package/dist/cjs/editing/ReorderCollectionItemEdit.js +15 -0
- package/dist/cjs/editing/ReorderCollectionItemEdit.js.map +1 -0
- package/dist/cjs/editing/ResetInstanceValueEdit.js +13 -0
- package/dist/cjs/editing/ResetInstanceValueEdit.js.map +1 -0
- package/dist/cjs/editing/ResetPropertyEdit.js +12 -0
- package/dist/cjs/editing/ResetPropertyEdit.js.map +1 -0
- package/dist/cjs/editing/SceneDiagnostic.js +17 -0
- package/dist/cjs/editing/SceneDiagnostic.js.map +1 -0
- package/dist/cjs/editing/SceneDocument.js +15 -0
- package/dist/cjs/editing/SceneDocument.js.map +1 -0
- package/dist/cjs/editing/SceneEditKind.js +27 -0
- package/dist/cjs/editing/SceneEditKind.js.map +1 -0
- package/dist/cjs/editing/SceneNodeKind.js +21 -0
- package/dist/cjs/editing/SceneNodeKind.js.map +1 -0
- package/dist/cjs/editing/SetInstanceValueEdit.js +14 -0
- package/dist/cjs/editing/SetInstanceValueEdit.js.map +1 -0
- package/dist/cjs/editing/SetPropertyEdit.js +13 -0
- package/dist/cjs/editing/SetPropertyEdit.js.map +1 -0
- package/dist/cjs/editing/UnexposePropertyEdit.js +13 -0
- package/dist/cjs/editing/UnexposePropertyEdit.js.map +1 -0
- package/dist/cjs/editing/ValueSource.js +15 -0
- package/dist/cjs/editing/ValueSource.js.map +1 -0
- package/dist/cjs/exposure/ContributedItem.js +14 -0
- package/dist/cjs/exposure/ContributedItem.js.map +1 -0
- package/dist/cjs/exposure/ExposedProperty.js +15 -0
- package/dist/cjs/exposure/ExposedProperty.js.map +1 -0
- package/dist/cjs/exposure/ExposureDeclaration.js +11 -0
- package/dist/cjs/exposure/ExposureDeclaration.js.map +1 -0
- package/dist/cjs/exposure/InstanceContribution.js +14 -0
- package/dist/cjs/exposure/InstanceContribution.js.map +1 -0
- package/dist/cjs/index.js +118 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/queries/QueryArgumentBinding.js +11 -0
- package/dist/cjs/queries/QueryArgumentBinding.js.map +1 -0
- package/dist/cjs/queries/QueryBinding.js +13 -0
- package/dist/cjs/queries/QueryBinding.js.map +1 -0
- package/dist/cjs/queries/QueryCandidate.js +15 -0
- package/dist/cjs/queries/QueryCandidate.js.map +1 -0
- package/dist/cjs/queries/QueryOrigin.js +12 -0
- package/dist/cjs/queries/QueryOrigin.js.map +1 -0
- package/dist/cjs/queries/QueryOriginKind.js +14 -0
- package/dist/cjs/queries/QueryOriginKind.js.map +1 -0
- package/dist/cjs/queries/QueryParameter.js +14 -0
- package/dist/cjs/queries/QueryParameter.js.map +1 -0
- package/dist/cjs/queries/QueryResultBinding.js +13 -0
- package/dist/cjs/queries/QueryResultBinding.js.map +1 -0
- package/dist/cjs/queries/QueryResultField.js +14 -0
- package/dist/cjs/queries/QueryResultField.js.map +1 -0
- package/dist/cjs/queries/QueryResultShape.js +16 -0
- package/dist/cjs/queries/QueryResultShape.js.map +1 -0
- package/dist/esm/common/DestinationReference.d.ts +7 -0
- package/dist/esm/common/DestinationReference.d.ts.map +1 -0
- package/dist/esm/common/DestinationReference.js +9 -0
- package/dist/esm/common/DestinationReference.js.map +1 -0
- package/dist/esm/common/IconReference.d.ts +7 -0
- package/dist/esm/common/IconReference.d.ts.map +1 -0
- package/dist/esm/common/IconReference.js +16 -0
- package/dist/esm/common/IconReference.js.map +1 -0
- package/dist/esm/common/index.d.ts +2 -0
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/index.js +2 -0
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/descriptors/CollectionItemDescriptor.d.ts +7 -0
- package/dist/esm/descriptors/CollectionItemDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/CollectionItemDescriptor.js +9 -0
- package/dist/esm/descriptors/CollectionItemDescriptor.js.map +1 -0
- package/dist/esm/descriptors/CollectionOperation.d.ts +7 -0
- package/dist/esm/descriptors/CollectionOperation.d.ts.map +1 -0
- package/dist/esm/descriptors/CollectionOperation.js +15 -0
- package/dist/esm/descriptors/CollectionOperation.js.map +1 -0
- package/dist/esm/descriptors/ComponentDescriptor.d.ts +10 -0
- package/dist/esm/descriptors/ComponentDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/ComponentDescriptor.js +12 -0
- package/dist/esm/descriptors/ComponentDescriptor.js.map +1 -0
- package/dist/esm/descriptors/LayoutCapabilities.d.ts +12 -0
- package/dist/esm/descriptors/LayoutCapabilities.d.ts.map +1 -0
- package/dist/esm/descriptors/LayoutCapabilities.js +13 -0
- package/dist/esm/descriptors/LayoutCapabilities.js.map +1 -0
- package/dist/esm/descriptors/LayoutChildPlacement.d.ts +6 -0
- package/dist/esm/descriptors/LayoutChildPlacement.d.ts.map +1 -0
- package/dist/esm/descriptors/LayoutChildPlacement.js +13 -0
- package/dist/esm/descriptors/LayoutChildPlacement.js.map +1 -0
- package/dist/esm/descriptors/LayoutType.d.ts +14 -0
- package/dist/esm/descriptors/LayoutType.d.ts.map +1 -0
- package/dist/esm/descriptors/LayoutType.js +23 -0
- package/dist/esm/descriptors/LayoutType.js.map +1 -0
- package/dist/esm/descriptors/LayoutTypeDescriptor.d.ts +12 -0
- package/dist/esm/descriptors/LayoutTypeDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/LayoutTypeDescriptor.js +12 -0
- package/dist/esm/descriptors/LayoutTypeDescriptor.js.map +1 -0
- package/dist/esm/descriptors/PropertyChoice.d.ts +7 -0
- package/dist/esm/descriptors/PropertyChoice.d.ts.map +1 -0
- package/dist/esm/descriptors/PropertyChoice.js +12 -0
- package/dist/esm/descriptors/PropertyChoice.js.map +1 -0
- package/dist/esm/descriptors/PropertyConstraints.d.ts +15 -0
- package/dist/esm/descriptors/PropertyConstraints.d.ts.map +1 -0
- package/dist/esm/descriptors/PropertyConstraints.js +17 -0
- package/dist/esm/descriptors/PropertyConstraints.js.map +1 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts +19 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/PropertyDescriptor.js +18 -0
- package/dist/esm/descriptors/PropertyDescriptor.js.map +1 -0
- package/dist/esm/descriptors/PropertyValueType.d.ts +12 -0
- package/dist/esm/descriptors/PropertyValueType.d.ts.map +1 -0
- package/dist/esm/descriptors/PropertyValueType.js +20 -0
- package/dist/esm/descriptors/PropertyValueType.js.map +1 -0
- package/dist/esm/descriptors/index.d.ts +12 -0
- package/dist/esm/descriptors/index.d.ts.map +1 -0
- package/dist/esm/descriptors/index.js +12 -0
- package/dist/esm/descriptors/index.js.map +1 -0
- package/dist/esm/editing/AddCollectionItemEdit.d.ts +12 -0
- package/dist/esm/editing/AddCollectionItemEdit.d.ts.map +1 -0
- package/dist/esm/editing/AddCollectionItemEdit.js +13 -0
- package/dist/esm/editing/AddCollectionItemEdit.js.map +1 -0
- package/dist/esm/editing/ChangeLayoutTypeEdit.d.ts +10 -0
- package/dist/esm/editing/ChangeLayoutTypeEdit.d.ts.map +1 -0
- package/dist/esm/editing/ChangeLayoutTypeEdit.js +11 -0
- package/dist/esm/editing/ChangeLayoutTypeEdit.js.map +1 -0
- package/dist/esm/editing/DiagnosticCode.d.ts +41 -0
- package/dist/esm/editing/DiagnosticCode.d.ts.map +1 -0
- package/dist/esm/editing/DiagnosticCode.js +55 -0
- package/dist/esm/editing/DiagnosticCode.js.map +1 -0
- package/dist/esm/editing/DiagnosticSeverity.d.ts +5 -0
- package/dist/esm/editing/DiagnosticSeverity.d.ts.map +1 -0
- package/dist/esm/editing/DiagnosticSeverity.js +13 -0
- package/dist/esm/editing/DiagnosticSeverity.js.map +1 -0
- package/dist/esm/editing/EditCollectionItemEdit.d.ts +12 -0
- package/dist/esm/editing/EditCollectionItemEdit.d.ts.map +1 -0
- package/dist/esm/editing/EditCollectionItemEdit.js +14 -0
- package/dist/esm/editing/EditCollectionItemEdit.js.map +1 -0
- package/dist/esm/editing/EditTarget.d.ts +5 -0
- package/dist/esm/editing/EditTarget.d.ts.map +1 -0
- package/dist/esm/editing/EditTarget.js +12 -0
- package/dist/esm/editing/EditTarget.js.map +1 -0
- package/dist/esm/editing/EditingScope.d.ts +8 -0
- package/dist/esm/editing/EditingScope.d.ts.map +1 -0
- package/dist/esm/editing/EditingScope.js +10 -0
- package/dist/esm/editing/EditingScope.js.map +1 -0
- package/dist/esm/editing/EditingScopeKind.d.ts +7 -0
- package/dist/esm/editing/EditingScopeKind.d.ts.map +1 -0
- package/dist/esm/editing/EditingScopeKind.js +14 -0
- package/dist/esm/editing/EditingScopeKind.js.map +1 -0
- package/dist/esm/editing/EffectiveCollectionItem.d.ts +8 -0
- package/dist/esm/editing/EffectiveCollectionItem.d.ts.map +1 -0
- package/dist/esm/editing/EffectiveCollectionItem.js +13 -0
- package/dist/esm/editing/EffectiveCollectionItem.js.map +1 -0
- package/dist/esm/editing/EffectiveComponentConfiguration.d.ts +9 -0
- package/dist/esm/editing/EffectiveComponentConfiguration.d.ts.map +1 -0
- package/dist/esm/editing/EffectiveComponentConfiguration.js +11 -0
- package/dist/esm/editing/EffectiveComponentConfiguration.js.map +1 -0
- package/dist/esm/editing/EffectiveConfiguration.d.ts +8 -0
- package/dist/esm/editing/EffectiveConfiguration.d.ts.map +1 -0
- package/dist/esm/editing/EffectiveConfiguration.js +9 -0
- package/dist/esm/editing/EffectiveConfiguration.js.map +1 -0
- package/dist/esm/editing/EffectivePropertyValue.d.ts +12 -0
- package/dist/esm/editing/EffectivePropertyValue.d.ts.map +1 -0
- package/dist/esm/editing/EffectivePropertyValue.js +13 -0
- package/dist/esm/editing/EffectivePropertyValue.js.map +1 -0
- package/dist/esm/editing/ExposePropertyEdit.d.ts +9 -0
- package/dist/esm/editing/ExposePropertyEdit.d.ts.map +1 -0
- package/dist/esm/editing/ExposePropertyEdit.js +10 -0
- package/dist/esm/editing/ExposePropertyEdit.js.map +1 -0
- package/dist/esm/editing/InsertNodeEdit.d.ts +13 -0
- package/dist/esm/editing/InsertNodeEdit.d.ts.map +1 -0
- package/dist/esm/editing/InsertNodeEdit.js +13 -0
- package/dist/esm/editing/InsertNodeEdit.js.map +1 -0
- package/dist/esm/editing/InspectedCollectionItem.d.ts +8 -0
- package/dist/esm/editing/InspectedCollectionItem.d.ts.map +1 -0
- package/dist/esm/editing/InspectedCollectionItem.js +13 -0
- package/dist/esm/editing/InspectedCollectionItem.js.map +1 -0
- package/dist/esm/editing/InspectedProperty.d.ts +17 -0
- package/dist/esm/editing/InspectedProperty.d.ts.map +1 -0
- package/dist/esm/editing/InspectedProperty.js +16 -0
- package/dist/esm/editing/InspectedProperty.js.map +1 -0
- package/dist/esm/editing/MoveNodeEdit.d.ts +10 -0
- package/dist/esm/editing/MoveNodeEdit.d.ts.map +1 -0
- package/dist/esm/editing/MoveNodeEdit.js +12 -0
- package/dist/esm/editing/MoveNodeEdit.js.map +1 -0
- package/dist/esm/editing/NodeInspection.d.ts +19 -0
- package/dist/esm/editing/NodeInspection.d.ts.map +1 -0
- package/dist/esm/editing/NodeInspection.js +17 -0
- package/dist/esm/editing/NodeInspection.js.map +1 -0
- package/dist/esm/editing/NodeProvenance.d.ts +7 -0
- package/dist/esm/editing/NodeProvenance.d.ts.map +1 -0
- package/dist/esm/editing/NodeProvenance.js +9 -0
- package/dist/esm/editing/NodeProvenance.js.map +1 -0
- package/dist/esm/editing/ProvenanceKind.d.ts +6 -0
- package/dist/esm/editing/ProvenanceKind.d.ts.map +1 -0
- package/dist/esm/editing/ProvenanceKind.js +13 -0
- package/dist/esm/editing/ProvenanceKind.js.map +1 -0
- package/dist/esm/editing/RemoveCollectionItemEdit.d.ts +10 -0
- package/dist/esm/editing/RemoveCollectionItemEdit.d.ts.map +1 -0
- package/dist/esm/editing/RemoveCollectionItemEdit.js +12 -0
- package/dist/esm/editing/RemoveCollectionItemEdit.js.map +1 -0
- package/dist/esm/editing/RemoveNodeEdit.d.ts +7 -0
- package/dist/esm/editing/RemoveNodeEdit.d.ts.map +1 -0
- package/dist/esm/editing/RemoveNodeEdit.js +9 -0
- package/dist/esm/editing/RemoveNodeEdit.js.map +1 -0
- package/dist/esm/editing/ReorderCollectionItemEdit.d.ts +11 -0
- package/dist/esm/editing/ReorderCollectionItemEdit.d.ts.map +1 -0
- package/dist/esm/editing/ReorderCollectionItemEdit.js +13 -0
- package/dist/esm/editing/ReorderCollectionItemEdit.js.map +1 -0
- package/dist/esm/editing/ResetInstanceValueEdit.d.ts +9 -0
- package/dist/esm/editing/ResetInstanceValueEdit.d.ts.map +1 -0
- package/dist/esm/editing/ResetInstanceValueEdit.js +11 -0
- package/dist/esm/editing/ResetInstanceValueEdit.js.map +1 -0
- package/dist/esm/editing/ResetPropertyEdit.d.ts +8 -0
- package/dist/esm/editing/ResetPropertyEdit.d.ts.map +1 -0
- package/dist/esm/editing/ResetPropertyEdit.js +10 -0
- package/dist/esm/editing/ResetPropertyEdit.js.map +1 -0
- package/dist/esm/editing/SceneDiagnostic.d.ts +14 -0
- package/dist/esm/editing/SceneDiagnostic.d.ts.map +1 -0
- package/dist/esm/editing/SceneDiagnostic.js +15 -0
- package/dist/esm/editing/SceneDiagnostic.js.map +1 -0
- package/dist/esm/editing/SceneDocument.d.ts +13 -0
- package/dist/esm/editing/SceneDocument.d.ts.map +1 -0
- package/dist/esm/editing/SceneDocument.js +13 -0
- package/dist/esm/editing/SceneDocument.js.map +1 -0
- package/dist/esm/editing/SceneEdit.d.ts +16 -0
- package/dist/esm/editing/SceneEdit.d.ts.map +1 -0
- package/dist/esm/editing/SceneEdit.js +2 -0
- package/dist/esm/editing/SceneEdit.js.map +1 -0
- package/dist/esm/editing/SceneEditKind.d.ts +17 -0
- package/dist/esm/editing/SceneEditKind.d.ts.map +1 -0
- package/dist/esm/editing/SceneEditKind.js +25 -0
- package/dist/esm/editing/SceneEditKind.js.map +1 -0
- package/dist/esm/editing/SceneNodeKind.d.ts +12 -0
- package/dist/esm/editing/SceneNodeKind.d.ts.map +1 -0
- package/dist/esm/editing/SceneNodeKind.js +19 -0
- package/dist/esm/editing/SceneNodeKind.js.map +1 -0
- package/dist/esm/editing/SetInstanceValueEdit.d.ts +10 -0
- package/dist/esm/editing/SetInstanceValueEdit.d.ts.map +1 -0
- package/dist/esm/editing/SetInstanceValueEdit.js +12 -0
- package/dist/esm/editing/SetInstanceValueEdit.js.map +1 -0
- package/dist/esm/editing/SetPropertyEdit.d.ts +9 -0
- package/dist/esm/editing/SetPropertyEdit.d.ts.map +1 -0
- package/dist/esm/editing/SetPropertyEdit.js +11 -0
- package/dist/esm/editing/SetPropertyEdit.js.map +1 -0
- package/dist/esm/editing/UnexposePropertyEdit.d.ts +9 -0
- package/dist/esm/editing/UnexposePropertyEdit.d.ts.map +1 -0
- package/dist/esm/editing/UnexposePropertyEdit.js +11 -0
- package/dist/esm/editing/UnexposePropertyEdit.js.map +1 -0
- package/dist/esm/editing/ValueSource.d.ts +6 -0
- package/dist/esm/editing/ValueSource.d.ts.map +1 -0
- package/dist/esm/editing/ValueSource.js +13 -0
- package/dist/esm/editing/ValueSource.js.map +1 -0
- package/dist/esm/editing/index.d.ts +35 -0
- package/dist/esm/editing/index.d.ts.map +1 -0
- package/dist/esm/editing/index.js +35 -0
- package/dist/esm/editing/index.js.map +1 -0
- package/dist/esm/exposure/ContributedItem.d.ts +6 -0
- package/dist/esm/exposure/ContributedItem.d.ts.map +1 -0
- package/dist/esm/exposure/ContributedItem.js +12 -0
- package/dist/esm/exposure/ContributedItem.js.map +1 -0
- package/dist/esm/exposure/ExposedProperty.d.ts +11 -0
- package/dist/esm/exposure/ExposedProperty.d.ts.map +1 -0
- package/dist/esm/exposure/ExposedProperty.js +13 -0
- package/dist/esm/exposure/ExposedProperty.js.map +1 -0
- package/dist/esm/exposure/ExposureDeclaration.d.ts +7 -0
- package/dist/esm/exposure/ExposureDeclaration.d.ts.map +1 -0
- package/dist/esm/exposure/ExposureDeclaration.js +9 -0
- package/dist/esm/exposure/ExposureDeclaration.js.map +1 -0
- package/dist/esm/exposure/InstanceContribution.d.ts +10 -0
- package/dist/esm/exposure/InstanceContribution.d.ts.map +1 -0
- package/dist/esm/exposure/InstanceContribution.js +12 -0
- package/dist/esm/exposure/InstanceContribution.js.map +1 -0
- package/dist/esm/exposure/index.d.ts +5 -0
- package/dist/esm/exposure/index.d.ts.map +1 -0
- package/dist/esm/exposure/index.js +5 -0
- package/dist/esm/exposure/index.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +59 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/queries/QueryArgumentBinding.d.ts +7 -0
- package/dist/esm/queries/QueryArgumentBinding.d.ts.map +1 -0
- package/dist/esm/queries/QueryArgumentBinding.js +9 -0
- package/dist/esm/queries/QueryArgumentBinding.js.map +1 -0
- package/dist/esm/queries/QueryBinding.d.ts +10 -0
- package/dist/esm/queries/QueryBinding.d.ts.map +1 -0
- package/dist/esm/queries/QueryBinding.js +11 -0
- package/dist/esm/queries/QueryBinding.js.map +1 -0
- package/dist/esm/queries/QueryCandidate.d.ts +14 -0
- package/dist/esm/queries/QueryCandidate.d.ts.map +1 -0
- package/dist/esm/queries/QueryCandidate.js +13 -0
- package/dist/esm/queries/QueryCandidate.js.map +1 -0
- package/dist/esm/queries/QueryOrigin.d.ts +8 -0
- package/dist/esm/queries/QueryOrigin.d.ts.map +1 -0
- package/dist/esm/queries/QueryOrigin.js +10 -0
- package/dist/esm/queries/QueryOrigin.js.map +1 -0
- package/dist/esm/queries/QueryOriginKind.d.ts +5 -0
- package/dist/esm/queries/QueryOriginKind.d.ts.map +1 -0
- package/dist/esm/queries/QueryOriginKind.js +12 -0
- package/dist/esm/queries/QueryOriginKind.js.map +1 -0
- package/dist/esm/queries/QueryParameter.d.ts +7 -0
- package/dist/esm/queries/QueryParameter.d.ts.map +1 -0
- package/dist/esm/queries/QueryParameter.js +12 -0
- package/dist/esm/queries/QueryParameter.js.map +1 -0
- package/dist/esm/queries/QueryResultBinding.d.ts +6 -0
- package/dist/esm/queries/QueryResultBinding.d.ts.map +1 -0
- package/dist/esm/queries/QueryResultBinding.js +11 -0
- package/dist/esm/queries/QueryResultBinding.js.map +1 -0
- package/dist/esm/queries/QueryResultField.d.ts +7 -0
- package/dist/esm/queries/QueryResultField.d.ts.map +1 -0
- package/dist/esm/queries/QueryResultField.js +12 -0
- package/dist/esm/queries/QueryResultField.js.map +1 -0
- package/dist/esm/queries/QueryResultShape.d.ts +6 -0
- package/dist/esm/queries/QueryResultShape.d.ts.map +1 -0
- package/dist/esm/queries/QueryResultShape.js +14 -0
- package/dist/esm/queries/QueryResultShape.js.map +1 -0
- package/dist/esm/queries/index.d.ts +10 -0
- package/dist/esm/queries/index.d.ts.map +1 -0
- package/dist/esm/queries/index.js +10 -0
- package/dist/esm/queries/index.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/editing/AddCollectionItemEdit.ts +21 -0
- package/editing/ChangeLayoutTypeEdit.ts +22 -0
- package/editing/DiagnosticCode.ts +58 -0
- package/editing/DiagnosticSeverity.ts +11 -0
- package/editing/EditCollectionItemEdit.ts +23 -0
- package/editing/EditTarget.ts +13 -0
- package/editing/EditingScope.ts +24 -0
- package/editing/EditingScopeKind.ts +12 -0
- package/editing/EffectiveCollectionItem.ts +18 -0
- package/editing/EffectiveComponentConfiguration.ts +26 -0
- package/editing/EffectiveConfiguration.ts +23 -0
- package/editing/EffectivePropertyValue.ts +31 -0
- package/editing/ExposePropertyEdit.ts +18 -0
- package/editing/InsertNodeEdit.ts +30 -0
- package/editing/InspectedCollectionItem.ts +18 -0
- package/editing/InspectedProperty.ts +43 -0
- package/editing/MoveNodeEdit.ts +19 -0
- package/editing/NodeInspection.ts +46 -0
- package/editing/NodeProvenance.ts +16 -0
- package/editing/ProvenanceKind.ts +16 -0
- package/editing/RemoveCollectionItemEdit.ts +17 -0
- package/editing/RemoveNodeEdit.ts +14 -0
- package/editing/ReorderCollectionItemEdit.ts +20 -0
- package/editing/ResetInstanceValueEdit.ts +17 -0
- package/editing/ResetPropertyEdit.ts +15 -0
- package/editing/SceneDiagnostic.ts +34 -0
- package/editing/SceneDocument.ts +32 -0
- package/editing/SceneEdit.ts +36 -0
- package/editing/SceneEditKind.ts +23 -0
- package/editing/SceneNodeKind.ts +27 -0
- package/editing/SetInstanceValueEdit.ts +19 -0
- package/editing/SetPropertyEdit.ts +18 -0
- package/editing/UnexposePropertyEdit.ts +16 -0
- package/editing/ValueSource.ts +16 -0
- package/editing/index.ts +37 -0
- package/exposure/ContributedItem.ts +15 -0
- package/exposure/ExposedProperty.ts +46 -0
- package/exposure/ExposureDeclaration.ts +16 -0
- package/exposure/InstanceContribution.ts +36 -0
- package/exposure/index.ts +7 -0
- package/index.ts +4 -0
- package/package.json +3 -2
- package/queries/QueryArgumentBinding.ts +17 -0
- package/queries/QueryBinding.ts +22 -0
- package/queries/QueryCandidate.ts +37 -0
- package/queries/QueryOrigin.ts +18 -0
- package/queries/QueryOriginKind.ts +13 -0
- package/queries/QueryParameter.ts +16 -0
- package/queries/QueryResultBinding.ts +15 -0
- package/queries/QueryResultField.ts +17 -0
- package/queries/QueryResultShape.ts +17 -0
- package/queries/index.ts +12 -0
- package/dist/esm/for_shape/when_checking_the_mirror_matches_the_shared_manifest.d.ts +0 -2
- package/dist/esm/for_shape/when_checking_the_mirror_matches_the_shared_manifest.d.ts.map +0 -1
- package/dist/esm/for_shape/when_checking_the_mirror_matches_the_shared_manifest.js +0 -22
- package/dist/esm/for_shape/when_checking_the_mirror_matches_the_shared_manifest.js.map +0 -1
- package/for_shape/when_checking_the_mirror_matches_the_shared_manifest.ts +0 -32
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ContributedItem } from '../exposure';
|
|
5
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Adds an item to an exposed collection from a template instance.
|
|
9
|
+
*/
|
|
10
|
+
export interface AddCollectionItemEdit {
|
|
11
|
+
kind: SceneEditKind.AddCollectionItem;
|
|
12
|
+
instance?: string;
|
|
13
|
+
component: string;
|
|
14
|
+
path: string;
|
|
15
|
+
item: ContributedItem;
|
|
16
|
+
|
|
17
|
+
/** Where among the instance's own items. Absent appends. */
|
|
18
|
+
index?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const AddCollectionItemEditPropertyNames: (keyof AddCollectionItemEdit)[] = ['kind', 'instance', 'component', 'path', 'item', 'index'];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { LayoutType } from '../descriptors';
|
|
5
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Changes a layout node into another layout type, keeping its children.
|
|
9
|
+
*/
|
|
10
|
+
export interface ChangeLayoutTypeEdit {
|
|
11
|
+
kind: SceneEditKind.ChangeLayoutType;
|
|
12
|
+
nodeId: string;
|
|
13
|
+
to: `${LayoutType}`;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Whether the author has seen what the conversion drops and accepts it. Without it a lossy conversion is
|
|
17
|
+
* refused with a diagnostic naming what would be lost.
|
|
18
|
+
*/
|
|
19
|
+
acceptLoss?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ChangeLayoutTypeEditPropertyNames: (keyof ChangeLayoutTypeEdit)[] = ['kind', 'nodeId', 'to', 'acceptLoss'];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The reasons inspection, editing, binding validation and configuration resolution report a problem. A host
|
|
6
|
+
* switches on the code; the message is for a person.
|
|
7
|
+
*/
|
|
8
|
+
export enum DiagnosticCode {
|
|
9
|
+
// Addressing
|
|
10
|
+
UnknownNode = 'unknownNode',
|
|
11
|
+
DuplicateElementId = 'duplicateElementId',
|
|
12
|
+
UnknownScope = 'unknownScope',
|
|
13
|
+
InvalidEdit = 'invalidEdit',
|
|
14
|
+
|
|
15
|
+
// Properties
|
|
16
|
+
UnknownProperty = 'unknownProperty',
|
|
17
|
+
InvalidValue = 'invalidValue',
|
|
18
|
+
ReadOnlyProperty = 'readOnlyProperty',
|
|
19
|
+
NodeNotEditable = 'nodeNotEditable',
|
|
20
|
+
MissingComponentDescriptor = 'missingComponentDescriptor',
|
|
21
|
+
|
|
22
|
+
// Layout
|
|
23
|
+
NotALayoutNode = 'notALayoutNode',
|
|
24
|
+
LayoutTypeNotConvertible = 'layoutTypeNotConvertible',
|
|
25
|
+
LossyConversionNotAccepted = 'lossyConversionNotAccepted',
|
|
26
|
+
LossyConversion = 'lossyConversion',
|
|
27
|
+
|
|
28
|
+
// Structure
|
|
29
|
+
TargetDoesNotAcceptChildren = 'targetDoesNotAcceptChildren',
|
|
30
|
+
UnknownSlot = 'unknownSlot',
|
|
31
|
+
ContainmentCycle = 'containmentCycle',
|
|
32
|
+
IndexOutOfRange = 'indexOutOfRange',
|
|
33
|
+
ElementIdInUse = 'elementIdInUse',
|
|
34
|
+
MaximumChildrenExceeded = 'maximumChildrenExceeded',
|
|
35
|
+
NodeNotRemovable = 'nodeNotRemovable',
|
|
36
|
+
|
|
37
|
+
// Query binding
|
|
38
|
+
MissingQuery = 'missingQuery',
|
|
39
|
+
IncompatibleResultShape = 'incompatibleResultShape',
|
|
40
|
+
MissingRequiredParameter = 'missingRequiredParameter',
|
|
41
|
+
UnknownParameter = 'unknownParameter',
|
|
42
|
+
ArgumentTypeMismatch = 'argumentTypeMismatch',
|
|
43
|
+
UnresolvedArgumentSource = 'unresolvedArgumentSource',
|
|
44
|
+
UnknownResultField = 'unknownResultField',
|
|
45
|
+
|
|
46
|
+
// Exposure and instance configuration
|
|
47
|
+
ExposureTargetMissing = 'exposureTargetMissing',
|
|
48
|
+
ExposureWidensOwner = 'exposureWidensOwner',
|
|
49
|
+
ReExposureBroken = 'reExposureBroken',
|
|
50
|
+
ContributionNotExposed = 'contributionNotExposed',
|
|
51
|
+
ContributionTargetMissing = 'contributionTargetMissing',
|
|
52
|
+
ContributionTypeMismatch = 'contributionTypeMismatch',
|
|
53
|
+
ContributionOperationNotPermitted = 'contributionOperationNotPermitted',
|
|
54
|
+
UnknownCollectionField = 'unknownCollectionField',
|
|
55
|
+
CollectionItemNotFound = 'collectionItemNotFound',
|
|
56
|
+
DuplicateCollectionItem = 'duplicateCollectionItem',
|
|
57
|
+
UnknownInstance = 'unknownInstance',
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How serious a diagnostic is. An edit with an `Error` is refused; a `Warning` is reported and the edit goes
|
|
6
|
+
* ahead.
|
|
7
|
+
*/
|
|
8
|
+
export enum DiagnosticSeverity {
|
|
9
|
+
Error = 'error',
|
|
10
|
+
Warning = 'warning',
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Changes one field of an item an instance contributed.
|
|
8
|
+
*/
|
|
9
|
+
export interface EditCollectionItemEdit {
|
|
10
|
+
kind: SceneEditKind.EditCollectionItem;
|
|
11
|
+
instance?: string;
|
|
12
|
+
component: string;
|
|
13
|
+
path: string;
|
|
14
|
+
itemId: string;
|
|
15
|
+
|
|
16
|
+
/** The item field, as the collection's item descriptor states it. */
|
|
17
|
+
field: string;
|
|
18
|
+
value: unknown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const EditCollectionItemEditPropertyNames: (keyof EditCollectionItemEdit)[] = [
|
|
22
|
+
'kind', 'instance', 'component', 'path', 'itemId', 'field', 'value',
|
|
23
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Where an edit of a property goes.
|
|
6
|
+
*/
|
|
7
|
+
export enum EditTarget {
|
|
8
|
+
/** The node itself. */
|
|
9
|
+
Node = 'node',
|
|
10
|
+
|
|
11
|
+
/** An instance contribution, because the node is inherited and the property is exposed. */
|
|
12
|
+
Instance = 'instance',
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { EditingScopeKind } from './EditingScopeKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The thing being edited. What it owns is local and editable; what an outer layout or template owns is inherited,
|
|
8
|
+
* and can only be configured through what that owner exposed.
|
|
9
|
+
*/
|
|
10
|
+
export interface EditingScope {
|
|
11
|
+
kind: `${EditingScopeKind}`;
|
|
12
|
+
|
|
13
|
+
/** The name of the screen, template or layout. */
|
|
14
|
+
name: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* For a template scope: the name of the layout the template ultimately sits in. A template does not say
|
|
18
|
+
* which layout it belongs to, so a document with several layouts needs to be told. A screen scope reads it
|
|
19
|
+
* from the screen itself.
|
|
20
|
+
*/
|
|
21
|
+
layout?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const EditingScopePropertyNames: (keyof EditingScope)[] = ['kind', 'name', 'layout'];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What is being edited. It decides what counts as local and what is inherited.
|
|
6
|
+
*/
|
|
7
|
+
export enum EditingScopeKind {
|
|
8
|
+
Screen = 'screen',
|
|
9
|
+
ScreenTemplate = 'screenTemplate',
|
|
10
|
+
DialogTemplate = 'dialogTemplate',
|
|
11
|
+
Layout = 'layout',
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One item of a collection after the owner's items and every instance's contributed items are put together.
|
|
6
|
+
*/
|
|
7
|
+
export interface EffectiveCollectionItem {
|
|
8
|
+
id: string;
|
|
9
|
+
values: Record<string, unknown>;
|
|
10
|
+
|
|
11
|
+
/** `owner` for an item the template author wrote; otherwise the id of the instance that contributed it. */
|
|
12
|
+
origin: string;
|
|
13
|
+
|
|
14
|
+
/** An owner's item. Consumers cannot change or remove it. */
|
|
15
|
+
fixed: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const EffectiveCollectionItemPropertyNames: (keyof EffectiveCollectionItem)[] = ['id', 'values', 'origin', 'fixed'];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { EffectivePropertyValue } from './EffectivePropertyValue';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The resolved configuration of one component: the full property bag a renderer should use, and a record per
|
|
8
|
+
* exposed property of where it came from.
|
|
9
|
+
*/
|
|
10
|
+
export interface EffectiveComponentConfiguration {
|
|
11
|
+
/** The id of the element. */
|
|
12
|
+
component: string;
|
|
13
|
+
|
|
14
|
+
/** The name of the layout or template that owns the element. */
|
|
15
|
+
owner: string;
|
|
16
|
+
|
|
17
|
+
/** The element's `properties` with every valid contribution applied. */
|
|
18
|
+
properties: Record<string, unknown>;
|
|
19
|
+
|
|
20
|
+
/** One entry per exposed property. */
|
|
21
|
+
values: EffectivePropertyValue[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const EffectiveComponentConfigurationPropertyNames: (keyof EffectiveComponentConfiguration)[] = [
|
|
25
|
+
'component', 'owner', 'properties', 'values',
|
|
26
|
+
];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { EffectiveComponentConfiguration } from './EffectiveComponentConfiguration';
|
|
5
|
+
import { SceneDiagnostic } from './SceneDiagnostic';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The outcome of resolving a template chain and its instances' contributions. The runtime renders from this, and
|
|
9
|
+
* the editor shows it - the same data, so what the editor shows is what Play renders.
|
|
10
|
+
*/
|
|
11
|
+
export interface EffectiveConfiguration {
|
|
12
|
+
/** Every configurable component in the chain. Components nothing is exposed on are absent. */
|
|
13
|
+
components: EffectiveComponentConfiguration[];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* What went wrong: an exposure that no longer matches its component, a contribution to something no longer
|
|
17
|
+
* exposed, a saved value whose type changed. The affected contributions are ignored in `components` and left
|
|
18
|
+
* in the persisted data, so restoring the exposure brings the values back.
|
|
19
|
+
*/
|
|
20
|
+
diagnostics: SceneDiagnostic[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const EffectiveConfigurationPropertyNames: (keyof EffectiveConfiguration)[] = ['components', 'diagnostics'];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { EffectiveCollectionItem } from './EffectiveCollectionItem';
|
|
5
|
+
import { ValueSource } from './ValueSource';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One property's value after configuration is resolved, with enough to show where it came from and what
|
|
9
|
+
* resetting it would give back.
|
|
10
|
+
*/
|
|
11
|
+
export interface EffectivePropertyValue {
|
|
12
|
+
path: string;
|
|
13
|
+
|
|
14
|
+
/** What the property is worth now. */
|
|
15
|
+
value: unknown;
|
|
16
|
+
|
|
17
|
+
source: `${ValueSource}`;
|
|
18
|
+
|
|
19
|
+
/** What the property would be worth with every instance contribution removed. */
|
|
20
|
+
inheritedValue: unknown;
|
|
21
|
+
|
|
22
|
+
/** The instance that set `value`, when `source` is `instance`. */
|
|
23
|
+
contributedBy?: string;
|
|
24
|
+
|
|
25
|
+
/** For a collection: the items, owner's first. */
|
|
26
|
+
items?: EffectiveCollectionItem[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const EffectivePropertyValuePropertyNames: (keyof EffectivePropertyValue)[] = [
|
|
30
|
+
'path', 'value', 'source', 'inheritedValue', 'contributedBy', 'items',
|
|
31
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ExposedProperty } from '../exposure';
|
|
5
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Exposes a property on a layout or template, or changes how it is exposed.
|
|
9
|
+
*/
|
|
10
|
+
export interface ExposePropertyEdit {
|
|
11
|
+
kind: SceneEditKind.ExposeProperty;
|
|
12
|
+
|
|
13
|
+
/** The layout or template making the declaration. */
|
|
14
|
+
owner: string;
|
|
15
|
+
property: ExposedProperty;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const ExposePropertyEditPropertyNames: (keyof ExposePropertyEdit)[] = ['kind', 'owner', 'property'];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { FlowNode } from '../layouts';
|
|
5
|
+
import { SceneElement } from '../elements';
|
|
6
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Inserts a new element - or, into a flow container, a new flow node - under a target.
|
|
10
|
+
*
|
|
11
|
+
* The target is a slot node, an element (an `ExternalComponent` with `slot`, or a panel) or a flow container.
|
|
12
|
+
* Exactly one of `element` and `flowNode` is given.
|
|
13
|
+
*/
|
|
14
|
+
export interface InsertNodeEdit {
|
|
15
|
+
kind: SceneEditKind.InsertNode;
|
|
16
|
+
|
|
17
|
+
/** The id of the node to insert under. */
|
|
18
|
+
target: string;
|
|
19
|
+
|
|
20
|
+
/** The named slot of an `ExternalComponent` target to insert into. */
|
|
21
|
+
slot?: string;
|
|
22
|
+
|
|
23
|
+
/** Where among the target's children. Absent appends. */
|
|
24
|
+
index?: number;
|
|
25
|
+
|
|
26
|
+
element?: SceneElement;
|
|
27
|
+
flowNode?: FlowNode;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const InsertNodeEditPropertyNames: (keyof InsertNodeEdit)[] = ['kind', 'target', 'slot', 'index', 'element', 'flowNode'];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One item of an inspected collection.
|
|
6
|
+
*/
|
|
7
|
+
export interface InspectedCollectionItem {
|
|
8
|
+
id: string;
|
|
9
|
+
values: Record<string, unknown>;
|
|
10
|
+
|
|
11
|
+
/** `owner` for the template author's item; otherwise the contributing instance. */
|
|
12
|
+
origin: string;
|
|
13
|
+
|
|
14
|
+
/** Whether the editing scope may change or remove this item. */
|
|
15
|
+
editable: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const InspectedCollectionItemPropertyNames: (keyof InspectedCollectionItem)[] = ['id', 'values', 'origin', 'editable'];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { CollectionOperation, PropertyDescriptor } from '../descriptors';
|
|
5
|
+
import { EditTarget } from './EditTarget';
|
|
6
|
+
import { InspectedCollectionItem } from './InspectedCollectionItem';
|
|
7
|
+
import { ValueSource } from './ValueSource';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* One property of an inspected node: its descriptor, its current and effective values, and whether - and
|
|
11
|
+
* through what - the editing scope can change it.
|
|
12
|
+
*/
|
|
13
|
+
export interface InspectedProperty {
|
|
14
|
+
descriptor: PropertyDescriptor;
|
|
15
|
+
|
|
16
|
+
/** The value stored on the node, or `undefined` when none is. */
|
|
17
|
+
currentValue: unknown;
|
|
18
|
+
|
|
19
|
+
/** What the property is worth after defaults and instance contributions. */
|
|
20
|
+
effectiveValue: unknown;
|
|
21
|
+
|
|
22
|
+
/** Where `effectiveValue` came from. */
|
|
23
|
+
source: `${ValueSource}`;
|
|
24
|
+
|
|
25
|
+
/** Whether the editing scope can change the property at all. */
|
|
26
|
+
editable: boolean;
|
|
27
|
+
|
|
28
|
+
/** Where an edit goes. Absent when the property is not editable. */
|
|
29
|
+
editTarget?: `${EditTarget}`;
|
|
30
|
+
|
|
31
|
+
/** Why the property is not editable. */
|
|
32
|
+
reason?: string;
|
|
33
|
+
|
|
34
|
+
/** For an exposed collection: what the editing scope may do with it. */
|
|
35
|
+
operations?: CollectionOperation[];
|
|
36
|
+
|
|
37
|
+
/** For a collection: the items, owner's first. */
|
|
38
|
+
items?: InspectedCollectionItem[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const InspectedPropertyPropertyNames: (keyof InspectedProperty)[] = [
|
|
42
|
+
'descriptor', 'currentValue', 'effectiveValue', 'source', 'editable', 'editTarget', 'reason', 'operations', 'items',
|
|
43
|
+
];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Moves a node - reordering it within its parent or reparenting it - checking containment and cycles.
|
|
8
|
+
*/
|
|
9
|
+
export interface MoveNodeEdit {
|
|
10
|
+
kind: SceneEditKind.MoveNode;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
|
|
13
|
+
/** The id of the node to move under. */
|
|
14
|
+
target: string;
|
|
15
|
+
slot?: string;
|
|
16
|
+
index?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const MoveNodeEditPropertyNames: (keyof MoveNodeEdit)[] = ['kind', 'nodeId', 'target', 'slot', 'index'];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { LayoutCapabilities } from '../descriptors';
|
|
5
|
+
import { InspectedProperty } from './InspectedProperty';
|
|
6
|
+
import { NodeProvenance } from './NodeProvenance';
|
|
7
|
+
import { SceneDiagnostic } from './SceneDiagnostic';
|
|
8
|
+
import { SceneNodeKind } from './SceneNodeKind';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* What an editor needs to know about one node: what it is, where it comes from, what can be edited on it and
|
|
12
|
+
* what can be done with it.
|
|
13
|
+
*/
|
|
14
|
+
export interface NodeInspection {
|
|
15
|
+
nodeId: string;
|
|
16
|
+
kind: `${SceneNodeKind}`;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* What sort of node: a {@link LayoutType} for a layout node, the component name for an element
|
|
20
|
+
* that is a component, otherwise the element's kind.
|
|
21
|
+
*/
|
|
22
|
+
typeId: string;
|
|
23
|
+
|
|
24
|
+
/** A name for a tree or an inspector title. */
|
|
25
|
+
label: string;
|
|
26
|
+
|
|
27
|
+
/** The id of the node that contains this one, when there is one. */
|
|
28
|
+
parentId?: string;
|
|
29
|
+
|
|
30
|
+
provenance: NodeProvenance;
|
|
31
|
+
|
|
32
|
+
/** Every property with a descriptor, with its values and editability. */
|
|
33
|
+
properties: InspectedProperty[];
|
|
34
|
+
|
|
35
|
+
/** For a layout node: what the layout type can do. */
|
|
36
|
+
capabilities?: LayoutCapabilities;
|
|
37
|
+
|
|
38
|
+
/** Whether the node can be removed or moved by the editing scope. */
|
|
39
|
+
removable: boolean;
|
|
40
|
+
|
|
41
|
+
diagnostics: SceneDiagnostic[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const NodeInspectionPropertyNames: (keyof NodeInspection)[] = [
|
|
45
|
+
'nodeId', 'kind', 'typeId', 'label', 'parentId', 'provenance', 'properties', 'capabilities', 'removable', 'diagnostics',
|
|
46
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ProvenanceKind } from './ProvenanceKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Whether a node is the editing scope's own or comes from further out, and from where.
|
|
8
|
+
*/
|
|
9
|
+
export interface NodeProvenance {
|
|
10
|
+
kind: `${ProvenanceKind}`;
|
|
11
|
+
|
|
12
|
+
/** For an inherited node: the name of the layout or template that owns it. */
|
|
13
|
+
source?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const NodeProvenancePropertyNames: (keyof NodeProvenance)[] = ['kind', 'source'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Where a node comes from, relative to the editing scope.
|
|
6
|
+
*/
|
|
7
|
+
export enum ProvenanceKind {
|
|
8
|
+
/** Owned by the thing being edited. Fully editable. */
|
|
9
|
+
Local = 'local',
|
|
10
|
+
|
|
11
|
+
/** Owned by an outer layout or template that exposed nothing on it. Read-only here. */
|
|
12
|
+
Inherited = 'inherited',
|
|
13
|
+
|
|
14
|
+
/** Owned by an outer layout or template that exposed some of its properties. Those can be configured here. */
|
|
15
|
+
ConfigurableInherited = 'configurableInherited',
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Removes an item an instance contributed to an exposed collection.
|
|
8
|
+
*/
|
|
9
|
+
export interface RemoveCollectionItemEdit {
|
|
10
|
+
kind: SceneEditKind.RemoveCollectionItem;
|
|
11
|
+
instance?: string;
|
|
12
|
+
component: string;
|
|
13
|
+
path: string;
|
|
14
|
+
itemId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const RemoveCollectionItemEditPropertyNames: (keyof RemoveCollectionItemEdit)[] = ['kind', 'instance', 'component', 'path', 'itemId'];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Removes a node and everything under it.
|
|
8
|
+
*/
|
|
9
|
+
export interface RemoveNodeEdit {
|
|
10
|
+
kind: SceneEditKind.RemoveNode;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const RemoveNodeEditPropertyNames: (keyof RemoveNodeEdit)[] = ['kind', 'nodeId'];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Moves an item an instance contributed to another place among that instance's own items.
|
|
8
|
+
*/
|
|
9
|
+
export interface ReorderCollectionItemEdit {
|
|
10
|
+
kind: SceneEditKind.ReorderCollectionItem;
|
|
11
|
+
instance?: string;
|
|
12
|
+
component: string;
|
|
13
|
+
path: string;
|
|
14
|
+
itemId: string;
|
|
15
|
+
index: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const ReorderCollectionItemEditPropertyNames: (keyof ReorderCollectionItemEdit)[] = [
|
|
19
|
+
'kind', 'instance', 'component', 'path', 'itemId', 'index',
|
|
20
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Removes what an instance set on an exposed property, so the inherited value applies again. For a collection it
|
|
8
|
+
* removes every item the instance contributed.
|
|
9
|
+
*/
|
|
10
|
+
export interface ResetInstanceValueEdit {
|
|
11
|
+
kind: SceneEditKind.ResetInstanceValue;
|
|
12
|
+
instance?: string;
|
|
13
|
+
component: string;
|
|
14
|
+
path: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const ResetInstanceValueEditPropertyNames: (keyof ResetInstanceValueEdit)[] = ['kind', 'instance', 'component', 'path'];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Removes a property's stored value, so the descriptor's default applies again.
|
|
8
|
+
*/
|
|
9
|
+
export interface ResetPropertyEdit {
|
|
10
|
+
kind: SceneEditKind.ResetProperty;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ResetPropertyEditPropertyNames: (keyof ResetPropertyEdit)[] = ['kind', 'nodeId', 'path'];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { DiagnosticCode } from './DiagnosticCode';
|
|
5
|
+
import { DiagnosticSeverity } from './DiagnosticSeverity';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One finding from inspecting, editing, validating or resolving. Plain data, so a host can show it, persist it or
|
|
9
|
+
* ship it to another process.
|
|
10
|
+
*/
|
|
11
|
+
export interface SceneDiagnostic {
|
|
12
|
+
code: `${DiagnosticCode}`;
|
|
13
|
+
severity: `${DiagnosticSeverity}`;
|
|
14
|
+
message: string;
|
|
15
|
+
|
|
16
|
+
/** The node the finding is about, when there is one. */
|
|
17
|
+
nodeId?: string;
|
|
18
|
+
|
|
19
|
+
/** The instance the finding is about. */
|
|
20
|
+
instance?: string;
|
|
21
|
+
|
|
22
|
+
/** The id of the component the finding is about. */
|
|
23
|
+
component?: string;
|
|
24
|
+
|
|
25
|
+
/** The property path the finding is about. */
|
|
26
|
+
path?: string;
|
|
27
|
+
|
|
28
|
+
/** The collection item the finding is about. */
|
|
29
|
+
itemId?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const SceneDiagnosticPropertyNames: (keyof SceneDiagnostic)[] = [
|
|
33
|
+
'code', 'severity', 'message', 'nodeId', 'instance', 'component', 'path', 'itemId',
|
|
34
|
+
];
|