@dxos/plugin-presenter 0.9.1-main.c7dcc2e112 → 0.10.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.
Files changed (107) hide show
  1. package/PLUGIN.mdl +12 -12
  2. package/dist/lib/neutral/{CollectionPresenterArticle-ZRYWBX2H.mjs → CollectionArticle-7R4KJWDW.mjs} +4 -4
  3. package/dist/lib/neutral/CollectionArticle-7R4KJWDW.mjs.map +7 -0
  4. package/dist/lib/neutral/{DocumentPresenterContainer-5QF4P736.mjs → DocumentArticle-YZRKVEN7.mjs} +13 -6
  5. package/dist/lib/neutral/DocumentArticle-YZRKVEN7.mjs.map +7 -0
  6. package/dist/lib/neutral/PresenterPlugin.mjs +1 -1
  7. package/dist/lib/neutral/PresenterPlugin.mjs.map +1 -1
  8. package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs +20 -0
  9. package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs.map +7 -0
  10. package/dist/lib/neutral/{app-graph-builder-JMQVBFG2.mjs → app-graph-builder-FNDFY5L3.mjs} +2 -2
  11. package/dist/lib/neutral/app-graph-builder-FNDFY5L3.mjs.map +7 -0
  12. package/dist/lib/neutral/capabilities/index.mjs +2 -2
  13. package/dist/lib/neutral/{chunk-H5JLSLAO.mjs → chunk-NDZ6IIAL.mjs} +2 -2
  14. package/dist/lib/neutral/{chunk-H5JLSLAO.mjs.map → chunk-NDZ6IIAL.mjs.map} +3 -3
  15. package/dist/lib/neutral/components/index.mjs +11 -19
  16. package/dist/lib/neutral/components/index.mjs.map +4 -4
  17. package/dist/lib/neutral/containers/index.mjs +6 -6
  18. package/dist/lib/neutral/containers/index.mjs.map +3 -3
  19. package/dist/lib/neutral/index.mjs +1 -1
  20. package/dist/lib/neutral/meta.json +1 -1
  21. package/dist/lib/neutral/{react-surface-YGBE3TDK.mjs → react-surface-VO4GPCLQ.mjs} +11 -23
  22. package/dist/lib/neutral/react-surface-VO4GPCLQ.mjs.map +7 -0
  23. package/dist/lib/neutral/translations.mjs +0 -1
  24. package/dist/lib/neutral/translations.mjs.map +2 -2
  25. package/dist/lib/neutral/types/index.mjs +1 -1
  26. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
  27. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
  29. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  30. package/dist/types/src/capabilities/settings.d.ts +1 -3
  31. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  32. package/dist/types/src/components/Presenter/PresentationShell.d.ts +4 -2
  33. package/dist/types/src/components/Presenter/PresentationShell.d.ts.map +1 -1
  34. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  35. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +0 -1
  36. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/index.d.ts +0 -2
  38. package/dist/types/src/components/index.d.ts.map +1 -1
  39. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +6 -0
  40. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -0
  41. package/dist/types/src/containers/CollectionArticle/index.d.ts +2 -0
  42. package/dist/types/src/{components/PresenterSettings → containers/CollectionArticle}/index.d.ts.map +1 -1
  43. package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts +6 -0
  44. package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts.map +1 -0
  45. package/dist/types/src/containers/DocumentArticle/index.d.ts +2 -0
  46. package/dist/types/src/containers/DocumentArticle/index.d.ts.map +1 -0
  47. package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts +6 -0
  48. package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts.map +1 -0
  49. package/dist/types/src/containers/SlideArticle/index.d.ts +2 -0
  50. package/dist/types/src/containers/SlideArticle/index.d.ts.map +1 -0
  51. package/dist/types/src/containers/index.d.ts +3 -3
  52. package/dist/types/src/containers/index.d.ts.map +1 -1
  53. package/dist/types/src/meta.d.ts +4 -0
  54. package/dist/types/src/meta.d.ts.map +1 -1
  55. package/dist/types/src/translations.d.ts +0 -1
  56. package/dist/types/src/translations.d.ts.map +1 -1
  57. package/dist/types/src/types/PresenterOperation.d.ts +3 -12
  58. package/dist/types/src/types/PresenterOperation.d.ts.map +1 -1
  59. package/dist/types/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +32 -32
  61. package/src/capabilities/app-graph-builder.ts +4 -3
  62. package/src/capabilities/react-surface.tsx +8 -17
  63. package/src/components/Markdown/Panel.stories.tsx +1 -1
  64. package/src/components/Presenter/PresentationShell.tsx +15 -12
  65. package/src/components/RevealPlayer/RevealPlayer.tsx +11 -12
  66. package/src/components/index.ts +0 -4
  67. package/src/containers/{CollectionPresenterArticle/CollectionPresenterArticle.tsx → CollectionArticle/CollectionArticle.tsx} +2 -2
  68. package/src/containers/CollectionArticle/index.ts +5 -0
  69. package/src/containers/DocumentArticle/DocumentArticle.tsx +34 -0
  70. package/src/containers/DocumentArticle/index.ts +5 -0
  71. package/src/containers/{MarkdownSlide/MarkdownSlide.tsx → SlideArticle/SlideArticle.tsx} +4 -5
  72. package/src/containers/SlideArticle/index.ts +5 -0
  73. package/src/containers/index.ts +3 -3
  74. package/src/translations.ts +0 -1
  75. package/src/types/PresenterOperation.ts +1 -1
  76. package/dist/lib/neutral/CollectionPresenterArticle-ZRYWBX2H.mjs.map +0 -7
  77. package/dist/lib/neutral/DocumentPresenterContainer-5QF4P736.mjs.map +0 -7
  78. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs +0 -18
  79. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs.map +0 -7
  80. package/dist/lib/neutral/PresenterSettings-4YFP4K5G.mjs +0 -25
  81. package/dist/lib/neutral/PresenterSettings-4YFP4K5G.mjs.map +0 -7
  82. package/dist/lib/neutral/app-graph-builder-JMQVBFG2.mjs.map +0 -7
  83. package/dist/lib/neutral/react-surface-YGBE3TDK.mjs.map +0 -7
  84. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts +0 -6
  85. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +0 -1
  86. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +0 -23
  87. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +0 -1
  88. package/dist/types/src/components/PresenterSettings/index.d.ts +0 -2
  89. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts +0 -6
  90. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +0 -1
  91. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts +0 -2
  92. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts.map +0 -1
  93. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +0 -6
  94. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +0 -1
  95. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts +0 -2
  96. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts.map +0 -1
  97. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +0 -8
  98. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +0 -1
  99. package/dist/types/src/containers/MarkdownSlide/index.d.ts +0 -2
  100. package/dist/types/src/containers/MarkdownSlide/index.d.ts.map +0 -1
  101. package/src/components/PresenterSettings/PresenterSettings.stories.tsx +0 -32
  102. package/src/components/PresenterSettings/PresenterSettings.tsx +0 -31
  103. package/src/components/PresenterSettings/index.ts +0 -5
  104. package/src/containers/CollectionPresenterArticle/index.ts +0 -5
  105. package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +0 -26
  106. package/src/containers/DocumentPresenterContainer/index.ts +0 -5
  107. package/src/containers/MarkdownSlide/index.ts +0 -5
