@dxos/plugin-presenter 0.8.4-main.c4373fc → 0.8.4-main.d9fc60f731

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 (207) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +309 -0
  3. package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs +46 -0
  4. package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs.map +7 -0
  5. package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs +24 -0
  6. package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs.map +7 -0
  7. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs +18 -0
  8. package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs.map +7 -0
  9. package/dist/lib/neutral/PresenterPlugin.mjs +35 -0
  10. package/dist/lib/neutral/PresenterPlugin.mjs.map +7 -0
  11. package/dist/lib/neutral/PresenterPlugin.node.mjs +16 -0
  12. package/dist/lib/neutral/PresenterPlugin.node.mjs.map +7 -0
  13. package/dist/lib/neutral/PresenterPlugin.workerd.mjs +12 -0
  14. package/dist/lib/neutral/PresenterPlugin.workerd.mjs.map +7 -0
  15. package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs +25 -0
  16. package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs.map +7 -0
  17. package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs +97 -0
  18. package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs.map +7 -0
  19. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  20. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  22. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-PPL2FF6R.mjs +38 -0
  24. package/dist/lib/neutral/chunk-PPL2FF6R.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-V323QBC3.mjs +41 -0
  26. package/dist/lib/neutral/chunk-V323QBC3.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-VVALMI52.mjs +69 -0
  28. package/dist/lib/neutral/chunk-VVALMI52.mjs.map +7 -0
  29. package/dist/lib/neutral/components/index.mjs +502 -0
  30. package/dist/lib/neutral/components/index.mjs.map +7 -0
  31. package/dist/lib/neutral/containers/index.mjs +13 -0
  32. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  33. package/dist/lib/neutral/index.mjs +18 -0
  34. package/dist/lib/neutral/index.mjs.map +7 -0
  35. package/dist/lib/neutral/meta.json +1 -0
  36. package/dist/lib/neutral/meta.mjs +8 -0
  37. package/dist/lib/neutral/meta.mjs.map +7 -0
  38. package/dist/lib/neutral/plugin.mjs +12 -0
  39. package/dist/lib/neutral/plugin.mjs.map +7 -0
  40. package/dist/lib/neutral/react-surface-SPJGAJIF.mjs +54 -0
  41. package/dist/lib/neutral/react-surface-SPJGAJIF.mjs.map +7 -0
  42. package/dist/lib/neutral/settings-R6LRDAAK.mjs +28 -0
  43. package/dist/lib/neutral/settings-R6LRDAAK.mjs.map +7 -0
  44. package/dist/lib/neutral/translations.mjs +19 -0
  45. package/dist/lib/neutral/translations.mjs.map +7 -0
  46. package/dist/lib/neutral/types/index.mjs +14 -0
  47. package/dist/lib/neutral/types/index.mjs.map +7 -0
  48. package/dist/types/src/PresenterPlugin.d.ts +3 -1
  49. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  50. package/dist/types/src/PresenterPlugin.node.d.ts +4 -0
  51. package/dist/types/src/PresenterPlugin.node.d.ts.map +1 -0
  52. package/dist/types/src/PresenterPlugin.test.d.ts +2 -0
  53. package/dist/types/src/PresenterPlugin.test.d.ts.map +1 -0
  54. package/dist/types/src/PresenterPlugin.workerd.d.ts +4 -0
  55. package/dist/types/src/PresenterPlugin.workerd.d.ts.map +1 -0
  56. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  57. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/index.d.ts +4 -3
  59. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  60. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  61. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/settings.d.ts +5 -2
  63. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  64. package/dist/types/src/components/Markdown/Panel.d.ts +8 -0
  65. package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -0
  66. package/dist/types/src/components/Markdown/{Container.stories.d.ts → Panel.stories.d.ts} +1 -1
  67. package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -0
  68. package/dist/types/src/components/Markdown/Slide.d.ts +1 -1
  69. package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
  70. package/dist/types/src/components/Markdown/Slide.stories.d.ts.map +1 -1
  71. package/dist/types/src/components/Markdown/index.d.ts +1 -1
  72. package/dist/types/src/components/Markdown/index.d.ts.map +1 -1
  73. package/dist/types/src/components/Markdown/theme.d.ts.map +1 -1
  74. package/dist/types/src/components/Presenter/Layout.d.ts +5 -5
  75. package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
  76. package/dist/types/src/components/Presenter/Pager.d.ts +1 -1
  77. package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
  78. package/dist/types/src/components/Presenter/Pager.stories.d.ts.map +1 -1
  79. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts +6 -0
  80. package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -0
  81. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +23 -0
  82. package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -0
  83. package/dist/types/src/components/PresenterSettings/index.d.ts +2 -0
  84. package/dist/types/src/components/PresenterSettings/index.d.ts.map +1 -0
  85. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +5 -4
  86. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  87. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +7 -6
  88. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/index.d.ts +5 -25
  90. package/dist/types/src/components/index.d.ts.map +1 -1
  91. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts +6 -0
  92. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +1 -0
  93. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts +2 -0
  94. package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts.map +1 -0
  95. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +6 -0
  96. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -0
  97. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts +2 -0
  98. package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts.map +1 -0
  99. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +8 -0
  100. package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +1 -0
  101. package/dist/types/src/containers/MarkdownSlide/index.d.ts +2 -0
  102. package/dist/types/src/containers/MarkdownSlide/index.d.ts.map +1 -0
  103. package/dist/types/src/containers/index.d.ts +5 -0
  104. package/dist/types/src/containers/index.d.ts.map +1 -0
  105. package/dist/types/src/index.d.ts +1 -2
  106. package/dist/types/src/index.d.ts.map +1 -1
  107. package/dist/types/src/meta.d.ts +2 -2
  108. package/dist/types/src/meta.d.ts.map +1 -1
  109. package/dist/types/src/plugin.d.ts +3 -0
  110. package/dist/types/src/plugin.d.ts.map +1 -0
  111. package/dist/types/src/testing.d.ts.map +1 -1
  112. package/dist/types/src/translations.d.ts +4 -6
  113. package/dist/types/src/translations.d.ts.map +1 -1
  114. package/dist/types/src/types/PresenterCapabilities.d.ts +4 -0
  115. package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -0
  116. package/dist/types/src/types/PresenterOperation.d.ts +17 -0
  117. package/dist/types/src/types/PresenterOperation.d.ts.map +1 -0
  118. package/dist/types/src/types/Settings.d.ts +7 -0
  119. package/dist/types/src/types/Settings.d.ts.map +1 -0
  120. package/dist/types/src/types/index.d.ts +11 -0
  121. package/dist/types/src/types/index.d.ts.map +1 -0
  122. package/dist/types/src/useExitPresenter.d.ts +3 -4
  123. package/dist/types/src/useExitPresenter.d.ts.map +1 -1
  124. package/dist/types/tsconfig.tsbuildinfo +1 -1
  125. package/package.json +99 -43
  126. package/src/PresenterPlugin.node.ts +16 -0
  127. package/src/PresenterPlugin.test.ts +23 -0
  128. package/src/PresenterPlugin.tsx +19 -25
  129. package/src/PresenterPlugin.workerd.ts +11 -0
  130. package/src/capabilities/app-graph-builder.ts +92 -103
  131. package/src/capabilities/index.ts +4 -4
  132. package/src/capabilities/react-surface.tsx +59 -55
  133. package/src/capabilities/settings.ts +24 -12
  134. package/src/components/Markdown/{Container.stories.tsx → Panel.stories.tsx} +7 -7
  135. package/src/components/Markdown/{Container.tsx → Panel.tsx} +6 -6
  136. package/src/components/Markdown/Slide.stories.tsx +4 -4
  137. package/src/components/Markdown/Slide.tsx +2 -2
  138. package/src/components/Markdown/index.ts +1 -1
  139. package/src/components/Markdown/theme.ts +5 -5
  140. package/src/components/Presenter/Layout.tsx +24 -23
  141. package/src/components/Presenter/Pager.stories.tsx +2 -2
  142. package/src/components/Presenter/Pager.tsx +53 -18
  143. package/src/components/PresenterSettings/PresenterSettings.stories.tsx +32 -0
  144. package/src/components/PresenterSettings/PresenterSettings.tsx +31 -0
  145. package/src/components/PresenterSettings/index.ts +5 -0
  146. package/src/components/RevealPlayer/RevealPlayer.stories.tsx +5 -5
  147. package/src/components/RevealPlayer/RevealPlayer.tsx +104 -95
  148. package/src/components/index.ts +5 -5
  149. package/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx +50 -0
  150. package/src/containers/CollectionPresenterArticle/index.ts +5 -0
  151. package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +24 -0
  152. package/src/containers/DocumentPresenterContainer/index.ts +5 -0
  153. package/src/containers/MarkdownSlide/MarkdownSlide.tsx +26 -0
  154. package/src/containers/MarkdownSlide/index.ts +5 -0
  155. package/src/containers/index.ts +9 -0
  156. package/src/index.ts +1 -3
  157. package/src/meta.ts +29 -5
  158. package/src/plugin.ts +9 -0
  159. package/src/testing.ts +6 -6
  160. package/src/translations.ts +4 -5
  161. package/src/types/PresenterCapabilities.ts +15 -0
  162. package/src/types/PresenterOperation.ts +29 -0
  163. package/src/types/Settings.ts +20 -0
  164. package/src/types/index.ts +21 -0
  165. package/src/useExitPresenter.ts +26 -25
  166. package/src/vite-env.d.ts +5 -0
  167. package/dist/lib/browser/CollectionPresenterContainer-LPJILYRF.mjs +0 -191
  168. package/dist/lib/browser/CollectionPresenterContainer-LPJILYRF.mjs.map +0 -7
  169. package/dist/lib/browser/DocumentPresenterContainer-F42V4KAL.mjs +0 -183
  170. package/dist/lib/browser/DocumentPresenterContainer-F42V4KAL.mjs.map +0 -7
  171. package/dist/lib/browser/MarkdownSlide-BLVWTH3U.mjs +0 -223
  172. package/dist/lib/browser/MarkdownSlide-BLVWTH3U.mjs.map +0 -7
  173. package/dist/lib/browser/app-graph-builder-RLGABE65.mjs +0 -106
  174. package/dist/lib/browser/app-graph-builder-RLGABE65.mjs.map +0 -7
  175. package/dist/lib/browser/chunk-6ZM323ED.mjs +0 -13
  176. package/dist/lib/browser/chunk-6ZM323ED.mjs.map +0 -7
  177. package/dist/lib/browser/chunk-7DV6S5XB.mjs +0 -39
  178. package/dist/lib/browser/chunk-7DV6S5XB.mjs.map +0 -7
  179. package/dist/lib/browser/chunk-QTSOWA2K.mjs +0 -41
  180. package/dist/lib/browser/chunk-QTSOWA2K.mjs.map +0 -7
  181. package/dist/lib/browser/chunk-UVGTHJUO.mjs +0 -36
  182. package/dist/lib/browser/chunk-UVGTHJUO.mjs.map +0 -7
  183. package/dist/lib/browser/index.mjs +0 -65
  184. package/dist/lib/browser/index.mjs.map +0 -7
  185. package/dist/lib/browser/meta.json +0 -1
  186. package/dist/lib/browser/react-surface-P7YJFHF3.mjs +0 -57
  187. package/dist/lib/browser/react-surface-P7YJFHF3.mjs.map +0 -7
  188. package/dist/lib/browser/settings-7A4A2H6X.mjs +0 -22
  189. package/dist/lib/browser/settings-7A4A2H6X.mjs.map +0 -7
  190. package/dist/types/src/components/CollectionPresenterContainer.d.ts +0 -7
  191. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +0 -1
  192. package/dist/types/src/components/DocumentPresenterContainer.d.ts +0 -7
  193. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +0 -1
  194. package/dist/types/src/components/Markdown/Container.d.ts +0 -8
  195. package/dist/types/src/components/Markdown/Container.d.ts.map +0 -1
  196. package/dist/types/src/components/Markdown/Container.stories.d.ts.map +0 -1
  197. package/dist/types/src/components/MarkdownSlide.d.ts +0 -7
  198. package/dist/types/src/components/MarkdownSlide.d.ts.map +0 -1
  199. package/dist/types/src/components/PresenterSettings.d.ts +0 -6
  200. package/dist/types/src/components/PresenterSettings.d.ts.map +0 -1
  201. package/dist/types/src/types.d.ts +0 -39
  202. package/dist/types/src/types.d.ts.map +0 -1
  203. package/src/components/CollectionPresenterContainer.tsx +0 -44
  204. package/src/components/DocumentPresenterContainer.tsx +0 -23
  205. package/src/components/MarkdownSlide.tsx +0 -24
  206. package/src/components/PresenterSettings.tsx +0 -30
  207. package/src/types.ts +0 -46
