@dxos/storybook-utils 0.8.3 → 0.8.4-main.05e74ebcff

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 (55) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +18 -131
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node-esm/index.mjs +18 -131
  7. package/dist/lib/node-esm/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/types/src/components/DocsContainer.d.ts +4 -0
  10. package/dist/types/src/components/DocsContainer.d.ts.map +1 -0
  11. package/dist/types/src/components/index.d.ts +1 -0
  12. package/dist/types/src/components/index.d.ts.map +1 -0
  13. package/dist/types/src/decorators/index.d.ts +1 -2
  14. package/dist/types/src/decorators/index.d.ts.map +1 -1
  15. package/dist/types/src/decorators/withLayout.d.ts +1 -18
  16. package/dist/types/src/decorators/withLayout.d.ts.map +1 -1
  17. package/dist/types/src/decorators/withRegistry.d.ts +6 -0
  18. package/dist/types/src/decorators/withRegistry.d.ts.map +1 -0
  19. package/dist/types/src/index.d.ts +0 -2
  20. package/dist/types/src/index.d.ts.map +1 -1
  21. package/dist/types/src/stories/test/Test.d.ts +6 -0
  22. package/dist/types/src/stories/test/Test.d.ts.map +1 -0
  23. package/dist/types/src/stories/test/Test.stories.d.ts +11 -0
  24. package/dist/types/src/stories/test/Test.stories.d.ts.map +1 -0
  25. package/dist/types/src/stories/test/Test.test.d.ts +2 -0
  26. package/dist/types/src/stories/test/Test.test.d.ts.map +1 -0
  27. package/dist/types/src/vitest-setup.d.ts +2 -0
  28. package/dist/types/src/vitest-setup.d.ts.map +1 -0
  29. package/dist/types/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +25 -24
  31. package/src/components/DocsContainer.tsx +18 -0
  32. package/src/components/index.ts +3 -0
  33. package/src/decorators/index.ts +1 -2
  34. package/src/decorators/withLayout.tsx +15 -74
  35. package/src/decorators/withRegistry.tsx +23 -0
  36. package/src/index.ts +0 -7
  37. package/src/stories/test/Test.stories.tsx +61 -0
  38. package/src/stories/test/Test.test.tsx +30 -0
  39. package/src/stories/test/Test.tsx +15 -0
  40. package/src/stories/test/__snapshots__/Test.test.tsx.snap +3 -0
  41. package/src/stories/test/index.mdx__ +17 -0
  42. package/src/vitest-setup.ts +11 -0
  43. package/README.yml +0 -1
  44. package/dist/lib/node/index.cjs +0 -170
  45. package/dist/lib/node/index.cjs.map +0 -7
  46. package/dist/lib/node/meta.json +0 -1
  47. package/dist/types/src/decorators/withSignals.d.ts +0 -6
  48. package/dist/types/src/decorators/withSignals.d.ts.map +0 -1
  49. package/dist/types/src/decorators/withTheme.d.ts +0 -7
  50. package/dist/types/src/decorators/withTheme.d.ts.map +0 -1
  51. package/dist/types/src/util.d.ts +0 -6
  52. package/dist/types/src/util.d.ts.map +0 -1
  53. package/src/decorators/withSignals.tsx +0 -16
  54. package/src/decorators/withTheme.tsx +0 -84
  55. package/src/util.tsx +0 -12
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -6,4 +6,4 @@ Utilities for DXOS UI Storybooks.
6
6
 
7
7
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
8
8
 
9
- License: [MIT](./LICENSE) Copyright 2022 © DXOS
9
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2022 © DXOS
@@ -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,cAACM,WAAAA;MAAUF;MAAwBC;OACjC,sBAAA,cAACK,OAAAA,IAAAA,CAAAA;AAIL,UAAMT,UAAUW,aAAa,CAAC,GAAGH,iBAAiBZ,cAAAA;AAClD,WAAOE,UAAUc,YAAY,CAACC,KAAKC,aAAaA,SAASD,KAAKb,OAAAA,GAAUD,QAAAA;EAC1E;AACF;AAEO,IAAMQ,mBAAuC,CAAC,EAAER,UAAUI,WAAU,MAAE;AAC3E,SACE,sBAAA,cAACY,OAAAA;IAAIC,MAAK;IAAOC,WAAWC,GAAGf,UAAAA;KAC5BJ,QAAAA;AAGP;AAEO,IAAMO,iBAAqC,CAAC,EAAEP,UAAUI,WAAU,MAAE;AACzE,SACE,sBAAA,cAACY,OAAAA;IAAIC,MAAK;IAAOC,WAAWC,GAAG,sCAAsCf,UA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"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,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,cAACM,WAAAA;MAAUF;MAAwBC;OACjC,sBAAA,cAACK,OAAAA,IAAAA,CAAAA;AAIL,UAAMT,UAAUW,aAAa,CAAC,GAAGH,iBAAiBZ,cAAAA;AAClD,WAAOE,UAAUc,YAAY,CAACC,KAAKC,aAAaA,SAASD,KAAKb,OAAAA,GAAUD,QAAAA;EAC1E;AACF;AAEO,IAAMQ,mBAAuC,CAAC,EAAER,UA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;;;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"}