@san-siva/blogkit 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/cjs/dynamicComponents/BlogDynamic.js +2 -2
- package/dist/cjs/dynamicComponents/BlogDynamic.js.map +1 -1
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/esm/dynamicComponents/BlogDynamic.js +3 -3
- package/dist/esm/dynamicComponents/BlogDynamic.js.map +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +1 -1
- package/package.json +69 -69
- package/src/dynamicComponents/BlogDynamic.tsx +3 -3
- package/src/styles/Blog.module.scss +1 -8
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
2
|
+
"name": "@san-siva/blogkit",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "A reusable blog component library for React/Next.js applications with code highlighting, diagrams, and rich content features",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": {
|
|
15
|
+
"import": "./dist/esm/index.css",
|
|
16
|
+
"require": "./dist/cjs/index.css"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"src"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "rollup -c && tsc --emitDeclarationOnly --outDir dist/types && cp -r src/assets dist/",
|
|
26
|
+
"dev": "rollup -c -w"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"blog",
|
|
30
|
+
"react",
|
|
31
|
+
"nextjs",
|
|
32
|
+
"components",
|
|
33
|
+
"markdown",
|
|
34
|
+
"code-highlighting",
|
|
35
|
+
"mermaid",
|
|
36
|
+
"diagrams"
|
|
37
|
+
],
|
|
38
|
+
"author": "Santhosh Siva",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@san-siva/stylekit": "^1.0.1"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@react-spring/web": "^10.0.0",
|
|
45
|
+
"mermaid": "^10.0.0",
|
|
46
|
+
"next": ">=16.0.10",
|
|
47
|
+
"prismjs": "^1.29.0",
|
|
48
|
+
"react": ">=19.0.0",
|
|
49
|
+
"react-dom": ">=19.0.0",
|
|
50
|
+
"react-syntax-highlighter": "^15.5.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
54
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
55
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
56
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
57
|
+
"@types/node": "^22.10.1",
|
|
58
|
+
"@types/react": "^18.3.12",
|
|
59
|
+
"@types/react-dom": "^18.3.1",
|
|
60
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
61
|
+
"postcss": "^8.4.49",
|
|
62
|
+
"postcss-url": "^10.1.3",
|
|
63
|
+
"rollup": "^4.27.4",
|
|
64
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
65
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
66
|
+
"rollup-plugin-url": "^3.0.1",
|
|
67
|
+
"sass": "^1.77.8",
|
|
68
|
+
"tslib": "^2.8.1",
|
|
69
|
+
"typescript": "^5.7.2"
|
|
70
|
+
}
|
|
71
71
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
useRef,
|
|
10
10
|
useState,
|
|
11
11
|
} from 'react';
|
|
12
|
-
import { useSpring, animated } from '@react-spring/web';
|
|
12
|
+
import { useSpring, animated, config } from '@react-spring/web';
|
|
13
13
|
|
|
14
14
|
import type { MouseEvent, ReactNode, RefAttributes } from 'react';
|
|
15
15
|
|
|
@@ -204,8 +204,8 @@ const Blog = ({ children, title = 'In this article' }: BlogProperties) => {
|
|
|
204
204
|
|
|
205
205
|
const sidebarStyle = useSpring({
|
|
206
206
|
opacity: showTOC ? 1 : 0,
|
|
207
|
-
transform: showTOC ? 'translateX(0)' : 'translateX(
|
|
208
|
-
config:
|
|
207
|
+
transform: showTOC ? 'translateX(0)' : 'translateX(40px)',
|
|
208
|
+
config: config.gentle,
|
|
209
209
|
});
|
|
210
210
|
|
|
211
211
|
return (
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
grid-template-columns: #{styles.rem(780)} minmax(#{styles.rem(320)}, 1fr);
|
|
8
8
|
grid-gap: styles.space(8);
|
|
9
9
|
|
|
10
|
-
> * {
|
|
11
|
-
max-width: unset;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
&__content {
|
|
15
11
|
max-width: styles.$max-width--page-contents;
|
|
16
12
|
}
|
|
@@ -20,11 +16,8 @@
|
|
|
20
16
|
height: fit-content;
|
|
21
17
|
top: var(--topbar-height);
|
|
22
18
|
padding: styles.space(6);
|
|
19
|
+
padding-top: styles.rem(66);
|
|
23
20
|
border-radius: styles.$border-radius--1;
|
|
24
|
-
background-color: styles.$color--code;
|
|
25
|
-
box-shadow:
|
|
26
|
-
0 0 0 1px styles.$color--border,
|
|
27
|
-
0 styles.space(1) styles.space(2) 0 styles.$color--border;
|
|
28
21
|
|
|
29
22
|
> .category__title {
|
|
30
23
|
display: block;
|