@dxos/plugin-status-bar 0.8.4-main.c4373fc → 0.8.4-main.d05673bc65

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.
Files changed (107) hide show
  1. package/dist/lib/browser/StatusBarActions-63FMNXUX.mjs +10 -0
  2. package/dist/lib/browser/StatusBarActions-63FMNXUX.mjs.map +7 -0
  3. package/dist/lib/browser/StatusBarPanel-KWQL4TTQ.mjs +25 -0
  4. package/dist/lib/browser/StatusBarPanel-KWQL4TTQ.mjs.map +7 -0
  5. package/dist/lib/browser/VersionNumber-NSVK34RP.mjs +9 -0
  6. package/dist/lib/browser/VersionNumber-NSVK34RP.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-CBR3FWPA.mjs +49 -0
  8. package/dist/lib/browser/chunk-CBR3FWPA.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-DJN2GTOY.mjs +16 -0
  10. package/dist/lib/browser/chunk-DJN2GTOY.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-MAM2WQN4.mjs +75 -0
  12. package/dist/lib/browser/chunk-MAM2WQN4.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-WUIMMP5N.mjs +77 -0
  14. package/dist/lib/browser/chunk-WUIMMP5N.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +15 -25
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/react-surface-ZVKPLSAI.mjs +45 -0
  19. package/dist/lib/browser/react-surface-ZVKPLSAI.mjs.map +7 -0
  20. package/dist/lib/node-esm/StatusBarActions-LI4FUZ4F.mjs +11 -0
  21. package/dist/lib/node-esm/StatusBarActions-LI4FUZ4F.mjs.map +7 -0
  22. package/dist/lib/node-esm/StatusBarPanel-O22JVKD4.mjs +26 -0
  23. package/dist/lib/node-esm/StatusBarPanel-O22JVKD4.mjs.map +7 -0
  24. package/dist/lib/node-esm/VersionNumber-6PD7SUMF.mjs +10 -0
  25. package/dist/lib/node-esm/VersionNumber-6PD7SUMF.mjs.map +7 -0
  26. package/dist/lib/node-esm/chunk-5H2TCCFW.mjs +18 -0
  27. package/dist/lib/node-esm/chunk-5H2TCCFW.mjs.map +7 -0
  28. package/dist/lib/node-esm/chunk-7KTRYBWS.mjs +78 -0
  29. package/dist/lib/node-esm/chunk-7KTRYBWS.mjs.map +7 -0
  30. package/dist/lib/node-esm/chunk-B4UMHTV6.mjs +51 -0
  31. package/dist/lib/node-esm/chunk-B4UMHTV6.mjs.map +7 -0
  32. package/dist/lib/node-esm/chunk-YVIPBYHG.mjs +76 -0
  33. package/dist/lib/node-esm/chunk-YVIPBYHG.mjs.map +7 -0
  34. package/dist/lib/node-esm/index.mjs +15 -25
  35. package/dist/lib/node-esm/index.mjs.map +4 -4
  36. package/dist/lib/node-esm/meta.json +1 -1
  37. package/dist/lib/node-esm/react-surface-QSB537IH.mjs +46 -0
  38. package/dist/lib/node-esm/react-surface-QSB537IH.mjs.map +7 -0
  39. package/dist/types/src/StatusBarPlugin.d.ts +2 -1
  40. package/dist/types/src/StatusBarPlugin.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/index.d.ts +1 -1
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  44. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  46. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  47. package/dist/types/src/components/{StatusBar.d.ts → StatusBar/StatusBar.d.ts} +3 -3
  48. package/dist/types/src/components/StatusBar/StatusBar.d.ts.map +1 -0
  49. package/dist/types/src/components/StatusBar/StatusBar.stories.d.ts.map +1 -0
  50. package/dist/types/src/components/StatusBar/index.d.ts +2 -0
  51. package/dist/types/src/components/StatusBar/index.d.ts.map +1 -0
  52. package/dist/types/src/components/index.d.ts +0 -2
  53. package/dist/types/src/components/index.d.ts.map +1 -1
  54. package/dist/types/src/containers/StatusBarActions/StatusBarActions.d.ts +4 -0
  55. package/dist/types/src/containers/StatusBarActions/StatusBarActions.d.ts.map +1 -0
  56. package/dist/types/src/containers/StatusBarActions/index.d.ts +3 -0
  57. package/dist/types/src/containers/StatusBarActions/index.d.ts.map +1 -0
  58. package/dist/types/src/containers/StatusBarPanel/StatusBarPanel.d.ts +4 -0
  59. package/dist/types/src/containers/StatusBarPanel/StatusBarPanel.d.ts.map +1 -0
  60. package/dist/types/src/containers/StatusBarPanel/index.d.ts +3 -0
  61. package/dist/types/src/containers/StatusBarPanel/index.d.ts.map +1 -0
  62. package/dist/types/src/containers/VersionNumber/VersionNumber.d.ts +4 -0
  63. package/dist/types/src/containers/VersionNumber/VersionNumber.d.ts.map +1 -0
  64. package/dist/types/src/containers/VersionNumber/index.d.ts +3 -0
  65. package/dist/types/src/containers/VersionNumber/index.d.ts.map +1 -0
  66. package/dist/types/src/containers/index.d.ts +5 -0
  67. package/dist/types/src/containers/index.d.ts.map +1 -0
  68. package/dist/types/src/meta.d.ts +2 -2
  69. package/dist/types/src/meta.d.ts.map +1 -1
  70. package/dist/types/src/translations.d.ts +1 -1
  71. package/dist/types/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +30 -25
  73. package/src/StatusBarPlugin.ts +7 -13
  74. package/src/capabilities/index.ts +1 -3
  75. package/src/capabilities/react-surface/index.ts +7 -0
  76. package/src/capabilities/react-surface/react-surface.tsx +39 -0
  77. package/src/components/{StatusBar.stories.tsx → StatusBar/StatusBar.stories.tsx} +3 -3
  78. package/src/components/{StatusBar.tsx → StatusBar/StatusBar.tsx} +4 -4
  79. package/src/components/StatusBar/index.ts +5 -0
  80. package/src/components/index.ts +0 -2
  81. package/src/{components/StatusBarPanel.tsx → containers/StatusBarActions/StatusBarActions.tsx} +5 -15
  82. package/src/containers/StatusBarActions/index.ts +7 -0
  83. package/src/containers/StatusBarPanel/StatusBarPanel.tsx +21 -0
  84. package/src/containers/StatusBarPanel/index.ts +7 -0
  85. package/src/{components → containers/VersionNumber}/VersionNumber.tsx +9 -8
  86. package/src/containers/VersionNumber/index.ts +7 -0
  87. package/src/containers/index.ts +9 -0
  88. package/src/meta.ts +8 -4
  89. package/src/translations.ts +1 -1
  90. package/dist/lib/browser/chunk-HUIHCMSX.mjs +0 -247
  91. package/dist/lib/browser/chunk-HUIHCMSX.mjs.map +0 -7
  92. package/dist/lib/browser/react-surface-ARINKCON.mjs +0 -38
  93. package/dist/lib/browser/react-surface-ARINKCON.mjs.map +0 -7
  94. package/dist/lib/node-esm/chunk-ZAYLUK4C.mjs +0 -249
  95. package/dist/lib/node-esm/chunk-ZAYLUK4C.mjs.map +0 -7
  96. package/dist/lib/node-esm/react-surface-SAG2KM2H.mjs +0 -39
  97. package/dist/lib/node-esm/react-surface-SAG2KM2H.mjs.map +0 -7
  98. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  99. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  100. package/dist/types/src/components/StatusBar.d.ts.map +0 -1
  101. package/dist/types/src/components/StatusBar.stories.d.ts.map +0 -1
  102. package/dist/types/src/components/StatusBarPanel.d.ts +0 -4
  103. package/dist/types/src/components/StatusBarPanel.d.ts.map +0 -1
  104. package/dist/types/src/components/VersionNumber.d.ts +0 -3
  105. package/dist/types/src/components/VersionNumber.d.ts.map +0 -1
  106. package/src/capabilities/react-surface.tsx +0 -34
  107. /package/dist/types/src/components/{StatusBar.stories.d.ts → StatusBar/StatusBar.stories.d.ts} +0 -0
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/plugin-status-bar",
3
- "version": "0.8.4-main.c4373fc",
3
+ "version": "0.8.4-main.d05673bc65",
4
4
  "description": "Status bar plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
