@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.
@@ -44,18 +44,15 @@ var StatusBar = {
44
44
  };
45
45
 
46
46
  // packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
47
- import React4, { useState } from "react";
47
+ import React3, { useState } from "react";
48
48
  import { Surface } from "@dxos/app-framework";
49
- import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation3 } from "@dxos/react-ui";
49
+ import { Icon as Icon2, Popover as Popover2, useTranslation as useTranslation2 } from "@dxos/react-ui";
50
50
 
51
- // packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx
52
- import { PaperPlaneTilt, X } from "@phosphor-icons/react";
53
- import React2, { useCallback } from "react";
54
- import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
55
- import { ObservabilityAction, UserFeedback } from "@dxos/plugin-observability/types";
56
- import { Button, Input, Popover, useTranslation } from "@dxos/react-ui";
57
- import { useForm } from "@dxos/react-ui-form";
58
- import { getSize } from "@dxos/react-ui-theme";
51
+ // packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx
52
+ import { formatDistance } from "date-fns/formatDistance";
53
+ import React2 from "react";
54
+ import { useConfig } from "@dxos/react-client";
55
+ import { Link, Message, Popover, Trans, useTranslation, Icon } from "@dxos/react-ui";
59
56
 
60
57
  // packages/plugins/plugin-status-bar/src/meta.ts
61
58
  var STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
@@ -66,228 +63,136 @@ var meta = {
66
63
  icon: "ph--info--regular"
67
64
  };
68
65
 
69
- // packages/plugins/plugin-status-bar/src/translations.ts
70
- var entry = (translation) => ({
71
- [STATUS_BAR_PLUGIN]: translation
72
- });
73
- var mkTranslation = (t) => (key) => t(key);
74
- var translations = {
75
- "en-US": entry({
76
- "plugin name": "Status Bar",
77
- "name label": "Name",
78
- "name placeholder": "Preferred name",
79
- "email input label": "Email",
80
- "email input placeholder": "hello@example.com",
81
- "feedback text area label": "Feedback",
82
- "feedback text area placeholder": "Please describe your issue or suggestion.",
83
- "send feedback label": "Send Feedback",
84
- "warning title": "WARNING",
85
- "technology preview message": "Composer is currently in beta.",
86
- "learn more label": "Learn more",
87
- "released message": "This version released {{released}}.",
88
- "see release label": "See release on GitHub",
89
- "powered by dxos message": "Powered by <dxos>DXOS</dxos>",
90
- "discord label": "Discord",
91
- "feedback label": "Feedback"
92
- })
93
- };
94
- var translations_default = [
95
- translations
96
- ];
97
-
98
- // packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx
99
- var initialValues = {
100
- name: "",
101
- email: "",
102
- message: ""
103
- };
104
- var FeedbackForm = ({ onClose }) => {
105
- const { t } = useTranslation(STATUS_BAR_PLUGIN);
106
- const translation = mkTranslation(t);
107
- const { dispatchPromise: dispatch } = useIntentDispatcher();
108
- const onSave = useCallback((values) => {
109
- void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));
110
- onClose();
111
- }, [
112
- dispatch,
113
- onClose
114
- ]);
115
- const { handleSave, canSave, getStatus, ...inputProps } = useForm({
116
- initialValues,
117
- schema: UserFeedback,
118
- onSave
119
- });
120
- return /* @__PURE__ */ React2.createElement("div", {
121
- role: "form",
122
- className: "p-3 flex flex-col gap-2"
123
- }, /* @__PURE__ */ React2.createElement("div", {
124
- role: "none",
125
- className: "space-b-1"
126
- }, /* @__PURE__ */ React2.createElement(Input.Root, {
127
- validationValence: getStatus("name").status
128
- }, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("name label")), /* @__PURE__ */ React2.createElement(Input.TextInput, {
129
- classNames: "text-sm",
130
- placeholder: translation("name placeholder"),
131
- autoFocus: true,
132
- ...inputProps
133
- }), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("name").error)))), /* @__PURE__ */ React2.createElement("div", {
134
- role: "none",
135
- className: "space-b-1"
136
- }, /* @__PURE__ */ React2.createElement(Input.Root, {
137
- validationValence: getStatus("email").status
138
- }, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("email input label")), /* @__PURE__ */ React2.createElement(Input.TextInput, {
139
- classNames: "text-sm",
140
- placeholder: translation("email input placeholder"),
141
- ...inputProps
142
- }), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("email").error)))), /* @__PURE__ */ React2.createElement("div", {
143
- role: "none",
144
- className: "space-b-1"
145
- }, /* @__PURE__ */ React2.createElement(Input.Root, {
146
- validationValence: getStatus("message").status
147
- }, /* @__PURE__ */ React2.createElement(Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ React2.createElement(Input.TextArea, {
148
- classNames: "text-sm",
149
- rows: 5,
150
- cols: 30,
151
- placeholder: translation("feedback text area placeholder"),
152
- ...inputProps
153
- }), /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, null, /* @__PURE__ */ React2.createElement(Input.Validation, null, getStatus("message").error)))), /* @__PURE__ */ React2.createElement("div", {
154
- role: "none",
155
- className: "space-b-2"
156
- }, /* @__PURE__ */ React2.createElement(Button, {
157
- type: "submit",
158
- variant: "primary",
159
- classNames: "is-full flex gap-2",
160
- disabled: !canSave,
161
- onClick: handleSave
162
- }, /* @__PURE__ */ React2.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ React2.createElement("div", {
163
- className: "grow"
164
- }), /* @__PURE__ */ React2.createElement(PaperPlaneTilt, {
165
- className: getSize(5)
166
- })), /* @__PURE__ */ React2.createElement(Popover.Close, {
167
- asChild: true
168
- }, /* @__PURE__ */ React2.createElement(Button, {
169
- classNames: "is-full flex gap-2"
170
- }, /* @__PURE__ */ React2.createElement("span", null, t("cancel label", {
171
- ns: "os"
172
- })), /* @__PURE__ */ React2.createElement("div", {
173
- className: "grow"
174
- }), /* @__PURE__ */ React2.createElement(X, {
175
- className: getSize(5)
176
- })))));
177
- };
178
-
179
66
  // packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx
