@dxos/plugin-presenter 0.9.1-staging.ee54ba693a → 0.11.0
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/PLUGIN.mdl +5 -3
- package/dist/lib/PresenterPlugin.mjs +22 -0
- package/dist/lib/PresenterPlugin.mjs.map +1 -0
- package/dist/lib/PresenterPlugin.node.mjs +10 -0
- package/dist/lib/PresenterPlugin.node.mjs.map +1 -0
- package/dist/lib/PresenterPlugin.workerd.mjs +8 -0
- package/dist/lib/PresenterPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +11 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-CollectionArticle.mjs +49 -0
- package/dist/lib/chunk-CollectionArticle.mjs.map +1 -0
- package/dist/lib/chunk-DocumentArticle.mjs +32 -0
- package/dist/lib/chunk-DocumentArticle.mjs.map +1 -0
- package/dist/lib/chunk-SlideArticle.mjs +17 -0
- package/dist/lib/chunk-SlideArticle.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +57 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-markdown-extension.mjs +31 -0
- package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-MSQDHOPV.mjs → chunk-meta.mjs} +19 -23
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +42 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +23 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-toggle-presentation.mjs +48 -0
- package/dist/lib/chunk-toggle-presentation.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +57 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-useExitPresenter.mjs +20 -0
- package/dist/lib/chunk-useExitPresenter.mjs.map +1 -0
- package/dist/lib/components.mjs +465 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +9 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/index.mjs +3 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +8 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +27 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +10 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/components/Presenter/Layout.d.ts +1 -1
- package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/PresentationShell.d.ts +1 -1
- package/dist/types/src/components/Presenter/PresentationShell.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +1 -1
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +4 -1
- package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts +4 -1
- package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts +4 -1
- package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts.map +1 -1
- package/dist/types/src/operations/toggle-presentation.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/types/PresenterCapabilities.d.ts +1 -1
- package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -0
- package/package.json +39 -39
- package/src/capabilities/app-graph-builder.ts +2 -3
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +6 -4
- package/src/components/Markdown/Panel.tsx +1 -1
- package/src/components/Markdown/theme.ts +1 -1
- package/src/components/Presenter/Layout.tsx +1 -1
- package/src/components/RevealPlayer/RevealPlayer.tsx +1 -1
- package/src/containers/CollectionArticle/CollectionArticle.tsx +2 -0
- package/src/containers/DocumentArticle/DocumentArticle.tsx +2 -0
- package/src/containers/SlideArticle/SlideArticle.tsx +2 -0
- package/src/operations/toggle-presentation.ts +13 -11
- package/src/paths.ts +3 -2
- package/src/types/PresenterCapabilities.ts +1 -1
- package/dist/lib/neutral/CollectionArticle-7R4KJWDW.mjs +0 -47
- package/dist/lib/neutral/CollectionArticle-7R4KJWDW.mjs.map +0 -7
- package/dist/lib/neutral/DocumentArticle-YZRKVEN7.mjs +0 -32
- package/dist/lib/neutral/DocumentArticle-YZRKVEN7.mjs.map +0 -7
- package/dist/lib/neutral/PresenterPlugin.mjs +0 -42
- package/dist/lib/neutral/PresenterPlugin.mjs.map +0 -7
- package/dist/lib/neutral/PresenterPlugin.node.mjs +0 -16
- package/dist/lib/neutral/PresenterPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/PresenterPlugin.workerd.mjs +0 -12
- package/dist/lib/neutral/PresenterPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs +0 -20
- package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-FNDFY5L3.mjs +0 -81
- package/dist/lib/neutral/app-graph-builder-FNDFY5L3.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -17
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-63IF7OXT.mjs +0 -19
- package/dist/lib/neutral/chunk-63IF7OXT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MSQDHOPV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NDZ6IIAL.mjs +0 -73
- package/dist/lib/neutral/chunk-NDZ6IIAL.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -563
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -13
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -18
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs +0 -37
- package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs +0 -13
- package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -9
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -12
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-VO4GPCLQ.mjs +0 -42
- package/dist/lib/neutral/react-surface-VO4GPCLQ.mjs.map +0 -7
- package/dist/lib/neutral/settings-DBV7N5HT.mjs +0 -28
- package/dist/lib/neutral/settings-DBV7N5HT.mjs.map +0 -7
- package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs +0 -60
- package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -18
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -14
- package/dist/lib/neutral/types/index.mjs.map +0 -7
package/dx.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-presenter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Braneframe presenter plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"#capabilities": {
|
|
17
17
|
"source": "./src/capabilities/index.ts",
|
|
18
18
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
-
"default": "./dist/lib/
|
|
19
|
+
"default": "./dist/lib/capabilities.mjs"
|
|
20
20
|
},
|
|
21
21
|
"#components": {
|
|
22
22
|
"source": "./src/components/index.ts",
|
|
23
23
|
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
-
"default": "./dist/lib/
|
|
24
|
+
"default": "./dist/lib/components.mjs"
|
|
25
25
|
},
|
|
26
26
|
"#containers": {
|
|
27
27
|
"source": "./src/containers/index.ts",
|
|
28
28
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
-
"default": "./dist/lib/
|
|
29
|
+
"default": "./dist/lib/containers.mjs"
|
|
30
30
|
},
|
|
31
31
|
"#meta": {
|
|
32
32
|
"source": "./src/meta.ts",
|
|
33
33
|
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
-
"default": "./dist/lib/
|
|
34
|
+
"default": "./dist/lib/meta.mjs"
|
|
35
35
|
},
|
|
36
36
|
"#operations": {
|
|
37
37
|
"source": "./src/operations/index.ts",
|
|
38
38
|
"types": "./dist/types/src/operations/index.d.ts",
|
|
39
|
-
"default": "./dist/lib/
|
|
39
|
+
"default": "./dist/lib/operations.mjs"
|
|
40
40
|
},
|
|
41
41
|
"#plugin": {
|
|
42
42
|
"source": {
|
|
@@ -45,38 +45,38 @@
|
|
|
45
45
|
"default": "./src/PresenterPlugin.tsx"
|
|
46
46
|
},
|
|
47
47
|
"types": "./dist/types/src/PresenterPlugin.d.ts",
|
|
48
|
-
"workerd": "./dist/lib/
|
|
49
|
-
"node": "./dist/lib/
|
|
50
|
-
"default": "./dist/lib/
|
|
48
|
+
"workerd": "./dist/lib/PresenterPlugin.workerd.mjs",
|
|
49
|
+
"node": "./dist/lib/PresenterPlugin.node.mjs",
|
|
50
|
+
"default": "./dist/lib/PresenterPlugin.mjs"
|
|
51
51
|
},
|
|
52
52
|
"#testing": "./src/testing.ts",
|
|
53
53
|
"#translations": {
|
|
54
54
|
"source": "./src/translations.ts",
|
|
55
55
|
"types": "./dist/types/src/translations.d.ts",
|
|
56
|
-
"default": "./dist/lib/
|
|
56
|
+
"default": "./dist/lib/translations.mjs"
|
|
57
57
|
},
|
|
58
58
|
"#types": {
|
|
59
59
|
"source": "./src/types/index.ts",
|
|
60
60
|
"types": "./dist/types/src/types/index.d.ts",
|
|
61
|
-
"default": "./dist/lib/
|
|
61
|
+
"default": "./dist/lib/types.mjs"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"exports": {
|
|
65
65
|
".": {
|
|
66
66
|
"source": "./src/index.ts",
|
|
67
67
|
"types": "./dist/types/src/index.d.ts",
|
|
68
|
-
"
|
|
68
|
+
"import": "./dist/lib/index.mjs"
|
|
69
69
|
},
|
|
70
70
|
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
71
71
|
"./plugin": {
|
|
72
72
|
"source": "./src/plugin.ts",
|
|
73
73
|
"types": "./dist/types/src/plugin.d.ts",
|
|
74
|
-
"
|
|
74
|
+
"import": "./dist/lib/plugin.mjs"
|
|
75
75
|
},
|
|
76
76
|
"./translations": {
|
|
77
77
|
"source": "./src/translations.ts",
|
|
78
78
|
"types": "./dist/types/src/translations.d.ts",
|
|
79
|
-
"
|
|
79
|
+
"import": "./dist/lib/translations.mjs"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"PLUGIN.mdl"
|
|
88
88
|
],
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@codemirror/state": "^6.
|
|
91
|
-
"@effect-atom/atom
|
|
90
|
+
"@codemirror/state": "^6.7.1",
|
|
91
|
+
"@effect-atom/atom": "^0.5.3",
|
|
92
92
|
"hastscript": "^7.1.0",
|
|
93
93
|
"highlight.js": "^11.9.0",
|
|
94
94
|
"marked": "^12.0.2",
|
|
@@ -99,21 +99,21 @@
|
|
|
99
99
|
"remark-frontmatter": "^5.0.0",
|
|
100
100
|
"remark-parse-frontmatter": "^1.0.3",
|
|
101
101
|
"reveal.js": "^5.1.0",
|
|
102
|
-
"@dxos/app-framework": "0.
|
|
103
|
-
"@dxos/app-toolkit": "0.
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/plugin-
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/plugin-markdown": "0.
|
|
112
|
-
"@dxos/react-ui-attention": "0.
|
|
113
|
-
"@dxos/ui-
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/util": "0.
|
|
116
|
-
"@dxos/
|
|
102
|
+
"@dxos/app-framework": "0.11.0",
|
|
103
|
+
"@dxos/app-toolkit": "0.11.0",
|
|
104
|
+
"@dxos/effect": "0.11.0",
|
|
105
|
+
"@dxos/echo": "0.11.0",
|
|
106
|
+
"@dxos/compute": "0.11.0",
|
|
107
|
+
"@dxos/keys": "0.11.0",
|
|
108
|
+
"@dxos/plugin-client": "0.11.0",
|
|
109
|
+
"@dxos/log": "0.11.0",
|
|
110
|
+
"@dxos/plugin-graph": "0.11.0",
|
|
111
|
+
"@dxos/plugin-markdown": "0.11.0",
|
|
112
|
+
"@dxos/react-ui-attention": "0.11.0",
|
|
113
|
+
"@dxos/react-ui-form": "0.11.0",
|
|
114
|
+
"@dxos/ui-editor": "0.11.0",
|
|
115
|
+
"@dxos/util": "0.11.0",
|
|
116
|
+
"@dxos/plugin-deck": "0.11.0"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
"effect": "3.21.4",
|
|
125
125
|
"react": "~19.2.7",
|
|
126
126
|
"react-dom": "~19.2.7",
|
|
127
|
-
"vite": "^8.
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/
|
|
130
|
-
"@dxos/
|
|
131
|
-
"@dxos/
|
|
132
|
-
"@dxos/ui-theme": "0.
|
|
127
|
+
"vite": "^8.1.4",
|
|
128
|
+
"@dxos/react-ui": "0.11.0",
|
|
129
|
+
"@dxos/random": "0.11.0",
|
|
130
|
+
"@dxos/plugin-testing": "0.11.0",
|
|
131
|
+
"@dxos/storybook-utils": "0.11.0",
|
|
132
|
+
"@dxos/ui-theme": "0.11.0"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
"effect": "3.21.4",
|
|
138
138
|
"react": "~19.2.7",
|
|
139
139
|
"react-dom": "~19.2.7",
|
|
140
|
-
"@dxos/
|
|
141
|
-
"@dxos/ui
|
|
140
|
+
"@dxos/ui-theme": "^0.11.0",
|
|
141
|
+
"@dxos/react-ui": "^0.11.0"
|
|
142
142
|
},
|
|
143
143
|
"publishConfig": {
|
|
144
144
|
"access": "public"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Atom } from '@effect-atom/atom
|
|
5
|
+
import { type Atom } from '@effect-atom/atom';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
import * as Option from 'effect/Option';
|
|
8
8
|
|
|
@@ -12,7 +12,6 @@ import { Operation } from '@dxos/compute';
|
|
|
12
12
|
import { Collection, Obj } from '@dxos/echo';
|
|
13
13
|
import { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
14
14
|
import { Markdown } from '@dxos/plugin-markdown';
|
|
15
|
-
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
16
15
|
|
|
17
16
|
import { meta } from '#meta';
|
|
18
17
|
import { PresenterOperation } from '#types';
|
|
@@ -44,7 +43,7 @@ export default Capability.makeModule(
|
|
|
44
43
|
|
|
45
44
|
return Effect.succeed([
|
|
46
45
|
AppNode.makeCompanion({
|
|
47
|
-
|
|
46
|
+
variant: 'presenter',
|
|
48
47
|
label: 'Presenter',
|
|
49
48
|
icon: 'ph--presentation--regular',
|
|
50
49
|
data: { type: meta.profile.key, object },
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
8
|
import { Surface } from '@dxos/app-framework/ui';
|
|
@@ -31,7 +30,8 @@ export default Capability.makeModule(() =>
|
|
|
31
30
|
data.subject.type === meta.profile.key &&
|
|
32
31
|
Obj.instanceOf(Markdown.Document, data.subject.object),
|
|
33
32
|
),
|
|
34
|
-
component:
|
|
33
|
+
component: DocumentArticle,
|
|
34
|
+
props: ({ role, data: { subject } }) => ({ role, subject: subject.object }),
|
|
35
35
|
}),
|
|
36
36
|
Surface.create({
|
|
37
37
|
id: 'collection',
|
|
@@ -46,12 +46,14 @@ export default Capability.makeModule(() =>
|
|
|
46
46
|
data.subject.type === meta.profile.key &&
|
|
47
47
|
Obj.instanceOf(Collection.Collection, data.subject.object),
|
|
48
48
|
),
|
|
49
|
-
component:
|
|
49
|
+
component: CollectionArticle,
|
|
50
|
+
props: ({ role, data: { subject } }) => ({ role, subject: subject.object }),
|
|
50
51
|
}),
|
|
51
52
|
Surface.create({
|
|
52
53
|
id: 'slide',
|
|
53
54
|
filter: AppSurface.object(AppSurface.Slide, Markdown.Document),
|
|
54
|
-
component:
|
|
55
|
+
component: SlideArticle,
|
|
56
|
+
props: ({ data }) => ({ ...data }),
|
|
55
57
|
}),
|
|
56
58
|
]),
|
|
57
59
|
),
|
|
@@ -35,7 +35,7 @@ export const Panel = ({ children, classNames }: PanelProps) => {
|
|
|
35
35
|
// TODO(burdon): Reconcile highlight colors with markdown editor.
|
|
36
36
|
// https://www.npmjs.com/package/react-markdown
|
|
37
37
|
return (
|
|
38
|
-
<div ref={containerRef} className={mx('flex grow relative overflow-hidden
|
|
38
|
+
<div ref={containerRef} className={mx('flex grow relative overflow-hidden dx-attention-surface', classNames)}>
|
|
39
39
|
<div className={mx('dx-container absolute')} style={props}>
|
|
40
40
|
{width && height && children}
|
|
41
41
|
</div>
|
|
@@ -17,7 +17,7 @@ export const Layout = composable<HTMLDivElement, LayoutProps>(
|
|
|
17
17
|
({ children, topLeft, topRight, bottomLeft, bottomRight, ...props }, forwardedRef) => {
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
|
-
{...composableProps(props, { classNames: 'flex grow relative overflow-hidden
|
|
20
|
+
{...composableProps(props, { classNames: 'flex grow relative overflow-hidden dx-attention-surface' })}
|
|
21
21
|
ref={forwardedRef}
|
|
22
22
|
>
|
|
23
23
|
<div className='flex flex-col grow overflow-hidden'>{children}</div>
|
|
@@ -162,7 +162,7 @@ export const RevealPlayer = composable<HTMLDivElement, RevealProps>(
|
|
|
162
162
|
rel='stylesheet'
|
|
163
163
|
href='https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap'
|
|
164
164
|
/>
|
|
165
|
-
<div className={mx('slides', !fullscreen && '
|
|
165
|
+
<div className={mx('slides', !fullscreen && 'dx-base-surface p-8')}>
|
|
166
166
|
<div />
|
|
167
167
|
<section {...{ 'data-markdown': [] }}>
|
|
168
168
|
<textarea {...{ 'data-template': true }} defaultValue={[styles, content].join('\n')}></textarea>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { GraphPath, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';
|
|
@@ -28,28 +28,30 @@ const handler: Operation.WithHandler<typeof PresenterOperation.TogglePresentatio
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const objectPath =
|
|
31
|
+
const objectPath = GraphPath.getObjectPathFromObject(object);
|
|
32
32
|
const presenterId = getPresentationPath(objectPath);
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const presenting = Boolean(deck?.fullscreen && deck?.solo === presenterId);
|
|
33
|
+
const ephemeral = yield* Capabilities.getAtomValue(DeckCapabilities.EphemeralState);
|
|
34
|
+
const presenting = ephemeral.fullscreen === presenterId;
|
|
36
35
|
const next = state ?? !presenting;
|
|
37
36
|
|
|
38
37
|
if (next) {
|
|
39
|
-
if (!
|
|
40
|
-
|
|
38
|
+
if (!presenting) {
|
|
39
|
+
// Toggles ephemeral fullscreen from undefined to `presenterId`.
|
|
40
|
+
yield* Operation.invoke(DeckOperation.Adjust, { type: 'fullscreen' as const, id: presenterId });
|
|
41
41
|
}
|
|
42
42
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
43
43
|
subject: [presenterId],
|
|
44
|
-
workspace:
|
|
44
|
+
workspace: GraphPath.getSpacePath(db.spaceId),
|
|
45
45
|
});
|
|
46
46
|
} else {
|
|
47
|
-
if (
|
|
48
|
-
|
|
47
|
+
if (presenting) {
|
|
48
|
+
// Toggles ephemeral fullscreen back to undefined; `id` must match the currently-fullscreen
|
|
49
|
+
// plank for the toggle in `adjust.ts` to clear it rather than switching it.
|
|
50
|
+
yield* Operation.invoke(DeckOperation.Adjust, { type: 'fullscreen' as const, id: presenterId });
|
|
49
51
|
}
|
|
50
52
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
51
53
|
subject: [objectPath],
|
|
52
|
-
workspace:
|
|
54
|
+
workspace: GraphPath.getSpacePath(db.spaceId),
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
}),
|
package/src/paths.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Attention } from '@dxos/react-ui-attention';
|
|
6
6
|
|
|
7
7
|
/** Canonical qualified path to the presentation companion node for an object. */
|
|
8
|
-
export const getPresentationPath = (objectPath: string): string =>
|
|
8
|
+
export const getPresentationPath = (objectPath: string): string =>
|
|
9
|
+
`${objectPath}/${Attention.linkedSegment('presenter')}`;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useExitPresenter
|
|
3
|
-
} from "./chunk-63IF7OXT.mjs";
|
|
4
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/containers/CollectionArticle/CollectionArticle.tsx
|
|
7
|
-
import React, { useContext, useState } from "react";
|
|
8
|
-
import { Surface } from "@dxos/app-framework/ui";
|
|
9
|
-
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
10
|
-
import { Obj } from "@dxos/echo";
|
|
11
|
-
import { Panel } from "@dxos/react-ui";
|
|
12
|
-
import { PageNumber, Pager, PresentationShell, Layout as PresenterLayout } from "#components";
|
|
13
|
-
import { PresenterContext } from "#types";
|
|
14
|
-
var CollectionArticle = ({ role, subject: collection }) => {
|
|
15
|
-
const [slide, setSlide] = useState(0);
|
|
16
|
-
const { running } = useContext(PresenterContext);
|
|
17
|
-
const handleExit = useExitPresenter(collection);
|
|
18
|
-
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
19
|
-
role,
|
|
20
|
-
classNames: "relative"
|
|
21
|
-
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
22
|
-
asChild: true
|
|
23
|
-
}, /* @__PURE__ */ React.createElement(PresentationShell, {
|
|
24
|
-
onExit: handleExit
|
|
25
|
-
}, /* @__PURE__ */ React.createElement(PresenterLayout, {
|
|
26
|
-
bottomRight: /* @__PURE__ */ React.createElement(PageNumber, {
|
|
27
|
-
index: slide,
|
|
28
|
-
count: collection.objects.length
|
|
29
|
-
}),
|
|
30
|
-
bottomLeft: /* @__PURE__ */ React.createElement(Pager, {
|
|
31
|
-
index: slide,
|
|
32
|
-
count: collection.objects.length,
|
|
33
|
-
keys: running,
|
|
34
|
-
onChange: setSlide
|
|
35
|
-
})
|
|
36
|
-
}, /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
37
|
-
type: AppSurface.Slide,
|
|
38
|
-
data: {
|
|
39
|
-
subject: collection.objects[slide],
|
|
40
|
-
attendableId: Obj.getURI(collection)
|
|
41
|
-
}
|
|
42
|
-
})))));
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
CollectionArticle as default
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=CollectionArticle-7R4KJWDW.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/CollectionArticle/CollectionArticle.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useContext, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Collection, Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\n\nimport { PageNumber, Pager, PresentationShell, Layout as PresenterLayout } from '#components';\nimport { PresenterContext } from '#types';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport type CollectionArticleProps = AppSurface.ObjectArticleProps<Collection.Collection>;\n\nexport const CollectionArticle = ({ role, subject: collection }: CollectionArticleProps) => {\n const [slide, setSlide] = useState(0);\n const { running } = useContext(PresenterContext);\n const handleExit = useExitPresenter(collection);\n\n return (\n <Panel.Root role={role} classNames='relative'>\n <Panel.Content asChild>\n <PresentationShell onExit={handleExit}>\n <PresenterLayout\n bottomRight={<PageNumber index={slide} count={collection.objects.length} />}\n bottomLeft={<Pager index={slide} count={collection.objects.length} keys={running} onChange={setSlide} />}\n >\n <Surface.Surface\n type={AppSurface.Slide}\n data={{\n subject: collection.objects[slide],\n attendableId: Obj.getURI(collection),\n }}\n />\n </PresenterLayout>\n </PresentationShell>\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,SAASC,YAAYC,gBAAgB;AAE5C,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAA0BC,WAAW;AACrC,SAASC,aAAa;AAEtB,SAASC,YAAYC,OAAOC,mBAAmBC,UAAUC,uBAAuB;AAChF,SAASC,wBAAwB;AAM1B,IAAMC,oBAAoB,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAA0B;AACrF,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAS,CAAA;AACnC,QAAM,EAAEC,QAAO,IAAKC,WAAWC,gBAAAA;AAC/B,QAAMC,aAAaC,iBAAiBR,UAAAA;AAEpC,SACE,sBAAA,cAACS,MAAMC,MAAI;IAACZ;IAAYa,YAAW;KACjC,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,mBAAAA;IAAkBC,QAAQR;KACzB,sBAAA,cAACS,iBAAAA;IACCC,aAAa,sBAAA,cAACC,YAAAA;MAAWC,OAAOlB;MAAOmB,OAAOpB,WAAWqB,QAAQC;;IACjEC,YAAY,sBAAA,cAACC,OAAAA;MAAML,OAAOlB;MAAOmB,OAAOpB,WAAWqB,QAAQC;MAAQG,MAAMrB;MAASsB,UAAUxB;;KAE5F,sBAAA,cAACyB,QAAQA,SAAO;IACdC,MAAMC,WAAWC;IACjBC,MAAM;MACJhC,SAASC,WAAWqB,QAAQpB,KAAAA;MAC5B+B,cAAcC,IAAIC,OAAOlC,UAAAA;IAC3B;;AAOd;",
|
|
6
|
-
"names": ["React", "useContext", "useState", "Surface", "AppSurface", "Obj", "Panel", "PageNumber", "Pager", "PresentationShell", "Layout", "PresenterLayout", "PresenterContext", "CollectionArticle", "role", "subject", "collection", "slide", "setSlide", "useState", "running", "useContext", "PresenterContext", "handleExit", "useExitPresenter", "Panel", "Root", "classNames", "Content", "asChild", "PresentationShell", "onExit", "PresenterLayout", "bottomRight", "PageNumber", "index", "count", "objects", "length", "bottomLeft", "Pager", "keys", "onChange", "Surface", "type", "AppSurface", "Slide", "data", "attendableId", "Obj", "getURI"]
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useExitPresenter
|
|
3
|
-
} from "./chunk-63IF7OXT.mjs";
|
|
4
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/containers/DocumentArticle/DocumentArticle.tsx
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { useLayout } from "@dxos/app-toolkit/ui";
|
|
9
|
-
import { Panel } from "@dxos/react-ui";
|
|
10
|
-
import { PresentationShell, RevealPlayer } from "#components";
|
|
11
|
-
var DocumentArticle = ({ role, subject: document }) => {
|
|
12
|
-
const handleExit = useExitPresenter(document);
|
|
13
|
-
const layout = useLayout();
|
|
14
|
-
const fullscreen = layout.mode === "solo--fullscreen";
|
|
15
|
-
const content = document.content.target?.content;
|
|
16
|
-
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
17
|
-
role,
|
|
18
|
-
classNames: "relative"
|
|
19
|
-
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
20
|
-
asChild: true
|
|
21
|
-
}, /* @__PURE__ */ React.createElement(PresentationShell, {
|
|
22
|
-
fullscreen,
|
|
23
|
-
onExit: handleExit
|
|
24
|
-
}, content !== void 0 && /* @__PURE__ */ React.createElement(RevealPlayer, {
|
|
25
|
-
fullscreen,
|
|
26
|
-
content
|
|
27
|
-
}))));
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
DocumentArticle as default
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=DocumentArticle-YZRKVEN7.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/DocumentArticle/DocumentArticle.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { AppSurface, useLayout } from '@dxos/app-toolkit/ui';\nimport { type Markdown } from '@dxos/plugin-markdown';\nimport { Panel } from '@dxos/react-ui';\n\nimport { PresentationShell, RevealPlayer } from '#components';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport type DocumentArticleProps = AppSurface.ObjectArticleProps<Markdown.Document>;\n\nexport const DocumentArticle = ({ role, subject: document }: DocumentArticleProps) => {\n const handleExit = useExitPresenter(document);\n const layout = useLayout();\n const fullscreen = layout.mode === 'solo--fullscreen';\n // RevealPlayer seeds its deck once from `content` (via a `defaultValue`); wait for the markdown ref to\n // resolve so the presentation isn't initialized empty and left blank when the content arrives later.\n const content = document.content.target?.content;\n\n return (\n <Panel.Root role={role} classNames='relative'>\n <Panel.Content asChild>\n <PresentationShell fullscreen={fullscreen} onExit={handleExit}>\n {content !== undefined && <RevealPlayer fullscreen={fullscreen} content={content} />}\n </PresentationShell>\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,WAAW;AAElB,SAAqBC,iBAAiB;AAEtC,SAASC,aAAa;AAEtB,SAASC,mBAAmBC,oBAAoB;AAMzC,IAAMC,kBAAkB,CAAC,EAAEC,MAAMC,SAASC,SAAQ,MAAwB;AAC/E,QAAMC,aAAaC,iBAAiBF,QAAAA;AACpC,QAAMG,SAASC,UAAAA;AACf,QAAMC,aAAaF,OAAOG,SAAS;AAGnC,QAAMC,UAAUP,SAASO,QAAQC,QAAQD;AAEzC,SACE,sBAAA,cAACE,MAAMC,MAAI;IAACZ;IAAYa,YAAW;KACjC,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,mBAAAA;IAAkBT;IAAwBU,QAAQd;KAChDM,YAAYS,UAAa,sBAAA,cAACC,cAAAA;IAAaZ;IAAwBE;;AAK1E;",
|
|
6
|
-
"names": ["React", "useLayout", "Panel", "PresentationShell", "RevealPlayer", "DocumentArticle", "role", "subject", "document", "handleExit", "useExitPresenter", "layout", "useLayout", "fullscreen", "mode", "content", "target", "Panel", "Root", "classNames", "Content", "asChild", "PresentationShell", "onExit", "undefined", "RevealPlayer"]
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/PresenterPlugin.tsx
|
|
4
|
-
import { Plugin } from "@dxos/app-framework";
|
|
5
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
-
import { MarkdownEvents } from "@dxos/plugin-markdown";
|
|
7
|
-
import { AppGraphBuilder, MarkdownExtension, OperationHandler, PresenterSettings, ReactSurface } from "#capabilities";
|
|
8
|
-
import { meta } from "#meta";
|
|
9
|
-
import { translations } from "#translations";
|
|
10
|
-
|
|
11
|
-
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-presenter/PLUGIN.mdl
|
|
12
|
-
var PLUGIN_default = '---\nid: org.dxos.plugin.presenter\nname: PresenterPlugin\nversion: 0.1.0\n---\n\nA presentation plugin for DXOS Composer that turns existing workspace objects \u2014 markdown documents and collections \u2014 into interactive slideshows with fullscreen mode and keyboard navigation.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype PresentationTarget\n literals: document | collection\n desc: The kind of workspace object being presented.\n```\n\n```mdl\ntype SlideIndex\n fields:\n current: number # zero-based index of the active slide\n count: number # total number of slides in the presentation\n```\n\n```mdl\ntype PresentationSettings\n fields:\n presentCollections?: boolean # when true, Collections may also be presented as slideshows (experimental)\n```\n\n## Components\n\n```mdl\ncomponent DocumentArticle\n desc: |\n Full-screen Reveal.js player for a single Markdown document.\n Parses the document content into slides using horizontal/vertical `---` separators.\n Renders in a Panel that fills the available viewport.\n props:\n document: Markdown.Document\n slots:\n (none)\n actions:\n exit() # navigates back to the originating document view\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u2502\n \u2502 RevealPlayer \u2502\n \u2502 (full-screen slide canvas) \u2502\n \u2502 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CollectionArticle\n desc: |\n Slideshow player for a Collection.\n Renders one slide per object in the collection\'s ordered items array.\n The active slide is delegated to the AppSurface.Slide surface, so each\n item\'s own plugin renders it (e.g. SlideArticle for documents).\n props:\n subject: Collection.Collection\n role?: string\n state:\n slide: number # zero-based index of the current slide\n running: boolean # whether keyboard navigation is active (from PresenterContext)\n slots:\n (none)\n actions:\n setSlide(index: number)\n exit()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u2502\n \u2502 Surface (slide N) \u2502 \u2190 AppSurface.Slide surface\n \u2502 \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [Pager] \u2502 [PageNum] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent SlideArticle\n desc: |\n Renders a single Markdown document as a slide panel inside a Collection presentation.\n Used as the AppSurface.Slide surface implementation for Markdown.Document objects.\n props:\n document: Markdown.Document\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Panel \u2502\n \u2502 \u2514\u2500 Slide (markdown) \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop TogglePresentation\n desc: |\n Toggles presentation mode for a Markdown document or Collection.\n Opens the presenter companion node in solo-fullscreen layout via the Deck plugin.\n If the deck is not already in fullscreen, switches to solo--fullscreen before opening.\n input:\n object: Markdown.Document | Collection.Collection\n state?: boolean # explicit on/off override; omit to toggle\n output: void\n effects: [layout:navigate, deck:solo-fullscreen]\n requires: [DeckCapabilities.State, DeckOperation.Adjust, LayoutOperation.Open]\n note: |\n Resolves the presenter companion node path as `<objectPath>/presenter`.\n Keyboard shortcut: Shift+Cmd+P (macOS), Shift+Alt+P (Windows/Linux).\n```\n\n## Features\n\n```mdl\nfeat F-1: Presentation Mode\n\n req F-1.1: Every Markdown document in the workspace has a companion "Presenter" node in the app graph.\n req F-1.2:\n when: settings.presentCollections is true\n then: every Collection also has a companion Presenter node\n req F-1.3:\n when: user activates TogglePresentation on a document or collection\n then: Composer opens the presenter node in solo-fullscreen mode\n req F-1.4:\n when: user presses Shift+Cmd+P (macOS) or Shift+Alt+P (Windows)\n then: TogglePresentation is invoked for the focused object\n```\n\n```mdl\nfeat F-2: Document Slideshow (Reveal.js)\n\n req F-2.1:\n when: DocumentArticle mounts with a Markdown.Document\n then: RevealPlayer parses the document content and renders slides\n req F-2.2: Horizontal slides are separated by `---`; vertical slides by `----`.\n req F-2.3:\n when: user presses Escape or the exit action is triggered\n then: presenter navigates back to the originating document view\n```\n\n```mdl\nfeat F-3: Collection Slideshow\n\n req F-3.1:\n when: CollectionArticle mounts with a Collection\n then: slide 0 is shown, corresponding to collection.objects[0]\n req F-3.2:\n when: user navigates to slide N via the Pager\n then: the AppSurface.Slide surface renders collection.objects[N]\n req F-3.3: PageNumber displays the current slide index and total count.\n req F-3.4:\n when: user presses Escape or the exit action is triggered\n then: presenter navigates back to the collection view\n```\n\n```mdl\nfeat F-4: Plugin Settings\n\n req F-4.1: PresenterSettings panel is registered for the plugin settings surface.\n req F-4.2:\n when: user enables "Present collections (experimental)"\n then: settings.presentCollections is set to true and Collection nodes gain Presenter companions\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Document presenter opens in fullscreen\n given: a Markdown document exists in the workspace\n when: user invokes TogglePresentation (keyboard or action menu)\n then:\n - Composer switches to solo-fullscreen layout\n - DocumentArticle is shown with the document content\n - RevealPlayer is visible with at least one slide\n```\n\n```mdl\ntest T-2: Slide navigation via Reveal.js\n given: a Markdown document with three `---`-separated sections\n when: DocumentArticle renders the document\n then:\n - three horizontal slides are produced\n - arrow-key navigation advances and retreats between slides\n```\n\n```mdl\ntest T-3: Exit returns to document view\n given: DocumentArticle is open in fullscreen\n when: user presses Escape\n then: Composer navigates back to the document article view\n```\n\n```mdl\ntest T-4: Collection slideshow renders per-item surfaces\n given: a Collection with two Markdown documents and settings.presentCollections = true\n when: CollectionArticle mounts\n then:\n - slide 0 shows SlideArticle for collection.objects[0]\n - Pager shows count = 2\n```\n\n```mdl\ntest T-5: Collection slide advance\n given: CollectionArticle at slide 0 with a three-item collection\n when: user clicks the next-slide control in Pager\n then:\n - slide index advances to 1\n - AppSurface.Slide renders collection.objects[1]\n - PageNumber shows "2 / 3"\n```\n\n```mdl\ntest T-6: Collections hidden when setting disabled\n given: settings.presentCollections is false (default)\n when: app graph is built for a Collection node\n then: no Presenter companion node is created for the collection\n```\n\n```mdl\ntest T-7: Keyboard shortcut registered\n given: a Markdown document node is focused in the app graph\n then:\n - action with key TogglePresentation is present on the node\n - keyBinding shows Shift+Cmd+P on macOS\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n';
|
|
13
|
-
|
|
14
|
-
// src/PresenterPlugin.tsx
|
|
15
|
-
var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
16
|
-
activate: AppGraphBuilder
|
|
17
|
-
}), AppPlugin.addOperationHandlerModule({
|
|
18
|
-
activate: OperationHandler
|
|
19
|
-
}), AppPlugin.addSettingsModule({
|
|
20
|
-
activate: PresenterSettings
|
|
21
|
-
}), AppPlugin.addSurfaceModule({
|
|
22
|
-
activate: ReactSurface
|
|
23
|
-
}), Plugin.addModule({
|
|
24
|
-
id: `${meta.profile.key}/markdown`,
|
|
25
|
-
activatesOn: MarkdownEvents.SetupExtensions,
|
|
26
|
-
activate: MarkdownExtension
|
|
27
|
-
}), AppPlugin.addTranslationsModule({
|
|
28
|
-
translations
|
|
29
|
-
}), AppPlugin.addPluginAssetModule({
|
|
30
|
-
asset: {
|
|
31
|
-
pluginId: meta.profile.key,
|
|
32
|
-
path: "PLUGIN.mdl",
|
|
33
|
-
content: PLUGIN_default,
|
|
34
|
-
mimeType: "application/x-mdl"
|
|
35
|
-
}
|
|
36
|
-
}), Plugin.make);
|
|
37
|
-
var PresenterPlugin_default = PresenterPlugin;
|
|
38
|
-
export {
|
|
39
|
-
PresenterPlugin,
|
|
40
|
-
PresenterPlugin_default as default
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=PresenterPlugin.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/PresenterPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-presenter/PLUGIN.mdl"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\n\nimport { AppGraphBuilder, MarkdownExtension, OperationHandler, PresenterSettings, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\n// TODO(burdon): Only scale markdown content.\n// TODO(burdon): Map stack content; Slide content type (e.g., markdown, sketch, IPFS image, table, etc.)\n\nexport const PresenterPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSettingsModule({ activate: PresenterSettings }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n Plugin.addModule({\n id: `${meta.profile.key}/markdown`,\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: MarkdownExtension,\n }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default PresenterPlugin;\n", "---\nid: org.dxos.plugin.presenter\nname: PresenterPlugin\nversion: 0.1.0\n---\n\nA presentation plugin for DXOS Composer that turns existing workspace objects \u2014 markdown documents and collections \u2014 into interactive slideshows with fullscreen mode and keyboard navigation.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype PresentationTarget\n literals: document | collection\n desc: The kind of workspace object being presented.\n```\n\n```mdl\ntype SlideIndex\n fields:\n current: number # zero-based index of the active slide\n count: number # total number of slides in the presentation\n```\n\n```mdl\ntype PresentationSettings\n fields:\n presentCollections?: boolean # when true, Collections may also be presented as slideshows (experimental)\n```\n\n## Components\n\n```mdl\ncomponent DocumentArticle\n desc: |\n Full-screen Reveal.js player for a single Markdown document.\n Parses the document content into slides using horizontal/vertical `---` separators.\n Renders in a Panel that fills the available viewport.\n props:\n document: Markdown.Document\n slots:\n (none)\n actions:\n exit() # navigates back to the originating document view\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u2502\n \u2502 RevealPlayer \u2502\n \u2502 (full-screen slide canvas) \u2502\n \u2502 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CollectionArticle\n desc: |\n Slideshow player for a Collection.\n Renders one slide per object in the collection's ordered items array.\n The active slide is delegated to the AppSurface.Slide surface, so each\n item's own plugin renders it (e.g. SlideArticle for documents).\n props:\n subject: Collection.Collection\n role?: string\n state:\n slide: number # zero-based index of the current slide\n running: boolean # whether keyboard navigation is active (from PresenterContext)\n slots:\n (none)\n actions:\n setSlide(index: number)\n exit()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u2502\n \u2502 Surface (slide N) \u2502 \u2190 AppSurface.Slide surface\n \u2502 \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [Pager] \u2502 [PageNum] \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent SlideArticle\n desc: |\n Renders a single Markdown document as a slide panel inside a Collection presentation.\n Used as the AppSurface.Slide surface implementation for Markdown.Document objects.\n props:\n document: Markdown.Document\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Panel \u2502\n \u2502 \u2514\u2500 Slide (markdown) \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop TogglePresentation\n desc: |\n Toggles presentation mode for a Markdown document or Collection.\n Opens the presenter companion node in solo-fullscreen layout via the Deck plugin.\n If the deck is not already in fullscreen, switches to solo--fullscreen before opening.\n input:\n object: Markdown.Document | Collection.Collection\n state?: boolean # explicit on/off override; omit to toggle\n output: void\n effects: [layout:navigate, deck:solo-fullscreen]\n requires: [DeckCapabilities.State, DeckOperation.Adjust, LayoutOperation.Open]\n note: |\n Resolves the presenter companion node path as `<objectPath>/presenter`.\n Keyboard shortcut: Shift+Cmd+P (macOS), Shift+Alt+P (Windows/Linux).\n```\n\n## Features\n\n```mdl\nfeat F-1: Presentation Mode\n\n req F-1.1: Every Markdown document in the workspace has a companion \"Presenter\" node in the app graph.\n req F-1.2:\n when: settings.presentCollections is true\n then: every Collection also has a companion Presenter node\n req F-1.3:\n when: user activates TogglePresentation on a document or collection\n then: Composer opens the presenter node in solo-fullscreen mode\n req F-1.4:\n when: user presses Shift+Cmd+P (macOS) or Shift+Alt+P (Windows)\n then: TogglePresentation is invoked for the focused object\n```\n\n```mdl\nfeat F-2: Document Slideshow (Reveal.js)\n\n req F-2.1:\n when: DocumentArticle mounts with a Markdown.Document\n then: RevealPlayer parses the document content and renders slides\n req F-2.2: Horizontal slides are separated by `---`; vertical slides by `----`.\n req F-2.3:\n when: user presses Escape or the exit action is triggered\n then: presenter navigates back to the originating document view\n```\n\n```mdl\nfeat F-3: Collection Slideshow\n\n req F-3.1:\n when: CollectionArticle mounts with a Collection\n then: slide 0 is shown, corresponding to collection.objects[0]\n req F-3.2:\n when: user navigates to slide N via the Pager\n then: the AppSurface.Slide surface renders collection.objects[N]\n req F-3.3: PageNumber displays the current slide index and total count.\n req F-3.4:\n when: user presses Escape or the exit action is triggered\n then: presenter navigates back to the collection view\n```\n\n```mdl\nfeat F-4: Plugin Settings\n\n req F-4.1: PresenterSettings panel is registered for the plugin settings surface.\n req F-4.2:\n when: user enables \"Present collections (experimental)\"\n then: settings.presentCollections is set to true and Collection nodes gain Presenter companions\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Document presenter opens in fullscreen\n given: a Markdown document exists in the workspace\n when: user invokes TogglePresentation (keyboard or action menu)\n then:\n - Composer switches to solo-fullscreen layout\n - DocumentArticle is shown with the document content\n - RevealPlayer is visible with at least one slide\n```\n\n```mdl\ntest T-2: Slide navigation via Reveal.js\n given: a Markdown document with three `---`-separated sections\n when: DocumentArticle renders the document\n then:\n - three horizontal slides are produced\n - arrow-key navigation advances and retreats between slides\n```\n\n```mdl\ntest T-3: Exit returns to document view\n given: DocumentArticle is open in fullscreen\n when: user presses Escape\n then: Composer navigates back to the document article view\n```\n\n```mdl\ntest T-4: Collection slideshow renders per-item surfaces\n given: a Collection with two Markdown documents and settings.presentCollections = true\n when: CollectionArticle mounts\n then:\n - slide 0 shows SlideArticle for collection.objects[0]\n - Pager shows count = 2\n```\n\n```mdl\ntest T-5: Collection slide advance\n given: CollectionArticle at slide 0 with a three-item collection\n when: user clicks the next-slide control in Pager\n then:\n - slide index advances to 1\n - AppSurface.Slide renders collection.objects[1]\n - PageNumber shows \"2 / 3\"\n```\n\n```mdl\ntest T-6: Collections hidden when setting disabled\n given: settings.presentCollections is false (default)\n when: app graph is built for a Collection node\n then: no Presenter companion node is created for the collection\n```\n\n```mdl\ntest T-7: Keyboard shortcut registered\n given: a Markdown document node is focused in the app graph\n then:\n - action with key TogglePresentation is present on the node\n - keyBinding shows Shift+Cmd+P on macOS\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,sBAAsB;AAE/B,SAASC,iBAAiBC,mBAAmBC,kBAAkBC,mBAAmBC,oBAAoB;AACtG,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACV7B;;;ADkBO,IAAMC,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,0BAA0B;EAAEF,UAAUG;AAAiB,CAAA,GACjEL,UAAUM,kBAAkB;EAAEJ,UAAUK;AAAkB,CAAA,GAC1DP,UAAUQ,iBAAiB;EAAEN,UAAUO;AAAa,CAAA,GACpDb,OAAOc,UAAU;EACfC,IAAI,GAAGb,KAAKc,QAAQC,GAAG;EACvBC,aAAaC,eAAeC;EAC5Bd,UAAUe;AACZ,CAAA,GACAjB,UAAUkB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CnB,UAAUoB,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUxB,KAAKc,QAAQC;IAAKU,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACA9B,OAAO+B,IAAI;AAGb,IAAA,0BAAehC;",
|
|
6
|
-
"names": ["Plugin", "AppPlugin", "MarkdownEvents", "AppGraphBuilder", "MarkdownExtension", "OperationHandler", "PresenterSettings", "ReactSurface", "meta", "translations", "PresenterPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationHandlerModule", "OperationHandler", "addSettingsModule", "PresenterSettings", "addSurfaceModule", "ReactSurface", "addModule", "id", "profile", "key", "activatesOn", "MarkdownEvents", "SetupExtensions", "MarkdownExtension", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/PresenterPlugin.node.ts
|
|
4
|
-
import { Plugin } from "@dxos/app-framework";
|
|
5
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
-
import { AppGraphBuilder } from "#capabilities";
|
|
7
|
-
import { meta } from "#meta";
|
|
8
|
-
var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
9
|
-
activate: AppGraphBuilder
|
|
10
|
-
}), Plugin.make);
|
|
11
|
-
var PresenterPlugin_node_default = PresenterPlugin;
|
|
12
|
-
export {
|
|
13
|
-
PresenterPlugin,
|
|
14
|
-
PresenterPlugin_node_default as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=PresenterPlugin.node.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/PresenterPlugin.node.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const PresenterPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n Plugin.make,\n);\n\nexport default PresenterPlugin;\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,uBAAuB;AAChC,SAASC,YAAY;AAEd,IAAMC,kBAAkBJ,OAAOK,OAAOF,IAAAA,EAAMG,KACjDL,UAAUM,kBAAkB;EAAEC,UAAUN;AAAgB,CAAA,GACxDF,OAAOS,IAAI;AAGb,IAAA,+BAAeL;",
|
|
6
|
-
"names": ["Plugin", "AppPlugin", "AppGraphBuilder", "meta", "PresenterPlugin", "define", "pipe", "addAppGraphModule", "activate", "make"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/PresenterPlugin.workerd.ts
|
|
4
|
-
import { Plugin } from "@dxos/app-framework";
|
|
5
|
-
import { meta } from "#meta";
|
|
6
|
-
var PresenterPlugin = Plugin.define(meta).pipe(Plugin.make);
|
|
7
|
-
var PresenterPlugin_workerd_default = PresenterPlugin;
|
|
8
|
-
export {
|
|
9
|
-
PresenterPlugin,
|
|
10
|
-
PresenterPlugin_workerd_default as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=PresenterPlugin.workerd.mjs.map
|