@salesforcedevs/dx-components 1.3.35-toc → 1.3.37-alpha01

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.35-toc",
3
+ "version": "1.3.37-alpha01",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -15,7 +15,7 @@
15
15
  "@sfdocs-internal/wires": "^0.6.3",
16
16
  "@vimeo/player": "^2.16.4",
17
17
  "classnames": "^2.2.6",
18
- "coveo-search-ui": "^2.10082.5",
18
+ "coveo-search-ui": "^2.10104.0",
19
19
  "debounce": "^1.2.0",
20
20
  "js-cookie": "^3.0.1",
21
21
  "lodash.defaults": "^4.2.0",
@@ -2,6 +2,13 @@
2
2
  @import "dxHelpers/text";
3
3
  @import "dxHelpers/card";
4
4
 
5
+ :host {
6
+ --dx-c-feature-img-padding-top: 0;
7
+ --dx-c-feature-img-padding-right: 0;
8
+ --dx-c-feature-img-padding-left: 0;
9
+ --dx-c-feature-img-padding-bottom: 0;
10
+ }
11
+
5
12
  .dx-card-news {
6
13
  position: relative;
7
14
  display: flex;
@@ -157,3 +164,10 @@ img {
157
164
  max-width: 25%;
158
165
  }
159
166
  }
167
+
168
+ .dx-card-news-img-padding {
169
+ padding: var(--dx-c-feature-img-padding-top)
170
+ var(--dx-c-feature-img-padding-right)
171
+ var(--dx-c-feature-img-padding-bottom)
172
+ var(--dx-c-feature-img-padding-left);
173
+ }
@@ -59,7 +59,8 @@ export default class CardNews extends LightningElement {
59
59
  return cx(
60
60
  this.imgVerticalAlign &&
61
61
  `dx-card-news-img-vertical-align-${this.imgVerticalAlign}`,
62
- this.textContainerWidth === "large" && `dx-card-news-img-small`
62
+ this.textContainerWidth === "large" && `dx-card-news-img-small`,
63
+ `dx-card-news-img-padding`
63
64
  );
64
65
  }
65
66
 
@@ -48,8 +48,13 @@ export default class CodeBlock extends LightningElement {
48
48
  { label: "Kotlin", id: "kotlin" },
49
49
  { label: "Python", id: "python" },
50
50
  { label: "Bash", id: "bash" },
51
+ { label: "Shell", id: "shell" },
52
+ { label: "Shell", id: "sh" },
51
53
  { label: "SQL", id: "sql" },
52
- { label: "YAML", id: "yaml" }
54
+ { label: "YAML", id: "yaml" },
55
+ { label: "Markdown", id: "markdown" },
56
+ { label: "Markdown", id: "md" },
57
+ { label: "JSX", id: "jsx" }
53
58
  ];
54
59
 
55
60
  connectedCallback() {
@@ -54,6 +54,14 @@
54
54
  color: var(--dx-g-purple-vibrant-70);
55
55
  }
56
56
 
57
+ .dx-theme-dark .token.atrule {
58
+ color: var(--dx-g-purple-vibrant-70);
59
+ }
60
+
61
+ .dx-theme-dark .token.builtin {
62
+ color: var(--dx-g-purple-vibrant-70);
63
+ }
64
+
57
65
  .dx-theme-dark .token.entity {
58
66
  color: #fff;
59
67
  background: var(--dx-g-blue-vibrant-10);
@@ -68,7 +76,6 @@
68
76
  .dx-theme-dark .token.deleted,
69
77
  .dx-theme-dark .token.constant,
70
78
  .dx-theme-dark .token.number,
71
- .dx-theme-dark .token.builtin,
72
79
  .dx-theme-dark .token.important .dx-theme-dark .token.boolean,
73
80
  .dx-theme-dark .token.symbol,
74
81
  .dx-theme-dark .token.inserted,
@@ -30,6 +30,14 @@
30
30
  color: var(--dx-g-teal-vibrant-40);
31
31
  }
