@dxos/plugin-presenter 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f
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/browser/CollectionPresenterContainer-7UXPBYKA.mjs +189 -0
- package/dist/lib/browser/{CollectionPresenterContainer-SSFGQUYE.mjs.map → CollectionPresenterContainer-7UXPBYKA.mjs.map} +1 -1
- package/dist/lib/browser/DocumentPresenterContainer-QNXYZ5WX.mjs +185 -0
- package/dist/lib/browser/{DocumentPresenterContainer-CAPKSXNP.mjs.map → DocumentPresenterContainer-QNXYZ5WX.mjs.map} +1 -1
- package/dist/lib/browser/{MarkdownSlide-5NYXG5SC.mjs → MarkdownSlide-EI5XTZGO.mjs} +77 -54
- package/dist/lib/browser/{MarkdownSlide-5NYXG5SC.mjs.map → MarkdownSlide-EI5XTZGO.mjs.map} +2 -2
- package/dist/lib/browser/{app-graph-builder-6G4VPN6E.mjs → app-graph-builder-5NILN2ZH.mjs} +2 -2
- package/dist/lib/browser/chunk-K4SDUVTH.mjs +37 -0
- package/dist/lib/browser/{chunk-3BSZF44U.mjs.map → chunk-K4SDUVTH.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-OOZM543N.mjs → chunk-Y6REDI5E.mjs} +4 -4
- package/dist/lib/browser/{chunk-OOZM543N.mjs.map → chunk-Y6REDI5E.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-YV4BLHO2.mjs → react-surface-6AJLL4EM.mjs} +2 -2
- package/dist/lib/browser/{settings-WERSYNE5.mjs → settings-JBNMCJHB.mjs} +2 -2
- package/dist/types/src/types.d.ts +0 -104
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +25 -25
- package/src/components/Markdown/theme.ts +1 -1
- package/dist/lib/browser/CollectionPresenterContainer-SSFGQUYE.mjs +0 -166
- package/dist/lib/browser/DocumentPresenterContainer-CAPKSXNP.mjs +0 -173
- package/dist/lib/browser/chunk-3BSZF44U.mjs +0 -31
- /package/dist/lib/browser/{app-graph-builder-6G4VPN6E.mjs.map → app-graph-builder-5NILN2ZH.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-YV4BLHO2.mjs.map → react-surface-6AJLL4EM.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-WERSYNE5.mjs.map → settings-JBNMCJHB.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-presenter",
|
|
3
|
-
"version": "0.8.2-
|
|
3
|
+
"version": "0.8.2-staging.4d6ad0f",
|
|
4
4
|
"description": "Braneframe presenter plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"src"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@preact/
|
|
26
|
+
"@preact-signals/safe-react": "^0.9.0",
|
|
27
|
+
"@preact/signals-core": "^1.9.0",
|
|
27
28
|
"hastscript": "^7.1.0",
|
|
28
29
|
"highlight.js": "^11.9.0",
|
|
29
30
|
"marked": "^12.0.2",
|
|
@@ -34,28 +35,27 @@
|
|
|
34
35
|
"remark-frontmatter": "^5.0.0",
|
|
35
36
|
"remark-parse-frontmatter": "^1.0.3",
|
|
36
37
|
"reveal.js": "^5.1.0",
|
|
37
|
-
"@dxos/app-framework": "0.8.2-
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/echo-schema": "0.8.2-
|
|
40
|
-
"@dxos/live-object": "0.8.2-
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/plugin-
|
|
45
|
-
"@dxos/plugin-
|
|
46
|
-
"@dxos/plugin-
|
|
47
|
-
"@dxos/plugin-space": "0.8.2-
|
|
48
|
-
"@dxos/react-client": "0.8.2-
|
|
49
|
-
"@dxos/react-ui-form": "0.8.2-
|
|
50
|
-
"@dxos/plugin-stack": "0.8.2-
|
|
51
|
-
"@dxos/react-ui-stack": "0.8.2-
|
|
52
|
-
"@dxos/plugin-markdown": "0.8.2-
|
|
38
|
+
"@dxos/app-framework": "0.8.2-staging.4d6ad0f",
|
|
39
|
+
"@dxos/echo": "0.8.2-staging.4d6ad0f",
|
|
40
|
+
"@dxos/echo-schema": "0.8.2-staging.4d6ad0f",
|
|
41
|
+
"@dxos/live-object": "0.8.2-staging.4d6ad0f",
|
|
42
|
+
"@dxos/async": "0.8.2-staging.4d6ad0f",
|
|
43
|
+
"@dxos/local-storage": "0.8.2-staging.4d6ad0f",
|
|
44
|
+
"@dxos/log": "0.8.2-staging.4d6ad0f",
|
|
45
|
+
"@dxos/plugin-deck": "0.8.2-staging.4d6ad0f",
|
|
46
|
+
"@dxos/plugin-graph": "0.8.2-staging.4d6ad0f",
|
|
47
|
+
"@dxos/plugin-client": "0.8.2-staging.4d6ad0f",
|
|
48
|
+
"@dxos/plugin-space": "0.8.2-staging.4d6ad0f",
|
|
49
|
+
"@dxos/react-client": "0.8.2-staging.4d6ad0f",
|
|
50
|
+
"@dxos/react-ui-form": "0.8.2-staging.4d6ad0f",
|
|
51
|
+
"@dxos/plugin-stack": "0.8.2-staging.4d6ad0f",
|
|
52
|
+
"@dxos/react-ui-stack": "0.8.2-staging.4d6ad0f",
|
|
53
|
+
"@dxos/plugin-markdown": "0.8.2-staging.4d6ad0f"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@effect-rx/rx-react": "^0.34.1",
|
|
56
57
|
"@effect/platform": "0.80.12",
|
|
57
58
|
"@phosphor-icons/react": "^2.1.5",
|
|
58
|
-
"@types/lodash.get": "^4.4.7",
|
|
59
59
|
"@types/react": "~18.2.0",
|
|
60
60
|
"@types/react-dom": "~18.2.0",
|
|
61
61
|
"@types/reveal.js": "^5.0.3",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"react": "~18.2.0",
|
|
64
64
|
"react-dom": "~18.2.0",
|
|
65
65
|
"vite": "5.4.7",
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/react-ui-theme": "0.8.2-
|
|
69
|
-
"@dxos/storybook-utils": "0.8.2-
|
|
66
|
+
"@dxos/random": "0.8.2-staging.4d6ad0f",
|
|
67
|
+
"@dxos/react-ui": "0.8.2-staging.4d6ad0f",
|
|
68
|
+
"@dxos/react-ui-theme": "0.8.2-staging.4d6ad0f",
|
|
69
|
+
"@dxos/storybook-utils": "0.8.2-staging.4d6ad0f"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"effect": "^3.13.3",
|
|
76
76
|
"react": "~18.2.0",
|
|
77
77
|
"react-dom": "~18.2.0",
|
|
78
|
-
"@dxos/react-ui": "0.8.2-
|
|
79
|
-
"@dxos/react-ui
|
|
78
|
+
"@dxos/react-ui-theme": "0.8.2-staging.4d6ad0f",
|
|
79
|
+
"@dxos/react-ui": "0.8.2-staging.4d6ad0f"
|
|
80
80
|
},
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
@@ -20,7 +20,7 @@ export const theme = {
|
|
|
20
20
|
ol: 'my-[16px] ml-24 leading-relaxed list-decimal',
|
|
21
21
|
li: 'pl-6 text-[48px]',
|
|
22
22
|
|
|
23
|
-
pre: 'w-full mx-0 my-[32px] p-0 __border-l-[16px] bg-
|
|
23
|
+
pre: 'w-full mx-0 my-[32px] p-0 __border-l-[16px] bg-inputSurface p-4 __whitespace-pre-line',
|
|
24
24
|
code: 'p-0 text-[40px]',
|
|
25
25
|
},
|
|
26
26
|
};
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useExitPresenter
|
|
3
|
-
} from "./chunk-2RWWAQZK.mjs";
|
|
4
|
-
import {
|
|
5
|
-
PresenterContext
|
|
6
|
-
} from "./chunk-OOZM543N.mjs";
|
|
7
|
-
import "./chunk-S2S5RFJ4.mjs";
|
|
8
|
-
|
|
9
|
-
// packages/plugins/plugin-presenter/src/components/CollectionPresenterContainer.tsx
|
|
10
|
-
import React3, { useContext, useState } from "react";
|
|
11
|
-
import { Surface } from "@dxos/app-framework";
|
|
12
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
13
|
-
|
|
14
|
-
// packages/plugins/plugin-presenter/src/components/Presenter/Layout.tsx
|
|
15
|
-
import React from "react";
|
|
16
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
17
|
-
var Layout = ({ children, classNames, topLeft, topRight, bottomLeft, bottomRight }) => {
|
|
18
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
19
|
-
className: mx("flex grow relative overflow-hidden bg-attention", classNames)
|
|
20
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
21
|
-
className: mx("flex flex-col grow overflow-hidden")
|
|
22
|
-
}, children), /* @__PURE__ */ React.createElement("div", {
|
|
23
|
-
className: "z-[200]"
|
|
24
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
25
|
-
className: "absolute top-4 left-4"
|
|
26
|
-
}, topLeft), /* @__PURE__ */ React.createElement("div", {
|
|
27
|
-
className: "absolute top-4 right-4"
|
|
28
|
-
}, topRight), /* @__PURE__ */ React.createElement("div", {
|
|
29
|
-
className: "absolute bottom-4 left-4"
|
|
30
|
-
}, bottomLeft), /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
className: "absolute bottom-4 right-4"
|
|
32
|
-
}, bottomRight)));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// packages/plugins/plugin-presenter/src/components/Presenter/Pager.tsx
|
|
36
|
-
import { Play, X, CaretDoubleLeft, CaretDoubleRight, CaretLeft, CaretRight } from "@phosphor-icons/react";
|
|
37
|
-
import React2, { useEffect } from "react";
|
|
38
|
-
import { Button, useControlledState } from "@dxos/react-ui";
|
|
39
|
-
import { getSize, mx as mx2 } from "@dxos/react-ui-theme";
|
|
40
|
-
var Pager = ({ index: controlledIndex = 0, count = 0, keys, onChange, onExit }) => {
|
|
41
|
-
const [index, setIndex] = useControlledState(controlledIndex);
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
onChange?.(index);
|
|
44
|
-
}, [
|
|
45
|
-
index
|
|
46
|
-
]);
|
|
47
|
-
const handleChangeIndex = (dir) => {
|
|
48
|
-
setIndex((index2) => {
|
|
49
|
-
const next = index2 + dir;
|
|
50
|
-
return next >= 0 && next < count ? next : index2;
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (!keys) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const keydownHandler = (event) => {
|
|
58
|
-
switch (event.key) {
|
|
59
|
-
case "Escape": {
|
|
60
|
-
onExit?.();
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
case "ArrowLeft": {
|
|
64
|
-
if (event.shiftKey) {
|
|
65
|
-
onChange?.(0);
|
|
66
|
-
} else {
|
|
67
|
-
handleChangeIndex(-1);
|
|
68
|
-
}
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
case "ArrowRight": {
|
|
72
|
-
if (event.shiftKey) {
|
|
73
|
-
onChange?.(count - 1);
|
|
74
|
-
} else {
|
|
75
|
-
handleChangeIndex(1);
|
|
76
|
-
}
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
case "ArrowUp": {
|
|
80
|
-
onChange?.(0);
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case "ArrowDown": {
|
|
84
|
-
onChange?.(count - 1);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
window.addEventListener("keydown", keydownHandler);
|
|
90
|
-
return () => window.removeEventListener("keydown", keydownHandler);
|
|
91
|
-
}, [
|
|
92
|
-
keys,
|
|
93
|
-
count
|
|
94
|
-
]);
|
|
95
|
-
if (index === void 0 || !count) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
99
|
-
className: "flex items-center text-neutral-500"
|
|
100
|
-
}, /* @__PURE__ */ React2.createElement(Button, {
|
|
101
|
-
variant: "ghost",
|
|
102
|
-
classNames: "p-0",
|
|
103
|
-
onClick: () => onChange?.(0)
|
|
104
|
-
}, /* @__PURE__ */ React2.createElement(CaretDoubleLeft, {
|
|
105
|
-
className: mx2(getSize(6))
|
|
106
|
-
})), /* @__PURE__ */ React2.createElement(Button, {
|
|
107
|
-
variant: "ghost",
|
|
108
|
-
classNames: "p-0",
|
|
109
|
-
onClick: () => handleChangeIndex(-1)
|
|
110
|
-
}, /* @__PURE__ */ React2.createElement(CaretLeft, {
|
|
111
|
-
className: mx2(getSize(6))
|
|
112
|
-
})), /* @__PURE__ */ React2.createElement(Button, {
|
|
113
|
-
variant: "ghost",
|
|
114
|
-
classNames: "p-0",
|
|
115
|
-
onClick: () => handleChangeIndex(1)
|
|
116
|
-
}, /* @__PURE__ */ React2.createElement(CaretRight, {
|
|
117
|
-
className: mx2(getSize(6))
|
|
118
|
-
})), /* @__PURE__ */ React2.createElement(Button, {
|
|
119
|
-
variant: "ghost",
|
|
120
|
-
classNames: "p-0",
|
|
121
|
-
onClick: () => onChange?.(count - 1)
|
|
122
|
-
}, /* @__PURE__ */ React2.createElement(CaretDoubleRight, {
|
|
123
|
-
className: mx2(getSize(6))
|
|
124
|
-
})));
|
|
125
|
-
};
|
|
126
|
-
var PageNumber = ({ index = 0, count = 1 }) => {
|
|
127
|
-
if (index === void 0 || !count) {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
131
|
-
className: "flex items-center text-neutral-500 text-2xl"
|
|
132
|
-
}, /* @__PURE__ */ React2.createElement("div", null, index + 1, " / ", count));
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// packages/plugins/plugin-presenter/src/components/CollectionPresenterContainer.tsx
|
|
136
|
-
var CollectionPresenterContainer = ({ collection }) => {
|
|
137
|
-
const [slide, setSlide] = useState(0);
|
|
138
|
-
const { running } = useContext(PresenterContext);
|
|
139
|
-
const handleExit = useExitPresenter(collection);
|
|
140
|
-
return /* @__PURE__ */ React3.createElement(StackItem.Content, {
|
|
141
|
-
classNames: "relative"
|
|
142
|
-
}, /* @__PURE__ */ React3.createElement(Layout, {
|
|
143
|
-
bottomRight: /* @__PURE__ */ React3.createElement(PageNumber, {
|
|
144
|
-
index: slide,
|
|
145
|
-
count: collection.objects.length
|
|
146
|
-
}),
|
|
147
|
-
bottomLeft: /* @__PURE__ */ React3.createElement(Pager, {
|
|
148
|
-
index: slide,
|
|
149
|
-
count: collection.objects.length,
|
|
150
|
-
keys: running,
|
|
151
|
-
onChange: setSlide,
|
|
152
|
-
onExit: handleExit
|
|
153
|
-
})
|
|
154
|
-
}, /* @__PURE__ */ React3.createElement(Surface, {
|
|
155
|
-
role: "slide",
|
|
156
|
-
data: {
|
|
157
|
-
subject: collection.objects[slide]
|
|
158
|
-
},
|
|
159
|
-
placeholder: /* @__PURE__ */ React3.createElement(React3.Fragment, null)
|
|
160
|
-
})));
|
|
161
|
-
};
|
|
162
|
-
var CollectionPresenterContainer_default = CollectionPresenterContainer;
|
|
163
|
-
export {
|
|
164
|
-
CollectionPresenterContainer_default as default
|
|
165
|
-
};
|
|
166
|
-
//# sourceMappingURL=CollectionPresenterContainer-SSFGQUYE.mjs.map
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useExitPresenter
|
|
3
|
-
} from "./chunk-2RWWAQZK.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-presenter/src/components/DocumentPresenterContainer.tsx
|
|
6
|
-
import React2 from "react";
|
|
7
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
8
|
-
|
|
9
|
-
// packages/plugins/plugin-presenter/src/components/RevealPlayer/RevealPlayer.tsx
|
|
10
|
-
import "reveal.js/dist/reveal.css";
|
|
11
|
-
import "reveal.js/dist/theme/black.css";
|
|
12
|
-
import "highlight.js/styles/tokyo-night-dark.css";
|
|
13
|
-
import hljs from "highlight.js";
|
|
14
|
-
import typescript from "highlight.js/lib/languages/typescript";
|
|
15
|
-
import React, { useEffect, useRef } from "react";
|
|
16
|
-
import Reveal from "reveal.js";
|
|
17
|
-
import RevealHighlight from "reveal.js/plugin/highlight/highlight";
|
|
18
|
-
import RevealMarkdown from "reveal.js/plugin/markdown/plugin.js";
|
|
19
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
20
|
-
var styles = `
|
|
21
|
-
<style type="text/css">
|
|
22
|
-
.reveal h1 {
|
|
23
|
-
font-weight: 100;
|
|
24
|
-
font-size: 60px;
|
|
25
|
-
opacity: 0.5;
|
|
26
|
-
}
|
|
27
|
-
.reveal h2 {
|
|
28
|
-
font-weight: 100;
|
|
29
|
-
padding-top: 60px;
|
|
30
|
-
padding-left: 40px;
|
|
31
|
-
font-size: 48px;
|
|
32
|
-
opacity: 0.3;
|
|
33
|
-
}
|
|
34
|
-
.reveal h1, h2, p {
|
|
35
|
-
font-family: "Raleway", sans-serif;
|
|
36
|
-
text-align: left;
|
|
37
|
-
font-weight: 200;
|
|
38
|
-
}
|
|
39
|
-
.reveal ul {
|
|
40
|
-
font-family: "Raleway", sans-serif;
|
|
41
|
-
display: block;
|
|
42
|
-
list-style: "- ";
|
|
43
|
-
}
|
|
44
|
-
.reveal blockquote p {
|
|
45
|
-
text-align: center;
|
|
46
|
-
font-weight: 100;
|
|
47
|
-
padding: 32px;
|
|
48
|
-
}
|
|
49
|
-
.reveal pre {
|
|
50
|
-
margin-left: 0;
|
|
51
|
-
}
|
|
52
|
-
.reveal code {
|
|
53
|
-
font-size: 20px;
|
|
54
|
-
background: #111111;
|
|
55
|
-
color: #eeeeee;
|
|
56
|
-
max-height: unset !important;
|
|
57
|
-
}
|
|
58
|
-
</style>
|
|
59
|
-
`;
|
|
60
|
-
var RevealPlayer = ({ classNames, content, slide, fullscreen = true, onExit }) => {
|
|
61
|
-
const deckDivRef = useRef(null);
|
|
62
|
-
const deckRef = useRef(null);
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
if (deckRef.current) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
hljs.registerLanguage("typescript", typescript);
|
|
68
|
-
const t = setTimeout(async () => {
|
|
69
|
-
deckRef.current = new Reveal(deckDivRef.current, {
|
|
70
|
-
// view: 'scroll',
|
|
71
|
-
progress: false,
|
|
72
|
-
transition: "none",
|
|
73
|
-
slideNumber: false,
|
|
74
|
-
embedded: true,
|
|
75
|
-
// TODO(burdon): Speaker view requires server to serve popout window.
|
|
76
|
-
// https://revealjs.com/speaker-view
|
|
77
|
-
showNotes: false,
|
|
78
|
-
// width: 1600,
|
|
79
|
-
// height: 900,
|
|
80
|
-
margin: 0.1,
|
|
81
|
-
// center: false,
|
|
82
|
-
// minScale: 0.1,
|
|
83
|
-
// maxScale: 1.4,
|
|
84
|
-
// https://revealjs.com/markdown
|
|
85
|
-
// TODO(burdon): Requires server to serve popout window.
|
|
86
|
-
plugins: [
|
|
87
|
-
RevealMarkdown,
|
|
88
|
-
RevealHighlight
|
|
89
|
-
],
|
|
90
|
-
// See https://marked.js.org/using_advanced#options
|
|
91
|
-
markdown: {
|
|
92
|
-
gfm: true,
|
|
93
|
-
smartypants: true,
|
|
94
|
-
highlight: (code, language) => {
|
|
95
|
-
if (language) {
|
|
96
|
-
return hljs.highlight(code, {
|
|
97
|
-
language
|
|
98
|
-
}).value;
|
|
99
|
-
}
|
|
100
|
-
return hljs.highlightAuto(code).value;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
await deckRef.current.initialize();
|
|
105
|
-
if (slide !== void 0) {
|
|
106
|
-
deckRef.current.slide(slide < 0 ? deckRef.current?.getTotalSlides() + slide : slide - 1);
|
|
107
|
-
}
|
|
108
|
-
deckRef.current.addKeyBinding({
|
|
109
|
-
keyCode: 27,
|
|
110
|
-
key: "Escape",
|
|
111
|
-
description: "Exit full screen"
|
|
112
|
-
}, () => {
|
|
113
|
-
onExit?.();
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
return () => {
|
|
117
|
-
try {
|
|
118
|
-
clearTimeout(t);
|
|
119
|
-
if (deckRef.current) {
|
|
120
|
-
deckRef.current.destroy();
|
|
121
|
-
deckRef.current = null;
|
|
122
|
-
}
|
|
123
|
-
} catch (err) {
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
});
|
|
127
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
128
|
-
className: mx("absolute flex h-full w-full items-center justify-center", fullscreen && "inset-0", classNames)
|
|
129
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
130
|
-
className: "relative aspect-video w-full"
|
|
131
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
132
|
-
ref: deckDivRef,
|
|
133
|
-
className: "reveal"
|
|
134
|
-
}, /* @__PURE__ */ React.createElement("style", null, /* @__PURE__ */ React.createElement("link", {
|
|
135
|
-
rel: "preconnect",
|
|
136
|
-
href: "https://fonts.googleapis.com"
|
|
137
|
-
}), /* @__PURE__ */ React.createElement("link", {
|
|
138
|
-
rel: "preconnect",
|
|
139
|
-
href: "https://fonts.gstatic.com",
|
|
140
|
-
crossOrigin: ""
|
|
141
|
-
}), /* @__PURE__ */ React.createElement("link", {
|
|
142
|
-
rel: "stylesheet",
|
|
143
|
-
href: "https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"
|
|
144
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
145
|
-
className: "slides"
|
|
146
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
147
|
-
className: "!text-center"
|
|
148
|
-
}), /* @__PURE__ */ React.createElement("section", {
|
|
149
|
-
"data-markdown": []
|
|
150
|
-
}, /* @__PURE__ */ React.createElement("textarea", {
|
|
151
|
-
"data-template": true,
|
|
152
|
-
defaultValue: [
|
|
153
|
-
styles,
|
|
154
|
-
content
|
|
155
|
-
].join("\n")
|
|
156
|
-
}))))));
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
// packages/plugins/plugin-presenter/src/components/DocumentPresenterContainer.tsx
|
|
160
|
-
var DocumentPresenterContainer = ({ document }) => {
|
|
161
|
-
const handleExit = useExitPresenter(document);
|
|
162
|
-
return /* @__PURE__ */ React2.createElement(StackItem.Content, {
|
|
163
|
-
classNames: "relative"
|
|
164
|
-
}, /* @__PURE__ */ React2.createElement(RevealPlayer, {
|
|
165
|
-
content: document.content.target?.content ?? "",
|
|
166
|
-
onExit: handleExit
|
|
167
|
-
}));
|
|
168
|
-
};
|
|
169
|
-
var DocumentPresenterContainer_default = DocumentPresenterContainer;
|
|
170
|
-
export {
|
|
171
|
-
DocumentPresenterContainer_default as default
|
|
172
|
-
};
|
|
173
|
-
//# sourceMappingURL=DocumentPresenterContainer-CAPKSXNP.mjs.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PRESENTER_PLUGIN
|
|
3
|
-
} from "./chunk-S2S5RFJ4.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-presenter/src/components/PresenterSettings.tsx
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { Input, useTranslation } from "@dxos/react-ui";
|
|
8
|
-
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
9
|
-
var PresenterSettings = ({ settings }) => {
|
|
10
|
-
const { t } = useTranslation(PRESENTER_PLUGIN);
|
|
11
|
-
return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
|
|
12
|
-
label: t("present collections label")
|
|
13
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
14
|
-
checked: settings.presentCollections,
|
|
15
|
-
onCheckedChange: (checked) => settings.presentCollections = !!checked
|
|
16
|
-
})));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// packages/plugins/plugin-presenter/src/components/index.ts
|
|
20
|
-
import { lazy } from "react";
|
|
21
|
-
var MarkdownSlide = lazy(() => import("./MarkdownSlide-5NYXG5SC.mjs"));
|
|
22
|
-
var DocumentPresenterContainer = lazy(() => import("./DocumentPresenterContainer-CAPKSXNP.mjs"));
|
|
23
|
-
var CollectionPresenterContainer = lazy(() => import("./CollectionPresenterContainer-SSFGQUYE.mjs"));
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
PresenterSettings,
|
|
27
|
-
MarkdownSlide,
|
|
28
|
-
DocumentPresenterContainer,
|
|
29
|
-
CollectionPresenterContainer
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=chunk-3BSZF44U.mjs.map
|
/package/dist/lib/browser/{app-graph-builder-6G4VPN6E.mjs.map → app-graph-builder-5NILN2ZH.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|