@dxos/plugin-presenter 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb

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.
Files changed (52) hide show
  1. package/dist/lib/browser/{CollectionPresenterContainer-IHDZWP3U.mjs → CollectionPresenterContainer-WE7HOMFY.mjs} +5 -5
  2. package/dist/lib/browser/CollectionPresenterContainer-WE7HOMFY.mjs.map +7 -0
  3. package/dist/lib/browser/{DocumentPresenterContainer-74M6XAAI.mjs → DocumentPresenterContainer-3BU2DS5E.mjs} +3 -3
  4. package/dist/lib/browser/DocumentPresenterContainer-3BU2DS5E.mjs.map +7 -0
  5. package/dist/lib/browser/{app-graph-builder-2QAQR34J.mjs → app-graph-builder-OH6QU3DC.mjs} +6 -5
  6. package/dist/lib/browser/app-graph-builder-OH6QU3DC.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-GM4KOXJY.mjs → chunk-46CHA6Y5.mjs} +4 -4
  8. package/dist/lib/browser/chunk-46CHA6Y5.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-5MC4V23G.mjs → chunk-L7QYO6LF.mjs} +6 -6
  10. package/dist/lib/browser/chunk-L7QYO6LF.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +12 -11
  12. package/dist/lib/browser/index.mjs.map +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{react-surface-2VP2M4Z7.mjs → react-surface-QY4ETW6S.mjs} +11 -10
  15. package/dist/lib/browser/react-surface-QY4ETW6S.mjs.map +7 -0
  16. package/dist/lib/browser/{settings-RDHXCCT4.mjs → settings-OLQ7QNLC.mjs} +4 -3
  17. package/dist/lib/browser/settings-OLQ7QNLC.mjs.map +7 -0
  18. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  19. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
  21. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
  23. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/settings/index.d.ts +1 -1
  25. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/settings/settings.d.ts +3 -2
  27. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -1
  28. package/dist/types/src/components/CollectionPresenterContainer.d.ts +1 -1
  29. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +1 -1
  30. package/dist/types/src/components/index.d.ts +1 -1
  31. package/dist/types/src/types.d.ts +1 -1
  32. package/dist/types/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +34 -33
  34. package/src/PresenterPlugin.tsx +6 -5
  35. package/src/capabilities/app-graph-builder/app-graph-builder.ts +5 -4
  36. package/src/capabilities/react-surface/react-surface.tsx +10 -9
  37. package/src/capabilities/settings/settings.ts +3 -2
  38. package/src/components/CollectionPresenterContainer.tsx +4 -3
  39. package/src/components/DocumentPresenterContainer.tsx +1 -1
  40. package/src/components/Markdown/Container.stories.tsx +1 -1
  41. package/src/components/Markdown/Slide.stories.tsx +1 -1
  42. package/src/components/Presenter/Pager.stories.tsx +1 -1
  43. package/src/components/PresenterSettings.tsx +9 -9
  44. package/src/components/RevealPlayer/RevealPlayer.stories.tsx +1 -1
  45. package/src/useExitPresenter.ts +3 -3
  46. package/dist/lib/browser/CollectionPresenterContainer-IHDZWP3U.mjs.map +0 -7
  47. package/dist/lib/browser/DocumentPresenterContainer-74M6XAAI.mjs.map +0 -7
  48. package/dist/lib/browser/app-graph-builder-2QAQR34J.mjs.map +0 -7
  49. package/dist/lib/browser/chunk-5MC4V23G.mjs.map +0 -7
  50. package/dist/lib/browser/chunk-GM4KOXJY.mjs.map +0 -7
  51. package/dist/lib/browser/react-surface-2VP2M4Z7.mjs.map +0 -7
  52. package/dist/lib/browser/settings-RDHXCCT4.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-presenter",
3
- "version": "0.8.4-main.21d9917",
3
+ "version": "0.8.4-main.2244d791bb",
4
4
  "description": "Braneframe presenter plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -28,8 +28,8 @@
28
28
  "src"
29
29
  ],
30
30
  "dependencies": {
31
- "@effect-atom/atom": "^0.4.13",
32
- "@effect-atom/atom-react": "^0.4.6",
31
+ "@effect-atom/atom": "^0.5.1",
32
+ "@effect-atom/atom-react": "^0.5.0",
33
33
  "hastscript": "^7.1.0",
34
34
  "highlight.js": "^11.9.0",
35
35
  "marked": "^12.0.2",
@@ -40,48 +40,49 @@
40
40
  "remark-frontmatter": "^5.0.0",
41
41
  "remark-parse-frontmatter": "^1.0.3",
42
42
  "reveal.js": "^5.1.0",
43
- "@dxos/app-framework": "0.8.4-main.21d9917",
44
- "@dxos/echo": "0.8.4-main.21d9917",
45
- "@dxos/async": "0.8.4-main.21d9917",
46
- "@dxos/effect": "0.8.4-main.21d9917",
47
- "@dxos/log": "0.8.4-main.21d9917",
48
- "@dxos/plugin-client": "0.8.4-main.21d9917",
49
- "@dxos/operation": "0.8.4-main.21d9917",
50
- "@dxos/plugin-graph": "0.8.4-main.21d9917",
51
- "@dxos/plugin-deck": "0.8.4-main.21d9917",
52
- "@dxos/plugin-markdown": "0.8.4-main.21d9917",
53
- "@dxos/plugin-stack": "0.8.4-main.21d9917",
54
- "@dxos/react-ui-form": "0.8.4-main.21d9917",
55
- "@dxos/react-client": "0.8.4-main.21d9917",
56
- "@dxos/react-ui-mosaic": "0.8.4-main.21d9917",
57
- "@dxos/react-ui-stack": "0.8.4-main.21d9917",
58
- "@dxos/schema": "0.8.4-main.21d9917",
59
- "@dxos/types": "0.8.4-main.21d9917",
60
- "@dxos/util": "0.8.4-main.21d9917"
43
+ "@dxos/app-framework": "0.8.4-main.2244d791bb",
44
+ "@dxos/app-toolkit": "0.8.4-main.2244d791bb",
45
+ "@dxos/async": "0.8.4-main.2244d791bb",
46
+ "@dxos/echo": "0.8.4-main.2244d791bb",
47
+ "@dxos/effect": "0.8.4-main.2244d791bb",
48
+ "@dxos/log": "0.8.4-main.2244d791bb",
49
+ "@dxos/operation": "0.8.4-main.2244d791bb",
50
+ "@dxos/plugin-client": "0.8.4-main.2244d791bb",
51
+ "@dxos/plugin-deck": "0.8.4-main.2244d791bb",
52
+ "@dxos/plugin-graph": "0.8.4-main.2244d791bb",
53
+ "@dxos/plugin-stack": "0.8.4-main.2244d791bb",
54
+ "@dxos/plugin-markdown": "0.8.4-main.2244d791bb",
55
+ "@dxos/react-client": "0.8.4-main.2244d791bb",
56
+ "@dxos/react-ui-mosaic": "0.8.4-main.2244d791bb",
57
+ "@dxos/react-ui-form": "0.8.4-main.2244d791bb",
58
+ "@dxos/schema": "0.8.4-main.2244d791bb",
59
+ "@dxos/react-ui-stack": "0.8.4-main.2244d791bb",
60
+ "@dxos/util": "0.8.4-main.2244d791bb",
61
+ "@dxos/types": "0.8.4-main.2244d791bb"
61
62
  },
