@autumnsgrove/groveengine 0.6.1 → 0.6.3

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 (77) hide show
  1. package/dist/auth/jwt.d.ts +10 -4
  2. package/dist/auth/jwt.js +18 -4
  3. package/dist/auth/session.d.ts +22 -15
  4. package/dist/auth/session.js +35 -16
  5. package/dist/components/admin/GutterManager.svelte +81 -139
  6. package/dist/components/admin/GutterManager.svelte.d.ts +6 -6
  7. package/dist/components/admin/MarkdownEditor.svelte +80 -23
  8. package/dist/components/admin/MarkdownEditor.svelte.d.ts +14 -8
  9. package/dist/components/admin/composables/useAmbientSounds.svelte.d.ts +52 -2
  10. package/dist/components/admin/composables/useAmbientSounds.svelte.js +38 -4
  11. package/dist/components/admin/composables/useCommandPalette.svelte.d.ts +80 -10
  12. package/dist/components/admin/composables/useCommandPalette.svelte.js +45 -5
  13. package/dist/components/admin/composables/useDraftManager.svelte.d.ts +76 -14
  14. package/dist/components/admin/composables/useDraftManager.svelte.js +44 -10
  15. package/dist/components/admin/composables/useEditorTheme.svelte.d.ts +168 -2
  16. package/dist/components/admin/composables/useEditorTheme.svelte.js +40 -7
  17. package/dist/components/admin/composables/useSlashCommands.svelte.d.ts +94 -22
  18. package/dist/components/admin/composables/useSlashCommands.svelte.js +58 -9
  19. package/dist/components/admin/composables/useSnippets.svelte.d.ts +51 -2
  20. package/dist/components/admin/composables/useSnippets.svelte.js +35 -3
  21. package/dist/components/admin/composables/useWritingSession.svelte.d.ts +64 -6
  22. package/dist/components/admin/composables/useWritingSession.svelte.js +42 -5
  23. package/dist/components/custom/ContentWithGutter.svelte +53 -23
  24. package/dist/components/custom/ContentWithGutter.svelte.d.ts +6 -14
  25. package/dist/components/custom/GutterItem.svelte +1 -1
  26. package/dist/components/custom/LeftGutter.svelte +43 -13
  27. package/dist/components/custom/LeftGutter.svelte.d.ts +6 -6
  28. package/dist/config/ai-models.js +1 -1
  29. package/dist/groveauth/client.js +11 -11
  30. package/dist/index.d.ts +3 -1
  31. package/dist/index.js +2 -2
  32. package/dist/server/logger.d.ts +74 -26
  33. package/dist/server/logger.js +133 -184
  34. package/dist/server/services/cache.js +1 -10
  35. package/dist/ui/components/charts/ActivityOverview.svelte +14 -3
  36. package/dist/ui/components/charts/ActivityOverview.svelte.d.ts +10 -7
  37. package/dist/ui/components/charts/RepoBreakdown.svelte +9 -3
  38. package/dist/ui/components/charts/RepoBreakdown.svelte.d.ts +12 -11
  39. package/dist/ui/components/charts/Sparkline.svelte +18 -7
  40. package/dist/ui/components/charts/Sparkline.svelte.d.ts +21 -2
  41. package/dist/ui/components/gallery/ImageGallery.svelte +12 -8
  42. package/dist/ui/components/gallery/ImageGallery.svelte.d.ts +2 -2
  43. package/dist/ui/components/gallery/Lightbox.svelte +5 -2
  44. package/dist/ui/components/gallery/ZoomableImage.svelte +8 -5
  45. package/dist/ui/components/primitives/accordion/index.d.ts +1 -1
  46. package/dist/ui/components/primitives/input/input.svelte.d.ts +1 -1
  47. package/dist/ui/components/primitives/tabs/index.d.ts +1 -1
  48. package/dist/ui/components/primitives/textarea/textarea.svelte.d.ts +1 -1
  49. package/dist/ui/components/ui/Button.svelte +5 -0
  50. package/dist/ui/components/ui/Button.svelte.d.ts +4 -1
  51. package/dist/ui/components/ui/Input.svelte +4 -0
  52. package/dist/ui/components/ui/Input.svelte.d.ts +3 -1
  53. package/dist/ui/components/ui/Logo.svelte +86 -0
  54. package/dist/ui/components/ui/Logo.svelte.d.ts +25 -0
  55. package/dist/ui/components/ui/LogoLoader.svelte +71 -0
  56. package/dist/ui/components/ui/LogoLoader.svelte.d.ts +9 -0
  57. package/dist/ui/components/ui/index.d.ts +2 -0
  58. package/dist/ui/components/ui/index.js +2 -0
  59. package/dist/ui/tailwind.preset.js +8 -8
  60. package/dist/utils/api.js +2 -1
  61. package/dist/utils/debounce.d.ts +4 -3
  62. package/dist/utils/debounce.js +10 -6
  63. package/dist/utils/gallery.d.ts +58 -32
  64. package/dist/utils/gallery.js +111 -129
  65. package/dist/utils/gutter.d.ts +47 -26
  66. package/dist/utils/gutter.js +116 -124
  67. package/dist/utils/imageProcessor.d.ts +66 -19
  68. package/dist/utils/imageProcessor.js +31 -10
  69. package/dist/utils/index.d.ts +11 -11
  70. package/dist/utils/index.js +4 -3
  71. package/dist/utils/json.js +1 -1
  72. package/dist/utils/markdown.d.ts +183 -103
  73. package/dist/utils/markdown.js +517 -678
  74. package/dist/utils/sanitize.d.ts +22 -12
  75. package/dist/utils/sanitize.js +268 -282
  76. package/dist/utils/validation.js +4 -3
  77. package/package.json +4 -3
