@docsector/docsector-reader 3.6.0 → 4.0.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.
Files changed (56) hide show
  1. package/README.md +15 -15
  2. package/bin/docsector.js +1 -283
  3. package/package.json +1 -1
  4. package/src/components/{DPageBlockquote.vue → DBlockBlockquote.vue} +4 -0
  5. package/src/components/{DBlockCard.vue → DBlockCards.vue} +1 -1
  6. package/src/components/{DPageEmbeddedUrl.vue → DBlockEmbeddedUrl.vue} +1 -1
  7. package/src/components/{DPageExpandable.vue → DBlockExpandable.vue} +5 -0
  8. package/src/components/{DPageFile.vue → DBlockFile.vue} +1 -1
  9. package/src/components/{DPageImage.vue → DBlockImage.vue} +1 -1
  10. package/src/components/{DMermaidDiagram.vue → DBlockMermaidDiagram.vue} +4 -0
  11. package/src/components/{DQuickLinks.vue → DBlockQuickLinks.vue} +4 -0
  12. package/src/components/{DPageSourceCode.vue → DBlockSourceCode.vue} +6 -1
  13. package/src/components/DBlockStepper.vue +210 -0
  14. package/src/components/DBlockTimeline.vue +319 -0
  15. package/src/components/DPageSection.vue +5 -0
  16. package/src/components/DPageTokens.vue +56 -21
  17. package/src/components/DSubpage.vue +14 -2
  18. package/src/components/page-section-tokens.js +273 -10
  19. package/src/composables/useActiveAnchor.js +42 -0
  20. package/src/composables/useNavigator.js +24 -17
  21. package/src/home-page-mode.js +5 -0
  22. package/src/i18n/languages/en-US.hjson +5 -0
  23. package/src/i18n/languages/pt-BR.hjson +5 -0
  24. package/src/pages/guide/i18n-and-markdown.overview.en-US.md +6 -6
  25. package/src/pages/guide/i18n-and-markdown.overview.pt-BR.md +6 -6
  26. package/src/pages/guide/theming.overview.en-US.md +1 -1
  27. package/src/pages/guide/theming.overview.pt-BR.md +1 -1
  28. package/src/pages/manual/basic/d-page-anchor.overview.en-US.md +1 -1
  29. package/src/pages/manual/basic/d-page-anchor.overview.pt-BR.md +1 -1
  30. package/src/pages/manual/content/blocks/embedded-urls.overview.en-US.md +3 -3
  31. package/src/pages/manual/content/blocks/embedded-urls.overview.pt-BR.md +3 -3
  32. package/src/pages/manual/content/blocks/embedded-urls.showcase.en-US.md +8 -8
  33. package/src/pages/manual/content/blocks/embedded-urls.showcase.pt-BR.md +8 -8
  34. package/src/pages/manual/content/blocks/expandable.overview.en-US.md +8 -8
  35. package/src/pages/manual/content/blocks/expandable.overview.pt-BR.md +8 -8
  36. package/src/pages/manual/content/blocks/expandable.showcase.en-US.md +6 -6
  37. package/src/pages/manual/content/blocks/expandable.showcase.pt-BR.md +6 -6
  38. package/src/pages/manual/content/blocks/files.overview.en-US.md +3 -3
  39. package/src/pages/manual/content/blocks/files.overview.pt-BR.md +3 -3
  40. package/src/pages/manual/content/blocks/files.showcase.en-US.md +5 -5
  41. package/src/pages/manual/content/blocks/files.showcase.pt-BR.md +5 -5
  42. package/src/pages/manual/content/blocks/quick-links.overview.en-US.md +4 -4
  43. package/src/pages/manual/content/blocks/quick-links.overview.pt-BR.md +4 -4
  44. package/src/pages/manual/content/blocks/quick-links.showcase.en-US.md +9 -9
  45. package/src/pages/manual/content/blocks/quick-links.showcase.pt-BR.md +9 -9
  46. package/src/pages/manual/content/blocks/stepper.overview.en-US.md +59 -0
  47. package/src/pages/manual/content/blocks/stepper.overview.pt-BR.md +59 -0
  48. package/src/pages/manual/content/blocks/stepper.showcase.en-US.md +115 -0
  49. package/src/pages/manual/content/blocks/stepper.showcase.pt-BR.md +115 -0
  50. package/src/pages/manual/content/blocks/timeline.overview.en-US.md +47 -0
  51. package/src/pages/manual/content/blocks/timeline.overview.pt-BR.md +47 -0
  52. package/src/pages/manual/content/blocks/timeline.showcase.en-US.md +170 -0
  53. package/src/pages/manual/content/blocks/timeline.showcase.pt-BR.md +170 -0
  54. package/src/pages/manual.index.js +56 -0
  55. package/src/quasar.factory.js +13 -11
  56. package/src/store/Page.js +4 -2
