@dxos/plugin-presenter 0.8.2-main.2f9c567 → 0.8.2-main.36232bc

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 (73) hide show
  1. package/dist/lib/browser/{CollectionPresenterContainer-SSFGQUYE.mjs → PresenterMain-PQPWYIWU.mjs} +43 -16
  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-AURCBPPI.mjs → app-graph-builder-CWMMBJTB.mjs} +6 -26
  6. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-3BSZF44U.mjs → chunk-3VVM67QE.mjs} +5 -5
  8. package/dist/lib/browser/{chunk-3BSZF44U.mjs.map → chunk-3VVM67QE.mjs.map} +3 -3
  9. package/dist/lib/browser/{chunk-OOZM543N.mjs → chunk-CQR4O6KC.mjs} +9 -9
  10. package/dist/lib/browser/chunk-CQR4O6KC.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-FK2KJZ73.mjs +16 -0
  12. package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +31 -12
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +46 -0
  16. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +7 -0
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/{react-surface-YV4BLHO2.mjs → react-surface-6JT4CB4B.mjs} +29 -14
  19. package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +7 -0
  20. package/dist/lib/browser/{settings-WERSYNE5.mjs → settings-KWSP73SU.mjs} +2 -2
  21. package/dist/lib/browser/state-W6VFHVB2.mjs +18 -0
  22. package/dist/lib/browser/state-W6VFHVB2.mjs.map +7 -0
  23. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/capabilities.d.ts +8 -0
  26. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  27. package/dist/types/src/capabilities/index.d.ts +3 -0
  28. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  30. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/state.d.ts +4 -0
  33. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  34. package/dist/types/src/components/PresenterMain.d.ts +7 -0
  35. package/dist/types/src/components/PresenterMain.d.ts.map +1 -0
  36. package/dist/types/src/components/RevealMain.d.ts +7 -0
  37. package/dist/types/src/components/RevealMain.d.ts.map +1 -0
  38. package/dist/types/src/components/index.d.ts +2 -2
  39. package/dist/types/src/components/index.d.ts.map +1 -1
  40. package/dist/types/src/index.d.ts +1 -0
  41. package/dist/types/src/index.d.ts.map +1 -1
  42. package/dist/types/src/types.d.ts +73 -71
  43. package/dist/types/src/types.d.ts.map +1 -1
  44. package/package.json +21 -25
  45. package/src/PresenterPlugin.tsx +14 -1
  46. package/src/capabilities/app-graph-builder.ts +3 -22
  47. package/src/capabilities/capabilities.ts +13 -0
  48. package/src/capabilities/index.ts +4 -0
  49. package/src/capabilities/intent-resolver.ts +43 -0
  50. package/src/capabilities/react-surface.tsx +24 -16
  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/src/types.ts +10 -10
  57. package/dist/lib/browser/CollectionPresenterContainer-SSFGQUYE.mjs.map +0 -7
  58. package/dist/lib/browser/DocumentPresenterContainer-CAPKSXNP.mjs.map +0 -7
  59. package/dist/lib/browser/app-graph-builder-AURCBPPI.mjs.map +0 -7
  60. package/dist/lib/browser/chunk-2RWWAQZK.mjs +0 -36
  61. package/dist/lib/browser/chunk-2RWWAQZK.mjs.map +0 -7
  62. package/dist/lib/browser/chunk-OOZM543N.mjs.map +0 -7
  63. package/dist/lib/browser/react-surface-YV4BLHO2.mjs.map +0 -7
  64. package/dist/types/src/components/CollectionPresenterContainer.d.ts +0 -7
  65. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +0 -1
  66. package/dist/types/src/components/DocumentPresenterContainer.d.ts +0 -7
  67. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +0 -1
  68. package/dist/types/src/useExitPresenter.d.ts +0 -6
  69. package/dist/types/src/useExitPresenter.d.ts.map +0 -1
  70. package/src/components/CollectionPresenterContainer.tsx +0 -43
  71. package/src/components/DocumentPresenterContainer.tsx +0 -22
  72. package/src/useExitPresenter.ts +0 -35
  73. /package/dist/lib/browser/{settings-WERSYNE5.mjs.map → settings-KWSP73SU.mjs.map} +0 -0
@@ -1,28 +1,26 @@
1
- import { Schema } from 'effect';
2
1
  import { type Context } from 'react';
2
+ import { S } from '@dxos/echo-schema';
3
3
  import { CollectionType } from '@dxos/plugin-space/types';