@@ -5,62 +5,88 @@
5
5
  * - minecraft/build_2024-12-01.png → category: minecraft, date: 2024-12-01
6
6
  * - selfies/2024-summer.jpg → category: selfies, slug: 2024-summer
7
7
  */
8
+ /** Parsed metadata from an image filename */
9
+ export interface ParsedImageMetadata {
10
+ category: string | null;
11
+ date: string | null;
12
+ slug: string;
13
+ filename: string;
14
+ extension: string | null;
15
+ r2Key: string;
16
+ }
17
+ /** Tag object associated with an image */
18
+ export interface ImageTag {
19
+ slug: string;
20
+ name?: string;
21
+ }
22
+ /** Gallery image object */
23
+ export interface GalleryImage {
24
+ r2_key?: string;
25
+ key?: string;
26
+ custom_title?: string;
27
+ custom_date?: string;
28
+ custom_description?: string;
29
+ parsed_slug?: string;
30
+ parsed_date?: string;
31
+ parsed_category?: string;
32
+ tags?: ImageTag[];
33
+ }
8
34
  /**
9
35
  * Parse a filename to extract metadata
10
- * @param {string} r2Key - R2 object key (e.g., 'minecraft/build.png' or '2025-01-15_photo.jpg')
11
- * @returns {Object} Parsed metadata: { category, date, slug, filename, extension }
36
+ * @param r2Key - R2 object key (e.g., 'minecraft/build.png' or '2025-01-15_photo.jpg')
37
+ * @returns Parsed metadata: { category, date, slug, filename, extension }
12
38
  */
13
- export function parseImageFilename(r2Key: string): Object;
39
+ export declare function parseImageFilename(r2Key: string): ParsedImageMetadata;
14
40
  /**
15
41
  * Get display title for an image (uses custom title or parsed slug)
16
- * @param {Object} image - Gallery image object
17
- * @returns {string} Human-readable title
42
+ * @param image - Gallery image object
43
+ * @returns Human-readable title
18
44
  */
