@dxos/plugin-presenter 0.8.2-main.f11618f → 0.8.2-staging.7ac8446

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 (71) hide show
  1. package/dist/lib/browser/{CollectionPresenterContainer-5ETXRUWZ.mjs → PresenterMain-PQPWYIWU.mjs} +42 -15
  2. package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs.map +7 -0
  3. package/dist/lib/browser/{DocumentPresenterContainer-CAPKSXNP.mjs → RevealMain-B2PJXHND.mjs} +27 -13
  4. package/dist/lib/browser/RevealMain-B2PJXHND.mjs.map +7 -0
  5. package/dist/lib/browser/{app-graph-builder-QS5KTYD3.mjs → app-graph-builder-CWMMBJTB.mjs} +5 -25
  6. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-VTBPPB5Z.mjs → chunk-3VVM67QE.mjs} +5 -5
  8. package/dist/lib/browser/{chunk-VTBPPB5Z.mjs.map → chunk-3VVM67QE.mjs.map} +3 -3
  9. package/dist/lib/browser/chunk-FK2KJZ73.mjs +16 -0
  10. package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +31 -12
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +46 -0
  14. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-surface-N23VEZ2O.mjs → react-surface-6JT4CB4B.mjs} +29 -14
  17. package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +7 -0
  18. package/dist/lib/browser/{settings-KWSP73SU.mjs → settings-RBF22MVS.mjs} +3 -3
  19. package/dist/lib/browser/settings-RBF22MVS.mjs.map +7 -0
  20. package/dist/lib/browser/state-KI7F4I6V.mjs +18 -0
  21. package/dist/lib/browser/state-KI7F4I6V.mjs.map +7 -0
  22. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/capabilities.d.ts +8 -0
  25. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/index.d.ts +3 -0
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  29. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/state.d.ts +4 -0
  32. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  33. package/dist/types/src/components/PresenterMain.d.ts +7 -0
  34. package/dist/types/src/components/PresenterMain.d.ts.map +1 -0
  35. package/dist/types/src/components/RevealMain.d.ts +7 -0
  36. package/dist/types/src/components/RevealMain.d.ts.map +1 -0
  37. package/dist/types/src/components/index.d.ts +2 -2
  38. package/dist/types/src/components/index.d.ts.map +1 -1
  39. package/dist/types/src/index.d.ts +1 -0
  40. package/dist/types/src/index.d.ts.map +1 -1
  41. package/dist/types/src/types.d.ts +8 -120
  42. package/dist/types/src/types.d.ts.map +1 -1
  43. package/package.json +21 -24
  44. package/src/PresenterPlugin.tsx +14 -1
  45. package/src/capabilities/app-graph-builder.ts +3 -22
  46. package/src/capabilities/capabilities.ts +13 -0
  47. package/src/capabilities/index.ts +4 -0
  48. package/src/capabilities/intent-resolver.ts +43 -0
  49. package/src/capabilities/react-surface.tsx +24 -16
  50. package/src/capabilities/settings.ts +2 -2
  51. package/src/capabilities/state.ts +17 -0
  52. package/src/components/PresenterMain.tsx +63 -0
  53. package/src/components/RevealMain.tsx +38 -0
  54. package/src/components/index.ts +2 -2
  55. package/src/index.ts +1 -0
  56. package/dist/lib/browser/CollectionPresenterContainer-5ETXRUWZ.mjs.map +0 -7
  57. package/dist/lib/browser/DocumentPresenterContainer-CAPKSXNP.mjs.map +0 -7
  58. package/dist/lib/browser/app-graph-builder-QS5KTYD3.mjs.map +0 -7
  59. package/dist/lib/browser/chunk-2RWWAQZK.mjs +0 -36
  60. package/dist/lib/browser/chunk-2RWWAQZK.mjs.map +0 -7
  61. package/dist/lib/browser/react-surface-N23VEZ2O.mjs.map +0 -7
  62. package/dist/lib/browser/settings-KWSP73SU.mjs.map +0 -7
  63. package/dist/types/src/components/CollectionPresenterContainer.d.ts +0 -7
  64. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +0 -1
  65. package/dist/types/src/components/DocumentPresenterContainer.d.ts +0 -7
  66. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +0 -1
  67. package/dist/types/src/useExitPresenter.d.ts +0 -6
  68. package/dist/types/src/useExitPresenter.d.ts.map +0 -1
  69. package/src/components/CollectionPresenterContainer.tsx +0 -43
  70. package/src/components/DocumentPresenterContainer.tsx +0 -22
  71. package/src/useExitPresenter.ts +0 -35
