eddev 2.0.0-beta.24 → 2.0.0-beta.240

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 (461) hide show
  1. package/css/editor-styles.css +4 -0
  2. package/dist/app/entry/HydrationOverlay.d.ts +2 -0
  3. package/dist/app/entry/HydrationOverlay.d.ts.map +1 -0
  4. package/dist/app/entry/HydrationOverlay.js +2 -0
  5. package/dist/app/entry/MetaTags.d.ts +2 -0
  6. package/dist/app/entry/MetaTags.d.ts.map +1 -0
  7. package/dist/app/entry/MetaTags.js +27 -14
  8. package/dist/app/entry/boot-admin.d.ts +1 -0
  9. package/dist/app/entry/boot-admin.d.ts.map +1 -0
  10. package/dist/app/entry/boot-admin.js +7 -3
  11. package/dist/app/entry/hydration-script.d.ts +2 -0
  12. package/dist/app/entry/hydration-script.d.ts.map +1 -0
  13. package/dist/app/entry/hydration-script.js +18 -0
  14. package/dist/app/entry/spa-root.d.ts +1 -0
  15. package/dist/app/entry/spa-root.d.ts.map +1 -0
  16. package/dist/app/entry/spa-root.js +3 -5
  17. package/dist/app/entry/ssr-root-client.d.ts +1 -0
  18. package/dist/app/entry/ssr-root-client.d.ts.map +1 -0
  19. package/dist/app/entry/ssr-root-client.js +16 -11
  20. package/dist/app/entry/ssr-root.d.ts +4 -3
  21. package/dist/app/entry/ssr-root.d.ts.map +1 -0
  22. package/dist/app/entry/ssr-root.js +15 -17
  23. package/dist/app/lib/admin/defineField.d.ts +1 -0
  24. package/dist/app/lib/admin/defineField.d.ts.map +1 -0
  25. package/dist/app/lib/admin/defineWidget.d.ts +1 -0
  26. package/dist/app/lib/admin/defineWidget.d.ts.map +1 -0
  27. package/dist/app/lib/admin/index.d.ts +1 -0
  28. package/dist/app/lib/admin/index.d.ts.map +1 -0
  29. package/dist/app/lib/admin/installFieldTypes.d.ts +1 -0
  30. package/dist/app/lib/admin/installFieldTypes.d.ts.map +1 -0
  31. package/dist/app/lib/admin/installFieldTypes.js +2 -0
  32. package/dist/app/lib/admin/runWidgets.d.ts +1 -0
  33. package/dist/app/lib/admin/runWidgets.d.ts.map +1 -0
  34. package/dist/app/lib/admin/runWidgets.js +7 -2
  35. package/dist/app/lib/blocks/ContentBlocks.d.ts +8 -5
  36. package/dist/app/lib/blocks/ContentBlocks.d.ts.map +1 -0
  37. package/dist/app/lib/blocks/ContentBlocks.js +16 -3
  38. package/dist/app/lib/blocks/EditableText.d.ts +30 -5
  39. package/dist/app/lib/blocks/EditableText.d.ts.map +1 -0
  40. package/dist/app/lib/blocks/EditableText.js +34 -5
  41. package/dist/app/lib/blocks/InnerBlocks.d.ts +21 -6
  42. package/dist/app/lib/blocks/InnerBlocks.d.ts.map +1 -0
  43. package/dist/app/lib/blocks/InnerBlocks.js +73 -25
  44. package/dist/app/lib/blocks/SlotBlocks.d.ts +8 -0
  45. package/dist/app/lib/blocks/SlotBlocks.d.ts.map +1 -0
  46. package/dist/app/lib/blocks/SlotBlocks.js +46 -0
  47. package/dist/app/lib/blocks/block-utils.d.ts +2 -1
  48. package/dist/app/lib/blocks/block-utils.d.ts.map +1 -0
  49. package/dist/app/lib/blocks/block-utils.js +3 -1
  50. package/dist/app/lib/blocks/builtin-blocks.d.ts +2 -0
  51. package/dist/app/lib/blocks/builtin-blocks.d.ts.map +1 -0
  52. package/dist/app/lib/blocks/builtin-blocks.js +55 -0
  53. package/dist/app/lib/blocks/defineBlock.d.ts +4 -0
  54. package/dist/app/lib/blocks/defineBlock.d.ts.map +1 -0
  55. package/dist/app/lib/blocks/defineBlock.js +9 -0
  56. package/dist/app/lib/blocks/editor/EditorHighlights.d.ts +8 -0
  57. package/dist/app/lib/blocks/editor/EditorHighlights.d.ts.map +1 -0
  58. package/dist/app/lib/blocks/editor/EditorHighlights.js +164 -0
  59. package/dist/app/lib/blocks/editor/EditorSupport.d.ts +1 -0
  60. package/dist/app/lib/blocks/editor/EditorSupport.d.ts.map +1 -0
  61. package/dist/app/lib/blocks/editor/EditorSupport.js +17 -10
  62. package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts +1 -0
  63. package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts.map +1 -0
  64. package/dist/app/lib/blocks/editor/block-templates.d.ts +8 -1
  65. package/dist/app/lib/blocks/editor/block-templates.d.ts.map +1 -0
  66. package/dist/app/lib/blocks/editor/block-templates.js +71 -2
  67. package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts +1 -0
  68. package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts.map +1 -0
  69. package/dist/app/lib/blocks/editor/controls.d.ts +1 -0
  70. package/dist/app/lib/blocks/editor/controls.d.ts.map +1 -0
  71. package/dist/app/lib/blocks/editor/create-block.d.ts +10 -0
  72. package/dist/app/lib/blocks/editor/create-block.d.ts.map +1 -0
  73. package/dist/app/lib/blocks/editor/create-block.js +13 -0
  74. package/dist/app/lib/blocks/editor/editor-config.d.ts +77 -8
  75. package/dist/app/lib/blocks/editor/editor-config.d.ts.map +1 -0
  76. package/dist/app/lib/blocks/editor/editor-config.js +29 -62
  77. package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts +4 -0
  78. package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts.map +1 -0
  79. package/dist/app/lib/blocks/editor/installGutenbergHooks.js +126 -21
  80. package/dist/app/lib/blocks/editor/root-blocks.d.ts +7 -0
  81. package/dist/app/lib/blocks/editor/root-blocks.d.ts.map +1 -0
  82. package/dist/app/lib/blocks/editor/root-blocks.js +30 -0
  83. package/dist/app/lib/blocks/editor/usePostEditor.d.ts +12 -1
  84. package/dist/app/lib/blocks/editor/usePostEditor.d.ts.map +1 -0
  85. package/dist/app/lib/blocks/editor/usePostEditor.js +33 -13
  86. package/dist/app/lib/blocks/index.d.ts +8 -5
  87. package/dist/app/lib/blocks/index.d.ts.map +1 -0
  88. package/dist/app/lib/blocks/index.js +7 -5
  89. package/dist/app/lib/blocks/inline-editing.d.ts +10 -0
  90. package/dist/app/lib/blocks/inline-editing.d.ts.map +1 -0
  91. package/dist/app/lib/blocks/inline-editing.js +12 -2
  92. package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts +1 -0
  93. package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts.map +1 -0
  94. package/dist/app/lib/devtools/components/BreakpointIndicator.js +2 -2
  95. package/dist/app/lib/devtools/components/DevUI.d.ts +1 -0
  96. package/dist/app/lib/devtools/components/DevUI.d.ts.map +1 -0
  97. package/dist/app/lib/devtools/components/DevUI.js +3 -2
  98. package/dist/app/lib/devtools/components/GridIndicator.d.ts +2 -0
  99. package/dist/app/lib/devtools/components/GridIndicator.d.ts.map +1 -0
  100. package/dist/app/lib/devtools/components/GridIndicator.js +29 -0
  101. package/dist/app/lib/devtools/dev-tools-store.d.ts +1 -0
  102. package/dist/app/lib/devtools/dev-tools-store.d.ts.map +1 -0
  103. package/dist/app/lib/devtools/hooks/usePersistState.d.ts +2 -1
  104. package/dist/app/lib/devtools/hooks/usePersistState.d.ts.map +1 -0
  105. package/dist/app/lib/devtools/hooks/usePersistState.js +11 -2
  106. package/dist/app/lib/devtools/hooks/useTailwind.d.ts +1394 -349
  107. package/dist/app/lib/devtools/hooks/useTailwind.d.ts.map +1 -0
  108. package/dist/app/lib/devtools/index.d.ts +1 -0
  109. package/dist/app/lib/devtools/index.d.ts.map +1 -0
  110. package/dist/app/lib/devtools/loader.d.ts +1 -0
  111. package/dist/app/lib/devtools/loader.d.ts.map +1 -0
  112. package/dist/app/lib/devtools/loader.js +8 -7
  113. package/dist/app/lib/devtools/tailwind.config.d.ts +1 -0
  114. package/dist/app/lib/devtools/tailwind.config.d.ts.map +1 -0
  115. package/dist/app/lib/devtools/useQueryDebug.d.ts +8 -1
  116. package/dist/app/lib/devtools/useQueryDebug.d.ts.map +1 -0
  117. package/dist/app/lib/devtools/useQueryDebug.js +5 -8
  118. package/dist/app/lib/dynamic/dynamic.d.ts +2 -1
  119. package/dist/app/lib/dynamic/dynamic.d.ts.map +1 -0
  120. package/dist/app/lib/dynamic/dynamic.js +5 -1
  121. package/dist/app/lib/dynamic/index.d.ts +1 -0
  122. package/dist/app/lib/dynamic/index.d.ts.map +1 -0
  123. package/dist/app/lib/hooks/index.d.ts +3 -3
  124. package/dist/app/lib/hooks/index.d.ts.map +1 -0
  125. package/dist/app/lib/hooks/index.js +2 -3
  126. package/dist/app/lib/hooks/{queryUtils.d.ts → query-hooks.d.ts} +42 -3
  127. package/dist/app/lib/hooks/query-hooks.d.ts.map +1 -0
  128. package/dist/app/lib/hooks/{queryUtils.js → query-hooks.js} +96 -29
  129. package/dist/app/lib/hooks/useAppData.d.ts +1 -0
  130. package/dist/app/lib/hooks/useAppData.d.ts.map +1 -0
  131. package/dist/app/lib/hooks/useAppData.js +11 -0
  132. package/dist/app/lib/hooks/useRPC.d.ts +1 -4
  133. package/dist/app/lib/hooks/useRPC.d.ts.map +1 -0
  134. package/dist/app/lib/hooks/useRPC.js +0 -8
  135. package/dist/app/lib/integrations/gravityforms/index.d.ts +3 -0
  136. package/dist/app/lib/integrations/gravityforms/index.d.ts.map +1 -0
  137. package/dist/app/lib/integrations/gravityforms/index.js +2 -0
  138. package/dist/app/lib/integrations/gravityforms/types.d.ts +145 -0
  139. package/dist/app/lib/integrations/gravityforms/types.d.ts.map +1 -0
  140. package/dist/app/lib/integrations/gravityforms/types.js +1 -0
  141. package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts +31 -0
  142. package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts.map +1 -0
  143. package/dist/app/lib/integrations/gravityforms/useGravityForm.js +295 -0
  144. package/dist/app/lib/internal/finalize-rpc.d.ts +18 -0
  145. package/dist/app/lib/internal/finalize-rpc.d.ts.map +1 -0
  146. package/dist/app/lib/internal/finalize-rpc.js +3 -0
  147. package/dist/app/lib/internal/index.d.ts +2 -0
  148. package/dist/app/lib/internal/index.d.ts.map +1 -0
  149. package/dist/app/lib/internal/index.js +1 -0
  150. package/dist/app/lib/internal/internal-store.d.ts +1 -0
  151. package/dist/app/lib/internal/internal-store.d.ts.map +1 -0
  152. package/dist/app/lib/internal/read-admin-manifest.d.ts +1 -0
  153. package/dist/app/lib/internal/read-admin-manifest.d.ts.map +1 -0
  154. package/dist/app/lib/internal/read-block-manifest.d.ts +2 -0
  155. package/dist/app/lib/internal/read-block-manifest.d.ts.map +1 -0
  156. package/dist/app/lib/internal/read-block-manifest.js +7 -0
  157. package/dist/app/lib/internal/read-view-manifest.d.ts +7 -4
  158. package/dist/app/lib/internal/read-view-manifest.d.ts.map +1 -0
  159. package/dist/app/lib/internal/read-view-manifest.js +18 -0
  160. package/dist/app/lib/legacy-stitches/createStitches.d.ts +1 -0
  161. package/dist/app/lib/legacy-stitches/createStitches.d.ts.map +1 -0
  162. package/dist/app/lib/legacy-stitches/index.d.ts +1 -0
  163. package/dist/app/lib/legacy-stitches/index.d.ts.map +1 -0
  164. package/dist/app/lib/routing/components/BackButton.d.ts +50 -0
  165. package/dist/app/lib/routing/components/BackButton.d.ts.map +1 -0
  166. package/dist/app/lib/routing/components/BackButton.js +47 -0
  167. package/dist/app/lib/routing/components/BrowserRouter.d.ts +7 -1
  168. package/dist/app/lib/routing/components/BrowserRouter.d.ts.map +1 -0
  169. package/dist/app/lib/routing/components/BrowserRouter.js +168 -31
  170. package/dist/app/lib/routing/components/ClientOnly.d.ts +1 -0
  171. package/dist/app/lib/routing/components/ClientOnly.d.ts.map +1 -0
  172. package/dist/app/lib/routing/components/ClientOnly.js +3 -3
  173. package/dist/app/lib/routing/components/Link.d.ts +22 -2
  174. package/dist/app/lib/routing/components/Link.d.ts.map +1 -0
  175. package/dist/app/lib/routing/components/Link.js +53 -25
  176. package/dist/app/lib/routing/components/NativeLinkHandler.d.ts +10 -0
  177. package/dist/app/lib/routing/components/NativeLinkHandler.d.ts.map +1 -0
  178. package/dist/app/lib/routing/components/NativeLinkHandler.js +23 -0
  179. package/dist/app/lib/routing/components/RouteRenderer.d.ts +1 -0
  180. package/dist/app/lib/routing/components/RouteRenderer.d.ts.map +1 -0
  181. package/dist/app/lib/routing/components/RouteRenderer.js +15 -1
  182. package/dist/app/lib/routing/components/SSRRouter.d.ts +3 -0
  183. package/dist/app/lib/routing/components/SSRRouter.d.ts.map +1 -0
  184. package/dist/app/lib/routing/components/SSRRouter.js +2 -0
  185. package/dist/app/lib/routing/components/ScrollRestoration.d.ts +1 -0
  186. package/dist/app/lib/routing/components/ScrollRestoration.d.ts.map +1 -0
  187. package/dist/app/lib/routing/components/ScrollRestoration.js +4 -1
  188. package/dist/app/lib/routing/context.d.ts +9 -5
  189. package/dist/app/lib/routing/context.d.ts.map +1 -0
  190. package/dist/app/lib/routing/context.js +11 -0
  191. package/dist/app/lib/routing/hooks/{useIsSSR.d.ts → useHydrating.d.ts} +7 -0
  192. package/dist/app/lib/routing/hooks/useHydrating.d.ts.map +1 -0
  193. package/dist/app/lib/routing/hooks/{useIsSSR.js → useHydrating.js} +9 -1
  194. package/dist/app/lib/routing/hooks/useRestorableState.d.ts +3 -1
  195. package/dist/app/lib/routing/hooks/useRestorableState.d.ts.map +1 -0
  196. package/dist/app/lib/routing/hooks/useRoute.d.ts +16 -0
  197. package/dist/app/lib/routing/hooks/useRoute.d.ts.map +1 -0
  198. package/dist/app/lib/routing/hooks/useRoute.js +21 -0
  199. package/dist/app/lib/routing/hooks/useRouteMeta.d.ts +1 -0
  200. package/dist/app/lib/routing/hooks/useRouteMeta.d.ts.map +1 -0
  201. package/dist/app/lib/routing/hooks/useRouteTransition.d.ts +1 -0
  202. package/dist/app/lib/routing/hooks/useRouteTransition.d.ts.map +1 -0
  203. package/dist/app/lib/routing/hooks/useRouter.d.ts +1 -0
  204. package/dist/app/lib/routing/hooks/useRouter.d.ts.map +1 -0
  205. package/dist/app/lib/routing/hooks/useRouterEvents.d.ts +1 -0
  206. package/dist/app/lib/routing/hooks/useRouterEvents.d.ts.map +1 -0
  207. package/dist/app/lib/routing/hooks/useRouterState.d.ts +1 -0
  208. package/dist/app/lib/routing/hooks/useRouterState.d.ts.map +1 -0
  209. package/dist/app/lib/routing/hooks/useSearchParams.d.ts +78 -6
  210. package/dist/app/lib/routing/hooks/useSearchParams.d.ts.map +1 -0
  211. package/dist/app/lib/routing/hooks/useSearchParams.js +75 -15
  212. package/dist/app/lib/routing/index.d.ts +5 -1
  213. package/dist/app/lib/routing/index.d.ts.map +1 -0
  214. package/dist/app/lib/routing/index.js +4 -1
  215. package/dist/app/lib/routing/loader.d.ts +1 -0
  216. package/dist/app/lib/routing/loader.d.ts.map +1 -0
  217. package/dist/app/lib/routing/loader.js +19 -10
  218. package/dist/app/lib/routing/types.d.ts +61 -8
  219. package/dist/app/lib/routing/types.d.ts.map +1 -0
  220. package/dist/app/lib/routing/utils.d.ts +5 -1
  221. package/dist/app/lib/routing/utils.d.ts.map +1 -0
  222. package/dist/app/lib/routing/utils.js +36 -4
  223. package/dist/app/lib/{hooks → runtime}/apiConfig.d.ts +11 -2
  224. package/dist/app/lib/runtime/apiConfig.d.ts.map +1 -0
  225. package/dist/app/lib/runtime/apiConfig.js +6 -0
  226. package/dist/app/lib/runtime/errorHandling.d.ts +40 -0
  227. package/dist/app/lib/runtime/errorHandling.d.ts.map +1 -0
  228. package/dist/app/lib/runtime/errorHandling.js +6 -0
  229. package/dist/app/lib/runtime/index.d.ts +3 -0
  230. package/dist/app/lib/runtime/index.d.ts.map +1 -0
  231. package/dist/app/lib/runtime/index.js +2 -0
  232. package/dist/app/lib/views/defineView.d.ts +2 -1
  233. package/dist/app/lib/views/defineView.d.ts.map +1 -0
  234. package/dist/app/lib/views/index.d.ts +1 -0
  235. package/dist/app/lib/views/index.d.ts.map +1 -0
  236. package/dist/app/server/index.d.ts +4 -1
  237. package/dist/app/server/index.d.ts.map +1 -0
  238. package/dist/app/server/index.js +3 -1
  239. package/dist/app/server/proxy-wp-admin.d.ts +2 -2
  240. package/dist/app/server/proxy-wp-admin.d.ts.map +1 -0
  241. package/dist/app/server/proxy-wp-admin.js +45 -12
  242. package/dist/app/server/render-ai-page.d.ts +13 -0
  243. package/dist/app/server/render-ai-page.d.ts.map +1 -0
  244. package/dist/app/server/render-ai-page.js +102 -0
  245. package/dist/app/server/render-ssr-page.d.ts +32 -3
  246. package/dist/app/server/render-ssr-page.d.ts.map +1 -0
  247. package/dist/app/server/render-ssr-page.js +229 -10
  248. package/dist/app/server/rpc.d.ts +52 -0
  249. package/dist/app/server/rpc.d.ts.map +1 -0
  250. package/dist/app/server/rpc.js +18 -0
  251. package/dist/app/server/server-context.d.ts +48 -8
  252. package/dist/app/server/server-context.d.ts.map +1 -0
  253. package/dist/app/server/server-context.js +366 -45
  254. package/dist/app/server/server-custom-config.d.ts +3 -0
  255. package/dist/app/server/server-custom-config.d.ts.map +1 -0
  256. package/dist/app/server/server-custom-config.js +1 -0
  257. package/dist/app/server/utils/content-security.d.ts +26 -0
  258. package/dist/app/server/utils/content-security.d.ts.map +1 -0
  259. package/dist/app/server/utils/content-security.js +124 -0
  260. package/dist/app/server/utils/headers.d.ts +1 -0
  261. package/dist/app/server/utils/headers.d.ts.map +1 -0
  262. package/dist/app/server/utils/replace-host.d.ts +2 -1
  263. package/dist/app/server/utils/replace-host.d.ts.map +1 -0
  264. package/dist/app/server/utils/replace-host.js +10 -2
  265. package/dist/app/server/utils/swr-cache.d.ts +5 -0
  266. package/dist/app/server/utils/swr-cache.d.ts.map +1 -0
  267. package/dist/app/server/utils/swr-cache.js +31 -0
  268. package/dist/app/utils/APIProvider.d.ts +3 -0
  269. package/dist/app/utils/APIProvider.d.ts.map +1 -0
  270. package/dist/app/utils/APIProvider.js +5 -0
  271. package/dist/app/utils/BlockErrorBoundary.d.ts +20 -0
  272. package/dist/app/utils/BlockErrorBoundary.d.ts.map +1 -0
  273. package/dist/app/utils/BlockErrorBoundary.js +38 -0
  274. package/dist/app/utils/ErrorMessage.d.ts +6 -0
  275. package/dist/app/utils/ErrorMessage.d.ts.map +1 -0
  276. package/dist/app/utils/ErrorMessage.js +14 -0
  277. package/dist/app/utils/RouteErrorBoundary.d.ts +20 -0
  278. package/dist/app/utils/RouteErrorBoundary.d.ts.map +1 -0
  279. package/dist/app/utils/RouteErrorBoundary.js +41 -0
  280. package/dist/app/utils/asset-capture.d.ts +3 -0
  281. package/dist/app/utils/asset-capture.d.ts.map +1 -0
  282. package/dist/app/utils/asset-capture.js +5 -0
  283. package/dist/app/utils/hydration-debugger.d.ts +14 -0
  284. package/dist/app/utils/hydration-debugger.d.ts.map +1 -0
  285. package/dist/app/utils/hydration-debugger.js +11 -0
  286. package/dist/app/utils/query-client.d.ts +3 -0
  287. package/dist/app/utils/query-client.d.ts.map +1 -0
  288. package/dist/app/utils/query-client.js +5 -1
  289. package/dist/app/utils/query-monitor.d.ts +27 -0
  290. package/dist/app/utils/query-monitor.d.ts.map +1 -0
  291. package/dist/app/utils/query-monitor.js +7 -0
  292. package/dist/app/utils/trpc-client.d.ts +3 -0
  293. package/dist/app/utils/trpc-client.d.ts.map +1 -0
  294. package/dist/app/utils/trpc-client.js +39 -0
  295. package/dist/app/utils/wp.d.ts +11 -10
  296. package/dist/app/utils/wp.d.ts.map +1 -0
  297. package/dist/node/cli/cli-mode.d.ts +1 -0
  298. package/dist/node/cli/cli-mode.d.ts.map +1 -0
  299. package/dist/node/cli/cli-worker.d.ts +1 -0
  300. package/dist/node/cli/cli-worker.d.ts.map +1 -0
  301. package/dist/node/cli/cli-worker.js +7 -3
  302. package/dist/node/cli/cli.d.ts +1 -0
  303. package/dist/node/cli/cli.d.ts.map +1 -0
  304. package/dist/node/cli/cli.js +120 -7
  305. package/dist/node/cli/display/CLIApp.d.ts +1 -0
  306. package/dist/node/cli/display/CLIApp.d.ts.map +1 -0
  307. package/dist/node/cli/display/CLIApp.js +1 -1
  308. package/dist/node/cli/display/boot-cli-app.d.ts +1 -0
  309. package/dist/node/cli/display/boot-cli-app.d.ts.map +1 -0
  310. package/dist/node/cli/display/boot-cli-app.js +1 -1
  311. package/dist/node/cli/display/components/Fullscreen.d.ts +1 -0
  312. package/dist/node/cli/display/components/Fullscreen.d.ts.map +1 -0
  313. package/dist/node/cli/display/components/LogEntries.d.ts +1 -0
  314. package/dist/node/cli/display/components/LogEntries.d.ts.map +1 -0
  315. package/dist/node/cli/display/components/MenuItem.d.ts +1 -0
  316. package/dist/node/cli/display/components/MenuItem.d.ts.map +1 -0
  317. package/dist/node/cli/display/components/TextInput.d.ts +1 -0
  318. package/dist/node/cli/display/components/TextInput.d.ts.map +1 -0
  319. package/dist/node/cli/display/hooks/useManifest.d.ts +1 -0
  320. package/dist/node/cli/display/hooks/useManifest.d.ts.map +1 -0
  321. package/dist/node/cli/display/hooks/useStatefulLog.d.ts +1 -0
  322. package/dist/node/cli/display/hooks/useStatefulLog.d.ts.map +1 -0
  323. package/dist/node/cli/display/tools/BlockList.d.ts +1 -0
  324. package/dist/node/cli/display/tools/BlockList.d.ts.map +1 -0
  325. package/dist/node/cli/display/tools/CreateBlock.d.ts +1 -0
  326. package/dist/node/cli/display/tools/CreateBlock.d.ts.map +1 -0
  327. package/dist/node/cli/display/tools/cli-tool-list.d.ts +1 -0
  328. package/dist/node/cli/display/tools/cli-tool-list.d.ts.map +1 -0
  329. package/dist/node/cli/display/tools/cli-tools.d.ts +1 -0
  330. package/dist/node/cli/display/tools/cli-tools.d.ts.map +1 -0
  331. package/dist/node/cli/display/util/colors.d.ts +1 -0
  332. package/dist/node/cli/display/util/colors.d.ts.map +1 -0
  333. package/dist/node/cli/version.d.ts +2 -1
  334. package/dist/node/cli/version.d.ts.map +1 -0
  335. package/dist/node/cli/version.js +1 -1
  336. package/dist/node/compiler/build-vinxi.d.ts +1 -0
  337. package/dist/node/compiler/build-vinxi.d.ts.map +1 -0
  338. package/dist/node/compiler/build-vinxi.js +3 -1
  339. package/dist/node/compiler/bundler.admin.d.ts +1 -0
  340. package/dist/node/compiler/bundler.admin.d.ts.map +1 -0
  341. package/dist/node/compiler/bundler.admin.js +1 -0
  342. package/dist/node/compiler/bundler.frontend.d.ts +2 -0
  343. package/dist/node/compiler/bundler.frontend.d.ts.map +1 -0
  344. package/dist/node/compiler/bundler.frontend.js +26 -11
  345. package/dist/node/compiler/cache-config.d.ts +3 -0
  346. package/dist/node/compiler/cache-config.d.ts.map +1 -0
  347. package/dist/node/compiler/cache-config.js +16 -0
  348. package/dist/node/compiler/dev-server.d.ts +4 -1
  349. package/dist/node/compiler/dev-server.d.ts.map +1 -0
  350. package/dist/node/compiler/dev-server.js +34 -11
  351. package/dist/node/compiler/get-vite-config.d.ts +12 -1
  352. package/dist/node/compiler/get-vite-config.d.ts.map +1 -0
  353. package/dist/node/compiler/get-vite-config.js +176 -42
  354. package/dist/node/compiler/vinxi-app.d.ts +4 -0
  355. package/dist/node/compiler/vinxi-app.d.ts.map +1 -0
  356. package/dist/node/compiler/vinxi-app.js +137 -37
  357. package/dist/node/compiler/vinxi-codegen.d.ts +1 -0
  358. package/dist/node/compiler/vinxi-codegen.d.ts.map +1 -0
  359. package/dist/node/compiler/vinxi-codegen.js +362 -116
  360. package/dist/node/graphql/graphql-codegen.d.ts +12 -1
  361. package/dist/node/graphql/graphql-codegen.d.ts.map +1 -0
  362. package/dist/node/graphql/graphql-codegen.js +239 -37
  363. package/dist/node/graphql/graphql-schema-loader.d.ts +3 -1
  364. package/dist/node/graphql/graphql-schema-loader.d.ts.map +1 -0
  365. package/dist/node/graphql/graphql-schema-loader.js +5 -16
  366. package/dist/node/graphql/plugins/gql-plugin-files.d.ts +3 -1
  367. package/dist/node/graphql/plugins/gql-plugin-files.d.ts.map +1 -0
  368. package/dist/node/graphql/plugins/gql-plugin-files.js +3 -2
  369. package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts +1 -0
  370. package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts.map +1 -0
  371. package/dist/node/graphql/plugins/gql-plugin-queries.d.ts +1 -0
  372. package/dist/node/graphql/plugins/gql-plugin-queries.d.ts.map +1 -0
  373. package/dist/node/graphql/plugins/gql-plugin-queries.js +2 -2
  374. package/dist/node/graphql/query-files-loader.d.ts +4 -0
  375. package/dist/node/graphql/query-files-loader.d.ts.map +1 -0
  376. package/dist/node/graphql/query-files-loader.js +5 -0
  377. package/dist/node/graphql/wp-info-query.d.ts +1 -0
  378. package/dist/node/graphql/wp-info-query.d.ts.map +1 -0
  379. package/dist/node/project/config.d.ts +260 -69
  380. package/dist/node/project/config.d.ts.map +1 -0
  381. package/dist/node/project/config.js +100 -21
  382. package/dist/node/project/eddev-build-file.d.ts +1 -0
  383. package/dist/node/project/eddev-build-file.d.ts.map +1 -0
  384. package/dist/node/project/eddev-build-file.js +4 -2
  385. package/dist/node/project/env.d.ts +5 -0
  386. package/dist/node/project/env.d.ts.map +1 -0
  387. package/dist/node/project/env.js +1 -0
  388. package/dist/node/project/favicons.d.ts +1 -0
  389. package/dist/node/project/favicons.d.ts.map +1 -0
  390. package/dist/node/project/manifest/block-manifest.d.ts +1 -0
  391. package/dist/node/project/manifest/block-manifest.d.ts.map +1 -0
  392. package/dist/node/project/manifest/block-manifest.js +6 -2
  393. package/dist/node/project/manifest/field-manifest.d.ts +1 -0
  394. package/dist/node/project/manifest/field-manifest.d.ts.map +1 -0
  395. package/dist/node/project/manifest/manifest.d.ts +2 -0
  396. package/dist/node/project/manifest/manifest.d.ts.map +1 -0
  397. package/dist/node/project/manifest/manifest.js +14 -10
  398. package/dist/node/project/manifest/routes-manifest.d.ts +21 -0
  399. package/dist/node/project/manifest/routes-manifest.d.ts.map +1 -0
  400. package/dist/node/project/manifest/routes-manifest.js +74 -0
  401. package/dist/node/project/manifest/view-manifest.d.ts +1 -0
  402. package/dist/node/project/manifest/view-manifest.d.ts.map +1 -0
  403. package/dist/node/project/manifest/widget-manifest.d.ts +1 -0
  404. package/dist/node/project/manifest/widget-manifest.d.ts.map +1 -0
  405. package/dist/node/project/project.d.ts +12 -0
  406. package/dist/node/project/project.d.ts.map +1 -0
  407. package/dist/node/project/project.js +55 -1
  408. package/dist/node/project/wp-info.d.ts +3 -0
  409. package/dist/node/project/wp-info.d.ts.map +1 -0
  410. package/dist/node/project/wp-info.js +10 -1
  411. package/dist/node/storybook/index.d.ts +3 -0
  412. package/dist/node/storybook/index.d.ts.map +1 -0
  413. package/dist/node/storybook/index.js +13 -0
  414. package/dist/node/types/block-type.d.ts +39 -7
  415. package/dist/node/types/block-type.d.ts.map +1 -0
  416. package/dist/node/types/block-type.js +4 -1
  417. package/dist/node/types/view-type.d.ts +1 -0
  418. package/dist/node/types/view-type.d.ts.map +1 -0
  419. package/dist/node/utils/fetch-wp.d.ts +2 -0
  420. package/dist/node/utils/fetch-wp.d.ts.map +1 -0
  421. package/dist/node/utils/fetch-wp.js +28 -0
  422. package/dist/node/utils/format-zod-error.d.ts +1 -0
  423. package/dist/node/utils/format-zod-error.d.ts.map +1 -0
  424. package/dist/node/utils/fs-codegen.d.ts +4 -0
  425. package/dist/node/utils/fs-codegen.d.ts.map +1 -0
  426. package/dist/node/utils/fs-codegen.js +10 -2
  427. package/dist/node/utils/fs.d.ts +6 -1
  428. package/dist/node/utils/fs.d.ts.map +1 -0
  429. package/dist/node/utils/get-repo-info.d.ts +1 -0
  430. package/dist/node/utils/get-repo-info.d.ts.map +1 -0
  431. package/dist/node/utils/helpers.d.ts +1 -0
  432. package/dist/node/utils/helpers.d.ts.map +1 -0
  433. package/dist/node/utils/highlight-code.d.ts +1 -0
  434. package/dist/node/utils/highlight-code.d.ts.map +1 -0
  435. package/dist/node/utils/is-deploying.d.ts +1 -0
  436. package/dist/node/utils/is-deploying.d.ts.map +1 -0
  437. package/dist/node/utils/is-deploying.js +1 -1
  438. package/dist/node/utils/report-builder.d.ts +7 -6
  439. package/dist/node/utils/report-builder.d.ts.map +1 -0
  440. package/dist/node/utils/self-signed-cert.d.ts +5 -0
  441. package/dist/node/utils/self-signed-cert.d.ts.map +1 -0
  442. package/dist/node/utils/self-signed-cert.js +28 -4
  443. package/dist/node/utils/stateful-log.d.ts +1 -0
  444. package/dist/node/utils/stateful-log.d.ts.map +1 -0
  445. package/dist/node/utils/stateful-log.js +2 -0
  446. package/dist/node/utils/ts-export-extractor.d.ts +1 -0
  447. package/dist/node/utils/ts-export-extractor.d.ts.map +1 -0
  448. package/dist/node/utils/watch-file-tree.d.ts +18 -3
  449. package/dist/node/utils/watch-file-tree.d.ts.map +1 -0
  450. package/dist/node/utils/watch-file-tree.js +12 -5
  451. package/package.json +39 -24
  452. package/tsconfig.app.json +8 -3
  453. package/tsconfig.node.json +1 -0
  454. package/types.app.d.ts +2 -0
  455. package/types.env.d.ts +3 -0
  456. package/types.meta.d.ts +449 -136
  457. package/dist/app/lib/blocks/ErrorBoundaryFrontend.d.ts +0 -15
  458. package/dist/app/lib/blocks/ErrorBoundaryFrontend.js +0 -35
  459. package/dist/app/lib/hooks/apiConfig.js +0 -4
  460. package/dist/app/lib/hooks/usePageLoad.d.ts +0 -6
  461. package/dist/app/lib/hooks/usePageLoad.js +0 -5
