@dxos/plugin-status-bar 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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/StatusBarActions-63FMNXUX.mjs +10 -0
- package/dist/lib/browser/StatusBarActions-63FMNXUX.mjs.map +7 -0
- package/dist/lib/browser/StatusBarPanel-KWQL4TTQ.mjs +25 -0
- package/dist/lib/browser/StatusBarPanel-KWQL4TTQ.mjs.map +7 -0
- package/dist/lib/browser/VersionNumber-NSVK34RP.mjs +9 -0
- package/dist/lib/browser/VersionNumber-NSVK34RP.mjs.map +7 -0
- package/dist/lib/browser/chunk-CBR3FWPA.mjs +49 -0
- package/dist/lib/browser/chunk-CBR3FWPA.mjs.map +7 -0
- package/dist/lib/browser/chunk-DJN2GTOY.mjs +16 -0
- package/dist/lib/browser/chunk-DJN2GTOY.mjs.map +7 -0
- package/dist/lib/browser/chunk-MAM2WQN4.mjs +75 -0
- package/dist/lib/browser/chunk-MAM2WQN4.mjs.map +7 -0
- package/dist/lib/browser/chunk-WUIMMP5N.mjs +77 -0
- package/dist/lib/browser/chunk-WUIMMP5N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +11 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-ZVKPLSAI.mjs +45 -0
- package/dist/lib/browser/react-surface-ZVKPLSAI.mjs.map +7 -0
- package/dist/lib/node-esm/StatusBarActions-LI4FUZ4F.mjs +11 -0
- package/dist/lib/node-esm/StatusBarActions-LI4FUZ4F.mjs.map +7 -0
- package/dist/lib/node-esm/StatusBarPanel-O22JVKD4.mjs +26 -0
- package/dist/lib/node-esm/StatusBarPanel-O22JVKD4.mjs.map +7 -0
- package/dist/lib/node-esm/VersionNumber-6PD7SUMF.mjs +10 -0
- package/dist/lib/node-esm/VersionNumber-6PD7SUMF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5H2TCCFW.mjs +18 -0
- package/dist/lib/node-esm/chunk-5H2TCCFW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7KTRYBWS.mjs +78 -0
- package/dist/lib/node-esm/chunk-7KTRYBWS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-B4UMHTV6.mjs +51 -0
- package/dist/lib/node-esm/chunk-B4UMHTV6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YVIPBYHG.mjs +76 -0
- package/dist/lib/node-esm/chunk-YVIPBYHG.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +11 -14
- 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-QSB537IH.mjs +46 -0
- package/dist/lib/node-esm/react-surface-QSB537IH.mjs.map +7 -0
- package/dist/types/src/StatusBarPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/StatusBar/StatusBar.d.ts.map +1 -0
- package/dist/types/src/components/StatusBar/StatusBar.stories.d.ts.map +1 -0
- package/dist/types/src/components/StatusBar/index.d.ts +2 -0
- package/dist/types/src/components/StatusBar/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/StatusBarActions/StatusBarActions.d.ts +4 -0
- package/dist/types/src/containers/StatusBarActions/StatusBarActions.d.ts.map +1 -0
- package/dist/types/src/containers/StatusBarActions/index.d.ts +3 -0
- package/dist/types/src/containers/StatusBarActions/index.d.ts.map +1 -0
- package/dist/types/src/containers/StatusBarPanel/StatusBarPanel.d.ts +4 -0
- package/dist/types/src/containers/StatusBarPanel/StatusBarPanel.d.ts.map +1 -0
- package/dist/types/src/containers/StatusBarPanel/index.d.ts +3 -0
- package/dist/types/src/containers/StatusBarPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/VersionNumber/VersionNumber.d.ts +4 -0
- package/dist/types/src/containers/VersionNumber/VersionNumber.d.ts.map +1 -0
- package/dist/types/src/containers/VersionNumber/index.d.ts +3 -0
- package/dist/types/src/containers/VersionNumber/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -18
- package/src/StatusBarPlugin.ts +4 -3
- package/src/capabilities/react-surface/react-surface.tsx +13 -13
- package/src/components/{StatusBar.stories.tsx → StatusBar/StatusBar.stories.tsx} +3 -3
- package/src/components/{StatusBar.tsx → StatusBar/StatusBar.tsx} +3 -3
- package/src/components/StatusBar/index.ts +5 -0
- package/src/components/index.ts +0 -2
- package/src/{components/StatusBarPanel.tsx → containers/StatusBarActions/StatusBarActions.tsx} +6 -16
- package/src/containers/StatusBarActions/index.ts +7 -0
- package/src/containers/StatusBarPanel/StatusBarPanel.tsx +21 -0
- package/src/containers/StatusBarPanel/index.ts +7 -0
- package/src/{components → containers/VersionNumber}/VersionNumber.tsx +9 -8
- package/src/containers/VersionNumber/index.ts +7 -0
- package/src/containers/index.ts +9 -0
- package/src/meta.ts +1 -1
- package/src/translations.ts +1 -1
- package/dist/lib/browser/chunk-G3E35NNM.mjs +0 -195
- package/dist/lib/browser/chunk-G3E35NNM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-MYYYPTEW.mjs +0 -40
- package/dist/lib/browser/react-surface-MYYYPTEW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RE6CUOP4.mjs +0 -197
- package/dist/lib/node-esm/chunk-RE6CUOP4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RNK64YYP.mjs +0 -41
- package/dist/lib/node-esm/react-surface-RNK64YYP.mjs.map +0 -7
- package/dist/types/src/components/StatusBar.d.ts.map +0 -1
- package/dist/types/src/components/StatusBar.stories.d.ts.map +0 -1
- package/dist/types/src/components/StatusBarPanel.d.ts +0 -4
- package/dist/types/src/components/StatusBarPanel.d.ts.map +0 -1
- package/dist/types/src/components/VersionNumber.d.ts +0 -3
- package/dist/types/src/components/VersionNumber.d.ts.map +0 -1
- /package/dist/types/src/components/{StatusBar.d.ts → StatusBar/StatusBar.d.ts} +0 -0
- /package/dist/types/src/components/{StatusBar.stories.d.ts → StatusBar/StatusBar.stories.d.ts} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StatusBarActions,
|
|
3
|
-
StatusBarPanel,
|
|
4
|
-
VersionNumber,
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-G3E35NNM.mjs";
|
|
7
|
-
|
|
8
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
9
|
-
import * as Effect from "effect/Effect";
|
|
10
|
-
import React from "react";
|
|
11
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
12
|
-
import { Surface } from "@dxos/app-framework/react";
|
|
13
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, [
|
|
14
|
-
Common.createSurface({
|
|
15
|
-
id: `${meta.id}/status-bar`,
|
|
16
|
-
role: "status-bar",
|
|
17
|
-
component: () => /* @__PURE__ */ React.createElement(StatusBarPanel, null)
|
|
18
|
-
}),
|
|
19
|
-
Common.createSurface({
|
|
20
|
-
id: `${meta.id}/status-bar--r0-footer`,
|
|
21
|
-
role: "status-bar--r0-footer",
|
|
22
|
-
component: () => /* @__PURE__ */ React.createElement(Surface, {
|
|
23
|
-
role: "status"
|
|
24
|
-
})
|
|
25
|
-
}),
|
|
26
|
-
Common.createSurface({
|
|
27
|
-
id: `${meta.id}/status-bar--r1-footer`,
|
|
28
|
-
role: "status-bar--r1-footer",
|
|
29
|
-
component: () => /* @__PURE__ */ React.createElement(StatusBarActions, null)
|
|
30
|
-
}),
|
|
31
|
-
Common.createSurface({
|
|
32
|
-
id: `${meta.id}/header-end`,
|
|
33
|
-
role: "header-end",
|
|
34
|
-
component: () => /* @__PURE__ */ React.createElement(VersionNumber, null)
|
|
35
|
-
})
|
|
36
|
-
])));
|
|
37
|
-
export {
|
|
38
|
-
react_surface_default as default
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=react-surface-MYYYPTEW.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/react';\n\nimport { StatusBarActions, StatusBarPanel, VersionNumber } from '../../components';\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: `${meta.id}/status-bar`,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n Common.createSurface({\n id: `${meta.id}/status-bar--r0-footer`,\n role: 'status-bar--r0-footer',\n component: () => <Surface role='status' />,\n }),\n Common.createSurface({\n id: `${meta.id}/status-bar--r1-footer`,\n role: 'status-bar--r1-footer',\n component: () => <StatusBarActions />,\n }),\n Common.createSurface({\n id: `${meta.id}/header-end`,\n role: 'header-end',\n component: () => <VersionNumber />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,eAAe;AAKxB,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACC,gBAAAA,IAAAA;EACpB,CAAA;EACAP,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACE,SAAAA;MAAQH,MAAK;;EACjC,CAAA;EACAL,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACG,kBAAAA,IAAAA;EACpB,CAAA;EACAT,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACI,eAAAA,IAAAA;EACpB,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Surface", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "component", "StatusBarPanel", "Surface", "StatusBarActions", "VersionNumber"]
|
|
7
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/components/StatusBar.tsx
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import React, { forwardRef } from "react";
|
|
6
|
-
import { mx } from "@dxos/ui-theme";
|
|
7
|
-
var StatusBarText = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("span", {
|
|
8
|
-
className: mx(classNames),
|
|
9
|
-
ref: forwardedRef
|
|
10
|
-
}, children));
|
|
11
|
-
var StatusBarButton = /* @__PURE__ */ forwardRef(({ classNames, children, asChild, ...props }, forwardedRef) => {
|
|
12
|
-
const classes = mx("flex items-center justify-center gap-2 p-1 pli-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);
|
|
13
|
-
return asChild ? /* @__PURE__ */ React.createElement(Slot, {
|
|
14
|
-
role: "button",
|
|
15
|
-
ref: forwardedRef,
|
|
16
|
-
className: classes,
|
|
17
|
-
...props
|
|
18
|
-
}, children) : /* @__PURE__ */ React.createElement("button", {
|
|
19
|
-
className: classes,
|
|
20
|
-
ref: forwardedRef,
|
|
21
|
-
...props
|
|
22
|
-
}, children);
|
|
23
|
-
});
|
|
24
|
-
var StatusBarItem = /* @__PURE__ */ forwardRef(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
25
|
-
role: "menuitem",
|
|
26
|
-
className: mx("flex items-center justify-center gap-2 p-1 pli-2 rounded-sm select-none", classNames),
|
|
27
|
-
ref: forwardedRef,
|
|
28
|
-
...props
|
|
29
|
-
}, children));
|
|
30
|
-
var StartContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
role: "none",
|
|
32
|
-
className: mx("flex-grow flex items-center space-x-2", classNames),
|
|
33
|
-
ref: forwardedRef
|
|
34
|
-
}, children));
|
|
35
|
-
var EndContent = /* @__PURE__ */ forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ React.createElement("div", {
|
|
36
|
-
role: "none",
|
|
37
|
-
className: mx("flex-grow flex items-center justify-end", classNames),
|
|
38
|
-
ref: forwardedRef
|
|
39
|
-
}, children));
|
|
40
|
-
var StatusBar = {
|
|
41
|
-
Text: StatusBarText,
|
|
42
|
-
Item: StatusBarItem,
|
|
43
|
-
Button: StatusBarButton,
|
|
44
|
-
StartContent,
|
|
45
|
-
EndContent
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// src/meta.ts
|
|
49
|
-
import { trim } from "@dxos/util";
|
|
50
|
-
var meta = {
|
|
51
|
-
id: "dxos.org/plugin/status-bar",
|
|
52
|
-
name: "Status Bar",
|
|
53
|
-
description: trim`
|
|
54
|
-
Persistent bottom bar displaying workspace status information and quick actions.
|
|
55
|
-
Access connection state, notifications, and common commands without leaving your current context.
|
|
56
|
-
`,
|
|
57
|
-
icon: "ph--info--regular"
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// src/components/VersionNumber.tsx
|
|
61
|
-
import { formatDistance } from "date-fns/formatDistance";
|
|
62
|
-
import React2 from "react";
|
|
63
|
-
import { useConfig } from "@dxos/react-client";
|
|
64
|
-
import { Icon, Link, Message, Popover, Trans, useTranslation } from "@dxos/react-ui";
|
|
65
|
-
var repo = "https://github.com/dxos/dxos";
|
|
66
|
-
var VERSION_REGEX = /([\d.]+)/;
|
|
67
|
-
var VersionNumber = () => {
|
|
68
|
-
const { t } = useTranslation(meta.id);
|
|
69
|
-
const config = useConfig();
|
|
70
|
-
const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};
|
|
71
|
-
const [_, v] = version?.match(VERSION_REGEX) ?? [];
|
|
72
|
-
const isLabs = config.values.runtime?.app?.env?.DX_LABS;
|
|
73
|
-
const releaseUrl = config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production" ? `${repo}/releases/tag/v${version}` : `${repo}/commit/${commitHash}`;
|
|
74
|
-
const previewUrl = "https://docs.dxos.org/composer#technology-preview";
|
|
75
|
-
return /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
|
|
76
|
-
asChild: true
|
|
77
|
-
}, /* @__PURE__ */ React2.createElement(StatusBar.Button, {
|
|
78
|
-
classNames: "text-xs"
|
|
79
|
-
}, isLabs ? version : v)), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
|
|
80
|
-
side: "top",
|
|
81
|
-
role: "message",
|
|
82
|
-
classNames: "z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]"
|
|
83
|
-
}, /* @__PURE__ */ React2.createElement(Message.Root, {
|
|
84
|
-
valence: "warning",
|
|
85
|
-
classNames: "rounded-be-none p-5"
|
|
86
|
-
}, /* @__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, {
|
|
87
|
-
href: previewUrl,
|
|
88
|
-
target: "_blank",
|
|
89
|
-
rel: "noreferrer",
|
|
90
|
-
variant: "neutral"
|
|
91
|
-
}, t("learn more label"), /* @__PURE__ */ React2.createElement(Icon, {
|
|
92
|
-
icon: "ph--arrow-square-out--bold",
|
|
93
|
-
classNames: "inline mis-1"
|
|
94
|
-
})))), /* @__PURE__ */ React2.createElement("div", {
|
|
95
|
-
role: "none",
|
|
96
|
-
className: "plb-4 pli-5 space-b-2 text-baseText"
|
|
97
|
-
}, timestamp && /* @__PURE__ */ React2.createElement("p", null, t("released message", {
|
|
98
|
-
released: formatDistance(new Date(timestamp), /* @__PURE__ */ new Date(), {
|
|
99
|
-
addSuffix: true
|
|
100
|
-
})
|
|
101
|
-
}), /* @__PURE__ */ React2.createElement("br", null), /* @__PURE__ */ React2.createElement(Link, {
|
|
102
|
-
href: releaseUrl,
|
|
103
|
-
target: "_blank",
|
|
104
|
-
rel: "noreferrer",
|
|
105
|
-
variant: "neutral"
|
|
106
|
-
}, t("see release label"), /* @__PURE__ */ React2.createElement(Icon, {
|
|
107
|
-
icon: "ph--arrow-square-out--bold",
|
|
108
|
-
classNames: "inline mis-1"
|
|
109
|
-
}))), /* @__PURE__ */ React2.createElement("p", null, /* @__PURE__ */ React2.createElement(Trans, {
|
|
110
|
-
t,
|
|
111
|
-
i18nKey: "powered by dxos message",
|
|
112
|
-
components: {
|
|
113
|
-
dxos: /* @__PURE__ */ React2.createElement(Link, {
|
|
114
|
-
href: "https://dxos.org",
|
|
115
|
-
target: "_blank",
|
|
116
|
-
rel: "noreferrer",
|
|
117
|
-
variant: "neutral"
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
}))), /* @__PURE__ */ React2.createElement(Popover.Arrow, null))));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// src/components/StatusBarPanel.tsx
|
|
124
|
-
import React3, { useState } from "react";
|
|
125
|
-
import { Surface } from "@dxos/app-framework/react";
|
|
126
|
-
import { useConfig as useConfig2 } from "@dxos/react-client";
|
|
127
|
-
import { Icon as Icon2, Popover as Popover2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
128
|
-
var StatusBarActions = () => {
|
|
129
|
-
const { t } = useTranslation2(meta.id);
|
|
130
|
-
const [open, setOpen] = useState(false);
|
|
131
|
-
return /* @__PURE__ */ React3.createElement(Popover2.Root, {
|
|
132
|
-
open,
|
|
133
|
-
onOpenChange: setOpen
|
|
134
|
-
}, /* @__PURE__ */ React3.createElement(EnvironmentLabel, null), /* @__PURE__ */ React3.createElement(VersionNumber, null), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
|
|
135
|
-
asChild: true
|
|
136
|
-
}, /* @__PURE__ */ React3.createElement("a", {
|
|
137
|
-
href: "https://dxos.org/discord",
|
|
138
|
-
target: "_blank",
|
|
139
|
-
rel: "noopener noreferrer"
|
|
140
|
-
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
141
|
-
icon: "ph--discord-logo--regular",
|
|
142
|
-
size: 4
|
|
143
|
-
}), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
|
|
144
|
-
classNames: "hidden sm:block"
|
|
145
|
-
}, t("discord label")))), /* @__PURE__ */ React3.createElement(StatusBar.Button, {
|
|
146
|
-
asChild: true
|
|
147
|
-
}, /* @__PURE__ */ React3.createElement("a", {
|
|
148
|
-
href: "https://github.com/dxos/dxos",
|
|
149
|
-
target: "_blank",
|
|
150
|
-
rel: "noopener noreferrer"
|
|
151
|
-
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
152
|
-
icon: "ph--github-logo--regular",
|
|
153
|
-
size: 4
|
|
154
|
-
}), /* @__PURE__ */ React3.createElement(StatusBar.Text, {
|
|
155
|
-
classNames: "hidden sm:block"
|
|
156
|
-
}, t("github label")))));
|
|
157
|
-
};
|
|
158
|
-
var StatusBarPanel = () => {
|
|
159
|
-
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBarActions, null), /* @__PURE__ */ React3.createElement("span", {
|
|
160
|
-
role: "separator",
|
|
161
|
-
className: "grow"
|
|
162
|
-
}), /* @__PURE__ */ React3.createElement(Surface, {
|
|
163
|
-
role: "status"
|
|
164
|
-
}));
|
|
165
|
-
};
|
|
166
|
-
var ENV_LABELS = {
|
|
167
|
-
"edge-dev": "Dev",
|
|
168
|
-
"edge-main": "Main",
|
|
169
|
-
"edge-labs": "Labs",
|
|
170
|
-
"edge-production": "Production"
|
|
171
|
-
};
|
|
172
|
-
var EnvironmentLabel = () => {
|
|
173
|
-
const config = useConfig2();
|
|
174
|
-
const edgeUrl = config.values.runtime?.services?.edge?.url;
|
|
175
|
-
if (!edgeUrl) {
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
|
-
const part = new URL(edgeUrl).host.split(".")[0];
|
|
179
|
-
const edgeEnv = ENV_LABELS[part];
|
|
180
|
-
if (!edgeEnv) {
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
return /* @__PURE__ */ React3.createElement(StatusBar.Item, null, /* @__PURE__ */ React3.createElement(StatusBar.Text, {
|
|
184
|
-
classNames: "text-xs text-subdued border border-separator rounded-full pli-1"
|
|
185
|
-
}, /* @__PURE__ */ React3.createElement("span", {
|
|
186
|
-
title: edgeEnv
|
|
187
|
-
}, edgeEnv[0])));
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export {
|
|
191
|
-
StatusBar,
|
|
192
|
-
meta,
|
|
193
|
-
VersionNumber,
|
|
194
|
-
StatusBarActions,
|
|
195
|
-
StatusBarPanel
|
|
196
|
-
};
|
|
197
|
-
//# sourceMappingURL=chunk-RE6CUOP4.mjs.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, type PropsWithChildren, type ReactNode, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/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 pli-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 pli-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 Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/status-bar',\n name: 'Status Bar',\n description: trim`\n Persistent bottom bar displaying workspace status information and quick actions.\n Access connection state, notifications, and common commands without leaving your current context.\n `,\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 { Icon, Link, Message, Popover, Trans, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../meta';\n\nimport { StatusBar } from './StatusBar';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nconst VERSION_REGEX = /([\\d.]+)/;\n\nexport const VersionNumber = () => {\n const { t } = useTranslation(meta.id);\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/react';\nimport { useConfig } from '@dxos/react-client';\nimport { Icon, Popover, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../meta';\n\nimport { StatusBar } from './StatusBar';\nimport { VersionNumber } from './VersionNumber';\n\nexport const StatusBarActions = () => {\n const { t } = useTranslation(meta.id);\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 pli-1'>\n <span title={edgeEnv}>{edgeEnv[0]}</span>\n </StatusBar.Text>\n </StatusBar.Item>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,YAAY;AACrB,OAAOC,SAA6EC,kBAAkB;AAGtG,SAASC,UAAU;AAInB,IAAMC,gBAAgBC,2BAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAC/F,sBAAA,cAACC,QAAAA;EAAKC,WAAWC,GAAGL,UAAAA;EAAaM,KAAKJ;GACnCD,QAAAA,CAAAA;AAML,IAAMM,kBAAkBR,2BACtB,CAAC,EAAEC,YAAYC,UAAUO,SAAS,GAAGC,MAAAA,GAASP,iBAAAA;AAC5C,QAAMQ,UAAUL,GACd,+DACA,qEACA,kGACAL,UAAAA;AAGF,SAAOQ,UACL,sBAAA,cAACG,MAAAA;IAAK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,EAAE,eAAA,CAAA,CAAA,CAAA,GAGpD,gBAAAO,OAAA,cAACM,UAAUC,QAAM;IAACC,SAAAA;KAChB,gBAAAR,OAAA,cAACS,KAAAA;IAAEC,MAAK;IAA+BC,QAAO;IAASC,KAAI;KACzD,gBAAAZ,OAAA,cAACa,OAAAA;IAAKC,MAAK;IAA2BC,MAAM;MAC5C,gBAAAf,OAAA,cAACM,UAAUU,MAAI;IAACC,YAAW;KAAmBxB,EAAE,cAAA,CAAA,CAAA,CAAA,CAAA;AAK1D;AAEO,IAAMyB,iBAAiB,MAAA;AAC5B,SACE,gBAAAlB,OAAA,cAAAA,OAAA,UAAA,MACE,gBAAAA,OAAA,cAACR,kBAAAA,IAAAA,GACD,gBAAAQ,OAAA,cAACmB,QAAAA;IAAKC,MAAK;IAAYC,WAAU;MACjC,gBAAArB,OAAA,cAACsB,SAAAA;IAAQF,MAAK;;AAGpB;AAEA,IAAMG,aAAqC;EACzC,YAAY;EACZ,aAAa;EACb,aAAa;EACb,mBAAmB;AACrB;AAEA,IAAMnB,mBAAmB,MAAA;AACvB,QAAMoB,SAASC,WAAAA;AACf,QAAMC,UAAUF,OAAOG,OAAOC,SAASC,UAAUC,MAAMC;AACvD,MAAI,CAACL,SAAS;AACZ,WAAO;EACT;AACA,QAAMM,OAAO,IAAIC,IAAIP,OAAAA,EAASQ,KAAKC,MAAM,GAAA,EAAK,CAAA;AAC9C,QAAMC,UAAUb,WAAWS,IAAAA;AAC3B,MAAI,CAACI,SAAS;AACZ,WAAO;EACT;AAEA,SACE,gBAAApC,OAAA,cAACM,UAAU+B,MAAI,MACb,gBAAArC,OAAA,cAACM,UAAUU,MAAI;IAACC,YAAW;KACzB,gBAAAjB,OAAA,cAACmB,QAAAA;IAAKmB,OAAOF;KAAUA,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", "trim", "meta", "id", "name", "description", "trim", "icon", "formatDistance", "React", "useConfig", "Icon", "Link", "Message", "Popover", "Trans", "useTranslation", "repo", "VERSION_REGEX", "VersionNumber", "t", "useTranslation", "meta", "id", "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", "meta", "id", "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,41 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
StatusBarActions,
|
|
4
|
-
StatusBarPanel,
|
|
5
|
-
VersionNumber,
|
|
6
|
-
meta
|
|
7
|
-
} from "./chunk-RE6CUOP4.mjs";
|
|
8
|
-
|
|
9
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
10
|
-
import * as Effect from "effect/Effect";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
13
|
-
import { Surface } from "@dxos/app-framework/react";
|
|
14
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, [
|
|
15
|
-
Common.createSurface({
|
|
16
|
-
id: `${meta.id}/status-bar`,
|
|
17
|
-
role: "status-bar",
|
|
18
|
-
component: () => /* @__PURE__ */ React.createElement(StatusBarPanel, null)
|
|
19
|
-
}),
|
|
20
|
-
Common.createSurface({
|
|
21
|
-
id: `${meta.id}/status-bar--r0-footer`,
|
|
22
|
-
role: "status-bar--r0-footer",
|
|
23
|
-
component: () => /* @__PURE__ */ React.createElement(Surface, {
|
|
24
|
-
role: "status"
|
|
25
|
-
})
|
|
26
|
-
}),
|
|
27
|
-
Common.createSurface({
|
|
28
|
-
id: `${meta.id}/status-bar--r1-footer`,
|
|
29
|
-
role: "status-bar--r1-footer",
|
|
30
|
-
component: () => /* @__PURE__ */ React.createElement(StatusBarActions, null)
|
|
31
|
-
}),
|
|
32
|
-
Common.createSurface({
|
|
33
|
-
id: `${meta.id}/header-end`,
|
|
34
|
-
role: "header-end",
|
|
35
|
-
component: () => /* @__PURE__ */ React.createElement(VersionNumber, null)
|
|
36
|
-
})
|
|
37
|
-
])));
|
|
38
|
-
export {
|
|
39
|
-
react_surface_default as default
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=react-surface-RNK64YYP.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/react';\n\nimport { StatusBarActions, StatusBarPanel, VersionNumber } from '../../components';\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: `${meta.id}/status-bar`,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n Common.createSurface({\n id: `${meta.id}/status-bar--r0-footer`,\n role: 'status-bar--r0-footer',\n component: () => <Surface role='status' />,\n }),\n Common.createSurface({\n id: `${meta.id}/status-bar--r1-footer`,\n role: 'status-bar--r1-footer',\n component: () => <StatusBarActions />,\n }),\n Common.createSurface({\n id: `${meta.id}/header-end`,\n role: 'header-end',\n component: () => <VersionNumber />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,eAAe;AAKxB,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACC,gBAAAA,IAAAA;EACpB,CAAA;EACAP,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACE,SAAAA;MAAQH,MAAK;;EACjC,CAAA;EACAL,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACG,kBAAAA,IAAAA;EACpB,CAAA;EACAT,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACI,eAAAA,IAAAA;EACpB,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Surface", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "component", "StatusBarPanel", "Surface", "StatusBarActions", "VersionNumber"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAA0B,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAWtD,KAAK,oBAAoB,GAAG,eAAe,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAErG,QAAA,MAAM,eAAe,6GAmBpB,CAAC;AAEF,eAAe,eAAe,CAAC;AAE/B,KAAK,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AA+BxE,eAAO,MAAM,SAAS;;kBAhEgC,SAAS;;;;;;;;;;;;;;;;CAsE9D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,YAAY,yBAmBxB,CAAC;AAEF,QAAA,MAAM,IAAI;;eAEgB,GAAG;;;CAGK,CAAC;AAEnC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBarPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBarPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,eAAO,MAAM,gBAAgB,yBAsB5B,CAAC;AAEF,eAAO,MAAM,cAAc,yBAQ1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VersionNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/VersionNumber.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,eAAO,MAAM,aAAa,yBAkEzB,CAAC"}
|
|
File without changes
|
/package/dist/types/src/components/{StatusBar.stories.d.ts → StatusBar/StatusBar.stories.d.ts}
RENAMED
|
File without changes
|