@docsector/docsector-reader 3.2.0 → 3.2.2

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 (137) hide show
  1. package/README.md +14 -2
  2. package/bin/docsector.js +1 -1
  3. package/jsconfig.json +1 -0
  4. package/package.json +8 -7
  5. package/src/components/DH2.vue +1 -1
  6. package/src/components/DH3.vue +1 -1
  7. package/src/components/DH4.vue +1 -1
  8. package/src/components/DH5.vue +1 -1
  9. package/src/components/DH6.vue +1 -1
  10. package/src/components/DMenu.vue +1 -1
  11. package/src/components/DPage.vue +26 -6
  12. package/src/components/DPageAnchor.vue +3 -9
  13. package/src/components/DPageImage.vue +80 -0
  14. package/src/components/DPageMeta.vue +1 -0
  15. package/src/components/DPageTokens.vue +12 -5
  16. package/src/components/QZoom.js +68 -14
  17. package/src/components/QZoom.sass +38 -3
  18. package/src/components/page-section-tokens.js +179 -16
  19. package/src/composables/useNavigator.js +45 -15
  20. package/src/pages/404Page.vue +2 -2
  21. package/src/pages/Homepage.en-US.md +3 -3
  22. package/src/pages/Homepage.pt-BR.md +3 -3
  23. package/src/pages/guide/i18n-and-markdown.overview.en-US.md +7 -1
  24. package/src/pages/guide/i18n-and-markdown.overview.pt-BR.md +7 -1
  25. package/src/pages/guide/pages-and-routing.overview.en-US.md +11 -9
  26. package/src/pages/guide/pages-and-routing.overview.pt-BR.md +11 -9
  27. package/src/pages/guide.index.js +0 -28
  28. package/src/pages/manual/basic/branding.overview.en-US.md +27 -0
  29. package/src/pages/manual/basic/branding.overview.pt-BR.md +27 -0
  30. package/src/pages/manual/{components → basic}/d-menu.overview.en-US.md +11 -3
  31. package/src/pages/manual/{components → basic}/d-menu.overview.pt-BR.md +11 -3
  32. package/src/pages/manual/{components → basic}/d-page-anchor.overview.en-US.md +5 -3
  33. package/src/pages/manual/{components → basic}/d-page-anchor.overview.pt-BR.md +5 -3
  34. package/src/pages/manual/{components → basic}/d-page-meta.overview.en-US.md +10 -2
  35. package/src/pages/manual/{components → basic}/d-page-meta.overview.pt-BR.md +10 -2
  36. package/src/pages/manual/basic/edit-on-github.overview.en-US.md +26 -0
  37. package/src/pages/manual/basic/edit-on-github.overview.pt-BR.md +26 -0
  38. package/src/pages/manual/basic/previous-and-next.overview.en-US.md +17 -0
  39. package/src/pages/manual/basic/previous-and-next.overview.pt-BR.md +17 -0
  40. package/src/pages/manual/basic/search.overview.en-US.md +24 -0
  41. package/src/pages/manual/basic/search.overview.pt-BR.md +24 -0
  42. package/src/pages/manual/basic/translation-progress.overview.en-US.md +19 -0
  43. package/src/pages/manual/basic/translation-progress.overview.pt-BR.md +19 -0
  44. package/src/pages/manual/basic/version-switcher.overview.en-US.md +28 -0
  45. package/src/pages/manual/basic/version-switcher.overview.pt-BR.md +28 -0
  46. package/src/pages/manual/components/d-subpage.overview.en-US.md +2 -2
  47. package/src/pages/manual/components/d-subpage.overview.pt-BR.md +2 -2
  48. package/src/pages/manual/content/blocks/code-blocks.overview.en-US.md +55 -0
  49. package/src/pages/manual/content/blocks/code-blocks.overview.pt-BR.md +55 -0
  50. package/src/pages/manual/{components/d-page-source-code.showcase.en-US.md → content/blocks/code-blocks.showcase.en-US.md} +14 -12
  51. package/src/pages/manual/{components/d-page-source-code.showcase.pt-BR.md → content/blocks/code-blocks.showcase.pt-BR.md} +28 -26
  52. package/src/pages/manual/{components/d-page-expandable.overview.en-US.md → content/blocks/expandable.overview.en-US.md} +3 -12
  53. package/src/pages/manual/{components/d-page-expandable.overview.pt-BR.md → content/blocks/expandable.overview.pt-BR.md} +3 -12
  54. package/src/pages/manual/content/blocks/headings.overview.en-US.md +45 -0
  55. package/src/pages/manual/content/blocks/headings.overview.pt-BR.md +45 -0
  56. package/src/pages/manual/{components/d-headings.showcase.en-US.md → content/blocks/headings.showcase.en-US.md} +1 -1
  57. package/src/pages/manual/{components/d-headings.showcase.pt-BR.md → content/blocks/headings.showcase.pt-BR.md} +1 -1
  58. package/src/pages/manual/content/blocks/hints.overview.en-US.md +30 -0
  59. package/src/pages/manual/content/blocks/hints.overview.pt-BR.md +30 -0
  60. package/src/pages/manual/content/blocks/hints.showcase.en-US.md +30 -0
  61. package/src/pages/manual/content/blocks/hints.showcase.pt-BR.md +30 -0
  62. package/src/pages/manual/content/blocks/images.overview.en-US.md +34 -0
  63. package/src/pages/manual/content/blocks/images.overview.pt-BR.md +16 -0
  64. package/src/pages/manual/content/blocks/images.showcase.en-US.md +19 -0
  65. package/src/pages/manual/content/blocks/images.showcase.pt-BR.md +11 -0
  66. package/src/pages/manual/content/blocks/math-and-tex.overview.en-US.md +27 -0
  67. package/src/pages/manual/content/blocks/math-and-tex.overview.pt-BR.md +27 -0
  68. package/src/pages/manual/content/blocks/math-and-tex.showcase.en-US.md +14 -0
  69. package/src/pages/manual/content/blocks/math-and-tex.showcase.pt-BR.md +14 -0
  70. package/src/pages/manual/content/blocks/mermaid-diagrams.overview.en-US.md +22 -0
  71. package/src/pages/manual/content/blocks/mermaid-diagrams.overview.pt-BR.md +22 -0
  72. package/src/pages/manual/content/blocks/ordered-lists.overview.en-US.md +19 -0
  73. package/src/pages/manual/content/blocks/ordered-lists.overview.pt-BR.md +19 -0
  74. package/src/pages/manual/content/blocks/ordered-lists.showcase.en-US.md +21 -0
  75. package/src/pages/manual/content/blocks/ordered-lists.showcase.pt-BR.md +21 -0
  76. package/src/pages/manual/content/blocks/paragraphs.overview.en-US.md +19 -0
  77. package/src/pages/manual/content/blocks/paragraphs.overview.pt-BR.md +19 -0
  78. package/src/pages/manual/content/blocks/paragraphs.showcase.en-US.md +9 -0
  79. package/src/pages/manual/content/blocks/paragraphs.showcase.pt-BR.md +9 -0
  80. package/src/pages/manual/content/blocks/quick-links.overview.en-US.md +28 -0
  81. package/src/pages/manual/content/blocks/quick-links.overview.pt-BR.md +28 -0
  82. package/src/pages/manual/content/blocks/quick-links.showcase.en-US.md +34 -0
  83. package/src/pages/manual/content/blocks/quick-links.showcase.pt-BR.md +34 -0
  84. package/src/pages/manual/content/blocks/quotes.overview.en-US.md +24 -0
  85. package/src/pages/manual/content/blocks/quotes.overview.pt-BR.md +24 -0
  86. package/src/pages/manual/content/blocks/quotes.showcase.en-US.md +17 -0
  87. package/src/pages/manual/content/blocks/quotes.showcase.pt-BR.md +17 -0
  88. package/src/pages/manual/content/blocks/raw-html.overview.en-US.md +19 -0
  89. package/src/pages/manual/content/blocks/raw-html.overview.pt-BR.md +19 -0
  90. package/src/pages/manual/content/blocks/raw-html.showcase.en-US.md +12 -0
  91. package/src/pages/manual/content/blocks/raw-html.showcase.pt-BR.md +12 -0
  92. package/src/pages/manual/content/blocks/tables.overview.en-US.md +19 -0
  93. package/src/pages/manual/content/blocks/tables.overview.pt-BR.md +19 -0
  94. package/src/pages/manual/content/blocks/tables.showcase.en-US.md +17 -0
  95. package/src/pages/manual/content/blocks/tables.showcase.pt-BR.md +17 -0
  96. package/src/pages/manual/content/blocks/unordered-lists.overview.en-US.md +21 -0
  97. package/src/pages/manual/content/blocks/unordered-lists.overview.pt-BR.md +21 -0
  98. package/src/pages/manual/content/blocks/unordered-lists.showcase.en-US.md +24 -0
  99. package/src/pages/manual/content/blocks/unordered-lists.showcase.pt-BR.md +24 -0
  100. package/src/pages/manual/content/structures/books.overview.en-US.md +36 -0
  101. package/src/pages/manual/content/structures/books.overview.pt-BR.md +36 -0
  102. package/src/pages/manual/content/structures/page.overview.en-US.md +61 -0
  103. package/src/pages/manual/content/structures/page.overview.pt-BR.md +61 -0
  104. package/src/pages/manual/content/structures/subpage.overview.en-US.md +62 -0
  105. package/src/pages/manual/content/structures/subpage.overview.pt-BR.md +62 -0
  106. package/src/pages/manual.index.js +487 -153
  107. package/src/router/routes.js +1 -1
  108. package/src/pages/guide/alerts-and-blockquotes.overview.en-US.md +0 -65
  109. package/src/pages/guide/alerts-and-blockquotes.overview.pt-BR.md +0 -65
  110. package/src/pages/manual/components/d-headings.overview.en-US.md +0 -54
  111. package/src/pages/manual/components/d-headings.overview.pt-BR.md +0 -54
  112. package/src/pages/manual/components/d-mermaid-diagram.overview.en-US.md +0 -31
  113. package/src/pages/manual/components/d-mermaid-diagram.overview.pt-BR.md +0 -29
  114. package/src/pages/manual/components/d-page-blockquote.overview.en-US.md +0 -66
  115. package/src/pages/manual/components/d-page-blockquote.overview.pt-BR.md +0 -66
  116. package/src/pages/manual/components/d-page-blockquote.showcase.en-US.md +0 -34
  117. package/src/pages/manual/components/d-page-blockquote.showcase.pt-BR.md +0 -34
  118. package/src/pages/manual/components/d-page-section.overview.en-US.md +0 -57
  119. package/src/pages/manual/components/d-page-section.overview.pt-BR.md +0 -57
  120. package/src/pages/manual/components/d-page-section.showcase.en-US.md +0 -43
  121. package/src/pages/manual/components/d-page-section.showcase.pt-BR.md +0 -43
  122. package/src/pages/manual/components/d-page-source-code.overview.en-US.md +0 -68
  123. package/src/pages/manual/components/d-page-source-code.overview.pt-BR.md +0 -68
  124. package/src/pages/manual/components/d-page.overview.en-US.md +0 -59
  125. package/src/pages/manual/components/d-page.overview.pt-BR.md +0 -59
  126. package/src/pages/manual/components/d-page.showcase.en-US.md +0 -35
  127. package/src/pages/manual/components/d-page.showcase.pt-BR.md +0 -35
  128. package/src/pages/manual/components/q-zoom.overview.en-US.md +0 -71
  129. package/src/pages/manual/components/q-zoom.overview.pt-BR.md +0 -71
  130. package/src/pages/manual/composables/use-navigator.overview.en-US.md +0 -89
  131. package/src/pages/manual/composables/use-navigator.overview.pt-BR.md +0 -89
  132. package/src/pages/manual/store/modules.overview.en-US.md +0 -96
  133. package/src/pages/manual/store/modules.overview.pt-BR.md +0 -96
  134. /package/src/pages/manual/{components/d-page-expandable.showcase.en-US.md → content/blocks/expandable.showcase.en-US.md} +0 -0
  135. /package/src/pages/manual/{components/d-page-expandable.showcase.pt-BR.md → content/blocks/expandable.showcase.pt-BR.md} +0 -0
  136. /package/src/pages/manual/{components/d-mermaid-diagram.showcase.en-US.md → content/blocks/mermaid-diagrams.showcase.en-US.md} +0 -0
  137. /package/src/pages/manual/{components/d-mermaid-diagram.showcase.pt-BR.md → content/blocks/mermaid-diagrams.showcase.pt-BR.md} +0 -0
