graphql-X6YAY2XH.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js
  3. var conf = {
  4. comments: {
  5. lineComment: "#"
  6. },
  7. brackets: [
  8. ["{", "}"],
  9. ["[", "]"],
  10. ["(", ")"]
  11. ],
  12. autoClosingPairs: [
  13. { open: "{", close: "}" },
  14. { open: "[", close: "]" },
  15. { open: "(", close: ")" },
  16. { open: '"""', close: '"""', notIn: ["string", "comment"] },
  17. { open: '"', close: '"', notIn: ["string", "comment"] }
  18. ],
  19. surroundingPairs: [
  20. { open: "{", close: "}" },
  21. { open: "[", close: "]" },
  22. { open: "(", close: ")" },
  23. { open: '"""', close: '"""' },
  24. { open: '"', close: '"' }
  25. ],
  26. folding: {
  27. offSide: true
  28. }
  29. };
  30. var language = {
  31. defaultToken: "invalid",
  32. tokenPostfix: ".gql",
  33. keywords: [
  34. "null",
  35. "true",
  36. "false",
  37. "query",
  38. "mutation",
  39. "subscription",
  40. "extend",
  41. "schema",
  42. "directive",
  43. "scalar",
  44. "type",
  45. "interface",
  46. "union",
  47. "enum",
  48. "input",
  49. "implements",
  50. "fragment",
  51. "on"
  52. ],
  53. typeKeywords: ["Int", "Float", "String", "Boolean", "ID"],
  54. directiveLocations: [
  55. "SCHEMA",
  56. "SCALAR",
  57. "OBJECT",
  58. "FIELD_DEFINITION",
  59. "ARGUMENT_DEFINITION",
  60. "INTERFACE",
  61. "UNION",
  62. "ENUM",
  63. "ENUM_VALUE",
  64. "INPUT_OBJECT",
  65. "INPUT_FIELD_DEFINITION",
  66. "QUERY",
  67. "MUTATION",
  68. "SUBSCRIPTION",
  69. "FIELD",
  70. "FRAGMENT_DEFINITION",
  71. "FRAGMENT_SPREAD",
  72. "INLINE_FRAGMENT",
  73. "VARIABLE_DEFINITION"
  74. ],
  75. operators: ["=", "!", "?", ":", "&", "|"],
  76. symbols: /[=!?:&|]+/,
  77. escapes: /\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,
  78. tokenizer: {
  79. root: [
  80. [
  81. /[a-z_][\w$]*/,
  82. {
  83. cases: {
  84. "@keywords": "keyword",
  85. "@default": "key.identifier"
  86. }
  87. }
  88. ],
  89. [
  90. /[$][\w$]*/,
  91. {
  92. cases: {
  93. "@keywords": "keyword",
  94. "@default": "argument.identifier"
  95. }
  96. }
  97. ],
  98. [
  99. /[A-Z][\w\$]*/,
  100. {
  101. cases: {
  102. "@typeKeywords": "keyword",
  103. "@default": "type.identifier"
  104. }
  105. }
  106. ],
  107. { include: "@whitespace" },
  108. [/[{}()\[\]]/, "@brackets"],
  109. [/@symbols/, { cases: { "@operators": "operator", "@default": "" } }],
  110. [/@\s*[a-zA-Z_\$][\w\$]*/, { token: "annotation", log: "annotation token: $0" }],
  111. [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
  112. [/0[xX][0-9a-fA-F]+/, "number.hex"],
  113. [/\d+/, "number"],
  114. [/[;,.]/, "delimiter"],
  115. [/"""/, { token: "string", next: "@mlstring", nextEmbedded: "markdown" }],
  116. [/"([^"\\]|\\.)*$/, "string.invalid"],
  117. [/"/, { token: "string.quote", bracket: "@open", next: "@string" }]
  118. ],
  119. mlstring: [
  120. [/[^"]+/, "string"],
  121. ['"""', { token: "string", next: "@pop", nextEmbedded: "@pop" }]
  122. ],
  123. string: [
  124. [/[^\\"]+/, "string"],
  125. [/@escapes/, "string.escape"],
  126. [/\\./, "string.escape.invalid"],
  127. [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
  128. ],
  129. whitespace: [
  130. [/[ \t\r\n]+/, ""],
  131. [/#.*$/, "comment"]
  132. ]
  133. }
  134. };
  135. export {
  136. conf,
  137. language
  138. };
  139. /*! Bundled license information:
  140. monaco-editor/esm/vs/basic-languages/graphql/graphql.js:
  141. (*!-----------------------------------------------------------------------------
  142. * Copyright (c) Microsoft Corporation. All rights reserved.
  143. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  144. * Released under the MIT license
  145. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  146. *-----------------------------------------------------------------------------*)
  147. */
  148. //# sourceMappingURL=graphql-X6YAY2XH.js.map