Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit ef20b95

Browse files
Merge pull request #26 from webdevnerdstuff/issue-24
Issue 24
2 parents a8423a5 + 7b66589 commit ef20b95

File tree

13 files changed

+2067
-2079
lines changed

13 files changed

+2067
-2079
lines changed

CHANGELOG.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# Change Log
22
All notable changes to the "vue3-code-block" plugin will be documented in this file.
33

4+
## v2.2.13
5+
11-09-2023
6+
[main] (@webdevnerdstuff)
7+
* Add `cssPath` prop to component to allow for custom css file path to be used.
8+
* Update packages.
9+
410
## v2.2.11
5-
2023-06-11
11+
06-11-2023
612
[main] (@webdevnerdstuff)
713
* Changing Highlight.js to include all languages by default.
814
* Unfortunately, adding additional languages was not working as expected, so this is the best solution I can think of for now.
915
* Updated typings for Props as well as composables.
1016
* Changing compiling to use a Vite config instead of rollup so d.ts file aliases resolve correctly.
1117

1218
## v2.1.1
13-
2023-04-16
19+
04-16-2023
1420
[main] (@webdevnerdstuff)
1521
* Changing importing of css/scss/sass to use @use instead of @import.
1622

1723
## v2.1.0
18-
2023-04-16
24+
04-16-2023
1925
[main] (@webdevnerdstuff)
2026
* Changing component to use the min version of the default themes.
2127
* Reorganizing default themes to new location.
@@ -25,21 +31,21 @@ All notable changes to the "vue3-code-block" plugin will be documented in this f
2531
* Adding sass scripts to package.json to compile scss files to css.
2632

2733
## v2.0.1 - v2.0.6
28-
2023-04-15
34+
04-15-2023
2935
[main] (@webdevnerdstuff)
3036
* Minor changes to fix issues after testing npm packaging.
3137

3238
## v2.0.0
33-
2023-04-15
39+
04-15-2023
3440
[main] (@webdevnerdstuff)
3541
* Major release update. Added in support to use either PrismJS or HighlightJS.
3642

3743
## v1.0.15
38-
2023-04-02
44+
04-02-2023
3945
[main] (@webdevnerdstuff)
4046
* Minor changes to fix issues after testing npm packaging.
4147

4248
## v1.0.0
43-
2023-03-16
49+
03-16-2023
4450
[main] (@webdevnerdstuff)
4551
* Initial release

dist/plugin/CodeBlock.vue.d.ts

