@dxos/plugin-presenter 0.8.2-staging.7ac8446 → 0.8.3-main.672df60

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 (91) hide show
  1. package/dist/lib/browser/CollectionPresenterContainer-7UXPBYKA.mjs +189 -0
  2. package/dist/lib/browser/CollectionPresenterContainer-7UXPBYKA.mjs.map +7 -0
  3. package/dist/lib/browser/DocumentPresenterContainer-QNXYZ5WX.mjs +185 -0
  4. package/dist/lib/browser/DocumentPresenterContainer-QNXYZ5WX.mjs.map +7 -0
  5. package/dist/lib/browser/{MarkdownSlide-5NYXG5SC.mjs → MarkdownSlide-EI5XTZGO.mjs} +77 -54
  6. package/dist/lib/browser/{MarkdownSlide-5NYXG5SC.mjs.map → MarkdownSlide-EI5XTZGO.mjs.map} +2 -2
  7. package/dist/lib/browser/app-graph-builder-5NILN2ZH.mjs +77 -0
  8. package/dist/lib/browser/app-graph-builder-5NILN2ZH.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-2RWWAQZK.mjs +36 -0
  10. package/dist/lib/browser/chunk-2RWWAQZK.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-K4SDUVTH.mjs +37 -0
  12. package/dist/lib/browser/{chunk-3VVM67QE.mjs.map → chunk-K4SDUVTH.mjs.map} +3 -3
  13. package/dist/lib/browser/{chunk-CQR4O6KC.mjs → chunk-Y6REDI5E.mjs} +12 -12
  14. package/dist/lib/browser/chunk-Y6REDI5E.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +12 -31
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/{react-surface-6JT4CB4B.mjs → react-surface-6AJLL4EM.mjs} +14 -29
  19. package/dist/lib/browser/react-surface-6AJLL4EM.mjs.map +7 -0
  20. package/dist/lib/browser/{settings-RBF22MVS.mjs → settings-JBNMCJHB.mjs} +4 -4
  21. package/dist/lib/browser/settings-JBNMCJHB.mjs.map +7 -0
  22. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/index.d.ts +1 -180
  26. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  28. package/dist/types/src/components/CollectionPresenterContainer.d.ts +7 -0
  29. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +1 -0
  30. package/dist/types/src/components/DocumentPresenterContainer.d.ts +7 -0
  31. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +1 -0
  32. package/dist/types/src/components/Markdown/Container.d.ts.map +1 -1
  33. package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
  34. package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
  35. package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
  36. package/dist/types/src/components/PresenterSettings.d.ts.map +1 -1
  37. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  38. package/dist/types/src/components/index.d.ts +2 -2
  39. package/dist/types/src/components/index.d.ts.map +1 -1
  40. package/dist/types/src/index.d.ts +0 -1
  41. package/dist/types/src/index.d.ts.map +1 -1
  42. package/dist/types/src/testing.d.ts.map +1 -1
  43. package/dist/types/src/types.d.ts +17 -73
  44. package/dist/types/src/types.d.ts.map +1 -1
  45. package/dist/types/src/useExitPresenter.d.ts +6 -0
  46. package/dist/types/src/useExitPresenter.d.ts.map +1 -0
  47. package/dist/types/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +31 -23
  49. package/src/PresenterPlugin.tsx +1 -14
  50. package/src/capabilities/app-graph-builder.ts +65 -35
  51. package/src/capabilities/index.ts +0 -4
  52. package/src/capabilities/react-surface.tsx +16 -24
  53. package/src/capabilities/settings.ts +2 -2
  54. package/src/components/CollectionPresenterContainer.tsx +43 -0
  55. package/src/components/DocumentPresenterContainer.tsx +22 -0
  56. package/src/components/Markdown/theme.ts +1 -1
  57. package/src/components/index.ts +2 -2
  58. package/src/index.ts +0 -1
  59. package/src/types.ts +10 -10
  60. package/src/useExitPresenter.ts +35 -0
  61. package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs +0 -193
  62. package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs.map +0 -7
  63. package/dist/lib/browser/RevealMain-B2PJXHND.mjs +0 -187
  64. package/dist/lib/browser/RevealMain-B2PJXHND.mjs.map +0 -7
  65. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs +0 -55
  66. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +0 -7
  67. package/dist/lib/browser/chunk-3VVM67QE.mjs +0 -31
  68. package/dist/lib/browser/chunk-CQR4O6KC.mjs.map +0 -7
  69. package/dist/lib/browser/chunk-FK2KJZ73.mjs +0 -16
  70. package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +0 -7
  71. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +0 -46
  72. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +0 -7
  73. package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +0 -7
  74. package/dist/lib/browser/settings-RBF22MVS.mjs.map +0 -7
  75. package/dist/lib/browser/state-KI7F4I6V.mjs +0 -18
  76. package/dist/lib/browser/state-KI7F4I6V.mjs.map +0 -7
  77. package/dist/types/src/capabilities/capabilities.d.ts +0 -8
  78. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  79. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  80. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  81. package/dist/types/src/capabilities/state.d.ts +0 -4
  82. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  83. package/dist/types/src/components/PresenterMain.d.ts +0 -7
  84. package/dist/types/src/components/PresenterMain.d.ts.map +0 -1
  85. package/dist/types/src/components/RevealMain.d.ts +0 -7
  86. package/dist/types/src/components/RevealMain.d.ts.map +0 -1
  87. package/src/capabilities/capabilities.ts +0 -13
  88. package/src/capabilities/intent-resolver.ts +0 -43
  89. package/src/capabilities/state.ts +0 -17
  90. package/src/components/PresenterMain.tsx +0 -63
  91. package/src/components/RevealMain.tsx +0 -38
