yaml-ZYLFYXX2.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. import {
  2. editor_api_exports
  3. } from "./chunk-5Q5BEFT4.js";
  4. import "./chunk-FBUDSZGC.js";
  5. import "./chunk-2LSFTFF7.js";
  6. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.js
  7. var __defProp = Object.defineProperty;
  8. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  9. var __getOwnPropNames = Object.getOwnPropertyNames;
  10. var __hasOwnProp = Object.prototype.hasOwnProperty;
  11. var __copyProps = (to, from, except, desc) => {
  12. if (from && typeof from === "object" || typeof from === "function") {
  13. for (let key of __getOwnPropNames(from))
  14. if (!__hasOwnProp.call(to, key) && key !== except)
  15. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  16. }
  17. return to;
  18. };
  19. var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
  20. var monaco_editor_core_exports = {};
  21. __reExport(monaco_editor_core_exports, editor_api_exports);
  22. var conf = {
  23. comments: {
  24. lineComment: "#"
  25. },
  26. brackets: [
  27. ["{", "}"],
  28. ["[", "]"],
  29. ["(", ")"]
  30. ],
  31. autoClosingPairs: [
  32. { open: "{", close: "}" },
  33. { open: "[", close: "]" },
  34. { open: "(", close: ")" },
  35. { open: '"', close: '"' },
  36. { open: "'", close: "'" }
  37. ],
  38. surroundingPairs: [
  39. { open: "{", close: "}" },
  40. { open: "[", close: "]" },
  41. { open: "(", close: ")" },
  42. { open: '"', close: '"' },
  43. { open: "'", close: "'" }
  44. ],
  45. folding: {
  46. offSide: true
  47. },
  48. onEnterRules: [
  49. {
  50. beforeText: /:\s*$/,
  51. action: {
  52. indentAction: monaco_editor_core_exports.languages.IndentAction.Indent
  53. }
  54. }
  55. ]
  56. };
  57. var language = {
  58. tokenPostfix: ".yaml",
  59. brackets: [
  60. { token: "delimiter.bracket", open: "{", close: "}" },
  61. { token: "delimiter.square", open: "[", close: "]" }
  62. ],
  63. keywords: ["true", "True", "TRUE", "false", "False", "FALSE", "null", "Null", "Null", "~"],
  64. numberInteger: /(?:0|[+-]?[0-9]+)/,
  65. numberFloat: /(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,
  66. numberOctal: /0o[0-7]+/,
  67. numberHex: /0x[0-9a-fA-F]+/,
  68. numberInfinity: /[+-]?\.(?:inf|Inf|INF)/,
  69. numberNaN: /\.(?:nan|Nan|NAN)/,
  70. numberDate: /\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,
  71. escapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
  72. tokenizer: {
  73. root: [
  74. { include: "@whitespace" },
  75. { include: "@comment" },
  76. [/%[^ ]+.*$/, "meta.directive"],
  77. [/---/, "operators.directivesEnd"],
  78. [/\.{3}/, "operators.documentEnd"],
  79. [/[-?:](?= )/, "operators"],
  80. { include: "@anchor" },
  81. { include: "@tagHandle" },
  82. { include: "@flowCollections" },
  83. { include: "@blockStyle" },
  84. [/@numberInteger(?![ \t]*\S+)/, "number"],
  85. [/@numberFloat(?![ \t]*\S+)/, "number.float"],
  86. [/@numberOctal(?![ \t]*\S+)/, "number.octal"],
  87. [/@numberHex(?![ \t]*\S+)/, "number.hex"],
  88. [/@numberInfinity(?![ \t]*\S+)/, "number.infinity"],
  89. [/@numberNaN(?![ \t]*\S+)/, "number.nan"],
  90. [/@numberDate(?![ \t]*\S+)/, "number.date"],
  91. [/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/, ["type", "white", "operators", "white"]],
  92. { include: "@flowScalars" },
  93. [
  94. /.+?(?=(\s+#|$))/,
  95. {
  96. cases: {
  97. "@keywords": "keyword",
  98. "@default": "string"
  99. }
  100. }
  101. ]
  102. ],
  103. object: [
  104. { include: "@whitespace" },
  105. { include: "@comment" },
  106. [/\}/, "@brackets", "@pop"],
  107. [/,/, "delimiter.comma"],
  108. [/:(?= )/, "operators"],
  109. [/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/, "type"],
  110. { include: "@flowCollections" },
  111. { include: "@flowScalars" },
  112. { include: "@tagHandle" },
  113. { include: "@anchor" },
  114. { include: "@flowNumber" },
  115. [
  116. /[^\},]+/,
  117. {
  118. cases: {
  119. "@keywords": "keyword",
  120. "@default": "string"
  121. }
  122. }
  123. ]
  124. ],
  125. array: [
  126. { include: "@whitespace" },
  127. { include: "@comment" },
  128. [/\]/, "@brackets", "@pop"],
  129. [/,/, "delimiter.comma"],
  130. { include: "@flowCollections" },
  131. { include: "@flowScalars" },
  132. { include: "@tagHandle" },
  133. { include: "@anchor" },
  134. { include: "@flowNumber" },
  135. [
  136. /[^\],]+/,
  137. {
  138. cases: {
  139. "@keywords": "keyword",
  140. "@default": "string"
  141. }
  142. }
  143. ]
  144. ],
  145. multiString: [[/^( +).+$/, "string", "@multiStringContinued.$1"]],
  146. multiStringContinued: [
  147. [
  148. /^( *).+$/,
  149. {
  150. cases: {
  151. "$1==$S2": "string",
  152. "@default": { token: "@rematch", next: "@popall" }
  153. }
  154. }
  155. ]
  156. ],
  157. whitespace: [[/[ \t\r\n]+/, "white"]],
  158. comment: [[/#.*$/, "comment"]],
  159. flowCollections: [
  160. [/\[/, "@brackets", "@array"],
  161. [/\{/, "@brackets", "@object"]
  162. ],
  163. flowScalars: [
  164. [/"([^"\\]|\\.)*$/, "string.invalid"],
  165. [/'([^'\\]|\\.)*$/, "string.invalid"],
  166. [/'[^']*'/, "string"],
  167. [/"/, "string", "@doubleQuotedString"]
  168. ],
  169. doubleQuotedString: [
  170. [/[^\\"]+/, "string"],
  171. [/@escapes/, "string.escape"],
  172. [/\\./, "string.escape.invalid"],
  173. [/"/, "string", "@pop"]
  174. ],
  175. blockStyle: [[/[>|][0-9]*[+-]?$/, "operators", "@multiString"]],
  176. flowNumber: [
  177. [/@numberInteger(?=[ \t]*[,\]\}])/, "number"],
  178. [/@numberFloat(?=[ \t]*[,\]\}])/, "number.float"],
  179. [/@numberOctal(?=[ \t]*[,\]\}])/, "number.octal"],
  180. [/@numberHex(?=[ \t]*[,\]\}])/, "number.hex"],
  181. [/@numberInfinity(?=[ \t]*[,\]\}])/, "number.infinity"],
  182. [/@numberNaN(?=[ \t]*[,\]\}])/, "number.nan"],
  183. [/@numberDate(?=[ \t]*[,\]\}])/, "number.date"]
  184. ],
  185. tagHandle: [[/\![^ ]*/, "tag"]],
  186. anchor: [[/[&*][^ ]+/, "namespace"]]
  187. }
  188. };
  189. export {
  190. conf,
  191. language
  192. };
  193. /*! Bundled license information:
  194. monaco-editor/esm/vs/basic-languages/yaml/yaml.js:
  195. (*!-----------------------------------------------------------------------------
  196. * Copyright (c) Microsoft Corporation. All rights reserved.
  197. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  198. * Released under the MIT license
  199. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  200. *-----------------------------------------------------------------------------*)
  201. */
  202. //# sourceMappingURL=yaml-ZYLFYXX2.js.map