@powerhousedao/powerhouse-vetra-packages 6.2.2-dev.53 → 6.2.2-dev.54

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.
Files changed (59) hide show
  1. package/dist/browser/assets/{entry-CHj7_KqV.js → entry-D-JZwwGk.js} +2 -2
  2. package/dist/browser/assets/{projection-entry-Deqa5Gd1.js → projection-entry-64-WZZjU.js} +2 -2
  3. package/dist/browser/{connect-CxCgNBS5.js → connect-D1KIMa_5.js} +4 -4
  4. package/dist/browser/{connect-CxCgNBS5.js.map → connect-D1KIMa_5.js.map} +1 -1
  5. package/dist/browser/{dist-BvAny8D6.js → dist-dmLcxsWV.js} +46 -18
  6. package/dist/browser/dist-dmLcxsWV.js.map +1 -0
  7. package/dist/browser/{document-drive-DODPIGg7.js → document-drive-cxHraTVQ.js} +72 -2
  8. package/dist/browser/document-drive-cxHraTVQ.js.map +1 -0
  9. package/dist/browser/document-models/index.js +1 -1
  10. package/dist/browser/{editor-CI2ALn3N.js → editor-BAUTcFP2.js} +6 -6
  11. package/dist/browser/{editor-CI2ALn3N.js.map → editor-BAUTcFP2.js.map} +1 -1
  12. package/dist/browser/{editor-D3t_GHDk.js → editor-PmQcB82h.js} +5 -5
  13. package/dist/browser/{editor-D3t_GHDk.js.map → editor-PmQcB82h.js.map} +1 -1
  14. package/dist/browser/editors/document-model-editor/module.js +1 -1
  15. package/dist/browser/editors/generic-drive-explorer/index.js +4 -4
  16. package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
  17. package/dist/browser/{folder-view-BZrdvaCI.js → folder-view-CWnDdLMC.js} +3 -3
  18. package/dist/browser/{folder-view-BZrdvaCI.js.map → folder-view-CWnDdLMC.js.map} +1 -1
  19. package/dist/browser/{graphql-editor-BFPxzM2v.js → graphql-editor-Cq_L5IUQ.js} +3 -3
  20. package/dist/browser/{graphql-editor-BFPxzM2v.js.map → graphql-editor-Cq_L5IUQ.js.map} +1 -1
  21. package/dist/browser/index.js +2 -2
  22. package/dist/browser/{json-editor-aqjhBXZ9.js → json-editor-D8lysNHE.js} +3 -3
  23. package/dist/browser/{json-editor-aqjhBXZ9.js.map → json-editor-D8lysNHE.js.map} +1 -1
  24. package/dist/browser/{lib-V-A4Y98b.js → lib-DKvC6Hnv.js} +3 -4
  25. package/dist/browser/lib-DKvC6Hnv.js.map +1 -0
  26. package/dist/browser/{state-schemas-DQmnR8Nk.js → state-schemas-NyThZN-C.js} +3 -3
  27. package/dist/browser/{state-schemas-DQmnR8Nk.js.map → state-schemas-NyThZN-C.js.map} +1 -1
  28. package/dist/node/{connect-vii63Lqk.mjs → connect-BixjoUPL.mjs} +4 -4
  29. package/dist/node/{connect-vii63Lqk.mjs.map → connect-BixjoUPL.mjs.map} +1 -1
  30. package/dist/node/{dist-DTRphwh_.mjs → dist-BtnA_6jV.mjs} +46 -18
  31. package/dist/node/dist-BtnA_6jV.mjs.map +1 -0
  32. package/dist/node/{document-drive-BMfQ8jKD.mjs → document-drive-ChLoGFvU.mjs} +72 -2
  33. package/dist/node/document-drive-ChLoGFvU.mjs.map +1 -0
  34. package/dist/node/document-models/index.mjs +1 -1
  35. package/dist/node/{editor-C7IrdUqN.mjs → editor-C8Drq-be.mjs} +5 -5
  36. package/dist/node/{editor-C7IrdUqN.mjs.map → editor-C8Drq-be.mjs.map} +1 -1
  37. package/dist/node/{editor-BQ7Hepmx.mjs → editor-cfoi-9LF.mjs} +6 -6
  38. package/dist/node/{editor-BQ7Hepmx.mjs.map → editor-cfoi-9LF.mjs.map} +1 -1
  39. package/dist/node/editors/document-model-editor/module.mjs +1 -1
  40. package/dist/node/editors/generic-drive-explorer/index.mjs +4 -4
  41. package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
  42. package/dist/node/{folder-view-PvIixyjx.mjs → folder-view--I9GOsir.mjs} +3 -3
  43. package/dist/node/{folder-view-PvIixyjx.mjs.map → folder-view--I9GOsir.mjs.map} +1 -1
  44. package/dist/node/{graphql-editor-CKzPtn6J.mjs → graphql-editor-BKGQ8ojN.mjs} +3 -3
  45. package/dist/node/{graphql-editor-CKzPtn6J.mjs.map → graphql-editor-BKGQ8ojN.mjs.map} +1 -1
  46. package/dist/node/index.mjs +2 -2
  47. package/dist/node/{json-editor-BaNxPekM.mjs → json-editor-32paCJkU.mjs} +3 -3
  48. package/dist/node/{json-editor-BaNxPekM.mjs.map → json-editor-32paCJkU.mjs.map} +1 -1
  49. package/dist/node/{main-C2GlZ2Rh.mjs → main-DRfab-vL.mjs} +3 -4
  50. package/dist/node/main-DRfab-vL.mjs.map +1 -0
  51. package/dist/node/{state-schemas-C--ZSgHT.mjs → state-schemas-ClrkM0Fn.mjs} +3 -3
  52. package/dist/node/{state-schemas-C--ZSgHT.mjs.map → state-schemas-ClrkM0Fn.mjs.map} +1 -1
  53. package/package.json +7 -7
  54. package/dist/browser/dist-BvAny8D6.js.map +0 -1
  55. package/dist/browser/document-drive-DODPIGg7.js.map +0 -1
  56. package/dist/browser/lib-V-A4Y98b.js.map +0 -1
  57. package/dist/node/dist-DTRphwh_.mjs.map +0 -1
  58. package/dist/node/document-drive-BMfQ8jKD.mjs.map +0 -1
  59. package/dist/node/main-C2GlZ2Rh.mjs.map +0 -1
