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

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 (75) 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-RBF22MVS.mjs → settings-WERSYNE5.mjs} +4 -4
  19. package/dist/lib/browser/settings-WERSYNE5.mjs.map +7 -0
  20. package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/index.d.ts +0 -3
  23. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  25. package/dist/types/src/components/CollectionPresenterContainer.d.ts +7 -0
  26. package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +1 -0
  27. package/dist/types/src/components/DocumentPresenterContainer.d.ts +7 -0
  28. package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +1 -0
  29. package/dist/types/src/components/index.d.ts +2 -2
  30. package/dist/types/src/components/index.d.ts.map +1 -1
  31. package/dist/types/src/index.d.ts +0 -1
  32. package/dist/types/src/index.d.ts.map +1 -1
  33. package/dist/types/src/types.d.ts +180 -70
  34. package/dist/types/src/types.d.ts.map +1 -1
  35. package/dist/types/src/useExitPresenter.d.ts +6 -0
  36. package/dist/types/src/useExitPresenter.d.ts.map +1 -0
  37. package/package.json +25 -21
  38. package/src/PresenterPlugin.tsx +1 -14
  39. package/src/capabilities/app-graph-builder.ts +22 -3
  40. package/src/capabilities/index.ts +0 -4
  41. package/src/capabilities/react-surface.tsx +16 -24
  42. package/src/capabilities/settings.ts +2 -2
  43. package/src/components/CollectionPresenterContainer.tsx +43 -0
  44. package/src/components/DocumentPresenterContainer.tsx +22 -0
  45. package/src/components/index.ts +2 -2
  46. package/src/index.ts +0 -1
  47. package/src/types.ts +10 -10
  48. package/src/useExitPresenter.ts +35 -0
  49. package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs.map +0 -7
  50. package/dist/lib/browser/RevealMain-B2PJXHND.mjs.map +0 -7
  51. package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +0 -7
  52. package/dist/lib/browser/chunk-CQR4O6KC.mjs.map +0 -7
  53. package/dist/lib/browser/chunk-FK2KJZ73.mjs +0 -16
  54. package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +0 -7
  55. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +0 -46
  56. package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +0 -7
  57. package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +0 -7
  58. package/dist/lib/browser/settings-RBF22MVS.mjs.map +0 -7
  59. package/dist/lib/browser/state-KI7F4I6V.mjs +0 -18
  60. package/dist/lib/browser/state-KI7F4I6V.mjs.map +0 -7
  61. package/dist/types/src/capabilities/capabilities.d.ts +0 -8
  62. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  63. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  64. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  65. package/dist/types/src/capabilities/state.d.ts +0 -4
  66. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  67. package/dist/types/src/components/PresenterMain.d.ts +0 -7
  68. package/dist/types/src/components/PresenterMain.d.ts.map +0 -1
  69. package/dist/types/src/components/RevealMain.d.ts +0 -7
  70. package/dist/types/src/components/RevealMain.d.ts.map +0 -1
  71. package/src/capabilities/capabilities.ts +0 -13
  72. package/src/capabilities/intent-resolver.ts +0 -43
  73. package/src/capabilities/state.ts +0 -17
  74. package/src/components/PresenterMain.tsx +0 -63
  75. package/src/components/RevealMain.tsx +0 -38