package/PLUGIN.mdl CHANGED
@@ -43,7 +43,7 @@ type PresentationSettings
43
43
  ## Components
44
44
 
45
45
  ```mdl
46
- component DocumentPresenterContainer
46
+ component DocumentArticle
47
47
  desc: |
48
48
  Full-screen Reveal.js player for a single Markdown document.
49
49
  Parses the document content into slides using horizontal/vertical `---` separators.
@@ -64,12 +64,12 @@ component DocumentPresenterContainer
64
64
  ```
65
65
 
66
66
  ```mdl
67
- component CollectionPresenterArticle
67
+ component CollectionArticle
68
68
  desc: |
69
69
  Slideshow player for a Collection.
70
70
  Renders one slide per object in the collection's ordered items array.
71
71
  The active slide is delegated to the AppSurface.Slide surface, so each
72
- item's own plugin renders it (e.g. MarkdownSlide for documents).
72
+ item's own plugin renders it (e.g. SlideArticle for documents).
73
73
  props:
74
74
  subject: Collection.Collection
75
75
  role?: string
@@ -92,7 +92,7 @@ component CollectionPresenterArticle
92
92
  ```
93
93
 
94
94
  ```mdl
95
- component MarkdownSlide
95
+ component SlideArticle
96
96
  desc: |
97
97
  Renders a single Markdown document as a slide panel inside a Collection presentation.
98
98
  Used as the AppSurface.Slide surface implementation for Markdown.Document objects.
@@ -145,7 +145,7 @@ feat F-1: Presentation Mode
145
145
  feat F-2: Document Slideshow (Reveal.js)
146
146
 
147
147
  req F-2.1:
148
- when: DocumentPresenterContainer mounts with a Markdown.Document
148
+ when: DocumentArticle mounts with a Markdown.Document
149
149
  then: RevealPlayer parses the document content and renders slides
150
150
  req F-2.2: Horizontal slides are separated by `---`; vertical slides by `----`.
151
151
  req F-2.3:
@@ -157,7 +157,7 @@ feat F-2: Document Slideshow (Reveal.js)
157
157
  feat F-3: Collection Slideshow
158
158
 
159
159
  req F-3.1:
160
- when: CollectionPresenterArticle mounts with a Collection
160
+ when: CollectionArticle mounts with a Collection
161
161
  then: slide 0 is shown, corresponding to collection.objects[0]
162
162
  req F-3.2:
163
163
  when: user navigates to slide N via the Pager
@@ -185,14 +185,14 @@ test T-1: Document presenter opens in fullscreen
185
185
  when: user invokes TogglePresentation (keyboard or action menu)
186
186
  then:
187
187
  - Composer switches to solo-fullscreen layout
188
- - DocumentPresenterContainer is shown with the document content
188
+ - DocumentArticle is shown with the document content
189
189
  - RevealPlayer is visible with at least one slide
190
190
  ```
