@unchainedshop/admin-ui 5.0.0-alpha.6 → 5.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (711) hide show
  1. package/README.md +27 -19
  2. package/dist/chunk-2RTX42IE.js +2083 -0
  3. package/dist/chunk-6UGLNLJG.js +44 -0
  4. package/dist/{chunk-UXG7EYHC.js → chunk-7PPOGX7R.js} +2 -35
  5. package/dist/{chunk-45H2WVIC.js → chunk-COV7BREX.js} +0 -1
  6. package/dist/{chunk-RHUFQVKL.js → chunk-F2TCVEQX.js} +1 -1
  7. package/dist/{chunk-UFYR5WZT.js → chunk-GY2DRQGW.js} +2 -1
  8. package/dist/{chunk-BGCKJQGS.js → chunk-JAVEZY3Q.js} +22 -15
  9. package/dist/{chunk-6TXD4TA7.js → chunk-KCN7DDPH.js} +2 -82
  10. package/dist/{chunk-YSKZE2KN.js → chunk-MSPWYMDY.js} +37 -24
  11. package/dist/chunk-RORNAN2J.js +12 -0
  12. package/dist/chunk-YZGQJJCD.js +37 -0
  13. package/dist/components/ui/Tag/TagInput.d.ts +10 -5
  14. package/dist/components/ui/Tag/TagInput.d.ts.map +1 -1
  15. package/dist/components/ui/form/TagInputField.d.ts +2 -1
  16. package/dist/components/ui/form/TagInputField.d.ts.map +1 -1
  17. package/dist/form.js +699 -2497
  18. package/dist/gql/operation-types.d.ts +13043 -0
  19. package/dist/gql/operation-types.d.ts.map +1 -0
  20. package/dist/gql/schema-types.d.ts +3820 -0
  21. package/dist/gql/schema-types.d.ts.map +1 -0
  22. package/dist/gql/types.d.ts +2 -17208
  23. package/dist/gql/types.d.ts.map +1 -1
  24. package/dist/hooks.js +3 -2
  25. package/dist/modal.js +9 -5
  26. package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -1
  27. package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -1
  28. package/dist/modules/accounts.js +219 -63
  29. package/dist/modules/assortment.js +9 -4
  30. package/dist/modules/common/hooks/useApp.d.ts +1 -1
  31. package/dist/modules/common/hooks/useBulkResultHandler.d.ts +8 -0
  32. package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +1 -0
  33. package/dist/modules/common/hooks/useBulkSelection.d.ts +12 -0
  34. package/dist/modules/common/hooks/useBulkSelection.d.ts.map +1 -0
  35. package/dist/modules/common/hooks/useScrollRestoration.d.ts +8 -0
  36. package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +1 -0
  37. package/dist/modules/common/hooks/useShopInfo.d.ts +13 -13
  38. package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -1
  39. package/dist/modules/common/utils/useFormatDateTime.d.ts +10 -1
  40. package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -1
  41. package/dist/modules/country/hooks/useCountries.d.ts +4 -4
  42. package/dist/modules/enrollment.js +23 -2
  43. package/dist/modules/event.js +1 -1
  44. package/dist/modules/filter.js +1 -1
  45. package/dist/modules/language/hooks/useLanguages.d.ts +4 -4
  46. package/dist/modules/modal/components/DangerMessage.d.ts +2 -1
  47. package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -1
  48. package/dist/modules/order/hooks/useOrders.d.ts +20 -20
  49. package/dist/modules/order/hooks/useOrders.d.ts.map +1 -1
  50. package/dist/modules/order.js +9 -3
  51. package/dist/modules/product-review.js +24 -5
  52. package/dist/modules/product.js +12 -16
  53. package/dist/modules/quotation.js +22 -2
  54. package/dist/modules/token.js +1 -1
  55. package/dist/modules/work/hooks/useWork.d.ts +14 -14
  56. package/dist/modules/work.js +17 -5
  57. package/dist/plugins.js +6 -1
  58. package/dist/providers.js +3 -3
  59. package/dist/sdk/plugins.d.ts +11 -0
  60. package/dist/sdk/plugins.d.ts.map +1 -1
  61. package/dist/sdk/shims/admin-ui-plugins.d.ts +3 -0
  62. package/dist/sdk/shims/admin-ui-plugins.d.ts.map +1 -0
  63. package/dist/sdk/shims/apollo-client-react.d.ts +3 -0
  64. package/dist/sdk/shims/apollo-client-react.d.ts.map +1 -0
  65. package/dist/sdk/shims/apollo-client.d.ts +3 -0
  66. package/dist/sdk/shims/apollo-client.d.ts.map +1 -0
  67. package/dist/sdk/shims/host.d.ts +17 -0
  68. package/dist/sdk/shims/host.d.ts.map +1 -0
  69. package/dist/sdk/shims/next-head.d.ts +3 -0
  70. package/dist/sdk/shims/next-head.d.ts.map +1 -0
  71. package/dist/sdk/shims/next-image.d.ts +3 -0
  72. package/dist/sdk/shims/next-image.d.ts.map +1 -0
  73. package/dist/sdk/shims/next-link.d.ts +3 -0
  74. package/dist/sdk/shims/next-link.d.ts.map +1 -0
  75. package/dist/sdk/shims/next-router.d.ts +3 -0
  76. package/dist/sdk/shims/next-router.d.ts.map +1 -0
  77. package/dist/sdk/shims/react-dom-client.d.ts +3 -0
  78. package/dist/sdk/shims/react-dom-client.d.ts.map +1 -0
  79. package/dist/sdk/shims/react-dom.d.ts +3 -0
  80. package/dist/sdk/shims/react-dom.d.ts.map +1 -0
  81. package/dist/sdk/shims/react-hook-form.d.ts +3 -0
  82. package/dist/sdk/shims/react-hook-form.d.ts.map +1 -0
  83. package/dist/sdk/shims/react-intl.d.ts +3 -0
  84. package/dist/sdk/shims/react-intl.d.ts.map +1 -0
  85. package/dist/sdk/shims/react-jsx-runtime.d.ts +3 -0
  86. package/dist/sdk/shims/react-jsx-runtime.d.ts.map +1 -0
  87. package/dist/sdk/shims/react-toastify.d.ts +3 -0
  88. package/dist/sdk/shims/react-toastify.d.ts.map +1 -0
  89. package/dist/sdk/shims/react.d.ts +3 -0
  90. package/dist/sdk/shims/react.d.ts.map +1 -0
  91. package/dist/shims/admin-ui-plugins.js +9 -0
  92. package/dist/shims/apollo-client-react.js +25 -0
  93. package/dist/shims/apollo-client.js +55 -0
  94. package/dist/shims/next-head.js +9 -0
  95. package/dist/shims/next-image.js +9 -0
  96. package/dist/shims/next-link.js +9 -0
  97. package/dist/shims/next-router.js +13 -0
  98. package/dist/shims/react-dom-client.js +11 -0
  99. package/dist/shims/react-dom.js +22 -0
  100. package/dist/shims/react-hook-form.js +25 -0
  101. package/dist/shims/react-intl.js +37 -0
  102. package/dist/shims/react-jsx-runtime.js +11 -0
  103. package/dist/shims/react-toastify.js +16 -0
  104. package/dist/shims/react.js +52 -0
  105. package/dist/ui.js +1261 -3443
  106. package/out/403/index.html +2 -2
  107. package/out/404/index.html +2 -2
  108. package/out/404.html +2 -2
  109. package/out/423/index.html +2 -2
  110. package/out/500/index.html +2 -2
  111. package/out/_next/static/chunks/0-2b37ubdpy0o.js +7 -0
  112. package/out/_next/static/chunks/0-cyinqk2ne8t.js +16 -0
  113. package/out/_next/static/chunks/00tf1qsuwqywe.js +17 -0
  114. package/out/_next/static/chunks/015ge5k3o3f-r.js +226 -0
  115. package/out/_next/static/chunks/0208v89kdo_s9.js +13 -0
  116. package/out/_next/static/chunks/05-ui58k9illr.js +234 -0
  117. package/out/_next/static/chunks/05au-xyt__0f2.js +3 -0
  118. package/out/_next/static/chunks/{087a2d-0e1pvn.js → 05nn5xr3ufcsh.js} +1 -1
  119. package/out/_next/static/chunks/{1m5m15javwn8p.js → 05o_q7jg8wucs.js} +1 -1
  120. package/out/_next/static/chunks/0752goe9_9g2s.js +110 -0
  121. package/out/_next/static/chunks/07o7bmqljy89r.js +1 -0
  122. package/out/_next/static/chunks/083ylavob4a8d.js +3 -0
  123. package/out/_next/static/chunks/09qx8ltnvw8f2.js +12 -0
  124. package/out/_next/static/chunks/0_puys1lwhv9m.js +16 -0
  125. package/out/_next/static/chunks/0_xtedn8e1vu_.js +13 -0
  126. package/out/_next/static/chunks/0a_bg-ub3r2eo.js +60 -0
  127. package/out/_next/static/chunks/0b33bcf7x5rgy.js +20 -0
  128. package/out/_next/static/chunks/0ckhtcvz1kyxg.js +1 -0
  129. package/out/_next/static/chunks/0dewly3vo-mcq.js +20 -0
  130. package/out/_next/static/chunks/{19y4w6_d_qiou.js → 0dnh0kr83_tj0.js} +1 -1
  131. package/out/_next/static/chunks/0dxu94yin5gdn.js +35 -0
  132. package/out/_next/static/chunks/0e2c-jlh2q_eq.js +74 -0
  133. package/out/_next/static/chunks/0fv1w56e25gt5.js +14 -0
  134. package/out/_next/static/chunks/0i9ymn9xxs0nx.js +18 -0
  135. package/out/_next/static/chunks/0ij8fs6-w0pr_.js +22 -0
  136. package/out/_next/static/chunks/0iqjlf_9c6eo_.js +59 -0
  137. package/out/_next/static/chunks/0j838r-8ied1f.js +1 -0
  138. package/out/_next/static/chunks/0jeddko6bac8h.js +1 -0
  139. package/out/_next/static/chunks/0kwf2vel2xmdi.js +13 -0
  140. package/out/_next/static/chunks/0m6jydfuy_4o3.js +1 -0
  141. package/out/_next/static/chunks/0mez27zlo26ni.js +103 -0
  142. package/out/_next/static/chunks/0n9to89fz811b.js +3 -0
  143. package/out/_next/static/chunks/0nga8f0q2d0bl.js +14 -0
  144. package/out/_next/static/chunks/0nkkcq0-s-9fo.js +1 -0
  145. package/out/_next/static/chunks/0nlirgt-x5pqr.js +337 -0
  146. package/out/_next/static/chunks/0o7k5vanq57ch.js +807 -0
  147. package/out/_next/static/chunks/0om7fxf5bczpu.js +13 -0
  148. package/out/_next/static/chunks/0ou6gsnpn0wml.js +1 -0
  149. package/out/_next/static/chunks/0p09_ncs0g7m2.js +14 -0
  150. package/out/_next/static/chunks/0pji5t2zheb2j.js +234 -0
  151. package/out/_next/static/chunks/0q6-fplpae_ie.js +21 -0
  152. package/out/_next/static/chunks/0qh0vqpui2alf.js +9 -0
  153. package/out/_next/static/chunks/0qq_lp3pk8bjf.js +27 -0
  154. package/out/_next/static/chunks/0rgdxqr_0y-g-.js +136 -0
  155. package/out/_next/static/chunks/0rqjr_lmrk4pz.js +5 -0
  156. package/out/_next/static/chunks/0sc71p-6lnm1e.js +13 -0
  157. package/out/_next/static/chunks/0tej_--_qru5h.js +126 -0
  158. package/out/_next/static/chunks/0tnyefaaxof6-.js +247 -0
  159. package/out/_next/static/chunks/{1dsjo02ozub3p.js → 0ubzi2s1spm4e.js} +4 -4
  160. package/out/_next/static/chunks/0uecw_5mn0zvr.js +110 -0
  161. package/out/_next/static/chunks/0vbqa5pd_ajm5.js +1 -0
  162. package/out/_next/static/chunks/0w7ic_22nz92w.js +58 -0
  163. package/out/_next/static/chunks/0y4eg57kgif01.js +1 -0
  164. package/out/_next/static/chunks/0ywlba3uh1t0x.js +16 -0
  165. package/out/_next/static/chunks/0zoum0jzrtu0s.js +145 -0
  166. package/out/_next/static/chunks/1184evhxs01_c.js +11 -0
  167. package/out/_next/static/chunks/11oq6l46lynfn.js +22 -0
  168. package/out/_next/static/chunks/11zynllx8mmh5.js +15 -0
  169. package/out/_next/static/chunks/13__7-sf28ub5.js +17 -0
  170. package/out/_next/static/chunks/13u_a5l2xngm4.js +1 -0
  171. package/out/_next/static/chunks/13wfvr2b0-qlj.js +30 -0
  172. package/out/_next/static/chunks/14c_mq04p7pu0.js +171 -0
  173. package/out/_next/static/chunks/151puw-sc__by.js +103 -0
  174. package/out/_next/static/chunks/15vz50rks0o2-.js +238 -0
  175. package/out/_next/static/chunks/17b4rvj5k8ye2.js +807 -0
  176. package/out/_next/static/chunks/188l-km9dyejj.js +34 -0
  177. package/out/_next/static/chunks/{252n_i72ate30.js → 18juy_eauk94g.js} +2 -2
  178. package/out/_next/static/chunks/{0k-vf2ns330qm.js → 19eflki8bmivb.js} +1 -1
  179. package/out/_next/static/chunks/19eu5d-wm2hfr.js +23 -0
  180. package/out/_next/static/chunks/19ou9pxeiwehs.js +15 -0
  181. package/out/_next/static/chunks/19pi48hqksvo9.js +9 -0
  182. package/out/_next/static/chunks/1_5ba1obzc231.js +1 -0
  183. package/out/_next/static/chunks/1_lrjs51fhhko.js +807 -0
  184. package/out/_next/static/chunks/1am9n6exll687.js +807 -0
  185. package/out/_next/static/chunks/1cfjbvjo0o9fx.js +104 -0
  186. package/out/_next/static/chunks/1cqhbfj3zp710.js +1 -0
  187. package/out/_next/static/chunks/1cy-2yb5j5_9b.js +157 -0
  188. package/out/_next/static/chunks/1dqgs827_hiod.js +16 -0
  189. package/out/_next/static/chunks/{1ji44prsmhq_a.js → 1dt9_bzfioi8a.js} +3 -3
  190. package/out/_next/static/chunks/1fg6jbuxeuj0w.js +14 -0
  191. package/out/_next/static/chunks/1fvr9k_o63j_m.js +16 -0
  192. package/out/_next/static/chunks/1h_o__x8jw8gt.js +15 -0
  193. package/out/_next/static/chunks/1imv5a-ymrj2t.js +15 -0
  194. package/out/_next/static/chunks/1k4ep4igedo8p.js +1 -0
  195. package/out/_next/static/chunks/1kn74nabrpy14.js +3 -0
  196. package/out/_next/static/chunks/{34sm1u3s14z4b.js → 1ndk3s-aeqfej.js} +1 -1
  197. package/out/_next/static/chunks/1o4hor3cwzcxc.js +15 -0
  198. package/out/_next/static/chunks/1og09fg689_nc.js +180 -0
  199. package/out/_next/static/chunks/1q_sewe1wbxsk.js +54 -0
  200. package/out/_next/static/chunks/1qwid0d89bzpw.js +17 -0
  201. package/out/_next/static/chunks/1r7dh_p70r7o8.js +13 -0
  202. package/out/_next/static/chunks/1r_e-dk-1oicl.js +2 -0
  203. package/out/_next/static/chunks/1rtv3c_klo0jk.js +1 -0
  204. package/out/_next/static/chunks/1rw6681ieb3-5.js +8 -0
  205. package/out/_next/static/chunks/1srfjl1rurrm9.js +3 -0
  206. package/out/_next/static/chunks/1t8mb2td_pm1h.js +43 -0
  207. package/out/_next/static/chunks/1v-2aqdslc2g1.js +1 -0
  208. package/out/_next/static/chunks/1w5uao_cylgd1.js +234 -0
  209. package/out/_next/static/chunks/1x-t9f0f5vr10.js +329 -0
  210. package/out/_next/static/chunks/1ylgjha1c0ua_.js +124 -0
  211. package/out/_next/static/chunks/1yp98n-n4gxwy.js +15 -0
  212. package/out/_next/static/chunks/1yy_-xc9xthfo.js +3 -0
  213. package/out/_next/static/chunks/1z1esw-t8kopy.js +1 -0
  214. package/out/_next/static/chunks/2-7e3ttj92hfr.js +17 -0
  215. package/out/_next/static/chunks/200_u2ywg-be1.js +43 -0
  216. package/out/_next/static/chunks/224ovcn90ebcs.js +25 -0
  217. package/out/_next/static/chunks/24-pobk4qjjvp.js +3 -0
  218. package/out/_next/static/chunks/2540mqfxc7ehr.js +15 -0
  219. package/out/_next/static/chunks/{1rgwj4dr0k4_b.js → 270ua9t85a7ev.js} +1 -1
  220. package/out/_next/static/chunks/27jaailh2k450.js +879 -0
  221. package/out/_next/static/chunks/2_l14rwu6kgzl.js +11 -0
  222. package/out/_next/static/chunks/2_vu2hve2j-6g.js +5 -0
  223. package/out/_next/static/chunks/2cmaw01_r48ot.js +21 -0
  224. package/out/_next/static/chunks/2d1zehr8zc3vb.js +9 -0
  225. package/out/_next/static/chunks/{2tw-iq1oliu-h.js → 2dvrbmh97duba.js} +1 -1
  226. package/out/_next/static/chunks/{34dhtdp_8idgm.js → 2dyj8q92_k5el.js} +112 -62
  227. package/out/_next/static/chunks/2e0dz59httb-e.js +43 -0
  228. package/out/_next/static/chunks/2e47h0g7w7si3.js +7 -0
  229. package/out/_next/static/chunks/2fjmw94mat8m0.js +807 -0
  230. package/out/_next/static/chunks/{0f7z8oojvqahv.js → 2fo2ki1egxbah.js} +1 -1
  231. package/out/_next/static/chunks/2httcwd92at4i.js +9 -0
  232. package/out/_next/static/chunks/2ib6fee-nqe-z.js +23 -0
  233. package/out/_next/static/chunks/2l4pfo_tsvn5w.js +11 -0
  234. package/out/_next/static/chunks/2l629mu99aqil.js +9 -0
  235. package/out/_next/static/chunks/2le8e8u2nvp0j.js +16 -0
  236. package/out/_next/static/chunks/2lx_iig9xewfj.js +52 -0
  237. package/out/_next/static/chunks/2nm_wdmfjcbyc.js +25 -0
  238. package/out/_next/static/chunks/2o9hdz0gk1-s7.js +165 -0
  239. package/out/_next/static/chunks/2ork76jhxvxke.js +138 -0
  240. package/out/_next/static/chunks/2ou2_nhvunq72.js +13 -0
  241. package/out/_next/static/chunks/2pf0d3jgcae7b.js +99 -0
  242. package/out/_next/static/chunks/2q-mpau-4gsvd.js +1 -0
  243. package/out/_next/static/chunks/2qzxq2qs80c_8.js +11 -0
  244. package/out/_next/static/chunks/2rddaar-ns45d.js +116 -0
  245. package/out/_next/static/chunks/2rve5gtfjiz-p.js +100 -0
  246. package/out/_next/static/chunks/2rywg4dn0aeez.js +1 -0
  247. package/out/_next/static/chunks/2s6u8274_jzk2.js +105 -0
  248. package/out/_next/static/chunks/2t-_fecnp5yzr.js +15 -0
  249. package/out/_next/static/chunks/2tm822rgn8g7-.js +19 -0
  250. package/out/_next/static/chunks/{1cgliwmj52a0t.js → 2u6jwsqz0uhes.js} +3 -3
  251. package/out/_next/static/chunks/2u8ns-x384r3i.js +22 -0
  252. package/out/_next/static/chunks/{08o69avnk4qvk.js → 2v4k4vpb2id7m.js} +1 -1
  253. package/out/_next/static/chunks/2v57_n8he320z.js +83 -0
  254. package/out/_next/static/chunks/2vkqez8xx-yp9.js +807 -0
  255. package/out/_next/static/chunks/2ztcyhxd9w5_m.js +1 -0
  256. package/out/_next/static/chunks/304cl99rh8rs_.js +2 -0
  257. package/out/_next/static/chunks/30_ns6urg1dkn.js +41 -0
  258. package/out/_next/static/chunks/{0gurfn3nhm859.js → 313i1x81q2xj1.js} +1 -1
  259. package/out/_next/static/chunks/325a7n__tfxy_.js +61 -0
  260. package/out/_next/static/chunks/326rk3t0gtxp_.js +14 -0
  261. package/out/_next/static/chunks/32te9ivrk54l0.js +15 -0
  262. package/out/_next/static/chunks/339y1tm7s80tn.js +22 -0
  263. package/out/_next/static/chunks/33emlry70k-lv.js +2 -0
  264. package/out/_next/static/chunks/{202a3z9hys0o7.js → 346itdsbw-5tn.js} +2 -2
  265. package/out/_next/static/chunks/351jscvbk_wb9.js +13 -0
  266. package/out/_next/static/chunks/355nca7if7l9n.js +17 -0
  267. package/out/_next/static/chunks/357odtev0t245.js +59 -0
  268. package/out/_next/static/chunks/{2oz58zpay0wub.js → 35fjd9uhctw7y.js} +1 -1
  269. package/out/_next/static/chunks/36aqs7u7s-lb1.js +119 -0
  270. package/out/_next/static/chunks/36zrtyhmqlx_n.js +807 -0
  271. package/out/_next/static/chunks/{18yg2pj3hb_in.js → 37uz0njkj43tz.js} +1 -1
  272. package/out/_next/static/chunks/38ffn8gazqz8_.js +3 -0
  273. package/out/_next/static/chunks/39-19ao-xkexy.js +2 -0
  274. package/out/_next/static/chunks/39m5tbxzzsmn4.js +807 -0
  275. package/out/_next/static/chunks/3_dqxs_vhmfqd.js +14 -0
  276. package/out/_next/static/chunks/3bgtu00fe99yc.js +1 -0
  277. package/out/_next/static/chunks/3c1rc1w-xe4u7.js +39 -0
  278. package/out/_next/static/chunks/3cdfuacs4_0d-.js +1 -0
  279. package/out/_next/static/chunks/3cp9qqljcytup.js +9 -0
  280. package/out/_next/static/chunks/3cq123yj25_36.js +1 -0
  281. package/out/_next/static/chunks/3d1ofcqmlbg-5.js +52 -0
  282. package/out/_next/static/chunks/3dopaxkoi5px6.js +1 -0
  283. package/out/_next/static/chunks/3doujqxnfq19f.js +16 -0
  284. package/out/_next/static/chunks/3grllla8v0ctl.js +14 -0
  285. package/out/_next/static/chunks/3hqec4-3one07.js +15 -0
  286. package/out/_next/static/chunks/3ic_dagw-uvrx.js +234 -0
  287. package/out/_next/static/chunks/3idwjqiel9n9v.js +18 -0
  288. package/out/_next/static/chunks/{0qjv_q4seojfh.js → 3il9u-mfrp2sn.js} +1 -1
  289. package/out/_next/static/chunks/3jtzvr48aaoo0.js +13 -0
  290. package/out/_next/static/chunks/3k5lt5_-g36w9.js +9 -0
  291. package/out/_next/static/chunks/3l-9xxd1i1sya.js +1 -0
  292. package/out/_next/static/chunks/3l1zucp3a411p.js +50 -0
  293. package/out/_next/static/chunks/3ls4kv54f3x8u.js +15 -0
  294. package/out/_next/static/chunks/3m2yam5_cs1h7.js +13 -0
  295. package/out/_next/static/chunks/3mancxzz8c7hl.js +51 -0
  296. package/out/_next/static/chunks/3nkse7h0-kbyx.js +126 -0
  297. package/out/_next/static/chunks/3o23w25lfn4mo.js +27 -0
  298. package/out/_next/static/chunks/{3m7-q-ztmzcf5.js → 3oynij37wfjb2.js} +2 -2
  299. package/out/_next/static/chunks/3oz5p4rrvnew1.js +807 -0
  300. package/out/_next/static/chunks/{434iz38padke2.js → 3pbyo5kkko3wh.js} +1 -1
  301. package/out/_next/static/chunks/3qjgt-x153i6u.js +234 -0
  302. package/out/_next/static/chunks/3s-n0xc-vi0ww.js +31 -0
  303. package/out/_next/static/chunks/3t_3vlnk1ntkb.js +95 -0
  304. package/out/_next/static/chunks/3ti7tims6gz1j.js +234 -0
  305. package/out/_next/static/chunks/3tzaludii6vtu.js +54 -0
  306. package/out/_next/static/chunks/{01q9gliprwq-_.js → 3u504487p_y7e.js} +2 -2
  307. package/out/_next/static/chunks/3ufg-in2riva7.js +1 -0
  308. package/out/_next/static/chunks/3ugwv1vrnbivg.js +1 -0
  309. package/out/_next/static/chunks/3ulbhhqw8rxd8.js +15 -0
  310. package/out/_next/static/chunks/3uytb2p7vzafp.js +15 -0
  311. package/out/_next/static/chunks/3v38tvcona4gy.js +16 -0
  312. package/out/_next/static/chunks/3vet2a9q9rf2c.js +61 -0
  313. package/out/_next/static/chunks/3vz3gqmojh7sx.js +4 -0
  314. package/out/_next/static/chunks/3w9xrlkiztuwi.js +23 -0
  315. package/out/_next/static/chunks/3wy5jhrulhwb9.js +15 -0
  316. package/out/_next/static/chunks/3xmtbqm0gddn8.js +3 -0
  317. package/out/_next/static/chunks/3yqmjvx7t3t0_.js +1 -0
  318. package/out/_next/static/chunks/3yvmkdc088aly.js +1 -0
  319. package/out/_next/static/chunks/401o5bfi_90qs.js +141 -0
  320. package/out/_next/static/chunks/40s6ngsexc737.js +15 -0
  321. package/out/_next/static/chunks/40xhwnc_48o73.js +297 -0
  322. package/out/_next/static/chunks/41e2wlkp9_pvk.js +28 -0
  323. package/out/_next/static/chunks/41g7mv3yuhz6k.js +68 -0
  324. package/out/_next/static/chunks/429ihwc6co7u7.js +32 -0
  325. package/out/_next/static/chunks/42p2hm8ca34f6.js +16 -0
  326. package/out/_next/static/chunks/43jyzccx6x0lw.js +1 -0
  327. package/out/_next/static/chunks/447b5tn4-avdv.js +16 -0
  328. package/out/_next/static/chunks/44daaafswok67.css +1 -0
  329. package/out/_next/static/chunks/turbopack-02cmv-knpzk52.js +1 -0
  330. package/out/_next/static/chunks/{turbopack-04ukk4jyuwwfc.js → turbopack-05rmr02n9n2u0.js} +1 -1
  331. package/out/_next/static/chunks/{turbopack-0cwxwz82vstff.js → turbopack-07fw0g9aver98.js} +1 -1
  332. package/out/_next/static/chunks/turbopack-08x92457_z4ve.js +1 -0
  333. package/out/_next/static/chunks/{turbopack-13v4uorj3l10n.js → turbopack-0a2sfur4bx222.js} +1 -1
  334. package/out/_next/static/chunks/{turbopack-3b2k0p0g1mako.js → turbopack-0b-g0lpiikryt.js} +1 -1
  335. package/out/_next/static/chunks/turbopack-0dj-aua684j9c.js +1 -0
  336. package/out/_next/static/chunks/{turbopack-3p-k1txa6-4ik.js → turbopack-0h5lj7lnf9_tb.js} +1 -1
  337. package/out/_next/static/chunks/{turbopack-04s7-zvvb1coi.js → turbopack-0k8oea6xmzbjh.js} +1 -1
  338. package/out/_next/static/chunks/{turbopack-14kspgbfigjpa.js → turbopack-0m1qzkhnpuk2j.js} +1 -1
  339. package/out/_next/static/chunks/{turbopack-41cj0-dssfw9l.js → turbopack-0n73ad0fad4yl.js} +1 -1
  340. package/out/_next/static/chunks/{turbopack-2k2d3c2qq-0z0.js → turbopack-0qxkaq0f9ka24.js} +1 -1
  341. package/out/_next/static/chunks/{turbopack-34749rlp0_n5c.js → turbopack-0ricnx7znhztj.js} +1 -1
  342. package/out/_next/static/chunks/turbopack-0s-h1cgwrfgo-.js +1 -0
  343. package/out/_next/static/chunks/turbopack-0xgswwqf_4vrt.js +1 -0
  344. package/out/_next/static/chunks/{turbopack-1sllc7f9its9a.js → turbopack-1330tdm8r390q.js} +1 -1
  345. package/out/_next/static/chunks/{turbopack-0qa163y1bx_g6.js → turbopack-14rn07-ki7f_7.js} +1 -1
  346. package/out/_next/static/chunks/turbopack-1azvbmrq_bxq7.js +1 -0
  347. package/out/_next/static/chunks/turbopack-1bjaxey2pj8nn.js +1 -0
  348. package/out/_next/static/chunks/turbopack-1csu0s9cycwgo.js +1 -0
  349. package/out/_next/static/chunks/{turbopack-0w2ztfttfubzl.js → turbopack-1g8mmayckmfib.js} +1 -1
  350. package/out/_next/static/chunks/turbopack-1hty_7i5tzg63.js +1 -0
  351. package/out/_next/static/chunks/turbopack-1p11xfz8qe15i.js +1 -0
  352. package/out/_next/static/chunks/turbopack-1r_uprn020kr7.js +1 -0
  353. package/out/_next/static/chunks/{turbopack-29n-soxzu37jf.js → turbopack-1rdxfvyldfwrq.js} +1 -1
  354. package/out/_next/static/chunks/{turbopack-40xcd2mr6qovi.js → turbopack-1td004byboyz2.js} +1 -1
  355. package/out/_next/static/chunks/turbopack-1y3x6n223v6d1.js +1 -0
  356. package/out/_next/static/chunks/turbopack-2068cl63o32re.js +1 -0
  357. package/out/_next/static/chunks/turbopack-298vdad77pw5z.js +1 -0
  358. package/out/_next/static/chunks/{turbopack-1wqjl3y4c1ij-.js → turbopack-2d5v28yt0xnri.js} +1 -1
  359. package/out/_next/static/chunks/{turbopack-3jw01psrsjqdi.js → turbopack-2dicmowo2x4t1.js} +1 -1
  360. package/out/_next/static/chunks/turbopack-2gehqsln39zg1.js +1 -0
  361. package/out/_next/static/chunks/turbopack-2hj-ffuco6-u7.js +1 -0
  362. package/out/_next/static/chunks/turbopack-2it1jk212m2ud.js +1 -0
  363. package/out/_next/static/chunks/{turbopack-0sv7lr_kx3kdq.js → turbopack-2l-gbnaw39ht4.js} +1 -1
  364. package/out/_next/static/chunks/turbopack-2mbsjg411_ndq.js +1 -0
  365. package/out/_next/static/chunks/turbopack-2n2ksqygaakbh.js +1 -0
  366. package/out/_next/static/chunks/turbopack-2q65pei-ck559.js +1 -0
  367. package/out/_next/static/chunks/turbopack-2sqnlbl-ardf7.js +1 -0
  368. package/out/_next/static/chunks/turbopack-2t6ex34_bkvoe.js +1 -0
  369. package/out/_next/static/chunks/{turbopack-1au-y5u3wzv22.js → turbopack-2w9_vscbr0eag.js} +1 -1
  370. package/out/_next/static/chunks/turbopack-2z2joyd6mdhpo.js +1 -0
  371. package/out/_next/static/chunks/turbopack-338xrj-0fpsqu.js +1 -0
  372. package/out/_next/static/chunks/turbopack-3458e7jmj1e27.js +1 -0
  373. package/out/_next/static/chunks/turbopack-351l-va10h8kw.js +1 -0
  374. package/out/_next/static/chunks/turbopack-35awx_qvevnch.js +1 -0
  375. package/out/_next/static/chunks/{turbopack-1noe2ur-_o71n.js → turbopack-3a196kafnj312.js} +1 -1
  376. package/out/_next/static/chunks/turbopack-3a6igydfvv1_v.js +1 -0
  377. package/out/_next/static/chunks/{turbopack-1-ceqxb_000x-.js → turbopack-3bnkwdcrz_ts-.js} +1 -1
  378. package/out/_next/static/chunks/{turbopack-32kxihayw_v97.js → turbopack-3hsu2nw8qlox4.js} +1 -1
  379. package/out/_next/static/chunks/turbopack-3iiyu2cek78ut.js +1 -0
  380. package/out/_next/static/chunks/turbopack-3nta8sa99guti.js +1 -0
  381. package/out/_next/static/chunks/turbopack-3r17oio1oe7jw.js +1 -0
  382. package/out/_next/static/chunks/turbopack-3r9uyzwi0dtwb.js +1 -0
  383. package/out/_next/static/chunks/turbopack-3rgdcfralfvsa.js +1 -0
  384. package/out/_next/static/chunks/{turbopack-1h9u07n6a83dl.js → turbopack-3tntqotcyx6oq.js} +1 -1
  385. package/out/_next/static/chunks/turbopack-3uc-2ah0uehj3.js +1 -0
  386. package/out/_next/static/chunks/turbopack-3uvfl95p1ubqn.js +1 -0
  387. package/out/_next/static/chunks/turbopack-3vncwrj5x9j44.js +1 -0
  388. package/out/_next/static/chunks/turbopack-3ww1zabqxbxit.js +1 -0
  389. package/out/_next/static/chunks/{turbopack-17gr4a9fxe8he.js → turbopack-3wxlut7e7jmsi.js} +1 -1
  390. package/out/_next/static/chunks/turbopack-3yk72bgipb8hc.js +1 -0
  391. package/out/_next/static/chunks/turbopack-4025_4zwqnrk-.js +1 -0
  392. package/out/_next/static/chunks/{turbopack-298r66lt68r_n.js → turbopack-425nfopoa8wxd.js} +1 -1
  393. package/out/_next/static/{VYWUvBJY94uiS3jm4HOFN → hH8h6SzcZWEUFySYqRPbW}/_buildManifest.js +63 -63
  394. package/out/_offline/index.html +2 -2
  395. package/out/account/forgot-password/index.html +2 -2
  396. package/out/account/index.html +2 -2
  397. package/out/assortments/AssortmentDetailPage/index.html +2 -2
  398. package/out/assortments/index.html +2 -2
  399. package/out/assortments/new/index.html +2 -2
  400. package/out/copilot/index.html +2 -2
  401. package/out/country/CountryDetailPage/index.html +2 -2
  402. package/out/country/index.html +2 -2
  403. package/out/country/new/index.html +2 -2
  404. package/out/currency/CurrencyDetailPage/index.html +2 -2
  405. package/out/currency/index.html +2 -2
  406. package/out/currency/new/index.html +2 -2
  407. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
  408. package/out/delivery-provider/index.html +2 -2
  409. package/out/delivery-provider/new/index.html +2 -2
  410. package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
  411. package/out/enrollments/index.html +2 -2
  412. package/out/events/EventDetailPage/index.html +2 -2
  413. package/out/events/index.html +2 -2
  414. package/out/exports/index.html +2 -2
  415. package/out/ext/[[...slug]]/index.html +2 -2
  416. package/out/external/index.html +2 -2
  417. package/out/filters/FilterDetailPage/index.html +2 -2
  418. package/out/filters/index.html +2 -2
  419. package/out/filters/new/index.html +2 -2
  420. package/out/index.html +2 -2
  421. package/out/install/index.html +2 -2
  422. package/out/language/LanguageDetailPage/index.html +2 -2
  423. package/out/language/index.html +2 -2
  424. package/out/language/new/index.html +2 -2
  425. package/out/log-in/index.html +2 -2
  426. package/out/orders/OrderDetailPage/index.html +2 -2
  427. package/out/orders/index.html +2 -2
  428. package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
  429. package/out/payment-provider/index.html +2 -2
  430. package/out/payment-provider/new/index.html +2 -2
  431. package/out/products/ProductDetailPage/index.html +2 -2
  432. package/out/products/index.html +2 -2
  433. package/out/products/new/index.html +2 -2
  434. package/out/quotations/QuotationDetailPage/index.html +2 -2
  435. package/out/quotations/index.html +2 -2
  436. package/out/reset-password/index.html +2 -2
  437. package/out/sign-up/index.html +2 -2
  438. package/out/styleguide/index.html +2 -2
  439. package/out/tokens/TokenDetailPage/index.html +2 -2
  440. package/out/tokens/index.html +2 -2
  441. package/out/users/UserDetailPage/index.html +2 -2
  442. package/out/users/index.html +2 -2
  443. package/out/users/new/index.html +2 -2
  444. package/out/verify-email/index.html +2 -2
  445. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
  446. package/out/warehousing-provider/index.html +2 -2
  447. package/out/warehousing-provider/new/index.html +2 -2
  448. package/out/works/WorkDetailPage/index.html +2 -2
  449. package/out/works/WorkQueueListView/index.html +2 -2
  450. package/out/works/index.html +2 -2
  451. package/out/works/management/index.html +2 -2
  452. package/package.json +18 -13
  453. package/src/sdk/README.md +195 -0
  454. package/src/sdk/plugin-build.mjs +81 -98
  455. package/src/sdk/plugin-build.test.mjs +6 -3
  456. package/src/sdk/plugin-runtime.cjs +66 -0
  457. package/src/sdk/plugin-runtime.d.mts +11 -0
  458. package/src/sdk/plugin-runtime.mjs +27 -0
  459. package/src/sdk/plugin-runtime.test.mjs +32 -0
  460. package/src/sdk/plugins.mjs +17 -0
  461. package/src/sdk/plugins.ts +17 -0
  462. package/src/sdk/shims/admin-ui-plugins.ts +3 -0
  463. package/src/sdk/shims/apollo-client-react.ts +3 -0
  464. package/src/sdk/shims/apollo-client.ts +3 -0
  465. package/src/sdk/shims/host.ts +61 -0
  466. package/src/sdk/shims/next-head.ts +3 -0
  467. package/src/sdk/shims/next-image.ts +3 -0
  468. package/src/sdk/shims/next-link.ts +3 -0
  469. package/src/sdk/shims/next-router.ts +3 -0
  470. package/src/sdk/shims/react-dom-client.ts +3 -0
  471. package/src/sdk/shims/react-dom.ts +3 -0
  472. package/src/sdk/shims/react-hook-form.ts +3 -0
  473. package/src/sdk/shims/react-intl.ts +3 -0
  474. package/src/sdk/shims/react-jsx-runtime.ts +3 -0
  475. package/src/sdk/shims/react-toastify.ts +3 -0
  476. package/src/sdk/shims/react.ts +3 -0
  477. package/out/_next/static/chunks/00zpb_zgq36h-.js +0 -14
  478. package/out/_next/static/chunks/02aa23atze2y4.js +0 -119
  479. package/out/_next/static/chunks/02u93m0n7n-q-.js +0 -12
  480. package/out/_next/static/chunks/03n4up296yhei.js +0 -138
  481. package/out/_next/static/chunks/03zrzz0sb-gy8.js +0 -14
  482. package/out/_next/static/chunks/044dmimivt13x.js +0 -233
  483. package/out/_next/static/chunks/07pwkvl-lm4vp.js +0 -24
  484. package/out/_next/static/chunks/08vf2wf3mxta3.js +0 -13
  485. package/out/_next/static/chunks/094s-grteo6tb.js +0 -31
  486. package/out/_next/static/chunks/0_wt7zjqgpl76.js +0 -807
  487. package/out/_next/static/chunks/0a81cjauoijka.js +0 -1
  488. package/out/_next/static/chunks/0ab_-095b34n5.js +0 -90
  489. package/out/_next/static/chunks/0ac9c5ecooaav.js +0 -234
  490. package/out/_next/static/chunks/0b--0624xswmi.js +0 -16
  491. package/out/_next/static/chunks/0b3hl4d_27v6q.js +0 -173
  492. package/out/_next/static/chunks/0braigkg4hdry.js +0 -39
  493. package/out/_next/static/chunks/0cdcsn87u-tzw.js +0 -1
  494. package/out/_next/static/chunks/0d9cf7svcpjcu.js +0 -1
  495. package/out/_next/static/chunks/0eooy6dat270h.js +0 -226
  496. package/out/_next/static/chunks/0ety-u93s5lsq.js +0 -188
  497. package/out/_next/static/chunks/0fb5j_lva6f8h.js +0 -19
  498. package/out/_next/static/chunks/0hm6-xlqw4vmr.js +0 -1
  499. package/out/_next/static/chunks/0im5k2e2u2uz_.js +0 -8
  500. package/out/_next/static/chunks/0iv288bepx0ug.js +0 -29
  501. package/out/_next/static/chunks/0ld2eenwz_blg.js +0 -52
  502. package/out/_next/static/chunks/0m9y8-nk64c1e.js +0 -12
  503. package/out/_next/static/chunks/0nz8nqr7k7pni.js +0 -61
  504. package/out/_next/static/chunks/0pyfoz6288y0f.js +0 -1
  505. package/out/_next/static/chunks/0qfjbvj6nn9zr.js +0 -18
  506. package/out/_next/static/chunks/0r0l1vs8bls6y.js +0 -1
  507. package/out/_next/static/chunks/0r2v5se5riad_.js +0 -227
  508. package/out/_next/static/chunks/0rdl1jrsef2ew.js +0 -3
  509. package/out/_next/static/chunks/0sutuaadm9sa2.js +0 -11
  510. package/out/_next/static/chunks/0tmo-o_wjgk4-.js +0 -8
  511. package/out/_next/static/chunks/0u-md-qpvyccn.js +0 -149
  512. package/out/_next/static/chunks/0u881hesm8z4s.js +0 -14
  513. package/out/_next/static/chunks/0u_efcr52k9v1.js +0 -15
  514. package/out/_next/static/chunks/0ukobsq85_to1.js +0 -135
  515. package/out/_next/static/chunks/0vxvcl2s96x4f.js +0 -24
  516. package/out/_next/static/chunks/0vyfm3usoot1p.js +0 -60
  517. package/out/_next/static/chunks/0wr0r7tr1jbcz.js +0 -10
  518. package/out/_next/static/chunks/0x_i69reqib8u.js +0 -3
  519. package/out/_next/static/chunks/0xxl7fb2bi8_8.js +0 -82
  520. package/out/_next/static/chunks/0z7jldn83dst6.js +0 -13
  521. package/out/_next/static/chunks/1-4f-vlpf5end.js +0 -43
  522. package/out/_next/static/chunks/1293ysgb8y4y3.js +0 -12
  523. package/out/_next/static/chunks/129pi8m3j6761.js +0 -1
  524. package/out/_next/static/chunks/12lbg_ctrshrg.js +0 -1
  525. package/out/_next/static/chunks/13f9ypdy9t6l8.js +0 -15
  526. package/out/_next/static/chunks/13g90lbjehcp1.js +0 -12
  527. package/out/_next/static/chunks/1413uu5ol2rfr.js +0 -166
  528. package/out/_next/static/chunks/15-duc2e3btcy.js +0 -1
  529. package/out/_next/static/chunks/155jjdhtr4dhn.js +0 -30
  530. package/out/_next/static/chunks/1679i7xv8jnle.js +0 -117
  531. package/out/_next/static/chunks/16a-8jlyrl0m8.js +0 -12
  532. package/out/_next/static/chunks/16bdu48a5vry_.js +0 -13
  533. package/out/_next/static/chunks/16r_t7quts1w0.js +0 -289
  534. package/out/_next/static/chunks/189epg0ebf7bc.js +0 -13
  535. package/out/_next/static/chunks/18ujb5-7bg1p4.js +0 -1
  536. package/out/_next/static/chunks/19fzi9f2kw8zv.js +0 -233
  537. package/out/_next/static/chunks/1_ov-8bomgh6c.js +0 -54
  538. package/out/_next/static/chunks/1axp79-x4n7i4.js +0 -242
  539. package/out/_next/static/chunks/1bga5_ny7avyr.js +0 -23
  540. package/out/_next/static/chunks/1bgsls3okrjue.js +0 -1
  541. package/out/_next/static/chunks/1cliieayy_gw1.js +0 -13
  542. package/out/_next/static/chunks/1cvyi5qu_s_d7.js +0 -10
  543. package/out/_next/static/chunks/1dcw-b0uqh6b0.js +0 -1
  544. package/out/_next/static/chunks/1drrou5kp4qdz.js +0 -1
  545. package/out/_next/static/chunks/1e4ue1_7qn6kz.js +0 -14
  546. package/out/_next/static/chunks/1emope9zm_-ch.js +0 -14
  547. package/out/_next/static/chunks/1f7ar56dj5j8s.js +0 -21
  548. package/out/_next/static/chunks/1fk9whsy-495f.js +0 -1
  549. package/out/_next/static/chunks/1fp7uihlvzcij.js +0 -13
  550. package/out/_next/static/chunks/1g0syfr6r0rj8.js +0 -111
  551. package/out/_next/static/chunks/1g5l7e7du4p25.js +0 -1
  552. package/out/_next/static/chunks/1h03py7retxw8.js +0 -13
  553. package/out/_next/static/chunks/1i6-vxhyp4fan.js +0 -73
  554. package/out/_next/static/chunks/1ihjqvn68cj5e.js +0 -36
  555. package/out/_next/static/chunks/1ij-bgloqrwlw.js +0 -809
  556. package/out/_next/static/chunks/1l1_ntden2a5-.js +0 -58
  557. package/out/_next/static/chunks/1m0x2mb91rv2i.js +0 -13
  558. package/out/_next/static/chunks/1mw35msx036qx.js +0 -66
  559. package/out/_next/static/chunks/1ou8q3ltdifd1.js +0 -34
  560. package/out/_next/static/chunks/1prx7jjoz9cq8.js +0 -3
  561. package/out/_next/static/chunks/1q1js93yqv2ym.js +0 -14
  562. package/out/_next/static/chunks/1qkgln72hya5g.js +0 -1
  563. package/out/_next/static/chunks/1qn6du1pk46f0.js +0 -14
  564. package/out/_next/static/chunks/1r_q8-_cl6_b-.js +0 -23
  565. package/out/_next/static/chunks/1rirgtcu6_bpa.js +0 -17
  566. package/out/_next/static/chunks/1rpgl9uhsj7jq.js +0 -28
  567. package/out/_next/static/chunks/1tzo3v9d5ccon.js +0 -15
  568. package/out/_next/static/chunks/1uculcrefh01f.js +0 -16
  569. package/out/_next/static/chunks/1uinfdu-lhddb.js +0 -1
  570. package/out/_next/static/chunks/1uiqmuia9hpwc.js +0 -32
  571. package/out/_next/static/chunks/1ukg1j06gk9j7.js +0 -233
  572. package/out/_next/static/chunks/1v2r-dm5xnwxd.js +0 -95
  573. package/out/_next/static/chunks/1x8c4f-tlz8oq.js +0 -54
  574. package/out/_next/static/chunks/1xic7x33en-_t.js +0 -46
  575. package/out/_next/static/chunks/1y-vwb0-v5xv0.js +0 -304
  576. package/out/_next/static/chunks/1ymswtxkxcnfi.js +0 -11
  577. package/out/_next/static/chunks/1yrby6v2msnio.js +0 -13
  578. package/out/_next/static/chunks/1yx8v1-jzs__q.js +0 -234
  579. package/out/_next/static/chunks/1yxsj_p-0xiav.js +0 -14
  580. package/out/_next/static/chunks/2-1ihmwxm5nd8.js +0 -13
  581. package/out/_next/static/chunks/2-hsn5zne_kbo.js +0 -18
  582. package/out/_next/static/chunks/20ndjd4r5l6vk.js +0 -1
  583. package/out/_next/static/chunks/22l-2aehes9lx.js +0 -153
  584. package/out/_next/static/chunks/23ju3v8ue0m8a.js +0 -8
  585. package/out/_next/static/chunks/23lmor9w4r767.js +0 -1
  586. package/out/_next/static/chunks/24p5ic154k1id.js +0 -50
  587. package/out/_next/static/chunks/250qu8q7duhe7.js +0 -1
  588. package/out/_next/static/chunks/25asi1rq6d8hb.js +0 -7
  589. package/out/_next/static/chunks/263u-_eyq54xn.js +0 -155
  590. package/out/_next/static/chunks/26ca8aneaqvre.js +0 -2
  591. package/out/_next/static/chunks/27_5des_qn7kz.js +0 -1
  592. package/out/_next/static/chunks/27ek8w2c2mk46.js +0 -15
  593. package/out/_next/static/chunks/28d90lqq_6ddl.js +0 -135
  594. package/out/_next/static/chunks/29yitf66u5w9d.js +0 -1
  595. package/out/_next/static/chunks/2_3qu55ddb4jo.js +0 -3
  596. package/out/_next/static/chunks/2b8nhs_3rpawc.js +0 -1
  597. package/out/_next/static/chunks/2bby8chs2h2zt.js +0 -190
  598. package/out/_next/static/chunks/2ch1ir5bauqm-.js +0 -41
  599. package/out/_next/static/chunks/2cwzq52lgg7tg.js +0 -147
  600. package/out/_next/static/chunks/2dbrybnhe5thu.css +0 -1
  601. package/out/_next/static/chunks/2dddh3jepg6r9.js +0 -22
  602. package/out/_next/static/chunks/2epfbio36cp2x.js +0 -13
  603. package/out/_next/static/chunks/2ev7bgw2foqui.js +0 -12
  604. package/out/_next/static/chunks/2f0e2t3pz-rua.js +0 -1
  605. package/out/_next/static/chunks/2ibnigbqfhrjb.js +0 -8
  606. package/out/_next/static/chunks/2iuu4shi025hv.js +0 -10
  607. package/out/_next/static/chunks/2n3x1m3a_ria_.js +0 -1
  608. package/out/_next/static/chunks/2ngg-2uli_wsk.js +0 -17
  609. package/out/_next/static/chunks/2nofj6ud99639.js +0 -2
  610. package/out/_next/static/chunks/2onfts3kpe9d8.js +0 -1
  611. package/out/_next/static/chunks/2rdh3y4-gf0r1.js +0 -7
  612. package/out/_next/static/chunks/2ry72x6et3uyk.js +0 -235
  613. package/out/_next/static/chunks/2t2zzfasof1ej.js +0 -18
  614. package/out/_next/static/chunks/2twd9trj9horc.js +0 -61
  615. package/out/_next/static/chunks/2uln0xj_hk2xv.js +0 -22
  616. package/out/_next/static/chunks/2x0c4v5dipld3.js +0 -13
  617. package/out/_next/static/chunks/2xhllcys1_u52.js +0 -14
  618. package/out/_next/static/chunks/3-n5bzlk225-y.js +0 -1
  619. package/out/_next/static/chunks/3154519pby2gj.js +0 -5
  620. package/out/_next/static/chunks/327jk4epgudqh.js +0 -110
  621. package/out/_next/static/chunks/334lcmrt6lgtz.js +0 -14
  622. package/out/_next/static/chunks/33bnjdrokmipf.js +0 -12
  623. package/out/_next/static/chunks/33g91_yljnpiw.js +0 -807
  624. package/out/_next/static/chunks/33getgbb1rmpa.js +0 -43
  625. package/out/_next/static/chunks/342etvf_c28cb.js +0 -39
  626. package/out/_next/static/chunks/34kqgu8bnykwx.js +0 -315
  627. package/out/_next/static/chunks/34zya3wqxvl8k.js +0 -19
  628. package/out/_next/static/chunks/35k7e1g1muu56.js +0 -5
  629. package/out/_next/static/chunks/399t21noeueqk.js +0 -13
  630. package/out/_next/static/chunks/39ze4mwy903wm.js +0 -13
  631. package/out/_next/static/chunks/3_8h-x8lcmhr7.js +0 -339
  632. package/out/_next/static/chunks/3_j5zrbyysq1g.js +0 -31
  633. package/out/_next/static/chunks/3a8a8fpl7-ndf.js +0 -1
  634. package/out/_next/static/chunks/3a9g7ouf888jt.js +0 -1
  635. package/out/_next/static/chunks/3anxg7pk9-h3t.js +0 -50
  636. package/out/_next/static/chunks/3blzs4z5wryub.js +0 -1
  637. package/out/_next/static/chunks/3cfkqo3t0m0es.js +0 -3
  638. package/out/_next/static/chunks/3coz1fo064u6a.js +0 -12
  639. package/out/_next/static/chunks/3cr1as0q659er.js +0 -1
  640. package/out/_next/static/chunks/3crdcex_nrx3o.js +0 -12
  641. package/out/_next/static/chunks/3crkl2ligc-kt.js +0 -14
  642. package/out/_next/static/chunks/3d0ic2ovyeue7.js +0 -2
  643. package/out/_next/static/chunks/3ddaet08eakmw.js +0 -18
  644. package/out/_next/static/chunks/3dh3x6thy7fef.js +0 -1
  645. package/out/_next/static/chunks/3e75y5wr7_vem.js +0 -327
  646. package/out/_next/static/chunks/3e98ykfx_vamf.js +0 -60
  647. package/out/_next/static/chunks/3eq-uts_yz1e5.js +0 -1
  648. package/out/_next/static/chunks/3ghzaufs2n8uq.js +0 -2
  649. package/out/_next/static/chunks/3ie60090urams.js +0 -16
  650. package/out/_next/static/chunks/3jffivfbeet7f.js +0 -15
  651. package/out/_next/static/chunks/3mskn3uvx6s77.js +0 -142
  652. package/out/_next/static/chunks/3oppyz2wurlv-.js +0 -329
  653. package/out/_next/static/chunks/3p-pioxz8jyip.js +0 -15
  654. package/out/_next/static/chunks/3po1wffu1pc3k.js +0 -12
  655. package/out/_next/static/chunks/3rvxjwpm2hkzt.js +0 -13
  656. package/out/_next/static/chunks/3snnfwi0hsfwy.js +0 -31
  657. package/out/_next/static/chunks/3so-jsqyai73m.js +0 -1
  658. package/out/_next/static/chunks/3voheu4m42ctw.js +0 -14
  659. package/out/_next/static/chunks/3x3oqxb68-ull.js +0 -7
  660. package/out/_next/static/chunks/3ysj3lx_q697-.js +0 -124
  661. package/out/_next/static/chunks/3zncjth-kop8p.js +0 -1
  662. package/out/_next/static/chunks/3zp4iedgev460.js +0 -35
  663. package/out/_next/static/chunks/40jzqlki-ix7b.js +0 -17
  664. package/out/_next/static/chunks/4138xi7jgdv_o.js +0 -107
  665. package/out/_next/static/chunks/413d2n3_vvshb.js +0 -14
  666. package/out/_next/static/chunks/41mslgyvxwsej.js +0 -1
  667. package/out/_next/static/chunks/44kw4hk598ruu.js +0 -1
  668. package/out/_next/static/chunks/44um3bi95nxcy.js +0 -1
  669. package/out/_next/static/chunks/44xj9eghssy4h.js +0 -1
  670. package/out/_next/static/chunks/turbopack-00bqo3amk802l.js +0 -1
  671. package/out/_next/static/chunks/turbopack-00xv5x2980kaw.js +0 -1
  672. package/out/_next/static/chunks/turbopack-07riv31885zxj.js +0 -1
  673. package/out/_next/static/chunks/turbopack-0_sc_n1p1bcp9.js +0 -1
  674. package/out/_next/static/chunks/turbopack-0a3d8s54evtiu.js +0 -1
  675. package/out/_next/static/chunks/turbopack-0eg08vs3s4808.js +0 -1
  676. package/out/_next/static/chunks/turbopack-0j5aiynif9rh6.js +0 -1
  677. package/out/_next/static/chunks/turbopack-0utbjxefp9fml.js +0 -1
  678. package/out/_next/static/chunks/turbopack-12eu9ngd0g762.js +0 -1
  679. package/out/_next/static/chunks/turbopack-169mif_3j2xs7.js +0 -1
  680. package/out/_next/static/chunks/turbopack-16y9ecuw-sg_1.js +0 -1
  681. package/out/_next/static/chunks/turbopack-19agtluuz9hs9.js +0 -1
  682. package/out/_next/static/chunks/turbopack-1qm1ao7m24ujy.js +0 -1
  683. package/out/_next/static/chunks/turbopack-1tefm98ftz444.js +0 -1
  684. package/out/_next/static/chunks/turbopack-1yd96mx8ypi2r.js +0 -1
  685. package/out/_next/static/chunks/turbopack-1yr-b62bnm8pn.js +0 -1
  686. package/out/_next/static/chunks/turbopack-20jztdd3emk_4.js +0 -1
  687. package/out/_next/static/chunks/turbopack-24wh5-0ze4f20.js +0 -1
  688. package/out/_next/static/chunks/turbopack-27e97jv6b-s-_.js +0 -1
  689. package/out/_next/static/chunks/turbopack-2_-s3bsa7fy5n.js +0 -1
  690. package/out/_next/static/chunks/turbopack-2agmtzzi93gcu.js +0 -1
  691. package/out/_next/static/chunks/turbopack-2krkwbmqyusjo.js +0 -1
  692. package/out/_next/static/chunks/turbopack-2ktr6ad7w59-u.js +0 -1
  693. package/out/_next/static/chunks/turbopack-2o3ztc3qxaqmv.js +0 -1
  694. package/out/_next/static/chunks/turbopack-2ocojyxy_6ohm.js +0 -1
  695. package/out/_next/static/chunks/turbopack-2p09rgir8a_rr.js +0 -1
  696. package/out/_next/static/chunks/turbopack-2s314huts4-ih.js +0 -1
  697. package/out/_next/static/chunks/turbopack-2uy0-z_9q9r-t.js +0 -1
  698. package/out/_next/static/chunks/turbopack-2xkr4g1kb-c30.js +0 -1
  699. package/out/_next/static/chunks/turbopack-38uc2-slitwye.js +0 -1
  700. package/out/_next/static/chunks/turbopack-3_vxq7t7y83kn.js +0 -1
  701. package/out/_next/static/chunks/turbopack-3b4ho7bon8y1n.js +0 -1
  702. package/out/_next/static/chunks/turbopack-3j07f1odh4keh.js +0 -1
  703. package/out/_next/static/chunks/turbopack-3ldzloccscyev.js +0 -1
  704. package/out/_next/static/chunks/turbopack-3o2wlpvy73vfc.js +0 -1
  705. package/out/_next/static/chunks/turbopack-3u8iq4uiukeh-.js +0 -1
  706. package/out/_next/static/chunks/turbopack-3ywen4wf3l3h-.js +0 -1
  707. package/out/_next/static/chunks/turbopack-3zajpzv2knbum.js +0 -1
  708. package/out/_next/static/chunks/turbopack-42c24-sypz5zz.js +0 -1
  709. /package/dist/{chunk-BYXBJQAS.js → chunk-QWQ3WJJN.js} +0 -0
  710. /package/out/_next/static/{VYWUvBJY94uiS3jm4HOFN → hH8h6SzcZWEUFySYqRPbW}/_clientMiddlewareManifest.js +0 -0
  711. /package/out/_next/static/{VYWUvBJY94uiS3jm4HOFN → hH8h6SzcZWEUFySYqRPbW}/_ssgManifest.js +0 -0
