@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
@@ -220,7 +220,7 @@ const routes = [
220
220
  },
221
221
 
222
222
  {
223
- path: '/(.*)*',
223
+ path: '/:catchAll(.*)*',
224
224
  component: () => import('layouts/SystemLayout.vue'),
225
225
  meta: {
226
226
  menu: {}
@@ -1,65 +0,0 @@
1
- # Alerts and Blockquotes
2
-
3
- Docsector supports GitHub-style alert blockquotes and regular blockquotes.
4
-
5
- ## GitHub alert syntax
6
-
7
- Use this syntax in Markdown:
8
-
9
- ```markdown
10
- > [!CAUTION]
11
- > NOTICE OF BREAKING CHANGE.
12
- >
13
- > As of 7.0.0, multiple breaking changes were introduced.
14
- ```
15
-
16
- Supported alert types:
17
-
18
- - `NOTE`
19
- - `TIP`
20
- - `IMPORTANT`
21
- - `WARNING`
22
- - `CAUTION`
23
-
24
- ## Alert examples
25
-
26
- ### Note
27
-
28
- > [!NOTE]
29
- > This is extra context that helps readers understand the current section.
30
-
31
- ### Tip
32
-
33
- > [!TIP]
34
- > You can keep your examples short and focused to improve readability.
35
-
36
- ### Important
37
-
38
- > [!IMPORTANT]
39
- > This migration changes defaults and must be reviewed before deployment.
40
-
41
- ### Warning
42
-
43
- > [!WARNING]
44
- > This action may interrupt running workers in production.
45
-
46
- ### Caution
47
-
48
- > [!CAUTION]
49
- > Back up your environment before applying this update.
50
- >
51
- > See `docs/migration.md` for the complete checklist.
52
-
53
- ## Regular blockquote
54
-
55
- If no `[!TYPE]` marker is present, blockquotes render as regular notes:
56
-
57
- > This is a regular blockquote.
58
- >
59
- > It still supports **bold text**, [links](https://github.com/docsector/docsector-reader), and `inline code`.
60
-
61
- ## Notes
62
-
63
- - Alert markers are case-insensitive (`[!note]` also works).
64
- - Unknown markers are treated as regular blockquotes.
65
- - Alert and regular blockquotes both work in light and dark mode.
@@ -1,65 +0,0 @@
1
- # Alertas e Blockquotes
2
-
3
- O Docsector suporta blockquotes no estilo de alertas do GitHub e blockquotes comuns.
4
-
5
- ## Sintaxe de alerta do GitHub
6
-
7
- Use esta sintaxe no Markdown:
8
-
9
- ```markdown
10
- > [!CAUTION]
11
- > AVISO DE MUDANCA QUEBRANDO COMPATIBILIDADE.
12
- >
13
- > A partir da versao 7.0.0, varias breaking changes foram introduzidas.
14
- ```
15
-
16
- Tipos de alerta suportados:
17
-
18
- - `NOTE`
19
- - `TIP`
20
- - `IMPORTANT`
21
- - `WARNING`
22
- - `CAUTION`
23
-
24
- ## Exemplos de alerta
25
-
26
- ### Note
27
-
28
- > [!NOTE]
29
- > Este e um contexto adicional que ajuda o leitor a entender a secao atual.
30
-
31
- ### Tip
32
-
33
- > [!TIP]
34
- > Voce pode manter os exemplos curtos e focados para melhorar a legibilidade.
35
-
36
- ### Important
37
-
38
- > [!IMPORTANT]
39
- > Esta migracao altera defaults e deve ser revisada antes do deploy.
40
-
41
- ### Warning
42
-
43
- > [!WARNING]
44
- > Esta acao pode interromper workers em execucao em producao.
45
-
46
- ### Caution
47
-
48
- > [!CAUTION]
49
- > Faça backup do ambiente antes de aplicar esta atualizacao.
50
- >
51
- > Veja `docs/migration.md` para o checklist completo.
52
-
53
- ## Blockquote comum
54
-
55
- Se nao houver marcador `[!TYPE]`, o blockquote sera renderizado como blockquote comum:
56
-
57
- > Este e um blockquote comum.
58
- >
59
- > Ele continua suportando **texto em negrito**, [links](https://github.com/docsector/docsector-reader) e `inline code`.
60
-
61
- ## Observacoes
62
-
63
- - Marcadores de alerta sao case-insensitive (`[!note]` tambem funciona).
64
- - Marcadores desconhecidos sao tratados como blockquote comum.
65
- - Alertas e blockquotes comuns funcionam no modo claro e escuro.
@@ -1,54 +0,0 @@
1
- ## Overview
2
-
3
- `DH1` through `DH6` are **heading components** that render section titles with anchor navigation support. Each heading level corresponds to a Markdown heading (`##` through `######`).
4
-
5
- ## Component Hierarchy
6
-
7
- | Component | Markdown | HTML | Usage |
8
- |-----------|----------|------|-------|
9
- | `DH1` | `#` (implicit) | `<h1>` | Page title, auto-generated from i18n |
10
- | `DH2` | `##` | `<h2>` | Main sections |
11
- | `DH3` | `###` | `<h3>` | Sub-sections |
12
- | `DH4` | `####` | `<h4>` | Detail sections |
13
- | `DH5` | `#####` | `<h5>` | Minor sections |
14
- | `DH6` | `######` | `<h6>` | Micro sections |
15
-
16
- ## DH1 — Page Title
17
-
18
- DH1 is special — it doesn't receive content via props. Instead, it reads the page title from the i18n store:
19
-
20
- ```javascript
21
- const heading = computed(() => &#123;
22
- const base = store.state.i18n.base
23
- return t('_.' + base + '._')
24
- &#125;)
25
- ```
26
-
27
- DH1 also **registers** itself as anchor `0` in the `useNavigator` composable, enabling the ToC tree to show the page title as the root node.
28
-
29
- ## DH2–DH6 — Section Titles
30
-
31
- These components receive their content via the `value` prop (already rendered as HTML by `DPageSection`):
32
-
33
- ## Props (DH2–DH6)
34
-
35
- | Prop | Type | Required | Description |
36
- |------|------|----------|-------------|
37
- | `id` | `Number` | Yes | Anchor ID for navigation |
38
- | `value` | `String` | Yes | HTML content of the heading |
39
-
40
- ## Anchor Navigation
41
-
42
- Clicking any heading triggers the `navigate(id)` function from `useNavigator`, which:
43
-
44
- 1. Updates the URL hash to `#&#123;id&#125;`
45
- 2. Scrolls the viewport to the heading element
46
- 3. Highlights the heading in the ToC tree
47
-
48
- ## Node Registration
49
-
50
- Each heading component (DH2+) calls `useNavigator().index(id)` on mount and update, which pushes a node into the `page/nodes` store, building the ToC tree dynamically as the page renders.
51
-
52
- ## Styling
53
-
54
- Headings use standard HTML heading elements with `v-html` rendering. Custom styling can be applied through the global `app.sass` file or by targeting the heading tags directly.
@@ -1,54 +0,0 @@
1
- ## Visão Geral
2
-
3
- `DH1` até `DH6` são **componentes de título** que renderizam títulos de seção com suporte a navegação por âncora. Cada nível de título corresponde a um heading Markdown (`##` até `######`).
4
-
5
- ## Hierarquia de Componentes
6
-
7
- | Componente | Markdown | HTML | Uso |
8
- |------------|----------|------|-----|
9
- | `DH1` | `#` (implícito) | `<h1>` | Título da página, gerado automaticamente do i18n |
10
- | `DH2` | `##` | `<h2>` | Seções principais |
11
- | `DH3` | `###` | `<h3>` | Sub-seções |
12
- | `DH4` | `####` | `<h4>` | Seções de detalhe |
13
- | `DH5` | `#####` | `<h5>` | Seções menores |
14
- | `DH6` | `######` | `<h6>` | Micro seções |
15
-
16
- ## DH1 — Título da Página
17
-
18
- DH1 é especial — não recebe conteúdo via props. Em vez disso, lê o título da página da store i18n:
19
-
20
- ```javascript
21
- const heading = computed(() => &#123;
22
- const base = store.state.i18n.base
23
- return t('_.' + base + '._')
24
- &#125;)
25
- ```
26
-
27
- DH1 também se **registra** como âncora `0` no composable `useNavigator`, permitindo que a árvore de ToC mostre o título da página como nó raiz.
28
-
29
- ## DH2–DH6 — Títulos de Seção
30
-
31
- Esses componentes recebem seu conteúdo via prop `value` (já renderizado como HTML pelo `DPageSection`):
32
-
33
- ## Props (DH2–DH6)
34
-
35
- | Prop | Tipo | Obrigatório | Descrição |
36
- |------|------|-------------|-----------|
37
- | `id` | `Number` | Sim | ID da âncora para navegação |
38
- | `value` | `String` | Sim | Conteúdo HTML do título |
39
-
40
- ## Navegação por Âncora
41
-
42
- Clicar em qualquer título dispara a função `navigate(id)` do `useNavigator`, que:
43
-
44
- 1. Atualiza o hash da URL para `#&#123;id&#125;`
45
- 2. Faz scroll do viewport até o elemento do título
46
- 3. Destaca o título na árvore de ToC
47
-
48
- ## Registro de Nós
49
-
50
- Cada componente de título (DH2+) chama `useNavigator().index(id)` no mount e update, que insere um nó no store `page/nodes`, construindo a árvore de ToC dinamicamente conforme a página renderiza.
51
-
52
- ## Estilização
53
-
54
- Os títulos usam elementos HTML de heading padrão com renderização `v-html`. Estilos customizados podem ser aplicados através do arquivo global `app.sass` ou direcionando as tags de heading diretamente.
@@ -1,31 +0,0 @@
1
- ## Overview
2
-
3
- `DMermaidDiagram` is an internal component responsible for rendering **Mermaid** diagrams. It intercepts code blocks fenced with the `mermaid` language indicator and renders them as SVG visuals instead of formatted text.
4
-
5
- The component uses lazy-loading — the `mermaid` library is only fetched when a diagram is present on the page, keeping the initial bundle size small.
6
-
7
- ## Props
8
-
9
- | Prop | Type | Required | Default | Description |
10
- |------|------|----------|---------|-------------|
11
- | `content` | `String` | Yes | — | The raw Mermaid definition syntax |
12
-
13
- ## Features
14
-
15
- ### Direct Rendering
16
-
17
- Diagrams are parsed and rendered directly into SVGs via the official `mermaid.render()` API. The SVGs are fully responsive.
18
-
19
- ### Dark/Light Mode Aware
20
-
21
- The diagrams inherit their theme dynamically. When `$q.dark.isActive` toggles, `DMermaidDiagram` detects the change, re-initializes Mermaid with the new theme context, and entirely redraws the instance to match Docsector's overall appearance.
22
-
23
- ### Error Handling
24
-
25
- If the provided syntax is invalid, the component gracefully catches the parsing error and displays a structured error block along with the raw source code.
26
-
27
- This guarantees the page will not break and aids during development.
28
-
29
- ### HTML Entity Decoding
30
-
31
- Curly braces `&#123;` and `&#125;` are properly decoded before rendering, ensuring compatibility with Vue's i18n interpolation requirements while allowing Mermaid logic to function intact.
@@ -1,29 +0,0 @@
1
- ## Visão geral
2
-
3
- O `DMermaidDiagram` é um componente interno responsável por renderizar diagramas **Mermaid**. Ele intercepta os blocos de código marcados com o indicador de linguagem `mermaid` e os renderiza como elementos SVG ao invés de texto puro.
4
-
5
- O componente utiliza _lazy-loading_ — a biblioteca `mermaid` apenas é baixada quando de fato existe um diagrama na página, mantendo o tamanho inicial do site otimizado.
6
-
7
- ## Props
8
-
9
- | Prop | Tipo | Obrigatório | Valor padrão | Descrição |
10
- |------|------|----------|---------|-------------|
11
- | `content` | `String` | Sim | — | A sintaxe pura da definição do Mermaid |
12
-
13
- ## Funcionalidades
14
-
15
- ### Renderização Direta
16
-
17
- Os diagramas são lidos e renderizados diretamente em SVGs pela API oficial `mermaid.render()`. Os SVGs gerados são totalmente responsivos.
18
-
19
- ### Adaptação aos Modos Claro/Escuro
20
-
21
- Os diagramas herdam a temática que você desejar. Quando o indicador `$q.dark.isActive` for alternado, O `DMermaidDiagram` rastreará tal mudança, re-inicializará um Mermaid com o novo contexto de tema e irá redesenhar toda a instância para espelhar a aparência visual geral do Docsector.
22
-
23
- ### Tratamento de Falhas
24
-
25
- Se a sintaxe fornecida estiver incorreta, o componente elegantemente detecta a falha sem que a aplicação se quebre. Exibindo na tela, apenas para si, um bloco com erro e o código original abaixo com dicas do erro em desenvolvimento.
26
-
27
- ### Decodificação de Entidades HTML
28
-
29
- Chaves numéricas de texto `&#123;` e `&#125;` tem seus devidos caracteres tratados antes do envio de renderização, garantindo harmonia entre os requisitos de visualização na extensão i18n padrão do Vue junto da estabilidade do código original desenhado para Mermaid em tempo-real.
@@ -1,66 +0,0 @@
1
- ## Overview
2
-
3
- `DPageBlockquote` renders **styled blockquotes** with semantic categorization. It now powers both:
4
-
5
- - GitHub-style alert blockquotes from Markdown (`> [!TYPE]`)
6
- - Regular blockquotes (`> ...`) without an alert marker
7
-
8
- ## Props
9
-
10
- | Prop | Type | Default | Description |
11
- |------|------|---------|-------------|
12
- | `message` | `String` | `''` | Type of alert: `'note'`, `'tip'`, `'important'`, `'warning'`, or `'caution'` |
13
-
14
- ## Slot
15
-
16
- The default slot receives the blockquote content.
17
-
18
- ## Message Types
19
-
20
- | Type | Label | Purpose |
21
- |------|-------|---------|
22
- | `note` | **Note** | Additional context and references |
23
- | `tip` | **Tip** | Practical recommendation or best practice |
24
- | `important` | **Important** | Critical information the reader must know |
25
- | `warning` | **Warning** | Potential pitfalls or breaking changes |
26
- | `caution` | **Caution** | High-risk action that deserves extra care |
27
- | (empty) | *(none)* | Generic blockquote with no label |
28
-
29
- ## Usage
30
-
31
- GitHub alert syntax in Markdown:
32
-
33
- ```markdown
34
- > [!WARNING]
35
- > This operation may interrupt workers.
36
- ```
37
-
38
- Regular blockquote syntax in Markdown:
39
-
40
- ```markdown
41
- > This is a regular blockquote.
42
- ```
43
-
44
- You can also use the component directly:
45
-
46
- ```html
47
- <d-page-blockquote message="note">
48
- <p>This is additional context.</p>
49
- </d-page-blockquote>
50
-
51
- <d-page-blockquote message="tip">
52
- <p>This is a practical recommendation.</p>
53
- </d-page-blockquote>
54
-
55
- <d-page-blockquote message="warning">
56
- <p>Be careful with this operation!</p>
57
- </d-page-blockquote>
58
-
59
- <d-page-blockquote message="caution">
60
- <p>This is a high-risk warning.</p>
61
- </d-page-blockquote>
62
- ```
63
-
64
- ## Styling
65
-
66
- The component renders a standard `<blockquote>` element with alert-specific classes when a `message` is provided. Appearance is controlled in global `app.sass`, including dark/light mode variants for each alert type.
@@ -1,66 +0,0 @@
1
- ## Visão Geral
2
-
3
- `DPageBlockquote` renderiza **blockquotes estilizados** com categorização semântica. Agora ele atende tanto:
4
-
5
- - Alertas no estilo GitHub vindos do Markdown (`> [!TYPE]`)
6
- - Blockquotes comuns (`> ...`) sem marcador de alerta
7
-
8
- ## Props
9
-
10
- | Prop | Tipo | Padrão | Descrição |
11
- |------|------|--------|-----------|
12
- | `message` | `String` | `''` | Tipo de alerta: `'note'`, `'tip'`, `'important'`, `'warning'` ou `'caution'` |
13
-
14
- ## Slot
15
-
16
- O slot padrão recebe o conteúdo do blockquote.
17
-
18
- ## Tipos de Mensagem
19
-
20
- | Tipo | Label | Propósito |
21
- |------|-------|-----------|
22
- | `note` | **Note** | Contexto adicional e referências |
23
- | `tip` | **Tip** | Recomendação prática ou boa prática |
24
- | `important` | **Important** | Informação crítica que o leitor precisa saber |
25
- | `warning` | **Warning** | Armadilhas potenciais ou breaking changes |
26
- | `caution` | **Caution** | Ação de alto risco que exige cuidado extra |
27
- | (vazio) | *(nenhum)* | Blockquote genérico sem label |
28
-
29
- ## Uso
30
-
31
- Sintaxe de alerta GitHub no Markdown:
32
-
33
- ```markdown
34
- > [!WARNING]
35
- > Esta operação pode interromper workers.
36
- ```
37
-
38
- Sintaxe de blockquote comum no Markdown:
39
-
40
- ```markdown
41
- > Este é um blockquote comum.
42
- ```
43
-
44
- Você também pode usar o componente diretamente:
45
-
46
- ```html
47
- <d-page-blockquote message="note">
48
- <p>Este é um contexto adicional.</p>
49
- </d-page-blockquote>
50
-
51
- <d-page-blockquote message="tip">
52
- <p>Esta é uma recomendação prática.</p>
53
- </d-page-blockquote>
54
-
55
- <d-page-blockquote message="warning">
56
- <p>Tenha cuidado com esta operação!</p>
57
- </d-page-blockquote>
58
-
59
- <d-page-blockquote message="caution">
60
- <p>Este é um aviso de alto risco.</p>
61
- </d-page-blockquote>
62
- ```
63
-
64
- ## Estilização
65
-
66
- O componente renderiza um elemento `<blockquote>` padrão com classes específicas quando `message` é informado. A aparência é controlada no `app.sass` global, incluindo variações para modo claro/escuro por tipo de alerta.
@@ -1,34 +0,0 @@
1
- ## Showcase
2
-
3
- Examples using GitHub alert syntax:
4
-
5
- ## Note
6
-
7
- > [!NOTE]
8
- > You can provide additional context and references in this block.
9
-
10
- ## Tip
11
-
12
- > [!TIP]
13
- > Keep examples short and focused so readers can execute them quickly.
14
-
15
- ## Important
16
-
17
- > [!IMPORTANT]
18
- > This migration changes defaults and should be validated before deploy.
19
-
20
- ## Warning
21
-
22
- > [!WARNING]
23
- > This action can interrupt running workers.
24
-
25
- ## Caution
26
-
27
- > [!CAUTION]
28
- > Back up your environment before changing low-level server settings.
29
-
30
- ## Generic
31
-
32
- Regular blockquote without alert marker:
33
-
34
- > This is a standard blockquote with no alert marker.
@@ -1,34 +0,0 @@
1
- ## Demonstração
2
-
3
- Exemplos usando sintaxe de alerta do GitHub:
4
-
5
- ## Note
6
-
7
- > [!NOTE]
8
- > Voce pode adicionar contexto adicional e referencias neste bloco.
9
-
10
- ## Tip
11
-
12
- > [!TIP]
13
- > Mantenha exemplos curtos e focados para facilitar a execucao.
14
-
15
- ## Important
16
-
17
- > [!IMPORTANT]
18
- > Esta migracao altera defaults e deve ser validada antes do deploy.
19
-
20
- ## Warning
21
-
22
- > [!WARNING]
23
- > Esta acao pode interromper workers em execucao.
24
-
25
- ## Caution
26
-
27
- > [!CAUTION]
28
- > Faça backup do ambiente antes de alterar configuracoes de baixo nivel do servidor.
29
-
30
- ## Genérico
31
-
32
- Blockquote comum sem marcador de alerta:
33
-
34
- > Este e um blockquote padrao sem marcador de alerta.
@@ -1,57 +0,0 @@
1
- ## Overview
2
-
3
- `DPageSection` is the **Markdown rendering engine** at the heart of Docsector Reader. It tokenizes Markdown source from the current i18n path and renders each token as the appropriate Vue component.
4
-
5
- ## Props
6
-
7
- | Prop | Type | Required | Description |
8
- |------|------|----------|-------------|
9
- | `id` | `Number` | Yes | Base ID used for anchor generation |
10
-
11
- ## How It Works
12
-
13
- 1. Reads the Markdown source from the i18n store path `_.&#123;absolute&#125;.source`
14
- 2. Parses it with **markdown-it** + **markdown-it-attrs**
15
- 3. Tokenizes the parsed AST into a flat array of renderable tokens
16
- 4. Each token is rendered as the corresponding Docsector component
17
-
18
- ## Token Types and Rendering
19
-
20
- | Markdown | Token Tag | Component |
21
- |----------|-----------|-----------|
22
- | `## Heading 2` | `h2` | `DH2` |
23
- | `### Heading 3` | `h3` | `DH3` |
24
- | `#### Heading 4` | `h4` | `DH4` |
25
- | `##### Heading 5` | `h5` | `DH5` |
26
- | `###### Heading 6` | `h6` | `DH6` |
27
- | Paragraph text | `p` | `<p v-html>` |
28
- | Unordered list | `ul` | `<ul v-html>` |
29
- | Ordered list | `ol` | `<ol v-html>` |
30
- | Table | `table` | `<table v-html>` |
31
- | Fenced code block | `code` | `DPageSourceCode` |
32
-
33
- ## Nesting Support
34
-
35
- DPageSection handles one level of nesting for:
36
-
37
- - Bullet lists (`ul > li`)
38
- - Ordered lists (`ol > li`)
39
- - Tables (`table > thead/tbody > tr > th/td`)
40
-
41
- Nested content is accumulated into a single HTML string and rendered with `v-html`.
42
-
43
- ## Custom Attributes
44
-
45
- The `markdown-it-attrs` plugin uses `:` and `;` as delimiters. Code fences support `filename`, `group`, `tab`, and `breadcrumb`:
46
-
47
- ````markdown
48
- ```php :group="server"; :tab="server.php"; :breadcrumb="src > server.php";
49
- echo "Server ready";
50
- ```
51
- ````
52
-
53
- `filename` is shown in the info bar for single blocks. Consecutive fences with the same `group` become tabs. `tab` sets the tab label, so filename-like labels receive file icons inside the tab. `breadcrumb` sets the breadcrumb segments above the code block, and the final filename-like segment receives the same icon.
54
-
55
- ## Anchor IDs
56
-
57
- Each heading token receives an anchor ID calculated as `id + token.map[0]`, where `token.map[0]` is the source line number. This creates unique, deterministic anchors for the ToC tree.
@@ -1,57 +0,0 @@
1
- ## Visão Geral
2
-
3
- `DPageSection` é o **motor de renderização Markdown** no coração do Docsector Reader. Ele tokeniza o source Markdown a partir do caminho i18n atual e renderiza cada token como o componente Vue apropriado.
4
-
5
- ## Props
6
-
7
- | Prop | Tipo | Obrigatório | Descrição |
8
- |------|------|-------------|-----------|
9
- | `id` | `Number` | Sim | ID base usado para geração de âncoras |
10
-
11
- ## Como Funciona
12
-
13
- 1. Lê o source Markdown do caminho da store i18n `_.&#123;absolute&#125;.source`
14
- 2. Faz o parse com **markdown-it** + **markdown-it-attrs**
15
- 3. Tokeniza o AST parseado em um array flat de tokens renderizáveis
16
- 4. Cada token é renderizado como o componente Docsector correspondente
17
-
18
- ## Tipos de Token e Renderização
19
-
20
- | Markdown | Tag do Token | Componente |
21
- |----------|-------------|-----------|
22
- | `## Título 2` | `h2` | `DH2` |
23
- | `### Título 3` | `h3` | `DH3` |
24
- | `#### Título 4` | `h4` | `DH4` |
25
- | `##### Título 5` | `h5` | `DH5` |
26
- | `###### Título 6` | `h6` | `DH6` |
27
- | Texto de parágrafo | `p` | `<p v-html>` |
28
- | Lista não ordenada | `ul` | `<ul v-html>` |
29
- | Lista ordenada | `ol` | `<ol v-html>` |
30
- | Tabela | `table` | `<table v-html>` |
31
- | Bloco de código cercado | `code` | `DPageSourceCode` |
32
-
33
- ## Suporte a Aninhamento
34
-
35
- DPageSection lida com um nível de aninhamento para:
36
-
37
- - Listas com marcadores (`ul > li`)
38
- - Listas ordenadas (`ol > li`)
39
- - Tabelas (`table > thead/tbody > tr > th/td`)
40
-
41
- Conteúdo aninhado é acumulado em uma única string HTML e renderizado com `v-html`.
42
-
43
- ## Atributos Customizados
44
-
45
- O plugin `markdown-it-attrs` usa `:` e `;` como delimitadores. Blocos de código cercados suportam `filename`, `group`, `tab` e `breadcrumb`:
46
-
47
- ````markdown
48
- ```php :group="servidor"; :tab="servidor.php"; :breadcrumb="src > servidor.php";
49
- echo "Servidor pronto";
50
- ```
51
- ````
52
-
53
- `filename` aparece na barra de info em blocos simples. Fences consecutivos com o mesmo `group` viram abas. `tab` define o rótulo da aba, então labels que parecem arquivo recebem ícones dentro da aba. `breadcrumb` define os segmentos exibidos acima do bloco de código, e o segmento final que parece arquivo recebe o mesmo ícone.
54
-
55
- ## IDs de Âncora
56
-
57
- Cada token de título recebe um ID de âncora calculado como `id + token.map[0]`, onde `token.map[0]` é o número da linha no source. Isso cria âncoras únicas e determinísticas para a árvore de ToC.
@@ -1,43 +0,0 @@
1
- ## Showcase
2
-
3
- Here is the Markdown source that renders the content you see on the Overview tab:
4
-
5
- ```
6
- ## My Section Title
7
-
8
- Paragraph text with **bold** and *italic*.
9
-
10
- - Item one
11
- - Item two
12
- - Item three
13
-
14
- | Column A | Column B |
15
- |----------|----------|
16
- | Cell 1 | Cell 2 |
17
-
18
- ### Sub-Section
19
-
20
- More content here.
21
- ```
22
-
23
- Each element becomes a token in DPageSection's tokenizer. Headings create anchors in the right-side ToC tree.
24
-
25
- ## Supported Markdown Elements
26
-
27
- DPageSection renders the following Markdown elements:
28
-
29
- - Headings (H2 through H6)
30
- - Paragraphs with inline formatting (bold, italic, links, code)
31
- - Unordered and ordered lists
32
- - Tables with headers
33
- - Fenced code blocks with syntax highlighting
34
-
35
- ## Code Block with Filename
36
-
37
- Use the `:filename;` attribute to display a filename header:
38
-
39
- ```php
40
- echo "Hello, Docsector!";
41
- ```
42
-
43
- The filename appears in the info bar above the code block along with the language identifier.