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/README.md +24 -10
- package/dist/cli/index.js +112 -26
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/app/export/exportPage.ts +9 -3
- package/src/app/export/standalone.ts +13 -3
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
|
-
|
|
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
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.
|
|
4
|
-
"description": "Let AI write the Markdown. Let seemore show it better
|
|
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.
|
|
62
|
-
"fumadocs-ui": "16.
|
|
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.
|
|
314
|
-
if (!button
|
|
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
|
|
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.
|
|
75
|
-
if (button ===
|
|
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
|
|
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;
|