@designbasekorea/ui-wc 0.5.3 → 0.5.6

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.
Files changed (156) hide show
  1. package/dist/chunks/lottie-e273b936.js +17032 -0
  2. package/dist/esm/components/animation-background/canvas-controller.js +121 -1
  3. package/dist/esm/components/animation-background/controls.js +180 -1
  4. package/dist/esm/components/animation-background/graphite-controller.js +196 -1
  5. package/dist/esm/components/animation-background/graphite-presets.js +42 -1
  6. package/dist/esm/components/animation-background/graphite-shader.js +111 -1
  7. package/dist/esm/components/animation-background/layers.js +369 -1
  8. package/dist/esm/components/animation-background/lumina-presets.js +53 -1
  9. package/dist/esm/components/animation-background/lumina-shaders.js +181 -1
  10. package/dist/esm/components/animation-background/lumina-utils.js +60 -1
  11. package/dist/esm/components/animation-background/particle-defaults.js +36 -1
  12. package/dist/esm/components/animation-background/renderers.js +167 -1
  13. package/dist/esm/components/animation-background/shader-controller.js +154 -1
  14. package/dist/esm/components/color-picker-utils.js +134 -1
  15. package/dist/esm/components/date-picker-utils.js +140 -1
  16. package/dist/esm/components/db-accordion.js +304 -1
  17. package/dist/esm/components/db-ad-banner.js +455 -1
  18. package/dist/esm/components/db-alert.js +149 -1
  19. package/dist/esm/components/db-animation-background.js +486 -1
  20. package/dist/esm/components/db-animation-text.js +601 -1
  21. package/dist/esm/components/db-app-badge.js +88 -1
  22. package/dist/esm/components/db-audio-player.js +752 -1
  23. package/dist/esm/components/db-avatar.js +188 -1
  24. package/dist/esm/components/db-backdrop.js +139 -1
  25. package/dist/esm/components/db-badge.js +91 -1
  26. package/dist/esm/components/db-banner.js +188 -1
  27. package/dist/esm/components/db-bottom-navigation.js +146 -1
  28. package/dist/esm/components/db-bottom-sheet.js +481 -1
  29. package/dist/esm/components/db-breadcrumbs.js +329 -1
  30. package/dist/esm/components/db-button.js +316 -1
  31. package/dist/esm/components/db-calendar.js +675 -1
  32. package/dist/esm/components/db-card.js +265 -1
  33. package/dist/esm/components/db-carousel.js +264 -1
  34. package/dist/esm/components/db-checkbox.js +202 -1
  35. package/dist/esm/components/db-chip.js +104 -1
  36. package/dist/esm/components/db-code-block.js +304 -1
  37. package/dist/esm/components/db-color-picker.js +746 -1
  38. package/dist/esm/components/db-confirm.js +191 -1
  39. package/dist/esm/components/db-container.js +39 -1
  40. package/dist/esm/components/db-context-menu.js +265 -1
  41. package/dist/esm/components/db-countdown.js +146 -1
  42. package/dist/esm/components/db-cursor-follower.js +173 -1
  43. package/dist/esm/components/db-date-picker.js +837 -1
  44. package/dist/esm/components/db-divider.js +66 -1
  45. package/dist/esm/components/db-drawer.js +245 -1
  46. package/dist/esm/components/db-dropdown.js +493 -1
  47. package/dist/esm/components/db-dropzone.js +266 -1
  48. package/dist/esm/components/db-empty-state.js +97 -1
  49. package/dist/esm/components/db-file-uploader.js +256 -1
  50. package/dist/esm/components/db-floating-action-button.js +139 -1
  51. package/dist/esm/components/db-footer.js +385 -1
  52. package/dist/esm/components/db-form.js +566 -1
  53. package/dist/esm/components/db-gantt.js +882 -1
  54. package/dist/esm/components/db-gradient.js +133 -1
  55. package/dist/esm/components/db-grid-background.js +909 -1
  56. package/dist/esm/components/db-grid.js +73 -1
  57. package/dist/esm/components/db-icons.js +82 -1
  58. package/dist/esm/components/db-image-list.js +214 -1
  59. package/dist/esm/components/db-image-placeholder.js +96 -1
  60. package/dist/esm/components/db-image.js +289 -1
  61. package/dist/esm/components/db-indicator.js +517 -1
  62. package/dist/esm/components/db-input.js +420 -1
  63. package/dist/esm/components/db-kanban.js +538 -1
  64. package/dist/esm/components/db-label.js +66 -1
  65. package/dist/esm/components/db-lightbox.js +372 -1
  66. package/dist/esm/components/db-list.js +340 -1
  67. package/dist/esm/components/db-logo-svg.js +72 -1
  68. package/dist/esm/components/db-logo.js +106 -1
  69. package/dist/esm/components/db-lottie.js +109 -1
  70. package/dist/esm/components/db-markdown-editor.js +458 -1
  71. package/dist/esm/components/db-marquee.js +402 -1
  72. package/dist/esm/components/db-masonry.js +94 -1
  73. package/dist/esm/components/db-menu-item.js +211 -1
  74. package/dist/esm/components/db-modal.js +522 -1
  75. package/dist/esm/components/db-navbar.js +680 -1
  76. package/dist/esm/components/db-onboarding-modal.js +322 -1
  77. package/dist/esm/components/db-page-header.js +312 -1
  78. package/dist/esm/components/db-pagination.js +271 -1
  79. package/dist/esm/components/db-popover.js +580 -1
  80. package/dist/esm/components/db-progress-step.js +166 -1
  81. package/dist/esm/components/db-progress.js +171 -1
  82. package/dist/esm/components/db-progressbar.js +72 -1
  83. package/dist/esm/components/db-radio.js +172 -1
  84. package/dist/esm/components/db-random-gradient.js +121 -1
  85. package/dist/esm/components/db-range-slider.js +811 -1
  86. package/dist/esm/components/db-rating.js +325 -1
  87. package/dist/esm/components/db-reorder.js +286 -1
  88. package/dist/esm/components/db-resizable-panels.js +282 -1
  89. package/dist/esm/components/db-scroll-area.js +126 -1
  90. package/dist/esm/components/db-search-bar.js +668 -1
  91. package/dist/esm/components/db-section-app-download.js +101 -1
  92. package/dist/esm/components/db-section-contact.js +102 -1
  93. package/dist/esm/components/db-section-cta.js +150 -1
  94. package/dist/esm/components/db-section-faq.js +120 -1
  95. package/dist/esm/components/db-section-feature-grid.js +137 -1
  96. package/dist/esm/components/db-section-feature.js +179 -1
  97. package/dist/esm/components/db-section-hero.js +243 -1
  98. package/dist/esm/components/db-section-logo-cloud.js +138 -1
  99. package/dist/esm/components/db-section-pricing.js +166 -1
  100. package/dist/esm/components/db-section-stats.js +129 -1
  101. package/dist/esm/components/db-section-testimonials.js +252 -1
  102. package/dist/esm/components/db-section.js +385 -1
  103. package/dist/esm/components/db-segment-control.js +231 -1
  104. package/dist/esm/components/db-select.js +571 -1
  105. package/dist/esm/components/db-share-icons.js +40 -1
  106. package/dist/esm/components/db-share.js +489 -1
  107. package/dist/esm/components/db-sidebar.js +1068 -1
  108. package/dist/esm/components/db-skeleton.js +94 -1
  109. package/dist/esm/components/db-spinner.js +102 -1
  110. package/dist/esm/components/db-split-view.js +297 -1
  111. package/dist/esm/components/db-stack.js +46 -1
  112. package/dist/esm/components/db-stat.js +218 -1
  113. package/dist/esm/components/db-stepper.js +398 -1
  114. package/dist/esm/components/db-table.js +412 -1
  115. package/dist/esm/components/db-tabs.js +335 -1
  116. package/dist/esm/components/db-testimonial.js +162 -1
  117. package/dist/esm/components/db-textarea.js +233 -1
  118. package/dist/esm/components/db-time-picker.js +523 -1
  119. package/dist/esm/components/db-timeline.js +174 -1
  120. package/dist/esm/components/db-toast.js +158 -1
  121. package/dist/esm/components/db-toggle.js +162 -1
  122. package/dist/esm/components/db-toolbar.js +94 -1
  123. package/dist/esm/components/db-tooltip.js +440 -1
  124. package/dist/esm/components/db-top-banner.js +121 -1
  125. package/dist/esm/components/db-tutorial.js +324 -1
  126. package/dist/esm/components/db-video-player.js +503 -1
  127. package/dist/esm/components/db-youtube-player.js +194 -1
  128. package/dist/esm/components/highlight-code.js +65 -1
  129. package/dist/esm/components/input-validation.js +50 -1
  130. package/dist/esm/components/marketing-block-host-utils.js +9 -1
  131. package/dist/esm/components/number-scrub.js +117 -1
  132. package/dist/esm/components/random-gradient-palettes.js +67 -1
  133. package/dist/esm/components/section-block-header-utils.js +48 -1
  134. package/dist/esm/helpers/confirm.js +52 -1
  135. package/dist/esm/helpers/toast.js +73 -1
  136. package/dist/esm/index.js +111 -1
  137. package/dist/esm/node_modules/prismjs/components/prism-bash.js +235 -1
  138. package/dist/esm/node_modules/prismjs/components/prism-clike.js +31 -1
  139. package/dist/esm/node_modules/prismjs/components/prism-css.js +64 -1
  140. package/dist/esm/node_modules/prismjs/components/prism-javascript.js +172 -1
  141. package/dist/esm/node_modules/prismjs/components/prism-json.js +27 -1
  142. package/dist/esm/node_modules/prismjs/components/prism-jsx.js +143 -1
  143. package/dist/esm/node_modules/prismjs/components/prism-markup.js +186 -1
  144. package/dist/esm/node_modules/prismjs/components/prism-scss.js +81 -1
  145. package/dist/esm/node_modules/prismjs/components/prism-tsx.js +15 -1
  146. package/dist/esm/node_modules/prismjs/components/prism-typescript.js +60 -1
  147. package/dist/index.cjs +55414 -1
  148. package/dist/index.css +1 -1
  149. package/dist/index.esm.js +38284 -1
  150. package/dist/react/chunks/lottie-72a4c6d4.js +17032 -0
  151. package/dist/react/index.cjs +56503 -1
  152. package/dist/react/index.d.ts +1 -1
  153. package/dist/react/index.esm.js +39373 -1
  154. package/package.json +1 -1
  155. package/dist/chunks/lottie-2d1f6278.js +0 -1
  156. package/dist/react/chunks/lottie-14e7addb.js +0 -1
