@dxos/plugin-status-bar 0.7.5-main.9d2a38b → 0.7.5-main.e94eead

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.
@@ -30,12 +30,12 @@ var node_exports = {};
30
30
  __export(node_exports, {
31
31
  STATUS_BAR_PLUGIN: () => STATUS_BAR_PLUGIN,
32
32
  StatusBar: () => StatusBar,
33
+ StatusBarActions: () => StatusBarActions,
33
34
  StatusBarPanel: () => StatusBarPanel,
34
35
  StatusBarPlugin: () => StatusBarPlugin,
35
36
  meta: () => meta
36
37
  });
37
38
  module.exports = __toCommonJS(node_exports);
38
- var import_react_tabster = require("@fluentui/react-tabster");
39
39
  var import_react_slot = require("@radix-ui/react-slot");
40
40
  var import_react = __toESM(require("react"));
41
41
  var import_react_ui_theme = require("@dxos/react-ui-theme");
@@ -49,14 +49,18 @@ var import_types = require("@dxos/plugin-observability/types");
49
49
  var import_react_ui2 = require("@dxos/react-ui");
50
50
  var import_react_ui_form = require("@dxos/react-ui-form");
51
51
  var import_react_ui_theme2 = require("@dxos/react-ui-theme");
52
+ var import_formatDistance = require("date-fns/formatDistance");
52
53
  var import_react5 = __toESM(require("react"));
54
+ var import_react_client = require("@dxos/react-client");
55
+ var import_react_ui3 = require("@dxos/react-ui");
56
+ var import_react6 = __toESM(require("react"));
53
57
  var import_app_framework3 = require("@dxos/app-framework");
54
58
  var StatusBarText = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("span", {
55
59
  className: (0, import_react_ui_theme.mx)(classNames),
56
60
  ref: forwardedRef
57
61
  }, children));
58
62
  var StatusBarButton = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
59
- const classes = (0, import_react_ui_theme.mx)("flex items-center gap-2 p-1 px-2 rounded-sm", "select-none cursor-pointer ch-focus-ring", "hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700", classNames);
63
+ const classes = (0, import_react_ui_theme.mx)("flex items-center justify-center gap-2 p-1 px-2 rounded-sm", "select-none cursor-pointer dx-focus-ring text-description text-xs", "hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700", classNames);
60
64
  return asChild ? /* @__PURE__ */ import_react.default.createElement(import_react_slot.Slot, {
61
65
  role: "button",
62
66
  ref: forwardedRef,
@@ -70,22 +74,10 @@ var StatusBarButton = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames
70
74
  });
71
75
  var StatusBarItem = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
72
76
  role: "menuitem",
73
- className: (0, import_react_ui_theme.mx)("flex items-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
77
+ className: (0, import_react_ui_theme.mx)("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
74
78
  ref: forwardedRef,
75
79
  ...props
76
80
  }, children));
77
- var StatusBarContainer = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => {
78
- const groupAttrs = (0, import_react_tabster.useFocusableGroup)({
79
- tabBehavior: "limited"
80
- });
81
- return /* @__PURE__ */ import_react.default.createElement("div", {
82
- role: "menubar",
83
- tabIndex: 0,
84
- ...groupAttrs,
85
- className: (0, import_react_ui_theme.mx)("bs-[--statusbar-size] flex justify-end items-center gap-2 bg-base text-description text-lg pointer-fine:text-xs ch-focus-ring-inset", classNames),
86
- ref: forwardedRef
87
- }, children);
88
- });
89
81
  var StartContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
90
82
  role: "none",
91
83
  className: (0, import_react_ui_theme.mx)("flex-grow flex items-center space-x-2", classNames),
@@ -97,7 +89,6 @@ var EndContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, chi
97
89
  ref: forwardedRef
98
90
  }, children));
99
91
  var StatusBar = {
100
- Container: StatusBarContainer,
101
92
  Text: StatusBarText,
102
93
  Item: StatusBarItem,
103
94
  Button: StatusBarButton,
@@ -123,8 +114,16 @@ var translations = {
123
114
  "email input label": "Email",
124
115
  "email input placeholder": "hello@example.com",
125
116
  "feedback text area label": "Feedback",
126
- "feedback text area placeholder": "Found a bug? Have a suggestion? Let us know!",
127
- "send feedback label": "Send 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"
128
127
  })
129
128
  };
130
129
  var translations_default = [
@@ -209,25 +208,82 @@ var FeedbackForm = ({ onClose }) => {
209
208
  className: (0, import_react_ui_theme2.getSize)(5)
210
209
  })))));
211
210
  };
