shelving 1.241.0 → 1.242.1
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/extract/DirectoryExtractor.d.ts +3 -12
- package/extract/DirectoryExtractor.js +3 -12
- package/extract/IndexExtractor.d.ts +3 -12
- package/extract/IndexExtractor.js +3 -12
- package/extract/MergingExtractor.d.ts +3 -12
- package/extract/MergingExtractor.js +3 -12
- package/extract/ModuleExtractor.d.ts +2 -8
- package/extract/ModuleExtractor.js +2 -8
- package/extract/PackageExtractor.d.ts +3 -12
- package/extract/PackageExtractor.js +3 -12
- package/extract/TypescriptExtractor.d.ts +4 -11
- package/extract/TypescriptExtractor.js +65 -180
- package/package.json +1 -1
- package/react/createAPIContext.d.ts +1 -4
- package/react/createAPIContext.js +1 -4
- package/react/createDBContext.d.ts +1 -4
- package/react/createDBContext.js +1 -4
- package/react/useInstance.d.ts +1 -4
- package/react/useInstance.js +1 -4
- package/react/useLazy.d.ts +1 -4
- package/react/useMap.d.ts +0 -2
- package/react/useMap.js +0 -2
- package/react/useReduce.d.ts +0 -2
- package/react/useSequence.d.ts +1 -4
- package/react/useSequence.js +1 -4
- package/react/useStore.d.ts +0 -2
- package/schema/AddressSchema.d.ts +2 -2
- package/schema/AddressSchema.js +2 -2
- package/schema/ArraySchema.d.ts +1 -1
- package/schema/ArraySchema.js +1 -1
- package/schema/BooleanSchema.d.ts +1 -1
- package/schema/BooleanSchema.js +1 -1
- package/schema/ChoiceSchema.d.ts +1 -1
- package/schema/ChoiceSchema.js +1 -1
- package/schema/ColorSchema.d.ts +2 -2
- package/schema/ColorSchema.js +2 -2
- package/schema/CountrySchema.d.ts +2 -2
- package/schema/CountrySchema.js +2 -2
- package/schema/CurrencyAmountSchema.d.ts +8 -8
- package/schema/CurrencyAmountSchema.js +8 -8
- package/schema/CurrencyCodeSchema.d.ts +2 -2
- package/schema/CurrencyCodeSchema.js +2 -2
- package/schema/DataSchema.d.ts +4 -4
- package/schema/DataSchema.js +3 -3
- package/schema/DateSchema.d.ts +2 -2
- package/schema/DateSchema.js +2 -2
- package/schema/DateTimeSchema.d.ts +2 -2
- package/schema/DateTimeSchema.js +2 -2
- package/schema/DictionarySchema.d.ts +1 -1
- package/schema/DictionarySchema.js +1 -1
- package/schema/EmailSchema.d.ts +2 -2
- package/schema/EmailSchema.js +2 -2
- package/schema/EntitySchema.d.ts +2 -2
- package/schema/EntitySchema.js +2 -2
- package/schema/FileSchema.d.ts +2 -2
- package/schema/FileSchema.js +2 -2
- package/schema/KeySchema.d.ts +2 -2
- package/schema/KeySchema.js +2 -2
- package/schema/NullableSchema.d.ts +1 -1
- package/schema/NullableSchema.js +1 -1
- package/schema/NumberSchema.d.ts +10 -10
- package/schema/NumberSchema.js +10 -10
- package/schema/OptionalSchema.d.ts +1 -1
- package/schema/OptionalSchema.js +1 -1
- package/schema/PasswordSchema.d.ts +1 -1
- package/schema/PasswordSchema.js +1 -1
- package/schema/PhoneSchema.d.ts +2 -2
- package/schema/PhoneSchema.js +2 -2
- package/schema/RequiredSchema.d.ts +1 -1
- package/schema/RequiredSchema.js +1 -1
- package/schema/SlugSchema.d.ts +2 -6
- package/schema/SlugSchema.js +2 -6
- package/schema/StringSchema.d.ts +6 -6
- package/schema/StringSchema.js +6 -6
- package/schema/TimeSchema.d.ts +2 -2
- package/schema/TimeSchema.js +2 -2
- package/schema/URISchema.d.ts +2 -6
- package/schema/URISchema.js +2 -6
- package/schema/URLSchema.d.ts +2 -6
- package/schema/URLSchema.js +2 -6
- package/schema/UUIDSchema.d.ts +2 -6
- package/schema/UUIDSchema.js +2 -6
- package/ui/block/Address.d.ts +0 -12
- package/ui/block/Address.js +1 -12
- package/ui/block/Address.tsx +1 -13
- package/ui/block/Block.d.ts +11 -6
- package/ui/block/Block.js +12 -4
- package/ui/block/Block.tsx +23 -20
- package/ui/block/Blockquote.d.ts +0 -12
- package/ui/block/Blockquote.js +1 -12
- package/ui/block/Blockquote.tsx +1 -13
- package/ui/block/Caption.d.ts +0 -12
- package/ui/block/Caption.js +1 -12
- package/ui/block/Caption.tsx +1 -13
- package/ui/block/Definitions.d.ts +0 -12
- package/ui/block/Definitions.js +1 -12
- package/ui/block/Definitions.tsx +1 -13
- package/ui/block/Divider.d.ts +0 -12
- package/ui/block/Divider.js +1 -12
- package/ui/block/Divider.tsx +1 -13
- package/ui/block/Heading.d.ts +0 -12
- package/ui/block/Heading.js +1 -12
- package/ui/block/Heading.md +1 -1
- package/ui/block/Heading.tsx +1 -13
- package/ui/block/Image.d.ts +0 -12
- package/ui/block/Image.js +1 -12
- package/ui/block/Image.tsx +1 -13
- package/ui/block/Label.d.ts +0 -6
- package/ui/block/Label.js +1 -6
- package/ui/block/Label.tsx +1 -6
- package/ui/block/List.d.ts +0 -18
- package/ui/block/List.js +2 -18
- package/ui/block/List.tsx +2 -19
- package/ui/block/Paragraph.d.ts +11 -12
- package/ui/block/Paragraph.js +12 -10
- package/ui/block/Paragraph.tsx +20 -24
- package/ui/block/Preformatted.d.ts +0 -12
- package/ui/block/Preformatted.js +0 -12
- package/ui/block/Preformatted.tsx +0 -14
- package/ui/block/Prose.js +26 -25
- package/ui/block/Prose.tsx +49 -48
- package/ui/block/Section.d.ts +11 -12
- package/ui/block/Section.js +11 -9
- package/ui/block/Section.tsx +16 -26
- package/ui/block/Subheading.d.ts +0 -12
- package/ui/block/Subheading.js +1 -12
- package/ui/block/Subheading.tsx +1 -13
- package/ui/block/Table.d.ts +0 -12
- package/ui/block/Table.js +1 -12
- package/ui/block/Table.tsx +1 -13
- package/ui/block/Title.d.ts +0 -12
- package/ui/block/Title.js +1 -12
- package/ui/block/Title.tsx +1 -13
- package/ui/docs/DocumentationButtons.d.ts +2 -2
- package/ui/docs/DocumentationButtons.js +4 -5
- package/ui/docs/DocumentationButtons.md +2 -2
- package/ui/docs/DocumentationButtons.tsx +4 -5
- package/ui/docs/DocumentationHomePage.d.ts +1 -1
- package/ui/docs/DocumentationHomePage.js +2 -2
- package/ui/docs/DocumentationHomePage.md +2 -2
- package/ui/docs/DocumentationHomePage.tsx +3 -5
- package/ui/docs/DocumentationKind.d.ts +0 -26
- package/ui/docs/DocumentationKind.js +0 -17
- package/ui/docs/DocumentationKind.tsx +0 -45
- package/ui/docs/DocumentationPage.js +10 -29
- package/ui/docs/DocumentationPage.tsx +9 -43
- package/ui/form/ButtonInput.d.ts +2 -2
- package/ui/form/ButtonInput.js +3 -2
- package/ui/form/ButtonInput.tsx +7 -3
- package/ui/form/CheckboxInput.d.ts +2 -2
- package/ui/form/CheckboxInput.js +3 -2
- package/ui/form/CheckboxInput.tsx +8 -4
- package/ui/form/DateInput.d.ts +3 -3
- package/ui/form/DateInput.js +5 -3
- package/ui/form/DateInput.tsx +6 -3
- package/ui/form/FileInput.d.ts +3 -3
- package/ui/form/FileInput.js +3 -3
- package/ui/form/FileInput.tsx +4 -3
- package/ui/form/Input.d.ts +13 -66
- package/ui/form/Input.js +11 -73
- package/ui/form/Input.tsx +16 -82
- package/ui/form/NumberInput.d.ts +3 -3
- package/ui/form/NumberInput.js +5 -3
- package/ui/form/NumberInput.tsx +6 -3
- package/ui/form/OutputInput.d.ts +2 -2
- package/ui/form/OutputInput.js +3 -2
- package/ui/form/OutputInput.tsx +4 -3
- package/ui/form/RadioInput.d.ts +2 -2
- package/ui/form/RadioInput.js +3 -2
- package/ui/form/RadioInput.tsx +5 -4
- package/ui/form/SelectInput.d.ts +2 -2
- package/ui/form/SelectInput.js +5 -3
- package/ui/form/SelectInput.tsx +8 -5
- package/ui/form/TextInput.d.ts +3 -3
- package/ui/form/TextInput.js +6 -4
- package/ui/form/TextInput.tsx +7 -4
- package/ui/inline/Code.d.ts +0 -18
- package/ui/inline/Code.js +2 -18
- package/ui/inline/Code.tsx +2 -19
- package/ui/inline/Deleted.d.ts +0 -12
- package/ui/inline/Deleted.js +1 -12
- package/ui/inline/Deleted.tsx +1 -13
- package/ui/inline/Emphasis.d.ts +0 -12
- package/ui/inline/Emphasis.js +1 -12
- package/ui/inline/Emphasis.tsx +1 -13
- package/ui/inline/Inserted.d.ts +0 -12
- package/ui/inline/Inserted.js +1 -12
- package/ui/inline/Inserted.tsx +1 -13
- package/ui/inline/Link.d.ts +0 -12
- package/ui/inline/Link.js +1 -12
- package/ui/inline/Link.tsx +1 -13
- package/ui/inline/Mark.d.ts +0 -12
- package/ui/inline/Mark.js +1 -12
- package/ui/inline/Mark.tsx +1 -13
- package/ui/inline/Small.d.ts +0 -12
- package/ui/inline/Small.js +2 -13
- package/ui/inline/Small.tsx +2 -14
- package/ui/inline/Strong.d.ts +0 -12
- package/ui/inline/Strong.js +1 -12
- package/ui/inline/Strong.tsx +1 -13
- package/ui/inline/Subscript.d.ts +0 -12
- package/ui/inline/Subscript.js +1 -12
- package/ui/inline/Subscript.tsx +1 -13
- package/ui/inline/Superscript.d.ts +0 -12
- package/ui/inline/Superscript.js +1 -12
- package/ui/inline/Superscript.tsx +1 -13
- package/ui/notice/Message.d.ts +1 -7
- package/ui/notice/Message.js +4 -10
- package/ui/notice/Message.tsx +4 -10
- package/ui/notice/Notice.d.ts +1 -1
- package/ui/notice/Notice.js +2 -3
- package/ui/notice/Notice.tsx +3 -9
- package/ui/style/Padding.d.ts +1 -1
- package/ui/style/Padding.module.css +32 -0
- package/ui/style/Padding.tsx +19 -1
- package/ui/style/Scroll.d.ts +0 -12
- package/ui/style/Scroll.js +2 -12
- package/ui/style/Scroll.tsx +2 -12
- package/ui/style/Space.d.ts +1 -1
- package/ui/style/Space.module.css +32 -0
- package/ui/style/Space.tsx +19 -1
- package/ui/style/Width.d.ts +2 -0
- package/ui/style/Width.tsx +2 -0
- package/ui/style/getSpaceClass.md +2 -0
- package/ui/tree/TreeBreadcrumbs.d.ts +3 -3
- package/ui/tree/TreeBreadcrumbs.js +4 -6
- package/ui/tree/TreeBreadcrumbs.tsx +5 -7
- package/ui/tree/TreeIndexPage.d.ts +3 -2
- package/ui/tree/TreeIndexPage.js +12 -7
- package/ui/tree/TreeIndexPage.tsx +26 -7
- package/ui/util/getClass.md +3 -3
- package/util/random.d.ts +5 -20
- package/util/random.js +5 -20
- package/util/url.d.ts +9 -40
- package/util/url.js +9 -40
|
@@ -32,10 +32,7 @@ export interface DirectoryExtractorOptions {
|
|
|
32
32
|
* - This is a pure walker: same-key merging and README absorption are intentionally *not* applied here — wrap with `MergingExtractor`
|
|
33
33
|
* and/or `IndexExtractor` to opt in to those behaviours.
|
|
34
34
|
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const tree = await new DirectoryExtractor().extract("modules/util");
|
|
38
|
-
* ```
|
|
35
|
+
* @example const tree = await new DirectoryExtractor().extract("modules/util");
|
|
39
36
|
*
|
|
40
37
|
* @see https://dhoulb.github.io/shelving/extract/DirectoryExtractor
|
|
41
38
|
*/
|
|
@@ -48,10 +45,7 @@ export declare class DirectoryExtractor extends Extractor<Path, TreeElement> {
|
|
|
48
45
|
*
|
|
49
46
|
* @param options Options including the `extractors` dispatch table, `base` path, and `ignore` patterns.
|
|
50
47
|
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const extractor = new DirectoryExtractor({ base: "/repo/modules" });
|
|
54
|
-
* ```
|
|
48
|
+
* @example const extractor = new DirectoryExtractor({ base: "/repo/modules" });
|
|
55
49
|
*/
|
|
56
50
|
constructor({ extractors, base, ignore }?: DirectoryExtractorOptions);
|
|
57
51
|
/**
|
|
@@ -60,10 +54,7 @@ export declare class DirectoryExtractor extends Extractor<Path, TreeElement> {
|
|
|
60
54
|
* @param source Path of the directory to walk — resolved against the configured `base`.
|
|
61
55
|
* @returns Promise of the root `tree-element` for the walked directory.
|
|
62
56
|
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const tree = await new DirectoryExtractor().extract("modules/util");
|
|
66
|
-
* ```
|
|
57
|
+
* @example const tree = await new DirectoryExtractor().extract("modules/util");
|
|
67
58
|
*
|
|
68
59
|
* @see https://dhoulb.github.io/shelving/extract/DirectoryExtractor/extract
|
|
69
60
|
*/
|
|
@@ -27,10 +27,7 @@ const DEFAULT_IGNORE = [/\.test\.tsx?$/i, /\.spec\.tsx?$/i, /^node_modules$/i, /
|
|
|
27
27
|
* - This is a pure walker: same-key merging and README absorption are intentionally *not* applied here — wrap with `MergingExtractor`
|
|
28
28
|
* and/or `IndexExtractor` to opt in to those behaviours.
|
|
29
29
|
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const tree = await new DirectoryExtractor().extract("modules/util");
|
|
33
|
-
* ```
|
|
30
|
+
* @example const tree = await new DirectoryExtractor().extract("modules/util");
|
|
34
31
|
*
|
|
35
32
|
* @see https://dhoulb.github.io/shelving/extract/DirectoryExtractor
|
|
36
33
|
*/
|
|
@@ -43,10 +40,7 @@ export class DirectoryExtractor extends Extractor {
|
|
|
43
40
|
*
|
|
44
41
|
* @param options Options including the `extractors` dispatch table, `base` path, and `ignore` patterns.
|
|
45
42
|
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* const extractor = new DirectoryExtractor({ base: "/repo/modules" });
|
|
49
|
-
* ```
|
|
43
|
+
* @example const extractor = new DirectoryExtractor({ base: "/repo/modules" });
|
|
50
44
|
*/
|
|
51
45
|
constructor({ extractors = DEFAULT_EXTRACTORS, base, ignore = DEFAULT_IGNORE } = {}) {
|
|
52
46
|
super();
|
|
@@ -60,10 +54,7 @@ export class DirectoryExtractor extends Extractor {
|
|
|
60
54
|
* @param source Path of the directory to walk — resolved against the configured `base`.
|
|
61
55
|
* @returns Promise of the root `tree-element` for the walked directory.
|
|
62
56
|
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const tree = await new DirectoryExtractor().extract("modules/util");
|
|
66
|
-
* ```
|
|
57
|
+
* @example const tree = await new DirectoryExtractor().extract("modules/util");
|
|
67
58
|
*
|
|
68
59
|
* @see https://dhoulb.github.io/shelving/extract/DirectoryExtractor/extract
|
|
69
60
|
*/
|
|
@@ -21,10 +21,7 @@ export interface IndexExtractorOptions {
|
|
|
21
21
|
* - The matched child is removed from the parent's children list.
|
|
22
22
|
* - Purely name-based: it doesn't care whether an element is a directory or a file — any element with children is processed, deepest level first.
|
|
23
23
|
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
27
|
-
* ```
|
|
24
|
+
* @example const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
28
25
|
*
|
|
29
26
|
* @see https://dhoulb.github.io/shelving/extract/IndexExtractor
|
|
30
27
|
*/
|
|
@@ -36,10 +33,7 @@ export declare class IndexExtractor<I> extends ThroughExtractor<I, TreeElement>
|
|
|
36
33
|
* @param source Upstream extractor that produces the `tree-element` tree to process.
|
|
37
34
|
* @param options Options including the `index` filename patterns.
|
|
38
35
|
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
42
|
-
* ```
|
|
36
|
+
* @example const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
43
37
|
*/
|
|
44
38
|
constructor(source: Extractor<I, TreeElement>, { index }?: IndexExtractorOptions);
|
|
45
39
|
/**
|
|
@@ -48,10 +42,7 @@ export declare class IndexExtractor<I> extends ThroughExtractor<I, TreeElement>
|
|
|
48
42
|
* @param input Input forwarded to the wrapped source extractor.
|
|
49
43
|
* @returns The source tree with index children folded into their parents.
|
|
50
44
|
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const tree = await new IndexExtractor(source).extract(input);
|
|
54
|
-
* ```
|
|
45
|
+
* @example const tree = await new IndexExtractor(source).extract(input);
|
|
55
46
|
*
|
|
56
47
|
* @see https://dhoulb.github.io/shelving/extract/IndexExtractor/extract
|
|
57
48
|
*/
|
|
@@ -15,10 +15,7 @@ const DEFAULT_INDEX = [/^readme\.txt$/i, /^readme\.md$/i, /^index\.md$/i, /^inde
|
|
|
15
15
|
* - The matched child is removed from the parent's children list.
|
|
16
16
|
* - Purely name-based: it doesn't care whether an element is a directory or a file — any element with children is processed, deepest level first.
|
|
17
17
|
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
21
|
-
* ```
|
|
18
|
+
* @example const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
22
19
|
*
|
|
23
20
|
* @see https://dhoulb.github.io/shelving/extract/IndexExtractor
|
|
24
21
|
*/
|
|
@@ -30,10 +27,7 @@ export class IndexExtractor extends ThroughExtractor {
|
|
|
30
27
|
* @param source Upstream extractor that produces the `tree-element` tree to process.
|
|
31
28
|
* @param options Options including the `index` filename patterns.
|
|
32
29
|
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
36
|
-
* ```
|
|
30
|
+
* @example const extractor = new IndexExtractor(new DirectoryExtractor());
|
|
37
31
|
*/
|
|
38
32
|
constructor(source, { index = DEFAULT_INDEX } = {}) {
|
|
39
33
|
super(source);
|
|
@@ -45,10 +39,7 @@ export class IndexExtractor extends ThroughExtractor {
|
|
|
45
39
|
* @param input Input forwarded to the wrapped source extractor.
|
|
46
40
|
* @returns The source tree with index children folded into their parents.
|
|
47
41
|
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* const tree = await new IndexExtractor(source).extract(input);
|
|
51
|
-
* ```
|
|
42
|
+
* @example const tree = await new IndexExtractor(source).extract(input);
|
|
52
43
|
*
|
|
53
44
|
* @see https://dhoulb.github.io/shelving/extract/IndexExtractor/extract
|
|
54
45
|
*/
|
|
@@ -26,10 +26,7 @@ export interface MergingExtractorOptions {
|
|
|
26
26
|
* `content`, and `children` are folded in via `mergeTreeElements()`.
|
|
27
27
|
* - A secondary with no matching token or file is left in place — pure prose files (e.g. `concepts.md` with no `concepts.ts`) stand alone.
|
|
28
28
|
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
32
|
-
* ```
|
|
29
|
+
* @example const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
33
30
|
*
|
|
34
31
|
* @see https://dhoulb.github.io/shelving/extract/MergingExtractor
|
|
35
32
|
*/
|
|
@@ -41,10 +38,7 @@ export declare class MergingExtractor<I> extends ThroughExtractor<I, TreeElement
|
|
|
41
38
|
* @param source Upstream extractor that produces the `tree-element` tree to merge.
|
|
42
39
|
* @param options Options including the `merges` template map.
|
|
43
40
|
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
47
|
-
* ```
|
|
41
|
+
* @example const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
48
42
|
*/
|
|
49
43
|
constructor(source: Extractor<I, TreeElement>, { merges }?: MergingExtractorOptions);
|
|
50
44
|
/**
|
|
@@ -53,10 +47,7 @@ export declare class MergingExtractor<I> extends ThroughExtractor<I, TreeElement
|
|
|
53
47
|
* @param input Input forwarded to the wrapped source extractor.
|
|
54
48
|
* @returns The source tree with matching sibling elements merged together.
|
|
55
49
|
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* const tree = await new MergingExtractor(source).extract(input);
|
|
59
|
-
* ```
|
|
50
|
+
* @example const tree = await new MergingExtractor(source).extract(input);
|
|
60
51
|
*
|
|
61
52
|
* @see https://dhoulb.github.io/shelving/extract/MergingExtractor/extract
|
|
62
53
|
*/
|
|
@@ -21,10 +21,7 @@ const DEFAULT_MERGES = {
|
|
|
21
21
|
* `content`, and `children` are folded in via `mergeTreeElements()`.
|
|
22
22
|
* - A secondary with no matching token or file is left in place — pure prose files (e.g. `concepts.md` with no `concepts.ts`) stand alone.
|
|
23
23
|
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
27
|
-
* ```
|
|
24
|
+
* @example const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
28
25
|
*
|
|
29
26
|
* @see https://dhoulb.github.io/shelving/extract/MergingExtractor
|
|
30
27
|
*/
|
|
@@ -36,10 +33,7 @@ export class MergingExtractor extends ThroughExtractor {
|
|
|
36
33
|
* @param source Upstream extractor that produces the `tree-element` tree to merge.
|
|
37
34
|
* @param options Options including the `merges` template map.
|
|
38
35
|
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
42
|
-
* ```
|
|
36
|
+
* @example const extractor = new MergingExtractor(new DirectoryExtractor());
|
|
43
37
|
*/
|
|
44
38
|
constructor(source, { merges = DEFAULT_MERGES } = {}) {
|
|
45
39
|
super(source);
|
|
@@ -51,10 +45,7 @@ export class MergingExtractor extends ThroughExtractor {
|
|
|
51
45
|
* @param input Input forwarded to the wrapped source extractor.
|
|
52
46
|
* @returns The source tree with matching sibling elements merged together.
|
|
53
47
|
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* const tree = await new MergingExtractor(source).extract(input);
|
|
57
|
-
* ```
|
|
48
|
+
* @example const tree = await new MergingExtractor(source).extract(input);
|
|
58
49
|
*
|
|
59
50
|
* @see https://dhoulb.github.io/shelving/extract/MergingExtractor/extract
|
|
60
51
|
*/
|
|
@@ -22,10 +22,7 @@ export interface ModuleExtractorInput {
|
|
|
22
22
|
* - The module's `children` are every `tree-documentation` element found by deep-walking the source — flattened across
|
|
23
23
|
* files and subdirectories, but never descending into a `tree-documentation`'s own members.
|
|
24
24
|
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
28
|
-
* ```
|
|
25
|
+
* @example const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
29
26
|
*
|
|
30
27
|
* @see https://dhoulb.github.io/shelving/extract/ModuleExtractor
|
|
31
28
|
*/
|
|
@@ -36,10 +33,7 @@ export declare class ModuleExtractor extends Extractor<ModuleExtractorInput, Doc
|
|
|
36
33
|
* @param input Module name and source element to build from.
|
|
37
34
|
* @returns `tree-documentation` element of `kind: "module"` with flattened documented children.
|
|
38
35
|
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
42
|
-
* ```
|
|
36
|
+
* @example const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
43
37
|
*
|
|
44
38
|
* @see https://dhoulb.github.io/shelving/extract/ModuleExtractor/extract
|
|
45
39
|
*/
|
|
@@ -8,10 +8,7 @@ import { Extractor } from "./Extractor.js";
|
|
|
8
8
|
* - The module's `children` are every `tree-documentation` element found by deep-walking the source — flattened across
|
|
9
9
|
* files and subdirectories, but never descending into a `tree-documentation`'s own members.
|
|
10
10
|
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
14
|
-
* ```
|
|
11
|
+
* @example const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
15
12
|
*
|
|
16
13
|
* @see https://dhoulb.github.io/shelving/extract/ModuleExtractor
|
|
17
14
|
*/
|
|
@@ -22,10 +19,7 @@ export class ModuleExtractor extends Extractor {
|
|
|
22
19
|
* @param input Module name and source element to build from.
|
|
23
20
|
* @returns `tree-documentation` element of `kind: "module"` with flattened documented children.
|
|
24
21
|
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
28
|
-
* ```
|
|
22
|
+
* @example const module = new ModuleExtractor().extract({ name: "util/string", source });
|
|
29
23
|
*
|
|
30
24
|
* @see https://dhoulb.github.io/shelving/extract/ModuleExtractor/extract
|
|
31
25
|
*/
|
|
@@ -35,10 +35,7 @@ export interface PackageExtractorOptions {
|
|
|
35
35
|
* - The `"."` root export is skipped — its content is the root tree element itself.
|
|
36
36
|
* - Throws if a static export key has no matching source element in the tree.
|
|
37
37
|
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
41
|
-
* ```
|
|
38
|
+
* @example const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
42
39
|
*
|
|
43
40
|
* @see https://dhoulb.github.io/shelving/extract/PackageExtractor
|
|
44
41
|
*/
|
|
@@ -52,10 +49,7 @@ export declare class PackageExtractor extends Extractor<Path, TreeElement> {
|
|
|
52
49
|
*
|
|
53
50
|
* @param options Options including the source `tree`, `extensions` mapping, `module` extractor, and `base` path.
|
|
54
51
|
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* const extractor = new PackageExtractor({ tree: sourceTree });
|
|
58
|
-
* ```
|
|
52
|
+
* @example const extractor = new PackageExtractor({ tree: sourceTree });
|
|
59
53
|
*/
|
|
60
54
|
constructor({ tree, extensions, module, base }: PackageExtractorOptions);
|
|
61
55
|
/**
|
|
@@ -65,10 +59,7 @@ export declare class PackageExtractor extends Extractor<Path, TreeElement> {
|
|
|
65
59
|
* @returns Promise of the root `tree-element` whose children are the module elements.
|
|
66
60
|
* @throws Error If a static export key has no matching source element in the tree, or a wildcard export is malformed.
|
|
67
61
|
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
71
|
-
* ```
|
|
62
|
+
* @example const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
72
63
|
*
|
|
73
64
|
* @see https://dhoulb.github.io/shelving/extract/PackageExtractor/extract
|
|
74
65
|
*/
|
|
@@ -19,10 +19,7 @@ const DEFAULT_EXTENSIONS = {
|
|
|
19
19
|
* - The `"."` root export is skipped — its content is the root tree element itself.
|
|
20
20
|
* - Throws if a static export key has no matching source element in the tree.
|
|
21
21
|
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
25
|
-
* ```
|
|
22
|
+
* @example const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
26
23
|
*
|
|
27
24
|
* @see https://dhoulb.github.io/shelving/extract/PackageExtractor
|
|
28
25
|
*/
|
|
@@ -36,10 +33,7 @@ export class PackageExtractor extends Extractor {
|
|
|
36
33
|
*
|
|
37
34
|
* @param options Options including the source `tree`, `extensions` mapping, `module` extractor, and `base` path.
|
|
38
35
|
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const extractor = new PackageExtractor({ tree: sourceTree });
|
|
42
|
-
* ```
|
|
36
|
+
* @example const extractor = new PackageExtractor({ tree: sourceTree });
|
|
43
37
|
*/
|
|
44
38
|
constructor({ tree, extensions = DEFAULT_EXTENSIONS, module = new ModuleExtractor(), base }) {
|
|
45
39
|
super();
|
|
@@ -55,10 +49,7 @@ export class PackageExtractor extends Extractor {
|
|
|
55
49
|
* @returns Promise of the root `tree-element` whose children are the module elements.
|
|
56
50
|
* @throws Error If a static export key has no matching source element in the tree, or a wildcard export is malformed.
|
|
57
51
|
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
61
|
-
* ```
|
|
52
|
+
* @example const tree = await new PackageExtractor({ tree: sourceTree }).extract("package.json");
|
|
62
53
|
*
|
|
63
54
|
* @see https://dhoulb.github.io/shelving/extract/PackageExtractor/extract
|
|
64
55
|
*/
|
|
@@ -7,18 +7,14 @@ import { FileExtractor } from "./FileExtractor.js";
|
|
|
7
7
|
* - Overloaded declarations sharing a name are merged into a single `tree-documentation` with multiple `signatures`.
|
|
8
8
|
* - Class declarations synthesise their `signatures`, `params`, and `returns` from the constructor — `new ClassName<…>(…)` including generics, one signature per constructor overload, with `returns` set to the class type. Param descriptions come from the constructor's `@param` first, then the class's `@param`.
|
|
9
9
|
* - A `@kind` tag in a symbol's JSDoc overrides the inferred kind — e.g. `@kind component` relabels a React component (otherwise a `function`) so the docs site groups and colours it as a component. The override also drops the trailing `()` from the title, since a non-function kind reads as a bare name.
|
|
10
|
-
* -
|
|
11
|
-
* - Sets `
|
|
12
|
-
* - Sets `title` on every `tree-documentation` child — `name()` for functions and methods, bare `name` for other kinds. Parent class context comes from the `class` prop ("member of …" affordance), never the title.
|
|
10
|
+
* - Sets `description` (a plain-text summary from the first JSDoc paragraph) on every `tree-documentation` child.
|
|
11
|
+
* - Sets `title` on every `tree-documentation` child — `name()` for functions, `Class.name()` for methods, `Class.name` for properties, bare `name` for other kinds.
|
|
13
12
|
* - Records relational metadata as raw strings for render-time linking: `class` (owning class), `readonly`, `extends`, `implements`.
|
|
14
13
|
* - Members declared with the `override` or `declare` modifier are skipped — the base class already documents overrides, and `declare` members are ambient type-only re-declarations rather than new API.
|
|
15
14
|
* - Keys are the raw declared `name` (case-preserving) so case-distinct exports like `Collection` and `COLLECTION` stay separate.
|
|
16
15
|
* - The file element itself has no `title` — a TS source file has no confident title source; renderers fall back to `name`.
|
|
17
16
|
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const element = new TypescriptExtractor().extractProps("string.ts", sourceText);
|
|
21
|
-
* ```
|
|
17
|
+
* @example const element = new TypescriptExtractor().extractProps("string.ts", sourceText);
|
|
22
18
|
*
|
|
23
19
|
* @see https://dhoulb.github.io/shelving/extract/TypescriptExtractor
|
|
24
20
|
*/
|
|
@@ -30,10 +26,7 @@ export declare class TypescriptExtractor extends FileExtractor {
|
|
|
30
26
|
* @param text Full TypeScript source text to parse.
|
|
31
27
|
* @returns Partial `tree-element` props with `name`, `description`, `content`, and `children`.
|
|
32
28
|
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const props = new TypescriptExtractor().extractProps("string.ts", sourceText);
|
|
36
|
-
* ```
|
|
29
|
+
* @example const props = new TypescriptExtractor().extractProps("string.ts", sourceText);
|
|
37
30
|
*
|
|
38
31
|
* @see https://dhoulb.github.io/shelving/extract/TypescriptExtractor/extractProps
|
|
39
32
|
*/
|