@dxos/plugin-status-bar 0.8.1-main.ba2dec9 → 0.8.1-staging.31c3ee1

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.
@@ -42,19 +42,12 @@ var import_react_ui_theme = require("@dxos/react-ui-theme");
42
42
  var import_react2 = __toESM(require("react"));
43
43
  var import_app_framework = require("@dxos/app-framework");
44
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");
48
- var import_types = require("@dxos/plugin-observability/types");
49
- var import_react_ui2 = require("@dxos/react-ui");
50
- var import_react_ui_form = require("@dxos/react-ui-form");
51
- var import_react_ui_theme2 = require("@dxos/react-ui-theme");
52
45
  var import_formatDistance = require("date-fns/formatDistance");
53
- var import_react5 = __toESM(require("react"));
46
+ var import_react3 = __toESM(require("react"));
54
47
  var import_react_client = require("@dxos/react-client");
55
- var import_react_ui3 = require("@dxos/react-ui");
56
- var import_react6 = __toESM(require("react"));
57
- var import_app_framework3 = require("@dxos/app-framework");
48
+ var import_react_ui2 = require("@dxos/react-ui");
49
+ var import_react4 = __toESM(require("react"));
50
+ var import_app_framework2 = require("@dxos/app-framework");
58
51
  var StatusBarText = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("span", {
59
52
  className: (0, import_react_ui_theme.mx)(classNames),
60
53
  ref: forwardedRef
@@ -102,171 +95,66 @@ var meta = {
102
95
  description: "Display a bar with status and actions.",
103
96
  icon: "ph--info--regular"
104
97
  };
105
- var entry = (translation) => ({
106
- [STATUS_BAR_PLUGIN]: translation
107
- });
108
- var mkTranslation = (t) => (key) => t(key);
109
- var translations = {
110
- "en-US": entry({
111
- "plugin name": "Status Bar",
112
- "name label": "Name",
113
- "name placeholder": "Preferred name",
114
- "email input label": "Email",
115
- "email input placeholder": "hello@example.com",
116
- "feedback text area label": "Feedback",
117
- "feedback text area placeholder": "Please describe your issue or suggestion.",
118
- "send feedback label": "Send Feedback",
119
- "warning title": "WARNING",
120
- "technology preview message": "Composer is still in technology preview.",
121
- "learn more label": "Learn more",
122
- "released message": "This version released {{released}}.",
123
- "see release label": "See release on GitHub",
124
- "powered by dxos message": "Powered by <dxos>DXOS</dxos>",
125
- "discord label": "Discord",
126
- "feedback label": "Feedback"
127
- })
128
- };
129
- var translations_default = [
130
- translations
131
- ];
132
- var initialValues = {
133
- name: "",
134
- email: "",
135
- message: ""
136
- };
137
- var FeedbackForm = ({ onClose }) => {
138
- const { t } = (0, import_react_ui2.useTranslation)(STATUS_BAR_PLUGIN);
139
- const translation = mkTranslation(t);
140
- const { dispatchPromise: dispatch } = (0, import_app_framework2.useIntentDispatcher)();
141
- const onSave = (0, import_react4.useCallback)((values) => {
142
- void dispatch((0, import_app_framework2.createIntent)(import_types.ObservabilityAction.CaptureUserFeedback, values));
143
- onClose();
144
- }, [
145
- dispatch,
146
- onClose
147
- ]);
148
- const { handleSave, canSave, getStatus, ...inputProps } = (0, import_react_ui_form.useForm)({
149
- initialValues,
150
- schema: import_types.UserFeedback,
151
- onSave
152
- });
153
- return /* @__PURE__ */ import_react4.default.createElement("div", {
154
- role: "form",
155
- className: "p-3 flex flex-col gap-2"
156
- }, /* @__PURE__ */ import_react4.default.createElement("div", {
157
- role: "none",
158
- className: "space-b-1"
159
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
160
- validationValence: getStatus("name").status
161
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("name label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
162
- classNames: "text-sm",
163
- placeholder: translation("name placeholder"),
164
- autoFocus: true,
165
- ...inputProps
166
- }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("name").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
167
- role: "none",
168
- className: "space-b-1"
169
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
170
- validationValence: getStatus("email").status
171
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("email input label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
172
- classNames: "text-sm",
173
- placeholder: translation("email input placeholder"),
174
- ...inputProps
175
- }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("email").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
176
- role: "none",
177
- className: "space-b-1"
178
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
179
- validationValence: getStatus("message").status
180
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextArea, {
181
- classNames: "text-sm",
182
- rows: 5,
183
- cols: 30,
184
- placeholder: translation("feedback text area placeholder"),
185
- ...inputProps
186
- }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("message").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
187
- role: "none",
188
- className: "space-b-2"
189
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Button, {
190
- type: "submit",
191
- variant: "primary",
192
- classNames: "is-full flex gap-2",
193
- disabled: !canSave,
194
- onClick: handleSave
195
- }, /* @__PURE__ */ import_react4.default.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ import_react4.default.createElement("div", {
196
- className: "grow"
197
- }), /* @__PURE__ */ import_react4.default.createElement(import_react3.PaperPlaneTilt, {
198
- className: (0, import_react_ui_theme2.getSize)(5)
199
- })), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Close, {
200
- asChild: true
201
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Button, {
202
- classNames: "is-full flex gap-2"
203
- }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("cancel label", {
204
- ns: "os"
205
- })), /* @__PURE__ */ import_react4.default.createElement("div", {
206
- className: "grow"
207
- }), /* @__PURE__ */ import_react4.default.createElement(import_react3.X, {
208
- className: (0, import_react_ui_theme2.getSize)(5)
209
- })))));
210
- };
211
98
  var repo = "https://github.com/dxos/dxos";