@@ -25,37 +29,38 @@
25
29
  "src"
26
30
  ],
27
31
  "dependencies": {
28
- "@fluentui/react-tabster": "^9.24.2",
29
- "@preact-signals/safe-react": "^0.9.0",
30
- "@preact/signals-core": "^1.12.1",
32
+ "@fluentui/react-tabster": "9.26.11",
31
33
  "@radix-ui/react-slot": "1.1.2",
32
34
  "date-fns": "^3.3.1",
33
- "effect": "3.18.3",
35
+ "effect": "3.19.16",
34
36
  "react-resize-detector": "^11.0.1",
35
- "@dxos/async": "0.8.4-main.c4373fc",
36
- "@dxos/app-framework": "0.8.4-main.c4373fc",
37
- "@dxos/plugin-observability": "0.8.4-main.c4373fc",
38
- "@dxos/echo": "0.8.4-main.c4373fc",
39
- "@dxos/react-ui-form": "0.8.4-main.c4373fc",
40
- "@dxos/schema": "0.8.4-main.c4373fc",
41
- "@dxos/react-client": "0.8.4-main.c4373fc"
37
+ "@dxos/app-framework": "0.8.4-main.d05673bc65",
38
+ "@dxos/async": "0.8.4-main.d05673bc65",
39
+ "@dxos/app-toolkit": "0.8.4-main.d05673bc65",
40
+ "@dxos/operation": "0.8.4-main.d05673bc65",
41
+ "@dxos/react-client": "0.8.4-main.d05673bc65",
42
+ "@dxos/plugin-observability": "0.8.4-main.d05673bc65",
43
+ "@dxos/schema": "0.8.4-main.d05673bc65",
44
+ "@dxos/util": "0.8.4-main.d05673bc65",
45
+ "@dxos/react-ui-form": "0.8.4-main.d05673bc65",
46
+ "@dxos/echo": "0.8.4-main.d05673bc65"
42
47
  },
