@dxos/plugin-presenter 0.8.4-main.422d1c7879 → 0.8.4-main.4f23b4e393
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.
- package/dist/lib/neutral/CollectionPresenterContainer-JMX6INMS.mjs +46 -0
- package/dist/lib/neutral/CollectionPresenterContainer-JMX6INMS.mjs.map +7 -0
- package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs +24 -0
- package/dist/lib/neutral/DocumentPresenterContainer-KCDZ2O2C.mjs.map +7 -0
- package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs +18 -0
- package/dist/lib/neutral/MarkdownSlide-WXILOIBE.mjs.map +7 -0
- package/dist/lib/neutral/PresenterPlugin.mjs +23 -0
- package/dist/lib/neutral/PresenterPlugin.mjs.map +7 -0
- package/dist/lib/neutral/PresenterPlugin.node.mjs +16 -0
- package/dist/lib/neutral/PresenterPlugin.node.mjs.map +7 -0
- package/dist/lib/{browser/PresenterSettings-DZO2DC53.mjs → neutral/PresenterSettings-2G4XD4QY.mjs} +9 -13
- package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs +97 -0
- package/dist/lib/neutral/app-graph-builder-DIEDSRPX.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-4XSSDLGN.mjs +18 -0
- package/dist/lib/neutral/chunk-4XSSDLGN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DCPA267T.mjs +68 -0
- package/dist/lib/neutral/chunk-DCPA267T.mjs.map +7 -0
- package/dist/lib/neutral/chunk-V323QBC3.mjs +41 -0
- package/dist/lib/neutral/chunk-V323QBC3.mjs.map +7 -0
- package/dist/lib/{browser → neutral/components}/index.mjs +3 -53
- package/dist/lib/{browser → neutral/components}/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-W74KM2N3.mjs +54 -0
- package/dist/lib/neutral/react-surface-W74KM2N3.mjs.map +7 -0
- package/dist/lib/neutral/settings-R6LRDAAK.mjs +28 -0
- package/dist/lib/neutral/settings-R6LRDAAK.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +19 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/PresenterPlugin.d.ts +1 -0
- package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
- package/dist/types/src/PresenterPlugin.node.d.ts +4 -0
- package/dist/types/src/PresenterPlugin.node.d.ts.map +1 -0
- package/dist/types/src/PresenterPlugin.test.d.ts +2 -0
- package/dist/types/src/PresenterPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.stories.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/theme.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Layout.d.ts +1 -1
- package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.stories.d.ts.map +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -1
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +4 -6
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +5 -7
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +1 -1
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -1
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +1 -1
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/PresenterCapabilities.d.ts +4 -0
- package/dist/types/src/types/PresenterCapabilities.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/PresenterOperation.d.ts} +6 -6
- package/dist/types/src/types/PresenterOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +1 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -6
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/useExitPresenter.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -40
- package/src/PresenterPlugin.node.ts +16 -0
- package/src/PresenterPlugin.test.ts +23 -0
- package/src/PresenterPlugin.tsx +3 -2
- package/src/capabilities/app-graph-builder.ts +5 -7
- package/src/capabilities/react-surface.tsx +2 -3
- package/src/components/PresenterSettings/PresenterSettings.stories.tsx +2 -1
- package/src/components/PresenterSettings/PresenterSettings.tsx +8 -9
- package/src/components/RevealPlayer/RevealPlayer.stories.tsx +2 -1
- package/src/components/RevealPlayer/RevealPlayer.tsx +1 -1
- package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +1 -1
- package/src/containers/MarkdownSlide/MarkdownSlide.tsx +1 -1
- package/src/index.ts +1 -3
- package/src/plugin.ts +9 -0
- package/src/translations.ts +0 -2
- package/src/types/PresenterCapabilities.ts +15 -0
- package/src/{operations/definitions.ts → types/PresenterOperation.ts} +4 -2
- package/src/types/Settings.ts +6 -1
- package/src/types/index.ts +2 -11
- package/src/useExitPresenter.ts +1 -2
- package/dist/lib/browser/PresenterSettings-DZO2DC53.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operations/index.mjs +0 -30
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/operations/index.d.ts +0 -2
- package/dist/types/src/operations/index.d.ts.map +0 -1
- package/src/operations/index.ts +0 -5
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useExitPresenter
|
|
3
|
+
} from "./chunk-V323QBC3.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/containers/CollectionPresenterContainer/CollectionPresenterContainer.tsx
|
|
7
|
+
import React, { useContext, useState } from "react";
|
|
8
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
9
|
+
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
10
|
+
import { Obj } from "@dxos/echo";
|
|
11
|
+
import { Panel } from "@dxos/react-ui";
|
|
12
|
+
import { PageNumber, Pager, Layout as PresenterLayout } from "#components";
|
|
13
|
+
import { PresenterContext } from "#types";
|
|
14
|
+
var CollectionPresenterContainer = ({ role, subject: collection }) => {
|
|
15
|
+
const [slide, setSlide] = useState(0);
|
|
16
|
+
const { running } = useContext(PresenterContext);
|
|
17
|
+
const handleExit = useExitPresenter(collection);
|
|
18
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
19
|
+
role,
|
|
20
|
+
classNames: "relative"
|
|
21
|
+
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
22
|
+
asChild: true
|
|
23
|
+
}, /* @__PURE__ */ React.createElement(PresenterLayout, {
|
|
24
|
+
bottomRight: /* @__PURE__ */ React.createElement(PageNumber, {
|
|
25
|
+
index: slide,
|
|
26
|
+
count: collection.objects.length
|
|
27
|
+
}),
|
|
28
|
+
bottomLeft: /* @__PURE__ */ React.createElement(Pager, {
|
|
29
|
+
index: slide,
|
|
30
|
+
count: collection.objects.length,
|
|
31
|
+
keys: running,
|
|
32
|
+
onChange: setSlide,
|
|
33
|
+
onExit: handleExit
|
|
34
|
+
})
|
|
35
|
+
}, /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
36
|
+
type: AppSurface.Slide,
|
|
37
|
+
data: {
|
|
38
|
+
subject: collection.objects[slide],
|
|
39
|
+
attendableId: Obj.getDXN(collection).toString()
|
|
40
|
+
}
|
|
41
|
+
}))));
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
CollectionPresenterContainer as default
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=CollectionPresenterContainer-JMX6INMS.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/CollectionPresenterContainer/CollectionPresenterContainer.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 CollectionPresenterContainerProps = AppSurface.ObjectArticleProps<Collection.Collection>;\n\nexport const CollectionPresenterContainer = ({ role, subject: collection }: CollectionPresenterContainerProps) => {\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.getDXN(collection).toString(),\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,+BAA+B,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAAqC;AAC3G,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,EAAYkC,SAAQ;IAC/C;;AAMZ;",
|
|
6
|
+
"names": ["React", "useContext", "useState", "Surface", "AppSurface", "Obj", "Panel", "PageNumber", "Pager", "Layout", "PresenterLayout", "PresenterContext", "CollectionPresenterContainer", "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", "getDXN", "toString"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useExitPresenter
|
|
3
|
+
} from "./chunk-V323QBC3.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { Panel } from "@dxos/react-ui";
|
|
9
|
+
import { RevealPlayer } from "#components";
|
|
10
|
+
var DocumentPresenterContainer = ({ document }) => {
|
|
11
|
+
const handleExit = useExitPresenter(document);
|
|
12
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
13
|
+
classNames: "relative"
|
|
14
|
+
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
15
|
+
asChild: true
|
|
16
|
+
}, /* @__PURE__ */ React.createElement(RevealPlayer, {
|
|
17
|
+
content: document.content.target?.content ?? "",
|
|
18
|
+
onExit: handleExit
|
|
19
|
+
})));
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
DocumentPresenterContainer as default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=DocumentPresenterContainer-KCDZ2O2C.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/MarkdownSlide/MarkdownSlide.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Panel, Slide } from "#components";
|
|
6
|
+
var MarkdownSlide = ({ document }) => {
|
|
7
|
+
const content = document.content.target?.content;
|
|
8
|
+
if (!content) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return /* @__PURE__ */ React.createElement(Panel, null, /* @__PURE__ */ React.createElement(Slide, {
|
|
12
|
+
content
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
MarkdownSlide as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MarkdownSlide-WXILOIBE.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/MarkdownSlide/MarkdownSlide.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown';\n\nimport { Panel, Slide } from '#components';\n\ntype MarkdownSlideProps = {\n document: Markdown.Document;\n};\n\nexport const MarkdownSlide = ({ document }: MarkdownSlideProps) => {\n const content = document.content.target?.content;\n if (!content) {\n return null;\n }\n\n return (\n <Panel>\n <Slide content={content} />\n </Panel>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,WAAW;AAIlB,SAASC,OAAOC,aAAa;AAMtB,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAsB;AAC5D,QAAMC,UAAUD,SAASC,QAAQC,QAAQD;AACzC,MAAI,CAACA,SAAS;AACZ,WAAO;EACT;AAEA,SACE,sBAAA,cAACJ,OAAAA,MACC,sBAAA,cAACC,OAAAA;IAAMG;;AAGb;",
|
|
6
|
+
"names": ["React", "Panel", "Slide", "MarkdownSlide", "document", "content", "target"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/PresenterPlugin.tsx
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { AppGraphBuilder, PresenterSettings, ReactSurface } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { translations } from "#translations";
|
|
9
|
+
var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
10
|
+
activate: AppGraphBuilder
|
|
11
|
+
}), AppPlugin.addSettingsModule({
|
|
12
|
+
activate: PresenterSettings
|
|
13
|
+
}), AppPlugin.addSurfaceModule({
|
|
14
|
+
activate: ReactSurface
|
|
15
|
+
}), AppPlugin.addTranslationsModule({
|
|
16
|
+
translations
|
|
17
|
+
}), Plugin.make);
|
|
18
|
+
var PresenterPlugin_default = PresenterPlugin;
|
|
19
|
+
export {
|
|
20
|
+
PresenterPlugin,
|
|
21
|
+
PresenterPlugin_default as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=PresenterPlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/PresenterPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, PresenterSettings, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// TODO(burdon): Only scale markdown content.\n// TODO(burdon): Map stack content; Slide content type (e.g., markdown, sketch, IPFS image, table, etc.)\n\nexport const PresenterPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addSettingsModule({ activate: PresenterSettings }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default PresenterPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,iBAAiBC,mBAAmBC,oBAAoB;AACjE,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAKtB,IAAMC,kBAAkBP,OAAOQ,OAAOH,IAAAA,EAAMI,KACjDR,UAAUS,kBAAkB;EAAEC,UAAUT;AAAgB,CAAA,GACxDD,UAAUW,kBAAkB;EAAED,UAAUR;AAAkB,CAAA,GAC1DF,UAAUY,iBAAiB;EAAEF,UAAUP;AAAa,CAAA,GACpDH,UAAUa,sBAAsB;EAAER;AAAa,CAAA,GAC/CN,OAAOe,IAAI;AAGb,IAAA,0BAAeR;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "AppGraphBuilder", "PresenterSettings", "ReactSurface", "meta", "translations", "PresenterPlugin", "define", "pipe", "addAppGraphModule", "activate", "addSettingsModule", "addSurfaceModule", "addTranslationsModule", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/PresenterPlugin.node.ts
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { AppGraphBuilder } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
var PresenterPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
9
|
+
activate: AppGraphBuilder
|
|
10
|
+
}), Plugin.make);
|
|
11
|
+
var PresenterPlugin_node_default = PresenterPlugin;
|
|
12
|
+
export {
|
|
13
|
+
PresenterPlugin,
|
|
14
|
+
PresenterPlugin_node_default as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=PresenterPlugin.node.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/PresenterPlugin.node.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const PresenterPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n Plugin.make,\n);\n\nexport default PresenterPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,uBAAuB;AAChC,SAASC,YAAY;AAEd,IAAMC,kBAAkBJ,OAAOK,OAAOF,IAAAA,EAAMG,KACjDL,UAAUM,kBAAkB;EAAEC,UAAUN;AAAgB,CAAA,GACxDF,OAAOS,IAAI;AAGb,IAAA,+BAAeL;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "AppGraphBuilder", "meta", "PresenterPlugin", "define", "pipe", "addAppGraphModule", "activate", "make"]
|
|
7
|
+
}
|
package/dist/lib/{browser/PresenterSettings-DZO2DC53.mjs → neutral/PresenterSettings-2G4XD4QY.mjs}
RENAMED
|
@@ -2,28 +2,24 @@ import "./chunk-J5LGTIGS.mjs";
|
|
|
2
2
|
|
|
3
3
|
// src/components/PresenterSettings/PresenterSettings.tsx
|
|
4
4
|
import React from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { useTranslation } from "@dxos/react-ui";
|
|
6
6
|
import { Settings as SettingsForm } from "@dxos/react-ui-form";
|
|
7
7
|
import { meta } from "#meta";
|
|
8
|
+
import { Settings } from "#types";
|
|
8
9
|
var PresenterSettings = ({ settings, onSettingsChange }) => {
|
|
9
10
|
const { t } = useTranslation(meta.id);
|
|
10
11
|
return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
|
|
11
12
|
title: t("settings.title", {
|
|
12
13
|
ns: meta.id
|
|
13
14
|
})
|
|
14
|
-
}, /* @__PURE__ */ React.createElement(SettingsForm.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onCheckedChange: (checked) => onSettingsChange?.((s) => ({
|
|
21
|
-
...s,
|
|
22
|
-
presentCollections: !!checked
|
|
23
|
-
}))
|
|
24
|
-
}))));
|
|
15
|
+
}, /* @__PURE__ */ React.createElement(SettingsForm.FieldSet, {
|
|
16
|
+
readonly: !onSettingsChange,
|
|
17
|
+
schema: Settings.Settings,
|
|
18
|
+
values: settings,
|
|
19
|
+
onValuesChanged: (values) => onSettingsChange?.(() => values)
|
|
20
|
+
})));
|
|
25
21
|
};
|
|
26
22
|
export {
|
|
27
23
|
PresenterSettings as default
|
|
28
24
|
};
|
|
29
|
-
//# sourceMappingURL=PresenterSettings-
|
|
25
|
+
//# sourceMappingURL=PresenterSettings-2G4XD4QY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/PresenterSettings/PresenterSettings.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { Settings } from '#types';\n\nexport type PresenterSettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;\n\nexport const PresenterSettings = ({ settings, onSettingsChange }: PresenterSettingsProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.FieldSet\n readonly={!onSettingsChange}\n schema={Settings.Settings}\n values={settings}\n onValuesChanged={(values) => onSettingsChange?.(() => values)}\n />\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,YAAYC,oBAAoB;AAEzC,SAASC,YAAY;AACrB,SAASF,gBAAgB;AAIlB,IAAMG,oBAAoB,CAAC,EAAEC,UAAUC,iBAAgB,MAA0B;AACtF,QAAM,EAAEC,EAAC,IAAKP,eAAeG,KAAKK,EAAE;AAEpC,SACE,sBAAA,cAACN,aAAaO,UAAQ,MACpB,sBAAA,cAACP,aAAaQ,SAAO;IAACC,OAAOJ,EAAE,kBAAkB;MAAEK,IAAIT,KAAKK;IAAG,CAAA;KAC7D,sBAAA,cAACN,aAAaW,UAAQ;IACpBC,UAAU,CAACR;IACXS,QAAQd,SAASA;IACjBe,QAAQX;IACRY,iBAAiB,CAACD,WAAWV,mBAAmB,MAAMU,MAAAA;;AAKhE;",
|
|
6
|
+
"names": ["React", "useTranslation", "Settings", "SettingsForm", "meta", "PresenterSettings", "settings", "onSettingsChange", "t", "id", "Viewport", "Section", "title", "ns", "FieldSet", "readonly", "schema", "values", "onValuesChanged"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/app-graph-builder.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Option from "effect/Option";
|
|
6
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
7
|
+
import { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
|
|
8
|
+
import { Operation } from "@dxos/compute";
|
|
9
|
+
import { Collection, Obj } from "@dxos/echo";
|
|
10
|
+
import { DeckCapabilities, DeckOperation } from "@dxos/plugin-deck";
|
|
11
|
+
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
12
|
+
import { Markdown } from "@dxos/plugin-markdown";
|
|
13
|
+
import { linkedSegment } from "@dxos/react-ui-attention";
|
|
14
|
+
import { meta } from "#meta";
|
|
15
|
+
import { PresenterOperation } from "#types";
|
|
16
|
+
import { PresenterCapabilities } from "#types";
|
|
17
|
+
var whenPresentable = (node) => Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () => NodeMatcher.whenEchoType(Markdown.Document)(node));
|
|
18
|
+
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
19
|
+
const capabilities = yield* Capability.Service;
|
|
20
|
+
const extensions = yield* GraphBuilder.createExtension({
|
|
21
|
+
id: "root",
|
|
22
|
+
// TODO(wittjosiah): This is a hack to work around presenter previously relying on "variant". Remove.
|
|
23
|
+
match: whenPresentable,
|
|
24
|
+
connector: (object, get) => {
|
|
25
|
+
const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
|
|
26
|
+
const settings = get(settingsAtom);
|
|
27
|
+
const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
|
|
28
|
+
if (!isPresentable) {
|
|
29
|
+
return Effect.succeed([]);
|
|
30
|
+
}
|
|
31
|
+
return Effect.succeed([
|
|
32
|
+
AppNode.makeCompanion({
|
|
33
|
+
id: linkedSegment("presenter"),
|
|
34
|
+
label: "Presenter",
|
|
35
|
+
icon: "ph--presentation--regular",
|
|
36
|
+
data: {
|
|
37
|
+
type: meta.id,
|
|
38
|
+
object
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
]);
|
|
42
|
+
},
|
|
43
|
+
actions: (object, get) => {
|
|
44
|
+
const settingsAtom = capabilities.get(PresenterCapabilities.Settings);
|
|
45
|
+
const settings = get(settingsAtom);
|
|
46
|
+
const isPresentable = settings?.presentCollections ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object) : Obj.instanceOf(Markdown.Document, object);
|
|
47
|
+
const db = Obj.getDatabase(object);
|
|
48
|
+
if (!isPresentable || !db) {
|
|
49
|
+
return Effect.succeed([]);
|
|
50
|
+
}
|
|
51
|
+
const objectPath = getObjectPathFromObject(object);
|
|
52
|
+
return Effect.succeed([
|
|
53
|
+
{
|
|
54
|
+
id: PresenterOperation.TogglePresentation.meta.key,
|
|
55
|
+
// TODO(burdon): Allow function so can generate state when activated.
|
|
56
|
+
// So can set explicit fullscreen state coordinated with current presenter state.
|
|
57
|
+
data: Effect.fnUntraced(function* () {
|
|
58
|
+
const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
59
|
+
const deck = deckState.decks[deckState.activeDeck];
|
|
60
|
+
const presenterId = `${objectPath}/${linkedSegment("presenter")}`;
|
|
61
|
+
if (!deck?.fullscreen) {
|
|
62
|
+
yield* Operation.invoke(DeckOperation.Adjust, {
|
|
63
|
+
type: "solo--fullscreen",
|
|
64
|
+
id: presenterId
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
68
|
+
subject: [
|
|
69
|
+
presenterId
|
|
70
|
+
],
|
|
71
|
+
workspace: getSpacePath(db.spaceId)
|
|
72
|
+
});
|
|
73
|
+
}),
|
|
74
|
+
properties: {
|
|
75
|
+
label: [
|
|
76
|
+
"toggle-presentation.label",
|
|
77
|
+
{
|
|
78
|
+
ns: meta.id
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
icon: "ph--presentation--regular",
|
|
82
|
+
disposition: "list-item",
|
|
83
|
+
keyBinding: {
|
|
84
|
+
macos: "shift+meta+p",
|
|
85
|
+
windows: "shift+alt+p"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
93
|
+
}));
|
|
94
|
+
export {
|
|
95
|
+
app_graph_builder_default as default
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=app-graph-builder-DIEDSRPX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Collection, Obj } from '@dxos/echo';\nimport { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';\nimport { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { Markdown } from '@dxos/plugin-markdown';\nimport { linkedSegment } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\nimport { PresenterOperation } from '#types';\nimport { PresenterCapabilities } from '#types';\n\n/** Match nodes that can be presented (Collection or Document). */\nconst whenPresentable = (node: Node.Node) =>\n Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () =>\n NodeMatcher.whenEchoType(Markdown.Document)(node),\n );\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* GraphBuilder.createExtension({\n id: 'root',\n // TODO(wittjosiah): This is a hack to work around presenter previously relying on \"variant\". Remove.\n match: whenPresentable,\n connector: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n if (!isPresentable) {\n return Effect.succeed([]);\n }\n\n return Effect.succeed([\n AppNode.makeCompanion({\n id: linkedSegment('presenter'),\n label: 'Presenter',\n icon: 'ph--presentation--regular',\n data: { type: meta.id, object },\n }),\n ]);\n },\n actions: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n const db = Obj.getDatabase(object);\n if (!isPresentable || !db) {\n return Effect.succeed([]);\n }\n const objectPath = getObjectPathFromObject(object);\n\n return Effect.succeed([\n {\n id: PresenterOperation.TogglePresentation.meta.key,\n // TODO(burdon): Allow function so can generate state when activated.\n // So can set explicit fullscreen state coordinated with current presenter state.\n data: Effect.fnUntraced(function* () {\n const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = deckState.decks[deckState.activeDeck];\n const presenterId = `${objectPath}/${linkedSegment('presenter')}`;\n if (!deck?.fullscreen) {\n yield* Operation.invoke(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: presenterId,\n });\n }\n yield* Operation.invoke(LayoutOperation.Open, {\n subject: [presenterId],\n workspace: getSpacePath(db.spaceId),\n });\n }),\n properties: {\n label: ['toggle-presentation.label', { ns: meta.id }],\n icon: 'ph--presentation--regular',\n disposition: 'list-item',\n keyBinding: {\n macos: 'shift+meta+p',\n windows: 'shift+alt+p',\n },\n },\n },\n ]);\n },\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,SAASC,iBAAiBC,yBAAyBC,oBAAoB;AACjG,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,WAAW;AAChC,SAASC,kBAAkBC,qBAAqB;AAChD,SAASC,cAAyBC,mBAAmB;AACrD,SAASC,gBAAgB;AACzB,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AACrB,SAASC,0BAA0B;AACnC,SAASC,6BAA6B;AAGtC,IAAMC,kBAAkB,CAACC,SAChBC,cAAOR,YAAYS,aAAad,WAAWA,UAAU,EAAEY,IAAAA,GAAO,MACnEP,YAAYS,aAAaR,SAASS,QAAQ,EAAEH,IAAAA,CAAAA;AAGhD,IAAA,4BAAenB,WAAWuB,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOzB,WAAW0B;AAEvC,QAAMC,aAAa,OAAOhB,aAAaiB,gBAAgB;IACrDC,IAAI;;IAEJC,OAAOZ;IACPa,WAAW,CAACC,QAAQC,QAAAA;AAClB,YAAMC,eAAeT,aAAaQ,IAAIhB,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWH,IAAIC,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B9B,IAAI+B,WAAWhC,WAAWA,YAAYyB,MAAAA,KAAWxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA,IACnFxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA;AACtC,UAAI,CAACK,eAAe;AAClB,eAAcG,eAAQ,CAAA,CAAE;MAC1B;AAEA,aAAcA,eAAQ;QACpBtC,QAAQuC,cAAc;UACpBZ,IAAIf,cAAc,WAAA;UAClB4B,OAAO;UACPC,MAAM;UACNC,MAAM;YAAEC,MAAM9B,KAAKc;YAAIG;UAAO;QAChC,CAAA;OACD;IACH;IACAc,SAAS,CAACd,QAAQC,QAAAA;AAChB,YAAMC,eAAeT,aAAaQ,IAAIhB,sBAAsBkB,QAAQ;AACpE,YAAMC,WAAWH,IAAIC,YAAAA;AACrB,YAAMG,gBAAgBD,UAAUE,qBAC5B9B,IAAI+B,WAAWhC,WAAWA,YAAYyB,MAAAA,KAAWxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA,IACnFxB,IAAI+B,WAAW1B,SAASS,UAAUU,MAAAA;AACtC,YAAMe,KAAKvC,IAAIwC,YAAYhB,MAAAA;AAC3B,UAAI,CAACK,iBAAiB,CAACU,IAAI;AACzB,eAAcP,eAAQ,CAAA,CAAE;MAC1B;AACA,YAAMS,aAAa7C,wBAAwB4B,MAAAA;AAE3C,aAAcQ,eAAQ;QACpB;UACEX,IAAIb,mBAAmBkC,mBAAmBnC,KAAKoC;;;UAG/CP,MAAapB,kBAAW,aAAA;AACtB,kBAAM4B,YAAY,OAAOrD,aAAasD,aAAa5C,iBAAiB6C,KAAK;AACzE,kBAAMC,OAAOH,UAAUI,MAAMJ,UAAUK,UAAU;AACjD,kBAAMC,cAAc,GAAGT,UAAAA,IAAcnC,cAAc,WAAA,CAAA;AACnD,gBAAI,CAACyC,MAAMI,YAAY;AACrB,qBAAOrD,UAAUsD,OAAOlD,cAAcmD,QAAQ;gBAC5ChB,MAAM;gBACNhB,IAAI6B;cACN,CAAA;YACF;AACA,mBAAOpD,UAAUsD,OAAOzD,gBAAgB2D,MAAM;cAC5CC,SAAS;gBAACL;;cACVM,WAAW3D,aAAa0C,GAAGkB,OAAO;YACpC,CAAA;UACF,CAAA;UACAC,YAAY;YACVxB,OAAO;cAAC;cAA6B;gBAAEyB,IAAIpD,KAAKc;cAAG;;YACnDc,MAAM;YACNyB,aAAa;YACbC,YAAY;cACVC,OAAO;cACPC,SAAS;YACX;UACF;QACF;OACD;IACH;EACF,CAAA;AAEA,SAAOvE,WAAWwE,YAAYvE,gBAAgBwE,iBAAiB9C,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Option", "Capabilities", "Capability", "AppCapabilities", "AppNode", "LayoutOperation", "getObjectPathFromObject", "getSpacePath", "Operation", "Collection", "Obj", "DeckCapabilities", "DeckOperation", "GraphBuilder", "NodeMatcher", "Markdown", "linkedSegment", "meta", "PresenterOperation", "PresenterCapabilities", "whenPresentable", "node", "orElse", "whenEchoType", "Document", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "createExtension", "id", "match", "connector", "object", "get", "settingsAtom", "Settings", "settings", "isPresentable", "presentCollections", "instanceOf", "succeed", "makeCompanion", "label", "icon", "data", "type", "actions", "db", "getDatabase", "objectPath", "TogglePresentation", "key", "deckState", "getAtomValue", "State", "deck", "decks", "activeDeck", "presenterId", "fullscreen", "invoke", "Adjust", "Open", "subject", "workspace", "spaceId", "properties", "ns", "disposition", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/index.ts
|
|
4
|
+
import { Capability } from "@dxos/app-framework";
|
|
5
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-DIEDSRPX.mjs"));
|
|
6
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-W74KM2N3.mjs"));
|
|
7
|
+
var PresenterSettings = Capability.lazy("PresenterSettings", () => import("../settings-R6LRDAAK.mjs"));
|
|
8
|
+
export {
|
|
9
|
+
AppGraphBuilder,
|
|
10
|
+
PresenterSettings,
|
|
11
|
+
ReactSurface
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const PresenterSettings = Capability.lazy('PresenterSettings', () => import('./settings'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkB;AAEpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAME,oBAAoBJ,WAAWE,KAAK,qBAAqB,MAAM,OAAO,0BAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "AppGraphBuilder", "lazy", "ReactSurface", "PresenterSettings"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.presenter",
|
|
5
|
+
name: "Presenter",
|
|
6
|
+
description: trim`
|
|
7
|
+
Transform markdown documents into interactive presentation slideshows.
|
|
8
|
+
Navigate between slides with keyboard controls and present content in full-screen mode.
|
|
9
|
+
`,
|
|
10
|
+
icon: "ph--presentation--regular",
|
|
11
|
+
iconHue: "indigo",
|
|
12
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
meta
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-4XSSDLGN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.presenter',\n name: 'Presenter',\n description: trim`\n Transform markdown documents into interactive presentation slideshows.\n Navigate between slides with keyboard controls and present content in full-screen mode.\n `,\n icon: 'ph--presentation--regular',\n iconHue: 'indigo',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;AACV;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/types/index.ts
|
|
6
|
+
import { createContext } from "react";
|
|
7
|
+
|
|
8
|
+
// src/types/PresenterCapabilities.ts
|
|
9
|
+
var PresenterCapabilities_exports = {};
|
|
10
|
+
__export(PresenterCapabilities_exports, {
|
|
11
|
+
Settings: () => Settings
|
|
12
|
+
});
|
|
13
|
+
import { Capability } from "@dxos/app-framework";
|
|
14
|
+
import { meta } from "#meta";
|
|
15
|
+
var Settings = Capability.make(`${meta.id}.capability.settings`);
|
|
16
|
+
|
|
17
|
+
// src/types/PresenterOperation.ts
|
|
18
|
+
var PresenterOperation_exports = {};
|
|
19
|
+
__export(PresenterOperation_exports, {
|
|
20
|
+
TogglePresentation: () => TogglePresentation
|
|
21
|
+
});
|
|
22
|
+
import * as Schema from "effect/Schema";
|
|
23
|
+
import { Operation } from "@dxos/compute";
|
|
24
|
+
import { Collection } from "@dxos/echo";
|
|
25
|
+
import { Markdown } from "@dxos/plugin-markdown";
|
|
26
|
+
import { meta as meta2 } from "#meta";
|
|
27
|
+
var PRESENTER_OPERATION = `${meta2.id}.operation`;
|
|
28
|
+
var TogglePresentation = Operation.make({
|
|
29
|
+
meta: {
|
|
30
|
+
key: `${PRESENTER_OPERATION}.toggle-presentation`,
|
|
31
|
+
name: "Toggle Presentation"
|
|
32
|
+
},
|
|
33
|
+
input: Schema.Struct({
|
|
34
|
+
object: Schema.Union(Markdown.Document, Collection.Collection),
|
|
35
|
+
state: Schema.optional(Schema.Boolean)
|
|
36
|
+
}),
|
|
37
|
+
output: Schema.Void
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// src/types/Settings.ts
|
|
41
|
+
var Settings_exports = {};
|
|
42
|
+
__export(Settings_exports, {
|
|
43
|
+
Settings: () => Settings2
|
|
44
|
+
});
|
|
45
|
+
import * as Schema2 from "effect/Schema";
|
|
46
|
+
var Settings2 = Schema2.mutable(Schema2.Struct({
|
|
47
|
+
presentCollections: Schema2.optional(Schema2.Boolean.annotations({
|
|
48
|
+
title: "Present collections (experimental)",
|
|
49
|
+
description: "Enable presenting collections of documents as a slideshow."
|
|
50
|
+
}))
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
// src/types/index.ts
|
|
54
|
+
var PresenterContext = createContext({
|
|
55
|
+
running: false,
|
|
56
|
+
start: () => {
|
|
57
|
+
},
|
|
58
|
+
stop: () => {
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
PresenterCapabilities_exports,
|
|
64
|
+
PresenterOperation_exports,
|
|
65
|
+
Settings_exports,
|
|
66
|
+
PresenterContext
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=chunk-DCPA267T.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/index.ts", "../../../src/types/PresenterCapabilities.ts", "../../../src/types/PresenterOperation.ts", "../../../src/types/Settings.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\n\nexport type PresenterContextType = {\n running: boolean;\n start: () => void;\n stop: () => void;\n};\n\nexport const PresenterContext: Context<PresenterContextType> = createContext<PresenterContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport * as PresenterCapabilities from './PresenterCapabilities';\nexport * as PresenterOperation from './PresenterOperation';\nexport * as Settings from './Settings';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\n// Inline import to avoid `Settings` namespace alias colliding with the\n// `Settings` capability export below.\nexport const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\nimport { Collection } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown';\n\nimport { meta } from '#meta';\n\nconst PRESENTER_OPERATION = `${meta.id}.operation`;\n\n// TODO(wittjosiah): This appears to be unused.\nexport const TogglePresentation = Operation.make({\n meta: { key: `${PRESENTER_OPERATION}.toggle-presentation`, name: 'Toggle Presentation' },\n input: Schema.Struct({\n object: Schema.Union(Markdown.Document, 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,kBAAkB;AAC3B,SAASC,gBAAgB;AAEzB,SAASC,QAAAA,aAAY;AAErB,IAAMC,sBAAsB,GAAGD,MAAKE,EAAE;AAG/B,IAAMC,qBAAqBN,UAAUO,KAAK;EAC/CJ,MAAM;IAAEK,KAAK,GAAGJ,mBAAAA;IAA2CK,MAAM;EAAsB;EACvFC,OAAcC,cAAO;IACnBC,QAAeC,aAAMX,SAASY,UAAUb,WAAWA,UAAU;IAC7Dc,OAAcC,gBAAgBC,cAAO;EACvC,CAAA;EACAC,QAAeC;AACjB,CAAA;;;ACxBA;;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", "Markdown", "meta", "PRESENTER_OPERATION", "id", "TogglePresentation", "make", "key", "name", "input", "Struct", "object", "Union", "Document", "state", "optional", "Boolean", "output", "Void", "Settings", "Schema", "mutable", "Struct", "presentCollections", "optional", "Boolean", "annotations", "title", "description", "PresenterContext", "createContext", "running", "start", "stop"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/useExitPresenter.ts
|
|
2
|
+
import { useAtomValue } from "@effect-atom/atom-react";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
5
|
+
import { LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
|
|
6
|
+
import { Obj } from "@dxos/echo";
|
|
7
|
+
import { DeckCapabilities, DeckOperation } from "@dxos/plugin-deck";
|
|
8
|
+
var useExitPresenter = (object) => {
|
|
9
|
+
const { invokePromise } = useOperationInvoker();
|
|
10
|
+
const stateAtom = useCapability(DeckCapabilities.State);
|
|
11
|
+
const state = useAtomValue(stateAtom);
|
|
12
|
+
const deck = useMemo(() => state.decks[state.activeDeck], [
|
|
13
|
+
state.decks,
|
|
14
|
+
state.activeDeck
|
|
15
|
+
]);
|
|
16
|
+
return useCallback(() => {
|
|
17
|
+
const objectPath = getObjectPathFromObject(object);
|
|
18
|
+
const db = Obj.getDatabase(object);
|
|
19
|
+
if (deck?.fullscreen) {
|
|
20
|
+
void invokePromise(DeckOperation.Adjust, {
|
|
21
|
+
type: "solo--fullscreen",
|
|
22
|
+
id: objectPath
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return invokePromise(LayoutOperation.Open, {
|
|
26
|
+
subject: [
|
|
27
|
+
objectPath
|
|
28
|
+
],
|
|
29
|
+
workspace: db ? getSpacePath(db.spaceId) : void 0
|
|
30
|
+
});
|
|
31
|
+
}, [
|
|
32
|
+
invokePromise,
|
|
33
|
+
object,
|
|
34
|
+
deck
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
useExitPresenter
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-V323QBC3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/useExitPresenter.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useMemo } from 'react';\n\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';\nimport { Obj } from '@dxos/echo';\nimport { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';\n\nexport const useExitPresenter = (object: any) => {\n const { invokePromise } = useOperationInvoker();\n const stateAtom = useCapability(DeckCapabilities.State);\n const state = useAtomValue(stateAtom);\n\n // Compute deck from decks[activeDeck] since the getter doesn't survive spread operations.\n const deck = useMemo(() => state.decks[state.activeDeck], [state.decks, state.activeDeck]);\n\n return useCallback(() => {\n const objectPath = getObjectPathFromObject(object);\n const db = Obj.getDatabase(object);\n if (deck?.fullscreen) {\n void invokePromise(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: objectPath,\n });\n }\n\n return invokePromise(LayoutOperation.Open, {\n subject: [objectPath],\n workspace: db ? getSpacePath(db.spaceId) : undefined,\n });\n }, [invokePromise, object, deck]);\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,oBAAoB;AAC7B,SAASC,aAAaC,eAAe;AAErC,SAASC,eAAeC,2BAA2B;AACnD,SAASC,iBAAiBC,yBAAyBC,oBAAoB;AACvE,SAASC,WAAW;AACpB,SAASC,kBAAkBC,qBAAqB;AAEzC,IAAMC,mBAAmB,CAACC,WAAAA;AAC/B,QAAM,EAAEC,cAAa,IAAKT,oBAAAA;AAC1B,QAAMU,YAAYX,cAAcM,iBAAiBM,KAAK;AACtD,QAAMC,QAAQhB,aAAac,SAAAA;AAG3B,QAAMG,OAAOf,QAAQ,MAAMc,MAAME,MAAMF,MAAMG,UAAU,GAAG;IAACH,MAAME;IAAOF,MAAMG;GAAW;AAEzF,SAAOlB,YAAY,MAAA;AACjB,UAAMmB,aAAad,wBAAwBM,MAAAA;AAC3C,UAAMS,KAAKb,IAAIc,YAAYV,MAAAA;AAC3B,QAAIK,MAAMM,YAAY;AACpB,WAAKV,cAAcH,cAAcc,QAAQ;QACvCC,MAAM;QACNC,IAAIN;MACN,CAAA;IACF;AAEA,WAAOP,cAAcR,gBAAgBsB,MAAM;MACzCC,SAAS;QAACR;;MACVS,WAAWR,KAAKd,aAAac,GAAGS,OAAO,IAAIC;IAC7C,CAAA;EACF,GAAG;IAAClB;IAAeD;IAAQK;GAAK;AAClC;",
|
|
6
|
+
"names": ["useAtomValue", "useCallback", "useMemo", "useCapability", "useOperationInvoker", "LayoutOperation", "getObjectPathFromObject", "getSpacePath", "Obj", "DeckCapabilities", "DeckOperation", "useExitPresenter", "object", "invokePromise", "stateAtom", "State", "state", "deck", "decks", "activeDeck", "objectPath", "db", "getDatabase", "fullscreen", "Adjust", "type", "id", "Open", "subject", "workspace", "spaceId", "undefined"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
2
|
|
|
3
3
|
// src/components/index.ts
|
|
4
4
|
import { lazy } from "react";
|
|
@@ -458,7 +458,6 @@ var RevealPlayer = composable2(({ content, slide, fullscreen = true, onExit, chi
|
|
|
458
458
|
}),
|
|
459
459
|
ref: forwardedRef
|
|
460
460
|
}, /* @__PURE__ */ React5.createElement("div", {
|
|
461
|
-
role: "none",
|
|
462
461
|
className: "relative aspect-video h-full w-full h-auto max-h-full overflow-hidden"
|
|
463
462
|
}, /* @__PURE__ */ React5.createElement("div", {
|
|
464
463
|
ref: deckDivRef,
|
|
@@ -489,64 +488,15 @@ var RevealPlayer = composable2(({ content, slide, fullscreen = true, onExit, chi
|
|
|
489
488
|
});
|
|
490
489
|
|
|
491
490
|
// src/components/index.ts
|
|
492
|
-
var PresenterSettings = lazy(() => import("
|
|
493
|
-
|
|
494
|
-
// src/meta.ts
|
|
495
|
-
import { trim } from "@dxos/util";
|
|
496
|
-
var meta = {
|
|
497
|
-
id: "org.dxos.plugin.presenter",
|
|
498
|
-
name: "Presenter",
|
|
499
|
-
description: trim`
|
|
500
|
-
Transform markdown documents into interactive presentation slideshows.
|
|
501
|
-
Navigate between slides with keyboard controls and present content in full-screen mode.
|
|
502
|
-
`,
|
|
503
|
-
icon: "ph--presentation--regular",
|
|
504
|
-
iconHue: "indigo",
|
|
505
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter"
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
// src/PresenterPlugin.tsx
|
|
509
|
-
import { Plugin } from "@dxos/app-framework";
|
|
510
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
511
|
-
import { AppGraphBuilder, PresenterSettings as PresenterSettings2, ReactSurface } from "#capabilities";
|
|
512
|
-
import { meta as meta3 } from "#meta";
|
|
513
|
-
|
|
514
|
-
// src/translations.ts
|
|
515
|
-
import { meta as meta2 } from "#meta";
|
|
516
|
-
var translations = [
|
|
517
|
-
{
|
|
518
|
-
"en-US": {
|
|
519
|
-
[meta2.id]: {
|
|
520
|
-
"plugin.name": "Presenter",
|
|
521
|
-
"settings.title": "Presenter settings",
|
|
522
|
-
"toggle-presentation.label": "Present",
|
|
523
|
-
"present-collections.label": "Present collections (experimental)",
|
|
524
|
-
"present-collections.description": "Enable presenting collections of documents as a slideshow."
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
];
|
|
529
|
-
|
|
530
|
-
// src/PresenterPlugin.tsx
|
|
531
|
-
var PresenterPlugin = Plugin.define(meta3).pipe(AppPlugin.addAppGraphModule({
|
|
532
|
-
activate: AppGraphBuilder
|
|
533
|
-
}), AppPlugin.addSettingsModule({
|
|
534
|
-
activate: PresenterSettings2
|
|
535
|
-
}), AppPlugin.addSurfaceModule({
|
|
536
|
-
activate: ReactSurface
|
|
537
|
-
}), AppPlugin.addTranslationsModule({
|
|
538
|
-
translations
|
|
539
|
-
}), Plugin.make);
|
|
491
|
+
var PresenterSettings = lazy(() => import("../PresenterSettings-2G4XD4QY.mjs"));
|
|
540
492
|
export {
|
|
541
493
|
Layout,
|
|
542
494
|
PageNumber,
|
|
543
495
|
Pager,
|
|
544
496
|
Panel,
|
|
545
|
-
PresenterPlugin,
|
|
546
497
|
PresenterSettings,
|
|
547
498
|
RevealPlayer,
|
|
548
499
|
Slide,
|
|
549
|
-
StartButton
|
|
550
|
-
meta
|
|
500
|
+
StartButton
|
|
551
501
|
};
|
|
552
502
|
//# sourceMappingURL=index.mjs.map
|