{"name":"@codemirror/lang-xml","version":"0.20.0","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijnh@gmail.com"},"license":"MIT","_id":"@codemirror/lang-xml@0.20.0","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":"7bf24a0e9e817fdb826d14ecb0af73dbce4d9ccc","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-xml/download/@codemirror/lang-xml-0.20.0.tgz","fileCount":8,"integrity":"sha512-8AswydqBA379Dj9qPI0VXpVapSNhZpfNfd1Fi+kbKsRt0bWdsL6p9onRBdH/32a75LVf5Zz2LskkjOlBanXgfA==","signatures":[{"sig":"MEYCIQCtrIJJ7X28xhUaExMnyuduZM3bzcJ+sWAB4Yfc01q2PAIhANKSOHieYRhIZBvMnXHn9hQFQcrKyidCgMnI41j3hQvM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYBYKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFYQ/9EkQ2ApAxwQfVbSbhgSc/wKUldNIYDsYTeNppzSE5DDzrtVSs\r\nE3+f6adgb2s+YcADQJ2VxTPZaCkWmPrVdPGTgiVQ2ZZryISldke+oY/3x9KT\r\nKk54UkoTb1PX1NMpBn54OyGd1ai8eysSj0qAAjJNwf37LUD0K7SOqaqVsWwS\r\nIDz0YqsLwQXRF2I8Xfwb9z97H01rKOlsHl2jMzhyXPr3lBqPOzxKEWDVWNFK\r\n3rOLHFN/P85yrwCZbiug7h5lZDweX82tEkGQzWLbCR//iylD6ckF/Xh7NGk+\r\n3TFOe3KnLuI8c/6JMUB9oG4s/DaZZjY4ILXgPrfW1KLZKz78pf1QkifIdL6t\r\nVSzf5Nce4aXHiExUPZ4QBHklasGSea05nzkm2XCP1U4oVkLwQPSgtI7uD6v0\r\nEV7nYwgSeORB41zQHkL9mrb2kFldbxwX5yHGTzkLW5H6alIW+yGp51kMHCUU\r\nd9VKozD+71BwkeAFgYVz/ZR/fGOq14+BDOK52LYIUGiutuWy7CdG0DjX6Mvi\r\n4/eS+ZjUugu/6jV7t+wr4H8hlP387jEAEdTyZrF3kzAyph+/X+Arvt1hBYyS\r\noqqcH3apnU68x2DeP5l5o8qpATAJ6HEggEXD4dAtJmD+riyAuggayVF1GFhv\r\nxW4agvlRrmHr1W8idqc2uDypGXQvfIJR2cg=\r\n=wc2+\r\n-----END PGP SIGNATURE-----\r\n","size":6785,"noattachment":false,"key":"/@codemirror/lang-xml/-/@codemirror/lang-xml-0.20.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":"39a5f4401195ffaacd2da1807e5470231e6b565b","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.4.0","description":"XML language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"16.13.1","dependencies":{"@lezer/xml":"^0.16.0","@lezer/common":"^0.16.0","@codemirror/state":"^0.20.0","@codemirror/language":"^0.20.0","@codemirror/autocomplete":"^0.20.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/buildhelper":"^0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/lang-xml_0.20.0_1650464266071_0.3761933088978755","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":1650464266209,"_cnpm_publish_time":1650464266209,"dist-tags":{"latest":"6.1.0"}}