{"name":"@codemirror/lang-xml","version":"0.17.1","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijnh@gmail.com"},"license":"MIT","_id":"@codemirror/lang-xml@0.17.1","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":"18cf81eeb18f0d49d7a453db5e92d65aef3535bf","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-xml/download/@codemirror/lang-xml-0.17.1.tgz","fileCount":10,"integrity":"sha512-AGeaX8pqjsTYSuCz+bvIm9piBLENm0MQ/YH+CkfeQOkGgHYUojqkLi4JDlMMC5fNfSxjMb39mrN0WRV1ET0Wpw==","signatures":[{"sig":"MEUCIQCLIFF7MwMiya//E7ICO+W4xwsFoplkyldkQeV3TffWVgIgcIf5PCIq+bPBkUbZhkGkwpKMDmmB/H0eToM64UO5EA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9g/oCRA9TVsSAnZWagAAweEP/AjZqf6TmLlNpyV+lvSF\nmo9VLoZ+rGQEN3mHI2QUtOFOxzS0iJCLLadseYbgV523CI8lnZh/M1cwv6cT\nww5scKOwfrDpriwoF/HmhddvEjZ0b2XECigvNlyLC2r1ODZXK4WeBh+gc7Eg\n4yTge6gVGVqN/X3D8GMe5C1+p1blbCZh+c0QYoLceyjnaxvhtBQsEkRiBz6Z\ngF6+CmwEmwLE5EUI6K1wwBnwUBSTZ9RVnCJOuBbkkYtD4MdJDZdcXXxIdt9e\n7ooORf5dESlQPs0aOdYLHa1sBKSjZrj9jHtZd0c8lE1ZBnVppkSrQP0nlasd\nO+fJR/lxyFGmZkAjPzHIUVGNX0iKI6GxTydHvzyrngBegYMPQfNDkJa24ULD\nu3Bcg5adC45V7L2QOtNTJhoE8sHlA0JOek1lEi7OpHxbMLTT3Jd4uhaJW/h2\nBOZRo+30u1JsoajqaUfYhMttojcUnQfJq4C1bcvYOnLqrX1AYibOF7BibmrZ\nH+u0t4n9RwGYH9exsGBAE842ZplbilkfGMMtIcsEJY3qqosyFXl/tSyf9gQe\n32M+vFDgbw+1GU/oND3+X0dHDYB9kM567WKIQymMSCAsdr4C0/cmZMv80n7W\niAUcz4a+cke7qHOSb/WNB9AOa9IVDn7FSGG+gYCkX85pdLxG4MNDS/JuK8bN\n0ueF\r\n=2Bbo\r\n-----END PGP SIGNATURE-----\r\n","size":10058,"noattachment":false,"key":"/@codemirror/lang-xml/-/@codemirror/lang-xml-0.17.1.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":"92fe0d7f4096846bdf29a8fe39f6e6f29bdb3e68","scripts":{"test":"mocha test/test-*.js","prepare":"tsc -p tsconfig.local.json && rollup -c"},"_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"repository":{"url":"git+https://github.com/codemirror/lang-xml.git","type":"git"},"_npmVersion":"7.3.0","description":"XML language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"15.5.0","dependencies":{"lezer-xml":"^0.13.0","lezer-tree":"^0.13.0","@codemirror/state":"^0.17.0","@codemirror/language":"^0.17.0","@codemirror/highlight":"^0.17.0","@codemirror/autocomplete":"^0.17.0"},"_hasShrinkwrap":false,"devDependencies":{"ist":"^1.1.6","mocha":"^7.1.1","rollup":"^2.35.1","typescript":"^4.1.3","@types/mocha":"^5.2.0","rollup-plugin-dts":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/lang-xml_0.17.1_1609961447350_0.9884203018519073","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":1609961447438,"_cnpm_publish_time":1609961447438,"dist-tags":{"latest":"6.1.0"}}