refactor: clean up client workflow and update package dependencies

This commit is contained in:
Marco Beretta 2025-07-19 03:29:56 +02:00
parent a65e33758d
commit f1204531a8
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
9 changed files with 141 additions and 117 deletions

View file

@ -23,12 +23,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install data-provider dependencies
run: cd packages/data-provider && npm ci
- name: Build data-provider
run: cd packages/data-provider && npm run build
- name: Install client dependencies
run: cd packages/client && npm ci

131
package-lock.json generated
View file

@ -41,7 +41,7 @@
"lint-staged": "^15.4.3",
"prettier": "^3.5.0",
"prettier-eslint": "^16.3.0",
"prettier-plugin-tailwindcss": "^0.6.14",
"prettier-plugin-tailwindcss": "^0.6.11",
"typescript-eslint": "^8.24.0"
}
},
@ -31457,15 +31457,10 @@
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
@ -31478,6 +31473,9 @@
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
@ -38263,9 +38261,10 @@
}
},
"node_modules/jiti": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"version": "1.21.7",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
"license": "MIT",
"bin": {
"jiti": "bin/jiti.js"
}
@ -38896,6 +38895,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
"integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
"dev": true,
"engines": {
"node": ">=10"
}
@ -41431,15 +41431,16 @@
}
},
"node_modules/nanoid": {
"version": "3.3.8",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"bin": {
"nanoid": "bin/nanoid.cjs"
},
@ -42848,9 +42849,9 @@
}
},
"node_modules/postcss": {
"version": "8.5.3",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
"version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"funding": [
{
"type": "opencollective",
@ -42867,7 +42868,7 @@
],
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.8",
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@ -43668,19 +43669,26 @@
}
},
"node_modules/postcss-nested": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
"integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz",
"integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"dependencies": {
"postcss-selector-parser": "^6.0.11"
"postcss-selector-parser": "^6.1.1"
},
"engines": {
"node": ">=12.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
"peerDependencies": {
"postcss": "^8.2.14"
}
@ -44101,9 +44109,10 @@
}
},
"node_modules/postcss-selector-parser": {
"version": "6.0.15",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz",
"integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
"integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
"license": "MIT",
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
@ -44582,9 +44591,9 @@
}
},
"node_modules/prettier-plugin-tailwindcss": {
"version": "0.6.14",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.14.tgz",
"integrity": "sha512-pi2e/+ZygeIqntN+vC573BcW5Cve8zUB0SSAGxqpB4f96boZF4M3phPVoOFCeypwkpRYdi7+jQ5YJJUwrkGUAg==",
"version": "0.6.11",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.11.tgz",
"integrity": "sha512-YxaYSIvZPAqhrrEpRtonnrXdghZg1irNg4qrjboCXrpybLWVs55cW2N3juhspVJiO0JBvYJT8SYsJpc8OQSnsA==",
"dev": true,
"license": "MIT",
"engines": {
@ -44592,8 +44601,6 @@
},
"peerDependencies": {
"@ianvs/prettier-plugin-sort-imports": "*",
"@prettier/plugin-hermes": "*",
"@prettier/plugin-oxc": "*",
"@prettier/plugin-pug": "*",
"@shopify/prettier-plugin-liquid": "*",
"@trivago/prettier-plugin-sort-imports": "*",
@ -44615,12 +44622,6 @@
"@ianvs/prettier-plugin-sort-imports": {
"optional": true
},
"@prettier/plugin-hermes": {
"optional": true
},
"@prettier/plugin-oxc": {
"optional": true
},
"@prettier/plugin-pug": {
"optional": true
},
@ -48339,32 +48340,33 @@
}
},
"node_modules/tailwindcss": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
"integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",
"version": "3.4.17",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
"license": "MIT",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
"chokidar": "^3.5.3",
"chokidar": "^3.6.0",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
"fast-glob": "^3.3.0",
"fast-glob": "^3.3.2",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
"jiti": "^1.19.1",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"jiti": "^1.21.6",
"lilconfig": "^3.1.3",
"micromatch": "^4.0.8",
"normalize-path": "^3.0.0",
"object-hash": "^3.0.0",
"picocolors": "^1.0.0",
"postcss": "^8.4.23",
"picocolors": "^1.1.1",
"postcss": "^8.4.47",
"postcss-import": "^15.1.0",
"postcss-js": "^4.0.1",
"postcss-load-config": "^4.0.1",
"postcss-nested": "^6.0.1",
"postcss-selector-parser": "^6.0.11",
"resolve": "^1.22.2",
"sucrase": "^3.32.0"
"postcss-load-config": "^4.0.2",
"postcss-nested": "^6.2.0",
"postcss-selector-parser": "^6.1.2",
"resolve": "^1.22.8",
"sucrase": "^3.35.0"
},
"bin": {
"tailwind": "lib/cli.js",
@ -48387,6 +48389,18 @@
"resolved": "https://registry.npmjs.org/tailwindcss-radix/-/tailwindcss-radix-2.8.0.tgz",
"integrity": "sha512-1k1UfoIYgVyBl13FKwwoKavjnJ5VEaUClCTAsgz3VLquN4ay/lyaMPzkbqD71sACDs2fRGImytAUlMb4TzOt1A=="
},
"node_modules/tailwindcss/node_modules/lilconfig": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
"integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
"license": "MIT",
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/antonk52"
}
},
"node_modules/tailwindcss/node_modules/object-hash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
@ -51523,6 +51537,8 @@
"i18next-browser-languagedetector": "^8.0.4",
"jotai": "^2.12.5",
"postcss": "^8.4.31",
"postcss-import": "^15.1.0",
"postcss-preset-env": "^8.5.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "^7.56.4",
@ -51536,6 +51552,7 @@
"rollup-plugin-typescript2": "^0.35.0",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.5",
"tailwindcss-radix": "^2.8.0",
"typescript": "^5.0.0"
},
"peerDependencies": {

View file

@ -112,7 +112,7 @@
"lint-staged": "^15.4.3",
"prettier": "^3.5.0",
"prettier-eslint": "^16.3.0",
"prettier-plugin-tailwindcss": "^0.6.14",
"prettier-plugin-tailwindcss": "^0.6.11",
"typescript-eslint": "^8.24.0"
},
"overrides": {

View file

@ -22,11 +22,6 @@
"dev": "rollup -c -w --bundleConfigAsCjs"
},
"peerDependencies": {
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0",
"@tanstack/react-query": "^4.28.0 || ^5.69.0",
"jotai": "^2.12.5",
"react-hook-form": "^7.56.4 || ^7.60.0",
"@ariakit/react": "^0.4.15 || ^0.4.16",
"@ariakit/react-core": "^0.4.17",
"@headlessui/react": "^2.1.2",
@ -50,11 +45,16 @@
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.2.7",
"@react-spring/web": "^9.7.5",
"@tanstack/react-query": "^4.28.0 || ^5.69.0",
"@tanstack/react-table": "^8.11.7",
"@tanstack/react-virtual": "^3.0.0",
"framer-motion": "^11.5.4",
"i18next": "^24.2.2 || ^24.2.3",
"i18next-browser-languagedetector": "^8.0.3 || ^8.0.4",
"jotai": "^2.12.5",
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0",
"react-hook-form": "^7.56.4 || ^7.60.0",
"react-i18next": "^15.4.0 || ^15.4.1",
"react-resizable-panels": "^3.0.2",
"react-textarea-autosize": "^8.4.0"
@ -92,25 +92,32 @@
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.2.7",
"@react-spring/web": "^9.7.5",
"@tanstack/react-table": "^8.11.7",
"@tanstack/react-virtual": "^3.0.0",
"framer-motion": "^11.5.4",
"i18next": "^24.2.3",
"i18next-browser-languagedetector": "^8.0.4",
"react-i18next": "^15.4.1",
"react-resizable-panels": "^3.0.2",
"react-textarea-autosize": "^8.4.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-query": "^5.69.0",
"@tanstack/react-table": "^8.11.7",
"@tanstack/react-virtual": "^3.0.0",
"@testing-library/react": "^16.3.0",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"autoprefixer": "^10.4.20",
"framer-motion": "^11.5.4",
"i18next": "^24.2.3",
"i18next-browser-languagedetector": "^8.0.4",
"jotai": "^2.12.5",
"postcss": "^8.4.31",
"postcss-import": "^15.1.0",
"postcss-preset-env": "^8.5.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "^7.56.4",
"react-i18next": "^15.4.1",
"react-resizable-panels": "^3.0.2",
"react-textarea-autosize": "^8.4.0",
"rimraf": "^5.0.1",
"rollup": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
@ -118,11 +125,7 @@
"rollup-plugin-typescript2": "^0.35.0",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.5",
"typescript": "^5.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@tanstack/react-query": "^5.69.0",
"jotai": "^2.12.5",
"react-hook-form": "^7.56.4"
"tailwindcss-radix": "^2.8.0",
"typescript": "^5.0.0"
}
}