@@ -2980,6 +2980,76 @@ function castDraft(value) {
2980
2980
  }
2981
2981
  //#endregion
2982
2982
  //#region ../shared/dist/document-model/index.js
2983
+ /**
2984
+ * What separates a signature's params when it travels as one string.
2985
+ *
2986
+ * GraphQL declares `signatures` as a list of strings, not a list of lists, so a
2987
+ * tuple is joined for transport and split on arrival. The separator is here so
2988
+ * the two halves cannot disagree about it - they live in different packages, and
2989
+ * a mismatch would corrupt every signature that crossed the wire rather than
2990
+ * failing outright.
2991
+ */
2992
+ const SIGNATURE_PARAM_SEPARATOR = ", ";
2993
+ /** The number of params a signature carries. */
2994
+ const SIGNATURE_PARAM_COUNT = 5;
2995
+ /** Joins a signature's params for transport. Already-joined input passes through. */
2996
+ function serializeSignature(signature) {
2997
+ return Array.isArray(signature) ? signature.join(SIGNATURE_PARAM_SEPARATOR) : signature;
2998
+ }
2999
+ /**
3000
+ * Splits a transported signature back into its params. A tuple passes through.
3001
+ *
3002
+ * Short input is padded rather than refused: verification reads the params by
3003
+ * position and fails on a wrong one, which says more than a length complaint
3004
+ * raised here would.
3005
+ */
3006
+ function deserializeSignature(signature) {
3007
+ if (Array.isArray(signature)) return signature;
3008
+ const parts = signature.split(SIGNATURE_PARAM_SEPARATOR);
3009
+ return Array.from({ length: SIGNATURE_PARAM_COUNT }, (_unused, index) => parts[index] ?? "");
3010
+ }
3011
+ /**
3012
+ * Projects an action onto the fields the GraphQL `ActionInput` declares.
3013
+ *
3014
+ * A projection rather than a spread, because an input object rejects a field it
3015
+ * does not declare, and that refusal takes the whole request with it. An action
3016
+ * read back out of storage can carry fields the type no longer has - a legacy
3017
+ * `attachments` array, or the operation fields left behind by a signing helper
3018
+ * that returns an operation - and any one of them would sink an otherwise valid
3019
+ * submission.
3020
+ *
3021
+ * Only fields the action actually carries are emitted, so an unsigned action
3022
+ * sends no context at all rather than a context full of nulls.
3023
+ */
3024
+ function toTransportAction(action) {
3025
+ if (action.input === void 0 || action.input === null) throw new Error(`Action ${action.id} (${action.type}) has no input, which the wire requires`);
3026
+ const projected = {
3027
+ id: action.id,
3028
+ type: action.type,
3029
+ timestampUtcMs: action.timestampUtcMs,
3030
+ input: action.input,
3031
+ scope: action.scope
3032
+ };
3033
+ const context = toTransportContext(action.context);
3034
+ return context ? {
3035
+ ...projected,
3036
+ context
3037
+ } : projected;
3038
+ }
3039
+ function toTransportContext(context) {
3040
+ if (!context) return;
3041
+ const projected = {};
3042
+ if (context.prevOpIndex !== void 0) projected.prevOpIndex = context.prevOpIndex;
3043
+ if (context.prevOpHash !== void 0) projected.prevOpHash = context.prevOpHash;
3044
+ if (context.nonce !== void 0) projected.nonce = context.nonce;
3045
+ const signer = context.signer;
3046
+ if (signer) projected.signer = {
3047
+ ...signer.user ? { user: signer.user } : {},
3048
+ ...signer.app ? { app: signer.app } : {},
3049
+ signatures: (signer.signatures ?? []).map(serializeSignature)
3050
+ };
3051
+ return Object.keys(projected).length > 0 ? projected : void 0;
3052
+ }
2983
3053
  var InvalidActionInputError = class extends Error {
2984
3054
  data;
2985
3055
  constructor(data) {
@@ -8326,6 +8396,6 @@ const driveDocumentModelModule = {
8326
8396
  }
8327
8397
  };
8328
8398
  //#endregion
8329
- export { setOperationName as $, createZip as A, releaseNewVersion as B, baseSaveToFileHandle as C, createPresignedHeader as D, createBaseState as E, documentModelDocumentType as F, setModelDescription as G, setAuthorName as H, hashDocumentStateForScope as I, setModelName as J, setModelExtension as K, isDocumentAction as L, deleteModule as M, deleteOperation as N, createReducer as O, deleteOperationError as P, setOperationErrorName as Q, normalizeDocumentModelVersion as R, baseLoadFromInputVersioned as S, createAction as T, setAuthorWebsite as U, replayDocumentVersioned as V, setInitialState as W, setName as X, setModuleName as Y, setOperationDescription as Z, addOperationError as _, handleTargetNameCollisions as a, validateStateSchemaName as at, baseCreateDocument as b, isValidName as c, documentModelDocumentModelModule as d, setOperationSchema as et, logger as f, addOperation as g, addModule as h, generateNodesCopy as i, validateModules as it, defaultBaseState as j, createState as k, moveNode as l, BaseDocumentStateSchema as m, copyNode as n, undo as nt, isFileNode as o, generateId as ot, BaseDocumentHeaderSchema as p, setModelId as q, driveDocumentModelModule as r, validateInitialState as rt, isFolderNode as s, addFolder as t, setStateSchema as tt, updateNode as u, assertAuthPreservedOnDuplicate as v, buildSignedAction as w, baseLoadFromInput as x, baseActions as y, redo as z };
8399
+ export { setOperationErrorName as $, createZip as A, redo as B, baseSaveToFileHandle as C, createPresignedHeader as D, createBaseState as E, deserializeSignature as F, setInitialState as G, replayDocumentVersioned as H, documentModelDocumentType as I, setModelId as J, setModelDescription as K, hashDocumentStateForScope as L, deleteModule as M, deleteOperation as N, createReducer as O, deleteOperationError as P, setOperationDescription as Q, isDocumentAction as R, baseLoadFromInputVersioned as S, createAction as T, setAuthorName as U, releaseNewVersion as V, setAuthorWebsite as W, setModuleName as X, setModelName as Y, setName as Z, addOperationError as _, handleTargetNameCollisions as a, validateInitialState as at, baseCreateDocument as b, isValidName as c, generateId as ct, documentModelDocumentModelModule as d, setOperationName as et, logger as f, addOperation as g, addModule as h, generateNodesCopy as i, undo as it, defaultBaseState as j, createState as k, moveNode as l, BaseDocumentStateSchema as m, copyNode as n, setStateSchema as nt, isFileNode as o, validateModules as ot, BaseDocumentHeaderSchema as p, setModelExtension as q, driveDocumentModelModule as r, toTransportAction as rt, isFolderNode as s, validateStateSchemaName as st, addFolder as t, setOperationSchema as tt, updateNode as u, assertAuthPreservedOnDuplicate as v, buildSignedAction as w, baseLoadFromInput as x, baseActions as y, normalizeDocumentModelVersion as z };
8330
8400
 
8331
- //# sourceMappingURL=document-drive-DODPIGg7.js.map
8401
+ //# sourceMappingURL=document-drive-cxHraTVQ.js.map