4
4
  export declare namespace PresenterAction {
5
- const TogglePresentation_base: Schema.TaggedClass<TogglePresentation, "dxos.org/plugin/presenter/action/toggle-presentation", {
6
- readonly _tag: Schema.tag<"dxos.org/plugin/presenter/action/toggle-presentation">;
5
+ const TogglePresentation_base: S.TaggedClass<TogglePresentation, "dxos.org/plugin/presenter/action/toggle-presentation", {
6
+ readonly _tag: S.tag<"dxos.org/plugin/presenter/action/toggle-presentation">;
7
7
  } & {
8
- input: Schema.Struct<{
9
- object: Schema.Union<[import("@dxos/echo-schema").EchoTypeSchema<Schema.Struct<{
10
- name: Schema.optional<typeof Schema.String>;
11
- fallbackName: Schema.optional<typeof Schema.String>;
12
- content: import("@dxos/echo-schema").Ref$<{
13
- readonly id: string;
14
- content: string;
15
- }>;
16
- threads: Schema.mutable<Schema.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
17
- name: Schema.optional<typeof Schema.String>;
18
- anchor: Schema.optional<typeof Schema.String>;
19
- status: Schema.optional<Schema.Union<[Schema.Literal<["staged"]>, Schema.Literal<["active"]>, Schema.Literal<["resolved"]>]>>;
20
- messages: Schema.mutable<Schema.Array$<import("@dxos/echo-schema").Ref$<{
21
- readonly id: string;
22
- created: string;
23
- sender: {
24
- name?: string | undefined;
25
- contact?: import("@dxos/echo-schema").Ref<{
8
+ input: S.Struct<{
9
+ object: S.Union<[import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
10
+ name: S.optional<typeof S.String>;
11
+ fallbackName: S.optional<typeof S.String>;
12
+ content: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
13
+ content: typeof S.String;
14
+ }, import("@dxos/echo-schema").TypedObjectOptions>>;
15
+ threads: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
16
+ name: S.optional<typeof S.String>;
17
+ anchor: S.optional<typeof S.String>;
18
+ status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
19
+ messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
20
+ id: import("@dxos/echo-schema").ObjectIdClass;
21
+ created: S.SchemaClass<string, string, never>;
22
+ sender: S.mutable<S.Struct<{
23
+ contact: S.optional<import("@dxos/echo-schema").Ref$<{
26
24
  readonly id: string;
27
25
  fields?: {
28
26
  readonly value: string;
@@ -33,7 +31,7 @@ export declare namespace PresenterAction {
33
31
  readonly id: string;
34
32
  description?: string | undefined;
35
33
  name?: string | undefined;
36
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
34
+ status?: "first" | "second" | "third" | "fourth" | undefined;
37
35
  image?: string | undefined;
38
36
  website?: string | undefined;
39
37
  }> | undefined;
@@ -135,54 +133,58 @@ export declare namespace PresenterAction {
135
133
  (hint: string): string | number;
136
134
  };
137
135
  } | undefined;
138
- }> | undefined;
139
- identityDid?: string | undefined;
140
- identityKey?: string | undefined;
141
- email?: string | undefined;
142
- role?: "user" | "assistant" | undefined;
143
- };
144
- blocks: ({
145
- pending?: boolean | undefined;
146
- type: "text";
147
- disposition?: string | undefined;
148
- text: string;
149
- } | {
150
- pending?: boolean | undefined;
151
- type: "json";
152
- disposition?: string | undefined;
153
- data: string;
154
- } | {
155
- pending?: boolean | undefined;
156
- id?: string | undefined;
157
- type: "image";
158
- source?: {
159
- type: "base64";
160
- data: string;
161
- mediaType: string;
162
- } | {
163
- type: "http";
164
- url: string;
165
- } | undefined;
166
- } | {
167
- pending?: boolean | undefined;
168
- type: "reference";
169
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo-schema").Expando>;
170
- } | {
171
- pending?: boolean | undefined;
172
- type: "transcription";
173
- text: string;
174
- started: string;
175
- })[];
176
- properties?: {
177
- [x: string]: any;
178
- } | undefined;
179
- }>>>;
136
+ }>>;
137
+ identityDid: S.optional<typeof S.String>;
138
+ identityKey: S.optional<typeof S.String>;
139
+ email: S.optional<typeof S.String>;
140
+ name: S.optional<typeof S.String>;
141
+ role: S.optional<S.Literal<["user", "assistant"]>>;
142
+ }>>;
143
+ blocks: S.mutable<S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
144
+ pending: S.optional<typeof S.Boolean>;
145
+ }>, S.Struct<{
146
+ type: S.Literal<["text"]>;
147
+ disposition: S.optional<typeof S.String>;
148
+ text: typeof S.String;
149
+ }>>>, S.mutable<S.extend<S.Struct<{
150
+ pending: S.optional<typeof S.Boolean>;
151
+ }>, S.Struct<{
152
+ type: S.Literal<["json"]>;
153
+ disposition: S.optional<typeof S.String>;
154
+ data: typeof S.String;
155
+ }>>>, S.mutable<S.extend<S.Struct<{
156
+ pending: S.optional<typeof S.Boolean>;
157
+ }>, S.Struct<{
158
+ type: S.Literal<["image"]>;
159
+ id: S.optional<typeof S.String>;
160
+ source: S.optional<S.Union<[S.mutable<S.Struct<{
161
+ type: S.Literal<["base64"]>;
162
+ mediaType: typeof S.String;
163
+ data: typeof S.String;
164
+ }>>, S.mutable<S.Struct<{
165
+ type: S.Literal<["http"]>;
166
+ url: typeof S.String;
167
+ }>>]>>;
168
+ }>>>, S.mutable<S.extend<S.Struct<{
169
+ pending: S.optional<typeof S.Boolean>;
170
+ }>, S.Struct<{
171
+ type: S.Literal<["reference"]>;
172
+ 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
+ }>>>]>>>;
180
+ properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
181
+ }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
180
182
  }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
181
- assistantChatQueue: Schema.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
182
- }>, {}>, typeof CollectionType]>;
183
- state: Schema.optional<typeof Schema.Boolean>;
183
+ assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
184
+ }>>, typeof CollectionType]>;
185
+ state: S.optional<typeof S.Boolean>;
184
186
  }>;
