@dxos/plugin-presenter 0.8.4-main.ead640a → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.mjs +46 -0
- package/dist/lib/neutral/CollectionPresenterArticle-DFREOQTG.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/neutral/PresenterPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/PresenterPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/PresenterSettings-2G4XD4QY.mjs +25 -0
- 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-4GHQURBD.mjs +69 -0
- package/dist/lib/neutral/chunk-4GHQURBD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MTSRLGYN.mjs +36 -0
- package/dist/lib/neutral/chunk-MTSRLGYN.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/neutral/components/index.mjs +502 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- 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-DIDVKI5N.mjs +54 -0
- package/dist/lib/neutral/react-surface-DIDVKI5N.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 +3 -1
- 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/PresenterPlugin.workerd.d.ts +4 -0
- package/dist/types/src/PresenterPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +4 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Panel.d.ts +8 -0
- package/dist/types/src/components/Markdown/Panel.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/{Container.stories.d.ts → Panel.stories.d.ts} +1 -1
- package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/Slide.d.ts +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/index.d.ts +1 -1
- package/dist/types/src/components/Markdown/index.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 +5 -5
- package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.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 +6 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.d.ts.map +1 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts +23 -0
- package/dist/types/src/components/PresenterSettings/PresenterSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/PresenterSettings/index.d.ts +2 -0
- package/dist/types/src/components/PresenterSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts +5 -4
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +7 -6
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -27
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts +6 -0
- package/dist/types/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CollectionPresenterArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts +6 -0
- package/dist/types/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DocumentPresenterContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts +8 -0
- package/dist/types/src/containers/MarkdownSlide/MarkdownSlide.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownSlide/index.d.ts +2 -0
- package/dist/types/src/containers/MarkdownSlide/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.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 -6
- 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/types/PresenterOperation.d.ts +17 -0
- package/dist/types/src/types/PresenterOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +11 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/useExitPresenter.d.ts +3 -4
- package/dist/types/src/useExitPresenter.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +103 -42
- package/src/PresenterPlugin.node.ts +16 -0
- package/src/PresenterPlugin.test.ts +23 -0
- package/src/PresenterPlugin.tsx +14 -26
- package/src/PresenterPlugin.workerd.ts +11 -0
- package/src/capabilities/app-graph-builder.ts +92 -103
- package/src/capabilities/index.ts +4 -4
- package/src/capabilities/react-surface.tsx +59 -55
- package/src/capabilities/settings.ts +24 -12
- package/src/components/Markdown/{Container.stories.tsx → Panel.stories.tsx} +7 -7
- package/src/components/Markdown/{Container.tsx → Panel.tsx} +6 -6
- package/src/components/Markdown/Slide.stories.tsx +4 -4
- package/src/components/Markdown/Slide.tsx +2 -2
- package/src/components/Markdown/index.ts +1 -1
- package/src/components/Markdown/theme.ts +5 -5
- package/src/components/Presenter/Layout.tsx +24 -23
- package/src/components/Presenter/Pager.stories.tsx +2 -2
- package/src/components/Presenter/Pager.tsx +53 -18
- package/src/components/PresenterSettings/PresenterSettings.stories.tsx +32 -0
- package/src/components/PresenterSettings/PresenterSettings.tsx +31 -0
- package/src/components/PresenterSettings/index.ts +5 -0
- package/src/components/RevealPlayer/RevealPlayer.stories.tsx +5 -5
- package/src/components/RevealPlayer/RevealPlayer.tsx +104 -95
- package/src/components/index.ts +5 -5
- package/src/containers/CollectionPresenterArticle/CollectionPresenterArticle.tsx +50 -0
- package/src/containers/CollectionPresenterArticle/index.ts +5 -0
- package/src/containers/DocumentPresenterContainer/DocumentPresenterContainer.tsx +24 -0
- package/src/containers/DocumentPresenterContainer/index.ts +5 -0
- package/src/containers/MarkdownSlide/MarkdownSlide.tsx +26 -0
- package/src/containers/MarkdownSlide/index.ts +5 -0
- package/src/containers/index.ts +9 -0
- package/src/index.ts +1 -3
- package/src/meta.ts +27 -4
- package/src/plugin.ts +9 -0
- package/src/testing.ts +6 -6
- package/src/translations.ts +4 -5
- package/src/types/PresenterCapabilities.ts +15 -0
- package/src/types/PresenterOperation.ts +29 -0
- package/src/types/Settings.ts +20 -0
- package/src/types/index.ts +21 -0
- package/src/useExitPresenter.ts +26 -25
- package/dist/lib/browser/CollectionPresenterContainer-LPJILYRF.mjs +0 -191
- package/dist/lib/browser/CollectionPresenterContainer-LPJILYRF.mjs.map +0 -7
- package/dist/lib/browser/DocumentPresenterContainer-F42V4KAL.mjs +0 -183
- package/dist/lib/browser/DocumentPresenterContainer-F42V4KAL.mjs.map +0 -7
- package/dist/lib/browser/MarkdownSlide-BLVWTH3U.mjs +0 -223
- package/dist/lib/browser/MarkdownSlide-BLVWTH3U.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2PY2HRAX.mjs +0 -106
- package/dist/lib/browser/app-graph-builder-2PY2HRAX.mjs.map +0 -7
- package/dist/lib/browser/chunk-6ZM323ED.mjs +0 -13
- package/dist/lib/browser/chunk-6ZM323ED.mjs.map +0 -7
- package/dist/lib/browser/chunk-7DV6S5XB.mjs +0 -39
- package/dist/lib/browser/chunk-7DV6S5XB.mjs.map +0 -7
- package/dist/lib/browser/chunk-QTSOWA2K.mjs +0 -41
- package/dist/lib/browser/chunk-QTSOWA2K.mjs.map +0 -7
- package/dist/lib/browser/chunk-UVGTHJUO.mjs +0 -36
- package/dist/lib/browser/chunk-UVGTHJUO.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -65
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-P7YJFHF3.mjs +0 -57
- package/dist/lib/browser/react-surface-P7YJFHF3.mjs.map +0 -7
- package/dist/lib/browser/settings-7A4A2H6X.mjs +0 -22
- package/dist/lib/browser/settings-7A4A2H6X.mjs.map +0 -7
- package/dist/types/src/components/CollectionPresenterContainer.d.ts +0 -7
- package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +0 -1
- package/dist/types/src/components/DocumentPresenterContainer.d.ts +0 -7
- package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +0 -1
- package/dist/types/src/components/Markdown/Container.d.ts +0 -8
- package/dist/types/src/components/Markdown/Container.d.ts.map +0 -1
- package/dist/types/src/components/Markdown/Container.stories.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownSlide.d.ts +0 -7
- package/dist/types/src/components/MarkdownSlide.d.ts.map +0 -1
- package/dist/types/src/components/PresenterSettings.d.ts +0 -6
- package/dist/types/src/components/PresenterSettings.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -40
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/CollectionPresenterContainer.tsx +0 -44
- package/src/components/DocumentPresenterContainer.tsx +0 -23
- package/src/components/MarkdownSlide.tsx +0 -24
- package/src/components/PresenterSettings.tsx +0 -30
- package/src/types.ts +0 -46
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.presenter",
|
|
5
|
+
name: "Presenter",
|
|
6
|
+
author: "DXOS",
|
|
7
|
+
description: trim`
|
|
8
|
+
Transform existing workspace objects into interactive presentation slideshows without
|
|
9
|
+
duplicating content. Markdown documents are split into slides on horizontal \`---\`
|
|
10
|
+
separators and rendered with Reveal.js, giving authors a familiar authoring surface
|
|
11
|
+
with full Markdown syntax. Collections can optionally be presented slide-by-slide,
|
|
12
|
+
with each member object rendered by its own plugin surface.
|
|
13
|
+
|
|
14
|
+
Activate presentation mode for any supported object via the action menu or the
|
|
15
|
+
Shift+Cmd+P (macOS) / Shift+Alt+P (Windows/Linux) keyboard shortcut. The presenter
|
|
16
|
+
opens in a solo fullscreen layout managed by the Deck plugin, keeping the rest of the
|
|
17
|
+
workspace undisturbed.
|
|
18
|
+
|
|
19
|
+
Navigation controls and a page-number indicator are shown during collection
|
|
20
|
+
slideshows. Pressing Escape exits fullscreen and returns to the originating document
|
|
21
|
+
or collection view. All navigation is keyboard-accessible.
|
|
22
|
+
|
|
23
|
+
Collaboration is inherent: because slides are backed by live ECHO objects, edits made
|
|
24
|
+
by any peer in the workspace are immediately reflected in an open presentation without
|
|
25
|
+
any manual refresh.
|
|
26
|
+
`,
|
|
27
|
+
icon: "ph--presentation--regular",
|
|
28
|
+
iconHue: "indigo",
|
|
29
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter",
|
|
30
|
+
spec: "PLUGIN.mdl"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
meta
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=chunk-MTSRLGYN.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 author: 'DXOS',\n description: trim`\n Transform existing workspace objects into interactive presentation slideshows without\n duplicating content. Markdown documents are split into slides on horizontal \\`---\\`\n separators and rendered with Reveal.js, giving authors a familiar authoring surface\n with full Markdown syntax. Collections can optionally be presented slide-by-slide,\n with each member object rendered by its own plugin surface.\n\n Activate presentation mode for any supported object via the action menu or the\n Shift+Cmd+P (macOS) / Shift+Alt+P (Windows/Linux) keyboard shortcut. The presenter\n opens in a solo fullscreen layout managed by the Deck plugin, keeping the rest of the\n workspace undisturbed.\n\n Navigation controls and a page-number indicator are shown during collection\n slideshows. Pressing Escape exits fullscreen and returns to the originating document\n or collection view. All navigation is keyboard-accessible.\n\n Collaboration is inherent: because slides are backed by live ECHO objects, edits made\n by any peer in the workspace are immediately reflected in an open presentation without\n any manual refresh.\n `,\n icon: 'ph--presentation--regular',\n iconHue: 'indigo',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n spec: 'PLUGIN.mdl',\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,QAAQ;EACRC,aAAaL;;;;;;;;;;;;;;;;;;;;EAoBbM,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;AACR;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "author", "description", "icon", "iconHue", "source", "spec"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/useExitPresenter.ts
|
|
2
|
+
import { useAtomValue } from "@effect-atom/atom-react";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
5
|
+
import { LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
|
|
6
|
+
import { Obj } from "@dxos/echo";
|
|
7
|
+
import { DeckCapabilities, DeckOperation } from "@dxos/plugin-deck";
|
|
8
|
+
var useExitPresenter = (object) => {
|
|
9
|
+
const { invokePromise } = useOperationInvoker();
|
|
10
|
+
const stateAtom = useCapability(DeckCapabilities.State);
|
|
11
|
+
const state = useAtomValue(stateAtom);
|
|
12
|
+
const deck = useMemo(() => state.decks[state.activeDeck], [
|
|
13
|
+
state.decks,
|
|
14
|
+
state.activeDeck
|
|
15
|
+
]);
|
|
16
|
+
return useCallback(() => {
|
|
17
|
+
const objectPath = getObjectPathFromObject(object);
|
|
18
|
+
const db = Obj.getDatabase(object);
|
|
19
|
+
if (deck?.fullscreen) {
|
|
20
|
+
void invokePromise(DeckOperation.Adjust, {
|
|
21
|
+
type: "solo--fullscreen",
|
|
22
|
+
id: objectPath
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return invokePromise(LayoutOperation.Open, {
|
|
26
|
+
subject: [
|
|
27
|
+
objectPath
|
|
28
|
+
],
|
|
29
|
+
workspace: db ? getSpacePath(db.spaceId) : void 0
|
|
30
|
+
});
|
|
31
|
+
}, [
|
|
32
|
+
invokePromise,
|
|
33
|
+
object,
|
|
34
|
+
deck
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
useExitPresenter
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-V323QBC3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/useExitPresenter.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useMemo } from 'react';\n\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation, getObjectPathFromObject, getSpacePath } from '@dxos/app-toolkit';\nimport { Obj } from '@dxos/echo';\nimport { DeckCapabilities, DeckOperation } from '@dxos/plugin-deck';\n\nexport const useExitPresenter = (object: any) => {\n const { invokePromise } = useOperationInvoker();\n const stateAtom = useCapability(DeckCapabilities.State);\n const state = useAtomValue(stateAtom);\n\n // Compute deck from decks[activeDeck] since the getter doesn't survive spread operations.\n const deck = useMemo(() => state.decks[state.activeDeck], [state.decks, state.activeDeck]);\n\n return useCallback(() => {\n const objectPath = getObjectPathFromObject(object);\n const db = Obj.getDatabase(object);\n if (deck?.fullscreen) {\n void invokePromise(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: objectPath,\n });\n }\n\n return invokePromise(LayoutOperation.Open, {\n subject: [objectPath],\n workspace: db ? getSpacePath(db.spaceId) : undefined,\n });\n }, [invokePromise, object, deck]);\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,oBAAoB;AAC7B,SAASC,aAAaC,eAAe;AAErC,SAASC,eAAeC,2BAA2B;AACnD,SAASC,iBAAiBC,yBAAyBC,oBAAoB;AACvE,SAASC,WAAW;AACpB,SAASC,kBAAkBC,qBAAqB;AAEzC,IAAMC,mBAAmB,CAACC,WAAAA;AAC/B,QAAM,EAAEC,cAAa,IAAKT,oBAAAA;AAC1B,QAAMU,YAAYX,cAAcM,iBAAiBM,KAAK;AACtD,QAAMC,QAAQhB,aAAac,SAAAA;AAG3B,QAAMG,OAAOf,QAAQ,MAAMc,MAAME,MAAMF,MAAMG,UAAU,GAAG;IAACH,MAAME;IAAOF,MAAMG;GAAW;AAEzF,SAAOlB,YAAY,MAAA;AACjB,UAAMmB,aAAad,wBAAwBM,MAAAA;AAC3C,UAAMS,KAAKb,IAAIc,YAAYV,MAAAA;AAC3B,QAAIK,MAAMM,YAAY;AACpB,WAAKV,cAAcH,cAAcc,QAAQ;QACvCC,MAAM;QACNC,IAAIN;MACN,CAAA;IACF;AAEA,WAAOP,cAAcR,gBAAgBsB,MAAM;MACzCC,SAAS;QAACR;;MACVS,WAAWR,KAAKd,aAAac,GAAGS,OAAO,IAAIC;IAC7C,CAAA;EACF,GAAG;IAAClB;IAAeD;IAAQK;GAAK;AAClC;",
|
|
6
|
+
"names": ["useAtomValue", "useCallback", "useMemo", "useCapability", "useOperationInvoker", "LayoutOperation", "getObjectPathFromObject", "getSpacePath", "Obj", "DeckCapabilities", "DeckOperation", "useExitPresenter", "object", "invokePromise", "stateAtom", "State", "state", "deck", "decks", "activeDeck", "objectPath", "db", "getDatabase", "fullscreen", "Adjust", "type", "id", "Open", "subject", "workspace", "spaceId", "undefined"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/components/index.ts
|
|
4
|
+
import { lazy } from "react";
|
|
5
|
+
|
|
6
|
+
// src/components/Markdown/Panel.tsx
|
|
7
|
+
import React, { useState } from "react";
|
|
8
|
+
import { useResizeDetector } from "react-resize-detector";
|
|
9
|
+
import { mx } from "@dxos/ui-theme";
|
|
10
|
+
var Panel = ({ children, classNames }) => {
|
|
11
|
+
const [props, setProps] = useState({});
|
|
12
|
+
const { ref: containerRef, width, height } = useResizeDetector({
|
|
13
|
+
refreshMode: "debounce",
|
|
14
|
+
refreshRate: 200,
|
|
15
|
+
refreshOptions: {
|
|
16
|
+
leading: true
|
|
17
|
+
},
|
|
18
|
+
onResize: ({ width: width2, height: height2 }) => {
|
|
19
|
+
if (width2 && height2) {
|
|
20
|
+
setProps(createLayoutProps({
|
|
21
|
+
width: width2,
|
|
22
|
+
height: height2
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
28
|
+
ref: containerRef,
|
|
29
|
+
className: mx("flex grow relative overflow-hidden bg-attention-surface", classNames)
|
|
30
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
31
|
+
className: mx("dx-container absolute"),
|
|
32
|
+
style: props
|
|
33
|
+
}, width && height && children));
|
|
34
|
+
};
|
|
35
|
+
var createLayoutProps = ({ width, height }) => {
|
|
36
|
+
const aspectRatio = 16 / 9;
|
|
37
|
+
const nominalWidth = 2560;
|
|
38
|
+
const nominalHeight = nominalWidth / aspectRatio;
|
|
39
|
+
const scale = Math.min(width / nominalWidth, height / nominalHeight);
|
|
40
|
+
return {
|
|
41
|
+
left: (width - nominalWidth) / 2,
|
|
42
|
+
top: (height - nominalHeight) / 2,
|
|
43
|
+
width: nominalWidth,
|
|
44
|
+
height: nominalHeight,
|
|
45
|
+
transform: `scale(${scale})`
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/components/Markdown/Slide.tsx
|
|
50
|
+
import "highlight.js/styles/github.css";
|
|
51
|
+
import { h } from "hastscript";
|
|
52
|
+
import React2 from "react";
|
|
53
|
+
import ReactMarkdown from "react-markdown";
|
|
54
|
+
import rehypeAddClasses from "rehype-add-classes";
|
|
55
|
+
import rehypeHighlight from "rehype-highlight";
|
|
56
|
+
import remarkFrontmatter from "remark-frontmatter";
|
|
57
|
+
import remarkParseFrontmatter from "remark-parse-frontmatter";
|
|
58
|
+
|
|
59
|
+
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-presenter/src/components/Markdown/styles.css?raw
|
|
60
|
+
var styles_default = "/*!\n Theme: GitHub Dark\n Description: Dark theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n Outdated base version: https://github.com/primer/github-syntax-dark\n Current colors taken from GitHub's CSS\n*/\n/* TODO(burdon): Use tokens. */\n.dark pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em;\n}\n.dark code.hljs {\n padding: 3px 5px;\n}\n.dark .hljs {\n color: #c9d1d9;\n background: #0d1117;\n}\n.dark .hljs-doctag,\n.dark .hljs-keyword,\n.dark .hljs-meta .hljs-keyword,\n.dark .hljs-template-tag,\n.dark .hljs-template-variable,\n.dark .hljs-type,\n.dark .hljs-variable.language_ {\n color: #ff7b72;\n}\n.dark .hljs-title,\n.dark .hljs-title.class_,\n.dark .hljs-title.class_.inherited__,\n.dark .hljs-title.function_ {\n color: #d2a8ff;\n}\n.dark .hljs-attr,\n.dark .hljs-attribute,\n.dark .hljs-literal,\n.dark .hljs-meta,\n.dark .hljs-number,\n.dark .hljs-operator,\n.dark .hljs-variable,\n.dark .hljs-selector-attr,\n.dark .hljs-selector-class,\n.dark .hljs-selector-id {\n color: #79c0ff;\n}\n.dark .hljs-regexp,\n.dark .hljs-string,\n.dark .hljs-meta .hljs-string {\n color: #a5d6ff;\n}\n.dark .hljs-built_in,\n.dark .hljs-symbol {\n color: #ffa657;\n}\n.dark .hljs-comment,\n.dark .hljs-code,\n.dark .hljs-formula {\n color: #8b949e;\n}\n.dark .hljs-name,\n.dark .hljs-quote,\n.dark .hljs-selector-tag,\n.dark .hljs-selector-pseudo {\n color: #7ee787;\n}\n.dark .hljs-subst {\n color: #c9d1d9;\n}\n.dark .hljs-section {\n color: #1f6feb;\n font-weight: bold;\n}\n.dark .hljs-bullet {\n color: #f2cc60;\n}\n.dark .hljs-emphasis {\n color: #c9d1d9;\n font-style: italic;\n}\n.dark .hljs-strong {\n color: #c9d1d9;\n font-weight: bold;\n}\n.dark .hljs-addition {\n color: #aff5b4;\n background-color: #033a16;\n}\n.dark .hljs-deletion {\n color: #ffdcd7;\n background-color: #67060c;\n}\n.dark .hljs-char.escape_,\n.dark .hljs-link,\n.dark .hljs-params,\n.dark .hljs-property,\n.dark .hljs-punctuation,\n.dark .hljs-tag {\n /* purposely ignored */\n all: unset;\n}\n";
|
|
61
|
+
|
|
62
|
+
// src/components/Markdown/theme.ts
|
|
63
|
+
var theme = {
|
|
64
|
+
root: "bg-attention-surface leading-relaxed font-mono",
|
|
65
|
+
padding: "px-40 py-16 gap-8",
|
|
66
|
+
nodes: {
|
|
67
|
+
h1: "text-[80px] text-accent-text",
|
|
68
|
+
h2: "text-[60px] text-accent-text",
|
|
69
|
+
h3: "text-[48px] text-accent-text",
|
|
70
|
+
p: "text-[48px]",
|
|
71
|
+
ul: "my-[16px] ml-12 leading-relaxed list-disc",
|
|
72
|
+
ol: "my-[16px] ml-24 leading-relaxed list-decimal",
|
|
73
|
+
li: "pl-6 text-[48px]",
|
|
74
|
+
pre: "w-full mx-0 my-[32px] p-4 bg-input-surface",
|
|
75
|
+
code: "p-0 text-[40px]"
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/components/Markdown/Slide.tsx
|
|
80
|
+
var Slide = ({ content = "", classes = theme.nodes }) => {
|
|
81
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("style", null, styles_default), /* @__PURE__ */ React2.createElement(ReactMarkdown, {
|
|
82
|
+
components,
|
|
83
|
+
// Markdown to HTML.
|
|
84
|
+
remarkPlugins: [
|
|
85
|
+
[
|
|
86
|
+
remarkFrontmatter,
|
|
87
|
+
"yaml"
|
|
88
|
+
],
|
|
89
|
+
remarkParseFrontmatter
|
|
90
|
+
],
|
|
91
|
+
// HTML processing.
|
|
92
|
+
rehypePlugins: [
|
|
93
|
+
[
|
|
94
|
+
rehypeAddClasses,
|
|
95
|
+
classes
|
|
96
|
+
],
|
|
97
|
+
rehypeHighlight,
|
|
98
|
+
slideLayout
|
|
99
|
+
]
|
|
100
|
+
}, content));
|
|
101
|
+
};
|
|
102
|
+
var slideLayout = (_options = {}) => (tree, file) => {
|
|
103
|
+
const { data: { frontmatter = {} } } = file;
|
|
104
|
+
let content = tree.children;
|
|
105
|
+
const { layout, image } = frontmatter;
|
|
106
|
+
if (image) {
|
|
107
|
+
const img = h("div", {
|
|
108
|
+
class: "flex grow shrink-0 bg-cover bg-center bg-no-repeat",
|
|
109
|
+
style: {
|
|
110
|
+
backgroundImage: `url(${image})`
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
switch (layout) {
|
|
114
|
+
case "fullscreen": {
|
|
115
|
+
content = img;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case "columns": {
|
|
119
|
+
content = h("div", {
|
|
120
|
+
class: "flex grow grid grid-cols-2"
|
|
121
|
+
}, [
|
|
122
|
+
h("div", {
|
|
123
|
+
class: theme.padding
|
|
124
|
+
}, [
|
|
125
|
+
content
|
|
126
|
+
]),
|
|
127
|
+
img
|
|
128
|
+
]);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case "rows": {
|
|
132
|
+
content = h("div", {
|
|
133
|
+
class: "flex grow flex-col"
|
|
134
|
+
}, [
|
|
135
|
+
h("div", {
|
|
136
|
+
class: theme.padding
|
|
137
|
+
}, [
|
|
138
|
+
content
|
|
139
|
+
]),
|
|
140
|
+
h("div", {
|
|
141
|
+
class: [
|
|
142
|
+
"flex grow pt-0",
|
|
143
|
+
theme.padding
|
|
144
|
+
]
|
|
145
|
+
}, [
|
|
146
|
+
img
|
|
147
|
+
])
|
|
148
|
+
]);
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
content = h("div", {
|
|
154
|
+
class: [
|
|
155
|
+
"flex grow flex-col",
|
|
156
|
+
theme.padding
|
|
157
|
+
]
|
|
158
|
+
}, [
|
|
159
|
+
content
|
|
160
|
+
]);
|
|
161
|
+
}
|
|
162
|
+
const root = h("div", {
|
|
163
|
+
class: [
|
|
164
|
+
"flex flex-col grow",
|
|
165
|
+
theme.root
|
|
166
|
+
]
|
|
167
|
+
}, [
|
|
168
|
+
content
|
|
169
|
+
]);
|
|
170
|
+
tree.children = [
|
|
171
|
+
root
|
|
172
|
+
];
|
|
173
|
+
};
|
|
174
|
+
var ImageWrapper = ({ node: _, ...props }) => {
|
|
175
|
+
const { alt = "", src } = props;
|
|
176
|
+
return /* @__PURE__ */ React2.createElement("img", {
|
|
177
|
+
alt,
|
|
178
|
+
src
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
var components = {
|
|
182
|
+
img: ({ node, ...props }) => /* @__PURE__ */ React2.createElement(ImageWrapper, {
|
|
183
|
+
node,
|
|
184
|
+
...props
|
|
185
|
+
})
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// src/components/Presenter/Layout.tsx
|
|
189
|
+
import React3 from "react";
|
|
190
|
+
import { composable, composableProps } from "@dxos/react-ui";
|
|
191
|
+
var Layout = composable(({ children, topLeft, topRight, bottomLeft, bottomRight, ...props }, forwardedRef) => {
|
|
192
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
193
|
+
...composableProps(props, {
|
|
194
|
+
classNames: "flex grow relative overflow-hidden bg-attention-surface"
|
|
195
|
+
}),
|
|
196
|
+
ref: forwardedRef
|
|
197
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
198
|
+
className: "flex flex-col grow overflow-hidden"
|
|
199
|
+
}, children), /* @__PURE__ */ React3.createElement("div", {
|
|
200
|
+
className: "z-[200]"
|
|
201
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
202
|
+
className: "absolute top-4 left-4"
|
|
203
|
+
}, topLeft), /* @__PURE__ */ React3.createElement("div", {
|
|
204
|
+
className: "absolute top-4 right-4"
|
|
205
|
+
}, topRight), /* @__PURE__ */ React3.createElement("div", {
|
|
206
|
+
className: "absolute bottom-4 left-4"
|
|
207
|
+
}, bottomLeft), /* @__PURE__ */ React3.createElement("div", {
|
|
208
|
+
className: "absolute bottom-4 right-4"
|
|
209
|
+
}, bottomRight)));
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// src/components/Presenter/Pager.tsx
|
|
213
|
+
import React4, { useEffect } from "react";
|
|
214
|
+
import { IconButton, useControlledState } from "@dxos/react-ui";
|
|
215
|
+
var Pager = ({ index: indexProp = 0, count = 0, keys, onChange, onExit }) => {
|
|
216
|
+
const [index, setIndex] = useControlledState(indexProp);
|
|
217
|
+
useEffect(() => {
|
|
218
|
+
onChange?.(index);
|
|
219
|
+
}, [
|
|
220
|
+
index
|
|
221
|
+
]);
|
|
222
|
+
const handleChangeIndex = (dir) => {
|
|
223
|
+
setIndex((index2) => {
|
|
224
|
+
const next = index2 + dir;
|
|
225
|
+
return next >= 0 && next < count ? next : index2;
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
if (!keys) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const keydownHandler = (event) => {
|
|
233
|
+
switch (event.key) {
|
|
234
|
+
case "Escape": {
|
|
235
|
+
onExit?.();
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
case "ArrowLeft": {
|
|
239
|
+
if (event.shiftKey) {
|
|
240
|
+
onChange?.(0);
|
|
241
|
+
} else {
|
|
242
|
+
handleChangeIndex(-1);
|
|
243
|
+
}
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
case "ArrowRight": {
|
|
247
|
+
if (event.shiftKey) {
|
|
248
|
+
onChange?.(count - 1);
|
|
249
|
+
} else {
|
|
250
|
+
handleChangeIndex(1);
|
|
251
|
+
}
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case "ArrowUp": {
|
|
255
|
+
onChange?.(0);
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
case "ArrowDown": {
|
|
259
|
+
onChange?.(count - 1);
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
window.addEventListener("keydown", keydownHandler);
|
|
265
|
+
return () => window.removeEventListener("keydown", keydownHandler);
|
|
266
|
+
}, [
|
|
267
|
+
keys,
|
|
268
|
+
count
|
|
269
|
+
]);
|
|
270
|
+
if (index === void 0 || !count) {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
274
|
+
className: "flex items-center text-neutral-500"
|
|
275
|
+
}, /* @__PURE__ */ React4.createElement(IconButton, {
|
|
276
|
+
icon: "ph--caret-double-left--regular",
|
|
277
|
+
size: 6,
|
|
278
|
+
label: "Jump to first",
|
|
279
|
+
iconOnly: true,
|
|
280
|
+
noTooltip: true,
|
|
281
|
+
variant: "ghost",
|
|
282
|
+
classNames: "p-0",
|
|
283
|
+
onClick: () => onChange?.(0)
|
|
284
|
+
}), /* @__PURE__ */ React4.createElement(IconButton, {
|
|
285
|
+
icon: "ph--caret-left--regular",
|
|
286
|
+
size: 6,
|
|
287
|
+
label: "Previous",
|
|
288
|
+
iconOnly: true,
|
|
289
|
+
noTooltip: true,
|
|
290
|
+
variant: "ghost",
|
|
291
|
+
classNames: "p-0",
|
|
292
|
+
onClick: () => handleChangeIndex(-1)
|
|
293
|
+
}), /* @__PURE__ */ React4.createElement(IconButton, {
|
|
294
|
+
icon: "ph--caret-right--regular",
|
|
295
|
+
size: 6,
|
|
296
|
+
label: "Next",
|
|
297
|
+
iconOnly: true,
|
|
298
|
+
noTooltip: true,
|
|
299
|
+
variant: "ghost",
|
|
300
|
+
classNames: "p-0",
|
|
301
|
+
onClick: () => handleChangeIndex(1)
|
|
302
|
+
}), /* @__PURE__ */ React4.createElement(IconButton, {
|
|
303
|
+
icon: "ph--caret-double-right--regular",
|
|
304
|
+
size: 6,
|
|
305
|
+
label: "Jump to last",
|
|
306
|
+
iconOnly: true,
|
|
307
|
+
noTooltip: true,
|
|
308
|
+
variant: "ghost",
|
|
309
|
+
classNames: "p-0",
|
|
310
|
+
onClick: () => onChange?.(count - 1)
|
|
311
|
+
}));
|
|
312
|
+
};
|
|
313
|
+
var PageNumber = ({ index = 0, count = 1 }) => {
|
|
314
|
+
if (index === void 0 || !count) {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
318
|
+
className: "flex items-center text-neutral-500 text-2xl"
|
|
319
|
+
}, /* @__PURE__ */ React4.createElement("div", null, index + 1, " / ", count));
|
|
320
|
+
};
|
|
321
|
+
var StartButton = ({ running, onClick }) => {
|
|
322
|
+
return /* @__PURE__ */ React4.createElement(IconButton, {
|
|
323
|
+
icon: running ? "ph--x--regular" : "ph--play--regular",
|
|
324
|
+
size: 6,
|
|
325
|
+
label: running ? "Stop" : "Play",
|
|
326
|
+
iconOnly: true,
|
|
327
|
+
noTooltip: true,
|
|
328
|
+
variant: "ghost",
|
|
329
|
+
classNames: "p-0",
|
|
330
|
+
onClick: () => onClick?.(!running)
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// src/components/RevealPlayer/RevealPlayer.tsx
|
|
335
|
+
import "reveal.js/dist/reveal.css";
|
|
336
|
+
import "reveal.js/dist/theme/black.css";
|
|
337
|
+
import "highlight.js/styles/tokyo-night-dark.css";
|
|
338
|
+
import hljs from "highlight.js";
|
|
339
|
+
import typescript from "highlight.js/lib/languages/typescript";
|
|
340
|
+
import React5, { useRef } from "react";
|
|
341
|
+
import Reveal from "reveal.js";
|
|
342
|
+
import RevealHighlight from "reveal.js/plugin/highlight/highlight";
|
|
343
|
+
import RevealMarkdown from "reveal.js/plugin/markdown/plugin.js";
|
|
344
|
+
import { useAsyncEffect } from "@dxos/react-ui";
|
|
345
|
+
import { composable as composable2, composableProps as composableProps2 } from "@dxos/react-ui";
|
|
346
|
+
var styles = `
|
|
347
|
+
<style type="text/css">
|
|
348
|
+
.reveal h1 {
|
|
349
|
+
font-weight: 100;
|
|
350
|
+
font-size: 60px;
|
|
351
|
+
opacity: 0.5;
|
|
352
|
+
}
|
|
353
|
+
.reveal h2 {
|
|
354
|
+
font-weight: 100;
|
|
355
|
+
padding-top: 60px;
|
|
356
|
+
padding-left: 40px;
|
|
357
|
+
font-size: 48px;
|
|
358
|
+
opacity: 0.3;
|
|
359
|
+
}
|
|
360
|
+
.reveal h1, h2, p {
|
|
361
|
+
font-family: "Raleway", sans-serif;
|
|
362
|
+
text-align: left;
|
|
363
|
+
font-weight: 200;
|
|
364
|
+
}
|
|
365
|
+
.reveal ul {
|
|
366
|
+
font-family: "Raleway", sans-serif;
|
|
367
|
+
display: block;
|
|
368
|
+
list-style: "- ";
|
|
369
|
+
}
|
|
370
|
+
.reveal blockquote p {
|
|
371
|
+
text-align: center;
|
|
372
|
+
font-weight: 100;
|
|
373
|
+
padding: 32px;
|
|
374
|
+
}
|
|
375
|
+
.reveal pre {
|
|
376
|
+
margin-left: 0;
|
|
377
|
+
}
|
|
378
|
+
.reveal code {
|
|
379
|
+
font-size: 20px;
|
|
380
|
+
background: #111111;
|
|
381
|
+
color: #eeeeee;
|
|
382
|
+
max-height: unset !important;
|
|
383
|
+
}
|
|
384
|
+
</style>
|
|
385
|
+
`;
|
|
386
|
+
var RevealPlayer = composable2(({ content, slide, fullscreen = true, onExit, children, ...props }, forwardedRef) => {
|
|
387
|
+
const deckDivRef = useRef(null);
|
|
388
|
+
const deckRef = useRef(null);
|
|
389
|
+
useAsyncEffect(async () => {
|
|
390
|
+
if (deckRef.current) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
hljs.registerLanguage("typescript", typescript);
|
|
394
|
+
deckRef.current = new Reveal(deckDivRef.current, {
|
|
395
|
+
// view: 'scroll',
|
|
396
|
+
progress: false,
|
|
397
|
+
transition: "none",
|
|
398
|
+
slideNumber: false,
|
|
399
|
+
embedded: true,
|
|
400
|
+
// Disable autoplay to prevent errors in headless environments (e.g., CI).
|
|
401
|
+
autoPlayMedia: false,
|
|
402
|
+
// TODO(burdon): Speaker view requires server to serve popout window.
|
|
403
|
+
// https://revealjs.com/speaker-view
|
|
404
|
+
showNotes: false,
|
|
405
|
+
// width: 1600,
|
|
406
|
+
// height: 900,
|
|
407
|
+
margin: 0.1,
|
|
408
|
+
// center: false,
|
|
409
|
+
// minScale: 0.1,
|
|
410
|
+
// maxScale: 1.4,
|
|
411
|
+
// https://revealjs.com/markdown
|
|
412
|
+
// TODO(burdon): Requires server to serve popout window.
|
|
413
|
+
plugins: [
|
|
414
|
+
RevealMarkdown,
|
|
415
|
+
RevealHighlight
|
|
416
|
+
],
|
|
417
|
+
// See https://marked.js.org/using_advanced#options
|
|
418
|
+
markdown: {
|
|
419
|
+
gfm: true,
|
|
420
|
+
smartypants: true,
|
|
421
|
+
highlight: (code, language) => {
|
|
422
|
+
if (language) {
|
|
423
|
+
return hljs.highlight(code, {
|
|
424
|
+
language
|
|
425
|
+
}).value;
|
|
426
|
+
}
|
|
427
|
+
return hljs.highlightAuto(code).value;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
await deckRef.current.initialize();
|
|
432
|
+
if (slide !== void 0) {
|
|
433
|
+
deckRef.current.slide(slide < 0 ? deckRef.current?.getTotalSlides() + slide : slide - 1);
|
|
434
|
+
}
|
|
435
|
+
deckRef.current.addKeyBinding({
|
|
436
|
+
keyCode: 27,
|
|
437
|
+
key: "Escape",
|
|
438
|
+
description: "Exit full screen"
|
|
439
|
+
}, () => {
|
|
440
|
+
onExit?.();
|
|
441
|
+
});
|
|
442
|
+
return () => {
|
|
443
|
+
try {
|
|
444
|
+
if (deckRef.current) {
|
|
445
|
+
deckRef.current.destroy();
|
|
446
|
+
deckRef.current = null;
|
|
447
|
+
}
|
|
448
|
+
} catch {
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
});
|
|
452
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
453
|
+
...composableProps2(props, {
|
|
454
|
+
classNames: [
|
|
455
|
+
"dx-container grid place-items-center bg-black",
|
|
456
|
+
fullscreen && "absolute inset-0"
|
|
457
|
+
]
|
|
458
|
+
}),
|
|
459
|
+
ref: forwardedRef
|
|
460
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
461
|
+
className: "relative aspect-video h-full w-full h-auto max-h-full overflow-hidden"
|
|
462
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
463
|
+
ref: deckDivRef,
|
|
464
|
+
className: "absolute inset-0 reveal"
|
|
465
|
+
}, /* @__PURE__ */ React5.createElement("style", null, /* @__PURE__ */ React5.createElement("link", {
|
|
466
|
+
rel: "preconnect",
|
|
467
|
+
href: "https://fonts.googleapis.com"
|
|
468
|
+
}), /* @__PURE__ */ React5.createElement("link", {
|
|
469
|
+
rel: "preconnect",
|
|
470
|
+
href: "https://fonts.gstatic.com",
|
|
471
|
+
crossOrigin: ""
|
|
472
|
+
}), /* @__PURE__ */ React5.createElement("link", {
|
|
473
|
+
rel: "stylesheet",
|
|
474
|
+
href: "https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"
|
|
475
|
+
})), /* @__PURE__ */ React5.createElement("div", {
|
|
476
|
+
className: "slides"
|
|
477
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
478
|
+
className: "text-center!"
|
|
479
|
+
}), /* @__PURE__ */ React5.createElement("section", {
|
|
480
|
+
"data-markdown": []
|
|
481
|
+
}, /* @__PURE__ */ React5.createElement("textarea", {
|
|
482
|
+
"data-template": true,
|
|
483
|
+
defaultValue: [
|
|
484
|
+
styles,
|
|
485
|
+
content
|
|
486
|
+
].join("\n")
|
|
487
|
+
}))))));
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
// src/components/index.ts
|
|
491
|
+
var PresenterSettings = lazy(() => import("../PresenterSettings-2G4XD4QY.mjs"));
|
|
492
|
+
export {
|
|
493
|
+
Layout,
|
|
494
|
+
PageNumber,
|
|
495
|
+
Pager,
|
|
496
|
+
Panel,
|
|
497
|
+
PresenterSettings,
|
|
498
|
+
RevealPlayer,
|
|
499
|
+
Slide,
|
|
500
|
+
StartButton
|
|
501
|
+
};
|
|
502
|
+
//# sourceMappingURL=index.mjs.map
|