43
48
  "devDependencies": {
44
- "@types/react": "~19.2.2",
45
- "@types/react-dom": "~19.2.1",
46
- "react": "~19.2.0",
47
- "react-dom": "~19.2.0",
48
- "vite": "7.1.9",
49
- "@dxos/react-ui": "0.8.4-main.c4373fc",
50
- "@dxos/storybook-utils": "0.8.4-main.c4373fc",
51
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc"
49
+ "@types/react": "~19.2.7",
50
+ "@types/react-dom": "~19.2.3",
51
+ "react": "~19.2.3",
52
+ "react-dom": "~19.2.3",
53
+ "vite": "^7.1.11",
54
+ "@dxos/react-ui": "0.8.4-main.d05673bc65",
55
+ "@dxos/ui-theme": "0.8.4-main.d05673bc65",
56
+ "@dxos/storybook-utils": "0.8.4-main.d05673bc65"
52
57
  },
53
58
  "peerDependencies": {
54
- "effect": "^3.13.3",
55
- "react": "^19.0.0",
56
- "react-dom": "^19.0.0",
57
- "@dxos/react-ui": "0.8.4-main.c4373fc",
58
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc"
59
+ "effect": "3.19.16",
60
+ "react": "~19.2.3",
61
+ "react-dom": "~19.2.3",
62
+ "@dxos/ui-theme": "0.8.4-main.d05673bc65",
63
+ "@dxos/react-ui": "0.8.4-main.d05673bc65"
59
64
  },
