@dxos/plugin-presenter 0.9.0 → 0.9.1-main.c7dcc2e112

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 (104) hide show
  1. package/dist/lib/neutral/{CollectionPresenterArticle-DFREOQTG.mjs → CollectionPresenterArticle-ZRYWBX2H.mjs} +7 -6
  2. package/dist/lib/neutral/CollectionPresenterArticle-ZRYWBX2H.mjs.map +7 -0
  3. package/dist/lib/neutral/{DocumentPresenterContainer-KCDZ2O2C.mjs → DocumentPresenterContainer-5QF4P736.mjs} +7 -6
  4. package/dist/lib/neutral/DocumentPresenterContainer-5QF4P736.mjs.map +7 -0
  5. package/dist/lib/neutral/PresenterPlugin.mjs +10 -3
  6. package/dist/lib/neutral/PresenterPlugin.mjs.map +4 -4
  7. package/dist/lib/neutral/{PresenterSettings-2G4XD4QY.mjs → PresenterSettings-4YFP4K5G.mjs} +3 -3
  8. package/dist/lib/neutral/{PresenterSettings-2G4XD4QY.mjs.map → PresenterSettings-4YFP4K5G.mjs.map} +3 -3
  9. package/dist/lib/neutral/{app-graph-builder-DIEDSRPX.mjs → app-graph-builder-JMQVBFG2.mjs} +7 -23
  10. package/dist/lib/neutral/app-graph-builder-JMQVBFG2.mjs.map +7 -0
  11. package/dist/lib/neutral/capabilities/index.mjs +7 -3
  12. package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
  13. package/dist/lib/neutral/chunk-63IF7OXT.mjs +19 -0
  14. package/dist/lib/neutral/chunk-63IF7OXT.mjs.map +7 -0
  15. package/dist/lib/neutral/{chunk-VVALMI52.mjs → chunk-H5JLSLAO.mjs} +7 -3
  16. package/dist/lib/neutral/chunk-H5JLSLAO.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-MSQDHOPV.mjs +47 -0
  18. package/dist/lib/neutral/chunk-MSQDHOPV.mjs.map +7 -0
  19. package/dist/lib/neutral/components/index.mjs +87 -18
  20. package/dist/lib/neutral/components/index.mjs.map +4 -4
  21. package/dist/lib/neutral/containers/index.mjs +2 -2
  22. package/dist/lib/neutral/index.mjs +2 -2
  23. package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs +37 -0
  24. package/dist/lib/neutral/markdown-extension-HGLRVZDF.mjs.map +7 -0
  25. package/dist/lib/neutral/meta.json +1 -1
  26. package/dist/lib/neutral/meta.mjs +1 -1
  27. package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs +13 -0
  28. package/dist/lib/neutral/operation-handler-3ZESW5AK.mjs.map +7 -0
  29. package/dist/lib/neutral/operations/index.mjs +9 -0
  30. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  31. package/dist/lib/neutral/plugin.mjs +1 -1
  32. package/dist/lib/neutral/{react-surface-SPJGAJIF.mjs → react-surface-YGBE3TDK.mjs} +4 -4
  33. package/dist/lib/neutral/react-surface-YGBE3TDK.mjs.map +7 -0
  34. package/dist/lib/neutral/{settings-R6LRDAAK.mjs → settings-DBV7N5HT.mjs} +3 -3
  35. package/dist/lib/neutral/{settings-R6LRDAAK.mjs.map → settings-DBV7N5HT.mjs.map} +3 -3
  36. package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs +60 -0
  37. package/dist/lib/neutral/toggle-presentation-PH7ZJJDD.mjs.map +7 -0
  38. package/dist/lib/neutral/translations.mjs +1 -1
  39. package/dist/lib/neutral/translations.mjs.map +3 -3
  40. package/dist/lib/neutral/types/index.mjs +1 -1
  41. package/dist/types/dx.config.d.ts +28 -0
  42. package/dist/types/dx.config.d.ts.map +1 -0
  43. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  44. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/index.d.ts +6 -3
  46. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/markdown-extension.d.ts +9 -0
  48. package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  50. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  52. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  53. package/dist/types/src/components/Presenter/PresentationShell.d.ts +18 -0
  54. package/dist/types/src/components/Presenter/PresentationShell.d.ts.map +1 -0
  55. package/dist/types/src/components/Presenter/index.d.ts +1 -0
  56. package/dist/types/src/components/Presenter/index.d.ts.map +1 -1
  57. package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +1 -1
  58. package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -1
  59. package/dist/types/src/meta.d.ts +28 -2
  60. package/dist/types/src/meta.d.ts.map +1 -1
  61. package/dist/types/src/operations/index.d.ts +3 -0
  62. package/dist/types/src/operations/index.d.ts.map +1 -0
  63. package/dist/types/src/operations/toggle-presentation.d.ts +10 -0
  64. package/dist/types/src/operations/toggle-presentation.d.ts.map +1 -0
  65. package/dist/types/src/paths.d.ts +3 -0
  66. package/dist/types/src/paths.d.ts.map +1 -0
  67. package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -1
  68. package/dist/types/src/types/PresenterOperation.d.ts +2 -1
  69. package/dist/types/src/types/PresenterOperation.d.ts.map +1 -1
  70. package/dist/types/src/useExitPresenter.d.ts +6 -1
  71. package/dist/types/src/useExitPresenter.d.ts.map +1 -1
  72. package/dist/types/tsconfig.tsbuildinfo +1 -1
  73. package/dx.config.ts +37 -0
  74. package/package.json +30 -22
  75. package/src/PresenterPlugin.test.ts +1 -1
  76. package/src/PresenterPlugin.tsx +9 -2
  77. package/src/capabilities/app-graph-builder.ts +5 -21
  78. package/src/capabilities/index.ts +6 -0
  79. package/src/capabilities/markdown-extension.ts +45 -0
  80. package/src/capabilities/operation-handler.ts +16 -0
  81. package/src/capabilities/react-surface.tsx +7 -7
  82. package/src/capabilities/settings.ts +2 -2
  83. package/src/components/Presenter/PresentationShell.tsx +96 -0
  84. package/src/components/Presenter/index.ts +1 -0
  85. package/src/components/PresenterSettings/PresenterSettings.tsx +2 -2
  86. package/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx +14 -20
  87. package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +4 -2
  88. package/src/meta.ts +2 -30
  89. package/src/operations/index.ts +7 -0
  90. package/src/operations/toggle-presentation.ts +59 -0
  91. package/src/paths.ts +8 -0
  92. package/src/translations.ts +1 -1
  93. package/src/types/PresenterCapabilities.ts +3 -1
  94. package/src/types/PresenterOperation.ts +3 -2
  95. package/src/useExitPresenter.ts +13 -26
  96. package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs.map +0 -7
  97. package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs.map +0 -7
  98. package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs.map +0 -7
  99. package/dist/lib/neutral/chunk-PPL2FF6R.mjs +0 -38
  100. package/dist/lib/neutral/chunk-PPL2FF6R.mjs.map +0 -7
  101. package/dist/lib/neutral/chunk-V323QBC3.mjs +0 -41
  102. package/dist/lib/neutral/chunk-V323QBC3.mjs.map +0 -7
  103. package/dist/lib/neutral/chunk-VVALMI52.mjs.map +0 -7
  104. package/dist/lib/neutral/react-surface-SPJGAJIF.mjs.map +0 -7
