@docfy/ember 0.8.5 → 0.9.1-beta.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 +8 -5
- package/addon-main.cjs +4 -0
- package/declarations/components/docfy-demo.d.ts +44 -0
- package/declarations/components/docfy-demo.d.ts.map +1 -0
- package/declarations/components/docfy-link.d.ts +23 -0
- package/declarations/components/docfy-link.d.ts.map +1 -0
- package/declarations/components/docfy-output.d.ts +24 -0
- package/declarations/components/docfy-output.d.ts.map +1 -0
- package/declarations/components/docfy-previous-and-next-page.d.ts +23 -0
- package/declarations/components/docfy-previous-and-next-page.d.ts.map +1 -0
- package/declarations/index.d.ts +7 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/routing.d.ts +3 -0
- package/declarations/routing.d.ts.map +1 -0
- package/{services → declarations/services}/docfy.d.ts +4 -8
- package/declarations/services/docfy.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +11 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/dist/_app_/components/docfy-demo.js +1 -0
- package/dist/_app_/components/docfy-link.js +1 -0
- package/dist/_app_/components/docfy-output.js +1 -0
- package/dist/_app_/components/docfy-previous-and-next-page.js +1 -0
- package/dist/_app_/services/docfy.js +1 -0
- package/dist/components/docfy-demo.js +121 -0
- package/dist/components/docfy-demo.js.map +1 -0
- package/dist/components/docfy-link.js +58 -0
- package/dist/components/docfy-link.js.map +1 -0
- package/dist/components/docfy-output.js +43 -0
- package/dist/components/docfy-output.js.map +1 -0
- package/dist/components/docfy-previous-and-next-page.js +27 -0
- package/dist/components/docfy-previous-and-next-page.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +2 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +17 -0
- package/dist/output.js.map +1 -0
- package/dist/routing.js +29 -0
- package/dist/routing.js.map +1 -0
- package/dist/services/docfy.js +87 -0
- package/dist/services/docfy.js.map +1 -0
- package/dist/template-registry.js +2 -0
- package/dist/template-registry.js.map +1 -0
- package/package.json +91 -124
- package/-private/find-previous-or-next-page.d.ts +0 -2
- package/-private/flat-nested.d.ts +0 -2
- package/.docfy-config.js +0 -40
- package/addon/-private/find-previous-or-next-page.ts +0 -22
- package/addon/-private/flat-nested.ts +0 -18
- package/addon/components/docfy-demo/description.hbs +0 -26
- package/addon/components/docfy-demo/description.ts +0 -3
- package/addon/components/docfy-demo/example.hbs +0 -3
- package/addon/components/docfy-demo/example.ts +0 -3
- package/addon/components/docfy-demo/snippet.hbs +0 -8
- package/addon/components/docfy-demo/snippet.ts +0 -35
- package/addon/components/docfy-demo/snippets.hbs +0 -25
- package/addon/components/docfy-demo/snippets.ts +0 -27
- package/addon/components/docfy-demo.hbs +0 -10
- package/addon/components/docfy-demo.ts +0 -7
- package/addon/components/docfy-link.hbs +0 -8
- package/addon/components/docfy-link.ts +0 -54
- package/addon/components/docfy-output.hbs +0 -1
- package/addon/components/docfy-output.ts +0 -37
- package/addon/components/docfy-previous-and-next-page.hbs +0 -1
- package/addon/components/docfy-previous-and-next-page.ts +0 -20
- package/addon/helpers/docfy-eq.ts +0 -7
- package/addon/index.ts +0 -31
- package/addon/output.d.ts +0 -13
- package/addon/services/docfy.ts +0 -101
- package/app/components/docfy-demo/description.js +0 -1
- package/app/components/docfy-demo/example.js +0 -1
- package/app/components/docfy-demo/snippet.js +0 -1
- package/app/components/docfy-demo/snippets.js +0 -1
- package/app/components/docfy-demo.js +0 -1
- package/app/components/docfy-link.js +0 -1
- package/app/components/docfy-output.js +0 -1
- package/app/components/docfy-previous-and-next-page.js +0 -1
- package/app/helpers/docfy-eq.js +0 -1
- package/app/services/docfy.js +0 -1
- package/components/docfy-demo/description.d.ts +0 -3
- package/components/docfy-demo/example.d.ts +0 -3
- package/components/docfy-demo/snippet.d.ts +0 -13
- package/components/docfy-demo/snippets.d.ts +0 -11
- package/components/docfy-demo.d.ts +0 -7
- package/components/docfy-link.d.ts +0 -15
- package/components/docfy-output.d.ts +0 -16
- package/components/docfy-previous-and-next-page.d.ts +0 -12
- package/config/environment.js +0 -5
- package/docs/components/docfy-demo.md +0 -67
- package/docs/components/docfy-link-demo/anchor.md +0 -9
- package/docs/components/docfy-link-demo/simple.md +0 -7
- package/docs/components/docfy-link.md +0 -31
- package/docs/components/docfy-output-demo/edit-page.md +0 -54
- package/docs/components/docfy-output-demo/flat.md +0 -23
- package/docs/components/docfy-output-demo/on-this-page.md +0 -30
- package/docs/components/docfy-output-demo/sidebar.md +0 -45
- package/docs/components/docfy-output-demo/top-nav.md +0 -35
- package/docs/components/docfy-output.md +0 -34
- package/docs/components/docfy-previous-and-next-page-demo/scope.md +0 -26
- package/docs/components/docfy-previous-and-next-page-demo/simple.md +0 -24
- package/docs/components/docfy-previous-and-next-page.md +0 -21
- package/docs/configuration.md +0 -57
- package/docs/index.md +0 -165
- package/docs/writing-demos-demo/demo1.md +0 -18
- package/docs/writing-demos.md +0 -109
- package/dummy-docs/README.md +0 -140
- package/dummy-docs/github-icon.png +0 -0
- package/dummy-docs/installation.md +0 -14
- package/dummy-docs/introduction.md +0 -30
- package/dummy-docs/overview.md +0 -19
- package/dummy-docs/packages/core/helpers/genereate-flat-output.md +0 -10
- package/dummy-docs/packages/core/helpers/genereate-nested-output.md +0 -12
- package/dummy-docs/packages/core/overview.md +0 -19
- package/dummy-docs/packages/ember/components/docfy-link-demo/demo1.md +0 -26
- package/dummy-docs/packages/ember/components/docfy-link-demo/demo2.md +0 -20
- package/dummy-docs/packages/ember/components/docfy-link.md +0 -19
- package/dummy-docs/packages/ember/components/docfy-output.md +0 -32
- package/dummy-docs/packages/ember/demo/my-ember-demo.md +0 -3
- package/dummy-docs/packages/ember/index.md +0 -23
- package/dummy-docs/packages/ember/installation.md +0 -14
- package/dummy-docs/packages/ember/plugins/manual-demo-insertion-demo/tomster.md +0 -15
- package/dummy-docs/packages/ember/plugins/manual-demo-insertion-demo/zoey.md +0 -9
- package/dummy-docs/packages/ember/plugins/manual-demo-insertion.md +0 -31
- package/dummy-docs/packages/ember/preview.md +0 -20
- package/ember-cli-addon.js +0 -3
- package/helpers/docfy-eq.d.ts +0 -7
- package/index.d.ts +0 -3
- package/lib/docfy-output-template.d.ts +0 -1
- package/lib/docfy-output-template.js +0 -23
- package/lib/get-config.d.ts +0 -7
- package/lib/get-config.js +0 -69
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -177
- package/lib/plugins/extract-demos-to-components.d.ts +0 -2
- package/lib/plugins/extract-demos-to-components.js +0 -149
- package/lib/plugins/preview-template.d.ts +0 -2
- package/lib/plugins/preview-template.js +0 -41
- package/lib/plugins/replace-internal-links-with-docfy-link.d.ts +0 -6
- package/lib/plugins/replace-internal-links-with-docfy-link.js +0 -44
- package/lib/plugins/types.d.ts +0 -29
- package/lib/plugins/types.js +0 -2
- package/lib/plugins/utils.d.ts +0 -31
- package/lib/plugins/utils.js +0 -139
- package/output.d.ts +0 -13
- package/src/docfy-output-template.ts +0 -20
- package/src/get-config.ts +0 -90
- package/src/index.ts +0 -229
- package/src/plugins/extract-demos-to-components.ts +0 -196
- package/src/plugins/preview-template.ts +0 -54
- package/src/plugins/replace-internal-links-with-docfy-link.ts +0 -61
- package/src/plugins/types.ts +0 -33
- package/src/plugins/utils.ts +0 -188
- package/src/tsconfig.json +0 -14
- package/src/types/broccoli-bridge.d.ts +0 -11
- package/src/types/broccoli-file-creator.d.ts +0 -11
- package/src/types/broccoli-funnel.d.ts +0 -19
- package/src/types/broccoli-merge-trees.d.ts +0 -13
- package/src/types/broccoli-source.d.ts +0 -9
- package/src/types/mdast-util-to-string.d.ts +0 -5
- package/src/types/unist-util-find.d.ts +0 -8
- package/tsconfig.json +0 -42
- package/types/dummy/index.d.ts +0 -0
- package/types/ember-get-config/index.d.ts +0 -9
- package/types/global.d.ts +0 -6
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# @docfy/ember
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Short description of the addon.]
|
|
4
4
|
|
|
5
5
|
## Compatibility
|
|
6
6
|
|
|
7
|
-
- Ember.js
|
|
8
|
-
-
|
|
9
|
-
- Node.js v10 or above
|
|
7
|
+
- Ember.js v4.12 or above
|
|
8
|
+
- Embroider or ember-auto-import v2
|
|
10
9
|
|
|
11
10
|
## Installation
|
|
12
11
|
|
|
@@ -16,7 +15,11 @@ ember install @docfy/ember
|
|
|
16
15
|
|
|
17
16
|
## Usage
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Longer description of how to use the addon in apps.]
|
|
19
|
+
|
|
20
|
+
## Contributing
|
|
21
|
+
|
|
22
|
+
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
20
23
|
|
|
21
24
|
## License
|
|
22
25
|
|
package/addon-main.cjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { TOC } from '@ember/component/template-only';
|
|
3
|
+
interface SnippetRegisterArgs {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
interface DocfyDemoExampleSignature {
|
|
8
|
+
Element: HTMLDivElement;
|
|
9
|
+
Blocks: {
|
|
10
|
+
default: [];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface DocfyDemoSnippetsSignature {
|
|
14
|
+
Blocks: {
|
|
15
|
+
default: [any];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare class DocfyDemoSnippets extends Component<DocfyDemoSnippetsSignature> {
|
|
19
|
+
snippets: SnippetRegisterArgs[];
|
|
20
|
+
active?: string;
|
|
21
|
+
registerSnippet(snippet: SnippetRegisterArgs): void;
|
|
22
|
+
setActiveSnippet(id: string): void;
|
|
23
|
+
}
|
|
24
|
+
interface DocfyDemoArgs {
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
interface DocfyDemoSignature {
|
|
28
|
+
Args: DocfyDemoArgs;
|
|
29
|
+
Element: HTMLDivElement;
|
|
30
|
+
Blocks: {
|
|
31
|
+
default: [
|
|
32
|
+
{
|
|
33
|
+
Example: TOC<DocfyDemoExampleSignature>;
|
|
34
|
+
Description: any;
|
|
35
|
+
Snippet: any;
|
|
36
|
+
Snippets: typeof DocfyDemoSnippets;
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export default class DocfyDemo extends Component<DocfyDemoSignature> {
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=docfy-demo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-demo.d.ts","sourceRoot":"","sources":["../../src/components/docfy-demo.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAU3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAQ1D,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAiFD,UAAU,yBAAyB;IACjC,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAyED,UAAU,0BAA0B;IAClC,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;KAChB,CAAC;CACH;AAED,cAAM,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAC1D,QAAQ,EAAE,mBAAmB,EAAE,CAAM;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEjB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IASnD,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAyC3C;AAGD,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,OAAO,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC;gBACxC,WAAW,EAAE,GAAG,CAAC;gBACjB,OAAO,EAAE,GAAG,CAAC;gBACb,QAAQ,EAAE,OAAO,iBAAiB,CAAC;aACpC;SACF,CAAC;KACH,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;CAoBnE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type RouterService from '@ember/routing/router-service';
|
|
3
|
+
interface DocfyLinkArgs {
|
|
4
|
+
to: string;
|
|
5
|
+
anchor?: string;
|
|
6
|
+
activeClass?: string;
|
|
7
|
+
}
|
|
8
|
+
interface DocfyLinkSignature {
|
|
9
|
+
Args: DocfyLinkArgs;
|
|
10
|
+
Element: HTMLAnchorElement;
|
|
11
|
+
Blocks: {
|
|
12
|
+
default: [];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export default class DocfyLink extends Component<DocfyLinkSignature> {
|
|
16
|
+
router: RouterService;
|
|
17
|
+
get routeName(): string | undefined;
|
|
18
|
+
get href(): string;
|
|
19
|
+
get isActive(): boolean;
|
|
20
|
+
navigate(event: MouseEvent): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=docfy-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-link.d.ts","sourceRoot":"","sources":["../../src/components/docfy-link.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAE/D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IACvC,MAAM,EAAE,aAAa,CAAC;IAEjD,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAIlC;IAED,IAAI,IAAI,IAAI,MAAM,CAWjB;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAGD,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CA4BlC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type RouterService from '@ember/routing/router-service';
|
|
3
|
+
import type DocfyService from '../services/docfy';
|
|
4
|
+
import type { NestedPageMetadata, PageMetadata } from '@docfy/core/lib/types';
|
|
5
|
+
interface DocfyOutputSignature {
|
|
6
|
+
Args: {
|
|
7
|
+
type?: 'flat' | 'nested';
|
|
8
|
+
fromCurrentURL?: boolean;
|
|
9
|
+
url?: string;
|
|
10
|
+
scope?: string;
|
|
11
|
+
};
|
|
12
|
+
Blocks: {
|
|
13
|
+
default: [
|
|
14
|
+
output: NestedPageMetadata | PageMetadata[] | PageMetadata | undefined
|
|
15
|
+
];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export default class DocfyOutput extends Component<DocfyOutputSignature> {
|
|
19
|
+
router: RouterService;
|
|
20
|
+
docfy: DocfyService;
|
|
21
|
+
get output(): NestedPageMetadata | PageMetadata[] | PageMetadata | undefined;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=docfy-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-output.d.ts","sourceRoot":"","sources":["../../src/components/docfy-output.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE9E,UAAU,oBAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;QACzB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB,GAAG,YAAY,EAAE,GAAG,YAAY,GAAG,SAAS;SACvE,CAAC;KACH,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3C,MAAM,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;IAE9C,IAAI,MAAM,IAAI,kBAAkB,GAAG,YAAY,EAAE,GAAG,YAAY,GAAG,SAAS,CAoB3E;CAMF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type DocfyService from '../services/docfy';
|
|
3
|
+
import type { PageMetadata } from '@docfy/core/lib/types';
|
|
4
|
+
interface DocfyPreviousAndNextPageArgs {
|
|
5
|
+
scope?: string;
|
|
6
|
+
}
|
|
7
|
+
interface DocfyPreviousAndNextPageSignature {
|
|
8
|
+
Args: DocfyPreviousAndNextPageArgs;
|
|
9
|
+
Element: HTMLDivElement;
|
|
10
|
+
Blocks: {
|
|
11
|
+
default: [
|
|
12
|
+
previous: PageMetadata | undefined,
|
|
13
|
+
next: PageMetadata | undefined
|
|
14
|
+
];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export default class DocfyPreviousAndNextPage extends Component<DocfyPreviousAndNextPageSignature> {
|
|
18
|
+
docfy: DocfyService;
|
|
19
|
+
get previous(): PageMetadata | undefined;
|
|
20
|
+
get next(): PageMetadata | undefined;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=docfy-previous-and-next-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-previous-and-next-page.d.ts","sourceRoot":"","sources":["../../src/components/docfy-previous-and-next-page.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,UAAU,4BAA4B;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,GAAG,SAAS;YAClC,IAAI,EAAE,YAAY,GAAG,SAAS;SAC/B,CAAC;KACH,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IACtE,KAAK,EAAE,YAAY,CAAC;IAE9C,IAAI,QAAQ,IAAI,YAAY,GAAG,SAAS,CAEvC;IAED,IAAI,IAAI,IAAI,YAAY,GAAG,SAAS,CAEnC;CAMF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as DocfyDemo } from './components/docfy-demo';
|
|
2
|
+
export { default as DocfyLink } from './components/docfy-link';
|
|
3
|
+
export { default as DocfyOutput } from './components/docfy-output';
|
|
4
|
+
export { default as DocfyPreviousAndNextPage } from './components/docfy-previous-and-next-page';
|
|
5
|
+
export { default as DocfyService } from './services/docfy.ts';
|
|
6
|
+
export { addDocfyRoutes } from './routing.ts';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,oCAAoC,CAAC;AA0BhE,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAEvD"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import Service from '@ember/service';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type RouterService from '@ember/routing/router-service';
|
|
3
|
+
import type { NestedPageMetadata, PageMetadata } from '@docfy/core/lib/types';
|
|
4
4
|
export default class DocfyService extends Service {
|
|
5
5
|
router: RouterService;
|
|
6
|
+
get currentPage(): PageMetadata | undefined;
|
|
6
7
|
get flat(): PageMetadata[];
|
|
7
8
|
get nested(): NestedPageMetadata;
|
|
8
|
-
get currentPage(): PageMetadata | undefined;
|
|
9
9
|
findNestedChildrenByName(scope: string, previousNested?: NestedPageMetadata | undefined | null): NestedPageMetadata | undefined;
|
|
10
10
|
findByUrl(url: string, scopeByNestedName?: string): PageMetadata | undefined;
|
|
11
11
|
previousPage(scopeByNestedName?: string): PageMetadata | undefined;
|
|
12
12
|
nextPage(scopeByNestedName?: string): PageMetadata | undefined;
|
|
13
13
|
private findPreviousOrNextPage;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
interface Registry {
|
|
17
|
-
docfy: DocfyService;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
15
|
+
//# sourceMappingURL=docfy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy.d.ts","sourceRoot":"","sources":["../../src/services/docfy.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAmB9E,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IACpB,MAAM,EAAE,aAAa,CAAC;IAEjD,IACI,WAAW,6BAGd;IAED,IAAI,IAAI,IAAI,YAAY,EAAE,CAEzB;IAED,IAAI,MAAM,IAAI,kBAAkB,CAE/B;IAED,wBAAwB,CACtB,KAAK,EAAE,MAAM,EACb,cAAc,GAAE,kBAAkB,GAAG,SAAS,GAAG,IAAW,GAC3D,kBAAkB,GAAG,SAAS;IAkBjC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAe5E,YAAY,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIlE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAI9D,OAAO,CAAC,sBAAsB;CAwB/B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type DocfyDemo from './components/docfy-demo';
|
|
2
|
+
import type DocfyLink from './components/docfy-link';
|
|
3
|
+
import type DocfyOutput from './components/docfy-output';
|
|
4
|
+
import type DocfyPreviousAndNextPage from './components/docfy-previous-and-next-page';
|
|
5
|
+
export default interface Registry {
|
|
6
|
+
DocfyDemo: typeof DocfyDemo;
|
|
7
|
+
DocfyLink: typeof DocfyLink;
|
|
8
|
+
DocfyOutput: typeof DocfyOutput;
|
|
9
|
+
DocfyPreviousAndNextPage: typeof DocfyPreviousAndNextPage;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,SAAS,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,wBAAwB,MAAM,+CAA+C,CAAC;AAE1F,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC/B,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,wBAAwB,EAAE,OAAO,wBAAwB,CAAC;CAC3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@docfy/ember/components/docfy-demo";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@docfy/ember/components/docfy-link";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@docfy/ember/components/docfy-output";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@docfy/ember/components/docfy-previous-and-next-page";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@docfy/ember/services/docfy";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { guidFor } from '@ember/object/internals';
|
|
6
|
+
import { schedule } from '@ember/runloop';
|
|
7
|
+
import { helper } from '@ember/component/helper';
|
|
8
|
+
import { on } from '@ember/modifier';
|
|
9
|
+
import { fn, hash } from '@ember/helper';
|
|
10
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
+
import { setComponentTemplate } from '@ember/component';
|
|
12
|
+
import templateOnly from '@ember/component/template-only';
|
|
13
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
14
|
+
|
|
15
|
+
const docfyEq = helper(function docfyEq(params) {
|
|
16
|
+
return params[0] === params[1];
|
|
17
|
+
});
|
|
18
|
+
// Shared type for snippet registration
|
|
19
|
+
|
|
20
|
+
// Description subcomponent
|
|
21
|
+
|
|
22
|
+
class DocfyDemoDescription extends Component {
|
|
23
|
+
static {
|
|
24
|
+
setComponentTemplate(precompileTemplate("\n <div class=\"docfy-demo__description\" data-test-id=\"demo-description\" ...attributes>\n <div class=\"docfy-demo__description__header\" data-test-id=\"demo-header\">\n {{#if @title}}\n <h3 class=\"docfy-demo__description__header__title\" data-test-id=\"demo-title\">\n <a href=\"#{{@id}}\">\n <span class=\"icon icon-link\"></span>\n </a>\n {{@title}}\n </h3>\n {{/if}}\n {{#if @editUrl}}\n <a href={{@editUrl}} target=\"_blank\" rel=\"noopener noreferrer\" class=\"docfy-demo__description__header__edit-url\" data-test-id=\"demo-edit-url\">\n Edit this demo\n </a>\n {{/if}}\n </div>\n\n <div class=\"docfy-demo__description__content\" data-test-id=\"demo-content\">\n {{yield}}\n </div>\n </div>\n ", {
|
|
25
|
+
strictMode: true
|
|
26
|
+
}), this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Example subcomponent
|
|
30
|
+
|
|
31
|
+
const DocfyDemoExample = setComponentTemplate(precompileTemplate("\n <div class=\"docfy-demo__example not-prose\" data-test-id=\"demo-example\" ...attributes>\n {{yield}}\n </div>\n", {
|
|
32
|
+
strictMode: true
|
|
33
|
+
}), templateOnly());
|
|
34
|
+
// Snippet subcomponent
|
|
35
|
+
|
|
36
|
+
class DocfyDemoSnippet extends Component {
|
|
37
|
+
id = guidFor(this);
|
|
38
|
+
constructor(owner, args) {
|
|
39
|
+
super(owner, args);
|
|
40
|
+
if (typeof this.args.registerSnippet === 'function') {
|
|
41
|
+
let name = this.args.name || '';
|
|
42
|
+
name = name.charAt(0).toUpperCase() + name.slice(1);
|
|
43
|
+
this.args.registerSnippet({
|
|
44
|
+
id: this.id,
|
|
45
|
+
name
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
get isActive() {
|
|
50
|
+
if (typeof this.args.registerSnippet !== 'function') {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return this.id === this.args.active;
|
|
54
|
+
}
|
|
55
|
+
static {
|
|
56
|
+
setComponentTemplate(precompileTemplate("\n {{#if this.isActive}}\n <div class=\"docfy-demo__snippet\" data-test-id=\"demo-snippet\" data-test-snippet-name=\"{{@name}}\" ...attributes>\n {{yield}}\n </div>\n {{/if}}\n ", {
|
|
57
|
+
strictMode: true
|
|
58
|
+
}), this);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Snippets subcomponent
|
|
62
|
+
|
|
63
|
+
class DocfyDemoSnippets extends Component {
|
|
64
|
+
static {
|
|
65
|
+
g(this.prototype, "snippets", [tracked], function () {
|
|
66
|
+
return [];
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
#snippets = (i(this, "snippets"), void 0);
|
|
70
|
+
static {
|
|
71
|
+
g(this.prototype, "active", [tracked]);
|
|
72
|
+
}
|
|
73
|
+
#active = (i(this, "active"), void 0);
|
|
74
|
+
registerSnippet(snippet) {
|
|
75
|
+
schedule('render', this, () => {
|
|
76
|
+
this.snippets = [...this.snippets, snippet];
|
|
77
|
+
if (!this.active) {
|
|
78
|
+
this.active = snippet.id;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
static {
|
|
83
|
+
n(this.prototype, "registerSnippet", [action]);
|
|
84
|
+
}
|
|
85
|
+
setActiveSnippet(id) {
|
|
86
|
+
this.active = id;
|
|
87
|
+
}
|
|
88
|
+
static {
|
|
89
|
+
n(this.prototype, "setActiveSnippet", [action]);
|
|
90
|
+
}
|
|
91
|
+
static {
|
|
92
|
+
setComponentTemplate(precompileTemplate("\n <div class=\"docfy-demo__snippets\" data-test-id=\"demo-snippets\">\n <div class=\"docfy-demo__snippets__tabs\" data-test-id=\"demo-tabs\">\n {{#each this.snippets as |snippet|}}\n <button type=\"button\" class=\"docfy-demo__snippets__tabs__button\n {{if (docfyEq this.active snippet.id) \"docfy-demo__snippets__tabs__button--active\"}}\" data-test-id=\"demo-tab-button\" data-test-snippet-name=\"{{snippet.name}}\" data-test-is-active=\"{{if (docfyEq this.active snippet.id) \"true\" \"false\"}}\" {{on \"click\" (fn this.setActiveSnippet snippet.id)}}>\n {{snippet.name}}\n </button>\n {{/each}}\n </div>\n\n {{yield (component DocfyDemoSnippet registerSnippet=this.registerSnippet active=this.active)}}\n </div>\n ", {
|
|
93
|
+
strictMode: true,
|
|
94
|
+
scope: () => ({
|
|
95
|
+
docfyEq,
|
|
96
|
+
on,
|
|
97
|
+
fn,
|
|
98
|
+
DocfyDemoSnippet
|
|
99
|
+
})
|
|
100
|
+
}), this);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Main DocfyDemo component
|
|
104
|
+
|
|
105
|
+
class DocfyDemo extends Component {
|
|
106
|
+
static {
|
|
107
|
+
setComponentTemplate(precompileTemplate("\n <div id={{@id}} class=\"docfy-demo\" data-test-id=\"docfy-demo\" data-test-demo-id=\"{{@id}}\" ...attributes>\n {{yield (hash Example=DocfyDemoExample Description=(component DocfyDemoDescription id=@id) Snippet=DocfyDemoSnippet Snippets=DocfyDemoSnippets)}}\n </div>\n ", {
|
|
108
|
+
strictMode: true,
|
|
109
|
+
scope: () => ({
|
|
110
|
+
hash,
|
|
111
|
+
DocfyDemoExample,
|
|
112
|
+
DocfyDemoDescription,
|
|
113
|
+
DocfyDemoSnippet,
|
|
114
|
+
DocfyDemoSnippets
|
|
115
|
+
})
|
|
116
|
+
}), this);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { DocfyDemo as default };
|
|
121
|
+
//# sourceMappingURL=docfy-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-demo.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
|
+
import { setComponentTemplate } from '@ember/component';
|
|
8
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
9
|
+
|
|
10
|
+
class DocfyLink extends Component {
|
|
11
|
+
static {
|
|
12
|
+
g(this.prototype, "router", [service('router')]);
|
|
13
|
+
}
|
|
14
|
+
#router = (i(this, "router"), void 0);
|
|
15
|
+
get routeName() {
|
|
16
|
+
const {
|
|
17
|
+
to
|
|
18
|
+
} = this.args;
|
|
19
|
+
return this.router.recognize(to)?.name;
|
|
20
|
+
}
|
|
21
|
+
get href() {
|
|
22
|
+
let url = this.args.to;
|
|
23
|
+
if (this.routeName) {
|
|
24
|
+
url = this.router.urlFor(this.routeName);
|
|
25
|
+
}
|
|
26
|
+
if (this.args.anchor) {
|
|
27
|
+
return `${url}#${this.args.anchor}`;
|
|
28
|
+
} else {
|
|
29
|
+
return url;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
get isActive() {
|
|
33
|
+
return this.router.currentRouteName === this.routeName;
|
|
34
|
+
}
|
|
35
|
+
navigate(event) {
|
|
36
|
+
if (event.ctrlKey || event.metaKey) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (this.routeName && !this.args.anchor) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
this.router.transitionTo(this.routeName);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
n(this.prototype, "navigate", [action]);
|
|
46
|
+
}
|
|
47
|
+
static {
|
|
48
|
+
setComponentTemplate(precompileTemplate("\n <a class=\"docfy-link {{if this.isActive @activeClass}}\" ...attributes href={{this.href}} data-test-docfy-link data-test-to={{@to}} data-test-anchor={{@anchor}} data-test-is-active={{this.isActive}} {{on \"click\" this.navigate}}>\n {{yield}}\n </a>\n ", {
|
|
49
|
+
strictMode: true,
|
|
50
|
+
scope: () => ({
|
|
51
|
+
on
|
|
52
|
+
})
|
|
53
|
+
}), this);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { DocfyLink as default };
|
|
58
|
+
//# sourceMappingURL=docfy-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-link.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
|
+
import { setComponentTemplate } from '@ember/component';
|
|
6
|
+
import { g, i } from 'decorator-transforms/runtime';
|
|
7
|
+
|
|
8
|
+
class DocfyOutput extends Component {
|
|
9
|
+
static {
|
|
10
|
+
g(this.prototype, "router", [service('router')]);
|
|
11
|
+
}
|
|
12
|
+
#router = (i(this, "router"), void 0);
|
|
13
|
+
static {
|
|
14
|
+
g(this.prototype, "docfy", [service('docfy')]);
|
|
15
|
+
}
|
|
16
|
+
#docfy = (i(this, "docfy"), void 0);
|
|
17
|
+
get output() {
|
|
18
|
+
if (this.args.url) {
|
|
19
|
+
return this.docfy.findByUrl(this.args.url, this.args.scope);
|
|
20
|
+
}
|
|
21
|
+
if (this.args.fromCurrentURL) {
|
|
22
|
+
const currentURL = this.router.currentURL;
|
|
23
|
+
if (!currentURL) return undefined;
|
|
24
|
+
return this.docfy.findByUrl(currentURL, this.args.scope);
|
|
25
|
+
}
|
|
26
|
+
if (this.args.scope) {
|
|
27
|
+
return this.docfy.findNestedChildrenByName(this.args.scope);
|
|
28
|
+
}
|
|
29
|
+
if (this.args.type === 'flat') {
|
|
30
|
+
return this.docfy.flat;
|
|
31
|
+
} else {
|
|
32
|
+
return this.docfy.nested;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
setComponentTemplate(precompileTemplate("{{yield this.output}}", {
|
|
37
|
+
strictMode: true
|
|
38
|
+
}), this);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { DocfyOutput as default };
|
|
43
|
+
//# sourceMappingURL=docfy-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-output.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
|
+
import { setComponentTemplate } from '@ember/component';
|
|
6
|
+
import { g, i } from 'decorator-transforms/runtime';
|
|
7
|
+
|
|
8
|
+
class DocfyPreviousAndNextPage extends Component {
|
|
9
|
+
static {
|
|
10
|
+
g(this.prototype, "docfy", [service('docfy')]);
|
|
11
|
+
}
|
|
12
|
+
#docfy = (i(this, "docfy"), void 0);
|
|
13
|
+
get previous() {
|
|
14
|
+
return this.docfy.previousPage(this.args.scope);
|
|
15
|
+
}
|
|
16
|
+
get next() {
|
|
17
|
+
return this.docfy.nextPage(this.args.scope);
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
setComponentTemplate(precompileTemplate("{{yield this.previous this.next}}", {
|
|
21
|
+
strictMode: true
|
|
22
|
+
}), this);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { DocfyPreviousAndNextPage as default };
|
|
27
|
+
//# sourceMappingURL=docfy-previous-and-next-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docfy-previous-and-next-page.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
export { default as DocfyDemo } from './components/docfy-demo.js';
|
|
3
|
+
export { default as DocfyLink } from './components/docfy-link.js';
|
|
4
|
+
export { default as DocfyOutput } from './components/docfy-output.js';
|
|
5
|
+
export { default as DocfyPreviousAndNextPage } from './components/docfy-previous-and-next-page.js';
|
|
6
|
+
export { default as DocfyService } from './services/docfy.js';
|
|
7
|
+
export { addDocfyRoutes } from './routing.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/output.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/output.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The actual output.js file is generated at build time. This is a temporary
|
|
3
|
+
* placeholder to resolve the import until the proper build-time generation
|
|
4
|
+
* is set up.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const output = {
|
|
8
|
+
nested: {
|
|
9
|
+
name: '',
|
|
10
|
+
route: '',
|
|
11
|
+
pages: [],
|
|
12
|
+
children: []
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default output;
|
|
17
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sources":["../src/output.d.ts"],"sourcesContent":["/*\n * The actual output.js file is generated at build time. This is only to\n * provide typing.\n */\nimport type { NestedPageMetadata } from '@docfy/core/lib/types';\n\ninterface Output {\n nested: NestedPageMetadata;\n}\n\ndeclare const output: Output;\n\nexport default output;\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/routing.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import output from '@embroider/virtual/docfy/output';
|
|
3
|
+
|
|
4
|
+
function addFromNested(context, nested) {
|
|
5
|
+
function add() {
|
|
6
|
+
nested.pages.forEach(page => {
|
|
7
|
+
const url = page.relativeUrl;
|
|
8
|
+
if (typeof url === 'string') {
|
|
9
|
+
if (url !== '') {
|
|
10
|
+
this.route(url);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
nested.children.forEach(node => {
|
|
15
|
+
addFromNested(this, node);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (nested.name === '/') {
|
|
19
|
+
add.call(context);
|
|
20
|
+
} else {
|
|
21
|
+
context.route(nested.name, add);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function addDocfyRoutes(context) {
|
|
25
|
+
addFromNested(context, output.nested);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { addDocfyRoutes };
|
|
29
|
+
//# sourceMappingURL=routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|