185
- output: typeof Schema.Void;
187
+ output: typeof S.Void;
186
188
  }>;
187
189
  export class TogglePresentation extends TogglePresentation_base {
188
190
  }
@@ -194,8 +196,8 @@ export type PresenterContextType = {
194
196
  stop: () => void;
195
197
  };
196
198
  export declare const PresenterContext: Context<PresenterContextType>;
197
- export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
198
- presentCollections: Schema.optional<typeof Schema.Boolean>;
199
+ export declare const PresenterSettingsSchema: S.mutable<S.Struct<{
200
+ presentCollections: S.optional<typeof S.Boolean>;
199
201
  }>>;
200
- export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
202
+ export type PresenterSettingsProps = S.Schema.Type<typeof PresenterSettingsSchema>;
201
203
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI1D,yBAAiB,eAAe,CAAC;;;;;;sBAkC8hP,OAAQ,QAAQ,QAAO,OAAQ,MAAM;8BAAoB,OAAQ,QAAQ,QAAO,OAAQ,MAAM;gCAAuB,mBAAmB;;;;yBAAmF,OAAQ,OAAO,CAAC,OAAO,MAAM,QAAQ,mBAAmB,cAAc,mBAAmB;0BAAmC,OAAQ,QAAQ,QAAO,OAAQ,MAAM;4BAAkB,OAAQ,QAAQ,QAAO,OAAQ,MAAM;4BAAkB,OAAQ,QAAQ,CAAC,OAAO,KAAK,EAAE,OAAO,OAAO,cAAa,OAAQ,OAAO,cAAa,OAAQ,OAAO;8BAAoC,OAAQ,OAAO,CAAC,OAAO,MAAM,QAAQ,mBAAmB;;;;gCAAiH,CAAC;mCAA6C,CAAC;;sCAA2E,CAAC;;;qDAA6I,CAAC;;4CAA2F,CAAC,SAAS,mBAAmB;;+CAAwF,CAAC;wCAAkD,CAAC;0CAAoD,CAAC;yCAAsG,CAAC;2CAAqD,CAAC;;qCAAmF,CAAC;wCAAkD,CAAC;6CAAuD,CAAC;wCAAkD,CAAC;wCAAkD,CAAC;0CAAoD,CAAC;qCAA+C,CAAC;sCAAgD,CAAC;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OAAO;4BAAkB,EAAG,MAAM;kCAAwB,EAAG,OAAO;4CAAoD,EAAG,MAAM;yCAA8B,EAAG,MAAM;;oCAA+C,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,QAAO,EAAG,MAAM,SAAQ,EAAG,GAAG;8BAAuB,mBAAmB;0BAAwC,mBAAmB;oCAAiD,EAAG,QAAQ,QAAQ,mBAAmB;;;;;;IA/B7ljB,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.2f9c567",
3
+ "version": "0.8.2-main.36232bc",
4
4
  "description": "Braneframe presenter plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -24,7 +24,6 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@preact/signals-core": "^1.6.0",
