@xyo-network/react-embed 2.64.9 → 2.65.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (386) hide show
  1. package/package.json +15 -15
  2. package/dist/browser/components/EmbedPlugin.cjs +0 -251
  3. package/dist/browser/components/EmbedPlugin.cjs.map +0 -1
  4. package/dist/browser/components/EmbedPlugin.js +0 -230
  5. package/dist/browser/components/EmbedPlugin.js.map +0 -1
  6. package/dist/browser/components/EmbedResolver.cjs +0 -42
  7. package/dist/browser/components/EmbedResolver.cjs.map +0 -1
  8. package/dist/browser/components/EmbedResolver.js +0 -21
  9. package/dist/browser/components/EmbedResolver.js.map +0 -1
  10. package/dist/browser/components/controls/EmbedFormControl.cjs +0 -34
  11. package/dist/browser/components/controls/EmbedFormControl.cjs.map +0 -1
  12. package/dist/browser/components/controls/EmbedFormControl.js +0 -13
  13. package/dist/browser/components/controls/EmbedFormControl.js.map +0 -1
  14. package/dist/browser/components/controls/ListModeSelect.cjs +0 -65
  15. package/dist/browser/components/controls/ListModeSelect.cjs.map +0 -1
  16. package/dist/browser/components/controls/ListModeSelect.js +0 -44
  17. package/dist/browser/components/controls/ListModeSelect.js.map +0 -1
  18. package/dist/browser/components/controls/RenderSelect.cjs +0 -54
  19. package/dist/browser/components/controls/RenderSelect.cjs.map +0 -1
  20. package/dist/browser/components/controls/RenderSelect.js +0 -33
  21. package/dist/browser/components/controls/RenderSelect.js.map +0 -1
  22. package/dist/browser/components/controls/index.cjs +0 -87
  23. package/dist/browser/components/controls/index.cjs.map +0 -1
  24. package/dist/browser/components/controls/index.js +0 -64
  25. package/dist/browser/components/controls/index.js.map +0 -1
  26. package/dist/browser/components/embed-card/EmbedCardResolver.cjs +0 -95
  27. package/dist/browser/components/embed-card/EmbedCardResolver.cjs.map +0 -1
  28. package/dist/browser/components/embed-card/EmbedCardResolver.js +0 -74
  29. package/dist/browser/components/embed-card/EmbedCardResolver.js.map +0 -1
  30. package/dist/browser/components/embed-card/EmbedPluginCard.cjs +0 -497
  31. package/dist/browser/components/embed-card/EmbedPluginCard.cjs.map +0 -1
  32. package/dist/browser/components/embed-card/EmbedPluginCard.js +0 -479
  33. package/dist/browser/components/embed-card/EmbedPluginCard.js.map +0 -1
  34. package/dist/browser/components/embed-card/card/BusyCard.cjs +0 -45
  35. package/dist/browser/components/embed-card/card/BusyCard.cjs.map +0 -1
  36. package/dist/browser/components/embed-card/card/BusyCard.js +0 -27
  37. package/dist/browser/components/embed-card/card/BusyCard.js.map +0 -1
  38. package/dist/browser/components/embed-card/card/EmbedCardHeader.cjs +0 -108
  39. package/dist/browser/components/embed-card/card/EmbedCardHeader.cjs.map +0 -1
  40. package/dist/browser/components/embed-card/card/EmbedCardHeader.js +0 -87
  41. package/dist/browser/components/embed-card/card/EmbedCardHeader.js.map +0 -1
  42. package/dist/browser/components/embed-card/card/EmbedPluginCard.cjs +0 -199
  43. package/dist/browser/components/embed-card/card/EmbedPluginCard.cjs.map +0 -1
  44. package/dist/browser/components/embed-card/card/EmbedPluginCard.js +0 -181
  45. package/dist/browser/components/embed-card/card/EmbedPluginCard.js.map +0 -1
  46. package/dist/browser/components/embed-card/card/index.cjs +0 -203
  47. package/dist/browser/components/embed-card/card/index.cjs.map +0 -1
  48. package/dist/browser/components/embed-card/card/index.js +0 -183
  49. package/dist/browser/components/embed-card/card/index.js.map +0 -1
  50. package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs +0 -54
  51. package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs.map +0 -1
  52. package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -33
  53. package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
  54. package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.cjs +0 -42
  55. package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.cjs.map +0 -1
  56. package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.js +0 -21
  57. package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
  58. package/dist/browser/components/embed-card/error-handling/index.cjs +0 -57
  59. package/dist/browser/components/embed-card/error-handling/index.cjs.map +0 -1
  60. package/dist/browser/components/embed-card/error-handling/index.js +0 -34
  61. package/dist/browser/components/embed-card/error-handling/index.js.map +0 -1
  62. package/dist/browser/components/embed-card/index.cjs +0 -502
  63. package/dist/browser/components/embed-card/index.cjs.map +0 -1
  64. package/dist/browser/components/embed-card/index.js +0 -482
  65. package/dist/browser/components/embed-card/index.js.map +0 -1
  66. package/dist/browser/components/embed-card/menu/EmbedMenu.cjs +0 -68
  67. package/dist/browser/components/embed-card/menu/EmbedMenu.cjs.map +0 -1
  68. package/dist/browser/components/embed-card/menu/EmbedMenu.js +0 -47
  69. package/dist/browser/components/embed-card/menu/EmbedMenu.js.map +0 -1
  70. package/dist/browser/components/embed-card/menu/JsonMenuItem.cjs +0 -46
  71. package/dist/browser/components/embed-card/menu/JsonMenuItem.cjs.map +0 -1
  72. package/dist/browser/components/embed-card/menu/JsonMenuItem.js +0 -25
  73. package/dist/browser/components/embed-card/menu/JsonMenuItem.js.map +0 -1
  74. package/dist/browser/components/embed-card/menu/index.cjs +0 -70
  75. package/dist/browser/components/embed-card/menu/index.cjs.map +0 -1
  76. package/dist/browser/components/embed-card/menu/index.js +0 -47
  77. package/dist/browser/components/embed-card/menu/index.js.map +0 -1
  78. package/dist/browser/components/embed-plugin-stories/storyPayload.cjs +0 -47
  79. package/dist/browser/components/embed-plugin-stories/storyPayload.cjs.map +0 -1
  80. package/dist/browser/components/embed-plugin-stories/storyPayload.js +0 -26
  81. package/dist/browser/components/embed-plugin-stories/storyPayload.js.map +0 -1
  82. package/dist/browser/components/embed-plugin-stories/storyShared.cjs +0 -513
  83. package/dist/browser/components/embed-plugin-stories/storyShared.cjs.map +0 -1
  84. package/dist/browser/components/embed-plugin-stories/storyShared.js +0 -495
  85. package/dist/browser/components/embed-plugin-stories/storyShared.js.map +0 -1
  86. package/dist/browser/components/index.cjs +0 -503
  87. package/dist/browser/components/index.cjs.map +0 -1
  88. package/dist/browser/components/index.js +0 -483
  89. package/dist/browser/components/index.js.map +0 -1
  90. package/dist/browser/components/validation-alerts/ValidatePayload.cjs +0 -49
  91. package/dist/browser/components/validation-alerts/ValidatePayload.cjs.map +0 -1
  92. package/dist/browser/components/validation-alerts/ValidatePayload.js +0 -28
  93. package/dist/browser/components/validation-alerts/ValidatePayload.js.map +0 -1
  94. package/dist/browser/components/validation-alerts/ValidatePlugins.cjs +0 -57
  95. package/dist/browser/components/validation-alerts/ValidatePlugins.cjs.map +0 -1
  96. package/dist/browser/components/validation-alerts/ValidatePlugins.js +0 -36
  97. package/dist/browser/components/validation-alerts/ValidatePlugins.js.map +0 -1
  98. package/dist/browser/components/validation-alerts/index.cjs +0 -83
  99. package/dist/browser/components/validation-alerts/index.cjs.map +0 -1
  100. package/dist/browser/components/validation-alerts/index.js +0 -60
  101. package/dist/browser/components/validation-alerts/index.js.map +0 -1
  102. package/dist/browser/contexts/EmbedPluginContext/Context.cjs +0 -28
  103. package/dist/browser/contexts/EmbedPluginContext/Context.cjs.map +0 -1
  104. package/dist/browser/contexts/EmbedPluginContext/Context.js +0 -7
  105. package/dist/browser/contexts/EmbedPluginContext/Context.js.map +0 -1
  106. package/dist/browser/contexts/EmbedPluginContext/Provider.cjs +0 -62
  107. package/dist/browser/contexts/EmbedPluginContext/Provider.cjs.map +0 -1
  108. package/dist/browser/contexts/EmbedPluginContext/Provider.js +0 -41
  109. package/dist/browser/contexts/EmbedPluginContext/Provider.js.map +0 -1
  110. package/dist/browser/contexts/EmbedPluginContext/State.cjs +0 -19
  111. package/dist/browser/contexts/EmbedPluginContext/State.cjs.map +0 -1
  112. package/dist/browser/contexts/EmbedPluginContext/State.js +0 -1
  113. package/dist/browser/contexts/EmbedPluginContext/State.js.map +0 -1
  114. package/dist/browser/contexts/EmbedPluginContext/index.cjs +0 -68
  115. package/dist/browser/contexts/EmbedPluginContext/index.cjs.map +0 -1
  116. package/dist/browser/contexts/EmbedPluginContext/index.js +0 -45
  117. package/dist/browser/contexts/EmbedPluginContext/index.js.map +0 -1
  118. package/dist/browser/contexts/EmbedPluginContext/use.cjs +0 -34
  119. package/dist/browser/contexts/EmbedPluginContext/use.cjs.map +0 -1
  120. package/dist/browser/contexts/EmbedPluginContext/use.js +0 -13
  121. package/dist/browser/contexts/EmbedPluginContext/use.js.map +0 -1
  122. package/dist/browser/contexts/RefreshPayloadContext/Context.cjs +0 -28
  123. package/dist/browser/contexts/RefreshPayloadContext/Context.cjs.map +0 -1
  124. package/dist/browser/contexts/RefreshPayloadContext/Context.js +0 -7
  125. package/dist/browser/contexts/RefreshPayloadContext/Context.js.map +0 -1
  126. package/dist/browser/contexts/RefreshPayloadContext/Provider.cjs +0 -38
  127. package/dist/browser/contexts/RefreshPayloadContext/Provider.cjs.map +0 -1
  128. package/dist/browser/contexts/RefreshPayloadContext/Provider.js +0 -17
  129. package/dist/browser/contexts/RefreshPayloadContext/Provider.js.map +0 -1
  130. package/dist/browser/contexts/RefreshPayloadContext/State.cjs +0 -19
  131. package/dist/browser/contexts/RefreshPayloadContext/State.cjs.map +0 -1
  132. package/dist/browser/contexts/RefreshPayloadContext/State.js +0 -1
  133. package/dist/browser/contexts/RefreshPayloadContext/State.js.map +0 -1
  134. package/dist/browser/contexts/RefreshPayloadContext/index.cjs +0 -45
  135. package/dist/browser/contexts/RefreshPayloadContext/index.cjs.map +0 -1
  136. package/dist/browser/contexts/RefreshPayloadContext/index.js +0 -22
  137. package/dist/browser/contexts/RefreshPayloadContext/index.js.map +0 -1
  138. package/dist/browser/contexts/RefreshPayloadContext/use.cjs +0 -34
  139. package/dist/browser/contexts/RefreshPayloadContext/use.cjs.map +0 -1
  140. package/dist/browser/contexts/RefreshPayloadContext/use.js +0 -13
  141. package/dist/browser/contexts/RefreshPayloadContext/use.js.map +0 -1
  142. package/dist/browser/contexts/ResolvePayloadContext/Context.cjs +0 -28
  143. package/dist/browser/contexts/ResolvePayloadContext/Context.cjs.map +0 -1
  144. package/dist/browser/contexts/ResolvePayloadContext/Context.js +0 -7
  145. package/dist/browser/contexts/ResolvePayloadContext/Context.js.map +0 -1
  146. package/dist/browser/contexts/ResolvePayloadContext/Provider.cjs +0 -88
  147. package/dist/browser/contexts/ResolvePayloadContext/Provider.cjs.map +0 -1
  148. package/dist/browser/contexts/ResolvePayloadContext/Provider.js +0 -67
  149. package/dist/browser/contexts/ResolvePayloadContext/Provider.js.map +0 -1
  150. package/dist/browser/contexts/ResolvePayloadContext/State.cjs +0 -19
  151. package/dist/browser/contexts/ResolvePayloadContext/State.cjs.map +0 -1
  152. package/dist/browser/contexts/ResolvePayloadContext/State.js +0 -1
  153. package/dist/browser/contexts/ResolvePayloadContext/State.js.map +0 -1
  154. package/dist/browser/contexts/ResolvePayloadContext/index.cjs +0 -96
  155. package/dist/browser/contexts/ResolvePayloadContext/index.cjs.map +0 -1
  156. package/dist/browser/contexts/ResolvePayloadContext/index.js +0 -73
  157. package/dist/browser/contexts/ResolvePayloadContext/index.js.map +0 -1
  158. package/dist/browser/contexts/ResolvePayloadContext/use.cjs +0 -34
  159. package/dist/browser/contexts/ResolvePayloadContext/use.cjs.map +0 -1
  160. package/dist/browser/contexts/ResolvePayloadContext/use.js +0 -13
  161. package/dist/browser/contexts/ResolvePayloadContext/use.js.map +0 -1
  162. package/dist/browser/contexts/ValidatePayloadContext/Context.cjs +0 -28
  163. package/dist/browser/contexts/ValidatePayloadContext/Context.cjs.map +0 -1
  164. package/dist/browser/contexts/ValidatePayloadContext/Context.js +0 -7
  165. package/dist/browser/contexts/ValidatePayloadContext/Context.js.map +0 -1
  166. package/dist/browser/contexts/ValidatePayloadContext/Provider.cjs +0 -66
  167. package/dist/browser/contexts/ValidatePayloadContext/Provider.cjs.map +0 -1
  168. package/dist/browser/contexts/ValidatePayloadContext/Provider.js +0 -45
  169. package/dist/browser/contexts/ValidatePayloadContext/Provider.js.map +0 -1
  170. package/dist/browser/contexts/ValidatePayloadContext/State.cjs +0 -19
  171. package/dist/browser/contexts/ValidatePayloadContext/State.cjs.map +0 -1
  172. package/dist/browser/contexts/ValidatePayloadContext/State.js +0 -1
  173. package/dist/browser/contexts/ValidatePayloadContext/State.js.map +0 -1
  174. package/dist/browser/contexts/ValidatePayloadContext/index.cjs +0 -73
  175. package/dist/browser/contexts/ValidatePayloadContext/index.cjs.map +0 -1
  176. package/dist/browser/contexts/ValidatePayloadContext/index.js +0 -50
  177. package/dist/browser/contexts/ValidatePayloadContext/index.js.map +0 -1
  178. package/dist/browser/contexts/ValidatePayloadContext/use.cjs +0 -34
  179. package/dist/browser/contexts/ValidatePayloadContext/use.cjs.map +0 -1
  180. package/dist/browser/contexts/ValidatePayloadContext/use.js +0 -13
  181. package/dist/browser/contexts/ValidatePayloadContext/use.js.map +0 -1
  182. package/dist/browser/contexts/index.cjs +0 -189
  183. package/dist/browser/contexts/index.cjs.map +0 -1
  184. package/dist/browser/contexts/index.js +0 -166
  185. package/dist/browser/contexts/index.js.map +0 -1
  186. package/dist/browser/types/EmbedPluginProps.cjs +0 -19
  187. package/dist/browser/types/EmbedPluginProps.cjs.map +0 -1
  188. package/dist/browser/types/EmbedPluginProps.js +0 -1
  189. package/dist/browser/types/EmbedPluginProps.js.map +0 -1
  190. package/dist/browser/types/index.cjs +0 -19
  191. package/dist/browser/types/index.cjs.map +0 -1
  192. package/dist/browser/types/index.js +0 -1
  193. package/dist/browser/types/index.js.map +0 -1
  194. package/dist/docs.json +0 -4925
  195. package/dist/node/components/EmbedPlugin.cjs +0 -255
  196. package/dist/node/components/EmbedPlugin.cjs.map +0 -1
  197. package/dist/node/components/EmbedPlugin.js +0 -230
  198. package/dist/node/components/EmbedPlugin.js.map +0 -1
  199. package/dist/node/components/EmbedResolver.cjs +0 -46
  200. package/dist/node/components/EmbedResolver.cjs.map +0 -1
  201. package/dist/node/components/EmbedResolver.js +0 -21
  202. package/dist/node/components/EmbedResolver.js.map +0 -1
  203. package/dist/node/components/controls/EmbedFormControl.cjs +0 -38
  204. package/dist/node/components/controls/EmbedFormControl.cjs.map +0 -1
  205. package/dist/node/components/controls/EmbedFormControl.js +0 -13
  206. package/dist/node/components/controls/EmbedFormControl.js.map +0 -1
  207. package/dist/node/components/controls/ListModeSelect.cjs +0 -70
  208. package/dist/node/components/controls/ListModeSelect.cjs.map +0 -1
  209. package/dist/node/components/controls/ListModeSelect.js +0 -44
  210. package/dist/node/components/controls/ListModeSelect.js.map +0 -1
  211. package/dist/node/components/controls/RenderSelect.cjs +0 -58
  212. package/dist/node/components/controls/RenderSelect.cjs.map +0 -1
  213. package/dist/node/components/controls/RenderSelect.js +0 -33
  214. package/dist/node/components/controls/RenderSelect.js.map +0 -1
  215. package/dist/node/components/controls/index.cjs +0 -94
  216. package/dist/node/components/controls/index.cjs.map +0 -1
  217. package/dist/node/components/controls/index.js +0 -64
  218. package/dist/node/components/controls/index.js.map +0 -1
  219. package/dist/node/components/embed-card/EmbedCardResolver.cjs +0 -99
  220. package/dist/node/components/embed-card/EmbedCardResolver.cjs.map +0 -1
  221. package/dist/node/components/embed-card/EmbedCardResolver.js +0 -74
  222. package/dist/node/components/embed-card/EmbedCardResolver.js.map +0 -1
  223. package/dist/node/components/embed-card/EmbedPluginCard.cjs +0 -505
  224. package/dist/node/components/embed-card/EmbedPluginCard.cjs.map +0 -1
  225. package/dist/node/components/embed-card/EmbedPluginCard.js +0 -481
  226. package/dist/node/components/embed-card/EmbedPluginCard.js.map +0 -1
  227. package/dist/node/components/embed-card/card/BusyCard.cjs +0 -49
  228. package/dist/node/components/embed-card/card/BusyCard.cjs.map +0 -1
  229. package/dist/node/components/embed-card/card/BusyCard.js +0 -27
  230. package/dist/node/components/embed-card/card/BusyCard.js.map +0 -1
  231. package/dist/node/components/embed-card/card/EmbedCardHeader.cjs +0 -113
  232. package/dist/node/components/embed-card/card/EmbedCardHeader.cjs.map +0 -1
  233. package/dist/node/components/embed-card/card/EmbedCardHeader.js +0 -88
  234. package/dist/node/components/embed-card/card/EmbedCardHeader.js.map +0 -1
  235. package/dist/node/components/embed-card/card/EmbedPluginCard.cjs +0 -205
  236. package/dist/node/components/embed-card/card/EmbedPluginCard.cjs.map +0 -1
  237. package/dist/node/components/embed-card/card/EmbedPluginCard.js +0 -183
  238. package/dist/node/components/embed-card/card/EmbedPluginCard.js.map +0 -1
  239. package/dist/node/components/embed-card/card/index.cjs +0 -211
  240. package/dist/node/components/embed-card/card/index.cjs.map +0 -1
  241. package/dist/node/components/embed-card/card/index.js +0 -185
  242. package/dist/node/components/embed-card/card/index.js.map +0 -1
  243. package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs +0 -58
  244. package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs.map +0 -1
  245. package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -33
  246. package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
  247. package/dist/node/components/embed-card/error-handling/EmbedErrorCard.cjs +0 -46
  248. package/dist/node/components/embed-card/error-handling/EmbedErrorCard.cjs.map +0 -1
  249. package/dist/node/components/embed-card/error-handling/EmbedErrorCard.js +0 -21
  250. package/dist/node/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
  251. package/dist/node/components/embed-card/error-handling/index.cjs +0 -62
  252. package/dist/node/components/embed-card/error-handling/index.cjs.map +0 -1
  253. package/dist/node/components/embed-card/error-handling/index.js +0 -34
  254. package/dist/node/components/embed-card/error-handling/index.js.map +0 -1
  255. package/dist/node/components/embed-card/index.cjs +0 -513
  256. package/dist/node/components/embed-card/index.cjs.map +0 -1
  257. package/dist/node/components/embed-card/index.js +0 -484
  258. package/dist/node/components/embed-card/index.js.map +0 -1
  259. package/dist/node/components/embed-card/menu/EmbedMenu.cjs +0 -72
  260. package/dist/node/components/embed-card/menu/EmbedMenu.cjs.map +0 -1
  261. package/dist/node/components/embed-card/menu/EmbedMenu.js +0 -47
  262. package/dist/node/components/embed-card/menu/EmbedMenu.js.map +0 -1
  263. package/dist/node/components/embed-card/menu/JsonMenuItem.cjs +0 -50
  264. package/dist/node/components/embed-card/menu/JsonMenuItem.cjs.map +0 -1
  265. package/dist/node/components/embed-card/menu/JsonMenuItem.js +0 -25
  266. package/dist/node/components/embed-card/menu/JsonMenuItem.js.map +0 -1
  267. package/dist/node/components/embed-card/menu/index.cjs +0 -74
  268. package/dist/node/components/embed-card/menu/index.cjs.map +0 -1
  269. package/dist/node/components/embed-card/menu/index.js +0 -47
  270. package/dist/node/components/embed-card/menu/index.js.map +0 -1
  271. package/dist/node/components/embed-plugin-stories/storyPayload.cjs +0 -51
  272. package/dist/node/components/embed-plugin-stories/storyPayload.cjs.map +0 -1
  273. package/dist/node/components/embed-plugin-stories/storyPayload.js +0 -26
  274. package/dist/node/components/embed-plugin-stories/storyPayload.js.map +0 -1
  275. package/dist/node/components/embed-plugin-stories/storyShared.cjs +0 -520
  276. package/dist/node/components/embed-plugin-stories/storyShared.cjs.map +0 -1
  277. package/dist/node/components/embed-plugin-stories/storyShared.js +0 -497
  278. package/dist/node/components/embed-plugin-stories/storyShared.js.map +0 -1
  279. package/dist/node/components/index.cjs +0 -515
  280. package/dist/node/components/index.cjs.map +0 -1
  281. package/dist/node/components/index.js +0 -485
  282. package/dist/node/components/index.js.map +0 -1
  283. package/dist/node/components/validation-alerts/ValidatePayload.cjs +0 -53
  284. package/dist/node/components/validation-alerts/ValidatePayload.cjs.map +0 -1
  285. package/dist/node/components/validation-alerts/ValidatePayload.js +0 -28
  286. package/dist/node/components/validation-alerts/ValidatePayload.js.map +0 -1
  287. package/dist/node/components/validation-alerts/ValidatePlugins.cjs +0 -61
  288. package/dist/node/components/validation-alerts/ValidatePlugins.cjs.map +0 -1
  289. package/dist/node/components/validation-alerts/ValidatePlugins.js +0 -36
  290. package/dist/node/components/validation-alerts/ValidatePlugins.js.map +0 -1
  291. package/dist/node/components/validation-alerts/index.cjs +0 -88
  292. package/dist/node/components/validation-alerts/index.cjs.map +0 -1
  293. package/dist/node/components/validation-alerts/index.js +0 -60
  294. package/dist/node/components/validation-alerts/index.js.map +0 -1
  295. package/dist/node/contexts/EmbedPluginContext/Context.cjs +0 -32
  296. package/dist/node/contexts/EmbedPluginContext/Context.cjs.map +0 -1
  297. package/dist/node/contexts/EmbedPluginContext/Context.js +0 -7
  298. package/dist/node/contexts/EmbedPluginContext/Context.js.map +0 -1
  299. package/dist/node/contexts/EmbedPluginContext/Provider.cjs +0 -66
  300. package/dist/node/contexts/EmbedPluginContext/Provider.cjs.map +0 -1
  301. package/dist/node/contexts/EmbedPluginContext/Provider.js +0 -41
  302. package/dist/node/contexts/EmbedPluginContext/Provider.js.map +0 -1
  303. package/dist/node/contexts/EmbedPluginContext/State.cjs +0 -19
  304. package/dist/node/contexts/EmbedPluginContext/State.cjs.map +0 -1
  305. package/dist/node/contexts/EmbedPluginContext/State.js +0 -1
  306. package/dist/node/contexts/EmbedPluginContext/State.js.map +0 -1
  307. package/dist/node/contexts/EmbedPluginContext/index.cjs +0 -74
  308. package/dist/node/contexts/EmbedPluginContext/index.cjs.map +0 -1
  309. package/dist/node/contexts/EmbedPluginContext/index.js +0 -45
  310. package/dist/node/contexts/EmbedPluginContext/index.js.map +0 -1
  311. package/dist/node/contexts/EmbedPluginContext/use.cjs +0 -38
  312. package/dist/node/contexts/EmbedPluginContext/use.cjs.map +0 -1
  313. package/dist/node/contexts/EmbedPluginContext/use.js +0 -13
  314. package/dist/node/contexts/EmbedPluginContext/use.js.map +0 -1
  315. package/dist/node/contexts/RefreshPayloadContext/Context.cjs +0 -32
  316. package/dist/node/contexts/RefreshPayloadContext/Context.cjs.map +0 -1
  317. package/dist/node/contexts/RefreshPayloadContext/Context.js +0 -7
  318. package/dist/node/contexts/RefreshPayloadContext/Context.js.map +0 -1
  319. package/dist/node/contexts/RefreshPayloadContext/Provider.cjs +0 -42
  320. package/dist/node/contexts/RefreshPayloadContext/Provider.cjs.map +0 -1
  321. package/dist/node/contexts/RefreshPayloadContext/Provider.js +0 -17
  322. package/dist/node/contexts/RefreshPayloadContext/Provider.js.map +0 -1
  323. package/dist/node/contexts/RefreshPayloadContext/State.cjs +0 -19
  324. package/dist/node/contexts/RefreshPayloadContext/State.cjs.map +0 -1
  325. package/dist/node/contexts/RefreshPayloadContext/State.js +0 -1
  326. package/dist/node/contexts/RefreshPayloadContext/State.js.map +0 -1
  327. package/dist/node/contexts/RefreshPayloadContext/index.cjs +0 -50
  328. package/dist/node/contexts/RefreshPayloadContext/index.cjs.map +0 -1
  329. package/dist/node/contexts/RefreshPayloadContext/index.js +0 -22
  330. package/dist/node/contexts/RefreshPayloadContext/index.js.map +0 -1
  331. package/dist/node/contexts/RefreshPayloadContext/use.cjs +0 -38
  332. package/dist/node/contexts/RefreshPayloadContext/use.cjs.map +0 -1
  333. package/dist/node/contexts/RefreshPayloadContext/use.js +0 -13
  334. package/dist/node/contexts/RefreshPayloadContext/use.js.map +0 -1
  335. package/dist/node/contexts/ResolvePayloadContext/Context.cjs +0 -32
  336. package/dist/node/contexts/ResolvePayloadContext/Context.cjs.map +0 -1
  337. package/dist/node/contexts/ResolvePayloadContext/Context.js +0 -7
  338. package/dist/node/contexts/ResolvePayloadContext/Context.js.map +0 -1
  339. package/dist/node/contexts/ResolvePayloadContext/Provider.cjs +0 -92
  340. package/dist/node/contexts/ResolvePayloadContext/Provider.cjs.map +0 -1
  341. package/dist/node/contexts/ResolvePayloadContext/Provider.js +0 -67
  342. package/dist/node/contexts/ResolvePayloadContext/Provider.js.map +0 -1
  343. package/dist/node/contexts/ResolvePayloadContext/State.cjs +0 -19
  344. package/dist/node/contexts/ResolvePayloadContext/State.cjs.map +0 -1
  345. package/dist/node/contexts/ResolvePayloadContext/State.js +0 -1
  346. package/dist/node/contexts/ResolvePayloadContext/State.js.map +0 -1
  347. package/dist/node/contexts/ResolvePayloadContext/index.cjs +0 -102
  348. package/dist/node/contexts/ResolvePayloadContext/index.cjs.map +0 -1
  349. package/dist/node/contexts/ResolvePayloadContext/index.js +0 -73
  350. package/dist/node/contexts/ResolvePayloadContext/index.js.map +0 -1
  351. package/dist/node/contexts/ResolvePayloadContext/use.cjs +0 -38
  352. package/dist/node/contexts/ResolvePayloadContext/use.cjs.map +0 -1
  353. package/dist/node/contexts/ResolvePayloadContext/use.js +0 -13
  354. package/dist/node/contexts/ResolvePayloadContext/use.js.map +0 -1
  355. package/dist/node/contexts/ValidatePayloadContext/Context.cjs +0 -32
  356. package/dist/node/contexts/ValidatePayloadContext/Context.cjs.map +0 -1
  357. package/dist/node/contexts/ValidatePayloadContext/Context.js +0 -7
  358. package/dist/node/contexts/ValidatePayloadContext/Context.js.map +0 -1
  359. package/dist/node/contexts/ValidatePayloadContext/Provider.cjs +0 -70
  360. package/dist/node/contexts/ValidatePayloadContext/Provider.cjs.map +0 -1
  361. package/dist/node/contexts/ValidatePayloadContext/Provider.js +0 -45
  362. package/dist/node/contexts/ValidatePayloadContext/Provider.js.map +0 -1
  363. package/dist/node/contexts/ValidatePayloadContext/State.cjs +0 -19
  364. package/dist/node/contexts/ValidatePayloadContext/State.cjs.map +0 -1
  365. package/dist/node/contexts/ValidatePayloadContext/State.js +0 -1
  366. package/dist/node/contexts/ValidatePayloadContext/State.js.map +0 -1
  367. package/dist/node/contexts/ValidatePayloadContext/index.cjs +0 -78
  368. package/dist/node/contexts/ValidatePayloadContext/index.cjs.map +0 -1
  369. package/dist/node/contexts/ValidatePayloadContext/index.js +0 -50
  370. package/dist/node/contexts/ValidatePayloadContext/index.js.map +0 -1
  371. package/dist/node/contexts/ValidatePayloadContext/use.cjs +0 -38
  372. package/dist/node/contexts/ValidatePayloadContext/use.cjs.map +0 -1
  373. package/dist/node/contexts/ValidatePayloadContext/use.js +0 -13
  374. package/dist/node/contexts/ValidatePayloadContext/use.js.map +0 -1
  375. package/dist/node/contexts/index.cjs +0 -202
  376. package/dist/node/contexts/index.cjs.map +0 -1
  377. package/dist/node/contexts/index.js +0 -166
  378. package/dist/node/contexts/index.js.map +0 -1
  379. package/dist/node/types/EmbedPluginProps.cjs +0 -19
  380. package/dist/node/types/EmbedPluginProps.cjs.map +0 -1
  381. package/dist/node/types/EmbedPluginProps.js +0 -1
  382. package/dist/node/types/EmbedPluginProps.js.map +0 -1
  383. package/dist/node/types/index.cjs +0 -19
  384. package/dist/node/types/index.cjs.map +0 -1
  385. package/dist/node/types/index.js +0 -1
  386. package/dist/node/types/index.js.map +0 -1
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/contexts/ResolvePayloadContext/index.ts
21
- var ResolvePayloadContext_exports = {};
22
- __export(ResolvePayloadContext_exports, {
23
- ResolvePayloadContext: () => ResolvePayloadContext,
24
- ResolvePayloadProvider: () => ResolvePayloadProvider,
25
- useResolvePayload: () => useResolvePayload
26
- });
27
- module.exports = __toCommonJS(ResolvePayloadContext_exports);
28
-
29
- // src/contexts/ResolvePayloadContext/Context.ts
30
- var import_react_shared = require("@xyo-network/react-shared");
31
- var ResolvePayloadContext = (0, import_react_shared.createContextEx)();
32
-
33
- // src/contexts/ResolvePayloadContext/Provider.tsx
34
- var import_delay = require("@xylabs/delay");
35
- var import_react_async_effect = require("@xylabs/react-async-effect");
36
- var import_huri = require("@xyo-network/huri");
37
- var import_payload_model = require("@xyo-network/payload-model");
38
- var import_react = require("react");
39
-
40
- // src/contexts/RefreshPayloadContext/Context.tsx
41
- var import_react_shared2 = require("@xyo-network/react-shared");
42
- var RefreshPayloadContext = (0, import_react_shared2.createContextEx)();
43
-
44
- // src/contexts/RefreshPayloadContext/use.tsx
45
- var import_react_shared3 = require("@xyo-network/react-shared");
46
- var useRefreshPayload = () => (0, import_react_shared3.useContextEx)(RefreshPayloadContext, "RefreshPayload", true);
47
-
48
- // src/contexts/ResolvePayloadContext/Provider.tsx
49
- var import_jsx_runtime = require("react/jsx-runtime");
50
- var ResolvePayloadProvider = ({ children, huriPayload }) => {
51
- const [payload, setPayload] = (0, import_react.useState)();
52
- const [huri, setHuri] = (0, import_react.useState)();
53
- const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
54
- (0, import_react.useEffect)(() => {
55
- typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
56
- if (typeof huriPayload === "object") {
57
- setPayload(huriPayload);
58
- setRefreshPayload?.(true);
59
- }
60
- }, [huriPayload, setRefreshPayload]);
61
- const [notFound, setNotFound] = (0, import_react.useState)();
62
- const [huriError, setHuriError] = (0, import_react.useState)();
63
- (0, import_react_async_effect.useAsyncEffect)(
64
- // eslint-disable-next-line react-hooks/exhaustive-deps
65
- async (mounted) => {
66
- if (huri && !refreshPayload) {
67
- try {
68
- const huriInstance = new import_huri.Huri(huri);
69
- const result = await huriInstance.fetch();
70
- await (0, import_delay.delay)(500);
71
- if (mounted()) {
72
- setNotFound(result === null);
73
- setPayload(result);
74
- setRefreshPayload?.(true);
75
- }
76
- } catch (e) {
77
- const error = e;
78
- setHuriError({ message: error.message, schema: import_payload_model.ModuleErrorSchema, sources: [] });
79
- }
80
- }
81
- },
82
- [huri, payload, refreshPayload, setRefreshPayload]
83
- );
84
- const refreshHuri = () => {
85
- onRefresh?.();
86
- if (huri) {
87
- setRefreshPayload?.(false);
88
- }
89
- };
90
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResolvePayloadContext.Provider, { value: { huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }, children });
91
- };
92
-
93
- // src/contexts/ResolvePayloadContext/use.tsx
94
- var import_react_shared4 = require("@xyo-network/react-shared");
95
- var useResolvePayload = () => (0, import_react_shared4.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
96
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ResolvePayloadContext/index.ts","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/Provider.tsx","../../../../src/contexts/RefreshPayloadContext/Context.tsx","../../../../src/contexts/RefreshPayloadContext/use.tsx","../../../../src/contexts/ResolvePayloadContext/use.tsx"],"sourcesContent":["export * from './Context'\nexport * from './Provider'\nexport * from './State'\nexport * from './use'\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Huri } from '@xyo-network/huri'\nimport { ModuleError, ModuleErrorSchema, Payload } from '@xyo-network/payload-model'\nimport { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext'\nimport { ResolvePayloadContext } from './Context'\nimport { ResolvePayloadState } from './State'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<WithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload()\n\n useEffect(() => {\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<ModuleError>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n <ResolvePayloadContext.Provider value={{ huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }}>\n {children}\n </ResolvePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadState } from './State'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,0BAAgC;AAIzB,IAAM,4BAAwB,qCAAqC;;;ACJ1E,mBAAsB;AACtB,gCAA+B;AAE/B,kBAAqB;AACrB,2BAAwD;AACxD,mBAAoC;;;ACLpC,IAAAA,uBAAgC;AAIzB,IAAM,4BAAwB,sCAAqC;;;ACJ1E,IAAAC,uBAA6B;AAItB,IAAM,oBAAoB,UAAM,mCAAa,uBAAuB,kBAAkB,IAAI;;;AFyD7F;AAhDG,IAAM,yBAA8E,CAAC,EAAE,UAAU,YAAY,MAAM;AACxH,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAkB;AAChD,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAiB;AACzC,QAAM,EAAE,gBAAgB,mBAAmB,UAAU,IAAI,kBAAkB;AAE3E,8BAAU,MAAM;AACd,WAAO,gBAAgB,WAAW,QAAQ,WAAW,IAAI;AACzD,QAAI,OAAO,gBAAgB,UAAU;AACnC,iBAAW,WAAW;AACtB,0BAAoB,IAAI;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,aAAa,iBAAiB,CAAC;AAEnC,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAkB;AAClD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAsB;AAExD;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,UAAI,QAAQ,CAAC,gBAAgB;AAC3B,YAAI;AACF,gBAAM,eAAe,IAAI,iBAAK,IAAI;AAClC,gBAAM,SAAS,MAAM,aAAa,MAAM;AAExC,oBAAM,oBAAM,GAAG;AAEf,cAAI,QAAQ,GAAG;AACb,wBAAY,WAAW,IAAI;AAC3B,uBAAW,MAAM;AACjB,gCAAoB,IAAI;AAAA,UAC1B;AAAA,QACF,SAAS,GAAG;AACV,gBAAM,QAAQ;AACd,uBAAa,EAAE,SAAS,MAAM,SAAS,QAAQ,wCAAmB,SAAS,CAAC,EAAE,CAAC;AAAA,QACjF;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,MAAM,SAAS,gBAAgB,iBAAiB;AAAA,EACnD;AAEA,QAAM,cAAc,MAAM;AACxB,gBAAY;AACZ,QAAI,MAAM;AACR,0BAAoB,KAAK;AAAA,IAC3B;AAAA,EACF;AAEA,SACE,4CAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,MAAM,WAAW,UAAU,SAAS,UAAU,MAAM,aAAa,WAAW,GAClH,UACH;AAEJ;;;AGjEA,IAAAC,uBAA6B;AAItB,IAAM,oBAAoB,UAAM,mCAAa,uBAAuB,kBAAkB,IAAI;","names":["import_react_shared","import_react_shared","import_react_shared"]}
@@ -1,73 +0,0 @@
1
- // src/contexts/ResolvePayloadContext/Context.ts
2
- import { createContextEx } from "@xyo-network/react-shared";
3
- var ResolvePayloadContext = createContextEx();
4
-
5
- // src/contexts/ResolvePayloadContext/Provider.tsx
6
- import { delay } from "@xylabs/delay";
7
- import { useAsyncEffect } from "@xylabs/react-async-effect";
8
- import { Huri } from "@xyo-network/huri";
9
- import { ModuleErrorSchema } from "@xyo-network/payload-model";
10
- import { useEffect, useState } from "react";
11
-
12
- // src/contexts/RefreshPayloadContext/Context.tsx
13
- import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
14
- var RefreshPayloadContext = createContextEx2();
15
-
16
- // src/contexts/RefreshPayloadContext/use.tsx
17
- import { useContextEx } from "@xyo-network/react-shared";
18
- var useRefreshPayload = () => useContextEx(RefreshPayloadContext, "RefreshPayload", true);
19
-
20
- // src/contexts/ResolvePayloadContext/Provider.tsx
21
- import { jsx } from "react/jsx-runtime";
22
- var ResolvePayloadProvider = ({ children, huriPayload }) => {
23
- const [payload, setPayload] = useState();
24
- const [huri, setHuri] = useState();
25
- const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
26
- useEffect(() => {
27
- typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
28
- if (typeof huriPayload === "object") {
29
- setPayload(huriPayload);
30
- setRefreshPayload?.(true);
31
- }
32
- }, [huriPayload, setRefreshPayload]);
33
- const [notFound, setNotFound] = useState();
34
- const [huriError, setHuriError] = useState();
35
- useAsyncEffect(
36
- // eslint-disable-next-line react-hooks/exhaustive-deps
37
- async (mounted) => {
38
- if (huri && !refreshPayload) {
39
- try {
40
- const huriInstance = new Huri(huri);
41
- const result = await huriInstance.fetch();
42
- await delay(500);
43
- if (mounted()) {
44
- setNotFound(result === null);
45
- setPayload(result);
46
- setRefreshPayload?.(true);
47
- }
48
- } catch (e) {
49
- const error = e;
50
- setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] });
51
- }
52
- }
53
- },
54
- [huri, payload, refreshPayload, setRefreshPayload]
55
- );
56
- const refreshHuri = () => {
57
- onRefresh?.();
58
- if (huri) {
59
- setRefreshPayload?.(false);
60
- }
61
- };
62
- return /* @__PURE__ */ jsx(ResolvePayloadContext.Provider, { value: { huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }, children });
63
- };
64
-
65
- // src/contexts/ResolvePayloadContext/use.tsx
66
- import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
67
- var useResolvePayload = () => useContextEx2(ResolvePayloadContext, "ResolvePayload", true);
68
- export {
69
- ResolvePayloadContext,
70
- ResolvePayloadProvider,
71
- useResolvePayload
72
- };
73
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/Provider.tsx","../../../../src/contexts/RefreshPayloadContext/Context.tsx","../../../../src/contexts/RefreshPayloadContext/use.tsx","../../../../src/contexts/ResolvePayloadContext/use.tsx"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Huri } from '@xyo-network/huri'\nimport { ModuleError, ModuleErrorSchema, Payload } from '@xyo-network/payload-model'\nimport { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext'\nimport { ResolvePayloadContext } from './Context'\nimport { ResolvePayloadState } from './State'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<WithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload()\n\n useEffect(() => {\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<ModuleError>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n <ResolvePayloadContext.Provider value={{ huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }}>\n {children}\n </ResolvePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadState } from './State'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n"],"mappings":";AAAA,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ACJ1E,SAAS,aAAa;AACtB,SAAS,sBAAsB;AAE/B,SAAS,YAAY;AACrB,SAAsB,yBAAkC;AACxD,SAAS,WAAW,gBAAgB;;;ACLpC,SAAS,mBAAAA,wBAAuB;AAIzB,IAAM,wBAAwBA,iBAAqC;;;ACJ1E,SAAS,oBAAoB;AAItB,IAAM,oBAAoB,MAAM,aAAa,uBAAuB,kBAAkB,IAAI;;;AFyD7F;AAhDG,IAAM,yBAA8E,CAAC,EAAE,UAAU,YAAY,MAAM;AACxH,QAAM,CAAC,SAAS,UAAU,IAAI,SAAkB;AAChD,QAAM,CAAC,MAAM,OAAO,IAAI,SAAiB;AACzC,QAAM,EAAE,gBAAgB,mBAAmB,UAAU,IAAI,kBAAkB;AAE3E,YAAU,MAAM;AACd,WAAO,gBAAgB,WAAW,QAAQ,WAAW,IAAI;AACzD,QAAI,OAAO,gBAAgB,UAAU;AACnC,iBAAW,WAAW;AACtB,0BAAoB,IAAI;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,aAAa,iBAAiB,CAAC;AAEnC,QAAM,CAAC,UAAU,WAAW,IAAI,SAAkB;AAClD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAsB;AAExD;AAAA;AAAA,IAEE,OAAO,YAAY;AACjB,UAAI,QAAQ,CAAC,gBAAgB;AAC3B,YAAI;AACF,gBAAM,eAAe,IAAI,KAAK,IAAI;AAClC,gBAAM,SAAS,MAAM,aAAa,MAAM;AAExC,gBAAM,MAAM,GAAG;AAEf,cAAI,QAAQ,GAAG;AACb,wBAAY,WAAW,IAAI;AAC3B,uBAAW,MAAM;AACjB,gCAAoB,IAAI;AAAA,UAC1B;AAAA,QACF,SAAS,GAAG;AACV,gBAAM,QAAQ;AACd,uBAAa,EAAE,SAAS,MAAM,SAAS,QAAQ,mBAAmB,SAAS,CAAC,EAAE,CAAC;AAAA,QACjF;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,MAAM,SAAS,gBAAgB,iBAAiB;AAAA,EACnD;AAEA,QAAM,cAAc,MAAM;AACxB,gBAAY;AACZ,QAAI,MAAM;AACR,0BAAoB,KAAK;AAAA,IAC3B;AAAA,EACF;AAEA,SACE,oBAAC,sBAAsB,UAAtB,EAA+B,OAAO,EAAE,MAAM,WAAW,UAAU,SAAS,UAAU,MAAM,aAAa,WAAW,GAClH,UACH;AAEJ;;;AGjEA,SAAS,gBAAAC,qBAAoB;AAItB,IAAM,oBAAoB,MAAMC,cAAa,uBAAuB,kBAAkB,IAAI;","names":["createContextEx","useContextEx","useContextEx"]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/contexts/ResolvePayloadContext/use.tsx
21
- var use_exports = {};
22
- __export(use_exports, {
23
- useResolvePayload: () => useResolvePayload
24
- });
25
- module.exports = __toCommonJS(use_exports);
26
- var import_react_shared2 = require("@xyo-network/react-shared");
27
-
28
- // src/contexts/ResolvePayloadContext/Context.ts
29
- var import_react_shared = require("@xyo-network/react-shared");
30
- var ResolvePayloadContext = (0, import_react_shared.createContextEx)();
31
-
32
- // src/contexts/ResolvePayloadContext/use.tsx
33
- var useResolvePayload = () => (0, import_react_shared2.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
34
- //# sourceMappingURL=use.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts"],"sourcesContent":["import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,uBAA6B;;;ACA7B,0BAAgC;AAIzB,IAAM,4BAAwB,qCAAqC;;;ADAnE,IAAM,oBAAoB,UAAM,mCAAa,uBAAuB,kBAAkB,IAAI;","names":["import_react_shared"]}
@@ -1,13 +0,0 @@
1
- // src/contexts/ResolvePayloadContext/use.tsx
2
- import { useContextEx } from "@xyo-network/react-shared";
3
-
4
- // src/contexts/ResolvePayloadContext/Context.ts
5
- import { createContextEx } from "@xyo-network/react-shared";
6
- var ResolvePayloadContext = createContextEx();
7
-
8
- // src/contexts/ResolvePayloadContext/use.tsx
9
- var useResolvePayload = () => useContextEx(ResolvePayloadContext, "ResolvePayload", true);
10
- export {
11
- useResolvePayload
12
- };
13
- //# sourceMappingURL=use.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts"],"sourcesContent":["import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n"],"mappings":";AAAA,SAAS,oBAAoB;;;ACA7B,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ADAnE,IAAM,oBAAoB,MAAM,aAAa,uBAAuB,kBAAkB,IAAI;","names":[]}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/contexts/ValidatePayloadContext/Context.ts
21
- var Context_exports = {};
22
- __export(Context_exports, {
23
- ValidatePayloadContext: () => ValidatePayloadContext
24
- });
25
- module.exports = __toCommonJS(Context_exports);
26
- var import_react_shared = require("@xyo-network/react-shared");
27
- var ValidatePayloadContext = (0, import_react_shared.createContextEx)();
28
- //# sourceMappingURL=Context.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgC;AAIzB,IAAM,6BAAyB,qCAAsC;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/contexts/ValidatePayloadContext/Context.ts
2
- import { createContextEx } from "@xyo-network/react-shared";
3
- var ValidatePayloadContext = createContextEx();
4
- export {
5
- ValidatePayloadContext
6
- };
7
- //# sourceMappingURL=Context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n"],"mappings":";AAAA,SAAS,uBAAuB;AAIzB,IAAM,yBAAyB,gBAAsC;","names":[]}
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/contexts/ValidatePayloadContext/Provider.tsx
21
- var Provider_exports = {};
22
- __export(Provider_exports, {
23
- ValidatePayloadProvider: () => ValidatePayloadProvider
24
- });
25
- module.exports = __toCommonJS(Provider_exports);
26
- var import_material = require("@mui/material");
27
- var import_react_async_effect = require("@xylabs/react-async-effect");
28
- var import_schema_cache = require("@xyo-network/schema-cache");
29
- var import_react = require("react");
30
-
31
- // src/contexts/ResolvePayloadContext/Context.ts
32
- var import_react_shared = require("@xyo-network/react-shared");
33
- var ResolvePayloadContext = (0, import_react_shared.createContextEx)();
34
-
35
- // src/contexts/ResolvePayloadContext/use.tsx
36
- var import_react_shared2 = require("@xyo-network/react-shared");
37
- var useResolvePayload = () => (0, import_react_shared2.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
38
-
39
- // src/contexts/ValidatePayloadContext/Context.ts
40
- var import_react_shared3 = require("@xyo-network/react-shared");
41
- var ValidatePayloadContext = (0, import_react_shared3.createContextEx)();
42
-
43
- // src/contexts/ValidatePayloadContext/Provider.tsx
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var ValidatePayloadProvider = ({ children, enabled = false }) => {
46
- const { payload } = useResolvePayload();
47
- const [initialized, setInitialized] = (0, import_react.useState)(false);
48
- const [valid, setValid] = (0, import_react.useState)();
49
- (0, import_react_async_effect.useAsyncEffect)(
50
- // eslint-disable-next-line react-hooks/exhaustive-deps
51
- async () => {
52
- if (payload && enabled) {
53
- await import_schema_cache.SchemaCache.instance.get(payload.schema);
54
- const possibleKnownSchema = payload.schema;
55
- if (import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema]) {
56
- const validator = import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema];
57
- setValid(validator?.(payload));
58
- }
59
- setInitialized(true);
60
- }
61
- },
62
- [payload, enabled]
63
- );
64
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: initialized ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { label: "Validating Payload..." }) }) : children });
65
- };
66
- //# sourceMappingURL=Provider.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/Provider.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ValidatePayloadContext/Context.ts"],"sourcesContent":["import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</> : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,gCAA+B;AAE/B,0BAAsD;AACtD,mBAAyB;;;ACJzB,0BAAgC;AAIzB,IAAM,4BAAwB,qCAAqC;;;ACJ1E,IAAAA,uBAA6B;AAItB,IAAM,oBAAoB,UAAM,mCAAa,uBAAuB,kBAAkB,IAAI;;;ACJjG,IAAAC,uBAAgC;AAIzB,IAAM,6BAAyB,sCAAsC;;;AHmC3D;AAzBV,IAAM,0BAAgF,CAAC,EAAE,UAAU,UAAU,MAAM,MAAM;AAC9H,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAkB;AAE5C;AAAA;AAAA,IAEE,YAAY;AACV,UAAI,WAAW,SAAS;AACtB,cAAM,gCAAY,SAAS,IAAI,QAAQ,MAAM;AAE7C,cAAM,sBAAsB,QAAQ;AAEpC,YAAI,gCAAY,SAAS,WAAW,mBAAmB,GAAG;AACxD,gBAAM,YAAY,gCAAY,SAAS,WAAW,mBAAmB;AACrE,mBAAS,YAAY,OAAO,CAAC;AAAA,QAC/B;AACA,uBAAe,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,IACA,CAAC,SAAS,OAAO;AAAA,EACnB;AAEA,SACE,4CAAC,uBAAuB,UAAvB,EAAgC,OAAO,EAAE,SAAS,UAAU,MAAM,QAAQ,SAAS,QAAQ,cAAc,MAAM,GAC7G,oBAAU,2EAAG,wBAAc,WAAW,4CAAC,wBAAK,OAAM,yBAAwB,GAAG,IAAM,UACtF;AAEJ;","names":["import_react_shared","import_react_shared"]}
@@ -1,45 +0,0 @@
1
- // src/contexts/ValidatePayloadContext/Provider.tsx
2
- import { Chip } from "@mui/material";
3
- import { useAsyncEffect } from "@xylabs/react-async-effect";
4
- import { SchemaCache } from "@xyo-network/schema-cache";
5
- import { useState } from "react";
6
-
7
- // src/contexts/ResolvePayloadContext/Context.ts
8
- import { createContextEx } from "@xyo-network/react-shared";
9
- var ResolvePayloadContext = createContextEx();
10
-
11
- // src/contexts/ResolvePayloadContext/use.tsx
12
- import { useContextEx } from "@xyo-network/react-shared";
13
- var useResolvePayload = () => useContextEx(ResolvePayloadContext, "ResolvePayload", true);
14
-
15
- // src/contexts/ValidatePayloadContext/Context.ts
16
- import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
17
- var ValidatePayloadContext = createContextEx2();
18
-
19
- // src/contexts/ValidatePayloadContext/Provider.tsx
20
- import { Fragment, jsx } from "react/jsx-runtime";
21
- var ValidatePayloadProvider = ({ children, enabled = false }) => {
22
- const { payload } = useResolvePayload();
23
- const [initialized, setInitialized] = useState(false);
24
- const [valid, setValid] = useState();
25
- useAsyncEffect(
26
- // eslint-disable-next-line react-hooks/exhaustive-deps
27
- async () => {
28
- if (payload && enabled) {
29
- await SchemaCache.instance.get(payload.schema);
30
- const possibleKnownSchema = payload.schema;
31
- if (SchemaCache.instance.validators[possibleKnownSchema]) {
32
- const validator = SchemaCache.instance.validators[possibleKnownSchema];
33
- setValid(validator?.(payload));
34
- }
35
- setInitialized(true);
36
- }
37
- },
38
- [payload, enabled]
39
- );
40
- return /* @__PURE__ */ jsx(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ jsx(Fragment, { children: initialized ? children : /* @__PURE__ */ jsx(Chip, { label: "Validating Payload..." }) }) : children });
41
- };
42
- export {
43
- ValidatePayloadProvider
44
- };
45
- //# sourceMappingURL=Provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/Provider.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ValidatePayloadContext/Context.ts"],"sourcesContent":["import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</> : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAE/B,SAAS,mBAA6C;AACtD,SAAS,gBAAgB;;;ACJzB,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ACJ1E,SAAS,oBAAoB;AAItB,IAAM,oBAAoB,MAAM,aAAa,uBAAuB,kBAAkB,IAAI;;;ACJjG,SAAS,mBAAAA,wBAAuB;AAIzB,IAAM,yBAAyBA,iBAAsC;;;AHmC3D,mBAA4B,WAA5B;AAzBV,IAAM,0BAAgF,CAAC,EAAE,UAAU,UAAU,MAAM,MAAM;AAC9H,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAkB;AAE5C;AAAA;AAAA,IAEE,YAAY;AACV,UAAI,WAAW,SAAS;AACtB,cAAM,YAAY,SAAS,IAAI,QAAQ,MAAM;AAE7C,cAAM,sBAAsB,QAAQ;AAEpC,YAAI,YAAY,SAAS,WAAW,mBAAmB,GAAG;AACxD,gBAAM,YAAY,YAAY,SAAS,WAAW,mBAAmB;AACrE,mBAAS,YAAY,OAAO,CAAC;AAAA,QAC/B;AACA,uBAAe,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,IACA,CAAC,SAAS,OAAO;AAAA,EACnB;AAEA,SACE,oBAAC,uBAAuB,UAAvB,EAAgC,OAAO,EAAE,SAAS,UAAU,MAAM,QAAQ,SAAS,QAAQ,cAAc,MAAM,GAC7G,oBAAU,gCAAG,wBAAc,WAAW,oBAAC,QAAK,OAAM,yBAAwB,GAAG,IAAM,UACtF;AAEJ;","names":["createContextEx"]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/contexts/ValidatePayloadContext/State.ts
17
- var State_exports = {};
18
- module.exports = __toCommonJS(State_exports);
19
- //# sourceMappingURL=State.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/State.ts"],"sourcesContent":["import { ContextExState } from '@xyo-network/react-shared'\n\nexport interface ValidatePayloadState extends ContextExState {\n enabled?: boolean\n schema?: string\n validPayload?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=State.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/contexts/ValidatePayloadContext/index.ts
21
- var ValidatePayloadContext_exports = {};
22
- __export(ValidatePayloadContext_exports, {
23
- ValidatePayloadProvider: () => ValidatePayloadProvider,
24
- useValidatePayload: () => useValidatePayload
25
- });
26
- module.exports = __toCommonJS(ValidatePayloadContext_exports);
27
-
28
- // src/contexts/ValidatePayloadContext/Provider.tsx
29
- var import_material = require("@mui/material");
30
- var import_react_async_effect = require("@xylabs/react-async-effect");
31
- var import_schema_cache = require("@xyo-network/schema-cache");
32
- var import_react = require("react");
33
-
34
- // src/contexts/ResolvePayloadContext/Context.ts
35
- var import_react_shared = require("@xyo-network/react-shared");
36
- var ResolvePayloadContext = (0, import_react_shared.createContextEx)();
37
-
38
- // src/contexts/ResolvePayloadContext/use.tsx
39
- var import_react_shared2 = require("@xyo-network/react-shared");
40
- var useResolvePayload = () => (0, import_react_shared2.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
41
-
42
- // src/contexts/ValidatePayloadContext/Context.ts
43
- var import_react_shared3 = require("@xyo-network/react-shared");
44
- var ValidatePayloadContext = (0, import_react_shared3.createContextEx)();
45
-
46
- // src/contexts/ValidatePayloadContext/Provider.tsx
47
- var import_jsx_runtime = require("react/jsx-runtime");
48
- var ValidatePayloadProvider = ({ children, enabled = false }) => {
49
- const { payload } = useResolvePayload();
50
- const [initialized, setInitialized] = (0, import_react.useState)(false);
51
- const [valid, setValid] = (0, import_react.useState)();
52
- (0, import_react_async_effect.useAsyncEffect)(
53
- // eslint-disable-next-line react-hooks/exhaustive-deps
54
- async () => {
55
- if (payload && enabled) {
56
- await import_schema_cache.SchemaCache.instance.get(payload.schema);
57
- const possibleKnownSchema = payload.schema;
58
- if (import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema]) {
59
- const validator = import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema];
60
- setValid(validator?.(payload));
61
- }
62
- setInitialized(true);
63
- }
64
- },
65
- [payload, enabled]
66
- );
67
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: initialized ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { label: "Validating Payload..." }) }) : children });
68
- };
69
-
70
- // src/contexts/ValidatePayloadContext/use.tsx
71
- var import_react_shared4 = require("@xyo-network/react-shared");
72
- var useValidatePayload = () => (0, import_react_shared4.useContextEx)(ValidatePayloadContext, "ValidateSchema", true);
73
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/index.ts","../../../../src/contexts/ValidatePayloadContext/Provider.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ValidatePayloadContext/Context.ts","../../../../src/contexts/ValidatePayloadContext/use.tsx"],"sourcesContent":["export * from './Provider'\nexport * from './State'\nexport * from './use'\n","import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</> : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadContext } from './Context'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAqB;AACrB,gCAA+B;AAE/B,0BAAsD;AACtD,mBAAyB;;;ACJzB,0BAAgC;AAIzB,IAAM,4BAAwB,qCAAqC;;;ACJ1E,IAAAA,uBAA6B;AAItB,IAAM,oBAAoB,UAAM,mCAAa,uBAAuB,kBAAkB,IAAI;;;ACJjG,IAAAC,uBAAgC;AAIzB,IAAM,6BAAyB,sCAAsC;;;AHmC3D;AAzBV,IAAM,0BAAgF,CAAC,EAAE,UAAU,UAAU,MAAM,MAAM;AAC9H,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAkB;AAE5C;AAAA;AAAA,IAEE,YAAY;AACV,UAAI,WAAW,SAAS;AACtB,cAAM,gCAAY,SAAS,IAAI,QAAQ,MAAM;AAE7C,cAAM,sBAAsB,QAAQ;AAEpC,YAAI,gCAAY,SAAS,WAAW,mBAAmB,GAAG;AACxD,gBAAM,YAAY,gCAAY,SAAS,WAAW,mBAAmB;AACrE,mBAAS,YAAY,OAAO,CAAC;AAAA,QAC/B;AACA,uBAAe,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,IACA,CAAC,SAAS,OAAO;AAAA,EACnB;AAEA,SACE,4CAAC,uBAAuB,UAAvB,EAAgC,OAAO,EAAE,SAAS,UAAU,MAAM,QAAQ,SAAS,QAAQ,cAAc,MAAM,GAC7G,oBAAU,2EAAG,wBAAc,WAAW,4CAAC,wBAAK,OAAM,yBAAwB,GAAG,IAAM,UACtF;AAEJ;;;AI1CA,IAAAC,uBAA6B;AAItB,IAAM,qBAAqB,UAAM,mCAAa,wBAAwB,kBAAkB,IAAI;","names":["import_react_shared","import_react_shared","import_react_shared"]}
@@ -1,50 +0,0 @@
1
- // src/contexts/ValidatePayloadContext/Provider.tsx
2
- import { Chip } from "@mui/material";
3
- import { useAsyncEffect } from "@xylabs/react-async-effect";
4
- import { SchemaCache } from "@xyo-network/schema-cache";
5
- import { useState } from "react";
6
-
7
- // src/contexts/ResolvePayloadContext/Context.ts
8
- import { createContextEx } from "@xyo-network/react-shared";
9
- var ResolvePayloadContext = createContextEx();
10
-
11
- // src/contexts/ResolvePayloadContext/use.tsx
12
- import { useContextEx } from "@xyo-network/react-shared";
13
- var useResolvePayload = () => useContextEx(ResolvePayloadContext, "ResolvePayload", true);
14
-
15
- // src/contexts/ValidatePayloadContext/Context.ts
16
- import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
17
- var ValidatePayloadContext = createContextEx2();
18
-
19
- // src/contexts/ValidatePayloadContext/Provider.tsx
20
- import { Fragment, jsx } from "react/jsx-runtime";
21
- var ValidatePayloadProvider = ({ children, enabled = false }) => {
22
- const { payload } = useResolvePayload();
23
- const [initialized, setInitialized] = useState(false);
24
- const [valid, setValid] = useState();
25
- useAsyncEffect(
26
- // eslint-disable-next-line react-hooks/exhaustive-deps
27
- async () => {
28
- if (payload && enabled) {
29
- await SchemaCache.instance.get(payload.schema);
30
- const possibleKnownSchema = payload.schema;
31
- if (SchemaCache.instance.validators[possibleKnownSchema]) {
32
- const validator = SchemaCache.instance.validators[possibleKnownSchema];
33
- setValid(validator?.(payload));
34
- }
35
- setInitialized(true);
36
- }
37
- },
38
- [payload, enabled]
39
- );
40
- return /* @__PURE__ */ jsx(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ jsx(Fragment, { children: initialized ? children : /* @__PURE__ */ jsx(Chip, { label: "Validating Payload..." }) }) : children });
41
- };
42
-
43
- // src/contexts/ValidatePayloadContext/use.tsx
44
- import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
45
- var useValidatePayload = () => useContextEx2(ValidatePayloadContext, "ValidateSchema", true);
46
- export {
47
- ValidatePayloadProvider,
48
- useValidatePayload
49
- };
50
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/contexts/ValidatePayloadContext/Provider.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/contexts/ValidatePayloadContext/Context.ts","../../../../src/contexts/ValidatePayloadContext/use.tsx"],"sourcesContent":["import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</> : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadContext } from './Context'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAE/B,SAAS,mBAA6C;AACtD,SAAS,gBAAgB;;;ACJzB,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ACJ1E,SAAS,oBAAoB;AAItB,IAAM,oBAAoB,MAAM,aAAa,uBAAuB,kBAAkB,IAAI;;;ACJjG,SAAS,mBAAAA,wBAAuB;AAIzB,IAAM,yBAAyBA,iBAAsC;;;AHmC3D,mBAA4B,WAA5B;AAzBV,IAAM,0BAAgF,CAAC,EAAE,UAAU,UAAU,MAAM,MAAM;AAC9H,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAkB;AAE5C;AAAA;AAAA,IAEE,YAAY;AACV,UAAI,WAAW,SAAS;AACtB,cAAM,YAAY,SAAS,IAAI,QAAQ,MAAM;AAE7C,cAAM,sBAAsB,QAAQ;AAEpC,YAAI,YAAY,SAAS,WAAW,mBAAmB,GAAG;AACxD,gBAAM,YAAY,YAAY,SAAS,WAAW,mBAAmB;AACrE,mBAAS,YAAY,OAAO,CAAC;AAAA,QAC/B;AACA,uBAAe,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,IACA,CAAC,SAAS,OAAO;AAAA,EACnB;AAEA,SACE,oBAAC,uBAAuB,UAAvB,EAAgC,OAAO,EAAE,SAAS,UAAU,MAAM,QAAQ,SAAS,QAAQ,cAAc,MAAM,GAC7G,oBAAU,gCAAG,wBAAc,WAAW,oBAAC,QAAK,OAAM,yBAAwB,GAAG,IAAM,UACtF;AAEJ;;;AI1CA,SAAS,gBAAAC,qBAAoB;AAItB,IAAM,qBAAqB,MAAMC,cAAa,wBAAwB,kBAAkB,IAAI;","names":["createContextEx","useContextEx","useContextEx"]}