@@ -0,0 +1,12 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/PresenterPlugin.workerd.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { meta } from "#meta";
6
+ var PresenterPlugin = Plugin.define(meta).pipe(Plugin.make);
7
+ var PresenterPlugin_workerd_default = PresenterPlugin;
8
+ export {
9
+ PresenterPlugin,
10
+ PresenterPlugin_workerd_default as default
11
+ };
12
+ //# sourceMappingURL=PresenterPlugin.workerd.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/PresenterPlugin.workerd.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport const PresenterPlugin = Plugin.define(meta).pipe(Plugin.make);\n\nexport default PresenterPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AAEvB,SAASC,YAAY;AAEd,IAAMC,kBAAkBF,OAAOG,OAAOF,IAAAA,EAAMG,KAAKJ,OAAOK,IAAI;AAEnE,IAAA,kCAAeH;",
6
+ "names": ["Plugin", "meta", "PresenterPlugin", "define", "pipe", "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": "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",
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-SPJGAJIF.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
+ }
@@ -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
+ }
@@ -0,0 +1,38 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { DXN } from "@dxos/keys";
4
+ import { trim } from "@dxos/util";
5
+ var meta = Plugin.makeMeta({
6
+ key: DXN.make("org.dxos.plugin.presenter"),
7
+ name: "Presenter",
8
+ author: "DXOS",
9
+ description: trim`
10
+ Transform existing workspace objects into interactive presentation slideshows without
11
+ duplicating content. Markdown documents are split into slides on horizontal \`---\`
12
+ separators and rendered with Reveal.js, giving authors a familiar authoring surface
13
+ with full Markdown syntax. Collections can optionally be presented slide-by-slide,
14
+ with each member object rendered by its own plugin surface.
15
+
16
+ Activate presentation mode for any supported object via the action menu or the
17
+ Shift+Cmd+P (macOS) / Shift+Alt+P (Windows/Linux) keyboard shortcut. The presenter
18
+ opens in a solo fullscreen layout managed by the Deck plugin, keeping the rest of the
19
+ workspace undisturbed.
20
+
21
+ Navigation controls and a page-number indicator are shown during collection
22
+ slideshows. Pressing Escape exits fullscreen and returns to the originating document
23
+ or collection view. All navigation is keyboard-accessible.
24
+
25
+ Collaboration is inherent: because slides are backed by live ECHO objects, edits made
26
+ by any peer in the workspace are immediately reflected in an open presentation without
27
+ any manual refresh.
28
+ `,
29
+ icon: "ph--presentation--regular",
30
+ iconHue: "indigo",
31
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter",
32
+ spec: "PLUGIN.mdl"
33
+ });
34
+
35
+ export {
36
+ meta
37
+ };
38
+ //# sourceMappingURL=chunk-PPL2FF6R.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 { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.presenter'),\n name: 'Presenter',\n author: 'DXOS',\n description: trim`\n Transform existing workspace objects into interactive presentation slideshows without\n duplicating content. Markdown documents are split into slides on horizontal \\`---\\`\n separators and rendered with Reveal.js, giving authors a familiar authoring surface\n with full Markdown syntax. Collections can optionally be presented slide-by-slide,\n with each member object rendered by its own plugin surface.\n\n Activate presentation mode for any supported object via the action menu or the\n Shift+Cmd+P (macOS) / Shift+Alt+P (Windows/Linux) keyboard shortcut. The presenter\n opens in a solo fullscreen layout managed by the Deck plugin, keeping the rest of the\n workspace undisturbed.\n\n Navigation controls and a page-number indicator are shown during collection\n slideshows. Pressing Escape exits fullscreen and returns to the originating document\n or collection view. All navigation is keyboard-accessible.\n\n Collaboration is inherent: because slides are backed by live ECHO objects, edits made\n by any peer in the workspace are immediately reflected in an open presentation without\n any manual refresh.\n `,\n icon: 'ph--presentation--regular',\n iconHue: 'indigo',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n spec: 'PLUGIN.mdl',\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,2BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;;;;;;;;EAoBbQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;AACR,CAAA;",
6
+ "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec"]
7
+ }
@@ -0,0 +1,41 @@
1
+ // src/useExitPresenter.ts
2
+ import { useAtomValue } from "@effect-atom/atom-react";
3
+ import { useCallback, useMemo } from "react";
4
+ import { useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
5
+ import { LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
6
+ import { Obj } from "@dxos/echo";
7
+ import { DeckCapabilities, DeckOperation } from "@dxos/plugin-deck";
8
+ var useExitPresenter = (object) => {
9
+ const { invokePromise } = useOperationInvoker();
10
+ const stateAtom = useCapability(DeckCapabilities.State);
11
+ const state = useAtomValue(stateAtom);
12
+ const deck = useMemo(() => state.decks[state.activeDeck], [
13
+ state.decks,
14
+ state.activeDeck
15
+ ]);
16
+ return useCallback(() => {
17
+ const objectPath = getObjectPathFromObject(object);
18
+ const db = Obj.getDatabase(object);
19
+ if (deck?.fullscreen) {
20
+ void invokePromise(DeckOperation.Adjust, {
21
+ type: "solo--fullscreen",
22
+ id: objectPath
23
+ });
24
+ }
25
+ return invokePromise(LayoutOperation.Open, {
26
+ subject: [
27
+ objectPath
28
+ ],
29
+ workspace: db ? getSpacePath(db.spaceId) : void 0
30
+ });
31
+ }, [
32
+ invokePromise,
33
+ object,
34
+ deck
35
+ ]);
36
+ };
37
+
38
+ export {
39
+ useExitPresenter
40
+ };
41
+ //# sourceMappingURL=chunk-V323QBC3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/useExitPresenter.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useMemo } from 'react';\n\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';\nimport { Obj } from '@dxos/echo';\nimport { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';\n\nexport const useExitPresenter = (object: any) => {\n const { invokePromise } = useOperationInvoker();\n const stateAtom = useCapability(DeckCapabilities.State);\n const state = useAtomValue(stateAtom);\n\n // Compute deck from decks[activeDeck] since the getter doesn't survive spread operations.\n const deck = useMemo(() => state.decks[state.activeDeck], [state.decks, state.activeDeck]);\n\n return useCallback(() => {\n const objectPath = getObjectPathFromObject(object);\n const db = Obj.getDatabase(object);\n if (deck?.fullscreen) {\n void invokePromise(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: objectPath,\n });\n }\n\n return invokePromise(LayoutOperation.Open, {\n subject: [objectPath],\n workspace: db ? getSpacePath(db.spaceId) : undefined,\n });\n }, [invokePromise, object, deck]);\n};\n"],
5
+ "mappings": ";AAIA,SAASA,oBAAoB;AAC7B,SAASC,aAAaC,eAAe;AAErC,SAASC,eAAeC,2BAA2B;AACnD,SAASC,iBAAiBC,yBAAyBC,oBAAoB;AACvE,SAASC,WAAW;AACpB,SAASC,kBAAkBC,qBAAqB;AAEzC,IAAMC,mBAAmB,CAACC,WAAAA;AAC/B,QAAM,EAAEC,cAAa,IAAKT,oBAAAA;AAC1B,QAAMU,YAAYX,cAAcM,iBAAiBM,KAAK;AACtD,QAAMC,QAAQhB,aAAac,SAAAA;AAG3B,QAAMG,OAAOf,QAAQ,MAAMc,MAAME,MAAMF,MAAMG,UAAU,GAAG;IAACH,MAAME;IAAOF,MAAMG;GAAW;AAEzF,SAAOlB,YAAY,MAAA;AACjB,UAAMmB,aAAad,wBAAwBM,MAAAA;AAC3C,UAAMS,KAAKb,IAAIc,YAAYV,MAAAA;AAC3B,QAAIK,MAAMM,YAAY;AACpB,WAAKV,cAAcH,cAAcc,QAAQ;QACvCC,MAAM;QACNC,IAAIN;MACN,CAAA;IACF;AAEA,WAAOP,cAAcR,gBAAgBsB,MAAM;MACzCC,SAAS;QAACR;;MACVS,WAAWR,KAAKd,aAAac,GAAGS,OAAO,IAAIC;IAC7C,CAAA;EACF,GAAG;IAAClB;IAAeD;IAAQK;GAAK;AAClC;",
6
+ "names": ["useAtomValue", "useCallback", "useMemo", "useCapability", "useOperationInvoker", "LayoutOperation", "getObjectPathFromObject", "getSpacePath", "Obj", "DeckCapabilities", "DeckOperation", "useExitPresenter", "object", "invokePromise", "stateAtom", "State", "state", "deck", "decks", "activeDeck", "objectPath", "db", "getDatabase", "fullscreen", "Adjust", "type", "id", "Open", "subject", "workspace", "spaceId", "undefined"]
7
+ }
@@ -0,0 +1,69 @@
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, Type, DXN } from "@dxos/echo";
25
+ import { Markdown } from "@dxos/plugin-markdown";
26
+ import { meta as meta2 } from "#meta";
27
+ var makeKey = (name) => DXN.make(`${meta2.id}.operation.${name}`);
28
+ var TogglePresentation = Operation.make({
29
+ meta: {
30
+ key: makeKey("togglePresentation"),
31
+ name: "Toggle Presentation",
32
+ icon: "ph--presentation--regular"
33
+ },
34
+ input: Schema.Struct({
35
+ object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(Collection.Collection)),
36
+ state: Schema.optional(Schema.Boolean)
37
+ }),
38
+ output: Schema.Void
39
+ });
40
+
41
+ // src/types/Settings.ts
42
+ var Settings_exports = {};
43
+ __export(Settings_exports, {
44
+ Settings: () => Settings2
45
+ });
46
+ import * as Schema2 from "effect/Schema";
47
+ var Settings2 = Schema2.mutable(Schema2.Struct({
48
+ presentCollections: Schema2.optional(Schema2.Boolean.annotations({
49
+ title: "Present collections (experimental)",
50
+ description: "Enable presenting collections of documents as a slideshow."
51
+ }))
52
+ }));
53
+
54
+ // src/types/index.ts
55
+ var PresenterContext = createContext({
56
+ running: false,
57
+ start: () => {
58
+ },
59
+ stop: () => {
60
+ }
61
+ });
62
+
63
+ export {
64
+ PresenterCapabilities_exports,
65
+ PresenterOperation_exports,
66
+ Settings_exports,
67
+ PresenterContext
68
+ };
69
+ //# sourceMappingURL=chunk-VVALMI52.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, Type, DXN } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);\n\n// TODO(wittjosiah): This appears to be unused.\nexport const TogglePresentation = Operation.make({\n meta: {\n key: makeKey('togglePresentation'),\n name: 'Toggle Presentation',\n icon: 'ph--presentation--regular',\n },\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,KAAmD,GAAGF,KAAKG,EAAE,sBAAsB;;;ACdtH;;;;AAMA,YAAYC,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,MAAMC,WAAW;AACtC,SAASC,gBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAErB,IAAMC,UAAU,CAACC,SAAiBJ,IAAIK,KAAK,GAAGH,MAAKI,EAAE,cAAcF,IAAAA,EAAM;AAGlE,IAAMG,qBAAqBV,UAAUQ,KAAK;EAC/CH,MAAM;IACJM,KAAKL,QAAQ,oBAAA;IACbC,MAAM;IACNK,MAAM;EACR;EACAC,OAAcC,cAAO;IACnBC,QAAeC,aAAMd,KAAKe,UAAUb,SAASc,QAAQ,GAAGhB,KAAKe,UAAUhB,WAAWA,UAAU,CAAA;IAC5FkB,OAAcC,gBAAgBC,cAAO;EACvC,CAAA;EACAC,QAAeC;AACjB,CAAA;;;AC5BA;;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", "Type", "DXN", "Markdown", "meta", "makeKey", "name", "make", "id", "TogglePresentation", "key", "icon", "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
+ }