@@ -1,187 +0,0 @@
1
- import {
2
- PresenterAction
3
- } from "./chunk-CQR4O6KC.mjs";
4
- import "./chunk-S2S5RFJ4.mjs";
5
-
6
- // packages/plugins/plugin-presenter/src/components/RevealMain.tsx
7
- import React2 from "react";
8
- import { createIntent, useLayout, useIntentDispatcher } from "@dxos/app-framework";
9
- import { Main } from "@dxos/react-ui";
10
- import { topbarBlockPaddingStart, fixedInsetFlexLayout, bottombarBlockPaddingEnd } from "@dxos/react-ui-theme";
11
-
12
- // packages/plugins/plugin-presenter/src/components/RevealPlayer/RevealPlayer.tsx
13
- import "reveal.js/dist/reveal.css";
14
- import "reveal.js/dist/theme/black.css";
15
- import "highlight.js/styles/tokyo-night-dark.css";
16
- import hljs from "highlight.js";
17
- import typescript from "highlight.js/lib/languages/typescript";
18
- import React, { useEffect, useRef } from "react";
19
- import Reveal from "reveal.js";
20
- import RevealHighlight from "reveal.js/plugin/highlight/highlight";
21
- import RevealMarkdown from "reveal.js/plugin/markdown/plugin.js";
22
- import { mx } from "@dxos/react-ui-theme";
23
- var styles = `
24
- <style type="text/css">
25
- .reveal h1 {
26
- font-weight: 100;
27
- font-size: 60px;
28
- opacity: 0.5;
29
- }
30
- .reveal h2 {
31
- font-weight: 100;
32
- padding-top: 60px;
33
- padding-left: 40px;
34
- font-size: 48px;
35
- opacity: 0.3;
36
- }
37
- .reveal h1, h2, p {
38
- font-family: "Raleway", sans-serif;
39
- text-align: left;
40
- font-weight: 200;
41
- }
42
- .reveal ul {
43
- font-family: "Raleway", sans-serif;
44
- display: block;
45
- list-style: "- ";
46
- }
47
- .reveal blockquote p {
48
- text-align: center;
49
- font-weight: 100;
50
- padding: 32px;
51
- }
52
- .reveal pre {
53
- margin-left: 0;
54
- }
55
- .reveal code {
56
- font-size: 20px;
57
- background: #111111;
58
- color: #eeeeee;
59
- max-height: unset !important;
60
- }
61
- </style>
62
- `;
63
- var RevealPlayer = ({ classNames, content, slide, fullscreen = true, onExit }) => {
64
- const deckDivRef = useRef(null);
65
- const deckRef = useRef(null);
66
- useEffect(() => {
67
- if (deckRef.current) {
68
- return;
69
- }
70
- hljs.registerLanguage("typescript", typescript);
71
- const t = setTimeout(async () => {
72
- deckRef.current = new Reveal(deckDivRef.current, {
73
- // view: 'scroll',
74
- progress: false,
75
- transition: "none",
76
- slideNumber: false,
77
- embedded: true,
78
- // TODO(burdon): Speaker view requires server to serve popout window.
79
- // https://revealjs.com/speaker-view
80
- showNotes: false,
81
- // width: 1600,
82
- // height: 900,
83
- margin: 0.1,
84
- // center: false,
85
- // minScale: 0.1,
86
- // maxScale: 1.4,
87
- // https://revealjs.com/markdown
88
- // TODO(burdon): Requires server to serve popout window.
89
- plugins: [
90
- RevealMarkdown,
91
- RevealHighlight
92
- ],
93
- // See https://marked.js.org/using_advanced#options
94
- markdown: {
95
- gfm: true,
96
- smartypants: true,
97
- highlight: (code, language) => {
98
- if (language) {
99
- return hljs.highlight(code, {
100
- language
101
- }).value;
102
- }
103
- return hljs.highlightAuto(code).value;
104
- }
105
- }
106
- });
107
- await deckRef.current.initialize();
108
- if (slide !== void 0) {
109
- deckRef.current.slide(slide < 0 ? deckRef.current?.getTotalSlides() + slide : slide - 1);
110
- }
111
- deckRef.current.addKeyBinding({
112
- keyCode: 27,
113
- key: "Escape",
114
- description: "Exit full screen"
115
- }, () => {
116
- onExit?.();
117
- });
118
- });
119
- return () => {
120
- try {
121
- clearTimeout(t);
122
- if (deckRef.current) {
123
- deckRef.current.destroy();
124
- deckRef.current = null;
125
- }
126
- } catch (err) {
127
- }
128
- };
129
- });
130
- return /* @__PURE__ */ React.createElement("div", {
131
- className: mx("absolute flex h-full w-full items-center justify-center", fullscreen && "inset-0", classNames)
132
- }, /* @__PURE__ */ React.createElement("div", {
133
- className: "relative aspect-video w-full"
134
- }, /* @__PURE__ */ React.createElement("div", {
135
- ref: deckDivRef,
136
- className: "reveal"
137
- }, /* @__PURE__ */ React.createElement("style", null, /* @__PURE__ */ React.createElement("link", {
138
- rel: "preconnect",
139
- href: "https://fonts.googleapis.com"
140
- }), /* @__PURE__ */ React.createElement("link", {
141
- rel: "preconnect",
142
- href: "https://fonts.gstatic.com",
143
- crossOrigin: ""
144
- }), /* @__PURE__ */ React.createElement("link", {
145
- rel: "stylesheet",
146
- href: "https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"
147
- })), /* @__PURE__ */ React.createElement("div", {
148
- className: "slides"
149
- }, /* @__PURE__ */ React.createElement("div", {
150
- className: "!text-center"
151
- }), /* @__PURE__ */ React.createElement("section", {
152
- "data-markdown": []
153
- }, /* @__PURE__ */ React.createElement("textarea", {
154
- "data-template": true,
155
- defaultValue: [
156
- styles,
157
- content
158
- ].join("\n")
159
- }))))));
160
- };
161
-
162
- // packages/plugins/plugin-presenter/src/components/RevealMain.tsx
163
- var PresenterMain = ({ document }) => {
164
- const layout = useLayout();
165
- const fullscreen = layout.mode === "fullscreen";
166
- const { dispatchPromise: dispatch } = useIntentDispatcher();
167
- return /* @__PURE__ */ React2.createElement(Main.Content, {
168
- classNames: [
169
- fixedInsetFlexLayout,
170
- !fullscreen && topbarBlockPaddingStart,
171
- !fullscreen && bottombarBlockPaddingEnd
172
- ]
173
- }, /* @__PURE__ */ React2.createElement(RevealPlayer, {
174
- content: document.content.target?.content ?? "",
175
- onExit: () => {
176
- void dispatch(createIntent(PresenterAction.TogglePresentation, {
177
- object: document,
178
- state: false
179
- }));
180
- }
181
- }));
182
- };
183
- var RevealMain_default = PresenterMain;
184
- export {
185
- RevealMain_default as default
186
- };
187
- //# sourceMappingURL=RevealMain-B2PJXHND.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/RevealMain.tsx", "../../../src/components/RevealPlayer/RevealPlayer.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { createIntent, useLayout, useIntentDispatcher } from '@dxos/app-framework';\nimport { type DocumentType } from '@dxos/plugin-markdown/types';\nimport { Main } from '@dxos/react-ui';\nimport { topbarBlockPaddingStart, fixedInsetFlexLayout, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';\n\nimport { RevealPlayer } from './RevealPlayer';\nimport { PresenterAction } from '../types';\n\nconst PresenterMain: FC<{ document: DocumentType }> = ({ document }) => {\n const layout = useLayout();\n const fullscreen = layout.mode === 'fullscreen';\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n return (\n <Main.Content\n classNames={[\n fixedInsetFlexLayout,\n !fullscreen && topbarBlockPaddingStart,\n !fullscreen && bottombarBlockPaddingEnd,\n ]}\n >\n <RevealPlayer\n content={document.content.target?.content ?? ''}\n onExit={() => {\n void dispatch(createIntent(PresenterAction.TogglePresentation, { object: document, state: false }));\n }}\n />\n </Main.Content>\n );\n};\n\nexport default PresenterMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// eslint-disable-next-line no-restricted-imports\nimport 'reveal.js/dist/reveal.css';\n// eslint-disable-next-line no-restricted-imports\nimport 'reveal.js/dist/theme/black.css';\n\n// https://github.com/highlightjs/highlight.js/tree/main/src/styles\n// import 'highlight.js/styles/github-dark.css';\nimport 'highlight.js/styles/tokyo-night-dark.css';\n\nimport hljs from 'highlight.js';\nimport typescript from 'highlight.js/lib/languages/typescript';\nimport React, { useEffect, useRef } from 'react';\nimport Reveal from 'reveal.js';\nimport RevealHighlight from 'reveal.js/plugin/highlight/highlight';\nimport RevealMarkdown from 'reveal.js/plugin/markdown/plugin.js';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nconst styles = `\n<style type=\"text/css\">\n .reveal h1 {\n font-weight: 100;\n font-size: 60px;\n opacity: 0.5;\n }\n .reveal h2 {\n font-weight: 100;\n padding-top: 60px;\n padding-left: 40px;\n font-size: 48px;\n opacity: 0.3;\n }\n .reveal h1, h2, p {\n font-family: \"Raleway\", sans-serif;\n text-align: left;\n font-weight: 200;\n }\n .reveal ul {\n font-family: \"Raleway\", sans-serif;\n display: block;\n list-style: \"- \";\n }\n .reveal blockquote p {\n text-align: center;\n font-weight: 100;\n padding: 32px;\n }\n .reveal pre {\n margin-left: 0;\n }\n .reveal code {\n font-size: 20px;\n background: #111111;\n color: #eeeeee;\n max-height: unset !important;\n }\n</style>\n`;\n\nexport type RevealProps = ThemedClassName<{\n content: string;\n slide?: number;\n fullscreen?: boolean;\n onExit?: () => void;\n}>;\n\nexport const RevealPlayer = ({ classNames, content, slide, fullscreen = true, onExit }: RevealProps) => {\n const deckDivRef = useRef<HTMLDivElement>(null);\n const deckRef = useRef<Reveal.Api | null>(null);\n useEffect(() => {\n if (deckRef.current) {\n return;\n }\n\n // Required for syntax highlighting.\n hljs.registerLanguage('typescript', typescript);\n\n const t = setTimeout(async () => {\n // https://revealjs.com/react\n // https://revealjs.com/config\n // https://github.com/hakimel/reveal.js\n // TODO(burdon): Fragments and scroll view steps 2 at a time (safe mode?)\n deckRef.current = new Reveal(deckDivRef.current!, {\n // view: 'scroll',\n progress: false,\n transition: 'none',\n slideNumber: false,\n embedded: true,\n\n // TODO(burdon): Speaker view requires server to serve popout window.\n // https://revealjs.com/speaker-view\n showNotes: false,\n\n // width: 1600,\n // height: 900,\n margin: 0.1,\n // center: false,\n // minScale: 0.1,\n // maxScale: 1.4,\n\n // https://revealjs.com/markdown\n // TODO(burdon): Requires server to serve popout window.\n plugins: [RevealMarkdown, RevealHighlight],\n\n // See https://marked.js.org/using_advanced#options\n markdown: {\n gfm: true,\n smartypants: true,\n highlight: (code, language) => {\n if (language) {\n return hljs.highlight(code, { language }).value;\n }\n\n return hljs.highlightAuto(code).value;\n },\n },\n });\n\n await deckRef.current.initialize();\n\n if (slide !== undefined) {\n deckRef.current.slide(slide < 0 ? deckRef.current?.getTotalSlides() + slide : slide - 1);\n }\n\n deckRef.current.addKeyBinding({ keyCode: 27, key: 'Escape', description: 'Exit full screen' }, () => {\n onExit?.();\n });\n });\n\n return () => {\n try {\n clearTimeout(t);\n if (deckRef.current) {\n deckRef.current.destroy();\n deckRef.current = null;\n }\n } catch (err) {\n // Ignore.\n }\n };\n });\n\n return (\n <div className={mx('absolute flex h-full w-full items-center justify-center', fullscreen && 'inset-0', classNames)}>\n <div className='relative aspect-video w-full'>\n <div ref={deckDivRef} className='reveal'>\n {/* TODO(burdon): Must be in head. */}\n <style>\n <link rel='preconnect' href='https://fonts.googleapis.com' />\n <link rel='preconnect' href='https://fonts.gstatic.com' {...{ crossOrigin: '' }} />\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap'\n />\n </style>\n <div className='slides'>\n <div className='!text-center' />\n <section {...{ 'data-markdown': [] }}>\n <textarea {...{ 'data-template': true }} defaultValue={[styles, content].join('\\n')}></textarea>\n </section>\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],
5
- "mappings": "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",
6
- "names": ["React", "createIntent", "useLayout", "useIntentDispatcher", "Main", "topbarBlockPaddingStart", "fixedInsetFlexLayout", "bottombarBlockPaddingEnd", "hljs", "typescript", "React", "useEffect", "useRef", "Reveal", "RevealHighlight", "RevealMarkdown", "mx", "styles", "RevealPlayer", "classNames", "content", "slide", "fullscreen", "onExit", "deckDivRef", "useRef", "deckRef", "useEffect", "current", "hljs", "registerLanguage", "typescript", "t", "setTimeout", "Reveal", "progress", "transition", "slideNumber", "embedded", "showNotes", "margin", "plugins", "RevealMarkdown", "RevealHighlight", "markdown", "gfm", "smartypants", "highlight", "code", "language", "value", "highlightAuto", "initialize", "undefined", "getTotalSlides", "addKeyBinding", "keyCode", "key", "description", "clearTimeout", "destroy", "err", "div", "className", "mx", "ref", "style", "link", "rel", "href", "crossOrigin", "section", "textarea", "defaultValue", "join", "PresenterMain", "document", "layout", "useLayout", "fullscreen", "mode", "dispatchPromise", "dispatch", "useIntentDispatcher", "React", "Main", "Content", "classNames", "fixedInsetFlexLayout", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "RevealPlayer", "content", "target", "onExit", "createIntent", "PresenterAction", "TogglePresentation", "object", "state"]
7
- }
@@ -1,55 +0,0 @@
1
- import {
2
- PresenterAction
3
- } from "./chunk-CQR4O6KC.mjs";
4
- import {
5
- PRESENTER_PLUGIN
6
- } from "./chunk-S2S5RFJ4.mjs";
7
-
8
- // packages/plugins/plugin-presenter/src/capabilities/app-graph-builder.ts
9
- import { contributes, Capabilities, createIntent } from "@dxos/app-framework";
10
- import { isInstanceOf } from "@dxos/echo-schema";
11
- import { createExtension } from "@dxos/plugin-graph";
12
- import { DocumentType } from "@dxos/plugin-markdown/types";
13
- import { CollectionType } from "@dxos/plugin-space/types";
14
- import { fullyQualifiedId } from "@dxos/react-client/echo";
15
- var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
16
- id: PRESENTER_PLUGIN,
17
- filter: (node) => {
18
- const settings = context.requestCapabilities(Capabilities.SettingsStore)[0]?.getStore(PRESENTER_PLUGIN)?.value;
19
- return settings?.presentCollections ? isInstanceOf(CollectionType, node.data) || isInstanceOf(DocumentType, node.data) : isInstanceOf(DocumentType, node.data);
20
- },
21
- actions: ({ node }) => {
22
- const object = node.data;
23
- const id = fullyQualifiedId(object);
24
- return [
25
- {
26
- id: `${PresenterAction.TogglePresentation._tag}/${id}`,
27
- // TODO(burdon): Allow function so can generate state when activated.
28
- // So can set explicit fullscreen state coordinated with current presenter state.
29
- data: async () => {
30
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
31
- await dispatch(createIntent(PresenterAction.TogglePresentation, {
32
- object
33
- }));
34
- },
35
- properties: {
36
- label: [
37
- "toggle presentation label",
38
- {
39
- ns: PRESENTER_PLUGIN
40
- }
41
- ],
42
- icon: "ph--presentation--regular",
43
- keyBinding: {
44
- macos: "shift+meta+p",
45
- windows: "shift+alt+p"
46
- }
47
- }
48
- }
49
- ];
50
- }
51
- }));
52
- export {
53
- app_graph_builder_default as default
54
- };
55
- //# sourceMappingURL=app-graph-builder-CWMMBJTB.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 { contributes, type PluginsContext, Capabilities, createIntent } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\n\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { PresenterAction, type PresenterSettingsProps } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: PRESENTER_PLUGIN,\n filter: (node): node is Node<CollectionType | DocumentType> => {\n const settings = context\n .requestCapabilities(Capabilities.SettingsStore)[0]\n ?.getStore<PresenterSettingsProps>(PRESENTER_PLUGIN)?.value;\n return settings?.presentCollections\n ? isInstanceOf(CollectionType, node.data) || isInstanceOf(DocumentType, node.data)\n : isInstanceOf(DocumentType, node.data);\n },\n actions: ({ node }) => {\n const object = node.data;\n const id = fullyQualifiedId(object);\n return [\n {\n id: `${PresenterAction.TogglePresentation._tag}/${id}`,\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: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(PresenterAction.TogglePresentation, { object }));\n },\n properties: {\n label: ['toggle presentation label', { ns: PRESENTER_PLUGIN }],\n icon: 'ph--presentation--regular',\n keyBinding: {\n macos: 'shift+meta+p',\n windows: 'shift+alt+p',\n },\n },\n },\n ];\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,aAAkCC,cAAcC,oBAAoB;AAC7E,SAASC,oBAAoB;AAC7B,SAASC,uBAAkC;AAC3C,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,wBAAwB;AAKjC,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAAAA;AACP,UAAMC,WAAWT,QACdU,oBAAoBR,aAAaS,aAAa,EAAE,CAAA,GAC/CC,SAAiCN,gBAAAA,GAAmBO;AACxD,WAAOJ,UAAUK,qBACbC,aAAaC,gBAAgBR,KAAKS,IAAI,KAAKF,aAAaG,cAAcV,KAAKS,IAAI,IAC/EF,aAAaG,cAAcV,KAAKS,IAAI;EAC1C;EACAE,SAAS,CAAC,EAAEX,KAAI,MAAE;AAChB,UAAMY,SAASZ,KAAKS;AACpB,UAAMZ,KAAKgB,iBAAiBD,MAAAA;AAC5B,WAAO;MACL;QACEf,IAAI,GAAGiB,gBAAgBC,mBAAmBC,IAAI,IAAInB,EAAAA;;;QAGlDY,MAAM,YAAA;AACJ,gBAAM,EAAEQ,iBAAiBC,SAAQ,IAAK1B,QAAQ2B,kBAAkBzB,aAAa0B,gBAAgB;AAC7F,gBAAMF,SAASG,aAAaP,gBAAgBC,oBAAoB;YAAEH;UAAO,CAAA,CAAA;QAC3E;QACAU,YAAY;UACVC,OAAO;YAAC;YAA6B;cAAEC,IAAI1B;YAAiB;;UAC5D2B,MAAM;UACNC,YAAY;YACVC,OAAO;YACPC,SAAS;UACX;QACF;MACF;;EAEJ;AACF,CAAA,CAAA;",
6
- "names": ["contributes", "Capabilities", "createIntent", "isInstanceOf", "createExtension", "DocumentType", "CollectionType", "fullyQualifiedId", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "PRESENTER_PLUGIN", "filter", "node", "settings", "requestCapabilities", "SettingsStore", "getStore", "value", "presentCollections", "isInstanceOf", "CollectionType", "data", "DocumentType", "actions", "object", "fullyQualifiedId", "PresenterAction", "TogglePresentation", "_tag", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows"]
7
- }
@@ -1,31 +0,0 @@
1
- import {
2
- PRESENTER_PLUGIN
3
- } from "./chunk-S2S5RFJ4.mjs";
4
-
5
- // packages/plugins/plugin-presenter/src/components/PresenterSettings.tsx
6
- import React from "react";
7
- import { Input, useTranslation } from "@dxos/react-ui";
8
- import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
9
- var PresenterSettings = ({ settings }) => {
10
- const { t } = useTranslation(PRESENTER_PLUGIN);
11
- return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
12
- label: t("present collections label")
13
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
14
- checked: settings.presentCollections,
15
- onCheckedChange: (checked) => settings.presentCollections = !!checked
16
- })));
17
- };
18
-
19
- // packages/plugins/plugin-presenter/src/components/index.ts
20
- import { lazy } from "react";
21
- var MarkdownSlide = lazy(() => import("./MarkdownSlide-5NYXG5SC.mjs"));
22
- var RevealMain = lazy(() => import("./RevealMain-B2PJXHND.mjs"));
23
- var PresenterMain = lazy(() => import("./PresenterMain-PQPWYIWU.mjs"));
24
-
25
- export {
26
- PresenterSettings,
27
- MarkdownSlide,
28
- RevealMain,
29
- PresenterMain
30
- };
31
- //# sourceMappingURL=chunk-3VVM67QE.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { PRESENTER_PLUGIN } from './meta';\n\nexport namespace PresenterAction {\n const PRESENTER_ACTION = `${PRESENTER_PLUGIN}/action`;\n\n export class TogglePresentation extends S.TaggedClass<TogglePresentation>()(\n `${PRESENTER_ACTION}/toggle-presentation`,\n {\n input: S.Struct({\n object: S.Union(DocumentType, CollectionType),\n state: S.optional(S.Boolean),\n }),\n output: S.Void,\n },\n ) {}\n}\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 const PresenterSettingsSchema = S.mutable(\n S.Struct({\n presentCollections: S.optional(S.Boolean),\n }),\n);\n\nexport type PresenterSettingsProps = S.Schema.Type<typeof PresenterSettingsSchema>;\n"],
5
- "mappings": ";;;;;AAIA,SAAuBA,qBAAqB;AAE5C,SAASC,SAAS;AAClB,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;;UAIdC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,gBAAAA;EAErB,MAAMC,2BAA2BC,EAAEC,YAAW,EACnD,GAAGJ,gBAAAA,wBACH;IACEK,OAAOF,EAAEG,OAAO;MACdC,QAAQJ,EAAEK,MAAMC,cAAcC,cAAAA;MAC9BC,OAAOR,EAAES,SAAST,EAAEU,OAAO;IAC7B,CAAA;IACAC,QAAQX,EAAEY;EACZ,CAAA,EAAA;EACC;mBATUb,qBAAAA;AAUf,GAbiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;AAqBV,IAAMiB,mBAAkDC,cAAoC;EACjGC,SAAS;EACTC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;AAEO,IAAMC,0BAA0BlB,EAAEmB,QACvCnB,EAAEG,OAAO;EACPiB,oBAAoBpB,EAAES,SAAST,EAAEU,OAAO;AAC1C,CAAA,CAAA;",
6
- "names": ["createContext", "S", "DocumentType", "CollectionType", "PresenterAction", "PRESENTER_ACTION", "PRESENTER_PLUGIN", "TogglePresentation", "S", "TaggedClass", "input", "Struct", "object", "Union", "DocumentType", "CollectionType", "state", "optional", "Boolean", "output", "Void", "PresenterContext", "createContext", "running", "start", "stop", "PresenterSettingsSchema", "mutable", "presentCollections"]
7
- }
@@ -1,16 +0,0 @@
1
- import {
2
- PRESENTER_PLUGIN
3
- } from "./chunk-S2S5RFJ4.mjs";
4
-
5
- // packages/plugins/plugin-presenter/src/capabilities/capabilities.ts
6
- import { defineCapability } from "@dxos/app-framework";
7
- var PresenterCapabilities;
8
- (function(PresenterCapabilities2) {
9
- PresenterCapabilities2.State = defineCapability(`${PRESENTER_PLUGIN}/capability/state`);
10
- PresenterCapabilities2.MutableState = defineCapability(`${PRESENTER_PLUGIN}/capability/state`);
11
- })(PresenterCapabilities || (PresenterCapabilities = {}));
12
-
13
- export {
14
- PresenterCapabilities
15
- };
16
- //# sourceMappingURL=chunk-FK2KJZ73.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/capabilities.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\n\nimport { PRESENTER_PLUGIN } from '../meta';\n\nexport namespace PresenterCapabilities {\n export type State = { presenting: boolean };\n export const State = defineCapability<Readonly<State>>(`${PRESENTER_PLUGIN}/capability/state`);\n export const MutableState = defineCapability<State>(`${PRESENTER_PLUGIN}/capability/state`);\n}\n"],
5
- "mappings": ";;;;;AAIA,SAASA,wBAAwB;;UAIhBC,wBAAAA;yBAEFC,QAAQC,iBAAkC,GAAGC,gBAAAA,mBAAmC;yBAChFC,eAAeF,iBAAwB,GAAGC,gBAAAA,mBAAmC;AAC5F,GAJiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;",
6
- "names": ["defineCapability", "PresenterCapabilities", "State", "defineCapability", "PRESENTER_PLUGIN", "MutableState"]
7
- }
@@ -1,46 +0,0 @@
1
- import {
2
- PresenterCapabilities
3
- } from "./chunk-FK2KJZ73.mjs";
4
- import {
5
- PresenterAction
6
- } from "./chunk-CQR4O6KC.mjs";
7
- import "./chunk-S2S5RFJ4.mjs";
8
-
9
- // packages/plugins/plugin-presenter/src/capabilities/intent-resolver.ts
10
- import { Capabilities, contributes, createIntent, createResolver, LayoutAction } from "@dxos/app-framework";
11
- import { fullyQualifiedId } from "@dxos/react-client/echo";
12
- var intent_resolver_default = (context) => contributes(Capabilities.IntentResolver, createResolver({
13
- intent: PresenterAction.TogglePresentation,
14
- resolve: ({ object, state: next }) => {
15
- const state = context.requestCapability(PresenterCapabilities.MutableState);
16
- state.presenting = next ?? !state.presenting;
17
- if (state.presenting) {
18
- return {
19
- intents: [
20
- createIntent(LayoutAction.SetLayoutMode, {
21
- part: "mode",
22
- subject: fullyQualifiedId(object),
23
- options: {
24
- mode: "fullscreen"
25
- }
26
- })
27
- ]
28
- };
29
- } else {
30
- return {
31
- intents: [
32
- createIntent(LayoutAction.SetLayoutMode, {
33
- part: "mode",
34
- options: {
35
- revert: true
36
- }
37
- })
38
- ]
39
- };
40
- }
41
- }
42
- }));
43
- export {
44
- intent_resolver_default as default
45
- };
46
- //# sourceMappingURL=intent-resolver-TTGJCKQ5.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n createResolver,\n LayoutAction,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\n\nimport { PresenterCapabilities } from './capabilities';\nimport { PresenterAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: PresenterAction.TogglePresentation,\n resolve: ({ object, state: next }) => {\n const state = context.requestCapability(PresenterCapabilities.MutableState);\n state.presenting = next ?? !state.presenting;\n if (state.presenting) {\n return {\n intents: [\n createIntent(LayoutAction.SetLayoutMode, {\n part: 'mode',\n subject: fullyQualifiedId(object),\n options: { mode: 'fullscreen' },\n }),\n ],\n };\n } else {\n return {\n intents: [createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { revert: true } })],\n };\n }\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,gBACAC,oBAEK;AACP,SAASC,wBAAwB;AAKjC,IAAA,0BAAe,CAACC,YACdC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,gBAAgBC;EACxBC,SAAS,CAAC,EAAEC,QAAQC,OAAOC,KAAI,MAAE;AAC/B,UAAMD,QAAQV,QAAQY,kBAAkBC,sBAAsBC,YAAY;AAC1EJ,UAAMK,aAAaJ,QAAQ,CAACD,MAAMK;AAClC,QAAIL,MAAMK,YAAY;AACpB,aAAO;QACLC,SAAS;UACPC,aAAaC,aAAaC,eAAe;YACvCC,MAAM;YACNC,SAASC,iBAAiBb,MAAAA;YAC1Bc,SAAS;cAAEC,MAAM;YAAa;UAChC,CAAA;;MAEJ;IACF,OAAO;AACL,aAAO;QACLR,SAAS;UAACC,aAAaC,aAAaC,eAAe;YAAEC,MAAM;YAAQG,SAAS;cAAEE,QAAQ;YAAK;UAAE,CAAA;;MAC/F;IACF;EACF;AACF,CAAA,CAAA;",
6
- "names": ["Capabilities", "contributes", "createIntent", "createResolver", "LayoutAction", "fullyQualifiedId", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "PresenterAction", "TogglePresentation", "resolve", "object", "state", "next", "requestCapability", "PresenterCapabilities", "MutableState", "presenting", "intents", "createIntent", "LayoutAction", "SetLayoutMode", "part", "subject", "fullyQualifiedId", "options", "mode", "revert"]
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 React from 'react';\n\nimport { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { SettingsStore } from '@dxos/local-storage';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { PresenterCapabilities } from './capabilities';\nimport { MarkdownSlide, PresenterSettings, PresenterMain, RevealMain } from '../components';\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { PresenterContext, type PresenterSettingsProps } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${PRESENTER_PLUGIN}/document`,\n role: 'main',\n position: 'hoist',\n filter: (data): data is { subject: DocumentType } => isInstanceOf(DocumentType, data.subject),\n component: ({ data }) => <RevealMain document={data.subject} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/collection`,\n role: 'main',\n position: 'hoist',\n filter: (data): data is { subject: CollectionType } => isInstanceOf(CollectionType, data.subject),\n component: ({ data }) => {\n const state = useCapability(PresenterCapabilities.MutableState);\n\n return (\n <PresenterContext.Provider\n value={{\n running: state.presenting,\n start: () => (state.presenting = true),\n stop: () => (state.presenting = false),\n }}\n >\n <PresenterMain collection={data.subject} />\n </PresenterContext.Provider>\n );\n },\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/slide`,\n role: 'slide',\n filter: (data): data is { subject: DocumentType } => isInstanceOf(DocumentType, data.subject),\n component: ({ data }) => <MarkdownSlide document={data.subject} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/plugin-settings`,\n role: 'article',\n filter: (data): data is { subject: SettingsStore<PresenterSettingsProps> } =>\n data.subject instanceof SettingsStore && data.subject.prefix === PRESENTER_PLUGIN,\n component: ({ data: { subject } }) => <PresenterSettings settings={subject.value} />,\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,eAAeC,qBAAqB;AACxE,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAC9B,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAO/B,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SAA4CC,aAAaC,cAAcF,KAAKG,OAAO;IAC5FC,WAAW,CAAC,EAAEJ,KAAI,MAAO,sBAAA,cAACK,YAAAA;MAAWC,UAAUN,KAAKG;;EACtD,CAAA;EACAT,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SAA8CC,aAAaM,gBAAgBP,KAAKG,OAAO;IAChGC,WAAW,CAAC,EAAEJ,KAAI,MAAE;AAClB,YAAMQ,QAAQC,cAAcC,sBAAsBC,YAAY;AAE9D,aACE,sBAAA,cAACC,iBAAiBC,UAAQ;QACxBC,OAAO;UACLC,SAASP,MAAMQ;UACfC,OAAO,MAAOT,MAAMQ,aAAa;UACjCE,MAAM,MAAOV,MAAMQ,aAAa;QAClC;SAEA,sBAAA,cAACG,eAAAA;QAAcC,YAAYpB,KAAKG;;IAGtC;EACF,CAAA;EACAT,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SAA4CC,aAAaC,cAAcF,KAAKG,OAAO;IAC5FC,WAAW,CAAC,EAAEJ,KAAI,MAAO,sBAAA,cAACqB,eAAAA;MAAcf,UAAUN,KAAKG;;EACzD,CAAA;EACAT,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SACPA,KAAKG,mBAAmBmB,iBAAiBtB,KAAKG,QAAQoB,WAAW3B;IACnEQ,WAAW,CAAC,EAAEJ,MAAM,EAAEG,QAAO,EAAE,MAAO,sBAAA,cAACqB,mBAAAA;MAAkBC,UAAUtB,QAAQW;;EAC7E,CAAA;CACD;",
6
- "names": ["React", "Capabilities", "contributes", "createSurface", "useCapability", "isInstanceOf", "SettingsStore", "DocumentType", "CollectionType", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PRESENTER_PLUGIN", "role", "position", "filter", "data", "isInstanceOf", "DocumentType", "subject", "component", "RevealMain", "document", "CollectionType", "state", "useCapability", "PresenterCapabilities", "MutableState", "PresenterContext", "Provider", "value", "running", "presenting", "start", "stop", "PresenterMain", "collection", "MarkdownSlide", "SettingsStore", "prefix", "PresenterSettings", "settings"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/settings.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { PresenterSettingsSchema, type PresenterSettingsProps } from '../types';\n\nexport default () => {\n const settings = create<PresenterSettingsProps>({});\n\n return contributes(Capabilities.Settings, {\n schema: PresenterSettingsSchema,\n prefix: PRESENTER_PLUGIN,\n value: settings,\n });\n};\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,cAAc;AAKvB,IAAA,mBAAe,MAAA;AACb,QAAMC,WAAWC,OAA+B,CAAC,CAAA;AAEjD,SAAOC,YAAYC,aAAaC,UAAU;IACxCC,QAAQC;IACRC,QAAQC;IACRC,OAAOT;EACT,CAAA;AACF;",
6
- "names": ["Capabilities", "contributes", "create", "settings", "create", "contributes", "Capabilities", "Settings", "schema", "PresenterSettingsSchema", "prefix", "PRESENTER_PLUGIN", "value"]
7
- }
@@ -1,18 +0,0 @@
1
- import {
2
- PresenterCapabilities
3
- } from "./chunk-FK2KJZ73.mjs";
4
- import "./chunk-S2S5RFJ4.mjs";
5
-
6
- // packages/plugins/plugin-presenter/src/capabilities/state.ts
7
- import { contributes } from "@dxos/app-framework";
8
- import { create } from "@dxos/live-object";
9
- var state_default = () => {
10
- const state = create({
11
- presenting: false
12
- });
13
- return contributes(PresenterCapabilities.State, state);
14
- };
15
- export {
16
- state_default as default
17
- };
18
- //# sourceMappingURL=state-KI7F4I6V.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/state.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { PresenterCapabilities } from './capabilities';\n\nexport default () => {\n // TODO(burdon): Do we need context providers if we can get the state from the plugin?\n // No, the main reason would be compability with existing apis.\n // For anything made specifically for the plugin framework they can depend on `useCapabilities`.\n const state = create<PresenterCapabilities.State>({ presenting: false });\n\n return contributes(PresenterCapabilities.State, state);\n};\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,mBAAmB;AAC5B,SAASC,cAAc;AAIvB,IAAA,gBAAe,MAAA;AAIb,QAAMC,QAAQC,OAAoC;IAAEC,YAAY;EAAM,CAAA;AAEtE,SAAOC,YAAYC,sBAAsBC,OAAOL,KAAAA;AAClD;",
6
- "names": ["contributes", "create", "state", "create", "presenting", "contributes", "PresenterCapabilities", "State"]
7
- }
@@ -1,8 +0,0 @@
1
- export declare namespace PresenterCapabilities {
2
- type State = {
3
- presenting: boolean;
4
- };
5
- const State: import("@dxos/app-framework").InterfaceDef<Readonly<State>>;
6
- const MutableState: import("@dxos/app-framework").InterfaceDef<State>;
7
- }
8
- //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAQA,yBAAiB,qBAAqB,CAAC;IACrC,KAAY,KAAK,GAAG;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IACrC,MAAM,KAAK,6DAA4E,CAAC;IACxF,MAAM,YAAY,mDAAkE,CAAC;CAC7F"}
@@ -1,4 +0,0 @@
1
- import { Capabilities, type PluginsContext } from '@dxos/app-framework';
2
- declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Capabilities.IntentResolver>;
3
- export default _default;
4
- //# sourceMappingURL=intent-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EAKZ,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;kCAMJ,cAAc;AAAvC,wBAyBI"}
@@ -1,4 +0,0 @@
1
- import { PresenterCapabilities } from './capabilities';
2
- declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/live-object").ReactiveObject<PresenterCapabilities.State>>;
3
- export default _default;
4
- //# sourceMappingURL=state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;;AAEvD,wBAOE"}
@@ -1,7 +0,0 @@
1
- import { type FC } from 'react';
2
- import { type CollectionType } from '@dxos/plugin-space/types';
3
- declare const PresenterMain: FC<{
4
- collection: CollectionType;
5
- }>;
6
- export default PresenterMain;
7
- //# sourceMappingURL=PresenterMain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PresenterMain.d.ts","sourceRoot":"","sources":["../../../../src/components/PresenterMain.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAwB,MAAM,OAAO,CAAC;AAG7D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY/D,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,UAAU,EAAE,cAAc,CAAA;CAAE,CAyCrD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type FC } from 'react';
2
- import { type DocumentType } from '@dxos/plugin-markdown/types';
3
- declare const PresenterMain: FC<{
4
- document: DocumentType;
5
- }>;
6
- export default PresenterMain;
7
- //# sourceMappingURL=RevealMain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RevealMain.d.ts","sourceRoot":"","sources":["../../../../src/components/RevealMain.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAOhE,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,CAqBjD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,13 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { defineCapability } from '@dxos/app-framework';
6
-
7
- import { PRESENTER_PLUGIN } from '../meta';
8
-
9
- export namespace PresenterCapabilities {
10
- export type State = { presenting: boolean };
11
- export const State = defineCapability<Readonly<State>>(`${PRESENTER_PLUGIN}/capability/state`);
12
- export const MutableState = defineCapability<State>(`${PRESENTER_PLUGIN}/capability/state`);
13
- }
@@ -1,43 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import {
6
- Capabilities,
7
- contributes,
8
- createIntent,
9
- createResolver,
10
- LayoutAction,
11
- type PluginsContext,
12
- } from '@dxos/app-framework';
13
- import { fullyQualifiedId } from '@dxos/react-client/echo';
14
-
15
- import { PresenterCapabilities } from './capabilities';
16
- import { PresenterAction } from '../types';
17
-
18
- export default (context: PluginsContext) =>
19
- contributes(
20
- Capabilities.IntentResolver,
21
- createResolver({
22
- intent: PresenterAction.TogglePresentation,
23
- resolve: ({ object, state: next }) => {
24
- const state = context.requestCapability(PresenterCapabilities.MutableState);
25
- state.presenting = next ?? !state.presenting;
26
- if (state.presenting) {
27
- return {
28
- intents: [
29
- createIntent(LayoutAction.SetLayoutMode, {
30
- part: 'mode',
31
- subject: fullyQualifiedId(object),
32
- options: { mode: 'fullscreen' },
33
- }),
34
- ],
35
- };
36
- } else {
37
- return {
38
- intents: [createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { revert: true } })],
39
- };
40
- }
41
- },
42
- }),
43
- );
@@ -1,17 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { contributes } from '@dxos/app-framework';
6
- import { create } from '@dxos/live-object';
7
-
8
- import { PresenterCapabilities } from './capabilities';
9
-
10
- export default () => {
11
- // TODO(burdon): Do we need context providers if we can get the state from the plugin?
12
- // No, the main reason would be compability with existing apis.
13
- // For anything made specifically for the plugin framework they can depend on `useCapabilities`.
14
- const state = create<PresenterCapabilities.State>({ presenting: false });
15
-
16
- return contributes(PresenterCapabilities.State, state);
17
- };