@gitpagedocs/tools 0.0.20 → 0.0.21

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.20",
3
+ "version": "0.0.21",
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,11 +38,11 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
38
38
  "",
39
39
  "### User references",
40
40
  "",
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.20, 0.0.19, 0.0.18, 0.0.17, 0.0.16, 0.0.15, 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.20. Paths and version badges match each generated documentation version. Existing older version folders are preserved.",
41
+ "The generated documentation includes 37 Markdown pages per language: focused references plus complete configuration recipes, migration/compatibility, troubleshooting, contributing/testing, document-guide configuration, narrow/foldable layouts 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.21, 0.0.20, 0.0.19, 0.0.18, 0.0.17, 0.0.16, 0.0.15, 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.21. 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
- "With the navigation padlock unlocked, the desktop menu scrolls internally to reveal the current destination when moving forward or backward, opening the menu or unlocking it. A locked menu preserves its scroll position. Theme and language icon buttons fill mobile-menu rows with centered icons; desktop-header controls remain compact.",
45
+ "With the navigation padlock unlocked, Previous and Next center the current destination inside the desktop sidebar or mobile drawer, within its scroll range. Opening, unlocking or resizing the menu also centers it. Manual scrolling is preserved between page changes; a locked menu preserves its position. Theme and language icon buttons fill mobile-menu rows with centered icons; desktop-header controls remain compact. The responsive-layout reference covers widths of 280, 320, 344, 390 and 768 CSS pixels and folding/orientation checks.",
46
46
  "Repository search carries the selected theme and light/dark mode to the destination documentation when its catalog contains that theme. Otherwise the destination's configured default theme and mode apply.",
47
47
  "Markdown supports GitHub-flavored tables, task lists, strikethrough and autolinks. Rendered HTML is sanitized before display to remove scripts, unsafe link schemes and executable attributes. Tables and code blocks scroll inside narrow containers; text, links, borders and surfaces use the selected theme.",
48
48
  "Markdown uses a reading surface consistent with its surrounding card in documentation, focus mode, fullscreen and source-viewer previews. Text, links, muted text and inline code derive colors with at least 4.5:1 contrast across the 124 shipped themes.",
@@ -50,10 +50,11 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
50
50
  "Fenced code blocks with a supported language, such as JSON, use Shiki syntax highlighting. Token colors follow the active theme and remain readable against the code surface. Blocks without a language or with an unsupported language remain readable plain text; very large blocks may also remain plain text to keep the reader responsive. Copy and download keep the original Markdown.",
51
51
  "",
52
52
  "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.",
53
+ "Standalone pages apply official icon defaults from their first render while settings load or are unavailable. Loading documentation, opening a repository, search, the introduction guide, source viewer and not-found states keep accessible control names. Explicit text preferences remain effective after the configuration loads.",
53
54
  "`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.",
54
55
  "Each `VersionControl.versions` entry accepts `branch`, `release` and `commit` arrays of `{ name, url }`. Names support Unicode, preserve their configured order and remain unchanged when the interface language changes. Legacy URL strings use translated category labels; empty categories are hidden. HTTP(S) and safe relative URLs are supported, unsupported schemes and invalid entries are omitted, and exact duplicates within a category appear once. The responsive version-links dialog groups links by category, scrolls long lists internally, follows theme tokens and supports keyboard navigation and Escape. Native links open a new tab with `noopener noreferrer`; `site.icons.VersionLinks` configures the trigger appearance. See Configuration for the historical 0.0.16 example and complete behavior.",
55
56
  "",
56
- "`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.",
57
+ "`site.nestedMenusEnabled` selects recursive or flat navigation. Breadcrumbs use `RouteGuide` with route > version defaults > site precedence and have 1rem of spacing above and below (16 CSS pixels at the default root font size). `site.FocusMode` enables reading mode; `site.focusMode` controls copy, download, section navigation and document navigation independently.",
57
58
  "",
58
59
  "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.",