View file

@ -30,23 +30,20 @@ const plugins = [
}),
commonjs(),
postcss({
// Extract CSS to a separate file
extract: false,
// Inject CSS into JS (better for component libraries)
inject: true,
// Minimize CSS in production
minimize: process.env.NODE_ENV === 'production',
// Enable CSS modules if needed
modules: false,
}),
typescript({
tsconfig: './tsconfig.json',
useTsconfigDeclarationDir: true,
clean: true,
check: false,
}),
terser({
compress: {
directives: false, // Preserve directives like 'use client'
directives: false,
},
}),
];

View file

@ -1,13 +1,13 @@
import * as Ariakit from '@ariakit/react';
import { ReactNode, forwardRef, useEffect, useRef } from 'react';
import { forwardRef, useEffect, useRef } from 'react';
import type { ElementRef } from 'react';
import { cn } from '~/utils';
import './AnimatedTabs.css';
export interface TabItem {
id?: string;
label: ReactNode;
content: ReactNode;
label: React.ReactNode;
content: React.ReactNode;
disabled?: boolean;
}
@ -23,7 +23,7 @@ export interface AnimatedTabsProps {
}
function usePrevious<T>(value: T) {
const ref = useRef<T>();
const ref = useRef<T | undefined>(undefined);
useEffect(() => {
ref.current = value;
}, [value]);
@ -132,7 +132,8 @@ export function AnimatedTabs({
className={tabClassName}
data-state={tabIds[index] === firstTabId ? 'active' : 'inactive'}
>
{tab.label}
{/* TypeScript workaround for React i18next children type compatibility */}
{tab.label as any}
</Tab>
))}
</Ariakit.TabList>
@ -150,7 +151,8 @@ export function AnimatedTabs({
tabId={tabIds[index]}
className={tabPanelClassName}
>
{tab.content}
{/* TypeScript workaround for React i18next children type compatibility */}
{tab.content as any}
</TabPanel>
))}
</div>

