@dxos/plugin-testing 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/harness.mjs +35 -0
- package/dist/lib/browser/harness.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -183
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/harness.mjs +37 -0
- package/dist/lib/node-esm/harness.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +21 -183
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/StorybookPlugin.d.ts +2 -1
- package/dist/types/src/StorybookPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +15 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/{Layout.d.ts → Layout/Layout.d.ts} +1 -1
- package/dist/types/src/components/Layout/Layout.d.ts.map +1 -0
- package/dist/types/src/components/Layout/index.d.ts +2 -0
- package/dist/types/src/components/Layout/index.d.ts.map +1 -0
- package/dist/types/src/core.d.ts +1 -7
- package/dist/types/src/core.d.ts.map +1 -1
- package/dist/types/src/harness.d.ts +20 -0
- package/dist/types/src/harness.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/add-toast.d.ts +5 -0
- package/dist/types/src/operations/add-toast.d.ts.map +1 -0
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
- package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
- package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
- package/dist/types/src/operations/switch-workspace.d.ts +5 -0
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +5 -0
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
- package/dist/types/src/operations/update-dialog.d.ts +5 -0
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
- package/dist/types/src/operations/update-popover.d.ts +5 -0
- package/dist/types/src/operations/update-popover.d.ts.map +1 -0
- package/dist/types/src/operations/update-sidebar.d.ts +5 -0
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
- package/dist/types/src/operations/update-state.d.ts +5 -0
- package/dist/types/src/operations/update-state.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +2 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +31 -18
- package/src/StorybookPlugin.ts +9 -7
- package/src/capabilities/index.ts +8 -2
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{state/state.tsx → state.tsx} +2 -1
- package/src/components/Layout/Layout.tsx +236 -0
- package/src/components/Layout/index.ts +5 -0
- package/src/core.ts +19 -9
- package/src/harness.ts +52 -0
- package/src/index.ts +6 -1
- package/src/meta.ts +1 -1
- package/src/operations/add-toast.ts +22 -0
- package/src/operations/close.ts +14 -0
- package/src/operations/index.ts +18 -0
- package/src/operations/open.ts +18 -0
- package/src/operations/scroll-into-view.ts +14 -0
- package/src/operations/set-layout-mode.ts +14 -0
- package/src/operations/switch-workspace.ts +20 -0
- package/src/operations/update-complementary.ts +27 -0
- package/src/operations/update-dialog.ts +27 -0
- package/src/operations/update-popover.ts +37 -0
- package/src/operations/update-sidebar.ts +26 -0
- package/src/operations/update-state.ts +17 -0
- package/src/types/capabilities.ts +5 -2
- package/dist/lib/browser/chunk-YHPXIILW.mjs +0 -21
- package/dist/lib/browser/chunk-YHPXIILW.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-FLU4ZARD.mjs +0 -112
- package/dist/lib/browser/operation-resolver-FLU4ZARD.mjs.map +0 -7
- package/dist/lib/browser/state-MIKI67FF.mjs +0 -43
- package/dist/lib/browser/state-MIKI67FF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OWK6XE6C.mjs +0 -23
- package/dist/lib/node-esm/chunk-OWK6XE6C.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-NWF6KBHP.mjs +0 -113
- package/dist/lib/node-esm/operation-resolver-NWF6KBHP.mjs.map +0 -7
- package/dist/lib/node-esm/state-JQVVUKO2.mjs +0 -44
- package/dist/lib/node-esm/state-JQVVUKO2.mjs.map +0 -7
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -14
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/Layout.d.ts.map +0 -1
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -99
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/Layout.tsx +0 -174
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
19
|
import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
|
|
9
|
-
import { AttentionPlugin } from "@dxos/plugin-attention";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ThemePlugin } from "@dxos/plugin-theme";
|
|
20
|
+
import { AttentionPlugin } from "@dxos/plugin-attention/plugin";
|
|
21
|
+
import { GraphPlugin } from "@dxos/plugin-graph/plugin";
|
|
22
|
+
import { SettingsPlugin } from "@dxos/plugin-settings/plugin";
|
|
23
|
+
import { ThemePlugin } from "@dxos/plugin-theme/plugin";
|
|
14
24
|
import { defaultTx } from "@dxos/ui-theme";
|
|
15
25
|
var corePlugins = () => [
|
|
16
26
|
AttentionPlugin(),
|
|
@@ -23,182 +33,10 @@ var corePlugins = () => [
|
|
|
23
33
|
})
|
|
24
34
|
];
|
|
25
35
|
|
|
26
|
-
// src/
|
|
27
|
-
|
|
28
|
-
import { ActivationEvents, Capabilities, Capability as Capability3, Plugin } from "@dxos/app-framework";
|
|
29
|
-
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
30
|
-
|
|
31
|
-
// src/capabilities/operation-resolver/index.ts
|
|
32
|
-
import { Capability } from "@dxos/app-framework";
|
|
33
|
-
var OperationResolver = Capability.lazy("OperationResolver", () => import("./operation-resolver-NWF6KBHP.mjs"));
|
|
34
|
-
|
|
35
|
-
// src/capabilities/state/index.ts
|
|
36
|
-
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
37
|
-
var State = Capability2.lazy("State", () => import("./state-JQVVUKO2.mjs"));
|
|
38
|
-
|
|
39
|
-
// src/components/Layout.tsx
|
|
40
|
-
import { RegistryContext, useAtomValue } from "@effect-atom/atom-react";
|
|
41
|
-
import React, { useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
42
|
-
import { Surface, useCapability } from "@dxos/app-framework/ui";
|
|
43
|
-
import { AlertDialog, Dialog, Main, Popover, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
44
|
-
import { Card, Mosaic } from "@dxos/react-ui-mosaic";
|
|
45
|
-
import { descriptionMessage, mx } from "@dxos/ui-theme";
|
|
46
|
-
var debounce_delay = 100;
|
|
47
|
-
var Layout = ({ children }) => {
|
|
48
|
-
const { t } = useTranslation(meta.id);
|
|
49
|
-
const trigger = useRef(null);
|
|
50
|
-
const registry = useContext(RegistryContext);
|
|
51
|
-
const stateAtom = useCapability(LayoutState);
|
|
52
|
-
const layout = useAtomValue(stateAtom);
|
|
53
|
-
const [iter, setIter] = useState(0);
|
|
54
|
-
const [open, setOpen] = useState(false);
|
|
55
|
-
const debounceRef = useRef(null);
|
|
56
|
-
const updateState = useCallback((updates) => {
|
|
57
|
-
const current = registry.get(stateAtom);
|
|
58
|
-
registry.set(stateAtom, {
|
|
59
|
-
...current,
|
|
60
|
-
...updates
|
|
61
|
-
});
|
|
62
|
-
}, [
|
|
63
|
-
registry,
|
|
64
|
-
stateAtom
|
|
65
|
-
]);
|
|
66
|
-
useEffect(() => {
|
|
67
|
-
setOpen(false);
|
|
68
|
-
if (debounceRef.current) {
|
|
69
|
-
clearTimeout(debounceRef.current);
|
|
70
|
-
debounceRef.current = null;
|
|
71
|
-
}
|
|
72
|
-
trigger.current = layout.popoverAnchor ?? null;
|
|
73
|
-
setIter((iter2) => iter2 + 1);
|
|
74
|
-
if (layout.popoverOpen) {
|
|
75
|
-
debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);
|
|
76
|
-
}
|
|
77
|
-
}, [
|
|
78
|
-
layout.popoverAnchor,
|
|
79
|
-
layout.popoverContent,
|
|
80
|
-
layout.popoverOpen
|
|
81
|
-
]);
|
|
82
|
-
const handleClose = useCallback(() => {
|
|
83
|
-
setOpen(false);
|
|
84
|
-
updateState({
|
|
85
|
-
popoverOpen: false,
|
|
86
|
-
popoverAnchor: void 0,
|
|
87
|
-
popoverAnchorId: void 0,
|
|
88
|
-
popoverSide: void 0
|
|
89
|
-
});
|
|
90
|
-
}, [
|
|
91
|
-
updateState
|
|
92
|
-
]);
|
|
93
|
-
const handleInteractOutside = useCallback((event) => {
|
|
94
|
-
if (
|
|
95
|
-
// TODO(thure): CodeMirror should not focus itself when it updates.
|
|
96
|
-
event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
|
|
97
|
-
) {
|
|
98
|
-
event.preventDefault();
|
|
99
|
-
} else {
|
|
100
|
-
handleClose();
|
|
101
|
-
}
|
|
102
|
-
}, [
|
|
103
|
-
handleClose
|
|
104
|
-
]);
|
|
105
|
-
const DialogRoot = layout.dialogType === "alert" ? AlertDialog.Root : Dialog.Root;
|
|
106
|
-
const DialogOverlay = layout.dialogType === "alert" ? AlertDialog.Overlay : Dialog.Overlay;
|
|
107
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
108
|
-
role: "none",
|
|
109
|
-
className: "fixed inset-0 flex overflow-hidden"
|
|
110
|
-
}, /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Popover.Root, {
|
|
111
|
-
open
|
|
112
|
-
}, /* @__PURE__ */ React.createElement(Main.Root, {
|
|
113
|
-
navigationSidebarState: layout.sidebarState,
|
|
114
|
-
complementarySidebarState: layout.complementarySidebarState,
|
|
115
|
-
onNavigationSidebarStateChange: (next) => updateState({
|
|
116
|
-
sidebarState: next
|
|
117
|
-
}),
|
|
118
|
-
onComplementarySidebarStateChange: (next) => updateState({
|
|
119
|
-
complementarySidebarState: next
|
|
120
|
-
})
|
|
121
|
-
}, children), /* @__PURE__ */ React.createElement(DialogRoot, {
|
|
122
|
-
modal: layout.dialogBlockAlign !== "end",
|
|
123
|
-
open: layout.dialogOpen,
|
|
124
|
-
onOpenChange: (nextOpen) => updateState({
|
|
125
|
-
dialogOpen: nextOpen
|
|
126
|
-
})
|
|
127
|
-
}, layout.dialogBlockAlign === "end" ? /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
128
|
-
role: "dialog",
|
|
129
|
-
data: layout.dialogContent,
|
|
130
|
-
limit: 1,
|
|
131
|
-
fallback: ContentError,
|
|
132
|
-
placeholder: /* @__PURE__ */ React.createElement("div", null)
|
|
133
|
-
}) : /* @__PURE__ */ React.createElement(DialogOverlay, {
|
|
134
|
-
blockAlign: layout.dialogBlockAlign,
|
|
135
|
-
classNames: layout.dialogOverlayClasses,
|
|
136
|
-
style: layout.dialogOverlayStyle
|
|
137
|
-
}, /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
138
|
-
role: "dialog",
|
|
139
|
-
data: layout.dialogContent,
|
|
140
|
-
limit: 1,
|
|
141
|
-
fallback: ContentError
|
|
142
|
-
}))), /* @__PURE__ */ React.createElement(Popover.VirtualTrigger, {
|
|
143
|
-
key: iter,
|
|
144
|
-
virtualRef: trigger
|
|
145
|
-
}), /* @__PURE__ */ React.createElement(Popover.Portal, null, /* @__PURE__ */ React.createElement(Popover.Content, {
|
|
146
|
-
side: layout.popoverSide,
|
|
147
|
-
onInteractOutside: handleInteractOutside,
|
|
148
|
-
onEscapeKeyDown: handleInteractOutside,
|
|
149
|
-
sticky: "always",
|
|
150
|
-
hideWhenDetached: true
|
|
151
|
-
}, /* @__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, {
|
|
152
|
-
onClick: handleClose
|
|
153
|
-
})), /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
154
|
-
role: "card--content",
|
|
155
|
-
data: layout.popoverContent,
|
|
156
|
-
limit: 1
|
|
157
|
-
})), layout.popoverKind === "base" && /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
158
|
-
role: "popover",
|
|
159
|
-
data: layout.popoverContent,
|
|
160
|
-
limit: 1
|
|
161
|
-
})), /* @__PURE__ */ React.createElement(Popover.Arrow, null))))));
|
|
162
|
-
};
|
|
163
|
-
var ContentError = ({ error }) => {
|
|
164
|
-
const { t } = useTranslation(meta.id);
|
|
165
|
-
const errorString = error?.toString() ?? "";
|
|
166
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
167
|
-
role: "none",
|
|
168
|
-
className: "overflow-auto p-8 attention-surface grid place-items-center"
|
|
169
|
-
}, /* @__PURE__ */ React.createElement("p", {
|
|
170
|
-
role: "alert",
|
|
171
|
-
className: mx(descriptionMessage, "break-words rounded-md p-8", errorString.length < 256 && "text-lg")
|
|
172
|
-
}, error ? errorString : t("error fallback message")));
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
// src/StorybookPlugin.ts
|
|
176
|
-
var StorybookPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationResolverModule({
|
|
177
|
-
activate: OperationResolver
|
|
178
|
-
}), AppPlugin.addReactContextModule({
|
|
179
|
-
activate: () => Effect.succeed(Capability3.contributes(Capabilities.ReactContext, {
|
|
180
|
-
id: "storybook-layout",
|
|
181
|
-
context: Layout
|
|
182
|
-
}))
|
|
183
|
-
}), Plugin.addModule(({ initialState }) => ({
|
|
184
|
-
id: Capability3.getModuleTag(State),
|
|
185
|
-
activatesOn: ActivationEvents.Startup,
|
|
186
|
-
activatesAfter: [
|
|
187
|
-
AppActivationEvents.LayoutReady
|
|
188
|
-
],
|
|
189
|
-
activate: () => State({
|
|
190
|
-
initialState
|
|
191
|
-
})
|
|
192
|
-
})), Plugin.make);
|
|
36
|
+
// src/index.ts
|
|
37
|
+
var StorybookPlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
193
38
|
export {
|
|
194
|
-
AttentionPlugin,
|
|
195
|
-
ClientPlugin,
|
|
196
|
-
GraphPlugin,
|
|
197
|
-
OperationPlugin,
|
|
198
|
-
RuntimePlugin,
|
|
199
|
-
SettingsPlugin,
|
|
200
39
|
StorybookPlugin,
|
|
201
|
-
ThemePlugin,
|
|
202
40
|
corePlugins,
|
|
203
41
|
meta
|
|
204
42
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
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';\n// `/plugin` entrypoints — `@dxos/plugin-attention/plugin`, `/plugin-client/plugin`,\n// `/plugin-graph/plugin`, `/plugin-preview/plugin`, `/plugin-settings/plugin`,\n// `/plugin-space/plugin`, `/plugin-theme/plugin` — re-export the plugin eagerly\n// (without `Plugin.lazy`). The default `.` export wraps each plugin in a lazy\n// stub (`() => import('./XPlugin')`), which webkit cannot reliably resolve\n// under vite-dev: the dynamic-import promise can settle with a\n// partially-evaluated namespace, throwing `ReferenceError: Cannot access\n// 'default' before initialization` from the loader's `mod.default` access.\n// Storybook runs inside `storybook dev` (vite-dev) and is currently the only\n// host that hits this. Production hosts (composer-app via `vite preview`)\n// keep using the lazy `.` exports and their associated code splitting.\n//\n// Use these `/plugin` entrypoints from any storybook `withPluginManager`\n// setup. The single-line `export * from './XPlugin'` re-exports avoid the\n// dynamic-import path entirely — see e.g. `plugin-attention/src/plugin.ts`.\nimport { AttentionPlugin } from '@dxos/plugin-attention/plugin';\nimport { GraphPlugin } from '@dxos/plugin-graph/plugin';\nimport { SettingsPlugin } from '@dxos/plugin-settings/plugin';\nimport { ThemePlugin } from '@dxos/plugin-theme/plugin';\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;AAgB5D,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;;;;AF1BvB,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/
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1576,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/core.ts":{"bytes":5426,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme/plugin","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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3550},"dist/lib/node-esm/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/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings/plugin","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme/plugin","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":522}},"bytes":1275},"dist/lib/node-esm/harness.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2769},"dist/lib/node-esm/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":1057}}}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Plugin } from '@dxos/app-framework';
|
|
2
|
-
import { type LayoutStateProps } from '
|
|
2
|
+
import { type LayoutStateProps } from '#types';
|
|
3
3
|
export type StorybookPluginOptions = {
|
|
4
4
|
initialState?: Partial<LayoutStateProps>;
|
|
5
5
|
};
|
|
6
6
|
export declare const StorybookPlugin: Plugin.PluginFactory<StorybookPluginOptions>;
|
|
7
|
+
export default StorybookPlugin;
|
|
7
8
|
//# sourceMappingURL=StorybookPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorybookPlugin.d.ts","sourceRoot":"","sources":["../../../src/StorybookPlugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8C,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMzF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StorybookPlugin.d.ts","sourceRoot":"","sources":["../../../src/StorybookPlugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8C,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMzF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,eAAe,8CAoB3B,CAAC;eAEa,eAAe"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
3
|
+
export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
|
|
4
|
+
export declare const State: Capability.LazyCapability<{
|
|
5
|
+
initialState?: Partial<import("../types").LayoutStateProps>;
|
|
6
|
+
} | undefined, [Capability.Capability<Capability.InterfaceDef<import("@effect-atom/atom/Atom").Writable<import("../types").LayoutStateProps, import("../types").LayoutStateProps>>>, Capability.Capability<Capability.InterfaceDef<import("@effect-atom/atom/Atom").Atom<Readonly<{
|
|
7
|
+
mode: string;
|
|
8
|
+
dialogOpen: boolean;
|
|
9
|
+
sidebarOpen: boolean;
|
|
10
|
+
complementarySidebarOpen: boolean;
|
|
11
|
+
workspace: string;
|
|
12
|
+
active: string[];
|
|
13
|
+
inactive: string[];
|
|
14
|
+
scrollIntoView: string | undefined;
|
|
15
|
+
}>>>>], Error>;
|
|
3
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,KAAK;;;;;;;;;;;cAAoD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
4
|
+
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=operation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Atom } from '@effect-atom/atom-react';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import { Capability } from '@dxos/app-framework';
|
|
4
|
-
import { type LayoutStateProps } from '
|
|
5
|
-
declare const _default: (props
|
|
4
|
+
import { type LayoutStateProps } from '#types';
|
|
5
|
+
declare const _default: (props: {
|
|
6
6
|
initialState?: Partial<LayoutStateProps>;
|
|
7
7
|
} | undefined) => Effect.Effect<[Capability.Capability<Capability.InterfaceDef<Atom.Writable<LayoutStateProps, LayoutStateProps>>>, Capability.Capability<Capability.InterfaceDef<Atom.Atom<Readonly<{
|
|
8
8
|
mode: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;;mBAWJ,OAAO,CAAC,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
export declare const Layout: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const ErrorFallback: ({ error }: {
|
|
4
4
|
error?: Error;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
6
|
//# sourceMappingURL=Layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/Layout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwD,MAAM,OAAO,CAAC;AAgE5G,eAAO,MAAM,MAAM,iBAAkB,iBAAiB,CAAC,EAAE,CAAC,sBAsJzD,CAAC;AAEF,eAAO,MAAM,aAAa,cAAe;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,sBAczD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
|
package/dist/types/src/core.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AttentionPlugin } from '@dxos/plugin-attention';
|
|
3
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
4
|
-
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
5
|
-
import { SettingsPlugin } from '@dxos/plugin-settings';
|
|
6
|
-
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
7
|
-
export { AttentionPlugin, ClientPlugin, GraphPlugin, OperationPlugin, RuntimePlugin, SettingsPlugin, ThemePlugin };
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
8
2
|
/**
|
|
9
3
|
* Core plugins for testing/storybook environments.
|
|
10
4
|
* NOTE: Does not include SpacePlugin to avoid circular dependencies.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,MAAM,EAAiB,MAAM,qBAAqB,CAAC;AAsBlF;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,MAAM,CAAC,MAAM,EAO3C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
2
|
+
import { type TestAppOptions, type TestHarness } from '@dxos/app-framework/testing';
|
|
3
|
+
export type ComposerTestAppOptions = Omit<TestAppOptions, 'plugins'> & {
|
|
4
|
+
/** Plugins to register in addition to the Composer core plugins. */
|
|
5
|
+
plugins?: Plugin.Plugin[];
|
|
6
|
+
/**
|
|
7
|
+
* Whether to include `ThemePlugin` in the core plugin set.
|
|
8
|
+
* Defaults to `false` — `ThemePlugin` requires a browser DOM and breaks Node-only tests.
|
|
9
|
+
* Set to `true` (with jsdom/happy-dom) when rendering React surfaces.
|
|
10
|
+
*/
|
|
11
|
+
theme?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Creates a TestHarness pre-loaded with the Composer core plugins
|
|
15
|
+
* (Attention, Graph, Operation, Runtime, Settings, optionally Theme).
|
|
16
|
+
*
|
|
17
|
+
* For a ClientPlugin-backed harness, pass `ClientPlugin({ ... })` via `plugins`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const createComposerTestApp: (opts?: ComposerTestAppOptions) => Promise<TestHarness>;
|
|
20
|
+
//# sourceMappingURL=harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../../src/harness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,MAAM,EAAiB,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAKnG,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG;IACrE,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAcF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UAAgB,sBAAsB,KAAQ,OAAO,CAAC,WAAW,CAYlG,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
1
2
|
export * from './core';
|
|
2
3
|
export * from './meta';
|
|
3
|
-
export
|
|
4
|
+
export declare const StorybookPlugin: Plugin.PluginFactory<import("#plugin").StorybookPluginOptions>;
|
|
5
|
+
export type { StorybookPluginOptions } from '#plugin';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,eAAO,MAAM,eAAe,gEAA6C,CAAC;AAC1E,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-toast.d.ts","sourceRoot":"","sources":["../../../../src/operations/add-toast.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,QAAQ,CAQnE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../../../src/operations/close.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,KAAK,CAEhE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/operations/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,0BAA0B,yCAWtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../../src/operations/open.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,IAAI,CAM/D,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-into-view.d.ts","sourceRoot":"","sources":["../../../../src/operations/scroll-into-view.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,cAAc,CAEzE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-layout-mode.d.ts","sourceRoot":"","sources":["../../../../src/operations/set-layout-mode.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,aAAa,CAExE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-workspace.d.ts","sourceRoot":"","sources":["../../../../src/operations/switch-workspace.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,eAAe,CAM1E,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-complementary.d.ts","sourceRoot":"","sources":["../../../../src/operations/update-complementary.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,mBAAmB,CAa5E,CAAC;eAEW,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-dialog.d.ts","sourceRoot":"","sources":["../../../../src/operations/update-dialog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,YAAY,CAavE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-popover.d.ts","sourceRoot":"","sources":["../../../../src/operations/update-popover.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,aAAa,CAsBxE,CAAC;eAEa,OAAO"}
|