@dxos/plugin-board 0.8.4-main.2e9d522 → 0.8.4-main.3eb6e50203

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 (76) hide show
  1. package/dist/lib/browser/chunk-7VKDDGS7.mjs +36 -0
  2. package/dist/lib/browser/chunk-7VKDDGS7.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-DCLJ4HOC.mjs +159 -0
  4. package/dist/lib/browser/chunk-DCLJ4HOC.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +38 -55
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/react-surface-3ECZMYLQ.mjs +32 -0
  9. package/dist/lib/browser/react-surface-3ECZMYLQ.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +3 -3
  11. package/dist/lib/node-esm/chunk-HICZFU5T.mjs +161 -0
  12. package/dist/lib/node-esm/chunk-HICZFU5T.mjs.map +7 -0
  13. package/dist/lib/node-esm/chunk-UGVRNKWV.mjs +37 -0
  14. package/dist/lib/node-esm/chunk-UGVRNKWV.mjs.map +7 -0
  15. package/dist/lib/node-esm/index.mjs +38 -55
  16. package/dist/lib/node-esm/index.mjs.map +4 -4
  17. package/dist/lib/node-esm/meta.json +1 -1
  18. package/dist/lib/node-esm/react-surface-W7FPI7BR.mjs +33 -0
  19. package/dist/lib/node-esm/react-surface-W7FPI7BR.mjs.map +7 -0
  20. package/dist/lib/node-esm/types/index.mjs +3 -3
  21. package/dist/types/src/BoardPlugin.d.ts +2 -1
  22. package/dist/types/src/BoardPlugin.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/index.d.ts +1 -2
  24. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  26. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  27. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  28. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  29. package/dist/types/src/components/BoardContainer.d.ts +3 -5
  30. package/dist/types/src/components/BoardContainer.d.ts.map +1 -1
  31. package/dist/types/src/components/BoardContainer.stories.d.ts +42 -5
  32. package/dist/types/src/components/BoardContainer.stories.d.ts.map +1 -1
  33. package/dist/types/src/index.d.ts +2 -0
  34. package/dist/types/src/index.d.ts.map +1 -1
  35. package/dist/types/src/meta.d.ts +2 -2
  36. package/dist/types/src/meta.d.ts.map +1 -1
  37. package/dist/types/src/translations.d.ts +1 -0
  38. package/dist/types/src/translations.d.ts.map +1 -1
  39. package/dist/types/src/types/Board.d.ts +46 -0
  40. package/dist/types/src/types/Board.d.ts.map +1 -0
  41. package/dist/types/src/types/index.d.ts +1 -1
  42. package/dist/types/src/types/index.d.ts.map +1 -1
  43. package/dist/types/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +57 -48
  45. package/src/BoardPlugin.tsx +23 -48
  46. package/src/capabilities/index.ts +1 -4
  47. package/src/capabilities/react-surface/index.ts +7 -0
  48. package/src/capabilities/react-surface/react-surface.tsx +27 -0
  49. package/src/components/BoardContainer.stories.tsx +53 -74
  50. package/src/components/BoardContainer.tsx +111 -64
  51. package/src/index.ts +2 -0
  52. package/src/meta.ts +8 -4
  53. package/src/translations.ts +1 -0
  54. package/src/types/Board.ts +33 -0
  55. package/src/types/index.ts +1 -1
  56. package/dist/lib/browser/chunk-TDV6SJ64.mjs +0 -46
  57. package/dist/lib/browser/chunk-TDV6SJ64.mjs.map +0 -7
  58. package/dist/lib/browser/intent-resolver-TDOZP647.mjs +0 -33
  59. package/dist/lib/browser/intent-resolver-TDOZP647.mjs.map +0 -7
  60. package/dist/lib/browser/react-surface-XFSXU2JJ.mjs +0 -143
  61. package/dist/lib/browser/react-surface-XFSXU2JJ.mjs.map +0 -7
  62. package/dist/lib/node-esm/chunk-K6CHLZYU.mjs +0 -48
  63. package/dist/lib/node-esm/chunk-K6CHLZYU.mjs.map +0 -7
  64. package/dist/lib/node-esm/intent-resolver-IHQWKJNT.mjs +0 -34
  65. package/dist/lib/node-esm/intent-resolver-IHQWKJNT.mjs.map +0 -7
  66. package/dist/lib/node-esm/react-surface-ZHPQBZWO.mjs +0 -144
  67. package/dist/lib/node-esm/react-surface-ZHPQBZWO.mjs.map +0 -7
  68. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  69. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  70. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  71. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  72. package/dist/types/src/types/schema.d.ts +0 -65
  73. package/dist/types/src/types/schema.d.ts.map +0 -1
  74. package/src/capabilities/intent-resolver.ts +0 -34
  75. package/src/capabilities/react-surface.tsx +0 -22
  76. package/src/types/schema.ts +0 -45