@@ -92,3 +92,7 @@
92
92
  .acf-block-panel .acf-empty-block-fields {
93
93
  display: none;
94
94
  }
95
+
96
+ .simple-appender {
97
+ display: inline-flex !important;
98
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HydrationOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HydrationOverlay.d.ts","sourceRoot":"","sources":["../../../src/app/entry/HydrationOverlay.tsx"],"names":[],"mappings":"AAqKA,OAAO,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ // "use client"
2
+ export {};
@@ -1,6 +1,8 @@
1
1
  import { RouteMetaTag } from "../lib/routing";
2
2
  type Props = {
3
+ debugKey?: string;
3
4
  tags: RouteMetaTag[];
4
5
  };
5
6
  export declare function MetaTags(props: Props): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
8
+ //# sourceMappingURL=MetaTags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetaTags.d.ts","sourceRoot":"","sources":["../../../src/app/entry/MetaTags.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,YAAY,EAAE,CAAA;CACrB,CAAA;AAiBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,2CAqBpC"}
@@ -1,17 +1,30 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ const REACT_ATTRIBUTES = {
4
+ class: "className",
5
+ "http-equiv": "httpEquiv",
6
+ "accept-charset": "acceptCharset",
7
+ };
8
+ function toReactAttributes(attributes) {
9
+ return Object.fromEntries(Object.entries(attributes).map(([key, value]) => {
10
+ if (key in REACT_ATTRIBUTES)
11
+ key = REACT_ATTRIBUTES[key];
12
+ return [key, value === "" ? true : value];
13
+ }));
14
+ }
3
15
  export function MetaTags(props) {
4
- return (_jsx(Fragment, { children: props.tags?.map((tag, i) => {
5
- const Component = tag.tagName;
6
- const props = { ...tag.attributes };
7
- if (tag.inner) {
8
- if (tag.tagName === "title") {
9
- props.children = tag.inner;
10
- }
11
- else {
12
- props.dangerouslySetInnerHTML = { __html: tag.inner };
13
- }
16
+ return useMemo(() => (_jsx(_Fragment, { children: props.tags?.map((tag, i) => {
17
+ const Tag = tag.tagName;
18
+ const tagProps = Array.isArray(tag.attributes) ? {} : toReactAttributes(tag.attributes);
19
+ if (tag.tagName === "title") {
20
+ tagProps.children = tag.inner ?? "";
21
+ }
22
+ else if (tag.tagName === "script" || !!tag.inner) {
23
+ tagProps.dangerouslySetInnerHTML = { __html: tag.inner ?? "" };
24
+ }
25
+ if (tagProps.async === "") {
26
+ tagProps.async = true;
14
27
  }
15
- return _jsx(Component, { ...props }, i);
16
- }) }));
28
+ return _jsx(Tag, { ...tagProps }, i);
29
+ }) })), [props.tags]);
17
30
  }
@@ -1 +1,2 @@
1
1
  export default function bootAdmin(): void;
2
+ //# sourceMappingURL=boot-admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-admin.d.ts","sourceRoot":"","sources":["../../../src/app/entry/boot-admin.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,SAAS,SAOhC"}
@@ -2,7 +2,11 @@ import { installFieldTypes } from "../lib/admin/installFieldTypes.js";
2
2
  import { runWidgets } from "../lib/admin/runWidgets.js";
3
3
  import { installEDGutenbergHooks } from "../lib/blocks/editor/installGutenbergHooks.js";
4
4
  export default function bootAdmin() {
5
- installEDGutenbergHooks();
6
- installFieldTypes();
7
- runWidgets();
5
+ if (window.name === "editor-canvas") {
6
+ }
7
+ else {
8
+ installEDGutenbergHooks();
9
+ installFieldTypes();
10
+ runWidgets();
11
+ }
8
12
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hydration-script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration-script.d.ts","sourceRoot":"","sources":["../../../src/app/entry/hydration-script.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { hydrationDebug } from "../utils/hydration-debugger";
2
+ //@ts-nocheck
3
+ // window.addEventListener("error", (event) => {
4
+ // const msg = event.message.toLowerCase()
5
+ // const isHydrationMsg = msg.includes("hydration") || msg.includes("hydrating")
6
+ // if (isHydrationMsg) {
7
+ // hydrationDebug.add({
8
+ // error: event.error,
9
+ // info: null,
10
+ // })
11
+ // }
12
+ // })
13
+ const root = document.getElementById("_app");
14
+ if (root) {
15
+ hydrationDebug.initialHTML = root.innerHTML;
16
+ }
17
+ // @ts-ignore
18
+ window.hydrationDebug = hydrationDebug;
@@ -1 +1,2 @@
1
1
  export declare function SPARoot(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=spa-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spa-root.d.ts","sourceRoot":"","sources":["../../../src/app/entry/spa-root.tsx"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,4CAOtB"}
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { QueryClientProvider } from "@tanstack/react-query";
3
- import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
4
- import { getQueryClient } from "../utils/query-client.js";
5
2
  import { DevUILoader } from "../lib/devtools/loader.js";
6
- import { Suspense } from "react";
3
+ import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
4
+ import { APIProvider } from "../utils/APIProvider.js";
7
5
  export function SPARoot() {
8
- return (_jsxs(QueryClientProvider, { client: getQueryClient(), children: [_jsx(Suspense, { children: _jsx(BrowserRouter, {}) }), _jsx(DevUILoader, {})] }));
6
+ return (_jsxs(APIProvider, { children: [_jsx(BrowserRouter, {}), _jsx(DevUILoader, {})] }));
9
7
  }
@@ -4,3 +4,4 @@ export declare function SSRClientRoot(props: {
4
4
  assets: ReactNode;
5
5
  metaTags: RouteMetaTag[];
6
6
  }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=ssr-root-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr-root-client.d.ts","sourceRoot":"","sources":["../../../src/app/entry/ssr-root-client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAA;AAIhE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAItD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,2CAgBnF"}
@@ -1,16 +1,21 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { QueryClientProvider } from "@tanstack/react-query";
3
- import { Suspense, useRef } from "react";
4
- import { getQueryClient } from "../utils/query-client.js";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Suspense, useEffect } from "react";
3
+ import { useSnapshot } from "valtio";
5
4
  import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
5
+ import { clientMetaTags } from "../lib/routing/context.js";
6
+ import { APIProvider } from "../utils/APIProvider.js";
6
7
  import { DevUILoader } from "../lib/devtools/loader.js";
7
- import { MetaTags } from "./MetaTags.js";
8
- import { useRouteMeta } from "../lib/routing/hooks/useRouteMeta.js";
9
8
  export function SSRClientRoot(props) {
10
- const router = useRef(null);
11
- return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(DynamicMetaTags, { tags: props.metaTags, router: router }), props.assets] }), _jsx("body", { children: _jsxs(QueryClientProvider, { client: getQueryClient(), children: [_jsx(Suspense, { children: _jsx(BrowserRouter, { routerRef: router }) }), _jsx(DevUILoader, {})] }) })] }));
9
+ return (_jsxs(APIProvider, { children: [_jsx(BrowserRouter, {}), _jsx(_Fragment, { children: _jsx(DynamicMetaTags, {}) }), _jsx(Suspense, { fallback: null, children: _jsx(_Fragment, { children: _jsx(DevUILoader, {}) }) })] }));
12
10
  }
