@powerhousedao/design-system 6.0.0-dev.200 → 6.0.0-dev.202
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/connect/index.js +1 -1
- package/dist/{connect-D2wTJ-7r.js → connect-C_dcbzBz.js} +72 -41
- package/dist/connect-C_dcbzBz.js.map +1 -0
- package/dist/index-U9etrdGX.d.ts.map +1 -1
- package/dist/rwa/index.d.ts +9 -9
- package/dist/rwa/index.d.ts.map +1 -1
- package/dist/rwa/index.js +1 -1
- package/package.json +5 -5
- package/dist/connect-D2wTJ-7r.js.map +0 -1
package/dist/connect/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as ConnectTooltipProvider, r as ConnectTooltip, t as DocumentTimeline } from "../document-timeline-FWiQhfIq.js";
|
|
2
|
-
import { $ as AddLocalDriveForm, A as ReadRequiredModal, At as UploadFileListContainer, B as ConnectDeleteItemModal, Bt as Disclosure, C as PackageManagerInput, Ct as sharingTypeOptions, D as About, Dt as ConnectDropdownMenu, E as DangerZone, Et as EditorActionButtons, F as ConnectionStateBadge, Ft as DocumentToolbar, G as AddDriveModal, Gt as ConnectConfirmationModal, H as CreateDocumentModal, Ht as DebugInspector, I as QueueInspector, It as DocumentStateViewer, J as HomeScreen, Jt as Breadcrumb, K as LoadingScreen, Kt as CookieBanner, L as ProcessorsInspector, Lt as Tabs, M as InspectorModal, Mt as UploadFileItem, N as RemotesInspector, Nt as ConnectReplaceDuplicateModal, O as DependencyVersions, Ot as DropZoneWrapper, P as ChannelInspector, Pt as useDrop, Q as AddRemoteDriveForm, Qt as AccountPopover, R as ObjectInspectorModal, Rt as TabContent, S as PackageManagerListItem, St as normalNodeOptionsMap, T as DefaultEditorSelect, Tt as EditorUndoRedoButtons, U as AddRemoteDriveModal, Ut as DBExplorer, V as ConnectDeleteDriveModal, Vt as DefaultEditorLoader, W as AddLocalDriveModal, Wt as ConnectSelect, X as HomeScreenItem, Xt as NodeInput, Y as HomeScreenAddDriveItem, Yt as Breadcrumbs, Z as HomeBackgroundImage, Zt as AnimatedLoader, _ as ClearStorageSettingsRow, _t as defaultNodeOptions, a as
|
|
2
|
+
import { $ as AddLocalDriveForm, A as ReadRequiredModal, At as UploadFileListContainer, B as ConnectDeleteItemModal, Bt as Disclosure, C as PackageManagerInput, Ct as sharingTypeOptions, D as About, Dt as ConnectDropdownMenu, E as DangerZone, Et as EditorActionButtons, F as ConnectionStateBadge, Ft as DocumentToolbar, G as AddDriveModal, Gt as ConnectConfirmationModal, H as CreateDocumentModal, Ht as DebugInspector, I as QueueInspector, It as DocumentStateViewer, J as HomeScreen, Jt as Breadcrumb, K as LoadingScreen, Kt as CookieBanner, L as ProcessorsInspector, Lt as Tabs, M as InspectorModal, Mt as UploadFileItem, N as RemotesInspector, Nt as ConnectReplaceDuplicateModal, O as DependencyVersions, Ot as DropZoneWrapper, P as ChannelInspector, Pt as useDrop, Q as AddRemoteDriveForm, Qt as AccountPopover, R as ObjectInspectorModal, Rt as TabContent, S as PackageManagerListItem, St as normalNodeOptionsMap, T as DefaultEditorSelect, Tt as EditorUndoRedoButtons, U as AddRemoteDriveModal, Ut as DBExplorer, V as ConnectDeleteDriveModal, Vt as DefaultEditorLoader, W as AddLocalDriveModal, Wt as ConnectSelect, X as HomeScreenItem, Xt as NodeInput, Y as HomeScreenAddDriveItem, Yt as Breadcrumbs, Z as HomeBackgroundImage, Zt as AnimatedLoader, _ as ClearStorageSettingsRow, _t as defaultNodeOptions, a as ConnectSidebarHeader, at as FileItem, b as PackageManager, bt as nodeOptionsMap, c as SidebarLogin, ct as ERROR, d as ConnectSearchBar, dt as SUCCESS, et as Toggle, f as RevisionHistory, ft as SYNCING, g as SettingsModalOld, gt as defaultDriveOptions, h as ConnectUpgradeDriveModal, ht as debugNodeOptionsMap, i as ConnectSidebar, it as FolderItem, j as PackageInstallModal, jt as UploadFileList, k as verifyPackageJsonFields, kt as DropZone, l as SidebarAddDriveItem, lt as INITIAL_SYNC, m as useEns, mt as debugNodeOptions, n as removeSuccessFiles, nt as Footer, o as ConnectSidebarFooter, ot as SyncStatusIcon, p as formatEthAddress, pt as syncStatuses, q as IntegrityInspector, qt as Combobox, r as sortFilesByStatus, rt as FooterLink, s as SidebarUser, st as CONFLICT, t as getFolderStatus, tt as FormInput, u as SidebarItem, ut as MISSING, v as SettingsRow, vt as locationInfoByLocation, w as DefaultEditor, wt as ENSAvatar, x as PackageManagerList, xt as normalNodeOptions, y as SettingsModal, yt as nodeOptions, z as DriveSettingsModal, zt as Divider } from "../connect-C_dcbzBz.js";
|
|
3
3
|
export { About, AccountPopover, AddDriveModal, AddLocalDriveForm, AddLocalDriveModal, AddRemoteDriveForm, AddRemoteDriveModal, AnimatedLoader, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, ClearStorageSettingsRow, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, IntegrityInspector, LoadingScreen, MISSING, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageManager, PackageManagerInput, PackageManagerList, PackageManagerListItem, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SettingsModalOld, SettingsRow, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, Toggle, UploadFileItem, UploadFileList, UploadFileListContainer, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, formatEthAddress, getFolderStatus, locationInfoByLocation, nodeOptions, nodeOptionsMap, normalNodeOptions, normalNodeOptionsMap, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useDrop, useEns, verifyPackageJsonFields };
|
|
@@ -127,10 +127,24 @@ function Breadcrumbs() {
|
|
|
127
127
|
return /* @__PURE__ */ jsxs("div", {
|
|
128
128
|
className: "flex h-9 flex-row items-center gap-2 p-6 text-gray-500",
|
|
129
129
|
children: [
|
|
130
|
-
hasSelectedDrive && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
hasSelectedDrive && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
131
|
+
/* @__PURE__ */ jsx("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
"aria-label": "Back to home",
|
|
134
|
+
title: "Back to home",
|
|
135
|
+
className: "flex items-center justify-center rounded-md p-1 transition-colors hover:bg-gray-100 hover:text-gray-800",
|
|
136
|
+
onClick: () => setSelectedDrive(void 0),
|
|
137
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
138
|
+
name: "ArrowLeft",
|
|
139
|
+
size: 14
|
|
140
|
+
})
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ jsx(Breadcrumb, {
|
|
143
|
+
name: selectedDrive.state.global.name,
|
|
144
|
+
onClick: () => setSelectedDrive(selectedDrive)
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ jsx("span", { children: "/" })
|
|
147
|
+
] }),
|
|
134
148
|
hasNodePath && selectedNodePath.map((node) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Breadcrumb, {
|
|
135
149
|
name: node.name,
|
|
136
150
|
onClick: () => setSelectedNode(node)
|
|
@@ -7269,6 +7283,55 @@ function Header(props) {
|
|
|
7269
7283
|
});
|
|
7270
7284
|
}
|
|
7271
7285
|
//#endregion
|
|
7286
|
+
//#region src/connect/hooks/use-ens.ts
|
|
7287
|
+
const ensCache = /* @__PURE__ */ new Map();
|
|
7288
|
+
function fetchEns(address) {
|
|
7289
|
+
const cached = ensCache.get(address);
|
|
7290
|
+
if (cached) return cached;
|
|
7291
|
+
const promise = fetch(`https://api.ensdata.net/${address}`).then((res) => {
|
|
7292
|
+
if (!res.ok) throw new Error(`ENS lookup failed: ${res.status}`);
|
|
7293
|
+
return res.json();
|
|
7294
|
+
}).catch((err) => {
|
|
7295
|
+
ensCache.delete(address);
|
|
7296
|
+
throw err instanceof Error ? err : /* @__PURE__ */ new Error("ENS lookup failed");
|
|
7297
|
+
});
|
|
7298
|
+
ensCache.set(address, promise);
|
|
7299
|
+
return promise;
|
|
7300
|
+
}
|
|
7301
|
+
function useEns(address) {
|
|
7302
|
+
const [data, setData] = useState();
|
|
7303
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
7304
|
+
const [error, setError] = useState();
|
|
7305
|
+
useEffect(() => {
|
|
7306
|
+
if (!address) {
|
|
7307
|
+
setData(void 0);
|
|
7308
|
+
setError(void 0);
|
|
7309
|
+
return;
|
|
7310
|
+
}
|
|
7311
|
+
let cancelled = false;
|
|
7312
|
+
setIsLoading(true);
|
|
7313
|
+
setError(void 0);
|
|
7314
|
+
fetchEns(address).then((json) => {
|
|
7315
|
+
if (cancelled) return;
|
|
7316
|
+
setData(json);
|
|
7317
|
+
}).catch((err) => {
|
|
7318
|
+
if (cancelled) return;
|
|
7319
|
+
setError(err instanceof Error ? err : /* @__PURE__ */ new Error("ENS lookup failed"));
|
|
7320
|
+
}).finally(() => {
|
|
7321
|
+
if (cancelled) return;
|
|
7322
|
+
setIsLoading(false);
|
|
7323
|
+
});
|
|
7324
|
+
return () => {
|
|
7325
|
+
cancelled = true;
|
|
7326
|
+
};
|
|
7327
|
+
}, [address]);
|
|
7328
|
+
return {
|
|
7329
|
+
data,
|
|
7330
|
+
isLoading,
|
|
7331
|
+
error
|
|
7332
|
+
};
|
|
7333
|
+
}
|
|
7334
|
+
//#endregion
|
|
7272
7335
|
//#region src/connect/utils/address.ts
|
|
7273
7336
|
function formatEthAddress(address) {
|
|
7274
7337
|
return `${address.slice(0, 7)}...${address.slice(-5)}`;
|
|
@@ -7278,6 +7341,7 @@ function formatEthAddress(address) {
|
|
|
7278
7341
|
function Address(props) {
|
|
7279
7342
|
const { address, chainId } = props;
|
|
7280
7343
|
const [, copy] = useCopyToClipboard();
|
|
7344
|
+
const { data: ensData } = useEns(address);
|
|
7281
7345
|
if (!address) return null;
|
|
7282
7346
|
const shortenedAddress = formatEthAddress(address);
|
|
7283
7347
|
function handleCopy(text) {
|
|
@@ -7301,7 +7365,8 @@ function Address(props) {
|
|
|
7301
7365
|
className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg bg-gray-100 p-1 text-xs text-slate-100",
|
|
7302
7366
|
children: [/* @__PURE__ */ jsx(ENSAvatar, {
|
|
7303
7367
|
address,
|
|
7304
|
-
chainId
|
|
7368
|
+
chainId,
|
|
7369
|
+
avatarUrl: ensData?.avatar_url ?? void 0
|
|
7305
7370
|
}), shortenedAddress]
|
|
7306
7371
|
})
|
|
7307
7372
|
});
|
|
@@ -8095,40 +8160,6 @@ const ConnectSidebar = ({ onClick, address, ensName, avatarUrl, headerContent, o
|
|
|
8095
8160
|
});
|
|
8096
8161
|
};
|
|
8097
8162
|
//#endregion
|
|
8098
|
-
//#region src/connect/hooks/use-ens.ts
|
|
8099
|
-
function useEns(address) {
|
|
8100
|
-
const [data, setData] = useState();
|
|
8101
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
8102
|
-
const [error, setError] = useState();
|
|
8103
|
-
useEffect(() => {
|
|
8104
|
-
if (!address) {
|
|
8105
|
-
setData(void 0);
|
|
8106
|
-
setError(void 0);
|
|
8107
|
-
return;
|
|
8108
|
-
}
|
|
8109
|
-
const controller = new AbortController();
|
|
8110
|
-
setIsLoading(true);
|
|
8111
|
-
setError(void 0);
|
|
8112
|
-
fetch(`https://api.ensdata.net/${address}`, { signal: controller.signal }).then((res) => {
|
|
8113
|
-
if (!res.ok) throw new Error(`ENS lookup failed: ${res.status}`);
|
|
8114
|
-
return res.json();
|
|
8115
|
-
}).then((json) => {
|
|
8116
|
-
setData(json);
|
|
8117
|
-
}).catch((err) => {
|
|
8118
|
-
if (err instanceof DOMException && err.name === "AbortError") return;
|
|
8119
|
-
setError(err instanceof Error ? err : /* @__PURE__ */ new Error("ENS lookup failed"));
|
|
8120
|
-
}).finally(() => {
|
|
8121
|
-
setIsLoading(false);
|
|
8122
|
-
});
|
|
8123
|
-
return () => controller.abort();
|
|
8124
|
-
}, [address]);
|
|
8125
|
-
return {
|
|
8126
|
-
data,
|
|
8127
|
-
isLoading,
|
|
8128
|
-
error
|
|
8129
|
-
};
|
|
8130
|
-
}
|
|
8131
|
-
//#endregion
|
|
8132
8163
|
//#region src/connect/utils/get-folder-status.ts
|
|
8133
8164
|
/**
|
|
8134
8165
|
* Retrieves the sync status of a folder based on its path and their children files.
|
|
@@ -8175,6 +8206,6 @@ const removeSuccessFiles = (files) => {
|
|
|
8175
8206
|
return files.filter((file) => file.status !== "SUCCESS");
|
|
8176
8207
|
};
|
|
8177
8208
|
//#endregion
|
|
8178
|
-
export { AddLocalDriveForm as $, ReadRequiredModal as A, UploadFileListContainer as At, ConnectDeleteItemModal as B, Disclosure as Bt, PackageManagerInput as C, sharingTypeOptions as Ct, About as D, ConnectDropdownMenu as Dt, DangerZone as E, EditorActionButtons as Et, ConnectionStateBadge as F, DocumentToolbar as Ft, AddDriveModal as G, ConnectConfirmationModal as Gt, CreateDocumentModal as H, DebugInspector as Ht, QueueInspector as I, DocumentStateViewer as It, HomeScreen as J, Breadcrumb as Jt, LoadingScreen as K, CookieBanner as Kt, ProcessorsInspector as L, Tabs as Lt, InspectorModal as M, UploadFileItem as Mt, RemotesInspector as N, ConnectReplaceDuplicateModal as Nt, DependencyVersions as O, DropZoneWrapper as Ot, ChannelInspector as P, useDrop as Pt, AddRemoteDriveForm as Q, AccountPopover as Qt, ObjectInspectorModal as R, TabContent as Rt, PackageManagerListItem as S, normalNodeOptionsMap as St, DefaultEditorSelect as T, EditorUndoRedoButtons as Tt, AddRemoteDriveModal as U, DBExplorer as Ut, ConnectDeleteDriveModal as V, DefaultEditorLoader as Vt, AddLocalDriveModal as W, ConnectSelect as Wt, HomeScreenItem as X, NodeInput as Xt, HomeScreenAddDriveItem as Y, Breadcrumbs as Yt, HomeBackgroundImage as Z, AnimatedLoader as Zt, ClearStorageSettingsRow as _, defaultNodeOptions as _t,
|
|
8209
|
+
export { AddLocalDriveForm as $, ReadRequiredModal as A, UploadFileListContainer as At, ConnectDeleteItemModal as B, Disclosure as Bt, PackageManagerInput as C, sharingTypeOptions as Ct, About as D, ConnectDropdownMenu as Dt, DangerZone as E, EditorActionButtons as Et, ConnectionStateBadge as F, DocumentToolbar as Ft, AddDriveModal as G, ConnectConfirmationModal as Gt, CreateDocumentModal as H, DebugInspector as Ht, QueueInspector as I, DocumentStateViewer as It, HomeScreen as J, Breadcrumb as Jt, LoadingScreen as K, CookieBanner as Kt, ProcessorsInspector as L, Tabs as Lt, InspectorModal as M, UploadFileItem as Mt, RemotesInspector as N, ConnectReplaceDuplicateModal as Nt, DependencyVersions as O, DropZoneWrapper as Ot, ChannelInspector as P, useDrop as Pt, AddRemoteDriveForm as Q, AccountPopover as Qt, ObjectInspectorModal as R, TabContent as Rt, PackageManagerListItem as S, normalNodeOptionsMap as St, DefaultEditorSelect as T, EditorUndoRedoButtons as Tt, AddRemoteDriveModal as U, DBExplorer as Ut, ConnectDeleteDriveModal as V, DefaultEditorLoader as Vt, AddLocalDriveModal as W, ConnectSelect as Wt, HomeScreenItem as X, NodeInput as Xt, HomeScreenAddDriveItem as Y, Breadcrumbs as Yt, HomeBackgroundImage as Z, AnimatedLoader as Zt, ClearStorageSettingsRow as _, defaultNodeOptions as _t, ConnectSidebarHeader as a, FileItem as at, PackageManager as b, nodeOptionsMap as bt, SidebarLogin as c, ERROR as ct, ConnectSearchBar as d, SUCCESS as dt, Toggle as et, RevisionHistory as f, SYNCING as ft, SettingsModalOld as g, defaultDriveOptions as gt, ConnectUpgradeDriveModal as h, debugNodeOptionsMap as ht, ConnectSidebar as i, FolderItem as it, PackageInstallModal as j, UploadFileList as jt, verifyPackageJsonFields as k, DropZone as kt, SidebarAddDriveItem as l, INITIAL_SYNC as lt, useEns as m, debugNodeOptions as mt, removeSuccessFiles as n, Footer as nt, ConnectSidebarFooter as o, SyncStatusIcon as ot, formatEthAddress as p, syncStatuses as pt, IntegrityInspector as q, Combobox as qt, sortFilesByStatus as r, FooterLink as rt, SidebarUser as s, CONFLICT as st, getFolderStatus as t, FormInput as tt, SidebarItem as u, MISSING as ut, SettingsRow as v, locationInfoByLocation as vt, DefaultEditor as w, ENSAvatar as wt, PackageManagerList as x, normalNodeOptions as xt, SettingsModal as y, nodeOptions as yt, DriveSettingsModal as z, Divider as zt };
|
|
8179
8210
|
|
|
8180
|
-
//# sourceMappingURL=connect-
|
|
8211
|
+
//# sourceMappingURL=connect-C_dcbzBz.js.map
|