@dxos/plugin-status-bar 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +70 -165
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +64 -159
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +70 -165
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/StatusBarPanel.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/dist/types/src/translations.d.ts +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/components/StatusBarPanel.tsx +7 -13
- package/src/meta.ts +2 -2
- package/src/translations.ts +4 -14
- package/dist/types/src/components/FeedbackForm.d.ts +0 -5
- package/dist/types/src/components/FeedbackForm.d.ts.map +0 -1
- package/src/components/FeedbackForm.tsx +0 -107
|
@@ -46,18 +46,15 @@ var StatusBar = {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
// packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
|
|
49
|
-
import
|
|
49
|
+
import React3, { useState } from "react";
|
|
50
50
|
import { Surface } from "@dxos/app-framework";
|
|
51
|
-
import { Icon as Icon2, Popover as
|
|
51
|
+
import { Icon as Icon2, Popover as Popover2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
52
52
|
|
|
53
|
-
// packages/plugins/plugin-status-bar/src/components/
|
|
54
|
-
import {
|
|
55
|
-
import React2
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import { Button, Input, Popover, useTranslation } from "@dxos/react-ui";
|
|
59
|
-
import { useForm } from "@dxos/react-ui-form";
|
|
60
|
-
import { getSize } from "@dxos/react-ui-theme";
|
|
53
|
+
// packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx
|
|
54
|
+
import { formatDistance } from "date-fns/formatDistance";
|
|
55
|
+
import React2 from "react";
|
|
56
|
+
import { useConfig } from "@dxos/react-client";
|
|
57
|
+
import { Link, Message, Popover, Trans, useTranslation, Icon } from "@dxos/react-ui";
|
|
61
58
|
|
|
62
59
|
// packages/plugins/plugin-status-bar/src/meta.ts
|
|
63
60
|
var STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
|
|
@@ -68,228 +65,136 @@ var meta = {
|
|
|
68
65
|
icon: "ph--info--regular"
|
|
69
66
|
};
|
|
70
67
|
|
|
71
|
-
// packages/plugins/plugin-status-bar/src/translations.ts
|
|
72
|
-
var entry = (translation) => ({
|
|
73
|
-
[STATUS_BAR_PLUGIN]: translation
|
|
74
|
-
});
|
|
75
|
-
var mkTranslation = (t) => (key) => t(key);
|
|
76
|
-
var translations = {
|
|
77
|
-
"en-US": entry({
|
|
78
|
-
"plugin name": "Status Bar",
|
|
79
|
-
"name label": "Name",
|
|
80
|
-
"name placeholder": "Preferred name",
|
|
81
|
-
"email input label": "Email",
|
|
82
|
-
"email input placeholder": "hello@example.com",
|
|
83
|
-
"feedback text area label": "Feedback",
|
|
84
|
-
"feedback text area placeholder": "Please describe your issue or suggestion.",
|
|
85
|
-
"send feedback label": "Send Feedback",
|
|
86
|
-
"warning title": "WARNING",
|
|
87
|
-
"technology preview message": "Composer is currently in beta.",
|
|
88
|
-
"learn more label": "Learn more",
|
|
89
|
-
"released message": "This version released {{released}}.",
|
|
90
|
-
"see release label": "See release on GitHub",
|
|
91
|
-
"powered by dxos message": "Powered by <dxos>DXOS</dxos>",
|
|
92
|
-
"discord label": "Discord",
|
|
93
|
-
"feedback label": "Feedback"
|
|
94
|
-
})
|
|
95
|
-
};
|
|
96
|
-
var translations_default = [
|
|
97
|
-
translations
|
|
98
|
-
];
|
|
99
|
-
|
|
100
|
-
// packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx
|
|
101
|
-
var initialValues = {
|
|
102
|
-
name: "",
|
|
103
|
-
email: "",
|
|
104
|
-
message: ""
|
|
105
|
-
};
|
|
106
|
-
var FeedbackForm = ({ onClose }) => {
|
|
107
|
-
const { t } = useTranslation(STATUS_BAR_PLUGIN);
|
|
108
|
-
const translation = mkTranslation(t);
|
|
109
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
110
|
-
const onSave = useCallback((values) => {
|
|
111
|
-
void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));
|
|
112
|
-
onClose();
|
|
113
|
-
}, [
|
|
114
|
-
dispatch,
|
|
115
|
-
onClose
|
|
116
|
-
]);
|
|
117
|
-
const { handleSave, canSave, getStatus, ...inputProps } = useForm({
|
|
118
|
-
initialValues,
|
|
119
|
-
schema: UserFeedback,
|
|
120
|
-
onSave
|
|
121
|
-
});
|
|
122
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
123
|
-
role: "form",
|
|
124
|
-
className: "p-3 flex flex-col gap-2"
|
|
125
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
126
|
-
role: "none",
|
|
127
|
-
className: "space-b-1"
|
|
128
|
-
}, /* @__PURE__ */ React2.createElement(Input.Root, {
|
|
129
|
-
validationValence: getStatus("name").status
|
|
130
|
-
}, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("name label")), /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
131
|
-
classNames: "text-sm",
|
|
132
|
-
placeholder: translation("name placeholder"),
|
|
133
|
-
autoFocus: true,
|
|
134
|
-
...inputProps
|
|
135
|
-
}), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("name").error)))), /* @__PURE__ */ React2.createElement("div", {
|
|
136
|
-
role: "none",
|
|
137
|
-
className: "space-b-1"
|
|
138
|
-
}, /* @__PURE__ */ React2.createElement(Input.Root, {
|
|
139
|
-
validationValence: getStatus("email").status
|
|
140
|
-
}, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("email input label")), /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
141
|
-
classNames: "text-sm",
|
|
142
|
-
placeholder: translation("email input placeholder"),
|
|
143
|
-
...inputProps
|
|
144
|
-
}), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("email").error)))), /* @__PURE__ */ React2.createElement("div", {
|
|
145
|
-
role: "none",
|
|
146
|
-
className: "space-b-1"
|
|
147
|
-
}, /* @__PURE__ */ React2.createElement(Input.Root, {
|
|
148
|
-
validationValence: getStatus("message").status
|
|
149
|
-
}, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ React2.createElement(Input.TextArea, {
|
|
150
|
-
classNames: "text-sm",
|
|
151
|
-
rows: 5,
|
|
152
|
-
cols: 30,
|
|
153
|
-
placeholder: translation("feedback text area placeholder"),
|
|
154
|
-
...inputProps
|
|
155
|
-
}), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("message").error)))), /* @__PURE__ */ React2.createElement("div", {
|
|
156
|
-
role: "none",
|
|
157
|
-
className: "space-b-2"
|
|
158
|
-
}, /* @__PURE__ */ React2.createElement(Button, {
|
|
159
|
-
type: "submit",
|
|
160
|
-
variant: "primary",
|
|
161
|
-
classNames: "is-full flex gap-2",
|
|
162
|
-
disabled: !canSave,
|
|
163
|
-
onClick: handleSave
|
|
164
|
-
}, /* @__PURE__ */ React2.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ React2.createElement("div", {
|
|
165
|
-
className: "grow"
|
|
166
|
-
}), /* @__PURE__ */ React2.createElement(PaperPlaneTilt, {
|
|
167
|
-
className: getSize(5)
|
|
168
|
-
})), /* @__PURE__ */ React2.createElement(Popover.Close, {
|
|
169
|
-
asChild: true
|
|
170
|
-
}, /* @__PURE__ */ React2.createElement(Button, {
|
|
171
|
-
classNames: "is-full flex gap-2"
|
|
172
|
-
}, /* @__PURE__ */ React2.createElement("span", null, t("cancel label", {
|
|
173
|
-
ns: "os"
|
|
174
|
-
})), /* @__PURE__ */ React2.createElement("div", {
|
|
175
|
-
className: "grow"
|
|
176
|
-
}), /* @__PURE__ */ React2.createElement(X, {
|
|
177
|
-
className: getSize(5)
|
|
178
|
-
})))));
|
|
179
|
-
};
|
|
180
|
-
|
|
181
68
|
// packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx
|
|
182
|
-
import { formatDistance } from "date-fns/formatDistance";
|
|
183
|
-
import React3 from "react";
|
|
184
|
-
import { useConfig } from "@dxos/react-client";
|
|
185
|
-
import { Link, Message, Popover as Popover2, Trans, useTranslation as useTranslation2, Icon } from "@dxos/react-ui";
|
|
186
69
|
var repo = "https://github.com/dxos/dxos";
|
|
187
70
|
var VERSION_REGEX = /([\d.]+)/;
|
|
188
71
|
var VersionNumber = () => {
|
|
189
72
|
const config = useConfig();
|
|
190
|
-
const { t } =
|
|
73
|
+
const { t } = useTranslation(STATUS_BAR_PLUGIN);
|
|
191
74
|
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
192
75
|
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
|
193
76
|
const isLabs = config.values.runtime?.app?.env?.DX_LABS;
|
|
194
77
|
const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
|
|
195
78
|
const previewUrl = "https://docs.dxos.org/composer#technology-preview";
|
|
196
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
|
|
197
80
|
asChild: true
|
|
198
|
-
}, /* @__PURE__ */
|
|
81
|
+
}, /* @__PURE__ */ React2.createElement(StatusBar.Button, {
|
|
199
82
|
classNames: "text-xs"
|
|
200
|
-
}, isLabs ? version : v)), /* @__PURE__ */
|
|
83
|
+
}, isLabs ? version : v)), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
|
|
201
84
|
side: "top",
|
|
202
85
|
role: "message",
|
|
203
86
|
classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
|
|
204
|
-
}, /* @__PURE__ */
|
|
87
|
+
}, /* @__PURE__ */ React2.createElement(Message.Root, {
|
|
205
88
|
valence: "warning",
|
|
206
89
|
className: "rounded-be-none p-5"
|
|
207
|
-
}, /* @__PURE__ */
|
|
90
|
+
}, /* @__PURE__ */ React2.createElement(Message.Title, null, /* @__PURE__ */ React2.createElement(Icon, {
|
|
208
91
|
icon: "ph--warning--duotone",
|
|
209
92
|
size: 6,
|
|
210
93
|
classNames: "inline mie-2"
|
|
211
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ React2.createElement("span", null, t("warning title"))), /* @__PURE__ */ React2.createElement(Message.Body, null, t("technology preview message"), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
|
|
212
95
|
href: previewUrl,
|
|
213
96
|
target: "_blank",
|
|
214
97
|
rel: "noreferrer",
|
|
215
98
|
variant: "neutral"
|
|
216
|
-
}, t("learn more label"), /* @__PURE__ */
|
|
99
|
+
}, t("learn more label"), /* @__PURE__ */ React2.createElement(Icon, {
|
|
217
100
|
icon: "ph--arrow-square-out--bold",
|
|
218
101
|
classNames: "inline mis-1"
|
|
219
|
-
})))), /* @__PURE__ */
|
|
102
|
+
})))), /* @__PURE__ */ React2.createElement("div", {
|
|
220
103
|
role: "none",
|
|
221
104
|
className: "plb-4 pli-5 space-b-2 text-baseText"
|
|
222
|
-
}, timestamp && /* @__PURE__ */
|
|
105
|
+
}, timestamp && /* @__PURE__ */ React2.createElement("p", null, t("released message", {
|
|
223
106
|
released: formatDistance(new Date(timestamp), /* @__PURE__ */ new Date(), {
|
|
224
107
|
addSuffix: true
|
|
225
108
|
})
|
|
226
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
|
|
227
110
|
href: releaseUrl,
|
|
228
111
|
target: "_blank",
|
|
229
112
|
rel: "noreferrer",
|
|
230
113
|
variant: "neutral"
|
|
231
|
-
}, t("see release label"), /* @__PURE__ */
|
|
114
|
+
}, t("see release label"), /* @__PURE__ */ React2.createElement(Icon, {
|
|
232
115
|
icon: "ph--arrow-square-out--bold",
|
|
233
116
|
classNames: "inline mis-1"
|
|
234
|
-
}))), /* @__PURE__ */
|
|
117
|
+
}))), /* @__PURE__ */ React2.createElement("p", null, /* @__PURE__ */ React2.createElement(Trans, {
|
|
235
118
|
t,
|
|
236
119
|
i18nKey: "powered by dxos message",
|
|
237
120
|
components: {
|
|
238
|
-
dxos: /* @__PURE__ */
|
|
121
|
+
dxos: /* @__PURE__ */ React2.createElement(Link, {
|
|
239
122
|
href: "https://dxos.org",
|
|
240
123
|
target: "_blank",
|
|
241
124
|
rel: "noreferrer",
|
|
242
125
|
variant: "neutral"
|
|
243
126
|
})
|
|
244
127
|
}
|
|
245
|
-
}))), /* @__PURE__ */
|
|
128
|
+
}))), /* @__PURE__ */ React2.createElement(Popover.Arrow, null))));
|
|
246
129
|
};
|
|
247
130
|
|
|
248
131
|
// packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
|
|
249
132
|
var StatusBarActions = () => {
|
|
250
|
-
const { t } =
|
|
133
|
+
const { t } = useTranslation2(STATUS_BAR_PLUGIN);
|
|
251
134
|
const [open, setOpen] = useState(false);
|
|
252
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ React3.createElement(Popover2.Root, {
|
|
253
136
|
open,
|
|
254
137
|
onOpenChange: setOpen
|
|
255
|
-
}, /* @__PURE__ */
|
|
138
|
+
}, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
|
|
256
139
|
asChild: true
|
|
257
|
-
}, /* @__PURE__ */
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
140
|
+
}, /* @__PURE__ */ React3.createElement("a", {
|
|
141
|
+
href: "https://dxos.org/discord",
|
|
142
|
+
target: "_blank",
|
|
143
|
+
rel: "noopener noreferrer"
|
|
144
|
+
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
145
|
+
icon: "ph--discord-logo--regular",
|
|
261
146
|
size: 4
|
|
262
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
|
|
263
148
|
classNames: "hidden sm:block"
|
|
264
|
-
}, t("
|
|
149
|
+
}, t("discord label")))), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
|
|
265
150
|
asChild: true
|
|
266
|
-
}, /* @__PURE__ */
|
|
267
|
-
href: "https://
|
|
151
|
+
}, /* @__PURE__ */ React3.createElement("a", {
|
|
152
|
+
href: "https://github.com/dxos/dxos",
|
|
268
153
|
target: "_blank",
|
|
269
154
|
rel: "noopener noreferrer"
|
|
270
|
-
}, /* @__PURE__ */
|
|
271
|
-
icon: "ph--
|
|
155
|
+
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
156
|
+
icon: "ph--github-logo--regular",
|
|
272
157
|
size: 4
|
|
273
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
|
|
274
159
|
classNames: "hidden sm:block"
|
|
275
|
-
}, t("
|
|
276
|
-
classNames: "shadow-lg"
|
|
277
|
-
}, /* @__PURE__ */ React4.createElement(FeedbackForm, {
|
|
278
|
-
onClose: () => setOpen(false)
|
|
279
|
-
}), /* @__PURE__ */ React4.createElement(Popover3.Arrow, null))));
|
|
160
|
+
}, t("github label")))), /* @__PURE__ */ React3.createElement(VersionNumber, null));
|
|
280
161
|
};
|
|
281
162
|
var StatusBarPanel = () => {
|
|
282
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBarActions, null), /* @__PURE__ */ React3.createElement("span", {
|
|
283
164
|
role: "separator",
|
|
284
165
|
className: "grow"
|
|
285
|
-
}), /* @__PURE__ */
|
|
166
|
+
}), /* @__PURE__ */ React3.createElement(Surface, {
|
|
286
167
|
role: "status"
|
|
287
168
|
}));
|
|
288
169
|
};
|
|
289
170
|
|
|
290
171
|
// packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx
|
|
291
|
-
import
|
|
172
|
+
import React4 from "react";
|
|
292
173
|
import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events, Surface as Surface2 } from "@dxos/app-framework";
|
|
174
|
+
|
|
175
|
+
// packages/plugins/plugin-status-bar/src/translations.ts
|
|
176
|
+
var entry = (translation) => ({
|
|
177
|
+
[STATUS_BAR_PLUGIN]: translation
|
|
178
|
+
});
|
|
179
|
+
var translations = {
|
|
180
|
+
"en-US": entry({
|
|
181
|
+
"plugin name": "Status Bar",
|
|
182
|
+
"warning title": "WARNING",
|
|
183
|
+
"technology preview message": "Composer is currently in beta.",
|
|
184
|
+
"learn more label": "Learn more",
|
|
185
|
+
"released message": "This version released {{released}}.",
|
|
186
|
+
"see release label": "See release on GitHub",
|
|
187
|
+
"powered by dxos message": "Powered by <dxos>DXOS</dxos>",
|
|
188
|
+
"discord label": "Discord",
|
|
189
|
+
"github label": "GitHub",
|
|
190
|
+
"feedback label": "Feedback"
|
|
191
|
+
})
|
|
192
|
+
};
|
|
193
|
+
var translations_default = [
|
|
194
|
+
translations
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
// packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx
|
|
293
198
|
var StatusBarPlugin = () => definePlugin(meta, [
|
|
294
199
|
defineModule({
|
|
295
200
|
id: `${meta.id}/module/translations`,
|
|
@@ -303,24 +208,24 @@ var StatusBarPlugin = () => definePlugin(meta, [
|
|
|
303
208
|
createSurface({
|
|
304
209
|
id: meta.id,
|
|
305
210
|
role: "status-bar",
|
|
306
|
-
component: () => /* @__PURE__ */
|
|
211
|
+
component: () => /* @__PURE__ */ React4.createElement(StatusBarPanel, null)
|
|
307
212
|
}),
|
|
308
213
|
createSurface({
|
|
309
214
|
id: meta.id,
|
|
310
215
|
role: "status-bar--r0-footer",
|
|
311
|
-
component: () => /* @__PURE__ */
|
|
216
|
+
component: () => /* @__PURE__ */ React4.createElement(Surface2, {
|
|
312
217
|
role: "status"
|
|
313
218
|
})
|
|
314
219
|
}),
|
|
315
220
|
createSurface({
|
|
316
221
|
id: meta.id,
|
|
317
222
|
role: "status-bar--r1-footer",
|
|
318
|
-
component: () => /* @__PURE__ */
|
|
223
|
+
component: () => /* @__PURE__ */ React4.createElement(StatusBarActions, null)
|
|
319
224
|
}),
|
|
320
225
|
createSurface({
|
|
321
226
|
id: `${STATUS_BAR_PLUGIN}/header-end`,
|
|
322
227
|
role: "header-end",
|
|
323
|
-
component: () => /* @__PURE__ */
|
|
228
|
+
component: () => /* @__PURE__ */ React4.createElement(VersionNumber, null)
|
|
324
229
|
})
|
|
325
230
|
])
|
|
326
231
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../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 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 { 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,YAAY;AACrB,OAAOC,SAAqCC,kBAA0D;AAGtG,SAASC,UAAU;AAInB,IAAMC,gBAAgBC,2BAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC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["Slot", "React", "forwardRef", "mx", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "forwardRef", "classNames", "children", "props", "forwardedRef", "div", "role", "className", "mx", "ref", "StartContent", "EndContent", "StatusBar", "Text", "StatusBarText", "Item", "Button", "StatusBarButton", "React", "useState", "Surface", "Icon", "Popover", "useTranslation", "
|
|
3
|
+
"sources": ["../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../src/components/VersionNumber.tsx", "../../../src/meta.ts", "../../../src/StatusBarPlugin.tsx", "../../../src/translations.ts"],
|
|
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 { 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\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\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 <StatusBar.Button asChild>\n <a href='https://github.com/dxos/dxos' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--github-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('github label')}</StatusBar.Text>\n </a>\n </StatusBar.Button>\n <VersionNumber />\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 { 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 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", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\n// TODO(wittjosiah): There's got to be a better way to do typesafe translations, this is too much boilerplate.\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\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 | 'github 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 '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 'github label': 'GitHub',\n 'feedback label': 'Feedback',\n }),\n};\n\nexport default [translations];\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,YAAY;AACrB,OAAOC,SAAqCC,kBAA0D;AAGtG,SAASC,UAAU;AAInB,IAAMC,gBAAgBC,2BAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAC/F,sBAAA,cAACC,QAAAA;EAAKC,WAAWC,GAAGL,UAA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T,IAAME,kBAAkB,MAC7BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,cAAc;MACrCC,cAAc;QACZX,IAAIF,KAAKE;QACTY,MAAM;QACNC,WAAW,MAAM,gBAAAC,OAAA,cAACC,gBAAAA,IAAAA;MACpB,CAAA;MACAJ,cAAc;QACZX,IAAIF,KAAKE;QACTY,MAAM;QACNC,WAAW,MAAM,gBAAAC,OAAA,cAACE,UAAAA;UAAQJ,MAAK;;MACjC,CAAA;MACAD,cAAc;QACZX,IAAIF,KAAKE;QACTY,MAAM;QACNC,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": ["Slot", "React", "forwardRef", "mx", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "forwardRef", "classNames", "children", "props", "forwardedRef", "div", "role", "className", "mx", "ref", "StartContent", "EndContent", "StatusBar", "Text", "StatusBarText", "Item", "Button", "StatusBarButton", "React", "useState", "Surface", "Icon", "Popover", "useTranslation", "formatDistance", "React", "useConfig", "Link", "Message", "Popover", "Trans", "useTranslation", "Icon", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "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", "React", "Popover", "Root", "onOpenChange", "StatusBar", "Button", "asChild", "a", "href", "target", "rel", "Icon", "icon", "size", "Text", "classNames", "VersionNumber", "StatusBarPanel", "span", "role", "className", "Surface", "React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "Surface", "entry", "translation", "STATUS_BAR_PLUGIN", "translations", "entry", "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/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/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"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/meta.ts":{"bytes":1277,"imports":[],"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":5831,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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/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":624,"imports":[{"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/translations.ts":{"bytes":3815,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"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":18335},"packages/plugins/plugin-status-bar/dist/lib/node-esm/index.mjs":{"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},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":["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/StatusBar.tsx":{"bytesInOutput":1948},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":1703},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytesInOutput":3210},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":202},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":1317},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":608}},"bytes":9819}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBarPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBarPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusBarPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBarPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,eAAO,MAAM,gBAAgB,yBAsB5B,CAAC;AAEF,eAAO,MAAM,cAAc,yBAQ1B,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
1
2
|
export declare const STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
|
|
2
|
-
export declare const meta:
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
};
|
|
3
|
+
export declare const meta: PluginMeta;
|
|
8
4
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,iBAAiB,+BAA+B,CAAC;AAE9D,eAAO,MAAM,IAAI,EAAE,UAKlB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type useTranslation } from '@dxos/react-ui';
|
|
2
2
|
import { STATUS_BAR_PLUGIN } from './meta';
|
|
3
|
-
type StatusBarTranslationKeys = 'plugin name' | '
|
|
3
|
+
type StatusBarTranslationKeys = 'plugin name' | 'warning title' | 'technology preview message' | 'learn more label' | 'released message' | 'see release label' | 'powered by dxos message' | 'discord label' | 'github label' | 'feedback label';
|
|
4
4
|
type RequiredTranslation = {
|
|
5
5
|
[key in StatusBarTranslationKeys]: string;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAI3C,KAAK,wBAAwB,GACzB,aAAa,GACb,eAAe,GACf,4BAA4B,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,GACnB,yBAAyB,GACzB,eAAe,GACf,cAAc,GACd,gBAAgB,CAAC;AAErB,KAAK,mBAAmB,GAAG;KAAG,GAAG,IAAI,wBAAwB,GAAG,MAAM;CAAE,CAAC;AACzE,KAAK,gBAAgB,GAAG;IAAE,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAKrE,eAAO,MAAM,aAAa,MAAO,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,GAAG,CAAC,WAAW,wBAAwB,WAAW,CAAC;;AAiBtH,wBAA8B"}
|