@@ -0,0 +1,59 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { LayoutOperation, Paths } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+ import { Obj } from '@dxos/echo';
11
+ import { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';
12
+
13
+ import { PresenterOperation } from '#types';
14
+
15
+ import { getPresentationPath } from '../paths';
16
+
17
+ /**
18
+ * Enters or exits presentation for the given object. When `state` is omitted the
19
+ * current presentation state is toggled. Entering fullscreens the presenter companion;
20
+ * exiting reverts fullscreen and re-opens the source object.
21
+ */
22
+ const handler: Operation.WithHandler<typeof PresenterOperation.TogglePresentation> =
23
+ PresenterOperation.TogglePresentation.pipe(
24
+ Operation.withHandler(
25
+ Effect.fnUntraced(function* ({ object, state }) {
26
+ const db = Obj.getDatabase(object);
27
+ if (!db) {
28
+ return;
29
+ }
30
+
31
+ const objectPath = Paths.getObjectPathFromObject(object);
32
+ const presenterId = getPresentationPath(objectPath);
33
+ const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);
34
+ const deck = deckState.decks[deckState.activeDeck];
35
+ const presenting = Boolean(deck?.fullscreen && deck?.solo === presenterId);
36
+ const next = state ?? !presenting;
37
+
38
+ if (next) {
39
+ if (!deck?.fullscreen) {
40
+ yield* Operation.invoke(DeckOperation.Adjust, { type: 'solo--fullscreen' as const, id: presenterId });
41
+ }
42
+ yield* Operation.invoke(LayoutOperation.Open, {
43
+ subject: [presenterId],
44
+ workspace: Paths.getSpacePath(db.spaceId),
45
+ });
46
+ } else {
47
+ if (deck?.fullscreen) {
48
+ yield* Operation.invoke(DeckOperation.Adjust, { type: 'solo--fullscreen' as const, id: objectPath });
49
+ }
50
+ yield* Operation.invoke(LayoutOperation.Open, {
51
+ subject: [objectPath],
52
+ workspace: Paths.getSpacePath(db.spaceId),
53
+ });
54
+ }
55
+ }),
56
+ ),
57
+ );
58
+
59
+ export default handler;
package/src/paths.ts ADDED
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { linkedSegment } from '@dxos/react-ui-attention';
6
+
7
+ /** Canonical qualified path to the presentation companion node for an object. */
8
+ export const getPresentationPath = (objectPath: string): string => `${objectPath}/${linkedSegment('presenter')}`;
@@ -9,7 +9,7 @@ import { meta } from '#meta';
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
- [meta.id]: {
12
+ [meta.profile.key]: {
13
13
  'plugin.name': 'Presenter',
14
14
  'settings.title': 'Presenter settings',
15
15
  'toggle-presentation.label': 'Present',
@@ -12,4 +12,6 @@ import { meta } from '#meta';
12
12
 
13
13
  // Inline import to avoid `Settings` namespace alias colliding with the
14
14
  // `Settings` capability export below.
15
- export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
15
+ export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(
16
+ `${meta.profile.key}.capability.settings`,
17
+ );
@@ -6,21 +6,22 @@
6
6
 
7
7
  import * as Schema from 'effect/Schema';
8
8
 
9
+ import { Capability } from '@dxos/app-framework';
9
10
  import { Operation } from '@dxos/compute';
10
11
  import { Collection, Type, DXN } from '@dxos/echo';
11
12
  import { Markdown } from '@dxos/plugin-markdown';
12
13
 
13
14
  import { meta } from '#meta';
14
15
 
15
- const makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);
16
+ const makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);
16
17
 
