@picteus/extension-sdk 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/viewKit.d.ts +221 -252
- package/dist/generated/viewKit.js +189 -266
- 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 +5 -3
- package/dist/picteus-ws-client/apis/ExtensionApi.js +2 -2
- package/dist/picteus-ws-client/apis/ImageApi.d.ts +36 -5
- package/dist/picteus-ws-client/apis/ImageApi.js +44 -3
- 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 +4 -2
- 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 +23 -5
- package/dist/picteus-ws-client/models/ExtensionActivity.js +17 -5
- package/dist/picteus-ws-client/models/ExtensionActivityState.d.ts +25 -0
- package/dist/picteus-ws-client/models/ExtensionActivityState.js +43 -0
- 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 +5 -3
- 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 +13 -1
- package/dist/picteus-ws-client/models/GenerationRecipe.js +5 -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 +2 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.js +2 -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 +5 -3
- package/dist/picteus-ws-client/models/InstructionsPrompt.js +1 -1
- package/dist/picteus-ws-client/models/Manifest.d.ts +5 -3
- 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 -3
- package/dist/picteus-ws-client/models/ManifestEvent.js +1 -3
- 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 +5 -3
- 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 +5 -3
- 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/models/index.d.ts +1 -1
- package/dist/picteus-ws-client/models/index.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 +1 -1
- package/dist/picteusExtension.js +1 -1
- package/package.json +1 -1
|
@@ -58,6 +58,24 @@ export var TextIntensity;
|
|
|
58
58
|
// High visual contrast / intense text color
|
|
59
59
|
TextIntensity["high"] = "high";
|
|
60
60
|
})(TextIntensity || (TextIntensity = {}));
|
|
61
|
+
/** Geometric shape representation for visual containers and indicators. */
|
|
62
|
+
export var Shape;
|
|
63
|
+
(function (Shape) {
|
|
64
|
+
// Circular container shape
|
|
65
|
+
Shape["circle"] = "circle";
|
|
66
|
+
// Square container shape
|
|
67
|
+
Shape["square"] = "square";
|
|
68
|
+
})(Shape || (Shape = {}));
|
|
69
|
+
/** Relative sizing scale for visual elements and indicators. */
|
|
70
|
+
export var Size;
|
|
71
|
+
(function (Size) {
|
|
72
|
+
// Compact small size
|
|
73
|
+
Size["small"] = "small";
|
|
74
|
+
// Standard medium size
|
|
75
|
+
Size["medium"] = "medium";
|
|
76
|
+
// Prominent large size
|
|
77
|
+
Size["large"] = "large";
|
|
78
|
+
})(Size || (Size = {}));
|
|
61
79
|
/** Representation style for short string values. */
|
|
62
80
|
export var StringShortRepresentation;
|
|
63
81
|
(function (StringShortRepresentation) {
|
|
@@ -92,7 +110,7 @@ export var BadgeVariant;
|
|
|
92
110
|
export var TimestampFormat;
|
|
93
111
|
(function (TimestampFormat) {
|
|
94
112
|
// Complete date and time display
|
|
95
|
-
TimestampFormat["
|
|
113
|
+
TimestampFormat["datetime"] = "datetime";
|
|
96
114
|
// Date-only display
|
|
97
115
|
TimestampFormat["date"] = "date";
|
|
98
116
|
// Time-only display
|
|
@@ -458,14 +476,14 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
458
476
|
* @defaultValue "ratio"
|
|
459
477
|
*/
|
|
460
478
|
type = "ratio";
|
|
461
|
-
/** Aspect ratio
|
|
479
|
+
/** Aspect ratio numerical expression */
|
|
462
480
|
value;
|
|
463
481
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
464
482
|
modifiers;
|
|
465
483
|
/**
|
|
466
484
|
* Constructs a new `RatioElementClass` instance.
|
|
467
485
|
*
|
|
468
|
-
* @param value - Aspect ratio
|
|
486
|
+
* @param value - Aspect ratio numerical expression
|
|
469
487
|
* @param options - Optional component settings. (modifiers).
|
|
470
488
|
*/
|
|
471
489
|
constructor(value, options) {
|
|
@@ -478,28 +496,52 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
478
496
|
* Class implementation of the `ColourElement` interface.
|
|
479
497
|
*
|
|
480
498
|
* @remarks
|
|
481
|
-
* Single color
|
|
499
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
482
500
|
*/
|
|
483
501
|
export class ColourElementClass extends BaseUiElement {
|
|
484
502
|
/**
|
|
485
503
|
* Discriminator identifier for `ColourElement`.
|
|
486
504
|
*
|
|
487
|
-
* @defaultValue "color
|
|
505
|
+
* @defaultValue "color"
|
|
488
506
|
*/
|
|
489
|
-
type = "color
|
|
507
|
+
type = "color";
|
|
490
508
|
/** Hexadecimal color code */
|
|
491
509
|
value;
|
|
510
|
+
/** Optional descriptive color name label */
|
|
511
|
+
label;
|
|
512
|
+
/**
|
|
513
|
+
* Whether to display the textual color code or label next to the swatch
|
|
514
|
+
*
|
|
515
|
+
* @defaultValue true
|
|
516
|
+
*/
|
|
517
|
+
showText;
|
|
518
|
+
/**
|
|
519
|
+
* Visual shape of the color indicator
|
|
520
|
+
*
|
|
521
|
+
* @defaultValue Shape.circle
|
|
522
|
+
*/
|
|
523
|
+
shape;
|
|
524
|
+
/**
|
|
525
|
+
* Visual size of the color indicator
|
|
526
|
+
*
|
|
527
|
+
* @defaultValue Size.medium
|
|
528
|
+
*/
|
|
529
|
+
size;
|
|
492
530
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
493
531
|
modifiers;
|
|
494
532
|
/**
|
|
495
533
|
* Constructs a new `ColourElementClass` instance.
|
|
496
534
|
*
|
|
497
535
|
* @param value - Hexadecimal color code
|
|
498
|
-
* @param options - Optional component settings. (modifiers).
|
|
536
|
+
* @param options - Optional component settings. (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
499
537
|
*/
|
|
500
538
|
constructor(value, options) {
|
|
501
539
|
super();
|
|
502
540
|
this.value = value;
|
|
541
|
+
this.label = options?.label;
|
|
542
|
+
this.showText = options?.showText ?? true;
|
|
543
|
+
this.shape = options?.shape ?? Shape.circle;
|
|
544
|
+
this.size = options?.size ?? Size.medium;
|
|
503
545
|
this.modifiers = options?.modifiers;
|
|
504
546
|
}
|
|
505
547
|
}
|
|
@@ -700,12 +742,12 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
700
742
|
* @defaultValue "timestamp"
|
|
701
743
|
*/
|
|
702
744
|
type = "timestamp";
|
|
703
|
-
/**
|
|
745
|
+
/** The timestamp in milliseconds */
|
|
704
746
|
value;
|
|
705
747
|
/**
|
|
706
748
|
* Presentation date/time format
|
|
707
749
|
*
|
|
708
|
-
* @defaultValue TimestampFormat.
|
|
750
|
+
* @defaultValue TimestampFormat.datetime
|
|
709
751
|
*/
|
|
710
752
|
format;
|
|
711
753
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
@@ -713,13 +755,13 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
713
755
|
/**
|
|
714
756
|
* Constructs a new `TimestampElementClass` instance.
|
|
715
757
|
*
|
|
716
|
-
* @param value -
|
|
717
|
-
* @param options - Optional component settings. (format (defaults to `
|
|
758
|
+
* @param value - The timestamp in milliseconds
|
|
759
|
+
* @param options - Optional component settings. (format (defaults to `datetime`), modifiers).
|
|
718
760
|
*/
|
|
719
761
|
constructor(value, options) {
|
|
720
762
|
super();
|
|
721
763
|
this.value = value;
|
|
722
|
-
this.format = options?.format ?? TimestampFormat.
|
|
764
|
+
this.format = options?.format ?? TimestampFormat.datetime;
|
|
723
765
|
this.modifiers = options?.modifiers;
|
|
724
766
|
}
|
|
725
767
|
}
|
|
@@ -762,31 +804,6 @@ export class ImageReferenceElementClass extends BaseUiElement {
|
|
|
762
804
|
this.placeholder = options?.placeholder;
|
|
763
805
|
}
|
|
764
806
|
}
|
|
765
|
-
/**
|
|
766
|
-
* Class implementation of the `DominantColourSetElement` interface.
|
|
767
|
-
*
|
|
768
|
-
* @remarks
|
|
769
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
770
|
-
*/
|
|
771
|
-
export class DominantColourSetElementClass extends BaseUiElement {
|
|
772
|
-
/**
|
|
773
|
-
* Discriminator identifier for `DominantColourSetElement`.
|
|
774
|
-
*
|
|
775
|
-
* @defaultValue "color-set"
|
|
776
|
-
*/
|
|
777
|
-
type = "color-set";
|
|
778
|
-
/** List of hexadecimal color strings in descending priority */
|
|
779
|
-
colors;
|
|
780
|
-
/**
|
|
781
|
-
* Constructs a new `DominantColourSetElementClass` instance.
|
|
782
|
-
*
|
|
783
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
784
|
-
*/
|
|
785
|
-
constructor(colors) {
|
|
786
|
-
super();
|
|
787
|
-
this.colors = colors ? [...colors] : [];
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
807
|
/**
|
|
791
808
|
* Class implementation of the `ButtonActionElement` interface.
|
|
792
809
|
*
|
|
@@ -954,15 +971,15 @@ export class SlotClass extends ViewKitNode {
|
|
|
954
971
|
}
|
|
955
972
|
}
|
|
956
973
|
/**
|
|
957
|
-
* Class implementation of the `
|
|
974
|
+
* Class implementation of the `MultiSlotElement` interface.
|
|
958
975
|
*
|
|
959
976
|
* @remarks
|
|
960
977
|
* Multi-slot horizontal row with declared column width proportions.
|
|
961
978
|
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
962
979
|
*/
|
|
963
|
-
export class
|
|
980
|
+
export class MultiSlotElementClass extends BaseUiElement {
|
|
964
981
|
/**
|
|
965
|
-
* Discriminator identifier for `
|
|
982
|
+
* Discriminator identifier for `MultiSlotElement`.
|
|
966
983
|
*
|
|
967
984
|
* @defaultValue "multi-slot"
|
|
968
985
|
*/
|
|
@@ -972,7 +989,7 @@ export class MultiSlotRowElementClass extends BaseUiElement {
|
|
|
972
989
|
/** Proportions descriptor (e.g. "1/3 + 2/3", "equal", "1/4 + 3/4") */
|
|
973
990
|
proportions;
|
|
974
991
|
/**
|
|
975
|
-
* Constructs a new `
|
|
992
|
+
* Constructs a new `MultiSlotElementClass` instance.
|
|
976
993
|
*
|
|
977
994
|
* @param slots - List of slots comprising the row
|
|
978
995
|
* @param options - Optional component settings. (proportions).
|
|
@@ -984,15 +1001,41 @@ export class MultiSlotRowElementClass extends BaseUiElement {
|
|
|
984
1001
|
}
|
|
985
1002
|
}
|
|
986
1003
|
/**
|
|
987
|
-
* Class implementation of the `
|
|
1004
|
+
* Class implementation of the `FlowingElement` interface.
|
|
1005
|
+
*
|
|
1006
|
+
* @remarks
|
|
1007
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
1008
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1009
|
+
*/
|
|
1010
|
+
export class FlowingElementClass extends BaseUiElement {
|
|
1011
|
+
/**
|
|
1012
|
+
* Discriminator identifier for `FlowingElement`.
|
|
1013
|
+
*
|
|
1014
|
+
* @defaultValue "flowing"
|
|
1015
|
+
*/
|
|
1016
|
+
type = "flowing";
|
|
1017
|
+
/** List of child elements rendered sequentially with line wrapping */
|
|
1018
|
+
elements;
|
|
1019
|
+
/**
|
|
1020
|
+
* Constructs a new `FlowingElementClass` instance.
|
|
1021
|
+
*
|
|
1022
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1023
|
+
*/
|
|
1024
|
+
constructor(elements) {
|
|
1025
|
+
super();
|
|
1026
|
+
this.elements = elements ? [...elements] : [];
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Class implementation of the `LabelValueElement` interface.
|
|
988
1031
|
*
|
|
989
1032
|
* @remarks
|
|
990
1033
|
* Standard label and value row.
|
|
991
1034
|
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
992
1035
|
*/
|
|
993
|
-
export class
|
|
1036
|
+
export class LabelValueElementClass extends BaseUiElement {
|
|
994
1037
|
/**
|
|
995
|
-
* Discriminator identifier for `
|
|
1038
|
+
* Discriminator identifier for `LabelValueElement`.
|
|
996
1039
|
*
|
|
997
1040
|
* @defaultValue "label-value"
|
|
998
1041
|
*/
|
|
@@ -1008,7 +1051,7 @@ export class LabelValueRowElementClass extends BaseUiElement {
|
|
|
1008
1051
|
*/
|
|
1009
1052
|
withDivider;
|
|
1010
1053
|
/**
|
|
1011
|
-
* Constructs a new `
|
|
1054
|
+
* Constructs a new `LabelValueElementClass` instance.
|
|
1012
1055
|
*
|
|
1013
1056
|
* @param label - Key or descriptive label displayed muted on the left
|
|
1014
1057
|
* @param value - Rendered value element on the right
|
|
@@ -1468,7 +1511,7 @@ export class UiContainerBuilder {
|
|
|
1468
1511
|
* @remarks
|
|
1469
1512
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
1470
1513
|
*
|
|
1471
|
-
* @param value - Aspect ratio
|
|
1514
|
+
* @param value - Aspect ratio numerical expression
|
|
1472
1515
|
* @param options - Optional component settings (modifiers).
|
|
1473
1516
|
* @returns This builder instance for method chaining.
|
|
1474
1517
|
*/
|
|
@@ -1479,10 +1522,10 @@ export class UiContainerBuilder {
|
|
|
1479
1522
|
* Appends a `ColourElement` component.
|
|
1480
1523
|
*
|
|
1481
1524
|
* @remarks
|
|
1482
|
-
* Single color
|
|
1525
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
1483
1526
|
*
|
|
1484
1527
|
* @param value - Hexadecimal color code
|
|
1485
|
-
* @param options - Optional component settings (modifiers).
|
|
1528
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1486
1529
|
* @returns This builder instance for method chaining.
|
|
1487
1530
|
*/
|
|
1488
1531
|
addColour(value, options) {
|
|
@@ -1492,14 +1535,14 @@ export class UiContainerBuilder {
|
|
|
1492
1535
|
* Appends a `ColourElement` component.
|
|
1493
1536
|
*
|
|
1494
1537
|
* @remarks
|
|
1495
|
-
* Single color
|
|
1538
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
1496
1539
|
*
|
|
1497
1540
|
* @param value - Hexadecimal color code
|
|
1498
|
-
* @param options - Optional component settings (modifiers).
|
|
1541
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1499
1542
|
* @returns This builder instance for method chaining.
|
|
1500
1543
|
*/
|
|
1501
|
-
|
|
1502
|
-
return this.add(
|
|
1544
|
+
addColor(value, options) {
|
|
1545
|
+
return this.add(color(value, options));
|
|
1503
1546
|
}
|
|
1504
1547
|
/**
|
|
1505
1548
|
* Appends a `NumberUnboundedElement` component.
|
|
@@ -1598,8 +1641,8 @@ export class UiContainerBuilder {
|
|
|
1598
1641
|
* @remarks
|
|
1599
1642
|
* Formatted date and time representation.
|
|
1600
1643
|
*
|
|
1601
|
-
* @param value -
|
|
1602
|
-
* @param options - Optional component settings (format (defaults to `
|
|
1644
|
+
* @param value - The timestamp in milliseconds
|
|
1645
|
+
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
1603
1646
|
* @returns This builder instance for method chaining.
|
|
1604
1647
|
*/
|
|
1605
1648
|
addTimestamp(value, options) {
|
|
@@ -1631,30 +1674,6 @@ export class UiContainerBuilder {
|
|
|
1631
1674
|
addImageRef(src, options) {
|
|
1632
1675
|
return this.add(imageRef(src, options));
|
|
1633
1676
|
}
|
|
1634
|
-
/**
|
|
1635
|
-
* Appends a `DominantColourSetElement` component.
|
|
1636
|
-
*
|
|
1637
|
-
* @remarks
|
|
1638
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
1639
|
-
*
|
|
1640
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
1641
|
-
* @returns This builder instance for method chaining.
|
|
1642
|
-
*/
|
|
1643
|
-
addDominantColourSet(colors) {
|
|
1644
|
-
return this.add(dominantColourSet(colors));
|
|
1645
|
-
}
|
|
1646
|
-
/**
|
|
1647
|
-
* Appends a `DominantColourSetElement` component.
|
|
1648
|
-
*
|
|
1649
|
-
* @remarks
|
|
1650
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
1651
|
-
*
|
|
1652
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
1653
|
-
* @returns This builder instance for method chaining.
|
|
1654
|
-
*/
|
|
1655
|
-
addDominantColors(colors) {
|
|
1656
|
-
return this.add(dominantColors(colors));
|
|
1657
|
-
}
|
|
1658
1677
|
/**
|
|
1659
1678
|
* Appends a `MarkdownBlockElement` component.
|
|
1660
1679
|
*
|
|
@@ -1708,21 +1727,7 @@ export class UiContainerBuilder {
|
|
|
1708
1727
|
return this.add(html(content, options));
|
|
1709
1728
|
}
|
|
1710
1729
|
/**
|
|
1711
|
-
* Appends a `
|
|
1712
|
-
*
|
|
1713
|
-
* @remarks
|
|
1714
|
-
* Multi-slot horizontal row with declared column width proportions.
|
|
1715
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1716
|
-
*
|
|
1717
|
-
* @param slots - List of slots comprising the row
|
|
1718
|
-
* @param options - Optional component settings (proportions).
|
|
1719
|
-
* @returns This builder instance for method chaining.
|
|
1720
|
-
*/
|
|
1721
|
-
addMultiSlotRow(slots, options) {
|
|
1722
|
-
return this.add(multiSlotRow(slots, options));
|
|
1723
|
-
}
|
|
1724
|
-
/**
|
|
1725
|
-
* Appends a `MultiSlotRowElement` component.
|
|
1730
|
+
* Appends a `MultiSlotElement` component.
|
|
1726
1731
|
*
|
|
1727
1732
|
* @remarks
|
|
1728
1733
|
* Multi-slot horizontal row with declared column width proportions.
|
|
@@ -1736,22 +1741,20 @@ export class UiContainerBuilder {
|
|
|
1736
1741
|
return this.add(multiSlot(slots, options));
|
|
1737
1742
|
}
|
|
1738
1743
|
/**
|
|
1739
|
-
* Appends a `
|
|
1744
|
+
* Appends a `FlowingElement` component.
|
|
1740
1745
|
*
|
|
1741
1746
|
* @remarks
|
|
1742
|
-
*
|
|
1743
|
-
*
|
|
1747
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
1748
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1744
1749
|
*
|
|
1745
|
-
* @param
|
|
1746
|
-
* @param value - Rendered value element on the right
|
|
1747
|
-
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
1750
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1748
1751
|
* @returns This builder instance for method chaining.
|
|
1749
1752
|
*/
|
|
1750
|
-
|
|
1751
|
-
return this.add(
|
|
1753
|
+
addFlowing(elements) {
|
|
1754
|
+
return this.add(flowing(elements));
|
|
1752
1755
|
}
|
|
1753
1756
|
/**
|
|
1754
|
-
* Appends a `
|
|
1757
|
+
* Appends a `LabelValueElement` component.
|
|
1755
1758
|
*
|
|
1756
1759
|
* @remarks
|
|
1757
1760
|
* Standard label and value row.
|
|
@@ -2073,7 +2076,7 @@ export class UiCardBuilder {
|
|
|
2073
2076
|
* @remarks
|
|
2074
2077
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
2075
2078
|
*
|
|
2076
|
-
* @param value - Aspect ratio
|
|
2079
|
+
* @param value - Aspect ratio numerical expression
|
|
2077
2080
|
* @param options - Optional component settings (modifiers).
|
|
2078
2081
|
* @returns This builder instance for method chaining.
|
|
2079
2082
|
*/
|
|
@@ -2084,10 +2087,10 @@ export class UiCardBuilder {
|
|
|
2084
2087
|
* Appends a `ColourElement` component.
|
|
2085
2088
|
*
|
|
2086
2089
|
* @remarks
|
|
2087
|
-
* Single color
|
|
2090
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2088
2091
|
*
|
|
2089
2092
|
* @param value - Hexadecimal color code
|
|
2090
|
-
* @param options - Optional component settings (modifiers).
|
|
2093
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2091
2094
|
* @returns This builder instance for method chaining.
|
|
2092
2095
|
*/
|
|
2093
2096
|
addColour(value, options) {
|
|
@@ -2097,14 +2100,14 @@ export class UiCardBuilder {
|
|
|
2097
2100
|
* Appends a `ColourElement` component.
|
|
2098
2101
|
*
|
|
2099
2102
|
* @remarks
|
|
2100
|
-
* Single color
|
|
2103
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2101
2104
|
*
|
|
2102
2105
|
* @param value - Hexadecimal color code
|
|
2103
|
-
* @param options - Optional component settings (modifiers).
|
|
2106
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2104
2107
|
* @returns This builder instance for method chaining.
|
|
2105
2108
|
*/
|
|
2106
|
-
|
|
2107
|
-
return this.add(
|
|
2109
|
+
addColor(value, options) {
|
|
2110
|
+
return this.add(color(value, options));
|
|
2108
2111
|
}
|
|
2109
2112
|
/**
|
|
2110
2113
|
* Appends a `NumberUnboundedElement` component.
|
|
@@ -2203,8 +2206,8 @@ export class UiCardBuilder {
|
|
|
2203
2206
|
* @remarks
|
|
2204
2207
|
* Formatted date and time representation.
|
|
2205
2208
|
*
|
|
2206
|
-
* @param value -
|
|
2207
|
-
* @param options - Optional component settings (format (defaults to `
|
|
2209
|
+
* @param value - The timestamp in milliseconds
|
|
2210
|
+
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
2208
2211
|
* @returns This builder instance for method chaining.
|
|
2209
2212
|
*/
|
|
2210
2213
|
addTimestamp(value, options) {
|
|
@@ -2236,30 +2239,6 @@ export class UiCardBuilder {
|
|
|
2236
2239
|
addImageRef(src, options) {
|
|
2237
2240
|
return this.add(imageRef(src, options));
|
|
2238
2241
|
}
|
|
2239
|
-
/**
|
|
2240
|
-
* Appends a `DominantColourSetElement` component.
|
|
2241
|
-
*
|
|
2242
|
-
* @remarks
|
|
2243
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2244
|
-
*
|
|
2245
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2246
|
-
* @returns This builder instance for method chaining.
|
|
2247
|
-
*/
|
|
2248
|
-
addDominantColourSet(colors) {
|
|
2249
|
-
return this.add(dominantColourSet(colors));
|
|
2250
|
-
}
|
|
2251
|
-
/**
|
|
2252
|
-
* Appends a `DominantColourSetElement` component.
|
|
2253
|
-
*
|
|
2254
|
-
* @remarks
|
|
2255
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2256
|
-
*
|
|
2257
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2258
|
-
* @returns This builder instance for method chaining.
|
|
2259
|
-
*/
|
|
2260
|
-
addDominantColors(colors) {
|
|
2261
|
-
return this.add(dominantColors(colors));
|
|
2262
|
-
}
|
|
2263
2242
|
/**
|
|
2264
2243
|
* Appends a `MarkdownBlockElement` component.
|
|
2265
2244
|
*
|
|
@@ -2313,21 +2292,7 @@ export class UiCardBuilder {
|
|
|
2313
2292
|
return this.add(html(content, options));
|
|
2314
2293
|
}
|
|
2315
2294
|
/**
|
|
2316
|
-
* Appends a `
|
|
2317
|
-
*
|
|
2318
|
-
* @remarks
|
|
2319
|
-
* Multi-slot horizontal row with declared column width proportions.
|
|
2320
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2321
|
-
*
|
|
2322
|
-
* @param slots - List of slots comprising the row
|
|
2323
|
-
* @param options - Optional component settings (proportions).
|
|
2324
|
-
* @returns This builder instance for method chaining.
|
|
2325
|
-
*/
|
|
2326
|
-
addMultiSlotRow(slots, options) {
|
|
2327
|
-
return this.add(multiSlotRow(slots, options));
|
|
2328
|
-
}
|
|
2329
|
-
/**
|
|
2330
|
-
* Appends a `MultiSlotRowElement` component.
|
|
2295
|
+
* Appends a `MultiSlotElement` component.
|
|
2331
2296
|
*
|
|
2332
2297
|
* @remarks
|
|
2333
2298
|
* Multi-slot horizontal row with declared column width proportions.
|
|
@@ -2341,22 +2306,20 @@ export class UiCardBuilder {
|
|
|
2341
2306
|
return this.add(multiSlot(slots, options));
|
|
2342
2307
|
}
|
|
2343
2308
|
/**
|
|
2344
|
-
* Appends a `
|
|
2309
|
+
* Appends a `FlowingElement` component.
|
|
2345
2310
|
*
|
|
2346
2311
|
* @remarks
|
|
2347
|
-
*
|
|
2348
|
-
*
|
|
2312
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
2313
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
2349
2314
|
*
|
|
2350
|
-
* @param
|
|
2351
|
-
* @param value - Rendered value element on the right
|
|
2352
|
-
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
2315
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
2353
2316
|
* @returns This builder instance for method chaining.
|
|
2354
2317
|
*/
|
|
2355
|
-
|
|
2356
|
-
return this.add(
|
|
2318
|
+
addFlowing(elements) {
|
|
2319
|
+
return this.add(flowing(elements));
|
|
2357
2320
|
}
|
|
2358
2321
|
/**
|
|
2359
|
-
* Appends a `
|
|
2322
|
+
* Appends a `LabelValueElement` component.
|
|
2360
2323
|
*
|
|
2361
2324
|
* @remarks
|
|
2362
2325
|
* Standard label and value row.
|
|
@@ -2701,7 +2664,7 @@ export function identifier(value, options) {
|
|
|
2701
2664
|
* @remarks
|
|
2702
2665
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
2703
2666
|
*
|
|
2704
|
-
* @param value - Aspect ratio
|
|
2667
|
+
* @param value - Aspect ratio numerical expression
|
|
2705
2668
|
* @param options - Optional settings (modifiers).
|
|
2706
2669
|
* @returns A strongly-typed `RatioElement` object.
|
|
2707
2670
|
*/
|
|
@@ -2716,16 +2679,20 @@ export function ratio(value, options) {
|
|
|
2716
2679
|
* Creates a `ColourElement` component instance.
|
|
2717
2680
|
*
|
|
2718
2681
|
* @remarks
|
|
2719
|
-
* Single color
|
|
2682
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2720
2683
|
*
|
|
2721
2684
|
* @param value - Hexadecimal color code
|
|
2722
|
-
* @param options - Optional settings (modifiers).
|
|
2685
|
+
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2723
2686
|
* @returns A strongly-typed `ColourElement` object.
|
|
2724
2687
|
*/
|
|
2725
2688
|
export function colour(value, options) {
|
|
2726
2689
|
return {
|
|
2727
|
-
type: "color
|
|
2690
|
+
type: "color",
|
|
2728
2691
|
value,
|
|
2692
|
+
label: options?.label,
|
|
2693
|
+
showText: options?.showText ?? true,
|
|
2694
|
+
shape: options?.shape ?? Shape.circle,
|
|
2695
|
+
size: options?.size ?? Size.medium,
|
|
2729
2696
|
modifiers: options?.modifiers
|
|
2730
2697
|
};
|
|
2731
2698
|
}
|
|
@@ -2733,16 +2700,20 @@ export function colour(value, options) {
|
|
|
2733
2700
|
* Creates a `ColourElement` component instance.
|
|
2734
2701
|
*
|
|
2735
2702
|
* @remarks
|
|
2736
|
-
* Single color
|
|
2703
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2737
2704
|
*
|
|
2738
2705
|
* @param value - Hexadecimal color code
|
|
2739
|
-
* @param options - Optional settings (modifiers).
|
|
2706
|
+
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2740
2707
|
* @returns A strongly-typed `ColourElement` object.
|
|
2741
2708
|
*/
|
|
2742
|
-
export function
|
|
2709
|
+
export function color(value, options) {
|
|
2743
2710
|
return {
|
|
2744
|
-
type: "color
|
|
2711
|
+
type: "color",
|
|
2745
2712
|
value,
|
|
2713
|
+
label: options?.label,
|
|
2714
|
+
showText: options?.showText ?? true,
|
|
2715
|
+
shape: options?.shape ?? Shape.circle,
|
|
2716
|
+
size: options?.size ?? Size.medium,
|
|
2746
2717
|
modifiers: options?.modifiers
|
|
2747
2718
|
};
|
|
2748
2719
|
}
|
|
@@ -2885,15 +2856,15 @@ export function booleanBadge(value, options) {
|
|
|
2885
2856
|
* @remarks
|
|
2886
2857
|
* Formatted date and time representation.
|
|
2887
2858
|
*
|
|
2888
|
-
* @param value -
|
|
2889
|
-
* @param options - Optional settings (format (defaults to `
|
|
2859
|
+
* @param value - The timestamp in milliseconds
|
|
2860
|
+
* @param options - Optional settings (format (defaults to `datetime`), modifiers).
|
|
2890
2861
|
* @returns A strongly-typed `TimestampElement` object.
|
|
2891
2862
|
*/
|
|
2892
2863
|
export function timestamp(value, options) {
|
|
2893
2864
|
return {
|
|
2894
2865
|
type: "timestamp",
|
|
2895
2866
|
value,
|
|
2896
|
-
format: options?.format ?? TimestampFormat.
|
|
2867
|
+
format: options?.format ?? TimestampFormat.datetime,
|
|
2897
2868
|
modifiers: options?.modifiers
|
|
2898
2869
|
};
|
|
2899
2870
|
}
|
|
@@ -2935,36 +2906,6 @@ export function imageRef(src, options) {
|
|
|
2935
2906
|
placeholder: options?.placeholder
|
|
2936
2907
|
};
|
|
2937
2908
|
}
|
|
2938
|
-
/**
|
|
2939
|
-
* Creates a `DominantColourSetElement` component instance.
|
|
2940
|
-
*
|
|
2941
|
-
* @remarks
|
|
2942
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2943
|
-
*
|
|
2944
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2945
|
-
* @returns A strongly-typed `DominantColourSetElement` object.
|
|
2946
|
-
*/
|
|
2947
|
-
export function dominantColourSet(colors) {
|
|
2948
|
-
return {
|
|
2949
|
-
type: "color-set",
|
|
2950
|
-
colors: [...colors]
|
|
2951
|
-
};
|
|
2952
|
-
}
|
|
2953
|
-
/**
|
|
2954
|
-
* Creates a `DominantColourSetElement` component instance.
|
|
2955
|
-
*
|
|
2956
|
-
* @remarks
|
|
2957
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2958
|
-
*
|
|
2959
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2960
|
-
* @returns A strongly-typed `DominantColourSetElement` object.
|
|
2961
|
-
*/
|
|
2962
|
-
export function dominantColors(colors) {
|
|
2963
|
-
return {
|
|
2964
|
-
type: "color-set",
|
|
2965
|
-
colors: [...colors]
|
|
2966
|
-
};
|
|
2967
|
-
}
|
|
2968
2909
|
/**
|
|
2969
2910
|
* Creates a `ButtonActionElement` component instance.
|
|
2970
2911
|
*
|
|
@@ -3091,7 +3032,7 @@ export function slot(content, options) {
|
|
|
3091
3032
|
};
|
|
3092
3033
|
}
|
|
3093
3034
|
/**
|
|
3094
|
-
* Creates a `
|
|
3035
|
+
* Creates a `MultiSlotElement` component instance.
|
|
3095
3036
|
*
|
|
3096
3037
|
* @remarks
|
|
3097
3038
|
* Multi-slot horizontal row with declared column width proportions.
|
|
@@ -3099,25 +3040,7 @@ export function slot(content, options) {
|
|
|
3099
3040
|
*
|
|
3100
3041
|
* @param slots - List of slots comprising the row
|
|
3101
3042
|
* @param options - Optional settings (proportions).
|
|
3102
|
-
* @returns A strongly-typed `
|
|
3103
|
-
*/
|
|
3104
|
-
export function multiSlotRow(slots, options) {
|
|
3105
|
-
return {
|
|
3106
|
-
type: "multi-slot",
|
|
3107
|
-
slots: [...slots],
|
|
3108
|
-
proportions: options?.proportions
|
|
3109
|
-
};
|
|
3110
|
-
}
|
|
3111
|
-
/**
|
|
3112
|
-
* Creates a `MultiSlotRowElement` component instance.
|
|
3113
|
-
*
|
|
3114
|
-
* @remarks
|
|
3115
|
-
* Multi-slot horizontal row with declared column width proportions.
|
|
3116
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
3117
|
-
*
|
|
3118
|
-
* @param slots - List of slots comprising the row
|
|
3119
|
-
* @param options - Optional settings (proportions).
|
|
3120
|
-
* @returns A strongly-typed `MultiSlotRowElement` object.
|
|
3043
|
+
* @returns A strongly-typed `MultiSlotElement` object.
|
|
3121
3044
|
*/
|
|
3122
3045
|
export function multiSlot(slots, options) {
|
|
3123
3046
|
return {
|
|
@@ -3127,27 +3050,23 @@ export function multiSlot(slots, options) {
|
|
|
3127
3050
|
};
|
|
3128
3051
|
}
|
|
3129
3052
|
/**
|
|
3130
|
-
* Creates a `
|
|
3053
|
+
* Creates a `FlowingElement` component instance.
|
|
3131
3054
|
*
|
|
3132
3055
|
* @remarks
|
|
3133
|
-
*
|
|
3134
|
-
*
|
|
3056
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
3057
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
3135
3058
|
*
|
|
3136
|
-
* @param
|
|
3137
|
-
* @
|
|
3138
|
-
* @param options - Optional settings (withDivider (defaults to `false`)).
|
|
3139
|
-
* @returns A strongly-typed `LabelValueRowElement` object.
|
|
3059
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
3060
|
+
* @returns A strongly-typed `FlowingElement` object.
|
|
3140
3061
|
*/
|
|
3141
|
-
export function
|
|
3062
|
+
export function flowing(elements) {
|
|
3142
3063
|
return {
|
|
3143
|
-
type: "
|
|
3144
|
-
|
|
3145
|
-
value,
|
|
3146
|
-
withDivider: options?.withDivider ?? false
|
|
3064
|
+
type: "flowing",
|
|
3065
|
+
elements: [...elements]
|
|
3147
3066
|
};
|
|
3148
3067
|
}
|
|
3149
3068
|
/**
|
|
3150
|
-
* Creates a `
|
|
3069
|
+
* Creates a `LabelValueElement` component instance.
|
|
3151
3070
|
*
|
|
3152
3071
|
* @remarks
|
|
3153
3072
|
* Standard label and value row.
|
|
@@ -3156,7 +3075,7 @@ export function labelValueRow(label, value, options) {
|
|
|
3156
3075
|
* @param label - Key or descriptive label displayed muted on the left
|
|
3157
3076
|
* @param value - Rendered value element on the right
|
|
3158
3077
|
* @param options - Optional settings (withDivider (defaults to `false`)).
|
|
3159
|
-
* @returns A strongly-typed `
|
|
3078
|
+
* @returns A strongly-typed `LabelValueElement` object.
|
|
3160
3079
|
*/
|
|
3161
3080
|
export function labelValue(label, value, options) {
|
|
3162
3081
|
return {
|
|
@@ -3481,7 +3400,7 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3481
3400
|
return isIdentifierElement(element, true);
|
|
3482
3401
|
case "ratio":
|
|
3483
3402
|
return isRatioElement(element, true);
|
|
3484
|
-
case "color
|
|
3403
|
+
case "color":
|
|
3485
3404
|
return isColourElement(element, true);
|
|
3486
3405
|
case "number-unbounded":
|
|
3487
3406
|
return isNumberUnboundedElement(element, true);
|
|
@@ -3497,16 +3416,16 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3497
3416
|
return isTimestampElement(element, true);
|
|
3498
3417
|
case "image-ref":
|
|
3499
3418
|
return isImageReferenceElement(element, true);
|
|
3500
|
-
case "color-set":
|
|
3501
|
-
return isDominantColourSetElement(element, true);
|
|
3502
3419
|
case "markdown":
|
|
3503
3420
|
return isMarkdownBlockElement(element, true);
|
|
3504
3421
|
case "html":
|
|
3505
3422
|
return isHtmlBlockElement(element, true);
|
|
3506
3423
|
case "multi-slot":
|
|
3507
|
-
return
|
|
3424
|
+
return isMultiSlotElement(element, true);
|
|
3425
|
+
case "flowing":
|
|
3426
|
+
return isFlowingElement(element, true);
|
|
3508
3427
|
case "label-value":
|
|
3509
|
-
return
|
|
3428
|
+
return isLabelValueElement(element, true);
|
|
3510
3429
|
case "table":
|
|
3511
3430
|
return isTableElement(element, true);
|
|
3512
3431
|
case "repeating-group":
|
|
@@ -3663,7 +3582,7 @@ export function isRatioElement(value, withDeepValidation = false) {
|
|
|
3663
3582
|
return true;
|
|
3664
3583
|
}
|
|
3665
3584
|
const element = value;
|
|
3666
|
-
return ("value" in value && typeof element.value === "
|
|
3585
|
+
return ("value" in value && typeof element.value === "number") &&
|
|
3667
3586
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3668
3587
|
}
|
|
3669
3588
|
/**
|
|
@@ -3671,10 +3590,10 @@ export function isRatioElement(value, withDeepValidation = false) {
|
|
|
3671
3590
|
*
|
|
3672
3591
|
* @param value - The value to inspect.
|
|
3673
3592
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3674
|
-
* @returns `true` if the value is a `ColourElement` (type = "color
|
|
3593
|
+
* @returns `true` if the value is a `ColourElement` (type = "color"), otherwise `false`.
|
|
3675
3594
|
*/
|
|
3676
3595
|
export function isColourElement(value, withDeepValidation = false) {
|
|
3677
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "color
|
|
3596
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "color") {
|
|
3678
3597
|
return false;
|
|
3679
3598
|
}
|
|
3680
3599
|
if (!withDeepValidation) {
|
|
@@ -3682,6 +3601,10 @@ export function isColourElement(value, withDeepValidation = false) {
|
|
|
3682
3601
|
}
|
|
3683
3602
|
const element = value;
|
|
3684
3603
|
return ("value" in value && typeof element.value === "string") &&
|
|
3604
|
+
(element.label === undefined || typeof element.label === "string") &&
|
|
3605
|
+
(element.showText === undefined || typeof element.showText === "boolean") &&
|
|
3606
|
+
(element.shape === undefined || Object.values(Shape).includes(element.shape)) &&
|
|
3607
|
+
(element.size === undefined || Object.values(Size).includes(element.size)) &&
|
|
3685
3608
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3686
3609
|
}
|
|
3687
3610
|
/**
|
|
@@ -3798,7 +3721,7 @@ export function isTimestampElement(value, withDeepValidation = false) {
|
|
|
3798
3721
|
return true;
|
|
3799
3722
|
}
|
|
3800
3723
|
const element = value;
|
|
3801
|
-
return ("value" in value && typeof element.value === "
|
|
3724
|
+
return ("value" in value && typeof element.value === "number") &&
|
|
3802
3725
|
(element.format === undefined || Object.values(TimestampFormat).includes(element.format)) &&
|
|
3803
3726
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3804
3727
|
}
|
|
@@ -3822,23 +3745,6 @@ export function isImageReferenceElement(value, withDeepValidation = false) {
|
|
|
3822
3745
|
(element.aspectRatio === undefined || typeof element.aspectRatio === "string") &&
|
|
3823
3746
|
(element.placeholder === undefined || typeof element.placeholder === "string");
|
|
3824
3747
|
}
|
|
3825
|
-
/**
|
|
3826
|
-
* Type guard predicate narrowing a value to `DominantColourSetElement`.
|
|
3827
|
-
*
|
|
3828
|
-
* @param value - The value to inspect.
|
|
3829
|
-
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3830
|
-
* @returns `true` if the value is a `DominantColourSetElement` (type = "color-set"), otherwise `false`.
|
|
3831
|
-
*/
|
|
3832
|
-
export function isDominantColourSetElement(value, withDeepValidation = false) {
|
|
3833
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "color-set") {
|
|
3834
|
-
return false;
|
|
3835
|
-
}
|
|
3836
|
-
if (!withDeepValidation) {
|
|
3837
|
-
return true;
|
|
3838
|
-
}
|
|
3839
|
-
const element = value;
|
|
3840
|
-
return ("colors" in value && (Array.isArray(element.colors) && element.colors.every((item) => typeof item === "string")));
|
|
3841
|
-
}
|
|
3842
3748
|
/**
|
|
3843
3749
|
* Type guard predicate narrowing a value to `MarkdownBlockElement`.
|
|
3844
3750
|
*
|
|
@@ -3876,13 +3782,13 @@ export function isHtmlBlockElement(value, withDeepValidation = false) {
|
|
|
3876
3782
|
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3877
3783
|
}
|
|
3878
3784
|
/**
|
|
3879
|
-
* Type guard predicate narrowing a value to `
|
|
3785
|
+
* Type guard predicate narrowing a value to `MultiSlotElement`.
|
|
3880
3786
|
*
|
|
3881
3787
|
* @param value - The value to inspect.
|
|
3882
3788
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3883
|
-
* @returns `true` if the value is a `
|
|
3789
|
+
* @returns `true` if the value is a `MultiSlotElement` (type = "multi-slot"), otherwise `false`.
|
|
3884
3790
|
*/
|
|
3885
|
-
export function
|
|
3791
|
+
export function isMultiSlotElement(value, withDeepValidation = false) {
|
|
3886
3792
|
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "multi-slot") {
|
|
3887
3793
|
return false;
|
|
3888
3794
|
}
|
|
@@ -3894,13 +3800,30 @@ export function isMultiSlotRowElement(value, withDeepValidation = false) {
|
|
|
3894
3800
|
("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
3895
3801
|
}
|
|
3896
3802
|
/**
|
|
3897
|
-
* Type guard predicate narrowing a value to `
|
|
3803
|
+
* Type guard predicate narrowing a value to `FlowingElement`.
|
|
3804
|
+
*
|
|
3805
|
+
* @param value - The value to inspect.
|
|
3806
|
+
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3807
|
+
* @returns `true` if the value is a `FlowingElement` (type = "flowing"), otherwise `false`.
|
|
3808
|
+
*/
|
|
3809
|
+
export function isFlowingElement(value, withDeepValidation = false) {
|
|
3810
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "flowing") {
|
|
3811
|
+
return false;
|
|
3812
|
+
}
|
|
3813
|
+
if (!withDeepValidation) {
|
|
3814
|
+
return true;
|
|
3815
|
+
}
|
|
3816
|
+
const element = value;
|
|
3817
|
+
return ("elements" in value && (Array.isArray(element.elements) && element.elements.every((item) => isUiElement(item, true))));
|
|
3818
|
+
}
|
|
3819
|
+
/**
|
|
3820
|
+
* Type guard predicate narrowing a value to `LabelValueElement`.
|
|
3898
3821
|
*
|
|
3899
3822
|
* @param value - The value to inspect.
|
|
3900
3823
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3901
|
-
* @returns `true` if the value is a `
|
|
3824
|
+
* @returns `true` if the value is a `LabelValueElement` (type = "label-value"), otherwise `false`.
|
|
3902
3825
|
*/
|
|
3903
|
-
export function
|
|
3826
|
+
export function isLabelValueElement(value, withDeepValidation = false) {
|
|
3904
3827
|
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "label-value") {
|
|
3905
3828
|
return false;
|
|
3906
3829
|
}
|