@dxos/plugin-testing 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef

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 (103) hide show
  1. package/dist/lib/browser/harness.mjs +35 -0
  2. package/dist/lib/browser/harness.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +18 -179
  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/harness.mjs +37 -0
  7. package/dist/lib/node-esm/harness.mjs.map +7 -0
  8. package/dist/lib/node-esm/index.mjs +19 -179
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/types/src/StorybookPlugin.d.ts +2 -1
  12. package/dist/types/src/StorybookPlugin.d.ts.map +1 -1
  13. package/dist/types/src/capabilities/index.d.ts +15 -2
  14. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  15. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  16. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  17. package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
  18. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  19. package/dist/types/src/components/{Layout.d.ts → Layout/Layout.d.ts} +1 -1
  20. package/dist/types/src/components/Layout/Layout.d.ts.map +1 -0
  21. package/dist/types/src/components/Layout/index.d.ts +2 -0
  22. package/dist/types/src/components/Layout/index.d.ts.map +1 -0
  23. package/dist/types/src/core.d.ts +1 -6
  24. package/dist/types/src/core.d.ts.map +1 -1
  25. package/dist/types/src/harness.d.ts +20 -0
  26. package/dist/types/src/harness.d.ts.map +1 -0
  27. package/dist/types/src/index.d.ts +3 -1
  28. package/dist/types/src/index.d.ts.map +1 -1
  29. package/dist/types/src/operations/add-toast.d.ts +5 -0
  30. package/dist/types/src/operations/add-toast.d.ts.map +1 -0
  31. package/dist/types/src/operations/close.d.ts +5 -0
  32. package/dist/types/src/operations/close.d.ts.map +1 -0
  33. package/dist/types/src/operations/index.d.ts +3 -0
  34. package/dist/types/src/operations/index.d.ts.map +1 -0
  35. package/dist/types/src/operations/open.d.ts +5 -0
  36. package/dist/types/src/operations/open.d.ts.map +1 -0
  37. package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
  38. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
  39. package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
  40. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  41. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  42. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  43. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  44. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  45. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  46. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  47. package/dist/types/src/operations/update-popover.d.ts +5 -0
  48. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  49. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  50. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  51. package/dist/types/src/operations/update-state.d.ts +5 -0
  52. package/dist/types/src/operations/update-state.d.ts.map +1 -0
  53. package/dist/types/src/types/capabilities.d.ts +2 -0
  54. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  55. package/dist/types/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +33 -18
  57. package/src/StorybookPlugin.ts +19 -16
  58. package/src/capabilities/index.ts +8 -2
  59. package/src/capabilities/operation-handler.ts +16 -0
  60. package/src/capabilities/{state/state.tsx → state.tsx} +6 -7
  61. package/src/components/Layout/Layout.tsx +236 -0
  62. package/src/components/Layout/index.ts +5 -0
  63. package/src/core.ts +2 -6
  64. package/src/harness.ts +52 -0
  65. package/src/index.ts +6 -1
  66. package/src/meta.ts +1 -1
  67. package/src/operations/add-toast.ts +22 -0
  68. package/src/operations/close.ts +14 -0
  69. package/src/operations/index.ts +18 -0
  70. package/src/operations/open.ts +18 -0
  71. package/src/operations/scroll-into-view.ts +14 -0
  72. package/src/operations/set-layout-mode.ts +14 -0
  73. package/src/operations/switch-workspace.ts +20 -0
  74. package/src/operations/update-complementary.ts +27 -0
  75. package/src/operations/update-dialog.ts +27 -0
  76. package/src/operations/update-popover.ts +37 -0
  77. package/src/operations/update-sidebar.ts +26 -0
  78. package/src/operations/update-state.ts +17 -0
  79. package/src/types/capabilities.ts +5 -2
  80. package/dist/lib/browser/chunk-YHPXIILW.mjs +0 -21
  81. package/dist/lib/browser/chunk-YHPXIILW.mjs.map +0 -7
  82. package/dist/lib/browser/operation-resolver-B2DOYB7C.mjs +0 -111
  83. package/dist/lib/browser/operation-resolver-B2DOYB7C.mjs.map +0 -7
  84. package/dist/lib/browser/state-2M3RMJYA.mjs +0 -42
  85. package/dist/lib/browser/state-2M3RMJYA.mjs.map +0 -7
  86. package/dist/lib/node-esm/chunk-OWK6XE6C.mjs +0 -23
  87. package/dist/lib/node-esm/chunk-OWK6XE6C.mjs.map +0 -7
  88. package/dist/lib/node-esm/operation-resolver-DJI7OPBP.mjs +0 -112
  89. package/dist/lib/node-esm/operation-resolver-DJI7OPBP.mjs.map +0 -7
  90. package/dist/lib/node-esm/state-UF2MWBFU.mjs +0 -43
  91. package/dist/lib/node-esm/state-UF2MWBFU.mjs.map +0 -7
  92. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  93. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  94. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  95. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  96. package/dist/types/src/capabilities/state/index.d.ts +0 -14
  97. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  98. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  99. package/dist/types/src/components/Layout.d.ts.map +0 -1
  100. package/src/capabilities/operation-resolver/index.ts +0 -7
  101. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -98
  102. package/src/capabilities/state/index.ts +0 -7
  103. package/src/components/Layout.tsx +0 -172
