@dxos/plugin-presenter 0.8.2-main.36232bc → 0.8.2-main.5ca3450

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 (81) hide show
  1. package/dist/lib/browser/{PresenterMain-PQPWYIWU.mjs → CollectionPresenterContainer-SSFGQUYE.mjs} +16 -43
  2. package/dist/lib/browser/CollectionPresenterContainer-SSFGQUYE.mjs.map +7 -0
  3. package/dist/lib/browser/{RevealMain-B2PJXHND.mjs → DocumentPresenterContainer-CAPKSXNP.mjs} +13 -27
  4. package/dist/lib/browser/DocumentPresenterContainer-CAPKSXNP.mjs.map +7 -0
  5. package/dist/lib/browser/{app-graph-builder-CWMMBJTB.mjs → app-graph-builder-AURCBPPI.mjs} +26 -6
  6. package/dist/lib/browser/app-graph-builder-AURCBPPI.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-2RWWAQZK.mjs +36 -0
  8. package/dist/lib/browser/chunk-2RWWAQZK.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-3VVM67QE.mjs → chunk-3BSZF44U.mjs} +5 -5
  10. package/dist/lib/browser/{chunk-3VVM67QE.mjs.map → chunk-3BSZF44U.mjs.map} +3 -3
  11. package/dist/lib/browser/{chunk-CQR4O6KC.mjs → chunk-OOZM543N.mjs} +9 -9
  12. package/dist/lib/browser/chunk-OOZM543N.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +12 -31
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-surface-6JT4CB4B.mjs → react-surface-YV4BLHO2.mjs} +14 -29
  17. package/dist/lib/browser/react-surface-YV4BLHO2.mjs.map +7 -0
  18. package/dist/lib/browser/{settings-KWSP73SU.mjs → settings-WERSYNE5.mjs} +2 -2
  19. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/index.d.ts +0 -3
  22. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  24. package/dist/types/src/components/CollectionPresenterContainer.d.ts +7 -0
  25. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +1 -0
  26. package/dist/types/src/components/DocumentPresenterContainer.d.ts +7 -0
  27. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +1 -0
  28. package/dist/types/src/components/Markdown/Container.d.ts.map +1 -1
  29. package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
  30. package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
  31. package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
  32. package/dist/types/src/components/PresenterSettings.d.ts.map +1 -1
  33. package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
  34. package/dist/types/src/components/index.d.ts +2 -2
  35. package/dist/types/src/components/index.d.ts.map +1 -1
  36. package/dist/types/src/index.d.ts +0 -1
  37. package/dist/types/src/index.d.ts.map +1 -1
  38. package/dist/types/src/testing.d.ts.map +1 -1
  39. package/dist/types/src/types.d.ts +71 -73
  40. package/dist/types/src/types.d.ts.map +1 -1
  41. package/dist/types/src/useExitPresenter.d.ts +6 -0
  42. package/dist/types/src/useExitPresenter.d.ts.map +1 -0
  43. package/dist/types/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +25 -21
  45. package/src/PresenterPlugin.tsx +1 -14
  46. package/src/capabilities/app-graph-builder.ts +22 -3
  47. package/src/capabilities/index.ts +0 -4
  48. package/src/capabilities/react-surface.tsx +16 -24
  49. package/src/components/CollectionPresenterContainer.tsx +43 -0
  50. package/src/components/DocumentPresenterContainer.tsx +22 -0
  51. package/src/components/index.ts +2 -2
  52. package/src/index.ts +0 -1
  53. package/src/types.ts +10 -10
  54. package/src/useExitPresenter.ts +35 -0
  55. package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs.map +0 -7
  56. package/dist/lib/browser/RevealMain-B2PJXHND.mjs.map +0 -7
  57. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +0 -7
  58. package/dist/lib/browser/chunk-CQR4O6KC.mjs.map +0 -7
  59. package/dist/lib/browser/chunk-FK2KJZ73.mjs +0 -16
  60. package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +0 -7
  61. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +0 -46
  62. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +0 -7
  63. package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +0 -7
  64. package/dist/lib/browser/state-W6VFHVB2.mjs +0 -18
  65. package/dist/lib/browser/state-W6VFHVB2.mjs.map +0 -7
  66. package/dist/types/src/capabilities/capabilities.d.ts +0 -8
  67. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  68. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  69. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  70. package/dist/types/src/capabilities/state.d.ts +0 -4
  71. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  72. package/dist/types/src/components/PresenterMain.d.ts +0 -7
  73. package/dist/types/src/components/PresenterMain.d.ts.map +0 -1
  74. package/dist/types/src/components/RevealMain.d.ts +0 -7
  75. package/dist/types/src/components/RevealMain.d.ts.map +0 -1
  76. package/src/capabilities/capabilities.ts +0 -13
  77. package/src/capabilities/intent-resolver.ts +0 -43
  78. package/src/capabilities/state.ts +0 -17
  79. package/src/components/PresenterMain.tsx +0 -63
  80. package/src/components/RevealMain.tsx +0 -38
  81. /package/dist/lib/browser/{settings-KWSP73SU.mjs.map → settings-WERSYNE5.mjs.map} +0 -0
