@dxos/plugin-presenter 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/PLUGIN.mdl +5 -3
  2. package/dist/lib/PresenterPlugin.mjs +22 -0
  3. package/dist/lib/PresenterPlugin.mjs.map +1 -0
  4. package/dist/lib/PresenterPlugin.node.mjs +10 -0
  5. package/dist/lib/PresenterPlugin.node.mjs.map +1 -0
  6. package/dist/lib/PresenterPlugin.workerd.mjs +8 -0
  7. package/dist/lib/PresenterPlugin.workerd.mjs.map +1 -0
  8. package/dist/lib/capabilities.mjs +11 -0
  9. package/dist/lib/capabilities.mjs.map +1 -0
  10. package/dist/lib/chunk-CollectionArticle.mjs +49 -0
  11. package/dist/lib/chunk-CollectionArticle.mjs.map +1 -0
  12. package/dist/lib/chunk-DocumentArticle.mjs +32 -0
  13. package/dist/lib/chunk-DocumentArticle.mjs.map +1 -0
  14. package/dist/lib/chunk-SlideArticle.mjs +17 -0
  15. package/dist/lib/chunk-SlideArticle.mjs.map +1 -0
  16. package/dist/lib/chunk-app-graph-builder.mjs +57 -0
  17. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  18. package/dist/lib/chunk-markdown-extension.mjs +31 -0
  19. package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
  20. package/dist/lib/{neutral/chunk-MSQDHOPV.mjs → chunk-meta.mjs} +19 -23
  21. package/dist/lib/chunk-meta.mjs.map +1 -0
  22. package/dist/lib/chunk-operation-handler.mjs +11 -0
  23. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  24. package/dist/lib/chunk-react-surface.mjs +42 -0
  25. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  26. package/dist/lib/chunk-settings.mjs +23 -0
  27. package/dist/lib/chunk-settings.mjs.map +1 -0
  28. package/dist/lib/chunk-toggle-presentation.mjs +48 -0
  29. package/dist/lib/chunk-toggle-presentation.mjs.map +1 -0
  30. package/dist/lib/chunk-types.mjs +57 -0
  31. package/dist/lib/chunk-types.mjs.map +1 -0
  32. package/dist/lib/chunk-useExitPresenter.mjs +20 -0
  33. package/dist/lib/chunk-useExitPresenter.mjs.map +1 -0
  34. package/dist/lib/components.mjs +465 -0
  35. package/dist/lib/components.mjs.map +1 -0
  36. package/dist/lib/containers.mjs +9 -0
  37. package/dist/lib/containers.mjs.map +1 -0
  38. package/dist/lib/index.mjs +3 -0
  39. package/dist/lib/meta.mjs +2 -0
  40. package/dist/lib/operations.mjs +7 -0
  41. package/dist/lib/operations.mjs.map +1 -0
  42. package/dist/lib/plugin.mjs +8 -0
  43. package/dist/lib/plugin.mjs.map +1 -0
  44. package/dist/lib/testing.mjs +27 -0
  45. package/dist/lib/testing.mjs.map +1 -0
  46. package/dist/lib/translations.mjs +10 -0
  47. package/dist/lib/translations.mjs.map +1 -0
  48. package/dist/lib/types.mjs +2 -0
  49. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  50. package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
  51. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  52. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  53. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  54. package/dist/types/src/capabilities/settings.d.ts +1 -1
  55. package/dist/types/src/components/Presenter/Layout.d.ts +1 -1
  56. package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
  57. package/dist/types/src/components/Presenter/PresentationShell.d.ts +1 -1
  58. package/dist/types/src/components/Presenter/PresentationShell.d.ts.map +1 -1
  59. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +1 -1
  60. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  61. package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +1 -1
  62. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts +4 -1
  63. package/dist/types/src/containers/CollectionArticle/CollectionArticle.d.ts.map +1 -1
  64. package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts +4 -1
  65. package/dist/types/src/containers/DocumentArticle/DocumentArticle.d.ts.map +1 -1
  66. package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts +4 -1
  67. package/dist/types/src/containers/SlideArticle/SlideArticle.d.ts.map +1 -1
  68. package/dist/types/src/operations/toggle-presentation.d.ts.map +1 -1
  69. package/dist/types/src/paths.d.ts.map +1 -1
  70. package/dist/types/src/types/PresenterCapabilities.d.ts +1 -1
  71. package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -1
  72. package/dist/types/tsconfig.tsbuildinfo +1 -1
  73. package/dx.config.ts +1 -0
  74. package/package.json +39 -39
  75. package/src/capabilities/app-graph-builder.ts +2 -3
  76. package/src/capabilities/{react-surface.tsx → react-surface.ts} +6 -4
  77. package/src/components/Markdown/Panel.tsx +1 -1
  78. package/src/components/Markdown/theme.ts +1 -1
  79. package/src/components/Presenter/Layout.tsx +1 -1
  80. package/src/components/RevealPlayer/RevealPlayer.tsx +1 -1
  81. package/src/containers/CollectionArticle/CollectionArticle.tsx +2 -0
  82. package/src/containers/DocumentArticle/DocumentArticle.tsx +2 -0
  83. package/src/containers/SlideArticle/SlideArticle.tsx +2 -0
  84. package/src/operations/toggle-presentation.ts +13 -11
  85. package/src/paths.ts +3 -2
  86. package/src/types/PresenterCapabilities.ts +1 -1
  87. package/dist/lib/neutral/CollectionArticle-7R4KJWDW.mjs +0 -47
  88. package/dist/lib/neutral/CollectionArticle-7R4KJWDW.mjs.map +0 -7
  89. package/dist/lib/neutral/DocumentArticle-YZRKVEN7.mjs +0 -32
  90. package/dist/lib/neutral/DocumentArticle-YZRKVEN7.mjs.map +0 -7
  91. package/dist/lib/neutral/PresenterPlugin.mjs +0 -42
  92. package/dist/lib/neutral/PresenterPlugin.mjs.map +0 -7
  93. package/dist/lib/neutral/PresenterPlugin.node.mjs +0 -16
  94. package/dist/lib/neutral/PresenterPlugin.node.mjs.map +0 -7
  95. package/dist/lib/neutral/PresenterPlugin.workerd.mjs +0 -12
  96. package/dist/lib/neutral/PresenterPlugin.workerd.mjs.map +0 -7
  97. package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs +0 -20
  98. package/dist/lib/neutral/SlideArticle-FE2I6KBO.mjs.map +0 -7
  99. package/dist/lib/neutral/app-graph-builder-FNDFY5L3.mjs +0 -81
  100. package/dist/lib/neutral/app-graph-builder-FNDFY5L3.mjs.map +0 -7
  101. package/dist/lib/neutral/capabilities/index.mjs +0 -17
  102. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  103. package/dist/lib/neutral/chunk-63IF7OXT.mjs +0 -19
  104. package/dist/lib/neutral/chunk-63IF7OXT.mjs.map +0 -7
  105. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  106. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  107. package/dist/lib/neutral/chunk-MSQDHOPV.mjs.map +0 -7
  108. package/dist/lib/neutral/chunk-NDZ6IIAL.mjs +0 -73
  109. package/dist/lib/neutral/chunk-NDZ6IIAL.mjs.map +0 -7
  110. package/dist/lib/neutral/components/index.mjs +0 -563
  111. package/dist/lib/neutral/components/index.mjs.map +0 -7
  112. package/dist/lib/neutral/containers/index.mjs +0 -13
  113. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  114. package/dist/lib/neutral/index.mjs +0 -18
  115. package/dist/lib/neutral/index.mjs.map +0 -7
  116. package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs +0 -37
  117. package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs.map +0 -7
  118. package/dist/lib/neutral/meta.json +0 -1
  119. package/dist/lib/neutral/meta.mjs +0 -8
  120. package/dist/lib/neutral/meta.mjs.map +0 -7
  121. package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs +0 -13
  122. package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs.map +0 -7
  123. package/dist/lib/neutral/operations/index.mjs +0 -9
  124. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  125. package/dist/lib/neutral/plugin.mjs +0 -12
  126. package/dist/lib/neutral/plugin.mjs.map +0 -7
  127. package/dist/lib/neutral/react-surface-VO4GPCLQ.mjs +0 -42
  128. package/dist/lib/neutral/react-surface-VO4GPCLQ.mjs.map +0 -7
  129. package/dist/lib/neutral/settings-DBV7N5HT.mjs +0 -28
  130. package/dist/lib/neutral/settings-DBV7N5HT.mjs.map +0 -7
  131. package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs +0 -60
  132. package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs.map +0 -7
  133. package/dist/lib/neutral/translations.mjs +0 -18
  134. package/dist/lib/neutral/translations.mjs.map +0 -7
  135. package/dist/lib/neutral/types/index.mjs +0 -14
  136. package/dist/lib/neutral/types/index.mjs.map +0 -7
