From 90b7b20699d22012244f034a2757e7ddd4ed8f05 Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Tue, 13 Aug 2024 12:54:33 -0400 Subject: [PATCH] feat!: beta-next (#7620) This PR makes three major changes to the codebase: 1. [Component Paths](#component-paths) Instead of importing custom components into your config directly, they are now defined as file paths and rendered only when needed. That way the Payload config will be significantly more lightweight, and ensures that the Payload config is 100% server-only and Node-safe. Related discussion: https://github.com/payloadcms/payload/discussions/6938 2. [Client Config](#client-config) Deprecates the component map by merging its logic into the client config. The main goal of this change is for performance and simplification. There was no need to deeply iterate over the Payload config twice, once for the component map, and another for the client config. Instead, we can do everything in the client config one time. This has also dramatically simplified the client side prop drilling through the UI library. Now, all components can share the same client config which matches the exact shape of their Payload config (with the exception of non-serializable props and mapped custom components). 3. [Custom client component are no longer server-rendered](#custom-client-components-are-no-longer-server-rendered) Previously, custom components would be server-rendered, no matter if they are server or client components. Now, only server components are rendered on the server. Client components are automatically detected, and simply get passed through as `MappedComponent` to be rendered fully client-side. ## Component Paths Instead of importing custom components into your config directly, they are now defined as file paths and rendered only when needed. That way the Payload config will be significantly more lightweight, and ensures that the Payload config is 100% server-only and Node-safe. Related discussion: https://github.com/payloadcms/payload/discussions/6938 In order to reference any custom components in the Payload config, you now have to specify a string path to the component instead of importing it. Old: ```ts import { MyComponent2} from './MyComponent2.js' admin: { components: { Label: MyComponent2 }, }, ``` New: ```ts admin: { components: { Label: '/collections/Posts/MyComponent2.js#MyComponent2', // <= has to be a relative path based on a baseDir configured in the Payload config - NOT relative based on the importing file }, }, ``` ### Local API within Next.js routes Previously, if you used the Payload Local API within Next.js pages, all the client-side modules are being added to the bundle for that specific page, even if you only need server-side functionality. This `/test` route, which uses the Payload local API, was previously 460 kb. It is now down to 91 kb and does not bundle the Payload client-side admin panel anymore. All tests done [here](https://github.com/payloadcms/payload-3.0-demo/tree/feat/path-test) with beta.67/PR, db-mongodb and default richtext-lexical: **dev /admin before:** ![CleanShot 2024-07-29 at 22 49 12@2x](https://github.com/user-attachments/assets/4428e766-b368-4bcf-8c18-d0187ab64f3e) **dev /admin after:** ![CleanShot 2024-07-29 at 22 50 49@2x](https://github.com/user-attachments/assets/f494c848-7247-4b02-a650-a3fab4000de6) --- **dev /test before:** ![CleanShot 2024-07-29 at 22 56 18@2x](https://github.com/user-attachments/assets/1a7e9500-b859-4761-bf63-abbcdac6f8d6) **dev /test after:** ![CleanShot 2024-07-29 at 22 47 45@2x](https://github.com/user-attachments/assets/f89aa76d-f2d5-4572-9753-2267f034a45a) --- **build before:** ![CleanShot 2024-07-29 at 22 57 14@2x](https://github.com/user-attachments/assets/5f8f7281-2a4a-40a5-a788-c30ddcdd51b5) **build after::** ![CleanShot 2024-07-29 at 22 56 39@2x](https://github.com/user-attachments/assets/ea8772fd-512f-4db0-9a81-4b014715a1b7) ### Usage of the Payload Local API / config outside of Next.js This will make it a lot easier to use the Payload config / local API in other, server-side contexts. Previously, you might encounter errors due to client files (like .scss files) not being allowed to be imported. ## Client Config Deprecates the component map by merging its logic into the client config. The main goal of this change is for performance and simplification. There was no need to deeply iterate over the Payload config twice, once for the component map, and another for the client config. Instead, we can do everything in the client config one time. This has also dramatically simplified the client side prop drilling through the UI library. Now, all components can share the same client config which matches the exact shape of their Payload config (with the exception of non-serializable props and mapped custom components). This is breaking change. The `useComponentMap` hook no longer exists, and most component props have changed (for the better): ```ts const { componentMap } = useComponentMap() // old const { config } = useConfig() // new ``` The `useConfig` hook has also changed in shape, `config` is now a property _within_ the context obj: ```ts const config = useConfig() // old const { config } = useConfig() // new ``` ## Custom Client Components are no longer server rendered Previously, custom components would be server-rendered, no matter if they are server or client components. Now, only server components are rendered on the server. Client components are automatically detected, and simply get passed through as `MappedComponent` to be rendered fully client-side. The benefit of this change: Custom client components can now receive props. Previously, the only way for them to receive dynamic props from a parent client component was to use hooks, e.g. `useFieldProps()`. Now, we do have the option of passing in props to the custom components directly, if they are client components. This will be simpler than having to look for the correct hook. This makes rendering them on the client a little bit more complex, as you now have to check if that component is a server component (=> already has been rendered) or a client component (=> not rendered yet, has to be rendered here). However, this added complexity has been alleviated through the easy-to-use `` helper. This helper now also handles rendering arrays of custom components (e.g. beforeList, beforeLogin ...), which actually makes rendering custom components easier in some cases. ## Misc improvements This PR includes misc, breaking changes. For example, we previously allowed unions between components and config object for the same property. E.g. for the custom view property, you were allowed to pass in a custom component or an object with other properties, alongside a custom component. Those union types are now gone. You can now either pass an object, or a component. The previous `{ View: MyViewComponent}` is now `{ View: { Component: MyViewComponent} }` or `{ View: { Default: { Component: MyViewComponent} } }`. This dramatically simplifies the way we read & process those properties, especially in buildComponentMap. We can now simply check for the existence of one specific property, which always has to be a component, instead of running cursed runtime checks on a shared union property which could contain a component, but could also contain functions or objects. ![CleanShot 2024-07-29 at 23 07 07@2x](https://github.com/user-attachments/assets/1e75aa4c-7a4c-419f-9070-216bb7b9a5e5) ![CleanShot 2024-07-29 at 23 09 40@2x](https://github.com/user-attachments/assets/b4c96450-6b7e-496c-a4f7-59126bfd0991) - [x] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. --------- Co-authored-by: PatrikKozak Co-authored-by: Paul Co-authored-by: Paul Popus Co-authored-by: Jacob Fletcher Co-authored-by: James --- .gitignore | 6 + .husky/pre-commit | 1 - .idea/payload.iml | 1 + .idea/runConfigurations/Run_Dev_Fields.xml | 13 +- .../runConfigurations/Run_Dev__community.xml | 13 +- .idea/runConfigurations/Run_Dev_admin.xml | 13 + ..._template__of_JavaScriptTestRunnerJest.xml | 2 +- .vscode/settings.json | 4 +- app/(app)/layout.tsx | 14 + app/(app)/test/page.tsx | 11 + .../admin/[[...segments]]/not-found.tsx | 5 +- app/(payload)/admin/[[...segments]]/page.tsx | 5 +- app/(payload)/admin/importMap.js | 1 - app/(payload)/layout.tsx | 9 +- docs/admin/collections.mdx | 1 - docs/admin/components.mdx | 24 +- docs/admin/fields.mdx | 153 ++- docs/admin/globals.mdx | 1 - docs/admin/hooks.mdx | 12 +- docs/admin/overview.mdx | 134 ++- docs/admin/views.mdx | 63 +- docs/configuration/collections.mdx | 2 +- docs/configuration/globals.mdx | 2 +- docs/configuration/overview.mdx | 8 +- docs/local-api/outside-nextjs.mdx | 56 +- docs/migration-guide/overview.mdx | 11 +- eslint.config.js | 1 + examples/testing/README.md | 2 +- examples/testing/package.json | 2 +- jest.config.js | 22 +- next.config.mjs | 9 + package.json | 46 +- packages/create-payload-app/jest.config.js | 2 +- packages/create-payload-app/package.json | 4 +- .../src/lib/wrap-next-config.ts | 6 +- packages/db-mongodb/src/types.ts | 25 - packages/db-postgres/package.json | 2 +- packages/graphql/bin.js | 20 +- packages/graphql/package.json | 1 + packages/graphql/src/bin/index.ts | 4 +- packages/next/package.json | 2 +- .../DocumentHeader/Tabs/Tab/index.tsx | 25 +- .../DocumentHeader/Tabs/getCustomViews.ts | 12 +- .../DocumentHeader/Tabs/getViewConfig.ts | 12 +- .../elements/DocumentHeader/Tabs/index.tsx | 53 +- .../DocumentHeader/Tabs/tabs/index.tsx | 32 +- .../src/elements/DocumentHeader/index.tsx | 8 +- .../src/elements/EmailAndUsername/index.tsx | 51 +- packages/next/src/elements/Logo/index.tsx | 33 +- .../next/src/elements/Nav/index.client.tsx | 8 +- packages/next/src/elements/Nav/index.tsx | 65 +- packages/next/src/layouts/Root/index.tsx | 34 +- .../next/src/routes/rest/buildFormState.ts | 4 +- packages/next/src/routes/rest/og/image.tsx | 12 +- packages/next/src/routes/rest/og/index.tsx | 17 +- packages/next/src/templates/Default/index.tsx | 50 +- packages/next/src/utilities/getPayloadHMR.ts | 16 +- packages/next/src/utilities/initPage/index.ts | 3 +- packages/next/src/utilities/initPage/types.ts | 3 +- .../src/views/API/LocaleSelector/index.tsx | 14 +- packages/next/src/views/API/index.client.tsx | 82 +- packages/next/src/views/API/index.tsx | 4 +- .../src/views/Account/ToggleTheme/index.tsx | 34 +- packages/next/src/views/Account/index.tsx | 67 +- .../views/CreateFirstUser/index.client.tsx | 27 +- .../src/views/Dashboard/Default/index.tsx | 70 +- packages/next/src/views/Dashboard/index.tsx | 60 +- .../src/views/Document/getCustomViewByKey.tsx | 18 +- .../views/Document/getCustomViewByRoute.tsx | 4 +- .../src/views/Document/getViewsFromConfig.tsx | 184 ++-- packages/next/src/views/Document/index.tsx | 119 ++- .../src/views/Edit/Default/Auth/APIKey.tsx | 43 +- .../src/views/Edit/Default/Auth/index.tsx | 37 +- .../Edit/Default/SetDocumentStepNav/index.tsx | 4 +- .../next/src/views/Edit/Default/index.tsx | 47 +- packages/next/src/views/Edit/index.client.tsx | 23 +- packages/next/src/views/Edit/index.tsx | 4 +- .../ForgotPasswordForm/index.tsx | 20 +- .../next/src/views/List/Default/index.tsx | 70 +- packages/next/src/views/List/index.tsx | 104 ++- packages/next/src/views/List/meta.ts | 2 +- .../src/views/LivePreview/Context/context.ts | 2 +- .../src/views/LivePreview/Context/index.tsx | 6 +- .../src/views/LivePreview/index.client.tsx | 201 ++-- packages/next/src/views/LivePreview/index.tsx | 9 +- .../src/views/LivePreview/usePopupWindow.ts | 8 +- .../next/src/views/Login/LoginField/index.tsx | 35 +- .../next/src/views/Login/LoginForm/index.tsx | 10 +- packages/next/src/views/Login/index.tsx | 55 +- .../next/src/views/NotFound/index.client.tsx | 4 +- packages/next/src/views/NotFound/index.tsx | 12 +- .../src/views/ResetPassword/index.client.tsx | 31 +- .../src/views/Root/getCustomViewByRoute.tsx | 30 +- .../next/src/views/Root/getViewFromConfig.tsx | 51 +- packages/next/src/views/Root/index.tsx | 45 +- .../next/src/views/Unauthorized/index.tsx | 6 +- .../src/views/Version/Default/SetStepNav.tsx | 30 +- .../next/src/views/Version/Default/index.tsx | 29 +- .../next/src/views/Version/Default/types.ts | 14 +- .../fields/Iterable/index.tsx | 67 +- .../fields/Nested/index.tsx | 22 +- .../fields/Relationship/index.tsx | 27 +- .../fields/Select/index.tsx | 25 +- .../RenderFieldsToDiff/fields/Tabs/index.tsx | 23 +- .../RenderFieldsToDiff/fields/Text/index.tsx | 12 +- .../RenderFieldsToDiff/fields/index.tsx | 2 +- .../RenderFieldsToDiff/fields/types.ts | 30 +- .../Version/RenderFieldsToDiff/index.tsx | 27 +- .../views/Version/RenderFieldsToDiff/types.ts | 18 +- .../next/src/views/Version/Restore/index.tsx | 6 +- .../views/Version/SelectComparison/index.tsx | 4 +- packages/next/src/views/Version/index.tsx | 20 +- .../next/src/views/Versions/buildColumns.tsx | 65 +- .../views/Versions/cells/CreatedAt/index.tsx | 6 +- .../next/src/views/Versions/index.client.tsx | 33 +- packages/next/src/views/Versions/index.tsx | 4 +- packages/payload/bin.js | 43 +- packages/payload/package.json | 9 +- packages/payload/src/admin/RichText.ts | 48 +- packages/payload/src/admin/elements/Cell.ts | 45 +- packages/payload/src/admin/elements/Tab.ts | 32 +- packages/payload/src/admin/fields/Array.ts | 25 +- packages/payload/src/admin/fields/Blocks.ts | 35 +- packages/payload/src/admin/fields/Checkbox.ts | 19 +- packages/payload/src/admin/fields/Code.ts | 13 +- .../payload/src/admin/fields/Collapsible.ts | 8 +- packages/payload/src/admin/fields/Date.ts | 12 +- packages/payload/src/admin/fields/Email.ts | 13 +- packages/payload/src/admin/fields/Group.ts | 10 +- packages/payload/src/admin/fields/Hidden.ts | 12 +- packages/payload/src/admin/fields/JSON.ts | 12 +- packages/payload/src/admin/fields/Number.ts | 18 +- packages/payload/src/admin/fields/Point.ts | 11 +- packages/payload/src/admin/fields/Radio.ts | 16 +- .../payload/src/admin/fields/Relationship.ts | 14 +- packages/payload/src/admin/fields/RichText.ts | 16 +- packages/payload/src/admin/fields/Row.ts | 7 +- packages/payload/src/admin/fields/Select.ts | 18 +- packages/payload/src/admin/fields/Tabs.ts | 28 +- packages/payload/src/admin/fields/Text.ts | 21 +- packages/payload/src/admin/fields/Textarea.ts | 17 +- packages/payload/src/admin/fields/Upload.ts | 19 +- packages/payload/src/admin/fields/index.ts | 86 -- packages/payload/src/admin/forms/Error.ts | 21 +- packages/payload/src/admin/forms/Field.ts | 42 +- .../src/admin/forms/FieldDescription.ts | 22 +- packages/payload/src/admin/forms/FieldMap.ts | 24 - .../payload/src/admin/forms/FieldTypes.ts | 26 - packages/payload/src/admin/forms/Label.ts | 31 +- packages/payload/src/admin/types.ts | 70 +- packages/payload/src/admin/views/types.ts | 36 +- .../payload/src/auth/baseFields/apiKey.ts | 4 +- packages/payload/src/auth/baseFields/email.ts | 2 +- .../payload/src/auth/baseFields/username.ts | 2 +- .../src/auth/baseFields/verification.ts | 2 +- .../src/bin/generateImportMap/index.ts | 222 +++++ .../generateImportMap/iterateCollections.ts | 64 ++ .../bin/generateImportMap/iterateConfig.ts | 100 ++ .../bin/generateImportMap/iterateFields.ts | 93 ++ .../bin/generateImportMap/iterateGlobals.ts | 55 ++ .../parsePayloadComponent.ts | 24 + packages/payload/src/bin/index.ts | 42 +- .../src/bin/loader/clientExtensions.ts | 11 - packages/payload/src/bin/loader/compile.ts | 40 - packages/payload/src/bin/loader/ignores.ts | 1 - packages/payload/src/bin/loader/index.ts | 176 ---- .../src/bin/loader/read-default-tsconfig.ts | 134 --- .../src/bin/loader/resolveOriginalPath.ts | 36 - .../payload/src/collections/config/client.ts | 139 +-- .../payload/src/collections/config/types.ts | 23 +- packages/payload/src/config/client.ts | 75 +- packages/payload/src/config/defaults.ts | 4 + packages/payload/src/config/types.ts | 250 +++-- packages/payload/src/exports/node.ts | 1 - packages/payload/src/exports/shared.ts | 8 +- packages/payload/src/fields/config/client.ts | 103 +-- .../payload/src/fields/config/sanitize.ts | 50 +- packages/payload/src/fields/config/types.ts | 640 +++++++++++-- packages/payload/src/globals/config/client.ts | 95 +- packages/payload/src/globals/config/types.ts | 6 +- packages/payload/src/index.ts | 91 +- .../src/utilities/fieldSchemaToJSON.ts | 18 +- .../src/utilities/flattenTopLevelFields.ts | 43 +- .../src/utilities/getEntityPolicies.ts | 24 +- .../src/utilities/importWithoutClientFiles.ts | 61 -- packages/payload/src/versions/baseFields.ts | 2 +- packages/plugin-form-builder/package.json | 10 + .../Forms/DynamicFieldSelector.tsx | 14 +- .../Forms/DynamicPriceSelector.tsx | 10 +- .../src/collections/Forms/fields.ts | 8 +- .../plugin-form-builder/src/exports/client.ts | 2 + packages/plugin-search/package.json | 26 +- .../src/Search/hooks/syncWithSearch.ts | 6 +- packages/plugin-search/src/Search/index.ts | 4 +- .../src/Search/ui/index.client.tsx | 2 +- packages/plugin-search/src/exports/client.ts | 1 + packages/plugin-seo/package.json | 10 + packages/plugin-seo/src/exports/client.ts | 5 + .../MetaDescriptionComponent.tsx | 26 +- .../src/fields/MetaDescription/index.ts | 13 +- .../fields/MetaImage/MetaImageComponent.tsx | 27 +- .../plugin-seo/src/fields/MetaImage/index.ts | 13 +- .../fields/MetaTitle/MetaTitleComponent.tsx | 25 +- .../plugin-seo/src/fields/MetaTitle/index.ts | 13 +- .../plugin-seo/src/fields/Overview/index.tsx | 13 +- .../src/fields/Preview/PreviewComponent.tsx | 1 - .../plugin-seo/src/fields/Preview/index.tsx | 13 +- packages/plugin-seo/src/index.tsx | 116 +-- packages/plugin-stripe/package.json | 10 + packages/plugin-stripe/src/exports/client.ts | 3 + .../plugin-stripe/src/fields/getFields.ts | 4 +- packages/plugin-stripe/src/index.ts | 1 - packages/plugin-stripe/src/ui/LinkToDoc.tsx | 4 +- packages/richtext-lexical/package.json | 12 +- packages/richtext-lexical/src/cell/index.tsx | 23 +- .../src/exports/client/index.ts | 43 +- .../{feature.client.tsx => client/index.tsx} | 12 +- .../align/{ => client}/toolbarAlignGroup.ts | 4 +- .../src/features/align/feature.server.ts | 12 - .../src/features/align/{ => server}/i18n.ts | 0 .../src/features/align/server/index.ts | 10 + .../{feature.client.tsx => client/index.tsx} | 12 +- .../features/blockquote/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 12 +- .../{ => client}/component/BlockContent.tsx | 99 +- .../{ => client}/component/FormSavePlugin.tsx | 0 .../blocks/{ => client}/component/index.scss | 3 +- .../blocks/{ => client}/component/index.tsx | 116 ++- .../component/removeEmptyArrayValues.ts | 0 .../{ => client}/componentInline/index.scss | 2 +- .../{ => client}/componentInline/index.tsx | 42 +- .../src/features/blocks/client/index.tsx | 193 ++++ .../blocks/client/nodes/BlocksNode.tsx | 61 ++ .../blocks/client/nodes/InlineBlocksNode.tsx | 75 ++ .../blocks/{ => client}/plugin/commands.ts | 0 .../blocks/{ => client}/plugin/index.tsx | 46 +- .../src/features/blocks/feature.client.tsx | 163 ---- .../{ => server}/graphQLPopulationPromise.ts | 6 +- .../src/features/blocks/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 151 +-- .../blocks/{ => server}/nodes/BlocksNode.tsx | 31 +- .../{ => server}/nodes/InlineBlocksNode.tsx | 41 +- .../features/blocks/{ => server}/validate.ts | 4 +- .../features/converters/html/field/index.ts | 2 +- .../html/{feature.server.ts => index.ts} | 0 .../src/features/createClientComponent.tsx | 7 +- .../features/createFeaturePropComponent.tsx | 2 +- .../{feature.client.tsx => client/index.tsx} | 2 +- .../{ => client}/plugin/index.scss | 2 +- .../{ => client}/plugin/index.tsx | 4 +- .../debug/testRecorder/feature.server.ts | 10 - .../debug/testRecorder/server/index.ts | 8 + .../{feature.client.tsx => client/index.tsx} | 2 +- .../treeView/{ => client}/plugin/index.scss | 0 .../treeView/{ => client}/plugin/index.tsx | 2 +- .../features/debug/treeView/feature.server.ts | 10 - .../features/debug/treeView/server/index.ts | 8 + .../{feature.client.ts => client/index.ts} | 8 +- .../plugins/TableActionMenuPlugin/index.scss | 2 +- .../plugins/TableActionMenuPlugin/index.tsx | 9 +- .../plugins/TableCellResizerPlugin/index.tsx | 4 +- .../plugins/TableHoverActionsPlugin/index.tsx | 243 +++++ .../plugins/TablePlugin/index.scss | 6 +- .../plugins/TablePlugin/index.tsx | 7 +- .../{ => client}/utils/debounce.ts | 0 .../{ => client}/utils/useDebounce.ts | 0 .../plugins/TableHoverActionsPlugin/index.tsx | 2 +- .../{feature.server.ts => server/index.ts} | 10 +- .../features/format/bold/feature.server.ts | 4 +- .../format/inlineCode/feature.server.ts | 4 +- .../features/format/italic/feature.server.ts | 4 +- .../format/strikethrough/feature.server.ts | 4 +- .../format/subscript/feature.server.ts | 4 +- .../format/superscript/feature.server.ts | 4 +- .../format/underline/feature.server.ts | 4 +- .../{feature.client.tsx => client/index.tsx} | 24 +- .../src/features/heading/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 12 +- .../{ => client}/component/index.tsx | 0 .../{feature.client.tsx => client/index.tsx} | 15 +- .../{ => client}/markdownTransformer.ts | 0 .../client/nodes/HorizontalRuleNode.tsx | 56 ++ .../{ => client}/plugin/index.scss | 2 +- .../{ => client}/plugin/index.tsx | 8 +- .../features/horizontalRule/feature.server.ts | 29 - .../horizontalRule/{ => server}/i18n.ts | 0 .../features/horizontalRule/server/index.ts | 27 + .../server/markdownTransformer.ts | 26 + .../{ => server}/nodes/HorizontalRuleNode.tsx | 37 +- .../{feature.client.tsx => client/index.tsx} | 8 +- .../indent/{ => client}/toolbarIndentGroup.ts | 2 +- .../src/features/indent/feature.server.ts | 12 - .../src/features/indent/{ => server}/i18n.ts | 0 .../src/features/indent/server/index.ts | 10 + .../{feature.client.tsx => client/index.tsx} | 20 +- .../{ => client}/plugins/autoLink/index.tsx | 13 +- .../plugins/clickableLink/index.tsx | 4 +- .../floatingLinkEditor/LinkEditor/commands.ts | 0 .../floatingLinkEditor/LinkEditor/index.tsx | 18 +- .../plugins/floatingLinkEditor/index.scss | 6 +- .../plugins/floatingLinkEditor/index.tsx | 4 +- .../plugins/floatingLinkEditor/types.ts | 2 +- .../link/client/plugins/link/index.tsx | 76 ++ .../src/features/link/nodes/LinkNode.ts | 2 +- .../src/features/link/plugins/link/index.tsx | 80 -- .../link/{drawer => server}/baseFields.ts | 0 .../{ => server}/graphQLPopulationPromise.ts | 8 +- .../src/features/link/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 20 +- .../transformExtraFields.ts} | 2 +- .../features/link/{ => server}/validate.ts | 6 +- .../{feature.client.tsx => client/index.tsx} | 16 +- .../checklist/{ => client}/plugin/index.tsx | 2 +- .../lists/checklist/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 12 +- .../{feature.client.tsx => client/index.tsx} | 14 +- .../lists/orderedList/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 12 +- .../{feature.client.tsx => client/index.tsx} | 14 +- .../lists/unorderedList/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 12 +- .../converter/converters/heading/client.ts | 6 - .../converter/converters/heading/converter.ts | 7 +- .../converter/converters/heading/index.ts | 9 - .../converter/converters/link/client.ts | 5 - .../converter/converters/link/converter.ts | 5 +- .../converter/converters/link/index.ts | 9 - .../converter/converters/list/client.ts | 6 - .../converter/converters/list/converter.ts | 5 +- .../converter/converters/list/index.ts | 9 - .../converter/converters/listItem/client.ts | 5 - .../converters/listItem/converter.ts | 5 +- .../converter/converters/listItem/index.ts | 9 - .../converter/converters/quote/client.ts | 6 - .../converter/converters/quote/converter.ts | 7 +- .../converter/converters/quote/index.ts | 9 - .../converter/converters/unknown/client.ts | 5 - .../converter/converters/unknown/converter.ts | 5 +- .../converter/converters/unknown/index.ts | 9 - .../converter/converters/upload/client.ts | 6 - .../converter/converters/upload/converter.ts | 4 +- .../converter/converters/upload/index.ts | 9 - .../converter/defaultConverters.ts | 18 +- .../lexicalPluginToLexical/converter/index.ts | 27 +- .../lexicalPluginToLexical/converter/types.ts | 12 +- .../lexicalPluginToLexical/feature.client.tsx | 21 +- .../lexicalPluginToLexical/feature.server.ts | 45 +- .../converter/converters/blockquote/client.ts | 6 - .../converters/blockquote/converter.ts | 4 +- .../converter/converters/blockquote/index.ts | 9 - .../converter/converters/heading/client.ts | 5 - .../converter/converters/heading/converter.ts | 4 +- .../converter/converters/heading/index.ts | 9 - .../converter/converters/indent/client.ts | 6 - .../converter/converters/indent/converter.ts | 2 +- .../converter/converters/indent/index.ts | 9 - .../converter/converters/link/client.ts | 6 - .../converter/converters/link/converter.ts | 2 +- .../converter/converters/link/index.ts | 9 - .../converter/converters/listItem/client.ts | 6 - .../converters/listItem/converter.ts | 2 +- .../converter/converters/listItem/index.ts | 9 - .../converters/orderedList/client.ts | 6 - .../converters/orderedList/converter.ts | 2 +- .../converter/converters/orderedList/index.ts | 9 - .../converters/relationship/client.ts | 6 - .../converters/relationship/converter.ts | 4 +- .../converters/relationship/index.ts | 9 - .../converter/converters/unknown/client.ts | 6 - .../converter/converters/unknown/converter.ts | 2 +- .../converter/converters/unknown/index.ts | 9 - .../converters/unorderedList/client.ts | 6 - .../converters/unorderedList/converter.ts | 2 +- .../converters/unorderedList/index.ts | 9 - .../converter/converters/upload/client.ts | 6 - .../converter/converters/upload/converter.ts | 4 +- .../converter/converters/upload/index.ts | 9 - .../converter/defaultConverters.ts | 24 +- .../slateToLexical/converter/types.ts | 11 - .../slateToLexical/feature.client.tsx | 23 - .../slateToLexical/feature.server.ts | 47 +- .../{feature.client.tsx => client/index.tsx} | 10 +- .../src/features/paragraph/feature.server.ts | 13 - .../features/paragraph/{ => server}/i18n.ts | 0 .../src/features/paragraph/server/index.ts | 11 + .../components/RelationshipComponent.tsx | 18 +- .../{nodes => client}/components/index.scss | 0 .../{ => client}/drawer/commands.ts | 0 .../{ => client}/drawer/index.tsx | 0 .../{feature.client.tsx => client/index.tsx} | 10 +- .../client/nodes/RelationshipNode.tsx | 105 +++ .../{ => client}/plugins/index.tsx | 12 +- .../utils/EnabledRelationshipsCondition.tsx | 4 +- .../{ => server}/graphQLPopulationPromise.ts | 6 +- .../relationship/{ => server}/i18n.ts | 0 .../{feature.server.ts => server/index.ts} | 14 +- .../{ => server}/nodes/RelationshipNode.tsx | 45 +- .../fixed/{ => client}/Toolbar/index.scss | 2 +- .../fixed/{ => client}/Toolbar/index.tsx | 23 +- .../{feature.client.tsx => client/index.tsx} | 4 +- .../{feature.server.ts => server/index.ts} | 6 +- .../inline/{ => client}/Toolbar/index.scss | 2 +- .../inline/{ => client}/Toolbar/index.tsx | 14 +- .../{feature.client.tsx => client/index.tsx} | 2 +- .../toolbars/inline/feature.server.ts | 10 - .../features/toolbars/inline/server/index.ts | 8 + .../toolbars/shared/ToolbarDropdown/index.tsx | 6 +- .../src/features/toolbars/types.ts | 7 +- .../src/features/typesServer.ts | 37 +- .../upload/{ => client}/component/index.scss | 2 +- .../upload/{ => client}/component/index.tsx | 25 +- .../upload/{ => client}/drawer/commands.ts | 0 .../upload/{ => client}/drawer/index.tsx | 2 +- .../upload/{ => client}/feature.client.tsx | 8 +- .../upload/client/nodes/UploadNode.tsx | 112 +++ .../upload/{ => client}/plugin/index.tsx | 8 +- .../upload/{ => server}/feature.server.ts | 27 +- .../{ => server}/graphQLPopulationPromise.ts | 6 +- .../src/features/upload/{ => server}/i18n.ts | 0 .../upload/{ => server}/nodes/UploadNode.tsx | 34 +- .../features/upload/{ => server}/validate.ts | 2 +- packages/richtext-lexical/src/field/Field.tsx | 69 +- packages/richtext-lexical/src/field/index.tsx | 21 +- packages/richtext-lexical/src/index.ts | 274 +++--- .../src/lexical/LexicalProvider.tsx | 12 +- .../config/client/EditorConfigProvider.tsx | 21 +- .../src/lexical/config/server/default.ts | 26 +- .../src/lexical/config/server/sanitize.ts | 33 +- .../LexicalTypeaheadMenuPlugin/types.ts | 16 +- .../src/lexical/plugins/SlashMenu/index.tsx | 25 +- .../src/lexical/theme/EditorTheme.tsx | 2 - .../src/lexical/utils/invariant.ts | 16 - packages/richtext-lexical/src/nodeTypes.ts | 16 +- packages/richtext-lexical/src/types.ts | 12 +- .../src/utilities/fieldsDrawer/Drawer.tsx | 22 +- .../utilities/fieldsDrawer/DrawerContent.tsx | 17 +- .../src/utilities/generateComponentMap.tsx | 96 +- .../src/utilities/generateImportMap.tsx | 59 ++ .../src/utilities/generateSchemaMap.ts | 3 +- .../migrateDocumentFieldsRecursively.ts | 17 +- .../src/utilities/useLexicalFeature.tsx | 2 +- packages/richtext-slate/package.json | 16 + .../src/data/richTextRelationshipPromise.ts | 2 +- .../src/exports/client/index.ts | 65 ++ .../richtext-slate/src/field/RichText.tsx | 72 +- .../src/field/createFeatureMap.ts | 4 +- .../EnabledRelationshipsCondition.tsx | 4 +- .../src/field/elements/blockquote/Button.tsx | 11 + .../{Blockquote.tsx => Element.tsx} | 2 +- .../src/field/elements/blockquote/index.tsx | 19 +- .../src/field/elements/h1/Button.tsx | 11 + .../src/field/elements/h1/Heading1.tsx | 2 +- .../src/field/elements/h1/index.tsx | 19 +- .../src/field/elements/h2/Button.tsx | 11 + .../src/field/elements/h2/Heading2.tsx | 2 +- .../src/field/elements/h2/index.tsx | 19 +- .../src/field/elements/h3/Button.tsx | 11 + .../src/field/elements/h3/Heading3.tsx | 3 +- .../src/field/elements/h3/index.tsx | 19 +- .../src/field/elements/h4/Button.tsx | 11 + .../src/field/elements/h4/Heading4.tsx | 3 +- .../src/field/elements/h4/index.tsx | 19 +- .../src/field/elements/h5/Button.tsx | 11 + .../src/field/elements/h5/Heading5.tsx | 3 +- .../src/field/elements/h5/index.tsx | 19 +- .../src/field/elements/h6/Button.tsx | 11 + .../src/field/elements/h6/Heading6.tsx | 3 +- .../src/field/elements/h6/index.tsx | 19 +- .../src/field/elements/indent/index.ts | 6 +- .../src/field/elements/li/index.tsx | 4 +- .../src/field/elements/link/Button/index.tsx | 13 +- .../src/field/elements/link/Element/index.tsx | 10 +- .../field/elements/link/LinkDrawer/index.tsx | 6 +- .../field/elements/link/LinkDrawer/types.ts | 12 +- .../src/field/elements/link/index.ts | 10 +- .../src/field/elements/ol/Button.tsx | 11 + .../src/field/elements/ol/OrderedList.tsx | 2 +- .../src/field/elements/ol/index.tsx | 19 +- .../elements/relationship/Button/index.tsx | 6 +- .../elements/relationship/Element/index.tsx | 24 +- .../src/field/elements/relationship/index.ts | 9 +- .../src/field/elements/textAlign/Button.tsx | 21 + .../src/field/elements/textAlign/index.tsx | 25 +- .../src/field/elements/ul/Button.tsx | 11 + .../src/field/elements/ul/UnorderedList.tsx | 2 +- .../src/field/elements/ul/index.tsx | 19 +- .../field/elements/upload/Button/index.tsx | 2 +- .../upload/Element/UploadDrawer/index.tsx | 26 +- .../field/elements/upload/Element/index.tsx | 27 +- .../src/field/elements/upload/index.ts | 9 +- packages/richtext-slate/src/field/index.tsx | 25 +- .../src/field/leaves/bold/Bold/index.tsx | 2 +- .../src/field/leaves/bold/LeafButton.tsx | 11 + .../src/field/leaves/bold/index.tsx | 14 +- .../src/field/leaves/code/Code/index.tsx | 2 +- .../src/field/leaves/code/LeafButton.tsx | 11 + .../src/field/leaves/code/index.tsx | 14 +- .../src/field/leaves/italic/Italic/index.tsx | 2 +- .../src/field/leaves/italic/LeafButton.tsx | 11 + .../src/field/leaves/italic/index.tsx | 14 +- .../field/leaves/strikethrough/LeafButton.tsx | 11 + .../strikethrough/Strikethrough/index.tsx | 2 +- .../src/field/leaves/strikethrough/index.tsx | 14 +- .../src/field/leaves/underline/LeafButton.tsx | 11 + .../leaves/underline/Underline/index.tsx | 2 +- .../src/field/leaves/underline/index.tsx | 14 +- .../field/providers/ElementButtonProvider.tsx | 9 +- .../src/field/providers/ElementProvider.tsx | 10 +- .../field/providers/LeafButtonProvider.tsx | 8 +- .../src/field/providers/LeafProvider.tsx | 10 +- packages/richtext-slate/src/field/types.ts | 20 +- .../src/generateComponentMap.tsx | 76 +- packages/richtext-slate/src/index.tsx | 79 +- packages/richtext-slate/src/types.ts | 14 +- packages/translations/package.json | 4 +- packages/ui/package.json | 14 +- packages/ui/src/elements/AppHeader/index.tsx | 13 +- packages/ui/src/elements/Autosave/index.tsx | 6 +- .../ui/src/elements/ColumnSelector/index.tsx | 6 +- .../ui/src/elements/DeleteDocument/index.tsx | 6 +- packages/ui/src/elements/DeleteMany/index.tsx | 6 +- .../src/elements/DocumentControls/index.tsx | 71 +- .../elements/DocumentDrawer/DrawerContent.tsx | 9 +- .../ui/src/elements/DocumentDrawer/types.ts | 20 +- .../ui/src/elements/DocumentFields/index.tsx | 29 +- .../useDraggableSortable/types.ts | 12 +- packages/ui/src/elements/Drawer/types.ts | 14 +- .../src/elements/DuplicateDocument/index.tsx | 10 +- packages/ui/src/elements/EditMany/index.tsx | 23 +- .../ui/src/elements/FieldSelect/index.tsx | 91 +- .../ListControls/getTextFieldsToBeSearched.ts | 12 +- .../ui/src/elements/ListControls/index.tsx | 31 +- .../src/elements/ListDrawer/DrawerContent.tsx | 16 +- packages/ui/src/elements/ListDrawer/index.tsx | 4 +- packages/ui/src/elements/ListDrawer/types.ts | 15 +- packages/ui/src/elements/Localizer/index.tsx | 2 +- packages/ui/src/elements/Logout/index.tsx | 16 +- packages/ui/src/elements/Popup/index.tsx | 2 +- .../ui/src/elements/PreviewButton/index.tsx | 9 +- .../elements/PreviewButton/usePreviewURL.tsx | 6 +- .../ui/src/elements/PublishButton/index.tsx | 7 +- .../ui/src/elements/PublishMany/index.tsx | 6 +- .../RenderCustomClientComponent/index.tsx | 22 - .../elements/RenderCustomComponent/index.tsx | 46 - packages/ui/src/elements/SaveButton/index.tsx | 7 +- .../ui/src/elements/SaveDraftButton/index.tsx | 13 +- packages/ui/src/elements/Status/index.tsx | 6 +- .../ui/src/elements/StayLoggedIn/index.tsx | 2 +- packages/ui/src/elements/StepNav/index.tsx | 36 +- packages/ui/src/elements/StepNav/types.ts | 4 +- .../Table/DefaultCell/fields/Array/index.tsx | 9 +- .../Table/DefaultCell/fields/Blocks/index.tsx | 9 +- .../DefaultCell/fields/Checkbox/index.tsx | 7 +- .../Table/DefaultCell/fields/Code/index.tsx | 6 +- .../Table/DefaultCell/fields/Date/index.tsx | 19 +- .../Table/DefaultCell/fields/File/index.tsx | 4 +- .../Table/DefaultCell/fields/JSON/index.tsx | 6 +- .../DefaultCell/fields/Relationship/index.tsx | 27 +- .../Table/DefaultCell/fields/Select/index.tsx | 8 +- .../DefaultCell/fields/Textarea/index.tsx | 6 +- .../src/elements/Table/DefaultCell/index.tsx | 53 +- .../Table/RelationshipProvider/index.tsx | 18 +- .../Table/TableCellProvider/index.tsx | 12 +- packages/ui/src/elements/Table/index.tsx | 31 +- .../TableColumns/buildColumnState.tsx | 91 +- .../elements/TableColumns/filterFields.tsx | 27 +- .../TableColumns/getInitialColumns.ts | 26 +- .../ui/src/elements/TableColumns/index.tsx | 39 +- .../ui/src/elements/ThumbnailCard/index.tsx | 6 +- .../ui/src/elements/UnpublishMany/index.tsx | 8 +- .../Condition/Relationship/index.tsx | 16 +- .../Condition/Relationship/types.ts | 6 +- .../WhereBuilder/Condition/Text/index.tsx | 4 +- .../elements/WhereBuilder/Condition/index.tsx | 78 +- .../ui/src/elements/WhereBuilder/index.tsx | 12 +- ...uceFieldMap.tsx => reduceClientFields.tsx} | 74 +- .../ui/src/elements/WhereBuilder/types.ts | 17 +- packages/ui/src/exports/client/index.ts | 21 +- packages/ui/src/exports/shared/index.ts | 7 +- packages/ui/src/fields/Array/ArrayRow.tsx | 50 +- packages/ui/src/fields/Array/index.tsx | 65 +- packages/ui/src/fields/Blocks/BlockRow.tsx | 20 +- .../src/fields/Blocks/BlocksDrawer/index.tsx | 14 +- packages/ui/src/fields/Blocks/RowActions.tsx | 26 +- packages/ui/src/fields/Blocks/index.tsx | 56 +- packages/ui/src/fields/Checkbox/Input.tsx | 43 +- packages/ui/src/fields/Checkbox/index.tsx | 52 +- packages/ui/src/fields/Code/index.tsx | 54 +- packages/ui/src/fields/Collapsible/index.tsx | 39 +- .../ui/src/fields/ConfirmPassword/index.tsx | 6 +- packages/ui/src/fields/DateTime/index.tsx | 56 +- packages/ui/src/fields/Email/index.tsx | 58 +- .../ui/src/fields/FieldDescription/index.tsx | 9 +- packages/ui/src/fields/FieldError/index.tsx | 9 +- packages/ui/src/fields/FieldLabel/index.tsx | 9 +- packages/ui/src/fields/Group/index.tsx | 127 +-- packages/ui/src/fields/Hidden/index.tsx | 3 +- packages/ui/src/fields/JSON/index.tsx | 49 +- packages/ui/src/fields/Number/Input.tsx | 0 packages/ui/src/fields/Number/index.tsx | 64 +- packages/ui/src/fields/Password/index.tsx | 74 +- packages/ui/src/fields/Password/input.tsx | 29 +- packages/ui/src/fields/Password/types.ts | 66 +- packages/ui/src/fields/Point/index.tsx | 76 +- packages/ui/src/fields/RadioGroup/index.tsx | 50 +- .../AddNew/useRelatedCollections.ts | 2 +- packages/ui/src/fields/Relationship/index.tsx | 58 +- packages/ui/src/fields/RichText/index.tsx | 4 +- packages/ui/src/fields/Row/index.tsx | 14 +- packages/ui/src/fields/Select/Input.tsx | 81 +- packages/ui/src/fields/Select/index.tsx | 54 +- packages/ui/src/fields/Tabs/Tab/index.tsx | 21 +- packages/ui/src/fields/Tabs/index.tsx | 33 +- packages/ui/src/fields/Text/Input.tsx | 35 +- packages/ui/src/fields/Text/index.tsx | 66 +- packages/ui/src/fields/Text/types.ts | 46 +- packages/ui/src/fields/Textarea/Input.tsx | 35 +- packages/ui/src/fields/Textarea/index.tsx | 62 +- packages/ui/src/fields/Textarea/types.ts | 34 +- packages/ui/src/fields/Upload/Input.tsx | 60 +- packages/ui/src/fields/Upload/index.tsx | 44 +- packages/ui/src/fields/index.tsx | 7 +- .../ui/src/forms/FieldPropsProvider/index.tsx | 24 +- .../forms/Form/createNestedClientFieldPath.ts | 18 + .../src/forms/Form/createNestedFieldPath.ts | 33 - packages/ui/src/forms/Form/index.tsx | 4 +- packages/ui/src/forms/Form/types.ts | 6 +- packages/ui/src/forms/NullifyField/index.tsx | 28 +- .../ui/src/forms/RenderFields/RenderField.tsx | 91 +- packages/ui/src/forms/RenderFields/index.tsx | 28 +- packages/ui/src/forms/RenderFields/types.ts | 22 +- .../ui/src/forms/RowLabel/Context/index.tsx | 8 +- packages/ui/src/forms/RowLabel/index.tsx | 5 +- packages/ui/src/forms/RowLabel/types.ts | 15 +- .../WatchChildErrors/buildPathSegments.ts | 25 +- .../ui/src/forms/WatchChildErrors/index.tsx | 10 +- packages/ui/src/forms/useField/index.tsx | 4 +- .../forms/withCondition/WatchCondition.tsx | 2 +- packages/ui/src/graphics/Account/index.tsx | 33 +- packages/ui/src/hooks/useDelayedRender.ts | 3 +- packages/ui/src/hooks/useUseAsTitle.ts | 10 +- .../Actions/SetViewActions/index.tsx | 9 +- packages/ui/src/providers/Actions/index.tsx | 19 +- packages/ui/src/providers/Auth/index.tsx | 2 +- .../buildComponentMap/actions.tsx | 54 -- .../buildComponentMap/collections.tsx | 206 ----- .../ComponentMap/buildComponentMap/fields.tsx | 868 ------------------ .../buildComponentMap/globals.tsx | 138 --- .../ComponentMap/buildComponentMap/index.tsx | 111 --- .../ComponentMap/buildComponentMap/types.ts | 43 - .../ui/src/providers/ComponentMap/index.tsx | 85 -- .../src/providers/Config/RenderComponent.tsx | 84 ++ .../Config/createClientConfig/collections.tsx | 385 ++++++++ .../Config/createClientConfig/fields.tsx | 540 +++++++++++ .../Config/createClientConfig/getComponent.ts | 58 ++ .../getCreateMappedComponent.tsx | 139 +++ .../Config/createClientConfig/globals.tsx | 224 +++++ .../Config/createClientConfig/index.tsx | 186 ++++ packages/ui/src/providers/Config/index.tsx | 41 +- .../ui/src/providers/DocumentInfo/index.tsx | 12 +- .../src/providers/FieldComponents/index.tsx | 12 +- packages/ui/src/providers/ListInfo/index.tsx | 24 +- packages/ui/src/providers/Locale/index.tsx | 4 +- .../ui/src/providers/Preferences/index.tsx | 2 +- packages/ui/src/providers/Root/index.tsx | 103 +-- .../ui/src/utilities/buildComponentMap.ts | 3 - .../buildFieldSchemaMap/traverseFields.ts | 1 + packages/ui/src/utilities/buildFormState.ts | 6 +- packages/ui/src/utilities/flattenFieldMap.ts | 24 +- packages/ui/src/utilities/groupNavItems.ts | 12 +- patches/playwright@1.43.0.patch | 71 -- pnpm-lock.yaml | 600 +++++------- public/custom-favicon-dark.png | Bin 0 -> 477 bytes public/custom-favicon-light.png | Bin 0 -> 496 bytes .../_community/collections/Posts/MyAvatar.tsx | 6 + .../collections/Posts/MyComponent.tsx | 14 +- .../collections/Posts/MyComponent2.tsx | 6 + test/_community/collections/Posts/index.ts | 50 +- test/_community/config.ts | 75 ++ test/_community/int.spec.ts | 8 +- test/_community/payload-types.ts | 42 +- .../collections/Disabled/index.ts | 2 +- test/access-control/config.ts | 6 +- test/access-control/int.spec.ts | 9 +- test/access-control/payload-types.ts | 4 + test/admin-root/.gitignore | 2 + .../(payload)/[[...segments]]/not-found.tsx | 5 +- .../app/(payload)/[[...segments]]/page.tsx | 5 +- test/admin-root/app/(payload)/admin/ignore | 1 + test/admin-root/app/(payload)/layout.tsx | 7 +- test/admin-root/config.ts | 3 + test/admin-root/int.spec.ts | 9 +- test/admin-root/next.config.mjs | 9 + test/admin-root/payload-types.ts | 2 + .../collections/CustomFields/AfterInput.tsx | 2 +- .../collections/CustomFields/BeforeInput.tsx | 2 +- .../CustomFields/FieldDescription/index.tsx | 6 +- .../CustomFields/fields/Select/index.tsx | 9 +- .../CustomFields/fields/Text/Description.tsx | 2 +- .../CustomFields/fields/Text/Label.tsx | 4 +- test/admin/collections/CustomFields/index.ts | 23 +- test/admin/collections/CustomViews1.ts | 9 +- test/admin/collections/CustomViews2.ts | 42 +- test/admin/collections/Geo.ts | 17 +- test/admin/collections/Posts.ts | 9 +- test/admin/components/AdminButton/index.tsx | 6 +- .../admin/components/AfterDashboard/index.tsx | 6 +- test/admin/components/AfterNavLinks/index.tsx | 10 +- test/admin/components/BeforeLogin/index.tsx | 6 +- .../components/CollectionAPIButton/index.tsx | 4 +- .../components/CollectionEditButton/index.tsx | 4 +- .../components/CollectionListButton/index.tsx | 4 +- .../components/CustomTabComponent/client.tsx | 7 +- test/admin/components/Logout/index.tsx | 11 +- .../components/views/CustomAccount/index.tsx | 4 +- .../views/CustomDashboard/index.tsx | 4 +- .../components/views/CustomEdit/index.tsx | 8 +- .../views/CustomEditDefault/index.tsx | 10 +- .../components/views/CustomTabLabel/index.tsx | 6 +- .../views/CustomTabNested/index.tsx | 6 +- .../components/views/CustomVersions/index.tsx | 10 +- .../views/CustomView/index.client.tsx | 8 +- test/admin/config.ts | 46 +- test/admin/e2e/1/e2e.spec.ts | 16 +- test/admin/e2e/2/e2e.spec.ts | 2 +- test/admin/globals/CustomViews1.ts | 7 +- test/admin/globals/CustomViews2.ts | 29 +- test/admin/globals/Global.ts | 12 +- test/admin/payload-types.ts | 2 + test/array-update/config.ts | 5 + test/array-update/int.spec.ts | 9 +- test/auth/config.ts | 6 +- test/auth/custom-strategy/config.ts | 3 + test/auth/custom-strategy/int.spec.ts | 9 +- test/auth/int.spec.ts | 8 +- test/auth/removed-token/config.ts | 9 + test/auth/removed-token/int.spec.ts | 10 +- test/buildConfigWithDefaults.ts | 47 +- test/collections-graphql/config.ts | 5 + test/collections-graphql/int.spec.ts | 4 +- test/collections-rest/config.ts | 5 + test/collections-rest/int.spec.ts | 9 +- test/config/config.ts | 5 + test/config/int.spec.ts | 9 +- test/custom-graphql/config.ts | 5 + test/custom-graphql/int.spec.ts | 9 +- test/database/config.ts | 5 + test/database/int.spec.ts | 3 +- test/databaseAdapter.ts | 16 + test/dataloader/config.ts | 5 + test/dataloader/int.spec.ts | 10 +- test/{dev.js => dev.ts} | 15 +- test/email-nodemailer/config.ts | 6 +- test/email-resend/config.ts | 6 +- test/email/config.ts | 6 +- test/endpoints/config.ts | 5 + test/endpoints/int.spec.ts | 8 +- test/field-error-states/config.ts | 5 + test/field-perf/config.ts | 5 + test/fields-relationship/config.ts | 32 +- test/fields-relationship/int.spec.ts | 9 +- test/fields-relationship/payload-types.ts | 1 + .../collections/Array/LabelComponent.tsx | 4 +- test/fields/collections/Array/index.ts | 3 +- test/fields/collections/Blocks/index.ts | 3 +- .../CustomLabel/getCustomLabel.tsx | 16 +- test/fields/collections/Collapsible/index.ts | 23 +- test/fields/collections/Email/CustomError.tsx | 4 +- test/fields/collections/Email/CustomLabel.tsx | 4 +- test/fields/collections/Email/index.ts | 12 +- test/fields/collections/Group/index.ts | 1 - .../collections/Lexical/LabelComponent.tsx | 6 +- test/fields/collections/Lexical/index.ts | 6 +- .../collections/LexicalMigrate/index.ts | 2 +- test/fields/collections/Tabs/index.ts | 3 +- test/fields/collections/UI/index.ts | 3 +- test/fields/config.ts | 3 + test/fields/int.spec.ts | 8 +- test/fields/lexical.int.spec.ts | 14 +- test/generateGraphQLSchema.ts | 14 +- test/generateImportMap.ts | 33 + test/generateTypes.ts | 11 +- test/globals/config.ts | 5 + test/globals/int.spec.ts | 10 +- test/graphql-schema-gen/config.ts | 5 + test/helpers/build.js | 2 +- test/helpers/initPayloadE2E.ts | 9 +- test/helpers/initPayloadE2ENoConfig.ts | 4 + test/helpers/initPayloadInt.ts | 18 +- test/helpers/setTestEnvPaths.ts | 2 +- test/helpers/startMemoryDB.ts | 2 +- test/hooks/config.ts | 5 + test/hooks/int.spec.ts | 9 +- test/i18n/config.ts | 18 +- test/i18n/e2e.spec.ts | 2 +- test/i18n/payload-types.ts | 10 +- test/initDevAndTest.ts | 142 +++ test/jest.config.js | 2 +- test/jest.setup.env.js | 1 - test/jest.setup.js | 83 +- test/live-preview/.gitignore | 2 + .../admin/[[...segments]]/not-found.tsx | 5 +- .../(payload)/admin/[[...segments]]/page.tsx | 5 +- test/live-preview/app/(payload)/layout.tsx | 7 +- test/live-preview/collections/Pages.ts | 9 +- .../CollectionLivePreviewButton/index.tsx | 8 +- .../GlobalLivePreviewButton/index.tsx | 8 +- test/live-preview/config.ts | 3 + test/live-preview/globals/Footer.ts | 7 +- test/live-preview/int.spec.ts | 3 +- test/live-preview/next.config.mjs | 14 +- test/live-preview/payload-types.ts | 2 + test/loader/dependency-test.js | 2 +- test/loader/fileWithCJSImport.ts | 4 +- test/loader/init.js | 6 +- test/loader/int.spec.ts | 5 - test/loader/load.js | 26 - test/loader/server-only-test.ts | 3 - test/loader/startChildProcess.ts | 25 +- test/localization-rtl/config.ts | 5 + test/localization/config.ts | 5 + test/localization/int.spec.ts | 9 +- test/login-with-username/int.spec.ts | 9 +- test/migrations-cli/config.ts | 5 + test/nested-fields/config.ts | 5 + test/playwright.config.ts | 6 +- test/plugin-cloud-storage/config.ts | 5 + test/plugin-cloud-storage/int.spec.ts | 8 +- test/plugin-cloud/config.ts | 5 + test/plugin-cloud/int.spec.ts | 9 +- test/plugin-form-builder/config.ts | 5 + test/plugin-form-builder/int.spec.ts | 8 +- test/plugin-nested-docs/collections/Pages.ts | 2 +- test/plugin-nested-docs/config.ts | 5 + test/plugin-nested-docs/int.spec.ts | 9 +- test/plugin-redirects/config.ts | 5 + test/plugin-redirects/int.spec.ts | 9 +- test/plugin-relationship-object-ids/config.ts | 5 + .../int.spec.ts | 9 +- test/plugin-search/config.ts | 5 + test/plugin-search/int.spec.ts | 8 +- test/plugin-sentry/components.tsx | 1 + test/plugin-sentry/config.ts | 6 +- test/plugin-sentry/int.spec.ts | 9 +- test/plugin-seo/config.ts | 5 + test/plugin-seo/int.spec.ts | 3 +- test/plugin-seo/payload-types.ts | 2 + test/plugin-stripe/collections/Customers.ts | 4 +- test/plugin-stripe/config.ts | 5 + test/plugin-stripe/int.spec.ts | 9 +- test/plugins/config.ts | 5 + test/plugins/int.spec.ts | 10 +- test/relationships/config.ts | 5 + test/relationships/int.spec.ts | 8 +- test/runInit.ts | 70 ++ test/storage-azure/config.ts | 5 + test/storage-gcs/config.ts | 5 + test/storage-s3/config.ts | 5 + test/storage-s3/int.spec.ts | 6 +- test/storage-uploadthing/config.ts | 5 + test/storage-vercel-blob/config.ts | 5 + test/tsconfig.json | 20 +- .../components/CustomUpload/index.tsx | 6 +- .../collections/CustomUploadField/index.ts | 3 +- test/uploads/config.ts | 5 + test/uploads/int.spec.ts | 3 +- test/versions/collections/Drafts.ts | 15 +- test/versions/collections/DraftsWithMax.ts | 15 +- test/versions/config.ts | 5 + test/versions/globals/Draft.ts | 12 +- test/versions/globals/DraftWithMax.ts | 12 +- test/versions/int.spec.ts | 8 +- test/versions/payload-types.ts | 2 + tsconfig.json | 26 +- 874 files changed, 12208 insertions(+), 9403 deletions(-) create mode 100644 .idea/runConfigurations/Run_Dev_admin.xml create mode 100644 app/(app)/layout.tsx create mode 100644 app/(app)/test/page.tsx delete mode 100644 app/(payload)/admin/importMap.js delete mode 100644 packages/payload/src/admin/fields/index.ts delete mode 100644 packages/payload/src/admin/forms/FieldMap.ts delete mode 100644 packages/payload/src/admin/forms/FieldTypes.ts create mode 100644 packages/payload/src/bin/generateImportMap/index.ts create mode 100644 packages/payload/src/bin/generateImportMap/iterateCollections.ts create mode 100644 packages/payload/src/bin/generateImportMap/iterateConfig.ts create mode 100644 packages/payload/src/bin/generateImportMap/iterateFields.ts create mode 100644 packages/payload/src/bin/generateImportMap/iterateGlobals.ts create mode 100644 packages/payload/src/bin/generateImportMap/parsePayloadComponent.ts delete mode 100644 packages/payload/src/bin/loader/clientExtensions.ts delete mode 100644 packages/payload/src/bin/loader/compile.ts delete mode 100644 packages/payload/src/bin/loader/ignores.ts delete mode 100644 packages/payload/src/bin/loader/index.ts delete mode 100644 packages/payload/src/bin/loader/read-default-tsconfig.ts delete mode 100644 packages/payload/src/bin/loader/resolveOriginalPath.ts delete mode 100644 packages/payload/src/utilities/importWithoutClientFiles.ts create mode 100644 packages/plugin-form-builder/src/exports/client.ts create mode 100644 packages/plugin-search/src/exports/client.ts create mode 100644 packages/plugin-seo/src/exports/client.ts create mode 100644 packages/plugin-stripe/src/exports/client.ts rename packages/richtext-lexical/src/features/align/{feature.client.tsx => client/index.tsx} (89%) rename packages/richtext-lexical/src/features/align/{ => client}/toolbarAlignGroup.ts (57%) delete mode 100644 packages/richtext-lexical/src/features/align/feature.server.ts rename packages/richtext-lexical/src/features/align/{ => server}/i18n.ts (100%) create mode 100644 packages/richtext-lexical/src/features/align/server/index.ts rename packages/richtext-lexical/src/features/blockquote/{feature.client.tsx => client/index.tsx} (79%) rename packages/richtext-lexical/src/features/blockquote/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/blockquote/{feature.server.ts => server/index.ts} (74%) rename packages/richtext-lexical/src/features/blocks/{ => client}/component/BlockContent.tsx (74%) rename packages/richtext-lexical/src/features/blocks/{ => client}/component/FormSavePlugin.tsx (100%) rename packages/richtext-lexical/src/features/blocks/{ => client}/component/index.scss (98%) rename packages/richtext-lexical/src/features/blocks/{ => client}/component/index.tsx (62%) rename packages/richtext-lexical/src/features/blocks/{ => client}/component/removeEmptyArrayValues.ts (100%) rename packages/richtext-lexical/src/features/blocks/{ => client}/componentInline/index.scss (97%) rename packages/richtext-lexical/src/features/blocks/{ => client}/componentInline/index.tsx (77%) create mode 100644 packages/richtext-lexical/src/features/blocks/client/index.tsx create mode 100644 packages/richtext-lexical/src/features/blocks/client/nodes/BlocksNode.tsx create mode 100644 packages/richtext-lexical/src/features/blocks/client/nodes/InlineBlocksNode.tsx rename packages/richtext-lexical/src/features/blocks/{ => client}/plugin/commands.ts (100%) rename packages/richtext-lexical/src/features/blocks/{ => client}/plugin/index.tsx (78%) delete mode 100644 packages/richtext-lexical/src/features/blocks/feature.client.tsx rename packages/richtext-lexical/src/features/blocks/{ => server}/graphQLPopulationPromise.ts (81%) rename packages/richtext-lexical/src/features/blocks/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/blocks/{feature.server.ts => server/index.ts} (55%) rename packages/richtext-lexical/src/features/blocks/{ => server}/nodes/BlocksNode.tsx (77%) rename packages/richtext-lexical/src/features/blocks/{ => server}/nodes/InlineBlocksNode.tsx (68%) rename packages/richtext-lexical/src/features/blocks/{ => server}/validate.ts (90%) rename packages/richtext-lexical/src/features/converters/html/{feature.server.ts => index.ts} (100%) rename packages/richtext-lexical/src/features/debug/testRecorder/{feature.client.tsx => client/index.tsx} (73%) rename packages/richtext-lexical/src/features/debug/testRecorder/{ => client}/plugin/index.scss (95%) rename packages/richtext-lexical/src/features/debug/testRecorder/{ => client}/plugin/index.tsx (98%) delete mode 100644 packages/richtext-lexical/src/features/debug/testRecorder/feature.server.ts create mode 100644 packages/richtext-lexical/src/features/debug/testRecorder/server/index.ts rename packages/richtext-lexical/src/features/debug/treeView/{feature.client.tsx => client/index.tsx} (72%) rename packages/richtext-lexical/src/features/debug/treeView/{ => client}/plugin/index.scss (100%) rename packages/richtext-lexical/src/features/debug/treeView/{ => client}/plugin/index.tsx (91%) delete mode 100644 packages/richtext-lexical/src/features/debug/treeView/feature.server.ts create mode 100644 packages/richtext-lexical/src/features/debug/treeView/server/index.ts rename packages/richtext-lexical/src/features/experimental_table/{feature.client.ts => client/index.ts} (83%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/plugins/TableActionMenuPlugin/index.scss (96%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/plugins/TableActionMenuPlugin/index.tsx (98%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/plugins/TableCellResizerPlugin/index.tsx (98%) create mode 100644 packages/richtext-lexical/src/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.tsx rename packages/richtext-lexical/src/features/experimental_table/{ => client}/plugins/TablePlugin/index.scss (94%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/plugins/TablePlugin/index.tsx (93%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/utils/debounce.ts (100%) rename packages/richtext-lexical/src/features/experimental_table/{ => client}/utils/useDebounce.ts (100%) rename packages/richtext-lexical/src/features/experimental_table/{feature.server.ts => server/index.ts} (92%) rename packages/richtext-lexical/src/features/heading/{feature.client.tsx => client/index.tsx} (78%) rename packages/richtext-lexical/src/features/heading/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/heading/{feature.server.ts => server/index.ts} (80%) rename packages/richtext-lexical/src/features/horizontalRule/{ => client}/component/index.tsx (100%) rename packages/richtext-lexical/src/features/horizontalRule/{feature.client.tsx => client/index.tsx} (75%) rename packages/richtext-lexical/src/features/horizontalRule/{ => client}/markdownTransformer.ts (100%) create mode 100644 packages/richtext-lexical/src/features/horizontalRule/client/nodes/HorizontalRuleNode.tsx rename packages/richtext-lexical/src/features/horizontalRule/{ => client}/plugin/index.scss (90%) rename packages/richtext-lexical/src/features/horizontalRule/{ => client}/plugin/index.tsx (82%) delete mode 100644 packages/richtext-lexical/src/features/horizontalRule/feature.server.ts rename packages/richtext-lexical/src/features/horizontalRule/{ => server}/i18n.ts (100%) create mode 100644 packages/richtext-lexical/src/features/horizontalRule/server/index.ts create mode 100644 packages/richtext-lexical/src/features/horizontalRule/server/markdownTransformer.ts rename packages/richtext-lexical/src/features/horizontalRule/{ => server}/nodes/HorizontalRuleNode.tsx (76%) rename packages/richtext-lexical/src/features/indent/{feature.client.tsx => client/index.tsx} (83%) rename packages/richtext-lexical/src/features/indent/{ => client}/toolbarIndentGroup.ts (69%) delete mode 100644 packages/richtext-lexical/src/features/indent/feature.server.ts rename packages/richtext-lexical/src/features/indent/{ => server}/i18n.ts (100%) create mode 100644 packages/richtext-lexical/src/features/indent/server/index.ts rename packages/richtext-lexical/src/features/link/{feature.client.tsx => client/index.tsx} (80%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/autoLink/index.tsx (97%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/clickableLink/index.tsx (68%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/floatingLinkEditor/LinkEditor/commands.ts (100%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/floatingLinkEditor/LinkEditor/index.tsx (95%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/floatingLinkEditor/index.scss (88%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/floatingLinkEditor/index.tsx (74%) rename packages/richtext-lexical/src/features/link/{ => client}/plugins/floatingLinkEditor/types.ts (86%) create mode 100644 packages/richtext-lexical/src/features/link/client/plugins/link/index.tsx delete mode 100644 packages/richtext-lexical/src/features/link/plugins/link/index.tsx rename packages/richtext-lexical/src/features/link/{drawer => server}/baseFields.ts (100%) rename packages/richtext-lexical/src/features/link/{ => server}/graphQLPopulationPromise.ts (77%) rename packages/richtext-lexical/src/features/link/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/link/{feature.server.ts => server/index.ts} (91%) rename packages/richtext-lexical/src/features/link/{plugins/floatingLinkEditor/utilities.ts => server/transformExtraFields.ts} (94%) rename packages/richtext-lexical/src/features/link/{ => server}/validate.ts (89%) rename packages/richtext-lexical/src/features/lists/checklist/{feature.client.tsx => client/index.tsx} (81%) rename packages/richtext-lexical/src/features/lists/checklist/{ => client}/plugin/index.tsx (77%) rename packages/richtext-lexical/src/features/lists/checklist/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/lists/checklist/{feature.server.ts => server/index.ts} (63%) rename packages/richtext-lexical/src/features/lists/orderedList/{feature.client.tsx => client/index.tsx} (81%) rename packages/richtext-lexical/src/features/lists/orderedList/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/lists/orderedList/{feature.server.ts => server/index.ts} (61%) rename packages/richtext-lexical/src/features/lists/unorderedList/{feature.client.tsx => client/index.tsx} (79%) rename packages/richtext-lexical/src/features/lists/unorderedList/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/lists/unorderedList/{feature.server.ts => server/index.ts} (53%) delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/link/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/link/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/list/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/list/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/blockquote/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/blockquote/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/heading/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/heading/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/indent/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/indent/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/link/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/link/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/listItem/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/listItem/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/orderedList/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/orderedList/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/relationship/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/relationship/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/unknown/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/unknown/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/unorderedList/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/unorderedList/index.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/upload/client.ts delete mode 100644 packages/richtext-lexical/src/features/migrations/slateToLexical/converter/converters/upload/index.ts rename packages/richtext-lexical/src/features/paragraph/{feature.client.tsx => client/index.tsx} (81%) delete mode 100644 packages/richtext-lexical/src/features/paragraph/feature.server.ts rename packages/richtext-lexical/src/features/paragraph/{ => server}/i18n.ts (100%) create mode 100644 packages/richtext-lexical/src/features/paragraph/server/index.ts rename packages/richtext-lexical/src/features/relationship/{nodes => client}/components/RelationshipComponent.tsx (93%) rename packages/richtext-lexical/src/features/relationship/{nodes => client}/components/index.scss (100%) rename packages/richtext-lexical/src/features/relationship/{ => client}/drawer/commands.ts (100%) rename packages/richtext-lexical/src/features/relationship/{ => client}/drawer/index.tsx (100%) rename packages/richtext-lexical/src/features/relationship/{feature.client.tsx => client/index.tsx} (82%) create mode 100644 packages/richtext-lexical/src/features/relationship/client/nodes/RelationshipNode.tsx rename packages/richtext-lexical/src/features/relationship/{ => client}/plugins/index.tsx (89%) rename packages/richtext-lexical/src/features/relationship/{ => client}/utils/EnabledRelationshipsCondition.tsx (95%) rename packages/richtext-lexical/src/features/relationship/{ => server}/graphQLPopulationPromise.ts (86%) rename packages/richtext-lexical/src/features/relationship/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/relationship/{feature.server.ts => server/index.ts} (86%) rename packages/richtext-lexical/src/features/relationship/{ => server}/nodes/RelationshipNode.tsx (74%) rename packages/richtext-lexical/src/features/toolbars/fixed/{ => client}/Toolbar/index.scss (98%) rename packages/richtext-lexical/src/features/toolbars/fixed/{ => client}/Toolbar/index.tsx (90%) rename packages/richtext-lexical/src/features/toolbars/fixed/{feature.client.tsx => client/index.tsx} (63%) rename packages/richtext-lexical/src/features/toolbars/fixed/{feature.server.ts => server/index.ts} (82%) rename packages/richtext-lexical/src/features/toolbars/inline/{ => client}/Toolbar/index.scss (96%) rename packages/richtext-lexical/src/features/toolbars/inline/{ => client}/Toolbar/index.tsx (95%) rename packages/richtext-lexical/src/features/toolbars/inline/{feature.client.tsx => client/index.tsx} (74%) delete mode 100644 packages/richtext-lexical/src/features/toolbars/inline/feature.server.ts create mode 100644 packages/richtext-lexical/src/features/toolbars/inline/server/index.ts rename packages/richtext-lexical/src/features/upload/{ => client}/component/index.scss (98%) rename packages/richtext-lexical/src/features/upload/{ => client}/component/index.tsx (91%) rename packages/richtext-lexical/src/features/upload/{ => client}/drawer/commands.ts (100%) rename packages/richtext-lexical/src/features/upload/{ => client}/drawer/index.tsx (95%) rename packages/richtext-lexical/src/features/upload/{ => client}/feature.client.tsx (84%) create mode 100644 packages/richtext-lexical/src/features/upload/client/nodes/UploadNode.tsx rename packages/richtext-lexical/src/features/upload/{ => client}/plugin/index.tsx (93%) rename packages/richtext-lexical/src/features/upload/{ => server}/feature.server.ts (90%) rename packages/richtext-lexical/src/features/upload/{ => server}/graphQLPopulationPromise.ts (88%) rename packages/richtext-lexical/src/features/upload/{ => server}/i18n.ts (100%) rename packages/richtext-lexical/src/features/upload/{ => server}/nodes/UploadNode.tsx (82%) rename packages/richtext-lexical/src/features/upload/{ => server}/validate.ts (96%) delete mode 100644 packages/richtext-lexical/src/lexical/utils/invariant.ts create mode 100644 packages/richtext-lexical/src/utilities/generateImportMap.tsx create mode 100644 packages/richtext-slate/src/exports/client/index.ts create mode 100644 packages/richtext-slate/src/field/elements/blockquote/Button.tsx rename packages/richtext-slate/src/field/elements/blockquote/{Blockquote.tsx => Element.tsx} (87%) create mode 100644 packages/richtext-slate/src/field/elements/h1/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/h2/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/h3/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/h4/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/h5/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/h6/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/ol/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/textAlign/Button.tsx create mode 100644 packages/richtext-slate/src/field/elements/ul/Button.tsx create mode 100644 packages/richtext-slate/src/field/leaves/bold/LeafButton.tsx create mode 100644 packages/richtext-slate/src/field/leaves/code/LeafButton.tsx create mode 100644 packages/richtext-slate/src/field/leaves/italic/LeafButton.tsx create mode 100644 packages/richtext-slate/src/field/leaves/strikethrough/LeafButton.tsx create mode 100644 packages/richtext-slate/src/field/leaves/underline/LeafButton.tsx delete mode 100644 packages/ui/src/elements/RenderCustomClientComponent/index.tsx delete mode 100644 packages/ui/src/elements/RenderCustomComponent/index.tsx rename packages/ui/src/elements/WhereBuilder/{reduceFieldMap.tsx => reduceClientFields.tsx} (67%) create mode 100644 packages/ui/src/fields/Number/Input.tsx create mode 100644 packages/ui/src/forms/Form/createNestedClientFieldPath.ts delete mode 100644 packages/ui/src/forms/Form/createNestedFieldPath.ts delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/actions.tsx delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/collections.tsx delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/fields.tsx delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/globals.tsx delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/index.tsx delete mode 100644 packages/ui/src/providers/ComponentMap/buildComponentMap/types.ts delete mode 100644 packages/ui/src/providers/ComponentMap/index.tsx create mode 100644 packages/ui/src/providers/Config/RenderComponent.tsx create mode 100644 packages/ui/src/providers/Config/createClientConfig/collections.tsx create mode 100644 packages/ui/src/providers/Config/createClientConfig/fields.tsx create mode 100644 packages/ui/src/providers/Config/createClientConfig/getComponent.ts create mode 100644 packages/ui/src/providers/Config/createClientConfig/getCreateMappedComponent.tsx create mode 100644 packages/ui/src/providers/Config/createClientConfig/globals.tsx create mode 100644 packages/ui/src/providers/Config/createClientConfig/index.tsx delete mode 100644 packages/ui/src/utilities/buildComponentMap.ts delete mode 100644 patches/playwright@1.43.0.patch create mode 100644 public/custom-favicon-dark.png create mode 100644 public/custom-favicon-light.png create mode 100644 test/_community/collections/Posts/MyAvatar.tsx create mode 100644 test/_community/collections/Posts/MyComponent2.tsx create mode 100644 test/admin-root/app/(payload)/admin/ignore create mode 100644 test/databaseAdapter.ts rename test/{dev.js => dev.ts} (89%) create mode 100644 test/generateImportMap.ts create mode 100644 test/initDevAndTest.ts delete mode 100644 test/jest.setup.env.js delete mode 100644 test/loader/load.js delete mode 100644 test/loader/server-only-test.ts create mode 100644 test/runInit.ts diff --git a/.gitignore b/.gitignore index 3098feb9d..192cd2710 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ dist !/.idea/runConfigurations !/.idea/payload.iml + test-results .devcontainer .localstack @@ -300,3 +301,8 @@ $RECYCLE.BIN/ /build .swc +app/(payload)/admin/importMap.js +test/live-preview/app/(payload)/admin/importMap.js +/test/live-preview/app/(payload)/admin/importMap.js +test/admin-root/app/(payload)/admin/importMap.js +/test/admin-root/app/(payload)/admin/importMap.js diff --git a/.husky/pre-commit b/.husky/pre-commit index 637b5a02f..e69de29bb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +0,0 @@ -pnpm run lint-staged --quiet diff --git a/.idea/payload.iml b/.idea/payload.iml index 859077075..89c279912 100644 --- a/.idea/payload.iml +++ b/.idea/payload.iml @@ -26,6 +26,7 @@ + diff --git a/.idea/runConfigurations/Run_Dev_Fields.xml b/.idea/runConfigurations/Run_Dev_Fields.xml index 9d065377a..bc795fa6d 100644 --- a/.idea/runConfigurations/Run_Dev_Fields.xml +++ b/.idea/runConfigurations/Run_Dev_Fields.xml @@ -1,8 +1,13 @@ - - - - + + + + +