@san-siva/blogkit 1.1.20 → 1.1.22

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.
Files changed (74) hide show
  1. package/dist/cjs/components/BlogSection.js +2 -2
  2. package/dist/cjs/components/BlogSection.js.map +1 -1
  3. package/dist/cjs/dynamicComponents/BlogDynamic.js +31 -181
  4. package/dist/cjs/dynamicComponents/BlogDynamic.js.map +1 -1
  5. package/dist/cjs/dynamicComponents/BlogSectionDynamic.js +16 -8
  6. package/dist/cjs/dynamicComponents/BlogSectionDynamic.js.map +1 -1
  7. package/dist/cjs/hooks/useCategoryTitles.js +104 -0
  8. package/dist/cjs/hooks/useCategoryTitles.js.map +1 -0
  9. package/dist/cjs/hooks/useSectionObserver.js +89 -0
  10. package/dist/cjs/hooks/useSectionObserver.js.map +1 -0
  11. package/dist/cjs/index.css +1 -1
  12. package/dist/cjs/index.css.map +1 -1
  13. package/dist/cjs/staticComponents/BlogSectionStatic.js +2 -5
  14. package/dist/cjs/staticComponents/BlogSectionStatic.js.map +1 -1
  15. package/dist/cjs/staticComponents/TocNodeStatic.js +16 -0
  16. package/dist/cjs/staticComponents/TocNodeStatic.js.map +1 -0
  17. package/dist/cjs/styles/Blog.module.scss.js +1 -1
  18. package/dist/cjs/styles/BlogSection.module.scss.js +1 -1
  19. package/dist/cjs/styles/Callout.module.scss.js +1 -1
  20. package/dist/cjs/styles/TocNode.module.scss.js +8 -0
  21. package/dist/cjs/styles/TocNode.module.scss.js.map +1 -0
  22. package/dist/esm/components/BlogSection.js +2 -2
  23. package/dist/esm/components/BlogSection.js.map +1 -1
  24. package/dist/esm/dynamicComponents/BlogDynamic.js +32 -182
  25. package/dist/esm/dynamicComponents/BlogDynamic.js.map +1 -1
  26. package/dist/esm/dynamicComponents/BlogSectionDynamic.js +17 -9
  27. package/dist/esm/dynamicComponents/BlogSectionDynamic.js.map +1 -1
  28. package/dist/esm/hooks/useCategoryTitles.js +102 -0
  29. package/dist/esm/hooks/useCategoryTitles.js.map +1 -0
  30. package/dist/esm/hooks/useSectionObserver.js +87 -0
  31. package/dist/esm/hooks/useSectionObserver.js.map +1 -0
  32. package/dist/esm/index.css +1 -1
  33. package/dist/esm/index.css.map +1 -1
  34. package/dist/esm/staticComponents/BlogSectionStatic.js +2 -5
  35. package/dist/esm/staticComponents/BlogSectionStatic.js.map +1 -1
  36. package/dist/esm/staticComponents/TocNodeStatic.js +12 -0
  37. package/dist/esm/staticComponents/TocNodeStatic.js.map +1 -0
  38. package/dist/esm/styles/Blog.module.scss.js +1 -1
  39. package/dist/esm/styles/BlogSection.module.scss.js +1 -1
  40. package/dist/esm/styles/Callout.module.scss.js +1 -1
  41. package/dist/esm/styles/TocNode.module.scss.js +4 -0
  42. package/dist/esm/styles/TocNode.module.scss.js.map +1 -0
  43. package/dist/types/components/BlogSection.d.ts +0 -1
  44. package/dist/types/components/BlogSection.d.ts.map +1 -1
  45. package/dist/types/dynamicComponents/BlogDynamic.d.ts +1 -1
  46. package/dist/types/dynamicComponents/BlogDynamic.d.ts.map +1 -1
  47. package/dist/types/dynamicComponents/BlogSectionDynamic.d.ts +0 -1
  48. package/dist/types/dynamicComponents/BlogSectionDynamic.d.ts.map +1 -1
  49. package/dist/types/hooks/useCategoryTitles.d.ts +22 -0
  50. package/dist/types/hooks/useCategoryTitles.d.ts.map +1 -0
  51. package/dist/types/hooks/useSectionObserver.d.ts +11 -0
  52. package/dist/types/hooks/useSectionObserver.d.ts.map +1 -0
  53. package/dist/types/staticComponents/BlogSectionStatic.d.ts +1 -2
  54. package/dist/types/staticComponents/BlogSectionStatic.d.ts.map +1 -1
  55. package/dist/types/staticComponents/TocNodeStatic.d.ts +16 -0
  56. package/dist/types/staticComponents/TocNodeStatic.d.ts.map +1 -0
  57. package/package.json +5 -3
  58. package/src/components/BlogSection.tsx +0 -4
  59. package/src/dynamicComponents/BlogDynamic.tsx +42 -253
  60. package/src/dynamicComponents/BlogSectionDynamic.tsx +38 -21
  61. package/src/hooks/useCategoryTitles.ts +148 -0
  62. package/src/hooks/useSectionObserver.ts +102 -0
  63. package/src/staticComponents/BlogSectionStatic.tsx +2 -13
  64. package/src/staticComponents/TocNodeStatic.tsx +52 -0
  65. package/src/styles/Blog.module.scss +0 -30
  66. package/src/styles/Blog.module.scss.d.ts +0 -4
  67. package/src/styles/BlogHeader.module.scss +6 -5
  68. package/src/styles/BlogLink.module.scss +1 -1
  69. package/src/styles/BlogSection.module.scss +26 -21
  70. package/src/styles/BlogSection.module.scss.d.ts +1 -2
  71. package/src/styles/CodeBlock.module.scss +2 -2
  72. package/src/styles/Table.module.scss +1 -1
  73. package/src/styles/TocNode.module.scss +49 -0
  74. package/src/styles/TocNode.module.scss.d.ts +11 -0
@@ -6,13 +6,10 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var BlogSection_module = require('../styles/BlogSection.module.scss.js');
7
7
  var index = require('../utils/index.js');
8
8
 