@@ -0,0 +1,210 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from 'vue'
3
+ import { useI18n } from 'vue-i18n'
4
+
5
+ defineOptions({
6
+ name: 'DBlockStepper'
7
+ })
8
+
9
+ const props = defineProps({
10
+ steps: {
11
+ type: Array,
12
+ default: () => []
13
+ }
14
+ })
15
+
16
+ const { t } = useI18n()
17
+ const currentStep = ref(1)
18
+ const isFinished = ref(false)
19
+ const stepCount = computed(() => props.steps.length)
20
+
21
+ watch(stepCount, (count) => {
22
+ if (count < 1) {
23
+ currentStep.value = 1
24
+ isFinished.value = false
25
+ return
26
+ }
27
+
28
+ if (currentStep.value > count) {
29
+ currentStep.value = count
30
+ }
31
+ }, { immediate: true })
32
+
33
+ const isLastStep = (index) => index === props.steps.length - 1
34
+ const hasDefaultIcon = (step) => typeof step?.icon === 'string' && step.icon !== '' && step.icon !== 'none'
35
+ const stepPrefix = (step, index) => hasDefaultIcon(step) ? void 0 : String(index + 1)
36
+ const isStepDone = (index) => isFinished.value || currentStep.value > index + 1
37
+
38
+ const goToStep = (stepNumber) => {
39
+ if (stepNumber < 1 || stepNumber > props.steps.length) {
40
+ return
41
+ }
42
+
43
+ isFinished.value = false
44
+ currentStep.value = stepNumber
45
+ }
46
+
47
+ const finishStepper = () => {
48
+ isFinished.value = true
49
+ currentStep.value = null
50
+ }
51
+ </script>
52
+
53
+ <template>
54
+ <div v-if="steps.length" class="d-stepper">
55
+ <q-stepper
56
+ v-model="currentStep"
57
+ vertical
58
+ animated
59
+ flat
60
+ bordered
61
+ header-nav
62
+ color="primary"
63
+ active-color="primary"
64
+ done-color="positive"
65
+ inactive-color="grey-6"
66
+ class="d-stepper__shell"
67
+ >
68
+ <q-step
69
+ v-for="(step, index) in steps"
70
+ :key="`${step.title}-${index}`"
71
+ :name="index + 1"
72
+ :title="step.title"
73
+ :prefix="stepPrefix(step, index)"
74
+ :icon="step.icon || void 0"
75
+ :active-icon="step.activeIcon || step.icon || void 0"
76
+ :done-icon="step.doneIcon || step.icon || void 0"
77
+ :error-icon="step.errorIcon || step.icon || void 0"
78
+ :done="isStepDone(index)"
79
+ header-class="d-stepper__step-header"
80
+ class="d-stepper__step"
81
+ >
82
+ <div class="d-stepper__body">
83
+ <slot :step="step" :index="index" />
84
+ </div>
85
+
86
+ <q-stepper-navigation class="d-stepper__navigation">
87
+ <q-btn
88
+ v-if="!isLastStep(index)"
89
+ color="primary"
90
+ no-caps
91
+ unelevated
92
+ :label="t('page.stepper.continue')"
93
+ @click="goToStep(index + 2)"
94
+ />
95
+
96
+ <q-btn
97
+ v-else
98
+ color="positive"
99
+ no-caps
100
+ unelevated
101
+ :label="t('page.stepper.finish')"
102
+ @click="finishStepper"
103
+ />
104
+
105
+ <q-btn
106
+ v-if="index > 0"
107
+ unelevated
108
+ no-caps
109
+ class="d-stepper__back d-stepper__secondary-action"
110
+ :label="t('page.stepper.back')"
111
+ @click="goToStep(index)"
112
+ />
113
+ </q-stepper-navigation>
114
+ </q-step>
115
+ </q-stepper>
116
+ </div>
117
+ </template>
118
+
119
+ <style lang="sass">
120
+ body.body--light
121
+ --d-stepper-shell-bg: #fffdfa
122
+ --d-stepper-shell-border: rgba(123, 94, 45, 0.16)
123
+ --d-stepper-shell-shadow: rgba(94, 73, 37, 0.08)
124
+ --d-stepper-header-bg: rgba(255, 242, 212, 0.32)
125
+ --d-stepper-divider: rgba(123, 94, 45, 0.14)
126
+ --d-stepper-text-muted: #5f6772
127
+ --d-stepper-secondary-bg: rgba(123, 94, 45, 0.12)
128
+ --d-stepper-secondary-bg-hover: rgba(123, 94, 45, 0.18)
129
+ --d-stepper-secondary-text: #705420
130
+
131
+ body.body--dark
132
+ --d-stepper-shell-bg: rgba(255, 248, 235, 0.04)
133
+ --d-stepper-shell-border: rgba(255, 235, 194, 0.12)
134
+ --d-stepper-shell-shadow: rgba(0, 0, 0, 0.28)
135
+ --d-stepper-header-bg: rgba(255, 240, 210, 0.04)
136
+ --d-stepper-divider: rgba(255, 235, 194, 0.08)
137
+ --d-stepper-text-muted: rgba(255, 255, 255, 0.72)
138
+ --d-stepper-secondary-bg: rgba(255, 235, 194, 0.1)
139
+ --d-stepper-secondary-bg-hover: rgba(255, 235, 194, 0.16)
140
+ --d-stepper-secondary-text: #f4ddb0
141
+
142
+ .d-stepper
143
+ margin: 1.5rem 0
144
+
145
+ .d-stepper__shell
146
+ border-radius: 20px
147
+ overflow: hidden
148
+ background: var(--d-stepper-shell-bg)
149
+ border-color: var(--d-stepper-shell-border)
150
+ box-shadow: 0 16px 36px var(--d-stepper-shell-shadow)
151
+
152
+ .d-stepper__shell.q-stepper--vertical
153
+ .q-stepper__header
154
+ background: var(--d-stepper-header-bg)
155
+
156
+ .q-stepper__tab
157
+ min-height: 72px
158
+
159
+ .q-stepper__step-inner
160
+ border-top: 1px solid var(--d-stepper-divider)
161
+
162
+ .q-stepper__title
163
+ font-size: 1rem
164
+ font-weight: 700
165
+ line-height: 1.45
166
+
167
+ .q-stepper__caption
168
+ color: var(--d-stepper-text-muted)
169
+
170
+ .d-stepper__step-header
171
+ font-weight: 700
172
+
173
+ .d-stepper__body
174
+ min-width: 0
175
+ padding-top: 0.85rem
176
+
177
+ > :first-child
178
+ margin-top: 0
179
+
180
+ > :last-child
181
+ margin-bottom: 0
182
+
183
+ .d-stepper__navigation
184
+ display: flex
185
+ flex-wrap: wrap
186
+ gap: 0.75rem
187
+ margin-top: 1rem
188
+
189
+ .d-stepper__back
190
+ margin-left: 0 !important
191
+
192
+ .d-stepper__secondary-action
193
+ background: var(--d-stepper-secondary-bg) !important
194
+ color: var(--d-stepper-secondary-text) !important
195
+
196
+ &:hover,
197
+ &:focus-visible
198
+ background: var(--d-stepper-secondary-bg-hover) !important
199
+
200
+ @media (max-width: 599px)
201
+ .d-stepper__shell.q-stepper--vertical
202
+ .q-stepper__tab
203
+ min-height: 64px
204
+
205
+ .q-stepper__title
206
+ font-size: 0.97rem
207
+
208
+ .d-stepper__navigation
209
+ gap: 0.55rem
210
+ </style>
@@ -0,0 +1,319 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import { useQuasar } from 'quasar'
4
+ import { useI18n } from 'vue-i18n'
5
+
6
+ defineOptions({
7
+ name: 'DBlockTimeline'
8
+ })
9
+
10
+ const props = defineProps({
11
+ items: {
12
+ type: Array,
13
+ default: () => []
14
+ }
15
+ })
16
+
17
+ const $q = useQuasar()
18
+ const { locale } = useI18n()
19
+
20
+ const timelineLayout = computed(() => {
21
+ return $q.screen.lt.sm ? 'dense' : 'comfortable'
22
+ })
23
+
24
+ const formatDate = (rawDate = '') => {
25
+ const normalized = String(rawDate).trim()
26
+ const isoMatch = normalized.match(/^(\d{4})-(\d{2})-(\d{2})$/)
27
+
28
+ if (isoMatch) {
29
+ const [, year, month, day] = isoMatch
30
+ const parsed = new Date(Number(year), Number(month) - 1, Number(day), 12)
31
+
32
+ return new Intl.DateTimeFormat(locale.value, {
33
+ year: 'numeric',
34
+ month: 'long',
35
+ day: 'numeric'
36
+ }).format(parsed)
37
+ }
38
+
39
+ const parsed = new Date(normalized)
40
+ if (Number.isNaN(parsed.getTime())) {
41
+ return normalized
42
+ }
43
+
44
+ return new Intl.DateTimeFormat(locale.value, {
45
+ year: 'numeric',
46
+ month: 'long',
47
+ day: 'numeric'
48
+ }).format(parsed)
49
+ }
50
+
51
+ const stripHtmlTags = (value = '') => {
52
+ return String(value)
53
+ .replace(/<[^>]+>/g, ' ')
54
+ .replace(/&quot;/g, '"')
55
+ .replace(/&#39;|&apos;/g, "'")
56
+ .replace(/&lt;/g, '<')
57
+ .replace(/&gt;/g, '>')
58
+ .replace(/&amp;/g, '&')
59
+ .replace(/\s+/g, ' ')
60
+ .trim()
61
+ }
62
+
63
+ const getTitleTokenIndex = (tokens = []) => {
64
+ return tokens.findIndex((token) => {
65
+ return typeof token?.content === 'string' && stripHtmlTags(token.content) !== ''
66
+ })
67
+ }
68
+
69
+ const entries = computed(() => {
70
+ return props.items.map((item, index) => {
71
+ const titleTokenIndex = getTitleTokenIndex(item.tokens)
72
+ const titleText = titleTokenIndex === -1
73
+ ? `Update ${index + 1}`
74
+ : stripHtmlTags(item.tokens[titleTokenIndex].content)
75
+
76
+ return {
77
+ ...item,
78
+ formattedDate: formatDate(item.date),
79
+ titleText,
80
+ tags: item.tags.map((tag) => ({
81
+ label: tag?.label || '',
82
+ color: tag?.color || '',
83
+ textColor: tag?.textColor || '',
84
+ icon: tag?.icon || ''
85
+ })),
86
+ tokens: titleTokenIndex !== -1 && item.tokens[titleTokenIndex]?.tag === 'p'
87
+ ? item.tokens.filter((_, tokenIndex) => tokenIndex !== titleTokenIndex)
88
+ : item.tokens
89
+ }
90
+ })
91
+ })
92
+ </script>
93
+
94
+ <template>
95
+ <div v-if="entries.length" class="d-timeline">
96
+ <q-timeline
97
+ color="secondary"
98
+ :layout="timelineLayout"
99
+ side="right"
100
+ :dark="$q.dark.isActive"
101
+ class="d-timeline__shell"
102
+ >
103
+ <q-timeline-entry
104
+ v-for="(item, index) in entries"
105
+ :id="item.anchorId"
106
+ :key="`${item.anchorId}-${index}`"
107
+ class="d-timeline__entry"
108
+ >
109
+ <template #title>
110
+ <span class="d-timeline__title-row">
111
+ <span class="d-timeline__title-text">{{ item.titleText }}</span>
112
+
113
+ <a
114
+ class="d-timeline__anchor"
115
+ :href="`#${item.anchorId}`"
116
+ aria-label="Direct link to timeline item"
117
+ >
118
+ <q-icon name="link" size="16px" aria-hidden="true" />
119
+ </a>
120
+ </span>
121
+ </template>
122
+
123
+ <template #subtitle>
124
+ <span class="d-timeline__subtitle-text">{{ item.formattedDate }}</span>
125
+ </template>
126
+
127
+ <div class="d-timeline__body">
128
+ <div v-if="item.tags.length" class="d-timeline__tags">
129
+ <q-chip
130
+ v-for="(tag, tagIndex) in item.tags"
131
+ :key="`${item.anchorId}-${tag.label}-${tagIndex}`"
132
+ dense
133
+ square
134
+ :icon="tag.icon || void 0"
135
+ :color="tag.color || void 0"
136
+ :text-color="tag.textColor || void 0"
137
+ :class="[
138
+ 'd-timeline__tag',
139
+ { 'd-timeline__tag--default': tag.color === '' }
140
+ ]"
141
+ >
142
+ {{ tag.label }}
143
+ </q-chip>
144
+ </div>
145
+
146
+ <slot :item="item" :index="index" />
147
+ </div>
148
+ </q-timeline-entry>
149
+ </q-timeline>
150
+ </div>
151
+ </template>
152
+
153
+ <style lang="sass">
154
+ body.body--light
155
+ --d-timeline-title: #1d2733
156
+ --d-timeline-subtitle: #7d5516
157
+ --d-timeline-anchor-bg: rgba(150, 105, 39, 0.08)
158
+ --d-timeline-anchor-bg-hover: rgba(150, 105, 39, 0.16)
159
+ --d-timeline-anchor-text: #7d5516
160
+ --d-timeline-tag-bg: rgba(150, 105, 39, 0.1)
161
+ --d-timeline-tag-text: #6b4a18
162
+
163
+ body.body--dark
164
+ --d-timeline-title: #f5f7fa
165
+ --d-timeline-subtitle: #f4d394
166
+ --d-timeline-anchor-bg: rgba(255, 232, 190, 0.08)
167
+ --d-timeline-anchor-bg-hover: rgba(255, 232, 190, 0.16)
168
+ --d-timeline-anchor-text: #f4d394
169
+ --d-timeline-tag-bg: rgba(255, 232, 190, 0.1)
170
+ --d-timeline-tag-text: #f7e0b3
171
+
172
+ .d-timeline
173
+ margin: 1.5rem 0
174
+ --d-timeline-sticky-top: 0.75rem
175
+
176
+ .d-timeline__shell
177
+ &.q-timeline--comfortable
178
+ .q-timeline__subtitle
179
+ width: 1%
180
+ white-space: nowrap
181
+
182
+ > span
183
+ position: sticky
184
+ position: -webkit-sticky
185
+ top: var(--d-timeline-sticky-top)
186
+ display: inline-block
187
+ z-index: 1
188
+
189
+ .q-timeline__dot
190
+ position: sticky !important
191
+ position: -webkit-sticky !important
192
+ top: var(--d-timeline-sticky-top)
193
+ bottom: auto !important
194
+ z-index: 2
195
+
196
+ &:after
197
+ top: 25px
198
+
199
+ &:before
200
+ top: 6px
201
+ content: ''
202
+ &:after
203
+ bottom: -3px
204
+ content: ''
205
+
206
+ .q-timeline__content
207
+ padding-left: 0 !important
208
+
209
+ .q-timeline__title
210
+ padding-top: 0 !important
211
+ padding-left: 0 !important
212
+
213
+ .d-timeline__entry:last-child
214
+ .q-timeline__dot:after
215
+ content: '' !important
216
+
217
+ .q-timeline__title
218
+ margin: 0
219
+ padding: 0
220
+ font-size: 1.3rem
221
+ font-weight: 700
222
+ line-height: 1.35
223
+ color: var(--d-timeline-title)
224
+ cursor: default
225
+ user-select: text
226
+
227
+ &:before,
228
+ &:after,
229
+ &:hover:after
230
+ content: none
231
+
232
+ &:hover
233
+ color: var(--d-timeline-title)
234
+
235
+ .q-timeline__subtitle
236
+ color: var(--d-timeline-subtitle)
237
+ font-size: 0.84rem
238
+ font-weight: 700
239
+ line-height: 1.35
240
+ letter-spacing: 0.06em
241
+ text-transform: uppercase
242
+
243
+ .q-timeline__content
244
+ min-width: 0
245
+
246
+ .d-timeline__entry
247
+ .q-timeline__content > :last-child
248
+ margin-bottom: 0
249
+
250
+ .d-timeline__title-row
251
+ display: flex
252
+ align-items: flex-start
253
+ justify-content: space-between
254
+ gap: 0.75rem
255
+ width: 100%
256
+
257
+ .d-timeline__title-text
258
+ min-width: 0
259
+
260
+ .d-timeline__subtitle-text
261
+ display: inline-block
262
+ min-width: 0
263
+ margin-top: 4px
264
+
265
+ .d-timeline__body
266
+ min-width: 0
267
+
268
+ > :first-child
269
+ margin-top: 0
270
+
271
+ .d-timeline__tags
272
+ display: flex
273
+ flex-wrap: wrap
274
+ gap: 0.45rem
275
+ margin: 0 0 0.8rem
276
+
277
+ .d-timeline__tag
278
+ margin: 0
279
+
280
+ .d-timeline__tag--default
281
+ background: var(--d-timeline-tag-bg)
282
+ color: var(--d-timeline-tag-text)
283
+ font-weight: 600
284
+
285
+ .d-timeline__anchor
286
+ flex: none
287
+ display: inline-flex
288
+ align-items: center
289
+ justify-content: center
290
+ width: 2rem
291
+ height: 2rem
292
+ border-radius: 999px
293
+ background: var(--d-timeline-anchor-bg)
294
+ color: var(--d-timeline-anchor-text)
295
+ text-decoration: none
296
+ font-size: 1rem
297
+ font-weight: 700
298
+ transition: background-color 0.2s ease, transform 0.2s ease
299
+
300
+ &:hover,
301
+ &:focus-visible
302
+ background: var(--d-timeline-anchor-bg-hover)
303
+ transform: translateY(-1px)
304
+
305
+ @media (max-width: 599px)
306
+ .d-timeline__shell
307
+ .q-timeline__title
308
+ font-size: 1.16rem
309
+
310
+ .q-timeline__subtitle
311
+ font-size: 0.78rem
312
+
313
+ .d-timeline__title-row
314
+ gap: 0.55rem
315
+
316
+ .d-timeline__anchor
317
+ width: 1.8rem
318
+ height: 1.8rem
319
+ </style>
@@ -11,6 +11,10 @@ defineProps({
11
11
  id: {
12
12
  type: Number,
13
13
  required: true
14
+ },
15
+ renderPrimaryHeading: {
16
+ type: Boolean,
17
+ default: false
14
18
  }
15
19
  })
