@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/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
+
FeedbackForm: () => FeedbackForm,
|
|
31
32
|
STATUS_BAR_PLUGIN: () => STATUS_BAR_PLUGIN,
|
|
32
33
|
StatusBar: () => StatusBar,
|
|
33
34
|
StatusBarActions: () => StatusBarActions,
|
|
@@ -36,65 +37,26 @@ __export(node_exports, {
|
|
|
36
37
|
meta: () => meta
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(node_exports);
|
|
39
|
-
var
|
|
40
|
-
var import_react = __toESM(require("react"));
|
|
41
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
40
|
+
var import_react = require("@phosphor-icons/react");
|
|
42
41
|
var import_react2 = __toESM(require("react"));
|
|
43
|
-
var
|
|
44
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
45
|
-
var import_react3 = require("@phosphor-icons/react");
|
|
46
|
-
var import_react4 = __toESM(require("react"));
|
|
47
|
-
var import_app_framework2 = require("@dxos/app-framework");
|
|
42
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
48
43
|
var import_types = require("@dxos/plugin-observability/types");
|
|
49
|
-
var
|
|
44
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
50
45
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
46
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
47
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
48
|
+
var import_react3 = __toESM(require("react"));
|
|
51
49
|
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
50
|
+
var import_react4 = __toESM(require("react"));
|
|
51
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
52
|
+
var import_types2 = require("@dxos/plugin-observability/types");
|
|
53
|
+
var import_react_ui2 = require("@dxos/react-ui");
|
|
52
54
|
var import_formatDistance = require("date-fns/formatDistance");
|
|
53
55
|
var import_react5 = __toESM(require("react"));
|
|
54
56
|
var import_react_client = require("@dxos/react-client");
|
|
55
57
|
var import_react_ui3 = require("@dxos/react-ui");
|
|
56
58
|
var import_react6 = __toESM(require("react"));
|
|
57
|
-
var
|
|
58
|
-
var StatusBarText = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("span", {
|
|
59
|
-
className: (0, import_react_ui_theme.mx)(classNames),
|
|
60
|
-
ref: forwardedRef
|
|
61
|
-
}, children));
|
|
62
|
-
var StatusBarButton = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
63
|
-
const classes = (0, import_react_ui_theme.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);
|
|
64
|
-
return asChild ? /* @__PURE__ */ import_react.default.createElement(import_react_slot.Slot, {
|
|
65
|
-
role: "button",
|
|
66
|
-
ref: forwardedRef,
|
|
67
|
-
className: classes,
|
|
68
|
-
...props
|
|
69
|
-
}, children) : /* @__PURE__ */ import_react.default.createElement("button", {
|
|
70
|
-
className: classes,
|
|
71
|
-
ref: forwardedRef,
|
|
72
|
-
...props
|
|
73
|
-
}, children);
|
|
74
|
-
});
|
|
75
|
-
var StatusBarItem = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
76
|
-
role: "menuitem",
|
|
77
|
-
className: (0, import_react_ui_theme.mx)("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
|
|
78
|
-
ref: forwardedRef,
|
|
79
|
-
...props
|
|
80
|
-
}, children));
|
|
81
|
-
var StartContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
82
|
-
role: "none",
|
|
83
|
-
className: (0, import_react_ui_theme.mx)("flex-grow flex items-center space-x-2", classNames),
|
|
84
|
-
ref: forwardedRef
|
|
85
|
-
}, children));
|
|
86
|
-
var EndContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
87
|
-
role: "none",
|
|
88
|
-
className: (0, import_react_ui_theme.mx)("flex-grow flex items-center justify-end", classNames),
|
|
89
|
-
ref: forwardedRef
|
|
90
|
-
}, children));
|
|
91
|
-
var StatusBar = {
|
|
92
|
-
Text: StatusBarText,
|
|
93
|
-
Item: StatusBarItem,
|
|
94
|
-
Button: StatusBarButton,
|
|
95
|
-
StartContent,
|
|
96
|
-
EndContent
|
|
97
|
-
};
|
|
59
|
+
var import_app_framework2 = require("@dxos/app-framework");
|
|
98
60
|
var STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
|
|
99
61
|
var meta = {
|
|
100
62
|
id: STATUS_BAR_PLUGIN,
|
|
@@ -117,7 +79,7 @@ var translations = {
|
|
|
117
79
|
"feedback text area placeholder": "Please describe your issue or suggestion.",
|
|
118
80
|
"send feedback label": "Send Feedback",
|
|
119
81
|
"warning title": "WARNING",
|
|
120
|
-
"technology preview message": "Composer is
|
|
82
|
+
"technology preview message": "Composer is currently in beta.",
|
|
121
83
|
"learn more label": "Learn more",
|
|
122
84
|
"released message": "This version released {{released}}.",
|
|
123
85
|
"see release label": "See release on GitHub",
|
|
@@ -129,85 +91,140 @@ var translations = {
|
|
|
129
91
|
var translations_default = [
|
|
130
92
|
translations
|
|
131
93
|
];
|
|
132
|
-
var
|
|
94
|
+
var defaultValues = {
|
|
133
95
|
name: "",
|
|
134
96
|
email: "",
|
|
135
97
|
message: ""
|
|
136
98
|
};
|
|
137
|
-
var
|
|
138
|
-
const { t } = (0,
|
|
99
|
+
var FormContent = () => {
|
|
100
|
+
const { t } = (0, import_react_ui.useTranslation)(STATUS_BAR_PLUGIN);
|
|
139
101
|
const translation = mkTranslation(t);
|
|
140
|
-
const {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
onClose();
|
|
144
|
-
}, [
|
|
145
|
-
dispatch,
|
|
146
|
-
onClose
|
|
102
|
+
const { handleSave, canSave } = (0, import_react_ui_form.useFormContext)();
|
|
103
|
+
const nameProps = (0, import_react_ui_form.useInputProps)([
|
|
104
|
+
"name"
|
|
147
105
|
]);
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
106
|
+
const emailProps = (0, import_react_ui_form.useInputProps)([
|
|
107
|
+
"email"
|
|
108
|
+
]);
|
|
109
|
+
const messageProps = (0, import_react_ui_form.useInputProps)([
|
|
110
|
+
"message"
|
|
111
|
+
]);
|
|
112
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
154
113
|
role: "form",
|
|
155
114
|
className: "p-3 flex flex-col gap-2"
|
|
156
|
-
}, /* @__PURE__ */
|
|
115
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
157
116
|
role: "none",
|
|
158
117
|
className: "space-b-1"
|
|
159
|
-
}, /* @__PURE__ */
|
|
160
|
-
validationValence: getStatus(
|
|
161
|
-
}, /* @__PURE__ */
|
|
118
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Root, {
|
|
119
|
+
validationValence: nameProps.getStatus().status
|
|
120
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Label, null, translation("name label")), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.TextInput, {
|
|
162
121
|
classNames: "text-sm",
|
|
163
122
|
placeholder: translation("name placeholder"),
|
|
164
123
|
autoFocus: true,
|
|
165
|
-
|
|
166
|
-
|
|
124
|
+
value: nameProps.getValue() ?? "",
|
|
125
|
+
onChange: (e) => nameProps.onValueChange("string", e.target.value),
|
|
126
|
+
onBlur: nameProps.onBlur
|
|
127
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Validation, null, nameProps.getStatus().error)))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
167
128
|
role: "none",
|
|
168
129
|
className: "space-b-1"
|
|
169
|
-
}, /* @__PURE__ */
|
|
170
|
-
validationValence: getStatus(
|
|
171
|
-
}, /* @__PURE__ */
|
|
130
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Root, {
|
|
131
|
+
validationValence: emailProps.getStatus().status
|
|
132
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Label, null, translation("email input label")), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.TextInput, {
|
|
172
133
|
classNames: "text-sm",
|
|
173
134
|
placeholder: translation("email input placeholder"),
|
|
174
|
-
|
|
175
|
-
|
|
135
|
+
value: emailProps.getValue() ?? "",
|
|
136
|
+
onChange: (e) => emailProps.onValueChange("string", e.target.value),
|
|
137
|
+
onBlur: emailProps.onBlur
|
|
138
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Validation, null, emailProps.getStatus().error)))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
176
139
|
role: "none",
|
|
177
140
|
className: "space-b-1"
|
|
178
|
-
}, /* @__PURE__ */
|
|
179
|
-
validationValence: getStatus(
|
|
180
|
-
}, /* @__PURE__ */
|
|
141
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Root, {
|
|
142
|
+
validationValence: messageProps.getStatus().status
|
|
143
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.TextArea, {
|
|
181
144
|
classNames: "text-sm",
|
|
182
145
|
rows: 5,
|
|
183
146
|
cols: 30,
|
|
184
147
|
placeholder: translation("feedback text area placeholder"),
|
|
185
|
-
|
|
186
|
-
|
|
148
|
+
value: messageProps.getValue() ?? "",
|
|
149
|
+
onChange: (e) => messageProps.onValueChange("string", e.target.value),
|
|
150
|
+
onBlur: messageProps.onBlur
|
|
151
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Input.Validation, null, messageProps.getStatus().error)))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
187
152
|
role: "none",
|
|
188
153
|
className: "space-b-2"
|
|
189
|
-
}, /* @__PURE__ */
|
|
154
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
|
|
190
155
|
type: "submit",
|
|
191
156
|
variant: "primary",
|
|
192
157
|
classNames: "is-full flex gap-2",
|
|
193
158
|
disabled: !canSave,
|
|
194
159
|
onClick: handleSave
|
|
195
|
-
}, /* @__PURE__ */
|
|
160
|
+
}, /* @__PURE__ */ import_react2.default.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
196
161
|
className: "grow"
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
-
className: (0,
|
|
199
|
-
})), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react.PaperPlaneTilt, {
|
|
163
|
+
className: (0, import_react_ui_theme.getSize)(5)
|
|
164
|
+
})), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Close, {
|
|
200
165
|
asChild: true
|
|
201
|
-
}, /* @__PURE__ */
|
|
166
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
|
|
202
167
|
classNames: "is-full flex gap-2"
|
|
203
|
-
}, /* @__PURE__ */
|
|
168
|
+
}, /* @__PURE__ */ import_react2.default.createElement("span", null, t("cancel label", {
|
|
204
169
|
ns: "os"
|
|
205
|
-
})), /* @__PURE__ */
|
|
170
|
+
})), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
206
171
|
className: "grow"
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
-
className: (0,
|
|
172
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react.X, {
|
|
173
|
+
className: (0, import_react_ui_theme.getSize)(5)
|
|
209
174
|
})))));
|
|
210
175
|
};
|
|
176
|
+
var FeedbackForm = ({ onSave }) => {
|
|
177
|
+
const formRef = (0, import_react2.useRef)(null);
|
|
178
|
+
const initialValues = (0, import_echo_schema.getSnapshot)(defaultValues);
|
|
179
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.FormProvider, {
|
|
180
|
+
formRef,
|
|
181
|
+
schema: import_types.UserFeedback,
|
|
182
|
+
initialValues,
|
|
183
|
+
onSave
|
|
184
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
185
|
+
ref: formRef
|
|
186
|
+
}, /* @__PURE__ */ import_react2.default.createElement(FormContent, null)));
|
|
187
|
+
};
|
|
188
|
+
var StatusBarText = /* @__PURE__ */ (0, import_react3.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react3.default.createElement("span", {
|
|
189
|
+
className: (0, import_react_ui_theme2.mx)(classNames),
|
|
190
|
+
ref: forwardedRef
|
|
191
|
+
}, children));
|
|
192
|
+
var StatusBarButton = /* @__PURE__ */ (0, import_react3.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
193
|
+
const classes = (0, import_react_ui_theme2.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);
|
|
194
|
+
return asChild ? /* @__PURE__ */ import_react3.default.createElement(import_react_slot.Slot, {
|
|
195
|
+
role: "button",
|
|
196
|
+
ref: forwardedRef,
|
|
197
|
+
className: classes,
|
|
198
|
+
...props
|
|
199
|
+
}, children) : /* @__PURE__ */ import_react3.default.createElement("button", {
|
|
200
|
+
className: classes,
|
|
201
|
+
ref: forwardedRef,
|
|
202
|
+
...props
|
|
203
|
+
}, children);
|
|
204
|
+
});
|
|
205
|
+
var StatusBarItem = /* @__PURE__ */ (0, import_react3.forwardRef)(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
206
|
+
role: "menuitem",
|
|
207
|
+
className: (0, import_react_ui_theme2.mx)("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
|
|
208
|
+
ref: forwardedRef,
|
|
209
|
+
...props
|
|
210
|
+
}, children));
|
|
211
|
+
var StartContent = /* @__PURE__ */ (0, import_react3.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
212
|
+
role: "none",
|
|
213
|
+
className: (0, import_react_ui_theme2.mx)("flex-grow flex items-center space-x-2", classNames),
|
|
214
|
+
ref: forwardedRef
|
|
215
|
+
}, children));
|
|
216
|
+
var EndContent = /* @__PURE__ */ (0, import_react3.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
217
|
+
role: "none",
|
|
218
|
+
className: (0, import_react_ui_theme2.mx)("flex-grow flex items-center justify-end", classNames),
|
|
219
|
+
ref: forwardedRef
|
|
220
|
+
}, children));
|
|
221
|
+
var StatusBar = {
|
|
222
|
+
Text: StatusBarText,
|
|
223
|
+
Item: StatusBarItem,
|
|
224
|
+
Button: StatusBarButton,
|
|
225
|
+
StartContent,
|
|
226
|
+
EndContent
|
|
227
|
+
};
|
|
211
228
|
var repo = "https://github.com/dxos/dxos";
|
|
212
229
|
var VERSION_REGEX = /([\d.]+)/;
|
|
213
230
|
var VersionNumber = () => {
|
|
@@ -215,13 +232,14 @@ var VersionNumber = () => {
|
|
|
215
232
|
const { t } = (0, import_react_ui3.useTranslation)(STATUS_BAR_PLUGIN);
|
|
216
233
|
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
217
234
|
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
|
235
|
+
const isLabs = config.values.runtime?.app?.env?.DX_LABS;
|
|
218
236
|
const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
|
|
219
237
|
const previewUrl = "https://docs.dxos.org/composer#technology-preview";
|
|
220
238
|
return /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Root, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Trigger, {
|
|
221
239
|
asChild: true
|
|
222
240
|
}, /* @__PURE__ */ import_react5.default.createElement(StatusBar.Button, {
|
|
223
241
|
classNames: "text-xs"
|
|
224
|
-
},
|
|
242
|
+
}, isLabs ? version : v)), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Portal, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Content, {
|
|
225
243
|
side: "top",
|
|
226
244
|
role: "message",
|
|
227
245
|
classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
|
|
@@ -269,73 +287,80 @@ var VersionNumber = () => {
|
|
|
269
287
|
}))), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Arrow, null))));
|
|
270
288
|
};
|
|
271
289
|
var StatusBarActions = () => {
|
|
272
|
-
const { t } = (0,
|
|
273
|
-
const [open, setOpen] = (0,
|
|
274
|
-
|
|
290
|
+
const { t } = (0, import_react_ui2.useTranslation)(STATUS_BAR_PLUGIN);
|
|
291
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
292
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
293
|
+
const handleSave = (0, import_react4.useCallback)((values) => {
|
|
294
|
+
void dispatch((0, import_app_framework.createIntent)(import_types2.ObservabilityAction.CaptureUserFeedback, values));
|
|
295
|
+
setOpen(false);
|
|
296
|
+
}, [
|
|
297
|
+
dispatch
|
|
298
|
+
]);
|
|
299
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Root, {
|
|
275
300
|
open,
|
|
276
301
|
onOpenChange: setOpen
|
|
277
|
-
}, /* @__PURE__ */
|
|
302
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Trigger, {
|
|
278
303
|
asChild: true
|
|
279
|
-
}, /* @__PURE__ */
|
|
304
|
+
}, /* @__PURE__ */ import_react4.default.createElement(StatusBar.Button, {
|
|
280
305
|
"data-joyride": "welcome/feedback"
|
|
281
|
-
}, /* @__PURE__ */
|
|
306
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
282
307
|
icon: "ph--paper-plane-tilt--regular",
|
|
283
308
|
size: 4
|
|
284
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ import_react4.default.createElement(StatusBar.Text, {
|
|
285
310
|
classNames: "hidden sm:block"
|
|
286
|
-
}, t("feedback label")))), /* @__PURE__ */
|
|
311
|
+
}, t("feedback label")))), /* @__PURE__ */ import_react4.default.createElement(StatusBar.Button, {
|
|
287
312
|
asChild: true
|
|
288
|
-
}, /* @__PURE__ */
|
|
313
|
+
}, /* @__PURE__ */ import_react4.default.createElement("a", {
|
|
289
314
|
href: "https://dxos.org/discord",
|
|
290
315
|
target: "_blank",
|
|
291
316
|
rel: "noopener noreferrer"
|
|
292
|
-
}, /* @__PURE__ */
|
|
317
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
293
318
|
icon: "ph--discord-logo--regular",
|
|
294
319
|
size: 4
|
|
295
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ import_react4.default.createElement(StatusBar.Text, {
|
|
296
321
|
classNames: "hidden sm:block"
|
|
297
|
-
}, t("discord label")))), /* @__PURE__ */
|
|
322
|
+
}, t("discord label")))), /* @__PURE__ */ import_react4.default.createElement(VersionNumber, null), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Portal, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Content, {
|
|
298
323
|
classNames: "shadow-lg"
|
|
299
|
-
}, /* @__PURE__ */
|
|
300
|
-
|
|
301
|
-
}), /* @__PURE__ */
|
|
324
|
+
}, /* @__PURE__ */ import_react4.default.createElement(FeedbackForm, {
|
|
325
|
+
onSave: handleSave
|
|
326
|
+
}), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Arrow, null))));
|
|
302
327
|
};
|
|
303
328
|
var StatusBarPanel = () => {
|
|
304
|
-
return /* @__PURE__ */
|
|
329
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(StatusBarActions, null), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
305
330
|
role: "separator",
|
|
306
331
|
className: "grow"
|
|
307
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ import_react4.default.createElement(import_app_framework.Surface, {
|
|
308
333
|
role: "status"
|
|
309
334
|
}));
|
|
310
335
|
};
|
|
311
|
-
var StatusBarPlugin = () => (0,
|
|
312
|
-
(0,
|
|
336
|
+
var StatusBarPlugin = () => (0, import_app_framework2.definePlugin)(meta, [
|
|
337
|
+
(0, import_app_framework2.defineModule)({
|
|
313
338
|
id: `${meta.id}/module/translations`,
|
|
314
|
-
activatesOn:
|
|
315
|
-
activate: () => (0,
|
|
339
|
+
activatesOn: import_app_framework2.Events.SetupTranslations,
|
|
340
|
+
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
|
|
316
341
|
}),
|
|
317
|
-
(0,
|
|
342
|
+
(0, import_app_framework2.defineModule)({
|
|
318
343
|
id: `${meta.id}/module/react-surface`,
|
|
319
|
-
activatesOn:
|
|
320
|
-
activate: () => (0,
|
|
321
|
-
(0,
|
|
344
|
+
activatesOn: import_app_framework2.Events.SetupReactSurface,
|
|
345
|
+
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.ReactSurface, [
|
|
346
|
+
(0, import_app_framework2.createSurface)({
|
|
322
347
|
id: meta.id,
|
|
323
348
|
role: "status-bar",
|
|
324
349
|
component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarPanel, null)
|
|
325
350
|
}),
|
|
326
|
-
(0,
|
|
351
|
+
(0, import_app_framework2.createSurface)({
|
|
327
352
|
id: meta.id,
|
|
328
353
|
role: "status-bar--r0-footer",
|
|
329
|
-
component: () => /* @__PURE__ */ import_react6.default.createElement(
|
|
354
|
+
component: () => /* @__PURE__ */ import_react6.default.createElement(import_app_framework2.Surface, {
|
|
330
355
|
role: "status"
|
|
331
356
|
})
|
|
332
357
|
}),
|
|
333
|
-
(0,
|
|
358
|
+
(0, import_app_framework2.createSurface)({
|
|
334
359
|
id: meta.id,
|
|
335
360
|
role: "status-bar--r1-footer",
|
|
336
361
|
component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarActions, null)
|
|
337
362
|
}),
|
|
338
|
-
(0,
|
|
363
|
+
(0, import_app_framework2.createSurface)({
|
|
339
364
|
id: `${STATUS_BAR_PLUGIN}/header-end`,
|
|
340
365
|
role: "header-end",
|
|
341
366
|
component: () => /* @__PURE__ */ import_react6.default.createElement(VersionNumber, null)
|
|
@@ -345,6 +370,7 @@ var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
|
|
|
345
370
|
]);
|
|
346
371
|
// Annotate the CommonJS export names for ESM import in node:
|
|
347
372
|
0 && (module.exports = {
|
|
373
|
+
FeedbackForm,
|
|
348
374
|
STATUS_BAR_PLUGIN,
|
|
349
375
|
StatusBar,
|
|
350
376
|
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": "
|
|
6
|
-
"names": ["import_react", "
|
|
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,mBAAkC;AAClC,IAAAA,gBAA8B;AAE9B,yBAA4B;AAC5B,mBAA6B;AAC7B,sBAAuD;AACvD,2BAA4D;AAC5D,4BAAwB;AGPxB,wBAAqB;AACrB,IAAAA,gBAAsG;AAGtG,IAAAC,yBAAmB;ACJnB,IAAAD,gBAA6C;AAE7C,2BAA2D;AAC3D,IAAAE,gBAAuD;AACvD,IAAAC,mBAA8C;ACJ9C,4BAA+B;AAC/B,IAAAH,gBAAkB;AA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AAMe,iBAAiB,MAAA;AAC5B,SACE7H,8BAAAA,QAAA,cAAAA,cAAAA,QAAA,UAAA,MACEA,8BAAAA,QAAA,cAAC+G,kBAAAA,IAAAA,GACD/G,8BAAAA,QAAA,cAACgC,QAAAA;IAAK9B,MAAK;IAAYC,WAAU;MACjCH,8BAAAA,QAAA,cAAC8H,8BAAAA;IAAQ5H,MAAK;;AAGpB;AEzCO,IAAM6H,kBAAkB,UAC7BC,oCAAavJ,MAAM;MACjBwJ,oCAAa;IACXvJ,IAAI,GAAGD,KAAKC,EAAE;IACdwJ,aAAaC,6BAAOC;IACpBC,UAAU,UAAMC,mCAAYC,mCAAaC,cAAcrJ,oBAAAA;EACzD,CAAA;MACA8I,oCAAa;IACXvJ,IAAI,GAAGD,KAAKC,EAAE;IACdwJ,aAAaC,6BAAOM;IACpBJ,UAAU,UACRC,mCAAYC,mCAAaG,cAAc;UACrCC,qCAAc;QACZjK,IAAID,KAAKC;QACTwB,MAAM;QACN0I,WAAW,MAAM5I,8BAAAA,QAAA,cAAC6H,gBAAAA,IAAAA;MACpB,CAAA;UACAc,qCAAc;QACZjK,IAAID,KAAKC;QACTwB,MAAM;QACN0I,WAAW,MAAM5I,8BAAAA,QAAA,cAAC8H,sBAAAA,SAAAA;UAAQ5H,MAAK;;MACjC,CAAA;UACAyI,qCAAc;QACZjK,IAAID,KAAKC;QACTwB,MAAM;QACN0I,WAAW,MAAM5I,8BAAAA,QAAA,cAAC+G,kBAAAA,IAAAA;MACpB,CAAA;UACA4B,qCAAc;QACZjK,IAAI,GAAGF,iBAAAA;QACP0B,MAAM;QACN0I,WAAW,MAAM5I,8BAAAA,QAAA,cAACoE,eAAAA,IAAAA;MACpB,CAAA;KACD;EACL,CAAA;CACD;",
|
|
6
|
+
"names": ["import_react", "import_react_ui_theme", "import_types", "import_react_ui", "import_app_framework", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "entry", "translation", "mkTranslation", "t", "key", "translations", "defaultValues", "email", "message", "FormContent", "useTranslation", "handleSave", "canSave", "useFormContext", "nameProps", "useInputProps", "emailProps", "messageProps", "React", "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", "StatusBarText", "forwardRef", "children", "forwardedRef", "mx", "StatusBarButton", "props", "classes", "Slot", "button", "StatusBarItem", "StartContent", "EndContent", "StatusBar", "Text", "Item", "repo", "VERSION_REGEX", "VersionNumber", "config", "useConfig", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "_", "v", "match", "isLabs", "env", "DX_LABS", "releaseUrl", "DX_ENVIRONMENT", "previewUrl", "Trigger", "Portal", "Content", "side", "Message", "valence", "Title", "Icon", "size", "Body", "br", "Link", "href", "rel", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "open", "setOpen", "useState", "dispatchPromise", "dispatch", "useIntentDispatcher", "useCallback", "createIntent", "ObservabilityAction", "CaptureUserFeedback", "onOpenChange", "data-joyride", "a", "StatusBarPanel", "Surface", "StatusBarPlugin", "definePlugin", "defineModule", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "SetupReactSurface", "ReactSurface", "createSurface", "component"]
|
|
7
7
|
}
|