From 74bfe6b852c0e126a0f7af8edc2396246e56adce Mon Sep 17 00:00:00 2001 From: Charles Catta Date: Wed, 19 Jun 2024 16:38:10 -0400 Subject: [PATCH] fix(zui): Fix default and initial values (#335) --- zui/.storybook/main.ts | 21 - zui/.storybook/preview.ts | 15 - zui/package.json | 10 +- zui/pnpm-lock.yaml | 1081 +----------------------- zui/src/ui/defaults.test.ts | 265 ++++++ zui/src/ui/hooks/useFormData.tsx | 100 ++- zui/src/ui/index.tsx | 10 +- zui/src/ui/stories/ZuiForm.stories.tsx | 333 -------- zui/src/ui/types.ts | 2 + zui/src/ui/ui.test.tsx | 42 +- zui/src/z/types/index.ts | 1 - zui/tsconfig.json | 22 +- 12 files changed, 411 insertions(+), 1491 deletions(-) delete mode 100644 zui/.storybook/main.ts delete mode 100644 zui/.storybook/preview.ts create mode 100644 zui/src/ui/defaults.test.ts delete mode 100644 zui/src/ui/stories/ZuiForm.stories.tsx diff --git a/zui/.storybook/main.ts b/zui/.storybook/main.ts deleted file mode 100644 index 372da61a..00000000 --- a/zui/.storybook/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { StorybookConfig } from '@storybook/react-vite' - -const config: StorybookConfig = { - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-onboarding', - '@storybook/addon-interactions', - ], - framework: { - name: '@storybook/react-vite', - options: { - builder: {}, - }, - }, - docs: { - autodocs: 'tag', - }, -} -export default config diff --git a/zui/.storybook/preview.ts b/zui/.storybook/preview.ts deleted file mode 100644 index cc802056..00000000 --- a/zui/.storybook/preview.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Preview } from '@storybook/react' - -const preview: Preview = { - parameters: { - actions: {}, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/i, - }, - }, - }, -} - -export default preview diff --git a/zui/package.json b/zui/package.json index d824f467..96e2622b 100644 --- a/zui/package.json +++ b/zui/package.json @@ -1,6 +1,6 @@ { "name": "@bpinternal/zui", - "version": "0.8.7", + "version": "0.8.8", "description": "An extension of Zod for working nicely with UIs and JSON Schemas", "type": "module", "source": "./src/index.ts", @@ -25,14 +25,6 @@ "build-storybook": "storybook build" }, "devDependencies": { - "@storybook/addon-essentials": "^8.0.9", - "@storybook/addon-interactions": "^8.0.9", - "@storybook/addon-links": "^8.0.9", - "@storybook/addon-onboarding": "^8.0.9", - "@storybook/blocks": "^8.0.9", - "@storybook/react": "^8.0.9", - "@storybook/react-vite": "^8.0.9", - "@storybook/test": "^8.0.9", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.2", "@testing-library/user-event": "^14.5.2", diff --git a/zui/pnpm-lock.yaml b/zui/pnpm-lock.yaml index 8ae9b549..5072eb38 100644 --- a/zui/pnpm-lock.yaml +++ b/zui/pnpm-lock.yaml @@ -15,30 +15,6 @@ importers: specifier: ^4.17.21 version: 4.17.21 devDependencies: - '@storybook/addon-essentials': - specifier: ^8.0.9 - version: 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/addon-interactions': - specifier: ^8.0.9 - version: 8.0.9(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0)) - '@storybook/addon-links': - specifier: ^8.0.9 - version: 8.0.9(react@18.2.0) - '@storybook/addon-onboarding': - specifier: ^8.0.9 - version: 8.0.9 - '@storybook/blocks': - specifier: ^8.0.9 - version: 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/react': - specifier: ^8.0.9 - version: 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5) - '@storybook/react-vite': - specifier: ^8.0.9 - version: 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.14.3)(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6)) - '@storybook/test': - specifier: ^8.0.9 - version: 8.0.9(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0)) '@testing-library/jest-dom': specifier: ^6.4.2 version: 6.4.2(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0)) @@ -768,9 +744,6 @@ packages: resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} - '@base2/pretty-print-object@1.0.1': - resolution: {integrity: sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==} - '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -1079,15 +1052,6 @@ packages: resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0': - resolution: {integrity: sha512-2D6y7fNvFmsLmRt6UCOFJPvFoPMJGT0Uh1Wg0RaigUp7kdQPs6yYn8Dmx6GZkOH/NW0yMTwRz/p0SRMMRo50vA==} - peerDependencies: - typescript: '>= 4.3.x' - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - '@jridgewell/gen-mapping@0.3.4': resolution: {integrity: sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==} engines: {node: '>=6.0.0'} @@ -1120,12 +1084,6 @@ packages: '@jsdevtools/ono@7.1.3': resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} - '@mdx-js/react@3.0.1': - resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} - peerDependencies: - '@types/react': '>=16' - react: '>=16' - '@ndelangen/get-tarball@3.0.9': resolution: {integrity: sha512-9JKTEik4vq+yGosHYhZ1tiH/3WpUS0Nh0kej4Agndhox8pAdWhEx5knFVRcb/ya9knCRCs1rPxNrSXTDdfVqpA==} @@ -1145,33 +1103,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@radix-ui/react-compose-refs@1.0.1': - resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} - peerDependencies: - '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - '@types/react': - optional: true - - '@radix-ui/react-slot@1.0.2': - resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} - peerDependencies: - '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - '@types/react': - optional: true - - '@rollup/pluginutils@5.1.0': - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@rollup/rollup-android-arm-eabi@4.12.0': resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} cpu: [arm] @@ -1320,79 +1251,9 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - '@storybook/addon-actions@8.0.9': - resolution: {integrity: sha512-+I3VTvlKdj8puHeS2tyaOVv9syDiNLneVZbTfqN+UDOK2i42NwvZr8PVwjTzMlEj9eePJdCZgiipz55xwts5bw==} - - '@storybook/addon-backgrounds@8.0.9': - resolution: {integrity: sha512-pCDecACrVyxPaJKEWS0sHsRb8xw+IPCSxDM1TkjaAQ6zZ468A/dcUnqW+LVK8bSXgQwWzn23wqnqPFSy5yptuQ==} - - '@storybook/addon-controls@8.0.9': - resolution: {integrity: sha512-wWdmd62UP/sfPm8M7aJjEA+kEXTUIR/QsYi9PoYBhBZcXiikZ4kNan7oD7GfsnzGGKHrBVfwQhO+TqaENGYytA==} - - '@storybook/addon-docs@8.0.9': - resolution: {integrity: sha512-x7hX7UuzJtClu6XwU3SfpyFhuckVcgqgD6BU6Ihxl0zs+i4xp6iKVXYSnHFMRM1sgoeT8TjPxab35Ke8w8BVRw==} - - '@storybook/addon-essentials@8.0.9': - resolution: {integrity: sha512-mwAgdfrOsTuTDcagvM7veBh+iayZIWmKOazzkhrIWbhYcrXOsweigD2UOVeHgAiAzJK49znr4FXTCKcE1hOWcw==} - - '@storybook/addon-highlight@8.0.9': - resolution: {integrity: sha512-vaRHGDbx7dpNpQECAHk5wczlZO3ntstprGlqnZt0o7ylz6xB5+pTQwTuIFty0hwKv+3TPcskzzifATUyEOEmyg==} - - '@storybook/addon-interactions@8.0.9': - resolution: {integrity: sha512-AMIdNcyM6DDAWvMitBJMqp1iPZND8AXB4QT4VZHGMKG2ngHNKktriEKpTfcRkfKPGTJs9T+71dWfm6/R4tticw==} - - '@storybook/addon-links@8.0.9': - resolution: {integrity: sha512-FVt+AdW3JFSqbJzkKiqKsMRWqHXqEvCBqFs7lNfk3OW0w0jfv1iREtrxE0dVdJoUFQC9V/2Im/EpJ7UB3C2bNQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - react: - optional: true - - '@storybook/addon-measure@8.0.9': - resolution: {integrity: sha512-91svOOGEXmGG4USglwXLE3wtlUVgtbKJVxTKX7xRI+AC5JEEaKByVzP17/X8Qn/8HilUL7AfSQ0kCoqtPSJ5cA==} - - '@storybook/addon-onboarding@8.0.9': - resolution: {integrity: sha512-gRPn8ooxTmdamfJgdkQR48pza67S83l2DDlZ3C1kuus19UO+eIFUEVZJbud9qQojq7jc8ztaYXiNObWdxKu29A==} - - '@storybook/addon-outline@8.0.9': - resolution: {integrity: sha512-fQ+jm356TgUnz81IxsC99/aOesbLw3N5OQRJpo/A6kqbLMzlq3ybVzuXYCKC3f0ArgQRNh4NoMeJBMRFMtaWRw==} - - '@storybook/addon-toolbars@8.0.9': - resolution: {integrity: sha512-nNSBnnBOhQ+EJwkrIkK4ZBYPcozNmEH770CZ/6NK85SUJ6WEBZapE6ru33jIUokFGEvlOlNCeai0GUc++cQP8w==} - - '@storybook/addon-viewport@8.0.9': - resolution: {integrity: sha512-Ao4+D56cO7biaw+iTlMU1FBec1idX0cmdosDeCFZin06MSawcPkeBlRBeruaSQYdLes8TBMdZPFgfuqI5yIk6g==} - - '@storybook/blocks@8.0.9': - resolution: {integrity: sha512-F2zSrfSwzTFN7qW3zB80tG+EXtmfmCDC6Ird0F7tolszb6tOqJcAcBOwQbE2O0wI63sLu21qxzXgaKBMkiWvJg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - '@storybook/builder-manager@8.0.9': resolution: {integrity: sha512-/PxDwZIfMc/PSRZcasb6SIdGr3azIlenzx7dBF7Imt8i4jLHiAf1t00GvghlfJsvsrn4DNp95rbRbXTDyTj7tQ==} - '@storybook/builder-vite@8.0.9': - resolution: {integrity: sha512-7hEQFZIIz7VvxdySDpPE96iMvZxQvRZcRdhaNGeE+8Y2pyc3DgYE4WY3sjr+LUoB0a6TYLpAIKqbXwtLz0R+PQ==} - peerDependencies: - '@preact/preset-vite': '*' - typescript: '>= 4.3.x' - vite: ^4.0.0 || ^5.0.0 - vite-plugin-glimmerx: '*' - peerDependenciesMeta: - '@preact/preset-vite': - optional: true - typescript: - optional: true - vite-plugin-glimmerx: - optional: true - '@storybook/channels@8.0.9': resolution: {integrity: sha512-7Lcfyy5CsLWWGhMPO9WG4jZ/Alzp0AjepFhEreYHRPtQrfttp6qMAjE/g1aHgun0qHCYWxwqIG4NLR/hqDNrXQ==} @@ -1406,12 +1267,6 @@ packages: '@storybook/codemod@8.0.9': resolution: {integrity: sha512-VBeGpSZSQpL6iyLLqceJSNGhdCqcNwv+xC/aWdDFOkmuE1YfbmNNwpa9QYv4ZFJ2QjUsm4iTWG60qK+9NXeSKA==} - '@storybook/components@8.0.9': - resolution: {integrity: sha512-JcwBGADzIJs0PSzqykrrD2KHzNG9wtexUOKuidt+FSv9szpUhe3qBAXIHpdfBRl7mOJ9TRZ5rt+mukEnfncdzA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@storybook/core-common@8.0.9': resolution: {integrity: sha512-Jmue+sfHFb4GTYBzyWYw1MygoJiQSfISIrKmNIzAmZ+oR9EOr+jpu/i/bH+uetZ2Hqg1AGhj1VB7OtJp9HQyWw==} @@ -1421,9 +1276,6 @@ packages: '@storybook/core-server@8.0.9': resolution: {integrity: sha512-BIe1T5YUBl0GYxEjRoTQsvXD2pyuzL8rPTUD41zlzSQM0R8U6Iant9SzRms4u0+rKUm2mGxxKuODlUo5ewqaGA==} - '@storybook/csf-plugin@8.0.9': - resolution: {integrity: sha512-pXaNCNi++kxKsqSWwvx215fPx8cNqvepLVxQ7B69qXLHj80DHn0Q3DFBO3sLXNiQMJ2JK4OYcTxMfuOiyzszKw==} - '@storybook/csf-tools@8.0.9': resolution: {integrity: sha512-PiNMhL97giLytTdQwuhsZ92buVk4gy9H/8DtrDhUc45/1OmF95gogm6T2Yap729SIFwgpOcuq/U3aVo6d6swVQ==} @@ -1433,9 +1285,6 @@ packages: '@storybook/docs-mdx@3.0.0': resolution: {integrity: sha512-NmiGXl2HU33zpwTv1XORe9XG9H+dRUC1Jl11u92L4xr062pZtrShLmD4VKIsOQujxhhOrbxpwhNOt+6TdhyIdQ==} - '@storybook/docs-tools@8.0.9': - resolution: {integrity: sha512-OzogAeOmeHea/MxSPKRBWtOQVNSpoq+OOpimO9YRA5h5GBRJ2TUOGT44Gny6QT4ll5AvQA8fIiq9KezKcLekAg==} - '@storybook/global@5.0.0': resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} @@ -1446,9 +1295,6 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@storybook/instrumenter@8.0.9': - resolution: {integrity: sha512-Gw74dgpTU/2p7FG0s7DuVdqCbJ2MEcSuRJjDo7HcXRYcvWp7I6Ly+C0v7N5VaoS+kbBVerAhLKIHZgG/LZf1og==} - '@storybook/manager-api@8.0.9': resolution: {integrity: sha512-99b3yKArDSvfabXL7QE3nA95e4DdW/5H/ZCcr6/E2qCQJayZ6G1v/WWamKXbiaTpkndulFmcb/+ZmnDXcweIIQ==} @@ -1461,43 +1307,12 @@ packages: '@storybook/preview-api@8.0.9': resolution: {integrity: sha512-zHfX34bkAMzzmE7vbDzaqFwSW6ExiBD0HiO1L/IsHF55f0f7xV7IH8uJyFRrDTvAoW3ReSxZDMvvPpeydFPKGA==} - '@storybook/preview@8.0.9': - resolution: {integrity: sha512-tFsR8xc8AYBZZrZw8enklFbSQt7ZAV+rv20BoxwDhd3q7fjXyK7O4moGPqUwBZ7rukTG13nPoISxr+VXAk/HYA==} - - '@storybook/react-dom-shim@8.0.9': - resolution: {integrity: sha512-8011KlRuG3obr5pZZ7bcEyYYNWF3tR596YadoMd267NPoHKvwAbKL1L/DNgb6kiYjZDUf9QfaKSCWW31k0kcRQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - - '@storybook/react-vite@8.0.9': - resolution: {integrity: sha512-FT5KeulUH6grfzOJOxJCxpv9+81UVDrT9UPcgiFhQT9rKtsgmltezThwbHknByZNw3WWnf+ieidMLEis9hd73A==} - engines: {node: '>=18.0.0'} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - vite: ^4.0.0 || ^5.0.0 - - '@storybook/react@8.0.9': - resolution: {integrity: sha512-NeQ6suZG3HKikwe3Tx9cAIaRx7uP8FKCmlVvIiBg4LTTI5orCt94PPakvuZukZcbkqvcCnEBkebAzwUpn8PiJw==} - engines: {node: '>=18.0.0'} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - typescript: '>= 4.2.x' - peerDependenciesMeta: - typescript: - optional: true - '@storybook/router@8.0.9': resolution: {integrity: sha512-aAOWxbM9J4mt+cp4o88T2PB29mgBBTOzU37/pUsTHYnKnR9XI4npXEXdN8Gv+ryqM0kj0AbBpz/llFlnR2MNNA==} '@storybook/telemetry@8.0.9': resolution: {integrity: sha512-AGGfcup06t+wxhBIkHd0iybieOh9PDVZQJ9oPct5JGB39+ni9wvs0WOD+MYlHbsjp8id7+aGkh6mYuYOvfck+Q==} - '@storybook/test@8.0.9': - resolution: {integrity: sha512-bRd5tBJnPzR6UKbDXONWnFWtdkNOY99HMLDUWe5fTRo50GwkrpFBVqPflhdkruEeof0kAbBUbnoN2CIYgtnAFw==} - '@storybook/theming@8.0.9': resolution: {integrity: sha512-jgfDuYoiNMMirQiASN3Eg0hGDXsEtpdAcMxyShqYGwu9elxgD9yUnYC2nSckYsM74a3ZQ3JaViZ9ZFSe2FHmeQ==} peerDependencies: @@ -1631,18 +1446,6 @@ packages: '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.6.8': - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - - '@types/babel__traverse@7.20.5': - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} - '@types/benchmark@2.1.5': resolution: {integrity: sha512-cKio2eFB3v7qmKcvIHLUMw/dIx/8bhWPuzpzRT4unCPRTD8VdA9Zb0afxpcxOqR4PixRS7yT42FqGS8BYL8g1w==} @@ -1658,24 +1461,12 @@ packages: '@types/detect-port@1.3.5': resolution: {integrity: sha512-Rf3/lB9WkDfIL9eEKaSYKc+1L/rNVYBjThk22JTqQw0YozXarX8YljFAz+HCoC6h4B4KwCMsBPZHaFezwT4BNA==} - '@types/doctrine@0.0.3': - resolution: {integrity: sha512-w5jZ0ee+HaPOaX25X2/2oGR/7rgAQSYII7X7pp0m9KgBfMP7uKfMfTvcpl5Dj+eDBbpxKGiqE+flqDr6XTd2RA==} - - '@types/doctrine@0.0.9': - resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} - '@types/ejs@3.1.5': resolution: {integrity: sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==} '@types/emscripten@1.39.10': resolution: {integrity: sha512-TB/6hBkYQJxsZHSqyeuO1Jt0AB/bW6G7rHt9g7lML7SOF6lbgcHvw/Lr+69iqN0qxgXLhWKScAon73JNnptuDw==} - '@types/escodegen@0.0.6': - resolution: {integrity: sha512-AjwI4MvWx3HAOaZqYsjKWyEObT9lcVV0Y0V8nXo6cXzN8ZiMxVhf6F3d/UNvXVGKrEzL/Dluc5p+y9GkzlTWig==} - - '@types/estree@0.0.51': - resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} - '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -1685,15 +1476,6 @@ packages: '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} - '@types/find-cache-dir@3.2.1': - resolution: {integrity: sha512-frsJrz2t/CeGifcu/6uRo4b+SzAwT4NYCVPu1GN8IB9XTzrpPkGuV0tmh9mN+/L0PklAlsC3u5Fxt0ju00LXIw==} - - '@types/glob@7.2.0': - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -1715,15 +1497,9 @@ packages: '@types/lodash@4.17.0': resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} - '@types/mdx@2.0.13': - resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} - '@types/minimatch@5.1.2': - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/node@18.19.31': resolution: {integrity: sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==} @@ -1751,9 +1527,6 @@ packages: '@types/react@18.2.79': resolution: {integrity: sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==} - '@types/resolve@1.20.6': - resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} - '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1766,29 +1539,17 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - '@types/unist@3.0.2': - resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} - - '@types/uuid@9.0.8': - resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitejs/plugin-react-swc@3.6.0': resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} peerDependencies: vite: ^4 || ^5 - '@vitest/expect@1.3.1': - resolution: {integrity: sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==} - '@vitest/expect@1.5.2': resolution: {integrity: sha512-rf7MTD1WCoDlN3FfYJ9Llfp0PbdtOMZ3FIF0AVkDnKbp3oiMW1c8AmvRZBcqbAhDUAvF52e9zx4WQM1r3oraVA==} @@ -1798,21 +1559,9 @@ packages: '@vitest/snapshot@1.5.2': resolution: {integrity: sha512-CTEp/lTYos8fuCc9+Z55Ga5NVPKUgExritjF5VY7heRFUfheoAqBneUlvXSUJHUZPjnPmyZA96yLRJDP1QATFQ==} - '@vitest/spy@1.3.1': - resolution: {integrity: sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==} - - '@vitest/spy@1.5.0': - resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==} - '@vitest/spy@1.5.2': resolution: {integrity: sha512-xCcPvI8JpCtgikT9nLpHPL1/81AYqZy1GCy4+MCHBE7xi8jgsYkULpW5hrx5PGLgOQjUpb6fd15lqcriJ40tfQ==} - '@vitest/utils@1.3.1': - resolution: {integrity: sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==} - - '@vitest/utils@1.5.0': - resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==} - '@vitest/utils@1.5.2': resolution: {integrity: sha512-sWOmyofuXLJ85VvXNsroZur7mOJGiQeM0JN3/0D1uU8U9bGFM69X1iqHaRXl6R8BwaLY6yPCogP257zxTzkUdA==} @@ -1834,24 +1583,10 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn-walk@7.2.0: - resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} - engines: {node: '>=0.4.0'} - acorn-walk@8.3.2: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - acorn@7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} @@ -1934,9 +1669,6 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - assert@2.1.0: - resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} - assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -2301,10 +2033,6 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} @@ -2372,9 +2100,6 @@ packages: es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} - es-module-lexer@0.9.3: - resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} - esbuild-plugin-alias@0.2.1: resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==} @@ -2408,23 +2133,11 @@ packages: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} - escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true - esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -2581,19 +2294,10 @@ packages: resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==} hasBin: true - github-slugger@2.0.0: - resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-promise@4.2.2: - resolution: {integrity: sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==} - engines: {node: '>=12'} - peerDependencies: - glob: ^7.1.6 - glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} @@ -2663,15 +2367,6 @@ packages: resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} engines: {node: '>= 0.4'} - hast-util-heading-rank@3.0.0: - resolution: {integrity: sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==} - - hast-util-is-element@3.0.0: - resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} - - hast-util-to-string@3.0.0: - resolution: {integrity: sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==} - hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -2679,10 +2374,6 @@ packages: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} - html-tags@3.3.1: - resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} - engines: {node: '>=8'} - http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -2743,10 +2434,6 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} - is-absolute-url@4.0.1: - resolution: {integrity: sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -2815,10 +2502,6 @@ packages: is-map@2.0.2: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - is-nan@1.3.2: - resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} - engines: {node: '>= 0.4'} - is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} @@ -2839,10 +2522,6 @@ packages: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} - is-plain-object@5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -3076,10 +2755,6 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - magic-string@0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} - engines: {node: '>=12'} - magic-string@0.30.9: resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} engines: {node: '>=12'} @@ -3095,12 +2770,6 @@ packages: map-or-similar@1.5.0: resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} - markdown-to-jsx@7.3.2: - resolution: {integrity: sha512-B+28F5ucp83aQm+OxNrPkS8z0tMKaeHiy0lHJs3LqCyDQFtWuenaIrkaVTgAm1pf1AU85LXltva86hlaT17i8Q==} - engines: {node: '>= 10'} - peerDependencies: - react: '>= 0.14.0' - media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -3445,10 +3114,6 @@ packages: platform@1.3.6: resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} - polished@4.3.1: - resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} - engines: {node: '>=10'} - possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -3497,9 +3162,6 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -3545,41 +3207,14 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} - react-colorful@5.6.1: - resolution: {integrity: sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==} - peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' - - react-docgen-typescript@2.2.2: - resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} - peerDependencies: - typescript: '>= 4.3.x' - - react-docgen@7.0.3: - resolution: {integrity: sha512-i8aF1nyKInZnANZ4uZrH49qn1paRgBZ7wZiCNBMnenlPzEv0mRl+ShpTVEI6wZNl8sSc79xZkivtgLKQArcanQ==} - engines: {node: '>=16.14.0'} - react-dom@18.2.0: resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: react: ^18.2.0 - react-element-to-jsx-string@15.0.0: - resolution: {integrity: sha512-UDg4lXB6BzlobN60P8fHWVPX3Kyw8ORrTeBtClmIlGdkOOE+GYQSFvmEU5iLLpwp/6v42DINwNcwOhOLfQ//FQ==} - peerDependencies: - react: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0 - react-dom: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0 - - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-is@18.1.0: - resolution: {integrity: sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==} - react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} @@ -3639,12 +3274,6 @@ packages: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true - rehype-external-links@3.0.0: - resolution: {integrity: sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw==} - - rehype-slug@6.0.0: - resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -3795,9 +3424,6 @@ packages: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} - space-separated-tokens@2.0.2: - resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} - spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -3860,10 +3486,6 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -3876,10 +3498,6 @@ packages: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} - strip-indent@4.0.0: - resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} - engines: {node: '>=12'} - strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -3965,9 +3583,6 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - tocbot@4.25.0: - resolution: {integrity: sha512-kE5wyCQJ40hqUaRVkyQ4z5+4juzYsv/eK+aqD97N62YH0TxFhzJvo22RUQQZdO3YnXAk42ZOfOpjVdy+Z0YokA==} - toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -4000,10 +3615,6 @@ packages: ts-morph@22.0.0: resolution: {integrity: sha512-M9MqFGZREyeb5fTl6gNHKZLqBQA0TjA1lea+CR48R8EBTDuWrNqW6ccC5QvjNR4s6wDumD3LTCjOFSp9iwlzaw==} - tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} - tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -4094,15 +3705,6 @@ packages: resolution: {integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==} engines: {node: '>=8'} - unist-util-is@6.0.0: - resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} - - unist-util-visit-parents@6.0.1: - resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} - - unist-util-visit@5.0.0: - resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} - universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -4115,10 +3717,6 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - unplugin@1.10.1: - resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==} - engines: {node: '>=14.0.0'} - untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} @@ -4145,10 +3743,6 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - hasBin: true - validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -4235,13 +3829,6 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} - webpack-sources@3.2.3: - resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} - engines: {node: '>=10.13.0'} - - webpack-virtual-modules@0.6.1: - resolution: {integrity: sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==} - whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} @@ -5136,8 +4723,6 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - '@base2/pretty-print-object@1.0.1': {} - '@colors/colors@1.5.0': optional: true @@ -5313,16 +4898,6 @@ snapshots: '@types/yargs': 17.0.32 chalk: 4.1.2 - '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6))': - dependencies: - glob: 7.2.3 - glob-promise: 4.2.2(glob@7.2.3) - magic-string: 0.27.0 - react-docgen-typescript: 2.2.2(typescript@5.4.5) - vite: 5.2.9(@types/node@20.12.6) - optionalDependencies: - typescript: 5.4.5 - '@jridgewell/gen-mapping@0.3.4': dependencies: '@jridgewell/set-array': 1.1.2 @@ -5355,12 +4930,6 @@ snapshots: '@jsdevtools/ono@7.1.3': {} - '@mdx-js/react@3.0.1(@types/react@18.2.79)(react@18.2.0)': - dependencies: - '@types/mdx': 2.0.13 - '@types/react': 18.2.79 - react: 18.2.0 - '@ndelangen/get-tarball@3.0.9': dependencies: gunzip-maybe: 1.4.2 @@ -5382,29 +4951,6 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.79)(react@18.2.0)': - dependencies: - '@babel/runtime': 7.24.4 - react: 18.2.0 - optionalDependencies: - '@types/react': 18.2.79 - - '@radix-ui/react-slot@1.0.2(@types/react@18.2.79)(react@18.2.0)': - dependencies: - '@babel/runtime': 7.24.4 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.79)(react@18.2.0) - react: 18.2.0 - optionalDependencies: - '@types/react': 18.2.79 - - '@rollup/pluginutils@5.1.0(rollup@4.14.3)': - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - optionalDependencies: - rollup: 4.14.3 - '@rollup/rollup-android-arm-eabi@4.12.0': optional: true @@ -5494,224 +5040,43 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@storybook/addon-actions@8.0.9': - dependencies: - '@storybook/core-events': 8.0.9 - '@storybook/global': 5.0.0 - '@types/uuid': 9.0.8 - dequal: 2.0.3 - polished: 4.3.1 - uuid: 9.0.1 - - '@storybook/addon-backgrounds@8.0.9': - dependencies: - '@storybook/global': 5.0.0 - memoizerific: 1.11.3 - ts-dedent: 2.2.0 - - '@storybook/addon-controls@8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@storybook/builder-manager@8.0.9': dependencies: - '@storybook/blocks': 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - lodash: 4.17.21 - ts-dedent: 2.2.0 + '@fal-works/esbuild-plugin-global-externals': 2.1.2 + '@storybook/core-common': 8.0.9 + '@storybook/manager': 8.0.9 + '@storybook/node-logger': 8.0.9 + '@types/ejs': 3.1.5 + '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.20.2) + browser-assert: 1.2.1 + ejs: 3.1.9 + esbuild: 0.20.2 + esbuild-plugin-alias: 0.2.1 + express: 4.19.2 + fs-extra: 11.2.0 + process: 0.11.10 + util: 0.12.5 transitivePeerDependencies: - - '@types/react' - encoding - - react - - react-dom - supports-color - '@storybook/addon-docs@8.0.9': + '@storybook/channels@8.0.9': + dependencies: + '@storybook/client-logger': 8.0.9 + '@storybook/core-events': 8.0.9 + '@storybook/global': 5.0.0 + telejson: 7.2.0 + tiny-invariant: 1.3.3 + + '@storybook/cli@8.0.9(@babel/preset-env@7.24.4(@babel/core@7.24.4))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/core': 7.24.4 - '@mdx-js/react': 3.0.1(@types/react@18.2.79)(react@18.2.0) - '@storybook/blocks': 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/client-logger': 8.0.9 - '@storybook/components': 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/csf-plugin': 8.0.9 - '@storybook/csf-tools': 8.0.9 - '@storybook/global': 5.0.0 - '@storybook/node-logger': 8.0.9 - '@storybook/preview-api': 8.0.9 - '@storybook/react-dom-shim': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/theming': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/types': 8.0.9 - '@types/react': 18.2.79 - fs-extra: 11.2.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - rehype-external-links: 3.0.0 - rehype-slug: 6.0.0 - ts-dedent: 2.2.0 - transitivePeerDependencies: - - encoding - - supports-color - - '@storybook/addon-essentials@8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - '@storybook/addon-actions': 8.0.9 - '@storybook/addon-backgrounds': 8.0.9 - '@storybook/addon-controls': 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/addon-docs': 8.0.9 - '@storybook/addon-highlight': 8.0.9 - '@storybook/addon-measure': 8.0.9 - '@storybook/addon-outline': 8.0.9 - '@storybook/addon-toolbars': 8.0.9 - '@storybook/addon-viewport': 8.0.9 - '@storybook/core-common': 8.0.9 - '@storybook/manager-api': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/node-logger': 8.0.9 - '@storybook/preview-api': 8.0.9 - ts-dedent: 2.2.0 - transitivePeerDependencies: - - '@types/react' - - encoding - - react - - react-dom - - supports-color - - '@storybook/addon-highlight@8.0.9': - dependencies: - '@storybook/global': 5.0.0 - - '@storybook/addon-interactions@8.0.9(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0))': - dependencies: - '@storybook/global': 5.0.0 - '@storybook/instrumenter': 8.0.9 - '@storybook/test': 8.0.9(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0)) - '@storybook/types': 8.0.9 - polished: 4.3.1 - ts-dedent: 2.2.0 - transitivePeerDependencies: - - '@jest/globals' - - '@types/bun' - - '@types/jest' - - jest - - vitest - - '@storybook/addon-links@8.0.9(react@18.2.0)': - dependencies: - '@storybook/csf': 0.1.5 - '@storybook/global': 5.0.0 - ts-dedent: 2.2.0 - optionalDependencies: - react: 18.2.0 - - '@storybook/addon-measure@8.0.9': - dependencies: - '@storybook/global': 5.0.0 - tiny-invariant: 1.3.3 - - '@storybook/addon-onboarding@8.0.9': {} - - '@storybook/addon-outline@8.0.9': - dependencies: - '@storybook/global': 5.0.0 - ts-dedent: 2.2.0 - - '@storybook/addon-toolbars@8.0.9': {} - - '@storybook/addon-viewport@8.0.9': - dependencies: - memoizerific: 1.11.3 - - '@storybook/blocks@8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - '@storybook/channels': 8.0.9 - '@storybook/client-logger': 8.0.9 - '@storybook/components': 8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/core-events': 8.0.9 - '@storybook/csf': 0.1.5 - '@storybook/docs-tools': 8.0.9 - '@storybook/global': 5.0.0 - '@storybook/icons': 1.2.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/manager-api': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/preview-api': 8.0.9 - '@storybook/theming': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/types': 8.0.9 - '@types/lodash': 4.17.0 - color-convert: 2.0.1 - dequal: 2.0.3 - lodash: 4.17.21 - markdown-to-jsx: 7.3.2(react@18.2.0) - memoizerific: 1.11.3 - polished: 4.3.1 - react-colorful: 5.6.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - telejson: 7.2.0 - tocbot: 4.25.0 - ts-dedent: 2.2.0 - util-deprecate: 1.0.2 - optionalDependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - transitivePeerDependencies: - - '@types/react' - - encoding - - supports-color - - '@storybook/builder-manager@8.0.9': - dependencies: - '@fal-works/esbuild-plugin-global-externals': 2.1.2 - '@storybook/core-common': 8.0.9 - '@storybook/manager': 8.0.9 - '@storybook/node-logger': 8.0.9 - '@types/ejs': 3.1.5 - '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.20.2) - browser-assert: 1.2.1 - ejs: 3.1.9 - esbuild: 0.20.2 - esbuild-plugin-alias: 0.2.1 - express: 4.19.2 - fs-extra: 11.2.0 - process: 0.11.10 - util: 0.12.5 - transitivePeerDependencies: - - encoding - - supports-color - - '@storybook/builder-vite@8.0.9(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6))': - dependencies: - '@storybook/channels': 8.0.9 - '@storybook/client-logger': 8.0.9 - '@storybook/core-common': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/csf-plugin': 8.0.9 - '@storybook/node-logger': 8.0.9 - '@storybook/preview': 8.0.9 - '@storybook/preview-api': 8.0.9 - '@storybook/types': 8.0.9 - '@types/find-cache-dir': 3.2.1 - browser-assert: 1.2.1 - es-module-lexer: 0.9.3 - express: 4.19.2 - find-cache-dir: 3.3.2 - fs-extra: 11.2.0 - magic-string: 0.30.9 - ts-dedent: 2.2.0 - vite: 5.2.9(@types/node@20.12.6) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - encoding - - supports-color - - '@storybook/channels@8.0.9': - dependencies: - '@storybook/client-logger': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/global': 5.0.0 - telejson: 7.2.0 - tiny-invariant: 1.3.3 - - '@storybook/cli@8.0.9(@babel/preset-env@7.24.4(@babel/core@7.24.4))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - '@babel/core': 7.24.4 - '@babel/types': 7.24.0 - '@ndelangen/get-tarball': 3.0.9 - '@storybook/codemod': 8.0.9 - '@storybook/core-common': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/core-server': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@babel/types': 7.24.0 + '@ndelangen/get-tarball': 3.0.9 + '@storybook/codemod': 8.0.9 + '@storybook/core-common': 8.0.9 + '@storybook/core-events': 8.0.9 + '@storybook/core-server': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@storybook/csf-tools': 8.0.9 '@storybook/node-logger': 8.0.9 '@storybook/telemetry': 8.0.9 @@ -5774,22 +5139,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/components@8.0.9(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.79)(react@18.2.0) - '@storybook/client-logger': 8.0.9 - '@storybook/csf': 0.1.5 - '@storybook/global': 5.0.0 - '@storybook/icons': 1.2.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/theming': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/types': 8.0.9 - memoizerific: 1.11.3 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - util-deprecate: 1.0.2 - transitivePeerDependencies: - - '@types/react' - '@storybook/core-common@8.0.9': dependencies: '@storybook/core-events': 8.0.9 @@ -5881,13 +5230,6 @@ snapshots: - supports-color - utf-8-validate - '@storybook/csf-plugin@8.0.9': - dependencies: - '@storybook/csf-tools': 8.0.9 - unplugin: 1.10.1 - transitivePeerDependencies: - - supports-color - '@storybook/csf-tools@8.0.9': dependencies: '@babel/generator': 7.24.4 @@ -5908,20 +5250,6 @@ snapshots: '@storybook/docs-mdx@3.0.0': {} - '@storybook/docs-tools@8.0.9': - dependencies: - '@storybook/core-common': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/preview-api': 8.0.9 - '@storybook/types': 8.0.9 - '@types/doctrine': 0.0.3 - assert: 2.1.0 - doctrine: 3.0.0 - lodash: 4.17.21 - transitivePeerDependencies: - - encoding - - supports-color - '@storybook/global@5.0.0': {} '@storybook/icons@1.2.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': @@ -5929,16 +5257,6 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/instrumenter@8.0.9': - dependencies: - '@storybook/channels': 8.0.9 - '@storybook/client-logger': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/global': 5.0.0 - '@storybook/preview-api': 8.0.9 - '@vitest/utils': 1.5.0 - util: 0.12.5 - '@storybook/manager-api@8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@storybook/channels': 8.0.9 @@ -5981,67 +5299,6 @@ snapshots: ts-dedent: 2.2.0 util-deprecate: 1.0.2 - '@storybook/preview@8.0.9': {} - - '@storybook/react-dom-shim@8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - - '@storybook/react-vite@8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.14.3)(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6))': - dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6)) - '@rollup/pluginutils': 5.1.0(rollup@4.14.3) - '@storybook/builder-vite': 8.0.9(typescript@5.4.5)(vite@5.2.9(@types/node@20.12.6)) - '@storybook/node-logger': 8.0.9 - '@storybook/react': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5) - find-up: 5.0.0 - magic-string: 0.30.9 - react: 18.2.0 - react-docgen: 7.0.3 - react-dom: 18.2.0(react@18.2.0) - resolve: 1.22.8 - tsconfig-paths: 4.2.0 - vite: 5.2.9(@types/node@20.12.6) - transitivePeerDependencies: - - '@preact/preset-vite' - - encoding - - rollup - - supports-color - - typescript - - vite-plugin-glimmerx - - '@storybook/react@8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5)': - dependencies: - '@storybook/client-logger': 8.0.9 - '@storybook/docs-tools': 8.0.9 - '@storybook/global': 5.0.0 - '@storybook/preview-api': 8.0.9 - '@storybook/react-dom-shim': 8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/types': 8.0.9 - '@types/escodegen': 0.0.6 - '@types/estree': 0.0.51 - '@types/node': 18.19.31 - acorn: 7.4.1 - acorn-jsx: 5.3.2(acorn@7.4.1) - acorn-walk: 7.2.0 - escodegen: 2.1.0 - html-tags: 3.3.1 - lodash: 4.17.21 - prop-types: 15.8.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-element-to-jsx-string: 15.0.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - semver: 7.6.0 - ts-dedent: 2.2.0 - type-fest: 2.19.0 - util-deprecate: 1.0.2 - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - encoding - - supports-color - '@storybook/router@8.0.9': dependencies: '@storybook/client-logger': 8.0.9 @@ -6062,25 +5319,6 @@ snapshots: - encoding - supports-color - '@storybook/test@8.0.9(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0))': - dependencies: - '@storybook/client-logger': 8.0.9 - '@storybook/core-events': 8.0.9 - '@storybook/instrumenter': 8.0.9 - '@storybook/preview-api': 8.0.9 - '@testing-library/dom': 9.3.4 - '@testing-library/jest-dom': 6.4.2(@types/jest@29.5.12)(vitest@1.5.2(@types/node@20.12.6)(jsdom@24.0.0)) - '@testing-library/user-event': 14.5.2(@testing-library/dom@9.3.4) - '@vitest/expect': 1.3.1 - '@vitest/spy': 1.5.0 - util: 0.12.5 - transitivePeerDependencies: - - '@jest/globals' - - '@types/bun' - - '@types/jest' - - jest - - vitest - '@storybook/theming@8.0.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) @@ -6195,27 +5433,6 @@ snapshots: '@types/aria-query@5.0.4': {} - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - - '@types/babel__generator@7.6.8': - dependencies: - '@babel/types': 7.24.0 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - - '@types/babel__traverse@7.20.5': - dependencies: - '@babel/types': 7.24.0 - '@types/benchmark@2.1.5': {} '@types/body-parser@1.19.5': @@ -6233,18 +5450,10 @@ snapshots: '@types/detect-port@1.3.5': {} - '@types/doctrine@0.0.3': {} - - '@types/doctrine@0.0.9': {} - '@types/ejs@3.1.5': {} '@types/emscripten@1.39.10': {} - '@types/escodegen@0.0.6': {} - - '@types/estree@0.0.51': {} - '@types/estree@1.0.5': {} '@types/express-serve-static-core@4.19.0': @@ -6261,17 +5470,6 @@ snapshots: '@types/qs': 6.9.14 '@types/serve-static': 1.15.7 - '@types/find-cache-dir@3.2.1': {} - - '@types/glob@7.2.0': - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 20.12.6 - - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.2 - '@types/http-errors@2.0.4': {} '@types/istanbul-lib-coverage@2.0.6': {} @@ -6293,12 +5491,8 @@ snapshots: '@types/lodash@4.17.0': {} - '@types/mdx@2.0.13': {} - '@types/mime@1.3.5': {} - '@types/minimatch@5.1.2': {} - '@types/node@18.19.31': dependencies: undici-types: 5.26.5 @@ -6326,8 +5520,6 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 - '@types/resolve@1.20.6': {} - '@types/semver@7.5.8': {} '@types/send@0.17.4': @@ -6343,18 +5535,12 @@ snapshots: '@types/stack-utils@2.0.3': {} - '@types/unist@3.0.2': {} - - '@types/uuid@9.0.8': {} - '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.32': dependencies: '@types/yargs-parser': 21.0.3 - '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.6.0(vite@5.2.9(@types/node@20.12.6))': dependencies: '@swc/core': 1.4.11 @@ -6362,12 +5548,6 @@ snapshots: transitivePeerDependencies: - '@swc/helpers' - '@vitest/expect@1.3.1': - dependencies: - '@vitest/spy': 1.3.1 - '@vitest/utils': 1.3.1 - chai: 4.4.1 - '@vitest/expect@1.5.2': dependencies: '@vitest/spy': 1.5.2 @@ -6386,32 +5566,10 @@ snapshots: pathe: 1.1.2 pretty-format: 29.7.0 - '@vitest/spy@1.3.1': - dependencies: - tinyspy: 2.2.1 - - '@vitest/spy@1.5.0': - dependencies: - tinyspy: 2.2.1 - '@vitest/spy@1.5.2': dependencies: tinyspy: 2.2.1 - '@vitest/utils@1.3.1': - dependencies: - diff-sequences: 29.6.3 - estree-walker: 3.0.3 - loupe: 2.3.7 - pretty-format: 29.7.0 - - '@vitest/utils@1.5.0': - dependencies: - diff-sequences: 29.6.3 - estree-walker: 3.0.3 - loupe: 2.3.7 - pretty-format: 29.7.0 - '@vitest/utils@1.5.2': dependencies: diff-sequences: 29.6.3 @@ -6439,16 +5597,8 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-jsx@5.3.2(acorn@7.4.1): - dependencies: - acorn: 7.4.1 - - acorn-walk@7.2.0: {} - acorn-walk@8.3.2: {} - acorn@7.4.1: {} - acorn@8.11.3: {} address@1.2.2: {} @@ -6519,14 +5669,6 @@ snapshots: array-union@2.1.0: {} - assert@2.1.0: - dependencies: - call-bind: 1.0.7 - is-nan: 1.3.2 - object-is: 1.1.6 - object.assign: 4.1.5 - util: 0.12.5 - assertion-error@1.1.0: {} ast-types@0.16.1: @@ -6922,10 +6064,6 @@ snapshots: dependencies: path-type: 4.0.0 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dom-accessibility-api@0.5.16: {} dom-accessibility-api@0.6.3: {} @@ -6987,8 +6125,6 @@ snapshots: isarray: 2.0.5 stop-iteration-iterator: 1.0.0 - es-module-lexer@0.9.3: {} - esbuild-plugin-alias@0.2.1: {} esbuild-register@3.5.0(esbuild@0.20.2): @@ -7058,20 +6194,8 @@ snapshots: escape-string-regexp@2.0.0: {} - escodegen@2.1.0: - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - esprima@4.0.1: {} - estraverse@5.3.0: {} - - estree-walker@2.0.2: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.5 @@ -7296,17 +6420,10 @@ snapshots: pathe: 1.1.2 tar: 6.2.1 - github-slugger@2.0.0: {} - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - glob-promise@4.2.2(glob@7.2.3): - dependencies: - '@types/glob': 7.2.0 - glob: 7.2.3 - glob-to-regexp@0.4.1: {} glob@10.3.10: @@ -7391,26 +6508,12 @@ snapshots: dependencies: function-bind: 1.1.2 - hast-util-heading-rank@3.0.0: - dependencies: - '@types/hast': 3.0.4 - - hast-util-is-element@3.0.0: - dependencies: - '@types/hast': 3.0.4 - - hast-util-to-string@3.0.0: - dependencies: - '@types/hast': 3.0.4 - hosted-git-info@2.8.9: {} html-encoding-sniffer@4.0.0: dependencies: whatwg-encoding: 3.1.1 - html-tags@3.3.1: {} - http-errors@2.0.0: dependencies: depd: 2.0.0 @@ -7470,8 +6573,6 @@ snapshots: ipaddr.js@1.9.1: {} - is-absolute-url@4.0.1: {} - is-arguments@1.1.1: dependencies: call-bind: 1.0.7 @@ -7529,11 +6630,6 @@ snapshots: is-map@2.0.2: {} - is-nan@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -7548,8 +6644,6 @@ snapshots: dependencies: isobject: 3.0.1 - is-plain-object@5.0.0: {} - is-potential-custom-element-name@1.0.1: {} is-regex@1.1.4: @@ -7804,10 +6898,6 @@ snapshots: lz-string@1.5.0: {} - magic-string@0.27.0: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.9: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -7823,10 +6913,6 @@ snapshots: map-or-similar@1.5.0: {} - markdown-to-jsx@7.3.2(react@18.2.0): - dependencies: - react: 18.2.0 - media-typer@0.3.0: {} memoizerific@1.11.3: @@ -8128,10 +7214,6 @@ snapshots: platform@1.3.6: {} - polished@4.3.1: - dependencies: - '@babel/runtime': 7.24.4 - possible-typed-array-names@1.0.0: {} postcss-load-config@4.0.2(postcss@8.4.38): @@ -8172,12 +7254,6 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - prop-types@15.8.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 @@ -8226,50 +7302,14 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 - react-colorful@5.6.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0): - dependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - - react-docgen-typescript@2.2.2(typescript@5.4.5): - dependencies: - typescript: 5.4.5 - - react-docgen@7.0.3: - dependencies: - '@babel/core': 7.24.4 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 - '@types/babel__core': 7.20.5 - '@types/babel__traverse': 7.20.5 - '@types/doctrine': 0.0.9 - '@types/resolve': 1.20.6 - doctrine: 3.0.0 - resolve: 1.22.8 - strip-indent: 4.0.0 - transitivePeerDependencies: - - supports-color - react-dom@18.2.0(react@18.2.0): dependencies: loose-envify: 1.4.0 react: 18.2.0 scheduler: 0.23.0 - react-element-to-jsx-string@15.0.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): - dependencies: - '@base2/pretty-print-object': 1.0.1 - is-plain-object: 5.0.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-is: 18.1.0 - - react-is@16.13.1: {} - react-is@17.0.2: {} - react-is@18.1.0: {} - react-is@18.2.0: {} react@18.2.0: @@ -8354,23 +7394,6 @@ snapshots: dependencies: jsesc: 0.5.0 - rehype-external-links@3.0.0: - dependencies: - '@types/hast': 3.0.4 - '@ungap/structured-clone': 1.2.0 - hast-util-is-element: 3.0.0 - is-absolute-url: 4.0.1 - space-separated-tokens: 2.0.2 - unist-util-visit: 5.0.0 - - rehype-slug@6.0.0: - dependencies: - '@types/hast': 3.0.4 - github-slugger: 2.0.0 - hast-util-heading-rank: 3.0.0 - hast-util-to-string: 3.0.0 - unist-util-visit: 5.0.0 - require-from-string@2.0.2: {} requires-port@1.0.0: {} @@ -8561,8 +7584,6 @@ snapshots: dependencies: whatwg-url: 7.1.0 - space-separated-tokens@2.0.2: {} - spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 @@ -8635,8 +7656,6 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-bom@3.0.0: {} - strip-final-newline@2.0.0: {} strip-final-newline@3.0.0: {} @@ -8645,10 +7664,6 @@ snapshots: dependencies: min-indent: 1.0.1 - strip-indent@4.0.0: - dependencies: - min-indent: 1.0.1 - strip-json-comments@3.1.1: {} strip-literal@2.0.0: @@ -8746,8 +7761,6 @@ snapshots: dependencies: is-number: 7.0.0 - tocbot@4.25.0: {} - toidentifier@1.0.1: {} tough-cookie@4.1.3: @@ -8778,12 +7791,6 @@ snapshots: '@ts-morph/common': 0.23.0 code-block-writer: 13.0.1 - tsconfig-paths@4.2.0: - dependencies: - json5: 2.2.3 - minimist: 1.2.8 - strip-bom: 3.0.0 - tslib@1.14.1: {} tslib@2.6.2: {} @@ -8858,34 +7865,12 @@ snapshots: dependencies: crypto-random-string: 2.0.0 - unist-util-is@6.0.0: - dependencies: - '@types/unist': 3.0.2 - - unist-util-visit-parents@6.0.1: - dependencies: - '@types/unist': 3.0.2 - unist-util-is: 6.0.0 - - unist-util-visit@5.0.0: - dependencies: - '@types/unist': 3.0.2 - unist-util-is: 6.0.0 - unist-util-visit-parents: 6.0.1 - universalify@0.2.0: {} universalify@2.0.1: {} unpipe@1.0.0: {} - unplugin@1.10.1: - dependencies: - acorn: 8.11.3 - chokidar: 3.6.0 - webpack-sources: 3.2.3 - webpack-virtual-modules: 0.6.1 - untildify@4.0.0: {} update-browserslist-db@1.0.13(browserslist@4.23.0): @@ -8915,8 +7900,6 @@ snapshots: utils-merge@1.0.1: {} - uuid@9.0.1: {} - validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 @@ -9003,10 +7986,6 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-sources@3.2.3: {} - - webpack-virtual-modules@0.6.1: {} - whatwg-encoding@3.1.1: dependencies: iconv-lite: 0.6.3 diff --git a/zui/src/ui/defaults.test.ts b/zui/src/ui/defaults.test.ts new file mode 100644 index 00000000..946825a3 --- /dev/null +++ b/zui/src/ui/defaults.test.ts @@ -0,0 +1,265 @@ +import { describe } from 'vitest' +import z from '../z' +import { getDefaultValues } from './hooks/useFormData' + +// an overly complicated schema, containing discriminated union, defaults, optional values, nullable values, and arrays, maps and objects + +describe('defaults', () => { + it('should populate undefined correctly', () => { + const optionalSchema = z.object({ + astring: z.string().optional(), + astringnonoptional: z.string(), + anumber: z.number().optional(), + anumbernonoptional: z.number(), + abool: z.boolean().optional(), + aboolnonoptional: z.boolean(), + anArray: z.array(z.string()).optional(), + anArraynonoptional: z.array(z.string()), + anObject: z + .object({ + astring: z.string().optional(), + }) + .optional(), + anObjectnonoptional: z.object({ + astring: z.string(), + }), + }) + expect(getDefaultValues(optionalSchema.toJsonSchema())).toMatchObject({ + astring: undefined, + astringnonoptional: '', + anumber: undefined, + anumbernonoptional: 0, + abool: undefined, + aboolnonoptional: false, + anArray: undefined, + anArraynonoptional: [], + anObject: undefined, + anObjectnonoptional: { astring: '' }, + }) + }) + + it('should populate defaults correctly', () => { + const aDefaultsSchema = z.object({ + astring: z.string().default('a'), + anumber: z.number().default(1), + abool: z.boolean().default(true), + anArray: z.array(z.string()).default(['a']), + anObject: z.object({ + astring: z.string().default('a'), + }), + }) + + expect(getDefaultValues(aDefaultsSchema.toJsonSchema())).toMatchObject({ + astring: 'a', + anumber: 1, + abool: true, + anArray: ['a'], + anObject: { astring: 'a' }, + }) + }) + + it('should populate nullable correctly', () => { + const nullableSchema = z.object({ + astring: z.string().nullable(), + anumber: z.number().nullable(), + abool: z.boolean().nullable(), + anArray: z.array(z.string()).nullable(), + anObject: z.object({ + astring: z.string().nullable(), + }), + }) + + expect(getDefaultValues(nullableSchema.toJsonSchema())).toMatchObject({ + astring: null, + anumber: null, + abool: null, + anArray: null, + anObject: { + astring: null, + }, + }) + }) + it('should resolve the defaults of a complex object definition', () => { + const complex = z.object({ + astring: z.string(), + astringdefault: z.string().default('a'), + astringoptional: z.string().optional(), + astringnullable: z.string().nullable(), + astringdefaultoptional: z.string().default('a').optional(), + astringdefaultnullable: z.string().default('a').nullable(), + + abool: z.boolean(), + abooldefault: z.boolean().default(true), + abooloptional: z.boolean().optional(), + aboolnullable: z.boolean().nullable(), + abooldefaultoptional: z.boolean().default(true).optional(), + abooldefaultnullable: z.boolean().default(true).nullable(), + + aNumber: z.number(), + aNumberdefault: z.number().default(1), + aNumberoptional: z.number().optional(), + aNumbernullable: z.number().nullable(), + aNumberdefaultoptional: z.number().default(1).optional(), + aNumberdefaultnullable: z.number().default(1).nullable(), + + anArray: z.array(z.string()), + anArraydefault: z.array(z.string()).default(['a']), + anArrayoptional: z.array(z.string()).optional(), + anArraynullable: z.array(z.string()).nullable(), + anArraydefaultoptional: z.array(z.string()).default(['a']).optional(), + anArraydefaultnullable: z.array(z.string()).default(['a']).nullable(), + + anObject: z.object({ + astring: z.string(), + }), + anObjectdefault: z + .object({ + astring: z.string().default('a'), + }) + .default({ astring: 'a' }), + anObjectoptional: z + .object({ + astring: z.string(), + }) + .optional(), + anObjectnullable: z + .object({ + astring: z.string(), + }) + .nullable(), + anObjectdefaultoptional: z + .object({ + astring: z.string().default('a'), + }) + .default({ astring: 'a' }) + .optional(), + anObjectdefaultnullable: z + .object({ + astring: z.string().default('a'), + }) + .default({ astring: 'a' }) + .nullable(), + + aDiscriminatedUnion: z.discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]), + + aDiscriminatedUnionoptional: z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]) + .optional(), + + aDiscriminatedUnionnullable: z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]) + .nullable(), + + aDiscriminatedUniondefault: z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]) + .default({ type: 'astring', value: 'a' }), + + aDiscriminatedUniondefaultoptional: z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]) + .default({ type: 'astring', value: 'a' }) + .optional(), + + aDiscriminatedUniondefaultnullable: z + .discriminatedUnion('type', [ + z.object({ + type: z.literal('astring'), + value: z.string().default('a'), + }), + z.object({ + type: z.literal('anumber'), + value: z.number().default(1), + }), + ]) + .default({ type: 'astring', value: 'a' }) + .nullable(), + }) + + expect(getDefaultValues(complex.toJsonSchema())).toMatchObject({ + astring: '', + astringdefault: 'a', + astringoptional: undefined, + astringnullable: null, + astringdefaultoptional: 'a', + astringdefaultnullable: 'a', + + abool: false, + abooldefault: true, + abooloptional: undefined, + aboolnullable: null, + abooldefaultoptional: true, + abooldefaultnullable: true, + + aNumber: 0, + aNumberdefault: 1, + aNumberoptional: undefined, + aNumbernullable: null, + aNumberdefaultoptional: 1, + aNumberdefaultnullable: 1, + + anArray: [], + anArraydefault: ['a'], + anArrayoptional: undefined, + anArraynullable: null, + anArraydefaultoptional: ['a'], + anArraydefaultnullable: ['a'], + + anObject: { astring: '' }, + anObjectdefault: { astring: 'a' }, + anObjectoptional: undefined, + anObjectnullable: null, + anObjectdefaultoptional: { astring: 'a' }, + + aDiscriminatedUnion: { type: 'astring', value: 'a' }, + aDiscriminatedUnionoptional: undefined, + aDiscriminatedUnionnullable: null, + aDiscriminatedUniondefault: { type: 'astring', value: 'a' }, + aDiscriminatedUniondefaultoptional: { type: 'astring', value: 'a' }, + aDiscriminatedUniondefaultnullable: { type: 'astring', value: 'a' }, + }) + }) +}) diff --git a/zui/src/ui/hooks/useFormData.tsx b/zui/src/ui/hooks/useFormData.tsx index 1f5673b4..24959dd3 100644 --- a/zui/src/ui/hooks/useFormData.tsx +++ b/zui/src/ui/hooks/useFormData.tsx @@ -74,12 +74,6 @@ export const useFormData = (fieldSchema: JSONSchema, path: string[]) => { const data = useMemo(() => getPathData(context.formData, path), [context.formData, path]) - useEffect(() => { - if (data === null || typeof data === 'undefined') { - context.setFormData(setObjectPath(context.formData, path, getDefaultItemData(fieldSchema))) - } - }, [fieldSchema]) - const validation = useMemo(() => { if (context.disableValidation) { return { formValid: null, formErrors: null } @@ -127,7 +121,13 @@ export const useFormData = (fieldSchema: JSONSchema, path: string[]) => { const addArrayItem = useCallback( (path: string[], data: any) => { const currentData = getPathData(context.formData, path) || [] - context.setFormData(setObjectPath(context.formData, path, [...currentData, data])) + context.setFormData( + setObjectPath( + context.formData, + path, + Array.isArray(currentData) ? [...currentData, data] : [...currentData, data], + ), + ) }, [context.formData], ) @@ -164,31 +164,67 @@ export function setObjectPath(obj: any, path: string[], data: any): any { return { ...obj } } -export const getDefaultItemData = (schema: JSONSchema | JSONSchema[]): any | null => { +export const getDefaultValues = (schema: JSONSchema | JSONSchema[], optional?: boolean): any => { if (Array.isArray(schema)) { - return schema.map((s) => getDefaultItemData(s)) + return getDefaultValues(schema[0]!) + } + + if (schema.default) { + return schema.default + } + + if (schema.nullable) { + return null + } + + if (optional) { + return undefined + } + + if (schema.anyOf?.length) { + return getDefaultValues(schema.anyOf[0]!) } + if (schema.type === 'object') { - return schema.default || {} + if (schema.properties) { + const data: Record = {} + Object.entries(schema.properties).map(([key, fieldSchema]) => { + data[key] = getDefaultValues(fieldSchema, !schema.required?.includes(key) || isOptional(fieldSchema) || false) + }) + return data + } } + if (schema.type === 'array') { - return schema.default || [] + if (schema.minItems && schema.minItems > 0) { + return [getDefaultValues(schema.items)] + } + + return [] } + if (schema.type === 'string') { - return schema.default || '' + if (schema.enum?.length) { + return schema.enum[0] + } + return '' } + if (schema.type === 'number') { - return typeof schema.default === 'number' ? schema.default : 0 - } - if (schema.type === 'boolean') { - return typeof schema.default === 'boolean' ? schema.default : false + if (schema.enum?.length) { + return schema.enum[0] + } + return 0 } - if (schema.default) { - return schema.default + if (schema.type === 'boolean') { + if (schema.enum?.length) { + return schema.enum[0] + } + return false } - return null + return undefined } export const FormDataProvider: React.FC> = ({ @@ -224,3 +260,29 @@ export function getPathData(object: any, path: string[]): any { return prev ? prev[curr] : null }, object) } + +export function isOptional(schema: JSONSchema): boolean { + return schema.anyOf?.some((s) => s.not && Object.keys(s.not).length === 0) || false +} + +type AnyObject = { [key: string]: any } + +export function deepMerge(target: AnyObject, source: AnyObject): AnyObject { + const output = { ...target } + + for (const key in source) { + if (source.hasOwnProperty(key)) { + if (typeof source[key] === 'object' && source[key] !== null && !Array.isArray(source[key])) { + if (typeof output[key] === 'object' && output[key] !== null && !Array.isArray(output[key])) { + output[key] = deepMerge(output[key], source[key]) + } else { + output[key] = deepMerge({}, source[key]) + } + } else { + output[key] = source[key] + } + } + } + + return output +} diff --git a/zui/src/ui/index.tsx b/zui/src/ui/index.tsx index 47308a5c..1008f1da 100644 --- a/zui/src/ui/index.tsx +++ b/zui/src/ui/index.tsx @@ -15,7 +15,7 @@ import { } from './types' import { zuiKey } from './constants' import React, { type FC, useMemo } from 'react' -import { FormDataProvider, getDefaultItemData, useFormData } from './hooks/useFormData' +import { FormDataProvider, deepMerge, getDefaultValues, useFormData } from './hooks/useFormData' import { getPathData } from './hooks/useFormData' import { formatTitle } from './titleutils' import { BoundaryFallbackComponent, ErrorBoundary } from './ErrorBoundary' @@ -98,9 +98,13 @@ export const ZuiForm = ): JSX.Element | null => { + const actualData = useMemo(() => { + return deepMerge(getDefaultValues(schema), value) + }, [value, schema]) + return ( = ({ schema, data: dataArray, addItem: (data = undefined) => - addArrayItem(path, typeof data === 'undefined' ? getDefaultItemData(schema.items) : data), + addArrayItem(path, typeof data === 'undefined' ? getDefaultValues(schema.items) : data), removeItem: (index) => removeArrayItem(path, index), ...childProps, } diff --git a/zui/src/ui/stories/ZuiForm.stories.tsx b/zui/src/ui/stories/ZuiForm.stories.tsx deleted file mode 100644 index 96cbb6c6..00000000 --- a/zui/src/ui/stories/ZuiForm.stories.tsx +++ /dev/null @@ -1,333 +0,0 @@ -import React, { FC, useState } from 'react' -import type { Meta, StoryObj } from '@storybook/react' -import { DeepPartial, FormError, UIComponentDefinitions, ZuiComponentMap } from '../types' -import { z } from '../../z/index' -import { ZuiForm } from '..' -import { BoundaryFallbackComponent } from '../ErrorBoundary' - -const exampleExtensions = { - string: { - debug: { - id: 'debug', - params: z.object({}), - }, - }, - number: { - debug: { - id: 'debug', - params: z.object({}), - }, - }, - boolean: { - debug: { - id: 'debug', - params: z.object({}), - }, - }, - array: { - debug: { - id: 'debug', - params: z.object({}), - }, - }, - object: { - debug: { - id: 'debug', - params: z.object({}), - }, - }, - discriminatedUnion: {}, -} as const satisfies UIComponentDefinitions - -const exampleSchema = z - .object({ - root: z - .string() - .title('Root') - .default('root') - .placeholder('Root') - .disabled((s) => s?.includes('9') || false), - firstName: z.string().title('first name').placeholder('Enter your name').nullable(), - lastName: z.string().min(3).title('Last Name <3').optional().nullable(), - dates: z - .array( - z.object({ - date: z.string(), - time: z.string(), - ids: z.array(z.number().default(-1)).min(2), - }), - ) - .min(1) - .nonempty() - .default([{ date: '2021-01-01', time: '12:00', ids: [1, 2] }]), - aTuple: z.tuple([z.string(), z.number(), z.object({ pointsScored: z.number() })]), - // tests the hidden function - aRandomField: z.string().optional().hidden(), - aDiscriminatedUnion: z - .discriminatedUnion('type', [ - z.object({ type: z.literal('text'), text: z.string().placeholder('Some text') }), - z.object({ type: z.literal('number'), b: z.number().placeholder('42').default(5) }), - z.object({ - type: z.literal('complex'), - address: z - .object({ - street: z.string().placeholder('1234 Main St'), - city: z.string().placeholder('San Francisco'), - state: z.string().placeholder('CA'), - zip: z.string().placeholder('94111'), - }) - .disabled((obj) => !obj?.street && { city: false }), - root: z.string().placeholder('root'), - babies: z.array(z.object({ name: z.string(), age: z.number() })), - }), - ]) - .default({ - type: 'complex', - address: { street: '1234 Main St', city: 'San Francisco', state: 'CA', zip: '94111' }, - babies: [], - root: 'root', - }), - stuff: z - .object({ - birthday: z.string(), - plan: z.enum(['basic', 'premium']), - age: z.number(), - email: z.string().email().title('Email Address'), - password: z.string(), - passwordConfirm: z.string(), - }) - .default({ - password: 'this is a password', - passwordConfirm: 'this is a password', - age: 42, - plan: 'premium', - email: '', - birthday: '2021-01-01', - }), - debug: z.number().optional().displayAs({ id: 'debug', params: {} }), - }) - .title('User Information') - .disabled((s) => { - return { firstName: s?.root?.includes('6') || false } - }) - .hidden((v) => ({ - aDiscriminatedUnion: v?.root === 'hidden', - })) - -const ErrorBox: FC<{ errors: FormError[]; data: any | null }> = ({ errors, data }) => - errors && - data !== null && ( - - {errors.map((e) => ( -

{e.message}

- ))} -
- ) - -const componentMap: ZuiComponentMap = { - string: { - debug: ({ context, schema }) => { - return ( -
- {schema.enum?.length &&

String enum values: {schema.enum.join(', ')}

} -
{JSON.stringify(context.formData, null, 2)}
- {context.formValid === null &&

Form validation disabled

} - {context.formValid === true &&

Form is valid

} - {context.formValid === false && ( -
-

Form is invalid with {context.formErrors?.length} errors:

-
    - {context.formErrors?.map((e) => ( -
  • - {e.path.join('.')} - {e.message} -
  • - ))} -
-
- )} -
- ) - }, - default: ({ onChange, errors, required, disabled, label, data, zuiProps, schema }) => { - if (schema.enum?.length) { - return ( -
- {label} - - {required && *} - -
- ) - } - return ( -
- {label} - onChange(e.target.value)} - value={data || ''} - /> - {required && *} - -
- ) - }, - }, - number: { - debug: () => null, - default: ({ data, zuiProps, onChange, label, required, errors, schema }) => { - if (schema.enum?.length) { - return ( -
- {label} - - {required && *} - -
- ) - } - return ( -
- {label} - onChange(parseFloat(e.target.value))} - value={data || 0} - defaultValue={schema.default || 0} - /> - {required && *} - -
- ) - }, - }, - boolean: { - debug: () => null, - default: ({ data, disabled: enabled, label, errors, onChange }) => { - return ( -
- - -
- ) - }, - }, - array: { - debug: () => null, - default: ({ children, scope, context, addItem, errors }) => ( - <> - -

{scope}

- {children} - - - ), - }, - object: { - debug: () => null, - default: ({ children, errors, data, ...rest }) => { - return ( -
-
{children}
- {rest.isArrayChild === true && } - {!!errors?.length && } -
- ) - }, - }, - discriminatedUnion: { - default: ({ children, discriminatorKey, discriminatorOptions, discriminatorValue, setDiscriminator }) => { - const [hidden, setHidden] = useState(false) - if (hidden) { - return - } - - return ( -
- - {discriminatorKey} - - {children} -
- ) - }, - }, -} -const Fallback: BoundaryFallbackComponent = ({ error, schema }) => { - return ( -
-

Something went wrong rendering {schema?.type}

-

{error.message}

-
- ) -} -const ZuiFormExample = () => { - const [formData, setFormData] = useState>>({ - firstName: 'John', - lastName: 'Doe', - stuff: { - password: 'password', - passwordConfirm: 'password', - }, - }) - - return ( - <> -
{JSON.stringify(formData, null, 2)}
- - schema={exampleSchema.toJsonSchema({ target: 'openApi3' })} - value={formData} - onChange={setFormData} - components={componentMap} - fallback={Fallback} - disableValidation={false} - /> - - ) -} - -const meta = { - title: 'Form/Example', - component: ZuiFormExample, - // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout - layout: 'fullscreen', - }, -} satisfies Meta - -type Story = StoryObj - -export const ExampleSchema: Story = { - args: {}, -} - -export default meta diff --git a/zui/src/ui/types.ts b/zui/src/ui/types.ts index d75cba2e..c24ee8a4 100644 --- a/zui/src/ui/types.ts +++ b/zui/src/ui/types.ts @@ -18,6 +18,8 @@ export type BaseSchema = { anyOf?: JSONSchema[] oneOf?: JSONSchema[] allOf?: JSONSchema[] + not?: JSONSchema + nullable?: boolean [zuiKey]?: ZuiExtensionObject } diff --git a/zui/src/ui/ui.test.tsx b/zui/src/ui/ui.test.tsx index 349250f6..2add019f 100644 --- a/zui/src/ui/ui.test.tsx +++ b/zui/src/ui/ui.test.tsx @@ -44,7 +44,7 @@ describe('UI', () => { lastName: zui.string(), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( schema={jsonSchema} @@ -72,7 +72,7 @@ describe('UI', () => { }), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( schema={jsonSchema} @@ -101,7 +101,7 @@ describe('UI', () => { }), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const components = { ...testComponentImplementation, number: { @@ -152,7 +152,7 @@ describe('UI', () => { ), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( schema={jsonSchema} @@ -173,7 +173,7 @@ describe('UI', () => { favoriteColors: zui.array(zui.string()), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const addBtn = rendered.getByTestId('array:favoriteColors:addbtn') @@ -201,7 +201,7 @@ describe('UI', () => { vector: zui.array(zui.number()), }) - const jsonSchema = aDeeplyNestedSchema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = aDeeplyNestedSchema.toJsonSchema() as ObjectSchema const rendered = render() const addButton = rendered.getByTestId('array:vector:addbtn') @@ -223,7 +223,7 @@ describe('UI', () => { favoriteColors: zui.array(zui.string()), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const addBtn = rendered.getByTestId('array:favoriteColors:addbtn') @@ -240,7 +240,7 @@ describe('UI', () => { favoriteColors: zui.array(zui.string()), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const addBtn = rendered.getByTestId('array:favoriteColors:addbtn') @@ -264,7 +264,7 @@ describe('UI', () => { ), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const addBtn = rendered.getByTestId('array:favoriteColors:addbtn') @@ -286,7 +286,7 @@ describe('UI', () => { favoriteColors: zui.array(zui.string()), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const addBtn = rendered.getByTestId('array:favoriteColors:addbtn') @@ -323,7 +323,7 @@ describe('UI', () => { ), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( @@ -350,7 +350,7 @@ describe('UI', () => { .displayAs({ id: 'customstringcomponent', params: { multiline: true } }), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( @@ -380,7 +380,7 @@ describe('UI', () => { lastName: zui.string().title('Last Name'), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( @@ -408,7 +408,7 @@ describe('UI', () => { age: zui.number().nullable(), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( @@ -438,7 +438,7 @@ describe('UI', () => { }) .displayAs({ id: 'collapsible', params: { collapsed: false } }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render( @@ -503,7 +503,7 @@ describe('UI', () => { value: zui.number().disabled((n) => n === 5), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() const numberInput = rendered.getByTestId('number:value:input') as HTMLInputElement @@ -535,7 +535,7 @@ describe('UI', () => { }, })) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() @@ -560,7 +560,7 @@ describe('UI', () => { value: zui.number().hidden((n) => n === 5), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() @@ -598,7 +598,7 @@ describe('UI', () => { .default({ type: 'credit', cardNumber: '1234' }), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const rendered = render() @@ -620,7 +620,7 @@ describe('UI', () => { age: zui.number().default(20), }) - const jsonSchema = schema.toJsonSchema({ target: 'openApi3' }) as ObjectSchema + const jsonSchema = schema.toJsonSchema() as ObjectSchema const mock = vi.fn() const rendered = render( @@ -636,8 +636,6 @@ describe('UI', () => { expect(nameInput.value).toBe('Jane') expect(ageInput.value).toBe('20') - - expect(mock).toHaveBeenCalledWith({ name: 'Jane', age: 20 }) }) }) diff --git a/zui/src/z/types/index.ts b/zui/src/z/types/index.ts index 420c56a5..77950b99 100644 --- a/zui/src/z/types/index.ts +++ b/zui/src/z/types/index.ts @@ -25,7 +25,6 @@ export * from './default' export * from './discriminatedUnion' export * from './enum' export * from './error' -export * from './error' export * from './function' export * from './index' export * from './intersection' diff --git a/zui/tsconfig.json b/zui/tsconfig.json index eec26374..3e04d8b9 100644 --- a/zui/tsconfig.json +++ b/zui/tsconfig.json @@ -10,27 +10,15 @@ "noUnusedParameters": true, "noUncheckedIndexedAccess": true, "allowSyntheticDefaultImports": true, - "lib": [ - "dom", - "ESNext", - "dom.iterable", - ], + "lib": ["dom", "ESNext", "dom.iterable"], "allowJs": false, "declaration": false, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "noEmit": false, "resolveJsonModule": true, - "isolatedModules": true, + "isolatedModules": true }, - "exclude": [ - "node_modules", - "dist", - "*.test.ts", - "**/benchmark/**/*.ts", - ], - "include": [ - "src/**/*", - "vitest.d.ts" - ] -} \ No newline at end of file + "exclude": ["node_modules", "dist", "*.test.ts", "**/benchmark/**/*.ts"], + "include": ["src/**/*", "vitest.d.ts"] +}