@dxos/plugin-board 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
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/BoardPlugin-MKXIWHZQ.mjs +50 -0
- package/dist/lib/browser/BoardPlugin-MKXIWHZQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -60
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +29 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +31 -2
- package/dist/lib/browser/types/index.mjs.map +4 -4
- package/dist/lib/node-esm/BoardPlugin-FQMGBWI6.mjs +51 -0
- package/dist/lib/node-esm/BoardPlugin-FQMGBWI6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +19 -60
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +30 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +31 -2
- package/dist/lib/node-esm/types/index.mjs.map +4 -4
- package/dist/types/src/BoardPlugin.d.ts +1 -0
- package/dist/types/src/BoardPlugin.d.ts.map +1 -1
- package/dist/types/src/BoardPlugin.test.d.ts +2 -0
- package/dist/types/src/BoardPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +2 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- 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 +54 -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 +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +22 -14
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Board.d.ts +3 -3
- package/dist/types/src/types/Board.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +61 -49
- package/src/BoardPlugin.test.ts +27 -0
- package/src/BoardPlugin.tsx +29 -14
- package/src/capabilities/index.ts +3 -1
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/components/index.ts +0 -2
- package/src/{components → containers/BoardContainer}/BoardContainer.stories.tsx +19 -18
- package/src/{components → containers/BoardContainer}/BoardContainer.tsx +72 -39
- package/src/containers/BoardContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +6 -4
- package/src/meta.ts +1 -1
- package/src/translations.ts +12 -11
- package/src/types/Board.ts +7 -3
- package/dist/lib/browser/chunk-2XGWSTZV.mjs +0 -159
- package/dist/lib/browser/chunk-2XGWSTZV.mjs.map +0 -7
- package/dist/lib/browser/chunk-7VKDDGS7.mjs +0 -36
- package/dist/lib/browser/chunk-7VKDDGS7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BEYXCLXI.mjs +0 -31
- package/dist/lib/browser/react-surface-BEYXCLXI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JKPYRS2Z.mjs +0 -161
- package/dist/lib/node-esm/chunk-JKPYRS2Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UGVRNKWV.mjs +0 -37
- package/dist/lib/node-esm/chunk-UGVRNKWV.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ZFKFUBJM.mjs +0 -32
- package/dist/lib/node-esm/react-surface-ZFKFUBJM.mjs.map +0 -7
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/BoardContainer.d.ts +0 -6
- package/dist/types/src/components/BoardContainer.d.ts.map +0 -1
- package/dist/types/src/components/BoardContainer.stories.d.ts +0 -45
- package/dist/types/src/components/BoardContainer.stories.d.ts.map +0 -1
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -26
package/src/types/Board.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Obj, Type } from '@dxos/echo';
|
|
7
|
+
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
8
8
|
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
|
|
9
9
|
import { BoardLayout, defaultLayout } from '@dxos/react-ui-board';
|
|
10
10
|
|
|
@@ -13,14 +13,18 @@ import { BoardLayout, defaultLayout } from '@dxos/react-ui-board';
|
|
|
13
13
|
*/
|
|
14
14
|
export const Board = Schema.Struct({
|
|
15
15
|
name: Schema.String.pipe(Schema.optional),
|
|
16
|
-
items:
|
|
16
|
+
items: Ref.Ref(Obj.Unknown).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
17
17
|
layout: BoardLayout.pipe(FormInputAnnotation.set(false)),
|
|
18
18
|
}).pipe(
|
|
19
19
|
Type.object({
|
|
20
|
-
typename: 'dxos.
|
|
20
|
+
typename: 'org.dxos.type.board',
|
|
21
21
|
version: '0.1.0',
|
|
22
22
|
}),
|
|
23
23
|
LabelAnnotation.set(['name']),
|
|
24
|
+
Annotation.IconAnnotation.set({
|
|
25
|
+
icon: 'ph--squares-four--regular',
|
|
26
|
+
hue: 'green',
|
|
27
|
+
}),
|
|
24
28
|
);
|
|
25
29
|
|
|
26
30
|
export interface Board extends Schema.Schema.Type<typeof Board> {}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// src/components/BoardContainer.tsx
|
|
2
|
-
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { Surface } from "@dxos/app-framework/react";
|
|
4
|
-
import { Filter, Obj, Ref } from "@dxos/echo";
|
|
5
|
-
import { useObject, useObjects } from "@dxos/echo-react";
|
|
6
|
-
import { invariant } from "@dxos/invariant";
|
|
7
|
-
import { useQuery } from "@dxos/react-client/echo";
|
|
8
|
-
import { useAttention } from "@dxos/react-ui-attention";
|
|
9
|
-
import { Board } from "@dxos/react-ui-board";
|
|
10
|
-
import { ObjectPicker } from "@dxos/react-ui-form";
|
|
11
|
-
import { Layout } from "@dxos/react-ui-mosaic";
|
|
12
|
-
import { isNonNullable } from "@dxos/util";
|
|
13
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-board/src/components/BoardContainer.tsx";
|
|
14
|
-
var DEFAULT_POSITION = {
|
|
15
|
-
x: 0,
|
|
16
|
-
y: 0
|
|
17
|
-
};
|
|
18
|
-
var BoardContainer = ({ role, subject: board }) => {
|
|
19
|
-
const controller = useRef(null);
|
|
20
|
-
const [boardItems] = useObject(board, "items");
|
|
21
|
-
const items = useObjects(boardItems ?? []);
|
|
22
|
-
const addTriggerRef = useRef(null);
|
|
23
|
-
const [pickerState, setPickerState] = useState(null);
|
|
24
|
-
const attendableId = Obj.getDXN(board).toString();
|
|
25
|
-
const { hasAttention } = useAttention(attendableId);
|
|
26
|
-
const db = Obj.getDatabase(board);
|
|
27
|
-
const objects = useQuery(db, Filter.everything());
|
|
28
|
-
const options = useMemo(() => objects.filter((obj) => obj.id !== board.id).map((obj) => {
|
|
29
|
-
const label = Obj.getLabel(obj);
|
|
30
|
-
if (label) {
|
|
31
|
-
return {
|
|
32
|
-
id: obj.id,
|
|
33
|
-
label,
|
|
34
|
-
hue: "neutral"
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}).filter(isNonNullable).sort(({ label: a }, { label: b }) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())), [
|
|
38
|
-
objects
|
|
39
|
-
]);
|
|
40
|
-
const handleAdd = useCallback(async (anchor, position = DEFAULT_POSITION) => {
|
|
41
|
-
const db2 = Obj.getDatabase(board);
|
|
42
|
-
invariant(db2, void 0, {
|
|
43
|
-
F: __dxlog_file,
|
|
44
|
-
L: 62,
|
|
45
|
-
S: void 0,
|
|
46
|
-
A: [
|
|
47
|
-
"db",
|
|
48
|
-
""
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
addTriggerRef.current = anchor;
|
|
52
|
-
setPickerState({
|
|
53
|
-
position
|
|
54
|
-
});
|
|
55
|
-
}, [
|
|
56
|
-
board
|
|
57
|
-
]);
|
|
58
|
-
const handleDelete = useCallback((id) => {
|
|
59
|
-
const idx = board.items.findIndex((ref) => ref.dxn.asEchoDXN()?.echoId === id);
|
|
60
|
-
Obj.change(board, (b) => {
|
|
61
|
-
if (idx !== -1) {
|
|
62
|
-
b.items.splice(idx, 1);
|
|
63
|
-
}
|
|
64
|
-
delete b.layout.cells[id];
|
|
65
|
-
});
|
|
66
|
-
}, [
|
|
67
|
-
board
|
|
68
|
-
]);
|
|
69
|
-
const handleMove = useCallback((id, position) => {
|
|
70
|
-
const layout = board.layout.cells[id];
|
|
71
|
-
Obj.change(board, (b) => {
|
|
72
|
-
b.layout.cells[id] = {
|
|
73
|
-
...layout,
|
|
74
|
-
...position
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
}, [
|
|
78
|
-
board
|
|
79
|
-
]);
|
|
80
|
-
const handleSelect = useCallback((id) => {
|
|
81
|
-
if (!pickerState) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const selectedObject = objects.find((obj) => obj.id === id);
|
|
85
|
-
if (!Obj.isObject(selectedObject)) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
Obj.change(board, (b) => {
|
|
89
|
-
b.items.push(Ref.make(selectedObject));
|
|
90
|
-
b.layout.cells[selectedObject.id.toString()] = pickerState.position;
|
|
91
|
-
});
|
|
92
|
-
setPickerState(null);
|
|
93
|
-
}, [
|
|
94
|
-
pickerState,
|
|
95
|
-
objects,
|
|
96
|
-
board
|
|
97
|
-
]);
|
|
98
|
-
return /* @__PURE__ */ React.createElement(Board.Root, {
|
|
99
|
-
ref: controller,
|
|
100
|
-
layout: board.layout,
|
|
101
|
-
onAdd: handleAdd,
|
|
102
|
-
onDelete: handleDelete,
|
|
103
|
-
onMove: handleMove
|
|
104
|
-
}, /* @__PURE__ */ React.createElement(ObjectPicker.Root, {
|
|
105
|
-
open: !!pickerState,
|
|
106
|
-
onOpenChange: (nextOpen) => {
|
|
107
|
-
setPickerState(nextOpen ? {
|
|
108
|
-
position: DEFAULT_POSITION
|
|
109
|
-
} : null);
|
|
110
|
-
}
|
|
111
|
-
}, /* @__PURE__ */ React.createElement(Layout.Main, {
|
|
112
|
-
role,
|
|
113
|
-
toolbar: true
|
|
114
|
-
}, /* @__PURE__ */ React.createElement(Board.Toolbar, {
|
|
115
|
-
disabled: !hasAttention
|
|
116
|
-
}), /* @__PURE__ */ React.createElement(Board.Container, null, /* @__PURE__ */ React.createElement(Board.Viewport, {
|
|
117
|
-
classNames: "border-none"
|
|
118
|
-
}, /* @__PURE__ */ React.createElement(Board.Backdrop, null), /* @__PURE__ */ React.createElement(Board.Content, null, items?.map((item, index) => /* @__PURE__ */ React.createElement(Board.Cell, {
|
|
119
|
-
item,
|
|
120
|
-
key: index,
|
|
121
|
-
layout: board.layout?.cells[item.id] ?? {
|
|
122
|
-
x: 0,
|
|
123
|
-
y: 0
|
|
124
|
-
}
|
|
125
|
-
}, /* @__PURE__ */ React.createElement(Surface, {
|
|
126
|
-
role: "card--content",
|
|
127
|
-
data: {
|
|
128
|
-
subject: item
|
|
129
|
-
},
|
|
130
|
-
limit: 1
|
|
131
|
-
}))))))), /* @__PURE__ */ React.createElement(ObjectPicker.Content, {
|
|
132
|
-
options,
|
|
133
|
-
onSelect: handleSelect,
|
|
134
|
-
classNames: "popover-card-width"
|
|
135
|
-
}), /* @__PURE__ */ React.createElement(ObjectPicker.VirtualTrigger, {
|
|
136
|
-
virtualRef: addTriggerRef
|
|
137
|
-
})));
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// src/meta.ts
|
|
141
|
-
import { trim } from "@dxos/util";
|
|
142
|
-
var meta = {
|
|
143
|
-
id: "dxos.org/plugin/board",
|
|
144
|
-
name: "Board",
|
|
145
|
-
description: trim`
|
|
146
|
-
Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.
|
|
147
|
-
Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.
|
|
148
|
-
`,
|
|
149
|
-
icon: "ph--squares-four--regular",
|
|
150
|
-
iconHue: "green",
|
|
151
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board",
|
|
152
|
-
screenshots: []
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export {
|
|
156
|
-
BoardContainer,
|
|
157
|
-
meta
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=chunk-2XGWSTZV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/BoardContainer.tsx", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';\nimport { Filter, Obj, Ref } from '@dxos/echo';\nimport { useObject, useObjects } from '@dxos/echo-react';\nimport { invariant } from '@dxos/invariant';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { Board, type BoardController, type BoardRootProps, type Position } from '@dxos/react-ui-board';\nimport { ObjectPicker, type ObjectPickerContentProps } from '@dxos/react-ui-form';\nimport { Layout } from '@dxos/react-ui-mosaic';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type Board as BoardType } from '../types';\n\nconst DEFAULT_POSITION = { x: 0, y: 0 } satisfies Position;\n\ntype PickerState = {\n position: Position;\n};\n\nexport type BoardContainerProps = SurfaceComponentProps<BoardType.Board>;\n\nexport const BoardContainer = ({ role, subject: board }: BoardContainerProps) => {\n const controller = useRef<BoardController>(null);\n const [boardItems] = useObject(board, 'items');\n const items = useObjects(boardItems ?? []);\n const addTriggerRef = useRef<HTMLButtonElement | null>(null);\n const [pickerState, setPickerState] = useState<PickerState | null>(null);\n const attendableId = Obj.getDXN(board).toString();\n const { hasAttention } = useAttention(attendableId);\n\n const db = Obj.getDatabase(board);\n // TODO(burdon): Use search.\n const objects = useQuery(db, Filter.everything());\n const options = useMemo<ObjectPickerContentProps['options']>(\n () =>\n objects\n .filter((obj) => obj.id !== board.id)\n .map((obj) => {\n const label = Obj.getLabel(obj);\n if (label) {\n return {\n id: obj.id,\n label,\n hue: 'neutral' as const,\n };\n }\n })\n .filter(isNonNullable)\n .sort(({ label: a }, { label: b }) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())),\n [objects],\n );\n\n const handleAdd = useCallback<NonNullable<BoardRootProps['onAdd']>>(\n async (anchor, position = DEFAULT_POSITION) => {\n const db = Obj.getDatabase(board);\n invariant(db);\n addTriggerRef.current = anchor;\n setPickerState({\n position,\n });\n },\n [board],\n );\n\n // TODO(burdon): Use intents so can be undone.\n const handleDelete = useCallback<NonNullable<BoardRootProps['onDelete']>>(\n (id) => {\n // TODO(burdon): Impl. DXN.equals and pass in DXN from `id`.\n const idx = board.items.findIndex((ref) => ref.dxn.asEchoDXN()?.echoId === id);\n Obj.change(board, (b) => {\n if (idx !== -1) {\n b.items.splice(idx, 1);\n }\n delete b.layout.cells[id];\n });\n },\n [board],\n );\n\n const handleMove = useCallback<NonNullable<BoardRootProps['onMove']>>(\n (id, position) => {\n const layout = board.layout.cells[id];\n Obj.change(board, (b) => {\n b.layout.cells[id] = { ...layout, ...position };\n });\n },\n [board],\n );\n\n const handleSelect = useCallback<NonNullable<ObjectPickerContentProps['onSelect']>>(\n (id) => {\n if (!pickerState) {\n return;\n }\n\n // Find the selected object by id from the space.\n const selectedObject = objects.find((obj) => obj.id === id);\n if (!Obj.isObject(selectedObject)) {\n return;\n }\n\n // Create a reference to the selected object and add it to the board.\n Obj.change(board, (b) => {\n b.items.push(Ref.make(selectedObject));\n\n // Set the layout position for the new item.\n b.layout.cells[selectedObject.id.toString()] = pickerState.position;\n });\n\n // Close the picker.\n setPickerState(null);\n },\n [pickerState, objects, board],\n );\n\n return (\n <Board.Root ref={controller} layout={board.layout} onAdd={handleAdd} onDelete={handleDelete} onMove={handleMove}>\n <ObjectPicker.Root\n open={!!pickerState}\n onOpenChange={(nextOpen: boolean) => {\n setPickerState(nextOpen ? { position: DEFAULT_POSITION } : null);\n }}\n >\n <Layout.Main role={role} toolbar>\n <Board.Toolbar disabled={!hasAttention} />\n <Board.Container>\n <Board.Viewport classNames='border-none'>\n <Board.Backdrop />\n <Board.Content>\n {items?.map((item, index) => (\n <Board.Cell item={item} key={index} layout={board.layout?.cells[item.id] ?? { x: 0, y: 0 }}>\n <Surface role='card--content' data={{ subject: item }} limit={1} />\n </Board.Cell>\n ))}\n </Board.Content>\n </Board.Viewport>\n </Board.Container>\n </Layout.Main>\n <ObjectPicker.Content options={options} onSelect={handleSelect} classNames='popover-card-width' />\n <ObjectPicker.VirtualTrigger virtualRef={addTriggerRef} />\n </ObjectPicker.Root>\n </Board.Root>\n );\n};\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: 'dxos.org/plugin/board',\n name: 'Board',\n description: trim`\n Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.\n Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.\n `,\n icon: 'ph--squares-four--regular',\n iconHue: 'green',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board',\n screenshots: [],\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,OAAOA,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,eAA2C;AACpD,SAASC,QAAQC,KAAKC,WAAW;AACjC,SAASC,WAAWC,kBAAkB;AACtC,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,oBAAoB;AAC7B,SAASC,aAAuE;AAChF,SAASC,oBAAmD;AAC5D,SAASC,cAAc;AACvB,SAASC,qBAAqB;;AAI9B,IAAMC,mBAAmB;EAAEC,GAAG;EAAGC,GAAG;AAAE;AAQ/B,IAAMC,iBAAiB,CAAC,EAAEC,MAAMC,SAASC,MAAK,MAAuB;AAC1E,QAAMC,aAAatB,OAAwB,IAAA;AAC3C,QAAM,CAACuB,UAAAA,IAAcjB,UAAUe,OAAO,OAAA;AACtC,QAAMG,QAAQjB,WAAWgB,cAAc,CAAA,CAAE;AACzC,QAAME,gBAAgBzB,OAAiC,IAAA;AACvD,QAAM,CAAC0B,aAAaC,cAAAA,IAAkB1B,SAA6B,IAAA;AACnE,QAAM2B,eAAexB,IAAIyB,OAAOR,KAAAA,EAAOS,SAAQ;AAC/C,QAAM,EAAEC,aAAY,IAAKrB,aAAakB,YAAAA;AAEtC,QAAMI,KAAK5B,IAAI6B,YAAYZ,KAAAA;AAE3B,QAAMa,UAAUzB,SAASuB,IAAI7B,OAAOgC,WAAU,CAA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;IAAE;KACvF,sBAAA,cAACf,SAAAA;IAAQiB,MAAK;IAAgBwE,MAAM;MAAEvE,SAASmE;IAAK;IAAGK,OAAO;YAO1E,sBAAA,cAAChF,aAAa0E,SAAO;IAAClD;IAAkByD,UAAU5B;IAAcmB,YAAW;MAC3E,sBAAA,cAACxE,aAAakF,gBAAc;IAACC,YAAYtE;;AAIjD;;;AChJA,SAASuE,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "useRef", "useState", "Surface", "Filter", "Obj", "Ref", "useObject", "useObjects", "invariant", "useQuery", "useAttention", "Board", "ObjectPicker", "Layout", "isNonNullable", "DEFAULT_POSITION", "x", "y", "BoardContainer", "role", "subject", "board", "controller", "boardItems", "items", "addTriggerRef", "pickerState", "setPickerState", "attendableId", "getDXN", "toString", "hasAttention", "db", "getDatabase", "objects", "everything", "options", "filter", "obj", "id", "map", "label", "getLabel", "hue", "sort", "a", "b", "toLocaleLowerCase", "localeCompare", "handleAdd", "anchor", "position", "current", "handleDelete", "idx", "findIndex", "ref", "dxn", "asEchoDXN", "echoId", "change", "splice", "layout", "cells", "handleMove", "handleSelect", "selectedObject", "find", "isObject", "push", "make", "Root", "onAdd", "onDelete", "onMove", "open", "onOpenChange", "nextOpen", "Main", "toolbar", "Toolbar", "disabled", "Container", "Viewport", "classNames", "Backdrop", "Content", "item", "index", "Cell", "key", "data", "limit", "onSelect", "VirtualTrigger", "virtualRef", "trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "screenshots"]
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// src/types/Board.ts
|
|
8
|
-
var Board_exports = {};
|
|
9
|
-
__export(Board_exports, {
|
|
10
|
-
Board: () => Board,
|
|
11
|
-
makeBoard: () => makeBoard
|
|
12
|
-
});
|
|
13
|
-
import * as Schema from "effect/Schema";
|
|
14
|
-
import { Obj, Type } from "@dxos/echo";
|
|
15
|
-
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
16
|
-
import { BoardLayout, defaultLayout } from "@dxos/react-ui-board";
|
|
17
|
-
var Board = Schema.Struct({
|
|
18
|
-
name: Schema.String.pipe(Schema.optional),
|
|
19
|
-
items: Type.Ref(Type.Obj).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
20
|
-
layout: BoardLayout.pipe(FormInputAnnotation.set(false))
|
|
21
|
-
}).pipe(Type.object({
|
|
22
|
-
typename: "dxos.org/type/Board",
|
|
23
|
-
version: "0.1.0"
|
|
24
|
-
}), LabelAnnotation.set([
|
|
25
|
-
"name"
|
|
26
|
-
]));
|
|
27
|
-
var makeBoard = (props = {}) => Obj.make(Board, {
|
|
28
|
-
items: [],
|
|
29
|
-
layout: defaultLayout,
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
Board_exports
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-7VKDDGS7.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/Board.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { BoardLayout, defaultLayout } from '@dxos/react-ui-board';\n\n/**\n * Board and layout.\n */\nexport const Board = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n items: Type.Ref(Type.Obj).pipe(Schema.Array, FormInputAnnotation.set(false)),\n layout: BoardLayout.pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Board',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n\nexport interface Board extends Schema.Schema.Type<typeof Board> {}\n\nexport const makeBoard = (props: Partial<Obj.MakeProps<typeof Board>> = {}) =>\n Obj.make(Board, {\n items: [],\n layout: defaultLayout,\n ...props,\n });\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAY;AAC1B,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,aAAaC,qBAAqB;AAKpC,IAAMC,QAAeC,cAAO;EACjCC,MAAaC,cAAOC,KAAYC,eAAQ;EACxCC,OAAOC,KAAKC,IAAID,KAAKE,GAAG,EAAEL,KAAYM,cAAOC,oBAAoBC,IAAI,KAAA,CAAA;EACrEC,QAAQC,YAAYV,KAAKO,oBAAoBC,IAAI,KAAA,CAAA;AACnD,CAAA,EAAGR,KACDG,KAAKQ,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBN,IAAI;EAAC;CAAO,CAAA;AAKvB,IAAMO,YAAY,CAACC,QAA8C,CAAC,MACvEX,IAAIY,KAAKrB,OAAO;EACdM,OAAO,CAAA;EACPO,QAAQS;EACR,GAAGF;AACL,CAAA;",
|
|
6
|
-
"names": ["Schema", "Obj", "Type", "FormInputAnnotation", "LabelAnnotation", "BoardLayout", "defaultLayout", "Board", "Struct", "name", "String", "pipe", "optional", "items", "Type", "Ref", "Obj", "Array", "FormInputAnnotation", "set", "layout", "BoardLayout", "object", "typename", "version", "LabelAnnotation", "makeBoard", "props", "make", "defaultLayout"]
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BoardContainer,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-2XGWSTZV.mjs";
|
|
5
|
-
import {
|
|
6
|
-
Board_exports
|
|
7
|
-
} from "./chunk-7VKDDGS7.mjs";
|
|
8
|
-
|
|
9
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
10
|
-
import * as Effect from "effect/Effect";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
13
|
-
import { Obj } from "@dxos/echo";
|
|
14
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, [
|
|
15
|
-
Common.createSurface({
|
|
16
|
-
id: meta.id,
|
|
17
|
-
role: [
|
|
18
|
-
"article",
|
|
19
|
-
"section"
|
|
20
|
-
],
|
|
21
|
-
filter: (data) => Obj.instanceOf(Board_exports.Board, data.subject),
|
|
22
|
-
component: ({ role, data }) => /* @__PURE__ */ React.createElement(BoardContainer, {
|
|
23
|
-
role,
|
|
24
|
-
subject: data.subject
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
])));
|
|
28
|
-
export {
|
|
29
|
-
react_surface_default as default
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=react-surface-BEYXCLXI.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } 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 Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.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: ({ role, data }) => <BoardContainer role={role} subject={data.subject} />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,WAAW;AAMpB,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAA2CC,IAAIC,WAAWC,cAAMA,OAAOH,KAAKI,OAAO;IAC5FC,WAAW,CAAC,EAAEP,MAAME,KAAI,MAAO,sBAAA,cAACM,gBAAAA;MAAeR;MAAYM,SAASJ,KAAKI;;EAC3E,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Obj", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Board", "subject", "component", "BoardContainer"]
|
|
7
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/components/BoardContainer.tsx
|
|
4
|
-
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
5
|
-
import { Surface } from "@dxos/app-framework/react";
|
|
6
|
-
import { Filter, Obj, Ref } from "@dxos/echo";
|
|
7
|
-
import { useObject, useObjects } from "@dxos/echo-react";
|
|
8
|
-
import { invariant } from "@dxos/invariant";
|
|
9
|
-
import { useQuery } from "@dxos/react-client/echo";
|
|
10
|
-
import { useAttention } from "@dxos/react-ui-attention";
|
|
11
|
-
import { Board } from "@dxos/react-ui-board";
|
|
12
|
-
import { ObjectPicker } from "@dxos/react-ui-form";
|
|
13
|
-
import { Layout } from "@dxos/react-ui-mosaic";
|
|
14
|
-
import { isNonNullable } from "@dxos/util";
|
|
15
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-board/src/components/BoardContainer.tsx";
|
|
16
|
-
var DEFAULT_POSITION = {
|
|
17
|
-
x: 0,
|
|
18
|
-
y: 0
|
|
19
|
-
};
|
|
20
|
-
var BoardContainer = ({ role, subject: board }) => {
|
|
21
|
-
const controller = useRef(null);
|
|
22
|
-
const [boardItems] = useObject(board, "items");
|
|
23
|
-
const items = useObjects(boardItems ?? []);
|
|
24
|
-
const addTriggerRef = useRef(null);
|
|
25
|
-
const [pickerState, setPickerState] = useState(null);
|
|
26
|
-
const attendableId = Obj.getDXN(board).toString();
|
|
27
|
-
const { hasAttention } = useAttention(attendableId);
|
|
28
|
-
const db = Obj.getDatabase(board);
|
|
29
|
-
const objects = useQuery(db, Filter.everything());
|
|
30
|
-
const options = useMemo(() => objects.filter((obj) => obj.id !== board.id).map((obj) => {
|
|
31
|
-
const label = Obj.getLabel(obj);
|
|
32
|
-
if (label) {
|
|
33
|
-
return {
|
|
34
|
-
id: obj.id,
|
|
35
|
-
label,
|
|
36
|
-
hue: "neutral"
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}).filter(isNonNullable).sort(({ label: a }, { label: b }) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())), [
|
|
40
|
-
objects
|
|
41
|
-
]);
|
|
42
|
-
const handleAdd = useCallback(async (anchor, position = DEFAULT_POSITION) => {
|
|
43
|
-
const db2 = Obj.getDatabase(board);
|
|
44
|
-
invariant(db2, void 0, {
|
|
45
|
-
F: __dxlog_file,
|
|
46
|
-
L: 62,
|
|
47
|
-
S: void 0,
|
|
48
|
-
A: [
|
|
49
|
-
"db",
|
|
50
|
-
""
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
addTriggerRef.current = anchor;
|
|
54
|
-
setPickerState({
|
|
55
|
-
position
|
|
56
|
-
});
|
|
57
|
-
}, [
|
|
58
|
-
board
|
|
59
|
-
]);
|
|
60
|
-
const handleDelete = useCallback((id) => {
|
|
61
|
-
const idx = board.items.findIndex((ref) => ref.dxn.asEchoDXN()?.echoId === id);
|
|
62
|
-
Obj.change(board, (b) => {
|
|
63
|
-
if (idx !== -1) {
|
|
64
|
-
b.items.splice(idx, 1);
|
|
65
|
-
}
|
|
66
|
-
delete b.layout.cells[id];
|
|
67
|
-
});
|
|
68
|
-
}, [
|
|
69
|
-
board
|
|
70
|
-
]);
|
|
71
|
-
const handleMove = useCallback((id, position) => {
|
|
72
|
-
const layout = board.layout.cells[id];
|
|
73
|
-
Obj.change(board, (b) => {
|
|
74
|
-
b.layout.cells[id] = {
|
|
75
|
-
...layout,
|
|
76
|
-
...position
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}, [
|
|
80
|
-
board
|
|
81
|
-
]);
|
|
82
|
-
const handleSelect = useCallback((id) => {
|
|
83
|
-
if (!pickerState) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const selectedObject = objects.find((obj) => obj.id === id);
|
|
87
|
-
if (!Obj.isObject(selectedObject)) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
Obj.change(board, (b) => {
|
|
91
|
-
b.items.push(Ref.make(selectedObject));
|
|
92
|
-
b.layout.cells[selectedObject.id.toString()] = pickerState.position;
|
|
93
|
-
});
|
|
94
|
-
setPickerState(null);
|
|
95
|
-
}, [
|
|
96
|
-
pickerState,
|
|
97
|
-
objects,
|
|
98
|
-
board
|
|
99
|
-
]);
|
|
100
|
-
return /* @__PURE__ */ React.createElement(Board.Root, {
|
|
101
|
-
ref: controller,
|
|
102
|
-
layout: board.layout,
|
|
103
|
-
onAdd: handleAdd,
|
|
104
|
-
onDelete: handleDelete,
|
|
105
|
-
onMove: handleMove
|
|
106
|
-
}, /* @__PURE__ */ React.createElement(ObjectPicker.Root, {
|
|
107
|
-
open: !!pickerState,
|
|
108
|
-
onOpenChange: (nextOpen) => {
|
|
109
|
-
setPickerState(nextOpen ? {
|
|
110
|
-
position: DEFAULT_POSITION
|
|
111
|
-
} : null);
|
|
112
|
-
}
|
|
113
|
-
}, /* @__PURE__ */ React.createElement(Layout.Main, {
|
|
114
|
-
role,
|
|
115
|
-
toolbar: true
|
|
116
|
-
}, /* @__PURE__ */ React.createElement(Board.Toolbar, {
|
|
117
|
-
disabled: !hasAttention
|
|
118
|
-
}), /* @__PURE__ */ React.createElement(Board.Container, null, /* @__PURE__ */ React.createElement(Board.Viewport, {
|
|
119
|
-
classNames: "border-none"
|
|
120
|
-
}, /* @__PURE__ */ React.createElement(Board.Backdrop, null), /* @__PURE__ */ React.createElement(Board.Content, null, items?.map((item, index) => /* @__PURE__ */ React.createElement(Board.Cell, {
|
|
121
|
-
item,
|
|
122
|
-
key: index,
|
|
123
|
-
layout: board.layout?.cells[item.id] ?? {
|
|
124
|
-
x: 0,
|
|
125
|
-
y: 0
|
|
126
|
-
}
|
|
127
|
-
}, /* @__PURE__ */ React.createElement(Surface, {
|
|
128
|
-
role: "card--content",
|
|
129
|
-
data: {
|
|
130
|
-
subject: item
|
|
131
|
-
},
|
|
132
|
-
limit: 1
|
|
133
|
-
}))))))), /* @__PURE__ */ React.createElement(ObjectPicker.Content, {
|
|
134
|
-
options,
|
|
135
|
-
onSelect: handleSelect,
|
|
136
|
-
classNames: "popover-card-width"
|
|
137
|
-
}), /* @__PURE__ */ React.createElement(ObjectPicker.VirtualTrigger, {
|
|
138
|
-
virtualRef: addTriggerRef
|
|
139
|
-
})));
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// src/meta.ts
|
|
143
|
-
import { trim } from "@dxos/util";
|
|
144
|
-
var meta = {
|
|
145
|
-
id: "dxos.org/plugin/board",
|
|
146
|
-
name: "Board",
|
|
147
|
-
description: trim`
|
|
148
|
-
Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.
|
|
149
|
-
Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.
|
|
150
|
-
`,
|
|
151
|
-
icon: "ph--squares-four--regular",
|
|
152
|
-
iconHue: "green",
|
|
153
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board",
|
|
154
|
-
screenshots: []
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export {
|
|
158
|
-
BoardContainer,
|
|
159
|
-
meta
|
|
160
|
-
};
|
|
161
|
-
//# sourceMappingURL=chunk-JKPYRS2Z.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/BoardContainer.tsx", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';\nimport { Filter, Obj, Ref } from '@dxos/echo';\nimport { useObject, useObjects } from '@dxos/echo-react';\nimport { invariant } from '@dxos/invariant';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { Board, type BoardController, type BoardRootProps, type Position } from '@dxos/react-ui-board';\nimport { ObjectPicker, type ObjectPickerContentProps } from '@dxos/react-ui-form';\nimport { Layout } from '@dxos/react-ui-mosaic';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type Board as BoardType } from '../types';\n\nconst DEFAULT_POSITION = { x: 0, y: 0 } satisfies Position;\n\ntype PickerState = {\n position: Position;\n};\n\nexport type BoardContainerProps = SurfaceComponentProps<BoardType.Board>;\n\nexport const BoardContainer = ({ role, subject: board }: BoardContainerProps) => {\n const controller = useRef<BoardController>(null);\n const [boardItems] = useObject(board, 'items');\n const items = useObjects(boardItems ?? []);\n const addTriggerRef = useRef<HTMLButtonElement | null>(null);\n const [pickerState, setPickerState] = useState<PickerState | null>(null);\n const attendableId = Obj.getDXN(board).toString();\n const { hasAttention } = useAttention(attendableId);\n\n const db = Obj.getDatabase(board);\n // TODO(burdon): Use search.\n const objects = useQuery(db, Filter.everything());\n const options = useMemo<ObjectPickerContentProps['options']>(\n () =>\n objects\n .filter((obj) => obj.id !== board.id)\n .map((obj) => {\n const label = Obj.getLabel(obj);\n if (label) {\n return {\n id: obj.id,\n label,\n hue: 'neutral' as const,\n };\n }\n })\n .filter(isNonNullable)\n .sort(({ label: a }, { label: b }) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())),\n [objects],\n );\n\n const handleAdd = useCallback<NonNullable<BoardRootProps['onAdd']>>(\n async (anchor, position = DEFAULT_POSITION) => {\n const db = Obj.getDatabase(board);\n invariant(db);\n addTriggerRef.current = anchor;\n setPickerState({\n position,\n });\n },\n [board],\n );\n\n // TODO(burdon): Use intents so can be undone.\n const handleDelete = useCallback<NonNullable<BoardRootProps['onDelete']>>(\n (id) => {\n // TODO(burdon): Impl. DXN.equals and pass in DXN from `id`.\n const idx = board.items.findIndex((ref) => ref.dxn.asEchoDXN()?.echoId === id);\n Obj.change(board, (b) => {\n if (idx !== -1) {\n b.items.splice(idx, 1);\n }\n delete b.layout.cells[id];\n });\n },\n [board],\n );\n\n const handleMove = useCallback<NonNullable<BoardRootProps['onMove']>>(\n (id, position) => {\n const layout = board.layout.cells[id];\n Obj.change(board, (b) => {\n b.layout.cells[id] = { ...layout, ...position };\n });\n },\n [board],\n );\n\n const handleSelect = useCallback<NonNullable<ObjectPickerContentProps['onSelect']>>(\n (id) => {\n if (!pickerState) {\n return;\n }\n\n // Find the selected object by id from the space.\n const selectedObject = objects.find((obj) => obj.id === id);\n if (!Obj.isObject(selectedObject)) {\n return;\n }\n\n // Create a reference to the selected object and add it to the board.\n Obj.change(board, (b) => {\n b.items.push(Ref.make(selectedObject));\n\n // Set the layout position for the new item.\n b.layout.cells[selectedObject.id.toString()] = pickerState.position;\n });\n\n // Close the picker.\n setPickerState(null);\n },\n [pickerState, objects, board],\n );\n\n return (\n <Board.Root ref={controller} layout={board.layout} onAdd={handleAdd} onDelete={handleDelete} onMove={handleMove}>\n <ObjectPicker.Root\n open={!!pickerState}\n onOpenChange={(nextOpen: boolean) => {\n setPickerState(nextOpen ? { position: DEFAULT_POSITION } : null);\n }}\n >\n <Layout.Main role={role} toolbar>\n <Board.Toolbar disabled={!hasAttention} />\n <Board.Container>\n <Board.Viewport classNames='border-none'>\n <Board.Backdrop />\n <Board.Content>\n {items?.map((item, index) => (\n <Board.Cell item={item} key={index} layout={board.layout?.cells[item.id] ?? { x: 0, y: 0 }}>\n <Surface role='card--content' data={{ subject: item }} limit={1} />\n </Board.Cell>\n ))}\n </Board.Content>\n </Board.Viewport>\n </Board.Container>\n </Layout.Main>\n <ObjectPicker.Content options={options} onSelect={handleSelect} classNames='popover-card-width' />\n <ObjectPicker.VirtualTrigger virtualRef={addTriggerRef} />\n </ObjectPicker.Root>\n </Board.Root>\n );\n};\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: 'dxos.org/plugin/board',\n name: 'Board',\n description: trim`\n Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.\n Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.\n `,\n icon: 'ph--squares-four--regular',\n iconHue: 'green',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board',\n screenshots: [],\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,eAA2C;AACpD,SAASC,QAAQC,KAAKC,WAAW;AACjC,SAASC,WAAWC,kBAAkB;AACtC,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,oBAAoB;AAC7B,SAASC,aAAuE;AAChF,SAASC,oBAAmD;AAC5D,SAASC,cAAc;AACvB,SAASC,qBAAqB;;AAI9B,IAAMC,mBAAmB;EAAEC,GAAG;EAAGC,GAAG;AAAE;AAQ/B,IAAMC,iBAAiB,CAAC,EAAEC,MAAMC,SAASC,MAAK,MAAuB;AAC1E,QAAMC,aAAatB,OAAwB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C3D;IAAY4D,SAAAA;KACvB,sBAAA,cAACpE,MAAMqE,SAAO;IAACC,UAAU,CAAClD;MAC1B,sBAAA,cAACpB,MAAMuE,WAAS,MACd,sBAAA,cAACvE,MAAMwE,UAAQ;IAACC,YAAW;KACzB,sBAAA,cAACzE,MAAM0E,UAAQ,IAAA,GACf,sBAAA,cAAC1E,MAAM2E,SAAO,MACX9D,OAAOgB,IAAI,CAAC+C,MAAMC,UACjB,sBAAA,cAAC7E,MAAM8E,MAAI;IAACF;IAAYG,KAAKF;IAAO1B,QAAQzC,MAAMyC,QAAQC,MAAMwB,KAAKhD,EAAE,KAAK;MAAEvB,GAAG;MAAGC,GAAG;IAAE;KACvF,sBAAA,cAACf,SAAAA;IAAQiB,MAAK;IAAgBwE,MAAM;MAAEvE,SAASmE;IAAK;IAAGK,OAAO;YAO1E,sBAAA,cAAChF,aAAa0E,SAAO;IAAClD;IAAkByD,UAAU5B;IAAcmB,YAAW;MAC3E,sBAAA,cAACxE,aAAakF,gBAAc;IAACC,YAAYtE;;AAIjD;;;AChJA,SAASuE,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "useRef", "useState", "Surface", "Filter", "Obj", "Ref", "useObject", "useObjects", "invariant", "useQuery", "useAttention", "Board", "ObjectPicker", "Layout", "isNonNullable", "DEFAULT_POSITION", "x", "y", "BoardContainer", "role", "subject", "board", "controller", "boardItems", "items", "addTriggerRef", "pickerState", "setPickerState", "attendableId", "getDXN", "toString", "hasAttention", "db", "getDatabase", "objects", "everything", "options", "filter", "obj", "id", "map", "label", "getLabel", "hue", "sort", "a", "b", "toLocaleLowerCase", "localeCompare", "handleAdd", "anchor", "position", "current", "handleDelete", "idx", "findIndex", "ref", "dxn", "asEchoDXN", "echoId", "change", "splice", "layout", "cells", "handleMove", "handleSelect", "selectedObject", "find", "isObject", "push", "make", "Root", "onAdd", "onDelete", "onMove", "open", "onOpenChange", "nextOpen", "Main", "toolbar", "Toolbar", "disabled", "Container", "Viewport", "classNames", "Backdrop", "Content", "item", "index", "Cell", "key", "data", "limit", "onSelect", "VirtualTrigger", "virtualRef", "trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "screenshots"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __export = (target, all) => {
|
|
4
|
-
for (var name in all)
|
|
5
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
// src/types/Board.ts
|
|
9
|
-
var Board_exports = {};
|
|
10
|
-
__export(Board_exports, {
|
|
11
|
-
Board: () => Board,
|
|
12
|
-
makeBoard: () => makeBoard
|
|
13
|
-
});
|
|
14
|
-
import * as Schema from "effect/Schema";
|
|
15
|
-
import { Obj, Type } from "@dxos/echo";
|
|
16
|
-
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
17
|
-
import { BoardLayout, defaultLayout } from "@dxos/react-ui-board";
|
|
18
|
-
var Board = Schema.Struct({
|
|
19
|
-
name: Schema.String.pipe(Schema.optional),
|
|
20
|
-
items: Type.Ref(Type.Obj).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
21
|
-
layout: BoardLayout.pipe(FormInputAnnotation.set(false))
|
|
22
|
-
}).pipe(Type.object({
|
|
23
|
-
typename: "dxos.org/type/Board",
|
|
24
|
-
version: "0.1.0"
|
|
25
|
-
}), LabelAnnotation.set([
|
|
26
|
-
"name"
|
|
27
|
-
]));
|
|
28
|
-
var makeBoard = (props = {}) => Obj.make(Board, {
|
|
29
|
-
items: [],
|
|
30
|
-
layout: defaultLayout,
|
|
31
|
-
...props
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
Board_exports
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=chunk-UGVRNKWV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/Board.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { BoardLayout, defaultLayout } from '@dxos/react-ui-board';\n\n/**\n * Board and layout.\n */\nexport const Board = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n items: Type.Ref(Type.Obj).pipe(Schema.Array, FormInputAnnotation.set(false)),\n layout: BoardLayout.pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Board',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n\nexport interface Board extends Schema.Schema.Type<typeof Board> {}\n\nexport const makeBoard = (props: Partial<Obj.MakeProps<typeof Board>> = {}) =>\n Obj.make(Board, {\n items: [],\n layout: defaultLayout,\n ...props,\n });\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAY;AAC1B,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,aAAaC,qBAAqB;AAKpC,IAAMC,QAAeC,cAAO;EACjCC,MAAaC,cAAOC,KAAYC,eAAQ;EACxCC,OAAOC,KAAKC,IAAID,KAAKE,GAAG,EAAEL,KAAYM,cAAOC,oBAAoBC,IAAI,KAAA,CAAA;EACrEC,QAAQC,YAAYV,KAAKO,oBAAoBC,IAAI,KAAA,CAAA;AACnD,CAAA,EAAGR,KACDG,KAAKQ,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBN,IAAI;EAAC;CAAO,CAAA;AAKvB,IAAMO,YAAY,CAACC,QAA8C,CAAC,MACvEX,IAAIY,KAAKrB,OAAO;EACdM,OAAO,CAAA;EACPO,QAAQS;EACR,GAAGF;AACL,CAAA;",
|
|
6
|
-
"names": ["Schema", "Obj", "Type", "FormInputAnnotation", "LabelAnnotation", "BoardLayout", "defaultLayout", "Board", "Struct", "name", "String", "pipe", "optional", "items", "Type", "Ref", "Obj", "Array", "FormInputAnnotation", "set", "layout", "BoardLayout", "object", "typename", "version", "LabelAnnotation", "makeBoard", "props", "make", "defaultLayout"]
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
BoardContainer,
|
|
4
|
-
meta
|
|
5
|
-
} from "./chunk-JKPYRS2Z.mjs";
|
|
6
|
-
import {
|
|
7
|
-
Board_exports
|
|
8
|
-
} from "./chunk-UGVRNKWV.mjs";
|
|
9
|
-
|
|
10
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
11
|
-
import * as Effect from "effect/Effect";
|
|
12
|
-
import React from "react";
|
|
13
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
14
|
-
import { Obj } from "@dxos/echo";
|
|
15
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, [
|
|
16
|
-
Common.createSurface({
|
|
17
|
-
id: meta.id,
|
|
18
|
-
role: [
|
|
19
|
-
"article",
|
|
20
|
-
"section"
|
|
21
|
-
],
|
|
22
|
-
filter: (data) => Obj.instanceOf(Board_exports.Board, data.subject),
|
|
23
|
-
component: ({ role, data }) => /* @__PURE__ */ React.createElement(BoardContainer, {
|
|
24
|
-
role,
|
|
25
|
-
subject: data.subject
|
|
26
|
-
})
|
|
27
|
-
})
|
|
28
|
-
])));
|
|
29
|
-
export {
|
|
30
|
-
react_surface_default as default
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=react-surface-ZFKFUBJM.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } 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 Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.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: ({ role, data }) => <BoardContainer role={role} subject={data.subject} />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,WAAW;AAMpB,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAA2CC,IAAIC,WAAWC,cAAMA,OAAOH,KAAKI,OAAO;IAC5FC,WAAW,CAAC,EAAEP,MAAME,KAAI,MAAO,sBAAA,cAACM,gBAAAA;MAAeR;MAAYM,SAASJ,KAAKI;;EAC3E,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Obj", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Board", "subject", "component", "BoardContainer"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,sJAAmE,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.ReactSurface>>, never, never>;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAOzD,wBAWE"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
3
|
-
import { type Board as BoardType } from '../types';
|
|
4
|
-
export type BoardContainerProps = SurfaceComponentProps<BoardType.Board>;
|
|
5
|
-
export declare const BoardContainer: ({ role, subject: board }: BoardContainerProps) => React.JSX.Element;
|
|
6
|
-
//# 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;AAEtE,OAAO,EAAW,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAWhF,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAQnD,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAEzE,eAAO,MAAM,cAAc,GAAI,0BAA0B,mBAAmB,sBA0H3E,CAAC"}
|