32
32
 
33
+ .dx-theme-light .token.atrule {
34
+ color: var(--dx-g-pink-vibrant-40);
35
+ }
36
+
37
+ .dx-theme-light .token.builtin {
38
+ color: var(--dx-g-pink-vibrant-40);
39
+ }
40
+
33
41
  .dx-theme-light .token.tag {
34
42
  color: rgb(75, 36, 219);
35
43
  }
@@ -55,9 +63,7 @@
55
63
  .dx-theme-light .token.deleted,
56
64
  .dx-theme-light .token.string,
57
65
  .dx-theme-light .token.char,
58
- .dx-theme-light .token.builtin,
59
66
  .dx-theme-light .token.inserted,
60
- .dx-theme-light .token.atrule,
61
67
  .dx-theme-light .token.regex,
62
68
  .dx-theme-light .token.important {
63
69
  color: var(--dx-g-gray-10);
@@ -6,7 +6,12 @@
6
6
  <span if:true={subtitle} class="subtitle dx-text-heading-4b">
7
7
  {subtitle}
8
8
  </span>
9
- <dx-button href={ctaHref} target={ctaTarget} size="large">
9
+ <dx-button
10
+ onclick={onCtaClick}
11
+ href={ctaHref}
12
+ target={ctaTarget}
13
+ size="large"
14
+ >
10
15
  {ctaLabel}
11
16
  </dx-button>
12
17
  </div>
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  Code generated by scripts/postinstall.js DO NOT EDIT
3
- *//*
3
+ */
4
+
5
+ /*
4
6
  * @param direction vertical or horizontal
5
7
  * @param position type of positioning to apply (relative/absolute)
6
8
  */
@@ -1376,6 +1378,15 @@ Code generated by scripts/postinstall.js DO NOT EDIT
1376
1378
  .coveo-filetype-salesforce-standard-work-order-item,
1377
1379
  .coveo-filetype-salesforce-standard-work-order,
1378
1380
  .coveo-filetype-salesforce-standard-work-type,
1381
+ .coveo-filetype-slack,
1382
+ .coveo-icon.filetype.Slackmessage,
1383
+ .coveo-icon.filetype.slackmessage,
1384
+ .coveo-icon.filetype.Slackchannel,
1385
+ .coveo-icon.filetype.slackchannel,
1386
+ .coveo-icon.filetype.Slackfile,
1387
+ .coveo-icon.filetype.slackfile,
1388
+ .coveo-icon.filetype.Slackuser,
1389
+ .coveo-icon.filetype.slackuser,
1379
1390
  .coveo-filetype-user,
1380
1391
  .coveo-icon.objecttype.People,
1381
1392
  .coveo-icon.objecttype.people,
@@ -1584,21 +1595,6 @@ Code generated by scripts/postinstall.js DO NOT EDIT
1584
1595
  background-size: 56px 64px;
1585
1596
  }
1586
1597
 
1587
- .coveo-filetype-slack,
1588
- .coveo-icon.filetype.Slackmessage,
1589
- .coveo-icon.filetype.slackmessage,
1590
- .coveo-icon.filetype.Slackchannel,
1591
- .coveo-icon.filetype.slackchannel,
1592
- .coveo-icon.filetype.Slackfile,
1593
- .coveo-icon.filetype.slackfile,
1594
- .coveo-icon.filetype.Slackuser,
1595
- .coveo-icon.filetype.slackuser {
1596
- display: inline-block;
1597
- width: 124px;
1598
- height: 124px;
1599
- background-size: 124px 124px;
1600
- }
1601
-
1602
1598
  .coveo-filetype-attachment-small,
1603
1599
  .coveo-icon.objecttype.coveo-small.Attachment,
1604
1600
  .coveo-icon.objecttype.coveo-small.attachment,