191
191
 
192
192
  ```mdl
193
193
  test T-2: Slide navigation via Reveal.js
194
194
  given: a Markdown document with three `---`-separated sections
195
- when: DocumentPresenterContainer renders the document
195
+ when: DocumentArticle renders the document
196
196
  then:
197
197
  - three horizontal slides are produced
198
198
  - arrow-key navigation advances and retreats between slides
@@ -200,7 +200,7 @@ test T-2: Slide navigation via Reveal.js
200
200
 
201
201
  ```mdl
202
202
  test T-3: Exit returns to document view
203
- given: DocumentPresenterContainer is open in fullscreen
203
+ given: DocumentArticle is open in fullscreen
204
204
  when: user presses Escape
205
205
  then: Composer navigates back to the document article view
206
206
  ```
@@ -208,15 +208,15 @@ test T-3: Exit returns to document view
208
208
  ```mdl
209
209
  test T-4: Collection slideshow renders per-item surfaces
210
210
  given: a Collection with two Markdown documents and settings.presentCollections = true
211
- when: CollectionPresenterArticle mounts
211
+ when: CollectionArticle mounts
212
212
  then:
213
- - slide 0 shows MarkdownSlide for collection.objects[0]
213
+ - slide 0 shows SlideArticle for collection.objects[0]
214
214
  - Pager shows count = 2
215
215
  ```
216
216
 
217
217
  ```mdl
218
218
  test T-5: Collection slide advance
219
- given: CollectionPresenterArticle at slide 0 with a three-item collection
219
+ given: CollectionArticle at slide 0 with a three-item collection
220
220
  when: user clicks the next-slide control in Pager
221
221
  then:
222
222
  - slide index advances to 1
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-63IF7OXT.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
- // src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx
6
+ // src/containers/CollectionArticle/CollectionArticle.tsx
7
7
  import React, { useContext, useState } from "react";
8
8
  import { Surface } from "@dxos/app-framework/ui";
9
9
  import { AppSurface } from "@dxos/app-toolkit/ui";
@@ -11,7 +11,7 @@ import { Obj } from "@dxos/echo";
11
11
  import { Panel } from "@dxos/react-ui";
12
12
  import { PageNumber, Pager, PresentationShell, Layout as PresenterLayout } from "#components";
13
13
  import { PresenterContext } from "#types";
14
- var CollectionPresenterArticle = ({ role, subject: collection }) => {
14
+ var CollectionArticle = ({ role, subject: collection }) => {
15
15
  const [slide, setSlide] = useState(0);
16
16
  const { running } = useContext(PresenterContext);
17
17
  const handleExit = useExitPresenter(collection);
@@ -42,6 +42,6 @@ var CollectionPresenterArticle = ({ role, subject: collection }) => {
42
42
  })))));
43
43
  };
44
44
  export {
45
- CollectionPresenterArticle as default
45
+ CollectionArticle as default
46
46
  };
