{"name":"@codemirror/lang-xml","version":"6.0.2","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijnh@gmail.com"},"license":"MIT","_id":"@codemirror/lang-xml@6.0.2","maintainers":[{"name":"adrianheine","email":"mail@adrianheine.de"},{"name":"marijn","email":"marijnh@gmail.com"}],"homepage":"https://github.com/codemirror/lang-xml#readme","bugs":{"url":"https://github.com/codemirror/lang-xml/issues"},"dist":{"shasum":"66f75390bf8013fd8645db9cdd0b1d177e0777a4","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-xml/download/@codemirror/lang-xml-6.0.2.tgz","fileCount":8,"integrity":"sha512-JQYZjHL2LAfpiZI2/qZ/qzDuSqmGKMwyApYmEUUCTxLM4MWS7sATUEfIguZQr9Zjx/7gcdnewb039smF6nC2zw==","signatures":[{"sig":"MEUCIF4FZN2iTlb0nfymMZ+yn3wkNjRfXq0Ep8yuwSIZLRfwAiEAkmIXXkO5gTiZgWObZ3N9gPDfFi2X6e086UQ44guwhWY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwB6eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpthA//YjTkbw7IF8U24FQ1x+Z+mSCHeSvjPqmeXilPWrPUFkLJutKw\r\noywP2Y9+obTXbJs0I3ej5cjNaagyOeg27zjhm2qQzPTUVVBt5sytqlAGB/S9\r\n5anOd1av7E7zbMCsetVByM+22knK446gbYg6ZpWwV+aZskEiJLvu0WvPPlIQ\r\nHLbKwGbXN8N+YPbHvsC5srwUEGnMTnL3RbCoD4t4hK3zkdcN77CV4t/s/1EP\r\nOYBtRQTh3sI7Rrn5qnWJHWgUe7IQM8f3zVFqL9Qj4ha5vJQUEbNQBHn33b8o\r\nIzOFjo5JNsF/ZYtAd8CYS4PPs0nxR7NDoICR/sUzr9g0sLARqiKuKg8rCtRH\r\ny+cWR3z9jmUR13R5JYzQsZNp31xUlJjJ3NOIePaZO8ZN6GlraITtXjr8D3GG\r\nkYqzN0cjWSE8YxNJyurR/qMmcPECr+qltjv7THWiOdcGqPQWYJfsIcGX/D6K\r\ng0mU0hk4gzZ9fOPQ3r9SbapI+P7UjG6SRpYA4uqUEUvcFRBsb8gqOjEIATe0\r\nK8h2UOXudKwLH+ngp3N5rLC56inPI6maA6ykSMTyhoT5ITE9ISppd32O8tkU\r\nN1s/Y+br0PQlxLr8sOZFzNIk1h0P4ow5OleD7pmaAzAJA/7APV4TZriL/5iR\r\nn7/Y7leBSbYk67QDxa7yuL2Ohsq94aOvdGw=\r\n=m+cm\r\n-----END PGP SIGNATURE-----\r\n","size":6948,"noattachment":false,"key":"/@codemirror/lang-xml/-/@codemirror/lang-xml-6.0.2.tgz"},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"ec7eeb6dadbf4840c0ecacee09d7377ec4bbd10d","scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/xml.ts"},"_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"repository":{"url":"git+https://github.com/codemirror/lang-xml.git","type":"git"},"_npmVersion":"8.19.2","description":"XML language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@lezer/xml":"^1.0.0","@lezer/common":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/language":"^6.4.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/buildhelper":"^0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/lang-xml_6.0.2_1673535134039_0.2546541266306852","host":"s3://npm-registry-packages"},"readme":"<!-- NOTE: README.md is generated from src/README.md -->\n\n# @codemirror/lang-xml [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-xml.svg)](https://www.npmjs.org/package/@codemirror/lang-xml)\n\n[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-xml/blob/main/CHANGELOG.md) ]\n\nThis package implements XML language support for the\n[CodeMirror](https://codemirror.net/) code editor.\n\nThe [project page](https://codemirror.net/) has more information, a\nnumber of [examples](https://codemirror.net/examples/) and the\n[documentation](https://codemirror.net/docs/).\n\nThis code is released under an\n[MIT license](https://github.com/codemirror/lang-xml/tree/main/LICENSE).\n\nWe aim to be an inclusive, welcoming community. To make that explicit,\nwe have a [code of\nconduct](http://contributor-covenant.org/version/1/1/0/) that applies\nto communication around the project.\n\n## API Reference\n\n<dl>\n<dt id=\"user-content-xml\">\n  <code><strong><a href=\"#user-content-xml\">xml</a></strong>(<a id=\"user-content-xml^conf\" href=\"#user-content-xml^conf\">conf</a>&#8288;?: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\">Object</a> = {}) → <a href=\"https://codemirror.net/docs/ref#language.LanguageSupport\">LanguageSupport</a></code></dt>\n\n<dd><p>XML language support. Includes schema-based autocompletion when\nconfigured.</p>\n<dl><dt id=\"user-content-xml^conf\">\n  <code><strong><a href=\"#user-content-xml^conf\">conf</a></strong></code></dt>\n\n<dd><dl><dt id=\"user-content-xml^conf.elements\">\n  <code><strong><a href=\"#user-content-xml^conf.elements\">elements</a></strong>&#8288;?: readonly <a href=\"#user-content-elementspec\">ElementSpec</a>[]</code></dt>\n\n<dd><p>Provide a schema to create completions from.</p>\n</dd><dt id=\"user-content-xml^conf.attributes\">\n  <code><strong><a href=\"#user-content-xml^conf.attributes\">attributes</a></strong>&#8288;?: readonly <a href=\"#user-content-attrspec\">AttrSpec</a>[]</code></dt>\n\n<dd><p>Supporting attribute descriptions for the schema specified in\n<a href=\"#user-content-xml%5econf.elements\"><code>elements</code></a>.</p>\n</dd><dt id=\"user-content-xml^conf.autoclosetags\">\n  <code><strong><a href=\"#user-content-xml^conf.autoclosetags\">autoCloseTags</a></strong>&#8288;?: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\">boolean</a></code></dt>\n\n<dd><p>Determines whether <a href=\"#user-content-autoclosetags\"><code>autoCloseTags</code></a>\nis included in the support extensions. Defaults to true.</p>\n</dd></dl></dd></dl></dd>\n<dt id=\"user-content-xmllanguage\">\n  <code><strong><a href=\"#user-content-xmllanguage\">xmlLanguage</a></strong>: <a href=\"https://codemirror.net/docs/ref#language.LRLanguage\">LRLanguage</a></code></dt>\n\n<dd><p>A language provider based on the <a href=\"https://github.com/lezer-parser/xml\">Lezer XML\nparser</a>, extended with\nhighlighting and indentation information.</p>\n</dd>\n<dt id=\"user-content-elementspec\">\n  <h4>\n    <code>interface</code>\n    <a href=\"#user-content-elementspec\">ElementSpec</a></h4>\n</dt>\n\n<dd><p>Describes an element in your XML document schema.</p>\n<dl><dt id=\"user-content-elementspec.name\">\n  <code><strong><a href=\"#user-content-elementspec.name\">name</a></strong>: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a></code></dt>\n\n<dd><p>The element name.</p>\n</dd><dt id=\"user-content-elementspec.children\">\n  <code><strong><a href=\"#user-content-elementspec.children\">children</a></strong>&#8288;?: readonly <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a>[]</code></dt>\n\n<dd><p>Allowed children in this element. When not given, all elements\nare allowed inside it.</p>\n</dd><dt id=\"user-content-elementspec.textcontent\">\n  <code><strong><a href=\"#user-content-elementspec.textcontent\">textContent</a></strong>&#8288;?: readonly <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a>[]</code></dt>\n\n<dd><p>When given, allows users to complete the given content strings\nas plain text when at the start of the element.</p>\n</dd><dt id=\"user-content-elementspec.top\">\n  <code><strong><a href=\"#user-content-elementspec.top\">top</a></strong>&#8288;?: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\">boolean</a></code></dt>\n\n<dd><p>Whether this element may appear at the top of the document.</p>\n</dd><dt id=\"user-content-elementspec.attributes\">\n  <code><strong><a href=\"#user-content-elementspec.attributes\">attributes</a></strong>&#8288;?: readonly (<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a> | <a href=\"#user-content-attrspec\">AttrSpec</a>)[]</code></dt>\n\n<dd><p>Allowed attributes in this element. Strings refer to attributes\nspecified in <a href=\"#user-content-xmlconfig.attrs\"><code>XMLConfig.attrs</code></a>, but\nyou can also provide one-off <a href=\"#user-content-attrspec\">attribute\nspecs</a>. Attributes marked as\n<a href=\"#user-content-attrspec.global\"><code>global</code></a> are allowed in every\nelement, and don't have to be mentioned here.</p>\n</dd><dt id=\"user-content-elementspec.completion\">\n  <code><strong><a href=\"#user-content-elementspec.completion\">completion</a></strong>&#8288;?: <a href=\"https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype\">Partial</a>&lt;<a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>&gt;</code></dt>\n\n<dd><p>Can be provided to add extra fields to the\n<a href=\"#user-content-autocompletion.completion\">completion</a> object created for this\nelement.</p>\n</dd></dl>\n\n</dd>\n<dt id=\"user-content-attrspec\">\n  <h4>\n    <code>interface</code>\n    <a href=\"#user-content-attrspec\">AttrSpec</a></h4>\n</dt>\n\n<dd><p>Describes an attribute in your XML schema.</p>\n<dl><dt id=\"user-content-attrspec.name\">\n  <code><strong><a href=\"#user-content-attrspec.name\">name</a></strong>: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a></code></dt>\n\n<dd><p>The attribute name.</p>\n</dd><dt id=\"user-content-attrspec.values\">\n  <code><strong><a href=\"#user-content-attrspec.values\">values</a></strong>&#8288;?: readonly (<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a> | <a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>)[]</code></dt>\n\n<dd><p>Pre-defined values to complete for this attribute.</p>\n</dd><dt id=\"user-content-attrspec.global\">\n  <code><strong><a href=\"#user-content-attrspec.global\">global</a></strong>&#8288;?: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\">boolean</a></code></dt>\n\n<dd><p>When <code>true</code>, this attribute can be added to all elements.</p>\n</dd><dt id=\"user-content-attrspec.completion\">\n  <code><strong><a href=\"#user-content-attrspec.completion\">completion</a></strong>&#8288;?: <a href=\"https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype\">Partial</a>&lt;<a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>&gt;</code></dt>\n\n<dd><p>Provides extra fields to the\n<a href=\"#user-content-autocompletion.completion\">completion</a> object created for this\nelement</p>\n</dd></dl>\n\n</dd>\n<dt id=\"user-content-completefromschema\">\n  <code><strong><a href=\"#user-content-completefromschema\">completeFromSchema</a></strong>(<a id=\"user-content-completefromschema^eltspecs\" href=\"#user-content-completefromschema^eltspecs\">eltSpecs</a>: readonly <a href=\"#user-content-elementspec\">ElementSpec</a>[], <a id=\"user-content-completefromschema^attrspecs\" href=\"#user-content-completefromschema^attrspecs\">attrSpecs</a>: readonly <a href=\"#user-content-attrspec\">AttrSpec</a>[]) → <a href=\"https://codemirror.net/docs/ref#autocomplete.CompletionSource\">CompletionSource</a></code></dt>\n\n<dd><p>Create a completion source for the given schema.</p>\n</dd>\n<dt id=\"user-content-autoclosetags\">\n  <code><strong><a href=\"#user-content-autoclosetags\">autoCloseTags</a></strong>: <a href=\"https://codemirror.net/docs/ref#state.Extension\">Extension</a></code></dt>\n\n<dd><p>Extension that will automatically insert close tags when a <code>&gt;</code> or\n<code>/</code> is typed.</p>\n</dd>\n</dl>\n","publish_time":1673535134194,"_cnpm_publish_time":1673535134194,"dist-tags":{"latest":"6.1.0"}}