xml-QA4DUSGN.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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/xml/xml.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. blockComment: ["<!--", "-->"]
  25. },
  26. brackets: [["<", ">"]],
  27. autoClosingPairs: [
  28. { open: "<", close: ">" },
  29. { open: "'", close: "'" },
  30. { open: '"', close: '"' }
  31. ],
  32. surroundingPairs: [
  33. { open: "<", close: ">" },
  34. { open: "'", close: "'" },
  35. { open: '"', close: '"' }
  36. ],
  37. onEnterRules: [
  38. {
  39. beforeText: new RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  40. afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
  41. action: {
  42. indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
  43. }
  44. },
  45. {
  46. beforeText: new RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  47. action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
  48. }
  49. ]
  50. };
  51. var language = {
  52. defaultToken: "",
  53. tokenPostfix: ".xml",
  54. ignoreCase: true,
  55. qualifiedName: /(?:[\w\.\-]+:)?[\w\.\-]+/,
  56. tokenizer: {
  57. root: [
  58. [/[^<&]+/, ""],
  59. { include: "@whitespace" },
  60. [/(<)(@qualifiedName)/, [{ token: "delimiter" }, { token: "tag", next: "@tag" }]],
  61. [
  62. /(<\/)(@qualifiedName)(\s*)(>)/,
  63. [{ token: "delimiter" }, { token: "tag" }, "", { token: "delimiter" }]
  64. ],
  65. [/(<\?)(@qualifiedName)/, [{ token: "delimiter" }, { token: "metatag", next: "@tag" }]],
  66. [/(<\!)(@qualifiedName)/, [{ token: "delimiter" }, { token: "metatag", next: "@tag" }]],
  67. [/<\!\[CDATA\[/, { token: "delimiter.cdata", next: "@cdata" }],
  68. [/&\w+;/, "string.escape"]
  69. ],
  70. cdata: [
  71. [/[^\]]+/, ""],
  72. [/\]\]>/, { token: "delimiter.cdata", next: "@pop" }],
  73. [/\]/, ""]
  74. ],
  75. tag: [
  76. [/[ \t\r\n]+/, ""],
  77. [/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ["attribute.name", "", "attribute.value"]],
  78. [
  79. /(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,
  80. ["attribute.name", "", "attribute.value"]
  81. ],
  82. [/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ["attribute.name", "", "attribute.value"]],
  83. [/@qualifiedName/, "attribute.name"],
  84. [/\?>/, { token: "delimiter", next: "@pop" }],
  85. [/(\/)(>)/, [{ token: "tag" }, { token: "delimiter", next: "@pop" }]],
  86. [/>/, { token: "delimiter", next: "@pop" }]
  87. ],
  88. whitespace: [
  89. [/[ \t\r\n]+/, ""],
  90. [/<!--/, { token: "comment", next: "@comment" }]
  91. ],
  92. comment: [
  93. [/[^<\-]+/, "comment.content"],
  94. [/-->/, { token: "comment", next: "@pop" }],
  95. [/<!--/, "comment.content.invalid"],
  96. [/[<\-]/, "comment.content"]
  97. ]
  98. }
  99. };
  100. export {
  101. conf,
  102. language
  103. };
  104. /*! Bundled license information:
  105. monaco-editor/esm/vs/basic-languages/xml/xml.js:
  106. (*!-----------------------------------------------------------------------------
  107. * Copyright (c) Microsoft Corporation. All rights reserved.
  108. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  109. * Released under the MIT license
  110. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  111. *-----------------------------------------------------------------------------*)
  112. */
  113. //# sourceMappingURL=xml-QA4DUSGN.js.map