@dxos/plugin-board 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

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 (113) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +337 -0
  3. package/README.md +1 -1
  4. package/dist/lib/{browser/BoardContainer-QVVN3MXA.mjs → neutral/BoardArticle-XCMTXRNW.mjs} +54 -36
  5. package/dist/lib/neutral/BoardArticle-XCMTXRNW.mjs.map +7 -0
  6. package/dist/lib/neutral/BoardPlugin.mjs +42 -0
  7. package/dist/lib/neutral/BoardPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  9. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  10. package/dist/lib/{browser/chunk-KO5FZQGF.mjs → neutral/chunk-CY5X6YV4.mjs} +7 -7
  11. package/dist/lib/neutral/chunk-CY5X6YV4.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-HUBZKCPA.mjs +32 -0
  13. package/dist/lib/neutral/chunk-HUBZKCPA.mjs.map +7 -0
  14. package/dist/lib/neutral/components/index.mjs +1 -0
  15. package/dist/lib/neutral/containers/index.mjs +9 -0
  16. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  17. package/dist/lib/neutral/create-object-BRISOU7F.mjs +28 -0
  18. package/dist/lib/neutral/create-object-BRISOU7F.mjs.map +7 -0
  19. package/dist/lib/neutral/index.mjs +12 -0
  20. package/dist/lib/neutral/meta.json +1 -0
  21. package/dist/lib/neutral/meta.mjs +8 -0
  22. package/dist/lib/neutral/plugin.mjs +12 -0
  23. package/dist/lib/neutral/plugin.mjs.map +7 -0
  24. package/dist/lib/neutral/react-surface-M5JHK3ZQ.mjs +26 -0
  25. package/dist/lib/neutral/react-surface-M5JHK3ZQ.mjs.map +7 -0
  26. package/dist/lib/neutral/translations.mjs +30 -0
  27. package/dist/lib/neutral/translations.mjs.map +7 -0
  28. package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
  29. package/dist/lib/neutral/types/index.mjs.map +7 -0
  30. package/dist/types/src/BoardPlugin.d.ts +1 -0
  31. package/dist/types/src/BoardPlugin.d.ts.map +1 -1
  32. package/dist/types/src/BoardPlugin.test.d.ts +2 -0
  33. package/dist/types/src/BoardPlugin.test.d.ts.map +1 -0
  34. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  35. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  36. package/dist/types/src/capabilities/index.d.ts +8 -1
  37. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  39. package/dist/types/src/containers/BoardArticle/BoardArticle.d.ts +6 -0
  40. package/dist/types/src/containers/BoardArticle/BoardArticle.d.ts.map +1 -0
  41. package/dist/types/src/containers/BoardArticle/BoardArticle.stories.d.ts +54 -0
  42. package/dist/types/src/containers/BoardArticle/BoardArticle.stories.d.ts.map +1 -0
  43. package/dist/types/src/containers/BoardArticle/index.d.ts +2 -0
  44. package/dist/types/src/containers/BoardArticle/index.d.ts.map +1 -0
  45. package/dist/types/src/containers/index.d.ts +1 -1
  46. package/dist/types/src/containers/index.d.ts.map +1 -1
  47. package/dist/types/src/index.d.ts +0 -1
  48. package/dist/types/src/index.d.ts.map +1 -1
  49. package/dist/types/src/meta.d.ts +1 -1
  50. package/dist/types/src/meta.d.ts.map +1 -1
  51. package/dist/types/src/plugin.d.ts +3 -0
  52. package/dist/types/src/plugin.d.ts.map +1 -0
  53. package/dist/types/src/translations.d.ts +22 -14
  54. package/dist/types/src/translations.d.ts.map +1 -1
  55. package/dist/types/src/types/Board.d.ts +5 -6
  56. package/dist/types/src/types/Board.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +87 -58
  59. package/src/BoardPlugin.test.ts +27 -0
  60. package/src/BoardPlugin.tsx +14 -19
  61. package/src/capabilities/create-object.ts +31 -0
  62. package/src/capabilities/index.ts +4 -1
  63. package/src/capabilities/react-surface.tsx +31 -0
  64. package/src/containers/{BoardContainer/BoardContainer.stories.tsx → BoardArticle/BoardArticle.stories.tsx} +23 -23
  65. package/src/containers/{BoardContainer/BoardContainer.tsx → BoardArticle/BoardArticle.tsx} +55 -24
  66. package/src/containers/BoardArticle/index.ts +5 -0
  67. package/src/containers/index.ts +1 -1
  68. package/src/index.ts +0 -2
  69. package/src/meta.ts +16 -6
  70. package/src/plugin.ts +9 -0
  71. package/src/translations.ts +14 -12
  72. package/src/types/Board.ts +4 -6
  73. package/src/vite-env.d.ts +10 -0
  74. package/dist/lib/browser/BoardContainer-QVVN3MXA.mjs.map +0 -7
  75. package/dist/lib/browser/chunk-DX5POLPL.mjs +0 -19
  76. package/dist/lib/browser/chunk-DX5POLPL.mjs.map +0 -7
  77. package/dist/lib/browser/chunk-KO5FZQGF.mjs.map +0 -7
  78. package/dist/lib/browser/index.mjs +0 -68
  79. package/dist/lib/browser/index.mjs.map +0 -7
  80. package/dist/lib/browser/meta.json +0 -1
  81. package/dist/lib/browser/react-surface-DBUDXBXD.mjs +0 -38
  82. package/dist/lib/browser/react-surface-DBUDXBXD.mjs.map +0 -7
  83. package/dist/lib/node-esm/BoardContainer-U2P3DS4B.mjs +0 -151
  84. package/dist/lib/node-esm/BoardContainer-U2P3DS4B.mjs.map +0 -7
  85. package/dist/lib/node-esm/chunk-4C3UI73P.mjs +0 -35
  86. package/dist/lib/node-esm/chunk-4C3UI73P.mjs.map +0 -7
  87. package/dist/lib/node-esm/chunk-BKJL6RLQ.mjs +0 -21
  88. package/dist/lib/node-esm/chunk-BKJL6RLQ.mjs.map +0 -7
  89. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  90. package/dist/lib/node-esm/index.mjs +0 -69
  91. package/dist/lib/node-esm/index.mjs.map +0 -7
  92. package/dist/lib/node-esm/meta.json +0 -1
  93. package/dist/lib/node-esm/react-surface-SFB3GP7U.mjs +0 -39
  94. package/dist/lib/node-esm/react-surface-SFB3GP7U.mjs.map +0 -7
  95. package/dist/lib/node-esm/types/index.mjs +0 -9
  96. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  97. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  98. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  99. package/dist/types/src/containers/BoardContainer/BoardContainer.d.ts +0 -6
  100. package/dist/types/src/containers/BoardContainer/BoardContainer.d.ts.map +0 -1
  101. package/dist/types/src/containers/BoardContainer/BoardContainer.stories.d.ts +0 -45
  102. package/dist/types/src/containers/BoardContainer/BoardContainer.stories.d.ts.map +0 -1
  103. package/dist/types/src/containers/BoardContainer/index.d.ts +0 -3
  104. package/dist/types/src/containers/BoardContainer/index.d.ts.map +0 -1
  105. package/src/capabilities/react-surface/index.ts +0 -7
  106. package/src/capabilities/react-surface/react-surface.tsx +0 -27
  107. package/src/containers/BoardContainer/index.ts +0 -7
  108. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  109. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  110. /package/dist/lib/{browser/types → neutral/components}/index.mjs.map +0 -0
  111. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
  112. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
  113. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-board",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.d9fc60f731",