@@ -0,0 +1,35 @@
1
+ // src/harness.ts
2
+ import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
3
+ import { createTestApp } from "@dxos/app-framework/testing";
4
+ import { AttentionPlugin } from "@dxos/plugin-attention";
5
+ import { GraphPlugin } from "@dxos/plugin-graph";
6
+ import { SettingsPlugin } from "@dxos/plugin-settings";
7
+ var headlessCorePlugins = () => [
8
+ AttentionPlugin(),
9
+ GraphPlugin(),
10
+ OperationPlugin(),
11
+ RuntimePlugin(),
12
+ SettingsPlugin()
13
+ ];
14
+ var createComposerTestApp = async (opts = {}) => {
15
+ const { plugins = [], theme = false, ...rest } = opts;
16
+ const core = headlessCorePlugins();
17
+ if (theme) {
18
+ const { ThemePlugin } = await import("@dxos/plugin-theme");
19
+ const { defaultTx } = await import("@dxos/ui-theme");
20
+ core.push(ThemePlugin({
21
+ tx: defaultTx
22
+ }));
23
+ }
24
+ return createTestApp({
25
+ ...rest,
26
+ plugins: [
27
+ ...core,
28
+ ...plugins
29
+ ]
30
+ });
31
+ };
32
+ export {
33
+ createComposerTestApp
34
+ };
35
+ //# sourceMappingURL=harness.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/harness.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationPlugin, type Plugin, RuntimePlugin } from '@dxos/app-framework';\nimport { createTestApp, type TestAppOptions, type TestHarness } from '@dxos/app-framework/testing';\nimport { AttentionPlugin } from '@dxos/plugin-attention';\nimport { GraphPlugin } from '@dxos/plugin-graph';\nimport { SettingsPlugin } from '@dxos/plugin-settings';\n\nexport type ComposerTestAppOptions = Omit<TestAppOptions, 'plugins'> & {\n /** Plugins to register in addition to the Composer core plugins. */\n plugins?: Plugin.Plugin[];\n /**\n * Whether to include `ThemePlugin` in the core plugin set.\n * Defaults to `false` — `ThemePlugin` requires a browser DOM and breaks Node-only tests.\n * Set to `true` (with jsdom/happy-dom) when rendering React surfaces.\n */\n theme?: boolean;\n};\n\n/**\n * Headless core plugins for the test harness — the subset of `corePlugins()`\n * that can be activated without a browser DOM.\n */\nconst headlessCorePlugins = (): Plugin.Plugin[] => [\n AttentionPlugin(),\n GraphPlugin(),\n OperationPlugin(),\n RuntimePlugin(),\n SettingsPlugin(),\n];\n\n/**\n * Creates a TestHarness pre-loaded with the Composer core plugins\n * (Attention, Graph, Operation, Runtime, Settings, optionally Theme).\n *\n * For a ClientPlugin-backed harness, pass `ClientPlugin({ ... })` via `plugins`.\n */\nexport const createComposerTestApp = async (opts: ComposerTestAppOptions = {}): Promise<TestHarness> => {\n const { plugins = [], theme = false, ...rest } = opts;\n const core = headlessCorePlugins();\n if (theme) {\n const { ThemePlugin } = await import('@dxos/plugin-theme');\n const { defaultTx } = await import('@dxos/ui-theme');\n core.push(ThemePlugin({ tx: defaultTx }));\n }\n return createTestApp({\n ...rest,\n plugins: [...core, ...plugins],\n });\n};\n"],
5
+ "mappings": ";AAIA,SAASA,iBAA8BC,qBAAqB;AAC5D,SAASC,qBAA4D;AACrE,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAiB/B,IAAMC,sBAAsB,MAAuB;EACjDH,gBAAAA;EACAC,YAAAA;EACAJ,gBAAAA;EACAC,cAAAA;EACAI,eAAAA;;AASK,IAAME,wBAAwB,OAAOC,OAA+B,CAAC,MAAC;AAC3E,QAAM,EAAEC,UAAU,CAAA,GAAIC,QAAQ,OAAO,GAAGC,KAAAA,IAASH;AACjD,QAAMI,OAAON,oBAAAA;AACb,MAAII,OAAO;AACT,UAAM,EAAEG,YAAW,IAAK,MAAM,OAAO,oBAAA;AACrC,UAAM,EAAEC,UAAS,IAAK,MAAM,OAAO,gBAAA;AACnCF,SAAKG,KAAKF,YAAY;MAAEG,IAAIF;IAAU,CAAA,CAAA;EACxC;AACA,SAAOZ,cAAc;IACnB,GAAGS;IACHF,SAAS;SAAIG;SAASH;;EACxB,CAAA;AACF;",
6
+ "names": ["OperationPlugin", "RuntimePlugin", "createTestApp", "AttentionPlugin", "GraphPlugin", "SettingsPlugin", "headlessCorePlugins", "createComposerTestApp", "opts", "plugins", "theme", "rest", "core", "ThemePlugin", "defaultTx", "push", "tx"]
7
+ }
@@ -1,13 +1,23 @@
1
- import {
2
- LayoutState,
3
- meta
4
- } from "./chunk-YHPXIILW.mjs";
1
+ // src/index.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+
4
+ // src/meta.ts
5
+ import { trim } from "@dxos/util";
6
+ var meta = {
7
+ id: "org.dxos.plugin.storybook-layout",
8
+ name: "Storybook",
9
+ description: trim`
10
+ Development layout optimized for Storybook component testing and documentation.
11
+ Provides specialized views for component development and design system exploration.
12
+ `,
13
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-testing"
14
+ };
5
15
 
6
16
  // src/core.ts
7
- import { OperationPlugin, RuntimePlugin, SettingsPlugin } from "@dxos/app-framework";
17
+ import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
8
18
  import { AttentionPlugin } from "@dxos/plugin-attention";
9
- import { ClientPlugin } from "@dxos/plugin-client";
10
19
  import { GraphPlugin } from "@dxos/plugin-graph";
20
+ import { SettingsPlugin } from "@dxos/plugin-settings";
11
21
  import { ThemePlugin } from "@dxos/plugin-theme";
12
22
  import { defaultTx } from "@dxos/ui-theme";
13
23
  var corePlugins = () => [
@@ -21,181 +31,10 @@ var corePlugins = () => [
21
31
  })
22
32
  ];
23
33
 
