@san-siva/blogkit-md-cli 0.1.51 → 0.1.53

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 (122) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/diagnostics/route-bundle-stats.json +8 -6
  7. package/.next/fallback-build-manifest.json +3 -3
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/server/app/[...slug]/page.js +3 -3
  10. package/.next/server/app/[...slug]/page.js.nft.json +1 -1
  11. package/.next/server/app/[...slug]/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_global-error/page.js +1 -1
  13. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  14. package/.next/server/app/_global-error.html +1 -1
  15. package/.next/server/app/_global-error.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  19. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  20. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  21. package/.next/server/app/_not-found/page.js +1 -1
  22. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  23. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/_not-found.html +1 -1
  25. package/.next/server/app/_not-found.rsc +2 -2
  26. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  27. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  29. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  31. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  32. package/.next/server/app/page.js +3 -3
  33. package/.next/server/app/page.js.nft.json +1 -1
  34. package/.next/server/app/page_client-reference-manifest.js +1 -1
  35. package/.next/server/chunks/ssr/{0dlc_0z7y5fs._.js → 0dlc_0-wu_wp._.js} +2 -2
  36. package/.next/server/chunks/ssr/{0dlc_0g7g3-8._.js → 0dlc_0.2f1t2._.js} +2 -2
  37. package/.next/server/chunks/ssr/{0dlc_0yb8l3l._.js → 0dlc_02thqsb._.js} +2 -2
  38. package/.next/server/chunks/ssr/{0dlc_0219ubl._.js → 0dlc_03m86mz._.js} +2 -2
  39. package/.next/server/chunks/ssr/{0dlc_0bhkl55._.js → 0dlc_05svd7e._.js} +2 -2
  40. package/.next/server/chunks/ssr/{0dlc_0b_-669._.js → 0dlc_0687ay-._.js} +2 -2
  41. package/.next/server/chunks/ssr/{0dlc_113eo~b._.js → 0dlc_0ac_913._.js} +2 -2
  42. package/.next/server/chunks/ssr/{0dlc_05sa3v.._.js → 0dlc_0dw7xx~._.js} +2 -2
  43. package/.next/server/chunks/ssr/{0dlc_06c72kx._.js → 0dlc_0h0r~8s._.js} +2 -2
  44. package/.next/server/chunks/ssr/{0dlc_0i-79ps._.js → 0dlc_0iqkaxv._.js} +2 -2
  45. package/.next/server/chunks/ssr/{0dlc_0pn3q5l._.js → 0dlc_0kn6cly._.js} +2 -2
  46. package/.next/server/chunks/ssr/{0dlc_0gf9l8z._.js → 0dlc_0kzc-yi._.js} +2 -2
  47. package/.next/server/chunks/ssr/{0dlc_0q1fs5n._.js → 0dlc_0o-gpnc._.js} +2 -2
  48. package/.next/server/chunks/ssr/{0dlc_12j4q34._.js → 0dlc_0xk7lzk._.js} +2 -2
  49. package/.next/server/chunks/ssr/{0dlc_0ta79~a._.js → 0dlc_0zyt353._.js} +2 -2
  50. package/.next/server/chunks/ssr/{0dlc_0xqydor._.js → 0dlc_13qizfq._.js} +2 -2
  51. package/.next/server/chunks/ssr/{0dlc_@san-siva_blogkit_dist_esm_0up7uxr._.js → 0dlc_@san-siva_blogkit_dist_esm_04a~w8l._.js} +2 -2
  52. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_04a~w8l._.js.map +1 -0
  53. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_dynamicComponents_BlogDynamic_04k29no.js +3 -0
  54. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_dynamicComponents_BlogDynamic_04k29no.js.map +1 -0
  55. package/.next/server/chunks/ssr/{[root-of-the-server]__06q6rfi._.js → [root-of-the-server]__0f~080x._.js} +2 -2
  56. package/.next/server/chunks/ssr/{[root-of-the-server]__030~-6p._.js → [root-of-the-server]__0j-1y2b._.js} +4 -4
  57. package/.next/server/chunks/ssr/[root-of-the-server]__0j-1y2b._.js.map +1 -0
  58. package/.next/server/chunks/ssr/{[root-of-the-server]__000.qv2._.js → [root-of-the-server]__0m-l1vl._.js} +2 -2
  59. package/.next/server/chunks/ssr/{[root-of-the-server]__000.qv2._.js.map → [root-of-the-server]__0m-l1vl._.js.map} +1 -1
  60. package/.next/server/chunks/ssr/{[root-of-the-server]__06u9sw8._.js → [root-of-the-server]__0omhk67._.js} +2 -2
  61. package/.next/server/chunks/ssr/[root-of-the-server]__0omhk67._.js.map +1 -0
  62. package/.next/server/chunks/ssr/blogkit-md-cli_0naia71._.js +6 -0
  63. package/.next/server/chunks/ssr/blogkit-md-cli_0naia71._.js.map +1 -0
  64. package/.next/server/chunks/ssr/blogkit-md-cli_0p82t5f._.js +1 -1
  65. package/.next/server/chunks/ssr/blogkit-md-cli_0p82t5f._.js.map +1 -1
  66. package/.next/server/middleware-build-manifest.js +3 -3
  67. package/.next/server/pages/404.html +1 -1
  68. package/.next/server/pages/500.html +1 -1
  69. package/.next/server/server-reference-manifest.js +1 -1
  70. package/.next/server/server-reference-manifest.json +1 -1
  71. package/.next/static/chunks/02trc.wuz4rqp.css +1 -0
  72. package/.next/static/chunks/{0pxdodycw3c37.js → 0a9y4g46e~o8~.js} +1 -1
  73. package/.next/static/chunks/{0e~bk1lm5ke9x.js → 0mn-zdnv.gz__.js} +1 -1
  74. package/.next/static/chunks/{0mdj2mmw8o5eg.css → 0uqp7lp30c~08.css} +1 -1
  75. package/.next/static/chunks/0y.vc7g3anaza.js +1 -0
  76. package/.next/static/chunks/1611q54w8iczw.js +1 -0
  77. package/.next/trace +1 -1
  78. package/.next/trace-build +1 -1
  79. package/package.json +13 -5
  80. package/src/components/LiveReload.tsx +25 -0
  81. package/src/components/RenderContent.tsx +79 -0
  82. package/src/components/SettingsToolbar.module.scss +40 -0
  83. package/src/components/SettingsToolbar.tsx +45 -0
  84. package/src/components/index.ts +4 -0
  85. package/src/components/useLayoutPreferences.ts +48 -0
  86. package/src/lib/index.ts +10 -0
  87. package/src/lib/layout-preferences.ts +76 -0
  88. package/src/lib/live-reload.ts +56 -0
  89. package/src/lib/markdown-links.ts +51 -0
  90. package/src/lib/resolve-path.ts +47 -0
  91. package/src/package.json +4 -0
  92. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_0up7uxr._.js.map +0 -1
  93. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_dynamicComponents_BlogDynamic_0.rdhnf.js +0 -3
  94. package/.next/server/chunks/ssr/0dlc_@san-siva_blogkit_dist_esm_dynamicComponents_BlogDynamic_0.rdhnf.js.map +0 -1
  95. package/.next/server/chunks/ssr/[root-of-the-server]__030~-6p._.js.map +0 -1
  96. package/.next/server/chunks/ssr/[root-of-the-server]__06u9sw8._.js.map +0 -1
  97. package/.next/server/chunks/ssr/blogkit-md-cli_110mv-l._.js +0 -6
  98. package/.next/server/chunks/ssr/blogkit-md-cli_110mv-l._.js.map +0 -1
  99. package/.next/static/chunks/054dikcsqo4g~.js +0 -1
  100. package/.next/static/chunks/0c_~ty~qvcvuo.js +0 -1
  101. package/.next/static/chunks/0m9hpfcjj6u~9.css +0 -1
  102. package/.next/static/chunks/0nirptw7cuebm.js +0 -1
  103. /package/.next/server/chunks/ssr/{0dlc_0z7y5fs._.js.map → 0dlc_0-wu_wp._.js.map} +0 -0
  104. /package/.next/server/chunks/ssr/{0dlc_0g7g3-8._.js.map → 0dlc_0.2f1t2._.js.map} +0 -0
  105. /package/.next/server/chunks/ssr/{0dlc_0yb8l3l._.js.map → 0dlc_02thqsb._.js.map} +0 -0
  106. /package/.next/server/chunks/ssr/{0dlc_0219ubl._.js.map → 0dlc_03m86mz._.js.map} +0 -0
  107. /package/.next/server/chunks/ssr/{0dlc_0bhkl55._.js.map → 0dlc_05svd7e._.js.map} +0 -0
  108. /package/.next/server/chunks/ssr/{0dlc_0b_-669._.js.map → 0dlc_0687ay-._.js.map} +0 -0
  109. /package/.next/server/chunks/ssr/{0dlc_113eo~b._.js.map → 0dlc_0ac_913._.js.map} +0 -0
  110. /package/.next/server/chunks/ssr/{0dlc_05sa3v.._.js.map → 0dlc_0dw7xx~._.js.map} +0 -0
  111. /package/.next/server/chunks/ssr/{0dlc_06c72kx._.js.map → 0dlc_0h0r~8s._.js.map} +0 -0
  112. /package/.next/server/chunks/ssr/{0dlc_0i-79ps._.js.map → 0dlc_0iqkaxv._.js.map} +0 -0
  113. /package/.next/server/chunks/ssr/{0dlc_0pn3q5l._.js.map → 0dlc_0kn6cly._.js.map} +0 -0
  114. /package/.next/server/chunks/ssr/{0dlc_0gf9l8z._.js.map → 0dlc_0kzc-yi._.js.map} +0 -0
  115. /package/.next/server/chunks/ssr/{0dlc_0q1fs5n._.js.map → 0dlc_0o-gpnc._.js.map} +0 -0
  116. /package/.next/server/chunks/ssr/{0dlc_12j4q34._.js.map → 0dlc_0xk7lzk._.js.map} +0 -0
  117. /package/.next/server/chunks/ssr/{0dlc_0ta79~a._.js.map → 0dlc_0zyt353._.js.map} +0 -0
  118. /package/.next/server/chunks/ssr/{0dlc_0xqydor._.js.map → 0dlc_13qizfq._.js.map} +0 -0
  119. /package/.next/server/chunks/ssr/{[root-of-the-server]__06q6rfi._.js.map → [root-of-the-server]__0f~080x._.js.map} +0 -0
  120. /package/.next/static/{XTb_O8v4YVLwgVp851CWK → 43OQHcd1WIO8TJAGTwApq}/_buildManifest.js +0 -0
  121. /package/.next/static/{XTb_O8v4YVLwgVp851CWK → 43OQHcd1WIO8TJAGTwApq}/_clientMiddlewareManifest.js +0 -0
  122. /package/.next/static/{XTb_O8v4YVLwgVp851CWK → 43OQHcd1WIO8TJAGTwApq}/_ssgManifest.js +0 -0
