@powerhousedao/common 1.4.0 → 1.5.1
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/editors/generic-drive-explorer/editor.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/editor.js +5 -3
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.js +1 -1
- package/dist/editors/utils/storybook.d.ts.map +1 -1
- package/dist/editors/utils/storybook.js +2 -0
- package/dist/package.json +2 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAuB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,GACrD,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAuB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,GACrD,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,2CA8G3C"}
|
|
@@ -10,10 +10,12 @@ import { DriveLayout } from "./components/layout.js";
|
|
|
10
10
|
import { SearchBar } from "./components/search-bar.js";
|
|
11
11
|
export default function Editor(props) {
|
|
12
12
|
const { document, dispatch, className, children } = props;
|
|
13
|
-
const { state: { global: { id }, }, } = document;
|
|
14
|
-
const { showSearchBar, isAllowedToCreateDocuments, documentModels, showCreateDocumentModal, } = useDriveContext();
|
|
13
|
+
const { state: { global: { id: driveId }, }, } = document;
|
|
14
|
+
const { showSearchBar, isAllowedToCreateDocuments, documentModels, showCreateDocumentModal, useDriveDocumentStates, useDriveDocumentState, } = useDriveContext();
|
|
15
15
|
const { driveNodes, selectedNode, selectedNodePath, getNodeById, setSelectedNode, } = useUiNodesContext();
|
|
16
|
-
const
|
|
16
|
+
const driveDocumentStates = useDriveDocumentStates({ driveId });
|
|
17
|
+
console.log("states", driveDocumentStates);
|
|
18
|
+
const driveNode = useMemo(() => driveNodes.find((n) => n.id === driveId), [driveNodes, driveId]);
|
|
17
19
|
const { addDocument, addFile, addFolder, renameNode, deleteNode, moveNode, copyNode, duplicateNode, } = useDriveActionsWithUiNodes(document, dispatch);
|
|
18
20
|
const onCreateDocument = useCallback(async (documentModel) => {
|
|
19
21
|
const { name } = await showCreateDocumentModal(documentModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-drive-explorer.stories.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generic-drive-explorer.stories.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,MAAM,MAAM,aAAa,CAAC;AAKjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAG7B,CAAC;AACF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,MAAM,CAAuB,CAAC;AAElE,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createDriveStoryWithUINodes } from "
|
|
1
|
+
import { createDriveStoryWithUINodes } from "../utils/storybook.js";
|
|
2
2
|
import Editor from "./editor.js";
|
|
3
3
|
const { meta: _meta, CreateDocumentStory } = createDriveStoryWithUINodes(Editor);
|
|
4
4
|
const meta = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../../editors/utils/storybook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,KAAK,gBAAgB,EACtB,MAAM,2CAA2C,CAAC;AAQnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAGnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../../editors/utils/storybook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,KAAK,gBAAgB,EACtB,MAAM,2CAA2C,CAAC;AAQnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAGnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAC;AA2FxB,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,EACnD,YAAY,CAAC,EAAE,aAAa,CAC1B,YAAY,CAAC,kBAAkB,CAAC,EAChC,YAAY,CAAC,uBAAuB,CAAC,CACtC,EACD,mBAAmB,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,EAC5D,UAAU,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,EAAE,GAChE;IACD,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;IAC1B,mBAAmB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC3D,CAWA;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,EACnD,YAAY,CAAC,EAAE,aAAa,CAC1B,YAAY,CAAC,kBAAkB,CAAC,EAChC,YAAY,CAAC,uBAAuB,CAAC,CACtC,EACD,mBAAmB,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,EAC5D,UAAU,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,EAAE,GAChE;IACD,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;IAC1B,mBAAmB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC3D,CAWA"}
|
|
@@ -52,6 +52,8 @@ const DriveContextDecorator = (Story, context) => {
|
|
|
52
52
|
selectedNode,
|
|
53
53
|
selectNode: setSelectedNode,
|
|
54
54
|
useSyncStatus: () => "SUCCESS",
|
|
55
|
+
useDriveDocumentState: () => undefined,
|
|
56
|
+
useDriveDocumentStates: () => ({}),
|
|
55
57
|
addFile() {
|
|
56
58
|
throw new Error("addFile not implemented");
|
|
57
59
|
},
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -39,13 +39,8 @@
|
|
|
39
39
|
"react-i18next": "^13.5.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@powerhousedao/analytics-engine-core": "^0.3.2",
|
|
43
|
-
"@powerhousedao/codegen": "workspace:*",
|
|
44
42
|
"@powerhousedao/config": "workspace:*",
|
|
45
|
-
"@powerhousedao/reactor-api": "workspace:*",
|
|
46
43
|
"@powerhousedao/reactor-browser": "workspace:*",
|
|
47
|
-
"@powerhousedao/reactor-local": "workspace:*",
|
|
48
|
-
"@powerhousedao/scalars": "workspace:*",
|
|
49
44
|
"@types/node": "^22.10.9",
|
|
50
45
|
"@types/react": "^18.3.18",
|
|
51
46
|
"@types/wicg-file-system-access": "^2020.9.6",
|
|
@@ -53,7 +48,6 @@
|
|
|
53
48
|
"clsx": "^2.1.1",
|
|
54
49
|
"document-model": "workspace:*",
|
|
55
50
|
"package-manager-detector": "^0.2.8",
|
|
56
|
-
"pm2": "^5.4.3",
|
|
57
51
|
"postcss": "^8.5.1",
|
|
58
52
|
"react": "^18.3.1",
|
|
59
53
|
"react-dom": "^18.3.1",
|
|
@@ -61,9 +55,6 @@
|
|
|
61
55
|
"tailwind-merge": "^3.0.1",
|
|
62
56
|
"tailwind-scrollbar": "^3.1.0",
|
|
63
57
|
"tailwindcss": "^3.4.17",
|
|
64
|
-
"tailwindcss-animate": "^1.0.7"
|
|
65
|
-
"tsx": "^4.19.2",
|
|
66
|
-
"uuid": "^11.0.5",
|
|
67
|
-
"zod": "^3.24.2"
|
|
58
|
+
"tailwindcss-animate": "^1.0.7"
|
|
68
59
|
}
|
|
69
60
|
}
|