@fuzdev/fuz_ui 0.202.0 → 0.203.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/ApiIndex.svelte +6 -3
- package/dist/ApiIndex.svelte.d.ts +1 -1
- package/dist/ApiIndex.svelte.d.ts.map +1 -1
- package/dist/ApiModule.svelte +72 -21
- package/dist/ApiModule.svelte.d.ts +1 -1
- package/dist/ApiModule.svelte.d.ts.map +1 -1
- package/dist/ContextmenuEntry.svelte +11 -10
- package/dist/ContextmenuEntry.svelte.d.ts +1 -1
- package/dist/ContextmenuEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuLinkEntry.svelte +30 -12
- package/dist/ContextmenuLinkEntry.svelte.d.ts +2 -1
- package/dist/ContextmenuLinkEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuMenu.svelte +207 -0
- package/dist/ContextmenuMenu.svelte.d.ts +41 -0
- package/dist/ContextmenuMenu.svelte.d.ts.map +1 -0
- package/dist/ContextmenuRoot.svelte +58 -260
- package/dist/ContextmenuRoot.svelte.d.ts +2 -60
- package/dist/ContextmenuRoot.svelte.d.ts.map +1 -1
- package/dist/ContextmenuRootForSafariCompatibility.svelte +72 -283
- package/dist/ContextmenuRootForSafariCompatibility.svelte.d.ts +2 -58
- package/dist/ContextmenuRootForSafariCompatibility.svelte.d.ts.map +1 -1
- package/dist/ContextmenuSeparator.svelte +2 -1
- package/dist/ContextmenuSeparator.svelte.d.ts.map +1 -1
- package/dist/ContextmenuSubmenu.svelte +27 -23
- package/dist/ContextmenuSubmenu.svelte.d.ts +1 -1
- package/dist/ContextmenuSubmenu.svelte.d.ts.map +1 -1
- package/dist/ContextmenuTextEntry.svelte +7 -3
- package/dist/ContextmenuTextEntry.svelte.d.ts +2 -1
- package/dist/ContextmenuTextEntry.svelte.d.ts.map +1 -1
- package/dist/DeclarationLink.svelte +15 -2
- package/dist/DeclarationLink.svelte.d.ts +7 -0
- package/dist/DeclarationLink.svelte.d.ts.map +1 -1
- package/dist/DocsLink.svelte +3 -1
- package/dist/DocsLink.svelte.d.ts.map +1 -1
- package/dist/DocsTertiaryNav.svelte +2 -1
- package/dist/DocsTertiaryNav.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +9 -3
- package/dist/LibraryDetail.svelte.d.ts +1 -1
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/ModuleLink.svelte +2 -1
- package/dist/ModuleLink.svelte.d.ts.map +1 -1
- package/dist/TypeLink.svelte +2 -1
- package/dist/TypeLink.svelte.d.ts.map +1 -1
- package/dist/contextmenu_helpers.d.ts +324 -1
- package/dist/contextmenu_helpers.d.ts.map +1 -1
- package/dist/contextmenu_helpers.js +403 -2
- package/dist/contextmenu_state.svelte.d.ts +61 -15
- package/dist/contextmenu_state.svelte.d.ts.map +1 -1
- package/dist/contextmenu_state.svelte.js +206 -119
- package/dist/declaration.svelte.d.ts +1 -0
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +2 -1
- package/dist/icons.d.ts +15 -3
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +17 -3
- package/dist/library.svelte.d.ts +30 -3
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library.svelte.js +38 -0
- package/dist/module.svelte.d.ts +62 -1
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +71 -1
- package/package.json +2 -2
- package/src/lib/contextmenu_helpers.ts +546 -3
- package/src/lib/contextmenu_state.svelte.ts +219 -119
- package/src/lib/declaration.svelte.ts +2 -1
- package/src/lib/icons.ts +19 -3
- package/src/lib/library.svelte.ts +43 -1
- package/src/lib/module.svelte.ts +97 -2
package/dist/library.svelte.d.ts
CHANGED
|
@@ -2,11 +2,38 @@ import type { LibraryJson } from '@fuzdev/fuz_util/library_json.js';
|
|
|
2
2
|
import type { Url } from '@fuzdev/fuz_util/url.js';
|
|
3
3
|
import { Declaration } from './declaration.svelte.js';
|
|
4
4
|
import { Module } from './module.svelte.js';
|
|
5
|
+
/**
|
|
6
|
+
* Holds a getter to the active `Library` for the current subtree.
|
|
7
|
+
*
|
|
8
|
+
* The getter form keeps consumers reactive when the library changes without
|
|
9
|
+
* requiring a remount — set it with a closure over reactive state, e.g.
|
|
10
|
+
* `library_context.set(() => library)`. Components that accept a `library`
|
|
11
|
+
* prop (`LibraryDetail`, `ApiIndex`, `ApiModule`) project the prop into this
|
|
12
|
+
* context for their subtree, so descendants like `ModuleLink`,
|
|
13
|
+
* `DeclarationLink`, and TSDoc-rendered `DocsLink` resolve against the same
|
|
14
|
+
* library — including when an aggregator renders a foreign library that
|
|
15
|
+
* differs from the site-level context.
|
|
16
|
+
*/
|
|
5
17
|
export declare const library_context: {
|
|
6
|
-
get: (error_message?: string) => Library;
|
|
7
|
-
get_maybe: () => Library | undefined;
|
|
8
|
-
set: (value: Library) => Library;
|
|
18
|
+
get: (error_message?: string) => () => Library;
|
|
19
|
+
get_maybe: () => (() => Library) | undefined;
|
|
20
|
+
set: (value: () => Library) => () => Library;
|
|
9
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Sets `library_context` for the component's subtree to a getter that prefers
|
|
24
|
+
* the component's `library` prop and falls back to the ancestor's value,
|
|
25
|
+
* returning the resolved getter.
|
|
26
|
+
*
|
|
27
|
+
* Pass `get_library_prop` as a getter (not a snapshot) so prop changes remain
|
|
28
|
+
* reactive. The ancestor lookup happens once at component init, before the
|
|
29
|
+
* projection — the fallback sees the parent value, not the projection.
|
|
30
|
+
*
|
|
31
|
+
* @param get_library_prop - Getter for the component's `library` prop. A thunk so the prop stays reactive.
|
|
32
|
+
* @param component_name - Used in the error when neither the prop nor the context provides a library.
|
|
33
|
+
* @returns getter for the resolved library; read it lazily, e.g. `$derived(get_library())`
|
|
34
|
+
* @initializes
|
|
35
|
+
*/
|
|
36
|
+
export declare const set_library_context_with_fallback: (get_library_prop: () => Library | undefined, component_name: string) => (() => Library);
|
|
10
37
|
/**
|
|
11
38
|
* Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
|
|
12
39
|
*/
|
|
@@ -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;AAElE,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAW1C,eAAO,MAAM,eAAe
|
|
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;AAElE,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAW1C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;2CAAwB,OAAO;4BAAP,OAAO;uBAAP,OAAO,WAAP,OAAO;CAAG,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iCAAiC,GAC7C,kBAAkB,MAAM,OAAO,GAAG,SAAS,EAC3C,gBAAgB,MAAM,KACpB,CAAC,MAAM,OAAO,CAWhB,CAAC;AAEF;;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,QAAQ,iDAAwC;IACzD,QAAQ,CAAC,WAAW,wDAA2C;IAI/D,QAAQ,CAAC,IAAI,SAAgC;IAC7C,QAAQ,CAAC,SAAS,SAAiD;IACnE,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAuD;IAC7E,QAAQ,CAAC,UAAU,gBAAkD;IACrE,QAAQ,CAAC,YAAY,EAAE,GAAG,GAAG,IAAI,CAA4C;IAC7E,QAAQ,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAA6D;IAC1F,QAAQ,CAAC,QAAQ,SAAoE;IACrF,QAAQ,CAAC,SAAS,UAAiD;IACnE,QAAQ,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAgE;IAC5F,QAAQ,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAEhC;IAEF;;OAEG;IACH,QAAQ,CAAC,OAAO,gBAA8E;IAE9F;;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;IAatD;;;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"}
|
package/dist/library.svelte.js
CHANGED
|
@@ -3,7 +3,45 @@ import { create_context } from './context_helpers.js';
|
|
|
3
3
|
import { Declaration } from './declaration.svelte.js';
|
|
4
4
|
import { Module } from './module.svelte.js';
|
|
5
5
|
import { package_is_published, repo_name_parse, repo_url_github_owner, repo_url_parse, url_github_file, url_logo, url_npm_package, } from '@fuzdev/fuz_util/package_helpers.js';
|
|
6
|
+
/**
|
|
7
|
+
* Holds a getter to the active `Library` for the current subtree.
|
|
8
|
+
*
|
|
9
|
+
* The getter form keeps consumers reactive when the library changes without
|
|
10
|
+
* requiring a remount — set it with a closure over reactive state, e.g.
|
|
11
|
+
* `library_context.set(() => library)`. Components that accept a `library`
|
|
12
|
+
* prop (`LibraryDetail`, `ApiIndex`, `ApiModule`) project the prop into this
|
|
13
|
+
* context for their subtree, so descendants like `ModuleLink`,
|
|
14
|
+
* `DeclarationLink`, and TSDoc-rendered `DocsLink` resolve against the same
|
|
15
|
+
* library — including when an aggregator renders a foreign library that
|
|
16
|
+
* differs from the site-level context.
|
|
17
|
+
*/
|
|
6
18
|
export const library_context = create_context();
|
|
19
|
+
/**
|
|
20
|
+
* Sets `library_context` for the component's subtree to a getter that prefers
|
|
21
|
+
* the component's `library` prop and falls back to the ancestor's value,
|
|
22
|
+
* returning the resolved getter.
|
|
23
|
+
*
|
|
24
|
+
* Pass `get_library_prop` as a getter (not a snapshot) so prop changes remain
|
|
25
|
+
* reactive. The ancestor lookup happens once at component init, before the
|
|
26
|
+
* projection — the fallback sees the parent value, not the projection.
|
|
27
|
+
*
|
|
28
|
+
* @param get_library_prop - Getter for the component's `library` prop. A thunk so the prop stays reactive.
|
|
29
|
+
* @param component_name - Used in the error when neither the prop nor the context provides a library.
|
|
30
|
+
* @returns getter for the resolved library; read it lazily, e.g. `$derived(get_library())`
|
|
31
|
+
* @initializes
|
|
32
|
+
*/
|
|
33
|
+
export const set_library_context_with_fallback = (get_library_prop, component_name) => {
|
|
34
|
+
const get_outer = library_context.get_maybe();
|
|
35
|
+
const get_library = () => {
|
|
36
|
+
const value = get_library_prop() ?? get_outer?.();
|
|
37
|
+
if (!value) {
|
|
38
|
+
throw Error(`${component_name} requires a \`library\` prop or a set \`library_context\``);
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
};
|
|
42
|
+
library_context.set(get_library);
|
|
43
|
+
return get_library;
|
|
44
|
+
};
|
|
7
45
|
/**
|
|
8
46
|
* Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
|
|
9
47
|
*/
|
package/dist/module.svelte.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModuleJsonInput } from 'svelte-docinfo/types.js';
|
|
1
|
+
import type { ModuleJsonInput, ReExportJsonInput, ExternalReExportJsonInput } from 'svelte-docinfo/types.js';
|
|
2
2
|
import { Declaration } from './declaration.svelte.js';
|
|
3
3
|
import type { Library } from './library.svelte.js';
|
|
4
4
|
/**
|
|
@@ -49,6 +49,10 @@ export declare class Module {
|
|
|
49
49
|
* GitHub source URL.
|
|
50
50
|
*/
|
|
51
51
|
url_github: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the module has renderable declarations (after the default-export
|
|
54
|
+
* filter in `declarations`).
|
|
55
|
+
*/
|
|
52
56
|
has_declarations: boolean;
|
|
53
57
|
has_module_comment: boolean;
|
|
54
58
|
/**
|
|
@@ -61,6 +65,63 @@ export declare class Module {
|
|
|
61
65
|
dependents: string[];
|
|
62
66
|
has_dependencies: boolean;
|
|
63
67
|
has_dependents: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Same-name re-export edges in this module's source (`ModuleJson.reExports`)
|
|
70
|
+
* — the forward view of declarations' `alsoExportedFrom`, sorted by name
|
|
71
|
+
* then module. Renamed re-exports appear as declarations with `aliasOf`
|
|
72
|
+
* instead, and star exports in `star_exports`.
|
|
73
|
+
*/
|
|
74
|
+
re_exports: {
|
|
75
|
+
name: string;
|
|
76
|
+
module: string;
|
|
77
|
+
typeOnly?: boolean | undefined;
|
|
78
|
+
sourceLine?: number | undefined;
|
|
79
|
+
}[];
|
|
80
|
+
has_re_exports: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Modules fully re-exported via `export * from './module'`
|
|
83
|
+
* (`ModuleJson.starExports`), in source order. Star-projected symbols are
|
|
84
|
+
* not materialized as declarations or `re_exports` edges — this is their
|
|
85
|
+
* sole encoding.
|
|
86
|
+
*/
|
|
87
|
+
star_exports: string[];
|
|
88
|
+
has_star_exports: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Re-export edges grouped by canonical module path, groups sorted by path.
|
|
91
|
+
* Entries within each group keep their name-sorted serialized order.
|
|
92
|
+
*/
|
|
93
|
+
re_exports_by_module: Map<string, Array<ReExportJsonInput>>;
|
|
94
|
+
/**
|
|
95
|
+
* Re-exports whose immediate target is an external package
|
|
96
|
+
* (`ModuleJson.externalReExports`) — `export {x} from 'pkg'` and
|
|
97
|
+
* `export * as ns from 'pkg'` forms, sorted by name then specifier.
|
|
98
|
+
*/
|
|
99
|
+
external_re_exports: {
|
|
100
|
+
name: string;
|
|
101
|
+
specifier: string;
|
|
102
|
+
originalName?: string | undefined;
|
|
103
|
+
typeOnly?: boolean | undefined;
|
|
104
|
+
sourceLine?: number | undefined;
|
|
105
|
+
}[];
|
|
106
|
+
has_external_re_exports: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* External re-exports grouped by package specifier, groups sorted by
|
|
109
|
+
* specifier. Entries within each group keep their name-sorted serialized
|
|
110
|
+
* order.
|
|
111
|
+
*/
|
|
112
|
+
external_re_exports_by_specifier: Map<string, Array<ExternalReExportJsonInput>>;
|
|
113
|
+
/**
|
|
114
|
+
* External packages fully re-exported via `export * from 'pkg'`
|
|
115
|
+
* (`ModuleJson.externalStarExports`), in source order. The projected
|
|
116
|
+
* names are unknown — the package isn't analyzed.
|
|
117
|
+
*/
|
|
118
|
+
external_star_exports: string[];
|
|
119
|
+
has_external_star_exports: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the module re-exports anything in any form — same-name edges,
|
|
122
|
+
* star exports, or the external variants of both.
|
|
123
|
+
*/
|
|
124
|
+
has_any_re_exports: boolean;
|
|
64
125
|
constructor(library: Library, module_json: ModuleJsonInput);
|
|
65
126
|
/**
|
|
66
127
|
* Look up a declaration by name within this module.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAwBjD;;;;;;;;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;;;;;OAKG;IACH,YAAY,qBAIV;IAEF;;OAEG;IACH,UAAU,qBAIR;IAEF;;;OAGG;IACH,gBAAgB,EAAE,OAAO,CAA0C;IAEnE,kBAAkB,EAAE,OAAO,CAAmC;IAE9D;;OAEG;IACH,YAAY,WAAiD;IAE7D;;OAEG;IACH,UAAU,WAA+C;IAEzD,gBAAgB,EAAE,OAAO,CAA0C;IAEnE,cAAc,EAAE,OAAO,CAAwC;IAE/D;;;;;OAKG;IACH,UAAU;;;;;QAA8C;IAExD,cAAc,EAAE,OAAO,CAAwC;IAE/D;;;;;OAKG;IACH,YAAY,WAAgD;IAE5D,gBAAgB,EAAE,OAAO,CAA0C;IAEnE;;;OAGG;IACH,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAEzD;IAEF;;;;OAIG;IACH,mBAAmB;;;;;;QAAsD;IAEzE,uBAAuB,EAAE,OAAO,CAAiD;IAEjF;;;;OAIG;IACH,gCAAgC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAE7E;IAEF;;;;OAIG;IACH,qBAAqB,WAAwD;IAE7E,yBAAyB,EAAE,OAAO,CAAmD;IAErF;;;OAGG;IACH,kBAAkB,EAAE,OAAO,CAKzB;gBAEU,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
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { Declaration } from './declaration.svelte.js';
|
|
2
2
|
import { url_github_file } from '@fuzdev/fuz_util/package_helpers.js';
|
|
3
|
+
/**
|
|
4
|
+
* Groups entries by a string key, with groups sorted by key. Entries within
|
|
5
|
+
* each group keep their input order.
|
|
6
|
+
*/
|
|
7
|
+
const group_sorted = (entries, get_key) => {
|
|
8
|
+
const by_key = new Map();
|
|
9
|
+
for (const entry of entries) {
|
|
10
|
+
const key = get_key(entry);
|
|
11
|
+
let group = by_key.get(key);
|
|
12
|
+
if (!group) {
|
|
13
|
+
group = [];
|
|
14
|
+
by_key.set(key, group);
|
|
15
|
+
}
|
|
16
|
+
group.push(entry);
|
|
17
|
+
}
|
|
18
|
+
return new Map([...by_key].sort(([a], [b]) => a.localeCompare(b)));
|
|
19
|
+
};
|
|
3
20
|
/**
|
|
4
21
|
* Rich runtime representation of a module with computed properties.
|
|
5
22
|
*
|
|
@@ -58,7 +75,11 @@ export class Module {
|
|
|
58
75
|
url_github = $derived(this.library.repo_url
|
|
59
76
|
? url_github_file(this.library.repo_url, `src/lib/${this.path}`)
|
|
60
77
|
: undefined);
|
|
61
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Whether the module has renderable declarations (after the default-export
|
|
80
|
+
* filter in `declarations`).
|
|
81
|
+
*/
|
|
82
|
+
has_declarations = $derived(this.declarations.length > 0);
|
|
62
83
|
has_module_comment = $derived(!!this.module_comment);
|
|
63
84
|
/**
|
|
64
85
|
* Modules this imports (paths relative to src/lib).
|
|
@@ -70,6 +91,55 @@ export class Module {
|
|
|
70
91
|
dependents = $derived(this.module_json.dependents ?? []);
|
|
71
92
|
has_dependencies = $derived(this.dependencies.length > 0);
|
|
72
93
|
has_dependents = $derived(this.dependents.length > 0);
|
|
94
|
+
/**
|
|
95
|
+
* Same-name re-export edges in this module's source (`ModuleJson.reExports`)
|
|
96
|
+
* — the forward view of declarations' `alsoExportedFrom`, sorted by name
|
|
97
|
+
* then module. Renamed re-exports appear as declarations with `aliasOf`
|
|
98
|
+
* instead, and star exports in `star_exports`.
|
|
99
|
+
*/
|
|
100
|
+
re_exports = $derived(this.module_json.reExports ?? []);
|
|
101
|
+
has_re_exports = $derived(this.re_exports.length > 0);
|
|
102
|
+
/**
|
|
103
|
+
* Modules fully re-exported via `export * from './module'`
|
|
104
|
+
* (`ModuleJson.starExports`), in source order. Star-projected symbols are
|
|
105
|
+
* not materialized as declarations or `re_exports` edges — this is their
|
|
106
|
+
* sole encoding.
|
|
107
|
+
*/
|
|
108
|
+
star_exports = $derived(this.module_json.starExports ?? []);
|
|
109
|
+
has_star_exports = $derived(this.star_exports.length > 0);
|
|
110
|
+
/**
|
|
111
|
+
* Re-export edges grouped by canonical module path, groups sorted by path.
|
|
112
|
+
* Entries within each group keep their name-sorted serialized order.
|
|
113
|
+
*/
|
|
114
|
+
re_exports_by_module = $derived(group_sorted(this.re_exports, (entry) => entry.module));
|
|
115
|
+
/**
|
|
116
|
+
* Re-exports whose immediate target is an external package
|
|
117
|
+
* (`ModuleJson.externalReExports`) — `export {x} from 'pkg'` and
|
|
118
|
+
* `export * as ns from 'pkg'` forms, sorted by name then specifier.
|
|
119
|
+
*/
|
|
120
|
+
external_re_exports = $derived(this.module_json.externalReExports ?? []);
|
|
121
|
+
has_external_re_exports = $derived(this.external_re_exports.length > 0);
|
|
122
|
+
/**
|
|
123
|
+
* External re-exports grouped by package specifier, groups sorted by
|
|
124
|
+
* specifier. Entries within each group keep their name-sorted serialized
|
|
125
|
+
* order.
|
|
126
|
+
*/
|
|
127
|
+
external_re_exports_by_specifier = $derived(group_sorted(this.external_re_exports, (entry) => entry.specifier));
|
|
128
|
+
/**
|
|
129
|
+
* External packages fully re-exported via `export * from 'pkg'`
|
|
130
|
+
* (`ModuleJson.externalStarExports`), in source order. The projected
|
|
131
|
+
* names are unknown — the package isn't analyzed.
|
|
132
|
+
*/
|
|
133
|
+
external_star_exports = $derived(this.module_json.externalStarExports ?? []);
|
|
134
|
+
has_external_star_exports = $derived(this.external_star_exports.length > 0);
|
|
135
|
+
/**
|
|
136
|
+
* Whether the module re-exports anything in any form — same-name edges,
|
|
137
|
+
* star exports, or the external variants of both.
|
|
138
|
+
*/
|
|
139
|
+
has_any_re_exports = $derived(this.has_re_exports ||
|
|
140
|
+
this.has_star_exports ||
|
|
141
|
+
this.has_external_re_exports ||
|
|
142
|
+
this.has_external_star_exports);
|
|
73
143
|
constructor(library, module_json) {
|
|
74
144
|
this.library = library;
|
|
75
145
|
this.module_json = module_json;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.203.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"prettier-plugin-svelte": "^3.5.1",
|
|
106
106
|
"svelte": "^5.56.0",
|
|
107
107
|
"svelte-check": "^4.4.8",
|
|
108
|
-
"svelte-docinfo": "^0.
|
|
108
|
+
"svelte-docinfo": "^0.5.1",
|
|
109
109
|
"svelte2tsx": "^0.7.55",
|
|
110
110
|
"tslib": "^2.8.1",
|
|
111
111
|
"typescript": "^5.9.3",
|