@@ -1,26 +1,28 @@
1
+ import { Schema } from 'effect';
1
2
  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: S.TaggedClass<TogglePresentation, "dxos.org/plugin/presenter/action/toggle-presentation", {
6
- readonly _tag: S.tag<"dxos.org/plugin/presenter/action/toggle-presentation">;
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">;
7
7
  } & {
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$<{
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<{
24
26
  readonly id: string;
25
27
  fields?: {
26
28
  readonly value: string;
@@ -31,7 +33,7 @@ export declare namespace PresenterAction {
31
33
  readonly id: string;
32
34
  description?: string | undefined;
33
35
  name?: string | undefined;
34
- status?: "first" | "second" | "third" | "fourth" | undefined;
36
+ status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
35
37
  image?: string | undefined;
36
38
  website?: string | undefined;
37
39
  }> | undefined;
@@ -133,58 +135,54 @@ export declare namespace PresenterAction {
133
135
  (hint: string): string | number;
134
136
  };
135
137
  } | undefined;
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>>>>;
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
+ }>>>;
182
180
  }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
183
- assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
184
- }>>, typeof CollectionType]>;
185
- state: S.optional<typeof S.Boolean>;
181
+ assistantChatQueue: Schema.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
182
+ }>, {}>, typeof CollectionType]>;
183
+ state: Schema.optional<typeof Schema.Boolean>;
186
184
  }>;
187
- output: typeof S.Void;
185
+ output: typeof Schema.Void;
188
186
  }>;
189
187
  export class TogglePresentation extends TogglePresentation_base {
190
188
  }
@@ -196,8 +194,8 @@ export type PresenterContextType = {
196
194
  stop: () => void;
197
195
  };
198
196
  export declare const PresenterContext: Context<PresenterContextType>;
199
- export declare const PresenterSettingsSchema: S.mutable<S.Struct<{
200
- presentCollections: S.optional<typeof S.Boolean>;
197
+ export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
198
+ presentCollections: Schema.optional<typeof Schema.Boolean>;
201
199
  }>>;
202
- export type PresenterSettingsProps = S.Schema.Type<typeof PresenterSettingsSchema>;
200
+ export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
203
201
  //# sourceMappingURL=types.d.ts.map
@@ -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;;;;;;sBAkCo0Q,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,OAA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,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,oBAAoB,CAIzD,CAAC;AAEH,eAAO,MAAM,uBAAuB;;GAInC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Live } from '@dxos/live-object';
2
+ export declare const useExitPresenter: (object: Live<any>) => () => Promise<{
3
+ data?: void | undefined;
4
+ error?: Error | undefined;
5
+ }>;
6
+ //# sourceMappingURL=useExitPresenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExitPresenter.d.ts","sourceRoot":"","sources":["../../../src/useExitPresenter.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,eAAO,MAAM,gBAAgB,GAAI,QAAQ,IAAI,CAAC,GAAG,CAAC;;;EAsBjD,CAAC"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-presenter",
3
- "version": "0.8.2-main.36232bc",
3
+ "version": "0.8.2-main.5ca3450",
4
4
  "description": "Braneframe presenter plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -24,6 +24,7 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@preact/signals-core": "^1.6.0",
27
+ "effect": "^3.13.3",
27
28
  "hastscript": "^7.1.0",
28
29
  "highlight.js": "^11.9.0",
29
30
  "marked": "^12.0.2",
@@ -34,20 +35,21 @@
34
35
  "remark-frontmatter": "^5.0.0",
35
36
  "remark-parse-frontmatter": "^1.0.3",