package/package.json CHANGED
@@ -1,23 +1,29 @@
1
1
  {
2
2
  "name": "@dxos/plugin-board",
3
- "version": "0.8.4-main.2e9d522",
3
+ "version": "0.8.4-main.3eb6e50203",
4
4
  "description": "Surface plugin for card baords",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
11
15
  "exports": {
12
16
  ".": {
13
- "types": "./dist/types/src/index.d.ts",
14
17
  "browser": "./dist/lib/browser/index.mjs",
15
- "node": "./dist/lib/node-esm/index.mjs"
18
+ "node": "./dist/lib/node-esm/index.mjs",
19
+ "source": "./src/index.ts",
20
+ "types": "./dist/types/src/index.d.ts"
16
21
  },
17
22
  "./types": {
18
- "types": "./dist/types/src/types/index.d.ts",
19
23
  "browser": "./dist/lib/browser/types/index.mjs",
20
- "node": "./dist/lib/node-esm/types/index.mjs"
24
+ "node": "./dist/lib/node-esm/types/index.mjs",
25
+ "source": "./src/types/index.ts",
26
+ "types": "./dist/types/src/types/index.d.ts"
21
27
  }
22
28
  },
23
29
  "types": "dist/types/src/index.d.ts",
@@ -33,53 +39,56 @@
33
39
  "src"
34
40
  ],
