@seedprotocol/sdk 0.7.5 → 0.7.6-next.957.g6bb7768

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 (220) hide show
  1. package/README.md +2 -2
  2. package/dist/{ClientManager-DRf4uuei.js → ClientManager-D6YA20jP.js} +207 -149
  3. package/dist/ClientManager-D6YA20jP.js.map +1 -0
  4. package/dist/{Item-DTJPMjFk.js → Item-B1MH0tXx.js} +126 -86
  5. package/dist/Item-B1MH0tXx.js.map +1 -0
  6. package/dist/{ModelProperty-Dto5C0om.js → ModelProperty-Dw6dHdu_.js} +37 -37
  7. package/dist/{ModelProperty-Dto5C0om.js.map → ModelProperty-Dw6dHdu_.js.map} +1 -1
  8. package/dist/{Schema-8DxGcORY.js → Schema-DppObO6h.js} +62 -212
  9. package/dist/Schema-DppObO6h.js.map +1 -0
  10. package/dist/{SchemaValidationService-CE92y1TT.js → SchemaValidationService-DXQ-D531.js} +6 -6
  11. package/dist/{SchemaValidationService-CE92y1TT.js.map → SchemaValidationService-DXQ-D531.js.map} +1 -1
  12. package/dist/{backfillMetadataPropertyIds-CRqp-BqX.js → backfillMetadataPropertyIds-Uhzlwg9X.js} +3 -3
  13. package/dist/{backfillMetadataPropertyIds-CRqp-BqX.js.map → backfillMetadataPropertyIds-Uhzlwg9X.js.map} +1 -1
  14. package/dist/configurePlatform-CVoh3JeR.js +81 -0
  15. package/dist/configurePlatform-CVoh3JeR.js.map +1 -0
  16. package/dist/{detachRowsBeforeDelete-BVetHtn2.js → detachRowsBeforeDelete-CtmIFpgV.js} +2 -2
  17. package/dist/{detachRowsBeforeDelete-BVetHtn2.js.map → detachRowsBeforeDelete-CtmIFpgV.js.map} +1 -1
  18. package/dist/{discardNewDraft-CEOouygG.js → discardNewDraft-oGYdB5vS.js} +5 -5
  19. package/dist/{discardNewDraft-CEOouygG.js.map → discardNewDraft-oGYdB5vS.js.map} +1 -1
  20. package/dist/dist/ClientManager-D6YA20jP.d.ts +933 -0
  21. package/dist/dist/ClientManager-D6YA20jP.d.ts.map +1 -0
  22. package/dist/dist/Item-B1MH0tXx.d.ts +898 -0
  23. package/dist/dist/Item-B1MH0tXx.d.ts.map +1 -0
  24. package/dist/dist/ModelProperty-Dw6dHdu_.d.ts +315 -0
  25. package/dist/dist/ModelProperty-Dw6dHdu_.d.ts.map +1 -0
  26. package/dist/dist/Schema-DppObO6h.d.ts +601 -0
  27. package/dist/dist/Schema-DppObO6h.d.ts.map +1 -0
  28. package/dist/dist/SchemaValidationService-DXQ-D531.d.ts +118 -0
  29. package/dist/dist/SchemaValidationService-DXQ-D531.d.ts.map +1 -0
  30. package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts +7 -0
  31. package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts.map +1 -0
  32. package/dist/dist/configurePlatform-CVoh3JeR.d.ts +30 -0
  33. package/dist/dist/configurePlatform-CVoh3JeR.d.ts.map +1 -0
  34. package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts +13 -0
  35. package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts.map +1 -0
  36. package/dist/dist/discardNewDraft-oGYdB5vS.d.ts +8 -0
  37. package/dist/dist/discardNewDraft-oGYdB5vS.d.ts.map +1 -0
  38. package/dist/dist/eas-CSm5wmry.d.ts +12 -0
  39. package/dist/dist/eas-CSm5wmry.d.ts.map +1 -0
  40. package/dist/dist/errors-3tc6XkCB.d.ts +487 -0
  41. package/dist/dist/errors-3tc6XkCB.d.ts.map +1 -0
  42. package/dist/dist/errors-Do7v6RKu.d.ts +22 -0
  43. package/dist/dist/errors-Do7v6RKu.d.ts.map +1 -0
  44. package/dist/dist/getItem-DM3a-7XE.d.ts +6 -0
  45. package/dist/dist/getItem-DM3a-7XE.d.ts.map +1 -0
  46. package/dist/dist/getPublishPayload-CJF0k5d8.d.ts +47 -0
  47. package/dist/dist/getPublishPayload-CJF0k5d8.d.ts.map +1 -0
  48. package/dist/dist/getPublishUploads-C7-fYIgX.d.ts +89 -0
  49. package/dist/dist/getPublishUploads-C7-fYIgX.d.ts.map +1 -0
  50. package/dist/dist/index--mmQ3LQu.d.ts +6 -0
  51. package/dist/dist/index--mmQ3LQu.d.ts.map +1 -0
  52. package/dist/dist/index-B7yAoYli.d.ts +2752 -0
  53. package/dist/dist/index-B7yAoYli.d.ts.map +1 -0
  54. package/dist/dist/index-CrvIcVFJ.d.ts +4475 -0
  55. package/dist/dist/index-CrvIcVFJ.d.ts.map +1 -0
  56. package/dist/dist/index.browser-BmVS-c2C.d.ts +8445 -0
  57. package/dist/dist/index.browser-BmVS-c2C.d.ts.map +1 -0
  58. package/dist/dist/index.node-BKpbCAWt.d.ts +11123 -0
  59. package/dist/dist/index.node-BKpbCAWt.d.ts.map +1 -0
  60. package/dist/dist/mimeTypes-C9r76DCH.d.ts +30 -0
  61. package/dist/dist/mimeTypes-C9r76DCH.d.ts.map +1 -0
  62. package/dist/dist/model-oHA3YhOd.d.ts +6 -0
  63. package/dist/dist/model-oHA3YhOd.d.ts.map +1 -0
  64. package/dist/dist/platform.browser.d.ts +3 -0
  65. package/dist/dist/platform.browser.d.ts.map +1 -0
  66. package/dist/dist/platform.node.d.ts +3 -0
  67. package/dist/dist/platform.node.d.ts.map +1 -0
  68. package/dist/dist/property-DQ-Owzki.d.ts +37 -0
  69. package/dist/dist/property-DQ-Owzki.d.ts.map +1 -0
  70. package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts +8 -0
  71. package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts.map +1 -0
  72. package/dist/dist/publishDraftGraph-CzPd9oe9.d.ts +76 -0
  73. package/dist/dist/publishDraftGraph-CzPd9oe9.d.ts.map +1 -0
  74. package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts +17 -0
  75. package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts.map +1 -0
  76. package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts +21 -0
  77. package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts.map +1 -0
  78. package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts +22 -0
  79. package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts.map +1 -0
  80. package/dist/dist/tabEvents-D9x26vf2.d.ts +81 -0
  81. package/dist/dist/tabEvents-D9x26vf2.d.ts.map +1 -0
  82. package/dist/dist/tolerantWebAccess-BFU2t-SC.d.ts +113 -0
  83. package/dist/dist/tolerantWebAccess-BFU2t-SC.d.ts.map +1 -0
  84. package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts +11 -0
  85. package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts.map +1 -0
  86. package/dist/drizzle.js +2 -0
  87. package/dist/drizzle.js.map +1 -0
  88. package/dist/{eas-D7jvWMnI.js → eas-CSm5wmry.js} +3 -3
  89. package/dist/{eas-D7jvWMnI.js.map → eas-CSm5wmry.js.map} +1 -1
  90. package/dist/{errors-CIrbsN_i.js → errors-3tc6XkCB.js} +81 -36
  91. package/dist/errors-3tc6XkCB.js.map +1 -0
  92. package/dist/errors-Do7v6RKu.js +34 -0
  93. package/dist/errors-Do7v6RKu.js.map +1 -0
  94. package/dist/{getItem-CxU_kT5W.js → getItem-DM3a-7XE.js} +4 -4
  95. package/dist/{getItem-CxU_kT5W.js.map → getItem-DM3a-7XE.js.map} +1 -1
  96. package/dist/{getPublishPayload-DTjOKd3y.js → getPublishPayload-CJF0k5d8.js} +31 -25
  97. package/dist/getPublishPayload-CJF0k5d8.js.map +1 -0
  98. package/dist/{getPublishUploads-CVTBo_OV.js → getPublishUploads-C7-fYIgX.js} +6 -6
  99. package/dist/{getPublishUploads-CVTBo_OV.js.map → getPublishUploads-C7-fYIgX.js.map} +1 -1
  100. package/dist/{index-CMxEil8T.js → index--mmQ3LQu.js} +8 -8
  101. package/dist/index--mmQ3LQu.js.map +1 -0
  102. package/dist/{index-DWK-LOUY.js → index-B7yAoYli.js} +2 -2
  103. package/dist/index-B7yAoYli.js.map +1 -0
  104. package/dist/{BasePathResolver-CBTXCMFL.js → index-CrvIcVFJ.js} +304 -285
  105. package/dist/index-CrvIcVFJ.js.map +1 -0
  106. package/dist/{index.browser-shRXMeB3.js → index.browser-BmVS-c2C.js} +34 -44
  107. package/dist/index.browser-BmVS-c2C.js.map +1 -0
  108. package/dist/{index.node-DAKJNYp5.js → index.node-BKpbCAWt.js} +43 -7
  109. package/dist/index.node-BKpbCAWt.js.map +1 -0
  110. package/dist/main.js +23 -24
  111. package/dist/main.js.map +1 -1
  112. package/dist/node.js +13 -10
  113. package/dist/node.js.map +1 -1
  114. package/dist/platform.browser.js +7 -7
  115. package/dist/platform.node.js +4 -4
  116. package/dist/{property-lz9yIpyA.js → property-DQ-Owzki.js} +7 -7
  117. package/dist/{property-lz9yIpyA.js.map → property-DQ-Owzki.js.map} +1 -1
  118. package/dist/{propertyValidationRules-LuIwoQoJ.js → propertyValidationRules-BDhFjlwP.js} +10 -10
  119. package/dist/{propertyValidationRules-LuIwoQoJ.js.map → propertyValidationRules-BDhFjlwP.js.map} +1 -1
  120. package/dist/{publishDraftGraph-CgSLPKvQ.js → publishDraftGraph-CzPd9oe9.js} +41 -8
  121. package/dist/publishDraftGraph-CzPd9oe9.js.map +1 -0
  122. package/dist/{resetAmbiguousLegacyItemData-CuamkAAh.js → resetAmbiguousLegacyItemData-cXZm4NuG.js} +2 -2
  123. package/dist/{resetAmbiguousLegacyItemData-CuamkAAh.js.map → resetAmbiguousLegacyItemData-cXZm4NuG.js.map} +1 -1
  124. package/dist/{resolveModelForSyncedSeed-BbSctSvz.js → resolveModelForSyncedSeed-BgxtVCHI.js} +2 -2
  125. package/dist/{resolveModelForSyncedSeed-BbSctSvz.js.map → resolveModelForSyncedSeed-BgxtVCHI.js.map} +1 -1
  126. package/dist/src/Item/Item.d.ts.map +1 -1
  127. package/dist/src/ItemProperty/service/actors/initialize.d.ts.map +1 -1
  128. package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
  129. package/dist/src/ItemProperty/service/actors/saveValueToDb/rowContext.d.ts +10 -0
  130. package/dist/src/ItemProperty/service/actors/saveValueToDb/rowContext.d.ts.map +1 -0
  131. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
  132. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +1 -1
  133. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
  134. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
  135. package/dist/src/ItemProperty/service/propertyMachine.d.ts +20 -20
  136. package/dist/src/Model/Model.d.ts +8 -0
  137. package/dist/src/Model/Model.d.ts.map +1 -1
  138. package/dist/src/ModelProperty/ModelProperty.d.ts +1 -1
  139. package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +3 -3
  140. package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -1
  141. package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
  142. package/dist/src/Schema/service/actors/writeModelsToDb.d.ts.map +1 -1
  143. package/dist/src/browser/db/Db.d.ts.map +1 -1
  144. package/dist/src/browser/helpers/ArweaveClient.d.ts.map +1 -1
  145. package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -1
  146. package/dist/src/client/actors/platformClassesInit.d.ts +1 -7
  147. package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
  148. package/dist/src/client/actors/saveAppState.d.ts.map +1 -1
  149. package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
  150. package/dist/src/client/seedConfigDefaults.d.ts +10 -0
  151. package/dist/src/client/seedConfigDefaults.d.ts.map +1 -0
  152. package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
  153. package/dist/src/db/write/updateItemPropertyValue.d.ts +6 -0
  154. package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
  155. package/dist/src/drizzle/index.d.ts +7 -0
  156. package/dist/src/drizzle/index.d.ts.map +1 -0
  157. package/dist/src/events/files/download.d.ts.map +1 -1
  158. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  159. package/dist/src/helpers/FileManager/errors.d.ts +11 -0
  160. package/dist/src/helpers/FileManager/errors.d.ts.map +1 -1
  161. package/dist/src/helpers/db.d.ts +14 -0
  162. package/dist/src/helpers/db.d.ts.map +1 -1
  163. package/dist/src/helpers/dotSeedPath.d.ts +7 -0
  164. package/dist/src/helpers/dotSeedPath.d.ts.map +1 -0
  165. package/dist/src/helpers/entity/entityLiveQuery.d.ts.map +1 -1
  166. package/dist/src/helpers/environment.d.ts +5 -0
  167. package/dist/src/helpers/environment.d.ts.map +1 -1
  168. package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
  169. package/dist/src/helpers/metadataPropertyNames.d.ts +10 -0
  170. package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
  171. package/dist/src/helpers/reconcilePropertyDraftRows.d.ts +9 -0
  172. package/dist/src/helpers/reconcilePropertyDraftRows.d.ts.map +1 -0
  173. package/dist/src/helpers/updateSchema.d.ts.map +1 -1
  174. package/dist/src/imports/index.d.ts +1 -1
  175. package/dist/src/imports/index.d.ts.map +1 -1
  176. package/dist/src/imports/json.d.ts +18 -5
  177. package/dist/src/imports/json.d.ts.map +1 -1
  178. package/dist/src/index.d.ts +2 -2
  179. package/dist/src/index.d.ts.map +1 -1
  180. package/dist/src/node/helpers/resolveFilesDir.d.ts +8 -0
  181. package/dist/src/node/helpers/resolveFilesDir.d.ts.map +1 -0
  182. package/dist/src/node/webpack/index.d.ts +2 -0
  183. package/dist/src/node/webpack/index.d.ts.map +1 -1
  184. package/dist/src/platform/index.browser.d.ts +5 -0
  185. package/dist/src/platform/index.browser.d.ts.map +1 -1
  186. package/dist/src/platform/index.node.d.ts +1 -0
  187. package/dist/src/platform/index.node.d.ts.map +1 -1
  188. package/dist/src/stores/eas.d.ts +1 -1
  189. package/dist/src/stores/eas.d.ts.map +1 -1
  190. package/dist/src/types/import.d.ts +15 -0
  191. package/dist/src/types/import.d.ts.map +1 -1
  192. package/dist/src/types/index.d.ts +8 -4
  193. package/dist/src/types/index.d.ts.map +1 -1
  194. package/dist/{syncDbWithEas-CrAY9Rl2.js → syncDbWithEas-Y5GysSCm.js} +17 -13
  195. package/dist/syncDbWithEas-Y5GysSCm.js.map +1 -0
  196. package/dist/{tabEvents-BGBYV65P.js → tabEvents-D9x26vf2.js} +4 -4
  197. package/dist/{tabEvents-BGBYV65P.js.map → tabEvents-D9x26vf2.js.map} +1 -1
  198. package/dist/{tolerantWebAccess-DVHCEulL.js → tolerantWebAccess-BFU2t-SC.js} +8 -8
  199. package/dist/{tolerantWebAccess-DVHCEulL.js.map → tolerantWebAccess-BFU2t-SC.js.map} +1 -1
  200. package/dist/{updateSeedRevokedAt-Dy5J8CfQ.js → updateSeedRevokedAt-CCF8WWYS.js} +3 -3
  201. package/dist/{updateSeedRevokedAt-Dy5J8CfQ.js.map → updateSeedRevokedAt-CCF8WWYS.js.map} +1 -1
  202. package/package.json +31 -31
  203. package/dist/BasePathResolver-CBTXCMFL.js.map +0 -1
  204. package/dist/ClientManager-DRf4uuei.js.map +0 -1
  205. package/dist/Item-DTJPMjFk.js.map +0 -1
  206. package/dist/Schema-8DxGcORY.js.map +0 -1
  207. package/dist/configurePlatform-D4aGjKNk.js +0 -31
  208. package/dist/configurePlatform-D4aGjKNk.js.map +0 -1
  209. package/dist/errors-CIrbsN_i.js.map +0 -1
  210. package/dist/errors-CrBxGWah.js +0 -17
  211. package/dist/errors-CrBxGWah.js.map +0 -1
  212. package/dist/getPublishPayload-DTjOKd3y.js.map +0 -1
  213. package/dist/index-CMxEil8T.js.map +0 -1
  214. package/dist/index-DWK-LOUY.js.map +0 -1
  215. package/dist/index.browser-shRXMeB3.js.map +0 -1
  216. package/dist/index.node-DAKJNYp5.js.map +0 -1
  217. package/dist/publishDraftGraph-CgSLPKvQ.js.map +0 -1
  218. package/dist/src/client/nodeEndpointDefaults.d.ts +0 -8
  219. package/dist/src/client/nodeEndpointDefaults.d.ts.map +0 -1
  220. package/dist/syncDbWithEas-CrAY9Rl2.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Thrown by client init when the browser file system can't be mounted because OPFS entries are
