seemore 1.12.17 → 1.12.20

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/index.d.ts CHANGED
@@ -196,4 +196,12 @@ declare const frontmatterSchema: z.ZodObject<{
196
196
  }, z.core.$loose>;
197
197
  type FrontmatterData = z.output<typeof frontmatterSchema> & Record<string, unknown>;
198
198
 
199
- export type { Feature, FeatureFlag, FeatureMap, FrontmatterData, NavItem, ResolvedSeemoreConfig, SearchConfig, SeemoreConfig, Theme };
199
+ /**
200
+ * The file names seemore looks for as a site's config, in the order it tries them.
201
+ *
202
+ * Its own module, free of imports, so a host (the editor extension, the desktop app) can
203
+ * read the list from the package entry without pulling in the loader and its dependencies.
204
+ */
205
+ declare const CONFIG_NAMES: readonly string[];
206
+
207
+ export { CONFIG_NAMES, type Feature, type FeatureFlag, type FeatureMap, type FrontmatterData, type NavItem, type ResolvedSeemoreConfig, type SearchConfig, type SeemoreConfig, type Theme };
package/dist/index.js CHANGED
@@ -1 +1,11 @@
1
+ // src/node/config/names.ts
2
+ var CONFIG_NAMES = [
3
+ "seemore.config.ts",
4
+ "seemore.config.mts",
5
+ "seemore.config.js",
6
+ "seemore.config.mjs"
7
+ ];
8
+ export {
9
+ CONFIG_NAMES
10
+ };
1
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../src/node/config/names.ts"],"sourcesContent":["/**\n * The file names seemore looks for as a site's config, in the order it tries them.\n *\n * Its own module, free of imports, so a host (the editor extension, the desktop app) can\n * read the list from the package entry without pulling in the loader and its dependencies.\n */\nexport const CONFIG_NAMES: readonly string[] = [\n 'seemore.config.ts',\n 'seemore.config.mts',\n 'seemore.config.js',\n 'seemore.config.mjs',\n];\n"],"mappings":";AAMO,IAAM,eAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "seemore",
3
- "version": "1.12.17",
4
- "description": "Let AI write the Markdown. Let seemore show it better — zero config documentation framework.",
3
+ "version": "1.12.20",
4
+ "description": "Zero config documentation tool - Let AI write the Markdown. Let seemore show it better.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "repository": {
@@ -58,8 +58,8 @@
58
58
  "@types/mdast": "^4.0.4",
59
59
  "@vitejs/plugin-react": "^6.1.1",
60
60
  "chokidar": "5.0.0",
61
- "fumadocs-core": "16.15.4",
62
- "fumadocs-ui": "16.15.4",
61
+ "fumadocs-core": "16.16.2",
62
+ "fumadocs-ui": "16.16.2",
63
63
  "gemoji": "8.1.0",
64
64
  "github-slugger": "^2.0.0",
65
65
  "gray-matter": "4.0.3",
@@ -309,16 +309,22 @@ const RUNTIME = `(function () {
309
309
  if (window.__seemoreRememberTheme) window.__seemoreRememberTheme();
310
310
  });
311
311
 
312
+ // A button's accessible name: fumadocs-ui 16.15 set aria-label, 16.16 a visually hidden span.
313
+ function labelOf(button) {
314
+ return (button.getAttribute('aria-label') || button.textContent || '').trim();
315
+ }
316
+
312
317
  document.querySelectorAll('figure').forEach(function (figure) {
313
- var button = figure.querySelector('button[aria-label]');
314
- if (!button || !/copy/i.test(button.getAttribute('aria-label') || '')) return;
318
+ var button = Array.prototype.find.call(figure.querySelectorAll('button'), function (b) { return /copy/i.test(labelOf(b)); });
319
+ if (!button) return;
315
320
  button.addEventListener('click', function () {
316
321
  var code = figure.querySelector('pre, code');
317
322
  if (code && navigator.clipboard) navigator.clipboard.writeText(code.textContent || '');
318
323
  });
319
324
  });
320
325
 
321
- document.querySelectorAll('button[aria-label="Copy Anchor Link"]').forEach(function (button) {
326
+ document.querySelectorAll('h1 button, h2 button, h3 button, h4 button, h5 button, h6 button').forEach(function (button) {
327
+ if (labelOf(button) !== 'Copy Anchor Link') return;
322
328
  var heading = button.closest('h1, h2, h3, h4, h5, h6');
323
329
  var svg = button.querySelector('svg');
324
330
  if (!heading || !heading.id || !navigator.clipboard) return;
@@ -62,6 +62,14 @@ async function renderDiagrams(): Promise<void> {
62
62
  }
63
63
  }
64
64
 
65
+ /**
66
+ * A button's accessible name: fumadocs-ui 16.15 set `aria-label`, 16.16 puts the text in a
67
+ * visually hidden span instead.
68
+ */
69
+ function labelOf(button: Element): string {
70
+ return (button.getAttribute('aria-label') ?? button.textContent ?? '').trim();
71
+ }
72
+
65
73
  function bindBehaviors(): void {
66
74
  const root = document.documentElement;
67
75
  document.querySelector('.seemore-export-theme-toggle')?.addEventListener('click', () => {
@@ -71,15 +79,17 @@ function bindBehaviors(): void {
71
79
  });
72
80
 
73
81
  for (const figure of document.querySelectorAll('figure')) {
74
- const button = figure.querySelector('button[aria-label]');
75
- if (button === null || !/copy/i.test(button.getAttribute('aria-label') ?? '')) continue;
82
+ const button = [...figure.querySelectorAll('button')].find((b) => /copy/i.test(labelOf(b)));
83
+ if (button === undefined) continue;
76
84
  button.addEventListener('click', () => {
77
85
  const code = figure.querySelector('pre, code');
78
86
  if (code !== null) void navigator.clipboard?.writeText(code.textContent ?? '');
79
87
  });
80
88
  }
81
89
 
82
- for (const button of document.querySelectorAll('button[aria-label="Copy Anchor Link"]')) {
90
+ for (const button of [...document.querySelectorAll('h1 button, h2 button, h3 button, h4 button, h5 button, h6 button')].filter(
91
+ (b) => labelOf(b) === 'Copy Anchor Link',
92
+ )) {
83
93
  const heading = button.closest('h1, h2, h3, h4, h5, h6');
84
94
  const svg = button.querySelector('svg');
85
95
  if (heading === null || heading.id === '' || navigator.clipboard === undefined) continue;