35
41
  "dependencies": {
36
- "@preact-signals/safe-react": "^0.9.0",
37
- "@preact/signals-core": "^1.9.0",
38
- "@preact/signals-react": "^3.2.0",
39
- "effect": "3.17.0",
40
- "@dxos/app-framework": "0.8.4-main.2e9d522",
41
- "@dxos/assistant": "0.8.4-main.2e9d522",
42
- "@dxos/async": "0.8.4-main.2e9d522",
43
- "@dxos/blueprints": "0.8.4-main.2e9d522",
44
- "@dxos/client": "0.8.4-main.2e9d522",
45
- "@dxos/echo": "0.8.4-main.2e9d522",
46
- "@dxos/echo-schema": "0.8.4-main.2e9d522",
47
- "@dxos/effect": "0.8.4-main.2e9d522",
48
- "@dxos/invariant": "0.8.4-main.2e9d522",
49
- "@dxos/log": "0.8.4-main.2e9d522",
50
- "@dxos/plugin-graph": "0.8.4-main.2e9d522",
51
- "@dxos/plugin-search": "0.8.4-main.2e9d522",
52
- "@dxos/plugin-space": "0.8.4-main.2e9d522",
53
- "@dxos/random": "0.8.4-main.2e9d522",
54
- "@dxos/react-client": "0.8.4-main.2e9d522",
55
- "@dxos/react-ui": "0.8.4-main.2e9d522",
56
- "@dxos/plugin-client": "0.8.4-main.2e9d522",
57
- "@dxos/react-ui-board": "0.8.4-main.2e9d522",
58
- "@dxos/react-ui-form": "0.8.4-main.2e9d522",
59
- "@dxos/react-ui-stack": "0.8.4-main.2e9d522",
60
- "@dxos/schema": "0.8.4-main.2e9d522",
61
- "@dxos/util": "0.8.4-main.2e9d522",
62
- "@dxos/ai": "0.8.4-main.2e9d522"
42
+ "effect": "3.19.16",
43
+ "@dxos/ai": "0.8.4-main.3eb6e50203",
44
+ "@dxos/app-framework": "0.8.4-main.3eb6e50203",
45
+ "@dxos/assistant": "0.8.4-main.3eb6e50203",
46
+ "@dxos/blueprints": "0.8.4-main.3eb6e50203",
47
+ "@dxos/async": "0.8.4-main.3eb6e50203",
48
+ "@dxos/client": "0.8.4-main.3eb6e50203",
49
+ "@dxos/echo": "0.8.4-main.3eb6e50203",
50
+ "@dxos/echo-react": "0.8.4-main.3eb6e50203",
51
+ "@dxos/effect": "0.8.4-main.3eb6e50203",
52
+ "@dxos/invariant": "0.8.4-main.3eb6e50203",
53
+ "@dxos/log": "0.8.4-main.3eb6e50203",
54
+ "@dxos/operation": "0.8.4-main.3eb6e50203",
55
+ "@dxos/plugin-client": "0.8.4-main.3eb6e50203",
56
+ "@dxos/plugin-search": "0.8.4-main.3eb6e50203",
57
+ "@dxos/app-toolkit": "0.8.4-main.3eb6e50203",
58
+ "@dxos/plugin-space": "0.8.4-main.3eb6e50203",
59
+ "@dxos/plugin-graph": "0.8.4-main.3eb6e50203",
60
+ "@dxos/random": "0.8.4-main.3eb6e50203",
61
+ "@dxos/react-ui": "0.8.4-main.3eb6e50203",
62
+ "@dxos/react-ui-attention": "0.8.4-main.3eb6e50203",
63
+ "@dxos/react-ui-form": "0.8.4-main.3eb6e50203",
64
+ "@dxos/react-ui-board": "0.8.4-main.3eb6e50203",
65
+ "@dxos/react-ui-mosaic": "0.8.4-main.3eb6e50203",
66
+ "@dxos/react-ui-stack": "0.8.4-main.3eb6e50203",
67
+ "@dxos/schema": "0.8.4-main.3eb6e50203",
68
+ "@dxos/types": "0.8.4-main.3eb6e50203",
69
+ "@dxos/util": "0.8.4-main.3eb6e50203",
70
+ "@dxos/react-client": "0.8.4-main.3eb6e50203"
63
71
  },
64
72
  "devDependencies": {
65
- "@types/react": "~18.2.0",
66
- "@types/react-dom": "~18.2.0",
67
- "react": "~18.2.0",
68
- "react-dom": "~18.2.0",
69
- "vite": "5.4.7",
70
- "@dxos/plugin-preview": "0.8.4-main.2e9d522",
71
- "@dxos/plugin-theme": "0.8.4-main.2e9d522",
72
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.2e9d522",
73
- "@dxos/react-ui-theme": "0.8.4-main.2e9d522",
74
- "@dxos/storybook-utils": "0.8.4-main.2e9d522",
75
- "@dxos/test-utils": "0.8.4-main.2e9d522"
73
+ "@types/react": "~19.2.7",
74
+ "@types/react-dom": "~19.2.3",
75
+ "react": "~19.2.3",
76
+ "react-dom": "~19.2.3",
77
+ "vite": "7.1.9",
78
+ "@dxos/plugin-preview": "0.8.4-main.3eb6e50203",
79
+ "@dxos/plugin-testing": "0.8.4-main.3eb6e50203",
80
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.3eb6e50203",
81
+ "@dxos/storybook-utils": "0.8.4-main.3eb6e50203",
82
+ "@dxos/test-utils": "0.8.4-main.3eb6e50203",
83
+ "@dxos/ui-theme": "0.8.4-main.3eb6e50203",
84
+ "@dxos/plugin-theme": "0.8.4-main.3eb6e50203"
76
85
  },
