@dxos/plugin-observability 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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/ObservabilitySettings-EM7ABGCA.mjs +31 -0
- package/dist/lib/browser/ObservabilitySettings-EM7ABGCA.mjs.map +7 -0
- package/dist/lib/browser/capture-user-feedback-H4KPG7PC.mjs +25 -0
- package/dist/lib/browser/capture-user-feedback-H4KPG7PC.mjs.map +7 -0
- package/dist/lib/browser/chunk-6WX6ST5B.mjs +49 -0
- package/dist/lib/browser/chunk-6WX6ST5B.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-K33HLC3Z.mjs +33 -0
- package/dist/lib/browser/chunk-K33HLC3Z.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZR3FNBD.mjs +85 -0
- package/dist/lib/browser/chunk-VZR3FNBD.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +20 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +93 -113
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +16 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/send-event-BICCRJ2W.mjs +23 -0
- package/dist/lib/browser/send-event-BICCRJ2W.mjs.map +7 -0
- package/dist/lib/browser/toggle-NV2X62VV.mjs +48 -0
- package/dist/lib/browser/toggle-NV2X62VV.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +16 -0
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs +32 -0
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs.map +7 -0
- package/dist/lib/node-esm/capture-user-feedback-DTL3DUXB.mjs +26 -0
- package/dist/lib/node-esm/capture-user-feedback-DTL3DUXB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FZRJBWSE.mjs +86 -0
- package/dist/lib/node-esm/chunk-FZRJBWSE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JGHMP7UL.mjs +35 -0
- package/dist/lib/node-esm/chunk-JGHMP7UL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QZKJ2TUU.mjs +50 -0
- package/dist/lib/node-esm/chunk-QZKJ2TUU.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +21 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +93 -113
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +17 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/send-event-IWZKYZBI.mjs +24 -0
- package/dist/lib/node-esm/send-event-IWZKYZBI.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-NJWUAPD4.mjs +49 -0
- package/dist/lib/node-esm/toggle-NJWUAPD4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +17 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/ObservabilityPlugin.d.ts +5 -3
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client-ready.d.ts +5 -5
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +16 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +10 -3
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts +6 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts +36 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts +2 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts +6 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts +37 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/index.d.ts +2 -0
- package/dist/types/src/components/ObservabilitySettings/index.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/containers/HelpContainer/HelpContainer.d.ts +4 -0
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +1 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts +2 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/capture-user-feedback.d.ts +5 -0
- package/dist/types/src/operations/capture-user-feedback.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +23 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +5 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/send-event.d.ts +5 -0
- package/dist/types/src/operations/send-event.d.ts.map +1 -0
- package/dist/types/src/operations/toggle.d.ts +5 -0
- package/dist/types/src/operations/toggle.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +18 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +25 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +6 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -39
- package/src/ObservabilityPlugin.ts +59 -53
- package/src/capabilities/app-graph-builder.ts +27 -37
- package/src/capabilities/client-ready.ts +69 -81
- package/src/capabilities/index.ts +12 -8
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +33 -19
- package/src/capabilities/settings.ts +26 -14
- package/src/capabilities/state.ts +20 -12
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +31 -0
- package/src/components/FeedbackForm/FeedbackForm.stories.tsx +32 -0
- package/src/components/FeedbackForm/FeedbackForm.tsx +33 -0
- package/src/components/FeedbackForm/index.ts +5 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +33 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +38 -0
- package/src/components/ObservabilitySettings/index.ts +5 -0
- package/src/components/index.ts +4 -2
- package/src/containers/HelpContainer/HelpContainer.tsx +56 -0
- package/src/containers/HelpContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +2 -2
- package/src/meta.ts +8 -5
- package/src/operations/capture-user-feedback.ts +22 -0
- package/src/operations/definitions.ts +77 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/send-event.ts +24 -0
- package/src/operations/toggle.ts +47 -0
- package/src/translations.ts +18 -16
- package/src/types/Settings.ts +19 -0
- package/src/types/capabilities.ts +37 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +7 -0
- package/dist/lib/browser/app-graph-builder-DCOBBL5B.mjs +0 -43
- package/dist/lib/browser/app-graph-builder-DCOBBL5B.mjs.map +0 -7
- package/dist/lib/browser/chunk-57RVSKYP.mjs +0 -13
- package/dist/lib/browser/chunk-57RVSKYP.mjs.map +0 -7
- package/dist/lib/browser/chunk-D7WLH4F5.mjs +0 -179
- package/dist/lib/browser/chunk-D7WLH4F5.mjs.map +0 -7
- package/dist/lib/browser/chunk-N3VKS2LF.mjs +0 -175
- package/dist/lib/browser/chunk-N3VKS2LF.mjs.map +0 -7
- package/dist/lib/browser/chunk-UUOBAWT2.mjs +0 -18
- package/dist/lib/browser/chunk-UUOBAWT2.mjs.map +0 -7
- package/dist/lib/browser/client-ready-KK3EWEBV.mjs +0 -102
- package/dist/lib/browser/client-ready-KK3EWEBV.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-A4EV25OK.mjs +0 -77
- package/dist/lib/browser/intent-resolver-A4EV25OK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FUXMXVYO.mjs +0 -32
- package/dist/lib/browser/react-surface-FUXMXVYO.mjs.map +0 -7
- package/dist/lib/browser/settings-OSMKJOUM.mjs +0 -25
- package/dist/lib/browser/settings-OSMKJOUM.mjs.map +0 -7
- package/dist/lib/browser/state-VIOQS2IL.mjs +0 -26
- package/dist/lib/browser/state-VIOQS2IL.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node-esm/app-graph-builder-6JT2RPVM.mjs +0 -44
- package/dist/lib/node-esm/app-graph-builder-6JT2RPVM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4BFWCQJ5.mjs +0 -180
- package/dist/lib/node-esm/chunk-4BFWCQJ5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7XR7KMAA.mjs +0 -15
- package/dist/lib/node-esm/chunk-7XR7KMAA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JTKEM7PT.mjs +0 -19
- package/dist/lib/node-esm/chunk-JTKEM7PT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RG73SOOD.mjs +0 -176
- package/dist/lib/node-esm/chunk-RG73SOOD.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-EZVAX7D5.mjs +0 -103
- package/dist/lib/node-esm/client-ready-EZVAX7D5.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7HLSOM7X.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-7HLSOM7X.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TYVAHN2E.mjs +0 -33
- package/dist/lib/node-esm/react-surface-TYVAHN2E.mjs.map +0 -7
- package/dist/lib/node-esm/settings-S2OXVO3G.mjs +0 -26
- package/dist/lib/node-esm/settings-S2OXVO3G.mjs.map +0 -7
- package/dist/lib/node-esm/state-J2WS6L64.mjs +0 -27
- package/dist/lib/node-esm/state-J2WS6L64.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts +0 -12
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm.d.ts +0 -6
- package/dist/types/src/components/FeedbackForm.d.ts.map +0 -1
- package/dist/types/src/components/HelpContainer.d.ts +0 -3
- package/dist/types/src/components/HelpContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObservabilitySettings.d.ts +0 -10
- package/dist/types/src/components/ObservabilitySettings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -5
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -286
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -22
- package/src/capabilities/intent-resolver.ts +0 -68
- package/src/components/FeedbackForm.tsx +0 -82
- package/src/components/HelpContainer.tsx +0 -40
- package/src/components/ObservabilitySettings.tsx +0 -48
- package/src/events.ts +0 -14
- package/src/types.ts +0 -203
- /package/dist/lib/browser/{types.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types.mjs.map → browser/types/index.mjs.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/HelpContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,eAAO,MAAM,aAAa,yBA0BzB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export declare const ObservabilitySettingsSchema: Schema.mutable<Schema.Struct<{
|
|
4
|
-
enabled: typeof Schema.Boolean;
|
|
5
|
-
}>>;
|
|
6
|
-
export type ObservabilitySettingsProps = Schema.Schema.Type<typeof ObservabilitySettingsSchema>;
|
|
7
|
-
export declare const ObservabilitySettings: ({ settings }: {
|
|
8
|
-
settings: ObservabilitySettingsProps;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=ObservabilitySettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObservabilitySettings.d.ts","sourceRoot":"","sources":["../../../../src/components/ObservabilitySettings.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,eAAO,MAAM,2BAA2B;;GAQvC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhG,eAAO,MAAM,qBAAqB,GAAI,cAAc;IAAE,QAAQ,EAAE,0BAA0B,CAAA;CAAE,sBAqB3F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,UAAU,+CAAgD,CAAC;CACzE;AAGD,eAAO,MAAM,gBAAgB,+CAA2D,CAAC"}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } from '@dxos/echo';
|
|
3
|
-
export declare const UserFeedback: Schema.Struct<{
|
|
4
|
-
message: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
5
|
-
}>;
|
|
6
|
-
export type UserFeedback = Schema.Schema.Type<typeof UserFeedback>;
|
|
7
|
-
export declare namespace ObservabilityAction {
|
|
8
|
-
const Toggle_base: Schema.TaggedClass<Toggle, "dxos.org/plugin/observability/action/toggle", {
|
|
9
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/action/toggle">;
|
|
10
|
-
} & {
|
|
11
|
-
input: Schema.Struct<{
|
|
12
|
-
state: Schema.optional<typeof Schema.Boolean>;
|
|
13
|
-
}>;
|
|
14
|
-
output: typeof Schema.Boolean;
|
|
15
|
-
}>;
|
|
16
|
-
export class Toggle extends Toggle_base {
|
|
17
|
-
}
|
|
18
|
-
const CaptureUserFeedback_base: Schema.TaggedClass<CaptureUserFeedback, "dxos.org/plugin/observability/action/capture-feedback", {
|
|
19
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/action/capture-feedback">;
|
|
20
|
-
} & {
|
|
21
|
-
input: Schema.Struct<{
|
|
22
|
-
message: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
23
|
-
}>;
|
|
24
|
-
output: typeof Schema.Void;
|
|
25
|
-
}>;
|
|
26
|
-
export class CaptureUserFeedback extends CaptureUserFeedback_base {
|
|
27
|
-
}
|
|
28
|
-
const BaseSendEvent_base: Schema.TaggedClass<BaseSendEvent, "dxos.org/plugin/observability/action/send-event", {
|
|
29
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/action/send-event">;
|
|
30
|
-
} & {
|
|
31
|
-
input: Schema.Struct<{
|
|
32
|
-
name: typeof Schema.String;
|
|
33
|
-
properties: Schema.optional<typeof Schema.Object>;
|
|
34
|
-
}>;
|
|
35
|
-
output: typeof Schema.Void;
|
|
36
|
-
}>;
|
|
37
|
-
/** Base intent for sending events. */
|
|
38
|
-
export class BaseSendEvent extends BaseSendEvent_base {
|
|
39
|
-
}
|
|
40
|
-
const SendEvent_base: Schema.TaggedClass<SendEvent, "dxos.org/plugin/observability/action/send-event", {
|
|
41
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/action/send-event">;
|
|
42
|
-
} & {
|
|
43
|
-
input: Schema.Union<[Schema.Struct<{
|
|
44
|
-
name: Schema.Literal<["identity.create"]>;
|
|
45
|
-
}>, Schema.Struct<{
|
|
46
|
-
name: Schema.Literal<["identity.join"]>;
|
|
47
|
-
}>, Schema.Struct<{
|
|
48
|
-
name: Schema.Literal<["identity.recover"]>;
|
|
49
|
-
}>, Schema.Struct<{
|
|
50
|
-
name: Schema.Literal<["identity.share"]>;
|
|
51
|
-
}>, Schema.Struct<{
|
|
52
|
-
name: Schema.Literal<["navigation.activate"]>;
|
|
53
|
-
properties: Schema.Struct<{
|
|
54
|
-
subjectId: typeof Schema.String;
|
|
55
|
-
typename: Schema.optional<typeof Schema.String>;
|
|
56
|
-
}>;
|
|
57
|
-
}>, Schema.Struct<{
|
|
58
|
-
name: Schema.Literal<["page.load"]>;
|
|
59
|
-
properties: Schema.Struct<{
|
|
60
|
-
loadDuration: typeof Schema.Number;
|
|
61
|
-
}>;
|
|
62
|
-
}>, Schema.Struct<{
|
|
63
|
-
name: Schema.Literal<["plugins.toggle"]>;
|
|
64
|
-
properties: Schema.Struct<{
|
|
65
|
-
plugin: typeof Schema.String;
|
|
66
|
-
enabled: typeof Schema.Boolean;
|
|
67
|
-
}>;
|
|
68
|
-
}>, Schema.Struct<{
|
|
69
|
-
name: Schema.Literal<["space.create"]>;
|
|
70
|
-
properties: Schema.Struct<{
|
|
71
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
72
|
-
byteLength: number;
|
|
73
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
74
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
75
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
76
|
-
make: (value: string) => Type.SpaceId;
|
|
77
|
-
random: () => Type.SpaceId;
|
|
78
|
-
};
|
|
79
|
-
}>;
|
|
80
|
-
}>, Schema.Struct<{
|
|
81
|
-
name: Schema.Literal<["space.join"]>;
|
|
82
|
-
properties: Schema.Struct<{
|
|
83
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
84
|
-
byteLength: number;
|
|
85
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
86
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
87
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
88
|
-
make: (value: string) => Type.SpaceId;
|
|
89
|
-
random: () => Type.SpaceId;
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
92
|
-
}>, Schema.Struct<{
|
|
93
|
-
name: Schema.Literal<["space.limit"]>;
|
|
94
|
-
properties: Schema.Struct<{
|
|
95
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
96
|
-
byteLength: number;
|
|
97
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
98
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
99
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
100
|
-
make: (value: string) => Type.SpaceId;
|
|
101
|
-
random: () => Type.SpaceId;
|
|
102
|
-
};
|
|
103
|
-
}>;
|
|
104
|
-
}>, Schema.Struct<{
|
|
105
|
-
name: Schema.Literal<["space.lock"]>;
|
|
106
|
-
properties: Schema.Struct<{
|
|
107
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
108
|
-
byteLength: number;
|
|
109
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
110
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
111
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
112
|
-
make: (value: string) => Type.SpaceId;
|
|
113
|
-
random: () => Type.SpaceId;
|
|
114
|
-
};
|
|
115
|
-
}>;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
name: Schema.Literal<["space.migrate"]>;
|
|
118
|
-
properties: Schema.Struct<{
|
|
119
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
120
|
-
byteLength: number;
|
|
121
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
122
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
123
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
124
|
-
make: (value: string) => Type.SpaceId;
|
|
125
|
-
random: () => Type.SpaceId;
|
|
126
|
-
};
|
|
127
|
-
targetVersion: Schema.optional<typeof Schema.String>;
|
|
128
|
-
version: Schema.optional<typeof Schema.String>;
|
|
129
|
-
}>;
|
|
130
|
-
}>, Schema.Struct<{
|
|
131
|
-
name: Schema.Literal<["space.object.add"]>;
|
|
132
|
-
properties: Schema.Struct<{
|
|
133
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
134
|
-
byteLength: number;
|
|
135
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
136
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
137
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
138
|
-
make: (value: string) => Type.SpaceId;
|
|
139
|
-
random: () => Type.SpaceId;
|
|
140
|
-
};
|
|
141
|
-
objectId: typeof Schema.String;
|
|
142
|
-
typename: Schema.optional<typeof Schema.String>;
|
|
143
|
-
}>;
|
|
144
|
-
}>, Schema.Struct<{
|
|
145
|
-
name: Schema.Literal<["space.share"]>;
|
|
146
|
-
properties: Schema.Struct<{
|
|
147
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
148
|
-
byteLength: number;
|
|
149
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
150
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
151
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
152
|
-
make: (value: string) => Type.SpaceId;
|
|
153
|
-
random: () => Type.SpaceId;
|
|
154
|
-
};
|
|
155
|
-
}>;
|
|
156
|
-
}>, Schema.Struct<{
|
|
157
|
-
name: Schema.Literal<["space.unlock"]>;
|
|
158
|
-
properties: Schema.Struct<{
|
|
159
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
160
|
-
byteLength: number;
|
|
161
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
162
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
163
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
164
|
-
make: (value: string) => Type.SpaceId;
|
|
165
|
-
random: () => Type.SpaceId;
|
|
166
|
-
};
|
|
167
|
-
}>;
|
|
168
|
-
}>, Schema.Struct<{
|
|
169
|
-
name: Schema.Literal<["threads.create"]>;
|
|
170
|
-
properties: Schema.Struct<{
|
|
171
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
172
|
-
byteLength: number;
|
|
173
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
174
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
175
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
176
|
-
make: (value: string) => Type.SpaceId;
|
|
177
|
-
random: () => Type.SpaceId;
|
|
178
|
-
};
|
|
179
|
-
threadId: typeof Schema.String;
|
|
180
|
-
}>;
|
|
181
|
-
}>, Schema.Struct<{
|
|
182
|
-
name: Schema.Literal<["threads.delete"]>;
|
|
183
|
-
properties: Schema.Struct<{
|
|
184
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
185
|
-
byteLength: number;
|
|
186
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
187
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
188
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
189
|
-
make: (value: string) => Type.SpaceId;
|
|
190
|
-
random: () => Type.SpaceId;
|
|
191
|
-
};
|
|
192
|
-
threadId: typeof Schema.String;
|
|
193
|
-
}>;
|
|
194
|
-
}>, Schema.Struct<{
|
|
195
|
-
name: Schema.Literal<["threads.message.add"]>;
|
|
196
|
-
properties: Schema.Struct<{
|
|
197
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
198
|
-
byteLength: number;
|
|
199
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
200
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
201
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
202
|
-
make: (value: string) => Type.SpaceId;
|
|
203
|
-
random: () => Type.SpaceId;
|
|
204
|
-
};
|
|
205
|
-
threadId: typeof Schema.String;
|
|
206
|
-
threadLength: typeof Schema.Number;
|
|
207
|
-
messageId: typeof Schema.String;
|
|
208
|
-
messageLength: typeof Schema.Number;
|
|
209
|
-
}>;
|
|
210
|
-
}>, Schema.Struct<{
|
|
211
|
-
name: Schema.Literal<["threads.message.delete"]>;
|
|
212
|
-
properties: Schema.Struct<{
|
|
213
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
214
|
-
byteLength: number;
|
|
215
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
216
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
217
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
218
|
-
make: (value: string) => Type.SpaceId;
|
|
219
|
-
random: () => Type.SpaceId;
|
|
220
|
-
};
|
|
221
|
-
threadId: typeof Schema.String;
|
|
222
|
-
messageId: typeof Schema.String;
|
|
223
|
-
}>;
|
|
224
|
-
}>, Schema.Struct<{
|
|
225
|
-
name: Schema.Literal<["threads.message.undo-delete"]>;
|
|
226
|
-
properties: Schema.Struct<{
|
|
227
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
228
|
-
byteLength: number;
|
|
229
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
230
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
231
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
232
|
-
make: (value: string) => Type.SpaceId;
|
|
233
|
-
random: () => Type.SpaceId;
|
|
234
|
-
};
|
|
235
|
-
threadId: typeof Schema.String;
|
|
236
|
-
messageId: typeof Schema.String;
|
|
237
|
-
}>;
|
|
238
|
-
}>, Schema.Struct<{
|
|
239
|
-
name: Schema.Literal<["threads.message.update"]>;
|
|
240
|
-
properties: Schema.Struct<{
|
|
241
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
242
|
-
byteLength: number;
|
|
243
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
244
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
245
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
246
|
-
make: (value: string) => Type.SpaceId;
|
|
247
|
-
random: () => Type.SpaceId;
|
|
248
|
-
};
|
|
249
|
-
messageId: typeof Schema.String;
|
|
250
|
-
messageLength: typeof Schema.Number;
|
|
251
|
-
}>;
|
|
252
|
-
}>, Schema.Struct<{
|
|
253
|
-
name: Schema.Literal<["threads.toggle-resolved"]>;
|
|
254
|
-
properties: Schema.Struct<{
|
|
255
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
256
|
-
byteLength: number;
|
|
257
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
258
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
259
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
260
|
-
make: (value: string) => Type.SpaceId;
|
|
261
|
-
random: () => Type.SpaceId;
|
|
262
|
-
};
|
|
263
|
-
threadId: typeof Schema.String;
|
|
264
|
-
}>;
|
|
265
|
-
}>, Schema.Struct<{
|
|
266
|
-
name: Schema.Literal<["threads.undo-delete"]>;
|
|
267
|
-
properties: Schema.Struct<{
|
|
268
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
269
|
-
byteLength: number;
|
|
270
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
271
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
272
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
273
|
-
make: (value: string) => Type.SpaceId;
|
|
274
|
-
random: () => Type.SpaceId;
|
|
275
|
-
};
|
|
276
|
-
threadId: typeof Schema.String;
|
|
277
|
-
}>;
|
|
278
|
-
}>]>;
|
|
279
|
-
output: typeof Schema.Void;
|
|
280
|
-
}>;
|
|
281
|
-
/** Intent with strict types for first-party events. */
|
|
282
|
-
export class SendEvent extends SendEvent_base {
|
|
283
|
-
}
|
|
284
|
-
export {};
|
|
285
|
-
}
|
|
286
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAUlC,eAAO,MAAM,YAAY;;EAEvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAInE,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"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type Client } from '@dxos/client';
|
|
7
|
-
import { type Observability } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
10
|
-
|
|
11
|
-
export namespace ObservabilityCapabilities {
|
|
12
|
-
export type State = {
|
|
13
|
-
group?: string;
|
|
14
|
-
notified?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export const State = defineCapability<State>(`${OBSERVABILITY_PLUGIN}/capability/state`);
|
|
17
|
-
|
|
18
|
-
export const Observability = defineCapability<Observability>(`${OBSERVABILITY_PLUGIN}/capability/observability`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
22
|
-
export const ClientCapability = defineCapability<Client>('dxos.org/plugin/client/capability/client');
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes, createResolver, IntentAction, type PluginContext } from '@dxos/app-framework';
|
|
6
|
-
import { log } from '@dxos/log';
|
|
7
|
-
import { getTelemetryIdentity, storeObservabilityDisabled } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
10
|
-
import { type ObservabilitySettingsProps } from '../components';
|
|
11
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
-
import { ObservabilityAction } from '../types';
|
|
13
|
-
|
|
14
|
-
export default ({ context, namespace }: { context: PluginContext; namespace: string }) =>
|
|
15
|
-
contributes(Capabilities.IntentResolver, [
|
|
16
|
-
createResolver({
|
|
17
|
-
intent: IntentAction.Track,
|
|
18
|
-
resolve: (intent) => {
|
|
19
|
-
log.info('intent', { intent });
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
createResolver({
|
|
23
|
-
intent: ObservabilityAction.Toggle,
|
|
24
|
-
resolve: async ({ state }) => {
|
|
25
|
-
const client = context.getCapability(ClientCapability);
|
|
26
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
27
|
-
const settings = context
|
|
28
|
-
.getCapability(Capabilities.SettingsStore)
|
|
29
|
-
.getStore<ObservabilitySettingsProps>(OBSERVABILITY_PLUGIN)!.value;
|
|
30
|
-
settings.enabled = state ?? !settings.enabled;
|
|
31
|
-
observability.track({
|
|
32
|
-
...getTelemetryIdentity(client),
|
|
33
|
-
action: 'observability.toggle',
|
|
34
|
-
properties: {
|
|
35
|
-
enabled: settings.enabled,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
observability.setMode(settings.enabled ? 'basic' : 'disabled');
|
|
39
|
-
await storeObservabilityDisabled(namespace, !settings.enabled);
|
|
40
|
-
return { data: settings.enabled };
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
43
|
-
createResolver({
|
|
44
|
-
intent: ObservabilityAction.SendEvent,
|
|
45
|
-
resolve: (data) => {
|
|
46
|
-
const client = context.getCapability(ClientCapability);
|
|
47
|
-
const properties = 'properties' in data ? data.properties : {};
|
|
48
|
-
|
|
49
|
-
// NOTE: This is to ensure that events fired before observability is ready are still sent.
|
|
50
|
-
// TODO(wittjosiah): If the intent dispatcher supports concurrent actions in the future,
|
|
51
|
-
// then this could be awaited still rather than voiding.
|
|
52
|
-
void context.waitForCapability(ObservabilityCapabilities.Observability).then((observability) => {
|
|
53
|
-
observability.track({
|
|
54
|
-
...getTelemetryIdentity(client),
|
|
55
|
-
action: data.name,
|
|
56
|
-
properties,
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
createResolver({
|
|
62
|
-
intent: ObservabilityAction.CaptureUserFeedback,
|
|
63
|
-
resolve: async (data) => {
|
|
64
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
65
|
-
observability.captureUserFeedback(data.message);
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
]);
|
|
@@ -1,82 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { pipe } from 'effect';
|
|
6
|
-
import React, { useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
import { chain, createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
|
|
10
|
-
import { FeedbackForm } from './FeedbackForm';
|
|
11
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
-
import { ObservabilityAction, type UserFeedback } from '../types';
|
|
13
|
-
|
|
14
|
-
export const HelpContainer = () => {
|
|
15
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
16
|
-
|
|
17
|
-
const handleSave = useCallback(
|
|
18
|
-
(values: UserFeedback) =>
|
|
19
|
-
dispatch(
|
|
20
|
-
pipe(
|
|
21
|
-
createIntent(ObservabilityAction.CaptureUserFeedback, values),
|
|
22
|
-
chain(LayoutAction.UpdateComplementary, { part: 'complementary', options: { state: 'collapsed' } }),
|
|
23
|
-
chain(LayoutAction.AddToast, {
|
|
24
|
-
part: 'toast',
|
|
25
|
-
subject: {
|
|
26
|
-
id: `${OBSERVABILITY_PLUGIN}/feedback-success`,
|
|
27
|
-
icon: 'ph--paper-plane-tilt--regular',
|
|
28
|
-
duration: 3000,
|
|
29
|
-
title: ['feedback toast label', { ns: OBSERVABILITY_PLUGIN }],
|
|
30
|
-
description: ['feedback toast description', { ns: OBSERVABILITY_PLUGIN }],
|
|
31
|
-
closeLabel: ['close label', { ns: 'os' }],
|
|
32
|
-
},
|
|
33
|
-
}),
|
|
34
|
-
),
|
|
35
|
-
),
|
|
36
|
-
[dispatch],
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
return <FeedbackForm onSave={handleSave} />;
|
|
40
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Schema } from 'effect';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
import { Input, Message, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
11
|
-
|
|
12
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
13
|
-
import { ObservabilityAction } from '../types';
|
|
14
|
-
|
|
15
|
-
export const ObservabilitySettingsSchema = Schema.mutable(
|
|
16
|
-
Schema.Struct({
|
|
17
|
-
enabled: Schema.Boolean,
|
|
18
|
-
// TODO(wittjosiah): Separate settings for each observability feature.
|
|
19
|
-
// metrics?: boolean;
|
|
20
|
-
// telemetry?: boolean;
|
|
21
|
-
// errors?: boolean;
|
|
22
|
-
}),
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export type ObservabilitySettingsProps = Schema.Schema.Type<typeof ObservabilitySettingsSchema>;
|
|
26
|
-
|
|
27
|
-
export const ObservabilitySettings = ({ settings }: { settings: ObservabilitySettingsProps }) => {
|
|
28
|
-
const { t } = useTranslation(OBSERVABILITY_PLUGIN);
|
|
29
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<DeprecatedFormContainer>
|
|
33
|
-
<DeprecatedFormInput
|
|
34
|
-
label={t('observability enabled label')}
|
|
35
|
-
secondary={
|
|
36
|
-
<Message.Root valence='info'>
|
|
37
|
-
<Message.Content>{t('observability description')}</Message.Content>
|
|
38
|
-
</Message.Root>
|
|
39
|
-
}
|
|
40
|
-
>
|
|
41
|
-
<Input.Switch
|
|
42
|
-
checked={settings.enabled}
|
|
43
|
-
onCheckedChange={(checked) => dispatch(createIntent(ObservabilityAction.Toggle, { state: !!checked }))}
|
|
44
|
-
/>
|
|
45
|
-
</DeprecatedFormInput>
|
|
46
|
-
</DeprecatedFormContainer>
|
|
47
|
-
);
|
|
48
|
-
};
|
package/src/events.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineEvent, Events } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { OBSERVABILITY_PLUGIN } from './meta';
|
|
8
|
-
|
|
9
|
-
export namespace ObservabilityEvents {
|
|
10
|
-
export const StateReady = Events.createStateEvent(OBSERVABILITY_PLUGIN);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
14
|
-
export const ClientReadyEvent = defineEvent('dxos.org/plugin/client/event/client-ready');
|