19
- export function getImageTitle(image: Object): string;
45
+ export declare function getImageTitle(image: GalleryImage): string;
20
46
  /**
21
47
  * Get display date for an image (uses custom date or parsed date)
22
- * @param {Object} image - Gallery image object
23
- * @returns {string|null} YYYY-MM-DD date string or null
48
+ * @param image - Gallery image object
49
+ * @returns YYYY-MM-DD date string or null
24
50
  */
25
- export function getImageDate(image: Object): string | null;
51
+ export declare function getImageDate(image: GalleryImage): string | null;
26
52
  /**
27
53
  * Filter images by search query (searches title, slug, filename)
28
- * @param {Array} images - Array of gallery images
29
- * @param {string} query - Search query
30
- * @returns {Array} Filtered images
54
+ * @param images - Array of gallery images
55
+ * @param query - Search query
56
+ * @returns Filtered images
31
57
  */
32
- export function searchImages(images: any[], query: string): any[];
58
+ export declare function searchImages(images: GalleryImage[], query: string): GalleryImage[];
33
59
  /**
34
60
  * Filter images by date range
35
- * @param {Array} images - Array of gallery images
36
- * @param {string|null} startDate - YYYY-MM-DD start date (inclusive)
37
- * @param {string|null} endDate - YYYY-MM-DD end date (inclusive)
38
- * @returns {Array} Filtered images
61
+ * @param images - Array of gallery images
62
+ * @param startDate - YYYY-MM-DD start date (inclusive)
63
+ * @param endDate - YYYY-MM-DD end date (inclusive)
64
+ * @returns Filtered images
39
65
  */
40
- export function filterImagesByDateRange(images: any[], startDate: string | null, endDate: string | null): any[];
66
+ export declare function filterImagesByDateRange(images: GalleryImage[], startDate: string | null, endDate: string | null): GalleryImage[];
41
67
  /**
42
68
  * Filter images by tags
43
- * @param {Array} images - Array of gallery images (must include 'tags' array)
44
- * @param {Array} tagSlugs - Array of tag slugs to filter by
45
- * @returns {Array} Filtered images
69
+ * @param images - Array of gallery images (must include 'tags' array)
70
+ * @param tagSlugs - Array of tag slugs to filter by
71
+ * @returns Filtered images
46
72
  */
47
- export function filterImagesByTags(images: any[], tagSlugs: any[]): any[];
73
+ export declare function filterImagesByTags(images: GalleryImage[], tagSlugs: string[]): GalleryImage[];
48
74
  /**
49
75
  * Filter images by category (parsed from path)
50
- * @param {Array} images - Array of gallery images
51
- * @param {string|null} category - Category to filter by
52
- * @returns {Array} Filtered images
76
+ * @param images - Array of gallery images
77
+ * @param category - Category to filter by
78
+ * @returns Filtered images
53
79
  */
54
- export function filterImagesByCategory(images: any[], category: string | null): any[];
80
+ export declare function filterImagesByCategory(images: GalleryImage[], category: string | null): GalleryImage[];
55
81
  /**
56
82
  * Extract unique years from image dates
57
- * @param {Array} images - Array of gallery images
58
- * @returns {Array} Sorted array of years (descending)
83
+ * @param images - Array of gallery images
84
+ * @returns Sorted array of years (descending)
59
85
  */
60
- export function getAvailableYears(images: any[]): any[];
86
+ export declare function getAvailableYears(images: GalleryImage[]): string[];
61
87
  /**
62
88
  * Extract unique categories from images
63
- * @param {Array} images - Array of gallery images
64
- * @returns {Array} Sorted array of categories
89
+ * @param images - Array of gallery images
90
+ * @returns Sorted array of categories
65
91
  */
66
- export function getAvailableCategories(images: any[]): any[];
92
+ export declare function getAvailableCategories(images: GalleryImage[]): string[];
@@ -5,177 +5,159 @@
5
5
  * - minecraft/build_2024-12-01.png → category: minecraft, date: 2024-12-01
6
6
  * - selfies/2024-summer.jpg → category: selfies, slug: 2024-summer
7
7
  */