62
63
  "devDependencies": {
63
- "@effect-atom/atom-react": "^0.4.6",
64
- "@effect/platform": "0.93.6",
64
+ "@effect-atom/atom-react": "^0.5.0",
65
+ "@effect/platform": "0.94.4",
65
66
  "@types/react": "~19.2.7",
66
67
  "@types/react-dom": "~19.2.3",
67
68
  "@types/reveal.js": "^5.0.3",
68
- "effect": "3.19.11",
69
+ "effect": "3.19.16",
69
70
  "react": "~19.2.3",
70
71
  "react-dom": "~19.2.3",
71
72
  "vite": "7.1.9",
72
- "@dxos/random": "0.8.4-main.21d9917",
73
- "@dxos/storybook-utils": "0.8.4-main.21d9917",
74
- "@dxos/react-ui": "0.8.4-main.21d9917",
75
- "@dxos/ui-theme": "0.8.4-main.21d9917"
73
+ "@dxos/react-ui": "0.8.4-main.2244d791bb",
74
+ "@dxos/random": "0.8.4-main.2244d791bb",
75
+ "@dxos/storybook-utils": "0.8.4-main.2244d791bb",
76
+ "@dxos/ui-theme": "0.8.4-main.2244d791bb"
76
77
  },
77
78
  "peerDependencies": {
78
- "@effect-atom/atom-react": "^0.4.6",
79
- "@effect/platform": "0.93.6",
80
- "effect": "3.19.11",
79
+ "@effect-atom/atom-react": "^0.5.0",
80
+ "@effect/platform": "0.94.4",
81
+ "effect": "3.19.16",
81
82
  "react": "~19.2.3",
82
83
  "react-dom": "~19.2.3",
83
- "@dxos/react-ui": "0.8.4-main.21d9917",
84
- "@dxos/ui-theme": "0.8.4-main.21d9917"
84
+ "@dxos/react-ui": "0.8.4-main.2244d791bb",
85
+ "@dxos/ui-theme": "0.8.4-main.2244d791bb"
85
86
  },
86
87
  "publishConfig": {
87
88
  "access": "public"
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Common, Plugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
8
  import { AppGraphBuilder, PresenterSettings, ReactSurface } from './capabilities';
8
9
  import { meta } from './meta';
@@ -12,9 +13,9 @@ import { translations } from './translations';
12
13
  // TODO(burdon): Map stack content; Slide content type (e.g., markdown, sketch, IPFS image, table, etc.)
13
14
 
14
15
  export const PresenterPlugin = Plugin.define(meta).pipe(
15
- Common.Plugin.addSettingsModule({ activate: PresenterSettings }),
16
- Common.Plugin.addTranslationsModule({ translations }),
17
- Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
18
- Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),
16
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
17
+ AppPlugin.addSettingsModule({ activate: PresenterSettings }),
18
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
19
+ AppPlugin.addTranslationsModule({ translations }),
19
20
  Plugin.make,
20
21
  );
@@ -5,7 +5,8 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import * as Option from 'effect/Option';
7
7
 
8
- import { Capability, Common } from '@dxos/app-framework';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
9
10
  import { Obj } from '@dxos/echo';
10
11
  import { Operation } from '@dxos/operation';
11
12
  import { DeckCapabilities } from '@dxos/plugin-deck';
@@ -72,7 +73,7 @@ export default Capability.makeModule(
72
73
  // TODO(burdon): Allow function so can generate state when activated.
73
74
  // So can set explicit fullscreen state coordinated with current presenter state.
74
75
  data: Effect.fnUntraced(function* () {
75
- const deckState = yield* Common.Capability.getAtomValue(DeckCapabilities.State);
76
+ const deckState = yield* Capabilities.getAtomValue(DeckCapabilities.State);
76
77
  const deck = deckState.decks[deckState.activeDeck];
77
78
  const presenterId = [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR);
78
79
  if (!deck?.fullscreen) {
@@ -81,7 +82,7 @@ export default Capability.makeModule(
81
82
  id: presenterId,
82
83
  });
83
84
  }
84
- yield* Operation.invoke(Common.LayoutOperation.Open, {
85
+ yield* Operation.invoke(LayoutOperation.Open, {
85
86
  subject: [presenterId],
86
87
  workspace: spaceId,
87
88
  });
@@ -100,6 +101,6 @@ export default Capability.makeModule(
100
101
  },
101
102
  });
102
103
 
103
- return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
104
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
104
105
  }),
105
106
  );
@@ -5,8 +5,9 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import React from 'react';
7
7
 
8
- import { Capability, Common } from '@dxos/app-framework';
9
- import { useSettingsState } from '@dxos/app-framework/react';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface, useSettingsState } from '@dxos/app-framework/ui';
10
+ import { AppCapabilities } from '@dxos/app-toolkit';
10
11
  import { Obj } from '@dxos/echo';
11
12
  import { Markdown } from '@dxos/plugin-markdown/types';
12
13
  import { Collection } from '@dxos/schema';
@@ -22,8 +23,8 @@ import { type PresenterSettingsProps } from '../../types';
22
23
 
