@fuzdev/fuz_ui 0.195.1 → 0.197.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/README.md +2 -2
- package/dist/Breadcrumb.svelte +15 -1
- package/dist/Breadcrumb.svelte.d.ts +4 -0
- package/dist/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/Contextmenu.svelte +3 -1
- package/dist/Contextmenu.svelte.d.ts.map +1 -1
- package/dist/Docs.svelte +8 -21
- package/dist/Docs.svelte.d.ts +0 -3
- package/dist/Docs.svelte.d.ts.map +1 -1
- package/dist/DocsFooter.svelte +19 -10
- package/dist/DocsFooter.svelte.d.ts +7 -2
- package/dist/DocsFooter.svelte.d.ts.map +1 -1
- package/dist/DocsPrimaryNav.svelte +1 -12
- package/dist/DocsPrimaryNav.svelte.d.ts +0 -3
- package/dist/DocsPrimaryNav.svelte.d.ts.map +1 -1
- package/dist/DocsSearch.svelte +1 -1
- package/dist/EcosystemLinks.svelte +4 -1
- package/dist/EcosystemLinks.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +1 -16
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +2 -1
- package/dist/ProjectLinks.svelte.d.ts.map +1 -1
- package/dist/Svg.svelte +2 -24
- package/dist/Svg.svelte.d.ts +1 -23
- package/dist/Svg.svelte.d.ts.map +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/declaration.svelte.d.ts +8 -1
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +5 -4
- package/dist/library.svelte.d.ts +1 -76
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +4 -3
- package/dist/package_helpers.d.ts +0 -15
- package/dist/package_helpers.d.ts.map +1 -1
- package/dist/package_helpers.js +1 -18
- package/dist/site.svelte.d.ts +34 -0
- package/dist/site.svelte.d.ts.map +1 -0
- package/dist/site.svelte.js +18 -0
- package/dist/svg.d.ts +25 -0
- package/dist/svg.d.ts.map +1 -0
- package/dist/svg.js +1 -0
- package/dist/tsdoc_mdz.d.ts +2 -2
- package/dist/tsdoc_mdz.js +2 -2
- package/package.json +10 -10
- package/src/lib/constants.ts +5 -0
- package/src/lib/declaration.svelte.ts +5 -4
- package/src/lib/logos.ts +1 -1
- package/src/lib/mdz_lexer.ts +2 -2
- package/src/lib/mdz_token_parser.ts +1 -1
- package/src/lib/module.svelte.ts +4 -3
- package/src/lib/package_helpers.ts +1 -19
- package/src/lib/site.svelte.ts +39 -0
- package/src/lib/storage.ts +1 -1
- package/src/lib/svg.ts +23 -0
- package/src/lib/tsdoc_mdz.ts +2 -2
- package/dist/library_gen.d.ts +0 -104
- package/dist/library_gen.d.ts.map +0 -1
- package/dist/library_gen.js +0 -143
- package/dist/library_output.d.ts +0 -36
- package/dist/library_output.d.ts.map +0 -1
- package/dist/library_output.js +0 -44
- package/dist/vite_plugin_library_well_known.d.ts +0 -37
- package/dist/vite_plugin_library_well_known.d.ts.map +0 -1
- package/dist/vite_plugin_library_well_known.js +0 -144
- package/src/lib/library_gen.ts +0 -219
- package/src/lib/library_output.ts +0 -67
- package/src/lib/vite_plugin_library_well_known.ts +0 -189
package/dist/library.svelte.d.ts
CHANGED
|
@@ -91,82 +91,7 @@ export declare class Library {
|
|
|
91
91
|
main?: string | undefined;
|
|
92
92
|
exports?: string | Record<string, unknown> | null | undefined;
|
|
93
93
|
};
|
|
94
|
-
readonly source_json:
|
|
95
|
-
[x: string]: unknown;
|
|
96
|
-
name: string;
|
|
97
|
-
version: string;
|
|
98
|
-
modules?: {
|
|
99
|
-
[x: string]: unknown;
|
|
100
|
-
path: string;
|
|
101
|
-
declarations?: {
|
|
102
|
-
[x: string]: unknown;
|
|
103
|
-
name: string;
|
|
104
|
-
kind: "function" | "class" | "type" | "json" | "variable" | "constructor" | "component" | "css";
|
|
105
|
-
doc_comment?: string | undefined;
|
|
106
|
-
type_signature?: string | undefined;
|
|
107
|
-
modifiers?: string[] | undefined;
|
|
108
|
-
source_line?: number | undefined;
|
|
109
|
-
parameters?: {
|
|
110
|
-
[x: string]: unknown;
|
|
111
|
-
name: string;
|
|
112
|
-
type: string;
|
|
113
|
-
optional?: boolean | undefined;
|
|
114
|
-
description?: string | undefined;
|
|
115
|
-
default_value?: string | undefined;
|
|
116
|
-
}[] | undefined;
|
|
117
|
-
return_type?: string | undefined;
|
|
118
|
-
return_description?: string | undefined;
|
|
119
|
-
generic_params?: {
|
|
120
|
-
[x: string]: unknown;
|
|
121
|
-
name: string;
|
|
122
|
-
constraint?: string | undefined;
|
|
123
|
-
default_type?: string | undefined;
|
|
124
|
-
}[] | undefined;
|
|
125
|
-
examples?: string[] | undefined;
|
|
126
|
-
deprecated_message?: string | undefined;
|
|
127
|
-
see_also?: string[] | undefined;
|
|
128
|
-
throws?: {
|
|
129
|
-
[x: string]: unknown;
|
|
130
|
-
description: string;
|
|
131
|
-
type?: string | undefined;
|
|
132
|
-
}[] | undefined;
|
|
133
|
-
since?: string | undefined;
|
|
134
|
-
mutates?: Record<string, string> | undefined;
|
|
135
|
-
extends?: string[] | undefined;
|
|
136
|
-
implements?: string[] | undefined;
|
|
137
|
-
members?: Record<string, unknown>[] | undefined;
|
|
138
|
-
properties?: Record<string, unknown>[] | undefined;
|
|
139
|
-
props?: {
|
|
140
|
-
[x: string]: unknown;
|
|
141
|
-
name: string;
|
|
142
|
-
type: string;
|
|
143
|
-
optional?: boolean | undefined;
|
|
144
|
-
description?: string | undefined;
|
|
145
|
-
default_value?: string | undefined;
|
|
146
|
-
bindable?: boolean | undefined;
|
|
147
|
-
examples?: string[] | undefined;
|
|
148
|
-
deprecated_message?: string | undefined;
|
|
149
|
-
see_also?: string[] | undefined;
|
|
150
|
-
throws?: {
|
|
151
|
-
[x: string]: unknown;
|
|
152
|
-
description: string;
|
|
153
|
-
type?: string | undefined;
|
|
154
|
-
}[] | undefined;
|
|
155
|
-
since?: string | undefined;
|
|
156
|
-
}[] | undefined;
|
|
157
|
-
also_exported_from?: string[] | undefined;
|
|
158
|
-
alias_of?: {
|
|
159
|
-
module: string;
|
|
160
|
-
name: string;
|
|
161
|
-
kind: "function" | "class" | "type" | "json" | "variable" | "constructor" | "component" | "css";
|
|
162
|
-
} | undefined;
|
|
163
|
-
}[] | undefined;
|
|
164
|
-
module_comment?: string | undefined;
|
|
165
|
-
dependencies?: string[] | undefined;
|
|
166
|
-
dependents?: string[] | undefined;
|
|
167
|
-
star_exports?: string[] | undefined;
|
|
168
|
-
}[] | undefined;
|
|
169
|
-
};
|
|
94
|
+
readonly source_json: import("@fuzdev/fuz_util/library_json.js").SourceJson;
|
|
170
95
|
readonly name: string;
|
|
171
96
|
readonly repo_name: string;
|
|
172
97
|
readonly repo_url: import("@fuzdev/fuz_util/url.js").Url;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAIlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,eAAe;;;;CAA4B,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,MAGzD,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4C;IACjE,QAAQ,CAAC,WAAW
|
|
1
|
+
{"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAIlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,eAAe;;;;CAA4B,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,MAGzD,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4C;IACjE,QAAQ,CAAC,WAAW,wDAA2C;IAE/D,QAAQ,CAAC,IAAI,SAAoC;IACjD,QAAQ,CAAC,SAAS,SAAyC;IAC3D,QAAQ,CAAC,QAAQ,wCAAwC;IACzD,QAAQ,CAAC,UAAU,gBAA0C;IAC7D,QAAQ,CAAC,YAAY,+CAA4C;IACjE,QAAQ,CAAC,QAAQ,+CAAwC;IACzD,QAAQ,CAAC,QAAQ,SAAwC;IACzD,QAAQ,CAAC,OAAO,+CAAuC;IACvD,QAAQ,CAAC,aAAa,+CAA6C;IACnE,QAAQ,CAAC,SAAS,UAAyC;IAE3D;;OAEG;IACH,QAAQ,CAAC,OAAO,gBAMd;IAEF;;OAEG;IACH,QAAQ,CAAC,OAAO,WAId;IAEF;;OAEG;IACH,QAAQ,CAAC,cAAc,WAErB;IAEF;;OAEG;IACH,QAAQ,CAAC,YAAY,gBAAmE;IAExF;;OAEG;IACH,QAAQ,CAAC,cAAc,sBAA2D;IAElF;;OAEG;IACH,QAAQ,CAAC,mBAAmB,2BAAgE;gBAEhF,YAAY,EAAE,WAAW,EAAE,UAAU,SAAK;IAKtD;;;OAGG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAW5D;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;CAGtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,MAAM;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;
|
|
1
|
+
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,MAAM;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAK1C,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAiB;IAEtD;;;;;;;;;;OAUG;IACH,IAAI,SAAmC;IAEvC;;OAEG;IACH,WAAW,SAA8B;IAEzC,cAAc,qBAA4C;IAE1D;;OAEG;IACH,YAAY,gBAIV;IAEF;;OAEG;IACH,OAAO,SAAgE;IAEvE;;OAEG;IACH,UAAU,qBAIR;IAEF,gBAAgB,EAAE,OAAO,CAA8D;IAEvF,kBAAkB,EAAE,OAAO,CAAmC;IAE9D;;OAEG;IACH,YAAY,WAAiD;IAE7D;;OAEG;IACH,UAAU,WAA+C;gBAE7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe;IAK1D;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG9D"}
|
package/dist/module.svelte.js
CHANGED
|
@@ -11,9 +11,10 @@ import { url_github_file } from './package_helpers.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export class Module {
|
|
13
13
|
library = $state.raw();
|
|
14
|
-
// `
|
|
15
|
-
// default arrays), so the
|
|
16
|
-
// input makes TypeScript force guards on
|
|
14
|
+
// The `virtual:svelte-docinfo` module is compacted (svelte-docinfo's
|
|
15
|
+
// `compactReplacer` strips empty default arrays), so the runtime data is the
|
|
16
|
+
// `*Input` shape. Typing it as input makes TypeScript force guards on
|
|
17
|
+
// defaulted-array reads.
|
|
17
18
|
module_json = $state.raw();
|
|
18
19
|
/**
|
|
19
20
|
* Canonical module path — `src/lib/`-relative, with source extension
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - `url_github_file` - GitHub file permalink
|
|
9
9
|
* - `url_github_org` - GitHub organization page
|
|
10
10
|
* - `url_npm_package` - npm package page
|
|
11
|
-
* - `url_well_known` - .well-known metadata file
|
|
12
11
|
*
|
|
13
12
|
* Parsers:
|
|
14
13
|
* - `repo_url_parse` - extract repo URL from `package.json` repository field
|
|
@@ -148,18 +147,4 @@ export declare const repo_name_parse: (name: string) => string;
|
|
|
148
147
|
* ```
|
|
149
148
|
*/
|
|
150
149
|
export declare const repo_url_parse: (repository: PackageJson["repository"]) => string | null;
|
|
151
|
-
/**
|
|
152
|
-
* Build .well-known URL for package metadata files.
|
|
153
|
-
*
|
|
154
|
-
* @param homepage_url - package homepage URL
|
|
155
|
-
* @param filename - filename in .well-known directory
|
|
156
|
-
* @returns full URL to the .well-known file
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```ts
|
|
160
|
-
* url_well_known('https://fuz.dev', 'package.json')
|
|
161
|
-
* // => 'https://fuz.dev/.well-known/package.json'
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
export declare const url_well_known: (homepage_url: string, filename: string) => string;
|
|
165
150
|
//# sourceMappingURL=package_helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/package_helpers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"package_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/package_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,OAAO,MAAM,KAAG,MAIpF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,KAAG,MAAM,GAAG,IAE7E,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,KAAG,MAAM,GAAG,IAKjE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,KAAG,MACP,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,WAAW,KAAG,OAEhE,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,MAS9C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,WAAW,CAAC,YAAY,CAAC,KAAG,MAAM,GAAG,IAK/E,CAAC"}
|
package/dist/package_helpers.js
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - `url_github_file` - GitHub file permalink
|
|
9
9
|
* - `url_github_org` - GitHub organization page
|
|
10
10
|
* - `url_npm_package` - npm package page
|
|
11
|
-
* - `url_well_known` - .well-known metadata file
|
|
12
11
|
*
|
|
13
12
|
* Parsers:
|
|
14
13
|
* - `repo_url_parse` - extract repo URL from `package.json` repository field
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
*
|
|
21
20
|
* @module
|
|
22
21
|
*/
|
|
23
|
-
import {
|
|
22
|
+
import { strip_end, strip_start } from '@fuzdev/fuz_util/string.js';
|
|
24
23
|
/**
|
|
25
24
|
* Build GitHub file URL for a repository.
|
|
26
25
|
*
|
|
@@ -178,19 +177,3 @@ export const repo_url_parse = (repository) => {
|
|
|
178
177
|
return null;
|
|
179
178
|
return strip_end(strip_start(strip_end(url, '.git'), 'git+'), '/');
|
|
180
179
|
};
|
|
181
|
-
/**
|
|
182
|
-
* Build .well-known URL for package metadata files.
|
|
183
|
-
*
|
|
184
|
-
* @param homepage_url - package homepage URL
|
|
185
|
-
* @param filename - filename in .well-known directory
|
|
186
|
-
* @returns full URL to the .well-known file
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```ts
|
|
190
|
-
* url_well_known('https://fuz.dev', 'package.json')
|
|
191
|
-
* // => 'https://fuz.dev/.well-known/package.json'
|
|
192
|
-
* ```
|
|
193
|
-
*/
|
|
194
|
-
export const url_well_known = (homepage_url, filename) => {
|
|
195
|
-
return `${ensure_end(homepage_url, '/')}.well-known/${filename}`;
|
|
196
|
-
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Url } from '@fuzdev/fuz_util/url.js';
|
|
2
|
+
import type { SvgData } from './svg.js';
|
|
3
|
+
export interface SiteStateOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The site's icon, e.g. a logo from `logos.ts`.
|
|
6
|
+
*/
|
|
7
|
+
icon?: SvgData | null;
|
|
8
|
+
/**
|
|
9
|
+
* The site's glyph, a single unicode character identifying the project.
|
|
10
|
+
*/
|
|
11
|
+
glyph?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* The site's source repository url, e.g. for `DocsFooter` links.
|
|
14
|
+
*/
|
|
15
|
+
repo_url?: Url | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
19
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
20
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
21
|
+
* module/declaration metadata that only docs and API pages need.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SiteState {
|
|
24
|
+
icon: SvgData | null;
|
|
25
|
+
glyph: string | null;
|
|
26
|
+
repo_url: Url | null;
|
|
27
|
+
constructor(options?: SiteStateOptions);
|
|
28
|
+
}
|
|
29
|
+
export declare const site_context: {
|
|
30
|
+
get: (error_message?: string) => SiteState;
|
|
31
|
+
get_maybe: () => SiteState | undefined;
|
|
32
|
+
set: (value: SiteState) => SiteState;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=site.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/site.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACrB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAoB;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAoB;IACxC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAoB;gBAE5B,OAAO,GAAE,gBAAqB;CAK1C;AAED,eAAO,MAAM,YAAY;;;;CAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { create_context } from './context_helpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
4
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
5
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
6
|
+
* module/declaration metadata that only docs and API pages need.
|
|
7
|
+
*/
|
|
8
|
+
export class SiteState {
|
|
9
|
+
icon = $state.raw(null);
|
|
10
|
+
glyph = $state.raw(null);
|
|
11
|
+
repo_url = $state.raw(null);
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this.icon = options.icon ?? null;
|
|
14
|
+
this.glyph = options.glyph ?? null;
|
|
15
|
+
this.repo_url = options.repo_url ?? null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const site_context = create_context();
|
package/dist/svg.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
+
export interface SvgData {
|
|
3
|
+
/**
|
|
4
|
+
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
5
|
+
* This is an escape hatch for non-`path` markup -
|
|
6
|
+
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
7
|
+
*/
|
|
8
|
+
raw?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
11
|
+
*/
|
|
12
|
+
paths?: Array<{
|
|
13
|
+
d: string;
|
|
14
|
+
} & SvelteHTMLElements['path']> | null;
|
|
15
|
+
attrs?: SvelteHTMLElements['svg'] | null;
|
|
16
|
+
fill?: string | null;
|
|
17
|
+
width?: string | null;
|
|
18
|
+
height?: string | null;
|
|
19
|
+
label?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Defaults to `"0 0 100 100"`.
|
|
22
|
+
*/
|
|
23
|
+
viewBox?: string | null;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,OAAO;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
package/dist/svg.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tsdoc_mdz.d.ts
CHANGED
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
* tsdoc_see_to_mdz('[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library')
|
|
38
38
|
* // → '[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library'
|
|
39
39
|
*
|
|
40
|
-
* tsdoc_see_to_mdz('
|
|
41
|
-
* // → '`
|
|
40
|
+
* tsdoc_see_to_mdz('tome.ts for the documentation system')
|
|
41
|
+
* // → '`tome.ts` for the documentation system'
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
44
|
export declare const tsdoc_see_to_mdz: (content: string) => string;
|
package/dist/tsdoc_mdz.js
CHANGED
|
@@ -40,8 +40,8 @@ const format_reference = (ref) => (mdz_is_url(ref) ? ref : `\`${ref}\``);
|
|
|
40
40
|
* tsdoc_see_to_mdz('[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library')
|
|
41
41
|
* // → '[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library'
|
|
42
42
|
*
|
|
43
|
-
* tsdoc_see_to_mdz('
|
|
44
|
-
* // → '`
|
|
43
|
+
* tsdoc_see_to_mdz('tome.ts for the documentation system')
|
|
44
|
+
* // → '`tome.ts` for the documentation system'
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
export const tsdoc_see_to_mdz = (content) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.197.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@changesets/changelog-git": "^0.2.1",
|
|
83
|
-
"@fuzdev/blake3_wasm": "^0.1.
|
|
83
|
+
"@fuzdev/blake3_wasm": "^0.1.1",
|
|
84
84
|
"@fuzdev/fuz_code": "^0.45.1",
|
|
85
|
-
"@fuzdev/fuz_css": "^0.
|
|
86
|
-
"@fuzdev/fuz_util": "^0.
|
|
87
|
-
"@fuzdev/gro": "^0.
|
|
85
|
+
"@fuzdev/fuz_css": "^0.61.1",
|
|
86
|
+
"@fuzdev/fuz_util": "^0.63.0",
|
|
87
|
+
"@fuzdev/gro": "^0.200.0",
|
|
88
88
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
89
89
|
"@ryanatkn/eslint-config": "^0.12.1",
|
|
90
90
|
"@sveltejs/acorn-typescript": "^1.0.9",
|
|
@@ -95,20 +95,20 @@
|
|
|
95
95
|
"@types/estree": "^1.0.8",
|
|
96
96
|
"@types/node": "^24.10.1",
|
|
97
97
|
"@webref/css": "^8.2.0",
|
|
98
|
-
"eslint": "^9.39.
|
|
99
|
-
"eslint-plugin-svelte": "^3.
|
|
98
|
+
"eslint": "^9.39.4",
|
|
99
|
+
"eslint-plugin-svelte": "^3.19.0",
|
|
100
100
|
"esm-env": "^1.2.2",
|
|
101
101
|
"jsdom": "^27.2.0",
|
|
102
102
|
"magic-string": "^0.30.21",
|
|
103
103
|
"prettier": "^3.7.4",
|
|
104
104
|
"prettier-plugin-svelte": "^3.5.1",
|
|
105
|
-
"svelte": "^5.
|
|
105
|
+
"svelte": "^5.56.0",
|
|
106
106
|
"svelte-check": "^4.4.8",
|
|
107
|
-
"svelte-docinfo": "^0.
|
|
107
|
+
"svelte-docinfo": "^0.2.0",
|
|
108
108
|
"svelte2tsx": "^0.7.55",
|
|
109
109
|
"tslib": "^2.8.1",
|
|
110
110
|
"typescript": "^5.9.3",
|
|
111
|
-
"typescript-eslint": "^8.
|
|
111
|
+
"typescript-eslint": "^8.60.0",
|
|
112
112
|
"vite": "^7.3.1",
|
|
113
113
|
"vitest": "^4.0.15",
|
|
114
114
|
"zimmerframe": "^1.1.4",
|
package/src/lib/constants.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
// TODO the 60px is a hack, need `--docs_primary_nav_height` exported or :root values from Fuz -- the --space_lg also needs to be kept in sync
|
|
2
2
|
// see also the same issue in fuz_css
|
|
3
3
|
export const MAIN_HEADER_MARGIN_TOP = 'calc(60px + var(--space_lg))';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Fuz ecosystem home url, e.g. for `DocsFooter`'s `root_url`.
|
|
7
|
+
*/
|
|
8
|
+
export const FUZ_DEV_URL = 'https://www.fuz.dev/';
|
|
@@ -11,10 +11,11 @@ import {generateImport, getDisplayName} from 'svelte-docinfo/declaration-helpers
|
|
|
11
11
|
import type {Module} from './module.svelte.js';
|
|
12
12
|
import {url_github_file} from './package_helpers.js';
|
|
13
13
|
|
|
14
|
-
// `
|
|
15
|
-
// strips empty default arrays — so the
|
|
16
|
-
// (defaulted arrays optional), not the parsed `*Json`
|
|
17
|
-
// input makes TypeScript force a guard on every
|
|
14
|
+
// The `virtual:svelte-docinfo` module is serialized with svelte-docinfo's
|
|
15
|
+
// `compactReplacer`, which strips empty default arrays — so the runtime data
|
|
16
|
+
// is the `*Input` shape (defaulted arrays optional), not the parsed `*Json`
|
|
17
|
+
// shape. Typing it as input makes TypeScript force a guard on every
|
|
18
|
+
// defaulted-array read.
|
|
18
19
|
//
|
|
19
20
|
// Helper to access kind-specific fields on the discriminated union.
|
|
20
21
|
// At runtime the field is present or undefined; TypeScript needs the cast.
|
package/src/lib/logos.ts
CHANGED
package/src/lib/mdz_lexer.ts
CHANGED
|
@@ -603,7 +603,7 @@ export class MdzLexer {
|
|
|
603
603
|
const open_type = kind === 'italic' ? 'italic_open' : 'strikethrough_open';
|
|
604
604
|
const close_type = kind === 'italic' ? 'italic_close' : 'strikethrough_close';
|
|
605
605
|
const open_token_index = this.#tokens.length;
|
|
606
|
-
this.#tokens.push({type: open_type, start, end: this.#index}
|
|
606
|
+
this.#tokens.push({type: open_type, start, end: this.#index});
|
|
607
607
|
|
|
608
608
|
// Set search boundary for nested parsers
|
|
609
609
|
const saved_max = this.#max_search_index;
|
|
@@ -634,7 +634,7 @@ export class MdzLexer {
|
|
|
634
634
|
type: close_type,
|
|
635
635
|
start: close_index,
|
|
636
636
|
end: close_index + 1,
|
|
637
|
-
}
|
|
637
|
+
});
|
|
638
638
|
this.#index = close_index + 1;
|
|
639
639
|
} else {
|
|
640
640
|
// Convert opening to text
|
package/src/lib/module.svelte.ts
CHANGED
|
@@ -15,9 +15,10 @@ import {url_github_file} from './package_helpers.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export class Module {
|
|
17
17
|
readonly library: Library = $state.raw()!;
|
|
18
|
-
// `
|
|
19
|
-
// default arrays), so the
|
|
20
|
-
// input makes TypeScript force guards on
|
|
18
|
+
// The `virtual:svelte-docinfo` module is compacted (svelte-docinfo's
|
|
19
|
+
// `compactReplacer` strips empty default arrays), so the runtime data is the
|
|
20
|
+
// `*Input` shape. Typing it as input makes TypeScript force guards on
|
|
21
|
+
// defaulted-array reads.
|
|
21
22
|
readonly module_json: ModuleJsonInput = $state.raw()!;
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - `url_github_file` - GitHub file permalink
|
|
9
9
|
* - `url_github_org` - GitHub organization page
|
|
10
10
|
* - `url_npm_package` - npm package page
|
|
11
|
-
* - `url_well_known` - .well-known metadata file
|
|
12
11
|
*
|
|
13
12
|
* Parsers:
|
|
14
13
|
* - `repo_url_parse` - extract repo URL from `package.json` repository field
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
* @module
|
|
22
21
|
*/
|
|
23
22
|
|
|
24
|
-
import {
|
|
23
|
+
import {strip_end, strip_start} from '@fuzdev/fuz_util/string.js';
|
|
25
24
|
import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
|
|
26
25
|
|
|
27
26
|
/**
|
|
@@ -185,20 +184,3 @@ export const repo_url_parse = (repository: PackageJson['repository']): string |
|
|
|
185
184
|
if (!url) return null;
|
|
186
185
|
return strip_end(strip_start(strip_end(url, '.git'), 'git+'), '/');
|
|
187
186
|
};
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Build .well-known URL for package metadata files.
|
|
191
|
-
*
|
|
192
|
-
* @param homepage_url - package homepage URL
|
|
193
|
-
* @param filename - filename in .well-known directory
|
|
194
|
-
* @returns full URL to the .well-known file
|
|
195
|
-
*
|
|
196
|
-
* @example
|
|
197
|
-
* ```ts
|
|
198
|
-
* url_well_known('https://fuz.dev', 'package.json')
|
|
199
|
-
* // => 'https://fuz.dev/.well-known/package.json'
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
export const url_well_known = (homepage_url: string, filename: string): string => {
|
|
203
|
-
return `${ensure_end(homepage_url, '/')}.well-known/${filename}`;
|
|
204
|
-
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type {Url} from '@fuzdev/fuz_util/url.js';
|
|
2
|
+
|
|
3
|
+
import {create_context} from './context_helpers.js';
|
|
4
|
+
import type {SvgData} from './svg.js';
|
|
5
|
+
|
|
6
|
+
export interface SiteStateOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The site's icon, e.g. a logo from `logos.ts`.
|
|
9
|
+
*/
|
|
10
|
+
icon?: SvgData | null;
|
|
11
|
+
/**
|
|
12
|
+
* The site's glyph, a single unicode character identifying the project.
|
|
13
|
+
*/
|
|
14
|
+
glyph?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The site's source repository url, e.g. for `DocsFooter` links.
|
|
17
|
+
*/
|
|
18
|
+
repo_url?: Url | null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
23
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
24
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
25
|
+
* module/declaration metadata that only docs and API pages need.
|
|
26
|
+
*/
|
|
27
|
+
export class SiteState {
|
|
28
|
+
icon: SvgData | null = $state.raw(null);
|
|
29
|
+
glyph: string | null = $state.raw(null);
|
|
30
|
+
repo_url: Url | null = $state.raw(null);
|
|
31
|
+
|
|
32
|
+
constructor(options: SiteStateOptions = {}) {
|
|
33
|
+
this.icon = options.icon ?? null;
|
|
34
|
+
this.glyph = options.glyph ?? null;
|
|
35
|
+
this.repo_url = options.repo_url ?? null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const site_context = create_context<SiteState>();
|
package/src/lib/storage.ts
CHANGED
package/src/lib/svg.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
2
|
+
|
|
3
|
+
export interface SvgData {
|
|
4
|
+
/**
|
|
5
|
+
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
6
|
+
* This is an escape hatch for non-`path` markup -
|
|
7
|
+
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
8
|
+
*/
|
|
9
|
+
raw?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
12
|
+
*/
|
|
13
|
+
paths?: Array<{d: string} & SvelteHTMLElements['path']> | null;
|
|
14
|
+
attrs?: SvelteHTMLElements['svg'] | null;
|
|
15
|
+
fill?: string | null;
|
|
16
|
+
width?: string | null;
|
|
17
|
+
height?: string | null;
|
|
18
|
+
label?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Defaults to `"0 0 100 100"`.
|
|
21
|
+
*/
|
|
22
|
+
viewBox?: string | null;
|
|
23
|
+
}
|
package/src/lib/tsdoc_mdz.ts
CHANGED
|
@@ -43,8 +43,8 @@ const format_reference = (ref: string): string => (mdz_is_url(ref) ? ref : `\`${
|
|
|
43
43
|
* tsdoc_see_to_mdz('[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library')
|
|
44
44
|
* // → '[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library'
|
|
45
45
|
*
|
|
46
|
-
* tsdoc_see_to_mdz('
|
|
47
|
-
* // → '`
|
|
46
|
+
* tsdoc_see_to_mdz('tome.ts for the documentation system')
|
|
47
|
+
* // → '`tome.ts` for the documentation system'
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
export const tsdoc_see_to_mdz = (content: string): string => {
|