├── .editorconfig ├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── InlineAssetsPlugin.js ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── src ├── default │ ├── assets │ │ ├── css │ │ │ ├── _constants.sass │ │ │ ├── _theme.scss │ │ │ ├── elements │ │ │ │ ├── _comment.sass │ │ │ │ ├── _filter.sass │ │ │ │ ├── _footer.sass │ │ │ │ ├── _hierarchy.sass │ │ │ │ ├── _images.sass │ │ │ │ ├── _index.sass │ │ │ │ ├── _member.sass │ │ │ │ ├── _navigation.sass │ │ │ │ ├── _panel.sass │ │ │ │ ├── _search.sass │ │ │ │ ├── _signatures.sass │ │ │ │ ├── _sources.sass │ │ │ │ └── _toolbar.sass │ │ │ ├── layouts │ │ │ │ ├── _default.sass │ │ │ │ └── _minimal.sass │ │ │ ├── main.sass │ │ │ ├── setup │ │ │ │ ├── _animations.sass │ │ │ │ ├── _grid.sass │ │ │ │ ├── _icons.scss │ │ │ │ ├── _mixins.sass │ │ │ │ └── _typography.sass │ │ │ └── vendors │ │ │ │ └── _normalize.sass │ │ ├── images │ │ │ ├── icons.png │ │ │ ├── icons.psd │ │ │ ├── icons@2x.png │ │ │ ├── widgets.png │ │ │ ├── widgets.psd │ │ │ └── widgets@2x.png │ │ └── js │ │ │ └── src │ │ │ ├── bootstrap.ts │ │ │ └── typedoc │ │ │ ├── Application.ts │ │ │ ├── Component.ts │ │ │ ├── EventTarget.ts │ │ │ ├── components │ │ │ ├── Filter.ts │ │ │ ├── MenuHighlight.ts │ │ │ ├── Search.ts │ │ │ ├── Signature.ts │ │ │ └── Toggle.ts │ │ │ ├── services │ │ │ └── Viewport.ts │ │ │ └── utils │ │ │ ├── debounce.ts │ │ │ ├── pointer.ts │ │ │ └── trottle.ts │ ├── layouts │ │ └── default.hbs │ ├── partials │ │ ├── analytics.hbs │ │ ├── breadcrumb.hbs │ │ ├── comment.hbs │ │ ├── footer.hbs │ │ ├── header.hbs │ │ ├── hierarchy.hbs │ │ ├── index.hbs │ │ ├── member.declaration.hbs │ │ ├── member.getterSetter.hbs │ │ ├── member.hbs │ │ ├── member.reference.hbs │ │ ├── member.signature.body.hbs │ │ ├── member.signature.title.hbs │ │ ├── member.signatures.hbs │ │ ├── member.sources.hbs │ │ ├── members.group.hbs │ │ ├── members.hbs │ │ ├── navigation.hbs │ │ ├── parameter.hbs │ │ ├── toc.hbs │ │ ├── toc.root.hbs │ │ ├── type.hbs │ │ ├── typeAndParent.hbs │ │ └── typeParameters.hbs │ └── templates │ │ ├── index.hbs │ │ └── reflection.hbs ├── minimal │ ├── layouts │ │ └── default.hbs │ ├── partials │ │ ├── header.hbs │ │ └── member.hbs │ └── templates │ │ └── index.hbs └── plugin.js ├── tsconfig.json ├── webpack.common.js ├── webpack.config.js ├── webpack.default.js └── webpack.minimal.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 4 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [package.json] 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | npm-publish: 8 | name: npm-publish 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout repository 12 | uses: actions/checkout@v2 13 | - id: check 14 | uses: EndBug/version-check@v1 15 | with: 16 | diff-search: true 17 | - name: Set up Node.js 18 | if: steps.check.outputs.changed == 'true' 19 | uses: actions/setup-node@v1 20 | with: 21 | node-version: "12" 22 | - name: Install 23 | if: steps.check.outputs.changed == 'true' 24 | run: npm i 25 | - name: Setup publish token 26 | if: steps.check.outputs.changed == 'true' 27 | run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc 28 | env: 29 | NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} 30 | - name: Publish 31 | if: steps.check.outputs.changed == 'true' 32 | run: npm publish 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | node_modules 4 | npm-debug.log 5 | etc 6 | bin 7 | typedoc-default-themes-*.tgz 8 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.hbs 2 | bin 3 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /InlineAssetsPlugin.js: -------------------------------------------------------------------------------- 1 | class InlineAssetsPlugin { 2 | constructor(options = {}) { 3 | const { patterns = [] } = options; 4 | this.patterns = patterns; 5 | } 6 | 7 | apply(compiler) { 8 | compiler.hooks.emit.tapAsync( 9 | "InlineAssetsPlugin", 10 | (compilation, callback) => { 11 | for (const pattern of this.patterns) { 12 | const fromSource = this.getSource( 13 | compilation.getAsset(pattern.from) 14 | ); 15 | const toSource = this.getSource( 16 | compilation.getAsset(pattern.to) 17 | ); 18 | 19 | const resultSource = toSource.replace( 20 | pattern.pattern, 21 | fromSource 22 | ); 23 | 24 | compilation.updateAsset(pattern.to, { 25 | source() { 26 | return resultSource; 27 | }, 28 | size() { 29 | return resultSource.length; 30 | }, 31 | }); 32 | } 33 | 34 | callback(); 35 | } 36 | ); 37 | } 38 | 39 | getSource(asset) { 40 | let source = asset.source; 41 | if (typeof source === "function") { 42 | source = source(); 43 | } else { 44 | source = source.source(); 45 | } 46 | 47 | if (source instanceof Buffer) { 48 | return source.toString("utf8"); 49 | } 50 | 51 | return source; 52 | } 53 | } 54 | 55 | module.exports.InlineAssetsPlugin = InlineAssetsPlugin; 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deprecated 2 | 3 | As of TypeDoc 0.22, themes are created with JSX templates. Handlebars templates are no longer supported. 4 | 5 | # Default themes for TypeDoc 6 | 7 | This module contains the default themes of TypeDoc. 8 | Visit https://typedoc.org/ to learn more about TypeDoc. 9 | 10 | ## Contributing 11 | 12 | Contributions are welcome and appreciated. You can find TypeDoc on GitHub, feel free to start 13 | an issue or create a pull requests:
14 | [https://github.com/TypeStrong/typedoc](https://github.com/TypeStrong/typedoc) 15 | 16 | To use a local build of this project, run the `npm pack` command in this directory. Then 17 | in the project where you want to use your local build run `npm install ../path/to/typedoc-default-themes-VERSION.tgz` 18 | 19 | ## License 20 | 21 | Copyright (c) 2015 [Sebastian Lenz](http://www.sebastian-lenz.de).
22 | Copyright (c) 2016-2020 [TypeDoc Contributors](https://github.com/TypeStrong/typedoc/graphs/contributors).
23 | Licensed under the Apache License 2.0. 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typedoc-default-themes", 3 | "description": "Default themes for TypeDoc.", 4 | "version": "0.12.10", 5 | "homepage": "https://typedoc.org/", 6 | "main": "bin/plugin.js", 7 | "files": [ 8 | "bin", 9 | "LICENSE" 10 | ], 11 | "scripts": { 12 | "build": "webpack", 13 | "lint": "prettier --check .", 14 | "prepublishOnly": "npm run build" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/TypeStrong/typedoc-default-themes.git" 19 | }, 20 | "bugs": { 21 | "url": "https://github.com/TypeStrong/TypeDoc/issues" 22 | }, 23 | "license": "Apache-2.0", 24 | "engines": { 25 | "node": ">= 8" 26 | }, 27 | "devDependencies": { 28 | "@types/lunr": "^2.3.3", 29 | "clean-webpack-plugin": "^3.0.0", 30 | "copy-webpack-plugin": "^7.0.0", 31 | "css-loader": "^5.0.1", 32 | "file-loader": "^6.2.0", 33 | "lunr": "^2.3.9", 34 | "mini-css-extract-plugin": "^1.3.3", 35 | "prettier": "^2.2.1", 36 | "resolve-url-loader": "^3.1.2", 37 | "sass": "^1.30.0", 38 | "sass-loader": "^10.1.0", 39 | "ts-loader": "^8.0.12", 40 | "typescript": "^4.1.3", 41 | "url-loader": "^4.1.1", 42 | "webpack": "^5.11.1", 43 | "webpack-cli": "^4.3.0", 44 | "webpack-merge": "^5.7.3" 45 | }, 46 | "keywords": [ 47 | "typescript", 48 | "documentation", 49 | "generator" 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /src/default/assets/css/_constants.sass: -------------------------------------------------------------------------------- 1 | // Fonts 2 | // 3 | $FONT_FAMILY: 'Segoe UI', sans-serif 4 | $FONT_FAMILY_MONO: Menlo, Monaco, Consolas, 'Courier New', monospace 5 | 6 | $FONT_SIZE: 16px 7 | $FONT_SIZE_MONO: 14px 8 | 9 | $LINE_HEIGHT: 1.333em 10 | 11 | $TOOLBAR_HEIGHT: 40px 12 | -------------------------------------------------------------------------------- /src/default/assets/css/_theme.scss: -------------------------------------------------------------------------------- 1 | // Default light theme 2 | :root { 3 | --color-background: #fdfdfd; 4 | --color-text: #222; 5 | --color-text-aside: #707070; 6 | --color-link: #4da6ff; 7 | 8 | --color-menu-divider: #eee; 9 | --color-menu-divider-focus: #000; 10 | --color-menu-label: #707070; 11 | 12 | --color-panel: #fff; 13 | --color-panel-divider: #eee; 14 | 15 | --color-comment-tag: #707070; 16 | --color-comment-tag-text: #fff; 17 | 18 | --color-code-background: rgba(0, 0, 0, 0.04); 19 | 20 | --color-ts: #9600ff; 21 | --color-ts-interface: #647f1b; 22 | --color-ts-enum: #937210; 23 | --color-ts-class: #0672de; 24 | --color-ts-private: #707070; 25 | 26 | --color-toolbar: #fff; 27 | --color-toolbar-text: #333; 28 | } 29 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_comment.sass: -------------------------------------------------------------------------------- 1 | // Displays all regular comment tags 2 | // 3 | //
4 | //
see
5 | //

Dispatcher.EVENT_BEGIN

6 | //
see
7 | //

Dispatcher.EVENT_BEGIN_RESOLVE

8 | //
see
9 | //

Dispatcher.EVENT_END_RESOLVE

10 | //
11 | // 12 | dl.tsd-comment-tags 13 | overflow: hidden 14 | 15 | dt 16 | float: left 17 | padding: 1px 5px 18 | margin: 0 10px 0 0 19 | border-radius: 4px 20 | border: 1px solid var(--color-comment-tag) 21 | color: var(--color-comment-tag) 22 | font-size: 0.8em 23 | font-weight: normal 24 | 25 | dd 26 | margin: 0 0 10px 0 27 | 28 | &:before, &:after 29 | display: table 30 | content: " " 31 | pre, &:after 32 | clear: both 33 | 34 | p 35 | margin: 0 36 | 37 | // Special formatting for the main reflection on each page. 38 | // 39 | //
40 | //
41 | //

The default TypeDoc main application class.

42 | //

This class holds the two main components of TypeDoc, the Dispatcher and the Renderer.

43 | //
44 | //
45 | // 46 | .tsd-panel.tsd-comment .lead 47 | font-size: 1.1em 48 | line-height: $LINE_HEIGHT 49 | margin-bottom: 2em 50 | 51 | &:last-child 52 | margin-bottom: 0 53 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_filter.sass: -------------------------------------------------------------------------------- 1 | // Classes set on the body to control the visible state of the filtered elements 2 | // 3 | .toggle-protected .tsd-is-private 4 | display: none 5 | 6 | .toggle-public .tsd-is-private, 7 | .toggle-public .tsd-is-protected, 8 | .toggle-public .tsd-is-private-protected 9 | display: none 10 | 11 | .toggle-inherited .tsd-is-inherited 12 | display: none 13 | 14 | .toggle-externals .tsd-is-external 15 | display: none 16 | 17 | // Filter Buttons in the toolbar 18 | // 19 | #tsd-filter 20 | position: relative 21 | display: inline-block 22 | height: $TOOLBAR_HEIGHT 23 | vertical-align: bottom 24 | 25 | .no-filter & 26 | display: none 27 | 28 | .tsd-filter-group 29 | display: inline-block 30 | height: $TOOLBAR_HEIGHT 31 | vertical-align: bottom 32 | white-space: nowrap 33 | 34 | input 35 | display: none 36 | 37 | +size-xs-sm 38 | .tsd-filter-group 39 | display: block 40 | position: absolute 41 | top: $TOOLBAR_HEIGHT 42 | right: 20px 43 | height: auto 44 | background-color: var(--color-panel) 45 | visibility: hidden 46 | transform: translate(50%,0) 47 | box-shadow: 0 0 4px rgba(#000, 0.25) 48 | 49 | .has-options & 50 | visibility: visible 51 | 52 | .to-has-options & 53 | animation: fade-in 0.2s 54 | 55 | .from-has-options & 56 | animation: fade-out 0.2s 57 | 58 | label, 59 | .tsd-select 60 | display: block 61 | padding-right: 20px 62 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_footer.sass: -------------------------------------------------------------------------------- 1 | footer 2 | border-top: 1px solid var(--color-panel-divider) 3 | background-color: var(--color-panel) 4 | 5 | &.with-border-bottom 6 | border-bottom: 1px solid var(--color-panel-divider) 7 | 8 | .tsd-legend-group 9 | font-size: 0 10 | 11 | .tsd-legend 12 | display: inline-block 13 | width: 25% 14 | padding: 0 15 | font-size: $FONT_SIZE 16 | list-style: none 17 | line-height: $LINE_HEIGHT 18 | vertical-align: top 19 | 20 | +size-xs-sm 21 | width: 50% 22 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_hierarchy.sass: -------------------------------------------------------------------------------- 1 | // Displays the type hierarchy 2 | // 3 | // 17 | // 18 | .tsd-hierarchy 19 | list-style: square 20 | padding: 0 0 0 20px 21 | margin: 0 22 | 23 | .target 24 | font-weight: bold 25 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_images.sass: -------------------------------------------------------------------------------- 1 | // fixes issue with images in readme 2 | img 3 | max-width: 100% 4 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_index.sass: -------------------------------------------------------------------------------- 1 | // Displays an index of grouped links. 2 | // 3 | //
4 | //
5 | //
6 | //

Constructor methods

7 | // 10 | //
11 | //
12 | //

Properties

13 | // 19 | //
20 | //
21 | //
22 | // 23 | .tsd-index-panel 24 | .tsd-index-content 25 | margin-bottom: -30px !important 26 | 27 | .tsd-index-section 28 | margin-bottom: 30px !important 29 | 30 | h3 31 | @extend h4 32 | margin: 0 -20px 10px -20px 33 | padding: 0 20px 10px 20px 34 | border-bottom: 1px solid var(--color-panel-divider) 35 | 36 | ul.tsd-index-list 37 | +vendors(column-count, 3) 38 | +vendors(column-gap, 20px) 39 | padding: 0 40 | list-style: none 41 | line-height: $LINE_HEIGHT 42 | 43 | +size-xs-sm 44 | +vendors(column-count, 1) 45 | 46 | +size-md 47 | +vendors(column-count, 2) 48 | 49 | li 50 | +vendors(page-break-inside, avoid) 51 | 52 | a, 53 | .tsd-parent-kind-module a 54 | color: var(--color-ts) 55 | 56 | .tsd-parent-kind-interface a 57 | color: var(--color-ts-interface) 58 | 59 | .tsd-parent-kind-enum a 60 | color: var(--color-ts-enum) 61 | 62 | .tsd-parent-kind-class a 63 | color: var(--color-ts-class) 64 | 65 | .tsd-kind-module a 66 | color: var(--color-ts) 67 | 68 | .tsd-kind-interface a 69 | color: var(--color-ts-interface) 70 | 71 | .tsd-kind-enum a 72 | color: var(--color-ts-enum) 73 | 74 | .tsd-kind-class a 75 | color: var(--color-ts-class) 76 | 77 | .tsd-is-private a 78 | color: var(--color-ts-private) 79 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_member.sass: -------------------------------------------------------------------------------- 1 | .tsd-flag 2 | display: inline-block 3 | padding: 1px 5px 4 | border-radius: 4px 5 | color: var(--color-comment-tag-text) 6 | background-color: var(--color-comment-tag) 7 | text-indent: 0 8 | font-size: $FONT_SIZE_MONO 9 | font-weight: normal 10 | 11 | .tsd-anchor 12 | position: absolute 13 | top: -100px 14 | 15 | .tsd-member 16 | position: relative 17 | 18 | .tsd-anchor + h3 19 | margin-top: 0 20 | margin-bottom: 0 21 | border-bottom: none 22 | 23 | a[data-tsd-kind] 24 | color: var(--color-ts) 25 | 26 | a[data-tsd-kind="Interface"] 27 | color: var(--color-ts-interface) 28 | 29 | a[data-tsd-kind="Enum"] 30 | color: var(--color-ts-enum) 31 | 32 | a[data-tsd-kind="Class"] 33 | color: var(--color-ts-class) 34 | 35 | a[data-tsd-kind="Private"] 36 | color: var(--color-ts-private) 37 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_navigation.sass: -------------------------------------------------------------------------------- 1 | // Base format for the navigation parts. 2 | // 3 | =INDENT($DEPTH, $BASE, $STEP, $PROGRESS:$DEPTH) 4 | @if $PROGRESS > 0 5 | & li 6 | +INDENT($DEPTH, $BASE, $STEP, $PROGRESS - 1) 7 | @else 8 | & a 9 | padding-left: #{($BASE + $STEP * ($DEPTH - 1))}px 10 | 11 | =INDENTS($COUNT, $BASE, $STEP) 12 | @for $DEPTH from 1 through $COUNT 13 | +INDENT($DEPTH, $BASE, $STEP) 14 | 15 | .tsd-navigation 16 | margin: 0 0 0 40px 17 | 18 | a 19 | display: block 20 | padding-top: 2px 21 | padding-bottom: 2px 22 | border-left: 2px solid transparent 23 | color: var(--color-text) 24 | text-decoration: none 25 | transition: border-left-color 0.1s 26 | 27 | &:hover 28 | text-decoration: underline 29 | 30 | ul 31 | margin: 0 32 | padding: 0 33 | list-style: none 34 | 35 | li 36 | padding: 0 37 | 38 | // Primary part of the navigation containing the available modules. 39 | // 40 | // 53 | // 54 | .tsd-navigation.primary 55 | padding-bottom: 40px 56 | 57 | a 58 | display: block 59 | padding-top: 6px 60 | padding-bottom: 6px 61 | 62 | ul 63 | +INDENTS(6, 5, 20) 64 | 65 | > ul 66 | border-bottom: 1px solid var(--color-panel-divider) 67 | 68 | li 69 | border-top: 1px solid var(--color-panel-divider) 70 | 71 | &.current > a 72 | font-weight: bold 73 | 74 | &.label span 75 | display: block 76 | padding: 20px 0 6px 5px 77 | color: var(--color-menu-label) 78 | 79 | &.globals + li > span, 80 | &.globals + li > a 81 | padding-top: 20px 82 | 83 | // Secondary part of the navigation containing the table of contents 84 | // of the current module. 85 | // Can be made sticky by `typedoc.MenuSticky` and will highlight current sticky with `typedoc.MenuHighlight`. 86 | // 87 | // 109 | // 110 | .tsd-navigation.secondary 111 | max-height: calc(100vh - 1rem - #{$TOOLBAR_HEIGHT}) 112 | overflow: auto 113 | position: -webkit-sticky 114 | position: sticky 115 | top: calc(.5rem + #{$TOOLBAR_HEIGHT}) 116 | transition: .3s 117 | 118 | &.tsd-navigation--toolbar-hide 119 | max-height: calc(100vh - 1rem) 120 | top: .5rem 121 | 122 | ul 123 | +INDENTS(6, 25, 20) 124 | transition: opacity 0.2s 125 | 126 | &.current a 127 | border-left-color: var(--color-panel-divider) 128 | 129 | li.focus > a, 130 | ul.current li.focus > a 131 | border-left-color: var(--color-menu-divider-focus) 132 | 133 | li.current 134 | margin-top: 20px 135 | margin-bottom: 20px 136 | border-left-color: var(--color-panel-divider) 137 | 138 | > a 139 | font-weight: bold 140 | 141 | // Sticky menu setup 142 | // 143 | .menu-sticky-wrap 144 | +size-md-lg 145 | position: static 146 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_panel.sass: -------------------------------------------------------------------------------- 1 | // Displays a panel, an organisation unit in TypeDoc used to group single entities 2 | // like a method or a variable. 3 | // 4 | //
5 | //

Eirmod tempor invidunt

6 | //

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

7 | //
8 | // 9 | .tsd-panel 10 | @extend %prevent-children-margin 11 | margin: 20px 0 12 | padding: 20px 13 | background-color: var(--color-panel) 14 | box-shadow: 0 0 4px rgba(#000, 0.25) 15 | 16 | &:empty 17 | display: none 18 | 19 | > h1, > h2, > h3 20 | margin: 1.5em -20px 10px -20px 21 | padding: 0 20px 10px 20px 22 | border-bottom: 1px solid var(--color-panel-divider) 23 | 24 | &.tsd-before-signature 25 | margin-bottom: 0 26 | border-bottom: 0 27 | 28 | table 29 | display: block 30 | width: 100% 31 | overflow: auto 32 | margin-top: 10px 33 | word-break: normal 34 | word-break: keep-all 35 | 36 | th 37 | font-weight: bold 38 | 39 | th, td 40 | padding: 6px 13px 41 | border: 1px solid #ddd 42 | 43 | tr 44 | background-color: #fff 45 | border-top: 1px solid #ccc 46 | 47 | &:nth-child(2n) 48 | background-color: #f8f8f8 49 | 50 | // Holds a series of panels with an optional heading. 51 | // 52 | //
53 | //

Consetetur sadipscing elitr

54 | //
55 | //

Eirmod tempor invidunt

56 | //

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

57 | //
58 | //
59 | //

Eirmod tempor invidunt

60 | //

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

61 | //
62 | //
63 | // 64 | .tsd-panel-group 65 | margin: 60px 0 66 | 67 | > h1, > h2, > h3 68 | padding-left: 20px 69 | padding-right: 20px 70 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_search.sass: -------------------------------------------------------------------------------- 1 | #tsd-search 2 | transition: background-color 0.2s 3 | 4 | .title 5 | position: relative 6 | z-index: 2 7 | 8 | .field 9 | position: absolute 10 | left: 0 11 | top: 0 12 | right: 40px 13 | height: 40px 14 | 15 | input 16 | box-sizing: border-box 17 | position: relative 18 | top: -50px 19 | z-index: 1 20 | width: 100% 21 | padding: 0 10px 22 | opacity: 0 23 | outline: 0 24 | border: 0 25 | background: transparent 26 | color: var(--color-text) 27 | 28 | label 29 | position: absolute 30 | overflow: hidden 31 | right: -40px 32 | 33 | .field input, 34 | .title 35 | transition: opacity 0.2s 36 | 37 | .results 38 | position: absolute 39 | visibility: hidden 40 | top: 40px 41 | width: 100% 42 | margin: 0 43 | padding: 0 44 | list-style: none 45 | box-shadow: 0 0 4px rgba(#000, 0.25) 46 | 47 | li 48 | padding: 0 10px 49 | background-color: var(--color-background) 50 | 51 | li:nth-child(even) 52 | background-color: var(--color-panel) 53 | 54 | li.state 55 | display: none 56 | 57 | li.current, 58 | li:hover 59 | background-color: var(--color-panel-divider) 60 | 61 | a 62 | display: block 63 | 64 | &:before 65 | top: 10px 66 | 67 | span.parent 68 | color: var(--color-text-aside) 69 | font-weight: normal 70 | 71 | &.has-focus 72 | background-color: var(--color-panel-divider) 73 | 74 | .field input 75 | top: 0 76 | opacity: 1 77 | 78 | .title 79 | z-index: 0 80 | opacity: 0 81 | 82 | .results 83 | visibility: visible 84 | 85 | &.loading .results li.state.loading 86 | display: block 87 | 88 | &.failure .results li.state.failure 89 | display: block 90 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_signatures.sass: -------------------------------------------------------------------------------- 1 | // Wraps a function signature. 2 | // Changes its appearance when directly placed inside a `tsd-panel`. 3 | // Can be combined with class `tsd-kind-icon` to display an icon in front of the signature. 4 | // 5 | //
6 | //
7 | // getChildByName( 8 | // name: string 9 | // ): 10 | // DeclarationReflection 11 | //
12 | //
13 | // 14 | .tsd-signature 15 | margin: 0 0 1em 0 16 | padding: 10px 17 | border: 1px solid var(--color-panel-divider) 18 | font-family: $FONT_FAMILY_MONO 19 | font-size: $FONT_SIZE_MONO 20 | overflow-x: auto 21 | 22 | &.tsd-kind-icon 23 | padding-left: 30px 24 | 25 | &:before 26 | top: 10px 27 | left: 10px 28 | 29 | .tsd-panel > & 30 | margin-left: -20px 31 | margin-right: -20px 32 | border-width: 1px 0 33 | 34 | &.tsd-kind-icon 35 | padding-left: 40px 36 | 37 | &:before 38 | left: 20px 39 | 40 | .tsd-signature-symbol 41 | color: var(--color-text-aside) 42 | font-weight: normal 43 | 44 | .tsd-signature-type 45 | font-style: italic 46 | font-weight: normal 47 | 48 | // Displays a list of signatures. 49 | // Changes its appearance when directly placed inside a `tsd-panel`. 50 | // Made interactive by JavaScript at `typedoc.Signature`. 51 | // 52 | // 56 | // 57 | .tsd-signatures 58 | padding: 0 59 | margin: 0 0 1em 0 60 | border: 1px solid var(--color-panel-divider) 61 | 62 | .tsd-signature 63 | margin: 0 64 | border-width: 1px 0 0 0 65 | transition: background-color 0.1s 66 | 67 | &:first-child 68 | border-top-width: 0 69 | 70 | &.current 71 | background-color: var(--color-panel-divider) 72 | 73 | &.active > .tsd-signature 74 | cursor: pointer 75 | 76 | .tsd-panel > & 77 | margin-left: -20px 78 | margin-right: -20px 79 | border-width: 1px 0 80 | 81 | .tsd-signature.tsd-kind-icon 82 | padding-left: 40px 83 | 84 | &:before 85 | left: 20px 86 | 87 | .tsd-panel > a.anchor + & 88 | border-top-width: 0 89 | margin-top: -20px 90 | 91 | // Holds the descriptions related to a list of signatures. 92 | // Made interactive by JavaScript at `typedoc.Signature`. 93 | // 94 | // 102 | // 103 | ul.tsd-descriptions 104 | position: relative 105 | overflow: hidden 106 | padding: 0 107 | list-style: none 108 | 109 | > li 110 | @extend %prevent-children-margin 111 | 112 | &.active > .tsd-description 113 | display: none 114 | 115 | &.current 116 | display: block 117 | 118 | &.fade-in 119 | animation: fade-in-delayed 0.3s 120 | 121 | &.fade-out 122 | animation: fade-out-delayed 0.3s 123 | position: absolute 124 | display: block 125 | top: 0 126 | left: 0 127 | right: 0 128 | opacity: 0 129 | visibility: hidden 130 | 131 | h4 132 | font-size: $FONT_SIZE 133 | margin: 1em 0 0.5em 0 134 | 135 | ul.tsd-parameters, 136 | ul.tsd-type-parameters 137 | list-style: square 138 | margin: 0 139 | padding-left: 20px 140 | 141 | > li.tsd-parameter-signature 142 | list-style: none 143 | margin-left: -20px 144 | 145 | h5 146 | font-size: $FONT_SIZE 147 | margin: 1em 0 0.5em 0 148 | 149 | .tsd-comment 150 | margin-top: -0.5em 151 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_sources.sass: -------------------------------------------------------------------------------- 1 | // Displays the source and inheritance information 2 | // 3 | // 9 | // 10 | .tsd-sources 11 | font-size: $FONT_SIZE_MONO 12 | color: var(--color-text-aside) 13 | margin: 0 0 1em 0 14 | 15 | a 16 | color: var(--color-text-aside) 17 | text-decoration: underline 18 | 19 | ul, p 20 | margin: 0 !important 21 | 22 | ul 23 | list-style: none 24 | padding: 0 25 | -------------------------------------------------------------------------------- /src/default/assets/css/elements/_toolbar.sass: -------------------------------------------------------------------------------- 1 | // Displays the toolbar at the top of the page. 2 | // 3 | //
4 | //
5 | //
6 | //
7 | // TypeDoc Documentation 8 | //
9 | //
10 | //
11 | //
12 | // 13 | .tsd-page-toolbar 14 | position: fixed 15 | z-index: 1 16 | top: 0 17 | left: 0 18 | width: 100% 19 | height: $TOOLBAR_HEIGHT 20 | color: var(--color-toolbar-text) 21 | background: var(--color-toolbar) 22 | border-bottom: 1px solid var(--color-panel-divider) 23 | transition: transform .3s linear 24 | 25 | a 26 | color: var(--color-toolbar-text) 27 | text-decoration: none 28 | 29 | &.title 30 | font-weight: bold 31 | 32 | &.title:hover 33 | text-decoration: underline 34 | 35 | .table-wrap 36 | display: table 37 | width: 100% 38 | height: $TOOLBAR_HEIGHT 39 | 40 | .table-cell 41 | display: table-cell 42 | position: relative 43 | white-space: nowrap 44 | line-height: $TOOLBAR_HEIGHT 45 | 46 | &:first-child 47 | width: 100% 48 | 49 | .tsd-page-toolbar--hide 50 | transform: translateY(-100%) 51 | 52 | %TSD_WIDGET_ICON 53 | &:before 54 | content: '' 55 | display: inline-block 56 | width: 40px 57 | height: 40px 58 | margin: 0 -8px 0 0 59 | background-image: url(../../images/widgets.png) 60 | background-repeat: no-repeat 61 | text-indent: -1024px 62 | vertical-align: bottom 63 | 64 | +retina 65 | background-image: url(../../images/widgets@2x.png) 66 | background-size: 320px 40px 67 | 68 | .tsd-widget 69 | @extend %TSD_WIDGET_ICON 70 | display: inline-block 71 | overflow: hidden 72 | opacity: 0.6 73 | height: $TOOLBAR_HEIGHT 74 | transition: opacity 0.1s, background-color 0.2s 75 | vertical-align: bottom 76 | cursor: pointer 77 | 78 | &:hover 79 | opacity: 0.8 80 | 81 | &.active 82 | opacity: 1 83 | background-color: var(--color-panel-divider) 84 | 85 | &.no-caption 86 | width: 40px 87 | 88 | &:before 89 | margin: 0 90 | 91 | &.search:before 92 | background-position: 0 0 93 | 94 | &.menu:before 95 | background-position: -40px 0 96 | 97 | &.options:before 98 | background-position: -80px 0 99 | 100 | &.options, 101 | &.menu 102 | display: none 103 | 104 | +size-xs-sm 105 | display: inline-block 106 | 107 | input[type=checkbox] + &:before 108 | background-position: -120px 0 109 | 110 | input[type=checkbox]:checked + &:before 111 | background-position: -160px 0 112 | 113 | .tsd-select 114 | position: relative 115 | display: inline-block 116 | height: $TOOLBAR_HEIGHT 117 | transition: opacity 0.1s, background-color 0.2s 118 | vertical-align: bottom 119 | cursor: pointer 120 | 121 | .tsd-select-label 122 | @extend %TSD_WIDGET_ICON 123 | opacity: 0.6 124 | transition: opacity 0.2s 125 | 126 | &:before 127 | background-position: -240px 0 128 | 129 | &.active 130 | .tsd-select-label 131 | opacity: 0.8 132 | 133 | .tsd-select-list 134 | visibility: visible 135 | opacity: 1 136 | transition-delay: 0s 137 | 138 | .tsd-select-list 139 | position: absolute 140 | visibility: hidden 141 | top: $TOOLBAR_HEIGHT 142 | left: 0 143 | margin: 0 144 | padding: 0 145 | opacity: 0 146 | list-style: none 147 | box-shadow: 0 0 4px rgba(#000, 0.25) 148 | transition: visibility 0s 0.2s, opacity 0.2s 149 | 150 | li 151 | @extend %TSD_WIDGET_ICON 152 | padding: 0 20px 0 0 153 | background-color: var(--color-background) 154 | 155 | &:before 156 | background-position: 40px 0 157 | 158 | &:nth-child(even) 159 | background-color: var(--color-panel) 160 | 161 | &:hover 162 | background-color: var(--color-panel-divider) 163 | 164 | &.selected:before 165 | background-position: -200px 0 166 | 167 | +size-xs-sm 168 | .tsd-select-list 169 | top: 0 170 | left: auto 171 | right: 100% 172 | margin-right: -5px 173 | 174 | .tsd-select-label:before 175 | background-position: -280px 0 176 | -------------------------------------------------------------------------------- /src/default/assets/css/layouts/_default.sass: -------------------------------------------------------------------------------- 1 | html.default 2 | +size-md 3 | .col-content 4 | width: 72% 5 | 6 | .col-menu 7 | width: 28% 8 | 9 | .tsd-navigation 10 | padding-left: 10px 11 | 12 | +size-xs-sm 13 | .col-content 14 | float: none 15 | width: 100% 16 | 17 | .col-menu 18 | position: fixed !important 19 | overflow: auto 20 | -webkit-overflow-scrolling: touch 21 | z-index: 1024 22 | top: 0 !important 23 | bottom: 0 !important 24 | left: auto !important 25 | right: 0 !important 26 | width: 100% 27 | padding: 20px 20px 0 0 28 | max-width: 450px 29 | visibility: hidden 30 | background-color: var(--color-panel) 31 | transform: translate(100%,0) 32 | 33 | > *:last-child 34 | padding-bottom: 20px 35 | 36 | .overlay 37 | content: '' 38 | display: block 39 | position: fixed 40 | z-index: 1023 41 | top: 0 42 | left: 0 43 | right: 0 44 | bottom: 0 45 | background-color: rgba(#000, 0.75) 46 | visibility: hidden 47 | 48 | &.to-has-menu 49 | .overlay 50 | animation: fade-in 0.4s 51 | 52 | header, 53 | footer, 54 | .col-content 55 | animation: shift-to-left 0.4s 56 | 57 | .col-menu 58 | animation: pop-in-from-right 0.4s 59 | 60 | &.from-has-menu 61 | .overlay 62 | animation: fade-out 0.4s 63 | 64 | header, 65 | footer, 66 | .col-content 67 | animation: unshift-to-left 0.4s 68 | 69 | .col-menu 70 | animation: pop-out-to-right 0.4s 71 | 72 | &.has-menu 73 | body 74 | overflow: hidden 75 | 76 | .overlay 77 | visibility: visible 78 | 79 | header, 80 | footer, 81 | .col-content 82 | transform: translate(-25%, 0) 83 | 84 | .col-menu 85 | visibility: visible 86 | transform: translate(0,0) 87 | 88 | .tsd-page-title 89 | padding: 70px 0 20px 0 90 | margin: 0 0 40px 0 91 | background: var(--color-panel) 92 | box-shadow: 0 0 5px rgba(#000, 0.35) 93 | 94 | h1 95 | margin: 0 96 | 97 | .tsd-breadcrumb 98 | margin: 0 99 | padding: 0 100 | color: var(--color-text-aside) 101 | 102 | a 103 | color: var(--color-text-aside) 104 | text-decoration: none 105 | 106 | &:hover 107 | text-decoration: underline 108 | 109 | li 110 | display: inline 111 | 112 | &:after 113 | content: ' / ' 114 | -------------------------------------------------------------------------------- /src/default/assets/css/layouts/_minimal.sass: -------------------------------------------------------------------------------- 1 | html.minimal 2 | .container 3 | margin: 0 4 | 5 | .container-main 6 | padding-top: 50px 7 | padding-bottom: 0 8 | 9 | .content-wrap 10 | padding-left: 300px 11 | 12 | .tsd-navigation 13 | position: fixed !important 14 | overflow: auto 15 | -webkit-overflow-scrolling: touch 16 | box-sizing: border-box 17 | z-index: 1 18 | left: 0 19 | top: 40px 20 | bottom: 0 21 | width: 300px 22 | padding: 20px 23 | margin: 0 24 | 25 | .tsd-member .tsd-member 26 | margin-left: 0 27 | 28 | .tsd-page-toolbar 29 | position: fixed 30 | z-index: 2 31 | 32 | #tsd-filter .tsd-filter-group 33 | right: 0 34 | transform: none 35 | 36 | footer 37 | background-color: transparent 38 | 39 | .container 40 | padding: 0 41 | 42 | .tsd-generator 43 | padding: 0 44 | 45 | +size-xs-sm 46 | .tsd-navigation 47 | display: none 48 | .content-wrap 49 | padding-left: 0 50 | -------------------------------------------------------------------------------- /src/default/assets/css/main.sass: -------------------------------------------------------------------------------- 1 | @import constants 2 | @import theme 3 | 4 | @import vendors/normalize 5 | 6 | @import setup/mixins 7 | @import setup/grid 8 | @import setup/icons 9 | @import setup/animations 10 | @import setup/typography 11 | 12 | @import layouts/default 13 | @import layouts/minimal 14 | 15 | @import elements/comment 16 | @import elements/filter 17 | @import elements/footer 18 | @import elements/hierarchy 19 | @import elements/index 20 | @import elements/member 21 | @import elements/navigation 22 | @import elements/panel 23 | @import elements/search 24 | @import elements/signatures 25 | @import elements/sources 26 | @import elements/toolbar 27 | @import elements/images 28 | -------------------------------------------------------------------------------- /src/default/assets/css/setup/_animations.sass: -------------------------------------------------------------------------------- 1 | @keyframes fade-in 2 | from 3 | opacity: 0 4 | to 5 | opacity: 1 6 | 7 | @keyframes fade-out 8 | from 9 | opacity: 1 10 | visibility: visible 11 | to 12 | opacity: 0 13 | 14 | @keyframes fade-in-delayed 15 | 0% 16 | opacity: 0 17 | 33% 18 | opacity: 0 19 | 100% 20 | opacity: 1 21 | 22 | @keyframes fade-out-delayed 23 | 0% 24 | opacity: 1 25 | visibility: visible 26 | 66% 27 | opacity: 0 28 | 100% 29 | opacity: 0 30 | 31 | @keyframes shift-to-left 32 | from 33 | transform: translate(0,0) 34 | to 35 | transform: translate(-25%,0) 36 | 37 | @keyframes unshift-to-left 38 | from 39 | transform: translate(-25%,0) 40 | to 41 | transform: translate(0,0) 42 | 43 | @keyframes pop-in-from-right 44 | from 45 | transform: translate(100%,0) 46 | to 47 | transform: translate(0,0) 48 | 49 | @keyframes pop-out-to-right 50 | from 51 | transform: translate(0,0) 52 | visibility: visible 53 | to 54 | transform: translate(100%,0) 55 | -------------------------------------------------------------------------------- /src/default/assets/css/setup/_grid.sass: -------------------------------------------------------------------------------- 1 | =size-xs 2 | @media (max-width: 640px) 3 | & 4 | @content 5 | 6 | =size-sm 7 | @media (min-width: 641px) and (max-width: 900px) 8 | & 9 | @content 10 | 11 | =size-md 12 | @media (min-width: 901px) and (max-width: 1024px) 13 | & 14 | @content 15 | 16 | =size-lg 17 | @media (min-width: 1025px) 18 | & 19 | @content 20 | 21 | =size-xs-sm 22 | @media (max-width: 900px) 23 | & 24 | @content 25 | 26 | =size-md-lg 27 | @media (min-width: 901px) 28 | & 29 | @content 30 | 31 | .container 32 | max-width: 1200px 33 | margin: 0 auto 34 | padding: 0 40px 35 | 36 | +size-xs 37 | padding: 0 20px 38 | 39 | .container-main 40 | padding-bottom: 200px 41 | 42 | .row 43 | +clearfix 44 | display: flex 45 | position: relative 46 | margin: 0 -10px 47 | 48 | .col 49 | @extend %prevent-children-margin 50 | box-sizing: border-box 51 | float: left 52 | padding: 0 10px 53 | 54 | @for $width from 1 to 12 55 | .col-#{$width} 56 | @extend .col 57 | width: $width / 12 * 100% 58 | 59 | .offset-#{$width} 60 | margin-left: $width / 12 * 100% 61 | -------------------------------------------------------------------------------- /src/default/assets/css/setup/_icons.scss: -------------------------------------------------------------------------------- 1 | $type-icons: (object-literal), (class), ("class.tsd-has-type-parameter"), 2 | (interface), ("interface.tsd-has-type-parameter"), (namespace, module), 3 | (enum), (enum-member), (signature), (type-alias), 4 | ("type-alias.tsd-has-type-parameter"); 5 | 6 | $member-icons: (variable, property), (get-signature), (set-signature), 7 | (accessor), (function, method, call-signature), 8 | ("function.tsd-has-type-parameter", "method.tsd-has-type-parameter"), 9 | (constructor, constructor-signature), (index-signature), (event), (property), 10 | (function, method, call-signature), (event); 11 | 12 | // parameter 13 | // type-literal 14 | // type-parameter 15 | 16 | .tsd-kind-icon { 17 | display: block; 18 | position: relative; 19 | padding-left: 20px; 20 | text-indent: -20px; 21 | 22 | &:before { 23 | content: ""; 24 | display: inline-block; 25 | vertical-align: middle; 26 | width: 17px; 27 | height: 17px; 28 | margin: 0 3px 2px 0; 29 | background-image: url(../../images/icons.png); 30 | 31 | @include retina { 32 | background-image: url(../../images/icons@2x.png); 33 | background-size: 238px 204px; 34 | } 35 | } 36 | } 37 | 38 | .tsd-signature.tsd-kind-icon:before { 39 | background-position: 0 -153px; 40 | } 41 | 42 | $icon-size: 17px; 43 | $type: -0 * $icon-size; 44 | $type-protected: -1 * $icon-size; 45 | $type-private: -2 * $icon-size; 46 | $member-class-public: -3 * $icon-size; 47 | $member-class-public-inherited: -4 * $icon-size; 48 | $member-class-protected: -5 * $icon-size; 49 | $member-class-protected-inherited: -6 * $icon-size; 50 | $member-private: -7 * $icon-size; 51 | $member: -8 * $icon-size; 52 | $member-protected: -9 * $icon-size; 53 | $member-enum: -10 * $icon-size; 54 | $member-enum-protected: -11 * $icon-size; 55 | $member-interface: -12 * $icon-size; 56 | $member-interface-inherited: -13 * $icon-size; 57 | 58 | @for $index from 1 through length($type-icons) { 59 | @each $kind in nth($type-icons, $index) { 60 | $selector: ".tsd-kind-" + $kind; 61 | $offset: -#{17 * ($index)}px; 62 | 63 | #{$selector} { 64 | > .tsd-kind-icon:before { 65 | background-position: $type $offset; 66 | } 67 | 68 | &.tsd-is-protected > .tsd-kind-icon:before { 69 | background-position: $type-protected $offset; 70 | } 71 | 72 | &.tsd-is-private > .tsd-kind-icon:before { 73 | background-position: $type-private $offset; 74 | } 75 | } 76 | } 77 | } 78 | 79 | @for $index from 1 through length($member-icons) { 80 | @each $kind in nth($member-icons, $index) { 81 | $offset: -#{17 * ($index - 1)}px; 82 | $selector: ".tsd-kind-" + $kind; 83 | @if $index == 10 { 84 | $selector: ".tsd-is-static"; 85 | } @else if $index > 10 { 86 | $selector: ".tsd-is-static.tsd-kind-" + $kind; 87 | } 88 | 89 | #{$selector} { 90 | > .tsd-kind-icon:before { 91 | background-position: $member $offset; 92 | } 93 | 94 | &.tsd-is-protected > .tsd-kind-icon:before { 95 | background-position: $member-protected $offset; 96 | } 97 | 98 | &.tsd-is-private > .tsd-kind-icon:before { 99 | background-position: $member-private $offset; 100 | } 101 | 102 | &.tsd-parent-kind-class { 103 | > .tsd-kind-icon:before { 104 | background-position: $member-class-public $offset; 105 | } 106 | 107 | &.tsd-is-inherited > .tsd-kind-icon:before { 108 | background-position: $member-class-public-inherited $offset; 109 | } 110 | 111 | &.tsd-is-protected > .tsd-kind-icon:before { 112 | background-position: $member-class-protected $offset; 113 | } 114 | 115 | &.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 116 | background-position: $member-class-protected-inherited 117 | $offset; 118 | } 119 | 120 | &.tsd-is-private > .tsd-kind-icon:before { 121 | background-position: $member-private $offset; 122 | } 123 | } 124 | 125 | &.tsd-parent-kind-enum { 126 | > .tsd-kind-icon:before { 127 | background-position: $member-enum $offset; 128 | } 129 | 130 | &.tsd-is-protected > .tsd-kind-icon:before { 131 | background-position: $member-enum-protected $offset; 132 | } 133 | 134 | &.tsd-is-private > .tsd-kind-icon:before { 135 | background-position: $member-private $offset; 136 | } 137 | } 138 | 139 | &.tsd-parent-kind-interface { 140 | > .tsd-kind-icon:before { 141 | background-position: $member-interface $offset; 142 | } 143 | 144 | &.tsd-is-inherited > .tsd-kind-icon:before { 145 | background-position: $member-interface-inherited $offset; 146 | } 147 | } 148 | } 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /src/default/assets/css/setup/_mixins.sass: -------------------------------------------------------------------------------- 1 | @mixin vendors($property, $value...) 2 | -webkit-#{$property}: $value 3 | -moz-#{$property}: $value 4 | -ms-#{$property}: $value 5 | -o-#{$property}: $value 6 | #{$property}: $value 7 | 8 | @mixin clearfix 9 | &:after 10 | visibility: hidden 11 | display: block 12 | content: "" 13 | clear: both 14 | height: 0 15 | 16 | @mixin retina 17 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) 18 | & 19 | @content 20 | 21 | %prevent-children-margin 22 | > :first-child, 23 | > :first-child > :first-child, 24 | > :first-child > :first-child > :first-child 25 | margin-top: 0 26 | 27 | > :last-child, 28 | > :last-child > :last-child, 29 | > :last-child > :last-child > :last-child 30 | margin-bottom: 0 31 | -------------------------------------------------------------------------------- /src/default/assets/css/setup/_typography.sass: -------------------------------------------------------------------------------- 1 | body 2 | background: var(--color-background) 3 | font-family: $FONT_FAMILY 4 | font-size: $FONT_SIZE 5 | color: var(--color-text) 6 | 7 | a 8 | color: var(--color-link) 9 | text-decoration: none 10 | 11 | &:hover 12 | text-decoration: underline 13 | 14 | code, pre 15 | font-family: $FONT_FAMILY_MONO 16 | padding: 0.2em 17 | margin: 0 18 | font-size: $FONT_SIZE_MONO 19 | background-color: var(--color-code-background) 20 | 21 | pre 22 | padding: 10px 23 | 24 | code 25 | padding: 0 26 | font-size: 100% 27 | background-color: transparent 28 | 29 | blockquote 30 | margin: 1em 0 31 | padding-left: 1em 32 | border-left: 4px solid gray 33 | 34 | .tsd-typography 35 | line-height: $LINE_HEIGHT 36 | 37 | ul 38 | list-style: square 39 | padding: 0 0 0 20px 40 | margin: 0 41 | 42 | h4, h5, h6 43 | font-size: 1em 44 | margin: 0 45 | 46 | h5, h6 47 | font-weight: normal 48 | 49 | p, ul, ol 50 | margin: 1em 0 51 | -------------------------------------------------------------------------------- /src/default/assets/css/vendors/_normalize.sass: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.3 | MIT License | git.io/normalize 2 | 3 | /* ========================================================================== 4 | * HTML5 display definitions 5 | * ========================================================================== 6 | 7 | /** 8 | * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. 9 | 10 | article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary 11 | display: block 12 | 13 | /** 14 | * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 15 | 16 | audio, canvas, video 17 | display: inline-block 18 | *display: inline 19 | *zoom: 1 20 | 21 | /** 22 | * Prevent modern browsers from displaying `audio` without controls. 23 | * Remove excess height in iOS 5 devices. 24 | 25 | audio:not([controls]) 26 | display: none 27 | height: 0 28 | 29 | /** 30 | * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 31 | * Known issue: no IE 6 support. 32 | 33 | [hidden] 34 | display: none 35 | 36 | /* ========================================================================== 37 | * Base 38 | * ========================================================================== 39 | 40 | /** 41 | * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 42 | * `em` units. 43 | * 2. Prevent iOS text size adjust after orientation change, without disabling 44 | * user zoom. 45 | 46 | html 47 | font-size: 100% 48 | /* 1 49 | -ms-text-size-adjust: 100% 50 | /* 2 51 | -webkit-text-size-adjust: 100% 52 | /* 2 53 | font-family: sans-serif 54 | 55 | /** 56 | * Address `font-family` inconsistency between `textarea` and other form 57 | * elements. 58 | 59 | button, input, select, textarea 60 | font-family: sans-serif 61 | 62 | /** 63 | * Address margins handled incorrectly in IE 6/7. 64 | 65 | body 66 | margin: 0 67 | 68 | /* ========================================================================== 69 | * Links 70 | * ========================================================================== 71 | 72 | /** 73 | * Address `outline` inconsistency between Chrome and other browsers. 74 | 75 | a 76 | &:focus 77 | outline: thin dotted 78 | &:active, &:hover 79 | outline: 0 80 | 81 | /** 82 | * Improve readability when focused and also mouse hovered in all browsers. 83 | 84 | /* ========================================================================== 85 | * Typography 86 | * ========================================================================== 87 | 88 | /** 89 | * Address font sizes and margins set differently in IE 6/7. 90 | * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 91 | * and Chrome. 92 | 93 | h1 94 | font-size: 2em 95 | margin: 0.67em 0 96 | 97 | h2 98 | font-size: 1.5em 99 | margin: 0.83em 0 100 | 101 | h3 102 | font-size: 1.17em 103 | margin: 1em 0 104 | 105 | h4 106 | font-size: 1em 107 | margin: 1.33em 0 108 | 109 | h5 110 | font-size: 0.83em 111 | margin: 1.67em 0 112 | 113 | h6 114 | font-size: 0.67em 115 | margin: 2.33em 0 116 | 117 | /** 118 | * Address styling not present in IE 7/8/9, Safari 5, and Chrome. 119 | 120 | abbr[title] 121 | border-bottom: 1px dotted 122 | 123 | /** 124 | * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. 125 | 126 | b, strong 127 | font-weight: bold 128 | 129 | blockquote 130 | margin: 1em 40px 131 | 132 | /** 133 | * Address styling not present in Safari 5 and Chrome. 134 | 135 | dfn 136 | font-style: italic 137 | 138 | /** 139 | * Address differences between Firefox and other browsers. 140 | * Known issue: no IE 6/7 normalization. 141 | 142 | hr 143 | -moz-box-sizing: content-box 144 | box-sizing: content-box 145 | height: 0 146 | 147 | /** 148 | * Address styling not present in IE 6/7/8/9. 149 | 150 | mark 151 | background: #ff0 152 | color: #000 153 | 154 | /** 155 | * Address margins set differently in IE 6/7. 156 | 157 | p, pre 158 | margin: 1em 0 159 | 160 | /** 161 | * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. 162 | 163 | code, kbd, pre, samp 164 | font-family: monospace, serif 165 | _font-family: 'courier new', monospace 166 | font-size: 1em 167 | 168 | /** 169 | * Improve readability of pre-formatted text in all browsers. 170 | 171 | pre 172 | white-space: pre 173 | white-space: pre-wrap 174 | word-wrap: break-word 175 | 176 | /** 177 | * Address CSS quotes not supported in IE 6/7. 178 | 179 | q 180 | quotes: none 181 | &:before, &:after 182 | content: '' 183 | content: none 184 | 185 | /** 186 | * Address `quotes` property not supported in Safari 4. 187 | 188 | /** 189 | * Address inconsistent and variable font size in all browsers. 190 | 191 | small 192 | font-size: 80% 193 | 194 | /** 195 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 196 | 197 | sub 198 | font-size: 75% 199 | line-height: 0 200 | position: relative 201 | vertical-align: baseline 202 | 203 | sup 204 | font-size: 75% 205 | line-height: 0 206 | position: relative 207 | vertical-align: baseline 208 | top: -0.5em 209 | 210 | sub 211 | bottom: -0.25em 212 | 213 | /* ========================================================================== 214 | * Lists 215 | * ========================================================================== 216 | 217 | /** 218 | * Address margins set differently in IE 6/7. 219 | 220 | dl, menu, ol, ul 221 | margin: 1em 0 222 | 223 | dd 224 | margin: 0 0 0 40px 225 | 226 | /** 227 | * Address paddings set differently in IE 6/7. 228 | 229 | menu, ol, ul 230 | padding: 0 0 0 40px 231 | 232 | /** 233 | * Correct list images handled incorrectly in IE 7. 234 | 235 | nav 236 | ul, ol 237 | list-style: none 238 | list-style-image: none 239 | 240 | /* ========================================================================== 241 | * Embedded content 242 | * ========================================================================== 243 | 244 | /** 245 | * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 246 | * 2. Improve image quality when scaled in IE 7. 247 | 248 | img 249 | border: 0 250 | /* 1 251 | -ms-interpolation-mode: bicubic 252 | /* 2 253 | 254 | /** 255 | * Correct overflow displayed oddly in IE 9. 256 | 257 | svg:not(:root) 258 | overflow: hidden 259 | 260 | /* ========================================================================== 261 | * Figures 262 | * ========================================================================== 263 | 264 | /** 265 | * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. 266 | 267 | figure, form 268 | margin: 0 269 | 270 | /* ========================================================================== 271 | * Forms 272 | * ========================================================================== 273 | 274 | /** 275 | * Correct margin displayed oddly in IE 6/7. 276 | 277 | /** 278 | * Define consistent border, margin, and padding. 279 | 280 | fieldset 281 | border: 1px solid #c0c0c0 282 | margin: 0 2px 283 | padding: 0.35em 0.625em 0.75em 284 | 285 | /** 286 | * 1. Correct color not being inherited in IE 6/7/8/9. 287 | * 2. Correct text not wrapping in Firefox 3. 288 | * 3. Correct alignment displayed oddly in IE 6/7. 289 | 290 | legend 291 | border: 0 292 | /* 1 293 | padding: 0 294 | white-space: normal 295 | /* 2 296 | *margin-left: -7px 297 | /* 3 298 | 299 | /** 300 | * 1. Correct font size not being inherited in all browsers. 301 | * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 302 | * and Chrome. 303 | * 3. Improve appearance and consistency in all browsers. 304 | 305 | button, input, select, textarea 306 | font-size: 100% 307 | /* 1 308 | margin: 0 309 | /* 2 310 | vertical-align: baseline 311 | /* 3 312 | *vertical-align: middle 313 | /* 3 314 | 315 | /** 316 | * Address Firefox 3+ setting `line-height` on `input` using `!important` in 317 | * the UA stylesheet. 318 | 319 | button, input 320 | line-height: normal 321 | 322 | /** 323 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 324 | * All other form control elements do not inherit `text-transform` values. 325 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 326 | * Correct `select` style inheritance in Firefox 4+ and Opera. 327 | 328 | button, select 329 | text-transform: none 330 | 331 | /** 332 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 333 | * and `video` controls. 334 | * 2. Correct inability to style clickable `input` types in iOS. 335 | * 3. Improve usability and consistency of cursor style between image-type 336 | * `input` and others. 337 | * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 338 | * Known issue: inner spacing remains in IE 6. 339 | 340 | button, html input[type="button"] 341 | -webkit-appearance: button 342 | /* 2 343 | cursor: pointer 344 | /* 3 345 | *overflow: visible 346 | /* 4 347 | 348 | input 349 | &[type="reset"], &[type="submit"] 350 | -webkit-appearance: button 351 | /* 2 352 | cursor: pointer 353 | /* 3 354 | *overflow: visible 355 | /* 4 356 | 357 | /** 358 | * Re-set default cursor for disabled elements. 359 | 360 | button[disabled], html input[disabled] 361 | cursor: default 362 | 363 | /** 364 | * 1. Address box sizing set to content-box in IE 8/9. 365 | * 2. Remove excess padding in IE 8/9. 366 | * 3. Remove excess padding in IE 7. 367 | * Known issue: excess padding remains in IE 6. 368 | 369 | input 370 | &[type="checkbox"], &[type="radio"] 371 | box-sizing: border-box 372 | /* 1 373 | padding: 0 374 | /* 2 375 | *height: 13px 376 | /* 3 377 | *width: 13px 378 | /* 3 379 | &[type="search"] 380 | -webkit-appearance: textfield 381 | /* 1 382 | -moz-box-sizing: content-box 383 | -webkit-box-sizing: content-box 384 | /* 2 385 | box-sizing: content-box 386 | &::-webkit-search-cancel-button, &::-webkit-search-decoration 387 | -webkit-appearance: none 388 | 389 | /** 390 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 391 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 392 | * (include `-moz` to future-proof). 393 | 394 | /** 395 | * Remove inner padding and search cancel button in Safari 5 and Chrome 396 | * on OS X. 397 | 398 | /** 399 | * Remove inner padding and border in Firefox 3+. 400 | 401 | button::-moz-focus-inner, input::-moz-focus-inner 402 | border: 0 403 | padding: 0 404 | 405 | /** 406 | * 1. Remove default vertical scrollbar in IE 6/7/8/9. 407 | * 2. Improve readability and alignment in all browsers. 408 | 409 | textarea 410 | overflow: auto 411 | /* 1 412 | vertical-align: top 413 | /* 2 414 | 415 | /* ========================================================================== 416 | * Tables 417 | * ========================================================================== 418 | 419 | /** 420 | * Remove most spacing between table cells. 421 | 422 | table 423 | border-collapse: collapse 424 | border-spacing: 0 425 | -------------------------------------------------------------------------------- /src/default/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/icons.png -------------------------------------------------------------------------------- /src/default/assets/images/icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/icons.psd -------------------------------------------------------------------------------- /src/default/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/icons@2x.png -------------------------------------------------------------------------------- /src/default/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/widgets.png -------------------------------------------------------------------------------- /src/default/assets/images/widgets.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/widgets.psd -------------------------------------------------------------------------------- /src/default/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/default/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /src/default/assets/js/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { Application, registerComponent } from "./typedoc/Application"; 2 | import { MenuHighlight } from "./typedoc/components/MenuHighlight"; 3 | import { initSearch } from "./typedoc/components/Search"; 4 | import { Signature } from "./typedoc/components/Signature"; 5 | import { Toggle } from "./typedoc/components/Toggle"; 6 | import { Filter } from "./typedoc/components/Filter"; 7 | 8 | import "../../css/main.sass"; 9 | 10 | initSearch(); 11 | 12 | registerComponent(MenuHighlight, ".menu-highlight"); 13 | registerComponent(Signature, ".tsd-signatures"); 14 | registerComponent(Toggle, "a[data-toggle]"); 15 | 16 | if (Filter.isSupported()) { 17 | registerComponent(Filter, "#tsd-filter"); 18 | } else { 19 | document.documentElement.classList.add("no-filter"); 20 | } 21 | 22 | const app: Application = new Application(); 23 | 24 | Object.defineProperty(window, "app", { value: app }); 25 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/Application.ts: -------------------------------------------------------------------------------- 1 | import { IComponentOptions } from "./Component"; 2 | 3 | /** 4 | * Component definition. 5 | */ 6 | export interface IComponent { 7 | constructor: new (options: IComponentOptions) => unknown; 8 | selector: string; 9 | } 10 | 11 | /** 12 | * List of all known components. 13 | */ 14 | const components: IComponent[] = []; 15 | 16 | /** 17 | * Register a new component. 18 | */ 19 | export function registerComponent( 20 | constructor: IComponent["constructor"], 21 | selector: string 22 | ) { 23 | components.push({ 24 | selector: selector, 25 | constructor: constructor, 26 | }); 27 | } 28 | 29 | /** 30 | * TypeDoc application class. 31 | */ 32 | export class Application { 33 | /** 34 | * Create a new Application instance. 35 | */ 36 | constructor() { 37 | this.createComponents(document.body); 38 | } 39 | 40 | /** 41 | * Create all components beneath the given jQuery element. 42 | */ 43 | public createComponents(context: HTMLElement) { 44 | components.forEach((c) => { 45 | context.querySelectorAll(c.selector).forEach((el) => { 46 | if (!el.dataset.hasInstance) { 47 | new c.constructor({ el: el }); 48 | el.dataset.hasInstance = String(true); 49 | } 50 | }); 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/Component.ts: -------------------------------------------------------------------------------- 1 | export interface IComponentOptions { 2 | el: HTMLElement; 3 | } 4 | 5 | /** 6 | * TypeDoc component class. 7 | */ 8 | export class Component { 9 | protected el: HTMLElement; 10 | 11 | constructor(options: IComponentOptions) { 12 | this.el = options.el; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/EventTarget.ts: -------------------------------------------------------------------------------- 1 | export interface IEventListener { 2 | (evt: CustomEvent): void; 3 | } 4 | 5 | /** 6 | * TypeDoc event target class. 7 | */ 8 | export class EventTarget { 9 | private listeners: Record[]> = {}; 10 | 11 | public addEventListener(type: string, callback: IEventListener) { 12 | if (!(type in this.listeners)) { 13 | this.listeners[type] = []; 14 | } 15 | this.listeners[type].push(callback); 16 | } 17 | 18 | public removeEventListener(type: string, callback: IEventListener) { 19 | if (!(type in this.listeners)) { 20 | return; 21 | } 22 | const stack = this.listeners[type]; 23 | for (let i = 0, l = stack.length; i < l; i++) { 24 | if (stack[i] === callback) { 25 | stack.splice(i, 1); 26 | return; 27 | } 28 | } 29 | } 30 | 31 | public dispatchEvent(event: CustomEvent) { 32 | if (!(event.type in this.listeners)) { 33 | return true; 34 | } 35 | const stack = this.listeners[event.type].slice(); 36 | 37 | for (let i = 0, l = stack.length; i < l; i++) { 38 | stack[i].call(this, event); 39 | } 40 | return !event.defaultPrevented; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/components/Filter.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { pointerDown, pointerUp } from "../utils/pointer"; 3 | 4 | abstract class FilterItem { 5 | protected key: string; 6 | 7 | protected value: T; 8 | 9 | protected defaultValue: T; 10 | 11 | constructor(key: string, value: T) { 12 | this.key = key; 13 | this.value = value; 14 | this.defaultValue = value; 15 | 16 | this.initialize(); 17 | 18 | if (window.localStorage[this.key]) { 19 | this.setValue(this.fromLocalStorage(window.localStorage[this.key])); 20 | } 21 | } 22 | 23 | protected initialize() {} 24 | 25 | protected abstract handleValueChange(oldValue: T, newValue: T): void; 26 | 27 | protected abstract fromLocalStorage(value: string): T; 28 | 29 | protected abstract toLocalStorage(value: T): string; 30 | 31 | protected setValue(value: T) { 32 | if (this.value == value) return; 33 | 34 | const oldValue = this.value; 35 | this.value = value; 36 | window.localStorage[this.key] = this.toLocalStorage(value); 37 | 38 | this.handleValueChange(oldValue, value); 39 | } 40 | } 41 | 42 | class FilterItemCheckbox extends FilterItem { 43 | private checkbox!: HTMLInputElement; 44 | 45 | protected initialize() { 46 | const checkbox = document.querySelector( 47 | "#tsd-filter-" + this.key 48 | ); 49 | if (!checkbox) return; 50 | 51 | this.checkbox = checkbox; 52 | this.checkbox.addEventListener("change", () => { 53 | this.setValue(this.checkbox.checked); 54 | }); 55 | } 56 | 57 | protected handleValueChange(oldValue: boolean, newValue: boolean) { 58 | if (!this.checkbox) return; 59 | this.checkbox.checked = this.value; 60 | document.documentElement.classList.toggle( 61 | "toggle-" + this.key, 62 | this.value != this.defaultValue 63 | ); 64 | } 65 | 66 | protected fromLocalStorage(value: string): boolean { 67 | return value == "true"; 68 | } 69 | 70 | protected toLocalStorage(value: boolean): string { 71 | return value ? "true" : "false"; 72 | } 73 | } 74 | 75 | class FilterItemSelect extends FilterItem { 76 | private select!: HTMLElement; 77 | 78 | protected initialize() { 79 | document.documentElement.classList.add( 80 | "toggle-" + this.key + this.value 81 | ); 82 | 83 | const select = document.querySelector( 84 | "#tsd-filter-" + this.key 85 | ); 86 | if (!select) return; 87 | 88 | this.select = select; 89 | const onActivate = () => { 90 | this.select.classList.add("active"); 91 | }; 92 | const onDeactivate = () => { 93 | this.select.classList.remove("active"); 94 | }; 95 | 96 | this.select.addEventListener(pointerDown, onActivate); 97 | this.select.addEventListener("mouseover", onActivate); 98 | this.select.addEventListener("mouseleave", onDeactivate); 99 | 100 | this.select.querySelectorAll("li").forEach((el) => { 101 | el.addEventListener(pointerUp, (e) => { 102 | select.classList.remove("active"); 103 | this.setValue((e.target as HTMLElement).dataset.value || ""); 104 | }); 105 | }); 106 | 107 | document.addEventListener(pointerDown, (e) => { 108 | if (this.select.contains(e.target as HTMLElement)) return; 109 | 110 | this.select.classList.remove("active"); 111 | }); 112 | } 113 | 114 | protected handleValueChange(oldValue: string, newValue: string) { 115 | this.select.querySelectorAll("li.selected").forEach((el) => { 116 | el.classList.remove("selected"); 117 | }); 118 | 119 | const selected = this.select.querySelector( 120 | 'li[data-value="' + newValue + '"]' 121 | ); 122 | const label = this.select.querySelector( 123 | ".tsd-select-label" 124 | ); 125 | 126 | if (selected && label) { 127 | selected.classList.add("selected"); 128 | label.textContent = selected.textContent; 129 | } 130 | 131 | document.documentElement.classList.remove("toggle-" + oldValue); 132 | document.documentElement.classList.add("toggle-" + newValue); 133 | } 134 | 135 | protected fromLocalStorage(value: string): string { 136 | return value; 137 | } 138 | 139 | protected toLocalStorage(value: string): string { 140 | return value; 141 | } 142 | } 143 | 144 | export class Filter extends Component { 145 | private optionVisibility: FilterItemSelect; 146 | 147 | private optionInherited: FilterItemCheckbox; 148 | 149 | private optionExternals: FilterItemCheckbox; 150 | 151 | constructor(options: IComponentOptions) { 152 | super(options); 153 | 154 | this.optionVisibility = new FilterItemSelect("visibility", "private"); 155 | this.optionInherited = new FilterItemCheckbox("inherited", true); 156 | this.optionExternals = new FilterItemCheckbox("externals", true); 157 | } 158 | 159 | static isSupported(): boolean { 160 | try { 161 | return typeof window.localStorage != "undefined"; 162 | } catch (e) { 163 | return false; 164 | } 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/components/MenuHighlight.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { Viewport } from "../services/Viewport"; 3 | 4 | /** 5 | * Stored element and position data of a single anchor. 6 | */ 7 | interface IAnchorInfo { 8 | /** 9 | * The anchor element. 10 | */ 11 | anchor: HTMLElement; 12 | 13 | /** 14 | * The link element in the navigation representing this anchor. 15 | */ 16 | link: HTMLElement; 17 | 18 | /** 19 | * The vertical offset of the anchor on the page. 20 | */ 21 | position: number; 22 | } 23 | 24 | /** 25 | * Manages the sticky state of the navigation and moves the highlight 26 | * to the current navigation item. 27 | */ 28 | export class MenuHighlight extends Component { 29 | /** 30 | * List of all discovered anchors. 31 | */ 32 | private anchors: IAnchorInfo[] = []; 33 | 34 | /** 35 | * Index of the currently highlighted anchor. 36 | */ 37 | private index: number = -1; 38 | 39 | /** 40 | * Create a new MenuHighlight instance. 41 | * 42 | * @param options Backbone view constructor options. 43 | */ 44 | constructor(options: IComponentOptions) { 45 | super(options); 46 | 47 | Viewport.instance.addEventListener("resize", () => this.onResize()); 48 | Viewport.instance.addEventListener<{ scrollTop: number }>( 49 | "scroll", 50 | (e) => this.onScroll(e) 51 | ); 52 | 53 | this.createAnchors(); 54 | } 55 | 56 | /** 57 | * Find all anchors on the current page. 58 | */ 59 | private createAnchors() { 60 | let base = window.location.href; 61 | if (base.indexOf("#") != -1) { 62 | base = base.substr(0, base.indexOf("#")); 63 | } 64 | 65 | this.el.querySelectorAll("a").forEach((el) => { 66 | const href = el.href; 67 | if (href.indexOf("#") == -1) return; 68 | if (href.substr(0, base.length) != base) return; 69 | 70 | const hash = href.substr(href.indexOf("#") + 1); 71 | const anchor = document.querySelector( 72 | "a.tsd-anchor[name=" + hash + "]" 73 | ); 74 | const link = el.parentNode; 75 | if (!anchor || !link) return; 76 | 77 | this.anchors.push({ 78 | link: link as HTMLElement, 79 | anchor: anchor, 80 | position: 0, 81 | }); 82 | }); 83 | 84 | this.onResize(); 85 | } 86 | 87 | /** 88 | * Triggered after the viewport was resized. 89 | */ 90 | private onResize() { 91 | let anchor: IAnchorInfo; 92 | for ( 93 | let index = 0, count = this.anchors.length; 94 | index < count; 95 | index++ 96 | ) { 97 | anchor = this.anchors[index]; 98 | const rect = anchor.anchor.getBoundingClientRect(); 99 | anchor.position = rect.top + document.body.scrollTop; 100 | } 101 | 102 | this.anchors.sort((a, b) => { 103 | return a.position - b.position; 104 | }); 105 | 106 | const event = new CustomEvent("scroll", { 107 | detail: { 108 | scrollTop: Viewport.instance.scrollTop, 109 | }, 110 | }); 111 | this.onScroll(event); 112 | } 113 | 114 | /** 115 | * Triggered after the viewport was scrolled. 116 | * 117 | * @param event The custom event with the current vertical scroll position. 118 | */ 119 | private onScroll(event: CustomEvent<{ scrollTop: number }>) { 120 | const scrollTop = event.detail.scrollTop + 5; 121 | const anchors = this.anchors; 122 | const count = anchors.length - 1; 123 | let index = this.index; 124 | 125 | while (index > -1 && anchors[index].position > scrollTop) { 126 | index -= 1; 127 | } 128 | 129 | while (index < count && anchors[index + 1].position < scrollTop) { 130 | index += 1; 131 | } 132 | 133 | if (this.index != index) { 134 | if (this.index > -1) 135 | this.anchors[this.index].link.classList.remove("focus"); 136 | this.index = index; 137 | if (this.index > -1) 138 | this.anchors[this.index].link.classList.add("focus"); 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/components/Search.ts: -------------------------------------------------------------------------------- 1 | import { debounce } from "../utils/debounce"; 2 | import { Index } from "lunr"; 3 | 4 | interface IDocument { 5 | id: number; 6 | kind: number; 7 | name: string; 8 | url: string; 9 | classes: string; 10 | parent?: string; 11 | } 12 | 13 | interface IData { 14 | kinds: { [kind: number]: string }; 15 | rows: IDocument[]; 16 | index: object; 17 | } 18 | 19 | declare global { 20 | interface Window { 21 | searchData?: IData; 22 | } 23 | } 24 | 25 | interface SearchState { 26 | base: string; 27 | data?: IData; 28 | index?: Index; 29 | } 30 | 31 | export function initSearch() { 32 | const searchEl = document.getElementById("tsd-search"); 33 | if (!searchEl) return; 34 | 35 | const searchScript = document.getElementById( 36 | "search-script" 37 | ) as HTMLScriptElement | null; 38 | searchEl.classList.add("loading"); 39 | if (searchScript) { 40 | searchScript.addEventListener("error", () => { 41 | searchEl.classList.remove("loading"); 42 | searchEl.classList.add("failure"); 43 | }); 44 | searchScript.addEventListener("load", () => { 45 | searchEl.classList.remove("loading"); 46 | searchEl.classList.add("ready"); 47 | }); 48 | if (window.searchData) { 49 | searchEl.classList.remove("loading"); 50 | } 51 | } 52 | 53 | const field = document.querySelector("#tsd-search-field"); 54 | const results = document.querySelector(".results"); 55 | 56 | if (!field || !results) { 57 | throw new Error( 58 | "The input field or the result list wrapper was not found" 59 | ); 60 | } 61 | 62 | let resultClicked = false; 63 | results.addEventListener("mousedown", () => (resultClicked = true)); 64 | results.addEventListener("mouseup", () => { 65 | resultClicked = false; 66 | searchEl.classList.remove("has-focus"); 67 | }); 68 | 69 | field.addEventListener("focus", () => searchEl.classList.add("has-focus")); 70 | field.addEventListener("blur", () => { 71 | if (!resultClicked) { 72 | resultClicked = false; 73 | searchEl.classList.remove("has-focus"); 74 | } 75 | }); 76 | 77 | const state: SearchState = { 78 | base: searchEl.dataset.base + "/", 79 | }; 80 | 81 | bindEvents(searchEl, results, field, state); 82 | } 83 | 84 | function bindEvents( 85 | searchEl: HTMLElement, 86 | results: HTMLElement, 87 | field: HTMLInputElement, 88 | state: SearchState 89 | ) { 90 | field.addEventListener( 91 | "input", 92 | debounce(() => { 93 | updateResults(searchEl, results, field, state); 94 | }, 200) 95 | ); 96 | 97 | let preventPress = false; 98 | field.addEventListener("keydown", (e) => { 99 | preventPress = true; 100 | if (e.key == "Enter") { 101 | gotoCurrentResult(results, field); 102 | } else if (e.key == "Escape") { 103 | field.blur(); 104 | } else if (e.key == "ArrowUp") { 105 | setCurrentResult(results, -1); 106 | } else if (e.key === "ArrowDown") { 107 | setCurrentResult(results, 1); 108 | } else { 109 | preventPress = false; 110 | } 111 | }); 112 | field.addEventListener("keypress", (e) => { 113 | if (preventPress) e.preventDefault(); 114 | }); 115 | 116 | /** 117 | * Start searching by pressing slash. 118 | */ 119 | document.body.addEventListener("keydown", (e) => { 120 | if (e.altKey || e.ctrlKey || e.metaKey) return; 121 | if (!field.matches(":focus") && e.key === "/") { 122 | field.focus(); 123 | e.preventDefault(); 124 | } 125 | }); 126 | } 127 | 128 | function checkIndex(state: SearchState, searchEl: HTMLElement) { 129 | if (state.index) return; 130 | 131 | if (window.searchData) { 132 | searchEl.classList.remove("loading"); 133 | searchEl.classList.add("ready"); 134 | state.data = window.searchData; 135 | state.index = Index.load(window.searchData.index); 136 | } 137 | } 138 | 139 | function updateResults( 140 | searchEl: HTMLElement, 141 | results: HTMLElement, 142 | query: HTMLInputElement, 143 | state: SearchState 144 | ) { 145 | checkIndex(state, searchEl); 146 | // Don't clear results if loading state is not ready, 147 | // because loading or error message can be removed. 148 | if (!state.index || !state.data) return; 149 | 150 | results.textContent = ""; 151 | 152 | const searchText = query.value.trim(); 153 | 154 | // Perform a wildcard search 155 | let res = state.index.search(`*${searchText}*`); 156 | 157 | for (let i = 0, c = Math.min(10, res.length); i < c; i++) { 158 | const row = state.data.rows[Number(res[i].ref)]; 159 | 160 | // Bold the matched part of the query in the search results 161 | let name = boldMatches(row.name, searchText); 162 | if (row.parent) { 163 | name = `${boldMatches( 164 | row.parent, 165 | searchText 166 | )}.${name}`; 167 | } 168 | 169 | const item = document.createElement("li"); 170 | item.classList.value = row.classes; 171 | 172 | const anchor = document.createElement("a"); 173 | anchor.href = state.base + row.url; 174 | anchor.classList.add("tsd-kind-icon"); 175 | anchor.innerHTML = name; 176 | item.append(anchor); 177 | 178 | results.appendChild(item); 179 | } 180 | } 181 | 182 | /** 183 | * Move the highlight within the result set. 184 | */ 185 | function setCurrentResult(results: HTMLElement, dir: number) { 186 | let current = results.querySelector(".current"); 187 | if (!current) { 188 | current = results.querySelector( 189 | dir == 1 ? "li:first-child" : "li:last-child" 190 | ); 191 | if (current) { 192 | current.classList.add("current"); 193 | } 194 | } else { 195 | const rel = 196 | dir == 1 197 | ? current.nextElementSibling 198 | : current.previousElementSibling; 199 | if (rel) { 200 | current.classList.remove("current"); 201 | rel.classList.add("current"); 202 | } 203 | } 204 | } 205 | 206 | /** 207 | * Navigate to the highlighted result. 208 | */ 209 | function gotoCurrentResult(results: HTMLElement, field: HTMLInputElement) { 210 | let current = results.querySelector(".current"); 211 | 212 | if (!current) { 213 | current = results.querySelector("li:first-child"); 214 | } 215 | 216 | if (current) { 217 | const link = current.querySelector("a"); 218 | if (link) { 219 | window.location.href = link.href; 220 | } 221 | field.blur(); 222 | } 223 | } 224 | 225 | function boldMatches(text: string, search: string) { 226 | if (search === "") { 227 | return text; 228 | } 229 | 230 | const lowerText = text.toLocaleLowerCase(); 231 | const lowerSearch = search.toLocaleLowerCase(); 232 | 233 | const parts = []; 234 | let lastIndex = 0; 235 | let index = lowerText.indexOf(lowerSearch); 236 | while (index != -1) { 237 | parts.push( 238 | escapeHtml(text.substring(lastIndex, index)), 239 | `${escapeHtml( 240 | text.substring(index, index + lowerSearch.length) 241 | )}` 242 | ); 243 | 244 | lastIndex = index + lowerSearch.length; 245 | index = lowerText.indexOf(lowerSearch, lastIndex); 246 | } 247 | 248 | parts.push(escapeHtml(text.substring(lastIndex))); 249 | 250 | return parts.join(""); 251 | } 252 | 253 | const SPECIAL_HTML = { 254 | "&": "&", 255 | "<": "<", 256 | ">": ">", 257 | "'": "'", 258 | '"': """, 259 | } as const; 260 | 261 | function escapeHtml(text: string) { 262 | return text.replace( 263 | /[&<>"'"]/g, 264 | (match) => SPECIAL_HTML[match as keyof typeof SPECIAL_HTML] 265 | ); 266 | } 267 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/components/Signature.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { Viewport } from "../services/Viewport"; 3 | 4 | /** 5 | * Holds a signature and its description. 6 | */ 7 | class SignatureGroup { 8 | /** 9 | * The target signature. 10 | */ 11 | signature: Element; 12 | 13 | /** 14 | * The description for the signature. 15 | */ 16 | description: Element; 17 | 18 | /** 19 | * Create a new SignatureGroup instance. 20 | * 21 | * @param signature The target signature. 22 | * @param description The description for the signature. 23 | */ 24 | constructor(signature: Element, description: Element) { 25 | this.signature = signature; 26 | this.description = description; 27 | } 28 | 29 | /** 30 | * Add the given class to all elements of the group. 31 | * 32 | * @param className The class name to add. 33 | */ 34 | addClass(className: string): SignatureGroup { 35 | this.signature.classList.add(className); 36 | this.description.classList.add(className); 37 | return this; 38 | } 39 | 40 | /** 41 | * Remove the given class from all elements of the group. 42 | * 43 | * @param className The class name to remove. 44 | */ 45 | removeClass(className: string): SignatureGroup { 46 | this.signature.classList.remove(className); 47 | this.description.classList.remove(className); 48 | return this; 49 | } 50 | } 51 | 52 | /** 53 | * Controls the tab like behaviour of methods and functions with multiple signatures. 54 | */ 55 | export class Signature extends Component { 56 | /** 57 | * List of found signature groups. 58 | */ 59 | private groups: SignatureGroup[] = []; 60 | 61 | /** 62 | * The container holding all the descriptions. 63 | */ 64 | private container?: HTMLElement; 65 | 66 | /** 67 | * The index of the currently displayed signature. 68 | */ 69 | private index: number = -1; 70 | 71 | /** 72 | * Create a new Signature instance. 73 | * 74 | * @param options Backbone view constructor options. 75 | */ 76 | constructor(options: IComponentOptions) { 77 | super(options); 78 | 79 | this.createGroups(); 80 | 81 | if (this.container) { 82 | this.el.classList.add("active"); 83 | Array.from(this.el.children).forEach((signature) => { 84 | signature.addEventListener("touchstart", (event) => 85 | this.onClick(event) 86 | ); 87 | signature.addEventListener("click", (event) => 88 | this.onClick(event) 89 | ); 90 | }); 91 | this.container.classList.add("active"); 92 | this.setIndex(0); 93 | } 94 | } 95 | 96 | /** 97 | * Set the index of the active signature. 98 | * 99 | * @param index The index of the signature to activate. 100 | */ 101 | private setIndex(index: number) { 102 | if (index < 0) index = 0; 103 | if (index > this.groups.length - 1) index = this.groups.length - 1; 104 | if (this.index == index) return; 105 | 106 | const to = this.groups[index]; 107 | if (this.index > -1) { 108 | const from = this.groups[this.index]; 109 | 110 | from.removeClass("current").addClass("fade-out"); 111 | to.addClass("current"); 112 | to.addClass("fade-in"); 113 | Viewport.instance.triggerResize(); 114 | 115 | setTimeout(() => { 116 | from.removeClass("fade-out"); 117 | to.removeClass("fade-in"); 118 | }, 300); 119 | } else { 120 | to.addClass("current"); 121 | Viewport.instance.triggerResize(); 122 | } 123 | 124 | this.index = index; 125 | } 126 | 127 | /** 128 | * Find all signature/description groups. 129 | */ 130 | private createGroups() { 131 | const signatures = this.el.children; 132 | if (signatures.length < 2) return; 133 | 134 | this.container = this.el.nextElementSibling as HTMLElement; 135 | const descriptions = this.container.children; 136 | 137 | this.groups = []; 138 | for (let index = 0; index < signatures.length; index++) { 139 | this.groups.push( 140 | new SignatureGroup(signatures[index], descriptions[index]) 141 | ); 142 | } 143 | } 144 | 145 | /** 146 | * Triggered when the user clicks onto a signature header. 147 | * 148 | * @param e The related event object. 149 | */ 150 | private onClick(e: Event) { 151 | this.groups.forEach((group, index) => { 152 | if (group.signature === e.currentTarget) { 153 | this.setIndex(index); 154 | } 155 | }); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/components/Toggle.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { hasPointerMoved, pointerDown, pointerUp } from "../utils/pointer"; 3 | 4 | export class Toggle extends Component { 5 | active?: boolean; 6 | 7 | className: string; 8 | 9 | constructor(options: IComponentOptions) { 10 | super(options); 11 | 12 | this.className = this.el.dataset.toggle || ""; 13 | this.el.addEventListener(pointerUp, (e) => this.onPointerUp(e)); 14 | this.el.addEventListener("click", (e) => e.preventDefault()); 15 | document.addEventListener(pointerDown, (e) => 16 | this.onDocumentPointerDown(e) 17 | ); 18 | document.addEventListener(pointerUp, (e) => 19 | this.onDocumentPointerUp(e) 20 | ); 21 | } 22 | 23 | setActive(value: boolean) { 24 | if (this.active == value) return; 25 | this.active = value; 26 | 27 | document.documentElement.classList.toggle( 28 | "has-" + this.className, 29 | value 30 | ); 31 | this.el.classList.toggle("active", value); 32 | 33 | const transition = 34 | (this.active ? "to-has-" : "from-has-") + this.className; 35 | document.documentElement.classList.add(transition); 36 | setTimeout( 37 | () => document.documentElement.classList.remove(transition), 38 | 500 39 | ); 40 | } 41 | 42 | onPointerUp(event: Event) { 43 | if (hasPointerMoved) return; 44 | this.setActive(true); 45 | event.preventDefault(); 46 | } 47 | 48 | onDocumentPointerDown(e: Event) { 49 | if (this.active) { 50 | if ( 51 | (e.target as HTMLElement).closest( 52 | ".col-menu, .tsd-filter-group" 53 | ) 54 | ) { 55 | return; 56 | } 57 | 58 | this.setActive(false); 59 | } 60 | } 61 | 62 | onDocumentPointerUp(e: Event) { 63 | if (hasPointerMoved) return; 64 | if (this.active) { 65 | if ((e.target as HTMLElement).closest(".col-menu")) { 66 | const link = (e.target as HTMLElement).closest("a"); 67 | if (link) { 68 | let href = window.location.href; 69 | if (href.indexOf("#") != -1) { 70 | href = href.substr(0, href.indexOf("#")); 71 | } 72 | if (link.href.substr(0, href.length) == href) { 73 | setTimeout(() => this.setActive(false), 250); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/services/Viewport.ts: -------------------------------------------------------------------------------- 1 | import { EventTarget } from "../EventTarget"; 2 | import { throttle } from "../utils/trottle"; 3 | 4 | /** 5 | * A global service that monitors the window size and scroll position. 6 | */ 7 | export class Viewport extends EventTarget { 8 | public static readonly instance = new Viewport(); 9 | 10 | /** 11 | * The current scroll position. 12 | */ 13 | scrollTop: number = 0; 14 | 15 | /** 16 | * The previous scrollTop. 17 | */ 18 | lastY: number = 0; 19 | 20 | /** 21 | * The width of the window. 22 | */ 23 | width: number = 0; 24 | 25 | /** 26 | * The height of the window. 27 | */ 28 | height: number = 0; 29 | 30 | /** 31 | * The toolbar (contains the search input). 32 | */ 33 | toolbar: HTMLDivElement; 34 | 35 | /** 36 | * Boolean indicating whether the toolbar is shown. 37 | */ 38 | showToolbar: boolean = true; 39 | 40 | /** 41 | * The sticky side nav that contains members of the current page. 42 | */ 43 | secondaryNav: HTMLElement; 44 | 45 | /** 46 | * Create new Viewport instance. 47 | */ 48 | constructor() { 49 | super(); 50 | 51 | this.toolbar = ( 52 | document.querySelector(".tsd-page-toolbar") 53 | ); 54 | this.secondaryNav = ( 55 | document.querySelector(".tsd-navigation.secondary") 56 | ); 57 | 58 | window.addEventListener( 59 | "scroll", 60 | throttle(() => this.onScroll(), 10) 61 | ); 62 | window.addEventListener( 63 | "resize", 64 | throttle(() => this.onResize(), 10) 65 | ); 66 | 67 | this.onResize(); 68 | this.onScroll(); 69 | } 70 | 71 | /** 72 | * Trigger a resize event. 73 | */ 74 | triggerResize() { 75 | const event = new CustomEvent("resize", { 76 | detail: { 77 | width: this.width, 78 | height: this.height, 79 | }, 80 | }); 81 | 82 | this.dispatchEvent(event); 83 | } 84 | 85 | /** 86 | * Triggered when the size of the window has changed. 87 | */ 88 | onResize() { 89 | this.width = window.innerWidth || 0; 90 | this.height = window.innerHeight || 0; 91 | 92 | const event = new CustomEvent("resize", { 93 | detail: { 94 | width: this.width, 95 | height: this.height, 96 | }, 97 | }); 98 | 99 | this.dispatchEvent(event); 100 | } 101 | 102 | /** 103 | * Triggered when the user scrolled the viewport. 104 | */ 105 | onScroll() { 106 | this.scrollTop = window.scrollY || 0; 107 | 108 | const event = new CustomEvent("scroll", { 109 | detail: { 110 | scrollTop: this.scrollTop, 111 | }, 112 | }); 113 | 114 | this.dispatchEvent(event); 115 | this.hideShowToolbar(); 116 | } 117 | 118 | /** 119 | * Handle hiding/showing of the toolbar. 120 | */ 121 | hideShowToolbar() { 122 | const isShown = this.showToolbar; 123 | this.showToolbar = this.lastY >= this.scrollTop || this.scrollTop <= 0; 124 | if (isShown !== this.showToolbar) { 125 | this.toolbar.classList.toggle("tsd-page-toolbar--hide"); 126 | this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide"); 127 | } 128 | this.lastY = this.scrollTop; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/utils/debounce.ts: -------------------------------------------------------------------------------- 1 | export const debounce = (fn: Function, wait: number = 100) => { 2 | let timeout: ReturnType; 3 | return (...args: any[]) => { 4 | clearTimeout(timeout); 5 | timeout = setTimeout(() => fn(args), wait); 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/utils/pointer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Simple point interface. 3 | */ 4 | export interface Point { 5 | x: number; 6 | y: number; 7 | } 8 | 9 | /** 10 | * Event name of the pointer down event. 11 | */ 12 | export let pointerDown: string = "mousedown"; 13 | 14 | /** 15 | * Event name of the pointer move event. 16 | */ 17 | export let pointerMove: string = "mousemove"; 18 | 19 | /** 20 | * Event name of the pointer up event. 21 | */ 22 | export let pointerUp: string = "mouseup"; 23 | 24 | /** 25 | * Position the pointer was pressed at. 26 | */ 27 | export const pointerDownPosition: Point = { x: 0, y: 0 }; 28 | 29 | /** 30 | * Should the next click on the document be supressed? 31 | */ 32 | export let preventNextClick: boolean = false; 33 | 34 | /** 35 | * Is the pointer down? 36 | */ 37 | export let isPointerDown: boolean = false; 38 | 39 | /** 40 | * Is the pointer a touch point? 41 | */ 42 | export let isPointerTouch: boolean = false; 43 | 44 | /** 45 | * Did the pointer move since the last down event? 46 | */ 47 | export let hasPointerMoved: boolean = false; 48 | 49 | /** 50 | * Is the user agent a mobile agent? 51 | */ 52 | export const isMobile: boolean = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( 53 | navigator.userAgent 54 | ); 55 | document.documentElement.classList.add(isMobile ? "is-mobile" : "not-mobile"); 56 | 57 | if (isMobile && "ontouchstart" in document.documentElement) { 58 | isPointerTouch = true; 59 | pointerDown = "touchstart"; 60 | pointerMove = "touchmove"; 61 | pointerUp = "touchend"; 62 | } 63 | 64 | document.addEventListener(pointerDown, (e) => { 65 | isPointerDown = true; 66 | hasPointerMoved = false; 67 | const t = 68 | pointerDown == "touchstart" 69 | ? (e as TouchEvent).targetTouches[0] 70 | : (e as MouseEvent); 71 | pointerDownPosition.y = t.pageY || 0; 72 | pointerDownPosition.x = t.pageX || 0; 73 | }); 74 | 75 | document.addEventListener(pointerMove, (e) => { 76 | if (!isPointerDown) return; 77 | if (!hasPointerMoved) { 78 | const t = 79 | pointerDown == "touchstart" 80 | ? (e as TouchEvent).targetTouches[0] 81 | : (e as MouseEvent); 82 | const x = pointerDownPosition.x - (t.pageX || 0); 83 | const y = pointerDownPosition.y - (t.pageY || 0); 84 | hasPointerMoved = Math.sqrt(x * x + y * y) > 10; 85 | } 86 | }); 87 | 88 | document.addEventListener(pointerUp, () => { 89 | isPointerDown = false; 90 | }); 91 | 92 | document.addEventListener("click", (e) => { 93 | if (preventNextClick) { 94 | e.preventDefault(); 95 | e.stopImmediatePropagation(); 96 | preventNextClick = false; 97 | } 98 | }); 99 | -------------------------------------------------------------------------------- /src/default/assets/js/src/typedoc/utils/trottle.ts: -------------------------------------------------------------------------------- 1 | export const throttle = ( 2 | fn: (...args: A) => void, 3 | wait = 100 4 | ) => { 5 | let time = Date.now(); 6 | return (...args: A) => { 7 | if (time + wait - Date.now() < 0) { 8 | fn(...args); 9 | time = Date.now(); 10 | } 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /src/default/layouts/default.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{> header}} 16 | 17 |
18 |
19 |
20 | {{{contents}}} 21 |
22 | 39 |
40 |
41 | 42 | {{> footer}} 43 | 44 |
45 | 46 | 47 | {{> analytics}} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/default/partials/analytics.hbs: -------------------------------------------------------------------------------- 1 | {{#if settings.gaID}} 2 | 11 | {{/if}} -------------------------------------------------------------------------------- /src/default/partials/breadcrumb.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}} 2 | {{#with parent}}{{> breadcrumb}}{{/with}} 3 |
  • 4 | {{#if url}} 5 | {{name}} 6 | {{else}} 7 | {{name}} 8 | {{/if}} 9 |
  • 10 | {{else}} 11 | {{#if url}} 12 |
  • 13 | {{ name }} 14 |
  • 15 | {{/if}} 16 | {{/if}} 17 | -------------------------------------------------------------------------------- /src/default/partials/comment.hbs: -------------------------------------------------------------------------------- 1 | {{#with comment}} 2 | {{#if hasVisibleComponent}} 3 |
    4 | {{#if shortText}} 5 |
    6 | {{#markdown}}{{{shortText}}}{{/markdown}} 7 |
    8 | {{/if}} 9 | {{#if text}} 10 | {{#markdown}}{{{text}}}{{/markdown}} 11 | {{/if}} 12 | {{#if tags}} 13 |
    14 | {{#each tags}} 15 |
    {{tagName}}
    16 |
    {{#markdown}}{{{text}}}{{/markdown}}
    17 | {{/each}} 18 |
    19 | {{/if}} 20 |
    21 | {{/if}} 22 | {{/with}} -------------------------------------------------------------------------------- /src/default/partials/footer.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |

    Legend

    5 |
    6 | {{#each legend}} 7 |
      8 | {{#each .}} 9 |
    • {{name}}
    • 10 | {{/each}} 11 |
    12 | {{/each}} 13 |
    14 |
    15 | 16 | 17 | {{#unless settings.hideGenerator}} 18 |
    19 |

    Generated using TypeDoc

    20 |
    21 | {{/unless}} -------------------------------------------------------------------------------- /src/default/partials/header.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | 18 | 19 |
    20 |
    21 | Options 22 |
    23 |
    24 | All 25 |
      26 |
    • Public
    • 27 |
    • Public/Protected
    • 28 |
    • All
    • 29 |
    30 |
    31 | 32 | 33 | 34 | 35 | {{#unless settings.excludeExternals}} 36 | 37 | 38 | {{/unless}} 39 |
    40 |
    41 | 42 | Menu 43 |
    44 |
    45 |
    46 |
    47 |
    48 |
    49 | {{#if model.parent}} {{! Don't show breadcrumbs on main project page, it is the root page. !}} 50 |
      51 | {{#with model}}{{> breadcrumb}}{{/with}} 52 |
    53 | {{/if}} 54 |

    {{#compact}} 55 | {{#ifCond model.kindString "!==" "Project" }} 56 | {{model.kindString}}  57 | {{/ifCond}} 58 | {{model.name}} 59 | {{#if model.typeParameters}} 60 | < 61 | {{#each model.typeParameters}} 62 | {{#if @index}}, {{/if}} 63 | {{name}} 64 | {{/each}} 65 | > 66 | {{/if}} 67 | {{/compact}}

    68 |
    69 |
    70 |
    71 | -------------------------------------------------------------------------------- /src/default/partials/hierarchy.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#each types}} 3 |
    • 4 | {{#if ../isTarget}} 5 | {{this}} 6 | {{else}} 7 | {{#compact}}{{> type}}{{/compact}} 8 | {{/if}} 9 | 10 | {{#if @last}} 11 | {{#with ../next}} 12 | {{> hierarchy}} 13 | {{/with}} 14 | {{/if}} 15 |
    • 16 | {{/each}} 17 |
    18 | -------------------------------------------------------------------------------- /src/default/partials/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 |
    3 |

    Index

    4 |
    5 |
    6 | {{#each categories}} 7 |
    8 |

    {{title}}

    9 | 14 |
    15 | {{/each}} 16 |
    17 |
    18 |
    19 | {{else}} 20 | {{#if groups}} 21 |
    22 |

    Index

    23 |
    24 |
    25 | {{#each groups}} 26 |
    27 | {{#if categories}} 28 | {{#each categories}} 29 |

    {{#if title}}{{title}} {{/if}}{{../title}}

    30 | 35 | {{/each}} 36 | {{else}} 37 |

    {{title}}

    38 | 43 | {{/if}} 44 |
    45 | {{/each}} 46 |
    47 |
    48 |
    49 | {{/if}} 50 | {{/if}} 51 | -------------------------------------------------------------------------------- /src/default/partials/member.declaration.hbs: -------------------------------------------------------------------------------- 1 |
    {{#compact}} 2 | {{{wbr name}}} 3 | {{#if typeParameters}} 4 | < 5 | {{#each typeParameters}} 6 | {{#if @index}}, {{/if}} 7 | {{name}} 8 | {{/each}} 9 | > 10 | {{/if}} 11 | {{#if isOptional}}?{{/if}}: {{#with type}}{{>type}}{{/with}} 12 | {{#if defaultValue}} 13 | 14 |  =  15 | {{defaultValue}} 16 | 17 | {{/if}} 18 | {{/compact}}
    19 | 20 | {{> member.sources}} 21 | 22 | {{> comment}} 23 | 24 | {{#if typeParameters}} 25 |

    Type parameters

    26 | {{> typeParameters}} 27 | {{/if}} 28 | 29 | {{#if type.declaration}} 30 |
    31 |

    Type declaration

    32 | {{#with type.declaration}} 33 | {{> parameter}} 34 | {{/with}} 35 |
    36 | {{/if}} 37 | -------------------------------------------------------------------------------- /src/default/partials/member.getterSetter.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#if getSignature}} 3 | {{#with getSignature}} 4 |
    • {{#compact}} 5 | get  6 | {{../name}} 7 | {{> member.signature.title hideName=true }} 8 | {{/compact}}
    • 9 | {{/with}} 10 | {{/if}} 11 | {{#if setSignature}} 12 | {{#with setSignature}} 13 |
    • {{#compact}} 14 | set  15 | {{../name}} 16 | {{> member.signature.title hideName=true }} 17 | {{/compact}}
    • 18 | {{/with}} 19 | {{/if}} 20 |
    21 | 22 |
      23 | {{#if getSignature}} 24 | {{#with getSignature}} 25 |
    • 26 | {{> member.signature.body }} 27 |
    • 28 | {{/with}} 29 | {{/if}} 30 | {{#if setSignature}} 31 | {{#with setSignature}} 32 |
    • 33 | {{> member.signature.body }} 34 |
    • 35 | {{/with}} 36 | {{/if}} 37 |
    38 | -------------------------------------------------------------------------------- /src/default/partials/member.hbs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | {{#if name}} 4 |

    {{#each flags}}{{this}} {{/each}}{{{wbr name}}}

    5 | {{/if}} 6 | 7 | {{#if signatures}} 8 | {{> member.signatures}} 9 | {{else}}{{#if hasGetterOrSetter}} 10 | {{> member.getterSetter}} 11 | {{else}}{{#if isReference}} 12 | {{> member.reference}} 13 | {{else}} 14 | {{> member.declaration}} 15 | {{/if}}{{/if}}{{/if}} 16 | 17 | {{#each groups}} 18 | {{#each children}} 19 | {{#unless hasOwnDocument}} 20 | {{> member}} 21 | {{/unless}} 22 | {{/each}} 23 | {{/each}} 24 |
    25 | -------------------------------------------------------------------------------- /src/default/partials/member.reference.hbs: -------------------------------------------------------------------------------- 1 | {{#with tryGetTargetReflectionDeep}} 2 | {{#ifCond ../name '===' name}} 3 | Re-exports {{name}} 4 | {{else if flags.isExported}} 5 | Renames and re-exports {{name}} 6 | {{else}} 7 | Renames and exports {{name}} 8 | {{/ifCond}} 9 | {{else}} 10 | Re-exports {{name}} 11 | {{/with}} 12 | -------------------------------------------------------------------------------- /src/default/partials/member.signature.body.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideSources}} 2 | {{> member.sources}} 3 | {{/unless}} 4 | 5 | {{> comment}} 6 | 7 | {{#if typeParameters}} 8 |

    Type parameters

    9 | {{> typeParameters}} 10 | {{/if}} 11 | 12 | {{#if parameters}} 13 |

    Parameters

    14 |
      15 | {{#each parameters}} 16 |
    • 17 |
      {{#compact}} 18 | {{#each flags}} 19 | {{this}}  20 | {{/each}} 21 | {{#if flags.isRest}}...{{/if}} 22 | {{name}}:  23 | {{#with type}}{{>type}}{{/with}} 24 | {{#if defaultValue}} 25 | 26 |  =  27 | {{defaultValue}} 28 | 29 | {{/if}} 30 | {{/compact}}
      31 | 32 | {{> comment}} 33 | 34 | {{#if type.declaration}} 35 | {{#with type.declaration}} 36 | {{> parameter}} 37 | {{/with}} 38 | {{/if}} 39 |
    • 40 | {{/each}} 41 |
    42 | {{/if}} 43 | 44 | {{#if type}} 45 |

    Returns {{#compact}}{{#with type}}{{>type}}{{/with}}{{/compact}}

    46 | 47 | {{#if comment.returns}} 48 | {{#markdown}}{{{comment.returns}}}{{/markdown}} 49 | {{/if}} 50 | 51 | {{#if type.declaration}} 52 | {{#with type.declaration}} 53 | {{> parameter}} 54 | {{/with}} 55 | {{/if}} 56 | {{/if}} 57 | -------------------------------------------------------------------------------- /src/default/partials/member.signature.title.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideName}} 2 | {{{wbr name}}} 3 | {{else}} {{! This ugliness goes away when we stop naming constructor signatures "new X"}} 4 | {{#ifCond kindString "===" "Constructor signature"}} 5 | {{#if flags.isAbstract}} 6 | abstract 7 | {{/if}} 8 | new 9 | {{/ifCond}} 10 | {{/unless}} 11 | {{#if typeParameters}} 12 | < 13 | {{#each typeParameters}} 14 | {{#if @index}}, {{/if}} 15 | {{name}} 16 | {{/each}} 17 | > 18 | {{/if}} 19 | ( 20 | {{#each parameters}} 21 | {{#if @index}}, {{/if}} 22 | {{#if flags.isRest}}...{{/if}} 23 | {{name}} 24 | 25 | {{#if flags.isOptional}}?{{/if}} 26 | {{#if defaultValue}}?{{/if}} 27 | :  28 | 29 | {{#with type}}{{>type}}{{/with}} 30 | {{/each}} 31 | ) 32 | {{#if type}} 33 | {{#if arrowStyle}} 34 | => 35 | {{else}} 36 | : 37 | {{/if}} 38 | {{#with type}} 39 | {{>type}} 40 | {{/with}} 41 | {{/if}} 42 | -------------------------------------------------------------------------------- /src/default/partials/member.signatures.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#each signatures}} 3 |
    • {{#compact}}{{> member.signature.title }}{{/compact}}
    • 4 | {{/each}} 5 |
    6 | 7 |
      8 | {{#each signatures}} 9 |
    • 10 | {{> member.signature.body }} 11 |
    • 12 | {{/each}} 13 |
    14 | -------------------------------------------------------------------------------- /src/default/partials/member.sources.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/default/partials/members.group.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 |
    4 |

    {{#if title}}{{title}} {{/if}}{{../title}}

    5 | {{#each children}} 6 | {{#unless hasOwnDocument}} 7 | {{> member}} 8 | {{/unless}} 9 | {{/each}} 10 |
    11 | {{/each}} 12 | {{else}} 13 |
    14 |

    {{title}}

    15 | {{#each children}} 16 | {{#unless hasOwnDocument}} 17 | {{> member}} 18 | {{/unless}} 19 | {{/each}} 20 |
    21 | {{/if}} -------------------------------------------------------------------------------- /src/default/partials/members.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 | {{#unless allChildrenHaveOwnDocument}} 4 |
    5 |

    {{title}}

    6 | {{#each children}} 7 | {{#unless hasOwnDocument}} 8 | {{> member}} 9 | {{/unless}} 10 | {{/each}} 11 |
    12 | {{/unless}} 13 | {{/each}} 14 | {{else}} 15 | {{#each groups}} 16 | {{#unless allChildrenHaveOwnDocument}} 17 | {{> members.group}} 18 | {{/unless}} 19 | {{/each}} 20 | {{/if}} -------------------------------------------------------------------------------- /src/default/partials/navigation.hbs: -------------------------------------------------------------------------------- 1 | {{#if isVisible}} 2 | {{#if isLabel}} 3 |
  • 4 | {{{wbr title}}} 5 |
  • 6 | {{else}} 7 | {{#if isGlobals}} 8 |
  • 9 | {{{wbr title}}} 10 |
  • 11 | {{else}} 12 |
  • 13 | {{{wbr title}}} 14 | {{#if isInPath}} 15 | {{#if children}} 16 |
      17 | {{#each children}} 18 | {{> navigation}} 19 | {{/each}} 20 |
    21 | {{/if}} 22 | {{/if}} 23 |
  • 24 | {{/if}} 25 | {{/if}} 26 | {{/if}} 27 | -------------------------------------------------------------------------------- /src/default/partials/parameter.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#if signatures}} 3 |
    • 4 |
        5 | {{#each signatures}} 6 |
      • {{#compact}} 7 | {{> member.signature.title hideName=true }} 8 | {{/compact}}
      • 9 | {{/each}} 10 |
      11 | 12 |
        13 | {{#each signatures}} 14 |
      • {{> member.signature.body hideSources=true }}
      • 15 | {{/each}} 16 |
      17 |
    • 18 | {{/if}} 19 | {{#if indexSignature}} 20 |
    • 21 |
      {{#compact}} 22 | [ 23 | {{#each indexSignature.parameters}} 24 | {{#if flags.isRest}}...{{/if}}{{name}}: {{#with type}}{{>type}}{{/with}} 25 | {{/each}} 26 | ]:  27 | {{#with indexSignature.type}}{{>type}}{{/with}} 28 | {{/compact}}
      29 | 30 | {{#with indexSignature}} 31 | {{> comment}} 32 | {{/with}} 33 | 34 | {{#if indexSignature.type.declaration}} 35 | {{#with indexSignature.type.declaration}} 36 | {{> parameter}} 37 | {{/with}} 38 | {{/if}} 39 |
    • 40 | {{/if}} 41 | {{#each children}} 42 | {{#if signatures}} 43 |
    • 44 |
      {{#compact}} 45 | {{#if flags.isRest}}...{{/if}} 46 | {{{wbr name}}} 47 | 48 | {{#if isOptional}}?{{/if}} 49 | :  50 | 51 | function 52 | {{/compact}}
      53 | 54 | {{> member.signatures}} 55 |
    • 56 | {{else}}{{#if type}} {{! standard type }} 57 |
    • 58 |
      {{#compact}} 59 | {{#each flags}} 60 | {{this}}  61 | {{/each}} 62 | {{#if flags.isRest}}...{{/if}} 63 | {{#with type}} 64 | {{{wbr ../name}}} 65 | 66 | {{#if ../flags.isOptional}}?{{/if}} 67 | :  68 | 69 | {{>type}} 70 | {{/with}} 71 | {{/compact}}
      72 | 73 | {{> comment}} 74 | 75 | {{#if children}} 76 | {{> parameter}} 77 | {{/if}} 78 | 79 | {{#if type.declaration}} 80 | {{#with type.declaration}} 81 | {{> parameter}} 82 | {{/with}} 83 | {{/if}} 84 |
    • 85 | {{else}} {{! getter/setter }} 86 | {{#with getSignature}} {{! getter }} 87 |
    • 88 |
      {{#compact}} 89 | {{#each flags}} 90 | {{this}}  91 | {{/each}} 92 | get  93 | {{{wbr ../name}}} 94 | ():  95 | {{#with type}} 96 | {{> type}} 97 | {{/with}} 98 | {{/compact}}
      99 | 100 | {{> comment }} 101 |
    • 102 | {{/with}} 103 | {{#with setSignature}} {{! setter }} 104 |
    • 105 |
      {{#compact}} 106 | {{#each flags}} 107 | {{this}}  108 | {{/each}} 109 | set  110 | {{{wbr ../name}}} 111 | ( 112 | {{#each parameters}} 113 | {{name}} 114 | : 115 | {{#with type}} 116 | {{> type}} 117 | {{else}} 118 | any 119 | {{/with}} 120 | {{/each}} 121 | ):  122 | {{#with type}} 123 | {{> type}} 124 | {{/with}} 125 | {{/compact}}
      126 | 127 | {{> comment }} 128 |
    • 129 | {{/with}} 130 | {{/if}}{{/if}} 131 | {{/each}} 132 |
    133 | -------------------------------------------------------------------------------- /src/default/partials/toc.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | {{{wbr title}}} 3 | {{#if children}} 4 |
      5 | {{#each children}} 6 | {{> toc}} 7 | {{/each}} 8 |
    9 | {{/if}} 10 |
  • 11 | -------------------------------------------------------------------------------- /src/default/partials/toc.root.hbs: -------------------------------------------------------------------------------- 1 | {{#if isInPath}} 2 | 3 |
      4 | {{/if}} 5 |
    • 6 | {{{wbr title}}} 7 | {{#if children}} 8 |
        9 | {{#each children}} 10 | {{> toc}} 11 | {{/each}} 12 |
      13 | {{/if}} 14 |
    • 15 | {{#if isInPath}} 16 |
    17 |
      18 | {{/if}} 19 | -------------------------------------------------------------------------------- /src/default/partials/type.hbs: -------------------------------------------------------------------------------- 1 | {{! Each type gets its own inline helper to determine how it is rendered. }} 2 | {{! The name of the helper is the value of the 'type' property on the type.}} 3 | 4 | {{! 5 | The type helper accepts an optional needsParens parameter that is checked 6 | if an inner type may result in invalid output without them. For example: 7 | 1 | 2[] !== (1 | 2)[] 8 | () => 1 | 2 !== (() => 1) | 2 9 | }} 10 | 11 | {{#*inline 'array'}} 12 | {{#with elementType}} 13 | {{> type needsParens=true}} 14 | [] 15 | {{/with}} 16 | {{/inline}} 17 | 18 | {{#*inline 'conditional'}} 19 | {{#if needsParens}} 20 | ( 21 | {{/if}} 22 | {{#with checkType}} 23 | {{> type needsParens=true}} 24 | {{/with}} 25 | extends 26 | {{#with extendsType}} 27 | {{> type}} 28 | {{/with}} 29 | ? 30 | {{#with trueType}} 31 | {{> type}} 32 | {{/with}} 33 | : 34 | {{#with falseType}} 35 | {{> type}} 36 | {{/with}} 37 | {{#if needsParens}} 38 | ) 39 | {{/if}} 40 | {{/inline}} 41 | 42 | {{#*inline 'indexedAccess'}} 43 | {{#with objectType}} 44 | {{> type}} 45 | {{/with}} 46 | [ 47 | {{#with indexType}} 48 | {{> type}} 49 | {{/with}} 50 | ] 51 | {{/inline}} 52 | 53 | {{#*inline 'inferred'}} 54 | infer {{name}} 55 | {{/inline}} 56 | 57 | {{#*inline 'intersection'}} 58 | {{#if needsParens}} 59 | ( 60 | {{/if}} 61 | {{#each types}} 62 | {{#unless @first}} 63 | & 64 | {{/unless}} 65 | {{> type needsParens=true}} 66 | {{/each}} 67 | {{#if needsParens}} 68 | ) 69 | {{/if}} 70 | {{/inline}} 71 | 72 | {{#*inline 'intrinsic'}} 73 | {{name}} 74 | {{/inline}} 75 | 76 | {{#*inline 'literal'}} 77 | {{stringify value}} 78 | {{/inline}} 79 | 80 | {{#*inline 'mapped'}} 81 | { 82 | {{#ifCond readonlyModifier '===' '+'}} 83 | readonly 84 | {{else}} 85 | {{#ifCond readonlyModifier '===' '-'}} 86 | -readonly 87 | {{/ifCond}} 88 | {{/ifCond}} 89 | 90 | [ 91 | {{parameter}} 92 | in 93 | 94 | {{#with parameterType}} 95 | {{>type}} 96 | {{/with}} 97 | 98 | {{#with nameType}} 99 | as 100 | {{>type}} 101 | {{/with}} 102 | 103 | ] 104 | {{#ifCond readonlyModifier '===' '+'}} 105 | ?: 106 | {{else}} 107 | {{#ifCond readonlyModifier '===' '-'}} 108 | -?: 109 | {{else}} 110 | : 111 | {{/ifCond}} 112 | {{/ifCond}} 113 | 114 | {{#with templateType}} 115 | {{>type}} 116 | {{/with}} 117 | 118 | } 119 | {{/inline}} 120 | 121 | {{#*inline 'optional'}} 122 | {{#with elementType}} 123 | {{> type}} 124 | {{/with}} 125 | ? 126 | {{/inline}} 127 | 128 | {{#*inline 'predicate'}} 129 | {{#if asserts}} 130 | asserts 131 | {{/if}} 132 | {{name}} 133 | {{#if targetType}} 134 | is 135 | {{#with targetType}} 136 | {{>type}} 137 | {{/with}} 138 | {{/if}} 139 | {{/inline}} 140 | 141 | {{#*inline 'query'}} 142 | typeof 143 | {{#with queryType}} 144 | {{> type}} 145 | {{/with}} 146 | {{/inline}} 147 | 148 | {{#*inline 'reference'}} 149 | {{#with getReflection }} 150 | 151 | {{name}} 152 | 153 | {{else}} 154 | {{name}} 155 | {{/with}} 156 | {{#if typeArguments}} 157 | < 158 | {{#each typeArguments}} 159 | {{#unless @first}} 160 | , 161 | {{/unless}} 162 | {{> type}} 163 | {{/each}} 164 | > 165 | {{/if}} 166 | {{/inline}} 167 | 168 | {{#*inline 'reflection'}} 169 | {{#if declaration.children}} {{! object literal }} 170 | { 171 | {{#each declaration.children}} 172 | {{#unless @first}} 173 | ; 174 | {{/unless}} 175 | 176 | {{#if getSignature}} 177 | {{#if setSignature}} 178 | {{name}} 179 | : 180 | {{#with getSignature.type}} 181 | {{> type}} 182 | {{else}} 183 | any 184 | {{/with}} 185 | {{else}} 186 | get 187 | {{name}} 188 | (): 189 | {{#with getSignature.type}} 190 | {{> type}} 191 | {{else}} 192 | any 193 | {{/with}} 194 | {{/if}} 195 | {{else}} 196 | {{#if setSignature}} 197 | set 198 | {{name}} 199 | ( 200 | {{! Rather hacky to use each here... but we know there is exactly one. }} 201 | {{#each setSignature.parameters}} 202 | {{name}} 203 | : 204 | {{#with type}} 205 | {{> type}} 206 | {{else}} 207 | any 208 | {{/with}} 209 | {{/each}} 210 | ) 211 | {{else}} 212 | {{name}} 213 | {{#if flags.isOptional }} 214 | ?: 215 | {{else}} 216 | : 217 | {{/if}} 218 | {{#with type}} 219 | {{> type}} 220 | {{else}} 221 | any 222 | {{/with}} 223 | {{/if}} 224 | {{/if}} 225 | {{/each}} 226 | } 227 | {{else if declaration.signatures}} 228 | {{#if (lookup declaration.signatures 1) }} {{! more than one signature}} 229 | { 230 | {{#each declaration.signatures}} 231 | {{> member.signature.title hideName=true}} 232 | {{#unless @last}} 233 | ; 234 | {{/unless}} 235 | {{/each}} 236 | } 237 | {{else}} 238 | {{#if needsParens}} 239 | ( 240 | {{/if}} 241 | {{#with (lookup declaration.signatures '0') }} 242 | {{> member.signature.title hideName=true arrowStyle=true}} 243 | {{/with}} 244 | {{#if needsParens}} 245 | ) 246 | {{/if}} 247 | {{/if}} 248 | {{else}} 249 | {} 250 | {{/if}} 251 | {{/inline}} 252 | 253 | {{#*inline 'rest'}} 254 | ... 255 | {{#with elementType}} 256 | {{> type}} 257 | {{/with}} 258 | {{/inline}} 259 | 260 | {{#*inline 'tuple'}} 261 | [ 262 | {{#each elements}} 263 | {{#unless @first}} 264 | , 265 | {{/unless}} 266 | {{> type}} 267 | {{/each}} 268 | ] 269 | {{/inline}} 270 | 271 | {{#*inline 'template-literal'}} 272 | ` 273 | {{#if head}} 274 | {{head}} 275 | {{/if}} 276 | {{#each tail}} 277 | ${ 278 | {{#with this.[0]}} 279 | {{>type}} 280 | {{/with}} 281 | } 282 | {{#if this.[1]}} 283 | {{this.[1]}} 284 | {{/if}} 285 | {{/each}} 286 | ` 287 | {{/inline}} 288 | 289 | {{#*inline 'typeOperator'}} 290 | {{operator}} 291 | {{#with target}} 292 | {{> type}} 293 | {{/with}} 294 | {{/inline}} 295 | 296 | {{#*inline 'typeParameter'}} 297 | {{name}} 298 | {{/inline}} 299 | 300 | {{#*inline 'union'}} 301 | {{#if needsParens}} 302 | ( 303 | {{/if}} 304 | {{#each types}} 305 | {{#unless @first}} 306 | | 307 | {{/unless}} 308 | {{> type needsParens=true}} 309 | {{/each}} 310 | {{#if needsParens}} 311 | ) 312 | {{/if}} 313 | {{/inline}} 314 | 315 | {{#*inline 'unknown'}} 316 | {{name}} 317 | {{/inline}} 318 | 319 | {{#*inline 'named-tuple-member'}} 320 | {{name}} 321 | {{#if isOptional}} 322 | ?: 323 | {{else}} 324 | : 325 | {{/if}} 326 | {{#with element}} 327 | {{> type}} 328 | {{/with}} 329 | {{/inline}} 330 | 331 | {{#if this}} 332 | {{> (lookup . 'type') }} 333 | {{else}} 334 | void 335 | {{/if}} 336 | -------------------------------------------------------------------------------- /src/default/partials/typeAndParent.hbs: -------------------------------------------------------------------------------- 1 | {{#compact}} 2 | {{#if this}} 3 | {{#if elementType}} 4 | {{#with elementType}} 5 | {{> typeAndParent}} 6 | {{/with}} 7 | [] 8 | {{else}} 9 | {{#if reflection}} 10 | {{#ifSignature reflection}} 11 | {{#if reflection.parent.parent.url}} 12 | {{reflection.parent.parent.name}} 13 | {{else}} 14 | {{reflection.parent.parent.name}} 15 | {{/if}} 16 | . 17 | {{#if reflection.parent.url}} 18 | {{reflection.parent.name}} 19 | {{else}} 20 | {{reflection.parent.name}} 21 | {{/if}} 22 | {{else}} 23 | {{#if reflection.parent.url}} 24 | {{reflection.parent.name}} 25 | {{else}} 26 | {{reflection.parent.name}} 27 | {{/if}} 28 | . 29 | {{#if reflection.url}} 30 | {{reflection.name}} 31 | {{else}} 32 | {{reflection.name}} 33 | {{/if}} 34 | {{/ifSignature}} 35 | {{else}} 36 | {{this}} 37 | {{/if}} 38 | {{/if}} 39 | {{else}} 40 | void 41 | {{/if}} 42 | {{/compact}} -------------------------------------------------------------------------------- /src/default/partials/typeParameters.hbs: -------------------------------------------------------------------------------- 1 |
        2 | {{#each typeParameters}} 3 |
      • 4 |

        {{#compact}} 5 | {{name}} 6 | {{#if type}} 7 | 8 | {{#with type}}{{> type}}{{/with}} 9 | {{/if}} 10 | {{#if default}} 11 |  = {{#with default}}{{> type}}{{/with}} 12 | {{/if}} 13 | {{/compact}}

        14 | {{> comment}} 15 |
      • 16 | {{/each}} 17 |
      18 | -------------------------------------------------------------------------------- /src/default/templates/index.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#markdown}}{{{model.readme}}}{{/markdown}} 3 |
      -------------------------------------------------------------------------------- /src/default/templates/reflection.hbs: -------------------------------------------------------------------------------- 1 | {{#with model}} 2 | {{#if hasComment}} 3 |
      4 | {{> comment}} 5 |
      6 | {{/if}} 7 | {{/with}} 8 | 9 | {{#if model.typeParameters}} 10 |
      11 |

      Type parameters

      12 | {{#with model}}{{> typeParameters}}{{/with}} 13 |
      14 | {{/if}} 15 | 16 | {{#if model.typeHierarchy}} 17 |
      18 |

      Hierarchy

      19 | {{#with model.typeHierarchy}}{{> hierarchy}}{{/with}} 20 |
      21 | {{/if}} 22 | 23 | {{#if model.implementedTypes}} 24 |
      25 |

      Implements

      26 |
        27 | {{#each model.implementedTypes}} 28 |
      • {{#compact}}{{> type}}{{/compact}}
      • 29 | {{/each}} 30 |
      31 |
      32 | {{/if}} 33 | 34 | {{#if model.implementedBy}} 35 |
      36 |

      Implemented by

      37 |
        38 | {{#each model.implementedBy}} 39 |
      • {{#compact}}{{> type}}{{/compact}}
      • 40 | {{/each}} 41 |
      42 |
      43 | {{/if}} 44 | 45 | {{#if model.signatures}} 46 |
      47 |

      Callable

      48 | {{#with model}}{{> member.signatures}}{{/with}} 49 |
      50 | {{/if}} 51 | 52 | {{#if model.indexSignature}} 53 |
      54 |

      Indexable

      55 |
      {{#compact}} 56 | [ 57 | {{#each model.indexSignature.parameters}} 58 | {{name}}: {{#with type}}{{>type}}{{/with}} 59 | {{/each}} 60 | ]:  61 | {{#with model.indexSignature.type}}{{>type}}{{/with}} 62 | {{/compact}}
      63 | 64 | {{#with model.indexSignature}} 65 | {{> comment}} 66 | {{/with}} 67 | 68 | {{#if model.indexSignature.type.declaration}} 69 | {{#with model.indexSignature.type.declaration}} 70 | {{> parameter}} 71 | {{/with}} 72 | {{/if}} 73 |
      74 | {{/if}} 75 | 76 | {{#with model}} 77 | {{> index}} 78 | {{> members}} 79 | {{/with}} 80 | -------------------------------------------------------------------------------- /src/minimal/layouts/default.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{model.name}} | {{project.name}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{> header}} 14 | 15 | 22 | 23 |
      24 |
      25 | {{#if model.readme}} 26 |
      27 | {{#markdown}}{{{model.readme}}}{{/markdown}} 28 |
      29 | {{/if}} 30 | 31 | {{{contents}}} 32 | {{> footer}} 33 |
      34 |
      35 | 36 | 39 | 40 | {{> analytics}} 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/minimal/partials/header.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 | 8 |
      9 |
      10 | Options 11 |
      12 |
      13 | All 14 |
        15 |
      • Public
      • 16 |
      • Public/Protected
      • 17 |
      • All
      • 18 |
      19 |
      20 | 21 | 22 | 23 | 24 | {{#unless settings.excludeExternals}} 25 | 26 | 27 | {{/unless}} 28 | 29 | 30 | 31 |
      32 |
      33 | Menu 34 |
      35 |
      36 |
      37 |
      38 |
      -------------------------------------------------------------------------------- /src/minimal/partials/member.hbs: -------------------------------------------------------------------------------- 1 |
      2 | 3 | {{#if name}} 4 |

      {{#each flags}}{{this}} {{/each}}{{{wbr name}}}

      5 | {{/if}} 6 | 7 | {{#if signatures}} 8 | {{> member.signatures}} 9 | {{else}}{{#if hasGetterOrSetter}} 10 | {{> member.getterSetter}} 11 | {{else}}{{#if tryGetTargetReflectionDeep}} 12 | {{> member.reference}} 13 | {{else}} 14 | {{> member.declaration}} 15 | {{/if}}{{/if}}{{/if}} 16 | 17 | {{#unless isContainer}} 18 | {{#each groups}} 19 | {{#each children}} 20 | {{#unless hasOwnDocument}} 21 | {{> member}} 22 | {{/unless}} 23 | {{/each}} 24 | {{/each}} 25 | {{/unless}} 26 |
      27 | 28 | {{#if isContainer}} 29 | {{> index}} 30 | {{> members}} 31 | {{/if}} 32 | -------------------------------------------------------------------------------- /src/minimal/templates/index.hbs: -------------------------------------------------------------------------------- 1 | {{#with model}} 2 | {{> comment}} 3 | {{/with}} 4 | 5 | {{#if model.typeHierarchy}} 6 |
      7 |

      Hierarchy

      8 | {{#with model.typeHierarchy}}{{> hierarchy}}{{/with}} 9 |
      10 | {{/if}} 11 | 12 | {{#with model}} 13 |
      14 | {{> index}} 15 | {{> members}} 16 | {{/with}} -------------------------------------------------------------------------------- /src/plugin.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TypeStrong/typedoc-default-themes/445a0be37261538e689d8fc314177c5615e6dbb1/src/plugin.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src/default/assets/js/src/**/*.ts"], 3 | "compilerOptions": { 4 | "target": "ES5", 5 | "module": "ES2015", 6 | "lib": ["ES2016", "DOM", "DOM.Iterable"], 7 | "declaration": false, 8 | "skipLibCheck": true, 9 | "sourceMap": false, 10 | "strict": true, 11 | "alwaysStrict": false, 12 | "noImplicitUseStrict": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /webpack.common.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin"); 3 | const { CleanWebpackPlugin } = require("clean-webpack-plugin"); 4 | const CopyPlugin = require("copy-webpack-plugin"); 5 | 6 | const config = { 7 | mode: "development", 8 | 9 | context: path.resolve(__dirname, "src"), 10 | 11 | entry: "./default/assets/js/src/bootstrap.ts", 12 | 13 | resolve: { 14 | extensions: [".tsx", ".ts", ".js"], 15 | }, 16 | 17 | module: { 18 | rules: [ 19 | { 20 | test: /\.ts$/, 21 | loader: "ts-loader", 22 | exclude: /node_modules/, 23 | }, 24 | { 25 | test: /\.sass$/, 26 | use: [ 27 | { 28 | loader: MiniCssExtractPlugin.loader, 29 | }, 30 | { 31 | loader: "css-loader", 32 | }, 33 | { 34 | loader: "resolve-url-loader", 35 | }, 36 | { 37 | loader: "sass-loader", 38 | options: { 39 | sourceMap: true, 40 | sassOptions: { 41 | style: "compact", 42 | unixNewlines: true, 43 | }, 44 | }, 45 | }, 46 | ], 47 | }, 48 | ], 49 | }, 50 | 51 | plugins: [ 52 | new CleanWebpackPlugin(), 53 | new CopyPlugin({ 54 | patterns: [ 55 | { 56 | context: path.resolve(__dirname, "src"), 57 | from: "plugin.js", 58 | to: path.resolve(__dirname, "bin"), 59 | }, 60 | ], 61 | }), 62 | ], 63 | }; 64 | 65 | module.exports = config; 66 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const defaultThemeConfig = require("./webpack.default"); 2 | const minimalThemeConfig = require("./webpack.minimal"); 3 | 4 | module.exports = [defaultThemeConfig, minimalThemeConfig]; 5 | -------------------------------------------------------------------------------- /webpack.default.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin"); 3 | const CopyPlugin = require("copy-webpack-plugin"); 4 | const { merge } = require("webpack-merge"); 5 | const commonConfig = require("./webpack.common"); 6 | 7 | const config = { 8 | name: "Default Theme", 9 | 10 | output: { 11 | path: path.resolve(__dirname, "bin", "default"), 12 | filename: "assets/js/main.js", 13 | }, 14 | 15 | module: { 16 | rules: [ 17 | { 18 | test: /\.png$/, 19 | loader: "file-loader", 20 | options: { 21 | outputPath: "assets/images", 22 | publicPath: "../images", 23 | name: "[name].[ext]", 24 | }, 25 | }, 26 | ], 27 | }, 28 | 29 | plugins: [ 30 | new MiniCssExtractPlugin({ 31 | filename: "assets/css/main.css", 32 | }), 33 | new CopyPlugin({ 34 | patterns: [ 35 | { 36 | context: path.resolve(__dirname, "src/default"), 37 | from: "**/*.hbs", 38 | to: path.resolve(__dirname, "bin/default"), 39 | }, 40 | ], 41 | }), 42 | ], 43 | }; 44 | 45 | module.exports = merge(commonConfig, config); 46 | -------------------------------------------------------------------------------- /webpack.minimal.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin"); 3 | const CopyPlugin = require("copy-webpack-plugin"); 4 | const { InlineAssetsPlugin } = require("./InlineAssetsPlugin"); 5 | const { merge } = require("webpack-merge"); 6 | const commonConfig = require("./webpack.common"); 7 | 8 | const config = { 9 | name: "Minimal Theme", 10 | 11 | output: { 12 | path: path.resolve(__dirname, "bin", "minimal"), 13 | filename: "assets/js/main.js", 14 | }, 15 | 16 | module: { 17 | rules: [ 18 | { 19 | test: /\.png$/, 20 | loader: "url-loader", 21 | }, 22 | ], 23 | }, 24 | 25 | plugins: [ 26 | new MiniCssExtractPlugin({ 27 | filename: "assets/css/main.css", 28 | }), 29 | new CopyPlugin({ 30 | patterns: [ 31 | { 32 | context: path.resolve(__dirname, "src/default"), 33 | from: "partials/**/*.hbs", 34 | to: path.resolve(__dirname, "bin/minimal"), 35 | }, 36 | { 37 | context: path.resolve(__dirname, "src/minimal"), 38 | from: "**/*.hbs", 39 | to: path.resolve(__dirname, "bin/minimal"), 40 | force: true, // override default partials 41 | }, 42 | ], 43 | }), 44 | new InlineAssetsPlugin({ 45 | patterns: [ 46 | { 47 | from: "assets/js/main.js", 48 | to: "layouts/default.hbs", 49 | pattern: "{{ JS }}", 50 | }, 51 | { 52 | from: "assets/css/main.css", 53 | to: "layouts/default.hbs", 54 | pattern: "{{ CSS }}", 55 | }, 56 | ], 57 | }), 58 | ], 59 | }; 60 | 61 | module.exports = merge(commonConfig, config); 62 | --------------------------------------------------------------------------------