212
- var StatusBarPanel = () => {
211
+ var repo = "https://github.com/dxos/dxos";
212
+ var VERSION_REGEX = /([\d.]+)/;
213
+ var VersionNumber = () => {
214
+ const config = (0, import_react_client.useConfig)();
215
+ const { t } = (0, import_react_ui3.useTranslation)(STATUS_BAR_PLUGIN);
216
+ const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
217
+ const [_, v] = version?.match(VERSION_REGEX) ?? [];
218
+ const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
219
+ 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, {
221
+ asChild: true
222
+ }, /* @__PURE__ */ import_react5.default.createElement(StatusBar.Button, {
223
+ 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, {
225
+ side: "top",
226
+ role: "message",
227
+ classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
228
+ }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Message.Root, {
229
+ valence: "warning",
230
+ 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, {
232
+ icon: "ph--warning--duotone",
233
+ size: 6,
234
+ 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, {
236
+ href: previewUrl,
237
+ target: "_blank",
238
+ rel: "noreferrer",
239
+ variant: "neutral"
240
+ }, t("learn more label"), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Icon, {
241
+ icon: "ph--arrow-square-out--bold",
242
+ classNames: "inline mis-1"
243
+ })))), /* @__PURE__ */ import_react5.default.createElement("div", {
244
+ role: "none",
245
+ className: "plb-4 pli-5 space-b-2 text-baseText"
246
+ }, timestamp && /* @__PURE__ */ import_react5.default.createElement("p", null, t("released message", {
247
+ released: (0, import_formatDistance.formatDistance)(new Date(timestamp), /* @__PURE__ */ new Date(), {
248
+ addSuffix: true
249
+ })
250
+ }), /* @__PURE__ */ import_react5.default.createElement("br", null), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Link, {
251
+ href: releaseUrl,
252
+ target: "_blank",
253
+ rel: "noreferrer",
254
+ variant: "neutral"
255
+ }, t("see release label"), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Icon, {
256
+ icon: "ph--arrow-square-out--bold",
257
+ classNames: "inline mis-1"
258
+ }))), /* @__PURE__ */ import_react5.default.createElement("p", null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Trans, {
259
+ t,
260
+ i18nKey: "powered by dxos message",
261
+ components: {
262
+ dxos: /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Link, {
263
+ href: "https://dxos.org",
264
+ target: "_blank",
265
+ rel: "noreferrer",
266
+ variant: "neutral"
267
+ })
268
+ }
269
+ }))), /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Popover.Arrow, null))));
270
+ };
271
+ var StatusBarActions = () => {
272
+ const { t } = (0, import_react_ui.useTranslation)(STATUS_BAR_PLUGIN);
213
273
  const [open, setOpen] = (0, import_react2.useState)(false);
214
274
  return /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Root, {
215
275
  open,
216
276
  onOpenChange: setOpen
217
- }, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Container, null, /* @__PURE__ */ import_react2.default.createElement(StatusBar.EndContent, null, /* @__PURE__ */ import_react2.default.createElement(import_app_framework.Surface, {
218
- role: "status"
219
- }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Trigger, {
277
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Trigger, {
220
278
  asChild: true
221
279
  }, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
222
- "aria-label": "Give feedback about composer",
223
280
  "data-joyride": "welcome/feedback"
224
281
  }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
225
282
  icon: "ph--paper-plane-tilt--regular",
226
283
  size: 4
227
284
  }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
228
285
  classNames: "hidden sm:block"
229
- }, "Feedback"))), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
230
- "aria-label": "Open DXOS Discord",
286
+ }, t("feedback label")))), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
231
287
  asChild: true
232
288
  }, /* @__PURE__ */ import_react2.default.createElement("a", {
233
289
  href: "https://dxos.org/discord",
@@ -238,11 +294,19 @@ var StatusBarPanel = () => {
238
294
  size: 4
239
295
  }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
240
296
  classNames: "hidden sm:block"
241
- }, "Discord"))))), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Content, {
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, {
242
298
  classNames: "shadow-lg"
243
299
  }, /* @__PURE__ */ import_react2.default.createElement(FeedbackForm, {
244
300
  onClose: () => setOpen(false)
245
- }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Arrow, null)));
301
+ }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Arrow, null))));
302
+ };
303
+ var StatusBarPanel = () => {
304
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(StatusBarActions, null), /* @__PURE__ */ import_react2.default.createElement("span", {
305
+ role: "separator",
306
+ className: "grow"
307
+ }), /* @__PURE__ */ import_react2.default.createElement(import_app_framework.Surface, {
308
+ role: "status"
309
+ }));
246
310
  };
247
311
  var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
248
312
  (0, import_app_framework3.defineModule)({
@@ -252,17 +316,29 @@ var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
252
316
  }),
