@dxos/plugin-observability 0.8.1-staging.5be625a → 0.8.1-staging.97aedb1
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/app-graph-builder-OCAR3KUZ.mjs +40 -0
- package/dist/lib/browser/app-graph-builder-OCAR3KUZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-6Q6ZJ3N4.mjs +123 -0
- package/dist/lib/browser/chunk-6Q6ZJ3N4.mjs.map +7 -0
- package/dist/lib/browser/chunk-RI4RE346.mjs +178 -0
- package/dist/lib/browser/chunk-RI4RE346.mjs.map +7 -0
- package/dist/lib/browser/{client-ready-YVMB32ZM.mjs → client-ready-LRY24QM5.mjs} +2 -3
- package/dist/lib/browser/{client-ready-YVMB32ZM.mjs.map → client-ready-LRY24QM5.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +27 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intents-resolver-KFEQHNY7.mjs → intent-resolver-ZKNJCLDV.mjs} +32 -19
- package/dist/lib/browser/intent-resolver-ZKNJCLDV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-S36FDV7I.mjs +32 -0
- package/dist/lib/browser/react-surface-S36FDV7I.mjs.map +7 -0
- package/dist/lib/browser/{settings-OQOZUJDJ.mjs → settings-JFZJTDH7.mjs} +3 -3
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/app-graph-builder-JPUTX4LQ.cjs +56 -0
- package/dist/lib/node/app-graph-builder-JPUTX4LQ.cjs.map +7 -0
- package/dist/lib/node/chunk-FIL4BZE2.cjs +148 -0
- package/dist/lib/node/chunk-FIL4BZE2.cjs.map +7 -0
- package/dist/lib/node/chunk-V4ZLLL5M.cjs +198 -0
- package/dist/lib/node/chunk-V4ZLLL5M.cjs.map +7 -0
- package/dist/lib/node/{client-ready-FJG76QPF.cjs → client-ready-KHGLQOQZ.cjs} +6 -7
- package/dist/lib/node/{client-ready-FJG76QPF.cjs.map → client-ready-KHGLQOQZ.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +26 -6
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intents-resolver-YUO4UUJT.cjs → intent-resolver-5SANBSGX.cjs} +35 -22
- package/dist/lib/node/intent-resolver-5SANBSGX.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-XWZAUS46.cjs → react-surface-MWJS6OMP.cjs} +20 -13
- package/dist/lib/node/react-surface-MWJS6OMP.cjs.map +7 -0
- package/dist/lib/node/{settings-GUB7VFZU.cjs → settings-ARLOGCYU.cjs} +7 -7
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/app-graph-builder-RKURIIFT.mjs +41 -0
- package/dist/lib/node-esm/app-graph-builder-RKURIIFT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-M3MGU3DN.mjs +179 -0
- package/dist/lib/node-esm/chunk-M3MGU3DN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MW737PHD.mjs +124 -0
- package/dist/lib/node-esm/chunk-MW737PHD.mjs.map +7 -0
- package/dist/lib/node-esm/{client-ready-DNDS3KKV.mjs → client-ready-4BUMAISA.mjs} +2 -3
- package/dist/lib/node-esm/{client-ready-DNDS3KKV.mjs.map → client-ready-4BUMAISA.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +27 -6
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intents-resolver-VOTTSZAN.mjs → intent-resolver-5EFEXLWX.mjs} +32 -19
- package/dist/lib/node-esm/intent-resolver-5EFEXLWX.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-VLQBOZTX.mjs +33 -0
- package/dist/lib/node-esm/react-surface-VLQBOZTX.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-YHYGZAYT.mjs → settings-765HDSFY.mjs} +3 -3
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +177 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{intents-resolver.d.ts → intent-resolver.d.ts} +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/FeedbackForm.d.ts +6 -0
- package/dist/types/src/components/FeedbackForm.d.ts.map +1 -0
- package/dist/types/src/components/HelpContainer.d.ts +3 -0
- package/dist/types/src/components/HelpContainer.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +141 -15
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/ObservabilityPlugin.ts +6 -0
- package/src/capabilities/app-graph-builder.ts +33 -0
- package/src/capabilities/client-ready.ts +0 -1
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/{intents-resolver.ts → intent-resolver.ts} +21 -15
- package/src/capabilities/react-surface.tsx +8 -4
- package/src/components/FeedbackForm.tsx +82 -0
- package/src/components/HelpContainer.tsx +23 -0
- package/src/components/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/translations.ts +5 -0
- package/src/types.ts +167 -22
- package/dist/lib/browser/chunk-4EIUFTFQ.mjs +0 -37
- package/dist/lib/browser/chunk-4EIUFTFQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-7PSHYVPT.mjs +0 -58
- package/dist/lib/browser/chunk-7PSHYVPT.mjs.map +0 -7
- package/dist/lib/browser/intents-resolver-KFEQHNY7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PZEWLGKJ.mjs +0 -24
- package/dist/lib/browser/react-surface-PZEWLGKJ.mjs.map +0 -7
- package/dist/lib/node/chunk-26FY6IAN.cjs +0 -78
- package/dist/lib/node/chunk-26FY6IAN.cjs.map +0 -7
- package/dist/lib/node/chunk-7GVWSQFM.cjs +0 -65
- package/dist/lib/node/chunk-7GVWSQFM.cjs.map +0 -7
- package/dist/lib/node/intents-resolver-YUO4UUJT.cjs.map +0 -7
- package/dist/lib/node/react-surface-XWZAUS46.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-VM4P3575.mjs +0 -59
- package/dist/lib/node-esm/chunk-VM4P3575.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YNSLIAZL.mjs +0 -38
- package/dist/lib/node-esm/chunk-YNSLIAZL.mjs.map +0 -7
- package/dist/lib/node-esm/intents-resolver-VOTTSZAN.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-MJ7S6EVP.mjs +0 -25
- package/dist/lib/node-esm/react-surface-MJ7S6EVP.mjs.map +0 -7
- package/dist/types/src/capabilities/intents-resolver.d.ts.map +0 -1
- /package/dist/lib/browser/{settings-OQOZUJDJ.mjs.map → settings-JFZJTDH7.mjs.map} +0 -0
- /package/dist/lib/node/{settings-GUB7VFZU.cjs.map → settings-ARLOGCYU.cjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-YHYGZAYT.mjs.map → settings-765HDSFY.mjs.map} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
2
|
export declare const UserFeedback: S.Struct<{
|
|
3
|
-
name: S.filter<S.filter<typeof S.String>>;
|
|
4
|
-
email: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
5
3
|
message: S.filter<S.filter<typeof S.String>>;
|
|
6
4
|
}>;
|
|
7
5
|
export type UserFeedback = S.Schema.Type<typeof UserFeedback>;
|
|
@@ -16,31 +14,159 @@ export declare namespace ObservabilityAction {
|
|
|
16
14
|
}>;
|
|
17
15
|
export class Toggle extends Toggle_base {
|
|
18
16
|
}
|
|
19
|
-
const
|
|
17
|
+
const CaptureUserFeedback_base: S.TaggedClass<CaptureUserFeedback, "dxos.org/plugin/observability/action/capture-feedback", {
|
|
18
|
+
readonly _tag: S.tag<"dxos.org/plugin/observability/action/capture-feedback">;
|
|
19
|
+
} & {
|
|
20
|
+
input: S.Struct<{
|
|
21
|
+
message: S.filter<S.filter<typeof S.String>>;
|
|
22
|
+
}>;
|
|
23
|
+
output: typeof S.Void;
|
|
24
|
+
}>;
|
|
25
|
+
export class CaptureUserFeedback extends CaptureUserFeedback_base {
|
|
26
|
+
}
|
|
27
|
+
const BaseSendEvent_base: S.TaggedClass<BaseSendEvent, "dxos.org/plugin/observability/action/send-event", {
|
|
20
28
|
readonly _tag: S.tag<"dxos.org/plugin/observability/action/send-event">;
|
|
21
29
|
} & {
|
|
22
30
|
input: S.Struct<{
|
|
23
31
|
name: typeof S.String;
|
|
24
32
|
properties: S.optional<typeof S.Object>;
|
|
25
|
-
installationId: S.optional<typeof S.String>;
|
|
26
|
-
identityId: S.optional<typeof S.String>;
|
|
27
|
-
timestamp: S.optional<typeof S.Date>;
|
|
28
33
|
}>;
|
|
29
34
|
output: typeof S.Void;
|
|
30
35
|
}>;
|
|
31
|
-
|
|
36
|
+
/** Base intent for sending events. */
|
|
37
|
+
export class BaseSendEvent extends BaseSendEvent_base {
|
|
32
38
|
}
|
|
33
|
-
const
|
|
34
|
-
readonly _tag: S.tag<"dxos.org/plugin/observability/action/
|
|
39
|
+
const SendEvent_base: S.TaggedClass<SendEvent, "dxos.org/plugin/observability/action/send-event", {
|
|
40
|
+
readonly _tag: S.tag<"dxos.org/plugin/observability/action/send-event">;
|
|
35
41
|
} & {
|
|
36
|
-
input: S.Struct<{
|
|
37
|
-
name: S.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
42
|
+
input: S.Union<[S.Struct<{
|
|
43
|
+
name: S.Literal<["identity.create"]>;
|
|
44
|
+
}>, S.Struct<{
|
|
45
|
+
name: S.Literal<["identity.join"]>;
|
|
46
|
+
}>, S.Struct<{
|
|
47
|
+
name: S.Literal<["identity.recover"]>;
|
|
48
|
+
}>, S.Struct<{
|
|
49
|
+
name: S.Literal<["identity.share"]>;
|
|
50
|
+
}>, S.Struct<{
|
|
51
|
+
name: S.Literal<["navigation.activate"]>;
|
|
52
|
+
properties: S.Struct<{
|
|
53
|
+
subjectId: typeof S.String;
|
|
54
|
+
typename: S.optional<typeof S.String>;
|
|
55
|
+
}>;
|
|
56
|
+
}>, S.Struct<{
|
|
57
|
+
name: S.Literal<["page.load"]>;
|
|
58
|
+
properties: S.Struct<{
|
|
59
|
+
loadDuration: typeof S.Number;
|
|
60
|
+
}>;
|
|
61
|
+
}>, S.Struct<{
|
|
62
|
+
name: S.Literal<["plugins.toggle"]>;
|
|
63
|
+
properties: S.Struct<{
|
|
64
|
+
plugin: typeof S.String;
|
|
65
|
+
enabled: typeof S.Boolean;
|
|
66
|
+
}>;
|
|
67
|
+
}>, S.Struct<{
|
|
68
|
+
name: S.Literal<["space.create"]>;
|
|
69
|
+
properties: S.Struct<{
|
|
70
|
+
spaceId: typeof S.String;
|
|
71
|
+
}>;
|
|
72
|
+
}>, S.Struct<{
|
|
73
|
+
name: S.Literal<["space.join"]>;
|
|
74
|
+
properties: S.Struct<{
|
|
75
|
+
spaceId: typeof S.String;
|
|
76
|
+
}>;
|
|
77
|
+
}>, S.Struct<{
|
|
78
|
+
name: S.Literal<["space.limit"]>;
|
|
79
|
+
properties: S.Struct<{
|
|
80
|
+
spaceId: typeof S.String;
|
|
81
|
+
}>;
|
|
82
|
+
}>, S.Struct<{
|
|
83
|
+
name: S.Literal<["space.lock"]>;
|
|
84
|
+
properties: S.Struct<{
|
|
85
|
+
spaceId: typeof S.String;
|
|
86
|
+
}>;
|
|
87
|
+
}>, S.Struct<{
|
|
88
|
+
name: S.Literal<["space.migrate"]>;
|
|
89
|
+
properties: S.Struct<{
|
|
90
|
+
spaceId: typeof S.String;
|
|
91
|
+
targetVersion: S.optional<typeof S.String>;
|
|
92
|
+
version: S.optional<typeof S.String>;
|
|
93
|
+
}>;
|
|
94
|
+
}>, S.Struct<{
|
|
95
|
+
name: S.Literal<["space.object.add"]>;
|
|
96
|
+
properties: S.Struct<{
|
|
97
|
+
spaceId: typeof S.String;
|
|
98
|
+
objectId: typeof S.String;
|
|
99
|
+
typename: S.optional<typeof S.String>;
|
|
100
|
+
}>;
|
|
101
|
+
}>, S.Struct<{
|
|
102
|
+
name: S.Literal<["space.share"]>;
|
|
103
|
+
properties: S.Struct<{
|
|
104
|
+
spaceId: typeof S.String;
|
|
105
|
+
}>;
|
|
106
|
+
}>, S.Struct<{
|
|
107
|
+
name: S.Literal<["space.unlock"]>;
|
|
108
|
+
properties: S.Struct<{
|
|
109
|
+
spaceId: typeof S.String;
|
|
110
|
+
}>;
|
|
111
|
+
}>, S.Struct<{
|
|
112
|
+
name: S.Literal<["threads.create"]>;
|
|
113
|
+
properties: S.Struct<{
|
|
114
|
+
spaceId: typeof S.String;
|
|
115
|
+
threadId: typeof S.String;
|
|
116
|
+
}>;
|
|
117
|
+
}>, S.Struct<{
|
|
118
|
+
name: S.Literal<["threads.delete"]>;
|
|
119
|
+
properties: S.Struct<{
|
|
120
|
+
spaceId: typeof S.String;
|
|
121
|
+
threadId: typeof S.String;
|
|
122
|
+
}>;
|
|
123
|
+
}>, S.Struct<{
|
|
124
|
+
name: S.Literal<["threads.message.add"]>;
|
|
125
|
+
properties: S.Struct<{
|
|
126
|
+
spaceId: typeof S.String;
|
|
127
|
+
threadId: typeof S.String;
|
|
128
|
+
threadLength: typeof S.Number;
|
|
129
|
+
messageId: typeof S.String;
|
|
130
|
+
messageLength: typeof S.Number;
|
|
131
|
+
}>;
|
|
132
|
+
}>, S.Struct<{
|
|
133
|
+
name: S.Literal<["threads.message.delete"]>;
|
|
134
|
+
properties: S.Struct<{
|
|
135
|
+
spaceId: typeof S.String;
|
|
136
|
+
threadId: typeof S.String;
|
|
137
|
+
messageId: typeof S.String;
|
|
138
|
+
}>;
|
|
139
|
+
}>, S.Struct<{
|
|
140
|
+
name: S.Literal<["threads.message.undo-delete"]>;
|
|
141
|
+
properties: S.Struct<{
|
|
142
|
+
spaceId: typeof S.String;
|
|
143
|
+
threadId: typeof S.String;
|
|
144
|
+
messageId: typeof S.String;
|
|
145
|
+
}>;
|
|
146
|
+
}>, S.Struct<{
|
|
147
|
+
name: S.Literal<["threads.message.update"]>;
|
|
148
|
+
properties: S.Struct<{
|
|
149
|
+
spaceId: typeof S.String;
|
|
150
|
+
messageId: typeof S.String;
|
|
151
|
+
messageLength: typeof S.Number;
|
|
152
|
+
}>;
|
|
153
|
+
}>, S.Struct<{
|
|
154
|
+
name: S.Literal<["threads.toggle-resolved"]>;
|
|
155
|
+
properties: S.Struct<{
|
|
156
|
+
spaceId: typeof S.String;
|
|
157
|
+
threadId: typeof S.String;
|
|
158
|
+
}>;
|
|
159
|
+
}>, S.Struct<{
|
|
160
|
+
name: S.Literal<["threads.undo-delete"]>;
|
|
161
|
+
properties: S.Struct<{
|
|
162
|
+
spaceId: typeof S.String;
|
|
163
|
+
threadId: typeof S.String;
|
|
164
|
+
}>;
|
|
165
|
+
}>]>;
|
|
41
166
|
output: typeof S.Void;
|
|
42
167
|
}>;
|
|
43
|
-
|
|
168
|
+
/** Intent with strict types for first-party events. */
|
|
169
|
+
export class SendEvent extends SendEvent_base {
|
|
44
170
|
}
|
|
45
171
|
export {};
|
|
46
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAUtC,eAAO,MAAM,YAAY;;EAEvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAI9D,yBAAiB,mBAAmB,CAAC;;;;;;;;;IACnC,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,mBAAoB,SAAQ,wBAMxC;KAAG;;;;;;;;;;IAEJ,sCAAsC;IACtC,MAAM,OAAO,aAAc,SAAQ,kBAMjC;KAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEL,uDAAuD;IACvD,MAAM,OAAO,SAAU,SAAQ,cAuJ7B;KAAG;;CACN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-observability",
|
|
3
|
-
"version": "0.8.1-staging.
|
|
3
|
+
"version": "0.8.1-staging.97aedb1",
|
|
4
4
|
"description": "DXOS app framework plugin for hooking up app observability",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -35,35 +35,36 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
37
|
"localforage": "^1.10.0",
|
|
38
|
-
"@dxos/app-framework": "0.8.1-staging.
|
|
39
|
-
"@dxos/async": "0.8.1-staging.
|
|
40
|
-
"@dxos/context": "0.8.1-staging.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/live-object": "0.8.1-staging.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/observability": "0.8.1-staging.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-client": "0.8.1-staging.
|
|
50
|
-
"@dxos/react-ui-form": "0.8.1-staging.
|
|
51
|
-
"@dxos/
|
|
38
|
+
"@dxos/app-framework": "0.8.1-staging.97aedb1",
|
|
39
|
+
"@dxos/async": "0.8.1-staging.97aedb1",
|
|
40
|
+
"@dxos/context": "0.8.1-staging.97aedb1",
|
|
41
|
+
"@dxos/invariant": "0.8.1-staging.97aedb1",
|
|
42
|
+
"@dxos/echo-schema": "0.8.1-staging.97aedb1",
|
|
43
|
+
"@dxos/live-object": "0.8.1-staging.97aedb1",
|
|
44
|
+
"@dxos/local-storage": "0.8.1-staging.97aedb1",
|
|
45
|
+
"@dxos/log": "0.8.1-staging.97aedb1",
|
|
46
|
+
"@dxos/observability": "0.8.1-staging.97aedb1",
|
|
47
|
+
"@dxos/plugin-graph": "0.8.1-staging.97aedb1",
|
|
48
|
+
"@dxos/protocols": "0.8.1-staging.97aedb1",
|
|
49
|
+
"@dxos/react-client": "0.8.1-staging.97aedb1",
|
|
50
|
+
"@dxos/react-ui-form": "0.8.1-staging.97aedb1",
|
|
51
|
+
"@dxos/react-ui-stack": "0.8.1-staging.97aedb1",
|
|
52
|
+
"@dxos/util": "0.8.1-staging.97aedb1"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@phosphor-icons/react": "^2.1.5",
|
|
55
56
|
"@types/react": "~18.2.0",
|
|
56
57
|
"react": "~18.2.0",
|
|
57
58
|
"vite": "5.4.7",
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
60
|
-
"@dxos/
|
|
59
|
+
"@dxos/react-ui": "0.8.1-staging.97aedb1",
|
|
60
|
+
"@dxos/react-ui-theme": "0.8.1-staging.97aedb1",
|
|
61
|
+
"@dxos/storybook-utils": "0.8.1-staging.97aedb1"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
64
|
"@phosphor-icons/react": "^2.1.5",
|
|
64
65
|
"react": "~18.2.0",
|
|
65
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
66
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
66
|
+
"@dxos/react-ui": "0.8.1-staging.97aedb1",
|
|
67
|
+
"@dxos/react-ui-theme": "0.8.1-staging.97aedb1"
|
|
67
68
|
},
|
|
68
69
|
"publishConfig": {
|
|
69
70
|
"access": "public"
|
|
@@ -6,6 +6,7 @@ import { allOf, Capabilities, contributes, defineModule, definePlugin, Events }
|
|
|
6
6
|
import { type Observability } from '@dxos/observability';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
AppGraphBuilder,
|
|
9
10
|
ClientReady,
|
|
10
11
|
IntentResolver,
|
|
11
12
|
ObservabilityCapabilities,
|
|
@@ -50,6 +51,11 @@ export const ObservabilityPlugin = (options: { namespace: string; observability:
|
|
|
50
51
|
activatesOn: Events.SetupReactSurface,
|
|
51
52
|
activate: ReactSurface,
|
|
52
53
|
}),
|
|
54
|
+
defineModule({
|
|
55
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
56
|
+
activatesOn: Events.SetupAppGraph,
|
|
57
|
+
activate: AppGraphBuilder,
|
|
58
|
+
}),
|
|
53
59
|
defineModule({
|
|
54
60
|
id: `${meta.id}/module/client-ready`,
|
|
55
61
|
activatesOn: allOf(Events.DispatcherReady, ObservabilityEvents.StateReady, ClientReadyEvent),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
+
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
7
|
+
|
|
8
|
+
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
9
|
+
|
|
10
|
+
// NOTE: Copied from @dxos/plugin-deck to break circular dependency.
|
|
11
|
+
const ATTENDABLE_PATH_SEPARATOR = '~';
|
|
12
|
+
const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';
|
|
13
|
+
|
|
14
|
+
export default (context: PluginsContext) =>
|
|
15
|
+
contributes(Capabilities.AppGraphBuilder, [
|
|
16
|
+
createExtension({
|
|
17
|
+
id: `${OBSERVABILITY_PLUGIN}/help`,
|
|
18
|
+
filter: (node): node is Node<null> => node.id === 'root',
|
|
19
|
+
connector: ({ node }) => [
|
|
20
|
+
{
|
|
21
|
+
id: [node.id, 'help'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
22
|
+
type: DECK_COMPANION_TYPE,
|
|
23
|
+
data: null,
|
|
24
|
+
properties: {
|
|
25
|
+
label: ['help label', { ns: OBSERVABILITY_PLUGIN }],
|
|
26
|
+
icon: 'ph--question--regular',
|
|
27
|
+
disposition: 'hidden',
|
|
28
|
+
position: 'hoist',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
]);
|
|
@@ -61,7 +61,6 @@ export default async ({ context, namespace, observability }: ClientReadyOptions)
|
|
|
61
61
|
createIntent(ObservabilityAction.SendEvent, {
|
|
62
62
|
name: 'page.load',
|
|
63
63
|
properties: {
|
|
64
|
-
href: window.location.href,
|
|
65
64
|
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
66
65
|
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart,
|
|
67
66
|
},
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
7
8
|
export const ClientReady = lazy(() => import('./client-ready'));
|
|
8
|
-
export const IntentResolver = lazy(() => import('./
|
|
9
|
+
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
9
10
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
10
11
|
export const ObservabilitySettings = lazy(() => import('./settings'));
|
|
11
12
|
export const ObservabilityState = lazy(() => import('./state'));
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, createResolver, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
5
|
+
import { Capabilities, contributes, createResolver, IntentAction, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
+
import { log } from '@dxos/log';
|
|
7
|
+
import { getTelemetryIdentity, storeObservabilityDisabled } from '@dxos/observability';
|
|
7
8
|
|
|
8
9
|
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
9
10
|
import { type ObservabilitySettingsProps } from '../components';
|
|
@@ -12,6 +13,12 @@ import { ObservabilityAction } from '../types';
|
|
|
12
13
|
|
|
13
14
|
export default ({ context, namespace }: { context: PluginsContext; namespace: string }) =>
|
|
14
15
|
contributes(Capabilities.IntentResolver, [
|
|
16
|
+
createResolver({
|
|
17
|
+
intent: IntentAction.Track,
|
|
18
|
+
resolve: (intent) => {
|
|
19
|
+
log.info('intent', { intent });
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
15
22
|
createResolver({
|
|
16
23
|
intent: ObservabilityAction.Toggle,
|
|
17
24
|
resolve: async ({ state }) => {
|
|
@@ -21,9 +28,9 @@ export default ({ context, namespace }: { context: PluginsContext; namespace: st
|
|
|
21
28
|
.requestCapability(Capabilities.SettingsStore)
|
|
22
29
|
.getStore<ObservabilitySettingsProps>(OBSERVABILITY_PLUGIN)!.value;
|
|
23
30
|
settings.enabled = state ?? !settings.enabled;
|
|
24
|
-
observability.
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
observability.track({
|
|
32
|
+
...getTelemetryIdentity(client),
|
|
33
|
+
action: 'observability.toggle',
|
|
27
34
|
properties: {
|
|
28
35
|
enabled: settings.enabled,
|
|
29
36
|
},
|
|
@@ -37,18 +44,17 @@ export default ({ context, namespace }: { context: PluginsContext; namespace: st
|
|
|
37
44
|
intent: ObservabilityAction.SendEvent,
|
|
38
45
|
resolve: (data) => {
|
|
39
46
|
const client = context.requestCapability(ClientCapability);
|
|
47
|
+
const properties = 'properties' in data ? data.properties : {};
|
|
48
|
+
|
|
40
49
|
// NOTE: This is to ensure that events fired before observability is ready are still sent.
|
|
41
50
|
// TODO(wittjosiah): If the intent dispatcher supports concurrent actions in the future,
|
|
42
|
-
// then this could awaited still rather than voiding.
|
|
51
|
+
// then this could be awaited still rather than voiding.
|
|
43
52
|
void context.waitForCapability(ObservabilityCapabilities.Observability).then((observability) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
properties
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
observability.event(event);
|
|
53
|
+
observability.track({
|
|
54
|
+
...getTelemetryIdentity(client),
|
|
55
|
+
action: data.name,
|
|
56
|
+
properties,
|
|
57
|
+
});
|
|
52
58
|
});
|
|
53
59
|
},
|
|
54
60
|
}),
|
|
@@ -56,7 +62,7 @@ export default ({ context, namespace }: { context: PluginsContext; namespace: st
|
|
|
56
62
|
intent: ObservabilityAction.CaptureUserFeedback,
|
|
57
63
|
resolve: async (data) => {
|
|
58
64
|
const observability = context.requestCapability(ObservabilityCapabilities.Observability);
|
|
59
|
-
observability.captureUserFeedback(data.
|
|
65
|
+
observability.captureUserFeedback(data.message);
|
|
60
66
|
},
|
|
61
67
|
}),
|
|
62
68
|
]);
|
|
@@ -7,12 +7,11 @@ import React from 'react';
|
|
|
7
7
|
import { contributes, Capabilities, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { SettingsStore } from '@dxos/local-storage';
|
|
9
9
|
|
|
10
|
-
import { ObservabilitySettings, type ObservabilitySettingsProps } from '../components';
|
|
10
|
+
import { HelpContainer, ObservabilitySettings, type ObservabilitySettingsProps } from '../components';
|
|
11
11
|
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
12
|
|
|
13
13
|
export default () =>
|
|
14
|
-
contributes(
|
|
15
|
-
Capabilities.ReactSurface,
|
|
14
|
+
contributes(Capabilities.ReactSurface, [
|
|
16
15
|
createSurface({
|
|
17
16
|
id: OBSERVABILITY_PLUGIN,
|
|
18
17
|
role: 'article',
|
|
@@ -20,4 +19,9 @@ export default () =>
|
|
|
20
19
|
data.subject instanceof SettingsStore && data.subject.prefix === OBSERVABILITY_PLUGIN,
|
|
21
20
|
component: ({ data: { subject } }) => <ObservabilitySettings settings={subject.value} />,
|
|
22
21
|
}),
|
|
23
|
-
|
|
22
|
+
createSurface({
|
|
23
|
+
id: `${OBSERVABILITY_PLUGIN}/help`,
|
|
24
|
+
role: 'deck-companion--help',
|
|
25
|
+
component: () => <HelpContainer />,
|
|
26
|
+
}),
|
|
27
|
+
]);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { getSnapshot } from '@dxos/echo-schema';
|
|
8
|
+
import { IconButton, Input, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { FormProvider, useFormContext, useInputProps } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
+
import { UserFeedback } from '../types';
|
|
13
|
+
|
|
14
|
+
const defaultValues: UserFeedback = { message: '' };
|
|
15
|
+
|
|
16
|
+
const FormContent = () => {
|
|
17
|
+
const { t } = useTranslation(OBSERVABILITY_PLUGIN);
|
|
18
|
+
const { handleSave, canSave } = useFormContext<UserFeedback>();
|
|
19
|
+
|
|
20
|
+
const messageProps = useInputProps(['message']);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div role='form' className='p-3 flex flex-col gap-2'>
|
|
24
|
+
<div role='none' className='space-b-1'>
|
|
25
|
+
<Input.Root validationValence={messageProps.getStatus().status}>
|
|
26
|
+
<Input.Label>{t('feedback text area label')}</Input.Label>
|
|
27
|
+
<Input.TextArea
|
|
28
|
+
classNames={'text-sm'}
|
|
29
|
+
rows={5}
|
|
30
|
+
cols={30}
|
|
31
|
+
placeholder={t('feedback text area placeholder')}
|
|
32
|
+
value={messageProps.getValue() ?? ''}
|
|
33
|
+
onChange={(e) => messageProps.onValueChange('string', e.target.value)}
|
|
34
|
+
// TODO(wittjosiah): This aggressively shows validation errors.
|
|
35
|
+
onBlur={messageProps.onBlur}
|
|
36
|
+
/>
|
|
37
|
+
<Input.DescriptionAndValidation>
|
|
38
|
+
<Input.Validation>{messageProps.getStatus().error}</Input.Validation>
|
|
39
|
+
</Input.DescriptionAndValidation>
|
|
40
|
+
</Input.Root>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div role='none' className='space-b-2'>
|
|
44
|
+
<IconButton
|
|
45
|
+
icon='ph--paper-plane-tilt--regular'
|
|
46
|
+
label={t('send feedback label')}
|
|
47
|
+
variant='primary'
|
|
48
|
+
type='submit'
|
|
49
|
+
classNames='is-full'
|
|
50
|
+
disabled={!canSave}
|
|
51
|
+
onClick={handleSave}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// TODO(wittjosiah): Use `Form`?
|
|
59
|
+
export const FeedbackForm = ({ onSave }: { onSave: (values: UserFeedback) => void }) => {
|
|
60
|
+
const formRef = useRef<HTMLDivElement>(null);
|
|
61
|
+
const [_, update] = useState({});
|
|
62
|
+
const forceRender = useCallback(() => update({}), [update]);
|
|
63
|
+
|
|
64
|
+
const handleSave = useCallback(
|
|
65
|
+
(values: UserFeedback) => {
|
|
66
|
+
onSave(values);
|
|
67
|
+
// TODO(wittjosiah): Force re-render to clear the form.
|
|
68
|
+
forceRender();
|
|
69
|
+
},
|
|
70
|
+
[forceRender, onSave],
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const initialValues = getSnapshot(defaultValues);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<FormProvider formRef={formRef} schema={UserFeedback} initialValues={initialValues} onSave={handleSave}>
|
|
77
|
+
<div ref={formRef}>
|
|
78
|
+
<FormContent />
|
|
79
|
+
</div>
|
|
80
|
+
</FormProvider>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { FeedbackForm } from './FeedbackForm';
|
|
10
|
+
import { ObservabilityAction, type UserFeedback } from '../types';
|
|
11
|
+
|
|
12
|
+
export const HelpContainer = () => {
|
|
13
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
14
|
+
|
|
15
|
+
const handleSave = useCallback(
|
|
16
|
+
(values: UserFeedback) => {
|
|
17
|
+
void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));
|
|
18
|
+
},
|
|
19
|
+
[dispatch],
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return <FeedbackForm onSave={handleSave} />;
|
|
23
|
+
};
|
package/src/components/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -19,6 +19,11 @@ export default [
|
|
|
19
19
|
// TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.
|
|
20
20
|
'observability description':
|
|
21
21
|
'When enabled, basic usage data will used to improve the product. This may include performance metrics, error logs, and usage data. No personally identifiable information, other than your public key, is included with this data and no private data ever leaves your devices.',
|
|
22
|
+
|
|
23
|
+
'help label': 'Feedback & Support',
|
|
24
|
+
'feedback text area label': 'Feedback',
|
|
25
|
+
'feedback text area placeholder': 'Please describe your issue or suggestion.',
|
|
26
|
+
'send feedback label': 'Send Feedback',
|
|
22
27
|
},
|
|
23
28
|
},
|
|
24
29
|
},
|