@cratis/scene.model 4.22.1 → 4.24.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/descriptors/ComponentCategory.ts +40 -0
- package/descriptors/ComponentDescriptor.ts +22 -1
- package/descriptors/ComponentDesignModeDescriptor.ts +76 -0
- package/descriptors/PropertyDescriptor.ts +5 -1
- package/descriptors/PropertyEditorKind.ts +56 -1
- package/descriptors/PropertyEditorOptions.ts +51 -0
- package/descriptors/componentIcon.ts +16 -0
- package/descriptors/index.ts +4 -0
- package/dist/cjs/descriptors/ComponentCategory.js +25 -0
- package/dist/cjs/descriptors/ComponentCategory.js.map +1 -0
- package/dist/cjs/descriptors/ComponentDescriptor.js +5 -0
- package/dist/cjs/descriptors/ComponentDescriptor.js.map +1 -1
- package/dist/cjs/descriptors/ComponentDesignModeDescriptor.js +28 -0
- package/dist/cjs/descriptors/ComponentDesignModeDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/PropertyDescriptor.js +1 -0
- package/dist/cjs/descriptors/PropertyDescriptor.js.map +1 -1
- package/dist/cjs/descriptors/PropertyEditorKind.js +23 -2
- package/dist/cjs/descriptors/PropertyEditorKind.js.map +1 -1
- package/dist/cjs/descriptors/PropertyEditorOptions.js +25 -0
- package/dist/cjs/descriptors/PropertyEditorOptions.js.map +1 -0
- package/dist/cjs/descriptors/componentIcon.js +19 -0
- package/dist/cjs/descriptors/componentIcon.js.map +1 -0
- package/dist/cjs/editing/DiagnosticCode.js +5 -0
- package/dist/cjs/editing/DiagnosticCode.js.map +1 -1
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/structure/ApplicationStructure.js +10 -0
- package/dist/cjs/structure/ApplicationStructure.js.map +1 -0
- package/dist/cjs/structure/FeatureNode.js +13 -0
- package/dist/cjs/structure/FeatureNode.js.map +1 -0
- package/dist/cjs/structure/ModuleNode.js +13 -0
- package/dist/cjs/structure/ModuleNode.js.map +1 -0
- package/dist/cjs/structure/SliceKind.js +15 -0
- package/dist/cjs/structure/SliceKind.js.map +1 -0
- package/dist/cjs/structure/SliceNode.js +12 -0
- package/dist/cjs/structure/SliceNode.js.map +1 -0
- package/dist/esm/descriptors/ComponentCategory.d.ts +13 -0
- package/dist/esm/descriptors/ComponentCategory.d.ts.map +1 -0
- package/dist/esm/descriptors/ComponentCategory.js +22 -0
- package/dist/esm/descriptors/ComponentCategory.js.map +1 -0
- package/dist/esm/descriptors/ComponentDescriptor.d.ts +7 -0
- package/dist/esm/descriptors/ComponentDescriptor.d.ts.map +1 -1
- package/dist/esm/descriptors/ComponentDescriptor.js +5 -0
- package/dist/esm/descriptors/ComponentDescriptor.js.map +1 -1
- package/dist/esm/descriptors/ComponentDesignModeDescriptor.d.ts +24 -0
- package/dist/esm/descriptors/ComponentDesignModeDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/ComponentDesignModeDescriptor.js +24 -0
- package/dist/esm/descriptors/ComponentDesignModeDescriptor.js.map +1 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts +2 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts.map +1 -1
- package/dist/esm/descriptors/PropertyDescriptor.js +1 -0
- package/dist/esm/descriptors/PropertyDescriptor.js.map +1 -1
- package/dist/esm/descriptors/PropertyEditorKind.d.ts +17 -0
- package/dist/esm/descriptors/PropertyEditorKind.d.ts.map +1 -1
- package/dist/esm/descriptors/PropertyEditorKind.js +23 -2
- package/dist/esm/descriptors/PropertyEditorKind.js.map +1 -1
- package/dist/esm/descriptors/PropertyEditorOptions.d.ts +18 -0
- package/dist/esm/descriptors/PropertyEditorOptions.d.ts.map +1 -0
- package/dist/esm/descriptors/PropertyEditorOptions.js +22 -0
- package/dist/esm/descriptors/PropertyEditorOptions.js.map +1 -0
- package/dist/esm/descriptors/componentIcon.d.ts +4 -0
- package/dist/esm/descriptors/componentIcon.d.ts.map +1 -0
- package/dist/esm/descriptors/componentIcon.js +16 -0
- package/dist/esm/descriptors/componentIcon.js.map +1 -0
- package/dist/esm/descriptors/index.d.ts +4 -0
- package/dist/esm/descriptors/index.d.ts.map +1 -1
- package/dist/esm/descriptors/index.js +4 -0
- package/dist/esm/descriptors/index.js.map +1 -1
- package/dist/esm/editing/DiagnosticCode.d.ts +5 -1
- package/dist/esm/editing/DiagnosticCode.d.ts.map +1 -1
- package/dist/esm/editing/DiagnosticCode.js +5 -0
- package/dist/esm/editing/DiagnosticCode.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/structure/ApplicationStructure.d.ts +6 -0
- package/dist/esm/structure/ApplicationStructure.d.ts.map +1 -0
- package/dist/esm/structure/ApplicationStructure.js +8 -0
- package/dist/esm/structure/ApplicationStructure.js.map +1 -0
- package/dist/esm/structure/FeatureNode.d.ts +9 -0
- package/dist/esm/structure/FeatureNode.d.ts.map +1 -0
- package/dist/esm/structure/FeatureNode.js +11 -0
- package/dist/esm/structure/FeatureNode.js.map +1 -0
- package/dist/esm/structure/ModuleNode.d.ts +10 -0
- package/dist/esm/structure/ModuleNode.d.ts.map +1 -0
- package/dist/esm/structure/ModuleNode.js +11 -0
- package/dist/esm/structure/ModuleNode.js.map +1 -0
- package/dist/esm/structure/SliceKind.d.ts +6 -0
- package/dist/esm/structure/SliceKind.d.ts.map +1 -0
- package/dist/esm/structure/SliceKind.js +13 -0
- package/dist/esm/structure/SliceKind.js.map +1 -0
- package/dist/esm/structure/SliceNode.d.ts +8 -0
- package/dist/esm/structure/SliceNode.d.ts.map +1 -0
- package/dist/esm/structure/SliceNode.js +10 -0
- package/dist/esm/structure/SliceNode.js.map +1 -0
- package/dist/esm/structure/index.d.ts +6 -0
- package/dist/esm/structure/index.d.ts.map +1 -0
- package/dist/esm/structure/index.js +6 -0
- package/dist/esm/structure/index.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/editing/DiagnosticCode.ts +6 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/structure/ApplicationStructure.ts +17 -0
- package/structure/FeatureNode.ts +23 -0
- package/structure/ModuleNode.ts +24 -0
- package/structure/SliceKind.ts +16 -0
- package/structure/SliceNode.ts +20 -0
- package/structure/index.ts +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticCode.js","sources":["../../../editing/DiagnosticCode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The reasons inspection, editing, binding validation and configuration resolution report a problem. A host\n * switches on the code; the message is for a person.\n */\nexport enum DiagnosticCode {\n // Addressing\n UnknownNode = 'unknownNode',\n DuplicateElementId = 'duplicateElementId',\n UnknownScope = 'unknownScope',\n InvalidEdit = 'invalidEdit',\n\n // Properties\n UnknownProperty = 'unknownProperty',\n InvalidValue = 'invalidValue',\n ReadOnlyProperty = 'readOnlyProperty',\n NodeNotEditable = 'nodeNotEditable',\n MissingComponentDescriptor = 'missingComponentDescriptor',\n\n // Layout\n NotALayoutNode = 'notALayoutNode',\n LayoutTypeNotConvertible = 'layoutTypeNotConvertible',\n LossyConversionNotAccepted = 'lossyConversionNotAccepted',\n LossyConversion = 'lossyConversion',\n\n // Structure\n TargetDoesNotAcceptChildren = 'targetDoesNotAcceptChildren',\n UnknownSlot = 'unknownSlot',\n ContainmentCycle = 'containmentCycle',\n IndexOutOfRange = 'indexOutOfRange',\n ElementIdInUse = 'elementIdInUse',\n MaximumChildrenExceeded = 'maximumChildrenExceeded',\n NodeNotRemovable = 'nodeNotRemovable',\n\n // Query binding\n MissingQuery = 'missingQuery',\n IncompatibleResultShape = 'incompatibleResultShape',\n MissingRequiredParameter = 'missingRequiredParameter',\n UnknownParameter = 'unknownParameter',\n ArgumentTypeMismatch = 'argumentTypeMismatch',\n UnresolvedArgumentSource = 'unresolvedArgumentSource',\n UnknownResultField = 'unknownResultField',\n\n // Exposure and instance configuration\n ExposureTargetMissing = 'exposureTargetMissing',\n ExposureWidensOwner = 'exposureWidensOwner',\n ReExposureBroken = 'reExposureBroken',\n ContributionNotExposed = 'contributionNotExposed',\n ContributionTargetMissing = 'contributionTargetMissing',\n ContributionTypeMismatch = 'contributionTypeMismatch',\n ContributionOperationNotPermitted = 'contributionOperationNotPermitted',\n UnknownCollectionField = 'unknownCollectionField',\n CollectionItemNotFound = 'collectionItemNotFound',\n DuplicateCollectionItem = 'duplicateCollectionItem',\n UnknownInstance = 'unknownInstance',\n\n // Icons\n MissingIconLibrary = 'missingIconLibrary',\n MissingIcon = 'missingIcon',\n MissingIconVariant = 'missingIconVariant',\n IncompatibleIconLibrary = 'incompatibleIconLibrary',\n IconCatalogUnavailable = 'iconCatalogUnavailable',\n IconNotVerified = 'iconNotVerified',\n}\n"],"names":["DiagnosticCode"],"mappings":";;AAAA;AACA;AAEA;;;IAIO,IAAKA,cAAAA,iBAAAA,SAAAA,cAAAA,EAAAA
|
|
1
|
+
{"version":3,"file":"DiagnosticCode.js","sources":["../../../editing/DiagnosticCode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The reasons inspection, editing, binding validation and configuration resolution report a problem. A host\n * switches on the code; the message is for a person.\n */\nexport enum DiagnosticCode {\n // Addressing\n UnknownNode = 'unknownNode',\n DuplicateElementId = 'duplicateElementId',\n UnknownScope = 'unknownScope',\n InvalidEdit = 'invalidEdit',\n\n // Properties\n UnknownProperty = 'unknownProperty',\n InvalidValue = 'invalidValue',\n ReadOnlyProperty = 'readOnlyProperty',\n NodeNotEditable = 'nodeNotEditable',\n MissingComponentDescriptor = 'missingComponentDescriptor',\n\n // Layout\n NotALayoutNode = 'notALayoutNode',\n LayoutTypeNotConvertible = 'layoutTypeNotConvertible',\n LossyConversionNotAccepted = 'lossyConversionNotAccepted',\n LossyConversion = 'lossyConversion',\n\n // Structure\n TargetDoesNotAcceptChildren = 'targetDoesNotAcceptChildren',\n UnknownSlot = 'unknownSlot',\n ContainmentCycle = 'containmentCycle',\n IndexOutOfRange = 'indexOutOfRange',\n ElementIdInUse = 'elementIdInUse',\n MaximumChildrenExceeded = 'maximumChildrenExceeded',\n NodeNotRemovable = 'nodeNotRemovable',\n\n // Query binding\n MissingQuery = 'missingQuery',\n IncompatibleResultShape = 'incompatibleResultShape',\n MissingRequiredParameter = 'missingRequiredParameter',\n UnknownParameter = 'unknownParameter',\n ArgumentTypeMismatch = 'argumentTypeMismatch',\n UnresolvedArgumentSource = 'unresolvedArgumentSource',\n UnknownResultField = 'unknownResultField',\n\n // Exposure and instance configuration\n ExposureTargetMissing = 'exposureTargetMissing',\n ExposureWidensOwner = 'exposureWidensOwner',\n ReExposureBroken = 'reExposureBroken',\n ContributionNotExposed = 'contributionNotExposed',\n ContributionTargetMissing = 'contributionTargetMissing',\n ContributionTypeMismatch = 'contributionTypeMismatch',\n ContributionOperationNotPermitted = 'contributionOperationNotPermitted',\n UnknownCollectionField = 'unknownCollectionField',\n CollectionItemNotFound = 'collectionItemNotFound',\n DuplicateCollectionItem = 'duplicateCollectionItem',\n UnknownInstance = 'unknownInstance',\n\n // Icons\n MissingIconLibrary = 'missingIconLibrary',\n MissingIcon = 'missingIcon',\n MissingIconVariant = 'missingIconVariant',\n IncompatibleIconLibrary = 'incompatibleIconLibrary',\n IconCatalogUnavailable = 'iconCatalogUnavailable',\n IconNotVerified = 'iconNotVerified',\n\n // Component metadata\n ComponentCategoryMissing = 'componentCategoryMissing',\n ComponentCategoryUnknown = 'componentCategoryUnknown',\n ComponentDesignModeInvalid = 'componentDesignModeInvalid',\n PropertyEditorOptionsInvalid = 'propertyEditorOptionsInvalid',\n}\n"],"names":["DiagnosticCode"],"mappings":";;AAAA;AACA;AAEA;;;IAIO,IAAKA,cAAAA,iBAAAA,SAAAA,cAAAA,EAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,IAAAA,OAAAA,cAAAA;AAgEX,CAAA,CAAA,EAAA;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -116,6 +116,7 @@ var QueryResultBinding = require('./queries/QueryResultBinding.js');
|
|
|
116
116
|
var QueryBinding = require('./queries/QueryBinding.js');
|
|
117
117
|
var PropertyValueType = require('./descriptors/PropertyValueType.js');
|
|
118
118
|
var PropertyEditorKind = require('./descriptors/PropertyEditorKind.js');
|
|
119
|
+
var PropertyEditorOptions = require('./descriptors/PropertyEditorOptions.js');
|
|
119
120
|
var PropertyChoice = require('./descriptors/PropertyChoice.js');
|
|
120
121
|
var PropertyConstraints = require('./descriptors/PropertyConstraints.js');
|
|
121
122
|
var CollectionItemDescriptor = require('./descriptors/CollectionItemDescriptor.js');
|
|
@@ -123,6 +124,9 @@ var DesignTimeActionDescriptor = require('./descriptors/DesignTimeActionDescript
|
|
|
123
124
|
var DesignTimeActionPlacement = require('./descriptors/DesignTimeActionPlacement.js');
|
|
124
125
|
var PackageDesignTimeMetadata = require('./descriptors/PackageDesignTimeMetadata.js');
|
|
125
126
|
var PropertyDescriptor = require('./descriptors/PropertyDescriptor.js');
|
|
127
|
+
var ComponentCategory = require('./descriptors/ComponentCategory.js');
|
|
128
|
+
var ComponentDesignModeDescriptor = require('./descriptors/ComponentDesignModeDescriptor.js');
|
|
129
|
+
var componentIcon = require('./descriptors/componentIcon.js');
|
|
126
130
|
var ComponentDescriptor = require('./descriptors/ComponentDescriptor.js');
|
|
127
131
|
var CollectionOperation = require('./descriptors/CollectionOperation.js');
|
|
128
132
|
var LayoutType = require('./descriptors/LayoutType.js');
|
|
@@ -166,6 +170,11 @@ var ReorderCollectionItemEdit = require('./editing/ReorderCollectionItemEdit.js'
|
|
|
166
170
|
var EditCollectionItemEdit = require('./editing/EditCollectionItemEdit.js');
|
|
167
171
|
var ExposePropertyEdit = require('./editing/ExposePropertyEdit.js');
|
|
168
172
|
var UnexposePropertyEdit = require('./editing/UnexposePropertyEdit.js');
|
|
173
|
+
var SliceKind = require('./structure/SliceKind.js');
|
|
174
|
+
var SliceNode = require('./structure/SliceNode.js');
|
|
175
|
+
var FeatureNode = require('./structure/FeatureNode.js');
|
|
176
|
+
var ModuleNode = require('./structure/ModuleNode.js');
|
|
177
|
+
var ApplicationStructure = require('./structure/ApplicationStructure.js');
|
|
169
178
|
|
|
170
179
|
|
|
171
180
|
|
|
@@ -289,6 +298,8 @@ exports.QueryResultBindingPropertyNames = QueryResultBinding.QueryResultBindingP
|
|
|
289
298
|
exports.QueryBindingPropertyNames = QueryBinding.QueryBindingPropertyNames;
|
|
290
299
|
exports.PropertyValueType = PropertyValueType.PropertyValueType;
|
|
291
300
|
exports.PropertyEditorKind = PropertyEditorKind.PropertyEditorKind;
|
|
301
|
+
exports.PropertyEditorOptionsPropertyNames = PropertyEditorOptions.PropertyEditorOptionsPropertyNames;
|
|
302
|
+
exports.ReferenceFilterDescriptorPropertyNames = PropertyEditorOptions.ReferenceFilterDescriptorPropertyNames;
|
|
292
303
|
exports.PropertyChoicePropertyNames = PropertyChoice.PropertyChoicePropertyNames;
|
|
293
304
|
exports.PropertyConstraintsPropertyNames = PropertyConstraints.PropertyConstraintsPropertyNames;
|
|
294
305
|
exports.CollectionItemDescriptorPropertyNames = CollectionItemDescriptor.CollectionItemDescriptorPropertyNames;
|
|
@@ -296,6 +307,13 @@ exports.DesignTimeActionDescriptorPropertyNames = DesignTimeActionDescriptor.Des
|
|
|
296
307
|
exports.DesignTimeActionPlacement = DesignTimeActionPlacement.DesignTimeActionPlacement;
|
|
297
308
|
exports.PackageDesignTimeMetadataPropertyNames = PackageDesignTimeMetadata.PackageDesignTimeMetadataPropertyNames;
|
|
298
309
|
exports.PropertyDescriptorPropertyNames = PropertyDescriptor.PropertyDescriptorPropertyNames;
|
|
310
|
+
exports.ComponentCategory = ComponentCategory.ComponentCategory;
|
|
311
|
+
exports.componentCategories = ComponentCategory.componentCategories;
|
|
312
|
+
exports.ComponentDesignModeDescriptorPropertyNames = ComponentDesignModeDescriptor.ComponentDesignModeDescriptorPropertyNames;
|
|
313
|
+
exports.DesignModeAddActionPropertyNames = ComponentDesignModeDescriptor.DesignModeAddActionPropertyNames;
|
|
314
|
+
exports.DesignModeItemActionPropertyNames = ComponentDesignModeDescriptor.DesignModeItemActionPropertyNames;
|
|
315
|
+
exports.componentIcon = componentIcon.componentIcon;
|
|
316
|
+
exports.componentIconLibrary = componentIcon.componentIconLibrary;
|
|
299
317
|
exports.ComponentDescriptorPropertyNames = ComponentDescriptor.ComponentDescriptorPropertyNames;
|
|
300
318
|
exports.CollectionOperation = CollectionOperation.CollectionOperation;
|
|
301
319
|
exports.LayoutType = LayoutType.LayoutType;
|
|
@@ -339,4 +357,9 @@ exports.ReorderCollectionItemEditPropertyNames = ReorderCollectionItemEdit.Reord
|
|
|
339
357
|
exports.EditCollectionItemEditPropertyNames = EditCollectionItemEdit.EditCollectionItemEditPropertyNames;
|
|
340
358
|
exports.ExposePropertyEditPropertyNames = ExposePropertyEdit.ExposePropertyEditPropertyNames;
|
|
341
359
|
exports.UnexposePropertyEditPropertyNames = UnexposePropertyEdit.UnexposePropertyEditPropertyNames;
|
|
360
|
+
exports.SliceKind = SliceKind.SliceKind;
|
|
361
|
+
exports.SliceNodePropertyNames = SliceNode.SliceNodePropertyNames;
|
|
362
|
+
exports.FeatureNodePropertyNames = FeatureNode.FeatureNodePropertyNames;
|
|
363
|
+
exports.ModuleNodePropertyNames = ModuleNode.ModuleNodePropertyNames;
|
|
364
|
+
exports.ApplicationStructurePropertyNames = ApplicationStructure.ApplicationStructurePropertyNames;
|
|
342
365
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
const ApplicationStructurePropertyNames = [
|
|
6
|
+
'modules'
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
exports.ApplicationStructurePropertyNames = ApplicationStructurePropertyNames;
|
|
10
|
+
//# sourceMappingURL=ApplicationStructure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationStructure.js","sources":["../../../structure/ApplicationStructure.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ModuleNode } from './ModuleNode';\n\n/**\n * A read-only description of which modules, features and slices an application has, and what kind each slice is.\n *\n * It is a reference input supplied by the host (Stage's converter, Studio); it is not persisted in a scene document.\n * Ids are the dotted qualified ids already used by `DestinationReference`, for example `sales.orders.PlaceOrder`.\n */\nexport interface ApplicationStructure {\n /** The modules of the application, in declaration order. */\n modules: ModuleNode[];\n}\n\nexport const ApplicationStructurePropertyNames: (keyof ApplicationStructure)[] = ['modules'];\n"],"names":["ApplicationStructurePropertyNames"],"mappings":";;AAAA;AACA;MAeaA,iCAAAA,GAAoE;AAAC,IAAA;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
const FeatureNodePropertyNames = [
|
|
6
|
+
'id',
|
|
7
|
+
'name',
|
|
8
|
+
'features',
|
|
9
|
+
'slices'
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
exports.FeatureNodePropertyNames = FeatureNodePropertyNames;
|
|
13
|
+
//# sourceMappingURL=FeatureNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureNode.js","sources":["../../../structure/FeatureNode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { SliceNode } from './SliceNode';\n\n/**\n * A feature in the application hierarchy; features nest.\n */\nexport interface FeatureNode {\n /** The feature identity, unique among its siblings; its qualified form is the dotted path from the module. */\n id: string;\n\n /** The display name. */\n name: string;\n\n /** The sub-features. */\n features: FeatureNode[];\n\n /** The slices that belong directly to this feature. */\n slices: SliceNode[];\n}\n\nexport const FeatureNodePropertyNames: (keyof FeatureNode)[] = ['id', 'name', 'features', 'slices'];\n"],"names":["FeatureNodePropertyNames"],"mappings":";;AAAA;AACA;MAqBaA,wBAAAA,GAAkD;AAAC,IAAA,IAAA;AAAM,IAAA,MAAA;AAAQ,IAAA,UAAA;AAAY,IAAA;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
const ModuleNodePropertyNames = [
|
|
6
|
+
'id',
|
|
7
|
+
'name',
|
|
8
|
+
'features',
|
|
9
|
+
'slices'
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
exports.ModuleNodePropertyNames = ModuleNodePropertyNames;
|
|
13
|
+
//# sourceMappingURL=ModuleNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleNode.js","sources":["../../../structure/ModuleNode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FeatureNode } from './FeatureNode';\nimport { SliceNode } from './SliceNode';\n\n/**\n * A module in the application hierarchy.\n */\nexport interface ModuleNode {\n /** The module identity, unique in the application; the first segment of every qualified id below it. */\n id: string;\n\n /** The display name. */\n name: string;\n\n /** The module's top-level features, first feature first. */\n features: FeatureNode[];\n\n /** The slices that belong directly to the module, when it has any. */\n slices?: SliceNode[];\n}\n\nexport const ModuleNodePropertyNames: (keyof ModuleNode)[] = ['id', 'name', 'features', 'slices'];\n"],"names":["ModuleNodePropertyNames"],"mappings":";;AAAA;AACA;MAsBaA,uBAAAA,GAAgD;AAAC,IAAA,IAAA;AAAM,IAAA,MAAA;AAAQ,IAAA,UAAA;AAAY,IAAA;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* What kind of event-model slice a slice node is.
|
|
7
|
+
*/ var SliceKind = /*#__PURE__*/ function(SliceKind) {
|
|
8
|
+
/** A slice that accepts a command - user input that changes state. */ SliceKind["StateChange"] = "StateChange";
|
|
9
|
+
/** A slice that projects state into a read model for display. */ SliceKind["StateView"] = "StateView";
|
|
10
|
+
/** A slice that reacts to events without user input. */ SliceKind["Automation"] = "Automation";
|
|
11
|
+
return SliceKind;
|
|
12
|
+
}({});
|
|
13
|
+
|
|
14
|
+
exports.SliceKind = SliceKind;
|
|
15
|
+
//# sourceMappingURL=SliceKind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceKind.js","sources":["../../../structure/SliceKind.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * What kind of event-model slice a slice node is.\n */\nexport enum SliceKind {\n /** A slice that accepts a command - user input that changes state. */\n StateChange = 'StateChange',\n\n /** A slice that projects state into a read model for display. */\n StateView = 'StateView',\n\n /** A slice that reacts to events without user input. */\n Automation = 'Automation',\n}\n"],"names":["SliceKind"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,SAAAA,iBAAAA,SAAAA,SAAAA,EAAAA;2EAC4D,SAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sEAGL,SAAA,CAAA,WAAA,CAAA,GAAA,WAAA;6DAGT,SAAA,CAAA,YAAA,CAAA,GAAA,YAAA;AAP9CA,IAAAA,OAAAA,SAAAA;AASX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
const SliceNodePropertyNames = [
|
|
6
|
+
'id',
|
|
7
|
+
'name',
|
|
8
|
+
'kind'
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
exports.SliceNodePropertyNames = SliceNodePropertyNames;
|
|
12
|
+
//# sourceMappingURL=SliceNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceNode.js","sources":["../../../structure/SliceNode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { SliceKind } from './SliceKind';\n\n/**\n * A slice in the application hierarchy.\n */\nexport interface SliceNode {\n /** The slice identity, unique among the siblings of its feature or module; its qualified form is `module.feature.Slice`. */\n id: string;\n\n /** The display name. */\n name: string;\n\n /** Whether the slice is a state change, a state view or an automation. */\n kind: SliceKind;\n}\n\nexport const SliceNodePropertyNames: (keyof SliceNode)[] = ['id', 'name', 'kind'];\n"],"names":["SliceNodePropertyNames"],"mappings":";;AAAA;AACA;MAkBaA,sBAAAA,GAA8C;AAAC,IAAA,IAAA;AAAM,IAAA,MAAA;AAAQ,IAAA;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const ComponentCategory: {
|
|
2
|
+
readonly Navigation: 'Navigation';
|
|
3
|
+
readonly DataDisplay: 'Data display';
|
|
4
|
+
readonly Input: 'Input';
|
|
5
|
+
readonly Actions: 'Actions';
|
|
6
|
+
readonly Layout: 'Layout';
|
|
7
|
+
readonly Feedback: 'Feedback';
|
|
8
|
+
readonly Overlay: 'Overlay';
|
|
9
|
+
readonly Forms: 'Forms';
|
|
10
|
+
};
|
|
11
|
+
export type ComponentCategory = (typeof ComponentCategory)[keyof typeof ComponentCategory];
|
|
12
|
+
export declare const componentCategories: readonly string[];
|
|
13
|
+
//# sourceMappingURL=ComponentCategory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentCategory.d.ts","sourceRoot":"","sources":["../../../descriptors/ComponentCategory.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;aAE1B,UAAU,EAAE,YAAY;aAGxB,WAAW,EAAE,cAAc;aAG3B,KAAK,EAAE,OAAO;aAGd,OAAO,EAAE,SAAS;aAGlB,MAAM,EAAE,QAAQ;aAGhB,QAAQ,EAAE,UAAU;aAGpB,OAAO,EAAE,SAAS;aAGlB,KAAK,EAAE,OAAO;CACR,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAG3F,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAqC,CAAC"}
|
|
@@ -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
|
+
* The categories a component picker groups components under. Every component declares exactly one (rule CMP1).
|
|
5
|
+
*
|
|
6
|
+
* The set is open: a package may declare a category of its own, which a validation reports as a warning
|
|
7
|
+
* ({@link DiagnosticCode.ComponentCategoryUnknown}) rather than refusing, so a picker shows it as a group of its own.
|
|
8
|
+
* Matching is by the exact words below.
|
|
9
|
+
*/ const ComponentCategory = {
|
|
10
|
+
/** Moves the user between places: topbar, sidebar, tabs, breadcrumbs, stepper. */ Navigation: 'Navigation',
|
|
11
|
+
/** Shows data: data table, list, card grid, board, timeline, stat card, chart. */ DataDisplay: 'Data display',
|
|
12
|
+
/** Takes a value from the user: text field, select, date picker, tag input, lookup. */ Input: 'Input',
|
|
13
|
+
/** Starts something: button, toolbar, menu, command bar. */ Actions: 'Actions',
|
|
14
|
+
/** Arranges other components: stack, grid, split pane, card, section. */ Layout: 'Layout',
|
|
15
|
+
/** Tells the user what happened or is happening: alert, toast, empty state, progress. */ Feedback: 'Feedback',
|
|
16
|
+
/** Appears over the page: dialog, side sheet, popover. */ Overlay: 'Overlay',
|
|
17
|
+
/** Collects a command's input: form, wizard, field group. */ Forms: 'Forms'
|
|
18
|
+
};
|
|
19
|
+
/** Every category this model defines, in the order a picker lists them. */ const componentCategories = Object.values(ComponentCategory);
|
|
20
|
+
|
|
21
|
+
export { ComponentCategory, componentCategories };
|
|
22
|
+
//# sourceMappingURL=ComponentCategory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentCategory.js","sources":["../../../descriptors/ComponentCategory.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The categories a component picker groups components under. Every component declares exactly one (rule CMP1).\n *\n * The set is open: a package may declare a category of its own, which a validation reports as a warning\n * ({@link DiagnosticCode.ComponentCategoryUnknown}) rather than refusing, so a picker shows it as a group of its own.\n * Matching is by the exact words below.\n */\nexport const ComponentCategory = {\n /** Moves the user between places: topbar, sidebar, tabs, breadcrumbs, stepper. */\n Navigation: 'Navigation',\n\n /** Shows data: data table, list, card grid, board, timeline, stat card, chart. */\n DataDisplay: 'Data display',\n\n /** Takes a value from the user: text field, select, date picker, tag input, lookup. */\n Input: 'Input',\n\n /** Starts something: button, toolbar, menu, command bar. */\n Actions: 'Actions',\n\n /** Arranges other components: stack, grid, split pane, card, section. */\n Layout: 'Layout',\n\n /** Tells the user what happened or is happening: alert, toast, empty state, progress. */\n Feedback: 'Feedback',\n\n /** Appears over the page: dialog, side sheet, popover. */\n Overlay: 'Overlay',\n\n /** Collects a command's input: form, wizard, field group. */\n Forms: 'Forms',\n} as const;\n\nexport type ComponentCategory = (typeof ComponentCategory)[keyof typeof ComponentCategory];\n\n/** Every category this model defines, in the order a picker lists them. */\nexport const componentCategories: readonly string[] = Object.values(ComponentCategory);\n"],"names":["ComponentCategory","Navigation","DataDisplay","Input","Actions","Layout","Feedback","Overlay","Forms","componentCategories","Object","values"],"mappings":"AAAA;AACA;AAEA;;;;;;UAOaA,iBAAAA,GAAoB;AAC7B,uFACAC,UAAAA,EAAY,YAAA;AAEZ,uFACAC,WAAAA,EAAa,cAAA;AAEb,4FACAC,KAAAA,EAAO,OAAA;AAEP,iEACAC,OAAAA,EAAS,SAAA;AAET,8EACAC,MAAAA,EAAQ,QAAA;AAER,8FACAC,QAAAA,EAAU,UAAA;AAEV,+DACAC,OAAAA,EAAS,SAAA;AAET,kEACAC,KAAAA,EAAO;AACX;AAIA,4EACO,MAAMC,sBAAyCC,MAAAA,CAAOC,MAAM,CAACX,iBAAAA;;"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { IconReference } from '../icons';
|
|
2
|
+
import { ComponentDesignModeDescriptor } from './ComponentDesignModeDescriptor';
|
|
1
3
|
import { DesignTimeActionDescriptor } from './DesignTimeActionDescriptor';
|
|
2
4
|
import { PropertyDescriptor } from './PropertyDescriptor';
|
|
3
5
|
export interface ComponentDescriptor {
|
|
4
6
|
component: string;
|
|
5
7
|
displayName?: string;
|
|
6
8
|
description?: string;
|
|
9
|
+
category?: string;
|
|
10
|
+
icon?: IconReference;
|
|
11
|
+
badge?: string;
|
|
12
|
+
keywords?: string[];
|
|
13
|
+
designMode?: ComponentDesignModeDescriptor;
|
|
7
14
|
editorKind?: string;
|
|
8
15
|
properties: PropertyDescriptor[];
|
|
9
16
|
actions?: DesignTimeActionDescriptor[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentDescriptor.d.ts","sourceRoot":"","sources":["../../../descriptors/ComponentDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAS1D,MAAM,WAAW,mBAAmB;IAKhC,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAGjC,OAAO,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAGvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,gCAAgC,EAAE,CAAC,MAAM,mBAAmB,CAAC,EAEzE,CAAC"}
|
|
1
|
+
{"version":3,"file":"ComponentDescriptor.d.ts","sourceRoot":"","sources":["../../../descriptors/ComponentDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAS1D,MAAM,WAAW,mBAAmB;IAKhC,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,IAAI,CAAC,EAAE,aAAa,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAGpB,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAG3C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAGjC,OAAO,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAGvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,gCAAgC,EAAE,CAAC,MAAM,mBAAmB,CAAC,EAEzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentDescriptor.js","sources":["../../../descriptors/ComponentDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DesignTimeActionDescriptor } from './DesignTimeActionDescriptor';\nimport { PropertyDescriptor } from './PropertyDescriptor';\n\n/**\n * What can be edited on one component a package provides.\n *\n * Packages contribute these alongside the components themselves (a bundle's `descriptors`), through the same\n * package mechanism that already carries components, layouts and themes - there is no second registry to keep in\n * step.\n */\nexport interface ComponentDescriptor {\n /**\n * The component this describes, as the package names it: `<package>:<bare name>`, the same key a bundle\n * registers the component under (for example `Cratis.Components:dataTable`).\n */\n component: string;\n\n /** A human-readable name for a palette or an inspector title. */\n displayName?: string;\n\n description?: string;\n\n /** Names a specialised editor for the component as a whole, when its properties are not edited one by one. */\n editorKind?: string;\n\n properties: PropertyDescriptor[];\n\n /** Package-provided design-time actions for this component. */\n actions?: DesignTimeActionDescriptor[];\n\n /** Names an optional package-provided preview renderer. */\n previewKind?: string;\n\n /** Names an optional package-provided property display renderer set. */\n propertyDisplayKind?: string;\n}\n\nexport const ComponentDescriptorPropertyNames: (keyof ComponentDescriptor)[] = [\n 'component', 'displayName', 'description', 'editorKind', 'properties', 'actions', 'previewKind', 'propertyDisplayKind',\n];\n"],"names":["ComponentDescriptorPropertyNames"],"mappings":"AAAA;AACA;
|
|
1
|
+
{"version":3,"file":"ComponentDescriptor.js","sources":["../../../descriptors/ComponentDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IconReference } from '../icons';\nimport { ComponentDesignModeDescriptor } from './ComponentDesignModeDescriptor';\nimport { DesignTimeActionDescriptor } from './DesignTimeActionDescriptor';\nimport { PropertyDescriptor } from './PropertyDescriptor';\n\n/**\n * What can be edited on one component a package provides.\n *\n * Packages contribute these alongside the components themselves (a bundle's `descriptors`), through the same\n * package mechanism that already carries components, layouts and themes - there is no second registry to keep in\n * step.\n */\nexport interface ComponentDescriptor {\n /**\n * The component this describes, as the package names it: `<package>:<bare name>`, the same key a bundle\n * registers the component under (for example `Cratis.Components:dataTable`).\n */\n component: string;\n\n /** A human-readable name for a palette or an inspector title. */\n displayName?: string;\n\n description?: string;\n\n /**\n * The group a component picker lists the component under (rule CMP1: every component declares one). One of\n * {@link ComponentCategory}, or a category the package adds. Optional in the type so a descriptor can be built up in steps;\n * `validateComponentDescriptors` reports a component that ends without one.\n */\n category?: string;\n\n /** The icon a picker shows for the component. */\n icon?: IconReference;\n\n /** Two letters a picker shows when it has no icon to draw. Absent means derive them from `displayName` (`componentBadge`). */\n badge?: string;\n\n /** Words a picker's filter matches besides the name and the category - \"grid\" for a data table. */\n keywords?: string[];\n\n /** How the component is edited directly on the design surface, as data. */\n designMode?: ComponentDesignModeDescriptor;\n\n /** Names a specialised editor for the component as a whole, when its properties are not edited one by one. */\n editorKind?: string;\n\n properties: PropertyDescriptor[];\n\n /** Package-provided design-time actions for this component. */\n actions?: DesignTimeActionDescriptor[];\n\n /** Names an optional package-provided preview renderer. */\n previewKind?: string;\n\n /** Names an optional package-provided property display renderer set. */\n propertyDisplayKind?: string;\n}\n\nexport const ComponentDescriptorPropertyNames: (keyof ComponentDescriptor)[] = [\n 'component', 'displayName', 'description', 'category', 'icon', 'badge', 'keywords', 'designMode', 'editorKind', 'properties', 'actions', 'previewKind', 'propertyDisplayKind',\n];\n"],"names":["ComponentDescriptorPropertyNames"],"mappings":"AAAA;AACA;MA4DaA,gCAAAA,GAAkE;AAC3E,IAAA,WAAA;AAAa,IAAA,aAAA;AAAe,IAAA,aAAA;AAAe,IAAA,UAAA;AAAY,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,UAAA;AAAY,IAAA,YAAA;AAAc,IAAA,YAAA;AAAc,IAAA,YAAA;AAAc,IAAA,SAAA;AAAW,IAAA,aAAA;AAAe,IAAA;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconReference } from '../icons';
|
|
2
|
+
export interface DesignModeAddAction {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: IconReference;
|
|
6
|
+
collectionPath?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DesignModeItemAction {
|
|
9
|
+
id: string;
|
|
10
|
+
icon: IconReference;
|
|
11
|
+
title: string;
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
availability?: string;
|
|
14
|
+
readOnlyReason?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ComponentDesignModeDescriptor {
|
|
17
|
+
itemsPath?: string;
|
|
18
|
+
addActions: DesignModeAddAction[];
|
|
19
|
+
itemToolbar: DesignModeItemAction[];
|
|
20
|
+
}
|
|
21
|
+
export declare const DesignModeAddActionPropertyNames: (keyof DesignModeAddAction)[];
|
|
22
|
+
export declare const DesignModeItemActionPropertyNames: (keyof DesignModeItemAction)[];
|
|
23
|
+
export declare const ComponentDesignModeDescriptorPropertyNames: (keyof ComponentDesignModeDescriptor)[];
|
|
24
|
+
//# sourceMappingURL=ComponentDesignModeDescriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentDesignModeDescriptor.d.ts","sourceRoot":"","sources":["../../../descriptors/ComponentDesignModeDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,MAAM,WAAW,mBAAmB;IAEhC,EAAE,EAAE,MAAM,CAAC;IAGX,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,aAAa,CAAC;IAOrB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAQD,MAAM,WAAW,oBAAoB;IAEjC,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,aAAa,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IAGd,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAQD,MAAM,WAAW,6BAA6B;IAK1C,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACvC;AAED,eAAO,MAAM,gCAAgC,EAAE,CAAC,MAAM,mBAAmB,CAAC,EAA8C,CAAC;AACzH,eAAO,MAAM,iCAAiC,EAAE,CAAC,MAAM,oBAAoB,CAAC,EAAyE,CAAC;AACtJ,eAAO,MAAM,0CAA0C,EAAE,CAAC,MAAM,6BAA6B,CAAC,EAA+C,CAAC"}
|
|
@@ -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
|
+
const DesignModeAddActionPropertyNames = [
|
|
4
|
+
'id',
|
|
5
|
+
'label',
|
|
6
|
+
'icon',
|
|
7
|
+
'collectionPath'
|
|
8
|
+
];
|
|
9
|
+
const DesignModeItemActionPropertyNames = [
|
|
10
|
+
'id',
|
|
11
|
+
'icon',
|
|
12
|
+
'title',
|
|
13
|
+
'compact',
|
|
14
|
+
'availability',
|
|
15
|
+
'readOnlyReason'
|
|
16
|
+
];
|
|
17
|
+
const ComponentDesignModeDescriptorPropertyNames = [
|
|
18
|
+
'itemsPath',
|
|
19
|
+
'addActions',
|
|
20
|
+
'itemToolbar'
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export { ComponentDesignModeDescriptorPropertyNames, DesignModeAddActionPropertyNames, DesignModeItemActionPropertyNames };
|
|
24
|
+
//# sourceMappingURL=ComponentDesignModeDescriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentDesignModeDescriptor.js","sources":["../../../descriptors/ComponentDesignModeDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IconReference } from '../icons';\n\n/**\n * An affordance a designer shows on the design surface to add an item to a component (the \"+ Add tab\" button of a tab strip,\n * the \"Add item\" of a toolbar).\n */\nexport interface DesignModeAddAction {\n /** Stable identity, unique within the component. */\n id: string;\n\n /** The label the designer shows. */\n label: string;\n\n /** The icon the designer shows next to it. */\n icon?: IconReference;\n\n /**\n * The `Collection` property of the component the new item is added to - the add is the ordinary `AddCollectionItem` edit. Absent,\n * the item is added to the component's own items, which the host resolves (the navigation region of a topbar, the children of a\n * toolbar).\n */\n collectionPath?: string;\n}\n\n/**\n * One button of the toolbar a designer shows over a selected item of a component.\n *\n * `availability` and `readOnlyReason` are rule *names*, interpreted by the package's design-time bundle exactly like\n * {@link DesignTimeActionDescriptor.availability}. The model carries no functions.\n */\nexport interface DesignModeItemAction {\n /** Stable identity, unique within the component. */\n id: string;\n\n /** The icon of the button. */\n icon: IconReference;\n\n /** The tooltip and accessible name of the button. */\n title: string;\n\n /** The button is shown without its title, in a tight row. */\n compact?: boolean;\n\n /** Names the rule that decides whether the button is shown and enabled for an item. Absent means always. */\n availability?: string;\n\n /** Names the rule that says why a read-only (inherited) item hides or disables the button. */\n readOnlyReason?: string;\n}\n\n/**\n * How a component is edited directly on the design surface: where its items are and which affordances the designer offers for\n * them. Plain data - a Visual Studio-style designer reads it without loading the component. Every edit it causes is a normal model edit\n * (`AddCollectionItem`, `RemoveCollectionItem`, `ReorderCollectionItems`, `EditCollectionItem`), so undo, redo and the dirty state\n * need nothing of their own.\n */\nexport interface ComponentDesignModeDescriptor {\n /**\n * The `Collection` property whose rows are the component's items. Absent when the items are not a property of the\n * component but something the host resolves - the navigation items of a topbar, the children of a toolbar.\n */\n itemsPath?: string;\n\n /** The \"add\" affordances. */\n addActions: DesignModeAddAction[];\n\n /** The buttons over a selected item. */\n itemToolbar: DesignModeItemAction[];\n}\n\nexport const DesignModeAddActionPropertyNames: (keyof DesignModeAddAction)[] = ['id', 'label', 'icon', 'collectionPath'];\nexport const DesignModeItemActionPropertyNames: (keyof DesignModeItemAction)[] = ['id', 'icon', 'title', 'compact', 'availability', 'readOnlyReason'];\nexport const ComponentDesignModeDescriptorPropertyNames: (keyof ComponentDesignModeDescriptor)[] = ['itemsPath', 'addActions', 'itemToolbar'];\n"],"names":["DesignModeAddActionPropertyNames","DesignModeItemActionPropertyNames","ComponentDesignModeDescriptorPropertyNames"],"mappings":"AAAA;AACA;MAwEaA,gCAAAA,GAAkE;AAAC,IAAA,IAAA;AAAM,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA;;MAC1FC,iCAAAA,GAAoE;AAAC,IAAA,IAAA;AAAM,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,SAAA;AAAW,IAAA,cAAA;AAAgB,IAAA;;MACvHC,0CAAAA,GAAsF;AAAC,IAAA,WAAA;AAAa,IAAA,YAAA;AAAc,IAAA;;;"}
|
|
@@ -2,6 +2,7 @@ import { BindingMode, BindingSourceKind } from '../common';
|
|
|
2
2
|
import { CollectionItemDescriptor } from './CollectionItemDescriptor';
|
|
3
3
|
import { PropertyChoice } from './PropertyChoice';
|
|
4
4
|
import { PropertyConstraints } from './PropertyConstraints';
|
|
5
|
+
import { PropertyEditorOptions } from './PropertyEditorOptions';
|
|
5
6
|
import { PropertyValueType } from './PropertyValueType';
|
|
6
7
|
export interface PropertyDescriptor {
|
|
7
8
|
path: string;
|
|
@@ -12,6 +13,7 @@ export interface PropertyDescriptor {
|
|
|
12
13
|
default?: unknown;
|
|
13
14
|
constraints?: PropertyConstraints;
|
|
14
15
|
editorKind?: string;
|
|
16
|
+
editorOptions?: PropertyEditorOptions;
|
|
15
17
|
description?: string;
|
|
16
18
|
item?: CollectionItemDescriptor;
|
|
17
19
|
properties?: PropertyDescriptor[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyDescriptor.d.ts","sourceRoot":"","sources":["../../../descriptors/PropertyDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAOxD,MAAM,WAAW,kBAAkB;IAK/B,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,iBAAiB,CAAC;IAG7B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAG3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAMlC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAOhC,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAOlC,IAAI,CAAC,EAAE,OAAO,CAAC;IAGf,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,oBAAoB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAG3C,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,eAAO,MAAM,+BAA+B,EAAE,CAAC,MAAM,kBAAkB,CAAC,EAGvE,CAAC"}
|
|
1
|
+
{"version":3,"file":"PropertyDescriptor.d.ts","sourceRoot":"","sources":["../../../descriptors/PropertyDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAOxD,MAAM,WAAW,kBAAkB;IAK/B,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,iBAAiB,CAAC;IAG7B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAG3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAMlC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAGtC,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAOhC,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAOlC,IAAI,CAAC,EAAE,OAAO,CAAC;IAGf,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,oBAAoB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAG3C,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,eAAO,MAAM,+BAA+B,EAAE,CAAC,MAAM,kBAAkB,CAAC,EAGvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyDescriptor.js","sources":["../../../descriptors/PropertyDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingMode, BindingSourceKind } from '../common';\nimport { CollectionItemDescriptor } from './CollectionItemDescriptor';\nimport { PropertyChoice } from './PropertyChoice';\nimport { PropertyConstraints } from './PropertyConstraints';\nimport { PropertyValueType } from './PropertyValueType';\n\n/**\n * Describes one editable property of a node: where it lives, what it is called, what it may hold and how a host\n * should edit it. A descriptor is plain data, so packages ship them and Studio reads them without loading a\n * component.\n */\nexport interface PropertyDescriptor {\n /**\n * Where the value lives. For an `ExternalComponent` it is a key (or dotted key path) in the element's\n * `properties` bag; for a model-native node such as a flow container it is the node's own property name.\n */\n path: string;\n\n /** The label an editor shows. */\n label: string;\n\n /** The editor section the property belongs to. */\n group: string;\n\n valueType: PropertyValueType;\n\n /** The allowed values of an `Enum` property. */\n choices?: PropertyChoice[];\n\n /** The value in effect when none is set. */\n default?: unknown;\n\n constraints?: PropertyConstraints;\n\n /**\n * Names a specialised editor. A host maps the name to its own editor - an icon picker, a query binder - and\n * falls back to the default editor for `valueType` when it does not know the name.\n */\n editorKind?: string;\n\n /** A sentence of help for the editor. */\n description?: string;\n\n /** Describes the items of a `Collection` property. Required when `valueType` is `Collection`. */\n item?: CollectionItemDescriptor;\n\n /**\n * Describes the fields of an `Object` property. A field's `path` is a single name relative to the object, and\n * a field may itself be an `Object` or a `Collection`, so a structured value of any depth can be described.\n * Without it an `Object` value is only editable through a specialised `editorKind`.\n */\n properties?: PropertyDescriptor[];\n\n /**\n * An `Object` property's value may carry fields `properties` does not describe. They are kept as they are and never\n * edited. Without it a field the descriptor does not describe is refused. Use it when `properties` lists the fields an\n * editor offers but the stored value may legitimately have more - a chart dataset, a record read from a sample.\n */\n open?: boolean;\n\n /** The value is shown but never edited. */\n readOnly?: boolean;\n\n /** This property is emitted by the component and may be bound by other elements. */\n output?: boolean;\n\n /** Which binding source kinds may be assigned to this property. */\n acceptedBindingKinds?: BindingSourceKind[];\n\n /** The strongest binding mode the property supports. */\n bindingMode?: BindingMode;\n}\n\nexport const PropertyDescriptorPropertyNames: (keyof PropertyDescriptor)[] = [\n 'path', 'label', 'group', 'valueType', 'choices', 'default', 'constraints', 'editorKind', 'description', 'item', 'properties', 'open', 'readOnly',\n 'output', 'acceptedBindingKinds', 'bindingMode',\n];\n"],"names":["PropertyDescriptorPropertyNames"],"mappings":"AAAA;AACA;
|
|
1
|
+
{"version":3,"file":"PropertyDescriptor.js","sources":["../../../descriptors/PropertyDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingMode, BindingSourceKind } from '../common';\nimport { CollectionItemDescriptor } from './CollectionItemDescriptor';\nimport { PropertyChoice } from './PropertyChoice';\nimport { PropertyConstraints } from './PropertyConstraints';\nimport { PropertyEditorOptions } from './PropertyEditorOptions';\nimport { PropertyValueType } from './PropertyValueType';\n\n/**\n * Describes one editable property of a node: where it lives, what it is called, what it may hold and how a host\n * should edit it. A descriptor is plain data, so packages ship them and Studio reads them without loading a\n * component.\n */\nexport interface PropertyDescriptor {\n /**\n * Where the value lives. For an `ExternalComponent` it is a key (or dotted key path) in the element's\n * `properties` bag; for a model-native node such as a flow container it is the node's own property name.\n */\n path: string;\n\n /** The label an editor shows. */\n label: string;\n\n /** The editor section the property belongs to. */\n group: string;\n\n valueType: PropertyValueType;\n\n /** The allowed values of an `Enum` property. */\n choices?: PropertyChoice[];\n\n /** The value in effect when none is set. */\n default?: unknown;\n\n constraints?: PropertyConstraints;\n\n /**\n * Names a specialised editor. A host maps the name to its own editor - an icon picker, a query binder - and\n * falls back to the default editor for `valueType` when it does not know the name.\n */\n editorKind?: string;\n\n /** The parameters of the named editor - multi-line, placeholder, unit, step, slice kinds, the reference filter. */\n editorOptions?: PropertyEditorOptions;\n\n /** A sentence of help for the editor. */\n description?: string;\n\n /** Describes the items of a `Collection` property. Required when `valueType` is `Collection`. */\n item?: CollectionItemDescriptor;\n\n /**\n * Describes the fields of an `Object` property. A field's `path` is a single name relative to the object, and\n * a field may itself be an `Object` or a `Collection`, so a structured value of any depth can be described.\n * Without it an `Object` value is only editable through a specialised `editorKind`.\n */\n properties?: PropertyDescriptor[];\n\n /**\n * An `Object` property's value may carry fields `properties` does not describe. They are kept as they are and never\n * edited. Without it a field the descriptor does not describe is refused. Use it when `properties` lists the fields an\n * editor offers but the stored value may legitimately have more - a chart dataset, a record read from a sample.\n */\n open?: boolean;\n\n /** The value is shown but never edited. */\n readOnly?: boolean;\n\n /** This property is emitted by the component and may be bound by other elements. */\n output?: boolean;\n\n /** Which binding source kinds may be assigned to this property. */\n acceptedBindingKinds?: BindingSourceKind[];\n\n /** The strongest binding mode the property supports. */\n bindingMode?: BindingMode;\n}\n\nexport const PropertyDescriptorPropertyNames: (keyof PropertyDescriptor)[] = [\n 'path', 'label', 'group', 'valueType', 'choices', 'default', 'constraints', 'editorKind', 'editorOptions', 'description', 'item', 'properties', 'open', 'readOnly',\n 'output', 'acceptedBindingKinds', 'bindingMode',\n];\n"],"names":["PropertyDescriptorPropertyNames"],"mappings":"AAAA;AACA;MA+EaA,+BAAAA,GAAgE;AACzE,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,OAAA;AAAS,IAAA,WAAA;AAAa,IAAA,SAAA;AAAW,IAAA,SAAA;AAAW,IAAA,aAAA;AAAe,IAAA,YAAA;AAAc,IAAA,eAAA;AAAiB,IAAA,aAAA;AAAe,IAAA,MAAA;AAAQ,IAAA,YAAA;AAAc,IAAA,MAAA;AAAQ,IAAA,UAAA;AACxJ,IAAA,QAAA;AAAU,IAAA,sBAAA;AAAwB,IAAA;;;"}
|
|
@@ -4,6 +4,23 @@ export declare const PropertyEditorKind: {
|
|
|
4
4
|
readonly StringOrList: 'stringOrList';
|
|
5
5
|
readonly Scalar: 'scalar';
|
|
6
6
|
readonly StringMap: 'stringMap';
|
|
7
|
+
readonly Text: 'text';
|
|
8
|
+
readonly Number: 'number';
|
|
9
|
+
readonly Boolean: 'boolean';
|
|
10
|
+
readonly Enum: 'enum';
|
|
11
|
+
readonly Select: 'select';
|
|
12
|
+
readonly Color: 'color';
|
|
13
|
+
readonly Icon: 'icon';
|
|
14
|
+
readonly List: 'list';
|
|
15
|
+
readonly Reference: 'reference';
|
|
16
|
+
readonly NavigationTarget: 'navigationTarget';
|
|
17
|
+
readonly RenderingSlot: 'renderingSlot';
|
|
18
|
+
readonly Slice: 'slice';
|
|
19
|
+
readonly InheritanceMode: 'inheritanceMode';
|
|
20
|
+
readonly Template: 'template';
|
|
21
|
+
readonly SampleData: 'sampleData';
|
|
22
|
+
readonly Field: 'field';
|
|
23
|
+
readonly ColumnList: 'columnList';
|
|
7
24
|
};
|
|
8
25
|
export type PropertyEditorKind = (typeof PropertyEditorKind)[keyof typeof PropertyEditorKind];
|
|
9
26
|
//# sourceMappingURL=PropertyEditorKind.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyEditorKind.d.ts","sourceRoot":"","sources":["../../../descriptors/PropertyEditorKind.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyEditorKind.d.ts","sourceRoot":"","sources":["../../../descriptors/PropertyEditorKind.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB;aAE3B,UAAU,EAAE,YAAY;aAGxB,UAAU,EAAE,YAAY;aAGxB,YAAY,EAAE,cAAc;aAG5B,MAAM,EAAE,QAAQ;aAGhB,SAAS,EAAE,WAAW;aAGtB,IAAI,EAAE,MAAM;aAGZ,MAAM,EAAE,QAAQ;aAGhB,OAAO,EAAE,SAAS;aAGlB,IAAI,EAAE,MAAM;aAGZ,MAAM,EAAE,QAAQ;aAGhB,KAAK,EAAE,OAAO;aAGd,IAAI,EAAE,MAAM;aAGZ,IAAI,EAAE,MAAM;aAGZ,SAAS,EAAE,WAAW;aAGtB,gBAAgB,EAAE,kBAAkB;aAGpC,aAAa,EAAE,eAAe;aAG9B,KAAK,EAAE,OAAO;aAGd,eAAe,EAAE,iBAAiB;aAGlC,QAAQ,EAAE,UAAU;aAGpB,UAAU,EAAE,YAAY;aAGxB,KAAK,EAAE,OAAO;aAGd,UAAU,EAAE,YAAY;CAClB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
/**
|
|
4
|
-
* The editor
|
|
4
|
+
* The editor ids Studio's property-editor registry resolves (spec section 8). A property names one in `editorKind`; a host that
|
|
5
|
+
* does not know the id falls back to the default editor for `valueType`, and a package may name ids of its own (they are strings).
|
|
6
|
+
* This vocabulary defines only the ids and, in {@link PropertyEditorOptions}, their parameters - the editors themselves belong to the host.
|
|
7
|
+
*
|
|
8
|
+
* It starts with the editors for values that have no fields to describe, so a host can edit them without asking for JSON text.
|
|
5
9
|
*
|
|
6
10
|
* A list of plain values is a `json` property - Scene keeps the array exactly as authored - whose `editorKind` says what
|
|
7
11
|
* its entries are. A record whose keys are the author's own (a row of data, keyed by column) is an `object` property
|
|
@@ -11,7 +15,24 @@
|
|
|
11
15
|
/** An ordered list of numbers. */ NumberList: 'numberList',
|
|
12
16
|
/** One word, or an ordered list of words: a chart colour is one colour for the series or one for each point. */ StringOrList: 'stringOrList',
|
|
13
17
|
/** One word, number or flag - a value whose type the author chooses, such as the selected value of a control whose options carry any of them. */ Scalar: 'scalar',
|
|
14
|
-
/** A record of words, numbers and flags under names the author chooses. */ StringMap: 'stringMap'
|
|
18
|
+
/** A record of words, numbers and flags under names the author chooses. */ StringMap: 'stringMap',
|
|
19
|
+
/** A single line of text; `editorOptions.multiline` makes it a box, `editorOptions.placeholder` hints it. */ Text: 'text',
|
|
20
|
+
/** A number; `constraints.minimum`/`maximum` and `editorOptions.step`/`unit` shape it. */ Number: 'number',
|
|
21
|
+
/** A switch with a label. */ Boolean: 'boolean',
|
|
22
|
+
/** Up to four choices as segmented chips. */ Enum: 'enum',
|
|
23
|
+
/** Any number of choices as a dropdown with a filter. */ Select: 'select',
|
|
24
|
+
/** A theme token first, a custom colour second. */ Color: 'color',
|
|
25
|
+
/** An icon from a searchable grid. */ Icon: 'icon',
|
|
26
|
+
/** A list of simple items: add, remove, reorder rows. */ List: 'list',
|
|
27
|
+
/** The id of another model element, from a searchable dropdown restricted by `editorOptions.reference`. */ Reference: 'reference',
|
|
28
|
+
/** The target of a navigation item: a Module > Feature tree, shown as a breadcrumb when closed. */ NavigationTarget: 'navigationTarget',
|
|
29
|
+
/** One of the slots of the effective template, with a mini diagram of its position. */ RenderingSlot: 'renderingSlot',
|
|
30
|
+
/** A slice from the slice tree; `editorOptions.kinds` (for example `['StateChange']`) filters, the rest are listed disabled with a reason. */ Slice: 'slice',
|
|
31
|
+
/** How a region relates to what it inherits: `inherit`, `extend` or `override`, as a three-way control. */ InheritanceMode: 'inheritanceMode',
|
|
32
|
+
/** A reference to a template, chosen through the template picker. */ Template: 'template',
|
|
33
|
+
/** A reference to a sample data pack. */ SampleData: 'sampleData',
|
|
34
|
+
/** A field of the shape a component is bound to, typed by `editorOptions.fieldKinds`. */ Field: 'field',
|
|
35
|
+
/** The columns of a table: rows of `{ field, header, width, align, format }`. */ ColumnList: 'columnList'
|
|
15
36
|
};
|
|
16
37
|
|
|
17
38
|
export { PropertyEditorKind };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyEditorKind.js","sources":["../../../descriptors/PropertyEditorKind.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The editor
|
|
1
|
+
{"version":3,"file":"PropertyEditorKind.js","sources":["../../../descriptors/PropertyEditorKind.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The editor ids Studio's property-editor registry resolves (spec section 8). A property names one in `editorKind`; a host that\n * does not know the id falls back to the default editor for `valueType`, and a package may name ids of its own (they are strings).\n * This vocabulary defines only the ids and, in {@link PropertyEditorOptions}, their parameters - the editors themselves belong to the host.\n *\n * It starts with the editors for values that have no fields to describe, so a host can edit them without asking for JSON text.\n *\n * A list of plain values is a `json` property - Scene keeps the array exactly as authored - whose `editorKind` says what\n * its entries are. A record whose keys are the author's own (a row of data, keyed by column) is an `object` property\n * with no `properties` and the `stringMap` kind. A host that does not know a kind falls back to its default editor.\n */\nexport const PropertyEditorKind = {\n /** An ordered list of words. */\n StringList: 'stringList',\n\n /** An ordered list of numbers. */\n NumberList: 'numberList',\n\n /** One word, or an ordered list of words: a chart colour is one colour for the series or one for each point. */\n StringOrList: 'stringOrList',\n\n /** One word, number or flag - a value whose type the author chooses, such as the selected value of a control whose options carry any of them. */\n Scalar: 'scalar',\n\n /** A record of words, numbers and flags under names the author chooses. */\n StringMap: 'stringMap',\n\n /** A single line of text; `editorOptions.multiline` makes it a box, `editorOptions.placeholder` hints it. */\n Text: 'text',\n\n /** A number; `constraints.minimum`/`maximum` and `editorOptions.step`/`unit` shape it. */\n Number: 'number',\n\n /** A switch with a label. */\n Boolean: 'boolean',\n\n /** Up to four choices as segmented chips. */\n Enum: 'enum',\n\n /** Any number of choices as a dropdown with a filter. */\n Select: 'select',\n\n /** A theme token first, a custom colour second. */\n Color: 'color',\n\n /** An icon from a searchable grid. */\n Icon: 'icon',\n\n /** A list of simple items: add, remove, reorder rows. */\n List: 'list',\n\n /** The id of another model element, from a searchable dropdown restricted by `editorOptions.reference`. */\n Reference: 'reference',\n\n /** The target of a navigation item: a Module > Feature tree, shown as a breadcrumb when closed. */\n NavigationTarget: 'navigationTarget',\n\n /** One of the slots of the effective template, with a mini diagram of its position. */\n RenderingSlot: 'renderingSlot',\n\n /** A slice from the slice tree; `editorOptions.kinds` (for example `['StateChange']`) filters, the rest are listed disabled with a reason. */\n Slice: 'slice',\n\n /** How a region relates to what it inherits: `inherit`, `extend` or `override`, as a three-way control. */\n InheritanceMode: 'inheritanceMode',\n\n /** A reference to a template, chosen through the template picker. */\n Template: 'template',\n\n /** A reference to a sample data pack. */\n SampleData: 'sampleData',\n\n /** A field of the shape a component is bound to, typed by `editorOptions.fieldKinds`. */\n Field: 'field',\n\n /** The columns of a table: rows of `{ field, header, width, align, format }`. */\n ColumnList: 'columnList',\n} as const;\n\nexport type PropertyEditorKind = (typeof PropertyEditorKind)[keyof typeof PropertyEditorKind];\n"],"names":["PropertyEditorKind","StringList","NumberList","StringOrList","Scalar","StringMap","Text","Number","Boolean","Enum","Select","Color","Icon","List","Reference","NavigationTarget","RenderingSlot","Slice","InheritanceMode","Template","SampleData","Field","ColumnList"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;UAWaA,kBAAAA,GAAqB;AAC9B,qCACAC,UAAAA,EAAY,YAAA;AAEZ,uCACAC,UAAAA,EAAY,YAAA;AAEZ,qHACAC,YAAAA,EAAc,cAAA;AAEd,sJACAC,MAAAA,EAAQ,QAAA;AAER,gFACAC,SAAAA,EAAW,WAAA;AAEX,kHACAC,IAAAA,EAAM,MAAA;AAEN,+FACAC,MAAAA,EAAQ,QAAA;AAER,kCACAC,OAAAA,EAAS,SAAA;AAET,kDACAC,IAAAA,EAAM,MAAA;AAEN,8DACAC,MAAAA,EAAQ,QAAA;AAER,wDACAC,KAAAA,EAAO,OAAA;AAEP,2CACAC,IAAAA,EAAM,MAAA;AAEN,8DACAC,IAAAA,EAAM,MAAA;AAEN,gHACAC,SAAAA,EAAW,WAAA;AAEX,wGACAC,gBAAAA,EAAkB,kBAAA;AAElB,4FACAC,aAAAA,EAAe,eAAA;AAEf,mJACAC,KAAAA,EAAO,OAAA;AAEP,gHACAC,eAAAA,EAAiB,iBAAA;AAEjB,0EACAC,QAAAA,EAAU,UAAA;AAEV,8CACAC,UAAAA,EAAY,YAAA;AAEZ,8FACAC,KAAAA,EAAO,OAAA;AAEP,sFACAC,UAAAA,EAAY;AAChB;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ReferenceFilterDescriptor {
|
|
2
|
+
target: string;
|
|
3
|
+
kinds?: string[];
|
|
4
|
+
predicate?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PropertyEditorOptions {
|
|
7
|
+
multiline?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
unit?: string;
|
|
10
|
+
step?: number;
|
|
11
|
+
kinds?: string[];
|
|
12
|
+
reference?: ReferenceFilterDescriptor;
|
|
13
|
+
fieldKinds?: string[];
|
|
14
|
+
tokensOnly?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const ReferenceFilterDescriptorPropertyNames: (keyof ReferenceFilterDescriptor)[];
|
|
17
|
+
export declare const PropertyEditorOptionsPropertyNames: (keyof PropertyEditorOptions)[];
|
|
18
|
+
//# sourceMappingURL=PropertyEditorOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyEditorOptions.d.ts","sourceRoot":"","sources":["../../../descriptors/PropertyEditorOptions.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,yBAAyB;IAEtC,MAAM,EAAE,MAAM,CAAC;IAGf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAGjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,MAAM,WAAW,qBAAqB;IAElC,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAGjB,SAAS,CAAC,EAAE,yBAAyB,CAAC;IAGtC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAGtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,sCAAsC,EAAE,CAAC,MAAM,yBAAyB,CAAC,EAAqC,CAAC;AAC5H,eAAO,MAAM,kCAAkC,EAAE,CAAC,MAAM,qBAAqB,CAAC,EAE7E,CAAC"}
|
|
@@ -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
|
+
* What a `reference` editor offers: the model elements of one kind, narrowed by a named rule.
|
|
5
|
+
*/ const ReferenceFilterDescriptorPropertyNames = [
|
|
6
|
+
'target',
|
|
7
|
+
'kinds',
|
|
8
|
+
'predicate'
|
|
9
|
+
];
|
|
10
|
+
const PropertyEditorOptionsPropertyNames = [
|
|
11
|
+
'multiline',
|
|
12
|
+
'placeholder',
|
|
13
|
+
'unit',
|
|
14
|
+
'step',
|
|
15
|
+
'kinds',
|
|
16
|
+
'reference',
|
|
17
|
+
'fieldKinds',
|
|
18
|
+
'tokensOnly'
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export { PropertyEditorOptionsPropertyNames, ReferenceFilterDescriptorPropertyNames };
|
|
22
|
+
//# sourceMappingURL=PropertyEditorOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyEditorOptions.js","sources":["../../../descriptors/PropertyEditorOptions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * What a `reference` editor offers: the model elements of one kind, narrowed by a named rule.\n */\nexport interface ReferenceFilterDescriptor {\n /** The kind of model element referenced: `screen`, `slice`, `template`, `shape`, `field` ... A host maps it to what it can list. */\n target: string;\n\n /** Narrows the target to these kinds (a slice is a `StateChange`, a `ReadModel` ...). Absent means every kind. */\n kinds?: string[];\n\n /** Names the rule that decides which candidates are offered, interpreted by the host - like `availability` of a design-time action. */\n predicate?: string;\n}\n\n/**\n * The parameters of a named editor, alongside `PropertyDescriptor.editorKind`: the bits a generic editor needs that are not a value\n * constraint. Every field is optional and only the ones an editor documents are read.\n */\nexport interface PropertyEditorOptions {\n /** `text`: a multi-line box instead of a single line. */\n multiline?: boolean;\n\n /** `text`: the hint shown while empty. */\n placeholder?: string;\n\n /** `number`: the unit shown after the value (`px`, `%`, `ms`). */\n unit?: string;\n\n /** `number`: the increment of a stepper. The range is `constraints.minimum` and `constraints.maximum`. */\n step?: number;\n\n /** `slice`: the slice kinds that can be chosen (`['StateChange']`); others are listed disabled with a reason. */\n kinds?: string[];\n\n /** `reference`: what can be referenced. Required by the `reference` editor. */\n reference?: ReferenceFilterDescriptor;\n\n /** `field`: the kinds of field offered (`string`, `number`, `boolean` ...). Absent means any. */\n fieldKinds?: string[];\n\n /** `color`: only theme tokens, no custom colour. */\n tokensOnly?: boolean;\n}\n\nexport const ReferenceFilterDescriptorPropertyNames: (keyof ReferenceFilterDescriptor)[] = ['target', 'kinds', 'predicate'];\nexport const PropertyEditorOptionsPropertyNames: (keyof PropertyEditorOptions)[] = [\n 'multiline', 'placeholder', 'unit', 'step', 'kinds', 'reference', 'fieldKinds', 'tokensOnly',\n];\n"],"names":["ReferenceFilterDescriptorPropertyNames","PropertyEditorOptionsPropertyNames"],"mappings":"AAAA;AACA;AAEA;;UA4CaA,sCAAAA,GAA8E;AAAC,IAAA,QAAA;AAAU,IAAA,OAAA;AAAS,IAAA;;MAClGC,kCAAAA,GAAsE;AAC/E,IAAA,WAAA;AAAa,IAAA,aAAA;AAAe,IAAA,MAAA;AAAQ,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,WAAA;AAAa,IAAA,YAAA;AAAc,IAAA;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentIcon.d.ts","sourceRoot":"","sources":["../../../descriptors/componentIcon.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOzC,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAG1D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAExD"}
|
|
@@ -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
|
+
* The icon library the built-in components' icons come from: the Lucide library package a Cratis host ships. A component's icon is an
|
|
5
|
+
* ordinary {@link IconReference}, so a host without that library shows the component's badge instead (see the component picker) and
|
|
6
|
+
* the icon diagnostics report it like any other icon.
|
|
7
|
+
*/ const componentIconLibrary = 'Cratis.Icons.Lucide';
|
|
8
|
+
/** The icon with this key in {@link componentIconLibrary}. */ function componentIcon(key) {
|
|
9
|
+
return {
|
|
10
|
+
library: componentIconLibrary,
|
|
11
|
+
key
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { componentIcon, componentIconLibrary };
|
|
16
|
+
//# sourceMappingURL=componentIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentIcon.js","sources":["../../../descriptors/componentIcon.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IconReference } from '../icons';\n\n/**\n * The icon library the built-in components' icons come from: the Lucide library package a Cratis host ships. A component's icon is an\n * ordinary {@link IconReference}, so a host without that library shows the component's badge instead (see the component picker) and\n * the icon diagnostics report it like any other icon.\n */\nexport const componentIconLibrary = 'Cratis.Icons.Lucide';\n\n/** The icon with this key in {@link componentIconLibrary}. */\nexport function componentIcon(key: string): IconReference {\n return { library: componentIconLibrary, key };\n}\n"],"names":["componentIconLibrary","componentIcon","key","library"],"mappings":"AAAA;AACA;AAIA;;;;IAKO,MAAMA,oBAAAA,GAAuB;AAEpC,+DACO,SAASC,aAAAA,CAAcC,GAAW,EAAA;IACrC,OAAO;QAAEC,OAAAA,EAASH,oBAAAA;AAAsBE,QAAAA;AAAI,KAAA;AAChD;;"}
|