@docsector/docsector-reader 3.2.1 → 3.3.1

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.
@@ -0,0 +1,17 @@
1
+ ## Showcase
2
+
3
+ ### Local File with Caption
4
+
5
+ <d-file src="/files/manual/release-checklist.txt" title="Release checklist" size="1 KB">
6
+ Download the example checklist published from `public/files/manual`.
7
+ </d-file>
8
+
9
+ ### Local File with Automatic Size
10
+
11
+ <d-file src="/files/manual/release-checklist.txt" />
12
+
13
+ ### External File URL
14
+
15
+ <d-file src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" title="Reference PDF" size="13 KB">
16
+ The same block can point to a CDN or object storage URL without changing the page layout.
17
+ </d-file>
@@ -0,0 +1,17 @@
1
+ ## Demonstração
2
+
3
+ ### Arquivo Local com Legenda
4
+
5
+ <d-file src="/files/manual/release-checklist.txt" title="Checklist de release" size="1 KB">
6
+ Baixe o checklist de exemplo publicado a partir de `public/files/manual`.
7
+ </d-file>
8
+
9
+ ### Arquivo Local com Tamanho Automático
10
+
11
+ <d-file src="/files/manual/release-checklist.txt" />
12
+
13
+ ### URL Externa de Arquivo
14
+
15
+ <d-file src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" title="PDF de referência" size="13 KB">
16
+ O mesmo bloco pode apontar para um CDN ou URL de object storage sem mudar o layout da página.
17
+ </d-file>
@@ -2,15 +2,33 @@
2
2
 
3
3
  Use standard Markdown images to place screenshots, illustrations, diagrams, and product UI directly inside the reading flow.
4
4
 
5
+ When an image appears on its own line, Docsector renders it as a block figure with click-to-zoom behavior.
6
+ For plain Markdown images, the label is used as both the visible caption and the alt text, matching GitBook's block image model.
7
+
5
8
  ## Markdown Syntax
6
9
 
7
10
  ```markdown
8
11
  ![Dashboard overview](/images/example-dashboard.png)
9
12
  ```
10
13
 
14
+ ## Separate Alt Text And Caption
15
+
16
+ Use raw HTML when the accessibility text and the visible caption should be different, or when you need `<picture>` / `<source>` for light and dark mode variants.
17
+
18
+ ```html
19
+ <figure>
20
+ <picture>
21
+ <source srcset="/images/logo-dark.png" media="(prefers-color-scheme: dark)">
22
+ <img src="/images/logo-light.png" alt="Docsector Reader logo">
23
+ </picture>
24
+ <figcaption><p>Docsector Reader brand mark</p></figcaption>
25
+ </figure>
26
+ ```
27
+
11
28
  ## Good Practices
12
29
 
13
- - Write descriptive alt text so the image still has meaning without the visual.
30
+ - Write labels that still make sense without the visual, because plain Markdown uses the same text for caption and alt.
31
+ - Use `<figure>` with `<figcaption>` when the visible caption should differ from the accessibility text.
14
32
  - Prefer absolute site paths such as `/images/...` for assets stored in `public/images/`.
15
33
  - Use screenshots to support the text, not replace the explanation.
16
- - When default Markdown syntax is not enough, raw HTML can be used for custom wrappers or sizing.
34
+ - Click standalone block images to zoom; inline images that stay inside a paragraph remain on the inline path.
@@ -1,11 +1,19 @@
1
1
  ## Showcase
2
2
 
3
- ### Basic Image
3
+ ### Markdown Image With Caption
4
4
 
5
5
  ![Docsector Reader logo](/images/logo.png)
6
6
 
7
+ The label above is rendered as the visible caption and remains the image alt text.
8
+
7
9
  ### Image with Title
8
10
 
9
11
  ![Docsector Reader logo](/images/logo.png "Docsector Reader")
10
12
 
11
- The alt text remains part of the content model, so the page still communicates meaning if the image cannot be seen.
13
+ The title attribute is preserved on the rendered image, while the block still keeps the same visible caption.
14
+
15
+ ### Raw HTML Figure With Separate Alt And Caption
16
+
17
+ <figure><img src="/images/logo.png" alt="Docsector Reader brand mark"><figcaption><p>Docsector Reader logo used as a standalone brand image.</p></figcaption></figure>
18
+
19
+ Click any standalone image block on this page to open the zoom view.
@@ -542,6 +542,35 @@ export default {
542
542
  }
543
543
  },
544
544
 
545
+ '/content/blocks/files': {
546
+ config: {
547
+ icon: 'attach_file',
548
+ status: 'new',
549
+ version: 'v3.3.0',
550
+ meta: {
551
+ description: {
552
+ 'en-US': 'Files — Documentation of Docsector Reader',
553
+ 'pt-BR': 'Arquivos — Documentacao do Docsector Reader'
554
+ }
555
+ },
556
+ book: 'manual',
557
+ menu: {},
558
+ subpages: {
559
+ showcase: true
560
+ }
561
+ },
562
+ data: {
563
+ 'en-US': { title: 'Files' },
564
+ 'pt-BR': { title: 'Arquivos' }
565
+ },
566
+ metadata: {
567
+ tags: {
568
+ 'en-US': 'files download attachments markdown assets public r2 cloudflare github',
569
+ 'pt-BR': 'arquivos download anexos markdown assets public r2 cloudflare github'
570
+ }
571
+ }
572
+ },
573
+
545
574
  '/content/blocks/math-and-tex': {
546
575
  config: {
547
576
  icon: 'functions',