13
- function DynamicMetaTags(props) {
14
- const data = useRouteMeta();
15
- return _jsx(MetaTags, { tags: data.tags ?? [] });
11
+ function DynamicMetaTags() {
12
+ const dynamicTags = useSnapshot(clientMetaTags).tags;
13
+ useEffect(() => {
14
+ dynamicTags?.forEach((tag) => {
15
+ if (tag.tagName === "title") {
16
+ document.title = tag.inner ?? "";
17
+ }
18
+ });
19
+ });
20
+ return null;
16
21
  }
@@ -1,10 +1,11 @@
1
- import { type ReactNode } from "react";
2
- import type { RouteData, RouteMetaTag } from "../lib/routing/types.js";
3
1
  import type { RouteLoader } from "../lib/routing/loader.js";
2
+ import type { RouteData, RouteMetaTag } from "../lib/routing/types.js";
4
3
  export declare function SSRRoot(props: {
4
+ hostname?: string;
5
5
  pathname: string;
6
6
  initialData: RouteData;
7
- assets: ReactNode;
8
7
  loader: RouteLoader;
9
8
  metaTags: RouteMetaTag[];
9
+ isAI?: boolean;
10
10
  }): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=ssr-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr-root.d.ts","sourceRoot":"","sources":["../../../src/app/entry/ssr-root.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAItE,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,SAAS,CAAA;IACtB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,2CAgCA"}
@@ -1,24 +1,22 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense } from "react";
3
- import { QueryClientProvider } from "@tanstack/react-query";
4
- import { getQueryClient } from "../utils/query-client.js";
5
3
  import { SSRRouter } from "../lib/routing/components/SSRRouter.js";
