@dxos/plugin-presenter 0.8.4-main.72ec0f3 → 0.8.4-main.765dc60934

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.
Files changed (199) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/CollectionPresenterArticle-WWHFJYZA.mjs +46 -0
  3. package/dist/lib/neutral/CollectionPresenterArticle-WWHFJYZA.mjs.map +7 -0
  4. package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs +24 -0
  5. package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs.map +7 -0
  6. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs +18 -0
  7. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs.map +7 -0
  8. package/dist/lib/neutral/PresenterPlugin.mjs +23 -0
  9. package/dist/lib/neutral/PresenterPlugin.mjs.map +7 -0
  10. package/dist/lib/neutral/PresenterPlugin.node.mjs +16 -0
  11. package/dist/lib/neutral/PresenterPlugin.node.mjs.map +7 -0
  12. package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs +25 -0
  13. package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs.map +7 -0
  14. package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs +97 -0
  15. package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs.map +7 -0
  16. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  17. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  18. package/dist/lib/{browser/chunk-TMTUZQCK.mjs → neutral/chunk-4XSSDLGN.mjs} +2 -2
  19. package/dist/lib/neutral/chunk-4XSSDLGN.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-DCPA267T.mjs +68 -0
  21. package/dist/lib/neutral/chunk-DCPA267T.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  23. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-V323QBC3.mjs +41 -0
  25. package/dist/lib/neutral/chunk-V323QBC3.mjs.map +7 -0
  26. package/dist/lib/neutral/components/index.mjs +502 -0
  27. package/dist/lib/neutral/components/index.mjs.map +7 -0
  28. package/dist/lib/neutral/containers/index.mjs +13 -0
  29. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  30. package/dist/lib/neutral/index.mjs +18 -0
  31. package/dist/lib/neutral/index.mjs.map +7 -0
  32. package/dist/lib/neutral/meta.json +1 -0
  33. package/dist/lib/neutral/meta.mjs +8 -0
  34. package/dist/lib/neutral/meta.mjs.map +7 -0
  35. package/dist/lib/neutral/plugin.mjs +12 -0
  36. package/dist/lib/neutral/plugin.mjs.map +7 -0
  37. package/dist/lib/neutral/react-surface-RVWL2ZKQ.mjs +54 -0
  38. package/dist/lib/neutral/react-surface-RVWL2ZKQ.mjs.map +7 -0
  39. package/dist/lib/neutral/settings-R6LRDAAK.mjs +28 -0
  40. package/dist/lib/neutral/settings-R6LRDAAK.mjs.map +7 -0
  41. package/dist/lib/neutral/translations.mjs +19 -0
  42. package/dist/lib/neutral/translations.mjs.map +7 -0
  43. package/dist/lib/neutral/types/index.mjs +14 -0
  44. package/dist/lib/neutral/types/index.mjs.map +7 -0
  45. package/dist/types/src/PresenterPlugin.d.ts +3 -1
  46. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  47. package/dist/types/src/PresenterPlugin.node.d.ts +4 -0
  48. package/dist/types/src/PresenterPlugin.node.d.ts.map +1 -0
  49. package/dist/types/src/PresenterPlugin.test.d.ts +2 -0
  50. package/dist/types/src/PresenterPlugin.test.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  52. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/index.d.ts +4 -3
  54. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  56. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/settings.d.ts +5 -2
  58. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  59. package/dist/types/src/components/Markdown/Panel.d.ts +8 -0
  60. package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -0
  61. package/dist/types/src/components/Markdown/{Container.stories.d.ts → Panel.stories.d.ts} +1 -1
  62. package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/Markdown/Slide.d.ts +1 -1
  64. package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
  65. package/dist/types/src/components/Markdown/Slide.stories.d.ts.map +1 -1
  66. package/dist/types/src/components/Markdown/index.d.ts +1 -1
  67. package/dist/types/src/components/Markdown/index.d.ts.map +1 -1
  68. package/dist/types/src/components/Markdown/theme.d.ts.map +1 -1
  69. package/dist/types/src/components/Presenter/Layout.d.ts +5 -5
  70. package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
  71. package/dist/types/src/components/Presenter/Pager.d.ts +1 -1
  72. package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
  73. package/dist/types/src/components/Presenter/Pager.stories.d.ts.map +1 -1
  74. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts +6 -0
  75. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -0
  76. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +23 -0
  77. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -0
  78. package/dist/types/src/components/PresenterSettings/index.d.ts +2 -0
  79. package/dist/types/src/components/PresenterSettings/index.d.ts.map +1 -0
  80. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +5 -4
  81. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  82. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +7 -6
  83. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
  84. package/dist/types/src/components/index.d.ts +5 -27
  85. package/dist/types/src/components/index.d.ts.map +1 -1
  86. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts +6 -0
  87. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +1 -0
  88. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts +2 -0
  89. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts.map +1 -0
  90. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +6 -0
  91. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -0
  92. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts +2 -0
  93. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts.map +1 -0
  94. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +8 -0
  95. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +1 -0
  96. package/dist/types/src/containers/MarkdownSlide/index.d.ts +2 -0
  97. package/dist/types/src/containers/MarkdownSlide/index.d.ts.map +1 -0
  98. package/dist/types/src/containers/index.d.ts +5 -0
  99. package/dist/types/src/containers/index.d.ts.map +1 -0
  100. package/dist/types/src/index.d.ts +1 -2
  101. package/dist/types/src/index.d.ts.map +1 -1
  102. package/dist/types/src/meta.d.ts +2 -2
  103. package/dist/types/src/meta.d.ts.map +1 -1
  104. package/dist/types/src/plugin.d.ts +3 -0
  105. package/dist/types/src/plugin.d.ts.map +1 -0
  106. package/dist/types/src/testing.d.ts.map +1 -1
  107. package/dist/types/src/translations.d.ts +4 -6
  108. package/dist/types/src/translations.d.ts.map +1 -1
  109. package/dist/types/src/types/PresenterCapabilities.d.ts +4 -0
  110. package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -0
  111. package/dist/types/src/types/PresenterOperation.d.ts +17 -0
  112. package/dist/types/src/types/PresenterOperation.d.ts.map +1 -0
  113. package/dist/types/src/types/Settings.d.ts +7 -0
  114. package/dist/types/src/types/Settings.d.ts.map +1 -0
  115. package/dist/types/src/types/index.d.ts +11 -0
  116. package/dist/types/src/types/index.d.ts.map +1 -0
  117. package/dist/types/src/useExitPresenter.d.ts +3 -4
  118. package/dist/types/src/useExitPresenter.d.ts.map +1 -1
  119. package/dist/types/tsconfig.tsbuildinfo +1 -1
  120. package/package.json +101 -44
  121. package/src/PresenterPlugin.node.ts +16 -0
  122. package/src/PresenterPlugin.test.ts +23 -0
  123. package/src/PresenterPlugin.tsx +14 -26
  124. package/src/capabilities/app-graph-builder.ts +92 -107
  125. package/src/capabilities/index.ts +4 -4
  126. package/src/capabilities/react-surface.tsx +59 -55
  127. package/src/capabilities/settings.ts +24 -12
  128. package/src/components/Markdown/{Container.stories.tsx → Panel.stories.tsx} +7 -7
  129. package/src/components/Markdown/{Container.tsx → Panel.tsx} +6 -6
  130. package/src/components/Markdown/Slide.stories.tsx +4 -4
  131. package/src/components/Markdown/Slide.tsx +2 -2
  132. package/src/components/Markdown/index.ts +1 -1
  133. package/src/components/Markdown/theme.ts +6 -6
  134. package/src/components/Presenter/Layout.tsx +24 -23
  135. package/src/components/Presenter/Pager.stories.tsx +2 -2
  136. package/src/components/Presenter/Pager.tsx +2 -2
  137. package/src/components/PresenterSettings/PresenterSettings.stories.tsx +32 -0
  138. package/src/components/PresenterSettings/PresenterSettings.tsx +31 -0
  139. package/src/components/PresenterSettings/index.ts +5 -0
  140. package/src/components/RevealPlayer/RevealPlayer.stories.tsx +5 -5
  141. package/src/components/RevealPlayer/RevealPlayer.tsx +104 -102
  142. package/src/components/index.ts +5 -5
  143. package/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx +50 -0
  144. package/src/containers/CollectionPresenterArticle/index.ts +5 -0
  145. package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +24 -0
  146. package/src/containers/DocumentPresenterContainer/index.ts +5 -0
  147. package/src/containers/MarkdownSlide/MarkdownSlide.tsx +26 -0
  148. package/src/containers/MarkdownSlide/index.ts +5 -0
  149. package/src/containers/index.ts +9 -0
  150. package/src/index.ts +1 -3
  151. package/src/meta.ts +3 -3
  152. package/src/plugin.ts +9 -0
  153. package/src/testing.ts +6 -6
  154. package/src/translations.ts +4 -5
  155. package/src/types/PresenterCapabilities.ts +15 -0
  156. package/src/types/PresenterOperation.ts +25 -0
  157. package/src/types/Settings.ts +20 -0
  158. package/src/types/index.ts +21 -0
  159. package/src/useExitPresenter.ts +25 -26
  160. package/dist/lib/browser/CollectionPresenterContainer-4JFW3EKV.mjs +0 -199
  161. package/dist/lib/browser/CollectionPresenterContainer-4JFW3EKV.mjs.map +0 -7
  162. package/dist/lib/browser/DocumentPresenterContainer-SX32NAEH.mjs +0 -183
  163. package/dist/lib/browser/DocumentPresenterContainer-SX32NAEH.mjs.map +0 -7
  164. package/dist/lib/browser/MarkdownSlide-MEXR54L5.mjs +0 -223
  165. package/dist/lib/browser/MarkdownSlide-MEXR54L5.mjs.map +0 -7
  166. package/dist/lib/browser/app-graph-builder-UJEKUKAP.mjs +0 -106
  167. package/dist/lib/browser/app-graph-builder-UJEKUKAP.mjs.map +0 -7
  168. package/dist/lib/browser/chunk-BJWK5GQV.mjs +0 -38
  169. package/dist/lib/browser/chunk-BJWK5GQV.mjs.map +0 -7
  170. package/dist/lib/browser/chunk-Q3H4KEFB.mjs +0 -41
  171. package/dist/lib/browser/chunk-Q3H4KEFB.mjs.map +0 -7
  172. package/dist/lib/browser/chunk-TMTUZQCK.mjs.map +0 -7
  173. package/dist/lib/browser/chunk-VRRPVTKA.mjs +0 -39
  174. package/dist/lib/browser/chunk-VRRPVTKA.mjs.map +0 -7
  175. package/dist/lib/browser/index.mjs +0 -65
  176. package/dist/lib/browser/index.mjs.map +0 -7
  177. package/dist/lib/browser/meta.json +0 -1
  178. package/dist/lib/browser/react-surface-S4T6X72R.mjs +0 -57
  179. package/dist/lib/browser/react-surface-S4T6X72R.mjs.map +0 -7
  180. package/dist/lib/browser/settings-57TUVRW3.mjs +0 -22
  181. package/dist/lib/browser/settings-57TUVRW3.mjs.map +0 -7
  182. package/dist/types/src/components/CollectionPresenterContainer.d.ts +0 -7
  183. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +0 -1
  184. package/dist/types/src/components/DocumentPresenterContainer.d.ts +0 -7
  185. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +0 -1
  186. package/dist/types/src/components/Markdown/Container.d.ts +0 -8
  187. package/dist/types/src/components/Markdown/Container.d.ts.map +0 -1
  188. package/dist/types/src/components/Markdown/Container.stories.d.ts.map +0 -1
  189. package/dist/types/src/components/MarkdownSlide.d.ts +0 -7
  190. package/dist/types/src/components/MarkdownSlide.d.ts.map +0 -1
  191. package/dist/types/src/components/PresenterSettings.d.ts +0 -6
  192. package/dist/types/src/components/PresenterSettings.d.ts.map +0 -1
  193. package/dist/types/src/types.d.ts +0 -40
  194. package/dist/types/src/types.d.ts.map +0 -1
  195. package/src/components/CollectionPresenterContainer.tsx +0 -44
  196. package/src/components/DocumentPresenterContainer.tsx +0 -23
  197. package/src/components/MarkdownSlide.tsx +0 -24
  198. package/src/components/PresenterSettings.tsx +0 -30
  199. package/src/types.ts +0 -46
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,46 @@
1
+ import {
2
+ useExitPresenter
3
+ } from "./chunk-V323QBC3.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+
6
+ // src/containers/CollectionPresenterArticle/CollectionPresenterArticle.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, Layout as PresenterLayout } from "#components";
13
+ import { PresenterContext } from "#types";
14
+ var CollectionPresenterArticle = ({ 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(PresenterLayout, {
24
+ bottomRight: /* @__PURE__ */ React.createElement(PageNumber, {
25
+ index: slide,
26
+ count: collection.objects.length
27
+ }),
28
+ bottomLeft: /* @__PURE__ */ React.createElement(Pager, {
29
+ index: slide,
30
+ count: collection.objects.length,
31
+ keys: running,
32
+ onChange: setSlide,
33
+ onExit: handleExit
34
+ })
35
+ }, /* @__PURE__ */ React.createElement(Surface.Surface, {
36
+ type: AppSurface.Slide,
37
+ data: {
38
+ subject: collection.objects[slide],
39
+ attendableId: Obj.getDXN(collection).toString()
40
+ }
41
+ }))));
42
+ };
43
+ export {
44
+ CollectionPresenterArticle as default
45
+ };
46
+ //# sourceMappingURL=CollectionPresenterArticle-WWHFJYZA.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/CollectionPresenterArticle/CollectionPresenterArticle.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, Layout as PresenterLayout } from '#components';\nimport { PresenterContext } from '#types';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport type CollectionPresenterArticleProps = AppSurface.ObjectArticleProps<Collection.Collection>;\n\nexport const CollectionPresenterArticle = ({ role, subject: collection }: CollectionPresenterArticleProps) => {\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 <PresenterLayout\n bottomRight={<PageNumber index={slide} count={collection.objects.length} />}\n bottomLeft={\n <Pager\n index={slide}\n count={collection.objects.length}\n keys={running}\n onChange={setSlide}\n onExit={handleExit}\n />\n }\n >\n <Surface.Surface\n type={AppSurface.Slide}\n data={{\n subject: collection.objects[slide],\n attendableId: Obj.getDXN(collection).toString(),\n }}\n />\n </PresenterLayout>\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,UAAUC,uBAAuB;AAC7D,SAASC,wBAAwB;AAM1B,IAAMC,6BAA6B,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAAmC;AACvG,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,iBAAAA;IACCC,aAAa,sBAAA,cAACC,YAAAA;MAAWC,OAAOhB;MAAOiB,OAAOlB,WAAWmB,QAAQC;;IACjEC,YACE,sBAAA,cAACC,OAAAA;MACCL,OAAOhB;MACPiB,OAAOlB,WAAWmB,QAAQC;MAC1BG,MAAMnB;MACNoB,UAAUtB;MACVuB,QAAQlB;;KAIZ,sBAAA,cAACmB,QAAQA,SAAO;IACdC,MAAMC,WAAWC;IACjBC,MAAM;MACJ/B,SAASC,WAAWmB,QAAQlB,KAAAA;MAC5B8B,cAAcC,IAAIC,OAAOjC,UAAAA,EAAYkC,SAAQ;IAC/C;;AAMZ;",
6
+ "names": ["React", "useContext", "useState", "Surface", "AppSurface", "Obj", "Panel", "PageNumber", "Pager", "Layout", "PresenterLayout", "PresenterContext", "CollectionPresenterArticle", "role", "subject", "collection", "slide", "setSlide", "useState", "running", "useContext", "PresenterContext", "handleExit", "useExitPresenter", "Panel", "Root", "classNames", "Content", "asChild", "PresenterLayout", "bottomRight", "PageNumber", "index", "count", "objects", "length", "bottomLeft", "Pager", "keys", "onChange", "onExit", "Surface", "type", "AppSurface", "Slide", "data", "attendableId", "Obj", "getDXN", "toString"]
7
+ }
@@ -0,0 +1,24 @@
1
+ import {
2
+ useExitPresenter
3
+ } from "./chunk-V323QBC3.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+
6
+ // src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx
7
+ import React from "react";
8
+ import { Panel } from "@dxos/react-ui";
9
+ import { RevealPlayer } from "#components";
10
+ var DocumentPresenterContainer = ({ document }) => {
11
+ const handleExit = useExitPresenter(document);
12
+ return /* @__PURE__ */ React.createElement(Panel.Root, {
13
+ classNames: "relative"
14
+ }, /* @__PURE__ */ React.createElement(Panel.Content, {
15
+ asChild: true
16
+ }, /* @__PURE__ */ React.createElement(RevealPlayer, {
17
+ content: document.content.target?.content ?? "",
18
+ onExit: handleExit
19
+ })));
20
+ };
21
+ export {
22
+ DocumentPresenterContainer as default
23
+ };
24
+ //# sourceMappingURL=DocumentPresenterContainer-KCDZ2O2C.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown';\nimport { Panel } from '@dxos/react-ui';\n\nimport { RevealPlayer } from '#components';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport const DocumentPresenterContainer: FC<{ document: Markdown.Document }> = ({ document }) => {\n const handleExit = useExitPresenter(document);\n\n return (\n <Panel.Root classNames='relative'>\n <Panel.Content asChild>\n <RevealPlayer content={document.content.target?.content ?? ''} onExit={handleExit} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,WAAwB;AAG/B,SAASC,aAAa;AAEtB,SAASC,oBAAoB;AAItB,IAAMC,6BAAkE,CAAC,EAAEC,SAAQ,MAAE;AAC1F,QAAMC,aAAaC,iBAAiBF,QAAAA;AAEpC,SACE,sBAAA,cAACG,MAAMC,MAAI;IAACC,YAAW;KACrB,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,cAAAA;IAAaC,SAAST,SAASS,QAAQC,QAAQD,WAAW;IAAIE,QAAQV;;AAI/E;",
6
+ "names": ["React", "Panel", "RevealPlayer", "DocumentPresenterContainer", "document", "handleExit", "useExitPresenter", "Panel", "Root", "classNames", "Content", "asChild", "RevealPlayer", "content", "target", "onExit"]
7
+ }
@@ -0,0 +1,18 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/MarkdownSlide/MarkdownSlide.tsx
4
+ import React from "react";
5
+ import { Panel, Slide } from "#components";
6
+ var MarkdownSlide = ({ document }) => {
7
+ const content = document.content.target?.content;
8
+ if (!content) {
9
+ return null;
10
+ }
11
+ return /* @__PURE__ */ React.createElement(Panel, null, /* @__PURE__ */ React.createElement(Slide, {
12
+ content
13
+ }));
14
+ };
15
+ export {
16
+ MarkdownSlide as default
17
+ };
18
+ //# sourceMappingURL=MarkdownSlide-WXILOIBE.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/MarkdownSlide/MarkdownSlide.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown';\n\nimport { Panel, Slide } from '#components';\n\ntype MarkdownSlideProps = {\n document: Markdown.Document;\n};\n\nexport const MarkdownSlide = ({ document }: MarkdownSlideProps) => {\n const content = document.content.target?.content;\n if (!content) {\n return null;\n }\n\n return (\n <Panel>\n <Slide content={content} />\n </Panel>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAIlB,SAASC,OAAOC,aAAa;AAMtB,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAsB;AAC5D,QAAMC,UAAUD,SAASC,QAAQC,QAAQD;AACzC,MAAI,CAACA,SAAS;AACZ,WAAO;EACT;AAEA,SACE,sBAAA,cAACJ,OAAAA,MACC,sBAAA,cAACC,OAAAA;IAAMG;;AAGb;",
6
+ "names": ["React", "Panel", "Slide", "MarkdownSlide", "document", "content", "target"]
7
+ }
@@ -0,0 +1,23 @@
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 { AppGraphBuilder, PresenterSettings, ReactSurface } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ import { translations } from "#translations";
9
+ var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
10
+ activate: AppGraphBuilder
11
+ }), AppPlugin.addSettingsModule({
12
+ activate: PresenterSettings
13
+ }), AppPlugin.addSurfaceModule({
14
+ activate: ReactSurface
15
+ }), AppPlugin.addTranslationsModule({
16
+ translations
17
+ }), Plugin.make);
18
+ var PresenterPlugin_default = PresenterPlugin;
19
+ export {
20
+ PresenterPlugin,
21
+ PresenterPlugin_default as default
22
+ };
23
+ //# sourceMappingURL=PresenterPlugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/PresenterPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, PresenterSettings, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\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.addSettingsModule({ activate: PresenterSettings }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default PresenterPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,iBAAiBC,mBAAmBC,oBAAoB;AACjE,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAKtB,IAAMC,kBAAkBP,OAAOQ,OAAOH,IAAAA,EAAMI,KACjDR,UAAUS,kBAAkB;EAAEC,UAAUT;AAAgB,CAAA,GACxDD,UAAUW,kBAAkB;EAAED,UAAUR;AAAkB,CAAA,GAC1DF,UAAUY,iBAAiB;EAAEF,UAAUP;AAAa,CAAA,GACpDH,UAAUa,sBAAsB;EAAER;AAAa,CAAA,GAC/CN,OAAOe,IAAI;AAGb,IAAA,0BAAeR;",
6
+ "names": ["Plugin", "AppPlugin", "AppGraphBuilder", "PresenterSettings", "ReactSurface", "meta", "translations", "PresenterPlugin", "define", "pipe", "addAppGraphModule", "activate", "addSettingsModule", "addSurfaceModule", "addTranslationsModule", "make"]
7
+ }
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,25 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/components/PresenterSettings/PresenterSettings.tsx
4
+ import React from "react";
5
+ import { useTranslation } from "@dxos/react-ui";
6
+ import { Settings as SettingsForm } from "@dxos/react-ui-form";
7
+ import { meta } from "#meta";
8
+ import { Settings } from "#types";
9
+ var PresenterSettings = ({ settings, onSettingsChange }) => {
10
+ const { t } = useTranslation(meta.id);
11
+ return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
12
+ title: t("settings.title", {
13
+ ns: meta.id
14
+ })
15
+ }, /* @__PURE__ */ React.createElement(SettingsForm.FieldSet, {
16
+ readonly: !onSettingsChange,
17
+ schema: Settings.Settings,
18
+ values: settings,
19
+ onValuesChanged: (values) => onSettingsChange?.(() => values)
20
+ })));
21
+ };
22
+ export {
23
+ PresenterSettings as default
24
+ };
25
+ //# sourceMappingURL=PresenterSettings-2G4XD4QY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/PresenterSettings/PresenterSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { Settings } from '#types';\n\nexport type PresenterSettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;\n\nexport const PresenterSettings = ({ settings, onSettingsChange }: PresenterSettingsProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.FieldSet\n readonly={!onSettingsChange}\n schema={Settings.Settings}\n values={settings}\n onValuesChanged={(values) => onSettingsChange?.(() => values)}\n />\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,YAAYC,oBAAoB;AAEzC,SAASC,YAAY;AACrB,SAASF,gBAAgB;AAIlB,IAAMG,oBAAoB,CAAC,EAAEC,UAAUC,iBAAgB,MAA0B;AACtF,QAAM,EAAEC,EAAC,IAAKP,eAAeG,KAAKK,EAAE;AAEpC,SACE,sBAAA,cAACN,aAAaO,UAAQ,MACpB,sBAAA,cAACP,aAAaQ,SAAO;IAACC,OAAOJ,EAAE,kBAAkB;MAAEK,IAAIT,KAAKK;IAAG,CAAA;KAC7D,sBAAA,cAACN,aAAaW,UAAQ;IACpBC,UAAU,CAACR;IACXS,QAAQd,SAASA;IACjBe,QAAQX;IACRY,iBAAiB,CAACD,WAAWV,mBAAmB,MAAMU,MAAAA;;AAKhE;",
6
+ "names": ["React", "useTranslation", "Settings", "SettingsForm", "meta", "PresenterSettings", "settings", "onSettingsChange", "t", "id", "Viewport", "Section", "title", "ns", "FieldSet", "readonly", "schema", "values", "onValuesChanged"]
7
+ }
@@ -0,0 +1,97 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/app-graph-builder.ts
4
+ import * as Effect from "effect/Effect";
5
+ import * as Option from "effect/Option";
6
+ import { Capabilities, Capability } from "@dxos/app-framework";
7
+ import { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
8
+ import { Operation } from "@dxos/compute";
9
+ import { Collection, Obj } from "@dxos/echo";
10
+ import { DeckCapabilities, DeckOperation } from "@dxos/plugin-deck";
11
+ import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
12
+ import { Markdown } from "@dxos/plugin-markdown";
13
+ import { linkedSegment } from "@dxos/react-ui-attention";
14
+ import { meta } from "#meta";
15
+ import { PresenterOperation } from "#types";
16
+ import { PresenterCapabilities } from "#types";
17
+ var whenPresentable = (node) => Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () => NodeMatcher.whenEchoType(Markdown.Document)(node));
18
+ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
19
+ const capabilities = yield* Capability.Service;
20
+ const extensions = yield* GraphBuilder.createExtension({
21
+ id: "root",
22
+ // TODO(wittjosiah): This is a hack to work around presenter previously relying on "variant". Remove.
23
+ match: whenPresentable,
24
+ connector: (object, get) => {
25
+ const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
26
+ const settings = get(settingsAtom);
27
+ const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
28
+ if (!isPresentable) {
29
+ return Effect.succeed([]);
30
+ }
31
+ return Effect.succeed([
32
+ AppNode.makeCompanion({
33
+ id: linkedSegment("presenter"),
34
+ label: "Presenter",
35
+ icon: "ph--presentation--regular",
36
+ data: {
37
+ type: meta.id,
38
+ object
39
+ }
40
+ })
41
+ ]);
42
+ },
43
+ actions: (object, get) => {
44
+ const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
45
+ const settings = get(settingsAtom);
46
+ const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
47
+ const db = Obj.getDatabase(object);
48
+ if (!isPresentable || !db) {
49
+ return Effect.succeed([]);
50
+ }
51
+ const objectPath = getObjectPathFromObject(object);
52
+ return Effect.succeed([
53
+ {
54
+ id: PresenterOperation.TogglePresentation.meta.key,
55
+ // TODO(burdon): Allow function so can generate state when activated.
56
+ // So can set explicit fullscreen state coordinated with current presenter state.
57
+ data: Effect.fnUntraced(function* () {
58
+ const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);
59
+ const deck = deckState.decks[deckState.activeDeck];
60
+ const presenterId = `${objectPath}/${linkedSegment("presenter")}`;
61
+ if (!deck?.fullscreen) {
62
+ yield* Operation.invoke(DeckOperation.Adjust, {
63
+ type: "solo--fullscreen",
64
+ id: presenterId
65
+ });
66
+ }
67
+ yield* Operation.invoke(LayoutOperation.Open, {
68
+ subject: [
69
+ presenterId
70
+ ],
71
+ workspace: getSpacePath(db.spaceId)
72
+ });
73
+ }),
74
+ properties: {
75
+ label: [
76
+ "toggle-presentation.label",
77
+ {
78
+ ns: meta.id
79
+ }
80
+ ],
81
+ icon: "ph--presentation--regular",
82
+ disposition: "list-item",
83
+ keyBinding: {
84
+ macos: "shift+meta+p",
85
+ windows: "shift+alt+p"
86
+ }
87
+ }
88
+ }
89
+ ]);
90
+ }
91
+ });
92
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
93
+ }));
94
+ export {
95
+ app_graph_builder_default as default
96
+ };
97
+ //# sourceMappingURL=app-graph-builder-DIEDSRPX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Collection, Obj } from '@dxos/echo';\nimport { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';\nimport { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { Markdown } from '@dxos/plugin-markdown';\nimport { linkedSegment } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\nimport { PresenterOperation } from '#types';\nimport { PresenterCapabilities } from '#types';\n\n/** Match nodes that can be presented (Collection or Document). */\nconst whenPresentable = (node: Node.Node) =>\n Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () =>\n NodeMatcher.whenEchoType(Markdown.Document)(node),\n );\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* GraphBuilder.createExtension({\n id: 'root',\n // TODO(wittjosiah): This is a hack to work around presenter previously relying on \"variant\". Remove.\n match: whenPresentable,\n connector: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n if (!isPresentable) {\n return Effect.succeed([]);\n }\n\n return Effect.succeed([\n AppNode.makeCompanion({\n id: linkedSegment('presenter'),\n label: 'Presenter',\n icon: 'ph--presentation--regular',\n data: { type: meta.id, object },\n }),\n ]);\n },\n actions: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n const db = Obj.getDatabase(object);\n if (!isPresentable || !db) {\n return Effect.succeed([]);\n }\n const objectPath = getObjectPathFromObject(object);\n\n return Effect.succeed([\n {\n id: PresenterOperation.TogglePresentation.meta.key,\n // TODO(burdon): Allow function so can generate state when activated.\n // So can set explicit fullscreen state coordinated with current presenter state.\n data: Effect.fnUntraced(function* () {\n const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = deckState.decks[deckState.activeDeck];\n const presenterId = `${objectPath}/${linkedSegment('presenter')}`;\n if (!deck?.fullscreen) {\n yield* Operation.invoke(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: presenterId,\n });\n }\n yield* Operation.invoke(LayoutOperation.Open, {\n subject: [presenterId],\n workspace: getSpacePath(db.spaceId),\n });\n }),\n properties: {\n label: ['toggle-presentation.label', { ns: meta.id }],\n icon: 'ph--presentation--regular',\n disposition: 'list-item',\n keyBinding: {\n macos: 'shift+meta+p',\n windows: 'shift+alt+p',\n },\n },\n },\n ]);\n },\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,SAASC,iBAAiBC,yBAAyBC,oBAAoB;AACjG,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,WAAW;AAChC,SAASC,kBAAkBC,qBAAqB;AAChD,SAASC,cAAyBC,mBAAmB;AACrD,SAASC,gBAAgB;AACzB,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AACrB,SAASC,0BAA0B;AACnC,SAASC,6BAA6B;AAGtC,IAAMC,kBAAkB,CAACC,SAChBC,cAAOR,YAAYS,aAAad,WAAWA,UAAU,EAAEY,IAAAA,GAAO,MACnEP,YAAYS,aAAaR,SAASS,QAAQ,EAAEH,IAAAA,CAAAA;AAGhD,IAAA,4BAAenB,WAAWuB,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOzB,WAAW0B;AAEvC,QAAMC,aAAa,OAAOhB,aAAaiB,gBAAgB;IACrDC,IAAI;;IAEJC,OAAOZ;IACPa,WAAW,CAACC,QAAQC,QAAAA;AAClB,YAAMC,eAAeT,aAAaQ,IAAIhB,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWH,IAAIC,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B9B,IAAI+B,WAAWhC,WAAWA,YAAYyB,MAAAA,KAAWxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA,IACnFxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA;AACtC,UAAI,CAACK,eAAe;AAClB,eAAcG,eAAQ,CAAA,CAAE;MAC1B;AAEA,aAAcA,eAAQ;QACpBtC,QAAQuC,cAAc;UACpBZ,IAAIf,cAAc,WAAA;UAClB4B,OAAO;UACPC,MAAM;UACNC,MAAM;YAAEC,MAAM9B,KAAKc;YAAIG;UAAO;QAChC,CAAA;OACD;IACH;IACAc,SAAS,CAACd,QAAQC,QAAAA;AAChB,YAAMC,eAAeT,aAAaQ,IAAIhB,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWH,IAAIC,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B9B,IAAI+B,WAAWhC,WAAWA,YAAYyB,MAAAA,KAAWxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA,IACnFxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA;AACtC,YAAMe,KAAKvC,IAAIwC,YAAYhB,MAAAA;AAC3B,UAAI,CAACK,iBAAiB,CAACU,IAAI;AACzB,eAAcP,eAAQ,CAAA,CAAE;MAC1B;AACA,YAAMS,aAAa7C,wBAAwB4B,MAAAA;AAE3C,aAAcQ,eAAQ;QACpB;UACEX,IAAIb,mBAAmBkC,mBAAmBnC,KAAKoC;;;UAG/CP,MAAapB,kBAAW,aAAA;AACtB,kBAAM4B,YAAY,OAAOrD,aAAasD,aAAa5C,iBAAiB6C,KAAK;AACzE,kBAAMC,OAAOH,UAAUI,MAAMJ,UAAUK,UAAU;AACjD,kBAAMC,cAAc,GAAGT,UAAAA,IAAcnC,cAAc,WAAA,CAAA;AACnD,gBAAI,CAACyC,MAAMI,YAAY;AACrB,qBAAOrD,UAAUsD,OAAOlD,cAAcmD,QAAQ;gBAC5ChB,MAAM;gBACNhB,IAAI6B;cACN,CAAA;YACF;AACA,mBAAOpD,UAAUsD,OAAOzD,gBAAgB2D,MAAM;cAC5CC,SAAS;gBAACL;;cACVM,WAAW3D,aAAa0C,GAAGkB,OAAO;YACpC,CAAA;UACF,CAAA;UACAC,YAAY;YACVxB,OAAO;cAAC;cAA6B;gBAAEyB,IAAIpD,KAAKc;cAAG;;YACnDc,MAAM;YACNyB,aAAa;YACbC,YAAY;cACVC,OAAO;cACPC,SAAS;YACX;UACF;QACF;OACD;IACH;EACF,CAAA;AAEA,SAAOvE,WAAWwE,YAAYvE,gBAAgBwE,iBAAiB9C,UAAAA;AACjE,CAAA,CAAA;",
6
+ "names": ["Effect", "Option", "Capabilities", "Capability", "AppCapabilities", "AppNode", "LayoutOperation", "getObjectPathFromObject", "getSpacePath", "Operation", "Collection", "Obj", "DeckCapabilities", "DeckOperation", "GraphBuilder", "NodeMatcher", "Markdown", "linkedSegment", "meta", "PresenterOperation", "PresenterCapabilities", "whenPresentable", "node", "orElse", "whenEchoType", "Document", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "createExtension", "id", "match", "connector", "object", "get", "settingsAtom", "Settings", "settings", "isPresentable", "presentCollections", "instanceOf", "succeed", "makeCompanion", "label", "icon", "data", "type", "actions", "db", "getDatabase", "objectPath", "TogglePresentation", "key", "deckState", "getAtomValue", "State", "deck", "decks", "activeDeck", "presenterId", "fullscreen", "invoke", "Adjust", "Open", "subject", "workspace", "spaceId", "properties", "ns", "disposition", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
7
+ }
@@ -0,0 +1,13 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-DIEDSRPX.mjs"));
6
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-RVWL2ZKQ.mjs"));
7
+ var PresenterSettings = Capability.lazy("PresenterSettings", () => import("../settings-R6LRDAAK.mjs"));
8
+ export {
9
+ AppGraphBuilder,
10
+ PresenterSettings,
11
+ ReactSurface
12
+ };
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const PresenterSettings = Capability.lazy('PresenterSettings', () => import('./settings'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAEpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAME,oBAAoBJ,WAAWE,KAAK,qBAAqB,MAAM,OAAO,0BAAA,CAAA;",
6
+ "names": ["Capability", "AppGraphBuilder", "lazy", "ReactSurface", "PresenterSettings"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  // src/meta.ts
2
2
  import { trim } from "@dxos/util";
3
3
  var meta = {
4
- id: "dxos.org/plugin/presenter",
4
+ id: "org.dxos.plugin.presenter",
5
5
  name: "Presenter",
6
6
  description: trim`
7
7
  Transform markdown documents into interactive presentation slideshows.
@@ -15,4 +15,4 @@ var meta = {
15
15
  export {
16
16
  meta
17
17
  };
18
- //# sourceMappingURL=chunk-TMTUZQCK.mjs.map
18
+ //# sourceMappingURL=chunk-4XSSDLGN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.presenter',\n name: 'Presenter',\n description: trim`\n Transform markdown documents into interactive presentation slideshows.\n Navigate between slides with keyboard controls and present content in full-screen mode.\n `,\n icon: 'ph--presentation--regular',\n iconHue: 'indigo',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n};\n"],
5
+ "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;AACV;",
6
+ "names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source"]
7
+ }
@@ -0,0 +1,68 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/types/index.ts
6
+ import { createContext } from "react";
7
+
8
+ // src/types/PresenterCapabilities.ts
9
+ var PresenterCapabilities_exports = {};
10
+ __export(PresenterCapabilities_exports, {
11
+ Settings: () => Settings
12
+ });
13
+ import { Capability } from "@dxos/app-framework";
14
+ import { meta } from "#meta";
15
+ var Settings = Capability.make(`${meta.id}.capability.settings`);
16
+
17
+ // src/types/PresenterOperation.ts
18
+ var PresenterOperation_exports = {};
19
+ __export(PresenterOperation_exports, {
20
+ TogglePresentation: () => TogglePresentation
21
+ });
22
+ import * as Schema from "effect/Schema";
23
+ import { Operation } from "@dxos/compute";
24
+ import { Collection } from "@dxos/echo";
25
+ import { Markdown } from "@dxos/plugin-markdown";
26
+ import { meta as meta2 } from "#meta";
27
+ var PRESENTER_OPERATION = `${meta2.id}.operation`;
28
+ var TogglePresentation = Operation.make({
29
+ meta: {
30
+ key: `${PRESENTER_OPERATION}.toggle-presentation`,
31
+ name: "Toggle Presentation"
32
+ },
33
+ input: Schema.Struct({
34
+ object: Schema.Union(Markdown.Document, Collection.Collection),
35
+ state: Schema.optional(Schema.Boolean)
36
+ }),
37
+ output: Schema.Void
38
+ });
39
+
40
+ // src/types/Settings.ts
41
+ var Settings_exports = {};
42
+ __export(Settings_exports, {
43
+ Settings: () => Settings2
44
+ });
45
+ import * as Schema2 from "effect/Schema";
46
+ var Settings2 = Schema2.mutable(Schema2.Struct({
47
+ presentCollections: Schema2.optional(Schema2.Boolean.annotations({
48
+ title: "Present collections (experimental)",
49
+ description: "Enable presenting collections of documents as a slideshow."
50
+ }))
51
+ }));
52
+
53
+ // src/types/index.ts
54
+ var PresenterContext = createContext({
55
+ running: false,
56
+ start: () => {
57
+ },
58
+ stop: () => {
59
+ }
60
+ });
61
+
62
+ export {
63
+ PresenterCapabilities_exports,
64
+ PresenterOperation_exports,
65
+ Settings_exports,
66
+ PresenterContext
67
+ };
68
+ //# sourceMappingURL=chunk-DCPA267T.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/index.ts", "../../../src/types/PresenterCapabilities.ts", "../../../src/types/PresenterOperation.ts", "../../../src/types/Settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\n\nexport type PresenterContextType = {\n running: boolean;\n start: () => void;\n stop: () => void;\n};\n\nexport const PresenterContext: Context<PresenterContextType> = createContext<PresenterContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport * as PresenterCapabilities from './PresenterCapabilities';\nexport * as PresenterOperation from './PresenterOperation';\nexport * as Settings from './Settings';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\n// Inline import to avoid `Settings` namespace alias colliding with the\n// `Settings` capability export below.\nexport const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\nimport { Collection } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { meta } from '#meta';\n\nconst PRESENTER_OPERATION = `${meta.id}.operation`;\n\n// TODO(wittjosiah): This appears to be unused.\nexport const TogglePresentation = Operation.make({\n meta: { key: `${PRESENTER_OPERATION}.toggle-presentation`, name: 'Toggle Presentation' },\n input: Schema.Struct({\n object: Schema.Union(Markdown.Document, Collection.Collection),\n state: Schema.optional(Schema.Boolean),\n }),\n output: Schema.Void,\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n presentCollections: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Present collections (experimental)',\n description: 'Enable presenting collections of documents as a slideshow.',\n }),\n ),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
5
+ "mappings": ";;;;;AAIA,SAAuBA,qBAAqB;;;ACJ5C;;;;AAQA,SAASC,kBAAkB;AAE3B,SAASC,YAAY;AAId,IAAMC,WAAWF,WAAWG,KAAmD,GAAGF,KAAKG,EAAE,sBAAsB;;;ACdtH;;;;AAMA,YAAYC,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAErB,IAAMC,sBAAsB,GAAGD,MAAKE,EAAE;AAG/B,IAAMC,qBAAqBN,UAAUO,KAAK;EAC/CJ,MAAM;IAAEK,KAAK,GAAGJ,mBAAAA;IAA2CK,MAAM;EAAsB;EACvFC,OAAcC,cAAO;IACnBC,QAAeC,aAAMX,SAASY,UAAUb,WAAWA,UAAU;IAC7Dc,OAAcC,gBAAgBC,cAAO;EACvC,CAAA;EACAC,QAAeC;AACjB,CAAA;;;ACxBA;;kBAAAC;;AAMA,YAAYC,aAAY;AAEjB,IAAMD,YAAkBE,gBACtBC,eAAO;EACZC,oBAA2BC,iBAClBC,gBAAQC,YAAY;IACzBC,OAAO;IACPC,aAAa;EACf,CAAA,CAAA;AAEJ,CAAA,CAAA;;;AHJK,IAAMC,mBAAkDC,cAAoC;EACjGC,SAAS;EACTC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;",
6
+ "names": ["createContext", "Capability", "meta", "Settings", "make", "id", "Schema", "Operation", "Collection", "Markdown", "meta", "PRESENTER_OPERATION", "id", "TogglePresentation", "make", "key", "name", "input", "Struct", "object", "Union", "Document", "state", "optional", "Boolean", "output", "Void", "Settings", "Schema", "mutable", "Struct", "presentCollections", "optional", "Boolean", "annotations", "title", "description", "PresenterContext", "createContext", "running", "start", "stop"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }