@powerhousedao/powerhouse-vetra-packages 6.0.0-dev.169 → 6.0.0-dev.171
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/{connect-MjNGHHUz-BF7j8y2-.js → connect-MjNGHHUz-D6OEFQXC.js} +36 -16
- package/dist/browser/connect-MjNGHHUz-D6OEFQXC.js.map +1 -0
- package/dist/browser/{documents-D25BA9nW.js → documents-icDEepHI.js} +4 -5
- package/dist/browser/{documents-D25BA9nW.js.map → documents-icDEepHI.js.map} +1 -1
- package/dist/browser/{editor-C1Gw1l3r.js → editor-BBj8CdNo.js} +6 -6
- package/dist/browser/{editor-C1Gw1l3r.js.map → editor-BBj8CdNo.js.map} +1 -1
- package/dist/browser/{editor-CdzXLtNM.js → editor-Co1Q5WYR.js} +3 -3
- package/dist/browser/{editor-CdzXLtNM.js.map → editor-Co1Q5WYR.js.map} +1 -1
- package/dist/browser/editors/document-model-editor/module.js +1 -1
- package/dist/browser/editors/generic-drive-explorer/index.js +2 -2
- package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
- package/dist/browser/{folder-view-D9GHnNl4.js → folder-view-s8yhnWIj.js} +2 -2
- package/dist/browser/{folder-view-D9GHnNl4.js.map → folder-view-s8yhnWIj.js.map} +1 -1
- package/dist/browser/{validate-BWGPnihN.js → graphql-editor-CjPDlZ8m.js} +4512 -154
- package/dist/browser/graphql-editor-CjPDlZ8m.js.map +1 -0
- package/dist/browser/{hooks-DcjZbCsk.js → hooks-D5QafZIq.js} +2 -2
- package/dist/browser/{hooks-DcjZbCsk.js.map → hooks-D5QafZIq.js.map} +1 -1
- package/dist/browser/{json-editor-C_IZ6CW1.js → json-editor-CKnoF3Oy.js} +2 -2
- package/dist/browser/{json-editor-C_IZ6CW1.js.map → json-editor-CKnoF3Oy.js.map} +1 -1
- package/dist/browser/{parser-DbYKMg6c.js → parser-CO9mSyAT.js} +1 -1
- package/dist/browser/{parser-DbYKMg6c.js.map → parser-CO9mSyAT.js.map} +1 -1
- package/dist/browser/schema-context-D3X2_oGY.js +69 -0
- package/dist/browser/schema-context-D3X2_oGY.js.map +1 -0
- package/dist/browser/{state-schemas-CitlQ5rT.js → state-schemas-CzRx4xFC.js} +7 -7
- package/dist/browser/{state-schemas-CitlQ5rT.js.map → state-schemas-CzRx4xFC.js.map} +1 -1
- package/dist/browser/style-yyPXZZ_A.js +689 -0
- package/dist/browser/style-yyPXZZ_A.js.map +1 -0
- package/dist/node/{actions-DaMgcd34-Bkhx_OMb.d.mts → actions-DaMgcd34-BCvwIM15.d.mts} +1 -1
- package/dist/node/{actions-DaMgcd34-Bkhx_OMb.d.mts.map → actions-DaMgcd34-BCvwIM15.d.mts.map} +1 -1
- package/dist/node/{connect-MjNGHHUz-Bk1Rjd4n.mjs → connect-MjNGHHUz-DYbs2414.mjs} +36 -16
- package/dist/node/connect-MjNGHHUz-DYbs2414.mjs.map +1 -0
- package/dist/node/document-models/index.d.mts +1 -1
- package/dist/node/{documents-DzgbZ5_x.mjs → documents-CemXwwGO.mjs} +3 -3
- package/dist/node/{documents-DzgbZ5_x.mjs.map → documents-CemXwwGO.mjs.map} +1 -1
- package/dist/node/{editor-DCVyggbU.mjs → editor-DNan12H5.mjs} +3 -3
- package/dist/node/{editor-DCVyggbU.mjs.map → editor-DNan12H5.mjs.map} +1 -1
- package/dist/node/{editor-C0Gm4RBa.mjs → editor-e0uDqoxf.mjs} +74 -14
- package/dist/node/editor-e0uDqoxf.mjs.map +1 -0
- package/dist/node/editors/document-model-editor/module.d.mts +1 -1
- package/dist/node/editors/document-model-editor/module.mjs +1 -1
- package/dist/node/editors/generic-drive-explorer/index.mjs +2 -2
- package/dist/node/editors/generic-drive-explorer/module.d.mts +1 -1
- package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
- package/dist/node/{folder-view-B6mN1Plk.mjs → folder-view-BA5E_j6P.mjs} +2 -2
- package/dist/node/{folder-view-B6mN1Plk.mjs.map → folder-view-BA5E_j6P.mjs.map} +1 -1
- package/dist/node/{graphql-S03cUTDW.mjs → graphql-BoC-AFCj.mjs} +2 -2
- package/dist/node/{graphql-S03cUTDW.mjs.map → graphql-BoC-AFCj.mjs.map} +1 -1
- package/dist/node/{graphql-editor-BQKSvxu4.mjs → graphql-editor-BqzNJsTJ.mjs} +4 -4
- package/dist/node/{graphql-editor-BQKSvxu4.mjs.map → graphql-editor-BqzNJsTJ.mjs.map} +1 -1
- package/dist/node/{hooks-D5M9Gabh.mjs → hooks-SulFafER.mjs} +2 -2
- package/dist/node/{hooks-D5M9Gabh.mjs.map → hooks-SulFafER.mjs.map} +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/{json-editor-BNh5hJeX.mjs → json-editor-OUbJEJ6K.mjs} +2 -2
- package/dist/node/{json-editor-BNh5hJeX.mjs.map → json-editor-OUbJEJ6K.mjs.map} +1 -1
- package/dist/node/{state-schemas-2jwwSHRI.mjs → state-schemas-BrKFLKhj.mjs} +6 -7
- package/dist/node/{state-schemas-2jwwSHRI.mjs.map → state-schemas-BrKFLKhj.mjs.map} +1 -1
- package/package.json +5 -5
- package/dist/browser/connect-MjNGHHUz-BF7j8y2-.js.map +0 -1
- package/dist/browser/graphql-editor-CpHMdwcs.js +0 -4539
- package/dist/browser/graphql-editor-CpHMdwcs.js.map +0 -1
- package/dist/browser/style-D0HSuDqn.js +0 -5199
- package/dist/browser/style-D0HSuDqn.js.map +0 -1
- package/dist/browser/validate-BWGPnihN.js.map +0 -1
- package/dist/node/connect-MjNGHHUz-Bk1Rjd4n.mjs.map +0 -1
- package/dist/node/editor-C0Gm4RBa.mjs.map +0 -1
- package/dist/node/schema-context-BssITYoe.mjs +0 -102
- package/dist/node/schema-context-BssITYoe.mjs.map +0 -1
|
@@ -3,7 +3,7 @@ import { B as undo, C as documentModelDocumentType, E as replayDocument, H as va
|
|
|
3
3
|
import { t as capitalCase } from "./dist-BXygvBtd.js";
|
|
4
4
|
import { A as twMerge, _ as mergeClassNameProps, a as Content2, b as __assign, c as Root3, d as DropdownMenuContent, f as DropdownMenuItem, g as cn$1, k as twJoin, l as Trigger, m as Icon, o as Portal, p as DropdownMenuTrigger, s as Provider, u as DropdownMenu, y as clsx } from "./dist-B7W7q8B9.js";
|
|
5
5
|
import { a as or, c as F$2, d as R$2, f as T$3, g as x$3, h as u$1, l as L$2, m as h$2, n as Vr, p as U$1, r as ce$2, s as ur, t as C$3, u as P$2 } from "./chunk-VBDAOXYI-B4r8Aw5i.js";
|
|
6
|
-
import { t as parse } from "./parser-
|
|
6
|
+
import { t as parse } from "./parser-CO9mSyAT.js";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import React, { Children, Fragment, cloneElement, forwardRef, isValidElement, memo, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23765,6 +23765,7 @@ var GqlRequestChannel = class {
|
|
|
23765
23765
|
pushBlocked = false;
|
|
23766
23766
|
isPushing = false;
|
|
23767
23767
|
pendingDrain = false;
|
|
23768
|
+
receivingPages = false;
|
|
23768
23769
|
connectionState = "connecting";
|
|
23769
23770
|
connectionStateCallbacks = /* @__PURE__ */ new Set();
|
|
23770
23771
|
constructor(logger, channelId, remoteName, cursorStorage, config, operationIndex, pollTimer) {
|
|
@@ -23799,6 +23800,10 @@ var GqlRequestChannel = class {
|
|
|
23799
23800
|
return;
|
|
23800
23801
|
}
|
|
23801
23802
|
if (this.pushBlocked) return;
|
|
23803
|
+
if (this.receivingPages) {
|
|
23804
|
+
this.pendingDrain = true;
|
|
23805
|
+
return;
|
|
23806
|
+
}
|
|
23802
23807
|
this.attemptPush(syncOps);
|
|
23803
23808
|
});
|
|
23804
23809
|
this.outbox.onRemoved((syncOps) => {
|
|
@@ -23852,7 +23857,8 @@ var GqlRequestChannel = class {
|
|
|
23852
23857
|
lastSuccessUtcMs: this.lastSuccessUtcMs ?? 0,
|
|
23853
23858
|
lastFailureUtcMs: this.lastFailureUtcMs ?? 0,
|
|
23854
23859
|
pushBlocked: this.pushBlocked,
|
|
23855
|
-
pushFailureCount: this.pushFailureCount
|
|
23860
|
+
pushFailureCount: this.pushFailureCount,
|
|
23861
|
+
receivingPages: this.receivingPages
|
|
23856
23862
|
};
|
|
23857
23863
|
}
|
|
23858
23864
|
onConnectionStateChange(callback) {
|
|
@@ -23900,7 +23906,7 @@ var GqlRequestChannel = class {
|
|
|
23900
23906
|
if (!this.handlePollError(error)) throw error;
|
|
23901
23907
|
return;
|
|
23902
23908
|
}
|
|
23903
|
-
const { envelopes, ackOrdinal, deadLetters } = response;
|
|
23909
|
+
const { envelopes, ackOrdinal, deadLetters, hasMore } = response;
|
|
23904
23910
|
if (ackOrdinal > 0) trimMailboxFromAckOrdinal(this.outbox, ackOrdinal);
|
|
23905
23911
|
const sortedEnvelopes = sortEnvelopesByFirstOperationTimestamp(envelopes);
|
|
23906
23912
|
const allSyncOps = [];
|
|
@@ -23912,6 +23918,11 @@ var GqlRequestChannel = class {
|
|
|
23912
23918
|
const consolidated = allSyncOps.length > 1 ? consolidateSyncOperations(allSyncOps) : allSyncOps;
|
|
23913
23919
|
if (consolidated.length > 0) this.inbox.add(...consolidated);
|
|
23914
23920
|
if (deadLetters.length > 0) this.handleRemoteDeadLetters(deadLetters);
|
|
23921
|
+
if (hasMore) this.receivingPages = true;
|
|
23922
|
+
else if (this.receivingPages) {
|
|
23923
|
+
this.receivingPages = false;
|
|
23924
|
+
this.drainOutbox();
|
|
23925
|
+
}
|
|
23915
23926
|
this.lastSuccessUtcMs = Date.now();
|
|
23916
23927
|
this.failureCount = 0;
|
|
23917
23928
|
this.transitionConnectionState("connected");
|
|
@@ -24061,6 +24072,7 @@ var GqlRequestChannel = class {
|
|
|
24061
24072
|
scopes
|
|
24062
24073
|
operationCount
|
|
24063
24074
|
}
|
|
24075
|
+
hasMore
|
|
24064
24076
|
}
|
|
24065
24077
|
}
|
|
24066
24078
|
`;
|
|
@@ -24073,7 +24085,8 @@ var GqlRequestChannel = class {
|
|
|
24073
24085
|
return {
|
|
24074
24086
|
envelopes: response.pollSyncEnvelopes.envelopes,
|
|
24075
24087
|
ackOrdinal: response.pollSyncEnvelopes.ackOrdinal,
|
|
24076
|
-
deadLetters: response.pollSyncEnvelopes.deadLetters ?? []
|
|
24088
|
+
deadLetters: response.pollSyncEnvelopes.deadLetters ?? [],
|
|
24089
|
+
hasMore: response.pollSyncEnvelopes.hasMore
|
|
24077
24090
|
};
|
|
24078
24091
|
}
|
|
24079
24092
|
/**
|
|
@@ -28793,14 +28806,16 @@ function downloadFile(document, fileName) {
|
|
|
28793
28806
|
}
|
|
28794
28807
|
async function getDocumentExtension(document) {
|
|
28795
28808
|
const documentType = document.header.documentType;
|
|
28796
|
-
if (documentType === "powerhouse/document-model") return "phdm";
|
|
28797
28809
|
let rawExtension;
|
|
28798
|
-
|
|
28799
|
-
|
|
28800
|
-
const
|
|
28801
|
-
|
|
28810
|
+
if (documentType === "powerhouse/document-model") rawExtension = document.state.global?.extension;
|
|
28811
|
+
else {
|
|
28812
|
+
const reactorClient = window.ph?.reactorClient;
|
|
28813
|
+
if (reactorClient) {
|
|
28814
|
+
const { results: documentModelModules } = await reactorClient.getDocumentModelModules();
|
|
28815
|
+
rawExtension = documentModelModules.find((m) => m.documentModel.global.id === documentType)?.utils.fileExtension;
|
|
28816
|
+
}
|
|
28802
28817
|
}
|
|
28803
|
-
return (rawExtension ?? "
|
|
28818
|
+
return (rawExtension ?? "").replace(/^\.+|\.+$/g, "");
|
|
28804
28819
|
}
|
|
28805
28820
|
const BASE_STATE_KEYS = new Set(["auth", "document"]);
|
|
28806
28821
|
/**
|
|
@@ -28835,7 +28850,8 @@ async function exportFile(document, suggestedName) {
|
|
|
28835
28850
|
operations
|
|
28836
28851
|
};
|
|
28837
28852
|
const extension = await getDocumentExtension(documentWithOps);
|
|
28838
|
-
const
|
|
28853
|
+
const baseName = suggestedName || documentWithOps.header.name || "Untitled";
|
|
28854
|
+
const name = extension ? `${baseName}.${extension}.phd` : `${baseName}.phd`;
|
|
28839
28855
|
if (!window.showSaveFilePicker) return downloadFile(documentWithOps, name);
|
|
28840
28856
|
try {
|
|
28841
28857
|
const fileHandle = await window.showSaveFilePicker({ suggestedName: name });
|
|
@@ -29238,7 +29254,7 @@ const GetDocumentParentsDocument = gql`
|
|
|
29238
29254
|
`;
|
|
29239
29255
|
const FindDocumentsDocument = gql`
|
|
29240
29256
|
query FindDocuments(
|
|
29241
|
-
$search: SearchFilterInput
|
|
29257
|
+
$search: SearchFilterInput
|
|
29242
29258
|
$view: ViewFilterInput
|
|
29243
29259
|
$paging: PagingInput
|
|
29244
29260
|
) {
|
|
@@ -29452,7 +29468,7 @@ const DeleteDocumentsDocument = gql`
|
|
|
29452
29468
|
`;
|
|
29453
29469
|
const DocumentChangesDocument = gql`
|
|
29454
29470
|
subscription DocumentChanges(
|
|
29455
|
-
$search: SearchFilterInput
|
|
29471
|
+
$search: SearchFilterInput
|
|
29456
29472
|
$view: ViewFilterInput
|
|
29457
29473
|
) {
|
|
29458
29474
|
documentChanges(search: $search, view: $view) {
|
|
@@ -29551,12 +29567,16 @@ const PollSyncEnvelopesDocument = gql`
|
|
|
29551
29567
|
documentId
|
|
29552
29568
|
error
|
|
29553
29569
|
}
|
|
29570
|
+
hasMore
|
|
29554
29571
|
}
|
|
29555
29572
|
}
|
|
29556
29573
|
`;
|
|
29557
29574
|
const TouchChannelDocument = gql`
|
|
29558
29575
|
mutation TouchChannel($input: TouchChannelInput!) {
|
|
29559
|
-
touchChannel(input: $input)
|
|
29576
|
+
touchChannel(input: $input) {
|
|
29577
|
+
success
|
|
29578
|
+
ackOrdinal
|
|
29579
|
+
}
|
|
29560
29580
|
}
|
|
29561
29581
|
`;
|
|
29562
29582
|
const PushSyncEnvelopesDocument = gql`
|
|
@@ -30074,7 +30094,7 @@ const useVetraPackages = () => {
|
|
|
30074
30094
|
/** Adds the Vetra package manager event handler */
|
|
30075
30095
|
const addVetraPackageManagerEventHandler = vetraPackageManagerFunctions.addEventHandler;
|
|
30076
30096
|
function useDocumentModelModules() {
|
|
30077
|
-
return useVetraPackages().flatMap((pkg) => pkg.documentModels);
|
|
30097
|
+
return useVetraPackages().flatMap((pkg) => pkg.documentModels).filter((module, index, modules) => modules.findIndex((m) => m.documentModel.global.id === module.documentModel.global.id && m.version === module.version) === index);
|
|
30078
30098
|
}
|
|
30079
30099
|
function useDocumentModelModuleById(id) {
|
|
30080
30100
|
return useDocumentModelModules()?.find((module) => module.documentModel.global.id === id);
|
|
@@ -38345,4 +38365,4 @@ const ConnectSearchBar = (props) => {
|
|
|
38345
38365
|
//#endregion
|
|
38346
38366
|
export { useSetPHAppConfig as C, useSelectedFolder as S, useUserPermissions as T, showCreateDocumentModal as _, FolderItem as a, usePHToast as b, Controller as c, get as d, set as f, isFolderNodeKind as g, isFileNodeKind as h, FileItem as i, FormProvider as l, useFormContext as m, ConnectSearchBar as n, useDrop as o, useForm as p, DocumentToolbar as r, useVirtualizer as s, Breadcrumbs as t, appendErrors as u, useDocumentModelModules as v, useSetPHDocumentEditorConfig as w, useSelectedDocumentOfType as x, useNodesInSelectedDriveOrFolder as y };
|
|
38347
38367
|
|
|
38348
|
-
//# sourceMappingURL=connect-MjNGHHUz-
|
|
38368
|
+
//# sourceMappingURL=connect-MjNGHHUz-D6OEFQXC.js.map
|