9
- const BlogSectionStatic = ({ title = '', category = '', children = null, increaseMarginBottom = false, }) => {
9
+ const BlogSectionStatic = ({ title = '', category = '', children = null, }) => {
10
10
  const titleWithCategory = category ? `${category} - ${title}` : title;
11
11
  const id = index.generateIdForBlogTitle(titleWithCategory);
12
- return (jsxRuntime.jsxs("div", { className: `${BlogSection_module.default['blog-section']}
13
- ${increaseMarginBottom
14
- ? BlogSection_module.default['margin-bottom--9']
15
- : BlogSection_module.default['margin-bottom--6']}`, "data-title": title, "data-id": id, children: [title ? (jsxRuntime.jsx("h4", { className: BlogSection_module.default['blog-section__title'], children: title })) : null, children] }));
12
+ return (jsxRuntime.jsxs("div", { className: BlogSection_module.default['blog-section'], "data-title": title, "data-id": id, children: [title ? (jsxRuntime.jsx("h3", { className: BlogSection_module.default['blog-section__title'], children: title })) : null, children] }));
16
13
  };
17
14
 
18
15
  exports.default = BlogSectionStatic;
@@ -1 +1 @@
1
- {"version":3,"file":"BlogSectionStatic.js","sources":["../../../src/staticComponents/BlogSectionStatic.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from '../styles/BlogSection.module.scss';\nimport { generateIdForBlogTitle } from '../utils';\n\ninterface BlogSectionStaticProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n\tincreaseMarginBottom?: boolean;\n}\n\nconst BlogSectionStatic = ({\n\ttitle = '',\n\tcategory = '',\n\tchildren = null,\n\tincreaseMarginBottom = false,\n}: BlogSectionStaticProperties) => {\n\tconst titleWithCategory = category ? `${category} - ${title}` : title;\n\tconst id = generateIdForBlogTitle(titleWithCategory);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`${styles['blog-section']}\n\t\t\t\t${\n\t\t\t\t\tincreaseMarginBottom\n\t\t\t\t\t\t? styles['margin-bottom--9']\n\t\t\t\t\t\t: styles['margin-bottom--6']\n\t\t\t\t}`}\n\t\t\tdata-title={title}\n\t\t\tdata-id={id}\n\t\t>\n\t\t\t{title ? (\n\t\t\t\t<h4 className={styles['blog-section__title']}>{title}</h4>\n\t\t\t) : null}\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default BlogSectionStatic;\n"],"names":["generateIdForBlogTitle","_jsxs","styles","_jsx"],"mappings":";;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,EAC1B,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,oBAAoB,GAAG,KAAK,GACC,KAAI;AACjC,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,CAAA,EAAG,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK;AACrE,IAAA,MAAM,EAAE,GAAGA,4BAAsB,CAAC,iBAAiB,CAAC;IAEpD,QACCC,yBACC,SAAS,EAAE,GAAGC,0BAAM,CAAC,cAAc,CAAC;MAElC;AACC,cAAEA,0BAAM,CAAC,kBAAkB;AAC3B,cAAEA,0BAAM,CAAC,kBAAkB,CAC7B,CAAA,CAAE,EAAA,YAAA,EACS,KAAK,EAAA,SAAA,EACR,EAAE,EAAA,QAAA,EAAA,CAEV,KAAK,IACLC,cAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAED,0BAAM,CAAC,qBAAqB,CAAC,EAAA,QAAA,EAAG,KAAK,EAAA,CAAM,IACvD,IAAI,EACP,QAAQ,CAAA,EAAA,CACJ;AAER;;;;"}
1
+ {"version":3,"file":"BlogSectionStatic.js","sources":["../../../src/staticComponents/BlogSectionStatic.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from '../styles/BlogSection.module.scss';\nimport { generateIdForBlogTitle } from '../utils';\n\ninterface BlogSectionStaticProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n}\n\nconst BlogSectionStatic = ({\n\ttitle = '',\n\tcategory = '',\n\tchildren = null,\n}: BlogSectionStaticProperties) => {\n\tconst titleWithCategory = category ? `${category} - ${title}` : title;\n\tconst id = generateIdForBlogTitle(titleWithCategory);\n\n\treturn (\n\t\t<div className={styles['blog-section']} data-title={title} data-id={id}>\n\t\t\t{title ? (\n\t\t\t\t<h3 className={styles['blog-section__title']}>{title}</h3>\n\t\t\t) : null}\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default BlogSectionStatic;\n"],"names":["generateIdForBlogTitle","_jsxs","styles","_jsx"],"mappings":";;;;;;;;AAUA,MAAM,iBAAiB,GAAG,CAAC,EAC1B,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,GACc,KAAI;AACjC,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,CAAA,EAAG,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK;AACrE,IAAA,MAAM,EAAE,GAAGA,4BAAsB,CAAC,iBAAiB,CAAC;AAEpD,IAAA,QACCC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,0BAAM,CAAC,cAAc,CAAC,EAAA,YAAA,EAAc,KAAK,aAAW,EAAE,EAAA,QAAA,EAAA,CACpE,KAAK,IACLC,cAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAED,0BAAM,CAAC,qBAAqB,CAAC,YAAG,KAAK,EAAA,CAAM,IACvD,IAAI,EACP,QAAQ,CAAA,EAAA,CACJ;AAER;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var TocNode_module = require('../styles/TocNode.module.scss.js');
7
+
8
+ const TocNode = ({ node, index, visibleTitle, onClick }) => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { "data-idx": index, "data-id": node.id, className: [
9
+ TocNode_module.default['toc-node__title'],
10
+ node.id === visibleTitle ? TocNode_module.default['toc-node__title--active'] : '',
11
+ node.depth === 1 ? TocNode_module.default['toc-node__title--sub'] : '',
12
+ node.depth === 2 ? TocNode_module.default['toc-node__title--sub-sub'] : '',
13
+ ].join(' '), onClick: onClick, children: node.title }), node.children.length > 0 && (jsxRuntime.jsx("div", { className: `${TocNode_module.default['toc-node__children']} ${TocNode_module.default[`toc-node__children--${node.depth === 0 ? 'sub' : 'sub-sub'}`]}`, children: node.children.map((child, i) => (jsxRuntime.jsx(TocNode, { node: child, index: i, visibleTitle: visibleTitle, onClick: onClick }, child.id))) }))] }));
14
+
15
+ exports.default = TocNode;
16
+ //# sourceMappingURL=TocNodeStatic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TocNodeStatic.js","sources":["../../../src/staticComponents/TocNodeStatic.tsx"],"sourcesContent":["import type { MouseEvent } from 'react';\n\nimport styles from '../styles/TocNode.module.scss';\n\nexport interface TocNode {\n\tid: string;\n\ttitle: string;\n\tdepth: number;\n\tchildren: TocNode[];\n}\n\ninterface TocNodeProperties {\n\tnode: TocNode;\n\tindex: number;\n\tvisibleTitle: string | null;\n\tonClick: (e: MouseEvent<HTMLParagraphElement>) => void;\n}\n\nconst TocNode = ({ node, index, visibleTitle, onClick }: TocNodeProperties) => (\n\t<div>\n\t\t<p\n\t\t\tdata-idx={index}\n\t\t\tdata-id={node.id}\n\t\t\tclassName={[\n\t\t\t\tstyles['toc-node__title'],\n\t\t\t\tnode.id === visibleTitle ? styles['toc-node__title--active'] : '',\n\t\t\t\tnode.depth === 1 ? styles['toc-node__title--sub'] : '',\n\t\t\t\tnode.depth === 2 ? styles['toc-node__title--sub-sub'] : '',\n\t\t\t].join(' ')}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t{node.title}\n\t\t</p>\n\t\t{node.children.length > 0 && (\n\t\t\t<div\n\t\t\t\tclassName={`${styles['toc-node__children']} ${styles[`toc-node__children--${node.depth === 0 ? 'sub' : 'sub-sub'}`]}`}\n\t\t\t>\n\t\t\t\t{node.children.map((child, i) => (\n\t\t\t\t\t<TocNode\n\t\t\t\t\t\tkey={child.id}\n\t\t\t\t\t\tnode={child}\n\t\t\t\t\t\tindex={i}\n\t\t\t\t\t\tvisibleTitle={visibleTitle}\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t)}\n\t</div>\n);\n\nexport default TocNode;\n"],"names":["_jsxs","_jsx","styles"],"mappings":";;;;;;;AAkBA,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAqB,MACzEA,eAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CACCC,cAAA,CAAA,GAAA,EAAA,EAAA,UAAA,EACW,KAAK,EAAA,SAAA,EACN,IAAI,CAAC,EAAE,EAChB,SAAS,EAAE;gBACVC,sBAAM,CAAC,iBAAiB,CAAC;AACzB,gBAAA,IAAI,CAAC,EAAE,KAAK,YAAY,GAAGA,sBAAM,CAAC,yBAAyB,CAAC,GAAG,EAAE;AACjE,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAGA,sBAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE;AACtD,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAGA,sBAAM,CAAC,0BAA0B,CAAC,GAAG,EAAE;aAC1D,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,OAAO,EAAE,OAAO,EAAA,QAAA,EAEf,IAAI,CAAC,KAAK,EAAA,CACR,EACH,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,KACxBD,cAAA,CAAA,KAAA,EAAA,EACC,SAAS,EAAE,CAAA,EAAGC,sBAAM,CAAC,oBAAoB,CAAC,IAAIA,sBAAM,CAAC,uBAAuB,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,SAAS,CAAA,CAAE,CAAC,EAAE,EAAA,QAAA,EAEpH,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,MAC3BD,cAAA,CAAC,OAAO,EAAA,EAEP,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,IAJX,KAAK,CAAC,EAAE,CAKZ,CACF,CAAC,EAAA,CACG,CACN,CAAA,EAAA,CACI;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var styles = {"margin-bottom--3":"Blog-module_margin-bottom--3__ir35O","category__header":"Blog-module_category__header__F1K0V","blog":"Blog-module_blog__Lpv6Z","blog__content":"Blog-module_blog__content__RMDiY","blog__sidebar":"Blog-module_blog__sidebar__uSu3l","category__title":"Blog-module_category__title__960db","category__title--active":"Blog-module_category__title--active__nvGys","category__title--sub":"Blog-module_category__title--sub__zrfE5"};
5
+ var styles = {"margin-bottom--3":"Blog-module_margin-bottom--3__ir35O","category__header":"Blog-module_category__header__F1K0V","blog":"Blog-module_blog__Lpv6Z","blog__content":"Blog-module_blog__content__RMDiY","blog__sidebar":"Blog-module_blog__sidebar__uSu3l"};
6
6
 
7
7
  exports.default = styles;
8
8
  //# sourceMappingURL=Blog.module.scss.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var styles = {"margin-bottom--6":"BlogSection-module_margin-bottom--6__-hlAO","margin-bottom--9":"BlogSection-module_margin-bottom--9__xU5rE","blog-section__title":"BlogSection-module_blog-section__title__5-4Oy","blog-section__title-link":"BlogSection-module_blog-section__title-link__Q4R5T","blog-section":"BlogSection-module_blog-section__NTDM4"};
5
+ var styles = {"blog-section":"BlogSection-module_blog-section__NTDM4","blog-section__title":"BlogSection-module_blog-section__title__5-4Oy","blog-section__title--empty":"BlogSection-module_blog-section__title--empty__-di-F","blog-section__title-link":"BlogSection-module_blog-section__title-link__Q4R5T"};
6
6
 
7
7
  exports.default = styles;
8
8
  //# sourceMappingURL=BlogSection.module.scss.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- 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-top--10":"Callout-module_margin-top--10__bJrtu","padding-top--10":"Callout-module_padding-top--10__JBw3e","margin-top--11":"Callout-module_margin-top--11__vnKG4","padding-top--11":"Callout-module_padding-top--11__w1mSs","margin-top--12":"Callout-module_margin-top--12__XM8gt","padding-top--12":"Callout-module_padding-top--12__iuEYZ","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-bottom--10":"Callout-module_margin-bottom--10__DgHw9","padding-bottom--10":"Callout-module_padding-bottom--10__VeWlT","margin-bottom--11":"Callout-module_margin-bottom--11__MR5kg","padding-bottom--11":"Callout-module_padding-bottom--11__w-dVG","margin-bottom--12":"Callout-module_margin-bottom--12__65MMr","padding-bottom--12":"Callout-module_padding-bottom--12__6FT1T","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-left--10":"Callout-module_margin-left--10__RfTZc","padding-left--10":"Callout-module_padding-left--10__2CqOz","margin-left--11":"Callout-module_margin-left--11__KWNFX","padding-left--11":"Callout-module_padding-left--11__qf3JJ","margin-left--12":"Callout-module_margin-left--12__-0GWw","padding-left--12":"Callout-module_padding-left--12__vNYbn","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","margin-right--10":"Callout-module_margin-right--10__CZ3Im","padding-right--10":"Callout-module_padding-right--10__Ji-ow","margin-right--11":"Callout-module_margin-right--11__xNfCV","padding-right--11":"Callout-module_padding-right--11__epPSq","margin-right--12":"Callout-module_margin-right--12__s30AM","padding-right--12":"Callout-module_padding-right--12__lLgou","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"};