212
99
  var VERSION_REGEX = /([\d.]+)/;
213
100
  var VersionNumber = () => {
214
101
  const config = (0, import_react_client.useConfig)();
215
- const { t } = (0, import_react_ui3.useTranslation)(STATUS_BAR_PLUGIN);
102
+ const { t } = (0, import_react_ui2.useTranslation)(STATUS_BAR_PLUGIN);
216
103
  const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
217
104
  const [_, v] = version?.match(VERSION_REGEX) ?? [];
105
+ const isLabs = config.values.runtime?.app?.env?.DX_LABS;
218
106
  const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
219
107
  const previewUrl = "https://docs.dxos.org/composer#technology-preview";
220
- return /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Root, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Trigger, {
108
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Root, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Trigger, {
221
109
  asChild: true
222
- }, /* @__PURE__ */ import_react5.default.createElement(StatusBar.Button, {
110
+ }, /* @__PURE__ */ import_react3.default.createElement(StatusBar.Button, {
223
111
  classNames: "text-xs"
224
- }, "v", v)), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Portal, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Content, {
112
+ }, isLabs ? version : v)), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Portal, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Content, {
225
113
  side: "top",
226
114
  role: "message",
227
115
  classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
228
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Message.Root, {
116
+ }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Message.Root, {
229
117
  valence: "warning",
230
118
  className: "rounded-be-none p-5"
231
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Message.Title, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Icon, {
119
+ }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Message.Title, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Icon, {
232
120
  icon: "ph--warning--duotone",
233
121
  size: 6,
234
122
  classNames: "inline mie-2"
235
- }), /* @__PURE__ */ import_react5.default.createElement("span", null, t("warning title"))), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Message.Body, null, t("technology preview message"), /* @__PURE__ */ import_react5.default.createElement("br", null), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Link, {
123
+ }), /* @__PURE__ */ import_react3.default.createElement("span", null, t("warning title"))), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Message.Body, null, t("technology preview message"), /* @__PURE__ */ import_react3.default.createElement("br", null), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Link, {
236
124
  href: previewUrl,
237
125
  target: "_blank",
238
126
  rel: "noreferrer",
239
127
  variant: "neutral"
240
- }, t("learn more label"), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Icon, {
128
+ }, t("learn more label"), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Icon, {
241
129
  icon: "ph--arrow-square-out--bold",
242
130
  classNames: "inline mis-1"
243
- })))), /* @__PURE__ */ import_react5.default.createElement("div", {
131
+ })))), /* @__PURE__ */ import_react3.default.createElement("div", {
244
132
  role: "none",
245
133
  className: "plb-4 pli-5 space-b-2 text-baseText"
246
- }, timestamp && /* @__PURE__ */ import_react5.default.createElement("p", null, t("released message", {
134
+ }, timestamp && /* @__PURE__ */ import_react3.default.createElement("p", null, t("released message", {
247
135
  released: (0, import_formatDistance.formatDistance)(new Date(timestamp), /* @__PURE__ */ new Date(), {
248
136
  addSuffix: true
249
137
  })
250
- }), /* @__PURE__ */ import_react5.default.createElement("br", null), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Link, {
138
+ }), /* @__PURE__ */ import_react3.default.createElement("br", null), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Link, {
251
139
  href: releaseUrl,
252
140
  target: "_blank",
253
141
  rel: "noreferrer",
254
142
  variant: "neutral"
255
- }, t("see release label"), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Icon, {
143
+ }, t("see release label"), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Icon, {
256
144
  icon: "ph--arrow-square-out--bold",
257
145
  classNames: "inline mis-1"
258
- }))), /* @__PURE__ */ import_react5.default.createElement("p", null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Trans, {
146
+ }))), /* @__PURE__ */ import_react3.default.createElement("p", null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Trans, {
259
147
  t,
260
148
  i18nKey: "powered by dxos message",
261
149
  components: {
262
- dxos: /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Link, {
150
+ dxos: /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Link, {
263
151
  href: "https://dxos.org",
264
152
  target: "_blank",
265
153
  rel: "noreferrer",
266
154
  variant: "neutral"
267
155
  })
268
156
  }
269
- }))), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Arrow, null))));
157
+ }))), /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Arrow, null))));
270
158
  };