@@ -1,78 +1,188 @@
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.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
- name?: string | undefined;
26
- identifiers: {
27
+ fields?: {
27
28
  readonly value: string;
28
- readonly type: string;
29
- }[];
30
- }>>;
31
- identityDid: S.optional<typeof S.String>;
32
- identityKey: S.optional<typeof S.String>;
33
- email: S.optional<typeof S.String>;
34
- name: S.optional<typeof S.String>;
35
- role: S.optional<S.Literal<["user", "assistant"]>>;
36
- }>;
37
- blocks: S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
38
- pending: S.optional<typeof S.Boolean>;
39
- }>, S.Struct<{
40
- type: S.Literal<["text"]>;
41
- disposition: S.optional<typeof S.String>;
42
- text: typeof S.String;
43
- }>>>, S.mutable<S.extend<S.Struct<{
44
- pending: S.optional<typeof S.Boolean>;
45
- }>, S.Struct<{
46
- type: S.Literal<["json"]>;
47
- disposition: S.optional<typeof S.String>;
48
- data: typeof S.String;
49
- }>>>, S.mutable<S.extend<S.Struct<{
50
- pending: S.optional<typeof S.Boolean>;
51
- }>, S.Struct<{
52
- type: S.Literal<["image"]>;
53
- id: S.optional<typeof S.String>;
54
- source: S.optional<S.Union<[S.mutable<S.Struct<{
55
- type: S.Literal<["base64"]>;
56
- mediaType: typeof S.String;
57
- data: typeof S.String;
58
- }>>, S.mutable<S.Struct<{
59
- type: S.Literal<["http"]>;
60
- url: typeof S.String;
61
- }>>]>>;
62
- }>>>, S.mutable<S.extend<S.Struct<{
63
- pending: S.optional<typeof S.Boolean>;
64
- }>, S.Struct<{
65
- type: S.Literal<["reference"]>;
66
- reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
67
- }>>>]>>;
68
- properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
69
- }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
29
+ readonly label: string;
30
+ readonly category?: string | undefined;
31
+ }[] | undefined;
32
+ organization?: import("@dxos/echo-schema").Ref<{
33
+ readonly id: string;
34
+ description?: string | undefined;
35
+ name?: string | undefined;
36
+ status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
37
+ image?: string | undefined;
38
+ website?: string | undefined;
39
+ }> | undefined;
40
+ image?: string | undefined;
41
+ fullName?: string | undefined;
42
+ preferredName?: string | undefined;
43
+ nickname?: string | undefined;
44
+ jobTitle?: string | undefined;
45
+ department?: string | undefined;
46
+ notes?: string | undefined;
47
+ emails?: {
48
+ readonly value: string;
49
+ readonly label?: string | undefined;
50
+ }[] | undefined;
51
+ identities?: {
52
+ readonly value: string;
53
+ readonly label?: string | undefined;
54
+ }[] | undefined;
55
+ phoneNumbers?: {
56
+ readonly value: string;
57
+ readonly label?: string | undefined;
58
+ }[] | undefined;
59
+ addresses?: {
60
+ readonly value: {
61
+ readonly street?: string | undefined;
62
+ readonly extended?: string | undefined;
63
+ readonly locality?: string | undefined;
64
+ readonly region?: string | undefined;
65
+ readonly postalCode?: string | undefined;
66
+ readonly postOfficeBoxNumber?: string | undefined;
67
+ readonly country?: string | undefined;
68
+ };
69
+ readonly label?: string | undefined;
70
+ }[] | undefined;
71
+ urls?: {
72
+ readonly value: string;
73
+ readonly label?: string | undefined;
74
+ }[] | undefined;
75
+ birthday?: {
76
+ toString: () => string;
77
+ toDateString: () => string;
78
+ toTimeString: () => string;
79
+ toLocaleString: {
80
+ (): string;
81
+ (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
82
+ (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
83
+ };
84
+ toLocaleDateString: {
85
+ (): string;
86
+ (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
87
+ (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
88
+ };
89
+ toLocaleTimeString: {
90
+ (): string;
91
+ (locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
92
+ (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
93
+ };
94
+ valueOf: () => number;
95
+ getTime: () => number;
96
+ getFullYear: () => number;
97
+ getUTCFullYear: () => number;
98
+ getMonth: () => number;
99
+ getUTCMonth: () => number;
100
+ getDate: () => number;
101
+ getUTCDate: () => number;
102
+ getDay: () => number;
103
+ getUTCDay: () => number;
104
+ getHours: () => number;
105
+ getUTCHours: () => number;
106
+ getMinutes: () => number;
107
+ getUTCMinutes: () => number;
108
+ getSeconds: () => number;
109
+ getUTCSeconds: () => number;
110
+ getMilliseconds: () => number;
111
+ getUTCMilliseconds: () => number;
112
+ getTimezoneOffset: () => number;
113
+ setTime: (time: number) => number;
114
+ setMilliseconds: (ms: number) => number;
115
+ setUTCMilliseconds: (ms: number) => number;
116
+ setSeconds: (sec: number, ms?: number) => number;
117
+ setUTCSeconds: (sec: number, ms?: number) => number;
118
+ setMinutes: (min: number, sec?: number, ms?: number) => number;
119
+ setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
120
+ setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
121
+ setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
122
+ setDate: (date: number) => number;
123
+ setUTCDate: (date: number) => number;
124
+ setMonth: (month: number, date?: number) => number;
125
+ setUTCMonth: (month: number, date?: number) => number;
126
+ setFullYear: (year: number, month?: number, date?: number) => number;
127
+ setUTCFullYear: (year: number, month?: number, date?: number) => number;
128
+ toUTCString: () => string;
129
+ toISOString: () => string;
130
+ toJSON: (key?: any) => string;
131
+ [Symbol.toPrimitive]: {
132
+ (hint: "default"): string;
133
+ (hint: "string"): string;
134
+ (hint: "number"): number;
135
+ (hint: string): string | number;
136
+ };
137
+ } | 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
+ }>>>;
70
180
  }, import("@dxos/echo-schema").TypedObjectOptions>>>>;
71
- assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
72
- }>>, typeof CollectionType]>;
73
- 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>;
74
184
  }>;
75
- output: typeof S.Void;
185
+ output: typeof Schema.Void;
76
186
  }>;