47
- //# sourceMappingURL=CollectionPresenterArticle-ZRYWBX2H.mjs.map
47
+ //# sourceMappingURL=CollectionArticle-7R4KJWDW.mjs.map
@@ -0,0 +1,7 @@
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
+ }
@@ -3,23 +3,30 @@ import {
3
3
  } from "./chunk-63IF7OXT.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
- // src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx
6
+ // src/containers/DocumentArticle/DocumentArticle.tsx
7
7
  import React from "react";
8
+ import { useLayout } from "@dxos/app-toolkit/ui";
8
9
  import { Panel } from "@dxos/react-ui";
9
10
  import { PresentationShell, RevealPlayer } from "#components";
10
- var DocumentPresenterContainer = ({ document }) => {
11
+ var DocumentArticle = ({ role, subject: document }) => {
11
12
  const handleExit = useExitPresenter(document);
13
+ const layout = useLayout();
14
+ const fullscreen = layout.mode === "solo--fullscreen";
15
+ const content = document.content.target?.content;
12
16
  return /* @__PURE__ */ React.createElement(Panel.Root, {
17
+ role,
13
18
  classNames: "relative"
14
19
  }, /* @__PURE__ */ React.createElement(Panel.Content, {
15
20
  asChild: true
16
21
  }, /* @__PURE__ */ React.createElement(PresentationShell, {
22
+ fullscreen,
17
23
  onExit: handleExit
18
- }, /* @__PURE__ */ React.createElement(RevealPlayer, {
19
- content: document.content.target?.content ?? ""
24
+ }, content !== void 0 && /* @__PURE__ */ React.createElement(RevealPlayer, {
25
+ fullscreen,
26
+ content
20
27
  }))));
21
28
  };
22
29
  export {
23
- DocumentPresenterContainer as default
30
+ DocumentArticle as default
24
31
  };
25
- //# sourceMappingURL=DocumentPresenterContainer-5QF4P736.mjs.map
32
+ //# sourceMappingURL=DocumentArticle-YZRKVEN7.mjs.map
@@ -0,0 +1,7 @@
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
+ }
@@ -9,7 +9,7 @@ import { meta } from "#meta";
9
9
  import { translations } from "#translations";
10
10
 
11
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 DocumentPresenterContainer\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 CollectionPresenterArticle\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. MarkdownSlide 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 MarkdownSlide\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: DocumentPresenterContainer 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: CollectionPresenterArticle 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 - DocumentPresenterContainer 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: DocumentPresenterContainer 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: DocumentPresenterContainer 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: CollectionPresenterArticle mounts\n then:\n - slide 0 shows MarkdownSlide for collection.objects[0]\n - Pager shows count = 2\n```\n\n```mdl\ntest T-5: Collection slide advance\n given: CollectionPresenterArticle 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';
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
13
 
14
14
  // src/PresenterPlugin.tsx
15
15
  var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 DocumentPresenterContainer\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 CollectionPresenterArticle\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. MarkdownSlide 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 MarkdownSlide\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: DocumentPresenterContainer 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: CollectionPresenterArticle 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 - DocumentPresenterContainer 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: DocumentPresenterContainer 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: DocumentPresenterContainer 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: CollectionPresenterArticle mounts\n then:\n - slide 0 shows MarkdownSlide for collection.objects[0]\n - Pager shows count = 2\n```\n\n```mdl\ntest T-5: Collection slide advance\n given: CollectionPresenterArticle 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"],
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
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
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
7
  }