77
86
  "peerDependencies": {
78
- "effect": "^3.13.3",
79
- "react": "~18.2.0",
80
- "react-dom": "~18.2.0",
81
- "@dxos/react-ui-theme": "0.8.4-main.2e9d522",
82
- "@dxos/react-ui": "0.8.4-main.2e9d522"
87
+ "effect": "3.19.16",
88
+ "react": "~19.2.3",
89
+ "react-dom": "~19.2.3",
90
+ "@dxos/react-ui": "0.8.4-main.3eb6e50203",
91
+ "@dxos/ui-theme": "0.8.4-main.3eb6e50203"
83
92
  },
84
93
  "publishConfig": {
85
94
  "access": "public"
@@ -2,57 +2,32 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
6
- import { ClientEvents } from '@dxos/plugin-client';
7
- import { SpaceCapabilities } from '@dxos/plugin-space';
8
- import { defineObjectForm } from '@dxos/plugin-space/types';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Plugin } from '@dxos/app-framework';
8
+ import { AppPlugin } from '@dxos/app-toolkit';
9
+ import { type CreateObject } from '@dxos/plugin-space/types';
9
10
  import { translations as boardTranslations } from '@dxos/react-ui-board';
10
11
 
11
- import { IntentResolver, ReactSurface } from './capabilities';
12
+ import { ReactSurface } from './capabilities';
12
13
  import { meta } from './meta';
13
14
  import { translations } from './translations';
14
15
  import { Board } from './types';
15
16
 
