@dxos/plugin-status-bar 0.7.5-staging.e6154f3 → 0.8.1-main.013e445
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/index.mjs +121 -96
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +149 -123
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +121 -96
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/FeedbackForm.d.ts +5 -3
- package/dist/types/src/components/FeedbackForm.d.ts.map +1 -1
- package/dist/types/src/components/StatusBar.stories.d.ts +2 -1
- package/dist/types/src/components/StatusBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/StatusBarPanel.d.ts +3 -2
- package/dist/types/src/components/StatusBarPanel.d.ts.map +1 -1
- package/dist/types/src/components/VersionNumber.d.ts +2 -1
- package/dist/types/src/components/VersionNumber.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -6
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +15 -16
- package/src/components/FeedbackForm.tsx +39 -29
- package/src/components/StatusBarPanel.tsx +14 -3
- package/src/components/VersionNumber.tsx +2 -1
- package/src/components/index.ts +1 -0
- package/src/meta.ts +2 -2
- package/src/translations.ts +1 -1
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-status-bar/src/
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-status-bar/src/meta.ts":{"bytes":1277,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":4726,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":15619,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytes":7783,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytes":11172,"imports":[{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytes":8160,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytes":728,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx","kind":"import-statement","original":"./StatusBarPanel"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytes":6167,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./components/VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/index.ts":{"bytes":699,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":28321},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["FeedbackForm","STATUS_BAR_PLUGIN","StatusBar","StatusBarActions","StatusBarPanel","StatusBarPlugin","meta"],"entryPoint":"packages/plugins/plugin-status-bar/src/index.ts","inputs":{"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytesInOutput":4547},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":202},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":947},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytesInOutput":1955},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":2319},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytesInOutput":3247},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":1317}},"bytes":15295}}}
|
|
@@ -1,62 +1,12 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// packages/plugins/plugin-status-bar/src/components/StatusBar.tsx
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import React, { forwardRef } from "react";
|
|
6
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
7
|
-
var StatusBarText = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("span", {
|
|
8
|
-
className: mx(classNames),
|
|
9
|
-
ref: forwardedRef
|
|
10
|
-
}, children));
|
|
11
|
-
var StatusBarButton = /* @__PURE__ */ forwardRef(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
12
|
-
const classes = mx("flex items-center justify-center gap-2 p-1 px-2 rounded-sm", "select-none cursor-pointer dx-focus-ring text-description text-xs", "hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700", classNames);
|
|
13
|
-
return asChild ? /* @__PURE__ */ React.createElement(Slot, {
|
|
14
|
-
role: "button",
|
|
15
|
-
ref: forwardedRef,
|
|
16
|
-
className: classes,
|
|
17
|
-
...props
|
|
18
|
-
}, children) : /* @__PURE__ */ React.createElement("button", {
|
|
19
|
-
className: classes,
|
|
20
|
-
ref: forwardedRef,
|
|
21
|
-
...props
|
|
22
|
-
}, children);
|
|
23
|
-
});
|
|
24
|
-
var StatusBarItem = /* @__PURE__ */ forwardRef(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
25
|
-
role: "menuitem",
|
|
26
|
-
className: mx("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
|
|
27
|
-
ref: forwardedRef,
|
|
28
|
-
...props
|
|
29
|
-
}, children));
|
|
30
|
-
var StartContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
role: "none",
|
|
32
|
-
className: mx("flex-grow flex items-center space-x-2", classNames),
|
|
33
|
-
ref: forwardedRef
|
|
34
|
-
}, children));
|
|
35
|
-
var EndContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
36
|
-
role: "none",
|
|
37
|
-
className: mx("flex-grow flex items-center justify-end", classNames),
|
|
38
|
-
ref: forwardedRef
|
|
39
|
-
}, children));
|
|
40
|
-
var StatusBar = {
|
|
41
|
-
Text: StatusBarText,
|
|
42
|
-
Item: StatusBarItem,
|
|
43
|
-
Button: StatusBarButton,
|
|
44
|
-
StartContent,
|
|
45
|
-
EndContent
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
|
|
49
|
-
import React4, { useState } from "react";
|
|
50
|
-
import { Surface } from "@dxos/app-framework";
|
|
51
|
-
import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
52
|
-
|
|
53
3
|
// packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx
|
|
54
4
|
import { PaperPlaneTilt, X } from "@phosphor-icons/react";
|
|
55
|
-
import
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
5
|
+
import React, { useRef } from "react";
|
|
6
|
+
import { getSnapshot } from "@dxos/echo-schema";
|
|
7
|
+
import { UserFeedback } from "@dxos/plugin-observability/types";
|
|
58
8
|
import { Button, Input, Popover, useTranslation } from "@dxos/react-ui";
|
|
59
|
-
import {
|
|
9
|
+
import { FormProvider, useFormContext, useInputProps } from "@dxos/react-ui-form";
|
|
60
10
|
import { getSize } from "@dxos/react-ui-theme";
|
|
61
11
|
|
|
62
12
|
// packages/plugins/plugin-status-bar/src/meta.ts
|
|
@@ -84,7 +34,7 @@ var translations = {
|
|
|
84
34
|
"feedback text area placeholder": "Please describe your issue or suggestion.",
|
|
85
35
|
"send feedback label": "Send Feedback",
|
|
86
36
|
"warning title": "WARNING",
|
|
87
|
-
"technology preview message": "Composer is
|
|
37
|
+
"technology preview message": "Composer is currently in beta.",
|
|
88
38
|
"learn more label": "Learn more",
|
|
89
39
|
"released message": "This version released {{released}}.",
|
|
90
40
|
"see release label": "See release on GitHub",
|
|
@@ -98,85 +48,151 @@ var translations_default = [
|
|
|
98
48
|
];
|
|
99
49
|
|
|
100
50
|
// packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx
|
|
101
|
-
var
|
|
51
|
+
var defaultValues = {
|
|
102
52
|
name: "",
|
|
103
53
|
email: "",
|
|
104
54
|
message: ""
|
|
105
55
|
};
|
|
106
|
-
var
|
|
56
|
+
var FormContent = () => {
|
|
107
57
|
const { t } = useTranslation(STATUS_BAR_PLUGIN);
|
|
108
58
|
const translation = mkTranslation(t);
|
|
109
|
-
const {
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
onClose();
|
|
113
|
-
}, [
|
|
114
|
-
dispatch,
|
|
115
|
-
onClose
|
|
59
|
+
const { handleSave, canSave } = useFormContext();
|
|
60
|
+
const nameProps = useInputProps([
|
|
61
|
+
"name"
|
|
116
62
|
]);
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
63
|
+
const emailProps = useInputProps([
|
|
64
|
+
"email"
|
|
65
|
+
]);
|
|
66
|
+
const messageProps = useInputProps([
|
|
67
|
+
"message"
|
|
68
|
+
]);
|
|
69
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
123
70
|
role: "form",
|
|
124
71
|
className: "p-3 flex flex-col gap-2"
|
|
125
|
-
}, /* @__PURE__ */
|
|
72
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
126
73
|
role: "none",
|
|
127
74
|
className: "space-b-1"
|
|
128
|
-
}, /* @__PURE__ */
|
|
129
|
-
validationValence: getStatus(
|
|
130
|
-
}, /* @__PURE__ */
|
|
75
|
+
}, /* @__PURE__ */ React.createElement(Input.Root, {
|
|
76
|
+
validationValence: nameProps.getStatus().status
|
|
77
|
+
}, /* @__PURE__ */ React.createElement(Input.Label, null, translation("name label")), /* @__PURE__ */ React.createElement(Input.TextInput, {
|
|
131
78
|
classNames: "text-sm",
|
|
132
79
|
placeholder: translation("name placeholder"),
|
|
133
80
|
autoFocus: true,
|
|
134
|
-
|
|
135
|
-
|
|
81
|
+
value: nameProps.getValue() ?? "",
|
|
82
|
+
onChange: (e) => nameProps.onValueChange("string", e.target.value),
|
|
83
|
+
onBlur: nameProps.onBlur
|
|
84
|
+
}), /* @__PURE__ */ React.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React.createElement(Input.Validation, null, nameProps.getStatus().error)))), /* @__PURE__ */ React.createElement("div", {
|
|
136
85
|
role: "none",
|
|
137
86
|
className: "space-b-1"
|
|
138
|
-
}, /* @__PURE__ */
|
|
139
|
-
validationValence: getStatus(
|
|
140
|
-
}, /* @__PURE__ */
|
|
87
|
+
}, /* @__PURE__ */ React.createElement(Input.Root, {
|
|
88
|
+
validationValence: emailProps.getStatus().status
|
|
89
|
+
}, /* @__PURE__ */ React.createElement(Input.Label, null, translation("email input label")), /* @__PURE__ */ React.createElement(Input.TextInput, {
|
|
141
90
|
classNames: "text-sm",
|
|
142
91
|
placeholder: translation("email input placeholder"),
|
|
143
|
-
|
|
144
|
-
|
|
92
|
+
value: emailProps.getValue() ?? "",
|
|
93
|
+
onChange: (e) => emailProps.onValueChange("string", e.target.value),
|
|
94
|
+
onBlur: emailProps.onBlur
|
|
95
|
+
}), /* @__PURE__ */ React.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React.createElement(Input.Validation, null, emailProps.getStatus().error)))), /* @__PURE__ */ React.createElement("div", {
|
|
145
96
|
role: "none",
|
|
146
97
|
className: "space-b-1"
|
|
147
|
-
}, /* @__PURE__ */
|
|
148
|
-
validationValence: getStatus(
|
|
149
|
-
}, /* @__PURE__ */
|
|
98
|
+
}, /* @__PURE__ */ React.createElement(Input.Root, {
|
|
99
|
+
validationValence: messageProps.getStatus().status
|
|
100
|
+
}, /* @__PURE__ */ React.createElement(Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ React.createElement(Input.TextArea, {
|
|
150
101
|
classNames: "text-sm",
|
|
151
102
|
rows: 5,
|
|
152
103
|
cols: 30,
|
|
153
104
|
placeholder: translation("feedback text area placeholder"),
|
|
154
|
-
|
|
155
|
-
|
|
105
|
+
value: messageProps.getValue() ?? "",
|
|
106
|
+
onChange: (e) => messageProps.onValueChange("string", e.target.value),
|
|
107
|
+
onBlur: messageProps.onBlur
|
|
108
|
+
}), /* @__PURE__ */ React.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React.createElement(Input.Validation, null, messageProps.getStatus().error)))), /* @__PURE__ */ React.createElement("div", {
|
|
156
109
|
role: "none",
|
|
157
110
|
className: "space-b-2"
|
|
158
|
-
}, /* @__PURE__ */
|
|
111
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
159
112
|
type: "submit",
|
|
160
113
|
variant: "primary",
|
|
161
114
|
classNames: "is-full flex gap-2",
|
|
162
115
|
disabled: !canSave,
|
|
163
116
|
onClick: handleSave
|
|
164
|
-
}, /* @__PURE__ */
|
|
117
|
+
}, /* @__PURE__ */ React.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ React.createElement("div", {
|
|
165
118
|
className: "grow"
|
|
166
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ React.createElement(PaperPlaneTilt, {
|
|
167
120
|
className: getSize(5)
|
|
168
|
-
})), /* @__PURE__ */
|
|
121
|
+
})), /* @__PURE__ */ React.createElement(Popover.Close, {
|
|
169
122
|
asChild: true
|
|
170
|
-
}, /* @__PURE__ */
|
|
123
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
171
124
|
classNames: "is-full flex gap-2"
|
|
172
|
-
}, /* @__PURE__ */
|
|
125
|
+
}, /* @__PURE__ */ React.createElement("span", null, t("cancel label", {
|
|
173
126
|
ns: "os"
|
|
174
|
-
})), /* @__PURE__ */
|
|
127
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
175
128
|
className: "grow"
|
|
176
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ React.createElement(X, {
|
|
177
130
|
className: getSize(5)
|
|
178
131
|
})))));
|
|
179
132
|
};
|
|
133
|
+
var FeedbackForm = ({ onSave }) => {
|
|
134
|
+
const formRef = useRef(null);
|
|
135
|
+
const initialValues = getSnapshot(defaultValues);
|
|
136
|
+
return /* @__PURE__ */ React.createElement(FormProvider, {
|
|
137
|
+
formRef,
|
|
138
|
+
schema: UserFeedback,
|
|
139
|
+
initialValues,
|
|
140
|
+
onSave
|
|
141
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
142
|
+
ref: formRef
|
|
143
|
+
}, /* @__PURE__ */ React.createElement(FormContent, null)));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
// packages/plugins/plugin-status-bar/src/components/StatusBar.tsx
|
|
147
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
148
|
+
import React2, { forwardRef } from "react";
|
|
149
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
150
|
+
var StatusBarText = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React2.createElement("span", {
|
|
151
|
+
className: mx(classNames),
|
|
152
|
+
ref: forwardedRef
|
|
153
|
+
}, children));
|
|
154
|
+
var StatusBarButton = /* @__PURE__ */ forwardRef(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
155
|
+
const classes = mx("flex items-center justify-center gap-2 p-1 px-2 rounded-sm", "select-none cursor-pointer dx-focus-ring text-description text-xs", "hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700", classNames);
|
|
156
|
+
return asChild ? /* @__PURE__ */ React2.createElement(Slot, {
|
|
157
|
+
role: "button",
|
|
158
|
+
ref: forwardedRef,
|
|
159
|
+
className: classes,
|
|
160
|
+
...props
|
|
161
|
+
}, children) : /* @__PURE__ */ React2.createElement("button", {
|
|
162
|
+
className: classes,
|
|
163
|
+
ref: forwardedRef,
|
|
164
|
+
...props
|
|
165
|
+
}, children);
|
|
166
|
+
});
|
|
167
|
+
var StatusBarItem = /* @__PURE__ */ forwardRef(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ React2.createElement("div", {
|
|
168
|
+
role: "menuitem",
|
|
169
|
+
className: mx("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
|
|
170
|
+
ref: forwardedRef,
|
|
171
|
+
...props
|
|
172
|
+
}, children));
|
|
173
|
+
var StartContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React2.createElement("div", {
|
|
174
|
+
role: "none",
|
|
175
|
+
className: mx("flex-grow flex items-center space-x-2", classNames),
|
|
176
|
+
ref: forwardedRef
|
|
177
|
+
}, children));
|
|
178
|
+
var EndContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React2.createElement("div", {
|
|
179
|
+
role: "none",
|
|
180
|
+
className: mx("flex-grow flex items-center justify-end", classNames),
|
|
181
|
+
ref: forwardedRef
|
|
182
|
+
}, children));
|
|
183
|
+
var StatusBar = {
|
|
184
|
+
Text: StatusBarText,
|
|
185
|
+
Item: StatusBarItem,
|
|
186
|
+
Button: StatusBarButton,
|
|
187
|
+
StartContent,
|
|
188
|
+
EndContent
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
|
|
192
|
+
import React4, { useCallback, useState } from "react";
|
|
193
|
+
import { createIntent, Surface, useIntentDispatcher } from "@dxos/app-framework";
|
|
194
|
+
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
195
|
+
import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
180
196
|
|
|
181
197
|
// packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx
|
|
182
198
|
import { formatDistance } from "date-fns/formatDistance";
|
|
@@ -190,13 +206,14 @@ var VersionNumber = () => {
|
|
|
190
206
|
const { t } = useTranslation2(STATUS_BAR_PLUGIN);
|
|
191
207
|
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
192
208
|
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
|
209
|
+
const isLabs = config.values.runtime?.app?.env?.DX_LABS;
|
|
193
210
|
const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
|
|
194
211
|
const previewUrl = "https://docs.dxos.org/composer#technology-preview";
|
|
195
212
|
return /* @__PURE__ */ React3.createElement(Popover2.Root, null, /* @__PURE__ */ React3.createElement(Popover2.Trigger, {
|
|
196
213
|
asChild: true
|
|
197
214
|
}, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
|
|
198
215
|
classNames: "text-xs"
|
|
199
|
-
},
|
|
216
|
+
}, isLabs ? version : v)), /* @__PURE__ */ React3.createElement(Popover2.Portal, null, /* @__PURE__ */ React3.createElement(Popover2.Content, {
|
|
200
217
|
side: "top",
|
|
201
218
|
role: "message",
|
|
202
219
|
classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
|
|
@@ -248,6 +265,13 @@ var VersionNumber = () => {
|
|
|
248
265
|
var StatusBarActions = () => {
|
|
249
266
|
const { t } = useTranslation3(STATUS_BAR_PLUGIN);
|
|
250
267
|
const [open, setOpen] = useState(false);
|
|
268
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
269
|
+
const handleSave = useCallback((values) => {
|
|
270
|
+
void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));
|
|
271
|
+
setOpen(false);
|
|
272
|
+
}, [
|
|
273
|
+
dispatch
|
|
274
|
+
]);
|
|
251
275
|
return /* @__PURE__ */ React4.createElement(Popover3.Root, {
|
|
252
276
|
open,
|
|
253
277
|
onOpenChange: setOpen
|
|
@@ -274,7 +298,7 @@ var StatusBarActions = () => {
|
|
|
274
298
|
}, t("discord label")))), /* @__PURE__ */ React4.createElement(VersionNumber, null), /* @__PURE__ */ React4.createElement(Popover3.Portal, null, /* @__PURE__ */ React4.createElement(Popover3.Content, {
|
|
275
299
|
classNames: "shadow-lg"
|
|
276
300
|
}, /* @__PURE__ */ React4.createElement(FeedbackForm, {
|
|
277
|
-
|
|
301
|
+
onSave: handleSave
|
|
278
302
|
}), /* @__PURE__ */ React4.createElement(Popover3.Arrow, null))));
|
|
279
303
|
};
|
|
280
304
|
var StatusBarPanel = () => {
|
|
@@ -325,6 +349,7 @@ var StatusBarPlugin = () => definePlugin(meta, [
|
|
|
325
349
|
})
|
|
326
350
|
]);
|
|
327
351
|
export {
|
|
352
|
+
FeedbackForm,
|
|
328
353
|
STATUS_BAR_PLUGIN,
|
|
329
354
|
StatusBar,
|
|
330
355
|
StatusBarActions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\ntype StatusBarButtonProps = ThemedClassName<ComponentPropsWithRef<'button'> & { asChild?: boolean }>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center justify-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer dx-focus-ring text-description text-xs',\n 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',\n classNames,\n );\n\n return asChild ? (\n <Slot role='button' ref={forwardedRef} className={classes} {...props}>\n {children}\n </Slot>\n ) : (\n <button className={classes} ref={forwardedRef} {...props}>\n {children}\n </button>\n );\n },\n);\n\nexport default StatusBarButton;\n\ntype StatusBarItemProps = ThemedClassName<ComponentPropsWithRef<'div'>>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </div>\n ),\n);\n\ntype StartContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center space-x-2', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\ntype EndContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center justify-end', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\nexport const StatusBar = {\n Text: StatusBarText,\n Item: StatusBarItem,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { Icon, Popover, useTranslation } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\nimport { VersionNumber } from './VersionNumber';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nexport const StatusBarActions = () => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const [open, setOpen] = useState(false);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <StatusBar.Button data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('feedback label')}</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button asChild>\n <a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--discord-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('discord label')}</StatusBar.Text>\n </a>\n </StatusBar.Button>\n <VersionNumber />\n <Popover.Portal>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onClose={() => setOpen(false)} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n\nexport const StatusBarPanel = () => {\n return (\n <>\n <StatusBarActions />\n <span role='separator' className='grow' />\n <Surface role='status' />\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { PaperPlaneTilt, X } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction, UserFeedback } from '@dxos/plugin-observability/types';\nimport { Button, Input, Popover, useTranslation } from '@dxos/react-ui';\nimport { useForm } from '@dxos/react-ui-form';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { STATUS_BAR_PLUGIN } from '../meta';\nimport { mkTranslation } from '../translations';\n\nconst initialValues: UserFeedback = { name: '', email: '', message: '' };\n\nexport const FeedbackForm = ({ onClose }: { onClose: () => void }) => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const translation = mkTranslation(t);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const onSave = useCallback(\n (values: UserFeedback) => {\n void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));\n onClose();\n },\n [dispatch, onClose],\n );\n\n const { handleSave, canSave, getStatus, ...inputProps } = useForm<UserFeedback>({\n initialValues,\n schema: UserFeedback,\n onSave,\n });\n\n return (\n <div role='form' className='p-3 flex flex-col gap-2'>\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('name').status}>\n <Input.Label>{translation('name label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('name placeholder')}\n autoFocus\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('name').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('email').status}>\n <Input.Label>{translation('email input label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('email input placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('email').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('message').status}>\n <Input.Label>{translation('feedback text area label')}</Input.Label>\n <Input.TextArea\n classNames={'text-sm'}\n rows={5}\n cols={30}\n placeholder={translation('feedback text area placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('message').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-2'>\n <Button\n type='submit'\n variant='primary'\n classNames='is-full flex gap-2'\n disabled={!canSave}\n onClick={handleSave}\n >\n <span>{translation('send feedback label')}</span>\n <div className='grow' />\n <PaperPlaneTilt className={getSize(5)} />\n </Button>\n <Popover.Close asChild>\n <Button classNames='is-full flex gap-2'>\n <span>{t('cancel label', { ns: 'os' })}</span>\n <div className='grow' />\n <X className={getSize(5)} />\n </Button>\n </Popover.Close>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STATUS_BAR_PLUGIN = 'dxos.org/plugin/status-bar';\n\nexport const meta = {\n id: STATUS_BAR_PLUGIN,\n name: 'Status Bar',\n description: 'Display a bar with status and actions.',\n icon: 'ph--info--regular',\n} satisfies PluginMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\n | 'email input label'\n | 'email input placeholder'\n | 'feedback text area label'\n | 'feedback text area placeholder'\n | 'send feedback label'\n | 'name label'\n | 'name placeholder'\n | 'warning title'\n | 'technology preview message'\n | 'learn more label'\n | 'released message'\n | 'see release label'\n | 'powered by dxos message'\n | 'discord label'\n | 'feedback label';\n\ntype RequiredTranslation = { [key in StatusBarTranslationKeys]: string };\ntype TranslationEntry = { [STATUS_BAR_PLUGIN]: RequiredTranslation };\ntype Language = string;\n\n// -- helpers.\nconst entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });\nexport const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);\n\nconst translations: Record<Language, TranslationEntry> = {\n 'en-US': entry({\n 'plugin name': 'Status Bar',\n 'name label': 'Name',\n 'name placeholder': 'Preferred name',\n 'email input label': 'Email',\n 'email input placeholder': 'hello@example.com',\n 'feedback text area label': 'Feedback',\n 'feedback text area placeholder': 'Please describe your issue or suggestion.',\n 'send feedback label': 'Send Feedback',\n 'warning title': 'WARNING',\n 'technology preview message': 'Composer is still in technology preview.',\n 'learn more label': 'Learn more',\n 'released message': 'This version released {{released}}.',\n 'see release label': 'See release on GitHub',\n 'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',\n 'discord label': 'Discord',\n 'feedback label': 'Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { formatDistance } from 'date-fns/formatDistance';\nimport React from 'react';\n\nimport { useConfig } from '@dxos/react-client';\nimport { Link, Message, Popover, Trans, useTranslation, Icon } from '@dxos/react-ui';\n\nimport { StatusBar } from './StatusBar';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nconst VERSION_REGEX = /([\\d.]+)/;\n\nexport const VersionNumber = () => {\n const config = useConfig();\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};\n const [_, v] = version?.match(VERSION_REGEX) ?? [];\n\n const releaseUrl =\n config.values.runtime?.app?.env?.DX_ENVIRONMENT === 'production'\n ? `${repo}/releases/tag/v${version}`\n : `${repo}/commit/${commitHash}`;\n\n const previewUrl = 'https://docs.dxos.org/composer#technology-preview';\n\n return (\n <Popover.Root>\n <Popover.Trigger asChild>\n <StatusBar.Button classNames='text-xs'>v{v}</StatusBar.Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side='top'\n role='message'\n classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'\n >\n <Message.Root valence='warning' className='rounded-be-none p-5'>\n <Message.Title>\n <Icon icon='ph--warning--duotone' size={6} classNames='inline mie-2' />\n <span>{t('warning title')}</span>\n </Message.Title>\n <Message.Body>\n {t('technology preview message')}\n <br />\n <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('learn more label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </Message.Body>\n </Message.Root>\n <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>\n {timestamp && (\n <p>\n {t('released message', {\n released: formatDistance(new Date(timestamp), new Date(), { addSuffix: true }),\n })}\n <br />\n <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('see release label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </p>\n )}\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'powered by dxos message',\n components: {\n dxos: <Link href='https://dxos.org' target='_blank' rel='noreferrer' variant='neutral' />,\n },\n }}\n />\n </p>\n </div>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n Surface,\n} from '@dxos/app-framework';\n\nimport { StatusBarActions, StatusBarPanel } from './components';\nimport { VersionNumber } from './components/VersionNumber';\nimport { meta, STATUS_BAR_PLUGIN } from './meta';\nimport translations from './translations';\n\nexport const StatusBarPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r0-footer',\n component: () => <Surface role='status' />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r1-footer',\n component: () => <StatusBarActions />,\n }),\n createSurface({\n id: `${STATUS_BAR_PLUGIN}/header-end`,\n role: 'header-end',\n component: () => <VersionNumber />,\n }),\n ]),\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/components/FeedbackForm.tsx", "../../../src/meta.ts", "../../../src/translations.ts", "../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../src/components/VersionNumber.tsx", "../../../src/StatusBarPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { PaperPlaneTilt, X } from '@phosphor-icons/react';\nimport React, { useRef } from 'react';\n\nimport { getSnapshot } from '@dxos/echo-schema';\nimport { UserFeedback } from '@dxos/plugin-observability/types';\nimport { Button, Input, Popover, useTranslation } from '@dxos/react-ui';\nimport { FormProvider, useFormContext, useInputProps } from '@dxos/react-ui-form';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { STATUS_BAR_PLUGIN } from '../meta';\nimport { mkTranslation } from '../translations';\n\nconst defaultValues: UserFeedback = { name: '', email: '', message: '' };\n\nconst FormContent = () => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const translation = mkTranslation(t);\n const { handleSave, canSave } = useFormContext<UserFeedback>();\n\n const nameProps = useInputProps(['name']);\n const emailProps = useInputProps(['email']);\n const messageProps = useInputProps(['message']);\n\n return (\n <div role='form' className='p-3 flex flex-col gap-2'>\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={nameProps.getStatus().status}>\n <Input.Label>{translation('name label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('name placeholder')}\n autoFocus\n value={nameProps.getValue() ?? ''}\n onChange={(e) => nameProps.onValueChange('string', e.target.value)}\n onBlur={nameProps.onBlur}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{nameProps.getStatus().error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={emailProps.getStatus().status}>\n <Input.Label>{translation('email input label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('email input placeholder')}\n value={emailProps.getValue() ?? ''}\n onChange={(e) => emailProps.onValueChange('string', e.target.value)}\n onBlur={emailProps.onBlur}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{emailProps.getStatus().error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={messageProps.getStatus().status}>\n <Input.Label>{translation('feedback text area label')}</Input.Label>\n <Input.TextArea\n classNames={'text-sm'}\n rows={5}\n cols={30}\n placeholder={translation('feedback text area placeholder')}\n value={messageProps.getValue() ?? ''}\n onChange={(e) => messageProps.onValueChange('string', e.target.value)}\n onBlur={messageProps.onBlur}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{messageProps.getStatus().error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-2'>\n <Button\n type='submit'\n variant='primary'\n classNames='is-full flex gap-2'\n disabled={!canSave}\n onClick={handleSave}\n >\n <span>{translation('send feedback label')}</span>\n <div className='grow' />\n <PaperPlaneTilt className={getSize(5)} />\n </Button>\n <Popover.Close asChild>\n <Button classNames='is-full flex gap-2'>\n <span>{t('cancel label', { ns: 'os' })}</span>\n <div className='grow' />\n <X className={getSize(5)} />\n </Button>\n </Popover.Close>\n </div>\n </div>\n );\n};\n\nexport const FeedbackForm = ({ onSave }: { onSave: (values: UserFeedback) => void }) => {\n const formRef = useRef<HTMLDivElement>(null);\n\n const initialValues = getSnapshot(defaultValues);\n\n return (\n <FormProvider formRef={formRef} schema={UserFeedback} initialValues={initialValues} onSave={onSave}>\n <div ref={formRef}>\n <FormContent />\n </div>\n </FormProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STATUS_BAR_PLUGIN = 'dxos.org/plugin/status-bar';\n\nexport const meta: PluginMeta = {\n id: STATUS_BAR_PLUGIN,\n name: 'Status Bar',\n description: 'Display a bar with status and actions.',\n icon: 'ph--info--regular',\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\n | 'email input label'\n | 'email input placeholder'\n | 'feedback text area label'\n | 'feedback text area placeholder'\n | 'send feedback label'\n | 'name label'\n | 'name placeholder'\n | 'warning title'\n | 'technology preview message'\n | 'learn more label'\n | 'released message'\n | 'see release label'\n | 'powered by dxos message'\n | 'discord label'\n | 'feedback label';\n\ntype RequiredTranslation = { [key in StatusBarTranslationKeys]: string };\ntype TranslationEntry = { [STATUS_BAR_PLUGIN]: RequiredTranslation };\ntype Language = string;\n\n// -- helpers.\nconst entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });\nexport const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);\n\nconst translations: Record<Language, TranslationEntry> = {\n 'en-US': entry({\n 'plugin name': 'Status Bar',\n 'name label': 'Name',\n 'name placeholder': 'Preferred name',\n 'email input label': 'Email',\n 'email input placeholder': 'hello@example.com',\n 'feedback text area label': 'Feedback',\n 'feedback text area placeholder': 'Please describe your issue or suggestion.',\n 'send feedback label': 'Send Feedback',\n 'warning title': 'WARNING',\n 'technology preview message': 'Composer is currently in beta.',\n 'learn more label': 'Learn more',\n 'released message': 'This version released {{released}}.',\n 'see release label': 'See release on GitHub',\n 'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',\n 'discord label': 'Discord',\n 'feedback label': 'Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\ntype StatusBarButtonProps = ThemedClassName<ComponentPropsWithRef<'button'> & { asChild?: boolean }>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center justify-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer dx-focus-ring text-description text-xs',\n 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',\n classNames,\n );\n\n return asChild ? (\n <Slot role='button' ref={forwardedRef} className={classes} {...props}>\n {children}\n </Slot>\n ) : (\n <button className={classes} ref={forwardedRef} {...props}>\n {children}\n </button>\n );\n },\n);\n\nexport default StatusBarButton;\n\ntype StatusBarItemProps = ThemedClassName<ComponentPropsWithRef<'div'>>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </div>\n ),\n);\n\ntype StartContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center space-x-2', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\ntype EndContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center justify-end', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\nexport const StatusBar = {\n Text: StatusBarText,\n Item: StatusBarItem,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { createIntent, Surface, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction, type UserFeedback } from '@dxos/plugin-observability/types';\nimport { Icon, Popover, useTranslation } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\nimport { VersionNumber } from './VersionNumber';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nexport const StatusBarActions = () => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const [open, setOpen] = useState(false);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const handleSave = useCallback(\n (values: UserFeedback) => {\n void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));\n setOpen(false);\n },\n [dispatch],\n );\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <StatusBar.Button data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('feedback label')}</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button asChild>\n <a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--discord-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('discord label')}</StatusBar.Text>\n </a>\n </StatusBar.Button>\n <VersionNumber />\n <Popover.Portal>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onSave={handleSave} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n\nexport const StatusBarPanel = () => {\n return (\n <>\n <StatusBarActions />\n <span role='separator' className='grow' />\n <Surface role='status' />\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { formatDistance } from 'date-fns/formatDistance';\nimport React from 'react';\n\nimport { useConfig } from '@dxos/react-client';\nimport { Link, Message, Popover, Trans, useTranslation, Icon } from '@dxos/react-ui';\n\nimport { StatusBar } from './StatusBar';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nconst VERSION_REGEX = /([\\d.]+)/;\n\nexport const VersionNumber = () => {\n const config = useConfig();\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};\n const [_, v] = version?.match(VERSION_REGEX) ?? [];\n const isLabs = config.values.runtime?.app?.env?.DX_LABS;\n\n const releaseUrl =\n config.values.runtime?.app?.env?.DX_ENVIRONMENT === 'production'\n ? `${repo}/releases/tag/v${version}`\n : `${repo}/commit/${commitHash}`;\n\n const previewUrl = 'https://docs.dxos.org/composer#technology-preview';\n\n return (\n <Popover.Root>\n <Popover.Trigger asChild>\n <StatusBar.Button classNames='text-xs'>{isLabs ? version : v}</StatusBar.Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side='top'\n role='message'\n classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'\n >\n <Message.Root valence='warning' className='rounded-be-none p-5'>\n <Message.Title>\n <Icon icon='ph--warning--duotone' size={6} classNames='inline mie-2' />\n <span>{t('warning title')}</span>\n </Message.Title>\n <Message.Body>\n {t('technology preview message')}\n <br />\n <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('learn more label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </Message.Body>\n </Message.Root>\n <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>\n {timestamp && (\n <p>\n {t('released message', {\n released: formatDistance(new Date(timestamp), new Date(), { addSuffix: true }),\n })}\n <br />\n <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('see release label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </p>\n )}\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'powered by dxos message',\n components: {\n dxos: <Link href='https://dxos.org' target='_blank' rel='noreferrer' variant='neutral' />,\n },\n }}\n />\n </p>\n </div>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n Surface,\n} from '@dxos/app-framework';\n\nimport { StatusBarActions, StatusBarPanel } from './components';\nimport { VersionNumber } from './components/VersionNumber';\nimport { meta, STATUS_BAR_PLUGIN } from './meta';\nimport translations from './translations';\n\nexport const StatusBarPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r0-footer',\n component: () => <Surface role='status' />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r1-footer',\n component: () => <StatusBarActions />,\n }),\n createSurface({\n id: `${STATUS_BAR_PLUGIN}/header-end`,\n role: 'header-end',\n component: () => <VersionNumber />,\n }),\n ]),\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,gBAAgBC,SAAS;AAClC,OAAOC,SAASC,cAAc;AAE9B,SAASC,mBAAmB;AAC5B,SAASC,oBAAoB;AAC7B,SAASC,QAAQC,OAAOC,SAASC,sBAAsB;AACvD,SAASC,cAAcC,gBAAgBC,qBAAqB;AAC5D,SAASC,eAAe;;;ACLjB,IAAMC,oBAAoB;AAE1B,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;AACR;;;ACkBA,IAAMC,QAAQ,CAACC,iBAAwD;EAAE,CAACC,iBAAAA,GAAoBD;AAAY;AACnG,IAAME,gBAAgB,CAACC,MAA8C,CAACC,QAAkCD,EAAEC,GAAAA;AAEjH,IAAMC,eAAmD;EACvD,SAASN,MAAM;IACb,eAAe;IACf,cAAc;IACd,oBAAoB;IACpB,qBAAqB;IACrB,2BAA2B;IAC3B,4BAA4B;IAC5B,kCAAkC;IAClC,uBAAuB;IACvB,iBAAiB;IACjB,8BAA8B;IAC9B,oBAAoB;IACpB,oBAAoB;IACpB,qBAAqB;IACrB,2BAA2B;IAC3B,iBAAiB;IACjB,kBAAkB;EACpB,CAAA;AACF;AAEA,IAAA,uBAAe;EAACM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ACNC,WAAW,MAAM,gBAAAC,OAAA,cAACG,kBAAAA,IAAAA;MACpB,CAAA;MACAN,cAAc;QACZX,IAAI,GAAGkB,iBAAAA;QACPN,MAAM;QACNC,WAAW,MAAM,gBAAAC,OAAA,cAACK,eAAAA,IAAAA;MACpB,CAAA;KACD;EACL,CAAA;CACD;",
|
|
6
|
+
"names": ["PaperPlaneTilt", "X", "React", "useRef", "getSnapshot", "UserFeedback", "Button", "Input", "Popover", "useTranslation", "FormProvider", "useFormContext", "useInputProps", "getSize", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "entry", "translation", "STATUS_BAR_PLUGIN", "mkTranslation", "t", "key", "translations", "defaultValues", "name", "email", "message", "FormContent", "t", "useTranslation", "STATUS_BAR_PLUGIN", "translation", "mkTranslation", "handleSave", "canSave", "useFormContext", "nameProps", "useInputProps", "emailProps", "messageProps", "div", "role", "className", "Input", "Root", "validationValence", "getStatus", "status", "Label", "TextInput", "classNames", "placeholder", "autoFocus", "value", "getValue", "onChange", "e", "onValueChange", "target", "onBlur", "DescriptionAndValidation", "Validation", "error", "TextArea", "rows", "cols", "Button", "type", "variant", "disabled", "onClick", "span", "PaperPlaneTilt", "getSize", "Popover", "Close", "asChild", "ns", "X", "FeedbackForm", "onSave", "formRef", "useRef", "initialValues", "getSnapshot", "FormProvider", "schema", "UserFeedback", "ref", "Slot", "React", "forwardRef", "mx", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "React", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "forwardRef", "classNames", "children", "props", "forwardedRef", "React", "div", "role", "className", "mx", "ref", "StartContent", "EndContent", "StatusBar", "Text", "StatusBarText", "Item", "Button", "StatusBarButton", "React", "useCallback", "useState", "createIntent", "Surface", "useIntentDispatcher", "ObservabilityAction", "Icon", "Popover", "useTranslation", "formatDistance", "React", "useConfig", "Link", "Message", "Popover", "Trans", "useTranslation", "Icon", "repo", "VERSION_REGEX", "VersionNumber", "config", "useConfig", "t", "useTranslation", "STATUS_BAR_PLUGIN", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "_", "v", "match", "isLabs", "env", "DX_LABS", "releaseUrl", "DX_ENVIRONMENT", "previewUrl", "React", "Popover", "Root", "Trigger", "asChild", "StatusBar", "Button", "classNames", "Portal", "Content", "side", "role", "Message", "valence", "className", "Title", "Icon", "icon", "size", "span", "Body", "br", "Link", "href", "target", "rel", "variant", "div", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "t", "useTranslation", "STATUS_BAR_PLUGIN", "open", "setOpen", "useState", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleSave", "useCallback", "values", "createIntent", "ObservabilityAction", "CaptureUserFeedback", "React", "Popover", "Root", "onOpenChange", "Trigger", "asChild", "StatusBar", "Button", "data-joyride", "Icon", "icon", "size", "Text", "classNames", "a", "href", "target", "rel", "VersionNumber", "Portal", "Content", "FeedbackForm", "onSave", "Arrow", "StatusBarPanel", "span", "role", "className", "Surface", "React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "Surface", "StatusBarPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupReactSurface", "ReactSurface", "createSurface", "role", "component", "React", "StatusBarPanel", "Surface", "StatusBarActions", "STATUS_BAR_PLUGIN", "VersionNumber"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-status-bar/src/
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-status-bar/src/meta.ts":{"bytes":1277,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":4726,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":15619,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytes":7783,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytes":11172,"imports":[{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytes":8160,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytes":728,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx","kind":"import-statement","original":"./StatusBarPanel"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytes":6167,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./components/VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/index.ts":{"bytes":699,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-status-bar/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":28323},"packages/plugins/plugin-status-bar/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["FeedbackForm","STATUS_BAR_PLUGIN","StatusBar","StatusBarActions","StatusBarPanel","StatusBarPlugin","meta"],"entryPoint":"packages/plugins/plugin-status-bar/src/index.ts","inputs":{"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytesInOutput":4547},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":202},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":947},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytesInOutput":1955},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":2319},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytesInOutput":3247},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":1317}},"bytes":15388}}}
|