@@ -0,0 +1,195 @@
1
+ # Admin UI Plugins
2
+
3
+ Extend the Unchained admin-ui with your own pages, entity managers, tabs, and
4
+ dashboard widgets — without forking it. A plugin is a single ESM bundle plus a
5
+ manifest you register on the engine; the admin-ui discovers and loads it at
6
+ runtime.
7
+
8
+ ## How it works
9
+
10
+ - Plugins are built with `definePluginConfig()` from
11
+ `@unchainedshop/admin-ui/plugin-build` into one standard ESM bundle.
12
+ - Dependencies the host app already ships (React, Apollo, react-intl, the
13
+ `@unchainedshop/admin-ui/*` SDK modules, ...) are left as bare import
14
+ specifiers. In the browser, an import map resolves them to the host's own
15
+ module instances, so your plugin runs on the exact same React/Apollo as the
16
+ admin-ui. Everything else you import gets bundled in.
17
+ - The engine serves your bundle under `/admin-plugins/<name>.js` and a
18
+ manifest under `/admin-ui-plugins.json`; the admin-ui loads bundles with a
19
+ native dynamic `import()`.
20
+
21
+ The module graph (which specifiers are shared vs. bundled) is defined in
22
+ [`plugin-runtime.cjs`](./plugin-runtime.cjs), re-exported by `plugin-runtime.mjs` — see `SHARED_DEP_SHIMS` and
23
+ `SDK_ENTRY_KEYS`.
24
+
25
+ ## Writing a plugin
26
+
27
+ Minimal project layout (see `examples/kitchensink/plugins/bookmark-manager`
28
+ for a complete one):
29
+
30
+ ```
31
+ my-plugin/
32
+ ├── package.json
33
+ ├── tsup.config.ts
34
+ └── src/
35
+ └── index.tsx
36
+ ```
37
+
38
+ `package.json`:
39
+
40
+ ```json
41
+ {
42
+ "name": "my-plugin",
43
+ "type": "module",
44
+ "scripts": { "build": "tsup", "build:watch": "tsup --watch" },
45
+ "devDependencies": {
46
+ "@types/react": "^19.0.0",
47
+ "@unchainedshop/admin-ui": "^5.0.0-alpha.7",
48
+ "esbuild": "^0.25.0",
49
+ "react": "^19.0.0",
50
+ "tsup": "^8.0.0"
51
+ }
52
+ }
53
+ ```
54
+
55
+ `tsup.config.ts`:
56
+
57
+ ```ts
58
+ import { definePluginConfig } from '@unchainedshop/admin-ui/plugin-build';
59
+
60
+ export default definePluginConfig('my-plugin');
61
+ ```
62
+
63
+ `src/index.tsx` — export every component your manifest references, as named
64
+ exports:
65
+
66
+ ```tsx
67
+ export { default as ThingList } from './components/ThingList';
68
+ export { default as ThingDetail } from './components/ThingDetail';
69
+ export { default as ThingWidget } from './components/ThingWidget';
70
+ ```
71
+
72
+ Inside components you can import from the host SDK:
73
+
74
+ ```tsx
75
+ import { Button } from '@unchainedshop/admin-ui/ui';
76
+ import { useForm } from '@unchainedshop/admin-ui/hooks';
77
+ import { useProducts } from '@unchainedshop/admin-ui/modules/product';
78
+ import { usePluginRuntime } from '@unchainedshop/admin-ui/plugins';
79
+ import { useQuery } from '@apollo/client/react';
80
+ import { FormattedMessage } from 'react-intl';
81
+ ```
82
+
83
+ ## Registering a plugin on the engine
84
+
85
+ Pass the manifest in the `adminUI.plugins` option of the Express or Fastify
86
+ `connect()`:
87
+
88
+ ```ts
89
+ adminUI: {
90
+ plugins: [
91
+ {
92
+ name: 'my-plugin', // [a-z0-9._-], used in URLs
93
+ version: '1.0.0', // optional, informational
94
+ bundlePath: resolve(__dirname, '../plugins/my-plugin/dist/index.js'),
95
+ navigation: { // optional: groups nav items in a submenu
96
+ label: 'My Plugin',
97
+ icon: 'bookmark', // heroicon name
98
+ requiredRole: 'viewProducts',
99
+ sortOrder: 75, // position among sidebar items, see below
100
+ },
101
+ slots: {
102
+ entities: [
103
+ {
104
+ path: '/things', // page lives at /ext/things
105
+ label: 'Things',
106
+ icon: 'bookmark',
107
+ requiredRole: 'viewProducts',
108
+ sortOrder: 75,
109
+ components: {
110
+ list: 'ThingList', // must match a named export of the bundle
111
+ detail: 'ThingDetail',
112
+ create: 'ThingCreate' // optional
113
+ },
114
+ },
115
+ ],
116
+ pages: [
117
+ { path: '/reports', label: 'Reports', component: 'ReportsPage' },
118
+ ],
119
+ 'dashboard:widgets': [
120
+ { component: 'ThingWidget', width: 'half' }, // full | half | third
121
+ ],
122
+ 'product:tabs': [
123
+ { label: 'Things', component: 'ProductThingsTab' },
124
+ ],
125
+ },
126
+ },
127
+ ],
128
+ }
129
+ ```
130
+
131
+ Slot types: `entities` (list/detail/create pages under `/ext/<path>`),
132
+ `pages` (single custom page under `/ext/<path>`), `dashboard:widgets`, and
133
+ `<entity>:tabs` for `product`, `assortment`, `filter`, `user`, `order`.
134
+
135
+ - `requiredRole` — action name (such as `viewProducts`) checked against the logged-in user's `allowedActions`; the item is
136
+ hidden without it.
137
+ - `sortOrder` — position in the sidebar. Built-in items use 0–130 in steps of
138
+ 10 (Orders 30, Products 40, Users 70, System settings 110, ...). Items
139
+ without a `sortOrder` keep their relative order after ordered ones.
140
+
141
+ At startup the engine validates the manifest against the bundle and logs a
142
+ warning if a referenced component is not exported, if two plugins share a
143
+ name, or if the bundle was built against a different admin-ui SDK version
144
+ than the one running.
145
+
146
+ ## Development workflow
147
+
148
+ ### Client project with the packaged Admin UI
149
+
150
+ The engine can serve the prebuilt Admin UI from the installed
151
+ `@unchainedshop/admin-ui` npm package while you develop local extensions.
152
+ Register the local plugin's `dist/index.js` as its `bundlePath`, build the
153
+ plugin before starting the engine, and run its build watcher alongside the
154
+ engine. Open the engine's Admin UI URL and refresh after a successful rebuild.
155
+ Only the local extension needs rebuilding; the packaged Admin UI stays prebuilt.
156
+
157
+ Both Kitchensink examples provide this workflow through `npm run dev` in the
158
+ example directory: an initial plugin build followed by backend and plugin
159
+ watchers. `npm run dev:server` starts only the backend. The repository root's
160
+ `npm run dev` also starts Next.js for development of the Admin UI itself.
161
+
162
+ In a standalone project, use published package versions instead of the
163
+ examples' repository-local `file:` dependencies, and use the same
164
+ `@unchainedshop/admin-ui` version for the engine and plugin build. Install the
165
+ plugin's dependencies separately if it is not included in your npm workspaces.
166
+
167
+ ### Rebuilds and refreshes
168
+
169
+ Run the plugin build in watch mode next to the engine:
170
+
171
+ ```bash
172
+ cd my-plugin && npm run build:watch
173
+ ```
174
+
175
+ In dev mode (`NODE_ENV !== 'production'`) the engine picks up bundle changes
176
+ on the next manifest request — reload the admin-ui to get the new bundle. In
177
+ production, bundles are read once at startup and served with immutable
178
+ caching, keyed by content hash.
179
+
180
+ The plugin bundle must exist when the engine starts. If it was missing at
181
+ startup, build it and restart the engine. This workflow uses browser refreshes;
182
+ it does not provide React Fast Refresh or preserve component state across edits.
183
+
184
+ ## Content-Security-Policy
185
+
186
+ The engine injects the import map as an inline `<script type="importmap">`
187
+ tag. If you serve the admin-ui with a strict CSP, provide a nonce and it will
188
+ be added to the tag:
189
+
190
+ - **Express + helmet**: set `res.locals.cspNonce` in a middleware (as in
191
+ helmet's CSP nonce docs) before the admin-ui router.
192
+ - **Fastify + @fastify/helmet**: register with `enableCSPNonces: true`; the
193
+ engine reads `reply.cspNonce.script`.
194
+
195
+ Without a nonce, `script-src` must allow the inline import map tag.
@@ -1,112 +1,95 @@
1
+ import { readFileSync } from 'node:fs';
1
2
  import { defineConfig } from 'tsup';
3
+ import { PLUGIN_EXTERNALS } from './plugin-runtime.mjs';
2
4
 
3
- const SHARED_DEPS = {
4
- react: {
5
- default: ['default'],
6
- named: [
7
- 'useState',
8
- 'useEffect',
9
- 'useCallback',
10
- 'useRef',
11
- 'useMemo',
12
- 'useContext',
13
- 'useReducer',
14
- 'useLayoutEffect',
15
- 'createContext',
16
- 'createElement',
17
- 'Fragment',
18
- 'Component',
19
- 'forwardRef',
20
- 'memo',
21
- 'lazy',
22
- 'Suspense',
23
- 'Children',
24
- 'cloneElement',
25
- 'isValidElement',
26
- 'createRef',
27
- 'StrictMode',
28
- ],
29
- },
30
- 'react/jsx-runtime': {
31
- named: ['jsx', 'jsxs', 'Fragment'],
32
- },
33
- '@apollo/client': {
34
- named: ['gql', 'useQuery', 'useMutation', 'useLazyQuery', 'useApolloClient'],
35
- },
36
- '@apollo/client/react': {
37
- named: ['useQuery', 'useMutation', 'useLazyQuery', 'useApolloClient'],
38
- },
39
- 'next/router': {
40
- named: ['useRouter'],
41
- },
42
- 'react-intl': {
43
- named: ['useIntl', 'FormattedMessage', 'defineMessages'],
44
- },
45
- 'react-toastify': {
46
- named: ['toast'],
47
- },
48
- 'react-hook-form': {
49
- named: ['useForm', 'useFormContext', 'useController', 'useFieldArray', 'useWatch', 'FormProvider', 'Controller'],
50
- },
51
- '@unchainedshop/admin-ui/plugins': {
52
- named: ['usePluginRuntime'],
53
- },
54
- };
55
-
56
- function generateShim(specifier) {
57
- const config = SHARED_DEPS[specifier];
58
- if (!config) return '';
59
-
60
- const lines = [
61
- `var __dep = (typeof window !== 'undefined' && window.__UNCHAINED_PLUGIN_DEPS__) ? window.__UNCHAINED_PLUGIN_DEPS__[${JSON.stringify(specifier)}] : {};`,
62
- ];
63
-
64
- if (config.default) {
65
- lines.push(`export default __dep;`);
66
- }
67
-
68
- if (config.named) {
69
- for (const name of config.named) {
70
- lines.push(`export var ${name} = __dep.${name};`);
71
- }
5
+ // Version of the admin-ui SDK this plugin is built against, stamped into the
6
+ // bundle banner so the engine can warn about plugin/host version skew.
7
+ const SDK_VERSION = (() => {
8
+ try {
9
+ return JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf-8')).version;
10
+ } catch {
11
+ return null;
72
12
  }
13
+ })();
73
14
 
74
- return lines.join('\n');
75
- }
76
-
77
- export const unchainedPluginShims = () => ({
78
- name: 'unchained-plugin-shims',
79
- setup(build) {
80
- const shimmable = Object.keys(SHARED_DEPS);
81
- const filter = new RegExp(
82
- `^(${shimmable.map((s) => s.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&')).join('|')})$`,
83
- );
84
-
85
- build.onResolve({ filter }, (args) => ({
86
- path: args.path,
87
- namespace: 'unchained-shim',
88
- }));
89
-
90
- build.onLoad({ filter: /.*/, namespace: 'unchained-shim' }, (args) => ({
91
- contents: generateShim(args.path),
92
- loader: 'js',
93
- }));
94
- },
95
- });
96
-
15
+ /**
16
+ * Build configuration for admin-ui plugins.
17
+ *
18
+ * Plugins are compiled to a single standard ESM bundle. Dependencies provided
19
+ * by the host admin-ui (react, @apollo/client, @unchainedshop/admin-ui/*, ...)
20
+ * are left as bare import specifiers; at runtime the admin-ui resolves them
21
+ * through a browser import map to the host's own module instances, so plugins
22
+ * share one React/Apollo instance with the app. Everything else (plugin-local
23
+ * dependencies) is bundled in.
24
+ *
25
+ * The bundle is loaded by the admin-ui with a native dynamic import(); its
26
+ * module exports are the components referenced from the plugin manifest.
27
+ */
97
28
  export function definePluginConfig(pluginName, entry = 'src/index.tsx') {
98
29
  return defineConfig({
99
30
  entry: { index: entry },
100
- format: ['iife'],
31
+ format: ['esm'],
32
+ platform: 'browser',
33
+ target: 'es2022',
101
34
  outDir: 'dist',
102
- outExtension: () => ({ js: '.global.js' }),
35
+ outExtension: () => ({ js: '.js' }),
103
36
  dts: false,
104
37
  splitting: false,
38
+ sourcemap: false,
105
39
  clean: true,
106
- globalName: '_pluginExports',
107
- footer: {
108
- js: `if(typeof window!=='undefined'){window.__UNCHAINED_PLUGINS__=window.__UNCHAINED_PLUGINS__||{};window.__UNCHAINED_PLUGINS__[${JSON.stringify(pluginName)}]=_pluginExports;}`,
40
+ banner: {
41
+ js: `/* unchained admin-ui plugin: ${JSON.stringify(pluginName)} (esm${SDK_VERSION ? `, sdk ${SDK_VERSION}` : ''}) */`,
109
42
  },
110
- esbuildPlugins: [unchainedPluginShims()],
43
+ esbuildPlugins: [handleExternals(PLUGIN_EXTERNALS)],
111
44
  });
112
45
  }
46
+
47
+ const SHIM_NS = 'unchained-cjs-esm-bridge';
48
+
49
+ /**
50
+ * Unified esbuild plugin that handles shared dependencies declared as external.
51
+ *
52
+ * ESM imports (kind "import-statement") are marked external so the bare
53
+ * specifier is preserved in the output for the browser import map.
54
+ *
55
+ * CJS require() calls (kind "require-call") from bundled CJS dependencies
56
+ * (e.g. @unchainedshop/client) are redirected to virtual ESM re-export modules.
57
+ * Without this, esbuild wraps them as __require() which throws in the browser.
58
+ *
59
+ * This plugin replaces both tsup's built-in `external` option (which cannot
60
+ * distinguish import kinds) and the previous rewriteCjsExternals plugin.
61
+ */
62
+ function handleExternals(externals) {
63
+ const isExternal = (id) =>
64
+ externals.some((ext) =>
65
+ ext instanceof RegExp ? ext.test(id) : ext === id,
66
+ );
67
+
68
+ return {
69
+ name: 'unchained-handle-externals',
70
+ setup(build) {
71
+ build.onResolve({ filter: /.*/ }, (args) => {
72
+ if (!isExternal(args.path)) return undefined;
73
+
74
+ if (args.kind === 'require-call' || args.kind === 'require-resolve') {
75
+ return { path: args.path, namespace: SHIM_NS };
76
+ }
77
+
78
+ return { path: args.path, external: true };
79
+ });
80
+
81
+ build.onLoad({ filter: /.*/, namespace: SHIM_NS }, (args) => {
82
+ const spec = JSON.stringify(args.path);
83
+ return {
84
+ contents: [
85
+ `import * as _ns from ${spec};`,
86
+ `export default _ns.default;`,
87
+ `export * from ${spec};`,
88
+ ].join('\n'),
89
+ loader: 'js',
90
+ resolveDir: '.',
91
+ };
92
+ });
93
+ },
94
+ };
95
+ }
@@ -3,9 +3,12 @@ import assert from 'node:assert/strict';
3
3
 
4
4
  import { definePluginConfig } from './plugin-build.mjs';
5
5
 
6
- test('definePluginConfig emits browser plugin bundles with a .global.js extension', () => {
6
+ test('definePluginConfig emits native ESM browser bundles with a .js extension', () => {
7
7
  const config = definePluginConfig('bookmark-manager');
8
- const outputExtension = config.outExtension?.({ format: 'iife' });
8
+ const outputExtension = config.outExtension?.({ format: 'esm' });
9
9
 
10
- assert.equal(outputExtension?.js, '.global.js');
10
+ assert.deepEqual(config.format, ['esm']);
11
+ assert.equal(config.platform, 'browser');
12
+ assert.equal(config.splitting, false);
13
+ assert.equal(outputExtension?.js, '.js');
11
14
  });
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Synchronously loadable source of truth for the admin-ui plugin module graph.
3
+ *
4
+ * Keep this file data-only: the API loads it through the package's `require`
5
+ * condition when plugins are enabled, while plugin-runtime.mjs exposes the
6
+ * same values to ESM consumers and the browser build.
7
+ */
8
+
9
+ const SHARED_DEP_SHIMS = {
10
+ react: 'shims/react.js',
11
+ 'react/jsx-runtime': 'shims/react-jsx-runtime.js',
12
+ 'react-dom': 'shims/react-dom.js',
13
+ 'react-dom/client': 'shims/react-dom-client.js',
14
+ '@apollo/client': 'shims/apollo-client.js',
15
+ '@apollo/client/react': 'shims/apollo-client-react.js',
16
+ 'next/router': 'shims/next-router.js',
17
+ 'next/link': 'shims/next-link.js',
18
+ 'next/image': 'shims/next-image.js',
19
+ 'next/head': 'shims/next-head.js',
20
+ 'react-intl': 'shims/react-intl.js',
21
+ 'react-toastify': 'shims/react-toastify.js',
22
+ 'react-hook-form': 'shims/react-hook-form.js',
23
+ '@unchainedshop/admin-ui/plugins': 'shims/admin-ui-plugins.js',
24
+ };
25
+
26
+ const SDK_ENTRY_KEYS = [
27
+ 'ui',
28
+ 'form',
29
+ 'hooks',
30
+ 'providers',
31
+ 'modal',
32
+ 'theme',
33
+ 'modules/accounts',
34
+ 'modules/assortment',
35
+ 'modules/country',
36
+ 'modules/currency',
37
+ 'modules/delivery-provider',
38
+ 'modules/enrollment',
39
+ 'modules/event',
40
+ 'modules/filter',
41
+ 'modules/language',
42
+ 'modules/order',
43
+ 'modules/payment-providers',
44
+ 'modules/product',
45
+ 'modules/product-review',
46
+ 'modules/quotation',
47
+ 'modules/token',
48
+ 'modules/warehousing-providers',
49
+ 'modules/work',
50
+ ];
51
+
52
+ const SDK_MODULE_FILES = Object.fromEntries(
53
+ SDK_ENTRY_KEYS.map((key) => [`@unchainedshop/admin-ui/${key}`, `${key}.js`]),
54
+ );
55
+
56
+ const PLUGIN_EXTERNALS = [
57
+ ...Object.keys(SHARED_DEP_SHIMS),
58
+ /^@unchainedshop\/admin-ui\//,
59
+ ];
60
+
61
+ module.exports = {
62
+ SHARED_DEP_SHIMS,
63
+ SDK_ENTRY_KEYS,
64
+ SDK_MODULE_FILES,
65
+ PLUGIN_EXTERNALS,
66
+ };
@@ -0,0 +1,11 @@
1
+ /** Bare specifiers provided by the host app, mapped to their shim file in dist/. */
2
+ export declare const SHARED_DEP_SHIMS: Record<string, string>;
3
+
4
+ /** SDK entry keys built by tsup.config.ts (excluding shim entries). */
5
+ export declare const SDK_ENTRY_KEYS: string[];
6
+
7
+ /** SDK subpath exports resolvable from plugin bundles, mapped to their dist file. */
8
+ export declare const SDK_MODULE_FILES: Record<string, string>;
9
+
10
+ /** All bare specifiers a plugin bundle may leave external. */
11
+ export declare const PLUGIN_EXTERNALS: (string | RegExp)[];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Single source of truth for the admin-ui plugin runtime module graph.
3
+ *
4
+ * Plugins are built as pure ESM bundles (see plugin-build.mjs) with shared
5
+ * dependencies left as bare import specifiers. At runtime the browser resolves
6
+ * those specifiers through an import map:
7
+ *
8
+ * - Host-owned dependencies (react, @apollo/client, ...) map to tiny shim
9
+ * modules (built from src/sdk/shims/) that re-export the running admin-ui
10
+ * app's instances via window.__UNCHAINED_PLUGIN_DEPS__, so plugins share the
11
+ * exact same React/Apollo instances as the host.
12
+ * - SDK subpaths (@unchainedshop/admin-ui/ui, ...) map to the prebuilt ESM
13
+ * files in dist/, served by the engine under /admin-ui-sdk/.
14
+ *
15
+ * This file is imported by plugin build configs (via tsup, plain Node ESM)
16
+ * and the browser build. The data lives in the dependency-free CommonJS
17
+ * module so @unchainedshop/api can load it synchronously and lazily through
18
+ * the package's `require` condition.
19
+ */
20
+ import runtime from './plugin-runtime.cjs';
21
+
22
+ export const {
23
+ SHARED_DEP_SHIMS,
24
+ SDK_ENTRY_KEYS,
25
+ SDK_MODULE_FILES,
26
+ PLUGIN_EXTERNALS,
27
+ } = runtime;
@@ -0,0 +1,32 @@
1
+ import assert from 'node:assert/strict';
2
+ import { createRequire } from 'node:module';
3
+ import test from 'node:test';
4
+ import {
5
+ PLUGIN_EXTERNALS,
6
+ SDK_ENTRY_KEYS,
7
+ SHARED_DEP_SHIMS,
8
+ } from './plugin-runtime.mjs';
9
+ import * as pluginAPI from './plugins.mjs';
10
+
11
+ test('shares react-hook-form instead of the removed Formik runtime', () => {
12
+ assert.equal(SHARED_DEP_SHIMS['react-hook-form'], 'shims/react-hook-form.js');
13
+ assert.equal('formik' in SHARED_DEP_SHIMS, false);
14
+ assert.equal(PLUGIN_EXTERNALS.includes('react-hook-form'), true);
15
+ assert.equal(PLUGIN_EXTERNALS.includes('formik'), false);
16
+ });
17
+
18
+ test('exposes the same runtime graph to import and require consumers', () => {
19
+ const require = createRequire(import.meta.url);
20
+ const commonJSRuntime = require('@unchainedshop/admin-ui/plugin-runtime');
21
+
22
+ assert.deepEqual(commonJSRuntime.SHARED_DEP_SHIMS, SHARED_DEP_SHIMS);
23
+ assert.deepEqual(commonJSRuntime.SDK_ENTRY_KEYS, SDK_ENTRY_KEYS);
24
+ });
25
+
26
+ test('makes every host plugin API export visible to shim generation', () => {
27
+ assert.deepEqual(Object.keys(pluginAPI).sort(), ['definePlugin', 'usePluginRuntime']);
28
+ assert.throws(
29
+ () => pluginAPI.usePluginRuntime(),
30
+ /only available inside an admin-ui plugin component/,
31
+ );
32
+ });
@@ -0,0 +1,17 @@
1
+ // Runtime-resolvable definePlugin so the engine and examples can register
2
+ // admin-ui plugins on a fresh checkout without building admin-ui first.
3
+ // The corresponding types (PluginConfig, slot configs, …) live in plugins.ts
4
+ // and are exposed through the package "types" condition. Keep this identity
5
+ // helper in sync with the definePlugin declaration in plugins.ts.
6
+ export function definePlugin(config) {
7
+ return config;
8
+ }
9
+
10
+ // The browser import map redirects this module to a host shim that supplies
11
+ // the real hook. Keeping the export here makes the runtime surface visible to
12
+ // shim generation and gives accidental server-side calls a useful failure.
13
+ export function usePluginRuntime() {
14
+ throw new Error(
15
+ 'usePluginRuntime is only available inside an admin-ui plugin component at runtime',
16
+ );
17
+ }
@@ -15,6 +15,13 @@ export type PageProps = Record<string, never>;
15
15
 
16
16
  export type DashboardWidgetProps = Record<string, never>;
17
17
 
18
+ export interface PluginRuntimeContext {
19
+ pluginName: string;
20
+ version?: string;
21
+ slotId: string;
22
+ config: Record<string, any>;
23
+ }
24
+
18
25
  // Keep in sync with packages/api/src/adminUiPlugins.ts AdminUIPluginConfig
19
26
 
20
27
  export interface PluginEntityConfig {
@@ -86,3 +93,13 @@ export interface PluginConfig {
86
93
  export function definePlugin(config: PluginConfig): PluginConfig {
87
94
  return config;
88
95
  }
96
+
97
+ /**
98
+ * The browser import map replaces this SDK placeholder with the host hook.
99
+ * Calling it outside a plugin component is unsupported.
100
+ */
101
+ export function usePluginRuntime(): PluginRuntimeContext {
102
+ throw new Error(
103
+ 'usePluginRuntime is only available inside an admin-ui plugin component at runtime',
104
+ );
105
+ }
@@ -0,0 +1,3 @@
1
+ // Stub — real content generated at build time by tsup.config.ts
2
+ import { hostDep } from './host';
3
+ export default hostDep("@unchainedshop/admin-ui/plugins");
@@ -0,0 +1,3 @@
1
+ // Stub — real content generated at build time by tsup.config.ts
2
+ import { hostDep } from './host';
3
+ export default hostDep("@apollo/client/react");
@@ -0,0 +1,3 @@
1
+ // Stub — real content generated at build time by tsup.config.ts
2
+ import { hostDep } from './host';
3
+ export default hostDep("@apollo/client");
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Bridge between native ESM plugin modules and the bundled Next.js host app.
3
+ *
4
+ * The admin-ui app exposes its own module instances on
5
+ * window.__UNCHAINED_PLUGIN_DEPS__ (see modules/plugins/PluginContext.tsx)
6
+ * before any plugin bundle is imported.
7
+ *
8
+ * Returns a Proxy that defers the registry lookup until the first property
9
+ * access. Note the generated shims read properties at module-evaluation time
10
+ * (`export const X = dep.X`), so resolution effectively happens when the
11
+ * plugin bundle is imported — which the PluginProvider guarantees is after
12
+ * setupPluginRuntime() has registered the deps. The Proxy's job is to give a
13
+ * clear error (below) instead of a cryptic undefined when that contract is
14
+ * violated, e.g. a shim module imported outside the admin-ui.
15
+ */
16
+ export function hostDep(specifier: string): any {
17
+ let resolved: any = undefined;
18
+ let didResolve = false;
19
+
20
+ const resolve = () => {
21
+ if (didResolve) return resolved;
22
+ const deps =
23
+ typeof window !== 'undefined' &&
24
+ (window as any).__UNCHAINED_PLUGIN_DEPS__;
25
+ const dep = deps?.[specifier];
26
+ if (!dep) {
27
+ throw new Error(
28
+ `Unchained admin-ui plugin runtime: host dependency "${specifier}" is not available. ` +
29
+ 'Plugin modules can only be loaded by the admin-ui after its plugin runtime is initialized.',
30
+ );
31
+ }
32
+ resolved = dep;
33
+ didResolve = true;
34
+ return dep;
35
+ };
36
+
37
+ return new Proxy(Object.create(null), {
38
+ get(_target, prop) {
39
+ if (prop === Symbol.toPrimitive || prop === Symbol.toStringTag) {
40
+ return undefined;
41
+ }
42
+ return resolve()[prop];
43
+ },
44
+ set(_target, prop, value) {
45
+ resolve()[prop] = value;
46
+ return true;
47
+ },
48
+ has(_target, prop) {
49
+ return prop in resolve();
50
+ },
51
+ ownKeys() {
52
+ return Reflect.ownKeys(resolve());
53
+ },
54
+ getOwnPropertyDescriptor(_target, prop) {
55
+ return Object.getOwnPropertyDescriptor(resolve(), prop);
56
+ },
57
+ getPrototypeOf() {
58
+ return Object.getPrototypeOf(resolve());
59
+ },
60
+ });
61
+ }
@@ -0,0 +1,3 @@
1
+ // Stub — real content generated at build time by tsup.config.ts
2
+ import { hostDep } from './host';
3
+ export default hostDep("next/head");
@@ -0,0 +1,3 @@
1
+ // Stub — real content generated at build time by tsup.config.ts
2
+ import { hostDep } from './host';
3
+ export default hostDep("next/image");