3
+ * held by another context — usually another tab of the same app, or a worker from a page that
4
+ * was just reloaded. Hosts can check `code === 'OPFS_LOCKED'` and offer "close other tabs / retry".
5
+ */
6
+ class FileSystemLockedError extends Error {
7
+ constructor(cause) {
8
+ const detail = cause instanceof Error ? `${cause.name}: ${cause.message}` : String(cause);
9
+ super(`The browser file system is in use by another tab or worker and could not be opened (${detail}). ` +
10
+ `Close other tabs of this app and retry.`, { cause });
11
+ this.code = 'OPFS_LOCKED';
12
+ this.name = 'FileSystemLockedError';
13
+ }
14
+ }
15
+ /**
16
+ * Thrown by client init in the browser when SQLite can't store the database in OPFS. SQLite's OPFS
17
+ * storage needs `SharedArrayBuffer`, which browsers only expose on cross-origin isolated pages
18
+ * (COOP `same-origin` and COEP `require-corp` or `credentialless` response headers). Without it,
19
+ * SQLocal falls back to an in-memory database and every reload would lose the app's data, so init
20
+ * fails instead. Hosts can check `code === 'DB_NOT_PERSISTENT'`.
21
+ */
22
+ class DatabaseNotPersistentError extends Error {
23
+ constructor(detail) {
24
+ super(`SQLite can't store the Seed database in the browser's private file system: ${detail}. ` +
25
+ `Serve the app with Cross-Origin-Opener-Policy: same-origin and ` +
26
+ `Cross-Origin-Embedder-Policy: require-corp (or credentialless). ` +
27
+ `@seedprotocol/vite sets these on the Vite dev and preview servers; production hosting has to set them too.`);
28
+ this.code = 'DB_NOT_PERSISTENT';
29
+ this.name = 'DatabaseNotPersistentError';
30
+ }
31
+ }
32
+
33
+ export { DatabaseNotPersistentError as D, FileSystemLockedError as F };
34
+ //# sourceMappingURL=errors-Do7v6RKu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-Do7v6RKu.js","sources":["../../src/helpers/FileManager/errors.ts"],"sourcesContent":["/**\n * Thrown by client init when the browser file system can't be mounted because OPFS entries are\n * held by another context — usually another tab of the same app, or a worker from a page that\n * was just reloaded. Hosts can check `code === 'OPFS_LOCKED'` and offer \"close other tabs / retry\".\n */\nexport class FileSystemLockedError extends Error {\n readonly code = 'OPFS_LOCKED' as const\n\n constructor(cause: unknown) {\n const detail = cause instanceof Error ? `${cause.name}: ${cause.message}` : String(cause)\n super(\n `The browser file system is in use by another tab or worker and could not be opened (${detail}). ` +\n `Close other tabs of this app and retry.`,\n { cause },\n )\n this.name = 'FileSystemLockedError'\n }\n}\n\n/**\n * Thrown by client init in the browser when SQLite can't store the database in OPFS. SQLite's OPFS\n * storage needs `SharedArrayBuffer`, which browsers only expose on cross-origin isolated pages\n * (COOP `same-origin` and COEP `require-corp` or `credentialless` response headers). Without it,\n * SQLocal falls back to an in-memory database and every reload would lose the app's data, so init\n * fails instead. Hosts can check `code === 'DB_NOT_PERSISTENT'`.\n */\nexport class DatabaseNotPersistentError extends Error {\n readonly code = 'DB_NOT_PERSISTENT' as const\n\n constructor(detail: string) {\n super(\n `SQLite can't store the Seed database in the browser's private file system: ${detail}. ` +\n `Serve the app with Cross-Origin-Opener-Policy: same-origin and ` +\n `Cross-Origin-Embedder-Policy: require-corp (or credentialless). ` +\n `@seedprotocol/vite sets these on the Vite dev and preview servers; production hosting has to set them too.`,\n )\n this.name = 'DatabaseNotPersistentError'\n }\n}\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACG,MAAO,qBAAsB,SAAQ,KAAK,CAAA;AAG9C,IAAA,WAAA,CAAY,KAAc,EAAA;QACxB,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,GAAG,CAAA,EAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,CAAA,CAAE,GAAG,MAAM,CAAC,KAAK,CAAC;QACzF,KAAK,CACH,CAAA,oFAAA,EAAuF,MAAM,CAAA,GAAA,CAAK;AAChG,YAAA,CAAA,uCAAA,CAAyC,EAC3C,EAAE,KAAK,EAAE,CACV;QARM,IAAA,CAAA,IAAI,GAAG,aAAsB;AASpC,QAAA,IAAI,CAAC,IAAI,GAAG,uBAAuB;IACrC;AACD;AAED;;;;;;AAMG;AACG,MAAO,0BAA2B,SAAQ,KAAK,CAAA;AAGnD,IAAA,WAAA,CAAY,MAAc,EAAA;QACxB,KAAK,CACH,CAAA,2EAAA,EAA8E,MAAM,CAAA,EAAA,CAAI;YACtF,CAAA,+DAAA,CAAiE;YACjE,CAAA,gEAAA,CAAkE;AAClE,YAAA,CAAA,0GAAA,CAA4G,CAC/G;QARM,IAAA,CAAA,IAAI,GAAG,mBAA4B;AAS1C,QAAA,IAAI,CAAC,IAAI,GAAG,4BAA4B;IAC1C;AACD;;"}
@@ -1,7 +1,7 @@
1
- import { g as getItemData, I as Item } from './Item-DTJPMjFk.js';
1
+ import { g as getItemData, I as Item } from './Item-B1MH0tXx.js';
2
2
  import { startCase } from 'lodash-es';
