diff --git a/packages/client/.parcelrc b/packages/client/.parcelrc deleted file mode 100644 index db2d15099d..0000000000 --- a/packages/client/.parcelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@parcel/config-default", - "transformers": { - "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ - "@parcel/transformer-js", - "@parcel/transformer-react-refresh-wrap" - ] - } -} diff --git a/packages/client/package.json b/packages/client/package.json index 9e555c134b..f1a310635e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -19,20 +19,15 @@ "type": "module", "files": [ "dist", - "src", "README.md" ], - "source": "./src/index.ts", - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/index.js", "exports": { + "./package.json": "./package.json", ".": { - "types": "./dist/index.d.ts", "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./src/*": "./src/*" + "default": "./dist/index.cjs" + } }, "homepage": "https://plone.org", "keywords": [ @@ -46,11 +41,11 @@ "react-query" ], "scripts": { - "watch": "parcel watch", - "build": "parcel build", - "build:force": "parcel build --no-cache", + "build": "tsup", + "build:force": "tsup", "test": "vitest", - "check-ts": "tsc --project tsconfig.json", + "check:exports": "attw --pack .", + "check:ts": "tsc --project tsconfig.json", "coverage": "vitest run --coverage --no-threads", "dry-release": "release-it --dry-run", "release": "release-it", @@ -61,13 +56,7 @@ "access": "public" }, "devDependencies": { - "@parcel/config-default": "^2.12.0", - "@parcel/core": "^2.12.0", - "@parcel/packager-ts": "^2.12.0", - "@parcel/transformer-js": "^2.12.0", - "@parcel/transformer-react-refresh-wrap": "^2.12.0", - "@parcel/transformer-typescript-types": "^2.12.0", - "@parcel/optimizer-terser": "2.12.0", + "@arethetypeswrong/cli": "^0.16.4", "@plone/types": "workspace: *", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "13.4.0", @@ -79,7 +68,6 @@ "@vitest/coverage-v8": "^1.3.1", "glob": "7.1.6", "jsdom": "^21.1.1", - "parcel": "^2.12.0", "react": "^18.2.0", "react-dom": "^18.2.0", "release-it": "17.1.1", diff --git a/packages/client/src/API.ts b/packages/client/src/API.ts index 5862f3084d..12e53ff42e 100644 --- a/packages/client/src/API.ts +++ b/packages/client/src/API.ts @@ -1,5 +1,5 @@ import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; -import { PloneClientConfig } from './validation/config'; +import type { PloneClientConfig } from './validation/config'; import qs from 'query-string'; import debugFactory from 'debug'; diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index 93fdb7e4b6..b0d5e5289a 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -109,7 +109,7 @@ import { queryWithConfig, mutationHookFromMutation, } from './utils/misc'; -import { PloneClientConfig } from './validation/config'; +import type { PloneClientConfig } from './validation/config'; const PLONECLIENT_DEFAULT_CONFIG = { apiPath: 'http://localhost:8080/Plone' }; diff --git a/packages/client/src/restapi/actions/get.ts b/packages/client/src/restapi/actions/get.ts index 5ad55b06b3..7d9ffd3c8b 100644 --- a/packages/client/src/restapi/actions/get.ts +++ b/packages/client/src/restapi/actions/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { ActionsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { ActionsResponse } from '@plone/types'; import { z } from 'zod'; const getActionsSchema = z.object({ diff --git a/packages/client/src/restapi/addons/get.ts b/packages/client/src/restapi/addons/get.ts index f4ce7c67cb..2fdf5669d3 100644 --- a/packages/client/src/restapi/addons/get.ts +++ b/packages/client/src/restapi/addons/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAddonResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAddonResponse } from '@plone/types'; import { z } from 'zod'; const getAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/get_list.ts b/packages/client/src/restapi/addons/get_list.ts index 16a9b54f59..f283e21c38 100644 --- a/packages/client/src/restapi/addons/get_list.ts +++ b/packages/client/src/restapi/addons/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { Addons } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { Addons } from '@plone/types'; export type AddonsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/addons/install.ts b/packages/client/src/restapi/addons/install.ts index 39d1cd516a..1e0812fe00 100644 --- a/packages/client/src/restapi/addons/install.ts +++ b/packages/client/src/restapi/addons/install.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const installAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/install_profile.ts b/packages/client/src/restapi/addons/install_profile.ts index eff76e0bb8..3be0e2a5bd 100644 --- a/packages/client/src/restapi/addons/install_profile.ts +++ b/packages/client/src/restapi/addons/install_profile.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const installAddonProfileSchema = z.object({ diff --git a/packages/client/src/restapi/addons/unistall.ts b/packages/client/src/restapi/addons/unistall.ts index ca4033a1a4..e0b480a4a5 100644 --- a/packages/client/src/restapi/addons/unistall.ts +++ b/packages/client/src/restapi/addons/unistall.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const uninstallAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/upgrade.ts b/packages/client/src/restapi/addons/upgrade.ts index f1275b53cb..b75f0400d6 100644 --- a/packages/client/src/restapi/addons/upgrade.ts +++ b/packages/client/src/restapi/addons/upgrade.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const upgradeAddonSchema = z.object({ diff --git a/packages/client/src/restapi/aliases/add.ts b/packages/client/src/restapi/aliases/add.ts index 07e9eee3ff..2d9bfd80ca 100644 --- a/packages/client/src/restapi/aliases/add.ts +++ b/packages/client/src/restapi/aliases/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createAliasesDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/add_multiple.ts b/packages/client/src/restapi/aliases/add_multiple.ts index 2cd990bc41..77c1c6a518 100644 --- a/packages/client/src/restapi/aliases/add_multiple.ts +++ b/packages/client/src/restapi/aliases/add_multiple.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createAliasesMultipleDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/delete.ts b/packages/client/src/restapi/aliases/delete.ts index af2401daf8..73d408cc7b 100644 --- a/packages/client/src/restapi/aliases/delete.ts +++ b/packages/client/src/restapi/aliases/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteAliasesDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/get.ts b/packages/client/src/restapi/aliases/get.ts index 7919d859a4..e535175537 100644 --- a/packages/client/src/restapi/aliases/get.ts +++ b/packages/client/src/restapi/aliases/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAliasesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAliasesResponse } from '@plone/types'; import { z } from 'zod'; const getAliasesSchema = z.object({ diff --git a/packages/client/src/restapi/aliases/get_list.ts b/packages/client/src/restapi/aliases/get_list.ts index a19d8e193f..767325feb1 100644 --- a/packages/client/src/restapi/aliases/get_list.ts +++ b/packages/client/src/restapi/aliases/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAliasesListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAliasesListResponse } from '@plone/types'; export type AliasesListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/breadcrumbs/get.ts b/packages/client/src/restapi/breadcrumbs/get.ts index b882abdc7a..65a8e1095a 100644 --- a/packages/client/src/restapi/breadcrumbs/get.ts +++ b/packages/client/src/restapi/breadcrumbs/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { BreadcrumbsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { BreadcrumbsResponse } from '@plone/types'; import { z } from 'zod'; const getBreadcrumbsSchema = z.object({ diff --git a/packages/client/src/restapi/comments/add.ts b/packages/client/src/restapi/comments/add.ts index 601ec9f2a8..961c7c092c 100644 --- a/packages/client/src/restapi/comments/add.ts +++ b/packages/client/src/restapi/comments/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { newCommentDataSchema as createCommentDataSchema } from '../../validation/comments'; diff --git a/packages/client/src/restapi/comments/delete.ts b/packages/client/src/restapi/comments/delete.ts index 70c0353960..403999308c 100644 --- a/packages/client/src/restapi/comments/delete.ts +++ b/packages/client/src/restapi/comments/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/comments/get.ts b/packages/client/src/restapi/comments/get.ts index 3d225e39e8..9495f96354 100644 --- a/packages/client/src/restapi/comments/get.ts +++ b/packages/client/src/restapi/comments/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetCommentsResponse } from '@plone/types'; +import type { GetCommentsResponse } from '@plone/types'; const getCommentsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/comments/update.ts b/packages/client/src/restapi/comments/update.ts index a0cde49faa..32a3efd4b5 100644 --- a/packages/client/src/restapi/comments/update.ts +++ b/packages/client/src/restapi/comments/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { newCommentDataSchema as updateCommentDataSchema } from '../../validation/comments'; diff --git a/packages/client/src/restapi/content/add.ts b/packages/client/src/restapi/content/add.ts index 1cff2e06b3..671b1b1406 100644 --- a/packages/client/src/restapi/content/add.ts +++ b/packages/client/src/restapi/content/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createContentDataSchema } from '../../validation/content'; -import { CreateContentResponse } from '@plone/types'; +import type { CreateContentResponse } from '@plone/types'; export const createContentArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/content/delete.ts b/packages/client/src/restapi/content/delete.ts index fbf8ec0230..95ce268eeb 100644 --- a/packages/client/src/restapi/content/delete.ts +++ b/packages/client/src/restapi/content/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/content/get.ts b/packages/client/src/restapi/content/get.ts index 18103e1427..5d5cf8fa96 100644 --- a/packages/client/src/restapi/content/get.ts +++ b/packages/client/src/restapi/content/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { Content } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { Content } from '@plone/types'; import { z } from 'zod'; const getContentArgsSchema = z.object({ diff --git a/packages/client/src/restapi/content/update.ts b/packages/client/src/restapi/content/update.ts index fe751e7a68..83ee95571b 100644 --- a/packages/client/src/restapi/content/update.ts +++ b/packages/client/src/restapi/content/update.ts @@ -1,11 +1,11 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { z } from 'zod'; import { updateContentDataSchema } from '../../validation/content'; -import { UpdateContentResponse } from '@plone/types'; +import type { UpdateContentResponse } from '@plone/types'; export const updateContentArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/contextnavigation/get.ts b/packages/client/src/restapi/contextnavigation/get.ts index af0c1b7398..ca586a2e8a 100644 --- a/packages/client/src/restapi/contextnavigation/get.ts +++ b/packages/client/src/restapi/contextnavigation/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { ContextNavigationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { ContextNavigationResponse } from '@plone/types'; import { z } from 'zod'; const getContextNavigationSchema = z.object({ diff --git a/packages/client/src/restapi/controlpanels/add.ts b/packages/client/src/restapi/controlpanels/add.ts index 9b25859833..a48fefda63 100644 --- a/packages/client/src/restapi/controlpanels/add.ts +++ b/packages/client/src/restapi/controlpanels/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/controlpanels/delete.ts b/packages/client/src/restapi/controlpanels/delete.ts index 5abff355f8..34cdfe983b 100644 --- a/packages/client/src/restapi/controlpanels/delete.ts +++ b/packages/client/src/restapi/controlpanels/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/controlpanels/get.ts b/packages/client/src/restapi/controlpanels/get.ts index 3cb54124dc..2c18b4a25a 100644 --- a/packages/client/src/restapi/controlpanels/get.ts +++ b/packages/client/src/restapi/controlpanels/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetControlpanelResponse } from '@plone/types'; +import type { GetControlpanelResponse } from '@plone/types'; const getControlpanelSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/controlpanels/get_list.ts b/packages/client/src/restapi/controlpanels/get_list.ts index e5c171c8e5..24f9b54cc6 100644 --- a/packages/client/src/restapi/controlpanels/get_list.ts +++ b/packages/client/src/restapi/controlpanels/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetControlpanelsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetControlpanelsResponse } from '@plone/types'; export type ControlpanelsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/controlpanels/update.ts b/packages/client/src/restapi/controlpanels/update.ts index cdd7815db3..1eb8ff8482 100644 --- a/packages/client/src/restapi/controlpanels/update.ts +++ b/packages/client/src/restapi/controlpanels/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/copymove/copy.ts b/packages/client/src/restapi/copymove/copy.ts index bf300f958f..e62302a1a7 100644 --- a/packages/client/src/restapi/copymove/copy.ts +++ b/packages/client/src/restapi/copymove/copy.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { type ApiRequestParams, apiRequest } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { copyMoveDataSchema as copyDataSchema } from '../../validation/copymove'; -import { CopyMoveResponse as CopyResponse } from '@plone/types'; +import type { CopyMoveResponse as CopyResponse } from '@plone/types'; export type CopyArgs = z.infer & { config: PloneClientConfig; diff --git a/packages/client/src/restapi/copymove/move.ts b/packages/client/src/restapi/copymove/move.ts index 6f1015caad..ebd11e193e 100644 --- a/packages/client/src/restapi/copymove/move.ts +++ b/packages/client/src/restapi/copymove/move.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { type ApiRequestParams, apiRequest } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { copyMoveDataSchema as moveDataSchema } from '../../validation/copymove'; -import { CopyMoveResponse as MoveResponse } from '@plone/types'; +import type { CopyMoveResponse as MoveResponse } from '@plone/types'; export type MoveArgs = z.infer & { config: PloneClientConfig; diff --git a/packages/client/src/restapi/database/get.ts b/packages/client/src/restapi/database/get.ts index 53769b3c41..5a10438edd 100644 --- a/packages/client/src/restapi/database/get.ts +++ b/packages/client/src/restapi/database/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { DatabaseResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { DatabaseResponse } from '@plone/types'; export type DatabaseArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/email-notification/post.ts b/packages/client/src/restapi/email-notification/post.ts index 54a81b340b..718ab59f7b 100644 --- a/packages/client/src/restapi/email-notification/post.ts +++ b/packages/client/src/restapi/email-notification/post.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/email-send/post.ts b/packages/client/src/restapi/email-send/post.ts index f1d5863ed0..23cc727f2e 100644 --- a/packages/client/src/restapi/email-send/post.ts +++ b/packages/client/src/restapi/email-send/post.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/groups/add.ts b/packages/client/src/restapi/groups/add.ts index b9dd8fa2cc..27f0fc8d17 100644 --- a/packages/client/src/restapi/groups/add.ts +++ b/packages/client/src/restapi/groups/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createGroupDataSchema } from '../../validation/groups'; -import { CreateGroupResponse } from '@plone/types'; +import type { CreateGroupResponse } from '@plone/types'; export const createGroupArgsSchema = z.object({ data: createGroupDataSchema, diff --git a/packages/client/src/restapi/groups/delete.ts b/packages/client/src/restapi/groups/delete.ts index 4d2565ae3d..e135f1b691 100644 --- a/packages/client/src/restapi/groups/delete.ts +++ b/packages/client/src/restapi/groups/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/groups/get.ts b/packages/client/src/restapi/groups/get.ts index 7048b40fb9..3d23c1690e 100644 --- a/packages/client/src/restapi/groups/get.ts +++ b/packages/client/src/restapi/groups/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetGroupResponse } from '@plone/types'; +import type { GetGroupResponse } from '@plone/types'; const getGroupSchema = z.object({ groupId: z.string(), diff --git a/packages/client/src/restapi/groups/get_list.ts b/packages/client/src/restapi/groups/get_list.ts index 7c7928bbec..e3b1724492 100644 --- a/packages/client/src/restapi/groups/get_list.ts +++ b/packages/client/src/restapi/groups/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetGroupsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetGroupsResponse } from '@plone/types'; export type GroupsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/groups/update.ts b/packages/client/src/restapi/groups/update.ts index c189643e2a..d31ca1a680 100644 --- a/packages/client/src/restapi/groups/update.ts +++ b/packages/client/src/restapi/groups/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateGroupDataSchema } from '../../validation/groups'; diff --git a/packages/client/src/restapi/history/get.ts b/packages/client/src/restapi/history/get.ts index 15e2ca1169..70f2d2bfbf 100644 --- a/packages/client/src/restapi/history/get.ts +++ b/packages/client/src/restapi/history/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetHistoryResponse } from '@plone/types'; +import type { GetHistoryResponse } from '@plone/types'; const getHistorySchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/history/get_versioned.ts b/packages/client/src/restapi/history/get_versioned.ts index de016b50fd..b6e33c86f9 100644 --- a/packages/client/src/restapi/history/get_versioned.ts +++ b/packages/client/src/restapi/history/get_versioned.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const getHistoryVersionedSchema = z.object({ diff --git a/packages/client/src/restapi/history/revert.ts b/packages/client/src/restapi/history/revert.ts index 3e0ad44580..616e4053f4 100644 --- a/packages/client/src/restapi/history/revert.ts +++ b/packages/client/src/restapi/history/revert.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { revertHistoryDataSchema } from '../../validation/history'; diff --git a/packages/client/src/restapi/linkintegrity/get.ts b/packages/client/src/restapi/linkintegrity/get.ts index 9af2dd5551..8cf9f359eb 100644 --- a/packages/client/src/restapi/linkintegrity/get.ts +++ b/packages/client/src/restapi/linkintegrity/get.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { PloneClientConfigSchema } from '../../validation/config'; const getLinkintegriyArgsSchema = z.object({ diff --git a/packages/client/src/restapi/lock/add.ts b/packages/client/src/restapi/lock/add.ts index 2ba71b85c3..608b3e38a6 100644 --- a/packages/client/src/restapi/lock/add.ts +++ b/packages/client/src/restapi/lock/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createLockDataSchema } from '../../validation/lock'; -import { CreateLockResponse } from '@plone/types'; +import type { CreateLockResponse } from '@plone/types'; export const createLockArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/delete.ts b/packages/client/src/restapi/lock/delete.ts index c18cd46d17..ee06ad8d62 100644 --- a/packages/client/src/restapi/lock/delete.ts +++ b/packages/client/src/restapi/lock/delete.ts @@ -1,11 +1,11 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteLockDataSchema } from '../../validation/lock'; -import { LockInfo as DeleteLockResponse } from '@plone/types'; +import type { LockInfo as DeleteLockResponse } from '@plone/types'; export const deleteLockArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/get.ts b/packages/client/src/restapi/lock/get.ts index 9c1962e16a..9c09841968 100644 --- a/packages/client/src/restapi/lock/get.ts +++ b/packages/client/src/restapi/lock/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { LockInfo as GetLockResponse } from '@plone/types'; +import type { LockInfo as GetLockResponse } from '@plone/types'; const getLockSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/update.ts b/packages/client/src/restapi/lock/update.ts index d9c0a3553a..42fc26866c 100644 --- a/packages/client/src/restapi/lock/update.ts +++ b/packages/client/src/restapi/lock/update.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { z } from 'zod'; diff --git a/packages/client/src/restapi/login/post.ts b/packages/client/src/restapi/login/post.ts index 5d893fef9f..e35f1d87f6 100644 --- a/packages/client/src/restapi/login/post.ts +++ b/packages/client/src/restapi/login/post.ts @@ -1,10 +1,10 @@ -import { Login } from '@plone/types'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; +import type { Login } from '@plone/types'; export const loginArgsSchema = z.object({ username: z.string(), diff --git a/packages/client/src/restapi/navigation/get.ts b/packages/client/src/restapi/navigation/get.ts index d5b6577a17..71e64fb94f 100644 --- a/packages/client/src/restapi/navigation/get.ts +++ b/packages/client/src/restapi/navigation/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { NavigationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { NavigationResponse } from '@plone/types'; import { z } from 'zod'; const getNavigationSchema = z.object({ diff --git a/packages/client/src/restapi/navroot/get.ts b/packages/client/src/restapi/navroot/get.ts index a43d9d1d51..d5dea3d4f2 100644 --- a/packages/client/src/restapi/navroot/get.ts +++ b/packages/client/src/restapi/navroot/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetNavrootResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetNavrootResponse } from '@plone/types'; import { z } from 'zod'; const getNavrootSchema = z.object({ diff --git a/packages/client/src/restapi/principals/get.ts b/packages/client/src/restapi/principals/get.ts index d42abc930c..4ae976781e 100644 --- a/packages/client/src/restapi/principals/get.ts +++ b/packages/client/src/restapi/principals/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetPrincipalsResponse } from '@plone/types'; +import type { GetPrincipalsResponse } from '@plone/types'; const getPrincipalsSchema = z.object({ search: z.string(), diff --git a/packages/client/src/restapi/querysources/get.ts b/packages/client/src/restapi/querysources/get.ts index 46949b2d5c..47207b9507 100644 --- a/packages/client/src/restapi/querysources/get.ts +++ b/packages/client/src/restapi/querysources/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetQuerysourceResponse } from '@plone/types'; +import type { GetQuerysourceResponse } from '@plone/types'; const getQuerysourceSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/querystring-search/get.ts b/packages/client/src/restapi/querystring-search/get.ts index 926453dfbd..588b50eddc 100644 --- a/packages/client/src/restapi/querystring-search/get.ts +++ b/packages/client/src/restapi/querystring-search/get.ts @@ -1,8 +1,8 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; import { querystringSearchDataSchema as getQuerystringSearchSchema } from '../../validation/querystring-search'; -import { QuerystringSearchResponse as GetQuerystringSearchResponse } from '@plone/types'; +import type { QuerystringSearchResponse as GetQuerystringSearchResponse } from '@plone/types'; export type QuerystringSearchArgs = z.infer< typeof getQuerystringSearchSchema diff --git a/packages/client/src/restapi/querystring-search/post.ts b/packages/client/src/restapi/querystring-search/post.ts index 95c07e6be5..decf6dad71 100644 --- a/packages/client/src/restapi/querystring-search/post.ts +++ b/packages/client/src/restapi/querystring-search/post.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { querystringSearchDataSchema as postQuerystringSearchDataSchema } from '../../validation/querystring-search'; -import { QuerystringSearchResponse as PostQuerystringSearchResponse } from '@plone/types'; +import type { QuerystringSearchResponse as PostQuerystringSearchResponse } from '@plone/types'; export const postQuerystringSearchArgsSchema = z.object({ data: postQuerystringSearchDataSchema, diff --git a/packages/client/src/restapi/querystring/get.ts b/packages/client/src/restapi/querystring/get.ts index 008f1747ea..acea020e41 100644 --- a/packages/client/src/restapi/querystring/get.ts +++ b/packages/client/src/restapi/querystring/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetQueryStringResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetQueryStringResponse } from '@plone/types'; export type QueryStringArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/registry/get.ts b/packages/client/src/restapi/registry/get.ts index d4642ee39a..90784f77fe 100644 --- a/packages/client/src/restapi/registry/get.ts +++ b/packages/client/src/restapi/registry/get.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const getRegistrySchema = z.object({ diff --git a/packages/client/src/restapi/registry/get_list.ts b/packages/client/src/restapi/registry/get_list.ts index c3c43faaa9..438a12a771 100644 --- a/packages/client/src/restapi/registry/get_list.ts +++ b/packages/client/src/restapi/registry/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRegistriesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRegistriesResponse } from '@plone/types'; export type GetRegistriesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/registry/update.ts b/packages/client/src/restapi/registry/update.ts index ee24c141e6..0bd30eeff9 100644 --- a/packages/client/src/restapi/registry/update.ts +++ b/packages/client/src/restapi/registry/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateRegistryDataSchema } from '../../validation/registry'; diff --git a/packages/client/src/restapi/relations/add.ts b/packages/client/src/restapi/relations/add.ts index c979571172..70a90b1673 100644 --- a/packages/client/src/restapi/relations/add.ts +++ b/packages/client/src/restapi/relations/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/delete.ts b/packages/client/src/restapi/relations/delete.ts index 6276712db2..97eef66aab 100644 --- a/packages/client/src/restapi/relations/delete.ts +++ b/packages/client/src/restapi/relations/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/fix.ts b/packages/client/src/restapi/relations/fix.ts index 53daba35be..e52b0306fd 100644 --- a/packages/client/src/restapi/relations/fix.ts +++ b/packages/client/src/restapi/relations/fix.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { fixRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/get.ts b/packages/client/src/restapi/relations/get.ts index 6ac85f6a14..44e608a276 100644 --- a/packages/client/src/restapi/relations/get.ts +++ b/packages/client/src/restapi/relations/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetRelationsResponse } from '@plone/types'; +import type { GetRelationsResponse } from '@plone/types'; export const getRelationsSchema = z .object({ diff --git a/packages/client/src/restapi/relations/get_list.ts b/packages/client/src/restapi/relations/get_list.ts index e37cdc2381..07490cf19f 100644 --- a/packages/client/src/restapi/relations/get_list.ts +++ b/packages/client/src/restapi/relations/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRelationsListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRelationsListResponse } from '@plone/types'; export type GetRelationsListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/roles/get.ts b/packages/client/src/restapi/roles/get.ts index 96dfd7e18a..6fb5d23504 100644 --- a/packages/client/src/restapi/roles/get.ts +++ b/packages/client/src/restapi/roles/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRolesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRolesResponse } from '@plone/types'; export type GetRolesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/rules/add.ts b/packages/client/src/restapi/rules/add.ts index b187c64b4d..10009142c0 100644 --- a/packages/client/src/restapi/rules/add.ts +++ b/packages/client/src/restapi/rules/add.ts @@ -1,10 +1,10 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; -import { RuleRespose as CreateRuleResponse } from '@plone/types'; +import type { RuleRespose as CreateRuleResponse } from '@plone/types'; export const createRuleArgsSchema = z.object({ ruleId: z.string(), diff --git a/packages/client/src/restapi/rules/delete.ts b/packages/client/src/restapi/rules/delete.ts index 343e71cd65..9f53b63508 100644 --- a/packages/client/src/restapi/rules/delete.ts +++ b/packages/client/src/restapi/rules/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteRulesDataSchema } from '../../validation/rules'; diff --git a/packages/client/src/restapi/rules/get.ts b/packages/client/src/restapi/rules/get.ts index a5b9f930f1..141204c5f8 100644 --- a/packages/client/src/restapi/rules/get.ts +++ b/packages/client/src/restapi/rules/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRulesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRulesResponse } from '@plone/types'; export type GetRulesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/rules/update.ts b/packages/client/src/restapi/rules/update.ts index 302a0d0592..73260fb05c 100644 --- a/packages/client/src/restapi/rules/update.ts +++ b/packages/client/src/restapi/rules/update.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateRulesDataSchema } from '../../validation/rules'; -import { RuleRespose as UpdateRuleRespose } from '@plone/types'; +import type { RuleRespose as UpdateRuleRespose } from '@plone/types'; export const updateRulesArgsSchema = z.object({ data: updateRulesDataSchema, diff --git a/packages/client/src/restapi/search/get.ts b/packages/client/src/restapi/search/get.ts index 53e44aadd0..ab75b82fd9 100644 --- a/packages/client/src/restapi/search/get.ts +++ b/packages/client/src/restapi/search/get.ts @@ -1,8 +1,8 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; import { getSearchSchema } from '../../validation/search'; -import { GetSearchResponse } from '@plone/types'; +import type { GetSearchResponse } from '@plone/types'; import { flattenToDottedNotation } from '../../utils/misc'; export type SearchArgs = z.infer & { diff --git a/packages/client/src/restapi/site/get.ts b/packages/client/src/restapi/site/get.ts index a857df017d..dcfe189eb6 100644 --- a/packages/client/src/restapi/site/get.ts +++ b/packages/client/src/restapi/site/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetSiteResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetSiteResponse } from '@plone/types'; export type SiteArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/sources/get.ts b/packages/client/src/restapi/sources/get.ts index 7fc5fa4e0d..fc4a6ecbb5 100644 --- a/packages/client/src/restapi/sources/get.ts +++ b/packages/client/src/restapi/sources/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetSourceResponse } from '@plone/types'; +import type { GetSourceResponse } from '@plone/types'; const getSourceSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/system/get.ts b/packages/client/src/restapi/system/get.ts index 41c447bc6e..ed801c6e4d 100644 --- a/packages/client/src/restapi/system/get.ts +++ b/packages/client/src/restapi/system/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetSystemResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetSystemResponse } from '@plone/types'; export type GetSystemArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/transactions/get.ts b/packages/client/src/restapi/transactions/get.ts index c9f7f5ffb5..c45b3790ca 100644 --- a/packages/client/src/restapi/transactions/get.ts +++ b/packages/client/src/restapi/transactions/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTransactionsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTransactionsResponse } from '@plone/types'; export type GetTransactionsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/transactions/revert.ts b/packages/client/src/restapi/transactions/revert.ts index e9e5f45fbc..1e9723620c 100644 --- a/packages/client/src/restapi/transactions/revert.ts +++ b/packages/client/src/restapi/transactions/revert.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { revertTransactionsDataSchema } from '../../validation/transactions'; -import { RevertTransactionsResponse } from '@plone/types'; +import type { RevertTransactionsResponse } from '@plone/types'; export const revertTransactionsArgsSchema = z.object({ data: revertTransactionsDataSchema, diff --git a/packages/client/src/restapi/translations/get.ts b/packages/client/src/restapi/translations/get.ts index 726112310a..fb383f0bd2 100644 --- a/packages/client/src/restapi/translations/get.ts +++ b/packages/client/src/restapi/translations/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTranslationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTranslationResponse } from '@plone/types'; import { z } from 'zod'; const getTranslationSchema = z.object({ diff --git a/packages/client/src/restapi/translations/link.ts b/packages/client/src/restapi/translations/link.ts index 4b5a34c2b5..468aa23654 100644 --- a/packages/client/src/restapi/translations/link.ts +++ b/packages/client/src/restapi/translations/link.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { linkTranslationDataSchema } from '../../validation/translations'; diff --git a/packages/client/src/restapi/translations/unlink.ts b/packages/client/src/restapi/translations/unlink.ts index ab360e7ff0..321ee63a07 100644 --- a/packages/client/src/restapi/translations/unlink.ts +++ b/packages/client/src/restapi/translations/unlink.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { unlinkTranslationDataSchema } from '../../validation/translations'; diff --git a/packages/client/src/restapi/types/add.ts b/packages/client/src/restapi/types/add.ts index 7516b00227..6182a97126 100644 --- a/packages/client/src/restapi/types/add.ts +++ b/packages/client/src/restapi/types/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createTypeFieldDataSchema } from '../../validation/types'; -import { CreateTypeFieldResponse } from '@plone/types'; +import type { CreateTypeFieldResponse } from '@plone/types'; export const createTypeFieldArgsSchema = z.object({ contentPath: z.string(), diff --git a/packages/client/src/restapi/types/get.ts b/packages/client/src/restapi/types/get.ts index ccbf2278a5..86dd3c5a11 100644 --- a/packages/client/src/restapi/types/get.ts +++ b/packages/client/src/restapi/types/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetTypeResponse } from '@plone/types'; +import type { GetTypeResponse } from '@plone/types'; const getTypeSchema = z.object({ contentPath: z.string(), diff --git a/packages/client/src/restapi/types/get_list.ts b/packages/client/src/restapi/types/get_list.ts index 314b2d273d..31cb883e7b 100644 --- a/packages/client/src/restapi/types/get_list.ts +++ b/packages/client/src/restapi/types/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTypesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTypesResponse } from '@plone/types'; export type GetTypesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/types/get_type_field.ts b/packages/client/src/restapi/types/get_type_field.ts index 32a0f771ba..2891792e44 100644 --- a/packages/client/src/restapi/types/get_type_field.ts +++ b/packages/client/src/restapi/types/get_type_field.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetTypeFieldResponse } from '@plone/types'; +import type { GetTypeFieldResponse } from '@plone/types'; const getTypeFieldSchema = z.object({ contentFieldPath: z.string(), diff --git a/packages/client/src/restapi/types/update.ts b/packages/client/src/restapi/types/update.ts index c3e0eff2ef..bae958ffc0 100644 --- a/packages/client/src/restapi/types/update.ts +++ b/packages/client/src/restapi/types/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateTypeFieldDataSchema } from '../../validation/types'; diff --git a/packages/client/src/restapi/upgrade/get.ts b/packages/client/src/restapi/upgrade/get.ts index 4edb5f08f4..1f05437ada 100644 --- a/packages/client/src/restapi/upgrade/get.ts +++ b/packages/client/src/restapi/upgrade/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUpgradeResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUpgradeResponse } from '@plone/types'; export type GetUpgradeArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/upgrade/run.ts b/packages/client/src/restapi/upgrade/run.ts index c9cb34faab..3d847045fd 100644 --- a/packages/client/src/restapi/upgrade/run.ts +++ b/packages/client/src/restapi/upgrade/run.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { runUpgradeDataSchema } from '../../validation/upgrade'; -import { RunUpgradeResponse } from '@plone/types'; +import type { RunUpgradeResponse } from '@plone/types'; export const runUpgradeArgsSchema = z.object({ data: runUpgradeDataSchema, diff --git a/packages/client/src/restapi/users/add.ts b/packages/client/src/restapi/users/add.ts index e9896013dc..de76be19d1 100644 --- a/packages/client/src/restapi/users/add.ts +++ b/packages/client/src/restapi/users/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createUserDataSchema } from '../../validation/users'; -import { User as CreateUserResponse } from '@plone/types'; +import type { User as CreateUserResponse } from '@plone/types'; export const createUserArgsSchema = z.object({ data: createUserDataSchema, diff --git a/packages/client/src/restapi/users/delete.ts b/packages/client/src/restapi/users/delete.ts index c3f5c175cc..59203b8bc2 100644 --- a/packages/client/src/restapi/users/delete.ts +++ b/packages/client/src/restapi/users/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/users/get.ts b/packages/client/src/restapi/users/get.ts index 1f8ab45bfb..dd29774f12 100644 --- a/packages/client/src/restapi/users/get.ts +++ b/packages/client/src/restapi/users/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { User as GetUserResponse } from '@plone/types'; +import type { User as GetUserResponse } from '@plone/types'; const getUserSchema = z.object({ userId: z.string(), diff --git a/packages/client/src/restapi/users/get_list.ts b/packages/client/src/restapi/users/get_list.ts index f441084903..d0319f2e62 100644 --- a/packages/client/src/restapi/users/get_list.ts +++ b/packages/client/src/restapi/users/get_list.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUsersResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUsersResponse } from '@plone/types'; const getUsersSchema = z.object({ query: z.string().optional(), diff --git a/packages/client/src/restapi/users/reset_password.ts b/packages/client/src/restapi/users/reset_password.ts index 6b831048e8..ec13bc4f5c 100644 --- a/packages/client/src/restapi/users/reset_password.ts +++ b/packages/client/src/restapi/users/reset_password.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/users/reset_password_with_token.ts b/packages/client/src/restapi/users/reset_password_with_token.ts index 65d9ead9e1..8355b11544 100644 --- a/packages/client/src/restapi/users/reset_password_with_token.ts +++ b/packages/client/src/restapi/users/reset_password_with_token.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { resetPasswordWithTokenDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/users/update.ts b/packages/client/src/restapi/users/update.ts index 83f71fb396..cc0e7a36ef 100644 --- a/packages/client/src/restapi/users/update.ts +++ b/packages/client/src/restapi/users/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateUserDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/users/update_password.ts b/packages/client/src/restapi/users/update_password.ts index d5a52996df..21b29143b6 100644 --- a/packages/client/src/restapi/users/update_password.ts +++ b/packages/client/src/restapi/users/update_password.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updatePasswordDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/userschema/get.ts b/packages/client/src/restapi/userschema/get.ts index c5cf6c55d3..2d7e0fbf17 100644 --- a/packages/client/src/restapi/userschema/get.ts +++ b/packages/client/src/restapi/userschema/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUserschemaResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUserschemaResponse } from '@plone/types'; export type GetUserschemaArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/vocabularies/get.ts b/packages/client/src/restapi/vocabularies/get.ts index b25c9b00cf..a8e00488c3 100644 --- a/packages/client/src/restapi/vocabularies/get.ts +++ b/packages/client/src/restapi/vocabularies/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetVocabulariesResponse } from '@plone/types'; import { z } from 'zod'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetVocabulariesResponse } from '@plone/types'; const getVocabulariesSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/vocabularies/get_list.ts b/packages/client/src/restapi/vocabularies/get_list.ts index 1a6b18b83a..312be656aa 100644 --- a/packages/client/src/restapi/vocabularies/get_list.ts +++ b/packages/client/src/restapi/vocabularies/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetVocabulariesListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetVocabulariesListResponse } from '@plone/types'; export type VocabulariesListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/workflow/add.ts b/packages/client/src/restapi/workflow/add.ts index 91b355bff9..86988f021c 100644 --- a/packages/client/src/restapi/workflow/add.ts +++ b/packages/client/src/restapi/workflow/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createWorkflowDataSchema } from '../../validation/workflow'; -import { CreateWorkflowResponse } from '@plone/types'; +import type { CreateWorkflowResponse } from '@plone/types'; export const createWorkflowArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workflow/get.ts b/packages/client/src/restapi/workflow/get.ts index 7b0e733dfe..1e1f16801d 100644 --- a/packages/client/src/restapi/workflow/get.ts +++ b/packages/client/src/restapi/workflow/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { WorkflowResponse } from '@plone/types'; import { z } from 'zod'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { WorkflowResponse } from '@plone/types'; const getWorkflowSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workingcopy/add.ts b/packages/client/src/restapi/workingcopy/add.ts index b5d3bcfa49..534a00eae0 100644 --- a/packages/client/src/restapi/workingcopy/add.ts +++ b/packages/client/src/restapi/workingcopy/add.ts @@ -1,10 +1,10 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; -import { CreateWorkingcopyResponse } from '@plone/types'; +import type { CreateWorkingcopyResponse } from '@plone/types'; export const createWorkingcopyArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workingcopy/check-in.ts b/packages/client/src/restapi/workingcopy/check-in.ts index d2c91d7c81..36627ac325 100644 --- a/packages/client/src/restapi/workingcopy/check-in.ts +++ b/packages/client/src/restapi/workingcopy/check-in.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/workingcopy/delete.ts b/packages/client/src/restapi/workingcopy/delete.ts index 9efab73607..11db8c026c 100644 --- a/packages/client/src/restapi/workingcopy/delete.ts +++ b/packages/client/src/restapi/workingcopy/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/workingcopy/get.ts b/packages/client/src/restapi/workingcopy/get.ts index 1149d49863..4426a0314a 100644 --- a/packages/client/src/restapi/workingcopy/get.ts +++ b/packages/client/src/restapi/workingcopy/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetWorkingcopyResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetWorkingcopyResponse } from '@plone/types'; const getWorkingcopySchema = z.object({ path: z.string(), diff --git a/packages/client/src/utils/misc.ts b/packages/client/src/utils/misc.ts index 6486c48f7d..d668d3971e 100644 --- a/packages/client/src/utils/misc.ts +++ b/packages/client/src/utils/misc.ts @@ -4,7 +4,7 @@ import { useMutation, useQuery, } from '@tanstack/react-query'; -import { PloneClientConfig } from '../validation/config'; +import type { PloneClientConfig } from '../validation/config'; /* configGetter is required instead of using the config directly to make sure diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index dfe27120f2..8d104e76ee 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,21 +1,28 @@ { "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, "resolveJsonModule": true, + "moduleDetection": "force", "isolatedModules": true, + "verbatimModuleSyntax": true, + + "strict": true, + "noImplicitOverride": true, + + "lib": ["es2022", "dom", "dom.iterable"], + "module": "preserve", "noEmit": true, + "jsx": "react-jsx", - "types": ["vite", "vitest/globals"] + + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strictPropertyInitialization": false, + + "useDefineForClassFields": true }, "exclude": ["node_modules", "dist", "coverage", "src/**/*.test.{ts,tsx}"], "include": ["src"], diff --git a/packages/client/tsup.config.ts b/packages/client/tsup.config.ts new file mode 100644 index 0000000000..82b88a425c --- /dev/null +++ b/packages/client/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entryPoints: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + outDir: 'dist', + clean: true, +}); diff --git a/packages/components/.parcelrc b/packages/components/.parcelrc deleted file mode 100644 index db2d15099d..0000000000 --- a/packages/components/.parcelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@parcel/config-default", - "transformers": { - "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ - "@parcel/transformer-js", - "@parcel/transformer-react-refresh-wrap" - ] - } -} diff --git a/packages/components/news/6467.internal b/packages/components/news/6467.internal new file mode 100644 index 0000000000..97beb403a0 --- /dev/null +++ b/packages/components/news/6467.internal @@ -0,0 +1 @@ +Replace `parcel` with `tsup`. Better types, better tsconfig. Move to ESM. @sneridagh diff --git a/packages/components/package.json b/packages/components/package.json index d76dbe9972..846ac78695 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -16,23 +16,20 @@ "bugs": { "url": "https://github.com/plone/components/issues" }, + "type": "module", "files": [ "dist", "src", "README.md" ], - "source": "./src/index.ts", - "main": "./dist/main.js", - "module": "./dist/module.mjs", - "types": "./dist/index.d.ts", + "main": "./dist/index.js", "exports": { + "./package.json": "./package.json", ".": { - "types": "./dist/index.d.ts", - "import": "./dist/module.mjs", - "require": "./dist/main.js" + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, - "./dist/*.css": "./dist/*.css", - "./src/*": "./src/*" + "./dist/*.css": "./dist/*.css" }, "homepage": "https://plone.org", "keywords": [ @@ -45,12 +42,13 @@ "quanta" ], "scripts": { - "build": "parcel build && pnpm build:css", - "build:force": "parcel build --no-cache && pnpm build:css", + "build": "tsup && pnpm build:css", + "build:force": "tsup && pnpm build:css", "build:css": "pnpm build:basic && pnpm build:quanta", "build:basic": "lightningcss --browserslist --bundle --sourcemap src/styles/basic/main.css -o basic.css && mv basic.css* dist/.", "build:quanta": "lightningcss --browserslist --bundle --sourcemap src/styles/quanta/main.css -o quanta.css && mv quanta.css* dist/.", - "check-ts": "tsc --project tsconfig.json", + "check:exports": "attw --pack .", + "check:ts": "tsc --project tsconfig.json", "test": "vitest --passWithNoTests", "coverage": "vitest run --coverage --no-threads", "lint": "pnpm eslint && pnpm prettier && pnpm stylelint && pnpm check-ts", @@ -77,12 +75,7 @@ "not dead" ], "devDependencies": { - "@parcel/config-default": "^2.12.0", - "@parcel/core": "^2.12.0", - "@parcel/packager-ts": "^2.12.0", - "@parcel/transformer-js": "^2.12.0", - "@parcel/transformer-react-refresh-wrap": "^2.12.0", - "@parcel/transformer-typescript-types": "^2.12.0", + "@arethetypeswrong/cli": "^0.16.4", "@plone/types": "workspace: *", "@react-types/shared": "^3.22.0", "@storybook/addon-essentials": "^8.0.4", @@ -107,9 +100,9 @@ "jsdom": "^22.1.0", "lightningcss": "^1.24.0", "lightningcss-cli": "^1.24.0", - "parcel": "^2.12.0", "release-it": "17.1.1", "storybook": "^8.0.4", + "tsup": "^8.3.5", "typescript": "^5.6.3", "vite": "^5.4.8", "vitest": "^2.1.3", diff --git a/packages/components/src/components/BlockToolbar/BlockToolbar.tsx b/packages/components/src/components/BlockToolbar/BlockToolbar.tsx index 62f1b47922..f76ba5ef83 100644 --- a/packages/components/src/components/BlockToolbar/BlockToolbar.tsx +++ b/packages/components/src/components/BlockToolbar/BlockToolbar.tsx @@ -1,5 +1,8 @@ import React from 'react'; -import { Toolbar as RACToolbar, ToolbarProps } from 'react-aria-components'; +import { + Toolbar as RACToolbar, + type ToolbarProps, +} from 'react-aria-components'; export function BlockToolbar(props: ToolbarProps) { return ; diff --git a/packages/components/src/components/Button/Button.tsx b/packages/components/src/components/Button/Button.tsx index 9e8c76b371..c466e8a1dd 100644 --- a/packages/components/src/components/Button/Button.tsx +++ b/packages/components/src/components/Button/Button.tsx @@ -1,5 +1,5 @@ -import React, { forwardRef, ForwardedRef } from 'react'; -import { Button as RACButton, ButtonProps } from 'react-aria-components'; +import React, { forwardRef, type ForwardedRef } from 'react'; +import { Button as RACButton, type ButtonProps } from 'react-aria-components'; export const Button = forwardRef(function _Button( props: ButtonProps, diff --git a/packages/components/src/components/Calendar/Calendar.tsx b/packages/components/src/components/Calendar/Calendar.tsx index 37f3b489c4..faf32a12d7 100644 --- a/packages/components/src/components/Calendar/Calendar.tsx +++ b/packages/components/src/components/Calendar/Calendar.tsx @@ -4,8 +4,8 @@ import { Calendar as RACCalendar, CalendarCell, CalendarGrid, - CalendarProps as RACCalendarProps, - DateValue, + type CalendarProps as RACCalendarProps, + type DateValue, Heading, Text, } from 'react-aria-components'; diff --git a/packages/components/src/components/Checkbox/Checkbox.tsx b/packages/components/src/components/Checkbox/Checkbox.tsx index a24407dd5b..47eaca3ef5 100644 --- a/packages/components/src/components/Checkbox/Checkbox.tsx +++ b/packages/components/src/components/Checkbox/Checkbox.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Checkbox as RACCheckbox, - CheckboxProps as RACCheckboxProps, + type CheckboxProps as RACCheckboxProps, } from 'react-aria-components'; interface CheckboxProps extends RACCheckboxProps { diff --git a/packages/components/src/components/CheckboxGroup/CheckboxGroup.tsx b/packages/components/src/components/CheckboxGroup/CheckboxGroup.tsx index 0c29059708..d0106355dd 100644 --- a/packages/components/src/components/CheckboxGroup/CheckboxGroup.tsx +++ b/packages/components/src/components/CheckboxGroup/CheckboxGroup.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { CheckboxGroup as RACCheckboxGroup, - CheckboxGroupProps as RACCheckboxGroupProps, + type CheckboxGroupProps as RACCheckboxGroupProps, FieldError, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface CheckboxGroupProps diff --git a/packages/components/src/components/ColorArea/ColorArea.tsx b/packages/components/src/components/ColorArea/ColorArea.tsx index 8464766f70..3f060b6721 100644 --- a/packages/components/src/components/ColorArea/ColorArea.tsx +++ b/packages/components/src/components/ColorArea/ColorArea.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ColorArea as RACColorArea, - ColorAreaProps, + type ColorAreaProps, ColorThumb, } from 'react-aria-components'; diff --git a/packages/components/src/components/ColorField/ColorField.tsx b/packages/components/src/components/ColorField/ColorField.tsx index fff7c0f912..ac3f00f62e 100644 --- a/packages/components/src/components/ColorField/ColorField.tsx +++ b/packages/components/src/components/ColorField/ColorField.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { ColorField as RACColorField, - ColorFieldProps as RACColorFieldProps, + type ColorFieldProps as RACColorFieldProps, FieldError, Input, Label, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface ColorFieldProps extends RACColorFieldProps { diff --git a/packages/components/src/components/ColorPicker/ColorPicker.tsx b/packages/components/src/components/ColorPicker/ColorPicker.tsx index b5256e24c2..4bedc19b43 100644 --- a/packages/components/src/components/ColorPicker/ColorPicker.tsx +++ b/packages/components/src/components/ColorPicker/ColorPicker.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { Button, ColorPicker as RACColorPicker, - ColorPickerProps as RACColorPickerProps, + type ColorPickerProps as RACColorPickerProps, Dialog, DialogTrigger, Popover, diff --git a/packages/components/src/components/ColorSlider/ColorSlider.tsx b/packages/components/src/components/ColorSlider/ColorSlider.tsx index 55b81b9351..de9afa32c2 100644 --- a/packages/components/src/components/ColorSlider/ColorSlider.tsx +++ b/packages/components/src/components/ColorSlider/ColorSlider.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ColorSlider as RACColorSlider, - ColorSliderProps as RACColorSliderProps, + type ColorSliderProps as RACColorSliderProps, ColorThumb, Label, SliderOutput, diff --git a/packages/components/src/components/ColorSwatch/ColorSwatch.tsx b/packages/components/src/components/ColorSwatch/ColorSwatch.tsx index b80a13c31c..1415622497 100644 --- a/packages/components/src/components/ColorSwatch/ColorSwatch.tsx +++ b/packages/components/src/components/ColorSwatch/ColorSwatch.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ColorSwatch as RACColorSwatch, - ColorSwatchProps, + type ColorSwatchProps, } from 'react-aria-components'; export function ColorSwatch(props: ColorSwatchProps) { diff --git a/packages/components/src/components/ColorSwatchPicker/ColorSwatchPicker.tsx b/packages/components/src/components/ColorSwatchPicker/ColorSwatchPicker.tsx index 9ecdc9dac1..2d1598980a 100644 --- a/packages/components/src/components/ColorSwatchPicker/ColorSwatchPicker.tsx +++ b/packages/components/src/components/ColorSwatchPicker/ColorSwatchPicker.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { ColorSwatchPicker as AriaColorSwatchPicker, ColorSwatchPickerItem as AriaColorSwatchPickerItem, - ColorSwatchPickerItemProps, - ColorSwatchPickerProps, + type ColorSwatchPickerItemProps, + type ColorSwatchPickerProps, } from 'react-aria-components'; import { ColorSwatch } from '../ColorSwatch/ColorSwatch'; diff --git a/packages/components/src/components/ColorWheel/ColorWheel.tsx b/packages/components/src/components/ColorWheel/ColorWheel.tsx index a9dff1f543..fd601243bb 100644 --- a/packages/components/src/components/ColorWheel/ColorWheel.tsx +++ b/packages/components/src/components/ColorWheel/ColorWheel.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { ColorThumb, ColorWheel as AriaColorWheel, - ColorWheelProps as AriaColorWheelProps, + type ColorWheelProps as AriaColorWheelProps, ColorWheelTrack, } from 'react-aria-components'; diff --git a/packages/components/src/components/ComboBox/ComboBox.tsx b/packages/components/src/components/ComboBox/ComboBox.tsx index f3cc54422c..dae5e3767d 100644 --- a/packages/components/src/components/ComboBox/ComboBox.tsx +++ b/packages/components/src/components/ComboBox/ComboBox.tsx @@ -2,16 +2,16 @@ import React from 'react'; import { Button, ComboBox as RACComboBox, - ComboBoxProps as RACComboBoxProps, + type ComboBoxProps as RACComboBoxProps, FieldError, Input, Label, ListBox, ListBoxItem, - ListBoxItemProps, + type ListBoxItemProps, Popover, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface ComboBoxProps diff --git a/packages/components/src/components/DateField/DateField.tsx b/packages/components/src/components/DateField/DateField.tsx index 8f41e0a680..6bbca4b9c8 100644 --- a/packages/components/src/components/DateField/DateField.tsx +++ b/packages/components/src/components/DateField/DateField.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { DateField as RACDateField, - DateFieldProps as RACDateFieldProps, + type DateFieldProps as RACDateFieldProps, DateInput, DateSegment, - DateValue, + type DateValue, FieldError, Label, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface DateFieldProps diff --git a/packages/components/src/components/DatePicker/DatePicker.tsx b/packages/components/src/components/DatePicker/DatePicker.tsx index b49bc7e493..9db14f1278 100644 --- a/packages/components/src/components/DatePicker/DatePicker.tsx +++ b/packages/components/src/components/DatePicker/DatePicker.tsx @@ -6,9 +6,9 @@ import { CalendarGrid, DateInput, DatePicker as RACDatePicker, - DatePickerProps as RACDatePickerProps, + type DatePickerProps as RACDatePickerProps, DateSegment, - DateValue, + type DateValue, Dialog, FieldError, Group, @@ -16,7 +16,7 @@ import { Label, Popover, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface DatePickerProps diff --git a/packages/components/src/components/DateRangePicker/DateRangePicker.tsx b/packages/components/src/components/DateRangePicker/DateRangePicker.tsx index 55b76c5fde..9a00fd0a44 100644 --- a/packages/components/src/components/DateRangePicker/DateRangePicker.tsx +++ b/packages/components/src/components/DateRangePicker/DateRangePicker.tsx @@ -5,9 +5,9 @@ import { CalendarGrid, DateInput, DateRangePicker as RACDateRangePicker, - DateRangePickerProps as RACDateRangePickerProps, + type DateRangePickerProps as RACDateRangePickerProps, DateSegment, - DateValue, + type DateValue, Dialog, FieldError, Group, @@ -16,7 +16,7 @@ import { Popover, RangeCalendar, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface DateRangePickerProps diff --git a/packages/components/src/components/Dialog/Dialog.tsx b/packages/components/src/components/Dialog/Dialog.tsx index 39de5afd8e..503f87f9d5 100644 --- a/packages/components/src/components/Dialog/Dialog.tsx +++ b/packages/components/src/components/Dialog/Dialog.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Dialog as RACDialog, DialogProps } from 'react-aria-components'; +import { Dialog as RACDialog, type DialogProps } from 'react-aria-components'; export function Dialog(props: DialogProps) { return ; diff --git a/packages/components/src/components/Disclosure/Disclosure.tsx b/packages/components/src/components/Disclosure/Disclosure.tsx index 8e062a8d61..1820159bee 100644 --- a/packages/components/src/components/Disclosure/Disclosure.tsx +++ b/packages/components/src/components/Disclosure/Disclosure.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { UNSTABLE_Disclosure as RACDisclosure, - DisclosureProps, + type DisclosureProps, } from 'react-aria-components'; /** diff --git a/packages/components/src/components/DisclosureGroup/DisclosureGroup.tsx b/packages/components/src/components/DisclosureGroup/DisclosureGroup.tsx index 4196e558c6..7588d0d580 100644 --- a/packages/components/src/components/DisclosureGroup/DisclosureGroup.tsx +++ b/packages/components/src/components/DisclosureGroup/DisclosureGroup.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { UNSTABLE_DisclosureGroup as RACDisclosureGroup, - DisclosureGroupProps, + type DisclosureGroupProps, } from 'react-aria-components'; /** diff --git a/packages/components/src/components/Form/Form.tsx b/packages/components/src/components/Form/Form.tsx index f2f2e9b70a..03fd907bef 100644 --- a/packages/components/src/components/Form/Form.tsx +++ b/packages/components/src/components/Form/Form.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Form as RACForm, FormProps } from 'react-aria-components'; +import { Form as RACForm, type FormProps } from 'react-aria-components'; export function Form(props: FormProps) { return ; diff --git a/packages/components/src/components/GridList/GridList.tsx b/packages/components/src/components/GridList/GridList.tsx index d195b71cfd..088235641d 100644 --- a/packages/components/src/components/GridList/GridList.tsx +++ b/packages/components/src/components/GridList/GridList.tsx @@ -3,8 +3,8 @@ import { Button, GridList as RACGridList, GridListItem as RACGridListItem, - GridListItemProps, - GridListProps, + type GridListItemProps, + type GridListProps, } from 'react-aria-components'; import { Checkbox } from '../Checkbox/Checkbox'; diff --git a/packages/components/src/components/Icon/Icon.tsx b/packages/components/src/components/Icon/Icon.tsx index 0056688024..c55a91521e 100644 --- a/packages/components/src/components/Icon/Icon.tsx +++ b/packages/components/src/components/Icon/Icon.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import type { AriaLabelingProps, DOMProps, @@ -7,7 +7,7 @@ import type { } from '@react-types/shared'; import { baseStyleProps, - StyleHandlers, + type StyleHandlers, useSlotProps, useStyleProps, } from '@react-spectrum/utils'; diff --git a/packages/components/src/components/ListBox/ListBox.tsx b/packages/components/src/components/ListBox/ListBox.tsx index ac90dbe68f..244efb16a4 100644 --- a/packages/components/src/components/ListBox/ListBox.tsx +++ b/packages/components/src/components/ListBox/ListBox.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { ListBox as RACListBox, ListBoxItem as RACListBoxItem, - ListBoxItemProps, - ListBoxProps, + type ListBoxItemProps, + type ListBoxProps, } from 'react-aria-components'; export function ListBox({ diff --git a/packages/components/src/components/Menu/Menu.tsx b/packages/components/src/components/Menu/Menu.tsx index db153971a6..14834205cd 100644 --- a/packages/components/src/components/Menu/Menu.tsx +++ b/packages/components/src/components/Menu/Menu.tsx @@ -2,12 +2,12 @@ import React from 'react'; import { Menu as RACMenu, MenuItem as RACMenuItem, - MenuItemProps, - MenuProps, + type MenuItemProps, + type MenuProps, MenuTrigger, - MenuTriggerProps, + type MenuTriggerProps, Popover, - PressEvent, + type PressEvent, } from 'react-aria-components'; import { Button } from '../Button/Button'; diff --git a/packages/components/src/components/Meter/Meter.tsx b/packages/components/src/components/Meter/Meter.tsx index fb06f8c57c..71da9815c6 100644 --- a/packages/components/src/components/Meter/Meter.tsx +++ b/packages/components/src/components/Meter/Meter.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Label, Meter as RACMeter, - MeterProps as RACMeterProps, + type MeterProps as RACMeterProps, } from 'react-aria-components'; export interface MeterProps extends RACMeterProps { diff --git a/packages/components/src/components/Modal/Modal.tsx b/packages/components/src/components/Modal/Modal.tsx index 83eb2e061c..2ef1c970cb 100644 --- a/packages/components/src/components/Modal/Modal.tsx +++ b/packages/components/src/components/Modal/Modal.tsx @@ -1,5 +1,8 @@ import React from 'react'; -import { Modal as RACModal, ModalOverlayProps } from 'react-aria-components'; +import { + Modal as RACModal, + type ModalOverlayProps, +} from 'react-aria-components'; export function Modal(props: ModalOverlayProps) { return ; diff --git a/packages/components/src/components/NumberField/NumberField.tsx b/packages/components/src/components/NumberField/NumberField.tsx index 98781966fe..462910c32d 100644 --- a/packages/components/src/components/NumberField/NumberField.tsx +++ b/packages/components/src/components/NumberField/NumberField.tsx @@ -5,9 +5,9 @@ import { Input, Label, NumberField as RACNumberField, - NumberFieldProps as RACNumberFieldProps, + type NumberFieldProps as RACNumberFieldProps, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; import { Button } from '../Button/Button'; import { AddIcon } from '../Icons/AddIcon'; diff --git a/packages/components/src/components/Popover/Popover.tsx b/packages/components/src/components/Popover/Popover.tsx index a79c3d1418..8a0614c9b6 100644 --- a/packages/components/src/components/Popover/Popover.tsx +++ b/packages/components/src/components/Popover/Popover.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { OverlayArrow, Popover as RACPopover, - PopoverProps as RACPopoverProps, + type PopoverProps as RACPopoverProps, } from 'react-aria-components'; import { Dialog } from '../Dialog/Dialog'; diff --git a/packages/components/src/components/ProgressBar/ProgressBar.tsx b/packages/components/src/components/ProgressBar/ProgressBar.tsx index cb72f500f5..2fa1f49ca8 100644 --- a/packages/components/src/components/ProgressBar/ProgressBar.tsx +++ b/packages/components/src/components/ProgressBar/ProgressBar.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Label, ProgressBar as RACProgressBar, - ProgressBarProps as RACProgressBarProps, + type ProgressBarProps as RACProgressBarProps, } from 'react-aria-components'; export interface ProgressBarProps extends RACProgressBarProps { diff --git a/packages/components/src/components/RadioGroup/RadioGroup.tsx b/packages/components/src/components/RadioGroup/RadioGroup.tsx index 90fea840d4..7090d0f15a 100644 --- a/packages/components/src/components/RadioGroup/RadioGroup.tsx +++ b/packages/components/src/components/RadioGroup/RadioGroup.tsx @@ -3,9 +3,9 @@ import { FieldError, Label, RadioGroup as RACRadioGroup, - RadioGroupProps as RACRadioGroupProps, + type RadioGroupProps as RACRadioGroupProps, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface RadioGroupProps extends Omit { diff --git a/packages/components/src/components/RangeCalendar/RangeCalendar.tsx b/packages/components/src/components/RangeCalendar/RangeCalendar.tsx index 7881028477..63e32cdcab 100644 --- a/packages/components/src/components/RangeCalendar/RangeCalendar.tsx +++ b/packages/components/src/components/RangeCalendar/RangeCalendar.tsx @@ -3,10 +3,10 @@ import { Button, CalendarCell, CalendarGrid, - DateValue, + type DateValue, Heading, RangeCalendar as RACRangeCalendar, - RangeCalendarProps as RACRangeCalendarProps, + type RangeCalendarProps as RACRangeCalendarProps, Text, } from 'react-aria-components'; diff --git a/packages/components/src/components/SearchField/SearchField.tsx b/packages/components/src/components/SearchField/SearchField.tsx index 57f7946d4f..dc5c3964b3 100644 --- a/packages/components/src/components/SearchField/SearchField.tsx +++ b/packages/components/src/components/SearchField/SearchField.tsx @@ -5,9 +5,9 @@ import { Input, Label, SearchField as RACSearchField, - SearchFieldProps as RACSearchFieldProps, + type SearchFieldProps as RACSearchFieldProps, Text, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; export interface SearchFieldProps extends RACSearchFieldProps { diff --git a/packages/components/src/components/Select/Select.stories.tsx b/packages/components/src/components/Select/Select.stories.tsx index 97842eda90..7adb2e0afc 100644 --- a/packages/components/src/components/Select/Select.stories.tsx +++ b/packages/components/src/components/Select/Select.stories.tsx @@ -4,11 +4,6 @@ import type { Meta, StoryObj } from '@storybook/react'; import '../../styles/basic/Select.css'; -export interface SelectItemObject { - label: string; - value: string; -} - // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction const meta = { title: 'Forms/Select', diff --git a/packages/components/src/components/Select/Select.tsx b/packages/components/src/components/Select/Select.tsx index d57402e238..5cb8f71488 100644 --- a/packages/components/src/components/Select/Select.tsx +++ b/packages/components/src/components/Select/Select.tsx @@ -5,15 +5,15 @@ import { Label, ListBox, ListBoxItem, - ListBoxItemProps, + type ListBoxItemProps, Popover, PopoverContext, Select as RACSelect, - SelectProps as RACSelectProps, + type SelectProps as RACSelectProps, SelectValue, Text, useContextProps, - ValidationResult, + type ValidationResult, } from 'react-aria-components'; import { ChevrondownIcon } from '../Icons/ChevrondownIcon'; @@ -43,7 +43,7 @@ export interface SelectProps * the data. * */ -export function Select({ +export function Select({ label, description, errorMessage, @@ -73,7 +73,7 @@ export function Select({ {children} ) : ( - {(item: SelectItemObject) => ( + {(item) => ( {item.value} )} @@ -85,6 +85,11 @@ export function Select({ ); } +export type SelectItemObject = { + label: string; + value: string; +}; + export function SelectItem(props: ListBoxItemProps) { return ; } diff --git a/packages/components/src/components/Slider/Slider.tsx b/packages/components/src/components/Slider/Slider.tsx index f09e907195..4fab667edf 100644 --- a/packages/components/src/components/Slider/Slider.tsx +++ b/packages/components/src/components/Slider/Slider.tsx @@ -3,7 +3,7 @@ import { Label, Slider as RACSlider, SliderOutput, - SliderProps as RACSliderProps, + type SliderProps as RACSliderProps, SliderThumb, SliderTrack, } from 'react-aria-components'; diff --git a/packages/components/src/components/Switch/Switch.tsx b/packages/components/src/components/Switch/Switch.tsx index 5f0f2d0b64..0cd187b092 100644 --- a/packages/components/src/components/Switch/Switch.tsx +++ b/packages/components/src/components/Switch/Switch.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Switch as RACSwitch, - SwitchProps as RACSwitchProps, + type SwitchProps as RACSwitchProps, } from 'react-aria-components'; export interface SwitchProps extends Omit { diff --git a/packages/components/src/components/Tabs/Tabs.tsx b/packages/components/src/components/Tabs/Tabs.tsx index a0d4ab8cfd..7190ee2cee 100644 --- a/packages/components/src/components/Tabs/Tabs.tsx +++ b/packages/components/src/components/Tabs/Tabs.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Tabs as RACTabs, TabsProps } from 'react-aria-components'; +import { Tabs as RACTabs, type TabsProps } from 'react-aria-components'; export function Tabs(props: TabsProps) { return ; diff --git a/packages/components/src/components/TagGroup/TagGroup.tsx b/packages/components/src/components/TagGroup/TagGroup.tsx index 1424dea383..05230519f1 100644 --- a/packages/components/src/components/TagGroup/TagGroup.tsx +++ b/packages/components/src/components/TagGroup/TagGroup.tsx @@ -4,10 +4,10 @@ import { Label, Tag as RACTag, TagGroup as RACTagGroup, - TagGroupProps as RACTagGroupProps, + type TagGroupProps as RACTagGroupProps, TagList, - TagListProps, - TagProps, + type TagListProps, + type TagProps, Text, } from 'react-aria-components'; diff --git a/packages/components/src/components/TextAreaField/TextAreaField.tsx b/packages/components/src/components/TextAreaField/TextAreaField.tsx index e79f5e78bb..76ee55ea8d 100644 --- a/packages/components/src/components/TextAreaField/TextAreaField.tsx +++ b/packages/components/src/components/TextAreaField/TextAreaField.tsx @@ -5,8 +5,8 @@ import { Label, Text, TextField as RACTextField, - TextFieldProps as RACTextFieldProps, - ValidationResult, + type TextFieldProps as RACTextFieldProps, + type ValidationResult, } from 'react-aria-components'; export interface TextAreaFieldProps extends RACTextFieldProps { diff --git a/packages/components/src/components/TextField/TextField.tsx b/packages/components/src/components/TextField/TextField.tsx index 2b29fa3e79..1190aea2a1 100644 --- a/packages/components/src/components/TextField/TextField.tsx +++ b/packages/components/src/components/TextField/TextField.tsx @@ -5,8 +5,8 @@ import { Label, Text, TextField as RACTextField, - TextFieldProps as RACTextFieldProps, - ValidationResult, + type TextFieldProps as RACTextFieldProps, + type ValidationResult, } from 'react-aria-components'; export interface TextFieldProps extends RACTextFieldProps { diff --git a/packages/components/src/components/TimeField/TimeField.tsx b/packages/components/src/components/TimeField/TimeField.tsx index 4133c46c1c..c92e531326 100644 --- a/packages/components/src/components/TimeField/TimeField.tsx +++ b/packages/components/src/components/TimeField/TimeField.tsx @@ -6,9 +6,9 @@ import { Label, Text, TimeField as RACTimeField, - TimeFieldProps as RACTimeFieldProps, - TimeValue, - ValidationResult, + type TimeFieldProps as RACTimeFieldProps, + type TimeValue, + type ValidationResult, } from 'react-aria-components'; export interface TimeFieldProps diff --git a/packages/components/src/components/ToggleButton/ToggleButton.tsx b/packages/components/src/components/ToggleButton/ToggleButton.tsx index f7599fd6af..546d47fc2b 100644 --- a/packages/components/src/components/ToggleButton/ToggleButton.tsx +++ b/packages/components/src/components/ToggleButton/ToggleButton.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ToggleButton as RACToggleButton, - ToggleButtonProps, + type ToggleButtonProps, } from 'react-aria-components'; export function ToggleButton(props: ToggleButtonProps) { diff --git a/packages/components/src/components/Toolbar/Toolbar.tsx b/packages/components/src/components/Toolbar/Toolbar.tsx index f2b151bcce..b99af182f4 100644 --- a/packages/components/src/components/Toolbar/Toolbar.tsx +++ b/packages/components/src/components/Toolbar/Toolbar.tsx @@ -1,5 +1,8 @@ import React from 'react'; -import { Toolbar as RACToolbar, ToolbarProps } from 'react-aria-components'; +import { + Toolbar as RACToolbar, + type ToolbarProps, +} from 'react-aria-components'; export function Toolbar(props: ToolbarProps) { return ; diff --git a/packages/components/src/components/Tooltip/Tooltip.tsx b/packages/components/src/components/Tooltip/Tooltip.tsx index 17213e6ce3..b629c5f39e 100644 --- a/packages/components/src/components/Tooltip/Tooltip.tsx +++ b/packages/components/src/components/Tooltip/Tooltip.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { OverlayArrow, Tooltip as RACTooltip, - TooltipProps as RACTooltipProps, + type TooltipProps as RACTooltipProps, } from 'react-aria-components'; export interface TooltipProps extends Omit { diff --git a/packages/components/src/components/quanta/Select/Select.tsx b/packages/components/src/components/quanta/Select/Select.tsx index 6e43494084..0f446c6b7d 100644 --- a/packages/components/src/components/quanta/Select/Select.tsx +++ b/packages/components/src/components/quanta/Select/Select.tsx @@ -1,8 +1,15 @@ import React from 'react'; import { SelectContext, PopoverContext } from 'react-aria-components'; -import { Select, SelectItem, SelectProps } from '../../Select/Select'; +import { + Select, + SelectItem, + type SelectProps, + type SelectItemObject, +} from '../../Select/Select'; -export function QuantaSelect(props: SelectProps) { +export function QuantaSelect( + props: SelectProps, +) { return ( diff --git a/packages/components/src/components/quanta/TextAreaField/TextAreaField.tsx b/packages/components/src/components/quanta/TextAreaField/TextAreaField.tsx index 449dd56d6d..b092fa86aa 100644 --- a/packages/components/src/components/quanta/TextAreaField/TextAreaField.tsx +++ b/packages/components/src/components/quanta/TextAreaField/TextAreaField.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { TextFieldContext } from 'react-aria-components'; import { TextAreaField, - TextAreaFieldProps, + type TextAreaFieldProps, } from '../../TextAreaField/TextAreaField'; export function QuantaTextAreaField(props: TextAreaFieldProps) { diff --git a/packages/components/src/components/quanta/TextField/TextField.tsx b/packages/components/src/components/quanta/TextField/TextField.tsx index eb222e5078..08e8ae7df9 100644 --- a/packages/components/src/components/quanta/TextField/TextField.tsx +++ b/packages/components/src/components/quanta/TextField/TextField.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { TextFieldContext } from 'react-aria-components'; -import { TextField, TextFieldProps } from '../../TextField/TextField'; +import { TextField, type TextFieldProps } from '../../TextField/TextField'; export function QuantaTextField(props: TextFieldProps) { return ( diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index 7bb0a59429..c682dc35d7 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -1,20 +1,25 @@ { "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, "resolveJsonModule": true, + "moduleDetection": "force", "isolatedModules": true, + "verbatimModuleSyntax": true, + + "strict": true, + "noImplicitOverride": true, + + "lib": ["es2022", "dom", "dom.iterable"], + "module": "preserve", "noEmit": true, - "jsx": "react", + + "jsx": "react-jsx", + + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true }, "include": ["src", "./setupTesting.ts"], "exclude": [ diff --git a/packages/components/tsup.config.ts b/packages/components/tsup.config.ts new file mode 100644 index 0000000000..82b88a425c --- /dev/null +++ b/packages/components/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entryPoints: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + outDir: 'dist', + clean: true, +}); diff --git a/packages/components/vite.config.mts b/packages/components/vite.config.ts similarity index 100% rename from packages/components/vite.config.mts rename to packages/components/vite.config.ts diff --git a/packages/components/vitest.config.mts b/packages/components/vitest.config.ts similarity index 100% rename from packages/components/vitest.config.mts rename to packages/components/vitest.config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38e68d768b..af6e3e254f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -386,27 +386,9 @@ importers: specifier: ^3.22.4 version: 3.22.5 devDependencies: - '@parcel/config-default': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) - '@parcel/core': - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10) - '@parcel/optimizer-terser': - specifier: 2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/packager-ts': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-js': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10)) - '@parcel/transformer-react-refresh-wrap': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-typescript-types': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(typescript@5.6.3) + '@arethetypeswrong/cli': + specifier: ^0.16.4 + version: 0.16.4 '@plone/types': specifier: 'workspace: *' version: link:../types @@ -440,9 +422,6 @@ importers: jsdom: specifier: ^21.1.1 version: 21.1.2 - parcel: - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) react: specifier: ^18.2.0 version: 18.2.0 @@ -498,24 +477,9 @@ importers: specifier: ^16.8.0 || ^17.0.0 || ^18.0.0 version: 18.2.0(react@18.2.0) devDependencies: - '@parcel/config-default': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) - '@parcel/core': - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10) - '@parcel/packager-ts': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-js': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10)) - '@parcel/transformer-react-refresh-wrap': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-typescript-types': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(typescript@5.6.3) + '@arethetypeswrong/cli': + specifier: ^0.16.4 + version: 0.16.4 '@plone/types': specifier: 'workspace: *' version: link:../types @@ -588,15 +552,15 @@ importers: lightningcss-cli: specifier: ^1.24.0 version: 1.24.1 - parcel: - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) release-it: specifier: 17.1.1 version: 17.1.1(typescript@5.6.3) storybook: specifier: ^8.0.4 version: 8.0.8(@babel/preset-env@7.24.4(@babel/core@7.24.4))(encoding@0.1.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + tsup: + specifier: ^8.3.5 + version: 8.3.5(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3) typescript: specifier: ^5.6.3 version: 5.6.3 @@ -4453,10 +4417,6 @@ packages: resolution: {integrity: sha512-iBi6LZB3lm6WmbXfzi8J3DCVPmn4FN2lw7DGXxUXu7MouDPVWfTsM6U/5TkSHJRNRogZ2gqy5q9g34NPxHbJcw==} engines: {node: '>= 12.0.0', parcel: ^2.12.0} - '@parcel/optimizer-terser@2.12.0': - resolution: {integrity: sha512-cIAJ+nLPk7MUGiSbsam8vM8gQNiaVavKhJN13PsEBzv0QLOQm0TCl02cGC9WJIukyc90AO5p3MnFP4/1U1M8iA==} - engines: {node: '>= 12.0.0', parcel: ^2.12.0} - '@parcel/package-manager@2.12.0': resolution: {integrity: sha512-0nvAezcjPx9FT+hIL+LS1jb0aohwLZXct7jAh7i0MLMtehOi0z1Sau+QpgMlA9rfEZZ1LIeFdnZZwqSy7Ccspw==} engines: {node: '>= 12.0.0'} @@ -7219,10 +7179,6 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - ansi-regex@6.1.0: resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} @@ -17689,7 +17645,7 @@ snapshots: dependencies: '@arethetypeswrong/core': 0.16.4 chalk: 4.1.2 - cli-table3: 0.6.4 + cli-table3: 0.6.5 commander: 10.0.1 marked: 9.1.6 marked-terminal: 7.2.1(marked@9.1.6) @@ -17716,12 +17672,12 @@ snapshots: '@babel/code-frame@7.24.2': dependencies: '@babel/highlight': 7.24.2 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/code-frame@7.25.7': dependencies: '@babel/highlight': 7.25.7 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/compat-data@7.24.4': {} @@ -17966,14 +17922,14 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/highlight@7.25.7': dependencies: '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/parser@7.24.4': dependencies: @@ -20787,18 +20743,6 @@ snapshots: - '@parcel/core' - '@swc/helpers' - '@parcel/optimizer-terser@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)': - dependencies: - '@parcel/diagnostic': 2.12.0 - '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.12.0 - nullthrows: 1.1.1 - terser: 5.30.3 - transitivePeerDependencies: - - '@parcel/core' - - '@swc/helpers' - '@parcel/package-manager@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.10) @@ -20984,7 +20928,7 @@ snapshots: browserslist: 4.23.0 json5: 2.2.3 nullthrows: 1.1.1 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - '@parcel/core' - '@swc/helpers' @@ -21011,7 +20955,7 @@ snapshots: posthtml: 0.16.6 posthtml-parser: 0.10.2 posthtml-render: 3.0.0 - semver: 7.6.0 + semver: 7.6.3 srcset: 4.0.0 transitivePeerDependencies: - '@parcel/core' @@ -21040,7 +20984,7 @@ snapshots: browserslist: 4.23.0 nullthrows: 1.1.1 regenerator-runtime: 0.13.11 - semver: 7.6.0 + semver: 7.6.3 '@parcel/transformer-json@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)': dependencies: @@ -21059,7 +21003,7 @@ snapshots: clone: 2.1.2 nullthrows: 1.1.1 postcss-value-parser: 4.2.0 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - '@parcel/core' - '@swc/helpers' @@ -21072,7 +21016,7 @@ snapshots: posthtml: 0.16.6 posthtml-parser: 0.10.2 posthtml-render: 3.0.0 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - '@parcel/core' - '@swc/helpers' @@ -21102,7 +21046,7 @@ snapshots: posthtml: 0.16.6 posthtml-parser: 0.10.2 posthtml-render: 3.0.0 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - '@parcel/core' - '@swc/helpers' @@ -23088,7 +23032,7 @@ snapshots: prettier: 3.2.5 prompts: 2.4.2 read-pkg-up: 7.0.1 - semver: 7.6.0 + semver: 7.6.3 strip-json-comments: 3.1.1 tempy: 1.0.1 tiny-invariant: 1.3.3 @@ -23205,7 +23149,7 @@ snapshots: '@types/semver': 7.5.8 better-opn: 3.0.2 chalk: 4.1.2 - cli-table3: 0.6.4 + cli-table3: 0.6.5 compression: 1.7.4 detect-port: 1.5.1 express: 4.19.2 @@ -24506,7 +24450,7 @@ snapshots: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.3) eslint: 8.57.0 eslint-scope: 5.1.1 - semver: 7.6.0 + semver: 7.6.3 transitivePeerDependencies: - supports-color - typescript @@ -25119,8 +25063,6 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} - ansi-regex@6.1.0: {} ansi-styles@2.2.1: {} @@ -26362,7 +26304,7 @@ snapshots: chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.3 + braces: 3.0.2 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -34389,7 +34331,7 @@ snapshots: postcss@8.4.47: dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 + picocolors: 1.1.1 source-map-js: 1.2.1 posthtml-parser@0.10.2: @@ -36856,7 +36798,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom-buf@1.0.0: dependencies: @@ -37866,13 +37808,13 @@ snapshots: dependencies: browserslist: 4.23.0 escalade: 3.1.2 - picocolors: 1.1.0 + picocolors: 1.1.1 update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: browserslist: 4.24.0 escalade: 3.2.0 - picocolors: 1.1.0 + picocolors: 1.1.1 update-notifier@5.1.0: dependencies: @@ -37904,7 +37846,7 @@ snapshots: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.1.0 - semver: 7.5.4 + semver: 7.6.3 semver-diff: 4.0.0 xdg-basedir: 5.1.0 @@ -38170,7 +38112,7 @@ snapshots: cac: 6.7.14 debug: 4.3.4(supports-color@8.1.1) pathe: 1.1.2 - picocolors: 1.1.0 + picocolors: 1.1.1 vite: 5.4.9(@types/node@20.12.7)(less@3.11.1)(lightningcss@1.24.1)(sass@1.75.0)(terser@5.30.3) transitivePeerDependencies: - '@types/node'