@powerhousedao/design-system 4.1.0-dev.80 → 4.1.0-dev.81
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/src/connect/components/drop-zone/drop-zone-wrapper.d.ts +4 -0
- package/dist/src/connect/components/drop-zone/drop-zone-wrapper.d.ts.map +1 -0
- package/dist/src/connect/components/drop-zone/drop-zone-wrapper.js +16 -0
- package/dist/src/connect/components/drop-zone/drop-zone-wrapper.js.map +1 -0
- package/dist/src/connect/components/drop-zone/index.d.ts +1 -1
- package/dist/src/connect/components/drop-zone/index.d.ts.map +1 -1
- package/dist/src/connect/components/drop-zone/index.js +1 -1
- package/dist/src/connect/components/drop-zone/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/src/connect/components/drop-zone/withDropZone.d.ts +0 -4
- package/dist/src/connect/components/drop-zone/withDropZone.d.ts.map +0 -1
- package/dist/src/connect/components/drop-zone/withDropZone.js +0 -19
- package/dist/src/connect/components/drop-zone/withDropZone.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/design-system",
|
|
3
|
-
"version": "4.1.0-dev.
|
|
3
|
+
"version": "4.1.0-dev.81",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"tailwindcss": "^4.1.14",
|
|
86
86
|
"vite": "^7.1.9",
|
|
87
87
|
"vitest": "^3.2.4",
|
|
88
|
-
"@powerhousedao/config": "4.1.0-dev.
|
|
89
|
-
"
|
|
90
|
-
"
|
|
88
|
+
"@powerhousedao/config": "4.1.0-dev.81",
|
|
89
|
+
"@powerhousedao/reactor-browser": "4.1.0-dev.81",
|
|
90
|
+
"document-drive": "4.1.0-dev.81"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"react": "^19.2.0",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"wagmi": "^2.12.17",
|
|
136
136
|
"world-countries": "^5.0.0",
|
|
137
137
|
"zod": "^3.24.3",
|
|
138
|
-
"document-model": "4.1.0-dev.
|
|
138
|
+
"document-model": "4.1.0-dev.81"
|
|
139
139
|
},
|
|
140
140
|
"scripts": {
|
|
141
141
|
"tsc": "tsc",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DriveEditorProps } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import type { ComponentType } from "react";
|
|
3
|
-
export declare function withDropZone<T extends DriveEditorProps>(WrappedComponent: ComponentType<T>): ComponentType<T>;
|
|
4
|
-
//# sourceMappingURL=withDropZone.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withDropZone.d.ts","sourceRoot":"","sources":["../../../../../src/connect/components/drop-zone/withDropZone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,gCAAgC,CAAC;AAMxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,wBAAgB,YAAY,CAAC,CAAC,SAAS,gBAAgB,EACrD,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,GACjC,aAAa,CAAC,CAAC,CAAC,CAoClB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DropZone } from "@powerhousedao/design-system";
|
|
3
|
-
import { setSelectedNode, useOnDropFile, useSelectedDriveId, } from "@powerhousedao/reactor-browser";
|
|
4
|
-
export function withDropZone(WrappedComponent) {
|
|
5
|
-
const WithDropZoneComponent = (props) => {
|
|
6
|
-
const driveId = useSelectedDriveId();
|
|
7
|
-
const onDropFile = useOnDropFile(props.editorConfig?.documentTypes);
|
|
8
|
-
const onAddFile = async (file, parent, onProgress, resolveConflict) => {
|
|
9
|
-
return await onDropFile(file, onProgress, resolveConflict);
|
|
10
|
-
};
|
|
11
|
-
if (props.editorConfig?.dragAndDrop?.enabled) {
|
|
12
|
-
return (_jsx(DropZone, { driveId: driveId, onAddFile: onAddFile, setSelectedNode: setSelectedNode, useLocalStorage: true, style: { height: "100%" }, children: _jsx(WrappedComponent, { ...props }) }));
|
|
13
|
-
}
|
|
14
|
-
return _jsx(WrappedComponent, { ...props });
|
|
15
|
-
};
|
|
16
|
-
WithDropZoneComponent.displayName = `withDropZone(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
17
|
-
return WithDropZoneComponent;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=withDropZone.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withDropZone.js","sourceRoot":"","sources":["../../../../../src/connect/components/drop-zone/withDropZone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMxD,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,MAAM,UAAU,YAAY,CAC1B,gBAAkC;IAElC,MAAM,qBAAqB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACzC,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAEpE,MAAM,SAAS,GAAG,KAAK,EACrB,IAAU,EACV,MAAW,EACX,UAAuC,EACvC,eAAoC,EACpC,EAAE;YACF,OAAO,MAAM,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF,IAAI,KAAK,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;YAC7C,OAAO,CACL,KAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,IAAI,EACrB,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAEzB,KAAC,gBAAgB,OAAK,KAAK,GAAI,GACtB,CACZ,CAAC;QACJ,CAAC;QAED,OAAO,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC;IACzC,CAAC,CAAC;IAEF,qBAAqB,CAAC,WAAW,GAAG,gBAClC,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,IAAI,IAAI,WAC3D,GAAG,CAAC;IAEJ,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|