4
4
  "description": "Surface plugin for card baords",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -8,87 +8,116 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/dxos/dxos"
10
10
  },
11
- "license": "MIT",
11
+ "license": "FSL-1.1-Apache-2.0",
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
+ "imports": {
16
+ "#capabilities": {
17
+ "source": "./src/capabilities/index.ts",
18
+ "types": "./dist/types/src/capabilities/index.d.ts",
19
+ "default": "./dist/lib/neutral/capabilities/index.mjs"
20
+ },
21
+ "#components": {
22
+ "source": "./src/components/index.ts",
23
+ "types": "./dist/types/src/components/index.d.ts",
24
+ "default": "./dist/lib/neutral/components/index.mjs"
25
+ },
26
+ "#containers": {
27
+ "source": "./src/containers/index.ts",
28
+ "types": "./dist/types/src/containers/index.d.ts",
29
+ "default": "./dist/lib/neutral/containers/index.mjs"
30
+ },
31
+ "#meta": {
32
+ "source": "./src/meta.ts",
33
+ "types": "./dist/types/src/meta.d.ts",
34
+ "default": "./dist/lib/neutral/meta.mjs"
35
+ },
36
+ "#plugin": {
37
+ "source": "./src/BoardPlugin.tsx",
38
+ "types": "./dist/types/src/BoardPlugin.d.ts",
39
+ "default": "./dist/lib/neutral/BoardPlugin.mjs"
40
+ },
41
+ "#translations": {
42
+ "source": "./src/translations.ts",
43
+ "types": "./dist/types/src/translations.d.ts",
44
+ "default": "./dist/lib/neutral/translations.mjs"
45
+ },
46
+ "#types": {
47
+ "source": "./src/types/index.ts",
48
+ "types": "./dist/types/src/types/index.d.ts",
49
+ "default": "./dist/lib/neutral/types/index.mjs"
50
+ }
51
+ },
15
52
  "exports": {
16
53
  ".": {
17
54
  "source": "./src/index.ts",
18
- "browser": "./dist/lib/browser/index.mjs",
19
- "node": "./dist/lib/node-esm/index.mjs",
20
- "types": "./dist/types/src/index.d.ts"
55
+ "types": "./dist/types/src/index.d.ts",
56
+ "default": "./dist/lib/neutral/index.mjs"
21
57
  },
22
- "./types": {
23
- "source": "./src/types/index.ts",
24
- "browser": "./dist/lib/browser/types/index.mjs",
25
- "node": "./dist/lib/node-esm/types/index.mjs",
26
- "types": "./dist/types/src/types/index.d.ts"
58
+ "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
59
+ "./plugin": {
60
+ "source": "./src/plugin.ts",
61
+ "types": "./dist/types/src/plugin.d.ts",
62
+ "default": "./dist/lib/neutral/plugin.mjs"
63
+ },
64
+ "./translations": {
65
+ "source": "./src/translations.ts",
66
+ "types": "./dist/types/src/translations.d.ts",
67
+ "default": "./dist/lib/neutral/translations.mjs"
27
68
  }
28
69
  },
29
70
  "types": "dist/types/src/index.d.ts",
30
- "typesVersions": {
31
- "*": {
32
- "types": [
33
- "dist/types/src/types/index.d.ts"
34
- ]
35
- }
36
- },
37
71
  "files": [
38
72
  "dist",
39
- "src"
73
+ "src",
74
+ "PLUGIN.mdl"
40
75
  ],
41
76
  "dependencies": {
42
- "effect": "3.19.16",
43
- "@dxos/ai": "0.8.4-main.c85a9c8dae",
44
- "@dxos/app-toolkit": "0.8.4-main.c85a9c8dae",
45
- "@dxos/app-framework": "0.8.4-main.c85a9c8dae",
46
- "@dxos/assistant": "0.8.4-main.c85a9c8dae",
47
- "@dxos/blueprints": "0.8.4-main.c85a9c8dae",
48
- "@dxos/echo": "0.8.4-main.c85a9c8dae",
49
- "@dxos/effect": "0.8.4-main.c85a9c8dae",
50
- "@dxos/client": "0.8.4-main.c85a9c8dae",
51
- "@dxos/invariant": "0.8.4-main.c85a9c8dae",
52
- "@dxos/log": "0.8.4-main.c85a9c8dae",
53
- "@dxos/operation": "0.8.4-main.c85a9c8dae",
54
- "@dxos/plugin-client": "0.8.4-main.c85a9c8dae",
55
- "@dxos/plugin-graph": "0.8.4-main.c85a9c8dae",
56
- "@dxos/async": "0.8.4-main.c85a9c8dae",
57
- "@dxos/plugin-search": "0.8.4-main.c85a9c8dae",
58
- "@dxos/random": "0.8.4-main.c85a9c8dae",
59
- "@dxos/plugin-space": "0.8.4-main.c85a9c8dae",
60
- "@dxos/react-client": "0.8.4-main.c85a9c8dae",
61
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
62
- "@dxos/react-ui-attention": "0.8.4-main.c85a9c8dae",
63
- "@dxos/react-ui-board": "0.8.4-main.c85a9c8dae",
64
- "@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
65
- "@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
66
- "@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
67
- "@dxos/schema": "0.8.4-main.c85a9c8dae",
68
- "@dxos/types": "0.8.4-main.c85a9c8dae",
69
- "@dxos/util": "0.8.4-main.c85a9c8dae",
70
- "@dxos/echo-react": "0.8.4-main.c85a9c8dae"
77
+ "@effect-atom/atom": "^0.5.3",
78
+ "@effect-atom/atom-react": "^0.5.0",
79
+ "effect": "3.21.2",
80
+ "@dxos/app-framework": "0.8.4-main.d9fc60f731",
81
+ "@dxos/app-toolkit": "0.8.4-main.d9fc60f731",
82
+ "@dxos/echo-atom": "0.8.4-main.d9fc60f731",
83
+ "@dxos/compute": "0.8.4-main.d9fc60f731",
84
+ "@dxos/echo-react": "0.8.4-main.d9fc60f731",
85
+ "@dxos/keys": "0.8.4-main.d9fc60f731",
86
+ "@dxos/plugin-client": "0.8.4-main.d9fc60f731",
87
+ "@dxos/invariant": "0.8.4-main.d9fc60f731",
88
+ "@dxos/plugin-markdown": "0.8.4-main.d9fc60f731",
89
+ "@dxos/plugin-space": "0.8.4-main.d9fc60f731",
90
+ "@dxos/react-client": "0.8.4-main.d9fc60f731",
91
+ "@dxos/react-ui-attention": "0.8.4-main.d9fc60f731",
92
+ "@dxos/random": "0.8.4-main.d9fc60f731",
93
+ "@dxos/react-ui-form": "0.8.4-main.d9fc60f731",
94
+ "@dxos/react-ui": "0.8.4-main.d9fc60f731",
95
+ "@dxos/react-ui-stack": "0.8.4-main.d9fc60f731",
96
+ "@dxos/types": "0.8.4-main.d9fc60f731",
97
+ "@dxos/util": "0.8.4-main.d9fc60f731",
98
+ "@dxos/react-ui-board": "0.8.4-main.d9fc60f731",
99
+ "@dxos/echo": "0.8.4-main.d9fc60f731"
71
100
  },
72
101
  "devDependencies": {
73
102
  "@types/react": "~19.2.7",
74
103
  "@types/react-dom": "~19.2.3",
75
104
  "react": "~19.2.3",
76
105
  "react-dom": "~19.2.3",
77
- "vite": "^7.1.11",
78
- "@dxos/plugin-testing": "0.8.4-main.c85a9c8dae",
79
- "@dxos/plugin-theme": "0.8.4-main.c85a9c8dae",
80
- "@dxos/test-utils": "0.8.4-main.c85a9c8dae",
81
- "@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
82
- "@dxos/plugin-preview": "0.8.4-main.c85a9c8dae",
83
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae",
84
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.c85a9c8dae"
106
+ "vite": "^8.0.14",
107
+ "@dxos/plugin-preview": "0.8.4-main.d9fc60f731",
108
+ "@dxos/plugin-testing": "0.8.4-main.d9fc60f731",
109
+ "@dxos/plugin-theme": "0.8.4-main.d9fc60f731",
110
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.d9fc60f731",
111
+ "@dxos/test-utils": "0.8.4-main.d9fc60f731",
112
+ "@dxos/storybook-utils": "0.8.4-main.d9fc60f731",
113
+ "@dxos/ui-theme": "0.8.4-main.d9fc60f731"
85
114
  },
86
115
  "peerDependencies": {
87
- "effect": "3.19.16",
116
+ "effect": "3.21.2",
88
117
  "react": "~19.2.3",
89
118
  "react-dom": "~19.2.3",
90
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
91
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
119
+ "@dxos/ui-theme": "0.8.4-main.d9fc60f731",
120
+ "@dxos/react-ui": "0.8.4-main.d9fc60f731"
92
121
  },
93
122
  "publishConfig": {
94
123
  "access": "public"
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
8
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
9
+
10
+ import { BoardPlugin } from '#plugin';
11
+
12
+ import { meta } from './meta';
13
+
14
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+
16
+ describe('BoardPlugin', () => {
17
+ test('modules activate on the expected events', async ({ expect }) => {
18
+ await using harness = await createComposerTestApp({
19
+ plugins: [ClientPlugin({}), BoardPlugin()],
20
+ });
21
+
22
+ // Modules expected to be active after a normal startup.
23
+ expect(harness.manager.getActive()).toEqual(
24
+ expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
25
+ );
26
+ });
27
+ });
@@ -2,32 +2,27 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
-
7
5
  import { Plugin } from '@dxos/app-framework';
8
6
  import { AppPlugin } from '@dxos/app-toolkit';
9
- import { type CreateObject } from '@dxos/plugin-space/types';
10
- import { translations as boardTranslations } from '@dxos/react-ui-board';
7
+ import { translations as boardTranslations } from '@dxos/react-ui-board/translations';
8
+
9
+ import { CreateObject, ReactSurface } from '#capabilities';
10
+ import { meta } from '#meta';
11
+ import { translations } from '#translations';
12
+ import { Board } from '#types';
11
13
 
12
- import { ReactSurface } from './capabilities';
13
- import { meta } from './meta';
14
- import { translations } from './translations';
15
- import { Board } from './types';
14
+ // eslint-disable-next-line import/no-relative-packages
15
+ import pluginSpec from '../PLUGIN.mdl?raw';
16
16
 
17
17
  export const BoardPlugin = Plugin.define(meta).pipe(
18
- AppPlugin.addMetadataModule({
19
- metadata: {
20
- id: Board.Board.typename,
21
- metadata: {
22
- icon: 'ph--squares-four--regular',
23
- iconHue: 'green',
24
- createObject: ((props) => Effect.sync(() => Board.makeBoard(props))) satisfies CreateObject,
25
- addToCollectionOnCreate: true,
26
- },
27
- },
28
- }),
18
+ AppPlugin.addCreateObjectModule({ activate: CreateObject }),
29
19
  AppPlugin.addSchemaModule({ schema: [Board.Board] }),
30
20
  AppPlugin.addSurfaceModule({ activate: ReactSurface }),
31
21
  AppPlugin.addTranslationsModule({ translations: [...translations, ...boardTranslations] }),
22
+ AppPlugin.addPluginAssetModule({
23
+ asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
24
+ }),
32
25
  Plugin.make,
33
26
  );
27
+
28
+ export default BoardPlugin;
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Type } from '@dxos/echo';
10
+ import { SpaceOperation } from '@dxos/plugin-space';
11
+ import { SpaceCapabilities } from '@dxos/plugin-space';
12
+
13
+ import { Board } from '#types';
14
+
15
+ export default Capability.makeModule(
16
+ Effect.fnUntraced(function* () {
17
+ return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
18
+ id: Type.getTypename(Board.Board),
19
+ createObject: (props, options) =>
20
+ Effect.gen(function* () {
21
+ const object = Board.makeBoard(props);
22
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
23
+ object,
24
+ target: options.target,
25
+ hidden: true,
26
+ targetNodeId: options.targetNodeId,
27
+ });
28
+ }),
29
+ });
30
+ }),
31
+ );
@@ -2,4 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './react-surface';
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
8
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
11
+
12
+ import { BoardArticle } from '#containers';
13
+ import { Board } from '#types';
14
+
15
+ export default Capability.makeModule(() =>
16
+ Effect.succeed(
17
+ Capability.contributes(Capabilities.ReactSurface, [
18
+ Surface.create({
19
+ id: 'root',
20
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
21
+ filter: AppSurface.oneOf(
22
+ AppSurface.object(AppSurface.Article, Board.Board),
23
+ AppSurface.object(AppSurface.Section, Board.Board),
24
+ ),
25
+ component: ({ role, data }) => (
26
+ <BoardArticle role={role} subject={data.subject} attendableId={data.attendableId} />
27
+ ),
28
+ }),
29
+ ]),
30
+ ),
31
+ );
@@ -7,22 +7,23 @@ import * as Effect from 'effect/Effect';
7
7
  import React, { useEffect, useState } from 'react';