24
- // src/StorybookPlugin.ts
25
- import * as Effect from "effect/Effect";
26
- import { Capability as Capability3, Common, Plugin } from "@dxos/app-framework";
27
-
28
- // src/capabilities/operation-resolver/index.ts
29
- import { Capability } from "@dxos/app-framework";
30
- var OperationResolver = Capability.lazy("OperationResolver", () => import("./operation-resolver-B2DOYB7C.mjs"));
31
-
32
- // src/capabilities/state/index.ts
33
- import { Capability as Capability2 } from "@dxos/app-framework";
34
- var State = Capability2.lazy("State", () => import("./state-2M3RMJYA.mjs"));
35
-
36
- // src/components/Layout.tsx
37
- import { RegistryContext, useAtomValue } from "@effect-atom/atom-react";
38
- import React, { useCallback, useContext, useEffect, useRef, useState } from "react";
39
- import { Surface, useCapability } from "@dxos/app-framework/react";
40
- import { AlertDialog, Dialog, Main, Popover, toLocalizedString, useTranslation } from "@dxos/react-ui";
41
- import { Card, Mosaic } from "@dxos/react-ui-mosaic";
42
- import { descriptionMessage, mx } from "@dxos/ui-theme";
43
- var debounce_delay = 100;
44
- var Layout = ({ children }) => {
45
- const { t } = useTranslation(meta.id);
46
- const trigger = useRef(null);
47
- const registry = useContext(RegistryContext);
48
- const stateAtom = useCapability(LayoutState);
49
- const layout = useAtomValue(stateAtom);
50
- const [iter, setIter] = useState(0);
51
- const [open, setOpen] = useState(false);
52
- const debounceRef = useRef(null);
53
- const updateState = useCallback((updates) => {
54
- const current = registry.get(stateAtom);
55
- registry.set(stateAtom, {
56
- ...current,
57
- ...updates
58
- });
59
- }, [
60
- registry,
61
- stateAtom
62
- ]);
63
- useEffect(() => {
64
- setOpen(false);
65
- if (debounceRef.current) {
66
- clearTimeout(debounceRef.current);
67
- debounceRef.current = null;
68
- }
69
- trigger.current = layout.popoverAnchor ?? null;
70
- setIter((iter2) => iter2 + 1);
71
- if (layout.popoverOpen) {
72
- debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);
73
- }
74
- }, [
75
- layout.popoverAnchor,
76
- layout.popoverContent,
77
- layout.popoverOpen
78
- ]);
79
- const handleClose = useCallback(() => {
80
- setOpen(false);
81
- updateState({
82
- popoverOpen: false,
83
- popoverAnchor: void 0,
84
- popoverAnchorId: void 0,
85
- popoverSide: void 0
86
- });
87
- }, [
88
- updateState
89
- ]);
90
- const handleInteractOutside = useCallback((event) => {
91
- if (
92
- // TODO(thure): CodeMirror should not focus itself when it updates.
93
- event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
94
- ) {
95
- event.preventDefault();
96
- } else {
97
- handleClose();
98
- }
99
- }, [
100
- handleClose
101
- ]);
102
- const DialogRoot = layout.dialogType === "alert" ? AlertDialog.Root : Dialog.Root;
103
- const DialogOverlay = layout.dialogType === "alert" ? AlertDialog.Overlay : Dialog.Overlay;
104
- return /* @__PURE__ */ React.createElement("div", {
105
- role: "none",
106
- className: "fixed inset-0 flex overflow-hidden"
107
- }, /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Popover.Root, {
108
- open
109
- }, /* @__PURE__ */ React.createElement(Main.Root, {
110
- navigationSidebarState: layout.sidebarState,
111
- complementarySidebarState: layout.complementarySidebarState,
112
- onNavigationSidebarStateChange: (next) => updateState({
113
- sidebarState: next
114
- }),
115
- onComplementarySidebarStateChange: (next) => updateState({
116
- complementarySidebarState: next
117
- })
118
- }, children), /* @__PURE__ */ React.createElement(DialogRoot, {
119
- modal: layout.dialogBlockAlign !== "end",
120
- open: layout.dialogOpen,
121
- onOpenChange: (nextOpen) => updateState({
122
- dialogOpen: nextOpen
123
- })
124
- }, layout.dialogBlockAlign === "end" ? /* @__PURE__ */ React.createElement(Surface, {
125
- role: "dialog",
126
- data: layout.dialogContent,
127
- limit: 1,
128
- fallback: ContentError,
129
- placeholder: /* @__PURE__ */ React.createElement("div", null)
130
- }) : /* @__PURE__ */ React.createElement(DialogOverlay, {
131
- blockAlign: layout.dialogBlockAlign,
132
- classNames: layout.dialogOverlayClasses,
133
- style: layout.dialogOverlayStyle
134
- }, /* @__PURE__ */ React.createElement(Surface, {
135
- role: "dialog",
136
- data: layout.dialogContent,
137
- limit: 1,
138
- fallback: ContentError
139
- }))), /* @__PURE__ */ React.createElement(Popover.VirtualTrigger, {
140
- key: iter,
141
- virtualRef: trigger
142
- }), /* @__PURE__ */ React.createElement(Popover.Portal, null, /* @__PURE__ */ React.createElement(Popover.Content, {
143
- side: layout.popoverSide,
144
- onInteractOutside: handleInteractOutside,
145
- onEscapeKeyDown: handleInteractOutside,
146
- sticky: "always",
147
- hideWhenDetached: true
148
- }, /* @__PURE__ */ React.createElement(Popover.Viewport, null, layout.popoverKind === "card" && /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Toolbar, null, /* @__PURE__ */ React.createElement("span", null), layout.popoverTitle ? /* @__PURE__ */ React.createElement(Card.Title, null, toLocalizedString(layout.popoverTitle, t)) : /* @__PURE__ */ React.createElement("span", null), /* @__PURE__ */ React.createElement(Card.Close, {
149
- onClick: handleClose
150
- })), /* @__PURE__ */ React.createElement(Surface, {
151
- role: "card--content",
152
- data: layout.popoverContent,
153
- limit: 1
154
- })), layout.popoverKind === "base" && /* @__PURE__ */ React.createElement(Surface, {
155
- role: "popover",
156
- data: layout.popoverContent,
157
- limit: 1
158
- })), /* @__PURE__ */ React.createElement(Popover.Arrow, null))))));
159
- };
160
- var ContentError = ({ error }) => {
161
- const { t } = useTranslation(meta.id);
162
- const errorString = error?.toString() ?? "";
163
- return /* @__PURE__ */ React.createElement("div", {
164
- role: "none",
165
- className: "overflow-auto p-8 attention-surface grid place-items-center"
166
- }, /* @__PURE__ */ React.createElement("p", {
167
- role: "alert",
168
- className: mx(descriptionMessage, "break-words rounded-md p-8", errorString.length < 256 && "text-lg")
169
- }, error ? errorString : t("error fallback message")));
170
- };
171
-
172
- // src/StorybookPlugin.ts
173
- var StorybookPlugin = Plugin.define(meta).pipe(Plugin.addModule(({ initialState }) => ({
174
- id: Capability3.getModuleTag(State),
175
- activatesOn: Common.ActivationEvent.Startup,
176
- activatesAfter: [
177
- Common.ActivationEvent.LayoutReady
178
- ],
179
- activate: () => State({
180
- initialState
181
- })
182
- })), Common.Plugin.addReactContextModule({
183
- activate: () => Effect.succeed(Capability3.contributes(Common.Capability.ReactContext, {
184
- id: "storybook-layout",
185
- context: Layout
186
- }))
187
- }), Common.Plugin.addOperationResolverModule({
188
- activate: OperationResolver
189
- }), Plugin.make);
34
+ // src/index.ts
35
+ var StorybookPlugin = Plugin.lazy(meta, () => import("#plugin"));
190
36
  export {
191
- AttentionPlugin,
192
- ClientPlugin,
193
- GraphPlugin,
194
- OperationPlugin,
195
- RuntimePlugin,
196
- SettingsPlugin,
197
37
  StorybookPlugin,
198
- ThemePlugin,
199
38
  corePlugins,
200
39
  meta
201
40
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/core.ts", "../../../src/StorybookPlugin.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/state/index.ts", "../../../src/components/Layout.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationPlugin, type Plugin, RuntimePlugin, SettingsPlugin } from '@dxos/app-framework';\nimport { AttentionPlugin } from '@dxos/plugin-attention';\nimport { ClientPlugin } from '@dxos/plugin-client';\nimport { GraphPlugin } from '@dxos/plugin-graph';\nimport { ThemePlugin } from '@dxos/plugin-theme';\nimport { defaultTx } from '@dxos/ui-theme';\n\n// TODO(burdon): Remove this.\n// Re-export common framework plugins.\nexport { AttentionPlugin, ClientPlugin, GraphPlugin, OperationPlugin, RuntimePlugin, SettingsPlugin, ThemePlugin };\n\n/**\n * Core plugins for testing/storybook environments.\n * NOTE: Does not include SpacePlugin to avoid circular dependencies.\n * Import SpacePlugin directly in your stories if needed.\n */\nexport const corePlugins = (): Plugin.Plugin[] => [\n AttentionPlugin(),\n GraphPlugin(),\n OperationPlugin(),\n RuntimePlugin(),\n SettingsPlugin(),\n ThemePlugin({ tx: defaultTx }),\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common, Plugin } from '@dxos/app-framework';\n\nimport { OperationResolver, State } from './capabilities';\nimport { Layout } from './components';\nimport { meta } from './meta';\nimport { type LayoutStateProps } from './types';\n\nexport type StorybookPluginOptions = {\n initialState?: Partial<LayoutStateProps>;\n};\n\nexport const StorybookPlugin = Plugin.define<StorybookPluginOptions>(meta).pipe(\n Plugin.addModule(({ initialState }) => ({\n id: Capability.getModuleTag(State),\n activatesOn: Common.ActivationEvent.Startup,\n activatesAfter: [Common.ActivationEvent.LayoutReady],\n activate: () => State({ initialState }),\n })),\n Common.Plugin.addReactContextModule({\n activate: () =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactContext, {\n id: 'storybook-layout',\n context: Layout,\n }),\n ),\n }),\n Common.Plugin.addOperationResolverModule({\n activate: OperationResolver,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const State = Capability.lazy('State', () => import('./state'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { RegistryContext, useAtomValue } from '@effect-atom/atom-react';\nimport React, { type PropsWithChildren, useCallback, useContext, useEffect, useRef, useState } from 'react';\n\nimport { Surface, useCapability } from '@dxos/app-framework/react';\nimport {\n AlertDialog,\n Dialog,\n Main,\n Popover,\n type PopoverContentInteractOutsideEvent,\n toLocalizedString,\n useTranslation,\n} from '@dxos/react-ui';\nimport { Card, Mosaic } from '@dxos/react-ui-mosaic';\nimport { descriptionMessage, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\nimport { LayoutState, type LayoutStateProps } from '../types';\n\nconst debounce_delay = 100;\n\n// TODO(wittjosiah): Support dialogs, tooltips, maybe toast.\nexport const Layout = ({ children }: PropsWithChildren<{}>) => {\n const { t } = useTranslation(meta.id);\n const trigger = useRef<HTMLButtonElement | null>(null);\n const registry = useContext(RegistryContext);\n const stateAtom = useCapability(LayoutState);\n const layout = useAtomValue(stateAtom);\n const [iter, setIter] = useState(0);\n const [open, setOpen] = useState(false);\n const debounceRef = useRef<NodeJS.Timeout | null>(null);\n\n const updateState = useCallback(\n (updates: Partial<LayoutStateProps>) => {\n const current = registry.get(stateAtom);\n registry.set(stateAtom, { ...current, ...updates });\n },\n [registry, stateAtom],\n );\n\n useEffect(() => {\n setOpen(false);\n if (debounceRef.current) {\n clearTimeout(debounceRef.current);\n debounceRef.current = null;\n }\n trigger.current = layout.popoverAnchor ?? null;\n setIter((iter) => iter + 1);\n if (layout.popoverOpen) {\n debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);\n }\n }, [layout.popoverAnchor, layout.popoverContent, layout.popoverOpen]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n updateState({\n popoverOpen: false,\n popoverAnchor: undefined,\n popoverAnchorId: undefined,\n popoverSide: undefined,\n });\n }, [updateState]);\n\n const handleInteractOutside = useCallback(\n (event: KeyboardEvent | PopoverContentInteractOutsideEvent) => {\n if (\n // TODO(thure): CodeMirror should not focus itself when it updates.\n event.type === 'dismissableLayer.focusOutside' &&\n (event.currentTarget as HTMLElement | undefined)?.classList.contains('cm-content')\n ) {\n event.preventDefault();\n } else {\n handleClose();\n }\n },\n [handleClose],\n );\n\n const DialogRoot = layout.dialogType === 'alert' ? AlertDialog.Root : Dialog.Root;\n const DialogOverlay = layout.dialogType === 'alert' ? AlertDialog.Overlay : Dialog.Overlay;\n\n return (\n <div role='none' className='fixed inset-0 flex overflow-hidden'>\n <Mosaic.Root>\n <Popover.Root open={open}>\n <Main.Root\n navigationSidebarState={layout.sidebarState}\n complementarySidebarState={layout.complementarySidebarState}\n onNavigationSidebarStateChange={(next) => updateState({ sidebarState: next })}\n onComplementarySidebarStateChange={(next) => updateState({ complementarySidebarState: next })}\n >\n {children}\n </Main.Root>\n\n <DialogRoot\n modal={layout.dialogBlockAlign !== 'end'}\n open={layout.dialogOpen}\n onOpenChange={(nextOpen) => updateState({ dialogOpen: nextOpen })}\n >\n {layout.dialogBlockAlign === 'end' ? (\n <Surface\n role='dialog'\n data={layout.dialogContent}\n limit={1}\n fallback={ContentError}\n placeholder={<div />}\n />\n ) : (\n <DialogOverlay\n blockAlign={layout.dialogBlockAlign}\n classNames={layout.dialogOverlayClasses}\n style={layout.dialogOverlayStyle}\n >\n <Surface role='dialog' data={layout.dialogContent} limit={1} fallback={ContentError} />\n </DialogOverlay>\n )}\n </DialogRoot>\n\n <Popover.VirtualTrigger key={iter} virtualRef={trigger} />\n <Popover.Portal>\n <Popover.Content\n side={layout.popoverSide}\n onInteractOutside={handleInteractOutside}\n onEscapeKeyDown={handleInteractOutside}\n sticky='always'\n hideWhenDetached\n >\n <Popover.Viewport>\n {layout.popoverKind === 'card' && (\n <Card.Root>\n <Card.Toolbar>\n {/* TODO(wittjosiah): Cleaner way to handle no drag handle in toolbar? */}\n <span />\n {layout.popoverTitle ? (\n <Card.Title>{toLocalizedString(layout.popoverTitle, t)}</Card.Title>\n ) : (\n <span />\n )}\n <Card.Close onClick={handleClose} />\n </Card.Toolbar>\n <Surface role='card--content' data={layout.popoverContent} limit={1} />\n </Card.Root>\n )}\n {layout.popoverKind === 'base' && <Surface role='popover' data={layout.popoverContent} limit={1} />}\n </Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n </Mosaic.Root>\n </div>\n );\n};\n\nexport const ContentError = ({ error }: { error?: Error }) => {\n const { t } = useTranslation(meta.id);\n const errorString = error?.toString() ?? '';\n return (\n <div role='none' className='overflow-auto p-8 attention-surface grid place-items-center'>\n <p\n role='alert'\n className={mx(descriptionMessage, 'break-words rounded-md p-8', errorString.length < 256 && 'text-lg')}\n >\n {error ? errorString : t('error fallback message')}\n </p>\n </div>\n );\n};\n"],
5
- "mappings": "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",
6
- "names": ["OperationPlugin", "RuntimePlugin", "SettingsPlugin", "AttentionPlugin", "ClientPlugin", "GraphPlugin", "ThemePlugin", "defaultTx", "corePlugins", "AttentionPlugin", "GraphPlugin", "OperationPlugin", "RuntimePlugin", "SettingsPlugin", "ThemePlugin", "tx", "defaultTx", "Effect", "Capability", "Common", "Plugin", "Capability", "OperationResolver", "Capability", "lazy", "Capability", "State", "Capability", "lazy", "RegistryContext", "useAtomValue", "React", "useCallback", "useContext", "useEffect", "useRef", "useState", "Surface", "useCapability", "AlertDialog", "Dialog", "Main", "Popover", "toLocalizedString", "useTranslation", "Card", "Mosaic", "descriptionMessage", "mx", "debounce_delay", "Layout", "children", "t", "useTranslation", "meta", "id", "trigger", "useRef", "registry", "useContext", "RegistryContext", "stateAtom", "useCapability", "LayoutState", "layout", "useAtomValue", "iter", "setIter", "useState", "open", "setOpen", "debounceRef", "updateState", "useCallback", "updates", "current", "get", "set", "useEffect", "clearTimeout", "popoverAnchor", "popoverOpen", "setTimeout", "popoverContent", "handleClose", "undefined", "popoverAnchorId", "popoverSide", "handleInteractOutside", "event", "type", "currentTarget", "classList", "contains", "preventDefault", "DialogRoot", "dialogType", "AlertDialog", "Root", "Dialog", "DialogOverlay", "Overlay", "div", "role", "className", "Mosaic", "Popover", "Main", "navigationSidebarState", "sidebarState", "complementarySidebarState", "onNavigationSidebarStateChange", "next", "onComplementarySidebarStateChange", "modal", "dialogBlockAlign", "dialogOpen", "onOpenChange", "nextOpen", "Surface", "data", "dialogContent", "limit", "fallback", "ContentError", "placeholder", "blockAlign", "classNames", "dialogOverlayClasses", "style", "dialogOverlayStyle", "VirtualTrigger", "key", "virtualRef", "Portal", "Content", "side", "onInteractOutside", "onEscapeKeyDown", "sticky", "hideWhenDetached", "Viewport", "popoverKind", "Card", "Toolbar", "span", "popoverTitle", "Title", "toLocalizedString", "Close", "onClick", "Arrow", "error", "errorString", "toString", "p", "mx", "descriptionMessage", "length", "StorybookPlugin", "Plugin", "define", "meta", "pipe", "addModule", "initialState", "id", "Capability", "getModuleTag", "State", "activatesOn", "Common", "ActivationEvent", "Startup", "activatesAfter", "LayoutReady", "activate", "addReactContextModule", "succeed", "contributes", "ReactContext", "context", "Layout", "addOperationResolverModule", "OperationResolver", "make"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/core.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport * from './core';\nexport * from './meta';\n\nexport const StorybookPlugin = Plugin.lazy(meta, () => import('#plugin'));\nexport type { StorybookPluginOptions } from '#plugin';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.storybook-layout',\n name: 'Storybook',\n description: trim`\n Development layout optimized for Storybook component testing and documentation.\n Provides specialized views for component development and design system exploration.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-testing',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationPlugin, type Plugin, RuntimePlugin } from '@dxos/app-framework';\nimport { AttentionPlugin } from '@dxos/plugin-attention';\nimport { GraphPlugin } from '@dxos/plugin-graph';\nimport { SettingsPlugin } from '@dxos/plugin-settings';\nimport { ThemePlugin } from '@dxos/plugin-theme';\nimport { defaultTx } from '@dxos/ui-theme';\n\n/**\n * Core plugins for testing/storybook environments.\n * NOTE: Does not include SpacePlugin to avoid circular dependencies.\n * Import SpacePlugin directly in your stories if needed.\n */\nexport const corePlugins = (): Plugin.Plugin[] => [\n AttentionPlugin(),\n GraphPlugin(),\n OperationPlugin(),\n RuntimePlugin(),\n SettingsPlugin(),\n ThemePlugin({ tx: defaultTx }),\n];\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,QAAQ;AACV;;;ACXA,SAASC,iBAA8BC,qBAAqB;AAC5D,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,iBAAiB;AAOnB,IAAMC,cAAc,MAAuB;EAChDL,gBAAAA;EACAC,YAAAA;EACAH,gBAAAA;EACAC,cAAAA;EACAG,eAAAA;EACAC,YAAY;IAAEG,IAAIF;EAAU,CAAA;;;;AFXvB,IAAMG,kBAAkBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "source", "OperationPlugin", "RuntimePlugin", "AttentionPlugin", "GraphPlugin", "SettingsPlugin", "ThemePlugin", "defaultTx", "corePlugins", "tx", "StorybookPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/core.ts":{"bytes":3313,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":1661,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/capabilities.ts":{"bytes":2133,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/types/index.ts":{"bytes":476,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/capabilities/operation-resolver/operation-resolver.ts":{"bytes":13591,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/operation-resolver/index.ts":{"bytes":963,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/operation-resolver/operation-resolver.ts","kind":"dynamic-import","original":"./operation-resolver"}],"format":"esm"},"src/capabilities/state/state.tsx":{"bytes":4683,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/state/index.ts":{"bytes":837,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/state/state.tsx","kind":"dynamic-import","original":"./state"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":578,"imports":[{"path":"src/capabilities/operation-resolver/index.ts","kind":"import-statement","original":"./operation-resolver"},{"path":"src/capabilities/state/index.ts","kind":"import-statement","original":"./state"}],"format":"esm"},"src/components/Layout.tsx":{"bytes":20783,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/components/index.ts":{"bytes":467,"imports":[{"path":"src/components/Layout.tsx","kind":"import-statement","original":"./Layout"}],"format":"esm"},"src/StorybookPlugin.ts":{"bytes":4089,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/index.ts":{"bytes":637,"imports":[{"path":"src/core.ts","kind":"import-statement","original":"./core"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/StorybookPlugin.ts","kind":"import-statement","original":"./StorybookPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15612},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHPXIILW.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/operation-resolver-B2DOYB7C.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/state-2M3RMJYA.mjs","kind":"dynamic-import"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["AttentionPlugin","ClientPlugin","GraphPlugin","OperationPlugin","RuntimePlugin","SettingsPlugin","StorybookPlugin","ThemePlugin","corePlugins","meta"],"entryPoint":"src/index.ts","inputs":{"src/core.ts":{"bytesInOutput":506},"src/index.ts":{"bytesInOutput":0},"src/StorybookPlugin.ts":{"bytesInOutput":692},"src/capabilities/operation-resolver/index.ts":{"bytesInOutput":163},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/state/index.ts":{"bytesInOutput":142},"src/components/Layout.tsx":{"bytesInOutput":5418},"src/components/index.ts":{"bytesInOutput":0}},"bytes":7375},"dist/lib/browser/operation-resolver-B2DOYB7C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6682},"dist/lib/browser/operation-resolver-B2DOYB7C.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHPXIILW.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/operation-resolver/operation-resolver.ts","inputs":{"src/capabilities/operation-resolver/operation-resolver.ts":{"bytesInOutput":3403}},"bytes":3628},"dist/lib/browser/state-2M3RMJYA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2490},"dist/lib/browser/state-2M3RMJYA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YHPXIILW.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/state/state.tsx","inputs":{"src/capabilities/state/state.tsx":{"bytesInOutput":1015}},"bytes":1189},"dist/lib/browser/chunk-YHPXIILW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2020},"dist/lib/browser/chunk-YHPXIILW.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["LayoutState","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":395},"src/types/capabilities.ts":{"bytesInOutput":105},"src/types/index.ts":{"bytesInOutput":0}},"bytes":624}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1576,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/core.ts":{"bytes":2575,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1102,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/core.ts","kind":"import-statement","original":"./core"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/harness.ts":{"bytes":5175,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/testing","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"dynamic-import","external":true},{"path":"@dxos/ui-theme","kind":"dynamic-import","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2428},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["StorybookPlugin","corePlugins","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":112},"src/meta.ts":{"bytesInOutput":395},"src/core.ts":{"bytesInOutput":494}},"bytes":1154},"dist/lib/browser/harness.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2767},"dist/lib/browser/harness.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/testing","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"dynamic-import","external":true},{"path":"@dxos/ui-theme","kind":"dynamic-import","external":true}],"exports":["createComposerTestApp"],"entryPoint":"src/harness.ts","inputs":{"src/harness.ts":{"bytesInOutput":873}},"bytes":964}}}
@@ -0,0 +1,37 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/harness.ts
4
+ import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
5
+ import { createTestApp } from "@dxos/app-framework/testing";
6
+ import { AttentionPlugin } from "@dxos/plugin-attention";
7
+ import { GraphPlugin } from "@dxos/plugin-graph";
8
+ import { SettingsPlugin } from "@dxos/plugin-settings";
9
+ var headlessCorePlugins = () => [
10
+ AttentionPlugin(),
11
+ GraphPlugin(),
12
+ OperationPlugin(),
13
+ RuntimePlugin(),
14
+ SettingsPlugin()
15
+ ];
16
+ var createComposerTestApp = async (opts = {}) => {
17
+ const { plugins = [], theme = false, ...rest } = opts;
18
+ const core = headlessCorePlugins();
19
+ if (theme) {
20
+ const { ThemePlugin } = await import("@dxos/plugin-theme");
21
+ const { defaultTx } = await import("@dxos/ui-theme");
22
+ core.push(ThemePlugin({
23
+ tx: defaultTx
24
+ }));
25
+ }
26
+ return createTestApp({
27
+ ...rest,
28
+ plugins: [
29
+ ...core,
30
+ ...plugins
31
+ ]
32
+ });
33
+ };
34
+ export {
35
+ createComposerTestApp
36
+ };
37
+ //# sourceMappingURL=harness.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/harness.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationPlugin, type Plugin, RuntimePlugin } from '@dxos/app-framework';\nimport { createTestApp, type TestAppOptions, type TestHarness } from '@dxos/app-framework/testing';\nimport { AttentionPlugin } from '@dxos/plugin-attention';\nimport { GraphPlugin } from '@dxos/plugin-graph';\nimport { SettingsPlugin } from '@dxos/plugin-settings';\n\nexport type ComposerTestAppOptions = Omit<TestAppOptions, 'plugins'> & {\n /** Plugins to register in addition to the Composer core plugins. */\n plugins?: Plugin.Plugin[];\n /**\n * Whether to include `ThemePlugin` in the core plugin set.\n * Defaults to `false` — `ThemePlugin` requires a browser DOM and breaks Node-only tests.\n * Set to `true` (with jsdom/happy-dom) when rendering React surfaces.\n */\n theme?: boolean;\n};\n\n/**\n * Headless core plugins for the test harness — the subset of `corePlugins()`\n * that can be activated without a browser DOM.\n */\nconst headlessCorePlugins = (): Plugin.Plugin[] => [\n AttentionPlugin(),\n GraphPlugin(),\n OperationPlugin(),\n RuntimePlugin(),\n SettingsPlugin(),\n];\n\n/**\n * Creates a TestHarness pre-loaded with the Composer core plugins\n * (Attention, Graph, Operation, Runtime, Settings, optionally Theme).\n *\n * For a ClientPlugin-backed harness, pass `ClientPlugin({ ... })` via `plugins`.\n */\nexport const createComposerTestApp = async (opts: ComposerTestAppOptions = {}): Promise<TestHarness> => {\n const { plugins = [], theme = false, ...rest } = opts;\n const core = headlessCorePlugins();\n if (theme) {\n const { ThemePlugin } = await import('@dxos/plugin-theme');\n const { defaultTx } = await import('@dxos/ui-theme');\n core.push(ThemePlugin({ tx: defaultTx }));\n }\n return createTestApp({\n ...rest,\n plugins: [...core, ...plugins],\n });\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,iBAA8BC,qBAAqB;AAC5D,SAASC,qBAA4D;AACrE,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAiB/B,IAAMC,sBAAsB,MAAuB;EACjDH,gBAAAA;EACAC,YAAAA;EACAJ,gBAAAA;EACAC,cAAAA;EACAI,eAAAA;;AASK,IAAME,wBAAwB,OAAOC,OAA+B,CAAC,MAAC;AAC3E,QAAM,EAAEC,UAAU,CAAA,GAAIC,QAAQ,OAAO,GAAGC,KAAAA,IAASH;AACjD,QAAMI,OAAON,oBAAAA;AACb,MAAII,OAAO;AACT,UAAM,EAAEG,YAAW,IAAK,MAAM,OAAO,oBAAA;AACrC,UAAM,EAAEC,UAAS,IAAK,MAAM,OAAO,gBAAA;AACnCF,SAAKG,KAAKF,YAAY;MAAEG,IAAIF;IAAU,CAAA,CAAA;EACxC;AACA,SAAOZ,cAAc;IACnB,GAAGS;IACHF,SAAS;SAAIG;SAASH;;EACxB,CAAA;AACF;",
6
+ "names": ["OperationPlugin", "RuntimePlugin", "createTestApp", "AttentionPlugin", "GraphPlugin", "SettingsPlugin", "headlessCorePlugins", "createComposerTestApp", "opts", "plugins", "theme", "rest", "core", "ThemePlugin", "defaultTx", "push", "tx"]
7
+ }
@@ -1,14 +1,25 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- LayoutState,
4
- meta
5
- } from "./chunk-OWK6XE6C.mjs";
2
+
3
+ // src/index.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+
6
+ // src/meta.ts
7
+ import { trim } from "@dxos/util";
8
+ var meta = {
9
+ id: "org.dxos.plugin.storybook-layout",
10
+ name: "Storybook",
11
+ description: trim`
12
+ Development layout optimized for Storybook component testing and documentation.
13
+ Provides specialized views for component development and design system exploration.
14
+ `,
15
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-testing"
16
+ };
6
17
 
