@picteus/extension-sdk 0.17.0 → 0.18.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/dist/generated/viewKit.d.ts +335 -262
- package/dist/generated/viewKit.js +325 -255
- package/dist/picteus-ws-client/apis/AdministrationApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/AdministrationApi.js +1 -1
- package/dist/picteus-ws-client/apis/ApiSecretApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ApiSecretApi.js +1 -1
- package/dist/picteus-ws-client/apis/CollectionApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/CollectionApi.js +1 -1
- package/dist/picteus-ws-client/apis/ExtensionApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ExtensionApi.js +1 -1
- package/dist/picteus-ws-client/apis/ImageApi.d.ts +5 -1
- package/dist/picteus-ws-client/apis/ImageApi.js +7 -1
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.js +1 -1
- package/dist/picteus-ws-client/apis/MiscellaneousApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/MiscellaneousApi.js +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.js +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecret.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecret.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecretSummary.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecretSummary.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecretType.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecretType.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationConfiguration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationConfiguration.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadata.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadata.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItem.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItem.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationSettings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationSettings.js +1 -1
- package/dist/picteus-ws-client/models/Collection.d.ts +1 -1
- package/dist/picteus-ws-client/models/Collection.js +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.d.ts +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.js +1 -1
- package/dist/picteus-ws-client/models/ComputedImageFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ComputedImageFormat.js +1 -1
- package/dist/picteus-ws-client/models/ConfigurationCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationCapability.js +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.js +1 -1
- package/dist/picteus-ws-client/models/ConstantsRegistry.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConstantsRegistry.js +1 -1
- package/dist/picteus-ws-client/models/Dates.d.ts +1 -1
- package/dist/picteus-ws-client/models/Dates.js +1 -1
- package/dist/picteus-ws-client/models/Extension.d.ts +1 -1
- package/dist/picteus-ws-client/models/Extension.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivity.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivity.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivityState.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivityState.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionAndManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionAndManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionCategory.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionCategory.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeatureName.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeatureName.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionSettings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionSettings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionState.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionState.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.js +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipe.d.ts +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipe.js +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipePrompt.d.ts +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipePrompt.js +1 -1
- package/dist/picteus-ws-client/models/Image.d.ts +1 -1
- package/dist/picteus-ws-client/models/Image.js +1 -1
- package/dist/picteus-ws-client/models/ImageDimensions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDimensions.js +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.js +1 -1
- package/dist/picteus-ws-client/models/ImageEmbedding.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageEmbedding.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureNullValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureNullValue.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureValue.js +1 -1
- package/dist/picteus-ws-client/models/ImageFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.js +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.js +1 -1
- package/dist/picteus-ws-client/models/ImageResizeRender.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageResizeRender.js +1 -1
- package/dist/picteus-ws-client/models/ImageSummary.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageSummary.js +1 -1
- package/dist/picteus-ws-client/models/InstructionsPrompt.d.ts +1 -1
- package/dist/picteus-ws-client/models/InstructionsPrompt.js +1 -1
- package/dist/picteus-ws-client/models/Manifest.d.ts +1 -1
- package/dist/picteus-ws-client/models/Manifest.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.js +1 -1
- package/dist/picteus-ws-client/models/ManifestEvent.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestEvent.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExecution.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExecution.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInstructions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInstructions.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.js +1 -1
- package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.js +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.js +1 -1
- package/dist/picteus-ws-client/models/PromptKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/PromptKind.js +1 -1
- package/dist/picteus-ws-client/models/Repository.d.ts +1 -1
- package/dist/picteus-ws-client/models/Repository.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryState.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryState.js +1 -1
- package/dist/picteus-ws-client/models/RunCommandParameters.d.ts +1 -1
- package/dist/picteus-ws-client/models/RunCommandParameters.js +1 -1
- package/dist/picteus-ws-client/models/SearchCriteria.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchCriteria.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureCondition.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureCondition.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureConditionValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureConditionValue.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatures.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatures.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeaturesResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeaturesResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchFilter.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFilter.js +1 -1
- package/dist/picteus-ws-client/models/SearchFilterOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFilterOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageIdResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageIdResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageSummaryResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageSummaryResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImagesOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImagesOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchKeyword.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchKeyword.js +1 -1
- package/dist/picteus-ws-client/models/SearchMediaUrlResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchMediaUrlResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchOriginNature.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchOriginNature.js +1 -1
- package/dist/picteus-ws-client/models/SearchParameters.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchParameters.js +1 -1
- package/dist/picteus-ws-client/models/SearchProperties.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchProperties.js +1 -1
- package/dist/picteus-ws-client/models/SearchPropertyRange.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchPropertyRange.js +1 -1
- package/dist/picteus-ws-client/models/SearchRange.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchRange.js +1 -1
- package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.js +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.js +1 -1
- package/dist/picteus-ws-client/models/SearchTags.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchTags.js +1 -1
- package/dist/picteus-ws-client/models/SearchTagsResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchTagsResult.js +1 -1
- package/dist/picteus-ws-client/models/Software.d.ts +1 -1
- package/dist/picteus-ws-client/models/Software.js +1 -1
- package/dist/picteus-ws-client/models/TextualPrompt.d.ts +1 -1
- package/dist/picteus-ws-client/models/TextualPrompt.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.js +1 -1
- package/dist/picteus-ws-client/runtime.d.ts +1 -1
- package/dist/picteus-ws-client/runtime.js +1 -1
- package/package.json +1 -1
|
@@ -76,14 +76,32 @@ export var Size;
|
|
|
76
76
|
// Prominent large size
|
|
77
77
|
Size["large"] = "large";
|
|
78
78
|
})(Size || (Size = {}));
|
|
79
|
-
/**
|
|
80
|
-
export var
|
|
81
|
-
(function (
|
|
82
|
-
// Standard
|
|
83
|
-
|
|
79
|
+
/** Visual presentation style for string values. */
|
|
80
|
+
export var StringRepresentation;
|
|
81
|
+
(function (StringRepresentation) {
|
|
82
|
+
// Standard inline text rendering
|
|
83
|
+
StringRepresentation["plain"] = "plain";
|
|
84
84
|
// Visual chip / tag pill representation
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
StringRepresentation["chip"] = "chip";
|
|
86
|
+
// Multiline text with preserved whitespace and line breaks
|
|
87
|
+
StringRepresentation["multiline"] = "multiline";
|
|
88
|
+
})(StringRepresentation || (StringRepresentation = {}));
|
|
89
|
+
/** Visual separator rendered between sequential elements or items. */
|
|
90
|
+
export var Separator;
|
|
91
|
+
(function (Separator) {
|
|
92
|
+
// Vertical dividing bar
|
|
93
|
+
Separator["bar"] = "bar";
|
|
94
|
+
// Comma separator
|
|
95
|
+
Separator["comma"] = "comma";
|
|
96
|
+
// Bullet dot separator
|
|
97
|
+
Separator["dot"] = "dot";
|
|
98
|
+
// Forward slash separator
|
|
99
|
+
Separator["slash"] = "slash";
|
|
100
|
+
// Dash separator
|
|
101
|
+
Separator["dash"] = "dash";
|
|
102
|
+
// Space separator
|
|
103
|
+
Separator["space"] = "space";
|
|
104
|
+
})(Separator || (Separator = {}));
|
|
87
105
|
/** Supported syntax highlighting languages for formatted code blocks. */
|
|
88
106
|
export var CodeLanguage;
|
|
89
107
|
(function (CodeLanguage) {
|
|
@@ -94,6 +112,14 @@ export var CodeLanguage;
|
|
|
94
112
|
// YAML format syntax
|
|
95
113
|
CodeLanguage["yaml"] = "yaml";
|
|
96
114
|
})(CodeLanguage || (CodeLanguage = {}));
|
|
115
|
+
/** Visual presentation style for boolean values. */
|
|
116
|
+
export var BooleanRepresentation;
|
|
117
|
+
(function (BooleanRepresentation) {
|
|
118
|
+
// Standard inline text rendering (e.g. "true" / "false" or custom labels)
|
|
119
|
+
BooleanRepresentation["plain"] = "plain";
|
|
120
|
+
// Visual badge pill representation
|
|
121
|
+
BooleanRepresentation["badge"] = "badge";
|
|
122
|
+
})(BooleanRepresentation || (BooleanRepresentation = {}));
|
|
97
123
|
/** Visual color tone variants for badge pill representations. */
|
|
98
124
|
export var BadgeVariant;
|
|
99
125
|
(function (BadgeVariant) {
|
|
@@ -140,6 +166,14 @@ export var TableColumnAlign;
|
|
|
140
166
|
// Right-aligned text
|
|
141
167
|
TableColumnAlign["right"] = "right";
|
|
142
168
|
})(TableColumnAlign || (TableColumnAlign = {}));
|
|
169
|
+
/** Width mode for table columns. */
|
|
170
|
+
export var TableColumnWidthMode;
|
|
171
|
+
(function (TableColumnWidthMode) {
|
|
172
|
+
// Fixed width constraint
|
|
173
|
+
TableColumnWidthMode["fixed"] = "fixed";
|
|
174
|
+
// Maximum width upper bound constraint
|
|
175
|
+
TableColumnWidthMode["maximum"] = "maximum";
|
|
176
|
+
})(TableColumnWidthMode || (TableColumnWidthMode = {}));
|
|
143
177
|
/** Visual styling variants for hairline dividers. */
|
|
144
178
|
export var DividerStyle;
|
|
145
179
|
(function (DividerStyle) {
|
|
@@ -247,31 +281,31 @@ export class PrimitiveModifiersClass extends ViewKitNode {
|
|
|
247
281
|
}
|
|
248
282
|
}
|
|
249
283
|
/**
|
|
250
|
-
* Class implementation of the `
|
|
284
|
+
* Class implementation of the `StringElement` interface.
|
|
251
285
|
*
|
|
252
286
|
* @remarks
|
|
253
|
-
*
|
|
254
|
-
* Supports plain text
|
|
287
|
+
* Universal textual string primitive element.
|
|
288
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
255
289
|
*/
|
|
256
|
-
export class
|
|
290
|
+
export class StringElementClass extends BaseUiElement {
|
|
257
291
|
/**
|
|
258
|
-
* Discriminator identifier for `
|
|
292
|
+
* Discriminator identifier for `StringElement`.
|
|
259
293
|
*
|
|
260
|
-
* @defaultValue "string
|
|
294
|
+
* @defaultValue "string"
|
|
261
295
|
*/
|
|
262
|
-
type = "string
|
|
296
|
+
type = "string";
|
|
263
297
|
/** Text value */
|
|
264
298
|
value;
|
|
265
299
|
/**
|
|
266
300
|
* Display representation mode
|
|
267
301
|
*
|
|
268
|
-
* @defaultValue
|
|
302
|
+
* @defaultValue StringRepresentation.plain
|
|
269
303
|
*/
|
|
270
304
|
representation;
|
|
271
305
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
272
306
|
modifiers;
|
|
273
307
|
/**
|
|
274
|
-
* Constructs a new `
|
|
308
|
+
* Constructs a new `StringElementClass` instance.
|
|
275
309
|
*
|
|
276
310
|
* @param value - Text value
|
|
277
311
|
* @param options - Optional component settings. (representation (defaults to `plain`), modifiers).
|
|
@@ -279,36 +313,47 @@ export class StringShortElementClass extends BaseUiElement {
|
|
|
279
313
|
constructor(value, options) {
|
|
280
314
|
super();
|
|
281
315
|
this.value = value;
|
|
282
|
-
this.representation = options?.representation ??
|
|
316
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
283
317
|
this.modifiers = options?.modifiers;
|
|
284
318
|
}
|
|
285
319
|
}
|
|
286
320
|
/**
|
|
287
|
-
* Class implementation of the `
|
|
321
|
+
* Class implementation of the `StringsElement` interface.
|
|
288
322
|
*
|
|
289
323
|
* @remarks
|
|
290
|
-
*
|
|
324
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
325
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
291
326
|
*/
|
|
292
|
-
export class
|
|
327
|
+
export class StringsElementClass extends BaseUiElement {
|
|
293
328
|
/**
|
|
294
|
-
* Discriminator identifier for `
|
|
329
|
+
* Discriminator identifier for `StringsElement`.
|
|
295
330
|
*
|
|
296
|
-
* @defaultValue "
|
|
331
|
+
* @defaultValue "strings"
|
|
297
332
|
*/
|
|
298
|
-
type = "
|
|
299
|
-
/**
|
|
300
|
-
|
|
333
|
+
type = "strings";
|
|
334
|
+
/** Array of string values */
|
|
335
|
+
values;
|
|
336
|
+
/**
|
|
337
|
+
* Display representation mode (plain text or visual chips)
|
|
338
|
+
*
|
|
339
|
+
* @defaultValue StringRepresentation.plain
|
|
340
|
+
*/
|
|
341
|
+
representation;
|
|
342
|
+
/** Optional visual separator rendered between sequential values */
|
|
343
|
+
separator;
|
|
301
344
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
302
345
|
modifiers;
|
|
303
346
|
/**
|
|
304
|
-
* Constructs a new `
|
|
347
|
+
* Constructs a new `StringsElementClass` instance.
|
|
305
348
|
*
|
|
306
|
-
* @param
|
|
307
|
-
* @param options - Optional component settings. (modifiers).
|
|
349
|
+
* @param values - Array of string values
|
|
350
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), separator, modifiers).
|
|
308
351
|
*/
|
|
309
|
-
constructor(
|
|
352
|
+
constructor(values, options) {
|
|
310
353
|
super();
|
|
311
|
-
this.
|
|
354
|
+
this.values = values ? [...values] : [];
|
|
355
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
356
|
+
this.separator = options?.separator;
|
|
312
357
|
this.modifiers = options?.modifiers;
|
|
313
358
|
}
|
|
314
359
|
}
|
|
@@ -492,6 +537,39 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
492
537
|
this.modifiers = options?.modifiers;
|
|
493
538
|
}
|
|
494
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* Class implementation of the `DimensionsElement` interface.
|
|
542
|
+
*
|
|
543
|
+
* @remarks
|
|
544
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
545
|
+
*/
|
|
546
|
+
export class DimensionsElementClass extends BaseUiElement {
|
|
547
|
+
/**
|
|
548
|
+
* Discriminator identifier for `DimensionsElement`.
|
|
549
|
+
*
|
|
550
|
+
* @defaultValue "dimensions"
|
|
551
|
+
*/
|
|
552
|
+
type = "dimensions";
|
|
553
|
+
/** Width in pixels */
|
|
554
|
+
width;
|
|
555
|
+
/** Height in pixels */
|
|
556
|
+
height;
|
|
557
|
+
/** Optional visual modifiers (copyable) */
|
|
558
|
+
modifiers;
|
|
559
|
+
/**
|
|
560
|
+
* Constructs a new `DimensionsElementClass` instance.
|
|
561
|
+
*
|
|
562
|
+
* @param width - Width in pixels
|
|
563
|
+
* @param height - Height in pixels
|
|
564
|
+
* @param options - Optional component settings. (modifiers).
|
|
565
|
+
*/
|
|
566
|
+
constructor(width, height, options) {
|
|
567
|
+
super();
|
|
568
|
+
this.width = width;
|
|
569
|
+
this.height = height;
|
|
570
|
+
this.modifiers = options?.modifiers;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
495
573
|
/**
|
|
496
574
|
* Class implementation of the `ColourElement` interface.
|
|
497
575
|
*
|
|
@@ -651,49 +729,27 @@ export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
|
651
729
|
}
|
|
652
730
|
}
|
|
653
731
|
/**
|
|
654
|
-
* Class implementation of the `
|
|
732
|
+
* Class implementation of the `BooleanElement` interface.
|
|
655
733
|
*
|
|
656
734
|
* @remarks
|
|
657
|
-
*
|
|
735
|
+
* Universal boolean primitive element.
|
|
736
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
658
737
|
*/
|
|
659
|
-
export class
|
|
738
|
+
export class BooleanElementClass extends BaseUiElement {
|
|
660
739
|
/**
|
|
661
|
-
* Discriminator identifier for `
|
|
740
|
+
* Discriminator identifier for `BooleanElement`.
|
|
662
741
|
*
|
|
663
|
-
* @defaultValue "boolean
|
|
742
|
+
* @defaultValue "boolean"
|
|
664
743
|
*/
|
|
665
|
-
type = "boolean
|
|
744
|
+
type = "boolean";
|
|
666
745
|
/** Boolean state value */
|
|
667
746
|
value;
|
|
668
|
-
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
669
|
-
modifiers;
|
|
670
|
-
/**
|
|
671
|
-
* Constructs a new `BooleanPlainElementClass` instance.
|
|
672
|
-
*
|
|
673
|
-
* @param value - Boolean state value
|
|
674
|
-
* @param options - Optional component settings. (modifiers).
|
|
675
|
-
*/
|
|
676
|
-
constructor(value, options) {
|
|
677
|
-
super();
|
|
678
|
-
this.value = value;
|
|
679
|
-
this.modifiers = options?.modifiers;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* Class implementation of the `BooleanBadgeElement` interface.
|
|
684
|
-
*
|
|
685
|
-
* @remarks
|
|
686
|
-
* Visual badge pill representation of a boolean state.
|
|
687
|
-
*/
|
|
688
|
-
export class BooleanBadgeElementClass extends BaseUiElement {
|
|
689
747
|
/**
|
|
690
|
-
*
|
|
748
|
+
* Display representation mode
|
|
691
749
|
*
|
|
692
|
-
* @defaultValue
|
|
750
|
+
* @defaultValue BooleanRepresentation.plain
|
|
693
751
|
*/
|
|
694
|
-
|
|
695
|
-
/** Boolean state value */
|
|
696
|
-
value;
|
|
752
|
+
representation;
|
|
697
753
|
/**
|
|
698
754
|
* Custom display label when true (defaults to "true")
|
|
699
755
|
*
|
|
@@ -707,7 +763,7 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
707
763
|
*/
|
|
708
764
|
falseLabel;
|
|
709
765
|
/**
|
|
710
|
-
* Badge color tone
|
|
766
|
+
* Badge color tone when rendered as badge
|
|
711
767
|
*
|
|
712
768
|
* @defaultValue BadgeVariant.neutral
|
|
713
769
|
*/
|
|
@@ -715,14 +771,15 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
715
771
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
716
772
|
modifiers;
|
|
717
773
|
/**
|
|
718
|
-
* Constructs a new `
|
|
774
|
+
* Constructs a new `BooleanElementClass` instance.
|
|
719
775
|
*
|
|
720
776
|
* @param value - Boolean state value
|
|
721
|
-
* @param options - Optional component settings. (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
777
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
722
778
|
*/
|
|
723
779
|
constructor(value, options) {
|
|
724
780
|
super();
|
|
725
781
|
this.value = value;
|
|
782
|
+
this.representation = options?.representation ?? BooleanRepresentation.plain;
|
|
726
783
|
this.trueLabel = options?.trueLabel ?? "true";
|
|
727
784
|
this.falseLabel = options?.falseLabel ?? "false";
|
|
728
785
|
this.variant = options?.variant ?? BadgeVariant.neutral;
|
|
@@ -955,7 +1012,7 @@ export class SlotClass extends ViewKitNode {
|
|
|
955
1012
|
content;
|
|
956
1013
|
/** Optional slot label (e.g. "Slot A") */
|
|
957
1014
|
label;
|
|
958
|
-
/**
|
|
1015
|
+
/** Width percentage (1-100) */
|
|
959
1016
|
width;
|
|
960
1017
|
/**
|
|
961
1018
|
* Constructs a new `SlotClass` instance.
|
|
@@ -974,8 +1031,7 @@ export class SlotClass extends ViewKitNode {
|
|
|
974
1031
|
* Class implementation of the `MultiSlotElement` interface.
|
|
975
1032
|
*
|
|
976
1033
|
* @remarks
|
|
977
|
-
* Multi-slot horizontal row
|
|
978
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1034
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
979
1035
|
*/
|
|
980
1036
|
export class MultiSlotElementClass extends BaseUiElement {
|
|
981
1037
|
/**
|
|
@@ -986,18 +1042,14 @@ export class MultiSlotElementClass extends BaseUiElement {
|
|
|
986
1042
|
type = "multi-slot";
|
|
987
1043
|
/** List of slots comprising the row */
|
|
988
1044
|
slots;
|
|
989
|
-
/** Proportions descriptor (e.g. "1/3 + 2/3", "equal", "1/4 + 3/4") */
|
|
990
|
-
proportions;
|
|
991
1045
|
/**
|
|
992
1046
|
* Constructs a new `MultiSlotElementClass` instance.
|
|
993
1047
|
*
|
|
994
1048
|
* @param slots - List of slots comprising the row
|
|
995
|
-
* @param options - Optional component settings. (proportions).
|
|
996
1049
|
*/
|
|
997
|
-
constructor(slots
|
|
1050
|
+
constructor(slots) {
|
|
998
1051
|
super();
|
|
999
1052
|
this.slots = slots ? [...slots] : [];
|
|
1000
|
-
this.proportions = options?.proportions;
|
|
1001
1053
|
}
|
|
1002
1054
|
}
|
|
1003
1055
|
/**
|
|
@@ -1016,14 +1068,18 @@ export class FlowingElementClass extends BaseUiElement {
|
|
|
1016
1068
|
type = "flowing";
|
|
1017
1069
|
/** List of child elements rendered sequentially with line wrapping */
|
|
1018
1070
|
elements;
|
|
1071
|
+
/** Optional visual separator rendered between sequential child elements */
|
|
1072
|
+
separator;
|
|
1019
1073
|
/**
|
|
1020
1074
|
* Constructs a new `FlowingElementClass` instance.
|
|
1021
1075
|
*
|
|
1022
1076
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1077
|
+
* @param options - Optional component settings. (separator).
|
|
1023
1078
|
*/
|
|
1024
|
-
constructor(elements) {
|
|
1079
|
+
constructor(elements, options) {
|
|
1025
1080
|
super();
|
|
1026
1081
|
this.elements = elements ? [...elements] : [];
|
|
1082
|
+
this.separator = options?.separator;
|
|
1027
1083
|
}
|
|
1028
1084
|
}
|
|
1029
1085
|
/**
|
|
@@ -1079,18 +1135,25 @@ export class TableColumnClass extends ViewKitNode {
|
|
|
1079
1135
|
* @defaultValue TableColumnAlign.left
|
|
1080
1136
|
*/
|
|
1081
1137
|
align;
|
|
1082
|
-
/**
|
|
1138
|
+
/** Width percentage (1-100) */
|
|
1083
1139
|
width;
|
|
1140
|
+
/**
|
|
1141
|
+
* Sizing mode for the provided width
|
|
1142
|
+
*
|
|
1143
|
+
* @defaultValue TableColumnWidthMode.fixed
|
|
1144
|
+
*/
|
|
1145
|
+
widthMode;
|
|
1084
1146
|
/**
|
|
1085
1147
|
* Constructs a new `TableColumnClass` instance.
|
|
1086
1148
|
*
|
|
1087
|
-
* @param options - Optional component settings. (header, align (defaults to `left`), width).
|
|
1149
|
+
* @param options - Optional component settings. (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
1088
1150
|
*/
|
|
1089
1151
|
constructor(options) {
|
|
1090
1152
|
super();
|
|
1091
1153
|
this.header = options?.header;
|
|
1092
1154
|
this.align = options?.align ?? TableColumnAlign.left;
|
|
1093
1155
|
this.width = options?.width;
|
|
1156
|
+
this.widthMode = options?.widthMode ?? TableColumnWidthMode.fixed;
|
|
1094
1157
|
}
|
|
1095
1158
|
}
|
|
1096
1159
|
/**
|
|
@@ -1128,12 +1191,6 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1128
1191
|
type = "table";
|
|
1129
1192
|
/** Tabular data rows */
|
|
1130
1193
|
rows;
|
|
1131
|
-
/**
|
|
1132
|
-
* Whether to render a column header row
|
|
1133
|
-
*
|
|
1134
|
-
* @defaultValue true
|
|
1135
|
-
*/
|
|
1136
|
-
hasHeader;
|
|
1137
1194
|
/**
|
|
1138
1195
|
* Whether to render alternating row background colors
|
|
1139
1196
|
*
|
|
@@ -1158,12 +1215,11 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1158
1215
|
* Constructs a new `TableElementClass` instance.
|
|
1159
1216
|
*
|
|
1160
1217
|
* @param rows - Tabular data rows
|
|
1161
|
-
* @param options - Optional component settings. (
|
|
1218
|
+
* @param options - Optional component settings. (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1162
1219
|
*/
|
|
1163
1220
|
constructor(rows, options) {
|
|
1164
1221
|
super();
|
|
1165
1222
|
this.rows = rows ? [...rows] : [];
|
|
1166
|
-
this.hasHeader = options?.hasHeader ?? true;
|
|
1167
1223
|
this.isStriped = options?.isStriped ?? false;
|
|
1168
1224
|
this.withColumnSeparators = options?.withColumnSeparators ?? false;
|
|
1169
1225
|
this.withRowSeparators = options?.withRowSeparators ?? false;
|
|
@@ -1414,31 +1470,32 @@ export class UiContainerBuilder {
|
|
|
1414
1470
|
return this;
|
|
1415
1471
|
}
|
|
1416
1472
|
/**
|
|
1417
|
-
* Appends a `
|
|
1473
|
+
* Appends a `StringElement` component.
|
|
1418
1474
|
*
|
|
1419
1475
|
* @remarks
|
|
1420
|
-
*
|
|
1421
|
-
* Supports plain text
|
|
1476
|
+
* Universal textual string primitive element.
|
|
1477
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
1422
1478
|
*
|
|
1423
1479
|
* @param value - Text value
|
|
1424
1480
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1425
1481
|
* @returns This builder instance for method chaining.
|
|
1426
1482
|
*/
|
|
1427
|
-
|
|
1428
|
-
return this.add(
|
|
1483
|
+
addString(value, options) {
|
|
1484
|
+
return this.add(string(value, options));
|
|
1429
1485
|
}
|
|
1430
1486
|
/**
|
|
1431
|
-
* Appends a `
|
|
1487
|
+
* Appends a `StringsElement` component.
|
|
1432
1488
|
*
|
|
1433
1489
|
* @remarks
|
|
1434
|
-
*
|
|
1490
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
1491
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
1435
1492
|
*
|
|
1436
|
-
* @param
|
|
1437
|
-
* @param options - Optional component settings (modifiers).
|
|
1493
|
+
* @param values - Array of string values
|
|
1494
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
1438
1495
|
* @returns This builder instance for method chaining.
|
|
1439
1496
|
*/
|
|
1440
|
-
|
|
1441
|
-
return this.add(
|
|
1497
|
+
addStrings(values, options) {
|
|
1498
|
+
return this.add(strings(values, options));
|
|
1442
1499
|
}
|
|
1443
1500
|
/**
|
|
1444
1501
|
* Appends a `StringCodeElement` component.
|
|
@@ -1518,6 +1575,20 @@ export class UiContainerBuilder {
|
|
|
1518
1575
|
addRatio(value, options) {
|
|
1519
1576
|
return this.add(ratio(value, options));
|
|
1520
1577
|
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Appends a `DimensionsElement` component.
|
|
1580
|
+
*
|
|
1581
|
+
* @remarks
|
|
1582
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
1583
|
+
*
|
|
1584
|
+
* @param width - Width in pixels
|
|
1585
|
+
* @param height - Height in pixels
|
|
1586
|
+
* @param options - Optional component settings (modifiers).
|
|
1587
|
+
* @returns This builder instance for method chaining.
|
|
1588
|
+
*/
|
|
1589
|
+
addDimensions(width, height, options) {
|
|
1590
|
+
return this.add(dimensions(width, height, options));
|
|
1591
|
+
}
|
|
1521
1592
|
/**
|
|
1522
1593
|
* Appends a `ColourElement` component.
|
|
1523
1594
|
*
|
|
@@ -1610,30 +1681,18 @@ export class UiContainerBuilder {
|
|
|
1610
1681
|
return this.add(numberMeter(value, options));
|
|
1611
1682
|
}
|
|
1612
1683
|
/**
|
|
1613
|
-
* Appends a `
|
|
1614
|
-
*
|
|
1615
|
-
* @remarks
|
|
1616
|
-
* Plain boolean value representation (textual "true" / "false").
|
|
1617
|
-
*
|
|
1618
|
-
* @param value - Boolean state value
|
|
1619
|
-
* @param options - Optional component settings (modifiers).
|
|
1620
|
-
* @returns This builder instance for method chaining.
|
|
1621
|
-
*/
|
|
1622
|
-
addBooleanPlain(value, options) {
|
|
1623
|
-
return this.add(booleanPlain(value, options));
|
|
1624
|
-
}
|
|
1625
|
-
/**
|
|
1626
|
-
* Appends a `BooleanBadgeElement` component.
|
|
1684
|
+
* Appends a `BooleanElement` component.
|
|
1627
1685
|
*
|
|
1628
1686
|
* @remarks
|
|
1629
|
-
*
|
|
1687
|
+
* Universal boolean primitive element.
|
|
1688
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
1630
1689
|
*
|
|
1631
1690
|
* @param value - Boolean state value
|
|
1632
|
-
* @param options - Optional component settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1691
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1633
1692
|
* @returns This builder instance for method chaining.
|
|
1634
1693
|
*/
|
|
1635
|
-
|
|
1636
|
-
return this.add(
|
|
1694
|
+
addBoolean(value, options) {
|
|
1695
|
+
return this.add(boolean(value, options));
|
|
1637
1696
|
}
|
|
1638
1697
|
/**
|
|
1639
1698
|
* Appends a `TimestampElement` component.
|
|
@@ -1730,15 +1789,13 @@ export class UiContainerBuilder {
|
|
|
1730
1789
|
* Appends a `MultiSlotElement` component.
|
|
1731
1790
|
*
|
|
1732
1791
|
* @remarks
|
|
1733
|
-
* Multi-slot horizontal row
|
|
1734
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1792
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
1735
1793
|
*
|
|
1736
1794
|
* @param slots - List of slots comprising the row
|
|
1737
|
-
* @param options - Optional component settings (proportions).
|
|
1738
1795
|
* @returns This builder instance for method chaining.
|
|
1739
1796
|
*/
|
|
1740
|
-
addMultiSlot(slots
|
|
1741
|
-
return this.add(multiSlot(slots
|
|
1797
|
+
addMultiSlot(slots) {
|
|
1798
|
+
return this.add(multiSlot(slots));
|
|
1742
1799
|
}
|
|
1743
1800
|
/**
|
|
1744
1801
|
* Appends a `FlowingElement` component.
|
|
@@ -1748,10 +1805,11 @@ export class UiContainerBuilder {
|
|
|
1748
1805
|
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1749
1806
|
*
|
|
1750
1807
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1808
|
+
* @param options - Optional component settings (separator).
|
|
1751
1809
|
* @returns This builder instance for method chaining.
|
|
1752
1810
|
*/
|
|
1753
|
-
addFlowing(elements) {
|
|
1754
|
-
return this.add(flowing(elements));
|
|
1811
|
+
addFlowing(elements, options) {
|
|
1812
|
+
return this.add(flowing(elements, options));
|
|
1755
1813
|
}
|
|
1756
1814
|
/**
|
|
1757
1815
|
* Appends a `LabelValueElement` component.
|
|
@@ -1776,7 +1834,7 @@ export class UiContainerBuilder {
|
|
|
1776
1834
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
1777
1835
|
*
|
|
1778
1836
|
* @param rows - Tabular data rows
|
|
1779
|
-
* @param options - Optional component settings (
|
|
1837
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1780
1838
|
* @returns This builder instance for method chaining.
|
|
1781
1839
|
*/
|
|
1782
1840
|
addTable(rows, options) {
|
|
@@ -1979,31 +2037,32 @@ export class UiCardBuilder {
|
|
|
1979
2037
|
return this;
|
|
1980
2038
|
}
|
|
1981
2039
|
/**
|
|
1982
|
-
* Appends a `
|
|
2040
|
+
* Appends a `StringElement` component.
|
|
1983
2041
|
*
|
|
1984
2042
|
* @remarks
|
|
1985
|
-
*
|
|
1986
|
-
* Supports plain text
|
|
2043
|
+
* Universal textual string primitive element.
|
|
2044
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
1987
2045
|
*
|
|
1988
2046
|
* @param value - Text value
|
|
1989
2047
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1990
2048
|
* @returns This builder instance for method chaining.
|
|
1991
2049
|
*/
|
|
1992
|
-
|
|
1993
|
-
return this.add(
|
|
2050
|
+
addString(value, options) {
|
|
2051
|
+
return this.add(string(value, options));
|
|
1994
2052
|
}
|
|
1995
2053
|
/**
|
|
1996
|
-
* Appends a `
|
|
2054
|
+
* Appends a `StringsElement` component.
|
|
1997
2055
|
*
|
|
1998
2056
|
* @remarks
|
|
1999
|
-
*
|
|
2057
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
2058
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
2000
2059
|
*
|
|
2001
|
-
* @param
|
|
2002
|
-
* @param options - Optional component settings (modifiers).
|
|
2060
|
+
* @param values - Array of string values
|
|
2061
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
2003
2062
|
* @returns This builder instance for method chaining.
|
|
2004
2063
|
*/
|
|
2005
|
-
|
|
2006
|
-
return this.add(
|
|
2064
|
+
addStrings(values, options) {
|
|
2065
|
+
return this.add(strings(values, options));
|
|
2007
2066
|
}
|
|
2008
2067
|
/**
|
|
2009
2068
|
* Appends a `StringCodeElement` component.
|
|
@@ -2083,6 +2142,20 @@ export class UiCardBuilder {
|
|
|
2083
2142
|
addRatio(value, options) {
|
|
2084
2143
|
return this.add(ratio(value, options));
|
|
2085
2144
|
}
|
|
2145
|
+
/**
|
|
2146
|
+
* Appends a `DimensionsElement` component.
|
|
2147
|
+
*
|
|
2148
|
+
* @remarks
|
|
2149
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
2150
|
+
*
|
|
2151
|
+
* @param width - Width in pixels
|
|
2152
|
+
* @param height - Height in pixels
|
|
2153
|
+
* @param options - Optional component settings (modifiers).
|
|
2154
|
+
* @returns This builder instance for method chaining.
|
|
2155
|
+
*/
|
|
2156
|
+
addDimensions(width, height, options) {
|
|
2157
|
+
return this.add(dimensions(width, height, options));
|
|
2158
|
+
}
|
|
2086
2159
|
/**
|
|
2087
2160
|
* Appends a `ColourElement` component.
|
|
2088
2161
|
*
|
|
@@ -2175,30 +2248,18 @@ export class UiCardBuilder {
|
|
|
2175
2248
|
return this.add(numberMeter(value, options));
|
|
2176
2249
|
}
|
|
2177
2250
|
/**
|
|
2178
|
-
* Appends a `
|
|
2179
|
-
*
|
|
2180
|
-
* @remarks
|
|
2181
|
-
* Plain boolean value representation (textual "true" / "false").
|
|
2182
|
-
*
|
|
2183
|
-
* @param value - Boolean state value
|
|
2184
|
-
* @param options - Optional component settings (modifiers).
|
|
2185
|
-
* @returns This builder instance for method chaining.
|
|
2186
|
-
*/
|
|
2187
|
-
addBooleanPlain(value, options) {
|
|
2188
|
-
return this.add(booleanPlain(value, options));
|
|
2189
|
-
}
|
|
2190
|
-
/**
|
|
2191
|
-
* Appends a `BooleanBadgeElement` component.
|
|
2251
|
+
* Appends a `BooleanElement` component.
|
|
2192
2252
|
*
|
|
2193
2253
|
* @remarks
|
|
2194
|
-
*
|
|
2254
|
+
* Universal boolean primitive element.
|
|
2255
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
2195
2256
|
*
|
|
2196
2257
|
* @param value - Boolean state value
|
|
2197
|
-
* @param options - Optional component settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2258
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2198
2259
|
* @returns This builder instance for method chaining.
|
|
2199
2260
|
*/
|
|
2200
|
-
|
|
2201
|
-
return this.add(
|
|
2261
|
+
addBoolean(value, options) {
|
|
2262
|
+
return this.add(boolean(value, options));
|
|
2202
2263
|
}
|
|
2203
2264
|
/**
|
|
2204
2265
|
* Appends a `TimestampElement` component.
|
|
@@ -2295,15 +2356,13 @@ export class UiCardBuilder {
|
|
|
2295
2356
|
* Appends a `MultiSlotElement` component.
|
|
2296
2357
|
*
|
|
2297
2358
|
* @remarks
|
|
2298
|
-
* Multi-slot horizontal row
|
|
2299
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2359
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
2300
2360
|
*
|
|
2301
2361
|
* @param slots - List of slots comprising the row
|
|
2302
|
-
* @param options - Optional component settings (proportions).
|
|
2303
2362
|
* @returns This builder instance for method chaining.
|
|
2304
2363
|
*/
|
|
2305
|
-
addMultiSlot(slots
|
|
2306
|
-
return this.add(multiSlot(slots
|
|
2364
|
+
addMultiSlot(slots) {
|
|
2365
|
+
return this.add(multiSlot(slots));
|
|
2307
2366
|
}
|
|
2308
2367
|
/**
|
|
2309
2368
|
* Appends a `FlowingElement` component.
|
|
@@ -2313,10 +2372,11 @@ export class UiCardBuilder {
|
|
|
2313
2372
|
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
2314
2373
|
*
|
|
2315
2374
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
2375
|
+
* @param options - Optional component settings (separator).
|
|
2316
2376
|
* @returns This builder instance for method chaining.
|
|
2317
2377
|
*/
|
|
2318
|
-
addFlowing(elements) {
|
|
2319
|
-
return this.add(flowing(elements));
|
|
2378
|
+
addFlowing(elements, options) {
|
|
2379
|
+
return this.add(flowing(elements, options));
|
|
2320
2380
|
}
|
|
2321
2381
|
/**
|
|
2322
2382
|
* Appends a `LabelValueElement` component.
|
|
@@ -2341,7 +2401,7 @@ export class UiCardBuilder {
|
|
|
2341
2401
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
2342
2402
|
*
|
|
2343
2403
|
* @param rows - Tabular data rows
|
|
2344
|
-
* @param options - Optional component settings (
|
|
2404
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
2345
2405
|
* @returns This builder instance for method chaining.
|
|
2346
2406
|
*/
|
|
2347
2407
|
addTable(rows, options) {
|
|
@@ -2536,38 +2596,41 @@ export function primitiveModifiers(options) {
|
|
|
2536
2596
|
};
|
|
2537
2597
|
}
|
|
2538
2598
|
/**
|
|
2539
|
-
* Creates a `
|
|
2599
|
+
* Creates a `StringElement` component instance.
|
|
2540
2600
|
*
|
|
2541
2601
|
* @remarks
|
|
2542
|
-
*
|
|
2543
|
-
* Supports plain text
|
|
2602
|
+
* Universal textual string primitive element.
|
|
2603
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
2544
2604
|
*
|
|
2545
2605
|
* @param value - Text value
|
|
2546
2606
|
* @param options - Optional settings (representation (defaults to `plain`), modifiers).
|
|
2547
|
-
* @returns A strongly-typed `
|
|
2607
|
+
* @returns A strongly-typed `StringElement` object.
|
|
2548
2608
|
*/
|
|
2549
|
-
export function
|
|
2609
|
+
export function string(value, options) {
|
|
2550
2610
|
return {
|
|
2551
|
-
type: "string
|
|
2611
|
+
type: "string",
|
|
2552
2612
|
value,
|
|
2553
|
-
representation: options?.representation ??
|
|
2613
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
2554
2614
|
modifiers: options?.modifiers
|
|
2555
2615
|
};
|
|
2556
2616
|
}
|
|
2557
2617
|
/**
|
|
2558
|
-
* Creates a `
|
|
2618
|
+
* Creates a `StringsElement` component instance.
|
|
2559
2619
|
*
|
|
2560
2620
|
* @remarks
|
|
2561
|
-
*
|
|
2621
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
2622
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
2562
2623
|
*
|
|
2563
|
-
* @param
|
|
2564
|
-
* @param options - Optional settings (modifiers).
|
|
2565
|
-
* @returns A strongly-typed `
|
|
2624
|
+
* @param values - Array of string values
|
|
2625
|
+
* @param options - Optional settings (representation (defaults to `plain`), separator, modifiers).
|
|
2626
|
+
* @returns A strongly-typed `StringsElement` object.
|
|
2566
2627
|
*/
|
|
2567
|
-
export function
|
|
2628
|
+
export function strings(values, options) {
|
|
2568
2629
|
return {
|
|
2569
|
-
type: "
|
|
2570
|
-
|
|
2630
|
+
type: "strings",
|
|
2631
|
+
values: [...values],
|
|
2632
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
2633
|
+
separator: options?.separator,
|
|
2571
2634
|
modifiers: options?.modifiers
|
|
2572
2635
|
};
|
|
2573
2636
|
}
|
|
@@ -2675,6 +2738,25 @@ export function ratio(value, options) {
|
|
|
2675
2738
|
modifiers: options?.modifiers
|
|
2676
2739
|
};
|
|
2677
2740
|
}
|
|
2741
|
+
/**
|
|
2742
|
+
* Creates a `DimensionsElement` component instance.
|
|
2743
|
+
*
|
|
2744
|
+
* @remarks
|
|
2745
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
2746
|
+
*
|
|
2747
|
+
* @param width - Width in pixels
|
|
2748
|
+
* @param height - Height in pixels
|
|
2749
|
+
* @param options - Optional settings (modifiers).
|
|
2750
|
+
* @returns A strongly-typed `DimensionsElement` object.
|
|
2751
|
+
*/
|
|
2752
|
+
export function dimensions(width, height, options) {
|
|
2753
|
+
return {
|
|
2754
|
+
type: "dimensions",
|
|
2755
|
+
width,
|
|
2756
|
+
height,
|
|
2757
|
+
modifiers: options?.modifiers
|
|
2758
|
+
};
|
|
2759
|
+
}
|
|
2678
2760
|
/**
|
|
2679
2761
|
* Creates a `ColourElement` component instance.
|
|
2680
2762
|
*
|
|
@@ -2814,36 +2896,21 @@ export function numberMeter(value, options) {
|
|
|
2814
2896
|
};
|
|
2815
2897
|
}
|
|
2816
2898
|
/**
|
|
2817
|
-
* Creates a `
|
|
2818
|
-
*
|
|
2819
|
-
* @remarks
|
|
2820
|
-
* Plain boolean value representation (textual "true" / "false").
|
|
2821
|
-
*
|
|
2822
|
-
* @param value - Boolean state value
|
|
2823
|
-
* @param options - Optional settings (modifiers).
|
|
2824
|
-
* @returns A strongly-typed `BooleanPlainElement` object.
|
|
2825
|
-
*/
|
|
2826
|
-
export function booleanPlain(value, options) {
|
|
2827
|
-
return {
|
|
2828
|
-
type: "boolean-plain",
|
|
2829
|
-
value,
|
|
2830
|
-
modifiers: options?.modifiers
|
|
2831
|
-
};
|
|
2832
|
-
}
|
|
2833
|
-
/**
|
|
2834
|
-
* Creates a `BooleanBadgeElement` component instance.
|
|
2899
|
+
* Creates a `BooleanElement` component instance.
|
|
2835
2900
|
*
|
|
2836
2901
|
* @remarks
|
|
2837
|
-
*
|
|
2902
|
+
* Universal boolean primitive element.
|
|
2903
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
2838
2904
|
*
|
|
2839
2905
|
* @param value - Boolean state value
|
|
2840
|
-
* @param options - Optional settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2841
|
-
* @returns A strongly-typed `
|
|
2906
|
+
* @param options - Optional settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2907
|
+
* @returns A strongly-typed `BooleanElement` object.
|
|
2842
2908
|
*/
|
|
2843
|
-
export function
|
|
2909
|
+
export function boolean(value, options) {
|
|
2844
2910
|
return {
|
|
2845
|
-
type: "boolean
|
|
2911
|
+
type: "boolean",
|
|
2846
2912
|
value,
|
|
2913
|
+
representation: options?.representation ?? BooleanRepresentation.plain,
|
|
2847
2914
|
trueLabel: options?.trueLabel ?? "true",
|
|
2848
2915
|
falseLabel: options?.falseLabel ?? "false",
|
|
2849
2916
|
variant: options?.variant ?? BadgeVariant.neutral,
|
|
@@ -3035,18 +3102,15 @@ export function slot(content, options) {
|
|
|
3035
3102
|
* Creates a `MultiSlotElement` component instance.
|
|
3036
3103
|
*
|
|
3037
3104
|
* @remarks
|
|
3038
|
-
* Multi-slot horizontal row
|
|
3039
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
3105
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
3040
3106
|
*
|
|
3041
3107
|
* @param slots - List of slots comprising the row
|
|
3042
|
-
* @param options - Optional settings (proportions).
|
|
3043
3108
|
* @returns A strongly-typed `MultiSlotElement` object.
|
|
3044
3109
|
*/
|
|
3045
|
-
export function multiSlot(slots
|
|
3110
|
+
export function multiSlot(slots) {
|
|
3046
3111
|
return {
|
|
3047
3112
|
type: "multi-slot",
|
|
3048
|
-
slots: [...slots]
|
|
3049
|
-
proportions: options?.proportions
|
|
3113
|
+
slots: [...slots]
|
|
3050
3114
|
};
|
|
3051
3115
|
}
|
|
3052
3116
|
/**
|
|
@@ -3057,12 +3121,14 @@ export function multiSlot(slots, options) {
|
|
|
3057
3121
|
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
3058
3122
|
*
|
|
3059
3123
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
3124
|
+
* @param options - Optional settings (separator).
|
|
3060
3125
|
* @returns A strongly-typed `FlowingElement` object.
|
|
3061
3126
|
*/
|
|
3062
|
-
export function flowing(elements) {
|
|
3127
|
+
export function flowing(elements, options) {
|
|
3063
3128
|
return {
|
|
3064
3129
|
type: "flowing",
|
|
3065
|
-
elements: [...elements]
|
|
3130
|
+
elements: [...elements],
|
|
3131
|
+
separator: options?.separator
|
|
3066
3132
|
};
|
|
3067
3133
|
}
|
|
3068
3134
|
/**
|
|
@@ -3091,14 +3157,15 @@ export function labelValue(label, value, options) {
|
|
|
3091
3157
|
* @remarks
|
|
3092
3158
|
* Column definition for structured tables.
|
|
3093
3159
|
*
|
|
3094
|
-
* @param options - Optional settings (header, align (defaults to `left`), width).
|
|
3160
|
+
* @param options - Optional settings (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
3095
3161
|
* @returns A strongly-typed `TableColumn` object.
|
|
3096
3162
|
*/
|
|
3097
3163
|
export function tableColumn(options) {
|
|
3098
3164
|
return {
|
|
3099
3165
|
header: options?.header,
|
|
3100
3166
|
align: options?.align ?? TableColumnAlign.left,
|
|
3101
|
-
width: options?.width
|
|
3167
|
+
width: options?.width,
|
|
3168
|
+
widthMode: options?.widthMode ?? TableColumnWidthMode.fixed
|
|
3102
3169
|
};
|
|
3103
3170
|
}
|
|
3104
3171
|
/**
|
|
@@ -3123,14 +3190,13 @@ export function tableRow(cells) {
|
|
|
3123
3190
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
3124
3191
|
*
|
|
3125
3192
|
* @param rows - Tabular data rows
|
|
3126
|
-
* @param options - Optional settings (
|
|
3193
|
+
* @param options - Optional settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
3127
3194
|
* @returns A strongly-typed `TableElement` object.
|
|
3128
3195
|
*/
|
|
3129
3196
|
export function table(rows, options) {
|
|
3130
3197
|
return {
|
|
3131
3198
|
type: "table",
|
|
3132
3199
|
rows: [...rows],
|
|
3133
|
-
hasHeader: options?.hasHeader ?? true,
|
|
3134
3200
|
isStriped: options?.isStriped ?? false,
|
|
3135
3201
|
withColumnSeparators: options?.withColumnSeparators ?? false,
|
|
3136
3202
|
withRowSeparators: options?.withRowSeparators ?? false,
|
|
@@ -3293,7 +3359,7 @@ export function isSlot(value, withDeepValidation = false) {
|
|
|
3293
3359
|
}
|
|
3294
3360
|
const element = value;
|
|
3295
3361
|
return (element.label === undefined || typeof element.label === "string") &&
|
|
3296
|
-
(element.width === undefined || typeof element.width === "
|
|
3362
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
3297
3363
|
("content" in value && isUiElement(element.content, true));
|
|
3298
3364
|
}
|
|
3299
3365
|
/**
|
|
@@ -3313,7 +3379,8 @@ export function isTableColumn(value, withDeepValidation = false) {
|
|
|
3313
3379
|
const element = value;
|
|
3314
3380
|
return (element.header === undefined || typeof element.header === "string") &&
|
|
3315
3381
|
(element.align === undefined || Object.values(TableColumnAlign).includes(element.align)) &&
|
|
3316
|
-
(element.width === undefined || typeof element.width === "
|
|
3382
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
3383
|
+
(element.widthMode === undefined || Object.values(TableColumnWidthMode).includes(element.widthMode));
|
|
3317
3384
|
}
|
|
3318
3385
|
/**
|
|
3319
3386
|
* Type guard predicate verifying whether an unknown value conforms to `TableRow`.
|
|
@@ -3384,10 +3451,10 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3384
3451
|
}
|
|
3385
3452
|
const element = value;
|
|
3386
3453
|
switch (element.type) {
|
|
3387
|
-
case "string
|
|
3388
|
-
return
|
|
3389
|
-
case "
|
|
3390
|
-
return
|
|
3454
|
+
case "string":
|
|
3455
|
+
return isStringElement(element, true);
|
|
3456
|
+
case "strings":
|
|
3457
|
+
return isStringsElement(element, true);
|
|
3391
3458
|
case "string-code":
|
|
3392
3459
|
return isStringCodeElement(element, true);
|
|
3393
3460
|
case "xml":
|
|
@@ -3400,6 +3467,8 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3400
3467
|
return isIdentifierElement(element, true);
|
|
3401
3468
|
case "ratio":
|
|
3402
3469
|
return isRatioElement(element, true);
|
|
3470
|
+
case "dimensions":
|
|
3471
|
+
return isDimensionsElement(element, true);
|
|
3403
3472
|
case "color":
|
|
3404
3473
|
return isColourElement(element, true);
|
|
3405
3474
|
case "number-unbounded":
|
|
@@ -3408,10 +3477,8 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3408
3477
|
return isNumberBoundedStarsElement(element, true);
|
|
3409
3478
|
case "number-meter":
|
|
3410
3479
|
return isNumberBoundedMeterElement(element, true);
|
|
3411
|
-
case "boolean
|
|
3412
|
-
return
|
|
3413
|
-
case "boolean-badge":
|
|
3414
|
-
return isBooleanBadgeElement(element, true);
|
|
3480
|
+
case "boolean":
|
|
3481
|
+
return isBooleanElement(element, true);
|
|
3415
3482
|
case "timestamp":
|
|
3416
3483
|
return isTimestampElement(element, true);
|
|
3417
3484
|
case "image-ref":
|
|
@@ -3439,14 +3506,14 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3439
3506
|
}
|
|
3440
3507
|
}
|
|
3441
3508
|
/**
|
|
3442
|
-
* Type guard predicate narrowing a value to `
|
|
3509
|
+
* Type guard predicate narrowing a value to `StringElement`.
|
|
3443
3510
|
*
|
|
3444
3511
|
* @param value - The value to inspect.
|
|
3445
3512
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3446
|
-
* @returns `true` if the value is a `
|
|
3513
|
+
* @returns `true` if the value is a `StringElement` (type = "string"), otherwise `false`.
|
|
3447
3514
|
*/
|
|
3448
|
-
export function
|
|
3449
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string
|
|
3515
|
+
export function isStringElement(value, withDeepValidation = false) {
|
|
3516
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string") {
|
|
3450
3517
|
return false;
|
|
3451
3518
|
}
|
|
3452
3519
|
if (!withDeepValidation) {
|
|
@@ -3454,25 +3521,27 @@ export function isStringShortElement(value, withDeepValidation = false) {
|
|
|
3454
3521
|
}
|
|
3455
3522
|
const element = value;
|
|
3456
3523
|
return ("value" in value && typeof element.value === "string") &&
|
|
3457
|
-
(element.representation === undefined || Object.values(
|
|
3524
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
3458
3525
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3459
3526
|
}
|
|
3460
3527
|
/**
|
|
3461
|
-
* Type guard predicate narrowing a value to `
|
|
3528
|
+
* Type guard predicate narrowing a value to `StringsElement`.
|
|
3462
3529
|
*
|
|
3463
3530
|
* @param value - The value to inspect.
|
|
3464
3531
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3465
|
-
* @returns `true` if the value is a `
|
|
3532
|
+
* @returns `true` if the value is a `StringsElement` (type = "strings"), otherwise `false`.
|
|
3466
3533
|
*/
|
|
3467
|
-
export function
|
|
3468
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3534
|
+
export function isStringsElement(value, withDeepValidation = false) {
|
|
3535
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "strings") {
|
|
3469
3536
|
return false;
|
|
3470
3537
|
}
|
|
3471
3538
|
if (!withDeepValidation) {
|
|
3472
3539
|
return true;
|
|
3473
3540
|
}
|
|
3474
3541
|
const element = value;
|
|
3475
|
-
return ("
|
|
3542
|
+
return ("values" in value && (Array.isArray(element.values) && element.values.every((item) => typeof item === "string"))) &&
|
|
3543
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
3544
|
+
(element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
3476
3545
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3477
3546
|
}
|
|
3478
3547
|
/**
|
|
@@ -3585,6 +3654,25 @@ export function isRatioElement(value, withDeepValidation = false) {
|
|
|
3585
3654
|
return ("value" in value && typeof element.value === "number") &&
|
|
3586
3655
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3587
3656
|
}
|
|
3657
|
+
/**
|
|
3658
|
+
* Type guard predicate narrowing a value to `DimensionsElement`.
|
|
3659
|
+
*
|
|
3660
|
+
* @param value - The value to inspect.
|
|
3661
|
+
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3662
|
+
* @returns `true` if the value is a `DimensionsElement` (type = "dimensions"), otherwise `false`.
|
|
3663
|
+
*/
|
|
3664
|
+
export function isDimensionsElement(value, withDeepValidation = false) {
|
|
3665
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "dimensions") {
|
|
3666
|
+
return false;
|
|
3667
|
+
}
|
|
3668
|
+
if (!withDeepValidation) {
|
|
3669
|
+
return true;
|
|
3670
|
+
}
|
|
3671
|
+
const element = value;
|
|
3672
|
+
return ("width" in value && typeof element.width === "number") &&
|
|
3673
|
+
("height" in value && typeof element.height === "number") &&
|
|
3674
|
+
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3675
|
+
}
|
|
3588
3676
|
/**
|
|
3589
3677
|
* Type guard predicate narrowing a value to `ColourElement`.
|
|
3590
3678
|
*
|
|
@@ -3668,32 +3756,14 @@ export function isNumberBoundedMeterElement(value, withDeepValidation = false) {
|
|
|
3668
3756
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3669
3757
|
}
|
|
3670
3758
|
/**
|
|
3671
|
-
* Type guard predicate narrowing a value to `
|
|
3759
|
+
* Type guard predicate narrowing a value to `BooleanElement`.
|
|
3672
3760
|
*
|
|
3673
3761
|
* @param value - The value to inspect.
|
|
3674
3762
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3675
|
-
* @returns `true` if the value is a `
|
|
3763
|
+
* @returns `true` if the value is a `BooleanElement` (type = "boolean"), otherwise `false`.
|
|
3676
3764
|
*/
|
|
3677
|
-
export function
|
|
3678
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean
|
|
3679
|
-
return false;
|
|
3680
|
-
}
|
|
3681
|
-
if (!withDeepValidation) {
|
|
3682
|
-
return true;
|
|
3683
|
-
}
|
|
3684
|
-
const element = value;
|
|
3685
|
-
return ("value" in value && typeof element.value === "boolean") &&
|
|
3686
|
-
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3687
|
-
}
|
|
3688
|
-
/**
|
|
3689
|
-
* Type guard predicate narrowing a value to `BooleanBadgeElement`.
|
|
3690
|
-
*
|
|
3691
|
-
* @param value - The value to inspect.
|
|
3692
|
-
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3693
|
-
* @returns `true` if the value is a `BooleanBadgeElement` (type = "boolean-badge"), otherwise `false`.
|
|
3694
|
-
*/
|
|
3695
|
-
export function isBooleanBadgeElement(value, withDeepValidation = false) {
|
|
3696
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean-badge") {
|
|
3765
|
+
export function isBooleanElement(value, withDeepValidation = false) {
|
|
3766
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean") {
|
|
3697
3767
|
return false;
|
|
3698
3768
|
}
|
|
3699
3769
|
if (!withDeepValidation) {
|
|
@@ -3701,6 +3771,7 @@ export function isBooleanBadgeElement(value, withDeepValidation = false) {
|
|
|
3701
3771
|
}
|
|
3702
3772
|
const element = value;
|
|
3703
3773
|
return ("value" in value && typeof element.value === "boolean") &&
|
|
3774
|
+
(element.representation === undefined || Object.values(BooleanRepresentation).includes(element.representation)) &&
|
|
3704
3775
|
(element.trueLabel === undefined || typeof element.trueLabel === "string") &&
|
|
3705
3776
|
(element.falseLabel === undefined || typeof element.falseLabel === "string") &&
|
|
3706
3777
|
(element.variant === undefined || Object.values(BadgeVariant).includes(element.variant)) &&
|
|
@@ -3796,8 +3867,7 @@ export function isMultiSlotElement(value, withDeepValidation = false) {
|
|
|
3796
3867
|
return true;
|
|
3797
3868
|
}
|
|
3798
3869
|
const element = value;
|
|
3799
|
-
return (
|
|
3800
|
-
("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
3870
|
+
return ("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
3801
3871
|
}
|
|
3802
3872
|
/**
|
|
3803
3873
|
* Type guard predicate narrowing a value to `FlowingElement`.
|
|
@@ -3814,7 +3884,8 @@ export function isFlowingElement(value, withDeepValidation = false) {
|
|
|
3814
3884
|
return true;
|
|
3815
3885
|
}
|
|
3816
3886
|
const element = value;
|
|
3817
|
-
return (
|
|
3887
|
+
return (element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
3888
|
+
("elements" in value && (Array.isArray(element.elements) && element.elements.every((item) => isUiElement(item, true))));
|
|
3818
3889
|
}
|
|
3819
3890
|
/**
|
|
3820
3891
|
* Type guard predicate narrowing a value to `LabelValueElement`.
|
|
@@ -3850,8 +3921,7 @@ export function isTableElement(value, withDeepValidation = false) {
|
|
|
3850
3921
|
return true;
|
|
3851
3922
|
}
|
|
3852
3923
|
const element = value;
|
|
3853
|
-
return (element.
|
|
3854
|
-
(element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
3924
|
+
return (element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
3855
3925
|
(element.withColumnSeparators === undefined || typeof element.withColumnSeparators === "boolean") &&
|
|
3856
3926
|
(element.withRowSeparators === undefined || typeof element.withRowSeparators === "boolean") &&
|
|
3857
3927
|
(element.columns === undefined || (Array.isArray(element.columns) && element.columns.every((item) => isTableColumn(item, true)))) &&
|