8
-
9
8
  /**
10
9
  * Parse a filename to extract metadata
11
- * @param {string} r2Key - R2 object key (e.g., 'minecraft/build.png' or '2025-01-15_photo.jpg')
12
- * @returns {Object} Parsed metadata: { category, date, slug, filename, extension }
10
+ * @param r2Key - R2 object key (e.g., 'minecraft/build.png' or '2025-01-15_photo.jpg')
11
+ * @returns Parsed metadata: { category, date, slug, filename, extension }
13
12
  */
14
13
  export function parseImageFilename(r2Key) {
15
- const parts = r2Key.split('/');
16
- const filename = parts[parts.length - 1];
17
- const category = parts.length > 1 ? parts[0] : null;
18
-
19
- // Extract extension
20
- const extMatch = filename.match(/\.([^.]+)$/);
21
- const extension = extMatch ? extMatch[1] : null;
22
- const nameWithoutExt = filename.replace(/\.[^.]+$/, '');
23
-
24
- // Try to extract date (YYYY-MM-DD or YYYY_MM_DD)
25
- const dateMatch = nameWithoutExt.match(/(\d{4}[-_]\d{2}[-_]\d{2})/);
26
- const date = dateMatch ? dateMatch[1].replace(/_/g, '-') : null;
27
-
28
- // Extract slug (remove date prefix if present)
29
- let slug = nameWithoutExt;
30
- if (date) {
31
- slug = slug.replace(date, '').replace(/^[-_]+/, '').replace(/[-_]+$/, '');
32
- }
33
-
34
- // Clean up slug (convert underscores to hyphens)
35
- slug = slug.replace(/_/g, '-').toLowerCase();
36
-
37
- return {
38
- category,
39
- date,
40
- slug: slug || 'untitled',
41
- filename,
42
- extension,
43
- r2Key
44
- };
14
+ const parts = r2Key.split("/");
15
+ const filename = parts[parts.length - 1];
16
+ const category = parts.length > 1 ? parts[0] : null;
17
+ // Extract extension
18
+ const extMatch = filename.match(/\.([^.]+)$/);
19
+ const extension = extMatch ? extMatch[1] : null;
20
+ const nameWithoutExt = filename.replace(/\.[^.]+$/, "");
21
+ // Try to extract date (YYYY-MM-DD or YYYY_MM_DD)
22
+ const dateMatch = nameWithoutExt.match(/(\d{4}[-_]\d{2}[-_]\d{2})/);
23
+ const date = dateMatch ? dateMatch[1].replace(/_/g, "-") : null;
24
+ // Extract slug (remove date prefix if present)
25
+ let slug = nameWithoutExt;
26
+ if (date) {
27
+ slug = slug.replace(date, "").replace(/^[-_]+/, "").replace(/[-_]+$/, "");
28
+ }
29
+ // Clean up slug (convert underscores to hyphens)
30
+ slug = slug.replace(/_/g, "-").toLowerCase();
31
+ return {
32
+ category,
33
+ date,
34
+ slug: slug || "untitled",
35
+ filename,
36
+ extension,
37
+ r2Key,
38
+ };
45
39
  }
46
-
47
40
  /**
48
41
  * Get display title for an image (uses custom title or parsed slug)
49
- * @param {Object} image - Gallery image object
50
- * @returns {string} Human-readable title
42
+ * @param image - Gallery image object
43
+ * @returns Human-readable title
51
44
  */
52
45
  export function getImageTitle(image) {
53
- if (image.custom_title) return image.custom_title;
54
- if (image.parsed_slug) {
55
- // Convert slug to Title Case
56
- return image.parsed_slug
57
- .split('-')
58
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
59
- .join(' ');
60
- }
61
- return image.r2_key?.split('/').pop() || image.key?.split('/').pop() || 'Untitled';
46
+ if (image.custom_title)
47
+ return image.custom_title;
48
+ if (image.parsed_slug) {
49
+ // Convert slug to Title Case
50
+ return image.parsed_slug
51
+ .split("-")
52
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
53
+ .join(" ");
54
+ }
55
+ return image.r2_key?.split("/").pop() || image.key?.split("/").pop() || "Untitled";
62
56
  }