77
187
  export class TogglePresentation extends TogglePresentation_base {
78
188
  }
@@ -84,8 +194,8 @@ export type PresenterContextType = {
84
194
  stop: () => void;
85
195
  };
86
196
  export declare const PresenterContext: Context<PresenterContextType>;
87
- export declare const PresenterSettingsSchema: S.mutable<S.Struct<{
88
- presentCollections: S.optional<typeof S.Boolean>;
197
+ export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
198
+ presentCollections: Schema.optional<typeof Schema.Boolean>;
89
199
  }>>;
90
- export type PresenterSettingsProps = S.Schema.Type<typeof PresenterSettingsSchema>;
200
+ export type PresenterSettingsProps = Schema.Schema.Type<typeof PresenterSettingsSchema>;
91
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;AAI1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AAO,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,WAAY,IAAI,CAAC,GAAG,CAAC;;;EAsBjD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-presenter",
3
- "version": "0.8.1",
3
+ "version": "0.8.2-main.2f9c567",
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/async": "0.8.1",
38
- "@dxos/app-framework": "0.8.1",
39
- "@dxos/live-object": "0.8.1",
40
- "@dxos/echo-schema": "0.8.1",
41
- "@dxos/local-storage": "0.8.1",
42
- "@dxos/plugin-graph": "0.8.1",
43
- "@dxos/log": "0.8.1",
44
- "@dxos/plugin-client": "0.8.1",
45
- "@dxos/plugin-stack": "0.8.1",
46
- "@dxos/plugin-markdown": "0.8.1",
47
- "@dxos/plugin-space": "0.8.1",
48
- "@dxos/react-ui-form": "0.8.1",
49
- "@dxos/react-client": "0.8.1",
50
- "@dxos/react-ui-stack": "0.8.1"
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"
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.1",
62
- "@dxos/react-ui": "0.8.1",
63
- "@dxos/react-ui-theme": "0.8.1",
64
- "@dxos/storybook-utils": "0.8.1"
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"
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-theme": "0.8.1",
71
- "@dxos/react-ui": "0.8.1"
74
+ "@dxos/react-ui": "0.8.2-main.2f9c567",
75
+ "@dxos/react-ui-theme": "0.8.2-main.2f9c567"
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`,
@@ -3,13 +3,13 @@
3
3
  //
4
4
 
5
5
  import { Capabilities, contributes } from '@dxos/app-framework';
6
- import { create } from '@dxos/live-object';
6
+ import { live } 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 = create<PresenterSettingsProps>({});
12
+ const settings = live<PresenterSettingsProps>({});
13
13
 
14
14
  return contributes(Capabilities.Settings, {
15
15
  schema: PresenterSettingsSchema,
@@ -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;