@dxos/plugin-board 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33
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-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +55 -75
- 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 +32 -3
- package/dist/lib/browser/types/index.mjs.map +4 -4
- 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 +55 -75
- 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 +32 -3
- package/dist/lib/node-esm/types/index.mjs.map +4 -4
- 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 +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/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +22 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Board.d.ts +46 -0
- package/dist/types/src/types/Board.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +75 -56
- package/src/BoardPlugin.tsx +39 -52
- package/src/capabilities/index.ts +2 -3
- package/src/capabilities/react-surface.tsx +23 -14
- package/src/components/index.ts +0 -2
- package/src/containers/BoardContainer/BoardContainer.stories.tsx +122 -0
- package/src/containers/BoardContainer/BoardContainer.tsx +183 -0
- package/src/containers/BoardContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/meta.ts +9 -5
- package/src/translations.ts +12 -8
- package/src/types/Board.ts +37 -0
- package/src/types/index.ts +1 -1
- package/dist/lib/browser/chunk-TDV6SJ64.mjs +0 -46
- package/dist/lib/browser/chunk-TDV6SJ64.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-TDOZP647.mjs +0 -33
- package/dist/lib/browser/intent-resolver-TDOZP647.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SHXN2B3I.mjs +0 -125
- package/dist/lib/browser/react-surface-SHXN2B3I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K6CHLZYU.mjs +0 -48
- package/dist/lib/node-esm/chunk-K6CHLZYU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IHQWKJNT.mjs +0 -34
- package/dist/lib/node-esm/intent-resolver-IHQWKJNT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-DGFWUKUE.mjs +0 -126
- package/dist/lib/node-esm/react-surface-DGFWUKUE.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/types/schema.d.ts +0 -65
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -34
- package/src/components/BoardContainer.tsx +0 -94
- package/src/types/schema.ts +0 -45
|
@@ -1,82 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
Board,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-TDV6SJ64.mjs";
|
|
5
|
-
|
|
6
|
-
// src/BoardPlugin.tsx
|
|
7
|
-
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
8
|
-
import { ClientEvents } from "@dxos/plugin-client";
|
|
9
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
10
|
-
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
11
|
-
import { translations as boardTranslations } from "@dxos/react-ui-board";
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
12
2
|
|
|
13
|
-
// src/
|
|
14
|
-
import {
|
|
15
|
-
var
|
|
16
|
-
|
|
3
|
+
// src/meta.ts
|
|
4
|
+
import { trim } from "@dxos/util";
|
|
5
|
+
var meta = {
|
|
6
|
+
id: "org.dxos.plugin.board",
|
|
7
|
+
name: "Board",
|
|
8
|
+
description: trim`
|
|
9
|
+
Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.
|
|
10
|
+
Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.
|
|
11
|
+
`,
|
|
12
|
+
icon: "ph--squares-four--regular",
|
|
13
|
+
iconHue: "green",
|
|
14
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board",
|
|
15
|
+
screenshots: []
|
|
16
|
+
};
|
|
17
17
|
|
|
18
|
-
// src/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
// src/BoardPlugin.tsx
|
|
19
|
+
import * as Effect from "effect/Effect";
|
|
20
|
+
import * as Option from "effect/Option";
|
|
21
|
+
import { Plugin } from "@dxos/app-framework";
|
|
22
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
23
|
+
import { Operation } from "@dxos/compute";
|
|
24
|
+
import { Annotation } from "@dxos/echo";
|
|
25
|
+
import { SpaceOperation } from "@dxos/plugin-space/operations";
|
|
26
|
+
import { translations as boardTranslations } from "@dxos/react-ui-board/translations";
|
|
27
|
+
import { ReactSurface } from "#capabilities";
|
|
28
|
+
import { meta as meta2 } from "#meta";
|
|
29
|
+
import { translations } from "#translations";
|
|
30
|
+
import { Board } from "#types";
|
|
31
|
+
var BoardPlugin = Plugin.define(meta2).pipe(AppPlugin.addMetadataModule({
|
|
32
|
+
metadata: {
|
|
33
|
+
id: Board.Board.typename,
|
|
34
|
+
metadata: {
|
|
35
|
+
icon: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).icon,
|
|
36
|
+
iconHue: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).hue ?? "white",
|
|
37
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
38
|
+
const object = Board.makeBoard(props);
|
|
39
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
40
|
+
object,
|
|
41
|
+
target: options.target,
|
|
42
|
+
hidden: true,
|
|
43
|
+
targetNodeId: options.targetNodeId
|
|
44
|
+
});
|
|
45
|
+
})
|
|
32
46
|
}
|
|
33
47
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
defineModule({
|
|
48
|
-
id: `${meta.id}/module/metadata`,
|
|
49
|
-
activatesOn: Events.SetupMetadata,
|
|
50
|
-
activate: () => (
|
|
51
|
-
// TODO(burdon): "Metadata" here seems non-descriptive; is this specifically for the type? ObjectMetadata?
|
|
52
|
-
contributes(Capabilities.Metadata, {
|
|
53
|
-
id: Board.Board.typename,
|
|
54
|
-
metadata: {
|
|
55
|
-
icon: "ph--squares-four--regular"
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
)
|
|
59
|
-
}),
|
|
60
|
-
defineModule({
|
|
61
|
-
id: `${meta.id}/module/object-form`,
|
|
62
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
63
|
-
activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
|
|
64
|
-
objectSchema: Board.Board,
|
|
65
|
-
getIntent: () => createIntent(Board.Create)
|
|
66
|
-
}))
|
|
67
|
-
}),
|
|
68
|
-
defineModule({
|
|
69
|
-
id: `${meta.id}/module/react-surface`,
|
|
70
|
-
activatesOn: Events.SetupReactSurface,
|
|
71
|
-
activate: ReactSurface
|
|
72
|
-
}),
|
|
73
|
-
defineModule({
|
|
74
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
75
|
-
activatesOn: Events.SetupIntentResolver,
|
|
76
|
-
activate: IntentResolver
|
|
77
|
-
})
|
|
78
|
-
]);
|
|
79
|
-
};
|
|
48
|
+
}), AppPlugin.addSchemaModule({
|
|
49
|
+
schema: [
|
|
50
|
+
Board.Board
|
|
51
|
+
]
|
|
52
|
+
}), AppPlugin.addSurfaceModule({
|
|
53
|
+
activate: ReactSurface
|
|
54
|
+
}), AppPlugin.addTranslationsModule({
|
|
55
|
+
translations: [
|
|
56
|
+
...translations,
|
|
57
|
+
...boardTranslations
|
|
58
|
+
]
|
|
59
|
+
}), Plugin.make);
|
|
80
60
|
export {
|
|
81
61
|
BoardPlugin,
|
|
82
62
|
meta
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/BoardPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\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: 'org.dxos.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", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Annotation } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { translations as boardTranslations } from '@dxos/react-ui-board/translations';\n\nimport { ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Board } from '#types';\n\nexport const BoardPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: Board.Board.typename,\n metadata: {\n icon: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).hue ?? 'white',\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Board.makeBoard(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Board.Board] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations: [...translations, ...boardTranslations] }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;;;ACdA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAE/B,SAASC,gBAAgBC,yBAAyB;AAElD,SAASC,oBAAoB;AAC7B,SAASC,QAAAA,aAAY;AACrB,SAASH,oBAAoB;AAC7B,SAASI,aAAa;AAEf,IAAMC,cAAcV,OAAOW,OAAOH,KAAAA,EAAMI,KAC7CX,UAAUY,kBAAkB;EAC1BC,UAAU;IACRC,IAAIN,MAAMA,MAAMO;IAChBF,UAAU;MACRG,MAAMd,WAAWe,eAAeC,IAAIV,MAAMA,KAAK,EAAEG,KAAYQ,iBAAU,EAAEH;MACzEI,SAASlB,WAAWe,eAAeC,IAAIV,MAAMA,KAAK,EAAEG,KAAYQ,iBAAU,EAAEE,OAAO;MACnFC,cAAe,CAACC,OAAOC,YACdC,WAAI,aAAA;AACT,cAAMC,SAASlB,MAAMmB,UAAUJ,KAAAA;AAC/B,eAAO,OAAOtB,UAAU2B,OAAOzB,eAAe0B,WAAW;UACvDH;UACAI,QAAQN,QAAQM;UAChBC,QAAQ;UACRC,cAAcR,QAAQQ;QACxB,CAAA;MACF,CAAA;IACJ;EACF;AACF,CAAA,GACAhC,UAAUiC,gBAAgB;EAAEC,QAAQ;IAAC1B,MAAMA;;AAAO,CAAA,GAClDR,UAAUmC,iBAAiB;EAAEC,UAAU9B;AAAa,CAAA,GACpDN,UAAUqC,sBAAsB;EAAEjC,cAAc;OAAIA;OAAiBC;;AAAmB,CAAA,GACxFN,OAAOuC,IAAI;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "screenshots", "Effect", "Option", "Plugin", "AppPlugin", "Operation", "Annotation", "SpaceOperation", "translations", "boardTranslations", "ReactSurface", "meta", "Board", "BoardPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "typename", "icon", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "createObject", "props", "options", "gen", "object", "makeBoard", "invoke", "AddObject", "target", "hidden", "targetNodeId", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule", "make"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1880,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/BoardPlugin.tsx":{"bytes":6222,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/react-ui-board/translations","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":467,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/BoardPlugin.tsx","kind":"import-statement","original":"./BoardPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":2495,"imports":[{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Board.ts":{"bytes":3777,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui-board","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":422,"imports":[{"path":"src/types/Board.ts","kind":"import-statement","original":"./Board"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4063},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/react-ui-board/translations","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["BoardPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":481},"src/index.ts":{"bytesInOutput":0},"src/BoardPlugin.tsx":{"bytesInOutput":1468}},"bytes":2089},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1211},"dist/lib/browser/translations.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":602}},"bytes":726},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2030},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui-board","kind":"import-statement","external":true}],"exports":["Board"],"entryPoint":"src/types/index.ts","inputs":{"src/types/Board.ts":{"bytesInOutput":867},"src/types/index.ts":{"bytesInOutput":0}},"bytes":1014},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
import { meta } from "#meta";
|
|
5
|
+
import { Board } from "#types";
|
|
6
|
+
var translations = [
|
|
7
|
+
{
|
|
8
|
+
"en-US": {
|
|
9
|
+
[Board.Board.typename]: {
|
|
10
|
+
"typename.label": "Board",
|
|
11
|
+
"typename.label_zero": "Boards",
|
|
12
|
+
"typename.label_one": "Board",
|
|
13
|
+
"typename.label_other": "Boards",
|
|
14
|
+
"object-name.placeholder": "New board",
|
|
15
|
+
"add-object.label": "Add board",
|
|
16
|
+
"rename-object.label": "Rename board",
|
|
17
|
+
"delete-object.label": "Delete board",
|
|
18
|
+
"object-deleted.label": "Board deleted"
|
|
19
|
+
},
|
|
20
|
+
[meta.id]: {
|
|
21
|
+
"plugin.name": "Board"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
export {
|
|
27
|
+
translations
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { Board } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [Board.Board.typename]: {\n 'typename.label': 'Board',\n 'typename.label_zero': 'Boards',\n 'typename.label_one': 'Board',\n 'typename.label_other': 'Boards',\n 'object-name.placeholder': 'New board',\n 'add-object.label': 'Add board',\n 'rename-object.label': 'Rename board',\n 'delete-object.label': 'Delete board',\n 'object-deleted.label': 'Board deleted',\n },\n [meta.id]: {\n 'plugin.name': 'Board',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;AAMA,SAASA,YAAY;AACrB,SAASC,aAAa;AAEf,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,MAAMA,MAAME,QAAQ,GAAG;QACtB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACH,KAAKI,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;",
|
|
6
|
+
"names": ["meta", "Board", "translations", "typename", "id"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
2
|
+
__export
|
|
3
|
+
} from "../chunk-J5LGTIGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/types/Board.ts
|
|
6
|
+
var Board_exports = {};
|
|
7
|
+
__export(Board_exports, {
|
|
8
|
+
Board: () => Board,
|
|
9
|
+
makeBoard: () => makeBoard
|
|
10
|
+
});
|
|
11
|
+
import * as Schema from "effect/Schema";
|
|
12
|
+
import { Annotation, Obj, Ref, Type } from "@dxos/echo";
|
|
13
|
+
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
14
|
+
import { BoardLayout, defaultLayout } from "@dxos/react-ui-board";
|
|
15
|
+
var Board = Schema.Struct({
|
|
16
|
+
name: Schema.String.pipe(Schema.optional),
|
|
17
|
+
items: Ref.Ref(Obj.Unknown).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
18
|
+
layout: BoardLayout.pipe(FormInputAnnotation.set(false))
|
|
19
|
+
}).pipe(Type.object({
|
|
20
|
+
typename: "org.dxos.type.board",
|
|
21
|
+
version: "0.1.0"
|
|
22
|
+
}), LabelAnnotation.set([
|
|
23
|
+
"name"
|
|
24
|
+
]), Annotation.IconAnnotation.set({
|
|
25
|
+
icon: "ph--squares-four--regular",
|
|
26
|
+
hue: "green"
|
|
27
|
+
}));
|
|
28
|
+
var makeBoard = (props = {}) => Obj.make(Board, {
|
|
29
|
+
items: [],
|
|
30
|
+
layout: defaultLayout,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
4
33
|
export {
|
|
5
|
-
Board
|
|
34
|
+
Board_exports as Board
|
|
6
35
|
};
|
|
7
36
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
6
|
-
"names": []
|
|
3
|
+
"sources": ["../../../../src/types/Board.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Ref, 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: Ref.Ref(Obj.Unknown).pipe(Schema.Array, FormInputAnnotation.set(false)),\n layout: BoardLayout.pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.board',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--squares-four--regular',\n hue: 'green',\n }),\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,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,aAAaC,qBAAqB;AAKpC,IAAMC,QAAeC,cAAO;EACjCC,MAAaC,cAAOC,KAAYC,eAAQ;EACxCC,OAAOZ,IAAIA,IAAID,IAAIc,OAAO,EAAEH,KAAYI,cAAOZ,oBAAoBa,IAAI,KAAA,CAAA;EACvEC,QAAQZ,YAAYM,KAAKR,oBAAoBa,IAAI,KAAA,CAAA;AACnD,CAAA,EAAGL,KACDT,KAAKgB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAhB,gBAAgBY,IAAI;EAAC;CAAO,GAC5BjB,WAAWsB,eAAeL,IAAI;EAC5BM,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAKK,IAAMC,YAAY,CAACC,QAA8C,CAAC,MACvEzB,IAAI0B,KAAKnB,OAAO;EACdM,OAAO,CAAA;EACPI,QAAQX;EACR,GAAGmB;AACL,CAAA;",
|
|
6
|
+
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "FormInputAnnotation", "LabelAnnotation", "BoardLayout", "defaultLayout", "Board", "Struct", "name", "String", "pipe", "optional", "items", "Unknown", "Array", "set", "layout", "object", "typename", "version", "IconAnnotation", "icon", "hue", "makeBoard", "props", "make"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export {
|
|
9
|
+
__export
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=chunk-HSLMI22Q.mjs.map
|
|
@@ -1,83 +1,63 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import
|
|
3
|
-
Board,
|
|
4
|
-
meta
|
|
5
|
-
} from "./chunk-K6CHLZYU.mjs";
|
|
6
|
-
|
|
7
|
-
// src/BoardPlugin.tsx
|
|
8
|
-
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
9
|
-
import { ClientEvents } from "@dxos/plugin-client";
|
|
10
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
11
|
-
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
12
|
-
import { translations as boardTranslations } from "@dxos/react-ui-board";
|
|
2
|
+
import "./chunk-HSLMI22Q.mjs";
|
|
13
3
|
|
|
14
|
-
// src/
|
|
15
|
-
import {
|
|
16
|
-
var
|
|
17
|
-
|
|
4
|
+
// src/meta.ts
|
|
5
|
+
import { trim } from "@dxos/util";
|
|
6
|
+
var meta = {
|
|
7
|
+
id: "org.dxos.plugin.board",
|
|
8
|
+
name: "Board",
|
|
9
|
+
description: trim`
|
|
10
|
+
Infinite canvas workspace that combines sticky notes, media, and whiteboarding tools.
|
|
11
|
+
Arrange and connect ideas freely in a visual space perfect for brainstorming and creative collaboration.
|
|
12
|
+
`,
|
|
13
|
+
icon: "ph--squares-four--regular",
|
|
14
|
+
iconHue: "green",
|
|
15
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-board",
|
|
16
|
+
screenshots: []
|
|
17
|
+
};
|
|
18
18
|
|
|
19
|
-
// src/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
// src/BoardPlugin.tsx
|
|
20
|
+
import * as Effect from "effect/Effect";
|
|
21
|
+
import * as Option from "effect/Option";
|
|
22
|
+
import { Plugin } from "@dxos/app-framework";
|
|
23
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
24
|
+
import { Operation } from "@dxos/compute";
|
|
25
|
+
import { Annotation } from "@dxos/echo";
|
|
26
|
+
import { SpaceOperation } from "@dxos/plugin-space/operations";
|
|
27
|
+
import { translations as boardTranslations } from "@dxos/react-ui-board/translations";
|
|
28
|
+
import { ReactSurface } from "#capabilities";
|
|
29
|
+
import { meta as meta2 } from "#meta";
|
|
30
|
+
import { translations } from "#translations";
|
|
31
|
+
import { Board } from "#types";
|
|
32
|
+
var BoardPlugin = Plugin.define(meta2).pipe(AppPlugin.addMetadataModule({
|
|
33
|
+
metadata: {
|
|
34
|
+
id: Board.Board.typename,
|
|
35
|
+
metadata: {
|
|
36
|
+
icon: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).icon,
|
|
37
|
+
iconHue: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).hue ?? "white",
|
|
38
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
39
|
+
const object = Board.makeBoard(props);
|
|
40
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
41
|
+
object,
|
|
42
|
+
target: options.target,
|
|
43
|
+
hidden: true,
|
|
44
|
+
targetNodeId: options.targetNodeId
|
|
45
|
+
});
|
|
46
|
+
})
|
|
33
47
|
}
|
|
34
48
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
defineModule({
|
|
49
|
-
id: `${meta.id}/module/metadata`,
|
|
50
|
-
activatesOn: Events.SetupMetadata,
|
|
51
|
-
activate: () => (
|
|
52
|
-
// TODO(burdon): "Metadata" here seems non-descriptive; is this specifically for the type? ObjectMetadata?
|
|
53
|
-
contributes(Capabilities.Metadata, {
|
|
54
|
-
id: Board.Board.typename,
|
|
55
|
-
metadata: {
|
|
56
|
-
icon: "ph--squares-four--regular"
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
)
|
|
60
|
-
}),
|
|
61
|
-
defineModule({
|
|
62
|
-
id: `${meta.id}/module/object-form`,
|
|
63
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
64
|
-
activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
|
|
65
|
-
objectSchema: Board.Board,
|
|
66
|
-
getIntent: () => createIntent(Board.Create)
|
|
67
|
-
}))
|
|
68
|
-
}),
|
|
69
|
-
defineModule({
|
|
70
|
-
id: `${meta.id}/module/react-surface`,
|
|
71
|
-
activatesOn: Events.SetupReactSurface,
|
|
72
|
-
activate: ReactSurface
|
|
73
|
-
}),
|
|
74
|
-
defineModule({
|
|
75
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
76
|
-
activatesOn: Events.SetupIntentResolver,
|
|
77
|
-
activate: IntentResolver
|
|
78
|
-
})
|
|
79
|
-
]);
|
|
80
|
-
};
|
|
49
|
+
}), AppPlugin.addSchemaModule({
|
|
50
|
+
schema: [
|
|
51
|
+
Board.Board
|
|
52
|
+
]
|
|
53
|
+
}), AppPlugin.addSurfaceModule({
|
|
54
|
+
activate: ReactSurface
|
|
55
|
+
}), AppPlugin.addTranslationsModule({
|
|
56
|
+
translations: [
|
|
57
|
+
...translations,
|
|
58
|
+
...boardTranslations
|
|
59
|
+
]
|
|
60
|
+
}), Plugin.make);
|
|
81
61
|
export {
|
|
82
62
|
BoardPlugin,
|
|
83
63
|
meta
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/BoardPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\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: 'org.dxos.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", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Annotation } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { translations as boardTranslations } from '@dxos/react-ui-board/translations';\n\nimport { ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Board } from '#types';\n\nexport const BoardPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: Board.Board.typename,\n metadata: {\n icon: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Board.Board).pipe(Option.getOrThrow).hue ?? 'white',\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Board.makeBoard(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Board.Board] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations: [...translations, ...boardTranslations] }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";;;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;;;ACdA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAE/B,SAASC,gBAAgBC,yBAAyB;AAElD,SAASC,oBAAoB;AAC7B,SAASC,QAAAA,aAAY;AACrB,SAASH,oBAAoB;AAC7B,SAASI,aAAa;AAEf,IAAMC,cAAcV,OAAOW,OAAOH,KAAAA,EAAMI,KAC7CX,UAAUY,kBAAkB;EAC1BC,UAAU;IACRC,IAAIN,MAAMA,MAAMO;IAChBF,UAAU;MACRG,MAAMd,WAAWe,eAAeC,IAAIV,MAAMA,KAAK,EAAEG,KAAYQ,iBAAU,EAAEH;MACzEI,SAASlB,WAAWe,eAAeC,IAAIV,MAAMA,KAAK,EAAEG,KAAYQ,iBAAU,EAAEE,OAAO;MACnFC,cAAe,CAACC,OAAOC,YACdC,WAAI,aAAA;AACT,cAAMC,SAASlB,MAAMmB,UAAUJ,KAAAA;AAC/B,eAAO,OAAOtB,UAAU2B,OAAOzB,eAAe0B,WAAW;UACvDH;UACAI,QAAQN,QAAQM;UAChBC,QAAQ;UACRC,cAAcR,QAAQQ;QACxB,CAAA;MACF,CAAA;IACJ;EACF;AACF,CAAA,GACAhC,UAAUiC,gBAAgB;EAAEC,QAAQ;IAAC1B,MAAMA;;AAAO,CAAA,GAClDR,UAAUmC,iBAAiB;EAAEC,UAAU9B;AAAa,CAAA,GACpDN,UAAUqC,sBAAsB;EAAEjC,cAAc;OAAIA;OAAiBC;;AAAmB,CAAA,GACxFN,OAAOuC,IAAI;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "screenshots", "Effect", "Option", "Plugin", "AppPlugin", "Operation", "Annotation", "SpaceOperation", "translations", "boardTranslations", "ReactSurface", "meta", "Board", "BoardPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "typename", "icon", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "createObject", "props", "options", "gen", "object", "makeBoard", "invoke", "AddObject", "target", "hidden", "targetNodeId", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule", "make"]
|
|
7
7
|
}
|