63
-
64
57
  /**
65
58
  * Get display date for an image (uses custom date or parsed date)
66
- * @param {Object} image - Gallery image object
67
- * @returns {string|null} YYYY-MM-DD date string or null
59
+ * @param image - Gallery image object
60
+ * @returns YYYY-MM-DD date string or null
68
61
  */
69
62
  export function getImageDate(image) {
70
- return image.custom_date || image.parsed_date || null;
63
+ return image.custom_date || image.parsed_date || null;
71
64
  }
72
-
73
65
  /**
74
66
  * Filter images by search query (searches title, slug, filename)
75
- * @param {Array} images - Array of gallery images
76
- * @param {string} query - Search query
77
- * @returns {Array} Filtered images
67
+ * @param images - Array of gallery images
68
+ * @param query - Search query
69
+ * @returns Filtered images
78
70
  */
79
71
  export function searchImages(images, query) {
80
- if (!query) return images;
81
-
82
- const lowerQuery = query.toLowerCase();
83
-
84
- return images.filter((img) => {
85
- const title = getImageTitle(img).toLowerCase();
86
- const slug = (img.parsed_slug || '').toLowerCase();
87
- const filename = (img.r2_key || img.key || '').toLowerCase();
88
- const description = (img.custom_description || '').toLowerCase();
89
-
90
- return (
91
- title.includes(lowerQuery) ||
92
- slug.includes(lowerQuery) ||
93
- filename.includes(lowerQuery) ||
94
- description.includes(lowerQuery)
95
- );
96
- });
72
+ if (!query)
73
+ return images;
74
+ const lowerQuery = query.toLowerCase();
75
+ return images.filter((img) => {
76
+ const title = getImageTitle(img).toLowerCase();
77
+ const slug = (img.parsed_slug || "").toLowerCase();
78
+ const filename = (img.r2_key || img.key || "").toLowerCase();
79
+ const description = (img.custom_description || "").toLowerCase();
80
+ return (title.includes(lowerQuery) ||
81
+ slug.includes(lowerQuery) ||
82
+ filename.includes(lowerQuery) ||
83
+ description.includes(lowerQuery));
84
+ });
97
85
  }
98
-
99
86
  /**
100
87
  * Filter images by date range
101
- * @param {Array} images - Array of gallery images
102
- * @param {string|null} startDate - YYYY-MM-DD start date (inclusive)
103
- * @param {string|null} endDate - YYYY-MM-DD end date (inclusive)
104
- * @returns {Array} Filtered images
88
+ * @param images - Array of gallery images
89
+ * @param startDate - YYYY-MM-DD start date (inclusive)
90
+ * @param endDate - YYYY-MM-DD end date (inclusive)
91
+ * @returns Filtered images
105
92
  */
106
93
  export function filterImagesByDateRange(images, startDate, endDate) {
107
- if (!startDate && !endDate) return images;
108
-
109
- return images.filter((img) => {
110
- const imgDate = getImageDate(img);
111
- if (!imgDate) return false;
112
-
113
- if (startDate && imgDate < startDate) return false;
114
- if (endDate && imgDate > endDate) return false;
115
-
116
- return true;
117
- });
94
+ if (!startDate && !endDate)
95
+ return images;
96
+ return images.filter((img) => {
97
+ const imgDate = getImageDate(img);
98
+ if (!imgDate)
99
+ return false;
100
+ if (startDate && imgDate < startDate)
101
+ return false;
102
+ if (endDate && imgDate > endDate)
103
+ return false;
104
+ return true;
105
+ });
118
106
  }
119
-
120
107
  /**
121
108
  * Filter images by tags
122
- * @param {Array} images - Array of gallery images (must include 'tags' array)
123
- * @param {Array} tagSlugs - Array of tag slugs to filter by
124
- * @returns {Array} Filtered images
109
+ * @param images - Array of gallery images (must include 'tags' array)
110
+ * @param tagSlugs - Array of tag slugs to filter by
111
+ * @returns Filtered images
125
112
  */