16
- export const BoardPlugin = () => {
17
- return definePlugin(meta, [
18
- defineModule({
19
- id: `${meta.id}/module/translations`,
20
- activatesOn: Events.SetupTranslations,
21
- activate: () => contributes(Capabilities.Translations, [...translations, ...boardTranslations]),
22
- }),
23
- defineModule({
24
- id: `${meta.id}/module/metadata`,
25
- activatesOn: Events.SetupMetadata,
26
- activate: () =>
27
- // TODO(burdon): "Metadata" here seems non-descriptive; is this specifically for the type? ObjectMetadata?
28
- contributes(Capabilities.Metadata, {
29
- id: Board.Board.typename,
30
- metadata: {
31
- icon: 'ph--squares-four--regular',
32
- },
33
- }),
34
- }),
35
- defineModule({
36
- id: `${meta.id}/module/object-form`,
37
- activatesOn: ClientEvents.SetupSchema,
38
- activate: () =>
39
- contributes(
40
- SpaceCapabilities.ObjectForm,
41
- defineObjectForm({
42
- objectSchema: Board.Board,
43
- getIntent: () => createIntent(Board.Create),
44
- }),
45
- ),
46
- }),
47
- defineModule({
48
- id: `${meta.id}/module/react-surface`,
49
- activatesOn: Events.SetupReactSurface,
50
- activate: ReactSurface,
51
- }),
52
- defineModule({
53
- id: `${meta.id}/module/intent-resolver`,
54
- activatesOn: Events.SetupIntentResolver,
55
- activate: IntentResolver,
56
- }),
57
- ]);
58
- };
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
+ }),
29
+ AppPlugin.addSchemaModule({ schema: [Board.Board] }),
30
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
31
+ AppPlugin.addTranslationsModule({ translations: [...translations, ...boardTranslations] }),
32
+ Plugin.make,
33
+ );
@@ -2,7 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const IntentResolver = lazy(() => import('./intent-resolver'));
8
- export const ReactSurface = lazy(() => import('./react-surface'));
5
+ export * from './react-surface';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,27 @@
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 { Obj } from '@dxos/echo';
11
+
12
+ import { BoardContainer } from '../../components';
13
+ import { meta } from '../../meta';
14
+ import { Board } from '../../types';
15
+
16
+ export default Capability.makeModule(() =>
17
+ Effect.succeed(
18
+ Capability.contributes(Capabilities.ReactSurface, [
19
+ Surface.create({
20
+ id: meta.id,
21
+ role: ['article', 'section'],
22
+ filter: (data): data is { subject: Board.Board } => Obj.instanceOf(Board.Board, data.subject),
23
+ component: ({ role, data }) => <BoardContainer role={role} subject={data.subject} />,
24
+ }),
25
+ ]),
26
+ ),
27
+ );
@@ -2,40 +2,30 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
5
+ import { type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
8
7
  import React, { useEffect, useState } from 'react';
9
8
 
10
- import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
11
9
  import { withPluginManager } from '@dxos/app-framework/testing';
12
10
  import { Obj } from '@dxos/echo';
13
11
  import { ClientPlugin } from '@dxos/plugin-client';
14
12
  import { PreviewPlugin } from '@dxos/plugin-preview';
15
- import { SpacePlugin } from '@dxos/plugin-space';
16
- import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
17
- import { ThemePlugin } from '@dxos/plugin-theme';
13
+ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
18
14
  import { faker } from '@dxos/random';
19
- import { type Client, useClient } from '@dxos/react-client';
20
- import { Filter, useSpaces, useQuery, Ref, type Space } from '@dxos/react-client/echo';
15
+ import { Filter, Ref, useQuery, useSpaces } from '@dxos/react-client/echo';
16
+ import { withTheme } from '@dxos/react-ui/testing';
21
17
  import { translations as stackTranslations } from '@dxos/react-ui-stack';
22
- import { defaultTx } from '@dxos/react-ui-theme';
23
- import { DataType } from '@dxos/schema';
24
- import { withLayout } from '@dxos/storybook-utils';
18
+ import { Organization, Person } from '@dxos/types';
25
19
 
26
- import { BoardContainer } from './BoardContainer';
27
20
  import { translations } from '../translations';
28
21
  import { Board } from '../types';
29
22
 
30
- faker.seed(0);
23
+ import { BoardContainer } from './BoardContainer';
31
24
 
32
- //
33
- // Initialization utilities
34
- //
25
+ faker.seed(0);
35
26
 
36
- const initializeBoard = async ({ space, client }: { space: Space; client: Client }) => {
37
- // Create a new board
38
- const board = Obj.make(Board.Board, {
27
+ const createBoard = () =>
28
+ Obj.make(Board.Board, {
39
29
  name: 'Test Board',
40
30
  items: [],
41
31
  layout: {
@@ -44,28 +34,20 @@ const initializeBoard = async ({ space, client }: { space: Space; client: Client
44
34
  },
45
35
  });
46
36
 
47
- return { board };
48
- };
49
-
50
- //
51
- // Story components
52
- //
53
-
54
- const rollOrg = () =>
55
- ({
37
+ const createOrg = () =>
38
+ Obj.make(Organization.Organization, {
56
39
  name: faker.commerce.productName(),
57
40
  description: faker.lorem.paragraph(),
58
41
  image: faker.image.url(),
59
42
  website: faker.internet.url(),
60
- status: faker.helpers.arrayElement(DataType.OrganizationStatusOptions).id,
61
- // TODO(thure): Why is this so difficult to type?
62
- }) as unknown as DataType.Organization;
43
+ // TODO(burdon): Fix.
44
+ // status: faker.helpers.arrayElement(Organization.StatusOptions).id,
45
+ });
63
46
 
64
- const StorybookBoard = () => {
65
- const _client = useClient();
47
+ const DefaultStory = () => {
66
48
  const spaces = useSpaces();
67
49
  const space = spaces[spaces.length - 1];
68
- const boards = useQuery(space, Filter.type(Board.Board));
50
+ const boards = useQuery(space?.db, Filter.type(Board.Board));
69
51
  const [board, setBoard] = useState<Board.Board>();
70
52
 
71
53
  useEffect(() => {
@@ -79,64 +61,61 @@ const StorybookBoard = () => {
79
61
  return null;
80
62
  }
81
63
 
82
- return <BoardContainer role='board' board={board} />;
64
+ return <BoardContainer role='board' subject={board} />;
83
65
  };
84
66
 
85
- type StoryProps = {};
86
-
87
67
  //
88
68
  // Story definitions
89
69
  //
90
70
 
91
- const meta: Meta<StoryProps> = {
71
+ const meta = {
92
72
  title: 'plugins/plugin-board/Board',
93
- component: StorybookBoard,
94
- render: () => <StorybookBoard />,
95
- parameters: { translations: [...translations, ...stackTranslations] },
73
+ render: DefaultStory,
96
74
  decorators: [
97
- withLayout({ fullscreen: true }),
75
+ withTheme(),
98
76
  withPluginManager({
99
77
  plugins: [
100
- ThemePlugin({ tx: defaultTx }),
78
+ ...corePlugins(),
101
79
  ClientPlugin({
102
- types: [DataType.Organization, DataType.Person, Board.Board],
103
- onClientInitialized: async (_, client) => {
104
- await client.halo.createIdentity();
105
- const space = await client.spaces.create();
106
- await space.waitUntilReady();
107
- const { board } = await initializeBoard({
108
- space,
109
- client,
110
- });
111
- space.db.add(board);
112
-
113
- // Add some sample items
114
- Array.from({ length: 10 }).map((_, index) => {
115
- const org = Obj.make(DataType.Organization, rollOrg());
116
- space.db.add(org);
117
- board.items.push(Ref.make(org));
118
- board.layout.cells[org.id] = {
119
- x: Math.floor(Math.random() * 5) - 2,
120
- y: Math.floor(Math.random() * 5) - 2,
121
- width: 1,
122
- height: 1,
123
- };
124
- return org;
125
- });
126
- },
80
+ types: [Organization.Organization, Person.Person, Board.Board],
81
+ onClientInitialized: ({ client }) =>
82
+ Effect.gen(function* () {
83
+ yield* Effect.promise(() => client.halo.createIdentity());
84
+ const space = yield* Effect.promise(() => client.spaces.create());
85
+ yield* Effect.promise(() => space.waitUntilReady());
86
+ const board = space.db.add(createBoard());
87
+
88
+ Obj.change(board, (b) => {
89
+ // Add some sample items
90
+ Array.from({ length: 10 }).map(() => {
91
+ const org = createOrg();
92
+ space.db.add(org);
93
+ b.items.push(Ref.make(org));
94
+ b.layout.cells[org.id] = {
95
+ x: Math.floor(Math.random() * 5) - 2,
96
+ y: Math.floor(Math.random() * 5) - 2,
97
+ width: 1,
98
+ height: 1,
99
+ };
100
+ return org;
101
+ });
102
+ });
103
+ }),
127
104
  }),
128
- StorybookLayoutPlugin(),
105
+
106
+ StorybookPlugin({}),
129
107
  PreviewPlugin(),
130
- SpacePlugin(),
131
- IntentPlugin(),
132
- SettingsPlugin(),
133
108
  ],
134
109
  }),
135
110
  ],
111
+ parameters: {
112
+ layout: 'fullscreen',
113
+ translations: [...translations, ...stackTranslations],
114
+ },
136
115
  };
137
116
 
138
117
  export default meta;
139
118
 
140
- type Story = StoryObj<StoryProps>;
119
+ type Story = StoryObj<typeof meta>;
141
120
 
142
121
  export const Default: Story = {};