@fuzdev/fuz_ui 0.198.1 → 0.200.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/ApiDeclarationList.svelte +2 -1
- package/dist/ApiDeclarationList.svelte.d.ts.map +1 -1
- package/dist/ApiIndex.svelte +2 -2
- package/dist/ApiModule.svelte +3 -3
- package/dist/DeclarationDetail.svelte +145 -90
- package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +14 -16
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/LibrarySummary.svelte +12 -12
- package/dist/Mdz.svelte +2 -2
- package/dist/MdzNodeView.svelte +8 -6
- package/dist/MdzNodeView.svelte.d.ts.map +1 -1
- package/dist/MdzRoot.svelte +30 -0
- package/dist/MdzRoot.svelte.d.ts +12 -0
- package/dist/MdzRoot.svelte.d.ts.map +1 -0
- package/dist/MdzStream.svelte +32 -0
- package/dist/MdzStream.svelte.d.ts +12 -0
- package/dist/MdzStream.svelte.d.ts.map +1 -0
- package/dist/MdzStreamNodeView.svelte +106 -0
- package/dist/MdzStreamNodeView.svelte.d.ts +9 -0
- package/dist/MdzStreamNodeView.svelte.d.ts.map +1 -0
- package/dist/ProjectLinks.svelte +1 -1
- package/dist/api_search.svelte.d.ts.map +1 -1
- package/dist/api_search.svelte.js +4 -2
- package/dist/declaration.svelte.d.ts +11 -0
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +15 -3
- package/dist/library.svelte.d.ts +9 -70
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library.svelte.js +24 -18
- package/dist/library_helpers.d.ts +3 -3
- package/dist/library_helpers.js +3 -3
- package/dist/mdz.d.ts.map +1 -1
- package/dist/mdz.js +37 -29
- package/dist/mdz_components.d.ts +37 -23
- package/dist/mdz_components.d.ts.map +1 -1
- package/dist/mdz_components.js +16 -4
- package/dist/mdz_helpers.d.ts +46 -14
- package/dist/mdz_helpers.d.ts.map +1 -1
- package/dist/mdz_helpers.js +189 -56
- package/dist/mdz_lexer.d.ts.map +1 -1
- package/dist/mdz_lexer.js +18 -22
- package/dist/mdz_opcodes.d.ts +174 -0
- package/dist/mdz_opcodes.d.ts.map +1 -0
- package/dist/mdz_opcodes.js +14 -0
- package/dist/mdz_opcodes_to_nodes.d.ts +20 -0
- package/dist/mdz_opcodes_to_nodes.d.ts.map +1 -0
- package/dist/mdz_opcodes_to_nodes.js +332 -0
- package/dist/mdz_stream_parser.d.ts +80 -0
- package/dist/mdz_stream_parser.d.ts.map +1 -0
- package/dist/mdz_stream_parser.js +354 -0
- package/dist/mdz_stream_parser_block.d.ts +76 -0
- package/dist/mdz_stream_parser_block.d.ts.map +1 -0
- package/dist/mdz_stream_parser_block.js +458 -0
- package/dist/mdz_stream_parser_inline.d.ts +52 -0
- package/dist/mdz_stream_parser_inline.d.ts.map +1 -0
- package/dist/mdz_stream_parser_inline.js +378 -0
- package/dist/mdz_stream_parser_link.d.ts +22 -0
- package/dist/mdz_stream_parser_link.d.ts.map +1 -0
- package/dist/mdz_stream_parser_link.js +215 -0
- package/dist/mdz_stream_parser_state.d.ts +187 -0
- package/dist/mdz_stream_parser_state.d.ts.map +1 -0
- package/dist/mdz_stream_parser_state.js +398 -0
- package/dist/mdz_stream_parser_text.d.ts +14 -0
- package/dist/mdz_stream_parser_text.d.ts.map +1 -0
- package/dist/mdz_stream_parser_text.js +50 -0
- package/dist/mdz_stream_parser_url.d.ts +60 -0
- package/dist/mdz_stream_parser_url.d.ts.map +1 -0
- package/dist/mdz_stream_parser_url.js +307 -0
- package/dist/mdz_stream_state.svelte.d.ts +44 -0
- package/dist/mdz_stream_state.svelte.d.ts.map +1 -0
- package/dist/mdz_stream_state.svelte.js +357 -0
- package/dist/mdz_token_parser.d.ts.map +1 -1
- package/dist/mdz_token_parser.js +8 -39
- package/dist/module.svelte.d.ts +2 -0
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +3 -1
- package/dist/site.svelte.d.ts +13 -0
- package/dist/site.svelte.d.ts.map +1 -1
- package/dist/site.svelte.js +8 -2
- package/dist/tsdoc_mdz.d.ts +2 -2
- package/dist/tsdoc_mdz.js +2 -2
- package/dist/vite_plugin_pkg_json.d.ts +63 -0
- package/dist/vite_plugin_pkg_json.d.ts.map +1 -0
- package/dist/vite_plugin_pkg_json.js +126 -0
- package/package.json +8 -7
- package/src/lib/api_search.svelte.ts +4 -2
- package/src/lib/declaration.svelte.ts +18 -3
- package/src/lib/library.svelte.ts +37 -20
- package/src/lib/library_helpers.ts +3 -3
- package/src/lib/mdz.ts +38 -29
- package/src/lib/mdz_components.ts +40 -19
- package/src/lib/mdz_helpers.ts +199 -56
- package/src/lib/mdz_lexer.ts +18 -20
- package/src/lib/mdz_opcodes.ts +205 -0
- package/src/lib/mdz_opcodes_to_nodes.ts +375 -0
- package/src/lib/mdz_stream_parser.ts +415 -0
- package/src/lib/mdz_stream_parser_block.ts +532 -0
- package/src/lib/mdz_stream_parser_inline.ts +414 -0
- package/src/lib/mdz_stream_parser_link.ts +271 -0
- package/src/lib/mdz_stream_parser_state.ts +539 -0
- package/src/lib/mdz_stream_parser_text.ts +77 -0
- package/src/lib/mdz_stream_parser_url.ts +365 -0
- package/src/lib/mdz_stream_state.svelte.ts +387 -0
- package/src/lib/mdz_token_parser.ts +13 -40
- package/src/lib/module.svelte.ts +5 -1
- package/src/lib/site.svelte.ts +17 -2
- package/src/lib/tsdoc_mdz.ts +2 -2
- package/src/lib/vite_plugin_pkg_json.ts +142 -0
- package/dist/package_helpers.d.ts +0 -150
- package/dist/package_helpers.d.ts.map +0 -1
- package/dist/package_helpers.js +0 -179
- package/src/lib/package_helpers.ts +0 -186
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
{:else}
|
|
25
25
|
{#each declarations as declaration (`${declaration.module_path}:${declaration.name}`)}
|
|
26
26
|
<TomeSection>
|
|
27
|
+
<!-- `text` drives the slug/anchor (bare name); display shows generics via `display_name` -->
|
|
27
28
|
<TomeSectionHeader text={declaration.name}>
|
|
28
|
-
<div class="word-break:break-all">{declaration.
|
|
29
|
+
<div class="word-break:break-all">{declaration.display_name}</div>
|
|
29
30
|
</TomeSectionHeader>
|
|
30
31
|
<article id={declaration.name}>
|
|
31
32
|
<DeclarationDetail {declaration} />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiDeclarationList.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ApiDeclarationList.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAKxD,KAAK,gBAAgB,GAAI;IACxB,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiDeclarationList.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ApiDeclarationList.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAKxD,KAAK,gBAAgB,GAAI;IACxB,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAqCH,QAAA,MAAM,kBAAkB,sDAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
package/dist/ApiIndex.svelte
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<svelte:head>
|
|
37
|
-
<title>API docs - {library.
|
|
37
|
+
<title>API docs - {library.pkg_json.name}</title>
|
|
38
38
|
</svelte:head>
|
|
39
39
|
|
|
40
40
|
<TomeContent {tome}>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</section>
|
|
45
45
|
{:else}
|
|
46
46
|
<section>
|
|
47
|
-
<p>{library.
|
|
47
|
+
<p>{library.pkg_json.description}</p>
|
|
48
48
|
|
|
49
49
|
{#if search.modules.all.length + search.declarations.all.length > 1}
|
|
50
50
|
<DocsSearch
|
package/dist/ApiModule.svelte
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<svelte:head>
|
|
57
|
-
<title>{module_name} - API docs - {library.
|
|
57
|
+
<title>{module_name} - API docs - {library.pkg_json.name}</title>
|
|
58
58
|
</svelte:head>
|
|
59
59
|
|
|
60
60
|
<TomeContent {tome}>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
</TomeSection>
|
|
116
116
|
|
|
117
117
|
<!-- Depends on section -->
|
|
118
|
-
{#if module.
|
|
118
|
+
{#if module.has_dependencies}
|
|
119
119
|
<TomeSection>
|
|
120
120
|
<TomeSectionHeader text="Depends on" />
|
|
121
121
|
<ul>
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
{/if}
|
|
130
130
|
|
|
131
131
|
<!-- Imported by section -->
|
|
132
|
-
{#if module.
|
|
132
|
+
{#if module.has_dependents}
|
|
133
133
|
<TomeSection>
|
|
134
134
|
<TomeSectionHeader text="Imported by" />
|
|
135
135
|
<ul>
|
|
@@ -11,6 +11,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
11
11
|
-->
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import Code from '@fuzdev/fuz_code/Code.svelte';
|
|
14
|
+
import type {ParameterJsonInput} from 'svelte-docinfo/types.js';
|
|
14
15
|
|
|
15
16
|
import type {Declaration} from './declaration.svelte.js';
|
|
16
17
|
import TypeLink from './TypeLink.svelte';
|
|
@@ -19,8 +20,90 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
19
20
|
import {tsdoc_see_to_mdz} from './tsdoc_mdz.js';
|
|
20
21
|
|
|
21
22
|
const {declaration}: {declaration: Declaration} = $props();
|
|
23
|
+
|
|
24
|
+
// Optional prose metadata shared by component props and nested members,
|
|
25
|
+
// rendered in a compact form (the top-level declaration uses prominent
|
|
26
|
+
// sections for the same fields instead).
|
|
27
|
+
interface DocExtras {
|
|
28
|
+
deprecatedMessage?: string;
|
|
29
|
+
since?: string;
|
|
30
|
+
examples?: Array<string>;
|
|
31
|
+
seeAlso?: Array<string>;
|
|
32
|
+
throws?: Array<{type?: string; description: string}>;
|
|
33
|
+
}
|
|
22
34
|
</script>
|
|
23
35
|
|
|
36
|
+
<!-- A single function/method parameter: name, description, type, and optional/default. -->
|
|
37
|
+
{#snippet param_detail(param: ParameterJsonInput)}
|
|
38
|
+
<section>
|
|
39
|
+
<h4>
|
|
40
|
+
<code
|
|
41
|
+
>{param.name}{#if param.optional}<strong>?</strong>{/if}</code
|
|
42
|
+
>
|
|
43
|
+
</h4>
|
|
44
|
+
{#if param.description}
|
|
45
|
+
<Mdz content={param.description} />
|
|
46
|
+
{/if}
|
|
47
|
+
<div class="row gap_md mb_sm">
|
|
48
|
+
<strong>type</strong>
|
|
49
|
+
<TypeLink type={param.type} />
|
|
50
|
+
</div>
|
|
51
|
+
{#if param.optional || param.defaultValue}
|
|
52
|
+
<div class="row gap_md">
|
|
53
|
+
{#if param.optional}
|
|
54
|
+
<strong>optional</strong>
|
|
55
|
+
{/if}
|
|
56
|
+
{#if param.defaultValue}
|
|
57
|
+
<strong>default</strong>
|
|
58
|
+
<Code lang="ts" content={param.defaultValue} />
|
|
59
|
+
{/if}
|
|
60
|
+
</div>
|
|
61
|
+
{/if}
|
|
62
|
+
</section>
|
|
63
|
+
{/snippet}
|
|
64
|
+
|
|
65
|
+
<!-- Compact prose metadata for props and members (deprecated, since, examples, see also, throws). -->
|
|
66
|
+
{#snippet doc_extras(item: DocExtras)}
|
|
67
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
68
|
+
{#if item.deprecatedMessage !== undefined}
|
|
69
|
+
<p class="row gap_md">
|
|
70
|
+
<span class="chip">⚠️ deprecated</span>
|
|
71
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
72
|
+
{#if item.deprecatedMessage}{item.deprecatedMessage}{/if}
|
|
73
|
+
</p>
|
|
74
|
+
{/if}
|
|
75
|
+
{#if item.since}
|
|
76
|
+
<p><strong>since</strong> {item.since}</p>
|
|
77
|
+
{/if}
|
|
78
|
+
{#if item.examples?.length}
|
|
79
|
+
{#each item.examples as example (example)}
|
|
80
|
+
<Mdz content={example} />
|
|
81
|
+
{/each}
|
|
82
|
+
{/if}
|
|
83
|
+
{#if item.seeAlso?.length}
|
|
84
|
+
<p><strong>see also</strong></p>
|
|
85
|
+
<ul>
|
|
86
|
+
{#each item.seeAlso as ref (ref)}
|
|
87
|
+
<li><Mdz content={tsdoc_see_to_mdz(ref)} /></li>
|
|
88
|
+
{/each}
|
|
89
|
+
</ul>
|
|
90
|
+
{/if}
|
|
91
|
+
{#if item.throws?.length}
|
|
92
|
+
<p><strong>throws</strong></p>
|
|
93
|
+
<ul>
|
|
94
|
+
{#each item.throws as thrown (thrown)}
|
|
95
|
+
<li>
|
|
96
|
+
{#if thrown.type}
|
|
97
|
+
<code>{thrown.type}</code> - {thrown.description}
|
|
98
|
+
{:else}
|
|
99
|
+
{thrown.description}
|
|
100
|
+
{/if}
|
|
101
|
+
</li>
|
|
102
|
+
{/each}
|
|
103
|
+
</ul>
|
|
104
|
+
{/if}
|
|
105
|
+
{/snippet}
|
|
106
|
+
|
|
24
107
|
<!-- Metadata -->
|
|
25
108
|
<p class="row justify-content:space-between">
|
|
26
109
|
<ModuleLink module_path={declaration.module_path} />
|
|
@@ -31,21 +114,37 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
31
114
|
</p>
|
|
32
115
|
|
|
33
116
|
<!-- chips -->
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
117
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
118
|
+
{#if declaration.is_deprecated || declaration.reactivity || declaration.accepts_children || declaration.alias_of}
|
|
119
|
+
<p class="row gap_md flex-wrap:wrap">
|
|
120
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
121
|
+
{#if declaration.is_deprecated}
|
|
122
|
+
<span class="chip">⚠️ deprecated</span>
|
|
123
|
+
{/if}
|
|
124
|
+
{#if declaration.reactivity}
|
|
125
|
+
<span class="chip">{declaration.reactivity}</span>
|
|
126
|
+
{/if}
|
|
127
|
+
{#if declaration.accepts_children}
|
|
128
|
+
<span class="chip">accepts children</span>
|
|
129
|
+
{/if}
|
|
130
|
+
{#if declaration.alias_of}
|
|
131
|
+
<span class="chip"
|
|
132
|
+
>alias of {declaration.alias_of.name}{#if declaration.alias_of.module}
|
|
133
|
+
in {declaration.alias_of.module}{/if}</span
|
|
134
|
+
>
|
|
135
|
+
{/if}
|
|
136
|
+
</p>
|
|
137
|
+
{/if}
|
|
138
|
+
|
|
139
|
+
<!-- also exported from -->
|
|
140
|
+
{#if declaration.also_exported_from?.length}
|
|
141
|
+
<p class="row gap_md flex-wrap:wrap">
|
|
142
|
+
<strong>also exported from</strong>
|
|
143
|
+
{#each declaration.also_exported_from as module_path (module_path)}
|
|
144
|
+
<ModuleLink {module_path} />
|
|
145
|
+
{/each}
|
|
146
|
+
</p>
|
|
147
|
+
{/if}
|
|
49
148
|
|
|
50
149
|
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
51
150
|
{#if declaration.deprecated_message}
|
|
@@ -60,6 +159,9 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
60
159
|
<Code lang="ts" content={declaration.type_signature} />
|
|
61
160
|
{/if}
|
|
62
161
|
|
|
162
|
+
<!-- import statement -->
|
|
163
|
+
<Code lang="ts" content={declaration.import_statement} />
|
|
164
|
+
|
|
63
165
|
<!-- documentation -->
|
|
64
166
|
{#if declaration.has_documentation}
|
|
65
167
|
<Mdz content={declaration.doc_comment!} />
|
|
@@ -69,31 +171,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
69
171
|
{#if declaration.parameters?.length}
|
|
70
172
|
<section>
|
|
71
173
|
{#each declaration.parameters as param (param)}
|
|
72
|
-
|
|
73
|
-
<h4>
|
|
74
|
-
<code
|
|
75
|
-
>{param.name}{#if param.optional}<strong>?</strong>{/if}</code
|
|
76
|
-
>
|
|
77
|
-
</h4>
|
|
78
|
-
{#if param.description}
|
|
79
|
-
<Mdz content={param.description} />
|
|
80
|
-
{/if}
|
|
81
|
-
<div class="row gap_md">
|
|
82
|
-
<strong>type</strong>
|
|
83
|
-
<TypeLink type={param.type} />
|
|
84
|
-
</div>
|
|
85
|
-
{#if param.optional || param.defaultValue}
|
|
86
|
-
<div class="row gap_md">
|
|
87
|
-
{#if param.optional}
|
|
88
|
-
<span class="chip">optional</span>
|
|
89
|
-
{/if}
|
|
90
|
-
{#if param.defaultValue}
|
|
91
|
-
<strong>default</strong>
|
|
92
|
-
<Code lang="ts" content={param.defaultValue} />
|
|
93
|
-
{/if}
|
|
94
|
-
</div>
|
|
95
|
-
{/if}
|
|
96
|
-
</section>
|
|
174
|
+
{@render param_detail(param)}
|
|
97
175
|
{/each}
|
|
98
176
|
</section>
|
|
99
177
|
{/if}
|
|
@@ -111,17 +189,17 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
111
189
|
{#if prop.description}
|
|
112
190
|
<Mdz content={prop.description} />
|
|
113
191
|
{/if}
|
|
114
|
-
<div class="row gap_md
|
|
192
|
+
<div class="row gap_md mb_sm">
|
|
115
193
|
<strong>type</strong>
|
|
116
194
|
<TypeLink type={prop.type} />
|
|
117
195
|
</div>
|
|
118
196
|
{#if prop.optional || prop.bindable || prop.defaultValue}
|
|
119
197
|
<div class="row gap_md">
|
|
120
198
|
{#if prop.optional}
|
|
121
|
-
<
|
|
199
|
+
<strong>optional</strong>
|
|
122
200
|
{/if}
|
|
123
201
|
{#if prop.bindable}
|
|
124
|
-
<
|
|
202
|
+
<strong>bindable</strong>
|
|
125
203
|
{/if}
|
|
126
204
|
{#if prop.defaultValue}
|
|
127
205
|
<strong>default</strong>
|
|
@@ -142,6 +220,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
142
220
|
{/each}
|
|
143
221
|
</section>
|
|
144
222
|
{/if}
|
|
223
|
+
{@render doc_extras(prop)}
|
|
145
224
|
</section>
|
|
146
225
|
{/each}
|
|
147
226
|
</section>
|
|
@@ -326,7 +405,12 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
326
405
|
<section>
|
|
327
406
|
{#each declaration.members as member (member)}
|
|
328
407
|
<section>
|
|
329
|
-
<h4
|
|
408
|
+
<h4>
|
|
409
|
+
<code
|
|
410
|
+
>{member.name}{#if member.kind !== 'constructor' && member.optional}<strong>?</strong
|
|
411
|
+
>{/if}</code
|
|
412
|
+
>
|
|
413
|
+
</h4>
|
|
330
414
|
{#if member.docComment}
|
|
331
415
|
<Mdz content={member.docComment} />
|
|
332
416
|
{/if}
|
|
@@ -340,42 +424,29 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
340
424
|
/>
|
|
341
425
|
</p>
|
|
342
426
|
{/if}
|
|
343
|
-
{#if member.modifiers?.length}
|
|
427
|
+
{#if member.modifiers?.length || (member.kind === 'variable' && member.reactivity)}
|
|
428
|
+
<div class="row gap_md flex-wrap:wrap">
|
|
429
|
+
{#if member.modifiers?.length}
|
|
430
|
+
{#each member.modifiers as modifier (modifier)}
|
|
431
|
+
<span class="chip">{modifier}</span>
|
|
432
|
+
{/each}
|
|
433
|
+
{/if}
|
|
434
|
+
{#if member.kind === 'variable' && member.reactivity}
|
|
435
|
+
<span class="chip">{member.reactivity}</span>
|
|
436
|
+
{/if}
|
|
437
|
+
</div>
|
|
438
|
+
{/if}
|
|
439
|
+
{#if member.kind === 'variable' && member.defaultValue}
|
|
344
440
|
<div class="row gap_md">
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
{/each}
|
|
441
|
+
<strong>default</strong>
|
|
442
|
+
<Code lang="ts" content={member.defaultValue} />
|
|
348
443
|
</div>
|
|
349
444
|
{/if}
|
|
350
445
|
<!-- parameters for methods and constructors -->
|
|
351
446
|
{#if (member.kind === 'function' || member.kind === 'constructor') && member.parameters?.length}
|
|
352
447
|
<section>
|
|
353
448
|
{#each member.parameters as param (param)}
|
|
354
|
-
|
|
355
|
-
<h5>
|
|
356
|
-
<code
|
|
357
|
-
>{param.name}{#if param.optional}<strong>?</strong>{/if}</code
|
|
358
|
-
>
|
|
359
|
-
</h5>
|
|
360
|
-
{#if param.description}
|
|
361
|
-
<Mdz content={param.description} />
|
|
362
|
-
{/if}
|
|
363
|
-
<div class="row gap_md">
|
|
364
|
-
<strong>type</strong>
|
|
365
|
-
<TypeLink type={param.type} />
|
|
366
|
-
</div>
|
|
367
|
-
{#if param.optional || param.defaultValue}
|
|
368
|
-
<div class="row gap_md">
|
|
369
|
-
{#if param.optional}
|
|
370
|
-
<span class="chip">optional</span>
|
|
371
|
-
{/if}
|
|
372
|
-
{#if param.defaultValue}
|
|
373
|
-
<strong>default</strong>
|
|
374
|
-
<Code lang="ts" content={param.defaultValue} />
|
|
375
|
-
{/if}
|
|
376
|
-
</div>
|
|
377
|
-
{/if}
|
|
378
|
-
</section>
|
|
449
|
+
{@render param_detail(param)}
|
|
379
450
|
{/each}
|
|
380
451
|
</section>
|
|
381
452
|
{/if}
|
|
@@ -389,23 +460,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
389
460
|
<Mdz content={member.returnDescription} />
|
|
390
461
|
{/if}
|
|
391
462
|
{/if}
|
|
392
|
-
|
|
393
|
-
{#if member.throws?.length}
|
|
394
|
-
<div>
|
|
395
|
-
<strong>throws</strong>
|
|
396
|
-
<ul>
|
|
397
|
-
{#each member.throws as thrown (thrown)}
|
|
398
|
-
<li>
|
|
399
|
-
{#if thrown.type}
|
|
400
|
-
<code>{thrown.type}</code> - {thrown.description}
|
|
401
|
-
{:else}
|
|
402
|
-
{thrown.description}
|
|
403
|
-
{/if}
|
|
404
|
-
</li>
|
|
405
|
-
{/each}
|
|
406
|
-
</ul>
|
|
407
|
-
</div>
|
|
408
|
-
{/if}
|
|
463
|
+
{@render doc_extras(member)}
|
|
409
464
|
</section>
|
|
410
465
|
{/each}
|
|
411
466
|
</section>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAiBxD,KAAK,gBAAgB,GAAI;IAAC,WAAW,EAAE,WAAW,CAAA;CAAC,CAAC;AAmbrD;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -16,7 +16,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
16
16
|
import ImgOrSvg from './ImgOrSvg.svelte';
|
|
17
17
|
import DeclarationLink from './DeclarationLink.svelte';
|
|
18
18
|
import ModuleLink from './ModuleLink.svelte';
|
|
19
|
-
import {url_github_file
|
|
19
|
+
import {url_github_file} from '@fuzdev/fuz_util/package_helpers.js';
|
|
20
20
|
import {isTypescript, isSvelte, isCss, isJson} from 'svelte-docinfo/source.js';
|
|
21
21
|
|
|
22
22
|
const {
|
|
@@ -46,11 +46,10 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
46
46
|
|
|
47
47
|
// TODO show other data (lines of code)
|
|
48
48
|
|
|
49
|
-
const {
|
|
49
|
+
const {pkg_json} = $derived(library);
|
|
50
50
|
|
|
51
|
-
const repository_url = $derived(repo_url_parse(package_json.repository));
|
|
52
51
|
const license_url = $derived(
|
|
53
|
-
|
|
52
|
+
pkg_json.license ? url_github_file(library.repo_url, 'LICENSE') : null,
|
|
54
53
|
);
|
|
55
54
|
</script>
|
|
56
55
|
|
|
@@ -67,30 +66,30 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
67
66
|
{@render repo_name(library.repo_name)}
|
|
68
67
|
{:else}
|
|
69
68
|
<div class="repo-name">
|
|
70
|
-
{library.repo_name}{#if
|
|
69
|
+
{library.repo_name}{#if pkg_json.glyph} {pkg_json.glyph}{/if}
|
|
71
70
|
</div>
|
|
72
71
|
{/if}
|
|
73
72
|
</header>
|
|
74
73
|
{@render children?.(library)}
|
|
75
|
-
{#if
|
|
74
|
+
{#if pkg_json.description}
|
|
76
75
|
{#if description}
|
|
77
|
-
{@render description(
|
|
76
|
+
{@render description(pkg_json.description)}
|
|
78
77
|
{:else}
|
|
79
|
-
<div class="description">{
|
|
78
|
+
<div class="description">{pkg_json.description}</div>
|
|
80
79
|
{/if}
|
|
81
80
|
{/if}
|
|
82
|
-
{#if
|
|
81
|
+
{#if pkg_json.tagline}
|
|
83
82
|
{#if tagline}
|
|
84
|
-
{@render tagline(
|
|
83
|
+
{@render tagline(pkg_json.tagline)}
|
|
85
84
|
{:else}
|
|
86
|
-
<div class="tagline">{
|
|
85
|
+
<div class="tagline">{pkg_json.tagline}</div>
|
|
87
86
|
{/if}
|
|
88
87
|
{/if}
|
|
89
88
|
{#if library.npm_url}
|
|
90
89
|
{#if npm_url}
|
|
91
90
|
{@render npm_url(library.npm_url)}
|
|
92
91
|
{:else}
|
|
93
|
-
<blockquote class="npm-url">npm i -D {
|
|
92
|
+
<blockquote class="npm-url">npm i -D {pkg_json.name}</blockquote>
|
|
94
93
|
{/if}
|
|
95
94
|
{/if}
|
|
96
95
|
<!-- TODO accessible HTML -->
|
|
@@ -130,20 +129,19 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
130
129
|
{#if library.npm_url}
|
|
131
130
|
<span class="title">npm</span>
|
|
132
131
|
<div class="content">
|
|
133
|
-
<a class="chip" title="npm" href={library.npm_url}>{
|
|
132
|
+
<a class="chip" title="npm" href={library.npm_url}>{pkg_json.name}</a>
|
|
134
133
|
</div>
|
|
135
134
|
{/if}
|
|
136
135
|
{#if library.changelog_url}
|
|
137
136
|
<span class="title">version</span>
|
|
138
137
|
<div class="content">
|
|
139
|
-
<a class="chip" title="version" href={library.changelog_url}>{
|
|
140
|
-
>
|
|
138
|
+
<a class="chip" title="version" href={library.changelog_url}>{pkg_json.version}</a>
|
|
141
139
|
</div>
|
|
142
140
|
{/if}
|
|
143
141
|
{#if license_url}
|
|
144
142
|
<span class="title">license</span>
|
|
145
143
|
<div class="content">
|
|
146
|
-
<a class="chip" title="license" href={license_url}>{
|
|
144
|
+
<a class="chip" title="license" href={license_url}>{pkg_json.license}</a>
|
|
147
145
|
</div>
|
|
148
146
|
{/if}
|
|
149
147
|
</section>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LibraryDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibraryDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOhD,KAAK,gBAAgB,GAAI;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC,CAAC;
|
|
1
|
+
{"version":3,"file":"LibraryDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibraryDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOhD,KAAK,gBAAgB,GAAI;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC,CAAC;AAiKH;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
children?: Snippet;
|
|
27
27
|
} = $props();
|
|
28
28
|
|
|
29
|
-
const {
|
|
29
|
+
const {pkg_json} = $derived(library);
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<div class="library-summary">
|
|
@@ -51,24 +51,24 @@
|
|
|
51
51
|
{/if}
|
|
52
52
|
{/if}
|
|
53
53
|
</header>
|
|
54
|
-
{#if
|
|
54
|
+
{#if pkg_json.tagline}
|
|
55
55
|
{#if tagline}
|
|
56
|
-
{@render tagline(
|
|
56
|
+
{@render tagline(pkg_json.tagline, pkg_json.glyph)}
|
|
57
57
|
{:else}
|
|
58
58
|
<p class="panel py_md px_xl">
|
|
59
|
-
{
|
|
60
|
-
{
|
|
59
|
+
{pkg_json.tagline}
|
|
60
|
+
{pkg_json.glyph}
|
|
61
61
|
</p>
|
|
62
62
|
{/if}
|
|
63
63
|
{/if}
|
|
64
|
-
{#if
|
|
64
|
+
{#if pkg_json.description}
|
|
65
65
|
{#if description}
|
|
66
|
-
{@render description(
|
|
66
|
+
{@render description(pkg_json.description, pkg_json.glyph)}
|
|
67
67
|
{:else}
|
|
68
68
|
<p class="text-align:center">
|
|
69
|
-
{
|
|
70
|
-
{#if !
|
|
71
|
-
{
|
|
69
|
+
{pkg_json.description}
|
|
70
|
+
{#if !pkg_json.tagline}
|
|
71
|
+
{pkg_json.glyph}
|
|
72
72
|
{/if}
|
|
73
73
|
</p>
|
|
74
74
|
{/if}
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
{/if}
|
|
97
97
|
{#if library.changelog_url}
|
|
98
98
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
99
|
-
<a class="chip" title="version" href={library.changelog_url}>{
|
|
99
|
+
<a class="chip" title="version" href={library.changelog_url}>{pkg_json.version}</a>
|
|
100
100
|
{/if}
|
|
101
101
|
{#if library.npm_url}
|
|
102
102
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
{@render npm_url(library.npm_url)}
|
|
109
109
|
{:else}
|
|
110
110
|
<p class="panel py_md px_xl font_family_mono text-align:center">
|
|
111
|
-
npm i -D {
|
|
111
|
+
npm i -D {pkg_json.name}
|
|
112
112
|
</p>
|
|
113
113
|
{/if}
|
|
114
114
|
{/if}
|
package/dist/Mdz.svelte
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import {mdz_parse} from './mdz.js';
|
|
5
5
|
import MdzNodeView from './MdzNodeView.svelte';
|
|
6
|
-
import {mdz_base_context} from './mdz_components.js';
|
|
6
|
+
import {mdz_base_context, set_mdz_context_with_fallback} from './mdz_components.js';
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
content,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
base?: string;
|
|
19
19
|
} = $props();
|
|
20
20
|
|
|
21
|
-
mdz_base_context
|
|
21
|
+
set_mdz_context_with_fallback(mdz_base_context, () => base);
|
|
22
22
|
|
|
23
23
|
const nodes = $derived(mdz_parse(content));
|
|
24
24
|
</script>
|
package/dist/MdzNodeView.svelte
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {resolve} from '$app/paths';
|
|
4
4
|
|
|
5
5
|
import type {MdzNode} from './mdz.js';
|
|
6
|
-
import {resolve_relative_path} from './mdz_helpers.js';
|
|
6
|
+
import {resolve_relative_path, mdz_is_safe_reference} from './mdz_helpers.js';
|
|
7
7
|
import DocsLink from './DocsLink.svelte';
|
|
8
8
|
import MdzNodeView from './MdzNodeView.svelte';
|
|
9
9
|
import {
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
node: MdzNode;
|
|
19
19
|
} = $props();
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const get_components = mdz_components_context.get_maybe();
|
|
22
|
+
const get_elements = mdz_elements_context.get_maybe();
|
|
23
23
|
const get_mdz_base = mdz_base_context.get_maybe();
|
|
24
24
|
// TODO make `Code` customizable via context, maybe registered as component Codeblock?
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
{#if node.type === 'Element'}
|
|
28
|
-
{@const element_config =
|
|
28
|
+
{@const element_config = get_elements?.()?.get(node.name)}
|
|
29
29
|
{#if element_config !== undefined}
|
|
30
30
|
<svelte:element this={node.name}>
|
|
31
31
|
{#if node.children.length > 0}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{@render render_unregistered_tag(node.name, node.children)}
|
|
37
37
|
{/if}
|
|
38
38
|
{:else if node.type === 'Component'}
|
|
39
|
-
{@const Component =
|
|
39
|
+
{@const Component = get_components?.()?.get(node.name)}
|
|
40
40
|
{#if Component}
|
|
41
41
|
<Component>
|
|
42
42
|
{#if node.children.length > 0}
|
|
@@ -58,7 +58,9 @@
|
|
|
58
58
|
<s>{@render render_children(node.children)}</s>
|
|
59
59
|
{:else if node.type === 'Link'}
|
|
60
60
|
{@const {reference} = node}
|
|
61
|
-
{#if
|
|
61
|
+
{#if !mdz_is_safe_reference(reference)}
|
|
62
|
+
{@render render_children(node.children)}
|
|
63
|
+
{:else if node.link_type === 'internal'}
|
|
62
64
|
{@const skip_resolve = reference.startsWith('#') || reference.startsWith('?')}
|
|
63
65
|
{@const mdz_base = get_mdz_base?.()}
|
|
64
66
|
{#if reference.startsWith('.') && mdz_base}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdzNodeView.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdzNodeView.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGtC,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAO9C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"MdzNodeView.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdzNodeView.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGtC,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAO9C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAuGH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type {Snippet} from 'svelte';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
mdz_base_context,
|
|
6
|
+
mdz_components_context,
|
|
7
|
+
mdz_elements_context,
|
|
8
|
+
set_mdz_context_with_fallback,
|
|
9
|
+
type MdzComponents,
|
|
10
|
+
type MdzElements,
|
|
11
|
+
} from './mdz_components.js';
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
base,
|
|
15
|
+
components,
|
|
16
|
+
elements,
|
|
17
|
+
children,
|
|
18
|
+
}: {
|
|
19
|
+
base?: string;
|
|
20
|
+
components?: MdzComponents;
|
|
21
|
+
elements?: MdzElements;
|
|
22
|
+
children: Snippet;
|
|
23
|
+
} = $props();
|
|
24
|
+
|
|
25
|
+
set_mdz_context_with_fallback(mdz_base_context, () => base);
|
|
26
|
+
set_mdz_context_with_fallback(mdz_components_context, () => components);
|
|
27
|
+
set_mdz_context_with_fallback(mdz_elements_context, () => elements);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
{@render children()}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import { type MdzComponents, type MdzElements } from './mdz_components.js';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
base?: string;
|
|
5
|
+
components?: MdzComponents;
|
|
6
|
+
elements?: MdzElements;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
};
|
|
9
|
+
declare const MdzRoot: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
10
|
+
type MdzRoot = ReturnType<typeof MdzRoot>;
|
|
11
|
+
export default MdzRoot;
|
|
12
|
+
//# sourceMappingURL=MdzRoot.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MdzRoot.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdzRoot.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,gBAAgB,GAAI;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAsBH,QAAA,MAAM,OAAO,sDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|