{"name":"@codemirror/lang-xml","version":"6.1.0","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","_id":"@codemirror/lang-xml@6.1.0","maintainers":[{"name":"adrianheine","email":"mail@adrianheine.de"},{"name":"marijn","email":"marijn@haverbeke.berlin"}],"homepage":"https://github.com/codemirror/lang-xml#readme","bugs":{"url":"https://github.com/codemirror/lang-xml/issues"},"dist":{"shasum":"e3e786e1a89fdc9520efe75c1d6d3de1c40eb91c","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-xml/download/@codemirror/lang-xml-6.1.0.tgz","fileCount":9,"integrity":"sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==","signatures":[{"sig":"MEUCIQDMSKrM2n95zim5a0YKwXkHBY1huGBuM0Tk0OQQlYfqygIgVj6Pm7/vuYlo0RcPnBgPic4PCE90eVCRvZfa7733NJ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45745,"size":8098,"noattachment":false,"key":"/@codemirror/lang-xml/-/@codemirror/lang-xml-6.1.0.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":"6fb53b56f59167def8d13f6838113c7f09c70984","scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/xml.ts"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"repository":{"url":"git+https://github.com/codemirror/lang-xml.git","type":"git"},"_npmVersion":"10.2.3","description":"XML language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@lezer/xml":"^1.0.0","@lezer/common":"^1.0.0","@codemirror/view":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/language":"^6.4.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/buildhelper":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lang-xml_6.1.0_1709720994736_0.20487102481636477","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":1709720994925,"_cnpm_publish_time":1709720994925,"dist-tags":{"latest":"6.1.0"}}