@@ -0,0 +1,20 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/SlideArticle/SlideArticle.tsx
4
+ import React from "react";
5
+ import { Panel, Slide } from "#components";
6
+ var SlideArticle = ({ subject: document }) => {
7
+ const content = document.content.target?.content;
8
+ if (!content) {
9
+ return null;
10
+ }
11
+ return /* @__PURE__ */ React.createElement(Panel, {
12
+ classNames: "border"
13
+ }, /* @__PURE__ */ React.createElement(Slide, {
14
+ content
15
+ }));
16
+ };
17
+ export {
18
+ SlideArticle as default
19
+ };
20
+ //# sourceMappingURL=SlideArticle-FE2I6KBO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/SlideArticle/SlideArticle.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Markdown } from '@dxos/plugin-markdown';\n\nimport { Panel, Slide } from '#components';\n\nexport type SlideArticleProps = AppSurface.ObjectSectionProps<Markdown.Document>;\n\nexport const SlideArticle = ({ subject: document }: SlideArticleProps) => {\n const content = document.content.target?.content;\n if (!content) {\n return null;\n }\n\n return (\n <Panel classNames='border'>\n <Slide content={content} />\n </Panel>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAKlB,SAASC,OAAOC,aAAa;AAItB,IAAMC,eAAe,CAAC,EAAEC,SAASC,SAAQ,MAAqB;AACnE,QAAMC,UAAUD,SAASC,QAAQC,QAAQD;AACzC,MAAI,CAACA,SAAS;AACZ,WAAO;EACT;AAEA,SACE,sBAAA,cAACL,OAAAA;IAAMO,YAAW;KAChB,sBAAA,cAACN,OAAAA;IAAMI;;AAGb;",
6
+ "names": ["React", "Panel", "Slide", "SlideArticle", "subject", "document", "content", "target", "classNames"]
7
+ }
@@ -13,7 +13,7 @@ import { linkedSegment } from "@dxos/react-ui-attention";
13
13
  import { meta } from "#meta";
14
14
  import { PresenterOperation } from "#types";
15
15
  import { PresenterCapabilities } from "#types";
16
- var whenPresentable = (node) => Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () => NodeMatcher.whenEchoType(Markdown.Document)(node));
16
+ var whenPresentable = (node, get) => Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node, get), () => NodeMatcher.whenEchoType(Markdown.Document)(node, get));
17
17
  var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
18
  const capabilities = yield* Capability.Service;