271
159
  var StatusBarActions = () => {
272
160
  const { t } = (0, import_react_ui.useTranslation)(STATUS_BAR_PLUGIN);
@@ -274,31 +162,29 @@ var StatusBarActions = () => {
274
162
  return /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Root, {
275
163
  open,
276
164
  onOpenChange: setOpen
277
- }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Trigger, {
278
- asChild: true
279
165
  }, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
280
- "data-joyride": "welcome/feedback"
166
+ asChild: true
167
+ }, /* @__PURE__ */ import_react2.default.createElement("a", {
168
+ href: "https://dxos.org/discord",
169
+ target: "_blank",
170
+ rel: "noopener noreferrer"
281
171
  }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
282
- icon: "ph--paper-plane-tilt--regular",
172
+ icon: "ph--discord-logo--regular",
283
173
  size: 4
284
174
  }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
285
175
  classNames: "hidden sm:block"
286
- }, t("feedback label")))), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
176
+ }, t("discord label")))), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
287
177
  asChild: true
288
178
  }, /* @__PURE__ */ import_react2.default.createElement("a", {
289
- href: "https://dxos.org/discord",
179
+ href: "https://github.com/dxos/dxos",
290
180
  target: "_blank",
291
181
  rel: "noopener noreferrer"
292
182
  }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
293
- icon: "ph--discord-logo--regular",
183
+ icon: "ph--github-logo--regular",
294
184
  size: 4
295
185
  }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
296
186
  classNames: "hidden sm:block"
297
- }, t("discord label")))), /* @__PURE__ */ import_react2.default.createElement(VersionNumber, null), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Portal, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Content, {
298
- classNames: "shadow-lg"
299
- }, /* @__PURE__ */ import_react2.default.createElement(FeedbackForm, {
300
- onClose: () => setOpen(false)
301
- }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Arrow, null))));
187
+ }, t("github label")))), /* @__PURE__ */ import_react2.default.createElement(VersionNumber, null));
302
188
  };
303
189
  var StatusBarPanel = () => {
304
190
  return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(StatusBarActions, null), /* @__PURE__ */ import_react2.default.createElement("span", {
@@ -308,37 +194,57 @@ var StatusBarPanel = () => {
308
194
  role: "status"
309
195
  }));
310
196
  };
