@dialpad/dialtone 9.131.0 → 9.132.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/css/dialtone-default-theme.css +1783 -5185
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone-docs.json +1 -1
- package/dist/css/dialtone.css +622 -1999
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/tokens-docs.json +1 -1
- package/dist/tokens/css/tokens-dp-dark.css +104 -265
- package/dist/tokens/css/tokens-expressive-dark.css +104 -265
- package/dist/tokens/css/tokens-expressive-sm-dark.css +104 -265
- package/dist/tokens/css/tokens-tmo-dark.css +104 -265
- package/dist/tokens/doc.json +27983 -30007
- package/dist/tokens/themes/dp-dark.cjs +1 -1
- package/dist/tokens/themes/dp-dark.js +1 -1
- package/dist/tokens/themes/expressive-dark.cjs +1 -1
- package/dist/tokens/themes/expressive-dark.js +1 -1
- package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
- package/dist/tokens/themes/expressive-sm-dark.js +1 -1
- package/dist/tokens/themes/tmo-dark.cjs +1 -1
- package/dist/tokens/themes/tmo-dark.js +1 -1
- package/dist/tokens/tokens-dp-dark.json +11 -34
- package/dist/tokens/tokens-expressive-dark.json +11 -34
- package/dist/tokens/tokens-expressive-sm-dark.json +11 -34
- package/dist/tokens/tokens-tmo-dark.json +11 -34
- package/dist/vue2/common/emoji/index.cjs +1 -1
- package/dist/vue2/common/emoji/index.cjs.map +1 -1
- package/dist/vue2/common/emoji/index.js +25 -17
- package/dist/vue2/common/emoji/index.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/lib/emoji/emoji.cjs +1 -1
- package/dist/vue2/lib/emoji/emoji.cjs.map +1 -1
- package/dist/vue2/lib/emoji/emoji.js +16 -16
- package/dist/vue2/lib/emoji/emoji.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input.js +15 -7
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +7 -7
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +393 -401
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/common/emoji/index.cjs +1 -1
- package/dist/vue3/common/emoji/index.cjs.map +1 -1
- package/dist/vue3/common/emoji/index.js +39 -33
- package/dist/vue3/common/emoji/index.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/lib/emoji/emoji.cjs +1 -1
- package/dist/vue3/lib/emoji/emoji.cjs.map +1 -1
- package/dist/vue3/lib/emoji/emoji.js +17 -17
- package/dist/vue3/lib/emoji/emoji.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input.js +60 -52
- package/dist/vue3/lib/message-input/message-input.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +133 -120
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +2 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -238,29 +238,6 @@
|
|
|
238
238
|
"dtColorChartSequential09Selected": "#F3F6FB",
|
|
239
239
|
"dtColorChartSequential10Hover": "#F3F6FB",
|
|
240
240
|
"dtColorChartSequential10Selected": "#F3F6FB",
|
|
241
|
-
"dtColorInputsColorForegroundDefault": "#E6E6E6",
|
|
242
|
-
"dtColorActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
243
|
-
"dtColorActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
244
|
-
"dtColorActionColorBackgroundBasePrimaryActive": "#9071FC",
|
|
245
|
-
"dtColorActionColorBackgroundBaseActive": "#1D0155",
|
|
246
|
-
"dtColorActionColorBackgroundBaseHover": "#9071FC",
|
|
247
|
-
"dtColorActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
248
|
-
"dtColorActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
249
|
-
"dtColorActionColorBackgroundCriticalPrimaryActive": "#D90A45",
|
|
250
|
-
"dtColorActionColorBackgroundCriticalActive": "#93173A",
|
|
251
|
-
"dtColorActionColorBackgroundMutedHover": "#E6E6E6",
|
|
252
|
-
"dtColorActionColorBackgroundMutedActive": "#E6E6E6",
|
|
253
|
-
"dtColorActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
254
|
-
"dtColorActionColorBackgroundPositiveActive": "#004F2E",
|
|
255
|
-
"dtColorThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
256
|
-
"dtColorThemeTopbarButtonColorBackgroundHover": "#E6E6E6",
|
|
257
|
-
"dtColorThemeSidebarRowColorBackgroundHover": "#E6E6E6",
|
|
258
|
-
"dtColorThemeSidebarRowColorBackgroundActive": "#E6E6E6",
|
|
259
|
-
"dtColorThemeSidebarSelectedRowColorBackground": "#E6E6E6",
|
|
260
|
-
"dtColorThemePresenceColorBackgroundAvailable": "#84EE0B",
|
|
261
|
-
"dtColorThemePresenceColorBackgroundBusyUnavailable": "#FF415B",
|
|
262
|
-
"dtColorThemePresenceColorBackgroundBusy": "#FFBD48",
|
|
263
|
-
"dtColorThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
264
241
|
"dtTypographyBodyMdFontFamily": "-apple-system, BlinkMacSystemFont, \"SF Pro\", \"Segoe UI Adjusted\", \"Segoe UI\", SFMono, \"Helvetica Neue\", Cantarell, Ubuntu, Roboto, Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\", -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",
|
|
265
242
|
"dtTypographyBodyMdFontWeight": "400",
|
|
266
243
|
"dtTypographyBodyMdLineHeight": "1.6",
|
|
@@ -478,7 +455,7 @@
|
|
|
478
455
|
"dtInputsFontWeightMd": "400",
|
|
479
456
|
"dtInputsFontWeightLg": "400",
|
|
480
457
|
"dtInputsFontWeightXl": "400",
|
|
481
|
-
"dtInputsColorForegroundDefault": "#
|
|
458
|
+
"dtInputsColorForegroundDefault": "#E6E6E6",
|
|
482
459
|
"dtInputsColorForegroundPlaceholder": "#B0B0B0",
|
|
483
460
|
"dtInputsColorForegroundDisabled": "#B0B0B0",
|
|
484
461
|
"dtInputsColorBorderDefault": "#ffffff",
|
|
@@ -514,17 +491,17 @@
|
|
|
514
491
|
"dtActionColorForegroundPositiveActive": "#DBFFA9",
|
|
515
492
|
"dtActionColorForegroundPositivePrimaryDefault": "#000000",
|
|
516
493
|
"dtActionColorBackgroundBaseDefault": "transparent",
|
|
517
|
-
"dtActionColorBackgroundBaseHover": "#
|
|
518
|
-
"dtActionColorBackgroundBaseActive": "#
|
|
519
|
-
"dtActionColorBackgroundBasePrimaryDefault": "#
|
|
520
|
-
"dtActionColorBackgroundBasePrimaryHover": "#
|
|
494
|
+
"dtActionColorBackgroundBaseHover": "#9071FC",
|
|
495
|
+
"dtActionColorBackgroundBaseActive": "#9071FC",
|
|
496
|
+
"dtActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
497
|
+
"dtActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
521
498
|
"dtActionColorBackgroundBasePrimaryActive": "#BBA6FC",
|
|
522
499
|
"dtActionColorBackgroundCriticalDefault": "transparent",
|
|
523
500
|
"dtActionColorBackgroundCriticalHover": "#93173A",
|
|
524
501
|
"dtActionColorBackgroundCriticalActive": "#93173A",
|
|
525
|
-
"dtActionColorBackgroundCriticalPrimaryDefault": "#
|
|
526
|
-
"dtActionColorBackgroundCriticalPrimaryHover": "#
|
|
527
|
-
"dtActionColorBackgroundCriticalPrimaryActive": "#
|
|
502
|
+
"dtActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
503
|
+
"dtActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
504
|
+
"dtActionColorBackgroundCriticalPrimaryActive": "#FF716F",
|
|
528
505
|
"dtActionColorBackgroundInvertedDefault": "transparent",
|
|
529
506
|
"dtActionColorBackgroundInvertedHover": "#000000",
|
|
530
507
|
"dtActionColorBackgroundInvertedActive": "#000000",
|
|
@@ -540,7 +517,7 @@
|
|
|
540
517
|
"dtActionColorBackgroundPositiveActive": "#004F2E",
|
|
541
518
|
"dtActionColorBackgroundPositivePrimaryDefault": "#AEFB3C",
|
|
542
519
|
"dtActionColorBackgroundPositivePrimaryHover": "#D1FF76",
|
|
543
|
-
"dtActionColorBackgroundPositivePrimaryActive": "#
|
|
520
|
+
"dtActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
544
521
|
"dtActionColorBorderBaseOutlinedDefault": "#BBA6FC",
|
|
545
522
|
"dtActionColorBorderCriticalOutlinedDefault": "#FF716F",
|
|
546
523
|
"dtActionColorBorderInvertedOutlinedDefault": "#000000",
|
|
@@ -552,7 +529,7 @@
|
|
|
552
529
|
"dtThemeTopbarFieldColorForeground": "#E6E6E6",
|
|
553
530
|
"dtThemeTopbarFieldColorForegroundHover": "#E6E6E6",
|
|
554
531
|
"dtThemeTopbarFieldColorBackground": "#E6E6E6",
|
|
555
|
-
"dtThemeTopbarFieldColorBackgroundHover": "#
|
|
532
|
+
"dtThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
556
533
|
"dtThemeTopbarFieldColorBorder": "#E6E6E6",
|
|
557
534
|
"dtThemeTopbarFieldColorBorderHover": "#E6E6E6",
|
|
558
535
|
"dtThemeTopbarFieldColorBorderActive": "#E6E6E6",
|
|
@@ -585,7 +562,7 @@
|
|
|
585
562
|
"dtThemeMentionColorForeground": "#000000",
|
|
586
563
|
"dtThemeMentionColorForegroundStrong": "#000000",
|
|
587
564
|
"dtThemeMentionColorBackground": "#BBA6FC",
|
|
588
|
-
"dtThemeMentionColorBackgroundStrong": "#
|
|
565
|
+
"dtThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
589
566
|
"dtShellBaseColorSurface": "#1F1F1F",
|
|
590
567
|
"dtShellBaseColorForeground": "#E6E6E6",
|
|
591
568
|
"dtShellBaseColorBorder": "#E6E6E6",
|
|
@@ -244,29 +244,6 @@
|
|
|
244
244
|
"dtColorChartSequential09Selected": "#F3F6FB",
|
|
245
245
|
"dtColorChartSequential10Hover": "#F3F6FB",
|
|
246
246
|
"dtColorChartSequential10Selected": "#F3F6FB",
|
|
247
|
-
"dtColorInputsColorForegroundDefault": "#E6E6E6",
|
|
248
|
-
"dtColorActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
249
|
-
"dtColorActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
250
|
-
"dtColorActionColorBackgroundBasePrimaryActive": "#9071FC",
|
|
251
|
-
"dtColorActionColorBackgroundBaseActive": "#1D0155",
|
|
252
|
-
"dtColorActionColorBackgroundBaseHover": "#9071FC",
|
|
253
|
-
"dtColorActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
254
|
-
"dtColorActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
255
|
-
"dtColorActionColorBackgroundCriticalPrimaryActive": "#D90A45",
|
|
256
|
-
"dtColorActionColorBackgroundCriticalActive": "#93173A",
|
|
257
|
-
"dtColorActionColorBackgroundMutedHover": "#E6E6E6",
|
|
258
|
-
"dtColorActionColorBackgroundMutedActive": "#E6E6E6",
|
|
259
|
-
"dtColorActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
260
|
-
"dtColorActionColorBackgroundPositiveActive": "#004F2E",
|
|
261
|
-
"dtColorThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
262
|
-
"dtColorThemeTopbarButtonColorBackgroundHover": "#E6E6E6",
|
|
263
|
-
"dtColorThemeSidebarRowColorBackgroundHover": "#E6E6E6",
|
|
264
|
-
"dtColorThemeSidebarRowColorBackgroundActive": "#E6E6E6",
|
|
265
|
-
"dtColorThemeSidebarSelectedRowColorBackground": "#E6E6E6",
|
|
266
|
-
"dtColorThemePresenceColorBackgroundAvailable": "#84EE0B",
|
|
267
|
-
"dtColorThemePresenceColorBackgroundBusyUnavailable": "#FF415B",
|
|
268
|
-
"dtColorThemePresenceColorBackgroundBusy": "#FFBD48",
|
|
269
|
-
"dtColorThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
270
247
|
"dtTypographyBodyMdFontFamily": "\"Season Mix\", -apple-system, BlinkMacSystemFont, \"SF Pro\", \"Segoe UI Adjusted\", \"Segoe UI\", SFMono, \"Helvetica Neue\", Cantarell, Ubuntu, Roboto, Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\", -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",
|
|
271
248
|
"dtTypographyBodyMdFontWeight": "400",
|
|
272
249
|
"dtTypographyBodyMdLineHeight": "1.6",
|
|
@@ -464,7 +441,7 @@
|
|
|
464
441
|
"dtInputsFontWeightMd": "400",
|
|
465
442
|
"dtInputsFontWeightLg": "400",
|
|
466
443
|
"dtInputsFontWeightXl": "400",
|
|
467
|
-
"dtInputsColorForegroundDefault": "#
|
|
444
|
+
"dtInputsColorForegroundDefault": "#E6E6E6",
|
|
468
445
|
"dtInputsColorForegroundPlaceholder": "#B0B0B0",
|
|
469
446
|
"dtInputsColorForegroundDisabled": "#B0B0B0",
|
|
470
447
|
"dtInputsColorBorderDefault": "#ffffff",
|
|
@@ -500,17 +477,17 @@
|
|
|
500
477
|
"dtActionColorForegroundPositiveActive": "#DBFFA9",
|
|
501
478
|
"dtActionColorForegroundPositivePrimaryDefault": "#000000",
|
|
502
479
|
"dtActionColorBackgroundBaseDefault": "transparent",
|
|
503
|
-
"dtActionColorBackgroundBaseHover": "#
|
|
504
|
-
"dtActionColorBackgroundBaseActive": "#
|
|
505
|
-
"dtActionColorBackgroundBasePrimaryDefault": "#
|
|
506
|
-
"dtActionColorBackgroundBasePrimaryHover": "#
|
|
480
|
+
"dtActionColorBackgroundBaseHover": "#9071FC",
|
|
481
|
+
"dtActionColorBackgroundBaseActive": "#9071FC",
|
|
482
|
+
"dtActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
483
|
+
"dtActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
507
484
|
"dtActionColorBackgroundBasePrimaryActive": "#BBA6FC",
|
|
508
485
|
"dtActionColorBackgroundCriticalDefault": "transparent",
|
|
509
486
|
"dtActionColorBackgroundCriticalHover": "#93173A",
|
|
510
487
|
"dtActionColorBackgroundCriticalActive": "#93173A",
|
|
511
|
-
"dtActionColorBackgroundCriticalPrimaryDefault": "#
|
|
512
|
-
"dtActionColorBackgroundCriticalPrimaryHover": "#
|
|
513
|
-
"dtActionColorBackgroundCriticalPrimaryActive": "#
|
|
488
|
+
"dtActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
489
|
+
"dtActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
490
|
+
"dtActionColorBackgroundCriticalPrimaryActive": "#FF716F",
|
|
514
491
|
"dtActionColorBackgroundInvertedDefault": "transparent",
|
|
515
492
|
"dtActionColorBackgroundInvertedHover": "#000000",
|
|
516
493
|
"dtActionColorBackgroundInvertedActive": "#000000",
|
|
@@ -526,7 +503,7 @@
|
|
|
526
503
|
"dtActionColorBackgroundPositiveActive": "#004F2E",
|
|
527
504
|
"dtActionColorBackgroundPositivePrimaryDefault": "#AEFB3C",
|
|
528
505
|
"dtActionColorBackgroundPositivePrimaryHover": "#D1FF76",
|
|
529
|
-
"dtActionColorBackgroundPositivePrimaryActive": "#
|
|
506
|
+
"dtActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
530
507
|
"dtActionColorBorderBaseOutlinedDefault": "#BBA6FC",
|
|
531
508
|
"dtActionColorBorderCriticalOutlinedDefault": "#FF716F",
|
|
532
509
|
"dtActionColorBorderInvertedOutlinedDefault": "#000000",
|
|
@@ -538,7 +515,7 @@
|
|
|
538
515
|
"dtThemeTopbarFieldColorForeground": "#E6E6E6",
|
|
539
516
|
"dtThemeTopbarFieldColorForegroundHover": "#E6E6E6",
|
|
540
517
|
"dtThemeTopbarFieldColorBackground": "#E6E6E6",
|
|
541
|
-
"dtThemeTopbarFieldColorBackgroundHover": "#
|
|
518
|
+
"dtThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
542
519
|
"dtThemeTopbarFieldColorBorder": "#E6E6E6",
|
|
543
520
|
"dtThemeTopbarFieldColorBorderHover": "#E6E6E6",
|
|
544
521
|
"dtThemeTopbarFieldColorBorderActive": "#E6E6E6",
|
|
@@ -571,7 +548,7 @@
|
|
|
571
548
|
"dtThemeMentionColorForeground": "#000000",
|
|
572
549
|
"dtThemeMentionColorForegroundStrong": "#000000",
|
|
573
550
|
"dtThemeMentionColorBackground": "#BBA6FC",
|
|
574
|
-
"dtThemeMentionColorBackgroundStrong": "#
|
|
551
|
+
"dtThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
575
552
|
"dtShellBaseColorSurface": "#1F1F1F",
|
|
576
553
|
"dtShellBaseColorForeground": "#E6E6E6",
|
|
577
554
|
"dtShellBaseColorBorder": "#E6E6E6",
|
|
@@ -244,29 +244,6 @@
|
|
|
244
244
|
"dtColorChartSequential09Selected": "#F3F6FB",
|
|
245
245
|
"dtColorChartSequential10Hover": "#F3F6FB",
|
|
246
246
|
"dtColorChartSequential10Selected": "#F3F6FB",
|
|
247
|
-
"dtColorInputsColorForegroundDefault": "#E6E6E6",
|
|
248
|
-
"dtColorActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
249
|
-
"dtColorActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
250
|
-
"dtColorActionColorBackgroundBasePrimaryActive": "#9071FC",
|
|
251
|
-
"dtColorActionColorBackgroundBaseActive": "#1D0155",
|
|
252
|
-
"dtColorActionColorBackgroundBaseHover": "#9071FC",
|
|
253
|
-
"dtColorActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
254
|
-
"dtColorActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
255
|
-
"dtColorActionColorBackgroundCriticalPrimaryActive": "#D90A45",
|
|
256
|
-
"dtColorActionColorBackgroundCriticalActive": "#93173A",
|
|
257
|
-
"dtColorActionColorBackgroundMutedHover": "#E6E6E6",
|
|
258
|
-
"dtColorActionColorBackgroundMutedActive": "#E6E6E6",
|
|
259
|
-
"dtColorActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
260
|
-
"dtColorActionColorBackgroundPositiveActive": "#004F2E",
|
|
261
|
-
"dtColorThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
262
|
-
"dtColorThemeTopbarButtonColorBackgroundHover": "#E6E6E6",
|
|
263
|
-
"dtColorThemeSidebarRowColorBackgroundHover": "#E6E6E6",
|
|
264
|
-
"dtColorThemeSidebarRowColorBackgroundActive": "#E6E6E6",
|
|
265
|
-
"dtColorThemeSidebarSelectedRowColorBackground": "#E6E6E6",
|
|
266
|
-
"dtColorThemePresenceColorBackgroundAvailable": "#84EE0B",
|
|
267
|
-
"dtColorThemePresenceColorBackgroundBusyUnavailable": "#FF415B",
|
|
268
|
-
"dtColorThemePresenceColorBackgroundBusy": "#FFBD48",
|
|
269
|
-
"dtColorThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
270
247
|
"dtTypographyBodyMdFontFamily": "\"Season Mix\", -apple-system, BlinkMacSystemFont, \"SF Pro\", \"Segoe UI Adjusted\", \"Segoe UI\", SFMono, \"Helvetica Neue\", Cantarell, Ubuntu, Roboto, Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\", -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",
|
|
271
248
|
"dtTypographyBodyMdFontWeight": "400",
|
|
272
249
|
"dtTypographyBodyMdLineHeight": "1.6",
|
|
@@ -464,7 +441,7 @@
|
|
|
464
441
|
"dtInputsFontWeightMd": "400",
|
|
465
442
|
"dtInputsFontWeightLg": "400",
|
|
466
443
|
"dtInputsFontWeightXl": "400",
|
|
467
|
-
"dtInputsColorForegroundDefault": "#
|
|
444
|
+
"dtInputsColorForegroundDefault": "#E6E6E6",
|
|
468
445
|
"dtInputsColorForegroundPlaceholder": "#B0B0B0",
|
|
469
446
|
"dtInputsColorForegroundDisabled": "#B0B0B0",
|
|
470
447
|
"dtInputsColorBorderDefault": "#ffffff",
|
|
@@ -500,17 +477,17 @@
|
|
|
500
477
|
"dtActionColorForegroundPositiveActive": "#DBFFA9",
|
|
501
478
|
"dtActionColorForegroundPositivePrimaryDefault": "#000000",
|
|
502
479
|
"dtActionColorBackgroundBaseDefault": "transparent",
|
|
503
|
-
"dtActionColorBackgroundBaseHover": "#
|
|
504
|
-
"dtActionColorBackgroundBaseActive": "#
|
|
505
|
-
"dtActionColorBackgroundBasePrimaryDefault": "#
|
|
506
|
-
"dtActionColorBackgroundBasePrimaryHover": "#
|
|
480
|
+
"dtActionColorBackgroundBaseHover": "#9071FC",
|
|
481
|
+
"dtActionColorBackgroundBaseActive": "#9071FC",
|
|
482
|
+
"dtActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
483
|
+
"dtActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
507
484
|
"dtActionColorBackgroundBasePrimaryActive": "#BBA6FC",
|
|
508
485
|
"dtActionColorBackgroundCriticalDefault": "transparent",
|
|
509
486
|
"dtActionColorBackgroundCriticalHover": "#93173A",
|
|
510
487
|
"dtActionColorBackgroundCriticalActive": "#93173A",
|
|
511
|
-
"dtActionColorBackgroundCriticalPrimaryDefault": "#
|
|
512
|
-
"dtActionColorBackgroundCriticalPrimaryHover": "#
|
|
513
|
-
"dtActionColorBackgroundCriticalPrimaryActive": "#
|
|
488
|
+
"dtActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
489
|
+
"dtActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
490
|
+
"dtActionColorBackgroundCriticalPrimaryActive": "#FF716F",
|
|
514
491
|
"dtActionColorBackgroundInvertedDefault": "transparent",
|
|
515
492
|
"dtActionColorBackgroundInvertedHover": "#000000",
|
|
516
493
|
"dtActionColorBackgroundInvertedActive": "#000000",
|
|
@@ -526,7 +503,7 @@
|
|
|
526
503
|
"dtActionColorBackgroundPositiveActive": "#004F2E",
|
|
527
504
|
"dtActionColorBackgroundPositivePrimaryDefault": "#AEFB3C",
|
|
528
505
|
"dtActionColorBackgroundPositivePrimaryHover": "#D1FF76",
|
|
529
|
-
"dtActionColorBackgroundPositivePrimaryActive": "#
|
|
506
|
+
"dtActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
530
507
|
"dtActionColorBorderBaseOutlinedDefault": "#BBA6FC",
|
|
531
508
|
"dtActionColorBorderCriticalOutlinedDefault": "#FF716F",
|
|
532
509
|
"dtActionColorBorderInvertedOutlinedDefault": "#000000",
|
|
@@ -538,7 +515,7 @@
|
|
|
538
515
|
"dtThemeTopbarFieldColorForeground": "#E6E6E6",
|
|
539
516
|
"dtThemeTopbarFieldColorForegroundHover": "#E6E6E6",
|
|
540
517
|
"dtThemeTopbarFieldColorBackground": "#E6E6E6",
|
|
541
|
-
"dtThemeTopbarFieldColorBackgroundHover": "#
|
|
518
|
+
"dtThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
542
519
|
"dtThemeTopbarFieldColorBorder": "#E6E6E6",
|
|
543
520
|
"dtThemeTopbarFieldColorBorderHover": "#E6E6E6",
|
|
544
521
|
"dtThemeTopbarFieldColorBorderActive": "#E6E6E6",
|
|
@@ -571,7 +548,7 @@
|
|
|
571
548
|
"dtThemeMentionColorForeground": "#000000",
|
|
572
549
|
"dtThemeMentionColorForegroundStrong": "#000000",
|
|
573
550
|
"dtThemeMentionColorBackground": "#BBA6FC",
|
|
574
|
-
"dtThemeMentionColorBackgroundStrong": "#
|
|
551
|
+
"dtThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
575
552
|
"dtShellBaseColorSurface": "#1F1F1F",
|
|
576
553
|
"dtShellBaseColorForeground": "#E6E6E6",
|
|
577
554
|
"dtShellBaseColorBorder": "#E6E6E6",
|
|
@@ -238,29 +238,6 @@
|
|
|
238
238
|
"dtColorChartSequential09Selected": "#F3F6FB",
|
|
239
239
|
"dtColorChartSequential10Hover": "#F3F6FB",
|
|
240
240
|
"dtColorChartSequential10Selected": "#F3F6FB",
|
|
241
|
-
"dtColorInputsColorForegroundDefault": "#E6E6E6",
|
|
242
|
-
"dtColorActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
243
|
-
"dtColorActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
244
|
-
"dtColorActionColorBackgroundBasePrimaryActive": "#9071FC",
|
|
245
|
-
"dtColorActionColorBackgroundBaseActive": "#1D0155",
|
|
246
|
-
"dtColorActionColorBackgroundBaseHover": "#9071FC",
|
|
247
|
-
"dtColorActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
248
|
-
"dtColorActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
249
|
-
"dtColorActionColorBackgroundCriticalPrimaryActive": "#D90A45",
|
|
250
|
-
"dtColorActionColorBackgroundCriticalActive": "#93173A",
|
|
251
|
-
"dtColorActionColorBackgroundMutedHover": "#E6E6E6",
|
|
252
|
-
"dtColorActionColorBackgroundMutedActive": "#E6E6E6",
|
|
253
|
-
"dtColorActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
254
|
-
"dtColorActionColorBackgroundPositiveActive": "#004F2E",
|
|
255
|
-
"dtColorThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
256
|
-
"dtColorThemeTopbarButtonColorBackgroundHover": "#E6E6E6",
|
|
257
|
-
"dtColorThemeSidebarRowColorBackgroundHover": "#E6E6E6",
|
|
258
|
-
"dtColorThemeSidebarRowColorBackgroundActive": "#E6E6E6",
|
|
259
|
-
"dtColorThemeSidebarSelectedRowColorBackground": "#E6E6E6",
|
|
260
|
-
"dtColorThemePresenceColorBackgroundAvailable": "#84EE0B",
|
|
261
|
-
"dtColorThemePresenceColorBackgroundBusyUnavailable": "#FF415B",
|
|
262
|
-
"dtColorThemePresenceColorBackgroundBusy": "#FFBD48",
|
|
263
|
-
"dtColorThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
264
241
|
"dtTypographyBodyMdFontFamily": "-apple-system, BlinkMacSystemFont, \"SF Pro\", \"Segoe UI Adjusted\", \"Segoe UI\", SFMono, \"Helvetica Neue\", Cantarell, Ubuntu, Roboto, Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\", -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",
|
|
265
242
|
"dtTypographyBodyMdFontWeight": "400",
|
|
266
243
|
"dtTypographyBodyMdLineHeight": "1.6",
|
|
@@ -478,7 +455,7 @@
|
|
|
478
455
|
"dtInputsFontWeightMd": "400",
|
|
479
456
|
"dtInputsFontWeightLg": "400",
|
|
480
457
|
"dtInputsFontWeightXl": "400",
|
|
481
|
-
"dtInputsColorForegroundDefault": "#
|
|
458
|
+
"dtInputsColorForegroundDefault": "#E6E6E6",
|
|
482
459
|
"dtInputsColorForegroundPlaceholder": "#B0B0B0",
|
|
483
460
|
"dtInputsColorForegroundDisabled": "#B0B0B0",
|
|
484
461
|
"dtInputsColorBorderDefault": "#ffffff",
|
|
@@ -514,17 +491,17 @@
|
|
|
514
491
|
"dtActionColorForegroundPositiveActive": "#DBFFA9",
|
|
515
492
|
"dtActionColorForegroundPositivePrimaryDefault": "#000000",
|
|
516
493
|
"dtActionColorBackgroundBaseDefault": "transparent",
|
|
517
|
-
"dtActionColorBackgroundBaseHover": "#
|
|
518
|
-
"dtActionColorBackgroundBaseActive": "#
|
|
519
|
-
"dtActionColorBackgroundBasePrimaryDefault": "#
|
|
520
|
-
"dtActionColorBackgroundBasePrimaryHover": "#
|
|
494
|
+
"dtActionColorBackgroundBaseHover": "#9071FC",
|
|
495
|
+
"dtActionColorBackgroundBaseActive": "#9071FC",
|
|
496
|
+
"dtActionColorBackgroundBasePrimaryDefault": "#BBA6FC",
|
|
497
|
+
"dtActionColorBackgroundBasePrimaryHover": "#D3BCFF",
|
|
521
498
|
"dtActionColorBackgroundBasePrimaryActive": "#BBA6FC",
|
|
522
499
|
"dtActionColorBackgroundCriticalDefault": "transparent",
|
|
523
500
|
"dtActionColorBackgroundCriticalHover": "#93173A",
|
|
524
501
|
"dtActionColorBackgroundCriticalActive": "#93173A",
|
|
525
|
-
"dtActionColorBackgroundCriticalPrimaryDefault": "#
|
|
526
|
-
"dtActionColorBackgroundCriticalPrimaryHover": "#
|
|
527
|
-
"dtActionColorBackgroundCriticalPrimaryActive": "#
|
|
502
|
+
"dtActionColorBackgroundCriticalPrimaryDefault": "#FF716F",
|
|
503
|
+
"dtActionColorBackgroundCriticalPrimaryHover": "#FFABA4",
|
|
504
|
+
"dtActionColorBackgroundCriticalPrimaryActive": "#FF716F",
|
|
528
505
|
"dtActionColorBackgroundInvertedDefault": "transparent",
|
|
529
506
|
"dtActionColorBackgroundInvertedHover": "#000000",
|
|
530
507
|
"dtActionColorBackgroundInvertedActive": "#000000",
|
|
@@ -540,7 +517,7 @@
|
|
|
540
517
|
"dtActionColorBackgroundPositiveActive": "#004F2E",
|
|
541
518
|
"dtActionColorBackgroundPositivePrimaryDefault": "#AEFB3C",
|
|
542
519
|
"dtActionColorBackgroundPositivePrimaryHover": "#D1FF76",
|
|
543
|
-
"dtActionColorBackgroundPositivePrimaryActive": "#
|
|
520
|
+
"dtActionColorBackgroundPositivePrimaryActive": "#AEFB3C",
|
|
544
521
|
"dtActionColorBorderBaseOutlinedDefault": "#BBA6FC",
|
|
545
522
|
"dtActionColorBorderCriticalOutlinedDefault": "#FF716F",
|
|
546
523
|
"dtActionColorBorderInvertedOutlinedDefault": "#000000",
|
|
@@ -552,7 +529,7 @@
|
|
|
552
529
|
"dtThemeTopbarFieldColorForeground": "#E6E6E6",
|
|
553
530
|
"dtThemeTopbarFieldColorForegroundHover": "#E6E6E6",
|
|
554
531
|
"dtThemeTopbarFieldColorBackground": "#E6E6E6",
|
|
555
|
-
"dtThemeTopbarFieldColorBackgroundHover": "#
|
|
532
|
+
"dtThemeTopbarFieldColorBackgroundHover": "#1F1F1F",
|
|
556
533
|
"dtThemeTopbarFieldColorBorder": "#E6E6E6",
|
|
557
534
|
"dtThemeTopbarFieldColorBorderHover": "#E6E6E6",
|
|
558
535
|
"dtThemeTopbarFieldColorBorderActive": "#E6E6E6",
|
|
@@ -585,7 +562,7 @@
|
|
|
585
562
|
"dtThemeMentionColorForeground": "#000000",
|
|
586
563
|
"dtThemeMentionColorForegroundStrong": "#000000",
|
|
587
564
|
"dtThemeMentionColorBackground": "#BBA6FC",
|
|
588
|
-
"dtThemeMentionColorBackgroundStrong": "#
|
|
565
|
+
"dtThemeMentionColorBackgroundStrong": "#F5F0FF",
|
|
589
566
|
"dtShellBaseColorSurface": "#1F1F1F",
|
|
590
567
|
"dtShellBaseColorForeground": "#E6E6E6",
|
|
591
568
|
"dtShellBaseColorBorder": "#E6E6E6",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("regex-combined-emojis"),y=require("emoji-toolkit/emoji_strategy.json"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("regex-combined-emojis"),y=require("emoji-toolkit/emoji_strategy.json"),d=new RegExp(C.emojiPattern,"g"),f="8.0",u="https://cdn.jsdelivr.net/joypixels/assets/"+f+"/png/unicode/32/";exports.customEmojiAssetUrl=null;exports.emojiImageUrlSmall=u;exports.emojiFileExtensionSmall=".png";exports.emojiImageUrlLarge=u;exports.emojiFileExtensionLarge=".png";const m=y,j=new RegExp("(^| |(?<=:))(:\\w+:)","g");function g(){return m}function A(e,t=".png"){e.endsWith("/")||(e=e+"/"),exports.emojiImageUrlSmall=e,exports.emojiFileExtensionSmall=t}function x(e,t=".svg"){e.endsWith("/")||(e=e+"/"),exports.emojiImageUrlLarge=e,exports.emojiFileExtensionLarge=t}function P(e){exports.customEmojiAssetUrl=e}function T(e){E(e)}function E(e){const t=["custom","date_added","image"],o=["date_added","image","unicode_output","shortname","shortname_alternates","custom","name"],n=(s,i,r)=>{if(s[i]===void 0){if(!t.includes(i))return;s[i]=r}else Array.isArray(s[i])?s[i]=s[i].concat(r):s[i]=r};Object.entries(e).forEach(s=>{const[i,r]=s;if(i in m){const l=m[i];for(const c in r){const U=r[c];n(l,c,U)}}else o.every(c=>r[c]!==void 0)?m[i]=r:console.error("The following custom emoji doesn't contain the required properties:",r)})}function a(e){function t(n,s){if(!(!n||typeof n!="object")){if("shortname"in n&&(n.shortname===e||n.shortname_alternates.includes(e)))return n.key=s,o=n,!0;Object.keys(n).some(function(i){return t(n[i],i)})}}let o;return t(g(),null),o}function h(e){let t="";for(const o of e){const n=o.codePointAt(0).toString(16).padStart(4,"0");["200d","fe0f"].includes(n)||(t!==""&&(t=t+"-"),t=t+n)}return t}function p(e){const t=e.split("-");let o="";return t.forEach(n=>{o=o+String.fromCodePoint(parseInt(n,16))}),o}function v(e){if(e=e==null?void 0:e.trim(),e.startsWith(":")&&e.endsWith(":"))return a(e);{const t=h(e),o=m[t];return o&&(o.key=t),o}}function R(e){const t=(e.match(j)||[]).map(o=>o.trim());return S(t)}function S(e){const t=e?e.filter(o=>a(o)):[];return new Set(t)}function _(e){const t=[...e.matchAll(d)],o=t.length?t.map(n=>n[0]):[];return new Set(o)}exports.codeToEmojiData=v;exports.defaultEmojiAssetUrl=u;exports.emojiJson=m;exports.emojiRegex=d;exports.emojiShortCodeRegex=j;exports.emojiVersion=f;exports.filterValidShortCodes=S;exports.findEmojis=_;exports.findShortCodes=R;exports.getEmojiData=g;exports.setCustomEmojiJson=T;exports.setCustomEmojiUrl=P;exports.setEmojiAssetUrlLarge=x;exports.setEmojiAssetUrlSmall=A;exports.shortcodeToEmojiData=a;exports.stringToUnicode=p;exports.unicodeToString=h;exports.validateCustomEmojiJson=E;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../common/emoji/index.js"],"sourcesContent":["import { emojiPattern } from 'regex-combined-emojis';\nimport emojiJsonLocal from 'emoji-toolkit/emoji_strategy.json' with { type: 'json' };\n\nexport const emojiRegex = new RegExp(emojiPattern, 'g');\nexport const emojiVersion = '8.0';\nexport const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';\nexport let customEmojiAssetUrl = null;\n\n// Used for emoji 16px and smaller\nexport let emojiImageUrlSmall = defaultEmojiAssetUrl;\nexport let emojiFileExtensionSmall = '.png';\n\n// Used for emoji larger than 16px\nexport let emojiImageUrlLarge = defaultEmojiAssetUrl;\nexport let emojiFileExtensionLarge = '.png';\n\nexport const emojiJson = emojiJsonLocal;\n\nexport const emojiShortCodeRegex = /(^| |(?<=:))(:\\w+:)/g;\n\nexport function getEmojiData () {\n return emojiJson;\n}\n\nexport function setEmojiAssetUrlSmall (url, fileExtension = '.png') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlSmall = url;\n emojiFileExtensionSmall = fileExtension;\n}\n\nexport function setEmojiAssetUrlLarge (url, fileExtension = '.svg') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlLarge = url;\n emojiFileExtensionLarge = fileExtension;\n}\n\nexport function setCustomEmojiUrl (url) {\n customEmojiAssetUrl = url;\n}\n\nexport function setCustomEmojiJson (json) {\n validateCustomEmojiJson(json);\n}\n\n/**\n * Validate custom emoji json\n */\nexport function validateCustomEmojiJson (json) {\n const customEmojiProps = ['extension', 'custom'];\n const customEmojiRequiredProps = [\n 'date_added',\n 'image',\n 'name',\n ];\n\n /**\n * Update single emoji properties.\n * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.\n * If not exists, will add the property to the emojiData object.\n */\n const _updateNativeEmojiData = (emojiData, propName, propValue) => {\n if (emojiData[propName] === undefined) {\n if (!customEmojiProps.includes(propName)) {\n return;\n }\n\n // new property to add\n emojiData[propName] = propValue;\n } else {\n if (Array.isArray(emojiData[propName])) {\n emojiData[propName] = emojiData[propName].concat(propValue);\n } else {\n emojiData[propName] = propValue;\n }\n }\n };\n\n Object.entries(json).forEach((item) => {\n const [customEmojiKey, customEmojiValue] = item;\n\n if (customEmojiKey in emojiJson) {\n // custom emoji exists in emoji json which means to update some data in the native emoji\n const emojiData = emojiJson[customEmojiKey];\n\n for (const customEmojiPropertyName in customEmojiValue) {\n const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];\n\n _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);\n }\n } else {\n // new custom emoji\n const _validateRequiredProps = () =>\n customEmojiRequiredProps.every((val) => {\n return customEmojiValue[val] !== undefined;\n });\n\n if (_validateRequiredProps()) {\n emojiJson[customEmojiKey] = customEmojiValue;\n } else {\n console.error(\n 'The following custom emoji doesn\\'t contain the required properties:',\n customEmojiValue,\n );\n }\n }\n });\n}\n\n// recursively searches the emoji data object containing data for all emojis\n// and returns the object with the specified shortcode.\nexport function shortcodeToEmojiData (shortcode) {\n // eslint-disable-next-line complexity\n function f (o, key) {\n if (!o || typeof o !== 'object') {\n return;\n }\n if ('shortname' in o) {\n if (o.shortname === shortcode || o.shortname_alternates.includes(shortcode)) {\n o.key = key;\n reference = o;\n return true;\n }\n }\n Object.keys(o).some(function (k) {\n return f(o[k], k);\n });\n }\n\n let reference;\n f(getEmojiData(), null);\n return reference;\n}\n\n// Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects\n// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender\n// and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these\n// are not included as part of the key in the emoji.json.\n//\n// Example:\n// return value for smile emoji (no skin tone): 1f600\n// return value for left facing fist (light skin tone): 1f91b-1f3fb\nexport function unicodeToString (emoji) {\n let key = '';\n for (const codePoint of emoji) {\n const codepoint = codePoint.codePointAt(0).toString(16).padStart(4, '0');\n\n // skip 200d and fe0f as these are not included in emoji_strategy.json keys\n if (['200d', 'fe0f'].includes(codepoint)) continue;\n if (key !== '') { key = key + '-'; }\n key = key + codepoint;\n }\n return key;\n}\n\n// Takes in unicode in string form ex: '1f91b-1f3fb' and converts it to an actual unicode character.\nexport function stringToUnicode (str) {\n const uChars = str.split('-');\n let result = '';\n uChars.forEach((uChar) => {\n result = result + String.fromCodePoint(parseInt(uChar, 16));\n });\n return result;\n}\n\n// Takes in a code (which could be unicode or shortcode) and returns the emoji data for it.\nexport function codeToEmojiData (code) {\n code = code?.trim();\n if (code.startsWith(':') && code.endsWith(':')) {\n return shortcodeToEmojiData(code);\n } else {\n const unicodeString = unicodeToString(code);\n const result = emojiJson[unicodeString];\n if (result) result.key = unicodeString;\n return result;\n }\n}\n\n// Finds every shortcode in slot text\n// filters only the existing codes in emojiJson\n// removes duplicates.\n// @returns {string[]}\nexport function findShortCodes (textContent) {\n const shortcodes = (\n textContent.match(emojiShortCodeRegex) || []\n ).map(code => code.trim());\n return filterValidShortCodes(shortcodes);\n}\n\nexport function filterValidShortCodes (shortcodes) {\n const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];\n return new Set(filtered);\n}\n\n// Finds every emoji in slot text\n// removes duplicates\n// @returns {string[]}\nexport function findEmojis (textContent) {\n const matches = [...textContent.matchAll(emojiRegex)];\n const emojis = matches.length ? matches.map(match => match[0]) : [];\n return new Set(emojis);\n}\n"],"names":["emojiRegex","emojiPattern","emojiVersion","defaultEmojiAssetUrl","customEmojiAssetUrl","emojiImageUrlSmall","emojiFileExtensionSmall","emojiImageUrlLarge","emojiFileExtensionLarge","emojiJson","emojiJsonLocal","emojiShortCodeRegex","getEmojiData","setEmojiAssetUrlSmall","url","fileExtension","setEmojiAssetUrlLarge","setCustomEmojiUrl","setCustomEmojiJson","json","validateCustomEmojiJson","customEmojiProps","customEmojiRequiredProps","_updateNativeEmojiData","emojiData","propName","propValue","item","customEmojiKey","customEmojiValue","customEmojiPropertyName","customEmojiPropertyValue","val","shortcodeToEmojiData","shortcode","f","o","key","reference","k","unicodeToString","emoji","codePoint","codepoint","stringToUnicode","str","uChars","result","uChar","codeToEmojiData","code","unicodeString","findShortCodes","textContent","shortcodes","filterValidShortCodes","filtered","findEmojis","matches","emojis","match"],"mappings":"wKAGaA,EAAa,IAAI,OAAOC,EAAAA,aAAc,GAAG,EACzCC,EAAe,MACfC,EAAuB,6CAA+CD,EAAe,mBACvFE,QAAAA,oBAAsB,KAGtBC,QAAAA,mBAAqBF,EACrBG,QAAAA,wBAA0B,OAG1BC,QAAAA,mBAAqBJ,EACrBK,QAAAA,wBAA0B,OAEzB,MAACC,EAAYC,EAEZC,EAAsB,WAAA,uBAAA,GAAA,EAE5B,SAASC,GAAgB,CAC9B,OAAOH,CACT,CAEO,SAASI,EAAuBC,EAAKC,EAAgB,OAAQ,CAC7DD,EAAI,SAAS,GAAG,IACnBA,EAAMA,EAAM,KAEdT,QAAAA,mBAAqBS,EACrBR,QAAAA,wBAA0BS,CAC5B,CAEO,SAASC,EAAuBF,EAAKC,EAAgB,OAAQ,CAC7DD,EAAI,SAAS,GAAG,IACnBA,EAAMA,EAAM,KAEdP,QAAAA,mBAAqBO,EACrBN,QAAAA,wBAA0BO,CAC5B,CAEO,SAASE,EAAmBH,EAAK,CACtCV,QAAAA,oBAAsBU,CACxB,CAEO,SAASI,EAAoBC,EAAM,CACxCC,EAAwBD,CAAI,CAC9B,CAKO,SAASC,EAAyBD,EAAM,CAC7C,MAAME,EAAmB,CAAC,YAAa,QAAQ,EACzCC,EAA2B,CAC/B,aACA,QACA,MACJ,EAOQC,EAAyB,CAACC,EAAWC,EAAUC,IAAc,CACjE,GAAIF,EAAUC,CAAQ,IAAM,OAAW,CACrC,GAAI,CAACJ,EAAiB,SAASI,CAAQ,EACrC,OAIFD,EAAUC,CAAQ,EAAIC,CACxB,MACM,MAAM,QAAQF,EAAUC,CAAQ,CAAC,EACnCD,EAAUC,CAAQ,EAAID,EAAUC,CAAQ,EAAE,OAAOC,CAAS,EAE1DF,EAAUC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AO,cAAc,SAASC,EAAO,EAAE,CAAC,CAC5D,CAAC,EACMD,CACT,CAGO,SAASE,EAAiBC,EAAM,CAErC,GADAA,EAAOA,GAAA,YAAAA,EAAM,OACTA,EAAK,WAAW,GAAG,GAAKA,EAAK,SAAS,GAAG,EAC3C,OAAOjB,EAAqBiB,CAAI,EAC3B,CACL,MAAMC,EAAgBX,EAAgBU,CAAI,EACpCH,EAAStC,EAAU0C,CAAa,EACtC,OAAIJ,IAAQA,EAAO,IAAMI,GAClBJ,CACT,CACF,CAMO,SAASK,EAAgBC,EAAa,CAC3C,MAAMC,GACJD,EAAY,MAAM1C,CAAmB,GAAK,CAAA,GAC1C,IAAIuC,GAAQA,EAAK,MAAM,EACzB,OAAOK,EAAsBD,CAAU,CACzC,CAEO,SAASC,EAAuBD,EAAY,CACjD,MAAME,EAAWF,EAAaA,EAAW,OAAOJ,GAAQjB,EAAqBiB,CAAI,CAAC,EAAI,CAAA,EACtF,OAAO,IAAI,IAAIM,CAAQ,CACzB,CAKO,SAASC,EAAYJ,EAAa,CACvC,MAAMK,EAAU,CAAC,GAAGL,EAAY,SAASrD,CAAU,CAAC,EAC9C2D,EAASD,EAAQ,OAASA,EAAQ,IAAIE,GAASA,EAAM,CAAC,CAAC,EAAI,CAAA,EACjE,OAAO,IAAI,IAAID,CAAM,CACvB"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../common/emoji/index.js"],"sourcesContent":["import { emojiPattern } from 'regex-combined-emojis';\nimport emojiJsonLocal from 'emoji-toolkit/emoji_strategy.json' with { type: 'json' };\n\nexport const emojiRegex = new RegExp(emojiPattern, 'g');\nexport const emojiVersion = '8.0';\nexport const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';\nexport let customEmojiAssetUrl = null;\n\n// Used for emoji 16px and smaller\nexport let emojiImageUrlSmall = defaultEmojiAssetUrl;\nexport let emojiFileExtensionSmall = '.png';\n\n// Used for emoji larger than 16px\nexport let emojiImageUrlLarge = defaultEmojiAssetUrl;\nexport let emojiFileExtensionLarge = '.png';\n\nexport const emojiJson = emojiJsonLocal;\n\nexport const emojiShortCodeRegex = /(^| |(?<=:))(:\\w+:)/g;\n\nexport function getEmojiData () {\n return emojiJson;\n}\n\nexport function setEmojiAssetUrlSmall (url, fileExtension = '.png') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlSmall = url;\n emojiFileExtensionSmall = fileExtension;\n}\n\nexport function setEmojiAssetUrlLarge (url, fileExtension = '.svg') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlLarge = url;\n emojiFileExtensionLarge = fileExtension;\n}\n\nexport function setCustomEmojiUrl (url) {\n customEmojiAssetUrl = url;\n}\n\nexport function setCustomEmojiJson (json) {\n validateCustomEmojiJson(json);\n}\n\n/**\n * Validate custom emoji json\n */\nexport function validateCustomEmojiJson (json) {\n const customEmojiProps = [\n 'custom',\n 'date_added',\n 'image',\n ];\n const customEmojiRequiredProps = [\n 'date_added',\n 'image',\n 'unicode_output',\n 'shortname',\n 'shortname_alternates',\n 'custom',\n 'name',\n ];\n\n /**\n * Update single emoji properties.\n * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.\n * If not exists, will add the property to the emojiData object.\n */\n const _updateNativeEmojiData = (emojiData, propName, propValue) => {\n if (emojiData[propName] === undefined) {\n if (!customEmojiProps.includes(propName)) {\n return;\n }\n\n // new property to add\n emojiData[propName] = propValue;\n } else {\n if (Array.isArray(emojiData[propName])) {\n emojiData[propName] = emojiData[propName].concat(propValue);\n } else {\n emojiData[propName] = propValue;\n }\n }\n };\n\n Object.entries(json).forEach((item) => {\n const [customEmojiKey, customEmojiValue] = item;\n\n if (customEmojiKey in emojiJson) {\n // custom emoji exists in emoji json which means to update some data in the native emoji\n const emojiData = emojiJson[customEmojiKey];\n\n for (const customEmojiPropertyName in customEmojiValue) {\n const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];\n\n _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);\n }\n } else {\n // new custom emoji\n const _validateRequiredProps = () =>\n customEmojiRequiredProps.every((val) => {\n return customEmojiValue[val] !== undefined;\n });\n\n if (_validateRequiredProps()) {\n emojiJson[customEmojiKey] = customEmojiValue;\n } else {\n console.error(\n 'The following custom emoji doesn\\'t contain the required properties:',\n customEmojiValue,\n );\n }\n }\n });\n}\n\n// recursively searches the emoji data object containing data for all emojis\n// and returns the object with the specified shortcode.\nexport function shortcodeToEmojiData (shortcode) {\n // eslint-disable-next-line complexity\n function f (o, key) {\n if (!o || typeof o !== 'object') {\n return;\n }\n if ('shortname' in o) {\n if (o.shortname === shortcode || o.shortname_alternates.includes(shortcode)) {\n o.key = key;\n reference = o;\n return true;\n }\n }\n Object.keys(o).some(function (k) {\n return f(o[k], k);\n });\n }\n\n let reference;\n f(getEmojiData(), null);\n return reference;\n}\n\n// Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects\n// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender\n// and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these\n// are not included as part of the key in the emoji.json.\n//\n// Example:\n// return value for smile emoji (no skin tone): 1f600\n// return value for left facing fist (light skin tone): 1f91b-1f3fb\nexport function unicodeToString (emoji) {\n let key = '';\n for (const codePoint of emoji) {\n const codepoint = codePoint.codePointAt(0).toString(16).padStart(4, '0');\n\n // skip 200d and fe0f as these are not included in emoji_strategy.json keys\n if (['200d', 'fe0f'].includes(codepoint)) continue;\n if (key !== '') { key = key + '-'; }\n key = key + codepoint;\n }\n return key;\n}\n\n// Takes in unicode in string form ex: '1f91b-1f3fb' and converts it to an actual unicode character.\nexport function stringToUnicode (str) {\n const uChars = str.split('-');\n let result = '';\n uChars.forEach((uChar) => {\n result = result + String.fromCodePoint(parseInt(uChar, 16));\n });\n return result;\n}\n\n// Takes in a code (which could be unicode or shortcode) and returns the emoji data for it.\nexport function codeToEmojiData (code) {\n code = code?.trim();\n if (code.startsWith(':') && code.endsWith(':')) {\n return shortcodeToEmojiData(code);\n } else {\n const unicodeString = unicodeToString(code);\n const result = emojiJson[unicodeString];\n if (result) result.key = unicodeString;\n return result;\n }\n}\n\n// Finds every shortcode in slot text\n// filters only the existing codes in emojiJson\n// removes duplicates.\n// @returns {string[]}\nexport function findShortCodes (textContent) {\n const shortcodes = (\n textContent.match(emojiShortCodeRegex) || []\n ).map(code => code.trim());\n return filterValidShortCodes(shortcodes);\n}\n\nexport function filterValidShortCodes (shortcodes) {\n const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];\n return new Set(filtered);\n}\n\n// Finds every emoji in slot text\n// removes duplicates\n// @returns {string[]}\nexport function findEmojis (textContent) {\n const matches = [...textContent.matchAll(emojiRegex)];\n const emojis = matches.length ? matches.map(match => match[0]) : [];\n return new Set(emojis);\n}\n"],"names":["emojiRegex","emojiPattern","emojiVersion","defaultEmojiAssetUrl","customEmojiAssetUrl","emojiImageUrlSmall","emojiFileExtensionSmall","emojiImageUrlLarge","emojiFileExtensionLarge","emojiJson","emojiJsonLocal","emojiShortCodeRegex","getEmojiData","setEmojiAssetUrlSmall","url","fileExtension","setEmojiAssetUrlLarge","setCustomEmojiUrl","setCustomEmojiJson","json","validateCustomEmojiJson","customEmojiProps","customEmojiRequiredProps","_updateNativeEmojiData","emojiData","propName","propValue","item","customEmojiKey","customEmojiValue","customEmojiPropertyName","customEmojiPropertyValue","val","shortcodeToEmojiData","shortcode","f","o","key","reference","k","unicodeToString","emoji","codePoint","codepoint","stringToUnicode","str","uChars","result","uChar","codeToEmojiData","code","unicodeString","findShortCodes","textContent","shortcodes","filterValidShortCodes","filtered","findEmojis","matches","emojis","match"],"mappings":"wKAGaA,EAAa,IAAI,OAAOC,EAAAA,aAAc,GAAG,EACzCC,EAAe,MACfC,EAAuB,6CAA+CD,EAAe,mBACvFE,QAAAA,oBAAsB,KAGtBC,QAAAA,mBAAqB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AAU0C,CAAa,EACtC,OAAIJ,IAAQA,EAAO,IAAMI,GAClBJ,CACT,CACF,CAMO,SAASK,EAAgBC,EAAa,CAC3C,MAAMC,GACJD,EAAY,MAAM1C,CAAmB,GAAK,CAAA,GAC1C,IAAIuC,GAAQA,EAAK,MAAM,EACzB,OAAOK,EAAsBD,CAAU,CACzC,CAEO,SAASC,EAAuBD,EAAY,CACjD,MAAME,EAAWF,EAAaA,EAAW,OAAOJ,GAAQjB,EAAqBiB,CAAI,CAAC,EAAI,CAAA,EACtF,OAAO,IAAI,IAAIM,CAAQ,CACzB,CAKO,SAASC,EAAYJ,EAAa,CACvC,MAAMK,EAAU,CAAC,GAAGL,EAAY,SAASrD,CAAU,CAAC,EAC9C2D,EAASD,EAAQ,OAASA,EAAQ,IAAIE,GAASA,EAAM,CAAC,CAAC,EAAI,CAAA,EACjE,OAAO,IAAI,IAAID,CAAM,CACvB"}
|
|
@@ -2,26 +2,34 @@ import { emojiPattern as d } from "regex-combined-emojis";
|
|
|
2
2
|
import j from "emoji-toolkit/emoji_strategy.json";
|
|
3
3
|
const g = new RegExp(d, "g"), E = "8.0", f = "https://cdn.jsdelivr.net/joypixels/assets/" + E + "/png/unicode/32/";
|
|
4
4
|
let h = null, S = f, y = ".png", p = f, P = ".png";
|
|
5
|
-
const c = j,
|
|
6
|
-
function
|
|
5
|
+
const c = j, A = new RegExp("(^| |(?<=:))(:\\w+:)", "g");
|
|
6
|
+
function C() {
|
|
7
7
|
return c;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function w(t, e = ".png") {
|
|
10
10
|
t.endsWith("/") || (t = t + "/"), S = t, y = e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function T(t, e = ".svg") {
|
|
13
13
|
t.endsWith("/") || (t = t + "/"), p = t, P = e;
|
|
14
14
|
}
|
|
15
15
|
function q(t) {
|
|
16
16
|
h = t;
|
|
17
17
|
}
|
|
18
18
|
function J(t) {
|
|
19
|
-
|
|
19
|
+
U(t);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const e = [
|
|
21
|
+
function U(t) {
|
|
22
|
+
const e = [
|
|
23
|
+
"custom",
|
|
24
|
+
"date_added",
|
|
25
|
+
"image"
|
|
26
|
+
], n = [
|
|
23
27
|
"date_added",
|
|
24
28
|
"image",
|
|
29
|
+
"unicode_output",
|
|
30
|
+
"shortname",
|
|
31
|
+
"shortname_alternates",
|
|
32
|
+
"custom",
|
|
25
33
|
"name"
|
|
26
34
|
], o = (s, i, r) => {
|
|
27
35
|
if (s[i] === void 0) {
|
|
@@ -57,9 +65,9 @@ function l(t) {
|
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
let n;
|
|
60
|
-
return e(
|
|
68
|
+
return e(C(), null), n;
|
|
61
69
|
}
|
|
62
|
-
function
|
|
70
|
+
function _(t) {
|
|
63
71
|
let e = "";
|
|
64
72
|
for (const n of t) {
|
|
65
73
|
const o = n.codePointAt(0).toString(16).padStart(4, "0");
|
|
@@ -78,12 +86,12 @@ function W(t) {
|
|
|
78
86
|
if (t = t == null ? void 0 : t.trim(), t.startsWith(":") && t.endsWith(":"))
|
|
79
87
|
return l(t);
|
|
80
88
|
{
|
|
81
|
-
const e =
|
|
89
|
+
const e = _(t), n = c[e];
|
|
82
90
|
return n && (n.key = e), n;
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
93
|
function b(t) {
|
|
86
|
-
const e = (t.match(
|
|
94
|
+
const e = (t.match(A) || []).map((n) => n.trim());
|
|
87
95
|
return v(e);
|
|
88
96
|
}
|
|
89
97
|
function v(t) {
|
|
@@ -104,19 +112,19 @@ export {
|
|
|
104
112
|
S as emojiImageUrlSmall,
|
|
105
113
|
c as emojiJson,
|
|
106
114
|
g as emojiRegex,
|
|
107
|
-
|
|
115
|
+
A as emojiShortCodeRegex,
|
|
108
116
|
E as emojiVersion,
|
|
109
117
|
v as filterValidShortCodes,
|
|
110
118
|
k as findEmojis,
|
|
111
119
|
b as findShortCodes,
|
|
112
|
-
|
|
120
|
+
C as getEmojiData,
|
|
113
121
|
J as setCustomEmojiJson,
|
|
114
122
|
q as setCustomEmojiUrl,
|
|
115
|
-
|
|
116
|
-
|
|
123
|
+
T as setEmojiAssetUrlLarge,
|
|
124
|
+
w as setEmojiAssetUrlSmall,
|
|
117
125
|
l as shortcodeToEmojiData,
|
|
118
126
|
L as stringToUnicode,
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
_ as unicodeToString,
|
|
128
|
+
U as validateCustomEmojiJson
|
|
121
129
|
};
|
|
122
130
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../common/emoji/index.js"],"sourcesContent":["import { emojiPattern } from 'regex-combined-emojis';\nimport emojiJsonLocal from 'emoji-toolkit/emoji_strategy.json' with { type: 'json' };\n\nexport const emojiRegex = new RegExp(emojiPattern, 'g');\nexport const emojiVersion = '8.0';\nexport const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';\nexport let customEmojiAssetUrl = null;\n\n// Used for emoji 16px and smaller\nexport let emojiImageUrlSmall = defaultEmojiAssetUrl;\nexport let emojiFileExtensionSmall = '.png';\n\n// Used for emoji larger than 16px\nexport let emojiImageUrlLarge = defaultEmojiAssetUrl;\nexport let emojiFileExtensionLarge = '.png';\n\nexport const emojiJson = emojiJsonLocal;\n\nexport const emojiShortCodeRegex = /(^| |(?<=:))(:\\w+:)/g;\n\nexport function getEmojiData () {\n return emojiJson;\n}\n\nexport function setEmojiAssetUrlSmall (url, fileExtension = '.png') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlSmall = url;\n emojiFileExtensionSmall = fileExtension;\n}\n\nexport function setEmojiAssetUrlLarge (url, fileExtension = '.svg') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlLarge = url;\n emojiFileExtensionLarge = fileExtension;\n}\n\nexport function setCustomEmojiUrl (url) {\n customEmojiAssetUrl = url;\n}\n\nexport function setCustomEmojiJson (json) {\n validateCustomEmojiJson(json);\n}\n\n/**\n * Validate custom emoji json\n */\nexport function validateCustomEmojiJson (json) {\n const customEmojiProps = ['extension', 'custom'];\n const customEmojiRequiredProps = [\n 'date_added',\n 'image',\n 'name',\n ];\n\n /**\n * Update single emoji properties.\n * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.\n * If not exists, will add the property to the emojiData object.\n */\n const _updateNativeEmojiData = (emojiData, propName, propValue) => {\n if (emojiData[propName] === undefined) {\n if (!customEmojiProps.includes(propName)) {\n return;\n }\n\n // new property to add\n emojiData[propName] = propValue;\n } else {\n if (Array.isArray(emojiData[propName])) {\n emojiData[propName] = emojiData[propName].concat(propValue);\n } else {\n emojiData[propName] = propValue;\n }\n }\n };\n\n Object.entries(json).forEach((item) => {\n const [customEmojiKey, customEmojiValue] = item;\n\n if (customEmojiKey in emojiJson) {\n // custom emoji exists in emoji json which means to update some data in the native emoji\n const emojiData = emojiJson[customEmojiKey];\n\n for (const customEmojiPropertyName in customEmojiValue) {\n const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];\n\n _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);\n }\n } else {\n // new custom emoji\n const _validateRequiredProps = () =>\n customEmojiRequiredProps.every((val) => {\n return customEmojiValue[val] !== undefined;\n });\n\n if (_validateRequiredProps()) {\n emojiJson[customEmojiKey] = customEmojiValue;\n } else {\n console.error(\n 'The following custom emoji doesn\\'t contain the required properties:',\n customEmojiValue,\n );\n }\n }\n });\n}\n\n// recursively searches the emoji data object containing data for all emojis\n// and returns the object with the specified shortcode.\nexport function shortcodeToEmojiData (shortcode) {\n // eslint-disable-next-line complexity\n function f (o, key) {\n if (!o || typeof o !== 'object') {\n return;\n }\n if ('shortname' in o) {\n if (o.shortname === shortcode || o.shortname_alternates.includes(shortcode)) {\n o.key = key;\n reference = o;\n return true;\n }\n }\n Object.keys(o).some(function (k) {\n return f(o[k], k);\n });\n }\n\n let reference;\n f(getEmojiData(), null);\n return reference;\n}\n\n// Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects\n// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender\n// and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these\n// are not included as part of the key in the emoji.json.\n//\n// Example:\n// return value for smile emoji (no skin tone): 1f600\n// return value for left facing fist (light skin tone): 1f91b-1f3fb\nexport function unicodeToString (emoji) {\n let key = '';\n for (const codePoint of emoji) {\n const codepoint = codePoint.codePointAt(0).toString(16).padStart(4, '0');\n\n // skip 200d and fe0f as these are not included in emoji_strategy.json keys\n if (['200d', 'fe0f'].includes(codepoint)) continue;\n if (key !== '') { key = key + '-'; }\n key = key + codepoint;\n }\n return key;\n}\n\n// Takes in unicode in string form ex: '1f91b-1f3fb' and converts it to an actual unicode character.\nexport function stringToUnicode (str) {\n const uChars = str.split('-');\n let result = '';\n uChars.forEach((uChar) => {\n result = result + String.fromCodePoint(parseInt(uChar, 16));\n });\n return result;\n}\n\n// Takes in a code (which could be unicode or shortcode) and returns the emoji data for it.\nexport function codeToEmojiData (code) {\n code = code?.trim();\n if (code.startsWith(':') && code.endsWith(':')) {\n return shortcodeToEmojiData(code);\n } else {\n const unicodeString = unicodeToString(code);\n const result = emojiJson[unicodeString];\n if (result) result.key = unicodeString;\n return result;\n }\n}\n\n// Finds every shortcode in slot text\n// filters only the existing codes in emojiJson\n// removes duplicates.\n// @returns {string[]}\nexport function findShortCodes (textContent) {\n const shortcodes = (\n textContent.match(emojiShortCodeRegex) || []\n ).map(code => code.trim());\n return filterValidShortCodes(shortcodes);\n}\n\nexport function filterValidShortCodes (shortcodes) {\n const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];\n return new Set(filtered);\n}\n\n// Finds every emoji in slot text\n// removes duplicates\n// @returns {string[]}\nexport function findEmojis (textContent) {\n const matches = [...textContent.matchAll(emojiRegex)];\n const emojis = matches.length ? matches.map(match => match[0]) : [];\n return new Set(emojis);\n}\n"],"names":["emojiRegex","emojiPattern","emojiVersion","defaultEmojiAssetUrl","customEmojiAssetUrl","emojiImageUrlSmall","emojiFileExtensionSmall","emojiImageUrlLarge","emojiFileExtensionLarge","emojiJson","emojiJsonLocal","emojiShortCodeRegex","getEmojiData","setEmojiAssetUrlSmall","url","fileExtension","setEmojiAssetUrlLarge","setCustomEmojiUrl","setCustomEmojiJson","json","validateCustomEmojiJson","customEmojiProps","customEmojiRequiredProps","_updateNativeEmojiData","emojiData","propName","propValue","item","customEmojiKey","customEmojiValue","customEmojiPropertyName","customEmojiPropertyValue","val","shortcodeToEmojiData","shortcode","f","key","reference","k","unicodeToString","emoji","codePoint","codepoint","stringToUnicode","str","uChars","result","uChar","codeToEmojiData","code","unicodeString","findShortCodes","textContent","shortcodes","filterValidShortCodes","filtered","findEmojis","matches","emojis","match"],"mappings":";;AAGY,MAACA,IAAa,IAAI,OAAOC,GAAc,GAAG,GACzCC,IAAe,OACfC,IAAuB,+CAA+CD,IAAe;AACxF,IAACE,IAAsB,MAGtBC,IAAqBF,GACrBG,IAA0B,QAG1BC,IAAqBJ,GACrBK,IAA0B;AAEzB,MAACC,IAAYC,GAEZC,IAAsB,WAAA,wBAAA,GAAA;AAE5B,SAASC,IAAgB;AAC9B,SAAOH;AACT;AAEO,SAASI,EAAuBC,GAAKC,IAAgB,QAAQ;AAClE,EAAKD,EAAI,SAAS,GAAG,MACnBA,IAAMA,IAAM,MAEdT,IAAqBS,GACrBR,IAA0BS;AAC5B;AAEO,SAASC,EAAuBF,GAAKC,IAAgB,QAAQ;AAClE,EAAKD,EAAI,SAAS,GAAG,MACnBA,IAAMA,IAAM,MAEdP,IAAqBO,GACrBN,IAA0BO;AAC5B;AAEO,SAASE,EAAmBH,GAAK;AACtC,EAAAV,IAAsBU;AACxB;AAEO,SAASI,EAAoBC,GAAM;AACxC,EAAAC,EAAwBD,CAAI;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,EAAY,SAASpD,CAAU,CAAC,GAC9C0D,IAASD,EAAQ,SAASA,EAAQ,IAAI,CAAAE,MAASA,EAAM,CAAC,CAAC,IAAI,CAAA;AACjE,SAAO,IAAI,IAAID,CAAM;AACvB;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../common/emoji/index.js"],"sourcesContent":["import { emojiPattern } from 'regex-combined-emojis';\nimport emojiJsonLocal from 'emoji-toolkit/emoji_strategy.json' with { type: 'json' };\n\nexport const emojiRegex = new RegExp(emojiPattern, 'g');\nexport const emojiVersion = '8.0';\nexport const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';\nexport let customEmojiAssetUrl = null;\n\n// Used for emoji 16px and smaller\nexport let emojiImageUrlSmall = defaultEmojiAssetUrl;\nexport let emojiFileExtensionSmall = '.png';\n\n// Used for emoji larger than 16px\nexport let emojiImageUrlLarge = defaultEmojiAssetUrl;\nexport let emojiFileExtensionLarge = '.png';\n\nexport const emojiJson = emojiJsonLocal;\n\nexport const emojiShortCodeRegex = /(^| |(?<=:))(:\\w+:)/g;\n\nexport function getEmojiData () {\n return emojiJson;\n}\n\nexport function setEmojiAssetUrlSmall (url, fileExtension = '.png') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlSmall = url;\n emojiFileExtensionSmall = fileExtension;\n}\n\nexport function setEmojiAssetUrlLarge (url, fileExtension = '.svg') {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n emojiImageUrlLarge = url;\n emojiFileExtensionLarge = fileExtension;\n}\n\nexport function setCustomEmojiUrl (url) {\n customEmojiAssetUrl = url;\n}\n\nexport function setCustomEmojiJson (json) {\n validateCustomEmojiJson(json);\n}\n\n/**\n * Validate custom emoji json\n */\nexport function validateCustomEmojiJson (json) {\n const customEmojiProps = [\n 'custom',\n 'date_added',\n 'image',\n ];\n const customEmojiRequiredProps = [\n 'date_added',\n 'image',\n 'unicode_output',\n 'shortname',\n 'shortname_alternates',\n 'custom',\n 'name',\n ];\n\n /**\n * Update single emoji properties.\n * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.\n * If not exists, will add the property to the emojiData object.\n */\n const _updateNativeEmojiData = (emojiData, propName, propValue) => {\n if (emojiData[propName] === undefined) {\n if (!customEmojiProps.includes(propName)) {\n return;\n }\n\n // new property to add\n emojiData[propName] = propValue;\n } else {\n if (Array.isArray(emojiData[propName])) {\n emojiData[propName] = emojiData[propName].concat(propValue);\n } else {\n emojiData[propName] = propValue;\n }\n }\n };\n\n Object.entries(json).forEach((item) => {\n const [customEmojiKey, customEmojiValue] = item;\n\n if (customEmojiKey in emojiJson) {\n // custom emoji exists in emoji json which means to update some data in the native emoji\n const emojiData = emojiJson[customEmojiKey];\n\n for (const customEmojiPropertyName in customEmojiValue) {\n const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];\n\n _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);\n }\n } else {\n // new custom emoji\n const _validateRequiredProps = () =>\n customEmojiRequiredProps.every((val) => {\n return customEmojiValue[val] !== undefined;\n });\n\n if (_validateRequiredProps()) {\n emojiJson[customEmojiKey] = customEmojiValue;\n } else {\n console.error(\n 'The following custom emoji doesn\\'t contain the required properties:',\n customEmojiValue,\n );\n }\n }\n });\n}\n\n// recursively searches the emoji data object containing data for all emojis\n// and returns the object with the specified shortcode.\nexport function shortcodeToEmojiData (shortcode) {\n // eslint-disable-next-line complexity\n function f (o, key) {\n if (!o || typeof o !== 'object') {\n return;\n }\n if ('shortname' in o) {\n if (o.shortname === shortcode || o.shortname_alternates.includes(shortcode)) {\n o.key = key;\n reference = o;\n return true;\n }\n }\n Object.keys(o).some(function (k) {\n return f(o[k], k);\n });\n }\n\n let reference;\n f(getEmojiData(), null);\n return reference;\n}\n\n// Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects\n// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender\n// and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these\n// are not included as part of the key in the emoji.json.\n//\n// Example:\n// return value for smile emoji (no skin tone): 1f600\n// return value for left facing fist (light skin tone): 1f91b-1f3fb\nexport function unicodeToString (emoji) {\n let key = '';\n for (const codePoint of emoji) {\n const codepoint = codePoint.codePointAt(0).toString(16).padStart(4, '0');\n\n // skip 200d and fe0f as these are not included in emoji_strategy.json keys\n if (['200d', 'fe0f'].includes(codepoint)) continue;\n if (key !== '') { key = key + '-'; }\n key = key + codepoint;\n }\n return key;\n}\n\n// Takes in unicode in string form ex: '1f91b-1f3fb' and converts it to an actual unicode character.\nexport function stringToUnicode (str) {\n const uChars = str.split('-');\n let result = '';\n uChars.forEach((uChar) => {\n result = result + String.fromCodePoint(parseInt(uChar, 16));\n });\n return result;\n}\n\n// Takes in a code (which could be unicode or shortcode) and returns the emoji data for it.\nexport function codeToEmojiData (code) {\n code = code?.trim();\n if (code.startsWith(':') && code.endsWith(':')) {\n return shortcodeToEmojiData(code);\n } else {\n const unicodeString = unicodeToString(code);\n const result = emojiJson[unicodeString];\n if (result) result.key = unicodeString;\n return result;\n }\n}\n\n// Finds every shortcode in slot text\n// filters only the existing codes in emojiJson\n// removes duplicates.\n// @returns {string[]}\nexport function findShortCodes (textContent) {\n const shortcodes = (\n textContent.match(emojiShortCodeRegex) || []\n ).map(code => code.trim());\n return filterValidShortCodes(shortcodes);\n}\n\nexport function filterValidShortCodes (shortcodes) {\n const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];\n return new Set(filtered);\n}\n\n// Finds every emoji in slot text\n// removes duplicates\n// @returns {string[]}\nexport function findEmojis (textContent) {\n const matches = [...textContent.matchAll(emojiRegex)];\n const emojis = matches.length ? matches.map(match => match[0]) : [];\n return new Set(emojis);\n}\n"],"names":["emojiRegex","emojiPattern","emojiVersion","defaultEmojiAssetUrl","customEmojiAssetUrl","emojiImageUrlSmall","emojiFileExtensionSmall","emojiImageUrlLarge","emojiFileExtensionLarge","emojiJson","emojiJsonLocal","emojiShortCodeRegex","getEmojiData","setEmojiAssetUrlSmall","url","fileExtension","setEmojiAssetUrlLarge","setCustomEmojiUrl","setCustomEmojiJson","json","validateCustomEmojiJson","customEmojiProps","customEmojiRequiredProps","_updateNativeEmojiData","emojiData","propName","propValue","item","customEmojiKey","customEmojiValue","customEmojiPropertyName","customEmojiPropertyValue","val","shortcodeToEmojiData","shortcode","f","key","reference","k","unicodeToString","emoji","codePoint","codepoint","stringToUnicode","str","uChars","result","uChar","codeToEmojiData","code","unicodeString","findShortCodes","textContent","shortcodes","filterValidShortCodes","filtered","findEmojis","matches","emojis","match"],"mappings":";;AAGY,MAACA,IAAa,IAAI,OAAOC,GAAc,GAAG,GACzCC,IAAe,OACfC,IAAuB,+CAA+CD,IAAe;AACxF,IAACE,IAAsB,MAGtBC,IAAqBF,GACrBG,IAA0B,QAG1BC,IAAqBJ,GACrBK,IAA0B;AAEzB,MAACC,IAAYC,GAEZC,IAAsB,WAAA,wBAAA,GAAA;AAE5B,SAASC,IAAgB;AAC9B,SAAOH;AACT;AAEO,SAASI,EAAuBC,GAAKC,IAAgB,QAAQ;AAClE,EAAKD,EAAI,SAAS,GAAG,MACnBA,IAAMA,IAAM,MAEdT,IAAqBS,GACrBR,IAA0BS;AAC5B;AAEO,SAASC,EAAuBF,GAAKC,IAAgB,QAAQ;AAClE,EAAKD,EAAI,SAAS,GAAG,MACnBA,IAAMA,IAAM,MAEdP,IAAqBO,GACrBN,IAA0BO;AAC5B;AAEO,SAASE,EAAmBH,GAAK;AACtC,EAAAV,IAAsBU;AACxB;AAEO,SAASI,EAAoBC,GAAM;AACxC,EAAAC,EAAwBD,CAAI;AAC9B;AAKO,SAASC,EAAyBD,GAAM;AAC7C,QAAME,IAAmB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,EACJ,GACQC,IAA2B;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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