@dskripchenko/laravel-admin 1.52.0 → 1.53.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.
@@ -1,53 +0,0 @@
1
- export declare function escapeHtml(text: string): string;
2
- /** A heading met while rendering, for a table of contents. */
3
- export interface MarkdownHeading {
4
- level: number;
5
- /** The heading's plain text. */
6
- text: string;
7
- id: string;
8
- }
9
- /** Turns heading text into a unique anchor id; shared across the chunks of one document. */
10
- export type Slugger = (text: string) => string;
11
- export declare function createSlugger(): Slugger;
12
- export interface MarkdownOptions {
13
- /** Gives the headings anchor ids. */
14
- slugger?: Slugger | null;
15
- /** Called for every heading, in document order. */
16
- onHeading?: (heading: MarkdownHeading) => void;
17
- /**
18
- * The base relative links resolve against, the way a browser resolves them
19
- * against `<base href>`. Absolute, anchor and scheme links are left alone.
20
- */
21
- linkBase?: string | null;
22
- /** Drops a trailing `.md` from relative links resolved through linkBase. */
23
- stripMdExtension?: boolean;
24
- /** The base relative image paths resolve against. */
25
- imageBase?: string | null;
26
- /**
27
- * Opens relative and anchor links in place. By default every link opens in
28
- * a new tab, which suits a note in a form; a documentation page wants its
29
- * own links to navigate.
30
- */
31
- internalLinksInPlace?: boolean;
32
- }
33
- /**
34
- * Resolves an escaped relative URL against a base. The result is escaped
35
- * again; an absolute base keeps its origin, a path base yields a path.
36
- */
37
- export declare function resolveAgainst(escapedUrl: string, base: string, stripMd?: boolean): string;
38
- export declare function renderMarkdown(source: string | null | undefined, opts?: MarkdownOptions): string;
39
- /** A piece of a markdown document: text to render, or a top-level fenced code block. */
40
- export type MarkdownSegment = {
41
- kind: 'text';
42
- source: string;
43
- } | {
44
- kind: 'code';
45
- code: string;
46
- language: string;
47
- };
48
- /**
49
- * Splits a document at its top-level fenced code blocks, so that a caller can
50
- * draw the code with a real highlighter and the rest with renderMarkdown.
51
- * Fences inside block quotes stay in the text.
52
- */
53
- export declare function splitMarkdown(source: string | null | undefined): MarkdownSegment[];