@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.
- package/README.md +22 -2
- package/bin/docsector.js +1 -1
- package/jsconfig.json +1 -0
- package/package.json +1 -1
- package/public/files/manual/release-checklist.txt +7 -0
- package/src/components/DPageFile.vue +430 -0
- package/src/components/DPageImage.vue +80 -0
- package/src/components/DPageTokens.vue +16 -0
- package/src/components/QZoom.js +68 -14
- package/src/components/QZoom.sass +38 -3
- package/src/components/page-section-tokens.js +243 -16
- package/src/i18n/languages/en-US.hjson +7 -0
- package/src/i18n/languages/pt-BR.hjson +7 -0
- package/src/pages/guide/i18n-and-markdown.overview.en-US.md +15 -1
- package/src/pages/guide/i18n-and-markdown.overview.pt-BR.md +15 -1
- package/src/pages/manual/content/blocks/files.overview.en-US.md +27 -0
- package/src/pages/manual/content/blocks/files.overview.pt-BR.md +27 -0
- package/src/pages/manual/content/blocks/files.showcase.en-US.md +17 -0
- package/src/pages/manual/content/blocks/files.showcase.pt-BR.md +17 -0
- package/src/pages/manual/content/blocks/images.overview.en-US.md +20 -2
- package/src/pages/manual/content/blocks/images.showcase.en-US.md +10 -2
- package/src/pages/manual.index.js +29 -0
|
@@ -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
|

|
|
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
|
|
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
|
-
-
|
|
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
|
-
###
|
|
3
|
+
### Markdown Image With Caption
|
|
4
4
|
|
|
5
5
|

|
|
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
|

|
|
10
12
|
|
|
11
|
-
The
|
|
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',
|