Skip to content

Commit cf9c524

Browse files
* Fix exposed types
* Update docs * Reorganize
1 parent e00e6c4 commit cf9c524

23 files changed

+392
-308
lines changed

dist/plugin/VCodeBlock.vue.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Props } from '../types';
1+
import { Props } from '../plugin/types';
22
declare function copyCode(): void;
33
declare function runCode(): void;
44
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -70,16 +70,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
7070
codeBlockRadius: string;
7171
runTab: boolean;
7272
tabs: boolean;
73-
code: string | number | object | [];
74-
label: string;
7573
browserWindow: boolean;
7674
cssPath: string;
75+
code: string | number | object | [];
7776
copyButton: boolean;
7877
copyIcons: boolean;
7978
copyFailedText: string;
8079
copyText: string;
8180
copySuccessText: string;
8281
indent: number;
82+
label: string;
8383
lang: string;
8484
prismjs: boolean;
8585
prismPlugin: boolean;

dist/plugin/composables/classes.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UseCodeBlockClasses, UseCopyButtonClasses, UseIconClasses, UseLabelClasses, UseTabClasses } from '../../types';
1+
import { UseCodeBlockClasses, UseCopyButtonClasses, UseIconClasses, UseLabelClasses, UseTabClasses } from '../../plugin/types';
22
export declare const useCodeBlockClasses: UseCodeBlockClasses;
33
export declare const useCopyButtonClasses: UseCopyButtonClasses;
44
export declare const useIconClasses: UseIconClasses;

dist/plugin/composables/styles.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UseCodeTagStyles, UseHeaderStyles, UsePreTagStyles, UseTabGroupStyles } from '../../types';
1+
import { UseCodeTagStyles, UseHeaderStyles, UsePreTagStyles, UseTabGroupStyles } from '../../plugin/types';
22
export declare const useCodeTagStyles: UseCodeTagStyles;
33
export declare const useHeaderStyles: UseHeaderStyles;
44
export declare const usePreTagStyles: UsePreTagStyles;

dist/plugin/index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
export { default as VCodeBlock } from './VCodeBlock.vue';
1+
import type { App } from 'vue';
2+
import type { Props } from './types';
3+
import VCodeBlock from '../plugin/VCodeBlock.vue';
4+
export declare const codeBlockOptions: unique symbol;
5+
export declare function createVCodeBlock(options?: Props): (app: App) => void;
6+
export { VCodeBlock, };

dist/plugin/types/index.d.ts

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import { CSSProperties, MaybeRef } from 'vue';
2+
import VCodeBlock from '../VCodeBlock.vue';
3+
export * from '../index';
4+
export type UseTheme = MaybeRef<string | boolean>;
5+
export interface Props {
6+
browserWindow?: boolean;
7+
cssPath?: string | undefined;
8+
code?: object | [] | string | number;
9+
codeBlockRadius?: string;
10+
copyButton?: boolean;
11+
copyIcons?: boolean;
12+
copyTab?: boolean;
13+
copyFailedText?: string;
14+
copyText?: string;
15+
copySuccessText?: string;
16+
floatingTabs?: boolean;
17+
globalOptions?: boolean;
18+
height?: string | number;
19+
highlightjs?: boolean;
20+
indent?: number;
21+
label?: string;
22+
lang?: string;
23+
languages?: string[];
24+
maxHeight?: string | number;
25+
persistentCopyButton?: boolean;
26+
prismjs?: boolean;
27+
prismPlugin?: boolean;
28+
runTab?: boolean;
29+
runText?: string;
30+
tabGap?: string | number;
31+
tabs?: boolean;
32+
theme?: string | boolean;
33+
}
34+
export interface UseCodeBlockClasses {
35+
(options: {
36+
isMobile: MaybeRef<boolean>;
37+
isPrism: MaybeRef<boolean>;
38+
}): object;
39+
}
40+
export interface UseCopyButtonClasses {
41+
(options: {
42+
copyStatus: MaybeRef<string>;
43+
isMobile: MaybeRef<boolean>;
44+
persistentCopyButton: MaybeRef<Props['persistentCopyButton']>;
45+
}): object;
46+
}
47+
export interface UseIconClasses {
48+
(options: {
49+
copyStatus: MaybeRef<string>;
50+
highlightjs: MaybeRef<Props['highlightjs']>;
51+
useTheme: UseTheme;
52+
}): object;
53+
}
54+
export interface UseLabelClasses {
55+
(options: {
56+
isMobile: MaybeRef<boolean>;
57+
}): object;
58+
}
59+
export interface UseTabClasses {
60+
(options: {
61+
highlightjs: MaybeRef<Props['highlightjs']>;
62+
useTheme: UseTheme;
63+
}): object;
64+
}
65+
export interface UseCodeTagStyles {
66+
(options: {
67+
isLoading: MaybeRef<boolean>;
68+
useTheme: UseTheme;
69+
}): CSSProperties;
70+
}
71+
export interface UseHeaderStyles {
72+
(options: {
73+
floatingTabs: MaybeRef<Props['floatingTabs']>;
74+
tabGap: MaybeRef<Props['tabGap']>;
75+
}): CSSProperties;
76+
}
77+
export interface UsePreTagStyles {
78+
(options: {
79+
copyTab: MaybeRef<Props['copyTab']>;
80+
height: MaybeRef<Props['height']>;
81+
maxHeight: MaybeRef<Props['maxHeight']>;
82+
radius: MaybeRef<Props['codeBlockRadius']>;
83+
runTab: MaybeRef<Props['runTab']>;
84+
tabs: MaybeRef<Props['tabs']>;
85+
useTheme: UseTheme;
86+
}): CSSProperties;
87+
}
88+
export interface UseTabGroupStyles {
89+
(options: {
90+
tabGap: MaybeRef<Props['tabGap']>;
91+
}): CSSProperties;
92+
}
93+
declare module "vue" {
94+
interface ComponentCustomProperties {
95+
}
96+
interface GlobalComponents {
97+
VCodeBlock: typeof VCodeBlock;
98+
}
99+
}