27
- "effect": "^3.13.3",
28
27
  "hastscript": "^7.1.0",
29
28
  "highlight.js": "^11.9.0",
30
29
  "marked": "^12.0.2",
@@ -35,21 +34,20 @@
35
34
  "remark-frontmatter": "^5.0.0",
36
35
  "remark-parse-frontmatter": "^1.0.3",
37
36
  "reveal.js": "^5.1.0",
38
- "@dxos/app-framework": "0.8.2-main.2f9c567",
39
- "@dxos/async": "0.8.2-main.2f9c567",
40
- "@dxos/echo-schema": "0.8.2-main.2f9c567",
41
- "@dxos/local-storage": "0.8.2-main.2f9c567",
42
- "@dxos/live-object": "0.8.2-main.2f9c567",
43
- "@dxos/plugin-deck": "0.8.2-main.2f9c567",
44
- "@dxos/plugin-client": "0.8.2-main.2f9c567",
45
- "@dxos/plugin-graph": "0.8.2-main.2f9c567",
46
- "@dxos/log": "0.8.2-main.2f9c567",
47
- "@dxos/plugin-stack": "0.8.2-main.2f9c567",
48
- "@dxos/plugin-markdown": "0.8.2-main.2f9c567",
49
- "@dxos/plugin-space": "0.8.2-main.2f9c567",
50
- "@dxos/react-client": "0.8.2-main.2f9c567",
51
- "@dxos/react-ui-form": "0.8.2-main.2f9c567",
52
- "@dxos/react-ui-stack": "0.8.2-main.2f9c567"
37
+ "@dxos/app-framework": "0.8.2-main.36232bc",
38
+ "@dxos/async": "0.8.2-main.36232bc",
39
+ "@dxos/echo-schema": "0.8.2-main.36232bc",
40
+ "@dxos/live-object": "0.8.2-main.36232bc",
41
+ "@dxos/local-storage": "0.8.2-main.36232bc",
42
+ "@dxos/log": "0.8.2-main.36232bc",
43
+ "@dxos/plugin-client": "0.8.2-main.36232bc",
44
+ "@dxos/plugin-graph": "0.8.2-main.36232bc",
45
+ "@dxos/plugin-markdown": "0.8.2-main.36232bc",
46
+ "@dxos/plugin-stack": "0.8.2-main.36232bc",
47
+ "@dxos/plugin-space": "0.8.2-main.36232bc",
48
+ "@dxos/react-client": "0.8.2-main.36232bc",
49
+ "@dxos/react-ui-form": "0.8.2-main.36232bc",
50
+ "@dxos/react-ui-stack": "0.8.2-main.36232bc"
53
51
  },
54
52
  "devDependencies": {
55
53
  "@phosphor-icons/react": "^2.1.5",
@@ -57,22 +55,20 @@
57
55
  "@types/react": "~18.2.0",
58
56
  "@types/react-dom": "~18.2.0",
59
57
  "@types/reveal.js": "^5.0.3",
60
- "effect": "3.14.21",
61
58
  "react": "~18.2.0",
62
59
  "react-dom": "~18.2.0",
63
60
  "vite": "5.4.7",
64
- "@dxos/random": "0.8.2-main.2f9c567",
65
- "@dxos/react-ui-theme": "0.8.2-main.2f9c567",
66
- "@dxos/storybook-utils": "0.8.2-main.2f9c567",
67
- "@dxos/react-ui": "0.8.2-main.2f9c567"
61
+ "@dxos/random": "0.8.2-main.36232bc",
62
+ "@dxos/react-ui": "0.8.2-main.36232bc",
63
+ "@dxos/react-ui-theme": "0.8.2-main.36232bc",
64
+ "@dxos/storybook-utils": "0.8.2-main.36232bc"
68
65
  },
69
66
  "peerDependencies": {
70
67
  "@phosphor-icons/react": "^2.1.5",
71
- "effect": "^3.13.3",
72
68
  "react": "~18.2.0",
73
69
  "react-dom": "~18.2.0",
74
- "@dxos/react-ui": "0.8.2-main.2f9c567",
75
- "@dxos/react-ui-theme": "0.8.2-main.2f9c567"
70
+ "@dxos/react-ui": "0.8.2-main.36232bc",
71
+ "@dxos/react-ui-theme": "0.8.2-main.36232bc"
76
72
  },
77
73
  "publishConfig": {
78
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`,
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { contributes } from '@dxos/app-framework';
6
+ import { live } 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 = live<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';