eddev 2.0.0-beta.99 → 2.1.1
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.
- package/bin/eddev.js +1 -1
- package/css/editor-styles.css +4 -0
- package/dist/app/entry/HydrationOverlay.d.ts +1 -0
- package/dist/app/entry/HydrationOverlay.d.ts.map +1 -0
- package/dist/app/entry/MetaTags.d.ts +1 -0
- package/dist/app/entry/MetaTags.d.ts.map +1 -0
- package/dist/app/entry/MetaTags.js +18 -3
- package/dist/app/entry/boot-admin.d.ts +1 -0
- package/dist/app/entry/boot-admin.d.ts.map +1 -0
- package/dist/app/entry/boot-admin.js +0 -1
- package/dist/app/entry/hydration-script.d.ts +1 -0
- package/dist/app/entry/hydration-script.d.ts.map +1 -0
- package/dist/app/entry/spa-root.d.ts +1 -0
- package/dist/app/entry/spa-root.d.ts.map +1 -0
- package/dist/app/entry/spa-root.js +1 -2
- package/dist/app/entry/ssr-root-client.d.ts +1 -0
- package/dist/app/entry/ssr-root-client.d.ts.map +1 -0
- package/dist/app/entry/ssr-root-client.js +3 -2
- package/dist/app/entry/ssr-root.d.ts +3 -0
- package/dist/app/entry/ssr-root.d.ts.map +1 -0
- package/dist/app/entry/ssr-root.js +3 -3
- package/dist/app/lib/admin/defineField.d.ts +1 -0
- package/dist/app/lib/admin/defineField.d.ts.map +1 -0
- package/dist/app/lib/admin/defineWidget.d.ts +1 -0
- package/dist/app/lib/admin/defineWidget.d.ts.map +1 -0
- package/dist/app/lib/admin/index.d.ts +1 -0
- package/dist/app/lib/admin/index.d.ts.map +1 -0
- package/dist/app/lib/admin/installFieldTypes.d.ts +1 -0
- package/dist/app/lib/admin/installFieldTypes.d.ts.map +1 -0
- package/dist/app/lib/admin/installFieldTypes.js +2 -0
- package/dist/app/lib/admin/runWidgets.d.ts +1 -0
- package/dist/app/lib/admin/runWidgets.d.ts.map +1 -0
- package/dist/app/lib/admin/runWidgets.js +7 -2
- package/dist/app/lib/blocks/BlockPropMutator.d.ts +33 -0
- package/dist/app/lib/blocks/BlockPropMutator.d.ts.map +1 -0
- package/dist/app/lib/blocks/BlockPropMutator.js +20 -0
- package/dist/app/lib/blocks/ContentBlocks.d.ts +7 -4
- package/dist/app/lib/blocks/ContentBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/ContentBlocks.js +14 -1
- package/dist/app/lib/blocks/EditableText.d.ts +30 -5
- package/dist/app/lib/blocks/EditableText.d.ts.map +1 -0
- package/dist/app/lib/blocks/EditableText.js +34 -5
- package/dist/app/lib/blocks/InnerBlocks.d.ts +11 -6
- package/dist/app/lib/blocks/InnerBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/InnerBlocks.js +67 -27
- package/dist/app/lib/blocks/SlotBlocks.d.ts +8 -0
- package/dist/app/lib/blocks/SlotBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/SlotBlocks.js +45 -0
- package/dist/app/lib/blocks/block-utils.d.ts +1 -0
- package/dist/app/lib/blocks/block-utils.d.ts.map +1 -0
- package/dist/app/lib/blocks/block-utils.js +18 -1
- package/dist/app/lib/blocks/builtin-blocks.d.ts +2 -0
- package/dist/app/lib/blocks/builtin-blocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/builtin-blocks.js +55 -0
- package/dist/app/lib/blocks/defineBlock.d.ts +4 -0
- package/dist/app/lib/blocks/defineBlock.d.ts.map +1 -0
- package/dist/app/lib/blocks/defineBlock.js +9 -0
- package/dist/app/lib/blocks/editor/EditingContext.d.ts +2 -0
- package/dist/app/lib/blocks/editor/EditingContext.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/EditingContext.js +31 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.d.ts +1 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.js +43 -9
- package/dist/app/lib/blocks/editor/EditorSupport.d.ts +1 -4
- package/dist/app/lib/blocks/editor/EditorSupport.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/EditorSupport.js +23 -9
- package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts +1 -0
- package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/block-templates.d.ts +8 -1
- package/dist/app/lib/blocks/editor/block-templates.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/block-templates.js +71 -2
- package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts +1 -0
- package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/controls.d.ts +1 -0
- package/dist/app/lib/blocks/editor/controls.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/create-block.d.ts +10 -0
- package/dist/app/lib/blocks/editor/create-block.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/create-block.js +13 -0
- package/dist/app/lib/blocks/editor/editor-config.d.ts +64 -7
- package/dist/app/lib/blocks/editor/editor-config.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/editor-config.js +28 -73
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts +4 -0
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/installGutenbergHooks.js +152 -27
- package/dist/app/lib/blocks/editor/root-blocks.d.ts +1 -0
- package/dist/app/lib/blocks/editor/root-blocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/usePostEditor.d.ts +12 -1
- package/dist/app/lib/blocks/editor/usePostEditor.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/usePostEditor.js +38 -13
- package/dist/app/lib/blocks/index.d.ts +8 -5
- package/dist/app/lib/blocks/index.d.ts.map +1 -0
- package/dist/app/lib/blocks/index.js +8 -5
- package/dist/app/lib/blocks/inline-editing.d.ts +16 -1
- package/dist/app/lib/blocks/inline-editing.d.ts.map +1 -0
- package/dist/app/lib/blocks/inline-editing.js +14 -1
- package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts +1 -0
- package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/BreakpointIndicator.js +1 -1
- package/dist/app/lib/devtools/components/DevUI.d.ts +1 -0
- package/dist/app/lib/devtools/components/DevUI.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/DevUI.js +1 -1
- package/dist/app/lib/devtools/components/GridIndicator.d.ts +1 -0
- package/dist/app/lib/devtools/components/GridIndicator.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/GridIndicator.js +1 -1
- package/dist/app/lib/devtools/dev-tools-store.d.ts +1 -0
- package/dist/app/lib/devtools/dev-tools-store.d.ts.map +1 -0
- package/dist/app/lib/devtools/hooks/usePersistState.d.ts +1 -0
- package/dist/app/lib/devtools/hooks/usePersistState.d.ts.map +1 -0
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts +1358 -313
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts.map +1 -0
- package/dist/app/lib/devtools/index.d.ts +1 -0
- package/dist/app/lib/devtools/index.d.ts.map +1 -0
- package/dist/app/lib/devtools/loader.d.ts +2 -1
- package/dist/app/lib/devtools/loader.d.ts.map +1 -0
- package/dist/app/lib/devtools/loader.js +4 -3
- package/dist/app/lib/devtools/tailwind.config.d.ts +1 -0
- package/dist/app/lib/devtools/tailwind.config.d.ts.map +1 -0
- package/dist/app/lib/devtools/useQueryDebug.d.ts +2 -1
- package/dist/app/lib/devtools/useQueryDebug.d.ts.map +1 -0
- package/dist/app/lib/dynamic/dynamic.d.ts +1 -0
- package/dist/app/lib/dynamic/dynamic.d.ts.map +1 -0
- package/dist/app/lib/dynamic/index.d.ts +1 -0
- package/dist/app/lib/dynamic/index.d.ts.map +1 -0
- package/dist/app/lib/hooks/index.d.ts +2 -1
- package/dist/app/lib/hooks/index.d.ts.map +1 -0
- package/dist/app/lib/hooks/index.js +1 -1
- package/dist/app/lib/hooks/{queryUtils.d.ts → query-hooks.d.ts} +8 -2
- package/dist/app/lib/hooks/query-hooks.d.ts.map +1 -0
- package/dist/app/lib/hooks/{queryUtils.js → query-hooks.js} +43 -11
- package/dist/app/lib/hooks/useAppData.d.ts +1 -0
- package/dist/app/lib/hooks/useAppData.d.ts.map +1 -0
- package/dist/app/lib/hooks/useAppData.js +11 -0
- package/dist/app/lib/hooks/useRPC.d.ts +1 -0
- package/dist/app/lib/hooks/useRPC.d.ts.map +1 -0
- package/dist/app/lib/hooks/useRPC.js +0 -1
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.d.ts +86 -0
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.js +127 -0
- package/dist/app/lib/integrations/gravityforms/field-types.d.ts +137 -0
- package/dist/app/lib/integrations/gravityforms/field-types.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/field-types.js +449 -0
- package/dist/app/lib/integrations/gravityforms/index.d.ts +5 -0
- package/dist/app/lib/integrations/gravityforms/index.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/index.js +4 -0
- package/dist/app/lib/integrations/gravityforms/types.d.ts +64 -0
- package/dist/app/lib/integrations/gravityforms/types.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/types.js +1 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts +75 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.js +397 -0
- package/dist/app/lib/internal/finalize-rpc.d.ts +1 -0
- package/dist/app/lib/internal/finalize-rpc.d.ts.map +1 -0
- package/dist/app/lib/internal/index.d.ts +1 -0
- package/dist/app/lib/internal/index.d.ts.map +1 -0
- package/dist/app/lib/internal/internal-store.d.ts +1 -0
- package/dist/app/lib/internal/internal-store.d.ts.map +1 -0
- package/dist/app/lib/internal/read-admin-manifest.d.ts +1 -0
- package/dist/app/lib/internal/read-admin-manifest.d.ts.map +1 -0
- package/dist/app/lib/internal/read-block-manifest.d.ts +2 -0
- package/dist/app/lib/internal/read-block-manifest.d.ts.map +1 -0
- package/dist/app/lib/internal/read-block-manifest.js +7 -0
- package/dist/app/lib/internal/read-view-manifest.d.ts +7 -4
- package/dist/app/lib/internal/read-view-manifest.d.ts.map +1 -0
- package/dist/app/lib/internal/read-view-manifest.js +18 -0
- package/dist/app/lib/legacy-stitches/createStitches.d.ts +8 -7
- package/dist/app/lib/legacy-stitches/createStitches.d.ts.map +1 -0
- package/dist/app/lib/legacy-stitches/index.d.ts +1 -0
- package/dist/app/lib/legacy-stitches/index.d.ts.map +1 -0
- package/dist/app/lib/routing/components/BackButton.d.ts +1 -0
- package/dist/app/lib/routing/components/BackButton.d.ts.map +1 -0
- package/dist/app/lib/routing/components/BrowserRouter.d.ts +7 -1
- package/dist/app/lib/routing/components/BrowserRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/components/BrowserRouter.js +85 -14
- package/dist/app/lib/routing/components/ClientOnly.d.ts +1 -0
- package/dist/app/lib/routing/components/ClientOnly.d.ts.map +1 -0
- package/dist/app/lib/routing/components/ClientOnly.js +3 -3
- package/dist/app/lib/routing/components/Link.d.ts +21 -2
- package/dist/app/lib/routing/components/Link.d.ts.map +1 -0
- package/dist/app/lib/routing/components/Link.js +52 -23
- package/dist/app/lib/routing/components/NativeLinkHandler.d.ts +10 -0
- package/dist/app/lib/routing/components/NativeLinkHandler.d.ts.map +1 -0
- package/dist/app/lib/routing/components/NativeLinkHandler.js +23 -0
- package/dist/app/lib/routing/components/RouteRenderer.d.ts +1 -0
- package/dist/app/lib/routing/components/RouteRenderer.d.ts.map +1 -0
- package/dist/app/lib/routing/components/RouteRenderer.js +14 -1
- package/dist/app/lib/routing/components/SSRRouter.d.ts +3 -0
- package/dist/app/lib/routing/components/SSRRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/components/SSRRouter.js +2 -0
- package/dist/app/lib/routing/components/ScrollRestoration.d.ts +1 -0
- package/dist/app/lib/routing/components/ScrollRestoration.d.ts.map +1 -0
- package/dist/app/lib/routing/context.d.ts +1 -0
- package/dist/app/lib/routing/context.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/{useIsSSR.d.ts → useHydrating.d.ts} +7 -0
- package/dist/app/lib/routing/hooks/useHydrating.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/{useIsSSR.js → useHydrating.js} +13 -3
- package/dist/app/lib/routing/hooks/useRestorableState.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRestorableState.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRestorableState.js +7 -2
- package/dist/app/lib/routing/hooks/useRoute.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRoute.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouteMeta.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRouteMeta.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouteTransition.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRouteTransition.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouter.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouterEvents.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRouterEvents.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouterState.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useRouterState.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useSearchParams.d.ts +78 -6
- package/dist/app/lib/routing/hooks/useSearchParams.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useSearchParams.js +75 -15
- package/dist/app/lib/routing/index.d.ts +4 -1
- package/dist/app/lib/routing/index.d.ts.map +1 -0
- package/dist/app/lib/routing/index.js +3 -1
- package/dist/app/lib/routing/loader.d.ts +1 -0
- package/dist/app/lib/routing/loader.d.ts.map +1 -0
- package/dist/app/lib/routing/loader.js +1 -1
- package/dist/app/lib/routing/types.d.ts +40 -6
- package/dist/app/lib/routing/types.d.ts.map +1 -0
- package/dist/app/lib/routing/utils.d.ts +2 -0
- package/dist/app/lib/routing/utils.d.ts.map +1 -0
- package/dist/app/lib/routing/utils.js +5 -1
- package/dist/app/lib/runtime/apiConfig.d.ts +5 -0
- package/dist/app/lib/runtime/apiConfig.d.ts.map +1 -0
- package/dist/app/lib/runtime/errorHandling.d.ts +1 -0
- package/dist/app/lib/runtime/errorHandling.d.ts.map +1 -0
- package/dist/app/lib/runtime/index.d.ts +1 -0
- package/dist/app/lib/runtime/index.d.ts.map +1 -0
- package/dist/app/lib/views/defineView.d.ts +2 -1
- package/dist/app/lib/views/defineView.d.ts.map +1 -0
- package/dist/app/lib/views/index.d.ts +1 -0
- package/dist/app/lib/views/index.d.ts.map +1 -0
- package/dist/app/server/index.d.ts +4 -3
- package/dist/app/server/index.d.ts.map +1 -0
- package/dist/app/server/index.js +3 -3
- package/dist/app/server/proxy-wp-admin.d.ts +1 -0
- package/dist/app/server/proxy-wp-admin.d.ts.map +1 -0
- package/dist/app/server/proxy-wp-admin.js +23 -9
- package/dist/app/server/render-ai-page.d.ts +13 -0
- package/dist/app/server/render-ai-page.d.ts.map +1 -0
- package/dist/app/server/render-ai-page.js +102 -0
- package/dist/app/server/render-ssr-page.d.ts +17 -6
- package/dist/app/server/render-ssr-page.d.ts.map +1 -0
- package/dist/app/server/render-ssr-page.js +120 -35
- package/dist/app/server/rpc.d.ts +18 -41
- package/dist/app/server/rpc.d.ts.map +1 -0
- package/dist/app/server/server-context.d.ts +14 -3
- package/dist/app/server/server-context.d.ts.map +1 -0
- package/dist/app/server/server-context.js +204 -21
- package/dist/app/server/server-custom-config.d.ts +3 -0
- package/dist/app/server/server-custom-config.d.ts.map +1 -0
- package/dist/app/server/server-custom-config.js +1 -0
- package/dist/app/server/utils/content-security.d.ts +26 -0
- package/dist/app/server/utils/content-security.d.ts.map +1 -0
- package/dist/app/server/utils/content-security.js +124 -0
- package/dist/app/server/utils/headers.d.ts +1 -0
- package/dist/app/server/utils/headers.d.ts.map +1 -0
- package/dist/app/server/utils/replace-host.d.ts +1 -0
- package/dist/app/server/utils/replace-host.d.ts.map +1 -0
- package/dist/app/server/utils/swr-cache.d.ts +1 -0
- package/dist/app/server/utils/swr-cache.d.ts.map +1 -0
- package/dist/app/utils/APIProvider.d.ts +1 -0
- package/dist/app/utils/APIProvider.d.ts.map +1 -0
- package/dist/app/utils/BlockErrorBoundary.d.ts +1 -0
- package/dist/app/utils/BlockErrorBoundary.d.ts.map +1 -0
- package/dist/app/utils/ErrorMessage.d.ts +1 -0
- package/dist/app/utils/ErrorMessage.d.ts.map +1 -0
- package/dist/app/utils/RouteErrorBoundary.d.ts +2 -0
- package/dist/app/utils/RouteErrorBoundary.d.ts.map +1 -0
- package/dist/app/utils/RouteErrorBoundary.js +3 -0
- package/dist/app/utils/asset-capture.d.ts +1 -0
- package/dist/app/utils/asset-capture.d.ts.map +1 -0
- package/dist/app/utils/hydration-debugger.d.ts +1 -0
- package/dist/app/utils/hydration-debugger.d.ts.map +1 -0
- package/dist/app/utils/query-client.d.ts +1 -0
- package/dist/app/utils/query-client.d.ts.map +1 -0
- package/dist/app/utils/query-monitor.d.ts +27 -0
- package/dist/app/utils/query-monitor.d.ts.map +1 -0
- package/dist/app/utils/query-monitor.js +7 -0
- package/dist/app/utils/trpc-client.d.ts +1 -0
- package/dist/app/utils/trpc-client.d.ts.map +1 -0
- package/dist/app/utils/trpc-client.js +1 -1
- package/dist/app/utils/wp.d.ts +11 -10
- package/dist/app/utils/wp.d.ts.map +1 -0
- package/dist/node/cli/cli-mode.d.ts +1 -0
- package/dist/node/cli/cli-mode.d.ts.map +1 -0
- package/dist/node/cli/cli-worker.d.ts +1 -0
- package/dist/node/cli/cli-worker.d.ts.map +1 -0
- package/dist/node/cli/cli-worker.js +1 -0
- package/dist/node/cli/cli.d.ts +1 -0
- package/dist/node/cli/cli.d.ts.map +1 -0
- package/dist/node/cli/cli.js +102 -11
- package/dist/node/cli/display/CLIApp.d.ts +1 -0
- package/dist/node/cli/display/CLIApp.d.ts.map +1 -0
- package/dist/node/cli/display/boot-cli-app.d.ts +1 -0
- package/dist/node/cli/display/boot-cli-app.d.ts.map +1 -0
- package/dist/node/cli/display/components/Fullscreen.d.ts +1 -0
- package/dist/node/cli/display/components/Fullscreen.d.ts.map +1 -0
- package/dist/node/cli/display/components/LogEntries.d.ts +1 -0
- package/dist/node/cli/display/components/LogEntries.d.ts.map +1 -0
- package/dist/node/cli/display/components/MenuItem.d.ts +1 -0
- package/dist/node/cli/display/components/MenuItem.d.ts.map +1 -0
- package/dist/node/cli/display/components/TextInput.d.ts +1 -0
- package/dist/node/cli/display/components/TextInput.d.ts.map +1 -0
- package/dist/node/cli/display/hooks/useManifest.d.ts +1 -0
- package/dist/node/cli/display/hooks/useManifest.d.ts.map +1 -0
- package/dist/node/cli/display/hooks/useStatefulLog.d.ts +1 -0
- package/dist/node/cli/display/hooks/useStatefulLog.d.ts.map +1 -0
- package/dist/node/cli/display/tools/BlockList.d.ts +1 -0
- package/dist/node/cli/display/tools/BlockList.d.ts.map +1 -0
- package/dist/node/cli/display/tools/CreateBlock.d.ts +1 -0
- package/dist/node/cli/display/tools/CreateBlock.d.ts.map +1 -0
- package/dist/node/cli/display/tools/cli-tool-list.d.ts +1 -0
- package/dist/node/cli/display/tools/cli-tool-list.d.ts.map +1 -0
- package/dist/node/cli/display/tools/cli-tools.d.ts +1 -0
- package/dist/node/cli/display/tools/cli-tools.d.ts.map +1 -0
- package/dist/node/cli/display/util/colors.d.ts +1 -0
- package/dist/node/cli/display/util/colors.d.ts.map +1 -0
- package/dist/node/cli/version.d.ts +2 -1
- package/dist/node/cli/version.d.ts.map +1 -0
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/build-vinxi.d.ts +1 -0
- package/dist/node/compiler/build-vinxi.d.ts.map +1 -0
- package/dist/node/compiler/build-vinxi.js +1 -0
- package/dist/node/compiler/bundler.admin.d.ts +1 -0
- package/dist/node/compiler/bundler.admin.d.ts.map +1 -0
- package/dist/node/compiler/bundler.frontend.d.ts +2 -0
- package/dist/node/compiler/bundler.frontend.d.ts.map +1 -0
- package/dist/node/compiler/bundler.frontend.js +25 -11
- package/dist/node/compiler/cache-config.d.ts +3 -0
- package/dist/node/compiler/cache-config.d.ts.map +1 -0
- package/dist/node/compiler/cache-config.js +16 -0
- package/dist/node/compiler/dev-server.d.ts +4 -1
- package/dist/node/compiler/dev-server.d.ts.map +1 -0
- package/dist/node/compiler/dev-server.js +26 -13
- package/dist/node/compiler/get-vite-config.d.ts +11 -1
- package/dist/node/compiler/get-vite-config.d.ts.map +1 -0
- package/dist/node/compiler/get-vite-config.js +164 -36
- package/dist/node/compiler/vinxi-app.d.ts +1 -0
- package/dist/node/compiler/vinxi-app.d.ts.map +1 -0
- package/dist/node/compiler/vinxi-app.js +56 -39
- package/dist/node/compiler/vinxi-codegen.d.ts +1 -0
- package/dist/node/compiler/vinxi-codegen.d.ts.map +1 -0
- package/dist/node/compiler/vinxi-codegen.js +152 -85
- package/dist/node/graphql/graphql-codegen.d.ts +1 -0
- package/dist/node/graphql/graphql-codegen.d.ts.map +1 -0
- package/dist/node/graphql/graphql-codegen.js +52 -24
- package/dist/node/graphql/graphql-schema-loader.d.ts +1 -0
- package/dist/node/graphql/graphql-schema-loader.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-files.d.ts +3 -1
- package/dist/node/graphql/plugins/gql-plugin-files.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-files.js +3 -2
- package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts +1 -0
- package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.d.ts +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.js +1 -1
- package/dist/node/graphql/query-files-loader.d.ts +1 -0
- package/dist/node/graphql/query-files-loader.d.ts.map +1 -0
- package/dist/node/graphql/wp-info-query.d.ts +1 -0
- package/dist/node/graphql/wp-info-query.d.ts.map +1 -0
- package/dist/node/project/config.d.ts +112 -7
- package/dist/node/project/config.d.ts.map +1 -0
- package/dist/node/project/config.js +54 -24
- package/dist/node/project/eddev-build-file.d.ts +1 -0
- package/dist/node/project/eddev-build-file.d.ts.map +1 -0
- package/dist/node/project/eddev-build-file.js +4 -2
- package/dist/node/project/env.d.ts +1 -0
- package/dist/node/project/env.d.ts.map +1 -0
- package/dist/node/project/favicons.d.ts +1 -0
- package/dist/node/project/favicons.d.ts.map +1 -0
- package/dist/node/project/manifest/block-manifest.d.ts +1 -0
- package/dist/node/project/manifest/block-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/block-manifest.js +7 -2
- package/dist/node/project/manifest/field-manifest.d.ts +1 -0
- package/dist/node/project/manifest/field-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/manifest.d.ts +1 -0
- package/dist/node/project/manifest/manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/routes-manifest.d.ts +1 -0
- package/dist/node/project/manifest/routes-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/routes-manifest.js +1 -1
- package/dist/node/project/manifest/view-manifest.d.ts +1 -0
- package/dist/node/project/manifest/view-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/widget-manifest.d.ts +1 -0
- package/dist/node/project/manifest/widget-manifest.d.ts.map +1 -0
- package/dist/node/project/project.d.ts +4 -0
- package/dist/node/project/project.d.ts.map +1 -0
- package/dist/node/project/project.js +24 -1
- package/dist/node/project/wp-info.d.ts +2 -0
- package/dist/node/project/wp-info.d.ts.map +1 -0
- package/dist/node/storybook/index.d.ts +3 -0
- package/dist/node/storybook/index.d.ts.map +1 -0
- package/dist/node/storybook/index.js +13 -0
- package/dist/node/types/block-type.d.ts +33 -6
- package/dist/node/types/block-type.d.ts.map +1 -0
- package/dist/node/types/block-type.js +3 -1
- package/dist/node/types/view-type.d.ts +1 -0
- package/dist/node/types/view-type.d.ts.map +1 -0
- package/dist/node/utils/fetch-wp.d.ts +1 -0
- package/dist/node/utils/fetch-wp.d.ts.map +1 -0
- package/dist/node/utils/fetch-wp.js +4 -3
- package/dist/node/utils/format-zod-error.d.ts +1 -0
- package/dist/node/utils/format-zod-error.d.ts.map +1 -0
- package/dist/node/utils/fs-codegen.d.ts +2 -0
- package/dist/node/utils/fs-codegen.d.ts.map +1 -0
- package/dist/node/utils/fs-codegen.js +8 -1
- package/dist/node/utils/fs.d.ts +24 -16
- package/dist/node/utils/fs.d.ts.map +1 -0
- package/dist/node/utils/get-repo-info.d.ts +1 -0
- package/dist/node/utils/get-repo-info.d.ts.map +1 -0
- package/dist/node/utils/helpers.d.ts +1 -0
- package/dist/node/utils/helpers.d.ts.map +1 -0
- package/dist/node/utils/highlight-code.d.ts +1 -0
- package/dist/node/utils/highlight-code.d.ts.map +1 -0
- package/dist/node/utils/is-deploying.d.ts +1 -0
- package/dist/node/utils/is-deploying.d.ts.map +1 -0
- package/dist/node/utils/report-builder.d.ts +7 -6
- package/dist/node/utils/report-builder.d.ts.map +1 -0
- package/dist/node/utils/self-signed-cert.d.ts +5 -0
- package/dist/node/utils/self-signed-cert.d.ts.map +1 -0
- package/dist/node/utils/self-signed-cert.js +28 -4
- package/dist/node/utils/stateful-log.d.ts +1 -0
- package/dist/node/utils/stateful-log.d.ts.map +1 -0
- package/dist/node/utils/ts-export-extractor.d.ts +1 -0
- package/dist/node/utils/ts-export-extractor.d.ts.map +1 -0
- package/dist/node/utils/watch-file-tree.d.ts +1 -0
- package/dist/node/utils/watch-file-tree.d.ts.map +1 -0
- package/package.json +34 -24
- package/tsconfig.app.json +8 -3
- package/tsconfig.node.json +1 -0
- package/types.env.d.ts +3 -0
- package/types.meta.d.ts +449 -136
- package/dist/app/server/defineRouter.d.ts +0 -2
- package/dist/app/server/defineRouter.js +0 -4
package/bin/eddev.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node --trace-warnings
|
|
2
2
|
import "../dist/node/cli/cli.js"
|
package/css/editor-styles.css
CHANGED
|
@@ -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 @@
|
|
|
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;AAmBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,2CAqBpC"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
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
|
+
hreflang: "hrefLang",
|
|
8
|
+
crossorigin: "crossOrigin",
|
|
9
|
+
};
|
|
10
|
+
function toReactAttributes(attributes) {
|
|
11
|
+
return Object.fromEntries(Object.entries(attributes).map(([key, value]) => {
|
|
12
|
+
if (key in REACT_ATTRIBUTES)
|
|
13
|
+
key = REACT_ATTRIBUTES[key];
|
|
14
|
+
return [key, value === "" ? true : value];
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
2
17
|
export function MetaTags(props) {
|
|
3
|
-
return (_jsx(_Fragment, { children: props.tags?.map((tag, i) => {
|
|
18
|
+
return useMemo(() => (_jsx(_Fragment, { children: props.tags?.map((tag, i) => {
|
|
4
19
|
const Tag = tag.tagName;
|
|
5
|
-
const tagProps = Array.isArray(tag.attributes) ? {} :
|
|
20
|
+
const tagProps = Array.isArray(tag.attributes) ? {} : toReactAttributes(tag.attributes);
|
|
6
21
|
if (tag.tagName === "title") {
|
|
7
22
|
tagProps.children = tag.inner ?? "";
|
|
8
23
|
}
|
|
@@ -13,5 +28,5 @@ export function MetaTags(props) {
|
|
|
13
28
|
tagProps.async = true;
|
|
14
29
|
}
|
|
15
30
|
return _jsx(Tag, { ...tagProps }, i);
|
|
16
|
-
}) }));
|
|
31
|
+
}) })), [props.tags]);
|
|
17
32
|
}
|
|
@@ -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,6 @@ 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
|
-
console.log("Booting admin");
|
|
6
5
|
if (window.name === "editor-canvas") {
|
|
7
6
|
}
|
|
8
7
|
else {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hydration-script.d.ts","sourceRoot":"","sources":["../../../src/app/entry/hydration-script.ts"],"names":[],"mappings":""}
|
|
@@ -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,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense } from "react";
|
|
3
2
|
import { DevUILoader } from "../lib/devtools/loader.js";
|
|
4
3
|
import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
|
|
5
4
|
import { APIProvider } from "../utils/APIProvider.js";
|
|
6
5
|
export function SPARoot() {
|
|
7
|
-
return (_jsxs(APIProvider, { children: [_jsx(
|
|
6
|
+
return (_jsxs(APIProvider, { children: [_jsx(BrowserRouter, {}), _jsx(DevUILoader, {})] }));
|
|
8
7
|
}
|
|
@@ -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,11 +1,12 @@
|
|
|
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, useEffect } from "react";
|
|
3
3
|
import { useSnapshot } from "valtio";
|
|
4
4
|
import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
|
|
5
5
|
import { clientMetaTags } from "../lib/routing/context.js";
|
|
6
6
|
import { APIProvider } from "../utils/APIProvider.js";
|
|
7
|
+
import { DevUILoader } from "../lib/devtools/loader.js";
|
|
7
8
|
export function SSRClientRoot(props) {
|
|
8
|
-
return (_jsxs(APIProvider, { children: [_jsx(DynamicMetaTags, {}), _jsx(Suspense, { children: _jsx(
|
|
9
|
+
return (_jsxs(APIProvider, { children: [_jsx(BrowserRouter, {}), _jsx(_Fragment, { children: _jsx(DynamicMetaTags, {}) }), _jsx(Suspense, { fallback: null, children: _jsx(_Fragment, { children: _jsx(DevUILoader, {}) }) })] }));
|
|
9
10
|
}
|
|
10
11
|
function DynamicMetaTags() {
|
|
11
12
|
const dynamicTags = useSnapshot(clientMetaTags).tags;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { RouteLoader } from "../lib/routing/loader.js";
|
|
2
2
|
import type { RouteData, RouteMetaTag } from "../lib/routing/types.js";
|
|
3
3
|
export declare function SSRRoot(props: {
|
|
4
|
+
hostname?: string;
|
|
4
5
|
pathname: string;
|
|
5
6
|
initialData: RouteData;
|
|
6
7
|
loader: RouteLoader;
|
|
7
8
|
metaTags: RouteMetaTag[];
|
|
9
|
+
isAI?: boolean;
|
|
8
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,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } 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
3
|
import { SSRRouter } from "../lib/routing/components/SSRRouter.js";
|
|
4
4
|
import { getRouteMeta, normalizeRoute } from "../lib/routing/utils.js";
|
|
@@ -7,7 +7,7 @@ export function SSRRoot(props) {
|
|
|
7
7
|
const loader = props.loader;
|
|
8
8
|
loader.setAppData(props.initialData.appData.data);
|
|
9
9
|
loader.populateRouteData(props.pathname, props.initialData);
|
|
10
|
-
return (
|
|
10
|
+
return (_jsxs(APIProvider, { children: [_jsx(SSRRouter, { loader: loader, hostname: props.hostname, isAI: props.isAI, route: normalizeRoute({
|
|
11
11
|
id: "initial",
|
|
12
12
|
component: loader.getRouteComponent(props.initialData.view),
|
|
13
13
|
key: "",
|
|
@@ -18,5 +18,5 @@ export function SSRRoot(props) {
|
|
|
18
18
|
query: {},
|
|
19
19
|
hash: "",
|
|
20
20
|
meta: getRouteMeta(props.initialData),
|
|
21
|
-
}) }) }) }));
|
|
21
|
+
}) }), _jsx(_Fragment, {}), _jsx(Suspense, { fallback: null, children: _jsx(_Fragment, {}) })] }));
|
|
22
22
|
}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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
|
|
@@ -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
|
-
},
|
|
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) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { ContentBlock } from "./ContentBlocks";
|
|
3
|
+
type BlockPropsMutator = (block: ContentBlock) => void;
|
|
4
|
+
type MutationContext = {
|
|
5
|
+
mutate?: BlockPropsMutator;
|
|
6
|
+
};
|
|
7
|
+
export declare const MutationContext: import("react").Context<MutationContext>;
|
|
8
|
+
type Props = PropsWithChildren<{
|
|
9
|
+
/**
|
|
10
|
+
* Whether any parent mutators declared in ancestor components should continue to apply.
|
|
11
|
+
*
|
|
12
|
+
* If set to false, then this mutator will override any previous ones.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
inherit?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* A function which is called before rendering a block.
|
|
19
|
+
*
|
|
20
|
+
* If your mutation function depends on any local variables that may change over time, you should pass them into the `deps` prop (like `useEffect/useMemo`)
|
|
21
|
+
*/
|
|
22
|
+
mutateProps: BlockPropsMutator;
|
|
23
|
+
/**
|
|
24
|
+
* An array of dependencies. When the value of these dependencies changes, the mutation will run again.
|
|
25
|
+
*
|
|
26
|
+
* @default `[]`
|
|
27
|
+
*/
|
|
28
|
+
deps?: any[];
|
|
29
|
+
}>;
|
|
30
|
+
export declare function useBlockMutation(): MutationContext;
|
|
31
|
+
export declare function BlockPropMutator(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=BlockPropMutator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockPropMutator.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/BlockPropMutator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAuB,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAS9C,KAAK,iBAAiB,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;AAEtD,KAAK,eAAe,GAAG;IACrB,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,eAAe,0CAAqC,CAAA;AAEjE,KAAK,KAAK,GAAG,iBAAiB,CAAC;IAC7B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAA;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CACb,CAAC,CAAA;AAEF,wBAAgB,gBAAgB,oBAE/B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,2CAe5C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useMemo } from "react";
|
|
3
|
+
export const MutationContext = createContext({});
|
|
4
|
+
export function useBlockMutation() {
|
|
5
|
+
return useContext(MutationContext);
|
|
6
|
+
}
|
|
7
|
+
export function BlockPropMutator(props) {
|
|
8
|
+
const parent = useContext(MutationContext);
|
|
9
|
+
const value = useMemo(() => {
|
|
10
|
+
return {
|
|
11
|
+
mutate: (block) => {
|
|
12
|
+
if (props.inherit) {
|
|
13
|
+
parent.mutate?.(block);
|
|
14
|
+
}
|
|
15
|
+
props.mutateProps(block);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}, [parent, props.inherit, ...(props.deps ?? [])]);
|
|
19
|
+
return _jsx(MutationContext.Provider, { value: value, children: props.children });
|
|
20
|
+
}
|
|
@@ -5,7 +5,7 @@ type TypedContentBlock<TName, TProps> = {
|
|
|
5
5
|
slug: TName;
|
|
6
6
|
props: TProps;
|
|
7
7
|
attrs: any;
|
|
8
|
-
innerBlocks
|
|
8
|
+
innerBlocks?: ContentBlock[];
|
|
9
9
|
innerHTML?: string;
|
|
10
10
|
innerContent?: string[];
|
|
11
11
|
rule: string;
|
|
@@ -27,6 +27,7 @@ export type BlocksContext = {
|
|
|
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"}
|
|
@@ -4,6 +4,7 @@ import { blockManifestReader } from "../internal/read-block-manifest.js";
|
|
|
4
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;
|
|
@@ -83,9 +85,20 @@ export function SingleContentBlock(props) {
|
|
|
83
85
|
return null;
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
|
-
|
|
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
|
-
/**
|
|
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
|
-
|
|
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, placeholder: props.
|
|
11
|
-
if (
|
|
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) {
|
|
@@ -2,7 +2,7 @@ import { FunctionComponent } from "react";
|
|
|
2
2
|
import { ContentBlockLayoutProps } from "./ContentBlocks.js";
|
|
3
3
|
import { BlockTemplate } from "./editor/block-templates.js";
|
|
4
4
|
type AppenderConfig = {
|
|
5
|
-
type: "default" | "button" | CustomBlockAppender;
|
|
5
|
+
type: "default" | "button" | "simple" | "button2" | CustomBlockAppender;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
export type CustomBlockAppender = FunctionComponent<{
|
|
@@ -15,7 +15,7 @@ export type CustomBlockAppender = FunctionComponent<{
|
|
|
15
15
|
export declare function createAppender(comp: CustomBlockAppender): {
|
|
16
16
|
type: CustomBlockAppender;
|
|
17
17
|
};
|
|
18
|
-
type InnerBlocksProps = {
|
|
18
|
+
export type InnerBlocksProps = {
|
|
19
19
|
/** A list of allowed blocks, and/or block tags. */
|
|
20
20
|
allowedBlocks?: (ChildBlockTypeName | BlockTagName)[];
|
|
21
21
|
/** Specify the block list as either horizontal or vertical */
|
|
@@ -26,9 +26,13 @@ type InnerBlocksProps = {
|
|
|
26
26
|
* NOTE: This will have no effect on the frontend, since no wrapper div is created on the frontend.
|
|
27
27
|
**/
|
|
28
28
|
adminClassName?: string;
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/** The default blocks to insert when there are no (non-templated) blocks */
|
|
30
|
+
defaultBlocks?: BlockTemplate;
|
|
31
|
+
/** Blocks to ensure are inserted at the top of the page */
|
|
32
|
+
headerTemplate?: BlockTemplate;
|
|
33
|
+
/** Blocks to ensure are inserted at the bottom of the page */
|
|
34
|
+
footerTemplate?: BlockTemplate;
|
|
35
|
+
/** A full-page block template */
|
|
32
36
|
template?: BlockTemplate;
|
|
33
37
|
/**
|
|
34
38
|
* `false` allows all operations
|
|
@@ -41,7 +45,7 @@ type InnerBlocksProps = {
|
|
|
41
45
|
* @default false
|
|
42
46
|
*
|
|
43
47
|
*/
|
|
44
|
-
templateLock?: "all" | "insert" | "contentOnly" | false;
|
|
48
|
+
templateLock?: "all" | "insert" | "contentOnly" | "none" | false;
|
|
45
49
|
appender?: AppenderConfig;
|
|
46
50
|
prioritizedInserterBlocks?: ChildBlockTypeName[];
|
|
47
51
|
} & ContentBlockLayoutProps;
|
|
@@ -50,3 +54,4 @@ type InnerBlocksProps = {
|
|
|
50
54
|
*/
|
|
51
55
|
export declare function InnerBlocks(props: InnerBlocksProps): import("react/jsx-runtime").JSX.Element;
|
|
52
56
|
export {};
|
|
57
|
+
//# sourceMappingURL=InnerBlocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InnerBlocks.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/InnerBlocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAsB,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAiB,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAuB,aAAa,EAA0B,MAAM,6BAA6B,CAAA;AAKxG,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,mBAAmB,CAAA;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA2ED,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAC,CAAA;AAEF,wBAAgB,cAAc,CAAC,IAAI,EAAE,mBAAmB;;EAIvD;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,kBAAkB,GAAG,YAAY,CAAC,EAAE,CAAA;IACrD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC;;;;QAII;IACJ,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,aAAa,CAAA;IAC9B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,aAAa,CAAA;IAC9B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,GAAG,KAAK,CAAA;IAChE,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,yBAAyB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACjD,GAAG,uBAAuB,CAAA;AAE3B;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAgDlD"}
|