16
20
 
@@ -32,6 +36,7 @@ const tokenized = computed(() => {
32
36
  <section>
33
37
  <d-page-tokens
34
38
  :id="id"
39
+ :render-primary-heading="renderPrimaryHeading"
35
40
  :tokens="tokenized"
36
41
  />
37
42
  </section>
@@ -8,6 +8,10 @@ defineProps({
8
8
  type: Number,
9
9
  default: 0
10
10
  },
11
+ renderPrimaryHeading: {
12
+ type: Boolean,
13
+ default: false
14
+ },
11
15
  tokens: {
12
16
  type: Array,
13
17
  default: () => []
@@ -19,21 +23,28 @@ import DH3 from './DH3.vue'
19
23
  import DH4 from './DH4.vue'
20
24
  import DH5 from './DH5.vue'
21
25
  import DH6 from './DH6.vue'
22
- import DPageSourceCode from './DPageSourceCode.vue'
23
- import DMermaidDiagram from './DMermaidDiagram.vue'
24
- import DPageBlockquote from './DPageBlockquote.vue'
25
- import DPageImage from './DPageImage.vue'
26
- import DPageFile from './DPageFile.vue'
27
- import DPageEmbeddedUrl from './DPageEmbeddedUrl.vue'
28
- import DBlockCard from './DBlockCard.vue'
29
- import DQuickLinks from './DQuickLinks.vue'
30
- import DPageExpandable from './DPageExpandable.vue'
26
+ import DBlockSourceCode from './DBlockSourceCode.vue'
27
+ import DBlockMermaidDiagram from './DBlockMermaidDiagram.vue'
28
+ import DBlockBlockquote from './DBlockBlockquote.vue'
29
+ import DBlockImage from './DBlockImage.vue'
30
+ import DBlockFile from './DBlockFile.vue'
31
+ import DBlockEmbeddedUrl from './DBlockEmbeddedUrl.vue'
32
+ import DBlockCards from './DBlockCards.vue'
33
+ import DBlockQuickLinks from './DBlockQuickLinks.vue'
34
+ import DBlockTimeline from './DBlockTimeline.vue'
35
+ import DBlockExpandable from './DBlockExpandable.vue'
36
+ import DBlockStepper from './DBlockStepper.vue'
31
37
  </script>
32
38
 
33
39
  <template>
34
40
  <template v-for="(token, index) in tokens" :key="`${token.tag}-${index}`">
41
+ <h1
42
+ v-if="token.tag === 'h1' && renderPrimaryHeading"
43
+ :id="token.anchorId"
44
+ v-html="token.content"
45
+ ></h1>
35
46
  <d-h2
36
- v-if="token.tag === 'h2'"
47
+ v-else-if="token.tag === 'h2'"
37
48
  :id="token.anchorId"
38
49
  :value="token.content"
39
50
  />
@@ -81,7 +92,7 @@ import DPageExpandable from './DPageExpandable.vue'
81
92
  v-html="token.content"
82
93
  ></div>
83
94
 
84
- <d-page-image
95
+ <d-block-image
85
96
  v-else-if="token.tag === 'image'"
86
97
  :content="token.content"
87
98
  :caption-html="token.captionHtml"
@@ -92,14 +103,14 @@ import DPageExpandable from './DPageExpandable.vue'
92
103
  v-html="token.content"
93
104
  ></p>
94
105
 
95
- <d-page-blockquote
106
+ <d-block-blockquote
96
107
  v-else-if="token.tag === 'blockquote'"
97
108
  :message="token.alertType"
98
109
  >
99
110
  <div v-html="token.content"></div>
100
- </d-page-blockquote>
111
+ </d-block-blockquote>
101
112
 
102
- <d-page-file
113
+ <d-block-file
103
114
  v-else-if="token.tag === 'file'"
104
115
  :src="token.src"
105
116
  :title="token.title"
@@ -107,14 +118,14 @@ import DPageExpandable from './DPageExpandable.vue'
107
118
  :caption="token.caption"
108
119
  />
109
120
 
110
- <d-page-embedded-url
121
+ <d-block-embedded-url
111
122
  v-else-if="token.tag === 'embedded-url'"
112
123
  :url="token.url"
113
124
  :title="token.title"
114
125
  :caption="token.caption"
115
126
  />
116
127
 
117
- <d-page-source-code
128
+ <d-block-source-code
118
129
  v-else-if="token.tag === 'code'"
119
130
  :index="id + token.codeIndex"
120
131
  :text="token.content"
@@ -124,24 +135,48 @@ import DPageExpandable from './DPageExpandable.vue'
124
135
  :tabs="token.tabs"
125
136
  />
126
137
 
127
- <d-mermaid-diagram
138
+ <d-block-mermaid-diagram
128
139
  v-else-if="token.tag === 'mermaid'"
129
140
  :content="token.content"
130
141
  />
131
142
 
132
- <d-block-card
143
+ <d-block-cards
133
144
  v-else-if="token.tag === 'cards'"
134
145
  :title="token.title"
135
146
  :items="token.items"
136
147
  />
137
148
 
138
- <d-quick-links
149
+ <d-block-quick-links
139
150
  v-else-if="token.tag === 'quick-links'"
140
151
  :title="token.title"
141
152
  :items="token.items"
142
153
  />
143
154
 
144
- <d-page-expandable
155
+ <d-block-timeline
156
+ v-else-if="token.tag === 'timeline'"
157
+ :items="token.items"
158
+ >
159
+ <template #default="{ item }">
160
+ <d-page-tokens
161
+ :id="id"
162
+ :tokens="item.tokens"
163
+ />
164
+ </template>
165
+ </d-block-timeline>
166
+
167
+ <d-block-stepper
168
+ v-else-if="token.tag === 'stepper'"
169
+ :steps="token.steps"
170
+ >
171
+ <template #default="{ step }">
172
+ <d-page-tokens
173
+ :id="id"
174
+ :tokens="step.tokens"
175
+ />
176
+ </template>
177
+ </d-block-stepper>
178
+
179
+ <d-block-expandable
145
180
  v-else-if="token.tag === 'expandable'"
146
181
  :title="token.title"
147
182
  :open="token.open"
@@ -150,6 +185,6 @@ import DPageExpandable from './DPageExpandable.vue'
150
185
  :id="id"
151
186
  :tokens="token.tokens"
152
187
  />
153
- </d-page-expandable>
188
+ </d-block-expandable>
154
189
  </template>
155
190
  </template>