19
19
  const extensions = yield* GraphBuilder.createExtension({
@@ -78,4 +78,4 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
78
78
  export {
79
79
  app_graph_builder_default as default
80
80
  };
81
- //# sourceMappingURL=app-graph-builder-JMQVBFG2.mjs.map
81
+ //# sourceMappingURL=app-graph-builder-FNDFY5L3.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 { type Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Collection, Obj } from '@dxos/echo';\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, get: Atom.Context) =>\n Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node, get), () =>\n NodeMatcher.whenEchoType(Markdown.Document)(node, get),\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.profile.key, 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\n return Effect.succeed([\n {\n id: PresenterOperation.TogglePresentation.meta.key,\n data: Effect.fnUntraced(function* () {\n yield* Operation.invoke(PresenterOperation.TogglePresentation, { object });\n }),\n properties: {\n label: ['toggle-presentation.label', { ns: meta.profile.key }],\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": ";;;AAKA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,eAAe;AACzC,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,WAAW;AAChC,SAASC,cAAyBC,mBAAmB;AACrD,SAASC,gBAAgB;AACzB,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AACrB,SAASC,0BAA0B;AACnC,SAASC,6BAA6B;AAGtC,IAAMC,kBAAkB,CAACC,MAAiBC,QACjCC,cAAOT,YAAYU,aAAab,WAAWA,UAAU,EAAEU,MAAMC,GAAAA,GAAM,MACxER,YAAYU,aAAaT,SAASU,QAAQ,EAAEJ,MAAMC,GAAAA,CAAAA;AAGtD,IAAA,4BAAef,WAAWmB,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOrB,WAAWsB;AAEvC,QAAMC,aAAa,OAAOjB,aAAakB,gBAAgB;IACrDC,IAAI;;IAEJC,OAAOb;IACPc,WAAW,CAACC,QAAQb,QAAAA;AAClB,YAAMc,eAAeR,aAAaN,IAAIH,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWhB,IAAIc,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B5B,IAAI6B,WAAW9B,WAAWA,YAAYwB,MAAAA,KAAWvB,IAAI6B,WAAW1B,SAASU,UAAUU,MAAAA,IACnFvB,IAAI6B,WAAW1B,SAASU,UAAUU,MAAAA;AACtC,UAAI,CAACI,eAAe;AAClB,eAAcG,eAAQ,CAAA,CAAE;MAC1B;AAEA,aAAcA,eAAQ;QACpBjC,QAAQkC,cAAc;UACpBX,IAAIhB,cAAc,WAAA;UAClB4B,OAAO;UACPC,MAAM;UACNC,MAAM;YAAEC,MAAM9B,KAAK+B,QAAQC;YAAKd;UAAO;QACzC,CAAA;OACD;IACH;IACAe,SAAS,CAACf,QAAQb,QAAAA;AAChB,YAAMc,eAAeR,aAAaN,IAAIH,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWhB,IAAIc,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B5B,IAAI6B,WAAW9B,WAAWA,YAAYwB,MAAAA,KAAWvB,IAAI6B,WAAW1B,SAASU,UAAUU,MAAAA,IACnFvB,IAAI6B,WAAW1B,SAASU,UAAUU,MAAAA;AACtC,YAAMgB,KAAKvC,IAAIwC,YAAYjB,MAAAA;AAC3B,UAAI,CAACI,iBAAiB,CAACY,IAAI;AACzB,eAAcT,eAAQ,CAAA,CAAE;MAC1B;AAEA,aAAcA,eAAQ;QACpB;UACEV,IAAId,mBAAmBmC,mBAAmBpC,KAAKgC;UAC/CH,MAAanB,kBAAW,aAAA;AACtB,mBAAOjB,UAAU4C,OAAOpC,mBAAmBmC,oBAAoB;cAAElB;YAAO,CAAA;UAC1E,CAAA;UACAoB,YAAY;YACVX,OAAO;cAAC;cAA6B;gBAAEY,IAAIvC,KAAK+B,QAAQC;cAAI;;YAC5DJ,MAAM;YACNY,aAAa;YACbC,YAAY;cACVC,OAAO;cACPC,SAAS;YACX;UACF;QACF;OACD;IACH;EACF,CAAA;AAEA,SAAOrD,WAAWsD,YAAYrD,gBAAgBsD,iBAAiBhC,UAAAA;AACjE,CAAA,CAAA;",
6
+ "names": ["Effect", "Option", "Capability", "AppCapabilities", "AppNode", "Operation", "Collection", "Obj", "GraphBuilder", "NodeMatcher", "Markdown", "linkedSegment", "meta", "PresenterOperation", "PresenterCapabilities", "whenPresentable", "node", "get", "orElse", "whenEchoType", "Document", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "createExtension", "id", "match", "connector", "object", "settingsAtom", "Settings", "settings", "isPresentable", "presentCollections", "instanceOf", "succeed", "makeCompanion", "label", "icon", "data", "type", "profile", "key", "actions", "db", "getDatabase", "TogglePresentation", "invoke", "properties", "ns", "disposition", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
7
+ }
@@ -2,10 +2,10 @@ import "../chunk-J5LGTIGS.mjs";
2
2
 
3
3
  // src/capabilities/index.ts
4
4
  import { Capability } from "@dxos/app-framework";
5
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-JMQVBFG2.mjs"));
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-FNDFY5L3.mjs"));
6
6
  var MarkdownExtension = Capability.lazy("MarkdownExtension", () => import("../markdown-extension-HGLRVZDF.mjs"));
7
7
  var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-3ZESW5AK.mjs"));
8
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-YGBE3TDK.mjs"));
8
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-VO4GPCLQ.mjs"));
9
9
  var PresenterSettings = Capability.lazy("PresenterSettings", () => import("../settings-DBV7N5HT.mjs"));
10
10
  export {
11
11
  AppGraphBuilder,
@@ -22,7 +22,7 @@ __export(PresenterOperation_exports, {
22
22
  import * as Schema from "effect/Schema";
23
23
  import { Capability as Capability2 } from "@dxos/app-framework";
24
24
  import { Operation } from "@dxos/compute";
25
- import { Collection, Type, DXN } from "@dxos/echo";
25
+ import { Collection, DXN, Type } from "@dxos/echo";
26
26
  import { Markdown } from "@dxos/plugin-markdown";
27
27
  import { meta as meta2 } from "#meta";
28
28
  var makeKey = (name) => DXN.make(`${meta2.profile.key}.operation.${name}`);
@@ -70,4 +70,4 @@ export {
70
70
  Settings_exports,
71
71
  PresenterContext
72
72
  };
73
- //# sourceMappingURL=chunk-H5JLSLAO.mjs.map
73
+ //# sourceMappingURL=chunk-NDZ6IIAL.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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>>(\n `${meta.profile.key}.capability.settings`,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Collection, Type, DXN } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const TogglePresentation = Operation.make({\n meta: {\n key: makeKey('togglePresentation'),\n name: 'Toggle Presentation',\n icon: 'ph--presentation--regular',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(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,KACjC,GAAGF,KAAKG,QAAQC,GAAG,sBAAsB;;;ACf3C;;;;AAMA,YAAYC,YAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,MAAMC,WAAW;AACtC,SAASC,gBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAErB,IAAMC,UAAU,CAACC,SAAiBJ,IAAIK,KAAK,GAAGH,MAAKI,QAAQC,GAAG,cAAcH,IAAAA,EAAM;AAE3E,IAAMI,qBAAqBX,UAAUQ,KAAK;EAC/CH,MAAM;IACJK,KAAKJ,QAAQ,oBAAA;IACbC,MAAM;IACNK,MAAM;EACR;EACAC,UAAU;IAACd,YAAWe;;EACtBC,OAAcC,cAAO;IACnBC,QAAeC,aAAMhB,KAAKiB,UAAUf,SAASgB,QAAQ,GAAGlB,KAAKiB,UAAUlB,WAAWA,UAAU,CAAA;IAC5FoB,OAAcC,gBAAgBC,cAAO;EACvC,CAAA;EACAC,QAAeC;AACjB,CAAA;;;AC7BA;;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", "profile", "key", "Schema", "Capability", "Operation", "Collection", "Type", "DXN", "Markdown", "meta", "makeKey", "name", "make", "profile", "key", "TogglePresentation", "icon", "services", "Service", "input", "Struct", "object", "Union", "getSchema", "Document", "state", "optional", "Boolean", "output", "Void", "Settings", "Schema", "mutable", "Struct", "presentCollections", "optional", "Boolean", "annotations", "title", "description", "PresenterContext", "createContext", "running", "start", "stop"]
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>>(\n `${meta.profile.key}.capability.settings`,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Collection, DXN, Type } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const TogglePresentation = Operation.make({\n meta: {\n key: makeKey('togglePresentation'),\n name: 'Toggle Presentation',\n icon: 'ph--presentation--regular',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(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,KACjC,GAAGF,KAAKG,QAAQC,GAAG,sBAAsB;;;ACf3C;;;;AAMA,YAAYC,YAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,KAAKC,YAAY;AACtC,SAASC,gBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAErB,IAAMC,UAAU,CAACC,SAAiBL,IAAIM,KAAK,GAAGH,MAAKI,QAAQC,GAAG,cAAcH,IAAAA,EAAM;AAE3E,IAAMI,qBAAqBX,UAAUQ,KAAK;EAC/CH,MAAM;IACJK,KAAKJ,QAAQ,oBAAA;IACbC,MAAM;IACNK,MAAM;EACR;EACAC,UAAU;IAACd,YAAWe;;EACtBC,OAAcC,cAAO;IACnBC,QAAeC,aAAMf,KAAKgB,UAAUf,SAASgB,QAAQ,GAAGjB,KAAKgB,UAAUlB,WAAWA,UAAU,CAAA;IAC5FoB,OAAcC,gBAAgBC,cAAO;EACvC,CAAA;EACAC,QAAeC;AACjB,CAAA;;;AC7BA;;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", "profile", "key", "Schema", "Capability", "Operation", "Collection", "DXN", "Type", "Markdown", "meta", "makeKey", "name", "make", "profile", "key", "TogglePresentation", "icon", "services", "Service", "input", "Struct", "object", "Union", "getSchema", "Document", "state", "optional", "Boolean", "output", "Void", "Settings", "Schema", "mutable", "Struct", "presentCollections", "optional", "Boolean", "annotations", "title", "description", "PresenterContext", "createContext", "running", "start", "stop"]
7
7
  }
@@ -1,8 +1,5 @@
1
1
  import "../chunk-J5LGTIGS.mjs";
2
2
 
3
- // src/components/index.ts
4
- import { lazy } from "react";
5
-
6
3
  // src/components/Markdown/Panel.tsx
7
4
  import React, { useState } from "react";
8
5
  import { useResizeDetector } from "react-resize-detector";
@@ -335,7 +332,7 @@ var StartButton = ({ running, onClick }) => {
335
332
  import React5, { useCallback, useEffect as useEffect2, useRef, useState as useState2 } from "react";
336
333
  import { composable as composable2, composableProps as composableProps2 } from "@dxos/react-ui";
337
334
  import { mx as mx2 } from "@dxos/ui-theme";
338
- var PresentationShell = composable2(({ children, onExit, fadeDuration = 300, hintDuration = 3e3, ...props }, forwardedRef) => {
335
+ var PresentationShell = composable2(({ children, fadeDuration = 300, hintDuration = 3e3, fullscreen = true, onExit, ...props }, forwardedRef) => {
339
336
  const [visible, setVisible] = useState2(false);
340
337
  const [exiting, setExiting] = useState2(false);
341
338
  const [showHint, setShowHint] = useState2(true);
@@ -392,7 +389,7 @@ var PresentationShell = composable2(({ children, onExit, fadeDuration = 300, hin
392
389
  }
393
390
  }),
394
391
  ref: forwardedRef
395
- }, children, /* @__PURE__ */ React5.createElement("div", {
392
+ }, children, fullscreen && /* @__PURE__ */ React5.createElement("div", {
396
393
  className: mx2("absolute top-4 left-4 z-[300] transition-opacity duration-500", showHint && !exiting ? "opacity-100" : "opacity-0")
397
394
  }, /* @__PURE__ */ React5.createElement("span", {
398
395
  className: "rounded-sm bg-white/10 px-2 py-1 font-mono text-sm text-white/70"
@@ -411,6 +408,7 @@ import RevealHighlight from "reveal.js/plugin/highlight/highlight";
411
408
  import RevealMarkdown from "reveal.js/plugin/markdown/plugin.js";
412
409
  import { useAsyncEffect } from "@dxos/react-ui";
413
410
  import { composable as composable3, composableProps as composableProps3 } from "@dxos/react-ui";
411
+ import { mx as mx3 } from "@dxos/ui-theme";
414
412
  var styles = `
415
413
  <style type="text/css">
416
414
  .reveal h1 {
@@ -520,7 +518,7 @@ var RevealPlayer = composable3(({ content, slide, fullscreen = true, onExit, chi
520
518
  return /* @__PURE__ */ React6.createElement("div", {
521
519
  ...composableProps3(props, {
522
520
  classNames: [
523
- "dx-container grid place-items-center bg-black",
521
+ "dx-container grid place-items-center bg-scrim-surface",
524
522
  fullscreen && "absolute inset-0"
525
523
  ]
526
524
  }),
@@ -530,21 +528,19 @@ var RevealPlayer = composable3(({ content, slide, fullscreen = true, onExit, chi
530
528
  }, /* @__PURE__ */ React6.createElement("div", {
531
529
  ref: deckDivRef,
532
530
  className: "absolute inset-0 reveal"
533
- }, /* @__PURE__ */ React6.createElement("style", null, /* @__PURE__ */ React6.createElement("link", {
534
- rel: "preconnect",
535
- href: "https://fonts.googleapis.com"
536
- }), /* @__PURE__ */ React6.createElement("link", {
531
+ }, /* @__PURE__ */ React6.createElement("link", {
537
532
  rel: "preconnect",
538
533
  href: "https://fonts.gstatic.com",
539
534
  crossOrigin: ""
535
+ }), /* @__PURE__ */ React6.createElement("link", {
536
+ rel: "preconnect",
537
+ href: "https://fonts.googleapis.com"
540
538
  }), /* @__PURE__ */ React6.createElement("link", {
541
539
  rel: "stylesheet",
542
540
  href: "https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"
543
- })), /* @__PURE__ */ React6.createElement("div", {
544
- className: "slides"
545
- }, /* @__PURE__ */ React6.createElement("div", {
546
- className: "text-center!"
547
- }), /* @__PURE__ */ React6.createElement("section", {
541
+ }), /* @__PURE__ */ React6.createElement("div", {
542
+ className: mx3("slides", !fullscreen && "bg-base-surface p-8")
543
+ }, /* @__PURE__ */ React6.createElement("div", null), /* @__PURE__ */ React6.createElement("section", {
548
544
  "data-markdown": []
549
545
  }, /* @__PURE__ */ React6.createElement("textarea", {
550
546
  "data-template": true,
@@ -554,16 +550,12 @@ var RevealPlayer = composable3(({ content, slide, fullscreen = true, onExit, chi
554
550
  ].join("\n")
555
551
  }))))));
556
552
  });
557
-
558
- // src/components/index.ts
559
- var PresenterSettings = lazy(() => import("../PresenterSettings-4YFP4K5G.mjs"));
560
553
  export {
561
554
  Layout,
562
555
  PageNumber,
563
556
  Pager,
564
557
  Panel,
565
558
  PresentationShell,
566
- PresenterSettings,
567
559
  RevealPlayer,
568
560
  Slide,
569
561
  StartButton