@dxos/plugin-status-bar 0.8.3 → 0.8.4-main.f9ba587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-NV543FLZ.mjs → chunk-32FBOE6I.mjs} +8 -8
- package/dist/lib/browser/chunk-32FBOE6I.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +24 -26
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-XYQMVXMA.mjs → react-surface-P7CEMQU3.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-4ENEPGOY.mjs → chunk-IQXGCBGU.mjs} +8 -8
- package/dist/lib/node-esm/chunk-IQXGCBGU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -26
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-HZE7P2TS.mjs → react-surface-U7DLJKU6.mjs} +3 -3
- package/dist/types/src/components/StatusBar.stories.d.ts +1 -1
- package/dist/types/src/components/StatusBar.stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +17 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -17
- package/src/StatusBarPlugin.ts +1 -1
- package/src/components/StatusBar.stories.tsx +1 -1
- package/src/components/StatusBarPanel.tsx +3 -3
- package/src/components/VersionNumber.tsx +2 -2
- package/src/translations.ts +22 -42
- package/dist/lib/browser/chunk-NV543FLZ.mjs.map +0 -7
- package/dist/lib/node/chunk-IQ5QWIXI.cjs +0 -280
- package/dist/lib/node/chunk-IQ5QWIXI.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -86
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-BD2WWDVZ.cjs +0 -61
- package/dist/lib/node/react-surface-BD2WWDVZ.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-4ENEPGOY.mjs.map +0 -7
- /package/dist/lib/browser/{react-surface-XYQMVXMA.mjs.map → react-surface-P7CEMQU3.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-HZE7P2TS.mjs.map → react-surface-U7DLJKU6.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-status-bar",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.f9ba587",
|
|
4
4
|
"description": "Status bar plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -29,35 +29,33 @@
|
|
|
29
29
|
"@preact/signals-core": "^1.9.0",
|
|
30
30
|
"@radix-ui/react-slot": "1.1.2",
|
|
31
31
|
"date-fns": "^3.3.1",
|
|
32
|
-
"effect": "3.
|
|
32
|
+
"effect": "3.16.13",
|
|
33
33
|
"react-resize-detector": "^11.0.1",
|
|
34
|
-
"@dxos/app-framework": "0.8.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/echo
|
|
38
|
-
"@dxos/plugin-observability": "0.8.
|
|
39
|
-
"@dxos/react-client": "0.8.
|
|
40
|
-
"@dxos/react-ui-form": "0.8.
|
|
41
|
-
"@dxos/schema": "0.8.
|
|
34
|
+
"@dxos/app-framework": "0.8.4-main.f9ba587",
|
|
35
|
+
"@dxos/echo-schema": "0.8.4-main.f9ba587",
|
|
36
|
+
"@dxos/async": "0.8.4-main.f9ba587",
|
|
37
|
+
"@dxos/echo": "0.8.4-main.f9ba587",
|
|
38
|
+
"@dxos/plugin-observability": "0.8.4-main.f9ba587",
|
|
39
|
+
"@dxos/react-client": "0.8.4-main.f9ba587",
|
|
40
|
+
"@dxos/react-ui-form": "0.8.4-main.f9ba587",
|
|
41
|
+
"@dxos/schema": "0.8.4-main.f9ba587"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
45
44
|
"@types/react": "~18.2.0",
|
|
46
45
|
"@types/react-dom": "~18.2.0",
|
|
47
46
|
"react": "~18.2.0",
|
|
48
47
|
"react-dom": "~18.2.0",
|
|
49
48
|
"vite": "5.4.7",
|
|
50
|
-
"@dxos/react-ui": "0.8.
|
|
51
|
-
"@dxos/react-ui-theme": "0.8.
|
|
52
|
-
"@dxos/storybook-utils": "0.8.
|
|
49
|
+
"@dxos/react-ui": "0.8.4-main.f9ba587",
|
|
50
|
+
"@dxos/react-ui-theme": "0.8.4-main.f9ba587",
|
|
51
|
+
"@dxos/storybook-utils": "0.8.4-main.f9ba587"
|
|
53
52
|
},
|
|
54
53
|
"peerDependencies": {
|
|
55
|
-
"@phosphor-icons/react": "^2.0.5",
|
|
56
54
|
"effect": "^3.13.3",
|
|
57
55
|
"react": "~18.2.0",
|
|
58
56
|
"react-dom": "~18.2.0",
|
|
59
|
-
"@dxos/react-ui": "0.8.
|
|
60
|
-
"@dxos/react-ui-theme": "0.8.
|
|
57
|
+
"@dxos/react-ui": "0.8.4-main.f9ba587",
|
|
58
|
+
"@dxos/react-ui-theme": "0.8.4-main.f9ba587"
|
|
61
59
|
},
|
|
62
60
|
"publishConfig": {
|
|
63
61
|
"access": "public"
|
package/src/StatusBarPlugin.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Capabilities, contributes, defineModule, definePlugin, Events } from '@
|
|
|
6
6
|
|
|
7
7
|
import { ReactSurface } from './capabilities';
|
|
8
8
|
import { meta } from './meta';
|
|
9
|
-
import translations from './translations';
|
|
9
|
+
import { translations } from './translations';
|
|
10
10
|
|
|
11
11
|
export const StatusBarPlugin = () =>
|
|
12
12
|
definePlugin(meta, [
|
|
@@ -10,10 +10,10 @@ import { Icon, Popover, useTranslation } from '@dxos/react-ui';
|
|
|
10
10
|
|
|
11
11
|
import { StatusBar } from './StatusBar';
|
|
12
12
|
import { VersionNumber } from './VersionNumber';
|
|
13
|
-
import {
|
|
13
|
+
import { meta } from '../meta';
|
|
14
14
|
|
|
15
15
|
export const StatusBarActions = () => {
|
|
16
|
-
const { t } = useTranslation(
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
17
|
const [open, setOpen] = useState(false);
|
|
18
18
|
|
|
19
19
|
return (
|
|
@@ -23,7 +23,7 @@ export const StatusBarActions = () => {
|
|
|
23
23
|
<StatusBar.Button asChild>
|
|
24
24
|
<a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>
|
|
25
25
|
<Icon icon='ph--discord-logo--regular' size={4} />
|
|
26
|
-
<StatusBar.Text classNames='hidden sm:block'>{t('discord
|
|
26
|
+
<StatusBar.Text classNames='hidden sm:block'>{t('discord label2')}</StatusBar.Text>
|
|
27
27
|
</a>
|
|
28
28
|
</StatusBar.Button>
|
|
29
29
|
<StatusBar.Button asChild>
|
|
@@ -9,14 +9,14 @@ import { useConfig } from '@dxos/react-client';
|
|
|
9
9
|
import { Link, Message, Popover, Trans, useTranslation, Icon } from '@dxos/react-ui';
|
|
10
10
|
|
|
11
11
|
import { StatusBar } from './StatusBar';
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
13
13
|
|
|
14
14
|
const repo = 'https://github.com/dxos/dxos';
|
|
15
15
|
|
|
16
16
|
const VERSION_REGEX = /([\d.]+)/;
|
|
17
17
|
|
|
18
18
|
export const VersionNumber = () => {
|
|
19
|
-
const { t } = useTranslation(
|
|
19
|
+
const { t } = useTranslation(meta.id);
|
|
20
20
|
const config = useConfig();
|
|
21
21
|
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
22
22
|
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
package/src/translations.ts
CHANGED
|
@@ -2,45 +2,25 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// -- helpers.
|
|
28
|
-
const entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });
|
|
29
|
-
export const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);
|
|
30
|
-
|
|
31
|
-
const translations: Record<Language, TranslationEntry> = {
|
|
32
|
-
'en-US': entry({
|
|
33
|
-
'plugin name': 'Status Bar',
|
|
34
|
-
'warning title': 'WARNING',
|
|
35
|
-
'technology preview message': 'Composer is currently in beta.',
|
|
36
|
-
'learn more label': 'Learn more',
|
|
37
|
-
'released message': 'This version released {{released}}.',
|
|
38
|
-
'see release label': 'See release on GitHub',
|
|
39
|
-
'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',
|
|
40
|
-
'discord label': 'Discord',
|
|
41
|
-
'github label': 'GitHub',
|
|
42
|
-
'feedback label': 'Feedback',
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default [translations];
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
10
|
+
{
|
|
11
|
+
'en-US': {
|
|
12
|
+
[meta.id]: {
|
|
13
|
+
'plugin name': 'Status Bar',
|
|
14
|
+
'warning title': 'WARNING',
|
|
15
|
+
'technology preview message': 'Composer is currently in beta.',
|
|
16
|
+
'learn more label': 'Learn more',
|
|
17
|
+
'released message': 'This version released {{released}}.',
|
|
18
|
+
'see release label': 'See release on GitHub',
|
|
19
|
+
'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',
|
|
20
|
+
'discord label': 'Discord',
|
|
21
|
+
'github label': 'GitHub',
|
|
22
|
+
'feedback label': 'Feedback',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
] as const satisfies Resource[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/StatusBar.tsx", "../../../src/meta.ts", "../../../src/components/VersionNumber.tsx", "../../../src/components/StatusBarPanel.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 { 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 { 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 { t } = useTranslation(STATUS_BAR_PLUGIN);\n const config = useConfig();\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' classNames='rounded-be-none p-5'>\n <Message.Title>{t('warning title')}</Message.Title>\n <Message.Content>\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.Content>\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, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { useConfig } from '@dxos/react-client';\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 <EnvironmentLabel />\n <VersionNumber />\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 </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\nconst ENV_LABELS: Record<string, string> = {\n 'edge-dev': 'Dev',\n 'edge-main': 'Main',\n 'edge-labs': 'Labs',\n 'edge-production': 'Production',\n};\n\nconst EnvironmentLabel = () => {\n const config = useConfig();\n const edgeUrl = config.values.runtime?.services?.edge?.url;\n if (!edgeUrl) {\n return null;\n }\n const part = new URL(edgeUrl).host.split('.')[0];\n const edgeEnv = ENV_LABELS[part];\n if (!edgeEnv) {\n return null;\n }\n\n return (\n <StatusBar.Item>\n <StatusBar.Text classNames='text-xs text-subdued border border-separator rounded-full px-1'>\n <span title={edgeEnv}>{edgeEnv[0]}</span>\n </StatusBar.Text>\n </StatusBar.Item>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;AAIA,SAASA,YAAY;AACrB,OAAOC,SAAqCC,kBAA0D;AAGtG,SAASC,UAAU;AAInB,IAAMC,gBAAgBC,2BAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAAAA;;;WAC/F,sBAAA,cAACC,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;AACZ,aAAO;IACT;AAEA,WACE,gBAAApC,OAAA,cAACM,UAAU+B,MAAI,MACb,gBAAArC,OAAA,cAACM,UAAUU,MAAI;MAACC,YAAW;OACzB,gBAAAjB,OAAA,cAACmB,QAAAA;MAAKmB,OAAOF;OAAUA,QAAQ,CAAA,CAAE,CAAA,CAAA;;;;AAIzC;",
|
|
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", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "formatDistance", "React", "useConfig", "Link", "Message", "Popover", "Trans", "useTranslation", "Icon", "repo", "VERSION_REGEX", "VersionNumber", "t", "useTranslation", "STATUS_BAR_PLUGIN", "config", "useConfig", "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", "Title", "br", "Link", "href", "target", "rel", "variant", "Icon", "icon", "div", "className", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "React", "useState", "Surface", "useConfig", "Icon", "Popover", "useTranslation", "StatusBarActions", "t", "useTranslation", "STATUS_BAR_PLUGIN", "open", "setOpen", "useState", "React", "Popover", "Root", "onOpenChange", "EnvironmentLabel", "VersionNumber", "StatusBar", "Button", "asChild", "a", "href", "target", "rel", "Icon", "icon", "size", "Text", "classNames", "StatusBarPanel", "span", "role", "className", "Surface", "ENV_LABELS", "config", "useConfig", "edgeUrl", "values", "runtime", "services", "edge", "url", "part", "URL", "host", "split", "edgeEnv", "Item", "title"]
|
|
7
|
-
}
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var chunk_IQ5QWIXI_exports = {};
|
|
30
|
-
__export(chunk_IQ5QWIXI_exports, {
|
|
31
|
-
STATUS_BAR_PLUGIN: () => STATUS_BAR_PLUGIN,
|
|
32
|
-
StatusBar: () => StatusBar,
|
|
33
|
-
StatusBarActions: () => StatusBarActions,
|
|
34
|
-
StatusBarPanel: () => StatusBarPanel,
|
|
35
|
-
VersionNumber: () => VersionNumber,
|
|
36
|
-
meta: () => meta
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(chunk_IQ5QWIXI_exports);
|
|
39
|
-
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
40
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
41
|
-
var import_react = __toESM(require("react"));
|
|
42
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
43
|
-
var import_tracking2 = require("@preact-signals/safe-react/tracking");
|
|
44
|
-
var import_formatDistance = require("date-fns/formatDistance");
|
|
45
|
-
var import_react2 = __toESM(require("react"));
|
|
46
|
-
var import_react_client = require("@dxos/react-client");
|
|
47
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
48
|
-
var import_tracking3 = require("@preact-signals/safe-react/tracking");
|
|
49
|
-
var import_react3 = __toESM(require("react"));
|
|
50
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
51
|
-
var import_react_client2 = require("@dxos/react-client");
|
|
52
|
-
var import_react_ui2 = require("@dxos/react-ui");
|
|
53
|
-
var StatusBarText = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => {
|
|
54
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
55
|
-
try {
|
|
56
|
-
return /* @__PURE__ */ import_react.default.createElement("span", {
|
|
57
|
-
className: (0, import_react_ui_theme.mx)(classNames),
|
|
58
|
-
ref: forwardedRef
|
|
59
|
-
}, children);
|
|
60
|
-
} finally {
|
|
61
|
-
_effect.f();
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var StatusBarButton = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
65
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
66
|
-
try {
|
|
67
|
-
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);
|
|
68
|
-
return asChild ? /* @__PURE__ */ import_react.default.createElement(import_react_slot.Slot, {
|
|
69
|
-
role: "button",
|
|
70
|
-
ref: forwardedRef,
|
|
71
|
-
className: classes,
|
|
72
|
-
...props
|
|
73
|
-
}, children) : /* @__PURE__ */ import_react.default.createElement("button", {
|
|
74
|
-
className: classes,
|
|
75
|
-
ref: forwardedRef,
|
|
76
|
-
...props
|
|
77
|
-
}, children);
|
|
78
|
-
} finally {
|
|
79
|
-
_effect.f();
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var StatusBarItem = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, ...props }, forwardedRef) => {
|
|
83
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
84
|
-
try {
|
|
85
|
-
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
86
|
-
role: "menuitem",
|
|
87
|
-
className: (0, import_react_ui_theme.mx)("flex items-center justify-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
|
|
88
|
-
ref: forwardedRef,
|
|
89
|
-
...props
|
|
90
|
-
}, children);
|
|
91
|
-
} finally {
|
|
92
|
-
_effect.f();
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
var StartContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => {
|
|
96
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
97
|
-
try {
|
|
98
|
-
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
99
|
-
role: "none",
|
|
100
|
-
className: (0, import_react_ui_theme.mx)("flex-grow flex items-center space-x-2", classNames),
|
|
101
|
-
ref: forwardedRef
|
|
102
|
-
}, children);
|
|
103
|
-
} finally {
|
|
104
|
-
_effect.f();
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
var EndContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => {
|
|
108
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
109
|
-
try {
|
|
110
|
-
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
111
|
-
role: "none",
|
|
112
|
-
className: (0, import_react_ui_theme.mx)("flex-grow flex items-center justify-end", classNames),
|
|
113
|
-
ref: forwardedRef
|
|
114
|
-
}, children);
|
|
115
|
-
} finally {
|
|
116
|
-
_effect.f();
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
var StatusBar = {
|
|
120
|
-
Text: StatusBarText,
|
|
121
|
-
Item: StatusBarItem,
|
|
122
|
-
Button: StatusBarButton,
|
|
123
|
-
StartContent,
|
|
124
|
-
EndContent
|
|
125
|
-
};
|
|
126
|
-
var STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
|
|
127
|
-
var meta = {
|
|
128
|
-
id: STATUS_BAR_PLUGIN,
|
|
129
|
-
name: "Status Bar",
|
|
130
|
-
description: "Display a bar with status and actions.",
|
|
131
|
-
icon: "ph--info--regular"
|
|
132
|
-
};
|
|
133
|
-
var repo = "https://github.com/dxos/dxos";
|
|
134
|
-
var VERSION_REGEX = /([\d.]+)/;
|
|
135
|
-
var VersionNumber = () => {
|
|
136
|
-
var _effect = (0, import_tracking2.useSignals)();
|
|
137
|
-
try {
|
|
138
|
-
const { t } = (0, import_react_ui.useTranslation)(STATUS_BAR_PLUGIN);
|
|
139
|
-
const config = (0, import_react_client.useConfig)();
|
|
140
|
-
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
141
|
-
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
|
142
|
-
const isLabs = config.values.runtime?.app?.env?.DX_LABS;
|
|
143
|
-
const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
|
|
144
|
-
const previewUrl = "https://docs.dxos.org/composer#technology-preview";
|
|
145
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Root, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Trigger, {
|
|
146
|
-
asChild: true
|
|
147
|
-
}, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
|
|
148
|
-
classNames: "text-xs"
|
|
149
|
-
}, isLabs ? version : v)), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Portal, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Content, {
|
|
150
|
-
side: "top",
|
|
151
|
-
role: "message",
|
|
152
|
-
classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
|
|
153
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Message.Root, {
|
|
154
|
-
valence: "warning",
|
|
155
|
-
classNames: "rounded-be-none p-5"
|
|
156
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Message.Title, null, t("warning title")), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Message.Content, null, t("technology preview message"), /* @__PURE__ */ import_react2.default.createElement("br", null), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Link, {
|
|
157
|
-
href: previewUrl,
|
|
158
|
-
target: "_blank",
|
|
159
|
-
rel: "noreferrer",
|
|
160
|
-
variant: "neutral"
|
|
161
|
-
}, t("learn more label"), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
|
|
162
|
-
icon: "ph--arrow-square-out--bold",
|
|
163
|
-
classNames: "inline mis-1"
|
|
164
|
-
})))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
165
|
-
role: "none",
|
|
166
|
-
className: "plb-4 pli-5 space-b-2 text-baseText"
|
|
167
|
-
}, timestamp && /* @__PURE__ */ import_react2.default.createElement("p", null, t("released message", {
|
|
168
|
-
released: (0, import_formatDistance.formatDistance)(new Date(timestamp), /* @__PURE__ */ new Date(), {
|
|
169
|
-
addSuffix: true
|
|
170
|
-
})
|
|
171
|
-
}), /* @__PURE__ */ import_react2.default.createElement("br", null), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Link, {
|
|
172
|
-
href: releaseUrl,
|
|
173
|
-
target: "_blank",
|
|
174
|
-
rel: "noreferrer",
|
|
175
|
-
variant: "neutral"
|
|
176
|
-
}, t("see release label"), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
|
|
177
|
-
icon: "ph--arrow-square-out--bold",
|
|
178
|
-
classNames: "inline mis-1"
|
|
179
|
-
}))), /* @__PURE__ */ import_react2.default.createElement("p", null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Trans, {
|
|
180
|
-
t,
|
|
181
|
-
i18nKey: "powered by dxos message",
|
|
182
|
-
components: {
|
|
183
|
-
dxos: /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Link, {
|
|
184
|
-
href: "https://dxos.org",
|
|
185
|
-
target: "_blank",
|
|
186
|
-
rel: "noreferrer",
|
|
187
|
-
variant: "neutral"
|
|
188
|
-
})
|
|
189
|
-
}
|
|
190
|
-
}))), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Arrow, null))));
|
|
191
|
-
} finally {
|
|
192
|
-
_effect.f();
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
var StatusBarActions = () => {
|
|
196
|
-
var _effect = (0, import_tracking3.useSignals)();
|
|
197
|
-
try {
|
|
198
|
-
const { t } = (0, import_react_ui2.useTranslation)(STATUS_BAR_PLUGIN);
|
|
199
|
-
const [open, setOpen] = (0, import_react3.useState)(false);
|
|
200
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Root, {
|
|
201
|
-
open,
|
|
202
|
-
onOpenChange: setOpen
|
|
203
|
-
}, /* @__PURE__ */ import_react3.default.createElement(EnvironmentLabel, null), /* @__PURE__ */ import_react3.default.createElement(VersionNumber, null), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Button, {
|
|
204
|
-
asChild: true
|
|
205
|
-
}, /* @__PURE__ */ import_react3.default.createElement("a", {
|
|
206
|
-
href: "https://dxos.org/discord",
|
|
207
|
-
target: "_blank",
|
|
208
|
-
rel: "noopener noreferrer"
|
|
209
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Icon, {
|
|
210
|
-
icon: "ph--discord-logo--regular",
|
|
211
|
-
size: 4
|
|
212
|
-
}), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Text, {
|
|
213
|
-
classNames: "hidden sm:block"
|
|
214
|
-
}, t("discord label")))), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Button, {
|
|
215
|
-
asChild: true
|
|
216
|
-
}, /* @__PURE__ */ import_react3.default.createElement("a", {
|
|
217
|
-
href: "https://github.com/dxos/dxos",
|
|
218
|
-
target: "_blank",
|
|
219
|
-
rel: "noopener noreferrer"
|
|
220
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Icon, {
|
|
221
|
-
icon: "ph--github-logo--regular",
|
|
222
|
-
size: 4
|
|
223
|
-
}), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Text, {
|
|
224
|
-
classNames: "hidden sm:block"
|
|
225
|
-
}, t("github label")))));
|
|
226
|
-
} finally {
|
|
227
|
-
_effect.f();
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
var StatusBarPanel = () => {
|
|
231
|
-
var _effect = (0, import_tracking3.useSignals)();
|
|
232
|
-
try {
|
|
233
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(StatusBarActions, null), /* @__PURE__ */ import_react3.default.createElement("span", {
|
|
234
|
-
role: "separator",
|
|
235
|
-
className: "grow"
|
|
236
|
-
}), /* @__PURE__ */ import_react3.default.createElement(import_app_framework.Surface, {
|
|
237
|
-
role: "status"
|
|
238
|
-
}));
|
|
239
|
-
} finally {
|
|
240
|
-
_effect.f();
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
var ENV_LABELS = {
|
|
244
|
-
"edge-dev": "Dev",
|
|
245
|
-
"edge-main": "Main",
|
|
246
|
-
"edge-labs": "Labs",
|
|
247
|
-
"edge-production": "Production"
|
|
248
|
-
};
|
|
249
|
-
var EnvironmentLabel = () => {
|
|
250
|
-
var _effect = (0, import_tracking3.useSignals)();
|
|
251
|
-
try {
|
|
252
|
-
const config = (0, import_react_client2.useConfig)();
|
|
253
|
-
const edgeUrl = config.values.runtime?.services?.edge?.url;
|
|
254
|
-
if (!edgeUrl) {
|
|
255
|
-
return null;
|
|
256
|
-
}
|
|
257
|
-
const part = new URL(edgeUrl).host.split(".")[0];
|
|
258
|
-
const edgeEnv = ENV_LABELS[part];
|
|
259
|
-
if (!edgeEnv) {
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
return /* @__PURE__ */ import_react3.default.createElement(StatusBar.Item, null, /* @__PURE__ */ import_react3.default.createElement(StatusBar.Text, {
|
|
263
|
-
classNames: "text-xs text-subdued border border-separator rounded-full px-1"
|
|
264
|
-
}, /* @__PURE__ */ import_react3.default.createElement("span", {
|
|
265
|
-
title: edgeEnv
|
|
266
|
-
}, edgeEnv[0])));
|
|
267
|
-
} finally {
|
|
268
|
-
_effect.f();
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
272
|
-
0 && (module.exports = {
|
|
273
|
-
STATUS_BAR_PLUGIN,
|
|
274
|
-
StatusBar,
|
|
275
|
-
StatusBarActions,
|
|
276
|
-
StatusBarPanel,
|
|
277
|
-
VersionNumber,
|
|
278
|
-
meta
|
|
279
|
-
});
|
|
280
|
-
//# sourceMappingURL=chunk-IQ5QWIXI.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/StatusBar.tsx", "../../../src/meta.ts", "../../../src/components/VersionNumber.tsx", "../../../src/components/StatusBarPanel.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 { 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 { 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 { t } = useTranslation(STATUS_BAR_PLUGIN);\n const config = useConfig();\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' classNames='rounded-be-none p-5'>\n <Message.Title>{t('warning title')}</Message.Title>\n <Message.Content>\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.Content>\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, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { useConfig } from '@dxos/react-client';\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 <EnvironmentLabel />\n <VersionNumber />\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 </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\nconst ENV_LABELS: Record<string, string> = {\n 'edge-dev': 'Dev',\n 'edge-main': 'Main',\n 'edge-labs': 'Labs',\n 'edge-production': 'Production',\n};\n\nconst EnvironmentLabel = () => {\n const config = useConfig();\n const edgeUrl = config.values.runtime?.services?.edge?.url;\n if (!edgeUrl) {\n return null;\n }\n const part = new URL(edgeUrl).host.split('.')[0];\n const edgeEnv = ENV_LABELS[part];\n if (!edgeEnv) {\n return null;\n }\n\n return (\n <StatusBar.Item>\n <StatusBar.Text classNames='text-xs text-subdued border border-separator rounded-full px-1'>\n <span title={edgeEnv}>{edgeEnv[0]}</span>\n </StatusBar.Text>\n </StatusBar.Item>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAAqB;AACrB,mBAAsG;AAGtG,4BAAmB;;AEJnB,4BAA+B;AAC/B,IAAAA,gBAAkB;AAElB,0BAA0B;AAC1B,sBAAoE;;ACJpE,IAAAA,gBAAgC;AAEhC,2BAAwB;AACxB,IAAAC,uBAA0B;AAC1B,IAAAC,mBAA8C;AHI9C,IAAMC,gBAAgBC,6CAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAAAA;;;WAC/F,6BAAAC,QAAA,cAACC,QAAAA;MAAKC,eAAWC,0BAAGN,UAAAA;MAAaO,KAAKL;OACnCD,QAAAA;;;;;AAML,IAAMO,kBAAkBT,6CACtB,CAAC,EAAEC,YAAYC,UAAUQ,SAAS,GAAGC,MAAAA,GAASR,iBAAAA;;;AA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AAIzC;",
|
|
6
|
-
"names": ["import_react", "import_react_client", "import_react_ui", "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", "repo", "VERSION_REGEX", "VersionNumber", "t", "useTranslation", "config", "useConfig", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "_", "v", "match", "isLabs", "env", "DX_LABS", "releaseUrl", "DX_ENVIRONMENT", "previewUrl", "Popover", "Root", "Trigger", "Portal", "Content", "side", "Message", "valence", "Title", "br", "Link", "href", "target", "rel", "variant", "Icon", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "StatusBarActions", "open", "setOpen", "useState", "onOpenChange", "EnvironmentLabel", "a", "size", "StatusBarPanel", "Surface", "ENV_LABELS", "edgeUrl", "services", "edge", "url", "part", "URL", "host", "split", "edgeEnv", "title"]
|
|
7
|
-
}
|
package/dist/lib/node/index.cjs
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var node_exports = {};
|
|
30
|
-
__export(node_exports, {
|
|
31
|
-
STATUS_BAR_PLUGIN: () => import_chunk_IQ5QWIXI.STATUS_BAR_PLUGIN,
|
|
32
|
-
StatusBar: () => import_chunk_IQ5QWIXI.StatusBar,
|
|
33
|
-
StatusBarActions: () => import_chunk_IQ5QWIXI.StatusBarActions,
|
|
34
|
-
StatusBarPanel: () => import_chunk_IQ5QWIXI.StatusBarPanel,
|
|
35
|
-
StatusBarPlugin: () => StatusBarPlugin,
|
|
36
|
-
VersionNumber: () => import_chunk_IQ5QWIXI.VersionNumber,
|
|
37
|
-
meta: () => import_chunk_IQ5QWIXI.meta
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(node_exports);
|
|
40
|
-
var import_chunk_IQ5QWIXI = require("./chunk-IQ5QWIXI.cjs");
|
|
41
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
42
|
-
var import_app_framework2 = require("@dxos/app-framework");
|
|
43
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-BD2WWDVZ.cjs"));
|
|
44
|
-
var entry = (translation) => ({
|
|
45
|
-
[import_chunk_IQ5QWIXI.STATUS_BAR_PLUGIN]: translation
|
|
46
|
-
});
|
|
47
|
-
var translations = {
|
|
48
|
-
"en-US": entry({
|
|
49
|
-
"plugin name": "Status Bar",
|
|
50
|
-
"warning title": "WARNING",
|
|
51
|
-
"technology preview message": "Composer is currently in beta.",
|
|
52
|
-
"learn more label": "Learn more",
|
|
53
|
-
"released message": "This version released {{released}}.",
|
|
54
|
-
"see release label": "See release on GitHub",
|
|
55
|
-
"powered by dxos message": "Powered by <dxos>DXOS</dxos>",
|
|
56
|
-
"discord label": "Discord",
|
|
57
|
-
"github label": "GitHub",
|
|
58
|
-
"feedback label": "Feedback"
|
|
59
|
-
})
|
|
60
|
-
};
|
|
61
|
-
var translations_default = [
|
|
62
|
-
translations
|
|
63
|
-
];
|
|
64
|
-
var StatusBarPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_IQ5QWIXI.meta, [
|
|
65
|
-
(0, import_app_framework.defineModule)({
|
|
66
|
-
id: `${import_chunk_IQ5QWIXI.meta.id}/module/translations`,
|
|
67
|
-
activatesOn: import_app_framework.Events.SetupTranslations,
|
|
68
|
-
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
|
|
69
|
-
}),
|
|
70
|
-
(0, import_app_framework.defineModule)({
|
|
71
|
-
id: `${import_chunk_IQ5QWIXI.meta.id}/module/react-surface`,
|
|
72
|
-
activatesOn: import_app_framework.Events.SetupReactSurface,
|
|
73
|
-
activate: ReactSurface
|
|
74
|
-
})
|
|
75
|
-
]);
|
|
76
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
77
|
-
0 && (module.exports = {
|
|
78
|
-
STATUS_BAR_PLUGIN,
|
|
79
|
-
StatusBar,
|
|
80
|
-
StatusBarActions,
|
|
81
|
-
StatusBarPanel,
|
|
82
|
-
StatusBarPlugin,
|
|
83
|
-
VersionNumber,
|
|
84
|
-
meta
|
|
85
|
-
});
|
|
86
|
-
//# sourceMappingURL=index.cjs.map
|