@powerhousedao/powerhouse-vetra-packages 6.2.0-dev.37 → 6.2.0-dev.39
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/browser/assets/{entry-BzMQu_A8.js → entry-BHcFjTEd.js} +2 -2
- package/dist/browser/assets/{projection-entry-BvwGe49p.js → projection-entry-Cs-5j8OX.js} +4 -4
- package/dist/browser/{connect-BJfZyw2O.js → connect-CmgZSI0Z.js} +62 -62
- package/dist/browser/{connect-BJfZyw2O.js.map → connect-CmgZSI0Z.js.map} +1 -1
- package/dist/browser/{dist-Bldev8ZK.js → dist-D1NFJMzm.js} +6 -12
- package/dist/browser/dist-D1NFJMzm.js.map +1 -0
- package/dist/browser/{editor-ZerxteK6.js → editor-Bs5C6sAt.js} +5 -5
- package/dist/browser/{editor-ZerxteK6.js.map → editor-Bs5C6sAt.js.map} +1 -1
- package/dist/browser/{editor-DWzENY-2.js → editor-BsVLT-lJ.js} +4 -4
- package/dist/browser/{editor-DWzENY-2.js.map → editor-BsVLT-lJ.js.map} +1 -1
- package/dist/browser/editors/document-model-editor/module.js +1 -1
- package/dist/browser/editors/generic-drive-explorer/index.js +3 -3
- package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
- package/dist/browser/{folder-view-DrU6t80y.js → folder-view-LYhTe15T.js} +3 -3
- package/dist/browser/{folder-view-DrU6t80y.js.map → folder-view-LYhTe15T.js.map} +1 -1
- package/dist/browser/{graphql-editor-C5UmjtTf.js → graphql-editor-b61MnkEP.js} +2 -2
- package/dist/browser/{graphql-editor-C5UmjtTf.js.map → graphql-editor-b61MnkEP.js.map} +1 -1
- package/dist/browser/index.js +334 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{json-editor-yNmSZgJE.js → json-editor-DO_EwDmY.js} +2 -2
- package/dist/browser/{json-editor-yNmSZgJE.js.map → json-editor-DO_EwDmY.js.map} +1 -1
- package/dist/browser/lib-DtwK2kyR.js +200 -0
- package/dist/browser/lib-DtwK2kyR.js.map +1 -0
- package/dist/browser/{state-schemas-ByCSXjhf.js → state-schemas-Cx-QbW5a.js} +3 -3
- package/dist/browser/{state-schemas-ByCSXjhf.js.map → state-schemas-Cx-QbW5a.js.map} +1 -1
- package/dist/node/{connect-Bq2Hrj8v.mjs → connect-CwDdrOag.mjs} +51 -51
- package/dist/node/{connect-Bq2Hrj8v.mjs.map → connect-CwDdrOag.mjs.map} +1 -1
- package/dist/node/{dist-DuuhSkaw.mjs → dist-RdOXBdt-.mjs} +6 -12
- package/dist/node/dist-RdOXBdt-.mjs.map +1 -0
- package/dist/node/{editor-N6Jk0aIC.mjs → editor-CTJUSbjg.mjs} +5 -5
- package/dist/node/{editor-N6Jk0aIC.mjs.map → editor-CTJUSbjg.mjs.map} +1 -1
- package/dist/node/{editor-LN22LKw-.mjs → editor-DLr8Eb3u.mjs} +4 -4
- package/dist/node/{editor-LN22LKw-.mjs.map → editor-DLr8Eb3u.mjs.map} +1 -1
- package/dist/node/editors/document-model-editor/module.mjs +1 -1
- package/dist/node/editors/generic-drive-explorer/index.mjs +3 -3
- package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
- package/dist/node/{folder-view-B0P7HA68.mjs → folder-view-CfvJLoKi.mjs} +3 -3
- package/dist/node/{folder-view-B0P7HA68.mjs.map → folder-view-CfvJLoKi.mjs.map} +1 -1
- package/dist/node/{graphql-editor-CsuAtA6W.mjs → graphql-editor-C-0f2bX3.mjs} +2 -2
- package/dist/node/{graphql-editor-CsuAtA6W.mjs.map → graphql-editor-C-0f2bX3.mjs.map} +1 -1
- package/dist/node/index.mjs +335 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{json-editor-DIbAhmts.mjs → json-editor-DJtigEsH.mjs} +2 -2
- package/dist/node/{json-editor-DIbAhmts.mjs.map → json-editor-DJtigEsH.mjs.map} +1 -1
- package/dist/node/{dist-C88eUERe.mjs → main-DbTMJyA_.mjs} +3 -337
- package/dist/node/main-DbTMJyA_.mjs.map +1 -0
- package/dist/node/{state-schemas-C8R8UxE3.mjs → state-schemas-Bv5h5MqY.mjs} +3 -3
- package/dist/node/{state-schemas-C8R8UxE3.mjs.map → state-schemas-Bv5h5MqY.mjs.map} +1 -1
- package/package.json +6 -6
- package/dist/browser/dist-Bldev8ZK.js.map +0 -1
- package/dist/browser/dist-DXM8ccKa.js +0 -533
- package/dist/browser/dist-DXM8ccKa.js.map +0 -1
- package/dist/node/dist-C88eUERe.mjs.map +0 -1
- package/dist/node/dist-DuuhSkaw.mjs.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { A as __toCommonJS, D as __esmMin, E as __commonJSMin, O as __exportAll } from "./dist-fA4EItr0.mjs";
|
|
2
|
-
import { S as createState, X as generateId, g as baseLoadFromInput, h as baseCreateDocument, k as isDocumentAction, v as baseSaveToFileHandle, w as defaultBaseState, x as createReducer } from "./document-drive-DjL9iikf.mjs";
|
|
3
2
|
import { t as require_graphql } from "./graphql-DskHmkMe.mjs";
|
|
4
|
-
//#region ../reactor/dist/drive-container-types-
|
|
3
|
+
//#region ../reactor/dist/drive-container-types-BuFNr0j0.js
|
|
5
4
|
/**
|
|
6
5
|
* Error thrown when a document model module is not found in the registry.
|
|
7
6
|
*/
|
|
@@ -732,339 +731,6 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
732
731
|
module.exports = require_graphql_tag_umd().gql;
|
|
733
732
|
}));
|
|
734
733
|
//#endregion
|
|
735
|
-
|
|
736
|
-
var import_main = require_main();
|
|
737
|
-
const REACTOR_DRIVE_DOCUMENT_TYPE = "powerhouse/reactor-drive";
|
|
738
|
-
const REACTOR_DRIVE_FILE_EXTENSION = "phrd";
|
|
739
|
-
function setDriveNameAction(input) {
|
|
740
|
-
return {
|
|
741
|
-
id: generateId(),
|
|
742
|
-
type: "SET_DRIVE_NAME",
|
|
743
|
-
scope: "global",
|
|
744
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
745
|
-
input
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
function setDriveIconAction(input) {
|
|
749
|
-
return {
|
|
750
|
-
id: generateId(),
|
|
751
|
-
type: "SET_DRIVE_ICON",
|
|
752
|
-
scope: "global",
|
|
753
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
754
|
-
input
|
|
755
|
-
};
|
|
756
|
-
}
|
|
757
|
-
function setSharingTypeAction(input) {
|
|
758
|
-
return {
|
|
759
|
-
id: generateId(),
|
|
760
|
-
type: "SET_SHARING_TYPE",
|
|
761
|
-
scope: "local",
|
|
762
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
763
|
-
input
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
function setAvailableOfflineAction(input) {
|
|
767
|
-
return {
|
|
768
|
-
id: generateId(),
|
|
769
|
-
type: "SET_AVAILABLE_OFFLINE",
|
|
770
|
-
scope: "local",
|
|
771
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
772
|
-
input
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
function addFolderAction(input) {
|
|
776
|
-
return {
|
|
777
|
-
id: generateId(),
|
|
778
|
-
type: "ADD_FOLDER",
|
|
779
|
-
scope: "document",
|
|
780
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
781
|
-
input
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
function updateFolderAction(input) {
|
|
785
|
-
return {
|
|
786
|
-
id: generateId(),
|
|
787
|
-
type: "UPDATE_FOLDER",
|
|
788
|
-
scope: "document",
|
|
789
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
790
|
-
input
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
function removeFolderAction(input) {
|
|
794
|
-
return {
|
|
795
|
-
id: generateId(),
|
|
796
|
-
type: "REMOVE_FOLDER",
|
|
797
|
-
scope: "document",
|
|
798
|
-
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
799
|
-
input
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
const reactorDriveActions = {
|
|
803
|
-
setDriveName: setDriveNameAction,
|
|
804
|
-
setDriveIcon: setDriveIconAction,
|
|
805
|
-
setSharingType: setSharingTypeAction,
|
|
806
|
-
setAvailableOffline: setAvailableOfflineAction,
|
|
807
|
-
addFolder: addFolderAction,
|
|
808
|
-
updateFolder: updateFolderAction,
|
|
809
|
-
removeFolder: removeFolderAction
|
|
810
|
-
};
|
|
811
|
-
const reactorDriveStateReducer = (state, action) => {
|
|
812
|
-
if (isDocumentAction(action)) return state;
|
|
813
|
-
const typedAction = action;
|
|
814
|
-
switch (typedAction.type) {
|
|
815
|
-
case "SET_DRIVE_NAME": {
|
|
816
|
-
const input = typedAction.input;
|
|
817
|
-
state.global.name = input.name;
|
|
818
|
-
return state;
|
|
819
|
-
}
|
|
820
|
-
case "SET_DRIVE_ICON": {
|
|
821
|
-
const input = typedAction.input;
|
|
822
|
-
state.global.icon = input.icon;
|
|
823
|
-
return state;
|
|
824
|
-
}
|
|
825
|
-
case "SET_SHARING_TYPE": {
|
|
826
|
-
const input = typedAction.input;
|
|
827
|
-
state.local.sharingType = input.sharingType;
|
|
828
|
-
return state;
|
|
829
|
-
}
|
|
830
|
-
case "SET_AVAILABLE_OFFLINE": {
|
|
831
|
-
const input = typedAction.input;
|
|
832
|
-
state.local.availableOffline = input.availableOffline;
|
|
833
|
-
return state;
|
|
834
|
-
}
|
|
835
|
-
case "ADD_FOLDER":
|
|
836
|
-
case "UPDATE_FOLDER":
|
|
837
|
-
case "REMOVE_FOLDER": return state;
|
|
838
|
-
default: return state;
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
const initialGlobalState = {
|
|
842
|
-
name: "",
|
|
843
|
-
icon: null
|
|
844
|
-
};
|
|
845
|
-
const initialLocalState = {
|
|
846
|
-
sharingType: "private",
|
|
847
|
-
availableOffline: false
|
|
848
|
-
};
|
|
849
|
-
const reactorDriveCreateState = (state) => {
|
|
850
|
-
return {
|
|
851
|
-
...defaultBaseState(),
|
|
852
|
-
global: {
|
|
853
|
-
...initialGlobalState,
|
|
854
|
-
...state?.global
|
|
855
|
-
},
|
|
856
|
-
local: {
|
|
857
|
-
...initialLocalState,
|
|
858
|
-
...state?.local
|
|
859
|
-
}
|
|
860
|
-
};
|
|
861
|
-
};
|
|
862
|
-
const reactorDriveCreateDocument = (state) => {
|
|
863
|
-
return baseCreateDocument(reactorDriveCreateState, state, REACTOR_DRIVE_DOCUMENT_TYPE);
|
|
864
|
-
};
|
|
865
|
-
const reactorDriveSaveToFileHandle = (document, input) => {
|
|
866
|
-
return baseSaveToFileHandle(document, input);
|
|
867
|
-
};
|
|
868
|
-
const reactorDriveLoadFromInput = (input) => {
|
|
869
|
-
return baseLoadFromInput(input, reactorDriveDocumentReducer);
|
|
870
|
-
};
|
|
871
|
-
const isReactorDriveState = (state) => {
|
|
872
|
-
return typeof state === "object" && state !== null && "global" in state && "local" in state;
|
|
873
|
-
};
|
|
874
|
-
const assertIsReactorDriveState = (state) => {
|
|
875
|
-
if (!isReactorDriveState(state)) throw new Error("Not a reactor-drive state");
|
|
876
|
-
};
|
|
877
|
-
const isReactorDriveDocument = (document) => {
|
|
878
|
-
return typeof document === "object" && document !== null && "header" in document && document.header.documentType === "powerhouse/reactor-drive";
|
|
879
|
-
};
|
|
880
|
-
const assertIsReactorDriveDocument = (document) => {
|
|
881
|
-
if (!isReactorDriveDocument(document)) throw new Error("Not a reactor-drive document");
|
|
882
|
-
};
|
|
883
|
-
const reactorDriveDocumentReducer = createReducer(reactorDriveStateReducer);
|
|
884
|
-
const reactorDriveDocumentGlobalState = {
|
|
885
|
-
id: REACTOR_DRIVE_DOCUMENT_TYPE,
|
|
886
|
-
name: "ReactorDrive",
|
|
887
|
-
extension: REACTOR_DRIVE_FILE_EXTENSION,
|
|
888
|
-
description: "",
|
|
889
|
-
author: {
|
|
890
|
-
name: "Powerhouse Inc",
|
|
891
|
-
website: "https://www.powerhouse.inc/"
|
|
892
|
-
},
|
|
893
|
-
specifications: [{
|
|
894
|
-
version: 1,
|
|
895
|
-
changeLog: [],
|
|
896
|
-
state: {
|
|
897
|
-
global: {
|
|
898
|
-
schema: "type ReactorDriveState {\n name: String!\n icon: String\n}",
|
|
899
|
-
initialValue: JSON.stringify(JSON.stringify(initialGlobalState)),
|
|
900
|
-
examples: []
|
|
901
|
-
},
|
|
902
|
-
local: {
|
|
903
|
-
schema: "type ReactorDriveLocalState {\n sharingType: String!\n availableOffline: Boolean!\n}",
|
|
904
|
-
initialValue: JSON.stringify(JSON.stringify(initialLocalState)),
|
|
905
|
-
examples: []
|
|
906
|
-
}
|
|
907
|
-
},
|
|
908
|
-
modules: [{
|
|
909
|
-
id: "reactor-drive/base-operations",
|
|
910
|
-
name: "base_operations",
|
|
911
|
-
description: "",
|
|
912
|
-
operations: [
|
|
913
|
-
{
|
|
914
|
-
id: "SET_DRIVE_NAME",
|
|
915
|
-
name: "SET_DRIVE_NAME",
|
|
916
|
-
description: "",
|
|
917
|
-
schema: "input SetDriveNameInput { name: String! }",
|
|
918
|
-
template: "",
|
|
919
|
-
reducer: "",
|
|
920
|
-
errors: [],
|
|
921
|
-
examples: [],
|
|
922
|
-
scope: "global"
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
id: "SET_DRIVE_ICON",
|
|
926
|
-
name: "SET_DRIVE_ICON",
|
|
927
|
-
description: "",
|
|
928
|
-
schema: "input SetDriveIconInput { icon: String }",
|
|
929
|
-
template: "",
|
|
930
|
-
reducer: "",
|
|
931
|
-
errors: [],
|
|
932
|
-
examples: [],
|
|
933
|
-
scope: "global"
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
id: "SET_SHARING_TYPE",
|
|
937
|
-
name: "SET_SHARING_TYPE",
|
|
938
|
-
description: "",
|
|
939
|
-
schema: "input SetSharingTypeInput { sharingType: String! }",
|
|
940
|
-
template: "",
|
|
941
|
-
reducer: "",
|
|
942
|
-
errors: [],
|
|
943
|
-
examples: [],
|
|
944
|
-
scope: "local"
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
id: "SET_AVAILABLE_OFFLINE",
|
|
948
|
-
name: "SET_AVAILABLE_OFFLINE",
|
|
949
|
-
description: "",
|
|
950
|
-
schema: "input SetAvailableOfflineInput { availableOffline: Boolean! }",
|
|
951
|
-
template: "",
|
|
952
|
-
reducer: "",
|
|
953
|
-
errors: [],
|
|
954
|
-
examples: [],
|
|
955
|
-
scope: "local"
|
|
956
|
-
},
|
|
957
|
-
{
|
|
958
|
-
id: "ADD_FOLDER",
|
|
959
|
-
name: "ADD_FOLDER",
|
|
960
|
-
description: "",
|
|
961
|
-
schema: "input AddFolderInput { folderId: String! parentFolderId: String name: String! }",
|
|
962
|
-
template: "",
|
|
963
|
-
reducer: "",
|
|
964
|
-
errors: [],
|
|
965
|
-
examples: [],
|
|
966
|
-
scope: "document"
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
id: "UPDATE_FOLDER",
|
|
970
|
-
name: "UPDATE_FOLDER",
|
|
971
|
-
description: "",
|
|
972
|
-
schema: "input UpdateFolderInput { folderId: String! name: String parentFolderId: String }",
|
|
973
|
-
template: "",
|
|
974
|
-
reducer: "",
|
|
975
|
-
errors: [],
|
|
976
|
-
examples: [],
|
|
977
|
-
scope: "document"
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
id: "REMOVE_FOLDER",
|
|
981
|
-
name: "REMOVE_FOLDER",
|
|
982
|
-
description: "",
|
|
983
|
-
schema: "input RemoveFolderInput { folderId: String! }",
|
|
984
|
-
template: "",
|
|
985
|
-
reducer: "",
|
|
986
|
-
errors: [],
|
|
987
|
-
examples: [],
|
|
988
|
-
scope: "document"
|
|
989
|
-
}
|
|
990
|
-
]
|
|
991
|
-
}]
|
|
992
|
-
}]
|
|
993
|
-
};
|
|
994
|
-
const reactorDriveDocumentModelModule = {
|
|
995
|
-
actions: reactorDriveActions,
|
|
996
|
-
reducer: reactorDriveDocumentReducer,
|
|
997
|
-
documentModel: createState(defaultBaseState(), reactorDriveDocumentGlobalState),
|
|
998
|
-
utils: {
|
|
999
|
-
fileExtension: REACTOR_DRIVE_FILE_EXTENSION,
|
|
1000
|
-
createState: reactorDriveCreateState,
|
|
1001
|
-
createDocument: reactorDriveCreateDocument,
|
|
1002
|
-
loadFromInput: reactorDriveLoadFromInput,
|
|
1003
|
-
saveToFileHandle: reactorDriveSaveToFileHandle,
|
|
1004
|
-
isStateOfType: isReactorDriveState,
|
|
1005
|
-
assertIsStateOfType: assertIsReactorDriveState,
|
|
1006
|
-
isDocumentOfType: isReactorDriveDocument,
|
|
1007
|
-
assertIsDocumentOfType: assertIsReactorDriveDocument
|
|
1008
|
-
}
|
|
1009
|
-
};
|
|
1010
|
-
import_main.gql`
|
|
1011
|
-
enum ReactorDriveNodeKind {
|
|
1012
|
-
FILE
|
|
1013
|
-
FOLDER
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
input ReactorDrivePagingInput {
|
|
1017
|
-
cursor: String
|
|
1018
|
-
limit: Int
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
type ReactorDriveFileNode {
|
|
1022
|
-
id: ID!
|
|
1023
|
-
driveId: ID!
|
|
1024
|
-
name: String!
|
|
1025
|
-
parentFolder: ID
|
|
1026
|
-
documentType: String!
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
type ReactorDriveFolderNode {
|
|
1030
|
-
id: ID!
|
|
1031
|
-
driveId: ID!
|
|
1032
|
-
name: String!
|
|
1033
|
-
parentFolder: ID
|
|
1034
|
-
children(
|
|
1035
|
-
paging: ReactorDrivePagingInput
|
|
1036
|
-
kind: ReactorDriveNodeKind
|
|
1037
|
-
): ReactorDriveNodePage!
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
union ReactorDriveNode = ReactorDriveFileNode | ReactorDriveFolderNode
|
|
1041
|
-
|
|
1042
|
-
type ReactorDriveNodePage {
|
|
1043
|
-
results: [ReactorDriveNode!]!
|
|
1044
|
-
nextCursor: String
|
|
1045
|
-
hasMore: Boolean!
|
|
1046
|
-
totalCount: Int
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
type ReactorDrive {
|
|
1050
|
-
id: ID!
|
|
1051
|
-
name: String!
|
|
1052
|
-
icon: String
|
|
1053
|
-
sharingType: String!
|
|
1054
|
-
availableOffline: Boolean!
|
|
1055
|
-
rootNodes(
|
|
1056
|
-
paging: ReactorDrivePagingInput
|
|
1057
|
-
kind: ReactorDriveNodeKind
|
|
1058
|
-
): ReactorDriveNodePage!
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
type Query {
|
|
1062
|
-
reactorDrive(id: ID!): ReactorDrive
|
|
1063
|
-
reactorDriveNode(driveId: ID!, id: ID!): ReactorDriveNode
|
|
1064
|
-
reactorDriveDescendants(driveId: ID!, root: ID!): [ReactorDriveNode!]!
|
|
1065
|
-
}
|
|
1066
|
-
`;
|
|
1067
|
-
//#endregion
|
|
1068
|
-
export { SyncStatus as a, tslib_es6_exports as i, require_main as n, DriveCollectionId as o, init_tslib_es6 as r, ModuleNotFoundError as s, reactorDriveDocumentModelModule as t };
|
|
734
|
+
export { DriveCollectionId as a, SyncStatus as i, init_tslib_es6 as n, ModuleNotFoundError as o, tslib_es6_exports as r, require_main as t };
|
|
1069
735
|
|
|
1070
|
-
//# sourceMappingURL=
|
|
736
|
+
//# sourceMappingURL=main-DbTMJyA_.mjs.map
|