17
- // TODO(wittjosiah): This appears to be unused.
18
18
  export const TogglePresentation = Operation.make({
19
19
  meta: {
20
20
  key: makeKey('togglePresentation'),
21
21
  name: 'Toggle Presentation',
22
22
  icon: 'ph--presentation--regular',
23
23
  },
24
+ services: [Capability.Service],
24
25
  input: Schema.Struct({
25
26
  object: Schema.Union(Type.getSchema(Markdown.Document), Type.getSchema(Collection.Collection)),
26
27
  state: Schema.optional(Schema.Boolean),
@@ -2,35 +2,22 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { useAtomValue } from '@effect-atom/atom-react';
6
- import { useCallback, useMemo } from 'react';
5
+ import { useCallback } from 'react';
7
6
 
8
- import { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';
9
- import { LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';
10
- import { Obj } from '@dxos/echo';
11
- import { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';
7
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
12
8
 
9
+ import { PresenterOperation } from '#types';
10
+
11
+ /**
12
+ * Exits presentation for the given object. Delegates to the toggle operation so the
13
+ * fullscreen-revert and re-open run sequentially in a single handler — invoking them
14
+ * separately races, leaving the deck stuck in fullscreen.
15
+ */
13
16
  export const useExitPresenter = (object: any) => {
14
17
  const { invokePromise } = useOperationInvoker();
15
- const stateAtom = useCapability(DeckCapabilities.State);
16
- const state = useAtomValue(stateAtom);
17
-
18
- // Compute deck from decks[activeDeck] since the getter doesn't survive spread operations.
19
- const deck = useMemo(() => state.decks[state.activeDeck], [state.decks, state.activeDeck]);
20
-
21
- return useCallback(() => {
22
- const objectPath = getObjectPathFromObject(object);
23
- const db = Obj.getDatabase(object);
24
- if (deck?.fullscreen) {
25
- void invokePromise(DeckOperation.Adjust, {
26
- type: 'solo--fullscreen' as const,
27
- id: objectPath,
28
- });
29
- }
30
18
 
31
- return invokePromise(LayoutOperation.Open, {
32
- subject: [objectPath],
33
- workspace: db ? getSpacePath(db.spaceId) : undefined,
34
- });
35
- }, [invokePromise, object, deck]);
19
+ return useCallback(
20
+ () => invokePromise(PresenterOperation.TogglePresentation, { object, state: false }),
21
+ [invokePromise, object],
22
+ );
36
23
  };
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useContext, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Collection, Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\n\nimport { PageNumber, Pager, Layout as PresenterLayout } from '#components';\nimport { PresenterContext } from '#types';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport type CollectionPresenterArticleProps = AppSurface.ObjectArticleProps<Collection.Collection>;\n\nexport const CollectionPresenterArticle = ({ role, subject: collection }: CollectionPresenterArticleProps) => {\n const [slide, setSlide] = useState(0);\n const { running } = useContext(PresenterContext);\n const handleExit = useExitPresenter(collection);\n\n return (\n <Panel.Root role={role} classNames='relative'>\n <Panel.Content asChild>\n <PresenterLayout\n bottomRight={<PageNumber index={slide} count={collection.objects.length} />}\n bottomLeft={\n <Pager\n index={slide}\n count={collection.objects.length}\n keys={running}\n onChange={setSlide}\n onExit={handleExit}\n />\n }\n >\n <Surface.Surface\n type={AppSurface.Slide}\n data={{\n subject: collection.objects[slide],\n attendableId: Obj.getURI(collection),\n }}\n />\n </PresenterLayout>\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,SAASC,YAAYC,gBAAgB;AAE5C,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAA0BC,WAAW;AACrC,SAASC,aAAa;AAEtB,SAASC,YAAYC,OAAOC,UAAUC,uBAAuB;AAC7D,SAASC,wBAAwB;AAM1B,IAAMC,6BAA6B,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAAmC;AACvG,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAS,CAAA;AACnC,QAAM,EAAEC,QAAO,IAAKC,WAAWC,gBAAAA;AAC/B,QAAMC,aAAaC,iBAAiBR,UAAAA;AAEpC,SACE,sBAAA,cAACS,MAAMC,MAAI;IAACZ;IAAYa,YAAW;KACjC,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,iBAAAA;IACCC,aAAa,sBAAA,cAACC,YAAAA;MAAWC,OAAOhB;MAAOiB,OAAOlB,WAAWmB,QAAQC;;IACjEC,YACE,sBAAA,cAACC,OAAAA;MACCL,OAAOhB;MACPiB,OAAOlB,WAAWmB,QAAQC;MAC1BG,MAAMnB;MACNoB,UAAUtB;MACVuB,QAAQlB;;KAIZ,sBAAA,cAACmB,QAAQA,SAAO;IACdC,MAAMC,WAAWC;IACjBC,MAAM;MACJ/B,SAASC,WAAWmB,QAAQlB,KAAAA;MAC5B8B,cAAcC,IAAIC,OAAOjC,UAAAA;IAC3B;;AAMZ;",
6
- "names": ["React", "useContext", "useState", "Surface", "AppSurface", "Obj", "Panel", "PageNumber", "Pager", "Layout", "PresenterLayout", "PresenterContext", "CollectionPresenterArticle", "role", "subject", "collection", "slide", "setSlide", "useState", "running", "useContext", "PresenterContext", "handleExit", "useExitPresenter", "Panel", "Root", "classNames", "Content", "asChild", "PresenterLayout", "bottomRight", "PageNumber", "index", "count", "objects", "length", "bottomLeft", "Pager", "keys", "onChange", "onExit", "Surface", "type", "AppSurface", "Slide", "data", "attendableId", "Obj", "getURI"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown';\nimport { Panel } from '@dxos/react-ui';\n\nimport { RevealPlayer } from '#components';\n\nimport { useExitPresenter } from '../../useExitPresenter';\n\nexport const DocumentPresenterContainer: FC<{ document: Markdown.Document }> = ({ document }) => {\n const handleExit = useExitPresenter(document);\n\n return (\n <Panel.Root classNames='relative'>\n <Panel.Content asChild>\n <RevealPlayer content={document.content.target?.content ?? ''} onExit={handleExit} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,WAAwB;AAG/B,SAASC,aAAa;AAEtB,SAASC,oBAAoB;AAItB,IAAMC,6BAAkE,CAAC,EAAEC,SAAQ,MAAE;AAC1F,QAAMC,aAAaC,iBAAiBF,QAAAA;AAEpC,SACE,sBAAA,cAACG,MAAMC,MAAI;IAACC,YAAW;KACrB,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,cAAAA;IAAaC,SAAST,SAASS,QAAQC,QAAQD,WAAW;IAAIE,QAAQV;;AAI/E;",
6
- "names": ["React", "Panel", "RevealPlayer", "DocumentPresenterContainer", "document", "handleExit", "useExitPresenter", "Panel", "Root", "classNames", "Content", "asChild", "RevealPlayer", "content", "target", "onExit"]
7
- }
@@ -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 * 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
- }
@@ -1,38 +0,0 @@
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
@@ -1,7 +0,0 @@
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
- }
@@ -1,41 +0,0 @@
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
@@ -1,7 +0,0 @@
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
- }
@@ -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>>(`${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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface, useSettingsState } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { Collection, Obj } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { PresenterSettings } from '#components';\nimport { CollectionPresenterArticle, DocumentPresenterContainer, MarkdownSlide } from '#containers';\nimport { meta } from '#meta';\nimport { type Settings } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'document',\n position: 'first',\n filter: AppSurface.predicate(\n AppSurface.Article,\n (data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Markdown.Document }> =>\n !!data.subject &&\n typeof data.subject === 'object' &&\n 'type' in data.subject &&\n 'object' in data.subject &&\n data.subject.type === meta.id &&\n Obj.instanceOf(Markdown.Document, data.subject.object),\n ),\n component: ({ data }) => <DocumentPresenterContainer document={data.subject.object} />,\n }),\n Surface.create({\n id: 'collection',\n position: 'first',\n filter: AppSurface.predicate(\n AppSurface.Article,\n (data): data is AppSurface.ArticleData<{ type: typeof meta.id; object: Collection.Collection }> =>\n !!data.subject &&\n typeof data.subject === 'object' &&\n 'type' in data.subject &&\n 'object' in data.subject &&\n data.subject.type === meta.id &&\n Obj.instanceOf(Collection.Collection, data.subject.object),\n ),\n component: ({ role, data }) => <CollectionPresenterArticle role={role} subject={data.subject.object} />,\n }),\n Surface.create({\n id: 'slide',\n filter: AppSurface.object(AppSurface.Slide, Markdown.Document),\n component: ({ data }) => <MarkdownSlide document={data.subject} />,\n }),\n Surface.create({\n id: 'pluginSettings',\n filter: AppSurface.settings(AppSurface.Article, meta.id),\n component: ({ data: { subject } }) => {\n const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);\n return <PresenterSettings settings={settings} onSettingsChange={updateSettings} />;\n },\n }),\n ]),\n ),\n);\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,SAASC,wBAAwB;AAC1C,SAASC,kBAAkB;AAC3B,SAASC,YAAYC,WAAW;AAChC,SAASC,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SAASC,4BAA4BC,4BAA4BC,qBAAqB;AACtF,SAASC,YAAY;AAGrB,IAAA,wBAAeX,WAAWY,WAAW,MAC5BC,eACLb,WAAWc,YAAYf,aAAagB,cAAc;EAChDd,QAAQe,OAAO;IACbC,IAAI;IACJC,UAAU;IACVC,QAAQhB,WAAWiB,UACjBjB,WAAWkB,SACX,CAACC,SACC,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASb,KAAKM,MAC3BZ,IAAIoB,WAAWnB,SAASoB,UAAUJ,KAAKC,QAAQI,MAAM,CAAA;IAEzDC,WAAW,CAAC,EAAEN,KAAI,MAAO,sBAAA,cAACb,4BAAAA;MAA2BoB,UAAUP,KAAKC,QAAQI;;EAC9E,CAAA;EACA1B,QAAQe,OAAO;IACbC,IAAI;IACJC,UAAU;IACVC,QAAQhB,WAAWiB,UACjBjB,WAAWkB,SACX,CAACC,SACC,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASb,KAAKM,MAC3BZ,IAAIoB,WAAWrB,WAAWA,YAAYkB,KAAKC,QAAQI,MAAM,CAAA;IAE7DC,WAAW,CAAC,EAAEE,MAAMR,KAAI,MAAO,sBAAA,cAACd,4BAAAA;MAA2BsB;MAAYP,SAASD,KAAKC,QAAQI;;EAC/F,CAAA;EACA1B,QAAQe,OAAO;IACbC,IAAI;IACJE,QAAQhB,WAAWwB,OAAOxB,WAAW4B,OAAOzB,SAASoB,QAAQ;IAC7DE,WAAW,CAAC,EAAEN,KAAI,MAAO,sBAAA,cAACZ,eAAAA;MAAcmB,UAAUP,KAAKC;;EACzD,CAAA;EACAtB,QAAQe,OAAO;IACbC,IAAI;IACJE,QAAQhB,WAAW6B,SAAS7B,WAAWkB,SAASV,KAAKM,EAAE;IACvDW,WAAW,CAAC,EAAEN,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAM,EAAES,UAAUC,eAAc,IAAK/B,iBAAoCqB,QAAQW,IAAI;AACrF,aAAO,sBAAA,cAAC3B,mBAAAA;QAAkByB;QAAoBG,kBAAkBF;;IAClE;EACF,CAAA;CACD,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "useSettingsState", "AppSurface", "Collection", "Obj", "Markdown", "PresenterSettings", "CollectionPresenterArticle", "DocumentPresenterContainer", "MarkdownSlide", "meta", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "position", "filter", "predicate", "Article", "data", "subject", "type", "instanceOf", "Document", "object", "component", "document", "role", "Slide", "settings", "updateSettings", "atom", "onSettingsChange"]
7
- }