From 087d5f2efb9b489b79ea7f5562f1329091e5dfd4 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 16 Feb 2023 00:58:10 +0800 Subject: [PATCH 1/5] Web-components: Drop lit1 support --- MIGRATION.md | 6 +++++- code/frameworks/web-components-webpack5/package.json | 2 +- code/presets/web-components-webpack/package.json | 2 +- code/renderers/web-components/package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 3cdf5fb1f3d..a820a7e5661 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -2,7 +2,6 @@ - [From version 6.5.x to 7.0.0](#from-version-65x-to-700) - [7.0 breaking changes](#70-breaking-changes) - - [Story context is prepared before for supporting fine grained updates](#story-context-is-prepared-before-for-supporting-fine-grained-updates) - [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below) - [ESM format in Main.js](#esm-format-in-mainjs) - [Modern browser support](#modern-browser-support) @@ -37,6 +36,7 @@ - [Angular: Removed legacy renderer](#angular-removed-legacy-renderer) - [SvelteKit: needs the `@storybook/sveltekit` framework](#sveltekit-needs-the-storybooksveltekit-framework) - [Vue3: replaced app export with setup](#vue3-replaced-app-export-with-setup) + - [Web-components: dropped lit-html v1 support](#web-components-dropped-lit-html-v1-support) - [Addon authors](#addon-authors) - [register.js removed](#registerjs-removed) - [No more default export from `@storybook/addons`](#no-more-default-export-from-storybookaddons) @@ -756,6 +756,10 @@ setup((app) => { }); ``` +#### Web-components: dropped lit-html v1 support + +In v6.x `@storybook/web-components` had a peer dependency on `lit-html` v1 or v2. In 7.0 we've dropped support for `lit-html` v1. Please upgrade your project's `lit-html` dependency if you're still on 1.x. + ### Addon authors #### register.js removed diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 7caca7044ae..9bbf48f6f1e 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -62,7 +62,7 @@ "typescript": "~4.9.3" }, "peerDependencies": { - "lit-html": "^1.4.1 || ^2.0.0", + "lit-html": "^2.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" }, diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index 6911611f599..c684872c7fa 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -63,7 +63,7 @@ "typescript": "~4.9.3" }, "peerDependencies": { - "lit-html": "^1.4.1 || ^2.0.0" + "lit-html": "^2.0.0" }, "engines": { "node": ">=16.0.0" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index acd41f82669..204698903ff 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -69,7 +69,7 @@ "web-component-analyzer": "^1.1.6" }, "peerDependencies": { - "lit-html": "^1.4.1 || ^2.0.0" + "lit-html": "^2.0.0" }, "engines": { "node": ">=16.0.0" From 9e6a958367d5ab9159b210d1d4d67598909170b8 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 16 Feb 2023 00:59:18 +0800 Subject: [PATCH 2/5] Update yarn.lock --- code/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index db8153fd60a..94a085d4517 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6233,7 +6233,7 @@ __metadata: lit-html: 2.0.2 typescript: ~4.9.3 peerDependencies: - lit-html: ^1.4.1 || ^2.0.0 + lit-html: ^2.0.0 languageName: unknown linkType: soft @@ -6990,7 +6990,7 @@ __metadata: lit-html: 2.0.2 typescript: ~4.9.3 peerDependencies: - lit-html: ^1.4.1 || ^2.0.0 + lit-html: ^2.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 languageName: unknown @@ -7016,7 +7016,7 @@ __metadata: typescript: ~4.9.3 web-component-analyzer: ^1.1.6 peerDependencies: - lit-html: ^1.4.1 || ^2.0.0 + lit-html: ^2.0.0 languageName: unknown linkType: soft From d5f01cd46b03654d9258e87bfb52ddc3eeb8eafc Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 16 Feb 2023 09:13:06 +0800 Subject: [PATCH 3/5] Upgraded lit-html@2 to lit@2 --- MIGRATION.md | 2 +- .../web-components-webpack5/package.json | 5 +++-- code/jest.config.base.js | 2 +- .../src/generators/WEB-COMPONENTS/index.ts | 2 +- .../web-components-webpack/package.json | 5 +++-- code/renderers/web-components/package.json | 4 ++-- .../lit-html-welcome/input.js | 2 +- .../src/docs/sourceDecorator.test.ts | 4 ++-- .../src/docs/sourceDecorator.ts | 2 +- .../docs/web-components-properties.test.ts | 8 ++++---- code/renderers/web-components/src/render.ts | 4 ++-- code/renderers/web-components/src/types.ts | 2 +- .../web-components/template/cli/js/Button.js | 4 ++-- .../web-components/template/cli/js/Header.js | 2 +- .../web-components/template/cli/js/Page.js | 2 +- .../web-components/template/cli/ts/Button.ts | 4 ++-- .../web-components/template/cli/ts/Header.ts | 2 +- .../web-components/template/cli/ts/Page.ts | 2 +- .../web-components/template/components/Pre.js | 2 +- code/yarn.lock | 20 +++++-------------- .../button-story-click-handler-args.js.mdx | 2 +- .../button-story-click-handler-args.ts.mdx | 2 +- .../button-story-click-handler.js.mdx | 2 +- .../button-story-click-handler.ts.mdx | 2 +- .../button-story-component-decorator.js.mdx | 2 +- .../button-story-component-decorator.ts.mdx | 2 +- .../button-story-decorator.js.mdx | 2 +- .../button-story-with-addon-example.js.mdx | 2 +- .../button-story-with-addon-example.ts.mdx | 2 +- .../button-story-with-emojis.js.mdx | 2 +- .../button-story-with-emojis.ts.mdx | 2 +- .../web-components/button-story.js.mdx | 2 +- .../web-components/button-story.ts.mdx | 2 +- .../component-story-highlight-addon.js.mdx | 2 +- .../component-story-static-asset-cdn.js.mdx | 2 +- .../component-story-static-asset-cdn.ts.mdx | 2 +- ...nent-story-static-asset-with-import.js.mdx | 2 +- ...nent-story-static-asset-with-import.ts.mdx | 2 +- ...t-story-static-asset-without-import.js.mdx | 2 +- ...t-story-static-asset-without-import.ts.mdx | 2 +- ...t-story-with-custom-render-function.js.mdx | 2 +- ...t-story-with-custom-render-function.ts.mdx | 2 +- .../csf-2-example-starter.js.mdx | 2 +- .../csf-2-example-starter.ts.mdx | 2 +- .../web-components/list-story-expanded.js.mdx | 2 +- .../web-components/list-story-expanded.ts.mdx | 2 +- .../list-story-reuse-data.js.mdx | 2 +- .../list-story-reuse-data.ts.mdx | 2 +- .../web-components/list-story-starter.js.mdx | 2 +- .../web-components/list-story-template.js.mdx | 2 +- .../web-components/list-story-template.ts.mdx | 2 +- .../list-story-unchecked.js.mdx | 2 +- .../list-story-unchecked.ts.mdx | 2 +- .../list-story-with-subcomponents.js.mdx | 2 +- .../list-story-with-subcomponents.ts.mdx | 2 +- .../my-component-argtypes-with-mapping.js.mdx | 2 +- .../my-component-argtypes-with-mapping.ts.mdx | 2 +- .../my-component-story-basic-and-props.js.mdx | 2 +- .../my-component-story-basic-and-props.ts.mdx | 2 +- ...ory-use-globaltype-backwards-compat.js.mdx | 2 +- ...ory-use-globaltype-backwards-compat.ts.mdx | 2 +- .../my-component-story-use-globaltype.js.mdx | 2 +- .../my-component-story-use-globaltype.ts.mdx | 2 +- .../web-components/page-story-slots.js.mdx | 2 +- .../web-components/page-story-slots.ts.mdx | 2 +- .../storybook-preview-global-decorator.js.mdx | 2 +- ...able-story-fully-customize-controls.js.mdx | 2 +- ...able-story-fully-customize-controls.ts.mdx | 2 +- .../your-component-with-decorator.js.mdx | 2 +- .../your-component-with-decorator.ts.mdx | 2 +- 70 files changed, 86 insertions(+), 94 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index a820a7e5661..1dc41282d88 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -758,7 +758,7 @@ setup((app) => { #### Web-components: dropped lit-html v1 support -In v6.x `@storybook/web-components` had a peer dependency on `lit-html` v1 or v2. In 7.0 we've dropped support for `lit-html` v1. Please upgrade your project's `lit-html` dependency if you're still on 1.x. +In v6.x `@storybook/web-components` had a peer dependency on `lit-html` v1 or v2. In 7.0 we've dropped support for `lit-html` v1 and now uses `lit` v2 instead. Please upgrade your project's `lit-html` dependency if you're still on 1.x. ### Addon authors diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 9bbf48f6f1e..c84710123f0 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -3,6 +3,7 @@ "version": "7.0.0-beta.48", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ + "lit", "lit-html", "storybook", "web-components" @@ -58,11 +59,11 @@ "@types/node": "^16.0.0" }, "devDependencies": { - "lit-html": "2.0.2", + "lit": "2.3.1", "typescript": "~4.9.3" }, "peerDependencies": { - "lit-html": "^2.0.0", + "lit": "^2.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" }, diff --git a/code/jest.config.base.js b/code/jest.config.base.js index c4eca2a3330..1c945087f85 100644 --- a/code/jest.config.base.js +++ b/code/jest.config.base.js @@ -30,7 +30,7 @@ module.exports = { '^.+\\.(t|j)sx?$': '@swc/jest', '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', }, - transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'], + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|lit|@mdx-js)'], testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], testPathIgnorePatterns: [ '/storybook-static/', diff --git a/code/lib/cli/src/generators/WEB-COMPONENTS/index.ts b/code/lib/cli/src/generators/WEB-COMPONENTS/index.ts index 45aee5d7004..66739509674 100755 --- a/code/lib/cli/src/generators/WEB-COMPONENTS/index.ts +++ b/code/lib/cli/src/generators/WEB-COMPONENTS/index.ts @@ -3,7 +3,7 @@ import type { Generator } from '../types'; const generator: Generator = async (packageManager, npmOptions, options) => { return baseGenerator(packageManager, npmOptions, options, 'web-components', { - extraPackages: ['lit-html'], + extraPackages: ['lit'], }); }; diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index c684872c7fa..82e111f055f 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -3,6 +3,7 @@ "version": "7.0.0-beta.48", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ + "lit", "lit-html", "storybook", "web-components" @@ -59,11 +60,11 @@ "babel-plugin-bundled-import-meta": "^0.3.1" }, "devDependencies": { - "lit-html": "2.0.2", + "lit": "2.3.1", "typescript": "~4.9.3" }, "peerDependencies": { - "lit-html": "^2.0.0" + "lit": "^2.0.0" }, "engines": { "node": ">=16.0.0" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index 204698903ff..d314ef0bff1 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -3,6 +3,7 @@ "version": "7.0.0-beta.48", "description": "Storybook web-components renderer", "keywords": [ + "lit", "lit-html", "storybook", "web-components" @@ -64,12 +65,11 @@ "@types/node": "^16.0.0", "cross-spawn": "^7.0.3", "lit": "2.3.1", - "lit-html": "2.0.2", "typescript": "~4.9.3", "web-component-analyzer": "^1.1.6" }, "peerDependencies": { - "lit-html": "^2.0.0" + "lit": "^2.0.0" }, "engines": { "node": ">=16.0.0" diff --git a/code/renderers/web-components/src/docs/__testfixtures__/lit-html-welcome/input.js b/code/renderers/web-components/src/docs/__testfixtures__/lit-html-welcome/input.js index 30e6edec7cf..da94e189e01 100644 --- a/code/renderers/web-components/src/docs/__testfixtures__/lit-html-welcome/input.js +++ b/code/renderers/web-components/src/docs/__testfixtures__/lit-html-welcome/input.js @@ -1,4 +1,4 @@ -import { html } from 'lit-html'; +import { html } from 'lit'; export const Welcome = () => html`
diff --git a/code/renderers/web-components/src/docs/sourceDecorator.test.ts b/code/renderers/web-components/src/docs/sourceDecorator.test.ts index 0a0108ca38f..973a14f7f64 100644 --- a/code/renderers/web-components/src/docs/sourceDecorator.test.ts +++ b/code/renderers/web-components/src/docs/sourceDecorator.test.ts @@ -1,5 +1,5 @@ -import { html } from 'lit-html'; -import { styleMap } from 'lit-html/directives/style-map.js'; +import { html } from 'lit'; +import { styleMap } from 'lit/directives/style-map.js'; import { addons, useEffect } from '@storybook/preview-api'; import { SNIPPET_RENDERED } from '@storybook/docs-tools'; import type { StoryContext } from '../types'; diff --git a/code/renderers/web-components/src/docs/sourceDecorator.ts b/code/renderers/web-components/src/docs/sourceDecorator.ts index 674fde3e48e..56d0fed5e1e 100644 --- a/code/renderers/web-components/src/docs/sourceDecorator.ts +++ b/code/renderers/web-components/src/docs/sourceDecorator.ts @@ -1,5 +1,5 @@ /* eslint-disable no-underscore-dangle */ -import { render } from 'lit-html'; +import { render } from 'lit'; import type { ArgsStoryFn, PartialStoryFn, StoryContext } from '@storybook/types'; import { addons, useEffect } from '@storybook/preview-api'; import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools'; diff --git a/code/renderers/web-components/src/docs/web-components-properties.test.ts b/code/renderers/web-components/src/docs/web-components-properties.test.ts index 49442930196..1e4e90915ce 100644 --- a/code/renderers/web-components/src/docs/web-components-properties.test.ts +++ b/code/renderers/web-components/src/docs/web-components-properties.test.ts @@ -29,11 +29,11 @@ const runWebComponentsAnalyzer = (inputPath: string) => { }; describe('web-components component properties', () => { - // we need to mock lit-html and dynamically require custom-elements - // because lit-html is distributed as ESM not CJS + // we need to mock lit and dynamically require custom-elements + // because lit is distributed as ESM not CJS // https://github.com/Polymer/lit-html/issues/516 - jest.mock('lit-html', () => {}); - jest.mock('lit-html/directive-helpers.js', () => {}); + jest.mock('lit', () => {}); + jest.mock('lit/directive-helpers.js', () => {}); // eslint-disable-next-line global-require const { extractArgTypesFromElements } = require('./custom-elements'); diff --git a/code/renderers/web-components/src/render.ts b/code/renderers/web-components/src/render.ts index f71fd6c9387..f031cd4dc2b 100644 --- a/code/renderers/web-components/src/render.ts +++ b/code/renderers/web-components/src/render.ts @@ -4,10 +4,10 @@ import { global } from '@storybook/global'; import { dedent } from 'ts-dedent'; -import { render as litRender } from 'lit-html'; +import { render as litRender } from 'lit'; // Keep `.js` extension to avoid issue with Webpack (related to export map?) -import { isTemplateResult } from 'lit-html/directive-helpers.js'; +import { isTemplateResult } from 'lit/directive-helpers.js'; import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-api'; import type { RenderContext, ArgsStoryFn } from '@storybook/types'; import type { WebComponentsRenderer } from './types'; diff --git a/code/renderers/web-components/src/types.ts b/code/renderers/web-components/src/types.ts index d6f397db0ac..33dfc412d75 100644 --- a/code/renderers/web-components/src/types.ts +++ b/code/renderers/web-components/src/types.ts @@ -1,5 +1,5 @@ import type { StoryContext as StoryContextBase, WebRenderer } from '@storybook/types'; -import type { TemplateResult, SVGTemplateResult } from 'lit-html'; +import type { TemplateResult, SVGTemplateResult } from 'lit'; export type StoryFnHtmlReturnType = string | Node | TemplateResult | SVGTemplateResult; diff --git a/code/renderers/web-components/template/cli/js/Button.js b/code/renderers/web-components/template/cli/js/Button.js index 2a6cf4ad238..5599e40e8a6 100644 --- a/code/renderers/web-components/template/cli/js/Button.js +++ b/code/renderers/web-components/template/cli/js/Button.js @@ -1,5 +1,5 @@ -import { html } from 'lit-html'; -import { styleMap } from 'lit-html/directives/style-map.js'; +import { html } from 'lit'; +import { styleMap } from 'lit/directives/style-map.js'; import './button.css'; /** diff --git a/code/renderers/web-components/template/cli/js/Header.js b/code/renderers/web-components/template/cli/js/Header.js index b742e61ce07..9cb94e208ee 100644 --- a/code/renderers/web-components/template/cli/js/Header.js +++ b/code/renderers/web-components/template/cli/js/Header.js @@ -1,4 +1,4 @@ -import { html } from 'lit-html'; +import { html } from 'lit'; import { Button } from './Button'; import './header.css'; diff --git a/code/renderers/web-components/template/cli/js/Page.js b/code/renderers/web-components/template/cli/js/Page.js index 53f0abd7847..17ea864c2bc 100644 --- a/code/renderers/web-components/template/cli/js/Page.js +++ b/code/renderers/web-components/template/cli/js/Page.js @@ -1,4 +1,4 @@ -import { html } from 'lit-html'; +import { html } from 'lit'; import { Header } from './Header'; import './page.css'; diff --git a/code/renderers/web-components/template/cli/ts/Button.ts b/code/renderers/web-components/template/cli/ts/Button.ts index 90fd50410cc..8241f4e8cbd 100644 --- a/code/renderers/web-components/template/cli/ts/Button.ts +++ b/code/renderers/web-components/template/cli/ts/Button.ts @@ -1,5 +1,5 @@ -import { html } from 'lit-html'; -import { styleMap } from 'lit-html/directives/style-map.js'; +import { html } from 'lit'; +import { styleMap } from 'lit/directives/style-map.js'; import './button.css'; export interface ButtonProps { diff --git a/code/renderers/web-components/template/cli/ts/Header.ts b/code/renderers/web-components/template/cli/ts/Header.ts index 5299f2de17e..b14c312a9d8 100644 --- a/code/renderers/web-components/template/cli/ts/Header.ts +++ b/code/renderers/web-components/template/cli/ts/Header.ts @@ -1,4 +1,4 @@ -import { html } from 'lit-html'; +import { html } from 'lit'; import { Button } from './Button'; import './header.css'; diff --git a/code/renderers/web-components/template/cli/ts/Page.ts b/code/renderers/web-components/template/cli/ts/Page.ts index dd81e9da0f2..15764da4432 100644 --- a/code/renderers/web-components/template/cli/ts/Page.ts +++ b/code/renderers/web-components/template/cli/ts/Page.ts @@ -1,4 +1,4 @@ -import { html } from 'lit-html'; +import { html } from 'lit'; import { Header } from './Header'; import './page.css'; diff --git a/code/renderers/web-components/template/components/Pre.js b/code/renderers/web-components/template/components/Pre.js index 63891db2576..9f5fc390425 100644 --- a/code/renderers/web-components/template/components/Pre.js +++ b/code/renderers/web-components/template/components/Pre.js @@ -1,7 +1,7 @@ import { global as globalThis } from '@storybook/global'; import { html, LitElement } from 'lit'; -import { styleMap } from 'lit-html/directives/style-map.js'; +import { styleMap } from 'lit/directives/style-map.js'; const { customElements } = globalThis; diff --git a/code/yarn.lock b/code/yarn.lock index 94a085d4517..1401b257e31 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6230,10 +6230,10 @@ __metadata: "@types/node": ^16.0.0 babel-loader: ^7.0.0 || ^8.0.0 || ^9.0.0 babel-plugin-bundled-import-meta: ^0.3.1 - lit-html: 2.0.2 + lit: 2.3.1 typescript: ~4.9.3 peerDependencies: - lit-html: ^2.0.0 + lit: ^2.0.0 languageName: unknown linkType: soft @@ -6987,10 +6987,10 @@ __metadata: "@storybook/preset-web-components-webpack": 7.0.0-beta.48 "@storybook/web-components": 7.0.0-beta.48 "@types/node": ^16.0.0 - lit-html: 2.0.2 + lit: 2.3.1 typescript: ~4.9.3 peerDependencies: - lit-html: ^2.0.0 + lit: ^2.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 languageName: unknown @@ -7011,12 +7011,11 @@ __metadata: "@types/node": ^16.0.0 cross-spawn: ^7.0.3 lit: 2.3.1 - lit-html: 2.0.2 ts-dedent: ^2.0.0 typescript: ~4.9.3 web-component-analyzer: ^1.1.6 peerDependencies: - lit-html: ^2.0.0 + lit: ^2.0.0 languageName: unknown linkType: soft @@ -19642,15 +19641,6 @@ __metadata: languageName: node linkType: hard -"lit-html@npm:2.0.2": - version: 2.0.2 - resolution: "lit-html@npm:2.0.2" - dependencies: - "@types/trusted-types": ^2.0.2 - checksum: 3a199fdc8a2a914cae0f4bcb61582d15ca671a84e34db387651d4009be9c41951c8d29381a8d858c2037efb4fce6f4eccf51d4da545d9dd419651b0b42b1b88b - languageName: node - linkType: hard - "lit-html@npm:^2.2.0, lit-html@npm:^2.3.0": version: 2.6.1 resolution: "lit-html@npm:2.6.1" diff --git a/docs/snippets/web-components/button-story-click-handler-args.js.mdx b/docs/snippets/web-components/button-story-click-handler-args.js.mdx index e537bccade1..0a2c67226f5 100644 --- a/docs/snippets/web-components/button-story-click-handler-args.js.mdx +++ b/docs/snippets/web-components/button-story-click-handler-args.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import { action } from '@storybook/addon-actions'; diff --git a/docs/snippets/web-components/button-story-click-handler-args.ts.mdx b/docs/snippets/web-components/button-story-click-handler-args.ts.mdx index 29225224a7d..7226f89b889 100644 --- a/docs/snippets/web-components/button-story-click-handler-args.ts.mdx +++ b/docs/snippets/web-components/button-story-click-handler-args.ts.mdx @@ -1,7 +1,7 @@ ```ts // Button.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/button-story-click-handler.js.mdx b/docs/snippets/web-components/button-story-click-handler.js.mdx index 1bdd19ac024..1f1ff9f7e81 100644 --- a/docs/snippets/web-components/button-story-click-handler.js.mdx +++ b/docs/snippets/web-components/button-story-click-handler.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import { action } from '@storybook/addon-actions'; diff --git a/docs/snippets/web-components/button-story-click-handler.ts.mdx b/docs/snippets/web-components/button-story-click-handler.ts.mdx index 59350c4b70d..701032cac23 100644 --- a/docs/snippets/web-components/button-story-click-handler.ts.mdx +++ b/docs/snippets/web-components/button-story-click-handler.ts.mdx @@ -1,7 +1,7 @@ ```ts // Button.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/button-story-component-decorator.js.mdx b/docs/snippets/web-components/button-story-component-decorator.js.mdx index 2a4c94657b5..be22c2a17b7 100644 --- a/docs/snippets/web-components/button-story-component-decorator.js.mdx +++ b/docs/snippets/web-components/button-story-component-decorator.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Button', diff --git a/docs/snippets/web-components/button-story-component-decorator.ts.mdx b/docs/snippets/web-components/button-story-component-decorator.ts.mdx index 4931a83cc01..0d148abc88d 100644 --- a/docs/snippets/web-components/button-story-component-decorator.ts.mdx +++ b/docs/snippets/web-components/button-story-component-decorator.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'Button', diff --git a/docs/snippets/web-components/button-story-decorator.js.mdx b/docs/snippets/web-components/button-story-decorator.js.mdx index 5daca82fb8e..97f8980d28e 100644 --- a/docs/snippets/web-components/button-story-decorator.js.mdx +++ b/docs/snippets/web-components/button-story-decorator.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Button', diff --git a/docs/snippets/web-components/button-story-with-addon-example.js.mdx b/docs/snippets/web-components/button-story-with-addon-example.js.mdx index ac6a533fd29..08185559cc9 100644 --- a/docs/snippets/web-components/button-story-with-addon-example.js.mdx +++ b/docs/snippets/web-components/button-story-with-addon-example.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Button', diff --git a/docs/snippets/web-components/button-story-with-addon-example.ts.mdx b/docs/snippets/web-components/button-story-with-addon-example.ts.mdx index 47e5a9f11b9..1405bd6d8c9 100644 --- a/docs/snippets/web-components/button-story-with-addon-example.ts.mdx +++ b/docs/snippets/web-components/button-story-with-addon-example.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'Button', diff --git a/docs/snippets/web-components/button-story-with-emojis.js.mdx b/docs/snippets/web-components/button-story-with-emojis.js.mdx index c37c7afe865..36433ffdd8e 100644 --- a/docs/snippets/web-components/button-story-with-emojis.js.mdx +++ b/docs/snippets/web-components/button-story-with-emojis.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Button', diff --git a/docs/snippets/web-components/button-story-with-emojis.ts.mdx b/docs/snippets/web-components/button-story-with-emojis.ts.mdx index 0b2efe37c37..b24a11b63e0 100644 --- a/docs/snippets/web-components/button-story-with-emojis.ts.mdx +++ b/docs/snippets/web-components/button-story-with-emojis.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'Button', diff --git a/docs/snippets/web-components/button-story.js.mdx b/docs/snippets/web-components/button-story.js.mdx index 67cd9f39a5c..36e4ce0460a 100644 --- a/docs/snippets/web-components/button-story.js.mdx +++ b/docs/snippets/web-components/button-story.js.mdx @@ -1,7 +1,7 @@ ```js // Button.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Button', diff --git a/docs/snippets/web-components/button-story.ts.mdx b/docs/snippets/web-components/button-story.ts.mdx index 93631764fb1..e0800d7b036 100644 --- a/docs/snippets/web-components/button-story.ts.mdx +++ b/docs/snippets/web-components/button-story.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'Button', diff --git a/docs/snippets/web-components/component-story-highlight-addon.js.mdx b/docs/snippets/web-components/component-story-highlight-addon.js.mdx index 2509855d6ca..936b9fdf9b4 100644 --- a/docs/snippets/web-components/component-story-highlight-addon.js.mdx +++ b/docs/snippets/web-components/component-story-highlight-addon.js.mdx @@ -1,7 +1,7 @@ ```js // card-component.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import { useChannel } from '@storybook/preview-api'; import { HIGHLIGHT, RESET_HIGHLIGHT } from '@storybook/addon-highlight'; import './card-component'; diff --git a/docs/snippets/web-components/component-story-static-asset-cdn.js.mdx b/docs/snippets/web-components/component-story-static-asset-cdn.js.mdx index 078a380dbbe..0e80baf2540 100644 --- a/docs/snippets/web-components/component-story-static-asset-cdn.js.mdx +++ b/docs/snippets/web-components/component-story-static-asset-cdn.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'img', diff --git a/docs/snippets/web-components/component-story-static-asset-cdn.ts.mdx b/docs/snippets/web-components/component-story-static-asset-cdn.ts.mdx index 59459bae00e..2781d260c4e 100644 --- a/docs/snippets/web-components/component-story-static-asset-cdn.ts.mdx +++ b/docs/snippets/web-components/component-story-static-asset-cdn.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/component-story-static-asset-with-import.js.mdx b/docs/snippets/web-components/component-story-static-asset-with-import.js.mdx index c6dec275787..dfaea335cdd 100644 --- a/docs/snippets/web-components/component-story-static-asset-with-import.js.mdx +++ b/docs/snippets/web-components/component-story-static-asset-with-import.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import imageFile from './static/image.png'; diff --git a/docs/snippets/web-components/component-story-static-asset-with-import.ts.mdx b/docs/snippets/web-components/component-story-static-asset-with-import.ts.mdx index 42b61b19e6c..e37e879471e 100644 --- a/docs/snippets/web-components/component-story-static-asset-with-import.ts.mdx +++ b/docs/snippets/web-components/component-story-static-asset-with-import.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/component-story-static-asset-without-import.js.mdx b/docs/snippets/web-components/component-story-static-asset-without-import.js.mdx index 4e42190b6ad..ee1bc612504 100644 --- a/docs/snippets/web-components/component-story-static-asset-without-import.js.mdx +++ b/docs/snippets/web-components/component-story-static-asset-without-import.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'img', diff --git a/docs/snippets/web-components/component-story-static-asset-without-import.ts.mdx b/docs/snippets/web-components/component-story-static-asset-without-import.ts.mdx index e3dbe7cf030..8bec45adddb 100644 --- a/docs/snippets/web-components/component-story-static-asset-without-import.ts.mdx +++ b/docs/snippets/web-components/component-story-static-asset-without-import.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/component-story-with-custom-render-function.js.mdx b/docs/snippets/web-components/component-story-with-custom-render-function.js.mdx index 084dc955536..723fd072ebe 100644 --- a/docs/snippets/web-components/component-story-with-custom-render-function.js.mdx +++ b/docs/snippets/web-components/component-story-with-custom-render-function.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'MyComponent', diff --git a/docs/snippets/web-components/component-story-with-custom-render-function.ts.mdx b/docs/snippets/web-components/component-story-with-custom-render-function.ts.mdx index 8c49b3b6605..653cd08b6aa 100644 --- a/docs/snippets/web-components/component-story-with-custom-render-function.ts.mdx +++ b/docs/snippets/web-components/component-story-with-custom-render-function.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/csf-2-example-starter.js.mdx b/docs/snippets/web-components/csf-2-example-starter.js.mdx index c9c1a65ffbd..65498d68ba9 100644 --- a/docs/snippets/web-components/csf-2-example-starter.js.mdx +++ b/docs/snippets/web-components/csf-2-example-starter.js.mdx @@ -1,7 +1,7 @@ ```js // CSF 2 -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'components/Button', diff --git a/docs/snippets/web-components/csf-2-example-starter.ts.mdx b/docs/snippets/web-components/csf-2-example-starter.ts.mdx index 8d281a1e0bb..6cefdfa42a7 100644 --- a/docs/snippets/web-components/csf-2-example-starter.ts.mdx +++ b/docs/snippets/web-components/csf-2-example-starter.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, Story } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'components/Button', diff --git a/docs/snippets/web-components/list-story-expanded.js.mdx b/docs/snippets/web-components/list-story-expanded.js.mdx index cfa049e3cbb..413b3266a11 100644 --- a/docs/snippets/web-components/list-story-expanded.js.mdx +++ b/docs/snippets/web-components/list-story-expanded.js.mdx @@ -1,7 +1,7 @@ ```js // List.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'List', diff --git a/docs/snippets/web-components/list-story-expanded.ts.mdx b/docs/snippets/web-components/list-story-expanded.ts.mdx index df567be08c4..7cb7dcfda54 100644 --- a/docs/snippets/web-components/list-story-expanded.ts.mdx +++ b/docs/snippets/web-components/list-story-expanded.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'List', diff --git a/docs/snippets/web-components/list-story-reuse-data.js.mdx b/docs/snippets/web-components/list-story-reuse-data.js.mdx index 1be5495b40c..ca05b1a6401 100644 --- a/docs/snippets/web-components/list-story-reuse-data.js.mdx +++ b/docs/snippets/web-components/list-story-reuse-data.js.mdx @@ -1,7 +1,7 @@ ```js // List.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; // 👇 We're importing the necessary stories from ListItem import { Selected, Unselected } from './ListItem.stories'; diff --git a/docs/snippets/web-components/list-story-reuse-data.ts.mdx b/docs/snippets/web-components/list-story-reuse-data.ts.mdx index 5c4939e62c8..161ec6d9782 100644 --- a/docs/snippets/web-components/list-story-reuse-data.ts.mdx +++ b/docs/snippets/web-components/list-story-reuse-data.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; // 👇 We're importing the necessary stories from ListItem import { Selected, Unselected } from './ListItem.stories'; diff --git a/docs/snippets/web-components/list-story-starter.js.mdx b/docs/snippets/web-components/list-story-starter.js.mdx index 1dc579b059c..4269fec18c6 100644 --- a/docs/snippets/web-components/list-story-starter.js.mdx +++ b/docs/snippets/web-components/list-story-starter.js.mdx @@ -1,7 +1,7 @@ ```js // List.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'List', diff --git a/docs/snippets/web-components/list-story-template.js.mdx b/docs/snippets/web-components/list-story-template.js.mdx index bd2b7092331..08226beaeb3 100644 --- a/docs/snippets/web-components/list-story-template.js.mdx +++ b/docs/snippets/web-components/list-story-template.js.mdx @@ -1,7 +1,7 @@ ```js // List.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import { repeat } from 'lit/directives/repeat.js'; import { Unchecked } from './ListItem.stories'; diff --git a/docs/snippets/web-components/list-story-template.ts.mdx b/docs/snippets/web-components/list-story-template.ts.mdx index f74010364f9..8a6e284dc26 100644 --- a/docs/snippets/web-components/list-story-template.ts.mdx +++ b/docs/snippets/web-components/list-story-template.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; import { repeat } from 'lit/directives/repeat.js'; const meta: Meta = { diff --git a/docs/snippets/web-components/list-story-unchecked.js.mdx b/docs/snippets/web-components/list-story-unchecked.js.mdx index 82e4622da6a..be30704c834 100644 --- a/docs/snippets/web-components/list-story-unchecked.js.mdx +++ b/docs/snippets/web-components/list-story-unchecked.js.mdx @@ -1,7 +1,7 @@ ```js // MyList.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; // 👇 Import the stories of MyListItem import { Unchecked } from './MyListItem.stories'; diff --git a/docs/snippets/web-components/list-story-unchecked.ts.mdx b/docs/snippets/web-components/list-story-unchecked.ts.mdx index beaef00cdb0..80c135f68a4 100644 --- a/docs/snippets/web-components/list-story-unchecked.ts.mdx +++ b/docs/snippets/web-components/list-story-unchecked.ts.mdx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; // 👇 Import the stories of MyListItem import { Unchecked } from './my-list-item.stories'; diff --git a/docs/snippets/web-components/list-story-with-subcomponents.js.mdx b/docs/snippets/web-components/list-story-with-subcomponents.js.mdx index 486db43e3fc..ced80cc450b 100644 --- a/docs/snippets/web-components/list-story-with-subcomponents.js.mdx +++ b/docs/snippets/web-components/list-story-with-subcomponents.js.mdx @@ -1,7 +1,7 @@ ```js // List.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'List', diff --git a/docs/snippets/web-components/list-story-with-subcomponents.ts.mdx b/docs/snippets/web-components/list-story-with-subcomponents.ts.mdx index 401dd007183..511213a1030 100644 --- a/docs/snippets/web-components/list-story-with-subcomponents.ts.mdx +++ b/docs/snippets/web-components/list-story-with-subcomponents.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'List', diff --git a/docs/snippets/web-components/my-component-argtypes-with-mapping.js.mdx b/docs/snippets/web-components/my-component-argtypes-with-mapping.js.mdx index 8fc1bacb468..a9bd4de8cbf 100644 --- a/docs/snippets/web-components/my-component-argtypes-with-mapping.js.mdx +++ b/docs/snippets/web-components/my-component-argtypes-with-mapping.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'MyComponent', diff --git a/docs/snippets/web-components/my-component-argtypes-with-mapping.ts.mdx b/docs/snippets/web-components/my-component-argtypes-with-mapping.ts.mdx index 6afbbaa3b6e..0dc8d957d96 100644 --- a/docs/snippets/web-components/my-component-argtypes-with-mapping.ts.mdx +++ b/docs/snippets/web-components/my-component-argtypes-with-mapping.ts.mdx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'MyComponent', diff --git a/docs/snippets/web-components/my-component-story-basic-and-props.js.mdx b/docs/snippets/web-components/my-component-story-basic-and-props.js.mdx index ff8378c4325..7400521ff56 100644 --- a/docs/snippets/web-components/my-component-story-basic-and-props.js.mdx +++ b/docs/snippets/web-components/my-component-story-basic-and-props.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Path/To/MyComponent', diff --git a/docs/snippets/web-components/my-component-story-basic-and-props.ts.mdx b/docs/snippets/web-components/my-component-story-basic-and-props.ts.mdx index 6946f748db1..0cd9a1a5632 100644 --- a/docs/snippets/web-components/my-component-story-basic-and-props.ts.mdx +++ b/docs/snippets/web-components/my-component-story-basic-and-props.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.js.mdx b/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.js.mdx index 9cfdda448ac..90cc5ca8dcb 100644 --- a/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.js.mdx +++ b/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; /* *👇 Render functions are a framework specific feature to allow you control on how the component renders. diff --git a/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.ts.mdx b/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.ts.mdx index c04d3cfb900..9b9a9c77cef 100644 --- a/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.ts.mdx +++ b/docs/snippets/web-components/my-component-story-use-globaltype-backwards-compat.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import { StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/my-component-story-use-globaltype.js.mdx b/docs/snippets/web-components/my-component-story-use-globaltype.js.mdx index e360d416610..d55a79a7960 100644 --- a/docs/snippets/web-components/my-component-story-use-globaltype.js.mdx +++ b/docs/snippets/web-components/my-component-story-use-globaltype.js.mdx @@ -1,7 +1,7 @@ ```js // MyComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'MyComponent', diff --git a/docs/snippets/web-components/my-component-story-use-globaltype.ts.mdx b/docs/snippets/web-components/my-component-story-use-globaltype.ts.mdx index 2899fe3a9cb..29069ffa8ba 100644 --- a/docs/snippets/web-components/my-component-story-use-globaltype.ts.mdx +++ b/docs/snippets/web-components/my-component-story-use-globaltype.ts.mdx @@ -1,7 +1,7 @@ ```ts // MyComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta, StoryObj } from '@storybook/web-components'; diff --git a/docs/snippets/web-components/page-story-slots.js.mdx b/docs/snippets/web-components/page-story-slots.js.mdx index bbe24e466e1..76ca0925a6e 100644 --- a/docs/snippets/web-components/page-story-slots.js.mdx +++ b/docs/snippets/web-components/page-story-slots.js.mdx @@ -1,7 +1,7 @@ ```js // Page.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'Page', diff --git a/docs/snippets/web-components/page-story-slots.ts.mdx b/docs/snippets/web-components/page-story-slots.ts.mdx index a61dec3966e..6b1f0f28799 100644 --- a/docs/snippets/web-components/page-story-slots.ts.mdx +++ b/docs/snippets/web-components/page-story-slots.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; const meta: Meta = { title: 'Page', diff --git a/docs/snippets/web-components/storybook-preview-global-decorator.js.mdx b/docs/snippets/web-components/storybook-preview-global-decorator.js.mdx index dd7e887cd5c..953b70ab411 100644 --- a/docs/snippets/web-components/storybook-preview-global-decorator.js.mdx +++ b/docs/snippets/web-components/storybook-preview-global-decorator.js.mdx @@ -1,7 +1,7 @@ ```js // .storybook/preview.js -import { html } from 'lit-html'; +import { html } from 'lit'; export const decorators = [(story) => html`
${story()}
`], ``` diff --git a/docs/snippets/web-components/table-story-fully-customize-controls.js.mdx b/docs/snippets/web-components/table-story-fully-customize-controls.js.mdx index f7c3601ca06..5288239a2a4 100644 --- a/docs/snippets/web-components/table-story-fully-customize-controls.js.mdx +++ b/docs/snippets/web-components/table-story-fully-customize-controls.js.mdx @@ -1,7 +1,7 @@ ```js // Table.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; import { repeat } from 'lit/directives/repeat.js'; export default { diff --git a/docs/snippets/web-components/table-story-fully-customize-controls.ts.mdx b/docs/snippets/web-components/table-story-fully-customize-controls.ts.mdx index 505e4c6316f..6bdc6558439 100644 --- a/docs/snippets/web-components/table-story-fully-customize-controls.ts.mdx +++ b/docs/snippets/web-components/table-story-fully-customize-controls.ts.mdx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html } from 'lit-html'; +import { html } from 'lit'; import { repeat } from 'lit/directives/repeat.js'; const meta: Meta = { diff --git a/docs/snippets/web-components/your-component-with-decorator.js.mdx b/docs/snippets/web-components/your-component-with-decorator.js.mdx index 26e84c6ea0f..9c1f3e10829 100644 --- a/docs/snippets/web-components/your-component-with-decorator.js.mdx +++ b/docs/snippets/web-components/your-component-with-decorator.js.mdx @@ -1,7 +1,7 @@ ```js // YourComponent.stories.js -import { html } from 'lit-html'; +import { html } from 'lit'; export default { title: 'YourComponent', diff --git a/docs/snippets/web-components/your-component-with-decorator.ts.mdx b/docs/snippets/web-components/your-component-with-decorator.ts.mdx index aa17833aff4..233ddd10e9f 100644 --- a/docs/snippets/web-components/your-component-with-decorator.ts.mdx +++ b/docs/snippets/web-components/your-component-with-decorator.ts.mdx @@ -1,7 +1,7 @@ ```ts // YourComponent.stories.ts -import { html } from 'lit-html'; +import { html } from 'lit'; import type { Meta } from '@storybook/web-components'; From 76174d51b5a3bcc77ebe6e3f706bc65e9609b01c Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 16 Feb 2023 09:29:52 +0800 Subject: [PATCH 4/5] Add lit regex --- code/presets/web-components-webpack/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/presets/web-components-webpack/src/index.ts b/code/presets/web-components-webpack/src/index.ts index aa6468b9c01..73ed8449751 100644 --- a/code/presets/web-components-webpack/src/index.ts +++ b/code/presets/web-components-webpack/src/index.ts @@ -9,6 +9,7 @@ export const webpack: StorybookConfig['webpack'] = (config) => { test: [ new RegExp(`src(.*)\\.js$`), new RegExp(`packages(\\/|\\\\)*(\\/|\\\\)src(\\/|\\\\)(.*)\\.js$`), + new RegExp(`node_modules(\\/|\\\\)lit\\/(.*)\\.js$`), new RegExp(`node_modules(\\/|\\\\)lit-html(.*)\\.js$`), new RegExp(`node_modules(\\/|\\\\)lit-element(.*)\\.js$`), new RegExp(`node_modules(\\/|\\\\)@open-wc(.*)\\.js$`), From 4f6b5a38c0117046cde900633280961edcd6bd6e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 16 Feb 2023 09:01:24 +0100 Subject: [PATCH 5/5] fix tests --- code/jest.config.base.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/jest.config.base.js b/code/jest.config.base.js index 1c945087f85..65233d20d55 100644 --- a/code/jest.config.base.js +++ b/code/jest.config.base.js @@ -30,7 +30,9 @@ module.exports = { '^.+\\.(t|j)sx?$': '@swc/jest', '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', }, - transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|lit|@mdx-js)'], + transformIgnorePatterns: [ + '/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|lit|@mdx-js|@lit)', + ], testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], testPathIgnorePatterns: [ '/storybook-static/',