@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,32 @@
|
|
|
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 { ExposureDeclaration, InstanceContribution } from '../exposure';
|
|
5
|
+
import { Layout } from '../layouts';
|
|
6
|
+
import { DialogTemplate, Screen, ScreenTemplate } from '../screens';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Everything an editor works on: the application's layouts, the templates built on them, the screens filling
|
|
10
|
+
* those, and the two things that make a template configurable - what each layout or template exposes, and what
|
|
11
|
+
* each instance contributes.
|
|
12
|
+
*
|
|
13
|
+
* The engine's inspection and editing operations take a document and return a new one; they never change the
|
|
14
|
+
* one they were given. Names are the identity of layouts and templates, and element ids must be unique across the
|
|
15
|
+
* whole document.
|
|
16
|
+
*/
|
|
17
|
+
export interface SceneDocument {
|
|
18
|
+
layouts: Layout[];
|
|
19
|
+
screenTemplates: ScreenTemplate[];
|
|
20
|
+
dialogTemplates: DialogTemplate[];
|
|
21
|
+
screens: Screen[];
|
|
22
|
+
|
|
23
|
+
/** What each layout or template lets its consumers configure. */
|
|
24
|
+
exposures: ExposureDeclaration[];
|
|
25
|
+
|
|
26
|
+
/** The values each template instance sets on what was exposed to it. */
|
|
27
|
+
instanceContributions: InstanceContribution[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const SceneDocumentPropertyNames: (keyof SceneDocument)[] = [
|
|
31
|
+
'layouts', 'screenTemplates', 'dialogTemplates', 'screens', 'exposures', 'instanceContributions',
|
|
32
|
+
];
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { AddCollectionItemEdit } from './AddCollectionItemEdit';
|
|
5
|
+
import { ChangeLayoutTypeEdit } from './ChangeLayoutTypeEdit';
|
|
6
|
+
import { EditCollectionItemEdit } from './EditCollectionItemEdit';
|
|
7
|
+
import { ExposePropertyEdit } from './ExposePropertyEdit';
|
|
8
|
+
import { InsertNodeEdit } from './InsertNodeEdit';
|
|
9
|
+
import { MoveNodeEdit } from './MoveNodeEdit';
|
|
10
|
+
import { RemoveCollectionItemEdit } from './RemoveCollectionItemEdit';
|
|
11
|
+
import { RemoveNodeEdit } from './RemoveNodeEdit';
|
|
12
|
+
import { ReorderCollectionItemEdit } from './ReorderCollectionItemEdit';
|
|
13
|
+
import { ResetInstanceValueEdit } from './ResetInstanceValueEdit';
|
|
14
|
+
import { ResetPropertyEdit } from './ResetPropertyEdit';
|
|
15
|
+
import { SetInstanceValueEdit } from './SetInstanceValueEdit';
|
|
16
|
+
import { SetPropertyEdit } from './SetPropertyEdit';
|
|
17
|
+
import { UnexposePropertyEdit } from './UnexposePropertyEdit';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Any edit the engine applies, discriminated by `kind`.
|
|
21
|
+
*/
|
|
22
|
+
export type SceneEdit =
|
|
23
|
+
| SetPropertyEdit
|
|
24
|
+
| ResetPropertyEdit
|
|
25
|
+
| ChangeLayoutTypeEdit
|
|
26
|
+
| InsertNodeEdit
|
|
27
|
+
| MoveNodeEdit
|
|
28
|
+
| RemoveNodeEdit
|
|
29
|
+
| SetInstanceValueEdit
|
|
30
|
+
| ResetInstanceValueEdit
|
|
31
|
+
| AddCollectionItemEdit
|
|
32
|
+
| RemoveCollectionItemEdit
|
|
33
|
+
| ReorderCollectionItemEdit
|
|
34
|
+
| EditCollectionItemEdit
|
|
35
|
+
| ExposePropertyEdit
|
|
36
|
+
| UnexposePropertyEdit;
|
|
@@ -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
|
+
/**
|
|
5
|
+
* Every edit the engine applies. Each is a plain, serialisable record, so a host can persist it, replay it and
|
|
6
|
+
* build undo and redo on top.
|
|
7
|
+
*/
|
|
8
|
+
export enum SceneEditKind {
|
|
9
|
+
SetProperty = 'setProperty',
|
|
10
|
+
ResetProperty = 'resetProperty',
|
|
11
|
+
ChangeLayoutType = 'changeLayoutType',
|
|
12
|
+
InsertNode = 'insertNode',
|
|
13
|
+
MoveNode = 'moveNode',
|
|
14
|
+
RemoveNode = 'removeNode',
|
|
15
|
+
SetInstanceValue = 'setInstanceValue',
|
|
16
|
+
ResetInstanceValue = 'resetInstanceValue',
|
|
17
|
+
AddCollectionItem = 'addCollectionItem',
|
|
18
|
+
RemoveCollectionItem = 'removeCollectionItem',
|
|
19
|
+
ReorderCollectionItem = 'reorderCollectionItem',
|
|
20
|
+
EditCollectionItem = 'editCollectionItem',
|
|
21
|
+
ExposeProperty = 'exposeProperty',
|
|
22
|
+
UnexposeProperty = 'unexposeProperty',
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 kind of node an id addresses.
|
|
6
|
+
*/
|
|
7
|
+
export enum SceneNodeKind {
|
|
8
|
+
Layout = 'layout',
|
|
9
|
+
ScreenTemplate = 'screenTemplate',
|
|
10
|
+
DialogTemplate = 'dialogTemplate',
|
|
11
|
+
Screen = 'screen',
|
|
12
|
+
|
|
13
|
+
/** A named slot of a layout or template, or the content a screen puts in one. */
|
|
14
|
+
Slot = 'slot',
|
|
15
|
+
|
|
16
|
+
/** A scene element: a component, a panel, a control. */
|
|
17
|
+
Element = 'element',
|
|
18
|
+
|
|
19
|
+
/** A node of a flow arrangement: a row, a column, a grid or a leaf. */
|
|
20
|
+
FlowNode = 'flowNode',
|
|
21
|
+
|
|
22
|
+
/** A freeform arrangement. */
|
|
23
|
+
Freeform = 'freeform',
|
|
24
|
+
|
|
25
|
+
/** One element's (or slot's) placement within a freeform variant. */
|
|
26
|
+
Placement = 'placement',
|
|
27
|
+
}
|
|
@@ -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
|
+
* Sets an exposed scalar property from a template instance.
|
|
8
|
+
*/
|
|
9
|
+
export interface SetInstanceValueEdit {
|
|
10
|
+
kind: SceneEditKind.SetInstanceValue;
|
|
11
|
+
|
|
12
|
+
/** The instance contributing; defaults to the editing scope's own instance. */
|
|
13
|
+
instance?: string;
|
|
14
|
+
component: string;
|
|
15
|
+
path: string;
|
|
16
|
+
value: unknown;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const SetInstanceValueEditPropertyNames: (keyof SetInstanceValueEdit)[] = ['kind', 'instance', 'component', 'path', 'value'];
|
|
@@ -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 { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Sets a property on a node the editing scope owns.
|
|
8
|
+
*/
|
|
9
|
+
export interface SetPropertyEdit {
|
|
10
|
+
kind: SceneEditKind.SetProperty;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
|
|
13
|
+
/** The property path, as its descriptor states it. */
|
|
14
|
+
path: string;
|
|
15
|
+
value: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const SetPropertyEditPropertyNames: (keyof SetPropertyEdit)[] = ['kind', 'nodeId', 'path', 'value'];
|
|
@@ -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 { SceneEditKind } from './SceneEditKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Withdraws an exposure. Values instances already saved against it are kept, and come back if it is exposed again.
|
|
8
|
+
*/
|
|
9
|
+
export interface UnexposePropertyEdit {
|
|
10
|
+
kind: SceneEditKind.UnexposeProperty;
|
|
11
|
+
owner: string;
|
|
12
|
+
component: string;
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const UnexposePropertyEditPropertyNames: (keyof UnexposePropertyEdit)[] = ['kind', 'owner', 'component', 'path'];
|
|
@@ -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 property's effective value came from.
|
|
6
|
+
*/
|
|
7
|
+
export enum ValueSource {
|
|
8
|
+
/** The descriptor's default - nothing sets it. */
|
|
9
|
+
Default = 'default',
|
|
10
|
+
|
|
11
|
+
/** Set on the node itself (or by the owning template's author). */
|
|
12
|
+
Local = 'local',
|
|
13
|
+
|
|
14
|
+
/** Set by a template instance through an exposed property. */
|
|
15
|
+
Instance = 'instance',
|
|
16
|
+
}
|
package/editing/index.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
export * from './SceneDocument';
|
|
5
|
+
export * from './SceneNodeKind';
|
|
6
|
+
export * from './EditingScopeKind';
|
|
7
|
+
export * from './EditingScope';
|
|
8
|
+
export * from './ProvenanceKind';
|
|
9
|
+
export * from './NodeProvenance';
|
|
10
|
+
export * from './ValueSource';
|
|
11
|
+
export * from './DiagnosticSeverity';
|
|
12
|
+
export * from './DiagnosticCode';
|
|
13
|
+
export * from './SceneDiagnostic';
|
|
14
|
+
export * from './EffectiveCollectionItem';
|
|
15
|
+
export * from './EffectivePropertyValue';
|
|
16
|
+
export * from './EffectiveComponentConfiguration';
|
|
17
|
+
export * from './EffectiveConfiguration';
|
|
18
|
+
export * from './EditTarget';
|
|
19
|
+
export * from './InspectedCollectionItem';
|
|
20
|
+
export * from './InspectedProperty';
|
|
21
|
+
export * from './NodeInspection';
|
|
22
|
+
export * from './SceneEditKind';
|
|
23
|
+
export * from './SetPropertyEdit';
|
|
24
|
+
export * from './ResetPropertyEdit';
|
|
25
|
+
export * from './ChangeLayoutTypeEdit';
|
|
26
|
+
export * from './InsertNodeEdit';
|
|
27
|
+
export * from './MoveNodeEdit';
|
|
28
|
+
export * from './RemoveNodeEdit';
|
|
29
|
+
export * from './SetInstanceValueEdit';
|
|
30
|
+
export * from './ResetInstanceValueEdit';
|
|
31
|
+
export * from './AddCollectionItemEdit';
|
|
32
|
+
export * from './RemoveCollectionItemEdit';
|
|
33
|
+
export * from './ReorderCollectionItemEdit';
|
|
34
|
+
export * from './EditCollectionItemEdit';
|
|
35
|
+
export * from './ExposePropertyEdit';
|
|
36
|
+
export * from './UnexposePropertyEdit';
|
|
37
|
+
export * from './SceneEdit';
|
|
@@ -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
|
+
/**
|
|
5
|
+
* One collection item a template instance contributes. It is identified by `id`, never by its position, so
|
|
6
|
+
* reordering, removing and editing it stay correct as the collection changes around it.
|
|
7
|
+
*/
|
|
8
|
+
export interface ContributedItem {
|
|
9
|
+
id: string;
|
|
10
|
+
|
|
11
|
+
/** The item's field values, keyed by field path. */
|
|
12
|
+
values: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ContributedItemPropertyNames: (keyof ContributedItem)[] = ['id', 'values'];
|
|
@@ -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 { CollectionOperation } from '../descriptors';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One property a template author lets consumers configure.
|
|
8
|
+
*
|
|
9
|
+
* Exposure only ever narrows. A component supports a set of properties (its descriptor); a template author
|
|
10
|
+
* exposes some of them; a consumer sets values for what was exposed. A consumer never reaches anything the
|
|
11
|
+
* author did not expose, and a template nested inside another reaches an outer template's property only when it
|
|
12
|
+
* re-exposes it explicitly.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExposedProperty {
|
|
15
|
+
/** The id of the element that owns the property. */
|
|
16
|
+
component: string;
|
|
17
|
+
|
|
18
|
+
/** The property's path, as its descriptor states it. */
|
|
19
|
+
path: string;
|
|
20
|
+
|
|
21
|
+
/** A label for consumers, replacing the descriptor's own. */
|
|
22
|
+
label?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* For a collection: what consumers may do with it. Absent means none, so exposing a collection without
|
|
26
|
+
* naming operations exposes nothing a consumer can change.
|
|
27
|
+
*/
|
|
28
|
+
operations?: CollectionOperation[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* For a collection with the `EditFields` operation: the item fields a consumer may change. Absent means
|
|
32
|
+
* every field of the item descriptor.
|
|
33
|
+
*/
|
|
34
|
+
editableFields?: string[];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Set when this entry passes on a property an outer owner exposed: the name of the layout or template that
|
|
38
|
+
* owns the element. The entry then never widens what the owner exposed - its operations and fields are
|
|
39
|
+
* checked against the owner's.
|
|
40
|
+
*/
|
|
41
|
+
reExposes?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const ExposedPropertyPropertyNames: (keyof ExposedProperty)[] = [
|
|
45
|
+
'component', 'path', 'label', 'operations', 'editableFields', 'reExposes',
|
|
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 { ExposedProperty } from './ExposedProperty';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Everything one layout or template exposes to whatever sits inside it.
|
|
8
|
+
*/
|
|
9
|
+
export interface ExposureDeclaration {
|
|
10
|
+
/** The name of the layout, screen template or dialog template making the declaration. */
|
|
11
|
+
owner: string;
|
|
12
|
+
|
|
13
|
+
properties: ExposedProperty[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const ExposureDeclarationPropertyNames: (keyof ExposureDeclaration)[] = ['owner', 'properties'];
|
|
@@ -0,0 +1,36 @@
|
|
|
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 './ContributedItem';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What one template instance sets on one exposed property.
|
|
8
|
+
*
|
|
9
|
+
* Contributions are kept apart from the template they configure - a screen filling a template stores its own
|
|
10
|
+
* values here and never a copy of the template tree, so changing the template reaches every instance. They are
|
|
11
|
+
* keyed by instance, component and property path; collection items by their own id.
|
|
12
|
+
*
|
|
13
|
+
* A scalar property carries `value`; a collection carries `items`, which are appended after the owner's own items
|
|
14
|
+
* in the order given.
|
|
15
|
+
*/
|
|
16
|
+
export interface InstanceContribution {
|
|
17
|
+
/**
|
|
18
|
+
* The instance contributing: `screen:<name>` for a screen filling a template, `template:<name>` for a
|
|
19
|
+
* template sitting inside another template's slot, `dialog:<name>` for a dialog.
|
|
20
|
+
*/
|
|
21
|
+
instance: string;
|
|
22
|
+
|
|
23
|
+
/** The id of the element the property belongs to. */
|
|
24
|
+
component: string;
|
|
25
|
+
|
|
26
|
+
/** The property's path. */
|
|
27
|
+
path: string;
|
|
28
|
+
|
|
29
|
+
/** The value of a scalar property. */
|
|
30
|
+
value?: unknown;
|
|
31
|
+
|
|
32
|
+
/** The items a collection property gets from this instance, in order. */
|
|
33
|
+
items?: ContributedItem[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const InstanceContributionPropertyNames: (keyof InstanceContribution)[] = ['instance', 'component', 'path', 'value', 'items'];
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export * from './ExposedProperty';
|
|
5
|
+
export * from './ExposureDeclaration';
|
|
6
|
+
export * from './ContributedItem';
|
|
7
|
+
export * from './InstanceContribution';
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.model",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "The TypeScript mirror of Cratis.Scene.Model — the platform-agnostic Screen object model.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
|
-
"**/*.ts"
|
|
26
|
+
"**/*.ts",
|
|
27
|
+
"!**/for_*/**"
|
|
27
28
|
],
|
|
28
29
|
"main": "dist/cjs/index.js",
|
|
29
30
|
"module": "dist/esm/index.js",
|
|
@@ -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 { BindingExpression } from '../common';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Supplies one query parameter from a value already available where the query is used.
|
|
8
|
+
*/
|
|
9
|
+
export interface QueryArgumentBinding {
|
|
10
|
+
/** The query parameter being supplied. */
|
|
11
|
+
parameter: string;
|
|
12
|
+
|
|
13
|
+
/** Where the value comes from. */
|
|
14
|
+
source: BindingExpression;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const QueryArgumentBindingPropertyNames: (keyof QueryArgumentBinding)[] = ['parameter', 'source'];
|
|
@@ -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 { QueryArgumentBinding } from './QueryArgumentBinding';
|
|
5
|
+
import { QueryResultBinding } from './QueryResultBinding';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The value of a `QueryReference` property: which query, what feeds each of its parameters, and which result
|
|
9
|
+
* fields feed what. Every connection is stated explicitly - nothing is matched by name or position.
|
|
10
|
+
*/
|
|
11
|
+
export interface QueryBinding {
|
|
12
|
+
/** The stable identity of the bound {@link QueryCandidate}. */
|
|
13
|
+
queryId: string;
|
|
14
|
+
|
|
15
|
+
/** The query name the binding registry resolves at runtime - a snapshot of the candidate's name when bound. */
|
|
16
|
+
query: string;
|
|
17
|
+
|
|
18
|
+
arguments: QueryArgumentBinding[];
|
|
19
|
+
results: QueryResultBinding[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const QueryBindingPropertyNames: (keyof QueryBinding)[] = ['queryId', 'query', 'arguments', 'results'];
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { QueryOrigin } from './QueryOrigin';
|
|
5
|
+
import { QueryParameter } from './QueryParameter';
|
|
6
|
+
import { QueryResultField } from './QueryResultField';
|
|
7
|
+
import { QueryResultShape } from './QueryResultShape';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A query a property may be bound to, as supplied by the host.
|
|
11
|
+
*
|
|
12
|
+
* Scene never discovers queries itself - it has no idea what the application's backend offers. The host (Studio)
|
|
13
|
+
* works out which queries are in scope for the thing being edited and hands them in, in this shape, which is
|
|
14
|
+
* what keeps discovery out of the model and binding validation inside it.
|
|
15
|
+
*/
|
|
16
|
+
export interface QueryCandidate {
|
|
17
|
+
/** The query's stable identity, which survives a rename. Bindings refer to it. */
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/** The query's display name - the name the binding registry resolves at runtime. */
|
|
21
|
+
name: string;
|
|
22
|
+
|
|
23
|
+
/** The path from the editing scope down to the query's owner, outermost first. */
|
|
24
|
+
origin: QueryOrigin[];
|
|
25
|
+
|
|
26
|
+
parameters: QueryParameter[];
|
|
27
|
+
|
|
28
|
+
/** How many results the query produces. Accepts the {@link QueryResultShape} members or their string values. */
|
|
29
|
+
resultShape: `${QueryResultShape}`;
|
|
30
|
+
|
|
31
|
+
/** The fields of one result item. */
|
|
32
|
+
resultFields: QueryResultField[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const QueryCandidatePropertyNames: (keyof QueryCandidate)[] = [
|
|
36
|
+
'id', 'name', 'origin', 'parameters', 'resultShape', 'resultFields',
|
|
37
|
+
];
|
|
@@ -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 { QueryOriginKind } from './QueryOriginKind';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One step on the path from the editing scope down to the owner of a query.
|
|
8
|
+
*
|
|
9
|
+
* `kind` accepts both the {@link QueryOriginKind} members and their plain string values (`'feature'`,
|
|
10
|
+
* `'slice'`), so a host that builds candidates from JSON does not have to import the enum.
|
|
11
|
+
*/
|
|
12
|
+
export interface QueryOrigin {
|
|
13
|
+
kind: `${QueryOriginKind}`;
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const QueryOriginPropertyNames: (keyof QueryOrigin)[] = ['kind', 'id', 'name'];
|
|
@@ -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
|
+
* What kind of model element owns a query.
|
|
6
|
+
*/
|
|
7
|
+
export enum QueryOriginKind {
|
|
8
|
+
/** A feature of the application model. */
|
|
9
|
+
Feature = 'feature',
|
|
10
|
+
|
|
11
|
+
/** A slice within a feature. */
|
|
12
|
+
Slice = 'slice',
|
|
13
|
+
}
|
|
@@ -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
|
+
* One parameter a query takes.
|
|
6
|
+
*/
|
|
7
|
+
export interface QueryParameter {
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
/** The parameter's type name, compared with the type of whatever is bound to it. */
|
|
11
|
+
type: string;
|
|
12
|
+
|
|
13
|
+
required: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const QueryParameterPropertyNames: (keyof QueryParameter)[] = ['name', 'type', 'required'];
|
|
@@ -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
|
+
/**
|
|
5
|
+
* Connects one field of a query's result to something the consuming component displays.
|
|
6
|
+
*/
|
|
7
|
+
export interface QueryResultBinding {
|
|
8
|
+
/** What the field feeds: a column key, a label slot - whatever the component's descriptor names. */
|
|
9
|
+
target: string;
|
|
10
|
+
|
|
11
|
+
/** The name of the result field. */
|
|
12
|
+
field: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const QueryResultBindingPropertyNames: (keyof QueryResultBinding)[] = ['target', 'field'];
|
|
@@ -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
|
+
/**
|
|
5
|
+
* One field of what a query returns.
|
|
6
|
+
*/
|
|
7
|
+
export interface QueryResultField {
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
/** The field's type name. */
|
|
11
|
+
type: string;
|
|
12
|
+
|
|
13
|
+
/** Whether the field identifies the item - the key a component can use for item identity. */
|
|
14
|
+
isIdentity?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const QueryResultFieldPropertyNames: (keyof QueryResultField)[] = ['name', 'type', 'isIdentity'];
|
|
@@ -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
|
+
/**
|
|
5
|
+
* How many results a query produces. Decides which component can bind to it: a table wants a collection, a
|
|
6
|
+
* single-result display wants a single or an optional single.
|
|
7
|
+
*/
|
|
8
|
+
export enum QueryResultShape {
|
|
9
|
+
/** Zero or more items. */
|
|
10
|
+
Collection = 'collection',
|
|
11
|
+
|
|
12
|
+
/** Exactly one item. */
|
|
13
|
+
Single = 'single',
|
|
14
|
+
|
|
15
|
+
/** One item, or none. */
|
|
16
|
+
OptionalSingle = 'optional-single',
|
|
17
|
+
}
|
package/queries/index.ts
ADDED
|
@@ -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
|
+
export * from './QueryResultShape';
|
|
5
|
+
export * from './QueryOriginKind';
|
|
6
|
+
export * from './QueryOrigin';
|
|
7
|
+
export * from './QueryParameter';
|
|
8
|
+
export * from './QueryResultField';
|
|
9
|
+
export * from './QueryCandidate';
|
|
10
|
+
export * from './QueryArgumentBinding';
|
|
11
|
+
export * from './QueryResultBinding';
|
|
12
|
+
export * from './QueryBinding';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_the_mirror_matches_the_shared_manifest.d.ts","sourceRoot":"","sources":["../../../for_shape/when_checking_the_mirror_matches_the_shared_manifest.ts"],"names":[],"mappings":""}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import * as Model from '../index';
|
|
4
|
-
const manifestPath = join(import.meta.dirname, '..', '..', '..', '..', 'scene-model-shape.json');
|
|
5
|
-
const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
|
|
6
|
-
describe('when checking the mirror matches the shared manifest', () => {
|
|
7
|
-
for (const [typeName, expectedProperties] of Object.entries(manifest.types)) {
|
|
8
|
-
if (expectedProperties.length === 0)
|
|
9
|
-
continue;
|
|
10
|
-
it(`should declare the manifest properties for ${typeName}`, () => {
|
|
11
|
-
const actualProperties = Model[`${typeName}PropertyNames`];
|
|
12
|
-
actualProperties.should.have.members(expectedProperties);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
for (const [enumName, expectedMembers] of Object.entries(manifest.enums)) {
|
|
16
|
-
it(`should declare the manifest members for ${enumName}`, () => {
|
|
17
|
-
const enumObject = Model[enumName];
|
|
18
|
-
Object.keys(enumObject).should.have.members(expectedMembers);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=when_checking_the_mirror_matches_the_shared_manifest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"when_checking_the_mirror_matches_the_shared_manifest.js","sourceRoot":"","sources":["../../../for_shape/when_checking_the_mirror_matches_the_shared_manifest.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAOlC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;AACjG,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAkB,CAAC;AAElF,QAAQ,CAAC,sDAAsD,EAAE,GAAG,EAAE;IAClE,KAAK,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1E,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAE9C,EAAE,CAAC,8CAA8C,QAAQ,EAAE,EAAE,GAAG,EAAE;YAC9D,MAAM,gBAAgB,GAAI,KAA6C,CAAC,GAAG,QAAQ,eAAe,CAAC,CAAC;YACpG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACvE,EAAE,CAAC,2CAA2C,QAAQ,EAAE,EAAE,GAAG,EAAE;YAC3D,MAAM,UAAU,GAAI,KAA2D,CAAC,QAAQ,CAAC,CAAC;YAC1F,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAC"}
|