@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.
- package/dist/lib/browser/{PresenterMain-PQPWYIWU.mjs → CollectionPresenterContainer-SSFGQUYE.mjs} +16 -43
- package/dist/lib/browser/CollectionPresenterContainer-SSFGQUYE.mjs.map +7 -0
- package/dist/lib/browser/{RevealMain-B2PJXHND.mjs → DocumentPresenterContainer-CAPKSXNP.mjs} +13 -27
- package/dist/lib/browser/DocumentPresenterContainer-CAPKSXNP.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-CWMMBJTB.mjs → app-graph-builder-AURCBPPI.mjs} +26 -6
- package/dist/lib/browser/app-graph-builder-AURCBPPI.mjs.map +7 -0
- package/dist/lib/browser/chunk-2RWWAQZK.mjs +36 -0
- package/dist/lib/browser/chunk-2RWWAQZK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3VVM67QE.mjs → chunk-3BSZF44U.mjs} +5 -5
- package/dist/lib/browser/{chunk-3VVM67QE.mjs.map → chunk-3BSZF44U.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-CQR4O6KC.mjs → chunk-OOZM543N.mjs} +9 -9
- package/dist/lib/browser/chunk-OOZM543N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +12 -31
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-6JT4CB4B.mjs → react-surface-YV4BLHO2.mjs} +14 -29
- package/dist/lib/browser/react-surface-YV4BLHO2.mjs.map +7 -0
- package/dist/lib/browser/{settings-KWSP73SU.mjs → settings-WERSYNE5.mjs} +2 -2
- package/dist/types/src/PresenterPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/CollectionPresenterContainer.d.ts +7 -0
- package/dist/types/src/components/CollectionPresenterContainer.d.ts.map +1 -0
- package/dist/types/src/components/DocumentPresenterContainer.d.ts +7 -0
- package/dist/types/src/components/DocumentPresenterContainer.d.ts.map +1 -0
- package/dist/types/src/components/Markdown/Container.d.ts.map +1 -1
- package/dist/types/src/components/Markdown/Slide.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Layout.d.ts.map +1 -1
- package/dist/types/src/components/Presenter/Pager.d.ts.map +1 -1
- package/dist/types/src/components/PresenterSettings.d.ts.map +1 -1
- package/dist/types/src/components/RevealPlayer/RevealPlayer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +71 -73
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/useExitPresenter.d.ts +6 -0
- package/dist/types/src/useExitPresenter.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -21
- package/src/PresenterPlugin.tsx +1 -14
- package/src/capabilities/app-graph-builder.ts +22 -3
- package/src/capabilities/index.ts +0 -4
- package/src/capabilities/react-surface.tsx +16 -24
- package/src/components/CollectionPresenterContainer.tsx +43 -0
- package/src/components/DocumentPresenterContainer.tsx +22 -0
- package/src/components/index.ts +2 -2
- package/src/index.ts +0 -1
- package/src/types.ts +10 -10
- package/src/useExitPresenter.ts +35 -0
- package/dist/lib/browser/PresenterMain-PQPWYIWU.mjs.map +0 -7
- package/dist/lib/browser/RevealMain-B2PJXHND.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-CWMMBJTB.mjs.map +0 -7
- package/dist/lib/browser/chunk-CQR4O6KC.mjs.map +0 -7
- package/dist/lib/browser/chunk-FK2KJZ73.mjs +0 -16
- package/dist/lib/browser/chunk-FK2KJZ73.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs +0 -46
- package/dist/lib/browser/intent-resolver-TTGJCKQ5.mjs.map +0 -7
- package/dist/lib/browser/react-surface-6JT4CB4B.mjs.map +0 -7
- package/dist/lib/browser/state-W6VFHVB2.mjs +0 -18
- package/dist/lib/browser/state-W6VFHVB2.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -8
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/PresenterMain.d.ts +0 -7
- package/dist/types/src/components/PresenterMain.d.ts.map +0 -1
- package/dist/types/src/components/RevealMain.d.ts +0 -7
- package/dist/types/src/components/RevealMain.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -13
- package/src/capabilities/intent-resolver.ts +0 -43
- package/src/capabilities/state.ts +0 -17
- package/src/components/PresenterMain.tsx +0 -63
- package/src/components/RevealMain.tsx +0 -38
- /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:
|
|
6
|
-
readonly _tag:
|
|
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:
|
|
9
|
-
object:
|
|
10
|
-
name:
|
|
11
|
-
fallbackName:
|
|
12
|
-
content: import("@dxos/echo-schema").Ref$<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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?: "
|
|
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
|
|
138
|
-
identityKey
|
|
139
|
-
email
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
type:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
pending
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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:
|
|
184
|
-
}
|
|
185
|
-
state:
|
|
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
|
|
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:
|
|
200
|
-
presentCollections:
|
|
197
|
+
export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
|
|
198
|
+
presentCollections: Schema.optional<typeof Schema.Boolean>;
|
|
201
199
|
}>>;
|
|
202
|
-
export type PresenterSettingsProps =
|
|
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,
|
|
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;;;;;;;;;;;;;;;;;;;;gCAkCqxQ,CAAC;mCAA6C,CAAC;;sCAA2E,CAAC;;;qDAA6I,CAAC;;4CAA2F,CAAC;;+CAAoH,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;;kDAA0F,CAAC;;0CAAyF,CAAC;;kDAA0F,CAAC;;4CAA2F,CAAC;;kDAA0F,CAAC;;yCAAwF,CAAC;;uDAAyF,CAAC;yDAAmE,CAAC;yDAAmE,CAAC;uDAAiE,CAAC;2DAAqE,CAAC;oEAA8E,CAAC;wDAAkE,CAAC;;kDAAuF,CAAC;;oCAAmF,CAAC;;kDAA0F,CAAC;;wCAAuF,CAAC;;;;;;gDAAkR,CAAC,4BAA4B,CAAC;gDAA2E,CAAC,+BAA+B,CAAC;;;;gDAA4L,CAAC,4BAA4B,CAAC;gDAA2E,CAAC,+BAA+B,CAAC;;;;gDAA4L,CAAC,4BAA4B,CAAC;gDAA2E,CAAC,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;gEAA2vC,CAAC;mEAA4E,CAAC;iEAA0E,CAAC,YAAY,CAAC;oEAA6E,CAAC,YAAY,CAAC;iEAA0E,CAAC,aAAa,CAAC,YAAY,CAAC;oEAA6E,CAAC,aAAa,CAAC,YAAY,CAAC;;;kEAAoM,CAAC;qEAA8E,CAAC;qEAA8E,CAAC,cAAc,CAAC;wEAAiF,CAAC,cAAc,CAAC;;;gDAA+J,CAAC;;;;;;;;;uCAA2Z,CAAC;uCAAiD,CAAC;iCAA2C,CAAC;gCAA0C,CAAC;;;mCAAiG,CAAC;;uCAAgF,CAAC;;;mCAA6F,CAAC;;uCAAgF,CAAC;;;mCAA6F,CAAC;8BAAyC,CAAC;;kCAA2E,CAAC;;;;;;;;;mCAAkR,CAAC;;;;mCAA4I,CAAC;;;;;kCAAqK,CAAC;;;;;;;;;;;IA/Bh1f,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,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
38
|
-
"@dxos/async": "0.8.2-main.
|
|
39
|
-
"@dxos/echo-schema": "0.8.2-main.
|
|
40
|
-
"@dxos/live-object": "0.8.2-main.
|
|
41
|
-
"@dxos/local-storage": "0.8.2-main.
|
|
42
|
-
"@dxos/log": "0.8.2-main.
|
|
43
|
-
"@dxos/plugin-client": "0.8.2-main.
|
|
44
|
-
"@dxos/plugin-
|
|
45
|
-
"@dxos/plugin-
|
|
46
|
-
"@dxos/plugin-
|
|
47
|
-
"@dxos/plugin-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-ui-form": "0.8.2-main.
|
|
50
|
-
"@dxos/react-
|
|
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/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
64
|
-
"@dxos/storybook-utils": "0.8.2-main.
|
|
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.
|
|
71
|
-
"@dxos/react-ui
|
|
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"
|
package/src/PresenterPlugin.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { definePlugin, defineModule, Events, contributes, Capabilities } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import { AppGraphBuilder,
|
|
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
|
-
|
|
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
|
|
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 {
|
|
14
|
-
|
|
13
|
+
import {
|
|
14
|
+
MarkdownSlide,
|
|
15
|
+
PresenterSettings,
|
|
16
|
+
DocumentPresenterContainer,
|
|
17
|
+
CollectionPresenterContainer,
|
|
18
|
+
} from '../components';
|
|
15
19
|
import { PRESENTER_PLUGIN } from '../meta';
|
|
16
|
-
import {
|
|
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: '
|
|
26
|
+
role: 'article',
|
|
23
27
|
position: 'hoist',
|
|
24
|
-
filter: (data): data is { subject: DocumentType } =>
|
|
25
|
-
|
|
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: '
|
|
34
|
+
role: 'article',
|
|
30
35
|
position: 'hoist',
|
|
31
|
-
filter: (data): data is { subject: CollectionType } =>
|
|
32
|
-
|
|
33
|
-
|
|
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;
|
package/src/components/index.ts
CHANGED
|
@@ -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
|
|
11
|
-
export const
|
|
10
|
+
export const DocumentPresenterContainer = lazy(() => import('./DocumentPresenterContainer'));
|
|
11
|
+
export const CollectionPresenterContainer = lazy(() => import('./CollectionPresenterContainer'));
|
package/src/index.ts
CHANGED
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
|
|
16
|
+
export class TogglePresentation extends Schema.TaggedClass<TogglePresentation>()(
|
|
17
17
|
`${PRESENTER_ACTION}/toggle-presentation`,
|
|
18
18
|
{
|
|
19
|
-
input:
|
|
20
|
-
object:
|
|
21
|
-
state:
|
|
19
|
+
input: Schema.Struct({
|
|
20
|
+
object: Schema.Union(DocumentType, CollectionType),
|
|
21
|
+
state: Schema.optional(Schema.Boolean),
|
|
22
22
|
}),
|
|
23
|
-
output:
|
|
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 =
|
|
41
|
-
|
|
42
|
-
presentCollections:
|
|
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 =
|
|
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
|
+
};
|