@gitpagedocs/tools 0.0.12 → 0.0.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitpagedocs/tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared business-logic core for Git Page Docs (consumed by frontend, cli and mcp). Ships TypeScript source; consume via tsx or a TS-aware bundler.",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -38,19 +38,23 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
|
|
|
38
38
|
"",
|
|
39
39
|
"### User references",
|
|
40
40
|
"",
|
|
41
|
-
"The generated documentation includes
|
|
42
|
-
"The scaffold registers documentation versions 0.0.12, 0.0.11 and 0.0.
|
|
41
|
+
"The generated documentation includes 35 Markdown pages per language: focused references plus complete configuration recipes, migration/compatibility, troubleshooting, contributing/testing and HTML-container guides. All pages are available in English, Portuguese and Spanish; Markdown filenames stay in English while titles and content preserve UTF-8 accents and special characters.",
|
|
42
|
+
"The scaffold registers documentation versions 0.0.14, 0.0.13, 0.0.12, 0.0.11, 0.0.10 and 0.0.9 in descending order with the current examples; the npm package version is 0.0.14. Paths and version badges match each generated documentation version. Existing older version folders are preserved.",
|
|
43
43
|
"",
|
|
44
44
|
"The scaffold has real nested sections: Guides → Configure your site / Read and explore / Automate and integrate → documents, plus Operations and development and Git/GitHub groups. Getting Started and Project overview remain the first destinations. Every parent section has its own localized Markdown overview: click its title to read it, or use the separate arrow to expand children. Breadcrumb ancestors such as Guides → Configure your site remain navigable. Recursive `submenus` can extend the hierarchy without a fixed depth limit; `site.nestedMenusEnabled: false` keeps every destination in a flat presentation.",
|
|
45
45
|
"",
|
|
46
46
|
"Configure controls through `gitpagedocs/config.json` → `site.icons`. `LanguageSelector`, `ThemeSelector`, `VersionSelector`, `FocusMode`, `QuickNavigation`, `PdfDownload`, `PdfOpenInNewTab`, `DocumentPrevious` and `DocumentNext` use icons by default. Set `reactIcon: false` independently to display text; `true` displays the icon. Customize `tag`, `size`, `colorDark` and `colorLight` per entry. Compact configs inherit omitted values from `icons.defaults`, so an omitted per-control `reactIcon` does not mean text mode. The Ctrl+K shortcut and accessible control names remain available.",
|
|
47
47
|
"`VersionSelector` uses `LuGitBranch` by default; `reactIcon: false` displays the selected version as text. It appears only when more than one documentation version is available, retains the selector's localized accessible name and shows the selected version in its tooltip.",
|
|
48
48
|
"",
|
|
49
|
-
"`site.nestedMenusEnabled` selects recursive or flat navigation. Breadcrumbs use `RouteGuide` with route > version defaults > site precedence. `site.FocusMode` enables reading mode; `site.focusMode` controls copy, download, section navigation and document navigation independently.",
|
|
49
|
+
"`site.nestedMenusEnabled` selects recursive or flat navigation. Breadcrumbs use `RouteGuide` with route > version defaults > site precedence and have 12 px of spacing above and below. `site.FocusMode` enables reading mode; `site.focusMode` controls copy, download, section navigation and document navigation independently.",
|
|
50
50
|
"",
|
|
51
51
|
"Focus mode provides eight navigation buttons: first, previous, next and last document, plus first, previous, next and last section. Each navigation flag controls its group of four; document changes keep the reader open and restart at the first section.",
|
|
52
|
+
"Focus narration reads only the displayed section. Section/document changes and entering/leaving focus stop the previous speech; a new reading uses the visible content while retaining voice, speed and volume preferences. With `sectionNavigationEnabled: false`, the whole document is visible and narratable. Source copy/download still covers the complete document.",
|
|
53
|
+
"",
|
|
54
|
+
"Documentation pages and the introduction guide use `site.backToTop: { enabled: true, minPageHeightViewports: 3 }` for their back-to-top arrow. It is available only on a scrollable page at least three viewport heights tall. Set `enabled: false` to hide it; the threshold accepts a finite number greater than 1 and otherwise defaults to 3.",
|
|
52
55
|
"",
|
|
53
56
|
"Document-footer controls use `DocumentPrevious` (`LuChevronLeft`) and `DocumentNext` (`LuChevronRight`); either can use its translated text with `reactIcon: false`. The footer appears for multiple available menu destinations and disables unavailable directions. `site.ActiveNavigation` controls quick navigation and Ctrl+K separately.",
|
|
57
|
+
"`site.documentNavigation.position` in `gitpagedocs/config.json` accepts `left`, `center` or `right`; it defaults to `center` when omitted or invalid. Previous, Next and Back to top remain grouped in that order on desktop and mobile. The position setting does not change the arrow's `site.backToTop` visibility rules or the introduction-guide arrow.",
|
|
54
58
|
"",
|
|
55
59
|
"`site.accessibility.narration` configures native browser reading. Voices and offline availability depend on the browser and operating system. `site.mediaExclusivePlayback` coordinates narration, radio, audio and video so only one audible source plays by default.",
|
|
56
60
|
"",
|
|
@@ -72,14 +76,14 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
|
|
|
72
76
|
"Configure `site.pdf` with `enabled`, `previewEnabled`, `downloadEnabled` and `openInNewTabEnabled` (all default to `true`). The version config uses `routes-pdf`, `pdf.pathPdf` per language and `menus-header-pdf` with `page:23` for the bundled example. Route-level preview/download/new-tab options go inside `pdf`; `hierarchyPage.pdf` and `hierarchyMenu.pdf` order the content and menu sections.",
|
|
73
77
|
"",
|
|
74
78
|
"```json",
|
|
75
|
-
'{ "id": 23, "pdf": { "pathPdf": { "en": "gitpagedocs/docs/versions/0.0.
|
|
79
|
+
'{ "id": 23, "pdf": { "pathPdf": { "en": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf", "pt": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf", "es": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf" }, "previewEnabled": true, "downloadEnabled": true, "openInNewTabEnabled": true } }',
|
|
76
80
|
"```",
|
|
77
81
|
"",
|
|
78
82
|
"The native browser viewer handles PDF previews and new tabs through validated `application/pdf` Blob URLs. Preview, download and new-tab actions all require CORS permission for external files. Opening a new tab does not navigate to the raw repository URL, so that server's Content-Type/Content-Disposition does not force a download. Browser PDF support and user preferences still apply. With preview disabled, the first download or new-tab action loads the PDF; cached bytes are reused. File/network errors and blocked pop-ups are reported without silently falling back to the raw URL.",
|
|
79
83
|
"",
|
|
80
84
|
"PDF action icons are independent: `site.icons.PdfDownload` defaults to `LuDownload`, and `site.icons.PdfOpenInNewTab` defaults to `LuExternalLink`. For example, `\"PdfDownload\": { \"reactIcon\": false }` shows download text while the new-tab control remains an icon. The `site.pdf` and route `pdf` action flags control availability separately from appearance.",
|
|
81
85
|
"",
|
|
82
|
-
"Next.js dev/build stages repository PDFs from `gitpagedocs/` into public assets and respects the Pages subpath
|
|
86
|
+
"Next.js dev/build stages repository PDFs and supported native audio/video files from `gitpagedocs/` into public assets and respects the Pages subpath. Files outside that tree must already be in `frontend/public/` or available by HTTP(S). Remote repository routes resolve native media against the repository's raw-file URL. See the generated PDF documents and Paginated containers pages for complete examples.",
|
|
83
87
|
"",
|
|
84
88
|
"### Multiple ordered content blocks",
|
|
85
89
|
"",
|
|
@@ -89,6 +93,14 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
|
|
|
89
93
|
"",
|
|
90
94
|
"Routes independently position their configured title and description through `layout.title` and `layout.description`: each accepts `placement: 'inside' | 'outside'` and `position: 'before' | 'after'`. Markdown always keeps configured labels outside its document while honoring before/after. Omitted layout preserves existing presentation. Existing visibility, alignment and CSS settings remain applicable.",
|
|
91
95
|
"",
|
|
96
|
+
"### Paginated containers and Markdown markers",
|
|
97
|
+
"",
|
|
98
|
+
"A Markdown, HTML, video, audio or PDF route can define `pagination.items: [{ routeId: 51 }, { routeId: 1 }]`, referencing routes of the same type in display order. Each container keeps an independent selection; item title/description language maps override the referenced route's metadata. Existing routes and ordered content blocks remain compatible. The bundled `page:50` demonstrates three Markdown files, two HTML pages, MP4/WebM video, two local WAV files and two PDFs.",
|
|
99
|
+
"",
|
|
100
|
+
"`site.containerPagination` supplies shared defaults; route `pagination` overrides them. Defaults are enabled, bottom/right aligned, icon controls for first/previous/next/last, plus current/total count. Configure `alignment`, `placement`, `display`, `showCount`, individual `controls`, React Icons `icons`/`iconSize` and localized `labels`. Pagination also works in Markdown focus mode without closing it; Ctrl+K can open a container's available files. See `container-pagination.md` for complete options, access rules and examples.",
|
|
101
|
+
"",
|
|
102
|
+
"`routes-md[].markdownMarkers.items` marks arbitrary visible Markdown text or elements using exactly one of `text` or `selector`, with a unique `id`, optional one-based `occurrence`, localized `label` and theme colors. Every valid marker highlights its target and adds an index link that scrolls there. `site.markdownMarkers` supplies shared enablement/styles; route and item options refine them. This does not replace `RouteGuideSpeciFicbrand`: an empty heading filter still includes all headings. Targets remain unique across repeated Markdown blocks, and source copy/download stays unchanged. See `markdown-markers.md` for translated examples and validation behavior.",
|
|
103
|
+
"",
|
|
92
104
|
"### HTML containers and the DOOM example",
|
|
93
105
|
"",
|
|
94
106
|
"The scaffold includes a local HTML demonstration whose outer documentation container supplies its title and description. The HTML itself contains only the externally hosted DOOM player, without duplicated prose or a custom load button. Game assets are not bundled. The wrapper is generated as `docs/versions/<version>/{en,pt,es}/doom.html`; the HTML containers guide explains sizing, external URLs and browser restrictions.",
|
|
@@ -102,13 +114,13 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
|
|
|
102
114
|
' "title": { "en": "DOOM: HTML example", "pt": "DOOM: exemplo HTML", "es": "DOOM: ejemplo HTML" },',
|
|
103
115
|
' "description": { "en": "Load an interactive HTML demo", "pt": "Carregue uma demonstração HTML interativa", "es": "Carga una demostración HTML interactiva" },',
|
|
104
116
|
' "titleIsVisible": true, "descriptionIsVisible": true, "container": "full",',
|
|
105
|
-
' "path": { "en": "gitpagedocs/docs/versions/0.0.
|
|
117
|
+
' "path": { "en": "gitpagedocs/docs/versions/0.0.14/en/doom.html", "pt": "gitpagedocs/docs/versions/0.0.14/pt/doom.html", "es": "gitpagedocs/docs/versions/0.0.14/es/doom.html" }',
|
|
106
118
|
" }],",
|
|
107
119
|
' "menus-header-html": [{',
|
|
108
120
|
' "id": 29,',
|
|
109
|
-
' "en": { "title": "DOOM: HTML example", "path-click": "gitpagedocs/docs/versions/0.0.
|
|
110
|
-
' "pt": { "title": "DOOM: exemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.
|
|
111
|
-
' "es": { "title": "DOOM: ejemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.
|
|
121
|
+
' "en": { "title": "DOOM: HTML example", "path-click": "gitpagedocs/docs/versions/0.0.14/en/doom.html" },',
|
|
122
|
+
' "pt": { "title": "DOOM: exemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.14/pt/doom.html" },',
|
|
123
|
+
' "es": { "title": "DOOM: ejemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.14/es/doom.html" }',
|
|
112
124
|
" }]",
|
|
113
125
|
"}",
|
|
114
126
|
"```",
|