5
+ 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-top--10":"Callout-module_margin-top--10__bJrtu","padding-top--10":"Callout-module_padding-top--10__JBw3e","margin-top--11":"Callout-module_margin-top--11__vnKG4","padding-top--11":"Callout-module_padding-top--11__w1mSs","margin-top--12":"Callout-module_margin-top--12__XM8gt","padding-top--12":"Callout-module_padding-top--12__iuEYZ","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-bottom--10":"Callout-module_margin-bottom--10__DgHw9","padding-bottom--10":"Callout-module_padding-bottom--10__VeWlT","margin-bottom--11":"Callout-module_margin-bottom--11__MR5kg","padding-bottom--11":"Callout-module_padding-bottom--11__w-dVG","margin-bottom--12":"Callout-module_margin-bottom--12__65MMr","padding-bottom--12":"Callout-module_padding-bottom--12__6FT1T","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-left--10":"Callout-module_margin-left--10__RfTZc","padding-left--10":"Callout-module_padding-left--10__2CqOz","margin-left--11":"Callout-module_margin-left--11__KWNFX","padding-left--11":"Callout-module_padding-left--11__qf3JJ","margin-left--12":"Callout-module_margin-left--12__-0GWw","padding-left--12":"Callout-module_padding-left--12__vNYbn","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","margin-right--10":"Callout-module_margin-right--10__CZ3Im","padding-right--10":"Callout-module_padding-right--10__Ji-ow","margin-right--11":"Callout-module_margin-right--11__xNfCV","padding-right--11":"Callout-module_padding-right--11__epPSq","margin-right--12":"Callout-module_margin-right--12__s30AM","padding-right--12":"Callout-module_padding-right--12__lLgou","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","font-size--very-small":"Callout-module_font-size--very-small__gac5b","font-size--tiny":"Callout-module_font-size--tiny__-Bd4M","font-size--micro":"Callout-module_font-size--micro__ajNCO","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"};
6
6
 
7
7
  exports.default = styles;
8
8
  //# sourceMappingURL=Callout.module.scss.js.map
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var styles = {"margin-top":"TocNode-module_margin-top__Ogv5T","padding-top":"TocNode-module_padding-top__AHpKG","margin-top--1":"TocNode-module_margin-top--1__zvFhv","padding-top--1":"TocNode-module_padding-top--1__T8fjh","margin-top--2":"TocNode-module_margin-top--2__34-Iu","padding-top--2":"TocNode-module_padding-top--2__okSvN","margin-top--3":"TocNode-module_margin-top--3__ts-Vt","padding-top--3":"TocNode-module_padding-top--3__XvFL1","margin-top--4":"TocNode-module_margin-top--4__Qc-Vm","padding-top--4":"TocNode-module_padding-top--4__vzNK5","margin-top--5":"TocNode-module_margin-top--5__tpxvM","padding-top--5":"TocNode-module_padding-top--5__hcaJt","margin-top--6":"TocNode-module_margin-top--6__WfaH9","padding-top--6":"TocNode-module_padding-top--6__7gEmf","margin-top--7":"TocNode-module_margin-top--7__c-y05","padding-top--7":"TocNode-module_padding-top--7__aiwiA","margin-top--8":"TocNode-module_margin-top--8__jvaE-","padding-top--8":"TocNode-module_padding-top--8__-BGju","margin-top--9":"TocNode-module_margin-top--9__8OGbw","padding-top--9":"TocNode-module_padding-top--9__nkx4w","margin-top--10":"TocNode-module_margin-top--10__68k9M","padding-top--10":"TocNode-module_padding-top--10__muZvK","margin-top--11":"TocNode-module_margin-top--11__e-A20","padding-top--11":"TocNode-module_padding-top--11__1ucXq","margin-top--12":"TocNode-module_margin-top--12__dGFhY","padding-top--12":"TocNode-module_padding-top--12__UsCRU","margin-bottom":"TocNode-module_margin-bottom__fW9cE","padding-bottom":"TocNode-module_padding-bottom__StTIt","margin-bottom--1":"TocNode-module_margin-bottom--1__d-Q31","padding-bottom--1":"TocNode-module_padding-bottom--1__xfvm7","margin-bottom--2":"TocNode-module_margin-bottom--2__jDlTD","padding-bottom--2":"TocNode-module_padding-bottom--2__o3V2P","margin-bottom--3":"TocNode-module_margin-bottom--3__9DnaF","padding-bottom--3":"TocNode-module_padding-bottom--3__hxcdg","margin-bottom--4":"TocNode-module_margin-bottom--4__WnEIP","padding-bottom--4":"TocNode-module_padding-bottom--4__4zSJn","margin-bottom--5":"TocNode-module_margin-bottom--5__wL9Ne","padding-bottom--5":"TocNode-module_padding-bottom--5__IqYG-","margin-bottom--6":"TocNode-module_margin-bottom--6__eNOG6","padding-bottom--6":"TocNode-module_padding-bottom--6__YdvI7","margin-bottom--7":"TocNode-module_margin-bottom--7__KUFUK","padding-bottom--7":"TocNode-module_padding-bottom--7__ygSn0","margin-bottom--8":"TocNode-module_margin-bottom--8__nOVRB","padding-bottom--8":"TocNode-module_padding-bottom--8__6hyLl","margin-bottom--9":"TocNode-module_margin-bottom--9__fynWq","padding-bottom--9":"TocNode-module_padding-bottom--9__UlUEw","margin-bottom--10":"TocNode-module_margin-bottom--10__sHzWe","padding-bottom--10":"TocNode-module_padding-bottom--10__9uEpk","margin-bottom--11":"TocNode-module_margin-bottom--11__NoGHl","padding-bottom--11":"TocNode-module_padding-bottom--11__no9vn","margin-bottom--12":"TocNode-module_margin-bottom--12__kUG-q","padding-bottom--12":"TocNode-module_padding-bottom--12__keScA","margin-left":"TocNode-module_margin-left__YD4P0","padding-left":"TocNode-module_padding-left__loWvi","margin-left--1":"TocNode-module_margin-left--1__duWm2","padding-left--1":"TocNode-module_padding-left--1__x26oI","margin-left--2":"TocNode-module_margin-left--2__wW8Xa","padding-left--2":"TocNode-module_padding-left--2__1BSaF","margin-left--3":"TocNode-module_margin-left--3__lGdyT","padding-left--3":"TocNode-module_padding-left--3__M5TMw","margin-left--4":"TocNode-module_margin-left--4__552IN","padding-left--4":"TocNode-module_padding-left--4__euIHe","margin-left--5":"TocNode-module_margin-left--5__ayByu","padding-left--5":"TocNode-module_padding-left--5__41-1-","margin-left--6":"TocNode-module_margin-left--6__YBrdy","padding-left--6":"TocNode-module_padding-left--6__Pz0p8","margin-left--7":"TocNode-module_margin-left--7__Q-P0g","padding-left--7":"TocNode-module_padding-left--7__nh7i0","margin-left--8":"TocNode-module_margin-left--8__eMsG4","padding-left--8":"TocNode-module_padding-left--8__1qDxM","margin-left--9":"TocNode-module_margin-left--9__KLfnP","padding-left--9":"TocNode-module_padding-left--9__HWx3U","margin-left--10":"TocNode-module_margin-left--10__GBbx0","padding-left--10":"TocNode-module_padding-left--10__anfGM","margin-left--11":"TocNode-module_margin-left--11__yEs0u","padding-left--11":"TocNode-module_padding-left--11__J2WMr","margin-left--12":"TocNode-module_margin-left--12__iwhve","padding-left--12":"TocNode-module_padding-left--12__t-jiz","margin-right":"TocNode-module_margin-right__AMvH2","padding-right":"TocNode-module_padding-right__rpAMU","margin-right--1":"TocNode-module_margin-right--1__9hjSa","padding-right--1":"TocNode-module_padding-right--1__q8--P","margin-right--2":"TocNode-module_margin-right--2__-h7kr","padding-right--2":"TocNode-module_padding-right--2__i3vFY","margin-right--3":"TocNode-module_margin-right--3__bpvh3","padding-right--3":"TocNode-module_padding-right--3__A4NMh","margin-right--4":"TocNode-module_margin-right--4__5vBFO","padding-right--4":"TocNode-module_padding-right--4__KNRf3","margin-right--5":"TocNode-module_margin-right--5__8F2Pd","padding-right--5":"TocNode-module_padding-right--5__ADNNU","margin-right--6":"TocNode-module_margin-right--6__haTIR","padding-right--6":"TocNode-module_padding-right--6__hNIcu","margin-right--7":"TocNode-module_margin-right--7__ZBZX4","padding-right--7":"TocNode-module_padding-right--7__jE-yV","margin-right--8":"TocNode-module_margin-right--8__SZ1BE","padding-right--8":"TocNode-module_padding-right--8__QQm5i","margin-right--9":"TocNode-module_margin-right--9__1KJco","padding-right--9":"TocNode-module_padding-right--9__bMQlW","margin-right--10":"TocNode-module_margin-right--10__FcLVR","padding-right--10":"TocNode-module_padding-right--10__4A6qb","margin-right--11":"TocNode-module_margin-right--11__e155j","padding-right--11":"TocNode-module_padding-right--11__5-u8k","margin-right--12":"TocNode-module_margin-right--12__mZVKB","padding-right--12":"TocNode-module_padding-right--12__kuqDY","error":"TocNode-module_error__Hlb6m","font--primary":"TocNode-module_font--primary__CRk4V","font--secondary":"TocNode-module_font--secondary__UejbC","font--code":"TocNode-module_font--code__ucfwq","font-weight--400":"TocNode-module_font-weight--400__xzAZM","font-weight--500":"TocNode-module_font-weight--500__AfToc","font-weight--600":"TocNode-module_font-weight--600__nvn7K","font-weight--700":"TocNode-module_font-weight--700__ywq6K","font-weight--800":"TocNode-module_font-weight--800__U9UHi","font-size--h1":"TocNode-module_font-size--h1__SQvb5","font-size--h2":"TocNode-module_font-size--h2__hDaTr","font-size--h3":"TocNode-module_font-size--h3__3ov1v","font-size--h4":"TocNode-module_font-size--h4__nXGe7","font-size--h5":"TocNode-module_font-size--h5__hby4y","font-size--h6":"TocNode-module_font-size--h6__nXkt-","font-size--big":"TocNode-module_font-size--big__F7gRB","font-size--button":"TocNode-module_font-size--button__Gy7ry","font-size--p":"TocNode-module_font-size--p__i89-8","font-size--small":"TocNode-module_font-size--small__nM821","font-size--very-small":"TocNode-module_font-size--very-small__vEgQm","font-size--tiny":"TocNode-module_font-size--tiny__Xrlk2","font-size--micro":"TocNode-module_font-size--micro__g12V-","line-height--large":"TocNode-module_line-height--large__iFblE","line-height--normal":"TocNode-module_line-height--normal__cGgk8","line-height--small":"TocNode-module_line-height--small__v1-tQ","line-height--very-small":"TocNode-module_line-height--very-small__guFgk","text-align--center":"TocNode-module_text-align--center__UiMbU","category__header":"TocNode-module_category__header__TxLQX","a--highlighted":"TocNode-module_a--highlighted__KpPUK","grecaptcha-badge":"TocNode-module_grecaptcha-badge__MtOmc","container":"TocNode-module_container__lJX0X","container--contents-centered":"TocNode-module_container--contents-centered__SyXK5","container--no-padding":"TocNode-module_container--no-padding__-GPQx","page":"TocNode-module_page__XmMOm","page--contents-max-width":"TocNode-module_page--contents-max-width__a9wqT","page--no-extra-padding":"TocNode-module_page--no-extra-padding__xtQbg","page--no-max-width":"TocNode-module_page--no-max-width__mifQf","hr":"TocNode-module_hr__9oSQb","li--disabled":"TocNode-module_li--disabled__S1DJ3","block":"TocNode-module_block__6-aLr","toc-node__title":"TocNode-module_toc-node__title__Fqq9L","fadeInDown":"TocNode-module_fadeInDown__3aHIH","toc-node__title--active":"TocNode-module_toc-node__title--active__8WI6n","toc-node__title--sub":"TocNode-module_toc-node__title--sub__YYK1i","toc-node__title--sub-sub":"TocNode-module_toc-node__title--sub-sub__sCOE9","toc-node__children--sub-sub":"TocNode-module_toc-node__children--sub-sub__5SLID","toc-node__children--sub":"TocNode-module_toc-node__children--sub__oovR3","loading_animation":"TocNode-module_loading_animation__7zt5j","MoveInTop":"TocNode-module_MoveInTop__KWNfL","fadeUp":"TocNode-module_fadeUp__9Aftz"};
6
+
7
+ exports.default = styles;
8
+ //# sourceMappingURL=TocNode.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TocNode.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -4,8 +4,8 @@ import { lazy, forwardRef, Suspense } from 'react';
4
4
  import BlogSectionStatic from '../staticComponents/BlogSectionStatic.js';
