@redis-ui/components 51.26.0 → 51.28.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.
Files changed (187) hide show
  1. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.cjs +17 -8
  2. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.js +17 -8
  3. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.types.d.ts +5 -1
  4. package/dist/CodeBlock/CodeBlock.cjs +29 -14
  5. package/dist/CodeBlock/CodeBlock.js +29 -14
  6. package/dist/CodeBlock/CodeBlock.style.d.ts +4 -3
  7. package/dist/CodeBlock/CodeBlock.types.cjs +7 -0
  8. package/dist/CodeBlock/CodeBlock.types.d.ts +4 -0
  9. package/dist/CodeBlock/CodeBlock.types.js +7 -1
  10. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.cjs +29 -0
  11. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.constants.cjs +34 -0
  12. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.constants.d.ts +25 -0
  13. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.constants.js +32 -0
  14. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.d.ts +6 -0
  15. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.js +29 -0
  16. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.types.d.ts +10 -0
  17. package/dist/CodeBlock/components/HighlightedCode/HighlightedCode.types.js +1 -0
  18. package/dist/Inputs/Input/Input.cjs +9 -2
  19. package/dist/Inputs/Input/Input.d.ts +4 -1
  20. package/dist/Inputs/Input/Input.js +9 -2
  21. package/dist/Inputs/Input/Input.types.d.ts +5 -1
  22. package/dist/Inputs/PasswordInput/components/Compose/Compose.types.d.ts +1 -1
  23. package/dist/Inputs/TextArea/TextArea.cjs +16 -6
  24. package/dist/Inputs/TextArea/TextArea.d.ts +3 -1
  25. package/dist/Inputs/TextArea/TextArea.js +16 -6
  26. package/dist/Inputs/TextArea/TextArea.types.d.ts +4 -1
  27. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.cjs +7 -0
  28. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.d.ts +2 -0
  29. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.js +7 -0
  30. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.style.cjs +17 -0
  31. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.style.d.ts +1 -0
  32. package/dist/Inputs/TextArea/components/CopyButton/CopyButton.style.js +15 -0
  33. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.cjs +3 -1
  34. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.js +4 -2
  35. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.style.cjs +8 -1
  36. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.style.js +8 -1
  37. package/dist/Inputs/components/Compose/CommonCompose.cjs +23 -18
  38. package/dist/Inputs/components/Compose/CommonCompose.d.ts +1 -1
  39. package/dist/Inputs/components/Compose/CommonCompose.js +24 -19
  40. package/dist/Inputs/components/Compose/CommonCompose.types.d.ts +2 -0
  41. package/dist/Inputs/components/Compose/Compose.style.cjs +7 -0
  42. package/dist/Inputs/components/Compose/Compose.style.js +7 -0
  43. package/dist/Inputs/components/Compose/NumericCompose.types.d.ts +1 -1
  44. package/dist/Inputs/components/CopyButton/CopyButton.cjs +15 -0
  45. package/dist/Inputs/components/CopyButton/CopyButton.d.ts +2 -0
  46. package/dist/Inputs/components/CopyButton/CopyButton.js +15 -0
  47. package/dist/Inputs/components/CopyButton/CopyButton.style.cjs +17 -0
  48. package/dist/Inputs/components/CopyButton/CopyButton.style.d.ts +1 -0
  49. package/dist/Inputs/components/CopyButton/CopyButton.style.js +15 -0
  50. package/dist/Inputs/components/CopyButton/CopyButton.types.d.ts +6 -0
  51. package/dist/Inputs/components/CopyButton/CopyButton.types.js +1 -0
  52. package/dist/Inputs/components/InputTag/InputTag.cjs +3 -1
  53. package/dist/Inputs/components/InputTag/InputTag.js +4 -2
  54. package/dist/Inputs/components/InputTag/InputTag.style.cjs +1 -1
  55. package/dist/Inputs/components/InputTag/InputTag.style.js +1 -1
  56. package/dist/index.cjs +1 -0
  57. package/dist/index.js +2 -2
  58. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.cjs +8 -0
  59. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  60. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.cjs +7 -0
  61. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  62. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.cjs +12 -0
  63. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  64. package/dist/node_modules/@babel/runtime/helpers/esm/extends.cjs +17 -0
  65. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  66. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.cjs +6 -0
  67. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  68. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.cjs +6 -0
  69. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +6 -0
  70. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.cjs +13 -0
  71. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +13 -0
  72. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs +12 -0
  73. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  74. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.cjs +10 -0
  75. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  76. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.cjs +14 -0
  77. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  78. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.cjs +9 -0
  79. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  80. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.cjs +16 -0
  81. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  82. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.cjs +11 -0
  83. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  84. package/dist/node_modules/character-entities-legacy/index.cjs +116 -0
  85. package/dist/node_modules/character-entities-legacy/index.js +116 -0
  86. package/dist/node_modules/character-reference-invalid/index.cjs +38 -0
  87. package/dist/node_modules/character-reference-invalid/index.js +38 -0
  88. package/dist/node_modules/comma-separated-tokens/index.cjs +43 -0
  89. package/dist/node_modules/comma-separated-tokens/index.js +43 -0
  90. package/dist/node_modules/decode-named-character-reference/index.dom.cjs +15 -0
  91. package/dist/node_modules/decode-named-character-reference/index.dom.js +15 -0
  92. package/dist/node_modules/hast-util-parse-selector/lib/index.cjs +76 -0
  93. package/dist/node_modules/hast-util-parse-selector/lib/index.js +76 -0
  94. package/dist/node_modules/hastscript/lib/create-h.cjs +262 -0
  95. package/dist/node_modules/hastscript/lib/create-h.js +262 -0
  96. package/dist/node_modules/hastscript/lib/index.cjs +21 -0
  97. package/dist/node_modules/hastscript/lib/index.js +21 -0
  98. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs +49 -0
  99. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +49 -0
  100. package/dist/node_modules/is-alphabetical/index.cjs +14 -0
  101. package/dist/node_modules/is-alphabetical/index.js +14 -0
  102. package/dist/node_modules/is-alphanumerical/index.cjs +15 -0
  103. package/dist/node_modules/is-alphanumerical/index.js +15 -0
  104. package/dist/node_modules/is-decimal/index.cjs +14 -0
  105. package/dist/node_modules/is-decimal/index.js +14 -0
  106. package/dist/node_modules/is-hexadecimal/index.cjs +14 -0
  107. package/dist/node_modules/is-hexadecimal/index.js +14 -0
  108. package/dist/node_modules/parse-entities/lib/index.cjs +232 -0
  109. package/dist/node_modules/parse-entities/lib/index.js +232 -0
  110. package/dist/node_modules/property-information/index.cjs +27 -0
  111. package/dist/node_modules/property-information/index.js +26 -0
  112. package/dist/node_modules/property-information/lib/aria.cjs +60 -0
  113. package/dist/node_modules/property-information/lib/aria.js +61 -0
  114. package/dist/node_modules/property-information/lib/find.cjs +81 -0
  115. package/dist/node_modules/property-information/lib/find.js +81 -0
  116. package/dist/node_modules/property-information/lib/html.cjs +326 -0
  117. package/dist/node_modules/property-information/lib/html.js +326 -0
  118. package/dist/node_modules/property-information/lib/normalize.cjs +15 -0
  119. package/dist/node_modules/property-information/lib/normalize.js +15 -0
  120. package/dist/node_modules/property-information/lib/svg.cjs +564 -0
  121. package/dist/node_modules/property-information/lib/svg.js +564 -0
  122. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.cjs +15 -0
  123. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +15 -0
  124. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.cjs +14 -0
  125. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +14 -0
  126. package/dist/node_modules/property-information/lib/util/create.cjs +53 -0
  127. package/dist/node_modules/property-information/lib/util/create.js +53 -0
  128. package/dist/node_modules/property-information/lib/util/defined-info.cjs +49 -0
  129. package/dist/node_modules/property-information/lib/util/defined-info.js +49 -0
  130. package/dist/node_modules/property-information/lib/util/info.cjs +33 -0
  131. package/dist/node_modules/property-information/lib/util/info.js +33 -0
  132. package/dist/node_modules/property-information/lib/util/merge.cjs +26 -0
  133. package/dist/node_modules/property-information/lib/util/merge.js +26 -0
  134. package/dist/node_modules/property-information/lib/util/schema.cjs +27 -0
  135. package/dist/node_modules/property-information/lib/util/schema.js +27 -0
  136. package/dist/node_modules/property-information/lib/util/types.cjs +35 -0
  137. package/dist/node_modules/property-information/lib/util/types.js +24 -0
  138. package/dist/node_modules/property-information/lib/xlink.cjs +18 -0
  139. package/dist/node_modules/property-information/lib/xlink.js +19 -0
  140. package/dist/node_modules/property-information/lib/xml.cjs +14 -0
  141. package/dist/node_modules/property-information/lib/xml.js +15 -0
  142. package/dist/node_modules/property-information/lib/xmlns.cjs +14 -0
  143. package/dist/node_modules/property-information/lib/xmlns.js +14 -0
  144. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.cjs +6 -0
  145. package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js +6 -0
  146. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.cjs +183 -0
  147. package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js +181 -0
  148. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.cjs +308 -0
  149. package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js +306 -0
  150. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/bash.cjs +4 -0
  151. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/bash.js +5 -0
  152. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/json.cjs +4 -0
  153. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/json.js +5 -0
  154. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/python.cjs +4 -0
  155. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/python.js +5 -0
  156. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/typescript.cjs +4 -0
  157. package/dist/node_modules/react-syntax-highlighter/dist/esm/languages/prism/typescript.js +5 -0
  158. package/dist/node_modules/react-syntax-highlighter/dist/esm/prism-light.cjs +12 -0
  159. package/dist/node_modules/react-syntax-highlighter/dist/esm/prism-light.js +12 -0
  160. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vs.cjs +121 -0
  161. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vs.js +121 -0
  162. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.cjs +147 -0
  163. package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js +147 -0
  164. package/dist/node_modules/refractor/lang/bash.cjs +190 -0
  165. package/dist/node_modules/refractor/lang/bash.js +190 -0
  166. package/dist/node_modules/refractor/lang/clike.cjs +37 -0
  167. package/dist/node_modules/refractor/lang/clike.js +37 -0
  168. package/dist/node_modules/refractor/lang/javascript.cjs +122 -0
  169. package/dist/node_modules/refractor/lang/javascript.js +122 -0
  170. package/dist/node_modules/refractor/lang/json.cjs +36 -0
  171. package/dist/node_modules/refractor/lang/json.js +36 -0
  172. package/dist/node_modules/refractor/lang/python.cjs +71 -0
  173. package/dist/node_modules/refractor/lang/python.js +71 -0
  174. package/dist/node_modules/refractor/lang/typescript.cjs +55 -0
  175. package/dist/node_modules/refractor/lang/typescript.js +55 -0
  176. package/dist/node_modules/refractor/lib/core.cjs +214 -0
  177. package/dist/node_modules/refractor/lib/core.js +214 -0
  178. package/dist/node_modules/refractor/lib/prism-core.cjs +595 -0
  179. package/dist/node_modules/refractor/lib/prism-core.js +595 -0
  180. package/dist/node_modules/space-separated-tokens/index.cjs +15 -0
  181. package/dist/node_modules/space-separated-tokens/index.js +15 -0
  182. package/package.json +4 -2
  183. package/skills/redis-ui-components/references/CodeBlock.md +23 -5
  184. package/skills/redis-ui-components/references/CopyToClipboardButton.md +23 -1
  185. package/skills/redis-ui-components/references/Input.md +39 -2
  186. package/skills/redis-ui-components/references/SearchInput.md +1 -1
  187. package/skills/redis-ui-components/references/TextArea.md +19 -1