@@ -19,128 +19,22 @@ export declare namespace PresenterAction {
19
19
  messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
20
20
  id: import("@dxos/echo-schema").ObjectIdClass;
21
21
  created: S.SchemaClass<string, string, never>;
22
- sender: S.mutable<S.Struct<{
22
+ sender: S.Struct<{
23
23
  contact: S.optional<import("@dxos/echo-schema").Ref$<{
24
24
  readonly id: string;
25
- fields?: {
25
+ name?: string | undefined;
26
+ identifiers: {
26
27
  readonly value: string;
27
- readonly label: string;
28
- readonly category?: string | undefined;
29
- }[] | undefined;
30
- organization?: import("@dxos/echo-schema").Ref<{
31
- readonly id: string;
32
- description?: string | undefined;
33
- name?: string | undefined;
34
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
35
- image?: string | undefined;
36
- website?: string | undefined;
37
- }> | undefined;
38
- image?: string | undefined;
39
- fullName?: string | undefined;
40
- preferredName?: string | undefined;
41
- nickname?: string | undefined;
42
- jobTitle?: string | undefined;
43
- department?: string | undefined;
44
- notes?: string | undefined;
45
- emails?: {
46
- readonly value: string;
47
- readonly label?: string | undefined;
48
- }[] | undefined;
49
- identities?: {
50
- readonly value: string;
51
- readonly label?: string | undefined;
52
- }[] | undefined;
53
- phoneNumbers?: {
54
- readonly value: string;
55
- readonly label?: string | undefined;
56
- }[] | undefined;
57
- addresses?: {
58
- readonly value: {
59
- readonly street?: string | undefined;
60
- readonly extended?: string | undefined;
61
- readonly locality?: string | undefined;
62
- readonly region?: string | undefined;
63
- readonly postalCode?: string | undefined;
64
- readonly postOfficeBoxNumber?: string | undefined;
65
- readonly country?: string | undefined;
66
- };
67
- readonly label?: string | undefined;
68
- }[] | undefined;
69
- urls?: {
70
- readonly value: string;
71
- readonly label?: string | undefined;
72
- }[] | undefined;
73
- birthday?: {
74
- toString: () => string;
75
- toDateString: () => string;
76
- toTimeString: () => string;
77
- toLocaleString: {
78
- (): string;
79
- (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
80
- (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
81
- };
82
- toLocaleDateString: {
83
- (): string;
84
- (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
85
- (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
86
- };
87
- toLocaleTimeString: {
88
- (): string;
89
- (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
90
- (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
91
- };
92
- valueOf: () => number;
93
- getTime: () => number;
94
- getFullYear: () => number;
95
- getUTCFullYear: () => number;
96
- getMonth: () => number;
97
- getUTCMonth: () => number;
98
- getDate: () => number;
99
- getUTCDate: () => number;
100
- getDay: () => number;
101
- getUTCDay: () => number;
102
- getHours: () => number;
103
- getUTCHours: () => number;
104
- getMinutes: () => number;
105
- getUTCMinutes: () => number;
106
- getSeconds: () => number;
107
- getUTCSeconds: () => number;
108
- getMilliseconds: () => number;
109
- getUTCMilliseconds: () => number;
110
- getTimezoneOffset: () => number;
111
- setTime: (time: number) => number;
112
- setMilliseconds: (ms: number) => number;
113
- setUTCMilliseconds: (ms: number) => number;
114
- setSeconds: (sec: number, ms?: number) => number;
115
- setUTCSeconds: (sec: number, ms?: number) => number;
116
- setMinutes: (min: number, sec?: number, ms?: number) => number;
117
- setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
118
- setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
119
- setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
120
- setDate: (date: number) => number;
121
- setUTCDate: (date: number) => number;
122
- setMonth: (month: number, date?: number) => number;
123
- setUTCMonth: (month: number, date?: number) => number;
124
- setFullYear: (year: number, month?: number, date?: number) => number;
125
- setUTCFullYear: (year: number, month?: number, date?: number) => number;
126
- toUTCString: () => string;
127
- toISOString: () => string;
128
- toJSON: (key?: any) => string;
129
- [Symbol.toPrimitive]: {
130
- (hint: "default"): string;
131
- (hint: "string"): string;
132
- (hint: "number"): number;
133
- (hint: string): string | number;
134
- };
135
- } | undefined;
28
+ readonly type: string;
29
+ }[];
136
30
  }>>;
137
31
  identityDid: S.optional<typeof S.String>;
138
32
  identityKey: S.optional<typeof S.String>;
139
33
  email: S.optional<typeof S.String>;
140
34
  name: S.optional<typeof S.String>;
141
35
  role: S.optional<S.Literal<["user", "assistant"]>>;
142
- }>>;
143
- blocks: S.mutable<S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
36
+ }>;
37
+ blocks: S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
144
38
  pending: S.optional<typeof S.Boolean>;
145
39
  }>, S.Struct<{
146
40
  type: S.Literal<["text"]>;
@@ -170,13 +64,7 @@ export declare namespace PresenterAction {
170
64
  }>, S.Struct<{
171
65
  type: S.Literal<["reference"]>;
172
66
  reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
173
- }>>>, S.mutable<S.extend<S.Struct<{
174
- pending: S.optional<typeof S.Boolean>;
175
- }>, S.Struct<{
176
- type: S.Literal<["transcription"]>;
177
- started: typeof S.String;
178
- text: typeof S.String;
179
- }>>>]>>>;
67
+ }>>>]>>;
180
68
  properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
181
69
  }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
182
70
  }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI1D,yBAAiB,eAAe,CAAC;;;;;;sBAkCs1Q,EAAG,QAAQ,QAAO,EAAG,MAAM;8BAAoB,EAAG,QAAQ,QAAO,EAAG,MAAM;gCAAuB,mBAAmB,cAAc,mBAAmB;oCAA6C,EAAG,MAAM;0BAAgB,mBAAmB;yBAAoC,EAAG,OAAO,CAAC,EAAE,MAAM,QAAQ,mBAAmB,cAAc,mBAAmB;0BAAmC,EAAG,QAAQ,QAAO,EAAG,MAAM;4BAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;4BAAkB,EAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,cAAa,EAAG,OAAO,cAAa,EAAG,OAAO;8BAAoC,EAAG,OAAO,CAAC,EAAE,MAAM,QAAQ,mBAAmB,cAAc,mBAAmB;mCAA6C,mBAAmB;iCAAqC,EAAG,WAAW;gCAA4C,EAAG,OAAO,CAAC,EAAE,MAAM;qCAA2B,EAAG,QAAQ,QAAQ,mBAAmB;;sCAA4E,CAAC;;;qDAA6I,CAAC;;4CAA2F,CAAC;;+CAAwF,CAAC;wCAAkD,CAAC;0CAAoD,CAAC;yCAAsG,CAAC;2CAAqD,CAAC;;qCAAmF,CAAC;wCAAkD,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AG,OAAO;4BAAkB,EAAG,MAAM;kCAAwB,EAAG,OAAO;8CAAmD,mBAAmB;;oCAA6D,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,QAAO,EAAG,MAAM,SAAQ,EAAG,GAAG;8BAAuB,mBAAmB;0BAAwC,mBAAmB;oCAAiD,EAAG,QAAQ,QAAQ,mBAAmB;;;;;;IA/BxxK,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,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-presenter",
3
- "version": "0.8.2-main.f11618f",
3
+ "version": "0.8.2-staging.7ac8446",
4
4
  "description": "Braneframe presenter plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -34,21 +34,20 @@
34
34
  "remark-frontmatter": "^5.0.0",
35
35
  "remark-parse-frontmatter": "^1.0.3",
36
36
  "reveal.js": "^5.1.0",
37
- "@dxos/app-framework": "0.8.2-main.f11618f",
38
- "@dxos/echo-schema": "0.8.2-main.f11618f",
39
- "@dxos/async": "0.8.2-main.f11618f",
40
- "@dxos/live-object": "0.8.2-main.f11618f",
41
- "@dxos/log": "0.8.2-main.f11618f",
42
- "@dxos/local-storage": "0.8.2-main.f11618f",
43
- "@dxos/plugin-client": "0.8.2-main.f11618f",
44
- "@dxos/plugin-graph": "0.8.2-main.f11618f",
45
- "@dxos/plugin-deck": "0.8.2-main.f11618f",
46
- "@dxos/plugin-markdown": "0.8.2-main.f11618f",
47
- "@dxos/plugin-space": "0.8.2-main.f11618f",
48
- "@dxos/plugin-stack": "0.8.2-main.f11618f",
49
- "@dxos/react-client": "0.8.2-main.f11618f",
50
- "@dxos/react-ui-stack": "0.8.2-main.f11618f",
51
- "@dxos/react-ui-form": "0.8.2-main.f11618f"
37
+ "@dxos/app-framework": "0.8.2-staging.7ac8446",
38
+ "@dxos/live-object": "0.8.2-staging.7ac8446",
39
+ "@dxos/echo-schema": "0.8.2-staging.7ac8446",
40
+ "@dxos/async": "0.8.2-staging.7ac8446",
41
+ "@dxos/local-storage": "0.8.2-staging.7ac8446",
42
+ "@dxos/log": "0.8.2-staging.7ac8446",
43
+ "@dxos/plugin-client": "0.8.2-staging.7ac8446",
44
+ "@dxos/plugin-graph": "0.8.2-staging.7ac8446",
45
+ "@dxos/plugin-markdown": "0.8.2-staging.7ac8446",
46
+ "@dxos/plugin-stack": "0.8.2-staging.7ac8446",
47
+ "@dxos/react-client": "0.8.2-staging.7ac8446",
48
+ "@dxos/react-ui-stack": "0.8.2-staging.7ac8446",
49
+ "@dxos/react-ui-form": "0.8.2-staging.7ac8446",
50
+ "@dxos/plugin-space": "0.8.2-staging.7ac8446"
52
51
  },
53
52
  "devDependencies": {
54
53
  "@phosphor-icons/react": "^2.1.5",
@@ -56,22 +55,20 @@
56
55
  "@types/react": "~18.2.0",
57
56
  "@types/react-dom": "~18.2.0",
58
57
  "@types/reveal.js": "^5.0.3",
59
- "effect": "3.13.3",
60
58
  "react": "~18.2.0",
61
59
  "react-dom": "~18.2.0",
62
60
  "vite": "5.4.7",
63
- "@dxos/random": "0.8.2-main.f11618f",
64
- "@dxos/react-ui": "0.8.2-main.f11618f",
65
- "@dxos/react-ui-theme": "0.8.2-main.f11618f",
66
- "@dxos/storybook-utils": "0.8.2-main.f11618f"
61
+ "@dxos/random": "0.8.2-staging.7ac8446",
62
+ "@dxos/react-ui": "0.8.2-staging.7ac8446",
63
+ "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
64
+ "@dxos/storybook-utils": "0.8.2-staging.7ac8446"
67
65
  },
68
66
  "peerDependencies": {
69
67
  "@phosphor-icons/react": "^2.1.5",
70
- "effect": "3.13.3",
71
68
  "react": "~18.2.0",
72
69
  "react-dom": "~18.2.0",
73
- "@dxos/react-ui": "0.8.2-main.f11618f",
74
- "@dxos/react-ui-theme": "0.8.2-main.f11618f"
70
+ "@dxos/react-ui": "0.8.2-staging.7ac8446",
71
+ "@dxos/react-ui-theme": "0.8.2-staging.7ac8446"
75
72
  },
76
73
  "publishConfig": {
77
74
  "access": "public"
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { definePlugin, defineModule, Events, contributes, Capabilities } from '@dxos/app-framework';
6
6
 
7
- import { AppGraphBuilder, PresenterSettings, ReactSurface } from './capabilities';
7
+ import { AppGraphBuilder, IntentResolver, PresenterSettings, PresenterState, ReactSurface } from './capabilities';
8
8
  import { meta } from './meta';
9
9
  import translations from './translations';
10
10
 
@@ -18,6 +18,14 @@ export const PresenterPlugin = () =>
18
18
  activatesOn: Events.SetupSettings,
19
19
  activate: PresenterSettings,
20
20
  }),