@@ -1,7 +0,0 @@
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
- }
@@ -1,20 +0,0 @@
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
@@ -1,7 +0,0 @@
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
- }
@@ -1,81 +0,0 @@
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 { Capability } from "@dxos/app-framework";
7
- import { AppCapabilities, AppNode } from "@dxos/app-toolkit";
8
- import { Operation } from "@dxos/compute";
9
- import { Collection, Obj } from "@dxos/echo";
10
- import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
11
- import { Markdown } from "@dxos/plugin-markdown";
12
- import { linkedSegment } from "@dxos/react-ui-attention";
13
- import { meta } from "#meta";
14
- import { PresenterOperation } from "#types";
15
- import { PresenterCapabilities } from "#types";
16
- var whenPresentable = (node, get) => Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node, get), () => NodeMatcher.whenEchoType(Markdown.Document)(node, get));
17
- var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
- const capabilities = yield* Capability.Service;
19
- const extensions = yield* GraphBuilder.createExtension({
20
- id: "root",
21
- // TODO(wittjosiah): This is a hack to work around presenter previously relying on "variant". Remove.
22
- match: whenPresentable,
23
- connector: (object, get) => {
24
- const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
25
- const settings = get(settingsAtom);
26
- const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
27
- if (!isPresentable) {
28
- return Effect.succeed([]);
29
- }
30
- return Effect.succeed([
31
- AppNode.makeCompanion({
32
- id: linkedSegment("presenter"),
33
- label: "Presenter",
34
- icon: "ph--presentation--regular",
35
- data: {
36
- type: meta.profile.key,
37
- object
38
- }
39
- })
40
- ]);
41
- },
42
- actions: (object, get) => {
43
- const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
44
- const settings = get(settingsAtom);
45
- const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
46
- const db = Obj.getDatabase(object);
47
- if (!isPresentable || !db) {
48
- return Effect.succeed([]);
49
- }
50
- return Effect.succeed([
51
- {
52
- id: PresenterOperation.TogglePresentation.meta.key,
53
- data: Effect.fnUntraced(function* () {
54
- yield* Operation.invoke(PresenterOperation.TogglePresentation, {
55
- object
56
- });
57
- }),
58
- properties: {
59
- label: [
60
- "toggle-presentation.label",
61
- {
62
- ns: meta.profile.key
63
- }
64
- ],
65
- icon: "ph--presentation--regular",
66
- disposition: "list-item",
67
- keyBinding: {
68
- macos: "shift+meta+p",
69
- windows: "shift+alt+p"
70
- }
71
- }
72
- }
73
- ]);
74
- }
75
- });
76
- return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
77
- }));
78
- export {
79
- app_graph_builder_default as default
80
- };
81
- //# sourceMappingURL=app-graph-builder-FNDFY5L3.mjs.map
@@ -1,7 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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-FNDFY5L3.mjs"));
6
- var MarkdownExtension = Capability.lazy("MarkdownExtension", () => import("../markdown-extension-HGLRVZDF.mjs"));
7
- var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-3ZESW5AK.mjs"));
8
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-VO4GPCLQ.mjs"));
9
- var PresenterSettings = Capability.lazy("PresenterSettings", () => import("../settings-DBV7N5HT.mjs"));
10
- export {
11
- AppGraphBuilder,
12
- MarkdownExtension,
13
- OperationHandler,
14
- PresenterSettings,
15
- ReactSurface
16
- };
17
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
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';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const PresenterSettings = Capability.lazy('PresenterSettings', () => import('./settings'));\n"],
5
- "mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,oBAAoBH,WAAWE,KAAK,qBAAqB,MAAM,OAAO,oCAAA,CAAA;AAC5E,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,oBAAoBN,WAAWE,KAAK,qBAAqB,MAAM,OAAO,0BAAA,CAAA;",
6
- "names": ["Capability", "AppGraphBuilder", "lazy", "MarkdownExtension", "OperationHandler", "ReactSurface", "PresenterSettings"]
7
- }
@@ -1,19 +0,0 @@
1
- // src/useExitPresenter.ts
2
- import { useCallback } from "react";
3
- import { useOperationInvoker } from "@dxos/app-framework/ui";
4
- import { PresenterOperation } from "#types";
5
- var useExitPresenter = (object) => {
6
- const { invokePromise } = useOperationInvoker();
7
- return useCallback(() => invokePromise(PresenterOperation.TogglePresentation, {
8
- object,
9
- state: false
10
- }), [
11
- invokePromise,
12
- object
13
- ]);
14
- };
15
-
16
- export {
17
- useExitPresenter
18
- };
19
- //# sourceMappingURL=chunk-63IF7OXT.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/useExitPresenter.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\n\nimport { PresenterOperation } from '#types';\n\n/**\n * Exits presentation for the given object. Delegates to the toggle operation so the\n * fullscreen-revert and re-open run sequentially in a single handler — invoking them\n * separately races, leaving the deck stuck in fullscreen.\n */\nexport const useExitPresenter = (object: any) => {\n const { invokePromise } = useOperationInvoker();\n\n return useCallback(\n () => invokePromise(PresenterOperation.TogglePresentation, { object, state: false }),\n [invokePromise, object],\n );\n};\n"],
5
- "mappings": ";AAIA,SAASA,mBAAmB;AAE5B,SAASC,2BAA2B;AAEpC,SAASC,0BAA0B;AAO5B,IAAMC,mBAAmB,CAACC,WAAAA;AAC/B,QAAM,EAAEC,cAAa,IAAKJ,oBAAAA;AAE1B,SAAOD,YACL,MAAMK,cAAcH,mBAAmBI,oBAAoB;IAAEF;IAAQG,OAAO;EAAM,CAAA,GAClF;IAACF;IAAeD;GAAO;AAE3B;",
6
- "names": ["useCallback", "useOperationInvoker", "PresenterOperation", "useExitPresenter", "object", "invokePromise", "TogglePresentation", "state"]
7
- }
@@ -1,10 +0,0 @@
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
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: '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 source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n icon: { key: 'ph--presentation--regular', hue: 'indigo' },\n spec: 'PLUGIN.mdl',\n },\n});\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;;;;;IAoBbO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAA6BM,KAAK;IAAS;IACxDC,MAAM;EACR;AACF,CAAA;;;AD5BO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
- "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "spec", "meta", "Plugin", "getMetaFromConfig", "config"]
7
- }
@@ -1,73 +0,0 @@
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.profile.key}.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 { Capability as Capability2 } from "@dxos/app-framework";
24
- import { Operation } from "@dxos/compute";
25
- import { Collection, DXN, Type } from "@dxos/echo";
26
- import { Markdown } from "@dxos/plugin-markdown";
27
- import { meta as meta2 } from "#meta";
28
- var makeKey = (name) => DXN.make(`${meta2.profile.key}.operation.${name}`);
29
- var TogglePresentation = Operation.make({
30
- meta: {
31
- key: makeKey("togglePresentation"),
32
- name: "Toggle Presentation",
33
- icon: "ph--presentation--regular"
34
- },
35
- services: [
36
- Capability2.Service
37
- ],
38
- input: Schema.Struct({
39
- object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(Collection.Collection)),
40
- state: Schema.optional(Schema.Boolean)
41
- }),
42
- output: Schema.Void
43
- });
44
-
45
- // src/types/Settings.ts
46
- var Settings_exports = {};
47
- __export(Settings_exports, {
48
- Settings: () => Settings2
49
- });
50
- import * as Schema2 from "effect/Schema";
51
- var Settings2 = Schema2.mutable(Schema2.Struct({
52
- presentCollections: Schema2.optional(Schema2.Boolean.annotations({
53
- title: "Present collections (experimental)",
54
- description: "Enable presenting collections of documents as a slideshow."
55
- }))
56
- }));
57
-
58
- // src/types/index.ts
59
- var PresenterContext = createContext({
60
- running: false,
61
- start: () => {
62
- },
63
- stop: () => {
64
- }
65
- });
66
-
67
- export {
68
- PresenterCapabilities_exports,
69
- PresenterOperation_exports,
70
- Settings_exports,
71
- PresenterContext
72
- };
73
- //# sourceMappingURL=chunk-NDZ6IIAL.mjs.map
@@ -1,7 +0,0 @@
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>>(\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
- }