@mistweaverco/mdsvex-shiki 1.0.12
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.
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/index.cjs +13908 -0
- package/index.d.ts +31 -0
- package/index.js +13887 -0
- package/package.json +52 -0
- package/styles.css +120 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { BundledLanguage, BundledTheme, CodeToHastOptions } from 'shiki';
|
|
4
|
+
import { Action } from 'svelte/action';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Svelte action to enable copy button functionality for mdsvex-shiki code blocks.
|
|
8
|
+
* Apply this action to a container element that contains the code blocks.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```svelte
|
|
12
|
+
* <div use:copyAction>
|
|
13
|
+
* {@html content}
|
|
14
|
+
* </div>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const copyAction: Action<HTMLElement>;
|
|
18
|
+
export type HighlighterOptions = {
|
|
19
|
+
displayTitle?: boolean;
|
|
20
|
+
displayLanguage?: boolean;
|
|
21
|
+
disableCopyButton?: boolean;
|
|
22
|
+
shikiOptions?: Partial<CodeToHastOptions<BundledLanguage, BundledTheme>>;
|
|
23
|
+
};
|
|
24
|
+
export declare const defaultShikiOptions: Partial<CodeToHastOptions<BundledLanguage, BundledTheme>>;
|
|
25
|
+
export declare const mdsvexShiki: (config: HighlighterOptions) => Promise<(code: string, lang: string) => Promise<string>>;
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
mdsvexShiki as default,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export {};
|