@dxos/plugin-board 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0
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/chunk-FL67SBF5.mjs +39 -0
- package/dist/lib/browser/chunk-FL67SBF5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +69 -67
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/chunk-5GGKJL4Z.mjs +40 -0
- package/dist/lib/node-esm/chunk-5GGKJL4Z.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +69 -67
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/BoardPlugin.d.ts +2 -1
- package/dist/types/src/BoardPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/BoardContainer/BoardContainer.d.ts +6 -0
- package/dist/types/src/containers/BoardContainer/BoardContainer.d.ts.map +1 -0
- package/dist/types/src/containers/BoardContainer/BoardContainer.stories.d.ts +47 -0
- package/dist/types/src/containers/BoardContainer/BoardContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/BoardContainer/index.d.ts +2 -0
- package/dist/types/src/containers/BoardContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +12 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Board.d.ts +25 -61
- package/dist/types/src/types/Board.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +62 -49
- package/src/BoardPlugin.tsx +37 -42
- package/src/capabilities/index.ts +2 -3
- package/src/capabilities/react-surface.tsx +21 -14
- package/src/components/index.ts +0 -2
- package/src/containers/BoardContainer/BoardContainer.stories.tsx +122 -0
- package/src/{components → containers/BoardContainer}/BoardContainer.tsx +47 -39
- package/src/containers/BoardContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +0 -1
- package/src/meta.ts +3 -3
- package/src/translations.ts +12 -11
- package/src/types/Board.ts +9 -19
- package/dist/lib/browser/chunk-BPWAJIIV.mjs +0 -64
- package/dist/lib/browser/chunk-BPWAJIIV.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q2FY5QDD.mjs +0 -143
- package/dist/lib/browser/chunk-Q2FY5QDD.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-N25TTBCB.mjs +0 -33
- package/dist/lib/browser/intent-resolver-N25TTBCB.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QP64T3BI.mjs +0 -30
- package/dist/lib/browser/react-surface-QP64T3BI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-366TAZLJ.mjs +0 -65
- package/dist/lib/node-esm/chunk-366TAZLJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WG2I3CAR.mjs +0 -145
- package/dist/lib/node-esm/chunk-WG2I3CAR.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IAZULV42.mjs +0 -34
- package/dist/lib/node-esm/intent-resolver-IAZULV42.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-D6JA57PU.mjs +0 -31
- package/dist/lib/node-esm/react-surface-D6JA57PU.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/BoardContainer.d.ts +0 -8
- package/dist/types/src/components/BoardContainer.d.ts.map +0 -1
- package/dist/types/src/components/BoardContainer.stories.d.ts +0 -46
- package/dist/types/src/components/BoardContainer.stories.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -34
- package/src/components/BoardContainer.stories.tsx +0 -125
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
Board_exports
|
|
4
|
-
} from "./chunk-366TAZLJ.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/intent-resolver.ts
|
|
7
|
-
import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
|
|
8
|
-
import { Obj } from "@dxos/echo";
|
|
9
|
-
var intent_resolver_default = (() => [
|
|
10
|
-
contributes(Capabilities.IntentResolver, createResolver({
|
|
11
|
-
intent: Board_exports.Create,
|
|
12
|
-
resolve: ({ name }) => {
|
|
13
|
-
return {
|
|
14
|
-
data: {
|
|
15
|
-
object: Obj.make(Board_exports.Board, {
|
|
16
|
-
name,
|
|
17
|
-
items: [],
|
|
18
|
-
layout: {
|
|
19
|
-
size: {
|
|
20
|
-
width: 5,
|
|
21
|
-
height: 5
|
|
22
|
-
},
|
|
23
|
-
cells: {}
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}))
|
|
30
|
-
]);
|
|
31
|
-
export {
|
|
32
|
-
intent_resolver_default as default
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=intent-resolver-IAZULV42.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { Board } from '../types';\n\nexport default () => [\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: Board.Create,\n resolve: ({ name }) => {\n return {\n data: {\n object: Obj.make(Board.Board, {\n name,\n items: [],\n layout: {\n size: {\n width: 5,\n height: 5,\n },\n cells: {},\n },\n }),\n },\n };\n },\n }),\n ),\n];\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,WAAW;AAIpB,IAAA,2BAAe,MAAM;EACnBC,YACEC,aAAaC,gBACbC,eAAe;IACbC,QAAQC,cAAMC;IACdC,SAAS,CAAC,EAAEC,KAAI,MAAE;AAChB,aAAO;QACLC,MAAM;UACJC,QAAQC,IAAIC,KAAKP,cAAMA,OAAO;YAC5BG;YACAK,OAAO,CAAA;YACPC,QAAQ;cACNC,MAAM;gBACJC,OAAO;gBACPC,QAAQ;cACV;cACAC,OAAO,CAAC;YACV;UACF,CAAA;QACF;MACF;IACF;EACF,CAAA,CAAA;;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "createResolver", "Obj", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "Board", "Create", "resolve", "name", "data", "object", "Obj", "make", "items", "layout", "size", "width", "height", "cells"]
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
BoardContainer
|
|
4
|
-
} from "./chunk-WG2I3CAR.mjs";
|
|
5
|
-
import {
|
|
6
|
-
Board_exports,
|
|
7
|
-
meta
|
|
8
|
-
} from "./chunk-366TAZLJ.mjs";
|
|
9
|
-
|
|
10
|
-
// src/capabilities/react-surface.tsx
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
13
|
-
import { Obj } from "@dxos/echo";
|
|
14
|
-
var react_surface_default = ((context) => contributes(Capabilities.ReactSurface, [
|
|
15
|
-
createSurface({
|
|
16
|
-
id: meta.id,
|
|
17
|
-
role: [
|
|
18
|
-
"article",
|
|
19
|
-
"section"
|
|
20
|
-
],
|
|
21
|
-
filter: (data) => Obj.instanceOf(Board_exports.Board, data.subject),
|
|
22
|
-
component: ({ data, role }) => /* @__PURE__ */ React.createElement(BoardContainer, {
|
|
23
|
-
board: data.subject,
|
|
24
|
-
role
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
]));
|
|
28
|
-
export {
|
|
29
|
-
react_surface_default as default
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=react-surface-D6JA57PU.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, type PluginContext, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { BoardContainer } from '../components';\nimport { meta } from '../meta';\nimport { Board } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: ['article', 'section'],\n filter: (data): data is { subject: Board.Board } => Obj.instanceOf(Board.Board, data.subject),\n component: ({ data, role }) => <BoardContainer board={data.subject} role={role} />,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAkCC,aAAaC,qBAAqB;AAC7E,SAASC,WAAW;AAMpB,IAAA,yBAAe,CAACC,YACdC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAA2CC,IAAIC,WAAWC,cAAMA,OAAOH,KAAKI,OAAO;IAC5FC,WAAW,CAAC,EAAEL,MAAMF,KAAI,MAAO,sBAAA,cAACQ,gBAAAA;MAAeC,OAAOP,KAAKI;MAASN;;EACtE,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "context", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Board", "subject", "component", "BoardContainer", "board"]
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Capabilities } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Capabilities.IntentResolver>>[];
|
|
3
|
-
export default _default;
|
|
4
|
-
//# sourceMappingURL=intent-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,wBAwBE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Board as BoardType } from '../types';
|
|
3
|
-
export type BoardContainerProps = {
|
|
4
|
-
role?: string;
|
|
5
|
-
board: BoardType.Board;
|
|
6
|
-
};
|
|
7
|
-
export declare const BoardContainer: ({ board }: BoardContainerProps) => React.JSX.Element;
|
|
8
|
-
//# sourceMappingURL=BoardContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoardContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/BoardContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiD,MAAM,OAAO,CAAC;AActE,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAQnD,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,WAAW,mBAAmB,sBAkH5D,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Board } from '../types';
|
|
4
|
-
declare const meta: {
|
|
5
|
-
title: string;
|
|
6
|
-
render: () => React.JSX.Element | null;
|
|
7
|
-
decorators: import("@storybook/react").Decorator[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
translations: ({
|
|
11
|
-
readonly 'en-US': {
|
|
12
|
-
readonly [Board
|
|
13
|
-
.Board.typename]: {
|
|
14
|
-
readonly 'typename label': "Board";
|
|
15
|
-
readonly 'typename label_zero': "Boards";
|
|
16
|
-
readonly 'typename label_one': "Board";
|
|
17
|
-
readonly 'typename label_other': "Boards";
|
|
18
|
-
readonly 'object name placeholder': "New board";
|
|
19
|
-
readonly 'rename object label': "Rename board";
|
|
20
|
-
readonly 'delete object label': "Delete board";
|
|
21
|
-
readonly 'object deleted label': "Board deleted";
|
|
22
|
-
};
|
|
23
|
-
readonly [meta.id]: {
|
|
24
|
-
readonly 'plugin name': "Board";
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
} | {
|
|
28
|
-
readonly 'en-US': {
|
|
29
|
-
readonly "react-ui-stack": {
|
|
30
|
-
readonly "resize label": "Drag to resize";
|
|
31
|
-
readonly "drag handle label": "Drag to rearrange";
|
|
32
|
-
readonly "pin start label": "Pin to the left sidebar";
|
|
33
|
-
readonly "pin end label": "Pin to the right sidebar";
|
|
34
|
-
readonly "increment start label": "Move to the left";
|
|
35
|
-
readonly "increment end label": "Move to the right";
|
|
36
|
-
readonly "close label": "Close";
|
|
37
|
-
readonly "minify label": "Minify";
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
})[];
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export default meta;
|
|
44
|
-
type Story = StoryObj<typeof meta>;
|
|
45
|
-
export declare const Default: Story;
|
|
46
|
-
//# sourceMappingURL=BoardContainer.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoardContainer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/BoardContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAkDjC,QAAA,MAAM,IAAI;;;;;;;;yBAlE4C,CAAQ,KAAK;qBACnE,KAAK,CAAE,QAAO,CAAC;;;;;;;;;;yBAOf,CAAO,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;CAuGd,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
-
import { Obj } from '@dxos/echo';
|
|
7
|
-
|
|
8
|
-
import { Board } from '../types';
|
|
9
|
-
|
|
10
|
-
export default () => [
|
|
11
|
-
contributes(
|
|
12
|
-
Capabilities.IntentResolver,
|
|
13
|
-
createResolver({
|
|
14
|
-
intent: Board.Create,
|
|
15
|
-
resolve: ({ name }) => {
|
|
16
|
-
return {
|
|
17
|
-
data: {
|
|
18
|
-
object: Obj.make(Board.Board, {
|
|
19
|
-
name,
|
|
20
|
-
items: [],
|
|
21
|
-
layout: {
|
|
22
|
-
size: {
|
|
23
|
-
width: 5,
|
|
24
|
-
height: 5,
|
|
25
|
-
},
|
|
26
|
-
cells: {},
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
}),
|
|
33
|
-
),
|
|
34
|
-
];
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
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';
|
|
13
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
14
|
-
import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
|
|
15
|
-
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
16
|
-
import { faker } from '@dxos/random';
|
|
17
|
-
import { Filter, Ref, useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
18
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
19
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
20
|
-
import { defaultTx } from '@dxos/react-ui-theme';
|
|
21
|
-
import { Organization, Person } from '@dxos/types';
|
|
22
|
-
|
|
23
|
-
import { translations } from '../translations';
|
|
24
|
-
import { Board } from '../types';
|
|
25
|
-
|
|
26
|
-
import { BoardContainer } from './BoardContainer';
|
|
27
|
-
|
|
28
|
-
faker.seed(0);
|
|
29
|
-
|
|
30
|
-
const createBoard = () =>
|
|
31
|
-
Obj.make(Board.Board, {
|
|
32
|
-
name: 'Test Board',
|
|
33
|
-
items: [],
|
|
34
|
-
layout: {
|
|
35
|
-
size: { width: 7, height: 5 },
|
|
36
|
-
cells: {},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const createOrg = () =>
|
|
41
|
-
Obj.make(Organization.Organization, {
|
|
42
|
-
name: faker.commerce.productName(),
|
|
43
|
-
description: faker.lorem.paragraph(),
|
|
44
|
-
image: faker.image.url(),
|
|
45
|
-
website: faker.internet.url(),
|
|
46
|
-
// TODO(burdon): Fix.
|
|
47
|
-
// status: faker.helpers.arrayElement(Organization.StatusOptions).id,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const DefaultStory = () => {
|
|
51
|
-
const spaces = useSpaces();
|
|
52
|
-
const space = spaces[spaces.length - 1];
|
|
53
|
-
const boards = useQuery(space, Filter.type(Board.Board));
|
|
54
|
-
const [board, setBoard] = useState<Board.Board>();
|
|
55
|
-
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
if (boards.length && !board) {
|
|
58
|
-
const board = boards[0];
|
|
59
|
-
setBoard(board);
|
|
60
|
-
}
|
|
61
|
-
}, [boards]);
|
|
62
|
-
|
|
63
|
-
if (!board) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return <BoardContainer role='board' board={board} />;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
// Story definitions
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
const meta = {
|
|
75
|
-
title: 'plugins/plugin-board/Board',
|
|
76
|
-
render: DefaultStory,
|
|
77
|
-
decorators: [
|
|
78
|
-
withTheme,
|
|
79
|
-
withPluginManager({
|
|
80
|
-
plugins: [
|
|
81
|
-
ClientPlugin({
|
|
82
|
-
types: [Organization.Organization, Person.Person, Board.Board],
|
|
83
|
-
onClientInitialized: async ({ client }) => {
|
|
84
|
-
await client.halo.createIdentity();
|
|
85
|
-
const space = await client.spaces.create();
|
|
86
|
-
await space.waitUntilReady();
|
|
87
|
-
const board = space.db.add(createBoard());
|
|
88
|
-
|
|
89
|
-
// Add some sample items
|
|
90
|
-
Array.from({ length: 10 }).map(() => {
|
|
91
|
-
const org = createOrg();
|
|
92
|
-
space.db.add(org);
|
|
93
|
-
board.items.push(Ref.make(org));
|
|
94
|
-
board.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
|
-
}),
|
|
104
|
-
SpacePlugin({}),
|
|
105
|
-
IntentPlugin(),
|
|
106
|
-
SettingsPlugin(),
|
|
107
|
-
|
|
108
|
-
// UI
|
|
109
|
-
ThemePlugin({ tx: defaultTx }),
|
|
110
|
-
PreviewPlugin(),
|
|
111
|
-
StorybookLayoutPlugin({}),
|
|
112
|
-
],
|
|
113
|
-
}),
|
|
114
|
-
],
|
|
115
|
-
parameters: {
|
|
116
|
-
layout: 'fullscreen',
|
|
117
|
-
translations: [...translations, ...stackTranslations],
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export default meta;
|
|
122
|
-
|
|
123
|
-
type Story = StoryObj<typeof meta>;
|
|
124
|
-
|
|
125
|
-
export const Default: Story = {};
|