@powerhousedao/common 1.6.0 → 1.8.0
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DocumentStory, EditorStoryArgs, EditorStoryComponent, type EditorStoryProps } from "@powerhousedao/builder-tools/editor-utils";
|
|
2
|
-
import { Decorator, Meta } from "@storybook/react";
|
|
3
|
-
import { DocumentDriveDocument, DocumentDriveLocalState, DocumentDriveState } from "document-drive";
|
|
4
|
-
import { ExtendedState, PartialState } from "document-model";
|
|
1
|
+
import { type DocumentStory, type EditorStoryArgs, type EditorStoryComponent, type EditorStoryProps } from "@powerhousedao/builder-tools/editor-utils";
|
|
2
|
+
import { type Decorator, type Meta } from "@storybook/react";
|
|
3
|
+
import { type DocumentDriveDocument, type DocumentDriveLocalState, type DocumentDriveState } from "document-drive";
|
|
4
|
+
import { type ExtendedState, type PartialState } from "document-model";
|
|
5
5
|
export declare function createDriveStory(Editor: EditorStoryComponent<DocumentDriveDocument>, initialState?: ExtendedState<PartialState<DocumentDriveState>, PartialState<DocumentDriveLocalState>>, additionalStoryArgs?: EditorStoryArgs<DocumentDriveDocument>, decorators?: Decorator<EditorStoryProps<DocumentDriveDocument>>[]): {
|
|
6
6
|
meta: Meta<typeof Editor>;
|
|
7
7
|
CreateDocumentStory: DocumentStory<DocumentDriveDocument>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../../editors/utils/storybook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,
|
|
1
|
+
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../../editors/utils/storybook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,2CAA2C,CAAC;AAQnD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AA8FxB,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"}
|
|
@@ -53,10 +53,13 @@ const DriveContextDecorator = (Story, context) => {
|
|
|
53
53
|
selectNode: setSelectedNode,
|
|
54
54
|
useSyncStatus: () => "SUCCESS",
|
|
55
55
|
useDriveDocumentState: () => undefined,
|
|
56
|
-
useDriveDocumentStates: () =>
|
|
56
|
+
useDriveDocumentStates: () => [{}, () => Promise.resolve()],
|
|
57
57
|
addFile() {
|
|
58
58
|
throw new Error("addFile not implemented");
|
|
59
59
|
},
|
|
60
|
+
addDocument() {
|
|
61
|
+
throw new Error("addDocument not implemented");
|
|
62
|
+
},
|
|
60
63
|
showCreateDocumentModal(documentModel) {
|
|
61
64
|
return Promise.resolve({
|
|
62
65
|
name: `New ${documentModel.documentModel.name}`,
|