180
- import { formatDistance } from "date-fns/formatDistance";
181
- import React3 from "react";
182
- import { useConfig } from "@dxos/react-client";
183
- import { Link, Message, Popover as Popover2, Trans, useTranslation as useTranslation2, Icon } from "@dxos/react-ui";
184
67
  var repo = "https://github.com/dxos/dxos";
185
68
  var VERSION_REGEX = /([\d.]+)/;
186
69
  var VersionNumber = () => {
187
70
  const config = useConfig();
188
- const { t } = useTranslation2(STATUS_BAR_PLUGIN);
71
+ const { t } = useTranslation(STATUS_BAR_PLUGIN);
189
72
  const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
190
73
  const [_, v] = version?.match(VERSION_REGEX) ?? [];
191
74
  const isLabs = config.values.runtime?.app?.env?.DX_LABS;
192
75
  const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
193
76
  const previewUrl = "https://docs.dxos.org/composer#technology-preview";
194
- return /* @__PURE__ */ React3.createElement(Popover2.Root, null, /* @__PURE__ */ React3.createElement(Popover2.Trigger, {
77
+ return /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
195
78
  asChild: true
196
- }, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
79
+ }, /* @__PURE__ */ React2.createElement(StatusBar.Button, {
197
80
  classNames: "text-xs"
198
- }, isLabs ? version : v)), /* @__PURE__ */ React3.createElement(Popover2.Portal, null, /* @__PURE__ */ React3.createElement(Popover2.Content, {
81
+ }, isLabs ? version : v)), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
199
82
  side: "top",
200
83
  role: "message",
201
84
  classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
202
- }, /* @__PURE__ */ React3.createElement(Message.Root, {
85
+ }, /* @__PURE__ */ React2.createElement(Message.Root, {
203
86
  valence: "warning",
204
87
  className: "rounded-be-none p-5"
205
- }, /* @__PURE__ */ React3.createElement(Message.Title, null, /* @__PURE__ */ React3.createElement(Icon, {
88
+ }, /* @__PURE__ */ React2.createElement(Message.Title, null, /* @__PURE__ */ React2.createElement(Icon, {
206
89
  icon: "ph--warning--duotone",
207
90
  size: 6,
208
91
  classNames: "inline mie-2"
209
- }), /* @__PURE__ */ React3.createElement("span", null, t("warning title"))), /* @__PURE__ */ React3.createElement(Message.Body, null, t("technology preview message"), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement(Link, {
92
+ }), /* @__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, {
210
93
  href: previewUrl,
211
94
  target: "_blank",
212
95
  rel: "noreferrer",
213
96
  variant: "neutral"
214
- }, t("learn more label"), /* @__PURE__ */ React3.createElement(Icon, {
97
+ }, t("learn more label"), /* @__PURE__ */ React2.createElement(Icon, {
215
98
  icon: "ph--arrow-square-out--bold",
216
99
  classNames: "inline mis-1"
217
- })))), /* @__PURE__ */ React3.createElement("div", {
100
+ })))), /* @__PURE__ */ React2.createElement("div", {
218
101
  role: "none",
219
102
  className: "plb-4 pli-5 space-b-2 text-baseText"
220
- }, timestamp && /* @__PURE__ */ React3.createElement("p", null, t("released message", {
103
+ }, timestamp && /* @__PURE__ */ React2.createElement("p", null, t("released message", {
221
104
  released: formatDistance(new Date(timestamp), /* @__PURE__ */ new Date(), {
222
105
  addSuffix: true
223
106
  })
224
- }), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement(Link, {
107
+ }), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
225
108
  href: releaseUrl,
226
109
  target: "_blank",
227
110
  rel: "noreferrer",
228
111
  variant: "neutral"
229
- }, t("see release label"), /* @__PURE__ */ React3.createElement(Icon, {
112
+ }, t("see release label"), /* @__PURE__ */ React2.createElement(Icon, {
230
113
  icon: "ph--arrow-square-out--bold",
231
114
  classNames: "inline mis-1"
232
- }))), /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement(Trans, {
115
+ }))), /* @__PURE__ */ React2.createElement("p", null, /* @__PURE__ */ React2.createElement(Trans, {
233
116
  t,
234
117
  i18nKey: "powered by dxos message",
235
118
  components: {
236
- dxos: /* @__PURE__ */ React3.createElement(Link, {
119
+ dxos: /* @__PURE__ */ React2.createElement(Link, {
237
120
  href: "https://dxos.org",
238
121
  target: "_blank",
239
122
  rel: "noreferrer",
240
123
  variant: "neutral"
241
124
  })
242
125
  }
243
- }))), /* @__PURE__ */ React3.createElement(Popover2.Arrow, null))));
126
+ }))), /* @__PURE__ */ React2.createElement(Popover.Arrow, null))));
244
127
  };
