@dxos/plugin-presenter 0.8.4-main.5ea62a8 → 0.8.4-main.ae835ea
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-U7D57ZVN.mjs → CollectionPresenterContainer-ASH2TGJR.mjs} +3 -3
- package/dist/lib/browser/{MarkdownSlide-KG7ESCSU.mjs → MarkdownSlide-BLVWTH3U.mjs} +15 -128
- package/dist/lib/browser/MarkdownSlide-BLVWTH3U.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-5LNLRZBN.mjs → app-graph-builder-UGCZOBA6.mjs} +16 -15
- package/dist/lib/browser/app-graph-builder-UGCZOBA6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-W4IR3DJE.mjs → chunk-EOT6RIHJ.mjs} +5 -5
- package/dist/lib/browser/chunk-EOT6RIHJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-TMTUZQCK.mjs +18 -0
- package/dist/lib/browser/chunk-TMTUZQCK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NINDSVTB.mjs → chunk-WWKBVJB3.mjs} +7 -7
- package/dist/lib/browser/chunk-WWKBVJB3.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -8
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-GZIAFGCD.mjs → react-surface-UIAHN2NJ.mjs} +13 -13
- package/dist/lib/browser/react-surface-UIAHN2NJ.mjs.map +7 -0
- package/dist/lib/browser/{settings-VQVVDAGY.mjs → settings-RZWQTJI2.mjs} +5 -5
- package/dist/lib/browser/{settings-VQVVDAGY.mjs.map → settings-RZWQTJI2.mjs.map} +1 -1
- package/dist/types/src/PresenterPlugin.d.ts +1 -1
- package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Container.stories.d.ts +0 -1
- package/dist/types/src/components/Markdown/Container.stories.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.d.ts +1 -3
- package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.stories.d.ts +1 -1
- package/dist/types/src/components/Markdown/Slide.stories.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.stories.d.ts +0 -1
- package/dist/types/src/components/Presenter/Pager.stories.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +8 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +4 -3
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -35
- package/src/PresenterPlugin.tsx +22 -23
- package/src/capabilities/app-graph-builder.ts +11 -14
- package/src/capabilities/react-surface.tsx +10 -10
- package/src/components/Markdown/Container.stories.tsx +2 -4
- package/src/components/Markdown/Slide.stories.tsx +3 -2
- package/src/components/Markdown/Slide.tsx +12 -128
- package/src/components/Markdown/styles.css +104 -0
- package/src/components/Markdown/typings.d.ts +8 -0
- package/src/components/Presenter/Pager.stories.tsx +1 -3
- package/src/components/PresenterSettings.tsx +3 -3
- package/src/components/RevealPlayer/RevealPlayer.stories.tsx +3 -2
- package/src/meta.ts +7 -4
- package/src/types.ts +3 -3
- package/dist/lib/browser/MarkdownSlide-KG7ESCSU.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5LNLRZBN.mjs.map +0 -7
- package/dist/lib/browser/chunk-NINDSVTB.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-W4IR3DJE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-GZIAFGCD.mjs.map +0 -7
- /package/dist/lib/browser/{CollectionPresenterContainer-U7D57ZVN.mjs.map → CollectionPresenterContainer-ASH2TGJR.mjs.map} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta } from '@storybook/react-vite';
|
|
8
6
|
|
|
7
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
|
|
9
9
|
import CONTENT from '../../../testing/deck.md?raw';
|
|
10
10
|
import { translations } from '../../translations';
|
|
11
11
|
|
|
@@ -22,6 +22,7 @@ import { RevealPlayer } from './RevealPlayer';
|
|
|
22
22
|
const meta = {
|
|
23
23
|
title: 'plugins/plugin-presenter/RevealPlayer',
|
|
24
24
|
component: RevealPlayer,
|
|
25
|
+
decorators: [withTheme],
|
|
25
26
|
parameters: {
|
|
26
27
|
layout: 'fullscreen',
|
|
27
28
|
translations,
|
package/src/meta.ts
CHANGED
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
export const PRESENTER_PLUGIN = 'dxos.org/plugin/presenter';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
8
|
export const meta: PluginMeta = {
|
|
10
|
-
id:
|
|
9
|
+
id: 'dxos.org/plugin/presenter',
|
|
11
10
|
name: 'Presenter',
|
|
12
|
-
description:
|
|
11
|
+
description: trim`
|
|
12
|
+
Transform markdown documents into interactive presentation slideshows.
|
|
13
|
+
Navigate between slides with keyboard controls and present content in full-screen mode.
|
|
14
|
+
`,
|
|
13
15
|
icon: 'ph--presentation--regular',
|
|
16
|
+
iconHue: 'indigo',
|
|
14
17
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',
|
|
15
18
|
};
|
package/src/types.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
import { type Context, createContext } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
9
9
|
import { DataType } from '@dxos/schema';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from './meta';
|
|
12
12
|
|
|
13
13
|
export namespace PresenterAction {
|
|
14
|
-
const PRESENTER_ACTION = `${
|
|
14
|
+
const PRESENTER_ACTION = `${meta.id}/action`;
|
|
15
15
|
|
|
16
16
|
export class TogglePresentation extends Schema.TaggedClass<TogglePresentation>()(
|
|
17
17
|
`${PRESENTER_ACTION}/toggle-presentation`,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/MarkdownSlide.tsx", "../../../src/components/Markdown/Container.tsx", "../../../src/components/Markdown/Slide.tsx", "../../../src/components/Markdown/theme.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown/types';\n\nimport { Container, Slide } from './Markdown';\n\nconst MarkdownSlide: FC<{ document: Markdown.Document }> = ({ document }) => {\n const content = document.content.target?.content;\n if (!content) {\n return null;\n }\n\n return (\n <Container>\n <Slide content={content} />\n </Container>\n );\n};\n\nexport default MarkdownSlide;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type PropsWithChildren, useState } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren<{}>>;\n\n/**\n * Scaled markdown container.\n */\nexport const Container = ({ children, classNames }: ContainerProps) => {\n const [props, setProps] = useState({});\n const {\n ref: containerRef,\n width,\n height,\n } = useResizeDetector({\n refreshMode: 'debounce',\n refreshRate: 200,\n refreshOptions: {\n leading: true,\n },\n onResize: ({ width, height }) => {\n if (width && height) {\n setProps(createLayoutProps({ width, height }));\n }\n },\n });\n\n // TODO(burdon): Reconcile highlight colors with markdown editor.\n // https://www.npmjs.com/package/react-markdown\n return (\n <div ref={containerRef} className={mx('flex grow relative overflow-hidden bg-attention', classNames)}>\n <div className={mx('flex w-full h-full overflow-hidden absolute')} style={props}>\n {width && height && children}\n </div>\n </div>\n );\n};\n\n/**\n * Compute CSS properties to transform DIV to be full screen.\n *\n * Display resolutions:\n * window.screen.{availWidth, availHeight}\n * 5K Studio 16.2-inch Macbook Pro\n * Max 5120 x 2880 3456 x 2234\n * Default 2560 x 1440 1728 x 1117 (Actual height 1080 - 37 pixel notch)\n * Aspect 1.77 (16/9) 1.54\n */\nconst createLayoutProps = ({ width, height }: { width: number; height: number }) => {\n // Config.\n const aspectRatio = 16 / 9;\n const nominalWidth = 2560;\n const nominalHeight = nominalWidth / aspectRatio;\n\n // NOTE: Hack to detect full height on Macbook Pro due to notch.\n // const macIntelNotch = 1117 - 1080;\n // const fullscreen =\n // height === screen.availHeight ||\n // (window.navigator.platform === 'MacIntel' && height === screen.availHeight - macIntelNotch);\n\n // If not fullscreen then make scale slightly smaller so there's a natural border.\n // const scaleFactor = fullscreen ? 1 : 0.95;\n\n // Compute scaling factor required.\n const scale = Math.min(width / nominalWidth, height / nominalHeight);\n\n return {\n left: (width - nominalWidth) / 2,\n top: (height - nominalHeight) / 2,\n width: nominalWidth,\n height: nominalHeight,\n transform: `scale(${scale})`,\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { h } from 'hastscript';\nimport React from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport addClasses from 'rehype-add-classes';\nimport highlight from 'rehype-highlight';\nimport remarkFrontmatter from 'remark-frontmatter';\nimport remarkParseFrontmatter from 'remark-parse-frontmatter';\n\nimport 'highlight.js/styles/github.css';\n\nimport { theme } from './theme';\n\nexport type SlideProps = {\n content?: string;\n classes?: { [selector: string]: string };\n};\n\nexport const Slide = ({ content = '', classes = theme.nodes }: SlideProps) => {\n // TODO(thure): `rehype-highlight` ends up using `github.css` from `highlight.js`, but this does not appear to be\n // configurable. Find a way to remove the literal stylesheet here.\n return (\n <>\n <style>{`\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/*!\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\n Outdated base version: https://github.com/primer/github-syntax-dark\n Current colors taken from GitHub's CSS\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 /* prettylights-syntax-keyword */\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 /* prettylights-syntax-entity */\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 /* prettylights-syntax-constant */\n color: #79c0ff\n}\n.dark .hljs-regexp,\n.dark .hljs-string,\n.dark .hljs-meta .hljs-string {\n /* prettylights-syntax-string */\n color: #a5d6ff\n}\n.dark .hljs-built_in,\n.dark .hljs-symbol {\n /* prettylights-syntax-variable */\n color: #ffa657\n}\n.dark .hljs-comment,\n.dark .hljs-code,\n.dark .hljs-formula {\n /* prettylights-syntax-comment */\n color: #8b949e\n}\n.dark .hljs-name,\n.dark .hljs-quote,\n.dark .hljs-selector-tag,\n.dark .hljs-selector-pseudo {\n /* prettylights-syntax-entity-tag */\n color: #7ee787\n}\n.dark .hljs-subst {\n /* prettylights-syntax-storage-modifier-import */\n color: #c9d1d9\n}\n.dark .hljs-section {\n /* prettylights-syntax-markup-heading */\n color: #1f6feb;\n font-weight: bold\n}\n.dark .hljs-bullet {\n /* prettylights-syntax-markup-list */\n color: #f2cc60\n}\n.dark .hljs-emphasis {\n /* prettylights-syntax-markup-italic */\n color: #c9d1d9;\n font-style: italic\n}\n.dark .hljs-strong {\n /* prettylights-syntax-markup-bold */\n color: #c9d1d9;\n font-weight: bold\n}\n.dark .hljs-addition {\n /* prettylights-syntax-markup-inserted */\n color: #aff5b4;\n background-color: #033a16\n}\n.dark .hljs-deletion {\n /* prettylights-syntax-markup-deleted */\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 \n}\n `}</style>\n <ReactMarkdown\n components={components}\n // Markdown to HTML.\n remarkPlugins={[[remarkFrontmatter, 'yaml'], remarkParseFrontmatter as any]}\n // HTML processing.\n rehypePlugins={[highlight, [addClasses, classes], slideLayout]}\n >\n {content}\n </ReactMarkdown>\n </>\n );\n};\n\n/**\n * Rehype plugin to format DOM based on frontmatter.\n * https://github.com/unifiedjs/unified#plugin\n * TODO(burdon): See tools/presenter: remarkPluginLayout\n * E.g., layout image from front-matter.\n */\nconst slideLayout =\n (options = {}) =>\n (tree: any, file: any) => {\n const {\n data: { frontmatter = {} },\n } = file;\n\n let content = tree.children;\n const { layout, image } = frontmatter;\n if (image) {\n const img = h('div', {\n class: 'flex grow shrink-0 bg-cover bg-center bg-no-repeat',\n style: {\n backgroundImage: `url(${image})`,\n },\n });\n\n switch (layout) {\n case 'fullscreen': {\n content = img;\n break;\n }\n\n case 'columns': {\n content = h('div', { class: 'flex grow grid grid-cols-2' }, [\n h('div', { class: theme.padding }, [content]),\n img,\n ]);\n break;\n }\n\n case 'rows': {\n content = h('div', { class: 'flex grow flex-col' }, [\n h('div', { class: theme.padding }, [content]),\n h('div', { class: ['flex grow pt-0', theme.padding] }, [img]),\n ]);\n break;\n }\n }\n } else {\n content = h('div', { class: ['flex grow flex-col', theme.padding] }, [content]);\n }\n\n const root = h('div', { class: ['flex flex-col grow', theme.root] }, [content]);\n tree.children = [root];\n };\n\nconst ImageWrapper = ({ node, ...props }: { node: any }) => {\n const { alt = '', src } = props as { alt: string; src: string };\n return <img alt={alt} src={src} />;\n};\n\nconst components = { img: ImageWrapper };\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(burdon): Create theme type and picker.\n\nexport const theme = {\n root: 'bg-attention leading-relaxed font-mono',\n\n padding: 'px-40 py-16 gap-8',\n\n nodes: {\n h1: 'text-[80px] text-accentText',\n h2: 'text-[60px] text-accentText',\n h3: 'text-[48px] text-accentText',\n\n p: 'text-[48px]',\n\n ul: 'my-[16px] ml-12 leading-relaxed list-disc',\n ol: 'my-[16px] ml-24 leading-relaxed list-decimal',\n li: 'pl-6 text-[48px]',\n\n pre: 'w-full mx-0 my-[32px] p-0 __border-l-[16px] bg-inputSurface p-4 __whitespace-pre-line',\n code: 'p-0 text-[40px]',\n },\n};\n"],
|
|
5
|
-
"mappings": ";;AAIA,OAAOA,YAAwB;;;;ACA/B,OAAOC,SAAiCC,gBAAgB;AACxD,SAASC,yBAAyB;AAGlC,SAASC,UAAU;AAOZ,IAAMC,YAAY,CAAC,EAAEC,UAAUC,WAAU,MAAkB;;;AAChE,UAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAS,CAAC,CAAA;AACpC,UAAM,EACJC,KAAKC,cACLC,OACAC,OAAM,IACJC,kBAAkB;MACpBC,aAAa;MACbC,aAAa;MACbC,gB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3B;KAAQ;EAChF;AAEA,QAAM4B,OAAOJ,EAAE,OAAO;IAAEC,OAAO;MAAC;MAAsBvB,MAAM0B;;EAAM,GAAG;IAAC5B;GAAQ;AAC9EgB,OAAKI,WAAW;IAACQ;;AACnB;AAEF,IAAMC,eAAe,CAAC,EAAEC,MAAM,GAAGC,MAAAA,MAAsB;;;AACrD,UAAM,EAAEC,MAAM,IAAIC,IAAG,IAAKF;AAC1B,WAAO,gBAAA3B,OAAA,cAACmB,OAAAA;MAAIS;MAAUC;;;;;AACxB;AAEA,IAAM1B,aAAa;EAAEgB,KAAKM;AAAa;;;AF/MvC,IAAMK,gBAAqD,CAAC,EAAEC,SAAQ,MAAE;;;AACtE,UAAMC,UAAUD,SAASC,QAAQC,QAAQD;AACzC,QAAI,CAACA,SAAS;AACZ,aAAO;IACT;AAEA,WACE,gBAAAE,OAAA,cAACC,WAAAA,MACC,gBAAAD,OAAA,cAACE,OAAAA;MAAMJ;;;;;AAGb;AAEA,IAAA,wBAAeF;",
|
|
6
|
-
"names": ["React", "React", "useState", "useResizeDetector", "mx", "Container", "children", "classNames", "props", "setProps", "useState", "ref", "containerRef", "width", "height", "useResizeDetector", "refreshMode", "refreshRate", "refreshOptions", "leading", "onResize", "createLayoutProps", "div", "className", "mx", "style", "aspectRatio", "nominalWidth", "nominalHeight", "scale", "Math", "min", "left", "top", "transform", "h", "React", "ReactMarkdown", "addClasses", "highlight", "remarkFrontmatter", "remarkParseFrontmatter", "theme", "root", "padding", "nodes", "h1", "h2", "h3", "p", "ul", "ol", "li", "pre", "code", "Slide", "content", "classes", "theme", "nodes", "React", "style", "ReactMarkdown", "components", "remarkPlugins", "remarkFrontmatter", "remarkParseFrontmatter", "rehypePlugins", "highlight", "addClasses", "slideLayout", "options", "tree", "file", "data", "frontmatter", "children", "layout", "image", "img", "h", "class", "backgroundImage", "padding", "root", "ImageWrapper", "node", "props", "alt", "src", "MarkdownSlide", "document", "content", "target", "React", "Container", "Slide"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';\nimport { createExtension, rxFromSignal } from '@dxos/plugin-graph';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';\nimport { DataType } from '@dxos/schema';\n\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { PresenterAction, type PresenterSettingsProps } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: PRESENTER_PLUGIN,\n // TODO(wittjosiah): This is a hack to work around presenter previously relying on \"variant\". Remove.\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => {\n const [settingsStore] = get(context.capabilities(Capabilities.SettingsStore));\n const settings = get(\n rxFromSignal(() => settingsStore?.getStore<PresenterSettingsProps>(PRESENTER_PLUGIN)?.value),\n );\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(DataType.Collection, node.data) || Obj.instanceOf(Markdown.Document, node.data)\n : Obj.instanceOf(Markdown.Document, node.data);\n return isPresentable ? Option.some(node.data) : Option.none();\n }),\n Option.map((object) => {\n const id = fullyQualifiedId(object);\n return [\n {\n id: [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR),\n data: { type: PRESENTER_PLUGIN, object },\n type: PRESENTER_PLUGIN,\n properties: {\n label: 'Presenter',\n icon: 'ph--presentation--regular',\n disposition: 'hidden',\n },\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => {\n const [settingsStore] = get(context.capabilities(Capabilities.SettingsStore));\n const settings = get(\n rxFromSignal(() => settingsStore?.getStore<PresenterSettingsProps>(PRESENTER_PLUGIN)?.value),\n );\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(DataType.Collection, node.data) || Obj.instanceOf(Markdown.Document, node.data)\n : Obj.instanceOf(Markdown.Document, node.data);\n return isPresentable ? Option.some(node.data) : Option.none();\n }),\n Option.map((object) => {\n const id = fullyQualifiedId(object);\n const spaceId = getSpace(object)?.id;\n return [\n {\n id: `${PresenterAction.TogglePresentation._tag}/${id}`,\n // TODO(burdon): Allow function so can generate state when activated.\n // So can set explicit fullscreen state coordinated with current presenter state.\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const layout = context.getCapability(DeckCapabilities.MutableDeckState);\n const presenterId = [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR);\n if (!layout.deck.fullscreen) {\n void dispatch(\n createIntent(DeckAction.Adjust, {\n type: 'solo--fullscreen',\n id: presenterId,\n }),\n );\n }\n await dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [presenterId],\n options: { workspace: spaceId },\n }),\n );\n },\n properties: {\n label: ['toggle presentation label', { ns: PRESENTER_PLUGIN }],\n icon: 'ph--presentation--regular',\n disposition: 'list-item',\n keyBinding: {\n macos: 'shift+meta+p',\n windows: 'shift+alt+p',\n },\n },\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,cAAkCC,aAAaC,oBAAoB;AAC1F,SAASC,WAAW;AACpB,SAASC,wBAAwB;AACjC,SAASC,2BAA2BC,kBAAkB;AACtD,SAASC,iBA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CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
-
"names": ["Rx", "Option", "pipe", "Capabilities", "LayoutAction", "contributes", "createIntent", "Obj", "DeckCapabilities", "ATTENDABLE_PATH_SEPARATOR", "DeckAction", "createExtension", "rxFromSignal", "Markdown", "fullyQualifiedId", "getSpace", "DataType", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "PRESENTER_PLUGIN", "connector", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "settingsStore", "capabilities", "SettingsStore", "settings", "rxFromSignal", "getStore", "value", "isPresentable", "presentCollections", "Obj", "instanceOf", "DataType", "Collection", "data", "Markdown", "Document", "some", "none", "map", "object", "fullyQualifiedId", "join", "ATTENDABLE_PATH_SEPARATOR", "type", "properties", "label", "icon", "disposition", "getOrElse", "actions", "spaceId", "getSpace", "PresenterAction", "TogglePresentation", "_tag", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "layout", "DeckCapabilities", "MutableDeckState", "presenterId", "deck", "fullscreen", "createIntent", "DeckAction", "Adjust", "LayoutAction", "Open", "part", "subject", "options", "workspace", "ns", "keyBinding", "macos", "windows"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/PresenterSettings.tsx", "../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { ControlGroup, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';\n\nimport { PRESENTER_PLUGIN } from '../meta';\nimport { type PresenterSettingsProps } from '../types';\n\nexport const PresenterSettings = ({ settings }: { settings: PresenterSettingsProps }) => {\n const { t } = useTranslation(PRESENTER_PLUGIN);\n\n return (\n <ControlPage>\n <ControlSection title={t('settings title', { ns: PRESENTER_PLUGIN })}>\n <ControlGroup>\n <ControlItemInput title={t('present collections label')}>\n <Input.Switch\n checked={settings.presentCollections}\n onCheckedChange={(checked) => (settings.presentCollections = !!checked)}\n />\n </ControlItemInput>\n </ControlGroup>\n </ControlSection>\n </ControlPage>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './PresenterSettings';\n\nexport const MarkdownSlide = lazy(() => import('./MarkdownSlide'));\nexport const DocumentPresenterContainer = lazy(() => import('./DocumentPresenterContainer'));\nexport const CollectionPresenterContainer = lazy(() => import('./CollectionPresenterContainer'));\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,cAAcC,kBAAkBC,aAAaC,sBAAsB;AAKrE,IAAMC,oBAAoB,CAAC,EAAEC,SAAQ,MAAwC;;;AAClF,UAAM,EAAEC,EAAC,IAAKC,eAAeC,gBAAAA;AAE7B,WACE,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MAAeC,OAAOL,EAAE,kBAAkB;QAAEM,IAAIJ;MAAiB,CAAA;OAChE,sBAAA,cAACK,cAAAA,MACC,sBAAA,cAACC,kBAAAA;MAAiBH,OAAOL,EAAE,2BAAA;OACzB,sBAAA,cAACS,MAAMC,QAAM;MACXC,SAASZ,SAASa;MAClBC,iBAAiB,CAACF,YAAaZ,SAASa,qBAAqB,CAAC,CAACD;;;;;AAO7E;;;ACzBA,SAASG,YAAY;AAId,IAAMC,gBAAgBC,KAAK,MAAM,OAAO,8BAAA,CAAA;AACxC,IAAMC,6BAA6BD,KAAK,MAAM,OAAO,2CAAA,CAAA;AACrD,IAAME,+BAA+BF,KAAK,MAAM,OAAO,6CAAA,CAAA;",
|
|
6
|
-
"names": ["React", "Input", "useTranslation", "ControlGroup", "ControlItemInput", "ControlPage", "ControlSection", "PresenterSettings", "settings", "t", "useTranslation", "PRESENTER_PLUGIN", "ControlPage", "ControlSection", "title", "ns", "ControlGroup", "ControlItemInput", "Input", "Switch", "checked", "presentCollections", "onCheckedChange", "lazy", "MarkdownSlide", "lazy", "DocumentPresenterContainer", "CollectionPresenterContainer"]
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
var PRESENTER_PLUGIN = "dxos.org/plugin/presenter";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: PRESENTER_PLUGIN,
|
|
5
|
-
name: "Presenter",
|
|
6
|
-
description: "Present documents as slideshows.",
|
|
7
|
-
icon: "ph--presentation--regular",
|
|
8
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
PRESENTER_PLUGIN,
|
|
13
|
-
meta
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=chunk-VSD5LSE5.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const PRESENTER_PLUGIN = 'dxos.org/plugin/presenter';\n\nexport const meta: PluginMeta = {\n id: PRESENTER_PLUGIN,\n name: 'Presenter',\n description: 'Present documents as slideshows.',\n icon: 'ph--presentation--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-presenter',\n};\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["PRESENTER_PLUGIN", "meta", "id", "name", "description", "icon", "source"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport { type Context, createContext } from 'react';\n\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { DataType } from '@dxos/schema';\n\nimport { PRESENTER_PLUGIN } from './meta';\n\nexport namespace PresenterAction {\n const PRESENTER_ACTION = `${PRESENTER_PLUGIN}/action`;\n\n export class TogglePresentation extends Schema.TaggedClass<TogglePresentation>()(\n `${PRESENTER_ACTION}/toggle-presentation`,\n {\n input: Schema.Struct({\n object: Schema.Union(Markdown.Document, DataType.Collection),\n state: Schema.optional(Schema.Boolean),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n\nexport type PresenterContextType = {\n running: boolean;\n start: () => void;\n stop: () => void;\n};\n\nexport const PresenterContext: Context<PresenterContextType> = createContext<PresenterContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport const PresenterSettingsSchema = Schema.mutable(\n Schema.Struct({\n presentCollections: Schema.optional(Schema.Boolean),\n }),\n);\n\nexport type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AACvB,SAAuBC,qBAAqB;AAE5C,SAASC,gBAAgB;AACzB,SAASC,gBAAgB;UAIRC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,gBAAAA;EAErB,MAAMC,2BAA2BC,OAAOC,YAAW,EACxD,GAAGJ,gBAAAA,wBACH;IACEK,OAAOF,OAAOG,OAAO;MACnBC,QAAQJ,OAAOK,MAAMC,SAASC,UAAUC,SAASC,UAAU;MAC3DC,OAAOV,OAAOW,SAASX,OAAOY,OAAO;IACvC,CAAA;IACAC,QAAQb,OAAOc;EACjB,CAAA,EAAA;EACC;mBATUf,qBAAAA;AAUf,GAbiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;AAqBV,IAAMmB,mBAAkDC,cAAoC;EACjGC,SAAS;EACTC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;AAEO,IAAMC,0BAA0BpB,OAAOqB,QAC5CrB,OAAOG,OAAO;EACZmB,oBAAoBtB,OAAOW,SAASX,OAAOY,OAAO;AACpD,CAAA,CAAA;;",
|
|
6
|
-
"names": ["Schema", "createContext", "Markdown", "DataType", "PresenterAction", "PRESENTER_ACTION", "PRESENTER_PLUGIN", "TogglePresentation", "Schema", "TaggedClass", "input", "Struct", "object", "Union", "Markdown", "Document", "DataType", "Collection", "state", "optional", "Boolean", "output", "Void", "PresenterContext", "createContext", "running", "start", "stop", "PresenterSettingsSchema", "mutable", "presentCollections"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { SettingsStore } from '@dxos/local-storage';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { DataType } from '@dxos/schema';\n\nimport {\n CollectionPresenterContainer,\n DocumentPresenterContainer,\n MarkdownSlide,\n PresenterSettings,\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: { type: typeof PRESENTER_PLUGIN; object: Markdown.Document } } =>\n !!data.subject &&\n typeof data.subject === 'object' &&\n 'type' in data.subject &&\n 'object' in data.subject &&\n data.subject.type === PRESENTER_PLUGIN &&\n Obj.instanceOf(Markdown.Document, data.subject.object),\n component: ({ data }) => <DocumentPresenterContainer document={data.subject.object} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/collection`,\n role: 'article',\n position: 'hoist',\n filter: (data): data is { subject: { type: typeof PRESENTER_PLUGIN; object: DataType.Collection } } =>\n !!data.subject &&\n typeof data.subject === 'object' &&\n 'type' in data.subject &&\n 'object' in data.subject &&\n data.subject.type === PRESENTER_PLUGIN &&\n Obj.instanceOf(DataType.Collection, data.subject.object),\n component: ({ data }) => <CollectionPresenterContainer collection={data.subject.object} />,\n }),\n createSurface({\n id: `${PRESENTER_PLUGIN}/slide`,\n role: 'slide',\n filter: (data): data is { subject: Markdown.Document } => Obj.instanceOf(Markdown.Document, 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,gBAAgB;AACzB,SAASC,gBAAgB;AAWzB,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACP,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASN,oBACtBO,IAAIC,WAAWC,SAASC,UAAUN,KAAKC,QAAQM,MAAM;IACvDC,WAAW,CAAC,EAAER,KAAI,MAAO,sBAAA,cAACS,4BAAAA;MAA2BC,UAAUV,KAAKC,QAAQM;;EAC9E,CAAA;EACAb,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACP,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASN,oBACtBO,IAAIC,WAAWO,SAASC,YAAYZ,KAAKC,QAAQM,MAAM;IACzDC,WAAW,CAAC,EAAER,KAAI,MAAO,sBAAA,cAACa,8BAAAA;MAA6BC,YAAYd,KAAKC,QAAQM;;EAClF,CAAA;EACAb,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SAAiDG,IAAIC,WAAWC,SAASC,UAAUN,KAAKC,OAAO;IACxGO,WAAW,CAAC,EAAER,KAAI,MAAO,sBAAA,cAACe,eAAAA;MAAcL,UAAUV,KAAKC;;EACzD,CAAA;EACAP,cAAc;IACZC,IAAI,GAAGC,gBAAAA;IACPC,MAAM;IACNE,QAAQ,CAACC,SACPA,KAAKC,mBAAmBe,iBAAiBhB,KAAKC,QAAQgB,WAAWrB;IACnEY,WAAW,CAAC,EAAER,MAAM,EAAEC,QAAO,EAAE,MAAO,sBAAA,cAACiB,mBAAAA;MAAkBC,UAAUlB,QAAQmB;;EAC7E,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "SettingsStore", "Markdown", "DataType", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PRESENTER_PLUGIN", "role", "position", "filter", "data", "subject", "type", "Obj", "instanceOf", "Markdown", "Document", "object", "component", "DocumentPresenterContainer", "document", "DataType", "Collection", "CollectionPresenterContainer", "collection", "MarkdownSlide", "SettingsStore", "prefix", "PresenterSettings", "settings", "value"]
|
|
7
|
-
}
|