@picteus/extension-sdk 0.17.0 → 0.19.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/backEndIntents.d.ts +216 -0
- package/dist/generated/backEndIntents.js +12 -0
- package/dist/generated/frontEndIntents.d.ts +1112 -0
- package/dist/generated/frontEndIntents.js +97 -0
- package/dist/generated/intentValidator.d.ts +49 -0
- package/dist/generated/intentValidator.js +363 -0
- package/dist/generated/viewKit.d.ts +1961 -565
- package/dist/generated/viewKit.js +1263 -489
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- 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/dist/picteusExtension.d.ts +13 -4
- package/dist/picteusExtension.js +45 -24
- package/package.json +4 -6
- package/dist/featureViewGrammar.d.ts +0 -2814
- package/dist/featureViewGrammar.js +0 -2612
- package/dist/generated/featureViewGrammar.d.ts +0 -3913
- package/dist/generated/featureViewGrammar.js +0 -4099
- package/dist/intents.d.ts +0 -188
- package/dist/intents.js +0 -26
- package/dist/picteus-ws-client/models/ExtensionActivityKind.d.ts +0 -26
- package/dist/picteus-ws-client/models/ExtensionActivityKind.js +0 -44
- package/dist/picteus-ws-client/models/ExtensionStatus.d.ts +0 -25
- package/dist/picteus-ws-client/models/ExtensionStatus.js +0 -43
- package/dist/picteus-ws-client/models/ImageEmbeddings.d.ts +0 -32
- package/dist/picteus-ws-client/models/ImageEmbeddings.js +0 -43
- package/dist/picteus-ws-client/models/RepositoryStatus.d.ts +0 -27
- package/dist/picteus-ws-client/models/RepositoryStatus.js +0 -45
- package/dist/picteus-ws-client/models/Settings.d.ts +0 -32
- package/dist/picteus-ws-client/models/Settings.js +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
|
-
// Auto-generated by @picteus/specification-factory
|
|
2
|
+
// Auto-generated by @picteus/specification-factory. Do not edit directly.
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
/** Generic base class providing recursive JSON serialization for all model instances. */
|
|
5
5
|
export class ViewKitNode {
|
|
@@ -41,113 +41,162 @@ export class ViewKitNode {
|
|
|
41
41
|
/** Typographic stroke weight styling. */
|
|
42
42
|
export var TextWeight;
|
|
43
43
|
(function (TextWeight) {
|
|
44
|
-
|
|
44
|
+
/** Thin / light text weight */
|
|
45
45
|
TextWeight["thin"] = "thin";
|
|
46
|
-
|
|
46
|
+
/** Standard text weight */
|
|
47
47
|
TextWeight["normal"] = "normal";
|
|
48
|
-
|
|
48
|
+
/** Heavy / bold text weight */
|
|
49
49
|
TextWeight["heavy"] = "heavy";
|
|
50
50
|
})(TextWeight || (TextWeight = {}));
|
|
51
51
|
/** Visual text color intensity and contrast. */
|
|
52
52
|
export var TextIntensity;
|
|
53
53
|
(function (TextIntensity) {
|
|
54
|
-
|
|
54
|
+
/** Low visual contrast / subdued text color */
|
|
55
55
|
TextIntensity["low"] = "low";
|
|
56
|
-
|
|
56
|
+
/** Standard text color */
|
|
57
57
|
TextIntensity["medium"] = "medium";
|
|
58
|
-
|
|
58
|
+
/** High visual contrast / intense text color */
|
|
59
59
|
TextIntensity["high"] = "high";
|
|
60
60
|
})(TextIntensity || (TextIntensity = {}));
|
|
61
61
|
/** Geometric shape representation for visual containers and indicators. */
|
|
62
62
|
export var Shape;
|
|
63
63
|
(function (Shape) {
|
|
64
|
-
|
|
64
|
+
/** Circular container shape */
|
|
65
65
|
Shape["circle"] = "circle";
|
|
66
|
-
|
|
66
|
+
/** Square container shape */
|
|
67
67
|
Shape["square"] = "square";
|
|
68
68
|
})(Shape || (Shape = {}));
|
|
69
69
|
/** Relative sizing scale for visual elements and indicators. */
|
|
70
70
|
export var Size;
|
|
71
71
|
(function (Size) {
|
|
72
|
-
|
|
72
|
+
/** Compact small size */
|
|
73
73
|
Size["small"] = "small";
|
|
74
|
-
|
|
74
|
+
/** Standard medium size */
|
|
75
75
|
Size["medium"] = "medium";
|
|
76
|
-
|
|
76
|
+
/** Prominent large size */
|
|
77
77
|
Size["large"] = "large";
|
|
78
78
|
})(Size || (Size = {}));
|
|
79
|
-
/**
|
|
80
|
-
export var
|
|
81
|
-
(function (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
/** Visual presentation style for string values. */
|
|
80
|
+
export var StringRepresentation;
|
|
81
|
+
(function (StringRepresentation) {
|
|
82
|
+
/** Standard inline text rendering */
|
|
83
|
+
StringRepresentation["plain"] = "plain";
|
|
84
|
+
/** Visual chip / tag pill representation */
|
|
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) {
|
|
90
|
-
|
|
108
|
+
/** XML markup syntax */
|
|
91
109
|
CodeLanguage["xml"] = "xml";
|
|
92
|
-
|
|
110
|
+
/** JSON format syntax */
|
|
93
111
|
CodeLanguage["json"] = "json";
|
|
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) {
|
|
100
|
-
|
|
126
|
+
/** Neutral gray tone */
|
|
101
127
|
BadgeVariant["neutral"] = "neutral";
|
|
102
|
-
|
|
128
|
+
/** Success green tone */
|
|
103
129
|
BadgeVariant["success"] = "success";
|
|
104
|
-
|
|
130
|
+
/** Warning yellow/orange tone */
|
|
105
131
|
BadgeVariant["warning"] = "warning";
|
|
106
|
-
|
|
132
|
+
/** Danger red tone */
|
|
107
133
|
BadgeVariant["danger"] = "danger";
|
|
108
134
|
})(BadgeVariant || (BadgeVariant = {}));
|
|
109
135
|
/** Presentation format styles for timestamp elements. */
|
|
110
136
|
export var TimestampFormat;
|
|
111
137
|
(function (TimestampFormat) {
|
|
112
|
-
|
|
138
|
+
/** Complete date and time display */
|
|
113
139
|
TimestampFormat["datetime"] = "datetime";
|
|
114
|
-
|
|
140
|
+
/** Date-only display */
|
|
115
141
|
TimestampFormat["date"] = "date";
|
|
116
|
-
|
|
142
|
+
/** Time-only display */
|
|
117
143
|
TimestampFormat["time"] = "time";
|
|
118
|
-
|
|
144
|
+
/** Relative time expression (e.g. "5 minutes ago") */
|
|
119
145
|
TimestampFormat["relative"] = "relative";
|
|
120
146
|
})(TimestampFormat || (TimestampFormat = {}));
|
|
121
147
|
/** Visual style variants for interactive button actions. */
|
|
122
148
|
export var ButtonVariant;
|
|
123
149
|
(function (ButtonVariant) {
|
|
124
|
-
|
|
150
|
+
/** Primary emphasis button style for default/recommended actions */
|
|
125
151
|
ButtonVariant["primary"] = "primary";
|
|
126
|
-
|
|
152
|
+
/** Secondary standard button style */
|
|
127
153
|
ButtonVariant["secondary"] = "secondary";
|
|
128
|
-
|
|
154
|
+
/** Subtle low-contrast button style */
|
|
129
155
|
ButtonVariant["subtle"] = "subtle";
|
|
130
|
-
|
|
156
|
+
/** Destructive / dangerous action button style */
|
|
131
157
|
ButtonVariant["danger"] = "danger";
|
|
132
158
|
})(ButtonVariant || (ButtonVariant = {}));
|
|
133
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Text horizontal alignment options for table columns.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* Horizontal alignment applied within cells of a TableColumn. The alignment is a presentation choice and does not affect the stored cell values.
|
|
164
|
+
*/
|
|
134
165
|
export var TableColumnAlign;
|
|
135
166
|
(function (TableColumnAlign) {
|
|
136
|
-
|
|
167
|
+
/** Left-aligned text */
|
|
137
168
|
TableColumnAlign["left"] = "left";
|
|
138
|
-
|
|
169
|
+
/** Center-aligned text */
|
|
139
170
|
TableColumnAlign["center"] = "center";
|
|
140
|
-
|
|
171
|
+
/** Right-aligned text */
|
|
141
172
|
TableColumnAlign["right"] = "right";
|
|
142
173
|
})(TableColumnAlign || (TableColumnAlign = {}));
|
|
143
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Width mode for table columns.
|
|
176
|
+
*
|
|
177
|
+
* @remarks
|
|
178
|
+
* Controls how an optional TableColumn width is interpreted by the table renderer.
|
|
179
|
+
*/
|
|
180
|
+
export var TableColumnWidthMode;
|
|
181
|
+
(function (TableColumnWidthMode) {
|
|
182
|
+
/** Fixed width constraint */
|
|
183
|
+
TableColumnWidthMode["fixed"] = "fixed";
|
|
184
|
+
/** Maximum width upper bound constraint */
|
|
185
|
+
TableColumnWidthMode["maximum"] = "maximum";
|
|
186
|
+
})(TableColumnWidthMode || (TableColumnWidthMode = {}));
|
|
187
|
+
/**
|
|
188
|
+
* Visual styling variants for hairline dividers.
|
|
189
|
+
*
|
|
190
|
+
* @remarks
|
|
191
|
+
* Selects the visual stroke treatment used by DividerElement.
|
|
192
|
+
*/
|
|
144
193
|
export var DividerStyle;
|
|
145
194
|
(function (DividerStyle) {
|
|
146
|
-
|
|
195
|
+
/** Subtle thin hairline border */
|
|
147
196
|
DividerStyle["hairline"] = "hairline";
|
|
148
|
-
|
|
197
|
+
/** Solid standard divider line */
|
|
149
198
|
DividerStyle["solid"] = "solid";
|
|
150
|
-
|
|
199
|
+
/** Dashed separator line */
|
|
151
200
|
DividerStyle["dashed"] = "dashed";
|
|
152
201
|
})(DividerStyle || (DividerStyle = {}));
|
|
153
202
|
/** Abstract base class for all `UiElement` models. */
|
|
@@ -161,14 +210,22 @@ export class BaseUiAction extends ViewKitNode {
|
|
|
161
210
|
* Class implementation of the `TruncateOptions` interface.
|
|
162
211
|
*
|
|
163
212
|
* @remarks
|
|
164
|
-
*
|
|
213
|
+
* Controls how a renderer abbreviates long text. The character limit is a presentation threshold rather than a validation limit; showMore lets the user reveal the remaining text.
|
|
165
214
|
*/
|
|
166
215
|
export class TruncateOptionsClass extends ViewKitNode {
|
|
167
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Maximum number of characters to display before truncating
|
|
218
|
+
*
|
|
219
|
+
* @remarks
|
|
220
|
+
* Threshold after which the renderer can shorten the displayed text. This does not constrain the stored string or remove its undisplayed content.
|
|
221
|
+
*/
|
|
168
222
|
characterLimit;
|
|
169
223
|
/**
|
|
170
224
|
* Whether to render a "Show more" / "Show less" toggle affordance
|
|
171
225
|
*
|
|
226
|
+
* @remarks
|
|
227
|
+
* When true, permits an expand/collapse control for text beyond the truncation threshold. Defaults to true.
|
|
228
|
+
*
|
|
172
229
|
* @defaultValue true
|
|
173
230
|
*/
|
|
174
231
|
showMore;
|
|
@@ -176,6 +233,8 @@ export class TruncateOptionsClass extends ViewKitNode {
|
|
|
176
233
|
* Constructs a new `TruncateOptionsClass` instance.
|
|
177
234
|
*
|
|
178
235
|
* @param characterLimit - Maximum number of characters to display before truncating
|
|
236
|
+
|
|
237
|
+
Threshold after which the renderer can shorten the displayed text. This does not constrain the stored string or remove its undisplayed content.
|
|
179
238
|
* @param options - Optional component settings. (showMore (defaults to `true`)).
|
|
180
239
|
*/
|
|
181
240
|
constructor(characterLimit, options) {
|
|
@@ -188,10 +247,15 @@ export class TruncateOptionsClass extends ViewKitNode {
|
|
|
188
247
|
* Class implementation of the `BaseModifiers` interface.
|
|
189
248
|
*
|
|
190
249
|
* @remarks
|
|
191
|
-
*
|
|
250
|
+
* Common optional presentation traits shared by primitive values and content renderers. Modifiers affect how content is displayed or copied; they do not transform the source value.
|
|
192
251
|
*/
|
|
193
252
|
export class BaseModifiersClass extends ViewKitNode {
|
|
194
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Adds an interactive copy button/action next to the rendered value
|
|
255
|
+
*
|
|
256
|
+
* @remarks
|
|
257
|
+
* When true, exposes a copy affordance for the associated value where supported by the renderer.
|
|
258
|
+
*/
|
|
195
259
|
copyable;
|
|
196
260
|
/**
|
|
197
261
|
* Constructs a new `BaseModifiersClass` instance.
|
|
@@ -207,30 +271,49 @@ export class BaseModifiersClass extends ViewKitNode {
|
|
|
207
271
|
* Class implementation of the `PrimitiveModifiers` interface.
|
|
208
272
|
*
|
|
209
273
|
* @remarks
|
|
210
|
-
*
|
|
274
|
+
* Extends BaseModifiers with text styling controls. Defaults provide normal weight, medium intensity, and proportional text unless a feature explicitly overrides them.
|
|
211
275
|
*/
|
|
212
276
|
export class PrimitiveModifiersClass extends ViewKitNode {
|
|
213
|
-
/**
|
|
277
|
+
/**
|
|
278
|
+
* Configures character truncation threshold with show-more affordance
|
|
279
|
+
*
|
|
280
|
+
* @remarks
|
|
281
|
+
* Optional text abbreviation behavior. The source text remains unchanged, and the renderer may offer expansion according to showMore.
|
|
282
|
+
*/
|
|
214
283
|
truncate;
|
|
215
284
|
/**
|
|
216
285
|
* Typographic text weight
|
|
217
286
|
*
|
|
287
|
+
* @remarks
|
|
288
|
+
* Relative font weight for textual rendering; defaults to normal.
|
|
289
|
+
*
|
|
218
290
|
* @defaultValue TextWeight.normal
|
|
219
291
|
*/
|
|
220
292
|
weight;
|
|
221
293
|
/**
|
|
222
294
|
* Visual text color intensity
|
|
223
295
|
*
|
|
296
|
+
* @remarks
|
|
297
|
+
* Relative contrast treatment for the text; defaults to medium.
|
|
298
|
+
*
|
|
224
299
|
* @defaultValue TextIntensity.medium
|
|
225
300
|
*/
|
|
226
301
|
intensity;
|
|
227
302
|
/**
|
|
228
303
|
* Whether to use monospace font rendering (for hashes, IDs, codes)
|
|
229
304
|
*
|
|
305
|
+
* @remarks
|
|
306
|
+
* When true, requests a fixed-width font suitable for identifiers and code-like values. Defaults to false.
|
|
307
|
+
*
|
|
230
308
|
* @defaultValue false
|
|
231
309
|
*/
|
|
232
310
|
monospace;
|
|
233
|
-
/**
|
|
311
|
+
/**
|
|
312
|
+
* Adds an interactive copy button/action next to the rendered value
|
|
313
|
+
*
|
|
314
|
+
* @remarks
|
|
315
|
+
* When true, exposes a copy affordance for the associated value where supported by the renderer.
|
|
316
|
+
*/
|
|
234
317
|
copyable;
|
|
235
318
|
/**
|
|
236
319
|
* Constructs a new `PrimitiveModifiersClass` instance.
|
|
@@ -247,68 +330,102 @@ export class PrimitiveModifiersClass extends ViewKitNode {
|
|
|
247
330
|
}
|
|
248
331
|
}
|
|
249
332
|
/**
|
|
250
|
-
* Class implementation of the `
|
|
333
|
+
* Class implementation of the `StringElement` interface.
|
|
251
334
|
*
|
|
252
335
|
* @remarks
|
|
253
|
-
*
|
|
254
|
-
* Supports plain text or compact chip pill presentation.
|
|
336
|
+
* Use this primitive for one textual value when a structured label/value row is unnecessary. Choose multiline for content whose line breaks should remain visible; modifiers apply presentation traits without changing the underlying value.
|
|
255
337
|
*/
|
|
256
|
-
export class
|
|
338
|
+
export class StringElementClass extends BaseUiElement {
|
|
257
339
|
/**
|
|
258
|
-
* Discriminator identifier for `
|
|
340
|
+
* Discriminator identifier for `StringElement`.
|
|
259
341
|
*
|
|
260
|
-
* @defaultValue "string
|
|
342
|
+
* @defaultValue "string"
|
|
343
|
+
*/
|
|
344
|
+
type = "string";
|
|
345
|
+
/**
|
|
346
|
+
* Text value
|
|
347
|
+
*
|
|
348
|
+
* @remarks
|
|
349
|
+
* Text to render. Supply plain text; this field is not a Markdown or HTML document.
|
|
261
350
|
*/
|
|
262
|
-
type = "string-short";
|
|
263
|
-
/** Text value */
|
|
264
351
|
value;
|
|
265
352
|
/**
|
|
266
353
|
* Display representation mode
|
|
267
354
|
*
|
|
268
|
-
* @
|
|
355
|
+
* @remarks
|
|
356
|
+
* Selects inline, chip, or multiline rendering. The default is plain, so callers can omit this for ordinary text.
|
|
357
|
+
*
|
|
358
|
+
* @defaultValue StringRepresentation.plain
|
|
269
359
|
*/
|
|
270
360
|
representation;
|
|
271
361
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
272
362
|
modifiers;
|
|
273
363
|
/**
|
|
274
|
-
* Constructs a new `
|
|
364
|
+
* Constructs a new `StringElementClass` instance.
|
|
275
365
|
*
|
|
276
366
|
* @param value - Text value
|
|
367
|
+
|
|
368
|
+
Text to render. Supply plain text; this field is not a Markdown or HTML document.
|
|
277
369
|
* @param options - Optional component settings. (representation (defaults to `plain`), modifiers).
|
|
278
370
|
*/
|
|
279
371
|
constructor(value, options) {
|
|
280
372
|
super();
|
|
281
373
|
this.value = value;
|
|
282
|
-
this.representation = options?.representation ??
|
|
374
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
283
375
|
this.modifiers = options?.modifiers;
|
|
284
376
|
}
|
|
285
377
|
}
|
|
286
378
|
/**
|
|
287
|
-
* Class implementation of the `
|
|
379
|
+
* Class implementation of the `StringsElement` interface.
|
|
288
380
|
*
|
|
289
381
|
* @remarks
|
|
290
|
-
*
|
|
382
|
+
* Use this primitive when several related strings should be rendered as one compact sequence. The client preserves the array order and inserts the selected separator between values.
|
|
291
383
|
*/
|
|
292
|
-
export class
|
|
384
|
+
export class StringsElementClass extends BaseUiElement {
|
|
293
385
|
/**
|
|
294
|
-
* Discriminator identifier for `
|
|
386
|
+
* Discriminator identifier for `StringsElement`.
|
|
295
387
|
*
|
|
296
|
-
* @defaultValue "
|
|
388
|
+
* @defaultValue "strings"
|
|
297
389
|
*/
|
|
298
|
-
type = "
|
|
299
|
-
/**
|
|
300
|
-
|
|
390
|
+
type = "strings";
|
|
391
|
+
/**
|
|
392
|
+
* Array of string values
|
|
393
|
+
*
|
|
394
|
+
* @remarks
|
|
395
|
+
* Values to render in order. Each array entry remains a distinct item for chip presentation and is not parsed as a delimited string.
|
|
396
|
+
*/
|
|
397
|
+
values;
|
|
398
|
+
/**
|
|
399
|
+
* Display representation mode (plain text or visual chips)
|
|
400
|
+
*
|
|
401
|
+
* @remarks
|
|
402
|
+
* Selects whether values appear as ordinary inline text or as separate visual chips. The default uses the plain representation.
|
|
403
|
+
*
|
|
404
|
+
* @defaultValue StringRepresentation.plain
|
|
405
|
+
*/
|
|
406
|
+
representation;
|
|
407
|
+
/**
|
|
408
|
+
* Optional visual separator rendered between sequential values
|
|
409
|
+
*
|
|
410
|
+
* @remarks
|
|
411
|
+
* Separator inserted between adjacent values in plain representation. It does not become part of any value.
|
|
412
|
+
*/
|
|
413
|
+
separator;
|
|
301
414
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
302
415
|
modifiers;
|
|
303
416
|
/**
|
|
304
|
-
* Constructs a new `
|
|
417
|
+
* Constructs a new `StringsElementClass` instance.
|
|
305
418
|
*
|
|
306
|
-
* @param
|
|
307
|
-
|
|
419
|
+
* @param values - Array of string values
|
|
420
|
+
|
|
421
|
+
Values to render in order. Each array entry remains a distinct item for chip presentation and is not parsed as a delimited string.
|
|
422
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), separator, modifiers).
|
|
308
423
|
*/
|
|
309
|
-
constructor(
|
|
424
|
+
constructor(values, options) {
|
|
310
425
|
super();
|
|
311
|
-
this.
|
|
426
|
+
this.values = values ? [...values] : [];
|
|
427
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
428
|
+
this.separator = options?.separator;
|
|
312
429
|
this.modifiers = options?.modifiers;
|
|
313
430
|
}
|
|
314
431
|
}
|
|
@@ -316,7 +433,7 @@ export class StringLongElementClass extends BaseUiElement {
|
|
|
316
433
|
* Class implementation of the `StringCodeElement` interface.
|
|
317
434
|
*
|
|
318
435
|
* @remarks
|
|
319
|
-
*
|
|
436
|
+
* Use for source-like or preformatted textual content that should be rendered in a code-oriented style. The language is a presentation hint; the content is not parsed or validated as code by this contract.
|
|
320
437
|
*/
|
|
321
438
|
export class StringCodeElementClass extends BaseUiElement {
|
|
322
439
|
/**
|
|
@@ -325,9 +442,19 @@ export class StringCodeElementClass extends BaseUiElement {
|
|
|
325
442
|
* @defaultValue "string-code"
|
|
326
443
|
*/
|
|
327
444
|
type = "string-code";
|
|
328
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* Text value
|
|
447
|
+
*
|
|
448
|
+
* @remarks
|
|
449
|
+
* Code or text snippet to display. Include any desired line breaks in this string.
|
|
450
|
+
*/
|
|
329
451
|
value;
|
|
330
|
-
/**
|
|
452
|
+
/**
|
|
453
|
+
* Optional syntax highlighting language identifier
|
|
454
|
+
*
|
|
455
|
+
* @remarks
|
|
456
|
+
* Optional syntax hint for the renderer. Supported values describe highlighting modes and do not validate the snippet's syntax.
|
|
457
|
+
*/
|
|
331
458
|
language;
|
|
332
459
|
/** Optional visual modifiers (copyable) */
|
|
333
460
|
modifiers;
|
|
@@ -335,6 +462,8 @@ export class StringCodeElementClass extends BaseUiElement {
|
|
|
335
462
|
* Constructs a new `StringCodeElementClass` instance.
|
|
336
463
|
*
|
|
337
464
|
* @param value - Text value
|
|
465
|
+
|
|
466
|
+
Code or text snippet to display. Include any desired line breaks in this string.
|
|
338
467
|
* @param options - Optional component settings. (language, modifiers).
|
|
339
468
|
*/
|
|
340
469
|
constructor(value, options) {
|
|
@@ -348,7 +477,7 @@ export class StringCodeElementClass extends BaseUiElement {
|
|
|
348
477
|
* Class implementation of the `XmlElement` interface.
|
|
349
478
|
*
|
|
350
479
|
* @remarks
|
|
351
|
-
* XML
|
|
480
|
+
* Specialized code-oriented element for XML content. It uses the custom XML renderer rather than requiring consumers to construct a generic code block.
|
|
352
481
|
*/
|
|
353
482
|
export class XmlElementClass extends BaseUiElement {
|
|
354
483
|
/**
|
|
@@ -357,7 +486,12 @@ export class XmlElementClass extends BaseUiElement {
|
|
|
357
486
|
* @defaultValue "xml"
|
|
358
487
|
*/
|
|
359
488
|
type = "xml";
|
|
360
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* XML content value
|
|
491
|
+
*
|
|
492
|
+
* @remarks
|
|
493
|
+
* XML markup to render. The contract carries the source text; it does not guarantee that the document is well-formed.
|
|
494
|
+
*/
|
|
361
495
|
value;
|
|
362
496
|
/** Optional visual modifiers (copyable) */
|
|
363
497
|
modifiers;
|
|
@@ -365,6 +499,8 @@ export class XmlElementClass extends BaseUiElement {
|
|
|
365
499
|
* Constructs a new `XmlElementClass` instance.
|
|
366
500
|
*
|
|
367
501
|
* @param value - XML content value
|
|
502
|
+
|
|
503
|
+
XML markup to render. The contract carries the source text; it does not guarantee that the document is well-formed.
|
|
368
504
|
* @param options - Optional component settings. (modifiers).
|
|
369
505
|
*/
|
|
370
506
|
constructor(value, options) {
|
|
@@ -377,7 +513,7 @@ export class XmlElementClass extends BaseUiElement {
|
|
|
377
513
|
* Class implementation of the `JsonElement` interface.
|
|
378
514
|
*
|
|
379
515
|
* @remarks
|
|
380
|
-
* JSON
|
|
516
|
+
* Specialized representation for JSON text. Supply serialized JSON when consumers should display a JSON document; this field is a string and is not structurally validated here.
|
|
381
517
|
*/
|
|
382
518
|
export class JsonElementClass extends BaseUiElement {
|
|
383
519
|
/**
|
|
@@ -386,7 +522,12 @@ export class JsonElementClass extends BaseUiElement {
|
|
|
386
522
|
* @defaultValue "json"
|
|
387
523
|
*/
|
|
388
524
|
type = "json";
|
|
389
|
-
/**
|
|
525
|
+
/**
|
|
526
|
+
* JSON content value
|
|
527
|
+
*
|
|
528
|
+
* @remarks
|
|
529
|
+
* Serialized JSON text to render. No parsing or schema validation is implied by this element.
|
|
530
|
+
*/
|
|
390
531
|
value;
|
|
391
532
|
/** Optional visual modifiers (copyable) */
|
|
392
533
|
modifiers;
|
|
@@ -394,6 +535,8 @@ export class JsonElementClass extends BaseUiElement {
|
|
|
394
535
|
* Constructs a new `JsonElementClass` instance.
|
|
395
536
|
*
|
|
396
537
|
* @param value - JSON content value
|
|
538
|
+
|
|
539
|
+
Serialized JSON text to render. No parsing or schema validation is implied by this element.
|
|
397
540
|
* @param options - Optional component settings. (modifiers).
|
|
398
541
|
*/
|
|
399
542
|
constructor(value, options) {
|
|
@@ -406,7 +549,7 @@ export class JsonElementClass extends BaseUiElement {
|
|
|
406
549
|
* Class implementation of the `StringUrlElement` interface.
|
|
407
550
|
*
|
|
408
551
|
* @remarks
|
|
409
|
-
*
|
|
552
|
+
* Use this element when displayed text should also behave as a link. Unlike StringElement, the value is a navigation destination and may be paired with a separate human-readable label.
|
|
410
553
|
*/
|
|
411
554
|
export class StringUrlElementClass extends BaseUiElement {
|
|
412
555
|
/**
|
|
@@ -415,7 +558,12 @@ export class StringUrlElementClass extends BaseUiElement {
|
|
|
415
558
|
* @defaultValue "string-url"
|
|
416
559
|
*/
|
|
417
560
|
type = "string-url";
|
|
418
|
-
/**
|
|
561
|
+
/**
|
|
562
|
+
* Target URL or navigation destination
|
|
563
|
+
*
|
|
564
|
+
* @remarks
|
|
565
|
+
* Destination associated with the link. Supply a URL or client-recognized navigation target supported by the renderer.
|
|
566
|
+
*/
|
|
419
567
|
value;
|
|
420
568
|
/** Optional custom anchor text label */
|
|
421
569
|
label;
|
|
@@ -425,6 +573,8 @@ export class StringUrlElementClass extends BaseUiElement {
|
|
|
425
573
|
* Constructs a new `StringUrlElementClass` instance.
|
|
426
574
|
*
|
|
427
575
|
* @param value - Target URL or navigation destination
|
|
576
|
+
|
|
577
|
+
Destination associated with the link. Supply a URL or client-recognized navigation target supported by the renderer.
|
|
428
578
|
* @param options - Optional component settings. (label, modifiers).
|
|
429
579
|
*/
|
|
430
580
|
constructor(value, options) {
|
|
@@ -438,7 +588,7 @@ export class StringUrlElementClass extends BaseUiElement {
|
|
|
438
588
|
* Class implementation of the `IdentifierElement` interface.
|
|
439
589
|
*
|
|
440
590
|
* @remarks
|
|
441
|
-
*
|
|
591
|
+
* Use for identifiers, hashes, and other machine-oriented strings that benefit from monospace styling. The value remains text and is not resolved as a Picteus entity.
|
|
442
592
|
*/
|
|
443
593
|
export class IdentifierElementClass extends BaseUiElement {
|
|
444
594
|
/**
|
|
@@ -447,7 +597,12 @@ export class IdentifierElementClass extends BaseUiElement {
|
|
|
447
597
|
* @defaultValue "identifier"
|
|
448
598
|
*/
|
|
449
599
|
type = "identifier";
|
|
450
|
-
/**
|
|
600
|
+
/**
|
|
601
|
+
* Identifier string value
|
|
602
|
+
*
|
|
603
|
+
* @remarks
|
|
604
|
+
* Identifier text to display, such as an opaque ID or hash. Avoid embedding presentation markup in the value.
|
|
605
|
+
*/
|
|
451
606
|
value;
|
|
452
607
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
453
608
|
modifiers;
|
|
@@ -455,6 +610,8 @@ export class IdentifierElementClass extends BaseUiElement {
|
|
|
455
610
|
* Constructs a new `IdentifierElementClass` instance.
|
|
456
611
|
*
|
|
457
612
|
* @param value - Identifier string value
|
|
613
|
+
|
|
614
|
+
Identifier text to display, such as an opaque ID or hash. Avoid embedding presentation markup in the value.
|
|
458
615
|
* @param options - Optional component settings. (modifiers).
|
|
459
616
|
*/
|
|
460
617
|
constructor(value, options) {
|
|
@@ -467,7 +624,7 @@ export class IdentifierElementClass extends BaseUiElement {
|
|
|
467
624
|
* Class implementation of the `RatioElement` interface.
|
|
468
625
|
*
|
|
469
626
|
* @remarks
|
|
470
|
-
*
|
|
627
|
+
* Displays a numeric aspect ratio as a ratio expression. Provide a positive value meaningful to the surrounding content; this type does not encode the source image dimensions.
|
|
471
628
|
*/
|
|
472
629
|
export class RatioElementClass extends BaseUiElement {
|
|
473
630
|
/**
|
|
@@ -476,7 +633,12 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
476
633
|
* @defaultValue "ratio"
|
|
477
634
|
*/
|
|
478
635
|
type = "ratio";
|
|
479
|
-
/**
|
|
636
|
+
/**
|
|
637
|
+
* Aspect ratio numerical expression
|
|
638
|
+
*
|
|
639
|
+
* @remarks
|
|
640
|
+
* Numeric ratio value used by the renderer to produce an aspect-ratio display.
|
|
641
|
+
*/
|
|
480
642
|
value;
|
|
481
643
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
482
644
|
modifiers;
|
|
@@ -484,6 +646,8 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
484
646
|
* Constructs a new `RatioElementClass` instance.
|
|
485
647
|
*
|
|
486
648
|
* @param value - Aspect ratio numerical expression
|
|
649
|
+
|
|
650
|
+
Numeric ratio value used by the renderer to produce an aspect-ratio display.
|
|
487
651
|
* @param options - Optional component settings. (modifiers).
|
|
488
652
|
*/
|
|
489
653
|
constructor(value, options) {
|
|
@@ -492,11 +656,58 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
492
656
|
this.modifiers = options?.modifiers;
|
|
493
657
|
}
|
|
494
658
|
}
|
|
659
|
+
/**
|
|
660
|
+
* Class implementation of the `DimensionsElement` interface.
|
|
661
|
+
*
|
|
662
|
+
* @remarks
|
|
663
|
+
* Displays a width/height pair as image dimensions. Both values are positive pixel counts; together they describe dimensions, not an aspect ratio or a resize request.
|
|
664
|
+
*/
|
|
665
|
+
export class DimensionsElementClass extends BaseUiElement {
|
|
666
|
+
/**
|
|
667
|
+
* Discriminator identifier for `DimensionsElement`.
|
|
668
|
+
*
|
|
669
|
+
* @defaultValue "dimensions"
|
|
670
|
+
*/
|
|
671
|
+
type = "dimensions";
|
|
672
|
+
/**
|
|
673
|
+
* Width in pixels
|
|
674
|
+
*
|
|
675
|
+
* @remarks
|
|
676
|
+
* Horizontal pixel count. Values below one are rejected by the schema constraint.
|
|
677
|
+
*/
|
|
678
|
+
width;
|
|
679
|
+
/**
|
|
680
|
+
* Height in pixels
|
|
681
|
+
*
|
|
682
|
+
* @remarks
|
|
683
|
+
* Vertical pixel count. Values below one are rejected by the schema constraint.
|
|
684
|
+
*/
|
|
685
|
+
height;
|
|
686
|
+
/** Optional visual modifiers (copyable) */
|
|
687
|
+
modifiers;
|
|
688
|
+
/**
|
|
689
|
+
* Constructs a new `DimensionsElementClass` instance.
|
|
690
|
+
*
|
|
691
|
+
* @param width - Width in pixels
|
|
692
|
+
|
|
693
|
+
Horizontal pixel count. Values below one are rejected by the schema constraint.
|
|
694
|
+
* @param height - Height in pixels
|
|
695
|
+
|
|
696
|
+
Vertical pixel count. Values below one are rejected by the schema constraint.
|
|
697
|
+
* @param options - Optional component settings. (modifiers).
|
|
698
|
+
*/
|
|
699
|
+
constructor(width, height, options) {
|
|
700
|
+
super();
|
|
701
|
+
this.width = width;
|
|
702
|
+
this.height = height;
|
|
703
|
+
this.modifiers = options?.modifiers;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
495
706
|
/**
|
|
496
707
|
* Class implementation of the `ColourElement` interface.
|
|
497
708
|
*
|
|
498
709
|
* @remarks
|
|
499
|
-
*
|
|
710
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
500
711
|
*/
|
|
501
712
|
export class ColourElementClass extends BaseUiElement {
|
|
502
713
|
/**
|
|
@@ -505,25 +716,44 @@ export class ColourElementClass extends BaseUiElement {
|
|
|
505
716
|
* @defaultValue "color"
|
|
506
717
|
*/
|
|
507
718
|
type = "color";
|
|
508
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* Hexadecimal color code
|
|
721
|
+
*
|
|
722
|
+
* @remarks
|
|
723
|
+
* Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
724
|
+
*/
|
|
509
725
|
value;
|
|
510
|
-
/**
|
|
726
|
+
/**
|
|
727
|
+
* Optional descriptive color name label
|
|
728
|
+
*
|
|
729
|
+
* @remarks
|
|
730
|
+
* Human-readable color name available to the renderer when text is shown.
|
|
731
|
+
*/
|
|
511
732
|
label;
|
|
512
733
|
/**
|
|
513
734
|
* Whether to display the textual color code or label next to the swatch
|
|
514
735
|
*
|
|
736
|
+
* @remarks
|
|
737
|
+
* When true, allows the renderer to show the color's text label alongside the swatch. The default is true.
|
|
738
|
+
*
|
|
515
739
|
* @defaultValue true
|
|
516
740
|
*/
|
|
517
741
|
showText;
|
|
518
742
|
/**
|
|
519
743
|
* Visual shape of the color indicator
|
|
520
744
|
*
|
|
745
|
+
* @remarks
|
|
746
|
+
* Geometry used for the swatch; defaults to a circle.
|
|
747
|
+
*
|
|
521
748
|
* @defaultValue Shape.circle
|
|
522
749
|
*/
|
|
523
750
|
shape;
|
|
524
751
|
/**
|
|
525
752
|
* Visual size of the color indicator
|
|
526
753
|
*
|
|
754
|
+
* @remarks
|
|
755
|
+
* Relative size class for the swatch; defaults to medium.
|
|
756
|
+
*
|
|
527
757
|
* @defaultValue Size.medium
|
|
528
758
|
*/
|
|
529
759
|
size;
|
|
@@ -533,6 +763,8 @@ export class ColourElementClass extends BaseUiElement {
|
|
|
533
763
|
* Constructs a new `ColourElementClass` instance.
|
|
534
764
|
*
|
|
535
765
|
* @param value - Hexadecimal color code
|
|
766
|
+
|
|
767
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
536
768
|
* @param options - Optional component settings. (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
537
769
|
*/
|
|
538
770
|
constructor(value, options) {
|
|
@@ -549,7 +781,7 @@ export class ColourElementClass extends BaseUiElement {
|
|
|
549
781
|
* Class implementation of the `NumberUnboundedElement` interface.
|
|
550
782
|
*
|
|
551
783
|
* @remarks
|
|
552
|
-
*
|
|
784
|
+
* Displays a numeric value without a progress scale or rating interpretation. Use unit to communicate the measurement context; no range is imposed by this model.
|
|
553
785
|
*/
|
|
554
786
|
export class NumberUnboundedElementClass extends BaseUiElement {
|
|
555
787
|
/**
|
|
@@ -558,9 +790,19 @@ export class NumberUnboundedElementClass extends BaseUiElement {
|
|
|
558
790
|
* @defaultValue "number-unbounded"
|
|
559
791
|
*/
|
|
560
792
|
type = "number-unbounded";
|
|
561
|
-
/**
|
|
793
|
+
/**
|
|
794
|
+
* Numeric value
|
|
795
|
+
*
|
|
796
|
+
* @remarks
|
|
797
|
+
* Number to display. Its meaning and any valid range are defined by the producing feature.
|
|
798
|
+
*/
|
|
562
799
|
value;
|
|
563
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* Optional unit suffix (e.g. "px", "ms", "MB")
|
|
802
|
+
*
|
|
803
|
+
* @remarks
|
|
804
|
+
* Short unit label appended or otherwise associated with the displayed value. Include only the unit text, not a second copy of the number.
|
|
805
|
+
*/
|
|
564
806
|
unit;
|
|
565
807
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
566
808
|
modifiers;
|
|
@@ -568,6 +810,8 @@ export class NumberUnboundedElementClass extends BaseUiElement {
|
|
|
568
810
|
* Constructs a new `NumberUnboundedElementClass` instance.
|
|
569
811
|
*
|
|
570
812
|
* @param value - Numeric value
|
|
813
|
+
|
|
814
|
+
Number to display. Its meaning and any valid range are defined by the producing feature.
|
|
571
815
|
* @param options - Optional component settings. (unit, modifiers).
|
|
572
816
|
*/
|
|
573
817
|
constructor(value, options) {
|
|
@@ -581,7 +825,7 @@ export class NumberUnboundedElementClass extends BaseUiElement {
|
|
|
581
825
|
* Class implementation of the `NumberBoundedStarsElement` interface.
|
|
582
826
|
*
|
|
583
827
|
* @remarks
|
|
584
|
-
*
|
|
828
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
585
829
|
*/
|
|
586
830
|
export class NumberBoundedStarsElementClass extends BaseUiElement {
|
|
587
831
|
/**
|
|
@@ -590,9 +834,19 @@ export class NumberBoundedStarsElementClass extends BaseUiElement {
|
|
|
590
834
|
* @defaultValue "number-stars"
|
|
591
835
|
*/
|
|
592
836
|
type = "number-stars";
|
|
593
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* Numeric rating score
|
|
839
|
+
*
|
|
840
|
+
* @remarks
|
|
841
|
+
* Score represented by the filled portion of the star display.
|
|
842
|
+
*/
|
|
594
843
|
value;
|
|
595
|
-
/**
|
|
844
|
+
/**
|
|
845
|
+
* Maximum rating scale (defaults to 5)
|
|
846
|
+
*
|
|
847
|
+
* @remarks
|
|
848
|
+
* Upper end of the rating scale. When omitted, the scale is five; value should use the same scale.
|
|
849
|
+
*/
|
|
596
850
|
maximum;
|
|
597
851
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
598
852
|
modifiers;
|
|
@@ -600,6 +854,8 @@ export class NumberBoundedStarsElementClass extends BaseUiElement {
|
|
|
600
854
|
* Constructs a new `NumberBoundedStarsElementClass` instance.
|
|
601
855
|
*
|
|
602
856
|
* @param value - Numeric rating score
|
|
857
|
+
|
|
858
|
+
Score represented by the filled portion of the star display.
|
|
603
859
|
* @param options - Optional component settings. (maximum, modifiers).
|
|
604
860
|
*/
|
|
605
861
|
constructor(value, options) {
|
|
@@ -613,7 +869,7 @@ export class NumberBoundedStarsElementClass extends BaseUiElement {
|
|
|
613
869
|
* Class implementation of the `NumberBoundedMeterElement` interface.
|
|
614
870
|
*
|
|
615
871
|
* @remarks
|
|
616
|
-
*
|
|
872
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
617
873
|
*/
|
|
618
874
|
export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
619
875
|
/**
|
|
@@ -622,15 +878,40 @@ export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
|
622
878
|
* @defaultValue "number-meter"
|
|
623
879
|
*/
|
|
624
880
|
type = "number-meter";
|
|
625
|
-
/**
|
|
881
|
+
/**
|
|
882
|
+
* Numeric value
|
|
883
|
+
*
|
|
884
|
+
* @remarks
|
|
885
|
+
* Current measurement or score represented by the meter.
|
|
886
|
+
*/
|
|
626
887
|
value;
|
|
627
|
-
/**
|
|
888
|
+
/**
|
|
889
|
+
* Minimum scale bound (defaults to 0)
|
|
890
|
+
*
|
|
891
|
+
* @remarks
|
|
892
|
+
* Lower end of the meter range. Defaults to zero when omitted.
|
|
893
|
+
*/
|
|
628
894
|
minimum;
|
|
629
|
-
/**
|
|
895
|
+
/**
|
|
896
|
+
* Maximum scale bound (e.g. 100)
|
|
897
|
+
*
|
|
898
|
+
* @remarks
|
|
899
|
+
* Upper end of the meter range. Choose a bound consistent with value and minimum.
|
|
900
|
+
*/
|
|
630
901
|
maximum;
|
|
631
|
-
/**
|
|
902
|
+
/**
|
|
903
|
+
* Optional custom text label override (e.g. "68 / 100")
|
|
904
|
+
*
|
|
905
|
+
* @remarks
|
|
906
|
+
* Optional readout text to use instead of a renderer-generated value and range label.
|
|
907
|
+
*/
|
|
632
908
|
label;
|
|
633
|
-
/**
|
|
909
|
+
/**
|
|
910
|
+
* Optional unit suffix (e.g. "%")
|
|
911
|
+
*
|
|
912
|
+
* @remarks
|
|
913
|
+
* Unit associated with the value, such as a percent sign. This affects display only and does not convert the numeric value.
|
|
914
|
+
*/
|
|
634
915
|
unit;
|
|
635
916
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
636
917
|
modifiers;
|
|
@@ -638,6 +919,8 @@ export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
|
638
919
|
* Constructs a new `NumberBoundedMeterElementClass` instance.
|
|
639
920
|
*
|
|
640
921
|
* @param value - Numeric value
|
|
922
|
+
|
|
923
|
+
Current measurement or score represented by the meter.
|
|
641
924
|
* @param options - Optional component settings. (minimum, maximum, label, unit, modifiers).
|
|
642
925
|
*/
|
|
643
926
|
constructor(value, options) {
|
|
@@ -651,63 +934,57 @@ export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
|
651
934
|
}
|
|
652
935
|
}
|
|
653
936
|
/**
|
|
654
|
-
* Class implementation of the `
|
|
937
|
+
* Class implementation of the `BooleanElement` interface.
|
|
655
938
|
*
|
|
656
939
|
* @remarks
|
|
657
|
-
*
|
|
940
|
+
* Displays a boolean state using text or a badge. The representation determines whether true/false labels or a colored badge are used; configured labels and variant are presentation choices only.
|
|
658
941
|
*/
|
|
659
|
-
export class
|
|
942
|
+
export class BooleanElementClass extends BaseUiElement {
|
|
660
943
|
/**
|
|
661
|
-
* Discriminator identifier for `
|
|
944
|
+
* Discriminator identifier for `BooleanElement`.
|
|
662
945
|
*
|
|
663
|
-
* @defaultValue "boolean
|
|
946
|
+
* @defaultValue "boolean"
|
|
664
947
|
*/
|
|
665
|
-
type = "boolean
|
|
666
|
-
/** Boolean state value */
|
|
667
|
-
value;
|
|
668
|
-
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
669
|
-
modifiers;
|
|
948
|
+
type = "boolean";
|
|
670
949
|
/**
|
|
671
|
-
*
|
|
950
|
+
* Boolean state value
|
|
672
951
|
*
|
|
673
|
-
* @
|
|
674
|
-
*
|
|
952
|
+
* @remarks
|
|
953
|
+
* State to display. This remains a boolean value in the data model even when the renderer substitutes custom labels.
|
|
675
954
|
*/
|
|
676
|
-
|
|
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 {
|
|
955
|
+
value;
|
|
689
956
|
/**
|
|
690
|
-
*
|
|
957
|
+
* Display representation mode
|
|
691
958
|
*
|
|
692
|
-
* @
|
|
959
|
+
* @remarks
|
|
960
|
+
* Selects ordinary text or a badge pill. Badge color applies only to badge presentation.
|
|
961
|
+
*
|
|
962
|
+
* @defaultValue BooleanRepresentation.plain
|
|
693
963
|
*/
|
|
694
|
-
|
|
695
|
-
/** Boolean state value */
|
|
696
|
-
value;
|
|
964
|
+
representation;
|
|
697
965
|
/**
|
|
698
966
|
* Custom display label when true (defaults to "true")
|
|
699
967
|
*
|
|
968
|
+
* @remarks
|
|
969
|
+
* Text used for the true state in plain representation. Defaults to the literal text true.
|
|
970
|
+
*
|
|
700
971
|
* @defaultValue "true"
|
|
701
972
|
*/
|
|
702
973
|
trueLabel;
|
|
703
974
|
/**
|
|
704
975
|
* Custom display label when false (defaults to "false")
|
|
705
976
|
*
|
|
977
|
+
* @remarks
|
|
978
|
+
* Text used for the false state in plain representation. Defaults to the literal text false.
|
|
979
|
+
*
|
|
706
980
|
* @defaultValue "false"
|
|
707
981
|
*/
|
|
708
982
|
falseLabel;
|
|
709
983
|
/**
|
|
710
|
-
* Badge color tone
|
|
984
|
+
* Badge color tone when rendered as badge
|
|
985
|
+
*
|
|
986
|
+
* @remarks
|
|
987
|
+
* Semantic color treatment for badge presentation; it has no effect in plain representation.
|
|
711
988
|
*
|
|
712
989
|
* @defaultValue BadgeVariant.neutral
|
|
713
990
|
*/
|
|
@@ -715,14 +992,17 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
715
992
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
716
993
|
modifiers;
|
|
717
994
|
/**
|
|
718
|
-
* Constructs a new `
|
|
995
|
+
* Constructs a new `BooleanElementClass` instance.
|
|
719
996
|
*
|
|
720
997
|
* @param value - Boolean state value
|
|
721
|
-
|
|
998
|
+
|
|
999
|
+
State to display. This remains a boolean value in the data model even when the renderer substitutes custom labels.
|
|
1000
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
722
1001
|
*/
|
|
723
1002
|
constructor(value, options) {
|
|
724
1003
|
super();
|
|
725
1004
|
this.value = value;
|
|
1005
|
+
this.representation = options?.representation ?? BooleanRepresentation.plain;
|
|
726
1006
|
this.trueLabel = options?.trueLabel ?? "true";
|
|
727
1007
|
this.falseLabel = options?.falseLabel ?? "false";
|
|
728
1008
|
this.variant = options?.variant ?? BadgeVariant.neutral;
|
|
@@ -733,7 +1013,7 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
733
1013
|
* Class implementation of the `TimestampElement` interface.
|
|
734
1014
|
*
|
|
735
1015
|
* @remarks
|
|
736
|
-
*
|
|
1016
|
+
* Displays an epoch timestamp using a selected date/time format. The input is a count of milliseconds, not seconds; relative formatting is interpreted by the consumer.
|
|
737
1017
|
*/
|
|
738
1018
|
export class TimestampElementClass extends BaseUiElement {
|
|
739
1019
|
/**
|
|
@@ -742,11 +1022,19 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
742
1022
|
* @defaultValue "timestamp"
|
|
743
1023
|
*/
|
|
744
1024
|
type = "timestamp";
|
|
745
|
-
/**
|
|
1025
|
+
/**
|
|
1026
|
+
* The timestamp in milliseconds
|
|
1027
|
+
*
|
|
1028
|
+
* @remarks
|
|
1029
|
+
* Unix epoch timestamp measured in milliseconds. Convert seconds-based timestamps before assigning this value.
|
|
1030
|
+
*/
|
|
746
1031
|
value;
|
|
747
1032
|
/**
|
|
748
1033
|
* Presentation date/time format
|
|
749
1034
|
*
|
|
1035
|
+
* @remarks
|
|
1036
|
+
* Controls whether the timestamp is shown as date and time, date only, time only, or relative text. The default is datetime.
|
|
1037
|
+
*
|
|
750
1038
|
* @defaultValue TimestampFormat.datetime
|
|
751
1039
|
*/
|
|
752
1040
|
format;
|
|
@@ -756,6 +1044,8 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
756
1044
|
* Constructs a new `TimestampElementClass` instance.
|
|
757
1045
|
*
|
|
758
1046
|
* @param value - The timestamp in milliseconds
|
|
1047
|
+
|
|
1048
|
+
Unix epoch timestamp measured in milliseconds. Convert seconds-based timestamps before assigning this value.
|
|
759
1049
|
* @param options - Optional component settings. (format (defaults to `datetime`), modifiers).
|
|
760
1050
|
*/
|
|
761
1051
|
constructor(value, options) {
|
|
@@ -769,7 +1059,7 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
769
1059
|
* Class implementation of the `ImageReferenceElement` interface.
|
|
770
1060
|
*
|
|
771
1061
|
* @remarks
|
|
772
|
-
*
|
|
1062
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
773
1063
|
*/
|
|
774
1064
|
export class ImageReferenceElementClass extends BaseUiElement {
|
|
775
1065
|
/**
|
|
@@ -778,22 +1068,42 @@ export class ImageReferenceElementClass extends BaseUiElement {
|
|
|
778
1068
|
* @defaultValue "image-ref"
|
|
779
1069
|
*/
|
|
780
1070
|
type = "image-ref";
|
|
781
|
-
/**
|
|
1071
|
+
/**
|
|
1072
|
+
* Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
1073
|
+
*
|
|
1074
|
+
* @remarks
|
|
1075
|
+
* Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
1076
|
+
*/
|
|
782
1077
|
src;
|
|
783
|
-
/**
|
|
1078
|
+
/**
|
|
1079
|
+
* Accessible alternative description
|
|
1080
|
+
*
|
|
1081
|
+
* @remarks
|
|
1082
|
+
* Alternative text describing the image for assistive technology. Provide meaningful text when the image conveys information; omit it only when it is decorative.
|
|
1083
|
+
*/
|
|
784
1084
|
alt;
|
|
785
1085
|
/**
|
|
786
1086
|
* Aspect ratio of the thumbnail container
|
|
787
1087
|
*
|
|
1088
|
+
* @remarks
|
|
1089
|
+
* Preferred ratio of the rendered thumbnail container, expressed as a ratio string such as 1:1. It controls presentation rather than modifying the source image.
|
|
1090
|
+
*
|
|
788
1091
|
* @defaultValue "1:1"
|
|
789
1092
|
*/
|
|
790
1093
|
aspectRatio;
|
|
791
|
-
/**
|
|
1094
|
+
/**
|
|
1095
|
+
* Fallback placeholder image URI
|
|
1096
|
+
*
|
|
1097
|
+
* @remarks
|
|
1098
|
+
* Optional source to display when the primary image cannot be loaded. It follows the same URI conventions as src.
|
|
1099
|
+
*/
|
|
792
1100
|
placeholder;
|
|
793
1101
|
/**
|
|
794
1102
|
* Constructs a new `ImageReferenceElementClass` instance.
|
|
795
1103
|
*
|
|
796
1104
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
1105
|
+
|
|
1106
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
797
1107
|
* @param options - Optional component settings. (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
798
1108
|
*/
|
|
799
1109
|
constructor(src, options) {
|
|
@@ -808,7 +1118,7 @@ export class ImageReferenceElementClass extends BaseUiElement {
|
|
|
808
1118
|
* Class implementation of the `ButtonActionElement` interface.
|
|
809
1119
|
*
|
|
810
1120
|
* @remarks
|
|
811
|
-
*
|
|
1121
|
+
* When activated, the client dispatches commandId to the specified extension and may include target and parameters as command input. disabled and variant affect presentation and availability, not the command's authorization.
|
|
812
1122
|
*/
|
|
813
1123
|
export class ButtonActionElementClass extends BaseUiAction {
|
|
814
1124
|
/**
|
|
@@ -817,25 +1127,56 @@ export class ButtonActionElementClass extends BaseUiAction {
|
|
|
817
1127
|
* @defaultValue "button"
|
|
818
1128
|
*/
|
|
819
1129
|
type = "button";
|
|
820
|
-
/**
|
|
1130
|
+
/**
|
|
1131
|
+
* Command identifier to invoke
|
|
1132
|
+
*
|
|
1133
|
+
* @remarks
|
|
1134
|
+
* Identifier of the registered extension command to dispatch when the button is activated.
|
|
1135
|
+
*/
|
|
821
1136
|
commandId;
|
|
822
|
-
/**
|
|
1137
|
+
/**
|
|
1138
|
+
* Display label for the action
|
|
1139
|
+
*
|
|
1140
|
+
* @remarks
|
|
1141
|
+
* User-facing label shown on the control. Keep it short and action-oriented.
|
|
1142
|
+
*/
|
|
823
1143
|
label;
|
|
824
|
-
/**
|
|
1144
|
+
/**
|
|
1145
|
+
* Extension identifier owning the target command
|
|
1146
|
+
*
|
|
1147
|
+
* @remarks
|
|
1148
|
+
* Extension that registers commandId. Omit only when the client can resolve the command in the current extension context.
|
|
1149
|
+
*/
|
|
825
1150
|
extensionId;
|
|
826
|
-
/**
|
|
1151
|
+
/**
|
|
1152
|
+
* Target entity or context identifier
|
|
1153
|
+
*
|
|
1154
|
+
* @remarks
|
|
1155
|
+
* Optional entity or context identifier forwarded to the command handler. Its format is determined by the target extension.
|
|
1156
|
+
*/
|
|
827
1157
|
target;
|
|
828
|
-
/**
|
|
1158
|
+
/**
|
|
1159
|
+
* Optional arbitrary parameters payload forwarded to the command handler
|
|
1160
|
+
*
|
|
1161
|
+
* @remarks
|
|
1162
|
+
* JSON-compatible arguments passed to the extension command. Define and validate their shape in the command implementation.
|
|
1163
|
+
*/
|
|
829
1164
|
parameters;
|
|
830
1165
|
/**
|
|
831
1166
|
* Whether the button is disabled / unavailable
|
|
832
1167
|
*
|
|
1168
|
+
* @remarks
|
|
1169
|
+
* When true, the client renders the action as unavailable and should not dispatch it from user activation.
|
|
1170
|
+
*
|
|
833
1171
|
* @defaultValue false
|
|
834
1172
|
*/
|
|
835
1173
|
disabled;
|
|
836
1174
|
/**
|
|
837
1175
|
* Button visual style variant
|
|
838
1176
|
*
|
|
1177
|
+
* @remarks
|
|
1178
|
+
* Selects the button's emphasis style. Use danger for destructive operations and primary for the main recommended action; the variant does not change behavior.
|
|
1179
|
+
*
|
|
839
1180
|
* @defaultValue ButtonVariant.secondary
|
|
840
1181
|
*/
|
|
841
1182
|
variant;
|
|
@@ -843,7 +1184,11 @@ export class ButtonActionElementClass extends BaseUiAction {
|
|
|
843
1184
|
* Constructs a new `ButtonActionElementClass` instance.
|
|
844
1185
|
*
|
|
845
1186
|
* @param commandId - Command identifier to invoke
|
|
1187
|
+
|
|
1188
|
+
Identifier of the registered extension command to dispatch when the button is activated.
|
|
846
1189
|
* @param label - Display label for the action
|
|
1190
|
+
|
|
1191
|
+
User-facing label shown on the control. Keep it short and action-oriented.
|
|
847
1192
|
* @param options - Optional component settings. (extensionId, target, parameters, disabled (defaults to `false`), variant (defaults to `secondary`)).
|
|
848
1193
|
*/
|
|
849
1194
|
constructor(commandId, label, options) {
|
|
@@ -861,7 +1206,7 @@ export class ButtonActionElementClass extends BaseUiAction {
|
|
|
861
1206
|
* Class implementation of the `ExternalLinkActionElement` interface.
|
|
862
1207
|
*
|
|
863
1208
|
* @remarks
|
|
864
|
-
*
|
|
1209
|
+
* Renders a user-invokable action that opens a destination externally. Use StringUrlElement for a link embedded in content rather than an action control.
|
|
865
1210
|
*/
|
|
866
1211
|
export class ExternalLinkActionElementClass extends BaseUiAction {
|
|
867
1212
|
/**
|
|
@@ -870,15 +1215,29 @@ export class ExternalLinkActionElementClass extends BaseUiAction {
|
|
|
870
1215
|
* @defaultValue "external-link"
|
|
871
1216
|
*/
|
|
872
1217
|
type = "external-link";
|
|
873
|
-
/**
|
|
1218
|
+
/**
|
|
1219
|
+
* Target URL destination
|
|
1220
|
+
*
|
|
1221
|
+
* @remarks
|
|
1222
|
+
* External destination opened when the user activates the link action. The client controls how external navigation is handed to the platform.
|
|
1223
|
+
*/
|
|
874
1224
|
url;
|
|
875
|
-
/**
|
|
1225
|
+
/**
|
|
1226
|
+
* Display label for the action
|
|
1227
|
+
*
|
|
1228
|
+
* @remarks
|
|
1229
|
+
* User-facing label shown on the control. Keep it short and action-oriented.
|
|
1230
|
+
*/
|
|
876
1231
|
label;
|
|
877
1232
|
/**
|
|
878
1233
|
* Constructs a new `ExternalLinkActionElementClass` instance.
|
|
879
1234
|
*
|
|
880
1235
|
* @param url - Target URL destination
|
|
1236
|
+
|
|
1237
|
+
External destination opened when the user activates the link action. The client controls how external navigation is handed to the platform.
|
|
881
1238
|
* @param label - Display label for the action
|
|
1239
|
+
|
|
1240
|
+
User-facing label shown on the control. Keep it short and action-oriented.
|
|
882
1241
|
*/
|
|
883
1242
|
constructor(url, label) {
|
|
884
1243
|
super();
|
|
@@ -890,7 +1249,7 @@ export class ExternalLinkActionElementClass extends BaseUiAction {
|
|
|
890
1249
|
* Class implementation of the `MarkdownBlockElement` interface.
|
|
891
1250
|
*
|
|
892
1251
|
* @remarks
|
|
893
|
-
*
|
|
1252
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
894
1253
|
*/
|
|
895
1254
|
export class MarkdownBlockElementClass extends BaseUiElement {
|
|
896
1255
|
/**
|
|
@@ -899,7 +1258,12 @@ export class MarkdownBlockElementClass extends BaseUiElement {
|
|
|
899
1258
|
* @defaultValue "markdown"
|
|
900
1259
|
*/
|
|
901
1260
|
type = "markdown";
|
|
902
|
-
/**
|
|
1261
|
+
/**
|
|
1262
|
+
* Raw Markdown markup content
|
|
1263
|
+
*
|
|
1264
|
+
* @remarks
|
|
1265
|
+
* Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
1266
|
+
*/
|
|
903
1267
|
content;
|
|
904
1268
|
/** Optional visual modifiers (copyable) */
|
|
905
1269
|
modifiers;
|
|
@@ -907,6 +1271,8 @@ export class MarkdownBlockElementClass extends BaseUiElement {
|
|
|
907
1271
|
* Constructs a new `MarkdownBlockElementClass` instance.
|
|
908
1272
|
*
|
|
909
1273
|
* @param content - Raw Markdown markup content
|
|
1274
|
+
|
|
1275
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
910
1276
|
* @param options - Optional component settings. (modifiers).
|
|
911
1277
|
*/
|
|
912
1278
|
constructor(content, options) {
|
|
@@ -919,7 +1285,7 @@ export class MarkdownBlockElementClass extends BaseUiElement {
|
|
|
919
1285
|
* Class implementation of the `HtmlBlockElement` interface.
|
|
920
1286
|
*
|
|
921
1287
|
* @remarks
|
|
922
|
-
*
|
|
1288
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
923
1289
|
*/
|
|
924
1290
|
export class HtmlBlockElementClass extends BaseUiElement {
|
|
925
1291
|
/**
|
|
@@ -928,7 +1294,12 @@ export class HtmlBlockElementClass extends BaseUiElement {
|
|
|
928
1294
|
* @defaultValue "html"
|
|
929
1295
|
*/
|
|
930
1296
|
type = "html";
|
|
931
|
-
/**
|
|
1297
|
+
/**
|
|
1298
|
+
* Raw HTML markup content
|
|
1299
|
+
*
|
|
1300
|
+
* @remarks
|
|
1301
|
+
* HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
1302
|
+
*/
|
|
932
1303
|
content;
|
|
933
1304
|
/** Optional visual modifiers (copyable) */
|
|
934
1305
|
modifiers;
|
|
@@ -936,6 +1307,8 @@ export class HtmlBlockElementClass extends BaseUiElement {
|
|
|
936
1307
|
* Constructs a new `HtmlBlockElementClass` instance.
|
|
937
1308
|
*
|
|
938
1309
|
* @param content - Raw HTML markup content
|
|
1310
|
+
|
|
1311
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
939
1312
|
* @param options - Optional component settings. (modifiers).
|
|
940
1313
|
*/
|
|
941
1314
|
constructor(content, options) {
|
|
@@ -948,19 +1321,36 @@ export class HtmlBlockElementClass extends BaseUiElement {
|
|
|
948
1321
|
* Class implementation of the `Slot` interface.
|
|
949
1322
|
*
|
|
950
1323
|
* @remarks
|
|
951
|
-
*
|
|
1324
|
+
* A slot combines an optional label, a relative width, and one visual child. Slot widths are percentages of the row and should be chosen so the full row's widths form a usable layout.
|
|
952
1325
|
*/
|
|
953
1326
|
export class SlotClass extends ViewKitNode {
|
|
954
|
-
/**
|
|
1327
|
+
/**
|
|
1328
|
+
* Rendered content inside the slot
|
|
1329
|
+
*
|
|
1330
|
+
* @remarks
|
|
1331
|
+
* One visual element displayed in this slot. Use a nested layout element when the slot itself needs multiple children.
|
|
1332
|
+
*/
|
|
955
1333
|
content;
|
|
956
|
-
/**
|
|
1334
|
+
/**
|
|
1335
|
+
* Optional slot label (e.g. "Slot A")
|
|
1336
|
+
*
|
|
1337
|
+
* @remarks
|
|
1338
|
+
* Short text identifying this region of the row. It is independent of the rendered content.
|
|
1339
|
+
*/
|
|
957
1340
|
label;
|
|
958
|
-
/**
|
|
1341
|
+
/**
|
|
1342
|
+
* Width percentage (1-100)
|
|
1343
|
+
*
|
|
1344
|
+
* @remarks
|
|
1345
|
+
* Relative share of the row width. The schema constrains explicit values to the inclusive range 1 through 100.
|
|
1346
|
+
*/
|
|
959
1347
|
width;
|
|
960
1348
|
/**
|
|
961
1349
|
* Constructs a new `SlotClass` instance.
|
|
962
1350
|
*
|
|
963
1351
|
* @param content - Rendered content inside the slot
|
|
1352
|
+
|
|
1353
|
+
One visual element displayed in this slot. Use a nested layout element when the slot itself needs multiple children.
|
|
964
1354
|
* @param options - Optional component settings. (label, width).
|
|
965
1355
|
*/
|
|
966
1356
|
constructor(content, options) {
|
|
@@ -974,8 +1364,7 @@ export class SlotClass extends ViewKitNode {
|
|
|
974
1364
|
* Class implementation of the `MultiSlotElement` interface.
|
|
975
1365
|
*
|
|
976
1366
|
* @remarks
|
|
977
|
-
*
|
|
978
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1367
|
+
* Use this layout when a row needs explicit regions with independently controlled widths. Each slot contains one child element; unlike FlowingElement, the layout does not automatically wrap a sequence of children.
|
|
979
1368
|
*/
|
|
980
1369
|
export class MultiSlotElementClass extends BaseUiElement {
|
|
981
1370
|
/**
|
|
@@ -984,28 +1373,30 @@ export class MultiSlotElementClass extends BaseUiElement {
|
|
|
984
1373
|
* @defaultValue "multi-slot"
|
|
985
1374
|
*/
|
|
986
1375
|
type = "multi-slot";
|
|
987
|
-
/**
|
|
1376
|
+
/**
|
|
1377
|
+
* List of slots comprising the row
|
|
1378
|
+
*
|
|
1379
|
+
* @remarks
|
|
1380
|
+
* Ordered slots in the row. Each slot's width is a percentage; arrange slot definitions in the intended visual order.
|
|
1381
|
+
*/
|
|
988
1382
|
slots;
|
|
989
|
-
/** Proportions descriptor (e.g. "1/3 + 2/3", "equal", "1/4 + 3/4") */
|
|
990
|
-
proportions;
|
|
991
1383
|
/**
|
|
992
1384
|
* Constructs a new `MultiSlotElementClass` instance.
|
|
993
1385
|
*
|
|
994
1386
|
* @param slots - List of slots comprising the row
|
|
995
|
-
|
|
1387
|
+
|
|
1388
|
+
Ordered slots in the row. Each slot's width is a percentage; arrange slot definitions in the intended visual order.
|
|
996
1389
|
*/
|
|
997
|
-
constructor(slots
|
|
1390
|
+
constructor(slots) {
|
|
998
1391
|
super();
|
|
999
1392
|
this.slots = slots ? [...slots] : [];
|
|
1000
|
-
this.proportions = options?.proportions;
|
|
1001
1393
|
}
|
|
1002
1394
|
}
|
|
1003
1395
|
/**
|
|
1004
1396
|
* Class implementation of the `FlowingElement` interface.
|
|
1005
1397
|
*
|
|
1006
1398
|
* @remarks
|
|
1007
|
-
*
|
|
1008
|
-
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1399
|
+
* Use for compact related values that should flow horizontally and wrap naturally at the available width. Child order is preserved; an optional separator is placed between neighboring children.
|
|
1009
1400
|
*/
|
|
1010
1401
|
export class FlowingElementClass extends BaseUiElement {
|
|
1011
1402
|
/**
|
|
@@ -1014,24 +1405,39 @@ export class FlowingElementClass extends BaseUiElement {
|
|
|
1014
1405
|
* @defaultValue "flowing"
|
|
1015
1406
|
*/
|
|
1016
1407
|
type = "flowing";
|
|
1017
|
-
/**
|
|
1408
|
+
/**
|
|
1409
|
+
* List of child elements rendered sequentially with line wrapping
|
|
1410
|
+
*
|
|
1411
|
+
* @remarks
|
|
1412
|
+
* Ordered children rendered in the flow. The client wraps them as needed rather than requiring callers to calculate line breaks.
|
|
1413
|
+
*/
|
|
1018
1414
|
elements;
|
|
1415
|
+
/**
|
|
1416
|
+
* Optional visual separator rendered between sequential child elements
|
|
1417
|
+
*
|
|
1418
|
+
* @remarks
|
|
1419
|
+
* Separator placed between adjacent elements. Omit it when spacing or the child renderers already provide sufficient separation.
|
|
1420
|
+
*/
|
|
1421
|
+
separator;
|
|
1019
1422
|
/**
|
|
1020
1423
|
* Constructs a new `FlowingElementClass` instance.
|
|
1021
1424
|
*
|
|
1022
1425
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1426
|
+
|
|
1427
|
+
Ordered children rendered in the flow. The client wraps them as needed rather than requiring callers to calculate line breaks.
|
|
1428
|
+
* @param options - Optional component settings. (separator).
|
|
1023
1429
|
*/
|
|
1024
|
-
constructor(elements) {
|
|
1430
|
+
constructor(elements, options) {
|
|
1025
1431
|
super();
|
|
1026
1432
|
this.elements = elements ? [...elements] : [];
|
|
1433
|
+
this.separator = options?.separator;
|
|
1027
1434
|
}
|
|
1028
1435
|
}
|
|
1029
1436
|
/**
|
|
1030
1437
|
* Class implementation of the `LabelValueElement` interface.
|
|
1031
1438
|
*
|
|
1032
1439
|
* @remarks
|
|
1033
|
-
*
|
|
1034
|
-
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
1440
|
+
* Represents one named value with a muted left-hand label and a right-hand visual element. Use it for a single field; use TableElement for repeated rows or column-aligned data.
|
|
1035
1441
|
*/
|
|
1036
1442
|
export class LabelValueElementClass extends BaseUiElement {
|
|
1037
1443
|
/**
|
|
@@ -1040,13 +1446,26 @@ export class LabelValueElementClass extends BaseUiElement {
|
|
|
1040
1446
|
* @defaultValue "label-value"
|
|
1041
1447
|
*/
|
|
1042
1448
|
type = "label-value";
|
|
1043
|
-
/**
|
|
1449
|
+
/**
|
|
1450
|
+
* Key or descriptive label displayed muted on the left
|
|
1451
|
+
*
|
|
1452
|
+
* @remarks
|
|
1453
|
+
* Human-readable name for the value. This text is rendered as the row label rather than as a separate UiElement.
|
|
1454
|
+
*/
|
|
1044
1455
|
label;
|
|
1045
|
-
/**
|
|
1456
|
+
/**
|
|
1457
|
+
* Rendered value element on the right
|
|
1458
|
+
*
|
|
1459
|
+
* @remarks
|
|
1460
|
+
* Value content rendered in the right-hand region. It may be a primitive or a nested structural element.
|
|
1461
|
+
*/
|
|
1046
1462
|
value;
|
|
1047
1463
|
/**
|
|
1048
1464
|
* Whether to render a bottom border/hairline divider
|
|
1049
1465
|
*
|
|
1466
|
+
* @remarks
|
|
1467
|
+
* Enables a horizontal separator beneath this row when true. Defaults to false.
|
|
1468
|
+
*
|
|
1050
1469
|
* @defaultValue false
|
|
1051
1470
|
*/
|
|
1052
1471
|
withDivider;
|
|
@@ -1054,7 +1473,11 @@ export class LabelValueElementClass extends BaseUiElement {
|
|
|
1054
1473
|
* Constructs a new `LabelValueElementClass` instance.
|
|
1055
1474
|
*
|
|
1056
1475
|
* @param label - Key or descriptive label displayed muted on the left
|
|
1476
|
+
|
|
1477
|
+
Human-readable name for the value. This text is rendered as the row label rather than as a separate UiElement.
|
|
1057
1478
|
* @param value - Rendered value element on the right
|
|
1479
|
+
|
|
1480
|
+
Value content rendered in the right-hand region. It may be a primitive or a nested structural element.
|
|
1058
1481
|
* @param options - Optional component settings. (withDivider (defaults to `false`)).
|
|
1059
1482
|
*/
|
|
1060
1483
|
constructor(label, value, options) {
|
|
@@ -1068,44 +1491,74 @@ export class LabelValueElementClass extends BaseUiElement {
|
|
|
1068
1491
|
* Class implementation of the `TableColumn` interface.
|
|
1069
1492
|
*
|
|
1070
1493
|
* @remarks
|
|
1071
|
-
*
|
|
1494
|
+
* Describes one table column and its visual sizing. When columns are supplied, their order corresponds to the position of each cell in a row.
|
|
1072
1495
|
*/
|
|
1073
1496
|
export class TableColumnClass extends ViewKitNode {
|
|
1074
|
-
/**
|
|
1497
|
+
/**
|
|
1498
|
+
* Display header text
|
|
1499
|
+
*
|
|
1500
|
+
* @remarks
|
|
1501
|
+
* Optional header shown above values in this column. Omit when the table has no header row.
|
|
1502
|
+
*/
|
|
1075
1503
|
header;
|
|
1076
1504
|
/**
|
|
1077
1505
|
* Text horizontal alignment
|
|
1078
1506
|
*
|
|
1507
|
+
* @remarks
|
|
1508
|
+
* Horizontal alignment applied to cell content in the column. Defaults to left.
|
|
1509
|
+
*
|
|
1079
1510
|
* @defaultValue TableColumnAlign.left
|
|
1080
1511
|
*/
|
|
1081
1512
|
align;
|
|
1082
|
-
/**
|
|
1513
|
+
/**
|
|
1514
|
+
* Width percentage (1-100)
|
|
1515
|
+
*
|
|
1516
|
+
* @remarks
|
|
1517
|
+
* Column width percentage used with widthMode. Explicit values are constrained to 1 through 100.
|
|
1518
|
+
*/
|
|
1083
1519
|
width;
|
|
1520
|
+
/**
|
|
1521
|
+
* Sizing mode for the provided width
|
|
1522
|
+
*
|
|
1523
|
+
* @remarks
|
|
1524
|
+
* Determines whether width is a fixed percentage allocation or an upper bound. Defaults to fixed.
|
|
1525
|
+
*
|
|
1526
|
+
* @defaultValue TableColumnWidthMode.fixed
|
|
1527
|
+
*/
|
|
1528
|
+
widthMode;
|
|
1084
1529
|
/**
|
|
1085
1530
|
* Constructs a new `TableColumnClass` instance.
|
|
1086
1531
|
*
|
|
1087
|
-
* @param options - Optional component settings. (header, align (defaults to `left`), width).
|
|
1532
|
+
* @param options - Optional component settings. (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
1088
1533
|
*/
|
|
1089
1534
|
constructor(options) {
|
|
1090
1535
|
super();
|
|
1091
1536
|
this.header = options?.header;
|
|
1092
1537
|
this.align = options?.align ?? TableColumnAlign.left;
|
|
1093
1538
|
this.width = options?.width;
|
|
1539
|
+
this.widthMode = options?.widthMode ?? TableColumnWidthMode.fixed;
|
|
1094
1540
|
}
|
|
1095
1541
|
}
|
|
1096
1542
|
/**
|
|
1097
1543
|
* Class implementation of the `TableRow` interface.
|
|
1098
1544
|
*
|
|
1099
1545
|
* @remarks
|
|
1100
|
-
*
|
|
1546
|
+
* A row's cell array is positional: cell at each index corresponds to the column at that index. Keep row lengths aligned with the table's explicit column definitions when present.
|
|
1101
1547
|
*/
|
|
1102
1548
|
export class TableRowClass extends ViewKitNode {
|
|
1103
|
-
/**
|
|
1549
|
+
/**
|
|
1550
|
+
* Array of cell values corresponding to table columns
|
|
1551
|
+
*
|
|
1552
|
+
* @remarks
|
|
1553
|
+
* Ordered contents for this row. Each cell is a UiElement so values can use the same primitive and layout renderers as other ViewKit content.
|
|
1554
|
+
*/
|
|
1104
1555
|
cells;
|
|
1105
1556
|
/**
|
|
1106
1557
|
* Constructs a new `TableRowClass` instance.
|
|
1107
1558
|
*
|
|
1108
1559
|
* @param cells - Array of cell values corresponding to table columns
|
|
1560
|
+
|
|
1561
|
+
Ordered contents for this row. Each cell is a UiElement so values can use the same primitive and layout renderers as other ViewKit content.
|
|
1109
1562
|
*/
|
|
1110
1563
|
constructor(cells) {
|
|
1111
1564
|
super();
|
|
@@ -1116,8 +1569,7 @@ export class TableRowClass extends ViewKitNode {
|
|
|
1116
1569
|
* Class implementation of the `TableElement` interface.
|
|
1117
1570
|
*
|
|
1118
1571
|
* @remarks
|
|
1119
|
-
*
|
|
1120
|
-
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
1572
|
+
* Use for data that benefits from aligned rows and columns, including key/value and multi-column tables. Supply rows in display order; explicit columns are optional, and divider/striping flags independently control visual separators and alternating backgrounds.
|
|
1121
1573
|
*/
|
|
1122
1574
|
export class TableElementClass extends BaseUiElement {
|
|
1123
1575
|
/**
|
|
@@ -1126,44 +1578,58 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1126
1578
|
* @defaultValue "table"
|
|
1127
1579
|
*/
|
|
1128
1580
|
type = "table";
|
|
1129
|
-
/** Tabular data rows */
|
|
1130
|
-
rows;
|
|
1131
1581
|
/**
|
|
1132
|
-
*
|
|
1582
|
+
* Tabular data rows
|
|
1133
1583
|
*
|
|
1134
|
-
* @
|
|
1584
|
+
* @remarks
|
|
1585
|
+
* Ordered table rows. Each row's cells correspond positionally to the declared columns.
|
|
1135
1586
|
*/
|
|
1136
|
-
|
|
1587
|
+
rows;
|
|
1137
1588
|
/**
|
|
1138
1589
|
* Whether to render alternating row background colors
|
|
1139
1590
|
*
|
|
1591
|
+
* @remarks
|
|
1592
|
+
* Enables alternating backgrounds across successive rows to improve scanability. Defaults to false.
|
|
1593
|
+
*
|
|
1140
1594
|
* @defaultValue false
|
|
1141
1595
|
*/
|
|
1142
1596
|
isStriped;
|
|
1143
1597
|
/**
|
|
1144
1598
|
* Whether to render vertical column separators
|
|
1145
1599
|
*
|
|
1600
|
+
* @remarks
|
|
1601
|
+
* Adds vertical dividers between columns when true. Defaults to false.
|
|
1602
|
+
*
|
|
1146
1603
|
* @defaultValue false
|
|
1147
1604
|
*/
|
|
1148
1605
|
withColumnSeparators;
|
|
1149
1606
|
/**
|
|
1150
1607
|
* Whether to render horizontal row separators
|
|
1151
1608
|
*
|
|
1609
|
+
* @remarks
|
|
1610
|
+
* Adds horizontal dividers between rows when true. Defaults to false.
|
|
1611
|
+
*
|
|
1152
1612
|
* @defaultValue false
|
|
1153
1613
|
*/
|
|
1154
1614
|
withRowSeparators;
|
|
1155
|
-
/**
|
|
1615
|
+
/**
|
|
1616
|
+
* Optional explicit column definitions
|
|
1617
|
+
*
|
|
1618
|
+
* @remarks
|
|
1619
|
+
* Optional ordered column metadata defining headers, alignment, and width. When omitted, the renderer may infer a basic layout from row cells.
|
|
1620
|
+
*/
|
|
1156
1621
|
columns;
|
|
1157
1622
|
/**
|
|
1158
1623
|
* Constructs a new `TableElementClass` instance.
|
|
1159
1624
|
*
|
|
1160
1625
|
* @param rows - Tabular data rows
|
|
1161
|
-
|
|
1626
|
+
|
|
1627
|
+
Ordered table rows. Each row's cells correspond positionally to the declared columns.
|
|
1628
|
+
* @param options - Optional component settings. (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1162
1629
|
*/
|
|
1163
1630
|
constructor(rows, options) {
|
|
1164
1631
|
super();
|
|
1165
1632
|
this.rows = rows ? [...rows] : [];
|
|
1166
|
-
this.hasHeader = options?.hasHeader ?? true;
|
|
1167
1633
|
this.isStriped = options?.isStriped ?? false;
|
|
1168
1634
|
this.withColumnSeparators = options?.withColumnSeparators ?? false;
|
|
1169
1635
|
this.withRowSeparators = options?.withRowSeparators ?? false;
|
|
@@ -1174,19 +1640,36 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1174
1640
|
* Class implementation of the `RepeatingGroupEntry` interface.
|
|
1175
1641
|
*
|
|
1176
1642
|
* @remarks
|
|
1177
|
-
*
|
|
1643
|
+
* A repeating entry carries a stable display label and either one primary value or a list of nested elements, depending on the shape needed by the feature.
|
|
1178
1644
|
*/
|
|
1179
1645
|
export class RepeatingGroupEntryClass extends ViewKitNode {
|
|
1180
|
-
/**
|
|
1646
|
+
/**
|
|
1647
|
+
* Entry label
|
|
1648
|
+
*
|
|
1649
|
+
* @remarks
|
|
1650
|
+
* Short label identifying this entry within the repeated group.
|
|
1651
|
+
*/
|
|
1181
1652
|
label;
|
|
1182
|
-
/**
|
|
1653
|
+
/**
|
|
1654
|
+
* Primary entry value or nested elements
|
|
1655
|
+
*
|
|
1656
|
+
* @remarks
|
|
1657
|
+
* Optional primary visual value for a compact entry. Use elements for a multi-part structured entry.
|
|
1658
|
+
*/
|
|
1183
1659
|
value;
|
|
1184
|
-
/**
|
|
1660
|
+
/**
|
|
1661
|
+
* Nested elements for structured entries
|
|
1662
|
+
*
|
|
1663
|
+
* @remarks
|
|
1664
|
+
* Optional ordered content for entries that require more than one value element.
|
|
1665
|
+
*/
|
|
1185
1666
|
elements;
|
|
1186
1667
|
/**
|
|
1187
1668
|
* Constructs a new `RepeatingGroupEntryClass` instance.
|
|
1188
1669
|
*
|
|
1189
1670
|
* @param label - Entry label
|
|
1671
|
+
|
|
1672
|
+
Short label identifying this entry within the repeated group.
|
|
1190
1673
|
* @param options - Optional component settings. (value, elements).
|
|
1191
1674
|
*/
|
|
1192
1675
|
constructor(label, options) {
|
|
@@ -1200,7 +1683,7 @@ export class RepeatingGroupEntryClass extends ViewKitNode {
|
|
|
1200
1683
|
* Class implementation of the `RepeatingGroupElement` interface.
|
|
1201
1684
|
*
|
|
1202
1685
|
* @remarks
|
|
1203
|
-
*
|
|
1686
|
+
* Groups a sequence of labeled entries under one optional section title. Use it when records have the same general presentation but need their own labels.
|
|
1204
1687
|
*/
|
|
1205
1688
|
export class RepeatingGroupElementClass extends BaseUiElement {
|
|
1206
1689
|
/**
|
|
@@ -1209,14 +1692,26 @@ export class RepeatingGroupElementClass extends BaseUiElement {
|
|
|
1209
1692
|
* @defaultValue "repeating-group"
|
|
1210
1693
|
*/
|
|
1211
1694
|
type = "repeating-group";
|
|
1212
|
-
/**
|
|
1695
|
+
/**
|
|
1696
|
+
* List of repeated entry records
|
|
1697
|
+
*
|
|
1698
|
+
* @remarks
|
|
1699
|
+
* Entries in display order. Each entry supplies its own label and content.
|
|
1700
|
+
*/
|
|
1213
1701
|
entries;
|
|
1214
|
-
/**
|
|
1702
|
+
/**
|
|
1703
|
+
* Optional section header for the group
|
|
1704
|
+
*
|
|
1705
|
+
* @remarks
|
|
1706
|
+
* Heading displayed for the repeated section, separate from the labels of individual entries.
|
|
1707
|
+
*/
|
|
1215
1708
|
title;
|
|
1216
1709
|
/**
|
|
1217
1710
|
* Constructs a new `RepeatingGroupElementClass` instance.
|
|
1218
1711
|
*
|
|
1219
1712
|
* @param entries - List of repeated entry records
|
|
1713
|
+
|
|
1714
|
+
Entries in display order. Each entry supplies its own label and content.
|
|
1220
1715
|
* @param options - Optional component settings. (title).
|
|
1221
1716
|
*/
|
|
1222
1717
|
constructor(entries, options) {
|
|
@@ -1229,7 +1724,7 @@ export class RepeatingGroupElementClass extends BaseUiElement {
|
|
|
1229
1724
|
* Class implementation of the `CollapsibleGroupElement` interface.
|
|
1230
1725
|
*
|
|
1231
1726
|
* @remarks
|
|
1232
|
-
*
|
|
1727
|
+
* Groups nested content behind a disclosure control. The title names the group, summary can provide a compact status indicator, and defaultExpanded controls only the initial state.
|
|
1233
1728
|
*/
|
|
1234
1729
|
export class CollapsibleGroupElementClass extends BaseUiElement {
|
|
1235
1730
|
/**
|
|
@@ -1238,15 +1733,33 @@ export class CollapsibleGroupElementClass extends BaseUiElement {
|
|
|
1238
1733
|
* @defaultValue "collapsible-group"
|
|
1239
1734
|
*/
|
|
1240
1735
|
type = "collapsible-group";
|
|
1241
|
-
/**
|
|
1736
|
+
/**
|
|
1737
|
+
* Group title (e.g. "Show specimen details")
|
|
1738
|
+
*
|
|
1739
|
+
* @remarks
|
|
1740
|
+
* Text shown on the disclosure control. Use a concise action or section name that remains meaningful while the content is collapsed.
|
|
1741
|
+
*/
|
|
1242
1742
|
title;
|
|
1243
|
-
/**
|
|
1743
|
+
/**
|
|
1744
|
+
* Nested content elements revealed when expanded
|
|
1745
|
+
*
|
|
1746
|
+
* @remarks
|
|
1747
|
+
* Ordered child elements made visible by expanding the group.
|
|
1748
|
+
*/
|
|
1244
1749
|
elements;
|
|
1245
|
-
/**
|
|
1750
|
+
/**
|
|
1751
|
+
* Secondary summary indicator (e.g. "2 neutral values")
|
|
1752
|
+
*
|
|
1753
|
+
* @remarks
|
|
1754
|
+
* Compact contextual text shown alongside the title while the group is collapsed or expanded. It does not replace the nested content.
|
|
1755
|
+
*/
|
|
1246
1756
|
summary;
|
|
1247
1757
|
/**
|
|
1248
1758
|
* Whether the disclosure is open/expanded by default
|
|
1249
1759
|
*
|
|
1760
|
+
* @remarks
|
|
1761
|
+
* Initial expanded state requested by the data. Defaults to false; subsequent interaction is managed by the client.
|
|
1762
|
+
*
|
|
1250
1763
|
* @defaultValue false
|
|
1251
1764
|
*/
|
|
1252
1765
|
defaultExpanded;
|
|
@@ -1254,7 +1767,11 @@ export class CollapsibleGroupElementClass extends BaseUiElement {
|
|
|
1254
1767
|
* Constructs a new `CollapsibleGroupElementClass` instance.
|
|
1255
1768
|
*
|
|
1256
1769
|
* @param title - Group title (e.g. "Show specimen details")
|
|
1770
|
+
|
|
1771
|
+
Text shown on the disclosure control. Use a concise action or section name that remains meaningful while the content is collapsed.
|
|
1257
1772
|
* @param elements - Nested content elements revealed when expanded
|
|
1773
|
+
|
|
1774
|
+
Ordered child elements made visible by expanding the group.
|
|
1258
1775
|
* @param options - Optional component settings. (summary, defaultExpanded (defaults to `false`)).
|
|
1259
1776
|
*/
|
|
1260
1777
|
constructor(title, elements, options) {
|
|
@@ -1269,7 +1786,7 @@ export class CollapsibleGroupElementClass extends BaseUiElement {
|
|
|
1269
1786
|
* Class implementation of the `DividerElement` interface.
|
|
1270
1787
|
*
|
|
1271
1788
|
* @remarks
|
|
1272
|
-
*
|
|
1789
|
+
* A standalone visual separator for dividing adjacent sections or element groups. Use the divider flags on tables or rows when the separator is part of that structure.
|
|
1273
1790
|
*/
|
|
1274
1791
|
export class DividerElementClass extends BaseUiElement {
|
|
1275
1792
|
/**
|
|
@@ -1281,6 +1798,9 @@ export class DividerElementClass extends BaseUiElement {
|
|
|
1281
1798
|
/**
|
|
1282
1799
|
* Line styling
|
|
1283
1800
|
*
|
|
1801
|
+
* @remarks
|
|
1802
|
+
* Visual stroke treatment for the separator. Defaults to a subtle hairline.
|
|
1803
|
+
*
|
|
1284
1804
|
* @defaultValue DividerStyle.hairline
|
|
1285
1805
|
*/
|
|
1286
1806
|
style;
|
|
@@ -1298,12 +1818,15 @@ export class DividerElementClass extends BaseUiElement {
|
|
|
1298
1818
|
* Class implementation of the `Envelop` interface.
|
|
1299
1819
|
*
|
|
1300
1820
|
* @remarks
|
|
1301
|
-
*
|
|
1821
|
+
* All root ViewKit documents extend this envelope so consumers can identify the schema contract version before processing the root content.
|
|
1302
1822
|
*/
|
|
1303
1823
|
export class EnvelopClass extends ViewKitNode {
|
|
1304
1824
|
/**
|
|
1305
1825
|
* Schema specification version
|
|
1306
1826
|
*
|
|
1827
|
+
* @remarks
|
|
1828
|
+
* Version of the ViewKit envelope contract. It is a literal value and should be preserved when serializing or forwarding a document.
|
|
1829
|
+
*
|
|
1307
1830
|
* @defaultValue "1.0"
|
|
1308
1831
|
*/
|
|
1309
1832
|
schemaVersion;
|
|
@@ -1321,14 +1844,22 @@ export class EnvelopClass extends ViewKitNode {
|
|
|
1321
1844
|
* Class implementation of the `UiContainer` interface.
|
|
1322
1845
|
*
|
|
1323
1846
|
* @remarks
|
|
1324
|
-
*
|
|
1847
|
+
* Provides the shared root content collection inherited by cards and other root models. The order of elements is significant and is preserved by the renderer.
|
|
1325
1848
|
*/
|
|
1326
1849
|
export class UiContainerClass extends ViewKitNode {
|
|
1327
|
-
/**
|
|
1850
|
+
/**
|
|
1851
|
+
* Ordered list of visual elements, structures, and content
|
|
1852
|
+
*
|
|
1853
|
+
* @remarks
|
|
1854
|
+
* Top-level visual content in render order. Use a structural element to group related children and primitive elements for individual values.
|
|
1855
|
+
*/
|
|
1328
1856
|
elements;
|
|
1329
1857
|
/**
|
|
1330
1858
|
* Schema specification version
|
|
1331
1859
|
*
|
|
1860
|
+
* @remarks
|
|
1861
|
+
* Version of the ViewKit envelope contract. It is a literal value and should be preserved when serializing or forwarding a document.
|
|
1862
|
+
*
|
|
1332
1863
|
* @defaultValue "1.0"
|
|
1333
1864
|
*/
|
|
1334
1865
|
schemaVersion;
|
|
@@ -1336,6 +1867,8 @@ export class UiContainerClass extends ViewKitNode {
|
|
|
1336
1867
|
* Constructs a new `UiContainerClass` instance.
|
|
1337
1868
|
*
|
|
1338
1869
|
* @param elements - Ordered list of visual elements, structures, and content
|
|
1870
|
+
|
|
1871
|
+
Top-level visual content in render order. Use a structural element to group related children and primitive elements for individual values.
|
|
1339
1872
|
* @param options - Optional component settings. (schemaVersion (defaults to `1.0`)).
|
|
1340
1873
|
*/
|
|
1341
1874
|
constructor(elements, options) {
|
|
@@ -1348,21 +1881,43 @@ export class UiContainerClass extends ViewKitNode {
|
|
|
1348
1881
|
* Class implementation of the `UiCard` interface.
|
|
1349
1882
|
*
|
|
1350
1883
|
* @remarks
|
|
1351
|
-
*
|
|
1352
|
-
* Represents a complete feature card rendered inside the 360px panel.
|
|
1884
|
+
* A complete card has a required title and ordered content inherited from UiContainer. It is designed for the feature-card surface; description and actions supplement the content, with action controls rendered separately from the element list.
|
|
1353
1885
|
*/
|
|
1354
1886
|
export class UiCardClass extends ViewKitNode {
|
|
1355
|
-
/**
|
|
1887
|
+
/**
|
|
1888
|
+
* Human-readable feature title displayed in the card header
|
|
1889
|
+
*
|
|
1890
|
+
* @remarks
|
|
1891
|
+
* Primary heading for the card. Keep it concise enough for the card header; longer explanatory text belongs in description or elements.
|
|
1892
|
+
*/
|
|
1356
1893
|
title;
|
|
1357
|
-
/**
|
|
1894
|
+
/**
|
|
1895
|
+
* Ordered list of visual elements, structures, and content
|
|
1896
|
+
*
|
|
1897
|
+
* @remarks
|
|
1898
|
+
* Top-level visual content in render order. Use a structural element to group related children and primitive elements for individual values.
|
|
1899
|
+
*/
|
|
1358
1900
|
elements;
|
|
1359
|
-
/**
|
|
1901
|
+
/**
|
|
1902
|
+
* Optional neutral subtitle / description for the feature
|
|
1903
|
+
*
|
|
1904
|
+
* @remarks
|
|
1905
|
+
* Brief secondary context shown with the title. Use the content elements for detailed information rather than placing an entire report in this field.
|
|
1906
|
+
*/
|
|
1360
1907
|
description;
|
|
1361
|
-
/**
|
|
1908
|
+
/**
|
|
1909
|
+
* Optional card action buttons rendered at the base of the feature card
|
|
1910
|
+
*
|
|
1911
|
+
* @remarks
|
|
1912
|
+
* Optional user-invokable actions shown after the card content. Their order is preserved and each action's own fields define its command or link behavior.
|
|
1913
|
+
*/
|
|
1362
1914
|
actions;
|
|
1363
1915
|
/**
|
|
1364
1916
|
* Schema specification version
|
|
1365
1917
|
*
|
|
1918
|
+
* @remarks
|
|
1919
|
+
* Version of the ViewKit envelope contract. It is a literal value and should be preserved when serializing or forwarding a document.
|
|
1920
|
+
*
|
|
1366
1921
|
* @defaultValue "1.0"
|
|
1367
1922
|
*/
|
|
1368
1923
|
schemaVersion;
|
|
@@ -1370,7 +1925,11 @@ export class UiCardClass extends ViewKitNode {
|
|
|
1370
1925
|
* Constructs a new `UiCardClass` instance.
|
|
1371
1926
|
*
|
|
1372
1927
|
* @param title - Human-readable feature title displayed in the card header
|
|
1928
|
+
|
|
1929
|
+
Primary heading for the card. Keep it concise enough for the card header; longer explanatory text belongs in description or elements.
|
|
1373
1930
|
* @param elements - Ordered list of visual elements, structures, and content
|
|
1931
|
+
|
|
1932
|
+
Top-level visual content in render order. Use a structural element to group related children and primitive elements for individual values.
|
|
1374
1933
|
* @param options - Optional component settings. (description, actions, schemaVersion (defaults to `1.0`)).
|
|
1375
1934
|
*/
|
|
1376
1935
|
constructor(title, elements, options) {
|
|
@@ -1386,7 +1945,7 @@ export class UiCardClass extends ViewKitNode {
|
|
|
1386
1945
|
* Fluent builder for constructing strongly-typed `UiContainer` instances.
|
|
1387
1946
|
*
|
|
1388
1947
|
* @remarks
|
|
1389
|
-
*
|
|
1948
|
+
* Provides the shared root content collection inherited by cards and other root models. The order of elements is significant and is preserved by the renderer.
|
|
1390
1949
|
*/
|
|
1391
1950
|
export class UiContainerBuilder {
|
|
1392
1951
|
_elements = [];
|
|
@@ -1414,39 +1973,44 @@ export class UiContainerBuilder {
|
|
|
1414
1973
|
return this;
|
|
1415
1974
|
}
|
|
1416
1975
|
/**
|
|
1417
|
-
* Appends a `
|
|
1976
|
+
* Appends a `StringElement` component.
|
|
1418
1977
|
*
|
|
1419
1978
|
* @remarks
|
|
1420
|
-
*
|
|
1421
|
-
* Supports plain text or compact chip pill presentation.
|
|
1979
|
+
* Use this primitive for one textual value when a structured label/value row is unnecessary. Choose multiline for content whose line breaks should remain visible; modifiers apply presentation traits without changing the underlying value.
|
|
1422
1980
|
*
|
|
1423
1981
|
* @param value - Text value
|
|
1982
|
+
|
|
1983
|
+
Text to render. Supply plain text; this field is not a Markdown or HTML document.
|
|
1424
1984
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1425
1985
|
* @returns This builder instance for method chaining.
|
|
1426
1986
|
*/
|
|
1427
|
-
|
|
1428
|
-
return this.add(
|
|
1987
|
+
addString(value, options) {
|
|
1988
|
+
return this.add(string(value, options));
|
|
1429
1989
|
}
|
|
1430
1990
|
/**
|
|
1431
|
-
* Appends a `
|
|
1991
|
+
* Appends a `StringsElement` component.
|
|
1432
1992
|
*
|
|
1433
1993
|
* @remarks
|
|
1434
|
-
*
|
|
1994
|
+
* Use this primitive when several related strings should be rendered as one compact sequence. The client preserves the array order and inserts the selected separator between values.
|
|
1435
1995
|
*
|
|
1436
|
-
* @param
|
|
1437
|
-
|
|
1996
|
+
* @param values - Array of string values
|
|
1997
|
+
|
|
1998
|
+
Values to render in order. Each array entry remains a distinct item for chip presentation and is not parsed as a delimited string.
|
|
1999
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
1438
2000
|
* @returns This builder instance for method chaining.
|
|
1439
2001
|
*/
|
|
1440
|
-
|
|
1441
|
-
return this.add(
|
|
2002
|
+
addStrings(values, options) {
|
|
2003
|
+
return this.add(strings(values, options));
|
|
1442
2004
|
}
|
|
1443
2005
|
/**
|
|
1444
2006
|
* Appends a `StringCodeElement` component.
|
|
1445
2007
|
*
|
|
1446
2008
|
* @remarks
|
|
1447
|
-
*
|
|
2009
|
+
* Use for source-like or preformatted textual content that should be rendered in a code-oriented style. The language is a presentation hint; the content is not parsed or validated as code by this contract.
|
|
1448
2010
|
*
|
|
1449
2011
|
* @param value - Text value
|
|
2012
|
+
|
|
2013
|
+
Code or text snippet to display. Include any desired line breaks in this string.
|
|
1450
2014
|
* @param options - Optional component settings (language, modifiers).
|
|
1451
2015
|
* @returns This builder instance for method chaining.
|
|
1452
2016
|
*/
|
|
@@ -1457,9 +2021,11 @@ export class UiContainerBuilder {
|
|
|
1457
2021
|
* Appends a `XmlElement` component.
|
|
1458
2022
|
*
|
|
1459
2023
|
* @remarks
|
|
1460
|
-
* XML
|
|
2024
|
+
* Specialized code-oriented element for XML content. It uses the custom XML renderer rather than requiring consumers to construct a generic code block.
|
|
1461
2025
|
*
|
|
1462
2026
|
* @param value - XML content value
|
|
2027
|
+
|
|
2028
|
+
XML markup to render. The contract carries the source text; it does not guarantee that the document is well-formed.
|
|
1463
2029
|
* @param options - Optional component settings (modifiers).
|
|
1464
2030
|
* @returns This builder instance for method chaining.
|
|
1465
2031
|
*/
|
|
@@ -1470,9 +2036,11 @@ export class UiContainerBuilder {
|
|
|
1470
2036
|
* Appends a `JsonElement` component.
|
|
1471
2037
|
*
|
|
1472
2038
|
* @remarks
|
|
1473
|
-
* JSON
|
|
2039
|
+
* Specialized representation for JSON text. Supply serialized JSON when consumers should display a JSON document; this field is a string and is not structurally validated here.
|
|
1474
2040
|
*
|
|
1475
2041
|
* @param value - JSON content value
|
|
2042
|
+
|
|
2043
|
+
Serialized JSON text to render. No parsing or schema validation is implied by this element.
|
|
1476
2044
|
* @param options - Optional component settings (modifiers).
|
|
1477
2045
|
* @returns This builder instance for method chaining.
|
|
1478
2046
|
*/
|
|
@@ -1483,9 +2051,11 @@ export class UiContainerBuilder {
|
|
|
1483
2051
|
* Appends a `StringUrlElement` component.
|
|
1484
2052
|
*
|
|
1485
2053
|
* @remarks
|
|
1486
|
-
*
|
|
2054
|
+
* Use this element when displayed text should also behave as a link. Unlike StringElement, the value is a navigation destination and may be paired with a separate human-readable label.
|
|
1487
2055
|
*
|
|
1488
2056
|
* @param value - Target URL or navigation destination
|
|
2057
|
+
|
|
2058
|
+
Destination associated with the link. Supply a URL or client-recognized navigation target supported by the renderer.
|
|
1489
2059
|
* @param options - Optional component settings (label, modifiers).
|
|
1490
2060
|
* @returns This builder instance for method chaining.
|
|
1491
2061
|
*/
|
|
@@ -1496,9 +2066,11 @@ export class UiContainerBuilder {
|
|
|
1496
2066
|
* Appends a `IdentifierElement` component.
|
|
1497
2067
|
*
|
|
1498
2068
|
* @remarks
|
|
1499
|
-
*
|
|
2069
|
+
* Use for identifiers, hashes, and other machine-oriented strings that benefit from monospace styling. The value remains text and is not resolved as a Picteus entity.
|
|
1500
2070
|
*
|
|
1501
2071
|
* @param value - Identifier string value
|
|
2072
|
+
|
|
2073
|
+
Identifier text to display, such as an opaque ID or hash. Avoid embedding presentation markup in the value.
|
|
1502
2074
|
* @param options - Optional component settings (modifiers).
|
|
1503
2075
|
* @returns This builder instance for method chaining.
|
|
1504
2076
|
*/
|
|
@@ -1509,22 +2081,44 @@ export class UiContainerBuilder {
|
|
|
1509
2081
|
* Appends a `RatioElement` component.
|
|
1510
2082
|
*
|
|
1511
2083
|
* @remarks
|
|
1512
|
-
*
|
|
2084
|
+
* Displays a numeric aspect ratio as a ratio expression. Provide a positive value meaningful to the surrounding content; this type does not encode the source image dimensions.
|
|
1513
2085
|
*
|
|
1514
2086
|
* @param value - Aspect ratio numerical expression
|
|
2087
|
+
|
|
2088
|
+
Numeric ratio value used by the renderer to produce an aspect-ratio display.
|
|
1515
2089
|
* @param options - Optional component settings (modifiers).
|
|
1516
2090
|
* @returns This builder instance for method chaining.
|
|
1517
2091
|
*/
|
|
1518
2092
|
addRatio(value, options) {
|
|
1519
2093
|
return this.add(ratio(value, options));
|
|
1520
2094
|
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Appends a `DimensionsElement` component.
|
|
2097
|
+
*
|
|
2098
|
+
* @remarks
|
|
2099
|
+
* Displays a width/height pair as image dimensions. Both values are positive pixel counts; together they describe dimensions, not an aspect ratio or a resize request.
|
|
2100
|
+
*
|
|
2101
|
+
* @param width - Width in pixels
|
|
2102
|
+
|
|
2103
|
+
Horizontal pixel count. Values below one are rejected by the schema constraint.
|
|
2104
|
+
* @param height - Height in pixels
|
|
2105
|
+
|
|
2106
|
+
Vertical pixel count. Values below one are rejected by the schema constraint.
|
|
2107
|
+
* @param options - Optional component settings (modifiers).
|
|
2108
|
+
* @returns This builder instance for method chaining.
|
|
2109
|
+
*/
|
|
2110
|
+
addDimensions(width, height, options) {
|
|
2111
|
+
return this.add(dimensions(width, height, options));
|
|
2112
|
+
}
|
|
1521
2113
|
/**
|
|
1522
2114
|
* Appends a `ColourElement` component.
|
|
1523
2115
|
*
|
|
1524
2116
|
* @remarks
|
|
1525
|
-
*
|
|
2117
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
1526
2118
|
*
|
|
1527
2119
|
* @param value - Hexadecimal color code
|
|
2120
|
+
|
|
2121
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
1528
2122
|
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1529
2123
|
* @returns This builder instance for method chaining.
|
|
1530
2124
|
*/
|
|
@@ -1535,9 +2129,11 @@ export class UiContainerBuilder {
|
|
|
1535
2129
|
* Appends a `ColourElement` component.
|
|
1536
2130
|
*
|
|
1537
2131
|
* @remarks
|
|
1538
|
-
*
|
|
2132
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
1539
2133
|
*
|
|
1540
2134
|
* @param value - Hexadecimal color code
|
|
2135
|
+
|
|
2136
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
1541
2137
|
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1542
2138
|
* @returns This builder instance for method chaining.
|
|
1543
2139
|
*/
|
|
@@ -1548,9 +2144,11 @@ export class UiContainerBuilder {
|
|
|
1548
2144
|
* Appends a `NumberUnboundedElement` component.
|
|
1549
2145
|
*
|
|
1550
2146
|
* @remarks
|
|
1551
|
-
*
|
|
2147
|
+
* Displays a numeric value without a progress scale or rating interpretation. Use unit to communicate the measurement context; no range is imposed by this model.
|
|
1552
2148
|
*
|
|
1553
2149
|
* @param value - Numeric value
|
|
2150
|
+
|
|
2151
|
+
Number to display. Its meaning and any valid range are defined by the producing feature.
|
|
1554
2152
|
* @param options - Optional component settings (unit, modifiers).
|
|
1555
2153
|
* @returns This builder instance for method chaining.
|
|
1556
2154
|
*/
|
|
@@ -1561,9 +2159,11 @@ export class UiContainerBuilder {
|
|
|
1561
2159
|
* Appends a `NumberBoundedStarsElement` component.
|
|
1562
2160
|
*
|
|
1563
2161
|
* @remarks
|
|
1564
|
-
*
|
|
2162
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
1565
2163
|
*
|
|
1566
2164
|
* @param value - Numeric rating score
|
|
2165
|
+
|
|
2166
|
+
Score represented by the filled portion of the star display.
|
|
1567
2167
|
* @param options - Optional component settings (maximum, modifiers).
|
|
1568
2168
|
* @returns This builder instance for method chaining.
|
|
1569
2169
|
*/
|
|
@@ -1574,9 +2174,11 @@ export class UiContainerBuilder {
|
|
|
1574
2174
|
* Appends a `NumberBoundedStarsElement` component.
|
|
1575
2175
|
*
|
|
1576
2176
|
* @remarks
|
|
1577
|
-
*
|
|
2177
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
1578
2178
|
*
|
|
1579
2179
|
* @param value - Numeric rating score
|
|
2180
|
+
|
|
2181
|
+
Score represented by the filled portion of the star display.
|
|
1580
2182
|
* @param options - Optional component settings (maximum, modifiers).
|
|
1581
2183
|
* @returns This builder instance for method chaining.
|
|
1582
2184
|
*/
|
|
@@ -1587,9 +2189,11 @@ export class UiContainerBuilder {
|
|
|
1587
2189
|
* Appends a `NumberBoundedMeterElement` component.
|
|
1588
2190
|
*
|
|
1589
2191
|
* @remarks
|
|
1590
|
-
*
|
|
2192
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
1591
2193
|
*
|
|
1592
2194
|
* @param value - Numeric value
|
|
2195
|
+
|
|
2196
|
+
Current measurement or score represented by the meter.
|
|
1593
2197
|
* @param options - Optional component settings (minimum, maximum, label, unit, modifiers).
|
|
1594
2198
|
* @returns This builder instance for method chaining.
|
|
1595
2199
|
*/
|
|
@@ -1600,9 +2204,11 @@ export class UiContainerBuilder {
|
|
|
1600
2204
|
* Appends a `NumberBoundedMeterElement` component.
|
|
1601
2205
|
*
|
|
1602
2206
|
* @remarks
|
|
1603
|
-
*
|
|
2207
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
1604
2208
|
*
|
|
1605
2209
|
* @param value - Numeric value
|
|
2210
|
+
|
|
2211
|
+
Current measurement or score represented by the meter.
|
|
1606
2212
|
* @param options - Optional component settings (minimum, maximum, label, unit, modifiers).
|
|
1607
2213
|
* @returns This builder instance for method chaining.
|
|
1608
2214
|
*/
|
|
@@ -1610,38 +2216,29 @@ export class UiContainerBuilder {
|
|
|
1610
2216
|
return this.add(numberMeter(value, options));
|
|
1611
2217
|
}
|
|
1612
2218
|
/**
|
|
1613
|
-
* Appends a `
|
|
2219
|
+
* Appends a `BooleanElement` component.
|
|
1614
2220
|
*
|
|
1615
2221
|
* @remarks
|
|
1616
|
-
*
|
|
2222
|
+
* Displays a boolean state using text or a badge. The representation determines whether true/false labels or a colored badge are used; configured labels and variant are presentation choices only.
|
|
1617
2223
|
*
|
|
1618
2224
|
* @param value - Boolean state value
|
|
1619
|
-
|
|
2225
|
+
|
|
2226
|
+
State to display. This remains a boolean value in the data model even when the renderer substitutes custom labels.
|
|
2227
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1620
2228
|
* @returns This builder instance for method chaining.
|
|
1621
2229
|
*/
|
|
1622
|
-
|
|
1623
|
-
return this.add(
|
|
1624
|
-
}
|
|
1625
|
-
/**
|
|
1626
|
-
* Appends a `BooleanBadgeElement` component.
|
|
1627
|
-
*
|
|
1628
|
-
* @remarks
|
|
1629
|
-
* Visual badge pill representation of a boolean state.
|
|
1630
|
-
*
|
|
1631
|
-
* @param value - Boolean state value
|
|
1632
|
-
* @param options - Optional component settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1633
|
-
* @returns This builder instance for method chaining.
|
|
1634
|
-
*/
|
|
1635
|
-
addBooleanBadge(value, options) {
|
|
1636
|
-
return this.add(booleanBadge(value, options));
|
|
2230
|
+
addBoolean(value, options) {
|
|
2231
|
+
return this.add(boolean(value, options));
|
|
1637
2232
|
}
|
|
1638
2233
|
/**
|
|
1639
2234
|
* Appends a `TimestampElement` component.
|
|
1640
2235
|
*
|
|
1641
2236
|
* @remarks
|
|
1642
|
-
*
|
|
2237
|
+
* Displays an epoch timestamp using a selected date/time format. The input is a count of milliseconds, not seconds; relative formatting is interpreted by the consumer.
|
|
1643
2238
|
*
|
|
1644
2239
|
* @param value - The timestamp in milliseconds
|
|
2240
|
+
|
|
2241
|
+
Unix epoch timestamp measured in milliseconds. Convert seconds-based timestamps before assigning this value.
|
|
1645
2242
|
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
1646
2243
|
* @returns This builder instance for method chaining.
|
|
1647
2244
|
*/
|
|
@@ -1652,9 +2249,11 @@ export class UiContainerBuilder {
|
|
|
1652
2249
|
* Appends a `ImageReferenceElement` component.
|
|
1653
2250
|
*
|
|
1654
2251
|
* @remarks
|
|
1655
|
-
*
|
|
2252
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
1656
2253
|
*
|
|
1657
2254
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
2255
|
+
|
|
2256
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
1658
2257
|
* @param options - Optional component settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
1659
2258
|
* @returns This builder instance for method chaining.
|
|
1660
2259
|
*/
|
|
@@ -1665,9 +2264,11 @@ export class UiContainerBuilder {
|
|
|
1665
2264
|
* Appends a `ImageReferenceElement` component.
|
|
1666
2265
|
*
|
|
1667
2266
|
* @remarks
|
|
1668
|
-
*
|
|
2267
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
1669
2268
|
*
|
|
1670
2269
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
2270
|
+
|
|
2271
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
1671
2272
|
* @param options - Optional component settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
1672
2273
|
* @returns This builder instance for method chaining.
|
|
1673
2274
|
*/
|
|
@@ -1678,9 +2279,11 @@ export class UiContainerBuilder {
|
|
|
1678
2279
|
* Appends a `MarkdownBlockElement` component.
|
|
1679
2280
|
*
|
|
1680
2281
|
* @remarks
|
|
1681
|
-
*
|
|
2282
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
1682
2283
|
*
|
|
1683
2284
|
* @param content - Raw Markdown markup content
|
|
2285
|
+
|
|
2286
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
1684
2287
|
* @param options - Optional component settings (modifiers).
|
|
1685
2288
|
* @returns This builder instance for method chaining.
|
|
1686
2289
|
*/
|
|
@@ -1691,9 +2294,11 @@ export class UiContainerBuilder {
|
|
|
1691
2294
|
* Appends a `MarkdownBlockElement` component.
|
|
1692
2295
|
*
|
|
1693
2296
|
* @remarks
|
|
1694
|
-
*
|
|
2297
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
1695
2298
|
*
|
|
1696
2299
|
* @param content - Raw Markdown markup content
|
|
2300
|
+
|
|
2301
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
1697
2302
|
* @param options - Optional component settings (modifiers).
|
|
1698
2303
|
* @returns This builder instance for method chaining.
|
|
1699
2304
|
*/
|
|
@@ -1704,9 +2309,11 @@ export class UiContainerBuilder {
|
|
|
1704
2309
|
* Appends a `HtmlBlockElement` component.
|
|
1705
2310
|
*
|
|
1706
2311
|
* @remarks
|
|
1707
|
-
*
|
|
2312
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
1708
2313
|
*
|
|
1709
2314
|
* @param content - Raw HTML markup content
|
|
2315
|
+
|
|
2316
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
1710
2317
|
* @param options - Optional component settings (modifiers).
|
|
1711
2318
|
* @returns This builder instance for method chaining.
|
|
1712
2319
|
*/
|
|
@@ -1717,9 +2324,11 @@ export class UiContainerBuilder {
|
|
|
1717
2324
|
* Appends a `HtmlBlockElement` component.
|
|
1718
2325
|
*
|
|
1719
2326
|
* @remarks
|
|
1720
|
-
*
|
|
2327
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
1721
2328
|
*
|
|
1722
2329
|
* @param content - Raw HTML markup content
|
|
2330
|
+
|
|
2331
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
1723
2332
|
* @param options - Optional component settings (modifiers).
|
|
1724
2333
|
* @returns This builder instance for method chaining.
|
|
1725
2334
|
*/
|
|
@@ -1730,38 +2339,43 @@ export class UiContainerBuilder {
|
|
|
1730
2339
|
* Appends a `MultiSlotElement` component.
|
|
1731
2340
|
*
|
|
1732
2341
|
* @remarks
|
|
1733
|
-
*
|
|
1734
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2342
|
+
* Use this layout when a row needs explicit regions with independently controlled widths. Each slot contains one child element; unlike FlowingElement, the layout does not automatically wrap a sequence of children.
|
|
1735
2343
|
*
|
|
1736
2344
|
* @param slots - List of slots comprising the row
|
|
1737
|
-
|
|
2345
|
+
|
|
2346
|
+
Ordered slots in the row. Each slot's width is a percentage; arrange slot definitions in the intended visual order.
|
|
1738
2347
|
* @returns This builder instance for method chaining.
|
|
1739
2348
|
*/
|
|
1740
|
-
addMultiSlot(slots
|
|
1741
|
-
return this.add(multiSlot(slots
|
|
2349
|
+
addMultiSlot(slots) {
|
|
2350
|
+
return this.add(multiSlot(slots));
|
|
1742
2351
|
}
|
|
1743
2352
|
/**
|
|
1744
2353
|
* Appends a `FlowingElement` component.
|
|
1745
2354
|
*
|
|
1746
2355
|
* @remarks
|
|
1747
|
-
*
|
|
1748
|
-
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
2356
|
+
* Use for compact related values that should flow horizontally and wrap naturally at the available width. Child order is preserved; an optional separator is placed between neighboring children.
|
|
1749
2357
|
*
|
|
1750
2358
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
2359
|
+
|
|
2360
|
+
Ordered children rendered in the flow. The client wraps them as needed rather than requiring callers to calculate line breaks.
|
|
2361
|
+
* @param options - Optional component settings (separator).
|
|
1751
2362
|
* @returns This builder instance for method chaining.
|
|
1752
2363
|
*/
|
|
1753
|
-
addFlowing(elements) {
|
|
1754
|
-
return this.add(flowing(elements));
|
|
2364
|
+
addFlowing(elements, options) {
|
|
2365
|
+
return this.add(flowing(elements, options));
|
|
1755
2366
|
}
|
|
1756
2367
|
/**
|
|
1757
2368
|
* Appends a `LabelValueElement` component.
|
|
1758
2369
|
*
|
|
1759
2370
|
* @remarks
|
|
1760
|
-
*
|
|
1761
|
-
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
2371
|
+
* Represents one named value with a muted left-hand label and a right-hand visual element. Use it for a single field; use TableElement for repeated rows or column-aligned data.
|
|
1762
2372
|
*
|
|
1763
2373
|
* @param label - Key or descriptive label displayed muted on the left
|
|
2374
|
+
|
|
2375
|
+
Human-readable name for the value. This text is rendered as the row label rather than as a separate UiElement.
|
|
1764
2376
|
* @param value - Rendered value element on the right
|
|
2377
|
+
|
|
2378
|
+
Value content rendered in the right-hand region. It may be a primitive or a nested structural element.
|
|
1765
2379
|
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
1766
2380
|
* @returns This builder instance for method chaining.
|
|
1767
2381
|
*/
|
|
@@ -1772,11 +2386,12 @@ export class UiContainerBuilder {
|
|
|
1772
2386
|
* Appends a `TableElement` component.
|
|
1773
2387
|
*
|
|
1774
2388
|
* @remarks
|
|
1775
|
-
*
|
|
1776
|
-
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
2389
|
+
* Use for data that benefits from aligned rows and columns, including key/value and multi-column tables. Supply rows in display order; explicit columns are optional, and divider/striping flags independently control visual separators and alternating backgrounds.
|
|
1777
2390
|
*
|
|
1778
2391
|
* @param rows - Tabular data rows
|
|
1779
|
-
|
|
2392
|
+
|
|
2393
|
+
Ordered table rows. Each row's cells correspond positionally to the declared columns.
|
|
2394
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1780
2395
|
* @returns This builder instance for method chaining.
|
|
1781
2396
|
*/
|
|
1782
2397
|
addTable(rows, options) {
|
|
@@ -1786,9 +2401,11 @@ export class UiContainerBuilder {
|
|
|
1786
2401
|
* Appends a `RepeatingGroupElement` component.
|
|
1787
2402
|
*
|
|
1788
2403
|
* @remarks
|
|
1789
|
-
*
|
|
2404
|
+
* Groups a sequence of labeled entries under one optional section title. Use it when records have the same general presentation but need their own labels.
|
|
1790
2405
|
*
|
|
1791
2406
|
* @param entries - List of repeated entry records
|
|
2407
|
+
|
|
2408
|
+
Entries in display order. Each entry supplies its own label and content.
|
|
1792
2409
|
* @param options - Optional component settings (title).
|
|
1793
2410
|
* @returns This builder instance for method chaining.
|
|
1794
2411
|
*/
|
|
@@ -1799,10 +2416,14 @@ export class UiContainerBuilder {
|
|
|
1799
2416
|
* Appends a `CollapsibleGroupElement` component.
|
|
1800
2417
|
*
|
|
1801
2418
|
* @remarks
|
|
1802
|
-
*
|
|
2419
|
+
* Groups nested content behind a disclosure control. The title names the group, summary can provide a compact status indicator, and defaultExpanded controls only the initial state.
|
|
1803
2420
|
*
|
|
1804
2421
|
* @param title - Group title (e.g. "Show specimen details")
|
|
2422
|
+
|
|
2423
|
+
Text shown on the disclosure control. Use a concise action or section name that remains meaningful while the content is collapsed.
|
|
1805
2424
|
* @param elements - Nested content elements revealed when expanded
|
|
2425
|
+
|
|
2426
|
+
Ordered child elements made visible by expanding the group.
|
|
1806
2427
|
* @param options - Optional component settings (summary, defaultExpanded (defaults to `false`)).
|
|
1807
2428
|
* @returns This builder instance for method chaining.
|
|
1808
2429
|
*/
|
|
@@ -1813,7 +2434,7 @@ export class UiContainerBuilder {
|
|
|
1813
2434
|
* Appends a `DividerElement` component.
|
|
1814
2435
|
*
|
|
1815
2436
|
* @remarks
|
|
1816
|
-
*
|
|
2437
|
+
* A standalone visual separator for dividing adjacent sections or element groups. Use the divider flags on tables or rows when the separator is part of that structure.
|
|
1817
2438
|
*
|
|
1818
2439
|
* @param options - Optional component settings (style (defaults to `hairline`)).
|
|
1819
2440
|
* @returns This builder instance for method chaining.
|
|
@@ -1887,7 +2508,7 @@ export const UiContainer = {
|
|
|
1887
2508
|
* Functional helper to create a `UiContainerClass` instance directly.
|
|
1888
2509
|
*
|
|
1889
2510
|
* @remarks
|
|
1890
|
-
*
|
|
2511
|
+
* Provides the shared root content collection inherited by cards and other root models. The order of elements is significant and is preserved by the renderer.
|
|
1891
2512
|
*
|
|
1892
2513
|
* @param options - Optional configuration properties.
|
|
1893
2514
|
* @returns A strongly-typed `UiContainerClass` instance.
|
|
@@ -1899,7 +2520,7 @@ export function createUiContainer(options) {
|
|
|
1899
2520
|
* Parses a JSON string or raw object into a validated `UiContainerClass` instance.
|
|
1900
2521
|
*
|
|
1901
2522
|
* @remarks
|
|
1902
|
-
*
|
|
2523
|
+
* Provides the shared root content collection inherited by cards and other root models. The order of elements is significant and is preserved by the renderer.
|
|
1903
2524
|
*
|
|
1904
2525
|
* @param json - JSON string or parsed JavaScript object to validate and hydrate.
|
|
1905
2526
|
* @param withDeepValidation - Whether to recursively validate all nested child entities.
|
|
@@ -1912,8 +2533,7 @@ export function parseUiContainer(json, withDeepValidation = true) {
|
|
|
1912
2533
|
* Fluent builder for constructing strongly-typed `UiCard` instances.
|
|
1913
2534
|
*
|
|
1914
2535
|
* @remarks
|
|
1915
|
-
*
|
|
1916
|
-
* Represents a complete feature card rendered inside the 360px panel.
|
|
2536
|
+
* A complete card has a required title and ordered content inherited from UiContainer. It is designed for the feature-card surface; description and actions supplement the content, with action controls rendered separately from the element list.
|
|
1917
2537
|
*/
|
|
1918
2538
|
export class UiCardBuilder {
|
|
1919
2539
|
_title;
|
|
@@ -1924,6 +2544,8 @@ export class UiCardBuilder {
|
|
|
1924
2544
|
* Initializes a new `UiCardBuilder`.
|
|
1925
2545
|
*
|
|
1926
2546
|
* @param title - Human-readable feature title displayed in the card header
|
|
2547
|
+
|
|
2548
|
+
Primary heading for the card. Keep it concise enough for the card header; longer explanatory text belongs in description or elements.
|
|
1927
2549
|
*/
|
|
1928
2550
|
constructor(title) {
|
|
1929
2551
|
this._title = title;
|
|
@@ -1932,6 +2554,8 @@ export class UiCardBuilder {
|
|
|
1932
2554
|
* Sets the `description` property on this builder.
|
|
1933
2555
|
*
|
|
1934
2556
|
* @param description - Optional neutral subtitle / description for the feature
|
|
2557
|
+
|
|
2558
|
+
Brief secondary context shown with the title. Use the content elements for detailed information rather than placing an entire report in this field.
|
|
1935
2559
|
* @returns This builder instance for method chaining.
|
|
1936
2560
|
*/
|
|
1937
2561
|
description(description) {
|
|
@@ -1979,39 +2603,44 @@ export class UiCardBuilder {
|
|
|
1979
2603
|
return this;
|
|
1980
2604
|
}
|
|
1981
2605
|
/**
|
|
1982
|
-
* Appends a `
|
|
2606
|
+
* Appends a `StringElement` component.
|
|
1983
2607
|
*
|
|
1984
2608
|
* @remarks
|
|
1985
|
-
*
|
|
1986
|
-
* Supports plain text or compact chip pill presentation.
|
|
2609
|
+
* Use this primitive for one textual value when a structured label/value row is unnecessary. Choose multiline for content whose line breaks should remain visible; modifiers apply presentation traits without changing the underlying value.
|
|
1987
2610
|
*
|
|
1988
2611
|
* @param value - Text value
|
|
2612
|
+
|
|
2613
|
+
Text to render. Supply plain text; this field is not a Markdown or HTML document.
|
|
1989
2614
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1990
2615
|
* @returns This builder instance for method chaining.
|
|
1991
2616
|
*/
|
|
1992
|
-
|
|
1993
|
-
return this.add(
|
|
2617
|
+
addString(value, options) {
|
|
2618
|
+
return this.add(string(value, options));
|
|
1994
2619
|
}
|
|
1995
2620
|
/**
|
|
1996
|
-
* Appends a `
|
|
2621
|
+
* Appends a `StringsElement` component.
|
|
1997
2622
|
*
|
|
1998
2623
|
* @remarks
|
|
1999
|
-
*
|
|
2624
|
+
* Use this primitive when several related strings should be rendered as one compact sequence. The client preserves the array order and inserts the selected separator between values.
|
|
2000
2625
|
*
|
|
2001
|
-
* @param
|
|
2002
|
-
|
|
2626
|
+
* @param values - Array of string values
|
|
2627
|
+
|
|
2628
|
+
Values to render in order. Each array entry remains a distinct item for chip presentation and is not parsed as a delimited string.
|
|
2629
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
2003
2630
|
* @returns This builder instance for method chaining.
|
|
2004
2631
|
*/
|
|
2005
|
-
|
|
2006
|
-
return this.add(
|
|
2632
|
+
addStrings(values, options) {
|
|
2633
|
+
return this.add(strings(values, options));
|
|
2007
2634
|
}
|
|
2008
2635
|
/**
|
|
2009
2636
|
* Appends a `StringCodeElement` component.
|
|
2010
2637
|
*
|
|
2011
2638
|
* @remarks
|
|
2012
|
-
*
|
|
2639
|
+
* Use for source-like or preformatted textual content that should be rendered in a code-oriented style. The language is a presentation hint; the content is not parsed or validated as code by this contract.
|
|
2013
2640
|
*
|
|
2014
2641
|
* @param value - Text value
|
|
2642
|
+
|
|
2643
|
+
Code or text snippet to display. Include any desired line breaks in this string.
|
|
2015
2644
|
* @param options - Optional component settings (language, modifiers).
|
|
2016
2645
|
* @returns This builder instance for method chaining.
|
|
2017
2646
|
*/
|
|
@@ -2022,9 +2651,11 @@ export class UiCardBuilder {
|
|
|
2022
2651
|
* Appends a `XmlElement` component.
|
|
2023
2652
|
*
|
|
2024
2653
|
* @remarks
|
|
2025
|
-
* XML
|
|
2654
|
+
* Specialized code-oriented element for XML content. It uses the custom XML renderer rather than requiring consumers to construct a generic code block.
|
|
2026
2655
|
*
|
|
2027
2656
|
* @param value - XML content value
|
|
2657
|
+
|
|
2658
|
+
XML markup to render. The contract carries the source text; it does not guarantee that the document is well-formed.
|
|
2028
2659
|
* @param options - Optional component settings (modifiers).
|
|
2029
2660
|
* @returns This builder instance for method chaining.
|
|
2030
2661
|
*/
|
|
@@ -2035,9 +2666,11 @@ export class UiCardBuilder {
|
|
|
2035
2666
|
* Appends a `JsonElement` component.
|
|
2036
2667
|
*
|
|
2037
2668
|
* @remarks
|
|
2038
|
-
* JSON
|
|
2669
|
+
* Specialized representation for JSON text. Supply serialized JSON when consumers should display a JSON document; this field is a string and is not structurally validated here.
|
|
2039
2670
|
*
|
|
2040
2671
|
* @param value - JSON content value
|
|
2672
|
+
|
|
2673
|
+
Serialized JSON text to render. No parsing or schema validation is implied by this element.
|
|
2041
2674
|
* @param options - Optional component settings (modifiers).
|
|
2042
2675
|
* @returns This builder instance for method chaining.
|
|
2043
2676
|
*/
|
|
@@ -2048,9 +2681,11 @@ export class UiCardBuilder {
|
|
|
2048
2681
|
* Appends a `StringUrlElement` component.
|
|
2049
2682
|
*
|
|
2050
2683
|
* @remarks
|
|
2051
|
-
*
|
|
2684
|
+
* Use this element when displayed text should also behave as a link. Unlike StringElement, the value is a navigation destination and may be paired with a separate human-readable label.
|
|
2052
2685
|
*
|
|
2053
2686
|
* @param value - Target URL or navigation destination
|
|
2687
|
+
|
|
2688
|
+
Destination associated with the link. Supply a URL or client-recognized navigation target supported by the renderer.
|
|
2054
2689
|
* @param options - Optional component settings (label, modifiers).
|
|
2055
2690
|
* @returns This builder instance for method chaining.
|
|
2056
2691
|
*/
|
|
@@ -2061,9 +2696,11 @@ export class UiCardBuilder {
|
|
|
2061
2696
|
* Appends a `IdentifierElement` component.
|
|
2062
2697
|
*
|
|
2063
2698
|
* @remarks
|
|
2064
|
-
*
|
|
2699
|
+
* Use for identifiers, hashes, and other machine-oriented strings that benefit from monospace styling. The value remains text and is not resolved as a Picteus entity.
|
|
2065
2700
|
*
|
|
2066
2701
|
* @param value - Identifier string value
|
|
2702
|
+
|
|
2703
|
+
Identifier text to display, such as an opaque ID or hash. Avoid embedding presentation markup in the value.
|
|
2067
2704
|
* @param options - Optional component settings (modifiers).
|
|
2068
2705
|
* @returns This builder instance for method chaining.
|
|
2069
2706
|
*/
|
|
@@ -2074,22 +2711,44 @@ export class UiCardBuilder {
|
|
|
2074
2711
|
* Appends a `RatioElement` component.
|
|
2075
2712
|
*
|
|
2076
2713
|
* @remarks
|
|
2077
|
-
*
|
|
2714
|
+
* Displays a numeric aspect ratio as a ratio expression. Provide a positive value meaningful to the surrounding content; this type does not encode the source image dimensions.
|
|
2078
2715
|
*
|
|
2079
2716
|
* @param value - Aspect ratio numerical expression
|
|
2717
|
+
|
|
2718
|
+
Numeric ratio value used by the renderer to produce an aspect-ratio display.
|
|
2080
2719
|
* @param options - Optional component settings (modifiers).
|
|
2081
2720
|
* @returns This builder instance for method chaining.
|
|
2082
2721
|
*/
|
|
2083
2722
|
addRatio(value, options) {
|
|
2084
2723
|
return this.add(ratio(value, options));
|
|
2085
2724
|
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Appends a `DimensionsElement` component.
|
|
2727
|
+
*
|
|
2728
|
+
* @remarks
|
|
2729
|
+
* Displays a width/height pair as image dimensions. Both values are positive pixel counts; together they describe dimensions, not an aspect ratio or a resize request.
|
|
2730
|
+
*
|
|
2731
|
+
* @param width - Width in pixels
|
|
2732
|
+
|
|
2733
|
+
Horizontal pixel count. Values below one are rejected by the schema constraint.
|
|
2734
|
+
* @param height - Height in pixels
|
|
2735
|
+
|
|
2736
|
+
Vertical pixel count. Values below one are rejected by the schema constraint.
|
|
2737
|
+
* @param options - Optional component settings (modifiers).
|
|
2738
|
+
* @returns This builder instance for method chaining.
|
|
2739
|
+
*/
|
|
2740
|
+
addDimensions(width, height, options) {
|
|
2741
|
+
return this.add(dimensions(width, height, options));
|
|
2742
|
+
}
|
|
2086
2743
|
/**
|
|
2087
2744
|
* Appends a `ColourElement` component.
|
|
2088
2745
|
*
|
|
2089
2746
|
* @remarks
|
|
2090
|
-
*
|
|
2747
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
2091
2748
|
*
|
|
2092
2749
|
* @param value - Hexadecimal color code
|
|
2750
|
+
|
|
2751
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
2093
2752
|
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2094
2753
|
* @returns This builder instance for method chaining.
|
|
2095
2754
|
*/
|
|
@@ -2100,9 +2759,11 @@ export class UiCardBuilder {
|
|
|
2100
2759
|
* Appends a `ColourElement` component.
|
|
2101
2760
|
*
|
|
2102
2761
|
* @remarks
|
|
2103
|
-
*
|
|
2762
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
2104
2763
|
*
|
|
2105
2764
|
* @param value - Hexadecimal color code
|
|
2765
|
+
|
|
2766
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
2106
2767
|
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2107
2768
|
* @returns This builder instance for method chaining.
|
|
2108
2769
|
*/
|
|
@@ -2113,9 +2774,11 @@ export class UiCardBuilder {
|
|
|
2113
2774
|
* Appends a `NumberUnboundedElement` component.
|
|
2114
2775
|
*
|
|
2115
2776
|
* @remarks
|
|
2116
|
-
*
|
|
2777
|
+
* Displays a numeric value without a progress scale or rating interpretation. Use unit to communicate the measurement context; no range is imposed by this model.
|
|
2117
2778
|
*
|
|
2118
2779
|
* @param value - Numeric value
|
|
2780
|
+
|
|
2781
|
+
Number to display. Its meaning and any valid range are defined by the producing feature.
|
|
2119
2782
|
* @param options - Optional component settings (unit, modifiers).
|
|
2120
2783
|
* @returns This builder instance for method chaining.
|
|
2121
2784
|
*/
|
|
@@ -2126,9 +2789,11 @@ export class UiCardBuilder {
|
|
|
2126
2789
|
* Appends a `NumberBoundedStarsElement` component.
|
|
2127
2790
|
*
|
|
2128
2791
|
* @remarks
|
|
2129
|
-
*
|
|
2792
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
2130
2793
|
*
|
|
2131
2794
|
* @param value - Numeric rating score
|
|
2795
|
+
|
|
2796
|
+
Score represented by the filled portion of the star display.
|
|
2132
2797
|
* @param options - Optional component settings (maximum, modifiers).
|
|
2133
2798
|
* @returns This builder instance for method chaining.
|
|
2134
2799
|
*/
|
|
@@ -2139,9 +2804,11 @@ export class UiCardBuilder {
|
|
|
2139
2804
|
* Appends a `NumberBoundedStarsElement` component.
|
|
2140
2805
|
*
|
|
2141
2806
|
* @remarks
|
|
2142
|
-
*
|
|
2807
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
2143
2808
|
*
|
|
2144
2809
|
* @param value - Numeric rating score
|
|
2810
|
+
|
|
2811
|
+
Score represented by the filled portion of the star display.
|
|
2145
2812
|
* @param options - Optional component settings (maximum, modifiers).
|
|
2146
2813
|
* @returns This builder instance for method chaining.
|
|
2147
2814
|
*/
|
|
@@ -2152,9 +2819,11 @@ export class UiCardBuilder {
|
|
|
2152
2819
|
* Appends a `NumberBoundedMeterElement` component.
|
|
2153
2820
|
*
|
|
2154
2821
|
* @remarks
|
|
2155
|
-
*
|
|
2822
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
2156
2823
|
*
|
|
2157
2824
|
* @param value - Numeric value
|
|
2825
|
+
|
|
2826
|
+
Current measurement or score represented by the meter.
|
|
2158
2827
|
* @param options - Optional component settings (minimum, maximum, label, unit, modifiers).
|
|
2159
2828
|
* @returns This builder instance for method chaining.
|
|
2160
2829
|
*/
|
|
@@ -2165,9 +2834,11 @@ export class UiCardBuilder {
|
|
|
2165
2834
|
* Appends a `NumberBoundedMeterElement` component.
|
|
2166
2835
|
*
|
|
2167
2836
|
* @remarks
|
|
2168
|
-
*
|
|
2837
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
2169
2838
|
*
|
|
2170
2839
|
* @param value - Numeric value
|
|
2840
|
+
|
|
2841
|
+
Current measurement or score represented by the meter.
|
|
2171
2842
|
* @param options - Optional component settings (minimum, maximum, label, unit, modifiers).
|
|
2172
2843
|
* @returns This builder instance for method chaining.
|
|
2173
2844
|
*/
|
|
@@ -2175,38 +2846,29 @@ export class UiCardBuilder {
|
|
|
2175
2846
|
return this.add(numberMeter(value, options));
|
|
2176
2847
|
}
|
|
2177
2848
|
/**
|
|
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.
|
|
2849
|
+
* Appends a `BooleanElement` component.
|
|
2192
2850
|
*
|
|
2193
2851
|
* @remarks
|
|
2194
|
-
*
|
|
2852
|
+
* Displays a boolean state using text or a badge. The representation determines whether true/false labels or a colored badge are used; configured labels and variant are presentation choices only.
|
|
2195
2853
|
*
|
|
2196
2854
|
* @param value - Boolean state value
|
|
2197
|
-
|
|
2855
|
+
|
|
2856
|
+
State to display. This remains a boolean value in the data model even when the renderer substitutes custom labels.
|
|
2857
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2198
2858
|
* @returns This builder instance for method chaining.
|
|
2199
2859
|
*/
|
|
2200
|
-
|
|
2201
|
-
return this.add(
|
|
2860
|
+
addBoolean(value, options) {
|
|
2861
|
+
return this.add(boolean(value, options));
|
|
2202
2862
|
}
|
|
2203
2863
|
/**
|
|
2204
2864
|
* Appends a `TimestampElement` component.
|
|
2205
2865
|
*
|
|
2206
2866
|
* @remarks
|
|
2207
|
-
*
|
|
2867
|
+
* Displays an epoch timestamp using a selected date/time format. The input is a count of milliseconds, not seconds; relative formatting is interpreted by the consumer.
|
|
2208
2868
|
*
|
|
2209
2869
|
* @param value - The timestamp in milliseconds
|
|
2870
|
+
|
|
2871
|
+
Unix epoch timestamp measured in milliseconds. Convert seconds-based timestamps before assigning this value.
|
|
2210
2872
|
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
2211
2873
|
* @returns This builder instance for method chaining.
|
|
2212
2874
|
*/
|
|
@@ -2217,9 +2879,11 @@ export class UiCardBuilder {
|
|
|
2217
2879
|
* Appends a `ImageReferenceElement` component.
|
|
2218
2880
|
*
|
|
2219
2881
|
* @remarks
|
|
2220
|
-
*
|
|
2882
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
2221
2883
|
*
|
|
2222
2884
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
2885
|
+
|
|
2886
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
2223
2887
|
* @param options - Optional component settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
2224
2888
|
* @returns This builder instance for method chaining.
|
|
2225
2889
|
*/
|
|
@@ -2230,9 +2894,11 @@ export class UiCardBuilder {
|
|
|
2230
2894
|
* Appends a `ImageReferenceElement` component.
|
|
2231
2895
|
*
|
|
2232
2896
|
* @remarks
|
|
2233
|
-
*
|
|
2897
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
2234
2898
|
*
|
|
2235
2899
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
2900
|
+
|
|
2901
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
2236
2902
|
* @param options - Optional component settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
2237
2903
|
* @returns This builder instance for method chaining.
|
|
2238
2904
|
*/
|
|
@@ -2243,9 +2909,11 @@ export class UiCardBuilder {
|
|
|
2243
2909
|
* Appends a `MarkdownBlockElement` component.
|
|
2244
2910
|
*
|
|
2245
2911
|
* @remarks
|
|
2246
|
-
*
|
|
2912
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
2247
2913
|
*
|
|
2248
2914
|
* @param content - Raw Markdown markup content
|
|
2915
|
+
|
|
2916
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
2249
2917
|
* @param options - Optional component settings (modifiers).
|
|
2250
2918
|
* @returns This builder instance for method chaining.
|
|
2251
2919
|
*/
|
|
@@ -2256,9 +2924,11 @@ export class UiCardBuilder {
|
|
|
2256
2924
|
* Appends a `MarkdownBlockElement` component.
|
|
2257
2925
|
*
|
|
2258
2926
|
* @remarks
|
|
2259
|
-
*
|
|
2927
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
2260
2928
|
*
|
|
2261
2929
|
* @param content - Raw Markdown markup content
|
|
2930
|
+
|
|
2931
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
2262
2932
|
* @param options - Optional component settings (modifiers).
|
|
2263
2933
|
* @returns This builder instance for method chaining.
|
|
2264
2934
|
*/
|
|
@@ -2269,9 +2939,11 @@ export class UiCardBuilder {
|
|
|
2269
2939
|
* Appends a `HtmlBlockElement` component.
|
|
2270
2940
|
*
|
|
2271
2941
|
* @remarks
|
|
2272
|
-
*
|
|
2942
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
2273
2943
|
*
|
|
2274
2944
|
* @param content - Raw HTML markup content
|
|
2945
|
+
|
|
2946
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
2275
2947
|
* @param options - Optional component settings (modifiers).
|
|
2276
2948
|
* @returns This builder instance for method chaining.
|
|
2277
2949
|
*/
|
|
@@ -2282,9 +2954,11 @@ export class UiCardBuilder {
|
|
|
2282
2954
|
* Appends a `HtmlBlockElement` component.
|
|
2283
2955
|
*
|
|
2284
2956
|
* @remarks
|
|
2285
|
-
*
|
|
2957
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
2286
2958
|
*
|
|
2287
2959
|
* @param content - Raw HTML markup content
|
|
2960
|
+
|
|
2961
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
2288
2962
|
* @param options - Optional component settings (modifiers).
|
|
2289
2963
|
* @returns This builder instance for method chaining.
|
|
2290
2964
|
*/
|
|
@@ -2295,38 +2969,43 @@ export class UiCardBuilder {
|
|
|
2295
2969
|
* Appends a `MultiSlotElement` component.
|
|
2296
2970
|
*
|
|
2297
2971
|
* @remarks
|
|
2298
|
-
*
|
|
2299
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2972
|
+
* Use this layout when a row needs explicit regions with independently controlled widths. Each slot contains one child element; unlike FlowingElement, the layout does not automatically wrap a sequence of children.
|
|
2300
2973
|
*
|
|
2301
2974
|
* @param slots - List of slots comprising the row
|
|
2302
|
-
|
|
2975
|
+
|
|
2976
|
+
Ordered slots in the row. Each slot's width is a percentage; arrange slot definitions in the intended visual order.
|
|
2303
2977
|
* @returns This builder instance for method chaining.
|
|
2304
2978
|
*/
|
|
2305
|
-
addMultiSlot(slots
|
|
2306
|
-
return this.add(multiSlot(slots
|
|
2979
|
+
addMultiSlot(slots) {
|
|
2980
|
+
return this.add(multiSlot(slots));
|
|
2307
2981
|
}
|
|
2308
2982
|
/**
|
|
2309
2983
|
* Appends a `FlowingElement` component.
|
|
2310
2984
|
*
|
|
2311
2985
|
* @remarks
|
|
2312
|
-
*
|
|
2313
|
-
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
2986
|
+
* Use for compact related values that should flow horizontally and wrap naturally at the available width. Child order is preserved; an optional separator is placed between neighboring children.
|
|
2314
2987
|
*
|
|
2315
2988
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
2989
|
+
|
|
2990
|
+
Ordered children rendered in the flow. The client wraps them as needed rather than requiring callers to calculate line breaks.
|
|
2991
|
+
* @param options - Optional component settings (separator).
|
|
2316
2992
|
* @returns This builder instance for method chaining.
|
|
2317
2993
|
*/
|
|
2318
|
-
addFlowing(elements) {
|
|
2319
|
-
return this.add(flowing(elements));
|
|
2994
|
+
addFlowing(elements, options) {
|
|
2995
|
+
return this.add(flowing(elements, options));
|
|
2320
2996
|
}
|
|
2321
2997
|
/**
|
|
2322
2998
|
* Appends a `LabelValueElement` component.
|
|
2323
2999
|
*
|
|
2324
3000
|
* @remarks
|
|
2325
|
-
*
|
|
2326
|
-
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
3001
|
+
* Represents one named value with a muted left-hand label and a right-hand visual element. Use it for a single field; use TableElement for repeated rows or column-aligned data.
|
|
2327
3002
|
*
|
|
2328
3003
|
* @param label - Key or descriptive label displayed muted on the left
|
|
3004
|
+
|
|
3005
|
+
Human-readable name for the value. This text is rendered as the row label rather than as a separate UiElement.
|
|
2329
3006
|
* @param value - Rendered value element on the right
|
|
3007
|
+
|
|
3008
|
+
Value content rendered in the right-hand region. It may be a primitive or a nested structural element.
|
|
2330
3009
|
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
2331
3010
|
* @returns This builder instance for method chaining.
|
|
2332
3011
|
*/
|
|
@@ -2337,11 +3016,12 @@ export class UiCardBuilder {
|
|
|
2337
3016
|
* Appends a `TableElement` component.
|
|
2338
3017
|
*
|
|
2339
3018
|
* @remarks
|
|
2340
|
-
*
|
|
2341
|
-
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
3019
|
+
* Use for data that benefits from aligned rows and columns, including key/value and multi-column tables. Supply rows in display order; explicit columns are optional, and divider/striping flags independently control visual separators and alternating backgrounds.
|
|
2342
3020
|
*
|
|
2343
3021
|
* @param rows - Tabular data rows
|
|
2344
|
-
|
|
3022
|
+
|
|
3023
|
+
Ordered table rows. Each row's cells correspond positionally to the declared columns.
|
|
3024
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
2345
3025
|
* @returns This builder instance for method chaining.
|
|
2346
3026
|
*/
|
|
2347
3027
|
addTable(rows, options) {
|
|
@@ -2351,9 +3031,11 @@ export class UiCardBuilder {
|
|
|
2351
3031
|
* Appends a `RepeatingGroupElement` component.
|
|
2352
3032
|
*
|
|
2353
3033
|
* @remarks
|
|
2354
|
-
*
|
|
3034
|
+
* Groups a sequence of labeled entries under one optional section title. Use it when records have the same general presentation but need their own labels.
|
|
2355
3035
|
*
|
|
2356
3036
|
* @param entries - List of repeated entry records
|
|
3037
|
+
|
|
3038
|
+
Entries in display order. Each entry supplies its own label and content.
|
|
2357
3039
|
* @param options - Optional component settings (title).
|
|
2358
3040
|
* @returns This builder instance for method chaining.
|
|
2359
3041
|
*/
|
|
@@ -2364,10 +3046,14 @@ export class UiCardBuilder {
|
|
|
2364
3046
|
* Appends a `CollapsibleGroupElement` component.
|
|
2365
3047
|
*
|
|
2366
3048
|
* @remarks
|
|
2367
|
-
*
|
|
3049
|
+
* Groups nested content behind a disclosure control. The title names the group, summary can provide a compact status indicator, and defaultExpanded controls only the initial state.
|
|
2368
3050
|
*
|
|
2369
3051
|
* @param title - Group title (e.g. "Show specimen details")
|
|
3052
|
+
|
|
3053
|
+
Text shown on the disclosure control. Use a concise action or section name that remains meaningful while the content is collapsed.
|
|
2370
3054
|
* @param elements - Nested content elements revealed when expanded
|
|
3055
|
+
|
|
3056
|
+
Ordered child elements made visible by expanding the group.
|
|
2371
3057
|
* @param options - Optional component settings (summary, defaultExpanded (defaults to `false`)).
|
|
2372
3058
|
* @returns This builder instance for method chaining.
|
|
2373
3059
|
*/
|
|
@@ -2378,7 +3064,7 @@ export class UiCardBuilder {
|
|
|
2378
3064
|
* Appends a `DividerElement` component.
|
|
2379
3065
|
*
|
|
2380
3066
|
* @remarks
|
|
2381
|
-
*
|
|
3067
|
+
* A standalone visual separator for dividing adjacent sections or element groups. Use the divider flags on tables or rows when the separator is part of that structure.
|
|
2382
3068
|
*
|
|
2383
3069
|
* @param options - Optional component settings (style (defaults to `hairline`)).
|
|
2384
3070
|
* @returns This builder instance for method chaining.
|
|
@@ -2420,6 +3106,8 @@ export const UiCard = {
|
|
|
2420
3106
|
* Creates a new fluent builder for constructing a `UiCard`.
|
|
2421
3107
|
*
|
|
2422
3108
|
* @param title - Human-readable feature title displayed in the card header
|
|
3109
|
+
|
|
3110
|
+
Primary heading for the card. Keep it concise enough for the card header; longer explanatory text belongs in description or elements.
|
|
2423
3111
|
* @returns A new `UiCardBuilder` instance.
|
|
2424
3112
|
*/
|
|
2425
3113
|
builder(title) {
|
|
@@ -2459,10 +3147,11 @@ export const UiCard = {
|
|
|
2459
3147
|
* Functional helper to create a `UiCardClass` instance directly.
|
|
2460
3148
|
*
|
|
2461
3149
|
* @remarks
|
|
2462
|
-
*
|
|
2463
|
-
* Represents a complete feature card rendered inside the 360px panel.
|
|
3150
|
+
* A complete card has a required title and ordered content inherited from UiContainer. It is designed for the feature-card surface; description and actions supplement the content, with action controls rendered separately from the element list.
|
|
2464
3151
|
*
|
|
2465
3152
|
* @param title - Human-readable feature title displayed in the card header
|
|
3153
|
+
|
|
3154
|
+
Primary heading for the card. Keep it concise enough for the card header; longer explanatory text belongs in description or elements.
|
|
2466
3155
|
* @param options - Optional configuration properties.
|
|
2467
3156
|
* @returns A strongly-typed `UiCardClass` instance.
|
|
2468
3157
|
*/
|
|
@@ -2476,8 +3165,7 @@ export function createUiCard(title, options) {
|
|
|
2476
3165
|
* Parses a JSON string or raw object into a validated `UiCardClass` instance.
|
|
2477
3166
|
*
|
|
2478
3167
|
* @remarks
|
|
2479
|
-
*
|
|
2480
|
-
* Represents a complete feature card rendered inside the 360px panel.
|
|
3168
|
+
* A complete card has a required title and ordered content inherited from UiContainer. It is designed for the feature-card surface; description and actions supplement the content, with action controls rendered separately from the element list.
|
|
2481
3169
|
*
|
|
2482
3170
|
* @param json - JSON string or parsed JavaScript object to validate and hydrate.
|
|
2483
3171
|
* @param withDeepValidation - Whether to recursively validate all nested child entities.
|
|
@@ -2491,9 +3179,11 @@ export function parseUiCard(json, withDeepValidation = true) {
|
|
|
2491
3179
|
* Creates a `TruncateOptions` component instance.
|
|
2492
3180
|
*
|
|
2493
3181
|
* @remarks
|
|
2494
|
-
*
|
|
3182
|
+
* Controls how a renderer abbreviates long text. The character limit is a presentation threshold rather than a validation limit; showMore lets the user reveal the remaining text.
|
|
2495
3183
|
*
|
|
2496
3184
|
* @param characterLimit - Maximum number of characters to display before truncating
|
|
3185
|
+
|
|
3186
|
+
Threshold after which the renderer can shorten the displayed text. This does not constrain the stored string or remove its undisplayed content.
|
|
2497
3187
|
* @param options - Optional settings (showMore (defaults to `true`)).
|
|
2498
3188
|
* @returns A strongly-typed `TruncateOptions` object.
|
|
2499
3189
|
*/
|
|
@@ -2507,7 +3197,7 @@ export function truncateOptions(characterLimit, options) {
|
|
|
2507
3197
|
* Creates a `BaseModifiers` component instance.
|
|
2508
3198
|
*
|
|
2509
3199
|
* @remarks
|
|
2510
|
-
*
|
|
3200
|
+
* Common optional presentation traits shared by primitive values and content renderers. Modifiers affect how content is displayed or copied; they do not transform the source value.
|
|
2511
3201
|
*
|
|
2512
3202
|
* @param options - Optional settings (copyable).
|
|
2513
3203
|
* @returns A strongly-typed `BaseModifiers` object.
|
|
@@ -2521,7 +3211,7 @@ export function baseModifiers(options) {
|
|
|
2521
3211
|
* Creates a `PrimitiveModifiers` component instance.
|
|
2522
3212
|
*
|
|
2523
3213
|
* @remarks
|
|
2524
|
-
*
|
|
3214
|
+
* Extends BaseModifiers with text styling controls. Defaults provide normal weight, medium intensity, and proportional text unless a feature explicitly overrides them.
|
|
2525
3215
|
*
|
|
2526
3216
|
* @param options - Optional settings (truncate, weight (defaults to `normal`), intensity (defaults to `medium`), monospace (defaults to `false`), copyable).
|
|
2527
3217
|
* @returns A strongly-typed `PrimitiveModifiers` object.
|
|
@@ -2536,38 +3226,43 @@ export function primitiveModifiers(options) {
|
|
|
2536
3226
|
};
|
|
2537
3227
|
}
|
|
2538
3228
|
/**
|
|
2539
|
-
* Creates a `
|
|
3229
|
+
* Creates a `StringElement` component instance.
|
|
2540
3230
|
*
|
|
2541
3231
|
* @remarks
|
|
2542
|
-
*
|
|
2543
|
-
* Supports plain text or compact chip pill presentation.
|
|
3232
|
+
* Use this primitive for one textual value when a structured label/value row is unnecessary. Choose multiline for content whose line breaks should remain visible; modifiers apply presentation traits without changing the underlying value.
|
|
2544
3233
|
*
|
|
2545
3234
|
* @param value - Text value
|
|
3235
|
+
|
|
3236
|
+
Text to render. Supply plain text; this field is not a Markdown or HTML document.
|
|
2546
3237
|
* @param options - Optional settings (representation (defaults to `plain`), modifiers).
|
|
2547
|
-
* @returns A strongly-typed `
|
|
3238
|
+
* @returns A strongly-typed `StringElement` object.
|
|
2548
3239
|
*/
|
|
2549
|
-
export function
|
|
3240
|
+
export function string(value, options) {
|
|
2550
3241
|
return {
|
|
2551
|
-
type: "string
|
|
3242
|
+
type: "string",
|
|
2552
3243
|
value,
|
|
2553
|
-
representation: options?.representation ??
|
|
3244
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
2554
3245
|
modifiers: options?.modifiers
|
|
2555
3246
|
};
|
|
2556
3247
|
}
|
|
2557
3248
|
/**
|
|
2558
|
-
* Creates a `
|
|
3249
|
+
* Creates a `StringsElement` component instance.
|
|
2559
3250
|
*
|
|
2560
3251
|
* @remarks
|
|
2561
|
-
*
|
|
3252
|
+
* Use this primitive when several related strings should be rendered as one compact sequence. The client preserves the array order and inserts the selected separator between values.
|
|
2562
3253
|
*
|
|
2563
|
-
* @param
|
|
2564
|
-
|
|
2565
|
-
|
|
3254
|
+
* @param values - Array of string values
|
|
3255
|
+
|
|
3256
|
+
Values to render in order. Each array entry remains a distinct item for chip presentation and is not parsed as a delimited string.
|
|
3257
|
+
* @param options - Optional settings (representation (defaults to `plain`), separator, modifiers).
|
|
3258
|
+
* @returns A strongly-typed `StringsElement` object.
|
|
2566
3259
|
*/
|
|
2567
|
-
export function
|
|
3260
|
+
export function strings(values, options) {
|
|
2568
3261
|
return {
|
|
2569
|
-
type: "
|
|
2570
|
-
|
|
3262
|
+
type: "strings",
|
|
3263
|
+
values: [...values],
|
|
3264
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
3265
|
+
separator: options?.separator,
|
|
2571
3266
|
modifiers: options?.modifiers
|
|
2572
3267
|
};
|
|
2573
3268
|
}
|
|
@@ -2575,9 +3270,11 @@ export function stringLong(value, options) {
|
|
|
2575
3270
|
* Creates a `StringCodeElement` component instance.
|
|
2576
3271
|
*
|
|
2577
3272
|
* @remarks
|
|
2578
|
-
*
|
|
3273
|
+
* Use for source-like or preformatted textual content that should be rendered in a code-oriented style. The language is a presentation hint; the content is not parsed or validated as code by this contract.
|
|
2579
3274
|
*
|
|
2580
3275
|
* @param value - Text value
|
|
3276
|
+
|
|
3277
|
+
Code or text snippet to display. Include any desired line breaks in this string.
|
|
2581
3278
|
* @param options - Optional settings (language, modifiers).
|
|
2582
3279
|
* @returns A strongly-typed `StringCodeElement` object.
|
|
2583
3280
|
*/
|
|
@@ -2593,9 +3290,11 @@ export function stringCode(value, options) {
|
|
|
2593
3290
|
* Creates a `XmlElement` component instance.
|
|
2594
3291
|
*
|
|
2595
3292
|
* @remarks
|
|
2596
|
-
* XML
|
|
3293
|
+
* Specialized code-oriented element for XML content. It uses the custom XML renderer rather than requiring consumers to construct a generic code block.
|
|
2597
3294
|
*
|
|
2598
3295
|
* @param value - XML content value
|
|
3296
|
+
|
|
3297
|
+
XML markup to render. The contract carries the source text; it does not guarantee that the document is well-formed.
|
|
2599
3298
|
* @param options - Optional settings (modifiers).
|
|
2600
3299
|
* @returns A strongly-typed `XmlElement` object.
|
|
2601
3300
|
*/
|
|
@@ -2610,9 +3309,11 @@ export function xml(value, options) {
|
|
|
2610
3309
|
* Creates a `JsonElement` component instance.
|
|
2611
3310
|
*
|
|
2612
3311
|
* @remarks
|
|
2613
|
-
* JSON
|
|
3312
|
+
* Specialized representation for JSON text. Supply serialized JSON when consumers should display a JSON document; this field is a string and is not structurally validated here.
|
|
2614
3313
|
*
|
|
2615
3314
|
* @param value - JSON content value
|
|
3315
|
+
|
|
3316
|
+
Serialized JSON text to render. No parsing or schema validation is implied by this element.
|
|
2616
3317
|
* @param options - Optional settings (modifiers).
|
|
2617
3318
|
* @returns A strongly-typed `JsonElement` object.
|
|
2618
3319
|
*/
|
|
@@ -2627,9 +3328,11 @@ export function json(value, options) {
|
|
|
2627
3328
|
* Creates a `StringUrlElement` component instance.
|
|
2628
3329
|
*
|
|
2629
3330
|
* @remarks
|
|
2630
|
-
*
|
|
3331
|
+
* Use this element when displayed text should also behave as a link. Unlike StringElement, the value is a navigation destination and may be paired with a separate human-readable label.
|
|
2631
3332
|
*
|
|
2632
3333
|
* @param value - Target URL or navigation destination
|
|
3334
|
+
|
|
3335
|
+
Destination associated with the link. Supply a URL or client-recognized navigation target supported by the renderer.
|
|
2633
3336
|
* @param options - Optional settings (label, modifiers).
|
|
2634
3337
|
* @returns A strongly-typed `StringUrlElement` object.
|
|
2635
3338
|
*/
|
|
@@ -2645,9 +3348,11 @@ export function stringUrl(value, options) {
|
|
|
2645
3348
|
* Creates a `IdentifierElement` component instance.
|
|
2646
3349
|
*
|
|
2647
3350
|
* @remarks
|
|
2648
|
-
*
|
|
3351
|
+
* Use for identifiers, hashes, and other machine-oriented strings that benefit from monospace styling. The value remains text and is not resolved as a Picteus entity.
|
|
2649
3352
|
*
|
|
2650
3353
|
* @param value - Identifier string value
|
|
3354
|
+
|
|
3355
|
+
Identifier text to display, such as an opaque ID or hash. Avoid embedding presentation markup in the value.
|
|
2651
3356
|
* @param options - Optional settings (modifiers).
|
|
2652
3357
|
* @returns A strongly-typed `IdentifierElement` object.
|
|
2653
3358
|
*/
|
|
@@ -2662,9 +3367,11 @@ export function identifier(value, options) {
|
|
|
2662
3367
|
* Creates a `RatioElement` component instance.
|
|
2663
3368
|
*
|
|
2664
3369
|
* @remarks
|
|
2665
|
-
*
|
|
3370
|
+
* Displays a numeric aspect ratio as a ratio expression. Provide a positive value meaningful to the surrounding content; this type does not encode the source image dimensions.
|
|
2666
3371
|
*
|
|
2667
3372
|
* @param value - Aspect ratio numerical expression
|
|
3373
|
+
|
|
3374
|
+
Numeric ratio value used by the renderer to produce an aspect-ratio display.
|
|
2668
3375
|
* @param options - Optional settings (modifiers).
|
|
2669
3376
|
* @returns A strongly-typed `RatioElement` object.
|
|
2670
3377
|
*/
|
|
@@ -2675,13 +3382,38 @@ export function ratio(value, options) {
|
|
|
2675
3382
|
modifiers: options?.modifiers
|
|
2676
3383
|
};
|
|
2677
3384
|
}
|
|
3385
|
+
/**
|
|
3386
|
+
* Creates a `DimensionsElement` component instance.
|
|
3387
|
+
*
|
|
3388
|
+
* @remarks
|
|
3389
|
+
* Displays a width/height pair as image dimensions. Both values are positive pixel counts; together they describe dimensions, not an aspect ratio or a resize request.
|
|
3390
|
+
*
|
|
3391
|
+
* @param width - Width in pixels
|
|
3392
|
+
|
|
3393
|
+
Horizontal pixel count. Values below one are rejected by the schema constraint.
|
|
3394
|
+
* @param height - Height in pixels
|
|
3395
|
+
|
|
3396
|
+
Vertical pixel count. Values below one are rejected by the schema constraint.
|
|
3397
|
+
* @param options - Optional settings (modifiers).
|
|
3398
|
+
* @returns A strongly-typed `DimensionsElement` object.
|
|
3399
|
+
*/
|
|
3400
|
+
export function dimensions(width, height, options) {
|
|
3401
|
+
return {
|
|
3402
|
+
type: "dimensions",
|
|
3403
|
+
width,
|
|
3404
|
+
height,
|
|
3405
|
+
modifiers: options?.modifiers
|
|
3406
|
+
};
|
|
3407
|
+
}
|
|
2678
3408
|
/**
|
|
2679
3409
|
* Creates a `ColourElement` component instance.
|
|
2680
3410
|
*
|
|
2681
3411
|
* @remarks
|
|
2682
|
-
*
|
|
3412
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
2683
3413
|
*
|
|
2684
3414
|
* @param value - Hexadecimal color code
|
|
3415
|
+
|
|
3416
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
2685
3417
|
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2686
3418
|
* @returns A strongly-typed `ColourElement` object.
|
|
2687
3419
|
*/
|
|
@@ -2700,9 +3432,11 @@ export function colour(value, options) {
|
|
|
2700
3432
|
* Creates a `ColourElement` component instance.
|
|
2701
3433
|
*
|
|
2702
3434
|
* @remarks
|
|
2703
|
-
*
|
|
3435
|
+
* Displays one color swatch with configurable geometry and optional adjacent text. Supply the color as a hexadecimal string; the schema leaves exact accepted hex formats to the renderer.
|
|
2704
3436
|
*
|
|
2705
3437
|
* @param value - Hexadecimal color code
|
|
3438
|
+
|
|
3439
|
+
Color value used to draw the swatch. Use a hexadecimal representation supported by the client renderer.
|
|
2706
3440
|
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2707
3441
|
* @returns A strongly-typed `ColourElement` object.
|
|
2708
3442
|
*/
|
|
@@ -2721,9 +3455,11 @@ export function color(value, options) {
|
|
|
2721
3455
|
* Creates a `NumberUnboundedElement` component instance.
|
|
2722
3456
|
*
|
|
2723
3457
|
* @remarks
|
|
2724
|
-
*
|
|
3458
|
+
* Displays a numeric value without a progress scale or rating interpretation. Use unit to communicate the measurement context; no range is imposed by this model.
|
|
2725
3459
|
*
|
|
2726
3460
|
* @param value - Numeric value
|
|
3461
|
+
|
|
3462
|
+
Number to display. Its meaning and any valid range are defined by the producing feature.
|
|
2727
3463
|
* @param options - Optional settings (unit, modifiers).
|
|
2728
3464
|
* @returns A strongly-typed `NumberUnboundedElement` object.
|
|
2729
3465
|
*/
|
|
@@ -2739,9 +3475,11 @@ export function numberUnbounded(value, options) {
|
|
|
2739
3475
|
* Creates a `NumberBoundedStarsElement` component instance.
|
|
2740
3476
|
*
|
|
2741
3477
|
* @remarks
|
|
2742
|
-
*
|
|
3478
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
2743
3479
|
*
|
|
2744
3480
|
* @param value - Numeric rating score
|
|
3481
|
+
|
|
3482
|
+
Score represented by the filled portion of the star display.
|
|
2745
3483
|
* @param options - Optional settings (maximum, modifiers).
|
|
2746
3484
|
* @returns A strongly-typed `NumberBoundedStarsElement` object.
|
|
2747
3485
|
*/
|
|
@@ -2757,9 +3495,11 @@ export function numberBoundedStars(value, options) {
|
|
|
2757
3495
|
* Creates a `NumberBoundedStarsElement` component instance.
|
|
2758
3496
|
*
|
|
2759
3497
|
* @remarks
|
|
2760
|
-
*
|
|
3498
|
+
* Displays a score on a star scale. Keep value within the scale from zero through maximum; this model declares the scale metadata but does not impose a numeric validation bound.
|
|
2761
3499
|
*
|
|
2762
3500
|
* @param value - Numeric rating score
|
|
3501
|
+
|
|
3502
|
+
Score represented by the filled portion of the star display.
|
|
2763
3503
|
* @param options - Optional settings (maximum, modifiers).
|
|
2764
3504
|
* @returns A strongly-typed `NumberBoundedStarsElement` object.
|
|
2765
3505
|
*/
|
|
@@ -2775,9 +3515,11 @@ export function numberStars(value, options) {
|
|
|
2775
3515
|
* Creates a `NumberBoundedMeterElement` component instance.
|
|
2776
3516
|
*
|
|
2777
3517
|
* @remarks
|
|
2778
|
-
*
|
|
3518
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
2779
3519
|
*
|
|
2780
3520
|
* @param value - Numeric value
|
|
3521
|
+
|
|
3522
|
+
Current measurement or score represented by the meter.
|
|
2781
3523
|
* @param options - Optional settings (minimum, maximum, label, unit, modifiers).
|
|
2782
3524
|
* @returns A strongly-typed `NumberBoundedMeterElement` object.
|
|
2783
3525
|
*/
|
|
@@ -2796,9 +3538,11 @@ export function numberBoundedMeter(value, options) {
|
|
|
2796
3538
|
* Creates a `NumberBoundedMeterElement` component instance.
|
|
2797
3539
|
*
|
|
2798
3540
|
* @remarks
|
|
2799
|
-
*
|
|
3541
|
+
* Displays a scalar value against a minimum-to-maximum range. Supply comparable bounds and a value in that range; optional label and unit customize the textual readout without changing the meter scale.
|
|
2800
3542
|
*
|
|
2801
3543
|
* @param value - Numeric value
|
|
3544
|
+
|
|
3545
|
+
Current measurement or score represented by the meter.
|
|
2802
3546
|
* @param options - Optional settings (minimum, maximum, label, unit, modifiers).
|
|
2803
3547
|
* @returns A strongly-typed `NumberBoundedMeterElement` object.
|
|
2804
3548
|
*/
|
|
@@ -2814,36 +3558,22 @@ export function numberMeter(value, options) {
|
|
|
2814
3558
|
};
|
|
2815
3559
|
}
|
|
2816
3560
|
/**
|
|
2817
|
-
* Creates a `
|
|
3561
|
+
* Creates a `BooleanElement` component instance.
|
|
2818
3562
|
*
|
|
2819
3563
|
* @remarks
|
|
2820
|
-
*
|
|
3564
|
+
* Displays a boolean state using text or a badge. The representation determines whether true/false labels or a colored badge are used; configured labels and variant are presentation choices only.
|
|
2821
3565
|
*
|
|
2822
3566
|
* @param value - Boolean state value
|
|
2823
|
-
|
|
2824
|
-
|
|
3567
|
+
|
|
3568
|
+
State to display. This remains a boolean value in the data model even when the renderer substitutes custom labels.
|
|
3569
|
+
* @param options - Optional settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
3570
|
+
* @returns A strongly-typed `BooleanElement` object.
|
|
2825
3571
|
*/
|
|
2826
|
-
export function
|
|
3572
|
+
export function boolean(value, options) {
|
|
2827
3573
|
return {
|
|
2828
|
-
type: "boolean
|
|
2829
|
-
value,
|
|
2830
|
-
modifiers: options?.modifiers
|
|
2831
|
-
};
|
|
2832
|
-
}
|
|
2833
|
-
/**
|
|
2834
|
-
* Creates a `BooleanBadgeElement` component instance.
|
|
2835
|
-
*
|
|
2836
|
-
* @remarks
|
|
2837
|
-
* Visual badge pill representation of a boolean state.
|
|
2838
|
-
*
|
|
2839
|
-
* @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 `BooleanBadgeElement` object.
|
|
2842
|
-
*/
|
|
2843
|
-
export function booleanBadge(value, options) {
|
|
2844
|
-
return {
|
|
2845
|
-
type: "boolean-badge",
|
|
3574
|
+
type: "boolean",
|
|
2846
3575
|
value,
|
|
3576
|
+
representation: options?.representation ?? BooleanRepresentation.plain,
|
|
2847
3577
|
trueLabel: options?.trueLabel ?? "true",
|
|
2848
3578
|
falseLabel: options?.falseLabel ?? "false",
|
|
2849
3579
|
variant: options?.variant ?? BadgeVariant.neutral,
|
|
@@ -2854,9 +3584,11 @@ export function booleanBadge(value, options) {
|
|
|
2854
3584
|
* Creates a `TimestampElement` component instance.
|
|
2855
3585
|
*
|
|
2856
3586
|
* @remarks
|
|
2857
|
-
*
|
|
3587
|
+
* Displays an epoch timestamp using a selected date/time format. The input is a count of milliseconds, not seconds; relative formatting is interpreted by the consumer.
|
|
2858
3588
|
*
|
|
2859
3589
|
* @param value - The timestamp in milliseconds
|
|
3590
|
+
|
|
3591
|
+
Unix epoch timestamp measured in milliseconds. Convert seconds-based timestamps before assigning this value.
|
|
2860
3592
|
* @param options - Optional settings (format (defaults to `datetime`), modifiers).
|
|
2861
3593
|
* @returns A strongly-typed `TimestampElement` object.
|
|
2862
3594
|
*/
|
|
@@ -2872,9 +3604,11 @@ export function timestamp(value, options) {
|
|
|
2872
3604
|
* Creates a `ImageReferenceElement` component instance.
|
|
2873
3605
|
*
|
|
2874
3606
|
* @remarks
|
|
2875
|
-
*
|
|
3607
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
2876
3608
|
*
|
|
2877
3609
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
3610
|
+
|
|
3611
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
2878
3612
|
* @param options - Optional settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
2879
3613
|
* @returns A strongly-typed `ImageReferenceElement` object.
|
|
2880
3614
|
*/
|
|
@@ -2891,9 +3625,11 @@ export function imageReference(src, options) {
|
|
|
2891
3625
|
* Creates a `ImageReferenceElement` component instance.
|
|
2892
3626
|
*
|
|
2893
3627
|
* @remarks
|
|
2894
|
-
*
|
|
3628
|
+
* References an image source for thumbnail rendering and provides accessible text and a fallback source. The client determines loading, sizing, and placeholder behavior.
|
|
2895
3629
|
*
|
|
2896
3630
|
* @param src - Image source URI (HTTPS URL, base64 data URI, or asset path)
|
|
3631
|
+
|
|
3632
|
+
Source URI understood by the client renderer. Supported forms include HTTPS locations, base64 data URIs, and client asset paths; this field is not raw image bytes.
|
|
2897
3633
|
* @param options - Optional settings (alt, aspectRatio (defaults to `1:1`), placeholder).
|
|
2898
3634
|
* @returns A strongly-typed `ImageReferenceElement` object.
|
|
2899
3635
|
*/
|
|
@@ -2910,10 +3646,14 @@ export function imageRef(src, options) {
|
|
|
2910
3646
|
* Creates a `ButtonActionElement` component instance.
|
|
2911
3647
|
*
|
|
2912
3648
|
* @remarks
|
|
2913
|
-
*
|
|
3649
|
+
* When activated, the client dispatches commandId to the specified extension and may include target and parameters as command input. disabled and variant affect presentation and availability, not the command's authorization.
|
|
2914
3650
|
*
|
|
2915
3651
|
* @param commandId - Command identifier to invoke
|
|
3652
|
+
|
|
3653
|
+
Identifier of the registered extension command to dispatch when the button is activated.
|
|
2916
3654
|
* @param label - Display label for the action
|
|
3655
|
+
|
|
3656
|
+
User-facing label shown on the control. Keep it short and action-oriented.
|
|
2917
3657
|
* @param options - Optional settings (extensionId, target, parameters, disabled (defaults to `false`), variant (defaults to `secondary`)).
|
|
2918
3658
|
* @returns A strongly-typed `ButtonActionElement` object.
|
|
2919
3659
|
*/
|
|
@@ -2933,10 +3673,14 @@ export function buttonAction(commandId, label, options) {
|
|
|
2933
3673
|
* Creates a `ExternalLinkActionElement` component instance.
|
|
2934
3674
|
*
|
|
2935
3675
|
* @remarks
|
|
2936
|
-
*
|
|
3676
|
+
* Renders a user-invokable action that opens a destination externally. Use StringUrlElement for a link embedded in content rather than an action control.
|
|
2937
3677
|
*
|
|
2938
3678
|
* @param url - Target URL destination
|
|
3679
|
+
|
|
3680
|
+
External destination opened when the user activates the link action. The client controls how external navigation is handed to the platform.
|
|
2939
3681
|
* @param label - Display label for the action
|
|
3682
|
+
|
|
3683
|
+
User-facing label shown on the control. Keep it short and action-oriented.
|
|
2940
3684
|
* @returns A strongly-typed `ExternalLinkActionElement` object.
|
|
2941
3685
|
*/
|
|
2942
3686
|
export function externalLinkAction(url, label) {
|
|
@@ -2950,9 +3694,11 @@ export function externalLinkAction(url, label) {
|
|
|
2950
3694
|
* Creates a `MarkdownBlockElement` component instance.
|
|
2951
3695
|
*
|
|
2952
3696
|
* @remarks
|
|
2953
|
-
*
|
|
3697
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
2954
3698
|
*
|
|
2955
3699
|
* @param content - Raw Markdown markup content
|
|
3700
|
+
|
|
3701
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
2956
3702
|
* @param options - Optional settings (modifiers).
|
|
2957
3703
|
* @returns A strongly-typed `MarkdownBlockElement` object.
|
|
2958
3704
|
*/
|
|
@@ -2967,9 +3713,11 @@ export function markdownBlock(content, options) {
|
|
|
2967
3713
|
* Creates a `MarkdownBlockElement` component instance.
|
|
2968
3714
|
*
|
|
2969
3715
|
* @remarks
|
|
2970
|
-
*
|
|
3716
|
+
* Use this custom-renderer escape hatch when the structured ViewKit elements cannot express the required rich text. Markdown rendering is a presentation fallback; prefer typed elements when consumers need to inspect individual values.
|
|
2971
3717
|
*
|
|
2972
3718
|
* @param content - Raw Markdown markup content
|
|
3719
|
+
|
|
3720
|
+
Markdown source consumed by the client renderer. The schema treats it as an opaque string and does not validate the markup or its links.
|
|
2973
3721
|
* @param options - Optional settings (modifiers).
|
|
2974
3722
|
* @returns A strongly-typed `MarkdownBlockElement` object.
|
|
2975
3723
|
*/
|
|
@@ -2984,9 +3732,11 @@ export function markdown(content, options) {
|
|
|
2984
3732
|
* Creates a `HtmlBlockElement` component instance.
|
|
2985
3733
|
*
|
|
2986
3734
|
* @remarks
|
|
2987
|
-
*
|
|
3735
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
2988
3736
|
*
|
|
2989
3737
|
* @param content - Raw HTML markup content
|
|
3738
|
+
|
|
3739
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
2990
3740
|
* @param options - Optional settings (modifiers).
|
|
2991
3741
|
* @returns A strongly-typed `HtmlBlockElement` object.
|
|
2992
3742
|
*/
|
|
@@ -3001,9 +3751,11 @@ export function htmlBlock(content, options) {
|
|
|
3001
3751
|
* Creates a `HtmlBlockElement` component instance.
|
|
3002
3752
|
*
|
|
3003
3753
|
* @remarks
|
|
3004
|
-
*
|
|
3754
|
+
* Use only when structured elements or Markdown cannot represent the required content. Rendering occurs in a sandboxed host context, but callers should still avoid embedding untrusted content and should not assume access to application privileges.
|
|
3005
3755
|
*
|
|
3006
3756
|
* @param content - Raw HTML markup content
|
|
3757
|
+
|
|
3758
|
+
HTML source passed to the custom renderer. This is an opaque string, not a typed or sanitized DOM structure.
|
|
3007
3759
|
* @param options - Optional settings (modifiers).
|
|
3008
3760
|
* @returns A strongly-typed `HtmlBlockElement` object.
|
|
3009
3761
|
*/
|
|
@@ -3018,9 +3770,11 @@ export function html(content, options) {
|
|
|
3018
3770
|
* Creates a `Slot` component instance.
|
|
3019
3771
|
*
|
|
3020
3772
|
* @remarks
|
|
3021
|
-
*
|
|
3773
|
+
* A slot combines an optional label, a relative width, and one visual child. Slot widths are percentages of the row and should be chosen so the full row's widths form a usable layout.
|
|
3022
3774
|
*
|
|
3023
3775
|
* @param content - Rendered content inside the slot
|
|
3776
|
+
|
|
3777
|
+
One visual element displayed in this slot. Use a nested layout element when the slot itself needs multiple children.
|
|
3024
3778
|
* @param options - Optional settings (label, width).
|
|
3025
3779
|
* @returns A strongly-typed `Slot` object.
|
|
3026
3780
|
*/
|
|
@@ -3035,45 +3789,50 @@ export function slot(content, options) {
|
|
|
3035
3789
|
* Creates a `MultiSlotElement` component instance.
|
|
3036
3790
|
*
|
|
3037
3791
|
* @remarks
|
|
3038
|
-
*
|
|
3039
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
3792
|
+
* Use this layout when a row needs explicit regions with independently controlled widths. Each slot contains one child element; unlike FlowingElement, the layout does not automatically wrap a sequence of children.
|
|
3040
3793
|
*
|
|
3041
3794
|
* @param slots - List of slots comprising the row
|
|
3042
|
-
|
|
3795
|
+
|
|
3796
|
+
Ordered slots in the row. Each slot's width is a percentage; arrange slot definitions in the intended visual order.
|
|
3043
3797
|
* @returns A strongly-typed `MultiSlotElement` object.
|
|
3044
3798
|
*/
|
|
3045
|
-
export function multiSlot(slots
|
|
3799
|
+
export function multiSlot(slots) {
|
|
3046
3800
|
return {
|
|
3047
3801
|
type: "multi-slot",
|
|
3048
|
-
slots: [...slots]
|
|
3049
|
-
proportions: options?.proportions
|
|
3802
|
+
slots: [...slots]
|
|
3050
3803
|
};
|
|
3051
3804
|
}
|
|
3052
3805
|
/**
|
|
3053
3806
|
* Creates a `FlowingElement` component instance.
|
|
3054
3807
|
*
|
|
3055
3808
|
* @remarks
|
|
3056
|
-
*
|
|
3057
|
-
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
3809
|
+
* Use for compact related values that should flow horizontally and wrap naturally at the available width. Child order is preserved; an optional separator is placed between neighboring children.
|
|
3058
3810
|
*
|
|
3059
3811
|
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
3812
|
+
|
|
3813
|
+
Ordered children rendered in the flow. The client wraps them as needed rather than requiring callers to calculate line breaks.
|
|
3814
|
+
* @param options - Optional settings (separator).
|
|
3060
3815
|
* @returns A strongly-typed `FlowingElement` object.
|
|
3061
3816
|
*/
|
|
3062
|
-
export function flowing(elements) {
|
|
3817
|
+
export function flowing(elements, options) {
|
|
3063
3818
|
return {
|
|
3064
3819
|
type: "flowing",
|
|
3065
|
-
elements: [...elements]
|
|
3820
|
+
elements: [...elements],
|
|
3821
|
+
separator: options?.separator
|
|
3066
3822
|
};
|
|
3067
3823
|
}
|
|
3068
3824
|
/**
|
|
3069
3825
|
* Creates a `LabelValueElement` component instance.
|
|
3070
3826
|
*
|
|
3071
3827
|
* @remarks
|
|
3072
|
-
*
|
|
3073
|
-
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
3828
|
+
* Represents one named value with a muted left-hand label and a right-hand visual element. Use it for a single field; use TableElement for repeated rows or column-aligned data.
|
|
3074
3829
|
*
|
|
3075
3830
|
* @param label - Key or descriptive label displayed muted on the left
|
|
3831
|
+
|
|
3832
|
+
Human-readable name for the value. This text is rendered as the row label rather than as a separate UiElement.
|
|
3076
3833
|
* @param value - Rendered value element on the right
|
|
3834
|
+
|
|
3835
|
+
Value content rendered in the right-hand region. It may be a primitive or a nested structural element.
|
|
3077
3836
|
* @param options - Optional settings (withDivider (defaults to `false`)).
|
|
3078
3837
|
* @returns A strongly-typed `LabelValueElement` object.
|
|
3079
3838
|
*/
|
|
@@ -3089,25 +3848,28 @@ export function labelValue(label, value, options) {
|
|
|
3089
3848
|
* Creates a `TableColumn` component instance.
|
|
3090
3849
|
*
|
|
3091
3850
|
* @remarks
|
|
3092
|
-
*
|
|
3851
|
+
* Describes one table column and its visual sizing. When columns are supplied, their order corresponds to the position of each cell in a row.
|
|
3093
3852
|
*
|
|
3094
|
-
* @param options - Optional settings (header, align (defaults to `left`), width).
|
|
3853
|
+
* @param options - Optional settings (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
3095
3854
|
* @returns A strongly-typed `TableColumn` object.
|
|
3096
3855
|
*/
|
|
3097
3856
|
export function tableColumn(options) {
|
|
3098
3857
|
return {
|
|
3099
3858
|
header: options?.header,
|
|
3100
3859
|
align: options?.align ?? TableColumnAlign.left,
|
|
3101
|
-
width: options?.width
|
|
3860
|
+
width: options?.width,
|
|
3861
|
+
widthMode: options?.widthMode ?? TableColumnWidthMode.fixed
|
|
3102
3862
|
};
|
|
3103
3863
|
}
|
|
3104
3864
|
/**
|
|
3105
3865
|
* Creates a `TableRow` component instance.
|
|
3106
3866
|
*
|
|
3107
3867
|
* @remarks
|
|
3108
|
-
*
|
|
3868
|
+
* A row's cell array is positional: cell at each index corresponds to the column at that index. Keep row lengths aligned with the table's explicit column definitions when present.
|
|
3109
3869
|
*
|
|
3110
3870
|
* @param cells - Array of cell values corresponding to table columns
|
|
3871
|
+
|
|
3872
|
+
Ordered contents for this row. Each cell is a UiElement so values can use the same primitive and layout renderers as other ViewKit content.
|
|
3111
3873
|
* @returns A strongly-typed `TableRow` object.
|
|
3112
3874
|
*/
|
|
3113
3875
|
export function tableRow(cells) {
|
|
@@ -3119,18 +3881,18 @@ export function tableRow(cells) {
|
|
|
3119
3881
|
* Creates a `TableElement` component instance.
|
|
3120
3882
|
*
|
|
3121
3883
|
* @remarks
|
|
3122
|
-
*
|
|
3123
|
-
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
3884
|
+
* Use for data that benefits from aligned rows and columns, including key/value and multi-column tables. Supply rows in display order; explicit columns are optional, and divider/striping flags independently control visual separators and alternating backgrounds.
|
|
3124
3885
|
*
|
|
3125
3886
|
* @param rows - Tabular data rows
|
|
3126
|
-
|
|
3887
|
+
|
|
3888
|
+
Ordered table rows. Each row's cells correspond positionally to the declared columns.
|
|
3889
|
+
* @param options - Optional settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
3127
3890
|
* @returns A strongly-typed `TableElement` object.
|
|
3128
3891
|
*/
|
|
3129
3892
|
export function table(rows, options) {
|
|
3130
3893
|
return {
|
|
3131
3894
|
type: "table",
|
|
3132
3895
|
rows: [...rows],
|
|
3133
|
-
hasHeader: options?.hasHeader ?? true,
|
|
3134
3896
|
isStriped: options?.isStriped ?? false,
|
|
3135
3897
|
withColumnSeparators: options?.withColumnSeparators ?? false,
|
|
3136
3898
|
withRowSeparators: options?.withRowSeparators ?? false,
|
|
@@ -3141,9 +3903,11 @@ export function table(rows, options) {
|
|
|
3141
3903
|
* Creates a `RepeatingGroupEntry` component instance.
|
|
3142
3904
|
*
|
|
3143
3905
|
* @remarks
|
|
3144
|
-
*
|
|
3906
|
+
* A repeating entry carries a stable display label and either one primary value or a list of nested elements, depending on the shape needed by the feature.
|
|
3145
3907
|
*
|
|
3146
3908
|
* @param label - Entry label
|
|
3909
|
+
|
|
3910
|
+
Short label identifying this entry within the repeated group.
|
|
3147
3911
|
* @param options - Optional settings (value, elements).
|
|
3148
3912
|
* @returns A strongly-typed `RepeatingGroupEntry` object.
|
|
3149
3913
|
*/
|
|
@@ -3158,9 +3922,11 @@ export function repeatingGroupEntry(label, options) {
|
|
|
3158
3922
|
* Creates a `RepeatingGroupElement` component instance.
|
|
3159
3923
|
*
|
|
3160
3924
|
* @remarks
|
|
3161
|
-
*
|
|
3925
|
+
* Groups a sequence of labeled entries under one optional section title. Use it when records have the same general presentation but need their own labels.
|
|
3162
3926
|
*
|
|
3163
3927
|
* @param entries - List of repeated entry records
|
|
3928
|
+
|
|
3929
|
+
Entries in display order. Each entry supplies its own label and content.
|
|
3164
3930
|
* @param options - Optional settings (title).
|
|
3165
3931
|
* @returns A strongly-typed `RepeatingGroupElement` object.
|
|
3166
3932
|
*/
|
|
@@ -3175,10 +3941,14 @@ export function repeatingGroup(entries, options) {
|
|
|
3175
3941
|
* Creates a `CollapsibleGroupElement` component instance.
|
|
3176
3942
|
*
|
|
3177
3943
|
* @remarks
|
|
3178
|
-
*
|
|
3944
|
+
* Groups nested content behind a disclosure control. The title names the group, summary can provide a compact status indicator, and defaultExpanded controls only the initial state.
|
|
3179
3945
|
*
|
|
3180
3946
|
* @param title - Group title (e.g. "Show specimen details")
|
|
3947
|
+
|
|
3948
|
+
Text shown on the disclosure control. Use a concise action or section name that remains meaningful while the content is collapsed.
|
|
3181
3949
|
* @param elements - Nested content elements revealed when expanded
|
|
3950
|
+
|
|
3951
|
+
Ordered child elements made visible by expanding the group.
|
|
3182
3952
|
* @param options - Optional settings (summary, defaultExpanded (defaults to `false`)).
|
|
3183
3953
|
* @returns A strongly-typed `CollapsibleGroupElement` object.
|
|
3184
3954
|
*/
|
|
@@ -3195,7 +3965,7 @@ export function collapsibleGroup(title, elements, options) {
|
|
|
3195
3965
|
* Creates a `DividerElement` component instance.
|
|
3196
3966
|
*
|
|
3197
3967
|
* @remarks
|
|
3198
|
-
*
|
|
3968
|
+
* A standalone visual separator for dividing adjacent sections or element groups. Use the divider flags on tables or rows when the separator is part of that structure.
|
|
3199
3969
|
*
|
|
3200
3970
|
* @param options - Optional settings (style (defaults to `hairline`)).
|
|
3201
3971
|
* @returns A strongly-typed `DividerElement` object.
|
|
@@ -3210,7 +3980,7 @@ export function divider(options) {
|
|
|
3210
3980
|
* Creates a `Envelop` component instance.
|
|
3211
3981
|
*
|
|
3212
3982
|
* @remarks
|
|
3213
|
-
*
|
|
3983
|
+
* All root ViewKit documents extend this envelope so consumers can identify the schema contract version before processing the root content.
|
|
3214
3984
|
*
|
|
3215
3985
|
* @param options - Optional settings (schemaVersion (defaults to `1.0`)).
|
|
3216
3986
|
* @returns A strongly-typed `Envelop` object.
|
|
@@ -3293,7 +4063,7 @@ export function isSlot(value, withDeepValidation = false) {
|
|
|
3293
4063
|
}
|
|
3294
4064
|
const element = value;
|
|
3295
4065
|
return (element.label === undefined || typeof element.label === "string") &&
|
|
3296
|
-
(element.width === undefined || typeof element.width === "
|
|
4066
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
3297
4067
|
("content" in value && isUiElement(element.content, true));
|
|
3298
4068
|
}
|
|
3299
4069
|
/**
|
|
@@ -3313,7 +4083,8 @@ export function isTableColumn(value, withDeepValidation = false) {
|
|
|
3313
4083
|
const element = value;
|
|
3314
4084
|
return (element.header === undefined || typeof element.header === "string") &&
|
|
3315
4085
|
(element.align === undefined || Object.values(TableColumnAlign).includes(element.align)) &&
|
|
3316
|
-
(element.width === undefined || typeof element.width === "
|
|
4086
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
4087
|
+
(element.widthMode === undefined || Object.values(TableColumnWidthMode).includes(element.widthMode));
|
|
3317
4088
|
}
|
|
3318
4089
|
/**
|
|
3319
4090
|
* Type guard predicate verifying whether an unknown value conforms to `TableRow`.
|
|
@@ -3384,10 +4155,10 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3384
4155
|
}
|
|
3385
4156
|
const element = value;
|
|
3386
4157
|
switch (element.type) {
|
|
3387
|
-
case "string
|
|
3388
|
-
return
|
|
3389
|
-
case "
|
|
3390
|
-
return
|
|
4158
|
+
case "string":
|
|
4159
|
+
return isStringElement(element, true);
|
|
4160
|
+
case "strings":
|
|
4161
|
+
return isStringsElement(element, true);
|
|
3391
4162
|
case "string-code":
|
|
3392
4163
|
return isStringCodeElement(element, true);
|
|
3393
4164
|
case "xml":
|
|
@@ -3400,6 +4171,8 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3400
4171
|
return isIdentifierElement(element, true);
|
|
3401
4172
|
case "ratio":
|
|
3402
4173
|
return isRatioElement(element, true);
|
|
4174
|
+
case "dimensions":
|
|
4175
|
+
return isDimensionsElement(element, true);
|
|
3403
4176
|
case "color":
|
|
3404
4177
|
return isColourElement(element, true);
|
|
3405
4178
|
case "number-unbounded":
|
|
@@ -3408,10 +4181,8 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3408
4181
|
return isNumberBoundedStarsElement(element, true);
|
|
3409
4182
|
case "number-meter":
|
|
3410
4183
|
return isNumberBoundedMeterElement(element, true);
|
|
3411
|
-
case "boolean
|
|
3412
|
-
return
|
|
3413
|
-
case "boolean-badge":
|
|
3414
|
-
return isBooleanBadgeElement(element, true);
|
|
4184
|
+
case "boolean":
|
|
4185
|
+
return isBooleanElement(element, true);
|
|
3415
4186
|
case "timestamp":
|
|
3416
4187
|
return isTimestampElement(element, true);
|
|
3417
4188
|
case "image-ref":
|
|
@@ -3439,14 +4210,14 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3439
4210
|
}
|
|
3440
4211
|
}
|
|
3441
4212
|
/**
|
|
3442
|
-
* Type guard predicate narrowing a value to `
|
|
4213
|
+
* Type guard predicate narrowing a value to `StringElement`.
|
|
3443
4214
|
*
|
|
3444
4215
|
* @param value - The value to inspect.
|
|
3445
4216
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3446
|
-
* @returns `true` if the value is a `
|
|
4217
|
+
* @returns `true` if the value is a `StringElement` (type = "string"), otherwise `false`.
|
|
3447
4218
|
*/
|
|
3448
|
-
export function
|
|
3449
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string
|
|
4219
|
+
export function isStringElement(value, withDeepValidation = false) {
|
|
4220
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string") {
|
|
3450
4221
|
return false;
|
|
3451
4222
|
}
|
|
3452
4223
|
if (!withDeepValidation) {
|
|
@@ -3454,25 +4225,27 @@ export function isStringShortElement(value, withDeepValidation = false) {
|
|
|
3454
4225
|
}
|
|
3455
4226
|
const element = value;
|
|
3456
4227
|
return ("value" in value && typeof element.value === "string") &&
|
|
3457
|
-
(element.representation === undefined || Object.values(
|
|
4228
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
3458
4229
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3459
4230
|
}
|
|
3460
4231
|
/**
|
|
3461
|
-
* Type guard predicate narrowing a value to `
|
|
4232
|
+
* Type guard predicate narrowing a value to `StringsElement`.
|
|
3462
4233
|
*
|
|
3463
4234
|
* @param value - The value to inspect.
|
|
3464
4235
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3465
|
-
* @returns `true` if the value is a `
|
|
4236
|
+
* @returns `true` if the value is a `StringsElement` (type = "strings"), otherwise `false`.
|
|
3466
4237
|
*/
|
|
3467
|
-
export function
|
|
3468
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
4238
|
+
export function isStringsElement(value, withDeepValidation = false) {
|
|
4239
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "strings") {
|
|
3469
4240
|
return false;
|
|
3470
4241
|
}
|
|
3471
4242
|
if (!withDeepValidation) {
|
|
3472
4243
|
return true;
|
|
3473
4244
|
}
|
|
3474
4245
|
const element = value;
|
|
3475
|
-
return ("
|
|
4246
|
+
return ("values" in value && (Array.isArray(element.values) && element.values.every((item) => typeof item === "string"))) &&
|
|
4247
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
4248
|
+
(element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
3476
4249
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3477
4250
|
}
|
|
3478
4251
|
/**
|
|
@@ -3585,6 +4358,25 @@ export function isRatioElement(value, withDeepValidation = false) {
|
|
|
3585
4358
|
return ("value" in value && typeof element.value === "number") &&
|
|
3586
4359
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3587
4360
|
}
|
|
4361
|
+
/**
|
|
4362
|
+
* Type guard predicate narrowing a value to `DimensionsElement`.
|
|
4363
|
+
*
|
|
4364
|
+
* @param value - The value to inspect.
|
|
4365
|
+
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
4366
|
+
* @returns `true` if the value is a `DimensionsElement` (type = "dimensions"), otherwise `false`.
|
|
4367
|
+
*/
|
|
4368
|
+
export function isDimensionsElement(value, withDeepValidation = false) {
|
|
4369
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "dimensions") {
|
|
4370
|
+
return false;
|
|
4371
|
+
}
|
|
4372
|
+
if (!withDeepValidation) {
|
|
4373
|
+
return true;
|
|
4374
|
+
}
|
|
4375
|
+
const element = value;
|
|
4376
|
+
return ("width" in value && typeof element.width === "number") &&
|
|
4377
|
+
("height" in value && typeof element.height === "number") &&
|
|
4378
|
+
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
4379
|
+
}
|
|
3588
4380
|
/**
|
|
3589
4381
|
* Type guard predicate narrowing a value to `ColourElement`.
|
|
3590
4382
|
*
|
|
@@ -3668,32 +4460,14 @@ export function isNumberBoundedMeterElement(value, withDeepValidation = false) {
|
|
|
3668
4460
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3669
4461
|
}
|
|
3670
4462
|
/**
|
|
3671
|
-
* Type guard predicate narrowing a value to `
|
|
4463
|
+
* Type guard predicate narrowing a value to `BooleanElement`.
|
|
3672
4464
|
*
|
|
3673
4465
|
* @param value - The value to inspect.
|
|
3674
4466
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3675
|
-
* @returns `true` if the value is a `
|
|
4467
|
+
* @returns `true` if the value is a `BooleanElement` (type = "boolean"), otherwise `false`.
|
|
3676
4468
|
*/
|
|
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") {
|
|
4469
|
+
export function isBooleanElement(value, withDeepValidation = false) {
|
|
4470
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean") {
|
|
3697
4471
|
return false;
|
|
3698
4472
|
}
|
|
3699
4473
|
if (!withDeepValidation) {
|
|
@@ -3701,6 +4475,7 @@ export function isBooleanBadgeElement(value, withDeepValidation = false) {
|
|
|
3701
4475
|
}
|
|
3702
4476
|
const element = value;
|
|
3703
4477
|
return ("value" in value && typeof element.value === "boolean") &&
|
|
4478
|
+
(element.representation === undefined || Object.values(BooleanRepresentation).includes(element.representation)) &&
|
|
3704
4479
|
(element.trueLabel === undefined || typeof element.trueLabel === "string") &&
|
|
3705
4480
|
(element.falseLabel === undefined || typeof element.falseLabel === "string") &&
|
|
3706
4481
|
(element.variant === undefined || Object.values(BadgeVariant).includes(element.variant)) &&
|
|
@@ -3796,8 +4571,7 @@ export function isMultiSlotElement(value, withDeepValidation = false) {
|
|
|
3796
4571
|
return true;
|
|
3797
4572
|
}
|
|
3798
4573
|
const element = value;
|
|
3799
|
-
return (
|
|
3800
|
-
("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
4574
|
+
return ("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
3801
4575
|
}
|
|
3802
4576
|
/**
|
|
3803
4577
|
* Type guard predicate narrowing a value to `FlowingElement`.
|
|
@@ -3814,7 +4588,8 @@ export function isFlowingElement(value, withDeepValidation = false) {
|
|
|
3814
4588
|
return true;
|
|
3815
4589
|
}
|
|
3816
4590
|
const element = value;
|
|
3817
|
-
return (
|
|
4591
|
+
return (element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
4592
|
+
("elements" in value && (Array.isArray(element.elements) && element.elements.every((item) => isUiElement(item, true))));
|
|
3818
4593
|
}
|
|
3819
4594
|
/**
|
|
3820
4595
|
* Type guard predicate narrowing a value to `LabelValueElement`.
|
|
@@ -3850,8 +4625,7 @@ export function isTableElement(value, withDeepValidation = false) {
|
|
|
3850
4625
|
return true;
|
|
3851
4626
|
}
|
|
3852
4627
|
const element = value;
|
|
3853
|
-
return (element.
|
|
3854
|
-
(element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
4628
|
+
return (element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
3855
4629
|
(element.withColumnSeparators === undefined || typeof element.withColumnSeparators === "boolean") &&
|
|
3856
4630
|
(element.withRowSeparators === undefined || typeof element.withRowSeparators === "boolean") &&
|
|
3857
4631
|
(element.columns === undefined || (Array.isArray(element.columns) && element.columns.every((item) => isTableColumn(item, true)))) &&
|