@dxos/storybook-utils 0.8.3 → 0.8.4-main.03d5cd7b56

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.
Files changed (53) hide show
  1. package/dist/lib/browser/index.mjs +18 -131
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +18 -131
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/components/DocsContainer.d.ts +4 -0
  8. package/dist/types/src/components/DocsContainer.d.ts.map +1 -0
  9. package/dist/types/src/components/index.d.ts +1 -0
  10. package/dist/types/src/components/index.d.ts.map +1 -0
  11. package/dist/types/src/decorators/index.d.ts +1 -2
  12. package/dist/types/src/decorators/index.d.ts.map +1 -1
  13. package/dist/types/src/decorators/withLayout.d.ts +1 -18
  14. package/dist/types/src/decorators/withLayout.d.ts.map +1 -1
  15. package/dist/types/src/decorators/withRegistry.d.ts +6 -0
  16. package/dist/types/src/decorators/withRegistry.d.ts.map +1 -0
  17. package/dist/types/src/index.d.ts +0 -2
  18. package/dist/types/src/index.d.ts.map +1 -1
  19. package/dist/types/src/stories/test/Test.d.ts +6 -0
  20. package/dist/types/src/stories/test/Test.d.ts.map +1 -0
  21. package/dist/types/src/stories/test/Test.stories.d.ts +11 -0
  22. package/dist/types/src/stories/test/Test.stories.d.ts.map +1 -0
  23. package/dist/types/src/stories/test/Test.test.d.ts +2 -0
  24. package/dist/types/src/stories/test/Test.test.d.ts.map +1 -0
  25. package/dist/types/src/vitest-setup.d.ts +2 -0
  26. package/dist/types/src/vitest-setup.d.ts.map +1 -0
  27. package/dist/types/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +24 -23
  29. package/src/components/DocsContainer.tsx +18 -0
  30. package/src/components/index.ts +3 -0
  31. package/src/decorators/index.ts +1 -2
  32. package/src/decorators/withLayout.tsx +15 -74
  33. package/src/decorators/withRegistry.tsx +23 -0
  34. package/src/index.ts +0 -7
  35. package/src/stories/test/Test.stories.tsx +61 -0
  36. package/src/stories/test/Test.test.tsx +30 -0
  37. package/src/stories/test/Test.tsx +15 -0
  38. package/src/stories/test/__snapshots__/Test.test.tsx.snap +3 -0
  39. package/src/stories/test/index.mdx__ +17 -0
  40. package/src/vitest-setup.ts +11 -0
  41. package/README.yml +0 -1
  42. package/dist/lib/node/index.cjs +0 -170
  43. package/dist/lib/node/index.cjs.map +0 -7
  44. package/dist/lib/node/meta.json +0 -1
  45. package/dist/types/src/decorators/withSignals.d.ts +0 -6
  46. package/dist/types/src/decorators/withSignals.d.ts.map +0 -1
  47. package/dist/types/src/decorators/withTheme.d.ts +0 -7
  48. package/dist/types/src/decorators/withTheme.d.ts.map +0 -1
  49. package/dist/types/src/util.d.ts +0 -6
  50. package/dist/types/src/util.d.ts.map +0 -1
  51. package/src/decorators/withSignals.tsx +0 -16
  52. package/src/decorators/withTheme.tsx +0 -84
  53. package/src/util.tsx +0 -12
@@ -1,141 +1,28 @@
1
- // packages/common/storybook-utils/src/index.ts
2
- import { registerSignalsRuntime as registerSignalsRuntime2 } from "@dxos/echo-signals/react";
3
-
4
- // packages/common/storybook-utils/src/decorators/withLayout.tsx
5
- import defaultsDeep from "lodash.defaultsdeep";
1
+ // src/decorators/withLayout.tsx
6
2
  import React from "react";