@@ -1 +1,172 @@
1
- Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript;
1
+ Prism.languages.javascript = Prism.languages.extend('clike', {
2
+ 'class-name': [
3
+ Prism.languages.clike['class-name'],
4
+ {
5
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
6
+ lookbehind: true
7
+ }
8
+ ],
9
+ 'keyword': [
10
+ {
11
+ pattern: /((?:^|\})\s*)catch\b/,
12
+ lookbehind: true
13
+ },
14
+ {
15
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
16
+ lookbehind: true
17
+ },
18
+ ],
19
+ // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
20
+ 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
21
+ 'number': {
22
+ pattern: RegExp(
23
+ /(^|[^\w$])/.source +
24
+ '(?:' +
25
+ (
26
+ // constant
27
+ /NaN|Infinity/.source +
28
+ '|' +
29
+ // binary integer
30
+ /0[bB][01]+(?:_[01]+)*n?/.source +
31
+ '|' +
32
+ // octal integer
33
+ /0[oO][0-7]+(?:_[0-7]+)*n?/.source +
34
+ '|' +
35
+ // hexadecimal integer
36
+ /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +
37
+ '|' +
38
+ // decimal bigint
39
+ /\d+(?:_\d+)*n/.source +
40
+ '|' +
41
+ // decimal number (integer or float) but no bigint
42
+ /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source
43
+ ) +
44
+ ')' +
45
+ /(?![\w$])/.source
46
+ ),
47
+ lookbehind: true
48
+ },
49
+ 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
50
+ });
51
+
52
+ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
53
+
54
+ Prism.languages.insertBefore('javascript', 'keyword', {
55
+ 'regex': {
56
+ pattern: RegExp(
57
+ // lookbehind
58
+ // eslint-disable-next-line regexp/no-dupe-characters-character-class
59
+ /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source +
60
+ // Regex pattern:
61
+ // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
62
+ // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
63
+ // with the only syntax, so we have to define 2 different regex patterns.
64
+ /\//.source +
65
+ '(?:' +
66
+ /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source +
67
+ '|' +
68
+ // `v` flag syntax. This supports 3 levels of nested character classes.
69
+ /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source +
70
+ ')' +
71
+ // lookahead
72
+ /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
73
+ ),
74
+ lookbehind: true,
75
+ greedy: true,
76
+ inside: {
77
+ 'regex-source': {
78
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
79
+ lookbehind: true,
80
+ alias: 'language-regex',
81
+ inside: Prism.languages.regex
82
+ },
83
+ 'regex-delimiter': /^\/|\/$/,
84
+ 'regex-flags': /^[a-z]+$/,
85
+ }
86
+ },
87
+ // This must be declared before keyword because we use "function" inside the look-forward
88
+ 'function-variable': {
89
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
90
+ alias: 'function'
91
+ },
92
+ 'parameter': [
93
+ {
94
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
95
+ lookbehind: true,
96
+ inside: Prism.languages.javascript
97
+ },
98
+ {
99
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
100
+ lookbehind: true,
101
+ inside: Prism.languages.javascript
102
+ },
103
+ {
104
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
105
+ lookbehind: true,
106
+ inside: Prism.languages.javascript
107
+ },
108
+ {
109
+ pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
110
+ lookbehind: true,
111
+ inside: Prism.languages.javascript
112
+ }
113
+ ],
114
+ 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/
115
+ });
116
+
117
+ Prism.languages.insertBefore('javascript', 'string', {
118
+ 'hashbang': {
119
+ pattern: /^#!.*/,
120
+ greedy: true,
121
+ alias: 'comment'
122
+ },
123
+ 'template-string': {
124
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
125
+ greedy: true,
126
+ inside: {
127
+ 'template-punctuation': {
128
+ pattern: /^`|`$/,
129
+ alias: 'string'
130
+ },
131
+ 'interpolation': {
132
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
133
+ lookbehind: true,
134
+ inside: {
135
+ 'interpolation-punctuation': {
136
+ pattern: /^\$\{|\}$/,
137
+ alias: 'punctuation'
138
+ },
139
+ rest: Prism.languages.javascript
140
+ }
141
+ },
142
+ 'string': /[\s\S]+/
143
+ }
144
+ },
145
+ 'string-property': {
146
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
147
+ lookbehind: true,
148
+ greedy: true,
149
+ alias: 'property'
150
+ }
151
+ });
152
+
153
+ Prism.languages.insertBefore('javascript', 'operator', {
154
+ 'literal-property': {
155
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
156
+ lookbehind: true,
157
+ alias: 'property'
158
+ },
159
+ });
160
+
161
+ if (Prism.languages.markup) {
162
+ Prism.languages.markup.tag.addInlined('script', 'javascript');
163
+
164
+ // add attribute support for all DOM events.
165
+ // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
166
+ Prism.languages.markup.tag.addAttribute(
167
+ /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
168
+ 'javascript'
169
+ );
170
+ }
171
+
172
+ Prism.languages.js = Prism.languages.javascript;
@@ -1 +1,27 @@
1
- Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;
1
+ // https://www.json.org/json-en.html
2
+ Prism.languages.json = {
3
+ 'property': {
4
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
5
+ lookbehind: true,
6
+ greedy: true
7
+ },
8
+ 'string': {
9
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
10
+ lookbehind: true,
11
+ greedy: true
12
+ },
13
+ 'comment': {
14
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
15
+ greedy: true
16
+ },
17
+ 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
18
+ 'punctuation': /[{}[\],]/,
19
+ 'operator': /:/,
20
+ 'boolean': /\b(?:false|true)\b/,
21
+ 'null': {
22
+ pattern: /\bnull\b/,
23
+ alias: 'keyword'
24
+ }
25
+ };
26
+
27
+ Prism.languages.webmanifest = Prism.languages.json;
@@ -1 +1,143 @@
1
- !function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function re(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return s}),RegExp(e,t)}s=re(s).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=re(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:re(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:re(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var stringifyToken=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(stringifyToken).join(""):""},walkTokens=function(t){for(var n=[],a=0;a<t.length;a++){var s=t[a],g=!1;if("string"!=typeof s&&("tag"===s.type&&s.content[0]&&"tag"===s.content[0].type?"</"===s.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===stringifyToken(s.content[0].content[1])&&n.pop():"/>"===s.content[s.content.length-1].content||n.push({tagName:stringifyToken(s.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===s.type&&"{"===s.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===s.type&&"}"===s.content?n[n.length-1].openedBraces--:g=!0),(g||"string"==typeof s)&&n.length>0&&0===n[n.length-1].openedBraces){var r=stringifyToken(s);a<t.length-1&&("string"==typeof t[a+1]||"plain-text"===t[a+1].type)&&(r+=stringifyToken(t[a+1]),t.splice(a+1,1)),a>0&&("string"==typeof t[a-1]||"plain-text"===t[a-1].type)&&(r=stringifyToken(t[a-1])+r,t.splice(a-1,1),a--),t[a]=new e.Token("plain-text",r,null,r)}s.content&&"string"!=typeof s.content&&walkTokens(s.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||walkTokens(e.tokens)})}(Prism);
1
+ (function (Prism) {
2
+
3
+ var javascript = Prism.util.clone(Prism.languages.javascript);
4
+
5
+ var space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source;
6
+ var braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;
7
+ var spread = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
8
+
9
+ /**
10
+ * @param {string} source
11
+ * @param {string} [flags]
12
+ */
13
+ function re(source, flags) {
14
+ source = source
15
+ .replace(/<S>/g, function () { return space; })
16
+ .replace(/<BRACES>/g, function () { return braces; })
17
+ .replace(/<SPREAD>/g, function () { return spread; });
18
+ return RegExp(source, flags);
19
+ }
20
+
21
+ spread = re(spread).source;
22
+
23
+
24
+ Prism.languages.jsx = Prism.languages.extend('markup', javascript);
25
+ Prism.languages.jsx.tag.pattern = re(
26
+ /<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
27
+ );
28
+
29
+ Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/;
30
+ Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/;
31
+ Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/;
32
+ Prism.languages.jsx.tag.inside['comment'] = javascript['comment'];
33
+
34
+ Prism.languages.insertBefore('inside', 'attr-name', {
35
+ 'spread': {
36
+ pattern: re(/<SPREAD>/.source),
37
+ inside: Prism.languages.jsx
38
+ }
39
+ }, Prism.languages.jsx.tag);
40
+
41
+ Prism.languages.insertBefore('inside', 'special-attr', {
42
+ 'script': {
43
+ // Allow for two levels of nesting
44
+ pattern: re(/=<BRACES>/.source),
45
+ alias: 'language-javascript',
46
+ inside: {
47
+ 'script-punctuation': {
48
+ pattern: /^=(?=\{)/,
49
+ alias: 'punctuation'
50
+ },
51
+ rest: Prism.languages.jsx
52
+ },
53
+ }
54
+ }, Prism.languages.jsx.tag);
55
+
56
+ // The following will handle plain text inside tags
57
+ var stringifyToken = function (token) {
58
+ if (!token) {
59
+ return '';
60
+ }
61
+ if (typeof token === 'string') {
62
+ return token;
63
+ }
64
+ if (typeof token.content === 'string') {
65
+ return token.content;
66
+ }
67
+ return token.content.map(stringifyToken).join('');
68
+ };
69
+
70
+ var walkTokens = function (tokens) {
71
+ var openedTags = [];
72
+ for (var i = 0; i < tokens.length; i++) {
73
+ var token = tokens[i];
74
+ var notTagNorBrace = false;
75
+
76
+ if (typeof token !== 'string') {
77
+ if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') {
78
+ // We found a tag, now find its kind
79
+
80
+ if (token.content[0].content[0].content === '</') {
81
+ // Closing tag
82
+ if (openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) {
83
+ // Pop matching opening tag
84
+ openedTags.pop();
85
+ }
86
+ } else {
87
+ if (token.content[token.content.length - 1].content === '/>') ; else {
88
+ // Opening tag
89
+ openedTags.push({
90
+ tagName: stringifyToken(token.content[0].content[1]),
91
+ openedBraces: 0
92
+ });
93
+ }
94
+ }
95
+ } else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') {
96
+
97
+ // Here we might have entered a JSX context inside a tag
98
+ openedTags[openedTags.length - 1].openedBraces++;
99
+
100
+ } else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') {
101
+
102
+ // Here we might have left a JSX context inside a tag
103
+ openedTags[openedTags.length - 1].openedBraces--;
104
+
105
+ } else {
106
+ notTagNorBrace = true;
107
+ }
108
+ }
109
+ if (notTagNorBrace || typeof token === 'string') {
110
+ if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) {
111
+ // Here we are inside a tag, and not inside a JSX context.
112
+ // That's plain text: drop any tokens matched.
113
+ var plainText = stringifyToken(token);
114
+
115
+ // And merge text with adjacent text
116
+ if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) {
117
+ plainText += stringifyToken(tokens[i + 1]);
118
+ tokens.splice(i + 1, 1);
119
+ }
120
+ if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) {
121
+ plainText = stringifyToken(tokens[i - 1]) + plainText;
122
+ tokens.splice(i - 1, 1);
123
+ i--;
124
+ }
125
+
126
+ tokens[i] = new Prism.Token('plain-text', plainText, null, plainText);
127
+ }
128
+ }
129
+
130
+ if (token.content && typeof token.content !== 'string') {
131
+ walkTokens(token.content);
132
+ }
133
+ }
134
+ };
135
+
136
+ Prism.hooks.add('after-tokenize', function (env) {
137
+ if (env.language !== 'jsx' && env.language !== 'tsx') {
138
+ return;
139
+ }
140
+ walkTokens(env.tokens);
141
+ });
142
+
143
+ }(Prism));
@@ -1 +1,186 @@
1
- Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function addInlined(a,e){var s={};s["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var t={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+a+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
1
+ Prism.languages.markup = {
2
+ 'comment': {
3
+ pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
4
+ greedy: true
5
+ },
6
+ 'prolog': {
7
+ pattern: /<\?[\s\S]+?\?>/,
8
+ greedy: true
9
+ },
10
+ 'doctype': {
11
+ // https://www.w3.org/TR/xml/#NT-doctypedecl
12
+ pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
13
+ greedy: true,
14
+ inside: {
15
+ 'internal-subset': {
16
+ pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
17
+ lookbehind: true,
18
+ greedy: true,
19
+ inside: null // see below
20
+ },
21
+ 'string': {
22
+ pattern: /"[^"]*"|'[^']*'/,
23
+ greedy: true
24
+ },
25
+ 'punctuation': /^<!|>$|[[\]]/,
26
+ 'doctype-tag': /^DOCTYPE/i,
27
+ 'name': /[^\s<>'"]+/
28
+ }
29
+ },
30
+ 'cdata': {
31
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
32
+ greedy: true
33
+ },
34
+ 'tag': {
35
+ pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
36
+ greedy: true,
37
+ inside: {
38
+ 'tag': {
39
+ pattern: /^<\/?[^\s>\/]+/,
40
+ inside: {
41
+ 'punctuation': /^<\/?/,
42
+ 'namespace': /^[^\s>\/:]+:/
43
+ }
44
+ },
45
+ 'special-attr': [],
46
+ 'attr-value': {
47
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
48
+ inside: {
49
+ 'punctuation': [
50
+ {
51
+ pattern: /^=/,
52
+ alias: 'attr-equals'
53
+ },
54
+ {
55
+ pattern: /^(\s*)["']|["']$/,
56
+ lookbehind: true
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ 'punctuation': /\/?>/,
62
+ 'attr-name': {
63
+ pattern: /[^\s>\/]+/,
64
+ inside: {
65
+ 'namespace': /^[^\s>\/:]+:/
66
+ }
67
+ }
68
+
69
+ }
70
+ },
71
+ 'entity': [
72
+ {
73
+ pattern: /&[\da-z]{1,8};/i,
74
+ alias: 'named-entity'
75
+ },
76
+ /&#x?[\da-f]{1,8};/i
77
+ ]
78
+ };
79
+
80
+ Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =
81
+ Prism.languages.markup['entity'];
82
+ Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;
83
+
84
+ // Plugin to make entity title show the real entity, idea by Roman Komarov
85
+ Prism.hooks.add('wrap', function (env) {
86
+
87
+ if (env.type === 'entity') {
88
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
89
+ }
90
+ });
91
+
92
+ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
93
+ /**
94
+ * Adds an inlined language to markup.
95
+ *
96
+ * An example of an inlined language is CSS with `<style>` tags.
97
+ *
98
+ * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
99
+ * case insensitive.
100
+ * @param {string} lang The language key.
101
+ * @example
102
+ * addInlined('style', 'css');
103
+ */
104
+ value: function addInlined(tagName, lang) {
105
+ var includedCdataInside = {};
106
+ includedCdataInside['language-' + lang] = {
107
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
108
+ lookbehind: true,
109
+ inside: Prism.languages[lang]
110
+ };
111
+ includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;
112
+
113
+ var inside = {
114
+ 'included-cdata': {
115
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
116
+ inside: includedCdataInside
117
+ }
118
+ };
119
+ inside['language-' + lang] = {
120
+ pattern: /[\s\S]+/,
121
+ inside: Prism.languages[lang]
122
+ };
123
+
124
+ var def = {};
125
+ def[tagName] = {
126
+ pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'),
127
+ lookbehind: true,
128
+ greedy: true,
129
+ inside: inside
130
+ };
131
+
132
+ Prism.languages.insertBefore('markup', 'cdata', def);
133
+ }
134
+ });
135
+ Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', {
136
+ /**
137
+ * Adds an pattern to highlight languages embedded in HTML attributes.
138
+ *
139
+ * An example of an inlined language is CSS with `style` attributes.
140
+ *
141
+ * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
142
+ * case insensitive.
143
+ * @param {string} lang The language key.
144
+ * @example
145
+ * addAttribute('style', 'css');
146
+ */
147
+ value: function (attrName, lang) {
148
+ Prism.languages.markup.tag.inside['special-attr'].push({
149
+ pattern: RegExp(
150
+ /(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
151
+ 'i'
152
+ ),
153
+ lookbehind: true,
154
+ inside: {
155
+ 'attr-name': /^[^\s=]+/,
156
+ 'attr-value': {
157
+ pattern: /=[\s\S]+/,
158
+ inside: {
159
+ 'value': {
160
+ pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
161
+ lookbehind: true,
162
+ alias: [lang, 'language-' + lang],
163
+ inside: Prism.languages[lang]
164
+ },
165
+ 'punctuation': [
166
+ {
167
+ pattern: /^=/,
168
+ alias: 'attr-equals'
169
+ },
170
+ /"|'/
171
+ ]
172
+ }
173
+ }
174
+ }
175
+ });
176
+ }
177
+ });
178
+
179
+ Prism.languages.html = Prism.languages.markup;
180
+ Prism.languages.mathml = Prism.languages.markup;
181
+ Prism.languages.svg = Prism.languages.markup;
182
+
183
+ Prism.languages.xml = Prism.languages.extend('markup', {});
184
+ Prism.languages.ssml = Prism.languages.xml;
185
+ Prism.languages.atom = Prism.languages.xml;
186
+ Prism.languages.rss = Prism.languages.xml;
@@ -1 +1,81 @@
1
- Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;
1
+ Prism.languages.scss = Prism.languages.extend('css', {
2
+ 'comment': {
3
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
4
+ lookbehind: true
5
+ },
6
+ 'atrule': {
7
+ pattern: /@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,
8
+ inside: {
9
+ 'rule': /@[\w-]+/
10
+ // See rest below
11
+ }
12
+ },
13
+ // url, compassified
14
+ 'url': /(?:[-a-z]+-)?url(?=\()/i,
15
+ // CSS selector regex is not appropriate for Sass
16
+ // since there can be lot more things (var, @ directive, nesting..)
17
+ // a selector must start at the end of a property or after a brace (end of other rules or nesting)
18
+ // it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable
19
+ // the end of a selector is found when there is no rules in it ( {} or {\s}) or if there is a property (because an interpolated var
20
+ // can "pass" as a selector- e.g: proper#{$erty})
21
+ // this one was hard to do, so please be careful if you edit this one :)
22
+ 'selector': {
23
+ // Initial look-ahead is used to prevent matching of blank selectors
24
+ pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,
25
+ inside: {
26
+ 'parent': {
27
+ pattern: /&/,
28
+ alias: 'important'
29
+ },
30
+ 'placeholder': /%[-\w]+/,
31
+ 'variable': /\$[-\w]+|#\{\$[-\w]+\}/
32
+ }
33
+ },
34
+ 'property': {
35
+ pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,
36
+ inside: {
37
+ 'variable': /\$[-\w]+|#\{\$[-\w]+\}/
38
+ }
39
+ }
40
+ });
41
+
42
+ Prism.languages.insertBefore('scss', 'atrule', {
43
+ 'keyword': [
44
+ /@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,
45
+ {
46
+ pattern: /( )(?:from|through)(?= )/,
47
+ lookbehind: true
48
+ }
49
+ ]
50
+ });
51
+
52
+ Prism.languages.insertBefore('scss', 'important', {
53
+ // var and interpolated vars
54
+ 'variable': /\$[-\w]+|#\{\$[-\w]+\}/
55
+ });
56
+
57
+ Prism.languages.insertBefore('scss', 'function', {
58
+ 'module-modifier': {
59
+ pattern: /\b(?:as|hide|show|with)\b/i,
60
+ alias: 'keyword'
61
+ },
62
+ 'placeholder': {
63
+ pattern: /%[-\w]+/,
64
+ alias: 'selector'
65
+ },
66
+ 'statement': {
67
+ pattern: /\B!(?:default|optional)\b/i,
68
+ alias: 'keyword'
69
+ },
70
+ 'boolean': /\b(?:false|true)\b/,
71
+ 'null': {
72
+ pattern: /\bnull\b/,
73
+ alias: 'keyword'
74
+ },
75
+ 'operator': {
76
+ pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,
77
+ lookbehind: true
78
+ }
79
+ });
80
+
81
+ Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss;
@@ -1 +1,15 @@
1
- !function(e){var a=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",a),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var t=e.languages.tsx.tag;t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(Prism);
1
+ (function (Prism) {
2
+ var typescript = Prism.util.clone(Prism.languages.typescript);
3
+ Prism.languages.tsx = Prism.languages.extend('jsx', typescript);
4
+
5
+ // doesn't work with TS because TS is too complex
6
+ delete Prism.languages.tsx['parameter'];
7
+ delete Prism.languages.tsx['literal-property'];
8
+
9
+ // This will prevent collisions between TSX tags and TS generic types.
10
+ // Idea by https://github.com/karlhorky
11
+ // Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928
12
+ var tag = Prism.languages.tsx.tag;
13
+ tag.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + '(?:' + tag.pattern.source + ')', tag.pattern.flags);
14
+ tag.lookbehind = true;
15
+ }(Prism));