245
128
 
246
129
  // packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx
247
130
  var StatusBarActions = () => {
248
- const { t } = useTranslation3(STATUS_BAR_PLUGIN);
131
+ const { t } = useTranslation2(STATUS_BAR_PLUGIN);
249
132
  const [open, setOpen] = useState(false);
250
- return /* @__PURE__ */ React4.createElement(Popover3.Root, {
133
+ return /* @__PURE__ */ React3.createElement(Popover2.Root, {
251
134
  open,
252
135
  onOpenChange: setOpen
253
- }, /* @__PURE__ */ React4.createElement(Popover3.Trigger, {
136
+ }, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
254
137
  asChild: true
255
- }, /* @__PURE__ */ React4.createElement(StatusBar.Button, {
256
- "data-joyride": "welcome/feedback"
257
- }, /* @__PURE__ */ React4.createElement(Icon2, {
258
- icon: "ph--paper-plane-tilt--regular",
138
+ }, /* @__PURE__ */ React3.createElement("a", {
139
+ href: "https://dxos.org/discord",
140
+ target: "_blank",
141
+ rel: "noopener noreferrer"
142
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
143
+ icon: "ph--discord-logo--regular",
259
144
  size: 4
260
- }), /* @__PURE__ */ React4.createElement(StatusBar.Text, {
145
+ }), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
261
146
  classNames: "hidden sm:block"
262
- }, t("feedback label")))), /* @__PURE__ */ React4.createElement(StatusBar.Button, {
147
+ }, t("discord label")))), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
263
148
  asChild: true