6
- import { normalizeRoute } from "../lib/routing/utils.js";
7
- import { MetaTags } from "./MetaTags.js";
4
+ import { getRouteMeta, normalizeRoute } from "../lib/routing/utils.js";
5
+ import { APIProvider } from "../utils/APIProvider.js";
8
6
  export function SSRRoot(props) {
9
7
  const loader = props.loader;
10
8
  loader.setAppData(props.initialData.appData.data);
11
9
  loader.populateRouteData(props.pathname, props.initialData);
12
- return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(MetaTags, { tags: props.metaTags }), props.assets] }), _jsx("body", { children: _jsx(QueryClientProvider, { client: getQueryClient(), children: _jsx(Suspense, { children: _jsx(SSRRouter, { loader: loader, route: normalizeRoute({
13
- id: "initial",
14
- component: loader.getRouteComponent(props.initialData.view),
15
- key: "",
16
- props: props.initialData.viewData.data,
17
- view: props.initialData.view,
18
- search: "",
19
- pathname: props.pathname,
20
- query: {},
21
- hash: "",
22
- meta: {},
23
- }) }) }) }) })] }));
10
+ return (_jsxs(APIProvider, { children: [_jsx(SSRRouter, { loader: loader, hostname: props.hostname, isAI: props.isAI, route: normalizeRoute({
11
+ id: "initial",
12
+ component: loader.getRouteComponent(props.initialData.view),
13
+ key: "",
14
+ props: props.initialData.viewData.data,
15
+ view: props.initialData.view,
16
+ search: "",
17
+ pathname: props.pathname,
18
+ query: {},
19
+ hash: "",
20
+ meta: getRouteMeta(props.initialData),
21
+ }) }), _jsx(_Fragment, {}), _jsx(Suspense, { fallback: null, children: _jsx(_Fragment, {}) })] }));
24
22
  }