@@ -2124,6 +2120,15 @@ Code generated by scripts/postinstall.js DO NOT EDIT
2124
2120
  .coveo-filetype-salesforce-standard-work-order-item-small,
2125
2121
  .coveo-filetype-salesforce-standard-work-order-small,
2126
2122
  .coveo-filetype-salesforce-standard-work-type-small,
2123
+ .coveo-filetype-slack-small,
2124
+ .coveo-icon.filetype.coveo-small.Slackmessage,
2125
+ .coveo-icon.filetype.coveo-small.slackmessage,
2126
+ .coveo-icon.filetype.coveo-small.Slackchannel,
2127
+ .coveo-icon.filetype.coveo-small.slackchannel,
2128
+ .coveo-icon.filetype.coveo-small.Slackfile,
2129
+ .coveo-icon.filetype.coveo-small.slackfile,
2130
+ .coveo-icon.filetype.coveo-small.Slackuser,
2131
+ .coveo-icon.filetype.coveo-small.slackuser,
2127
2132
  .coveo-filetype-user-small,
2128
2133
  .coveo-icon.objecttype.coveo-small.People,
2129
2134
  .coveo-icon.objecttype.coveo-small.people,
@@ -2332,21 +2337,6 @@ Code generated by scripts/postinstall.js DO NOT EDIT
2332
2337
  background-size: 28px 32px;
2333
2338
  }
2334
2339
 
2335
- .coveo-filetype-slack-small,
2336
- .coveo-icon.filetype.coveo-small.Slackmessage,
2337
- .coveo-icon.filetype.coveo-small.slackmessage,
2338
- .coveo-icon.filetype.coveo-small.Slackchannel,
2339
- .coveo-icon.filetype.coveo-small.slackchannel,
2340
- .coveo-icon.filetype.coveo-small.Slackfile,
2341
- .coveo-icon.filetype.coveo-small.slackfile,
2342
- .coveo-icon.filetype.coveo-small.Slackuser,
2343
- .coveo-icon.filetype.coveo-small.slackuser {
2344
- display: inline-block;
2345
- width: 62px;
2346
- height: 62px;
2347
- background-size: 62px 62px;
2348
- }
2349
-
2350
2340
  .coveo-filetype-attachment,
2351
2341
  .coveo-icon.objecttype.Attachment,
2352
2342
  .coveo-icon.objecttype.attachment,
