|
12 | 12 | "name": "LitElement",
|
13 | 13 | "comment": {
|
14 | 14 | "shortText": "Base element class that manages element properties and attributes, and\nrenders a lit-html template.",
|
15 |
| - "text": "To define a component, subclass `LitElement` and implement a\n`render` method to provide the component's template. Define properties\nusing the [`properties`](/docs/api/LitElement/#LitElement.properties) property or the\n[`property`](/docs/api/decorators/#property) decorator.\n" |
| 15 | + "text": "To define a component, subclass `LitElement` and implement a\n`render` method to provide the component's template. Define properties\nusing the [`properties`](/docs/v2/api/LitElement/#LitElement.properties) property or the\n[`property`](/docs/v2/api/decorators/#property) decorator.\n" |
16 | 16 | },
|
17 | 17 | "sources": [
|
18 | 18 | {
|
|
949 | 949 | "tag": "@nocollapse"
|
950 | 950 | }
|
951 | 951 | ],
|
952 |
| - "shortText": "Creates a property accessor on the element prototype if one does not exist\nand stores a [`PropertyDeclaration`](/docs/api/ReactiveElement/#PropertyDeclaration) for the property with the\ngiven options. The property setter calls the property's `hasChanged`\nproperty option or uses a strict identity check to determine whether or not\nto request an update.", |
| 952 | + "shortText": "Creates a property accessor on the element prototype if one does not exist\nand stores a [`PropertyDeclaration`](/docs/v2/api/ReactiveElement/#PropertyDeclaration) for the property with the\ngiven options. The property setter calls the property's `hasChanged`\nproperty option or uses a strict identity check to determine whether or not\nto request an update.", |
953 | 953 | "text": "This method may be overridden to customize properties; however,\nwhen doing so, it's important to call `super.createProperty` to ensure\nthe property is setup correctly. This method calls\n`getPropertyDescriptor` internally to get a descriptor to install.\nTo customize what properties do when they are get or set, override\n`getPropertyDescriptor`. To customize the options for a property,\nimplement `createProperty` like this:\n```ts\nstatic createProperty(name, options) {\n options = Object.assign(options, {myOption: true});\n super.createProperty(name, options);\n}\n```\n"
|
954 | 954 | },
|
955 | 955 | "sources": [
|
|
1222 | 1222 | }
|
1223 | 1223 | ],
|
1224 | 1224 | "shortText": "Returns the property options associated with the given property.\nThese options are defined with a `PropertyDeclaration` via the `properties`\nobject or the `@property` decorator and are registered in\n`createProperty(...)`.",
|
1225 |
| - "text": "Note, this method should be considered \"final\" and not overridden. To\ncustomize the options for a given property, override\n[`createProperty`](/docs/api/LitElement/#LitElement.createProperty).\n" |
| 1225 | + "text": "Note, this method should be considered \"final\" and not overridden. To\ncustomize the options for a given property, override\n[`createProperty`](/docs/v2/api/LitElement/#LitElement.createProperty).\n" |
1226 | 1226 | },
|
1227 | 1227 | "sources": [
|
1228 | 1228 | {
|
|
1760 | 1760 | "tag": "@nocollapse"
|
1761 | 1761 | }
|
1762 | 1762 | ],
|
1763 |
| - "shortText": "Array of styles to apply to the element. The styles should be defined\nusing the [`css`](/docs/api/styles/#css) tag function, via constructible stylesheets, or\nimported from native CSS module scripts.", |
| 1763 | + "shortText": "Array of styles to apply to the element. The styles should be defined\nusing the [`css`](/docs/v2/api/styles/#css) tag function, via constructible stylesheets, or\nimported from native CSS module scripts.", |
1764 | 1764 | "text": "Note on Content Security Policy:\nElement styles are implemented with `<style>` tags when the browser doesn't\nsupport adopted StyleSheets. To use such `<style>` tags with the style-src\nCSP directive, the style-src value must either include 'unsafe-inline' or\n`nonce-<base64-value>` with `<base64-value>` replaced be a server-generated\nnonce.\nTo provide a nonce to use on generated `<style>` elements, set\n`window.litNonce` to a server-generated nonce in your page's HTML, before\nloading application code:\n```html\n<script>\n // Generated and unique per request:\n window.litNonce = 'a1b2c3d4';\n</script>\n```\n"
|
1765 | 1765 | },
|
1766 | 1766 | "sources": [
|
|
3974 | 3974 | "tag": "@nocollapse"
|
3975 | 3975 | }
|
3976 | 3976 | ],
|
3977 |
| - "shortText": "Creates a property accessor on the element prototype if one does not exist\nand stores a [`PropertyDeclaration`](/docs/api/ReactiveElement/#PropertyDeclaration) for the property with the\ngiven options. The property setter calls the property's `hasChanged`\nproperty option or uses a strict identity check to determine whether or not\nto request an update.", |
| 3977 | + "shortText": "Creates a property accessor on the element prototype if one does not exist\nand stores a [`PropertyDeclaration`](/docs/v2/api/ReactiveElement/#PropertyDeclaration) for the property with the\ngiven options. The property setter calls the property's `hasChanged`\nproperty option or uses a strict identity check to determine whether or not\nto request an update.", |
3978 | 3978 | "text": "This method may be overridden to customize properties; however,\nwhen doing so, it's important to call `super.createProperty` to ensure\nthe property is setup correctly. This method calls\n`getPropertyDescriptor` internally to get a descriptor to install.\nTo customize what properties do when they are get or set, override\n`getPropertyDescriptor`. To customize the options for a property,\nimplement `createProperty` like this:\n```ts\nstatic createProperty(name, options) {\n options = Object.assign(options, {myOption: true});\n super.createProperty(name, options);\n}\n```\n"
|
3979 | 3979 | },
|
3980 | 3980 | "sources": [
|
|
4215 | 4215 | }
|
4216 | 4216 | ],
|
4217 | 4217 | "shortText": "Returns the property options associated with the given property.\nThese options are defined with a `PropertyDeclaration` via the `properties`\nobject or the `@property` decorator and are registered in\n`createProperty(...)`.",
|
4218 |
| - "text": "Note, this method should be considered \"final\" and not overridden. To\ncustomize the options for a given property, override\n[`createProperty`](/docs/api/ReactiveElement/#ReactiveElement.createProperty).\n" |
| 4218 | + "text": "Note, this method should be considered \"final\" and not overridden. To\ncustomize the options for a given property, override\n[`createProperty`](/docs/v2/api/ReactiveElement/#ReactiveElement.createProperty).\n" |
4219 | 4219 | },
|
4220 | 4220 | "sources": [
|
4221 | 4221 | {
|
|
4620 | 4620 | "tag": "@nocollapse"
|
4621 | 4621 | }
|
4622 | 4622 | ],
|
4623 |
| - "shortText": "Array of styles to apply to the element. The styles should be defined\nusing the [`css`](/docs/api/styles/#css) tag function, via constructible stylesheets, or\nimported from native CSS module scripts.", |
| 4623 | + "shortText": "Array of styles to apply to the element. The styles should be defined\nusing the [`css`](/docs/v2/api/styles/#css) tag function, via constructible stylesheets, or\nimported from native CSS module scripts.", |
4624 | 4624 | "text": "Note on Content Security Policy:\nElement styles are implemented with `<style>` tags when the browser doesn't\nsupport adopted StyleSheets. To use such `<style>` tags with the style-src\nCSP directive, the style-src value must either include 'unsafe-inline' or\n`nonce-<base64-value>` with `<base64-value>` replaced be a server-generated\nnonce.\nTo provide a nonce to use on generated `<style>` elements, set\n`window.litNonce` to a server-generated nonce in your page's HTML, before\nloading application code:\n```html\n<script>\n // Generated and unique per request:\n window.litNonce = 'a1b2c3d4';\n</script>\n```\n"
|
4625 | 4625 | },
|
4626 | 4626 | "sources": [
|
|
6963 | 6963 | "name": "css",
|
6964 | 6964 | "comment": {
|
6965 | 6965 | "shortText": "A template literal tag which can be used with LitElement's\n`styles` property to set element styles.",
|
6966 |
| - "text": "For security reasons, only literal string values and number may be used in\nembedded expressions. To incorporate non-literal values [`unsafeCSS`](/docs/api/styles/#unsafeCSS)\nmay be used inside an expression.\n" |
| 6966 | + "text": "For security reasons, only literal string values and number may be used in\nembedded expressions. To incorporate non-literal values [`unsafeCSS`](/docs/v2/api/styles/#unsafeCSS)\nmay be used inside an expression.\n" |
6967 | 6967 | },
|
6968 | 6968 | "sources": [
|
6969 | 6969 | {
|
|
7295 | 7295 | {
|
7296 | 7296 | "name": "unsafeCSS",
|
7297 | 7297 | "comment": {
|
7298 |
| - "shortText": "Wrap a value for interpolation in a [`css`](/docs/api/styles/#css) tagged template literal.", |
| 7298 | + "shortText": "Wrap a value for interpolation in a [`css`](/docs/v2/api/styles/#css) tagged template literal.", |
7299 | 7299 | "text": "This is unsafe because untrusted CSS text can be used to phone home\nor exfiltrate data to an attacker controlled site. Take care to only use\nthis with trusted input.\n"
|
7300 | 7300 | },
|
7301 | 7301 | "sources": [
|
|
7723 | 7723 | "tag": "@ExportDecoratedItems"
|
7724 | 7724 | }
|
7725 | 7725 | ],
|
7726 |
| - "shortText": "A property decorator which creates a reactive property that reflects a\ncorresponding attribute value. When a decorated property is set\nthe element will update and render. A [`PropertyDeclaration`](/docs/api/ReactiveElement/#PropertyDeclaration) may\noptionally be supplied to configure property features.", |
| 7726 | + "shortText": "A property decorator which creates a reactive property that reflects a\ncorresponding attribute value. When a decorated property is set\nthe element will update and render. A [`PropertyDeclaration`](/docs/v2/api/ReactiveElement/#PropertyDeclaration) may\noptionally be supplied to configure property features.", |
7727 | 7727 | "text": "This decorator should only be used for public fields. As public fields,\nproperties should be considered as primarily settable by element users,\neither via attribute or the property itself.\nGenerally, properties that are changed by the element should be private or\nprotected fields and should use the `state` decorator.\nHowever, sometimes element code does need to set a public property. This\nshould typically only be done in response to user interaction, and an event\nshould be fired informing the user; for example, a checkbox sets its\n`checked` property when clicked and fires a `changed` event. Mutating public\nproperties should typically not be done for non-primitive (object or array)\nproperties. In other cases when an element needs to manage state, a private\nproperty decorated via the `state` decorator should be used. When\nneeded, state properties can be initialized via public properties to\nfacilitate complex interactions.\n```ts\nclass MyElement {\n @property({ type: Boolean })\n clicked = false;\n}\n```\n"
|
7728 | 7728 | },
|
7729 | 7729 | "sources": [
|
|
8082 | 8082 | "name": "queryAssignedElements",
|
8083 | 8083 | "comment": {
|
8084 | 8084 | "shortText": "A property decorator that converts a class property into a getter that\nreturns the `assignedElements` of the given `slot`. Provides a declarative\nway to use\n[`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).",
|
8085 |
| - "text": "Can be passed an optional [`QueryAssignedElementsOptions`](/docs/api/decorators/#QueryAssignedElementsOptions) object.\nExample usage:\n```ts\nclass MyElement {\n @queryAssignedElements({ slot: 'list' })\n listItems!: Array<HTMLElement>;\n @queryAssignedElements()\n unnamedSlotEls!: Array<HTMLElement>;\n render() {\n return html`\n <slot name=\"list\"></slot>\n <slot></slot>\n `;\n }\n}\n```\nNote, the type of this property should be annotated as `Array<HTMLElement>`.\n" |
| 8085 | + "text": "Can be passed an optional [`QueryAssignedElementsOptions`](/docs/v2/api/decorators/#QueryAssignedElementsOptions) object.\nExample usage:\n```ts\nclass MyElement {\n @queryAssignedElements({ slot: 'list' })\n listItems!: Array<HTMLElement>;\n @queryAssignedElements()\n unnamedSlotEls!: Array<HTMLElement>;\n render() {\n return html`\n <slot name=\"list\"></slot>\n <slot></slot>\n `;\n }\n}\n```\nNote, the type of this property should be annotated as `Array<HTMLElement>`.\n" |
8086 | 8086 | },
|
8087 | 8087 | "sources": [
|
8088 | 8088 | {
|
|
8198 | 8198 | "name": "queryAssignedNodes",
|
8199 | 8199 | "comment": {
|
8200 | 8200 | "shortText": "A property decorator that converts a class property into a getter that\nreturns the `assignedNodes` of the given `slot`.",
|
8201 |
| - "text": "Can be passed an optional [`QueryAssignedNodesOptions`](/docs/api/decorators/#QueryAssignedNodesOptions) object.\nExample usage:\n```ts\nclass MyElement {\n @queryAssignedNodes({slot: 'list', flatten: true})\n listItems!: Array<Node>;\n render() {\n return html`\n <slot name=\"list\"></slot>\n `;\n }\n}\n```\nNote the type of this property should be annotated as `Array<Node>`.\n" |
| 8201 | + "text": "Can be passed an optional [`QueryAssignedNodesOptions`](/docs/v2/api/decorators/#QueryAssignedNodesOptions) object.\nExample usage:\n```ts\nclass MyElement {\n @queryAssignedNodes({slot: 'list', flatten: true})\n listItems!: Array<Node>;\n render() {\n return html`\n <slot name=\"list\"></slot>\n `;\n }\n}\n```\nNote the type of this property should be annotated as `Array<Node>`.\n" |
8202 | 8202 | },
|
8203 | 8203 | "sources": [
|
8204 | 8204 | {
|
|
8709 | 8709 | {
|
8710 | 8710 | "name": "QueryAssignedElementsOptions",
|
8711 | 8711 | "comment": {
|
8712 |
| - "shortText": "Options for the [`queryAssignedElements`](/docs/api/decorators/#queryAssignedElements) decorator. Extends the\noptions that can be passed into\n[HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements)." |
| 8712 | + "shortText": "Options for the [`queryAssignedElements`](/docs/v2/api/decorators/#queryAssignedElements) decorator. Extends the\noptions that can be passed into\n[HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements)." |
8713 | 8713 | },
|
8714 | 8714 | "children": [
|
8715 | 8715 | {
|
|
8830 | 8830 | {
|
8831 | 8831 | "name": "QueryAssignedNodesOptions",
|
8832 | 8832 | "comment": {
|
8833 |
| - "shortText": "Options for the [`queryAssignedNodes`](/docs/api/decorators/#queryAssignedNodes) decorator. Extends the options\nthat can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes)." |
| 8833 | + "shortText": "Options for the [`queryAssignedNodes`](/docs/v2/api/decorators/#queryAssignedNodes) decorator. Extends the options\nthat can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes)." |
8834 | 8834 | },
|
8835 | 8835 | "children": [
|
8836 | 8836 | {
|
|
28227 | 28227 | {
|
28228 | 28228 | "name": "PropertyValueMap",
|
28229 | 28229 | "comment": {
|
28230 |
| - "shortText": "Do not use, instead prefer [`PropertyValues`](/docs/api/ReactiveElement/#PropertyValues)." |
| 28230 | + "shortText": "Do not use, instead prefer [`PropertyValues`](/docs/v2/api/ReactiveElement/#PropertyValues)." |
28231 | 28231 | },
|
28232 | 28232 | "children": [
|
28233 | 28233 | {
|
|
0 commit comments