Skip to content

Commit

Permalink
docs(lit-override): added notes, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
waldronmatt committed Sep 1, 2024
1 parent c4e3974 commit 0585be6
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 205 deletions.
2 changes: 1 addition & 1 deletion apps/lit-override/src/ts/shadow-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class HostApp extends LitElement {
private renderMarkupOverride() {
const message = 'Hello world';
return html`
<p>Templating support from lit-html: ${message}</p>
<p>Templating support from lit-html: ${message}!</p>
<slot name="heading"></slot>
<slot name="sub-heading"></slot>
`;
Expand Down
288 changes: 144 additions & 144 deletions packages/lit-override/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,107 @@
"declarations": [],
"exports": []
},
{
"kind": "javascript-module",
"path": "src/controllers/adopted-stylesheets-converter.ts",
"declarations": [
{
"kind": "class",
"description": "AdoptedStyleSheetsConverter\n\nDetects a `style` tag inside a `template` element from the light DOM, converts the styles,\nand adds it to the component's `adoptedStyleSheets`.",
"name": "AdoptedStyleSheetsConverter",
"members": [
{
"kind": "field",
"name": "host",
"type": {
"text": "ReactiveControllerHost"
},
"default": "host"
},
{
"kind": "field",
"name": "clearStyles",
"type": {
"text": "AdoptedStyleSheetsConverterParams['clearStyles']"
},
"default": "clearStyles"
},
{
"kind": "field",
"name": "templateEl",
"type": {
"text": "AdoptedStyleSheetsConverterParams['templateEl']"
},
"default": "templateEl"
},
{
"kind": "field",
"name": "_shadowRoot",
"type": {
"text": "ShadowRoot"
},
"default": "(this.host as LitElement).renderRoot"
},
{
"kind": "method",
"name": "hostConnected"
},
{
"kind": "method",
"name": "hostUpdated"
},
{
"kind": "method",
"name": "updateStylesheet",
"privacy": "private"
},
{
"kind": "method",
"name": "setAdoptedStyleSheets",
"privacy": "private",
"parameters": [
{
"name": "styleElement",
"type": {
"text": "HTMLStyleElement"
}
}
]
},
{
"kind": "method",
"name": "removeComponentStyleTag",
"privacy": "private"
}
]
}
],
"exports": [
{
"kind": "js",
"name": "AdoptedStyleSheetsConverter",
"declaration": {
"name": "AdoptedStyleSheetsConverter",
"module": "src/controllers/adopted-stylesheets-converter.ts"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/controllers/index.ts",
"declarations": [],
"exports": [
{
"kind": "js",
"name": "*",
"declaration": {
"name": "*",
"package": "./adopted-stylesheets-converter.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/components/index.ts",
Expand Down Expand Up @@ -228,214 +329,113 @@
},
{
"kind": "javascript-module",
"path": "src/decorators/index.ts",
"path": "src/directives/index.ts",
"declarations": [],
"exports": [
{
"kind": "js",
"name": "*",
"declaration": {
"name": "*",
"package": "./query-template-by-id.js"
"package": "./template-content-with-fallback.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/decorators/query-template-by-id.ts",
"path": "src/directives/template-content-with-fallback.ts",
"declarations": [
{
"kind": "function",
"name": "queryTemplateById",
"parameters": [
{
"name": "{ fallback = false }",
"default": "{}",
"type": {
"text": "QueryTemplateByIdParams"
}
},
{
"description": "gets a template element if an id is not provided (not cached). Defaults to `false`.",
"name": "fallback"
}
],
"description": "queryTemplateById\n\nGets a template element by id that is provided to the `templateId` property.\nWill cache the template element on successful query."
}
],
"exports": [
{
"kind": "js",
"name": "queryTemplateById",
"declaration": {
"name": "queryTemplateById",
"module": "src/decorators/query-template-by-id.ts"
"kind": "class",
"description": "",
"name": "TemplateContentWithFallbackDirective",
"members": [],
"superclass": {
"name": "Directive",
"package": "lit/directive.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/controllers/adopted-stylesheets-converter.ts",
"declarations": [
},
{
"kind": "class",
"description": "AdoptedStyleSheetsConverter\n\nDetects a `style` tag inside a `template` element from the light DOM, converts the styles,\nand adds it to the component's `adoptedStyleSheets`.",
"name": "AdoptedStyleSheetsConverter",
"members": [
{
"kind": "field",
"name": "host",
"type": {
"text": "ReactiveControllerHost"
},
"default": "host"
},
{
"kind": "field",
"name": "clearStyles",
"type": {
"text": "AdoptedStyleSheetsConverterParams['clearStyles']"
},
"default": "clearStyles"
},
{
"kind": "field",
"name": "templateEl",
"type": {
"text": "AdoptedStyleSheetsConverterParams['templateEl']"
},
"default": "templateEl"
},
{
"kind": "field",
"name": "_shadowRoot",
"type": {
"text": "ShadowRoot"
},
"default": "(this.host as LitElement).renderRoot"
},
{
"kind": "method",
"name": "hostConnected"
},
{
"kind": "method",
"name": "hostUpdated"
},
{
"kind": "method",
"name": "updateStylesheet",
"privacy": "private"
},
"kind": "variable",
"name": "templateContentWithFallback",
"description": "TemplateContentWithFallbackDirective\n\nDetects a `template` element from the light DOM and renders it.\nWill fallback to your component's markup provided as an argument.",
"parameters": [
{
"kind": "method",
"name": "setAdoptedStyleSheets",
"privacy": "private",
"parameters": [
{
"name": "styleElement",
"type": {
"text": "HTMLStyleElement"
}
}
]
"description": "renders markup if a `template` element is not found. Defaults to `<slot></slot>`.",
"name": "fallback"
},
{
"kind": "method",
"name": "removeComponentStyleTag",
"privacy": "private"
"description": "a `template` element. Defaults to null.",
"name": "templateEl"
}
]
}
],
"exports": [
{
"kind": "js",
"name": "AdoptedStyleSheetsConverter",
"name": "templateContentWithFallback",
"declaration": {
"name": "AdoptedStyleSheetsConverter",
"module": "src/controllers/adopted-stylesheets-converter.ts"
"name": "templateContentWithFallback",
"module": "src/directives/template-content-with-fallback.ts"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/controllers/index.ts",
"declarations": [],
"exports": [
},
{
"kind": "js",
"name": "*",
"name": "TemplateContentWithFallbackDirective",
"declaration": {
"name": "*",
"package": "./adopted-stylesheets-converter.js"
"name": "TemplateContentWithFallbackDirective",
"module": "src/directives/template-content-with-fallback.ts"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/directives/index.ts",
"path": "src/decorators/index.ts",
"declarations": [],
"exports": [
{
"kind": "js",
"name": "*",
"declaration": {
"name": "*",
"package": "./template-content-with-fallback.js"
"package": "./query-template-by-id.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/directives/template-content-with-fallback.ts",
"path": "src/decorators/query-template-by-id.ts",
"declarations": [
{
"kind": "class",
"description": "",
"name": "TemplateContentWithFallbackDirective",
"members": [],
"superclass": {
"name": "Directive",
"package": "lit/directive.js"
}
},
{
"kind": "variable",
"name": "templateContentWithFallback",
"description": "TemplateContentWithFallbackDirective\n\nDetects a `template` element from the light DOM and renders it.\nWill fallback to your component's markup provided as an argument.",
"kind": "function",
"name": "queryTemplateById",
"parameters": [
{
"description": "renders markup if a `template` element is not found. Defaults to `<slot></slot>`.",
"name": "fallback"
"name": "{ fallback = false }",
"default": "{}",
"type": {
"text": "QueryTemplateByIdParams"
}
},
{
"description": "a `template` element. Defaults to null.",
"name": "templateEl"
"description": "gets a template element if an id is not provided (not cached). Defaults to `false`.",
"name": "fallback"
}
]
],
"description": "queryTemplateById\n\nGets a template element by id that is provided to the `templateId` property.\nWill cache the template element on successful query."
}
],
"exports": [
{
"kind": "js",
"name": "templateContentWithFallback",
"declaration": {
"name": "templateContentWithFallback",
"module": "src/directives/template-content-with-fallback.ts"
}
},
{
"kind": "js",
"name": "TemplateContentWithFallbackDirective",
"name": "queryTemplateById",
"declaration": {
"name": "TemplateContentWithFallbackDirective",
"module": "src/directives/template-content-with-fallback.ts"
"name": "queryTemplateById",
"module": "src/decorators/query-template-by-id.ts"
}
}
]
Expand Down
Loading

0 comments on commit 0585be6

Please sign in to comment.