@fuzdev/fuz_ui 0.204.0 → 0.205.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/ApiModule.svelte +14 -1
- package/dist/ApiModule.svelte.d.ts.map +1 -1
- package/dist/DeclarationDetail.svelte +15 -4
- package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
- package/package.json +12 -36
- package/dist/Mdz.svelte +0 -34
- package/dist/Mdz.svelte.d.ts +0 -11
- package/dist/Mdz.svelte.d.ts.map +0 -1
- package/dist/MdzNodeView.svelte +0 -107
- package/dist/MdzNodeView.svelte.d.ts +0 -9
- package/dist/MdzNodeView.svelte.d.ts.map +0 -1
- package/dist/MdzPrecompiled.svelte +0 -30
- package/dist/MdzPrecompiled.svelte.d.ts +0 -11
- package/dist/MdzPrecompiled.svelte.d.ts.map +0 -1
- package/dist/MdzRoot.svelte +0 -30
- package/dist/MdzRoot.svelte.d.ts +0 -12
- package/dist/MdzRoot.svelte.d.ts.map +0 -1
- package/dist/MdzStream.svelte +0 -32
- package/dist/MdzStream.svelte.d.ts +0 -12
- package/dist/MdzStream.svelte.d.ts.map +0 -1
- package/dist/MdzStreamNodeView.svelte +0 -106
- package/dist/MdzStreamNodeView.svelte.d.ts +0 -9
- package/dist/MdzStreamNodeView.svelte.d.ts.map +0 -1
- package/dist/mdz.d.ts +0 -112
- package/dist/mdz.d.ts.map +0 -1
- package/dist/mdz.js +0 -1186
- package/dist/mdz_components.d.ts +0 -63
- package/dist/mdz_components.d.ts.map +0 -1
- package/dist/mdz_components.js +0 -32
- package/dist/mdz_helpers.d.ts +0 -164
- package/dist/mdz_helpers.d.ts.map +0 -1
- package/dist/mdz_helpers.js +0 -424
- package/dist/mdz_lexer.d.ts +0 -93
- package/dist/mdz_lexer.d.ts.map +0 -1
- package/dist/mdz_lexer.js +0 -732
- package/dist/mdz_opcodes.d.ts +0 -174
- package/dist/mdz_opcodes.d.ts.map +0 -1
- package/dist/mdz_opcodes.js +0 -14
- package/dist/mdz_opcodes_to_nodes.d.ts +0 -20
- package/dist/mdz_opcodes_to_nodes.d.ts.map +0 -1
- package/dist/mdz_opcodes_to_nodes.js +0 -332
- package/dist/mdz_stream_parser.d.ts +0 -80
- package/dist/mdz_stream_parser.d.ts.map +0 -1
- package/dist/mdz_stream_parser.js +0 -354
- package/dist/mdz_stream_parser_block.d.ts +0 -76
- package/dist/mdz_stream_parser_block.d.ts.map +0 -1
- package/dist/mdz_stream_parser_block.js +0 -458
- package/dist/mdz_stream_parser_inline.d.ts +0 -52
- package/dist/mdz_stream_parser_inline.d.ts.map +0 -1
- package/dist/mdz_stream_parser_inline.js +0 -378
- package/dist/mdz_stream_parser_link.d.ts +0 -22
- package/dist/mdz_stream_parser_link.d.ts.map +0 -1
- package/dist/mdz_stream_parser_link.js +0 -215
- package/dist/mdz_stream_parser_state.d.ts +0 -187
- package/dist/mdz_stream_parser_state.d.ts.map +0 -1
- package/dist/mdz_stream_parser_state.js +0 -398
- package/dist/mdz_stream_parser_text.d.ts +0 -14
- package/dist/mdz_stream_parser_text.d.ts.map +0 -1
- package/dist/mdz_stream_parser_text.js +0 -50
- package/dist/mdz_stream_parser_url.d.ts +0 -60
- package/dist/mdz_stream_parser_url.d.ts.map +0 -1
- package/dist/mdz_stream_parser_url.js +0 -307
- package/dist/mdz_stream_state.svelte.d.ts +0 -44
- package/dist/mdz_stream_state.svelte.d.ts.map +0 -1
- package/dist/mdz_stream_state.svelte.js +0 -357
- package/dist/mdz_to_svelte.d.ts +0 -41
- package/dist/mdz_to_svelte.d.ts.map +0 -1
- package/dist/mdz_to_svelte.js +0 -100
- package/dist/mdz_token_parser.d.ts +0 -14
- package/dist/mdz_token_parser.d.ts.map +0 -1
- package/dist/mdz_token_parser.js +0 -344
- package/dist/svelte_preprocess_mdz.d.ts +0 -65
- package/dist/svelte_preprocess_mdz.d.ts.map +0 -1
- package/dist/svelte_preprocess_mdz.js +0 -529
- package/dist/tsdoc_mdz.d.ts +0 -45
- package/dist/tsdoc_mdz.d.ts.map +0 -1
- package/dist/tsdoc_mdz.js +0 -88
- package/src/lib/mdz.ts +0 -1532
- package/src/lib/mdz_components.ts +0 -64
- package/src/lib/mdz_helpers.ts +0 -449
- package/src/lib/mdz_lexer.ts +0 -1012
- package/src/lib/mdz_opcodes.ts +0 -205
- package/src/lib/mdz_opcodes_to_nodes.ts +0 -375
- package/src/lib/mdz_stream_parser.ts +0 -415
- package/src/lib/mdz_stream_parser_block.ts +0 -532
- package/src/lib/mdz_stream_parser_inline.ts +0 -414
- package/src/lib/mdz_stream_parser_link.ts +0 -271
- package/src/lib/mdz_stream_parser_state.ts +0 -539
- package/src/lib/mdz_stream_parser_text.ts +0 -77
- package/src/lib/mdz_stream_parser_url.ts +0 -365
- package/src/lib/mdz_stream_state.svelte.ts +0 -387
- package/src/lib/mdz_to_svelte.ts +0 -141
- package/src/lib/mdz_token_parser.ts +0 -434
- package/src/lib/svelte_preprocess_mdz.ts +0 -742
- package/src/lib/tsdoc_mdz.ts +0 -97
package/dist/mdz_components.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { Component } from 'svelte';
|
|
2
|
-
/**
|
|
3
|
-
* Component registry for custom Svelte components that can be used in mdz content.
|
|
4
|
-
*
|
|
5
|
-
* For example, registering 'Alert' allows using `<Alert>...</Alert>` in mdz content.
|
|
6
|
-
*
|
|
7
|
-
* The Map values are the Svelte component constructors.
|
|
8
|
-
*/
|
|
9
|
-
export type MdzComponents = Map<string, Component<any, any>>;
|
|
10
|
-
/**
|
|
11
|
-
* Element registry for HTML elements that can be used in mdz content.
|
|
12
|
-
*
|
|
13
|
-
* For example, registering 'div' allows using `<div>...</div>` in mdz content.
|
|
14
|
-
*
|
|
15
|
-
* The Map values are boolean placeholders for future configuration options.
|
|
16
|
-
*/
|
|
17
|
-
export type MdzElements = Map<string, boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Context for providing custom mdz components via a getter function.
|
|
20
|
-
* Set to a getter (e.g., `() => components`) so changes are reflected reactively.
|
|
21
|
-
*/
|
|
22
|
-
export declare const mdz_components_context: {
|
|
23
|
-
get: (error_message?: string) => () => MdzComponents | undefined;
|
|
24
|
-
get_maybe: () => (() => MdzComponents | undefined) | undefined;
|
|
25
|
-
set: (value: () => MdzComponents | undefined) => () => MdzComponents | undefined;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Context for providing allowed HTML elements via a getter function.
|
|
29
|
-
* Set to a getter (e.g., `() => elements`) so changes are reflected reactively.
|
|
30
|
-
* By default, no HTML elements are allowed.
|
|
31
|
-
*/
|
|
32
|
-
export declare const mdz_elements_context: {
|
|
33
|
-
get: (error_message?: string) => () => MdzElements | undefined;
|
|
34
|
-
get_maybe: () => (() => MdzElements | undefined) | undefined;
|
|
35
|
-
set: (value: () => MdzElements | undefined) => () => MdzElements | undefined;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Context for providing a base path getter for resolving relative links in mdz content.
|
|
39
|
-
* Set to a getter (e.g., `() => base`) so changes to the base prop are reflected
|
|
40
|
-
* without needing an effect. When the getter returns a path like `'/docs/mdz/'`,
|
|
41
|
-
* relative paths like `./grammar` resolve to `/docs/mdz/grammar` before rendering.
|
|
42
|
-
* When not set, relative paths use raw hrefs (browser resolves them).
|
|
43
|
-
*/
|
|
44
|
-
export declare const mdz_base_context: {
|
|
45
|
-
get: (error_message?: string) => () => string | undefined;
|
|
46
|
-
get_maybe: () => (() => string | undefined) | undefined;
|
|
47
|
-
set: (value: () => string | undefined) => () => string | undefined;
|
|
48
|
-
};
|
|
49
|
-
interface MdzGetterContext<T> {
|
|
50
|
-
get_maybe(): (() => T | undefined) | undefined;
|
|
51
|
-
set(value: () => T | undefined): unknown;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Set an mdz context to a getter that prefers the local `value_fn` and falls
|
|
55
|
-
* back to the ancestor's value when `value_fn()` returns `undefined`.
|
|
56
|
-
*
|
|
57
|
-
* Pass `value_fn` as a getter (not a snapshot) so prop changes remain reactive.
|
|
58
|
-
* The ancestor lookup happens once at component init — that's intentional, it
|
|
59
|
-
* captures the surrounding scope's context at mount time.
|
|
60
|
-
*/
|
|
61
|
-
export declare const set_mdz_context_with_fallback: <T>(context: MdzGetterContext<T>, value_fn: () => T | undefined) => void;
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=mdz_components.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mdz_components.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/mdz_components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAItC;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,sBAAsB;2CAAwB,aAAa,GAAG,SAAS;4BAAzB,aAAa,GAAG,SAAS;uBAAzB,aAAa,GAAG,SAAS,WAAzB,aAAa,GAAG,SAAS;CAAG,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;2CAAwB,WAAW,GAAG,SAAS;4BAAvB,WAAW,GAAG,SAAS;uBAAvB,WAAW,GAAG,SAAS,WAAvB,WAAW,GAAG,SAAS;CAAG,CAAC;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;2CAAwB,MAAM,GAAG,SAAS;4BAAlB,MAAM,GAAG,SAAS;uBAAlB,MAAM,GAAG,SAAS,WAAlB,MAAM,GAAG,SAAS;CAAG,CAAC;AAE3E,UAAU,gBAAgB,CAAC,CAAC;IAC3B,SAAS,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC/C,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GAAI,CAAC,EAC9C,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAC5B,UAAU,MAAM,CAAC,GAAG,SAAS,KAC3B,IAGF,CAAC"}
|
package/dist/mdz_components.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { create_context } from './context_helpers.js';
|
|
2
|
-
/**
|
|
3
|
-
* Context for providing custom mdz components via a getter function.
|
|
4
|
-
* Set to a getter (e.g., `() => components`) so changes are reflected reactively.
|
|
5
|
-
*/
|
|
6
|
-
export const mdz_components_context = create_context();
|
|
7
|
-
/**
|
|
8
|
-
* Context for providing allowed HTML elements via a getter function.
|
|
9
|
-
* Set to a getter (e.g., `() => elements`) so changes are reflected reactively.
|
|
10
|
-
* By default, no HTML elements are allowed.
|
|
11
|
-
*/
|
|
12
|
-
export const mdz_elements_context = create_context();
|
|
13
|
-
/**
|
|
14
|
-
* Context for providing a base path getter for resolving relative links in mdz content.
|
|
15
|
-
* Set to a getter (e.g., `() => base`) so changes to the base prop are reflected
|
|
16
|
-
* without needing an effect. When the getter returns a path like `'/docs/mdz/'`,
|
|
17
|
-
* relative paths like `./grammar` resolve to `/docs/mdz/grammar` before rendering.
|
|
18
|
-
* When not set, relative paths use raw hrefs (browser resolves them).
|
|
19
|
-
*/
|
|
20
|
-
export const mdz_base_context = create_context();
|
|
21
|
-
/**
|
|
22
|
-
* Set an mdz context to a getter that prefers the local `value_fn` and falls
|
|
23
|
-
* back to the ancestor's value when `value_fn()` returns `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* Pass `value_fn` as a getter (not a snapshot) so prop changes remain reactive.
|
|
26
|
-
* The ancestor lookup happens once at component init — that's intentional, it
|
|
27
|
-
* captures the surrounding scope's context at mount time.
|
|
28
|
-
*/
|
|
29
|
-
export const set_mdz_context_with_fallback = (context, value_fn) => {
|
|
30
|
-
const ancestor = context.get_maybe();
|
|
31
|
-
context.set(() => value_fn() ?? ancestor?.());
|
|
32
|
-
};
|
package/dist/mdz_helpers.d.ts
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared constants and pure helper functions for mdz parsers.
|
|
3
|
-
*
|
|
4
|
-
* Used by both the single-pass parser (`mdz.ts`) and the two-phase
|
|
5
|
-
* lexer+parser (`mdz_lexer.ts` + `mdz_token_parser.ts`).
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
import type { MdzNode, MdzComponentNode, MdzElementNode } from './mdz.js';
|
|
10
|
-
export declare const BACKTICK = 96;
|
|
11
|
-
export declare const ASTERISK = 42;
|
|
12
|
-
export declare const UNDERSCORE = 95;
|
|
13
|
-
export declare const TILDE = 126;
|
|
14
|
-
export declare const NEWLINE = 10;
|
|
15
|
-
export declare const HYPHEN = 45;
|
|
16
|
-
export declare const HASH = 35;
|
|
17
|
-
export declare const SPACE = 32;
|
|
18
|
-
export declare const TAB = 9;
|
|
19
|
-
export declare const LEFT_ANGLE = 60;
|
|
20
|
-
export declare const RIGHT_ANGLE = 62;
|
|
21
|
-
export declare const SLASH = 47;
|
|
22
|
-
export declare const LEFT_BRACKET = 91;
|
|
23
|
-
export declare const RIGHT_BRACKET = 93;
|
|
24
|
-
export declare const LEFT_PAREN = 40;
|
|
25
|
-
export declare const RIGHT_PAREN = 41;
|
|
26
|
-
export declare const COLON = 58;
|
|
27
|
-
export declare const PERIOD = 46;
|
|
28
|
-
export declare const COMMA = 44;
|
|
29
|
-
export declare const SEMICOLON = 59;
|
|
30
|
-
export declare const EXCLAMATION = 33;
|
|
31
|
-
export declare const QUESTION = 63;
|
|
32
|
-
export declare const DOLLAR = 36;
|
|
33
|
-
export declare const PERCENT = 37;
|
|
34
|
-
export declare const AMPERSAND = 38;
|
|
35
|
-
export declare const APOSTROPHE = 39;
|
|
36
|
-
export declare const PLUS = 43;
|
|
37
|
-
export declare const EQUALS = 61;
|
|
38
|
-
export declare const AT = 64;
|
|
39
|
-
export declare const A_UPPER = 65;
|
|
40
|
-
export declare const Z_UPPER = 90;
|
|
41
|
-
export declare const A_LOWER = 97;
|
|
42
|
-
export declare const Z_LOWER = 122;
|
|
43
|
-
export declare const ZERO = 48;
|
|
44
|
-
export declare const NINE = 57;
|
|
45
|
-
export declare const HR_HYPHEN_COUNT = 3;
|
|
46
|
-
export declare const MIN_CODEBLOCK_BACKTICKS = 3;
|
|
47
|
-
export declare const MAX_HEADING_LEVEL = 6;
|
|
48
|
-
export declare const HTTPS_PREFIX_LENGTH = 8;
|
|
49
|
-
export declare const HTTP_PREFIX_LENGTH = 7;
|
|
50
|
-
export declare const H_LOWER = 104;
|
|
51
|
-
export declare const H_UPPER = 72;
|
|
52
|
-
/**
|
|
53
|
-
* Lowercase an ASCII letter code; passes other chars through.
|
|
54
|
-
* Mirrors the `[A-Z] → [a-z]` shift without touching non-ASCII.
|
|
55
|
-
*/
|
|
56
|
-
export declare const ascii_to_lower: (char_code: number) => number;
|
|
57
|
-
/**
|
|
58
|
-
* Case-insensitive URL scheme prefix check. Returns the prefix length
|
|
59
|
-
* (8 for `https://`, 7 for `http://`) or 0 if neither matches at `pos`.
|
|
60
|
-
*
|
|
61
|
-
* URI schemes are case-insensitive per RFC 3986 §3.1, and mobile keyboards
|
|
62
|
-
* routinely auto-capitalize the first letter of a sentence, producing
|
|
63
|
-
* `Https://` etc. The original case is preserved in the emitted reference —
|
|
64
|
-
* browsers normalize schemes themselves.
|
|
65
|
-
*/
|
|
66
|
-
export declare const match_url_prefix_case_insensitive: (s: string, pos: number) => 0 | 7 | 8;
|
|
67
|
-
/**
|
|
68
|
-
* Check if character code is a letter (A-Z, a-z).
|
|
69
|
-
*/
|
|
70
|
-
export declare const is_letter: (char_code: number) => boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Check if character code is valid for tag name (letter, number, hyphen, underscore).
|
|
73
|
-
*/
|
|
74
|
-
export declare const is_tag_name_char: (char_code: number) => boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Check if character is part of a word for word boundary detection.
|
|
77
|
-
* Used to prevent intraword emphasis with `_` and `~` delimiters.
|
|
78
|
-
*
|
|
79
|
-
* Only alphanumeric characters (A-Z, a-z, 0-9) are word characters.
|
|
80
|
-
* Formatting delimiters (`*`, `_`, `~`) fall outside all three ranges,
|
|
81
|
-
* so they're naturally excluded without explicit checks.
|
|
82
|
-
*
|
|
83
|
-
* This prevents false positives with snake_case identifiers while allowing
|
|
84
|
-
* adjacent formatting like `**bold**_italic_`.
|
|
85
|
-
*/
|
|
86
|
-
export declare const is_word_char: (char_code: number) => boolean;
|
|
87
|
-
export declare const is_valid_path_char: (char_code: number) => boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Trim trailing punctuation from URL/path per RFC 3986 and GFM rules.
|
|
90
|
-
* - Trims simple trailing: .,;:!?]
|
|
91
|
-
* - Balanced logic for () only (valid in path components)
|
|
92
|
-
*
|
|
93
|
-
* Note on `]`: the mdz parsers (`mdz.ts`, `mdz_stream_parser_url.ts`,
|
|
94
|
-
* `mdz_lexer.ts`) scan URL/path chars through `is_valid_path_char`, which
|
|
95
|
-
* already rejects `]` — so it can never reach this function via parser flow.
|
|
96
|
-
* The `]` branch here is for external callers using this helper directly on
|
|
97
|
-
* arbitrary URL-ish input (it is part of the published `@fuzdev/fuz_ui`
|
|
98
|
-
* surface, see `mdz_helpers.test.ts` for direct coverage).
|
|
99
|
-
*
|
|
100
|
-
* Optimized to avoid O(n²) string slicing - tracks end index and slices once at the end.
|
|
101
|
-
*/
|
|
102
|
-
export declare const trim_trailing_punctuation: (url: string) => string;
|
|
103
|
-
/**
|
|
104
|
-
* Extract a single tag (component or element) if it's the only non-whitespace content.
|
|
105
|
-
* Returns the tag node if paragraph wrapping should be skipped (MDX convention),
|
|
106
|
-
* or null if the content should be wrapped in a paragraph.
|
|
107
|
-
*/
|
|
108
|
-
/**
|
|
109
|
-
* Check if position in text is the start of an absolute path (starts with `/`).
|
|
110
|
-
* Must be preceded by whitespace or be at the start of the string.
|
|
111
|
-
* Rejects `//` (comments/protocol-relative) and slash followed by whitespace.
|
|
112
|
-
*/
|
|
113
|
-
export declare const is_at_absolute_path: (text: string, index: number) => boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Check if position in text is the start of a relative path (`./` or `../`).
|
|
116
|
-
* Must be preceded by whitespace or be at the start of the string.
|
|
117
|
-
* Rejects prefix followed by whitespace, slash, or end of string.
|
|
118
|
-
*/
|
|
119
|
-
export declare const is_at_relative_path: (text: string, index: number) => boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Extracts plain text content from an array of mdz nodes, recursing into children.
|
|
122
|
-
*/
|
|
123
|
-
export declare const mdz_text_content: (nodes: Array<MdzNode>) => string;
|
|
124
|
-
/**
|
|
125
|
-
* Generates a lowercase slug id for a heading from its child nodes.
|
|
126
|
-
* Follows standard markdown conventions (GitHub, etc.) where heading IDs are lowercased.
|
|
127
|
-
* For case-preserving IDs (e.g. API declarations), see `docs_slugify` in `docs_helpers.svelte.ts`.
|
|
128
|
-
*/
|
|
129
|
-
export declare const mdz_heading_id: (nodes: Array<MdzNode>) => string;
|
|
130
|
-
/**
|
|
131
|
-
* Generates a lowercase slug id for a heading from plain text content.
|
|
132
|
-
* Used by the streaming parser which tracks text content directly
|
|
133
|
-
* rather than building `MdzNode[]` trees.
|
|
134
|
-
*/
|
|
135
|
-
export declare const mdz_heading_id_from_text: (text: string) => string;
|
|
136
|
-
export declare const mdz_is_url: (s: string) => boolean;
|
|
137
|
-
export declare const mdz_is_safe_reference: (reference: string) => boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Resolves a relative path (`./` or `../`) against a base path.
|
|
140
|
-
* The base is treated as a directory regardless of trailing slash
|
|
141
|
-
* (`'/docs/mdz'` and `'/docs/mdz/'` behave identically).
|
|
142
|
-
* Handles embedded `.` and `..` segments within the reference
|
|
143
|
-
* (e.g., `'./a/../b'` → navigates up then down).
|
|
144
|
-
* Clamps at root — excess `..` segments stop at `/` rather than escaping.
|
|
145
|
-
*
|
|
146
|
-
* @param reference - a relative path starting with `./` or `../`
|
|
147
|
-
* @param base - An absolute base path (e.g., `'/docs/mdz/'`). Empty string is treated as root.
|
|
148
|
-
* @returns an absolute resolved path (e.g., `'/docs/mdz/grammar'`)
|
|
149
|
-
*/
|
|
150
|
-
export declare const resolve_relative_path: (reference: string, base: string) => string;
|
|
151
|
-
/**
|
|
152
|
-
* Push a node into a children array, coalescing with the previous Text node.
|
|
153
|
-
* Mutates `prev.content` and `prev.end` when both are Text, avoiding array growth
|
|
154
|
-
* and an extra allocation. Callers must own `dest` and not retain references to
|
|
155
|
-
* the prior last element across the call.
|
|
156
|
-
*/
|
|
157
|
-
export declare const mdz_push_merging_text: (dest: Array<MdzNode>, node: MdzNode) => void;
|
|
158
|
-
/**
|
|
159
|
-
* Return a new array with adjacent Text nodes merged into single nodes.
|
|
160
|
-
* Fast path: returns the original array when no merging is needed.
|
|
161
|
-
*/
|
|
162
|
-
export declare const mdz_merge_adjacent_text: (nodes: Array<MdzNode>) => Array<MdzNode>;
|
|
163
|
-
export declare const extract_single_tag: (nodes: Array<MdzNode>) => MdzComponentNode | MdzElementNode | null;
|
|
164
|
-
//# sourceMappingURL=mdz_helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mdz_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/mdz_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,OAAO,EAAe,gBAAgB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAIrF,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,KAAK,MAAM,CAAC;AACzB,eAAO,MAAM,O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