+76-208
Original file line numberDiff line numberDiff line change
@@ -1,210 +1,60 @@
1-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2-
persistentCopyButton: {
3-
type: globalThis.PropType<boolean>;
4-
default: boolean;
5-
};
6-
highlightjs: {
7-
type: globalThis.PropType<boolean>;
8-
default: boolean;
9-
};
10-
floatingTabs: {
11-
type: globalThis.PropType<boolean>;
12-
default: boolean;
13-
};
14-
tabGap: {
15-
type: globalThis.PropType<string | number>;
16-
default: string;
17-
};
18-
copyTab: {
19-
type: globalThis.PropType<boolean>;
20-
default: boolean;
21-
};
22-
height: {
23-
type: globalThis.PropType<string | number>;
24-
default: string;
25-
};
26-
maxHeight: {
27-
type: globalThis.PropType<string | number>;
28-
default: string;
29-
};
30-
codeBlockRadius: {
31-
type: globalThis.PropType<string>;
32-
default: string;
33-
};
34-
runTab: {
35-
type: globalThis.PropType<boolean>;
36-
default: boolean;
37-
};
38-
tabs: {
39-
type: globalThis.PropType<boolean>;
40-
default: boolean;
41-
};
42-
code: {
43-
type: globalThis.PropType<string | number | object | []>;
44-
default: string;
45-
};
46-
label: {
47-
type: globalThis.PropType<string>;
48-
default: string;
49-
};
50-
lang: {
51-
type: globalThis.PropType<string>;
52-
default: string;
53-
};
54-
browserWindow: {
55-
type: globalThis.PropType<boolean>;
56-
default: boolean;
57-
};
58-
copyButton: {
59-
type: globalThis.PropType<boolean>;
60-
default: boolean;
61-
};
62-
copyIcons: {
63-
type: globalThis.PropType<boolean>;
64-
default: boolean;
65-
};
66-
copyFailedText: {
67-
type: globalThis.PropType<string>;
68-
default: string;
69-
};
70-
copyText: {
71-
type: globalThis.PropType<string>;
72-
default: string;
73-
};
74-
copySuccessText: {
75-
type: globalThis.PropType<string>;
76-
default: string;
77-
};
78-
globalOptions: {
79-
type: globalThis.PropType<boolean>;
80-
};
81-
indent: {
82-
type: globalThis.PropType<number>;
83-
default: number;
84-
};
85-
languages: {
86-
type: globalThis.PropType<string[]>;
87-
};
88-
prismjs: {
89-
type: globalThis.PropType<boolean>;
90-
default: boolean;
91-
};
92-
prismPlugin: {
93-
type: globalThis.PropType<boolean>;
94-
default: boolean;
95-
};
96-
runText: {
97-
type: globalThis.PropType<string>;
98-
default: string;
99-
};
100-
theme: {
101-
type: globalThis.PropType<string | boolean>;
102-
default: string;
103-
};
104-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("run" | "update:copy-status")[], "run" | "update:copy-status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
105-
persistentCopyButton: {
106-
type: globalThis.PropType<boolean>;
107-
default: boolean;
108-
};
109-
highlightjs: {
110-
type: globalThis.PropType<boolean>;
111-
default: boolean;
112-
};
113-
floatingTabs: {
114-
type: globalThis.PropType<boolean>;
115-
default: boolean;
116-
};
117-
tabGap: {
118-
type: globalThis.PropType<string | number>;
119-
default: string;
120-
};
121-
copyTab: {
122-
type: globalThis.PropType<boolean>;
123-
default: boolean;
124-
};
125-
height: {
126-
type: globalThis.PropType<string | number>;
127-
default: string;
128-
};
129-
maxHeight: {
130-
type: globalThis.PropType<string | number>;
131-
default: string;
132-
};
133-
codeBlockRadius: {
134-
type: globalThis.PropType<string>;
135-
default: string;
136-
};
137-
runTab: {
138-
type: globalThis.PropType<boolean>;
139-
default: boolean;
140-
};
141-
tabs: {
142-
type: globalThis.PropType<boolean>;
143-
default: boolean;
144-
};
145-
code: {
146-
type: globalThis.PropType<string | number | object | []>;
147-
default: string;
148-
};
149-
label: {
150-
type: globalThis.PropType<string>;
151-
default: string;
152-
};
153-
lang: {
154-
type: globalThis.PropType<string>;
155-
default: string;
156-
};
157-
browserWindow: {
158-
type: globalThis.PropType<boolean>;
159-
default: boolean;
160-
};
161-
copyButton: {
162-
type: globalThis.PropType<boolean>;
163-
default: boolean;
164-
};
165-
copyIcons: {
166-
type: globalThis.PropType<boolean>;
167-
default: boolean;
168-
};
169-
copyFailedText: {
170-
type: globalThis.PropType<string>;
171-
default: string;
172-
};
173-
copyText: {
174-
type: globalThis.PropType<string>;
175-
default: string;
176-
};
177-
copySuccessText: {
178-
type: globalThis.PropType<string>;
179-
default: string;
180-
};
181-
globalOptions: {
182-
type: globalThis.PropType<boolean>;
183-
};
184-
indent: {
185-
type: globalThis.PropType<number>;
186-
default: number;
187-
};
188-
languages: {
189-
type: globalThis.PropType<string[]>;
190-
};
191-
prismjs: {
192-
type: globalThis.PropType<boolean>;
193-
default: boolean;
194-
};
195-
prismPlugin: {
196-
type: globalThis.PropType<boolean>;
197-
default: boolean;
198-
};
199-
runText: {
200-
type: globalThis.PropType<string>;
201-
default: string;
202-
};
203-
theme: {
204-
type: globalThis.PropType<string | boolean>;
205-
default: string;
206-
};
207-
}>> & {
1+
import { Props } from '../types';
2+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
3+
browserWindow: boolean;
4+
cssPath: undefined;
5+
code: string;
6+
codeBlockRadius: string;
7+
copyButton: boolean;
8+
copyIcons: boolean;
9+
copyTab: boolean;
10+
copyFailedText: string;
11+
copyText: string;
12+
copySuccessText: string;
13+
floatingTabs: boolean;
14+
height: string;
15+
highlightjs: boolean;
16+
indent: number;
17+
label: string;
18+
lang: string;
19+
maxHeight: string;
20+
persistentCopyButton: boolean;
21+
prismjs: boolean;
22+
prismPlugin: boolean;
23+
runTab: boolean;
24+
runText: string;
25+
tabGap: string;
26+
tabs: boolean;
27+
theme: string;
28+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29+
run: (...args: any[]) => void;
30+
"update:copy-status": (...args: any[]) => void;
31+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
32+
browserWindow: boolean;
33+
cssPath: undefined;
34+
code: string;
35+
codeBlockRadius: string;
36+
copyButton: boolean;
37+
copyIcons: boolean;
38+
copyTab: boolean;
39+
copyFailedText: string;
40+
copyText: string;
41+
copySuccessText: string;
42+
floatingTabs: boolean;
43+
height: string;
44+
highlightjs: boolean;
45+
indent: number;
46+
label: string;
47+
lang: string;
48+
maxHeight: string;
49+
persistentCopyButton: boolean;
50+
prismjs: boolean;
51+
prismPlugin: boolean;
52+
runTab: boolean;
53+
runText: string;
54+
tabGap: string;
55+
tabs: boolean;
56+
theme: string;
57+
}>>> & {
20858
onRun?: ((...args: any[]) => any) | undefined;
20959
"onUpdate:copy-status"?: ((...args: any[]) => any) | undefined;
21060
}, {
@@ -220,14 +70,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
22070
tabs: boolean;
22171
code: string | number | object | [];
22272
label: string;
223-
lang: string;
22473
browserWindow: boolean;
74+
cssPath: string;
22575
copyButton: boolean;
22676
copyIcons: boolean;
22777
copyFailedText: string;
22878
copyText: string;
22979
copySuccessText: string;
23080
indent: number;
81+
lang: string;
23182
prismjs: boolean;
23283
prismPlugin: boolean;
23384
runText: string;
@@ -238,6 +89,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
23889
copyButton?(_: {}): any;
23990
}>;
24091
export default _default;
92+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
93+
type __VLS_TypePropsToRuntimeProps<T> = {
94+
[K in keyof T]-?: {} extends Pick<T, K> ? {
95+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
96+
} : {
97+
type: import('vue').PropType<T[K]>;
98+
required: true;
99+
};
100+
};
101+
type __VLS_WithDefaults<P, D> = {
102+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
103+
default: D[K];
104+
}> : P[K];
105+
};
106+
type __VLS_Prettify<T> = {
107+
[K in keyof T]: T[K];
108+
} & {};
241109
type __VLS_WithTemplateSlots<T, S> = T & {
242110
new (): {
243111
$slots: S;

dist/plugin/utils/props.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export declare const AllProps: {
22
browserWindow: boolean;
3+
cssPath: undefined;
34
code: string;
45
codeBlockRadius: string;
56
copyButton: boolean;

dist/types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { CSSProperties, MaybeRef } from 'vue';
22
export type UseTheme = MaybeRef<string | boolean>;
33
export interface Props {
44
browserWindow?: boolean;
5+
cssPath?: string | undefined;
56
code?: object | [] | string | number;
67
codeBlockRadius?: string;
78
copyButton?: boolean;

0 commit comments

Comments
 (0)