dist/types/index.d.ts

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1 @@
1-
import { CSSProperties, MaybeRef } from 'vue';
2-
export type UseTheme = MaybeRef<string | boolean>;
3-
export interface Props {
4-
browserWindow?: boolean;
5-
cssPath?: string | undefined;
6-
code?: object | [] | string | number;
7-
codeBlockRadius?: string;
8-
copyButton?: boolean;
9-
copyIcons?: boolean;
10-
copyTab?: boolean;
11-
copyFailedText?: string;
12-
copyText?: string;
13-
copySuccessText?: string;
14-
floatingTabs?: boolean;
15-
globalOptions?: boolean;
16-
height?: string | number;
17-
highlightjs?: boolean;
18-
indent?: number;
19-
label?: string;
20-
lang?: string;
21-
languages?: string[];
22-
maxHeight?: string | number;
23-
persistentCopyButton?: boolean;
24-
prismjs?: boolean;
25-
prismPlugin?: boolean;
26-
runTab?: boolean;
27-
runText?: string;
28-
tabGap?: string | number;
29-
tabs?: boolean;
30-
theme?: string | boolean;
31-
}
32-
export interface UseCodeBlockClasses {
33-
(options: {
34-
isMobile: MaybeRef<boolean>;
35-
isPrism: MaybeRef<boolean>;
36-
}): object;
37-
}
38-
export interface UseCopyButtonClasses {
39-
(options: {
40-
copyStatus: MaybeRef<string>;
41-
isMobile: MaybeRef<boolean>;
42-
persistentCopyButton: MaybeRef<Props['persistentCopyButton']>;
43-
}): object;
44-
}
45-
export interface UseIconClasses {
46-
(options: {
47-
copyStatus: MaybeRef<string>;
48-
highlightjs: MaybeRef<Props['highlightjs']>;
49-
useTheme: UseTheme;
50-
}): object;
51-
}
52-
export interface UseLabelClasses {
53-
(options: {
54-
isMobile: MaybeRef<boolean>;
55-
}): object;
56-
}
57-
export interface UseTabClasses {
58-
(options: {
59-
highlightjs: MaybeRef<Props['highlightjs']>;
60-
useTheme: UseTheme;
61-
}): object;
62-
}
63-
export interface UseCodeTagStyles {
64-
(options: {
65-
isLoading: MaybeRef<boolean>;
66-
useTheme: UseTheme;
67-
}): CSSProperties;
68-
}
69-
export interface UseHeaderStyles {
70-
(options: {
71-
floatingTabs: MaybeRef<Props['floatingTabs']>;
72-
tabGap: MaybeRef<Props['tabGap']>;
73-
}): CSSProperties;
74-
}
75-
export interface UsePreTagStyles {
76-
(options: {
77-
copyTab: MaybeRef<Props['copyTab']>;
78-
height: MaybeRef<Props['height']>;
79-
maxHeight: MaybeRef<Props['maxHeight']>;
80-
radius: MaybeRef<Props['codeBlockRadius']>;
81-
runTab: MaybeRef<Props['runTab']>;
82-
tabs: MaybeRef<Props['tabs']>;
83-
useTheme: UseTheme;
84-
}): CSSProperties;
85-
}
86-
export interface UseTabGroupStyles {
87-
(options: {
88-
tabGap: MaybeRef<Props['tabGap']>;
89-
}): CSSProperties;
90-
}
1+
export * from '../plugin/index'

0 commit comments

Comments
 (0)