{"name":"@codemirror/lang-xml","version":"0.17.0","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijnh@gmail.com"},"license":"MIT","_id":"@codemirror/lang-xml@0.17.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":"af523172618f8ee4d4ac91778af6c074de32f10d","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-xml/download/@codemirror/lang-xml-0.17.0.tgz","fileCount":7,"integrity":"sha512-vosh0vumcFMwzi+Uwt+esedLc0bKBqttTGs0qFtMzU2OGGLT+ND869bW0zLmLXgXdcgMEHZdTO5npzFxN9PgoQ==","signatures":[{"sig":"MEQCIFioDUZ2hVVb5kmalaly1r63ftadNca49e/0Bs225Y6yAiAh5GsdoTcXbllkXrd1LKVf1/TD8TXTM00rBXCvwopvLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64l/CRA9TVsSAnZWagAAww0P/Axypxw3AXibrJFOffPA\nFGXKGtvK2smJI9KsVo/CQv9TZHZpRM7tAN9Ny53C7hVqGhuIixoi4vflEqwU\nCBdoThy0qWoE486wO4/Z8JNweej0ZGEE+sD5KYi/INGT7entVFFbnTZifRtZ\nJBKThbEpJ8/jOgvZlTeqboygXTSCPFBuoCEDyPGlonHNfI6ryA+iHalRM9+a\nTOnbzPgFU+CuX2J+IKvSzQ+BN13mp2GV6/tlHpWntyIddakaGmgTDC6RUevq\ni6Qk2M+n+j+K6AHv6M3Rp17YhWT9/HXR+2AfJ0eCwfHZK218jWsqhpD8j8CZ\n3jufZTNJ5LTmtZzgR4PSxQrYwLebUSvbajBFAzW5GXt9a6hJQjRP5VBTEYis\nAPXEzF5cYMATWFOLBvLsytyXi4wcELZTyVt3r9Q25vbzyXs1Z3/g+FOiKIur\nBYCL23eCLGJOD3LiPkcUBoelZDxtb+ArQVpEIdb0WW+P/MWHHhzaWNRJoqZC\nj68NFahoIMVOIVe3GAuiOXRuTFp0yOy4g/+jdElkGJEiZbWWmCIwHvoZCvCj\npLyAYLTaOzn2HPy/TdH4hTBnBY/gOL3e+n5/BddfAUj35mW9nZ4/SJPLF+0M\nRwb+P9909klA1fWvtf0mUmJkElZtslcYL9O+XT8nlTA6lf7iTWRdmVa5tcKr\n6nVK\r\n=ko8H\r\n-----END PGP SIGNATURE-----\r\n","size":8699,"noattachment":false,"key":"/@codemirror/lang-xml/-/@codemirror/lang-xml-0.17.0.tgz"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"807f88403eda8e42428daaeff57b7b1bec0ad406","scripts":{"test":"mocha test/test-*.js","prepare":"tsc && 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.0_1609271678371_0.9006974020733733","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":1609271678496,"_cnpm_publish_time":1609271678496,"dist-tags":{"latest":"6.1.0"}}