Skip to content

Commit 2838031

Browse files
committed
fix(naming): fix naming…
1 parent 03877a5 commit 2838031

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

docs/src/components/content-container.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Tag for the element.
2828
### rootTags
2929

3030
- Type: `Array`
31-
- Default: `inject('semanticRelease_rootTags', ['main'])`
31+
- Default: `inject('semanticStructure_rootTags', ['main'])`
3232

3333
Available tags for the root structure.
3434

@@ -37,7 +37,7 @@ Available tags for the root structure.
3737
### contentTags
3838

3939
- Type: `Array`
40-
- Default: `inject('semanticRelease_contentTags', ['article', 'section'])`
40+
- Default: `inject('semanticStructure_contentTags', ['article', 'section'])`
4141

4242
Available tags for the content structure.
4343

@@ -53,7 +53,7 @@ Can be used to overwrite the level.
5353
### debug
5454

5555
- Type: `Boolean`
56-
- Default: `inject('semanticRelease_debug', false)`
56+
- Default: `inject('semanticStructure_debug', false)`
5757

5858
If set, the following attributes are set on the element: `data-current-tag`, `data-current-level` and `data-parent-level`.
5959

docs/src/components/content-headline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Tag for the element.
3030
### debug
3131

3232
- Type: `Boolean`
33-
- Default: `inject('semanticRelease_debug', false)`
33+
- Default: `inject('semanticStructure_debug', false)`
3434

3535
If set, the following attributes are set on the element: `data-current-tag`, `data-current-level` and `data-parent-level`.
3636

docs/src/composables/use-content-container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const { currentTag } = useContentContainer()
3737
| Property | Type | Description | Default Value |
3838
| ------------- | -------- | ----------------------------------------- | --------------------------------------------------------------- |
3939
| `tag` | `String` | Can be used to overwrite the tag. | `undefined` |
40-
| `contentTags` | `Array` | Available tags for the content structure. | `inject('semanticRelease_contentTags', ['article', 'section'])` |
41-
| `rootTags` | `Array` | Available tags for the root structure. | `inject('semanticRelease_rootTags', ['main'])` |
40+
| `contentTags` | `Array` | Available tags for the content structure. | `inject('semanticStructure_contentTags', ['article', 'section'])` |
41+
| `rootTags` | `Array` | Available tags for the root structure. | `inject('semanticStructure_rootTags', ['main'])` |
4242
| `level` | `Number` | Can be used to overwrite the level. | `undefined` |
4343

4444
## Return

src/ContentContainer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const ContentContainer = {
1111
rootTags: {
1212
type: Array,
1313
default() {
14-
return inject('semanticRelease_rootTags', ['main']);
14+
return inject('semanticStructure_rootTags', ['main']);
1515
}
1616
},
1717
contentTags: {
1818
type: Array,
1919
default() {
20-
return inject('semanticRelease_contentTags', ['article', 'section']);
20+
return inject('semanticStructure_contentTags', ['article', 'section']);
2121
}
2222
},
2323
level: {
@@ -27,14 +27,14 @@ const ContentContainer = {
2727
debug: {
2828
type: Boolean,
2929
default() {
30-
return inject('semanticRelease_debug', false);
30+
return inject('semanticStructure_debug', false);
3131
}
3232
}
3333
},
3434

3535
setup(props) {
3636
const { parentLevel, currentLevel, currentTag } = useContentContainer(props);
37-
provide('semanticRelease_debug', props.debug);
37+
provide('semanticStructure_debug', props.debug);
3838
return { parentLevel, currentLevel, currentTag };
3939
},
4040

src/ContentHeadline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const ContentHeadline = {
1111
debug: {
1212
type: Boolean,
1313
default() {
14-
return inject('semanticRelease_debug', false);
14+
return inject('semanticStructure_debug', false);
1515
}
1616
}
1717
},

src/useContentContainer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { provide, inject, computed } from 'vue';
22

33
export default function useContentContainer({ tag, contentTags, rootTags, level } = {}) {
44
tag = tag || null;
5-
rootTags = rootTags || inject('semanticRelease_rootTags', ['main']);
6-
contentTags = contentTags || inject('semanticRelease_contentTags', ['article', 'section']);
5+
rootTags = rootTags || inject('semanticStructure_rootTags', ['main']);
6+
contentTags = contentTags || inject('semanticStructure_contentTags', ['article', 'section']);
77
level = level || undefined;
88

9-
provide('semanticRelease_rootTags', rootTags);
10-
provide('semanticRelease_contentTags', contentTags);
9+
provide('semanticStructure_rootTags', rootTags);
10+
provide('semanticStructure_contentTags', contentTags);
1111

12-
const parentLevel = inject('semanticRelease_parentLevel', 0);
12+
const parentLevel = inject('semanticStructure_parentLevel', 0);
1313
const currentLevel = computed(() => (level !== undefined ? level : parentLevel + 1));
1414
const currentTag = computed(() => {
1515
if (tag) {
@@ -21,8 +21,8 @@ export default function useContentContainer({ tag, contentTags, rootTags, level
2121
return contentTags[currentLevel.value % contentTags.length];
2222
});
2323

24-
provide('semanticRelease_rootLevel', rootTags.length);
25-
provide('semanticRelease_parentLevel', currentLevel.value);
24+
provide('semanticStructure_rootLevel', rootTags.length);
25+
provide('semanticStructure_parentLevel', currentLevel.value);
2626

2727
return {
2828
parentLevel,

src/useContentHeadline.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { inject, computed } from 'vue';
22

33
export default function useContentHeadline({ tag } = {}) {
4-
const parentLevel = inject('semanticRelease_parentLevel', 1) + 1;
5-
const rootLevel = inject('semanticRelease_rootLevel', 1);
4+
const parentLevel = inject('semanticStructure_parentLevel', 1) + 1;
5+
const rootLevel = inject('semanticStructure_rootLevel', 1);
66

77
const currentLevel = computed(() => getMax(parentLevel - rootLevel));
88
const currentTag = computed(() => tag || `h${currentLevel.value}`);

0 commit comments

Comments
 (0)