@dxos/plugin-testing 0.9.0 → 0.9.1-staging.ee54ba693a

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 (51) hide show
  1. package/dist/lib/neutral/{add-toast-62QYCQYN.mjs → add-toast-FAFD7SFC.mjs} +3 -3
  2. package/dist/lib/neutral/{chunk-D2WSPMET.mjs → chunk-6JK2MYJW.mjs} +2 -2
  3. package/dist/lib/neutral/{chunk-NZ2VT6N2.mjs → chunk-FCEWZHUT.mjs} +2 -2
  4. package/dist/lib/neutral/{chunk-NZ2VT6N2.mjs.map → chunk-FCEWZHUT.mjs.map} +3 -3
  5. package/dist/lib/neutral/chunk-GDMPQHRP.mjs +26 -0
  6. package/dist/lib/neutral/chunk-GDMPQHRP.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-MYIMDRVN.mjs +8 -0
  8. package/dist/lib/neutral/components/index.mjs +5 -5
  9. package/dist/lib/neutral/components/index.mjs.map +3 -3
  10. package/dist/lib/neutral/harness.mjs.map +2 -2
  11. package/dist/lib/neutral/index.mjs +2 -2
  12. package/dist/lib/neutral/meta.json +1 -1
  13. package/dist/lib/neutral/meta.mjs +1 -1
  14. package/dist/lib/neutral/operations/index.mjs +1 -1
  15. package/dist/lib/neutral/plugin.mjs +2 -2
  16. package/dist/lib/neutral/{switch-workspace-2YEUYICS.mjs → switch-workspace-NZQAADOK.mjs} +3 -3
  17. package/dist/lib/neutral/types/index.mjs +1 -1
  18. package/dist/lib/neutral/{update-complementary-JARHXMZF.mjs → update-complementary-AHNSCP2O.mjs} +3 -3
  19. package/dist/lib/neutral/{update-dialog-UVNAF5JC.mjs → update-dialog-2VZ3OCUB.mjs} +3 -3
  20. package/dist/lib/neutral/{update-popover-QLS3RJ3D.mjs → update-popover-MNHWRUNS.mjs} +3 -3
  21. package/dist/lib/neutral/{update-sidebar-ZXQI35KQ.mjs → update-sidebar-UYW5UT3H.mjs} +3 -3
  22. package/dist/types/dx.config.d.ts +28 -0
  23. package/dist/types/dx.config.d.ts.map +1 -0
  24. package/dist/types/src/capabilities/index.d.ts +1 -10
  25. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/state.d.ts +1 -11
  27. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  28. package/dist/types/src/harness.d.ts +6 -0
  29. package/dist/types/src/harness.d.ts.map +1 -1
  30. package/dist/types/src/meta.d.ts +32 -2
  31. package/dist/types/src/meta.d.ts.map +1 -1
  32. package/dist/types/src/types/StorybookCapabilities.d.ts +1 -1
  33. package/dist/types/src/types/StorybookCapabilities.d.ts.map +1 -1
  34. package/dist/types/tsconfig.tsbuildinfo +1 -1
  35. package/dx.config.ts +19 -0
  36. package/package.json +24 -23
  37. package/src/components/Layout/Layout.tsx +5 -5
  38. package/src/harness.ts +7 -1
  39. package/src/meta.ts +3 -12
  40. package/src/types/StorybookCapabilities.ts +2 -2
  41. package/dist/lib/neutral/chunk-HI5MWUZZ.mjs +0 -19
  42. package/dist/lib/neutral/chunk-HI5MWUZZ.mjs.map +0 -7
  43. package/dist/lib/neutral/chunk-VSPQMHRB.mjs +0 -8
  44. /package/dist/lib/neutral/{add-toast-62QYCQYN.mjs.map → add-toast-FAFD7SFC.mjs.map} +0 -0
  45. /package/dist/lib/neutral/{chunk-D2WSPMET.mjs.map → chunk-6JK2MYJW.mjs.map} +0 -0
  46. /package/dist/lib/neutral/{chunk-VSPQMHRB.mjs.map → chunk-MYIMDRVN.mjs.map} +0 -0
  47. /package/dist/lib/neutral/{switch-workspace-2YEUYICS.mjs.map → switch-workspace-NZQAADOK.mjs.map} +0 -0
  48. /package/dist/lib/neutral/{update-complementary-JARHXMZF.mjs.map → update-complementary-AHNSCP2O.mjs.map} +0 -0
  49. /package/dist/lib/neutral/{update-dialog-UVNAF5JC.mjs.map → update-dialog-2VZ3OCUB.mjs.map} +0 -0
  50. /package/dist/lib/neutral/{update-popover-QLS3RJ3D.mjs.map → update-popover-MNHWRUNS.mjs.map} +0 -0
  51. /package/dist/lib/neutral/{update-sidebar-ZXQI35KQ.mjs.map → update-sidebar-UYW5UT3H.mjs.map} +0 -0
