@iota-uz/sdk 0.46.0 → 0.47.0

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 (535) hide show
  1. package/README.md +5 -0
  2. package/dist/client-host/identity.d.ts +4 -4
  3. package/dist/client-host/identity.js +2 -2
  4. package/dist/lens/{CascadePanel-Bha4qY7J.js → CascadePanel-BlYJd18G.js} +1 -1
  5. package/dist/lens/{ChartDataEquivalent-Bwgn4yYB.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
  6. package/dist/lens/{ChartPanel-BZpzBuwl.js → ChartPanel-BIJjrs5D.js} +159 -159
  7. package/dist/lens/{CoveragePanel-D40AuKkD.js → CoveragePanel-CHtXDMtt.js} +1 -1
  8. package/dist/lens/{GaugePanel-C9k2TuJH.js → GaugePanel-By0TOJPa.js} +1 -1
  9. package/dist/lens/LensDashboard.d.ts +13 -0
  10. package/dist/lens/LensDashboard.d.ts.map +1 -1
  11. package/dist/lens/{MapPanel-ZYxfDsPM.js → MapPanel-Cw4ELCiM.js} +3 -3
  12. package/dist/lens/{MetricFlowPanel-CmESLoLK.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
  13. package/dist/lens/{MetricHierarchyPanel-UZVuJ5P2.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
  14. package/dist/lens/{MetricRelationshipPanel-CXLdScAy.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
  15. package/dist/lens/{PrintReport-lrfdCTZO.js → PrintReport-C0OV1iHP.js} +5 -5
  16. package/dist/lens/{QualityChip-BYz-DHfs.js → QualityChip-DTi-0jdh.js} +1 -1
  17. package/dist/lens/SaveInvestigation-CX1Abyl8.js +309 -0
  18. package/dist/lens/TablePanel-BusKU7cU.js +994 -0
  19. package/dist/lens/{adapter-CeAqYWqm.js → adapter-CQg4-M7p.js} +7 -7
  20. package/dist/lens/contract/schemas.d.ts +2 -0
  21. package/dist/lens/contract/schemas.d.ts.map +1 -1
  22. package/dist/lens/contract/types.d.ts +12 -0
  23. package/dist/lens/contract/types.d.ts.map +1 -1
  24. package/dist/lens/{dashboardEdit-DKVE_6J_.js → dashboardEdit-CJgCVfi_.js} +1 -1
  25. package/dist/lens/explore/DrillOverlay.d.ts +38 -0
  26. package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
  27. package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
  28. package/dist/lens/explore/SaveInvestigation.d.ts +21 -0
  29. package/dist/lens/explore/SaveInvestigation.d.ts.map +1 -0
  30. package/dist/lens/explore/drillHost.d.ts +25 -0
  31. package/dist/lens/explore/drillHost.d.ts.map +1 -0
  32. package/dist/lens/explore/investigation.d.ts +174 -0
  33. package/dist/lens/explore/investigation.d.ts.map +1 -0
  34. package/dist/lens/explore/provenanceLabels.d.ts +10 -0
  35. package/dist/lens/explore/provenanceLabels.d.ts.map +1 -0
  36. package/dist/lens/index-DR7Hf8Km.js +19805 -0
  37. package/dist/lens/{index-DkVTXC8W.js → index-DZFw4cqF.js} +1 -1
  38. package/dist/lens/index.d.ts +7 -1
  39. package/dist/lens/index.d.ts.map +1 -1
  40. package/dist/lens/index.js +67 -53
  41. package/dist/lens/{install-CQ_iMuAE.js → install-B2lTK6uo.js} +1 -1
  42. package/dist/lens/{install-Ch0_qifK.js → install-BXr4Mnc0.js} +1 -1
  43. package/dist/lens/{install-CKmxqMe1.js → install-CicNQ_ks.js} +1 -1
  44. package/dist/lens/{install-BwD_xNlp.js → install-d8A0WPiw.js} +1 -1
  45. package/dist/lens/{keys-BBmWdfaH.js → keys-C-Akc9lZ.js} +2 -2
  46. package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
  47. package/dist/lens/panels/TablePanel.d.ts.map +1 -1
  48. package/dist/lens/panels/actions.d.ts.map +1 -1
  49. package/dist/lens/panels/panelFailure.d.ts.map +1 -1
  50. package/dist/lens/{prefetch-BXoUIIgq.js → prefetch-C9kxuIs8.js} +2 -2
  51. package/dist/lens/{prefetchPanels-a-zs_bDm.js → prefetchPanels-gbY9RIqL.js} +1 -1
  52. package/dist/lens/{print-CpgWJxDG.js → print-CllsAP3d.js} +1 -1
  53. package/dist/lens/reports/ReportCompositionEditor.d.ts +8 -2
  54. package/dist/lens/reports/ReportCompositionEditor.d.ts.map +1 -1
  55. package/dist/lens/reports/ReportDefinitionEditor.d.ts +54 -0
  56. package/dist/lens/reports/ReportDefinitionEditor.d.ts.map +1 -0
  57. package/dist/lens/reports/ReportPicker.d.ts +6 -0
  58. package/dist/lens/reports/ReportPicker.d.ts.map +1 -1
  59. package/dist/lens/reports/dashboardEdit.d.ts +3 -0
  60. package/dist/lens/reports/dashboardEdit.d.ts.map +1 -1
  61. package/dist/lens/reports/editing.d.ts +35 -0
  62. package/dist/lens/reports/editing.d.ts.map +1 -1
  63. package/dist/lens/reports/picker.d.ts +4 -1
  64. package/dist/lens/reports/picker.d.ts.map +1 -1
  65. package/dist/lens/runtime/index.d.ts +0 -1
  66. package/dist/lens/runtime/index.d.ts.map +1 -1
  67. package/dist/lens/runtime/messages.d.ts +2 -2
  68. package/dist/lens/runtime/messages.d.ts.map +1 -1
  69. package/dist/lens/runtime/provider.d.ts +5 -1
  70. package/dist/lens/runtime/provider.d.ts.map +1 -1
  71. package/dist/lens/runtime/returnContext.d.ts +62 -0
  72. package/dist/lens/runtime/returnContext.d.ts.map +1 -0
  73. package/dist/lens/runtime/tableSummary.d.ts +9 -0
  74. package/dist/lens/runtime/tableSummary.d.ts.map +1 -0
  75. package/dist/lens/{scales-BLf9OweG.js → scales-CO6Q9RtG.js} +1 -1
  76. package/dist/lens/style.css +1 -1
  77. package/dist/runtime/README.md +24 -0
  78. package/dist/runtime/assert.d.ts +51 -0
  79. package/dist/runtime/assert.js +172 -0
  80. package/dist/runtime/build/README.txt +1 -0
  81. package/dist/runtime/build/extract.mjs +342 -0
  82. package/dist/runtime/build/shared-exports.json +388 -0
  83. package/dist/runtime/build/test-child.mjs +136 -0
  84. package/dist/runtime/build/theme/tailwind.config.js +121 -0
  85. package/dist/runtime/build/theme/theme.css +462 -0
  86. package/dist/runtime/build/theme/utilities.css +1 -0
  87. package/dist/runtime/build/vendor/lib/lib.d.ts +22 -0
  88. package/dist/runtime/build/vendor/lib/lib.decorators.d.ts +384 -0
  89. package/dist/runtime/build/vendor/lib/lib.decorators.legacy.d.ts +22 -0
  90. package/dist/runtime/build/vendor/lib/lib.dom.asynciterable.d.ts +41 -0
  91. package/dist/runtime/build/vendor/lib/lib.dom.d.ts +28983 -0
  92. package/dist/runtime/build/vendor/lib/lib.dom.iterable.d.ts +491 -0
  93. package/dist/runtime/build/vendor/lib/lib.es2015.collection.d.ts +147 -0
  94. package/dist/runtime/build/vendor/lib/lib.es2015.core.d.ts +597 -0
  95. package/dist/runtime/build/vendor/lib/lib.es2015.d.ts +28 -0
  96. package/dist/runtime/build/vendor/lib/lib.es2015.generator.d.ts +77 -0
  97. package/dist/runtime/build/vendor/lib/lib.es2015.iterable.d.ts +590 -0
  98. package/dist/runtime/build/vendor/lib/lib.es2015.promise.d.ts +81 -0
  99. package/dist/runtime/build/vendor/lib/lib.es2015.proxy.d.ts +128 -0
  100. package/dist/runtime/build/vendor/lib/lib.es2015.reflect.d.ts +144 -0
  101. package/dist/runtime/build/vendor/lib/lib.es2015.symbol.d.ts +46 -0
  102. package/dist/runtime/build/vendor/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  103. package/dist/runtime/build/vendor/lib/lib.es2016.array.include.d.ts +116 -0
  104. package/dist/runtime/build/vendor/lib/lib.es2016.d.ts +21 -0
  105. package/dist/runtime/build/vendor/lib/lib.es2016.full.d.ts +23 -0
  106. package/dist/runtime/build/vendor/lib/lib.es2016.intl.d.ts +31 -0
  107. package/dist/runtime/build/vendor/lib/lib.es2017.arraybuffer.d.ts +21 -0
  108. package/dist/runtime/build/vendor/lib/lib.es2017.d.ts +26 -0
  109. package/dist/runtime/build/vendor/lib/lib.es2017.date.d.ts +31 -0
  110. package/dist/runtime/build/vendor/lib/lib.es2017.full.d.ts +23 -0
  111. package/dist/runtime/build/vendor/lib/lib.es2017.intl.d.ts +44 -0
  112. package/dist/runtime/build/vendor/lib/lib.es2017.object.d.ts +49 -0
  113. package/dist/runtime/build/vendor/lib/lib.es2017.sharedmemory.d.ts +135 -0
  114. package/dist/runtime/build/vendor/lib/lib.es2017.string.d.ts +45 -0
  115. package/dist/runtime/build/vendor/lib/lib.es2017.typedarrays.d.ts +53 -0
  116. package/dist/runtime/build/vendor/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  117. package/dist/runtime/build/vendor/lib/lib.es2018.asynciterable.d.ts +53 -0
  118. package/dist/runtime/build/vendor/lib/lib.es2018.d.ts +24 -0
  119. package/dist/runtime/build/vendor/lib/lib.es2018.full.d.ts +24 -0
  120. package/dist/runtime/build/vendor/lib/lib.es2018.intl.d.ts +83 -0
  121. package/dist/runtime/build/vendor/lib/lib.es2018.promise.d.ts +30 -0
  122. package/dist/runtime/build/vendor/lib/lib.es2018.regexp.d.ts +37 -0
  123. package/dist/runtime/build/vendor/lib/lib.es2019.array.d.ts +79 -0
  124. package/dist/runtime/build/vendor/lib/lib.es2019.d.ts +24 -0
  125. package/dist/runtime/build/vendor/lib/lib.es2019.full.d.ts +24 -0
  126. package/dist/runtime/build/vendor/lib/lib.es2019.intl.d.ts +23 -0
  127. package/dist/runtime/build/vendor/lib/lib.es2019.object.d.ts +33 -0
  128. package/dist/runtime/build/vendor/lib/lib.es2019.string.d.ts +37 -0
  129. package/dist/runtime/build/vendor/lib/lib.es2019.symbol.d.ts +24 -0
  130. package/dist/runtime/build/vendor/lib/lib.es2020.bigint.d.ts +731 -0
  131. package/dist/runtime/build/vendor/lib/lib.es2020.d.ts +27 -0
  132. package/dist/runtime/build/vendor/lib/lib.es2020.date.d.ts +42 -0
  133. package/dist/runtime/build/vendor/lib/lib.es2020.full.d.ts +24 -0
  134. package/dist/runtime/build/vendor/lib/lib.es2020.intl.d.ts +474 -0
  135. package/dist/runtime/build/vendor/lib/lib.es2020.number.d.ts +28 -0
  136. package/dist/runtime/build/vendor/lib/lib.es2020.promise.d.ts +47 -0
  137. package/dist/runtime/build/vendor/lib/lib.es2020.sharedmemory.d.ts +99 -0
  138. package/dist/runtime/build/vendor/lib/lib.es2020.string.d.ts +44 -0
  139. package/dist/runtime/build/vendor/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  140. package/dist/runtime/build/vendor/lib/lib.es2021.d.ts +23 -0
  141. package/dist/runtime/build/vendor/lib/lib.es2021.full.d.ts +24 -0
  142. package/dist/runtime/build/vendor/lib/lib.es2021.intl.d.ts +166 -0
  143. package/dist/runtime/build/vendor/lib/lib.es2021.promise.d.ts +48 -0
  144. package/dist/runtime/build/vendor/lib/lib.es2021.string.d.ts +33 -0
  145. package/dist/runtime/build/vendor/lib/lib.es2021.weakref.d.ts +78 -0
  146. package/dist/runtime/build/vendor/lib/lib.es2022.array.d.ts +121 -0
  147. package/dist/runtime/build/vendor/lib/lib.es2022.d.ts +25 -0
  148. package/dist/runtime/build/vendor/lib/lib.es2022.error.d.ts +75 -0
  149. package/dist/runtime/build/vendor/lib/lib.es2022.full.d.ts +24 -0
  150. package/dist/runtime/build/vendor/lib/lib.es2022.intl.d.ts +121 -0
  151. package/dist/runtime/build/vendor/lib/lib.es2022.object.d.ts +26 -0
  152. package/dist/runtime/build/vendor/lib/lib.es2022.regexp.d.ts +39 -0
  153. package/dist/runtime/build/vendor/lib/lib.es2022.string.d.ts +25 -0
  154. package/dist/runtime/build/vendor/lib/lib.es2023.array.d.ts +924 -0
  155. package/dist/runtime/build/vendor/lib/lib.es2023.collection.d.ts +21 -0
  156. package/dist/runtime/build/vendor/lib/lib.es2023.d.ts +22 -0
  157. package/dist/runtime/build/vendor/lib/lib.es2023.full.d.ts +24 -0
  158. package/dist/runtime/build/vendor/lib/lib.es2023.intl.d.ts +56 -0
  159. package/dist/runtime/build/vendor/lib/lib.es2024.arraybuffer.d.ts +65 -0
  160. package/dist/runtime/build/vendor/lib/lib.es2024.collection.d.ts +29 -0
  161. package/dist/runtime/build/vendor/lib/lib.es2024.d.ts +26 -0
  162. package/dist/runtime/build/vendor/lib/lib.es2024.full.d.ts +24 -0
  163. package/dist/runtime/build/vendor/lib/lib.es2024.object.d.ts +29 -0
  164. package/dist/runtime/build/vendor/lib/lib.es2024.promise.d.ts +35 -0
  165. package/dist/runtime/build/vendor/lib/lib.es2024.regexp.d.ts +25 -0
  166. package/dist/runtime/build/vendor/lib/lib.es2024.sharedmemory.d.ts +68 -0
  167. package/dist/runtime/build/vendor/lib/lib.es2024.string.d.ts +29 -0
  168. package/dist/runtime/build/vendor/lib/lib.es5.d.ts +4585 -0
  169. package/dist/runtime/build/vendor/lib/lib.es6.d.ts +23 -0
  170. package/dist/runtime/build/vendor/lib/lib.esnext.array.d.ts +35 -0
  171. package/dist/runtime/build/vendor/lib/lib.esnext.collection.d.ts +96 -0
  172. package/dist/runtime/build/vendor/lib/lib.esnext.d.ts +25 -0
  173. package/dist/runtime/build/vendor/lib/lib.esnext.decorators.d.ts +28 -0
  174. package/dist/runtime/build/vendor/lib/lib.esnext.disposable.d.ts +193 -0
  175. package/dist/runtime/build/vendor/lib/lib.esnext.full.d.ts +24 -0
  176. package/dist/runtime/build/vendor/lib/lib.esnext.intl.d.ts +21 -0
  177. package/dist/runtime/build/vendor/lib/lib.esnext.iterator.d.ts +148 -0
  178. package/dist/runtime/build/vendor/node-types/assert/strict.d.ts +111 -0
  179. package/dist/runtime/build/vendor/node-types/assert.d.ts +1115 -0
  180. package/dist/runtime/build/vendor/node-types/async_hooks.d.ts +619 -0
  181. package/dist/runtime/build/vendor/node-types/buffer.buffer.d.ts +477 -0
  182. package/dist/runtime/build/vendor/node-types/buffer.d.ts +1941 -0
  183. package/dist/runtime/build/vendor/node-types/child_process.d.ts +1480 -0
  184. package/dist/runtime/build/vendor/node-types/cluster.d.ts +578 -0
  185. package/dist/runtime/build/vendor/node-types/compatibility/iterators.d.ts +21 -0
  186. package/dist/runtime/build/vendor/node-types/console.d.ts +453 -0
  187. package/dist/runtime/build/vendor/node-types/constants.d.ts +21 -0
  188. package/dist/runtime/build/vendor/node-types/crypto.d.ts +5484 -0
  189. package/dist/runtime/build/vendor/node-types/dgram.d.ts +715 -0
  190. package/dist/runtime/build/vendor/node-types/diagnostics_channel.d.ts +576 -0
  191. package/dist/runtime/build/vendor/node-types/dns/promises.d.ts +503 -0
  192. package/dist/runtime/build/vendor/node-types/dns.d.ts +923 -0
  193. package/dist/runtime/build/vendor/node-types/domain.d.ts +166 -0
  194. package/dist/runtime/build/vendor/node-types/events.d.ts +967 -0
  195. package/dist/runtime/build/vendor/node-types/fs/promises.d.ts +1354 -0
  196. package/dist/runtime/build/vendor/node-types/fs.d.ts +4777 -0
  197. package/dist/runtime/build/vendor/node-types/globals.d.ts +170 -0
  198. package/dist/runtime/build/vendor/node-types/globals.typedarray.d.ts +41 -0
  199. package/dist/runtime/build/vendor/node-types/http.d.ts +2246 -0
  200. package/dist/runtime/build/vendor/node-types/http2.d.ts +2882 -0
  201. package/dist/runtime/build/vendor/node-types/https.d.ts +585 -0
  202. package/dist/runtime/build/vendor/node-types/index.d.ts +101 -0
  203. package/dist/runtime/build/vendor/node-types/inspector.d.ts +323 -0
  204. package/dist/runtime/build/vendor/node-types/inspector.generated.d.ts +4406 -0
  205. package/dist/runtime/build/vendor/node-types/module.d.ts +844 -0
  206. package/dist/runtime/build/vendor/node-types/net.d.ts +1197 -0
  207. package/dist/runtime/build/vendor/node-types/os.d.ts +507 -0
  208. package/dist/runtime/build/vendor/node-types/package.json +140 -0
  209. package/dist/runtime/build/vendor/node-types/path.d.ts +200 -0
  210. package/dist/runtime/build/vendor/node-types/perf_hooks.d.ts +1054 -0
  211. package/dist/runtime/build/vendor/node-types/process.d.ts +2101 -0
  212. package/dist/runtime/build/vendor/node-types/punycode.d.ts +117 -0
  213. package/dist/runtime/build/vendor/node-types/querystring.d.ts +152 -0
  214. package/dist/runtime/build/vendor/node-types/readline/promises.d.ts +161 -0
  215. package/dist/runtime/build/vendor/node-types/readline.d.ts +600 -0
  216. package/dist/runtime/build/vendor/node-types/repl.d.ts +438 -0
  217. package/dist/runtime/build/vendor/node-types/sea.d.ts +162 -0
  218. package/dist/runtime/build/vendor/node-types/sqlite.d.ts +1182 -0
  219. package/dist/runtime/build/vendor/node-types/stream/consumers.d.ts +45 -0
  220. package/dist/runtime/build/vendor/node-types/stream/promises.d.ts +90 -0
  221. package/dist/runtime/build/vendor/node-types/stream/web.d.ts +596 -0
  222. package/dist/runtime/build/vendor/node-types/stream.d.ts +1707 -0
  223. package/dist/runtime/build/vendor/node-types/string_decoder.d.ts +67 -0
  224. package/dist/runtime/build/vendor/node-types/test.d.ts +2656 -0
  225. package/dist/runtime/build/vendor/node-types/timers/promises.d.ts +108 -0
  226. package/dist/runtime/build/vendor/node-types/timers.d.ts +285 -0
  227. package/dist/runtime/build/vendor/node-types/tls.d.ts +1314 -0
  228. package/dist/runtime/build/vendor/node-types/trace_events.d.ts +197 -0
  229. package/dist/runtime/build/vendor/node-types/ts5.6/buffer.buffer.d.ts +473 -0
  230. package/dist/runtime/build/vendor/node-types/ts5.6/compatibility/float16array.d.ts +71 -0
  231. package/dist/runtime/build/vendor/node-types/ts5.6/globals.typedarray.d.ts +36 -0
  232. package/dist/runtime/build/vendor/node-types/ts5.6/index.d.ts +103 -0
  233. package/dist/runtime/build/vendor/node-types/ts5.7/compatibility/float16array.d.ts +72 -0
  234. package/dist/runtime/build/vendor/node-types/ts5.7/index.d.ts +103 -0
  235. package/dist/runtime/build/vendor/node-types/tty.d.ts +209 -0
  236. package/dist/runtime/build/vendor/node-types/url.d.ts +1103 -0
  237. package/dist/runtime/build/vendor/node-types/util.d.ts +2379 -0
  238. package/dist/runtime/build/vendor/node-types/v8.d.ts +1010 -0
  239. package/dist/runtime/build/vendor/node-types/vm.d.ts +1160 -0
  240. package/dist/runtime/build/vendor/node-types/wasi.d.ts +202 -0
  241. package/dist/runtime/build/vendor/node-types/web-globals/abortcontroller.d.ts +34 -0
  242. package/dist/runtime/build/vendor/node-types/web-globals/crypto.d.ts +32 -0
  243. package/dist/runtime/build/vendor/node-types/web-globals/domexception.d.ts +68 -0
  244. package/dist/runtime/build/vendor/node-types/web-globals/events.d.ts +97 -0
  245. package/dist/runtime/build/vendor/node-types/web-globals/fetch.d.ts +62 -0
  246. package/dist/runtime/build/vendor/node-types/web-globals/navigator.d.ts +25 -0
  247. package/dist/runtime/build/vendor/node-types/web-globals/storage.d.ts +24 -0
  248. package/dist/runtime/build/vendor/node-types/web-globals/streams.d.ts +22 -0
  249. package/dist/runtime/build/vendor/node-types/worker_threads.d.ts +894 -0
  250. package/dist/runtime/build/vendor/node-types/zlib.d.ts +768 -0
  251. package/dist/runtime/build/vendor/node_modules/csstype/LICENSE +19 -0
  252. package/dist/runtime/build/vendor/node_modules/csstype/index.d.ts +22569 -0
  253. package/dist/runtime/build/vendor/node_modules/csstype/index.js.flow +6863 -0
  254. package/dist/runtime/build/vendor/node_modules/csstype/package.json +70 -0
  255. package/dist/runtime/build/vendor/node_modules/seroval/LICENSE +7 -0
  256. package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/development/index.cjs +4232 -0
  257. package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/production/index.cjs +3 -0
  258. package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/development/index.mjs +4209 -0
  259. package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/production/index.mjs +3 -0
  260. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/Serializer.d.ts +28 -0
  261. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/base-primitives.d.ts +28 -0
  262. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/compat.d.ts +15 -0
  263. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constants.d.ts +105 -0
  264. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constructors.d.ts +50 -0
  265. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/async-parser.d.ts +20 -0
  266. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/deserializer.d.ts +52 -0
  267. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/parser.d.ts +62 -0
  268. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/serializer.d.ts +103 -0
  269. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/sync-parser.d.ts +61 -0
  270. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/cross/index.d.ts +24 -0
  271. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/errors.d.ts +47 -0
  272. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/function-string.d.ts +3 -0
  273. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/keys.d.ts +4 -0
  274. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/literals.d.ts +10 -0
  275. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/node.d.ts +8 -0
  276. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/opaque-reference.d.ts +9 -0
  277. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/plugin.d.ts +52 -0
  278. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/reference.d.ts +6 -0
  279. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/sequence.d.ts +11 -0
  280. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/special-reference.d.ts +16 -0
  281. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/stream.d.ts +17 -0
  282. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/string.d.ts +4 -0
  283. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/symbols.d.ts +14 -0
  284. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/tree/index.d.ts +21 -0
  285. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/types.d.ts +233 -0
  286. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/error.d.ts +6 -0
  287. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-identifier.d.ts +2 -0
  288. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-object-flag.d.ts +3 -0
  289. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/is-valid-identifier.d.ts +2 -0
  290. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/promise-to-result.d.ts +2 -0
  291. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/typed-array.d.ts +6 -0
  292. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/valid-properties.d.ts +3 -0
  293. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/index.d.ts +18 -0
  294. package/dist/runtime/build/vendor/node_modules/seroval/package.json +67 -0
  295. package/dist/runtime/build/vendor/node_modules/seroval/src/core/Serializer.ts +119 -0
  296. package/dist/runtime/build/vendor/node_modules/seroval/src/core/base-primitives.ts +537 -0
  297. package/dist/runtime/build/vendor/node_modules/seroval/src/core/compat.ts +23 -0
  298. package/dist/runtime/build/vendor/node_modules/seroval/src/core/constants.ts +202 -0
  299. package/dist/runtime/build/vendor/node_modules/seroval/src/core/constructors.ts +265 -0
  300. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/async-parser.ts +666 -0
  301. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/deserializer.ts +832 -0
  302. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/parser.ts +335 -0
  303. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/serializer.ts +1524 -0
  304. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/sync-parser.ts +943 -0
  305. package/dist/runtime/build/vendor/node_modules/seroval/src/core/cross/index.ts +190 -0
  306. package/dist/runtime/build/vendor/node_modules/seroval/src/core/errors.ts +196 -0
  307. package/dist/runtime/build/vendor/node_modules/seroval/src/core/function-string.ts +31 -0
  308. package/dist/runtime/build/vendor/node_modules/seroval/src/core/keys.ts +17 -0
  309. package/dist/runtime/build/vendor/node_modules/seroval/src/core/literals.ts +43 -0
  310. package/dist/runtime/build/vendor/node_modules/seroval/src/core/node.ts +40 -0
  311. package/dist/runtime/build/vendor/node_modules/seroval/src/core/opaque-reference.ts +9 -0
  312. package/dist/runtime/build/vendor/node_modules/seroval/src/core/plugin.ts +105 -0
  313. package/dist/runtime/build/vendor/node_modules/seroval/src/core/reference.ts +66 -0
  314. package/dist/runtime/build/vendor/node_modules/seroval/src/core/sequence.ts +59 -0
  315. package/dist/runtime/build/vendor/node_modules/seroval/src/core/special-reference.ts +42 -0
  316. package/dist/runtime/build/vendor/node_modules/seroval/src/core/stream.ts +71 -0
  317. package/dist/runtime/build/vendor/node_modules/seroval/src/core/string.ts +86 -0
  318. package/dist/runtime/build/vendor/node_modules/seroval/src/core/symbols.ts +20 -0
  319. package/dist/runtime/build/vendor/node_modules/seroval/src/core/tree/index.ts +134 -0
  320. package/dist/runtime/build/vendor/node_modules/seroval/src/core/types.ts +377 -0
  321. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/error.ts +73 -0
  322. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-identifier.ts +18 -0
  323. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-object-flag.ts +14 -0
  324. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/is-valid-identifier.ts +12 -0
  325. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/promise-to-result.ts +9 -0
  326. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/typed-array.ts +56 -0
  327. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/valid-properties.ts +34 -0
  328. package/dist/runtime/build/vendor/node_modules/seroval/src/index.ts +36 -0
  329. package/dist/runtime/build/vendor/node_modules/seroval-plugins/LICENSE +7 -0
  330. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/development/web.cjs +826 -0
  331. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/production/web.cjs +1 -0
  332. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/development/web.mjs +803 -0
  333. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/production/web.mjs +1 -0
  334. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/abort-signal.d.ts +3 -0
  335. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/blob.d.ts +3 -0
  336. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/custom-event.d.ts +3 -0
  337. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/dom-exception.d.ts +3 -0
  338. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/event.d.ts +3 -0
  339. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/file.d.ts +3 -0
  340. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/form-data.d.ts +3 -0
  341. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/headers.d.ts +3 -0
  342. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/image-data.d.ts +3 -0
  343. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/index.d.ts +15 -0
  344. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/readable-stream.d.ts +3 -0
  345. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/request.d.ts +3 -0
  346. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/response.d.ts +3 -0
  347. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url-search-params.d.ts +3 -0
  348. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url.d.ts +3 -0
  349. package/dist/runtime/build/vendor/node_modules/seroval-plugins/package.json +70 -0
  350. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/abort-signal.ts +131 -0
  351. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/blob.ts +41 -0
  352. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/custom-event.ts +66 -0
  353. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/dom-exception.ts +57 -0
  354. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/event.ts +62 -0
  355. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/file.ts +50 -0
  356. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/form-data.ts +105 -0
  357. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/headers.ts +49 -0
  358. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/image-data.ts +74 -0
  359. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/index.ts +14 -0
  360. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/readable-stream.ts +148 -0
  361. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/request.ts +82 -0
  362. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/response.ts +65 -0
  363. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url-search-params.ts +40 -0
  364. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url.ts +37 -0
  365. package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.cjs +824 -0
  366. package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.js +770 -0
  367. package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.cjs +1808 -0
  368. package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.js +1753 -0
  369. package/dist/runtime/build/vendor/node_modules/solid-js/jsx-runtime.d.ts +1 -0
  370. package/dist/runtime/build/vendor/node_modules/solid-js/package.json +243 -0
  371. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.cjs +133 -0
  372. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.js +121 -0
  373. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.cjs +463 -0
  374. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.js +454 -0
  375. package/dist/runtime/build/vendor/node_modules/solid-js/store/package.json +46 -0
  376. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/index.d.ts +12 -0
  377. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/modifiers.d.ts +6 -0
  378. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/mutable.d.ts +5 -0
  379. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/server.d.ts +17 -0
  380. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/store.d.ts +108 -0
  381. package/dist/runtime/build/vendor/node_modules/solid-js/types/index.d.ts +23 -0
  382. package/dist/runtime/build/vendor/node_modules/solid-js/types/jsx.d.ts +4253 -0
  383. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/array.d.ts +44 -0
  384. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/observable.d.ts +36 -0
  385. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/scheduler.d.ts +10 -0
  386. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/signal.d.ts +581 -0
  387. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/Suspense.d.ts +26 -0
  388. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/component.d.ts +111 -0
  389. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/flow.d.ts +118 -0
  390. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/hydration.d.ts +24 -0
  391. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/index.d.ts +4 -0
  392. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/index.d.ts +3 -0
  393. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/reactive.d.ts +98 -0
  394. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/rendering.d.ts +160 -0
  395. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.cjs +900 -0
  396. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.js +786 -0
  397. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.cjs +884 -0
  398. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.js +772 -0
  399. package/dist/runtime/build/vendor/node_modules/solid-js/web/package.json +46 -0
  400. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.cjs +12 -0
  401. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.js +10 -0
  402. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/package.json +15 -0
  403. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/types/index.d.ts +2 -0
  404. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/client.d.ts +93 -0
  405. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/core.d.ts +2 -0
  406. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/index.d.ts +50 -0
  407. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/jsx.d.ts +1 -0
  408. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server-mock.d.ts +65 -0
  409. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server.d.ts +187 -0
  410. package/dist/runtime/build/worker.mjs +293415 -0
  411. package/dist/runtime/catalog/sdk-natives.json +655 -0
  412. package/dist/runtime/cli/iota-ext.mjs +1028 -0
  413. package/dist/runtime/client-host/entry.d.ts +10 -0
  414. package/dist/runtime/client-host/entry.js +124 -0
  415. package/dist/runtime/client-host/hooks.d.ts +43 -0
  416. package/dist/runtime/client-host/hooks.js +94 -0
  417. package/dist/runtime/client-host/index.d.ts +9 -0
  418. package/dist/runtime/client-host/index.js +9 -0
  419. package/dist/runtime/client-host/islands.d.ts +44 -0
  420. package/dist/runtime/client-host/islands.js +165 -0
  421. package/dist/runtime/client-host/kit.d.ts +10 -0
  422. package/dist/runtime/client-host/kit.js +37 -0
  423. package/dist/runtime/client-host/page.d.ts +53 -0
  424. package/dist/runtime/client-host/page.js +217 -0
  425. package/dist/runtime/client-host/params.d.ts +8 -0
  426. package/dist/runtime/client-host/params.js +36 -0
  427. package/dist/runtime/client-host/protocol.d.ts +78 -0
  428. package/dist/runtime/client-host/protocol.js +26 -0
  429. package/dist/runtime/client-host/shared.d.ts +12 -0
  430. package/dist/runtime/client-host/shared.js +49 -0
  431. package/dist/runtime/client-host/shell.d.ts +88 -0
  432. package/dist/runtime/client-host/shell.js +195 -0
  433. package/dist/runtime/client-host/slots.d.ts +54 -0
  434. package/dist/runtime/client-host/slots.js +90 -0
  435. package/dist/runtime/client-host/styles.d.ts +7 -0
  436. package/dist/runtime/client-host/styles.js +61 -0
  437. package/dist/runtime/client-host/transport.d.ts +45 -0
  438. package/dist/runtime/client-host/transport.js +115 -0
  439. package/dist/runtime/client.d.ts +226 -0
  440. package/dist/runtime/client.js +121 -0
  441. package/dist/runtime/contracts.d.ts +204 -0
  442. package/dist/runtime/contracts.js +195 -0
  443. package/dist/runtime/docs/authoring.md +1609 -0
  444. package/dist/runtime/docs/example/docs/en/admin/limits.md +10 -0
  445. package/dist/runtime/docs/example/docs/en/getting-started.md +13 -0
  446. package/dist/runtime/docs/example/docs/en/points.md +9 -0
  447. package/dist/runtime/docs/example/docs/ru/getting-started.md +12 -0
  448. package/dist/runtime/docs/example/package.json +27 -0
  449. package/dist/runtime/docs/example/src/ClientScreen.tsx +10 -0
  450. package/dist/runtime/docs/example/src/RedemptionScreen.tsx +7 -0
  451. package/dist/runtime/docs/example/src/RewardsScreen.module.css +13 -0
  452. package/dist/runtime/docs/example/src/RewardsScreen.tsx +51 -0
  453. package/dist/runtime/docs/example/src/client.tsx +40 -0
  454. package/dist/runtime/docs/example/src/contracts.ts +132 -0
  455. package/dist/runtime/docs/example/src/css-modules.d.ts +5 -0
  456. package/dist/runtime/docs/example/src/server.test.ts +156 -0
  457. package/dist/runtime/docs/example/src/server.ts +188 -0
  458. package/dist/runtime/docs/example/tsconfig.json +16 -0
  459. package/dist/runtime/entity.d.ts +237 -0
  460. package/dist/runtime/entity.js +201 -0
  461. package/dist/runtime/fakes.d.ts +80 -0
  462. package/dist/runtime/fakes.js +88 -0
  463. package/dist/runtime/fixtures.d.ts +34 -0
  464. package/dist/runtime/fixtures.js +60 -0
  465. package/dist/runtime/help.d.ts +22 -0
  466. package/dist/runtime/help.js +51 -0
  467. package/dist/runtime/host/context.mjs +392 -0
  468. package/dist/runtime/host/errors.mjs +64 -0
  469. package/dist/runtime/host/loader.mjs +28 -0
  470. package/dist/runtime/host/protocol.mjs +4 -0
  471. package/dist/runtime/host/register.mjs +8 -0
  472. package/dist/runtime/host/sdk/assert.mjs +153 -0
  473. package/dist/runtime/host/sdk/client-host/hooks.mjs +86 -0
  474. package/dist/runtime/host/sdk/client-host/protocol.mjs +30 -0
  475. package/dist/runtime/host/sdk/client-host/slots.mjs +82 -0
  476. package/dist/runtime/host/sdk/client-host/styles.mjs +45 -0
  477. package/dist/runtime/host/sdk/client-host/transport.mjs +102 -0
  478. package/dist/runtime/host/sdk/client.mjs +115 -0
  479. package/dist/runtime/host/sdk/contracts.mjs +185 -0
  480. package/dist/runtime/host/sdk/entity.mjs +183 -0
  481. package/dist/runtime/host/sdk/fakes.mjs +88 -0
  482. package/dist/runtime/host/sdk/fixtures.mjs +56 -0
  483. package/dist/runtime/host/sdk/help.mjs +37 -0
  484. package/dist/runtime/host/sdk/index.mjs +83 -0
  485. package/dist/runtime/host/sdk/kit.mjs +11 -0
  486. package/dist/runtime/host/sdk/manifest.mjs +276 -0
  487. package/dist/runtime/host/sdk/model.mjs +4 -0
  488. package/dist/runtime/host/sdk/resource.mjs +34 -0
  489. package/dist/runtime/host/sdk/schema.mjs +75 -0
  490. package/dist/runtime/host/sdk/server.mjs +43 -0
  491. package/dist/runtime/host/sdk/testhost.mjs +992 -0
  492. package/dist/runtime/host/sdk/testing.mjs +21 -0
  493. package/dist/runtime/host/sdk/wire.mjs +207 -0
  494. package/dist/runtime/host/worker.mjs +252 -0
  495. package/dist/runtime/index.d.ts +10 -0
  496. package/dist/runtime/index.js +5 -0
  497. package/dist/runtime/kit.d.ts +5 -0
  498. package/dist/runtime/kit.js +14 -0
  499. package/dist/runtime/manifest.d.ts +17 -0
  500. package/dist/runtime/manifest.js +323 -0
  501. package/dist/runtime/model.d.ts +224 -0
  502. package/dist/runtime/model.js +3 -0
  503. package/dist/runtime/resource.d.ts +31 -0
  504. package/dist/runtime/resource.js +35 -0
  505. package/dist/runtime/schema.d.ts +97 -0
  506. package/dist/runtime/schema.js +73 -0
  507. package/dist/runtime/server.d.ts +445 -0
  508. package/dist/runtime/server.js +41 -0
  509. package/dist/runtime/testhost.d.ts +216 -0
  510. package/dist/runtime/testhost.js +1146 -0
  511. package/dist/runtime/testing.d.ts +10 -0
  512. package/dist/runtime/testing.js +7 -0
  513. package/dist/runtime/wire.d.ts +26 -0
  514. package/dist/runtime/wire.js +236 -0
  515. package/dist/sdk-identity.cjs +3 -3
  516. package/dist/sdk-identity.js +3 -3
  517. package/dist/sdk-identity.json +2 -2
  518. package/dist/solid-ui/embedded-css.d.ts +2 -0
  519. package/dist/solid-ui/embedded-css.js +1 -0
  520. package/dist/solid-ui/embedded.css +2 -0
  521. package/dist/testing/components.d.ts +73 -0
  522. package/dist/testing/components.js +96 -0
  523. package/dist/testing/htmx.d.ts +44 -0
  524. package/dist/testing/htmx.js +284 -0
  525. package/dist/testing/index.d.ts +4 -41
  526. package/dist/testing/index.js +3 -206
  527. package/dist/testing/scenarios.d.ts +83 -0
  528. package/dist/testing/scenarios.js +74 -0
  529. package/dist/testing/wait.d.ts +7 -0
  530. package/dist/testing/wait.js +19 -0
  531. package/package.json +33 -2
  532. package/dist/lens/TablePanel-C09tzJOL.js +0 -980
  533. package/dist/lens/index-DcVtZneD.js +0 -18473
  534. package/dist/lens/runtime/recovery.d.ts +0 -26
  535. package/dist/lens/runtime/recovery.d.ts.map +0 -1
@@ -0,0 +1,195 @@
1
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
+ });
6
+ }
7
+ return path;
8
+ };
9
+ // Activation of a package shell renderer through the client host's ShellHost.
10
+ // The host (PR #1245) owns the single app-wide renderer, the outlet handoff and
11
+ // the fall back to the standard shell; this module loads the package module and
12
+ // adapts ShellRendererContext into the author-facing ShellProps.
13
+ import { createComponent, createSignal, ErrorBoundary, onCleanup } from 'solid-js';
14
+ import { render } from 'solid-js/web';
15
+ import { RuntimeProvider } from "./hooks.js";
16
+ import { createSlotSource, SlotsProvider } from "./slots.js";
17
+ import { ensureStyles } from "./styles.js";
18
+ /**
19
+ * The standard layout's theme controller (`window.iotaTheme`, theme.js) owns the class of <html> that Tailwind's
20
+ * `dark:` variants read and the stored choice. The host theme service only writes `data-theme`, so a renderer that
21
+ * changed the theme through it alone would leave the legacy page content in the old theme and forget the choice on
22
+ * the next page. Keep the controller in step; without one, the class is the resolved theme.
23
+ */
24
+ function syncLegacyTheme(win, mode, resolved) {
25
+ const legacy = win.iotaTheme;
26
+ if (typeof legacy?.change === 'function') {
27
+ legacy.change(mode);
28
+ return;
29
+ }
30
+ const root = win.document.documentElement;
31
+ root.classList.remove('light', 'dark', 'system');
32
+ root.classList.add(resolved);
33
+ }
34
+ function toItem(node, location) {
35
+ const href = node.href ?? '';
36
+ return {
37
+ id: node.key,
38
+ label: node.title,
39
+ href,
40
+ ...(node.icon ? { icon: node.icon } : {}),
41
+ active: href !== '' && !!location && (location.pathname === href || location.pathname.startsWith(href.endsWith('/') ? href : href + '/')),
42
+ children: node.children.map((child) => toItem(child, location)),
43
+ };
44
+ }
45
+ /**
46
+ * Builds the NavModel the shell renders: roots with children become groups, the
47
+ * leaf roots form one unnamed group, workspaces and palette come from Go.
48
+ */
49
+ export function buildNavModel(nodes, context, activeWorkspace, location) {
50
+ const workspaces = [...context.navigation.workspaces].sort((a, b) => a.order - b.order);
51
+ const fallback = workspaces[0]?.id ?? '';
52
+ const visible = nodes.filter((n) => workspaces.length === 0 || (n.workspace ?? fallback) === activeWorkspace);
53
+ const groups = [];
54
+ const leaves = visible.filter((n) => n.children.length === 0);
55
+ if (leaves.length > 0)
56
+ groups.push({ id: '', label: '', items: leaves.map((n) => toItem(n, location)) });
57
+ for (const n of visible.filter((x) => x.children.length > 0)) {
58
+ groups.push({ id: n.key, label: n.title, ...(n.icon ? { icon: n.icon } : {}), items: n.children.map((c) => toItem(c, location)) });
59
+ }
60
+ return {
61
+ workspaces: workspaces.map((w) => ({ id: w.id, label: w.label, ...(w.icon ? { icon: w.icon } : {}), active: w.id === activeWorkspace })),
62
+ groups,
63
+ palette: context.navigation.palette.map((p) => ({ id: p.id, label: p.label, href: p.href, keywords: p.keywords })),
64
+ };
65
+ }
66
+ /** Wraps a loaded shell as a renderer for ShellHost.activate. */
67
+ export function createShellRenderer(options) {
68
+ const { shell, context } = options;
69
+ const win = options.window;
70
+ return {
71
+ id: options.id,
72
+ mount(ctx) {
73
+ const firstWorkspace = [...context.navigation.workspaces].sort((a, b) => a.order - b.order)[0]?.id ?? '';
74
+ const subscriptions = [];
75
+ let mounting = true;
76
+ let early;
77
+ // Everything reactive lives in this root, so one disposer releases it.
78
+ const disposeRoot = render(() => {
79
+ const [nodes, setNodes] = createSignal(ctx.navigation.navigation());
80
+ const [path, setPath] = createSignal(win.location.pathname);
81
+ const [mode, setMode] = createSignal(ctx.theme.current());
82
+ const [resolved, setResolved] = createSignal(ctx.theme.current());
83
+ const [unread] = createSignal(0);
84
+ subscriptions.push(ctx.navigation.subscribe(() => setNodes(ctx.navigation.navigation())));
85
+ subscriptions.push(ctx.theme.subscribe((t) => setResolved(t)));
86
+ const onNavigate = () => setPath(win.location.pathname);
87
+ win.addEventListener('popstate', onNavigate);
88
+ win.document.addEventListener('htmx:pushedIntoHistory', onNavigate);
89
+ onCleanup(() => {
90
+ win.removeEventListener('popstate', onNavigate);
91
+ win.document.removeEventListener('htmx:pushedIntoHistory', onNavigate);
92
+ });
93
+ const theme = {
94
+ get mode() { return mode(); },
95
+ get resolved() { return resolved(); },
96
+ set(next) {
97
+ setMode(next);
98
+ const target = next === 'system' ? (win.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : next;
99
+ syncLegacyTheme(win, next, target);
100
+ ctx.theme.set(target);
101
+ },
102
+ };
103
+ const notifications = {
104
+ get unread() { return unread(); },
105
+ items: [],
106
+ markRead() { },
107
+ };
108
+ const email = context.user?.email ?? ctx.user?.email;
109
+ const user = {
110
+ id: context.user?.id ?? '',
111
+ name: context.user?.name ?? ctx.user?.name ?? '',
112
+ ...(email ? { email } : {}),
113
+ permissions: context.permissions,
114
+ };
115
+ const props = {
116
+ outlet: ctx.outlet,
117
+ get nav() { return buildNavModel(nodes(), context, firstWorkspace, { pathname: path() }); },
118
+ user,
119
+ locale: ctx.locale.language,
120
+ theme,
121
+ notifications,
122
+ logout: async () => { ctx.actions.logout(); },
123
+ };
124
+ const slots = createSlotSource({
125
+ contributions: context.slots ?? {},
126
+ ...(options.importModule ? { importModule: options.importModule } : {}),
127
+ document: win.document,
128
+ console: console,
129
+ });
130
+ const body = () => createComponent(SlotsProvider, {
131
+ source: slots,
132
+ get children() { return createComponent(shell.component, props); },
133
+ });
134
+ return createComponent(ErrorBoundary, {
135
+ fallback: (error) => {
136
+ // A failure while mounting makes mount() throw, so activation reports
137
+ // false; a later one puts the standard shell back through ctx.fail.
138
+ if (mounting)
139
+ early = { error };
140
+ else
141
+ queueMicrotask(() => ctx.fail(error));
142
+ return null;
143
+ },
144
+ get children() {
145
+ const transport = options.transport;
146
+ return transport ? createComponent(RuntimeProvider, { transport, get children() { return body(); } }) : body();
147
+ },
148
+ });
149
+ }, ctx.root);
150
+ mounting = false;
151
+ const release = () => {
152
+ for (const stop of subscriptions.splice(0))
153
+ stop();
154
+ disposeRoot();
155
+ };
156
+ if (early) {
157
+ release();
158
+ throw early.error;
159
+ }
160
+ return release;
161
+ },
162
+ };
163
+ }
164
+ /**
165
+ * Loads the bound shell module and activates it app-wide. The standard shell
166
+ * stays visible while the module loads and whenever loading, validating or
167
+ * mounting fails, so a broken package can never leave the user without a
168
+ * shell. Resolves true once the renderer is active.
169
+ */
170
+ export async function activateRuntimeShell(options) {
171
+ const ref = options.context.shell;
172
+ if (!ref)
173
+ return false;
174
+ const load = options.importModule ?? ((url) => import(__rewriteRelativeImportExtension(/* @vite-ignore */ url)));
175
+ const console = options.window.console;
176
+ let module;
177
+ try {
178
+ const [loaded] = await Promise.all([load(ref.module), ensureStyles(options.window.document, ref.styles)]);
179
+ module = loaded;
180
+ }
181
+ catch (cause) {
182
+ console.error(`Shell renderer ${ref.id} could not be loaded; the standard shell stays`, cause);
183
+ return false;
184
+ }
185
+ const value = (ref.export ? module[ref.export] : module.default);
186
+ if (!value || typeof value.component !== 'function') {
187
+ console.error(`Shell renderer ${ref.id}: module ${ref.module} has no shell export "${ref.export ?? 'default'}"`);
188
+ return false;
189
+ }
190
+ return options.host.activate(createShellRenderer({
191
+ id: ref.id, shell: value, context: options.context, window: options.window,
192
+ ...(options.transport ? { transport: options.transport } : {}),
193
+ ...(options.importModule ? { importModule: options.importModule } : {}),
194
+ }));
195
+ }
@@ -0,0 +1,54 @@
1
+ import { type Component, type JSX } from 'solid-js';
2
+ import type { SlotRef } from '../contracts.ts';
3
+ /** One contribution the server resolved for a slot: where its module is and which export holds the component. */
4
+ export interface SlotContribution {
5
+ readonly id: string;
6
+ readonly package: string;
7
+ readonly version: string;
8
+ /** Immutable asset URL of the package's client entry chunk. */
9
+ readonly module: string;
10
+ /** Export of `module` holding the `slot()` value; default export when absent. */
11
+ readonly export?: string;
12
+ /** Immutable asset URLs of the stylesheets of the contribution's version; linked (once per document) before it renders. */
13
+ readonly styles?: readonly string[];
14
+ }
15
+ /** What the host gives `<Slot>`: the contributions of a slot and the way to load one. */
16
+ export interface SlotSource {
17
+ contributions(slotId: string): readonly SlotContribution[];
18
+ /** The component of a contribution; undefined when its module is unusable (reported, never thrown). */
19
+ load(contribution: SlotContribution): Promise<Component<never> | undefined>;
20
+ }
21
+ export interface SlotsProviderProps {
22
+ source: SlotSource;
23
+ children: JSX.Element;
24
+ }
25
+ /** Makes `<Slot>` work in a subtree. The runtime host installs it around every page, shell and island. */
26
+ export declare const SlotsProvider: Component<SlotsProviderProps>;
27
+ export interface SlotProps<P extends object> {
28
+ /**
29
+ * The slot, as the kit (or `defineSlot`) exports it; it types `props`. (Not named `ref`: Solid's compiler
30
+ * reserves that prop on every component and turns it into an assignment.)
31
+ */
32
+ readonly slot: SlotRef<P>;
33
+ /** Passed to every contribution. Must match the slot's declared props. */
34
+ readonly props: P;
35
+ }
36
+ /**
37
+ * Mounts the contributions of a slot, in the order the server resolved them (each filtered by its own
38
+ * permission). Nothing renders while a contribution loads or when none applies; a contribution that fails to
39
+ * load or throws is reported to the console and leaves its neighbours and the page alone.
40
+ */
41
+ export declare function Slot<P extends object>(props: SlotProps<P>): JSX.Element;
42
+ /** The loaded module's export, when it is a client value with a component (`slot()`, `cell()`). */
43
+ export declare function resolveComponent(module: Record<string, unknown>, name: string | undefined): Component<never> | undefined;
44
+ export interface SlotSourceOptions {
45
+ /** Contributions by slot ID, as the server resolved them for this viewer. */
46
+ contributions: Readonly<Record<string, readonly SlotContribution[]>>;
47
+ /** Dynamic import, injectable for tests. */
48
+ importModule?: (url: string) => Promise<Record<string, unknown>>;
49
+ console?: Pick<Console, 'error'>;
50
+ /** Document the contributions' stylesheets are linked in (default: the global document, when there is one). */
51
+ document?: Document;
52
+ }
53
+ /** A SlotSource over a fixed server-resolved set; modules are imported once per URL. */
54
+ export declare function createSlotSource(options: SlotSourceOptions): SlotSource;
@@ -0,0 +1,90 @@
1
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
+ });
6
+ }
7
+ return path;
8
+ };
9
+ // Slots: where a page that is not the package's own lets packages mount components. The page declares the
10
+ // slot (stable ID, typed props, optional permission); every activated package may contribute to it. The server
11
+ // decides WHICH contributions a viewer gets (activation, order, each contribution's permission); this module
12
+ // only loads and renders them. It imports `solid-js` only, because the author-facing `Slot` is re-exported
13
+ // from the client entry, which the build also evaluates in Node.
14
+ import { createComponent, createContext, createSignal, ErrorBoundary, For, onCleanup, useContext } from 'solid-js';
15
+ import { ensureStyles } from "./styles.js";
16
+ const SlotContext = createContext();
17
+ /** Makes `<Slot>` work in a subtree. The runtime host installs it around every page, shell and island. */
18
+ export const SlotsProvider = (props) => createComponent(SlotContext.Provider, {
19
+ get value() { return props.source; },
20
+ get children() { return props.children; },
21
+ });
22
+ /**
23
+ * Mounts the contributions of a slot, in the order the server resolved them (each filtered by its own
24
+ * permission). Nothing renders while a contribution loads or when none applies; a contribution that fails to
25
+ * load or throws is reported to the console and leaves its neighbours and the page alone.
26
+ */
27
+ export function Slot(props) {
28
+ const source = useContext(SlotContext);
29
+ if (!source)
30
+ return undefined;
31
+ return createComponent(For, {
32
+ get each() { return source.contributions(props.slot.slotId); },
33
+ children: (contribution) => createComponent(ContributionView, { contribution, source, get props() { return props.props; } }),
34
+ });
35
+ }
36
+ function ContributionView(p) {
37
+ const [component, setComponent] = createSignal();
38
+ let disposed = false;
39
+ onCleanup(() => { disposed = true; });
40
+ // A module that arrives after the slot went away (navigation, swap) is dropped, never mounted.
41
+ void p.source.load(p.contribution).then((loaded) => {
42
+ if (!disposed && loaded)
43
+ setComponent(() => loaded);
44
+ });
45
+ return createComponent(ErrorBoundary, {
46
+ fallback: (cause) => {
47
+ console.error(`Slot contribution ${p.contribution.id} failed`, cause);
48
+ return undefined;
49
+ },
50
+ get children() {
51
+ const Contribution = component();
52
+ return Contribution ? createComponent(Contribution, p.props) : undefined;
53
+ },
54
+ });
55
+ }
56
+ /** The loaded module's export, when it is a client value with a component (`slot()`, `cell()`). */
57
+ export function resolveComponent(module, name) {
58
+ const value = (name ? module[name] : module.default);
59
+ return value && typeof value.component === 'function' ? value.component : undefined;
60
+ }
61
+ const EMPTY = [];
62
+ /** A SlotSource over a fixed server-resolved set; modules are imported once per URL. */
63
+ export function createSlotSource(options) {
64
+ const importModule = options.importModule ?? ((url) => import(__rewriteRelativeImportExtension(/* @vite-ignore */ url)));
65
+ const log = options.console ?? console;
66
+ const modules = new Map();
67
+ const doc = options.document ?? (typeof document === 'undefined' ? undefined : document);
68
+ return {
69
+ contributions: (slotId) => options.contributions[slotId] ?? EMPTY,
70
+ async load(contribution) {
71
+ let pending = modules.get(contribution.module);
72
+ if (!pending) {
73
+ pending = importModule(contribution.module);
74
+ modules.set(contribution.module, pending);
75
+ }
76
+ try {
77
+ // The version's stylesheets load alongside its module; the component renders only once both are in.
78
+ const [module] = await Promise.all([pending, ensureStyles(doc, contribution.styles)]);
79
+ const component = resolveComponent(module, contribution.export);
80
+ if (!component)
81
+ log.error(`Slot contribution ${contribution.id}: module ${contribution.module} has no component export "${contribution.export ?? 'default'}"`);
82
+ return component;
83
+ }
84
+ catch (cause) {
85
+ log.error(`Slot contribution ${contribution.id}: module ${contribution.module} could not be loaded`, cause);
86
+ return undefined;
87
+ }
88
+ },
89
+ };
90
+ }
@@ -0,0 +1,7 @@
1
+ /** Marks the stylesheet links this module creates. */
2
+ export declare const STYLE_ATTR = "data-iota-ext-css";
3
+ /**
4
+ * Links `hrefs` in `doc` (those not linked yet) and resolves once all of them loaded. Never rejects: a stylesheet that
5
+ * fails to load is reported to the console and the component renders without it.
6
+ */
7
+ export declare function ensureStyles(doc: Document | undefined, hrefs: readonly string[] | undefined): Promise<void>;
@@ -0,0 +1,61 @@
1
+ // Version stylesheets. A package version's client build records its stylesheets (Tailwind utilities, scoped CSS
2
+ // modules) in the immutable artifact; the server hands the URLs to every place that mounts the version's code (page,
3
+ // slot, cell, shell). This module makes sure each URL is linked once in the document, and resolved before the first render.
4
+ //
5
+ // The links belong to the document's <head>, not to the island or fragment that asked for them: an HTMX swap that removes
6
+ // an island must not take the stylesheet of its neighbours with it, and a second island of the same version must not link
7
+ // it again. A link the server already wrote (a runtime page links its version's sheet in the HTML) is reused wherever it is.
8
+ /** Marks the stylesheet links this module creates. */
9
+ export const STYLE_ATTR = 'data-iota-ext-css';
10
+ /** How long a stylesheet may take before the first render stops waiting for it (the page renders unstyled rather than never). */
11
+ const STYLE_TIMEOUT_MS = 10_000;
12
+ function find(doc, href) {
13
+ const absolute = new URL(href, doc.baseURI).href;
14
+ return Array.from(doc.querySelectorAll('link[rel~="stylesheet"]')).find((link) => link.href === absolute);
15
+ }
16
+ // What this module has seen of each link (a browser sets `sheet` for a loaded stylesheet; the record also covers a link
17
+ // whose load event fired before the next island asked, and failed ones, which do not make the next island wait again).
18
+ const outcome = new WeakMap();
19
+ function settled(link, win) {
20
+ // `sheet` is set once the stylesheet has loaded and parsed; a link the parser created is usually done already.
21
+ if (link.sheet !== null)
22
+ return Promise.resolve(true);
23
+ const known = outcome.get(link);
24
+ if (known !== undefined)
25
+ return Promise.resolve(known);
26
+ return new Promise((resolve) => {
27
+ const finish = (ok) => {
28
+ win.clearTimeout(timer);
29
+ link.removeEventListener('load', onLoad);
30
+ link.removeEventListener('error', onError);
31
+ outcome.set(link, ok);
32
+ resolve(ok);
33
+ };
34
+ const onLoad = () => finish(true);
35
+ const onError = () => finish(false);
36
+ const timer = win.setTimeout(() => finish(false), STYLE_TIMEOUT_MS);
37
+ link.addEventListener('load', onLoad);
38
+ link.addEventListener('error', onError);
39
+ });
40
+ }
41
+ /**
42
+ * Links `hrefs` in `doc` (those not linked yet) and resolves once all of them loaded. Never rejects: a stylesheet that
43
+ * fails to load is reported to the console and the component renders without it.
44
+ */
45
+ export async function ensureStyles(doc, hrefs) {
46
+ const win = doc?.defaultView;
47
+ if (!doc || !win || !hrefs || hrefs.length === 0)
48
+ return;
49
+ await Promise.all([...new Set(hrefs)].map(async (href) => {
50
+ let link = find(doc, href);
51
+ if (!link) {
52
+ link = doc.createElement('link');
53
+ link.rel = 'stylesheet';
54
+ link.href = href;
55
+ link.setAttribute(STYLE_ATTR, '');
56
+ doc.head.append(link);
57
+ }
58
+ if (!(await settled(link, win)))
59
+ win.console.error(`Extension stylesheet ${href} could not be loaded; its components render without it`);
60
+ }));
61
+ }
@@ -0,0 +1,45 @@
1
+ import { type ClientTransport } from '../client.ts';
2
+ import type { ImplKind, Json } from '../model.ts';
3
+ export interface CallOptions {
4
+ signal?: AbortSignal;
5
+ }
6
+ /** The transport the hooks use: ClientTransport plus cancellation. */
7
+ export interface RuntimeTransport {
8
+ invoke(kind: Extract<ImplKind, 'query' | 'command' | 'atomic'>, resource: string, input: Json, options?: CallOptions): Promise<Json>;
9
+ }
10
+ /** The request never produced a structured answer (network, proxy, malformed body). */
11
+ export declare class TransportError extends Error {
12
+ readonly kind = "transport";
13
+ readonly status: number | undefined;
14
+ readonly retriable: boolean;
15
+ constructor(message: string, status: number | undefined, retriable: boolean, options?: {
16
+ cause?: unknown;
17
+ });
18
+ }
19
+ /** The session is gone and could not be refreshed. */
20
+ export declare class UnauthenticatedError extends Error {
21
+ readonly kind = "unauthenticated";
22
+ readonly reauthUrl: string | undefined;
23
+ constructor(reauthUrl?: string);
24
+ }
25
+ /** Session access reused from the client host (CSRF token, refresh). */
26
+ export interface SessionLike {
27
+ snapshot(): {
28
+ csrf?: string;
29
+ headers?: Readonly<Record<string, string>>;
30
+ };
31
+ refresh(signal: AbortSignal): Promise<unknown>;
32
+ }
33
+ export interface RpcTransportOptions {
34
+ endpoint?: string;
35
+ session?: SessionLike;
36
+ fetch?: typeof fetch;
37
+ /** Extra attempts for a query after a network failure or 502/503/504. Default 1. Commands never retry. */
38
+ queryRetries?: number;
39
+ retryDelayMs?: number;
40
+ sleep?: (ms: number) => Promise<void>;
41
+ reauthUrl?: string;
42
+ }
43
+ export declare function createRpcTransport(options?: RpcTransportOptions): RuntimeTransport;
44
+ /** Adapts a RuntimeTransport (with a cancellation signal) to the author-facing ClientTransport. */
45
+ export declare function bindTransport(transport: RuntimeTransport, signal?: AbortSignal): ClientTransport;
@@ -0,0 +1,115 @@
1
+ // Browser transport for useCommand / useQuery: POST /_ext/rpc, executed on the
2
+ // server as the session user with the permissions they hold now. Business
3
+ // errors keep {kind, code, params, issues}; mutations are never retried.
4
+ import { RemoteError } from "../client.js";
5
+ import { RPC_PATH } from "./protocol.js";
6
+ /** The request never produced a structured answer (network, proxy, malformed body). */
7
+ export class TransportError extends Error {
8
+ kind = 'transport';
9
+ status;
10
+ retriable;
11
+ // No parameter properties: the host build strips types only (scripts/build-host.mjs).
12
+ constructor(message, status, retriable, options) {
13
+ super(message, options);
14
+ this.name = 'TransportError';
15
+ this.status = status;
16
+ this.retriable = retriable;
17
+ }
18
+ }
19
+ /** The session is gone and could not be refreshed. */
20
+ export class UnauthenticatedError extends Error {
21
+ kind = 'unauthenticated';
22
+ reauthUrl;
23
+ constructor(reauthUrl) {
24
+ super('Session expired');
25
+ this.name = 'UnauthenticatedError';
26
+ this.reauthUrl = reauthUrl;
27
+ }
28
+ }
29
+ const TRANSIENT = new Set([502, 503, 504]);
30
+ function abortError(signal) {
31
+ return signal.reason ?? new DOMException('Aborted', 'AbortError');
32
+ }
33
+ export function createRpcTransport(options = {}) {
34
+ const endpoint = options.endpoint ?? RPC_PATH;
35
+ const doFetch = options.fetch ?? ((...args) => fetch(...args));
36
+ const retries = Math.max(0, options.queryRetries ?? 1);
37
+ const delay = options.retryDelayMs ?? 200;
38
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
39
+ async function once(kind, resource, input, signal) {
40
+ const session = options.session?.snapshot();
41
+ let response;
42
+ try {
43
+ response = await doFetch(endpoint, {
44
+ method: 'POST',
45
+ credentials: 'same-origin',
46
+ ...(signal ? { signal } : {}),
47
+ headers: {
48
+ 'content-type': 'application/json',
49
+ accept: 'application/json',
50
+ ...(session?.csrf ? { 'x-csrf-token': session.csrf } : {}),
51
+ ...session?.headers,
52
+ },
53
+ body: JSON.stringify({ kind, resource, input }),
54
+ });
55
+ }
56
+ catch (cause) {
57
+ if (signal?.aborted)
58
+ throw abortError(signal);
59
+ throw new TransportError(`Request to ${resource} failed`, undefined, true, { cause });
60
+ }
61
+ let body;
62
+ try {
63
+ body = await response.json();
64
+ }
65
+ catch {
66
+ body = undefined;
67
+ }
68
+ if (body && body.ok === true)
69
+ return (body.value ?? null);
70
+ // The session is gone, whatever the body says.
71
+ if (response.status === 401)
72
+ throw new UnauthenticatedError(options.reauthUrl);
73
+ if (body?.error && typeof body.error.kind === 'string')
74
+ throw new RemoteError(body.error);
75
+ throw new TransportError(`Request to ${resource} failed with HTTP ${response.status}`, response.status, TRANSIENT.has(response.status));
76
+ }
77
+ async function invoke(kind, resource, input, call = {}) {
78
+ const query = kind === 'query';
79
+ let refreshed = false;
80
+ for (let attempt = 0;; attempt++) {
81
+ if (call.signal?.aborted)
82
+ throw abortError(call.signal);
83
+ try {
84
+ return await once(kind, resource, input, call.signal);
85
+ }
86
+ catch (error) {
87
+ if (!query)
88
+ throw error; // a mutation may have run; never repeat it
89
+ if (call.signal?.aborted)
90
+ throw error;
91
+ if (error instanceof UnauthenticatedError && !refreshed && options.session) {
92
+ // Rejected before execution, so a read can safely follow a refresh.
93
+ refreshed = true;
94
+ try {
95
+ await options.session.refresh(call.signal ?? new AbortController().signal);
96
+ }
97
+ catch {
98
+ throw error;
99
+ }
100
+ continue;
101
+ }
102
+ if (error instanceof TransportError && error.retriable && attempt < retries) {
103
+ await sleep(delay);
104
+ continue;
105
+ }
106
+ throw error;
107
+ }
108
+ }
109
+ }
110
+ return { invoke };
111
+ }
112
+ /** Adapts a RuntimeTransport (with a cancellation signal) to the author-facing ClientTransport. */
113
+ export function bindTransport(transport, signal) {
114
+ return { invoke: (kind, resource, input) => transport.invoke(kind, resource, input, signal ? { signal } : {}) };
115
+ }