5
5
 
6
6
  const BlogSectionDynamic = lazy(() => import('../dynamicComponents/BlogSectionDynamic.js'));
7
- const BlogSection = forwardRef(({ title = '', category = '', children = null, increaseMarginBottom = false, }, ref) => {
8
- return (jsx(Suspense, { fallback: jsx(BlogSectionStatic, { title: title, category: category, increaseMarginBottom: increaseMarginBottom, children: children }), children: jsx(BlogSectionDynamic, { ref: ref, title: title, category: category, increaseMarginBottom: increaseMarginBottom, children: children }) }));
7
+ const BlogSection = forwardRef(({ title = '', category = '', children = null, }, ref) => {
8
+ return (jsx(Suspense, { fallback: jsx(BlogSectionStatic, { title: title, category: category, children: children }), children: jsx(BlogSectionDynamic, { ref: ref, title: title, category: category, children: children }) }));
9
9
  });
10
10
  BlogSection.displayName = 'BlogSection';
11
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"BlogSection.js","sources":["../../../src/components/BlogSection.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, lazy, Suspense } from 'react';\nimport type { ReactNode } from 'react';\nimport BlogSectionStatic from '../staticComponents/BlogSectionStatic';\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\nexport type { ForwardedReference };\n\nconst BlogSectionDynamic = lazy(\n\t() => import('../dynamicComponents/BlogSectionDynamic')\n);\n\ninterface BlogSectionProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n\tincreaseMarginBottom?: boolean;\n}\n\nconst BlogSection = forwardRef<ForwardedReference, BlogSectionProperties>(\n\t(\n\t\t{\n\t\t\ttitle = '',\n\t\t\tcategory = '',\n\t\t\tchildren = null,\n\t\t\tincreaseMarginBottom = false,\n\t\t},\n\t\tref\n\t) => {\n\t\treturn (\n\t\t\t<Suspense\n\t\t\t\tfallback={\n\t\t\t\t\t<BlogSectionStatic\n\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\tcategory={category}\n\t\t\t\t\t\tincreaseMarginBottom={increaseMarginBottom}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</BlogSectionStatic>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<BlogSectionDynamic\n\t\t\t\t\tref={ref}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tcategory={category}\n\t\t\t\t\tincreaseMarginBottom={increaseMarginBottom}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</BlogSectionDynamic>\n\t\t\t</Suspense>\n\t\t);\n\t}\n);\n\nBlogSection.displayName = 'BlogSection';\n\nexport default BlogSection;\n"],"names":["_jsx"],"mappings":";;;;AAQA,MAAM,kBAAkB,GAAG,IAAI,CAC9B,MAAM,OAAO,4CAAyC,CAAC,CACvD;AASD,MAAM,WAAW,GAAG,UAAU,CAC7B,CACC,EACC,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,oBAAoB,GAAG,KAAK,GAC5B,EACD,GAAG,KACA;IACH,QACCA,IAAC,QAAQ,EAAA,EACR,QAAQ,EACPA,GAAA,CAAC,iBAAiB,EAAA,EACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACU,YAGrBA,GAAA,CAAC,kBAAkB,IAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,oBAAoB,YAEzC,QAAQ,EAAA,CACW,EAAA,CACX;AAEb,CAAC;AAGF,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"BlogSection.js","sources":["../../../src/components/BlogSection.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, lazy, Suspense } from 'react';\nimport type { ReactNode } from 'react';\nimport BlogSectionStatic from '../staticComponents/BlogSectionStatic';\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\nexport type { ForwardedReference };\n\nconst BlogSectionDynamic = lazy(\n\t() => import('../dynamicComponents/BlogSectionDynamic')\n);\n\ninterface BlogSectionProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n}\n\nconst BlogSection = forwardRef<ForwardedReference, BlogSectionProperties>(\n\t(\n\t\t{\n\t\t\ttitle = '',\n\t\t\tcategory = '',\n\t\t\tchildren = null,\n\t\t},\n\t\tref\n\t) => {\n\t\treturn (\n\t\t\t<Suspense\n\t\t\t\tfallback={\n\t\t\t\t\t<BlogSectionStatic\n\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\tcategory={category}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</BlogSectionStatic>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<BlogSectionDynamic\n\t\t\t\t\tref={ref}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tcategory={category}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</BlogSectionDynamic>\n\t\t\t</Suspense>\n\t\t);\n\t}\n);\n\nBlogSection.displayName = 'BlogSection';\n\nexport default BlogSection;\n"],"names":["_jsx"],"mappings":";;;;AAQA,MAAM,kBAAkB,GAAG,IAAI,CAC9B,MAAM,OAAO,4CAAyC,CAAC,CACvD;AAQD,MAAM,WAAW,GAAG,UAAU,CAC7B,CACC,EACC,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,GACf,EACD,GAAG,KACA;AACH,IAAA,QACCA,GAAA,CAAC,QAAQ,EAAA,EACR,QAAQ,EACPA,GAAA,CAAC,iBAAiB,EAAA,EACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,EAAA,CACU,EAAA,QAAA,EAGrBA,GAAA,CAAC,kBAAkB,EAAA,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAAA,QAAA,EAEjB,QAAQ,EAAA,CACW,EAAA,CACX;AAEb,CAAC;AAGF,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
@@ -1,187 +1,42 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { useRef, useState, useCallback, useEffect, Children, isValidElement, cloneElement } from 'react';
3
+ import { useState, Children, isValidElement, cloneElement } from 'react';
4
4
  import { useSpring, config, animated } from '@react-spring/web';
5
5
  import styles from '../styles/Blog.module.scss.js';
6
- import lockScrollUpdates from '../utils/lockScrollUpdates.js';
6
+ import { useCategoryTitles } from '../hooks/useCategoryTitles.js';
7
+ import { useSectionObserver } from '../hooks/useSectionObserver.js';
8
+ import TocNode from '../staticComponents/TocNodeStatic.js';
7
9
 
10
+ const buildTocTree = (entries) => {
11
+ const roots = [];
12
+ const stack = [];
13
+ for (const [id, { title, depth }] of entries) {
14
+ const node = { id, title, depth, children: [] };
15
+ while (stack.length > 0 && stack[stack.length - 1].depth >= depth) {
16
+ stack.pop();
17
+ }
18
+ if (stack.length === 0) {
19
+ roots.push(node);
20
+ }
21
+ else {
22
+ stack[stack.length - 1].children.push(node);
23
+ }
24
+ stack.push(node);
25
+ }
26
+ return roots;
27
+ };
8
28
  const Blog = ({ children, title = 'In this article', jsonLd, }) => {
9
- const sectionReferences = useRef(new Map());
10
- const [categoryTitles, setCategoryTitles] = useState(new Map());
11
29
  const [visibleTitle, setVisibleTitle] = useState(null);
12
30
  const [showTOC, setShowTOC] = useState(false);
13
- const updateTimerRef = useRef(null);
14
- const showTOCTimerRef = useRef(null);
15
- const isClickScrolling = useRef(false);
16
- const scrollEndHandlerRef = useRef(null);
17
- const intersectionObserversRef = useRef(new Map());
18
- const sortByDomPosition = useCallback(([, a], [, b]) => {
19
- const position = a.el.compareDocumentPosition(b.el);
20
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) {
21
- return -1; // a comes before b
22
- }
23
- else if (position & Node.DOCUMENT_POSITION_PRECEDING) {
24
- return 1; // b comes before a
25
- }
26
- return 0;
27
- }, []);
28
- const updateCategoryTitles = useCallback(() => {
29
- const now = Date.now();
30
- const newCategoryTitles = new Map();
31
- // Sort sections by their DOM position to maintain correct order
32
- const sectionsArray = Array.from(sectionReferences.current.entries());
33
- sectionsArray.sort(sortByDomPosition);
34
- let firstSectionId = null;
35
- for (const [id, { title, el, isSubSection }] of sectionsArray) {
36
- if (!firstSectionId) {
37
- firstSectionId = id;
38
- }
39
- newCategoryTitles.set(id, {
40
- el,
41
- title,
42
- lastUpdatedAt: now,
43
- isSubSection,
44
- });
45
- }
46
- if (newCategoryTitles.size === 0)
47
- return;
48
- setCategoryTitles(newCategoryTitles);
49
- if (!showTOC)
50
- setShowTOC(true);
51
- if (visibleTitle)
52
- return;
53
- setVisibleTitle(firstSectionId);
54
- }, [visibleTitle, sortByDomPosition, showTOC, setShowTOC]);
55
- const debounceUpdateCategoryTitles = useCallback(() => {
56
- // Clear existing timer and set a new one to batch updates
57
- if (updateTimerRef.current) {
58
- clearTimeout(updateTimerRef.current);
59
- }
60
- updateTimerRef.current = setTimeout(() => {
61
- updateCategoryTitles();
62
- }, 200);
63
- }, [updateCategoryTitles]);
64
- useEffect(() => {
65
- for (const [id, { el }] of categoryTitles) {
66
- const observer = new IntersectionObserver(([entry]) => {
67
- if (!entry.isIntersecting)
68
- return;
69
- if (isClickScrolling.current)
70
- return;
71
- if (document.body.scrollTop === 0)
72
- return;
73
- setVisibleTitle(visibleId => {
74
- if (visibleId === id && !entry.isIntersecting)
75
- return null;
76
- if (entry.isIntersecting)
77
- return id;
78
- return visibleId;
79
- });
80
- const url = new URL(window.location.href);
81
- url.searchParams.set('section', id);
82
- window.history.replaceState({}, '', url.toString());
83
- }, { threshold: 0.1 });
84
- intersectionObserversRef.current.set(id, observer);
85
- observer.observe(el);
86
- }
87
- }, [categoryTitles.size]);
88
- useEffect(() => {
89
- return () => {
90
- if (updateTimerRef.current) {
91
- clearTimeout(updateTimerRef.current);
92
- }
93
- if (showTOCTimerRef.current) {
94
- clearTimeout(showTOCTimerRef.current);
95
- }
96
- if (scrollEndHandlerRef.current) {
97
- document.body.removeEventListener('scrollend', scrollEndHandlerRef.current);
98
- }
99
- if (intersectionObserversRef.current) {
100
- for (const observer of intersectionObserversRef.current.values()) {
101
- observer.disconnect();
102
- }
103
- }
104
- };
105
- }, []);
106
- const getSectionFromUrl = () => {
107
- const url = new URL(window.location.href);
108
- const section = url.searchParams.get('section');
109
- if (!section)
110
- return null;
111
- return section;
112
- };
113
- const updateUrl = (id) => {
114
- const url = new URL(window.location.href);
115
- url.searchParams.set('section', id);
116
- window.history.replaceState({}, '', url.toString());
117
- };
118
- const scrollIntoView = (element) => {
119
- if (!element)
120
- return;
121
- const top = element.getBoundingClientRect().top + document.body.scrollTop - 100;
122
- document.body.scrollTo({ top, behavior: 'smooth' });
123
- };
124
- // On initial load, scroll to section specified in URL
125
- useEffect(() => {
126
- if (categoryTitles.size === 0)
127
- return;
128
- const section = getSectionFromUrl();
129
- if (!section) {
130
- return;
131
- }
132
- const entry = categoryTitles.get(section);
133
- if (!entry) {
134
- return;
135
- }
136
- scrollIntoView(entry.el);
137
- lockScrollUpdates(section, isClickScrolling, scrollEndHandlerRef, setVisibleTitle);
138
- }, [categoryTitles.size]);
139
- const handleSectionReference = useCallback((element) => {
140
- if (!element)
141
- return;
142
- const { parentRef, childRefs } = element;
143
- // Add parent section reference
144
- if (parentRef) {
145
- const id = parentRef.dataset.id;
146
- const title = parentRef.dataset.title;
147
- if (id && title) {
148
- sectionReferences.current.set(id, {
149
- el: parentRef,
150
- title,
151
- isSubSection: false,
152
- });
153
- }
154
- }
155
- // Add child section references
156
- if (Array.isArray(childRefs)) {
157
- for (const childRef of childRefs) {
158
- if (!childRef)
159
- continue;
160
- const id = childRef.dataset.id;
161
- const title = childRef.dataset.title;
162
- if (id && title) {
163
- sectionReferences.current.set(id, {
164
- el: childRef,
165
- title,
166
- isSubSection: true,
167
- });
168
- }
169
- }
170
- }
171
- debounceUpdateCategoryTitles();
172
- }, [debounceUpdateCategoryTitles]);
173
- const handleClickCategoryTitle = (error) => {
174
- const id = error.currentTarget.dataset.id;
175
- const index = error.currentTarget.dataset.idx;
176
- if (!id || !index)
177
- return;
178
- const { el } = categoryTitles.get(id) || {};
179
- if (!el)
180
- return;
181
- updateUrl(id);
182
- scrollIntoView(el);
183
- lockScrollUpdates(id, isClickScrolling, scrollEndHandlerRef, setVisibleTitle);
184
- };
31
+ const { categoryTitles, handleSectionReference } = useCategoryTitles({
32
+ visibleTitle,
33
+ setVisibleTitle,
34
+ setShowTOC,
35
+ });
36
+ const { handleClickCategoryTitle } = useSectionObserver({
37
+ categoryTitles,
38
+ setVisibleTitle,
39
+ });
185
40
  const sidebarStyle = useSpring({
186
41
  opacity: showTOC ? 1 : 0,
187
42
  transform: showTOC ? 'translateX(0)' : 'translateX(40px)',
@@ -193,12 +48,7 @@ const Blog = ({ children, title = 'In this article', jsonLd, }) => {
193
48
  return cloneElement(child, {
194
49
  ref: handleSectionReference,
195
50
  });
196
- }) }), jsxs(animated.div, { className: styles['blog__sidebar'], style: sidebarStyle, children: [jsx("p", { className: `${styles['margin-bottom--3']} ${styles['category__header']}`, children: title }), [...categoryTitles].map(([id, { title, isSubSection }], index, array) => {
197
- const isNextSectionSubSection = array[index + 1]?.[1]?.isSubSection;
198
- return (jsx("p", { "data-idx": index, "data-id": id, className: `${styles['category__title']} ${id === visibleTitle ? styles['category__title--active'] : ''} ${isSubSection ? styles['category__title--sub'] : ''} ${isSubSection && !isNextSectionSubSection
199
- ? styles['margin-bottom-imp--2']
200
- : ''}`, onClick: handleClickCategoryTitle, children: title }, id));
201
- })] })] }));
51
+ }) }), jsxs(animated.div, { className: styles['blog__sidebar'], style: sidebarStyle, children: [jsx("p", { className: `${styles['margin-bottom--3']} ${styles['category__header']}`, children: title }), buildTocTree([...categoryTitles]).map((node, i) => (jsx(TocNode, { node: node, index: i, visibleTitle: visibleTitle, onClick: handleClickCategoryTitle }, node.id)))] })] }));
202
52
  };
