@dskripchenko/ui 1.12.0 → 1.14.0
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/dist/components/Markdown/UidMarkdownLiveBlock.vue.d.ts +10 -0
- package/dist/components/Markdown/blockRenderers.d.ts +21 -0
- package/dist/components/Markdown/index.d.ts +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.mjs +627 -482
- package/dist/styles/all.css +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UidMarkdownBlockResult } from './blockRenderers.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
code: string;
|
|
4
|
+
language: string;
|
|
5
|
+
mount: NonNullable<UidMarkdownBlockResult['mount']>;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
8
|
+
el: HTMLDivElement;
|
|
9
|
+
}, HTMLDivElement>;
|
|
10
|
+
export default _default;
|
|
@@ -12,6 +12,27 @@ export interface UidMarkdownBlockResult {
|
|
|
12
12
|
html?: string;
|
|
13
13
|
/** Why the block could not be rendered; the block is then shown as code with this message. */
|
|
14
14
|
error?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A live block: the host's widget (an API console, a chart with controls)
|
|
17
|
+
* is mounted into the block's element instead of static markup. Return a
|
|
18
|
+
* handle or a cleanup function: `update` takes a changed source without
|
|
19
|
+
* remounting, `destroy` runs when the block goes away.
|
|
20
|
+
*/
|
|
21
|
+
mount?: (el: HTMLElement, ctx: UidMarkdownBlockMountContext) => UidMarkdownBlockMountHandle | (() => void) | void;
|
|
22
|
+
}
|
|
23
|
+
/** What a live block's `mount` is told. The contract is the WYSIWYG editor's too. */
|
|
24
|
+
export interface UidMarkdownBlockMountContext {
|
|
25
|
+
/** The block's source. */
|
|
26
|
+
code: string;
|
|
27
|
+
language: string;
|
|
28
|
+
/** Always false here: rendered markdown is read-only. */
|
|
29
|
+
editable: boolean;
|
|
30
|
+
/** Ignored here — rendered markdown has no source to write to. */
|
|
31
|
+
setCode(code: string): void;
|
|
32
|
+
}
|
|
33
|
+
export interface UidMarkdownBlockMountHandle {
|
|
34
|
+
update?(code: string): void;
|
|
35
|
+
destroy?(): void;
|
|
15
36
|
}
|
|
16
37
|
/**
|
|
17
38
|
* Renders a fenced code block of one language (```mermaid, ```chart, …)
|
|
@@ -3,4 +3,4 @@ export type { UidMarkdownProps } from './UidMarkdown.vue';
|
|
|
3
3
|
export { createSlugger, escapeHtml, renderMarkdown, resolveAgainst, splitMarkdown, } from './markdown.js';
|
|
4
4
|
export type { MarkdownHeading, MarkdownOptions, MarkdownSegment, Slugger, UidMarkdownCalloutKind, } from './markdown.js';
|
|
5
5
|
export { markdownBlockRenderersKey, provideMarkdownBlockRenderers, useMarkdownBlockRenderers, } from './blockRenderers.js';
|
|
6
|
-
export type { UidMarkdownBlockRenderer, UidMarkdownBlockRenderers, UidMarkdownBlockResult, } from './blockRenderers.js';
|
|
6
|
+
export type { UidMarkdownBlockRenderer, UidMarkdownBlockRenderers, UidMarkdownBlockResult, UidMarkdownBlockMountContext, UidMarkdownBlockMountHandle, } from './blockRenderers.js';
|