@san-siva/blogkit 1.1.41 → 1.1.42
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/dist/cjs/components/MermaidViewport.js.map +1 -1
- package/dist/cjs/hooks/useCategoryTitles.js +8 -14
- package/dist/cjs/hooks/useCategoryTitles.js.map +1 -1
- package/dist/cjs/staticComponents/TocNodeStatic.js +1 -1
- package/dist/cjs/staticComponents/TocNodeStatic.js.map +1 -1
- package/dist/esm/components/MermaidViewport.js.map +1 -1
- package/dist/esm/hooks/useCategoryTitles.js +8 -14
- package/dist/esm/hooks/useCategoryTitles.js.map +1 -1
- package/dist/esm/staticComponents/TocNodeStatic.js +1 -1
- package/dist/esm/staticComponents/TocNodeStatic.js.map +1 -1
- package/dist/types/components/Blog.d.ts +1 -1
- package/dist/types/components/Blog.d.ts.map +1 -1
- package/dist/types/components/BlogHeader.d.ts +1 -1
- package/dist/types/components/BlogHeader.d.ts.map +1 -1
- package/dist/types/components/BlogLink.d.ts +1 -1
- package/dist/types/components/BlogLink.d.ts.map +1 -1
- package/dist/types/components/Callout.d.ts +1 -1
- package/dist/types/components/Callout.d.ts.map +1 -1
- package/dist/types/components/CheckList.d.ts +1 -1
- package/dist/types/components/CheckList.d.ts.map +1 -1
- package/dist/types/components/CodeBlock.d.ts +1 -1
- package/dist/types/components/CodeBlock.d.ts.map +1 -1
- package/dist/types/components/Mermaid.d.ts +1 -1
- package/dist/types/components/Mermaid.d.ts.map +1 -1
- package/dist/types/components/MermaidControls.d.ts +1 -1
- package/dist/types/components/MermaidControls.d.ts.map +1 -1
- package/dist/types/components/MermaidViewport.d.ts +2 -2
- package/dist/types/components/MermaidViewport.d.ts.map +1 -1
- package/dist/types/components/Table.d.ts +1 -1
- package/dist/types/components/Table.d.ts.map +1 -1
- package/dist/types/dynamicComponents/BlogDynamic.d.ts +1 -1
- package/dist/types/dynamicComponents/BlogDynamic.d.ts.map +1 -1
- package/dist/types/dynamicComponents/BlogLinkDynamic.d.ts +1 -1
- package/dist/types/dynamicComponents/BlogLinkDynamic.d.ts.map +1 -1
- package/dist/types/dynamicComponents/CodeBlockDynamic.d.ts +1 -1
- package/dist/types/dynamicComponents/CodeBlockDynamic.d.ts.map +1 -1
- package/dist/types/dynamicComponents/MermaidDynamic.d.ts +1 -1
- package/dist/types/dynamicComponents/MermaidDynamic.d.ts.map +1 -1
- package/dist/types/hooks/useCategoryTitles.d.ts.map +1 -1
- package/dist/types/staticComponents/BlogHeaderStatic.d.ts +1 -1
- package/dist/types/staticComponents/BlogHeaderStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/BlogLinkStatic.d.ts +1 -1
- package/dist/types/staticComponents/BlogLinkStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/BlogSectionStatic.d.ts +1 -1
- package/dist/types/staticComponents/BlogSectionStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/BlogStatic.d.ts +1 -1
- package/dist/types/staticComponents/BlogStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/CalloutStatic.d.ts +1 -1
- package/dist/types/staticComponents/CalloutStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/CheckListStatic.d.ts +1 -1
- package/dist/types/staticComponents/CheckListStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/CodeBlockStatic.d.ts +1 -1
- package/dist/types/staticComponents/CodeBlockStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/MermaidStatic.d.ts +1 -1
- package/dist/types/staticComponents/MermaidStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/TableStatic.d.ts +1 -1
- package/dist/types/staticComponents/TableStatic.d.ts.map +1 -1
- package/dist/types/staticComponents/TocNodeStatic.d.ts +1 -1
- package/dist/types/staticComponents/TocNodeStatic.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/MermaidViewport.tsx +1 -1
- package/src/hooks/useCategoryTitles.ts +16 -18
- package/src/staticComponents/TocNodeStatic.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidViewport.js","sources":["../../../src/components/MermaidViewport.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { PanZoom } from '../hooks/usePanZoom';\n\ninterface MermaidViewportProps {\n\tclassName: string;\n\tdraggingClassName: string;\n\tpan: PanZoom;\n\tcontentRef: React.RefObject<HTMLDivElement>;\n\tcontentId?: string;\n\thidden?: boolean;\n}\n\nconst MermaidViewport = ({\n\tclassName,\n\tdraggingClassName,\n\tpan,\n\tcontentRef,\n\tcontentId,\n\thidden,\n}: MermaidViewportProps) => {\n\tconst viewportRef = useRef<HTMLDivElement>(null);\n\tconst { zoomAtPoint } = pan;\n\n\tuseEffect(() => {\n\t\tconst el = viewportRef.current;\n\t\tif (!el) return;\n\t\tconst onWheel = (e: WheelEvent) => {\n\t\t\tif (!e.ctrlKey) return;\n\t\t\te.preventDefault();\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tzoomAtPoint(e.deltaY, e.clientX - rect.left, e.clientY - rect.top);\n\t\t};\n\t\tel.addEventListener('wheel', onWheel, { passive: false });\n\t\treturn () => el.removeEventListener('wheel', onWheel);\n\t}, [zoomAtPoint]);\n\n\treturn (\n\t\t<div\n\t\t\tref={viewportRef}\n\t\t\tclassName={`${className} ${pan.isDragging ? draggingClassName : ''}`}\n\t\t\tstyle={hidden ? { display: 'none' } : undefined}\n\t\t\tonMouseDown={pan.onMouseDown}\n\t\t\tonMouseMove={pan.onMouseMove}\n\t\t\tonMouseUp={pan.onMouseUp}\n\t\t\tonMouseLeave={pan.onMouseUp}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\ttransform: `translate(${pan.transform.x}px, ${pan.transform.y}px) scale(${pan.transform.scale})`,\n\t\t\t\t\ttransformOrigin: '0 0',\n\t\t\t\t\ttransition: pan.isDragging ? 'none' : 'transform 0.1s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div ref={contentRef} id={contentId} />\n\t\t\t</div>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AAC,WAAW,EAC5B,WAAW,EAAE,GAAG,CAAC,WAAW,EAC5B,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,YAAY,EAAE,GAAG,CAAC,SAAS,EAAA,QAAA,EAE3BA,cAAA,CAAA,KAAA,EAAA,EACC,KAAK,EAAE;AACN,gBAAA,SAAS,EAAE,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,IAAA,EAAO,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,KAAK,CAAA,CAAA,CAAG;AAChG,gBAAA,eAAe,EAAE,KAAK;gBACtB,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,MAAM,GAAG,qBAAqB;AAC3D,aAAA,EAAA,QAAA,EAEDA,cAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAA,CAAI,EAAA,CAClC,EAAA,CACD;AAER;;;;"}
|
|
1
|
+
{"version":3,"file":"MermaidViewport.js","sources":["../../../src/components/MermaidViewport.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { PanZoom } from '../hooks/usePanZoom';\n\ninterface MermaidViewportProps {\n\tclassName: string;\n\tdraggingClassName: string;\n\tpan: PanZoom;\n\tcontentRef: React.RefObject<HTMLDivElement | null>;\n\tcontentId?: string;\n\thidden?: boolean;\n}\n\nconst MermaidViewport = ({\n\tclassName,\n\tdraggingClassName,\n\tpan,\n\tcontentRef,\n\tcontentId,\n\thidden,\n}: MermaidViewportProps) => {\n\tconst viewportRef = useRef<HTMLDivElement>(null);\n\tconst { zoomAtPoint } = pan;\n\n\tuseEffect(() => {\n\t\tconst el = viewportRef.current;\n\t\tif (!el) return;\n\t\tconst onWheel = (e: WheelEvent) => {\n\t\t\tif (!e.ctrlKey) return;\n\t\t\te.preventDefault();\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tzoomAtPoint(e.deltaY, e.clientX - rect.left, e.clientY - rect.top);\n\t\t};\n\t\tel.addEventListener('wheel', onWheel, { passive: false });\n\t\treturn () => el.removeEventListener('wheel', onWheel);\n\t}, [zoomAtPoint]);\n\n\treturn (\n\t\t<div\n\t\t\tref={viewportRef}\n\t\t\tclassName={`${className} ${pan.isDragging ? draggingClassName : ''}`}\n\t\t\tstyle={hidden ? { display: 'none' } : undefined}\n\t\t\tonMouseDown={pan.onMouseDown}\n\t\t\tonMouseMove={pan.onMouseMove}\n\t\t\tonMouseUp={pan.onMouseUp}\n\t\t\tonMouseLeave={pan.onMouseUp}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\ttransform: `translate(${pan.transform.x}px, ${pan.transform.y}px) scale(${pan.transform.scale})`,\n\t\t\t\t\ttransformOrigin: '0 0',\n\t\t\t\t\ttransition: pan.isDragging ? 'none' : 'transform 0.1s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div ref={contentRef} id={contentId} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MermaidViewport;\n"],"names":["useRef","useEffect","_jsx"],"mappings":";;;;;;;AAaA,MAAM,eAAe,GAAG,CAAC,EACxB,SAAS,EACT,iBAAiB,EACjB,GAAG,EACH,UAAU,EACV,SAAS,EACT,MAAM,GACgB,KAAI;AAC1B,IAAA,MAAM,WAAW,GAAGA,YAAM,CAAiB,IAAI,CAAC;AAChD,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG;IAE3BC,eAAS,CAAC,MAAK;AACd,QAAA,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO;AAC9B,QAAA,IAAI,CAAC,EAAE;YAAE;AACT,QAAA,MAAM,OAAO,GAAG,CAAC,CAAa,KAAI;YACjC,IAAI,CAAC,CAAC,CAAC,OAAO;gBAAE;YAChB,CAAC,CAAC,cAAc,EAAE;AAClB,YAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE;YACvC,WAAW,CAAC,CAAC,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;;"}
|
|
@@ -23,7 +23,11 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
23
23
|
const sectionsArray = Array.from(sectionReferences.current.entries());
|
|
24
24
|
sectionsArray.sort(sortByDomPosition);
|
|
25
25
|
let firstSectionId = null;
|
|
26
|
-
|
|
26
|
+
const baseIdCounts = new Map();
|
|
27
|
+
for (const [, { title, el, depth, baseId }] of sectionsArray) {
|
|
28
|
+
const occurrence = (baseIdCounts.get(baseId) ?? 0) + 1;
|
|
29
|
+
baseIdCounts.set(baseId, occurrence);
|
|
30
|
+
const id = occurrence === 1 ? baseId : `${baseId}-${occurrence}`;
|
|
27
31
|
if (!firstSectionId) {
|
|
28
32
|
firstSectionId = id;
|
|
29
33
|
}
|
|
@@ -50,19 +54,10 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
50
54
|
updateCategoryTitles();
|
|
51
55
|
}, 200);
|
|
52
56
|
}, [updateCategoryTitles]);
|
|
53
|
-
const removeStaleRefs = (ref) => {
|
|
54
|
-
for (const [existingId, { el }] of sectionReferences.current) {
|
|
55
|
-
if (el !== ref) {
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
sectionReferences.current.delete(existingId);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
57
|
const handleCategoryTitle = (ref) => {
|
|
63
|
-
const
|
|
58
|
+
const baseId = ref.dataset.id;
|
|
64
59
|
const title = ref.dataset.title;
|
|
65
|
-
if (!
|
|
60
|
+
if (!baseId || !title)
|
|
66
61
|
return;
|
|
67
62
|
let depth = 0;
|
|
68
63
|
let parent = ref.parentElement;
|
|
@@ -71,8 +66,7 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
71
66
|
depth++;
|
|
72
67
|
parent = parent.parentElement;
|
|
73
68
|
}
|
|
74
|
-
|
|
75
|
-
sectionReferences.current.set(id, { el: ref, title, depth });
|
|
69
|
+
sectionReferences.current.set(ref, { el: ref, title, depth, baseId });
|
|
76
70
|
};
|
|
77
71
|
const processSection = (element) => {
|
|
78
72
|
const { parentRef, childRefs } = element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategoryTitles.js","sources":["../../../src/hooks/useCategoryTitles.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\n\nexport interface SectionReferenceValue {\n\tel: HTMLElement;\n\ttitle: string;\n\tdepth: number;\n}\n\nexport interface CategoryTitleValue extends SectionReferenceValue {\n\tlastUpdatedAt: number;\n}\n\nexport type CategoryTitle = Map<string, CategoryTitleValue>;\n\ntype SectionReference = Map<
|
|
1
|
+
{"version":3,"file":"useCategoryTitles.js","sources":["../../../src/hooks/useCategoryTitles.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\n\nexport interface SectionReferenceValue {\n\tel: HTMLElement;\n\ttitle: string;\n\tdepth: number;\n}\n\nexport interface CategoryTitleValue extends SectionReferenceValue {\n\tlastUpdatedAt: number;\n}\n\nexport type CategoryTitle = Map<string, CategoryTitleValue>;\n\ninterface SectionReferenceEntry extends SectionReferenceValue {\n\tbaseId: string;\n}\n\ntype SectionReference = Map<HTMLElement, SectionReferenceEntry>;\n\ninterface Options {\n\tvisibleTitle: string | null;\n\tsetVisibleTitle: Dispatch<SetStateAction<string | null>>;\n\tsetShowTOC: Dispatch<SetStateAction<boolean>>;\n}\n\nexport function useCategoryTitles({\n\tvisibleTitle,\n\tsetVisibleTitle,\n\tsetShowTOC,\n}: Options) {\n\tconst sectionReferences = useRef<SectionReference>(new Map());\n\tconst [categoryTitles, setCategoryTitles] = useState<CategoryTitle>(\n\t\tnew Map()\n\t);\n\tconst updateTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n\tconst sortByDomPosition = useCallback(\n\t\t(\n\t\t\t[, a]: [HTMLElement, SectionReferenceEntry],\n\t\t\t[, b]: [HTMLElement, SectionReferenceEntry]\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;\n\t\t\t} else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t\t\t\treturn 1;\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\tconst sectionsArray = Array.from(sectionReferences.current.entries());\n\t\tsectionsArray.sort(sortByDomPosition);\n\n\t\tlet firstSectionId: string | null = null;\n\t\tconst baseIdCounts = new Map<string, number>();\n\t\tfor (const [, { title, el, depth, baseId }] of sectionsArray) {\n\t\t\tconst occurrence = (baseIdCounts.get(baseId) ?? 0) + 1;\n\t\t\tbaseIdCounts.set(baseId, occurrence);\n\t\t\tconst id = occurrence === 1 ? baseId : `${baseId}-${occurrence}`;\n\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\tdepth,\n\t\t\t});\n\t\t}\n\n\t\tif (newCategoryTitles.size === 0) return;\n\n\t\tsetCategoryTitles(newCategoryTitles);\n\t\tsetShowTOC(true);\n\n\t\tif (visibleTitle) return;\n\t\tsetVisibleTitle(firstSectionId);\n\t}, [visibleTitle, sortByDomPosition, setShowTOC, setVisibleTitle]);\n\n\tconst debounceUpdateCategoryTitles = useCallback(() => {\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\tconst handleCategoryTitle = (ref: HTMLDivElement) => {\n\t\tconst baseId = ref.dataset.id;\n\t\tconst title = ref.dataset.title;\n\t\tif (!baseId || !title) return;\n\n\t\tlet depth = 0;\n\t\tlet parent = ref.parentElement;\n\t\twhile (parent) {\n\t\t\tif (parent.hasAttribute('data-id')) depth++;\n\t\t\tparent = parent.parentElement;\n\t\t}\n\n\t\tsectionReferences.current.set(ref, { el: ref, title, depth, baseId });\n\t};\n\n\tconst processSection = (element: ForwardedReference) => {\n\t\tconst { parentRef, childRefs } = element;\n\t\tif (parentRef) handleCategoryTitle(parentRef);\n\t\tif (Array.isArray(childRefs)) {\n\t\t\tfor (const childRef of childRefs) {\n\t\t\t\tprocessSection(childRef);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleSectionReference = useCallback(\n\t\t(element: ForwardedReference) => {\n\t\t\tif (!element) return;\n\t\t\tprocessSection(element);\n\t\t\tdebounceUpdateCategoryTitles();\n\t\t},\n\t\t[debounceUpdateCategoryTitles]\n\t);\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};\n\t}, []);\n\n\treturn { categoryTitles, handleSectionReference };\n}\n"],"names":["useRef","useState","useCallback","useEffect"],"mappings":";;;;AAgCM,SAAU,iBAAiB,CAAC,EACjC,YAAY,EACZ,eAAe,EACf,UAAU,GACD,EAAA;IACT,MAAM,iBAAiB,GAAGA,YAAM,CAAmB,IAAI,GAAG,EAAE,CAAC;AAC7D,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAGC,cAAQ,CACnD,IAAI,GAAG,EAAE,CACT;AACD,IAAA,MAAM,cAAc,GAAGD,YAAM,CAAuC,IAAI,CAAC;AAEzE,IAAA,MAAM,iBAAiB,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AAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AACtE,IAAA,CAAC;AAED,IAAA,MAAM,cAAc,GAAG,CAAC,OAA2B,KAAI;AACtD,QAAA,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,OAAO;AACxC,QAAA,IAAI,SAAS;YAAE,mBAAmB,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AAC7B,YAAA,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;gBACjC,cAAc,CAAC,QAAQ,CAAC;YACzB;QACD;AACD,IAAA,CAAC;AAED,IAAA,MAAM,sBAAsB,GAAGA,iBAAW,CACzC,CAAC,OAA2B,KAAI;AAC/B,QAAA,IAAI,CAAC,OAAO;YAAE;QACd,cAAc,CAAC,OAAO,CAAC;AACvB,QAAA,4BAA4B,EAAE;AAC/B,IAAA,CAAC,EACD,CAAC,4BAA4B,CAAC,CAC9B;IAEDC,eAAS,CAAC,MAAK;AACd,QAAA,OAAO,MAAK;AACX,YAAA,IAAI,cAAc,CAAC,OAAO,EAAE;AAC3B,gBAAA,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC;YACrC;AACD,QAAA,CAAC;IACF,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE;AAClD;;;;"}
|
|
@@ -10,7 +10,7 @@ const TocNode = ({ node, index, visibleTitle, onClick }) => (jsxRuntime.jsxs("di
|
|
|
10
10
|
node.id === visibleTitle ? TocNode_module.default['toc-node__title--active'] : '',
|
|
11
11
|
node.depth === 1 ? TocNode_module.default['toc-node__title--sub'] : '',
|
|
12
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))) }))] }));
|
|
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 }, `${node.id}-${child.id}`))) }))] }));
|
|
14
14
|
|
|
15
15
|
exports.default = TocNode;
|
|
16
16
|
//# sourceMappingURL=TocNodeStatic.js.map
|
|
@@ -1 +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,
|
|
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={`${node.id}-${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,CAAA,CAAA,EAAIA,sBAAM,CAAC,CAAA,oBAAA,EAAuB,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,eAAC,OAAO,EAAA,EAEP,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAAA,EAJX,CAAA,EAAG,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,CAAA,CAAE,CAK5B,CACF,CAAC,EAAA,CACG,CACN,CAAA,EAAA,CACI;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidViewport.js","sources":["../../../src/components/MermaidViewport.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { PanZoom } from '../hooks/usePanZoom';\n\ninterface MermaidViewportProps {\n\tclassName: string;\n\tdraggingClassName: string;\n\tpan: PanZoom;\n\tcontentRef: React.RefObject<HTMLDivElement>;\n\tcontentId?: string;\n\thidden?: boolean;\n}\n\nconst MermaidViewport = ({\n\tclassName,\n\tdraggingClassName,\n\tpan,\n\tcontentRef,\n\tcontentId,\n\thidden,\n}: MermaidViewportProps) => {\n\tconst viewportRef = useRef<HTMLDivElement>(null);\n\tconst { zoomAtPoint } = pan;\n\n\tuseEffect(() => {\n\t\tconst el = viewportRef.current;\n\t\tif (!el) return;\n\t\tconst onWheel = (e: WheelEvent) => {\n\t\t\tif (!e.ctrlKey) return;\n\t\t\te.preventDefault();\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tzoomAtPoint(e.deltaY, e.clientX - rect.left, e.clientY - rect.top);\n\t\t};\n\t\tel.addEventListener('wheel', onWheel, { passive: false });\n\t\treturn () => el.removeEventListener('wheel', onWheel);\n\t}, [zoomAtPoint]);\n\n\treturn (\n\t\t<div\n\t\t\tref={viewportRef}\n\t\t\tclassName={`${className} ${pan.isDragging ? draggingClassName : ''}`}\n\t\t\tstyle={hidden ? { display: 'none' } : undefined}\n\t\t\tonMouseDown={pan.onMouseDown}\n\t\t\tonMouseMove={pan.onMouseMove}\n\t\t\tonMouseUp={pan.onMouseUp}\n\t\t\tonMouseLeave={pan.onMouseUp}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\ttransform: `translate(${pan.transform.x}px, ${pan.transform.y}px) scale(${pan.transform.scale})`,\n\t\t\t\t\ttransformOrigin: '0 0',\n\t\t\t\t\ttransition: pan.isDragging ? 'none' : 'transform 0.1s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div ref={contentRef} id={contentId} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MermaidViewport;\n"],"names":["_jsx"],"mappings":";;;AAaA,MAAM,eAAe,GAAG,CAAC,EACxB,SAAS,EACT,iBAAiB,EACjB,GAAG,EACH,UA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A,EAAA,EACC,KAAK,EAAE;AACN,gBAAA,SAAS,EAAE,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,IAAA,EAAO,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,KAAK,CAAA,CAAA,CAAG;AAChG,gBAAA,eAAe,EAAE,KAAK;gBACtB,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,MAAM,GAAG,qBAAqB;AAC3D,aAAA,EAAA,QAAA,EAEDA,GAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAA,CAAI,EAAA,CAClC,EAAA,CACD;AAER;;;;"}
|
|
1
|
+
{"version":3,"file":"MermaidViewport.js","sources":["../../../src/components/MermaidViewport.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { PanZoom } from '../hooks/usePanZoom';\n\ninterface MermaidViewportProps {\n\tclassName: string;\n\tdraggingClassName: string;\n\tpan: PanZoom;\n\tcontentRef: React.RefObject<HTMLDivElement | null>;\n\tcontentId?: string;\n\thidden?: boolean;\n}\n\nconst MermaidViewport = ({\n\tclassName,\n\tdraggingClassName,\n\tpan,\n\tcontentRef,\n\tcontentId,\n\thidden,\n}: MermaidViewportProps) => {\n\tconst viewportRef = useRef<HTMLDivElement>(null);\n\tconst { zoomAtPoint } = pan;\n\n\tuseEffect(() => {\n\t\tconst el = viewportRef.current;\n\t\tif (!el) return;\n\t\tconst onWheel = (e: WheelEvent) => {\n\t\t\tif (!e.ctrlKey) return;\n\t\t\te.preventDefault();\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tzoomAtPoint(e.deltaY, e.clientX - rect.left, e.clientY - rect.top);\n\t\t};\n\t\tel.addEventListener('wheel', onWheel, { passive: false });\n\t\treturn () => el.removeEventListener('wheel', onWheel);\n\t}, [zoomAtPoint]);\n\n\treturn (\n\t\t<div\n\t\t\tref={viewportRef}\n\t\t\tclassName={`${className} ${pan.isDragging ? draggingClassName : ''}`}\n\t\t\tstyle={hidden ? { display: 'none' } : undefined}\n\t\t\tonMouseDown={pan.onMouseDown}\n\t\t\tonMouseMove={pan.onMouseMove}\n\t\t\tonMouseUp={pan.onMouseUp}\n\t\t\tonMouseLeave={pan.onMouseUp}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\ttransform: `translate(${pan.transform.x}px, ${pan.transform.y}px) scale(${pan.transform.scale})`,\n\t\t\t\t\ttransformOrigin: '0 0',\n\t\t\t\t\ttransition: pan.isDragging ? 'none' : 'transform 0.1s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div ref={contentRef} id={contentId} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MermaidViewport;\n"],"names":["_jsx"],"mappings":";;;AAaA,MAAM,eAAe,GAAG,CAAC,EACxB,SAAS,EACT,iBAAiB,EACjB,GAAG,EACH,UAAU,EACV,SAAS,EACT,MAAM,GACgB,KAAI;AAC1B,IAAA,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC;AAChD,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG;IAE3B,SAAS,CAAC,MAAK;AACd,QAAA,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO;AAC9B,QAAA,IAAI,CAAC,EAAE;YAAE;AACT,QAAA,MAAM,OAAO,GAAG,CAAC,CAAa,KAAI;YACjC,IAAI,CAAC,CAAC,CAAC,OAAO;gBAAE;YAChB,CAAC,CAAC,cAAc,EAAE;AAClB,YAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE;YACvC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC;AACnE,QAAA,CAAC;AACD,QAAA,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACzD,OAAO,MAAM,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC;AACtD,IAAA,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;AAEjB,IAAA,QACCA,GAAA,CAAA,KAAA,EAAA,EACC,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,GAAG,CAAC,UAAU,GAAG,iBAAiB,GAAG,EAAE,CAAA,CAAE,EACpE,KAAK,EAAE,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAC/C,WAAW,EAAE,GAAG,CAAC,WAAW,EAC5B,WAAW,EAAE,GAAG,CAAC,WAAW,EAC5B,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,YAAY,EAAE,GAAG,CAAC,SAAS,EAAA,QAAA,EAE3BA,GAAA,CAAA,KAAA,EAAA,EACC,KAAK,EAAE;AACN,gBAAA,SAAS,EAAE,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,IAAA,EAAO,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA,UAAA,EAAa,GAAG,CAAC,SAAS,CAAC,KAAK,CAAA,CAAA,CAAG;AAChG,gBAAA,eAAe,EAAE,KAAK;gBACtB,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,MAAM,GAAG,qBAAqB;AAC3D,aAAA,EAAA,QAAA,EAEDA,GAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAA,CAAI,EAAA,CAClC,EAAA,CACD;AAER;;;;"}
|
|
@@ -21,7 +21,11 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
21
21
|
const sectionsArray = Array.from(sectionReferences.current.entries());
|
|
22
22
|
sectionsArray.sort(sortByDomPosition);
|
|
23
23
|
let firstSectionId = null;
|
|
24
|
-
|
|
24
|
+
const baseIdCounts = new Map();
|
|
25
|
+
for (const [, { title, el, depth, baseId }] of sectionsArray) {
|
|
26
|
+
const occurrence = (baseIdCounts.get(baseId) ?? 0) + 1;
|
|
27
|
+
baseIdCounts.set(baseId, occurrence);
|
|
28
|
+
const id = occurrence === 1 ? baseId : `${baseId}-${occurrence}`;
|
|
25
29
|
if (!firstSectionId) {
|
|
26
30
|
firstSectionId = id;
|
|
27
31
|
}
|
|
@@ -48,19 +52,10 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
48
52
|
updateCategoryTitles();
|
|
49
53
|
}, 200);
|
|
50
54
|
}, [updateCategoryTitles]);
|
|
51
|
-
const removeStaleRefs = (ref) => {
|
|
52
|
-
for (const [existingId, { el }] of sectionReferences.current) {
|
|
53
|
-
if (el !== ref) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
sectionReferences.current.delete(existingId);
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
55
|
const handleCategoryTitle = (ref) => {
|
|
61
|
-
const
|
|
56
|
+
const baseId = ref.dataset.id;
|
|
62
57
|
const title = ref.dataset.title;
|
|
63
|
-
if (!
|
|
58
|
+
if (!baseId || !title)
|
|
64
59
|
return;
|
|
65
60
|
let depth = 0;
|
|
66
61
|
let parent = ref.parentElement;
|
|
@@ -69,8 +64,7 @@ function useCategoryTitles({ visibleTitle, setVisibleTitle, setShowTOC, }) {
|
|
|
69
64
|
depth++;
|
|
70
65
|
parent = parent.parentElement;
|
|
71
66
|
}
|
|
72
|
-
|
|
73
|
-
sectionReferences.current.set(id, { el: ref, title, depth });
|
|
67
|
+
sectionReferences.current.set(ref, { el: ref, title, depth, baseId });
|
|
74
68
|
};
|
|
75
69
|
const processSection = (element) => {
|
|
76
70
|
const { parentRef, childRefs } = element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategoryTitles.js","sources":["../../../src/hooks/useCategoryTitles.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\n\nexport interface SectionReferenceValue {\n\tel: HTMLElement;\n\ttitle: string;\n\tdepth: number;\n}\n\nexport interface CategoryTitleValue extends SectionReferenceValue {\n\tlastUpdatedAt: number;\n}\n\nexport type CategoryTitle = Map<string, CategoryTitleValue>;\n\ntype SectionReference = Map<
|
|
1
|
+
{"version":3,"file":"useCategoryTitles.js","sources":["../../../src/hooks/useCategoryTitles.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport type { ForwardedReference } from '../dynamicComponents/BlogDynamic';\n\nexport interface SectionReferenceValue {\n\tel: HTMLElement;\n\ttitle: string;\n\tdepth: number;\n}\n\nexport interface CategoryTitleValue extends SectionReferenceValue {\n\tlastUpdatedAt: number;\n}\n\nexport type CategoryTitle = Map<string, CategoryTitleValue>;\n\ninterface SectionReferenceEntry extends SectionReferenceValue {\n\tbaseId: string;\n}\n\ntype SectionReference = Map<HTMLElement, SectionReferenceEntry>;\n\ninterface Options {\n\tvisibleTitle: string | null;\n\tsetVisibleTitle: Dispatch<SetStateAction<string | null>>;\n\tsetShowTOC: Dispatch<SetStateAction<boolean>>;\n}\n\nexport function useCategoryTitles({\n\tvisibleTitle,\n\tsetVisibleTitle,\n\tsetShowTOC,\n}: Options) {\n\tconst sectionReferences = useRef<SectionReference>(new Map());\n\tconst [categoryTitles, setCategoryTitles] = useState<CategoryTitle>(\n\t\tnew Map()\n\t);\n\tconst updateTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n\tconst sortByDomPosition = useCallback(\n\t\t(\n\t\t\t[, a]: [HTMLElement, SectionReferenceEntry],\n\t\t\t[, b]: [HTMLElement, SectionReferenceEntry]\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;\n\t\t\t} else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t\t\t\treturn 1;\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\tconst sectionsArray = Array.from(sectionReferences.current.entries());\n\t\tsectionsArray.sort(sortByDomPosition);\n\n\t\tlet firstSectionId: string | null = null;\n\t\tconst baseIdCounts = new Map<string, number>();\n\t\tfor (const [, { title, el, depth, baseId }] of sectionsArray) {\n\t\t\tconst occurrence = (baseIdCounts.get(baseId) ?? 0) + 1;\n\t\t\tbaseIdCounts.set(baseId, occurrence);\n\t\t\tconst id = occurrence === 1 ? baseId : `${baseId}-${occurrence}`;\n\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\tdepth,\n\t\t\t});\n\t\t}\n\n\t\tif (newCategoryTitles.size === 0) return;\n\n\t\tsetCategoryTitles(newCategoryTitles);\n\t\tsetShowTOC(true);\n\n\t\tif (visibleTitle) return;\n\t\tsetVisibleTitle(firstSectionId);\n\t}, [visibleTitle, sortByDomPosition, setShowTOC, setVisibleTitle]);\n\n\tconst debounceUpdateCategoryTitles = useCallback(() => {\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\tconst handleCategoryTitle = (ref: HTMLDivElement) => {\n\t\tconst baseId = ref.dataset.id;\n\t\tconst title = ref.dataset.title;\n\t\tif (!baseId || !title) return;\n\n\t\tlet depth = 0;\n\t\tlet parent = ref.parentElement;\n\t\twhile (parent) {\n\t\t\tif (parent.hasAttribute('data-id')) depth++;\n\t\t\tparent = parent.parentElement;\n\t\t}\n\n\t\tsectionReferences.current.set(ref, { el: ref, title, depth, baseId });\n\t};\n\n\tconst processSection = (element: ForwardedReference) => {\n\t\tconst { parentRef, childRefs } = element;\n\t\tif (parentRef) handleCategoryTitle(parentRef);\n\t\tif (Array.isArray(childRefs)) {\n\t\t\tfor (const childRef of childRefs) {\n\t\t\t\tprocessSection(childRef);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleSectionReference = useCallback(\n\t\t(element: ForwardedReference) => {\n\t\t\tif (!element) return;\n\t\t\tprocessSection(element);\n\t\t\tdebounceUpdateCategoryTitles();\n\t\t},\n\t\t[debounceUpdateCategoryTitles]\n\t);\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};\n\t}, []);\n\n\treturn { categoryTitles, handleSectionReference };\n}\n"],"names":[],"mappings":";;AAgCM,SAAU,iBAAiB,CAAC,EACjC,YAAY,EACZ,eAAe,EACf,UAAU,GACD,EAAA;IACT,MAAM,iBAAiB,GAAG,MAAM,CAAmB,IAAI,GAAG,EAAE,CAAC;AAC7D,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CACnD,IAAI,GAAG,EAAE,CACT;AACD,IAAA,MAAM,cAAc,GAAG,MAAM,CAAuC,IAAI,CAAC;AAEzE,IAAA,MAAM,iBAAiB,GAAG,WAAW,CACpC,CACC,GAAG,CAAC,CAAuC,EAC3C,GAAG,CAAC,CAAuC,KACxC;AACH,QAAA,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;AACnD,QAAA,IAAI,QAAQ,GAAG,IAA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SAAS;YAAE,mBAAmB,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AAC7B,YAAA,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;gBACjC,cAAc,CAAC,QAAQ,CAAC;YACzB;QACD;AACD,IAAA,CAAC;AAED,IAAA,MAAM,sBAAsB,GAAG,WAAW,CACzC,CAAC,OAA2B,KAAI;AAC/B,QAAA,IAAI,CAAC,OAAO;YAAE;QACd,cAAc,CAAC,OAAO,CAAC;AACvB,QAAA,4BAA4B,EAAE;AAC/B,IAAA,CAAC,EACD,CAAC,4BAA4B,CAAC,CAC9B;IAED,SAAS,CAAC,MAAK;AACd,QAAA,OAAO,MAAK;AACX,YAAA,IAAI,cAAc,CAAC,OAAO,EAAE;AAC3B,gBAAA,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC;YACrC;AACD,QAAA,CAAC;IACF,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE;AAClD;;;;"}
|
|
@@ -6,7 +6,7 @@ const TocNode = ({ node, index, visibleTitle, onClick }) => (jsxs("div", { child
|
|
|
6
6
|
node.id === visibleTitle ? styles['toc-node__title--active'] : '',
|
|
7
7
|
node.depth === 1 ? styles['toc-node__title--sub'] : '',
|
|
8
8
|
node.depth === 2 ? styles['toc-node__title--sub-sub'] : '',
|
|
9
|
-
].join(' '), onClick: onClick, children: node.title }), node.children.length > 0 && (jsx("div", { className: `${styles['toc-node__children']} ${styles[`toc-node__children--${node.depth === 0 ? 'sub' : 'sub-sub'}`]}`, children: node.children.map((child, i) => (jsx(TocNode, { node: child, index: i, visibleTitle: visibleTitle, onClick: onClick }, child.id))) }))] }));
|
|
9
|
+
].join(' '), onClick: onClick, children: node.title }), node.children.length > 0 && (jsx("div", { className: `${styles['toc-node__children']} ${styles[`toc-node__children--${node.depth === 0 ? 'sub' : 'sub-sub'}`]}`, children: node.children.map((child, i) => (jsx(TocNode, { node: child, index: i, visibleTitle: visibleTitle, onClick: onClick }, `${node.id}-${child.id}`))) }))] }));
|
|
10
10
|
|
|
11
11
|
export { TocNode as default };
|
|
12
12
|
//# sourceMappingURL=TocNodeStatic.js.map
|
|
@@ -1 +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"],"mappings":";;;AAkBA,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAqB,MACzEA,IAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CACCC,GAAA,CAAA,GAAA,EAAA,EAAA,UAAA,EACW,KAAK,EAAA,SAAA,EACN,IAAI,CAAC,EAAE,EAChB,SAAS,EAAE;gBACV,MAAM,CAAC,iBAAiB,CAAC;AACzB,gBAAA,IAAI,CAAC,EAAE,KAAK,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC,GAAG,EAAE;AACjE,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE;AACtD,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,MAAM,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,KACxBA,GAAA,CAAA,KAAA,EAAA,EACC,SAAS,EAAE,CAAA,EAAG,MAAM,CAAC,oBAAoB,CAAC,
|
|
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={`${node.id}-${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"],"mappings":";;;AAkBA,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAqB,MACzEA,IAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CACCC,GAAA,CAAA,GAAA,EAAA,EAAA,UAAA,EACW,KAAK,EAAA,SAAA,EACN,IAAI,CAAC,EAAE,EAChB,SAAS,EAAE;gBACV,MAAM,CAAC,iBAAiB,CAAC;AACzB,gBAAA,IAAI,CAAC,EAAE,KAAK,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC,GAAG,EAAE;AACjE,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE;AACtD,gBAAA,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,MAAM,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,KACxBA,GAAA,CAAA,KAAA,EAAA,EACC,SAAS,EAAE,CAAA,EAAG,MAAM,CAAC,oBAAoB,CAAC,CAAA,CAAA,EAAI,MAAM,CAAC,CAAA,oBAAA,EAAuB,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,MAC3BA,IAAC,OAAO,EAAA,EAEP,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAAA,EAJX,CAAA,EAAG,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,CAAA,CAAE,CAK5B,CACF,CAAC,EAAA,CACG,CACN,CAAA,EAAA,CACI;;;;"}
|
|
@@ -5,6 +5,6 @@ interface BlogProperties {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
jsonLd?: WithContext<Thing>;
|
|
7
7
|
}
|
|
8
|
-
declare const Blog: ({ children, title, jsonLd }: BlogProperties) => import("react
|
|
8
|
+
declare const Blog: ({ children, title, jsonLd }: BlogProperties) => import("react").JSX.Element;
|
|
9
9
|
export default Blog;
|
|
10
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;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,
|
|
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,gCAM5E,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -3,6 +3,6 @@ interface BlogHeaderProperties {
|
|
|
3
3
|
desc: string[];
|
|
4
4
|
isDescCite?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const BlogHeader: ({ title, desc, isDescCite, }: BlogHeaderProperties) => import("react
|
|
6
|
+
declare const BlogHeader: ({ title, desc, isDescCite, }: BlogHeaderProperties) => import("react").JSX.Element;
|
|
7
7
|
export default BlogHeader;
|
|
8
8
|
//# sourceMappingURL=BlogHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogHeader.d.ts","sourceRoot":"","sources":["../../../src/components/BlogHeader.tsx"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,UAAU,GAAI,8BAIjB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"BlogHeader.d.ts","sourceRoot":"","sources":["../../../src/components/BlogHeader.tsx"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,UAAU,GAAI,8BAIjB,oBAAoB,gCAItB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface BlogLinkProperties {
|
|
|
4
4
|
isInProgress?: boolean;
|
|
5
5
|
href?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const BlogLink: ({ title, desc, isInProgress, href, }: BlogLinkProperties) => import("react
|
|
7
|
+
declare const BlogLink: ({ title, desc, isInProgress, href, }: BlogLinkProperties) => import("react").JSX.Element;
|
|
8
8
|
export default BlogLink;
|
|
9
9
|
//# sourceMappingURL=BlogLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogLink.d.ts","sourceRoot":"","sources":["../../../src/components/BlogLink.tsx"],"names":[],"mappings":"AASA,UAAU,kBAAkB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,QAAQ,GAAI,sCAKf,kBAAkB,
|
|
1
|
+
{"version":3,"file":"BlogLink.d.ts","sourceRoot":"","sources":["../../../src/components/BlogLink.tsx"],"names":[],"mappings":"AASA,UAAU,kBAAkB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,QAAQ,GAAI,sCAKf,kBAAkB,gCAoBpB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,6 +5,6 @@ interface CalloutProperties {
|
|
|
5
5
|
hasMarginUp?: boolean;
|
|
6
6
|
hasMarginDown?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Callout: ({ children, type, hasMarginUp, hasMarginDown, }: CalloutProperties) => import("react
|
|
8
|
+
declare const Callout: ({ children, type, hasMarginUp, hasMarginDown, }: CalloutProperties) => import("react").JSX.Element;
|
|
9
9
|
export default Callout;
|
|
10
10
|
//# sourceMappingURL=Callout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../src/components/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,iDAKd,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../src/components/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,iDAKd,iBAAiB,gCAUnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -4,7 +4,7 @@ interface CheckListProperties {
|
|
|
4
4
|
hasMarginUp?: boolean;
|
|
5
5
|
hasMarginDown?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const CheckList: ({ items, hasMarginUp, hasMarginDown, }: CheckListProperties) => import("react
|
|
7
|
+
declare const CheckList: ({ items, hasMarginUp, hasMarginDown, }: CheckListProperties) => import("react").JSX.Element;
|
|
8
8
|
export { type CheckListItem };
|
|
9
9
|
export default CheckList;
|
|
10
10
|
//# sourceMappingURL=CheckList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckList.d.ts","sourceRoot":"","sources":["../../../src/components/CheckList.tsx"],"names":[],"mappings":"AAAA,OAAwB,EACvB,KAAK,aAAa,EAClB,MAAM,qCAAqC,CAAC;AAE7C,UAAU,mBAAmB;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,SAAS,GAAI,wCAIhB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"CheckList.d.ts","sourceRoot":"","sources":["../../../src/components/CheckList.tsx"],"names":[],"mappings":"AAAA,OAAwB,EACvB,KAAK,aAAa,EAClB,MAAM,qCAAqC,CAAC;AAE7C,UAAU,mBAAmB;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,SAAS,GAAI,wCAIhB,mBAAmB,gCAQrB,CAAC;AAEF,OAAO,EAAE,KAAK,aAAa,EAAE,CAAC;AAC9B,eAAe,SAAS,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface CodeBlockProperties {
|
|
|
4
4
|
language?: string;
|
|
5
5
|
code?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const CodeBlock: ({ language, code, hasMarginUp, hasMarginDown, }: CodeBlockProperties) => import("react
|
|
7
|
+
declare const CodeBlock: ({ language, code, hasMarginUp, hasMarginDown, }: CodeBlockProperties) => import("react").JSX.Element;
|
|
8
8
|
export default CodeBlock;
|
|
9
9
|
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock.tsx"],"names":[],"mappings":"AASA,UAAU,mBAAmB;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,SAAS,GAAI,iDAKhB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock.tsx"],"names":[],"mappings":"AASA,UAAU,mBAAmB;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,SAAS,GAAI,iDAKhB,mBAAmB,gCAoBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface MermaidProperties {
|
|
|
4
4
|
hasMarginUp?: boolean;
|
|
5
5
|
hasMarginDown?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const Mermaid: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidProperties) => import("react
|
|
7
|
+
declare const Mermaid: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidProperties) => import("react").JSX.Element;
|
|
8
8
|
export default Mermaid;
|
|
9
9
|
//# sourceMappingURL=Mermaid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mermaid.d.ts","sourceRoot":"","sources":["../../../src/components/Mermaid.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Mermaid.d.ts","sourceRoot":"","sources":["../../../src/components/Mermaid.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,gCAoBnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -6,6 +6,6 @@ interface MermaidControlsProps {
|
|
|
6
6
|
onReset: () => void;
|
|
7
7
|
onToggleExpand: () => void;
|
|
8
8
|
}
|
|
9
|
-
declare const MermaidControls: ({ className, isExpanded, onZoomIn, onZoomOut, onReset, onToggleExpand, }: MermaidControlsProps) => import("react
|
|
9
|
+
declare const MermaidControls: ({ className, isExpanded, onZoomIn, onZoomOut, onReset, onToggleExpand, }: MermaidControlsProps) => import("react").JSX.Element;
|
|
10
10
|
export default MermaidControls;
|
|
11
11
|
//# sourceMappingURL=MermaidControls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidControls.d.ts","sourceRoot":"","sources":["../../../src/components/MermaidControls.tsx"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,eAAe,GAAI,0EAOtB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"MermaidControls.d.ts","sourceRoot":"","sources":["../../../src/components/MermaidControls.tsx"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,eAAe,GAAI,0EAOtB,oBAAoB,gCAiCtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -3,10 +3,10 @@ interface MermaidViewportProps {
|
|
|
3
3
|
className: string;
|
|
4
4
|
draggingClassName: string;
|
|
5
5
|
pan: PanZoom;
|
|
6
|
-
contentRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
7
7
|
contentId?: string;
|
|
8
8
|
hidden?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const MermaidViewport: ({ className, draggingClassName, pan, contentRef, contentId, hidden, }: MermaidViewportProps) => import("react
|
|
10
|
+
declare const MermaidViewport: ({ className, draggingClassName, pan, contentRef, contentId, hidden, }: MermaidViewportProps) => import("react").JSX.Element;
|
|
11
11
|
export default MermaidViewport;
|
|
12
12
|
//# sourceMappingURL=MermaidViewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidViewport.d.ts","sourceRoot":"","sources":["../../../src/components/MermaidViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"MermaidViewport.d.ts","sourceRoot":"","sources":["../../../src/components/MermaidViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,eAAe,GAAI,uEAOtB,oBAAoB,gCAsCtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -6,6 +6,6 @@ interface TableProperties {
|
|
|
6
6
|
hasMarginDown?: boolean;
|
|
7
7
|
fontSize?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Table: ({ rows, headers, hasMarginUp, hasMarginDown, fontSize, }: TableProperties) => import("react
|
|
9
|
+
declare const Table: ({ rows, headers, hasMarginUp, hasMarginDown, fontSize, }: TableProperties) => import("react").JSX.Element;
|
|
10
10
|
export default Table;
|
|
11
11
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACxB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,GAAI,0DAMZ,eAAe,
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACxB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,GAAI,0DAMZ,eAAe,gCAUjB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -9,6 +9,6 @@ export interface ForwardedReference {
|
|
|
9
9
|
parentRef: HTMLDivElement;
|
|
10
10
|
childRefs: ForwardedReference[];
|
|
11
11
|
}
|
|
12
|
-
declare const Blog: ({ children, title, jsonLd, }: BlogProperties) => import("react
|
|
12
|
+
declare const Blog: ({ children, title, jsonLd, }: BlogProperties) => import("react").JSX.Element;
|
|
13
13
|
export default Blog;
|
|
14
14
|
//# sourceMappingURL=BlogDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASrD,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,kBAAkB,EAAE,CAAC;CAChC;AAsBD,QAAA,MAAM,IAAI,GAAI,8BAIX,cAAc,
|
|
1
|
+
{"version":3,"file":"BlogDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogDynamic.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASrD,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,kBAAkB,EAAE,CAAC;CAChC;AAsBD,QAAA,MAAM,IAAI,GAAI,8BAIX,cAAc,gCAuDhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface Properties {
|
|
|
4
4
|
isInProgress?: boolean;
|
|
5
5
|
href?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const BlogLink: ({ title, desc, isInProgress, href }: Properties) => import("react
|
|
7
|
+
declare const BlogLink: ({ title, desc, isInProgress, href }: Properties) => import("react").JSX.Element | null;
|
|
8
8
|
export default BlogLink;
|
|
9
9
|
//# sourceMappingURL=BlogLinkDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogLinkDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogLinkDynamic.tsx"],"names":[],"mappings":"AAUA,UAAU,UAAU;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAMD,QAAA,MAAM,QAAQ,GAAI,qCAAuD,UAAU,
|
|
1
|
+
{"version":3,"file":"BlogLinkDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/BlogLinkDynamic.tsx"],"names":[],"mappings":"AAUA,UAAU,UAAU;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAMD,QAAA,MAAM,QAAQ,GAAI,qCAAuD,UAAU,uCAkDlF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,6 +5,6 @@ interface Properties {
|
|
|
5
5
|
language?: string;
|
|
6
6
|
code?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const CodeBlock: ({ language, code, hasMarginUp, hasMarginDown, }: Properties) => import("react
|
|
8
|
+
declare const CodeBlock: ({ language, code, hasMarginUp, hasMarginDown, }: Properties) => import("react").JSX.Element;
|
|
9
9
|
export default CodeBlock;
|
|
10
10
|
//# sourceMappingURL=CodeBlockDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/CodeBlockDynamic.tsx"],"names":[],"mappings":"AAOA,OAAO,mCAAmC,CAAC;AAM3C,UAAU,UAAU;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AASD,QAAA,MAAM,SAAS,GAAI,iDAKhB,UAAU,
|
|
1
|
+
{"version":3,"file":"CodeBlockDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/CodeBlockDynamic.tsx"],"names":[],"mappings":"AAOA,OAAO,mCAAmC,CAAC;AAM3C,UAAU,UAAU;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AASD,QAAA,MAAM,SAAS,GAAI,iDAKhB,UAAU,gCAmGZ,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface MermaidProperties {
|
|
|
4
4
|
hasMarginUp?: boolean;
|
|
5
5
|
hasMarginDown?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const Mermaid: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidProperties) => import("react
|
|
7
|
+
declare const Mermaid: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidProperties) => import("react").JSX.Element;
|
|
8
8
|
export default Mermaid;
|
|
9
9
|
//# sourceMappingURL=MermaidDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/MermaidDynamic.tsx"],"names":[],"mappings":"AAaA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAmBD,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,
|
|
1
|
+
{"version":3,"file":"MermaidDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/MermaidDynamic.tsx"],"names":[],"mappings":"AAaA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAmBD,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,gCAuInB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategoryTitles.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCategoryTitles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,WAAW,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAChE,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useCategoryTitles.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCategoryTitles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,WAAW,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAChE,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAQ5D,UAAU,OAAO;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACzD,UAAU,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC9C;AAED,wBAAgB,iBAAiB,CAAC,EACjC,YAAY,EACZ,eAAe,EACf,UAAU,GACV,EAAE,OAAO;;sCA4FE,kBAAkB;EAiB7B"}
|
|
@@ -3,6 +3,6 @@ interface BlogProperties {
|
|
|
3
3
|
desc: string[];
|
|
4
4
|
isDescCite?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const BlogHeader: ({ title, desc, isDescCite }: BlogProperties) => import("react
|
|
6
|
+
declare const BlogHeader: ({ title, desc, isDescCite }: BlogProperties) => import("react").JSX.Element;
|
|
7
7
|
export default BlogHeader;
|
|
8
8
|
//# sourceMappingURL=BlogHeaderStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogHeaderStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogHeaderStatic.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAUD,QAAA,MAAM,UAAU,GAAI,6BAAoC,cAAc,
|
|
1
|
+
{"version":3,"file":"BlogHeaderStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogHeaderStatic.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAUD,QAAA,MAAM,UAAU,GAAI,6BAAoC,cAAc,gCAWpE,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface Properties {
|
|
|
4
4
|
isInProgress?: boolean;
|
|
5
5
|
href?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const BlogLinkStatic: ({ title, desc, isInProgress, href }: Properties) => import("react
|
|
7
|
+
declare const BlogLinkStatic: ({ title, desc, isInProgress, href }: Properties) => import("react").JSX.Element | null;
|
|
8
8
|
export default BlogLinkStatic;
|
|
9
9
|
//# sourceMappingURL=BlogLinkStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogLinkStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogLinkStatic.tsx"],"names":[],"mappings":"AAGA,UAAU,UAAU;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,cAAc,GAAI,qCAAuD,UAAU,
|
|
1
|
+
{"version":3,"file":"BlogLinkStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogLinkStatic.tsx"],"names":[],"mappings":"AAGA,UAAU,UAAU;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,cAAc,GAAI,qCAAuD,UAAU,uCAgCxF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface BlogSectionStaticProperties {
|
|
|
4
4
|
category?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare const BlogSectionStatic: ({ title, category, children, }: BlogSectionStaticProperties) => import("react
|
|
7
|
+
declare const BlogSectionStatic: ({ title, category, children, }: BlogSectionStaticProperties) => import("react").JSX.Element;
|
|
8
8
|
export default BlogSectionStatic;
|
|
9
9
|
//# sourceMappingURL=BlogSectionStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogSectionStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogSectionStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,UAAU,2BAA2B;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,GAAG,CAAC,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,iBAAiB,GAAI,gCAIxB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"BlogSectionStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/BlogSectionStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,UAAU,2BAA2B;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,GAAG,CAAC,CAAC;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,iBAAiB,GAAI,gCAIxB,2BAA2B,gCAa7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface BlogStaticProperties {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
jsonLd?: WithContext<Thing>;
|
|
6
6
|
}
|
|
7
|
-
declare const BlogStatic: ({ children, jsonLd }: BlogStaticProperties) => import("react
|
|
7
|
+
declare const BlogStatic: ({ children, jsonLd }: BlogStaticProperties) => import("react").JSX.Element;
|
|
8
8
|
export default BlogStatic;
|
|
9
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;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,
|
|
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,gCAY7D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -5,6 +5,6 @@ interface CalloutProperties {
|
|
|
5
5
|
hasMarginUp?: boolean;
|
|
6
6
|
hasMarginDown?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Callout: ({ children, type, hasMarginUp, hasMarginDown }: CalloutProperties) => import("react
|
|
8
|
+
declare const Callout: ({ children, type, hasMarginUp, hasMarginDown }: CalloutProperties) => import("react").JSX.Element;
|
|
9
9
|
export default Callout;
|
|
10
10
|
//# sourceMappingURL=CalloutStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CalloutStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,iBAAiB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,gDAGd,iBAAiB,
|
|
1
|
+
{"version":3,"file":"CalloutStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CalloutStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,iBAAiB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,OAAO,GAAI,gDAGd,iBAAiB,gCAUnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -9,6 +9,6 @@ interface CheckListProperties {
|
|
|
9
9
|
hasMarginUp?: boolean;
|
|
10
10
|
hasMarginDown?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const CheckListStatic: ({ items, hasMarginUp, hasMarginDown, }: CheckListProperties) => import("react
|
|
12
|
+
declare const CheckListStatic: ({ items, hasMarginUp, hasMarginDown, }: CheckListProperties) => import("react").JSX.Element;
|
|
13
13
|
export default CheckListStatic;
|
|
14
14
|
//# sourceMappingURL=CheckListStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckListStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CheckListStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1D,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,GAAG,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,mBAAmB;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,GAAI,wCAItB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"CheckListStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CheckListStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1D,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,GAAG,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,mBAAmB;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,GAAI,wCAItB,mBAAmB,gCAmBrB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface Properties {
|
|
|
4
4
|
language?: string;
|
|
5
5
|
code?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const CodeBlockStatic: ({ language, code, hasMarginUp, hasMarginDown, }: Properties) => import("react
|
|
7
|
+
declare const CodeBlockStatic: ({ language, code, hasMarginUp, hasMarginDown, }: Properties) => import("react").JSX.Element;
|
|
8
8
|
export default CodeBlockStatic;
|
|
9
9
|
//# sourceMappingURL=CodeBlockStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CodeBlockStatic.tsx"],"names":[],"mappings":"AAEA,UAAU,UAAU;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,eAAe,GAAI,iDAKtB,UAAU,
|
|
1
|
+
{"version":3,"file":"CodeBlockStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/CodeBlockStatic.tsx"],"names":[],"mappings":"AAEA,UAAU,UAAU;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,eAAe,GAAI,iDAKtB,UAAU,gCAiBZ,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -4,6 +4,6 @@ interface MermaidStaticProperties {
|
|
|
4
4
|
hasMarginUp?: boolean;
|
|
5
5
|
hasMarginDown?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const MermaidStatic: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidStaticProperties) => import("react
|
|
7
|
+
declare const MermaidStatic: ({ code, id, hasMarginUp, hasMarginDown, }: MermaidStaticProperties) => import("react").JSX.Element;
|
|
8
8
|
export default MermaidStatic;
|
|
9
9
|
//# sourceMappingURL=MermaidStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/MermaidStatic.tsx"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,aAAa,GAAI,2CAKpB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"MermaidStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/MermaidStatic.tsx"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,aAAa,GAAI,2CAKpB,uBAAuB,gCASzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -6,6 +6,6 @@ interface TableProperties {
|
|
|
6
6
|
hasMarginDown?: boolean;
|
|
7
7
|
fontSize?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Table: ({ rows, headers, hasMarginUp, hasMarginDown, fontSize, }: TableProperties) => import("react
|
|
9
|
+
declare const Table: ({ rows, headers, hasMarginUp, hasMarginDown, fontSize, }: TableProperties) => import("react").JSX.Element;
|
|
10
10
|
export default Table;
|
|
11
11
|
//# sourceMappingURL=TableStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/TableStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACxB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAkBD,QAAA,MAAM,KAAK,GAAI,0DAMZ,eAAe,
|
|
1
|
+
{"version":3,"file":"TableStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/TableStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACxB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAkBD,QAAA,MAAM,KAAK,GAAI,0DAMZ,eAAe,gCAyCjB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -11,6 +11,6 @@ interface TocNodeProperties {
|
|
|
11
11
|
visibleTitle: string | null;
|
|
12
12
|
onClick: (e: MouseEvent<HTMLParagraphElement>) => void;
|
|
13
13
|
}
|
|
14
|
-
declare const TocNode: ({ node, index, visibleTitle, onClick }: TocNodeProperties) => import("react
|
|
14
|
+
declare const TocNode: ({ node, index, visibleTitle, onClick }: TocNodeProperties) => import("react").JSX.Element;
|
|
15
15
|
export default TocNode;
|
|
16
16
|
//# sourceMappingURL=TocNodeStatic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TocNodeStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/TocNodeStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIxC,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,UAAU,iBAAiB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvD;AAED,QAAA,MAAM,OAAO,GAAI,wCAAwC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TocNodeStatic.d.ts","sourceRoot":"","sources":["../../../src/staticComponents/TocNodeStatic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIxC,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,UAAU,iBAAiB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvD;AAED,QAAA,MAAM,OAAO,GAAI,wCAAwC,iBAAiB,gCA+BzE,CAAC;AAEF,eAAe,OAAO,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.42",
|
|
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",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
60
60
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
61
61
|
"@types/node": "^22.10.1",
|
|
62
|
-
"@types/react": "^
|
|
63
|
-
"@types/react-dom": "^
|
|
62
|
+
"@types/react": "^19.0.0",
|
|
63
|
+
"@types/react-dom": "^19.0.0",
|
|
64
64
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
65
65
|
"mermaid": "^10.0.0",
|
|
66
66
|
"postcss": "^8.4.49",
|
|
@@ -18,7 +18,11 @@ export interface CategoryTitleValue extends SectionReferenceValue {
|
|
|
18
18
|
|
|
19
19
|
export type CategoryTitle = Map<string, CategoryTitleValue>;
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
interface SectionReferenceEntry extends SectionReferenceValue {
|
|
22
|
+
baseId: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type SectionReference = Map<HTMLElement, SectionReferenceEntry>;
|
|
22
26
|
|
|
23
27
|
interface Options {
|
|
24
28
|
visibleTitle: string | null;
|
|
@@ -39,8 +43,8 @@ export function useCategoryTitles({
|
|
|
39
43
|
|
|
40
44
|
const sortByDomPosition = useCallback(
|
|
41
45
|
(
|
|
42
|
-
[, a]: [
|
|
43
|
-
[, b]: [
|
|
46
|
+
[, a]: [HTMLElement, SectionReferenceEntry],
|
|
47
|
+
[, b]: [HTMLElement, SectionReferenceEntry]
|
|
44
48
|
) => {
|
|
45
49
|
const position = a.el.compareDocumentPosition(b.el);
|
|
46
50
|
if (position & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
@@ -61,7 +65,12 @@ export function useCategoryTitles({
|
|
|
61
65
|
sectionsArray.sort(sortByDomPosition);
|
|
62
66
|
|
|
63
67
|
let firstSectionId: string | null = null;
|
|
64
|
-
|
|
68
|
+
const baseIdCounts = new Map<string, number>();
|
|
69
|
+
for (const [, { title, el, depth, baseId }] of sectionsArray) {
|
|
70
|
+
const occurrence = (baseIdCounts.get(baseId) ?? 0) + 1;
|
|
71
|
+
baseIdCounts.set(baseId, occurrence);
|
|
72
|
+
const id = occurrence === 1 ? baseId : `${baseId}-${occurrence}`;
|
|
73
|
+
|
|
65
74
|
if (!firstSectionId) {
|
|
66
75
|
firstSectionId = id;
|
|
67
76
|
}
|
|
@@ -91,20 +100,10 @@ export function useCategoryTitles({
|
|
|
91
100
|
}, 200);
|
|
92
101
|
}, [updateCategoryTitles]);
|
|
93
102
|
|
|
94
|
-
const removeStaleRefs = (ref: HTMLDivElement) => {
|
|
95
|
-
for (const [existingId, { el }] of sectionReferences.current) {
|
|
96
|
-
if (el !== ref) {
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
sectionReferences.current.delete(existingId);
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
103
|
const handleCategoryTitle = (ref: HTMLDivElement) => {
|
|
105
|
-
const
|
|
104
|
+
const baseId = ref.dataset.id;
|
|
106
105
|
const title = ref.dataset.title;
|
|
107
|
-
if (!
|
|
106
|
+
if (!baseId || !title) return;
|
|
108
107
|
|
|
109
108
|
let depth = 0;
|
|
110
109
|
let parent = ref.parentElement;
|
|
@@ -113,8 +112,7 @@ export function useCategoryTitles({
|
|
|
113
112
|
parent = parent.parentElement;
|
|
114
113
|
}
|
|
115
114
|
|
|
116
|
-
|
|
117
|
-
sectionReferences.current.set(id, { el: ref, title, depth });
|
|
115
|
+
sectionReferences.current.set(ref, { el: ref, title, depth, baseId });
|
|
118
116
|
};
|
|
119
117
|
|
|
120
118
|
const processSection = (element: ForwardedReference) => {
|