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

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
@@ -2997,6 +2997,76 @@ function castDraft(value) {
2997
2997
  }
2998
2998
  //#endregion
2999
2999
  //#region ../shared/dist/document-model/index.js
3000
+ /**
3001
+ * What separates a signature's params when it travels as one string.
3002
+ *
3003
+ * GraphQL declares `signatures` as a list of strings, not a list of lists, so a
3004
+ * tuple is joined for transport and split on arrival. The separator is here so
3005
+ * the two halves cannot disagree about it - they live in different packages, and
3006
+ * a mismatch would corrupt every signature that crossed the wire rather than
3007
+ * failing outright.
3008
+ */
3009
+ const SIGNATURE_PARAM_SEPARATOR = ", ";
3010
+ /** The number of params a signature carries. */
3011
+ const SIGNATURE_PARAM_COUNT = 5;
3012
+ /** Joins a signature's params for transport. Already-joined input passes through. */
3013
+ function serializeSignature(signature) {
3014
+ return Array.isArray(signature) ? signature.join(SIGNATURE_PARAM_SEPARATOR) : signature;
3015
+ }
3016
+ /**
3017
+ * Splits a transported signature back into its params. A tuple passes through.
3018
+ *
3019
+ * Short input is padded rather than refused: verification reads the params by
3020
+ * position and fails on a wrong one, which says more than a length complaint
3021
+ * raised here would.
3022
+ */
3023
+ function deserializeSignature(signature) {
3024
+ if (Array.isArray(signature)) return signature;
3025
+ const parts = signature.split(SIGNATURE_PARAM_SEPARATOR);
3026
+ return Array.from({ length: SIGNATURE_PARAM_COUNT }, (_unused, index) => parts[index] ?? "");
3027
+ }
3028
+ /**
3029
+ * Projects an action onto the fields the GraphQL `ActionInput` declares.
3030
+ *
3031
+ * A projection rather than a spread, because an input object rejects a field it
3032
+ * does not declare, and that refusal takes the whole request with it. An action
3033
+ * read back out of storage can carry fields the type no longer has - a legacy
3034
+ * `attachments` array, or the operation fields left behind by a signing helper
3035
+ * that returns an operation - and any one of them would sink an otherwise valid
3036
+ * submission.
3037
+ *
3038
+ * Only fields the action actually carries are emitted, so an unsigned action
3039
+ * sends no context at all rather than a context full of nulls.
3040
+ */
3041
+ function toTransportAction(action) {
3042
+ if (action.input === void 0 || action.input === null) throw new Error(`Action ${action.id} (${action.type}) has no input, which the wire requires`);
3043
+ const projected = {
3044
+ id: action.id,
3045
+ type: action.type,
3046
+ timestampUtcMs: action.timestampUtcMs,
3047
+ input: action.input,
3048
+ scope: action.scope
3049
+ };
3050
+ const context = toTransportContext(action.context);
3051
+ return context ? {
3052
+ ...projected,
3053
+ context
3054
+ } : projected;
3055
+ }
3056
+ function toTransportContext(context) {
3057
+ if (!context) return;
3058
+ const projected = {};
3059
+ if (context.prevOpIndex !== void 0) projected.prevOpIndex = context.prevOpIndex;
3060
+ if (context.prevOpHash !== void 0) projected.prevOpHash = context.prevOpHash;
3061
+ if (context.nonce !== void 0) projected.nonce = context.nonce;
3062
+ const signer = context.signer;
3063
+ if (signer) projected.signer = {
3064
+ ...signer.user ? { user: signer.user } : {},
3065
+ ...signer.app ? { app: signer.app } : {},
3066
+ signatures: (signer.signatures ?? []).map(serializeSignature)
3067
+ };
3068
+ return Object.keys(projected).length > 0 ? projected : void 0;
3069
+ }
3000
3070
  var InvalidActionInputError = class extends Error {
3001
3071
  data;
3002
3072
  constructor(data) {
@@ -8343,6 +8413,6 @@ const driveDocumentModelModule = {
8343
8413
  }
8344
8414
  };
8345
8415
  //#endregion
8346
- 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 };
8416
+ 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 };
8347
8417
 
8348
- //# sourceMappingURL=document-drive-BMfQ8jKD.mjs.map
8418
+ //# sourceMappingURL=document-drive-ChLoGFvU.mjs.map