package/dx.config.ts ADDED
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Config2 } from '@dxos/app-framework/config';
6
+ import { trim } from '@dxos/util';
7
+
8
+ export default Config2.make({
9
+ plugin: {
10
+ key: 'org.dxos.plugin.storybookLayout',
11
+ name: 'Storybook',
12
+ author: 'DXOS',
13
+ description: trim`
14
+ Development layout optimized for Storybook component testing and documentation.
15
+ Provides specialized views for component development and design system exploration.
16
+ `,
17
+ source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-testing',
18
+ },
19
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-testing",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-staging.ee54ba693a",
4
4
  "description": "Plugin testing utils",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -64,38 +64,39 @@
64
64
  "types": "dist/types/src/index.d.ts",
65
65
  "files": [
66
66
  "dist",
67
+ "dx.config.ts",
67
68
  "src"
68
69
  ],
69
70
  "dependencies": {
70
71
  "@effect-atom/atom-react": "^0.5.0",
71
- "@dxos/app-framework": "0.9.0",
72
- "@dxos/keys": "0.9.0",
73
- "@dxos/app-toolkit": "0.9.0",
74
- "@dxos/plugin-attention": "0.9.0",
75
- "@dxos/log": "0.9.0",
76
- "@dxos/plugin-graph": "0.9.0",
77
- "@dxos/plugin-theme": "0.9.0",
78
- "@dxos/react-ui-mosaic": "0.9.0",
79
- "@dxos/util": "0.9.0",
80
- "@dxos/compute": "0.9.0",
81
- "@dxos/plugin-settings": "0.9.0"
72
+ "@dxos/app-framework": "0.9.1-staging.ee54ba693a",
73
+ "@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
74
+ "@dxos/keys": "0.9.1-staging.ee54ba693a",
75
+ "@dxos/plugin-attention": "0.9.1-staging.ee54ba693a",
76
+ "@dxos/plugin-graph": "0.9.1-staging.ee54ba693a",
77
+ "@dxos/log": "0.9.1-staging.ee54ba693a",
78
+ "@dxos/plugin-theme": "0.9.1-staging.ee54ba693a",
79
+ "@dxos/plugin-settings": "0.9.1-staging.ee54ba693a",
80
+ "@dxos/react-ui-mosaic": "0.9.1-staging.ee54ba693a",
81
+ "@dxos/util": "0.9.1-staging.ee54ba693a",
82
+ "@dxos/compute": "0.9.1-staging.ee54ba693a"
82
83
  },
83
84
  "devDependencies": {
84
- "@types/react": "~19.2.7",
85
+ "@types/react": "~19.2.17",
85
86
  "@types/react-dom": "~19.2.3",
86
- "effect": "3.21.3",
87
- "react": "~19.2.3",
88
- "react-dom": "~19.2.3",
87
+ "effect": "3.21.4",
88
+ "react": "~19.2.7",
89
+ "react-dom": "~19.2.7",
89
90
  "vite": "^8.0.16",
90
- "@dxos/react-ui": "0.9.0",
91
- "@dxos/ui-theme": "0.9.0"
91
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a",
92
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
92
93
  },
93
94
  "peerDependencies": {
94
- "effect": "3.21.3",
95
- "react": "~19.2.3",
96
- "react-dom": "~19.2.3",
97
- "@dxos/react-ui": "0.9.0",
98
- "@dxos/ui-theme": "0.9.0"
95
+ "effect": "3.21.4",
96
+ "react": "~19.2.7",
97
+ "react-dom": "~19.2.7",
98
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a",
99
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a"
99
100
  },
100
101
  "publishConfig": {
101
102
  "access": "public"
@@ -29,7 +29,7 @@ import { StorybookCapabilities } from '#types';
29
29
  const debounce_delay = 100;
30
30
 
31
31
  const StoryToast = ({ toast, onDismiss }: { toast: LayoutOperation.Toast; onDismiss: (id: string) => void }) => {
32
- const { t } = useTranslation(meta.id);
32
+ const { t } = useTranslation(meta.profile.key);
33
33
  return (
34
34
  <Toast.Root
35
35
  data-testid={toast.id}
@@ -59,7 +59,7 @@ const StoryToast = ({ toast, onDismiss }: { toast: LayoutOperation.Toast; onDism
59
59
  };
60
60
 
61
61
  export const Layout = ({ children }: PropsWithChildren<{}>) => {
62
- const { t } = useTranslation(meta.id);
62
+ const { t } = useTranslation(meta.profile.key);
63
63
  const trigger = useRef<HTMLButtonElement | null>(null);
64
64
  const registry = useContext(RegistryContext);
65
65
  const stateAtom = useCapability(StorybookCapabilities.LayoutState);
@@ -190,10 +190,10 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
190
190
  )}
191
191
  <Card.ActionIconButton action='close' onClick={handleClose} />
192
192
  </Card.Header>
193
- <Surface.Surface type={AppSurface.Card} data={layout.popoverContent} limit={1} />
193
+ <Surface.Surface type={AppSurface.CardContent} data={layout.popoverContent} limit={1} />
194
194
  </Card.Root>
195
195
  )}
196
- {layout.popoverKind === 'base' && (
196
+ {(layout.popoverKind === 'base' || layout.popoverKind === 'rename') && (
197
197
  <Surface.Surface type={AppSurface.Popover} data={layout.popoverContent} limit={1} />
198
198
  )}
199
199
  </Popover.Viewport>
@@ -212,7 +212,7 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
212
212
  };
213
213
 
214
214
  export const ErrorFallback = ({ error }: { error?: Error }) => {
215
- const { t } = useTranslation(meta.id);
215
+ const { t } = useTranslation(meta.profile.key);
216
216
  const errorString = error?.toString() ?? '';
217
217
  return (
218
218
  <div
package/src/harness.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { type Plugin, ProcessManagerPlugin } from '@dxos/app-framework';
6
- import { createTestApp, type TestAppOptions, type TestHarness } from '@dxos/app-framework/testing';
6
+ import { type TestAppOptions, type TestHarness, createTestApp } from '@dxos/app-framework/testing';
7
7
  import { AppActivationEvents } from '@dxos/app-toolkit';
8
8
  import { AttentionPlugin } from '@dxos/plugin-attention/testing';
9
9
  import { GraphPlugin } from '@dxos/plugin-graph/testing';
@@ -36,6 +36,12 @@ const headlessCorePlugins = (): Plugin.Plugin[] => [
36
36
  * (Attention, Graph, ProcessManager, Settings, optionally Theme).
37
37
  *
38
38
  * For a ClientPlugin-backed harness, pass `ClientPlugin({ ... })` via `plugins`.
39
+ *
40
+ * @idiom org.dxos.plugin-testing.pluginModuleActivation
41
+ * applies: Writing a basic activation smoke-test for any Composer plugin
42
+ * instead-of: Manually inspecting PluginManager internals or relying on e2e tests for activation checks
43
+ * uses: {@link createComposerTestApp}, {@link AppActivationEvents}
44
+ * related: org.dxos.app-framework.testing.operationCapture
39
45
  */
40
46
  export const createComposerTestApp = async (opts: ComposerTestAppOptions = {}): Promise<TestHarness> => {
41
47
  const { plugins = [], theme = false, ...rest } = opts;
package/src/meta.ts CHANGED
@@ -3,16 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Plugin } from '@dxos/app-framework';
6
- import { DXN } from '@dxos/keys';
7
- import { trim } from '@dxos/util';
8
6
 
9
- export const meta = Plugin.makeMeta({
10
- key: DXN.make('org.dxos.plugin.storybookLayout'),
11
- name: 'Storybook',
12
- author: 'DXOS',
13
- description: trim`
14
- Development layout optimized for Storybook component testing and documentation.
15
- Provides specialized views for component development and design system exploration.
16
- `,
17
- source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-testing',
18
- });
7
+ import config from '../dx.config';
8
+
9
+ export const meta = Plugin.getMetaFromConfig(config);
@@ -29,7 +29,7 @@ export type LayoutStateProps = {
29
29
  popoverVariant?: 'virtual' | 'react';
30
30
  popoverAnchor?: HTMLButtonElement;
31
31
  popoverAnchorId?: string;
32
- popoverKind?: 'base' | 'card';
32
+ popoverKind?: 'base' | 'card' | 'rename';
33
33
  popoverTitle?: Label;
34
34
  popoverContent?: any;
35
35
 
@@ -38,4 +38,4 @@ export type LayoutStateProps = {
38
38
  workspace: string;
39
39
  };
40
40
 
41
- export const LayoutState = Capability.make<Atom.Writable<LayoutStateProps>>(`${meta.id}.state`);
41
+ export const LayoutState = Capability.make<Atom.Writable<LayoutStateProps>>(`${meta.profile.key}.state`);
@@ -1,19 +0,0 @@
1
- // src/meta.ts
2
- import { Plugin } from "@dxos/app-framework";
3
- import { DXN } from "@dxos/keys";
4
- import { trim } from "@dxos/util";
5
- var meta = Plugin.makeMeta({
6
- key: DXN.make("org.dxos.plugin.storybookLayout"),
7
- name: "Storybook",
8
- author: "DXOS",
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
- });
15
-
16
- export {
17
- meta
18
- };
19
- //# sourceMappingURL=chunk-HI5MWUZZ.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.storybookLayout'),\n name: 'Storybook',\n author: 'DXOS',\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"],
5
- "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,iCAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;EAIbQ,QAAQ;AACV,CAAA;",
6
- "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "source"]
7
- }
@@ -1,8 +0,0 @@
1
- // src/operations/index.ts
2
- import { OperationHandlerSet } from "@dxos/compute";
3
- var TestingOperationHandlerSet = OperationHandlerSet.lazy(() => import("./add-toast-62QYCQYN.mjs"), () => import("./close-L3FBJQ3J.mjs"), () => import("./open-O5FFJF2B.mjs"), () => import("./scroll-into-view-BKOOOECC.mjs"), () => import("./set-layout-mode-2KHD2AEY.mjs"), () => import("./switch-workspace-2YEUYICS.mjs"), () => import("./update-complementary-JARHXMZF.mjs"), () => import("./update-dialog-UVNAF5JC.mjs"), () => import("./update-popover-QLS3RJ3D.mjs"), () => import("./update-sidebar-ZXQI35KQ.mjs"));
4
-
5
- export {
6
- TestingOperationHandlerSet
7
- };
8
- //# sourceMappingURL=chunk-VSPQMHRB.mjs.map