8
8
 
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { Obj } from '@dxos/echo';
11
- import { ClientPlugin } from '@dxos/plugin-client';
12
- import { PreviewPlugin } from '@dxos/plugin-preview';
10
+ import { Filter, Obj, Ref } from '@dxos/echo';
11
+ import { ClientPlugin } from '@dxos/plugin-client/testing';
12
+ import { initializeIdentity } from '@dxos/plugin-client/testing';
13
+ import { PreviewPlugin } from '@dxos/plugin-preview/testing';
13
14
  import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
14
- import { faker } from '@dxos/random';
15
- import { Filter, Ref, useQuery, useSpaces } from '@dxos/react-client/echo';
16
- import { withLayout, withTheme } from '@dxos/react-ui/testing';
17
- import { translations as stackTranslations } from '@dxos/react-ui-stack';
15
+ import { random } from '@dxos/random';
16
+ import { useQuery, useSpaces } from '@dxos/react-client/echo';
17
+ import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
18
+ import { withLayout } from '@dxos/react-ui/testing';
18
19
  import { Organization, Person } from '@dxos/types';
19
20
 
20
- import { translations } from '../../translations';
21
- import { Board } from '../../types';
21
+ import { translations } from '#translations';
22
+ import { Board } from '#types';
22
23
 