126
113
  export function filterImagesByTags(images, tagSlugs) {
127
- if (!tagSlugs || tagSlugs.length === 0) return images;
128
-
129
- return images.filter((img) => {
130
- if (!img.tags || img.tags.length === 0) return false;
131
- const imgTagSlugs = img.tags.map((t) => t.slug);
132
- return tagSlugs.every((slug) => imgTagSlugs.includes(slug));
133
- });
114
+ if (!tagSlugs || tagSlugs.length === 0)
115
+ return images;
116
+ return images.filter((img) => {
117
+ if (!img.tags || img.tags.length === 0)
118
+ return false;
119
+ const imgTagSlugs = img.tags.map((t) => t.slug);
120
+ return tagSlugs.every((slug) => imgTagSlugs.includes(slug));
121
+ });
134
122
  }
135
-
136
123
  /**
137
124
  * Filter images by category (parsed from path)
138
- * @param {Array} images - Array of gallery images
139
- * @param {string|null} category - Category to filter by
140
- * @returns {Array} Filtered images
125
+ * @param images - Array of gallery images
126
+ * @param category - Category to filter by
127
+ * @returns Filtered images
141
128
  */
142
129
  export function filterImagesByCategory(images, category) {
143
- if (!category) return images;
144
- return images.filter((img) => img.parsed_category === category);
130
+ if (!category)
131
+ return images;
132
+ return images.filter((img) => img.parsed_category === category);
145
133
  }
146
-
147
134
  /**
148
135
  * Extract unique years from image dates
149
- * @param {Array} images - Array of gallery images
150
- * @returns {Array} Sorted array of years (descending)
136
+ * @param images - Array of gallery images
137
+ * @returns Sorted array of years (descending)
151
138
  */
152
139
  export function getAvailableYears(images) {
153
- const years = new Set();
154
-
155
- images.forEach((img) => {
156
- const date = getImageDate(img);
157
- if (date) {
158
- const year = date.substring(0, 4);
159
- years.add(year);
160
- }
161
- });
162
-
163
- return Array.from(years).sort((a, b) => b.localeCompare(a));
140
+ const years = new Set();
141
+ images.forEach((img) => {
142
+ const date = getImageDate(img);
143
+ if (date) {
144
+ const year = date.substring(0, 4);
145
+ years.add(year);
146
+ }
147
+ });
148
+ return Array.from(years).sort((a, b) => b.localeCompare(a));
164
149
  }
165
-
166
150
  /**
167
151
  * Extract unique categories from images
168
- * @param {Array} images - Array of gallery images
169
- * @returns {Array} Sorted array of categories
152
+ * @param images - Array of gallery images
153
+ * @returns Sorted array of categories
170
154
  */
171
155
  export function getAvailableCategories(images) {
172
- const categories = new Set();
173
-
174
- images.forEach((img) => {
175
- if (img.parsed_category) {
176
- categories.add(img.parsed_category);
177
- }
178
- });
179
-
180
- return Array.from(categories).sort();
156
+ const categories = new Set();
157
+ images.forEach((img) => {
158
+ if (img.parsed_category) {
159
+ categories.add(img.parsed_category);
160
+ }
161
+ });
162
+ return Array.from(categories).sort();
181
163
  }
@@ -5,50 +5,71 @@
5
5
  * and anchor resolution. Used by ContentWithGutter component and related
6
6
  * functionality across the site.
7
7
  */
8
+ /** Anchor types supported by the gutter system */
9
+ export type AnchorType = "none" | "paragraph" | "tag" | "header";
10
+ /** Parsed anchor result */
11
+ export interface ParsedAnchor {
12
+ type: AnchorType;
13
+ value: string | number | null;
14
+ }
15
+ /** Header object from markdown parsing */
16
+ export interface Header {
17
+ id: string;
18
+ text: string;
19
+ level?: number;
20
+ }
21
+ /** Gutter item with anchor */
22
+ export interface GutterItem {
23
+ anchor?: string;
24
+ type?: string;
25
+ content?: string;
26
+ src?: string;
27
+ [key: string]: unknown;
28
+ }
8
29
  /**
9
30
  * Parse anchor string to determine anchor type and value
10
- * @param {string} anchor - The anchor string from manifest
11
- * @returns {Object} Object with type and value properties
31
+ * @param anchor - The anchor string from manifest
32
+ * @returns Object with type and value properties
12
33
  */
