css-UWQ3UZD5.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/css/css.js
  3. var conf = {
  4. wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
  5. comments: {
  6. blockComment: ["/*", "*/"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"]
  12. ],
  13. autoClosingPairs: [
  14. { open: "{", close: "}", notIn: ["string", "comment"] },
  15. { open: "[", close: "]", notIn: ["string", "comment"] },
  16. { open: "(", close: ")", notIn: ["string", "comment"] },
  17. { open: '"', close: '"', notIn: ["string", "comment"] },
  18. { open: "'", close: "'", notIn: ["string", "comment"] }
  19. ],
  20. surroundingPairs: [
  21. { open: "{", close: "}" },
  22. { open: "[", close: "]" },
  23. { open: "(", close: ")" },
  24. { open: '"', close: '"' },
  25. { open: "'", close: "'" }
  26. ],
  27. folding: {
  28. markers: {
  29. start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
  30. end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
  31. }
  32. }
  33. };
  34. var language = {
  35. defaultToken: "",
  36. tokenPostfix: ".css",
  37. ws: "[ \n\r\f]*",
  38. identifier: "-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",
  39. brackets: [
  40. { open: "{", close: "}", token: "delimiter.bracket" },
  41. { open: "[", close: "]", token: "delimiter.bracket" },
  42. { open: "(", close: ")", token: "delimiter.parenthesis" },
  43. { open: "<", close: ">", token: "delimiter.angle" }
  44. ],
  45. tokenizer: {
  46. root: [{ include: "@selector" }],
  47. selector: [
  48. { include: "@comments" },
  49. { include: "@import" },
  50. { include: "@strings" },
  51. [
  52. "[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",
  53. { token: "keyword", next: "@keyframedeclaration" }
  54. ],
  55. ["[@](page|content|font-face|-moz-document)", { token: "keyword" }],
  56. ["[@](charset|namespace)", { token: "keyword", next: "@declarationbody" }],
  57. [
  58. "(url-prefix)(\\()",
  59. ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
  60. ],
  61. [
  62. "(url)(\\()",
  63. ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
  64. ],
  65. { include: "@selectorname" },
  66. ["[\\*]", "tag"],
  67. ["[>\\+,]", "delimiter"],
  68. ["\\[", { token: "delimiter.bracket", next: "@selectorattribute" }],
  69. ["{", { token: "delimiter.bracket", next: "@selectorbody" }]
  70. ],
  71. selectorbody: [
  72. { include: "@comments" },
  73. ["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))", "attribute.name", "@rulevalue"],
  74. ["}", { token: "delimiter.bracket", next: "@pop" }]
  75. ],
  76. selectorname: [
  77. ["(\\.|#(?=[^{])|%|(@identifier)|:)+", "tag"]
  78. ],
  79. selectorattribute: [{ include: "@term" }, ["]", { token: "delimiter.bracket", next: "@pop" }]],
  80. term: [
  81. { include: "@comments" },
  82. [
  83. "(url-prefix)(\\()",
  84. ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
  85. ],
  86. [
  87. "(url)(\\()",
  88. ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
  89. ],
  90. { include: "@functioninvocation" },
  91. { include: "@numbers" },
  92. { include: "@name" },
  93. { include: "@strings" },
  94. ["([<>=\\+\\-\\*\\/\\^\\|\\~,])", "delimiter"],
  95. [",", "delimiter"]
  96. ],
  97. rulevalue: [
  98. { include: "@comments" },
  99. { include: "@strings" },
  100. { include: "@term" },
  101. ["!important", "keyword"],
  102. [";", "delimiter", "@pop"],
  103. ["(?=})", { token: "", next: "@pop" }]
  104. ],
  105. warndebug: [["[@](warn|debug)", { token: "keyword", next: "@declarationbody" }]],
  106. import: [["[@](import)", { token: "keyword", next: "@declarationbody" }]],
  107. urldeclaration: [
  108. { include: "@strings" },
  109. ["[^)\r\n]+", "string"],
  110. ["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
  111. ],
  112. parenthizedterm: [
  113. { include: "@term" },
  114. ["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
  115. ],
  116. declarationbody: [
  117. { include: "@term" },
  118. [";", "delimiter", "@pop"],
  119. ["(?=})", { token: "", next: "@pop" }]
  120. ],
  121. comments: [
  122. ["\\/\\*", "comment", "@comment"],
  123. ["\\/\\/+.*", "comment"]
  124. ],
  125. comment: [
  126. ["\\*\\/", "comment", "@pop"],
  127. [/[^*/]+/, "comment"],
  128. [/./, "comment"]
  129. ],
  130. name: [["@identifier", "attribute.value"]],
  131. numbers: [
  132. ["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?", { token: "attribute.value.number", next: "@units" }],
  133. ["#[0-9a-fA-F_]+(?!\\w)", "attribute.value.hex"]
  134. ],
  135. units: [
  136. [
  137. "(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?",
  138. "attribute.value.unit",
  139. "@pop"
  140. ]
  141. ],
  142. keyframedeclaration: [
  143. ["@identifier", "attribute.value"],
  144. ["{", { token: "delimiter.bracket", switchTo: "@keyframebody" }]
  145. ],
  146. keyframebody: [
  147. { include: "@term" },
  148. ["{", { token: "delimiter.bracket", next: "@selectorbody" }],
  149. ["}", { token: "delimiter.bracket", next: "@pop" }]
  150. ],
  151. functioninvocation: [
  152. ["@identifier\\(", { token: "attribute.value", next: "@functionarguments" }]
  153. ],
  154. functionarguments: [
  155. ["\\$@identifier@ws:", "attribute.name"],
  156. ["[,]", "delimiter"],
  157. { include: "@term" },
  158. ["\\)", { token: "attribute.value", next: "@pop" }]
  159. ],
  160. strings: [
  161. ['~?"', { token: "string", next: "@stringenddoublequote" }],
  162. ["~?'", { token: "string", next: "@stringendquote" }]
  163. ],
  164. stringenddoublequote: [
  165. ["\\\\.", "string"],
  166. ['"', { token: "string", next: "@pop" }],
  167. [/[^\\"]+/, "string"],
  168. [".", "string"]
  169. ],
  170. stringendquote: [
  171. ["\\\\.", "string"],
  172. ["'", { token: "string", next: "@pop" }],
  173. [/[^\\']+/, "string"],
  174. [".", "string"]
  175. ]
  176. }
  177. };
  178. export {
  179. conf,
  180. language
  181. };
  182. /*! Bundled license information:
  183. monaco-editor/esm/vs/basic-languages/css/css.js:
  184. (*!-----------------------------------------------------------------------------
  185. * Copyright (c) Microsoft Corporation. All rights reserved.
  186. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  187. * Released under the MIT license
  188. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  189. *-----------------------------------------------------------------------------*)
  190. */
  191. //# sourceMappingURL=css-UWQ3UZD5.js.map