diff --git a/components/wc/CounterWC.ts b/components/wc/CounterWC.ts index 88f79b3..f670bd1 100644 --- a/components/wc/CounterWC.ts +++ b/components/wc/CounterWC.ts @@ -37,5 +37,3 @@ class CounterWC extends HTMLElement { } } customElements.define("counter-wc", CounterWC); - -export default CounterWC; diff --git a/components/wc/HelloWC.ts b/components/wc/HelloWC.ts index ccc3528..f27a58e 100644 --- a/components/wc/HelloWC.ts +++ b/components/wc/HelloWC.ts @@ -29,5 +29,3 @@ class HelloWC extends HTMLElement { } } customElements.define("hello-wc", HelloWC); - -export default HelloWC; diff --git a/components/wc/LitCounter.js b/components/wc/LitCounter.js index ec747f6..2c25035 100644 --- a/components/wc/LitCounter.js +++ b/components/wc/LitCounter.js @@ -52,5 +52,3 @@ customElements.define( "lit-counter", LitCounter, ); - -export default LitCounter; diff --git a/components/wc/MyLitMessage.ts b/components/wc/MyLitMessage.ts index fe0d889..2e7c76b 100644 --- a/components/wc/MyLitMessage.ts +++ b/components/wc/MyLitMessage.ts @@ -1,14 +1,7 @@ import { css, html, LitElement } from "https://esm.sh/lit@3.1.0"; -// import { -// customElement, -// property, -// } from "https://esm.sh/lit@3.1.0/decorators.js"; -/* TS errors are ignored in the build */ -// @customElement("my-lit-message") // @ts-ignore LSP does not recognize LitElement syntax export class MyLitMessage extends LitElement { - // @property() // Properties are the component attributes static get properties(): { message: string } { return { diff --git a/components/wc/TemplatedWC.ts b/components/wc/TemplatedWC.ts index 2454117..a330593 100644 --- a/components/wc/TemplatedWC.ts +++ b/components/wc/TemplatedWC.ts @@ -1,15 +1,3 @@ -// Define the component's template in code -// const template = document.createElement("template"); -// template.setAttribute("id", "template-wc"); -// template!.innerHTML = ` -//
-// This is inside the template -// -// -// -//
-// `; - export class TemplatedWC extends HTMLElement { css = ` div.container { diff --git a/components/wc/UsingNpmLib.js b/components/wc/UsingNpmLib.js index 3a66de0..7327263 100644 --- a/components/wc/UsingNpmLib.js +++ b/components/wc/UsingNpmLib.js @@ -1,7 +1,7 @@ /** * How to use a library in a web component - change-case here. */ -// 'npm:' specifier does not work since Deno is not processing this +// 'npm:' specifier does not work since Deno is not processing this file import * as changeCase from "https://esm.sh/change-case@5.4.3"; class UsingNpmLib extends HTMLElement { diff --git a/deno.json b/deno.json index 7098df1..a62998c 100644 --- a/deno.json +++ b/deno.json @@ -13,7 +13,7 @@ "exclude": ["**/_fresh/*"], "nodeModulesDir": true, "imports": { - "$fresh/": "https://deno.land/x/fresh@1.6.7/", + "$fresh/": "https://deno.land/x/fresh@1.6.8/", "preact": "https://esm.sh/preact@10.19.6", "preact/": "https://esm.sh/preact@10.19.6/", "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2", diff --git a/routes/_app.tsx b/routes/_app.tsx index 2fc9526..84328b8 100644 --- a/routes/_app.tsx +++ b/routes/_app.tsx @@ -1,6 +1,6 @@ -import { AppProps } from "$fresh/server.ts"; +import { PageProps } from "$fresh/server.ts"; -export default function App({ Component }: AppProps) { +export default function App({ Component }: PageProps) { return ( @@ -16,9 +16,8 @@ export default function App({ Component }: AppProps) { src="https://cdn.jsdelivr.net/npm/emoji-picker-element@^1/index.js" > - + - {/* */}
diff --git a/static/wc/wc.esm.js b/static/wc/wc.esm.js index a3a06ee..9676b84 100644 --- a/static/wc/wc.esm.js +++ b/static/wc/wc.esm.js @@ -607,7 +607,6 @@ l2?.({ LitElement: t }); // components/wc/MyLitMessage.ts var MyLitMessage = class extends t { - // @property() // Properties are the component attributes static get properties() { return { diff --git a/types/types.ts b/types/types.ts index 9cd4797..95d0393 100644 --- a/types/types.ts +++ b/types/types.ts @@ -1,7 +1,7 @@ /** * Definitions of web component types with emphasis on extending * JSX.IntrinsicElements. This is required to be able to use a custom - * element in a .tsx page without showing errors in vscode. + * element in a .tsx page without showing TypeScript errors in vscode. */ import { JSX } from "preact"; import { LitElement } from "https://esm.sh/lit@3.1.0";