203
53
 
204
54
  export { Blog as default };
@@ -1 +1 @@
1
- {"version":3,"file":"BlogDynamic.js","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"sourcesContent":["'use client';\n\nimport {\n\tChildren,\n\tcloneElement,\n\tisValidElement,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport { useSpring, animated, config } from '@react-spring/web';\n\nimport type { MouseEvent, ReactNode, RefAttributes } from 'react';\nimport type { Thing, WithContext } from 'schema-dts';\n\nimport styles from '../styles/Blog.module.scss';\nimport lockScrollUpdates from '../utils/lockScrollUpdates';\n\ninterface BlogProperties {\n\tchildren: ReactNode;\n\ttitle?: string;\n\tjsonLd?: WithContext<Thing>;\n}\n\nexport interface ForwardedReference {\n\tparentRef: HTMLDivElement;\n\tchildRefs: HTMLDivElement[];\n}\n\ninterface SectionReferenceValue {\n\tel: HTMLElement;\n\ttitle: string;\n\tisSubSection: boolean;\n}\n\ntype SectionReference = Map<string, SectionReferenceValue>;\n\ninterface CategoryTitleValue extends SectionReferenceValue {\n\tlastUpdatedAt: number;\n}\n\ntype CategoryTitle = Map<string, CategoryTitleValue>;\n\nconst Blog = ({\n\tchildren,\n\ttitle = 'In this article',\n\tjsonLd,\n}: BlogProperties) => {\n\tconst sectionReferences = useRef<SectionReference>(new Map());\n\tconst [categoryTitles, setCategoryTitles] = useState<CategoryTitle>(\n\t\tnew Map()\n\t);\n\tconst [visibleTitle, setVisibleTitle] = useState<string | null>(null);\n\tconst [showTOC, setShowTOC] = useState(false);\n\n\tconst updateTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst showTOCTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst isClickScrolling = useRef(false);\n\tconst scrollEndHandlerRef = useRef<(() => void) | null>(null);\n\tconst intersectionObserversRef = useRef<Map<string, IntersectionObserver>>(\n\t\tnew Map()\n\t);\n\n\tconst sortByDomPosition = useCallback(\n\t\t(\n\t\t\t[, a]: [string, SectionReferenceValue],\n\t\t\t[, b]: [string, SectionReferenceValue]\n\t\t) => {\n\t\t\tconst position = a.el.compareDocumentPosition(b.el);\n\t\t\tif (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t\t\t\treturn -1; // a comes before b\n\t\t\t} else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t\t\t\treturn 1; // b comes before a\n\t\t\t}\n\t\t\treturn 0;\n\t\t},\n\t\t[]\n\t);\n\n\tconst updateCategoryTitles = useCallback(() => {\n\t\tconst now = Date.now();\n\t\tconst newCategoryTitles = new Map<string, CategoryTitleValue>();\n\n\t\t// Sort sections by their DOM position to maintain correct order\n\t\tconst sectionsArray = Array.from(sectionReferences.current.entries());\n\t\tsectionsArray.sort(sortByDomPosition);\n\n\t\tlet firstSectionId: string | null = null;\n\t\tfor (const [id, { title, el, isSubSection }] of sectionsArray) {\n\t\t\tif (!firstSectionId) {\n\t\t\t\tfirstSectionId = id;\n\t\t\t}\n\t\t\tnewCategoryTitles.set(id, {\n\t\t\t\tel,\n\t\t\t\ttitle,\n\t\t\t\tlastUpdatedAt: now,\n\t\t\t\tisSubSection,\n\t\t\t});\n\t\t}\n\n\t\tif (newCategoryTitles.size === 0) return;\n\n\t\tsetCategoryTitles(newCategoryTitles);\n\t\tif (!showTOC) setShowTOC(true);\n\n\t\tif (visibleTitle) return;\n\t\tsetVisibleTitle(firstSectionId);\n\t}, [visibleTitle, sortByDomPosition, showTOC, setShowTOC]);\n\n\tconst debounceUpdateCategoryTitles = useCallback(() => {\n\t\t// Clear existing timer and set a new one to batch updates\n\t\tif (updateTimerRef.current) {\n\t\t\tclearTimeout(updateTimerRef.current);\n\t\t}\n\t\tupdateTimerRef.current = setTimeout(() => {\n\t\t\tupdateCategoryTitles();\n\t\t}, 200);\n\t}, [updateCategoryTitles]);\n\n\tuseEffect(() => {\n\t\tfor (const [id, { el }] of categoryTitles) {\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t([entry]) => {\n\t\t\t\t\tif (!entry.isIntersecting) return;\n\t\t\t\t\tif (isClickScrolling.current) return;\n\t\t\t\t\tif (document.body.scrollTop === 0) return;\n\t\t\t\t\tsetVisibleTitle(visibleId => {\n\t\t\t\t\t\tif (visibleId === id && !entry.isIntersecting) return null;\n\t\t\t\t\t\tif (entry.isIntersecting) return id;\n\t\t\t\t\t\treturn visibleId;\n\t\t\t\t\t});\n\t\t\t\t\tconst url = new URL(window.location.href);\n\t\t\t\t\turl.searchParams.set('section', id);\n\t\t\t\t\twindow.history.replaceState({}, '', url.toString());\n\t\t\t\t},\n\t\t\t\t{ threshold: 0.1 }\n\t\t\t);\n\t\t\tintersectionObserversRef.current.set(id, observer);\n\t\t\tobserver.observe(el as HTMLElement);\n\t\t}\n\t}, [categoryTitles.size]);\n\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (updateTimerRef.current) {\n\t\t\t\tclearTimeout(updateTimerRef.current);\n\t\t\t}\n\t\t\tif (showTOCTimerRef.current) {\n\t\t\t\tclearTimeout(showTOCTimerRef.current);\n\t\t\t}\n\t\t\tif (scrollEndHandlerRef.current) {\n\t\t\t\tdocument.body.removeEventListener(\n\t\t\t\t\t'scrollend',\n\t\t\t\t\tscrollEndHandlerRef.current\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (intersectionObserversRef.current) {\n\t\t\t\tfor (const observer of intersectionObserversRef.current.values()) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst getSectionFromUrl = () => {\n\t\tconst url = new URL(window.location.href);\n\t\tconst section = url.searchParams.get('section');\n\t\tif (!section) return null;\n\t\treturn section;\n\t};\n\n\tconst updateUrl = (id: string) => {\n\t\tconst url = new URL(window.location.href);\n\t\turl.searchParams.set('section', id);\n\t\twindow.history.replaceState({}, '', url.toString());\n\t};\n\n\tconst scrollIntoView = (element: HTMLElement) => {\n\t\tif (!element) return;\n\t\tconst top =\n\t\t\telement.getBoundingClientRect().top + document.body.scrollTop - 100;\n\t\tdocument.body.scrollTo({ top, behavior: 'smooth' });\n\t};\n\n\t// On initial load, scroll to section specified in URL\n\tuseEffect(() => {\n\t\tif (categoryTitles.size === 0) return;\n\t\tconst section = getSectionFromUrl();\n\t\tif (!section) {\n\t\t\treturn;\n\t\t}\n\t\tconst entry = categoryTitles.get(section);\n\t\tif (!entry) {\n\t\t\treturn;\n\t\t}\n\t\tscrollIntoView(entry.el);\n\t\tlockScrollUpdates(\n\t\t\tsection,\n\t\t\tisClickScrolling,\n\t\t\tscrollEndHandlerRef,\n\t\t\tsetVisibleTitle\n\t\t);\n\t}, [categoryTitles.size]);\n\n\tconst handleSectionReference = useCallback(\n\t\t(element: ForwardedReference) => {\n\t\t\tif (!element) return;\n\t\t\tconst { parentRef, childRefs } = element;\n\n\t\t\t// Add parent section reference\n\t\t\tif (parentRef) {\n\t\t\t\tconst id = parentRef.dataset.id;\n\t\t\t\tconst title = parentRef.dataset.title;\n\t\t\t\tif (id && title) {\n\t\t\t\t\tsectionReferences.current.set(id, {\n\t\t\t\t\t\tel: parentRef,\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tisSubSection: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add child section references\n\t\t\tif (Array.isArray(childRefs)) {\n\t\t\t\tfor (const childRef of childRefs) {\n\t\t\t\t\tif (!childRef) continue;\n\t\t\t\t\tconst id = childRef.dataset.id;\n\t\t\t\t\tconst title = childRef.dataset.title;\n\t\t\t\t\tif (id && title) {\n\t\t\t\t\t\tsectionReferences.current.set(id, {\n\t\t\t\t\t\t\tel: childRef,\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tisSubSection: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdebounceUpdateCategoryTitles();\n\t\t},\n\t\t[debounceUpdateCategoryTitles]\n\t);\n\n\tconst handleClickCategoryTitle = (\n\t\terror: MouseEvent<HTMLParagraphElement>\n\t) => {\n\t\tconst id = error.currentTarget.dataset.id;\n\t\tconst index = error.currentTarget.dataset.idx;\n\t\tif (!id || !index) return;\n\n\t\tconst { el } = categoryTitles.get(id) || {};\n\t\tif (!el) return;\n\n\t\tupdateUrl(id);\n\n\t\tscrollIntoView(el);\n\n\t\tlockScrollUpdates(\n\t\t\tid,\n\t\t\tisClickScrolling,\n\t\t\tscrollEndHandlerRef,\n\t\t\tsetVisibleTitle\n\t\t);\n\t};\n\n\tconst sidebarStyle = useSpring({\n\t\topacity: showTOC ? 1 : 0,\n\t\ttransform: showTOC ? 'translateX(0)' : 'translateX(40px)',\n\t\tconfig: config.gentle,\n\t});\n\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']}>\n\t\t\t\t{Children.map(children, child => {\n\t\t\t\t\tif (!isValidElement(child)) return child;\n\t\t\t\t\treturn cloneElement(child, {\n\t\t\t\t\t\tref: handleSectionReference,\n\t\t\t\t\t} as RefAttributes<ForwardedReference>);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t\t<animated.div className={styles['blog__sidebar']} style={sidebarStyle}>\n\t\t\t\t<p\n\t\t\t\t\tclassName={`${styles['margin-bottom--3']} ${styles['category__header']}`}\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</p>\n\t\t\t\t{[...categoryTitles].map(\n\t\t\t\t\t([id, { title, isSubSection }], index, array) => {\n\t\t\t\t\t\tconst isNextSectionSubSection = array[index + 1]?.[1]?.isSubSection;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tdata-idx={index}\n\t\t\t\t\t\t\t\tdata-id={id}\n\t\t\t\t\t\t\t\tclassName={`${styles['category__title']} ${\n\t\t\t\t\t\t\t\t\tid === visibleTitle ? styles['category__title--active'] : ''\n\t\t\t\t\t\t\t\t} ${isSubSection ? styles['category__title--sub'] : ''} ${\n\t\t\t\t\t\t\t\t\tisSubSection && !isNextSectionSubSection\n\t\t\t\t\t\t\t\t\t\t? styles['margin-bottom-imp--2']\n\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\tonClick={handleClickCategoryTitle}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t</animated.div>\n\t\t</div>\n\t);\n};\n\nexport default Blog;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AA4CA,MAAM,IAAI,GAAG,CAAC,EACb,QAAQ,EACR,KAAK,GAAG,iBAAiB,EACzB,MAAM,GACU,KAAI;IACpB,MAAM,iBAAiB,GAAG,MAAM,CAAmB,IAAI,GAAG,EAAE,CAAC;AAC7D,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CACnD,IAAI,GAAG,EAAE,CACT;IACD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC;IACrE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAE7C,IAAA,MAAM,cAAc,GAAG,MAAM,CAAuC,IAAI,CAAC;AACzE,IAAA,MAAM,eAAe,GAAG,MAAM,CAAuC,IAAI,CAAC;AAC1E,IAAA,MAAM,gB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AAA,CAAA,EAAI,MAAM,CAAC,kBAAkB,CAAC,CAAA,CAAE,EAAA,QAAA,EAEvE,KAAK,EAAA,CACH,EACH,CAAC,GAAG,cAAc,CAAC,CAAC,GAAG,CACvB,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAI;AAC/C,wBAAA,MAAM,uBAAuB,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY;wBACnE,QACCA,uBAEW,KAAK,EAAA,SAAA,EACN,EAAE,EACX,SAAS,EAAE,CAAA,EAAG,MAAM,CAAC,iBAAiB,CAAC,IACtC,EAAE,KAAK,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC,GAAG,EAC3D,IAAI,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,CAAA,CAAA,EACrD,YAAY,IAAI,CAAC;AAChB,kCAAE,MAAM,CAAC,sBAAsB;AAC/B,kCAAE,EACJ,CAAA,CAAE,EACF,OAAO,EAAE,wBAAwB,EAAA,QAAA,EAEhC,KAAK,EAAA,EAZD,EAAE,CAaJ;AAEN,oBAAA,CAAC,CACD,CAAA,EAAA,CACa,CAAA,EAAA,CACV;AAER;;;;"}
1
+ {"version":3,"file":"BlogDynamic.js","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"sourcesContent":["'use client';\n\nimport {\n\tChildren,\n\tcloneElement,\n\tisValidElement,\n\tuseState,\n} from 'react';\nimport { useSpring, animated, config } from '@react-spring/web';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { Thing, WithContext } from 'schema-dts';\n\nimport styles from '../styles/Blog.module.scss';\nimport { useCategoryTitles } from '../hooks/useCategoryTitles';\nimport { useSectionObserver } from '../hooks/useSectionObserver';\nimport type { CategoryTitleValue } from '../hooks/useCategoryTitles';\nimport TocNodeStatic from '../staticComponents/TocNodeStatic';\nimport type { TocNode } from '../staticComponents/TocNodeStatic';\n\ninterface BlogProperties {\n\tchildren: ReactNode;\n\ttitle?: string;\n\tjsonLd?: WithContext<Thing>;\n}\n\nexport interface ForwardedReference {\n\tparentRef: HTMLDivElement;\n\tchildRefs: ForwardedReference[];\n}\n\nconst buildTocTree = (entries: [string, CategoryTitleValue][]): TocNode[] => {\n\tconst roots: TocNode[] = [];\n\tconst stack: TocNode[] = [];\n\tfor (const [id, { title, depth }] of entries) {\n\t\tconst node: TocNode = { id, title, depth, children: [] };\n\t\twhile (stack.length > 0 && stack[stack.length - 1].depth >= depth) {\n\t\t\tstack.pop();\n\t\t}\n\t\tif (stack.length === 0) {\n\t\t\troots.push(node);\n\t\t} else {\n\t\t\tstack[stack.length - 1].children.push(node);\n\t\t}\n\t\tstack.push(node);\n\t}\n\treturn roots;\n};\n\nconst Blog = ({\n\tchildren,\n\ttitle = 'In this article',\n\tjsonLd,\n}: BlogProperties) => {\n\tconst [visibleTitle, setVisibleTitle] = useState<string | null>(null);\n\tconst [showTOC, setShowTOC] = useState(false);\n\n\tconst { categoryTitles, handleSectionReference } = useCategoryTitles({\n\t\tvisibleTitle,\n\t\tsetVisibleTitle,\n\t\tsetShowTOC,\n\t});\n\n\tconst { handleClickCategoryTitle } = useSectionObserver({\n\t\tcategoryTitles,\n\t\tsetVisibleTitle,\n\t});\n\n\tconst sidebarStyle = useSpring({\n\t\topacity: showTOC ? 1 : 0,\n\t\ttransform: showTOC ? 'translateX(0)' : 'translateX(40px)',\n\t\tconfig: config.gentle,\n\t});\n\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']}>\n\t\t\t\t{Children.map(children, child => {\n\t\t\t\t\tif (!isValidElement(child)) return child;\n\t\t\t\t\treturn cloneElement(child, {\n\t\t\t\t\t\tref: handleSectionReference,\n\t\t\t\t\t} as RefAttributes<ForwardedReference>);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t\t<animated.div className={styles['blog__sidebar']} style={sidebarStyle}>\n\t\t\t\t<p\n\t\t\t\t\tclassName={`${styles['margin-bottom--3']} ${styles['category__header']}`}\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</p>\n\t\t\t\t{buildTocTree([...categoryTitles]).map((node, i) => (\n\t\t\t\t\t<TocNodeStatic\n\t\t\t\t\t\tkey={node.id}\n\t\t\t\t\t\tnode={node}\n\t\t\t\t\t\tindex={i}\n\t\t\t\t\t\tvisibleTitle={visibleTitle}\n\t\t\t\t\t\tonClick={handleClickCategoryTitle}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</animated.div>\n\t\t</div>\n\t);\n};\n\nexport default Blog;\n"],"names":["_jsxs","_jsx","TocNodeStatic"],"mappings":";;;;;;;;AA+BA,MAAM,YAAY,GAAG,CAAC,OAAuC,KAAe;IAC3E,MAAM,KAAK,GAAc,EAAE;IAC3B,MAAM,KAAK,GAAc,EAAE;AAC3B,IAAA,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,OAAO,EAAE;AAC7C,QAAA,MAAM,IAAI,GAAY,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;AACxD,QAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,EAAE;YAClE,KAAK,CAAC,GAAG,EAAE;QACZ;AACA,QAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QACjB;aAAO;AACN,YAAA,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,C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AAO,YAAY,CAAC,KAAK,EAAE;AAC1B,wBAAA,GAAG,EAAE,sBAAsB;AACU,qBAAA,CAAC;AACxC,gBAAA,CAAC,CAAC,EAAA,CACG,EACND,IAAA,CAAC,QAAQ,CAAC,GAAG,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,YAAY,EAAA,QAAA,EAAA,CACpEC,GAAA,CAAA,GAAA,EAAA,EACC,SAAS,EAAE,CAAA,EAAG,MAAM,CAAC,kBAAkB,CAAC,IAAI,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAA,QAAA,EAEvE,KAAK,GACH,EACH,YAAY,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,MAC9CA,GAAA,CAACC,OAAa,IAEb,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,wBAAwB,EAAA,EAJ5B,IAAI,CAAC,EAAE,CAKX,CACF,CAAC,CAAA,EAAA,CACY,CAAA,EAAA,CACV;AAER;;;;"}
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { forwardRef, useRef, useImperativeHandle, Children, isValidElement, cloneElement } from 'react';
3
+ import { forwardRef, useRef, useImperativeHandle, useEffect, Children, isValidElement, cloneElement } from 'react';
4
4
  import styles from '../styles/BlogSection.module.scss.js';
5
5
  import { generateIdForBlogTitle, generateSectionHref } from '../utils/index.js';
6
6
 
7
- const BlogSection = forwardRef(({ title = '', category = '', children = null, increaseMarginBottom = false, }, forwardedReference) => {
7
+ const BlogSection = forwardRef(({ title = '', category = '', children = null }, forwardedReference) => {
8
8
  const titleWithCategory = category ? `${category} - ${title}` : title;
9
9
  const id = generateIdForBlogTitle(titleWithCategory);
10
10
  const parentReference = useRef(null);
@@ -18,22 +18,30 @@ const BlogSection = forwardRef(({ title = '', category = '', children = null, in
18
18
  imperativeHandleRef.current = handle;
19
19
  return handle;
20
20
  });
21
+ // Re-register when title or category changes so the TOC reflects the updated heading
22
+ useEffect(() => {
23
+ if (typeof forwardedReference === 'function' &&
24
+ imperativeHandleRef.current) {
25
+ forwardedReference(imperativeHandleRef.current);
26
+ }
27
+ }, [title, category]); // eslint-disable-line react-hooks/exhaustive-deps
21
28
  const handleChildReferences = (element) => {
22
29
  if (!element)
23
30
  return;
24
31
  const { parentRef: subParentReference } = element;
25
32
  if (!subParentReference)
26
33
  return;
27
- childReferences.current.push(subParentReference);
28
- // Re-trigger parent ref callback with updated children
29
- if (typeof forwardedReference === 'function' && imperativeHandleRef.current) {
34
+ // Avoid registering the same child section twice
35
+ const alreadyRegistered = childReferences.current.some(ref => ref.parentRef === subParentReference);
36
+ if (!alreadyRegistered) {
37
+ childReferences.current.push(element);
38
+ }
39
+ if (typeof forwardedReference === 'function' &&
40
+ imperativeHandleRef.current) {
30
41
  forwardedReference(imperativeHandleRef.current);
31
42
  }
32
43
  };
33
- return (jsxs("div", { className: `${styles['blog-section']}
34
- ${increaseMarginBottom
35
- ? styles['margin-bottom--9']
36
- : styles['margin-bottom--6']}`, "data-title": title, "data-id": id, ref: parentReference, children: [title ? (jsx("h4", { className: styles['blog-section__title'], children: jsx("a", { href: generateSectionHref(id), className: styles['blog-section__title-link'], onClick: e => e.preventDefault(), children: title }) })) : null, Children.map(children, child => {
44
+ return (jsxs("div", { className: styles['blog-section'], "data-title": title, "data-id": id, ref: parentReference, children: [jsx("h3", { className: `${styles['blog-section__title']} ${title ? '' : styles['blog-section__title--empty']}`, children: title ? (jsx("a", { href: generateSectionHref(id), className: styles['blog-section__title-link'], onClick: e => e.preventDefault(), children: title })) : (jsx("p", { children: "No title" })) }), Children.map(children, child => {
37
45
  if (!isValidElement(child))
38
46
  return child;
39
47
  return cloneElement(child, {
@@ -1 +1 @@
1
- {"version":3,"file":"BlogSectionDynamic.js","sources":["../../../src/dynamicComponents/BlogSectionDynamic.tsx"],"sourcesContent":["'use client';\n\nimport {\n\tChildren,\n\tcloneElement,\n\tforwardRef,\n\tisValidElement,\n\tuseImperativeHandle,\n\tuseRef,\n} from 'react';\n\nimport type { ReactNode, RefAttributes } from 'react';\n\nimport styles from '../styles/BlogSection.module.scss';\n\nimport type { ForwardedReference } from './BlogDynamic';\nimport { generateIdForBlogTitle, generateSectionHref } from '../utils';\n\ninterface BlogProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n\tincreaseMarginBottom?: boolean;\n}\n\nconst BlogSection = forwardRef<ForwardedReference, BlogProperties>(\n\t(\n\t\t{\n\t\t\ttitle = '',\n\t\t\tcategory = '',\n\t\t\tchildren = null,\n\t\t\tincreaseMarginBottom = false,\n\t\t}: BlogProperties,\n\t\tforwardedReference\n\t) => {\n\t\tconst titleWithCategory = category ? `${category} - ${title}` : title;\n\t\tconst id = generateIdForBlogTitle(titleWithCategory);\n\n\t\tconst parentReference = useRef<ForwardedReference['parentRef']>(null);\n\t\tconst childReferences = useRef<ForwardedReference['childRefs']>([]);\n\t\tconst imperativeHandleRef = useRef<ForwardedReference | null>(null);\n\n\t\tuseImperativeHandle(forwardedReference, () => {\n\t\t\tconst handle = {\n\t\t\t\tparentRef: parentReference.current!,\n\t\t\t\tchildRefs: childReferences.current!,\n\t\t\t};\n\t\t\timperativeHandleRef.current = handle;\n\t\t\treturn handle;\n\t\t});\n\n\t\tconst handleChildReferences = (element: ForwardedReference | null) => {\n\t\t\tif (!element) return;\n\t\t\tconst { parentRef: subParentReference } = element;\n\t\t\tif (!subParentReference) return;\n\t\t\tchildReferences.current.push(subParentReference);\n\n\t\t\t// Re-trigger parent ref callback with updated children\n\t\t\tif (typeof forwardedReference === 'function' && imperativeHandleRef.current) {\n\t\t\t\tforwardedReference(imperativeHandleRef.current);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={`${styles['blog-section']}\n\t\t\t\t\t${\n\t\t\t\t\t\tincreaseMarginBottom\n\t\t\t\t\t\t\t? styles['margin-bottom--9']\n\t\t\t\t\t\t\t: styles['margin-bottom--6']\n\t\t\t\t\t}`}\n\t\t\t\tdata-title={title}\n\t\t\t\tdata-id={id}\n\t\t\t\tref={parentReference}\n\t\t\t>\n\t\t\t\t{title ? (\n\t\t\t\t\t<h4 className={styles['blog-section__title']}>\n\t\t\t\t\t\t<a href={generateSectionHref(id)} className={styles['blog-section__title-link']} onClick={e => e.preventDefault()}>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h4>\n\t\t\t\t) : null}\n\t\t\t\t{Children.map(children, child => {\n\t\t\t\t\tif (!isValidElement(child)) return child;\n\t\t\t\t\treturn cloneElement(child, {\n\t\t\t\t\t\tref: handleChildReferences,\n\t\t\t\t\t} as RefAttributes<ForwardedReference>);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nBlogSection.displayName = 'BlogSection';\n\nexport default BlogSection;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;AAyBA,MAAM,WAAW,GAAG,UAAU,CAC7B,CACC,EACC,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,oBAAoB,GAAG,KAAK,GACZ,EACjB,kBAAkB,KACf;AACH,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,CAAA,EAAG,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK;AACrE,IAAA,MAAM,EAAE,GAAG,sBAAsB,CAAC,iBAAiB,CAAC;AAEpD,IAAA,MAAM,eAAe,GAAG,MAAM,CAAkC,IAAI,CAAC;AACrE,IAAA,MAAM,eAAe,GAAG,MAAM,CAAkC,EAAE,CAAC;AACnE,IAAA,MAAM,mBAAmB,GAAG,MAAM,CAA4B,IAAI,CAAC;AAEnE,IAAA,mBAAmB,CAAC,kBAAkB,EAAE,MAAK;AAC5C,QAAA,MAAM,MA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AK,CAAC;AAAE,oBAAA,OAAO,KAAK;gBACxC,OAAO,YAAY,CAAC,KAAK,EAAE;AAC1B,oBAAA,GAAG,EAAE,qBAAqB;AACW,iBAAA,CAAC;YACxC,CAAC,CAAC,CAAA,EAAA,CACG;AAER,CAAC;AAGF,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"BlogSectionDynamic.js","sources":["../../../src/dynamicComponents/BlogSectionDynamic.tsx"],"sourcesContent":["'use client';\n\nimport {\n\tChildren,\n\tcloneElement,\n\tforwardRef,\n\tisValidElement,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n} from 'react';\n\nimport type { ReactNode, RefAttributes } from 'react';\n\nimport styles from '../styles/BlogSection.module.scss';\n\nimport type { ForwardedReference } from './BlogDynamic';\nimport { generateIdForBlogTitle, generateSectionHref } from '../utils';\n\ninterface BlogProperties {\n\ttitle?: string;\n\tcategory?: string;\n\tchildren?: ReactNode;\n}\n\nconst BlogSection = forwardRef<ForwardedReference, BlogProperties>(\n\t(\n\t\t{ title = '', category = '', children = null }: BlogProperties,\n\t\tforwardedReference\n\t) => {\n\t\tconst titleWithCategory = category ? `${category} - ${title}` : title;\n\t\tconst id = generateIdForBlogTitle(titleWithCategory);\n\n\t\tconst parentReference = useRef<ForwardedReference['parentRef']>(null);\n\t\tconst childReferences = useRef<ForwardedReference['childRefs']>([]);\n\t\tconst imperativeHandleRef = useRef<ForwardedReference | null>(null);\n\n\t\tuseImperativeHandle(forwardedReference, () => {\n\t\t\tconst handle = {\n\t\t\t\tparentRef: parentReference.current!,\n\t\t\t\tchildRefs: childReferences.current!,\n\t\t\t};\n\t\t\timperativeHandleRef.current = handle;\n\t\t\treturn handle;\n\t\t});\n\n\t\t// Re-register when title or category changes so the TOC reflects the updated heading\n\t\tuseEffect(() => {\n\t\t\tif (\n\t\t\t\ttypeof forwardedReference === 'function' &&\n\t\t\t\timperativeHandleRef.current\n\t\t\t) {\n\t\t\t\tforwardedReference(imperativeHandleRef.current);\n\t\t\t}\n\t\t}, [title, category]); // eslint-disable-line react-hooks/exhaustive-deps\n\n\t\tconst handleChildReferences = (element: ForwardedReference | null) => {\n\t\t\tif (!element) return;\n\t\t\tconst { parentRef: subParentReference } = element;\n\t\t\tif (!subParentReference) return;\n\n\t\t\t// Avoid registering the same child section twice\n\t\t\tconst alreadyRegistered = childReferences.current.some(\n\t\t\t\tref => ref.parentRef === subParentReference\n\t\t\t);\n\t\t\tif (!alreadyRegistered) {\n\t\t\t\tchildReferences.current.push(element);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof forwardedReference === 'function' &&\n\t\t\t\timperativeHandleRef.current\n\t\t\t) {\n\t\t\t\tforwardedReference(imperativeHandleRef.current);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={styles['blog-section']}\n\t\t\t\tdata-title={title}\n\t\t\t\tdata-id={id}\n\t\t\t\tref={parentReference}\n\t\t\t>\n\t\t\t\t<h3\n\t\t\t\t\tclassName={`${styles['blog-section__title']} ${title ? '' : styles['blog-section__title--empty']}`}\n\t\t\t\t>\n\t\t\t\t\t{title ? (\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref={generateSectionHref(id)}\n\t\t\t\t\t\t\tclassName={styles['blog-section__title-link']}\n\t\t\t\t\t\t\tonClick={e => e.preventDefault()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<p>No title</p>\n\t\t\t\t\t)}\n\t\t\t\t</h3>\n\t\t\t\t{Children.map(children, child => {\n\t\t\t\t\tif (!isValidElement(child)) return child;\n\t\t\t\t\treturn cloneElement(child, {\n\t\t\t\t\t\tref: handleChildReferences,\n\t\t\t\t\t} as RefAttributes<ForwardedReference>);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nBlogSection.displayName = 'BlogSection';\n\nexport default BlogSection;\n"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