7
18
  // src/core.ts
8
- import { OperationPlugin, RuntimePlugin, SettingsPlugin } from "@dxos/app-framework";
19
+ import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
9
20
  import { AttentionPlugin } from "@dxos/plugin-attention";
10
- import { ClientPlugin } from "@dxos/plugin-client";
11
21
  import { GraphPlugin } from "@dxos/plugin-graph";
22
+ import { SettingsPlugin } from "@dxos/plugin-settings";
12
23
  import { ThemePlugin } from "@dxos/plugin-theme";
13
24
  import { defaultTx } from "@dxos/ui-theme";
14
25
  var corePlugins = () => [
@@ -22,181 +33,10 @@ var corePlugins = () => [
22
33
  })
23
34
  ];
24
35
 
25
- // src/StorybookPlugin.ts
26
- import * as Effect from "effect/Effect";
27
- import { Capability as Capability3, Common, Plugin } from "@dxos/app-framework";
28
-
29
- // src/capabilities/operation-resolver/index.ts
30
- import { Capability } from "@dxos/app-framework";
31
- var OperationResolver = Capability.lazy("OperationResolver", () => import("./operation-resolver-DJI7OPBP.mjs"));
32
-
33
- // src/capabilities/state/index.ts
34
- import { Capability as Capability2 } from "@dxos/app-framework";
35
- var State = Capability2.lazy("State", () => import("./state-UF2MWBFU.mjs"));
36
-
37
- // src/components/Layout.tsx
38
- import { RegistryContext, useAtomValue } from "@effect-atom/atom-react";
39
- import React, { useCallback, useContext, useEffect, useRef, useState } from "react";
40
- import { Surface, useCapability } from "@dxos/app-framework/react";
41
- import { AlertDialog, Dialog, Main, Popover, toLocalizedString, useTranslation } from "@dxos/react-ui";
42
- import { Card, Mosaic } from "@dxos/react-ui-mosaic";
43
- import { descriptionMessage, mx } from "@dxos/ui-theme";
44
- var debounce_delay = 100;
45
- var Layout = ({ children }) => {
46
- const { t } = useTranslation(meta.id);
47
- const trigger = useRef(null);
48
- const registry = useContext(RegistryContext);
49
- const stateAtom = useCapability(LayoutState);
50
- const layout = useAtomValue(stateAtom);
51
- const [iter, setIter] = useState(0);
52
- const [open, setOpen] = useState(false);
53
- const debounceRef = useRef(null);
54
- const updateState = useCallback((updates) => {
55
- const current = registry.get(stateAtom);
56
- registry.set(stateAtom, {
57
- ...current,
58
- ...updates
59
- });
60
- }, [
61
- registry,
62
- stateAtom
63
- ]);
64
- useEffect(() => {
65
- setOpen(false);
66
- if (debounceRef.current) {
67
- clearTimeout(debounceRef.current);
68
- debounceRef.current = null;
69
- }
70
- trigger.current = layout.popoverAnchor ?? null;
71
- setIter((iter2) => iter2 + 1);
72
- if (layout.popoverOpen) {
73
- debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);
74
- }
75
- }, [
76
- layout.popoverAnchor,
77
- layout.popoverContent,
78
- layout.popoverOpen
79
- ]);
80
- const handleClose = useCallback(() => {
81
- setOpen(false);
82
- updateState({
83
- popoverOpen: false,
84
- popoverAnchor: void 0,
85
- popoverAnchorId: void 0,
86
- popoverSide: void 0
87
- });
88
- }, [
89
- updateState
90
- ]);
91
- const handleInteractOutside = useCallback((event) => {
92
- if (
93
- // TODO(thure): CodeMirror should not focus itself when it updates.
94
- event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
95
- ) {
96
- event.preventDefault();
97
- } else {
98
- handleClose();
99
- }
100
- }, [
101
- handleClose
102
- ]);
103
- const DialogRoot = layout.dialogType === "alert" ? AlertDialog.Root : Dialog.Root;
104
- const DialogOverlay = layout.dialogType === "alert" ? AlertDialog.Overlay : Dialog.Overlay;
105
- return /* @__PURE__ */ React.createElement("div", {
106
- role: "none",
107
- className: "fixed inset-0 flex overflow-hidden"
108
- }, /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Popover.Root, {
109
- open
110
- }, /* @__PURE__ */ React.createElement(Main.Root, {
111
- navigationSidebarState: layout.sidebarState,
112
- complementarySidebarState: layout.complementarySidebarState,
113
- onNavigationSidebarStateChange: (next) => updateState({
114
- sidebarState: next
115
- }),
116
- onComplementarySidebarStateChange: (next) => updateState({
117
- complementarySidebarState: next
118
- })
119
- }, children), /* @__PURE__ */ React.createElement(DialogRoot, {
120
- modal: layout.dialogBlockAlign !== "end",
121
- open: layout.dialogOpen,
122
- onOpenChange: (nextOpen) => updateState({
123
- dialogOpen: nextOpen
124
- })
125
- }, layout.dialogBlockAlign === "end" ? /* @__PURE__ */ React.createElement(Surface, {
126
- role: "dialog",
127
- data: layout.dialogContent,
128
- limit: 1,
129
- fallback: ContentError,
130
- placeholder: /* @__PURE__ */ React.createElement("div", null)
131
- }) : /* @__PURE__ */ React.createElement(DialogOverlay, {
132
- blockAlign: layout.dialogBlockAlign,
133
- classNames: layout.dialogOverlayClasses,
134
- style: layout.dialogOverlayStyle
135
- }, /* @__PURE__ */ React.createElement(Surface, {
136
- role: "dialog",
137
- data: layout.dialogContent,
138
- limit: 1,
139
- fallback: ContentError
140
- }))), /* @__PURE__ */ React.createElement(Popover.VirtualTrigger, {
141
- key: iter,
142
- virtualRef: trigger
143
- }), /* @__PURE__ */ React.createElement(Popover.Portal, null, /* @__PURE__ */ React.createElement(Popover.Content, {
144
- side: layout.popoverSide,
145
- onInteractOutside: handleInteractOutside,
146
- onEscapeKeyDown: handleInteractOutside,
147
- sticky: "always",
148
- hideWhenDetached: true
149
- }, /* @__PURE__ */ React.createElement(Popover.Viewport, null, layout.popoverKind === "card" && /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Toolbar, null, /* @__PURE__ */ React.createElement("span", null), layout.popoverTitle ? /* @__PURE__ */ React.createElement(Card.Title, null, toLocalizedString(layout.popoverTitle, t)) : /* @__PURE__ */ React.createElement("span", null), /* @__PURE__ */ React.createElement(Card.Close, {
150
- onClick: handleClose
151
- })), /* @__PURE__ */ React.createElement(Surface, {
152
- role: "card--content",
153
- data: layout.popoverContent,
154
- limit: 1
155
- })), layout.popoverKind === "base" && /* @__PURE__ */ React.createElement(Surface, {
156
- role: "popover",
157
- data: layout.popoverContent,
158
- limit: 1
159
- })), /* @__PURE__ */ React.createElement(Popover.Arrow, null))))));
160
- };
161
- var ContentError = ({ error }) => {
162
- const { t } = useTranslation(meta.id);
163
- const errorString = error?.toString() ?? "";
164
- return /* @__PURE__ */ React.createElement("div", {
165
- role: "none",
166
- className: "overflow-auto p-8 attention-surface grid place-items-center"
167
- }, /* @__PURE__ */ React.createElement("p", {
168
- role: "alert",
169
- className: mx(descriptionMessage, "break-words rounded-md p-8", errorString.length < 256 && "text-lg")
170
- }, error ? errorString : t("error fallback message")));
171
- };
172
-
173
- // src/StorybookPlugin.ts
174
- var StorybookPlugin = Plugin.define(meta).pipe(Plugin.addModule(({ initialState }) => ({
175
- id: Capability3.getModuleTag(State),
176
- activatesOn: Common.ActivationEvent.Startup,
177
- activatesAfter: [
178
- Common.ActivationEvent.LayoutReady
179
- ],
180
- activate: () => State({
181
- initialState
182
- })
183
- })), Common.Plugin.addReactContextModule({
184
- activate: () => Effect.succeed(Capability3.contributes(Common.Capability.ReactContext, {
185
- id: "storybook-layout",
186
- context: Layout
187
- }))
188
- }), Common.Plugin.addOperationResolverModule({
189
- activate: OperationResolver
190
- }), Plugin.make);
36
+ // src/index.ts
37
+ var StorybookPlugin = Plugin.lazy(meta, () => import("#plugin"));
191
38
  export {
192
- AttentionPlugin,
193
- ClientPlugin,
194
- GraphPlugin,
195
- OperationPlugin,
196
- RuntimePlugin,
197
- SettingsPlugin,
198
39
  StorybookPlugin,
199
- ThemePlugin,
200
40
  corePlugins,
201
41
  meta
202
42
  };