264
- }, /* @__PURE__ */ React4.createElement("a", {
265
- href: "https://dxos.org/discord",
149
+ }, /* @__PURE__ */ React3.createElement("a", {
150
+ href: "https://github.com/dxos/dxos",
266
151
  target: "_blank",
267
152
  rel: "noopener noreferrer"
268
- }, /* @__PURE__ */ React4.createElement(Icon2, {
269
- icon: "ph--discord-logo--regular",
153
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
154
+ icon: "ph--github-logo--regular",
270
155
  size: 4
271
- }), /* @__PURE__ */ React4.createElement(StatusBar.Text, {
156
+ }), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
272
157
  classNames: "hidden sm:block"
273
- }, t("discord label")))), /* @__PURE__ */ React4.createElement(VersionNumber, null), /* @__PURE__ */ React4.createElement(Popover3.Portal, null, /* @__PURE__ */ React4.createElement(Popover3.Content, {
274
- classNames: "shadow-lg"
275
- }, /* @__PURE__ */ React4.createElement(FeedbackForm, {
276
- onClose: () => setOpen(false)
277
- }), /* @__PURE__ */ React4.createElement(Popover3.Arrow, null))));
158
+ }, t("github label")))), /* @__PURE__ */ React3.createElement(VersionNumber, null));
278
159
  };
279
160
  var StatusBarPanel = () => {
280
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(StatusBarActions, null), /* @__PURE__ */ React4.createElement("span", {
161
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBarActions, null), /* @__PURE__ */ React3.createElement("span", {
281
162
  role: "separator",
282
163
  className: "grow"
283
- }), /* @__PURE__ */ React4.createElement(Surface, {
164
+ }), /* @__PURE__ */ React3.createElement(Surface, {
284
165
  role: "status"
285
166
  }));
286
167
  };
287
168
 
288
169
  // packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx
289
- import React5 from "react";
170
+ import React4 from "react";
290
171
  import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events, Surface as Surface2 } from "@dxos/app-framework";