13
- export function parseAnchor(anchor: string): Object;
34
+ export declare function parseAnchor(anchor: string | undefined | null): ParsedAnchor;
14
35
  /**
15
36
  * Generate a unique key for an anchor (used for grouping and positioning)
16
- * @param {string} anchor - The anchor string
17
- * @param {Array} headers - Array of header objects with id and text
18
- * @returns {string} A unique key for the anchor
37
+ * @param anchor - The anchor string
38
+ * @param headers - Array of header objects with id and text
39
+ * @returns A unique key for the anchor
19
40
  */
20
- export function getAnchorKey(anchor: string, headers?: any[]): string;
41
+ export declare function getAnchorKey(anchor: string, headers?: Header[]): string;
21
42
  /**
22
43
  * Get all unique anchors from items (preserving order)
23
- * @param {Array} items - Array of gutter items
24
- * @returns {Array} Array of unique anchor strings
44
+ * @param items - Array of gutter items
45
+ * @returns Array of unique anchor strings
25
46
  */
26
- export function getUniqueAnchors(items: any[]): any[];
47
+ export declare function getUniqueAnchors(items: GutterItem[] | undefined | null): string[];
27
48
  /**
28
49
  * Get display label for an anchor (used in overflow section)
29
- * @param {string} anchor - The anchor string
30
- * @returns {string} Human-readable label for the anchor
50
+ * @param anchor - The anchor string
51
+ * @returns Human-readable label for the anchor
31
52
  */
32
- export function getAnchorLabel(anchor: string): string;
53
+ export declare function getAnchorLabel(anchor: string): string;
33
54
  /**
34
55
  * Get items that match a specific anchor
35
- * @param {Array} items - Array of gutter items
36
- * @param {string} anchor - The anchor to match
37
- * @returns {Array} Items matching the anchor
56
+ * @param items - Array of gutter items
57
+ * @param anchor - The anchor to match
58
+ * @returns Items matching the anchor
38
59
  */
39
- export function getItemsForAnchor(items: any[], anchor: string): any[];
60
+ export declare function getItemsForAnchor(items: GutterItem[] | undefined | null, anchor: string): GutterItem[];
40
61
  /**
41
62
  * Get items that don't have a valid anchor (orphan items shown at top)
42
- * @param {Array} items - Array of gutter items
43
- * @param {Array} headers - Array of header objects
44
- * @returns {Array} Items without valid anchors
63
+ * @param items - Array of gutter items
64
+ * @param headers - Array of header objects
65
+ * @returns Items without valid anchors
45
66
  */
46
- export function getOrphanItems(items: any[], headers?: any[]): any[];
67
+ export declare function getOrphanItems(items: GutterItem[] | undefined | null, headers?: Header[]): GutterItem[];
47
68
  /**
48
69
  * Find the DOM element for an anchor within a content element
49
- * @param {string} anchor - The anchor string
50
- * @param {HTMLElement} contentEl - The content container element
51
- * @param {Array} headers - Array of header objects
52
- * @returns {HTMLElement|null} The DOM element or null if not found
70
+ * @param anchor - The anchor string
71
+ * @param contentEl - The content container element
72
+ * @param headers - Array of header objects
73
+ * @returns The DOM element or null if not found
53
74
  */
54
- export function findAnchorElement(anchor: string, contentEl: HTMLElement, headers?: any[]): HTMLElement | null;
75
+ export declare function findAnchorElement(anchor: string, contentEl: HTMLElement | null, headers?: Header[]): HTMLElement | null;