21
+ defineModule({
22
+ id: `${meta.id}/module/state`,
23
+ // TODO(wittjosiah): Does not integrate with settings store.
24
+ // Should this be a different event?
25
+ // Should settings store be renamed to be more generic?
26
+ activatesOn: Events.SetupSettings,
27
+ activate: PresenterState,
28
+ }),
21
29
  defineModule({
22
30
  id: `${meta.id}/module/translations`,
23
31
  activatesOn: Events.SetupTranslations,
@@ -28,6 +36,11 @@ export const PresenterPlugin = () =>
28
36
  activatesOn: Events.SetupReactSurface,
29
37
  activate: ReactSurface,
30
38
  }),
39
+ defineModule({
40
+ id: `${meta.id}/module/intent-resolver`,
41
+ activatesOn: Events.SetupIntentResolver,
42
+ activate: IntentResolver,
43
+ }),
31
44
  defineModule({
32
45
  id: `${meta.id}/module/app-graph-builder`,
33
46
  activatesOn: Events.SetupAppGraph,
@@ -2,14 +2,12 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, type PluginsContext, Capabilities, createIntent, LayoutAction } from '@dxos/app-framework';
5
+ import { contributes, type PluginsContext, Capabilities, createIntent } from '@dxos/app-framework';
6
6
  import { isInstanceOf } from '@dxos/echo-schema';
7
- import { DeckCapabilities } from '@dxos/plugin-deck';
8
- import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
9
7
  import { createExtension, type Node } from '@dxos/plugin-graph';
10
8
  import { DocumentType } from '@dxos/plugin-markdown/types';
11
9
  import { CollectionType } from '@dxos/plugin-space/types';
12
- import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
10
+ import { fullyQualifiedId } from '@dxos/react-client/echo';
13
11
 
14
12
  import { PRESENTER_PLUGIN } from '../meta';
15
13
  import { PresenterAction, type PresenterSettingsProps } from '../types';
@@ -30,7 +28,6 @@ export default (context: PluginsContext) =>
30
28
  actions: ({ node }) => {
31
29
  const object = node.data;
32
30
  const id = fullyQualifiedId(object);
33
- const spaceId = getSpace(object)?.id;
34
31
  return [
35
32
  {
36
33
  id: `${PresenterAction.TogglePresentation._tag}/${id}`,
@@ -38,23 +35,7 @@ export default (context: PluginsContext) =>
38
35
  // So can set explicit fullscreen state coordinated with current presenter state.
39
36
  data: async () => {
40
37
  const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
41
- const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
42
- const presenterId = [id, 'presenter'].join(ATTENDABLE_PATH_SEPARATOR);
43
- if (!layout.deck.fullscreen) {
44
- void dispatch(
45
- createIntent(DeckAction.Adjust, {
46
- type: 'solo--fullscreen',
47
- id: presenterId,
48
- }),
49
- );
50
- }
51
- await dispatch(
52
- createIntent(LayoutAction.Open, {
53
- part: 'main',
54
- subject: [presenterId],
55
- options: { workspace: spaceId },
56
- }),
57
- );
38
+ await dispatch(createIntent(PresenterAction.TogglePresentation, { object }));
58
39
  },
59
40
  properties: {
60
41
  label: ['toggle presentation label', { ns: PRESENTER_PLUGIN }],
@@ -0,0 +1,13 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { defineCapability } from '@dxos/app-framework';
6
+
7
+ import { PRESENTER_PLUGIN } from '../meta';
8
+
9
+ export namespace PresenterCapabilities {
10
+ export type State = { presenting: boolean };
11
+ export const State = defineCapability<Readonly<State>>(`${PRESENTER_PLUGIN}/capability/state`);
12
+ export const MutableState = defineCapability<State>(`${PRESENTER_PLUGIN}/capability/state`);
13
+ }
@@ -5,5 +5,9 @@
5
5
  import { lazy } from '@dxos/app-framework';
6
6
 
7
7
  export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
8
+ export const IntentResolver = lazy(() => import('./intent-resolver'));
8
9
  export const ReactSurface = lazy(() => import('./react-surface'));
9
10
  export const PresenterSettings = lazy(() => import('./settings'));
11
+ export const PresenterState = lazy(() => import('./state'));
12
+
13
+ export * from './capabilities';
@@ -0,0 +1,43 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import {
6
+ Capabilities,
7
+ contributes,
8
+ createIntent,
9
+ createResolver,
10
+ LayoutAction,
11
+ type PluginsContext,
12
+ } from '@dxos/app-framework';
13
+ import { fullyQualifiedId } from '@dxos/react-client/echo';
14
+
15
+ import { PresenterCapabilities } from './capabilities';
16
+ import { PresenterAction } from '../types';
17
+
18
+ export default (context: PluginsContext) =>
19
+ contributes(
20
+ Capabilities.IntentResolver,
21
+ createResolver({
22
+ intent: PresenterAction.TogglePresentation,
23
+ resolve: ({ object, state: next }) => {
24
+ const state = context.requestCapability(PresenterCapabilities.MutableState);
25
+ state.presenting = next ?? !state.presenting;
26
+ if (state.presenting) {
27
+ return {
28
+ intents: [
29
+ createIntent(LayoutAction.SetLayoutMode, {
30
+ part: 'mode',
31
+ subject: fullyQualifiedId(object),
32
+ options: { mode: 'fullscreen' },
33
+ }),
34
+ ],
35
+ };
36
+ } else {
37
+ return {
38
+ intents: [createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { revert: true } })],
39
+ };
40
+ }
41
+ },
42
+ }),
43
+ );
@@ -4,38 +4,46 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
8
8
  import { isInstanceOf } from '@dxos/echo-schema';
9
9
  import { SettingsStore } from '@dxos/local-storage';
10
10
  import { DocumentType } from '@dxos/plugin-markdown/types';
11
11
  import { CollectionType } from '@dxos/plugin-space/types';
12
12
 
13
- import {
14
- MarkdownSlide,
15
- PresenterSettings,
16
- DocumentPresenterContainer,
17
- CollectionPresenterContainer,
18
- } from '../components';
13
+ import { PresenterCapabilities } from './capabilities';
14
+ import { MarkdownSlide, PresenterSettings, PresenterMain, RevealMain } from '../components';
19
15
  import { PRESENTER_PLUGIN } from '../meta';
20
- import { type PresenterSettingsProps } from '../types';
16
+ import { PresenterContext, type PresenterSettingsProps } from '../types';
21
17
 
22
18
  export default () =>
23
19
  contributes(Capabilities.ReactSurface, [
24
20
  createSurface({
25
21
  id: `${PRESENTER_PLUGIN}/document`,
26
- role: 'article',
22
+ role: 'main',
27
23
  position: 'hoist',
28
- filter: (data): data is { subject: DocumentType; variant: 'presenter' } =>
29
- isInstanceOf(DocumentType, data.subject) && data.variant === 'presenter',
30
- component: ({ data }) => <DocumentPresenterContainer document={data.subject} />,
24
+ filter: (data): data is { subject: DocumentType } => isInstanceOf(DocumentType, data.subject),
25
+ component: ({ data }) => <RevealMain document={data.subject} />,
31
26
  }),
32
27
  createSurface({
33
28
  id: `${PRESENTER_PLUGIN}/collection`,
34
- role: 'article',
29
+ role: 'main',
35
30
  position: 'hoist',
36
- filter: (data): data is { subject: CollectionType; variant: 'presenter' } =>
37
- isInstanceOf(CollectionType, data.subject) && data.variant === 'presenter',
38
- component: ({ data }) => <CollectionPresenterContainer collection={data.subject} />,
31
+ filter: (data): data is { subject: CollectionType } => isInstanceOf(CollectionType, data.subject),
32
+ component: ({ data }) => {
33
+ const state = useCapability(PresenterCapabilities.MutableState);
34
+
35
+ return (
36
+ <PresenterContext.Provider
37
+ value={{
38
+ running: state.presenting,
39
+ start: () => (state.presenting = true),
40
+ stop: () => (state.presenting = false),
41
+ }}
42
+ >
43
+ <PresenterMain collection={data.subject} />
44
+ </PresenterContext.Provider>
45
+ );
46
+ },
39
47
  }),
40
48
  createSurface({
41
49
  id: `${PRESENTER_PLUGIN}/slide`,
@@ -3,13 +3,13 @@
3
3
  //
4
4
 
5
5
  import { Capabilities, contributes } from '@dxos/app-framework';
6
- import { live } from '@dxos/live-object';
6
+ import { create } from '@dxos/live-object';
7
7
 
8
8
  import { PRESENTER_PLUGIN } from '../meta';
9
9
  import { PresenterSettingsSchema, type PresenterSettingsProps } from '../types';
10
10
 
11
11
  export default () => {
12
- const settings = live<PresenterSettingsProps>({});
12
+ const settings = create<PresenterSettingsProps>({});
13
13
 
14
14
  return contributes(Capabilities.Settings, {
15
15
  schema: PresenterSettingsSchema,
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { contributes } from '@dxos/app-framework';
6
+ import { create } from '@dxos/live-object';
7
+
8
+ import { PresenterCapabilities } from './capabilities';
9
+
10
+ export default () => {
11
+ // TODO(burdon): Do we need context providers if we can get the state from the plugin?
12
+ // No, the main reason would be compability with existing apis.
13
+ // For anything made specifically for the plugin framework they can depend on `useCapabilities`.
14
+ const state = create<PresenterCapabilities.State>({ presenting: false });
15
+
16
+ return contributes(PresenterCapabilities.State, state);
17
+ };
@@ -0,0 +1,63 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React, { type FC, useContext, useState } from 'react';
6
+
7
+ import { Surface, createIntent, useLayout, useIntentDispatcher } from '@dxos/app-framework';
8
+ import { type CollectionType } from '@dxos/plugin-space/types';
9
+ import { Main } from '@dxos/react-ui';
10
+ import {
11
+ baseSurface,
12
+ topbarBlockPaddingStart,
13
+ fixedInsetFlexLayout,
14
+ bottombarBlockPaddingEnd,
15
+ } from '@dxos/react-ui-theme';
16
+
17
+ import { Layout, PageNumber, Pager, StartButton } from './Presenter';
18
+ import { PresenterContext, PresenterAction } from '../types';
19
+
20
+ const PresenterMain: FC<{ collection: CollectionType }> = ({ collection }) => {
21
+ const [slide, setSlide] = useState(0);
22
+
23
+ // TODO(burdon): Should not depend on split screen.
24
+ const layout = useLayout();
25
+ const fullscreen = layout.mode === 'fullscreen';
26
+ const { running } = useContext(PresenterContext);
27
+
28
+ // TODO(burdon): Currently conflates fullscreen and running.
29
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
30
+ const handleSetRunning = (running: boolean) => {
31
+ void dispatch(createIntent(PresenterAction.TogglePresentation, { object: collection, state: running }));
32
+ };
33
+
34
+ return (
35
+ <Main.Content
36
+ classNames={[
37
+ baseSurface,
38
+ fixedInsetFlexLayout,
39
+ !fullscreen && topbarBlockPaddingStart,
40
+ !fullscreen && bottombarBlockPaddingEnd,
41
+ ]}
42
+ >
43
+ <Layout
44
+ topRight={<StartButton running={running} onClick={(running) => handleSetRunning(running)} />}
45
+ bottomRight={<PageNumber index={slide} count={collection.objects.length} />}
46
+ bottomLeft={
47
+ <Pager
48
+ index={slide}
49
+ count={collection.objects.length}
50
+ keys={running}
51
+ onChange={setSlide}
52
+ onExit={() => handleSetRunning(false)}
53
+ />
54
+ }
55
+ >
56
+ {/* TODO(wittjosiah): Better slide placeholder. */}
57
+ <Surface role='slide' data={{ subject: collection.objects[slide] }} placeholder={<></>} />
58
+ </Layout>
59
+ </Main.Content>
60
+ );
61
+ };
62
+
63
+ export default PresenterMain;
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React, { type FC } from 'react';
6
+
7
+ import { createIntent, useLayout, useIntentDispatcher } from '@dxos/app-framework';
8
+ import { type DocumentType } from '@dxos/plugin-markdown/types';
9
+ import { Main } from '@dxos/react-ui';
10
+ import { topbarBlockPaddingStart, fixedInsetFlexLayout, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';
11
+
12
+ import { RevealPlayer } from './RevealPlayer';
13
+ import { PresenterAction } from '../types';
14
+
15
+ const PresenterMain: FC<{ document: DocumentType }> = ({ document }) => {
16
+ const layout = useLayout();
17
+ const fullscreen = layout.mode === 'fullscreen';
18
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
19
+
20
+ return (
21
+ <Main.Content
22
+ classNames={[
23
+ fixedInsetFlexLayout,
24
+ !fullscreen && topbarBlockPaddingStart,
25
+ !fullscreen && bottombarBlockPaddingEnd,
26
+ ]}
27
+ >
28
+ <RevealPlayer
29
+ content={document.content.target?.content ?? ''}
30
+ onExit={() => {
31
+ void dispatch(createIntent(PresenterAction.TogglePresentation, { object: document, state: false }));
32
+ }}
33
+ />
34
+ </Main.Content>
35
+ );
36
+ };
37
+
38
+ export default PresenterMain;
@@ -7,5 +7,5 @@ import { lazy } from 'react';
7
7
  export * from './PresenterSettings';
8
8
 
9
9
  export const MarkdownSlide = lazy(() => import('./MarkdownSlide'));
10
- export const DocumentPresenterContainer = lazy(() => import('./DocumentPresenterContainer'));
11
- export const CollectionPresenterContainer = lazy(() => import('./CollectionPresenterContainer'));
10
+ export const RevealMain = lazy(() => import('./RevealMain'));
11
+ export const PresenterMain = lazy(() => import('./PresenterMain'));
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ export { PresenterCapabilities } from './capabilities';
5
6
  export * from './components';
6
7
 
7
8
  export * from './meta';