@dxos/plugin-presenter 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33
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/PresenterSettings-2G4XD4QY.mjs +25 -0
- package/dist/lib/browser/PresenterSettings-2G4XD4QY.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +521 -52
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +30 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +19 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/PresenterPlugin.d.ts +2 -1
- package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
- 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/Panel.stories.d.ts +18 -0
- package/dist/types/src/components/Markdown/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/Slide.d.ts +2 -4
- package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.stories.d.ts +11 -12
- 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 +4 -4
- package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.stories.d.ts +12 -4
- 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 +19 -2
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts +6 -0
- package/dist/types/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.d.ts.map +1 -0
- package/dist/types/src/containers/CollectionPresenterContainer/index.d.ts +2 -0
- package/dist/types/src/containers/CollectionPresenterContainer/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/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +17 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +2 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- 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 +15 -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 +71 -46
- package/src/PresenterPlugin.tsx +12 -27
- package/src/capabilities/app-graph-builder.ts +94 -72
- package/src/capabilities/index.ts +4 -4
- package/src/capabilities/react-surface.tsx +59 -44
- package/src/capabilities/settings.ts +24 -12
- package/src/components/Markdown/Panel.stories.tsx +58 -0
- package/src/components/Markdown/{Container.tsx → Panel.tsx} +6 -6
- package/src/components/Markdown/Slide.stories.tsx +12 -8
- package/src/components/Markdown/Slide.tsx +14 -130
- package/src/components/Markdown/index.ts +1 -1
- package/src/components/Markdown/styles.css +104 -0
- package/src/components/Markdown/theme.ts +5 -5
- package/src/components/Markdown/typings.d.ts +8 -0
- package/src/components/Presenter/Layout.tsx +24 -23
- package/src/components/Presenter/Pager.stories.tsx +10 -10
- package/src/components/Presenter/Pager.tsx +55 -22
- 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 +9 -7
- package/src/components/RevealPlayer/RevealPlayer.tsx +58 -52
- package/src/components/index.ts +5 -5
- package/src/containers/CollectionPresenterContainer/CollectionPresenterContainer.tsx +50 -0
- package/src/containers/CollectionPresenterContainer/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/meta.ts +9 -6
- package/src/operations/definitions.ts +23 -0
- package/src/operations/index.ts +5 -0
- package/src/testing.ts +6 -6
- package/src/translations.ts +4 -4
- package/src/types/Settings.ts +20 -0
- package/src/types/index.ts +30 -0
- package/src/useExitPresenter.ts +26 -24
- package/dist/lib/browser/CollectionPresenterContainer-CMHKK7TI.mjs +0 -189
- package/dist/lib/browser/CollectionPresenterContainer-CMHKK7TI.mjs.map +0 -7
- package/dist/lib/browser/DocumentPresenterContainer-E7RGK572.mjs +0 -185
- package/dist/lib/browser/DocumentPresenterContainer-E7RGK572.mjs.map +0 -7
- package/dist/lib/browser/MarkdownSlide-QHC3GZII.mjs +0 -336
- package/dist/lib/browser/MarkdownSlide-QHC3GZII.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2ZLAWPF2.mjs +0 -77
- package/dist/lib/browser/app-graph-builder-2ZLAWPF2.mjs.map +0 -7
- package/dist/lib/browser/chunk-SW3HIRDA.mjs +0 -39
- package/dist/lib/browser/chunk-SW3HIRDA.mjs.map +0 -7
- package/dist/lib/browser/chunk-TANLITL2.mjs +0 -36
- package/dist/lib/browser/chunk-TANLITL2.mjs.map +0 -7
- package/dist/lib/browser/chunk-VSD5LSE5.mjs +0 -15
- package/dist/lib/browser/chunk-VSD5LSE5.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZUDP646V.mjs +0 -37
- package/dist/lib/browser/chunk-ZUDP646V.mjs.map +0 -7
- package/dist/lib/browser/react-surface-5WI73FAE.mjs +0 -57
- package/dist/lib/browser/react-surface-5WI73FAE.mjs.map +0 -7
- package/dist/lib/browser/settings-X7M27QCY.mjs +0 -22
- package/dist/lib/browser/settings-X7M27QCY.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionPresenterContainer-VGIYRG3V.mjs +0 -190
- package/dist/lib/node-esm/CollectionPresenterContainer-VGIYRG3V.mjs.map +0 -7
- package/dist/lib/node-esm/DocumentPresenterContainer-RG4P7XA6.mjs +0 -186
- package/dist/lib/node-esm/DocumentPresenterContainer-RG4P7XA6.mjs.map +0 -7
- package/dist/lib/node-esm/MarkdownSlide-IDPOGD64.mjs +0 -338
- package/dist/lib/node-esm/MarkdownSlide-IDPOGD64.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PNVMZBL6.mjs +0 -78
- package/dist/lib/node-esm/app-graph-builder-PNVMZBL6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GDG7Q5H4.mjs +0 -40
- package/dist/lib/node-esm/chunk-GDG7Q5H4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MVKQEF6Y.mjs +0 -17
- package/dist/lib/node-esm/chunk-MVKQEF6Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VZEWAW63.mjs +0 -38
- package/dist/lib/node-esm/chunk-VZEWAW63.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YI6PZYVI.mjs +0 -38
- package/dist/lib/node-esm/chunk-YI6PZYVI.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -67
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-JWLPKDCJ.mjs +0 -58
- package/dist/lib/node-esm/react-surface-JWLPKDCJ.mjs.map +0 -7
- package/dist/lib/node-esm/settings-G2PHYWSK.mjs +0 -23
- package/dist/lib/node-esm/settings-G2PHYWSK.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 +0 -26
- 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 -39
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/CollectionPresenterContainer.tsx +0 -43
- package/src/components/DocumentPresenterContainer.tsx +0 -22
- package/src/components/Markdown/Container.stories.tsx +0 -57
- package/src/components/MarkdownSlide.tsx +0 -24
- package/src/components/PresenterSettings.tsx +0 -26
- package/src/types.ts +0 -46
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
CollectionPresenterContainer,
|
|
4
|
-
DocumentPresenterContainer,
|
|
5
|
-
MarkdownSlide,
|
|
6
|
-
PresenterSettings
|
|
7
|
-
} from "./chunk-VZEWAW63.mjs";
|
|
8
|
-
import {
|
|
9
|
-
PRESENTER_PLUGIN,
|
|
10
|
-
meta
|
|
11
|
-
} from "./chunk-MVKQEF6Y.mjs";
|
|
12
|
-
|
|
13
|
-
// src/PresenterPlugin.tsx
|
|
14
|
-
import { definePlugin, defineModule, Events, contributes, Capabilities } from "@dxos/app-framework";
|
|
15
|
-
|
|
16
|
-
// src/capabilities/index.ts
|
|
17
|
-
import { lazy } from "@dxos/app-framework";
|
|
18
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-PNVMZBL6.mjs"));
|
|
19
|
-
var ReactSurface = lazy(() => import("./react-surface-JWLPKDCJ.mjs"));
|
|
20
|
-
var PresenterSettings2 = lazy(() => import("./settings-G2PHYWSK.mjs"));
|
|
21
|
-
|
|
22
|
-
// src/translations.ts
|
|
23
|
-
var translations = [
|
|
24
|
-
{
|
|
25
|
-
"en-US": {
|
|
26
|
-
[meta.id]: {
|
|
27
|
-
"plugin name": "Presenter",
|
|
28
|
-
"toggle presentation label": "Present",
|
|
29
|
-
"present collections label": "Present collections (experimental)"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
// src/PresenterPlugin.tsx
|
|
36
|
-
var PresenterPlugin = () => definePlugin(meta, [
|
|
37
|
-
defineModule({
|
|
38
|
-
id: `${meta.id}/module/settings`,
|
|
39
|
-
activatesOn: Events.SetupSettings,
|
|
40
|
-
activate: PresenterSettings2
|
|
41
|
-
}),
|
|
42
|
-
defineModule({
|
|
43
|
-
id: `${meta.id}/module/translations`,
|
|
44
|
-
activatesOn: Events.SetupTranslations,
|
|
45
|
-
activate: () => contributes(Capabilities.Translations, translations)
|
|
46
|
-
}),
|
|
47
|
-
defineModule({
|
|
48
|
-
id: `${meta.id}/module/react-surface`,
|
|
49
|
-
activatesOn: Events.SetupReactSurface,
|
|
50
|
-
activate: ReactSurface
|
|
51
|
-
}),
|
|
52
|
-
defineModule({
|
|
53
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
54
|
-
activatesOn: Events.SetupAppGraph,
|
|
55
|
-
activate: AppGraphBuilder
|
|
56
|
-
})
|
|
57
|
-
]);
|
|
58
|
-
export {
|
|
59
|
-
CollectionPresenterContainer,
|
|
60
|
-
DocumentPresenterContainer,
|
|
61
|
-
MarkdownSlide,
|
|
62
|
-
PRESENTER_PLUGIN,
|
|
63
|
-
PresenterPlugin,
|
|
64
|
-
PresenterSettings,
|
|
65
|
-
meta
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/PresenterPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { definePlugin, defineModule, Events, contributes, Capabilities } from '@dxos/app-framework';\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 = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/settings`,\n activatesOn: Events.SetupSettings,\n activate: PresenterSettings,\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const PresenterSettings = lazy(() => import('./settings'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Presenter',\n 'toggle presentation label': 'Present',\n 'present collections label': 'Present collections (experimental)',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,cAAcC,cAAcC,QAAQC,aAAaC,oBAAoB;;;ACA9E,SAASC,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAME,qBAAoBF,KAAK,MAAM,OAAO,yBAAA,CAAA;;;ACA5C,IAAMG,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,6BAA6B;QAC7B,6BAA6B;MAC/B;IACF;EACF;;;;AFJK,IAAMC,kBAAkB,MAC7BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAUC;EACZ,CAAA;EACAN,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOI;IACpBF,UAAU,MAAMG,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOS;IACpBP,UAAUQ;EACZ,CAAA;EACAb,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOW;IACpBT,UAAUU;EACZ,CAAA;CACD;",
|
|
6
|
-
"names": ["definePlugin", "defineModule", "Events", "contributes", "Capabilities", "lazy", "AppGraphBuilder", "lazy", "ReactSurface", "PresenterSettings", "translations", "meta", "id", "PresenterPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupSettings", "activate", "PresenterSettings", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations", "SetupReactSurface", "ReactSurface", "SetupAppGraph", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1449,"imports":[],"format":"esm"},"src/components/PresenterSettings.tsx":{"bytes":3115,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/Markdown/Container.tsx":{"bytes":8331,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Markdown/theme.ts":{"bytes":2160,"imports":[],"format":"esm"},"src/components/Markdown/Slide.tsx":{"bytes":17574,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"hastscript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-markdown","kind":"import-statement","external":true},{"path":"rehype-add-classes","kind":"import-statement","external":true},{"path":"rehype-highlight","kind":"import-statement","external":true},{"path":"remark-frontmatter","kind":"import-statement","external":true},{"path":"remark-parse-frontmatter","kind":"import-statement","external":true},{"path":"highlight.js/styles/github.css","kind":"import-statement","external":true},{"path":"src/components/Markdown/theme.ts","kind":"import-statement","original":"./theme"}],"format":"esm"},"src/components/Markdown/index.ts":{"bytes":566,"imports":[{"path":"src/components/Markdown/Container.tsx","kind":"import-statement","original":"./Container"},{"path":"src/components/Markdown/Slide.tsx","kind":"import-statement","original":"./Slide"}],"format":"esm"},"src/components/MarkdownSlide.tsx":{"bytes":2037,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/components/Markdown/index.ts","kind":"import-statement","original":"./Markdown"}],"format":"esm"},"src/components/RevealPlayer/RevealPlayer.tsx":{"bytes":16712,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"reveal.js/dist/reveal.css","kind":"import-statement","external":true},{"path":"reveal.js/dist/theme/black.css","kind":"import-statement","external":true},{"path":"highlight.js/styles/tokyo-night-dark.css","kind":"import-statement","external":true},{"path":"highlight.js","kind":"import-statement","external":true},{"path":"highlight.js/lib/languages/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"reveal.js","kind":"import-statement","external":true},{"path":"reveal.js/plugin/highlight/highlight","kind":"import-statement","external":true},{"path":"reveal.js/plugin/markdown/plugin.js","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/RevealPlayer/index.ts":{"bytes":496,"imports":[{"path":"src/components/RevealPlayer/RevealPlayer.tsx","kind":"import-statement","original":"./RevealPlayer"}],"format":"esm"},"src/useExitPresenter.ts":{"bytes":4162,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"src/components/DocumentPresenterContainer.tsx":{"bytes":2700,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"src/components/RevealPlayer/index.ts","kind":"import-statement","original":"./RevealPlayer"},{"path":"src/useExitPresenter.ts","kind":"import-statement","original":"../useExitPresenter"}],"format":"esm"},"src/components/Presenter/Layout.tsx":{"bytes":3626,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Presenter/Pager.tsx":{"bytes":12947,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Presenter/index.ts":{"bytes":560,"imports":[{"path":"src/components/Presenter/Layout.tsx","kind":"import-statement","original":"./Layout"},{"path":"src/components/Presenter/Pager.tsx","kind":"import-statement","original":"./Pager"}],"format":"esm"},"src/types.ts":{"bytes":4268,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/components/CollectionPresenterContainer.tsx":{"bytes":5188,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"src/components/Presenter/index.ts","kind":"import-statement","original":"./Presenter"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"src/useExitPresenter.ts","kind":"import-statement","original":"../useExitPresenter"}],"format":"esm"},"src/components/index.ts":{"bytes":1532,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/PresenterSettings.tsx","kind":"import-statement","original":"./PresenterSettings"},{"path":"src/components/MarkdownSlide.tsx","kind":"dynamic-import","original":"./MarkdownSlide"},{"path":"src/components/DocumentPresenterContainer.tsx","kind":"dynamic-import","original":"./DocumentPresenterContainer"},{"path":"src/components/CollectionPresenterContainer.tsx","kind":"dynamic-import","original":"./CollectionPresenterContainer"}],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":12539,"imports":[{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":7366,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/settings.ts":{"bytes":1910,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1295,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"}],"format":"esm"},"src/translations.ts":{"bytes":1469,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PresenterPlugin.tsx":{"bytes":4417,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":653,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/PresenterPlugin.tsx","kind":"import-statement","original":"./PresenterPlugin"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3289},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VZEWAW63.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/app-graph-builder-PNVMZBL6.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/react-surface-JWLPKDCJ.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/settings-G2PHYWSK.mjs","kind":"dynamic-import"}],"exports":["CollectionPresenterContainer","DocumentPresenterContainer","MarkdownSlide","PRESENTER_PLUGIN","PresenterPlugin","PresenterSettings","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/PresenterPlugin.tsx":{"bytesInOutput":742},"src/capabilities/index.ts":{"bytesInOutput":265},"src/translations.ts":{"bytesInOutput":238}},"bytes":1846},"dist/lib/node-esm/MarkdownSlide-IDPOGD64.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13470},"dist/lib/node-esm/MarkdownSlide-IDPOGD64.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"hastscript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-markdown","kind":"import-statement","external":true},{"path":"rehype-add-classes","kind":"import-statement","external":true},{"path":"rehype-highlight","kind":"import-statement","external":true},{"path":"remark-frontmatter","kind":"import-statement","external":true},{"path":"remark-parse-frontmatter","kind":"import-statement","external":true},{"path":"highlight.js/styles/github.css","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/components/MarkdownSlide.tsx","inputs":{"src/components/MarkdownSlide.tsx":{"bytesInOutput":504},"src/components/Markdown/Container.tsx":{"bytesInOutput":1552},"src/components/Markdown/index.ts":{"bytesInOutput":0},"src/components/Markdown/Slide.tsx":{"bytesInOutput":5281},"src/components/Markdown/theme.ts":{"bytesInOutput":516}},"bytes":8273},"dist/lib/node-esm/DocumentPresenterContainer-RG4P7XA6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8909},"dist/lib/node-esm/DocumentPresenterContainer-RG4P7XA6.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-YI6PZYVI.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"reveal.js/dist/reveal.css","kind":"import-statement","external":true},{"path":"reveal.js/dist/theme/black.css","kind":"import-statement","external":true},{"path":"highlight.js/styles/tokyo-night-dark.css","kind":"import-statement","external":true},{"path":"highlight.js","kind":"import-statement","external":true},{"path":"highlight.js/lib/languages/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"reveal.js","kind":"import-statement","external":true},{"path":"reveal.js/plugin/highlight/highlight","kind":"import-statement","external":true},{"path":"reveal.js/plugin/markdown/plugin.js","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/components/DocumentPresenterContainer.tsx","inputs":{"src/components/DocumentPresenterContainer.tsx":{"bytesInOutput":658},"src/components/RevealPlayer/RevealPlayer.tsx":{"bytesInOutput":4731},"src/components/RevealPlayer/index.ts":{"bytesInOutput":0}},"bytes":5814},"dist/lib/node-esm/CollectionPresenterContainer-VGIYRG3V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10325},"dist/lib/node-esm/CollectionPresenterContainer-VGIYRG3V.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-YI6PZYVI.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-GDG7Q5H4.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/components/CollectionPresenterContainer.tsx","inputs":{"src/components/CollectionPresenterContainer.tsx":{"bytesInOutput":1332},"src/components/Presenter/Layout.tsx":{"bytesInOutput":1093},"src/components/Presenter/index.ts":{"bytesInOutput":0},"src/components/Presenter/Pager.tsx":{"bytesInOutput":3363}},"bytes":6341},"dist/lib/node-esm/chunk-YI6PZYVI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2299},"dist/lib/node-esm/chunk-YI6PZYVI.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["useExitPresenter"],"inputs":{"src/useExitPresenter.ts":{"bytesInOutput":954}},"bytes":1150},"dist/lib/node-esm/app-graph-builder-PNVMZBL6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6379},"dist/lib/node-esm/app-graph-builder-PNVMZBL6.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-GDG7Q5H4.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder.ts":{"bytesInOutput":2750}},"bytes":3108},"dist/lib/node-esm/react-surface-JWLPKDCJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3719},"dist/lib/node-esm/react-surface-JWLPKDCJ.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VZEWAW63.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":1657}},"bytes":2085},"dist/lib/node-esm/chunk-VZEWAW63.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2253},"dist/lib/node-esm/chunk-VZEWAW63.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/MarkdownSlide-IDPOGD64.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/DocumentPresenterContainer-RG4P7XA6.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/CollectionPresenterContainer-VGIYRG3V.mjs","kind":"dynamic-import"}],"exports":["CollectionPresenterContainer","DocumentPresenterContainer","MarkdownSlide","PresenterSettings"],"inputs":{"src/components/PresenterSettings.tsx":{"bytesInOutput":791},"src/components/index.ts":{"bytesInOutput":302}},"bytes":1469},"dist/lib/node-esm/settings-G2PHYWSK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":982},"dist/lib/node-esm/settings-G2PHYWSK.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-GDG7Q5H4.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/settings.ts","inputs":{"src/capabilities/settings.ts":{"bytesInOutput":300}},"bytes":627},"dist/lib/node-esm/chunk-GDG7Q5H4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2339},"dist/lib/node-esm/chunk-GDG7Q5H4.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-MVKQEF6Y.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["PresenterAction","PresenterContext","PresenterSettingsSchema"],"inputs":{"src/types.ts":{"bytesInOutput":890}},"bytes":1180},"dist/lib/node-esm/chunk-MVKQEF6Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":714},"dist/lib/node-esm/chunk-MVKQEF6Y.mjs":{"imports":[],"exports":["PRESENTER_PLUGIN","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":286}},"bytes":478}}}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
CollectionPresenterContainer,
|
|
4
|
-
DocumentPresenterContainer,
|
|
5
|
-
MarkdownSlide,
|
|
6
|
-
PresenterSettings
|
|
7
|
-
} from "./chunk-VZEWAW63.mjs";
|
|
8
|
-
import {
|
|
9
|
-
PRESENTER_PLUGIN
|
|
10
|
-
} from "./chunk-MVKQEF6Y.mjs";
|
|
11
|
-
|
|
12
|
-
// src/capabilities/react-surface.tsx
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
15
|
-
import { Obj } from "@dxos/echo";
|
|
16
|
-
import { SettingsStore } from "@dxos/local-storage";
|
|
17
|
-
import { DocumentType } from "@dxos/plugin-markdown/types";
|
|
18
|
-
import { DataType } from "@dxos/schema";
|
|
19
|
-
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
20
|
-
createSurface({
|
|
21
|
-
id: `${PRESENTER_PLUGIN}/document`,
|
|
22
|
-
role: "article",
|
|
23
|
-
position: "hoist",
|
|
24
|
-
filter: (data) => Obj.instanceOf(DocumentType, data.subject) && data.variant === "presenter",
|
|
25
|
-
component: ({ data }) => /* @__PURE__ */ React.createElement(DocumentPresenterContainer, {
|
|
26
|
-
document: data.subject
|
|
27
|
-
})
|
|
28
|
-
}),
|
|
29
|
-
createSurface({
|
|
30
|
-
id: `${PRESENTER_PLUGIN}/collection`,
|
|
31
|
-
role: "article",
|
|
32
|
-
position: "hoist",
|
|
33
|
-
filter: (data) => Obj.instanceOf(DataType.Collection, data.subject) && data.variant === "presenter",
|
|
34
|
-
component: ({ data }) => /* @__PURE__ */ React.createElement(CollectionPresenterContainer, {
|
|
35
|
-
collection: data.subject
|
|
36
|
-
})
|
|
37
|
-
}),
|
|
38
|
-
createSurface({
|
|
39
|
-
id: `${PRESENTER_PLUGIN}/slide`,
|
|
40
|
-
role: "slide",
|
|
41
|
-
filter: (data) => Obj.instanceOf(DocumentType, data.subject),
|
|
42
|
-
component: ({ data }) => /* @__PURE__ */ React.createElement(MarkdownSlide, {
|
|
43
|
-
document: data.subject
|
|
44
|
-
})
|
|
45
|
-
}),
|
|
46
|
-
createSurface({
|
|
47
|
-
id: `${PRESENTER_PLUGIN}/plugin-settings`,
|
|
48
|
-
role: "article",
|
|
49
|
-
filter: (data) => data.subject instanceof SettingsStore && data.subject.prefix === PRESENTER_PLUGIN,
|
|
50
|
-
component: ({ data: { subject } }) => /* @__PURE__ */ React.createElement(PresenterSettings, {
|
|
51
|
-
settings: subject.value
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
]);
|
|
55
|
-
export {
|
|
56
|
-
react_surface_default as default
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=react-surface-JWLPKDCJ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { SettingsStore } from '@dxos/local-storage';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { DataType } from '@dxos/schema';\n\nimport {\n MarkdownSlide,\n PresenterSettings,\n DocumentPresenterContainer,\n CollectionPresenterContainer,\n} from '../components';\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { type PresenterSettingsProps } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${PRESENTER_PLUGIN}/document`,\n role: 'article',\n position: 'hoist',\n filter: (data): data is { subject: DocumentType; variant: 'presenter' } =>\n Obj.instanceOf(DocumentType, data.subject) && data.variant === 'presenter',\n component: ({ data }) => <DocumentPresenterContainer document={data.subject} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/collection`,\n role: 'article',\n position: 'hoist',\n filter: (data): data is { subject: DataType.Collection; variant: 'presenter' } =>\n Obj.instanceOf(DataType.Collection, data.subject) && data.variant === 'presenter',\n component: ({ data }) => <CollectionPresenterContainer collection={data.subject} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/slide`,\n role: 'slide',\n filter: (data): data is { subject: DocumentType } => Obj.instanceOf(DocumentType, data.subject),\n component: ({ data }) => <MarkdownSlide document={data.subject} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/plugin-settings`,\n role: 'article',\n filter: (data): data is { subject: SettingsStore<PresenterSettingsProps> } =>\n data.subject instanceof SettingsStore && data.subject.prefix === PRESENTER_PLUGIN,\n component: ({ data: { subject } }) => <PresenterSettings settings={subject.value} />,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AACpB,SAASC,qBAAqB;AAC9B,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AAWzB,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACPC,IAAIC,WAAWC,cAAcH,KAAKI,OAAO,KAAKJ,KAAKK,YAAY;IACjEC,WAAW,CAAC,EAAEN,KAAI,MAAO,sBAAA,cAACO,4BAAAA;MAA2BC,UAAUR,KAAKI;;EACtE,CAAA;EACAV,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACPC,IAAIC,WAAWO,SAASC,YAAYV,KAAKI,OAAO,KAAKJ,KAAKK,YAAY;IACxEC,WAAW,CAAC,EAAEN,KAAI,MAAO,sBAAA,cAACW,8BAAAA;MAA6BC,YAAYZ,KAAKI;;EAC1E,CAAA;EACAV,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SAA4CC,IAAIC,WAAWC,cAAcH,KAAKI,OAAO;IAC9FE,WAAW,CAAC,EAAEN,KAAI,MAAO,sBAAA,cAACa,eAAAA;MAAcL,UAAUR,KAAKI;;EACzD,CAAA;EACAV,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SACPA,KAAKI,mBAAmBU,iBAAiBd,KAAKI,QAAQW,WAAWnB;IACnEU,WAAW,CAAC,EAAEN,MAAM,EAAEI,QAAO,EAAE,MAAO,sBAAA,cAACY,mBAAAA;MAAkBC,UAAUb,QAAQc;;EAC7E,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "SettingsStore", "DocumentType", "DataType", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PRESENTER_PLUGIN", "role", "position", "filter", "data", "Obj", "instanceOf", "DocumentType", "subject", "variant", "component", "DocumentPresenterContainer", "document", "DataType", "Collection", "CollectionPresenterContainer", "collection", "MarkdownSlide", "SettingsStore", "prefix", "PresenterSettings", "settings", "value"]
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
PresenterSettingsSchema
|
|
4
|
-
} from "./chunk-GDG7Q5H4.mjs";
|
|
5
|
-
import {
|
|
6
|
-
meta
|
|
7
|
-
} from "./chunk-MVKQEF6Y.mjs";
|
|
8
|
-
|
|
9
|
-
// src/capabilities/settings.ts
|
|
10
|
-
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
11
|
-
import { live } from "@dxos/live-object";
|
|
12
|
-
var settings_default = () => {
|
|
13
|
-
const settings = live({});
|
|
14
|
-
return contributes(Capabilities.Settings, {
|
|
15
|
-
prefix: meta.id,
|
|
16
|
-
schema: PresenterSettingsSchema,
|
|
17
|
-
value: settings
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
settings_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=settings-G2PHYWSK.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/settings.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { live } from '@dxos/live-object';\n\nimport { meta } from '../meta';\nimport { PresenterSettingsSchema, type PresenterSettingsProps } from '../types';\n\nexport default () => {\n const settings = live<PresenterSettingsProps>({});\n\n return contributes(Capabilities.Settings, {\n prefix: meta.id,\n schema: PresenterSettingsSchema,\n value: settings,\n });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,YAAY;AAKrB,IAAA,mBAAe,MAAA;AACb,QAAMC,WAAWC,KAA6B,CAAC,CAAA;AAE/C,SAAOC,YAAYC,aAAaC,UAAU;IACxCC,QAAQC,KAAKC;IACbC,QAAQC;IACRC,OAAOV;EACT,CAAA;AACF;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "live", "settings", "live", "contributes", "Capabilities", "Settings", "prefix", "meta", "id", "schema", "PresenterSettingsSchema", "value"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
import { type DataType } from '@dxos/schema';
|
|
3
|
-
declare const CollectionPresenterContainer: FC<{
|
|
4
|
-
collection: DataType.Collection;
|
|
5
|
-
}>;
|
|
6
|
-
export default CollectionPresenterContainer;
|
|
7
|
-
//# sourceMappingURL=CollectionPresenterContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionPresenterContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/CollectionPresenterContainer.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAwB,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAM7C,QAAA,MAAM,4BAA4B,EAAE,EAAE,CAAC;IAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAA;CAAE,CA0BzE,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
3
|
-
declare const DocumentPresenterContainer: FC<{
|
|
4
|
-
document: DocumentType;
|
|
5
|
-
}>;
|
|
6
|
-
export default DocumentPresenterContainer;
|
|
7
|
-
//# sourceMappingURL=DocumentPresenterContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentPresenterContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DocumentPresenterContainer.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAMhE,QAAA,MAAM,0BAA0B,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,CAQ9D,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
export type ContainerProps = ThemedClassName<PropsWithChildren<{}>>;
|
|
4
|
-
/**
|
|
5
|
-
* Scaled markdown container.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Container: ({ children, classNames }: ContainerProps) => React.JSX.Element;
|
|
8
|
-
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/Container.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,0BAA0B,cAAc,sBA4BjE,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta } from '@storybook/react-vite';
|
|
3
|
-
import { Slide } from './Slide';
|
|
4
|
-
export declare const Default: {
|
|
5
|
-
args: {
|
|
6
|
-
content: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare const Code: {
|
|
10
|
-
args: {
|
|
11
|
-
content: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const List: {
|
|
15
|
-
args: {
|
|
16
|
-
content: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const Ordered: {
|
|
20
|
-
args: {
|
|
21
|
-
content: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
declare const meta: Meta<typeof Slide>;
|
|
25
|
-
export default meta;
|
|
26
|
-
//# sourceMappingURL=Container.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/Container.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAMlD,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAC;AAWjD,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAEF,eAAO,MAAM,IAAI;;;;CAIhB,CAAC;AAEF,eAAO,MAAM,IAAI;;;;CAIhB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAO5B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownSlide.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownSlide.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAIhE,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,CAWjD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PresenterSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/PresenterSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,eAAO,MAAM,iBAAiB,GAAI,cAAc;IAAE,QAAQ,EAAE,sBAAsB,CAAA;CAAE,sBAanF,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { type Context } from 'react';
|
|
3
|
-
export declare namespace PresenterAction {
|
|
4
|
-
const TogglePresentation_base: Schema.TaggedClass<TogglePresentation, "dxos.org/plugin/presenter/action/toggle-presentation", {
|
|
5
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/presenter/action/toggle-presentation">;
|
|
6
|
-
} & {
|
|
7
|
-
input: Schema.Struct<{
|
|
8
|
-
object: Schema.Union<[import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
9
|
-
name: Schema.optional<typeof Schema.String>;
|
|
10
|
-
fallbackName: Schema.optional<typeof Schema.String>;
|
|
11
|
-
content: import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
12
|
-
content: typeof import("effect/Schema").String;
|
|
13
|
-
}>>>;
|
|
14
|
-
}>>, import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
15
|
-
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
16
|
-
objects: import("effect/Schema").mutable<import("effect/Schema").Array$<import("@dxos/echo/Type").ref<import("effect/Schema").Schema<import("@dxos/echo/Type").Expando, {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
id: string;
|
|
19
|
-
}, never>>>>;
|
|
20
|
-
}>>]>;
|
|
21
|
-
state: Schema.optional<typeof Schema.Boolean>;
|
|
22
|
-
}>;
|
|
23
|
-
output: typeof Schema.Void;
|
|
24
|
-
}>;
|
|
25
|
-
export class TogglePresentation extends TogglePresentation_base {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
28
|
-
}
|
|
29
|
-
export type PresenterContextType = {
|
|
30
|
-
running: boolean;
|
|
31
|
-
start: () => void;
|
|
32
|
-
stop: () => void;
|
|
33
|
-
};
|
|
34
|
-
export declare const PresenterContext: Context<PresenterContextType>;
|
|
35
|
-
export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
|
|
36
|
-
presentCollections: Schema.optional<typeof Schema.Boolean>;
|
|
37
|
-
}>>;
|
|
38
|
-
export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
|
|
39
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AAOpD,yBAAiB,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;IAG/B,MAAM,OAAO,kBAAmB,SAAQ,uBASvC;KAAG;;CACL;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,oBAAoB,CAIzD,CAAC;AAEH,eAAO,MAAM,uBAAuB;;GAInC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type FC, useContext, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
|
-
import { type DataType } from '@dxos/schema';
|
|
10
|
-
|
|
11
|
-
import { Layout, PageNumber, Pager } from './Presenter';
|
|
12
|
-
import { PresenterContext } from '../types';
|
|
13
|
-
import { useExitPresenter } from '../useExitPresenter';
|
|
14
|
-
|
|
15
|
-
const CollectionPresenterContainer: FC<{ collection: DataType.Collection }> = ({ collection }) => {
|
|
16
|
-
const [slide, setSlide] = useState(0);
|
|
17
|
-
|
|
18
|
-
const { running } = useContext(PresenterContext);
|
|
19
|
-
|
|
20
|
-
const handleExit = useExitPresenter(collection);
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<StackItem.Content classNames='relative'>
|
|
24
|
-
<Layout
|
|
25
|
-
bottomRight={<PageNumber index={slide} count={collection.objects.length} />}
|
|
26
|
-
bottomLeft={
|
|
27
|
-
<Pager
|
|
28
|
-
index={slide}
|
|
29
|
-
count={collection.objects.length}
|
|
30
|
-
keys={running}
|
|
31
|
-
onChange={setSlide}
|
|
32
|
-
onExit={handleExit}
|
|
33
|
-
/>
|
|
34
|
-
}
|
|
35
|
-
>
|
|
36
|
-
{/* TODO(wittjosiah): Better slide placeholder. */}
|
|
37
|
-
<Surface role='slide' data={{ subject: collection.objects[slide] }} placeholder={<></>} />
|
|
38
|
-
</Layout>
|
|
39
|
-
</StackItem.Content>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default CollectionPresenterContainer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
import React, { type FC } from 'react';
|
|
5
|
-
|
|
6
|
-
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
7
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
8
|
-
|
|
9
|
-
import { RevealPlayer } from './RevealPlayer';
|
|
10
|
-
import { useExitPresenter } from '../useExitPresenter';
|
|
11
|
-
|
|
12
|
-
const DocumentPresenterContainer: FC<{ document: DocumentType }> = ({ document }) => {
|
|
13
|
-
const handleExit = useExitPresenter(document);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<StackItem.Content classNames='relative'>
|
|
17
|
-
<RevealPlayer content={document.content.target?.content ?? ''} onExit={handleExit} />
|
|
18
|
-
</StackItem.Content>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default DocumentPresenterContainer;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
11
|
-
|
|
12
|
-
import { Container } from './Container';
|
|
13
|
-
import { Slide, type SlideProps } from './Slide';
|
|
14
|
-
import { createSlide } from '../../testing';
|
|
15
|
-
|
|
16
|
-
const DefaultStory = ({ content = '' }: SlideProps) => {
|
|
17
|
-
return (
|
|
18
|
-
<Container classNames='bg-neutral-200'>
|
|
19
|
-
<Slide content={content} />
|
|
20
|
-
</Container>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Default = {
|
|
25
|
-
args: {
|
|
26
|
-
content: createSlide({ number: 1 }),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Code = {
|
|
31
|
-
args: {
|
|
32
|
-
content: createSlide({ code: true }),
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const List = {
|
|
37
|
-
args: {
|
|
38
|
-
content: createSlide({ list: 3 }),
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const Ordered = {
|
|
43
|
-
args: {
|
|
44
|
-
content: createSlide({ ordered: 4 }),
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const meta: Meta<typeof Slide> = {
|
|
49
|
-
title: 'plugins/plugin-presenter/Container',
|
|
50
|
-
render: DefaultStory,
|
|
51
|
-
decorators: [withTheme, withLayout({ fullscreen: true })],
|
|
52
|
-
parameters: {
|
|
53
|
-
layout: 'fullscreen',
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default meta;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type FC } from 'react';
|
|
6
|
-
|
|
7
|
-
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
8
|
-
|
|
9
|
-
import { Container, Slide } from './Markdown';
|
|
10
|
-
|
|
11
|
-
const MarkdownSlide: FC<{ document: DocumentType }> = ({ document }) => {
|
|
12
|
-
const content = document.content.target?.content;
|
|
13
|
-
if (!content) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Container>
|
|
19
|
-
<Slide content={content} />
|
|
20
|
-
</Container>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default MarkdownSlide;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Input, useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
9
|
-
|
|
10
|
-
import { PRESENTER_PLUGIN } from '../meta';
|
|
11
|
-
import { type PresenterSettingsProps } from '../types';
|
|
12
|
-
|
|
13
|
-
export const PresenterSettings = ({ settings }: { settings: PresenterSettingsProps }) => {
|
|
14
|
-
const { t } = useTranslation(PRESENTER_PLUGIN);
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<DeprecatedFormContainer>
|
|
18
|
-
<DeprecatedFormInput label={t('present collections label')}>
|
|
19
|
-
<Input.Switch
|
|
20
|
-
checked={settings.presentCollections}
|
|
21
|
-
onCheckedChange={(checked) => (settings.presentCollections = !!checked)}
|
|
22
|
-
/>
|
|
23
|
-
</DeprecatedFormInput>
|
|
24
|
-
</DeprecatedFormContainer>
|
|
25
|
-
);
|
|
26
|
-
};
|
package/src/types.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Schema } from 'effect';
|
|
6
|
-
import { type Context, createContext } from 'react';
|
|
7
|
-
|
|
8
|
-
import { DocumentType } from '@dxos/plugin-markdown/types';
|
|
9
|
-
import { DataType } from '@dxos/schema';
|
|
10
|
-
|
|
11
|
-
import { PRESENTER_PLUGIN } from './meta';
|
|
12
|
-
|
|
13
|
-
export namespace PresenterAction {
|
|
14
|
-
const PRESENTER_ACTION = `${PRESENTER_PLUGIN}/action`;
|
|
15
|
-
|
|
16
|
-
export class TogglePresentation extends Schema.TaggedClass<TogglePresentation>()(
|
|
17
|
-
`${PRESENTER_ACTION}/toggle-presentation`,
|
|
18
|
-
{
|
|
19
|
-
input: Schema.Struct({
|
|
20
|
-
object: Schema.Union(DocumentType, DataType.Collection),
|
|
21
|
-
state: Schema.optional(Schema.Boolean),
|
|
22
|
-
}),
|
|
23
|
-
output: Schema.Void,
|
|
24
|
-
},
|
|
25
|
-
) {}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type PresenterContextType = {
|
|
29
|
-
running: boolean;
|
|
30
|
-
start: () => void;
|
|
31
|
-
stop: () => void;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const PresenterContext: Context<PresenterContextType> = createContext<PresenterContextType>({
|
|
35
|
-
running: false,
|
|
36
|
-
start: () => {},
|
|
37
|
-
stop: () => {},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const PresenterSettingsSchema = Schema.mutable(
|
|
41
|
-
Schema.Struct({
|
|
42
|
-
presentCollections: Schema.optional(Schema.Boolean),
|
|
43
|
-
}),
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
|