36
37
  "reveal.js": "^5.1.0",
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"
38
+ "@dxos/app-framework": "0.8.2-main.5ca3450",
39
+ "@dxos/async": "0.8.2-main.5ca3450",
40
+ "@dxos/echo-schema": "0.8.2-main.5ca3450",
41
+ "@dxos/live-object": "0.8.2-main.5ca3450",
42
+ "@dxos/local-storage": "0.8.2-main.5ca3450",
43
+ "@dxos/log": "0.8.2-main.5ca3450",
44
+ "@dxos/plugin-client": "0.8.2-main.5ca3450",
45
+ "@dxos/plugin-deck": "0.8.2-main.5ca3450",
46
+ "@dxos/plugin-graph": "0.8.2-main.5ca3450",
47
+ "@dxos/plugin-space": "0.8.2-main.5ca3450",
48
+ "@dxos/plugin-stack": "0.8.2-main.5ca3450",
49
+ "@dxos/plugin-markdown": "0.8.2-main.5ca3450",
50
+ "@dxos/react-ui-form": "0.8.2-main.5ca3450",
51
+ "@dxos/react-client": "0.8.2-main.5ca3450",
52
+ "@dxos/react-ui-stack": "0.8.2-main.5ca3450"
51
53
  },
52
54
  "devDependencies": {
53
55
  "@phosphor-icons/react": "^2.1.5",
@@ -55,20 +57,22 @@
55
57
  "@types/react": "~18.2.0",
56
58
  "@types/react-dom": "~18.2.0",
57
59
  "@types/reveal.js": "^5.0.3",
60
+ "effect": "3.14.21",
58
61
  "react": "~18.2.0",
59
62
  "react-dom": "~18.2.0",
60
63
  "vite": "5.4.7",
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"
64
+ "@dxos/react-ui": "0.8.2-main.5ca3450",
65
+ "@dxos/random": "0.8.2-main.5ca3450",
66
+ "@dxos/react-ui-theme": "0.8.2-main.5ca3450",
67
+ "@dxos/storybook-utils": "0.8.2-main.5ca3450"
65
68
  },
66
69
  "peerDependencies": {
67
70
  "@phosphor-icons/react": "^2.1.5",
71
+ "effect": "^3.13.3",
68
72
  "react": "~18.2.0",
69
73
  "react-dom": "~18.2.0",
70
- "@dxos/react-ui": "0.8.2-main.36232bc",
71
- "@dxos/react-ui-theme": "0.8.2-main.36232bc"
74
+ "@dxos/react-ui-theme": "0.8.2-main.5ca3450",
75
+ "@dxos/react-ui": "0.8.2-main.5ca3450"
72
76
  },
73
77
  "publishConfig": {
74
78
  "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, IntentResolver, PresenterSettings, PresenterState, ReactSurface } from './capabilities';
7
+ import { AppGraphBuilder, PresenterSettings, ReactSurface } from './capabilities';
8
8
  import { meta } from './meta';
9
9
  import translations from './translations';
10
10
 
@@ -18,14 +18,6 @@ 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
- }),
29
21
  defineModule({
30
22
  id: `${meta.id}/module/translations`,
31
23
  activatesOn: Events.SetupTranslations,
@@ -36,11 +28,6 @@ export const PresenterPlugin = () =>
36
28
  activatesOn: Events.SetupReactSurface,
37
29
  activate: ReactSurface,
38
30
  }),
