@powerhousedao/connect 1.0.0-dev.212 → 1.0.0-dev.213
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/.env +1 -0
- package/dist/assets/{app-B4copOtg.js → app-DiHFmipv.js} +838 -644
- package/dist/assets/{app-loader-B6zf9XDU.js → app-loader-CR-NiUOZ.js} +9 -7
- package/dist/assets/{browser-CZOApPej.js → browser-C10aMa50.js} +2937 -909
- package/dist/assets/{ccip-DSVOeeDo.js → ccip-DMxcOGc8.js} +5 -5
- package/dist/assets/{content-gm9A__42.js → content-BFPuAVvX.js} +168 -162
- package/dist/assets/{getEnsName-CH6-GxaA.js → getEnsName-08yGhvFP.js} +75 -55
- package/dist/assets/{index-BC1qgOnG.js → index-BSiq93_2.js} +3 -3
- package/dist/assets/{index-BcQMOuWz.js → index-C6RulKld.js} +3 -3
- package/dist/assets/{index-Dv_4E7Nh.js → index-J6o4darV.js} +88 -2732
- package/dist/assets/{isAddressEqual-D8xUWIQc.js → isAddressEqual-BZ4M2bfj.js} +1 -1
- package/dist/assets/{main.DUq7r3yO.js → main.GY5oyZm-.js} +1 -1
- package/dist/assets/{react-error-boundary.esm-CCUHjIRz.js → react-error-boundary.esm-C6q5J1bx.js} +10 -10
- package/dist/assets/{root-D_xEwT-n.js → root-BWz1808T.js} +7 -7
- package/dist/assets/{router-626xhE7A.js → router-DYMMZqez.js} +7 -7
- package/dist/icon.ico +0 -0
- package/dist/index.html +5 -4
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-QP65GEDP.js → chunk-C5JXP4NO.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-YAO66KBZ.js → chunk-FD4TUZZS.js} +353 -302
- package/dist/modules/@powerhousedao/reactor-browser/chunk-FD4TUZZS.js.map +7 -0
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-VNJW3K7R.js → chunk-GJOMXDVW.js} +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/chunk-GJOMXDVW.js.map +7 -0
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-VHDG2FTR.js → chunk-GXLBC3KA.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-NCCSZUHV.js → chunk-IDBZA52T.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-ENCBIPGB.js → chunk-LCQV2CEG.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-PRKHJCY6.js → chunk-OJYBFBSZ.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-XDWKADEF.js → chunk-UTLXXWAE.js} +5 -5
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-XDWKADEF.js.map → chunk-UTLXXWAE.js.map} +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-GYHJG3BX.js → chunk-WSWYH5W2.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-L7DUL4YO.js → chunk-XNBBEHKQ.js} +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/document-state.js +87 -0
- package/dist/modules/@powerhousedao/reactor-browser/hooks/document-state.js.map +7 -0
- package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
- package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
- package/dist/swEnv.js +1 -0
- package/dist/vite-envs.sh +10 -1
- package/package.json +10 -10
- package/dist/modules/@powerhousedao/reactor-browser/chunk-VNJW3K7R.js.map +0 -7
- package/dist/modules/@powerhousedao/reactor-browser/chunk-YAO66KBZ.js.map +0 -7
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentsState.js +0 -44
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentsState.js.map +0 -7
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-QP65GEDP.js.map → chunk-C5JXP4NO.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-VHDG2FTR.js.map → chunk-GXLBC3KA.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-NCCSZUHV.js.map → chunk-IDBZA52T.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-ENCBIPGB.js.map → chunk-LCQV2CEG.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-PRKHJCY6.js.map → chunk-OJYBFBSZ.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-GYHJG3BX.js.map → chunk-WSWYH5W2.js.map} +0 -0
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-L7DUL4YO.js.map → chunk-XNBBEHKQ.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isFolderNode,
|
|
9
9
|
moveNode,
|
|
10
10
|
updateNode
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UTLXXWAE.js";
|
|
12
12
|
import {
|
|
13
13
|
generateId
|
|
14
14
|
} from "./chunk-LFIXFHHR.js";
|
|
@@ -111,4 +111,4 @@ function useDriveActions(document, dispatch, context) {
|
|
|
111
111
|
export {
|
|
112
112
|
useDriveActions
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-WSWYH5W2.js.map
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-ARAPK5F3.js";
|
|
5
5
|
import {
|
|
6
6
|
useAddDebouncedOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LCQV2CEG.js";
|
|
8
8
|
import {
|
|
9
9
|
useConnectCrypto,
|
|
10
10
|
useConnectDid
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OJYBFBSZ.js";
|
|
12
12
|
import {
|
|
13
13
|
useDocumentDispatch
|
|
14
14
|
} from "./chunk-ULBB7S2G.js";
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
useDocumentEditorProps,
|
|
52
52
|
useDocumentEditor
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-XNBBEHKQ.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
ReadModeContext,
|
|
4
4
|
ReadModeContextProvider,
|
|
5
5
|
useReadModeContext
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-GXLBC3KA.js";
|
|
7
7
|
import "../chunk-DVMSG5VM.js";
|
|
8
8
|
import "../chunk-WARL4IRP.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-UTLXXWAE.js";
|
|
10
10
|
import "../chunk-LFIXFHHR.js";
|
|
11
11
|
import "../chunk-PLDDJCW6.js";
|
|
12
12
|
export {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
ReadModeContext,
|
|
3
3
|
ReadModeContextProvider,
|
|
4
4
|
useReadModeContext
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-GXLBC3KA.js";
|
|
6
6
|
import "../chunk-DVMSG5VM.js";
|
|
7
7
|
import "../chunk-WARL4IRP.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-UTLXXWAE.js";
|
|
9
9
|
import "../chunk-LFIXFHHR.js";
|
|
10
10
|
import "../chunk-PLDDJCW6.js";
|
|
11
11
|
export {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "../chunk-PLDDJCW6.js";
|
|
2
|
+
|
|
3
|
+
// ../../packages/reactor-browser/dist/src/hooks/document-state.js
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
function useDocumentsState(args) {
|
|
6
|
+
const { reactor, driveId, documentIds, options } = args;
|
|
7
|
+
const [statesByDocumentId, setStatesByDocumentId] = useState({});
|
|
8
|
+
const isInitialized = useRef(false);
|
|
9
|
+
const isSubscribed = useRef(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
async function initialize() {
|
|
12
|
+
if (isInitialized.current)
|
|
13
|
+
return;
|
|
14
|
+
if (!reactor || !driveId)
|
|
15
|
+
return;
|
|
16
|
+
isInitialized.current = true;
|
|
17
|
+
const ids = documentIds ?? await reactor.getDocuments(driveId);
|
|
18
|
+
const statesByDocumentId2 = {};
|
|
19
|
+
for (const id of ids) {
|
|
20
|
+
const document = await reactor.getDocument(driveId, id, options);
|
|
21
|
+
statesByDocumentId2[id] = document.state;
|
|
22
|
+
}
|
|
23
|
+
setStatesByDocumentId(statesByDocumentId2);
|
|
24
|
+
}
|
|
25
|
+
void initialize();
|
|
26
|
+
}, [reactor, driveId, options]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (!reactor || !driveId)
|
|
29
|
+
return;
|
|
30
|
+
if (isSubscribed.current)
|
|
31
|
+
return;
|
|
32
|
+
isSubscribed.current = true;
|
|
33
|
+
console.log("subscribing to strandUpdate");
|
|
34
|
+
const unsubscribe = reactor.on("strandUpdate", async (update) => {
|
|
35
|
+
console.log("strandUpdate", update);
|
|
36
|
+
if (documentIds && !documentIds.includes(update.documentId))
|
|
37
|
+
return;
|
|
38
|
+
const updatedDocument = await reactor.getDocument(driveId, update.documentId, options);
|
|
39
|
+
setStatesByDocumentId((prev) => {
|
|
40
|
+
const newStatesByDocumentId = { ...prev };
|
|
41
|
+
newStatesByDocumentId[update.documentId] = updatedDocument.state;
|
|
42
|
+
return newStatesByDocumentId;
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
return unsubscribe;
|
|
46
|
+
}, [reactor, driveId, options]);
|
|
47
|
+
return useMemo(() => statesByDocumentId, [statesByDocumentId]);
|
|
48
|
+
}
|
|
49
|
+
function makeDriveDocumentStatesHook(reactor) {
|
|
50
|
+
const useDriveDocumentStates = useCallback((args) => {
|
|
51
|
+
const { driveId, documentIds, options } = args;
|
|
52
|
+
return useDocumentsState({
|
|
53
|
+
reactor,
|
|
54
|
+
driveId,
|
|
55
|
+
documentIds,
|
|
56
|
+
options
|
|
57
|
+
});
|
|
58
|
+
}, [reactor]);
|
|
59
|
+
return useDriveDocumentStates;
|
|
60
|
+
}
|
|
61
|
+
function makeDriveDocumentStateHook(reactor) {
|
|
62
|
+
const useDriveDocumentState = useCallback((args) => {
|
|
63
|
+
const { driveId, documentId } = args;
|
|
64
|
+
return useDocumentState({
|
|
65
|
+
reactor,
|
|
66
|
+
driveId,
|
|
67
|
+
documentId
|
|
68
|
+
});
|
|
69
|
+
}, [reactor]);
|
|
70
|
+
return useDriveDocumentState;
|
|
71
|
+
}
|
|
72
|
+
function useDocumentState(args) {
|
|
73
|
+
const { reactor, driveId, documentId } = args;
|
|
74
|
+
const state = useDocumentsState({
|
|
75
|
+
reactor,
|
|
76
|
+
driveId,
|
|
77
|
+
documentIds: [documentId]
|
|
78
|
+
});
|
|
79
|
+
return useMemo(() => state[documentId], [state, documentId]);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
makeDriveDocumentStateHook,
|
|
83
|
+
makeDriveDocumentStatesHook,
|
|
84
|
+
useDocumentState,
|
|
85
|
+
useDocumentsState
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=document-state.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../packages/reactor-browser/dist/src/hooks/document-state.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nexport function useDocumentsState(args) {\n const { reactor, driveId, documentIds, options } = args;\n const [statesByDocumentId, setStatesByDocumentId] = useState({});\n const isInitialized = useRef(false);\n const isSubscribed = useRef(false);\n useEffect(() => {\n async function initialize() {\n if (isInitialized.current)\n return;\n if (!reactor || !driveId)\n return;\n isInitialized.current = true;\n const ids = documentIds ?? (await reactor.getDocuments(driveId));\n const statesByDocumentId = {};\n for (const id of ids) {\n const document = await reactor.getDocument(driveId, id, options);\n statesByDocumentId[id] = document.state;\n }\n setStatesByDocumentId(statesByDocumentId);\n }\n void initialize();\n }, [reactor, driveId, options]);\n useEffect(() => {\n if (!reactor || !driveId)\n return;\n if (isSubscribed.current)\n return;\n isSubscribed.current = true;\n console.log(\"subscribing to strandUpdate\");\n const unsubscribe = reactor.on(\"strandUpdate\", async (update) => {\n console.log(\"strandUpdate\", update);\n if (documentIds && !documentIds.includes(update.documentId))\n return;\n const updatedDocument = await reactor.getDocument(driveId, update.documentId, options);\n setStatesByDocumentId((prev) => {\n const newStatesByDocumentId = { ...prev };\n newStatesByDocumentId[update.documentId] = updatedDocument.state;\n return newStatesByDocumentId;\n });\n });\n return unsubscribe;\n }, [reactor, driveId, options]);\n return useMemo(() => statesByDocumentId, [statesByDocumentId]);\n}\nexport function makeDriveDocumentStatesHook(reactor) {\n const useDriveDocumentStates = useCallback((args) => {\n const { driveId, documentIds, options } = args;\n return useDocumentsState({\n reactor,\n driveId,\n documentIds,\n options,\n });\n }, [reactor]);\n return useDriveDocumentStates;\n}\nexport function makeDriveDocumentStateHook(reactor) {\n const useDriveDocumentState = useCallback((args) => {\n const { driveId, documentId } = args;\n return useDocumentState({\n reactor,\n driveId,\n documentId,\n });\n }, [reactor]);\n return useDriveDocumentState;\n}\nexport function useDocumentState(args) {\n const { reactor, driveId, documentId } = args;\n const state = useDocumentsState({\n reactor,\n driveId,\n documentIds: [documentId],\n });\n return useMemo(() => state[documentId], [state, documentId]);\n}\n"],
|
|
5
|
+
"mappings": ";;;AAAA,SAAS,aAAa,WAAW,SAAS,QAAQ,gBAAgB;AAC3D,SAAS,kBAAkB,MAAM;AACpC,QAAM,EAAE,SAAS,SAAS,aAAa,QAAQ,IAAI;AACnD,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,CAAC,CAAC;AAC/D,QAAM,gBAAgB,OAAO,KAAK;AAClC,QAAM,eAAe,OAAO,KAAK;AACjC,YAAU,MAAM;AACZ,mBAAe,aAAa;AACxB,UAAI,cAAc;AACd;AACJ,UAAI,CAAC,WAAW,CAAC;AACb;AACJ,oBAAc,UAAU;AACxB,YAAM,MAAM,eAAgB,MAAM,QAAQ,aAAa,OAAO;AAC9D,YAAMA,sBAAqB,CAAC;AAC5B,iBAAW,MAAM,KAAK;AAClB,cAAM,WAAW,MAAM,QAAQ,YAAY,SAAS,IAAI,OAAO;AAC/D,QAAAA,oBAAmB,EAAE,IAAI,SAAS;AAAA,MACtC;AACA,4BAAsBA,mBAAkB;AAAA,IAC5C;AACA,SAAK,WAAW;AAAA,EACpB,GAAG,CAAC,SAAS,SAAS,OAAO,CAAC;AAC9B,YAAU,MAAM;AACZ,QAAI,CAAC,WAAW,CAAC;AACb;AACJ,QAAI,aAAa;AACb;AACJ,iBAAa,UAAU;AACvB,YAAQ,IAAI,6BAA6B;AACzC,UAAM,cAAc,QAAQ,GAAG,gBAAgB,OAAO,WAAW;AAC7D,cAAQ,IAAI,gBAAgB,MAAM;AAClC,UAAI,eAAe,CAAC,YAAY,SAAS,OAAO,UAAU;AACtD;AACJ,YAAM,kBAAkB,MAAM,QAAQ,YAAY,SAAS,OAAO,YAAY,OAAO;AACrF,4BAAsB,CAAC,SAAS;AAC5B,cAAM,wBAAwB,EAAE,GAAG,KAAK;AACxC,8BAAsB,OAAO,UAAU,IAAI,gBAAgB;AAC3D,eAAO;AAAA,MACX,CAAC;AAAA,IACL,CAAC;AACD,WAAO;AAAA,EACX,GAAG,CAAC,SAAS,SAAS,OAAO,CAAC;AAC9B,SAAO,QAAQ,MAAM,oBAAoB,CAAC,kBAAkB,CAAC;AACjE;AACO,SAAS,4BAA4B,SAAS;AACjD,QAAM,yBAAyB,YAAY,CAAC,SAAS;AACjD,UAAM,EAAE,SAAS,aAAa,QAAQ,IAAI;AAC1C,WAAO,kBAAkB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC;AAAA,EACL,GAAG,CAAC,OAAO,CAAC;AACZ,SAAO;AACX;AACO,SAAS,2BAA2B,SAAS;AAChD,QAAM,wBAAwB,YAAY,CAAC,SAAS;AAChD,UAAM,EAAE,SAAS,WAAW,IAAI;AAChC,WAAO,iBAAiB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC;AAAA,EACL,GAAG,CAAC,OAAO,CAAC;AACZ,SAAO;AACX;AACO,SAAS,iBAAiB,MAAM;AACnC,QAAM,EAAE,SAAS,SAAS,WAAW,IAAI;AACzC,QAAM,QAAQ,kBAAkB;AAAA,IAC5B;AAAA,IACA;AAAA,IACA,aAAa,CAAC,UAAU;AAAA,EAC5B,CAAC;AACD,SAAO,QAAQ,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC;AAC/D;",
|
|
6
|
+
"names": ["statesByDocumentId"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../chunk-K5KDABES.js";
|
|
2
2
|
import {
|
|
3
3
|
useDriveActionsWithUiNodes
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-C5JXP4NO.js";
|
|
5
5
|
import {
|
|
6
6
|
useDriveActions
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-WSWYH5W2.js";
|
|
8
8
|
import {
|
|
9
9
|
DriveContextProvider,
|
|
10
10
|
useDriveContext
|
|
@@ -39,25 +39,25 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
useDocumentEditor,
|
|
41
41
|
useDocumentEditorProps
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-XNBBEHKQ.js";
|
|
43
43
|
import "../chunk-ARAPK5F3.js";
|
|
44
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-LCQV2CEG.js";
|
|
45
45
|
import {
|
|
46
46
|
useConnectCrypto,
|
|
47
47
|
useConnectDid
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-OJYBFBSZ.js";
|
|
49
49
|
import "../chunk-ULBB7S2G.js";
|
|
50
50
|
import {
|
|
51
51
|
documentDrivesInitializedMapAtomFamily,
|
|
52
52
|
drivesToHash,
|
|
53
53
|
useDocumentDrives
|
|
54
|
-
} from "../chunk-
|
|
55
|
-
import "../chunk-
|
|
54
|
+
} from "../chunk-GJOMXDVW.js";
|
|
55
|
+
import "../chunk-FD4TUZZS.js";
|
|
56
56
|
import {
|
|
57
57
|
useUserPermissions
|
|
58
58
|
} from "../chunk-DVMSG5VM.js";
|
|
59
59
|
import "../chunk-WARL4IRP.js";
|
|
60
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-UTLXXWAE.js";
|
|
61
61
|
import "../chunk-LFIXFHHR.js";
|
|
62
62
|
import "../chunk-GWYLZGKO.js";
|
|
63
63
|
import "../chunk-SDNEXZQH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAddDebouncedOperations
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-LCQV2CEG.js";
|
|
4
|
+
import "../chunk-GJOMXDVW.js";
|
|
5
|
+
import "../chunk-FD4TUZZS.js";
|
|
6
6
|
import "../chunk-DVMSG5VM.js";
|
|
7
7
|
import "../chunk-WARL4IRP.js";
|
|
8
8
|
import "../chunk-PLDDJCW6.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useConnectCrypto,
|
|
3
3
|
useConnectDid
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-OJYBFBSZ.js";
|
|
5
|
+
import "../chunk-FD4TUZZS.js";
|
|
6
6
|
import "../chunk-GWYLZGKO.js";
|
|
7
7
|
import "../chunk-SDNEXZQH.js";
|
|
8
8
|
import "../chunk-PLDDJCW6.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
documentDrivesInitializedMapAtomFamily,
|
|
3
3
|
drivesToHash,
|
|
4
4
|
useDocumentDrives
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-GJOMXDVW.js";
|
|
6
|
+
import "../chunk-FD4TUZZS.js";
|
|
7
7
|
import "../chunk-WARL4IRP.js";
|
|
8
8
|
import "../chunk-PLDDJCW6.js";
|
|
9
9
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDocumentEditor,
|
|
3
3
|
useDocumentEditorProps
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XNBBEHKQ.js";
|
|
5
5
|
import "../chunk-ARAPK5F3.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-LCQV2CEG.js";
|
|
7
|
+
import "../chunk-OJYBFBSZ.js";
|
|
8
8
|
import "../chunk-ULBB7S2G.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-GJOMXDVW.js";
|
|
10
|
+
import "../chunk-FD4TUZZS.js";
|
|
11
11
|
import "../chunk-DVMSG5VM.js";
|
|
12
12
|
import "../chunk-WARL4IRP.js";
|
|
13
13
|
import "../chunk-LFIXFHHR.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDriveActionsWithUiNodes
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-C5JXP4NO.js";
|
|
4
|
+
import "../chunk-WSWYH5W2.js";
|
|
5
5
|
import "../chunk-2DNQ5HGB.js";
|
|
6
6
|
import "../chunk-SQMQ6KEB.js";
|
|
7
7
|
import "../chunk-LEVFKHRO.js";
|
|
8
8
|
import "../chunk-76N27672.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-UTLXXWAE.js";
|
|
10
10
|
import "../chunk-LFIXFHHR.js";
|
|
11
11
|
import "../chunk-PLDDJCW6.js";
|
|
12
12
|
export {
|
|
@@ -2,10 +2,10 @@ import "./chunk-GLZ3ZPQT.js";
|
|
|
2
2
|
import "./chunk-K5KDABES.js";
|
|
3
3
|
import {
|
|
4
4
|
useDriveActionsWithUiNodes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C5JXP4NO.js";
|
|
6
6
|
import {
|
|
7
7
|
useDriveActions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WSWYH5W2.js";
|
|
9
9
|
import {
|
|
10
10
|
DriveContextProvider,
|
|
11
11
|
useDriveContext
|
|
@@ -40,20 +40,20 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
useDocumentEditor,
|
|
42
42
|
useDocumentEditorProps
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-XNBBEHKQ.js";
|
|
44
44
|
import "./chunk-ARAPK5F3.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-LCQV2CEG.js";
|
|
46
46
|
import {
|
|
47
47
|
useConnectCrypto,
|
|
48
48
|
useConnectDid
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-OJYBFBSZ.js";
|
|
50
50
|
import "./chunk-ULBB7S2G.js";
|
|
51
51
|
import {
|
|
52
52
|
documentDrivesInitializedMapAtomFamily,
|
|
53
53
|
drivesToHash,
|
|
54
54
|
useDocumentDrives
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import "./chunk-
|
|
55
|
+
} from "./chunk-GJOMXDVW.js";
|
|
56
|
+
import "./chunk-FD4TUZZS.js";
|
|
57
57
|
import {
|
|
58
58
|
baseDocumentModels,
|
|
59
59
|
baseDocumentModelsMap
|
|
@@ -61,18 +61,18 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
createBrowserDocumentDriveServer,
|
|
63
63
|
getReactorDefaultDrivesConfig
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-IDBZA52T.js";
|
|
65
65
|
import "./chunk-6MC6YR4B.js";
|
|
66
66
|
import {
|
|
67
67
|
ReadModeContext,
|
|
68
68
|
ReadModeContextProvider,
|
|
69
69
|
useReadModeContext
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-GXLBC3KA.js";
|
|
71
71
|
import {
|
|
72
72
|
useUserPermissions
|
|
73
73
|
} from "./chunk-DVMSG5VM.js";
|
|
74
74
|
import "./chunk-WARL4IRP.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-UTLXXWAE.js";
|
|
76
76
|
import "./chunk-LFIXFHHR.js";
|
|
77
77
|
import "./chunk-GWYLZGKO.js";
|
|
78
78
|
import "./chunk-SDNEXZQH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createBrowserDocumentDriveServer,
|
|
3
3
|
getReactorDefaultDrivesConfig
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-IDBZA52T.js";
|
|
5
|
+
import "./chunk-UTLXXWAE.js";
|
|
6
6
|
import "./chunk-LFIXFHHR.js";
|
|
7
7
|
import "./chunk-PLDDJCW6.js";
|
|
8
8
|
export {
|
package/dist/swEnv.js
CHANGED
|
@@ -19,6 +19,7 @@ const envWithValuesInBase64 = {
|
|
|
19
19
|
"SENTRY_ORG": "IiI=",
|
|
20
20
|
"SENTRY_PROJECT": "IiI=",
|
|
21
21
|
"LOG_LEVEL": "ImRlYnVnIg==",
|
|
22
|
+
"PH_CONNECT_WARN_OUTDATED_APP": "ImZhbHNlIg==",
|
|
22
23
|
"PH_CONNECT_STUDIO_MODE": "ImZhbHNlIg==",
|
|
23
24
|
"PH_CONNECT_ROUTER_BASENAME": "Ii8i",
|
|
24
25
|
"PH_CONNECT_DEFAULT_DRIVES_URL": "IiI=",
|
package/dist/vite-envs.sh
CHANGED
|
@@ -11,7 +11,7 @@ replaceAll() {
|
|
|
11
11
|
}'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
html=$(echo "PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PG1ldGEgY2hhcnNldD0iVVRGLTgiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsaW5pdGlhbC1zY2FsZT0xIj48dGl0bGU+
|
|
14
|
+
html=$(echo "PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PG1ldGEgY2hhcnNldD0iVVRGLTgiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsaW5pdGlhbC1zY2FsZT0xIj48dGl0bGU+UG93ZXJob3VzZSBDb25uZWN0PC90aXRsZT48YmFzZSBocmVmPSIvIj48bGluayByZWw9Imljb24iIGhyZWY9Imljb24uaWNvIj48IS0tIHZpdGUtZW52cyBzY3JpcHQgcGxhY2Vob2xkZXIgeEtzUG1MczMwc3dLc2RJc1Z4IC0tPjxzY3JpcHQgdHlwZT0ibW9kdWxlIiBjcm9zc29yaWdpbj0iIiBzcmM9Ii9hc3NldHMvbWFpbi5HWTVveVptLS5qcyI+PC9zY3JpcHQ+PC9oZWFkPjxib2R5PjxkaXYgaWQ9ImFwcCI+PC9kaXY+PC9ib2R5PjwvaHRtbD4=" | base64 -d)
|
|
15
15
|
|
|
16
16
|
BASE_URL_base64="eEFwV2RSclg5OWtQclZnZ0UiLyIK"
|
|
17
17
|
BASE_URL=$(echo "Lwo=" | base64 -d)
|
|
@@ -77,6 +77,12 @@ else
|
|
|
77
77
|
LOG_LEVEL_base64="eEFwV2RSclg5OWtQclZnZ0UiZGVidWciCg=="
|
|
78
78
|
fi
|
|
79
79
|
LOG_LEVEL=${LOG_LEVEL:-$(echo "ZGVidWcK" | base64 -d)}
|
|
80
|
+
if printenv PH_CONNECT_WARN_OUTDATED_APP &> /dev/null; then
|
|
81
|
+
PH_CONNECT_WARN_OUTDATED_APP_base64=$(printenv PH_CONNECT_WARN_OUTDATED_APP | base64)
|
|
82
|
+
else
|
|
83
|
+
PH_CONNECT_WARN_OUTDATED_APP_base64="eEFwV2RSclg5OWtQclZnZ0UiZmFsc2UiCg=="
|
|
84
|
+
fi
|
|
85
|
+
PH_CONNECT_WARN_OUTDATED_APP=${PH_CONNECT_WARN_OUTDATED_APP:-$(echo "ZmFsc2UK" | base64 -d)}
|
|
80
86
|
if printenv PH_CONNECT_STUDIO_MODE &> /dev/null; then
|
|
81
87
|
PH_CONNECT_STUDIO_MODE_base64=$(printenv PH_CONNECT_STUDIO_MODE | base64)
|
|
82
88
|
else
|
|
@@ -286,6 +292,7 @@ processedHtml=$(replaceAll "$processedHtml" "%SENTRY_AUTH_TOKEN%" "SENTRY_AUTH_T
|
|
|
286
292
|
processedHtml=$(replaceAll "$processedHtml" "%SENTRY_ORG%" "SENTRY_ORGxPsZs9swrPvxYpC")
|
|
287
293
|
processedHtml=$(replaceAll "$processedHtml" "%SENTRY_PROJECT%" "SENTRY_PROJECTxPsZs9swrPvxYpC")
|
|
288
294
|
processedHtml=$(replaceAll "$processedHtml" "%LOG_LEVEL%" "LOG_LEVELxPsZs9swrPvxYpC")
|
|
295
|
+
processedHtml=$(replaceAll "$processedHtml" "%PH_CONNECT_WARN_OUTDATED_APP%" "PH_CONNECT_WARN_OUTDATED_APPxPsZs9swrPvxYpC")
|
|
289
296
|
processedHtml=$(replaceAll "$processedHtml" "%PH_CONNECT_STUDIO_MODE%" "PH_CONNECT_STUDIO_MODExPsZs9swrPvxYpC")
|
|
290
297
|
processedHtml=$(replaceAll "$processedHtml" "%PH_CONNECT_ROUTER_BASENAME%" "PH_CONNECT_ROUTER_BASENAMExPsZs9swrPvxYpC")
|
|
291
298
|
processedHtml=$(replaceAll "$processedHtml" "%PH_CONNECT_DEFAULT_DRIVES_URL%" "PH_CONNECT_DEFAULT_DRIVES_URLxPsZs9swrPvxYpC")
|
|
@@ -333,6 +340,7 @@ processedHtml=$(replaceAll "$processedHtml" "SENTRY_AUTH_TOKENxPsZs9swrPvxYpC" "
|
|
|
333
340
|
processedHtml=$(replaceAll "$processedHtml" "SENTRY_ORGxPsZs9swrPvxYpC" "$SENTRY_ORG")
|
|
334
341
|
processedHtml=$(replaceAll "$processedHtml" "SENTRY_PROJECTxPsZs9swrPvxYpC" "$SENTRY_PROJECT")
|
|
335
342
|
processedHtml=$(replaceAll "$processedHtml" "LOG_LEVELxPsZs9swrPvxYpC" "$LOG_LEVEL")
|
|
343
|
+
processedHtml=$(replaceAll "$processedHtml" "PH_CONNECT_WARN_OUTDATED_APPxPsZs9swrPvxYpC" "$PH_CONNECT_WARN_OUTDATED_APP")
|
|
336
344
|
processedHtml=$(replaceAll "$processedHtml" "PH_CONNECT_STUDIO_MODExPsZs9swrPvxYpC" "$PH_CONNECT_STUDIO_MODE")
|
|
337
345
|
processedHtml=$(replaceAll "$processedHtml" "PH_CONNECT_ROUTER_BASENAMExPsZs9swrPvxYpC" "$PH_CONNECT_ROUTER_BASENAME")
|
|
338
346
|
processedHtml=$(replaceAll "$processedHtml" "PH_CONNECT_DEFAULT_DRIVES_URLxPsZs9swrPvxYpC" "$PH_CONNECT_DEFAULT_DRIVES_URL")
|
|
@@ -382,6 +390,7 @@ json="$json\"SENTRY_AUTH_TOKEN\":\`$SENTRY_AUTH_TOKEN_base64\`,"
|
|
|
382
390
|
json="$json\"SENTRY_ORG\":\`$SENTRY_ORG_base64\`,"
|
|
383
391
|
json="$json\"SENTRY_PROJECT\":\`$SENTRY_PROJECT_base64\`,"
|
|
384
392
|
json="$json\"LOG_LEVEL\":\`$LOG_LEVEL_base64\`,"
|
|
393
|
+
json="$json\"PH_CONNECT_WARN_OUTDATED_APP\":\`$PH_CONNECT_WARN_OUTDATED_APP_base64\`,"
|
|
385
394
|
json="$json\"PH_CONNECT_STUDIO_MODE\":\`$PH_CONNECT_STUDIO_MODE_base64\`,"
|
|
386
395
|
json="$json\"PH_CONNECT_ROUTER_BASENAME\":\`$PH_CONNECT_ROUTER_BASENAME_base64\`,"
|
|
387
396
|
json="$json\"PH_CONNECT_DEFAULT_DRIVES_URL\":\`$PH_CONNECT_DEFAULT_DRIVES_URL_base64\`,"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/connect",
|
|
3
3
|
"productName": "Powerhouse-Connect",
|
|
4
|
-
"version": "1.0.0-dev.
|
|
4
|
+
"version": "1.0.0-dev.213",
|
|
5
5
|
"description": "Powerhouse Connect",
|
|
6
6
|
"main": "./dist/index.html",
|
|
7
7
|
"imports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"magic-string": "^0.30.17"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@powerhousedao/design-system": "1.
|
|
32
|
+
"@powerhousedao/design-system": "1.30.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@electron-forge/cli": "^6.1.1",
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
"vite-plugin-svgr": "^4.2.0",
|
|
95
95
|
"vite-tsconfig-paths": "^4.2.0",
|
|
96
96
|
"xvfb-maybe": "^0.2.1",
|
|
97
|
-
"@powerhousedao/
|
|
98
|
-
"@powerhousedao/
|
|
99
|
-
"@powerhousedao/
|
|
100
|
-
"@powerhousedao/
|
|
101
|
-
"@powerhousedao/
|
|
102
|
-
"@powerhousedao/scalars": "1.
|
|
103
|
-
"document-drive": "1.
|
|
104
|
-
"document-model": "2.
|
|
97
|
+
"@powerhousedao/builder-tools": "0.3.0",
|
|
98
|
+
"@powerhousedao/common": "1.5.0",
|
|
99
|
+
"@powerhousedao/config": "1.19.0",
|
|
100
|
+
"@powerhousedao/design-system": "1.30.0",
|
|
101
|
+
"@powerhousedao/reactor-browser": "1.14.0",
|
|
102
|
+
"@powerhousedao/scalars": "1.26.0",
|
|
103
|
+
"document-drive": "1.22.0",
|
|
104
|
+
"document-model": "2.22.0"
|
|
105
105
|
},
|
|
106
106
|
"optionalDependencies": {
|
|
107
107
|
"@esbuild/linux-x64": "^0.21.4",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../packages/reactor-browser/dist/src/hooks/useDocumentDrives.js", "../../../../../../node_modules/.pnpm/jotai@2.11.1_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla/utils.mjs"],
|
|
4
|
-
"sourcesContent": ["import { useMemo, useCallback } from \"react\";\nimport { atom, useAtom } from \"jotai\";\nimport { atomFamily } from \"jotai/utils\";\nimport { documentToHash } from \"../utils/index.js\";\nconst documentDrivesAtom = atom(new Map());\nexport function drivesToHash(drives) {\n return drives.map(documentToHash).join(\"&\");\n}\nconst readWriteDocumentDrivesAtom = (server) => () => atom((get) => (server ? (get(documentDrivesAtom).get(server) ?? []) : []), (_get, set, newDrives) => {\n set(documentDrivesAtom, (map) => {\n if (!server) {\n return new Map();\n }\n const currentDrives = map.get(server) ?? [];\n if (currentDrives.length !== newDrives.length ||\n drivesToHash(currentDrives) !== drivesToHash(newDrives)) {\n return new Map(map).set(server, newDrives);\n }\n else {\n return map;\n }\n });\n});\nexport const documentDrivesInitializedMapAtomFamily = atomFamily(() => atom(\"INITIAL\"));\nexport function useDocumentDrives(reactor) {\n const [documentDrives, setDocumentDrives] = useAtom(useMemo(readWriteDocumentDrivesAtom(reactor), [reactor]));\n const refreshDocumentDrives = useCallback(async () => {\n if (!reactor) {\n return;\n }\n const documentDrives = [];\n try {\n const driveIds = await reactor.getDrives();\n for (const id of driveIds) {\n try {\n const drive = await reactor.getDrive(id);\n documentDrives.push(drive);\n }\n catch (error) {\n console.error(error);\n }\n }\n }\n catch (error) {\n console.error(error);\n }\n finally {\n setDocumentDrives(documentDrives);\n }\n }, [reactor]);\n const [status, setStatus] = useAtom(documentDrivesInitializedMapAtomFamily(reactor));\n if (status === \"INITIAL\") {\n setStatus(\"LOADING\");\n refreshDocumentDrives()\n .then(() => setStatus(\"LOADED\"))\n .catch(() => setStatus(\"ERROR\"));\n }\n const serverSubscribeUpdates = useCallback((clientErrorhandler) => {\n if (!reactor) {\n return;\n }\n const unsub1 = reactor.on(\"syncStatus\", async (_event, _status, error) => {\n if (error) {\n console.error(error);\n }\n await refreshDocumentDrives();\n });\n const unsub2 = reactor.on(\"strandUpdate\", () => refreshDocumentDrives());\n const unsubOnSyncError = reactor.on(\"clientStrandsError\", clientErrorhandler.strandsErrorHandler);\n const unsub3 = reactor.on(\"defaultRemoteDrive\", () => refreshDocumentDrives());\n return () => {\n unsub1();\n unsub2();\n unsubOnSyncError();\n unsub3();\n };\n }, [reactor, refreshDocumentDrives]);\n return useMemo(() => [\n documentDrives,\n refreshDocumentDrives,\n serverSubscribeUpdates,\n status,\n ], [documentDrives, status]);\n}\n", "import { atom } from 'jotai/vanilla';\n\nconst RESET = Symbol(\n (import.meta.env ? import.meta.env.MODE : undefined) !== \"production\" ? \"RESET\" : \"\"\n);\n\nfunction atomWithReset(initialValue) {\n const anAtom = atom(\n initialValue,\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(anAtom)) : update;\n set(anAtom, nextValue === RESET ? initialValue : nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithReducer(initialValue, reducer) {\n return atom(initialValue, function(get, set, action) {\n set(this, reducer(get(this), action));\n });\n}\n\nfunction atomFamily(initializeAtom, areEqual) {\n let shouldRemove = null;\n const atoms = /* @__PURE__ */ new Map();\n const listeners = /* @__PURE__ */ new Set();\n const createAtom = (param) => {\n let item;\n if (areEqual === undefined) {\n item = atoms.get(param);\n } else {\n for (const [key, value] of atoms) {\n if (areEqual(key, param)) {\n item = value;\n break;\n }\n }\n }\n if (item !== undefined) {\n if (shouldRemove == null ? undefined : shouldRemove(item[1], param)) {\n createAtom.remove(param);\n } else {\n return item[0];\n }\n }\n const newAtom = initializeAtom(param);\n atoms.set(param, [newAtom, Date.now()]);\n notifyListeners(\"CREATE\", param, newAtom);\n return newAtom;\n };\n function notifyListeners(type, param, atom) {\n for (const listener of listeners) {\n listener({ type, param, atom });\n }\n }\n createAtom.unstable_listen = (callback) => {\n listeners.add(callback);\n return () => {\n listeners.delete(callback);\n };\n };\n createAtom.getParams = () => atoms.keys();\n createAtom.remove = (param) => {\n if (areEqual === undefined) {\n if (!atoms.has(param)) return;\n const [atom] = atoms.get(param);\n atoms.delete(param);\n notifyListeners(\"REMOVE\", param, atom);\n } else {\n for (const [key, [atom]] of atoms) {\n if (areEqual(key, param)) {\n atoms.delete(key);\n notifyListeners(\"REMOVE\", key, atom);\n break;\n }\n }\n }\n };\n createAtom.setShouldRemove = (fn) => {\n shouldRemove = fn;\n if (!shouldRemove) return;\n for (const [key, [atom, createdAt]] of atoms) {\n if (shouldRemove(createdAt, key)) {\n atoms.delete(key);\n notifyListeners(\"REMOVE\", key, atom);\n }\n }\n };\n return createAtom;\n}\n\nconst getCached$2 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$3 = /* @__PURE__ */ new WeakMap();\nconst memo3 = (create, dep1, dep2, dep3) => {\n const cache2 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache1$3, dep1);\n const cache3 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache2, dep2);\n return getCached$2(create, cache3, dep3);\n};\nfunction selectAtom(anAtom, selector, equalityFn = Object.is) {\n return memo3(\n () => {\n const EMPTY = Symbol();\n const selectValue = ([value, prevSlice]) => {\n if (prevSlice === EMPTY) {\n return selector(value);\n }\n const slice = selector(value, prevSlice);\n return equalityFn(prevSlice, slice) ? prevSlice : slice;\n };\n const derivedAtom = atom((get) => {\n const prev = get(derivedAtom);\n const value = get(anAtom);\n return selectValue([value, prev]);\n });\n derivedAtom.init = EMPTY;\n return derivedAtom;\n },\n anAtom,\n selector,\n equalityFn\n );\n}\n\nconst frozenAtoms = /* @__PURE__ */ new WeakSet();\nconst deepFreeze = (obj) => {\n if (typeof obj !== \"object\" || obj === null) return;\n Object.freeze(obj);\n const propNames = Object.getOwnPropertyNames(obj);\n for (const name of propNames) {\n const value = obj[name];\n deepFreeze(value);\n }\n return obj;\n};\nfunction freezeAtom(anAtom) {\n if (frozenAtoms.has(anAtom)) {\n return anAtom;\n }\n frozenAtoms.add(anAtom);\n const origRead = anAtom.read;\n anAtom.read = function(get, options) {\n return deepFreeze(origRead.call(this, get, options));\n };\n if (\"write\" in anAtom) {\n const origWrite = anAtom.write;\n anAtom.write = function(get, set, ...args) {\n return origWrite.call(\n this,\n get,\n (...setArgs) => {\n if (setArgs[0] === anAtom) {\n setArgs[1] = deepFreeze(setArgs[1]);\n }\n return set(...setArgs);\n },\n ...args\n );\n };\n }\n return anAtom;\n}\nfunction freezeAtomCreator(createAtom) {\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n console.warn(\n \"[DEPRECATED] freezeAtomCreator is deprecated, define it on users end\"\n );\n }\n return (...args) => freezeAtom(createAtom(...args));\n}\n\nconst getCached$1 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$2 = /* @__PURE__ */ new WeakMap();\nconst memo2$1 = (create, dep1, dep2) => {\n const cache2 = getCached$1(() => /* @__PURE__ */ new WeakMap(), cache1$2, dep1);\n return getCached$1(create, cache2, dep2);\n};\nconst cacheKeyForEmptyKeyExtractor = {};\nconst isWritable = (atom2) => !!atom2.write;\nconst isFunction = (x) => typeof x === \"function\";\nfunction splitAtom(arrAtom, keyExtractor) {\n return memo2$1(\n () => {\n const mappingCache = /* @__PURE__ */ new WeakMap();\n const getMapping = (arr, prev) => {\n let mapping = mappingCache.get(arr);\n if (mapping) {\n return mapping;\n }\n const prevMapping = prev && mappingCache.get(prev);\n const atomList = [];\n const keyList = [];\n arr.forEach((item, index) => {\n const key = keyExtractor ? keyExtractor(item) : index;\n keyList[index] = key;\n const cachedAtom = prevMapping && prevMapping.atomList[prevMapping.keyList.indexOf(key)];\n if (cachedAtom) {\n atomList[index] = cachedAtom;\n return;\n }\n const read = (get) => {\n const prev2 = get(mappingAtom);\n const currArr = get(arrAtom);\n const mapping2 = getMapping(currArr, prev2 == null ? undefined : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= currArr.length) {\n const prevItem = arr[getMapping(arr).keyList.indexOf(key)];\n if (prevItem) {\n return prevItem;\n }\n throw new Error(\"splitAtom: index out of bounds for read\");\n }\n return currArr[index2];\n };\n const write = (get, set, update) => {\n const prev2 = get(mappingAtom);\n const arr2 = get(arrAtom);\n const mapping2 = getMapping(arr2, prev2 == null ? undefined : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= arr2.length) {\n throw new Error(\"splitAtom: index out of bounds for write\");\n }\n const nextItem = isFunction(update) ? update(arr2[index2]) : update;\n if (!Object.is(arr2[index2], nextItem)) {\n set(arrAtom, [\n ...arr2.slice(0, index2),\n nextItem,\n ...arr2.slice(index2 + 1)\n ]);\n }\n };\n atomList[index] = isWritable(arrAtom) ? atom(read, write) : atom(read);\n });\n if (prevMapping && prevMapping.keyList.length === keyList.length && prevMapping.keyList.every((x, i) => x === keyList[i])) {\n mapping = prevMapping;\n } else {\n mapping = { arr, atomList, keyList };\n }\n mappingCache.set(arr, mapping);\n return mapping;\n };\n const mappingAtom = atom((get) => {\n const prev = get(mappingAtom);\n const arr = get(arrAtom);\n const mapping = getMapping(arr, prev == null ? undefined : prev.arr);\n return mapping;\n });\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n mappingAtom.debugPrivate = true;\n }\n mappingAtom.init = undefined;\n const splittedAtom = isWritable(arrAtom) ? atom(\n (get) => get(mappingAtom).atomList,\n (get, set, action) => {\n switch (action.type) {\n case \"remove\": {\n const index = get(splittedAtom).indexOf(action.atom);\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n ...arr.slice(index + 1)\n ]);\n }\n break;\n }\n case \"insert\": {\n const index = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n action.value,\n ...arr.slice(index)\n ]);\n }\n break;\n }\n case \"move\": {\n const index1 = get(splittedAtom).indexOf(action.atom);\n const index2 = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index1 >= 0 && index2 >= 0) {\n const arr = get(arrAtom);\n if (index1 < index2) {\n set(arrAtom, [\n ...arr.slice(0, index1),\n ...arr.slice(index1 + 1, index2),\n arr[index1],\n ...arr.slice(index2)\n ]);\n } else {\n set(arrAtom, [\n ...arr.slice(0, index2),\n arr[index1],\n ...arr.slice(index2, index1),\n ...arr.slice(index1 + 1)\n ]);\n }\n }\n break;\n }\n }\n }\n ) : atom((get) => get(mappingAtom).atomList);\n return splittedAtom;\n },\n arrAtom,\n keyExtractor || cacheKeyForEmptyKeyExtractor\n );\n}\n\nfunction atomWithDefault(getDefault) {\n const EMPTY = Symbol();\n const overwrittenAtom = atom(EMPTY);\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n overwrittenAtom.debugPrivate = true;\n }\n const anAtom = atom(\n (get, options) => {\n const overwritten = get(overwrittenAtom);\n if (overwritten !== EMPTY) {\n return overwritten;\n }\n return getDefault(get, options);\n },\n (get, set, update) => {\n if (update === RESET) {\n set(overwrittenAtom, EMPTY);\n } else if (typeof update === \"function\") {\n const prevValue = get(anAtom);\n set(overwrittenAtom, update(prevValue));\n } else {\n set(overwrittenAtom, update);\n }\n }\n );\n return anAtom;\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? undefined : x.then) === \"function\";\nfunction withStorageValidator(validator) {\n return (unknownStorage) => {\n const storage = {\n ...unknownStorage,\n getItem: (key, initialValue) => {\n const validate = (value2) => {\n if (!validator(value2)) {\n return initialValue;\n }\n return value2;\n };\n const value = unknownStorage.getItem(key, initialValue);\n if (isPromiseLike(value)) {\n return value.then(validate);\n }\n return validate(value);\n }\n };\n return storage;\n };\n}\nfunction createJSONStorage(getStringStorage = () => {\n try {\n return window.localStorage;\n } catch (e) {\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n if (typeof window !== \"undefined\") {\n console.warn(e);\n }\n }\n return undefined;\n }\n}, options) {\n var _a;\n let lastStr;\n let lastValue;\n const storage = {\n getItem: (key, initialValue) => {\n var _a2, _b;\n const parse = (str2) => {\n str2 = str2 || \"\";\n if (lastStr !== str2) {\n try {\n lastValue = JSON.parse(str2, options == null ? void 0 : options.reviver);\n } catch (e) {\n return initialValue;\n }\n lastStr = str2;\n }\n return lastValue;\n };\n const str = (_b = (_a2 = getStringStorage()) == null ? undefined : _a2.getItem(key)) != null ? _b : null;\n if (isPromiseLike(str)) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (key, newValue) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? undefined : _a2.setItem(\n key,\n JSON.stringify(newValue, options == null ? undefined : options.replacer)\n );\n },\n removeItem: (key) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? undefined : _a2.removeItem(key);\n }\n };\n const createHandleSubscribe = (subscriber2) => (key, callback, initialValue) => subscriber2(key, (v) => {\n let newValue;\n try {\n newValue = JSON.parse(v || \"\");\n } catch (e) {\n newValue = initialValue;\n }\n callback(newValue);\n });\n let subscriber;\n try {\n subscriber = (_a = getStringStorage()) == null ? void 0 : _a.subscribe;\n } catch (e) {\n }\n if (!subscriber && typeof window !== \"undefined\" && typeof window.addEventListener === \"function\" && window.Storage) {\n subscriber = (key, callback) => {\n if (!(getStringStorage() instanceof window.Storage)) {\n return () => {\n };\n }\n const storageEventCallback = (e) => {\n if (e.storageArea === getStringStorage() && e.key === key) {\n callback(e.newValue);\n }\n };\n window.addEventListener(\"storage\", storageEventCallback);\n return () => {\n window.removeEventListener(\"storage\", storageEventCallback);\n };\n };\n }\n if (subscriber) {\n storage.subscribe = createHandleSubscribe(subscriber);\n }\n return storage;\n}\nconst defaultStorage = createJSONStorage();\nfunction atomWithStorage(key, initialValue, storage = defaultStorage, options) {\n const getOnInit = options == null ? undefined : options.getOnInit;\n const baseAtom = atom(\n getOnInit ? storage.getItem(key, initialValue) : initialValue\n );\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n baseAtom.debugPrivate = true;\n }\n baseAtom.onMount = (setAtom) => {\n setAtom(storage.getItem(key, initialValue));\n let unsub;\n if (storage.subscribe) {\n unsub = storage.subscribe(key, setAtom, initialValue);\n }\n return unsub;\n };\n const anAtom = atom(\n (get) => get(baseAtom),\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(baseAtom)) : update;\n if (nextValue === RESET) {\n set(baseAtom, initialValue);\n return storage.removeItem(key);\n }\n if (nextValue instanceof Promise) {\n return nextValue.then((resolvedValue) => {\n set(baseAtom, resolvedValue);\n return storage.setItem(key, resolvedValue);\n });\n }\n set(baseAtom, nextValue);\n return storage.setItem(key, nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithObservable(getObservable, options) {\n const returnResultData = (result) => {\n if (\"e\" in result) {\n throw result.e;\n }\n return result.d;\n };\n const observableResultAtom = atom((get) => {\n var _a;\n let observable = getObservable(get);\n const itself = (_a = observable[Symbol.observable]) == null ? undefined : _a.call(observable);\n if (itself) {\n observable = itself;\n }\n let resolve;\n const makePending = () => new Promise((r) => {\n resolve = r;\n });\n const initialResult = options && \"initialValue\" in options ? {\n d: typeof options.initialValue === \"function\" ? options.initialValue() : options.initialValue\n } : makePending();\n let setResult;\n let lastResult;\n const listener = (result) => {\n lastResult = result;\n resolve == null ? undefined : resolve(result);\n setResult == null ? undefined : setResult(result);\n };\n let subscription;\n let timer;\n const isNotMounted = () => !setResult;\n const start = () => {\n if (subscription) {\n clearTimeout(timer);\n subscription.unsubscribe();\n }\n subscription = observable.subscribe({\n next: (d) => listener({ d }),\n error: (e) => listener({ e }),\n complete: () => {\n }\n });\n if (isNotMounted() && (options == null ? undefined : options.unstable_timeout)) {\n timer = setTimeout(() => {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n }, options.unstable_timeout);\n }\n };\n start();\n const resultAtom = atom(lastResult || initialResult);\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n resultAtom.debugPrivate = true;\n }\n resultAtom.onMount = (update) => {\n setResult = update;\n if (lastResult) {\n update(lastResult);\n }\n if (subscription) {\n clearTimeout(timer);\n } else {\n start();\n }\n return () => {\n setResult = undefined;\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n };\n return [resultAtom, observable, makePending, start, isNotMounted];\n });\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n observableResultAtom.debugPrivate = true;\n }\n const observableAtom = atom(\n (get) => {\n const [resultAtom] = get(observableResultAtom);\n const result = get(resultAtom);\n if (result instanceof Promise) {\n return result.then(returnResultData);\n }\n return returnResultData(result);\n },\n (get, set, data) => {\n const [resultAtom, observable, makePending, start, isNotMounted] = get(observableResultAtom);\n if (\"next\" in observable) {\n if (isNotMounted()) {\n set(resultAtom, makePending());\n start();\n }\n observable.next(data);\n } else {\n throw new Error(\"observable is not subject\");\n }\n }\n );\n return observableAtom;\n}\n\nconst cache1$1 = /* @__PURE__ */ new WeakMap();\nconst memo1 = (create, dep1) => (cache1$1.has(dep1) ? cache1$1 : cache1$1.set(dep1, create())).get(dep1);\nconst isPromise$1 = (x) => x instanceof Promise;\nconst LOADING = { state: \"loading\" };\nfunction loadable(anAtom) {\n return memo1(() => {\n const loadableCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const derivedAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n let value;\n try {\n value = get(anAtom);\n } catch (error) {\n return { state: \"hasError\", error };\n }\n if (!isPromise$1(value)) {\n return { state: \"hasData\", data: value };\n }\n const promise = value;\n const cached1 = loadableCache.get(promise);\n if (cached1) {\n return cached1;\n }\n promise.then(\n (data) => {\n loadableCache.set(promise, { state: \"hasData\", data });\n setSelf();\n },\n (error) => {\n loadableCache.set(promise, { state: \"hasError\", error });\n setSelf();\n }\n );\n const cached2 = loadableCache.get(promise);\n if (cached2) {\n return cached2;\n }\n loadableCache.set(promise, LOADING);\n return LOADING;\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n derivedAtom.debugPrivate = true;\n }\n return atom((get) => get(derivedAtom));\n }, anAtom);\n}\n\nconst getCached = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1 = /* @__PURE__ */ new WeakMap();\nconst memo2 = (create, dep1, dep2) => {\n const cache2 = getCached(() => /* @__PURE__ */ new WeakMap(), cache1, dep1);\n return getCached(create, cache2, dep2);\n};\nconst isPromise = (x) => x instanceof Promise;\nconst defaultFallback = () => undefined;\nfunction unwrap(anAtom, fallback = defaultFallback) {\n return memo2(\n () => {\n const promiseErrorCache = /* @__PURE__ */ new WeakMap();\n const promiseResultCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const promiseAndValueAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n const prev = get(promiseAndValueAtom);\n const promise = get(anAtom);\n if (!isPromise(promise)) {\n return { v: promise };\n }\n if (promise !== (prev == null ? undefined : prev.p)) {\n promise.then(\n (v) => {\n promiseResultCache.set(promise, v);\n setSelf();\n },\n (e) => {\n promiseErrorCache.set(promise, e);\n setSelf();\n }\n );\n }\n if (promiseErrorCache.has(promise)) {\n throw promiseErrorCache.get(promise);\n }\n if (promiseResultCache.has(promise)) {\n return {\n p: promise,\n v: promiseResultCache.get(promise)\n };\n }\n if (prev && \"v\" in prev) {\n return { p: promise, f: fallback(prev.v), v: prev.v };\n }\n return { p: promise, f: fallback() };\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n promiseAndValueAtom.init = undefined;\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n promiseAndValueAtom.debugPrivate = true;\n }\n return atom(\n (get) => {\n const state = get(promiseAndValueAtom);\n if (\"f\" in state) {\n return state.f;\n }\n return state.v;\n },\n (_get, set, ...args) => set(anAtom, ...args)\n );\n },\n anAtom,\n fallback\n );\n}\n\nfunction atomWithRefresh(read, write) {\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : undefined) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n return atom(\n (get, options) => {\n get(refreshAtom);\n return read(get, options);\n },\n (get, set, ...args) => {\n if (args.length === 0) {\n set(refreshAtom, (c) => c + 1);\n } else if (write) {\n return write(get, set, ...args);\n }\n }\n );\n}\n\nfunction atomWithLazy(makeInitial) {\n const a = atom(undefined);\n delete a.init;\n Object.defineProperty(a, \"init\", {\n get() {\n return makeInitial();\n }\n });\n return a;\n}\n\nexport { RESET, atomFamily, atomWithDefault, atomWithLazy, atomWithObservable, atomWithReducer, atomWithRefresh, atomWithReset, atomWithStorage, createJSONStorage, freezeAtom, freezeAtomCreator, loadable, selectAtom, splitAtom, withStorageValidator as unstable_withStorageValidator, unwrap };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAAA,SAAS,SAAS,mBAAmB;;;ACErC,IA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