7
- import { DensityProvider } from "@dxos/react-ui";
8
- import { mx } from "@dxos/react-ui-theme";
9
- var defaultOptions = {
10
- density: "fine"
11
- };
12
- var providers = [
13
- (children, options) => {
14
- return options?.density ? /* @__PURE__ */ React.createElement(DensityProvider, {
15
- density: options.density
16
- }, children) : children;
3
+ var withLayout = (Story, context) => {
4
+ switch (context.parameters.layout) {
5
+ case "fullscreen":
6
+ return /* @__PURE__ */ React.createElement("div", {
7
+ className: "fixed inset-0 flex flex-col overflow-hidden bg-base-surface"
8
+ }, /* @__PURE__ */ React.createElement(Story, null));
9
+ default:
10
+ return /* @__PURE__ */ React.createElement(Story, null);
17
11
  }
18
- ];
19
- var withLayout = ({ classNames, fullscreen, Container = fullscreen ? FixedContainer : DefaultContainer, ...providedOptions } = {}) => {
20
- return (Story, _context) => {
21
- const children = /* @__PURE__ */ React.createElement(Container, {
22
- classNames,
23
- fullscreen
24
- }, /* @__PURE__ */ React.createElement(Story, null));
25
- const options = defaultsDeep({}, providedOptions, defaultOptions);
26
- return providers.reduceRight((acc, provider) => provider(acc, options), children);
27
- };
28
- };
29
- var DefaultContainer = ({ children, classNames }) => {
30
- return /* @__PURE__ */ React.createElement("div", {
31
- role: "none",
32
- className: mx(classNames)
33
- }, children);
34
- };
35
- var FixedContainer = ({ children, classNames }) => {
36
- return /* @__PURE__ */ React.createElement("div", {
37
- role: "none",
38
- className: mx("fixed inset-0 flex overflow-hidden", classNames)
39
- }, children);
40
- };
41
- var ColumnContainer = ({ children, classNames = "w-[30rem]", ...props }) => {
42
- return /* @__PURE__ */ React.createElement(FixedContainer, {
43
- classNames: "justify-center bg-modalSurface",
44
- ...props
45
- }, /* @__PURE__ */ React.createElement("div", {
46
- role: "none",
47
- className: mx("flex flex-col h-full overflow-y-auto bg-baseSurface", classNames)
48
- }, children));
49
12
  };
50
13
 
51
- // packages/common/storybook-utils/src/decorators/withSignals.tsx
52
- import React2 from "react";
53
- import { registerSignalsRuntime } from "@dxos/echo-signals/react";
54
- var withSignals = (Story) => {
55
- registerSignalsRuntime();
56
- return /* @__PURE__ */ React2.createElement(Story, null);
57
- };
58
-
59
- // packages/common/storybook-utils/src/decorators/withTheme.tsx
60
- import { addons } from "@storybook/preview-api";
61
- import React3, { memo, useCallback, useEffect, useState } from "react";
62
- import { DARK_MODE_EVENT_NAME } from "storybook-dark-mode";
63
- import { DxThemeEditor as NaturalDxThemeEditor } from "@dxos/lit-theme-editor";
64
- import "@dxos/lit-theme-editor/dx-theme-editor.pcss";
65
- import { createComponent } from "@dxos/lit-ui/react";
66
- import { ThemeProvider, Tooltip, Dialog, IconButton } from "@dxos/react-ui";
67
- import { defaultTx } from "@dxos/react-ui-theme";
68
- import { PARAM_KEY } from "@dxos/theme-editor-addon";
69
- var DxThemeEditor = createComponent({
70
- tagName: "dx-theme-editor",
71
- elementClass: NaturalDxThemeEditor,
72
- react: React3
73
- });
74
- var withTheme = (Story, context) => {
14
+ // src/decorators/withRegistry.tsx
15
+ import { Registry, RegistryContext } from "@effect-atom/atom-react";
16
+ import React2, { memo, useMemo } from "react";
17
+ var withRegistry = (Story) => {
18
+ const registry = useMemo(() => Registry.make(), []);
75
19
  const MemoizedStory = /* @__PURE__ */ memo(Story);
76
- const [themeMode, setThemeMode] = useState("dark");
77
- const [editorOpen, setEditorOpen] = useState(false);
78
- const handleOpenChange = useCallback((nextOpen) => {
79
- setEditorOpen(nextOpen);
80
- }, []);
81
- useEffect(() => {
82
- const handleDarkModeUpdate = (darkMode) => setThemeMode(darkMode ? "dark" : "light");
83
- addons.getChannel().on(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);
84
- return () => addons.getChannel().off(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);
85
- }, []);
86
- useEffect(() => {
87
- const openEditor = () => {
88
- handleOpenChange(true);
89
- };
90
- addons.getChannel().on(PARAM_KEY, openEditor);
91
- return () => addons.getChannel().off(PARAM_KEY, openEditor);
92
- }, []);
93
- return /* @__PURE__ */ React3.createElement(ThemeProvider, {
94
- tx: defaultTx,
95
- themeMode,
96
- resourceExtensions: context?.parameters?.translations,
97
- noCache: true
98
- }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(MemoizedStory, null), /* @__PURE__ */ React3.createElement(Dialog.Root, {
99
- open: editorOpen,
100
- onOpenChange: handleOpenChange,
101
- modal: false
102
- }, /* @__PURE__ */ React3.createElement("div", {
103
- role: "none",
104
- className: "dx-dialog__overlay bg-transparent pointer-events-none",
105
- style: {
106
- placeContent: "end"
107
- }
108
- }, /* @__PURE__ */ React3.createElement(Dialog.Content, {
109
- classNames: "relative box-content py-0 px-2 md:is-[35rem] md:max-is-none overflow-y-auto layout-contain pointer-events-auto",
110
- style: {
111
- maxBlockSize: "50dvh"
112
- },
113
- onInteractOutside: (event) => event.preventDefault()
114
- }, /* @__PURE__ */ React3.createElement(Dialog.Title, {
115
- srOnly: true
116
- }, "Theme Editor"), editorOpen && /* @__PURE__ */ React3.createElement(DxThemeEditor, null), /* @__PURE__ */ React3.createElement(Dialog.Close, {
117
- asChild: true
118
- }, /* @__PURE__ */ React3.createElement(IconButton, {
119
- iconOnly: true,
120
- icon: "ph--x--regular",
121
- label: "Close",
122
- classNames: "absolute block-start-2 inline-end-2"
123
- })))))));
20
+ return /* @__PURE__ */ React2.createElement(RegistryContext.Provider, {
21
+ value: registry
22
+ }, /* @__PURE__ */ React2.createElement(MemoizedStory, null));
124
23
  };
125
-
126
- // packages/common/storybook-utils/src/util.tsx
127
- import React4 from "react";
128
- var render = (r) => (args) => /* @__PURE__ */ React4.createElement(React4.Fragment, null, r(args) ?? /* @__PURE__ */ React4.createElement("div", null));
129
-
130
- // packages/common/storybook-utils/src/index.ts
131
- registerSignalsRuntime2();
132
24
  export {
133
- ColumnContainer,
134
- DefaultContainer,
135
- FixedContainer,
136
- render,
137
25
  withLayout,
138
- withSignals,
139
- withTheme
26
+ withRegistry
140
27
  };
141
28
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/decorators/withLayout.tsx", "../../../src/decorators/withSignals.tsx", "../../../src/decorators/withTheme.tsx", "../../../src/util.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\n\nexport { type Meta } from '@storybook/react';\n\nexport * from './decorators';\nexport * from './util';\n\nregisterSignalsRuntime();\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport defaultsDeep from 'lodash.defaultsdeep';\nimport React, { type PropsWithChildren, type JSX, type FC } from 'react';\n\nimport { type Density, DensityProvider, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype ProviderOptions = {\n fullscreen?: boolean;\n density?: Density;\n};\n\nconst defaultOptions: ProviderOptions = {\n density: 'fine',\n};\n\ntype Provider = (children: JSX.Element, options: ProviderOptions) => JSX.Element;\n\nconst providers: Provider[] = [\n (children, options) => {\n return options?.density ? <DensityProvider density={options.density}>{children}</DensityProvider> : children;\n },\n];\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren<Pick<ProviderOptions, 'fullscreen'>>>;\n\nexport type WithLayoutProps = ThemedClassName<ProviderOptions & { Container?: FC<ContainerProps> }>;\n\n/**\n * Decorator to layout the story container, adding optional providers.\n */\nexport const withLayout = ({\n classNames,\n fullscreen,\n Container = fullscreen ? FixedContainer : DefaultContainer,\n ...providedOptions\n}: WithLayoutProps = {}): Decorator => {\n // TODO(burdon): Inspect \"fullscreen\" parameter in context.\n return (Story, _context) => {\n const children = (\n <Container classNames={classNames} fullscreen={fullscreen}>\n <Story />\n </Container>\n );\n\n const options = defaultsDeep({}, providedOptions, defaultOptions);\n return providers.reduceRight((acc, provider) => provider(acc, options), children);\n };\n};\n\nexport const DefaultContainer: FC<ContainerProps> = ({ children, classNames }) => {\n return (\n <div role='none' className={mx(classNames)}>\n {children}\n </div>\n );\n};\n\nexport const FixedContainer: FC<ContainerProps> = ({ children, classNames }) => {\n return (\n <div role='none' className={mx('fixed inset-0 flex overflow-hidden', classNames)}>\n {children}\n </div>\n );\n};\n\nexport const ColumnContainer: FC<ContainerProps> = ({ children, classNames = 'w-[30rem]', ...props }) => {\n return (\n <FixedContainer classNames='justify-center bg-modalSurface' {...props}>\n <div role='none' className={mx('flex flex-col h-full overflow-y-auto bg-baseSurface', classNames)}>\n {children}\n </div>\n </FixedContainer>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\n\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\n\n/**\n * Make objects created using @dxos/echo-schema `create` reactive.\n */\nexport const withSignals: Decorator = (Story) => {\n registerSignalsRuntime();\n return <Story />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { addons } from '@storybook/preview-api';\nimport { type Decorator } from '@storybook/react';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';\n\nimport { DxThemeEditor as NaturalDxThemeEditor } from '@dxos/lit-theme-editor';\nimport '@dxos/lit-theme-editor/dx-theme-editor.pcss';\nimport { createComponent } from '@dxos/lit-ui/react';\nimport { type ThemeMode, ThemeProvider, Tooltip, Dialog, IconButton } from '@dxos/react-ui';\nimport { defaultTx } from '@dxos/react-ui-theme';\nimport { PARAM_KEY } from '@dxos/theme-editor-addon';\n\nconst DxThemeEditor = createComponent({\n tagName: 'dx-theme-editor',\n elementClass: NaturalDxThemeEditor,\n react: React,\n});\n\n/**\n * Changes theme based on storybook toolbar toggle.\n */\nexport const withTheme: Decorator = (Story, context) => {\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n const [themeMode, setThemeMode] = useState<ThemeMode>('dark');\n const [editorOpen, setEditorOpen] = useState(false);\n\n const handleOpenChange = useCallback((nextOpen: boolean) => {\n setEditorOpen(nextOpen);\n }, []);\n\n // https://www.npmjs.com/package/storybook-dark-mode\n // NOTE: The `useDarkMode` hook causes the story to continually re-render.\n // NOTE: Changing the theme will cause the story to remount.\n useEffect(() => {\n const handleDarkModeUpdate = (darkMode: boolean) => setThemeMode(darkMode ? 'dark' : 'light');\n addons.getChannel().on(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);\n return () => addons.getChannel().off(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);\n }, []);\n\n useEffect(() => {\n const openEditor = () => {\n handleOpenChange(true);\n };\n addons.getChannel().on(PARAM_KEY, openEditor);\n return () => addons.getChannel().off(PARAM_KEY, openEditor);\n }, []);\n\n return (\n <ThemeProvider tx={defaultTx} themeMode={themeMode} resourceExtensions={context?.parameters?.translations} noCache>\n <Tooltip.Provider>\n <MemoizedStory />\n <Dialog.Root open={editorOpen} onOpenChange={handleOpenChange} modal={false}>\n <div\n role='none'\n className='dx-dialog__overlay bg-transparent pointer-events-none'\n style={{ placeContent: 'end' }}\n >\n <Dialog.Content\n classNames='relative box-content py-0 px-2 md:is-[35rem] md:max-is-none overflow-y-auto layout-contain pointer-events-auto'\n style={{ maxBlockSize: '50dvh' }}\n onInteractOutside={(event) => event.preventDefault()}\n >\n <Dialog.Title srOnly>Theme Editor</Dialog.Title>\n {editorOpen && <DxThemeEditor />}\n <Dialog.Close asChild>\n <IconButton\n iconOnly\n icon='ph--x--regular'\n label='Close'\n classNames='absolute block-start-2 inline-end-2'\n />\n </Dialog.Close>\n </Dialog.Content>\n </div>\n </Dialog.Root>\n </Tooltip.Provider>\n </ThemeProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\n/**\n * Story renderer wrapper.\n */\nexport const render =\n <T,>(r: FC<T>) =>\n (args: T) => <>{r(args) ?? <div />}</>;\n"],
5
- "mappings": ";AAIA,SAASA,0BAAAA,+BAA8B;;;ACCvC,OAAOC,kBAAkB;AACzB,OAAOC,WAA0D;AAEjE,SAAuBC,uBAA6C;AACpE,SAASC,UAAU;AAOnB,IAAMC,iBAAkC;EACtCC,SAAS;AACX;AAIA,IAAMC,YAAwB;EAC5B,CAACC,UAAUC,YAAAA;AACT,WAAOA,SAASH,UAAU,sBAAA,cAACI,iBAAAA;MAAgBJ,SAASG,QAAQH;OAAUE,QAAAA,IAA8BA;EACtG;;AAUK,IAAMG,aAAa,CAAC,EACzBC,YACAC,YACAC,YAAYD,aAAaE,iBAAiBC,kBAC1C,GAAGC,gBAAAA,IACgB,CAAC,MAAC;AAErB,SAAO,CAACC,OAAOC,aAAAA;AACb,UAAMX,WACJ,sBAAA,c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AAAhD,OAAA,cAACiC,OAAOgB,OAAK;IAACC,QAAAA;KAAO,cAAA,GACpBzC,cAAc,gBAAAT,OAAA,cAACN,eAAAA,IAAAA,GAChB,gBAAAM,OAAA,cAACiC,OAAOkB,OAAK;IAACC,SAAAA;KACZ,gBAAApD,OAAA,cAACqD,YAAAA;IACCC,UAAAA;IACAC,MAAK;IACLC,OAAM;IACNZ,YAAW;;AAS7B;;;AC/EA,OAAOa,YAAwB;AAKxB,IAAMC,SACX,CAAKC,MACL,CAACC,SAAY,gBAAAC,OAAA,cAAAA,OAAA,UAAA,MAAGF,EAAEC,IAAAA,KAAS,gBAAAC,OAAA,cAACC,OAAAA,IAAAA,CAAAA;;;AJA9BC,wBAAAA;",
6
- "names": ["registerSignalsRuntime", "defaultsDeep", "React", "DensityProvider", "mx", "defaultOptions", "density", "providers", "children", "options", "DensityProvider", "withLayout", "classNames", "fullscreen", "Container", "FixedContainer", "DefaultContainer", "providedOptions", "Story", "_context", "defaultsDeep", "reduceRight", "acc", "provider", "div", "role", "className", "mx", "ColumnContainer", "props", "React", "registerSignalsRuntime", "withSignals", "Story", "registerSignalsRuntime", "React", "addons", "React", "memo", "useCallback", "useEffect", "useState", "DARK_MODE_EVENT_NAME", "DxThemeEditor", "NaturalDxThemeEditor", "createComponent", "ThemeProvider", "Tooltip", "Dialog", "IconButton", "defaultTx", "PARAM_KEY", "DxThemeEditor", "createComponent", "tagName", "elementClass", "NaturalDxThemeEditor", "react", "React", "withTheme", "Story", "context", "MemoizedStory", "memo", "themeMode", "setThemeMode", "useState", "editorOpen", "setEditorOpen", "handleOpenChange", "useCallback", "nextOpen", "useEffect", "handleDarkModeUpdate", "darkMode", "addons", "getChannel", "on", "DARK_MODE_EVENT_NAME", "off", "openEditor", "PARAM_KEY", "ThemeProvider", "tx", "defaultTx", "resourceExtensions", "parameters", "translations", "noCache", "Tooltip", "Provider", "Dialog", "Root", "open", "onOpenChange", "modal", "div", "role", "className", "style", "placeContent", "Content", "classNames", "maxBlockSize", "onInteractOutside", "event", "preventDefault", "Title", "srOnly", "Close", "asChild", "IconButton", "iconOnly", "icon", "label", "React", "render", "r", "args", "React", "div", "registerSignalsRuntime"]
3
+ "sources": ["../../../src/decorators/withLayout.tsx", "../../../src/decorators/withRegistry.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\n\nexport const withLayout: Decorator = (Story, context) => {\n switch (context.parameters.layout) {\n case 'fullscreen':\n return (\n <div className='fixed inset-0 flex flex-col overflow-hidden bg-base-surface'>\n <Story />\n </div>\n );\n\n default:\n return <Story />;\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Registry, RegistryContext } from '@effect-atom/atom-react';\nimport { type Decorator } from '@storybook/react';\nimport React, { memo, useMemo } from 'react';\n\n/**\n * Adds Effect Atom registry context for storybook.\n */\nexport const withRegistry: Decorator = (Story) => {\n const registry = useMemo(() => Registry.make(), []);\n\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n\n return (\n <RegistryContext.Provider value={registry}>\n <MemoizedStory />\n </RegistryContext.Provider>\n );\n};\n"],
5
+ "mappings": ";AAKA,OAAOA,WAAW;AAEX,IAAMC,aAAwB,CAACC,OAAOC,YAAAA;AAC3C,UAAQA,QAAQC,WAAWC,QAAM;IAC/B,KAAK;AACH,aACE,sBAAA,cAACC,OAAAA;QAAIC,WAAU;SACb,sBAAA,cAACL,OAAAA,IAAAA,CAAAA;IAIP;AACE,aAAO,sBAAA,cAACA,OAAAA,IAAAA;EACZ;AACF;;;ACfA,SAASM,UAAUC,uBAAuB;AAE1C,OAAOC,UAASC,MAAMC,eAAe;AAK9B,IAAMC,eAA0B,CAACC,UAAAA;AACtC,QAAMC,WAAWH,QAAQ,MAAMJ,SAASQ,KAAI,GAAI,CAAA,CAAE;AAGlD,QAAMC,gBAAgBN,qBAAKG,KAAAA;AAE3B,SACE,gBAAAJ,OAAA,cAACD,gBAAgBS,UAAQ;IAACC,OAAOJ;KAC/B,gBAAAL,OAAA,cAACO,eAAAA,IAAAA,CAAAA;AAGP;",
6
+ "names": ["React", "withLayout", "Story", "context", "parameters", "layout", "div", "className", "Registry", "RegistryContext", "React", "memo", "useMemo", "withRegistry", "Story", "registry", "make", "MemoizedStory", "Provider", "value"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/common/storybook-utils/src/decorators/withLayout.tsx":{"bytes":7364,"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"},"packages/common/storybook-utils/src/decorators/withSignals.tsx":{"bytes":1400,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/decorators/withTheme.tsx":{"bytes":10989,"imports":[{"path":"@storybook/preview-api","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"storybook-dark-mode","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/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":"@dxos/theme-editor-addon","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/decorators/index.ts":{"bytes":676,"imports":[{"path":"packages/common/storybook-utils/src/decorators/withLayout.tsx","kind":"import-statement","original":"./withLayout"},{"path":"packages/common/storybook-utils/src/decorators/withSignals.tsx","kind":"import-statement","original":"./withSignals"},{"path":"packages/common/storybook-utils/src/decorators/withTheme.tsx","kind":"import-statement","original":"./withTheme"}],"format":"esm"},"packages/common/storybook-utils/src/util.tsx":{"bytes":1012,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/index.ts":{"bytes":930,"imports":[{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"packages/common/storybook-utils/src/decorators/index.ts","kind":"import-statement","original":"./decorators"},{"path":"packages/common/storybook-utils/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/common/storybook-utils/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11326},"packages/common/storybook-utils/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/echo-signals/react","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/echo-signals/react","kind":"import-statement","external":true},{"path":"@storybook/preview-api","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"storybook-dark-mode","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/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":"@dxos/theme-editor-addon","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["ColumnContainer","DefaultContainer","FixedContainer","render","withLayout","withSignals","withTheme"],"entryPoint":"packages/common/storybook-utils/src/index.ts","inputs":{"packages/common/storybook-utils/src/index.ts":{"bytesInOutput":121},"packages/common/storybook-utils/src/decorators/withLayout.tsx":{"bytesInOutput":1671},"packages/common/storybook-utils/src/decorators/index.ts":{"bytesInOutput":0},"packages/common/storybook-utils/src/decorators/withSignals.tsx":{"bytesInOutput":217},"packages/common/storybook-utils/src/decorators/withTheme.tsx":{"bytesInOutput":2803},"packages/common/storybook-utils/src/util.tsx":{"bytesInOutput":181}},"bytes":5492}}}
1
+ {"inputs":{"src/decorators/withLayout.tsx":{"bytes":1631,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/withRegistry.tsx":{"bytes":2112,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/index.ts":{"bytes":482,"imports":[{"path":"src/decorators/withLayout.tsx","kind":"import-statement","original":"./withLayout"},{"path":"src/decorators/withRegistry.tsx","kind":"import-statement","original":"./withRegistry"}],"format":"esm"},"src/index.ts":{"bytes":382,"imports":[{"path":"src/decorators/index.ts","kind":"import-statement","original":"./decorators"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1936},"dist/lib/browser/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["withLayout","withRegistry"],"entryPoint":"src/index.ts","inputs":{"src/decorators/withLayout.tsx":{"bytesInOutput":410},"src/decorators/index.ts":{"bytesInOutput":0},"src/decorators/withRegistry.tsx":{"bytesInOutput":418},"src/index.ts":{"bytesInOutput":0}},"bytes":973}}}
@@ -1,143 +1,30 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
 
3
- // packages/common/storybook-utils/src/index.ts
4
- import { registerSignalsRuntime as registerSignalsRuntime2 } from "@dxos/echo-signals/react";
5
-
6
- // packages/common/storybook-utils/src/decorators/withLayout.tsx
7
- import defaultsDeep from "lodash.defaultsdeep";
3
+ // src/decorators/withLayout.tsx
8
4
  import React from "react";
9
- import { DensityProvider } from "@dxos/react-ui";
10
- import { mx } from "@dxos/react-ui-theme";
11
- var defaultOptions = {
12
- density: "fine"
13
- };
14
- var providers = [
15
- (children, options) => {
16
- return options?.density ? /* @__PURE__ */ React.createElement(DensityProvider, {
17
- density: options.density
18
- }, children) : children;
5
+ var withLayout = (Story, context) => {
6
+ switch (context.parameters.layout) {
7
+ case "fullscreen":
8
+ return /* @__PURE__ */ React.createElement("div", {
9
+ className: "fixed inset-0 flex flex-col overflow-hidden bg-base-surface"
10
+ }, /* @__PURE__ */ React.createElement(Story, null));
11
+ default:
12
+ return /* @__PURE__ */ React.createElement(Story, null);
19
13
  }
20
- ];
21
- var withLayout = ({ classNames, fullscreen, Container = fullscreen ? FixedContainer : DefaultContainer, ...providedOptions } = {}) => {
22
- return (Story, _context) => {
23
- const children = /* @__PURE__ */ React.createElement(Container, {
24
- classNames,
25
- fullscreen
26
- }, /* @__PURE__ */ React.createElement(Story, null));
27
- const options = defaultsDeep({}, providedOptions, defaultOptions);
28
- return providers.reduceRight((acc, provider) => provider(acc, options), children);
29
- };
30
- };
31
- var DefaultContainer = ({ children, classNames }) => {
32
- return /* @__PURE__ */ React.createElement("div", {
33
- role: "none",
34
- className: mx(classNames)
35
- }, children);
36
- };
37
- var FixedContainer = ({ children, classNames }) => {
38
- return /* @__PURE__ */ React.createElement("div", {
39
- role: "none",
40
- className: mx("fixed inset-0 flex overflow-hidden", classNames)
41
- }, children);
42
- };
43
- var ColumnContainer = ({ children, classNames = "w-[30rem]", ...props }) => {
44
- return /* @__PURE__ */ React.createElement(FixedContainer, {
45
- classNames: "justify-center bg-modalSurface",
46
- ...props
47
- }, /* @__PURE__ */ React.createElement("div", {
48
- role: "none",
49
- className: mx("flex flex-col h-full overflow-y-auto bg-baseSurface", classNames)
50
- }, children));
51
14
  };
52
15
 
53
- // packages/common/storybook-utils/src/decorators/withSignals.tsx
54
- import React2 from "react";
55
- import { registerSignalsRuntime } from "@dxos/echo-signals/react";
56
- var withSignals = (Story) => {
57
- registerSignalsRuntime();
58
- return /* @__PURE__ */ React2.createElement(Story, null);
59
- };
60
-
61
- // packages/common/storybook-utils/src/decorators/withTheme.tsx
62
- import { addons } from "@storybook/preview-api";
63
- import React3, { memo, useCallback, useEffect, useState } from "react";
64
- import { DARK_MODE_EVENT_NAME } from "storybook-dark-mode";
65
- import { DxThemeEditor as NaturalDxThemeEditor } from "@dxos/lit-theme-editor";
66
- import "@dxos/lit-theme-editor/dx-theme-editor.pcss";
67
- import { createComponent } from "@dxos/lit-ui/react";
68
- import { ThemeProvider, Tooltip, Dialog, IconButton } from "@dxos/react-ui";
69
- import { defaultTx } from "@dxos/react-ui-theme";
70
- import { PARAM_KEY } from "@dxos/theme-editor-addon";
71
- var DxThemeEditor = createComponent({
72
- tagName: "dx-theme-editor",
73
- elementClass: NaturalDxThemeEditor,
74
- react: React3
75
- });
76
- var withTheme = (Story, context) => {
16
+ // src/decorators/withRegistry.tsx
17
+ import { Registry, RegistryContext } from "@effect-atom/atom-react";
18
+ import React2, { memo, useMemo } from "react";
19
+ var withRegistry = (Story) => {
20
+ const registry = useMemo(() => Registry.make(), []);
77
21
  const MemoizedStory = /* @__PURE__ */ memo(Story);
78
- const [themeMode, setThemeMode] = useState("dark");
79
- const [editorOpen, setEditorOpen] = useState(false);
80
- const handleOpenChange = useCallback((nextOpen) => {
81
- setEditorOpen(nextOpen);
82
- }, []);
83
- useEffect(() => {
84
- const handleDarkModeUpdate = (darkMode) => setThemeMode(darkMode ? "dark" : "light");
85
- addons.getChannel().on(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);
86
- return () => addons.getChannel().off(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);
87
- }, []);
88
- useEffect(() => {
89
- const openEditor = () => {
90
- handleOpenChange(true);
91
- };
92
- addons.getChannel().on(PARAM_KEY, openEditor);
93
- return () => addons.getChannel().off(PARAM_KEY, openEditor);
94
- }, []);
95
- return /* @__PURE__ */ React3.createElement(ThemeProvider, {
96
- tx: defaultTx,
97
- themeMode,
98
- resourceExtensions: context?.parameters?.translations,
99
- noCache: true
100
- }, /* @__PURE__ */ React3.createElement(Tooltip.Provider, null, /* @__PURE__ */ React3.createElement(MemoizedStory, null), /* @__PURE__ */ React3.createElement(Dialog.Root, {
101
- open: editorOpen,
102
- onOpenChange: handleOpenChange,
103
- modal: false
104
- }, /* @__PURE__ */ React3.createElement("div", {
105
- role: "none",
106
- className: "dx-dialog__overlay bg-transparent pointer-events-none",
107
- style: {
108
- placeContent: "end"
109
- }
110
- }, /* @__PURE__ */ React3.createElement(Dialog.Content, {
111
- classNames: "relative box-content py-0 px-2 md:is-[35rem] md:max-is-none overflow-y-auto layout-contain pointer-events-auto",
112
- style: {
113
- maxBlockSize: "50dvh"
114
- },
115
- onInteractOutside: (event) => event.preventDefault()
116
- }, /* @__PURE__ */ React3.createElement(Dialog.Title, {
117
- srOnly: true
118
- }, "Theme Editor"), editorOpen && /* @__PURE__ */ React3.createElement(DxThemeEditor, null), /* @__PURE__ */ React3.createElement(Dialog.Close, {
119
- asChild: true
120
- }, /* @__PURE__ */ React3.createElement(IconButton, {
121
- iconOnly: true,
122
- icon: "ph--x--regular",
123
- label: "Close",
124
- classNames: "absolute block-start-2 inline-end-2"
125
- })))))));
22
+ return /* @__PURE__ */ React2.createElement(RegistryContext.Provider, {
23
+ value: registry
24
+ }, /* @__PURE__ */ React2.createElement(MemoizedStory, null));
126
25
  };
127
-
128
- // packages/common/storybook-utils/src/util.tsx
129
- import React4 from "react";
130
- var render = (r) => (args) => /* @__PURE__ */ React4.createElement(React4.Fragment, null, r(args) ?? /* @__PURE__ */ React4.createElement("div", null));
131
-
132
- // packages/common/storybook-utils/src/index.ts
133
- registerSignalsRuntime2();
134
26
  export {
135
- ColumnContainer,
136
- DefaultContainer,
137
- FixedContainer,
138
- render,
139
27
  withLayout,
140
- withSignals,
141
- withTheme
28
+ withRegistry
142
29
  };
143
30
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/decorators/withLayout.tsx", "../../../src/decorators/withSignals.tsx", "../../../src/decorators/withTheme.tsx", "../../../src/util.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\n\nexport { type Meta } from '@storybook/react';\n\nexport * from './decorators';\nexport * from './util';\n\nregisterSignalsRuntime();\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport defaultsDeep from 'lodash.defaultsdeep';\nimport React, { type PropsWithChildren, type JSX, type FC } from 'react';\n\nimport { type Density, DensityProvider, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype ProviderOptions = {\n fullscreen?: boolean;\n density?: Density;\n};\n\nconst defaultOptions: ProviderOptions = {\n density: 'fine',\n};\n\ntype Provider = (children: JSX.Element, options: ProviderOptions) => JSX.Element;\n\nconst providers: Provider[] = [\n (children, options) => {\n return options?.density ? <DensityProvider density={options.density}>{children}</DensityProvider> : children;\n },\n];\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren<Pick<ProviderOptions, 'fullscreen'>>>;\n\nexport type WithLayoutProps = ThemedClassName<ProviderOptions & { Container?: FC<ContainerProps> }>;\n\n/**\n * Decorator to layout the story container, adding optional providers.\n */\nexport const withLayout = ({\n classNames,\n fullscreen,\n Container = fullscreen ? FixedContainer : DefaultContainer,\n ...providedOptions\n}: WithLayoutProps = {}): Decorator => {\n // TODO(burdon): Inspect \"fullscreen\" parameter in context.\n return (Story, _context) => {\n const children = (\n <Container classNames={classNames} fullscreen={fullscreen}>\n <Story />\n </Container>\n );\n\n const options = defaultsDeep({}, providedOptions, defaultOptions);\n return providers.reduceRight((acc, provider) => provider(acc, options), children);\n };\n};\n\nexport const DefaultContainer: FC<ContainerProps> = ({ children, classNames }) => {\n return (\n <div role='none' className={mx(classNames)}>\n {children}\n </div>\n );\n};\n\nexport const FixedContainer: FC<ContainerProps> = ({ children, classNames }) => {\n return (\n <div role='none' className={mx('fixed inset-0 flex overflow-hidden', classNames)}>\n {children}\n </div>\n );\n};\n\nexport const ColumnContainer: FC<ContainerProps> = ({ children, classNames = 'w-[30rem]', ...props }) => {\n return (\n <FixedContainer classNames='justify-center bg-modalSurface' {...props}>\n <div role='none' className={mx('flex flex-col h-full overflow-y-auto bg-baseSurface', classNames)}>\n {children}\n </div>\n </FixedContainer>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\n\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\n\n/**\n * Make objects created using @dxos/echo-schema `create` reactive.\n */\nexport const withSignals: Decorator = (Story) => {\n registerSignalsRuntime();\n return <Story />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { addons } from '@storybook/preview-api';\nimport { type Decorator } from '@storybook/react';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';\n\nimport { DxThemeEditor as NaturalDxThemeEditor } from '@dxos/lit-theme-editor';\nimport '@dxos/lit-theme-editor/dx-theme-editor.pcss';\nimport { createComponent } from '@dxos/lit-ui/react';\nimport { type ThemeMode, ThemeProvider, Tooltip, Dialog, IconButton } from '@dxos/react-ui';\nimport { defaultTx } from '@dxos/react-ui-theme';\nimport { PARAM_KEY } from '@dxos/theme-editor-addon';\n\nconst DxThemeEditor = createComponent({\n tagName: 'dx-theme-editor',\n elementClass: NaturalDxThemeEditor,\n react: React,\n});\n\n/**\n * Changes theme based on storybook toolbar toggle.\n */\nexport const withTheme: Decorator = (Story, context) => {\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n const [themeMode, setThemeMode] = useState<ThemeMode>('dark');\n const [editorOpen, setEditorOpen] = useState(false);\n\n const handleOpenChange = useCallback((nextOpen: boolean) => {\n setEditorOpen(nextOpen);\n }, []);\n\n // https://www.npmjs.com/package/storybook-dark-mode\n // NOTE: The `useDarkMode` hook causes the story to continually re-render.\n // NOTE: Changing the theme will cause the story to remount.\n useEffect(() => {\n const handleDarkModeUpdate = (darkMode: boolean) => setThemeMode(darkMode ? 'dark' : 'light');\n addons.getChannel().on(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);\n return () => addons.getChannel().off(DARK_MODE_EVENT_NAME, handleDarkModeUpdate);\n }, []);\n\n useEffect(() => {\n const openEditor = () => {\n handleOpenChange(true);\n };\n addons.getChannel().on(PARAM_KEY, openEditor);\n return () => addons.getChannel().off(PARAM_KEY, openEditor);\n }, []);\n\n return (\n <ThemeProvider tx={defaultTx} themeMode={themeMode} resourceExtensions={context?.parameters?.translations} noCache>\n <Tooltip.Provider>\n <MemoizedStory />\n <Dialog.Root open={editorOpen} onOpenChange={handleOpenChange} modal={false}>\n <div\n role='none'\n className='dx-dialog__overlay bg-transparent pointer-events-none'\n style={{ placeContent: 'end' }}\n >\n <Dialog.Content\n classNames='relative box-content py-0 px-2 md:is-[35rem] md:max-is-none overflow-y-auto layout-contain pointer-events-auto'\n style={{ maxBlockSize: '50dvh' }}\n onInteractOutside={(event) => event.preventDefault()}\n >\n <Dialog.Title srOnly>Theme Editor</Dialog.Title>\n {editorOpen && <DxThemeEditor />}\n <Dialog.Close asChild>\n <IconButton\n iconOnly\n icon='ph--x--regular'\n label='Close'\n classNames='absolute block-start-2 inline-end-2'\n />\n </Dialog.Close>\n </Dialog.Content>\n </div>\n </Dialog.Root>\n </Tooltip.Provider>\n </ThemeProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\n/**\n * Story renderer wrapper.\n */\nexport const render =\n <T,>(r: FC<T>) =>\n (args: T) => <>{r(args) ?? <div />}</>;\n"],
5
- "mappings": ";;;AAIA,SAASA,0BAAAA,+BAA8B;;;ACCvC,OAAOC,kBAAkB;AACzB,OAAOC,WAA0D;AAEjE,SAAuBC,uBAA6C;AACpE,SAASC,UAAU;AAOnB,IAAMC,iBAAkC;EACtCC,SAAS;AACX;AAIA,IAAMC,YAAwB;EAC5B,CAACC,UAAUC,YAAAA;AACT,WAAOA,SAASH,UAAU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IAAkB0B,OAAO;KACpE,gBAAArC,OAAA,cAACsC,OAAAA;IACCC,MAAK;IACLC,WAAU;IACVC,OAAO;MAAEC,cAAc;IAAM;KAE7B,gBAAA1C,OAAA,cAACiC,OAAOU,SAAO;IACbC,YAAW;IACXH,OAAO;MAAEI,cAAc;IAAQ;IAC/BC,mBAAmB,CAACC,UAAUA,MAAMC,eAAc;KAElD,gBAAAhD,OAAA,cAACiC,OAAOgB,OAAK;IAACC,QAAAA;KAAO,cAAA,GACpBzC,cAAc,gBAAAT,OAAA,cAACN,eAAAA,IAAAA,GAChB,gBAAAM,OAAA,cAACiC,OAAOkB,OAAK;IAACC,SAAAA;KACZ,gBAAApD,OAAA,cAACqD,YAAAA;IACCC,UAAAA;IACAC,MAAK;IACLC,OAAM;IACNZ,YAAW;;AAS7B;;;AC/EA,OAAOa,YAAwB;AAKxB,IAAMC,SACX,CAAKC,MACL,CAACC,SAAY,gBAAAC,OAAA,cAAAA,OAAA,UAAA,MAAGF,EAAEC,IAAAA,KAAS,gBAAAC,OAAA,cAACC,OAAAA,IAAAA,CAAAA;;;AJA9BC,wBAAAA;",
6
- "names": ["registerSignalsRuntime", "defaultsDeep", "React", "DensityProvider", "mx", "defaultOptions", "density", "providers", "children", "options", "DensityProvider", "withLayout", "classNames", "fullscreen", "Container", "FixedContainer", "DefaultContainer", "providedOptions", "Story", "_context", "defaultsDeep", "reduceRight", "acc", "provider", "div", "role", "className", "mx", "ColumnContainer", "props", "React", "registerSignalsRuntime", "withSignals", "Story", "registerSignalsRuntime", "React", "addons", "React", "memo", "useCallback", "useEffect", "useState", "DARK_MODE_EVENT_NAME", "DxThemeEditor", "NaturalDxThemeEditor", "createComponent", "ThemeProvider", "Tooltip", "Dialog", "IconButton", "defaultTx", "PARAM_KEY", "DxThemeEditor", "createComponent", "tagName", "elementClass", "NaturalDxThemeEditor", "react", "React", "withTheme", "Story", "context", "MemoizedStory", "memo", "themeMode", "setThemeMode", "useState", "editorOpen", "setEditorOpen", "handleOpenChange", "useCallback", "nextOpen", "useEffect", "handleDarkModeUpdate", "darkMode", "addons", "getChannel", "on", "DARK_MODE_EVENT_NAME", "off", "openEditor", "PARAM_KEY", "ThemeProvider", "tx", "defaultTx", "resourceExtensions", "parameters", "translations", "noCache", "Tooltip", "Provider", "Dialog", "Root", "open", "onOpenChange", "modal", "div", "role", "className", "style", "placeContent", "Content", "classNames", "maxBlockSize", "onInteractOutside", "event", "preventDefault", "Title", "srOnly", "Close", "asChild", "IconButton", "iconOnly", "icon", "label", "React", "render", "r", "args", "React", "div", "registerSignalsRuntime"]
3
+ "sources": ["../../../src/decorators/withLayout.tsx", "../../../src/decorators/withRegistry.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\n\nexport const withLayout: Decorator = (Story, context) => {\n switch (context.parameters.layout) {\n case 'fullscreen':\n return (\n <div className='fixed inset-0 flex flex-col overflow-hidden bg-base-surface'>\n <Story />\n </div>\n );\n\n default:\n return <Story />;\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Registry, RegistryContext } from '@effect-atom/atom-react';\nimport { type Decorator } from '@storybook/react';\nimport React, { memo, useMemo } from 'react';\n\n/**\n * Adds Effect Atom registry context for storybook.\n */\nexport const withRegistry: Decorator = (Story) => {\n const registry = useMemo(() => Registry.make(), []);\n\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n\n return (\n <RegistryContext.Provider value={registry}>\n <MemoizedStory />\n </RegistryContext.Provider>\n );\n};\n"],
5
+ "mappings": ";;;AAKA,OAAOA,WAAW;AAEX,IAAMC,aAAwB,CAACC,OAAOC,YAAAA;AAC3C,UAAQA,QAAQC,WAAWC,QAAM;IAC/B,KAAK;AACH,aACE,sBAAA,cAACC,OAAAA;QAAIC,WAAU;SACb,sBAAA,cAACL,OAAAA,IAAAA,CAAAA;IAIP;AACE,aAAO,sBAAA,cAACA,OAAAA,IAAAA;EACZ;AACF;;;ACfA,SAASM,UAAUC,uBAAuB;AAE1C,OAAOC,UAASC,MAAMC,eAAe;AAK9B,IAAMC,eAA0B,CAACC,UAAAA;AACtC,QAAMC,WAAWH,QAAQ,MAAMJ,SAASQ,KAAI,GAAI,CAAA,CAAE;AAGlD,QAAMC,gBAAgBN,qBAAKG,KAAAA;AAE3B,SACE,gBAAAJ,OAAA,cAACD,gBAAgBS,UAAQ;IAACC,OAAOJ;KAC/B,gBAAAL,OAAA,cAACO,eAAAA,IAAAA,CAAAA;AAGP;",
6
+ "names": ["React", "withLayout", "Story", "context", "parameters", "layout", "div", "className", "Registry", "RegistryContext", "React", "memo", "useMemo", "withRegistry", "Story", "registry", "make", "MemoizedStory", "Provider", "value"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/common/storybook-utils/src/decorators/withLayout.tsx":{"bytes":7364,"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"},"packages/common/storybook-utils/src/decorators/withSignals.tsx":{"bytes":1400,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/decorators/withTheme.tsx":{"bytes":10989,"imports":[{"path":"@storybook/preview-api","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"storybook-dark-mode","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/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":"@dxos/theme-editor-addon","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/decorators/index.ts":{"bytes":676,"imports":[{"path":"packages/common/storybook-utils/src/decorators/withLayout.tsx","kind":"import-statement","original":"./withLayout"},{"path":"packages/common/storybook-utils/src/decorators/withSignals.tsx","kind":"import-statement","original":"./withSignals"},{"path":"packages/common/storybook-utils/src/decorators/withTheme.tsx","kind":"import-statement","original":"./withTheme"}],"format":"esm"},"packages/common/storybook-utils/src/util.tsx":{"bytes":1012,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/common/storybook-utils/src/index.ts":{"bytes":930,"imports":[{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"packages/common/storybook-utils/src/decorators/index.ts","kind":"import-statement","original":"./decorators"},{"path":"packages/common/storybook-utils/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/common/storybook-utils/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11328},"packages/common/storybook-utils/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/echo-signals/react","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/echo-signals/react","kind":"import-statement","external":true},{"path":"@storybook/preview-api","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"storybook-dark-mode","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor","kind":"import-statement","external":true},{"path":"@dxos/lit-theme-editor/dx-theme-editor.pcss","kind":"import-statement","external":true},{"path":"@dxos/lit-ui/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":"@dxos/theme-editor-addon","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["ColumnContainer","DefaultContainer","FixedContainer","render","withLayout","withSignals","withTheme"],"entryPoint":"packages/common/storybook-utils/src/index.ts","inputs":{"packages/common/storybook-utils/src/index.ts":{"bytesInOutput":121},"packages/common/storybook-utils/src/decorators/withLayout.tsx":{"bytesInOutput":1671},"packages/common/storybook-utils/src/decorators/index.ts":{"bytesInOutput":0},"packages/common/storybook-utils/src/decorators/withSignals.tsx":{"bytesInOutput":217},"packages/common/storybook-utils/src/decorators/withTheme.tsx":{"bytesInOutput":2803},"packages/common/storybook-utils/src/util.tsx":{"bytesInOutput":181}},"bytes":5585}}}
1
+ {"inputs":{"src/decorators/withLayout.tsx":{"bytes":1631,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/withRegistry.tsx":{"bytes":2112,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/decorators/index.ts":{"bytes":482,"imports":[{"path":"src/decorators/withLayout.tsx","kind":"import-statement","original":"./withLayout"},{"path":"src/decorators/withRegistry.tsx","kind":"import-statement","original":"./withRegistry"}],"format":"esm"},"src/index.ts":{"bytes":382,"imports":[{"path":"src/decorators/index.ts","kind":"import-statement","original":"./decorators"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1938},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["withLayout","withRegistry"],"entryPoint":"src/index.ts","inputs":{"src/decorators/withLayout.tsx":{"bytesInOutput":410},"src/decorators/index.ts":{"bytesInOutput":0},"src/decorators/withRegistry.tsx":{"bytesInOutput":418},"src/index.ts":{"bytesInOutput":0}},"bytes":1066}}}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * https://storybook.js.org/docs/writing-docs/doc-blocks
3
+ */
4
+ //# sourceMappingURL=DocsContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DocsContainer.tsx"],"names":[],"mappings":"AAQA;;GAEG"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
1
  export * from './withLayout';
2
- export * from './withSignals';
3
- export * from './withTheme';
2
+ export * from './withRegistry';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -1,20 +1,3 @@
1
1
  import { type Decorator } from '@storybook/react';
2
- import { type PropsWithChildren, type FC } from 'react';
3
- import { type Density, type ThemedClassName } from '@dxos/react-ui';
4
- type ProviderOptions = {
5
- fullscreen?: boolean;
6
- density?: Density;
7
- };
8
- export type ContainerProps = ThemedClassName<PropsWithChildren<Pick<ProviderOptions, 'fullscreen'>>>;
9
- export type WithLayoutProps = ThemedClassName<ProviderOptions & {
10
- Container?: FC<ContainerProps>;
11
- }>;
12
- /**
13
- * Decorator to layout the story container, adding optional providers.
14
- */
15
- export declare const withLayout: ({ classNames, fullscreen, Container, ...providedOptions }?: WithLayoutProps) => Decorator;
16
- export declare const DefaultContainer: FC<ContainerProps>;
17
- export declare const FixedContainer: FC<ContainerProps>;
18
- export declare const ColumnContainer: FC<ContainerProps>;
19
- export {};
2
+ export declare const withLayout: Decorator;
20
3
  //# 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,EAAY,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;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,cAAc,CAM/C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,cAAc,CAM7C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,cAAc,CAQ9C,CAAC"}
1
+ {"version":3,"file":"withLayout.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,UAAU,EAAE,SAYxB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Decorator } from '@storybook/react';
2
+ /**
3
+ * Adds Effect Atom registry context for storybook.
4
+ */
5
+ export declare const withRegistry: Decorator;
6
+ //# sourceMappingURL=withRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withRegistry.d.ts","sourceRoot":"","sources":["../../../../src/decorators/withRegistry.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,SAW1B,CAAC"}
@@ -1,4 +1,2 @@
1
- export { type Meta } from '@storybook/react';
2
1
  export * from './decorators';
3
- export * from './util';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -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":"AAIA,cAAc,cAAc,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,UAAW,SAAS,sBAEpC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import { Test } from './Test';
3
+ /**
4
+ * Storybook sanity test.
5
+ */
6
+ declare const meta: Meta<typeof Test>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const WithLog: Story;
11
+ //# 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,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,EAAW,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEvC;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAM3B,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAsBrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Test.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Test.test.d.ts","sourceRoot":"","sources":["../../../../../src/stories/test/Test.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom/vitest';
2
+ //# sourceMappingURL=vitest-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest-setup.d.ts","sourceRoot":"","sources":["../../../src/vitest-setup.ts"],"names":[],"mappings":"AAKA,OAAO,kCAAkC,CAAC"}