@sovereignsquad/gds-core 3.9.0 → 6.8.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/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-CB7r-85z.d.ts +17500 -0
- package/dist/QuickStartCard-xIP1gbCL.d.mts +17500 -0
- package/dist/chunk-2AX4NCID.mjs +9 -0
- package/dist/chunk-2IUOZG4C.mjs +9 -0
- package/dist/chunk-2XZMNT7I.mjs +338 -0
- package/dist/chunk-3D7BVS7D.mjs +9 -0
- package/dist/chunk-4LG6EED4.mjs +338 -0
- package/dist/chunk-6LULEPIE.mjs +9 -0
- package/dist/chunk-6PBDLFSF.mjs +338 -0
- package/dist/{chunk-TQ7ZYMEA.mjs → chunk-BH2SMTND.mjs} +2258 -4014
- package/dist/chunk-BHR4A3C6.mjs +338 -0
- package/dist/chunk-CNTTKK3H.mjs +338 -0
- package/dist/chunk-GGDCO5HR.mjs +338 -0
- package/dist/chunk-GKNSUUUE.mjs +338 -0
- package/dist/chunk-GMK5GXWR.mjs +338 -0
- package/dist/chunk-H2QNW4D5.mjs +1768 -0
- package/dist/chunk-IHPZ7BNV.mjs +338 -0
- package/dist/chunk-J66ITCXC.mjs +473 -0
- package/dist/chunk-J6MXKFIM.mjs +9 -0
- package/dist/chunk-JTMPFTCK.mjs +338 -0
- package/dist/{chunk-BUC7QXRO.mjs → chunk-KFEPREUF.mjs} +13 -5
- package/dist/chunk-LNVLXOLI.mjs +9 -0
- package/dist/chunk-MAIU557K.mjs +9 -0
- package/dist/chunk-MPZFCWWS.mjs +210 -0
- package/dist/chunk-NWS7KJ2G.mjs +245 -0
- package/dist/chunk-OC3M4CZY.mjs +9 -0
- package/dist/chunk-QO653DAE.mjs +338 -0
- package/dist/chunk-RCLWUNMR.mjs +9 -0
- package/dist/chunk-SHQDVHGR.mjs +338 -0
- package/dist/{chunk-5AJJNRZF.mjs → chunk-TJ3WMH25.mjs} +1916 -2026
- package/dist/chunk-VU2JLVD3.mjs +89 -0
- package/dist/chunk-W5O2JSVK.mjs +20 -0
- package/dist/chunk-WNOWHB26.mjs +9 -0
- package/dist/chunk-XLPTCIXT.mjs +9 -0
- package/dist/chunk-ZCQXBKDM.mjs +24 -0
- package/dist/chunk-ZFGYQSNR.mjs +33 -0
- package/dist/client.d.mts +1296 -37
- package/dist/client.d.ts +1296 -37
- package/dist/client.js +11039 -6379
- package/dist/client.mjs +273 -58
- package/dist/en-Dd7uvXnv.d.mts +336 -0
- package/dist/en-Dd7uvXnv.d.ts +336 -0
- package/dist/index.d.mts +632 -5
- package/dist/index.d.ts +632 -5
- package/dist/index.js +21618 -14851
- package/dist/index.mjs +2138 -59
- package/dist/locales/lazy/all.d.mts +2 -0
- package/dist/locales/lazy/all.d.ts +2 -0
- package/dist/locales/lazy/all.js +1 -0
- package/dist/locales/lazy/all.mjs +24 -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 +683 -0
- package/dist/locales/lazy/ar.mjs +4 -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 +683 -0
- package/dist/locales/lazy/de.mjs +4 -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 +683 -0
- package/dist/locales/lazy/es.mjs +4 -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 +683 -0
- package/dist/locales/lazy/fr.mjs +4 -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 +683 -0
- package/dist/locales/lazy/he.mjs +4 -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 +683 -0
- package/dist/locales/lazy/hu.mjs +4 -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 +384 -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 +683 -0
- package/dist/locales/lazy/it.mjs +4 -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 +683 -0
- package/dist/locales/lazy/ja.mjs +4 -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 +683 -0
- package/dist/locales/lazy/ko.mjs +4 -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 +683 -0
- package/dist/locales/lazy/ru.mjs +4 -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 +683 -0
- package/dist/locales/lazy/zh.mjs +4 -0
- package/dist/map.css +664 -0
- package/dist/map.d.mts +118 -0
- package/dist/map.d.ts +118 -0
- package/dist/map.js +777 -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 +8322 -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 +6797 -1679
- package/dist/server.mjs +588 -55
- package/package.json +104 -9
- package/dist/AISearchCard-Bbnsd-yl.d.mts +0 -7786
- package/dist/AISearchCard-Bbnsd-yl.d.ts +0 -7786
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-KFEPREUF.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,32 +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,
|
|
251
|
+
gdsActivityPictograms,
|
|
252
|
+
gdsPictogramUsageRules,
|
|
255
253
|
gdsSeriesPalette,
|
|
256
254
|
gdsStyle,
|
|
257
255
|
generateGdsDesignHandoffReport,
|
|
@@ -260,6 +258,7 @@ import {
|
|
|
260
258
|
getGdsAccessGateStates,
|
|
261
259
|
getGdsAccessibilityEvidence,
|
|
262
260
|
getGdsAccessibilityEvidenceSummary,
|
|
261
|
+
getGdsActivityPictogramKeys,
|
|
263
262
|
getGdsBlockTypes,
|
|
264
263
|
getGdsContentPattern,
|
|
265
264
|
getGdsContentPatterns,
|
|
@@ -267,17 +266,12 @@ import {
|
|
|
267
266
|
getGdsCopyTemplates,
|
|
268
267
|
getGdsDesignComponentMappings,
|
|
269
268
|
getGdsDesignTokenMappings,
|
|
270
|
-
getGdsIconKeys,
|
|
271
|
-
getGdsIconMetadata,
|
|
272
|
-
getGdsIconToneColor,
|
|
273
269
|
getGdsLayoutTemplate,
|
|
274
270
|
getGdsLayoutTemplates,
|
|
275
271
|
getGdsMaturityCapabilities,
|
|
276
272
|
getGdsMaturityCapability,
|
|
277
273
|
getGdsMaturitySummary,
|
|
278
|
-
getGdsMessages,
|
|
279
274
|
getGdsNotificationLivePolicy,
|
|
280
|
-
getGdsOwnedContrastProps,
|
|
281
275
|
getGdsPageTemplate,
|
|
282
276
|
getGdsPageTemplates,
|
|
283
277
|
getGdsRecommendedMaturityCapabilities,
|
|
@@ -286,17 +280,8 @@ import {
|
|
|
286
280
|
getGdsTaskPatterns,
|
|
287
281
|
getProviderIdentityLabel,
|
|
288
282
|
getProviderIdentityPolicy,
|
|
289
|
-
getSemanticActionConfig,
|
|
290
|
-
getSemanticActionLabel,
|
|
291
283
|
getSupportedProviderIdentityIds,
|
|
292
|
-
|
|
293
|
-
hu,
|
|
294
|
-
isGdsChartSetAType,
|
|
295
|
-
isGdsChartSetBType,
|
|
296
|
-
isGdsIconKey,
|
|
297
|
-
isPresentationMode,
|
|
298
|
-
it,
|
|
299
|
-
mergeGdsVocabularyPacks,
|
|
284
|
+
isGdsActivityPictogramKey,
|
|
300
285
|
normalizeGdsResponsiveValue,
|
|
301
286
|
redactGdsAccessGateMetadata,
|
|
302
287
|
registerGdsBlock,
|
|
@@ -306,27 +291,507 @@ import {
|
|
|
306
291
|
resolveAccentPanelStyles,
|
|
307
292
|
resolveGdsAccessAdapterState,
|
|
308
293
|
resolveGdsAccessState,
|
|
309
|
-
|
|
294
|
+
resolveGdsActivityPictogramLabel,
|
|
310
295
|
resolveGdsLayoutStyle,
|
|
311
296
|
resolveGdsLocale,
|
|
312
297
|
resolveGdsMessage,
|
|
313
|
-
resolveSemanticActionConfig,
|
|
314
|
-
resolveSurfacePresentationStyles,
|
|
315
|
-
ru,
|
|
316
298
|
sortGdsAccessGateActions,
|
|
317
299
|
sortGdsLocaleStrings,
|
|
318
300
|
useGdsDirection,
|
|
319
301
|
validateCreatorCss,
|
|
320
302
|
validateGdsAccessGateContract,
|
|
321
303
|
validateGdsAccessibilityEvidence,
|
|
322
|
-
validateGdsChartData,
|
|
323
304
|
validateGdsContentPatterns,
|
|
324
305
|
validateGdsCopyTemplate,
|
|
325
306
|
validateGdsDesignHandoffMappings,
|
|
326
307
|
validateGdsLayout,
|
|
327
308
|
validateGdsPageTemplates,
|
|
328
309
|
validateGdsTaskPatterns
|
|
329
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-BH2SMTND.mjs";
|
|
311
|
+
import {
|
|
312
|
+
GDS_PIN_APPROXIMATE_DASH,
|
|
313
|
+
GDS_PIN_EMOJI_SCALE,
|
|
314
|
+
GDS_PIN_EMPHASIS_STROKE,
|
|
315
|
+
GDS_PIN_HEAD_CENTER_OFFSET,
|
|
316
|
+
GDS_PIN_ICON_SCALE,
|
|
317
|
+
GDS_PIN_SELECTED_SCALE,
|
|
318
|
+
GdsMapPinBadge
|
|
319
|
+
} from "./chunk-VU2JLVD3.mjs";
|
|
320
|
+
import {
|
|
321
|
+
ChartTokenPanel,
|
|
322
|
+
FormField,
|
|
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
|
+
getGdsMessages,
|
|
355
|
+
getGdsOwnedContrastProps,
|
|
356
|
+
getSemanticActionConfig,
|
|
357
|
+
getSemanticActionLabel,
|
|
358
|
+
isGdsChartSetAType,
|
|
359
|
+
isGdsChartSetBType,
|
|
360
|
+
isGdsChartSetCType,
|
|
361
|
+
mergeGdsVocabularyPacks,
|
|
362
|
+
resolveGdsCardContract,
|
|
363
|
+
resolveGdsGeneratedPaletteHex,
|
|
364
|
+
resolveSemanticActionConfig,
|
|
365
|
+
validateGdsChartData
|
|
366
|
+
} from "./chunk-H2QNW4D5.mjs";
|
|
367
|
+
import {
|
|
368
|
+
GDS_PIN_SILHOUETTE_PATH,
|
|
369
|
+
GdsBadgeShapeCircle,
|
|
370
|
+
GdsBadgeShapeHexagon,
|
|
371
|
+
GdsBadgeShapePin,
|
|
372
|
+
GdsBadgeShapeRosette,
|
|
373
|
+
GdsBadgeShapeShield,
|
|
374
|
+
GdsBadgeShapeSquircle,
|
|
375
|
+
GdsBadgeShapes,
|
|
376
|
+
GdsBadgeStack,
|
|
377
|
+
GdsBadgeStackLayer,
|
|
378
|
+
MissingDataPrompt,
|
|
379
|
+
StateBlock,
|
|
380
|
+
isPresentationMode,
|
|
381
|
+
resolveSurfacePresentationStyles
|
|
382
|
+
} from "./chunk-MPZFCWWS.mjs";
|
|
383
|
+
import {
|
|
384
|
+
GdsIcon,
|
|
385
|
+
GdsIcons,
|
|
386
|
+
gdsIconRegistry,
|
|
387
|
+
gdsIconToneColor,
|
|
388
|
+
getGdsIconKeys,
|
|
389
|
+
getGdsIconMetadata,
|
|
390
|
+
getGdsIconToneColor,
|
|
391
|
+
isGdsIconKey
|
|
392
|
+
} from "./chunk-J66ITCXC.mjs";
|
|
393
|
+
import {
|
|
394
|
+
ko
|
|
395
|
+
} from "./chunk-IHPZ7BNV.mjs";
|
|
396
|
+
import {
|
|
397
|
+
ru
|
|
398
|
+
} from "./chunk-BHR4A3C6.mjs";
|
|
399
|
+
import {
|
|
400
|
+
zh
|
|
401
|
+
} from "./chunk-4LG6EED4.mjs";
|
|
402
|
+
import {
|
|
403
|
+
de
|
|
404
|
+
} from "./chunk-GKNSUUUE.mjs";
|
|
405
|
+
import {
|
|
406
|
+
es
|
|
407
|
+
} from "./chunk-JTMPFTCK.mjs";
|
|
408
|
+
import {
|
|
409
|
+
fr
|
|
410
|
+
} from "./chunk-6PBDLFSF.mjs";
|
|
411
|
+
import {
|
|
412
|
+
he
|
|
413
|
+
} from "./chunk-CNTTKK3H.mjs";
|
|
414
|
+
import {
|
|
415
|
+
hu
|
|
416
|
+
} from "./chunk-GMK5GXWR.mjs";
|
|
417
|
+
import {
|
|
418
|
+
it
|
|
419
|
+
} from "./chunk-SHQDVHGR.mjs";
|
|
420
|
+
import {
|
|
421
|
+
ja
|
|
422
|
+
} from "./chunk-2XZMNT7I.mjs";
|
|
423
|
+
import {
|
|
424
|
+
ar
|
|
425
|
+
} from "./chunk-QO653DAE.mjs";
|
|
426
|
+
import {
|
|
427
|
+
en
|
|
428
|
+
} from "./chunk-GGDCO5HR.mjs";
|
|
429
|
+
|
|
430
|
+
// src/generated-art-svg.ts
|
|
431
|
+
import { cloneElement, createElement, isValidElement } from "react";
|
|
432
|
+
import { renderToStaticMarkup } from "react-dom/server";
|
|
433
|
+
var isIconKey = (icon) => typeof icon === "string";
|
|
434
|
+
function iconSvg(icon, color, size) {
|
|
435
|
+
const element = isIconKey(icon) ? createElement(GdsIcon, { icon, size: "100%", tone: "default" }) : isValidElement(icon) ? cloneElement(icon, { stroke: 1.75 }) : icon;
|
|
436
|
+
const rendered = renderToStaticMarkup(createElement("g", { style: { color } }, element));
|
|
437
|
+
return `<svg width="${size}" height="${size}" viewBox="0 0 24 24">${rendered}</svg>`;
|
|
438
|
+
}
|
|
439
|
+
function mixHexTowardBlack(hex, keepPercent) {
|
|
440
|
+
const match = /^#([0-9a-f]{6})$/i.exec(hex);
|
|
441
|
+
if (!match) {
|
|
442
|
+
return hex;
|
|
443
|
+
}
|
|
444
|
+
const value = parseInt(match[1], 16);
|
|
445
|
+
const mix = (channel) => Math.round(channel * keepPercent / 100);
|
|
446
|
+
const r = mix(value >> 16 & 255);
|
|
447
|
+
const g = mix(value >> 8 & 255);
|
|
448
|
+
const b = mix(value & 255);
|
|
449
|
+
return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
450
|
+
}
|
|
451
|
+
function escapeXmlText(value) {
|
|
452
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
453
|
+
}
|
|
454
|
+
var THUMBNAIL_ASPECT_RATIO_VIEWBOX = {
|
|
455
|
+
"3:2": { width: 300, height: 200 },
|
|
456
|
+
"16:9": { width: 320, height: 180 },
|
|
457
|
+
"4:3": { width: 320, height: 240 },
|
|
458
|
+
"1:1": { width: 240, height: 240 }
|
|
459
|
+
};
|
|
460
|
+
function computeMotifTransform(seed, viewBoxWidth, viewBoxHeight) {
|
|
461
|
+
const next = gdsSeededRandom(seed);
|
|
462
|
+
const rotationDeg = (next() - 0.5) * 26;
|
|
463
|
+
const scale = viewBoxHeight / 24 * (1.7 + next() * 0.3);
|
|
464
|
+
const centerX = viewBoxWidth * (0.78 + (next() - 0.5) * 0.12);
|
|
465
|
+
const centerY = viewBoxHeight * (0.28 + (next() - 0.5) * 0.14);
|
|
466
|
+
return { rotationDeg, scale, centerX, centerY };
|
|
467
|
+
}
|
|
468
|
+
function buildGdsThumbnailSvg(options) {
|
|
469
|
+
const { seed, categories, paletteSource, category, shade, colors, themePresetId, colorScheme, aspectRatio = "3:2", maxBadges = 3, motifOpacity = 0.14, background = "wash", label } = options;
|
|
470
|
+
if (categories.length === 0) {
|
|
471
|
+
throw new Error("buildGdsThumbnailSvg: `categories` must contain at least one entry.");
|
|
472
|
+
}
|
|
473
|
+
const palette = resolveGdsGeneratedPaletteHex({ paletteSource, category, shade, colors, themePresetId, colorScheme });
|
|
474
|
+
const { width, height } = THUMBNAIL_ASPECT_RATIO_VIEWBOX[aspectRatio];
|
|
475
|
+
const motif = computeMotifTransform(seed, width, height);
|
|
476
|
+
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) => {
|
|
477
|
+
const weight = region.weight ?? 1;
|
|
478
|
+
const opacity = Math.min(0.85, 0.06 + weight * 0.05);
|
|
479
|
+
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}" />`;
|
|
480
|
+
}).join("") : "";
|
|
481
|
+
const inverse = "#ffffff";
|
|
482
|
+
const pillBg = mixHexTowardBlack(palette.accent, 30);
|
|
483
|
+
const gradientDark = mixHexTowardBlack(palette.primary, 30);
|
|
484
|
+
const lead = categories[0];
|
|
485
|
+
const secondary = categories.slice(1, Math.max(maxBadges, 1));
|
|
486
|
+
const badgeAreaHeight = height * 0.22;
|
|
487
|
+
const badgeY = height - badgeAreaHeight / 2;
|
|
488
|
+
let cursorX = 14;
|
|
489
|
+
const leadFontSize = Math.max(11, height * 0.065);
|
|
490
|
+
const leadIconSize = leadFontSize * 1.3;
|
|
491
|
+
const leadTextWidth = lead.label.length * leadFontSize * 0.58;
|
|
492
|
+
const leadPillWidth = leadIconSize + leadTextWidth + leadFontSize * 1.4;
|
|
493
|
+
const leadPillHeight = leadIconSize + leadFontSize * 0.6;
|
|
494
|
+
const leadBadgeSvg = `
|
|
495
|
+
<g transform="translate(${cursorX} ${badgeY - leadPillHeight / 2})">
|
|
496
|
+
<rect width="${leadPillWidth}" height="${leadPillHeight}" rx="${leadPillHeight / 2}" fill="${pillBg}" />
|
|
497
|
+
<g transform="translate(${leadPillHeight * 0.28} ${leadPillHeight / 2 - leadIconSize / 2})">${iconSvg(lead.icon, inverse, leadIconSize)}</g>
|
|
498
|
+
<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>
|
|
499
|
+
</g>`;
|
|
500
|
+
cursorX += leadPillWidth + 8;
|
|
501
|
+
const secondaryBadgesSvg = secondary.map((entry, index) => {
|
|
502
|
+
const discSize = leadPillHeight * (0.92 - index * 0.06);
|
|
503
|
+
const svg = `
|
|
504
|
+
<g transform="translate(${cursorX} ${badgeY - discSize / 2})" opacity="${1 - index * 0.12}">
|
|
505
|
+
<circle cx="${discSize / 2}" cy="${discSize / 2}" r="${discSize / 2}" fill="${pillBg}" stroke="${gradientDark}" stroke-width="2" />
|
|
506
|
+
<g transform="translate(${discSize * 0.24} ${discSize * 0.24})">${iconSvg(entry.icon, inverse, discSize * 0.52)}</g>
|
|
507
|
+
</g>`;
|
|
508
|
+
cursorX += discSize * 0.75;
|
|
509
|
+
return svg;
|
|
510
|
+
}).join("");
|
|
511
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
512
|
+
<title>${escapeXmlText(label)}</title>
|
|
513
|
+
<defs>
|
|
514
|
+
<linearGradient id="gds-thumb-bg" x1="0" y1="0" x2="0" y2="1">
|
|
515
|
+
<stop offset="0%" stop-color="${palette.primary}" />
|
|
516
|
+
<stop offset="100%" stop-color="${gradientDark}" />
|
|
517
|
+
</linearGradient>
|
|
518
|
+
<linearGradient id="gds-thumb-scrim" x1="0" y1="1" x2="0" y2="0">
|
|
519
|
+
<stop offset="0%" stop-color="${gradientDark}" />
|
|
520
|
+
<stop offset="100%" stop-color="${gradientDark}" stop-opacity="0" />
|
|
521
|
+
</linearGradient>
|
|
522
|
+
</defs>
|
|
523
|
+
<rect width="${width}" height="${height}" fill="url(#gds-thumb-bg)" />
|
|
524
|
+
${background === "wash" ? `<g transform="translate(${motif.centerX} ${motif.centerY}) rotate(${motif.rotationDeg}) scale(${motif.scale})" opacity="${motifOpacity}">
|
|
525
|
+
<g transform="translate(-12 -12)">${iconSvg(lead.icon, inverse, 24)}</g>
|
|
526
|
+
</g>` : backgroundArtSvg}
|
|
527
|
+
<rect x="0" y="${height - badgeAreaHeight * 1.6}" width="${width}" height="${badgeAreaHeight * 1.6}" fill="url(#gds-thumb-scrim)" />
|
|
528
|
+
${leadBadgeSvg}
|
|
529
|
+
${secondaryBadgesSvg}
|
|
530
|
+
</svg>`;
|
|
531
|
+
}
|
|
532
|
+
var HERO_ASPECT_RATIO_VIEWBOX = {
|
|
533
|
+
"21:9": { width: 630, height: 270 },
|
|
534
|
+
"16:9": { width: 640, height: 360 },
|
|
535
|
+
"3:1": { width: 600, height: 200 }
|
|
536
|
+
};
|
|
537
|
+
var BADGE_SLOTS = {
|
|
538
|
+
large: [{ x: 0.85, y: 0.32 }],
|
|
539
|
+
medium: [
|
|
540
|
+
{ x: 0.14, y: 0.72 },
|
|
541
|
+
{ x: 0.52, y: 0.82 }
|
|
542
|
+
],
|
|
543
|
+
small: [
|
|
544
|
+
{ x: 0.34, y: 0.18 },
|
|
545
|
+
{ x: 0.7, y: 0.6 },
|
|
546
|
+
{ x: 0.94, y: 0.84 }
|
|
547
|
+
]
|
|
548
|
+
};
|
|
549
|
+
var SLOT_SIZE_FACTOR = { large: 0.32, medium: 0.2, small: 0.13 };
|
|
550
|
+
var SLOT_OPACITY = { large: 1, medium: 0.85, small: 0.6 };
|
|
551
|
+
function seededShuffle(items, next) {
|
|
552
|
+
const result = [...items];
|
|
553
|
+
for (let i = result.length - 1; i > 0; i -= 1) {
|
|
554
|
+
const j = Math.floor(next() * (i + 1));
|
|
555
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
556
|
+
}
|
|
557
|
+
return result;
|
|
558
|
+
}
|
|
559
|
+
function placeHeroBadges(badges, seed) {
|
|
560
|
+
const next = gdsSeededRandom(`${seed}:badges`);
|
|
561
|
+
const capped = badges.slice(0, 6);
|
|
562
|
+
const bySize = {
|
|
563
|
+
large: capped.slice(0, 1),
|
|
564
|
+
medium: capped.slice(1, 3),
|
|
565
|
+
small: capped.slice(3, 6)
|
|
566
|
+
};
|
|
567
|
+
const placed = [];
|
|
568
|
+
Object.keys(BADGE_SLOTS).forEach((size) => {
|
|
569
|
+
const slots = seededShuffle(BADGE_SLOTS[size], next);
|
|
570
|
+
bySize[size].forEach((badge, index) => {
|
|
571
|
+
const slot = slots[index];
|
|
572
|
+
placed.push({ badge, size, x: slot.x, y: slot.y, jitterDeg: (next() - 0.5) * 10 });
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
return placed;
|
|
576
|
+
}
|
|
577
|
+
function computeMosaicTilesSvg(seed, width, height, primary, accent) {
|
|
578
|
+
const next = gdsSeededRandom(`${seed}:mosaic`);
|
|
579
|
+
const columns = 9;
|
|
580
|
+
const rows = 4;
|
|
581
|
+
const cellWidth = width / columns;
|
|
582
|
+
const cellHeight = height / rows;
|
|
583
|
+
const tiles = [];
|
|
584
|
+
for (let row = 0; row < rows; row += 1) {
|
|
585
|
+
for (let col = 0; col < columns; col += 1) {
|
|
586
|
+
if (next() < 0.32) {
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
const inset = 0.08 + next() * 0.1;
|
|
590
|
+
const x = col * cellWidth + cellWidth * inset;
|
|
591
|
+
const y = row * cellHeight + cellHeight * inset;
|
|
592
|
+
const w = cellWidth * (1 - inset * 2);
|
|
593
|
+
const h = cellHeight * (1 - inset * 2);
|
|
594
|
+
const opacity = 0.05 + next() * 0.11;
|
|
595
|
+
const fill = next() < 0.5 ? primary : accent;
|
|
596
|
+
tiles.push(`<rect x="${x}" y="${y}" width="${w}" height="${h}" rx="${Math.min(w, h) * 0.12}" fill="${fill}" opacity="${opacity}" />`);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return tiles.join("");
|
|
600
|
+
}
|
|
601
|
+
function computeIconFieldSvg(seed, badges, width, height) {
|
|
602
|
+
if (badges.length === 0) {
|
|
603
|
+
return "";
|
|
604
|
+
}
|
|
605
|
+
const placementRandom = gdsSeededRandom(`${seed}:icon-field`);
|
|
606
|
+
const pickRandom = gdsSeededRandom(`${seed}:icon-field-pick`);
|
|
607
|
+
const count = Math.min(badges.length, 8);
|
|
608
|
+
const groups = [];
|
|
609
|
+
for (let i = 0; i < count; i += 1) {
|
|
610
|
+
const x = width * (0.08 + placementRandom() * 0.84);
|
|
611
|
+
const y = height * (0.1 + placementRandom() * 0.8);
|
|
612
|
+
const size = height * (0.22 + placementRandom() * 0.16);
|
|
613
|
+
const rotationDeg = (placementRandom() - 0.5) * 40;
|
|
614
|
+
const badge = badges[Math.floor(pickRandom() * badges.length)];
|
|
615
|
+
groups.push(
|
|
616
|
+
`<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>`
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
return groups.join("");
|
|
620
|
+
}
|
|
621
|
+
function buildGdsHeroSvg(options) {
|
|
622
|
+
const { seed, paletteSource, category, shade, colors, themePresetId, colorScheme, background = "wash", badges = [], aspectRatio = "21:9", label } = options;
|
|
623
|
+
const palette = resolveGdsGeneratedPaletteHex({ paletteSource, category, shade, colors, themePresetId, colorScheme });
|
|
624
|
+
const { width, height } = HERO_ASPECT_RATIO_VIEWBOX[aspectRatio];
|
|
625
|
+
const gradientDark = mixHexTowardBlack(palette.primary, 30);
|
|
626
|
+
const accentDark = mixHexTowardBlack(palette.accent, 30);
|
|
627
|
+
let backgroundSvg = "";
|
|
628
|
+
if (background === "mosaic-abstract") {
|
|
629
|
+
backgroundSvg = computeMosaicTilesSvg(seed, width, height, palette.primary, palette.accent);
|
|
630
|
+
} else if (background === "icon-field") {
|
|
631
|
+
backgroundSvg = computeIconFieldSvg(seed, badges, width, height);
|
|
632
|
+
} else if (typeof background === "object" && background.type === "region-mosaic") {
|
|
633
|
+
backgroundSvg = background.regions.map((region) => {
|
|
634
|
+
const weight = region.weight ?? 1;
|
|
635
|
+
const opacity = Math.min(0.85, 0.06 + weight * 0.05);
|
|
636
|
+
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}" />`;
|
|
637
|
+
}).join("");
|
|
638
|
+
}
|
|
639
|
+
const placedBadges = placeHeroBadges(badges, seed);
|
|
640
|
+
const badgesSvg = placedBadges.map(({ badge, size, x, y, jitterDeg }) => {
|
|
641
|
+
const boxSize = height * SLOT_SIZE_FACTOR[size];
|
|
642
|
+
const cx = x * width;
|
|
643
|
+
const cy = y * height;
|
|
644
|
+
return `
|
|
645
|
+
<g transform="translate(${cx} ${cy}) rotate(${jitterDeg})" opacity="${SLOT_OPACITY[size]}">
|
|
646
|
+
<circle r="${boxSize / 2}" fill="${accentDark}" stroke="${gradientDark}" stroke-width="2" />
|
|
647
|
+
<g transform="translate(${-boxSize * 0.275} ${-boxSize * 0.275})">${iconSvg(badge.icon, "#ffffff", boxSize * 0.55)}</g>
|
|
648
|
+
</g>`;
|
|
649
|
+
}).join("");
|
|
650
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
651
|
+
<title>${escapeXmlText(label)}</title>
|
|
652
|
+
<defs>
|
|
653
|
+
<linearGradient id="gds-hero-bg" x1="0" y1="0" x2="1" y2="1">
|
|
654
|
+
<stop offset="0%" stop-color="${palette.primary}" />
|
|
655
|
+
<stop offset="100%" stop-color="${gradientDark}" />
|
|
656
|
+
</linearGradient>
|
|
657
|
+
</defs>
|
|
658
|
+
<rect width="${width}" height="${height}" fill="url(#gds-hero-bg)" />
|
|
659
|
+
${backgroundSvg}
|
|
660
|
+
${badgesSvg}
|
|
661
|
+
</svg>`;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// src/generated-brand-badge.ts
|
|
665
|
+
import { cloneElement as cloneElement2, createElement as createElement2, isValidElement as isValidElement2 } from "react";
|
|
666
|
+
import { renderToStaticMarkup as renderToStaticMarkup2 } from "react-dom/server";
|
|
667
|
+
import { computeGdsThemeIdentity, getGdsContrastRatio } from "@sovereignsquad/gds-theme";
|
|
668
|
+
var CANVAS = 48;
|
|
669
|
+
var DEFAULT_CORNER_RADIUS_RATIO = 0.25;
|
|
670
|
+
var MASKABLE_SAFE_ZONE_RATIO = 0.8;
|
|
671
|
+
var MOTIF_SIZE_RATIO = 0.55;
|
|
672
|
+
var MOTIF_COLOR = "#ffffff";
|
|
673
|
+
var isIconKey2 = (icon) => typeof icon === "string";
|
|
674
|
+
function escapeXmlText2(value) {
|
|
675
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
676
|
+
}
|
|
677
|
+
function parseColorChannels(value) {
|
|
678
|
+
const trimmed = value.trim();
|
|
679
|
+
const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(trimmed);
|
|
680
|
+
if (hex) {
|
|
681
|
+
let digits = hex[1];
|
|
682
|
+
if (digits.length === 3) digits = digits.split("").map((c) => c + c).join("");
|
|
683
|
+
const parsed = parseInt(digits, 16);
|
|
684
|
+
return { r: parsed >> 16 & 255, g: parsed >> 8 & 255, b: parsed & 255 };
|
|
685
|
+
}
|
|
686
|
+
const rgb = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)\s*(?:[,/]\s*[\d.]+)?\s*\)$/i.exec(trimmed);
|
|
687
|
+
if (rgb) {
|
|
688
|
+
return { r: Math.round(+rgb[1]), g: Math.round(+rgb[2]), b: Math.round(+rgb[3]) };
|
|
689
|
+
}
|
|
690
|
+
return null;
|
|
691
|
+
}
|
|
692
|
+
function toHex({ r, g, b }) {
|
|
693
|
+
const clamp = (c) => Math.max(0, Math.min(255, Math.round(c)));
|
|
694
|
+
return `#${[clamp(r), clamp(g), clamp(b)].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
695
|
+
}
|
|
696
|
+
function mixHexTowardBlack2(color, keepPercent) {
|
|
697
|
+
const channels = parseColorChannels(color);
|
|
698
|
+
if (!channels) {
|
|
699
|
+
return color;
|
|
700
|
+
}
|
|
701
|
+
const mix = (channel) => channel * keepPercent / 100;
|
|
702
|
+
return toHex({ r: mix(channels.r), g: mix(channels.g), b: mix(channels.b) });
|
|
703
|
+
}
|
|
704
|
+
function mixHexChannelwise(a, b, t) {
|
|
705
|
+
const colorA = parseColorChannels(a);
|
|
706
|
+
const colorB = parseColorChannels(b);
|
|
707
|
+
if (!colorA || !colorB) {
|
|
708
|
+
return a;
|
|
709
|
+
}
|
|
710
|
+
const mix = (from, to) => from + (to - from) * t;
|
|
711
|
+
return toHex({ r: mix(colorA.r, colorB.r), g: mix(colorA.g, colorB.g), b: mix(colorA.b, colorB.b) });
|
|
712
|
+
}
|
|
713
|
+
function roundNum(value) {
|
|
714
|
+
return Math.round(value * 1e4) / 1e4;
|
|
715
|
+
}
|
|
716
|
+
function sanitizeForId(value) {
|
|
717
|
+
return value.replace(/[^a-zA-Z0-9-]/g, "-");
|
|
718
|
+
}
|
|
719
|
+
function iconToStaticSvg(icon, color, size) {
|
|
720
|
+
const element = isIconKey2(icon) ? createElement2(GdsIcon, { icon, size: "100%", tone: "default" }) : isValidElement2(icon) ? cloneElement2(icon, { stroke: 1.75 }) : icon;
|
|
721
|
+
const rendered = renderToStaticMarkup2(createElement2("g", { style: { color } }, element));
|
|
722
|
+
return `<svg width="${size}" height="${size}" viewBox="0 0 24 24">${rendered}</svg>`;
|
|
723
|
+
}
|
|
724
|
+
function resolveMotifBackingKeepPercent(primary, accent) {
|
|
725
|
+
for (let keepPercent = 100; keepPercent >= 0; keepPercent -= 5) {
|
|
726
|
+
const midpoint = mixHexChannelwise(
|
|
727
|
+
mixHexTowardBlack2(primary, keepPercent),
|
|
728
|
+
mixHexTowardBlack2(accent, keepPercent),
|
|
729
|
+
0.5
|
|
730
|
+
);
|
|
731
|
+
let ratio;
|
|
732
|
+
try {
|
|
733
|
+
ratio = getGdsContrastRatio(MOTIF_COLOR, midpoint);
|
|
734
|
+
} catch {
|
|
735
|
+
return 100;
|
|
736
|
+
}
|
|
737
|
+
if (ratio >= 3) {
|
|
738
|
+
return keepPercent;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return 0;
|
|
742
|
+
}
|
|
743
|
+
function buildGdsBrandBadgeSvg(options) {
|
|
744
|
+
const { themePresetId, colorScheme, colors, icon, seed: explicitSeed, cornerRadiusRatio, maskable = false, size = CANVAS, label } = options;
|
|
745
|
+
if (!label || !label.trim()) {
|
|
746
|
+
throw new Error(
|
|
747
|
+
"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."
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
if (maskable && cornerRadiusRatio !== void 0) {
|
|
751
|
+
throw new Error(
|
|
752
|
+
"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)."
|
|
753
|
+
);
|
|
754
|
+
}
|
|
755
|
+
const resolvedCornerRadiusRatio = cornerRadiusRatio ?? DEFAULT_CORNER_RADIUS_RATIO;
|
|
756
|
+
if (!Number.isFinite(resolvedCornerRadiusRatio) || resolvedCornerRadiusRatio < 0 || resolvedCornerRadiusRatio > 0.5) {
|
|
757
|
+
throw new Error(`buildGdsBrandBadgeSvg: \`cornerRadiusRatio\` must be between 0 and 0.5 (received ${resolvedCornerRadiusRatio}).`);
|
|
758
|
+
}
|
|
759
|
+
if (!Number.isFinite(size) || size <= 0) {
|
|
760
|
+
throw new Error(`buildGdsBrandBadgeSvg: \`size\` must be a positive, finite number (received ${size}).`);
|
|
761
|
+
}
|
|
762
|
+
const scheme = colorScheme ?? "light";
|
|
763
|
+
const palette = resolveGdsGeneratedPaletteHex({ colors, themePresetId, colorScheme: scheme });
|
|
764
|
+
const identity = colors ? "override" : computeGdsThemeIdentity({ preset: themePresetId, colorScheme: scheme });
|
|
765
|
+
const seed = explicitSeed ?? identity;
|
|
766
|
+
const tiltDeg = Math.round((gdsSeededRandom(seed)() - 0.5) * 40);
|
|
767
|
+
const keepPercent = resolveMotifBackingKeepPercent(palette.primary, palette.accent);
|
|
768
|
+
const gradientStart = mixHexTowardBlack2(palette.primary, keepPercent);
|
|
769
|
+
const gradientEnd = mixHexTowardBlack2(palette.accent, keepPercent);
|
|
770
|
+
const idNamespace = sanitizeForId(colors ? `override-${palette.primary}-${palette.accent}` : `${themePresetId}-${scheme}`);
|
|
771
|
+
const gradientId = `gds-badge-grad-${idNamespace}`;
|
|
772
|
+
const clipId = `gds-badge-clip-${idNamespace}`;
|
|
773
|
+
const motifIcon = icon ?? createElement2(GdsBadgeShapes.circle);
|
|
774
|
+
const motifSize = roundNum(maskable ? CANVAS * MASKABLE_SAFE_ZONE_RATIO / Math.SQRT2 : CANVAS * MOTIF_SIZE_RATIO);
|
|
775
|
+
const motifMarkup = iconToStaticSvg(motifIcon, MOTIF_COLOR, motifSize);
|
|
776
|
+
const clipRectRx = roundNum(maskable ? 0 : resolvedCornerRadiusRatio * CANVAS);
|
|
777
|
+
const motifOffset = roundNum(-motifSize / 2);
|
|
778
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${CANVAS} ${CANVAS}" width="${size}" height="${size}" data-gds-theme-identity="${escapeXmlText2(identity)}">
|
|
779
|
+
<title>${escapeXmlText2(label)}</title>
|
|
780
|
+
<defs>
|
|
781
|
+
<linearGradient id="${gradientId}" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
782
|
+
<stop offset="0%" stop-color="${gradientStart}" />
|
|
783
|
+
<stop offset="100%" stop-color="${gradientEnd}" />
|
|
784
|
+
</linearGradient>
|
|
785
|
+
<clipPath id="${clipId}">
|
|
786
|
+
<rect width="${CANVAS}" height="${CANVAS}" rx="${clipRectRx}" />
|
|
787
|
+
</clipPath>
|
|
788
|
+
</defs>
|
|
789
|
+
<rect width="${CANVAS}" height="${CANVAS}" rx="${clipRectRx}" fill="url(#${gradientId})" clip-path="url(#${clipId})" />
|
|
790
|
+
<g transform="translate(${CANVAS / 2} ${CANVAS / 2}) rotate(${tiltDeg})">
|
|
791
|
+
<g transform="translate(${motifOffset} ${motifOffset})">${motifMarkup}</g>
|
|
792
|
+
</g>
|
|
793
|
+
</svg>`;
|
|
794
|
+
}
|
|
330
795
|
export {
|
|
331
796
|
AISearchCard,
|
|
332
797
|
AccentPanel,
|
|
@@ -367,6 +832,7 @@ export {
|
|
|
367
832
|
CreatorThemeDiagnostics,
|
|
368
833
|
CtaButtonGroup,
|
|
369
834
|
DataToolbar,
|
|
835
|
+
DetailFactsTable,
|
|
370
836
|
DetailProfileShell,
|
|
371
837
|
DocsPageShell,
|
|
372
838
|
EditorialCard,
|
|
@@ -380,21 +846,60 @@ export {
|
|
|
380
846
|
FloatingActionPlacement,
|
|
381
847
|
FoodMenuSection,
|
|
382
848
|
FormField,
|
|
849
|
+
GDS_DETAIL_FACTS_LABEL_COLUMN_PX,
|
|
850
|
+
GDS_DETAIL_FACT_IDS,
|
|
851
|
+
GDS_LISTING_PICK_BADGE_FONT_SIZE_PX,
|
|
852
|
+
GDS_LISTING_PICK_BADGE_ICON_PX,
|
|
853
|
+
GDS_LISTING_PICK_BADGE_INSET_PX,
|
|
854
|
+
GDS_LISTING_PICK_BADGE_LINE_HEIGHT_PX,
|
|
855
|
+
GDS_LISTING_PICK_BADGE_PADDING_BLOCK_PX,
|
|
856
|
+
GDS_LISTING_PICK_BADGE_PADDING_INLINE_PX,
|
|
857
|
+
GDS_LISTING_TILE_SIZE_PX,
|
|
858
|
+
GDS_PICTOGRAM_BASE_STROKE,
|
|
859
|
+
GDS_PICTOGRAM_DISABLED_OPACITY,
|
|
860
|
+
GDS_PICTOGRAM_GRID,
|
|
861
|
+
GDS_PICTOGRAM_HERO_LAYERS,
|
|
862
|
+
GDS_PICTOGRAM_SCALE_PX,
|
|
863
|
+
GDS_PICTOGRAM_STROKE_BY_SCALE,
|
|
864
|
+
GDS_PICTOGRAM_TREATMENT_SCALE,
|
|
865
|
+
GDS_PIN_APPROXIMATE_DASH,
|
|
866
|
+
GDS_PIN_EMOJI_SCALE,
|
|
867
|
+
GDS_PIN_EMPHASIS_STROKE,
|
|
868
|
+
GDS_PIN_HEAD_CENTER_OFFSET,
|
|
869
|
+
GDS_PIN_ICON_SCALE,
|
|
870
|
+
GDS_PIN_SELECTED_SCALE,
|
|
871
|
+
GDS_PIN_SILHOUETTE_PATH,
|
|
872
|
+
GDS_QUICK_START_ICON_BOX_PX,
|
|
383
873
|
GdsAdminDashboardTemplate,
|
|
384
874
|
GdsAnalyticsTemplate,
|
|
385
875
|
GdsAreaChart,
|
|
876
|
+
GdsBadge,
|
|
877
|
+
GdsBadgeShapeCircle,
|
|
878
|
+
GdsBadgeShapeHexagon,
|
|
879
|
+
GdsBadgeShapePin,
|
|
880
|
+
GdsBadgeShapeRosette,
|
|
881
|
+
GdsBadgeShapeShield,
|
|
882
|
+
GdsBadgeShapeSquircle,
|
|
883
|
+
GdsBadgeShapes,
|
|
884
|
+
GdsBadgeStack,
|
|
885
|
+
GdsBadgeStackLayer,
|
|
386
886
|
GdsBarChart,
|
|
387
887
|
GdsBenchmarkBarChart,
|
|
388
888
|
GdsBleed,
|
|
389
889
|
GdsBox,
|
|
890
|
+
GdsBreadcrumbs,
|
|
390
891
|
GdsCalendarHeatmapChart,
|
|
391
892
|
GdsChart,
|
|
392
893
|
GdsChartAxis,
|
|
393
894
|
GdsChartLegend,
|
|
394
895
|
GdsChartTooltip,
|
|
395
896
|
GdsCluster,
|
|
897
|
+
GdsColumnGrid,
|
|
898
|
+
GdsColumnGridItem,
|
|
899
|
+
GdsCompareButton,
|
|
396
900
|
GdsContainer,
|
|
397
901
|
GdsContentPatternCatalog,
|
|
902
|
+
GdsCountBadge,
|
|
398
903
|
GdsCrudEditorTemplate,
|
|
399
904
|
GdsDesignHandoffCatalog,
|
|
400
905
|
GdsDirectionBoundary,
|
|
@@ -412,16 +917,23 @@ export {
|
|
|
412
917
|
GdsInline,
|
|
413
918
|
GdsLineChart,
|
|
414
919
|
GdsLocaleText,
|
|
920
|
+
GdsLogoLockup,
|
|
415
921
|
GdsLongitudinalChart,
|
|
922
|
+
GdsMapPinBadge,
|
|
416
923
|
GdsMaturityRadarChart,
|
|
417
924
|
GdsMediaFrame,
|
|
925
|
+
GdsMeter,
|
|
926
|
+
GdsNotificationBell,
|
|
418
927
|
GdsOverflowFrame,
|
|
419
928
|
GdsPageTemplateCatalog,
|
|
929
|
+
GdsPictogram,
|
|
420
930
|
GdsPlural,
|
|
421
931
|
GdsPublicEventTemplate,
|
|
422
932
|
GdsRadarChart,
|
|
933
|
+
GdsRatingDisplay,
|
|
423
934
|
GdsRatingScale,
|
|
424
935
|
GdsRelativeTime,
|
|
936
|
+
GdsRemovableTag,
|
|
425
937
|
GdsResourceManagerTemplate,
|
|
426
938
|
GdsResponsiveChartFrame,
|
|
427
939
|
GdsResponsiveVisibility,
|
|
@@ -444,6 +956,7 @@ export {
|
|
|
444
956
|
InlineText,
|
|
445
957
|
LabelTag,
|
|
446
958
|
LabelText,
|
|
959
|
+
LastCheckedLabel,
|
|
447
960
|
LayeredSurfaceSlot,
|
|
448
961
|
ListItemSection,
|
|
449
962
|
ListingCard,
|
|
@@ -492,6 +1005,7 @@ export {
|
|
|
492
1005
|
PillBar,
|
|
493
1006
|
PlaceholderPanel,
|
|
494
1007
|
PlaybackSurface,
|
|
1008
|
+
PriceEstimateLabel,
|
|
495
1009
|
ProductCard,
|
|
496
1010
|
Progress,
|
|
497
1011
|
ProgressCard,
|
|
@@ -504,6 +1018,7 @@ export {
|
|
|
504
1018
|
PublicProductCard,
|
|
505
1019
|
PublicShell,
|
|
506
1020
|
PublicSiteFooter,
|
|
1021
|
+
QuickStartCard,
|
|
507
1022
|
Radio,
|
|
508
1023
|
ReferenceLinkGrid,
|
|
509
1024
|
ReferenceLocaleNotice,
|
|
@@ -529,14 +1044,19 @@ export {
|
|
|
529
1044
|
StatusBadge,
|
|
530
1045
|
StreamingIndicator,
|
|
531
1046
|
Switch,
|
|
1047
|
+
TRUST_BADGE_DEFINITIONS,
|
|
532
1048
|
Table,
|
|
533
1049
|
Tabs,
|
|
534
1050
|
TextInput,
|
|
535
1051
|
Textarea,
|
|
536
1052
|
ThemeIcon,
|
|
537
1053
|
Tooltip,
|
|
1054
|
+
TrustBadge,
|
|
538
1055
|
VisuallyHidden,
|
|
539
1056
|
ar,
|
|
1057
|
+
buildGdsBrandBadgeSvg,
|
|
1058
|
+
buildGdsHeroSvg,
|
|
1059
|
+
buildGdsThumbnailSvg,
|
|
540
1060
|
compareGdsLocaleString,
|
|
541
1061
|
createGdsAccessAdapter,
|
|
542
1062
|
createGdsAccessGateEvent,
|
|
@@ -547,6 +1067,7 @@ export {
|
|
|
547
1067
|
createGdsNotificationId,
|
|
548
1068
|
createGdsOwnedContrastTokens,
|
|
549
1069
|
createGdsPageTemplateEvent,
|
|
1070
|
+
createGdsPictogramFamily,
|
|
550
1071
|
createGdsStyleContract,
|
|
551
1072
|
createGdsTextExpansionFixture,
|
|
552
1073
|
createGdsVocabularyPack,
|
|
@@ -561,6 +1082,9 @@ export {
|
|
|
561
1082
|
formatGdsPlural,
|
|
562
1083
|
formatGdsRelativeTime,
|
|
563
1084
|
fr,
|
|
1085
|
+
gdsActivityPictograms,
|
|
1086
|
+
gdsBadgeAccentColors,
|
|
1087
|
+
gdsBadgeAccentShades,
|
|
564
1088
|
gdsCardDensityPaddingMap,
|
|
565
1089
|
gdsCardGapMap,
|
|
566
1090
|
gdsCardMediaRatioMap,
|
|
@@ -568,11 +1092,13 @@ export {
|
|
|
568
1092
|
gdsCardTitleOrderMap,
|
|
569
1093
|
gdsChartSetATypeRegistry,
|
|
570
1094
|
gdsChartSetBTypeRegistry,
|
|
1095
|
+
gdsChartSetCTypeRegistry,
|
|
571
1096
|
gdsChartTypeRegistry,
|
|
572
1097
|
gdsDefaultChartLegend,
|
|
573
1098
|
gdsIconRegistry,
|
|
574
1099
|
gdsIconToneColor,
|
|
575
1100
|
gdsLocales,
|
|
1101
|
+
gdsPictogramUsageRules,
|
|
576
1102
|
gdsSeriesPalette,
|
|
577
1103
|
gdsStyle,
|
|
578
1104
|
generateGdsDesignHandoffReport,
|
|
@@ -581,6 +1107,7 @@ export {
|
|
|
581
1107
|
getGdsAccessGateStates,
|
|
582
1108
|
getGdsAccessibilityEvidence,
|
|
583
1109
|
getGdsAccessibilityEvidenceSummary,
|
|
1110
|
+
getGdsActivityPictogramKeys,
|
|
584
1111
|
getGdsBlockTypes,
|
|
585
1112
|
getGdsContentPattern,
|
|
586
1113
|
getGdsContentPatterns,
|
|
@@ -612,11 +1139,15 @@ export {
|
|
|
612
1139
|
getSupportedProviderIdentityIds,
|
|
613
1140
|
he,
|
|
614
1141
|
hu,
|
|
1142
|
+
isGdsActivityPictogramKey,
|
|
615
1143
|
isGdsChartSetAType,
|
|
616
1144
|
isGdsChartSetBType,
|
|
1145
|
+
isGdsChartSetCType,
|
|
617
1146
|
isGdsIconKey,
|
|
618
1147
|
isPresentationMode,
|
|
619
1148
|
it,
|
|
1149
|
+
ja,
|
|
1150
|
+
ko,
|
|
620
1151
|
mergeGdsVocabularyPacks,
|
|
621
1152
|
normalizeGdsResponsiveValue,
|
|
622
1153
|
partnerDiscoveryDefaultAmenities,
|
|
@@ -631,6 +1162,7 @@ export {
|
|
|
631
1162
|
resolveAccentPanelStyles,
|
|
632
1163
|
resolveGdsAccessAdapterState,
|
|
633
1164
|
resolveGdsAccessState,
|
|
1165
|
+
resolveGdsActivityPictogramLabel,
|
|
634
1166
|
resolveGdsCardContract,
|
|
635
1167
|
resolveGdsLayoutStyle,
|
|
636
1168
|
resolveGdsLocale,
|
|
@@ -652,5 +1184,6 @@ export {
|
|
|
652
1184
|
validateGdsDesignHandoffMappings,
|
|
653
1185
|
validateGdsLayout,
|
|
654
1186
|
validateGdsPageTemplates,
|
|
655
|
-
validateGdsTaskPatterns
|
|
1187
|
+
validateGdsTaskPatterns,
|
|
1188
|
+
zh
|
|
656
1189
|
};
|