@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.
- 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-RBF22MVS.mjs → settings-WERSYNE5.mjs} +4 -4
- package/dist/lib/browser/settings-WERSYNE5.mjs.map +7 -0
- 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/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/types.d.ts +180 -70
- 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/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/capabilities/settings.ts +2 -2
- 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/settings-RBF22MVS.mjs.map +0 -7
- package/dist/lib/browser/state-KI7F4I6V.mjs +0 -18
- package/dist/lib/browser/state-KI7F4I6V.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
|
@@ -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:
|
|
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
|
-
|
|
26
|
-
identifiers: {
|
|
27
|
+
fields?: {
|
|
27
28
|
readonly value: string;
|
|
28
|
-
readonly
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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:
|
|
72
|
-
}
|
|
73
|
-
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>;
|
|
74
184
|
}>;
|
|
75
|
-
output: typeof
|
|
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:
|
|
88
|
-
presentCollections:
|
|
197
|
+
export declare const PresenterSettingsSchema: Schema.mutable<Schema.Struct<{
|
|
198
|
+
presentCollections: Schema.optional<typeof Schema.Boolean>;
|
|
89
199
|
}>>;
|
|
90
|
-
export type PresenterSettingsProps =
|
|
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","source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,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,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.
|
|
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/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/plugin-
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/plugin-
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/plugin-
|
|
47
|
-
"@dxos/plugin-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-client": "0.8.
|
|
50
|
-
"@dxos/react-ui-
|
|
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.
|
|
62
|
-
"@dxos/react-ui": "0.8.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
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
|
|
71
|
-
"@dxos/react-ui": "0.8.
|
|
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"
|
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`,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
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 =
|
|
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;
|