@oods/component-contracts 0.3.3 → 0.4.1
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/README.md +1 -1
- package/dist/index.cjs +1131 -49
- package/dist/index.d.cts +355 -5
- package/dist/index.d.ts +355 -5
- package/dist/index.js +1116 -50
- package/package.json +1 -1
- package/registry/component-capability-additions.v1.json +288 -0
- package/registry/component-capability-ledger.v1.json +285 -1
- package/registry/component-intake.v1.json +116 -1
- package/registry/component-obligation-scope.v1.json +2 -2
- package/registry/component-reconciliation.proposed.v2.json +78 -2
- package/registry/lifecycle-status-tones.json +55 -0
- package/registry/status-map.json +205 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const COMPONENT_CLASSIFICATIONS: readonly ["native", "recipe", "alias", "authoring-only", "merged", "retired"];
|
|
2
2
|
type ComponentClassification = (typeof COMPONENT_CLASSIFICATIONS)[number];
|
|
3
|
-
declare const NUCLEUS_COMPONENT_IDS: readonly ["AddressCollectionPanel", "AddressEditor", "AddressSummaryBadge", "AddressValidationTimeline", "ArchiveEvent", "ArchivePill", "ArchiveSummary", "ArchivedRowOverlay", "AuditEvent", "AuditSummaryCard", "AuditTimeline", "Badge", "Banner", "BillingAmountInput", "BillingCardMeta", "BillingIntervalSelector", "BillingSummaryBadge", "Button", "CancellationBadge", "CancellationEvent", "CancellationForm", "CancellationSummary", "Card", "CardHeader", "Checkbox", "ClassificationBadge", "ClassificationEditor", "ClassificationPanel", "ColorStatePicker", "ColorSwatch", "ColorizedBadge", "CommunicationDetailPanel", "CycleProgressCard", "DatePicker", "DetailHeader", "FilterPanel", "FormLabelGroup", "GeoFieldMappingForm", "GeoResolutionBadge", "GeocodablePreview", "Grid", "InlineLabel", "Input", "LabelCell", "MembershipAuditTimeline", "MembershipPanel", "MessageEventTimeline", "MessageStatusBadge", "OwnerBadge", "OwnershipMeta", "OwnershipSummary", "PaginationBar", "PaymentEventTimeline", "PaymentTimeline", "PreferenceEditor", "PreferencePanel", "PreferenceSummaryBadge", "PreferenceTimeline", "PriceBadge", "PriceCardMeta", "PriceSummary", "RelativeTimestamp", "RoleAssignmentForm", "RoleBadgeList", "SearchInput", "Select", "SortIndicator", "Stack", "StateTransitionEvent", "StatusBadge", "StatusColorLegend", "StatusSelector", "StatusTimeline", "Table", "Tabs", "TagInput", "TagManager", "TagPills", "TagSummary", "TemplatePicker", "Text", "Textarea", "TimelineEntryLabel", "VizAreaControls", "VizAreaPreview", "VizAxisControls", "VizAxisSummary", "VizColorControls", "VizColorLegendConfig", "VizEncodingBadge", "VizGraphPreview", "VizHeatmapControls", "VizHeatmapPreview", "VizLineControls", "VizLinePreview", "VizMarkControls", "VizMarkPreview", "VizOpacityControls", "VizOpacitySummary", "VizPointControls", "VizPointPreview", "VizRoleBadge", "VizScaleControls", "VizScaleSummary", "VizScatterControls", "VizScatterPreview", "VizShapeControls", "VizShapeLegend", "VizSizeControls", "VizSizeSummary"];
|
|
3
|
+
declare const NUCLEUS_COMPONENT_IDS: readonly ["AddressCollectionPanel", "AddressEditor", "AddressSummaryBadge", "AddressValidationTimeline", "ArchiveEvent", "ArchivePill", "ArchiveSummary", "ArchivedRowOverlay", "AuditEvent", "AuditSummaryCard", "AuditTimeline", "Badge", "Banner", "BillingAmountInput", "BillingCardMeta", "BillingIntervalSelector", "BillingSummaryBadge", "Button", "CancellationBadge", "CancellationEvent", "CancellationForm", "CancellationSummary", "Card", "CardHeader", "Checkbox", "ClassificationBadge", "ClassificationEditor", "ClassificationPanel", "ColorStatePicker", "ColorSwatch", "ColorizedBadge", "Combobox", "CommunicationDetailPanel", "CycleProgressCard", "DatePicker", "DetailHeader", "Dialog", "FilterPanel", "FormLabelGroup", "GeoFieldMappingForm", "GeoResolutionBadge", "GeocodablePreview", "Grid", "InlineLabel", "Input", "LabelCell", "MembershipAuditTimeline", "MembershipPanel", "MessageEventTimeline", "MessageStatusBadge", "OwnerBadge", "OwnershipMeta", "OwnershipSummary", "PaginationBar", "PaymentEventTimeline", "PaymentTimeline", "PreferenceEditor", "PreferencePanel", "PreferenceSummaryBadge", "PreferenceTimeline", "PriceBadge", "PriceCardMeta", "PriceSummary", "RelativeTimestamp", "RoleAssignmentForm", "RoleBadgeList", "SearchInput", "SegmentedControl", "Select", "SortIndicator", "Stack", "StateTransitionEvent", "StatusBadge", "StatusColorLegend", "StatusSelector", "StatusTimeline", "Switch", "Table", "Tabs", "TagInput", "TagManager", "TagPills", "TagSummary", "TemplatePicker", "Text", "Textarea", "TimelineEntryLabel", "VizAreaControls", "VizAreaPreview", "VizAxisControls", "VizAxisSummary", "VizColorControls", "VizColorLegendConfig", "VizEncodingBadge", "VizGraphPreview", "VizHeatmapControls", "VizHeatmapPreview", "VizLineControls", "VizLinePreview", "VizMarkControls", "VizMarkPreview", "VizOpacityControls", "VizOpacitySummary", "VizPointControls", "VizPointPreview", "VizRoleBadge", "VizScaleControls", "VizScaleSummary", "VizScatterControls", "VizScatterPreview", "VizShapeControls", "VizShapeLegend", "VizSizeControls", "VizSizeSummary"];
|
|
4
4
|
type NucleusComponentId = (typeof NUCLEUS_COMPONENT_IDS)[number];
|
|
5
5
|
declare const HISTORICAL_PORTED_COMPONENT_IDS: readonly ["AuditTimeline", "CancellationSummary", "PaginationBar", "PriceBadge", "RelativeTimestamp", "SearchInput", "StatusBadge", "StatusTimeline"];
|
|
6
6
|
/** @deprecated Historical compatibility cohort; all members belong to NucleusComponentId. */
|
|
@@ -67,10 +67,19 @@ type ScenarioTrigger = {
|
|
|
67
67
|
trigger: 'keyboard' | 'pointer';
|
|
68
68
|
target: string;
|
|
69
69
|
key?: string;
|
|
70
|
+
/**
|
|
71
|
+
* s223-m02 (#2527 ruling 11): keys pressed first on the target, in the same fresh scenario, before key, whose effect is
|
|
72
|
+
* asserted. A combobox's Enter, Home and End act on an open list, which a key such as ArrowDown opens.
|
|
73
|
+
*/
|
|
74
|
+
keys?: readonly string[];
|
|
70
75
|
action?: 'click' | 'select';
|
|
71
76
|
value?: string;
|
|
77
|
+
/**
|
|
78
|
+
* active-option (s223-m02): the target's popup is open (aria-expanded true), its aria-activedescendant names the option
|
|
79
|
+
* whose text is value, and nothing was picked (no event).
|
|
80
|
+
*/
|
|
72
81
|
effect: {
|
|
73
|
-
kind: 'focus' | 'event' | 'value' | 'selected-tab';
|
|
82
|
+
kind: 'focus' | 'event' | 'value' | 'selected-tab' | 'active-option';
|
|
74
83
|
value?: unknown;
|
|
75
84
|
target?: string;
|
|
76
85
|
};
|
|
@@ -86,7 +95,7 @@ type ComponentBehavior = {
|
|
|
86
95
|
|
|
87
96
|
declare const COMPONENT_CONTRACT_VERSION: "1.1.0";
|
|
88
97
|
declare const COMPONENT_CONTRACT_VERSION_1_1: "1.1.0";
|
|
89
|
-
declare const componentContracts: Readonly<Record<"AddressCollectionPanel" | "AddressEditor" | "AddressSummaryBadge" | "AddressValidationTimeline" | "ArchiveEvent" | "ArchivePill" | "ArchiveSummary" | "ArchivedRowOverlay" | "AuditEvent" | "AuditSummaryCard" | "AuditTimeline" | "Badge" | "Banner" | "BillingAmountInput" | "BillingCardMeta" | "BillingIntervalSelector" | "BillingSummaryBadge" | "Button" | "CancellationBadge" | "CancellationEvent" | "CancellationForm" | "CancellationSummary" | "Card" | "CardHeader" | "Checkbox" | "ClassificationBadge" | "ClassificationEditor" | "ClassificationPanel" | "ColorStatePicker" | "ColorSwatch" | "ColorizedBadge" | "CommunicationDetailPanel" | "CycleProgressCard" | "DatePicker" | "DetailHeader" | "FilterPanel" | "FormLabelGroup" | "GeoFieldMappingForm" | "GeoResolutionBadge" | "GeocodablePreview" | "Grid" | "InlineLabel" | "Input" | "LabelCell" | "MembershipAuditTimeline" | "MembershipPanel" | "MessageEventTimeline" | "MessageStatusBadge" | "OwnerBadge" | "OwnershipMeta" | "OwnershipSummary" | "PaginationBar" | "PaymentEventTimeline" | "PaymentTimeline" | "PreferenceEditor" | "PreferencePanel" | "PreferenceSummaryBadge" | "PreferenceTimeline" | "PriceBadge" | "PriceCardMeta" | "PriceSummary" | "RelativeTimestamp" | "RoleAssignmentForm" | "RoleBadgeList" | "SearchInput" | "Select" | "SortIndicator" | "Stack" | "StateTransitionEvent" | "StatusBadge" | "StatusColorLegend" | "StatusSelector" | "StatusTimeline" | "Table" | "Tabs" | "TagInput" | "TagManager" | "TagPills" | "TagSummary" | "TemplatePicker" | "Text" | "Textarea" | "TimelineEntryLabel" | "VizAreaControls" | "VizAreaPreview" | "VizAxisControls" | "VizAxisSummary" | "VizColorControls" | "VizColorLegendConfig" | "VizEncodingBadge" | "VizGraphPreview" | "VizHeatmapControls" | "VizHeatmapPreview" | "VizLineControls" | "VizLinePreview" | "VizMarkControls" | "VizMarkPreview" | "VizOpacityControls" | "VizOpacitySummary" | "VizPointControls" | "VizPointPreview" | "VizRoleBadge" | "VizScaleControls" | "VizScaleSummary" | "VizScatterControls" | "VizScatterPreview" | "VizShapeControls" | "VizShapeLegend" | "VizSizeControls" | "VizSizeSummary", ComponentContract>>;
|
|
98
|
+
declare const componentContracts: Readonly<Record<"AddressCollectionPanel" | "AddressEditor" | "AddressSummaryBadge" | "AddressValidationTimeline" | "ArchiveEvent" | "ArchivePill" | "ArchiveSummary" | "ArchivedRowOverlay" | "AuditEvent" | "AuditSummaryCard" | "AuditTimeline" | "Badge" | "Banner" | "BillingAmountInput" | "BillingCardMeta" | "BillingIntervalSelector" | "BillingSummaryBadge" | "Button" | "CancellationBadge" | "CancellationEvent" | "CancellationForm" | "CancellationSummary" | "Card" | "CardHeader" | "Checkbox" | "ClassificationBadge" | "ClassificationEditor" | "ClassificationPanel" | "ColorStatePicker" | "ColorSwatch" | "ColorizedBadge" | "Combobox" | "CommunicationDetailPanel" | "CycleProgressCard" | "DatePicker" | "DetailHeader" | "Dialog" | "FilterPanel" | "FormLabelGroup" | "GeoFieldMappingForm" | "GeoResolutionBadge" | "GeocodablePreview" | "Grid" | "InlineLabel" | "Input" | "LabelCell" | "MembershipAuditTimeline" | "MembershipPanel" | "MessageEventTimeline" | "MessageStatusBadge" | "OwnerBadge" | "OwnershipMeta" | "OwnershipSummary" | "PaginationBar" | "PaymentEventTimeline" | "PaymentTimeline" | "PreferenceEditor" | "PreferencePanel" | "PreferenceSummaryBadge" | "PreferenceTimeline" | "PriceBadge" | "PriceCardMeta" | "PriceSummary" | "RelativeTimestamp" | "RoleAssignmentForm" | "RoleBadgeList" | "SearchInput" | "SegmentedControl" | "Select" | "SortIndicator" | "Stack" | "StateTransitionEvent" | "StatusBadge" | "StatusColorLegend" | "StatusSelector" | "StatusTimeline" | "Switch" | "Table" | "Tabs" | "TagInput" | "TagManager" | "TagPills" | "TagSummary" | "TemplatePicker" | "Text" | "Textarea" | "TimelineEntryLabel" | "VizAreaControls" | "VizAreaPreview" | "VizAxisControls" | "VizAxisSummary" | "VizColorControls" | "VizColorLegendConfig" | "VizEncodingBadge" | "VizGraphPreview" | "VizHeatmapControls" | "VizHeatmapPreview" | "VizLineControls" | "VizLinePreview" | "VizMarkControls" | "VizMarkPreview" | "VizOpacityControls" | "VizOpacitySummary" | "VizPointControls" | "VizPointPreview" | "VizRoleBadge" | "VizScaleControls" | "VizScaleSummary" | "VizScatterControls" | "VizScatterPreview" | "VizShapeControls" | "VizShapeLegend" | "VizSizeControls" | "VizSizeSummary", ComponentContract>>;
|
|
90
99
|
|
|
91
100
|
/** Billable's declared defaults; object parameter overrides travel as runtime props. */
|
|
92
101
|
declare const BILLING_INTERVALS: readonly ["monthly", "quarterly", "annual"];
|
|
@@ -115,6 +124,11 @@ declare function formatPriceAmount(value: unknown, currency?: unknown, minorUnit
|
|
|
115
124
|
declare function formatPriceCode(value: unknown): string | undefined;
|
|
116
125
|
|
|
117
126
|
declare const sharedScenarios: readonly SharedScenario[];
|
|
127
|
+
/**
|
|
128
|
+
* s222-m03 (#2502 ruling 16): an empty value, which React, Vue and the HTML renderer must show alike, as "Unknown time"
|
|
129
|
+
* with no empty datetime. It stays out of sharedScenarios, which holds exactly one documented example per component.
|
|
130
|
+
*/
|
|
131
|
+
declare const relativeTimestampEmptyScenario: SharedScenario;
|
|
118
132
|
|
|
119
133
|
/** @deprecated Historical compatibility view; canonical definitions live in componentContracts. */
|
|
120
134
|
declare const portedComponentContracts: Readonly<Record<"AuditTimeline" | "CancellationSummary" | "PaginationBar" | "PriceBadge" | "RelativeTimestamp" | "SearchInput" | "StatusBadge" | "StatusTimeline", ComponentContract>>;
|
|
@@ -163,6 +177,64 @@ declare const RESULT_STATE_TONE: "neutral";
|
|
|
163
177
|
/** The tones that carry a verdict or a severity; a result state never resolves to any of their colours. */
|
|
164
178
|
declare const SEVERITY_TONES: readonly ["positive", "success", "warning", "critical", "danger"];
|
|
165
179
|
|
|
180
|
+
/**
|
|
181
|
+
* s222-m02 (#2502 ruling 11): status marks are SVG icons, not Unicode glyphs, so a badge or banner draws the same mark
|
|
182
|
+
* in every font and renderer. One 16-unit grid, stroked in the text colour (1.5 wide, round caps and joins), so each
|
|
183
|
+
* mark keeps the tone's graded text contrast and reads at a badge's 12px and a banner's 16px. React, Vue and HTML all
|
|
184
|
+
* draw from this table.
|
|
185
|
+
*/
|
|
186
|
+
type StatusIconName = 'check' | 'x' | 'alert' | 'info' | 'clock' | 'dots' | 'refresh' | 'pause' | 'ban' | 'pencil' | 'star' | 'undo' | 'lock' | 'unlock' | 'dot' | 'chevron-down';
|
|
187
|
+
type StatusIconShape = {
|
|
188
|
+
readonly tag: 'path' | 'circle' | 'rect';
|
|
189
|
+
readonly attrs: Readonly<Record<string, string>>;
|
|
190
|
+
};
|
|
191
|
+
declare const STATUS_ICON_SHAPES: Readonly<Record<StatusIconName, readonly StatusIconShape[]>>;
|
|
192
|
+
/** The outer svg element's attributes, in the order every renderer writes them. It is 1em square, so it takes the size of
|
|
193
|
+
* the text it sits in wherever no stylesheet sizes it. */
|
|
194
|
+
declare const STATUS_ICON_SVG_ATTRS: Readonly<Record<string, string>>;
|
|
195
|
+
/** The mark for a registry icon name; an unknown name takes the neutral dot, and no name takes no mark. */
|
|
196
|
+
declare function resolveStatusIcon(iconName: string | undefined): StatusIconName | undefined;
|
|
197
|
+
/** The mark as markup, for renderers that write HTML strings. */
|
|
198
|
+
declare function statusIconMarkup(name: StatusIconName): string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* s222-m02 (#2502 ruling 11): the status registry and its presentation, shared by every renderer. It moved here from
|
|
202
|
+
* @oods/components-react (which re-exports it unchanged) so the HTML renderer labels, tones and marks a status exactly as
|
|
203
|
+
* the React components do. The map is the token package's saas-billing status map.
|
|
204
|
+
*
|
|
205
|
+
* s222-m03 (#2502 ruling 13): the lifecycle table (registry/lifecycle-status-tones.json) is the StatusBadge contract's
|
|
206
|
+
* lifecycle status-to-tone table: the `lifecycle` domain, and what any domain's badge reads for a status its own table does
|
|
207
|
+
* not know. A settled payment is a success and a failed one critical, not neutral.
|
|
208
|
+
*/
|
|
209
|
+
type StatusTone = 'neutral' | 'info' | 'accent' | 'positive' | 'success' | 'warning' | 'critical' | 'danger';
|
|
210
|
+
type StatusDomain = string;
|
|
211
|
+
type StatusTokenSet = {
|
|
212
|
+
readonly background: string;
|
|
213
|
+
readonly border: string;
|
|
214
|
+
readonly foreground: string;
|
|
215
|
+
};
|
|
216
|
+
type StatusPresentation = {
|
|
217
|
+
readonly domain: StatusDomain;
|
|
218
|
+
readonly status: string;
|
|
219
|
+
readonly label: string;
|
|
220
|
+
readonly description: string;
|
|
221
|
+
readonly tone: StatusTone;
|
|
222
|
+
readonly iconName?: string;
|
|
223
|
+
readonly badge: {
|
|
224
|
+
readonly subtle: StatusTokenSet;
|
|
225
|
+
readonly solid: StatusTokenSet;
|
|
226
|
+
};
|
|
227
|
+
readonly banner: {
|
|
228
|
+
readonly subtle: StatusTokenSet;
|
|
229
|
+
readonly solid: StatusTokenSet;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
declare const STATUS_DOMAINS: readonly StatusDomain[];
|
|
233
|
+
declare function getStatusPresentation(domain: StatusDomain, status: string): StatusPresentation;
|
|
234
|
+
declare function listStatuses(domain: StatusDomain): readonly StatusPresentation[];
|
|
235
|
+
declare function getToneTokenSet(tone: StatusTone): StatusTokenSet;
|
|
236
|
+
declare function getBannerToneTokenSet(tone: StatusTone): StatusTokenSet;
|
|
237
|
+
|
|
166
238
|
interface BillingCycleValues {
|
|
167
239
|
progress?: number;
|
|
168
240
|
periodStart?: string;
|
|
@@ -242,8 +314,15 @@ interface CollectionEvent {
|
|
|
242
314
|
}
|
|
243
315
|
/** Invalid dates cannot participate in a chronological view; ties retain source order. */
|
|
244
316
|
declare function chronologicalEvents(events: readonly CollectionEvent[]): CollectionEvent[];
|
|
317
|
+
/** A number's declared display format (a field's ui_hints.format). */
|
|
318
|
+
type NumberDisplayFormat = 'percent' | 'quantity';
|
|
319
|
+
/**
|
|
320
|
+
* s223-m01 (#2527 ruling 4): a declared number reads as a person writes it. percent holds percent units (12.5 reads
|
|
321
|
+
* 12.5%, -41 reads -41%); quantity is grouped (86420 reads 86,420). Undefined for a value that is not a finite number.
|
|
322
|
+
*/
|
|
323
|
+
declare function formatDeclaredNumber(value: unknown, format: NumberDisplayFormat): string | undefined;
|
|
245
324
|
/** Format declared scalar display fields without changing the underlying record. */
|
|
246
|
-
declare function formatReadOnlyValue(value: unknown, type: string, code?: boolean): string;
|
|
325
|
+
declare function formatReadOnlyValue(value: unknown, type: string, code?: boolean, format?: NumberDisplayFormat): string;
|
|
247
326
|
/** Workflow apps and standalone previews project the same actual record events. */
|
|
248
327
|
declare function recordCollectionEvents(record: Record<string, unknown>, options?: {
|
|
249
328
|
historyField?: string;
|
|
@@ -253,8 +332,20 @@ declare function recordCollectionEvents(record: Record<string, unknown>, options
|
|
|
253
332
|
}>;
|
|
254
333
|
minorUnits?: number;
|
|
255
334
|
}): CollectionEvent[];
|
|
335
|
+
/**
|
|
336
|
+
* s223-m02 (#2527 ruling 13i, #2521): the summary an AddressCollectionPanel shows of a record's addresses, one line per
|
|
337
|
+
* entry (its role, street lines, city, region and postal code) with the entries separated by semicolons, for example
|
|
338
|
+
* "home, 8 Lake Road, Madison, WI, 53703". A generated workflow's store prints the same line (collectionSummary); a single
|
|
339
|
+
* screen and the HTML renderer print it from here. A record with no addresses reads as an empty string.
|
|
340
|
+
*/
|
|
341
|
+
declare function addressCollectionSummary(entries: unknown): string;
|
|
256
342
|
/** A label is authoritative only alongside its actual reference; never infer a related entity. */
|
|
257
343
|
declare function formatReferenceLabel(identifier: unknown, label?: unknown, subject?: string): string;
|
|
344
|
+
/**
|
|
345
|
+
* s223-m01 (#2527 ruling 6): ownership on a card as one phrase, "Owned by Pricing and packaging · team", or by its type
|
|
346
|
+
* alone when the owner has no name to show ("Team-owned"). Undefined when there is nothing to say.
|
|
347
|
+
*/
|
|
348
|
+
declare function ownershipPhrase(ownerLabel?: unknown, ownerType?: unknown, role?: unknown): string | undefined;
|
|
258
349
|
/** Keep authored record keys and the Transaction fallback; UUIDs belong in technical inspection. */
|
|
259
350
|
declare function formatRecordLabel(value: unknown): string;
|
|
260
351
|
|
|
@@ -266,6 +357,30 @@ declare function assertStaticSvg(svg: string): string;
|
|
|
266
357
|
* the title as a text element whose whole content is the title.
|
|
267
358
|
*/
|
|
268
359
|
declare function svgCarriesTitle(svg: string, title: string | undefined): boolean;
|
|
360
|
+
/** s222-m02 (#2502 ruling 12, F7): the props that carry a placed chart's dark and high-contrast renders. */
|
|
361
|
+
declare const VIZ_THEME_SVG_PROPS: readonly ["svgDark", "svgDarkNarrow", "svgDarkWide", "svgHc", "svgHcNarrow", "svgHcWide"];
|
|
362
|
+
type VizThemeSvgProp = (typeof VIZ_THEME_SVG_PROPS)[number];
|
|
363
|
+
/** Every render prop a placed chart carries: the light (or only) renders, then the dark and hc ones. */
|
|
364
|
+
declare const VIZ_SVG_PROPS: readonly ["svg", "svgNarrow", "svgWide", "svgDark", "svgDarkNarrow", "svgDarkWide", "svgHc", "svgHcNarrow", "svgHcWide"];
|
|
365
|
+
type VizPreviewTheme = 'light' | 'dark' | 'hc';
|
|
366
|
+
type VizRenderAttribute = 'data-viz-svg' | 'data-viz-svg-narrow' | 'data-viz-svg-wide';
|
|
367
|
+
/** One set of a chart's renders: the design size, then the narrow and wide sizes when present. */
|
|
368
|
+
interface VizPreviewLayer {
|
|
369
|
+
/** The theme the renders are drawn in; absent for a chart with no dark or hc renders, whose renders show in every theme. */
|
|
370
|
+
readonly theme?: VizPreviewTheme;
|
|
371
|
+
readonly narrow: boolean;
|
|
372
|
+
readonly wide: boolean;
|
|
373
|
+
/** Each render's wrapper attribute and its checked SVG, in document order. */
|
|
374
|
+
readonly renders: ReadonlyArray<readonly [VizRenderAttribute, string]>;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* The renders a chart preview lays out, which React, Vue and the HTML renderer all read, so the three render one markup.
|
|
378
|
+
* Without a dark or hc render it is the one unthemed layer the figure has always shown (svg, svgNarrow, svgWide). With
|
|
379
|
+
* them, a layer per theme (light is svg*), each wrapped in [data-viz-theme]; component-styles shows the one matching the
|
|
380
|
+
* nearest [data-theme], and each wrapper repeats the figure's data-viz-narrow and data-viz-wide so the size rules apply
|
|
381
|
+
* inside it. Every SVG passes assertStaticSvg.
|
|
382
|
+
*/
|
|
383
|
+
declare function vizPreviewLayers(props: Readonly<Partial<Record<'svg' | 'svgNarrow' | 'svgWide' | VizThemeSvgProp, unknown>>>): VizPreviewLayer[];
|
|
269
384
|
|
|
270
385
|
declare const componentBehaviors: {
|
|
271
386
|
readonly VizAreaControls: {
|
|
@@ -1625,6 +1740,91 @@ declare const componentBehaviors: {
|
|
|
1625
1740
|
readonly interactionReason: "ColorizedBadge presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.";
|
|
1626
1741
|
readonly event: readonly [];
|
|
1627
1742
|
};
|
|
1743
|
+
readonly Combobox: {
|
|
1744
|
+
readonly role: "combobox";
|
|
1745
|
+
readonly name: {
|
|
1746
|
+
readonly strategy: "label";
|
|
1747
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1748
|
+
};
|
|
1749
|
+
readonly keyboard: {
|
|
1750
|
+
readonly Tab: "Move focus to the named native control; an open list closes without picking";
|
|
1751
|
+
readonly x: "Type to filter the options by label";
|
|
1752
|
+
readonly ArrowDown: "Open the list and move to the next option";
|
|
1753
|
+
readonly ArrowUp: "Move to the previous option; with the list closed, open it at the last option";
|
|
1754
|
+
readonly Home: "Move to the first option of an open list";
|
|
1755
|
+
readonly End: "Move to the last option of an open list";
|
|
1756
|
+
readonly Enter: "Pick the active option and close the list";
|
|
1757
|
+
readonly Escape: "Close the list; with the list closed, clear the field";
|
|
1758
|
+
};
|
|
1759
|
+
readonly interaction: "interactive";
|
|
1760
|
+
readonly event: readonly [{
|
|
1761
|
+
readonly trigger: "keyboard";
|
|
1762
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1763
|
+
readonly key: "Tab";
|
|
1764
|
+
readonly effect: {
|
|
1765
|
+
readonly kind: "focus";
|
|
1766
|
+
};
|
|
1767
|
+
}, {
|
|
1768
|
+
readonly trigger: "keyboard";
|
|
1769
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1770
|
+
readonly key: "x";
|
|
1771
|
+
readonly effect: {
|
|
1772
|
+
readonly kind: "value";
|
|
1773
|
+
readonly value: "Canadax";
|
|
1774
|
+
};
|
|
1775
|
+
}, {
|
|
1776
|
+
readonly trigger: "keyboard";
|
|
1777
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1778
|
+
readonly key: "ArrowDown";
|
|
1779
|
+
readonly effect: {
|
|
1780
|
+
readonly kind: "active-option";
|
|
1781
|
+
readonly value: "Australia";
|
|
1782
|
+
};
|
|
1783
|
+
}, {
|
|
1784
|
+
readonly trigger: "keyboard";
|
|
1785
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1786
|
+
readonly key: "ArrowUp";
|
|
1787
|
+
readonly effect: {
|
|
1788
|
+
readonly kind: "active-option";
|
|
1789
|
+
readonly value: "United States";
|
|
1790
|
+
};
|
|
1791
|
+
}, {
|
|
1792
|
+
readonly trigger: "keyboard";
|
|
1793
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1794
|
+
readonly keys: readonly ["ArrowUp"];
|
|
1795
|
+
readonly key: "Home";
|
|
1796
|
+
readonly effect: {
|
|
1797
|
+
readonly kind: "active-option";
|
|
1798
|
+
readonly value: "Australia";
|
|
1799
|
+
};
|
|
1800
|
+
}, {
|
|
1801
|
+
readonly trigger: "keyboard";
|
|
1802
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1803
|
+
readonly keys: readonly ["ArrowDown"];
|
|
1804
|
+
readonly key: "End";
|
|
1805
|
+
readonly effect: {
|
|
1806
|
+
readonly kind: "active-option";
|
|
1807
|
+
readonly value: "United States";
|
|
1808
|
+
};
|
|
1809
|
+
}, {
|
|
1810
|
+
readonly trigger: "keyboard";
|
|
1811
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1812
|
+
readonly keys: readonly ["ArrowDown", "ArrowDown", "ArrowDown"];
|
|
1813
|
+
readonly key: "Enter";
|
|
1814
|
+
readonly effect: {
|
|
1815
|
+
readonly kind: "event";
|
|
1816
|
+
readonly value: "fr";
|
|
1817
|
+
};
|
|
1818
|
+
}, {
|
|
1819
|
+
readonly trigger: "keyboard";
|
|
1820
|
+
readonly target: "input[role=\"combobox\"]";
|
|
1821
|
+
readonly key: "Escape";
|
|
1822
|
+
readonly effect: {
|
|
1823
|
+
readonly kind: "event";
|
|
1824
|
+
readonly value: "";
|
|
1825
|
+
};
|
|
1826
|
+
}];
|
|
1827
|
+
};
|
|
1628
1828
|
readonly CycleProgressCard: {
|
|
1629
1829
|
readonly role: "none";
|
|
1630
1830
|
readonly name: {
|
|
@@ -1666,6 +1866,48 @@ declare const componentBehaviors: {
|
|
|
1666
1866
|
readonly interactionReason: "DetailHeader presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.";
|
|
1667
1867
|
readonly event: readonly [];
|
|
1668
1868
|
};
|
|
1869
|
+
readonly Dialog: {
|
|
1870
|
+
readonly role: "button";
|
|
1871
|
+
readonly name: {
|
|
1872
|
+
readonly strategy: "aria-label";
|
|
1873
|
+
readonly target: "button[aria-label=\"Close\"]";
|
|
1874
|
+
};
|
|
1875
|
+
readonly keyboard: {
|
|
1876
|
+
readonly Tab: "Move focus to the named native control";
|
|
1877
|
+
readonly Enter: "Activate the control";
|
|
1878
|
+
readonly Escape: "Close the dialog";
|
|
1879
|
+
};
|
|
1880
|
+
readonly interaction: "interactive";
|
|
1881
|
+
readonly event: readonly [{
|
|
1882
|
+
readonly trigger: "keyboard";
|
|
1883
|
+
readonly target: "button[aria-label=\"Close\"]";
|
|
1884
|
+
readonly key: "Tab";
|
|
1885
|
+
readonly effect: {
|
|
1886
|
+
readonly kind: "focus";
|
|
1887
|
+
};
|
|
1888
|
+
}, {
|
|
1889
|
+
readonly trigger: "pointer";
|
|
1890
|
+
readonly target: "button[aria-label=\"Close\"]";
|
|
1891
|
+
readonly effect: {
|
|
1892
|
+
readonly kind: "event";
|
|
1893
|
+
};
|
|
1894
|
+
readonly action: "click";
|
|
1895
|
+
}, {
|
|
1896
|
+
readonly trigger: "keyboard";
|
|
1897
|
+
readonly target: "button[aria-label=\"Close\"]";
|
|
1898
|
+
readonly effect: {
|
|
1899
|
+
readonly kind: "event";
|
|
1900
|
+
};
|
|
1901
|
+
readonly key: "Enter";
|
|
1902
|
+
}, {
|
|
1903
|
+
readonly trigger: "keyboard";
|
|
1904
|
+
readonly target: "button[aria-label=\"Close\"]";
|
|
1905
|
+
readonly effect: {
|
|
1906
|
+
readonly kind: "event";
|
|
1907
|
+
};
|
|
1908
|
+
readonly key: "Escape";
|
|
1909
|
+
}];
|
|
1910
|
+
};
|
|
1669
1911
|
readonly FilterPanel: {
|
|
1670
1912
|
readonly role: "button";
|
|
1671
1913
|
readonly name: {
|
|
@@ -2072,6 +2314,69 @@ declare const componentBehaviors: {
|
|
|
2072
2314
|
};
|
|
2073
2315
|
}];
|
|
2074
2316
|
};
|
|
2317
|
+
readonly SegmentedControl: {
|
|
2318
|
+
readonly role: "radio";
|
|
2319
|
+
readonly name: {
|
|
2320
|
+
readonly strategy: "label";
|
|
2321
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2322
|
+
};
|
|
2323
|
+
readonly keyboard: {
|
|
2324
|
+
readonly Tab: "Move focus to the checked option";
|
|
2325
|
+
readonly ArrowRight: "Check and focus the next option";
|
|
2326
|
+
readonly ArrowDown: "Check and focus the next option";
|
|
2327
|
+
readonly ArrowLeft: "Check and focus the previous option";
|
|
2328
|
+
readonly ArrowUp: "Check and focus the previous option";
|
|
2329
|
+
};
|
|
2330
|
+
readonly interaction: "interactive";
|
|
2331
|
+
readonly event: readonly [{
|
|
2332
|
+
readonly trigger: "keyboard";
|
|
2333
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2334
|
+
readonly key: "Tab";
|
|
2335
|
+
readonly effect: {
|
|
2336
|
+
readonly kind: "focus";
|
|
2337
|
+
};
|
|
2338
|
+
}, {
|
|
2339
|
+
readonly trigger: "keyboard";
|
|
2340
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2341
|
+
readonly key: "ArrowRight";
|
|
2342
|
+
readonly effect: {
|
|
2343
|
+
readonly kind: "event";
|
|
2344
|
+
readonly value: "yearly";
|
|
2345
|
+
};
|
|
2346
|
+
}, {
|
|
2347
|
+
readonly trigger: "keyboard";
|
|
2348
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2349
|
+
readonly key: "ArrowDown";
|
|
2350
|
+
readonly effect: {
|
|
2351
|
+
readonly kind: "event";
|
|
2352
|
+
readonly value: "yearly";
|
|
2353
|
+
};
|
|
2354
|
+
}, {
|
|
2355
|
+
readonly trigger: "keyboard";
|
|
2356
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2357
|
+
readonly key: "ArrowLeft";
|
|
2358
|
+
readonly effect: {
|
|
2359
|
+
readonly kind: "event";
|
|
2360
|
+
readonly value: "monthly";
|
|
2361
|
+
};
|
|
2362
|
+
}, {
|
|
2363
|
+
readonly trigger: "keyboard";
|
|
2364
|
+
readonly target: "input[type=\"radio\"]:checked";
|
|
2365
|
+
readonly key: "ArrowUp";
|
|
2366
|
+
readonly effect: {
|
|
2367
|
+
readonly kind: "event";
|
|
2368
|
+
readonly value: "monthly";
|
|
2369
|
+
};
|
|
2370
|
+
}, {
|
|
2371
|
+
readonly trigger: "pointer";
|
|
2372
|
+
readonly target: "input[value=\"yearly\"]";
|
|
2373
|
+
readonly effect: {
|
|
2374
|
+
readonly kind: "event";
|
|
2375
|
+
readonly value: "yearly";
|
|
2376
|
+
};
|
|
2377
|
+
readonly action: "click";
|
|
2378
|
+
}];
|
|
2379
|
+
};
|
|
2075
2380
|
readonly Select: {
|
|
2076
2381
|
readonly role: "combobox";
|
|
2077
2382
|
readonly name: {
|
|
@@ -2161,6 +2466,51 @@ declare const componentBehaviors: {
|
|
|
2161
2466
|
readonly interactionReason: "StatusTimeline presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.";
|
|
2162
2467
|
readonly event: readonly [];
|
|
2163
2468
|
};
|
|
2469
|
+
readonly Switch: {
|
|
2470
|
+
readonly role: "switch";
|
|
2471
|
+
readonly name: {
|
|
2472
|
+
readonly strategy: "label";
|
|
2473
|
+
readonly target: "button[role=\"switch\"]";
|
|
2474
|
+
};
|
|
2475
|
+
readonly keyboard: {
|
|
2476
|
+
readonly Tab: "Move focus to the named native control";
|
|
2477
|
+
readonly " ": "Toggle the switch";
|
|
2478
|
+
readonly Enter: "Toggle the switch";
|
|
2479
|
+
};
|
|
2480
|
+
readonly interaction: "interactive";
|
|
2481
|
+
readonly event: readonly [{
|
|
2482
|
+
readonly trigger: "keyboard";
|
|
2483
|
+
readonly target: "button[role=\"switch\"]";
|
|
2484
|
+
readonly key: "Tab";
|
|
2485
|
+
readonly effect: {
|
|
2486
|
+
readonly kind: "focus";
|
|
2487
|
+
};
|
|
2488
|
+
}, {
|
|
2489
|
+
readonly trigger: "pointer";
|
|
2490
|
+
readonly target: "button[role=\"switch\"]";
|
|
2491
|
+
readonly effect: {
|
|
2492
|
+
readonly kind: "event";
|
|
2493
|
+
readonly value: true;
|
|
2494
|
+
};
|
|
2495
|
+
readonly action: "click";
|
|
2496
|
+
}, {
|
|
2497
|
+
readonly trigger: "keyboard";
|
|
2498
|
+
readonly target: "button[role=\"switch\"]";
|
|
2499
|
+
readonly effect: {
|
|
2500
|
+
readonly kind: "event";
|
|
2501
|
+
readonly value: true;
|
|
2502
|
+
};
|
|
2503
|
+
readonly key: " ";
|
|
2504
|
+
}, {
|
|
2505
|
+
readonly trigger: "keyboard";
|
|
2506
|
+
readonly target: "button[role=\"switch\"]";
|
|
2507
|
+
readonly effect: {
|
|
2508
|
+
readonly kind: "event";
|
|
2509
|
+
readonly value: true;
|
|
2510
|
+
};
|
|
2511
|
+
readonly key: "Enter";
|
|
2512
|
+
}];
|
|
2513
|
+
};
|
|
2164
2514
|
readonly Table: {
|
|
2165
2515
|
readonly role: "button";
|
|
2166
2516
|
readonly name: {
|
|
@@ -3046,4 +3396,4 @@ declare function getBaselineCapability(componentId: string): {
|
|
|
3046
3396
|
};
|
|
3047
3397
|
} | undefined;
|
|
3048
3398
|
|
|
3049
|
-
export { type AuditSummaryValues, BILLING_AMOUNT_ERROR, BILLING_INTERVALS, BILLING_INTERVAL_ERROR, BILLING_MINOR_UNITS, type BillingAmountResult, type BillingCycleValues, type BillingPaymentValues, COMPONENT_CLASSIFICATIONS, COMPONENT_CONTRACT_VERSION, COMPONENT_CONTRACT_VERSION_1_1, type CollectionEvent, type ComponentBehavior, type ComponentClassification, type ComponentContract, DEFAULT_COLOR_STATES, EMISSION_ELIGIBILITY_EVIDENCE_CLASSES, type EmissionEligibilityEvidence, type EmissionEligibilityEvidenceClass, type EvidenceResult, type EvidenceStatus, FOUNDATION_V1_EVIDENCE_CLASSES, type FoundationV1Evidence, type FoundationV1EvidenceClass, GOVERNED_DEFINITION, GOVERNED_SURFACES, type GeoFieldMappingValue, type GovernedComponentId, type GovernedLedgerRow, NO_LAST_PAYMENT, NO_NEXT_PAYMENT, NUCLEUS_COMPONENT_IDS, type NucleusComponentId, type ObligationStatus, PORTED_COMPONENT_IDS, type PortedComponentId, RESULT_STATES, RESULT_STATE_TONE, type ResultState, SEVERITY_TONES, type ScenarioTrigger, type SharedScenario, type SortIndicatorValues, type SortState, type SubstitutionContractReport, type SubstitutionObligation, type TraitEventKind, type TraitEventValues, UI_WORKFLOW_STATES, type UiWorkflowState, VIZ_CONTROL_IDS, VIZ_CONTROL_TITLES, VIZ_PREVIEW_TYPES, VIZ_SUMMARY_IDS, type VizChannel, type VizChartType, type VizColorBinding, type VizControlField, type VizControlId, type VizFieldBinding, type VizIntentFragment, type VizScale, type VizSummaryId, ariaSort, assertStaticSvg, auditSummary, billingAmountMessage, billingAmountText, billingCycle, billingDate, billingIntervalMessage, billingPaymentRows, billingPaymentSummary, billingPeriodEnd, billingSummary, chronologicalEvents, componentBehaviors, componentCapabilityBaseline, componentContracts, componentIntake, componentReconciliationProposal, currencyMinorUnits, dateTimeInputValue, defaultVizIntent, deriveStartingComponentCount, editVizIntent, evaluateEmissionEligibility, evaluateFoundationV1, formatBillingAmount, formatDateTime, formatPriceAmount, formatPriceCode, formatReadOnlyValue, formatRecordLabel, formatReferenceLabel, geoFieldMapping, getBaselineCapability, initialSort, isGovernedComponent, isVizIntentFragment, nextSort, parseBillingAmount, portedComponentContracts, portedScenarios, recipeItemLabels, recordCollectionEvents, restartedBillingPeriod, sharedScenarios, substitutionContractReport, summarizeSubstitutionReport, summaryValue, svgCarriesTitle, traitEventRows, validMinorUnits, validateComponentIntakeDocument, vizControlFields, vizFieldValue, vizSummaryRows };
|
|
3399
|
+
export { type AuditSummaryValues, BILLING_AMOUNT_ERROR, BILLING_INTERVALS, BILLING_INTERVAL_ERROR, BILLING_MINOR_UNITS, type BillingAmountResult, type BillingCycleValues, type BillingPaymentValues, COMPONENT_CLASSIFICATIONS, COMPONENT_CONTRACT_VERSION, COMPONENT_CONTRACT_VERSION_1_1, type CollectionEvent, type ComponentBehavior, type ComponentClassification, type ComponentContract, DEFAULT_COLOR_STATES, EMISSION_ELIGIBILITY_EVIDENCE_CLASSES, type EmissionEligibilityEvidence, type EmissionEligibilityEvidenceClass, type EvidenceResult, type EvidenceStatus, FOUNDATION_V1_EVIDENCE_CLASSES, type FoundationV1Evidence, type FoundationV1EvidenceClass, GOVERNED_DEFINITION, GOVERNED_SURFACES, type GeoFieldMappingValue, type GovernedComponentId, type GovernedLedgerRow, NO_LAST_PAYMENT, NO_NEXT_PAYMENT, NUCLEUS_COMPONENT_IDS, type NucleusComponentId, type NumberDisplayFormat, type ObligationStatus, PORTED_COMPONENT_IDS, type PortedComponentId, RESULT_STATES, RESULT_STATE_TONE, type ResultState, SEVERITY_TONES, STATUS_DOMAINS, STATUS_ICON_SHAPES, STATUS_ICON_SVG_ATTRS, type ScenarioTrigger, type SharedScenario, type SortIndicatorValues, type SortState, type StatusDomain, type StatusIconName, type StatusIconShape, type StatusPresentation, type StatusTokenSet, type StatusTone, type SubstitutionContractReport, type SubstitutionObligation, type TraitEventKind, type TraitEventValues, UI_WORKFLOW_STATES, type UiWorkflowState, VIZ_CONTROL_IDS, VIZ_CONTROL_TITLES, VIZ_PREVIEW_TYPES, VIZ_SUMMARY_IDS, VIZ_SVG_PROPS, VIZ_THEME_SVG_PROPS, type VizChannel, type VizChartType, type VizColorBinding, type VizControlField, type VizControlId, type VizFieldBinding, type VizIntentFragment, type VizPreviewLayer, type VizPreviewTheme, type VizRenderAttribute, type VizScale, type VizSummaryId, type VizThemeSvgProp, addressCollectionSummary, ariaSort, assertStaticSvg, auditSummary, billingAmountMessage, billingAmountText, billingCycle, billingDate, billingIntervalMessage, billingPaymentRows, billingPaymentSummary, billingPeriodEnd, billingSummary, chronologicalEvents, componentBehaviors, componentCapabilityBaseline, componentContracts, componentIntake, componentReconciliationProposal, currencyMinorUnits, dateTimeInputValue, defaultVizIntent, deriveStartingComponentCount, editVizIntent, evaluateEmissionEligibility, evaluateFoundationV1, formatBillingAmount, formatDateTime, formatDeclaredNumber, formatPriceAmount, formatPriceCode, formatReadOnlyValue, formatRecordLabel, formatReferenceLabel, geoFieldMapping, getBannerToneTokenSet, getBaselineCapability, getStatusPresentation, getToneTokenSet, initialSort, isGovernedComponent, isVizIntentFragment, listStatuses, nextSort, ownershipPhrase, parseBillingAmount, portedComponentContracts, portedScenarios, recipeItemLabels, recordCollectionEvents, relativeTimestampEmptyScenario, resolveStatusIcon, restartedBillingPeriod, sharedScenarios, statusIconMarkup, substitutionContractReport, summarizeSubstitutionReport, summaryValue, svgCarriesTitle, traitEventRows, validMinorUnits, validateComponentIntakeDocument, vizControlFields, vizFieldValue, vizPreviewLayers, vizSummaryRows };
|