@san-siva/blogkit 1.1.13 → 1.1.15
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 +1 -1
- package/dist/cjs/components/Blog.js +2 -2
- package/dist/cjs/components/Blog.js.map +1 -1
- 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/cjs/staticComponents/BlogStatic.js +2 -2
- package/dist/cjs/staticComponents/BlogStatic.js.map +1 -1
- package/dist/cjs/styles/Callout.module.scss.js +1 -1
- package/dist/esm/components/Blog.js +2 -2
- package/dist/esm/components/Blog.js.map +1 -1
- package/dist/esm/dynamicComponents/BlogDynamic.js +2 -2
- 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/dist/esm/staticComponents/BlogStatic.js +3 -3
- package/dist/esm/staticComponents/BlogStatic.js.map +1 -1
- package/dist/esm/styles/Callout.module.scss.js +1 -1
- package/dist/types/components/Blog.d.ts +3 -1
- package/dist/types/components/Blog.d.ts.map +1 -1
- package/dist/types/dynamicComponents/BlogDynamic.d.ts +3 -1
- package/dist/types/dynamicComponents/BlogDynamic.d.ts.map +1 -1
- package/dist/types/staticComponents/BlogStatic.d.ts +3 -1
- package/dist/types/staticComponents/BlogStatic.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/Blog.tsx +5 -3
- package/src/dynamicComponents/BlogDynamic.tsx +9 -1
- package/src/staticComponents/BlogStatic.tsx +9 -1
- package/src/styles/Blog.module.scss +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import styles from '../styles/Blog.module.scss.js';
|
|
3
3
|
|
|
4
|
-
const BlogStatic = ({ children }) => {
|
|
5
|
-
return (
|
|
4
|
+
const BlogStatic = ({ children, jsonLd }) => {
|
|
5
|
+
return (jsxs("div", { className: styles.blog, children: [jsonLd && (jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: JSON.stringify(jsonLd) } })), jsx("div", { className: styles['blog__content'], children: children })] }));
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { BlogStatic as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogStatic.js","sources":["../../../src/staticComponents/BlogStatic.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from '../styles/Blog.module.scss';\n\ninterface BlogStaticProperties {\n\tchildren: ReactNode;\n}\n\nconst BlogStatic = ({ children }: BlogStaticProperties) => {\n\treturn (\n\t\t<div className={styles.blog}>\n\t\t\t<div className={styles['blog__content']}>{children}</div>\n\t\t</div>\n\t);\n};\n\nexport default BlogStatic;\n"],"names":["_jsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"BlogStatic.js","sources":["../../../src/staticComponents/BlogStatic.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { Thing, WithContext } from 'schema-dts';\nimport styles from '../styles/Blog.module.scss';\n\ninterface BlogStaticProperties {\n\tchildren: ReactNode;\n\tjsonLd?: WithContext<Thing>;\n}\n\nconst BlogStatic = ({ children, jsonLd }: BlogStaticProperties) => {\n\treturn (\n\t\t<div className={styles.blog}>\n\t\t\t{jsonLd && (\n\t\t\t\t<script\n\t\t\t\t\ttype=\"application/ld+json\"\n\t\t\t\t\tdangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles['blog__content']}>{children}</div>\n\t\t</div>\n\t);\n};\n\nexport default BlogStatic;\n"],"names":["_jsxs","_jsx"],"mappings":";;;AASA,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAwB,KAAI;AACjE,IAAA,QACCA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAA,QAAA,EAAA,CACzB,MAAM,KACNC,GAAA,CAAA,QAAA,EAAA,EACC,IAAI,EAAC,qBAAqB,EAC1B,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,EAAA,CAC1D,CACF,EACDA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAO,CAAA,EAAA,CACpD;AAER;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var styles = {"margin-top":"Callout-module_margin-top__dS2UF","padding-top":"Callout-module_padding-top__aJrE4","margin-top--1":"Callout-module_margin-top--1__eBfEL","padding-top--1":"Callout-module_padding-top--1__rrL2e","margin-top--2":"Callout-module_margin-top--2__Ej-fE","padding-top--2":"Callout-module_padding-top--2__NtBHH","margin-top--3":"Callout-module_margin-top--3__AsHPR","padding-top--3":"Callout-module_padding-top--3__CjXpH","margin-top--4":"Callout-module_margin-top--4__3ji03","padding-top--4":"Callout-module_padding-top--4__BdcKb","margin-top--5":"Callout-module_margin-top--5__j3Qds","padding-top--5":"Callout-module_padding-top--5__TWT9C","margin-top--6":"Callout-module_margin-top--6__GQFRt","padding-top--6":"Callout-module_padding-top--6__4bYvI","margin-top--7":"Callout-module_margin-top--7__ArvNz","padding-top--7":"Callout-module_padding-top--7__PnU3M","margin-top--8":"Callout-module_margin-top--8__DvN7J","padding-top--8":"Callout-module_padding-top--8__qunY9","margin-top--9":"Callout-module_margin-top--9__mSjxY","padding-top--9":"Callout-module_padding-top--9__N4Z2b","margin-bottom":"Callout-module_margin-bottom__UlOKu","padding-bottom":"Callout-module_padding-bottom__-XwJQ","margin-bottom--1":"Callout-module_margin-bottom--1__LxnVH","padding-bottom--1":"Callout-module_padding-bottom--1__MfyXw","margin-bottom--2":"Callout-module_margin-bottom--2__nelQj","padding-bottom--2":"Callout-module_padding-bottom--2__9MX1j","margin-bottom--3":"Callout-module_margin-bottom--3__VfA8y","padding-bottom--3":"Callout-module_padding-bottom--3__FRllS","margin-bottom--4":"Callout-module_margin-bottom--4__-j-tS","padding-bottom--4":"Callout-module_padding-bottom--4__sJzsQ","margin-bottom--5":"Callout-module_margin-bottom--5__0hYDy","padding-bottom--5":"Callout-module_padding-bottom--5__c4BQo","margin-bottom--6":"Callout-module_margin-bottom--6__8Ny2B","padding-bottom--6":"Callout-module_padding-bottom--6__wNeJk","margin-bottom--7":"Callout-module_margin-bottom--7__0dYmE","padding-bottom--7":"Callout-module_padding-bottom--7__FueIs","margin-bottom--8":"Callout-module_margin-bottom--8__r93zU","padding-bottom--8":"Callout-module_padding-bottom--8__APcyf","margin-bottom--9":"Callout-module_margin-bottom--9__f6KUQ","padding-bottom--9":"Callout-module_padding-bottom--9__KVgqO","margin-left":"Callout-module_margin-left__mb1jm","padding-left":"Callout-module_padding-left__cgzip","margin-left--1":"Callout-module_margin-left--1__DWFsG","padding-left--1":"Callout-module_padding-left--1__3nWMz","margin-left--2":"Callout-module_margin-left--2__ByTNO","padding-left--2":"Callout-module_padding-left--2__9-PLw","margin-left--3":"Callout-module_margin-left--3__0Iz7m","padding-left--3":"Callout-module_padding-left--3__FQgJY","margin-left--4":"Callout-module_margin-left--4__cmAQ4","padding-left--4":"Callout-module_padding-left--4__pW9OV","margin-left--5":"Callout-module_margin-left--5__qD5bN","padding-left--5":"Callout-module_padding-left--5__FaZO8","margin-left--6":"Callout-module_margin-left--6__h-dBW","padding-left--6":"Callout-module_padding-left--6__RT6JH","margin-left--7":"Callout-module_margin-left--7__9wZFI","padding-left--7":"Callout-module_padding-left--7__-31-c","margin-left--8":"Callout-module_margin-left--8__bbcki","padding-left--8":"Callout-module_padding-left--8__f3ctw","margin-left--9":"Callout-module_margin-left--9__0xlWQ","padding-left--9":"Callout-module_padding-left--9__QsNKP","margin-right":"Callout-module_margin-right__CN33J","padding-right":"Callout-module_padding-right__Cn14a","margin-right--1":"Callout-module_margin-right--1__GAGZO","padding-right--1":"Callout-module_padding-right--1__qh8gH","margin-right--2":"Callout-module_margin-right--2__MjxOE","padding-right--2":"Callout-module_padding-right--2__CDawi","margin-right--3":"Callout-module_margin-right--3__w3PO-","padding-right--3":"Callout-module_padding-right--3__bOIL3","margin-right--4":"Callout-module_margin-right--4__wjZRG","padding-right--4":"Callout-module_padding-right--4__DNn-A","margin-right--5":"Callout-module_margin-right--5__JUYoz","padding-right--5":"Callout-module_padding-right--5__V1t3c","margin-right--6":"Callout-module_margin-right--6__UXR9-","padding-right--6":"Callout-module_padding-right--6__pVwQj","margin-right--7":"Callout-module_margin-right--7__ZwUec","padding-right--7":"Callout-module_padding-right--7__EHY0p","margin-right--8":"Callout-module_margin-right--8__k9asQ","padding-right--8":"Callout-module_padding-right--8__1Nqrm","margin-right--9":"Callout-module_margin-right--9__J8sMZ","padding-right--9":"Callout-module_padding-right--9__QYnAq","error":"Callout-module_error__UeboU","font--primary":"Callout-module_font--primary__Ayv9J","font--secondary":"Callout-module_font--secondary__mBXUH","font--code":"Callout-module_font--code__fG36F","font-weight--400":"Callout-module_font-weight--400__VYsxM","font-weight--500":"Callout-module_font-weight--500__zXuRq","font-weight--600":"Callout-module_font-weight--600__fJDVt","font-weight--700":"Callout-module_font-weight--700__3kQTh","font-weight--800":"Callout-module_font-weight--800__5POjB","font-size--h1":"Callout-module_font-size--h1__9fzEM","font-size--h2":"Callout-module_font-size--h2__EowCg","font-size--h3":"Callout-module_font-size--h3__8EcUJ","font-size--h4":"Callout-module_font-size--h4__ferQ7","font-size--h5":"Callout-module_font-size--h5__43lHF","font-size--h6":"Callout-module_font-size--h6__GpBej","font-size--big":"Callout-module_font-size--big__-BXjA","font-size--button":"Callout-module_font-size--button__9KupW","font-size--p":"Callout-module_font-size--p__RJTna","font-size--small":"Callout-module_font-size--small__YEsJl","line-height--large":"Callout-module_line-height--large__OStzV","line-height--normal":"Callout-module_line-height--normal__p5UA7","line-height--small":"Callout-module_line-height--small__2kXv9","text-align--center":"Callout-module_text-align--center__5JXeQ","category__header":"Callout-module_category__header__Edg04","a--highlighted":"Callout-module_a--highlighted__JmfE5","grecaptcha-badge":"Callout-module_grecaptcha-badge__7vWF5","container":"Callout-module_container__FV7VM","container--contents-centered":"Callout-module_container--contents-centered__zx2lp","container--no-padding":"Callout-module_container--no-padding__wI9Pc","page":"Callout-module_page__2bQ0P","page--contents-max-width":"Callout-module_page--contents-max-width__4p2pL","page--no-extra-padding":"Callout-module_page--no-extra-padding__lGzpM","page--no-max-width":"Callout-module_page--no-max-width__cF1qn","hr":"Callout-module_hr__iz4ZP","li--disabled":"Callout-module_li--disabled__09IJ1","block":"Callout-module_block__cdSSP","callout":"Callout-module_callout__kEgS8","callout__icon":"Callout-module_callout__icon__z-ZHp","callout--info":"Callout-module_callout--info__zpyMT","callout--info__icon":"Callout-module_callout--info__icon__hHBbh","callout--warning":"Callout-module_callout--warning__QhFli","callout--error":"Callout-module_callout--error__-HDOj","callout--success":"Callout-module_callout--success__f1lTK","callout__wrapper":"Callout-module_callout__wrapper__jooXm","loading_animation":"Callout-module_loading_animation__9m516","MoveInTop":"Callout-module_MoveInTop__fio2m","fadeInDown":"Callout-module_fadeInDown__webmy","fadeUp":"Callout-module_fadeUp__uXBP6"};
|
|
1
|
+
var styles = {"margin-top":"Callout-module_margin-top__dS2UF","padding-top":"Callout-module_padding-top__aJrE4","margin-top--1":"Callout-module_margin-top--1__eBfEL","padding-top--1":"Callout-module_padding-top--1__rrL2e","margin-top--2":"Callout-module_margin-top--2__Ej-fE","padding-top--2":"Callout-module_padding-top--2__NtBHH","margin-top--3":"Callout-module_margin-top--3__AsHPR","padding-top--3":"Callout-module_padding-top--3__CjXpH","margin-top--4":"Callout-module_margin-top--4__3ji03","padding-top--4":"Callout-module_padding-top--4__BdcKb","margin-top--5":"Callout-module_margin-top--5__j3Qds","padding-top--5":"Callout-module_padding-top--5__TWT9C","margin-top--6":"Callout-module_margin-top--6__GQFRt","padding-top--6":"Callout-module_padding-top--6__4bYvI","margin-top--7":"Callout-module_margin-top--7__ArvNz","padding-top--7":"Callout-module_padding-top--7__PnU3M","margin-top--8":"Callout-module_margin-top--8__DvN7J","padding-top--8":"Callout-module_padding-top--8__qunY9","margin-top--9":"Callout-module_margin-top--9__mSjxY","padding-top--9":"Callout-module_padding-top--9__N4Z2b","margin-bottom":"Callout-module_margin-bottom__UlOKu","padding-bottom":"Callout-module_padding-bottom__-XwJQ","margin-bottom--1":"Callout-module_margin-bottom--1__LxnVH","padding-bottom--1":"Callout-module_padding-bottom--1__MfyXw","margin-bottom--2":"Callout-module_margin-bottom--2__nelQj","padding-bottom--2":"Callout-module_padding-bottom--2__9MX1j","margin-bottom--3":"Callout-module_margin-bottom--3__VfA8y","padding-bottom--3":"Callout-module_padding-bottom--3__FRllS","margin-bottom--4":"Callout-module_margin-bottom--4__-j-tS","padding-bottom--4":"Callout-module_padding-bottom--4__sJzsQ","margin-bottom--5":"Callout-module_margin-bottom--5__0hYDy","padding-bottom--5":"Callout-module_padding-bottom--5__c4BQo","margin-bottom--6":"Callout-module_margin-bottom--6__8Ny2B","padding-bottom--6":"Callout-module_padding-bottom--6__wNeJk","margin-bottom--7":"Callout-module_margin-bottom--7__0dYmE","padding-bottom--7":"Callout-module_padding-bottom--7__FueIs","margin-bottom--8":"Callout-module_margin-bottom--8__r93zU","padding-bottom--8":"Callout-module_padding-bottom--8__APcyf","margin-bottom--9":"Callout-module_margin-bottom--9__f6KUQ","padding-bottom--9":"Callout-module_padding-bottom--9__KVgqO","margin-left":"Callout-module_margin-left__mb1jm","padding-left":"Callout-module_padding-left__cgzip","margin-left--1":"Callout-module_margin-left--1__DWFsG","padding-left--1":"Callout-module_padding-left--1__3nWMz","margin-left--2":"Callout-module_margin-left--2__ByTNO","padding-left--2":"Callout-module_padding-left--2__9-PLw","margin-left--3":"Callout-module_margin-left--3__0Iz7m","padding-left--3":"Callout-module_padding-left--3__FQgJY","margin-left--4":"Callout-module_margin-left--4__cmAQ4","padding-left--4":"Callout-module_padding-left--4__pW9OV","margin-left--5":"Callout-module_margin-left--5__qD5bN","padding-left--5":"Callout-module_padding-left--5__FaZO8","margin-left--6":"Callout-module_margin-left--6__h-dBW","padding-left--6":"Callout-module_padding-left--6__RT6JH","margin-left--7":"Callout-module_margin-left--7__9wZFI","padding-left--7":"Callout-module_padding-left--7__-31-c","margin-left--8":"Callout-module_margin-left--8__bbcki","padding-left--8":"Callout-module_padding-left--8__f3ctw","margin-left--9":"Callout-module_margin-left--9__0xlWQ","padding-left--9":"Callout-module_padding-left--9__QsNKP","margin-right":"Callout-module_margin-right__CN33J","padding-right":"Callout-module_padding-right__Cn14a","margin-right--1":"Callout-module_margin-right--1__GAGZO","padding-right--1":"Callout-module_padding-right--1__qh8gH","margin-right--2":"Callout-module_margin-right--2__MjxOE","padding-right--2":"Callout-module_padding-right--2__CDawi","margin-right--3":"Callout-module_margin-right--3__w3PO-","padding-right--3":"Callout-module_padding-right--3__bOIL3","margin-right--4":"Callout-module_margin-right--4__wjZRG","padding-right--4":"Callout-module_padding-right--4__DNn-A","margin-right--5":"Callout-module_margin-right--5__JUYoz","padding-right--5":"Callout-module_padding-right--5__V1t3c","margin-right--6":"Callout-module_margin-right--6__UXR9-","padding-right--6":"Callout-module_padding-right--6__pVwQj","margin-right--7":"Callout-module_margin-right--7__ZwUec","padding-right--7":"Callout-module_padding-right--7__EHY0p","margin-right--8":"Callout-module_margin-right--8__k9asQ","padding-right--8":"Callout-module_padding-right--8__1Nqrm","margin-right--9":"Callout-module_margin-right--9__J8sMZ","padding-right--9":"Callout-module_padding-right--9__QYnAq","error":"Callout-module_error__UeboU","font--primary":"Callout-module_font--primary__Ayv9J","font--secondary":"Callout-module_font--secondary__mBXUH","font--code":"Callout-module_font--code__fG36F","font-weight--400":"Callout-module_font-weight--400__VYsxM","font-weight--500":"Callout-module_font-weight--500__zXuRq","font-weight--600":"Callout-module_font-weight--600__fJDVt","font-weight--700":"Callout-module_font-weight--700__3kQTh","font-weight--800":"Callout-module_font-weight--800__5POjB","font-size--h1":"Callout-module_font-size--h1__9fzEM","font-size--h2":"Callout-module_font-size--h2__EowCg","font-size--h3":"Callout-module_font-size--h3__8EcUJ","font-size--h4":"Callout-module_font-size--h4__ferQ7","font-size--h5":"Callout-module_font-size--h5__43lHF","font-size--h6":"Callout-module_font-size--h6__GpBej","font-size--big":"Callout-module_font-size--big__-BXjA","font-size--button":"Callout-module_font-size--button__9KupW","font-size--p":"Callout-module_font-size--p__RJTna","font-size--small":"Callout-module_font-size--small__YEsJl","line-height--large":"Callout-module_line-height--large__OStzV","line-height--normal":"Callout-module_line-height--normal__p5UA7","line-height--small":"Callout-module_line-height--small__2kXv9","line-height--very-small":"Callout-module_line-height--very-small__AS59u","text-align--center":"Callout-module_text-align--center__5JXeQ","category__header":"Callout-module_category__header__Edg04","a--highlighted":"Callout-module_a--highlighted__JmfE5","grecaptcha-badge":"Callout-module_grecaptcha-badge__7vWF5","container":"Callout-module_container__FV7VM","container--contents-centered":"Callout-module_container--contents-centered__zx2lp","container--no-padding":"Callout-module_container--no-padding__wI9Pc","page":"Callout-module_page__2bQ0P","page--contents-max-width":"Callout-module_page--contents-max-width__4p2pL","page--no-extra-padding":"Callout-module_page--no-extra-padding__lGzpM","page--no-max-width":"Callout-module_page--no-max-width__cF1qn","hr":"Callout-module_hr__iz4ZP","li--disabled":"Callout-module_li--disabled__09IJ1","block":"Callout-module_block__cdSSP","callout":"Callout-module_callout__kEgS8","callout__icon":"Callout-module_callout__icon__z-ZHp","callout--info":"Callout-module_callout--info__zpyMT","callout--info__icon":"Callout-module_callout--info__icon__hHBbh","callout--warning":"Callout-module_callout--warning__QhFli","callout--error":"Callout-module_callout--error__-HDOj","callout--success":"Callout-module_callout--success__f1lTK","callout__wrapper":"Callout-module_callout__wrapper__jooXm","loading_animation":"Callout-module_loading_animation__9m516","MoveInTop":"Callout-module_MoveInTop__fio2m","fadeInDown":"Callout-module_fadeInDown__webmy","fadeUp":"Callout-module_fadeUp__uXBP6"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
4
4
|
//# sourceMappingURL=Callout.module.scss.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
2
3
|
interface BlogProperties {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
title?: string;
|
|
6
|
+
jsonLd?: WithContext<Thing>;
|
|
5
7
|
}
|
|
6
|
-
declare const Blog: ({ children, title }: BlogProperties) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const Blog: ({ children, title, jsonLd }: BlogProperties) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default Blog;
|
|
8
10
|
//# sourceMappingURL=Blog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blog.d.ts","sourceRoot":"","sources":["../../../src/components/Blog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Blog.d.ts","sourceRoot":"","sources":["../../../src/components/Blog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKrD,UAAU,cAAc;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED,QAAA,MAAM,IAAI,GAAI,6BAAiD,cAAc,4CAM5E,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
2
3
|
interface BlogProperties {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
title?: string;
|
|
6
|
+
jsonLd?: WithContext<Thing>;
|
|
5
7
|
}
|
|
6
8
|
export interface ForwardedReference {
|
|
7
9
|
parentRef: HTMLDivElement;
|
|
8
10
|
childRefs: HTMLDivElement[];
|
|
9
11
|
}
|
|
10
|
-
declare const Blog: ({ children, title }: BlogProperties) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const Blog: ({ children, title, jsonLd }: BlogProperties) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export default Blog;
|
|
12
14
|
//# sourceMappingURL=BlogDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAc,SAAS,EAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlogDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAc,SAAS,EAAiB,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIrD,UAAU,cAAc;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,cAAc,EAAE,CAAC;CAC5B;AAgBD,QAAA,MAAM,IAAI,GAAI,6BAAiD,cAAc,4CAwN5E,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
2
3
|
interface BlogStaticProperties {
|
|
3
4
|
children: ReactNode;
|
|
5
|
+
jsonLd?: WithContext<Thing>;
|
|
4
6
|
}
|
|
5
|
-
declare const BlogStatic: ({ children }: BlogStaticProperties) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const BlogStatic: ({ children, jsonLd }: BlogStaticProperties) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export default BlogStatic;
|
|
7
9
|
//# sourceMappingURL=BlogStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlogStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGrD,UAAU,oBAAoB;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,GAAI,sBAAsB,oBAAoB,4CAY7D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@san-siva/blogkit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "A reusable blog component library for React/Next.js applications with code highlighting, diagrams, and rich content features",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"author": "Santhosh Siva",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@san-siva/stylekit": "^1.0.
|
|
41
|
+
"@san-siva/stylekit": "^1.0.5",
|
|
42
|
+
"schema-dts": "^1.1.5"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
45
|
"@react-spring/web": "^10.0.0",
|
package/src/components/Blog.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { lazy, Suspense } from 'react';
|
|
4
4
|
import type { ReactNode } from 'react';
|
|
5
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
5
6
|
import BlogStatic from '../staticComponents/BlogStatic';
|
|
6
7
|
|
|
7
8
|
const BlogDynamic = lazy(() => import('../dynamicComponents/BlogDynamic'));
|
|
@@ -9,12 +10,13 @@ const BlogDynamic = lazy(() => import('../dynamicComponents/BlogDynamic'));
|
|
|
9
10
|
interface BlogProperties {
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
title?: string;
|
|
13
|
+
jsonLd?: WithContext<Thing>;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
const Blog = ({ children, title = 'In this article' }: BlogProperties) => {
|
|
16
|
+
const Blog = ({ children, title = 'In this article', jsonLd }: BlogProperties) => {
|
|
15
17
|
return (
|
|
16
|
-
<Suspense fallback={<BlogStatic>{children}</BlogStatic>}>
|
|
17
|
-
<BlogDynamic title={title}>{children}</BlogDynamic>
|
|
18
|
+
<Suspense fallback={<BlogStatic jsonLd={jsonLd}>{children}</BlogStatic>}>
|
|
19
|
+
<BlogDynamic title={title} jsonLd={jsonLd}>{children}</BlogDynamic>
|
|
18
20
|
</Suspense>
|
|
19
21
|
);
|
|
20
22
|
};
|
|
@@ -12,12 +12,14 @@ import {
|
|
|
12
12
|
import { useSpring, animated, config } from '@react-spring/web';
|
|
13
13
|
|
|
14
14
|
import type { MouseEvent, ReactNode, RefAttributes } from 'react';
|
|
15
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
15
16
|
|
|
16
17
|
import styles from '../styles/Blog.module.scss';
|
|
17
18
|
|
|
18
19
|
interface BlogProperties {
|
|
19
20
|
children: ReactNode;
|
|
20
21
|
title?: string;
|
|
22
|
+
jsonLd?: WithContext<Thing>;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export interface ForwardedReference {
|
|
@@ -39,7 +41,7 @@ interface CategoryTitleValue extends SectionReferenceValue {
|
|
|
39
41
|
|
|
40
42
|
type CategoryTitle = Map<string, CategoryTitleValue>;
|
|
41
43
|
|
|
42
|
-
const Blog = ({ children, title = 'In this article' }: BlogProperties) => {
|
|
44
|
+
const Blog = ({ children, title = 'In this article', jsonLd }: BlogProperties) => {
|
|
43
45
|
const sectionReferences = useRef<SectionReference>(new Map());
|
|
44
46
|
const [categoryTitles, setCategoryTitles] = useState<CategoryTitle>(
|
|
45
47
|
new Map()
|
|
@@ -210,6 +212,12 @@ const Blog = ({ children, title = 'In this article' }: BlogProperties) => {
|
|
|
210
212
|
|
|
211
213
|
return (
|
|
212
214
|
<div className={styles.blog}>
|
|
215
|
+
{jsonLd && (
|
|
216
|
+
<script
|
|
217
|
+
type="application/ld+json"
|
|
218
|
+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
219
|
+
/>
|
|
220
|
+
)}
|
|
213
221
|
<div className={styles['blog__content']}>
|
|
214
222
|
{Children.map(children, child => {
|
|
215
223
|
if (!isValidElement(child)) return child;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Thing, WithContext } from 'schema-dts';
|
|
2
3
|
import styles from '../styles/Blog.module.scss';
|
|
3
4
|
|
|
4
5
|
interface BlogStaticProperties {
|
|
5
6
|
children: ReactNode;
|
|
7
|
+
jsonLd?: WithContext<Thing>;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
const BlogStatic = ({ children }: BlogStaticProperties) => {
|
|
10
|
+
const BlogStatic = ({ children, jsonLd }: BlogStaticProperties) => {
|
|
9
11
|
return (
|
|
10
12
|
<div className={styles.blog}>
|
|
13
|
+
{jsonLd && (
|
|
14
|
+
<script
|
|
15
|
+
type="application/ld+json"
|
|
16
|
+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
17
|
+
/>
|
|
18
|
+
)}
|
|
11
19
|
<div className={styles['blog__content']}>{children}</div>
|
|
12
20
|
</div>
|
|
13
21
|
);
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
height: fit-content;
|
|
17
17
|
padding: styles.space(6);
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
$top: styles.rem(66);
|
|
20
20
|
top: $top;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
padding-top: $top;
|
|
23
|
+
padding-right: 0;
|
|
24
24
|
border-radius: styles.$border-radius--1;
|
|
25
25
|
|
|
26
26
|
> .category__title {
|