@@ -12,3 +12,4 @@ export type FieldTypeDefinition<T> = {
12
12
  validate?: (value: T) => boolean | string;
13
13
  };
14
14
  export declare function defineField<T>(args: FieldTypeDefinition<T>): FieldTypeDefinition<T>;
15
+ //# sourceMappingURL=defineField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineField.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/admin/defineField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAC1B,KAAK,EAAE,CAAC,CAAA;IACR,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,QAAQ,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,YAAY,CAAA;IAC9C,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,MAAM,CAAA;CAC1C,CAAA;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,0BAE1D"}
@@ -8,3 +8,4 @@ export declare function defineWidget(name: string, component: ComponentType<Widg
8
8
  component: ComponentType<WidgetProps>;
9
9
  };
10
10
  export {};
11
+ //# sourceMappingURL=defineWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineWidget.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/admin/defineWidget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,aAAa,EAAE,MAAM,OAAO,CAAA;AAEnD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC;;;EAK/E"}
@@ -1,2 +1,3 @@
1
1
  export * from "./defineField.js";
2
2
  export * from "./defineWidget.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
@@ -1 +1,2 @@
1
1
  export declare function installFieldTypes(): void;
2
+ //# sourceMappingURL=installFieldTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installFieldTypes.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/admin/installFieldTypes.tsx"],"names":[],"mappings":"AAKA,wBAAgB,iBAAiB,SAwChC"}
@@ -27,6 +27,8 @@ export function installFieldTypes() {
27
27
  const input = $el.find("input[type='hidden']");
28
28
  const container = document.createElement("div");
29
29
  $el.append(container);
30
+ $el.find(".ed-acf-field").remove();
31
+ container.classList.add("ed-acf-field");
30
32
  ReactDOM.createRoot(container).render(_jsx(FieldInstance, { field: data, input: input[0], settings: input.data("settings") }));
31
33
  };