253
317
  (0, import_app_framework3.defineModule)({
254
318
  id: `${meta.id}/module/react-surface`,
255
- activatesOn: import_app_framework3.Events.Startup,
319
+ activatesOn: import_app_framework3.Events.SetupReactSurface,
256
320
  activate: () => (0, import_app_framework3.contributes)(import_app_framework3.Capabilities.ReactSurface, [
257
321
  (0, import_app_framework3.createSurface)({
258
322
  id: meta.id,
259
323
  role: "status-bar",
260
- component: () => /* @__PURE__ */ import_react5.default.createElement(StatusBarPanel, null)
324
+ component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarPanel, null)
261
325
  }),
262
326
  (0, import_app_framework3.createSurface)({
263
327
  id: meta.id,
264
- role: "status-bar--sidebar-footer",
265
- component: () => /* @__PURE__ */ import_react5.default.createElement(StatusBarPanel, null)
328
+ role: "status-bar--r0-footer",
329
+ component: () => /* @__PURE__ */ import_react6.default.createElement(import_app_framework3.Surface, {
330
+ role: "status"
331
+ })
332
+ }),
333
+ (0, import_app_framework3.createSurface)({
334
+ id: meta.id,
335
+ role: "status-bar--r1-footer",
336
+ component: () => /* @__PURE__ */ import_react6.default.createElement(StatusBarActions, null)
337
+ }),
338
+ (0, import_app_framework3.createSurface)({
339
+ id: `${STATUS_BAR_PLUGIN}/header-end`,
340
+ role: "header-end",
341
+ component: () => /* @__PURE__ */ import_react6.default.createElement(VersionNumber, null)
266
342
  })
267
343
  ])
268
344
  })
@@ -271,6 +347,7 @@ var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
271
347
  0 && (module.exports = {
272
348
  STATUS_BAR_PLUGIN,
273
349
  StatusBar,
350
+ StatusBarActions,
274
351
  StatusBarPanel,
275
352
  StatusBarPlugin,
276
353
  meta
@@ -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/StatusBarPlugin.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { forwardRef, type HTMLAttributes, 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<{ children: ReactNode; asChild?: boolean }> &\n HTMLAttributes<HTMLButtonElement>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer ch-focus-ring',\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<{ children: ReactNode }> & HTMLAttributes<HTMLDivElement>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-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 StatusBarContainerProps = ThemedClassName<{ children: ReactNode }>;\n\n// TODO(zan): tabable group with tabster.\nconst StatusBarContainer = forwardRef<HTMLDivElement, StatusBarContainerProps>(\n ({ classNames, children }, forwardedRef) => {\n const groupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='menubar'\n tabIndex={0}\n {...groupAttrs}\n className={mx(\n 'bs-[--statusbar-size] flex justify-end items-center gap-2 bg-base text-description text-lg pointer-fine:text-xs ch-focus-ring-inset',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\ntype StartContentProps = ThemedClassName<{ children: ReactNode }>;\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<{ children: ReactNode }>;\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 Container: StatusBarContainer,\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 } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\n\nexport const StatusBarPanel = () => {\n const [open, setOpen] = useState(false);\n\n // TODO(wittjosiah): Factor out feedback and discord buttons.\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <StatusBar.Container>\n <StatusBar.EndContent>\n <Surface role='status' />\n <Popover.Trigger asChild>\n <StatusBar.Button aria-label='Give feedback about composer' data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>Feedback</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button aria-label='Open DXOS Discord' 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'>Discord</StatusBar.Text>\n </a>\n </StatusBar.Button>\n </StatusBar.EndContent>\n </StatusBar.Container>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onClose={() => setOpen(false)} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Root>\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\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': 'Found a bug? Have a suggestion? Let us know!',\n 'send feedback label': 'Send Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from '@dxos/app-framework';\n\nimport { StatusBarPanel } from './components';\nimport { meta } 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.Startup,\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--sidebar-footer',\n component: () => <StatusBarPanel />,\n }),\n ]),\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAkC;AAClC,wBAAqB;AACrB,mBAAuE;AAGvE,4BAAmB;ACLnB,IAAAA,gBAAgC;AAEhC,2BAAwB;AACxB,sBAA8B;ACH9B,IAAAA,gBAAkC;AAClC,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAkD;AAClD,mBAAkD;AAClD,IAAAC,mBAAuD;AACvD,2BAAwB;AACxB,IAAAC,yBAAwB;AGPxB,IAAAH,gBAAkB;AAElB,IAAAC,wBAA6F;ALO7F,IAAMG,gBAAgBC,6CAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAC/F,6BAAAC,QAAA,cAACC,QAAAA;EAAKC,eAAWC,0B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AAA;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", "StatusBarContainer", "groupAttrs", "useFocusableGroup", "tabBehavior", "tabIndex", "StartContent", "EndContent", "StatusBar", "Container", "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", "StatusBarPanel", "open", "setOpen", "useState", "onOpenChange", "Surface", "Trigger", "aria-label", "data-joyride", "Icon", "size", "a", "href", "target", "rel", "Content", "Arrow", "StatusBarPlugin", "definePlugin", "defineModule", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "Startup", "ReactSurface", "createSurface", "component"]
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": ";;;;;;;;;;;;;;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,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"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytes":9929,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytes":1289,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":3385,"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/StatusBarPanel.tsx":{"bytes":6010,"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"}],"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":4367,"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/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":19924},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/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":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["STATUS_BAR_PLUGIN","StatusBar","StatusBarPanel","StatusBarPlugin","meta"],"entryPoint":"packages/plugins/plugin-status-bar/src/index.ts","inputs":{"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytesInOutput":2478},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":1692},"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":570},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":897}},"bytes":10464}}}
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}}}