39
- defineModule({
40
- id: `${meta.id}/module/intent-resolver`,
41
- activatesOn: Events.SetupIntentResolver,
42
- activate: IntentResolver,
43
- }),
44
31
  defineModule({
45
32
  id: `${meta.id}/module/app-graph-builder`,
46
33
  activatesOn: Events.SetupAppGraph,
@@ -2,12 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, type PluginsContext, Capabilities, createIntent } from '@dxos/app-framework';
5
+ import { contributes, type PluginsContext, Capabilities, createIntent, LayoutAction } 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';
7
9
  import { createExtension, type Node } from '@dxos/plugin-graph';
8
10
  import { DocumentType } from '@dxos/plugin-markdown/types';
9
11
  import { CollectionType } from '@dxos/plugin-space/types';
10
- import { fullyQualifiedId } from '@dxos/react-client/echo';
12
+ import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
11
13
 
12
14
  import { PRESENTER_PLUGIN } from '../meta';
13
15
  import { PresenterAction, type PresenterSettingsProps } from '../types';
@@ -28,6 +30,7 @@ export default (context: PluginsContext) =>
28
30
  actions: ({ node }) => {
29
31
  const object = node.data;
30
32
  const id = fullyQualifiedId(object);
33
+ const spaceId = getSpace(object)?.id;
31
34
  return [
32
35
  {
33
36
  id: `${PresenterAction.TogglePresentation._tag}/${id}`,
@@ -35,7 +38,23 @@ export default (context: PluginsContext) =>
35
38
  // So can set explicit fullscreen state coordinated with current presenter state.
36
39
  data: async () => {
37
40
  const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
38
- await dispatch(createIntent(PresenterAction.TogglePresentation, { object }));
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
+ );
39
58
  },
40
59
  properties: {
41
60
  label: ['toggle presentation label', { ns: PRESENTER_PLUGIN }],
@@ -5,9 +5,5 @@
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'));
9
8
  export const ReactSurface = lazy(() => import('./react-surface'));
10
9
  export const PresenterSettings = lazy(() => import('./settings'));
11
- export const PresenterState = lazy(() => import('./state'));
12
-
13
- export * from './capabilities';
@@ -4,46 +4,38 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface } 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 { PresenterCapabilities } from './capabilities';
14
- import { MarkdownSlide, PresenterSettings, PresenterMain, RevealMain } from '../components';
13
+ import {
14
+ MarkdownSlide,
15
+ PresenterSettings,
16
+ DocumentPresenterContainer,
17
+ CollectionPresenterContainer,
18
+ } from '../components';
15
19
  import { PRESENTER_PLUGIN } from '../meta';
16
- import { PresenterContext, type PresenterSettingsProps } from '../types';
20
+ import { type PresenterSettingsProps } from '../types';
17
21
 
18
22
  export default () =>
19
23
  contributes(Capabilities.ReactSurface, [
20
24
  createSurface({
21
25
  id: `${PRESENTER_PLUGIN}/document`,
22
- role: 'main',
26
+ role: 'article',
23
27
  position: 'hoist',
24
- filter: (data): data is { subject: DocumentType } => isInstanceOf(DocumentType, data.subject),
25
- component: ({ data }) => <RevealMain document={data.subject} />,
28
+ filter: (data): data is { subject: DocumentType; variant: 'presenter' } =>
29
+ isInstanceOf(DocumentType, data.subject) && data.variant === 'presenter',
30
+ component: ({ data }) => <DocumentPresenterContainer document={data.subject} />,
26
31
  }),
27
32
  createSurface({
28
33
  id: `${PRESENTER_PLUGIN}/collection`,
29
- role: 'main',
34
+ role: 'article',
30
35
  position: 'hoist',
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
- },
36
+ filter: (data): data is { subject: CollectionType; variant: 'presenter' } =>
37
+ isInstanceOf(CollectionType, data.subject) && data.variant === 'presenter',
38
+ component: ({ data }) => <CollectionPresenterContainer collection={data.subject} />,
47
39
  }),
48
40
  createSurface({
49
41
  id: `${PRESENTER_PLUGIN}/slide`,
@@ -0,0 +1,43 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React, { type FC, useContext, useState } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { type CollectionType } from '@dxos/plugin-space/types';
9
+ import { StackItem } from '@dxos/react-ui-stack';
10
+
11
+ import { Layout, PageNumber, Pager } from './Presenter';
12
+ import { PresenterContext } from '../types';
13
+ import { useExitPresenter } from '../useExitPresenter';
14
+
15
+ const CollectionPresenterContainer: FC<{ collection: CollectionType }> = ({ collection }) => {
16
+ const [slide, setSlide] = useState(0);
17
+
18
+ const { running } = useContext(PresenterContext);
19
+
20
+ const handleExit = useExitPresenter(collection);
21
+
22
+ return (
23
+ <StackItem.Content classNames='relative'>
24
+ <Layout
25
+ bottomRight={<PageNumber index={slide} count={collection.objects.length} />}
26
+ bottomLeft={
27
+ <Pager
28
+ index={slide}
29
+ count={collection.objects.length}
30
+ keys={running}
31
+ onChange={setSlide}
32
+ onExit={handleExit}
33
+ />
34
+ }
35
+ >
36
+ {/* TODO(wittjosiah): Better slide placeholder. */}
37
+ <Surface role='slide' data={{ subject: collection.objects[slide] }} placeholder={<></>} />
38
+ </Layout>
39
+ </StackItem.Content>
40
+ );
41
+ };
42
+
43
+ export default CollectionPresenterContainer;
@@ -0,0 +1,22 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+ import React, { type FC } from 'react';
5
+
6
+ import { type DocumentType } from '@dxos/plugin-markdown/types';
7
+ import { StackItem } from '@dxos/react-ui-stack';
8
+
9
+ import { RevealPlayer } from './RevealPlayer';
10
+ import { useExitPresenter } from '../useExitPresenter';
11
+
12
+ const DocumentPresenterContainer: FC<{ document: DocumentType }> = ({ document }) => {
13
+ const handleExit = useExitPresenter(document);
14
+
15
+ return (
16
+ <StackItem.Content classNames='relative'>
17
+ <RevealPlayer content={document.content.target?.content ?? ''} onExit={handleExit} />
18
+ </StackItem.Content>
19
+ );
20
+ };
21
+
22
+ export default DocumentPresenterContainer;
@@ -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 RevealMain = lazy(() => import('./RevealMain'));
11
- export const PresenterMain = lazy(() => import('./PresenterMain'));
10
+ export const DocumentPresenterContainer = lazy(() => import('./DocumentPresenterContainer'));
11
+ export const CollectionPresenterContainer = lazy(() => import('./CollectionPresenterContainer'));
package/src/index.ts CHANGED
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export { PresenterCapabilities } from './capabilities';
6
5
  export * from './components';
7
6
 
8
7
  export * from './meta';
package/src/types.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import { type Context, createContext } from 'react';
6
7
 
7
- import { S } from '@dxos/echo-schema';
8
8
  import { DocumentType } from '@dxos/plugin-markdown/types';
9
9
  import { CollectionType } from '@dxos/plugin-space/types';
10
10
 
@@ -13,14 +13,14 @@ import { PRESENTER_PLUGIN } from './meta';
13
13
  export namespace PresenterAction {
14
14
  const PRESENTER_ACTION = `${PRESENTER_PLUGIN}/action`;
15
15
 
16
- export class TogglePresentation extends S.TaggedClass<TogglePresentation>()(
16
+ export class TogglePresentation extends Schema.TaggedClass<TogglePresentation>()(
17
17
  `${PRESENTER_ACTION}/toggle-presentation`,
18
18
  {
19
- input: S.Struct({
20
- object: S.Union(DocumentType, CollectionType),
21
- state: S.optional(S.Boolean),
19
+ input: Schema.Struct({
20
+ object: Schema.Union(DocumentType, CollectionType),
21
+ state: Schema.optional(Schema.Boolean),
22
22
  }),
23
- output: S.Void,
23
+ output: Schema.Void,
24
24
  },
25
25
  ) {}
26
26
  }
@@ -37,10 +37,10 @@ export const PresenterContext: Context<PresenterContextType> = createContext<Pre
37
37
  stop: () => {},
38
38
  });
39
39
 
40
- export const PresenterSettingsSchema = S.mutable(
41
- S.Struct({
42
- presentCollections: S.optional(S.Boolean),
40
+ export const PresenterSettingsSchema = Schema.mutable(
41
+ Schema.Struct({
42
+ presentCollections: Schema.optional(Schema.Boolean),
43
43
  }),
44
44
  );
45
45
 
46
- export type PresenterSettingsProps = S.Schema.Type<typeof PresenterSettingsSchema>;
46
+ export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { useCallback } from 'react';
6
+
7
+ import { createIntent, LayoutAction, useCapability, useIntentDispatcher } from '@dxos/app-framework';
8
+ import { type Live } from '@dxos/live-object';
9
+ import { DeckCapabilities } from '@dxos/plugin-deck';
10
+ import { DeckAction } from '@dxos/plugin-deck/types';
11
+ import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
12
+
13
+ export const useExitPresenter = (object: Live<any>) => {
14
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
15
+ const layout = useCapability(DeckCapabilities.MutableDeckState);
16
+
17
+ return useCallback(() => {
18
+ const objectId = fullyQualifiedId(object);
19
+ if (layout.deck.fullscreen) {
20
+ void dispatch(
21
+ createIntent(DeckAction.Adjust, {
22
+ type: 'solo--fullscreen',
23
+ id: objectId,
24
+ }),
25
+ );
26
+ }
27
+ return dispatch(
28
+ createIntent(LayoutAction.Open, {
29
+ part: 'main',
30
+ subject: [objectId],
31
+ options: { workspace: getSpace(document)?.id },
32
+ }),
33
+ );
34
+ }, [dispatch, object]);
35
+ };