@powerhousedao/common 4.0.1 → 4.1.0-dev.2
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/components/file-content-view.d.ts +8 -7
- package/dist/editors/generic-drive-explorer/components/file-content-view.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/components/file-content-view.js +2 -2
- package/dist/editors/generic-drive-explorer/components/file-content-view.js.map +1 -1
- package/dist/editors/generic-drive-explorer/components/folder-view.d.ts +9 -12
- package/dist/editors/generic-drive-explorer/components/folder-view.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/components/folder-view.js +14 -42
- package/dist/editors/generic-drive-explorer/components/folder-view.js.map +1 -1
- package/dist/editors/generic-drive-explorer/editor.d.ts +3 -7
- package/dist/editors/generic-drive-explorer/editor.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/editor.js +20 -49
- package/dist/editors/generic-drive-explorer/editor.js.map +1 -1
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.d.ts +3 -2
- 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 +2 -2
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.js.map +1 -1
- package/dist/editors/styles.css +0 -52
- package/dist/editors/utils/index.d.ts +0 -1
- package/dist/editors/utils/index.d.ts.map +1 -1
- package/dist/editors/utils/index.js +0 -1
- package/dist/editors/utils/index.js.map +1 -1
- package/dist/editors/utils/storybook.d.ts +1 -5
- package/dist/editors/utils/storybook.d.ts.map +1 -1
- package/dist/editors/utils/storybook.js +40 -81
- package/dist/editors/utils/storybook.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +19 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -19
- package/dist/editors/utils/uiNodes.d.ts +0 -7
- package/dist/editors/utils/uiNodes.d.ts.map +0 -1
- package/dist/editors/utils/uiNodes.js +0 -69
- package/dist/editors/utils/uiNodes.js.map +0 -1
- package/dist/state/atoms.d.ts +0 -133
- package/dist/state/atoms.d.ts.map +0 -1
- package/dist/state/atoms.js +0 -315
- package/dist/state/atoms.js.map +0 -1
- package/dist/state/document-model-modules.d.ts +0 -10
- package/dist/state/document-model-modules.d.ts.map +0 -1
- package/dist/state/document-model-modules.js +0 -82
- package/dist/state/document-model-modules.js.map +0 -1
- package/dist/state/documents.d.ts +0 -17
- package/dist/state/documents.d.ts.map +0 -1
- package/dist/state/documents.js +0 -40
- package/dist/state/documents.js.map +0 -1
- package/dist/state/drives.d.ts +0 -57
- package/dist/state/drives.d.ts.map +0 -1
- package/dist/state/drives.js +0 -194
- package/dist/state/drives.js.map +0 -1
- package/dist/state/editor-modules.d.ts +0 -7
- package/dist/state/editor-modules.d.ts.map +0 -1
- package/dist/state/editor-modules.js +0 -40
- package/dist/state/editor-modules.js.map +0 -1
- package/dist/state/folders.d.ts +0 -6
- package/dist/state/folders.d.ts.map +0 -1
- package/dist/state/folders.js +0 -11
- package/dist/state/folders.js.map +0 -1
- package/dist/state/index.d.ts +0 -16
- package/dist/state/index.d.ts.map +0 -1
- package/dist/state/index.js +0 -16
- package/dist/state/index.js.map +0 -1
- package/dist/state/modals.d.ts +0 -38
- package/dist/state/modals.d.ts.map +0 -1
- package/dist/state/modals.js +0 -32
- package/dist/state/modals.js.map +0 -1
- package/dist/state/nodes.d.ts +0 -29
- package/dist/state/nodes.d.ts.map +0 -1
- package/dist/state/nodes.js +0 -121
- package/dist/state/nodes.js.map +0 -1
- package/dist/state/ph-packages.d.ts +0 -10
- package/dist/state/ph-packages.d.ts.map +0 -1
- package/dist/state/ph-packages.js +0 -26
- package/dist/state/ph-packages.js.map +0 -1
- package/dist/state/processors.d.ts +0 -4
- package/dist/state/processors.d.ts.map +0 -1
- package/dist/state/processors.js +0 -26
- package/dist/state/processors.js.map +0 -1
- package/dist/state/reactor.d.ts +0 -16
- package/dist/state/reactor.d.ts.map +0 -1
- package/dist/state/reactor.js +0 -78
- package/dist/state/reactor.js.map +0 -1
- package/dist/state/store-provider.d.ts +0 -18
- package/dist/state/store-provider.d.ts.map +0 -1
- package/dist/state/store-provider.js +0 -24
- package/dist/state/store-provider.js.map +0 -1
- package/dist/state/store.d.ts +0 -14
- package/dist/state/store.d.ts.map +0 -1
- package/dist/state/store.js +0 -7
- package/dist/state/store.js.map +0 -1
- package/dist/state/syncing.d.ts +0 -3
- package/dist/state/syncing.d.ts.map +0 -1
- package/dist/state/syncing.js +0 -13
- package/dist/state/syncing.js.map +0 -1
- package/dist/state/types.d.ts +0 -73
- package/dist/state/types.d.ts.map +0 -1
- package/dist/state/types.js +0 -2
- package/dist/state/types.js.map +0 -1
- package/dist/state/utils.d.ts +0 -31
- package/dist/state/utils.d.ts.map +0 -1
- package/dist/state/utils.js +0 -108
- package/dist/state/utils.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/common",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.1.0-dev.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,40 +22,47 @@
|
|
|
22
22
|
},
|
|
23
23
|
"description": "The Powerhouse Common package contains the basic document model and drive UI (App) that is required to get started with Connect and visualize private & public apps.",
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"jotai": "^2.12.5",
|
|
26
|
-
"jotai-devtools": "^0.12.0",
|
|
27
|
-
"jotai-effect": "^2.0.4",
|
|
28
|
-
"jotai-optics": "^0.4.0",
|
|
29
25
|
"react": "^18.3.1",
|
|
30
26
|
"react-dom": "^18.3.1",
|
|
31
|
-
"@powerhousedao/reactor-browser": "4.0.
|
|
27
|
+
"@powerhousedao/reactor-browser": "4.1.0-dev.2"
|
|
32
28
|
},
|
|
33
29
|
"dependencies": {
|
|
34
30
|
"@tanstack/react-virtual": "^3.8.1",
|
|
35
31
|
"react-i18next": "^13.5.0",
|
|
36
|
-
"
|
|
37
|
-
"@powerhousedao/
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"document-model": "4.0.
|
|
32
|
+
"@powerhousedao/builder-tools": "4.1.0-dev.2",
|
|
33
|
+
"@powerhousedao/state": "4.1.0-dev.2",
|
|
34
|
+
"@powerhousedao/design-system": "4.1.0-dev.2",
|
|
35
|
+
"document-drive": "4.1.0-dev.2",
|
|
36
|
+
"document-model": "4.1.0-dev.2"
|
|
41
37
|
},
|
|
42
38
|
"devDependencies": {
|
|
39
|
+
"@storybook/addon-actions": "^8.6.7",
|
|
40
|
+
"@storybook/addon-docs": "^8.6.3",
|
|
41
|
+
"@storybook/addon-essentials": "^8.6.7",
|
|
42
|
+
"@storybook/addon-interactions": "^8.6.7",
|
|
43
|
+
"@storybook/addon-links": "^8.6.7",
|
|
44
|
+
"@storybook/addon-themes": "^8.6.7",
|
|
45
|
+
"@storybook/blocks": "^8.6.7",
|
|
46
|
+
"@storybook/components": "^8.6.7",
|
|
47
|
+
"@storybook/manager-api": "^8.6.7",
|
|
48
|
+
"@storybook/preview-api": "^8.6.7",
|
|
49
|
+
"@storybook/react": "^8.6.7",
|
|
50
|
+
"@storybook/react-vite": "^8.6.7",
|
|
51
|
+
"@storybook/test": "^8.6.7",
|
|
52
|
+
"@storybook/types": "^8.6.7",
|
|
43
53
|
"@tailwindcss/cli": "^4.1.4",
|
|
44
54
|
"@tailwindcss/vite": "^4.1.4",
|
|
45
55
|
"@types/node": "^22.15.17",
|
|
46
56
|
"@types/react": "^18.3.18",
|
|
47
|
-
"@types/slug": "^5.0.9",
|
|
48
57
|
"@types/wicg-file-system-access": "^2020.9.6",
|
|
49
58
|
"autoprefixer": "^10.4.20",
|
|
50
59
|
"clsx": "^2.1.1",
|
|
51
|
-
"jotai": "^2.12.5",
|
|
52
|
-
"jotai-devtools": "^0.12.0",
|
|
53
|
-
"jotai-effect": "^2.0.4",
|
|
54
|
-
"jotai-optics": "^0.4.0",
|
|
55
60
|
"package-manager-detector": "^0.2.8",
|
|
56
61
|
"postcss": "^8.5.1",
|
|
57
62
|
"react": "^18.3.1",
|
|
58
63
|
"react-dom": "^18.3.1",
|
|
64
|
+
"storybook": "^8.6.7",
|
|
65
|
+
"storybook-addon-pseudo-states": "^4.0.4",
|
|
59
66
|
"storybook-mock-date-decorator": "^2.0.6",
|
|
60
67
|
"tailwind-merge": "^3.0.2",
|
|
61
68
|
"tailwindcss": "^4.0.9",
|
|
@@ -64,9 +71,9 @@
|
|
|
64
71
|
"vite": "^6.3.3",
|
|
65
72
|
"vitest": "^3.1.2",
|
|
66
73
|
"zod": "^3.24.3",
|
|
67
|
-
"@powerhousedao/config": "4.0.
|
|
68
|
-
"@powerhousedao/reactor-browser": "4.0.
|
|
69
|
-
"document-model": "4.0.
|
|
74
|
+
"@powerhousedao/config": "4.1.0-dev.2",
|
|
75
|
+
"@powerhousedao/reactor-browser": "4.1.0-dev.2",
|
|
76
|
+
"document-model": "4.1.0-dev.2"
|
|
70
77
|
},
|
|
71
78
|
"scripts": {
|
|
72
79
|
"dev": "ph-cli dev --config-file ./powerhouse.config.json",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type UiDriveNode, type UiNode } from "@powerhousedao/reactor-browser/uiNodes/types";
|
|
2
|
-
import { type DocumentDriveDocument, type Node } from "document-drive";
|
|
3
|
-
export declare function sortUiNodesByName(a: UiNode, b: UiNode): number;
|
|
4
|
-
export declare function makeNodeSlugFromNodeName(name: string): string;
|
|
5
|
-
export declare function makeUiNode(node: Node | undefined, drive: DocumentDriveDocument, withChildren: boolean): UiNode;
|
|
6
|
-
export declare function makeUiDriveNode(drive: DocumentDriveDocument): UiDriveNode;
|
|
7
|
-
//# sourceMappingURL=uiNodes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uiNodes.d.ts","sourceRoot":"","sources":["../../../editors/utils/uiNodes.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,MAAM,EACZ,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,IAAI,EACV,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAErD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,UAEpD;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,KAAK,EAAE,qBAAqB,EAC5B,YAAY,EAAE,OAAO,GACpB,MAAM,CAqDR;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,qBAAqB,GAAG,WAAW,CAUzE"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { DRIVE, FILE, LOCAL, } from "@powerhousedao/reactor-browser/uiNodes/constants";
|
|
2
|
-
import { isFolderNode, } from "document-drive";
|
|
3
|
-
export function sortUiNodesByName(a, b) {
|
|
4
|
-
return a.name.localeCompare(b.name);
|
|
5
|
-
}
|
|
6
|
-
export function makeNodeSlugFromNodeName(name) {
|
|
7
|
-
return name.replaceAll(/\s/g, "-");
|
|
8
|
-
}
|
|
9
|
-
export function makeUiNode(node, drive, withChildren) {
|
|
10
|
-
const { id, slug } = drive.header;
|
|
11
|
-
const { name, icon, nodes } = drive.state.global;
|
|
12
|
-
const { sharingType: _sharingType, availableOffline } = drive.state.local;
|
|
13
|
-
const __sharingType = _sharingType?.toUpperCase();
|
|
14
|
-
const sharingType = __sharingType === "PRIVATE" ? LOCAL : __sharingType;
|
|
15
|
-
// TODO: handle sync status
|
|
16
|
-
// const normalizedDriveSyncStatus =
|
|
17
|
-
// syncStatus === 'INITIAL_SYNC'
|
|
18
|
-
// ? 'SYNCING'
|
|
19
|
-
// : syncStatus;
|
|
20
|
-
if (node) {
|
|
21
|
-
const uiNode = {
|
|
22
|
-
...node,
|
|
23
|
-
slug: makeNodeSlugFromNodeName(node.name),
|
|
24
|
-
driveId: id,
|
|
25
|
-
parentFolder: node.parentFolder || id,
|
|
26
|
-
kind: node.kind.toUpperCase(),
|
|
27
|
-
syncStatus: undefined,
|
|
28
|
-
sharingType,
|
|
29
|
-
};
|
|
30
|
-
if (uiNode.kind === FILE) {
|
|
31
|
-
return uiNode;
|
|
32
|
-
}
|
|
33
|
-
else if (isFolderNode(node)) {
|
|
34
|
-
return {
|
|
35
|
-
...uiNode,
|
|
36
|
-
children: withChildren
|
|
37
|
-
? nodes
|
|
38
|
-
.filter((n) => n.parentFolder === node.id)
|
|
39
|
-
.map((n) => makeUiNode(n, drive, false))
|
|
40
|
-
: [],
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
id,
|
|
46
|
-
name,
|
|
47
|
-
slug: slug || null,
|
|
48
|
-
kind: DRIVE,
|
|
49
|
-
nodeMap: {},
|
|
50
|
-
sharingType,
|
|
51
|
-
syncStatus: undefined,
|
|
52
|
-
availableOffline,
|
|
53
|
-
icon,
|
|
54
|
-
parentFolder: null,
|
|
55
|
-
driveId: id,
|
|
56
|
-
children: nodes
|
|
57
|
-
.filter((n) => n.parentFolder)
|
|
58
|
-
.map((n) => makeUiNode(n, drive, false)),
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export function makeUiDriveNode(drive) {
|
|
62
|
-
const driveNode = makeUiNode(undefined, drive, true);
|
|
63
|
-
driveNode.nodeMap = drive.state.global.nodes.reduce((acc, node) => {
|
|
64
|
-
acc[node.id] = makeUiNode(node, drive, true);
|
|
65
|
-
return acc;
|
|
66
|
-
}, {});
|
|
67
|
-
return driveNode;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=uiNodes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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EAAE,EAAE;QACZ,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC7C,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAA4B,CAC7B,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/state/atoms.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { type DocumentDriveDocument, type FolderNode, type IDocumentDriveServer, type Node } from "document-drive";
|
|
2
|
-
import { type ProcessorManager } from "document-drive/processors/processor-manager";
|
|
3
|
-
import { type DocumentModelModule, type EditorModule, type PHDocument } from "document-model";
|
|
4
|
-
import type { PHPackage } from "./ph-packages.js";
|
|
5
|
-
import { type ConnectConfig } from "./types.js";
|
|
6
|
-
/** Returns a promise of the reactor instance if it is set, otherwise suspends until it is set. */
|
|
7
|
-
export declare const reactorAtom: import("jotai").Atom<Promise<IDocumentDriveServer | undefined>>;
|
|
8
|
-
/** Sets the reactor instance. Only runs if the baseReactorAtom is NOT_SET. */
|
|
9
|
-
export declare const initializeReactorAtom: import("jotai").WritableAtom<null, [reactor: IDocumentDriveServer | undefined], void> & {
|
|
10
|
-
init: null;
|
|
11
|
-
};
|
|
12
|
-
/** Returns a Loadable of the reactor instance. */
|
|
13
|
-
export declare const loadableReactorAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<IDocumentDriveServer | undefined>>>;
|
|
14
|
-
/** Returns a resolved promise of the reactor instance. */
|
|
15
|
-
export declare const unwrappedReactorAtom: import("jotai").Atom<IDocumentDriveServer | undefined>;
|
|
16
|
-
/** Holds a promise of the drives for a given reactor.
|
|
17
|
-
*
|
|
18
|
-
* Suspends until the reactor is set.
|
|
19
|
-
*
|
|
20
|
-
* Does not provide a direct setter, instead it uses `atomWithRefresh` which will refetch the drives from the reactor when called.
|
|
21
|
-
* See https://jotai.org/docs/utilities/resettable#atomwithrefresh for more details.
|
|
22
|
-
*/
|
|
23
|
-
export declare const drivesAtom: import("jotai").WritableAtom<Promise<DocumentDriveDocument[]>, [], void>;
|
|
24
|
-
/** Returns a Loadable of the drives for a given reactor. */
|
|
25
|
-
export declare const loadableDrivesAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<DocumentDriveDocument[]>>>;
|
|
26
|
-
/** Returns a resolved promise of the drives for a given reactor. */
|
|
27
|
-
export declare const unwrappedDrivesAtom: import("jotai").WritableAtom<DocumentDriveDocument[] | undefined, [], void>;
|
|
28
|
-
/** Returns a promise of the selected drive.
|
|
29
|
-
*
|
|
30
|
-
* Provides a setter which receives a drive id and updates the baseSelectedDriveIdAtom.
|
|
31
|
-
*
|
|
32
|
-
* Suspends until the reactor's drives are set and the selected drive id is set.
|
|
33
|
-
* If the selected drive id is set as undefined, returns a resolved promise of undefined.
|
|
34
|
-
*
|
|
35
|
-
* When the selected drive is set, the selected node id is also set to undefined, since by definition selecting a new drive means navigating to the root of the new drive.
|
|
36
|
-
*/
|
|
37
|
-
export declare const selectedDriveAtom: import("jotai").WritableAtom<DocumentDriveDocument | Promise<DocumentDriveDocument | undefined> | undefined, [driveId: string | undefined], void>;
|
|
38
|
-
/** Returns a Loadable of the selected drive. */
|
|
39
|
-
export declare const loadableSelectedDriveAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<DocumentDriveDocument | Promise<DocumentDriveDocument | undefined> | undefined>>;
|
|
40
|
-
/** Returns a resolved promise of the selected drive. */
|
|
41
|
-
export declare const unwrappedSelectedDriveAtom: import("jotai").WritableAtom<DocumentDriveDocument | undefined, [driveId: string | undefined], void>;
|
|
42
|
-
/** Holds a promise of the nodes for the selected drive.
|
|
43
|
-
*
|
|
44
|
-
* Derived from selectedDrive.state.global.nodes.
|
|
45
|
-
*
|
|
46
|
-
* Suspends until the selected drive is set.
|
|
47
|
-
*
|
|
48
|
-
* If the selected drive is set as undefined, returns a resolved promise of undefined.
|
|
49
|
-
*
|
|
50
|
-
* Does not provide a setter, since it is derived from the selected drive.
|
|
51
|
-
*/
|
|
52
|
-
export declare const nodesAtom: import("jotai").Atom<Promise<Node[] | undefined>>;
|
|
53
|
-
export declare const loadableNodesAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<Node[] | undefined>>>;
|
|
54
|
-
export declare const unwrappedNodesAtom: import("jotai").Atom<Node[] | undefined>;
|
|
55
|
-
/** Holds the selected node id.
|
|
56
|
-
*
|
|
57
|
-
* This id comes from the drive's nodes, which can be the id for a document or for a meta item such as a folder.
|
|
58
|
-
*
|
|
59
|
-
* Like all base atoms, it is not meant to be accessed or updated directly.
|
|
60
|
-
* Starts off with the sentinel value NOT_SET.
|
|
61
|
-
*
|
|
62
|
-
* When this value changes, the data for the selected node is re-fetched from the nodes atom.
|
|
63
|
-
*/
|
|
64
|
-
export declare const selectedNodeIdAtom: import("jotai").PrimitiveAtom<string | undefined> & {
|
|
65
|
-
init: string | undefined;
|
|
66
|
-
};
|
|
67
|
-
/** Sets the selected node via a node id. */
|
|
68
|
-
export declare const setSelectedNodeAtom: import("jotai").WritableAtom<null, [nodeId: string | undefined], void> & {
|
|
69
|
-
init: null;
|
|
70
|
-
};
|
|
71
|
-
/** Returns a promise of the selected folder.
|
|
72
|
-
*
|
|
73
|
-
* A "folder" is a meta item that contains other nodes. It is not a document itself. Folder nodes have a `kind` of `folder` or `FOLDER`.
|
|
74
|
-
*
|
|
75
|
-
* Suspends until the nodes are set and the selected node id is set.
|
|
76
|
-
* If the selected node id is set as undefined, returns a resolved promise of undefined.
|
|
77
|
-
*
|
|
78
|
-
* Does not provide a setter, since it is derived from the selected node id.
|
|
79
|
-
*/
|
|
80
|
-
export declare const selectedFolderAtom: import("jotai").Atom<FolderNode | Promise<FolderNode | undefined> | undefined>;
|
|
81
|
-
/** Returns a Loadable of the selected folder. */
|
|
82
|
-
export declare const loadableSelectedFolderAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<FolderNode | Promise<FolderNode | undefined> | undefined>>;
|
|
83
|
-
/** Returns a resolved promise of the selected folder. */
|
|
84
|
-
export declare const unwrappedSelectedFolderAtom: import("jotai").Atom<FolderNode | undefined>;
|
|
85
|
-
/** Holds a promise of the documents for the selected drive.
|
|
86
|
-
*
|
|
87
|
-
* Suspends until the selected drive is set.
|
|
88
|
-
*
|
|
89
|
-
* If the selected drive is set as undefined, returns a resolved promise of undefined.
|
|
90
|
-
*
|
|
91
|
-
* Does not provide a setter, instead it uses `atomWithRefresh` which will refetch the documents from the reactor when called.
|
|
92
|
-
* See https://jotai.org/docs/utilities/resettable#atomwithrefresh for more details.
|
|
93
|
-
*/
|
|
94
|
-
export declare const documentsAtom: import("jotai").WritableAtom<Promise<PHDocument[]>, [], void>;
|
|
95
|
-
/** Returns a Loadable of the documents for the selected drive. */
|
|
96
|
-
export declare const loadableDocumentsAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<PHDocument[]>>>;
|
|
97
|
-
/** Returns a resolved promise of the documents for the selected drive. */
|
|
98
|
-
export declare const unwrappedDocumentsAtom: import("jotai").WritableAtom<PHDocument[] | undefined, [], void>;
|
|
99
|
-
/** Returns a promise of the selected document.
|
|
100
|
-
*
|
|
101
|
-
* A "document" is a PHDocument. This id is the document's id, and this id will also be found in the drive's nodes. We use the same id for finding a node in a drive and for identifying a document in the reactor.
|
|
102
|
-
*
|
|
103
|
-
* Suspends until the documents are set and the selected node id is set.
|
|
104
|
-
* If the selected node id is set as undefined, returns a resolved promise of undefined.
|
|
105
|
-
*
|
|
106
|
-
* Does not provide a setter, since it is derived from the selected node id.
|
|
107
|
-
*/
|
|
108
|
-
export declare const selectedDocumentAtom: import("jotai").Atom<PHDocument | Promise<PHDocument | undefined> | undefined>;
|
|
109
|
-
/** Returns a Loadable of the selected document. */
|
|
110
|
-
export declare const loadableSelectedDocumentAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<PHDocument | Promise<PHDocument | undefined> | undefined>>;
|
|
111
|
-
/** Returns a resolved promise of the selected document. */
|
|
112
|
-
export declare const unwrappedSelectedDocumentAtom: import("jotai").Atom<PHDocument | undefined>;
|
|
113
|
-
export declare const phPackagesAtom: import("jotai").PrimitiveAtom<Promise<PHPackage[] | undefined>> & {
|
|
114
|
-
init: Promise<PHPackage[] | undefined>;
|
|
115
|
-
};
|
|
116
|
-
export declare const setPhPackagesAtom: import("jotai").WritableAtom<null, [phPackages: PHPackage[] | Promise<PHPackage[] | undefined> | undefined], void> & {
|
|
117
|
-
init: null;
|
|
118
|
-
};
|
|
119
|
-
export declare const loadablePhPackagesAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<PHPackage[] | undefined>>>;
|
|
120
|
-
export declare const unwrappedPhPackagesAtom: import("jotai").WritableAtom<PHPackage[] | undefined, [Promise<PHPackage[] | undefined> | ((prev: Promise<PHPackage[] | undefined>) => Promise<PHPackage[] | undefined>)], void>;
|
|
121
|
-
export declare const documentModelModulesAtom: import("jotai").WritableAtom<Promise<DocumentModelModule[] | undefined>, [], void>;
|
|
122
|
-
export declare const loadableDocumentModelModulesAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<DocumentModelModule[] | undefined>>>;
|
|
123
|
-
export declare const unwrappedDocumentModelModulesAtom: import("jotai").WritableAtom<DocumentModelModule[] | undefined, [], void>;
|
|
124
|
-
export declare const editorModulesAtom: import("jotai").WritableAtom<Promise<EditorModule<PHDocument<unknown, unknown, import("document-model").Action<string, unknown, import("document-model").OperationScope>>, unknown, Record<string, unknown>>[] | undefined>, [], void>;
|
|
125
|
-
export declare const loadableEditorModulesAtom: import("jotai").Atom<import("jotai/vanilla/utils/loadable").Loadable<Promise<EditorModule<PHDocument<unknown, unknown, import("document-model").Action<string, unknown, import("document-model").OperationScope>>, unknown, Record<string, unknown>>[] | undefined>>>;
|
|
126
|
-
export declare const unwrappedEditorModulesAtom: import("jotai").WritableAtom<EditorModule<PHDocument<unknown, unknown, import("document-model").Action<string, unknown, import("document-model").OperationScope>>, unknown, Record<string, unknown>>[] | undefined, [], void>;
|
|
127
|
-
export declare const processorManagerAtom: import("jotai").PrimitiveAtom<ProcessorManager | undefined> & {
|
|
128
|
-
init: ProcessorManager | undefined;
|
|
129
|
-
};
|
|
130
|
-
export declare const configAtom: import("jotai").PrimitiveAtom<ConnectConfig> & {
|
|
131
|
-
init: ConnectConfig;
|
|
132
|
-
};
|
|
133
|
-
//# sourceMappingURL=atoms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../state/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,IAAI,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,YAAY,CAAC;AAerE,kGAAkG;AAClG,eAAO,MAAM,WAAW,iEASvB,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB;;CAUjC,CAAC;AAGF,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,kHAAwB,CAAC;AAGzD,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,wDAAsB,CAAC;AAKxD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,0EAqBrB,CAAC;AAGH,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB,yGAAuB,CAAC;AAGvD,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,6EAAqB,CAAC;AAatD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,mJAoB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GH,eAAO,MAAM,yBAAyB,uQAA8B,CAAC;AAErE,eAAO,MAAM,0BAA0B,+NAA4B,CAAC;AAKpE,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAKF,eAAO,MAAM,UAAU;;CAqCrB,CAAC"}
|
package/dist/state/atoms.js
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
import { atom } from "jotai";
|
|
2
|
-
import { atomWithRefresh, loadable, unwrap } from "jotai/utils";
|
|
3
|
-
import { isFolderNodeKind } from "./nodes.js";
|
|
4
|
-
import { NOT_SET, suspendUntilSet } from "./utils.js";
|
|
5
|
-
/* Reactor */
|
|
6
|
-
/** Holds the reactor instance.
|
|
7
|
-
*
|
|
8
|
-
* Like all base atoms, it is not meant to be accessed or updated directly.
|
|
9
|
-
* Starts off with the sentinel value NOT_SET.
|
|
10
|
-
*/
|
|
11
|
-
const baseReactorAtom = atom(NOT_SET);
|
|
12
|
-
baseReactorAtom.debugLabel = "baseReactorAtom";
|
|
13
|
-
/** Returns a promise of the reactor instance if it is set, otherwise suspends until it is set. */
|
|
14
|
-
export const reactorAtom = atom(async (get) => {
|
|
15
|
-
const reactor = get(baseReactorAtom);
|
|
16
|
-
// Suspends until the reactor is set.
|
|
17
|
-
if (reactor === NOT_SET)
|
|
18
|
-
return suspendUntilSet();
|
|
19
|
-
return reactor;
|
|
20
|
-
});
|
|
21
|
-
reactorAtom.debugLabel = "reactorAtom";
|
|
22
|
-
/** Sets the reactor instance. Only runs if the baseReactorAtom is NOT_SET. */
|
|
23
|
-
export const initializeReactorAtom = atom(null, (get, set, reactor) => {
|
|
24
|
-
const baseReactor = get(baseReactorAtom);
|
|
25
|
-
// Only runs if the baseReactorAtom is NOT_SET.
|
|
26
|
-
if (baseReactor === NOT_SET) {
|
|
27
|
-
set(baseReactorAtom, reactor);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
initializeReactorAtom.debugLabel = "setReactorAtom";
|
|
31
|
-
/** Returns a Loadable of the reactor instance. */
|
|
32
|
-
export const loadableReactorAtom = loadable(reactorAtom);
|
|
33
|
-
loadableReactorAtom.debugLabel = "loadableReactorAtom";
|
|
34
|
-
/** Returns a resolved promise of the reactor instance. */
|
|
35
|
-
export const unwrappedReactorAtom = unwrap(reactorAtom);
|
|
36
|
-
unwrappedReactorAtom.debugLabel = "unwrappedReactorAtom";
|
|
37
|
-
/* Drives */
|
|
38
|
-
/** Holds a promise of the drives for a given reactor.
|
|
39
|
-
*
|
|
40
|
-
* Suspends until the reactor is set.
|
|
41
|
-
*
|
|
42
|
-
* Does not provide a direct setter, instead it uses `atomWithRefresh` which will refetch the drives from the reactor when called.
|
|
43
|
-
* See https://jotai.org/docs/utilities/resettable#atomwithrefresh for more details.
|
|
44
|
-
*/
|
|
45
|
-
export const drivesAtom = atomWithRefresh(async (get) => {
|
|
46
|
-
const loadableReactor = get(loadableReactorAtom);
|
|
47
|
-
// Suspends until the reactor is set.
|
|
48
|
-
if (loadableReactor.state !== "hasData")
|
|
49
|
-
return suspendUntilSet();
|
|
50
|
-
const reactor = loadableReactor.data;
|
|
51
|
-
// If the reactor is not set, returns an empty array.
|
|
52
|
-
if (!reactor)
|
|
53
|
-
return [];
|
|
54
|
-
const driveIds = await reactor.getDrives();
|
|
55
|
-
const drives = new Array();
|
|
56
|
-
for (const driveId of driveIds) {
|
|
57
|
-
const drive = await reactor.getDrive(driveId);
|
|
58
|
-
drives.push(drive);
|
|
59
|
-
}
|
|
60
|
-
return drives;
|
|
61
|
-
});
|
|
62
|
-
drivesAtom.debugLabel = "drivesAtom";
|
|
63
|
-
/** Returns a Loadable of the drives for a given reactor. */
|
|
64
|
-
export const loadableDrivesAtom = loadable(drivesAtom);
|
|
65
|
-
loadableDrivesAtom.debugLabel = "loadableDrivesAtom";
|
|
66
|
-
/** Returns a resolved promise of the drives for a given reactor. */
|
|
67
|
-
export const unwrappedDrivesAtom = unwrap(drivesAtom);
|
|
68
|
-
unwrappedDrivesAtom.debugLabel = "unwrappedDrivesAtom";
|
|
69
|
-
/** Holds the selected drive id.
|
|
70
|
-
*
|
|
71
|
-
* Like all base atoms, it is not meant to be accessed or updated directly.
|
|
72
|
-
* Starts off with the sentinel value NOT_SET.
|
|
73
|
-
*
|
|
74
|
-
* When this value changes, the data for the selected drive is re-fetched from the drives atom.
|
|
75
|
-
*/
|
|
76
|
-
const baseSelectedDriveIdAtom = atom(NOT_SET);
|
|
77
|
-
baseSelectedDriveIdAtom.debugLabel = "baseSelectedDriveIdAtom";
|
|
78
|
-
/** Returns a promise of the selected drive.
|
|
79
|
-
*
|
|
80
|
-
* Provides a setter which receives a drive id and updates the baseSelectedDriveIdAtom.
|
|
81
|
-
*
|
|
82
|
-
* Suspends until the reactor's drives are set and the selected drive id is set.
|
|
83
|
-
* If the selected drive id is set as undefined, returns a resolved promise of undefined.
|
|
84
|
-
*
|
|
85
|
-
* When the selected drive is set, the selected node id is also set to undefined, since by definition selecting a new drive means navigating to the root of the new drive.
|
|
86
|
-
*/
|
|
87
|
-
export const selectedDriveAtom = atom((get) => {
|
|
88
|
-
const driveId = get(baseSelectedDriveIdAtom);
|
|
89
|
-
const loadableDrives = get(loadableDrivesAtom);
|
|
90
|
-
// Suspends until the reactor's drives are set and the selected drive id is set.
|
|
91
|
-
if (driveId === NOT_SET || loadableDrives.state !== "hasData")
|
|
92
|
-
return suspendUntilSet();
|
|
93
|
-
const drives = loadableDrives.data;
|
|
94
|
-
return drives.find((drive) => drive.header.id === driveId);
|
|
95
|
-
}, (_get, set, driveId) => {
|
|
96
|
-
// Updates the baseSelectedDriveIdAtom.
|
|
97
|
-
set(baseSelectedDriveIdAtom, driveId);
|
|
98
|
-
// Resets the selected node id.
|
|
99
|
-
set(selectedNodeIdAtom, undefined);
|
|
100
|
-
});
|
|
101
|
-
selectedDriveAtom.debugLabel = "selectedDriveAtom";
|
|
102
|
-
/** Returns a Loadable of the selected drive. */
|
|
103
|
-
export const loadableSelectedDriveAtom = loadable(selectedDriveAtom);
|
|
104
|
-
loadableSelectedDriveAtom.debugLabel = "loadableSelectedDriveAtom";
|
|
105
|
-
/** Returns a resolved promise of the selected drive. */
|
|
106
|
-
export const unwrappedSelectedDriveAtom = unwrap(selectedDriveAtom);
|
|
107
|
-
unwrappedSelectedDriveAtom.debugLabel = "unwrappedSelectedDriveAtom";
|
|
108
|
-
/* Nodes */
|
|
109
|
-
/** Holds a promise of the nodes for the selected drive.
|
|
110
|
-
*
|
|
111
|
-
* Derived from selectedDrive.state.global.nodes.
|
|
112
|
-
*
|
|
113
|
-
* Suspends until the selected drive is set.
|
|
114
|
-
*
|
|
115
|
-
* If the selected drive is set as undefined, returns a resolved promise of undefined.
|
|
116
|
-
*
|
|
117
|
-
* Does not provide a setter, since it is derived from the selected drive.
|
|
118
|
-
*/
|
|
119
|
-
export const nodesAtom = atom(async (get) => {
|
|
120
|
-
const loadableSelectedDrive = get(loadableSelectedDriveAtom);
|
|
121
|
-
// Suspends until the selected drive is set.
|
|
122
|
-
if (loadableSelectedDrive.state !== "hasData")
|
|
123
|
-
return suspendUntilSet();
|
|
124
|
-
const drive = loadableSelectedDrive.data;
|
|
125
|
-
return drive?.state.global.nodes;
|
|
126
|
-
});
|
|
127
|
-
nodesAtom.debugLabel = "nodesAtom";
|
|
128
|
-
export const loadableNodesAtom = loadable(nodesAtom);
|
|
129
|
-
loadableNodesAtom.debugLabel = "loadableNodesAtom";
|
|
130
|
-
export const unwrappedNodesAtom = unwrap(nodesAtom);
|
|
131
|
-
unwrappedNodesAtom.debugLabel = "unwrappedNodesAtom";
|
|
132
|
-
/** Holds the selected node id.
|
|
133
|
-
*
|
|
134
|
-
* This id comes from the drive's nodes, which can be the id for a document or for a meta item such as a folder.
|
|
135
|
-
*
|
|
136
|
-
* Like all base atoms, it is not meant to be accessed or updated directly.
|
|
137
|
-
* Starts off with the sentinel value NOT_SET.
|
|
138
|
-
*
|
|
139
|
-
* When this value changes, the data for the selected node is re-fetched from the nodes atom.
|
|
140
|
-
*/
|
|
141
|
-
export const selectedNodeIdAtom = atom(NOT_SET);
|
|
142
|
-
selectedNodeIdAtom.debugLabel = "selectedNodeIdAtom";
|
|
143
|
-
/** Sets the selected node via a node id. */
|
|
144
|
-
export const setSelectedNodeAtom = atom(null, (_get, set, nodeId) => {
|
|
145
|
-
set(selectedNodeIdAtom, nodeId);
|
|
146
|
-
});
|
|
147
|
-
setSelectedNodeAtom.debugLabel = "setSelectedNodeAtom";
|
|
148
|
-
/** Returns a promise of the selected folder.
|
|
149
|
-
*
|
|
150
|
-
* A "folder" is a meta item that contains other nodes. It is not a document itself. Folder nodes have a `kind` of `folder` or `FOLDER`.
|
|
151
|
-
*
|
|
152
|
-
* Suspends until the nodes are set and the selected node id is set.
|
|
153
|
-
* If the selected node id is set as undefined, returns a resolved promise of undefined.
|
|
154
|
-
*
|
|
155
|
-
* Does not provide a setter, since it is derived from the selected node id.
|
|
156
|
-
*/
|
|
157
|
-
export const selectedFolderAtom = atom((get) => {
|
|
158
|
-
const loadableNodes = get(loadableNodesAtom);
|
|
159
|
-
const nodeId = get(selectedNodeIdAtom);
|
|
160
|
-
// Suspends until the nodes are set and the selected node id is set.
|
|
161
|
-
if (nodeId === NOT_SET || loadableNodes.state !== "hasData")
|
|
162
|
-
return suspendUntilSet();
|
|
163
|
-
const nodes = loadableNodes.data;
|
|
164
|
-
// Filters the nodes to only include folder nodes.
|
|
165
|
-
const folderNodes = nodes?.filter(isFolderNodeKind);
|
|
166
|
-
// Returns the folder node with the selected node id.
|
|
167
|
-
return folderNodes?.find((node) => node.id === nodeId);
|
|
168
|
-
});
|
|
169
|
-
selectedFolderAtom.debugLabel = "selectedFolderAtom";
|
|
170
|
-
/** Returns a Loadable of the selected folder. */
|
|
171
|
-
export const loadableSelectedFolderAtom = loadable(selectedFolderAtom);
|
|
172
|
-
loadableSelectedFolderAtom.debugLabel = "loadableSelectedFolderAtom";
|
|
173
|
-
/** Returns a resolved promise of the selected folder. */
|
|
174
|
-
export const unwrappedSelectedFolderAtom = unwrap(selectedFolderAtom);
|
|
175
|
-
unwrappedSelectedFolderAtom.debugLabel = "unwrappedSelectedFolderAtom";
|
|
176
|
-
/* Documents */
|
|
177
|
-
/** Holds a promise of the documents for the selected drive.
|
|
178
|
-
*
|
|
179
|
-
* Suspends until the selected drive is set.
|
|
180
|
-
*
|
|
181
|
-
* If the selected drive is set as undefined, returns a resolved promise of undefined.
|
|
182
|
-
*
|
|
183
|
-
* Does not provide a setter, instead it uses `atomWithRefresh` which will refetch the documents from the reactor when called.
|
|
184
|
-
* See https://jotai.org/docs/utilities/resettable#atomwithrefresh for more details.
|
|
185
|
-
*/
|
|
186
|
-
export const documentsAtom = atomWithRefresh(async (get) => {
|
|
187
|
-
const loadableReactor = get(loadableReactorAtom);
|
|
188
|
-
const loadableDrive = get(loadableSelectedDriveAtom);
|
|
189
|
-
// Suspends until the selected drive is set.
|
|
190
|
-
if (loadableReactor.state !== "hasData" || loadableDrive.state !== "hasData")
|
|
191
|
-
return suspendUntilSet();
|
|
192
|
-
const reactor = loadableReactor.data;
|
|
193
|
-
const driveId = loadableDrive.data?.header.id;
|
|
194
|
-
// If the reactor or drive id is not set, returns an empty array.
|
|
195
|
-
if (!reactor || !driveId)
|
|
196
|
-
return [];
|
|
197
|
-
const documentIds = await reactor.getDocuments(driveId);
|
|
198
|
-
const documents = await Promise.all(documentIds.map((id) => reactor.getDocument(driveId, id)));
|
|
199
|
-
return documents;
|
|
200
|
-
});
|
|
201
|
-
documentsAtom.debugLabel = "documentsAtom";
|
|
202
|
-
/** Returns a Loadable of the documents for the selected drive. */
|
|
203
|
-
export const loadableDocumentsAtom = loadable(documentsAtom);
|
|
204
|
-
loadableDocumentsAtom.debugLabel = "loadableDocumentsAtom";
|
|
205
|
-
/** Returns a resolved promise of the documents for the selected drive. */
|
|
206
|
-
export const unwrappedDocumentsAtom = unwrap(documentsAtom);
|
|
207
|
-
unwrappedDocumentsAtom.debugLabel = "unwrappedDocumentsAtom";
|
|
208
|
-
/** Returns a promise of the selected document.
|
|
209
|
-
*
|
|
210
|
-
* A "document" is a PHDocument. This id is the document's id, and this id will also be found in the drive's nodes. We use the same id for finding a node in a drive and for identifying a document in the reactor.
|
|
211
|
-
*
|
|
212
|
-
* Suspends until the documents are set and the selected node id is set.
|
|
213
|
-
* If the selected node id is set as undefined, returns a resolved promise of undefined.
|
|
214
|
-
*
|
|
215
|
-
* Does not provide a setter, since it is derived from the selected node id.
|
|
216
|
-
*/
|
|
217
|
-
export const selectedDocumentAtom = atom((get) => {
|
|
218
|
-
const loadableDocuments = get(loadableDocumentsAtom);
|
|
219
|
-
const nodeId = get(selectedNodeIdAtom);
|
|
220
|
-
// Suspends until the documents are set and the selected node id is set.
|
|
221
|
-
if (nodeId === NOT_SET || loadableDocuments.state !== "hasData")
|
|
222
|
-
return suspendUntilSet();
|
|
223
|
-
const documents = loadableDocuments.data;
|
|
224
|
-
return documents.find((document) => document.header.id === nodeId);
|
|
225
|
-
});
|
|
226
|
-
selectedDocumentAtom.debugLabel = "selectedDocumentAtom";
|
|
227
|
-
/** Returns a Loadable of the selected document. */
|
|
228
|
-
export const loadableSelectedDocumentAtom = loadable(selectedDocumentAtom);
|
|
229
|
-
loadableSelectedDocumentAtom.debugLabel = "loadableSelectedDocumentAtom";
|
|
230
|
-
/** Returns a resolved promise of the selected document. */
|
|
231
|
-
export const unwrappedSelectedDocumentAtom = unwrap(selectedDocumentAtom);
|
|
232
|
-
unwrappedSelectedDocumentAtom.debugLabel = "unwrappedSelectedDocumentAtom";
|
|
233
|
-
/* PH Packages */
|
|
234
|
-
export const phPackagesAtom = atom(Promise.resolve(undefined));
|
|
235
|
-
phPackagesAtom.debugLabel = "phPackagesAtom";
|
|
236
|
-
export const setPhPackagesAtom = atom(null, (_get, set, phPackages) => {
|
|
237
|
-
set(phPackagesAtom, Promise.resolve(phPackages));
|
|
238
|
-
});
|
|
239
|
-
setPhPackagesAtom.debugLabel = "setPhPackagesAtom";
|
|
240
|
-
export const loadablePhPackagesAtom = loadable(phPackagesAtom);
|
|
241
|
-
loadablePhPackagesAtom.debugLabel = "loadablePhPackagesAtom";
|
|
242
|
-
export const unwrappedPhPackagesAtom = unwrap(phPackagesAtom);
|
|
243
|
-
unwrappedPhPackagesAtom.debugLabel = "unwrappedPhPackagesAtom";
|
|
244
|
-
/* Document Model Modules */
|
|
245
|
-
export const documentModelModulesAtom = atomWithRefresh(async (get) => {
|
|
246
|
-
const loadablePhPackages = get(loadablePhPackagesAtom);
|
|
247
|
-
if (loadablePhPackages.state !== "hasData")
|
|
248
|
-
return suspendUntilSet();
|
|
249
|
-
const phPackages = loadablePhPackages.data;
|
|
250
|
-
return phPackages?.map((p) => p.documentModels).flat();
|
|
251
|
-
});
|
|
252
|
-
documentModelModulesAtom.debugLabel = "documentModelModulesAtom";
|
|
253
|
-
export const loadableDocumentModelModulesAtom = loadable(documentModelModulesAtom);
|
|
254
|
-
loadableDocumentModelModulesAtom.debugLabel =
|
|
255
|
-
"loadableDocumentModelModulesAtom";
|
|
256
|
-
export const unwrappedDocumentModelModulesAtom = unwrap(documentModelModulesAtom);
|
|
257
|
-
unwrappedDocumentModelModulesAtom.debugLabel =
|
|
258
|
-
"unwrappedDocumentModelModulesAtom";
|
|
259
|
-
/* Editors */
|
|
260
|
-
export const editorModulesAtom = atomWithRefresh(async (get) => {
|
|
261
|
-
const loadablePhPackages = get(loadablePhPackagesAtom);
|
|
262
|
-
if (loadablePhPackages.state !== "hasData")
|
|
263
|
-
return suspendUntilSet();
|
|
264
|
-
const phPackages = loadablePhPackages.data;
|
|
265
|
-
return phPackages?.map((p) => p.editors).flat();
|
|
266
|
-
});
|
|
267
|
-
editorModulesAtom.debugLabel = "editorModulesAtom";
|
|
268
|
-
export const loadableEditorModulesAtom = loadable(editorModulesAtom);
|
|
269
|
-
loadableEditorModulesAtom.debugLabel = "loadableEditorModulesAtom";
|
|
270
|
-
export const unwrappedEditorModulesAtom = unwrap(editorModulesAtom);
|
|
271
|
-
unwrappedEditorModulesAtom.debugLabel = "unwrappedEditorModulesAtom";
|
|
272
|
-
/* Processor Manager */
|
|
273
|
-
export const processorManagerAtom = atom(undefined);
|
|
274
|
-
processorManagerAtom.debugLabel = "processorManagerAtom";
|
|
275
|
-
/* Config */
|
|
276
|
-
export const configAtom = atom({
|
|
277
|
-
appVersion: undefined,
|
|
278
|
-
studioMode: false,
|
|
279
|
-
warnOutdatedApp: false,
|
|
280
|
-
routerBasename: undefined,
|
|
281
|
-
analyticsDatabaseName: undefined,
|
|
282
|
-
sentry: {
|
|
283
|
-
dsn: undefined,
|
|
284
|
-
env: undefined,
|
|
285
|
-
tracing: undefined,
|
|
286
|
-
},
|
|
287
|
-
content: {
|
|
288
|
-
showSearchBar: true,
|
|
289
|
-
showDocumentModelSelectionSetting: true,
|
|
290
|
-
},
|
|
291
|
-
drives: {
|
|
292
|
-
addDriveEnabled: true,
|
|
293
|
-
sections: {
|
|
294
|
-
LOCAL: {
|
|
295
|
-
enabled: true,
|
|
296
|
-
allowAdd: true,
|
|
297
|
-
allowDelete: true,
|
|
298
|
-
},
|
|
299
|
-
CLOUD: {
|
|
300
|
-
enabled: true,
|
|
301
|
-
allowAdd: true,
|
|
302
|
-
allowDelete: true,
|
|
303
|
-
},
|
|
304
|
-
PUBLIC: {
|
|
305
|
-
enabled: true,
|
|
306
|
-
allowAdd: true,
|
|
307
|
-
allowDelete: true,
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
gaTrackingId: undefined,
|
|
312
|
-
phCliVersion: undefined,
|
|
313
|
-
});
|
|
314
|
-
configAtom.debugLabel = "configAtom";
|
|
315
|
-
//# sourceMappingURL=atoms.js.map
|
package/dist/state/atoms.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.js","sourceRoot":"","sources":["../../state/atoms.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,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