23
- import { BoardContainer } from './BoardContainer';
24
+ import { BoardArticle } from './BoardArticle';
24
25
 
25
- faker.seed(0);
26
+ random.seed(0);
26
27
 
27
28
  const createBoard = () =>
28
29
  Obj.make(Board.Board, {
@@ -36,12 +37,12 @@ const createBoard = () =>
36
37
 
37
38
  const createOrg = () =>
38
39
  Obj.make(Organization.Organization, {
39
- name: faker.commerce.productName(),
40
- description: faker.lorem.paragraph(),
41
- image: faker.image.url(),
42
- website: faker.internet.url(),
40
+ name: random.commerce.productName(),
41
+ description: random.lorem.paragraph(),
42
+ image: random.image.url(),
43
+ website: random.internet.url(),
43
44
  // TODO(burdon): Fix.
44
- // status: faker.helpers.arrayElement(Organization.StatusOptions).id,
45
+ // status: random.helpers.arrayElement(Organization.StatusOptions).id,
45
46
  });
46
47
 
47
48
  const DefaultStory = () => {
@@ -61,7 +62,7 @@ const DefaultStory = () => {
61
62
  return null;
62
63
  }
63
64
 
64
- return <BoardContainer role='board' subject={board} />;
65
+ return <BoardArticle role='board' subject={board} attendableId='test' />;
65
66
  };
66
67
 
67
68
  //
@@ -69,10 +70,9 @@ const DefaultStory = () => {
69
70
  //
70
71
 
71
72
  const meta = {
72
- title: 'plugins/plugin-board/containers/BoardContainer',
73
+ title: 'plugins/plugin-board/containers/BoardArticle',
73
74
  render: DefaultStory,
74
75
  decorators: [
75
- withTheme(),
76
76
  withLayout({ layout: 'fullscreen' }),
77
77
  withPluginManager({
78
78
  plugins: [
@@ -81,18 +81,18 @@ const meta = {
81
81
  types: [Organization.Organization, Person.Person, Board.Board],
82
82
  onClientInitialized: ({ client }) =>
83
83
  Effect.gen(function* () {
84
- yield* Effect.promise(() => client.halo.createIdentity());
84
+ yield* initializeIdentity(client);
85
85
  const space = yield* Effect.promise(() => client.spaces.create());
86
86
  yield* Effect.promise(() => space.waitUntilReady());
87
87
  const board = space.db.add(createBoard());
88
88
 
89
- Obj.change(board, (b) => {
89
+ Obj.update(board, (board) => {
90
90
  // Add some sample items
91
91
  Array.from({ length: 10 }).map(() => {
92
92
  const org = createOrg();
93
93
  space.db.add(org);
94
- b.items.push(Ref.make(org));
95
- b.layout.cells[org.id] = {
94
+ board.items.push(Ref.make(org));
95
+ board.layout.cells[org.id] = {
96
96
  x: Math.floor(Math.random() * 5) - 2,
97
97
  y: Math.floor(Math.random() * 5) - 2,
98
98
  width: 1,
@@ -2,13 +2,18 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
6
+ import * as Atom from '@effect-atom/atom/Atom';
5
7
  import React, { useCallback, useMemo, useRef, useState } from 'react';
6
8
 
7
9
  import { Surface } from '@dxos/app-framework/ui';
8
- import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
9
11
  import { Filter, Obj, Ref } from '@dxos/echo';
10
- import { useObject, useObjects } from '@dxos/echo-react';
12
+ import { AtomObj } from '@dxos/echo-atom';
13
+ import { useObject } from '@dxos/echo-react';
11
14
  import { invariant } from '@dxos/invariant';
15
+ import { EID } from '@dxos/keys';
16
+ import { Markdown } from '@dxos/plugin-markdown';
12
17
  import { useQuery } from '@dxos/react-client/echo';
13
18
  import { Panel } from '@dxos/react-ui';
14
19
  import { useAttention } from '@dxos/react-ui-attention';
@@ -16,7 +21,7 @@ import { Board, type BoardController, type BoardRootProps, type Position } from
16
21
  import { ObjectPicker, type ObjectPickerContentProps } from '@dxos/react-ui-form';
17
22
  import { isNonNullable } from '@dxos/util';
18
23
 
19
- import { type Board as BoardType } from '../../types';
24
+ import { type Board as BoardType } from '#types';
20
25
 
21
26
  const DEFAULT_POSITION = { x: 0, y: 0 } satisfies Position;
22
27
 
@@ -24,18 +29,32 @@ type PickerState = {
24
29
  position: Position;
25
30
  };
26
31
 
27
- export type BoardContainerProps = SurfaceComponentProps<BoardType.Board>;
32
+ export type BoardArticleProps = AppSurface.ObjectArticleProps<BoardType.Board>;
28
33
 
29
- export const BoardContainer = ({ role, subject: board }: BoardContainerProps) => {
30
- const controller = useRef<BoardController>(null);
34
+ export const BoardArticle = ({ role, subject: board, attendableId }: BoardArticleProps) => {
35
+ const { hasAttention } = useAttention(attendableId);
36
+ const db = Obj.getDatabase(board);
31
37
  const [boardItems] = useObject(board, 'items');
32
- const items = useObjects(boardItems ?? []);
38
+ const itemsAtom = useMemo(
39
+ () =>
40
+ Atom.make((get) => {
41
+ const result: Obj.Unknown[] = [];
42
+ for (const ref of boardItems ?? []) {
43
+ const obj = get(AtomObj.makeWithReactive(ref));
44
+ if (obj) {
45
+ result.push(obj);
46
+ }
47
+ }
48
+ return result;
49
+ }),
50
+ [boardItems],
51
+ );
52
+ const items = useAtomValue(itemsAtom);
53
+
54
+ const controller = useRef<BoardController>(null);
33
55
  const addTriggerRef = useRef<HTMLButtonElement | null>(null);
34
56
  const [pickerState, setPickerState] = useState<PickerState | null>(null);
35
- const attendableId = Obj.getDXN(board).toString();
36
- const { hasAttention } = useAttention(attendableId);
37
57
 
38
- const db = Obj.getDatabase(board);
39
58
  // TODO(burdon): Use search.
40
59
  const objects = useQuery(db, Filter.everything());
41
60
  const options = useMemo<ObjectPickerContentProps['options']>(
@@ -58,13 +77,22 @@ export const BoardContainer = ({ role, subject: board }: BoardContainerProps) =>
58
77
  );
59
78
 
60
79
  const handleAdd = useCallback<NonNullable<BoardRootProps['onAdd']>>(
61
- async (anchor, position = DEFAULT_POSITION) => {
80
+ async (anchor, position) => {
62
81
  const db = Obj.getDatabase(board);
63
82
  invariant(db);
83
+ // Grid backdrop "+" supplies a position → create a new Markdown document directly.
84
+ // Toolbar "+" omits position → fall back to the picker over existing objects.
85
+ if (position) {
86
+ const doc = db.add(Markdown.make());
87
+ Obj.update(board, (board) => {
88
+ board.items.push(Ref.make(doc));
89
+ board.layout.cells[doc.id.toString()] = position;
90
+ });
91
+ return;
92
+ }
93
+
64
94
  addTriggerRef.current = anchor;
65
- setPickerState({
66
- position,
67
- });
95
+ setPickerState({ position: DEFAULT_POSITION });
68
96
  },
69
97
  [board],
70
98
  );
@@ -73,12 +101,15 @@ export const BoardContainer = ({ role, subject: board }: BoardContainerProps) =>
73
101
  const handleDelete = useCallback<NonNullable<BoardRootProps['onDelete']>>(
74
102
  (id) => {
75
103
  // TODO(burdon): Impl. DXN.equals and pass in DXN from `id`.
76
- const idx = board.items.findIndex((ref) => ref.dxn.asEchoDXN()?.echoId === id);
77
- Obj.change(board, (b) => {
104
+ const idx = board.items.findIndex((ref) => {
105
+ const echoUri = EID.tryParse(ref.uri);
106
+ return (echoUri ? EID.getEntityId(echoUri) : undefined) === id;
107
+ });
108
+ Obj.update(board, (board) => {
78
109
  if (idx !== -1) {
79
- b.items.splice(idx, 1);
110
+ board.items.splice(idx, 1);
80
111
  }
81
- delete b.layout.cells[id];
112
+ delete board.layout.cells[id];
82
113
  });
83
114
  },
84
115
  [board],
@@ -87,8 +118,8 @@ export const BoardContainer = ({ role, subject: board }: BoardContainerProps) =>
87
118
  const handleMove = useCallback<NonNullable<BoardRootProps['onMove']>>(
88
119
  (id, position) => {
89
120
  const layout = board.layout.cells[id];
90
- Obj.change(board, (b) => {
91
- b.layout.cells[id] = { ...layout, ...position };
121
+ Obj.update(board, (board) => {
122
+ board.layout.cells[id] = { ...layout, ...position };
92
123
  });
93
124
  },
94
125
  [board],
@@ -107,11 +138,11 @@ export const BoardContainer = ({ role, subject: board }: BoardContainerProps) =>
107
138
  }
108
139
 
109
140
  // Create a reference to the selected object and add it to the board.
110
- Obj.change(board, (b) => {
111
- b.items.push(Ref.make(selectedObject));
141
+ Obj.update(board, (board) => {
142
+ board.items.push(Ref.make(selectedObject));
112
143
 
113
144
  // Set the layout position for the new item.
114
- b.layout.cells[selectedObject.id.toString()] = pickerState.position;
145
+ board.layout.cells[selectedObject.id.toString()] = pickerState.position;
115
146
  });
116
147
 
117
148
  // Close the picker.
@@ -139,7 +170,7 @@ export const BoardContainer = ({ role, subject: board }: BoardContainerProps) =>
139
170
  <Board.Content>
140
171
  {items?.map((item, index) => (
141
172
  <Board.Cell item={item} key={index} layout={board.layout?.cells[item.id] ?? { x: 0, y: 0 }}>
142
- <Surface.Surface role='card--content' data={{ subject: item }} limit={1} />
173
+ <Surface.Surface type={AppSurface.Card} data={{ subject: item, editable: true }} limit={1} />
143
174
  </Board.Cell>
144
175
  ))}
145
176
  </Board.Content>
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { BoardArticle as default } from './BoardArticle';
@@ -4,4 +4,4 @@
4
4
 
5
5
  import { type ComponentType, lazy } from 'react';
6
6
 
7
- export const BoardContainer: ComponentType<any> = lazy(() => import('./BoardContainer'));
7
+ export const BoardArticle: ComponentType<any> = lazy(() => import('./BoardArticle'));
package/src/index.ts CHANGED
@@ -4,5 +4,3 @@
4
4
 
5
5
  export * from './meta';
6
6
  export * from './types';
7
-
8
- export * from './BoardPlugin';
package/src/meta.ts CHANGED
@@ -2,18 +2,28 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Plugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { DXN } from '@dxos/keys';
6
7
  import { trim } from '@dxos/util';
7
8
 
8
- export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/board',
9
+ export const meta = Plugin.makeMeta({
10
+ key: DXN.make('org.dxos.plugin.board'),
10
11
  name: 'Board',
12
+ author: 'DXOS',
11
13
  description: trim`
12
- Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.
13
- Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.
14
+ Board is an infinite spatial canvas that lets you place any ECHO object — documents, tasks, notes, or rich media anywhere on a two-dimensional grid.
15
+ Items are arranged by dragging, resized freely, and removed from the canvas without deleting the underlying data, so the same object can appear on multiple boards simultaneously.
16
+
17
+ Each board is itself an ECHO object, making it fully collaborative and conflict-free: all participants see live updates as peers add, move, or remove items in real time.
18
+ The canvas scales to any resolution, supports nested surfaces through the Composer slot system, and integrates naturally with other plugins via the shared ObjectPicker.
19
+
20
+ Board is designed as a lightweight composition layer: it imposes no schema on the objects it hosts and delegates rendering to each object's own Card surface, so every plugin contributes its own card representation automatically.
21
+ This makes it ideal for dashboards, mood boards, project overviews, or any context where spatial relationships between heterogeneous objects carry meaning.
14
22
  `,
15
23
  icon: 'ph--squares-four--regular',
16
24
  iconHue: 'green',
17
25
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board',
26
+ spec: 'PLUGIN.mdl',
18
27
  screenshots: [],
19
- };
28
+ tags: ['labs'],
29
+ });
package/src/plugin.ts ADDED
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const BoardPlugin = Plugin.lazy(meta, () => import('#plugin'));