23
24
  export default Capability.makeModule(() =>
24
25
  Effect.succeed(
25
- Capability.contributes(Common.Capability.ReactSurface, [
26
- Common.createSurface({
26
+ Capability.contributes(Capabilities.ReactSurface, [
27
+ Surface.create({
27
28
  id: `${meta.id}/document`,
28
29
  role: 'article',
29
30
  position: 'hoist',
@@ -36,7 +37,7 @@ export default Capability.makeModule(() =>
36
37
  Obj.instanceOf(Markdown.Document, data.subject.object),
37
38
  component: ({ data }) => <DocumentPresenterContainer document={data.subject.object} />,
38
39
  }),
39
- Common.createSurface({
40
+ Surface.create({
40
41
  id: `${meta.id}/collection`,
41
42
  role: 'article',
42
43
  position: 'hoist',
@@ -49,17 +50,17 @@ export default Capability.makeModule(() =>
49
50
  Obj.instanceOf(Collection.Collection, data.subject.object),
50
51
  component: ({ role, data }) => <CollectionPresenterContainer role={role} subject={data.subject.object} />,
51
52
  }),
52
- Common.createSurface({
53
+ Surface.create({
53
54
  id: `${meta.id}/slide`,
54
55
  role: 'slide',
55
56
  filter: (data): data is { subject: Markdown.Document } => Obj.instanceOf(Markdown.Document, data.subject),
56
57
  component: ({ data }) => <MarkdownSlide document={data.subject} />,
57
58
  }),
58
- Common.createSurface({
59
+ Surface.create({
59
60
  id: `${meta.id}/plugin-settings`,
60
61
  role: 'article',
61
- filter: (data): data is { subject: Common.Capability.Settings } =>
62
- Common.Capability.isSettings(data.subject) && data.subject.prefix === meta.id,
62
+ filter: (data): data is { subject: AppCapabilities.Settings } =>
63
+ AppCapabilities.isSettings(data.subject) && data.subject.prefix === meta.id,
63
64
  component: ({ data: { subject } }) => {
64
65
  const { settings, updateSettings } = useSettingsState<PresenterSettingsProps>(subject.atom);
65
66
  return <PresenterSettings settings={settings} onSettingsChange={updateSettings} />;
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { Capability, Common } from '@dxos/app-framework';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
8
9
  import { createKvsStore } from '@dxos/effect';
9
10
 
10
11
  import { meta } from '../../meta';
@@ -20,7 +21,7 @@ export default Capability.makeModule(() =>
20
21
 
21
22
  return [
22
23
  Capability.contributes(PresenterCapabilities.Settings, settingsAtom),
23
- Capability.contributes(Common.Capability.Settings, {
24
+ Capability.contributes(AppCapabilities.Settings, {
24
25
  prefix: meta.id,
25
26
  schema: PresenterSettingsSchema,
26
27
  atom: settingsAtom,
@@ -4,8 +4,9 @@
4
4
 
5
5
  import React, { useContext, useState } from 'react';
6
6
 
7
- import { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';
8
- import { Layout } from '@dxos/react-ui-mosaic';
7
+ import { Surface } from '@dxos/app-framework/ui';
8
+ import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
9
+ import { Layout } from '@dxos/react-ui';
9
10
  import { type Collection } from '@dxos/schema';
10
11
 
11
12
  import { PresenterContext } from '../types';
@@ -34,7 +35,7 @@ const CollectionPresenterContainer = ({ role, subject: collection }: CollectionP
34
35
  />
35
36
  }
36
37
  >
37
- <Surface role='slide' data={{ subject: collection.objects[slide] }} />
38
+ <Surface.Surface role='slide' data={{ subject: collection.objects[slide] }} />
38
39
  </PresenterLayout>
39
40
  </Layout.Main>
40
41
  );
@@ -4,7 +4,7 @@
4
4
  import React, { type FC } from 'react';
5
5
 
6
6
  import { type Markdown } from '@dxos/plugin-markdown/types';
7
- import { Layout } from '@dxos/react-ui-mosaic';
7
+ import { Layout } from '@dxos/react-ui';
8
8
 
9
9
  import { useExitPresenter } from '../useExitPresenter';
10
10
 
@@ -23,7 +23,7 @@ const DefaultStory = ({ content = '' }: SlideProps) => {
23
23
  const meta = {
24
24
  title: 'plugins/plugin-presenter/Container',
25
25
  render: DefaultStory,
26
- decorators: [withTheme],
26
+ decorators: [withTheme()],
27
27
  parameters: {
28
28
  layout: 'fullscreen',
29
29
  },
@@ -13,7 +13,7 @@ import { Slide } from './Slide';
13
13
  const meta = {
14
14
  title: 'plugins/plugin-presenter/Slide',
15
15
  component: Slide,
16
- decorators: [withTheme],
16
+ decorators: [withTheme()],
17
17
  parameters: {
18
18
  layout: 'fullscreen',
19
19
  },
@@ -25,7 +25,7 @@ const DefaultStory = ({ count = 20 }: PagerProps) => {
25
25
  const meta = {
26
26
  title: 'plugins/plugin-presenter/Pager',
27
27
  render: DefaultStory,
28
- decorators: [withTheme],
28
+ decorators: [withTheme()],
29
29
  parameters: {
30
30
  layout: 'centered',
31
31
  },
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Input, useTranslation } from '@dxos/react-ui';
8
- import { ControlGroup, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
8
+ import { Settings } from '@dxos/react-ui-form';
9
9
 
10
10
  import { meta } from '../meta';
11
11
  import { type PresenterSettingsProps } from '../types';
@@ -19,17 +19,17 @@ export const PresenterSettings = ({ settings, onSettingsChange }: PresenterSetti
19
19
  const { t } = useTranslation(meta.id);
20
20
 
21
21
  return (
22
- <ControlPage>
23
- <ControlSection title={t('settings title', { ns: meta.id })}>
24
- <ControlGroup>
25
- <ControlItemInput title={t('present collections label')}>
22
+ <Settings.Root>
23
+ <Settings.Section title={t('settings title', { ns: meta.id })}>
24
+ <Settings.Group>
25
+ <Settings.ItemInput title={t('present collections label')}>
26
26
  <Input.Switch
27
27
  checked={settings.presentCollections}
28
28
  onCheckedChange={(checked) => onSettingsChange((s) => ({ ...s, presentCollections: !!checked }))}
29
29
  />
30
- </ControlItemInput>
31
- </ControlGroup>
32
- </ControlSection>
33
- </ControlPage>
30
+ </Settings.ItemInput>
31
+ </Settings.Group>
32
+ </Settings.Section>
33
+ </Settings.Root>
34
34
  );
35
35
  };
@@ -22,7 +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
+ decorators: [withTheme()],
26
26
  parameters: {
27
27
  layout: 'fullscreen',
28
28
  translations,
@@ -5,8 +5,8 @@
5
5
  import { useAtomValue } from '@effect-atom/atom-react';
6
6
  import { useCallback, useMemo } from 'react';
7
7
 
8
- import { Common } from '@dxos/app-framework';
9
- import { useCapability, useOperationInvoker } from '@dxos/app-framework/react';
8
+ import { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';
9
+ import { LayoutOperation } from '@dxos/app-toolkit';
10
10
  import { Obj } from '@dxos/echo';
11
11
  import { DeckCapabilities } from '@dxos/plugin-deck';
12
12
  import { DeckOperation } from '@dxos/plugin-deck/types';
@@ -27,7 +27,7 @@ export const useExitPresenter = (object: any) => {
27
27
  id: objectId,
28
28
  });
29
29
  }
30
- return invokePromise(Common.LayoutOperation.Open, {
30
+ return invokePromise(LayoutOperation.Open, {
31
31
  subject: [objectId],
32
32
  workspace: Obj.getDatabase(object)?.spaceId,
33
33
  });
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/CollectionPresenterContainer.tsx", "../../../src/components/Presenter/Layout.tsx", "../../../src/components/Presenter/Pager.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useContext, useState } from 'react';\n\nimport { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';\nimport { Layout } from '@dxos/react-ui-mosaic';\nimport { type Collection } from '@dxos/schema';\n\nimport { PresenterContext } from '../types';\nimport { useExitPresenter } from '../useExitPresenter';\n\nimport { PageNumber, Pager, Layout as PresenterLayout } from './Presenter';\n\ntype CollectionPresenterContainerProps = SurfaceComponentProps<Collection.Collection>;\n\nconst CollectionPresenterContainer = ({ role, subject: collection }: CollectionPresenterContainerProps) => {\n const [slide, setSlide] = useState(0);\n const { running } = useContext(PresenterContext);\n const handleExit = useExitPresenter(collection);\n\n return (\n <Layout.Main role={role} classNames='relative'>\n <PresenterLayout\n bottomRight={<PageNumber index={slide} count={collection.objects.length} />}\n bottomLeft={\n <Pager\n index={slide}\n count={collection.objects.length}\n keys={running}\n onChange={setSlide}\n onExit={handleExit}\n />\n }\n >\n <Surface role='slide' data={{ subject: collection.objects[slide] }} />\n </PresenterLayout>\n </Layout.Main>\n );\n};\n\nexport default CollectionPresenterContainer;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type PropsWithChildren, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nexport type LayoutProps = ThemedClassName<\n PropsWithChildren<{\n className?: string;\n topLeft?: ReactNode;\n topRight?: ReactNode;\n bottomLeft?: ReactNode;\n bottomRight?: ReactNode;\n }>\n>;\n\nexport const Layout = ({ children, classNames, topLeft, topRight, bottomLeft, bottomRight }: LayoutProps) => {\n return (\n <div className={mx('flex grow relative overflow-hidden bg-attention', classNames)}>\n <div className={mx('flex flex-col grow overflow-hidden')}>{children}</div>\n\n <div className='z-[200]'>\n <div className='absolute top-4 left-4'>{topLeft}</div>\n <div className='absolute top-4 right-4'>{topRight}</div>\n <div className='absolute bottom-4 left-4'>{bottomLeft}</div>\n <div className='absolute bottom-4 right-4'>{bottomRight}</div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect } from 'react';\n\nimport { IconButton, useControlledState } from '@dxos/react-ui';\n\nexport type PagerProps = {\n index?: number;\n count?: number;\n keys?: boolean; // TODO(burdon): Rename.\n onChange?: (index: number) => void;\n onExit?: () => void;\n};\n\nexport const Pager = ({ index: indexProp = 0, count = 0, keys, onChange, onExit }: PagerProps) => {\n const [index, setIndex] = useControlledState(indexProp);\n useEffect(() => {\n onChange?.(index);\n }, [index]);\n\n const handleChangeIndex = (dir: number) => {\n setIndex((index) => {\n const next = index + dir;\n return next >= 0 && next < count ? next : index;\n });\n };\n\n // TODO(burdon): Standardize via system key binding.\n useEffect(() => {\n if (!keys) {\n return;\n }\n\n const keydownHandler = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Escape': {\n onExit?.();\n break;\n }\n case 'ArrowLeft': {\n if (event.shiftKey) {\n onChange?.(0);\n } else {\n handleChangeIndex(-1);\n }\n break;\n }\n case 'ArrowRight': {\n if (event.shiftKey) {\n onChange?.(count - 1);\n } else {\n handleChangeIndex(1);\n }\n break;\n }\n case 'ArrowUp': {\n onChange?.(0);\n break;\n }\n case 'ArrowDown': {\n onChange?.(count - 1);\n break;\n }\n }\n };\n\n window.addEventListener('keydown', keydownHandler);\n return () => window.removeEventListener('keydown', keydownHandler);\n }, [keys, count]);\n\n if (index === undefined || !count) {\n return null;\n }\n\n return (\n <div className='flex items-center text-neutral-500'>\n <IconButton\n icon='ph--caret-double-left--regular'\n size={6}\n label='Jump to first'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0'\n onClick={() => onChange?.(0)}\n />\n <IconButton\n icon='ph--caret-left--regular'\n size={6}\n label='Previous'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0'\n onClick={() => handleChangeIndex(-1)}\n />\n <IconButton\n icon='ph--caret-right--regular'\n size={6}\n label='Next'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0'\n onClick={() => handleChangeIndex(1)}\n />\n <IconButton\n icon='ph--caret-double-right--regular'\n size={6}\n label='Jump to last'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0'\n onClick={() => onChange?.(count - 1)}\n />\n </div>\n );\n};\n\nexport type PageNumberProps = {\n index?: number;\n count?: number;\n};\n\nexport const PageNumber = ({ index = 0, count = 1 }: PageNumberProps) => {\n if (index === undefined || !count) {\n return null;\n }\n\n return (\n <div className='flex items-center text-neutral-500 text-2xl'>\n <div>\n {index + 1} / {count}\n </div>\n </div>\n );\n};\n\nexport const StartButton = ({ running, onClick }: { running?: boolean; onClick?: (start: boolean) => void }) => {\n return (\n <IconButton\n icon={running ? 'ph--x--regular' : 'ph--play--regular'}\n size={6}\n label={running ? 'Stop' : 'Play'}\n iconOnly\n no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YAAW;IACXC,SAAS,MAAM3B,WAAWF,QAAQ,CAAA;;AAI1C;AAOO,IAAM8B,aAAa,CAAC,EAAEhC,QAAQ,GAAGE,QAAQ,EAAC,MAAmB;AAClE,MAAIF,UAAUmB,UAAa,CAACjB,OAAO;AACjC,WAAO;EACT;AAEA,SACE,gBAAAkB,OAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,gBAAAF,OAAA,cAACC,OAAAA,MACErB,QAAQ,GAAE,OAAIE,KAAAA,CAAAA;AAIvB;;;AF1HA,IAAM+B,+BAA+B,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAAqC;AACpG,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAS,CAAA;AACnC,QAAM,EAAEC,QAAO,IAAKC,WAAWC,gBAAAA;AAC/B,QAAMC,aAAaC,iBAAiBR,UAAAA;AAEpC,SACE,gBAAAS,OAAA,cAACC,QAAOC,MAAI;IAACb;IAAYc,YAAW;KAClC,gBAAAH,OAAA,cAACI,QAAAA;IACCC,aAAa,gBAAAL,OAAA,cAACM,YAAAA;MAAWC,OAAOf;MAAOgB,OAAOjB,WAAWkB,QAAQC;;IACjEC,YACE,gBAAAX,OAAA,cAACY,OAAAA;MACCL,OAAOf;MACPgB,OAAOjB,WAAWkB,QAAQC;MAC1BG,MAAMlB;MACNmB,UAAUrB;MACVsB,QAAQjB;;KAIZ,gBAAAE,OAAA,cAACgB,SAAAA;IAAQ3B,MAAK;IAAQ4B,MAAM;MAAE3B,SAASC,WAAWkB,QAAQjB,KAAAA;IAAO;;AAIzE;AAEA,IAAA,uCAAeJ;",
6
- "names": ["React", "useContext", "useState", "Surface", "Layout", "React", "mx", "Layout", "children", "classNames", "topLeft", "topRight", "bottomLeft", "bottomRight", "div", "className", "mx", "React", "useEffect", "IconButton", "useControlledState", "Pager", "index", "indexProp", "count", "keys", "onChange", "onExit", "setIndex", "useControlledState", "useEffect", "handleChangeIndex", "dir", "next", "keydownHandler", "event", "key", "shiftKey", "window", "addEventListener", "removeEventListener", "undefined", "React", "div", "className", "IconButton", "icon", "size", "label", "iconOnly", "noTooltip", "variant", "classNames", "onClick", "PageNumber", "CollectionPresenterContainer", "role", "subject", "collection", "slide", "setSlide", "useState", "running", "useContext", "PresenterContext", "handleExit", "useExitPresenter", "React", "Layout", "Main", "classNames", "PresenterLayout", "bottomRight", "PageNumber", "index", "count", "objects", "length", "bottomLeft", "Pager", "keys", "onChange", "onExit", "Surface", "data"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/DocumentPresenterContainer.tsx", "../../../src/components/RevealPlayer/RevealPlayer.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\nimport React, { type FC } from 'react';\n\nimport { type Markdown } from '@dxos/plugin-markdown/types';\nimport { Layout } from '@dxos/react-ui-mosaic';\n\nimport { useExitPresenter } from '../useExitPresenter';\n\nimport { RevealPlayer } from './RevealPlayer';\n\nconst DocumentPresenterContainer: FC<{ document: Markdown.Document }> = ({ document }) => {\n const handleExit = useExitPresenter(document);\n\n return (\n <Layout.Main classNames='relative'>\n <RevealPlayer content={document.content.target?.content ?? ''} onExit={handleExit} />\n </Layout.Main>\n );\n};\n\nexport default DocumentPresenterContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport 'reveal.js/dist/reveal.css';\n\nimport 'reveal.js/dist/theme/black.css';\n\n// https://github.com/highlightjs/highlight.js/tree/main/src/styles\n// import 'highlight.js/styles/github-dark.css';\nimport 'highlight.js/styles/tokyo-night-dark.css';\n\nimport hljs from 'highlight.js';\nimport typescript from 'highlight.js/lib/languages/typescript';\nimport React, { useRef } from 'react';\nimport Reveal from 'reveal.js';\nimport RevealHighlight from 'reveal.js/plugin/highlight/highlight';\nimport RevealMarkdown from 'reveal.js/plugin/markdown/plugin.js';\n\nimport { type ThemedClassName, useAsyncEffect } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nconst styles = `\n<style type=\"text/css\">\n .reveal h1 {\n font-weight: 100;\n font-size: 60px;\n opacity: 0.5;\n }\n .reveal h2 {\n font-weight: 100;\n padding-top: 60px;\n padding-left: 40px;\n font-size: 48px;\n opacity: 0.3;\n }\n .reveal h1, h2, p {\n font-family: \"Raleway\", sans-serif;\n text-align: left;\n font-weight: 200;\n }\n .reveal ul {\n font-family: \"Raleway\", sans-serif;\n display: block;\n list-style: \"- \";\n }\n .reveal blockquote p {\n text-align: center;\n font-weight: 100;\n padding: 32px;\n }\n .reveal pre {\n margin-left: 0;\n }\n .reveal code {\n font-size: 20px;\n background: #111111;\n color: #eeeeee;\n max-height: unset !important;\n }\n</style>\n`;\n\nexport type RevealProps = ThemedClassName<{\n content: string;\n slide?: number;\n fullscreen?: boolean;\n onExit?: () => void;\n}>;\n\nexport const RevealPlayer = ({ classNames, content, slide, fullscreen = true, onExit }: RevealProps) => {\n const deckDivRef = useRef<HTMLDivElement>(null);\n const deckRef = useRef<Reveal.Api | null>(null);\n\n useAsyncEffect(async () => {\n if (deckRef.current) {\n return;\n }\n\n // Required for syntax highlighting.\n hljs.registerLanguage('typescript', typescript);\n\n // https://revealjs.com/react\n // https://revealjs.com/config\n // https://github.com/hakimel/reveal.js\n // TODO(burdon): Fragments and scroll view steps 2 at a time (safe mode?)\n deckRef.current = new Reveal(deckDivRef.current!, {\n // view: 'scroll',\n progress: false,\n transition: 'none',\n slideNumber: false,\n embedded: true,\n\n // Disable autoplay to prevent errors in headless environments (e.g., CI).\n autoPlayMedia: false,\n\n // TODO(burdon): Speaker view requires server to serve popout window.\n // https://revealjs.com/speaker-view\n showNotes: false,\n\n // width: 1600,\n // height: 900,\n margin: 0.1,\n // center: false,\n // minScale: 0.1,\n // maxScale: 1.4,\n\n // https://revealjs.com/markdown\n // TODO(burdon): Requires server to serve popout window.\n plugins: [RevealMarkdown, RevealHighlight],\n\n // See https://marked.js.org/using_advanced#options\n markdown: {\n gfm: true,\n smartypants: true,\n highlight: (code, language) => {\n if (language) {\n return hljs.highlight(code, { language }).value;\n }\n\n return hljs.highlightAuto(code).value;\n },\n },\n });\n\n await deckRef.current.initialize();\n\n if (slide !== undefined) {\n deckRef.current.slide(slide < 0 ? deckRef.current?.getTotalSlides() + slide : slide - 1);\n }\n\n deckRef.current.addKeyBinding({ keyCode: 27, key: 'Escape', description: 'Exit full screen' }, () => {\n onExit?.();\n });\n\n return () => {\n try {\n if (deckRef.current) {\n deckRef.current.destroy();\n deckRef.current = null;\n }\n } catch {\n // Ignore.\n }\n };\n });\n\n // TOOD(burdon): Trap cursor keys (otherwise tabster grabs focus.)\n return (\n <div\n className={mx(\n 'grid place-items-center is-full bs-full overflow-hidden bg-black',\n fullscreen && 'absolute inset-0',\n classNames,\n )}\n >\n <div className='relative aspect-video is-full bs-full bs-auto max-bs-full overflow-hidden'>\n <div ref={deckDivRef} className='absolute inset-0 reveal'>\n {/* NOTE: Must be in head. */}\n <style>\n <link rel='preconnect' href='https://fonts.googleapis.com' />\n <link rel='preconnect' href='https://fonts.gstatic.com' {...{ crossOrigin: '' }} />\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap'\n />\n </style>\n <div className='slides'>\n <div className='!text-center' />\n <section {...{ 'data-markdown': [] }}>\n <textarea {...{ 'data-template': true }} defaultValue={[styles, content].join('\\n')}></textarea>\n </section>\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;AAGA,OAAOA,YAAwB;AAG/B,SAASC,cAAc;;;ACFvB,OAAO;AAEP,OAAO;AAIP,OAAO;AAEP,OAAOC,UAAU;AACjB,OAAOC,gBAAgB;AACvB,OAAOC,SAASC,cAAc;AAC9B,OAAOC,YAAY;AACnB,OAAOC,qBAAqB;AAC5B,OAAOC,oBAAoB;AAE3B,SAA+BC,sBAAsB;AACrD,SAASC,UAAU;AAEnB,IAAMC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDR,IAAMC,eAAe,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,WAAU;KAE9B,sBAAA,cAACG,SAAAA,MACC,sBAAA,cAACC,QAAAA;IAAKC,KAAI;IAAaC,MAAK;MAC5B,sBAAA,cAACF,QAAAA;IAAKC,KAAI;IAAaC,MAAK;IAAkCC,aAAa;MAC3E,sBAAA,cAACH,QAAAA;IACCC,KAAI;IACJC,MAAK;OAGT,sBAAA,cAACP,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACD,OAAAA;IAAIC,WAAU;MACf,sBAAA,cAACQ,WAAY;IAAE,iBAAiB,CAAA;EAAG,GACjC,sBAAA,cAACC,YAAAA;IAAe,iBAAiB;IAAQC,cAAc;MAACrD;MAAQG;MAASmD,KAAK,IAAA;;AAO5F;;;ADrKA,IAAMC,6BAAkE,CAAC,EAAEC,SAAQ,MAAE;AACnF,QAAMC,aAAaC,iBAAiBF,QAAAA;AAEpC,SACE,gBAAAG,OAAA,cAACC,OAAOC,MAAI;IAACC,YAAW;KACtB,gBAAAH,OAAA,cAACI,cAAAA;IAAaC,SAASR,SAASQ,QAAQC,QAAQD,WAAW;IAAIE,QAAQT;;AAG7E;AAEA,IAAA,qCAAeF;",
6
- "names": ["React", "Layout", "hljs", "typescript", "React", "useRef", "Reveal", "RevealHighlight", "RevealMarkdown", "useAsyncEffect", "mx", "styles", "RevealPlayer", "classNames", "content", "slide", "fullscreen", "onExit", "deckDivRef", "useRef", "deckRef", "useAsyncEffect", "current", "hljs", "registerLanguage", "typescript", "Reveal", "progress", "transition", "slideNumber", "embedded", "autoPlayMedia", "showNotes", "margin", "plugins", "RevealMarkdown", "RevealHighlight", "markdown", "gfm", "smartypants", "highlight", "code", "language", "value", "highlightAuto", "initialize", "undefined", "getTotalSlides", "addKeyBinding", "keyCode", "key", "description", "destroy", "div", "className", "mx", "ref", "style", "link", "rel", "href", "crossOrigin", "section", "textarea", "defaultValue", "join", "DocumentPresenterContainer", "document", "handleExit", "useExitPresenter", "React", "Layout", "Main", "classNames", "RevealPlayer", "content", "target", "onExit"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';\nimport { GraphBuilder, type Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { Collection } from '@dxos/schema';\n\nimport { meta } from '../../meta';\nimport { PresenterCapabilities, PresenterOperation } from '../../types';\n\n/** Match nodes that can be presented (Collection or Document). */\nconst whenPresentable = (node: Node.Node) =>\n Option.orElse(NodeMatcher.whenEchoType(Collection.Collection)(node), () =>\n NodeMatcher.whenEchoType(Markdown.Document)(node),\n );\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* GraphBuilder.createExtension({\n id: `${meta.id}/root`,\n // TODO(wittjosiah): This is a hack to work around presenter previously relying on \"variant\". Remove.\n match: whenPresentable,\n connector: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n if (!isPresentable) {\n return Effect.succeed([]);\n }\n const id = Obj.getDXN(object).toString();\n return Effect.succeed([\n {\n id: [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR),\n data: { type: meta.id, object },\n type: meta.id,\n properties: {\n label: 'Presenter',\n icon: 'ph--presentation--regular',\n disposition: 'hidden',\n },\n },\n ]);\n },\n actions: (object, get) => {\n const settingsAtom = capabilities.get(PresenterCapabilities.Settings);\n const settings = get(settingsAtom);\n const isPresentable = settings?.presentCollections\n ? Obj.instanceOf(Collection.Collection, object) || Obj.instanceOf(Markdown.Document, object)\n : Obj.instanceOf(Markdown.Document, object);\n if (!isPresentable) {\n return Effect.succeed([]);\n }\n const dxn = Obj.getDXN(object);\n const id = dxn.toString();\n const { spaceId } = dxn.asEchoDXN()!;\n return Effect.succeed([\n {\n id: `${PresenterOperation.TogglePresentation.meta.key}/${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: Effect.fnUntraced(function* () {\n const deckState = yield* Common.Capability.getAtomValue(DeckCapabilities.State);\n const deck = deckState.decks[deckState.activeDeck];\n const presenterId = [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR);\n if (!deck?.fullscreen) {\n yield* Operation.invoke(DeckOperation.Adjust, {\n type: 'solo--fullscreen' as const,\n id: presenterId,\n });\n }\n yield* Operation.invoke(Common.LayoutOperation.Open, {\n subject: [presenterId],\n workspace: spaceId,\n });\n }),\n properties: {\n label: ['toggle presentation label', { ns: meta.id }],\n icon: 'ph--presentation--regular',\n disposition: 'list-item',\n keyBinding: {\n macos: 'shift+meta+p',\n windows: 'shift+alt+p',\n },\n },\n },\n ]);\n },\n });\n\n return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);\n }),\n);\n"],
5
- "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B,SAASC,wBAAwB;AACjC,SAASC,2BAA2BC,qBAAqB;AACzD,SAASC,cAAyBC,mBAAmB;AACrD,SAASC,gBAAgB;AACzB,SAASC,kBAAkB;AAM3B,IAAMC,kBAAkB,CAACC,SAChBC,cAAOC,YAAYC,aAAaC,WAAWA,UAAU,EAAEJ,IAAAA,GAAO,MACnEE,YAAYC,aAAaE,SAASC,QAAQ,EAAEN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IAAIV,SAAQ;AACvB,YAAM,EAAEW,QAAO,IAAKD,IAAIE,UAAS;AACjC,aAAcd,eAAQ;QACpB;UACEd,IAAI,GAAG6B,mBAAmBC,mBAAmB7B,KAAK8B,GAAG,IAAI/B,EAAAA;;;UAGzDmB,MAAazB,kBAAW,aAAA;AACtB,kBAAMsC,YAAY,OAAOC,OAAOzC,WAAW0C,aAAaC,iBAAiBC,KAAK;AAC9E,kBAAMC,OAAOL,UAAUM,MAAMN,UAAUO,UAAU;AACjD,kBAAMC,cAAc;cAACxC;cAAI;cAAaiB,KAAKC,yBAAAA;AAC3C,gBAAI,CAACmB,MAAMI,YAAY;AACrB,qBAAOC,UAAUC,OAAOC,cAAcC,QAAQ;gBAC5CzB,MAAM;gBACNpB,IAAIwC;cACN,CAAA;YACF;AACA,mBAAOE,UAAUC,OAAOV,OAAOa,gBAAgBC,MAAM;cACnDC,SAAS;gBAACR;;cACVS,WAAWtB;YACb,CAAA;UACF,CAAA;UACAN,YAAY;YACVC,OAAO;cAAC;cAA6B;gBAAE4B,IAAIjD,KAAKD;cAAG;;YACnDuB,MAAM;YACNC,aAAa;YACb2B,YAAY;cACVC,OAAO;cACPC,SAAS;YACX;UACF;QACF;OACD;IACH;EACF,CAAA;AAEA,SAAO7D,WAAW8D,YAAYrB,OAAOzC,WAAW+D,iBAAiB1D,UAAAA;AACnE,CAAA,CAAA;",
6
- "names": ["Effect", "Option", "Capability", "Common", "Obj", "Operation", "DeckCapabilities", "ATTENDABLE_PATH_SEPARATOR", "DeckOperation", "GraphBuilder", "NodeMatcher", "Markdown", "Collection", "whenPresentable", "node", "orElse", "NodeMatcher", "whenEchoType", "Collection", "Markdown", "Document", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "GraphBuilder", "createExtension", "id", "meta", "match", "connector", "object", "get", "settingsAtom", "PresenterCapabilities", "Settings", "settings", "isPresentable", "presentCollections", "Obj", "instanceOf", "succeed", "getDXN", "toString", "join", "ATTENDABLE_PATH_SEPARATOR", "data", "type", "properties", "label", "icon", "disposition", "actions", "dxn", "spaceId", "asEchoDXN", "PresenterOperation", "TogglePresentation", "key", "deckState", "Common", "getAtomValue", "DeckCapabilities", "State", "deck", "decks", "activeDeck", "presenterId", "fullscreen", "Operation", "invoke", "DeckOperation", "Adjust", "LayoutOperation", "Open", "subject", "workspace", "ns", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
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 { meta } from '../meta';\nimport { type PresenterSettingsProps } from '../types';\n\nexport type PresenterSettingsComponentProps = {\n settings: PresenterSettingsProps;\n onSettingsChange: (fn: (current: PresenterSettingsProps) => PresenterSettingsProps) => void;\n};\n\nexport const PresenterSettings = ({ settings, onSettingsChange }: PresenterSettingsComponentProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <ControlPage>\n <ControlSection title={t('settings title', { ns: meta.id })}>\n <ControlGroup>\n <ControlItemInput title={t('present collections label')}>\n <Input.Switch\n checked={settings.presentCollections}\n onCheckedChange={(checked) => onSettingsChange((s) => ({ ...s, 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;AAUrE,IAAMC,oBAAoB,CAAC,EAAEC,UAAUC,iBAAgB,MAAmC;AAC/F,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,SACE,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;IAAeC,OAAON,EAAE,kBAAkB;MAAEO,IAAIL,KAAKC;IAAG,CAAA;KACvD,sBAAA,cAACK,cAAAA,MACC,sBAAA,cAACC,kBAAAA;IAAiBH,OAAON,EAAE,2BAAA;KACzB,sBAAA,cAACU,MAAMC,QAAM;IACXC,SAASd,SAASe;IAClBC,iBAAiB,CAACF,YAAYb,iBAAiB,CAACgB,OAAO;MAAE,GAAGA;MAAGF,oBAAoB,CAAC,CAACD;IAAQ,EAAA;;AAO3G;;;AC9BA,SAASI,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", "onSettingsChange", "t", "useTranslation", "meta", "id", "ControlPage", "ControlSection", "title", "ns", "ControlGroup", "ControlItemInput", "Input", "Switch", "checked", "presentCollections", "onCheckedChange", "s", "lazy", "MarkdownSlide", "lazy", "DocumentPresenterContainer", "CollectionPresenterContainer"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/useExitPresenter.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useMemo } from 'react';\n\nimport { Common } from '@dxos/app-framework';\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/react';\nimport { Obj } from '@dxos/echo';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { DeckOperation } from '@dxos/plugin-deck/types';\n\nexport const useExitPresenter = (object: any) => {\n const { invokePromise } = useOperationInvoker();\n const stateAtom = useCapability(DeckCapabilities.State);\n const state = useAtomValue(stateAtom);\n\n // Compute deck from decks[activeDeck] since the getter doesn't survive spread operations.\n const deck = useMemo(() => state.decks[state.activeDeck], [state.decks, state.activeDeck]);\n\n return useCallback(() => {\n const objectId = Obj.getDXN(object).toString();\n if (deck?.fullscreen) {\n void invokePromise(DeckOperation.Adjust, {\n type: 'solo--fullscreen',\n id: objectId,\n });\n }\n return invokePromise(Common.LayoutOperation.Open, {\n subject: [objectId],\n workspace: Obj.getDatabase(object)?.spaceId,\n });\n }, [invokePromise, object, deck]);\n};\n"],
5
- "mappings": ";AAIA,SAASA,oBAAoB;AAC7B,SAASC,aAAaC,eAAe;AAErC,SAASC,cAAc;AACvB,SAASC,eAAeC,2BAA2B;AACnD,SAASC,WAAW;AACpB,SAASC,wBAAwB;AACjC,SAASC,qBAAqB;AAEvB,IAAMC,mBAAmB,CAACC,WAAAA;AAC/B,QAAM,EAAEC,cAAa,IAAKC,oBAAAA;AAC1B,QAAMC,YAAYC,cAAcC,iBAAiBC,KAAK;AACtD,QAAMC,QAAQC,aAAaL,SAAAA;AAG3B,QAAMM,OAAOC,QAAQ,MAAMH,MAAMI,MAAMJ,MAAMK,UAAU,GAAG;IAACL,MAAMI;IAAOJ,MAAMK;GAAW;AAEzF,SAAOC,YAAY,MAAA;AACjB,UAAMC,WAAWC,IAAIC,OAAOhB,MAAAA,EAAQiB,SAAQ;AAC5C,QAAIR,MAAMS,YAAY;AACpB,WAAKjB,cAAckB,cAAcC,QAAQ;QACvCC,MAAM;QACNC,IAAIR;MACN,CAAA;IACF;AACA,WAAOb,cAAcsB,OAAOC,gBAAgBC,MAAM;MAChDC,SAAS;QAACZ;;MACVa,WAAWZ,IAAIa,YAAY5B,MAAAA,GAAS6B;IACtC,CAAA;EACF,GAAG;IAAC5B;IAAeD;IAAQS;GAAK;AAClC;",
6
- "names": ["useAtomValue", "useCallback", "useMemo", "Common", "useCapability", "useOperationInvoker", "Obj", "DeckCapabilities", "DeckOperation", "useExitPresenter", "object", "invokePromise", "useOperationInvoker", "stateAtom", "useCapability", "DeckCapabilities", "State", "state", "useAtomValue", "deck", "useMemo", "decks", "activeDeck", "useCallback", "objectId", "Obj", "getDXN", "toString", "fullscreen", "DeckOperation", "Adjust", "type", "id", "Common", "LayoutOperation", "Open", "subject", "workspace", "getDatabase", "spaceId"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { useSettingsState } from '@dxos/app-framework/react';\nimport { Obj } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { Collection } from '@dxos/schema';\n\nimport {\n CollectionPresenterContainer,\n DocumentPresenterContainer,\n MarkdownSlide,\n PresenterSettings,\n} from '../../components';\nimport { meta } from '../../meta';\nimport { type PresenterSettingsProps } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: `${meta.id}/document`,\n role: 'article',\n position: 'hoist',\n filter: (data): data is { subject: { type: typeof meta.id; 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 === meta.id &&\n Obj.instanceOf(Markdown.Document, data.subject.object),\n component: ({ data }) => <DocumentPresenterContainer document={data.subject.object} />,\n }),\n Common.createSurface({\n id: `${meta.id}/collection`,\n role: 'article',\n position: 'hoist',\n filter: (data): data is { subject: { type: typeof meta.id; object: Collection.Collection } } =>\n !!data.subject &&\n typeof data.subject === 'object' &&\n 'type' in data.subject &&\n 'object' in data.subject &&\n data.subject.type === meta.id &&\n Obj.instanceOf(Collection.Collection, data.subject.object),\n component: ({ role, data }) => <CollectionPresenterContainer role={role} subject={data.subject.object} />,\n }),\n Common.createSurface({\n id: `${meta.id}/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 Common.createSurface({\n id: `${meta.id}/plugin-settings`,\n role: 'article',\n filter: (data): data is { subject: Common.Capability.Settings } =>\n Common.Capability.isSettings(data.subject) && data.subject.prefix === meta.id,\n component: ({ data: { subject } }) => {\n const { settings, updateSettings } = useSettingsState<PresenterSettingsProps>(subject.atom);\n return <PresenterSettings settings={settings} onSettingsChange={updateSettings} />;\n },\n }),\n ]),\n ),\n);\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,wBAAwB;AACjC,SAASC,WAAW;AACpB,SAASC,gBAAgB;AACzB,SAASC,kBAAkB;AAW3B,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACP,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASN,KAAKD,MAC3BQ,IAAIC,WAAWC,SAASC,UAAUN,KAAKC,QAAQM,MAAM;IACvDC,WAAW,CAAC,EAAER,KAAI,MAAO,sBAAA,cAACS,4BAAAA;MAA2BC,UAAUV,KAAKC,QAAQM;;EAC9E,CAAA;EACAf,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,UAAU;IACVC,QAAQ,CAACC,SACP,CAAC,CAACA,KAAKC,WACP,OAAOD,KAAKC,YAAY,YACxB,UAAUD,KAAKC,WACf,YAAYD,KAAKC,WACjBD,KAAKC,QAAQC,SAASN,KAAKD,MAC3BQ,IAAIC,WAAWO,WAAWA,YAAYX,KAAKC,QAAQM,MAAM;IAC3DC,WAAW,CAAC,EAAEX,MAAMG,KAAI,MAAO,sBAAA,cAACY,8BAAAA;MAA6Bf;MAAYI,SAASD,KAAKC,QAAQM;;EACjG,CAAA;EACAf,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNE,QAAQ,CAACC,SAAiDG,IAAIC,WAAWC,SAASC,UAAUN,KAAKC,OAAO;IACxGO,WAAW,CAAC,EAAER,KAAI,MAAO,sBAAA,cAACa,eAAAA;MAAcH,UAAUV,KAAKC;;EACzD,CAAA;EACAT,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNE,QAAQ,CAACC,SACPR,OAAOJ,WAAW0B,WAAWd,KAAKC,OAAO,KAAKD,KAAKC,QAAQc,WAAWnB,KAAKD;IAC7Ea,WAAW,CAAC,EAAER,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAM,EAAEe,UAAUC,eAAc,IAAKC,iBAAyCjB,QAAQkB,IAAI;AAC1F,aAAO,sBAAA,cAACC,mBAAAA;QAAkBJ;QAAoBK,kBAAkBJ;;IAClE;EACF,CAAA;CACD,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capability", "Common", "useSettingsState", "Obj", "Markdown", "Collection", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "position", "filter", "data", "subject", "type", "Obj", "instanceOf", "Markdown", "Document", "object", "component", "DocumentPresenterContainer", "document", "Collection", "CollectionPresenterContainer", "MarkdownSlide", "isSettings", "prefix", "settings", "updateSettings", "useSettingsState", "atom", "PresenterSettings", "onSettingsChange"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/settings/settings.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { createKvsStore } from '@dxos/effect';\n\nimport { meta } from '../../meta';\nimport { PresenterCapabilities, PresenterSettingsSchema } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.sync(() => {\n const settingsAtom = createKvsStore({\n key: meta.id,\n schema: PresenterSettingsSchema,\n defaultValue: () => ({}),\n });\n\n return [\n Capability.contributes(PresenterCapabilities.Settings, settingsAtom),\n Capability.contributes(Common.Capability.Settings, {\n prefix: meta.id,\n schema: PresenterSettingsSchema,\n atom: settingsAtom,\n }),\n ];\n }),\n);\n"],
5
- "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,sBAAsB;AAK/B,IAAA,mBAAeC,WAAWC,WAAW,MAC5BC,YAAK,MAAA;AACV,QAAMC,eAAeC,eAAe;IAClCC,KAAKC,KAAKC;IACVC,QAAQC;IACRC,cAAc,OAAO,CAAC;EACxB,CAAA;AAEA,SAAO;IACLV,WAAWW,YAAYC,sBAAsBC,UAAUV,YAAAA;IACvDH,WAAWW,YAAYG,OAAOd,WAAWa,UAAU;MACjDE,QAAQT,KAAKC;MACbC,QAAQC;MACRO,MAAMb;IACR,CAAA;;AAEJ,CAAA,CAAA;",
6
- "names": ["Effect", "Capability", "Common", "createKvsStore", "Capability", "makeModule", "sync", "settingsAtom", "createKvsStore", "key", "meta", "id", "schema", "PresenterSettingsSchema", "defaultValue", "contributes", "PresenterCapabilities", "Settings", "Common", "prefix", "atom"]
7
- }