Skip to content

Commit ba44ad0

Browse files
authored
Merge branch 'main' into feat/use-device-pixel-ratio
2 parents 6d560f4 + 65f76ba commit ba44ad0

File tree

100 files changed

+2015
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2015
-601
lines changed

.prettierrc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { prettier } from '@siberiacancode/prettier';
22

33
/** @type {import('prettier').Config} */
4-
export default prettier;
4+
export default { ...prettier, plugins: ['prettier-plugin-tailwindcss'] };

docs/.vitepress/config.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,21 @@ export default async () => {
3434
vite: {
3535
resolve: {
3636
alias: {
37+
'@/docs': fileURLToPath(new URL('../../docs', import.meta.url)),
3738
'@': fileURLToPath(new URL('../../src', import.meta.url))
3839
}
3940
}
4041
},
4142
transformPageData: (pageData) => {
43+
pageData.frontmatter.head ??= []
44+
pageData.frontmatter.head.push([
45+
'meta',
46+
{
47+
name: 'og:image',
48+
content: 'https://repository-images.githubusercontent.com/799880708/be8887a4-0cf5-4929-a5f0-dba8d70a7d1f'
49+
}
50+
])
51+
4252
if (pageData.relativePath === 'index.md') {
4353
pageData.frontmatter.features = homePageFeatures;
4454
}

docs/.vitepress/theme/global.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import 'tailwindcss';
2+
13
:root {
24
--vp-c-bg: #ffffff;
35

docs/functions/hooks/[name].paths.mts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { codeToHtml } from 'shiki'
1+
import { codeToHtml } from 'shiki';
22

33
import { getHookFile, getHooks, matchJsdoc, parseHookJsdoc } from '../../src/utils';
44

@@ -30,7 +30,7 @@ export default {
3030
acc += usage.description;
3131
}
3232
return acc;
33-
}, '')
33+
}, '');
3434

3535
const usage = await codeToHtml(usages, {
3636
lang: 'typescript',
@@ -41,7 +41,6 @@ export default {
4141
defaultColor: false
4242
});
4343

44-
4544
const example = await codeToHtml(`import { ${hook} } from '@siberiacancode/reactuse';`, {
4645
lang: 'typescript',
4746
themes: {
@@ -66,15 +65,19 @@ export default {
6665
})
6766
);
6867

69-
// const features = params
70-
// .filter(Boolean)
71-
// .map((param) => {
72-
// return `\n- title: ${param?.params.name}\n details: ${param?.params.description}\n link: /functions/hooks/${param?.params.name}`;
73-
// })
74-
// .join(' ');
75-
// console.log('@', features);
68+
const pages = params.filter(Boolean);
69+
70+
console.log('\nHooks injection report\n');
71+
console.log('\x1b[32mInjected: ' + pages.length + '\x1b[0m');
72+
console.log('\x1b[33mSkipped: ' + (hooks.length - pages.length) + '\x1b[0m');
73+
console.log('Total: ' + hooks.length);
7674

77-
return params.filter(Boolean);
75+
// console.table([
76+
// { Status: 'Injected', Count: injected },
77+
// { Status: 'Skipped', Count: skipped },
78+
// { Status: 'Total', Count: total }
79+
// ]);
80+
81+
return pages;
7882
}
7983
};
80-

docs/src/components/code.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup>
2-
import { onMounted, ref } from 'vue';
3-
42
const props = defineProps({
53
code: String,
64
lang: String

docs/src/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export * from './hooks';
22
export * from './isDefaultType';
33
export * from './matchJsdoc';
44
export * from './parseHookJsdoc';
5+
export * from './utils';

docs/src/utils/utils/cn.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { ClassValue } from 'clsx';
2+
3+
import { clsx } from 'clsx';
4+
import { twMerge } from 'tailwind-merge';
5+
6+
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));

docs/src/utils/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './cn';

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@siberiacancode/reactuse",
3-
"version": "0.0.80",
3+
"version": "0.0.86",
44
"description": "Ultimate tool",
55
"author": {
66
"name": "SIBERIA CAN CODE 🧊",
@@ -75,21 +75,28 @@
7575
"@siberiacancode/eslint": "^2.8.0",
7676
"@siberiacancode/prettier": "^1.2.0",
7777
"@siberiacancode/vitest": "^1.2.4",
78+
"@tailwindcss/postcss": "^4.0.4",
7879
"@testing-library/dom": "^10.4.0",
7980
"@testing-library/react": "^16.2.0",
8081
"@types/doctrine": "^0.0.9",
8182
"@types/node": "^22.13.1",
8283
"@types/react": "^18.3.12",
8384
"@types/react-dom": "^18.3.2",
85+
"@types/web-bluetooth": "^0.0.20",
86+
"clsx": "^2.1.1",
8487
"comment-parser": "^1.4.1",
8588
"core-js": "^3.40.0",
8689
"doctrine": "^3.0.0",
8790
"husky": "^9.1.7",
8891
"lint-staged": "^15.4.3",
8992
"markdown-table": "^3.0.4",
93+
"postcss": "^8.5.1",
94+
"prettier-plugin-tailwindcss": "^0.6.11",
9095
"react": "^18.3.1",
9196
"react-dom": "^18.3.1",
9297
"shx": "^0.3.4",
98+
"tailwind-merge": "^3.0.1",
99+
"tailwindcss": "^4.0.4",
93100
"typescript": "^5.7.3",
94101
"vite": "^6.0.11",
95102
"vitepress": "^1.6.3"

postcss.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
plugins: {
3+
'@tailwindcss/postcss': {}
4+
}
5+
};

0 commit comments

Comments
 (0)