60
65
  "publishConfig": {
61
66
  "access": "public"
@@ -2,21 +2,15 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
8
  import { ReactSurface } from './capabilities';
8
9
  import { meta } from './meta';
9
10
  import { translations } from './translations';
10
11
 
11
- export const StatusBarPlugin = definePlugin(meta, () => [
12
- defineModule({
13
- id: `${meta.id}/module/translations`,
14
- activatesOn: Events.SetupTranslations,
15
- activate: () => contributes(Capabilities.Translations, translations),
16
- }),
17
- defineModule({
18
- id: `${meta.id}/module/react-surface`,
19
- activatesOn: Events.SetupReactSurface,
20
- activate: ReactSurface,
21
- }),
22
- ]);
12
+ export const StatusBarPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
14
+ AppPlugin.addTranslationsModule({ translations }),
15
+ Plugin.make,
16
+ );
@@ -2,6 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const ReactSurface = lazy(() => import('./react-surface'));
5
+ export * from './react-surface';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,39 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+
11
+ import { StatusBarActions, StatusBarPanel, VersionNumber } from '../../containers';
12
+ import { meta } from '../../meta';
13
+
14
+ export default Capability.makeModule(() =>
15
+ Effect.succeed(
16
+ Capability.contributes(Capabilities.ReactSurface, [
17
+ Surface.create({
18
+ id: `${meta.id}.status-bar`,
19
+ role: 'status-bar',
20
+ component: () => <StatusBarPanel />,
21
+ }),
22
+ Surface.create({
23
+ id: `${meta.id}.status-bar--r0-footer`,
24
+ role: 'status-bar--r0-footer',
25
+ component: () => <Surface.Surface role='status' />,
26
+ }),
27
+ Surface.create({
28
+ id: `${meta.id}.status-bar--r1-footer`,
29
+ role: 'status-bar--r1-footer',
30
+ component: () => <StatusBarActions />,
31
+ }),
32
+ Surface.create({
33
+ id: `${meta.id}.header-end`,
34
+ role: 'header-end',
35
+ component: () => <VersionNumber />,
36
+ }),
37
+ ]),
38
+ ),
39
+ );
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  import { Icon } from '@dxos/react-ui';
9
9
  import { withTheme } from '@dxos/react-ui/testing';
10
10
 
11
- import { StatusBar } from './StatusBar';
11
+ import { StatusBar } from './index';
12
12
 
13
13
  export const DefaultStory = () => (
14
14
  <div>
@@ -32,10 +32,10 @@ export const DefaultStory = () => (
32
32
  );
33
33
 
34
34
  const meta = {
35
- title: 'plugins/plugin-status/StatusBar',
35
+ title: 'plugins/plugin-status-bar/components/StatusBar',
36
36
  component: StatusBar as any,
37
37
  render: DefaultStory,
38
- decorators: [withTheme],
38
+ decorators: [withTheme()],
39
39
  } satisfies Meta<typeof StatusBar>;
40
40
 
41
41
  export default meta;
@@ -6,7 +6,7 @@ import { Slot } from '@radix-ui/react-slot';
6
6
  import React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode, forwardRef } from 'react';
7
7
 
8
8
  import { type ThemedClassName } from '@dxos/react-ui';
9
- import { mx } from '@dxos/react-ui-theme';
9
+ import { mx } from '@dxos/ui-theme';
10
10
 
11
11
  type StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;
12
12
 