@@ -1,43 +0,0 @@
1
- ## Demonstração
2
-
3
- Aqui está o source Markdown que renderiza o conteúdo que você vê na aba Overview:
4
-
5
- ```
6
- ## Título da Seção
7
-
8
- Texto de parágrafo com **negrito** e *itálico*.
9
-
10
- - Item um
11
- - Item dois
12
- - Item três
13
-
14
- | Coluna A | Coluna B |
15
- |----------|----------|
16
- | Célula 1 | Célula 2 |
17
-
18
- ### Sub-Seção
19
-
20
- Mais conteúdo aqui.
21
- ```
22
-
23
- Cada elemento se torna um token no tokenizador do DPageSection. Títulos criam âncoras na árvore de ToC à direita.
24
-
25
- ## Elementos Markdown Suportados
26
-
27
- DPageSection renderiza os seguintes elementos Markdown:
28
-
29
- - Títulos (H2 até H6)
30
- - Parágrafos com formatação inline (negrito, itálico, links, código)
31
- - Listas ordenadas e não ordenadas
32
- - Tabelas com cabeçalhos
33
- - Blocos de código cercados com syntax highlighting
34
-
35
- ## Bloco de Código com Nome de Arquivo
36
-
37
- Use o atributo `:filename;` para exibir um cabeçalho com nome de arquivo:
38
-
39
- ```php
40
- echo "Olá, Docsector!";
41
- ```
42
-
43
- O nome do arquivo aparece na barra de info acima do bloco de código junto com o identificador de linguagem.
@@ -1,68 +0,0 @@
1
- ## Overview
2
-
3
- `DPageSourceCode` renders **fenced code blocks** with syntax highlighting, line numbers, copy-to-clipboard functionality, optional filename display, tabs, and breadcrumbs. It uses **Prism.js** for highlighting.
4
-
5
- ## Props
6
-
7
- | Prop | Type | Required | Default | Description |
8
- |------|------|----------|---------|-------------|
9
- | `index` | `Number` | Yes | — | Unique index for anchor generation |
10
- | `language` | `String` | No | `'html'` | Programming language for highlighting |
11
- | `text` | `String` | No | `''` | Raw code text to display in simple mode |
12
- | `filename` | `String` | No | `''` | Optional filename shown in the info bar |
13
- | `breadcrumbs` | `Array` | No | `[]` | Breadcrumb segments shown above the code block |
14
- | `tabs` | `Array` | No | `[]` | Tab items with label, language, text, and breadcrumbs |
15
-
16
- ## Supported Languages
17
-
18
- Out of the box, DPageSourceCode supports:
19
-
20
- - **PHP** — via `prismjs/components/prism-php`
21
- - **Bash** — via `prismjs/components/prism-bash`
22
- - **HTML** — built-in Prism support
23
- - **JavaScript** — built-in Prism support
24
-
25
- To add more languages, import additional Prism components in `DPageSourceCode.vue`.
26
-
27
- ## Features
28
-
29
- ### Syntax Highlighting
30
-
31
- Code is highlighted at render time using `Prism.highlight()`. The highlighted HTML is injected via `v-html` into a `<code>` element.
32
-
33
- ### Line Numbers
34
-
35
- When the code block has more than 1 line, line numbers are displayed on the left side. Each line number is a clickable anchor link.
36
-
37
- ### Copy to Clipboard
38
-
39
- A copy button appears in the info bar. When clicked, it selects the current code content and copies it to the clipboard using `document.execCommand('copy')`.
40
-
41
- ### Tabs
42
-
43
- Consecutive fenced code blocks with the same `group` attribute are rendered as tabs. Each block can define its visible tab label with `tab`; use that label as the filename when the group should look like editor tabs.
44
-
45
- ### Breadcrumbs
46
-
47
- When a `breadcrumb` attribute is provided, it is rendered above the code block. Use `>` between segments, such as `src > components > DPageSourceCode.vue`.
48
-
49
- ### File Icons
50
-
51
- Tab labels that look like filenames, such as `App.vue`, receive a Material Icon Theme file icon inline before the text. Breadcrumbs add the same file icon only to the final segment when that segment looks like a filename.
52
-
53
- ### Filename Display
54
-
55
- When a `filename` prop is provided (extracted from the `:filename;` Markdown attribute), it appears in the info bar alongside the language identifier.
56
-
57
- ## Dark/Light Theme
58
-
59
- DPageSourceCode has completely separate color schemes for:
60
-
61
- - **Light mode** (`.white` class) — Traditional light syntax colors
62
- - **Dark mode** (`.dark` class) — Dark background with vibrant token colors
63
-
64
- The color scheme is automatically selected based on `$q.dark.isActive`.
65
-
66
- ## Anchor System
67
-
68
- Each code block gets a letter-based anchor (A, B, C, ..., Z, AA, AB, ...) generated from its index. Line numbers within the code block are appended to this anchor (e.g., `#A1`, `#A2`).
@@ -1,68 +0,0 @@
1
- ## Visão Geral
2
-
3
- `DPageSourceCode` renderiza **blocos de código cercados** com syntax highlighting, números de linha, funcionalidade de copiar para clipboard, exibição opcional de nome de arquivo, abas e breadcrumbs. Usa **Prism.js** para highlighting.
4
-
5
- ## Props
6
-
7
- | Prop | Tipo | Obrigatório | Padrão | Descrição |
8
- |------|------|-------------|--------|-----------|
9
- | `index` | `Number` | Sim | — | Índice único para geração de âncora |
10
- | `language` | `String` | Não | `'html'` | Linguagem de programação para highlighting |
11
- | `text` | `String` | Não | `''` | Texto de código bruto para exibir no modo simples |
12
- | `filename` | `String` | Não | `''` | Nome de arquivo opcional exibido na barra de info |
13
- | `breadcrumbs` | `Array` | Não | `[]` | Segmentos de breadcrumb exibidos acima do bloco de código |
14
- | `tabs` | `Array` | Não | `[]` | Itens de aba com label, linguagem, texto e breadcrumbs |
15
-
16
- ## Linguagens Suportadas
17
-
18
- Por padrão, DPageSourceCode suporta:
19
-
20
- - **PHP** — via `prismjs/components/prism-php`
21
- - **Bash** — via `prismjs/components/prism-bash`
22
- - **HTML** — suporte embutido do Prism
23
- - **JavaScript** — suporte embutido do Prism
24
-
25
- Para adicionar mais linguagens, importe componentes adicionais do Prism em `DPageSourceCode.vue`.
26
-
27
- ## Funcionalidades
28
-
29
- ### Syntax Highlighting
30
-
31
- O código é destacado em tempo de renderização usando `Prism.highlight()`. O HTML destacado é injetado via `v-html` em um elemento `<code>`.
32
-
33
- ### Números de Linha
34
-
35
- Quando o bloco de código tem mais de 1 linha, números de linha são exibidos no lado esquerdo. Cada número de linha é um link de âncora clicável.
36
-
37
- ### Copiar para Clipboard
38
-
39
- Um botão de cópia aparece na barra de info. Quando clicado, seleciona o conteúdo de código atual e copia para o clipboard usando `document.execCommand('copy')`.
40
-
41
- ### Abas
42
-
43
- Blocos de código cercados consecutivos com o mesmo atributo `group` são renderizados como abas. Cada bloco pode definir seu rótulo visível com `tab`; use esse rótulo como nome do arquivo quando o grupo deve parecer abas de editor.
44
-
45
- ### Breadcrumbs
46
-
47
- Quando um atributo `breadcrumb` é fornecido, ele é renderizado acima do bloco de código. Use `>` entre segmentos, como `src > components > DPageSourceCode.vue`.
48
-
49
- ### Ícones de Arquivo
50
-
51
- Labels de abas que parecem nomes de arquivo, como `App.vue`, recebem um ícone do Material Icon Theme inline antes do texto. Breadcrumbs adicionam o mesmo ícone apenas ao segmento final quando esse segmento parece um nome de arquivo.
52
-
53
- ### Exibição de Nome de Arquivo
54
-
55
- Quando a prop `filename` é fornecida (extraída do atributo Markdown `:filename;`), ela aparece na barra de info junto com o identificador de linguagem.
56
-
57
- ## Tema Escuro/Claro
58
-
59
- DPageSourceCode tem esquemas de cores completamente separados para:
60
-
61
- - **Modo claro** (classe `.white`) — Cores de sintaxe tradicionais claras
62
- - **Modo escuro** (classe `.dark`) — Fundo escuro com cores vibrantes de token
63
-
64
- O esquema de cores é selecionado automaticamente baseado em `$q.dark.isActive`.
65
-
66
- ## Sistema de Âncoras
67
-
68
- Cada bloco de código recebe uma âncora baseada em letras (A, B, C, ..., Z, AA, AB, ...) gerada a partir do seu índice. Números de linha dentro do bloco são adicionados a esta âncora (ex: `#A1`, `#A2`).
@@ -1,59 +0,0 @@
1
- ## Overview
2
-
3
- `DPage` is the **main page container** component. It provides the scroll area, submenu toolbar (Overview/Showcase/Vs tabs), the right-side anchor drawer, and the `DPageMeta` footer.
4
-
5
- Every documentation page is rendered inside a `DPage` instance.
6
-
7
- ## Props
8
-
9
- | Prop | Type | Default | Description |
10
- |------|------|---------|-------------|
11
- | `disableNav` | `Boolean` | `false` | Hides the DPageMeta navigation footer |
12
- | `showBackToTopControl` | `Boolean` | `false` | Enables the floating back-to-top control with circular reading progress |
13
-
14
- ## Template Structure
15
-
16
- DPage renders the following layout:
17
-
18
- - **QPageContainer** — Quasar page container
19
- - **QToolbar** (submenu) — Tab navigation: Overview, Showcase, Vs
20
- - **QPage** with **QScrollArea** — Scrollable content area with slot
21
- - **QDrawer** (right) — Anchor/ToC navigation tree
22
-
23
- ## Slot
24
-
25
- The default slot receives the page content. Typically, `DSubpage` places `DH1` and `DPageSection` inside this slot:
26
-
27
- ```html
28
- <d-page>
29
- <header>
30
- <d-h1 :id="0" />
31
- </header>
32
- <main>
33
- <d-page-section :id="sectionId" />
34
- </main>
35
- </d-page>
36
- ```
37
-
38
- ## Subpage Tabs
39
-
40
- DPage reads the route's `meta.subpages` configuration to determine which tabs to display:
41
-
42
- - **Overview** — Always shown when other tabs exist
43
- - **Showcase** — Shown when `subpages.showcase: true`
44
- - **Vs** — Shown when `subpages.vs: true`
45
-
46
- ## Scroll Behavior
47
-
48
- DPage resets the scroll position on route changes via `router.beforeEach`. The scroll observer monitors vertical scroll position and updates the anchor selection via the `useNavigator` composable.
49
-
50
- When `showBackToTopControl` is enabled, DPage also derives reading progress from the same scroll container. The floating control stays hidden at the top, appears after a small amount of scroll, shows circular progress, and returns to anchor `0` when clicked.
51
-
52
- ## Store Integration
53
-
54
- DPage reads from and writes to several Vuex store modules:
55
-
56
- - `layout/meta` — Controls the right-side anchor drawer visibility
57
- - `page/base` — Current page base path
58
- - `page/relative` — Current subpage path (`/overview`, `/showcase`, `/vs`)
59
- - `page/anchor` — Resets anchors on navigation
@@ -1,59 +0,0 @@
1
- ## Visão Geral
2
-
3
- `DPage` é o componente **container principal de página**. Ele fornece a área de scroll, a barra de submenu (abas Overview/Showcase/Vs), o drawer lateral de âncoras e o rodapé `DPageMeta`.
4
-
5
- Toda página de documentação é renderizada dentro de uma instância de `DPage`.
6
-
7
- ## Props
8
-
9
- | Prop | Tipo | Padrão | Descrição |
10
- |------|------|--------|-----------|
11
- | `disableNav` | `Boolean` | `false` | Oculta o rodapé de navegação DPageMeta |
12
- | `showBackToTopControl` | `Boolean` | `false` | Habilita o controle flutuante de voltar ao topo com progresso circular de leitura |
13
-
14
- ## Estrutura do Template
15
-
16
- DPage renderiza o seguinte layout:
17
-
18
- - **QPageContainer** — Container de página Quasar
19
- - **QToolbar** (submenu) — Navegação por abas: Overview, Showcase, Vs
20
- - **QPage** com **QScrollArea** — Área de conteúdo com scroll e slot
21
- - **QDrawer** (direita) — Árvore de navegação por âncoras/ToC
22
-
23
- ## Slot
24
-
25
- O slot padrão recebe o conteúdo da página. Normalmente, `DSubpage` coloca `DH1` e `DPageSection` dentro deste slot:
26
-
27
- ```html
28
- <d-page>
29
- <header>
30
- <d-h1 :id="0" />
31
- </header>
32
- <main>
33
- <d-page-section :id="sectionId" />
34
- </main>
35
- </d-page>
36
- ```
37
-
38
- ## Abas de Sub-página
39
-
40
- DPage lê a configuração `meta.subpages` da rota para determinar quais abas exibir:
41
-
42
- - **Overview** — Sempre exibida quando outras abas existem
43
- - **Showcase** — Exibida quando `subpages.showcase: true`
44
- - **Vs** — Exibida quando `subpages.vs: true`
45
-
46
- ## Comportamento de Scroll
47
-
48
- DPage reseta a posição de scroll nas mudanças de rota via `router.beforeEach`. O observador de scroll monitora a posição vertical e atualiza a seleção de âncora via composable `useNavigator`.
49
-
50
- Quando `showBackToTopControl` está habilitada, DPage também deriva o progresso de leitura a partir da mesma área de scroll. O controle flutuante fica oculto no topo, aparece após uma pequena rolagem, exibe progresso circular e retorna para a âncora `0` ao ser clicado.
51
-
52
- ## Integração com Store
53
-
54
- DPage lê e escreve em vários módulos da Vuex store:
55
-
56
- - `layout/meta` — Controla a visibilidade do drawer de âncoras
57
- - `page/base` — Caminho base da página atual
58
- - `page/relative` — Caminho da sub-página (`/overview`, `/showcase`, `/vs`)
59
- - `page/anchor` — Reseta âncoras na navegação
@@ -1,35 +0,0 @@
1
- ## Showcase
2
-
3
- Here is an example of how DPage is used inside DSubpage:
4
-
5
- ```html
6
- <template>
7
- <d-page>
8
- <header>
9
- <d-h1 :id="0" />
10
- </header>
11
- <main>
12
- <d-page-section :id="id" />
13
- </main>
14
- </d-page>
15
- </template>
16
- ```
17
-
18
- The submenu toolbar automatically adapts to the page configuration. If only Overview is configured, the toolbar shows a single tab. When Showcase or Vs tabs are enabled, the toolbar expands with labeled buttons.
19
-
20
- ## Mobile Behavior
21
-
22
- On mobile devices (`$q.screen.lt.md`), the submenu button labels are hidden, showing only icons. The right-side anchor drawer becomes an overlay that can be toggled with the tree icon button.
23
-
24
- ## Custom Content Example
25
-
26
- You can also use DPage with `disableNav` to create standalone pages without the bottom navigation:
27
-
28
- ```html
29
- <d-page :disable-nav="true">
30
- <div class="text-center q-pa-lg">
31
- <h2>Custom Page Content</h2>
32
- <p>No bottom nav, no prev/next links.</p>
33
- </div>
34
- </d-page>
35
- ```
@@ -1,35 +0,0 @@
1
- ## Demonstração
2
-
3
- Veja como DPage é usado dentro do DSubpage:
4
-
5
- ```html
6
- <template>
7
- <d-page>
8
- <header>
9
- <d-h1 :id="0" />
10
- </header>
11
- <main>
12
- <d-page-section :id="id" />
13
- </main>
14
- </d-page>
15
- </template>
16
- ```
17
-
18
- A barra de submenu se adapta automaticamente à configuração da página. Se apenas Overview estiver configurado, a barra mostra uma única aba. Quando as abas Showcase ou Vs estão habilitadas, a barra expande com botões rotulados.
19
-
20
- ## Comportamento Mobile
21
-
22
- Em dispositivos móveis (`$q.screen.lt.md`), os labels dos botões do submenu ficam ocultos, mostrando apenas ícones. O drawer de âncoras à direita se torna um overlay que pode ser alternado com o botão de ícone de árvore.
23
-
24
- ## Exemplo de Conteúdo Customizado
25
-
26
- Você também pode usar DPage com `disableNav` para criar páginas standalone sem navegação inferior:
27
-
28
- ```html
29
- <d-page :disable-nav="true">
30
- <div class="text-center q-pa-lg">
31
- <h2>Conteúdo Customizado</h2>
32
- <p>Sem nav inferior, sem links prev/next.</p>
33
- </div>
34
- </d-page>
35
- ```
@@ -1,71 +0,0 @@
1
- ## Overview
2
-
3
- `QZoom` is a **zoom overlay** component forked from `quasarframework/app-extension-qzoom` and ported from Vue 2 to Vue 3. It enables any content to be zoomed into a fullscreen overlay with optional scaling.
4
-
5
- ## Props
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | `backgroundColor` | `String` | `'white'` | Background color of the overlay |
10
- | `restoreOnScroll` | `Boolean` | `false` | Close zoom when user scrolls |
11
- | `manual` | `Boolean` | `false` | Disable automatic click-to-zoom |
12
- | `scale` | `Boolean` | `false` | Enable mouse wheel scaling |
13
- | `initialScale` | `Number` | `1.0` | Initial scale (0.05–10) |
14
- | `scaleText` | `Boolean` | `false` | Enable font-size scaling instead of transform |
15
- | `initialScaleText` | `Number` | `100` | Initial font-size percentage (50–500) |
16
- | `noCenter` | `Boolean` | `false` | Don't center content in overlay |
17
- | `noWheelScale` | `Boolean` | `false` | Disable mouse wheel scaling |
18
- | `noEscClose` | `Boolean` | `false` | Disable Escape key to close |
19
-
20
- ## Events
21
-
22
- | Event | Payload | Description |
23
- |-------|---------|-------------|
24
- | `before-zoom` | — | Emitted before zoom animation starts |
25
- | `zoomed` | — | Emitted after zoom animation completes |
26
- | `before-restore` | — | Emitted before restore animation starts |
27
- | `restored` | — | Emitted after restore animation completes |
28
- | `scale` | `Number` | Emitted when scale value changes |
29
- | `scale-text` | `Number` | Emitted when text scale value changes |
30
-
31
- ## Slot
32
-
33
- The default slot receives a `zoomed` Boolean indicating the current zoom state:
34
-
35
- ```html
36
- <q-zoom>
37
- <template v-slot:default="&#123; zoomed &#125;">
38
- <img src="diagram.png" :class="zoomed ? 'zoomed' : ''" />
39
- </template>
40
- </q-zoom>
41
- ```
42
-
43
- ## How It Works
44
-
45
- 1. By default, clicking toggles between normal and fullscreen
46
- 2. An overlay is created with a smooth transition (500ms zoom in, 400ms restore)
47
- 3. During zoom, body scroll is disabled (unless `restoreOnScroll` is true)
48
- 4. Press **Escape** to close (unless `noEscClose` is true)
49
-
50
- ## Scaling Modes
51
-
52
- Two mutually exclusive scaling modes:
53
-
54
- - **Transform scale** (`scale` prop) — Scales the entire content using CSS `transform: scale()`
55
- - **Font-size scale** (`scaleText` prop) — Adjusts the content's `font-size` percentage
56
-
57
- Mouse wheel scrolling adjusts the scale value when zoomed (unless `noWheelScale` is true).
58
-
59
- ## Boot Registration
60
-
61
- QZoom is registered globally via `src/boot/QZoom.js`:
62
-
63
- ```javascript
64
- app.component('QZoom', QZoom)
65
- ```
66
-
67
- This makes `<q-zoom>` available in all templates without explicit imports.
68
-
69
- ## Dependencies
70
-
71
- QZoom requires the `q-colorize-mixin` package for background color handling, and `QZoom.styl` for its CSS styles.
@@ -1,71 +0,0 @@
1
- ## Visão Geral
2
-
3
- `QZoom` é um componente de **overlay de zoom** forked de `quasarframework/app-extension-qzoom` e portado de Vue 2 para Vue 3. Ele permite que qualquer conteúdo seja ampliado em um overlay fullscreen com escala opcional.
4
-
5
- ## Props
6
-
7
- | Prop | Tipo | Padrão | Descrição |
8
- |------|------|--------|-----------|
9
- | `backgroundColor` | `String` | `'white'` | Cor de fundo do overlay |
10
- | `restoreOnScroll` | `Boolean` | `false` | Fecha zoom quando o usuário faz scroll |
11
- | `manual` | `Boolean` | `false` | Desabilita click-to-zoom automático |
12
- | `scale` | `Boolean` | `false` | Habilita escala com roda do mouse |
13
- | `initialScale` | `Number` | `1.0` | Escala inicial (0.05–10) |
14
- | `scaleText` | `Boolean` | `false` | Habilita escala de font-size ao invés de transform |
15
- | `initialScaleText` | `Number` | `100` | Porcentagem inicial de font-size (50–500) |
16
- | `noCenter` | `Boolean` | `false` | Não centraliza conteúdo no overlay |
17
- | `noWheelScale` | `Boolean` | `false` | Desabilita escala com roda do mouse |
18
- | `noEscClose` | `Boolean` | `false` | Desabilita tecla Escape para fechar |
19
-
20
- ## Eventos
21
-
22
- | Evento | Payload | Descrição |
23
- |--------|---------|-----------|
24
- | `before-zoom` | — | Emitido antes da animação de zoom iniciar |
25
- | `zoomed` | — | Emitido após a animação de zoom completar |
26
- | `before-restore` | — | Emitido antes da animação de restaurar iniciar |
27
- | `restored` | — | Emitido após a animação de restaurar completar |
28
- | `scale` | `Number` | Emitido quando o valor de escala muda |
29
- | `scale-text` | `Number` | Emitido quando o valor de escala de texto muda |
30
-
31
- ## Slot
32
-
33
- O slot padrão recebe um Boolean `zoomed` indicando o estado de zoom atual:
34
-
35
- ```html
36
- <q-zoom>
37
- <template v-slot:default="&#123; zoomed &#125;">
38
- <img src="diagrama.png" :class="zoomed ? 'zoomed' : ''" />
39
- </template>
40
- </q-zoom>
41
- ```
42
-
43
- ## Como Funciona
44
-
45
- 1. Por padrão, clicar alterna entre normal e fullscreen
46
- 2. Um overlay é criado com transição suave (500ms zoom in, 400ms restore)
47
- 3. Durante o zoom, o scroll do body é desabilitado (a menos que `restoreOnScroll` seja true)
48
- 4. Pressione **Escape** para fechar (a menos que `noEscClose` seja true)
49
-
50
- ## Modos de Escala
51
-
52
- Dois modos de escala mutuamente exclusivos:
53
-
54
- - **Transform scale** (prop `scale`) — Escala todo o conteúdo usando CSS `transform: scale()`
55
- - **Font-size scale** (prop `scaleText`) — Ajusta a porcentagem de `font-size` do conteúdo
56
-
57
- Scroll com roda do mouse ajusta o valor de escala quando ampliado (a menos que `noWheelScale` seja true).
58
-
59
- ## Registro via Boot
60
-
61
- QZoom é registrado globalmente via `src/boot/QZoom.js`:
62
-
63
- ```javascript
64
- app.component('QZoom', QZoom)
65
- ```
66
-
67
- Isso torna `<q-zoom>` disponível em todos os templates sem imports explícitos.
68
-
69
- ## Dependências
70
-
71
- QZoom requer o pacote `q-colorize-mixin` para tratamento de cor de fundo, e `QZoom.styl` para seus estilos CSS.
@@ -1,89 +0,0 @@
1
- ## Overview
2
-
3
- `useNavigator` is the **core composable** that manages anchor navigation, heading registration, scroll tracking, and ToC tree construction. It is used by DH1–DH6, DPage, and DPageAnchor.
4
-
5
- ## Returned API
6
-
7
- ```javascript
8
- const &#123;
9
- register, // Register an anchor ID
10
- index, // Add a node to the ToC tree
11
- select, // Select an anchor
12
- anchor, // Scroll to an anchor
13
- scrolling, // Scroll event handler
14
- navigate, // Navigate to an anchor (URL + scroll)
15
- selected // Ref to currently selected anchor
16
- &#125; = useNavigator()
17
- ```
18
-
19
- ## Functions
20
-
21
- ### register(id)
22
-
23
- Registers an anchor ID in the `page/anchors` store array. Called by heading components on mount.
24
-
25
- ```javascript
26
- onMounted(() => &#123;
27
- register(props.id)
28
- &#125;)
29
- ```
30
-
31
- ### index(id, child)
32
-
33
- Pushes a node into the `page/nodes` store to build the ToC tree. Called by DH2–DH6 after rendering.
34
-
35
- ### select(id)
36
-
37
- Updates `page/anchor` state and expands the corresponding tree node.
38
-
39
- ### anchor(id, toSelect)
40
-
41
- Scrolls the viewport to the DOM element with the given ID using Quasar's `scroll` utility. Optionally calls `select()` to highlight the node in the ToC tree.
42
-
43
- ### scrolling(scroll)
44
-
45
- The scroll event handler attached to DPage's QScrollObserver. It iterates all registered anchors, finds the one closest to the current scroll position, and selects it. Only active when `page/scrolling` is `true`.
46
-
47
- ### navigate(value, toAnchor)
48
-
49
- Full navigation function that:
50
-
51
- 1. Updates the URL hash via `router.push()`
52
- 2. Scrolls to the anchor element
53
- 3. Handles desktop vs mobile timing differences
54
-
55
- ## Usage Pattern
56
-
57
- Heading components use register + index:
58
-
59
- ```javascript
60
- const &#123; register, index, navigate, selected &#125; = useNavigator()
61
-
62
- onMounted(() => &#123;
63
- register(props.id)
64
- selected.value = props.value
65
- index(props.id)
66
- &#125;)
67
- ```
68
-
69
- DPage uses scrolling:
70
-
71
- ```javascript
72
- const &#123; scrolling, navigate &#125; = useNavigator()
73
- // scrolling is passed to QScrollObserver
74
- ```
75
-
76
- DPageAnchor uses navigate + anchor:
77
-
78
- ```javascript
79
- const &#123; navigate, anchor, selected &#125; = useNavigator()
80
- // navigate is triggered by QTree selection
81
- ```
82
-
83
- ## Store Dependencies
84
-
85
- - `page/anchors` — Array of registered anchor IDs
86
- - `page/nodes` — ToC tree structure
87
- - `page/nodesExpanded` — Expanded tree nodes
88
- - `page/anchor` — Currently selected anchor
89
- - `page/scrolling` — Whether scroll tracking is active