59
60
  "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.",
@@ -71,9 +72,10 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
71
72
  "",
72
73
  "### Animated themes",
73
74
  "",
74
- "The catalog contains 124 themes: 64 original themes, 20 standalone Motion backgrounds and 20 additional parallax families with dark and light variants (40 entries). All 84 earlier themes remain unchanged. Try `aurora-borealis-dark`/`aurora-borealis-light`, `firefly-grove-dark`/`firefly-grove-light`, or `ocean-depths-dark`/`ocean-depths-light`; the existing light/dark control switches within each pair. Each pair shares `supportsLightAndDarkModesReference` in the catalog. All themes are available through the official catalog and local `--layoutconfig` generation. See [the complete catalog](gitpagelayouts/README.md) and the generated Themes and layouts guide in English, Portuguese and Spanish.",
75
+ "The catalog contains 124 themes: 64 original themes, 20 standalone animated backgrounds and 20 additional parallax families with dark and light variants (40 entries). Earlier themes retain their palettes and components. Particles use the native Web Animations API and layers use Motion parallax. Try `aurora-borealis-dark`/`aurora-borealis-light`, `firefly-grove-dark`/`firefly-grove-light`, or `ocean-depths-dark`/`ocean-depths-light`; the existing light/dark control switches within each pair. Each pair shares `supportsLightAndDarkModesReference` in the catalog. All themes are available through the official catalog and local `--layoutconfig` generation. See [the complete catalog](gitpagelayouts/README.md) and the generated Themes and layouts guide in English, Portuguese and Spanish.",
75
76
  "",
76
77
  "Customize `site.backgroundEffects` in `gitpagedocs/config.json`: `enabled: false` disables every background; `overrides` applies common settings; `themes[themeId]` applies theme-specific settings. Templates provide optional top-level `backgroundEffects`. Precedence is template → global overrides → per-theme overrides, while `layers` replaces the complete array. Adjust layer counts/colors, animation speed and pointer/scroll parallax without editing JavaScript. Reduced-motion preferences and a visitor pause control are supported; every new preset retains both protections.",
78
+ "`backgroundEffects.performance.mode` accepts `auto` or `full` through the same override hierarchy. Presets use `auto`: three of every four particles per layer remain visible at widths of at least 768 CSS pixels, or one of every two below that width; the first is retained. `full` displays every configured particle. Explicit custom `layers` without a performance mode retain their counts with `full`; opt into `auto` to adapt them. Omitted particles stay mounted, hidden and paused for phase-preserving resizing. Colors, geometry, trajectories, blur/glow, speed and seed stay unchanged.",
77
79
  "Pause/resume sits beside the navigation lock in the documentation menu (expanded, collapsed and mobile), or in the search-page header. A manual pause survives menu and theme changes until Resume is selected. `site.backgroundEffects.overrides.accessibility.showPauseButton` defaults to `true`; `false` hides only the control. Configure `site.icons.BackgroundAnimationPause` (`FiPause`) and `BackgroundAnimationResume` (`FiPlay`) with `reactIcon`, `tag`, `size`, `colorDark` and `colorLight`. Defaults are icons, 22px and `currentColor`; `reactIcon: false` shows localized text. Use the background master switch to disable the effect itself.",
78
80
  "",
79
81
  "Preset sources live in `gitpagelayouts/v2/layouts/` as `overrides.backgroundEffects`. `pnpm run layouts:sync` expands templates and compiles the same presets into the CLI package; existing themes do not acquire an animation implicitly.",
@@ -85,7 +87,7 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
85
87
  "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.",
86
88
  "",
87
89
  "```json",