@@ -21,9 +21,9 @@ type StatusBarButtonProps = ThemedClassName<ComponentPropsWithRef<'button'> & {
21
21
  const StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(
22
22
  ({ classNames, children, asChild, ...props }, forwardedRef) => {
23
23
  const classes = mx(
24
- 'flex items-center justify-center gap-2 p-1 px-2 rounded-sm',
24
+ 'flex items-center justify-center gap-2 p-1 px-2 rounded-xs',
25
25
  'select-none cursor-pointer dx-focus-ring text-description text-xs',
26
- 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',
26
+ 'hover:bg-neutral-100 active:bg-neutral-200 dark:hover:bg-neutral-700 dark:active:bg-neutral-600',
27
27
  classNames,
28
28
  );
29
29
 
@@ -47,7 +47,7 @@ const StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(
47
47
  ({ classNames, children, ...props }, forwardedRef) => (
48
48
  <div
49
49
  role='menuitem'
50
- className={mx('flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}
50
+ className={mx('flex items-center justify-center gap-2 p-1 px-2 rounded-xs select-none', classNames)}
51
51
  ref={forwardedRef}
52
52
  {...props}
53
53
  >
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './StatusBar';
@@ -3,5 +3,3 @@
3
3
  //
4
4
 
5
5
  export * from './StatusBar';
6
- export * from './StatusBarPanel';
7
- export * from './VersionNumber';
@@ -4,16 +4,16 @@
4
4
 
5
5
  import React, { useState } from 'react';
6
6
 
7
- import { Surface } from '@dxos/app-framework';
8
7
  import { useConfig } from '@dxos/react-client';
9
8
  import { Icon, Popover, useTranslation } from '@dxos/react-ui';
10
9
 
11
- import { meta } from '../meta';
10
+ import { StatusBar } from '../../components';
11
+ import { meta } from '../../meta';
12
+ import VersionNumber from '../VersionNumber';
12
13
 
13
- import { StatusBar } from './StatusBar';
14
- import { VersionNumber } from './VersionNumber';
14
+ export type StatusBarActionsProps = {};
15
15
 
16
- export const StatusBarActions = () => {
16
+ export const StatusBarActions = (_props: StatusBarActionsProps) => {
17
17
  const { t } = useTranslation(meta.id);
18
18
  const [open, setOpen] = useState(false);
19
19
 
@@ -37,16 +37,6 @@ export const StatusBarActions = () => {
37
37
  );
38
38
  };
39
39
 
40
- export const StatusBarPanel = () => {
41
- return (
42
- <>
43
- <StatusBarActions />
44
- <span role='separator' className='grow' />
45
- <Surface role='status' />
46
- </>
47
- );
48
- };
49
-
50
40
  const ENV_LABELS: Record<string, string> = {
51
41
  'edge-dev': 'Dev',
52
42
  'edge-main': 'Main',
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { StatusBarActions } from './StatusBarActions';
6
+
7
+ export default StatusBarActions;
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework/ui';
8
+
9
+ import StatusBarActionsDefault from '../StatusBarActions';
10
+
11
+ export type StatusBarPanelProps = {};
12
+
13
+ export const StatusBarPanel = (_props: StatusBarPanelProps) => {
14
+ return (
15
+ <>
16
+ <StatusBarActionsDefault />
17
+ <span role='separator' className='grow' />
18
+ <Surface.Surface role='status' />
19
+ </>
20
+ );
21
+ };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { StatusBarPanel } from './StatusBarPanel';
6
+
7
+ export default StatusBarPanel;
@@ -8,15 +8,16 @@ import React from 'react';
8
8
  import { useConfig } from '@dxos/react-client';
9
9
  import { Icon, Link, Message, Popover, Trans, useTranslation } from '@dxos/react-ui';
10
10
 
11
- import { meta } from '../meta';
11
+ import { StatusBar } from '../../components';
12
+ import { meta } from '../../meta';
12
13
 
13
- import { StatusBar } from './StatusBar';
14
+ export type VersionNumberProps = {};
14
15
 
15
16
  const repo = 'https://github.com/dxos/dxos';
16
17
 
17
18
  const VERSION_REGEX = /([\d.]+)/;
18
19
 
19
- export const VersionNumber = () => {
20
+ export const VersionNumber = (_props: VersionNumberProps) => {
20
21
  const { t } = useTranslation(meta.id);
21
22
  const config = useConfig();
22
23
  const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
@@ -39,20 +40,20 @@ export const VersionNumber = () => {
39
40
  <Popover.Content
40
41
  side='top'
41
42
  role='message'
42
- classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'
43
+ classNames='z-[12] bg-warning-500 max-w-[min(calc(100vw-16px),40ch)]'
43
44
  >
44
- <Message.Root valence='warning' classNames='rounded-be-none p-5'>
45
+ <Message.Root valence='warning' classNames='rounded-b-none p-5'>
45
46
  <Message.Title>{t('warning title')}</Message.Title>
46
47
  <Message.Content>
47
48
  {t('technology preview message')}
48
49
  <br />
49
50
  <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>
50
51
  {t('learn more label')}
51
- <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />
52
+ <Icon icon='ph--arrow-square-out--bold' classNames='dx-icon-inline ms-1' />
52
53
  </Link>
53
54
  </Message.Content>
54
55
  </Message.Root>
55
- <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>
56
+ <div role='none' className='py-4 px-5 space-b-2 text-base-surface-text'>
56
57
  {timestamp && (
57
58
  <p>
58
59
  {t('released message', {
@@ -61,7 +62,7 @@ export const VersionNumber = () => {
61
62
  <br />
62
63
  <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>
63
64
  {t('see release label')}
64
- <Icon icon='ph--arrow-square-out--bold' classNames='inline mis-1' />
65
+ <Icon icon='ph--arrow-square-out--bold' classNames='dx-icon-inline ms-1' />
65
66
  </Link>
66
67
  </p>
67
68
  )}
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { VersionNumber } from './VersionNumber';
6
+
7
+ export default VersionNumber;
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type ComponentType, lazy } from 'react';
6
+
7
+ export const StatusBarActions: ComponentType<any> = lazy(() => import('./StatusBarActions'));
8
+ export const StatusBarPanel: ComponentType<any> = lazy(() => import('./StatusBarPanel'));
9
+ export const VersionNumber: ComponentType<any> = lazy(() => import('./VersionNumber'));
package/src/meta.ts CHANGED
@@ -2,11 +2,15 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
+ import { trim } from '@dxos/util';
6
7
 
7
- export const meta: PluginMeta = {
8
- id: 'dxos.org/plugin/status-bar',
8
+ export const meta: Plugin.Meta = {
9
+ id: 'org.dxos.plugin.status-bar',
9
10
  name: 'Status Bar',
10
- description: 'Display a bar with status and actions.',
11
+ description: trim`
12
+ Persistent bottom bar displaying workspace status information and quick actions.
13
+ Access connection state, notifications, and common commands without leaving your current context.
14
+ `,
11
15
  icon: 'ph--info--regular',
12
16
  };
@@ -14,7 +14,7 @@ export const translations = [
14
14
  'warning title': 'WARNING',
15
15
  'technology preview message': 'Composer is currently in beta.',
16
16
  'learn more label': 'Learn more',
17
- 'released message': 'This version released {{released}}.',
17
+ 'released message': 'This version was released {{released}}.',
18
18
  'see release label': 'See release on GitHub',
19
19
  'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',
20
20
  'discord label': 'Discord',
@@ -1,247 +0,0 @@
1
- // src/components/StatusBar.tsx
2
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import React, { forwardRef } from "react";
5
- import { mx } from "@dxos/react-ui-theme";
6
- var StatusBarText = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => {
7
- var _effect = _useSignals();
8
- try {
9
- return /* @__PURE__ */ React.createElement("span", {
10
- className: mx(classNames),
11
- ref: forwardedRef
12
- }, children);
13
- } finally {
14
- _effect.f();
15
- }
16
- });
17
- var StatusBarButton = /* @__PURE__ */ forwardRef(({ classNames, children, asChild, ...props }, forwardedRef) => {
18
- var _effect = _useSignals();
19
- try {
20
- const classes = 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);
21
- return asChild ? /* @__PURE__ */ React.createElement(Slot, {
22
- role: "button",
23
- ref: forwardedRef,
24
- className: classes,
25
- ...props
26
- }, children) : /* @__PURE__ */ React.createElement("button", {
27
- className: classes,
28
- ref: forwardedRef,
29
- ...props
30
- }, children);
31
- } finally {
32
- _effect.f();
33
- }
34
- });
35
- var StatusBarItem = /* @__PURE__ */ forwardRef(({ classNames, children, ...props }, forwardedRef) => {
36
- var _effect = _useSignals();
37
- try {
38
- return /* @__PURE__ */ React.createElement("div", {
39
- role: "menuitem",
40
- className: mx("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
41
- ref: forwardedRef,
42
- ...props
43
- }, children);
44
- } finally {
45
- _effect.f();
46
- }
47
- });
48
- var StartContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => {
49
- var _effect = _useSignals();
50
- try {
51
- return /* @__PURE__ */ React.createElement("div", {
52
- role: "none",
53
- className: mx("flex-grow flex items-center space-x-2", classNames),
54
- ref: forwardedRef
55
- }, children);
56
- } finally {
57
- _effect.f();
58
- }
59
- });
60
- var EndContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => {
61
- var _effect = _useSignals();
62
- try {
63
- return /* @__PURE__ */ React.createElement("div", {
64
- role: "none",
65
- className: mx("flex-grow flex items-center justify-end", classNames),
66
- ref: forwardedRef
67
- }, children);
68
- } finally {
69
- _effect.f();
70
- }
71
- });
72
- var StatusBar = {
73
- Text: StatusBarText,
74
- Item: StatusBarItem,
75
- Button: StatusBarButton,
76
- StartContent,
77
- EndContent
78
- };
79
-
80
- // src/meta.ts
81
- var meta = {
82
- id: "dxos.org/plugin/status-bar",
83
- name: "Status Bar",
84
- description: "Display a bar with status and actions.",
85
- icon: "ph--info--regular"
86
- };
87
-
88
- // src/components/VersionNumber.tsx
89
- import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
90
- import { formatDistance } from "date-fns/formatDistance";
91
- import React2 from "react";
92
- import { useConfig } from "@dxos/react-client";
93
- import { Icon, Link, Message, Popover, Trans, useTranslation } from "@dxos/react-ui";
94
- var repo = "https://github.com/dxos/dxos";
95
- var VERSION_REGEX = /([\d.]+)/;
96
- var VersionNumber = () => {
97
- var _effect = _useSignals2();
98
- try {
99
- const { t } = useTranslation(meta.id);
100
- const config = useConfig();
101
- const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
102
- const [_, v] = version?.match(VERSION_REGEX) ?? [];
103
- const isLabs = config.values.runtime?.app?.env?.DX_LABS;
104
- const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
105
- const previewUrl = "https://docs.dxos.org/composer#technology-preview";
106
- return /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
107
- asChild: true
108
- }, /* @__PURE__ */ React2.createElement(StatusBar.Button, {
109
- classNames: "text-xs"
110
- }, isLabs ? version : v)), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
111
- side: "top",
112
- role: "message",
113
- classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
114
- }, /* @__PURE__ */ React2.createElement(Message.Root, {
115
- valence: "warning",
116
- classNames: "rounded-be-none p-5"
117
- }, /* @__PURE__ */ React2.createElement(Message.Title, null, t("warning title")), /* @__PURE__ */ React2.createElement(Message.Content, null, t("technology preview message"), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
118
- href: previewUrl,
119
- target: "_blank",
120
- rel: "noreferrer",
121
- variant: "neutral"
122
- }, t("learn more label"), /* @__PURE__ */ React2.createElement(Icon, {
123
- icon: "ph--arrow-square-out--bold",
124
- classNames: "inline mis-1"
125
- })))), /* @__PURE__ */ React2.createElement("div", {
126
- role: "none",
127
- className: "plb-4 pli-5 space-b-2 text-baseText"
128
- }, timestamp && /* @__PURE__ */ React2.createElement("p", null, t("released message", {
129
- released: formatDistance(new Date(timestamp), /* @__PURE__ */ new Date(), {
130
- addSuffix: true
131
- })
132
- }), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
133
- href: releaseUrl,
134
- target: "_blank",
135
- rel: "noreferrer",
136
- variant: "neutral"
137
- }, t("see release label"), /* @__PURE__ */ React2.createElement(Icon, {
138
- icon: "ph--arrow-square-out--bold",
139
- classNames: "inline mis-1"
140
- }))), /* @__PURE__ */ React2.createElement("p", null, /* @__PURE__ */ React2.createElement(Trans, {
141
- t,
142
- i18nKey: "powered by dxos message",
143
- components: {
144
- dxos: /* @__PURE__ */ React2.createElement(Link, {
145
- href: "https://dxos.org",
146
- target: "_blank",
147
- rel: "noreferrer",
148
- variant: "neutral"
149
- })
150
- }
151
- }))), /* @__PURE__ */ React2.createElement(Popover.Arrow, null))));
152
- } finally {
153
- _effect.f();
154
- }
155
- };
156
-
157
- // src/components/StatusBarPanel.tsx
158
- import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
159
- import React3, { useState } from "react";
160
- import { Surface } from "@dxos/app-framework";
161
- import { useConfig as useConfig2 } from "@dxos/react-client";
162
- import { Icon as Icon2, Popover as Popover2, useTranslation as useTranslation2 } from "@dxos/react-ui";
163
- var StatusBarActions = () => {
164
- var _effect = _useSignals3();
165
- try {
166
- const { t } = useTranslation2(meta.id);
167
- const [open, setOpen] = useState(false);
168
- return /* @__PURE__ */ React3.createElement(Popover2.Root, {
169
- open,
170
- onOpenChange: setOpen
171
- }, /* @__PURE__ */ React3.createElement(EnvironmentLabel, null), /* @__PURE__ */ React3.createElement(VersionNumber, null), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
172
- asChild: true
173
- }, /* @__PURE__ */ React3.createElement("a", {
174
- href: "https://dxos.org/discord",
175
- target: "_blank",
176
- rel: "noopener noreferrer"
177
- }, /* @__PURE__ */ React3.createElement(Icon2, {
178
- icon: "ph--discord-logo--regular",
179
- size: 4
180
- }), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
181
- classNames: "hidden sm:block"
182
- }, t("discord label")))), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
183
- asChild: true
184
- }, /* @__PURE__ */ React3.createElement("a", {
185
- href: "https://github.com/dxos/dxos",
186
- target: "_blank",
187
- rel: "noopener noreferrer"
188
- }, /* @__PURE__ */ React3.createElement(Icon2, {
189
- icon: "ph--github-logo--regular",
190
- size: 4
191
- }), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
192
- classNames: "hidden sm:block"
193
- }, t("github label")))));
194
- } finally {
195
- _effect.f();
196
- }
197
- };
198
- var StatusBarPanel = () => {
199
- var _effect = _useSignals3();
200
- try {
201
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBarActions, null), /* @__PURE__ */ React3.createElement("span", {
202
- role: "separator",
203
- className: "grow"
204
- }), /* @__PURE__ */ React3.createElement(Surface, {
205
- role: "status"
206
- }));
207
- } finally {
208
- _effect.f();
209
- }
210
- };
211
- var ENV_LABELS = {
212
- "edge-dev": "Dev",
213
- "edge-main": "Main",
214
- "edge-labs": "Labs",
215
- "edge-production": "Production"
216
- };
217
- var EnvironmentLabel = () => {
218
- var _effect = _useSignals3();
219
- try {
220
- const config = useConfig2();
221
- const edgeUrl = config.values.runtime?.services?.edge?.url;
222
- if (!edgeUrl) {
223
- return null;
224
- }
225
- const part = new URL(edgeUrl).host.split(".")[0];
226
- const edgeEnv = ENV_LABELS[part];
227
- if (!edgeEnv) {
228
- return null;
229
- }
230
- return /* @__PURE__ */ React3.createElement(StatusBar.Item, null, /* @__PURE__ */ React3.createElement(StatusBar.Text, {
231
- classNames: "text-xs text-subdued border border-separator rounded-full px-1"
232
- }, /* @__PURE__ */ React3.createElement("span", {
233
- title: edgeEnv
234
- }, edgeEnv[0])));
235
- } finally {
236
- _effect.f();
237
- }
238
- };
239
-
240
- export {
241
- StatusBar,
242
- meta,
243
- VersionNumber,
244
- StatusBarActions,
245
- StatusBarPanel
246
- };
247
- //# sourceMappingURL=chunk-HUIHCMSX.mjs.map