botframework-webchat-fluent-theme 4.18.1-main.20241126.c3857bf → 4.18.1-main.20250114.cf2b542

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": "botframework-webchat-fluent-theme",
3
- "version": "4.18.1-main.20241126.c3857bf",
3
+ "version": "4.18.1-main.20250114.cf2b542",
4
4
  "description": "Fluent theme for Bot Framework Web Chat",
5
5
  "main": "./dist/botframework-webchat-fluent-theme.js",
6
6
  "types": "./dist/botframework-webchat-fluent-theme.d.ts",
@@ -68,15 +68,15 @@
68
68
  "@types/math-random": "^1.0.2",
69
69
  "@types/node": "^20.12.11",
70
70
  "@types/react": "^16.14.60",
71
- "botframework-webchat-base": "4.18.1-main.20241126.c3857bf",
72
- "botframework-webchat-styles": "4.18.1-main.20241126.c3857bf",
71
+ "botframework-webchat-base": "4.18.1-main.20250114.cf2b542",
72
+ "botframework-webchat-styles": "4.18.1-main.20250114.cf2b542",
73
73
  "tsup": "^8.0.2",
74
74
  "typescript": "^5.4.5"
75
75
  },
76
76
  "dependencies": {
77
- "botframework-webchat-api": "4.18.1-main.20241126.c3857bf",
78
- "botframework-webchat-component": "4.18.1-main.20241126.c3857bf",
79
- "botframework-webchat-core": "4.18.1-main.20241126.c3857bf",
77
+ "botframework-webchat-api": "4.18.1-main.20250114.cf2b542",
78
+ "botframework-webchat-component": "4.18.1-main.20250114.cf2b542",
79
+ "botframework-webchat-core": "4.18.1-main.20250114.cf2b542",
80
80
  "classnames": "2.5.1",
81
81
  "inject-meta-tag": "0.0.1",
82
82
  "math-random": "2.0.1",
@@ -74,6 +74,8 @@
74
74
 
75
75
  /* New greys from the link above not exposed by Fluent */
76
76
  --webchat-colorGrey8: #141414;
77
+ --webchat-colorGrey14: #242424;
78
+ --webchat-colorGrey92: #ebebeb;
77
79
  --webchat-colorGrey98: #fafafa;
78
80
 
79
81
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/utils/shadows.ts */
@@ -225,7 +227,8 @@
225
227
  /* Scrollbars */
226
228
  :global(.webchat-fluent).theme :global(.webchat__basic-transcript .webchat__basic-transcript__scrollable),
227
229
  :global(.webchat-fluent).theme :global(.webchat__view-code-dialog__code-body),
228
- :global(.webchat-fluent).theme :global(.webchat__render-markdown [data-math-type='block']) {
230
+ :global(.webchat-fluent).theme :global(.webchat__render-markdown [data-math-type='block']),
231
+ :global(.webchat-fluent).theme :global(.webchat__view-code-dialog__body) {
229
232
  /* Edge uses -webkit-scrollbar if scrollbar-* is not set */
230
233
  scrollbar-color: unset;
231
234
  scrollbar-width: unset;
@@ -391,6 +394,72 @@
391
394
  }
392
395
  }
393
396
 
397
+ /* Code block */
398
+ :global(.webchat-fluent).theme :global(.webchat__code-block) {
399
+ border: none;
400
+ font-family: var(--webchat-fontFamilyMonospace);
401
+ font-size: var(--webchat-fontSizeBase300);
402
+
403
+ --webchat__code-block__copy-button--color: var(--webchat-colorNeutralForeground1);
404
+ --webchat__code-block__copy-button--background: var(--webchat-colorNeutralBackground3);
405
+
406
+ :global(.webchat__code-block-copy-button) {
407
+ background: transparent;
408
+ border: none;
409
+ color: var(--webchat__code-block__copy-button--color);
410
+ height: 20px;
411
+ margin-inline-start: var(--webchat-spacingHorizontalS);
412
+ padding: 0;
413
+ width: 20px;
414
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
415
+
416
+ :global(.webchat__code-block-copy-button__icon) {
417
+ background-color: currentColor;
418
+ }
419
+
420
+ &:hover {
421
+ background: var(--webchat__code-block__copy-button--background);
422
+ color: var(--webchat__code-block__copy-button--color);
423
+ }
424
+
425
+ &:active {
426
+ background: var(--webchat__code-block__copy-button--background);
427
+ color: var(--webchat__code-block__copy-button--color);
428
+ }
429
+
430
+ &:focus {
431
+ color: var(--webchat__code-block__copy-button--color);
432
+ outline-color: currentColor;
433
+ }
434
+ }
435
+
436
+ &:global(:has(.webchat__code-block__body:focus-visible)):focus-within {
437
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
438
+ outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
439
+
440
+ :global(.webchat__code-block__body) {
441
+ outline: none;
442
+ }
443
+ }
444
+
445
+ &:global(:has(> .webchat__code-block__theme--github-dark-default)) {
446
+ --webchat__background--code-block: var(--codeBlockBackground, var(--webchat-colorGrey8));
447
+ --webchat__code-block__copy-button--background: var(
448
+ --codeBlockCopyButtonBackgroundPressed,
449
+ var(--webchat-colorGrey14)
450
+ );
451
+ --webchat__code-block__copy-button--color: var(--codeBlockCopyButtonForeground, var(--webchat__color--code-block));
452
+ --webchat__color--code-block: var(--codeBlockForeground, var(--webchat-colorGrey98));
453
+ }
454
+
455
+ &:global(:has(> .webchat__code-block__theme--github-light-default)) {
456
+ --webchat__background--code-block: var(--codeBlockBackground, var(--webchat-colorGrey98));
457
+ --webchat__code-block__copy-button--background: var(--codeBlockBackgroundPressed, var(--webchat-colorGrey92));
458
+ --webchat__code-block__copy-button--color: var(--codeBlockCopyButtonForeground, var(--webchat__color--code-block));
459
+ --webchat__color--code-block: var(--codeBlockForeground, var(--webchat-colorGrey8));
460
+ }
461
+ }
462
+
394
463
  /* View Code dialog */
395
464
  :global(.webchat-fluent).theme :global(.webchat__modal-dialog.webchat__view-code-dialog) {
396
465
  :global(.webchat__modal-dialog__close-button-layout) {
@@ -408,34 +477,14 @@
408
477
  width: unset;
409
478
  }
410
479
 
411
- :global(.webchat__view-code-dialog__copy-button) {
412
- background: transparent;
413
- border: none;
414
- color: var(--webchat-colorNeutralForeground1);
415
- height: 20px;
480
+ :global(.webchat__code-block-copy-button) {
481
+ --webchat__code-block__copy-button--color: var(--webchat-colorNeutralForeground1);
482
+ --webchat__code-block__copy-button--background: var(--webchat-colorNeutralBackground3);
483
+
416
484
  margin-block-start: var(--webchat-spacingVerticalS);
417
- padding: 0;
418
485
  position: absolute;
419
486
  right: 32px;
420
487
  top: 0;
421
- transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
422
- width: 20px;
423
-
424
- :global(.webchat__code-block-copy-button__icon) {
425
- background-color: currentColor;
426
- }
427
-
428
- &:hover {
429
- background: var(--webchat-colorNeutralBackground3);
430
- }
431
-
432
- &:active {
433
- background: var(--webchat-colorNeutralBackground3);
434
- }
435
-
436
- &:focus {
437
- outline-color: var(--webchat-colorStrokeFocus2);
438
- }
439
488
  }
440
489
 
441
490
  :global(.webchat__modal-dialog__box) {
@@ -454,33 +503,10 @@
454
503
  }
455
504
 
456
505
  :global(.webchat__view-code-dialog__body) {
457
- display: contents;
458
- }
459
-
460
- :global(.webchat__view-code-dialog__code-body) {
461
- background: var(--webchat__code-block--background);
462
506
  font-family: var(--webchat-fontFamilyMonospace);
463
507
  font-size: var(--webchat-fontSizeBase300);
464
- line-height: var(--webchat-fontSizeBase300);
465
- margin-inline: calc(var(--webchat-spacingHorizontalM) * -1);
466
- padding-inline: var(--webchat-spacingHorizontalM);
467
- }
468
-
469
- :global(.webchat__view-code-dialog__code-body:has(.shiki:focus-visible)):focus-within {
470
- outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
471
- outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
472
-
473
- :global(.shiki) {
474
- outline: none;
475
- }
476
- }
477
-
478
- :global(.webchat__view-code-dialog__code-body:has(.shiki.github-light-default)) {
479
- --webchat__code-block--background: var(--codeBlockBackground, var(--webchat-colorGrey98));
480
- }
481
-
482
- :global(.webchat__view-code-dialog__code-body:has(.shiki.github-dark-default)) {
483
- --webchat__code-block--background: var(--codeBlockBackground, var(--webchat-colorGrey8));
508
+ margin: 0 calc(var(--webchat-spacingHorizontalM) * -1);
509
+ padding: 0 var(--webchat-spacingHorizontalM);
484
510
  }
485
511
 
486
512
  :global(.webchat__view-code-dialog__footer) {