@@ -0,0 +1,76 @@
1
+ export type LayoutPreferences = {
2
+ /** Widen the article column beyond the default reading width. */
3
+ increasedWidthMode: boolean;
4
+ /** Show the table of contents alongside the article. */
5
+ isTocEnabled: boolean;
6
+ };
7
+
8
+ export const STORAGE_KEY = 'blogkit-md:layout-preferences';
9
+
10
+ export const defaultPreferences: LayoutPreferences = {
11
+ increasedWidthMode: false,
12
+ isTocEnabled: true,
13
+ };
14
+
15
+ /**
16
+ * sessionStorage, not localStorage: it is scoped to the individual tab, so a
17
+ * refresh keeps that tab's choice while every tab keeps its own layout and a
18
+ * newly opened one starts from the defaults.
19
+ */
20
+ const storage = (): Storage | undefined => globalThis.sessionStorage;
21
+
22
+ const booleanOr = (value: unknown, fallback: boolean): boolean =>
23
+ typeof value === 'boolean' ? value : fallback;
24
+
25
+ /**
26
+ * Coerce a stored payload into preferences, falling back per field so a
27
+ * partial or half-corrupt value still contributes what it can.
28
+ */
29
+ export const parsePreferences = (stored: string | null): LayoutPreferences => {
30
+ if (!stored) return defaultPreferences;
31
+
32
+ let parsed: unknown;
33
+ try {
34
+ parsed = JSON.parse(stored);
35
+ } catch {
36
+ return defaultPreferences;
37
+ }
38
+
39
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
40
+ return defaultPreferences;
41
+ }
42
+
43
+ const { increasedWidthMode, isTocEnabled } = parsed as Record<
44
+ keyof LayoutPreferences,
45
+ unknown
46
+ >;
47
+
48
+ return {
49
+ increasedWidthMode: booleanOr(
50
+ increasedWidthMode,
51
+ defaultPreferences.increasedWidthMode
52
+ ),
53
+ isTocEnabled: booleanOr(isTocEnabled, defaultPreferences.isTocEnabled),
54
+ };
55
+ };
56
+
57
+ /**
58
+ * Read this tab's stored preferences. Storage can be missing (server render)
59
+ * or throw (private mode, blocked site data); both fall back to the defaults.
60
+ */
61
+ export const readPreferences = (): LayoutPreferences => {
62
+ try {
63
+ return parsePreferences(storage()?.getItem(STORAGE_KEY) ?? null);
64
+ } catch {
65
+ return defaultPreferences;
66
+ }
67
+ };
68
+
69
+ /** Persist this tab's preferences, ignoring unavailable or full storage. */
70
+ export const writePreferences = (preferences: LayoutPreferences): void => {
71
+ try {
72
+ storage()?.setItem(STORAGE_KEY, JSON.stringify(preferences));
73
+ } catch {
74
+ // Storage unavailable — preferences stay until this tab is closed.
75
+ }
76
+ };
@@ -0,0 +1,56 @@
1
+ // Enough failed reconnects (~3s apart in Chrome) to ride out a server
2
+ // replacement — kill + 400ms port release + next start boot — with margin.
3
+ export const MAX_RETRIES = 30;
4
+
5
+ export type LiveReloadHooks = {
6
+ /** Soft refresh — re-fetch server components for the current route. */
7
+ refresh: () => void;
8
+ /** Full page reload — a different server may own the port now. */
9
+ reload: () => void;
10
+ /** Stop listening for events. */
11
+ close: () => void;
12
+ };
13
+
14
+ /**
15
+ * The reconnect state machine behind LiveReload. The SSE server greets every
16
+ * connection with 'connected' and broadcasts 'reload' on file changes:
17
+ *
18
+ * - 'reload' (or any other payload) → soft refresh.
19
+ * - 'connected' after the stream previously dropped → another server took
20
+ * over this port (e.g. a folder server superseding a file server), so the
21
+ * page shape may have completely changed → full reload.
22
+ * - The first successful connect never reloads, even if attempts before it
23
+ * failed — otherwise a server still booting would cause a reload loop.
24
+ * - The retry budget is per-outage: it resets on every successful connect
25
+ * and closes the stream once an outage exhausts it.
26
+ */
27
+ export function createLiveReloadHandlers({
28
+ refresh,
29
+ reload,
30
+ close,
31
+ }: LiveReloadHooks) {
32
+ let retries = 0;
33
+ let everConnected = false;
34
+ let dropped = false;
35
+
36
+ return {
37
+ onMessage(data: string): void {
38
+ if (data === 'connected') {
39
+ const replaced = everConnected && dropped;
40
+ everConnected = true;
41
+ dropped = false;
42
+ retries = 0;
43
+ if (replaced) {
44
+ close();
45
+ reload();
46
+ }
47
+ return;
48
+ }
49
+ refresh();
50
+ },
51
+ onError(): void {
52
+ dropped = true;
53
+ if (++retries >= MAX_RETRIES) close();
54
+ },
55
+ };
56
+ }
@@ -0,0 +1,51 @@
1
+ import { readdir } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+
4
+ export type LinkItem = { href: string; label: string };
5
+
6
+ /**
7
+ * Recursively collect a link for every .md file under `root`. Hrefs are built
8
+ * relative to `base` (the served MARKDOWN_DIR) so they stay valid no matter
9
+ * which subdirectory is being listed; labels are relative to `root` so a
10
+ * subdirectory listing isn't prefixed with its own name on every line.
11
+ */
12
+ export async function collectMarkdownLinks(
13
+ root: string,
14
+ base: string
15
+ ): Promise<LinkItem[]> {
16
+ const links: LinkItem[] = [];
17
+
18
+ const walk = async (current: string) => {
19
+ let entries;
20
+ try {
21
+ entries = await readdir(current, { withFileTypes: true });
22
+ } catch {
23
+ return;
24
+ }
25
+ for (const entry of entries) {
26
+ const fullPath = path.join(current, entry.name);
27
+ if (entry.isDirectory()) {
28
+ await walk(fullPath);
29
+ } else if (entry.name.endsWith('.md')) {
30
+ const href =
31
+ '/' +
32
+ path
33
+ .relative(base, fullPath)
34
+ .replace(/\.md$/, '')
35
+ .split(path.sep)
36
+ .map(encodeURIComponent)
37
+ .join('/');
38
+ const label = path
39
+ .relative(root, fullPath)
40
+ .replace(/\.md$/, '')
41
+ .split(path.sep)
42
+ .join(' / ');
43
+ links.push({ href, label });
44
+ }
45
+ }
46
+ };
47
+
48
+ await walk(root);
49
+ links.sort((a, b) => a.label.localeCompare(b.label));
50
+ return links;
51
+ }
@@ -0,0 +1,47 @@
1
+ import { stat } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+
4
+ /**
5
+ * Resolve a URL slug to a path inside `dir`, rejecting traversal attempts:
6
+ * `..` segments, separators smuggled inside a segment (also via URL encoding),
7
+ * and anything that resolves outside `dir`.
8
+ */
9
+ export const resolveSafePath = (
10
+ slug: string[],
11
+ dir: string | undefined
12
+ ): string | null => {
13
+ if (!dir) return null;
14
+
15
+ const safeSlug = slug
16
+ .map(part => decodeURIComponent(part))
17
+ .filter(p => p && p !== '..' && !p.includes('/') && !p.includes('\\'));
18
+ if (safeSlug.length !== slug.length) return null;
19
+
20
+ const target = path.resolve(dir, safeSlug.join(path.sep));
21
+ // Defense-in-depth: check '..' as a whole segment so children whose own
22
+ // name starts with dots (e.g. '..drafts') aren't mistaken for traversal.
23
+ const relative = path.relative(dir, target);
24
+ if (
25
+ relative === '..' ||
26
+ relative.startsWith('..' + path.sep) ||
27
+ path.isAbsolute(relative)
28
+ ) {
29
+ return null;
30
+ }
31
+ return target;
32
+ };
33
+
34
+ /** When the slug names an existing directory inside `dir`, return its path; else null. */
35
+ export const resolveDirectory = async (
36
+ slug: string[],
37
+ dir: string | undefined
38
+ ): Promise<string | null> => {
39
+ const target = resolveSafePath(slug, dir);
40
+ if (!target) return null;
41
+ try {
42
+ const stats = await stat(target);
43
+ return stats.isDirectory() ? target : null;
44
+ } catch {
45
+ return null;
46
+ }
47
+ };
@@ -0,0 +1,4 @@
1
+ {
2
+ "//": "Tests run as ESM so tsx resolves packages that only define an 'import' export condition (e.g. @san-siva/blogkit-md). Scoped here to keep the CJS bin build untouched.",
3
+ "type": "module"
4
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/utils/index.ts","../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/staticComponents/CalloutStatic.tsx"],"sourcesContent":["import { isValidElement } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const extractTextFromReactNode = (node: ReactNode): string => {\n\tif (node === null || node === undefined || typeof node === 'boolean') return '';\n\tif (typeof node === 'string' || typeof node === 'number') return String(node);\n\tif (isValidElement(node)) return extractTextFromReactNode((node.props as { children?: ReactNode }).children);\n\tif (Array.isArray(node)) return node.map(extractTextFromReactNode).join('');\n\treturn '';\n};\n\nexport const generateIdForBlogTitle = (title: string) => title.toLowerCase().replace(/[^\\w\\d]/g, '-');\n\nexport const generateUrlForBlogTitle = (title: string) => encodeURIComponent(title.replace(/[^\\w]+/g, '-').toLowerCase());\n\nexport const generateSectionHref = (id: string) => `?section=${id}`;\n","import type { ReactNode } from 'react';\n\nimport styles from '../styles/Callout.module.scss';\n\ninterface CalloutProperties {\n\tchildren?: ReactNode;\n\ttype: 'info' | 'warning' | 'error' | 'success';\n\thasMarginUp?: boolean;\n\thasMarginDown?: boolean;\n}\n\nconst Callout = ({ children, type = 'info',\n\thasMarginUp = false,\n\thasMarginDown = false\n}: CalloutProperties) => {\n\tconst className = `${styles.callout} ${styles[`callout--${type}`]} ${\n\t\thasMarginUp ? styles['margin-top--1'] : ''\n\t} ${hasMarginDown ? styles['margin-bottom--2'] : ''}`;\n\treturn (\n\t\t<div className={className}>\n\t\t\t<div className={styles.callout__icon}/>\n\t\t\t<div className={styles.callout__wrapper}>{children}</div>\n\t\t</div>\n\t);\n};\n\nexport default Callout;\n"],"names":["_jsxs","_jsx"],"mappings":"03DAGO,IAAM,EAA4B,AAAD,GACvC,CADuD,KAAY,AAC/D,GAAuC,AAAgB,CAAnD,KAAK,GAAuD,CADhC,AACnB,CAAqD,GAAjD,IAA6B,AAAzB,EAAoD,EAAvB,AAAyB,CAC3D,AADU,QACF,CADW,CACnC,OAAO,GAAqC,CAAjC,OAAyC,EAAxB,AAA0B,OAAnB,EAA0B,EAAtB,IAA4B,CAAC,GACxE,CAD4E,AAC5E,CAD6E,CACzE,EAAA,cAAA,AAAc,EAAC,GAAc,CAAV,CAAC,AAAmC,EAAjC,AAAsC,EAAD,GAAmC,CAAC,QAAQ,CAAC,CACxG,IADqD,CAChD,CAAC,OAAO,CAAC,GAAc,CAAV,CAAC,AAAc,EAAZ,AAAW,CAAI,CAAC,GAA0B,IAAI,CAAC,EAAE,CAAC,CACpE,EAAE,UADwD,CAAC,qDAI7B,AAAC,GAAkB,EAAL,AAAW,GAAD,QAAY,EAAE,CAAC,OAAO,CAAC,UAAU,CAAE,GAAG,0BAIjE,AAAC,EAAU,CAAK,CAAA,SAAA,EAAY,EAAE,CAAA,6BAF1B,AAAC,GAAkB,EAAL,gBAAuB,CAAC,EAAM,GAAD,IAAQ,CAAC,SAAS,CAAE,GAAG,CAAC,CAAC,WAAW,EAAE,6tSCFxG,CAAC,UAAE,CAAQ,MAAE,EAAO,EAAH,IAAS,CACzC,WAAW,IAAG,CAAK,eACnB,GAAgB,CAAK,CACF,IACnB,CADuB,GADV,AAEP,EAAY,CAAA,EAAG,EAAO,EAAb,EAAY,GAAQ,CAAA,CAAA,EAAI,CAAM,CAAC,CAAA,SAAA,EAAY,EAAI,CAAE,CAAF,AAAG,CAAA,CAAA,EAChE,EAAc,CAAM,CAAC,OAAV,QAAyB,CAAC,CAAG,EACzC,CAAA,CAAA,EAAI,EAAgB,CAAM,CAAC,SAAV,SAA4B,CAAC,CAAG,EAAE,CAAA,CAAE,CACrD,MAAA,CAAA,EACCA,EAAAA,IAAAA,AAAA,EAAA,KAAA,CAAA,CAAK,SAAS,CAAE,EAAS,OAAA,EAAA,IACxBC,EAAAA,GAAAA,AAAA,EAAA,KAAA,CAAA,CAAK,SAAS,CAAE,EAAO,IAAD,SAAc,EAAG,IACvCA,EAAAA,GAAAA,AAAA,EAAA,KAAA,CAAA,CAAK,SAAS,CAAE,EAAO,IAAD,YAAiB,CAAA,QAAA,CAAG,CAAQ,CAAA,CAAO,CAAA,CAAA,CACpD,AAER,EAHqD","ignoreList":[1]}
@@ -1,3 +0,0 @@
1
- module.exports=[10950,a=>{"use strict";var b=a.i(46737),c=a.i(55017),d=a.i(39102),e=a.i(75845),f=a.i(39617);let g=(a,b,c,d)=>{c.current&&document.body.removeEventListener("scrollend",c.current),b.current=!0,c.current=()=>{b.current=!1,c.current=null,d(a);let e=new URL(window.location.href);e.searchParams.set("section",a),window.history.replaceState({},"",e.toString())},document.body.addEventListener("scrollend",c.current,{once:!0})},h=a=>{let b=new URL(window.location.href);b.searchParams.set("section",a),window.history.replaceState({},"",b.toString())},i=a=>{if(!a)return;let b=a.getBoundingClientRect().top+document.body.scrollTop-100;document.body.scrollTo({top:b,behavior:"smooth"})};var j={"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","font-style--italic":"TocNode-module_font-style--italic__FJ9j7",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"};let k=({node:a,index:c,visibleTitle:d,onClick:e})=>(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{"data-idx":c,"data-id":a.id,className:[j["toc-node__title"],a.id===d?j["toc-node__title--active"]:"",1===a.depth?j["toc-node__title--sub"]:"",2===a.depth?j["toc-node__title--sub-sub"]:""].join(" "),onClick:e,children:a.title}),a.children.length>0&&(0,b.jsx)("div",{className:`${j["toc-node__children"]} ${j[`toc-node__children--${0===a.depth?"sub":"sub-sub"}`]}`,children:a.children.map((c,f)=>(0,b.jsx)(k,{node:c,index:f,visibleTitle:d,onClick:e},`${a.id}-${c.id}`))})]});a.s(["default",0,({children:a,title:j="In this article",jsonLd:l,increasedWidthMode:m=!1})=>{let[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),{categoryTitles:r,handleSectionReference:s}=function({visibleTitle:a,setVisibleTitle:b,setShowTOC:d}){let e=(0,c.useRef)(new Map),[f,g]=(0,c.useState)(new Map),h=(0,c.useRef)(null),i=(0,c.useCallback)(([,a],[,b])=>{let c=a.el.compareDocumentPosition(b.el);return c&Node.DOCUMENT_POSITION_FOLLOWING?-1:c&Node.DOCUMENT_POSITION_PRECEDING?1:0},[]),j=(0,c.useCallback)(()=>{let c=Date.now(),f=new Map,h=Array.from(e.current.entries());h.sort(i);let j=null,k=new Map;for(let[,{title:a,el:b,depth:d,baseId:e}]of h){let g=(k.get(e)??0)+1;k.set(e,g);let h=1===g?e:`${e}-${g}`;j||(j=h),f.set(h,{el:b,title:a,lastUpdatedAt:c,depth:d})}0===f.size||(g(f),d(!0),a||b(j))},[a,i,d,b]),k=(0,c.useCallback)(()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{j()},200)},[j]),l=a=>{let{parentRef:b,childRefs:c}=a;if(b&&(a=>{let b=a.dataset.id,c=a.dataset.title;if(!b||!c)return;let d=0,f=a.parentElement;for(;f;)f.hasAttribute("data-id")&&d++,f=f.parentElement;e.current.set(a,{el:a,title:c,depth:d,baseId:b})})(b),Array.isArray(c))for(let a of c)l(a)},m=(0,c.useCallback)(a=>{a&&(l(a),k())},[k]);return(0,c.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),{categoryTitles:f,handleSectionReference:m}}({visibleTitle:n,setVisibleTitle:o,setShowTOC:q}),{handleClickCategoryTitle:t}=function({categoryTitles:a,setVisibleTitle:b}){let d=(0,c.useRef)(!1),e=(0,c.useRef)(null),f=(0,c.useRef)(new Map);return(0,c.useEffect)(()=>{for(let[c,{el:e}]of a){let a=new IntersectionObserver(([a])=>{!a.isIntersecting||d.current||0!==document.body.scrollTop&&(b(b=>b!==c||a.isIntersecting?a.isIntersecting?c:b:null),h(c))},{threshold:.1});f.current.set(c,a),a.observe(e)}},[a.size,b]),(0,c.useEffect)(()=>{if(0===a.size)return;let c=new URL(window.location.href).searchParams.get("section");if(!c)return;let f=a.get(c);f&&(i(f.el),g(c,d,e,b))},[a.size,b]),(0,c.useEffect)(()=>()=>{for(let a of(e.current&&document.body.removeEventListener("scrollend",e.current),f.current.values()))a.disconnect()},[]),{handleClickCategoryTitle:(0,c.useCallback)(c=>{let f=c.currentTarget.dataset.id,j=c.currentTarget.dataset.idx;if(!f||!j)return;let{el:k}=a.get(f)||{};k&&(h(f),i(k),g(f,d,e,b))},[a,b])}}({categoryTitles:r,setVisibleTitle:o}),u=(0,e.useSpring)({opacity:+!!p,transform:p?"translateX(0)":"translateX(40px)",config:e.config.gentle});return(0,b.jsxs)("div",{className:`${f.default.blog} ${m?f.default["blog--increased-width"]:""}`,children:[l&&(0,b.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),(0,b.jsx)("div",{className:f.default.blog__content,children:c.Children.map(a,a=>(0,c.isValidElement)(a)?(0,c.cloneElement)(a,{ref:s}):a)}),(0,b.jsxs)(d.animated.div,{className:f.default.blog__sidebar,style:u,children:[(0,b.jsx)("p",{className:`${f.default["margin-bottom--3"]} ${f.default.category__header}`,children:j}),(a=>{let b=[],c=[];for(let[d,{title:e,depth:f}]of a.filter(([,{depth:a}])=>a<=2)){let a={id:d,title:e,depth:f,children:[]};for(;c.length>0&&c[c.length-1].depth>=f;)c.pop();0===c.length?b.push(a):c[c.length-1].children.push(a),c.push(a)}return b})([...r]).map((a,c)=>(0,b.jsx)(k,{node:a,index:c,visibleTitle:n,onClick:t},a.id))]})]})}],10950)}];
2
-
3
- //# sourceMappingURL=0dlc_%40san-siva_blogkit_dist_esm_dynamicComponents_BlogDynamic_0.rdhnf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/utils/lockScrollUpdates.ts","../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/hooks/useCategoryTitles.ts","../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/staticComponents/TocNodeStatic.tsx","../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/hooks/useSectionObserver.ts","../../../../../blogkit-md-cli/node_modules/%40san-siva/blogkit/src/dynamicComponents/BlogDynamic.tsx"],"sourcesContent":["import type { MutableRefObject } from 'react';\n\nconst lockScrollUpdates = (\n\tid: string,\n\tisClickScrolling: MutableRefObject<boolean>,\n\tscrollEndHandlerRef: MutableRefObject<(() => void) | null>,\n\tsetVisibleTitle: (id: string) => void\n) => {\n\tif (scrollEndHandlerRef.current) {\n\t\tdocument.body.removeEventListener('scrollend', scrollEndHandlerRef.current);\n\t}\n\n\tisClickScrolling.current = true;\n\n\tscrollEndHandlerRef.current = () => {\n\t\tisClickScrolling.current = false;\n\t\tscrollEndHandlerRef.current = null;\n\t\tsetVisibleTitle(id);\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\tdocument.body.addEventListener('scrollend', scrollEndHandlerRef.current, {\n\t\tonce: true,\n\t});\n};\n\nexport default lockScrollUpdates;\n","'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","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","'use client';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport type { Dispatch, MouseEvent, SetStateAction } from 'react';\n\nimport lockScrollUpdates from '../utils/lockScrollUpdates';\nimport type { CategoryTitle } from './useCategoryTitles';\n\nconst getSectionFromUrl = () => {\n\tconst url = new URL(window.location.href);\n\treturn url.searchParams.get('section');\n};\n\nconst updateUrl = (id: string) => {\n\tconst url = new URL(window.location.href);\n\turl.searchParams.set('section', id);\n\twindow.history.replaceState({}, '', url.toString());\n};\n\nconst scrollIntoView = (element: HTMLElement) => {\n\tif (!element) return;\n\tconst top =\n\t\telement.getBoundingClientRect().top + document.body.scrollTop - 100;\n\tdocument.body.scrollTo({ top, behavior: 'smooth' });\n};\n\ninterface Options {\n\tcategoryTitles: CategoryTitle;\n\tsetVisibleTitle: Dispatch<SetStateAction<string | null>>;\n}\n\nexport function useSectionObserver({ categoryTitles, setVisibleTitle }: Options) {\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\t// Set up IntersectionObservers whenever the set of sections changes\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\tupdateUrl(id);\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, setVisibleTitle]);\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) return;\n\t\tconst entry = categoryTitles.get(section);\n\t\tif (!entry) return;\n\t\tscrollIntoView(entry.el);\n\t\tlockScrollUpdates(section, isClickScrolling, scrollEndHandlerRef, setVisibleTitle);\n\t}, [categoryTitles.size, setVisibleTitle]);\n\n\t// Cleanup observers on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (scrollEndHandlerRef.current) {\n\t\t\t\tdocument.body.removeEventListener('scrollend', scrollEndHandlerRef.current);\n\t\t\t}\n\t\t\tfor (const observer of intersectionObserversRef.current.values()) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst handleClickCategoryTitle = useCallback(\n\t\t(event: MouseEvent<HTMLParagraphElement>) => {\n\t\t\tconst id = event.currentTarget.dataset.id;\n\t\t\tconst index = event.currentTarget.dataset.idx;\n\t\t\tif (!id || !index) return;\n\n\t\t\tconst { el } = categoryTitles.get(id) || {};\n\t\t\tif (!el) return;\n\n\t\t\tupdateUrl(id);\n\t\t\tscrollIntoView(el);\n\t\t\tlockScrollUpdates(id, isClickScrolling, scrollEndHandlerRef, setVisibleTitle);\n\t\t},\n\t\t[categoryTitles, setVisibleTitle]\n\t);\n\n\treturn { handleClickCategoryTitle };\n}\n","'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\tincreasedWidthMode?: boolean;\n}\n\nexport interface ForwardedReference {\n\tparentRef: HTMLDivElement;\n\tchildRefs: ForwardedReference[];\n}\n\nconst MAX_TOC_DEPTH = 2;\n\nconst buildTocTree = (entries: [string, CategoryTitleValue][]): TocNode[] => {\n\tconst roots: TocNode[] = [];\n\tconst stack: TocNode[] = [];\n\tfor (const [id, { title, depth }] of entries.filter(([, { depth }]) => depth <= MAX_TOC_DEPTH)) {\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\tincreasedWidthMode = false,\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} ${increasedWidthMode ? styles['blog--increased-width'] : ''}`}>\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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