@dxos/plugin-presenter 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8
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/LICENSE +102 -5
- package/PLUGIN.mdl +309 -0
- package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs +46 -0
- package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs.map +7 -0
- package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs +24 -0
- package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs.map +7 -0
- package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs +18 -0
- package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs.map +7 -0
- package/dist/lib/neutral/PresenterPlugin.mjs +35 -0
- package/dist/lib/neutral/PresenterPlugin.mjs.map +7 -0
- package/dist/lib/neutral/PresenterPlugin.node.mjs +16 -0
- package/dist/lib/neutral/PresenterPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/PresenterPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/PresenterPlugin.workerd.mjs.map +7 -0
- package/dist/lib/{browser/PresenterSettings-DZO2DC53.mjs → neutral/PresenterSettings-2G4XD4QY.mjs} +9 -13
- package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs +97 -0
- package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-PPL2FF6R.mjs +38 -0
- package/dist/lib/neutral/chunk-PPL2FF6R.mjs.map +7 -0
- package/dist/lib/neutral/chunk-V323QBC3.mjs +41 -0
- package/dist/lib/neutral/chunk-V323QBC3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VVALMI52.mjs +69 -0
- package/dist/lib/neutral/chunk-VVALMI52.mjs.map +7 -0
- package/dist/lib/{browser → neutral/components}/index.mjs +5 -55
- package/dist/lib/{browser → neutral/components}/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-SPJGAJIF.mjs +54 -0
- package/dist/lib/neutral/react-surface-SPJGAJIF.mjs.map +7 -0
- package/dist/lib/neutral/settings-R6LRDAAK.mjs +28 -0
- package/dist/lib/neutral/settings-R6LRDAAK.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +19 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/PresenterPlugin.d.ts +1 -0
- package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
- package/dist/types/src/PresenterPlugin.node.d.ts +4 -0
- package/dist/types/src/PresenterPlugin.node.d.ts.map +1 -0
- package/dist/types/src/PresenterPlugin.test.d.ts +2 -0
- package/dist/types/src/PresenterPlugin.test.d.ts.map +1 -0
- package/dist/types/src/PresenterPlugin.workerd.d.ts +4 -0
- package/dist/types/src/PresenterPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.stories.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/theme.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Layout.d.ts +1 -1
- package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.stories.d.ts.map +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +4 -6
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +5 -7
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts +6 -0
- package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +1 -1
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -1
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +1 -1
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/PresenterCapabilities.d.ts +4 -0
- package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/PresenterOperation.d.ts +17 -0
- package/dist/types/src/types/PresenterOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +1 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -6
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/useExitPresenter.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -50
- package/src/PresenterPlugin.node.ts +16 -0
- package/src/PresenterPlugin.test.ts +23 -0
- package/src/PresenterPlugin.tsx +8 -1
- package/src/PresenterPlugin.workerd.ts +11 -0
- package/src/capabilities/app-graph-builder.ts +5 -7
- package/src/capabilities/react-surface.tsx +7 -8
- package/src/components/Presenter/Layout.tsx +1 -1
- package/src/components/PresenterSettings/PresenterSettings.stories.tsx +2 -1
- package/src/components/PresenterSettings/PresenterSettings.tsx +8 -9
- package/src/components/RevealPlayer/RevealPlayer.stories.tsx +2 -1
- package/src/components/RevealPlayer/RevealPlayer.tsx +2 -2
- package/src/containers/{CollectionPresenterContainer/CollectionPresenterContainer.tsx → CollectionPresenterArticle/CollectionPresenterArticle.tsx} +3 -3
- package/src/containers/CollectionPresenterArticle/index.ts +5 -0
- package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +1 -1
- package/src/containers/MarkdownSlide/MarkdownSlide.tsx +1 -1
- package/src/containers/index.ts +1 -1
- package/src/index.ts +1 -3
- package/src/meta.ts +25 -6
- package/src/plugin.ts +9 -0
- package/src/translations.ts +0 -2
- package/src/types/PresenterCapabilities.ts +15 -0
- package/src/types/PresenterOperation.ts +29 -0
- package/src/types/Settings.ts +6 -1
- package/src/types/index.ts +2 -11
- package/src/useExitPresenter.ts +1 -2
- package/src/vite-env.d.ts +5 -0
- package/dist/lib/browser/PresenterSettings-DZO2DC53.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operations/index.mjs +0 -30
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts +0 -6
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts.map +0 -1
- package/dist/types/src/containers/CollectionPresenterContainer/index.d.ts +0 -2
- package/dist/types/src/containers/CollectionPresenterContainer/index.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts +0 -17
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/operations/index.d.ts +0 -2
- package/dist/types/src/operations/index.d.ts.map +0 -1
- package/src/containers/CollectionPresenterContainer/index.ts +0 -5
- package/src/operations/definitions.ts +0 -23
- package/src/operations/index.ts +0 -5
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-presenter",
|
|
3
|
-
"version": "0.8.4-
|
|
3
|
+
"version": "0.8.4-staging.60fe92afc8",
|
|
4
4
|
"description": "Braneframe presenter plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,41 +8,79 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
-
"#capabilities":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#meta": {
|
|
32
|
+
"source": "./src/meta.ts",
|
|
33
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#plugin": {
|
|
37
|
+
"source": {
|
|
38
|
+
"workerd": "./src/PresenterPlugin.workerd.ts",
|
|
39
|
+
"node": "./src/PresenterPlugin.node.ts",
|
|
40
|
+
"default": "./src/PresenterPlugin.tsx"
|
|
41
|
+
},
|
|
42
|
+
"types": "./dist/types/src/PresenterPlugin.d.ts",
|
|
43
|
+
"workerd": "./dist/lib/neutral/PresenterPlugin.workerd.mjs",
|
|
44
|
+
"node": "./dist/lib/neutral/PresenterPlugin.node.mjs",
|
|
45
|
+
"default": "./dist/lib/neutral/PresenterPlugin.mjs"
|
|
46
|
+
},
|
|
21
47
|
"#testing": "./src/testing.ts",
|
|
22
|
-
"#
|
|
48
|
+
"#translations": {
|
|
49
|
+
"source": "./src/translations.ts",
|
|
50
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
51
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
52
|
+
},
|
|
53
|
+
"#types": {
|
|
54
|
+
"source": "./src/types/index.ts",
|
|
55
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
56
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
57
|
+
}
|
|
23
58
|
},
|
|
24
59
|
"exports": {
|
|
25
60
|
".": {
|
|
26
61
|
"source": "./src/index.ts",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
62
|
+
"types": "./dist/types/src/index.d.ts",
|
|
63
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
29
64
|
},
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
65
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
66
|
+
"./plugin": {
|
|
67
|
+
"source": "./src/plugin.ts",
|
|
68
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
69
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./translations": {
|
|
72
|
+
"source": "./src/translations.ts",
|
|
73
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
74
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
34
75
|
}
|
|
35
76
|
},
|
|
36
77
|
"types": "dist/types/src/index.d.ts",
|
|
37
|
-
"typesVersions": {
|
|
38
|
-
"*": {}
|
|
39
|
-
},
|
|
40
78
|
"files": [
|
|
41
79
|
"dist",
|
|
42
|
-
"src"
|
|
80
|
+
"src",
|
|
81
|
+
"PLUGIN.mdl"
|
|
43
82
|
],
|
|
44
83
|
"dependencies": {
|
|
45
|
-
"@effect-atom/atom": "^0.5.1",
|
|
46
84
|
"@effect-atom/atom-react": "^0.5.0",
|
|
47
85
|
"hastscript": "^7.1.0",
|
|
48
86
|
"highlight.js": "^11.9.0",
|
|
@@ -54,50 +92,45 @@
|
|
|
54
92
|
"remark-frontmatter": "^5.0.0",
|
|
55
93
|
"remark-parse-frontmatter": "^1.0.3",
|
|
56
94
|
"reveal.js": "^5.1.0",
|
|
57
|
-
"@dxos/app-framework": "0.8.4-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/effect": "0.8.4-
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/plugin-client": "0.8.4-
|
|
65
|
-
"@dxos/plugin-deck": "0.8.4-
|
|
66
|
-
"@dxos/plugin-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/react-ui-form": "0.8.4-main.fcfe5033a5",
|
|
72
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.fcfe5033a5",
|
|
73
|
-
"@dxos/schema": "0.8.4-main.fcfe5033a5",
|
|
74
|
-
"@dxos/react-ui-stack": "0.8.4-main.fcfe5033a5",
|
|
75
|
-
"@dxos/types": "0.8.4-main.fcfe5033a5",
|
|
76
|
-
"@dxos/util": "0.8.4-main.fcfe5033a5"
|
|
95
|
+
"@dxos/app-framework": "0.8.4-staging.60fe92afc8",
|
|
96
|
+
"@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
|
|
97
|
+
"@dxos/compute": "0.8.4-staging.60fe92afc8",
|
|
98
|
+
"@dxos/keys": "0.8.4-staging.60fe92afc8",
|
|
99
|
+
"@dxos/echo": "0.8.4-staging.60fe92afc8",
|
|
100
|
+
"@dxos/effect": "0.8.4-staging.60fe92afc8",
|
|
101
|
+
"@dxos/log": "0.8.4-staging.60fe92afc8",
|
|
102
|
+
"@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
|
|
103
|
+
"@dxos/plugin-deck": "0.8.4-staging.60fe92afc8",
|
|
104
|
+
"@dxos/plugin-graph": "0.8.4-staging.60fe92afc8",
|
|
105
|
+
"@dxos/react-ui-attention": "0.8.4-staging.60fe92afc8",
|
|
106
|
+
"@dxos/react-ui-form": "0.8.4-staging.60fe92afc8",
|
|
107
|
+
"@dxos/util": "0.8.4-staging.60fe92afc8",
|
|
108
|
+
"@dxos/plugin-markdown": "0.8.4-staging.60fe92afc8"
|
|
77
109
|
},
|
|
78
110
|
"devDependencies": {
|
|
79
111
|
"@effect-atom/atom-react": "^0.5.0",
|
|
80
|
-
"@effect/platform": "0.
|
|
112
|
+
"@effect/platform": "0.96.1",
|
|
81
113
|
"@types/react": "~19.2.7",
|
|
82
114
|
"@types/react-dom": "~19.2.3",
|
|
83
115
|
"@types/reveal.js": "^5.0.3",
|
|
84
|
-
"effect": "3.
|
|
116
|
+
"effect": "3.21.3",
|
|
85
117
|
"react": "~19.2.3",
|
|
86
118
|
"react-dom": "~19.2.3",
|
|
87
|
-
"vite": "^
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
119
|
+
"vite": "^8.0.16",
|
|
120
|
+
"@dxos/random": "0.8.4-staging.60fe92afc8",
|
|
121
|
+
"@dxos/plugin-testing": "0.8.4-staging.60fe92afc8",
|
|
122
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8",
|
|
123
|
+
"@dxos/storybook-utils": "0.8.4-staging.60fe92afc8",
|
|
124
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
|
|
92
125
|
},
|
|
93
126
|
"peerDependencies": {
|
|
94
127
|
"@effect-atom/atom-react": "^0.5.0",
|
|
95
|
-
"@effect/platform": "0.
|
|
96
|
-
"effect": "3.
|
|
128
|
+
"@effect/platform": "0.96.1",
|
|
129
|
+
"effect": "3.21.3",
|
|
97
130
|
"react": "~19.2.3",
|
|
98
131
|
"react-dom": "~19.2.3",
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/ui
|
|
132
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8",
|
|
133
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8"
|
|
101
134
|
},
|
|
102
135
|
"publishConfig": {
|
|
103
136
|
"access": "public"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { AppGraphBuilder } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
export const PresenterPlugin = Plugin.define(meta).pipe(
|
|
12
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
13
|
+
Plugin.make,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default PresenterPlugin;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
8
|
+
|
|
9
|
+
import { PresenterPlugin } from '#plugin';
|
|
10
|
+
|
|
11
|
+
import { meta } from './meta';
|
|
12
|
+
|
|
13
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
14
|
+
|
|
15
|
+
describe('PresenterPlugin', () => {
|
|
16
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
17
|
+
await using harness = await createComposerTestApp({
|
|
18
|
+
plugins: [PresenterPlugin()],
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
expect(harness.manager.getActive()).toContain(moduleId('AppGraphBuilder'));
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/PresenterPlugin.tsx
CHANGED
|
@@ -7,8 +7,10 @@ import { AppPlugin } from '@dxos/app-toolkit';
|
|
|
7
7
|
|
|
8
8
|
import { AppGraphBuilder, PresenterSettings, ReactSurface } from '#capabilities';
|
|
9
9
|
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
13
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
12
14
|
|
|
13
15
|
// TODO(burdon): Only scale markdown content.
|
|
14
16
|
// TODO(burdon): Map stack content; Slide content type (e.g., markdown, sketch, IPFS image, table, etc.)
|
|
@@ -18,5 +20,10 @@ export const PresenterPlugin = Plugin.define(meta).pipe(
|
|
|
18
20
|
AppPlugin.addSettingsModule({ activate: PresenterSettings }),
|
|
19
21
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
20
22
|
AppPlugin.addTranslationsModule({ translations }),
|
|
23
|
+
AppPlugin.addPluginAssetModule({
|
|
24
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
25
|
+
}),
|
|
21
26
|
Plugin.make,
|
|
22
27
|
);
|
|
28
|
+
|
|
29
|
+
export default PresenterPlugin;
|
|
@@ -7,17 +7,15 @@ import * as Option from 'effect/Option';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';
|
|
10
|
-
import {
|
|
11
|
-
import { Collection } from '@dxos/echo';
|
|
12
|
-
import {
|
|
13
|
-
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
14
|
-
import { DeckOperation } from '@dxos/plugin-deck/operations';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Collection, Obj } from '@dxos/echo';
|
|
12
|
+
import { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';
|
|
15
13
|
import { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
16
|
-
import { Markdown } from '@dxos/plugin-markdown
|
|
14
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
17
15
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
18
16
|
|
|
19
17
|
import { meta } from '#meta';
|
|
20
|
-
import { PresenterOperation } from '#
|
|
18
|
+
import { PresenterOperation } from '#types';
|
|
21
19
|
import { PresenterCapabilities } from '#types';
|
|
22
20
|
|
|
23
21
|
/** Match nodes that can be presented (Collection or Document). */
|
|
@@ -8,12 +8,11 @@ import React from 'react';
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
-
import { Obj } from '@dxos/echo';
|
|
12
|
-
import {
|
|
13
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
11
|
+
import { Collection, Obj } from '@dxos/echo';
|
|
12
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
14
13
|
|
|
15
14
|
import { PresenterSettings } from '#components';
|
|
16
|
-
import {
|
|
15
|
+
import { CollectionPresenterArticle, DocumentPresenterContainer, MarkdownSlide } from '#containers';
|
|
17
16
|
import { meta } from '#meta';
|
|
18
17
|
import { type Settings } from '#types';
|
|
19
18
|
|
|
@@ -22,7 +21,7 @@ export default Capability.makeModule(() =>
|
|
|
22
21
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
23
22
|
Surface.create({
|
|
24
23
|
id: 'document',
|
|
25
|
-
position: '
|
|
24
|
+
position: 'first',
|
|
26
25
|
filter: AppSurface.predicate(
|
|
27
26
|
AppSurface.Article,
|
|
28
27
|
(data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Markdown.Document }> =>
|
|
@@ -37,7 +36,7 @@ export default Capability.makeModule(() =>
|
|
|
37
36
|
}),
|
|
38
37
|
Surface.create({
|
|
39
38
|
id: 'collection',
|
|
40
|
-
position: '
|
|
39
|
+
position: 'first',
|
|
41
40
|
filter: AppSurface.predicate(
|
|
42
41
|
AppSurface.Article,
|
|
43
42
|
(data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Collection.Collection }> =>
|
|
@@ -48,7 +47,7 @@ export default Capability.makeModule(() =>
|
|
|
48
47
|
data.subject.type === meta.id &&
|
|
49
48
|
Obj.instanceOf(Collection.Collection, data.subject.object),
|
|
50
49
|
),
|
|
51
|
-
component: ({ role, data }) => <
|
|
50
|
+
component: ({ role, data }) => <CollectionPresenterArticle role={role} subject={data.subject.object} />,
|
|
52
51
|
}),
|
|
53
52
|
Surface.create({
|
|
54
53
|
id: 'slide',
|
|
@@ -56,7 +55,7 @@ export default Capability.makeModule(() =>
|
|
|
56
55
|
component: ({ data }) => <MarkdownSlide document={data.subject} />,
|
|
57
56
|
}),
|
|
58
57
|
Surface.create({
|
|
59
|
-
id: '
|
|
58
|
+
id: 'pluginSettings',
|
|
60
59
|
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
61
60
|
component: ({ data: { subject } }) => {
|
|
62
61
|
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, type ReactNode } from 'react';
|
|
6
6
|
|
|
7
|
-
import { composable, composableProps } from '@dxos/ui
|
|
7
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
9
|
export type LayoutProps = PropsWithChildren<{
|
|
10
10
|
topLeft?: ReactNode;
|
|
@@ -6,7 +6,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
|
|
7
7
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
8
|
|
|
9
|
-
import { translations } from '
|
|
9
|
+
import { translations } from '#translations';
|
|
10
|
+
|
|
10
11
|
import { PresenterSettings } from './PresenterSettings';
|
|
11
12
|
|
|
12
13
|
const meta = {
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
-
import {
|
|
8
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
|
-
import {
|
|
12
|
+
import { Settings } from '#types';
|
|
13
13
|
|
|
14
14
|
export type PresenterSettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;
|
|
15
15
|
|
|
@@ -19,13 +19,12 @@ export const PresenterSettings = ({ settings, onSettingsChange }: PresenterSetti
|
|
|
19
19
|
return (
|
|
20
20
|
<SettingsForm.Viewport>
|
|
21
21
|
<SettingsForm.Section title={t('settings.title', { ns: meta.id })}>
|
|
22
|
-
<SettingsForm.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</SettingsForm.Item>
|
|
22
|
+
<SettingsForm.FieldSet
|
|
23
|
+
readonly={!onSettingsChange}
|
|
24
|
+
schema={Settings.Settings}
|
|
25
|
+
values={settings}
|
|
26
|
+
onValuesChanged={(values) => onSettingsChange?.(() => values)}
|
|
27
|
+
/>
|
|
29
28
|
</SettingsForm.Section>
|
|
30
29
|
</SettingsForm.Viewport>
|
|
31
30
|
);
|
|
@@ -6,8 +6,9 @@ import { type Meta } from '@storybook/react-vite';
|
|
|
6
6
|
|
|
7
7
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
8
|
|
|
9
|
+
import { translations } from '#translations';
|
|
10
|
+
|
|
9
11
|
import CONTENT from '../../../testing/deck.md?raw';
|
|
10
|
-
import { translations } from '../../translations';
|
|
11
12
|
import { RevealPlayer } from './RevealPlayer';
|
|
12
13
|
|
|
13
14
|
// https://revealjs.com/markdown
|
|
@@ -16,7 +16,7 @@ import RevealHighlight from 'reveal.js/plugin/highlight/highlight';
|
|
|
16
16
|
import RevealMarkdown from 'reveal.js/plugin/markdown/plugin.js';
|
|
17
17
|
|
|
18
18
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
19
|
-
import { composable, composableProps } from '@dxos/ui
|
|
19
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
20
20
|
|
|
21
21
|
const styles = `
|
|
22
22
|
<style type="text/css">
|
|
@@ -152,7 +152,7 @@ export const RevealPlayer = composable<HTMLDivElement, RevealProps>(
|
|
|
152
152
|
})}
|
|
153
153
|
ref={forwardedRef}
|
|
154
154
|
>
|
|
155
|
-
<div
|
|
155
|
+
<div className='relative aspect-video h-full w-full h-auto max-h-full overflow-hidden'>
|
|
156
156
|
<div ref={deckDivRef} className='absolute inset-0 reveal'>
|
|
157
157
|
{/* NOTE: Must be in head. */}
|
|
158
158
|
<style>
|
|
@@ -14,9 +14,9 @@ import { PresenterContext } from '#types';
|
|
|
14
14
|
|
|
15
15
|
import { useExitPresenter } from '../../useExitPresenter';
|
|
16
16
|
|
|
17
|
-
export type
|
|
17
|
+
export type CollectionPresenterArticleProps = AppSurface.ObjectArticleProps<Collection.Collection>;
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const CollectionPresenterArticle = ({ role, subject: collection }: CollectionPresenterArticleProps) => {
|
|
20
20
|
const [slide, setSlide] = useState(0);
|
|
21
21
|
const { running } = useContext(PresenterContext);
|
|
22
22
|
const handleExit = useExitPresenter(collection);
|
|
@@ -40,7 +40,7 @@ export const CollectionPresenterContainer = ({ role, subject: collection }: Coll
|
|
|
40
40
|
type={AppSurface.Slide}
|
|
41
41
|
data={{
|
|
42
42
|
subject: collection.objects[slide],
|
|
43
|
-
attendableId: Obj.
|
|
43
|
+
attendableId: Obj.getURI(collection),
|
|
44
44
|
}}
|
|
45
45
|
/>
|
|
46
46
|
</PresenterLayout>
|
package/src/containers/index.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const CollectionPresenterArticle: ComponentType<any> = lazy(() => import('./CollectionPresenterArticle'));
|
|
8
8
|
export const DocumentPresenterContainer: ComponentType<any> = lazy(() => import('./DocumentPresenterContainer'));
|
|
9
9
|
export const MarkdownSlide: ComponentType<any> = lazy(() => import('./MarkdownSlide'));
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -2,17 +2,36 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
6
7
|
import { trim } from '@dxos/util';
|
|
7
8
|
|
|
8
|
-
export const meta
|
|
9
|
-
|
|
9
|
+
export const meta = Plugin.makeMeta({
|
|
10
|
+
key: DXN.make('org.dxos.plugin.presenter'),
|
|
10
11
|
name: 'Presenter',
|
|
12
|
+
author: 'DXOS',
|
|
11
13
|
description: trim`
|
|
12
|
-
Transform
|
|
13
|
-
|
|
14
|
+
Transform existing workspace objects into interactive presentation slideshows without
|
|
15
|
+
duplicating content. Markdown documents are split into slides on horizontal \`---\`
|
|
16
|
+
separators and rendered with Reveal.js, giving authors a familiar authoring surface
|
|
17
|
+
with full Markdown syntax. Collections can optionally be presented slide-by-slide,
|
|
18
|
+
with each member object rendered by its own plugin surface.
|
|
19
|
+
|
|
20
|
+
Activate presentation mode for any supported object via the action menu or the
|
|
21
|
+
Shift+Cmd+P (macOS) / Shift+Alt+P (Windows/Linux) keyboard shortcut. The presenter
|
|
22
|
+
opens in a solo fullscreen layout managed by the Deck plugin, keeping the rest of the
|
|
23
|
+
workspace undisturbed.
|
|
24
|
+
|
|
25
|
+
Navigation controls and a page-number indicator are shown during collection
|
|
26
|
+
slideshows. Pressing Escape exits fullscreen and returns to the originating document
|
|
27
|
+
or collection view. All navigation is keyboard-accessible.
|
|
28
|
+
|
|
29
|
+
Collaboration is inherent: because slides are backed by live ECHO objects, edits made
|
|
30
|
+
by any peer in the workspace are immediately reflected in an open presentation without
|
|
31
|
+
any manual refresh.
|
|
14
32
|
`,
|
|
15
33
|
icon: 'ph--presentation--regular',
|
|
16
34
|
iconHue: 'indigo',
|
|
17
35
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',
|
|
18
|
-
|
|
36
|
+
spec: 'PLUGIN.mdl',
|
|
37
|
+
});
|
package/src/plugin.ts
ADDED
package/src/translations.ts
CHANGED
|
@@ -13,8 +13,6 @@ export const translations = [
|
|
|
13
13
|
'plugin.name': 'Presenter',
|
|
14
14
|
'settings.title': 'Presenter settings',
|
|
15
15
|
'toggle-presentation.label': 'Present',
|
|
16
|
-
'present-collections.label': 'Present collections (experimental)',
|
|
17
|
-
'present-collections.description': 'Enable presenting collections of documents as a slideshow.',
|
|
18
16
|
},
|
|
19
17
|
},
|
|
20
18
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
|
|
13
|
+
// Inline import to avoid `Settings` namespace alias colliding with the
|
|
14
|
+
// `Settings` capability export below.
|
|
15
|
+
export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { Collection, Type, DXN } from '@dxos/echo';
|
|
11
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
12
|
+
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
|
|
15
|
+
const makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);
|
|
16
|
+
|
|
17
|
+
// TODO(wittjosiah): This appears to be unused.
|
|
18
|
+
export const TogglePresentation = Operation.make({
|
|
19
|
+
meta: {
|
|
20
|
+
key: makeKey('togglePresentation'),
|
|
21
|
+
name: 'Toggle Presentation',
|
|
22
|
+
icon: 'ph--presentation--regular',
|
|
23
|
+
},
|
|
24
|
+
input: Schema.Struct({
|
|
25
|
+
object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(Collection.Collection)),
|
|
26
|
+
state: Schema.optional(Schema.Boolean),
|
|
27
|
+
}),
|
|
28
|
+
output: Schema.Void,
|
|
29
|
+
});
|
package/src/types/Settings.ts
CHANGED
|
@@ -8,7 +8,12 @@ import * as Schema from 'effect/Schema';
|
|
|
8
8
|
|
|
9
9
|
export const Settings = Schema.mutable(
|
|
10
10
|
Schema.Struct({
|
|
11
|
-
presentCollections: Schema.optional(
|
|
11
|
+
presentCollections: Schema.optional(
|
|
12
|
+
Schema.Boolean.annotations({
|
|
13
|
+
title: 'Present collections (experimental)',
|
|
14
|
+
description: 'Enable presenting collections of documents as a slideshow.',
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
12
17
|
}),
|
|
13
18
|
);
|
|
14
19
|
|