@dxos/plugin-presenter 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
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/CollectionPresenterContainer-5RJIT3DA.mjs → neutral/CollectionPresenterContainer-JMX6INMS.mjs} +12 -18
- package/dist/lib/neutral/CollectionPresenterContainer-JMX6INMS.mjs.map +7 -0
- package/dist/lib/{browser/DocumentPresenterContainer-ISD6N5FM.mjs → neutral/DocumentPresenterContainer-KCDZ2O2C.mjs} +5 -9
- 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 +23 -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/PresenterSettings-2G4XD4QY.mjs +25 -0
- package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs.map +7 -0
- package/dist/lib/{browser/app-graph-builder-LNUGLW3H.mjs → neutral/app-graph-builder-LOVUQ6U5.mjs} +24 -39
- package/dist/lib/neutral/app-graph-builder-LOVUQ6U5.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/{browser/chunk-VQVZVXPJ.mjs → neutral/chunk-4XSSDLGN.mjs} +2 -2
- package/dist/lib/{browser/chunk-VQVZVXPJ.mjs.map → neutral/chunk-4XSSDLGN.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-DCPA267T.mjs +68 -0
- package/dist/lib/neutral/chunk-DCPA267T.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-46CHA6Y5.mjs → neutral/chunk-V323QBC3.mjs} +8 -8
- package/dist/lib/neutral/chunk-V323QBC3.mjs.map +7 -0
- package/dist/lib/{browser/chunk-BHTOR7TG.mjs → neutral/components/index.mjs} +37 -20
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- 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-ATYTHPAA.mjs +55 -0
- package/dist/lib/neutral/react-surface-ATYTHPAA.mjs.map +7 -0
- package/dist/lib/{browser/settings-GIQOCH6O.mjs → neutral/settings-R6LRDAAK.mjs} +7 -11
- 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/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/Panel.d.ts +8 -0
- package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/{Container.stories.d.ts → Panel.stories.d.ts} +1 -1
- package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/Slide.d.ts +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/index.d.ts +1 -1
- package/dist/types/src/components/Markdown/index.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 +5 -5
- package/dist/types/src/components/Presenter/Layout.d.ts.map +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 +6 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +23 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/PresenterSettings/index.d.ts +2 -0
- package/dist/types/src/components/PresenterSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +5 -4
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +7 -6
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts +2 -3
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterContainer/index.d.ts +1 -2
- package/dist/types/src/containers/CollectionPresenterContainer/index.d.ts.map +1 -1
- 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/DocumentPresenterContainer/index.d.ts +1 -2
- package/dist/types/src/containers/DocumentPresenterContainer/index.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/MarkdownSlide/index.d.ts +1 -2
- package/dist/types/src/containers/MarkdownSlide/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -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/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 -6
- 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 +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +11 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/useExitPresenter.d.ts +1 -1
- package/dist/types/src/useExitPresenter.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +85 -34
- package/src/PresenterPlugin.node.ts +16 -0
- package/src/PresenterPlugin.test.ts +23 -0
- package/src/PresenterPlugin.tsx +5 -3
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +23 -26
- package/src/capabilities/index.ts +5 -3
- package/src/capabilities/react-surface.tsx +68 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/components/Markdown/{Container.stories.tsx → Panel.stories.tsx} +5 -5
- package/src/components/Markdown/{Container.tsx → Panel.tsx} +4 -4
- package/src/components/Markdown/Slide.stories.tsx +1 -1
- package/src/components/Markdown/Slide.tsx +2 -2
- package/src/components/Markdown/index.ts +1 -1
- package/src/components/Presenter/Layout.tsx +24 -23
- package/src/components/PresenterSettings/PresenterSettings.stories.tsx +32 -0
- package/src/components/PresenterSettings/PresenterSettings.tsx +31 -0
- package/src/components/PresenterSettings/index.ts +5 -0
- package/src/components/RevealPlayer/RevealPlayer.stories.tsx +2 -2
- package/src/components/RevealPlayer/RevealPlayer.tsx +104 -105
- package/src/components/index.ts +4 -0
- package/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.tsx +13 -6
- package/src/containers/CollectionPresenterContainer/index.ts +1 -3
- package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +3 -2
- package/src/containers/DocumentPresenterContainer/index.ts +1 -3
- package/src/containers/MarkdownSlide/MarkdownSlide.tsx +4 -4
- package/src/containers/MarkdownSlide/index.ts +1 -3
- package/src/containers/index.ts +0 -1
- package/src/index.ts +1 -3
- package/src/meta.ts +1 -1
- package/src/plugin.ts +9 -0
- package/src/testing.ts +6 -6
- package/src/translations.ts +4 -5
- package/src/types/PresenterCapabilities.ts +15 -0
- package/src/types/PresenterOperation.ts +25 -0
- package/src/types/Settings.ts +20 -0
- package/src/types/index.ts +21 -0
- package/src/useExitPresenter.ts +9 -8
- package/dist/lib/browser/CollectionPresenterContainer-5RJIT3DA.mjs.map +0 -7
- package/dist/lib/browser/DocumentPresenterContainer-ISD6N5FM.mjs.map +0 -7
- package/dist/lib/browser/MarkdownSlide-Q2XLZTMW.mjs +0 -23
- package/dist/lib/browser/MarkdownSlide-Q2XLZTMW.mjs.map +0 -7
- package/dist/lib/browser/PresenterSettings-WGQMXH4I.mjs +0 -31
- package/dist/lib/browser/PresenterSettings-WGQMXH4I.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-LNUGLW3H.mjs.map +0 -7
- package/dist/lib/browser/chunk-46CHA6Y5.mjs.map +0 -7
- package/dist/lib/browser/chunk-BHTOR7TG.mjs.map +0 -7
- package/dist/lib/browser/chunk-PSOOAW44.mjs +0 -50
- package/dist/lib/browser/chunk-PSOOAW44.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -65
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-UCM2KRSP.mjs +0 -67
- package/dist/lib/browser/react-surface-UCM2KRSP.mjs.map +0 -7
- package/dist/lib/browser/settings-GIQOCH6O.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/Markdown/Container.d.ts +0 -8
- package/dist/types/src/components/Markdown/Container.d.ts.map +0 -1
- package/dist/types/src/components/Markdown/Container.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PresenterSettings/PresenterSettings.d.ts +0 -8
- package/dist/types/src/containers/PresenterSettings/PresenterSettings.d.ts.map +0 -1
- package/dist/types/src/containers/PresenterSettings/index.d.ts +0 -3
- package/dist/types/src/containers/PresenterSettings/index.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -49
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -71
- package/src/capabilities/settings/index.ts +0 -7
- package/src/containers/PresenterSettings/PresenterSettings.tsx +0 -35
- package/src/containers/PresenterSettings/index.ts +0 -7
- package/src/types.ts +0 -54
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-presenter",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.dfabb4ec29",
|
|
4
4
|
"description": "Braneframe presenter plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,17 +12,66 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
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
|
+
"node": "./src/PresenterPlugin.node.ts",
|
|
39
|
+
"default": "./src/PresenterPlugin.tsx"
|
|
40
|
+
},
|
|
41
|
+
"types": "./dist/types/src/PresenterPlugin.d.ts",
|
|
42
|
+
"node": "./dist/lib/neutral/PresenterPlugin.node.mjs",
|
|
43
|
+
"default": "./dist/lib/neutral/PresenterPlugin.mjs"
|
|
44
|
+
},
|
|
45
|
+
"#testing": "./src/testing.ts",
|
|
46
|
+
"#translations": {
|
|
47
|
+
"source": "./src/translations.ts",
|
|
48
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
50
|
+
},
|
|
51
|
+
"#types": {
|
|
52
|
+
"source": "./src/types/index.ts",
|
|
53
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
15
57
|
"exports": {
|
|
16
58
|
".": {
|
|
17
59
|
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
60
|
+
"types": "./dist/types/src/index.d.ts",
|
|
61
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./plugin": {
|
|
64
|
+
"source": "./src/plugin.ts",
|
|
65
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./translations": {
|
|
69
|
+
"source": "./src/translations.ts",
|
|
70
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
20
72
|
}
|
|
21
73
|
},
|
|
22
74
|
"types": "dist/types/src/index.d.ts",
|
|
23
|
-
"typesVersions": {
|
|
24
|
-
"*": {}
|
|
25
|
-
},
|
|
26
75
|
"files": [
|
|
27
76
|
"dist",
|
|
28
77
|
"src"
|
|
@@ -40,25 +89,26 @@
|
|
|
40
89
|
"remark-frontmatter": "^5.0.0",
|
|
41
90
|
"remark-parse-frontmatter": "^1.0.3",
|
|
42
91
|
"reveal.js": "^5.1.0",
|
|
43
|
-
"@dxos/app-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/echo": "0.8.4-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
52
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
58
|
-
"@dxos/react-ui-
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
92
|
+
"@dxos/app-framework": "0.8.4-main.dfabb4ec29",
|
|
93
|
+
"@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
|
|
94
|
+
"@dxos/effect": "0.8.4-main.dfabb4ec29",
|
|
95
|
+
"@dxos/echo": "0.8.4-main.dfabb4ec29",
|
|
96
|
+
"@dxos/async": "0.8.4-main.dfabb4ec29",
|
|
97
|
+
"@dxos/log": "0.8.4-main.dfabb4ec29",
|
|
98
|
+
"@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
|
|
99
|
+
"@dxos/plugin-deck": "0.8.4-main.dfabb4ec29",
|
|
100
|
+
"@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
|
|
101
|
+
"@dxos/plugin-markdown": "0.8.4-main.dfabb4ec29",
|
|
102
|
+
"@dxos/react-client": "0.8.4-main.dfabb4ec29",
|
|
103
|
+
"@dxos/compute": "0.8.4-main.dfabb4ec29",
|
|
104
|
+
"@dxos/plugin-stack": "0.8.4-main.dfabb4ec29",
|
|
105
|
+
"@dxos/react-ui-attention": "0.8.4-main.dfabb4ec29",
|
|
106
|
+
"@dxos/react-ui-form": "0.8.4-main.dfabb4ec29",
|
|
107
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
|
|
108
|
+
"@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29",
|
|
109
|
+
"@dxos/schema": "0.8.4-main.dfabb4ec29",
|
|
110
|
+
"@dxos/util": "0.8.4-main.dfabb4ec29",
|
|
111
|
+
"@dxos/types": "0.8.4-main.dfabb4ec29"
|
|
62
112
|
},
|
|
63
113
|
"devDependencies": {
|
|
64
114
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -66,23 +116,24 @@
|
|
|
66
116
|
"@types/react": "~19.2.7",
|
|
67
117
|
"@types/react-dom": "~19.2.3",
|
|
68
118
|
"@types/reveal.js": "^5.0.3",
|
|
69
|
-
"effect": "3.
|
|
119
|
+
"effect": "3.20.0",
|
|
70
120
|
"react": "~19.2.3",
|
|
71
121
|
"react-dom": "~19.2.3",
|
|
72
|
-
"vite": "^
|
|
73
|
-
"@dxos/random": "0.8.4-main.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
76
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
122
|
+
"vite": "^8.0.10",
|
|
123
|
+
"@dxos/random": "0.8.4-main.dfabb4ec29",
|
|
124
|
+
"@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
|
|
125
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
126
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
|
|
127
|
+
"@dxos/storybook-utils": "0.8.4-main.dfabb4ec29"
|
|
77
128
|
},
|
|
78
129
|
"peerDependencies": {
|
|
79
130
|
"@effect-atom/atom-react": "^0.5.0",
|
|
80
131
|
"@effect/platform": "0.94.4",
|
|
81
|
-
"effect": "3.
|
|
132
|
+
"effect": "3.20.0",
|
|
82
133
|
"react": "~19.2.3",
|
|
83
134
|
"react-dom": "~19.2.3",
|
|
84
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
85
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
135
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
136
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
86
137
|
},
|
|
87
138
|
"publishConfig": {
|
|
88
139
|
"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
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
|
|
8
|
-
import { AppGraphBuilder, PresenterSettings, ReactSurface } from '
|
|
9
|
-
import { meta } from '
|
|
10
|
-
import { translations } from '
|
|
8
|
+
import { AppGraphBuilder, PresenterSettings, ReactSurface } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
11
11
|
|
|
12
12
|
// TODO(burdon): Only scale markdown content.
|
|
13
13
|
// TODO(burdon): Map stack content; Slide content type (e.g., markdown, sketch, IPFS image, table, etc.)
|
|
@@ -19,3 +19,5 @@ export const PresenterPlugin = Plugin.define(meta).pipe(
|
|
|
19
19
|
AppPlugin.addTranslationsModule({ translations }),
|
|
20
20
|
Plugin.make,
|
|
21
21
|
);
|
|
22
|
+
|
|
23
|
+
export default PresenterPlugin;
|
|
@@ -6,17 +6,18 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
-
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
10
11
|
import { Obj } from '@dxos/echo';
|
|
11
12
|
import { Collection } from '@dxos/echo';
|
|
12
|
-
import {
|
|
13
|
-
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
14
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
|
|
13
|
+
import { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';
|
|
15
14
|
import { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
16
|
-
import { Markdown } from '@dxos/plugin-markdown
|
|
15
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
16
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
17
17
|
|
|
18
|
-
import { meta } from '
|
|
19
|
-
import {
|
|
18
|
+
import { meta } from '#meta';
|
|
19
|
+
import { PresenterOperation } from '#types';
|
|
20
|
+
import { PresenterCapabilities } from '#types';
|
|
20
21
|
|
|
21
22
|
/** Match nodes that can be presented (Collection or Document). */
|
|
22
23
|
const whenPresentable = (node: Node.Node) =>
|
|
@@ -29,7 +30,7 @@ export default Capability.makeModule(
|
|
|
29
30
|
const capabilities = yield* Capability.Service;
|
|
30
31
|
|
|
31
32
|
const extensions = yield* GraphBuilder.createExtension({
|
|
32
|
-
id:
|
|
33
|
+
id: 'root',
|
|
33
34
|
// TODO(wittjosiah): This is a hack to work around presenter previously relying on "variant". Remove.
|
|
34
35
|
match: whenPresentable,
|
|
35
36
|
connector: (object, get) => {
|
|
@@ -41,18 +42,14 @@ export default Capability.makeModule(
|
|
|
41
42
|
if (!isPresentable) {
|
|
42
43
|
return Effect.succeed([]);
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
|
|
45
46
|
return Effect.succeed([
|
|
46
|
-
{
|
|
47
|
-
id:
|
|
47
|
+
AppNode.makeCompanion({
|
|
48
|
+
id: linkedSegment('presenter'),
|
|
49
|
+
label: 'Presenter',
|
|
50
|
+
icon: 'ph--presentation--regular',
|
|
48
51
|
data: { type: meta.id, object },
|
|
49
|
-
|
|
50
|
-
properties: {
|
|
51
|
-
label: 'Presenter',
|
|
52
|
-
icon: 'ph--presentation--regular',
|
|
53
|
-
disposition: 'hidden',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
52
|
+
}),
|
|
56
53
|
]);
|
|
57
54
|
},
|
|
58
55
|
actions: (object, get) => {
|
|
@@ -61,21 +58,21 @@ export default Capability.makeModule(
|
|
|
61
58
|
const isPresentable = settings?.presentCollections
|
|
62
59
|
? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)
|
|
63
60
|
: Obj.instanceOf(Markdown.Document, object);
|
|
64
|
-
|
|
61
|
+
const db = Obj.getDatabase(object);
|
|
62
|
+
if (!isPresentable || !db) {
|
|
65
63
|
return Effect.succeed([]);
|
|
66
64
|
}
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
const { spaceId } = dxn.asEchoDXN()!;
|
|
65
|
+
const objectPath = getObjectPathFromObject(object);
|
|
66
|
+
|
|
70
67
|
return Effect.succeed([
|
|
71
68
|
{
|
|
72
|
-
id:
|
|
69
|
+
id: PresenterOperation.TogglePresentation.meta.key,
|
|
73
70
|
// TODO(burdon): Allow function so can generate state when activated.
|
|
74
71
|
// So can set explicit fullscreen state coordinated with current presenter state.
|
|
75
72
|
data: Effect.fnUntraced(function* () {
|
|
76
73
|
const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
77
74
|
const deck = deckState.decks[deckState.activeDeck];
|
|
78
|
-
const presenterId =
|
|
75
|
+
const presenterId = `${objectPath}/${linkedSegment('presenter')}`;
|
|
79
76
|
if (!deck?.fullscreen) {
|
|
80
77
|
yield* Operation.invoke(DeckOperation.Adjust, {
|
|
81
78
|
type: 'solo--fullscreen' as const,
|
|
@@ -84,11 +81,11 @@ export default Capability.makeModule(
|
|
|
84
81
|
}
|
|
85
82
|
yield* Operation.invoke(LayoutOperation.Open, {
|
|
86
83
|
subject: [presenterId],
|
|
87
|
-
workspace: spaceId,
|
|
84
|
+
workspace: getSpacePath(db.spaceId),
|
|
88
85
|
});
|
|
89
86
|
}),
|
|
90
87
|
properties: {
|
|
91
|
-
label: ['toggle
|
|
88
|
+
label: ['toggle-presentation.label', { ns: meta.id }],
|
|
92
89
|
icon: 'ph--presentation--regular',
|
|
93
90
|
disposition: 'list-item',
|
|
94
91
|
keyBinding: {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
8
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
9
|
+
export const PresenterSettings = Capability.lazy('PresenterSettings', () => import('./settings'));
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { Collection } from '@dxos/echo';
|
|
13
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
14
|
+
|
|
15
|
+
import { PresenterSettings } from '#components';
|
|
16
|
+
import { CollectionPresenterContainer, DocumentPresenterContainer, MarkdownSlide } from '#containers';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { type Settings } from '#types';
|
|
19
|
+
|
|
20
|
+
export default Capability.makeModule(() =>
|
|
21
|
+
Effect.succeed(
|
|
22
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
23
|
+
Surface.create({
|
|
24
|
+
id: 'document',
|
|
25
|
+
position: 'hoist',
|
|
26
|
+
filter: AppSurface.predicate(
|
|
27
|
+
AppSurface.Article,
|
|
28
|
+
(data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Markdown.Document }> =>
|
|
29
|
+
!!data.subject &&
|
|
30
|
+
typeof data.subject === 'object' &&
|
|
31
|
+
'type' in data.subject &&
|
|
32
|
+
'object' in data.subject &&
|
|
33
|
+
data.subject.type === meta.id &&
|
|
34
|
+
Obj.instanceOf(Markdown.Document, data.subject.object),
|
|
35
|
+
),
|
|
36
|
+
component: ({ data }) => <DocumentPresenterContainer document={data.subject.object} />,
|
|
37
|
+
}),
|
|
38
|
+
Surface.create({
|
|
39
|
+
id: 'collection',
|
|
40
|
+
position: 'hoist',
|
|
41
|
+
filter: AppSurface.predicate(
|
|
42
|
+
AppSurface.Article,
|
|
43
|
+
(data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Collection.Collection }> =>
|
|
44
|
+
!!data.subject &&
|
|
45
|
+
typeof data.subject === 'object' &&
|
|
46
|
+
'type' in data.subject &&
|
|
47
|
+
'object' in data.subject &&
|
|
48
|
+
data.subject.type === meta.id &&
|
|
49
|
+
Obj.instanceOf(Collection.Collection, data.subject.object),
|
|
50
|
+
),
|
|
51
|
+
component: ({ role, data }) => <CollectionPresenterContainer role={role} subject={data.subject.object} />,
|
|
52
|
+
}),
|
|
53
|
+
Surface.create({
|
|
54
|
+
id: 'slide',
|
|
55
|
+
filter: AppSurface.object(AppSurface.Slide, Markdown.Document),
|
|
56
|
+
component: ({ data }) => <MarkdownSlide document={data.subject} />,
|
|
57
|
+
}),
|
|
58
|
+
Surface.create({
|
|
59
|
+
id: 'plugin-settings',
|
|
60
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
61
|
+
component: ({ data: { subject } }) => {
|
|
62
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
63
|
+
return <PresenterSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
]),
|
|
67
|
+
),
|
|
68
|
+
);
|
|
@@ -8,14 +8,14 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { createKvsStore } from '@dxos/effect';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import { PresenterCapabilities,
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { PresenterCapabilities, Settings } from '#types';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
17
|
key: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({}),
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ export default Capability.makeModule(() =>
|
|
|
23
23
|
Capability.contributes(PresenterCapabilities.Settings, settingsAtom),
|
|
24
24
|
Capability.contributes(AppCapabilities.Settings, {
|
|
25
25
|
prefix: meta.id,
|
|
26
|
-
schema:
|
|
26
|
+
schema: Settings.Settings,
|
|
27
27
|
atom: settingsAtom,
|
|
28
28
|
}),
|
|
29
29
|
];
|
|
@@ -7,21 +7,21 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
9
|
|
|
10
|
-
import { createSlide } from '
|
|
10
|
+
import { createSlide } from '#testing';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { Panel } from './Panel';
|
|
13
13
|
import { Slide, type SlideProps } from './Slide';
|
|
14
14
|
|
|
15
15
|
const DefaultStory = ({ content = '' }: SlideProps) => {
|
|
16
16
|
return (
|
|
17
|
-
<
|
|
17
|
+
<Panel classNames='bg-neutral-200'>
|
|
18
18
|
<Slide content={content} />
|
|
19
|
-
</
|
|
19
|
+
</Panel>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const meta = {
|
|
24
|
-
title: 'plugins/plugin-presenter/components/
|
|
24
|
+
title: 'plugins/plugin-presenter/components/Panel',
|
|
25
25
|
render: DefaultStory,
|
|
26
26
|
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
27
27
|
parameters: {
|
|
@@ -8,12 +8,12 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
|
8
8
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type PanelProps = ThemedClassName<PropsWithChildren<{}>>;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Scaled markdown
|
|
14
|
+
* Scaled markdown panel.
|
|
15
15
|
*/
|
|
16
|
-
export const
|
|
16
|
+
export const Panel = ({ children, classNames }: PanelProps) => {
|
|
17
17
|
const [props, setProps] = useState({});
|
|
18
18
|
const {
|
|
19
19
|
ref: containerRef,
|
|
@@ -36,7 +36,7 @@ export const Container = ({ children, classNames }: ContainerProps) => {
|
|
|
36
36
|
// https://www.npmjs.com/package/react-markdown
|
|
37
37
|
return (
|
|
38
38
|
<div ref={containerRef} className={mx('flex grow relative overflow-hidden bg-attention-surface', classNames)}>
|
|
39
|
-
<div className={mx('
|
|
39
|
+
<div className={mx('dx-container absolute')} style={props}>
|
|
40
40
|
{width && height && children}
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -6,7 +6,7 @@ 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 { createSlide } from '
|
|
9
|
+
import { createSlide } from '#testing';
|
|
10
10
|
|
|
11
11
|
import { Slide } from './Slide';
|
|
12
12
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import 'highlight.js/styles/github.css';
|
|
6
|
+
|
|
5
7
|
import { h } from 'hastscript';
|
|
6
8
|
import React from 'react';
|
|
7
9
|
import ReactMarkdown, { type Options as ReactMarkdownOptions } from 'react-markdown';
|
|
@@ -10,8 +12,6 @@ import rehypeHighlight from 'rehype-highlight';
|
|
|
10
12
|
import remarkFrontmatter from 'remark-frontmatter';
|
|
11
13
|
import remarkParseFrontmatter from 'remark-parse-frontmatter';
|
|
12
14
|
|
|
13
|
-
import 'highlight.js/styles/github.css';
|
|
14
|
-
|
|
15
15
|
import styles from './styles.css?raw';
|
|
16
16
|
import { theme } from './theme';
|
|
17
17
|
|
|
@@ -4,30 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, type ReactNode } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { mx } from '@dxos/ui-theme';
|
|
7
|
+
import { composable, composableProps } from '@dxos/ui-theme';
|
|
9
8
|
|
|
10
|
-
export type LayoutProps =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
bottomRight?: ReactNode;
|
|
17
|
-
}>
|
|
18
|
-
>;
|
|
9
|
+
export type LayoutProps = PropsWithChildren<{
|
|
10
|
+
topLeft?: ReactNode;
|
|
11
|
+
topRight?: ReactNode;
|
|
12
|
+
bottomLeft?: ReactNode;
|
|
13
|
+
bottomRight?: ReactNode;
|
|
14
|
+
}>;
|
|
19
15
|
|
|
20
|
-
export const Layout =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<div
|
|
16
|
+
export const Layout = composable<HTMLDivElement, LayoutProps>(
|
|
17
|
+
({ children, topLeft, topRight, bottomLeft, bottomRight, ...props }, forwardedRef) => {
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
{...composableProps(props, { classNames: 'flex grow relative overflow-hidden bg-attention-surface' })}
|
|
21
|
+
ref={forwardedRef}
|
|
22
|
+
>
|
|
23
|
+
<div className='flex flex-col grow overflow-hidden'>{children}</div>
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
<div className='z-[200]'>
|
|
26
|
+
<div className='absolute top-4 left-4'>{topLeft}</div>
|
|
27
|
+
<div className='absolute top-4 right-4'>{topRight}</div>
|
|
28
|
+
<div className='absolute bottom-4 left-4'>{bottomLeft}</div>
|
|
29
|
+
<div className='absolute bottom-4 right-4'>{bottomRight}</div>
|
|
30
|
+
</div>
|
|
30
31
|
</div>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
|
|
9
|
+
import { translations } from '#translations';
|
|
10
|
+
|
|
11
|
+
import { PresenterSettings } from './PresenterSettings';
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'plugins/plugin-presenter/components/PresenterSettings',
|
|
15
|
+
component: PresenterSettings,
|
|
16
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
17
|
+
tags: ['settings'],
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'fullscreen',
|
|
20
|
+
translations,
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<typeof PresenterSettings>;
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
settings: { presentCollections: true },
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { Settings } from '#types';
|
|
13
|
+
|
|
14
|
+
export type PresenterSettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;
|
|
15
|
+
|
|
16
|
+
export const PresenterSettings = ({ settings, onSettingsChange }: PresenterSettingsProps) => {
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<SettingsForm.Viewport>
|
|
21
|
+
<SettingsForm.Section title={t('settings.title', { ns: meta.id })}>
|
|
22
|
+
<SettingsForm.FieldSet
|
|
23
|
+
readonly={!onSettingsChange}
|
|
24
|
+
schema={Settings.Settings}
|
|
25
|
+
values={settings}
|
|
26
|
+
onValuesChanged={(values) => onSettingsChange?.(() => values)}
|
|
27
|
+
/>
|
|
28
|
+
</SettingsForm.Section>
|
|
29
|
+
</SettingsForm.Viewport>
|
|
30
|
+
);
|
|
31
|
+
};
|