Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { paramCase } from 'param-case';
import { camelCase } from 'change-case';
import { colorThemeVars, contrastSchemeVars, genericVars } from '#vars';

function isPlainObject(obj: unknown): obj is Record<string, unknown> {
Expand Down Expand Up @@ -27,7 +27,7 @@ function extractCustomPropertyNames(
}

function writeScss([v, ident]: [string, string]) {
process.stdout.write(`$${paramCase(v)}: ${ident};`);
process.stdout.write(`$${camelCase(v)}: ${ident};`);
process.stdout.write('\n');
}

Expand Down
2 changes: 1 addition & 1 deletion bundlesize.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
files: [
{
path: 'build/*.js',
maxSize: '45 kB',
maxSize: '46 kB',
compression: 'brotli',
},
{
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
21 changes: 12 additions & 9 deletions lib/hooks/use-trace-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ export function useTraceUpdate<
>(props: T, callback?: (changedProps: C) => void): void {
const prev = useRef<T>(props);
useEffect(() => {
const changedProps = Object.entries(props).reduce<C>((ps: C, [k, v]) => {
if (prev.current[k] !== v) {
return {
...ps,
[k]: [prev.current[k], v],
};
}
return ps;
}, {} as unknown as C);
const changedProps = Object.entries(props).reduce<C>(
(ps: C, [k, v]) => {
if (prev.current[k] !== v) {
return {
...ps,
[k]: [prev.current[k], v],
};
}
return ps;
},
{} as unknown as C,
);

if (Object.keys(changedProps).length > 0) {
if (callback) {
Expand Down
3 changes: 2 additions & 1 deletion lib/react-html-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import type {
} from 'react';

// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/naming-convention
export type DetailedHTMLFactory<TAttributes, _TElement> = TAttributes;
type DetailedHTMLFactory<TAttributes, _TElement> = TAttributes;

export interface ReactHTMLAttributesHacked {
a: DetailedHTMLFactory<
Expand Down Expand Up @@ -260,6 +260,7 @@ export interface ReactHTMLAttributesHacked {
ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
search: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
slot: DetailedHTMLFactory<
SlotHTMLAttributes<HTMLSlotElement>,
HTMLSlotElement
Expand Down
3 changes: 2 additions & 1 deletion lib/react-html-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import type {
} from 'react';

// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/naming-convention
export type DetailedHTMLFactory<_TAttributes, TElement> = TElement;
type DetailedHTMLFactory<_TAttributes, TElement> = TElement;

export interface ReactHTMLElementsHacked {
a: DetailedHTMLFactory<
Expand Down Expand Up @@ -260,6 +260,7 @@ export interface ReactHTMLElementsHacked {
ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
search: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
slot: DetailedHTMLFactory<
SlotHTMLAttributes<HTMLSlotElement>,
HTMLSlotElement
Expand Down
72 changes: 37 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,62 +47,64 @@
"preversion": "make test"
},
"dependencies": {
"@floating-ui/dom": "^1.4.3",
"@floating-ui/react": "^0.24.3",
"@floating-ui/react-dom": "^2.0.1",
"clsx": "^1.2.1",
"@floating-ui/dom": "^1.5.3",
"@floating-ui/react": "^0.26.1",
"@floating-ui/react-dom": "^2.0.2",
"clsx": "^2.0.0",
"js-cookie": "^3.0.5"
},
"devDependencies": {
"@block65/bundlesize": "^1.0.1",
"@block65/eslint-config": "^9.2.0",
"@block65/eslint-config": "^11.0.0",
"@block65/mrr": "^5.2.0",
"@capsizecss/metrics": "^1.2.0",
"@capsizecss/vanilla-extract": "^1.0.0",
"@commitlint/config-conventional": "^17.6.6",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@commitlint/config-conventional": "^18.1.0",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/js-cookie": "^3.0.3",
"@types/node": "^20.3.3",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@vanilla-extract/css": "^1.12.0",
"@testing-library/user-event": "^14.5.1",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20.8.10",
"@types/react": "^18.2.36",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vanilla-extract/css": "^1.13.0",
"@vanilla-extract/css-utils": "^0.1.3",
"@vanilla-extract/dynamic": "^2.0.3",
"@vanilla-extract/sprinkles": "^1.6.1",
"@vanilla-extract/vite-plugin": "^3.8.2",
"@vitejs/plugin-react": "^4.0.1",
"conventional-changelog-cli": "^3.0.0",
"eslint": "^8.44.0",
"eslint-plugin-formatjs": "^4.10.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"@vanilla-extract/vite-plugin": "^3.9.0",
"@vitejs/plugin-react": "^4.1.1",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.53.0",
"eslint-plugin-formatjs": "^4.11.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.1",
"eslint-plugin-react-refresh": "^0.4.4",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"lorem-ipsum": "^2.0.8",
"param-case": "^3.0.4",
"prettier": "^2.8.8",
"change-case": "^5.1.2",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intl": "^6.4.4",
"the-new-css-reset": "^1.9.0",
"react-intl": "^6.5.2",
"the-new-css-reset": "^1.11.1",
"ts-node": "^10.9.1",
"type-fest": "^3.12.0",
"typescript": "^5.1.6",
"vite": "^4.3.9",
"vitest": "^0.32.2"
"type-fest": "^4.6.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.6"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"@types/react": "^18.2.36",
"@types/react-dom": "^18.2.14"
},
"engines": {
"node": ">=16.0.0"
Expand Down
Loading