311
- var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
312
- (0, import_app_framework3.defineModule)({
197
+ var entry = (translation) => ({
198
+ [STATUS_BAR_PLUGIN]: translation
199
+ });
200
+ var translations = {
201
+ "en-US": entry({
202
+ "plugin name": "Status Bar",
203
+ "warning title": "WARNING",
204
+ "technology preview message": "Composer is currently in beta.",
205
+ "learn more label": "Learn more",
206
+ "released message": "This version released {{released}}.",
207
+ "see release label": "See release on GitHub",
208
+ "powered by dxos message": "Powered by <dxos>DXOS</dxos>",
209
+ "discord label": "Discord",
210
+ "github label": "GitHub",
211
+ "feedback label": "Feedback"
212
+ })
213
+ };
214
+ var translations_default = [
215
+ translations
216
+ ];
217
+ var StatusBarPlugin = () => (0, import_app_framework2.definePlugin)(meta, [
218
+ (0, import_app_framework2.defineModule)({
313
219
  id: `${meta.id}/module/translations`,
314
- activatesOn: import_app_framework3.Events.SetupTranslations,
315
- activate: () => (0, import_app_framework3.contributes)(import_app_framework3.Capabilities.Translations, translations_default)
220
+ activatesOn: import_app_framework2.Events.SetupTranslations,
221
+ activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
316
222
  }),
317
- (0, import_app_framework3.defineModule)({
223
+ (0, import_app_framework2.defineModule)({
318
224
  id: `${meta.id}/module/react-surface`,
319
- activatesOn: import_app_framework3.Events.SetupReactSurface,
320
- activate: () => (0, import_app_framework3.contributes)(import_app_framework3.Capabilities.ReactSurface, [
321
- (0, import_app_framework3.createSurface)({
225
+ activatesOn: import_app_framework2.Events.SetupReactSurface,
226
+ activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.ReactSurface, [
227
+ (0, import_app_framework2.createSurface)({
322
228
  id: meta.id,
323
229
  role: "status-bar",
324
- component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarPanel, null)
230
+ component: () => /* @__PURE__ */ import_react4.default.createElement(StatusBarPanel, null)
325
231
  }),
326
- (0, import_app_framework3.createSurface)({
232
+ (0, import_app_framework2.createSurface)({
327
233
  id: meta.id,
328
234
  role: "status-bar--r0-footer",
329
- component: () => /* @__PURE__ */ import_react6.default.createElement(import_app_framework3.Surface, {
235
+ component: () => /* @__PURE__ */ import_react4.default.createElement(import_app_framework2.Surface, {
330
236
  role: "status"
331
237
  })
332
238
  }),
333
- (0, import_app_framework3.createSurface)({
239
+ (0, import_app_framework2.createSurface)({
334
240
  id: meta.id,
335
241
  role: "status-bar--r1-footer",
336
- component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarActions, null)
242
+ component: () => /* @__PURE__ */ import_react4.default.createElement(StatusBarActions, null)
337
243
  }),
338
- (0, import_app_framework3.createSurface)({
244
+ (0, import_app_framework2.createSurface)({
339
245
  id: `${STATUS_BAR_PLUGIN}/header-end`,
340
246
  role: "header-end",
341
- component: () => /* @__PURE__ */ import_react6.default.createElement(VersionNumber, null)
247
+ component: () => /* @__PURE__ */ import_react4.default.createElement(VersionNumber, null)
342
248
  })
343
249
  ])
344
250
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../src/components/FeedbackForm.tsx", "../../../src/meta.ts", "../../../src/translations.ts", "../../../src/components/VersionNumber.tsx", "../../../src/StatusBarPlugin.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\ntype StatusBarButtonProps = ThemedClassName<ComponentPropsWithRef<'button'> & { asChild?: boolean }>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center justify-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer dx-focus-ring text-description text-xs',\n 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',\n classNames,\n );\n\n return asChild ? (\n <Slot role='button' ref={forwardedRef} className={classes} {...props}>\n {children}\n </Slot>\n ) : (\n <button className={classes} ref={forwardedRef} {...props}>\n {children}\n </button>\n );\n },\n);\n\nexport default StatusBarButton;\n\ntype StatusBarItemProps = ThemedClassName<ComponentPropsWithRef<'div'>>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </div>\n ),\n);\n\ntype StartContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center space-x-2', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\ntype EndContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center justify-end', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\nexport const StatusBar = {\n Text: StatusBarText,\n Item: StatusBarItem,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { Icon, Popover, useTranslation } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\nimport { VersionNumber } from './VersionNumber';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nexport const StatusBarActions = () => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const [open, setOpen] = useState(false);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <StatusBar.Button data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('feedback label')}</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button asChild>\n <a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--discord-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>{t('discord label')}</StatusBar.Text>\n </a>\n </StatusBar.Button>\n <VersionNumber />\n <Popover.Portal>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onClose={() => setOpen(false)} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n\nexport const StatusBarPanel = () => {\n return (\n <>\n <StatusBarActions />\n <span role='separator' className='grow' />\n <Surface role='status' />\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { PaperPlaneTilt, X } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction, UserFeedback } from '@dxos/plugin-observability/types';\nimport { Button, Input, Popover, useTranslation } from '@dxos/react-ui';\nimport { useForm } from '@dxos/react-ui-form';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { STATUS_BAR_PLUGIN } from '../meta';\nimport { mkTranslation } from '../translations';\n\nconst initialValues: UserFeedback = { name: '', email: '', message: '' };\n\nexport const FeedbackForm = ({ onClose }: { onClose: () => void }) => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const translation = mkTranslation(t);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const onSave = useCallback(\n (values: UserFeedback) => {\n void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));\n onClose();\n },\n [dispatch, onClose],\n );\n\n const { handleSave, canSave, getStatus, ...inputProps } = useForm<UserFeedback>({\n initialValues,\n schema: UserFeedback,\n onSave,\n });\n\n return (\n <div role='form' className='p-3 flex flex-col gap-2'>\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('name').status}>\n <Input.Label>{translation('name label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('name placeholder')}\n autoFocus\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('name').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('email').status}>\n <Input.Label>{translation('email input label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('email input placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('email').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('message').status}>\n <Input.Label>{translation('feedback text area label')}</Input.Label>\n <Input.TextArea\n classNames={'text-sm'}\n rows={5}\n cols={30}\n placeholder={translation('feedback text area placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('message').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-2'>\n <Button\n type='submit'\n variant='primary'\n classNames='is-full flex gap-2'\n disabled={!canSave}\n onClick={handleSave}\n >\n <span>{translation('send feedback label')}</span>\n <div className='grow' />\n <PaperPlaneTilt className={getSize(5)} />\n </Button>\n <Popover.Close asChild>\n <Button classNames='is-full flex gap-2'>\n <span>{t('cancel label', { ns: 'os' })}</span>\n <div className='grow' />\n <X className={getSize(5)} />\n </Button>\n </Popover.Close>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STATUS_BAR_PLUGIN = 'dxos.org/plugin/status-bar';\n\nexport const meta = {\n id: STATUS_BAR_PLUGIN,\n name: 'Status Bar',\n description: 'Display a bar with status and actions.',\n icon: 'ph--info--regular',\n} satisfies PluginMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\n | 'email input label'\n | 'email input placeholder'\n | 'feedback text area label'\n | 'feedback text area placeholder'\n | 'send feedback label'\n | 'name label'\n | 'name placeholder'\n | 'warning title'\n | 'technology preview message'\n | 'learn more label'\n | 'released message'\n | 'see release label'\n | 'powered by dxos message'\n | 'discord label'\n | 'feedback label';\n\ntype RequiredTranslation = { [key in StatusBarTranslationKeys]: string };\ntype TranslationEntry = { [STATUS_BAR_PLUGIN]: RequiredTranslation };\ntype Language = string;\n\n// -- helpers.\nconst entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });\nexport const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);\n\nconst translations: Record<Language, TranslationEntry> = {\n 'en-US': entry({\n 'plugin name': 'Status Bar',\n 'name label': 'Name',\n 'name placeholder': 'Preferred name',\n 'email input label': 'Email',\n 'email input placeholder': 'hello@example.com',\n 'feedback text area label': 'Feedback',\n 'feedback text area placeholder': 'Please describe your issue or suggestion.',\n 'send feedback label': 'Send Feedback',\n 'warning title': 'WARNING',\n 'technology preview message': 'Composer is still in technology preview.',\n 'learn more label': 'Learn more',\n 'released message': 'This version released {{released}}.',\n 'see release label': 'See release on GitHub',\n 'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',\n 'discord label': 'Discord',\n 'feedback label': 'Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { formatDistance } from 'date-fns/formatDistance';\nimport React from 'react';\n\nimport { useConfig } from '@dxos/react-client';\nimport { Link, Message, Popover, Trans, useTranslation, Icon } from '@dxos/react-ui';\n\nimport { StatusBar } from './StatusBar';\nimport { STATUS_BAR_PLUGIN } from '../meta';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nconst VERSION_REGEX = /([\\d.]+)/;\n\nexport const VersionNumber = () => {\n const config = useConfig();\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};\n const [_, v] = version?.match(VERSION_REGEX) ?? [];\n\n const releaseUrl =\n config.values.runtime?.app?.env?.DX_ENVIRONMENT === 'production'\n ? `${repo}/releases/tag/v${version}`\n : `${repo}/commit/${commitHash}`;\n\n const previewUrl = 'https://docs.dxos.org/composer#technology-preview';\n\n return (\n <Popover.Root>\n <Popover.Trigger asChild>\n <StatusBar.Button classNames='text-xs'>v{v}</StatusBar.Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side='top'\n role='message'\n classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'\n >\n <Message.Root valence='warning' className='rounded-be-none p-5'>\n <Message.Title>\n <Icon icon='ph--warning--duotone' size={6} classNames='inline mie-2' />\n <span>{t('warning title')}</span>\n </Message.Title>\n <Message.Body>\n {t('technology preview message')}\n <br />\n <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('learn more label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </Message.Body>\n </Message.Root>\n <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>\n {timestamp && (\n <p>\n {t('released message', {\n released: formatDistance(new Date(timestamp), new Date(), { addSuffix: true }),\n })}\n <br />\n <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('see release label')}\n <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />\n </Link>\n </p>\n )}\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'powered by dxos message',\n components: {\n dxos: <Link href='https://dxos.org' target='_blank' rel='noreferrer' variant='neutral' />,\n },\n }}\n />\n </p>\n </div>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n Surface,\n} from '@dxos/app-framework';\n\nimport { StatusBarActions, StatusBarPanel } from './components';\nimport { VersionNumber } from './components/VersionNumber';\nimport { meta, STATUS_BAR_PLUGIN } from './meta';\nimport translations from './translations';\n\nexport const StatusBarPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r0-footer',\n component: () => <Surface role='status' />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--r1-footer',\n component: () => <StatusBarActions />,\n }),\n createSurface({\n id: `${STATUS_BAR_PLUGIN}/header-end`,\n role: 'header-end',\n component: () => <VersionNumber />,\n }),\n ]),\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAAqB;AACrB,mBAAsG;AAGtG,4BAAmB;ACJnB,IAAAA,gBAAgC;AAEhC,2BAAwB;AACxB,sBAA8C;ACH9C,IAAAA,gBAAkC;AAClC,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAkD;AAClD,mBAAkD;AAClD,IAAAC,mBAAuD;AACvD,2BAAwB;AACxB,IAAAC,yBAAwB;AGPxB,4BAA+B;AAC/B,IAAAH,gBAAkB;AAElB,0BAA0B;AAC1B,IAAAE,mBAAoE;ACJpE,IAAAF,gBAAkB;AAElB,IAAAC,wBAQO;ANFP,IAAMG,gBAAgBC,6CAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAC/F,6BAAAC,QAAA,cAACC,QAAAA;EAAKC,eAAWC,0BAAGN,UAAAA;EAAaO,KAAKL;GACnCD,QAAAA,CAAAA;AAML,IAAMO,kBAAkBT,6CACtB,CAAC,EAAEC,YAAYC,UAAUQ,SAAS,GAAGC,MAAAA,GAASR,iBAAAA;AAC5C,QAAMS,cAAUL,0BACd,8DACA,qEACA,kGACAN,UAAAA;AAGF,SAAOS,UACL,6BAAAN,QAAA,cAACS,wBAAAA;IAAKC,MAAK;IAASN,KAAKL;IAAcG,WAAWM;IAAU,GAAGD;KAC5DT,QAAAA,IAGH,6BAAAE,QAAA,cAACW,UAAAA;IAAOT,WAAWM;IAASJ,KAAKL;IAAe,GAAGQ;KAChDT,QAAAA;AAGP,CAAA;AAOF,IAAMc,gBAAgBhB,6CACpB,CAAC,EAAEC,YAAYC,UAAU,GAAGS,MAAAA,GAASR,iBACnC,6BAAAC,QAAA,cAACa,OAAAA;EACCH,MAAK;EACLR,eAAWC,0BAAG,0EA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jB+G,oCAAa;IACX9G,IAAI,GAAGD,KAAKC,EAAE;IACd+G,aAAaC,6BAAOC;IACpBC,UAAU,UAAMC,mCAAYC,mCAAaC,cAAc5G,oBAAAA;EACzD,CAAA;MACAqG,oCAAa;IACX9G,IAAI,GAAGD,KAAKC,EAAE;IACd+G,aAAaC,6BAAOM;IACpBJ,UAAU,UACRC,mCAAYC,mCAAaG,cAAc;UACrCC,qCAAc;QACZxH,IAAID,KAAKC;QACTZ,MAAM;QACNqI,WAAW,MAAM/I,8BAAAA,QAAA,cAACgI,gBAAAA,IAAAA;MACpB,CAAA;UACAc,qCAAc;QACZxH,IAAID,KAAKC;QACTZ,MAAM;QACNqI,WAAW,MAAM/I,8BAAAA,QAAA,cAACiI,sBAAAA,SAAAA;UAAQvH,MAAK;;MACjC,CAAA;UACAoI,qCAAc;QACZxH,IAAID,KAAKC;QACTZ,MAAM;QACNqI,WAAW,MAAM/I,8BAAAA,QAAA,cAACyH,kBAAAA,IAAAA;MACpB,CAAA;UACAqB,qCAAc;QACZxH,IAAI,GAAGF,iBAAAA;QACPV,MAAM;QACNqI,WAAW,MAAM/I,8BAAAA,QAAA,cAACgF,eAAAA,IAAAA;MACpB,CAAA;KACD;EACL,CAAA;CACD;",
6
- "names": ["import_react", "import_app_framework", "import_react_ui", "import_react_ui_theme", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "React", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "div", "StartContent", "EndContent", "StatusBar", "Text", "Item", "Button", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "entry", "translation", "mkTranslation", "t", "key", "translations", "initialValues", "email", "message", "FeedbackForm", "onClose", "useTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "onSave", "useCallback", "values", "createIntent", "ObservabilityAction", "CaptureUserFeedback", "handleSave", "canSave", "getStatus", "inputProps", "useForm", "schema", "UserFeedback", "Input", "Root", "validationValence", "status", "Label", "TextInput", "placeholder", "autoFocus", "DescriptionAndValidation", "Validation", "error", "TextArea", "rows", "cols", "type", "variant", "disabled", "onClick", "PaperPlaneTilt", "getSize", "Popover", "Close", "ns", "X", "repo", "VERSION_REGEX", "VersionNumber", "config", "useConfig", "version", "timestamp", "commitHash", "runtime", "app", "build", "_", "v", "match", "releaseUrl", "env", "DX_ENVIRONMENT", "previewUrl", "Trigger", "Portal", "Content", "side", "Message", "valence", "Title", "Icon", "size", "Body", "br", "Link", "href", "target", "rel", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "open", "setOpen", "useState", "onOpenChange", "data-joyride", "a", "StatusBarPanel", "Surface", "StatusBarPlugin", "definePlugin", "defineModule", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "SetupReactSurface", "ReactSurface", "createSurface", "component"]
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':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ef", "classNames", "children", "forwardedRef", "React", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "div", "StartContent", "EndContent", "StatusBar", "Text", "Item", "Button", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "repo", "VERSION_REGEX", "VersionNumber", "config", "useConfig", "t", "useTranslation", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "_", "v", "match", "isLabs", "env", "DX_LABS", "releaseUrl", "DX_ENVIRONMENT", "previewUrl", "Popover", "Root", "Trigger", "Portal", "Content", "side", "Message", "valence", "Title", "Icon", "size", "Body", "br", "Link", "href", "target", "rel", "variant", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "open", "setOpen", "useState", "onOpenChange", "a", "StatusBarPanel", "Surface", "entry", "translation", "translations", "StatusBarPlugin", "definePlugin", "defineModule", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "SetupReactSurface", "ReactSurface", "createSurface", "component"]
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":1289,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":4748,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":13476,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytes":10881,"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":6757,"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/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytes":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/StatusBarPlugin.tsx":{"bytes":6167,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx","kind":"import-statement","original":"./components/VersionNumber"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/index.ts":{"bytes":699,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26408},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"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":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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":1972},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytesInOutput":3972},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":202},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":957},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytesInOutput":3174},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":1317}},"bytes":14287}}}
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/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18333},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"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":9726}}}