172
+
173
+ // packages/plugins/plugin-status-bar/src/translations.ts
174
+ var entry = (translation) => ({
175
+ [STATUS_BAR_PLUGIN]: translation
176
+ });
177
+ var translations = {
178
+ "en-US": entry({
179
+ "plugin name": "Status Bar",
180
+ "warning title": "WARNING",
181
+ "technology preview message": "Composer is currently in beta.",
182
+ "learn more label": "Learn more",
183
+ "released message": "This version released {{released}}.",
184
+ "see release label": "See release on GitHub",
185
+ "powered by dxos message": "Powered by <dxos>DXOS</dxos>",
186
+ "discord label": "Discord",
187
+ "github label": "GitHub",
188
+ "feedback label": "Feedback"
189
+ })
190
+ };
191
+ var translations_default = [
192
+ translations
193
+ ];
194
+
195
+ // packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx
291
196
  var StatusBarPlugin = () => definePlugin(meta, [
292
197
  defineModule({
293
198
  id: `${meta.id}/module/translations`,
@@ -301,24 +206,24 @@ var StatusBarPlugin = () => definePlugin(meta, [
301
206
  createSurface({
302
207
  id: meta.id,
303
208
  role: "status-bar",
304
- component: () => /* @__PURE__ */ React5.createElement(StatusBarPanel, null)
209
+ component: () => /* @__PURE__ */ React4.createElement(StatusBarPanel, null)
305
210
  }),
306
211
  createSurface({
307
212
  id: meta.id,
308
213
  role: "status-bar--r0-footer",
309
- component: () => /* @__PURE__ */ React5.createElement(Surface2, {
214
+ component: () => /* @__PURE__ */ React4.createElement(Surface2, {
310
215
  role: "status"
311
216
  })
312
217
  }),
313
218
  createSurface({
314
219
  id: meta.id,
315
220
  role: "status-bar--r1-footer",
316
- component: () => /* @__PURE__ */ React5.createElement(StatusBarActions, null)
221
+ component: () => /* @__PURE__ */ React4.createElement(StatusBarActions, null)
317
222
  }),
318
223
  createSurface({
319
224
  id: `${STATUS_BAR_PLUGIN}/header-end`,
320
225
  role: "header-end",
321
- component: () => /* @__PURE__ */ React5.createElement(VersionNumber, null)
226
+ component: () => /* @__PURE__ */ React4.createElement(VersionNumber, null)
322
227
  })
323
228
  ])
324
229
  })
@@ -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 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,iBAC/F,sBAAA,cAACC,QAAAA;EAAKC,WAAWC,GAAGL,UAAAA;EAAaM,KAAKJ;GACnCD,QAAAA,CAAAA;AAML,IAAMM,kBAAkBR,2BACtB,CAAC,EAAEC,YAAYC,UAAUO,SAAS,GAAGC,MAAAA,GAASP,iBAAAA;AAC5C,QAAMQ,UAAUL,GACd,8DACA,qEACA,kGACAL,UAAAA;AAGF,SAAOQ,UACL,sBAAA,cAACG,MAAAA;IAAKC,MAAK;IAASN,KAAKJ;IAAcE,WAAWM;IAAU,GAAGD;KAC5DR,QAAAA,IAGH,sBAAA,cAACY,UAAAA;IAAOT,WAAWM;IAASJ,KAAKJ;IAAe,GAAGO;KAChDR,QAAAA;AAGP,CAAA;AAOF,IAAMa,gBAAgBC,2BACpB,CAAC,EAAEC,YAAYC,UAAU,GAAGC,MAAAA,GAASC,iBACnC,s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AA,cAACyB,QAAAA;IAAKC,MAAK;IAAYC,WAAU;MACjC,gBAAA3B,OAAA,cAAC4B,SAAAA;IAAQF,MAAK;;AAGpB;;;AK/CA,OAAOG,YAAW;AAElB,SACEC,cACAC,aACAC,eACAC,cACAC,cACAC,QACAC,WAAAA,gBACK;AAOA,IAAMC,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", "PaperPlaneTilt", "X", "React", "useCallback", "createIntent", "useIntentDispatcher", "ObservabilityAction", "UserFeedback", "Button", "Input", "Popover", "useTranslation", "useForm", "getSize", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "entry", "translation", "STATUS_BAR_PLUGIN", "mkTranslation", "t", "key", "translations", "initialValues", "name", "email", "message", "FeedbackForm", "onClose", "t", "useTranslation", "STATUS_BAR_PLUGIN", "translation", "mkTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "onSave", "useCallback", "values", "createIntent", "ObservabilityAction", "CaptureUserFeedback", "handleSave", "canSave", "getStatus", "inputProps", "useForm", "schema", "UserFeedback", "React", "div", "role", "className", "Input", "Root", "validationValence", "status", "Label", "TextInput", "classNames", "placeholder", "autoFocus", "DescriptionAndValidation", "Validation", "error", "TextArea", "rows", "cols", "Button", "type", "variant", "disabled", "onClick", "span", "PaperPlaneTilt", "getSize", "Popover", "Close", "asChild", "ns", "X", "formatDistance", "React", "useConfig", "Link", "Message", "Popover", "Trans", "useTranslation", "Icon", "repo", "VERSION_REGEX", "VersionNumber", "config", "useConfig", "t", "useTranslation", "STATUS_BAR_PLUGIN", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "_", "v", "match", "isLabs", "env", "DX_LABS", "releaseUrl", "DX_ENVIRONMENT", "previewUrl", "React", "Popover", "Root", "Trigger", "asChild", "StatusBar", "Button", "classNames", "Portal", "Content", "side", "role", "Message", "valence", "className", "Title", "Icon", "icon", "size", "span", "Body", "br", "Link", "href", "target", "rel", "variant", "div", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "t", "useTranslation", "STATUS_BAR_PLUGIN", "open", "setOpen", "useState", "React", "Popover", "Root", "onOpenChange", "Trigger", "asChild", "StatusBar", "Button", "data-joyride", "Icon", "icon", "size", "Text", "classNames", "a", "href", "target", "rel", "VersionNumber", "Portal", "Content", "FeedbackForm", "onClose", "Arrow", "StatusBarPanel", "span", "role", "className", "Surface", "React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "Surface", "StatusBarPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupReactSurface", "ReactSurface", "createSurface", "role", "component", "React", "StatusBarPanel", "Surface", "StatusBarActions", "STATUS_BAR_PLUGIN", "VersionNumber"]
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,UAAAA;EAAaM,KAAKJ;GACnCD,QAAAA,CAAAA;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jBC,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":1289,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":4726,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":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":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":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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26553},"packages/plugins/plugin-status-bar/dist/lib/browser/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":"@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":947},"packages/plugins/plugin-status-bar/src/components/VersionNumber.tsx":{"bytesInOutput":3247},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":1317}},"bytes":14350}}}
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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18333},"packages/plugins/plugin-status-bar/dist/lib/browser/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":9726}}}