@@ -8065,6 +8055,13 @@ select.coveo-dropdown::-ms-expand {
8065
8055
  * @param $size size of the icon to use
8066
8056
  */
8067
8057
 
8058
+ @font-face {
8059
+ font-family: 'Lato';
8060
+ src: url('https://static.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff2'), url('https://staticdev.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff2'), url('../fonts/lato.woff2'), url('https://static.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff'), url('https://staticdev.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff'), url('../fonts/lato.woff');
8061
+ font-weight: normal;
8062
+ font-style: normal;
8063
+ }
8064
+
8068
8065
  .CoveoSearchInterface {
8069
8066
  min-height: 100%;
8070
8067
  position: relative;
@@ -18738,6 +18735,10 @@ button.coveo-user-feedback-banner-explain-why-active {
18738
18735
  * @param $size size of the icon to use
18739
18736
  */
18740
18737
 
18738
+ .coveo-user-explanation-modal .coveo-small-close {
18739
+ display: none;
18740
+ }
18741
+
18741
18742
  .coveo-user-explanation-modal-explanation-section {
18742
18743
  display: flex;
18743
18744
  flex-wrap: wrap;
@@ -385,3 +385,8 @@ a.CoveoResultLink,
385
385
  margin: 0 auto;
386
386
  width: fit-content;
387
387
  }
388
+
389
+ dx-type-badge {
390
+ display: block;
391
+ margin-bottom: var(--dx-g-spacing-smd);
392
+ }
@@ -37,6 +37,7 @@ const resultsTemplatesInnerHtml = `
37
37
  data-field-publicurl=""
38
38
  >
39
39
  <div class="dx-result">
40
+ <span class="CoveoFieldValue" data-field="@content_type" data-helper="badge" data-html-value="true"></span>
40
41
  <p class="dx-result-title">
41
42
  <a
42
43
  class="CoveoResultLink"
@@ -52,6 +53,7 @@ const resultsTemplatesInnerHtml = `
52
53
  type="text/html"
53
54
  >
54
55
  <div class="dx-result">
56
+ <span class="CoveoFieldValue" data-field="@content_type" data-helper="badge" data-html-value="true"></span>
55
57
  <p class="dx-result-title">
56
58
  <a class="CoveoResultLink"></a>
57
59
  </p>
@@ -169,6 +171,14 @@ export default class SearchResults extends LightningElement {
169
171
 
170
172
  this.attachListeners(this.root);
171
173
 
174
+ Coveo.TemplateHelpers.registerTemplateHelper(
175
+ "badge",
176
+ (value: string) => {
177
+ console.log({ value });
178
+ return `<dx-type-badge variant="${value}"></dx-type-badge>`;
179
+ }
180
+ );
181
+
172
182
  Coveo.init(this.root);
173
183
  }
174
184
 
@@ -97,18 +97,10 @@ export default class TreeItem extends LightningElement {
97
97
  this.sendGtm(event);
98
98
  }
99
99
 
100
- private preventDefaultLinkBehavior(event: Event) {
101
- // prevent page refresh if href isn't present or link is already active
102
- if (
103
- !this._treeNode.link?.href ||
104
- this._treeNode.link?.href === window.location.pathname
105
- ) {
100
+ private onLinkClick(event: Event): void {
101
+ if (!(this._treeNode.link && this._treeNode.link.href)) {
106
102
  event.preventDefault();
107
103
  }
108
- }
109
-
110
- private onLinkClick(event: Event): void {
111
- this.preventDefaultLinkBehavior(event);
112
104
 
113
105
  if (this.isParent) {
114
106
  const isSelectAction = true;
@@ -12,6 +12,10 @@
12
12
  --dx-c-body-max-lines: 6;
13
13
  }
14
14
 
15
+ span {
16
+ word-break: break-word;
17
+ }
18
+
15
19
  .dx-card-base {
16
20
  height: 100%;
17
21
  }
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable */
2
+ /* prettier-ignore */
2
3
  var commonjsGlobal =
3
4
  typeof globalThis !== "undefined"
4
5
  ? globalThis
@@ -32,11 +33,10 @@ function commonjsRequire() {
32
33
  "Dynamic requires are not currently supported by @rollup/plugin-commonjs"
33
34
  );
34
35
  }
35
- /* eslint-disable */
36
36
  //Start autogenerated code
37
37
  var prism = createCommonjsModule(function (module) {
38
- /* PrismJS 1.28.0
39
- https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apex+aspnet+bash+basic+c+csharp+cpp+css-extras+java+javadoc+javadoclike+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+kotlin+markdown+markup-templating+php+phpdoc+php-extras+plsql+python+regex+sql+swift+typescript+typoscript+uri+vbnet+yaml&plugins=line-numbers+unescaped-markup+match-braces */
38
+ /* PrismJS 1.29.0
39
+ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apex+aspnet+bash+basic+c+csharp+cpp+css-extras+java+javadoc+javadoclike+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+kotlin+markdown+markup-templating+php+phpdoc+php-extras+plsql+python+jsx+regex+sql+swift+typescript+typoscript+uri+vbnet+yaml&plugins=line-numbers+unescaped-markup+match-braces */
40
40
  var _self =
41
41
  "undefined" != typeof window
42
42
  ? window
@@ -1332,14 +1332,14 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
1332
1332
  !(function (e) {
1333
1333
  var t =
1334
1334
  "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",
1335
- n = {
1335
+ a = {
1336
1336
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
1337
1337
  lookbehind: !0,
1338
1338
  alias: "punctuation",
1339
1339
  inside: null
1340
1340
  },
1341
- a = {
1342
- bash: n,
1341
+ n = {
1342
+ bash: a,
1343
1343
  environment: { pattern: RegExp("\\$" + t), alias: "constant" },
1344
1344
  variable: [
1345
1345
  {
@@ -1419,31 +1419,31 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
1419
1419
  pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
1420
1420
  lookbehind: !0,
1421
1421
  greedy: !0,
1422
- inside: a
1422
+ inside: n
1423
1423
  },
1424
1424
  {
1425
1425
  pattern:
1426
1426
  /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
1427
1427
  lookbehind: !0,
1428
1428
  greedy: !0,
1429
- inside: { bash: n }
1429
+ inside: { bash: a }
1430
1430
  },
1431
1431
  {
1432
1432
  pattern:
1433
1433
  /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
1434
1434
  lookbehind: !0,
1435
1435
  greedy: !0,
1436
- inside: a
1436
+ inside: n
1437
1437
  },
1438
1438
  { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 },
1439
1439
  {
1440
1440
  pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
1441
1441
  greedy: !0,
1442
- inside: { entity: a.entity }
1442
+ inside: { entity: n.entity }
1443
1443
  }
1444
1444
  ],
1445
1445
  environment: { pattern: RegExp("\\$?" + t), alias: "constant" },
1446
- variable: a.variable,
1446
+ variable: n.variable,
1447
1447
  function: {
1448
1448
  pattern:
1449
1449
  /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
@@ -1478,7 +1478,7 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
1478
1478
  lookbehind: !0
1479
1479
  }
1480
1480
  }),
1481
- (n.inside = e.languages.bash);
1481
+ (a.inside = e.languages.bash);
1482
1482
  for (
1483
1483
  var s = [
1484
1484
  "comment",
@@ -1497,13 +1497,14 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
1497
1497
  "punctuation",
1498
1498
  "number"
1499
1499
  ],
1500
- o = a.variable[1].inside,
1500
+ o = n.variable[1].inside,
1501
1501
  i = 0;
1502
1502
  i < s.length;
1503
1503
  i++
1504
1504
  )
1505
1505
  o[s[i]] = e.languages.bash[s[i]];
1506
- e.languages.shell = e.languages.bash;
1506
+ (e.languages.sh = e.languages.bash),
1507
+ (e.languages.shell = e.languages.bash);
1507
1508
  })(Prism);
1508
1509
  Prism.languages.basic = {
1509
1510
  comment: { pattern: /(?:!|REM\b).+/i, inside: { keyword: /^REM/i } },
@@ -3205,6 +3206,123 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
3205
3206
  "string-interpolation"
3206
3207
  ].inside.interpolation.inside.rest = Prism.languages.python),
3207
3208
  (Prism.languages.py = Prism.languages.python);
3209
+ !(function (t) {
3210
+ var n = t.util.clone(t.languages.javascript),
3211
+ e = "(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";
3212
+ function a(t, n) {
3213
+ return (
3214
+ (t = t
3215
+ .replace(/<S>/g, function () {
3216
+ return "(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)";
3217
+ })
3218
+ .replace(/<BRACES>/g, function () {
3219
+ return "(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})";
3220
+ })
3221
+ .replace(/<SPREAD>/g, function () {
3222
+ return e;
3223
+ })),
3224
+ RegExp(t, n)
3225
+ );
3226
+ }
3227
+ (e = a(e).source),
3228
+ (t.languages.jsx = t.languages.extend("markup", n)),
3229
+ (t.languages.jsx.tag.pattern = a(
3230
+ "</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"
3231
+ )),
3232
+ (t.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/),
3233
+ (t.languages.jsx.tag.inside["attr-value"].pattern =
3234
+ /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/),
3235
+ (t.languages.jsx.tag.inside.tag.inside["class-name"] =
3236
+ /^[A-Z]\w*(?:\.[A-Z]\w*)*$/),
3237
+ (t.languages.jsx.tag.inside.comment = n.comment),
3238
+ t.languages.insertBefore(
3239
+ "inside",
3240
+ "attr-name",
3241
+ { spread: { pattern: a("<SPREAD>"), inside: t.languages.jsx } },
3242
+ t.languages.jsx.tag
3243
+ ),
3244
+ t.languages.insertBefore(
3245
+ "inside",
3246
+ "special-attr",
3247
+ {
3248
+ script: {
3249
+ pattern: a("=<BRACES>"),
3250
+ alias: "language-javascript",
3251
+ inside: {
3252
+ "script-punctuation": {
3253
+ pattern: /^=(?=\{)/,
3254
+ alias: "punctuation"
3255
+ },
3256
+ rest: t.languages.jsx
3257
+ }
3258
+ }
3259
+ },
3260
+ t.languages.jsx.tag
3261
+ );
3262
+ var s = function (t) {
3263
+ return t
3264
+ ? "string" == typeof t
3265
+ ? t
3266
+ : "string" == typeof t.content
3267
+ ? t.content
3268
+ : t.content.map(s).join("")
3269
+ : "";
3270
+ },
3271
+ g = function (n) {
3272
+ for (var e = [], a = 0; a < n.length; a++) {
3273
+ var o = n[a],
3274
+ i = !1;
3275
+ if (
3276
+ ("string" != typeof o &&
3277
+ ("tag" === o.type &&
3278
+ o.content[0] &&
3279
+ "tag" === o.content[0].type
3280
+ ? "</" === o.content[0].content[0].content
3281
+ ? e.length > 0 &&
3282
+ e[e.length - 1].tagName ===
3283
+ s(o.content[0].content[1]) &&
3284
+ e.pop()
3285
+ : "/>" ===
3286
+ o.content[o.content.length - 1]
3287
+ .content ||
3288
+ e.push({
3289
+ tagName: s(o.content[0].content[1]),
3290
+ openedBraces: 0
3291
+ })
3292
+ : e.length > 0 &&
3293
+ "punctuation" === o.type &&
3294
+ "{" === o.content
3295
+ ? e[e.length - 1].openedBraces++
3296
+ : e.length > 0 &&
3297
+ e[e.length - 1].openedBraces > 0 &&
3298
+ "punctuation" === o.type &&
3299
+ "}" === o.content
3300
+ ? e[e.length - 1].openedBraces--
3301
+ : (i = !0)),
3302
+ (i || "string" == typeof o) &&
3303
+ e.length > 0 &&
3304
+ 0 === e[e.length - 1].openedBraces)
3305
+ ) {
3306
+ var r = s(o);
3307
+ a < n.length - 1 &&
3308
+ ("string" == typeof n[a + 1] ||
3309
+ "plain-text" === n[a + 1].type) &&
3310
+ ((r += s(n[a + 1])), n.splice(a + 1, 1)),
3311
+ a > 0 &&
3312
+ ("string" == typeof n[a - 1] ||
3313
+ "plain-text" === n[a - 1].type) &&
3314
+ ((r = s(n[a - 1]) + r),
3315
+ n.splice(a - 1, 1),
3316
+ a--),
3317
+ (n[a] = new t.Token("plain-text", r, null, r));
3318
+ }
3319
+ o.content && "string" != typeof o.content && g(o.content);
3320
+ }
3321
+ };
3322
+ t.hooks.add("after-tokenize", function (t) {
3323
+ ("jsx" !== t.language && "tsx" !== t.language) || g(t.tokens);
3324
+ });
3325
+ })(Prism);
3208
3326
  !(function (a) {
3209
3327
  var e = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" },
3210
3328
  n =