Files
payloadcms__payload/packages/ui/package.json
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

280 lines
10 KiB
JSON
Raw Normal View History

2023-11-15 16:00:45 -05:00
{
"name": "@payloadcms/ui",
2025-11-25 13:37:17 -05:00
"version": "3.65.0",
"homepage": "https://payloadcms.com",
"repository": {
"type": "git",
"url": "https://github.com/payloadcms/payload.git",
"directory": "packages/ui"
},
"license": "MIT",
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
"maintainers": [
{
"name": "Payload",
"email": "info@payloadcms.com",
"url": "https://payloadcms.com"
}
],
"sideEffects": [
"*.scss",
"*.css"
],
"type": "module",
2023-11-15 17:22:40 -05:00
"exports": {
".": {
"import": "./src/exports/client/index.ts",
"types": "./src/exports/client/index.ts",
"default": "./src/exports/client/index.ts"
},
"./shared": {
"import": "./src/exports/shared/index.ts",
"types": "./src/exports/shared/index.ts",
"default": "./src/exports/shared/index.ts"
},
"./scss": {
"import": "./src/scss/styles.scss",
"default": "./src/scss/styles.scss"
feat!: prebundle payload, ui, richtext-lexical (#6579) # Breaking Changes ### New file import locations Exports from the `payload` package have been _significantly_ cleaned up. Now, just about everything is able to be imported from `payload` directly, rather than an assortment of subpath exports. This means that things like `import { buildConfig } from 'payload/config'` are now just imported via `import { buildConfig } from 'payload'`. The mental model is significantly simpler for developers, but you might need to update some of your imports. Payload now exposes only three exports: 1. `payload` - all types and server-only Payload code 2. `payload/shared` - utilities that can be used in either the browser or in Node environments 3. `payload/node` - heavy utilities that should only be imported in Node scripts and never be imported into bundled code like Next.js ### UI library pre-bundling With this release, we've dramatically sped up the compile time for Payload by pre-bundling our entire UI package for use inside of the Payload admin itself. There are new exports that should be used within Payload custom components: 1. `@payloadcms/ui/client` - all client components 2. `@payloadcms/ui/server` - all server components For all of your custom Payload admin UI components, you should be importing from one of these two pre-compiled barrel files rather than importing from the more deeply nested exports directly. That will keep compile times nice and speedy, and will also make sure that the bundled JS for your admin UI is kept small. For example, whereas before, if you imported the Payload `Button`, you would have imported it like this: ```ts import { Button } from '@payloadcms/ui/elements/Button' ``` Now, you would import it like this: ```ts import { Button } from '@payloadcms/ui/client' ``` This is a significant DX / performance optimization that we're pretty pumped about. However, if you are importing or re-using Payload UI components _outside_ of the Payload admin UI, for example in your own frontend apps, you can import from the individual component exports which will make sure that the bundled JS is kept to a minimum in your frontend apps. So in your own frontend, you can continue to import directly to the components that you want to consume rather than importing from the pre-compiled barrel files. Individual component exports will now come with their corresponding CSS and everything will work perfectly as-expected. ### Specific exports have changed - `'@payloadcms/ui/templates/Default'` and `'@payloadcms/ui/templates/Minimal`' are now exported from `'@payloadcms/next/templates'` - Old: `import { LogOut } from '@payloadcms/ui/icons/LogOut'` new: `import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'` ## Background info In effort to make local dev as fast as possible, we need to import as few files as possible so that the compiler has less to process. One way we've achieved this in the Admin Panel was to _remove_ all .scss imports from all components in the `@payloadcms/ui` module using a build process. This stripped all `import './index.scss'` statements out of each component before injecting them into `dist`. Instead, it bundles all of the CSS into a single `main.css` file, and we import _that_ at the root of the app. While this concept is _still_ the right solution to the problem, this particular approach is not viable when using these components outside the Admin Panel, where not only does this root stylesheet not exist, but where it would also bloat your app with unused styles. Instead, we need to _keep_ these .scss imports in place so they are imported directly alongside your components, as expected. Then, we need create a _new_ build step that _separately_ compiles the components _without_ their stylesheets—this way your app can consume either as needed from the new `client` and `server` barrel files within `@payloadcms/ui`, i.e. from within `@payloadcms/next` and all other admin-specific packages and plugins. This way, all other applications will simply import using the direct file paths, just as they did before. Except now they come with stylesheets. And we've gotten a pretty awesome initial compilation performance boost. --------- Co-authored-by: James <james@trbl.design> Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-06-17 14:25:36 -04:00
},
"./icons/*": {
"import": "./src/icons/*/index.tsx",
"types": "./src/icons/*/index.tsx",
"default": "./src/icons/*/index.tsx"
},
"./elements/*": {
"import": "./src/elements/*/index.tsx",
"types": "./src/elements/*/index.tsx",
"default": "./src/elements/*/index.tsx"
},
feat!: on demand rsc (#8364) Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
2024-11-11 13:59:05 -05:00
"./elements/RenderServerComponent": {
"import": "./src/elements/RenderServerComponent/index.tsx",
"types": "./src/elements/RenderServerComponent/index.tsx",
"default": "./src/elements/RenderServerComponent/index.tsx"
},
"./rsc": {
"import": "./src/exports/rsc/index.ts",
"types": "./src/exports/rsc/index.ts",
"default": "./src/exports/rsc/index.ts"
2024-03-19 15:23:22 -04:00
},
"./utilities/buildFormState": {
"import": "./src/utilities/buildFormState.ts",
"types": "./src/utilities/buildFormState.ts",
"default": "./src/utilities/buildFormState.ts"
},
feat!: on demand rsc (#8364) Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
2024-11-11 13:59:05 -05:00
"./utilities/buildTableState": {
"import": "./src/utilities/buildTableState.ts",
"types": "./src/utilities/buildTableState.ts",
"default": "./src/utilities/buildTableState.ts"
},
"./utilities/getFolderResultsComponentAndData": {
"import": "./src/utilities/getFolderResultsComponentAndData.tsx",
"types": "./src/utilities/getFolderResultsComponentAndData.tsx",
"default": "./src/utilities/getFolderResultsComponentAndData.tsx"
},
"./utilities/getClientSchemaMap": {
"import": "./src/utilities/getClientSchemaMap.ts",
"types": "./src/utilities/getClientSchemaMap.ts",
"default": "./src/utilities/getClientSchemaMap.ts"
},
"./utilities/getSchemaMap": {
"import": "./src/utilities/getSchemaMap.ts",
"types": "./src/utilities/getSchemaMap.ts",
"default": "./src/utilities/getSchemaMap.ts"
},
"./utilities/schedulePublishHandler": {
"import": "./src/utilities/schedulePublishHandler.ts",
"types": "./src/utilities/schedulePublishHandler.ts",
"default": "./src/utilities/schedulePublishHandler.ts"
},
perf: faster page navigation by speeding up createClientConfig, speed up version fetching, speed up lexical init. Up to 100x faster (#9457) If you had a lot of fields and collections, createClientConfig would be extremely slow, as it was copying a lot of memory. In my test config with a lot of fields and collections, it took 4 seconds(!!). And not only that, it also ran between every single page navigation. This PR significantly speeds up the createClientConfig function. In my test config, its execution speed went from 4 seconds to 50 ms. Additionally, createClientConfig is now properly cached in both dev & prod. It no longer runs between every single page navigation. Even if you trigger a full page reload, createClientConfig will be cached and not run again. Despite that, HMR remains fully-functional. This will make payload feel noticeably faster for large configs - especially if it contains a lot of richtext fields, as it was previously deep-copying the relatively large richText editor configs over and over again. ## Before - 40 sec navigation speed https://github.com/user-attachments/assets/fe6b707a-459b-44c6-982a-b277f6cbb73f ## After - 1 sec navigation speed https://github.com/user-attachments/assets/384fba63-dc32-4396-b3c2-0353fcac6639 ## Todo - [x] Implement ClientSchemaMap and cache it, to remove createClientField call in our form state endpoint - [x] Enable schemaMap caching for dev - [x] Cache lexical clientField generation, or add it to the parent clientConfig ## Lexical changes Red: old / removed Green: new ![CleanShot 2024-11-22 at 21 07 41@2x](https://github.com/user-attachments/assets/f8321218-763c-4120-9353-076c381f33fb) ### Speed up version queries This PR comes with performance optimizations for fetching versions before a document is loaded. Not only does it use the new select API to limit the fields it queries, it also completely skips a database query if the current document is published. ### Speed up lexical init Removes a bunch of unnecessary deep copying of lexical objects which caused higher memory usage and slower load times. Additionally, the lexical default config sanitization now happens less often.
2024-11-26 14:31:14 -07:00
"./utilities/getClientConfig": {
"import": "./src/utilities/getClientConfig.ts",
"types": "./src/utilities/getClientConfig.ts",
"default": "./src/utilities/getClientConfig.ts"
},
"./utilities/buildFieldSchemaMap/traverseFields": {
"import": "./src/utilities/buildFieldSchemaMap/traverseFields.ts",
"types": "./src/utilities/buildFieldSchemaMap/traverseFields.ts",
"default": "./src/utilities/buildFieldSchemaMap/traverseFields.ts"
},
feat!: on demand rsc (#8364) Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
2024-11-11 13:59:05 -05:00
"./forms/fieldSchemasToFormState": {
"import": "./src/forms/fieldSchemasToFormState/index.tsx",
"types": "./src/forms/fieldSchemasToFormState/index.tsx",
"default": "./src/forms/fieldSchemasToFormState/index.tsx"
},
"./forms/renderField": {
"import": "./src/forms/fieldSchemasToFormState/renderField.tsx",
"types": "./src/forms/fieldSchemasToFormState/renderField.tsx",
"default": "./src/forms/fieldSchemasToFormState/renderField.tsx"
},
"./scss/app.scss": "./src/scss/app.scss",
"./assets": {
"import": "./src/assets/index.ts",
"types": "./src/assets/index.ts",
"default": "./src/assets/index.ts"
}
},
"main": "./src/exports/client/index.ts",
"types": "./src/exports/client/index.ts",
"files": [
"dist"
],
"scripts": {
"build": "pnpm build:reactcompiler",
"build:babel": "rm -rf dist_optimized && babel dist --out-dir dist_optimized --source-maps --extensions .ts,.js,.tsx,.jsx,.cjs,.mjs && rm -rf dist && mv dist_optimized dist",
"build:bundle-for-analysis": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && pnpm build:swc && pnpm build:babel && pnpm copyfiles && pnpm build:esbuild esbuild --no-split",
"build:esbuild": "node bundle.js",
"build:esbuild:postprocess": "rm -rf dist/exports/client && mv dist/exports/client_optimized dist/exports/client && rm -rf dist/exports/shared && mv dist/exports/shared_optimized dist/exports/shared",
"build:reactcompiler": "rm -rf dist esbuild && rm -rf tsconfig.tsbuildinfo && pnpm build:swc && pnpm build:babel && pnpm copyfiles && pnpm build:esbuild && pnpm build:esbuild:postprocess && pnpm build:types",
"build:remove-artifact": "rm dist/prod/index.js",
feat!: prebundle payload, ui, richtext-lexical (#6579) # Breaking Changes ### New file import locations Exports from the `payload` package have been _significantly_ cleaned up. Now, just about everything is able to be imported from `payload` directly, rather than an assortment of subpath exports. This means that things like `import { buildConfig } from 'payload/config'` are now just imported via `import { buildConfig } from 'payload'`. The mental model is significantly simpler for developers, but you might need to update some of your imports. Payload now exposes only three exports: 1. `payload` - all types and server-only Payload code 2. `payload/shared` - utilities that can be used in either the browser or in Node environments 3. `payload/node` - heavy utilities that should only be imported in Node scripts and never be imported into bundled code like Next.js ### UI library pre-bundling With this release, we've dramatically sped up the compile time for Payload by pre-bundling our entire UI package for use inside of the Payload admin itself. There are new exports that should be used within Payload custom components: 1. `@payloadcms/ui/client` - all client components 2. `@payloadcms/ui/server` - all server components For all of your custom Payload admin UI components, you should be importing from one of these two pre-compiled barrel files rather than importing from the more deeply nested exports directly. That will keep compile times nice and speedy, and will also make sure that the bundled JS for your admin UI is kept small. For example, whereas before, if you imported the Payload `Button`, you would have imported it like this: ```ts import { Button } from '@payloadcms/ui/elements/Button' ``` Now, you would import it like this: ```ts import { Button } from '@payloadcms/ui/client' ``` This is a significant DX / performance optimization that we're pretty pumped about. However, if you are importing or re-using Payload UI components _outside_ of the Payload admin UI, for example in your own frontend apps, you can import from the individual component exports which will make sure that the bundled JS is kept to a minimum in your frontend apps. So in your own frontend, you can continue to import directly to the components that you want to consume rather than importing from the pre-compiled barrel files. Individual component exports will now come with their corresponding CSS and everything will work perfectly as-expected. ### Specific exports have changed - `'@payloadcms/ui/templates/Default'` and `'@payloadcms/ui/templates/Minimal`' are now exported from `'@payloadcms/next/templates'` - Old: `import { LogOut } from '@payloadcms/ui/icons/LogOut'` new: `import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'` ## Background info In effort to make local dev as fast as possible, we need to import as few files as possible so that the compiler has less to process. One way we've achieved this in the Admin Panel was to _remove_ all .scss imports from all components in the `@payloadcms/ui` module using a build process. This stripped all `import './index.scss'` statements out of each component before injecting them into `dist`. Instead, it bundles all of the CSS into a single `main.css` file, and we import _that_ at the root of the app. While this concept is _still_ the right solution to the problem, this particular approach is not viable when using these components outside the Admin Panel, where not only does this root stylesheet not exist, but where it would also bloat your app with unused styles. Instead, we need to _keep_ these .scss imports in place so they are imported directly alongside your components, as expected. Then, we need create a _new_ build step that _separately_ compiles the components _without_ their stylesheets—this way your app can consume either as needed from the new `client` and `server` barrel files within `@payloadcms/ui`, i.e. from within `@payloadcms/next` and all other admin-specific packages and plugins. This way, all other applications will simply import using the direct file paths, just as they did before. Except now they come with stylesheets. And we've gotten a pretty awesome initial compilation performance boost. --------- Co-authored-by: James <james@trbl.design> Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-06-17 14:25:36 -04:00
"build:swc": "swc ./src -d dist --config-file .swcrc --strip-leading-paths",
"build:types": "tsc --emitDeclarationOnly --outDir dist",
"build:without_reactcompiler": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && pnpm copyfiles && pnpm build:types && pnpm build:swc",
"clean": "rimraf -g {dist,*.tsbuildinfo,esbuild}",
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepublishOnly": "pnpm clean && pnpm turbo build"
},
"dependencies": {
feat: add timezone support on date fields (#10896) Adds support for timezone selection on date fields. ### Summary New `admin.timezones` config: ```ts { // ... admin: { // ... timezones: { supportedTimezones: ({ defaultTimezones }) => [ ...defaultTimezones, { label: '(GMT-6) Monterrey, Nuevo Leon', value: 'America/Monterrey' }, ], defaultTimezone: 'America/Monterrey', }, } } ``` New `timezone` property on date fields: ```ts { type: 'date', name: 'date', timezone: true, } ``` ### Configuration All date fields now accept `timezone: true` to enable this feature, which will inject a new field into the configuration using the date field's name to construct the name for the timezone column. So `publishingDate` will have `publishingDate_tz` as an accompanying column. This new field is inserted during config sanitisation. Dates continue to be stored in UTC, this will help maintain dates without needing a migration and it makes it easier for data to be manipulated as needed. Mongodb also has a restriction around storing dates only as UTC. All timezones are stored by their IANA names so it's compatible with browser APIs. There is a newly generated type for `SupportedTimezones` which is reused across fields. We handle timezone calculations via a new package `@date-fns/tz` which we will be using in the future for handling timezone aware scheduled publishing/unpublishing and more. ### UI Dark mode ![image](https://github.com/user-attachments/assets/fcebdb7f-be01-4382-a1ce-3369f72b4309) Light mode ![image](https://github.com/user-attachments/assets/dee2f1c6-4d0c-49e9-b6c8-a51a83a5e864)
2025-02-10 20:02:53 +00:00
"@date-fns/tz": "1.2.0",
"@dnd-kit/core": "6.0.8",
"@dnd-kit/sortable": "7.0.2",
2025-05-22 10:04:45 -04:00
"@dnd-kit/utilities": "3.2.2",
"@faceless-ui/modal": "3.0.0",
"@faceless-ui/scroll-info": "2.0.0",
"@faceless-ui/window-info": "3.0.1",
"@monaco-editor/react": "4.7.0",
"@payloadcms/translations": "workspace:*",
"bson-objectid": "2.0.4",
"date-fns": "4.1.0",
"dequal": "2.0.3",
"md5": "2.3.0",
"object-to-formdata": "4.5.1",
"qs-esm": "7.0.2",
"react-datepicker": "7.6.0",
"react-image-crop": "10.1.8",
"react-select": "5.9.0",
"scheduler": "0.25.0",
"sonner": "^1.7.2",
"ts-essentials": "10.0.3",
"use-context-selector": "2.0.0",
feat!: prebundle payload, ui, richtext-lexical (#6579) # Breaking Changes ### New file import locations Exports from the `payload` package have been _significantly_ cleaned up. Now, just about everything is able to be imported from `payload` directly, rather than an assortment of subpath exports. This means that things like `import { buildConfig } from 'payload/config'` are now just imported via `import { buildConfig } from 'payload'`. The mental model is significantly simpler for developers, but you might need to update some of your imports. Payload now exposes only three exports: 1. `payload` - all types and server-only Payload code 2. `payload/shared` - utilities that can be used in either the browser or in Node environments 3. `payload/node` - heavy utilities that should only be imported in Node scripts and never be imported into bundled code like Next.js ### UI library pre-bundling With this release, we've dramatically sped up the compile time for Payload by pre-bundling our entire UI package for use inside of the Payload admin itself. There are new exports that should be used within Payload custom components: 1. `@payloadcms/ui/client` - all client components 2. `@payloadcms/ui/server` - all server components For all of your custom Payload admin UI components, you should be importing from one of these two pre-compiled barrel files rather than importing from the more deeply nested exports directly. That will keep compile times nice and speedy, and will also make sure that the bundled JS for your admin UI is kept small. For example, whereas before, if you imported the Payload `Button`, you would have imported it like this: ```ts import { Button } from '@payloadcms/ui/elements/Button' ``` Now, you would import it like this: ```ts import { Button } from '@payloadcms/ui/client' ``` This is a significant DX / performance optimization that we're pretty pumped about. However, if you are importing or re-using Payload UI components _outside_ of the Payload admin UI, for example in your own frontend apps, you can import from the individual component exports which will make sure that the bundled JS is kept to a minimum in your frontend apps. So in your own frontend, you can continue to import directly to the components that you want to consume rather than importing from the pre-compiled barrel files. Individual component exports will now come with their corresponding CSS and everything will work perfectly as-expected. ### Specific exports have changed - `'@payloadcms/ui/templates/Default'` and `'@payloadcms/ui/templates/Minimal`' are now exported from `'@payloadcms/next/templates'` - Old: `import { LogOut } from '@payloadcms/ui/icons/LogOut'` new: `import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'` ## Background info In effort to make local dev as fast as possible, we need to import as few files as possible so that the compiler has less to process. One way we've achieved this in the Admin Panel was to _remove_ all .scss imports from all components in the `@payloadcms/ui` module using a build process. This stripped all `import './index.scss'` statements out of each component before injecting them into `dist`. Instead, it bundles all of the CSS into a single `main.css` file, and we import _that_ at the root of the app. While this concept is _still_ the right solution to the problem, this particular approach is not viable when using these components outside the Admin Panel, where not only does this root stylesheet not exist, but where it would also bloat your app with unused styles. Instead, we need to _keep_ these .scss imports in place so they are imported directly alongside your components, as expected. Then, we need create a _new_ build step that _separately_ compiles the components _without_ their stylesheets—this way your app can consume either as needed from the new `client` and `server` barrel files within `@payloadcms/ui`, i.e. from within `@payloadcms/next` and all other admin-specific packages and plugins. This way, all other applications will simply import using the direct file paths, just as they did before. Except now they come with stylesheets. And we've gotten a pretty awesome initial compilation performance boost. --------- Co-authored-by: James <james@trbl.design> Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-06-17 14:25:36 -04:00
"uuid": "10.0.0"
},
"devDependencies": {
"@babel/cli": "7.27.2",
"@babel/core": "7.27.3",
"@babel/preset-env": "7.27.2",
"@babel/preset-react": "7.27.1",
"@babel/preset-typescript": "7.27.1",
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
"@payloadcms/eslint-config": "workspace:*",
feat(richtext-lexical): utility render lexical field on-demand (#13657) ## Why this exists Lexical in Payload is a React Server Component (RSC). Historically that created three headaches: 1. You couldn’t render the editor directly from the client. 2. Features like blocks, tables, upload and link drawers require the server to know the shape of nested sub‑fields at render time. If you tried to render on demand, the server didn’t know those schemas. 3. The rich text field is designed to live inside a Form. For simple use cases, setting up a full form just to manage editor state was cumbersome. ## What’s new We now ship a client component, `<RenderLexical />`, that renders a Lexical editor **on demand** while still covering the full feature set. On mount, it calls a server action to render the editor on the server using the new `render-field` server action. That server render gives Lexical everything it needs (including nested field schemas) and returns a ready‑to‑hydrate editor. ## Example - Rendering in custom component within existing Form ```tsx 'use client' import type { JSONFieldClientComponent } from 'payload' import { buildEditorState, RenderLexical } from '@payloadcms/richtext-lexical/client' import { lexicalFullyFeaturedSlug } from '../../slugs.js' export const Component: JSONFieldClientComponent = (args) => { return ( <div> Fully-Featured Component: <RenderLexical field={{ name: 'json' }} initialValue={buildEditorState({ text: 'defaultValue' })} schemaPath={`collection.${lexicalFullyFeaturedSlug}.richText`} /> </div> ) } ``` ## Example - Rendering outside of Form, manually managing richText values ```ts 'use client' import type { DefaultTypedEditorState } from '@payloadcms/richtext-lexical' import type { JSONFieldClientComponent } from 'payload' import { buildEditorState, RenderLexical } from '@payloadcms/richtext-lexical/client' import React, { useState } from 'react' import { lexicalFullyFeaturedSlug } from '../../slugs.js' export const Component: JSONFieldClientComponent = (args) => { const [value, setValue] = useState<DefaultTypedEditorState | undefined>(() => buildEditorState({ text: 'state default' }), ) const handleReset = React.useCallback(() => { setValue(buildEditorState({ text: 'state default' })) }, []) return ( <div> Default Component: <RenderLexical field={{ name: 'json' }} initialValue={buildEditorState({ text: 'defaultValue' })} schemaPath={`collection.${lexicalFullyFeaturedSlug}.richText`} setValue={setValue as any} value={value} /> <button onClick={handleReset} style={{ marginTop: 8 }} type="button"> Reset Editor State </button> </div> ) } ``` ## How it works (under the hood) - On first render, `<RenderLexical />` calls the server function `render-field` (wired into @payloadcms/next), passing a schemaPath. - The server loads the exact field config and its client schema map for that path, renders the Lexical editor server‑side (so nested features like blocks/tables/relationships are fully known), and returns the component tree. - While waiting, the client shows a small shimmer skeleton. - Inside Forms, RenderLexical plugs into the parent form via useField; outside Forms, you can fully control the value by passing value/setValue. ## Type Improvements While implementing the `buildEditorState` helper function for our test suite, I noticed some issues with our `TypedEditorState` type: - nodes were no longer narrowed by their node.type types - upon fixing this issue, the type was no longer compatible with the generated types. To address this, I had to weaken the generated type a bit. In order to ensure the type will keep functioning as intended from now on, this PR also adds some type tests --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1211110462564644
2025-09-18 15:01:12 -07:00
"@types/react": "19.1.12",
"@types/react-dom": "19.1.9",
"@types/uuid": "10.0.0",
feat(richtext-lexical): utility render lexical field on-demand (#13657) ## Why this exists Lexical in Payload is a React Server Component (RSC). Historically that created three headaches: 1. You couldn’t render the editor directly from the client. 2. Features like blocks, tables, upload and link drawers require the server to know the shape of nested sub‑fields at render time. If you tried to render on demand, the server didn’t know those schemas. 3. The rich text field is designed to live inside a Form. For simple use cases, setting up a full form just to manage editor state was cumbersome. ## What’s new We now ship a client component, `<RenderLexical />`, that renders a Lexical editor **on demand** while still covering the full feature set. On mount, it calls a server action to render the editor on the server using the new `render-field` server action. That server render gives Lexical everything it needs (including nested field schemas) and returns a ready‑to‑hydrate editor. ## Example - Rendering in custom component within existing Form ```tsx 'use client' import type { JSONFieldClientComponent } from 'payload' import { buildEditorState, RenderLexical } from '@payloadcms/richtext-lexical/client' import { lexicalFullyFeaturedSlug } from '../../slugs.js' export const Component: JSONFieldClientComponent = (args) => { return ( <div> Fully-Featured Component: <RenderLexical field={{ name: 'json' }} initialValue={buildEditorState({ text: 'defaultValue' })} schemaPath={`collection.${lexicalFullyFeaturedSlug}.richText`} /> </div> ) } ``` ## Example - Rendering outside of Form, manually managing richText values ```ts 'use client' import type { DefaultTypedEditorState } from '@payloadcms/richtext-lexical' import type { JSONFieldClientComponent } from 'payload' import { buildEditorState, RenderLexical } from '@payloadcms/richtext-lexical/client' import React, { useState } from 'react' import { lexicalFullyFeaturedSlug } from '../../slugs.js' export const Component: JSONFieldClientComponent = (args) => { const [value, setValue] = useState<DefaultTypedEditorState | undefined>(() => buildEditorState({ text: 'state default' }), ) const handleReset = React.useCallback(() => { setValue(buildEditorState({ text: 'state default' })) }, []) return ( <div> Default Component: <RenderLexical field={{ name: 'json' }} initialValue={buildEditorState({ text: 'defaultValue' })} schemaPath={`collection.${lexicalFullyFeaturedSlug}.richText`} setValue={setValue as any} value={value} /> <button onClick={handleReset} style={{ marginTop: 8 }} type="button"> Reset Editor State </button> </div> ) } ``` ## How it works (under the hood) - On first render, `<RenderLexical />` calls the server function `render-field` (wired into @payloadcms/next), passing a schemaPath. - The server loads the exact field config and its client schema map for that path, renders the Lexical editor server‑side (so nested features like blocks/tables/relationships are fully known), and returns the component tree. - While waiting, the client shows a small shimmer skeleton. - Inside Forms, RenderLexical plugs into the parent form via useField; outside Forms, you can fully control the value by passing value/setValue. ## Type Improvements While implementing the `buildEditorState` helper function for our test suite, I noticed some issues with our `TypedEditorState` type: - nodes were no longer narrowed by their node.type types - upon fixing this issue, the type was no longer compatible with the generated types. To address this, I had to weaken the generated type a bit. In order to ensure the type will keep functioning as intended from now on, this PR also adds some type tests --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1211110462564644
2025-09-18 15:01:12 -07:00
"babel-plugin-react-compiler": "19.1.0-rc.3",
"esbuild": "0.25.5",
"esbuild-sass-plugin": "3.3.1",
"payload": "workspace:*"
},
"peerDependencies": {
"next": "^15.2.3",
"payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
"react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020"
},
"engines": {
"node": "^18.20.2 || >=20.9.0"
},
"publishConfig": {
"exports": {
".": {
"import": "./dist/exports/client/index.js",
"types": "./dist/exports/client/index.d.ts",
"default": "./dist/exports/client/index.js"
},
"./shared": {
"import": "./dist/exports/shared/index.js",
"types": "./dist/exports/shared/index.d.ts",
"default": "./dist/exports/shared/index.js"
},
"./css": {
"import": "./dist/styles.css",
"default": "./dist/styles.css"
},
"./scss": {
"import": "./dist/scss/styles.scss",
"default": "./dist/scss/styles.scss"
},
feat!: on demand rsc (#8364) Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
2024-11-11 13:59:05 -05:00
"./rsc": {
"import": "./dist/exports/rsc/index.js",
"types": "./dist/exports/rsc/index.d.ts",
"default": "./dist/exports/rsc/index.js"
},
"./scss/app.scss": "./dist/scss/app.scss",
"./styles.css": "./dist/styles.css",
"./assets": {
"import": "./dist/assets/index.js",
"types": "./dist/assets/index.d.ts",
"default": "./dist/assets/index.js"
feat!: prebundle payload, ui, richtext-lexical (#6579) # Breaking Changes ### New file import locations Exports from the `payload` package have been _significantly_ cleaned up. Now, just about everything is able to be imported from `payload` directly, rather than an assortment of subpath exports. This means that things like `import { buildConfig } from 'payload/config'` are now just imported via `import { buildConfig } from 'payload'`. The mental model is significantly simpler for developers, but you might need to update some of your imports. Payload now exposes only three exports: 1. `payload` - all types and server-only Payload code 2. `payload/shared` - utilities that can be used in either the browser or in Node environments 3. `payload/node` - heavy utilities that should only be imported in Node scripts and never be imported into bundled code like Next.js ### UI library pre-bundling With this release, we've dramatically sped up the compile time for Payload by pre-bundling our entire UI package for use inside of the Payload admin itself. There are new exports that should be used within Payload custom components: 1. `@payloadcms/ui/client` - all client components 2. `@payloadcms/ui/server` - all server components For all of your custom Payload admin UI components, you should be importing from one of these two pre-compiled barrel files rather than importing from the more deeply nested exports directly. That will keep compile times nice and speedy, and will also make sure that the bundled JS for your admin UI is kept small. For example, whereas before, if you imported the Payload `Button`, you would have imported it like this: ```ts import { Button } from '@payloadcms/ui/elements/Button' ``` Now, you would import it like this: ```ts import { Button } from '@payloadcms/ui/client' ``` This is a significant DX / performance optimization that we're pretty pumped about. However, if you are importing or re-using Payload UI components _outside_ of the Payload admin UI, for example in your own frontend apps, you can import from the individual component exports which will make sure that the bundled JS is kept to a minimum in your frontend apps. So in your own frontend, you can continue to import directly to the components that you want to consume rather than importing from the pre-compiled barrel files. Individual component exports will now come with their corresponding CSS and everything will work perfectly as-expected. ### Specific exports have changed - `'@payloadcms/ui/templates/Default'` and `'@payloadcms/ui/templates/Minimal`' are now exported from `'@payloadcms/next/templates'` - Old: `import { LogOut } from '@payloadcms/ui/icons/LogOut'` new: `import { LogOutIcon } from '@payloadcms/ui/icons/LogOut'` ## Background info In effort to make local dev as fast as possible, we need to import as few files as possible so that the compiler has less to process. One way we've achieved this in the Admin Panel was to _remove_ all .scss imports from all components in the `@payloadcms/ui` module using a build process. This stripped all `import './index.scss'` statements out of each component before injecting them into `dist`. Instead, it bundles all of the CSS into a single `main.css` file, and we import _that_ at the root of the app. While this concept is _still_ the right solution to the problem, this particular approach is not viable when using these components outside the Admin Panel, where not only does this root stylesheet not exist, but where it would also bloat your app with unused styles. Instead, we need to _keep_ these .scss imports in place so they are imported directly alongside your components, as expected. Then, we need create a _new_ build step that _separately_ compiles the components _without_ their stylesheets—this way your app can consume either as needed from the new `client` and `server` barrel files within `@payloadcms/ui`, i.e. from within `@payloadcms/next` and all other admin-specific packages and plugins. This way, all other applications will simply import using the direct file paths, just as they did before. Except now they come with stylesheets. And we've gotten a pretty awesome initial compilation performance boost. --------- Co-authored-by: James <james@trbl.design> Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-06-17 14:25:36 -04:00
},
feat!: on demand rsc (#8364) Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
2024-11-11 13:59:05 -05:00
"./elements/RenderServerComponent": {
"import": "./dist/elements/RenderServerComponent/index.js",
"types": "./dist/elements/RenderServerComponent/index.d.ts",
"default": "./dist/elements/RenderServerComponent/index.js"
},
"./elements/*": {
"import": "./dist/elements/*/index.js",
"types": "./dist/elements/*/index.d.ts",
"default": "./dist/elements/*/index.js"
},
"./fields/*": {
"import": "./dist/fields/*/index.js",
"types": "./dist/fields/*/index.d.ts",
"default": "./dist/fields/*/index.js"
},
"./forms/fieldSchemasToFormState": {
"import": "./dist/forms/fieldSchemasToFormState/index.js",
"types": "./dist/forms/fieldSchemasToFormState/index.d.ts",
"default": "./dist/forms/fieldSchemasToFormState/index.js"
},
"./forms/renderField": {
"import": "./dist/forms/fieldSchemasToFormState/renderField.js",
"types": "./dist/forms/fieldSchemasToFormState/renderField.d.ts",
"default": "./dist/forms/fieldSchemasToFormState/renderField.js"
},
"./forms/*": {
"import": "./dist/forms/*/index.js",
"types": "./dist/forms/*/index.d.ts",
"default": "./dist/forms/*/index.js"
},
"./graphics/*": {
"import": "./dist/graphics/*/index.js",
"types": "./dist/graphics/*/index.d.ts",
"default": "./dist/graphics/*/index.js"
},
"./hooks/*": {
"import": "./dist/hooks/*.js",
"types": "./dist/hooks/*.d.ts",
"default": "./dist/hooks/*.js"
},
"./icons/*": {
"import": "./dist/icons/*/index.js",
"types": "./dist/icons/*/index.d.ts",
"default": "./dist/icons/*/index.js"
},
"./providers/*": {
"import": "./dist/providers/*/index.js",
"types": "./dist/providers/*/index.d.ts",
"default": "./dist/providers/*/index.js"
},
"./utilities/*": {
"import": "./dist/utilities/*.js",
"types": "./dist/utilities/*.d.ts",
"default": "./dist/utilities/*.js"
}
},
"main": "./dist/exports/client/index.js",
"types": "./dist/exports/client/index.d.ts"
}
2023-11-15 16:00:45 -05:00
}