@powerhousedao/powerhouse-vetra-packages 6.2.2-dev.52 → 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-MB8tpoQw.js → connect-D1KIMa_5.js} +4 -4
  4. package/dist/browser/{connect-MB8tpoQw.js.map → connect-D1KIMa_5.js.map} +1 -1
  5. package/dist/browser/{dist-BesM2uPE.js → dist-dmLcxsWV.js} +46 -18
  6. package/dist/browser/dist-dmLcxsWV.js.map +1 -0
  7. package/dist/browser/{document-drive-CJz0STcj.js → document-drive-cxHraTVQ.js} +83 -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-BDpW8vq8.js → editor-BAUTcFP2.js} +6 -6
  11. package/dist/browser/{editor-BDpW8vq8.js.map → editor-BAUTcFP2.js.map} +1 -1
  12. package/dist/browser/{editor-DQ49fg9m.js → editor-PmQcB82h.js} +5 -5
  13. package/dist/browser/{editor-DQ49fg9m.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-BG4n0zgH.js → folder-view-CWnDdLMC.js} +3 -3
  18. package/dist/browser/{folder-view-BG4n0zgH.js.map → folder-view-CWnDdLMC.js.map} +1 -1
  19. package/dist/browser/{graphql-editor-gWZAjvBa.js → graphql-editor-Cq_L5IUQ.js} +3 -3
  20. package/dist/browser/{graphql-editor-gWZAjvBa.js.map → graphql-editor-Cq_L5IUQ.js.map} +1 -1
  21. package/dist/browser/index.js +2 -2
  22. package/dist/browser/{json-editor-DCA4V_DS.js → json-editor-D8lysNHE.js} +3 -3
  23. package/dist/browser/{json-editor-DCA4V_DS.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-oLJnYfWV.js → state-schemas-NyThZN-C.js} +3 -3
  27. package/dist/browser/{state-schemas-oLJnYfWV.js.map → state-schemas-NyThZN-C.js.map} +1 -1
  28. package/dist/node/{connect-Cdie59_O.mjs → connect-BixjoUPL.mjs} +4 -4
  29. package/dist/node/{connect-Cdie59_O.mjs.map → connect-BixjoUPL.mjs.map} +1 -1
  30. package/dist/node/{dist-BIdl6Tbq.mjs → dist-BtnA_6jV.mjs} +46 -18
  31. package/dist/node/dist-BtnA_6jV.mjs.map +1 -0
  32. package/dist/node/{document-drive-BgHPyTwW.mjs → document-drive-ChLoGFvU.mjs} +83 -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-C_RkuhbJ.mjs → editor-C8Drq-be.mjs} +5 -5
  36. package/dist/node/{editor-C_RkuhbJ.mjs.map → editor-C8Drq-be.mjs.map} +1 -1
  37. package/dist/node/{editor-CyRFyoHM.mjs → editor-cfoi-9LF.mjs} +6 -6
  38. package/dist/node/{editor-CyRFyoHM.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-jO8_grQ6.mjs → folder-view--I9GOsir.mjs} +3 -3
  43. package/dist/node/{folder-view-jO8_grQ6.mjs.map → folder-view--I9GOsir.mjs.map} +1 -1
  44. package/dist/node/{graphql-editor-DyuSPAfc.mjs → graphql-editor-BKGQ8ojN.mjs} +3 -3
  45. package/dist/node/{graphql-editor-DyuSPAfc.mjs.map → graphql-editor-BKGQ8ojN.mjs.map} +1 -1
  46. package/dist/node/index.mjs +2 -2
  47. package/dist/node/{json-editor-DtNAniwW.mjs → json-editor-32paCJkU.mjs} +3 -3
  48. package/dist/node/{json-editor-DtNAniwW.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-CeAvAzja.mjs → state-schemas-ClrkM0Fn.mjs} +3 -3
  52. package/dist/node/{state-schemas-CeAvAzja.mjs.map → state-schemas-ClrkM0Fn.mjs.map} +1 -1
  53. package/package.json +7 -7
  54. package/dist/browser/dist-BesM2uPE.js.map +0 -1
  55. package/dist/browser/document-drive-CJz0STcj.js.map +0 -1
  56. package/dist/browser/lib-V-A4Y98b.js.map +0 -1
  57. package/dist/node/dist-BIdl6Tbq.mjs.map +0 -1
  58. package/dist/node/document-drive-BgHPyTwW.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) {
@@ -6878,6 +6948,17 @@ const documentModelStateReducer = (state, action) => {
6878
6948
  }
6879
6949
  };
6880
6950
  const documentModelReducer = createReducer(documentModelStateReducer);
6951
+ /**
6952
+ * Canonical document-model version normalization: documents stamped with 0
6953
+ * or nothing at all predate versioning and are treated as version 1, the
6954
+ * same version the registry assigns unversioned modules. Every consumer
6955
+ * that resolves a module or compares versions must use this rule; resolving
6956
+ * 0 to "latest" instead re-pins a legacy document's history to whichever
6957
+ * module happens to be newest.
6958
+ */
6959
+ function normalizeDocumentModelVersion(version) {
6960
+ return version && version > 0 ? version : 1;
6961
+ }
6881
6962
  function applyInitialState(document, action) {
6882
6963
  const input = action.input;
6883
6964
  const newState = input.initialState || input.state;
@@ -8332,6 +8413,6 @@ const driveDocumentModelModule = {
8332
8413
  }
8333
8414
  };
8334
8415
  //#endregion
8335
- export { setOperationSchema as $, createZip as A, replayDocumentVersioned as B, baseSaveToFileHandle as C, createPresignedHeader as D, createBaseState as E, documentModelDocumentType as F, setModelExtension as G, setAuthorWebsite as H, hashDocumentStateForScope as I, setModuleName as J, setModelId as K, isDocumentAction as L, deleteModule as M, deleteOperation as N, createReducer as O, deleteOperationError as P, setOperationName as Q, redo as R, baseLoadFromInputVersioned as S, createAction as T, setInitialState as U, setAuthorName as V, setModelDescription as W, setOperationDescription as X, setName as Y, setOperationErrorName as Z, addOperationError as _, handleTargetNameCollisions as a, generateId as at, baseCreateDocument as b, isValidName as c, documentModelDocumentModelModule as d, setStateSchema as et, logger as f, addOperation as g, addModule as h, generateNodesCopy as i, validateStateSchemaName as it, defaultBaseState as j, createState as k, moveNode as l, BaseDocumentStateSchema as m, copyNode as n, validateInitialState as nt, isFileNode as o, BaseDocumentHeaderSchema as p, setModelName as q, driveDocumentModelModule as r, validateModules as rt, isFolderNode as s, addFolder as t, undo as tt, updateNode as u, assertAuthPreservedOnDuplicate as v, buildSignedAction as w, baseLoadFromInput as x, baseActions as y, releaseNewVersion 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 };
8336
8417
 
8337
- //# sourceMappingURL=document-drive-BgHPyTwW.mjs.map
8418
+ //# sourceMappingURL=document-drive-ChLoGFvU.mjs.map