@dxos/storybook-utils 0.8.3 → 0.8.4-main.84f28bd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +55 -89
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +55 -89
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/DocsContainer.d.ts +4 -0
- package/dist/types/src/components/DocsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ThemeEditor.d.ts +5 -0
- package/dist/types/src/components/ThemeEditor.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/decorators/index.d.ts +1 -1
- package/dist/types/src/decorators/index.d.ts.map +1 -1
- package/dist/types/src/decorators/withLayout.d.ts +5 -4
- package/dist/types/src/decorators/withLayout.d.ts.map +1 -1
- package/dist/types/src/decorators/withTheme.d.ts +1 -2
- package/dist/types/src/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/decorators/withThemeEditor.d.ts +6 -0
- package/dist/types/src/decorators/withThemeEditor.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/stories/test/Test.d.ts +6 -0
- package/dist/types/src/stories/test/Test.d.ts.map +1 -0
- package/dist/types/src/stories/test/Test.stories.d.ts +12 -0
- package/dist/types/src/stories/test/Test.stories.d.ts.map +1 -0
- package/dist/types/src/stories/test/Test.test.d.ts +2 -0
- package/dist/types/src/stories/test/Test.test.d.ts.map +1 -0
- package/dist/types/src/vitest-setup.d.ts +2 -0
- package/dist/types/src/vitest-setup.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -14
- package/src/components/DocsContainer.tsx +18 -0
- package/src/components/ThemeEditor.tsx +18 -0
- package/src/components/index.ts +6 -0
- package/src/decorators/index.ts +1 -1
- package/src/decorators/withLayout.tsx +9 -6
- package/src/decorators/withTheme.tsx +9 -63
- package/src/decorators/withThemeEditor.tsx +28 -0
- package/src/index.ts +1 -0
- package/src/stories/test/Test.stories.tsx +62 -0
- package/src/stories/test/Test.test.tsx +40 -0
- package/src/stories/test/Test.tsx +15 -0
- package/src/stories/test/__snapshots__/Test.test.tsx.snap +3 -0
- package/src/stories/test/index.mdx +14 -0
- package/src/vitest-setup.ts +11 -0
- package/README.yml +0 -1
- package/dist/lib/node/index.cjs +0 -170
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/types/src/decorators/withSignals.d.ts +0 -6
- package/dist/types/src/decorators/withSignals.d.ts.map +0 -1
- package/src/decorators/withSignals.tsx +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"
|
|
1
|
+
{"inputs":{"src/components/ThemeEditor.tsx":{"bytes":1828,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/react","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true}],"format":"esm"},"src/components/index.ts":{"bytes":584,"imports":[{"path":"src/components/ThemeEditor.tsx","kind":"import-statement","original":"./ThemeEditor"}],"format":"esm"},"src/decorators/withLayout.tsx":{"bytes":7744,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/withTheme.tsx":{"bytes":2822,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/withThemeEditor.tsx":{"bytes":2713,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/decorators/index.ts":{"bytes":671,"imports":[{"path":"src/decorators/withLayout.tsx","kind":"import-statement","original":"./withLayout"},{"path":"src/decorators/withTheme.tsx","kind":"import-statement","original":"./withTheme"},{"path":"src/decorators/withThemeEditor.tsx","kind":"import-statement","original":"./withThemeEditor"}],"format":"esm"},"src/util.tsx":{"bytes":999,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1007,"imports":[{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/decorators/index.ts","kind":"import-statement","original":"./decorators"},{"path":"src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8696},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/react","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["ColumnContainer","DefaultContainer","FullscreenContainer","ThemeEditor","layoutCentered","render","withLayout","withTheme","withThemeEditor"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":93},"src/components/ThemeEditor.tsx":{"bytesInOutput":405},"src/components/index.ts":{"bytesInOutput":0},"src/decorators/withLayout.tsx":{"bytesInOutput":1764},"src/decorators/index.ts":{"bytesInOutput":0},"src/decorators/withTheme.tsx":{"bytesInOutput":608},"src/decorators/withThemeEditor.tsx":{"bytesInOutput":588},"src/util.tsx":{"bytesInOutput":181}},"bytes":4120}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DocsContainer.tsx"],"names":[],"mappings":"AAQA;;GAEG"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DxThemeEditor as NaturalDxThemeEditor } from '@dxos/lit-theme-editor';
|
|
3
|
+
import '@dxos/lit-theme-editor/dx-theme-editor.pcss';
|
|
4
|
+
export declare const ThemeEditor: React.MemoExoticComponent<import("@lit/react").ReactWebComponent<NaturalDxThemeEditor, {}>>;
|
|
5
|
+
//# sourceMappingURL=ThemeEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ThemeEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG/E,OAAO,6CAA6C,CAAC;AAQrD,eAAO,MAAM,WAAW,6FAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAKA,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Decorator } from '@storybook/react';
|
|
2
|
-
import { type PropsWithChildren, type FC } from 'react';
|
|
2
|
+
import { type PropsWithChildren, type JSX, type FC } from 'react';
|
|
3
3
|
import { type Density, type ThemedClassName } from '@dxos/react-ui';
|
|
4
4
|
type ProviderOptions = {
|
|
5
5
|
fullscreen?: boolean;
|
|
@@ -13,8 +13,9 @@ export type WithLayoutProps = ThemedClassName<ProviderOptions & {
|
|
|
13
13
|
* Decorator to layout the story container, adding optional providers.
|
|
14
14
|
*/
|
|
15
15
|
export declare const withLayout: ({ classNames, fullscreen, Container, ...providedOptions }?: WithLayoutProps) => Decorator;
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
16
|
+
export declare const layoutCentered = "bg-deckSurface justify-center overflow-y-auto";
|
|
17
|
+
export declare const DefaultContainer: ({ children, classNames }: ContainerProps) => JSX.Element;
|
|
18
|
+
export declare const FullscreenContainer: ({ children, classNames }: ContainerProps) => JSX.Element;
|
|
19
|
+
export declare const ColumnContainer: ({ children, classNames, ...props }: ContainerProps) => JSX.Element;
|
|
19
20
|
export {};
|
|
20
21
|
//# sourceMappingURL=withLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLayout.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAc,EAAE,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withLayout.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGrF,KAAK,eAAe,GAAG;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAcF,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;AAErG,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,eAAe,GAAG;IAAE,SAAS,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAA;CAAE,CAAC,CAAC;AAEpG;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,4DAKxB,eAAoB,KAAG,SAYzB,CAAC;AAGF,eAAO,MAAM,cAAc,kDAAkD,CAAC;AAE9E,eAAO,MAAM,gBAAgB,GAAI,0BAA0B,cAAc,gBAMxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,0BAA0B,cAAc,gBAM3E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,oCAAkD,cAAc,gBAQ/F,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Decorator } from '@storybook/react';
|
|
2
|
-
import '@dxos/lit-theme-editor/dx-theme-editor.pcss';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Adds theme decorator.
|
|
5
4
|
*/
|
|
6
5
|
export declare const withTheme: Decorator;
|
|
7
6
|
//# sourceMappingURL=withTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTheme.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withTheme.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withTheme.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withTheme.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,SAgBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withThemeEditor.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withThemeEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD;;GAEG;AAEH,eAAO,MAAM,eAAe,EAAE,SAc7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type IconButtonProps } from '@dxos/react-ui';
|
|
3
|
+
export declare const TEST_ID = "test";
|
|
4
|
+
export type TestProps = IconButtonProps;
|
|
5
|
+
export declare const Test: (props: TestProps) => React.JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["../../../../../src/stories/test/Test.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAElE,eAAO,MAAM,OAAO,SAAS,CAAC;AAE9B,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;AAExC,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,sBAEpC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import { type TestProps } from './Test';
|
|
4
|
+
/**
|
|
5
|
+
* Storybook sanity test.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<TestProps>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<TestProps>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const WithLog: Story;
|
|
12
|
+
//# sourceMappingURL=Test.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/test/Test.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEvD;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,CAKzB,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KAsBrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test.test.d.ts","sourceRoot":"","sources":["../../../../../src/stories/test/Test.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest-setup.d.ts","sourceRoot":"","sources":["../../../src/vitest-setup.ts"],"names":[],"mappings":"AAKA,OAAO,kCAAkC,CAAC"}
|