88
- '{ "id": 23, "pdf": { "pathPdf": { "en": "gitpagedocs/docs/versions/0.0.20/en/gitpagedocs-project-guide.pdf", "pt": "gitpagedocs/docs/versions/0.0.20/en/gitpagedocs-project-guide.pdf", "es": "gitpagedocs/docs/versions/0.0.20/en/gitpagedocs-project-guide.pdf" }, "previewEnabled": true, "downloadEnabled": true, "openInNewTabEnabled": true } }',
90
+ '{ "id": 23, "pdf": { "pathPdf": { "en": "gitpagedocs/docs/versions/0.0.21/en/gitpagedocs-project-guide.pdf", "pt": "gitpagedocs/docs/versions/0.0.21/en/gitpagedocs-project-guide.pdf", "es": "gitpagedocs/docs/versions/0.0.21/en/gitpagedocs-project-guide.pdf" }, "previewEnabled": true, "downloadEnabled": true, "openInNewTabEnabled": true } }',
89
91
  "```",
90
92
  "",
91
93
  "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.",
@@ -108,7 +110,8 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
108
110
  "",
109
111
  "`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.",
110
112
  "",
111
- "`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.",
113
+ "`routes-md[].RouteGuideTags` selects safe HTML element types for the automatic Markdown guide. Official routes explicitly select h1, h2 and h3; omitted lists preserve h1–h6 compatibility, and an empty list disables automatic entries. `RouteguideBrand` enables automatic indexing; `RouteGuideSpeciFicbrand` filters eligible element IDs. Labels use title, alt or visible text, limited to 96 characters plus an ellipsis. Unsupported tags are reported and skipped; selecting a tag never bypasses sanitization. See `route-guide.md` for configuration, examples, stable IDs and collapsed details.",
114
+ "`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. `site.markdownMarkers` supplies shared enablement/styles; route and item options refine them. Explicit markers remain available with `RouteGuideTags: []` or `RouteguideBrand: false` and keep their configured label when an automatic entry shares the target. Targets remain unique across repeated Markdown blocks, and source copy/download stays unchanged. See `markdown-markers.md` for translated examples and validation behavior.",
112
115
  "",
113
116
  "### HTML containers and the DOOM example",
114
117
  "",
@@ -123,13 +126,13 @@ export function cliCommandsSection(commands: readonly CommandDoc[]): string {
123
126
  ' "title": { "en": "DOOM: HTML example", "pt": "DOOM: exemplo HTML", "es": "DOOM: ejemplo HTML" },',
124
127
  ' "description": { "en": "Load an interactive HTML demo", "pt": "Carregue uma demonstração HTML interativa", "es": "Carga una demostración HTML interactiva" },',
125
128
  ' "titleIsVisible": true, "descriptionIsVisible": true, "container": "full",',
126
- ' "path": { "en": "gitpagedocs/docs/versions/0.0.20/en/doom.html", "pt": "gitpagedocs/docs/versions/0.0.20/pt/doom.html", "es": "gitpagedocs/docs/versions/0.0.20/es/doom.html" }',
129
+ ' "path": { "en": "gitpagedocs/docs/versions/0.0.21/en/doom.html", "pt": "gitpagedocs/docs/versions/0.0.21/pt/doom.html", "es": "gitpagedocs/docs/versions/0.0.21/es/doom.html" }',
127
130
  " }],",
128
131
  ' "menus-header-html": [{',
129
132
  ' "id": 29,',
130
- ' "en": { "title": "DOOM: HTML example", "path-click": "gitpagedocs/docs/versions/0.0.20/en/doom.html" },',
131
- ' "pt": { "title": "DOOM: exemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.20/pt/doom.html" },',
132
- ' "es": { "title": "DOOM: ejemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.20/es/doom.html" }',
133
+ ' "en": { "title": "DOOM: HTML example", "path-click": "gitpagedocs/docs/versions/0.0.21/en/doom.html" },',
134
+ ' "pt": { "title": "DOOM: exemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.21/pt/doom.html" },',
135
+ ' "es": { "title": "DOOM: ejemplo HTML", "path-click": "gitpagedocs/docs/versions/0.0.21/es/doom.html" }',
133
136
  " }]",
134
137
  "}",
135
138
  "```",