3
3
  import 'xstate';
4
- import './BasePathResolver-CBTXCMFL.js';
4
+ import './index-CrvIcVFJ.js';
5
5
  import 'debug';
6
6
  import '@seedprotocol/arweave';
7
7
  import '@seedprotocol/eas';
@@ -16,7 +16,7 @@ import '@noble/hashes/sha256';
16
16
  import '@noble/hashes/sha3';
17
17
  import '@noble/hashes/utils';
18
18
  import 'rxjs';
19
- import './tabEvents-BGBYV65P.js';
19
+ import './tabEvents-D9x26vf2.js';
20
20
  import './model-oHA3YhOd.js';
21
21
 
22
22
  const getItem = async ({ modelName, seedLocalId, seedUid }) => {
@@ -42,4 +42,4 @@ const getItem = async ({ modelName, seedLocalId, seedUid }) => {
42
42
  };
43
43
 
44
44
  export { getItem };
45
- //# sourceMappingURL=getItem-CxU_kT5W.js.map
45
+ //# sourceMappingURL=getItem-DM3a-7XE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getItem-CxU_kT5W.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;"}
1
+ {"version":3,"file":"getItem-DM3a-7XE.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;"}
@@ -1,15 +1,15 @@
1
- import { isValidEasAttestationUid, easName, decodeEasNumber, getEasSchemaUidForSchemaDefinition } from '@seedprotocol/eas';
2
- import { a4 as isNode, a5 as ZERO_BYTES32, B as BaseDb, a6 as resolveModelRecord, a7 as getItemModelScope, v as properties, a8 as VERSION_SCHEMA_UID, M as ModelPropertyDataTypes, t as models, W as resolveSeedIdsFromRefString, V as normalizeRelationPropertyValue, U as isPublishedSeedRef, p as htmlEmbeddedImageCoPublish, R as getCorrectId, a9 as INTERNAL_PROPERTY_NAMES, aa as isStorageSeedRef, n as normalizeDataType, ab as defaultAttestationData, ac as INTERNAL_DATA_TYPES, ad as listRelationEasPropertyName, ae as easPropertyNameForPublish } from './BasePathResolver-CBTXCMFL.js';
3
- import { f as getEasSchemaUidForModel, h as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage } from './Item-DTJPMjFk.js';
4
- import { i as isSeedRevoked, a as getSegmentedItemProperties, f as findRelatedSeedRow, r as relatedModelNameFromDef, h as htmlPropertyNameForHtmlSeed, b as isUnpublishedSeed, c as isLivePublishedSeed, d as draftWalkProperties } from './publishDraftGraph-CgSLPKvQ.js';
5
- import { getPropertySchema } from './property-lz9yIpyA.js';
1
+ import { isValidEasAttestationUid, easName, decodeEasNumber, getSchemaUidForSchemaDefinitionFromCache, getEasSchemaUidForSchemaDefinition } from '@seedprotocol/eas';
2
+ import { a1 as isNode, a2 as ZERO_BYTES32, B as BaseDb, a3 as resolveModelRecord, a4 as getItemModelScope, v as properties, a5 as VERSION_SCHEMA_UID, M as ModelPropertyDataTypes, t as models, V as resolveSeedIdsFromRefString, U as normalizeRelationPropertyValue, R as isPublishedSeedRef, p as htmlEmbeddedImageCoPublish, Q as getCorrectId, a6 as INTERNAL_PROPERTY_NAMES, a7 as isStorageSeedRef, n as normalizeDataType, a8 as defaultAttestationData, a9 as INTERNAL_DATA_TYPES, aa as listRelationEasPropertyName, ab as easPropertyNameForPublish } from './index-CrvIcVFJ.js';
3
+ import { f as getEasSchemaUidForModel, h as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage } from './Item-B1MH0tXx.js';
4
+ import { i as isSeedRevoked, a as getSegmentedItemProperties, f as findRelatedSeedRow, r as relatedModelNameFromDef, h as htmlPropertyNameForHtmlSeed, b as isUnpublishedSeed, c as isLivePublishedSeed, d as draftWalkProperties } from './publishDraftGraph-CzPd9oe9.js';
5
+ import { getPropertySchema } from './property-DQ-Owzki.js';
6
6
  import { modelPropertiesToObject } from './model-oHA3YhOd.js';
7
7
  import { upperFirst, camelCase } from 'lodash-es';
8
8
  import { and, eq, sql } from 'drizzle-orm';
9
9
  import debug from 'debug';
10
10
  import '@noble/hashes/sha3';
11
11
  import '@noble/hashes/utils';
12
- import './errors-CIrbsN_i.js';
12
+ import './errors-3tc6XkCB.js';
13
13
 
14
14
  let easSdkPromise;
15
15
  /**
@@ -227,7 +227,7 @@ async function resolveVersionUid(seedLocalId, seedUid) {
227
227
  if (published?.uid)
228
228
  return published.uid;
229
229
  try {
230
- const { getItemVersionsFromEas } = await import('./eas-D7jvWMnI.js');
230
+ const { getItemVersionsFromEas } = await import('./eas-CSm5wmry.js');
231
231
  const attestations = await getItemVersionsFromEas({ seedUids: [seedUid] });
232
232
  const latest = attestations?.[0];
233
233
  if (latest?.id)
@@ -257,11 +257,15 @@ const getPropertyData = async (itemProperty, ctx) => {
257
257
  const listRelationName = listRelationEasPropertyName(itemProperty.propertyName, propertyDef);
258
258
  const propertyNameForSchema = easPropertyNameForPublish(itemProperty.propertyName, propertyDef);
259
259
  const schemaDef = `${easDataType} ${propertyNameForSchema}`;
260
- // A cached schemaUid was looked up under the property's own name: trust it only when that is
261
- // the name published (not for a list relation, or a single relation stored as authorId).
260
+ // The UID ensureEasSchemasForItem resolved for this exact definition comes first. A cached
261
+ // schemaUid was looked up under the property's own name, which matches any type: Optimism
262
+ // Sepolia has `bytes32 storage_transaction_id` beside `string storage_transaction_id`, and
263
+ // attesting a string under the bytes32 one reads back as 0x…20. Trust the cached one only when
264
+ // that name is the one published (not for a list relation, or a single relation stored as authorId).
262
265
  const storageName = itemProperty.storagePropertyName ||
263
266
  itemProperty.propertyName;
264
- let schemaUid = !listRelationName && easName(storageName) === propertyNameForSchema ? itemProperty.schemaUid : undefined;
267
+ let schemaUid = getSchemaUidForSchemaDefinitionFromCache(schemaDef) ??
268
+ (!listRelationName && easName(storageName) === propertyNameForSchema ? itemProperty.schemaUid : undefined);
265
269
  if (!schemaUid) {
266
270
  schemaUid = await getEasSchemaUidForSchemaDefinition({ schemaText: schemaDef });
267
271
  }
@@ -294,7 +298,7 @@ const ensurePropertyDefs = async (targetItem) => {
294
298
  schema = await getPropertySchema(targetItem.modelName, itemProperty.propertyName, targetScope);
295
299
  if (!schema) {
296
300
  try {
297
- const _mod_0 = await import('./errors-CIrbsN_i.js');
301
+ const _mod_0 = await import('./errors-3tc6XkCB.js');
298
302
  const _ns_0 = _mod_0.h;
299
303
  const { Model } = _ns_0;
300
304
  const normalizedModelName = upperFirst(camelCase(targetItem.modelName));
@@ -466,7 +470,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
466
470
  }
467
471
  // Validate against property validation rules (enum, pattern, minLength, maxLength) before encoding
468
472
  if (propertyDef?.validation) {
469
- const { SchemaValidationService } = await import('./SchemaValidationService-CE92y1TT.js');
473
+ const { SchemaValidationService } = await import('./SchemaValidationService-DXQ-D531.js');
470
474
  const validationService = new SchemaValidationService();
471
475
  const validationResult = validationService.validatePropertyValue(value, normalizeDataType(propertyDef.dataType), propertyDef.validation, propertyDef.refValueType
472
476
  ? normalizeDataType(propertyDef.refValueType)
@@ -586,13 +590,18 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
586
590
  };
587
591
  const processRelationOrImageProperty = async (relationOrImageProperty, multiPublishPayload, uploadedTransactions, originalSeedLocalId, ctx, buildOpts) => {
588
592
  const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
589
- let relationOrImageSchemaUid = relationOrImageProperty.schemaUid;
590
- if (!relationOrImageSchemaUid && relationOrImageProperty.propertyDef) {
593
+ // Resolve from the definition like every other property; the cached schemaUid was found by
594
+ // name alone and can belong to a schema of another type.
595
+ let relationOrImageSchemaUid;
596
+ if (relationOrImageProperty.propertyDef) {
591
597
  const propertyData = await getPropertyData(relationOrImageProperty, ctx);
592
598
  if (!propertyData)
593
599
  return multiPublishPayload;
594
600
  relationOrImageSchemaUid = propertyData.schemaUid;
595
601
  }
602
+ else {
603
+ relationOrImageSchemaUid = relationOrImageProperty.schemaUid;
604
+ }
596
605
  if (!relationOrImageSchemaUid) {
597
606
  addValidationError(ctx, `Schema uid not found for relation or image property: ${relationOrImageProperty.propertyName}`, relationOrImageProperty.propertyName);
598
607
  return multiPublishPayload;
@@ -615,7 +624,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
615
624
  matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Html) ||
616
625
  matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Json)));
617
626
  if (isStorageSeed && (context.seedLocalId || context.seedUid)) {
618
- const _mod_1 = await import('./Item-DTJPMjFk.js');
627
+ const _mod_1 = await import('./Item-B1MH0tXx.js');
619
628
  const _ns_1 = _mod_1.a5;
620
629
  const { getPropertyData: getPropertyDataFromDb } = _ns_1;
621
630
  const metaRow = await getPropertyDataFromDb({
@@ -706,7 +715,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
706
715
  return multiPublishPayload;
707
716
  }
708
717
  // Use dynamic import to break circular dependency
709
- const getItemMod = await import('./getItem-CxU_kT5W.js');
718
+ const getItemMod = await import('./getItem-DM3a-7XE.js');
710
719
  const { getItem } = getItemMod;
711
720
  const relatedItem = await getItem(relatedSeed ? { seedLocalId: relatedSeed.seedLocalId } : { seedLocalId, seedUid });
712
721
  if (noteRelatedSeed(ctx, normalizedRef, relatedSeed, relationOrImageProperty.propertyName, relatedItem?.modelName ?? relatedModelNameFromDef(relationOrImageProperty.propertyDef))) {
@@ -867,12 +876,9 @@ async function resolveHtmlPropertySchemaUidByHtmlSeed(item, htmlSeedLocalId, ctx
867
876
  const pv = typeof c?.propertyValue === 'string' ? c.propertyValue.trim() : '';
868
877
  if (pv !== want)
869
878
  continue;
870
- let uid = p.schemaUid;
871
- if (!uid) {
872
- const pd = await getPropertyData(p, ctx);
873
- uid = pd?.schemaUid;
874
- }
875
- return uid;
879
+ // Resolved like the Html property's own attestation, so a schema it lacks fails here too. The
880
+ // caller only checks that a uid was found: embedded images don't update the Html property.
881
+ return (await getPropertyData(p, ctx))?.schemaUid;
876
882
  }
877
883
  addValidationError(ctx, `Could not find Html property for embedded image rewrite (html seed ${want}).`, 'html', 'html_embed_schema');
878
884
  return undefined;
@@ -888,7 +894,7 @@ async function processHtmlEmbeddedCoPublishImagePayloads(item, multiPublishPaylo
888
894
  if (rows.length === 0)
889
895
  return multiPublishPayload;
890
896
  const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
891
- const getItemMod = await import('./getItem-CxU_kT5W.js');
897
+ const getItemMod = await import('./getItem-DM3a-7XE.js');
892
898
  const { getItem } = getItemMod;
893
899
  const doneImages = new Set();
894
900
  for (const row of rows) {
@@ -1029,7 +1035,7 @@ const processListProperty = async (listProperty, multiPublishPayload, uploadedTr
1029
1035
  if (memberLocalId && ctx.newSeedsInProgress?.has(memberLocalId))
1030
1036
  continue;
1031
1037
  // Use dynamic import to break circular dependency
1032
- const getItemMod = await import('./getItem-CxU_kT5W.js');
1038
+ const getItemMod = await import('./getItem-DM3a-7XE.js');
1033
1039
  const { getItem } = getItemMod;
1034
1040
  const relatedItem = await getItem(relatedSeed ? { seedLocalId: relatedSeed.seedLocalId } : { seedLocalId, seedUid });
1035
1041
  if (noteRelatedSeed(ctx, idStr.trim(), relatedSeed, listProperty.propertyName, relatedItem?.modelName ?? relatedModelNameFromDef(listProperty.propertyDef))) {
@@ -1631,4 +1637,4 @@ var getPublishPayload$1 = /*#__PURE__*/Object.freeze({
1631
1637
  });
1632
1638
 
1633
1639
  export { PublishValidationFailedError as P, RELATED_ITEM_UNPUBLISHED_CODE as R, RelatedItemUnpublishedError as a, getPublishPayload$1 as g, resolvePublishPayloadValues as r, validateItemForPublish as v };
1634
- //# sourceMappingURL=getPublishPayload-DTjOKd3y.js.map
1640
+ //# sourceMappingURL=getPublishPayload-CJF0k5d8.js.map