From fe22a3262d9ddba4f0145286c15439810dcdc361 Mon Sep 17 00:00:00 2001 From: Thorn Walli Date: Sat, 22 Feb 2025 10:29:34 +0100 Subject: [PATCH 1/2] fix(typescript): renamed types --- docs/src/components/content-container.md | 2 +- docs/src/components/content-headline.md | 2 +- src/ContentContainer.ts | 10 +++++----- src/ContentHeadline.ts | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/src/components/content-container.md b/docs/src/components/content-container.md index f422328..3e28750 100644 --- a/docs/src/components/content-container.md +++ b/docs/src/components/content-container.md @@ -19,7 +19,7 @@ The appropriate HTML element for the page structure is determined based on the ` ## Properties ```ts -type Props = { +type ContentContainerProps = { tag?: string; rootTags?: string[]; contentTags?: string[]; diff --git a/docs/src/components/content-headline.md b/docs/src/components/content-headline.md index 8d2e44d..248c6f1 100644 --- a/docs/src/components/content-headline.md +++ b/docs/src/components/content-headline.md @@ -21,7 +21,7 @@ The deeper the nesting, the smaller the heading. ## Properties ```ts -type Props = { +type ContentHeadlineProps = { tag: string; debug: boolean; }; diff --git a/src/ContentContainer.ts b/src/ContentContainer.ts index bd502df..8d4c85d 100644 --- a/src/ContentContainer.ts +++ b/src/ContentContainer.ts @@ -1,7 +1,7 @@ import { defineComponent, h, inject, provide, type ComponentOptions } from 'vue'; import useContentContainer from './useContentContainer'; -export type Props = { +export type ContentContainerProps = { tag?: string; rootTags?: string[]; contentTags?: string[]; @@ -9,7 +9,7 @@ export type Props = { debug?: boolean; }; -export type Context = Props & { +export type ContentContainerContext = ContentContainerProps & { parentLevel: number; currentLevel: number; currentTag: string; @@ -46,13 +46,13 @@ const ContentContainer = defineComponent({ } }, - setup(props: Props) { + setup(props: ContentContainerProps) { const { parentLevel, currentLevel, currentTag } = useContentContainer(props); provide('semanticStructure_debug', props.debug); return { parentLevel, currentLevel, currentTag }; }, - render(this: Context & ComponentOptions) { + render(this: ContentContainerContext & ComponentOptions) { const { currentTag, parentLevel, currentLevel } = this; return h( @@ -73,7 +73,7 @@ const ContentContainer = defineComponent({ } }); -const getDebugAttrs = (context: Context) => { +const getDebugAttrs = (context: ContentContainerContext) => { if (context.debug) { return { 'data-current-tag': context.currentTag, diff --git a/src/ContentHeadline.ts b/src/ContentHeadline.ts index c537313..59427e1 100644 --- a/src/ContentHeadline.ts +++ b/src/ContentHeadline.ts @@ -1,12 +1,12 @@ import { defineComponent, h, inject, type ComponentOptions } from 'vue'; import useContentHeadline from './useContentHeadline'; -export type Props = { +export type ContentHeadlineProps = { tag: string; debug: boolean; }; -export type Context = Props & { +export type ContentHeadlineContext = ContentHeadlineProps & { parentLevel: number; currentLevel: number; currentTag: string; @@ -32,7 +32,7 @@ const ContentHeadline = defineComponent({ return { parentLevel, currentLevel, currentTag }; }, - render(this: Context & ComponentOptions) { + render(this: ContentHeadlineContext & ComponentOptions) { const { currentTag, currentLevel } = this; return h( currentTag, @@ -51,7 +51,7 @@ const ContentHeadline = defineComponent({ } }); -const getDebugAttrs = (context: Context) => { +const getDebugAttrs = (context: ContentHeadlineContext) => { if (context.debug) { return { 'data-current-tag': context.currentTag, From d521c4cecf4274f37c11dfaa8bbd430e6cf0f197 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 22 Feb 2025 09:31:24 +0000 Subject: [PATCH 2/2] chore(release): 1.0.2 [skip ci] ## [1.0.2](https://github.com/basics/vue-semantic-structure/compare/v1.0.1...v1.0.2) (2025-02-22) ### Bug Fixes * **typescript:** renamed types ([fe22a32](https://github.com/basics/vue-semantic-structure/commit/fe22a3262d9ddba4f0145286c15439810dcdc361)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2068033..d011cc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Project Changelog +## [1.0.2](https://github.com/basics/vue-semantic-structure/compare/v1.0.1...v1.0.2) (2025-02-22) + + +### Bug Fixes + +* **typescript:** renamed types ([fe22a32](https://github.com/basics/vue-semantic-structure/commit/fe22a3262d9ddba4f0145286c15439810dcdc361)) + ## [1.0.1](https://github.com/basics/vue-semantic-structure/compare/v1.0.0...v1.0.1) (2025-02-22) diff --git a/package-lock.json b/package-lock.json index 43df4f1..76ba06d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vue-semantic-structure", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vue-semantic-structure", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "19.7.1", diff --git a/package.json b/package.json index d80e491..0a610d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-semantic-structure", - "version": "1.0.1", + "version": "1.0.2", "description": "Helper for semantic HTML structure.", "homepage": "https://basics.github.io/vue-semantic-structure", "license": "MIT",