@@ -0,0 +1,37 @@
1
+ //#region ../../node_modules/refractor/lang/clike.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ clike.displayName = "clike";
6
+ clike.aliases = [];
7
+ /** @param {Refractor} Prism */
8
+ function clike(Prism) {
9
+ Prism.languages.clike = {
10
+ comment: [{
11
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ }, {
15
+ pattern: /(^|[^\\:])\/\/.*/,
16
+ lookbehind: true,
17
+ greedy: true
18
+ }],
19
+ string: {
20
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
21
+ greedy: true
22
+ },
23
+ "class-name": {
24
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
25
+ lookbehind: true,
26
+ inside: { punctuation: /[.\\]/ }
27
+ },
28
+ keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
29
+ boolean: /\b(?:false|true)\b/,
30
+ function: /\b\w+(?=\()/,
31
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
32
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
33
+ punctuation: /[{}[\];(),.:]/
34
+ };
35
+ }
36
+ //#endregion
37
+ exports.default = clike;
@@ -0,0 +1,37 @@
1
+ //#region ../../node_modules/refractor/lang/clike.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ clike.displayName = "clike";
6
+ clike.aliases = [];
7
+ /** @param {Refractor} Prism */
8
+ function clike(Prism) {
9
+ Prism.languages.clike = {
10
+ comment: [{
11
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ }, {
15
+ pattern: /(^|[^\\:])\/\/.*/,
16
+ lookbehind: true,
17
+ greedy: true
18
+ }],
19
+ string: {
20
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
21
+ greedy: true
22
+ },
23
+ "class-name": {
24
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
25
+ lookbehind: true,
26
+ inside: { punctuation: /[.\\]/ }
27
+ },
28
+ keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
29
+ boolean: /\b(?:false|true)\b/,
30
+ function: /\b\w+(?=\()/,
31
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
32
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
33
+ punctuation: /[{}[\];(),.:]/
34
+ };
35
+ }
36
+ //#endregion
37
+ export { clike as default };
@@ -0,0 +1,122 @@
1
+ const require_clike = require("./clike.cjs");
2
+ //#region ../../node_modules/refractor/lang/javascript.js
3
+ /**
4
+ * @import {Refractor} from '../lib/core.js'
5
+ */
6
+ javascript.displayName = "javascript";
7
+ javascript.aliases = ["js"];
8
+ /** @param {Refractor} Prism */
9
+ function javascript(Prism) {
10
+ Prism.register(require_clike.default);
11
+ Prism.languages.javascript = Prism.languages.extend("clike", {
12
+ "class-name": [Prism.languages.clike["class-name"], {
13
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
14
+ lookbehind: true
15
+ }],
16
+ keyword: [{
17
+ pattern: /((?:^|\})\s*)catch\b/,
18
+ lookbehind: true
19
+ }, {
20
+ 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/,
21
+ lookbehind: true
22
+ }],
23
+ function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
24
+ number: {
25
+ 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),
26
+ lookbehind: true
27
+ },
28
+ operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
29
+ });
30
+ Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
31
+ Prism.languages.insertBefore("javascript", "keyword", {
32
+ regex: {
33
+ 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),
34
+ lookbehind: true,
35
+ greedy: true,
36
+ inside: {
37
+ "regex-source": {
38
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
39
+ lookbehind: true,
40
+ alias: "language-regex",
41
+ inside: Prism.languages.regex
42
+ },
43
+ "regex-delimiter": /^\/|\/$/,
44
+ "regex-flags": /^[a-z]+$/
45
+ }
46
+ },
47
+ "function-variable": {
48
+ 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*=>))/,
49
+ alias: "function"
50
+ },
51
+ parameter: [
52
+ {
53
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
54
+ lookbehind: true,
55
+ inside: Prism.languages.javascript
56
+ },
57
+ {
58
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
59
+ lookbehind: true,
60
+ inside: Prism.languages.javascript
61
+ },
62
+ {
63
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
64
+ lookbehind: true,
65
+ inside: Prism.languages.javascript
66
+ },
67
+ {
68
+ 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*\{)/,
69
+ lookbehind: true,
70
+ inside: Prism.languages.javascript
71
+ }
72
+ ],
73
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
74
+ });
75
+ Prism.languages.insertBefore("javascript", "string", {
76
+ hashbang: {
77
+ pattern: /^#!.*/,
78
+ greedy: true,
79
+ alias: "comment"
80
+ },
81
+ "template-string": {
82
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
83
+ greedy: true,
84
+ inside: {
85
+ "template-punctuation": {
86
+ pattern: /^`|`$/,
87
+ alias: "string"
88
+ },
89
+ interpolation: {
90
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
91
+ lookbehind: true,
92
+ inside: {
93
+ "interpolation-punctuation": {
94
+ pattern: /^\$\{|\}$/,
95
+ alias: "punctuation"
96
+ },
97
+ rest: Prism.languages.javascript
98
+ }
99
+ },
100
+ string: /[\s\S]+/
101
+ }
102
+ },
103
+ "string-property": {
104
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
105
+ lookbehind: true,
106
+ greedy: true,
107
+ alias: "property"
108
+ }
109
+ });
110
+ Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
111
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
112
+ lookbehind: true,
113
+ alias: "property"
114
+ } });
115
+ if (Prism.languages.markup) {
116
+ Prism.languages.markup.tag.addInlined("script", "javascript");
117
+ 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");
118
+ }
119
+ Prism.languages.js = Prism.languages.javascript;
120
+ }
121
+ //#endregion
122
+ exports.default = javascript;
@@ -0,0 +1,122 @@
1
+ import clike from "./clike.js";
2
+ //#region ../../node_modules/refractor/lang/javascript.js
3
+ /**
4
+ * @import {Refractor} from '../lib/core.js'
5
+ */
6
+ javascript.displayName = "javascript";
7
+ javascript.aliases = ["js"];
8
+ /** @param {Refractor} Prism */
9
+ function javascript(Prism) {
10
+ Prism.register(clike);
11
+ Prism.languages.javascript = Prism.languages.extend("clike", {
12
+ "class-name": [Prism.languages.clike["class-name"], {
13
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
14
+ lookbehind: true
15
+ }],
16
+ keyword: [{
17
+ pattern: /((?:^|\})\s*)catch\b/,
18
+ lookbehind: true
19
+ }, {
20
+ 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/,
21
+ lookbehind: true
22
+ }],
23
+ function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
24
+ number: {
25
+ 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),
26
+ lookbehind: true
27
+ },
28
+ operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
29
+ });
30
+ Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
31
+ Prism.languages.insertBefore("javascript", "keyword", {
32
+ regex: {
33
+ 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),
34
+ lookbehind: true,
35
+ greedy: true,
36
+ inside: {
37
+ "regex-source": {
38
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
39
+ lookbehind: true,
40
+ alias: "language-regex",
41
+ inside: Prism.languages.regex
42
+ },
43
+ "regex-delimiter": /^\/|\/$/,
44
+ "regex-flags": /^[a-z]+$/
45
+ }
46
+ },
47
+ "function-variable": {
48
+ 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*=>))/,
49
+ alias: "function"
50
+ },
51
+ parameter: [
52
+ {
53
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
54
+ lookbehind: true,
55
+ inside: Prism.languages.javascript
56
+ },
57
+ {
58
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
59
+ lookbehind: true,
60
+ inside: Prism.languages.javascript
61
+ },
62
+ {
63
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
64
+ lookbehind: true,
65
+ inside: Prism.languages.javascript
66
+ },
67
+ {
68
+ 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*\{)/,
69
+ lookbehind: true,
70
+ inside: Prism.languages.javascript
71
+ }
72
+ ],
73
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
74
+ });
75
+ Prism.languages.insertBefore("javascript", "string", {
76
+ hashbang: {
77
+ pattern: /^#!.*/,
78
+ greedy: true,
79
+ alias: "comment"
80
+ },
81
+ "template-string": {
82
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
83
+ greedy: true,
84
+ inside: {
85
+ "template-punctuation": {
86
+ pattern: /^`|`$/,
87
+ alias: "string"
88
+ },
89
+ interpolation: {
90
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
91
+ lookbehind: true,
92
+ inside: {
93
+ "interpolation-punctuation": {
94
+ pattern: /^\$\{|\}$/,
95
+ alias: "punctuation"
96
+ },
97
+ rest: Prism.languages.javascript
98
+ }
99
+ },
100
+ string: /[\s\S]+/
101
+ }
102
+ },
103
+ "string-property": {
104
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
105
+ lookbehind: true,
106
+ greedy: true,
107
+ alias: "property"
108
+ }
109
+ });
110
+ Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
111
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
112
+ lookbehind: true,
113
+ alias: "property"
114
+ } });
115
+ if (Prism.languages.markup) {
116
+ Prism.languages.markup.tag.addInlined("script", "javascript");
117
+ 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");
118
+ }
119
+ Prism.languages.js = Prism.languages.javascript;
120
+ }
121
+ //#endregion
122
+ export { javascript as default };
@@ -0,0 +1,36 @@
1
+ //#region ../../node_modules/refractor/lang/json.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ json.displayName = "json";
6
+ json.aliases = ["webmanifest"];
7
+ /** @param {Refractor} Prism */
8
+ function json(Prism) {
9
+ Prism.languages.json = {
10
+ property: {
11
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ },
15
+ string: {
16
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
17
+ lookbehind: true,
18
+ greedy: true
19
+ },
20
+ comment: {
21
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
22
+ greedy: true
23
+ },
24
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
25
+ punctuation: /[{}[\],]/,
26
+ operator: /:/,
27
+ boolean: /\b(?:false|true)\b/,
28
+ null: {
29
+ pattern: /\bnull\b/,
30
+ alias: "keyword"
31
+ }
32
+ };
33
+ Prism.languages.webmanifest = Prism.languages.json;
34
+ }
35
+ //#endregion
36
+ exports.default = json;
@@ -0,0 +1,36 @@
1
+ //#region ../../node_modules/refractor/lang/json.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ json.displayName = "json";
6
+ json.aliases = ["webmanifest"];
7
+ /** @param {Refractor} Prism */
8
+ function json(Prism) {
9
+ Prism.languages.json = {
10
+ property: {
11
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ },
15
+ string: {
16
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
17
+ lookbehind: true,
18
+ greedy: true
19
+ },
20
+ comment: {
21
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
22
+ greedy: true
23
+ },
24
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
25
+ punctuation: /[{}[\],]/,
26
+ operator: /:/,
27
+ boolean: /\b(?:false|true)\b/,
28
+ null: {
29
+ pattern: /\bnull\b/,
30
+ alias: "keyword"
31
+ }
32
+ };
33
+ Prism.languages.webmanifest = Prism.languages.json;
34
+ }
35
+ //#endregion
36
+ export { json as default };
@@ -0,0 +1,71 @@
1
+ //#region ../../node_modules/refractor/lang/python.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ python.displayName = "python";
6
+ python.aliases = ["py"];
7
+ /** @param {Refractor} Prism */
8
+ function python(Prism) {
9
+ Prism.languages.python = {
10
+ comment: {
11
+ pattern: /(^|[^\\])#.*/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ },
15
+ "string-interpolation": {
16
+ pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
17
+ greedy: true,
18
+ inside: {
19
+ interpolation: {
20
+ pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
21
+ lookbehind: true,
22
+ inside: {
23
+ "format-spec": {
24
+ pattern: /(:)[^:(){}]+(?=\}$)/,
25
+ lookbehind: true
26
+ },
27
+ "conversion-option": {
28
+ pattern: /![sra](?=[:}]$)/,
29
+ alias: "punctuation"
30
+ },
31
+ rest: null
32
+ }
33
+ },
34
+ string: /[\s\S]+/
35
+ }
36
+ },
37
+ "triple-quoted-string": {
38
+ pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
39
+ greedy: true,
40
+ alias: "string"
41
+ },
42
+ string: {
43
+ pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
44
+ greedy: true
45
+ },
46
+ function: {
47
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
48
+ lookbehind: true
49
+ },
50
+ "class-name": {
51
+ pattern: /(\bclass\s+)\w+/i,
52
+ lookbehind: true
53
+ },
54
+ decorator: {
55
+ pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
56
+ lookbehind: true,
57
+ alias: ["annotation", "punctuation"],
58
+ inside: { punctuation: /\./ }
59
+ },
60
+ keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
61
+ builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
62
+ boolean: /\b(?:False|None|True)\b/,
63
+ number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
64
+ operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
65
+ punctuation: /[{}[\];(),.:]/
66
+ };
67
+ Prism.languages.python["string-interpolation"].inside["interpolation"].inside.rest = Prism.languages.python;
68
+ Prism.languages.py = Prism.languages.python;
69
+ }
70
+ //#endregion
71
+ exports.default = python;
@@ -0,0 +1,71 @@
1
+ //#region ../../node_modules/refractor/lang/python.js
2
+ /**
3
+ * @import {Refractor} from '../lib/core.js'
4
+ */
5
+ python.displayName = "python";
6
+ python.aliases = ["py"];
7
+ /** @param {Refractor} Prism */
8
+ function python(Prism) {
9
+ Prism.languages.python = {
10
+ comment: {
11
+ pattern: /(^|[^\\])#.*/,
12
+ lookbehind: true,
13
+ greedy: true
14
+ },
15
+ "string-interpolation": {
16
+ pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
17
+ greedy: true,
18
+ inside: {
19
+ interpolation: {
20
+ pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
21
+ lookbehind: true,
22
+ inside: {
23
+ "format-spec": {
24
+ pattern: /(:)[^:(){}]+(?=\}$)/,
25
+ lookbehind: true
26
+ },
27
+ "conversion-option": {
28
+ pattern: /![sra](?=[:}]$)/,
29
+ alias: "punctuation"
30
+ },
31
+ rest: null
32
+ }
33
+ },
34
+ string: /[\s\S]+/
35
+ }
36
+ },
37
+ "triple-quoted-string": {
38
+ pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
39
+ greedy: true,
40
+ alias: "string"
41
+ },
42
+ string: {
43
+ pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
44
+ greedy: true
45
+ },
46
+ function: {
47
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
48
+ lookbehind: true
49
+ },
50
+ "class-name": {
51
+ pattern: /(\bclass\s+)\w+/i,
52
+ lookbehind: true
53
+ },
54
+ decorator: {
55
+ pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
56
+ lookbehind: true,
57
+ alias: ["annotation", "punctuation"],
58
+ inside: { punctuation: /\./ }
59
+ },
60
+ keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
61
+ builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
62
+ boolean: /\b(?:False|None|True)\b/,
63
+ number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
64
+ operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
65
+ punctuation: /[{}[\];(),.:]/
66
+ };
67
+ Prism.languages.python["string-interpolation"].inside["interpolation"].inside.rest = Prism.languages.python;
68
+ Prism.languages.py = Prism.languages.python;
69
+ }
70
+ //#endregion
71
+ export { python as default };
@@ -0,0 +1,55 @@
1
+ const require_javascript = require("./javascript.cjs");
2
+ //#region ../../node_modules/refractor/lang/typescript.js
3
+ /**
4
+ * @import {Refractor} from '../lib/core.js'
5
+ */
6
+ typescript.displayName = "typescript";
7
+ typescript.aliases = ["ts"];
8
+ /** @param {Refractor} Prism */
9
+ function typescript(Prism) {
10
+ Prism.register(require_javascript.default);
11
+ (function(Prism) {
12
+ Prism.languages.typescript = Prism.languages.extend("javascript", {
13
+ "class-name": {
14
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
15
+ lookbehind: true,
16
+ greedy: true,
17
+ inside: null
18
+ },
19
+ builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
20
+ });
21
+ Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/);
22
+ delete Prism.languages.typescript["parameter"];
23
+ delete Prism.languages.typescript["literal-property"];
24
+ var typeInside = Prism.languages.extend("typescript", {});
25
+ delete typeInside["class-name"];
26
+ Prism.languages.typescript["class-name"].inside = typeInside;
27
+ Prism.languages.insertBefore("typescript", "function", {
28
+ decorator: {
29
+ pattern: /@[$\w\xA0-\uFFFF]+/,
30
+ inside: {
31
+ at: {
32
+ pattern: /^@/,
33
+ alias: "operator"
34
+ },
35
+ function: /^[\s\S]+/
36
+ }
37
+ },
38
+ "generic-function": {
39
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
40
+ greedy: true,
41
+ inside: {
42
+ function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
43
+ generic: {
44
+ pattern: /<[\s\S]+/,
45
+ alias: "class-name",
46
+ inside: typeInside
47
+ }
48
+ }
49
+ }
50
+ });
51
+ Prism.languages.ts = Prism.languages.typescript;
52
+ })(Prism);
53
+ }
54
+ //#endregion
55
+ exports.default = typescript;
@@ -0,0 +1,55 @@
1
+ import javascript from "./javascript.js";
2
+ //#region ../../node_modules/refractor/lang/typescript.js
3
+ /**
4
+ * @import {Refractor} from '../lib/core.js'
5
+ */
6
+ typescript.displayName = "typescript";
7
+ typescript.aliases = ["ts"];
8
+ /** @param {Refractor} Prism */
9
+ function typescript(Prism) {
10
+ Prism.register(javascript);
11
+ (function(Prism) {
12
+ Prism.languages.typescript = Prism.languages.extend("javascript", {
13
+ "class-name": {
14
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
15
+ lookbehind: true,
16
+ greedy: true,
17
+ inside: null
18
+ },
19
+ builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
20
+ });
21
+ Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/);
22
+ delete Prism.languages.typescript["parameter"];
23
+ delete Prism.languages.typescript["literal-property"];
24
+ var typeInside = Prism.languages.extend("typescript", {});
25
+ delete typeInside["class-name"];
26
+ Prism.languages.typescript["class-name"].inside = typeInside;
27
+ Prism.languages.insertBefore("typescript", "function", {
28
+ decorator: {
29
+ pattern: /@[$\w\xA0-\uFFFF]+/,
30
+ inside: {
31
+ at: {
32
+ pattern: /^@/,
33
+ alias: "operator"
34
+ },
35
+ function: /^[\s\S]+/
36
+ }
37
+ },
38
+ "generic-function": {
39
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
40
+ greedy: true,
41
+ inside: {
42
+ function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
43
+ generic: {
44
+ pattern: /<[\s\S]+/,
45
+ alias: "class-name",
46
+ inside: typeInside
47
+ }
48
+ }
49
+ }
50
+ });
51
+ Prism.languages.ts = Prism.languages.typescript;
52
+ })(Prism);
53
+ }
54
+ //#endregion
55
+ export { typescript as default };