@sovereignsquad/gds-core 3.9.0 → 6.9.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/README.md +33 -0
- package/dist/GdsBadge-DqTdnomt.d.mts +417 -0
- package/dist/GdsBadge-DqTdnomt.d.ts +417 -0
- package/dist/PartnerDiscovery-As_-JKtb.d.ts +732 -0
- package/dist/PartnerDiscovery-Bwxixtka.d.mts +732 -0
- package/dist/QuickStartCard-Bgjdfs_t.d.ts +20798 -0
- package/dist/QuickStartCard-DnZMDjzb.d.mts +20798 -0
- package/dist/chunk-3B5MK2PG.mjs +6349 -0
- package/dist/{chunk-TQ7ZYMEA.mjs → chunk-5G3XZWSW.mjs} +4916 -6400
- package/dist/chunk-5GH7XD7X.mjs +430 -0
- package/dist/chunk-6WDH57MJ.mjs +430 -0
- package/dist/chunk-A32PWTD2.mjs +430 -0
- package/dist/chunk-BD5XQH5Z.mjs +430 -0
- package/dist/chunk-DBJE4TRO.mjs +430 -0
- package/dist/chunk-EQ7Y2PUI.mjs +1842 -0
- package/dist/chunk-F76YTG3S.mjs +430 -0
- package/dist/chunk-HJVDKPVW.mjs +245 -0
- package/dist/chunk-IMT3UTOT.mjs +430 -0
- package/dist/chunk-J66ITCXC.mjs +473 -0
- package/dist/chunk-KEYBUMOR.mjs +430 -0
- package/dist/chunk-KLFTBWEG.mjs +430 -0
- package/dist/chunk-KNP35WAB.mjs +27 -0
- package/dist/chunk-LERXSJHD.mjs +430 -0
- package/dist/chunk-MKEWYVTJ.mjs +430 -0
- package/dist/chunk-NTNVQZJU.mjs +89 -0
- package/dist/chunk-OH5HH4G3.mjs +430 -0
- package/dist/chunk-SPPTDVJC.mjs +211 -0
- package/dist/chunk-W5O2JSVK.mjs +20 -0
- package/dist/{chunk-BUC7QXRO.mjs → chunk-WI24JME4.mjs} +13 -5
- package/dist/chunk-ZFGYQSNR.mjs +33 -0
- package/dist/client.d.mts +1616 -64
- package/dist/client.d.ts +1616 -64
- package/dist/client.js +13417 -6683
- package/dist/client.mjs +303 -60
- package/dist/en-D9CWSH3F.d.mts +428 -0
- package/dist/en-D9CWSH3F.d.ts +428 -0
- package/dist/index.d.mts +632 -5
- package/dist/index.d.ts +632 -5
- package/dist/index.js +22423 -13558
- package/dist/index.mjs +2198 -61
- package/dist/locales/lazy/all.d.mts +2 -0
- package/dist/locales/lazy/all.d.ts +2 -0
- package/dist/locales/lazy/all.js +5150 -0
- package/dist/locales/lazy/all.mjs +50 -0
- package/dist/locales/lazy/ar.d.mts +2 -0
- package/dist/locales/lazy/ar.d.ts +2 -0
- package/dist/locales/lazy/ar.js +870 -0
- package/dist/locales/lazy/ar.mjs +10 -0
- package/dist/locales/lazy/de.d.mts +2 -0
- package/dist/locales/lazy/de.d.ts +2 -0
- package/dist/locales/lazy/de.js +870 -0
- package/dist/locales/lazy/de.mjs +10 -0
- package/dist/locales/lazy/es.d.mts +2 -0
- package/dist/locales/lazy/es.d.ts +2 -0
- package/dist/locales/lazy/es.js +870 -0
- package/dist/locales/lazy/es.mjs +10 -0
- package/dist/locales/lazy/fr.d.mts +2 -0
- package/dist/locales/lazy/fr.d.ts +2 -0
- package/dist/locales/lazy/fr.js +870 -0
- package/dist/locales/lazy/fr.mjs +10 -0
- package/dist/locales/lazy/he.d.mts +2 -0
- package/dist/locales/lazy/he.d.ts +2 -0
- package/dist/locales/lazy/he.js +870 -0
- package/dist/locales/lazy/he.mjs +10 -0
- package/dist/locales/lazy/hu.d.mts +2 -0
- package/dist/locales/lazy/hu.d.ts +2 -0
- package/dist/locales/lazy/hu.js +870 -0
- package/dist/locales/lazy/hu.mjs +10 -0
- package/dist/locales/lazy/index.d.mts +25 -0
- package/dist/locales/lazy/index.d.ts +25 -0
- package/dist/locales/lazy/index.js +479 -0
- package/dist/locales/lazy/index.mjs +9 -0
- package/dist/locales/lazy/it.d.mts +2 -0
- package/dist/locales/lazy/it.d.ts +2 -0
- package/dist/locales/lazy/it.js +870 -0
- package/dist/locales/lazy/it.mjs +10 -0
- package/dist/locales/lazy/ja.d.mts +2 -0
- package/dist/locales/lazy/ja.d.ts +2 -0
- package/dist/locales/lazy/ja.js +870 -0
- package/dist/locales/lazy/ja.mjs +10 -0
- package/dist/locales/lazy/ko.d.mts +2 -0
- package/dist/locales/lazy/ko.d.ts +2 -0
- package/dist/locales/lazy/ko.js +870 -0
- package/dist/locales/lazy/ko.mjs +10 -0
- package/dist/locales/lazy/ru.d.mts +2 -0
- package/dist/locales/lazy/ru.d.ts +2 -0
- package/dist/locales/lazy/ru.js +870 -0
- package/dist/locales/lazy/ru.mjs +10 -0
- package/dist/locales/lazy/zh.d.mts +2 -0
- package/dist/locales/lazy/zh.d.ts +2 -0
- package/dist/locales/lazy/zh.js +870 -0
- package/dist/locales/lazy/zh.mjs +10 -0
- package/dist/map.css +658 -0
- package/dist/map.d.mts +118 -0
- package/dist/map.d.ts +118 -0
- package/dist/map.js +778 -0
- package/dist/map.mjs +395 -0
- package/dist/reference-theme-explorer.d.mts +34 -0
- package/dist/reference-theme-explorer.d.ts +34 -0
- package/dist/reference-theme-explorer.js +9488 -0
- package/dist/reference-theme-explorer.mjs +1988 -0
- package/dist/rich-text-editor.d.mts +32 -0
- package/dist/rich-text-editor.d.ts +32 -0
- package/dist/rich-text-editor.js +469 -0
- package/dist/rich-text-editor.mjs +115 -0
- package/dist/server.d.mts +112 -248
- package/dist/server.d.ts +112 -248
- package/dist/server.js +8461 -1889
- package/dist/server.mjs +598 -57
- package/package.json +110 -10
- package/dist/AISearchCard-Bbnsd-yl.d.mts +0 -7786
- package/dist/AISearchCard-Bbnsd-yl.d.ts +0 -7786
- package/dist/chunk-5AJJNRZF.mjs +0 -5847
package/dist/server.mjs
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resetPartnerDiscoveryFilters,
|
|
27
27
|
togglePartnerAmenity,
|
|
28
28
|
togglePartnerPrice
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WI24JME4.mjs";
|
|
30
30
|
import {
|
|
31
31
|
AISearchCard,
|
|
32
32
|
AccentPanel,
|
|
@@ -51,7 +51,6 @@ import {
|
|
|
51
51
|
Button,
|
|
52
52
|
CardTitle,
|
|
53
53
|
Center,
|
|
54
|
-
ChartTokenPanel,
|
|
55
54
|
ChatInput,
|
|
56
55
|
ChatMessage,
|
|
57
56
|
ChatThread,
|
|
@@ -66,6 +65,7 @@ import {
|
|
|
66
65
|
CreatorThemeDiagnostics,
|
|
67
66
|
CtaButtonGroup,
|
|
68
67
|
DataToolbar,
|
|
68
|
+
DetailFactsTable,
|
|
69
69
|
DetailProfileShell,
|
|
70
70
|
DocsPageShell,
|
|
71
71
|
EditorialCard,
|
|
@@ -78,7 +78,16 @@ import {
|
|
|
78
78
|
FitScoreChip,
|
|
79
79
|
FloatingActionPlacement,
|
|
80
80
|
FoodMenuSection,
|
|
81
|
-
|
|
81
|
+
GDS_DETAIL_FACTS_LABEL_COLUMN_PX,
|
|
82
|
+
GDS_DETAIL_FACT_IDS,
|
|
83
|
+
GDS_PICTOGRAM_BASE_STROKE,
|
|
84
|
+
GDS_PICTOGRAM_DISABLED_OPACITY,
|
|
85
|
+
GDS_PICTOGRAM_GRID,
|
|
86
|
+
GDS_PICTOGRAM_HERO_LAYERS,
|
|
87
|
+
GDS_PICTOGRAM_SCALE_PX,
|
|
88
|
+
GDS_PICTOGRAM_STROKE_BY_SCALE,
|
|
89
|
+
GDS_PICTOGRAM_TREATMENT_SCALE,
|
|
90
|
+
GDS_QUICK_START_ICON_BOX_PX,
|
|
82
91
|
GdsAdminDashboardTemplate,
|
|
83
92
|
GdsAnalyticsTemplate,
|
|
84
93
|
GdsAreaChart,
|
|
@@ -86,14 +95,18 @@ import {
|
|
|
86
95
|
GdsBenchmarkBarChart,
|
|
87
96
|
GdsBleed,
|
|
88
97
|
GdsBox,
|
|
98
|
+
GdsBreadcrumbs,
|
|
89
99
|
GdsCalendarHeatmapChart,
|
|
90
|
-
GdsChart,
|
|
91
100
|
GdsChartAxis,
|
|
92
101
|
GdsChartLegend,
|
|
93
102
|
GdsChartTooltip,
|
|
94
103
|
GdsCluster,
|
|
104
|
+
GdsColumnGrid,
|
|
105
|
+
GdsColumnGridItem,
|
|
106
|
+
GdsCompareButton,
|
|
95
107
|
GdsContainer,
|
|
96
108
|
GdsContentPatternCatalog,
|
|
109
|
+
GdsCountBadge,
|
|
97
110
|
GdsCrudEditorTemplate,
|
|
98
111
|
GdsDesignHandoffCatalog,
|
|
99
112
|
GdsDirectionBoundary,
|
|
@@ -106,21 +119,25 @@ import {
|
|
|
106
119
|
GdsGaugeChart,
|
|
107
120
|
GdsGrid,
|
|
108
121
|
GdsHistogramChart,
|
|
109
|
-
GdsIcon,
|
|
110
|
-
GdsIcons,
|
|
111
122
|
GdsInline,
|
|
112
123
|
GdsLineChart,
|
|
113
124
|
GdsLocaleText,
|
|
125
|
+
GdsLogoLockup,
|
|
114
126
|
GdsLongitudinalChart,
|
|
115
127
|
GdsMaturityRadarChart,
|
|
116
128
|
GdsMediaFrame,
|
|
129
|
+
GdsMeter,
|
|
130
|
+
GdsNotificationBell,
|
|
117
131
|
GdsOverflowFrame,
|
|
118
132
|
GdsPageTemplateCatalog,
|
|
133
|
+
GdsPictogram,
|
|
119
134
|
GdsPlural,
|
|
120
135
|
GdsPublicEventTemplate,
|
|
121
136
|
GdsRadarChart,
|
|
137
|
+
GdsRatingDisplay,
|
|
122
138
|
GdsRatingScale,
|
|
123
139
|
GdsRelativeTime,
|
|
140
|
+
GdsRemovableTag,
|
|
124
141
|
GdsResourceManagerTemplate,
|
|
125
142
|
GdsResponsiveChartFrame,
|
|
126
143
|
GdsResponsiveVisibility,
|
|
@@ -135,7 +152,6 @@ import {
|
|
|
135
152
|
GdsStack,
|
|
136
153
|
GdsStackedBarChart,
|
|
137
154
|
GdsSymmetryChart,
|
|
138
|
-
GdsVocabulary,
|
|
139
155
|
GdsWizardStepper,
|
|
140
156
|
Group,
|
|
141
157
|
InlineAlert,
|
|
@@ -143,11 +159,10 @@ import {
|
|
|
143
159
|
InlineText,
|
|
144
160
|
LabelTag,
|
|
145
161
|
LabelText,
|
|
162
|
+
LastCheckedLabel,
|
|
146
163
|
LayeredSurfaceSlot,
|
|
147
164
|
ListItemSection,
|
|
148
|
-
ListingCard,
|
|
149
165
|
Loader,
|
|
150
|
-
MAX_LISTING_CARD_ACTIONS,
|
|
151
166
|
MapPanel,
|
|
152
167
|
MeaningBadge,
|
|
153
168
|
MediaCard,
|
|
@@ -156,7 +171,6 @@ import {
|
|
|
156
171
|
MediaWithFallback,
|
|
157
172
|
MetadataText,
|
|
158
173
|
MetricCard,
|
|
159
|
-
MissingDataPrompt,
|
|
160
174
|
Modal,
|
|
161
175
|
MonospaceInputFrame,
|
|
162
176
|
MultiSelect,
|
|
@@ -173,6 +187,7 @@ import {
|
|
|
173
187
|
PillBar,
|
|
174
188
|
PlaceholderPanel,
|
|
175
189
|
PlaybackSurface,
|
|
190
|
+
PriceEstimateLabel,
|
|
176
191
|
ProductCard,
|
|
177
192
|
Progress,
|
|
178
193
|
ProgressCard,
|
|
@@ -185,39 +200,37 @@ import {
|
|
|
185
200
|
PublicProductCard,
|
|
186
201
|
PublicShell,
|
|
187
202
|
PublicSiteFooter,
|
|
203
|
+
QuickStartCard,
|
|
188
204
|
Radio,
|
|
189
205
|
ReferenceLinkGrid,
|
|
190
206
|
ReferenceLocaleNotice,
|
|
191
|
-
ReferenceSection,
|
|
192
207
|
ReportingSection,
|
|
193
208
|
ResultSummary,
|
|
194
209
|
ScrollArea,
|
|
195
210
|
SearchableSelect,
|
|
196
|
-
SectionPanel,
|
|
197
211
|
SectionTitle,
|
|
198
212
|
Select,
|
|
199
213
|
SemanticChartFrame,
|
|
200
214
|
SemanticInset,
|
|
201
|
-
SimpleDataTable,
|
|
202
215
|
SimpleGrid,
|
|
203
216
|
Slider,
|
|
204
217
|
SocialAuthButtons,
|
|
205
218
|
SoftChipGroup,
|
|
206
219
|
SortMenu,
|
|
207
220
|
Stack,
|
|
208
|
-
StateBlock,
|
|
209
221
|
StatsSection,
|
|
210
222
|
StatusBadge,
|
|
211
223
|
StreamingIndicator,
|
|
212
224
|
Switch,
|
|
225
|
+
TRUST_BADGE_DEFINITIONS,
|
|
213
226
|
Table,
|
|
214
227
|
Tabs,
|
|
215
228
|
TextInput,
|
|
216
229
|
Textarea,
|
|
217
230
|
ThemeIcon,
|
|
218
231
|
Tooltip,
|
|
232
|
+
TrustBadge,
|
|
219
233
|
VisuallyHidden,
|
|
220
|
-
ar,
|
|
221
234
|
compareGdsLocaleString,
|
|
222
235
|
createGdsAccessAdapter,
|
|
223
236
|
createGdsAccessGateEvent,
|
|
@@ -226,33 +239,17 @@ import {
|
|
|
226
239
|
createGdsMissingKeyTracker,
|
|
227
240
|
createGdsNotificationAuditEvent,
|
|
228
241
|
createGdsNotificationId,
|
|
229
|
-
createGdsOwnedContrastTokens,
|
|
230
242
|
createGdsPageTemplateEvent,
|
|
243
|
+
createGdsPictogramFamily,
|
|
231
244
|
createGdsStyleContract,
|
|
232
245
|
createGdsTextExpansionFixture,
|
|
233
|
-
createGdsVocabularyPack,
|
|
234
|
-
de,
|
|
235
|
-
en,
|
|
236
|
-
es,
|
|
237
246
|
formatGdsCurrency,
|
|
238
247
|
formatGdsDate,
|
|
239
248
|
formatGdsNumber,
|
|
240
249
|
formatGdsPlural,
|
|
241
250
|
formatGdsRelativeTime,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
gdsCardGapMap,
|
|
245
|
-
gdsCardMediaRatioMap,
|
|
246
|
-
gdsCardSizePaddingMap,
|
|
247
|
-
gdsCardTitleOrderMap,
|
|
248
|
-
gdsChartSetATypeRegistry,
|
|
249
|
-
gdsChartSetBTypeRegistry,
|
|
250
|
-
gdsChartTypeRegistry,
|
|
251
|
-
gdsDefaultChartLegend,
|
|
252
|
-
gdsIconRegistry,
|
|
253
|
-
gdsIconToneColor,
|
|
254
|
-
gdsLocales,
|
|
255
|
-
gdsSeriesPalette,
|
|
251
|
+
gdsActivityPictograms,
|
|
252
|
+
gdsPictogramUsageRules,
|
|
256
253
|
gdsStyle,
|
|
257
254
|
generateGdsDesignHandoffReport,
|
|
258
255
|
getGdsAccessGateActionPriority,
|
|
@@ -260,6 +257,7 @@ import {
|
|
|
260
257
|
getGdsAccessGateStates,
|
|
261
258
|
getGdsAccessibilityEvidence,
|
|
262
259
|
getGdsAccessibilityEvidenceSummary,
|
|
260
|
+
getGdsActivityPictogramKeys,
|
|
263
261
|
getGdsBlockTypes,
|
|
264
262
|
getGdsContentPattern,
|
|
265
263
|
getGdsContentPatterns,
|
|
@@ -267,36 +265,21 @@ import {
|
|
|
267
265
|
getGdsCopyTemplates,
|
|
268
266
|
getGdsDesignComponentMappings,
|
|
269
267
|
getGdsDesignTokenMappings,
|
|
270
|
-
getGdsIconKeys,
|
|
271
|
-
getGdsIconMetadata,
|
|
272
|
-
getGdsIconToneColor,
|
|
273
268
|
getGdsLayoutTemplate,
|
|
274
269
|
getGdsLayoutTemplates,
|
|
275
270
|
getGdsMaturityCapabilities,
|
|
276
271
|
getGdsMaturityCapability,
|
|
277
272
|
getGdsMaturitySummary,
|
|
278
|
-
getGdsMessages,
|
|
279
273
|
getGdsNotificationLivePolicy,
|
|
280
|
-
getGdsOwnedContrastProps,
|
|
281
274
|
getGdsPageTemplate,
|
|
282
275
|
getGdsPageTemplates,
|
|
283
276
|
getGdsRecommendedMaturityCapabilities,
|
|
284
|
-
getGdsSeriesColor,
|
|
285
277
|
getGdsTaskPattern,
|
|
286
278
|
getGdsTaskPatterns,
|
|
287
279
|
getProviderIdentityLabel,
|
|
288
280
|
getProviderIdentityPolicy,
|
|
289
|
-
getSemanticActionConfig,
|
|
290
|
-
getSemanticActionLabel,
|
|
291
281
|
getSupportedProviderIdentityIds,
|
|
292
|
-
|
|
293
|
-
hu,
|
|
294
|
-
isGdsChartSetAType,
|
|
295
|
-
isGdsChartSetBType,
|
|
296
|
-
isGdsIconKey,
|
|
297
|
-
isPresentationMode,
|
|
298
|
-
it,
|
|
299
|
-
mergeGdsVocabularyPacks,
|
|
282
|
+
isGdsActivityPictogramKey,
|
|
300
283
|
normalizeGdsResponsiveValue,
|
|
301
284
|
redactGdsAccessGateMetadata,
|
|
302
285
|
registerGdsBlock,
|
|
@@ -306,27 +289,513 @@ import {
|
|
|
306
289
|
resolveAccentPanelStyles,
|
|
307
290
|
resolveGdsAccessAdapterState,
|
|
308
291
|
resolveGdsAccessState,
|
|
309
|
-
|
|
292
|
+
resolveGdsActivityPictogramLabel,
|
|
310
293
|
resolveGdsLayoutStyle,
|
|
311
294
|
resolveGdsLocale,
|
|
312
295
|
resolveGdsMessage,
|
|
313
|
-
resolveSemanticActionConfig,
|
|
314
|
-
resolveSurfacePresentationStyles,
|
|
315
|
-
ru,
|
|
316
296
|
sortGdsAccessGateActions,
|
|
317
297
|
sortGdsLocaleStrings,
|
|
318
298
|
useGdsDirection,
|
|
319
299
|
validateCreatorCss,
|
|
320
300
|
validateGdsAccessGateContract,
|
|
321
301
|
validateGdsAccessibilityEvidence,
|
|
322
|
-
validateGdsChartData,
|
|
323
302
|
validateGdsContentPatterns,
|
|
324
303
|
validateGdsCopyTemplate,
|
|
325
304
|
validateGdsDesignHandoffMappings,
|
|
326
305
|
validateGdsLayout,
|
|
327
306
|
validateGdsPageTemplates,
|
|
328
307
|
validateGdsTaskPatterns
|
|
329
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-5G3XZWSW.mjs";
|
|
309
|
+
import {
|
|
310
|
+
GDS_PIN_APPROXIMATE_DASH,
|
|
311
|
+
GDS_PIN_EMOJI_SCALE,
|
|
312
|
+
GDS_PIN_EMPHASIS_STROKE,
|
|
313
|
+
GDS_PIN_HEAD_CENTER_OFFSET,
|
|
314
|
+
GDS_PIN_ICON_SCALE,
|
|
315
|
+
GDS_PIN_SELECTED_SCALE,
|
|
316
|
+
GdsMapPinBadge
|
|
317
|
+
} from "./chunk-NTNVQZJU.mjs";
|
|
318
|
+
import {
|
|
319
|
+
ChartTokenPanel,
|
|
320
|
+
FormField,
|
|
321
|
+
GDS_CHART_SERIES_COLORS,
|
|
322
|
+
GDS_CHART_SERIES_SLOTS,
|
|
323
|
+
GDS_LISTING_PICK_BADGE_FONT_SIZE_PX,
|
|
324
|
+
GDS_LISTING_PICK_BADGE_ICON_PX,
|
|
325
|
+
GDS_LISTING_PICK_BADGE_INSET_PX,
|
|
326
|
+
GDS_LISTING_PICK_BADGE_LINE_HEIGHT_PX,
|
|
327
|
+
GDS_LISTING_PICK_BADGE_PADDING_BLOCK_PX,
|
|
328
|
+
GDS_LISTING_PICK_BADGE_PADDING_INLINE_PX,
|
|
329
|
+
GDS_LISTING_TILE_SIZE_PX,
|
|
330
|
+
GdsBadge,
|
|
331
|
+
GdsChart,
|
|
332
|
+
GdsVocabulary,
|
|
333
|
+
ListingCard,
|
|
334
|
+
MAX_LISTING_CARD_ACTIONS,
|
|
335
|
+
ReferenceSection,
|
|
336
|
+
SectionPanel,
|
|
337
|
+
SimpleDataTable,
|
|
338
|
+
createGdsOwnedContrastTokens,
|
|
339
|
+
createGdsVocabularyPack,
|
|
340
|
+
gdsBadgeAccentColors,
|
|
341
|
+
gdsBadgeAccentShades,
|
|
342
|
+
gdsCardDensityPaddingMap,
|
|
343
|
+
gdsCardGapMap,
|
|
344
|
+
gdsCardMediaRatioMap,
|
|
345
|
+
gdsCardSizePaddingMap,
|
|
346
|
+
gdsCardTitleOrderMap,
|
|
347
|
+
gdsChartSetATypeRegistry,
|
|
348
|
+
gdsChartSetBTypeRegistry,
|
|
349
|
+
gdsChartSetCTypeRegistry,
|
|
350
|
+
gdsChartTypeRegistry,
|
|
351
|
+
gdsDefaultChartLegend,
|
|
352
|
+
gdsLocales,
|
|
353
|
+
gdsSeededRandom,
|
|
354
|
+
gdsSeriesPalette,
|
|
355
|
+
getGdsChartSeriesColor,
|
|
356
|
+
getGdsMessages,
|
|
357
|
+
getGdsOwnedContrastProps,
|
|
358
|
+
getGdsSeriesColor,
|
|
359
|
+
getSemanticActionConfig,
|
|
360
|
+
getSemanticActionLabel,
|
|
361
|
+
isGdsChartSetAType,
|
|
362
|
+
isGdsChartSetBType,
|
|
363
|
+
isGdsChartSetCType,
|
|
364
|
+
mergeGdsVocabularyPacks,
|
|
365
|
+
resolveGdsCardContract,
|
|
366
|
+
resolveGdsChartTokenColor,
|
|
367
|
+
resolveGdsGeneratedPaletteHex,
|
|
368
|
+
resolveSemanticActionConfig,
|
|
369
|
+
validateGdsChartData
|
|
370
|
+
} from "./chunk-EQ7Y2PUI.mjs";
|
|
371
|
+
import {
|
|
372
|
+
GDS_PIN_SILHOUETTE_PATH,
|
|
373
|
+
GdsBadgeShapeCircle,
|
|
374
|
+
GdsBadgeShapeHexagon,
|
|
375
|
+
GdsBadgeShapePin,
|
|
376
|
+
GdsBadgeShapeRosette,
|
|
377
|
+
GdsBadgeShapeShield,
|
|
378
|
+
GdsBadgeShapeSquircle,
|
|
379
|
+
GdsBadgeShapes,
|
|
380
|
+
GdsBadgeStack,
|
|
381
|
+
GdsBadgeStackLayer,
|
|
382
|
+
MissingDataPrompt,
|
|
383
|
+
StateBlock,
|
|
384
|
+
isPresentationMode,
|
|
385
|
+
resolveSurfacePresentationStyles
|
|
386
|
+
} from "./chunk-SPPTDVJC.mjs";
|
|
387
|
+
import {
|
|
388
|
+
GdsIcon,
|
|
389
|
+
GdsIcons,
|
|
390
|
+
gdsIconRegistry,
|
|
391
|
+
gdsIconToneColor,
|
|
392
|
+
getGdsIconKeys,
|
|
393
|
+
getGdsIconMetadata,
|
|
394
|
+
getGdsIconToneColor,
|
|
395
|
+
isGdsIconKey
|
|
396
|
+
} from "./chunk-J66ITCXC.mjs";
|
|
397
|
+
import {
|
|
398
|
+
ko
|
|
399
|
+
} from "./chunk-F76YTG3S.mjs";
|
|
400
|
+
import {
|
|
401
|
+
ru
|
|
402
|
+
} from "./chunk-KLFTBWEG.mjs";
|
|
403
|
+
import {
|
|
404
|
+
zh
|
|
405
|
+
} from "./chunk-DBJE4TRO.mjs";
|
|
406
|
+
import {
|
|
407
|
+
de
|
|
408
|
+
} from "./chunk-5GH7XD7X.mjs";
|
|
409
|
+
import {
|
|
410
|
+
es
|
|
411
|
+
} from "./chunk-MKEWYVTJ.mjs";
|
|
412
|
+
import {
|
|
413
|
+
fr
|
|
414
|
+
} from "./chunk-6WDH57MJ.mjs";
|
|
415
|
+
import {
|
|
416
|
+
he
|
|
417
|
+
} from "./chunk-LERXSJHD.mjs";
|
|
418
|
+
import {
|
|
419
|
+
hu
|
|
420
|
+
} from "./chunk-IMT3UTOT.mjs";
|
|
421
|
+
import {
|
|
422
|
+
it
|
|
423
|
+
} from "./chunk-OH5HH4G3.mjs";
|
|
424
|
+
import {
|
|
425
|
+
ja
|
|
426
|
+
} from "./chunk-A32PWTD2.mjs";
|
|
427
|
+
import {
|
|
428
|
+
ar
|
|
429
|
+
} from "./chunk-KEYBUMOR.mjs";
|
|
430
|
+
import {
|
|
431
|
+
en
|
|
432
|
+
} from "./chunk-BD5XQH5Z.mjs";
|
|
433
|
+
|
|
434
|
+
// src/generated-art-svg.ts
|
|
435
|
+
import { cloneElement, createElement, isValidElement } from "react";
|
|
436
|
+
import { renderToStaticMarkup } from "react-dom/server";
|
|
437
|
+
var isIconKey = (icon) => typeof icon === "string";
|
|
438
|
+
function iconSvg(icon, color, size) {
|
|
439
|
+
const element = isIconKey(icon) ? createElement(GdsIcon, { icon, size: "100%", tone: "default" }) : isValidElement(icon) ? cloneElement(icon, { stroke: 1.75 }) : icon;
|
|
440
|
+
const rendered = renderToStaticMarkup(createElement("g", { style: { color } }, element));
|
|
441
|
+
return `<svg width="${size}" height="${size}" viewBox="0 0 24 24">${rendered}</svg>`;
|
|
442
|
+
}
|
|
443
|
+
function mixHexTowardBlack(hex, keepPercent) {
|
|
444
|
+
const match = /^#([0-9a-f]{6})$/i.exec(hex);
|
|
445
|
+
if (!match) {
|
|
446
|
+
return hex;
|
|
447
|
+
}
|
|
448
|
+
const value = parseInt(match[1], 16);
|
|
449
|
+
const mix = (channel) => Math.round(channel * keepPercent / 100);
|
|
450
|
+
const r = mix(value >> 16 & 255);
|
|
451
|
+
const g = mix(value >> 8 & 255);
|
|
452
|
+
const b = mix(value & 255);
|
|
453
|
+
return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
454
|
+
}
|
|
455
|
+
function escapeXmlText(value) {
|
|
456
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
457
|
+
}
|
|
458
|
+
var THUMBNAIL_ASPECT_RATIO_VIEWBOX = {
|
|
459
|
+
"3:2": { width: 300, height: 200 },
|
|
460
|
+
"16:9": { width: 320, height: 180 },
|
|
461
|
+
"4:3": { width: 320, height: 240 },
|
|
462
|
+
"1:1": { width: 240, height: 240 }
|
|
463
|
+
};
|
|
464
|
+
function computeMotifTransform(seed, viewBoxWidth, viewBoxHeight) {
|
|
465
|
+
const next = gdsSeededRandom(seed);
|
|
466
|
+
const rotationDeg = (next() - 0.5) * 26;
|
|
467
|
+
const scale = viewBoxHeight / 24 * (1.7 + next() * 0.3);
|
|
468
|
+
const centerX = viewBoxWidth * (0.78 + (next() - 0.5) * 0.12);
|
|
469
|
+
const centerY = viewBoxHeight * (0.28 + (next() - 0.5) * 0.14);
|
|
470
|
+
return { rotationDeg, scale, centerX, centerY };
|
|
471
|
+
}
|
|
472
|
+
function buildGdsThumbnailSvg(options) {
|
|
473
|
+
const { seed, categories, paletteSource, category, shade, colors, themePresetId, colorScheme, aspectRatio = "3:2", maxBadges = 3, motifOpacity = 0.14, background = "wash", label } = options;
|
|
474
|
+
if (categories.length === 0) {
|
|
475
|
+
throw new Error("buildGdsThumbnailSvg: `categories` must contain at least one entry.");
|
|
476
|
+
}
|
|
477
|
+
const palette = resolveGdsGeneratedPaletteHex({ paletteSource, category, shade, colors, themePresetId, colorScheme });
|
|
478
|
+
const { width, height } = THUMBNAIL_ASPECT_RATIO_VIEWBOX[aspectRatio];
|
|
479
|
+
const motif = computeMotifTransform(seed, width, height);
|
|
480
|
+
const backgroundArtSvg = background === "mosaic-abstract" ? computeMosaicTilesSvg(seed, width, height, palette.primary, palette.accent) : background === "icon-field" ? computeIconFieldSvg(seed, categories, width, height) : typeof background === "object" && background.type === "region-mosaic" ? background.regions.map((region) => {
|
|
481
|
+
const weight = region.weight ?? 1;
|
|
482
|
+
const opacity = Math.min(0.85, 0.06 + weight * 0.05);
|
|
483
|
+
return `<rect x="${region.x0 * width}" y="${region.y0 * height}" width="${(region.x1 - region.x0) * width}" height="${(region.y1 - region.y0) * height}" fill="${palette.accent}" opacity="${opacity}" />`;
|
|
484
|
+
}).join("") : "";
|
|
485
|
+
const inverse = "#ffffff";
|
|
486
|
+
const pillBg = mixHexTowardBlack(palette.accent, 30);
|
|
487
|
+
const gradientDark = mixHexTowardBlack(palette.primary, 30);
|
|
488
|
+
const lead = categories[0];
|
|
489
|
+
const secondary = categories.slice(1, Math.max(maxBadges, 1));
|
|
490
|
+
const badgeAreaHeight = height * 0.22;
|
|
491
|
+
const badgeY = height - badgeAreaHeight / 2;
|
|
492
|
+
let cursorX = 14;
|
|
493
|
+
const leadFontSize = Math.max(11, height * 0.065);
|
|
494
|
+
const leadIconSize = leadFontSize * 1.3;
|
|
495
|
+
const leadTextWidth = lead.label.length * leadFontSize * 0.58;
|
|
496
|
+
const leadPillWidth = leadIconSize + leadTextWidth + leadFontSize * 1.4;
|
|
497
|
+
const leadPillHeight = leadIconSize + leadFontSize * 0.6;
|
|
498
|
+
const leadBadgeSvg = `
|
|
499
|
+
<g transform="translate(${cursorX} ${badgeY - leadPillHeight / 2})">
|
|
500
|
+
<rect width="${leadPillWidth}" height="${leadPillHeight}" rx="${leadPillHeight / 2}" fill="${pillBg}" />
|
|
501
|
+
<g transform="translate(${leadPillHeight * 0.28} ${leadPillHeight / 2 - leadIconSize / 2})">${iconSvg(lead.icon, inverse, leadIconSize)}</g>
|
|
502
|
+
<text x="${leadIconSize + leadPillHeight * 0.4}" y="${leadPillHeight / 2}" fill="${inverse}" font-family="system-ui, sans-serif" font-size="${leadFontSize}" font-weight="600" dominant-baseline="central">${escapeXmlText(lead.label)}</text>
|
|
503
|
+
</g>`;
|
|
504
|
+
cursorX += leadPillWidth + 8;
|
|
505
|
+
const secondaryBadgesSvg = secondary.map((entry, index) => {
|
|
506
|
+
const discSize = leadPillHeight * (0.92 - index * 0.06);
|
|
507
|
+
const svg = `
|
|
508
|
+
<g transform="translate(${cursorX} ${badgeY - discSize / 2})" opacity="${1 - index * 0.12}">
|
|
509
|
+
<circle cx="${discSize / 2}" cy="${discSize / 2}" r="${discSize / 2}" fill="${pillBg}" stroke="${gradientDark}" stroke-width="2" />
|
|
510
|
+
<g transform="translate(${discSize * 0.24} ${discSize * 0.24})">${iconSvg(entry.icon, inverse, discSize * 0.52)}</g>
|
|
511
|
+
</g>`;
|
|
512
|
+
cursorX += discSize * 0.75;
|
|
513
|
+
return svg;
|
|
514
|
+
}).join("");
|
|
515
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
516
|
+
<title>${escapeXmlText(label)}</title>
|
|
517
|
+
<defs>
|
|
518
|
+
<linearGradient id="gds-thumb-bg" x1="0" y1="0" x2="0" y2="1">
|
|
519
|
+
<stop offset="0%" stop-color="${palette.primary}" />
|
|
520
|
+
<stop offset="100%" stop-color="${gradientDark}" />
|
|
521
|
+
</linearGradient>
|
|
522
|
+
<linearGradient id="gds-thumb-scrim" x1="0" y1="1" x2="0" y2="0">
|
|
523
|
+
<stop offset="0%" stop-color="${gradientDark}" />
|
|
524
|
+
<stop offset="100%" stop-color="${gradientDark}" stop-opacity="0" />
|
|
525
|
+
</linearGradient>
|
|
526
|
+
</defs>
|
|
527
|
+
<rect width="${width}" height="${height}" fill="url(#gds-thumb-bg)" />
|
|
528
|
+
${background === "wash" ? `<g transform="translate(${motif.centerX} ${motif.centerY}) rotate(${motif.rotationDeg}) scale(${motif.scale})" opacity="${motifOpacity}">
|
|
529
|
+
<g transform="translate(-12 -12)">${iconSvg(lead.icon, inverse, 24)}</g>
|
|
530
|
+
</g>` : backgroundArtSvg}
|
|
531
|
+
<rect x="0" y="${height - badgeAreaHeight * 1.6}" width="${width}" height="${badgeAreaHeight * 1.6}" fill="url(#gds-thumb-scrim)" />
|
|
532
|
+
${leadBadgeSvg}
|
|
533
|
+
${secondaryBadgesSvg}
|
|
534
|
+
</svg>`;
|
|
535
|
+
}
|
|
536
|
+
var HERO_ASPECT_RATIO_VIEWBOX = {
|
|
537
|
+
"21:9": { width: 630, height: 270 },
|
|
538
|
+
"16:9": { width: 640, height: 360 },
|
|
539
|
+
"3:1": { width: 600, height: 200 }
|
|
540
|
+
};
|
|
541
|
+
var BADGE_SLOTS = {
|
|
542
|
+
large: [{ x: 0.85, y: 0.32 }],
|
|
543
|
+
medium: [
|
|
544
|
+
{ x: 0.14, y: 0.72 },
|
|
545
|
+
{ x: 0.52, y: 0.82 }
|
|
546
|
+
],
|
|
547
|
+
small: [
|
|
548
|
+
{ x: 0.34, y: 0.18 },
|
|
549
|
+
{ x: 0.7, y: 0.6 },
|
|
550
|
+
{ x: 0.94, y: 0.84 }
|
|
551
|
+
]
|
|
552
|
+
};
|
|
553
|
+
var SLOT_SIZE_FACTOR = { large: 0.32, medium: 0.2, small: 0.13 };
|
|
554
|
+
var SLOT_OPACITY = { large: 1, medium: 0.85, small: 0.6 };
|
|
555
|
+
function seededShuffle(items, next) {
|
|
556
|
+
const result = [...items];
|
|
557
|
+
for (let i = result.length - 1; i > 0; i -= 1) {
|
|
558
|
+
const j = Math.floor(next() * (i + 1));
|
|
559
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
560
|
+
}
|
|
561
|
+
return result;
|
|
562
|
+
}
|
|
563
|
+
function placeHeroBadges(badges, seed) {
|
|
564
|
+
const next = gdsSeededRandom(`${seed}:badges`);
|
|
565
|
+
const capped = badges.slice(0, 6);
|
|
566
|
+
const bySize = {
|
|
567
|
+
large: capped.slice(0, 1),
|
|
568
|
+
medium: capped.slice(1, 3),
|
|
569
|
+
small: capped.slice(3, 6)
|
|
570
|
+
};
|
|
571
|
+
const placed = [];
|
|
572
|
+
Object.keys(BADGE_SLOTS).forEach((size) => {
|
|
573
|
+
const slots = seededShuffle(BADGE_SLOTS[size], next);
|
|
574
|
+
bySize[size].forEach((badge, index) => {
|
|
575
|
+
const slot = slots[index];
|
|
576
|
+
placed.push({ badge, size, x: slot.x, y: slot.y, jitterDeg: (next() - 0.5) * 10 });
|
|
577
|
+
});
|
|
578
|
+
});
|
|
579
|
+
return placed;
|
|
580
|
+
}
|
|
581
|
+
function computeMosaicTilesSvg(seed, width, height, primary, accent) {
|
|
582
|
+
const next = gdsSeededRandom(`${seed}:mosaic`);
|
|
583
|
+
const columns = 9;
|
|
584
|
+
const rows = 4;
|
|
585
|
+
const cellWidth = width / columns;
|
|
586
|
+
const cellHeight = height / rows;
|
|
587
|
+
const tiles = [];
|
|
588
|
+
for (let row = 0; row < rows; row += 1) {
|
|
589
|
+
for (let col = 0; col < columns; col += 1) {
|
|
590
|
+
if (next() < 0.32) {
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
const inset = 0.08 + next() * 0.1;
|
|
594
|
+
const x = col * cellWidth + cellWidth * inset;
|
|
595
|
+
const y = row * cellHeight + cellHeight * inset;
|
|
596
|
+
const w = cellWidth * (1 - inset * 2);
|
|
597
|
+
const h = cellHeight * (1 - inset * 2);
|
|
598
|
+
const opacity = 0.05 + next() * 0.11;
|
|
599
|
+
const fill = next() < 0.5 ? primary : accent;
|
|
600
|
+
tiles.push(`<rect x="${x}" y="${y}" width="${w}" height="${h}" rx="${Math.min(w, h) * 0.12}" fill="${fill}" opacity="${opacity}" />`);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return tiles.join("");
|
|
604
|
+
}
|
|
605
|
+
function computeIconFieldSvg(seed, badges, width, height) {
|
|
606
|
+
if (badges.length === 0) {
|
|
607
|
+
return "";
|
|
608
|
+
}
|
|
609
|
+
const placementRandom = gdsSeededRandom(`${seed}:icon-field`);
|
|
610
|
+
const pickRandom = gdsSeededRandom(`${seed}:icon-field-pick`);
|
|
611
|
+
const count = Math.min(badges.length, 8);
|
|
612
|
+
const groups = [];
|
|
613
|
+
for (let i = 0; i < count; i += 1) {
|
|
614
|
+
const x = width * (0.08 + placementRandom() * 0.84);
|
|
615
|
+
const y = height * (0.1 + placementRandom() * 0.8);
|
|
616
|
+
const size = height * (0.22 + placementRandom() * 0.16);
|
|
617
|
+
const rotationDeg = (placementRandom() - 0.5) * 40;
|
|
618
|
+
const badge = badges[Math.floor(pickRandom() * badges.length)];
|
|
619
|
+
groups.push(
|
|
620
|
+
`<g transform="translate(${x} ${y}) rotate(${rotationDeg}) scale(${size / 24})" opacity="0.1"><g transform="translate(-12 -12)">${iconSvg(badge.icon, "#ffffff", 24)}</g></g>`
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
return groups.join("");
|
|
624
|
+
}
|
|
625
|
+
function buildGdsHeroSvg(options) {
|
|
626
|
+
const { seed, paletteSource, category, shade, colors, themePresetId, colorScheme, background = "wash", badges = [], aspectRatio = "21:9", label } = options;
|
|
627
|
+
const palette = resolveGdsGeneratedPaletteHex({ paletteSource, category, shade, colors, themePresetId, colorScheme });
|
|
628
|
+
const { width, height } = HERO_ASPECT_RATIO_VIEWBOX[aspectRatio];
|
|
629
|
+
const gradientDark = mixHexTowardBlack(palette.primary, 30);
|
|
630
|
+
const accentDark = mixHexTowardBlack(palette.accent, 30);
|
|
631
|
+
let backgroundSvg = "";
|
|
632
|
+
if (background === "mosaic-abstract") {
|
|
633
|
+
backgroundSvg = computeMosaicTilesSvg(seed, width, height, palette.primary, palette.accent);
|
|
634
|
+
} else if (background === "icon-field") {
|
|
635
|
+
backgroundSvg = computeIconFieldSvg(seed, badges, width, height);
|
|
636
|
+
} else if (typeof background === "object" && background.type === "region-mosaic") {
|
|
637
|
+
backgroundSvg = background.regions.map((region) => {
|
|
638
|
+
const weight = region.weight ?? 1;
|
|
639
|
+
const opacity = Math.min(0.85, 0.06 + weight * 0.05);
|
|
640
|
+
return `<rect x="${region.x0 * width}" y="${region.y0 * height}" width="${(region.x1 - region.x0) * width}" height="${(region.y1 - region.y0) * height}" fill="${palette.accent}" opacity="${opacity}" />`;
|
|
641
|
+
}).join("");
|
|
642
|
+
}
|
|
643
|
+
const placedBadges = placeHeroBadges(badges, seed);
|
|
644
|
+
const badgesSvg = placedBadges.map(({ badge, size, x, y, jitterDeg }) => {
|
|
645
|
+
const boxSize = height * SLOT_SIZE_FACTOR[size];
|
|
646
|
+
const cx = x * width;
|
|
647
|
+
const cy = y * height;
|
|
648
|
+
return `
|
|
649
|
+
<g transform="translate(${cx} ${cy}) rotate(${jitterDeg})" opacity="${SLOT_OPACITY[size]}">
|
|
650
|
+
<circle r="${boxSize / 2}" fill="${accentDark}" stroke="${gradientDark}" stroke-width="2" />
|
|
651
|
+
<g transform="translate(${-boxSize * 0.275} ${-boxSize * 0.275})">${iconSvg(badge.icon, "#ffffff", boxSize * 0.55)}</g>
|
|
652
|
+
</g>`;
|
|
653
|
+
}).join("");
|
|
654
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
655
|
+
<title>${escapeXmlText(label)}</title>
|
|
656
|
+
<defs>
|
|
657
|
+
<linearGradient id="gds-hero-bg" x1="0" y1="0" x2="1" y2="1">
|
|
658
|
+
<stop offset="0%" stop-color="${palette.primary}" />
|
|
659
|
+
<stop offset="100%" stop-color="${gradientDark}" />
|
|
660
|
+
</linearGradient>
|
|
661
|
+
</defs>
|
|
662
|
+
<rect width="${width}" height="${height}" fill="url(#gds-hero-bg)" />
|
|
663
|
+
${backgroundSvg}
|
|
664
|
+
${badgesSvg}
|
|
665
|
+
</svg>`;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// src/generated-brand-badge.ts
|
|
669
|
+
import { cloneElement as cloneElement2, createElement as createElement2, isValidElement as isValidElement2 } from "react";
|
|
670
|
+
import { renderToStaticMarkup as renderToStaticMarkup2 } from "react-dom/server";
|
|
671
|
+
import { computeGdsThemeIdentity, getGdsContrastRatio } from "@sovereignsquad/gds-theme";
|
|
672
|
+
var CANVAS = 48;
|
|
673
|
+
var DEFAULT_CORNER_RADIUS_RATIO = 0.25;
|
|
674
|
+
var MASKABLE_SAFE_ZONE_RATIO = 0.8;
|
|
675
|
+
var MOTIF_SIZE_RATIO = 0.55;
|
|
676
|
+
var MOTIF_COLOR = "#ffffff";
|
|
677
|
+
var isIconKey2 = (icon) => typeof icon === "string";
|
|
678
|
+
function escapeXmlText2(value) {
|
|
679
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
680
|
+
}
|
|
681
|
+
function parseColorChannels(value) {
|
|
682
|
+
const trimmed = value.trim();
|
|
683
|
+
const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(trimmed);
|
|
684
|
+
if (hex) {
|
|
685
|
+
let digits = hex[1];
|
|
686
|
+
if (digits.length === 3) digits = digits.split("").map((c) => c + c).join("");
|
|
687
|
+
const parsed = parseInt(digits, 16);
|
|
688
|
+
return { r: parsed >> 16 & 255, g: parsed >> 8 & 255, b: parsed & 255 };
|
|
689
|
+
}
|
|
690
|
+
const rgb = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)\s*(?:[,/]\s*[\d.]+)?\s*\)$/i.exec(trimmed);
|
|
691
|
+
if (rgb) {
|
|
692
|
+
return { r: Math.round(+rgb[1]), g: Math.round(+rgb[2]), b: Math.round(+rgb[3]) };
|
|
693
|
+
}
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
function toHex({ r, g, b }) {
|
|
697
|
+
const clamp = (c) => Math.max(0, Math.min(255, Math.round(c)));
|
|
698
|
+
return `#${[clamp(r), clamp(g), clamp(b)].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
699
|
+
}
|
|
700
|
+
function mixHexTowardBlack2(color, keepPercent) {
|
|
701
|
+
const channels = parseColorChannels(color);
|
|
702
|
+
if (!channels) {
|
|
703
|
+
return color;
|
|
704
|
+
}
|
|
705
|
+
const mix = (channel) => channel * keepPercent / 100;
|
|
706
|
+
return toHex({ r: mix(channels.r), g: mix(channels.g), b: mix(channels.b) });
|
|
707
|
+
}
|
|
708
|
+
function mixHexChannelwise(a, b, t) {
|
|
709
|
+
const colorA = parseColorChannels(a);
|
|
710
|
+
const colorB = parseColorChannels(b);
|
|
711
|
+
if (!colorA || !colorB) {
|
|
712
|
+
return a;
|
|
713
|
+
}
|
|
714
|
+
const mix = (from, to) => from + (to - from) * t;
|
|
715
|
+
return toHex({ r: mix(colorA.r, colorB.r), g: mix(colorA.g, colorB.g), b: mix(colorA.b, colorB.b) });
|
|
716
|
+
}
|
|
717
|
+
function roundNum(value) {
|
|
718
|
+
return Math.round(value * 1e4) / 1e4;
|
|
719
|
+
}
|
|
720
|
+
function sanitizeForId(value) {
|
|
721
|
+
return value.replace(/[^a-zA-Z0-9-]/g, "-");
|
|
722
|
+
}
|
|
723
|
+
function iconToStaticSvg(icon, color, size) {
|
|
724
|
+
const element = isIconKey2(icon) ? createElement2(GdsIcon, { icon, size: "100%", tone: "default" }) : isValidElement2(icon) ? cloneElement2(icon, { stroke: 1.75 }) : icon;
|
|
725
|
+
const rendered = renderToStaticMarkup2(createElement2("g", { style: { color } }, element));
|
|
726
|
+
return `<svg width="${size}" height="${size}" viewBox="0 0 24 24">${rendered}</svg>`;
|
|
727
|
+
}
|
|
728
|
+
function resolveMotifBackingKeepPercent(primary, accent) {
|
|
729
|
+
for (let keepPercent = 100; keepPercent >= 0; keepPercent -= 5) {
|
|
730
|
+
const midpoint = mixHexChannelwise(
|
|
731
|
+
mixHexTowardBlack2(primary, keepPercent),
|
|
732
|
+
mixHexTowardBlack2(accent, keepPercent),
|
|
733
|
+
0.5
|
|
734
|
+
);
|
|
735
|
+
let ratio;
|
|
736
|
+
try {
|
|
737
|
+
ratio = getGdsContrastRatio(MOTIF_COLOR, midpoint);
|
|
738
|
+
} catch {
|
|
739
|
+
return 100;
|
|
740
|
+
}
|
|
741
|
+
if (ratio >= 3) {
|
|
742
|
+
return keepPercent;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return 0;
|
|
746
|
+
}
|
|
747
|
+
function buildGdsBrandBadgeSvg(options) {
|
|
748
|
+
const { themePresetId, colorScheme, colors, icon, seed: explicitSeed, cornerRadiusRatio, maskable = false, size = CANVAS, label } = options;
|
|
749
|
+
if (!label || !label.trim()) {
|
|
750
|
+
throw new Error(
|
|
751
|
+
"buildGdsBrandBadgeSvg: `label` is required and must not be empty \u2014 a standalone image file has no adjacent DOM to fall back on for an accessible name."
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
if (maskable && cornerRadiusRatio !== void 0) {
|
|
755
|
+
throw new Error(
|
|
756
|
+
"buildGdsBrandBadgeSvg: `maskable` and `cornerRadiusRatio` are mutually exclusive \u2014 a maskable badge is always a full-bleed square with no corner rounding of its own (the host platform applies its own mask shape)."
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
const resolvedCornerRadiusRatio = cornerRadiusRatio ?? DEFAULT_CORNER_RADIUS_RATIO;
|
|
760
|
+
if (!Number.isFinite(resolvedCornerRadiusRatio) || resolvedCornerRadiusRatio < 0 || resolvedCornerRadiusRatio > 0.5) {
|
|
761
|
+
throw new Error(`buildGdsBrandBadgeSvg: \`cornerRadiusRatio\` must be between 0 and 0.5 (received ${resolvedCornerRadiusRatio}).`);
|
|
762
|
+
}
|
|
763
|
+
if (!Number.isFinite(size) || size <= 0) {
|
|
764
|
+
throw new Error(`buildGdsBrandBadgeSvg: \`size\` must be a positive, finite number (received ${size}).`);
|
|
765
|
+
}
|
|
766
|
+
const scheme = colorScheme ?? "light";
|
|
767
|
+
const palette = resolveGdsGeneratedPaletteHex({ colors, themePresetId, colorScheme: scheme });
|
|
768
|
+
const identity = colors ? "override" : computeGdsThemeIdentity({ preset: themePresetId, colorScheme: scheme });
|
|
769
|
+
const seed = explicitSeed ?? identity;
|
|
770
|
+
const tiltDeg = Math.round((gdsSeededRandom(seed)() - 0.5) * 40);
|
|
771
|
+
const keepPercent = resolveMotifBackingKeepPercent(palette.primary, palette.accent);
|
|
772
|
+
const gradientStart = mixHexTowardBlack2(palette.primary, keepPercent);
|
|
773
|
+
const gradientEnd = mixHexTowardBlack2(palette.accent, keepPercent);
|
|
774
|
+
const idNamespace = sanitizeForId(colors ? `override-${palette.primary}-${palette.accent}` : `${themePresetId}-${scheme}`);
|
|
775
|
+
const gradientId = `gds-badge-grad-${idNamespace}`;
|
|
776
|
+
const clipId = `gds-badge-clip-${idNamespace}`;
|
|
777
|
+
const motifIcon = icon ?? createElement2(GdsBadgeShapes.circle);
|
|
778
|
+
const motifSize = roundNum(maskable ? CANVAS * MASKABLE_SAFE_ZONE_RATIO / Math.SQRT2 : CANVAS * MOTIF_SIZE_RATIO);
|
|
779
|
+
const motifMarkup = iconToStaticSvg(motifIcon, MOTIF_COLOR, motifSize);
|
|
780
|
+
const clipRectRx = roundNum(maskable ? 0 : resolvedCornerRadiusRatio * CANVAS);
|
|
781
|
+
const motifOffset = roundNum(-motifSize / 2);
|
|
782
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${CANVAS} ${CANVAS}" width="${size}" height="${size}" data-gds-theme-identity="${escapeXmlText2(identity)}">
|
|
783
|
+
<title>${escapeXmlText2(label)}</title>
|
|
784
|
+
<defs>
|
|
785
|
+
<linearGradient id="${gradientId}" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
786
|
+
<stop offset="0%" stop-color="${gradientStart}" />
|
|
787
|
+
<stop offset="100%" stop-color="${gradientEnd}" />
|
|
788
|
+
</linearGradient>
|
|
789
|
+
<clipPath id="${clipId}">
|
|
790
|
+
<rect width="${CANVAS}" height="${CANVAS}" rx="${clipRectRx}" />
|
|
791
|
+
</clipPath>
|
|
792
|
+
</defs>
|
|
793
|
+
<rect width="${CANVAS}" height="${CANVAS}" rx="${clipRectRx}" fill="url(#${gradientId})" clip-path="url(#${clipId})" />
|
|
794
|
+
<g transform="translate(${CANVAS / 2} ${CANVAS / 2}) rotate(${tiltDeg})">
|
|
795
|
+
<g transform="translate(${motifOffset} ${motifOffset})">${motifMarkup}</g>
|
|
796
|
+
</g>
|
|
797
|
+
</svg>`;
|
|
798
|
+
}
|
|
330
799
|
export {
|
|
331
800
|
AISearchCard,
|
|
332
801
|
AccentPanel,
|
|
@@ -367,6 +836,7 @@ export {
|
|
|
367
836
|
CreatorThemeDiagnostics,
|
|
368
837
|
CtaButtonGroup,
|
|
369
838
|
DataToolbar,
|
|
839
|
+
DetailFactsTable,
|
|
370
840
|
DetailProfileShell,
|
|
371
841
|
DocsPageShell,
|
|
372
842
|
EditorialCard,
|
|
@@ -380,21 +850,62 @@ export {
|
|
|
380
850
|
FloatingActionPlacement,
|
|
381
851
|
FoodMenuSection,
|
|
382
852
|
FormField,
|
|
853
|
+
GDS_CHART_SERIES_COLORS,
|
|
854
|
+
GDS_CHART_SERIES_SLOTS,
|
|
855
|
+
GDS_DETAIL_FACTS_LABEL_COLUMN_PX,
|
|
856
|
+
GDS_DETAIL_FACT_IDS,
|
|
857
|
+
GDS_LISTING_PICK_BADGE_FONT_SIZE_PX,
|
|
858
|
+
GDS_LISTING_PICK_BADGE_ICON_PX,
|
|
859
|
+
GDS_LISTING_PICK_BADGE_INSET_PX,
|
|
860
|
+
GDS_LISTING_PICK_BADGE_LINE_HEIGHT_PX,
|
|
861
|
+
GDS_LISTING_PICK_BADGE_PADDING_BLOCK_PX,
|
|
862
|
+
GDS_LISTING_PICK_BADGE_PADDING_INLINE_PX,
|
|
863
|
+
GDS_LISTING_TILE_SIZE_PX,
|
|
864
|
+
GDS_PICTOGRAM_BASE_STROKE,
|
|
865
|
+
GDS_PICTOGRAM_DISABLED_OPACITY,
|
|
866
|
+
GDS_PICTOGRAM_GRID,
|
|
867
|
+
GDS_PICTOGRAM_HERO_LAYERS,
|
|
868
|
+
GDS_PICTOGRAM_SCALE_PX,
|
|
869
|
+
GDS_PICTOGRAM_STROKE_BY_SCALE,
|
|
870
|
+
GDS_PICTOGRAM_TREATMENT_SCALE,
|
|
871
|
+
GDS_PIN_APPROXIMATE_DASH,
|
|
872
|
+
GDS_PIN_EMOJI_SCALE,
|
|
873
|
+
GDS_PIN_EMPHASIS_STROKE,
|
|
874
|
+
GDS_PIN_HEAD_CENTER_OFFSET,
|
|
875
|
+
GDS_PIN_ICON_SCALE,
|
|
876
|
+
GDS_PIN_SELECTED_SCALE,
|
|
877
|
+
GDS_PIN_SILHOUETTE_PATH,
|
|
878
|
+
GDS_QUICK_START_ICON_BOX_PX,
|
|
383
879
|
GdsAdminDashboardTemplate,
|
|
384
880
|
GdsAnalyticsTemplate,
|
|
385
881
|
GdsAreaChart,
|
|
882
|
+
GdsBadge,
|
|
883
|
+
GdsBadgeShapeCircle,
|
|
884
|
+
GdsBadgeShapeHexagon,
|
|
885
|
+
GdsBadgeShapePin,
|
|
886
|
+
GdsBadgeShapeRosette,
|
|
887
|
+
GdsBadgeShapeShield,
|
|
888
|
+
GdsBadgeShapeSquircle,
|
|
889
|
+
GdsBadgeShapes,
|
|
890
|
+
GdsBadgeStack,
|
|
891
|
+
GdsBadgeStackLayer,
|
|
386
892
|
GdsBarChart,
|
|
387
893
|
GdsBenchmarkBarChart,
|
|
388
894
|
GdsBleed,
|
|
389
895
|
GdsBox,
|
|
896
|
+
GdsBreadcrumbs,
|
|
390
897
|
GdsCalendarHeatmapChart,
|
|
391
898
|
GdsChart,
|
|
392
899
|
GdsChartAxis,
|
|
393
900
|
GdsChartLegend,
|
|
394
901
|
GdsChartTooltip,
|
|
395
902
|
GdsCluster,
|
|
903
|
+
GdsColumnGrid,
|
|
904
|
+
GdsColumnGridItem,
|
|
905
|
+
GdsCompareButton,
|
|
396
906
|
GdsContainer,
|
|
397
907
|
GdsContentPatternCatalog,
|
|
908
|
+
GdsCountBadge,
|
|
398
909
|
GdsCrudEditorTemplate,
|
|
399
910
|
GdsDesignHandoffCatalog,
|
|
400
911
|
GdsDirectionBoundary,
|
|
@@ -412,16 +923,23 @@ export {
|
|
|
412
923
|
GdsInline,
|
|
413
924
|
GdsLineChart,
|
|
414
925
|
GdsLocaleText,
|
|
926
|
+
GdsLogoLockup,
|
|
415
927
|
GdsLongitudinalChart,
|
|
928
|
+
GdsMapPinBadge,
|
|
416
929
|
GdsMaturityRadarChart,
|
|
417
930
|
GdsMediaFrame,
|
|
931
|
+
GdsMeter,
|
|
932
|
+
GdsNotificationBell,
|
|
418
933
|
GdsOverflowFrame,
|
|
419
934
|
GdsPageTemplateCatalog,
|
|
935
|
+
GdsPictogram,
|
|
420
936
|
GdsPlural,
|
|
421
937
|
GdsPublicEventTemplate,
|
|
422
938
|
GdsRadarChart,
|
|
939
|
+
GdsRatingDisplay,
|
|
423
940
|
GdsRatingScale,
|
|
424
941
|
GdsRelativeTime,
|
|
942
|
+
GdsRemovableTag,
|
|
425
943
|
GdsResourceManagerTemplate,
|
|
426
944
|
GdsResponsiveChartFrame,
|
|
427
945
|
GdsResponsiveVisibility,
|
|
@@ -444,6 +962,7 @@ export {
|
|
|
444
962
|
InlineText,
|
|
445
963
|
LabelTag,
|
|
446
964
|
LabelText,
|
|
965
|
+
LastCheckedLabel,
|
|
447
966
|
LayeredSurfaceSlot,
|
|
448
967
|
ListItemSection,
|
|
449
968
|
ListingCard,
|
|
@@ -492,6 +1011,7 @@ export {
|
|
|
492
1011
|
PillBar,
|
|
493
1012
|
PlaceholderPanel,
|
|
494
1013
|
PlaybackSurface,
|
|
1014
|
+
PriceEstimateLabel,
|
|
495
1015
|
ProductCard,
|
|
496
1016
|
Progress,
|
|
497
1017
|
ProgressCard,
|
|
@@ -504,6 +1024,7 @@ export {
|
|
|
504
1024
|
PublicProductCard,
|
|
505
1025
|
PublicShell,
|
|
506
1026
|
PublicSiteFooter,
|
|
1027
|
+
QuickStartCard,
|
|
507
1028
|
Radio,
|
|
508
1029
|
ReferenceLinkGrid,
|
|
509
1030
|
ReferenceLocaleNotice,
|
|
@@ -529,14 +1050,19 @@ export {
|
|
|
529
1050
|
StatusBadge,
|
|
530
1051
|
StreamingIndicator,
|
|
531
1052
|
Switch,
|
|
1053
|
+
TRUST_BADGE_DEFINITIONS,
|
|
532
1054
|
Table,
|
|
533
1055
|
Tabs,
|
|
534
1056
|
TextInput,
|
|
535
1057
|
Textarea,
|
|
536
1058
|
ThemeIcon,
|
|
537
1059
|
Tooltip,
|
|
1060
|
+
TrustBadge,
|
|
538
1061
|
VisuallyHidden,
|
|
539
1062
|
ar,
|
|
1063
|
+
buildGdsBrandBadgeSvg,
|
|
1064
|
+
buildGdsHeroSvg,
|
|
1065
|
+
buildGdsThumbnailSvg,
|
|
540
1066
|
compareGdsLocaleString,
|
|
541
1067
|
createGdsAccessAdapter,
|
|
542
1068
|
createGdsAccessGateEvent,
|
|
@@ -547,6 +1073,7 @@ export {
|
|
|
547
1073
|
createGdsNotificationId,
|
|
548
1074
|
createGdsOwnedContrastTokens,
|
|
549
1075
|
createGdsPageTemplateEvent,
|
|
1076
|
+
createGdsPictogramFamily,
|
|
550
1077
|
createGdsStyleContract,
|
|
551
1078
|
createGdsTextExpansionFixture,
|
|
552
1079
|
createGdsVocabularyPack,
|
|
@@ -561,6 +1088,9 @@ export {
|
|
|
561
1088
|
formatGdsPlural,
|
|
562
1089
|
formatGdsRelativeTime,
|
|
563
1090
|
fr,
|
|
1091
|
+
gdsActivityPictograms,
|
|
1092
|
+
gdsBadgeAccentColors,
|
|
1093
|
+
gdsBadgeAccentShades,
|
|
564
1094
|
gdsCardDensityPaddingMap,
|
|
565
1095
|
gdsCardGapMap,
|
|
566
1096
|
gdsCardMediaRatioMap,
|
|
@@ -568,11 +1098,13 @@ export {
|
|
|
568
1098
|
gdsCardTitleOrderMap,
|
|
569
1099
|
gdsChartSetATypeRegistry,
|
|
570
1100
|
gdsChartSetBTypeRegistry,
|
|
1101
|
+
gdsChartSetCTypeRegistry,
|
|
571
1102
|
gdsChartTypeRegistry,
|
|
572
1103
|
gdsDefaultChartLegend,
|
|
573
1104
|
gdsIconRegistry,
|
|
574
1105
|
gdsIconToneColor,
|
|
575
1106
|
gdsLocales,
|
|
1107
|
+
gdsPictogramUsageRules,
|
|
576
1108
|
gdsSeriesPalette,
|
|
577
1109
|
gdsStyle,
|
|
578
1110
|
generateGdsDesignHandoffReport,
|
|
@@ -581,7 +1113,9 @@ export {
|
|
|
581
1113
|
getGdsAccessGateStates,
|
|
582
1114
|
getGdsAccessibilityEvidence,
|
|
583
1115
|
getGdsAccessibilityEvidenceSummary,
|
|
1116
|
+
getGdsActivityPictogramKeys,
|
|
584
1117
|
getGdsBlockTypes,
|
|
1118
|
+
getGdsChartSeriesColor,
|
|
585
1119
|
getGdsContentPattern,
|
|
586
1120
|
getGdsContentPatterns,
|
|
587
1121
|
getGdsCopyTemplate,
|
|
@@ -612,11 +1146,15 @@ export {
|
|
|
612
1146
|
getSupportedProviderIdentityIds,
|
|
613
1147
|
he,
|
|
614
1148
|
hu,
|
|
1149
|
+
isGdsActivityPictogramKey,
|
|
615
1150
|
isGdsChartSetAType,
|
|
616
1151
|
isGdsChartSetBType,
|
|
1152
|
+
isGdsChartSetCType,
|
|
617
1153
|
isGdsIconKey,
|
|
618
1154
|
isPresentationMode,
|
|
619
1155
|
it,
|
|
1156
|
+
ja,
|
|
1157
|
+
ko,
|
|
620
1158
|
mergeGdsVocabularyPacks,
|
|
621
1159
|
normalizeGdsResponsiveValue,
|
|
622
1160
|
partnerDiscoveryDefaultAmenities,
|
|
@@ -631,7 +1169,9 @@ export {
|
|
|
631
1169
|
resolveAccentPanelStyles,
|
|
632
1170
|
resolveGdsAccessAdapterState,
|
|
633
1171
|
resolveGdsAccessState,
|
|
1172
|
+
resolveGdsActivityPictogramLabel,
|
|
634
1173
|
resolveGdsCardContract,
|
|
1174
|
+
resolveGdsChartTokenColor,
|
|
635
1175
|
resolveGdsLayoutStyle,
|
|
636
1176
|
resolveGdsLocale,
|
|
637
1177
|
resolveGdsMessage,
|
|
@@ -652,5 +1192,6 @@ export {
|
|
|
652
1192
|
validateGdsDesignHandoffMappings,
|
|
653
1193
|
validateGdsLayout,
|
|
654
1194
|
validateGdsPageTemplates,
|
|
655
|
-
validateGdsTaskPatterns
|
|
1195
|
+
validateGdsTaskPatterns,
|
|
1196
|
+
zh
|
|
656
1197
|
};
|