From 554f52e4a58434cd048e5fc52e9af0c1eaf051cf Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 21 Apr 2025 22:17:53 -0400 Subject: [PATCH 1/6] Fixed some safari issues with dnn-richtext Fixed some safari issues with dnn-richtext --- .../src/components/dnn-richtext/dnn-richtext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stencil-library/src/components/dnn-richtext/dnn-richtext.tsx b/packages/stencil-library/src/components/dnn-richtext/dnn-richtext.tsx index 8350d0ef..c3f13427 100644 --- a/packages/stencil-library/src/components/dnn-richtext/dnn-richtext.tsx +++ b/packages/stencil-library/src/components/dnn-richtext/dnn-richtext.tsx @@ -7,7 +7,7 @@ import { DeepPartial } from 'jodit/types/types'; @Component({ tag: 'dnn-richtext', styleUrl: 'dnn-richtext.scss', - shadow: true, + shadow: false, formAssociated: true, }) export class DnnRichtext { From 0e804eccfdf070bf403ff719afde8de5dd753b4f Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 21 Apr 2025 23:24:58 -0400 Subject: [PATCH 2/6] Fixed an issue that prevented proper initialization of dnn-richtext Fixed an issue that prevented proper initialization of dnn-richtext --- packages/stencil-library/src/utilities/stringUtilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stencil-library/src/utilities/stringUtilities.ts b/packages/stencil-library/src/utilities/stringUtilities.ts index dee33f28..9cbe3073 100644 --- a/packages/stencil-library/src/utilities/stringUtilities.ts +++ b/packages/stencil-library/src/utilities/stringUtilities.ts @@ -15,7 +15,7 @@ export function getReadableFileSizeString (fileSizeInBytes: number) : string { /** Takes an html encoded string and converts it to actual decoded html. */ export function decodeHtml(html: string) : string { - if (html != undefined){ + if (html == undefined){ return ''; } From bcf3906ff77eeb8e17a37c79f212465c0807e73b Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Apr 2025 04:44:22 -0400 Subject: [PATCH 3/6] Fixed storybook (again) Some things have change on how to load markdown content with the vite builder --- package-lock.json | 2 +- packages/stencil-library/.storybook/main.ts | 3 +-- packages/stencil-library/eslint.config.ts | 2 ++ packages/stencil-library/package.json | 3 +-- ...dnn-button.stories.ts => dnn-autocomplete.stories.ts} | 9 +++------ .../src/components/dnn-button/dnn-button.stories.ts | 2 +- .../src/components/dnn-checkbox/dnn-checkbox.stories.ts | 2 +- .../src/components/dnn-chevron/dnn-chevron.stories.ts | 2 +- .../dnn-collapsible/dnn-collapsible.stories.ts | 2 +- .../dnn-color-input/dnn-color-input.stories.ts | 2 +- .../dnn-color-picker/dnn-color-picker.stories.ts | 2 +- .../src/components/dnn-dropzone/dnn-dropzone.stories.ts | 2 +- .../dnn-image-cropper/dnn-image-cropper.stories.ts | 2 +- .../src/components/dnn-input/dnn-input.stories.ts | 2 +- .../src/components/dnn-modal/dnn-modal.stories.ts | 2 +- .../dnn-permissions-grid/dnn-permissions-grid.stories.ts | 2 +- .../dnn-progress-bar/dnn-progress-bar.stories.ts | 2 +- .../components/dnn-searchbox/dnn-searchbox.stories.ts | 2 +- .../src/components/dnn-select/dnn-select.stories.ts | 2 +- .../components/dnn-sort-icon/dnn-sort-icon.stories.ts | 2 +- .../src/components/dnn-tab/dnn-tab.stories.ts | 2 +- .../src/components/dnn-tabs/dnn-tabs.stories.ts | 2 +- .../src/components/dnn-textarea/dnn-textarea.stories.ts | 2 +- .../src/components/dnn-toggle/dnn-toggle.stories.ts | 2 +- .../dnn-treeview-item/dnn-treeview-item.stories.ts | 2 +- .../dnn-vertical-overflow-menu.stories.ts | 2 +- .../dnn-vertical-splitview.stories.ts | 2 +- .../dnn-example-form/dnn-example-form.stories.ts | 2 +- packages/stencil-library/types/raw-md.d.ts | 4 ++++ 29 files changed, 35 insertions(+), 34 deletions(-) rename packages/stencil-library/src/components/dnn-autocomplete/{dnn-button.stories.ts => dnn-autocomplete.stories.ts} (84%) create mode 100644 packages/stencil-library/types/raw-md.d.ts diff --git a/package-lock.json b/package-lock.json index d5a2b457..e4ee70af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22834,7 +22834,7 @@ "@storybook/web-components": "^8.6.12", "@storybook/web-components-vite": "^8.6.12", "@timkendrick/monaco-editor": "^0.0.9", - "@types/jest": "^29.5.10", + "@types/jest": "^29.5.14", "@typescript-eslint/eslint-plugin": "^8.30.1", "@typescript-eslint/parser": "^8.30.1", "@typescript-eslint/rule-tester": "^8.30.1", diff --git a/packages/stencil-library/.storybook/main.ts b/packages/stencil-library/.storybook/main.ts index fff4ce5c..f4e8b542 100644 --- a/packages/stencil-library/.storybook/main.ts +++ b/packages/stencil-library/.storybook/main.ts @@ -1,5 +1,4 @@ import type { StorybookConfig } from '@storybook/web-components-vite'; - import { join, dirname } from "path" /** @@ -12,7 +11,7 @@ function getAbsolutePath(value: string): any { const config: StorybookConfig = { "stories": [ "../src/**/*.mdx", - "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)", + "../src/components/**/*.stories.@(js|jsx|mjs|ts|tsx)", ], "addons": [ getAbsolutePath('@storybook/addon-essentials'), diff --git a/packages/stencil-library/eslint.config.ts b/packages/stencil-library/eslint.config.ts index e2be5eeb..cc97a893 100644 --- a/packages/stencil-library/eslint.config.ts +++ b/packages/stencil-library/eslint.config.ts @@ -36,6 +36,8 @@ export default (tseslint.config( ".storybook/**/*", "eslint.config.ts", "stencil.config.ts", + "storybook-static", + "types" ], }, { diff --git a/packages/stencil-library/package.json b/packages/stencil-library/package.json index 9f340633..cb23de53 100644 --- a/packages/stencil-library/package.json +++ b/packages/stencil-library/package.json @@ -55,8 +55,8 @@ "devDependencies": { "@chromatic-com/storybook": "^3.1.0", "@eslint/js": "^9.24.0", - "@stencil/eslint-plugin": "1.0.0", "@stencil/core": "4.29.3", + "@stencil/eslint-plugin": "1.0.0", "@stencil/react-output-target": "^0.5.1", "@stencil/sass": "^3.0.4", "@storybook/addon-a11y": "^8.6.12", @@ -68,7 +68,6 @@ "@storybook/web-components": "^8.6.12", "@storybook/web-components-vite": "^8.6.12", "@timkendrick/monaco-editor": "^0.0.9", - "@types/jest": "^29.5.10", "@typescript-eslint/eslint-plugin": "^8.30.1", "@typescript-eslint/parser": "^8.30.1", "@typescript-eslint/rule-tester": "^8.30.1", diff --git a/packages/stencil-library/src/components/dnn-autocomplete/dnn-button.stories.ts b/packages/stencil-library/src/components/dnn-autocomplete/dnn-autocomplete.stories.ts similarity index 84% rename from packages/stencil-library/src/components/dnn-autocomplete/dnn-button.stories.ts rename to packages/stencil-library/src/components/dnn-autocomplete/dnn-autocomplete.stories.ts index d0cf4eb4..77f17e5e 100644 --- a/packages/stencil-library/src/components/dnn-autocomplete/dnn-button.stories.ts +++ b/packages/stencil-library/src/components/dnn-autocomplete/dnn-autocomplete.stories.ts @@ -1,10 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; -import { html, LitElement } from 'lit'; -import { customElement, state } from 'lit/decorators.js'; -import { ifDefined } from 'lit-html/directives/if-defined.js'; -import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; +import { html } from 'lit'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/AutoComplete', @@ -13,7 +10,7 @@ const meta: Meta = { parameters: { docs: { description: { - component: readme.default, + component: readme, } } }, diff --git a/packages/stencil-library/src/components/dnn-button/dnn-button.stories.ts b/packages/stencil-library/src/components/dnn-button/dnn-button.stories.ts index 6e8ff2cf..e3777721 100644 --- a/packages/stencil-library/src/components/dnn-button/dnn-button.stories.ts +++ b/packages/stencil-library/src/components/dnn-button/dnn-button.stories.ts @@ -3,7 +3,7 @@ import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Button', diff --git a/packages/stencil-library/src/components/dnn-checkbox/dnn-checkbox.stories.ts b/packages/stencil-library/src/components/dnn-checkbox/dnn-checkbox.stories.ts index b6ea02e7..128154f9 100644 --- a/packages/stencil-library/src/components/dnn-checkbox/dnn-checkbox.stories.ts +++ b/packages/stencil-library/src/components/dnn-checkbox/dnn-checkbox.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta : Meta = { title: 'Elements/Checkbox', diff --git a/packages/stencil-library/src/components/dnn-chevron/dnn-chevron.stories.ts b/packages/stencil-library/src/components/dnn-chevron/dnn-chevron.stories.ts index 85af98b2..c26aeb06 100644 --- a/packages/stencil-library/src/components/dnn-chevron/dnn-chevron.stories.ts +++ b/packages/stencil-library/src/components/dnn-chevron/dnn-chevron.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta : Meta = { diff --git a/packages/stencil-library/src/components/dnn-collapsible/dnn-collapsible.stories.ts b/packages/stencil-library/src/components/dnn-collapsible/dnn-collapsible.stories.ts index 6ee587d9..a459f87a 100644 --- a/packages/stencil-library/src/components/dnn-collapsible/dnn-collapsible.stories.ts +++ b/packages/stencil-library/src/components/dnn-collapsible/dnn-collapsible.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: "Elements/Collapsible", diff --git a/packages/stencil-library/src/components/dnn-color-input/dnn-color-input.stories.ts b/packages/stencil-library/src/components/dnn-color-input/dnn-color-input.stories.ts index cd7708c0..1ea3a5f2 100644 --- a/packages/stencil-library/src/components/dnn-color-input/dnn-color-input.stories.ts +++ b/packages/stencil-library/src/components/dnn-color-input/dnn-color-input.stories.ts @@ -3,7 +3,7 @@ import { html, nothing, TemplateResult } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Color Input', diff --git a/packages/stencil-library/src/components/dnn-color-picker/dnn-color-picker.stories.ts b/packages/stencil-library/src/components/dnn-color-picker/dnn-color-picker.stories.ts index a88bf051..5a161d42 100644 --- a/packages/stencil-library/src/components/dnn-color-picker/dnn-color-picker.stories.ts +++ b/packages/stencil-library/src/components/dnn-color-picker/dnn-color-picker.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/dnn-dropzone/dnn-dropzone.stories.ts b/packages/stencil-library/src/components/dnn-dropzone/dnn-dropzone.stories.ts index 0707e5e3..508b3b5c 100644 --- a/packages/stencil-library/src/components/dnn-dropzone/dnn-dropzone.stories.ts +++ b/packages/stencil-library/src/components/dnn-dropzone/dnn-dropzone.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/dnn-image-cropper/dnn-image-cropper.stories.ts b/packages/stencil-library/src/components/dnn-image-cropper/dnn-image-cropper.stories.ts index 452f3b1d..44f65a66 100644 --- a/packages/stencil-library/src/components/dnn-image-cropper/dnn-image-cropper.stories.ts +++ b/packages/stencil-library/src/components/dnn-image-cropper/dnn-image-cropper.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Image Cropper', diff --git a/packages/stencil-library/src/components/dnn-input/dnn-input.stories.ts b/packages/stencil-library/src/components/dnn-input/dnn-input.stories.ts index f3153fd6..c2787b03 100644 --- a/packages/stencil-library/src/components/dnn-input/dnn-input.stories.ts +++ b/packages/stencil-library/src/components/dnn-input/dnn-input.stories.ts @@ -3,7 +3,7 @@ import { html, nothing, TemplateResult } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Input', diff --git a/packages/stencil-library/src/components/dnn-modal/dnn-modal.stories.ts b/packages/stencil-library/src/components/dnn-modal/dnn-modal.stories.ts index e5973d48..52f7331d 100644 --- a/packages/stencil-library/src/components/dnn-modal/dnn-modal.stories.ts +++ b/packages/stencil-library/src/components/dnn-modal/dnn-modal.stories.ts @@ -3,7 +3,7 @@ import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Modal', diff --git a/packages/stencil-library/src/components/dnn-permissions-grid/dnn-permissions-grid.stories.ts b/packages/stencil-library/src/components/dnn-permissions-grid/dnn-permissions-grid.stories.ts index 7610cf1a..1e7bcc68 100644 --- a/packages/stencil-library/src/components/dnn-permissions-grid/dnn-permissions-grid.stories.ts +++ b/packages/stencil-library/src/components/dnn-permissions-grid/dnn-permissions-grid.stories.ts @@ -4,7 +4,7 @@ import { IPermissions } from "./permissions-interface"; import { IRoleGroup } from "./role-group-interface"; import { IRole } from "./role-interface"; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: "Elements/Permissions Grid", diff --git a/packages/stencil-library/src/components/dnn-progress-bar/dnn-progress-bar.stories.ts b/packages/stencil-library/src/components/dnn-progress-bar/dnn-progress-bar.stories.ts index e7a920b9..2ecb4280 100644 --- a/packages/stencil-library/src/components/dnn-progress-bar/dnn-progress-bar.stories.ts +++ b/packages/stencil-library/src/components/dnn-progress-bar/dnn-progress-bar.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Progress Bar', diff --git a/packages/stencil-library/src/components/dnn-searchbox/dnn-searchbox.stories.ts b/packages/stencil-library/src/components/dnn-searchbox/dnn-searchbox.stories.ts index ac0c0c5d..acd9dde6 100644 --- a/packages/stencil-library/src/components/dnn-searchbox/dnn-searchbox.stories.ts +++ b/packages/stencil-library/src/components/dnn-searchbox/dnn-searchbox.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: "Elements/Searchbox", diff --git a/packages/stencil-library/src/components/dnn-select/dnn-select.stories.ts b/packages/stencil-library/src/components/dnn-select/dnn-select.stories.ts index 0b8766fa..1091e5e4 100644 --- a/packages/stencil-library/src/components/dnn-select/dnn-select.stories.ts +++ b/packages/stencil-library/src/components/dnn-select/dnn-select.stories.ts @@ -3,7 +3,7 @@ import { html, nothing, TemplateResult } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Select', diff --git a/packages/stencil-library/src/components/dnn-sort-icon/dnn-sort-icon.stories.ts b/packages/stencil-library/src/components/dnn-sort-icon/dnn-sort-icon.stories.ts index 7cae140c..87a386f7 100644 --- a/packages/stencil-library/src/components/dnn-sort-icon/dnn-sort-icon.stories.ts +++ b/packages/stencil-library/src/components/dnn-sort-icon/dnn-sort-icon.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from "lit"; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: "Elements/Sort Icon", diff --git a/packages/stencil-library/src/components/dnn-tab/dnn-tab.stories.ts b/packages/stencil-library/src/components/dnn-tab/dnn-tab.stories.ts index 3f5bddd8..0adde199 100644 --- a/packages/stencil-library/src/components/dnn-tab/dnn-tab.stories.ts +++ b/packages/stencil-library/src/components/dnn-tab/dnn-tab.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/dnn-tabs/dnn-tabs.stories.ts b/packages/stencil-library/src/components/dnn-tabs/dnn-tabs.stories.ts index a02d8096..7eb1b88f 100644 --- a/packages/stencil-library/src/components/dnn-tabs/dnn-tabs.stories.ts +++ b/packages/stencil-library/src/components/dnn-tabs/dnn-tabs.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/dnn-textarea/dnn-textarea.stories.ts b/packages/stencil-library/src/components/dnn-textarea/dnn-textarea.stories.ts index 91341330..f8f2e804 100644 --- a/packages/stencil-library/src/components/dnn-textarea/dnn-textarea.stories.ts +++ b/packages/stencil-library/src/components/dnn-textarea/dnn-textarea.stories.ts @@ -3,7 +3,7 @@ import { html, nothing, TemplateResult } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Textarea', diff --git a/packages/stencil-library/src/components/dnn-toggle/dnn-toggle.stories.ts b/packages/stencil-library/src/components/dnn-toggle/dnn-toggle.stories.ts index fa2ac3e2..f4e697db 100644 --- a/packages/stencil-library/src/components/dnn-toggle/dnn-toggle.stories.ts +++ b/packages/stencil-library/src/components/dnn-toggle/dnn-toggle.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/dnn-treeview-item/dnn-treeview-item.stories.ts b/packages/stencil-library/src/components/dnn-treeview-item/dnn-treeview-item.stories.ts index d05437a6..1cbe912b 100644 --- a/packages/stencil-library/src/components/dnn-treeview-item/dnn-treeview-item.stories.ts +++ b/packages/stencil-library/src/components/dnn-treeview-item/dnn-treeview-item.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; import exp from 'constants'; diff --git a/packages/stencil-library/src/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.ts b/packages/stencil-library/src/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.ts index 842ff14d..b256cf83 100644 --- a/packages/stencil-library/src/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.ts +++ b/packages/stencil-library/src/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.ts @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { title: 'Elements/Vertical Overflow Menu', diff --git a/packages/stencil-library/src/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.ts b/packages/stencil-library/src/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.ts index ce60fed4..ba35ff49 100644 --- a/packages/stencil-library/src/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.ts +++ b/packages/stencil-library/src/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.ts @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; import { ifDefined } from 'lit-html/directives/if-defined.js'; import { actions } from '@storybook/addon-actions'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/src/components/examples/dnn-example-form/dnn-example-form.stories.ts b/packages/stencil-library/src/components/examples/dnn-example-form/dnn-example-form.stories.ts index 159be873..06fd3d60 100644 --- a/packages/stencil-library/src/components/examples/dnn-example-form/dnn-example-form.stories.ts +++ b/packages/stencil-library/src/components/examples/dnn-example-form/dnn-example-form.stories.ts @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { html } from 'lit'; -import readme from "./readme.md"; +import readme from "./readme.md?raw"; const meta: Meta = { diff --git a/packages/stencil-library/types/raw-md.d.ts b/packages/stencil-library/types/raw-md.d.ts new file mode 100644 index 00000000..326840b4 --- /dev/null +++ b/packages/stencil-library/types/raw-md.d.ts @@ -0,0 +1,4 @@ +declare module '*.md?raw' { + const content: string; + export default content; +} \ No newline at end of file From ecfcfe520fc51cfee740c2234a9fc7122b6925cc Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Apr 2025 12:09:27 -0400 Subject: [PATCH 4/6] Commit jest types in package.json --- packages/stencil-library/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stencil-library/package.json b/packages/stencil-library/package.json index cb23de53..50bfa195 100644 --- a/packages/stencil-library/package.json +++ b/packages/stencil-library/package.json @@ -68,6 +68,7 @@ "@storybook/web-components": "^8.6.12", "@storybook/web-components-vite": "^8.6.12", "@timkendrick/monaco-editor": "^0.0.9", + "@types/jest": "^29.5.14", "@typescript-eslint/eslint-plugin": "^8.30.1", "@typescript-eslint/parser": "^8.30.1", "@typescript-eslint/rule-tester": "^8.30.1", From 7721624e2ea95d26ba08876afa5238d86d3a048b Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Apr 2025 12:32:12 -0400 Subject: [PATCH 5/6] Add .md files to storybook-static assets Add .md files to storybook-static assets --- packages/stencil-library/vite.config.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/stencil-library/vite.config.ts diff --git a/packages/stencil-library/vite.config.ts b/packages/stencil-library/vite.config.ts new file mode 100644 index 00000000..c254e8a2 --- /dev/null +++ b/packages/stencil-library/vite.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from "vite"; + +export default defineConfig({ + assetsInclude: ['**/*.md'], +}); \ No newline at end of file From 95d651c34c9726888ce6a351fd01f2ec8c168caf Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Apr 2025 12:37:42 -0400 Subject: [PATCH 6/6] Don't lint config files Don't lint config files --- packages/stencil-library/eslint.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/stencil-library/eslint.config.ts b/packages/stencil-library/eslint.config.ts index cc97a893..fb79f938 100644 --- a/packages/stencil-library/eslint.config.ts +++ b/packages/stencil-library/eslint.config.ts @@ -37,7 +37,8 @@ export default (tseslint.config( "eslint.config.ts", "stencil.config.ts", "storybook-static", - "types" + "types", + "vite.config.ts", ], }, {