@xyo-network/react-embed 2.60.12 → 2.62.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (445) hide show
  1. package/dist/components/EmbedPlugin.d.mts.map +1 -0
  2. package/dist/components/EmbedPlugin.d.ts +5 -0
  3. package/dist/components/EmbedPlugin.d.ts.map +1 -0
  4. package/dist/components/EmbedResolver.d.mts.map +1 -0
  5. package/dist/components/EmbedResolver.d.ts +4 -0
  6. package/dist/components/EmbedResolver.d.ts.map +1 -0
  7. package/dist/components/controls/EmbedFormControl.d.mts.map +1 -0
  8. package/dist/components/controls/EmbedFormControl.d.ts +10 -0
  9. package/dist/components/controls/EmbedFormControl.d.ts.map +1 -0
  10. package/dist/components/controls/ListModeSelect.d.mts.map +1 -0
  11. package/dist/components/controls/ListModeSelect.d.ts +6 -0
  12. package/dist/components/controls/ListModeSelect.d.ts.map +1 -0
  13. package/dist/components/controls/RenderSelect.d.mts.map +1 -0
  14. package/dist/components/controls/RenderSelect.d.ts +4 -0
  15. package/dist/components/controls/RenderSelect.d.ts.map +1 -0
  16. package/dist/components/controls/index.d.mts.map +1 -0
  17. package/dist/{esm/components/controls/index.js → components/controls/index.d.ts} +1 -1
  18. package/dist/components/controls/index.d.ts.map +1 -0
  19. package/dist/components/embed-card/EmbedCardResolver.d.mts.map +1 -0
  20. package/dist/components/embed-card/EmbedCardResolver.d.ts +5 -0
  21. package/dist/components/embed-card/EmbedCardResolver.d.ts.map +1 -0
  22. package/dist/components/embed-card/EmbedPluginCard.d.mts.map +1 -0
  23. package/dist/components/embed-card/EmbedPluginCard.d.ts +11 -0
  24. package/dist/components/embed-card/EmbedPluginCard.d.ts.map +1 -0
  25. package/dist/components/embed-card/card/BusyCard.d.mts.map +1 -0
  26. package/dist/components/embed-card/card/BusyCard.d.ts +11 -0
  27. package/dist/components/embed-card/card/BusyCard.d.ts.map +1 -0
  28. package/dist/components/embed-card/card/EmbedCardHeader.d.mts.map +1 -0
  29. package/dist/components/embed-card/card/EmbedCardHeader.d.ts +4 -0
  30. package/dist/components/embed-card/card/EmbedCardHeader.d.ts.map +1 -0
  31. package/dist/components/embed-card/card/EmbedPluginCard.d.mts.map +1 -0
  32. package/dist/components/embed-card/card/EmbedPluginCard.d.ts +4 -0
  33. package/dist/components/embed-card/card/EmbedPluginCard.d.ts.map +1 -0
  34. package/dist/components/embed-card/card/index.d.mts.map +1 -0
  35. package/dist/{esm/components/embed-card/card/index.js → components/embed-card/card/index.d.ts} +1 -1
  36. package/dist/components/embed-card/card/index.d.ts.map +1 -0
  37. package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts.map +1 -0
  38. package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts +10 -0
  39. package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +1 -0
  40. package/dist/components/embed-card/error-handling/EmbedErrorCard.d.mts.map +1 -0
  41. package/dist/components/embed-card/error-handling/EmbedErrorCard.d.ts +15 -0
  42. package/dist/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +1 -0
  43. package/dist/components/embed-card/error-handling/index.d.mts.map +1 -0
  44. package/dist/{esm/components/embed-card/error-handling/index.js → components/embed-card/error-handling/index.d.ts} +1 -1
  45. package/dist/components/embed-card/error-handling/index.d.ts.map +1 -0
  46. package/dist/components/embed-card/index.d.mts.map +1 -0
  47. package/dist/{esm/components/embed-card/index.js → components/embed-card/index.d.ts} +1 -1
  48. package/dist/components/embed-card/index.d.ts.map +1 -0
  49. package/dist/components/embed-card/menu/EmbedMenu.d.mts.map +1 -0
  50. package/dist/components/embed-card/menu/EmbedMenu.d.ts +4 -0
  51. package/dist/components/embed-card/menu/EmbedMenu.d.ts.map +1 -0
  52. package/dist/components/embed-card/menu/JsonMenuItem.d.mts.map +1 -0
  53. package/dist/components/embed-card/menu/JsonMenuItem.d.ts +4 -0
  54. package/dist/components/embed-card/menu/JsonMenuItem.d.ts.map +1 -0
  55. package/dist/components/embed-card/menu/index.d.mts.map +1 -0
  56. package/dist/components/embed-card/menu/index.d.ts +2 -0
  57. package/dist/components/embed-card/menu/index.d.ts.map +1 -0
  58. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts +6 -0
  59. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts.map +1 -0
  60. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts +6 -0
  61. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts.map +1 -0
  62. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts +11 -0
  63. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts.map +1 -0
  64. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts +11 -0
  65. package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts.map +1 -0
  66. package/dist/components/embed-plugin-stories/storyPayload.d.mts.map +1 -0
  67. package/dist/components/embed-plugin-stories/storyPayload.d.ts +126 -0
  68. package/dist/components/embed-plugin-stories/storyPayload.d.ts.map +1 -0
  69. package/dist/components/embed-plugin-stories/storyShared.d.mts.map +1 -0
  70. package/dist/components/embed-plugin-stories/storyShared.d.ts +5 -0
  71. package/dist/components/embed-plugin-stories/storyShared.d.ts.map +1 -0
  72. package/dist/components/index.d.mts.map +1 -0
  73. package/dist/{esm/components/index.js → components/index.d.ts} +1 -1
  74. package/dist/components/index.d.ts.map +1 -0
  75. package/dist/components/validation-alerts/ValidatePayload.d.mts.map +1 -0
  76. package/dist/components/validation-alerts/ValidatePayload.d.ts +5 -0
  77. package/dist/components/validation-alerts/ValidatePayload.d.ts.map +1 -0
  78. package/dist/components/validation-alerts/ValidatePlugins.d.mts.map +1 -0
  79. package/dist/components/validation-alerts/ValidatePlugins.d.ts +5 -0
  80. package/dist/components/validation-alerts/ValidatePlugins.d.ts.map +1 -0
  81. package/dist/components/validation-alerts/index.d.mts.map +1 -0
  82. package/dist/{esm/components/validation-alerts/index.js → components/validation-alerts/index.d.ts} +1 -1
  83. package/dist/components/validation-alerts/index.d.ts.map +1 -0
  84. package/dist/contexts/EmbedPluginContext/Context.d.mts.map +1 -0
  85. package/dist/contexts/EmbedPluginContext/Context.d.ts +4 -0
  86. package/dist/contexts/EmbedPluginContext/Context.d.ts.map +1 -0
  87. package/dist/contexts/EmbedPluginContext/Provider.d.mts.map +1 -0
  88. package/dist/contexts/EmbedPluginContext/Provider.d.ts +7 -0
  89. package/dist/contexts/EmbedPluginContext/Provider.d.ts.map +1 -0
  90. package/dist/contexts/EmbedPluginContext/State.d.mts.map +1 -0
  91. package/dist/contexts/EmbedPluginContext/State.d.ts +33 -0
  92. package/dist/contexts/EmbedPluginContext/State.d.ts.map +1 -0
  93. package/dist/contexts/EmbedPluginContext/index.d.mts.map +1 -0
  94. package/dist/contexts/EmbedPluginContext/index.d.ts.map +1 -0
  95. package/dist/contexts/EmbedPluginContext/use.d.mts.map +1 -0
  96. package/dist/contexts/EmbedPluginContext/use.d.ts +2 -0
  97. package/dist/contexts/EmbedPluginContext/use.d.ts.map +1 -0
  98. package/dist/contexts/RefreshPayloadContext/Context.d.mts.map +1 -0
  99. package/dist/contexts/RefreshPayloadContext/Context.d.ts +4 -0
  100. package/dist/contexts/RefreshPayloadContext/Context.d.ts.map +1 -0
  101. package/dist/contexts/RefreshPayloadContext/Provider.d.mts.map +1 -0
  102. package/dist/contexts/RefreshPayloadContext/Provider.d.ts +8 -0
  103. package/dist/contexts/RefreshPayloadContext/Provider.d.ts.map +1 -0
  104. package/dist/contexts/RefreshPayloadContext/State.d.mts.map +1 -0
  105. package/dist/contexts/RefreshPayloadContext/State.d.ts +8 -0
  106. package/dist/contexts/RefreshPayloadContext/State.d.ts.map +1 -0
  107. package/dist/contexts/RefreshPayloadContext/index.d.mts.map +1 -0
  108. package/dist/contexts/RefreshPayloadContext/index.d.ts.map +1 -0
  109. package/dist/contexts/RefreshPayloadContext/use.d.mts.map +1 -0
  110. package/dist/contexts/RefreshPayloadContext/use.d.ts +2 -0
  111. package/dist/contexts/RefreshPayloadContext/use.d.ts.map +1 -0
  112. package/dist/contexts/ResolvePayloadContext/Context.d.mts.map +1 -0
  113. package/dist/contexts/ResolvePayloadContext/Context.d.ts +4 -0
  114. package/dist/contexts/ResolvePayloadContext/Context.d.ts.map +1 -0
  115. package/dist/contexts/ResolvePayloadContext/Provider.d.mts.map +1 -0
  116. package/dist/contexts/ResolvePayloadContext/Provider.d.ts +6 -0
  117. package/dist/contexts/ResolvePayloadContext/Provider.d.ts.map +1 -0
  118. package/dist/contexts/ResolvePayloadContext/State.d.mts.map +1 -0
  119. package/dist/contexts/ResolvePayloadContext/State.d.ts +13 -0
  120. package/dist/contexts/ResolvePayloadContext/State.d.ts.map +1 -0
  121. package/dist/{esm/contexts/EmbedPluginContext/index.js → contexts/ResolvePayloadContext/index.d.mts} +1 -1
  122. package/dist/contexts/ResolvePayloadContext/index.d.mts.map +1 -0
  123. package/dist/{esm/contexts/ResolvePayloadContext/index.js → contexts/ResolvePayloadContext/index.d.ts} +1 -1
  124. package/dist/{types/contexts/EmbedPluginContext → contexts/ResolvePayloadContext}/index.d.ts.map +1 -1
  125. package/dist/contexts/ResolvePayloadContext/use.d.mts.map +1 -0
  126. package/dist/contexts/ResolvePayloadContext/use.d.ts +2 -0
  127. package/dist/contexts/ResolvePayloadContext/use.d.ts.map +1 -0
  128. package/dist/contexts/ValidatePayloadContext/Context.d.mts.map +1 -0
  129. package/dist/contexts/ValidatePayloadContext/Context.d.ts +4 -0
  130. package/dist/contexts/ValidatePayloadContext/Context.d.ts.map +1 -0
  131. package/dist/contexts/ValidatePayloadContext/Provider.d.mts.map +1 -0
  132. package/dist/contexts/ValidatePayloadContext/Provider.d.ts +7 -0
  133. package/dist/contexts/ValidatePayloadContext/Provider.d.ts.map +1 -0
  134. package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts +15 -0
  135. package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts.map +1 -0
  136. package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts +15 -0
  137. package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts.map +1 -0
  138. package/dist/contexts/ValidatePayloadContext/State.d.mts.map +1 -0
  139. package/dist/contexts/ValidatePayloadContext/State.d.ts +7 -0
  140. package/dist/contexts/ValidatePayloadContext/State.d.ts.map +1 -0
  141. package/dist/{esm/contexts/RefreshPayloadContext/index.js → contexts/ValidatePayloadContext/index.d.mts} +1 -1
  142. package/dist/contexts/ValidatePayloadContext/index.d.mts.map +1 -0
  143. package/dist/{esm/contexts/ValidatePayloadContext/index.js → contexts/ValidatePayloadContext/index.d.ts} +1 -1
  144. package/dist/contexts/ValidatePayloadContext/index.d.ts.map +1 -0
  145. package/dist/contexts/ValidatePayloadContext/use.d.mts.map +1 -0
  146. package/dist/contexts/ValidatePayloadContext/use.d.ts +2 -0
  147. package/dist/contexts/ValidatePayloadContext/use.d.ts.map +1 -0
  148. package/dist/contexts/index.d.mts.map +1 -0
  149. package/dist/{esm/contexts/index.js → contexts/index.d.ts} +1 -1
  150. package/dist/contexts/index.d.ts.map +1 -0
  151. package/dist/docs.json +290 -426
  152. package/dist/{esm/index.js → index.d.mts} +1 -1
  153. package/dist/index.d.mts.map +1 -0
  154. package/dist/index.d.ts +4 -0
  155. package/dist/index.d.ts.map +1 -0
  156. package/dist/index.js +543 -0
  157. package/dist/index.js.map +1 -0
  158. package/dist/index.mjs +493 -0
  159. package/dist/index.mjs.map +1 -0
  160. package/dist/types/EmbedPluginProps.d.mts.map +1 -0
  161. package/dist/types/EmbedPluginProps.d.ts +10 -0
  162. package/dist/types/EmbedPluginProps.d.ts.map +1 -0
  163. package/dist/types/index.d.mts.map +1 -0
  164. package/dist/types/index.d.ts +1 -3
  165. package/dist/types/index.d.ts.map +1 -1
  166. package/package.json +37 -29
  167. package/dist/cjs/components/EmbedPlugin.js +0 -19
  168. package/dist/cjs/components/EmbedPlugin.js.map +0 -1
  169. package/dist/cjs/components/EmbedResolver.js +0 -12
  170. package/dist/cjs/components/EmbedResolver.js.map +0 -1
  171. package/dist/cjs/components/controls/EmbedFormControl.js +0 -12
  172. package/dist/cjs/components/controls/EmbedFormControl.js.map +0 -1
  173. package/dist/cjs/components/controls/ListModeSelect.js +0 -21
  174. package/dist/cjs/components/controls/ListModeSelect.js.map +0 -1
  175. package/dist/cjs/components/controls/RenderSelect.js +0 -15
  176. package/dist/cjs/components/controls/RenderSelect.js.map +0 -1
  177. package/dist/cjs/components/controls/index.js +0 -7
  178. package/dist/cjs/components/controls/index.js.map +0 -1
  179. package/dist/cjs/components/embed-card/EmbedCardResolver.js +0 -19
  180. package/dist/cjs/components/embed-card/EmbedCardResolver.js.map +0 -1
  181. package/dist/cjs/components/embed-card/EmbedPluginCard.js +0 -35
  182. package/dist/cjs/components/embed-card/EmbedPluginCard.js.map +0 -1
  183. package/dist/cjs/components/embed-card/card/BusyCard.js +0 -15
  184. package/dist/cjs/components/embed-card/card/BusyCard.js.map +0 -1
  185. package/dist/cjs/components/embed-card/card/EmbedCardHeader.js +0 -21
  186. package/dist/cjs/components/embed-card/card/EmbedCardHeader.js.map +0 -1
  187. package/dist/cjs/components/embed-card/card/EmbedPluginCard.js +0 -23
  188. package/dist/cjs/components/embed-card/card/EmbedPluginCard.js.map +0 -1
  189. package/dist/cjs/components/embed-card/card/index.js +0 -7
  190. package/dist/cjs/components/embed-card/card/index.js.map +0 -1
  191. package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -17
  192. package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
  193. package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js +0 -16
  194. package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
  195. package/dist/cjs/components/embed-card/error-handling/index.js +0 -6
  196. package/dist/cjs/components/embed-card/error-handling/index.js.map +0 -1
  197. package/dist/cjs/components/embed-card/index.js +0 -6
  198. package/dist/cjs/components/embed-card/index.js.map +0 -1
  199. package/dist/cjs/components/embed-card/menu/EmbedMenu.js +0 -23
  200. package/dist/cjs/components/embed-card/menu/EmbedMenu.js.map +0 -1
  201. package/dist/cjs/components/embed-card/menu/JsonMenuItem.js +0 -14
  202. package/dist/cjs/components/embed-card/menu/JsonMenuItem.js.map +0 -1
  203. package/dist/cjs/components/embed-card/menu/index.js +0 -5
  204. package/dist/cjs/components/embed-card/menu/index.js.map +0 -1
  205. package/dist/cjs/components/embed-plugin-stories/storyPayload.js +0 -25
  206. package/dist/cjs/components/embed-plugin-stories/storyPayload.js.map +0 -1
  207. package/dist/cjs/components/embed-plugin-stories/storyShared.js +0 -20
  208. package/dist/cjs/components/embed-plugin-stories/storyShared.js.map +0 -1
  209. package/dist/cjs/components/index.js +0 -6
  210. package/dist/cjs/components/index.js.map +0 -1
  211. package/dist/cjs/components/validation-alerts/ValidatePayload.js +0 -17
  212. package/dist/cjs/components/validation-alerts/ValidatePayload.js.map +0 -1
  213. package/dist/cjs/components/validation-alerts/ValidatePlugins.js +0 -18
  214. package/dist/cjs/components/validation-alerts/ValidatePlugins.js.map +0 -1
  215. package/dist/cjs/components/validation-alerts/index.js +0 -6
  216. package/dist/cjs/components/validation-alerts/index.js.map +0 -1
  217. package/dist/cjs/contexts/EmbedPluginContext/Context.js +0 -6
  218. package/dist/cjs/contexts/EmbedPluginContext/Context.js.map +0 -1
  219. package/dist/cjs/contexts/EmbedPluginContext/Provider.js +0 -24
  220. package/dist/cjs/contexts/EmbedPluginContext/Provider.js.map +0 -1
  221. package/dist/cjs/contexts/EmbedPluginContext/State.js +0 -3
  222. package/dist/cjs/contexts/EmbedPluginContext/State.js.map +0 -1
  223. package/dist/cjs/contexts/EmbedPluginContext/index.js +0 -8
  224. package/dist/cjs/contexts/EmbedPluginContext/index.js.map +0 -1
  225. package/dist/cjs/contexts/EmbedPluginContext/use.js +0 -8
  226. package/dist/cjs/contexts/EmbedPluginContext/use.js.map +0 -1
  227. package/dist/cjs/contexts/RefreshPayloadContext/Context.js +0 -6
  228. package/dist/cjs/contexts/RefreshPayloadContext/Context.js.map +0 -1
  229. package/dist/cjs/contexts/RefreshPayloadContext/Provider.js +0 -12
  230. package/dist/cjs/contexts/RefreshPayloadContext/Provider.js.map +0 -1
  231. package/dist/cjs/contexts/RefreshPayloadContext/State.js +0 -3
  232. package/dist/cjs/contexts/RefreshPayloadContext/State.js.map +0 -1
  233. package/dist/cjs/contexts/RefreshPayloadContext/index.js +0 -7
  234. package/dist/cjs/contexts/RefreshPayloadContext/index.js.map +0 -1
  235. package/dist/cjs/contexts/RefreshPayloadContext/use.js +0 -8
  236. package/dist/cjs/contexts/RefreshPayloadContext/use.js.map +0 -1
  237. package/dist/cjs/contexts/ResolvePayloadContext/Context.js +0 -6
  238. package/dist/cjs/contexts/ResolvePayloadContext/Context.js.map +0 -1
  239. package/dist/cjs/contexts/ResolvePayloadContext/Provider.js +0 -56
  240. package/dist/cjs/contexts/ResolvePayloadContext/Provider.js.map +0 -1
  241. package/dist/cjs/contexts/ResolvePayloadContext/State.js +0 -3
  242. package/dist/cjs/contexts/ResolvePayloadContext/State.js.map +0 -1
  243. package/dist/cjs/contexts/ResolvePayloadContext/index.js +0 -8
  244. package/dist/cjs/contexts/ResolvePayloadContext/index.js.map +0 -1
  245. package/dist/cjs/contexts/ResolvePayloadContext/use.js +0 -8
  246. package/dist/cjs/contexts/ResolvePayloadContext/use.js.map +0 -1
  247. package/dist/cjs/contexts/ValidatePayloadContext/Context.js +0 -6
  248. package/dist/cjs/contexts/ValidatePayloadContext/Context.js.map +0 -1
  249. package/dist/cjs/contexts/ValidatePayloadContext/Provider.js +0 -32
  250. package/dist/cjs/contexts/ValidatePayloadContext/Provider.js.map +0 -1
  251. package/dist/cjs/contexts/ValidatePayloadContext/State.js +0 -3
  252. package/dist/cjs/contexts/ValidatePayloadContext/State.js.map +0 -1
  253. package/dist/cjs/contexts/ValidatePayloadContext/index.js +0 -7
  254. package/dist/cjs/contexts/ValidatePayloadContext/index.js.map +0 -1
  255. package/dist/cjs/contexts/ValidatePayloadContext/use.js +0 -8
  256. package/dist/cjs/contexts/ValidatePayloadContext/use.js.map +0 -1
  257. package/dist/cjs/contexts/index.js +0 -8
  258. package/dist/cjs/contexts/index.js.map +0 -1
  259. package/dist/cjs/index.js +0 -7
  260. package/dist/cjs/index.js.map +0 -1
  261. package/dist/cjs/types/EmbedPluginProps.js +0 -3
  262. package/dist/cjs/types/EmbedPluginProps.js.map +0 -1
  263. package/dist/cjs/types/index.js +0 -5
  264. package/dist/cjs/types/index.js.map +0 -1
  265. package/dist/esm/components/EmbedPlugin.js +0 -15
  266. package/dist/esm/components/EmbedPlugin.js.map +0 -1
  267. package/dist/esm/components/EmbedResolver.js +0 -8
  268. package/dist/esm/components/EmbedResolver.js.map +0 -1
  269. package/dist/esm/components/controls/EmbedFormControl.js +0 -6
  270. package/dist/esm/components/controls/EmbedFormControl.js.map +0 -1
  271. package/dist/esm/components/controls/ListModeSelect.js +0 -16
  272. package/dist/esm/components/controls/ListModeSelect.js.map +0 -1
  273. package/dist/esm/components/controls/RenderSelect.js +0 -11
  274. package/dist/esm/components/controls/RenderSelect.js.map +0 -1
  275. package/dist/esm/components/controls/index.js.map +0 -1
  276. package/dist/esm/components/embed-card/EmbedCardResolver.js +0 -13
  277. package/dist/esm/components/embed-card/EmbedCardResolver.js.map +0 -1
  278. package/dist/esm/components/embed-card/EmbedPluginCard.js +0 -28
  279. package/dist/esm/components/embed-card/EmbedPluginCard.js.map +0 -1
  280. package/dist/esm/components/embed-card/card/BusyCard.js +0 -9
  281. package/dist/esm/components/embed-card/card/BusyCard.js.map +0 -1
  282. package/dist/esm/components/embed-card/card/EmbedCardHeader.js +0 -15
  283. package/dist/esm/components/embed-card/card/EmbedCardHeader.js.map +0 -1
  284. package/dist/esm/components/embed-card/card/EmbedPluginCard.js +0 -16
  285. package/dist/esm/components/embed-card/card/EmbedPluginCard.js.map +0 -1
  286. package/dist/esm/components/embed-card/card/index.js.map +0 -1
  287. package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -10
  288. package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
  289. package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js +0 -11
  290. package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
  291. package/dist/esm/components/embed-card/error-handling/index.js.map +0 -1
  292. package/dist/esm/components/embed-card/index.js.map +0 -1
  293. package/dist/esm/components/embed-card/menu/EmbedMenu.js +0 -18
  294. package/dist/esm/components/embed-card/menu/EmbedMenu.js.map +0 -1
  295. package/dist/esm/components/embed-card/menu/JsonMenuItem.js +0 -9
  296. package/dist/esm/components/embed-card/menu/JsonMenuItem.js.map +0 -1
  297. package/dist/esm/components/embed-card/menu/index.js +0 -2
  298. package/dist/esm/components/embed-card/menu/index.js.map +0 -1
  299. package/dist/esm/components/embed-plugin-stories/storyPayload.js +0 -22
  300. package/dist/esm/components/embed-plugin-stories/storyPayload.js.map +0 -1
  301. package/dist/esm/components/embed-plugin-stories/storyShared.js +0 -16
  302. package/dist/esm/components/embed-plugin-stories/storyShared.js.map +0 -1
  303. package/dist/esm/components/index.js.map +0 -1
  304. package/dist/esm/components/validation-alerts/ValidatePayload.js +0 -11
  305. package/dist/esm/components/validation-alerts/ValidatePayload.js.map +0 -1
  306. package/dist/esm/components/validation-alerts/ValidatePlugins.js +0 -12
  307. package/dist/esm/components/validation-alerts/ValidatePlugins.js.map +0 -1
  308. package/dist/esm/components/validation-alerts/index.js.map +0 -1
  309. package/dist/esm/contexts/EmbedPluginContext/Context.js +0 -3
  310. package/dist/esm/contexts/EmbedPluginContext/Context.js.map +0 -1
  311. package/dist/esm/contexts/EmbedPluginContext/Provider.js +0 -20
  312. package/dist/esm/contexts/EmbedPluginContext/Provider.js.map +0 -1
  313. package/dist/esm/contexts/EmbedPluginContext/State.js +0 -2
  314. package/dist/esm/contexts/EmbedPluginContext/State.js.map +0 -1
  315. package/dist/esm/contexts/EmbedPluginContext/index.js.map +0 -1
  316. package/dist/esm/contexts/EmbedPluginContext/use.js +0 -4
  317. package/dist/esm/contexts/EmbedPluginContext/use.js.map +0 -1
  318. package/dist/esm/contexts/RefreshPayloadContext/Context.js +0 -3
  319. package/dist/esm/contexts/RefreshPayloadContext/Context.js.map +0 -1
  320. package/dist/esm/contexts/RefreshPayloadContext/Provider.js +0 -8
  321. package/dist/esm/contexts/RefreshPayloadContext/Provider.js.map +0 -1
  322. package/dist/esm/contexts/RefreshPayloadContext/State.js +0 -2
  323. package/dist/esm/contexts/RefreshPayloadContext/State.js.map +0 -1
  324. package/dist/esm/contexts/RefreshPayloadContext/index.js.map +0 -1
  325. package/dist/esm/contexts/RefreshPayloadContext/use.js +0 -4
  326. package/dist/esm/contexts/RefreshPayloadContext/use.js.map +0 -1
  327. package/dist/esm/contexts/ResolvePayloadContext/Context.js +0 -3
  328. package/dist/esm/contexts/ResolvePayloadContext/Context.js.map +0 -1
  329. package/dist/esm/contexts/ResolvePayloadContext/Provider.js +0 -51
  330. package/dist/esm/contexts/ResolvePayloadContext/Provider.js.map +0 -1
  331. package/dist/esm/contexts/ResolvePayloadContext/State.js +0 -2
  332. package/dist/esm/contexts/ResolvePayloadContext/State.js.map +0 -1
  333. package/dist/esm/contexts/ResolvePayloadContext/index.js.map +0 -1
  334. package/dist/esm/contexts/ResolvePayloadContext/use.js +0 -4
  335. package/dist/esm/contexts/ResolvePayloadContext/use.js.map +0 -1
  336. package/dist/esm/contexts/ValidatePayloadContext/Context.js +0 -3
  337. package/dist/esm/contexts/ValidatePayloadContext/Context.js.map +0 -1
  338. package/dist/esm/contexts/ValidatePayloadContext/Provider.js +0 -27
  339. package/dist/esm/contexts/ValidatePayloadContext/Provider.js.map +0 -1
  340. package/dist/esm/contexts/ValidatePayloadContext/State.js +0 -2
  341. package/dist/esm/contexts/ValidatePayloadContext/State.js.map +0 -1
  342. package/dist/esm/contexts/ValidatePayloadContext/index.js.map +0 -1
  343. package/dist/esm/contexts/ValidatePayloadContext/use.js +0 -4
  344. package/dist/esm/contexts/ValidatePayloadContext/use.js.map +0 -1
  345. package/dist/esm/contexts/index.js.map +0 -1
  346. package/dist/esm/index.js.map +0 -1
  347. package/dist/esm/types/EmbedPluginProps.js +0 -2
  348. package/dist/esm/types/EmbedPluginProps.js.map +0 -1
  349. package/dist/esm/types/index.js +0 -2
  350. package/dist/esm/types/index.js.map +0 -1
  351. package/dist/types/components/EmbedPlugin.d.ts.map +0 -1
  352. package/dist/types/components/EmbedResolver.d.ts.map +0 -1
  353. package/dist/types/components/controls/EmbedFormControl.d.ts.map +0 -1
  354. package/dist/types/components/controls/ListModeSelect.d.ts.map +0 -1
  355. package/dist/types/components/controls/RenderSelect.d.ts.map +0 -1
  356. package/dist/types/components/controls/index.d.ts.map +0 -1
  357. package/dist/types/components/embed-card/EmbedCardResolver.d.ts.map +0 -1
  358. package/dist/types/components/embed-card/EmbedPluginCard.d.ts.map +0 -1
  359. package/dist/types/components/embed-card/card/BusyCard.d.ts.map +0 -1
  360. package/dist/types/components/embed-card/card/EmbedCardHeader.d.ts.map +0 -1
  361. package/dist/types/components/embed-card/card/EmbedPluginCard.d.ts.map +0 -1
  362. package/dist/types/components/embed-card/card/index.d.ts.map +0 -1
  363. package/dist/types/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +0 -1
  364. package/dist/types/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +0 -1
  365. package/dist/types/components/embed-card/error-handling/index.d.ts.map +0 -1
  366. package/dist/types/components/embed-card/index.d.ts.map +0 -1
  367. package/dist/types/components/embed-card/menu/EmbedMenu.d.ts.map +0 -1
  368. package/dist/types/components/embed-card/menu/JsonMenuItem.d.ts.map +0 -1
  369. package/dist/types/components/embed-card/menu/index.d.ts.map +0 -1
  370. package/dist/types/components/embed-plugin-stories/storyPayload.d.ts.map +0 -1
  371. package/dist/types/components/embed-plugin-stories/storyShared.d.ts.map +0 -1
  372. package/dist/types/components/index.d.ts.map +0 -1
  373. package/dist/types/components/validation-alerts/ValidatePayload.d.ts.map +0 -1
  374. package/dist/types/components/validation-alerts/ValidatePlugins.d.ts.map +0 -1
  375. package/dist/types/components/validation-alerts/index.d.ts.map +0 -1
  376. package/dist/types/contexts/EmbedPluginContext/Context.d.ts.map +0 -1
  377. package/dist/types/contexts/EmbedPluginContext/Provider.d.ts.map +0 -1
  378. package/dist/types/contexts/EmbedPluginContext/State.d.ts.map +0 -1
  379. package/dist/types/contexts/EmbedPluginContext/use.d.ts.map +0 -1
  380. package/dist/types/contexts/RefreshPayloadContext/Context.d.ts.map +0 -1
  381. package/dist/types/contexts/RefreshPayloadContext/Provider.d.ts.map +0 -1
  382. package/dist/types/contexts/RefreshPayloadContext/State.d.ts.map +0 -1
  383. package/dist/types/contexts/RefreshPayloadContext/index.d.ts.map +0 -1
  384. package/dist/types/contexts/RefreshPayloadContext/use.d.ts.map +0 -1
  385. package/dist/types/contexts/ResolvePayloadContext/Context.d.ts.map +0 -1
  386. package/dist/types/contexts/ResolvePayloadContext/Provider.d.ts.map +0 -1
  387. package/dist/types/contexts/ResolvePayloadContext/State.d.ts.map +0 -1
  388. package/dist/types/contexts/ResolvePayloadContext/index.d.ts.map +0 -1
  389. package/dist/types/contexts/ResolvePayloadContext/use.d.ts.map +0 -1
  390. package/dist/types/contexts/ValidatePayloadContext/Context.d.ts.map +0 -1
  391. package/dist/types/contexts/ValidatePayloadContext/Provider.d.ts.map +0 -1
  392. package/dist/types/contexts/ValidatePayloadContext/State.d.ts.map +0 -1
  393. package/dist/types/contexts/ValidatePayloadContext/index.d.ts.map +0 -1
  394. package/dist/types/contexts/ValidatePayloadContext/use.d.ts.map +0 -1
  395. package/dist/types/contexts/index.d.ts.map +0 -1
  396. package/dist/types/types/EmbedPluginProps.d.ts.map +0 -1
  397. package/dist/types/types/index.d.ts.map +0 -1
  398. /package/dist/{types/components/EmbedPlugin.d.ts → components/EmbedPlugin.d.mts} +0 -0
  399. /package/dist/{types/components/EmbedResolver.d.ts → components/EmbedResolver.d.mts} +0 -0
  400. /package/dist/{types/components/controls/EmbedFormControl.d.ts → components/controls/EmbedFormControl.d.mts} +0 -0
  401. /package/dist/{types/components/controls/ListModeSelect.d.ts → components/controls/ListModeSelect.d.mts} +0 -0
  402. /package/dist/{types/components/controls/RenderSelect.d.ts → components/controls/RenderSelect.d.mts} +0 -0
  403. /package/dist/{types/components/controls/index.d.ts → components/controls/index.d.mts} +0 -0
  404. /package/dist/{types/components/embed-card/EmbedCardResolver.d.ts → components/embed-card/EmbedCardResolver.d.mts} +0 -0
  405. /package/dist/{types/components/embed-card/EmbedPluginCard.d.ts → components/embed-card/EmbedPluginCard.d.mts} +0 -0
  406. /package/dist/{types/components/embed-card/card/BusyCard.d.ts → components/embed-card/card/BusyCard.d.mts} +0 -0
  407. /package/dist/{types/components/embed-card/card/EmbedCardHeader.d.ts → components/embed-card/card/EmbedCardHeader.d.mts} +0 -0
  408. /package/dist/{types/components/embed-card/card/EmbedPluginCard.d.ts → components/embed-card/card/EmbedPluginCard.d.mts} +0 -0
  409. /package/dist/{types/components/embed-card/card/index.d.ts → components/embed-card/card/index.d.mts} +0 -0
  410. /package/dist/{types/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts → components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts} +0 -0
  411. /package/dist/{types/components/embed-card/error-handling/EmbedErrorCard.d.ts → components/embed-card/error-handling/EmbedErrorCard.d.mts} +0 -0
  412. /package/dist/{types/components/embed-card/error-handling/index.d.ts → components/embed-card/error-handling/index.d.mts} +0 -0
  413. /package/dist/{types/components/embed-card/index.d.ts → components/embed-card/index.d.mts} +0 -0
  414. /package/dist/{types/components/embed-card/menu/EmbedMenu.d.ts → components/embed-card/menu/EmbedMenu.d.mts} +0 -0
  415. /package/dist/{types/components/embed-card/menu/JsonMenuItem.d.ts → components/embed-card/menu/JsonMenuItem.d.mts} +0 -0
  416. /package/dist/{types/components/embed-card/menu/index.d.ts → components/embed-card/menu/index.d.mts} +0 -0
  417. /package/dist/{types/components/embed-plugin-stories/storyPayload.d.ts → components/embed-plugin-stories/storyPayload.d.mts} +0 -0
  418. /package/dist/{types/components/embed-plugin-stories/storyShared.d.ts → components/embed-plugin-stories/storyShared.d.mts} +0 -0
  419. /package/dist/{types/components/index.d.ts → components/index.d.mts} +0 -0
  420. /package/dist/{types/components/validation-alerts/ValidatePayload.d.ts → components/validation-alerts/ValidatePayload.d.mts} +0 -0
  421. /package/dist/{types/components/validation-alerts/ValidatePlugins.d.ts → components/validation-alerts/ValidatePlugins.d.mts} +0 -0
  422. /package/dist/{types/components/validation-alerts/index.d.ts → components/validation-alerts/index.d.mts} +0 -0
  423. /package/dist/{types/contexts/EmbedPluginContext/Context.d.ts → contexts/EmbedPluginContext/Context.d.mts} +0 -0
  424. /package/dist/{types/contexts/EmbedPluginContext/Provider.d.ts → contexts/EmbedPluginContext/Provider.d.mts} +0 -0
  425. /package/dist/{types/contexts/EmbedPluginContext/State.d.ts → contexts/EmbedPluginContext/State.d.mts} +0 -0
  426. /package/dist/{types/contexts/EmbedPluginContext/index.d.ts → contexts/EmbedPluginContext/index.d.mts} +0 -0
  427. /package/dist/{types/contexts/ResolvePayloadContext → contexts/EmbedPluginContext}/index.d.ts +0 -0
  428. /package/dist/{types/contexts/EmbedPluginContext/use.d.ts → contexts/EmbedPluginContext/use.d.mts} +0 -0
  429. /package/dist/{types/contexts/RefreshPayloadContext/Context.d.ts → contexts/RefreshPayloadContext/Context.d.mts} +0 -0
  430. /package/dist/{types/contexts/RefreshPayloadContext/Provider.d.ts → contexts/RefreshPayloadContext/Provider.d.mts} +0 -0
  431. /package/dist/{types/contexts/RefreshPayloadContext/State.d.ts → contexts/RefreshPayloadContext/State.d.mts} +0 -0
  432. /package/dist/{types/contexts/RefreshPayloadContext/index.d.ts → contexts/RefreshPayloadContext/index.d.mts} +0 -0
  433. /package/dist/{types/contexts/ValidatePayloadContext → contexts/RefreshPayloadContext}/index.d.ts +0 -0
  434. /package/dist/{types/contexts/RefreshPayloadContext/use.d.ts → contexts/RefreshPayloadContext/use.d.mts} +0 -0
  435. /package/dist/{types/contexts/ResolvePayloadContext/Context.d.ts → contexts/ResolvePayloadContext/Context.d.mts} +0 -0
  436. /package/dist/{types/contexts/ResolvePayloadContext/Provider.d.ts → contexts/ResolvePayloadContext/Provider.d.mts} +0 -0
  437. /package/dist/{types/contexts/ResolvePayloadContext/State.d.ts → contexts/ResolvePayloadContext/State.d.mts} +0 -0
  438. /package/dist/{types/contexts/ResolvePayloadContext/use.d.ts → contexts/ResolvePayloadContext/use.d.mts} +0 -0
  439. /package/dist/{types/contexts/ValidatePayloadContext/Context.d.ts → contexts/ValidatePayloadContext/Context.d.mts} +0 -0
  440. /package/dist/{types/contexts/ValidatePayloadContext/Provider.d.ts → contexts/ValidatePayloadContext/Provider.d.mts} +0 -0
  441. /package/dist/{types/contexts/ValidatePayloadContext/State.d.ts → contexts/ValidatePayloadContext/State.d.mts} +0 -0
  442. /package/dist/{types/contexts/ValidatePayloadContext/use.d.ts → contexts/ValidatePayloadContext/use.d.mts} +0 -0
  443. /package/dist/{types/contexts/index.d.ts → contexts/index.d.mts} +0 -0
  444. /package/dist/types/{types/EmbedPluginProps.d.ts → EmbedPluginProps.d.mts} +0 -0
  445. /package/dist/types/{types/index.d.ts → index.d.mts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/components/embed-card/card/BusyCard.tsx","../src/components/embed-card/card/EmbedCardHeader.tsx","../src/contexts/EmbedPluginContext/Context.tsx","../src/contexts/EmbedPluginContext/Provider.tsx","../src/contexts/EmbedPluginContext/use.tsx","../src/contexts/RefreshPayloadContext/Provider.tsx","../src/contexts/RefreshPayloadContext/Context.tsx","../src/contexts/RefreshPayloadContext/use.tsx","../src/contexts/ResolvePayloadContext/Context.ts","../src/contexts/ResolvePayloadContext/Provider.tsx","../src/contexts/ResolvePayloadContext/use.tsx","../src/contexts/ValidatePayloadContext/Provider.tsx","../src/contexts/ValidatePayloadContext/Context.ts","../src/contexts/ValidatePayloadContext/use.tsx","../src/components/embed-card/menu/EmbedMenu.tsx","../src/components/embed-card/menu/JsonMenuItem.tsx","../src/components/embed-card/card/EmbedPluginCard.tsx","../src/components/controls/EmbedFormControl.tsx","../src/components/controls/ListModeSelect.tsx","../src/components/controls/RenderSelect.tsx","../src/components/embed-card/EmbedPluginCard.tsx","../src/components/EmbedPlugin.tsx","../src/components/EmbedResolver.tsx","../src/components/validation-alerts/ValidatePayload.tsx","../src/components/validation-alerts/ValidatePlugins.tsx","../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["export * from './components'\nexport * from './contexts'\nexport * from './types'\n","import { Card, CardProps } from '@mui/material'\nimport { useBusyTiming } from '@xylabs/react-flexbox'\nimport {\n BusyCircularProgress,\n BusyCircularProgressProps,\n BusyLinearProgress,\n BusyLinearProgressProps,\n BusyVariant,\n WithChildren,\n} from '@xylabs/react-shared'\n\nexport interface BusyCardProps extends CardProps {\n busy?: boolean\n busyMinimum?: number\n busyVariant?: BusyVariant\n busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps\n}\n\nexport const BusyCard: React.FC<WithChildren<BusyCardProps>> = ({\n busy,\n busyMinimum = 500,\n busyVariant = 'circular',\n busyVariantProps,\n children,\n ...props\n}) => {\n const internalBusy = useBusyTiming(busy, busyMinimum)\n return (\n <Card {...props}>\n {children}\n {busyVariant === 'circular' && internalBusy ? <BusyCircularProgress {...(busyVariantProps as BusyCircularProgressProps)} /> : null}\n {busyVariant === 'linear' && internalBusy ? <BusyLinearProgress {...(busyVariantProps as BusyLinearProgressProps)} /> : null}\n </Card>\n )\n}\n","import RefreshIcon from '@mui/icons-material/Refresh'\nimport { Avatar, CardHeader, CardHeaderProps, Chip, Theme } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedMenu } from '../menu'\n\nexport const EmbedCardHeader: React.FC<CardHeaderProps> = () => {\n const { refreshHuri, huri } = useResolvePayload()\n const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState()\n const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {}\n //this is temporary so that we can add the ability to get a timestamp via diviner later\n const timestamp = Date.now()\n return (\n <CardHeader\n sx={{ flexWrap: 'wrap', rowGap: 1 }}\n avatar={\n hideAvatar ? (\n <></>\n ) : (\n <Avatar sx={{ bgcolor: (theme: Theme) => theme.palette.primary.main }} aria-label={activePlugin?.name}>\n {activePlugin?.name?.charAt(0)}\n </Avatar>\n )\n }\n action={\n <FlexRow flexWrap=\"wrap\" columnGap={0.5}>\n {timestamp ? (\n hideTimestamp && hideRefreshButton ? (\n ''\n ) : (\n <Chip\n avatar={hideRefreshButton ? <></> : <RefreshIcon />}\n clickable={hideRefreshButton ? false : true}\n onClick={refreshHuri}\n label={hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`}\n />\n )\n ) : null}\n {/* Huri case is valid as long as the only menu item is JSON */}\n {hideCardActions || huri === undefined ? null : <EmbedMenu />}\n </FlexRow>\n }\n title={hideTitle ? '' : activePlugin?.name}\n />\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginState } from './State'\n\nexport const EmbedPluginContext = createContextEx<EmbedPluginState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin'\nimport { useEffect, useState } from 'react'\n\nimport { EmbedPluginContext } from './Context'\nimport { EmbedPluginBase } from './State'\n\nexport type EmbedPluginProviderProps = EmbedPluginBase\n\n/** Expose passed embed plugin props via context */\nexport const EmbedPluginProvider: React.FC<WithChildren<EmbedPluginProviderProps>> = ({\n children,\n refreshTitle,\n timestampLabel,\n hideElementsConfig,\n plugins,\n embedPluginConfig,\n}) => {\n const [activePlugin, setActivePlugin] = useState<PayloadRenderPlugin | undefined>(plugins ? plugins[0] : undefined)\n\n useEffect(() => {\n setActivePlugin(plugins ? plugins[0] : undefined)\n }, [plugins])\n\n return (\n <EmbedPluginContext.Provider\n value={{\n activePlugin,\n embedPluginConfig,\n hideElementsConfig,\n provided: true,\n refreshTitle,\n setActivePlugin,\n timestampLabel,\n }}\n >\n {children}\n </EmbedPluginContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginContext } from './Context'\n\nexport const useEmbedPluginState = () => useContextEx(EmbedPluginContext, 'EmbedPlugin', true)\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport interface RefreshPayloadProps {\n onRefresh?: () => void\n refreshPayload?: boolean\n}\n\nexport const RefreshPayloadProvider: React.FC<WithChildren<RefreshPayloadProps>> = ({ children, onRefresh, refreshPayload }) => {\n const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload)\n\n return (\n <RefreshPayloadContext.Provider value={{ onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }}>\n {children}\n </RefreshPayloadContext.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 { 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 { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\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 { 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","import MoreVertIcon from '@mui/icons-material/MoreVert'\nimport { IconButton, IconButtonProps, Menu } from '@mui/material'\nimport { useState } from 'react'\n\nimport { JsonMenuItem } from './JsonMenuItem'\n\nexport const EmbedMenu: React.FC<IconButtonProps> = (props) => {\n // TODO - link to explore website\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n <>\n <IconButton onClick={handleClick} {...props}>\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose} PaperProps={{ variant: 'elevation' }} MenuListProps={{ dense: true }}>\n <JsonMenuItem />\n </Menu>\n </>\n )\n}\n","import OpenInNewIcon from '@mui/icons-material/OpenInNew'\nimport { ListItemIcon, ListItemText, MenuItem, MenuItemProps } from '@mui/material'\n\nimport { useResolvePayload } from '../../../contexts'\n\nexport const JsonMenuItem: React.FC<MenuItemProps> = (props) => {\n const { huri } = useResolvePayload()\n\n return (\n <>\n {huri ? (\n <MenuItem title=\"Source Payload JSON\" onClick={() => window.open(huri, '_blank')} {...props}>\n <ListItemText sx={{ mr: 1 }}>JSON</ListItemText>\n <ListItemIcon sx={{ justifyContent: 'end' }}>\n <OpenInNewIcon fontSize=\"small\" />\n </ListItemIcon>\n </MenuItem>\n ) : null}\n </>\n )\n}\n","import { CardContent } from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { useListMode } from '@xyo-network/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls'\nimport { BusyCard, BusyCardProps } from './BusyCard'\nimport { EmbedCardHeader } from './EmbedCardHeader'\n\nexport const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {\n const { payload } = useResolvePayload()\n const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState()\n const { listMode } = useListMode()\n const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1\n\n return (\n <BusyCard {...props}>\n {hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}\n {/* Only show the row if the children are present */}\n {(plugins && plugins.length) || supportsListMode ? (\n <FlexGrowRow columnGap={2} rowGap={2} flexWrap=\"wrap\" pb={1}>\n {plugins && plugins.length > 1 ? <EmbedRenderSelect /> : null}\n {supportsListMode ? <ListModeSelectFormControl /> : null}\n </FlexGrowRow>\n ) : null}\n <CardContent sx={{ height: '100%' }}>\n {ActivePlugin ? <ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} /> : null}\n </CardContent>\n </BusyCard>\n )\n}\n","import { FormControl, FormControlProps, InputLabel } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedFormControlProps extends FormControlProps {\n formId?: string\n formLabel?: string\n}\n\nexport const EmbedFormControl: React.FC<WithChildren<EmbedFormControlProps>> = ({ formId, formLabel, children, ...props }) => {\n return (\n <FormControl {...props}>\n <InputLabel id={formId}>{formLabel}</InputLabel>\n {children}\n </FormControl>\n )\n}\n","import { MenuItem, Select, SelectProps } from '@mui/material'\nimport { ListMode, useListMode } from '@xyo-network/react-shared'\n\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst listModeSelectId = 'listmode-select-id'\nconst listModeSelectLabel = 'List Mode'\n\nexport const ListModeSelect: React.FC<SelectProps<ListMode>> = (props) => {\n const { listMode, setListMode } = useListMode()\n\n return (\n <Select<ListMode>\n value={(listMode ?? 'default') as ListMode}\n onChange={(event) => {\n setListMode?.(event.target.value as ListMode)\n }}\n {...props}\n >\n <MenuItem key=\"default\" value=\"default\">\n Default\n </MenuItem>\n <MenuItem key=\"table\" value=\"table\">\n Table\n </MenuItem>\n <MenuItem key=\"grid\" value=\"grid\">\n Grid\n </MenuItem>\n </Select>\n )\n}\n\nexport const ListModeSelectFormControl: React.FC<SelectProps<ListMode>> = (props) => {\n return (\n <EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>\n <ListModeSelect size=\"small\" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />\n </EmbedFormControl>\n )\n}\n","import { MenuItem, Select, SelectProps } from '@mui/material'\n\nimport { useEmbedPluginState } from '../../contexts'\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst renderSelectId = 'render-select-id'\nconst renderSelectLabel = 'Renderer'\n\nexport const EmbedRenderSelect: React.FC<SelectProps> = (props) => {\n const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState()\n return (\n <EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>\n <Select size=\"small\" value={activePlugin?.name} {...props}>\n {plugins?.map((plugin) => (\n <MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>\n {plugin.name}\n </MenuItem>\n ))}\n </Select>\n </EmbedFormControl>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts'\nimport { EmbedPluginProps } from '../../types'\nimport { EmbedPluginInner } from '../EmbedPlugin'\nimport { BusyCardProps, EmbedPluginCard } from './card'\nimport { EmbedCardApiErrorRenderer } from './error-handling'\n\nexport interface EmbedPluginCardProps extends WithChildren, EmbedPluginProps, BusyCardProps {}\n\nexport const ApiEmbedPluginCard: React.FC<EmbedPluginCardProps> = ({ children, ...props }) => {\n const {\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n ...busyCardProps\n } = props\n\n return (\n <EmbedPluginInner\n {...{\n embedPluginConfig,\n hideElementsConfig,\n huriPayload,\n onRefresh,\n plugins,\n refreshTitle,\n timestampLabel,\n validateSchema,\n }}\n >\n <EmbedPluginCardInner {...busyCardProps} />\n {children}\n </EmbedPluginInner>\n )\n}\n\nexport const EmbedPluginCardInner: React.FC<BusyCardProps> = (props) => {\n const { payload, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <EmbedPluginCard\n elevation={3}\n variant=\"elevation\"\n busy={Boolean(!refreshPayload && payload)}\n busyVariantProps={{ style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }}\n sx={{ position: 'relative' }}\n {...props}\n />\n </EmbedCardApiErrorRenderer>\n )\n}\n\n/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */\nexport const EmbedPlugin = EmbedPluginCard\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ErrorBoundary, ListModeProvider } from '@xyo-network/react-shared'\n\nimport { EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider } from '../contexts'\nimport { EmbedPluginProps } from '../types'\nimport { EmbedResolver } from './EmbedResolver'\nimport { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts'\n\nexport const EmbedPluginInner: React.FC<WithChildren<EmbedPluginProps>> = ({\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n children,\n}) => {\n return (\n <ErrorBoundary>\n <EmbedPluginProvider\n refreshTitle={refreshTitle}\n timestampLabel={timestampLabel}\n hideElementsConfig={hideElementsConfig}\n plugins={plugins}\n embedPluginConfig={embedPluginConfig}\n >\n <WithResolvers onRefresh={onRefresh} huriPayload={huriPayload}>\n <WithValidators validateSchema={validateSchema}>\n <ListModeProvider defaultListMode={embedPluginConfig?.listMode}>{children}</ListModeProvider>\n </WithValidators>\n </WithResolvers>\n </EmbedPluginProvider>\n </ErrorBoundary>\n )\n}\n\ninterface WithResolversProps extends Pick<EmbedPluginProps, 'onRefresh' | 'huriPayload'>, FlexBoxProps {}\n\nconst WithResolvers: React.FC<WithChildren<WithResolversProps>> = ({ children, onRefresh, huriPayload }) => {\n return (\n <RefreshPayloadProvider onRefresh={onRefresh}>\n <ResolvePayloadProvider huriPayload={huriPayload}>\n <EmbedResolver>{children}</EmbedResolver>\n </ResolvePayloadProvider>\n </RefreshPayloadProvider>\n )\n}\n\nconst WithValidators: React.FC<WithChildren<{ validateSchema?: boolean }>> = ({ children, validateSchema }) => {\n return (\n <ValidatePayloadProvider enabled={validateSchema}>\n <ValidatePluginsAlert>\n <ValidatePayloadAlert>{children}</ValidatePayloadAlert>\n </ValidatePluginsAlert>\n </ValidatePayloadProvider>\n )\n}\n","import { WithChildren } from '@xylabs/react-shared'\nimport { LoadResult } from '@xyo-network/react-shared'\n\nimport { useResolvePayload } from '../contexts'\n\nexport const EmbedResolver: React.FC<WithChildren> = ({ children }) => {\n const { payload, notFound, huriError } = useResolvePayload()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n {children}\n </LoadResult>\n )\n}\n","import { Alert, AlertProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useValidatePayload } from '../../contexts'\n\nexport const ValidatePayloadAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { validPayload, enabled, schema } = useValidatePayload()\n\n if (enabled && validPayload === false) {\n return (\n <Alert severity=\"error\" title=\"Invalid Payload!\" {...props}>\n Payload schema claimed to be {schema} but failed to validate.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { Alert, AlertProps, AlertTitle } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../contexts'\n\nexport const ValidatePluginsAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { payload } = useResolvePayload()\n const { plugins } = useEmbedPluginState()\n\n if (payload && plugins?.length === 0) {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing plugins!</AlertTitle>Payload found but no plugins were present.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { CardProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ModuleError } from '@xyo-network/payload-model'\nimport { ErrorAlert, ErrorRender } from '@xyo-network/react-error'\n\nimport { EmbedErrorCard } from './EmbedErrorCard'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<WithChildren<EmbedCardApiErrorRendererProps>> = ({ xyoError, children, ...props }) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import { Alert, AlertProps, AlertTitle, Card, CardContent, CardProps, Typography } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {\n alertProps?: AlertProps\n error?: Error\n}\n\nexport const EmbedErrorCard: React.FC<WithChildren<EmbedErrorCardProps>> = (props) => {\n const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props\n const errorProps = { alertProps, error, hideErrorDetails }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({ alertProps, hideErrorDetails, error }) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {!hideErrorDetails && error ? (\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n ) : (\n <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n )}\n </Alert>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAgC;AAChC,2BAA8B;AAC9B,0BAOO;AAmBH;AAVG,IAAM,WAA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ACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,sDAAC,wBAAsB,GAAG,eAAe;AAAA,QACxC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,uBAAgD,CAAC,UAAU;AACtE,QAAM,EAAE,SAAS,UAAU,IAAI,kBAAkB;AACjD,QAAM,EAAE,eAAe,IAAI,kBAAkB;AAC7C,QAAM,YAAQ,4BAAS;AAEvB,SACE,8CAAC,6BAA0B,UAAU,WACnC;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,SAAQ;AAAA,MACR,MAAM,QAAQ,CAAC,kBAAkB,OAAO;AAAA,MACxC,kBAAkB,EAAE,OAAO,EAAE,YAAY,SAAS,YAAY,MAAM,QAAQ,CAAC,GAAG,QAAQ,EAAE,EAAE;AAAA,MAC5F,IAAI,EAAE,UAAU,WAAW;AAAA,MAC1B,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAGO,IAAM,cAAc;","names":["import_material","import_react_flexbox","import_react_shared","import_jsx_runtime","import_react_shared","import_react","import_react_shared","import_jsx_runtime","import_react_shared","import_react_shared","import_react","import_jsx_runtime","import_react_shared","import_material","import_react_async_effect","import_react","import_react_shared","import_jsx_runtime","import_react_shared","import_material","import_react","import_material","import_jsx_runtime","OpenInNewIcon","import_jsx_runtime","MoreVertIcon","import_jsx_runtime","RefreshIcon","import_material","import_react_flexbox","import_react_shared","import_material","import_jsx_runtime","import_material","import_react_shared","import_jsx_runtime","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_react_shared","import_react_shared","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_jsx_runtime","import_material","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,493 @@
1
+ // src/components/embed-card/card/BusyCard.tsx
2
+ import { Card } from "@mui/material";
3
+ import { useBusyTiming } from "@xylabs/react-flexbox";
4
+ import {
5
+ BusyCircularProgress,
6
+ BusyLinearProgress
7
+ } from "@xylabs/react-shared";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var BusyCard = ({
10
+ busy,
11
+ busyMinimum = 500,
12
+ busyVariant = "circular",
13
+ busyVariantProps,
14
+ children,
15
+ ...props
16
+ }) => {
17
+ const internalBusy = useBusyTiming(busy, busyMinimum);
18
+ return /* @__PURE__ */ jsxs(Card, { ...props, children: [
19
+ children,
20
+ busyVariant === "circular" && internalBusy ? /* @__PURE__ */ jsx(BusyCircularProgress, { ...busyVariantProps }) : null,
21
+ busyVariant === "linear" && internalBusy ? /* @__PURE__ */ jsx(BusyLinearProgress, { ...busyVariantProps }) : null
22
+ ] });
23
+ };
24
+
25
+ // src/components/embed-card/card/EmbedCardHeader.tsx
26
+ import RefreshIcon from "@mui/icons-material/Refresh";
27
+ import { Avatar, CardHeader, Chip as Chip2 } from "@mui/material";
28
+ import { FlexRow } from "@xylabs/react-flexbox";
29
+
30
+ // src/contexts/EmbedPluginContext/Context.tsx
31
+ import { createContextEx } from "@xyo-network/react-shared";
32
+ var EmbedPluginContext = createContextEx();
33
+
34
+ // src/contexts/EmbedPluginContext/Provider.tsx
35
+ import { useEffect, useState } from "react";
36
+ import { jsx as jsx2 } from "react/jsx-runtime";
37
+ var EmbedPluginProvider = ({
38
+ children,
39
+ refreshTitle,
40
+ timestampLabel,
41
+ hideElementsConfig,
42
+ plugins,
43
+ embedPluginConfig
44
+ }) => {
45
+ const [activePlugin, setActivePlugin] = useState(plugins ? plugins[0] : void 0);
46
+ useEffect(() => {
47
+ setActivePlugin(plugins ? plugins[0] : void 0);
48
+ }, [plugins]);
49
+ return /* @__PURE__ */ jsx2(
50
+ EmbedPluginContext.Provider,
51
+ {
52
+ value: {
53
+ activePlugin,
54
+ embedPluginConfig,
55
+ hideElementsConfig,
56
+ provided: true,
57
+ refreshTitle,
58
+ setActivePlugin,
59
+ timestampLabel
60
+ },
61
+ children
62
+ }
63
+ );
64
+ };
65
+
66
+ // src/contexts/EmbedPluginContext/use.tsx
67
+ import { useContextEx } from "@xyo-network/react-shared";
68
+ var useEmbedPluginState = () => useContextEx(EmbedPluginContext, "EmbedPlugin", true);
69
+
70
+ // src/contexts/RefreshPayloadContext/Provider.tsx
71
+ import { useState as useState2 } from "react";
72
+
73
+ // src/contexts/RefreshPayloadContext/Context.tsx
74
+ import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
75
+ var RefreshPayloadContext = createContextEx2();
76
+
77
+ // src/contexts/RefreshPayloadContext/Provider.tsx
78
+ import { jsx as jsx3 } from "react/jsx-runtime";
79
+ var RefreshPayloadProvider = ({ children, onRefresh, refreshPayload }) => {
80
+ const [localRefreshPayload, setRefreshPayload] = useState2(refreshPayload);
81
+ return /* @__PURE__ */ jsx3(RefreshPayloadContext.Provider, { value: { onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }, children });
82
+ };
83
+
84
+ // src/contexts/RefreshPayloadContext/use.tsx
85
+ import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
86
+ var useRefreshPayload = () => useContextEx2(RefreshPayloadContext, "RefreshPayload", true);
87
+
88
+ // src/contexts/ResolvePayloadContext/Context.ts
89
+ import { createContextEx as createContextEx3 } from "@xyo-network/react-shared";
90
+ var ResolvePayloadContext = createContextEx3();
91
+
92
+ // src/contexts/ResolvePayloadContext/Provider.tsx
93
+ import { delay } from "@xylabs/delay";
94
+ import { useAsyncEffect } from "@xylabs/react-async-effect";
95
+ import { Huri } from "@xyo-network/huri";
96
+ import { ModuleErrorSchema } from "@xyo-network/payload-model";
97
+ import { useEffect as useEffect2, useState as useState3 } from "react";
98
+ import { jsx as jsx4 } from "react/jsx-runtime";
99
+ var ResolvePayloadProvider = ({ children, huriPayload }) => {
100
+ const [payload, setPayload] = useState3();
101
+ const [huri, setHuri] = useState3();
102
+ const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
103
+ useEffect2(() => {
104
+ typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
105
+ if (typeof huriPayload === "object") {
106
+ setPayload(huriPayload);
107
+ setRefreshPayload?.(true);
108
+ }
109
+ }, [huriPayload, setRefreshPayload]);
110
+ const [notFound, setNotFound] = useState3();
111
+ const [huriError, setHuriError] = useState3();
112
+ useAsyncEffect(
113
+ // eslint-disable-next-line react-hooks/exhaustive-deps
114
+ async (mounted) => {
115
+ if (huri && !refreshPayload) {
116
+ try {
117
+ const huriInstance = new Huri(huri);
118
+ const result = await huriInstance.fetch();
119
+ await delay(500);
120
+ if (mounted()) {
121
+ setNotFound(result === null);
122
+ setPayload(result);
123
+ setRefreshPayload?.(true);
124
+ }
125
+ } catch (e) {
126
+ const error = e;
127
+ setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] });
128
+ }
129
+ }
130
+ },
131
+ [huri, payload, refreshPayload, setRefreshPayload]
132
+ );
133
+ const refreshHuri = () => {
134
+ onRefresh?.();
135
+ if (huri) {
136
+ setRefreshPayload?.(false);
137
+ }
138
+ };
139
+ return /* @__PURE__ */ jsx4(ResolvePayloadContext.Provider, { value: { huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }, children });
140
+ };
141
+
142
+ // src/contexts/ResolvePayloadContext/use.tsx
143
+ import { useContextEx as useContextEx3 } from "@xyo-network/react-shared";
144
+ var useResolvePayload = () => useContextEx3(ResolvePayloadContext, "ResolvePayload", true);
145
+
146
+ // src/contexts/ValidatePayloadContext/Provider.tsx
147
+ import { Chip } from "@mui/material";
148
+ import { useAsyncEffect as useAsyncEffect2 } from "@xylabs/react-async-effect";
149
+ import { SchemaCache } from "@xyo-network/schema-cache";
150
+ import { useState as useState4 } from "react";
151
+
152
+ // src/contexts/ValidatePayloadContext/Context.ts
153
+ import { createContextEx as createContextEx4 } from "@xyo-network/react-shared";
154
+ var ValidatePayloadContext = createContextEx4();
155
+
156
+ // src/contexts/ValidatePayloadContext/Provider.tsx
157
+ import { Fragment, jsx as jsx5 } from "react/jsx-runtime";
158
+ var ValidatePayloadProvider = ({ children, enabled = false }) => {
159
+ const { payload } = useResolvePayload();
160
+ const [initialized, setInitialized] = useState4(false);
161
+ const [valid, setValid] = useState4();
162
+ useAsyncEffect2(
163
+ // eslint-disable-next-line react-hooks/exhaustive-deps
164
+ async () => {
165
+ if (payload && enabled) {
166
+ await SchemaCache.instance.get(payload.schema);
167
+ const possibleKnownSchema = payload.schema;
168
+ if (SchemaCache.instance.validators[possibleKnownSchema]) {
169
+ const validator = SchemaCache.instance.validators[possibleKnownSchema];
170
+ setValid(validator?.(payload));
171
+ }
172
+ setInitialized(true);
173
+ }
174
+ },
175
+ [payload, enabled]
176
+ );
177
+ return /* @__PURE__ */ jsx5(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ jsx5(Fragment, { children: initialized ? children : /* @__PURE__ */ jsx5(Chip, { label: "Validating Payload..." }) }) : children });
178
+ };
179
+
180
+ // src/contexts/ValidatePayloadContext/use.tsx
181
+ import { useContextEx as useContextEx4 } from "@xyo-network/react-shared";
182
+ var useValidatePayload = () => useContextEx4(ValidatePayloadContext, "ValidateSchema", true);
183
+
184
+ // src/components/embed-card/menu/EmbedMenu.tsx
185
+ import MoreVertIcon from "@mui/icons-material/MoreVert";
186
+ import { IconButton, Menu } from "@mui/material";
187
+ import { useState as useState5 } from "react";
188
+
189
+ // src/components/embed-card/menu/JsonMenuItem.tsx
190
+ import OpenInNewIcon from "@mui/icons-material/OpenInNew";
191
+ import { ListItemIcon, ListItemText, MenuItem } from "@mui/material";
192
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
193
+ var JsonMenuItem = (props) => {
194
+ const { huri } = useResolvePayload();
195
+ return /* @__PURE__ */ jsx6(Fragment2, { children: huri ? /* @__PURE__ */ jsxs2(MenuItem, { title: "Source Payload JSON", onClick: () => window.open(huri, "_blank"), ...props, children: [
196
+ /* @__PURE__ */ jsx6(ListItemText, { sx: { mr: 1 }, children: "JSON" }),
197
+ /* @__PURE__ */ jsx6(ListItemIcon, { sx: { justifyContent: "end" }, children: /* @__PURE__ */ jsx6(OpenInNewIcon, { fontSize: "small" }) })
198
+ ] }) : null });
199
+ };
200
+
201
+ // src/components/embed-card/menu/EmbedMenu.tsx
202
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
203
+ var EmbedMenu = (props) => {
204
+ const [anchorEl, setAnchorEl] = useState5(null);
205
+ const open = Boolean(anchorEl);
206
+ const handleClick = (event) => {
207
+ setAnchorEl(event.currentTarget);
208
+ };
209
+ const handleClose = () => {
210
+ setAnchorEl(null);
211
+ };
212
+ return /* @__PURE__ */ jsxs3(Fragment3, { children: [
213
+ /* @__PURE__ */ jsx7(IconButton, { onClick: handleClick, ...props, children: /* @__PURE__ */ jsx7(MoreVertIcon, {}) }),
214
+ /* @__PURE__ */ jsx7(Menu, { anchorEl, open, onClose: handleClose, PaperProps: { variant: "elevation" }, MenuListProps: { dense: true }, children: /* @__PURE__ */ jsx7(JsonMenuItem, {}) })
215
+ ] });
216
+ };
217
+
218
+ // src/components/embed-card/card/EmbedCardHeader.tsx
219
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
220
+ var EmbedCardHeader = () => {
221
+ const { refreshHuri, huri } = useResolvePayload();
222
+ const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState();
223
+ const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {};
224
+ const timestamp = Date.now();
225
+ return /* @__PURE__ */ jsx8(
226
+ CardHeader,
227
+ {
228
+ sx: { flexWrap: "wrap", rowGap: 1 },
229
+ avatar: hideAvatar ? /* @__PURE__ */ jsx8(Fragment4, {}) : /* @__PURE__ */ jsx8(Avatar, { sx: { bgcolor: (theme) => theme.palette.primary.main }, "aria-label": activePlugin?.name, children: activePlugin?.name?.charAt(0) }),
230
+ action: /* @__PURE__ */ jsxs4(FlexRow, { flexWrap: "wrap", columnGap: 0.5, children: [
231
+ timestamp ? hideTimestamp && hideRefreshButton ? "" : /* @__PURE__ */ jsx8(
232
+ Chip2,
233
+ {
234
+ avatar: hideRefreshButton ? /* @__PURE__ */ jsx8(Fragment4, {}) : /* @__PURE__ */ jsx8(RefreshIcon, {}),
235
+ clickable: hideRefreshButton ? false : true,
236
+ onClick: refreshHuri,
237
+ label: hideTimestamp ? "" : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`
238
+ }
239
+ ) : null,
240
+ hideCardActions || huri === void 0 ? null : /* @__PURE__ */ jsx8(EmbedMenu, {})
241
+ ] }),
242
+ title: hideTitle ? "" : activePlugin?.name
243
+ }
244
+ );
245
+ };
246
+
247
+ // src/components/embed-card/card/EmbedPluginCard.tsx
248
+ import { CardContent } from "@mui/material";
249
+ import { FlexGrowRow } from "@xylabs/react-flexbox";
250
+ import { useListMode as useListMode2 } from "@xyo-network/react-shared";
251
+
252
+ // src/components/controls/EmbedFormControl.tsx
253
+ import { FormControl, InputLabel } from "@mui/material";
254
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
255
+ var EmbedFormControl = ({ formId, formLabel, children, ...props }) => {
256
+ return /* @__PURE__ */ jsxs5(FormControl, { ...props, children: [
257
+ /* @__PURE__ */ jsx9(InputLabel, { id: formId, children: formLabel }),
258
+ children
259
+ ] });
260
+ };
261
+
262
+ // src/components/controls/ListModeSelect.tsx
263
+ import { MenuItem as MenuItem2, Select } from "@mui/material";
264
+ import { useListMode } from "@xyo-network/react-shared";
265
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
266
+ var listModeSelectId = "listmode-select-id";
267
+ var listModeSelectLabel = "List Mode";
268
+ var ListModeSelect = (props) => {
269
+ const { listMode, setListMode } = useListMode();
270
+ return /* @__PURE__ */ jsxs6(
271
+ Select,
272
+ {
273
+ value: listMode ?? "default",
274
+ onChange: (event) => {
275
+ setListMode?.(event.target.value);
276
+ },
277
+ ...props,
278
+ children: [
279
+ /* @__PURE__ */ jsx10(MenuItem2, { value: "default", children: "Default" }, "default"),
280
+ /* @__PURE__ */ jsx10(MenuItem2, { value: "table", children: "Table" }, "table"),
281
+ /* @__PURE__ */ jsx10(MenuItem2, { value: "grid", children: "Grid" }, "grid")
282
+ ]
283
+ }
284
+ );
285
+ };
286
+ var ListModeSelectFormControl = (props) => {
287
+ return /* @__PURE__ */ jsx10(EmbedFormControl, { formId: listModeSelectId, formLabel: listModeSelectLabel, children: /* @__PURE__ */ jsx10(ListModeSelect, { size: "small", label: listModeSelectLabel, labelId: listModeSelectId, ...props }) });
288
+ };
289
+
290
+ // src/components/controls/RenderSelect.tsx
291
+ import { MenuItem as MenuItem3, Select as Select2 } from "@mui/material";
292
+ import { jsx as jsx11 } from "react/jsx-runtime";
293
+ var renderSelectId = "render-select-id";
294
+ var renderSelectLabel = "Renderer";
295
+ var EmbedRenderSelect = (props) => {
296
+ const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState();
297
+ return /* @__PURE__ */ jsx11(EmbedFormControl, { formId: renderSelectId, formLabel: renderSelectLabel, children: /* @__PURE__ */ jsx11(Select2, { size: "small", value: activePlugin?.name, ...props, children: plugins?.map((plugin) => /* @__PURE__ */ jsx11(MenuItem3, { value: plugin.name, onClick: () => setActivePlugin?.(plugin), children: plugin.name }, plugin.name)) }) });
298
+ };
299
+
300
+ // src/components/embed-card/card/EmbedPluginCard.tsx
301
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
302
+ var EmbedPluginCard = ({ ...props }) => {
303
+ const { payload } = useResolvePayload();
304
+ const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState();
305
+ const { listMode } = useListMode2();
306
+ const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1;
307
+ return /* @__PURE__ */ jsxs7(BusyCard, { ...props, children: [
308
+ hideElementsConfig?.hideCardHeader ? null : /* @__PURE__ */ jsx12(EmbedCardHeader, {}),
309
+ plugins && plugins.length || supportsListMode ? /* @__PURE__ */ jsxs7(FlexGrowRow, { columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1, children: [
310
+ plugins && plugins.length > 1 ? /* @__PURE__ */ jsx12(EmbedRenderSelect, {}) : null,
311
+ supportsListMode ? /* @__PURE__ */ jsx12(ListModeSelectFormControl, {}) : null
312
+ ] }) : null,
313
+ /* @__PURE__ */ jsx12(CardContent, { sx: { height: "100%" }, children: ActivePlugin ? /* @__PURE__ */ jsx12(ActivePlugin.components.box.detailsBox, { payload, ...supportsListMode && { listMode } }) : null })
314
+ ] });
315
+ };
316
+
317
+ // src/components/embed-card/EmbedPluginCard.tsx
318
+ import { useTheme } from "@mui/material";
319
+
320
+ // src/components/EmbedPlugin.tsx
321
+ import { ErrorBoundary, ListModeProvider } from "@xyo-network/react-shared";
322
+
323
+ // src/components/EmbedResolver.tsx
324
+ import { LoadResult } from "@xyo-network/react-shared";
325
+ import { jsx as jsx13 } from "react/jsx-runtime";
326
+ var EmbedResolver = ({ children }) => {
327
+ const { payload, notFound, huriError } = useResolvePayload();
328
+ return /* @__PURE__ */ jsx13(LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children });
329
+ };
330
+
331
+ // src/components/validation-alerts/ValidatePayload.tsx
332
+ import { Alert } from "@mui/material";
333
+ import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
334
+ var ValidatePayloadAlert = ({ children, ...props }) => {
335
+ const { validPayload, enabled, schema } = useValidatePayload();
336
+ if (enabled && validPayload === false) {
337
+ return /* @__PURE__ */ jsxs8(Alert, { severity: "error", title: "Invalid Payload!", ...props, children: [
338
+ "Payload schema claimed to be ",
339
+ schema,
340
+ " but failed to validate."
341
+ ] });
342
+ }
343
+ return /* @__PURE__ */ jsx14(Fragment5, { children });
344
+ };
345
+
346
+ // src/components/validation-alerts/ValidatePlugins.tsx
347
+ import { Alert as Alert2, AlertTitle } from "@mui/material";
348
+ import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
349
+ var ValidatePluginsAlert = ({ children, ...props }) => {
350
+ const { payload } = useResolvePayload();
351
+ const { plugins } = useEmbedPluginState();
352
+ if (payload && plugins?.length === 0) {
353
+ return /* @__PURE__ */ jsxs9(Alert2, { severity: "warning", ...props, children: [
354
+ /* @__PURE__ */ jsx15(AlertTitle, { children: "Missing plugins!" }),
355
+ "Payload found but no plugins were present."
356
+ ] });
357
+ }
358
+ return /* @__PURE__ */ jsx15(Fragment6, { children });
359
+ };
360
+
361
+ // src/components/EmbedPlugin.tsx
362
+ import { jsx as jsx16 } from "react/jsx-runtime";
363
+ var EmbedPluginInner = ({
364
+ validateSchema,
365
+ plugins = [],
366
+ huriPayload,
367
+ refreshTitle = "",
368
+ timestampLabel = "Data From",
369
+ hideElementsConfig,
370
+ embedPluginConfig,
371
+ onRefresh,
372
+ children
373
+ }) => {
374
+ return /* @__PURE__ */ jsx16(ErrorBoundary, { children: /* @__PURE__ */ jsx16(
375
+ EmbedPluginProvider,
376
+ {
377
+ refreshTitle,
378
+ timestampLabel,
379
+ hideElementsConfig,
380
+ plugins,
381
+ embedPluginConfig,
382
+ children: /* @__PURE__ */ jsx16(WithResolvers, { onRefresh, huriPayload, children: /* @__PURE__ */ jsx16(WithValidators, { validateSchema, children: /* @__PURE__ */ jsx16(ListModeProvider, { defaultListMode: embedPluginConfig?.listMode, children }) }) })
383
+ }
384
+ ) });
385
+ };
386
+ var WithResolvers = ({ children, onRefresh, huriPayload }) => {
387
+ return /* @__PURE__ */ jsx16(RefreshPayloadProvider, { onRefresh, children: /* @__PURE__ */ jsx16(ResolvePayloadProvider, { huriPayload, children: /* @__PURE__ */ jsx16(EmbedResolver, { children }) }) });
388
+ };
389
+ var WithValidators = ({ children, validateSchema }) => {
390
+ return /* @__PURE__ */ jsx16(ValidatePayloadProvider, { enabled: validateSchema, children: /* @__PURE__ */ jsx16(ValidatePluginsAlert, { children: /* @__PURE__ */ jsx16(ValidatePayloadAlert, { children }) }) });
391
+ };
392
+
393
+ // src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
394
+ import { ErrorAlert, ErrorRender } from "@xyo-network/react-error";
395
+
396
+ // src/components/embed-card/error-handling/EmbedErrorCard.tsx
397
+ import { Alert as Alert3, AlertTitle as AlertTitle2, Card as Card2, CardContent as CardContent2, Typography } from "@mui/material";
398
+ import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
399
+ var EmbedErrorCard = (props) => {
400
+ const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props;
401
+ const errorProps = { alertProps, error, hideErrorDetails };
402
+ return /* @__PURE__ */ jsx17(Card2, { ...cardProps, children: /* @__PURE__ */ jsx17(CardContent2, { children: children ?? /* @__PURE__ */ jsx17(DefaultErrorAlert, { ...errorProps }) }) });
403
+ };
404
+ var DefaultErrorAlert = ({ alertProps, hideErrorDetails, error }) => {
405
+ return /* @__PURE__ */ jsxs10(Alert3, { severity: "error", ...alertProps, children: [
406
+ /* @__PURE__ */ jsx17(AlertTitle2, { children: "Whoops! Something went wrong" }),
407
+ !hideErrorDetails && error ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
408
+ /* @__PURE__ */ jsx17(Typography, { variant: "caption", children: "Error: " }),
409
+ /* @__PURE__ */ jsx17(Typography, { variant: "caption", children: error?.message })
410
+ ] }) : /* @__PURE__ */ jsx17(Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" })
411
+ ] });
412
+ };
413
+
414
+ // src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
415
+ import { jsx as jsx18 } from "react/jsx-runtime";
416
+ var EmbedCardApiErrorRenderer = ({ xyoError, children, ...props }) => {
417
+ return /* @__PURE__ */ jsx18(ErrorRender, { error: xyoError, noReAuth: true, noErrorDisplay: true, customError: /* @__PURE__ */ jsx18(CustomApiErrorCard, { xyoError, ...props }), children });
418
+ };
419
+ var CustomApiErrorCard = ({ xyoError, ...props }) => {
420
+ return /* @__PURE__ */ jsx18(EmbedErrorCard, { ...props, children: /* @__PURE__ */ jsx18(ErrorAlert, { error: xyoError }) });
421
+ };
422
+
423
+ // src/components/embed-card/EmbedPluginCard.tsx
424
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
425
+ var ApiEmbedPluginCard = ({ children, ...props }) => {
426
+ const {
427
+ validateSchema,
428
+ plugins = [],
429
+ huriPayload,
430
+ refreshTitle = "",
431
+ timestampLabel = "Data From",
432
+ hideElementsConfig,
433
+ embedPluginConfig,
434
+ onRefresh,
435
+ ...busyCardProps
436
+ } = props;
437
+ return /* @__PURE__ */ jsxs11(
438
+ EmbedPluginInner,
439
+ {
440
+ ...{
441
+ embedPluginConfig,
442
+ hideElementsConfig,
443
+ huriPayload,
444
+ onRefresh,
445
+ plugins,
446
+ refreshTitle,
447
+ timestampLabel,
448
+ validateSchema
449
+ },
450
+ children: [
451
+ /* @__PURE__ */ jsx19(EmbedPluginCardInner, { ...busyCardProps }),
452
+ children
453
+ ]
454
+ }
455
+ );
456
+ };
457
+ var EmbedPluginCardInner = (props) => {
458
+ const { payload, huriError } = useResolvePayload();
459
+ const { refreshPayload } = useRefreshPayload();
460
+ const theme = useTheme();
461
+ return /* @__PURE__ */ jsx19(EmbedCardApiErrorRenderer, { xyoError: huriError, children: /* @__PURE__ */ jsx19(
462
+ EmbedPluginCard,
463
+ {
464
+ elevation: 3,
465
+ variant: "elevation",
466
+ busy: Boolean(!refreshPayload && payload),
467
+ busyVariantProps: { style: { alignItems: "start", paddingTop: theme.spacing(2), zIndex: 2 } },
468
+ sx: { position: "relative" },
469
+ ...props
470
+ }
471
+ ) });
472
+ };
473
+ var EmbedPlugin = EmbedPluginCard;
474
+ export {
475
+ ApiEmbedPluginCard,
476
+ BusyCard,
477
+ EmbedCardHeader,
478
+ EmbedPlugin,
479
+ EmbedPluginCard,
480
+ EmbedPluginCardInner,
481
+ EmbedPluginContext,
482
+ EmbedPluginInner,
483
+ EmbedPluginProvider,
484
+ RefreshPayloadProvider,
485
+ ResolvePayloadContext,
486
+ ResolvePayloadProvider,
487
+ ValidatePayloadProvider,
488
+ useEmbedPluginState,
489
+ useRefreshPayload,
490
+ useResolvePayload,
491
+ useValidatePayload
492
+ };
493
+ //# sourceMappingURL=index.mjs.map