View file

@ -4,15 +4,17 @@ import { cn } from '~/utils';
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & {
className?: string;
}
>(({ className = '', ...props }, ref) => (
<LabelPrimitive.Root
ref={ref}
className={cn(
{...(props as any)}
{...({ className: cn(
'block w-full break-all text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:text-gray-200',
className,
)}
{...props}
) } as any)}
/>
));
Label.displayName = LabelPrimitive.Root.displayName;

View file

@ -5,18 +5,22 @@ import { cn } from '~/utils';
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> & {
className?: string;
}
>(({ className = '', orientation = 'horizontal', decorative = true, ...props }, ref) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
'shrink-0 bg-border-light',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
className,
)}
{...props}
{...(props as any)}
{...({
decorative,
orientation,
className: cn(
'shrink-0 bg-border-light',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
className,
),
} as any)}
/>
));
Separator.displayName = SeparatorPrimitive.Root.displayName;

View file

@ -4,21 +4,26 @@ import { cn } from '~/utils';
const Slider = React.forwardRef<
React.ElementRef<typeof SliderPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> & { onDoubleClick?: () => void }
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> & {
className?: string;
onDoubleClick?: () => void;
}
>(({ className, onDoubleClick, ...props }, ref) => (
<SliderPrimitive.Root
ref={ref}
className={cn(
'relative flex w-full cursor-pointer touch-none select-none items-center',
className,
)}
onDoubleClick={onDoubleClick}
{...props}
{...(props as any)}
{...({
className: cn(
'relative flex w-full cursor-pointer touch-none select-none items-center',
className,
),
onDoubleClick,
} as any)}
>
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
<SliderPrimitive.Range className="absolute h-full bg-primary" />
<SliderPrimitive.Track {...({ className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary" } as any)}>
<SliderPrimitive.Range {...({ className: "absolute h-full bg-primary" } as any)} />
</SliderPrimitive.Track>
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
<SliderPrimitive.Thumb {...({ className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" } as any)} />
</SliderPrimitive.Root>
));
Slider.displayName = SliderPrimitive.Root.displayName;