32
34
  // Register with ACF
@@ -1 +1,2 @@
1
1
  export declare function runWidgets(): void;
2
+ //# sourceMappingURL=runWidgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runWidgets.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/admin/runWidgets.tsx"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,SAiBzB"}
@@ -3,8 +3,8 @@ import { useEffect, useState } from "react";
3
3
  import * as ReactDOM from "react-dom/client";
4
4
  import { adminManifestReader } from "../internal/read-admin-manifest.js";
5
5
  export function runWidgets() {
6
- const elements = document.querySelectorAll("[data-widget]");
7
6
  setTimeout(() => {
7
+ const elements = document.querySelectorAll("[data-widget]");
8
8
  elements.forEach((el) => {
9
9
  if (el instanceof HTMLElement) {
10
10
  const data = el.dataset;
@@ -13,12 +13,17 @@ export function runWidgets() {
13
13
  root.render(_jsx("div", { children: _jsx(WidgetInstance, { widget: name, element: el, dataset: data }) }));
14
14
  }
15
15
  });
16
- }, 1000);
16
+ }, 10);
17
17
  }
18
18
  function WidgetInstance(props) {
19
19
  const [widget, setComponent] = useState(null);
20
20
  useEffect(() => {
21
21
  function loadComponent() {
22
+ if (props.widget in adminManifestReader.value.widgets === false) {
23
+ console.warn(`Unknown widget '${props.widget}', initialized via data-widget="${props.widget}".\n - Did you mean one of: ${JSON.stringify(Object.keys(adminManifestReader.value.widgets))}`);
24
+ setComponent(null);
25
+ return;
26
+ }
22
27
  adminManifestReader.value.widgets[props.widget]().then((widget) => {
23
28
  const Component = widget.component;
24
29
  if (Component) {
@@ -5,7 +5,7 @@ type TypedContentBlock<TName, TProps> = {
5
5
  slug: TName;
6
6
  props: TProps;
7
7
  attrs: any;
8
- innerBlocks: ContentBlock[];
8
+ innerBlocks?: ContentBlock[];
9
9
  innerHTML?: string;
10
10
  innerContent?: string[];
11
11
  rule: string;
@@ -20,13 +20,14 @@ export type ContentBlock = {
20
20
  /**
21
21
  * Represents a block instance's position in the hierarchy via relationships with other blocks.
22
22
  */
23
- type BlocksContext = {
23
+ export type BlocksContext = {
24
24
  ancestors: ContentBlock[];
25
25
  parent?: ContentBlock;
26
26
  prev?: ContentBlock;
27
27
  next?: ContentBlock;
28
28
  current: ContentBlock;
29
29
  readonly?: boolean;
30
+ index: number;
30
31
  };
31
32
  export declare const BlocksContext: import("react").Context<BlocksContext | undefined>;
32
33
  export type ContentBlockLayoutProps = {
@@ -41,8 +42,8 @@ export type ContentBlockLayoutProps = {
41
42
  * }}
42
43
  * ```
43
44
  *
44
- * @param children The React element, which will render the block
45
- * @param ctx An object containing information about the current, previous, and next block and parent blocks.
45
+ * @param children - The React element, which will render the block
46
+ * @param ctx - An object containing information about the current, previous, and next block and parent blocks.
46
47
  * @returns Return the `children` parameter, optionally wrapped by another element.
47
48
  */
48
49
  wrapBlock?: (children: ReactElement, ctx: BlocksContext) => ReactElement;
@@ -58,13 +59,14 @@ export type ContentBlockLayoutProps = {
58
59
  * }}
59
60
  * ```
60
61
  *
61
- * @param ctx
62
+ * @param ctx - An object containing information about the current, previous, and next block and parent blocks.
62
63
  */
63
64
  spacer?: (ctx: {
64
65
  ancestors: ContentBlock[];
65
66
  parent?: ContentBlock;
66
67
  prev: ContentBlock | null;
67
68
  next: ContentBlock | null;
69
+ index: number;
68
70
  }) => ReactElement | null;
69
71
  };
70
72
  type Props = {
@@ -81,3 +83,4 @@ type SingleProps = {
81
83
  };
82
84
  export declare function SingleContentBlock(props: SingleProps): import("react/jsx-runtime").JSX.Element | null;
83
85
  export {};
86
+ //# sourceMappingURL=ContentBlocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentBlocks.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/ContentBlocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,YAAY,EAA4C,MAAM,OAAO,CAAA;AAO3G,KAAK,iBAAiB,CAAC,KAAK,EAAE,MAAM,IAAI;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,GAAG,CAAA;IACV,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,GAAG,CAAA;CACZ,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAE5B;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;KACxB,CAAC,IAAI,MAAM,UAAU,GAAG,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAC7D,CAAC,MAAM,UAAU,CAAC,CAAA;AAEnB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,YAAY,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,aAAa,oDAAsD,CAAA;AAEhF,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,KAAK,YAAY,CAAA;IACxE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,YAAY,EAAE,CAAA;QACzB,MAAM,CAAC,EAAE,YAAY,CAAA;QACrB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;QACzB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;QACzB,KAAK,EAAE,MAAM,CAAA;KACd,KAAK,YAAY,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,KAAK,KAAK,GAAG;IACX,kDAAkD;IAClD,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,GAAG,uBAAuB,CAAA;AAS3B;;GAEG;AACH,eAAO,MAAM,aAAa,8CAAgB,KAAK,oDA8E7C,CAAA;AAIF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,kDA+CpD"}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, createContext, memo, useContext, useMemo } from "react";
3
3
  import { blockManifestReader } from "../internal/read-block-manifest.js";
4
- import { ErrorBoundaryFrontend } from "./ErrorBoundaryFrontend.js";
4
+ import { BlockErrorBoundary } from "../../utils/BlockErrorBoundary.js";
5
5
  import { InlineEditingContextProvider, ReadonlyInlineEditingProvider } from "./inline-editing.js";
6
6
  import { addBlockMetadata } from "./block-utils.js";
7
+ import { useRouter } from "../routing/index.js";
7
8
  export const BlocksContext = createContext(undefined);
8
9
  /**
9
10
  * Render a set of Gutenberg blocks
@@ -25,6 +26,7 @@ export const ContentBlocks = memo((props) => {
25
26
  prev: blockData[index - 1],
26
27
  next: blockData[index + 1],
27
28
  readonly: env.admin,
29
+ index: index,
28
30
  };
29
31
  // Figure out the
30
32
  let blockNode;
@@ -63,7 +65,7 @@ export const ContentBlocks = memo((props) => {
63
65
  }
64
66
  }
65
67
  // Attempt to wrap the block
66
- return (_jsxs(Fragment, { children: [spaceBefore, _jsx(ErrorBoundaryFrontend, { children: blockNode }), spaceAfter] }, index));
68
+ return (_jsxs(Fragment, { children: [spaceBefore, _jsx(BlockErrorBoundary, { block: block, blockContext: ctx, children: blockNode }), spaceAfter] }, block.slug + "_" + index));
67
69
  });
68
70
  }, [blocks, props.wrapBlock, props.spacer]);
69
71
  if (env.admin) {
@@ -83,9 +85,20 @@ export function SingleContentBlock(props) {
83
85
  return null;
84
86
  }
85
87
  }
86
- return (_jsx(InlineEditingContextProvider, { block: [block.blockName, block.props], values: block.inline, innerBlocks: block.innerBlocks, index: props.index ?? 0, children: _jsx(Component, { ...block.props, innerHTML: block.innerHTML,
88
+ block.props = block.props || {};
89
+ // Apply the block style class name
90
+ // @ts-ignore
91
+ block.props.blockStyle = block.class?.replace("is-style-", "");
92
+ let result = (_jsx(InlineEditingContextProvider, { block: [block.blockName, block.props], values: block.inline, innerBlocks: block.innerBlocks ?? [], index: props.index ?? 0, children: _jsx(Component, { ...block.props, innerHTML: block.innerHTML,
87
93
  // innerBlocks={block.innerBlocks}
88
94
  children: Array.isArray(block.innerBlocks) && block.innerBlocks.length ? (_jsx(ContentBlocks, { blocks: block.innerBlocks })) : null }) }));
95
+ if (!env.client && env.serverless) {
96
+ const router = useRouter();
97
+ if (router.isAI) {
98
+ result = _jsx("div", { "data-block-type": props.block.slug, children: result });
99
+ }
100
+ }
101
+ return result;
89
102
  }
90
103
  function useBlockComponent(block) {
91
104
  return blockManifestReader.value[block.blockName];
@@ -1,22 +1,46 @@
1
1
  import { ElementType } from "react";
2
2
  import { InlineValueStore } from "./inline-editing.js";
3
3
  export type InlineTextValueStore = InlineValueStore<string>;
4
+ type BuiltinFormats = "core/bold" | "core/code" | "core/italic" | "core/link" | "core/strikethrough" | "core/underline" | "core/subscript" | "core/superscript" | "core/unknown" | "core/non-breaking-space" | "core/footnote";
4
5
  type Props<T extends ElementType> = {
5
6
  /** Specify a tag name or React component */
6
7
  as?: T;
7
8
  /** Prevents this text element from being multi-line */
8
9
  disableLineBreaks?: boolean;
9
- /** Enables the rich text toolbar */
10
+ /**
11
+ * Specify which formatting options are allowed in this text element (bold, italics etc).
12
+ *
13
+ * By default, all options are enabled.
14
+ *
15
+ * Set to an empty array to disable formatting options.
16
+ *
17
+ * You can register new formats in `_editor.tsx` using the `defineEditorConfig` function.
18
+ **/
19
+ allowedFormats?: (BuiltinFormats | (string & {}))[];
20
+ /**
21
+ * A shortcut for `allowedFormats={[]}`, but also ensures that any formatting is removed automatically.
22
+ *
23
+ * This is useful for ensuring that links are removed when the user pastes content into the editor, or removing them when they already exist within the content.
24
+ */
25
+ plainText?: boolean;
26
+ /**
27
+ * @deprecated use `allowedFormats` instead
28
+ */
10
29
  inlineToolbar?: boolean;
11
30
  /** Specify default content to use on the frontend if nothing has been entered */
12
- defaultValue?: string;
31
+ defaultValue?: string | null | undefined;
13
32
  /**
14
33
  * Append a new block when the user hits 'Enter' while editing this text.
15
34
  * Specify 'true' to append a new paragraph block, or a string to specify a different block type.
16
35
  **/
17
36
  appendOnEnter?: boolean | string;
37
+ /**
38
+ * Remove this block when the user hits 'Backspace' at the start of the text.
39
+ * This is useful for blocks with a single text element
40
+ **/
41
+ removeOnDelete?: boolean;
18
42
  /** An optional placeholder to indicate a typable area */
19
- placeholder?: string;
43
+ placeholder?: string | null;
20
44
  } & {
21
45
  /**
22
46
  * The 'key' of this editable text value.
@@ -31,11 +55,12 @@ type Props<T extends ElementType> = {
31
55
  * This can be combined with `useInlineEditableValue()`, `usePostTitleEditor()` or even `useState()`
32
56
  **/
33
57
  store: InlineTextValueStore | string;
34
- } & Omit<React.ComponentPropsWithoutRef<T>, "id"> & MaybeAsProp<React.ComponentPropsWithoutRef<T>>;
58
+ } & Omit<React.ComponentPropsWithoutRef<T>, "id" | "defaultValue" | "placeholder"> & MaybeAsProp<React.ComponentPropsWithoutRef<T>>;
35
59
  type MaybeAsProp<T> = T extends {
36
60
  as?: infer U;
37
61
  } ? (U extends unknown ? {} : {
38
62
  asProp?: U;
39
63
  }) : {};
40
- export declare function EditableText<T extends ElementType>({ id, as, appendOnEnter, store, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element | null;
64
+ export declare function EditableText<T extends ElementType>({ id, as, appendOnEnter, removeOnDelete, plainText, store, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element | null;
41
65
  export {};
66
+ //# sourceMappingURL=EditableText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,OAAO,CAAA;AAElE,OAAO,EAAE,gBAAgB,EAAoD,MAAM,qBAAqB,CAAA;AAGxG,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAE3D,KAAK,cAAc,GACf,WAAW,GACX,WAAW,GACX,aAAa,GACb,WAAW,GACX,oBAAoB,GACpB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,yBAAyB,GACzB,eAAe,CAAA;AAEnB,KAAK,KAAK,CAAC,CAAC,SAAS,WAAW,IAAI;IAClC,4CAA4C;IAC5C,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;;;;QAQI;IACJ,cAAc,CAAC,EAAE,CAAC,cAAc,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAA;IACnD;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACxC;;;QAGI;IACJ,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAChC;;;QAGI;IACJ,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAE5B,GAAG;IACF;;;;QAII;IACJ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;;QAKI;IACJ,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAA;CACrC,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,cAAc,GAAG,aAAa,CAAC,GAChF,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEhD,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC,SAAS,OAAO,GAAG,EAAE,GAAG;IAAE,MAAM,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,GAAG,EAAE,CAAA;AAEjG,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,EAClD,EAAE,EACF,EAAE,EACF,aAAa,EACb,cAAc,EACd,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,kDAkGV"}
@@ -1,16 +1,43 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
2
3
  import { useRouter } from "../routing/hooks/useRouter.js";
3
4
  import { useBlockAppender, useBlockContext, useValueStore } from "./inline-editing.js";
4
- export function EditableText({ id, as, appendOnEnter, store, ...props }) {
5
+ import { resolveAcfBlockName } from "./editor/block-templates.js";
6
+ export function EditableText({ id, as, appendOnEnter, removeOnDelete, plainText, store, ...props }) {
5
7
  if (env.admin) {
6
8
  const readOnly = useBlockContext()?.readonly;
7
9
  if (!readOnly) {
10
+ const ref = useRef(null);
8
11
  const [value, setValue] = useValueStore(store ?? id);
12
+ // useEffect(() => {
13
+ // if ((plainText || props.allowedFormats?.length === 0) && ref.current && !!value) {
14
+ // const placeholder = ref.current.querySelector("[data-rich-text-placeholder]")
15
+ // if (placeholder) return
16
+ // let wasUpdated = false
17
+ // ref.current?.childNodes.forEach((node) => {
18
+ // if (node.nodeType === Node.ELEMENT_NODE) {
19
+ // const element = node as Element
20
+ // if (element.tagName != "BR") {
21
+ // element.replaceWith(document.createTextNode(element.textContent ?? ""))
22
+ // wasUpdated = true
23
+ // }
24
+ // }
25
+ // })
26
+ // if (wasUpdated) {
27
+ // setValue(ref.current?.innerHTML)
28
+ // }
29
+ // }
30
+ // }, [value, plainText, props.allowedFormats])
9
31
  const appendBlocks = useBlockAppender();
10
- return (_jsx(wp.blockEditor.RichText, { ...props, tagName: as, value: value || "", onChange: setValue, disableLineBreaks: props.disableLineBreaks, onKeyDownCapture: (e) => {
11
- if (e.key === "Enter" && appendOnEnter && appendBlocks) {
32
+ return (_jsx(wp.blockEditor.RichText, { ...props, ref: ref, placeholder: props.defaultValue || props.placeholder, tagName: as, value: value || "", onChange: setValue, allowedFormats: props.inlineToolbar === false || plainText ? [] : props.allowedFormats, disableLineBreaks: props.disableLineBreaks, "data-allowed-formats": props.allowedFormats?.join(" "), onRemove: (forward) => {
33
+ if (removeOnDelete && !forward) {
34
+ const block = wp.data.select("core/block-editor").getSelectedBlock()?.clientId;
35
+ wp.data.dispatch("core/block-editor").removeBlock(block);
36
+ }
37
+ }, onKeyDownCapture: (e) => {
38
+ if (e.key === "Enter" && appendOnEnter && appendBlocks && !e.shiftKey) {
12
39
  appendBlocks([
13
- wp.blocks.createBlock(typeof appendOnEnter === "string" ? appendOnEnter : "core/paragraph"),
40
+ wp.blocks.createBlock(typeof appendOnEnter === "string" ? resolveAcfBlockName(appendOnEnter) : "core/paragraph"),
14
41
  ]);
15
42
  e.preventDefault();
16
43
  e.stopPropagation();
@@ -21,11 +48,13 @@ export function EditableText({ id, as, appendOnEnter, store, ...props }) {
21
48
  let [value] = useValueStore(store ?? id);
22
49
  const handleClickEvent = useRouter((r) => r.handleClickEvent);
23
50
  const otherProps = { ...props };
24
- delete otherProps.inlineToolbar;
25
51
  delete otherProps.disableLineBreaks;
26
52
  delete otherProps.id;
27
53
  otherProps.as = otherProps.asProp ?? undefined;
28
54
  delete otherProps.asProp;
55
+ delete otherProps.allowedFormats;
56
+ delete otherProps.inlineToolbar;
57
+ delete otherProps.disableLineBreaks;
29
58
  delete otherProps.placeholder;
30
59
  if (value === "" || typeof value !== "string") {
31
60
  if (props.defaultValue) {