├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── NOTICE.md ├── README.md ├── docs ├── CNAME ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ ├── main.js │ │ └── search.json └── index.html ├── package-lock.json ├── package.json ├── src ├── settings.test.ts └── settings.ts ├── tsconfig.json └── typedoc.json /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | env: { 5 | node: true, 6 | }, 7 | plugins: [ 8 | '@typescript-eslint', 9 | ], 10 | extends: [ 11 | 'airbnb-base', 12 | 'plugin:@typescript-eslint/eslint-recommended', 13 | 'plugin:@typescript-eslint/recommended', 14 | ], 15 | rules: { 16 | 'arrow-body-style': 'off', 17 | 'import/extensions': ['error', 'always', { 18 | js: 'never', 19 | ts: 'never', 20 | }], 21 | 'no-else-return': 'off', 22 | 'no-shadow': 'off', 23 | 'no-use-before-define': ['error', { functions: false }], 24 | 'padded-blocks': 'off', 25 | }, 26 | settings: { 27 | 'import/resolver': { 28 | node: { 29 | extensions: ['.js', '.ts'], 30 | }, 31 | }, 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | tmp 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | docs 2 | src 3 | .eslintrc.js 4 | .travis.yml 5 | tsconfig.json 6 | typedoc.json 7 | 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | version: 1.0 3 | dist: focal 4 | services: 5 | - xvfb 6 | node_js: 7 | - "stable" 8 | before_install: 9 | - if [[ -n $ELECTRON_VERSION ]]; then 10 | npm install electron@$ELECTRON_VERSION; 11 | fi 12 | install: 13 | - npm install --no-progress 14 | - $(npm bin)/electron --version 15 | jobs: 16 | fast_finish: true 17 | include: 18 | - stage: test 19 | node_js: 12 20 | env: ELECTRON_VERSION=8 21 | - node_js: 12 22 | env: ELECTRON_VERSION=7 23 | - node_js: 12 24 | env: ELECTRON_VERSION=6 25 | - node_js: 12 26 | env: ELECTRON_VERSION=5 27 | - node_js: 10 28 | env: ELECTRON_VERSION=4 29 | - stage: deploy 30 | deploy: 31 | provider: npm 32 | edge: true 33 | skip_cleanup: true 34 | email: $NPM_EMAIL_ADDRESS 35 | api_key: $NPM_API_KEY 36 | tag: latest 37 | on: 38 | tags: true 39 | - stage: deploy 40 | deploy: 41 | provider: releases 42 | skip_cleanup: true 43 | api_key: $GITHUB_OAUTH_TOKEN 44 | file_glob: true 45 | file: dist/* 46 | tag_name: $TRAVIS_TAG 47 | target_commitish: $TRAVIS_COMMIT 48 | on: 49 | tags: true 50 | notifications: 51 | email: 52 | on_success: never 53 | on_failure: change 54 | 55 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ### [4.0.4](https://github.com/nathanbuchar/electron-settings/compare/v4.0.2...v4.0.4) (2024-04-23) 6 | 7 | 8 | ### Bug Fixes 9 | 10 | * security issue with lodash ([6d15e65](https://github.com/nathanbuchar/electron-settings/commit/6d15e6502084264dc8c2d76b4c3905020216679a)) 11 | 12 | ### [4.0.3](https://github.com/nathanbuchar/electron-settings/compare/v4.0.2...v4.0.3) (2024-04-11) 13 | 14 | 15 | ### Bug Fixes 16 | 17 | * security issue with lodash ([6d15e65](https://github.com/nathanbuchar/electron-settings/commit/6d15e6502084264dc8c2d76b4c3905020216679a)) 18 | 19 | ### [4.0.2](https://github.com/nathanbuchar/electron-settings/compare/v4.0.1...v4.0.2) (2020-06-27) 20 | 21 | 22 | ### Bug Fixes 23 | 24 | * Fix module export for node ([9064b0f](https://github.com/nathanbuchar/electron-settings/commit/9064b0f71f9a508add7b7a76b0c9a830697beb80)) 25 | 26 | ### [4.0.1](https://github.com/nathanbuchar/electron-settings/compare/v4.0.0...v4.0.1) (2020-06-20) 27 | 28 | ## [4.0.0](https://github.com/nathanbuchar/electron-settings/compare/v3.1.4...v4.0.0) (2020-06-07) 29 | 30 | 31 | ### ⚠ BREAKING CHANGES 32 | 33 | * `has()` is now async. Use `hasSync()` for sync. 34 | * `get()` is now async. Use `getSync()` for sync. 35 | * `set()` is now async. Use `setSync()` for sync. 36 | * `delete()` has been removed. Use `unset()` instead, or 37 | `unsetSync()` for sync. 38 | * `setPath()` has been removed. Use `configure()` 39 | instead. 40 | * `clearPath()` has been removed. Use `configure()` 41 | instead. 42 | * `getAll()` has been removed. Use `get()` instead. 43 | * `setAll()` has been removed. Use `set()` instead. 44 | * `deleteAll()` has been removed. Use `unset()` instead. 45 | * The default settings file name has been changed from 46 | `Settings` to `settings.json`. 47 | * Key path observers have been removed. 48 | 49 | ### Features 50 | 51 | * Electron Settings v4 ([6199f8b](https://github.com/nathanbuchar/electron-settings/commit/6199f8b2ce27adaac1d1f5b57e03d8550fa2d565)) 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Nathan Buchar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | # Notice 2 | 3 | This project uses third party material from the projects listed below. 4 | 5 | **lodash** 6 | ``` 7 | The MIT License 8 | 9 | Copyright JS Foundation and other contributors 10 | 11 | Based on Underscore.js, copyright Jeremy Ashkenas, 12 | DocumentCloud and Investigative Reporters & Editors 13 | 14 | This software consists of voluntary contributions made by many 15 | individuals. For exact contribution history, see the revision history 16 | available at https://github.com/lodash/lodash 17 | 18 | The following license applies to all parts of this software except as 19 | documented below: 20 | 21 | ==== 22 | 23 | Permission is hereby granted, free of charge, to any person obtaining 24 | a copy of this software and associated documentation files (the 25 | "Software"), to deal in the Software without restriction, including 26 | without limitation the rights to use, copy, modify, merge, publish, 27 | distribute, sublicense, and/or sell copies of the Software, and to 28 | permit persons to whom the Software is furnished to do so, subject to 29 | the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be 32 | included in all copies or substantial portions of the Software. 33 | 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 36 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 38 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 39 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 40 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 41 | 42 | ==== 43 | 44 | Copyright and related rights for sample code are waived via CC0. Sample 45 | code is defined as all source code displayed within the prose of the 46 | documentation. 47 | 48 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 49 | 50 | ==== 51 | 52 | Files located in the node_modules and vendor directories are externally 53 | maintained libraries used by this software which have their own 54 | licenses; we recommend you read them, as their terms may differ from the 55 | terms above. 56 | ``` 57 | 58 | **mkdirp** 59 | ``` 60 | Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) 61 | 62 | This project is free software released under the MIT license: 63 | 64 | Permission is hereby granted, free of charge, to any person obtaining a copy 65 | of this software and associated documentation files (the "Software"), to deal 66 | in the Software without restriction, including without limitation the rights 67 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 68 | copies of the Software, and to permit persons to whom the Software is 69 | furnished to do so, subject to the following conditions: 70 | 71 | The above copyright notice and this permission notice shall be included in 72 | all copies or substantial portions of the Software. 73 | 74 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 75 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 76 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 77 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 78 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 79 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 80 | THE SOFTWARE. 81 | ``` 82 | 83 | **write-file-atomic** 84 | ``` 85 | Copyright (c) 2015, Rebecca Turner 86 | 87 | Permission to use, copy, modify, and/or distribute this software for any 88 | purpose with or without fee is hereby granted, provided that the above 89 | copyright notice and this permission notice appear in all copies. 90 | 91 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 92 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 93 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 94 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 95 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 96 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 97 | PERFORMANCE OF THIS SOFTWARE. 98 | ``` 99 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Electron Settings 2 | 3 | A simple and robust settings management library for [Electron](https://electronjs.org). 4 | 5 | Born from Atom's original internal configuration manager and the settings manager of choice for Electron's own [API Demos app](https://github.com/electron/electron-api-demos), Electron Settings allows you to persist user settings and other data between app loads simply and easily. 6 | 7 | [![Npm version][badge_npm-version]][external_npm] 8 | [![Npm downloads][badge_npm-downloads]][external_npm] 9 | [![David][badge_david]][external_david] 10 | [![Travis][badge_travis]][external_travis] 11 | 12 |
13 | 14 | ### Install 15 | 16 | ``` 17 | npm install electron-settings 18 | ``` 19 | 20 | ### Demo 21 | 22 | ```ts 23 | import settings from 'electron-settings'; 24 | 25 | await settings.set('color', { 26 | name: 'cerulean', 27 | code: { 28 | rgb: [0, 179, 230], 29 | hex: '#003BE6' 30 | } 31 | }); 32 | 33 | await settings.get('color.name'); 34 | // => "cerulean" 35 | 36 | await settings.get('color.code.rgb[1]'); 37 | // => 179 38 | ``` 39 | 40 | ⚠ For Electron v10+, if you want to use electron-settings within a browser window, be sure to set the `enableRemoteModule` web preference to `true`. Otherwise you might get the error `Cannot read property 'app' of undefined`. See [#133](https://github.com/nathanbuchar/electron-settings/issues/133) for more info. 41 | 42 | ```js 43 | new BrowserWindow({ 44 | webPreferences: { 45 | enableRemoteModule: true // <-- Add me 46 | } 47 | }); 48 | ``` 49 | 50 | ### API Docs 51 | 52 | API docs and can be found at [electron-settings.js.org](https://electron-settings.js.org). 53 | 54 | 55 | 56 |
57 |
58 |
59 | 60 | **Having trouble?** [Get help on Gitter][external_gitter]. 61 | 62 | 63 | 64 | 65 | 66 | [docs]: https://nathanbuchar.github.io/electron-settings/ 67 | 68 | [badge_npm-version]: https://img.shields.io/npm/v/electron-settings.svg 69 | [badge_npm-downloads]: https://img.shields.io/npm/dm/electron-settings.svg 70 | [badge_david]: https://img.shields.io/david/nathanbuchar/electron-settings.svg 71 | [badge_travis]: https://img.shields.io/travis/nathanbuchar/electron-settings/master.svg 72 | 73 | [external_david]: https://david-dm.org/nathanbuchar/electron-settings 74 | [external_electron]: https://electron.atom.io 75 | [external_gitter]: https://gitter.im/nathanbuchar/electron-settings 76 | [external_npm]: https://npmjs.org/package/electron-settings 77 | [external_travis]: https://travis-ci.org/nathanbuchar/electron-settings.svg?branch=master 78 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | electron-settings.js.org 2 | -------------------------------------------------------------------------------- /docs/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.3 | MIT License | git.io/normalize */ 2 | /* ========================================================================== 3 | * * HTML5 display definitions 4 | * * ========================================================================== */ 5 | /** 6 | * * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ 7 | article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { 8 | display: block; 9 | } 10 | 11 | /** 12 | * * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ 13 | audio, canvas, video { 14 | display: inline-block; 15 | *display: inline; 16 | *zoom: 1; 17 | } 18 | 19 | /** 20 | * * Prevent modern browsers from displaying `audio` without controls. 21 | * * Remove excess height in iOS 5 devices. */ 22 | audio:not([controls]) { 23 | display: none; 24 | height: 0; 25 | } 26 | 27 | /** 28 | * * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 29 | * * Known issue: no IE 6 support. */ 30 | [hidden] { 31 | display: none; 32 | } 33 | 34 | /* ========================================================================== 35 | * * Base 36 | * * ========================================================================== */ 37 | /** 38 | * * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 39 | * * `em` units. 40 | * * 2. Prevent iOS text size adjust after orientation change, without disabling 41 | * * user zoom. */ 42 | html { 43 | font-size: 100%; 44 | /* 1 */ 45 | -ms-text-size-adjust: 100%; 46 | /* 2 */ 47 | -webkit-text-size-adjust: 100%; 48 | /* 2 */ 49 | font-family: sans-serif; 50 | } 51 | 52 | /** 53 | * * Address `font-family` inconsistency between `textarea` and other form 54 | * * elements. */ 55 | button, input, select, textarea { 56 | font-family: sans-serif; 57 | } 58 | 59 | /** 60 | * * Address margins handled incorrectly in IE 6/7. */ 61 | body { 62 | margin: 0; 63 | } 64 | 65 | /* ========================================================================== 66 | * * Links 67 | * * ========================================================================== */ 68 | /** 69 | * * Address `outline` inconsistency between Chrome and other browsers. */ 70 | a:focus { 71 | outline: thin dotted; 72 | } 73 | a:active, a:hover { 74 | outline: 0; 75 | } 76 | 77 | /** 78 | * * Improve readability when focused and also mouse hovered in all browsers. */ 79 | /* ========================================================================== 80 | * * Typography 81 | * * ========================================================================== */ 82 | /** 83 | * * Address font sizes and margins set differently in IE 6/7. 84 | * * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 85 | * * and Chrome. */ 86 | h1 { 87 | font-size: 2em; 88 | margin: 0.67em 0; 89 | } 90 | 91 | h2 { 92 | font-size: 1.5em; 93 | margin: 0.83em 0; 94 | } 95 | 96 | h3 { 97 | font-size: 1.17em; 98 | margin: 1em 0; 99 | } 100 | 101 | h4, .tsd-index-panel h3 { 102 | font-size: 1em; 103 | margin: 1.33em 0; 104 | } 105 | 106 | h5 { 107 | font-size: 0.83em; 108 | margin: 1.67em 0; 109 | } 110 | 111 | h6 { 112 | font-size: 0.67em; 113 | margin: 2.33em 0; 114 | } 115 | 116 | /** 117 | * * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ 118 | abbr[title] { 119 | border-bottom: 1px dotted; 120 | } 121 | 122 | /** 123 | * * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ 124 | b, strong { 125 | font-weight: bold; 126 | } 127 | 128 | blockquote { 129 | margin: 1em 40px; 130 | } 131 | 132 | /** 133 | * * Address styling not present in Safari 5 and Chrome. */ 134 | dfn { 135 | font-style: italic; 136 | } 137 | 138 | /** 139 | * * Address differences between Firefox and other browsers. 140 | * * Known issue: no IE 6/7 normalization. */ 141 | hr { 142 | box-sizing: content-box; 143 | height: 0; 144 | } 145 | 146 | /** 147 | * * Address styling not present in IE 6/7/8/9. */ 148 | mark { 149 | background: #ff0; 150 | color: #000; 151 | } 152 | 153 | /** 154 | * * Address margins set differently in IE 6/7. */ 155 | p, pre { 156 | margin: 1em 0; 157 | } 158 | 159 | /** 160 | * * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ 161 | code, kbd, pre, samp { 162 | font-family: monospace, serif; 163 | _font-family: "courier new", monospace; 164 | font-size: 1em; 165 | } 166 | 167 | /** 168 | * * Improve readability of pre-formatted text in all browsers. */ 169 | pre { 170 | white-space: pre; 171 | white-space: pre-wrap; 172 | word-wrap: break-word; 173 | } 174 | 175 | /** 176 | * * Address CSS quotes not supported in IE 6/7. */ 177 | q { 178 | quotes: none; 179 | } 180 | q:before, q:after { 181 | content: ""; 182 | content: none; 183 | } 184 | 185 | /** 186 | * * Address `quotes` property not supported in Safari 4. */ 187 | /** 188 | * * Address inconsistent and variable font size in all browsers. */ 189 | small { 190 | font-size: 80%; 191 | } 192 | 193 | /** 194 | * * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ 195 | sub { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sup { 203 | font-size: 75%; 204 | line-height: 0; 205 | position: relative; 206 | vertical-align: baseline; 207 | top: -0.5em; 208 | } 209 | 210 | sub { 211 | bottom: -0.25em; 212 | } 213 | 214 | /* ========================================================================== 215 | * * Lists 216 | * * ========================================================================== */ 217 | /** 218 | * * Address margins set differently in IE 6/7. */ 219 | dl, menu, ol, ul { 220 | margin: 1em 0; 221 | } 222 | 223 | dd { 224 | margin: 0 0 0 40px; 225 | } 226 | 227 | /** 228 | * * Address paddings set differently in IE 6/7. */ 229 | menu, ol, ul { 230 | padding: 0 0 0 40px; 231 | } 232 | 233 | /** 234 | * * Correct list images handled incorrectly in IE 7. */ 235 | nav ul, nav ol { 236 | list-style: none; 237 | list-style-image: none; 238 | } 239 | 240 | /* ========================================================================== 241 | * * Embedded content 242 | * * ========================================================================== */ 243 | /** 244 | * * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 245 | * * 2. Improve image quality when scaled in IE 7. */ 246 | img { 247 | border: 0; 248 | /* 1 */ 249 | -ms-interpolation-mode: bicubic; 250 | } 251 | 252 | /* 2 */ 253 | /** 254 | * * Correct overflow displayed oddly in IE 9. */ 255 | svg:not(:root) { 256 | overflow: hidden; 257 | } 258 | 259 | /* ========================================================================== 260 | * * Figures 261 | * * ========================================================================== */ 262 | /** 263 | * * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ 264 | figure, form { 265 | margin: 0; 266 | } 267 | 268 | /* ========================================================================== 269 | * * Forms 270 | * * ========================================================================== */ 271 | /** 272 | * * Correct margin displayed oddly in IE 6/7. */ 273 | /** 274 | * * Define consistent border, margin, and padding. */ 275 | fieldset { 276 | border: 1px solid #c0c0c0; 277 | margin: 0 2px; 278 | padding: 0.35em 0.625em 0.75em; 279 | } 280 | 281 | /** 282 | * * 1. Correct color not being inherited in IE 6/7/8/9. 283 | * * 2. Correct text not wrapping in Firefox 3. 284 | * * 3. Correct alignment displayed oddly in IE 6/7. */ 285 | legend { 286 | border: 0; 287 | /* 1 */ 288 | padding: 0; 289 | white-space: normal; 290 | /* 2 */ 291 | *margin-left: -7px; 292 | } 293 | 294 | /* 3 */ 295 | /** 296 | * * 1. Correct font size not being inherited in all browsers. 297 | * * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 298 | * * and Chrome. 299 | * * 3. Improve appearance and consistency in all browsers. */ 300 | button, input, select, textarea { 301 | font-size: 100%; 302 | /* 1 */ 303 | margin: 0; 304 | /* 2 */ 305 | vertical-align: baseline; 306 | /* 3 */ 307 | *vertical-align: middle; 308 | } 309 | 310 | /* 3 */ 311 | /** 312 | * * Address Firefox 3+ setting `line-height` on `input` using `!important` in 313 | * * the UA stylesheet. */ 314 | button, input { 315 | line-height: normal; 316 | } 317 | 318 | /** 319 | * * Address inconsistent `text-transform` inheritance for `button` and `select`. 320 | * * All other form control elements do not inherit `text-transform` values. 321 | * * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 322 | * * Correct `select` style inheritance in Firefox 4+ and Opera. */ 323 | button, select { 324 | text-transform: none; 325 | } 326 | 327 | /** 328 | * * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 329 | * * and `video` controls. 330 | * * 2. Correct inability to style clickable `input` types in iOS. 331 | * * 3. Improve usability and consistency of cursor style between image-type 332 | * * `input` and others. 333 | * * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 334 | * * Known issue: inner spacing remains in IE 6. */ 335 | button, html input[type=button] { 336 | -webkit-appearance: button; 337 | /* 2 */ 338 | cursor: pointer; 339 | /* 3 */ 340 | *overflow: visible; 341 | } 342 | 343 | /* 4 */ 344 | input[type=reset], input[type=submit] { 345 | -webkit-appearance: button; 346 | /* 2 */ 347 | cursor: pointer; 348 | /* 3 */ 349 | *overflow: visible; 350 | } 351 | 352 | /* 4 */ 353 | /** 354 | * * Re-set default cursor for disabled elements. */ 355 | button[disabled], html input[disabled] { 356 | cursor: default; 357 | } 358 | 359 | /** 360 | * * 1. Address box sizing set to content-box in IE 8/9. 361 | * * 2. Remove excess padding in IE 8/9. 362 | * * 3. Remove excess padding in IE 7. 363 | * * Known issue: excess padding remains in IE 6. */ 364 | input { 365 | /* 3 */ 366 | } 367 | input[type=checkbox], input[type=radio] { 368 | box-sizing: border-box; 369 | /* 1 */ 370 | padding: 0; 371 | /* 2 */ 372 | *height: 13px; 373 | /* 3 */ 374 | *width: 13px; 375 | } 376 | input[type=search] { 377 | -webkit-appearance: textfield; 378 | /* 1 */ 379 | /* 2 */ 380 | box-sizing: content-box; 381 | } 382 | input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { 383 | -webkit-appearance: none; 384 | } 385 | 386 | /** 387 | * * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 388 | * * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 389 | * * (include `-moz` to future-proof). */ 390 | /** 391 | * * Remove inner padding and search cancel button in Safari 5 and Chrome 392 | * * on OS X. */ 393 | /** 394 | * * Remove inner padding and border in Firefox 3+. */ 395 | button::-moz-focus-inner, input::-moz-focus-inner { 396 | border: 0; 397 | padding: 0; 398 | } 399 | 400 | /** 401 | * * 1. Remove default vertical scrollbar in IE 6/7/8/9. 402 | * * 2. Improve readability and alignment in all browsers. */ 403 | textarea { 404 | overflow: auto; 405 | /* 1 */ 406 | vertical-align: top; 407 | } 408 | 409 | /* 2 */ 410 | /* ========================================================================== 411 | * * Tables 412 | * * ========================================================================== */ 413 | /** 414 | * * Remove most spacing between table cells. */ 415 | table { 416 | border-collapse: collapse; 417 | border-spacing: 0; 418 | } 419 | 420 | /* * 421 | * *Visual Studio-like style based on original C# coloring by Jason Diamond */ 422 | .hljs { 423 | display: inline-block; 424 | padding: 0.5em; 425 | background: white; 426 | color: black; 427 | } 428 | 429 | .hljs-comment, .hljs-annotation, .hljs-template_comment, .diff .hljs-header, .hljs-chunk, .apache .hljs-cbracket { 430 | color: #008000; 431 | } 432 | 433 | .hljs-keyword, .hljs-id, .hljs-built_in, .css .smalltalk .hljs-class, .hljs-winutils, .bash .hljs-variable, .tex .hljs-command, .hljs-request, .hljs-status, .nginx .hljs-title { 434 | color: #00f; 435 | } 436 | 437 | .xml .hljs-tag { 438 | color: #00f; 439 | } 440 | .xml .hljs-tag .hljs-value { 441 | color: #00f; 442 | } 443 | 444 | .hljs-string, .hljs-title, .hljs-parent, .hljs-tag .hljs-value, .hljs-rules .hljs-value { 445 | color: #a31515; 446 | } 447 | 448 | .ruby .hljs-symbol { 449 | color: #a31515; 450 | } 451 | .ruby .hljs-symbol .hljs-string { 452 | color: #a31515; 453 | } 454 | 455 | .hljs-template_tag, .django .hljs-variable, .hljs-addition, .hljs-flow, .hljs-stream, .apache .hljs-tag, .hljs-date, .tex .hljs-formula, .coffeescript .hljs-attribute { 456 | color: #a31515; 457 | } 458 | 459 | .ruby .hljs-string, .hljs-decorator, .hljs-filter .hljs-argument, .hljs-localvars, .hljs-array, .hljs-attr_selector, .hljs-pseudo, .hljs-pi, .hljs-doctype, .hljs-deletion, .hljs-envvar, .hljs-shebang, .hljs-preprocessor, .hljs-pragma, .userType, .apache .hljs-sqbracket, .nginx .hljs-built_in, .tex .hljs-special, .hljs-prompt { 460 | color: #2b91af; 461 | } 462 | 463 | .hljs-phpdoc, .hljs-javadoc, .hljs-xmlDocTag { 464 | color: #808080; 465 | } 466 | 467 | .vhdl .hljs-typename { 468 | font-weight: bold; 469 | } 470 | .vhdl .hljs-string { 471 | color: #666666; 472 | } 473 | .vhdl .hljs-literal { 474 | color: #a31515; 475 | } 476 | .vhdl .hljs-attribute { 477 | color: #00b0e8; 478 | } 479 | 480 | .xml .hljs-attribute { 481 | color: #f00; 482 | } 483 | 484 | ul.tsd-descriptions > li > :first-child, .tsd-panel > :first-child, .col > :first-child, .col-11 > :first-child, .col-10 > :first-child, .col-9 > :first-child, .col-8 > :first-child, .col-7 > :first-child, .col-6 > :first-child, .col-5 > :first-child, .col-4 > :first-child, .col-3 > :first-child, .col-2 > :first-child, .col-1 > :first-child, 485 | ul.tsd-descriptions > li > :first-child > :first-child, 486 | .tsd-panel > :first-child > :first-child, 487 | .col > :first-child > :first-child, 488 | .col-11 > :first-child > :first-child, 489 | .col-10 > :first-child > :first-child, 490 | .col-9 > :first-child > :first-child, 491 | .col-8 > :first-child > :first-child, 492 | .col-7 > :first-child > :first-child, 493 | .col-6 > :first-child > :first-child, 494 | .col-5 > :first-child > :first-child, 495 | .col-4 > :first-child > :first-child, 496 | .col-3 > :first-child > :first-child, 497 | .col-2 > :first-child > :first-child, 498 | .col-1 > :first-child > :first-child, 499 | ul.tsd-descriptions > li > :first-child > :first-child > :first-child, 500 | .tsd-panel > :first-child > :first-child > :first-child, 501 | .col > :first-child > :first-child > :first-child, 502 | .col-11 > :first-child > :first-child > :first-child, 503 | .col-10 > :first-child > :first-child > :first-child, 504 | .col-9 > :first-child > :first-child > :first-child, 505 | .col-8 > :first-child > :first-child > :first-child, 506 | .col-7 > :first-child > :first-child > :first-child, 507 | .col-6 > :first-child > :first-child > :first-child, 508 | .col-5 > :first-child > :first-child > :first-child, 509 | .col-4 > :first-child > :first-child > :first-child, 510 | .col-3 > :first-child > :first-child > :first-child, 511 | .col-2 > :first-child > :first-child > :first-child, 512 | .col-1 > :first-child > :first-child > :first-child { 513 | margin-top: 0; 514 | } 515 | ul.tsd-descriptions > li > :last-child, .tsd-panel > :last-child, .col > :last-child, .col-11 > :last-child, .col-10 > :last-child, .col-9 > :last-child, .col-8 > :last-child, .col-7 > :last-child, .col-6 > :last-child, .col-5 > :last-child, .col-4 > :last-child, .col-3 > :last-child, .col-2 > :last-child, .col-1 > :last-child, 516 | ul.tsd-descriptions > li > :last-child > :last-child, 517 | .tsd-panel > :last-child > :last-child, 518 | .col > :last-child > :last-child, 519 | .col-11 > :last-child > :last-child, 520 | .col-10 > :last-child > :last-child, 521 | .col-9 > :last-child > :last-child, 522 | .col-8 > :last-child > :last-child, 523 | .col-7 > :last-child > :last-child, 524 | .col-6 > :last-child > :last-child, 525 | .col-5 > :last-child > :last-child, 526 | .col-4 > :last-child > :last-child, 527 | .col-3 > :last-child > :last-child, 528 | .col-2 > :last-child > :last-child, 529 | .col-1 > :last-child > :last-child, 530 | ul.tsd-descriptions > li > :last-child > :last-child > :last-child, 531 | .tsd-panel > :last-child > :last-child > :last-child, 532 | .col > :last-child > :last-child > :last-child, 533 | .col-11 > :last-child > :last-child > :last-child, 534 | .col-10 > :last-child > :last-child > :last-child, 535 | .col-9 > :last-child > :last-child > :last-child, 536 | .col-8 > :last-child > :last-child > :last-child, 537 | .col-7 > :last-child > :last-child > :last-child, 538 | .col-6 > :last-child > :last-child > :last-child, 539 | .col-5 > :last-child > :last-child > :last-child, 540 | .col-4 > :last-child > :last-child > :last-child, 541 | .col-3 > :last-child > :last-child > :last-child, 542 | .col-2 > :last-child > :last-child > :last-child, 543 | .col-1 > :last-child > :last-child > :last-child { 544 | margin-bottom: 0; 545 | } 546 | 547 | .container { 548 | max-width: 1200px; 549 | margin: 0 auto; 550 | padding: 0 40px; 551 | } 552 | @media (max-width: 640px) { 553 | .container { 554 | padding: 0 20px; 555 | } 556 | } 557 | 558 | .container-main { 559 | padding-bottom: 200px; 560 | } 561 | 562 | .row { 563 | display: -ms-flexbox; 564 | display: flex; 565 | position: relative; 566 | margin: 0 -10px; 567 | } 568 | .row:after { 569 | visibility: hidden; 570 | display: block; 571 | content: ""; 572 | clear: both; 573 | height: 0; 574 | } 575 | 576 | .col, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { 577 | box-sizing: border-box; 578 | float: left; 579 | padding: 0 10px; 580 | } 581 | 582 | .col-1 { 583 | width: 8.3333333333%; 584 | } 585 | 586 | .offset-1 { 587 | margin-left: 8.3333333333%; 588 | } 589 | 590 | .col-2 { 591 | width: 16.6666666667%; 592 | } 593 | 594 | .offset-2 { 595 | margin-left: 16.6666666667%; 596 | } 597 | 598 | .col-3 { 599 | width: 25%; 600 | } 601 | 602 | .offset-3 { 603 | margin-left: 25%; 604 | } 605 | 606 | .col-4 { 607 | width: 33.3333333333%; 608 | } 609 | 610 | .offset-4 { 611 | margin-left: 33.3333333333%; 612 | } 613 | 614 | .col-5 { 615 | width: 41.6666666667%; 616 | } 617 | 618 | .offset-5 { 619 | margin-left: 41.6666666667%; 620 | } 621 | 622 | .col-6 { 623 | width: 50%; 624 | } 625 | 626 | .offset-6 { 627 | margin-left: 50%; 628 | } 629 | 630 | .col-7 { 631 | width: 58.3333333333%; 632 | } 633 | 634 | .offset-7 { 635 | margin-left: 58.3333333333%; 636 | } 637 | 638 | .col-8 { 639 | width: 66.6666666667%; 640 | } 641 | 642 | .offset-8 { 643 | margin-left: 66.6666666667%; 644 | } 645 | 646 | .col-9 { 647 | width: 75%; 648 | } 649 | 650 | .offset-9 { 651 | margin-left: 75%; 652 | } 653 | 654 | .col-10 { 655 | width: 83.3333333333%; 656 | } 657 | 658 | .offset-10 { 659 | margin-left: 83.3333333333%; 660 | } 661 | 662 | .col-11 { 663 | width: 91.6666666667%; 664 | } 665 | 666 | .offset-11 { 667 | margin-left: 91.6666666667%; 668 | } 669 | 670 | .tsd-kind-icon { 671 | display: block; 672 | position: relative; 673 | padding-left: 20px; 674 | text-indent: -20px; 675 | } 676 | .tsd-kind-icon:before { 677 | content: ""; 678 | display: inline-block; 679 | vertical-align: middle; 680 | width: 17px; 681 | height: 17px; 682 | margin: 0 3px 2px 0; 683 | background-image: url(../images/icons.png); 684 | } 685 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { 686 | .tsd-kind-icon:before { 687 | background-image: url(../images/icons@2x.png); 688 | background-size: 238px 204px; 689 | } 690 | } 691 | 692 | .tsd-signature.tsd-kind-icon:before { 693 | background-position: 0 -153px; 694 | } 695 | 696 | .tsd-kind-object-literal > .tsd-kind-icon:before { 697 | background-position: 0px -17px; 698 | } 699 | .tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { 700 | background-position: -17px -17px; 701 | } 702 | .tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { 703 | background-position: -34px -17px; 704 | } 705 | 706 | .tsd-kind-class > .tsd-kind-icon:before { 707 | background-position: 0px -34px; 708 | } 709 | .tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { 710 | background-position: -17px -34px; 711 | } 712 | .tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { 713 | background-position: -34px -34px; 714 | } 715 | 716 | .tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { 717 | background-position: 0px -51px; 718 | } 719 | .tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 720 | background-position: -17px -51px; 721 | } 722 | .tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 723 | background-position: -34px -51px; 724 | } 725 | 726 | .tsd-kind-interface > .tsd-kind-icon:before { 727 | background-position: 0px -68px; 728 | } 729 | .tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { 730 | background-position: -17px -68px; 731 | } 732 | .tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { 733 | background-position: -34px -68px; 734 | } 735 | 736 | .tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { 737 | background-position: 0px -85px; 738 | } 739 | .tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 740 | background-position: -17px -85px; 741 | } 742 | .tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 743 | background-position: -34px -85px; 744 | } 745 | 746 | .tsd-kind-namespace > .tsd-kind-icon:before { 747 | background-position: 0px -102px; 748 | } 749 | .tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before { 750 | background-position: -17px -102px; 751 | } 752 | .tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before { 753 | background-position: -34px -102px; 754 | } 755 | 756 | .tsd-kind-module > .tsd-kind-icon:before { 757 | background-position: 0px -102px; 758 | } 759 | .tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { 760 | background-position: -17px -102px; 761 | } 762 | .tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { 763 | background-position: -34px -102px; 764 | } 765 | 766 | .tsd-kind-enum > .tsd-kind-icon:before { 767 | background-position: 0px -119px; 768 | } 769 | .tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 770 | background-position: -17px -119px; 771 | } 772 | .tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { 773 | background-position: -34px -119px; 774 | } 775 | 776 | .tsd-kind-enum-member > .tsd-kind-icon:before { 777 | background-position: 0px -136px; 778 | } 779 | .tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { 780 | background-position: -17px -136px; 781 | } 782 | .tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { 783 | background-position: -34px -136px; 784 | } 785 | 786 | .tsd-kind-signature > .tsd-kind-icon:before { 787 | background-position: 0px -153px; 788 | } 789 | .tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { 790 | background-position: -17px -153px; 791 | } 792 | .tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { 793 | background-position: -34px -153px; 794 | } 795 | 796 | .tsd-kind-type-alias > .tsd-kind-icon:before { 797 | background-position: 0px -170px; 798 | } 799 | .tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { 800 | background-position: -17px -170px; 801 | } 802 | .tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { 803 | background-position: -34px -170px; 804 | } 805 | 806 | .tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { 807 | background-position: 0px -187px; 808 | } 809 | .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 810 | background-position: -17px -187px; 811 | } 812 | .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 813 | background-position: -34px -187px; 814 | } 815 | 816 | .tsd-kind-variable > .tsd-kind-icon:before { 817 | background-position: -136px -0px; 818 | } 819 | .tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { 820 | background-position: -153px -0px; 821 | } 822 | .tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { 823 | background-position: -119px -0px; 824 | } 825 | .tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { 826 | background-position: -51px -0px; 827 | } 828 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 829 | background-position: -68px -0px; 830 | } 831 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 832 | background-position: -85px -0px; 833 | } 834 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 835 | background-position: -102px -0px; 836 | } 837 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 838 | background-position: -119px -0px; 839 | } 840 | .tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { 841 | background-position: -170px -0px; 842 | } 843 | .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 844 | background-position: -187px -0px; 845 | } 846 | .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 847 | background-position: -119px -0px; 848 | } 849 | .tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { 850 | background-position: -204px -0px; 851 | } 852 | .tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 853 | background-position: -221px -0px; 854 | } 855 | 856 | .tsd-kind-property > .tsd-kind-icon:before { 857 | background-position: -136px -0px; 858 | } 859 | .tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { 860 | background-position: -153px -0px; 861 | } 862 | .tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { 863 | background-position: -119px -0px; 864 | } 865 | .tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { 866 | background-position: -51px -0px; 867 | } 868 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 869 | background-position: -68px -0px; 870 | } 871 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 872 | background-position: -85px -0px; 873 | } 874 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 875 | background-position: -102px -0px; 876 | } 877 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 878 | background-position: -119px -0px; 879 | } 880 | .tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { 881 | background-position: -170px -0px; 882 | } 883 | .tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 884 | background-position: -187px -0px; 885 | } 886 | .tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 887 | background-position: -119px -0px; 888 | } 889 | .tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { 890 | background-position: -204px -0px; 891 | } 892 | .tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 893 | background-position: -221px -0px; 894 | } 895 | 896 | .tsd-kind-get-signature > .tsd-kind-icon:before { 897 | background-position: -136px -17px; 898 | } 899 | .tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { 900 | background-position: -153px -17px; 901 | } 902 | .tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { 903 | background-position: -119px -17px; 904 | } 905 | .tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 906 | background-position: -51px -17px; 907 | } 908 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 909 | background-position: -68px -17px; 910 | } 911 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 912 | background-position: -85px -17px; 913 | } 914 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 915 | background-position: -102px -17px; 916 | } 917 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 918 | background-position: -119px -17px; 919 | } 920 | .tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 921 | background-position: -170px -17px; 922 | } 923 | .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 924 | background-position: -187px -17px; 925 | } 926 | .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 927 | background-position: -119px -17px; 928 | } 929 | .tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 930 | background-position: -204px -17px; 931 | } 932 | .tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 933 | background-position: -221px -17px; 934 | } 935 | 936 | .tsd-kind-set-signature > .tsd-kind-icon:before { 937 | background-position: -136px -34px; 938 | } 939 | .tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { 940 | background-position: -153px -34px; 941 | } 942 | .tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { 943 | background-position: -119px -34px; 944 | } 945 | .tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 946 | background-position: -51px -34px; 947 | } 948 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 949 | background-position: -68px -34px; 950 | } 951 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 952 | background-position: -85px -34px; 953 | } 954 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 955 | background-position: -102px -34px; 956 | } 957 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 958 | background-position: -119px -34px; 959 | } 960 | .tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 961 | background-position: -170px -34px; 962 | } 963 | .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 964 | background-position: -187px -34px; 965 | } 966 | .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 967 | background-position: -119px -34px; 968 | } 969 | .tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 970 | background-position: -204px -34px; 971 | } 972 | .tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 973 | background-position: -221px -34px; 974 | } 975 | 976 | .tsd-kind-accessor > .tsd-kind-icon:before { 977 | background-position: -136px -51px; 978 | } 979 | .tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { 980 | background-position: -153px -51px; 981 | } 982 | .tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { 983 | background-position: -119px -51px; 984 | } 985 | .tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { 986 | background-position: -51px -51px; 987 | } 988 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 989 | background-position: -68px -51px; 990 | } 991 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 992 | background-position: -85px -51px; 993 | } 994 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 995 | background-position: -102px -51px; 996 | } 997 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 998 | background-position: -119px -51px; 999 | } 1000 | .tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { 1001 | background-position: -170px -51px; 1002 | } 1003 | .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1004 | background-position: -187px -51px; 1005 | } 1006 | .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1007 | background-position: -119px -51px; 1008 | } 1009 | .tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { 1010 | background-position: -204px -51px; 1011 | } 1012 | .tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1013 | background-position: -221px -51px; 1014 | } 1015 | 1016 | .tsd-kind-function > .tsd-kind-icon:before { 1017 | background-position: -136px -68px; 1018 | } 1019 | .tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { 1020 | background-position: -153px -68px; 1021 | } 1022 | .tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { 1023 | background-position: -119px -68px; 1024 | } 1025 | .tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { 1026 | background-position: -51px -68px; 1027 | } 1028 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1029 | background-position: -68px -68px; 1030 | } 1031 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1032 | background-position: -85px -68px; 1033 | } 1034 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1035 | background-position: -102px -68px; 1036 | } 1037 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1038 | background-position: -119px -68px; 1039 | } 1040 | .tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { 1041 | background-position: -170px -68px; 1042 | } 1043 | .tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1044 | background-position: -187px -68px; 1045 | } 1046 | .tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1047 | background-position: -119px -68px; 1048 | } 1049 | .tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { 1050 | background-position: -204px -68px; 1051 | } 1052 | .tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1053 | background-position: -221px -68px; 1054 | } 1055 | 1056 | .tsd-kind-method > .tsd-kind-icon:before { 1057 | background-position: -136px -68px; 1058 | } 1059 | .tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { 1060 | background-position: -153px -68px; 1061 | } 1062 | .tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { 1063 | background-position: -119px -68px; 1064 | } 1065 | .tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { 1066 | background-position: -51px -68px; 1067 | } 1068 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1069 | background-position: -68px -68px; 1070 | } 1071 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1072 | background-position: -85px -68px; 1073 | } 1074 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1075 | background-position: -102px -68px; 1076 | } 1077 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1078 | background-position: -119px -68px; 1079 | } 1080 | .tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { 1081 | background-position: -170px -68px; 1082 | } 1083 | .tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1084 | background-position: -187px -68px; 1085 | } 1086 | .tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1087 | background-position: -119px -68px; 1088 | } 1089 | .tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { 1090 | background-position: -204px -68px; 1091 | } 1092 | .tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1093 | background-position: -221px -68px; 1094 | } 1095 | 1096 | .tsd-kind-call-signature > .tsd-kind-icon:before { 1097 | background-position: -136px -68px; 1098 | } 1099 | .tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { 1100 | background-position: -153px -68px; 1101 | } 1102 | .tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { 1103 | background-position: -119px -68px; 1104 | } 1105 | .tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1106 | background-position: -51px -68px; 1107 | } 1108 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1109 | background-position: -68px -68px; 1110 | } 1111 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1112 | background-position: -85px -68px; 1113 | } 1114 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1115 | background-position: -102px -68px; 1116 | } 1117 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1118 | background-position: -119px -68px; 1119 | } 1120 | .tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1121 | background-position: -170px -68px; 1122 | } 1123 | .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1124 | background-position: -187px -68px; 1125 | } 1126 | .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1127 | background-position: -119px -68px; 1128 | } 1129 | .tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1130 | background-position: -204px -68px; 1131 | } 1132 | .tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1133 | background-position: -221px -68px; 1134 | } 1135 | 1136 | .tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { 1137 | background-position: -136px -85px; 1138 | } 1139 | .tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 1140 | background-position: -153px -85px; 1141 | } 1142 | .tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 1143 | background-position: -119px -85px; 1144 | } 1145 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { 1146 | background-position: -51px -85px; 1147 | } 1148 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1149 | background-position: -68px -85px; 1150 | } 1151 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1152 | background-position: -85px -85px; 1153 | } 1154 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1155 | background-position: -102px -85px; 1156 | } 1157 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1158 | background-position: -119px -85px; 1159 | } 1160 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { 1161 | background-position: -170px -85px; 1162 | } 1163 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1164 | background-position: -187px -85px; 1165 | } 1166 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1167 | background-position: -119px -85px; 1168 | } 1169 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { 1170 | background-position: -204px -85px; 1171 | } 1172 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1173 | background-position: -221px -85px; 1174 | } 1175 | 1176 | .tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { 1177 | background-position: -136px -85px; 1178 | } 1179 | .tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 1180 | background-position: -153px -85px; 1181 | } 1182 | .tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 1183 | background-position: -119px -85px; 1184 | } 1185 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { 1186 | background-position: -51px -85px; 1187 | } 1188 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1189 | background-position: -68px -85px; 1190 | } 1191 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1192 | background-position: -85px -85px; 1193 | } 1194 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1195 | background-position: -102px -85px; 1196 | } 1197 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1198 | background-position: -119px -85px; 1199 | } 1200 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { 1201 | background-position: -170px -85px; 1202 | } 1203 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1204 | background-position: -187px -85px; 1205 | } 1206 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1207 | background-position: -119px -85px; 1208 | } 1209 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { 1210 | background-position: -204px -85px; 1211 | } 1212 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1213 | background-position: -221px -85px; 1214 | } 1215 | 1216 | .tsd-kind-constructor > .tsd-kind-icon:before { 1217 | background-position: -136px -102px; 1218 | } 1219 | .tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { 1220 | background-position: -153px -102px; 1221 | } 1222 | .tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { 1223 | background-position: -119px -102px; 1224 | } 1225 | .tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { 1226 | background-position: -51px -102px; 1227 | } 1228 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1229 | background-position: -68px -102px; 1230 | } 1231 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1232 | background-position: -85px -102px; 1233 | } 1234 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1235 | background-position: -102px -102px; 1236 | } 1237 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1238 | background-position: -119px -102px; 1239 | } 1240 | .tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { 1241 | background-position: -170px -102px; 1242 | } 1243 | .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1244 | background-position: -187px -102px; 1245 | } 1246 | .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1247 | background-position: -119px -102px; 1248 | } 1249 | .tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { 1250 | background-position: -204px -102px; 1251 | } 1252 | .tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1253 | background-position: -221px -102px; 1254 | } 1255 | 1256 | .tsd-kind-constructor-signature > .tsd-kind-icon:before { 1257 | background-position: -136px -102px; 1258 | } 1259 | .tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { 1260 | background-position: -153px -102px; 1261 | } 1262 | .tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { 1263 | background-position: -119px -102px; 1264 | } 1265 | .tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1266 | background-position: -51px -102px; 1267 | } 1268 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1269 | background-position: -68px -102px; 1270 | } 1271 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1272 | background-position: -85px -102px; 1273 | } 1274 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1275 | background-position: -102px -102px; 1276 | } 1277 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1278 | background-position: -119px -102px; 1279 | } 1280 | .tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1281 | background-position: -170px -102px; 1282 | } 1283 | .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1284 | background-position: -187px -102px; 1285 | } 1286 | .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1287 | background-position: -119px -102px; 1288 | } 1289 | .tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1290 | background-position: -204px -102px; 1291 | } 1292 | .tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1293 | background-position: -221px -102px; 1294 | } 1295 | 1296 | .tsd-kind-index-signature > .tsd-kind-icon:before { 1297 | background-position: -136px -119px; 1298 | } 1299 | .tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { 1300 | background-position: -153px -119px; 1301 | } 1302 | .tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { 1303 | background-position: -119px -119px; 1304 | } 1305 | .tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1306 | background-position: -51px -119px; 1307 | } 1308 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1309 | background-position: -68px -119px; 1310 | } 1311 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1312 | background-position: -85px -119px; 1313 | } 1314 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1315 | background-position: -102px -119px; 1316 | } 1317 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1318 | background-position: -119px -119px; 1319 | } 1320 | .tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1321 | background-position: -170px -119px; 1322 | } 1323 | .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1324 | background-position: -187px -119px; 1325 | } 1326 | .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1327 | background-position: -119px -119px; 1328 | } 1329 | .tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1330 | background-position: -204px -119px; 1331 | } 1332 | .tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1333 | background-position: -221px -119px; 1334 | } 1335 | 1336 | .tsd-kind-event > .tsd-kind-icon:before { 1337 | background-position: -136px -136px; 1338 | } 1339 | .tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { 1340 | background-position: -153px -136px; 1341 | } 1342 | .tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { 1343 | background-position: -119px -136px; 1344 | } 1345 | .tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { 1346 | background-position: -51px -136px; 1347 | } 1348 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1349 | background-position: -68px -136px; 1350 | } 1351 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1352 | background-position: -85px -136px; 1353 | } 1354 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1355 | background-position: -102px -136px; 1356 | } 1357 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1358 | background-position: -119px -136px; 1359 | } 1360 | .tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { 1361 | background-position: -170px -136px; 1362 | } 1363 | .tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1364 | background-position: -187px -136px; 1365 | } 1366 | .tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1367 | background-position: -119px -136px; 1368 | } 1369 | .tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { 1370 | background-position: -204px -136px; 1371 | } 1372 | .tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1373 | background-position: -221px -136px; 1374 | } 1375 | 1376 | .tsd-is-static > .tsd-kind-icon:before { 1377 | background-position: -136px -153px; 1378 | } 1379 | .tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { 1380 | background-position: -153px -153px; 1381 | } 1382 | .tsd-is-static.tsd-is-private > .tsd-kind-icon:before { 1383 | background-position: -119px -153px; 1384 | } 1385 | .tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { 1386 | background-position: -51px -153px; 1387 | } 1388 | .tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1389 | background-position: -68px -153px; 1390 | } 1391 | .tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1392 | background-position: -85px -153px; 1393 | } 1394 | .tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1395 | background-position: -102px -153px; 1396 | } 1397 | .tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1398 | background-position: -119px -153px; 1399 | } 1400 | .tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { 1401 | background-position: -170px -153px; 1402 | } 1403 | .tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1404 | background-position: -187px -153px; 1405 | } 1406 | .tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1407 | background-position: -119px -153px; 1408 | } 1409 | .tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { 1410 | background-position: -204px -153px; 1411 | } 1412 | .tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1413 | background-position: -221px -153px; 1414 | } 1415 | 1416 | .tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { 1417 | background-position: -136px -170px; 1418 | } 1419 | .tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { 1420 | background-position: -153px -170px; 1421 | } 1422 | .tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { 1423 | background-position: -119px -170px; 1424 | } 1425 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { 1426 | background-position: -51px -170px; 1427 | } 1428 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1429 | background-position: -68px -170px; 1430 | } 1431 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1432 | background-position: -85px -170px; 1433 | } 1434 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1435 | background-position: -102px -170px; 1436 | } 1437 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1438 | background-position: -119px -170px; 1439 | } 1440 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { 1441 | background-position: -170px -170px; 1442 | } 1443 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1444 | background-position: -187px -170px; 1445 | } 1446 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1447 | background-position: -119px -170px; 1448 | } 1449 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { 1450 | background-position: -204px -170px; 1451 | } 1452 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1453 | background-position: -221px -170px; 1454 | } 1455 | 1456 | .tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { 1457 | background-position: -136px -170px; 1458 | } 1459 | .tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { 1460 | background-position: -153px -170px; 1461 | } 1462 | .tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { 1463 | background-position: -119px -170px; 1464 | } 1465 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { 1466 | background-position: -51px -170px; 1467 | } 1468 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1469 | background-position: -68px -170px; 1470 | } 1471 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1472 | background-position: -85px -170px; 1473 | } 1474 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1475 | background-position: -102px -170px; 1476 | } 1477 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1478 | background-position: -119px -170px; 1479 | } 1480 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { 1481 | background-position: -170px -170px; 1482 | } 1483 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1484 | background-position: -187px -170px; 1485 | } 1486 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1487 | background-position: -119px -170px; 1488 | } 1489 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { 1490 | background-position: -204px -170px; 1491 | } 1492 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1493 | background-position: -221px -170px; 1494 | } 1495 | 1496 | .tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { 1497 | background-position: -136px -170px; 1498 | } 1499 | .tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { 1500 | background-position: -153px -170px; 1501 | } 1502 | .tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { 1503 | background-position: -119px -170px; 1504 | } 1505 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1506 | background-position: -51px -170px; 1507 | } 1508 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1509 | background-position: -68px -170px; 1510 | } 1511 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1512 | background-position: -85px -170px; 1513 | } 1514 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1515 | background-position: -102px -170px; 1516 | } 1517 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1518 | background-position: -119px -170px; 1519 | } 1520 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1521 | background-position: -170px -170px; 1522 | } 1523 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1524 | background-position: -187px -170px; 1525 | } 1526 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1527 | background-position: -119px -170px; 1528 | } 1529 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1530 | background-position: -204px -170px; 1531 | } 1532 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1533 | background-position: -221px -170px; 1534 | } 1535 | 1536 | .tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { 1537 | background-position: -136px -187px; 1538 | } 1539 | .tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { 1540 | background-position: -153px -187px; 1541 | } 1542 | .tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { 1543 | background-position: -119px -187px; 1544 | } 1545 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { 1546 | background-position: -51px -187px; 1547 | } 1548 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1549 | background-position: -68px -187px; 1550 | } 1551 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1552 | background-position: -85px -187px; 1553 | } 1554 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1555 | background-position: -102px -187px; 1556 | } 1557 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1558 | background-position: -119px -187px; 1559 | } 1560 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { 1561 | background-position: -170px -187px; 1562 | } 1563 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1564 | background-position: -187px -187px; 1565 | } 1566 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1567 | background-position: -119px -187px; 1568 | } 1569 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { 1570 | background-position: -204px -187px; 1571 | } 1572 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1573 | background-position: -221px -187px; 1574 | } 1575 | 1576 | @keyframes fade-in { 1577 | from { 1578 | opacity: 0; 1579 | } 1580 | to { 1581 | opacity: 1; 1582 | } 1583 | } 1584 | @keyframes fade-out { 1585 | from { 1586 | opacity: 1; 1587 | visibility: visible; 1588 | } 1589 | to { 1590 | opacity: 0; 1591 | } 1592 | } 1593 | @keyframes fade-in-delayed { 1594 | 0% { 1595 | opacity: 0; 1596 | } 1597 | 33% { 1598 | opacity: 0; 1599 | } 1600 | 100% { 1601 | opacity: 1; 1602 | } 1603 | } 1604 | @keyframes fade-out-delayed { 1605 | 0% { 1606 | opacity: 1; 1607 | visibility: visible; 1608 | } 1609 | 66% { 1610 | opacity: 0; 1611 | } 1612 | 100% { 1613 | opacity: 0; 1614 | } 1615 | } 1616 | @keyframes shift-to-left { 1617 | from { 1618 | transform: translate(0, 0); 1619 | } 1620 | to { 1621 | transform: translate(-25%, 0); 1622 | } 1623 | } 1624 | @keyframes unshift-to-left { 1625 | from { 1626 | transform: translate(-25%, 0); 1627 | } 1628 | to { 1629 | transform: translate(0, 0); 1630 | } 1631 | } 1632 | @keyframes pop-in-from-right { 1633 | from { 1634 | transform: translate(100%, 0); 1635 | } 1636 | to { 1637 | transform: translate(0, 0); 1638 | } 1639 | } 1640 | @keyframes pop-out-to-right { 1641 | from { 1642 | transform: translate(0, 0); 1643 | visibility: visible; 1644 | } 1645 | to { 1646 | transform: translate(100%, 0); 1647 | } 1648 | } 1649 | body { 1650 | background: #fdfdfd; 1651 | font-family: "Segoe UI", sans-serif; 1652 | font-size: 16px; 1653 | color: #222; 1654 | } 1655 | 1656 | a { 1657 | color: #4da6ff; 1658 | text-decoration: none; 1659 | } 1660 | a:hover { 1661 | text-decoration: underline; 1662 | } 1663 | 1664 | code, pre { 1665 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 1666 | padding: 0.2em; 1667 | margin: 0; 1668 | font-size: 14px; 1669 | background-color: rgba(0, 0, 0, 0.04); 1670 | } 1671 | 1672 | pre { 1673 | padding: 10px; 1674 | } 1675 | pre code { 1676 | padding: 0; 1677 | font-size: 100%; 1678 | background-color: transparent; 1679 | } 1680 | 1681 | .tsd-typography { 1682 | line-height: 1.333em; 1683 | } 1684 | .tsd-typography ul { 1685 | list-style: square; 1686 | padding: 0 0 0 20px; 1687 | margin: 0; 1688 | } 1689 | .tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { 1690 | font-size: 1em; 1691 | margin: 0; 1692 | } 1693 | .tsd-typography h5, .tsd-typography h6 { 1694 | font-weight: normal; 1695 | } 1696 | .tsd-typography p, .tsd-typography ul, .tsd-typography ol { 1697 | margin: 1em 0; 1698 | } 1699 | 1700 | @media (min-width: 901px) and (max-width: 1024px) { 1701 | html.default .col-content { 1702 | width: 72%; 1703 | } 1704 | html.default .col-menu { 1705 | width: 28%; 1706 | } 1707 | html.default .tsd-navigation { 1708 | padding-left: 10px; 1709 | } 1710 | } 1711 | @media (max-width: 900px) { 1712 | html.default .col-content { 1713 | float: none; 1714 | width: 100%; 1715 | } 1716 | html.default .col-menu { 1717 | position: fixed !important; 1718 | overflow: auto; 1719 | -webkit-overflow-scrolling: touch; 1720 | z-index: 1024; 1721 | top: 0 !important; 1722 | bottom: 0 !important; 1723 | left: auto !important; 1724 | right: 0 !important; 1725 | width: 100%; 1726 | padding: 20px 20px 0 0; 1727 | max-width: 450px; 1728 | visibility: hidden; 1729 | background-color: #fff; 1730 | transform: translate(100%, 0); 1731 | } 1732 | html.default .col-menu > *:last-child { 1733 | padding-bottom: 20px; 1734 | } 1735 | html.default .overlay { 1736 | content: ""; 1737 | display: block; 1738 | position: fixed; 1739 | z-index: 1023; 1740 | top: 0; 1741 | left: 0; 1742 | right: 0; 1743 | bottom: 0; 1744 | background-color: rgba(0, 0, 0, 0.75); 1745 | visibility: hidden; 1746 | } 1747 | html.default.to-has-menu .overlay { 1748 | animation: fade-in 0.4s; 1749 | } 1750 | html.default.to-has-menu header, 1751 | html.default.to-has-menu footer, 1752 | html.default.to-has-menu .col-content { 1753 | animation: shift-to-left 0.4s; 1754 | } 1755 | html.default.to-has-menu .col-menu { 1756 | animation: pop-in-from-right 0.4s; 1757 | } 1758 | html.default.from-has-menu .overlay { 1759 | animation: fade-out 0.4s; 1760 | } 1761 | html.default.from-has-menu header, 1762 | html.default.from-has-menu footer, 1763 | html.default.from-has-menu .col-content { 1764 | animation: unshift-to-left 0.4s; 1765 | } 1766 | html.default.from-has-menu .col-menu { 1767 | animation: pop-out-to-right 0.4s; 1768 | } 1769 | html.default.has-menu body { 1770 | overflow: hidden; 1771 | } 1772 | html.default.has-menu .overlay { 1773 | visibility: visible; 1774 | } 1775 | html.default.has-menu header, 1776 | html.default.has-menu footer, 1777 | html.default.has-menu .col-content { 1778 | transform: translate(-25%, 0); 1779 | } 1780 | html.default.has-menu .col-menu { 1781 | visibility: visible; 1782 | transform: translate(0, 0); 1783 | } 1784 | } 1785 | 1786 | .tsd-page-title { 1787 | padding: 70px 0 20px 0; 1788 | margin: 0 0 40px 0; 1789 | background: #fff; 1790 | box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); 1791 | } 1792 | .tsd-page-title h1 { 1793 | margin: 0; 1794 | } 1795 | 1796 | .tsd-breadcrumb { 1797 | margin: 0; 1798 | padding: 0; 1799 | color: #808080; 1800 | } 1801 | .tsd-breadcrumb a { 1802 | color: #808080; 1803 | text-decoration: none; 1804 | } 1805 | .tsd-breadcrumb a:hover { 1806 | text-decoration: underline; 1807 | } 1808 | .tsd-breadcrumb li { 1809 | display: inline; 1810 | } 1811 | .tsd-breadcrumb li:after { 1812 | content: " / "; 1813 | } 1814 | 1815 | html.minimal .container { 1816 | margin: 0; 1817 | } 1818 | html.minimal .container-main { 1819 | padding-top: 50px; 1820 | padding-bottom: 0; 1821 | } 1822 | html.minimal .content-wrap { 1823 | padding-left: 300px; 1824 | } 1825 | html.minimal .tsd-navigation { 1826 | position: fixed !important; 1827 | overflow: auto; 1828 | -webkit-overflow-scrolling: touch; 1829 | box-sizing: border-box; 1830 | z-index: 1; 1831 | left: 0; 1832 | top: 40px; 1833 | bottom: 0; 1834 | width: 300px; 1835 | padding: 20px; 1836 | margin: 0; 1837 | } 1838 | html.minimal .tsd-member .tsd-member { 1839 | margin-left: 0; 1840 | } 1841 | html.minimal .tsd-page-toolbar { 1842 | position: fixed; 1843 | z-index: 2; 1844 | } 1845 | html.minimal #tsd-filter .tsd-filter-group { 1846 | right: 0; 1847 | transform: none; 1848 | } 1849 | html.minimal footer { 1850 | background-color: transparent; 1851 | } 1852 | html.minimal footer .container { 1853 | padding: 0; 1854 | } 1855 | html.minimal .tsd-generator { 1856 | padding: 0; 1857 | } 1858 | @media (max-width: 900px) { 1859 | html.minimal .tsd-navigation { 1860 | display: none; 1861 | } 1862 | html.minimal .content-wrap { 1863 | padding-left: 0; 1864 | } 1865 | } 1866 | 1867 | dl.tsd-comment-tags { 1868 | overflow: hidden; 1869 | } 1870 | dl.tsd-comment-tags dt { 1871 | float: left; 1872 | padding: 1px 5px; 1873 | margin: 0 10px 0 0; 1874 | border-radius: 4px; 1875 | border: 1px solid #808080; 1876 | color: #808080; 1877 | font-size: 0.8em; 1878 | font-weight: normal; 1879 | } 1880 | dl.tsd-comment-tags dd { 1881 | margin: 0 0 10px 0; 1882 | } 1883 | dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after { 1884 | display: table; 1885 | content: " "; 1886 | } 1887 | dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after { 1888 | clear: both; 1889 | } 1890 | dl.tsd-comment-tags p { 1891 | margin: 0; 1892 | } 1893 | 1894 | .tsd-panel.tsd-comment .lead { 1895 | font-size: 1.1em; 1896 | line-height: 1.333em; 1897 | margin-bottom: 2em; 1898 | } 1899 | .tsd-panel.tsd-comment .lead:last-child { 1900 | margin-bottom: 0; 1901 | } 1902 | 1903 | .toggle-protected .tsd-is-private { 1904 | display: none; 1905 | } 1906 | 1907 | .toggle-public .tsd-is-private, 1908 | .toggle-public .tsd-is-protected, 1909 | .toggle-public .tsd-is-private-protected { 1910 | display: none; 1911 | } 1912 | 1913 | .toggle-inherited .tsd-is-inherited { 1914 | display: none; 1915 | } 1916 | 1917 | .toggle-only-exported .tsd-is-not-exported { 1918 | display: none; 1919 | } 1920 | 1921 | .toggle-externals .tsd-is-external { 1922 | display: none; 1923 | } 1924 | 1925 | #tsd-filter { 1926 | position: relative; 1927 | display: inline-block; 1928 | height: 40px; 1929 | vertical-align: bottom; 1930 | } 1931 | .no-filter #tsd-filter { 1932 | display: none; 1933 | } 1934 | #tsd-filter .tsd-filter-group { 1935 | display: inline-block; 1936 | height: 40px; 1937 | vertical-align: bottom; 1938 | white-space: nowrap; 1939 | } 1940 | #tsd-filter input { 1941 | display: none; 1942 | } 1943 | @media (max-width: 900px) { 1944 | #tsd-filter .tsd-filter-group { 1945 | display: block; 1946 | position: absolute; 1947 | top: 40px; 1948 | right: 20px; 1949 | height: auto; 1950 | background-color: #fff; 1951 | visibility: hidden; 1952 | transform: translate(50%, 0); 1953 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 1954 | } 1955 | .has-options #tsd-filter .tsd-filter-group { 1956 | visibility: visible; 1957 | } 1958 | .to-has-options #tsd-filter .tsd-filter-group { 1959 | animation: fade-in 0.2s; 1960 | } 1961 | .from-has-options #tsd-filter .tsd-filter-group { 1962 | animation: fade-out 0.2s; 1963 | } 1964 | #tsd-filter label, 1965 | #tsd-filter .tsd-select { 1966 | display: block; 1967 | padding-right: 20px; 1968 | } 1969 | } 1970 | 1971 | footer { 1972 | border-top: 1px solid #eee; 1973 | background-color: #fff; 1974 | } 1975 | footer.with-border-bottom { 1976 | border-bottom: 1px solid #eee; 1977 | } 1978 | footer .tsd-legend-group { 1979 | font-size: 0; 1980 | } 1981 | footer .tsd-legend { 1982 | display: inline-block; 1983 | width: 25%; 1984 | padding: 0; 1985 | font-size: 16px; 1986 | list-style: none; 1987 | line-height: 1.333em; 1988 | vertical-align: top; 1989 | } 1990 | @media (max-width: 900px) { 1991 | footer .tsd-legend { 1992 | width: 50%; 1993 | } 1994 | } 1995 | 1996 | .tsd-hierarchy { 1997 | list-style: square; 1998 | padding: 0 0 0 20px; 1999 | margin: 0; 2000 | } 2001 | .tsd-hierarchy .target { 2002 | font-weight: bold; 2003 | } 2004 | 2005 | .tsd-index-panel .tsd-index-content { 2006 | margin-bottom: -30px !important; 2007 | } 2008 | .tsd-index-panel .tsd-index-section { 2009 | margin-bottom: 30px !important; 2010 | } 2011 | .tsd-index-panel h3 { 2012 | margin: 0 -20px 10px -20px; 2013 | padding: 0 20px 10px 20px; 2014 | border-bottom: 1px solid #eee; 2015 | } 2016 | .tsd-index-panel ul.tsd-index-list { 2017 | -moz-column-count: 3; 2018 | -ms-column-count: 3; 2019 | -o-column-count: 3; 2020 | column-count: 3; 2021 | -moz-column-gap: 20px; 2022 | -ms-column-gap: 20px; 2023 | -o-column-gap: 20px; 2024 | column-gap: 20px; 2025 | padding: 0; 2026 | list-style: none; 2027 | line-height: 1.333em; 2028 | } 2029 | @media (max-width: 900px) { 2030 | .tsd-index-panel ul.tsd-index-list { 2031 | -moz-column-count: 1; 2032 | -ms-column-count: 1; 2033 | -o-column-count: 1; 2034 | column-count: 1; 2035 | } 2036 | } 2037 | @media (min-width: 901px) and (max-width: 1024px) { 2038 | .tsd-index-panel ul.tsd-index-list { 2039 | -moz-column-count: 2; 2040 | -ms-column-count: 2; 2041 | -o-column-count: 2; 2042 | column-count: 2; 2043 | } 2044 | } 2045 | .tsd-index-panel ul.tsd-index-list li { 2046 | -webkit-page-break-inside: avoid; 2047 | -moz-page-break-inside: avoid; 2048 | -ms-page-break-inside: avoid; 2049 | -o-page-break-inside: avoid; 2050 | page-break-inside: avoid; 2051 | } 2052 | .tsd-index-panel a, 2053 | .tsd-index-panel .tsd-parent-kind-module a { 2054 | color: #9600ff; 2055 | } 2056 | .tsd-index-panel .tsd-parent-kind-interface a { 2057 | color: #7da01f; 2058 | } 2059 | .tsd-index-panel .tsd-parent-kind-enum a { 2060 | color: #cc9900; 2061 | } 2062 | .tsd-index-panel .tsd-parent-kind-class a { 2063 | color: #4da6ff; 2064 | } 2065 | .tsd-index-panel .tsd-kind-module a { 2066 | color: #9600ff; 2067 | } 2068 | .tsd-index-panel .tsd-kind-interface a { 2069 | color: #7da01f; 2070 | } 2071 | .tsd-index-panel .tsd-kind-enum a { 2072 | color: #cc9900; 2073 | } 2074 | .tsd-index-panel .tsd-kind-class a { 2075 | color: #4da6ff; 2076 | } 2077 | .tsd-index-panel .tsd-is-private a { 2078 | color: #808080; 2079 | } 2080 | 2081 | .tsd-flag { 2082 | display: inline-block; 2083 | padding: 1px 5px; 2084 | border-radius: 4px; 2085 | color: #fff; 2086 | background-color: #808080; 2087 | text-indent: 0; 2088 | font-size: 14px; 2089 | font-weight: normal; 2090 | } 2091 | 2092 | .tsd-anchor { 2093 | position: absolute; 2094 | top: -100px; 2095 | } 2096 | 2097 | .tsd-member { 2098 | position: relative; 2099 | } 2100 | .tsd-member .tsd-anchor + h3 { 2101 | margin-top: 0; 2102 | margin-bottom: 0; 2103 | border-bottom: none; 2104 | } 2105 | 2106 | .tsd-navigation { 2107 | margin: 0 0 0 40px; 2108 | } 2109 | .tsd-navigation a { 2110 | display: block; 2111 | padding-top: 2px; 2112 | padding-bottom: 2px; 2113 | border-left: 2px solid transparent; 2114 | color: #222; 2115 | text-decoration: none; 2116 | transition: border-left-color 0.1s; 2117 | } 2118 | .tsd-navigation a:hover { 2119 | text-decoration: underline; 2120 | } 2121 | .tsd-navigation ul { 2122 | margin: 0; 2123 | padding: 0; 2124 | list-style: none; 2125 | } 2126 | .tsd-navigation li { 2127 | padding: 0; 2128 | } 2129 | 2130 | .tsd-navigation.primary { 2131 | padding-bottom: 40px; 2132 | } 2133 | .tsd-navigation.primary a { 2134 | display: block; 2135 | padding-top: 6px; 2136 | padding-bottom: 6px; 2137 | } 2138 | .tsd-navigation.primary ul li a { 2139 | padding-left: 5px; 2140 | } 2141 | .tsd-navigation.primary ul li li a { 2142 | padding-left: 25px; 2143 | } 2144 | .tsd-navigation.primary ul li li li a { 2145 | padding-left: 45px; 2146 | } 2147 | .tsd-navigation.primary ul li li li li a { 2148 | padding-left: 65px; 2149 | } 2150 | .tsd-navigation.primary ul li li li li li a { 2151 | padding-left: 85px; 2152 | } 2153 | .tsd-navigation.primary ul li li li li li li a { 2154 | padding-left: 105px; 2155 | } 2156 | .tsd-navigation.primary > ul { 2157 | border-bottom: 1px solid #eee; 2158 | } 2159 | .tsd-navigation.primary li { 2160 | border-top: 1px solid #eee; 2161 | } 2162 | .tsd-navigation.primary li.current > a { 2163 | font-weight: bold; 2164 | } 2165 | .tsd-navigation.primary li.label span { 2166 | display: block; 2167 | padding: 20px 0 6px 5px; 2168 | color: #808080; 2169 | } 2170 | .tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a { 2171 | padding-top: 20px; 2172 | } 2173 | 2174 | .tsd-navigation.secondary { 2175 | max-height: calc(100vh - 1rem - 40px); 2176 | overflow: auto; 2177 | position: -webkit-sticky; 2178 | position: sticky; 2179 | top: calc(.5rem + 40px); 2180 | transition: 0.3s; 2181 | } 2182 | .tsd-navigation.secondary.tsd-navigation--toolbar-hide { 2183 | max-height: calc(100vh - 1rem); 2184 | top: 0.5rem; 2185 | } 2186 | .tsd-navigation.secondary ul { 2187 | transition: opacity 0.2s; 2188 | } 2189 | .tsd-navigation.secondary ul li a { 2190 | padding-left: 25px; 2191 | } 2192 | .tsd-navigation.secondary ul li li a { 2193 | padding-left: 45px; 2194 | } 2195 | .tsd-navigation.secondary ul li li li a { 2196 | padding-left: 65px; 2197 | } 2198 | .tsd-navigation.secondary ul li li li li a { 2199 | padding-left: 85px; 2200 | } 2201 | .tsd-navigation.secondary ul li li li li li a { 2202 | padding-left: 105px; 2203 | } 2204 | .tsd-navigation.secondary ul li li li li li li a { 2205 | padding-left: 125px; 2206 | } 2207 | .tsd-navigation.secondary ul.current a { 2208 | border-left-color: #eee; 2209 | } 2210 | .tsd-navigation.secondary li.focus > a, 2211 | .tsd-navigation.secondary ul.current li.focus > a { 2212 | border-left-color: #000; 2213 | } 2214 | .tsd-navigation.secondary li.current { 2215 | margin-top: 20px; 2216 | margin-bottom: 20px; 2217 | border-left-color: #eee; 2218 | } 2219 | .tsd-navigation.secondary li.current > a { 2220 | font-weight: bold; 2221 | } 2222 | 2223 | @media (min-width: 901px) { 2224 | .menu-sticky-wrap { 2225 | position: static; 2226 | } 2227 | } 2228 | 2229 | .tsd-panel { 2230 | margin: 20px 0; 2231 | padding: 20px; 2232 | background-color: #fff; 2233 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2234 | } 2235 | .tsd-panel:empty { 2236 | display: none; 2237 | } 2238 | .tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { 2239 | margin: 1.5em -20px 10px -20px; 2240 | padding: 0 20px 10px 20px; 2241 | border-bottom: 1px solid #eee; 2242 | } 2243 | .tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { 2244 | margin-bottom: 0; 2245 | border-bottom: 0; 2246 | } 2247 | .tsd-panel table { 2248 | display: block; 2249 | width: 100%; 2250 | overflow: auto; 2251 | margin-top: 10px; 2252 | word-break: normal; 2253 | word-break: keep-all; 2254 | } 2255 | .tsd-panel table th { 2256 | font-weight: bold; 2257 | } 2258 | .tsd-panel table th, .tsd-panel table td { 2259 | padding: 6px 13px; 2260 | border: 1px solid #ddd; 2261 | } 2262 | .tsd-panel table tr { 2263 | background-color: #fff; 2264 | border-top: 1px solid #ccc; 2265 | } 2266 | .tsd-panel table tr:nth-child(2n) { 2267 | background-color: #f8f8f8; 2268 | } 2269 | 2270 | .tsd-panel-group { 2271 | margin: 60px 0; 2272 | } 2273 | .tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { 2274 | padding-left: 20px; 2275 | padding-right: 20px; 2276 | } 2277 | 2278 | #tsd-search { 2279 | transition: background-color 0.2s; 2280 | } 2281 | #tsd-search .title { 2282 | position: relative; 2283 | z-index: 2; 2284 | } 2285 | #tsd-search .field { 2286 | position: absolute; 2287 | left: 0; 2288 | top: 0; 2289 | right: 40px; 2290 | height: 40px; 2291 | } 2292 | #tsd-search .field input { 2293 | box-sizing: border-box; 2294 | position: relative; 2295 | top: -50px; 2296 | z-index: 1; 2297 | width: 100%; 2298 | padding: 0 10px; 2299 | opacity: 0; 2300 | outline: 0; 2301 | border: 0; 2302 | background: transparent; 2303 | color: #222; 2304 | } 2305 | #tsd-search .field label { 2306 | position: absolute; 2307 | overflow: hidden; 2308 | right: -40px; 2309 | } 2310 | #tsd-search .field input, 2311 | #tsd-search .title { 2312 | transition: opacity 0.2s; 2313 | } 2314 | #tsd-search .results { 2315 | position: absolute; 2316 | visibility: hidden; 2317 | top: 40px; 2318 | width: 100%; 2319 | margin: 0; 2320 | padding: 0; 2321 | list-style: none; 2322 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2323 | } 2324 | #tsd-search .results li { 2325 | padding: 0 10px; 2326 | background-color: #fdfdfd; 2327 | } 2328 | #tsd-search .results li:nth-child(even) { 2329 | background-color: #fff; 2330 | } 2331 | #tsd-search .results li.state { 2332 | display: none; 2333 | } 2334 | #tsd-search .results li.current, 2335 | #tsd-search .results li:hover { 2336 | background-color: #eee; 2337 | } 2338 | #tsd-search .results a { 2339 | display: block; 2340 | } 2341 | #tsd-search .results a:before { 2342 | top: 10px; 2343 | } 2344 | #tsd-search .results span.parent { 2345 | color: #808080; 2346 | font-weight: normal; 2347 | } 2348 | #tsd-search.has-focus { 2349 | background-color: #eee; 2350 | } 2351 | #tsd-search.has-focus .field input { 2352 | top: 0; 2353 | opacity: 1; 2354 | } 2355 | #tsd-search.has-focus .title { 2356 | z-index: 0; 2357 | opacity: 0; 2358 | } 2359 | #tsd-search.has-focus .results { 2360 | visibility: visible; 2361 | } 2362 | #tsd-search.loading .results li.state.loading { 2363 | display: block; 2364 | } 2365 | #tsd-search.failure .results li.state.failure { 2366 | display: block; 2367 | } 2368 | 2369 | .tsd-signature { 2370 | margin: 0 0 1em 0; 2371 | padding: 10px; 2372 | border: 1px solid #eee; 2373 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 2374 | font-size: 14px; 2375 | overflow-x: auto; 2376 | } 2377 | .tsd-signature.tsd-kind-icon { 2378 | padding-left: 30px; 2379 | } 2380 | .tsd-signature.tsd-kind-icon:before { 2381 | top: 10px; 2382 | left: 10px; 2383 | } 2384 | .tsd-panel > .tsd-signature { 2385 | margin-left: -20px; 2386 | margin-right: -20px; 2387 | border-width: 1px 0; 2388 | } 2389 | .tsd-panel > .tsd-signature.tsd-kind-icon { 2390 | padding-left: 40px; 2391 | } 2392 | .tsd-panel > .tsd-signature.tsd-kind-icon:before { 2393 | left: 20px; 2394 | } 2395 | 2396 | .tsd-signature-symbol { 2397 | color: #808080; 2398 | font-weight: normal; 2399 | } 2400 | 2401 | .tsd-signature-type { 2402 | font-style: italic; 2403 | font-weight: normal; 2404 | } 2405 | 2406 | .tsd-signatures { 2407 | padding: 0; 2408 | margin: 0 0 1em 0; 2409 | border: 1px solid #eee; 2410 | } 2411 | .tsd-signatures .tsd-signature { 2412 | margin: 0; 2413 | border-width: 1px 0 0 0; 2414 | transition: background-color 0.1s; 2415 | } 2416 | .tsd-signatures .tsd-signature:first-child { 2417 | border-top-width: 0; 2418 | } 2419 | .tsd-signatures .tsd-signature.current { 2420 | background-color: #eee; 2421 | } 2422 | .tsd-signatures.active > .tsd-signature { 2423 | cursor: pointer; 2424 | } 2425 | .tsd-panel > .tsd-signatures { 2426 | margin-left: -20px; 2427 | margin-right: -20px; 2428 | border-width: 1px 0; 2429 | } 2430 | .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { 2431 | padding-left: 40px; 2432 | } 2433 | .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { 2434 | left: 20px; 2435 | } 2436 | .tsd-panel > a.anchor + .tsd-signatures { 2437 | border-top-width: 0; 2438 | margin-top: -20px; 2439 | } 2440 | 2441 | ul.tsd-descriptions { 2442 | position: relative; 2443 | overflow: hidden; 2444 | padding: 0; 2445 | list-style: none; 2446 | } 2447 | ul.tsd-descriptions.active > .tsd-description { 2448 | display: none; 2449 | } 2450 | ul.tsd-descriptions.active > .tsd-description.current { 2451 | display: block; 2452 | } 2453 | ul.tsd-descriptions.active > .tsd-description.fade-in { 2454 | animation: fade-in-delayed 0.3s; 2455 | } 2456 | ul.tsd-descriptions.active > .tsd-description.fade-out { 2457 | animation: fade-out-delayed 0.3s; 2458 | position: absolute; 2459 | display: block; 2460 | top: 0; 2461 | left: 0; 2462 | right: 0; 2463 | opacity: 0; 2464 | visibility: hidden; 2465 | } 2466 | ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { 2467 | font-size: 16px; 2468 | margin: 1em 0 0.5em 0; 2469 | } 2470 | 2471 | ul.tsd-parameters, 2472 | ul.tsd-type-parameters { 2473 | list-style: square; 2474 | margin: 0; 2475 | padding-left: 20px; 2476 | } 2477 | ul.tsd-parameters > li.tsd-parameter-signature, 2478 | ul.tsd-type-parameters > li.tsd-parameter-signature { 2479 | list-style: none; 2480 | margin-left: -20px; 2481 | } 2482 | ul.tsd-parameters h5, 2483 | ul.tsd-type-parameters h5 { 2484 | font-size: 16px; 2485 | margin: 1em 0 0.5em 0; 2486 | } 2487 | ul.tsd-parameters .tsd-comment, 2488 | ul.tsd-type-parameters .tsd-comment { 2489 | margin-top: -0.5em; 2490 | } 2491 | 2492 | .tsd-sources { 2493 | font-size: 14px; 2494 | color: #808080; 2495 | margin: 0 0 1em 0; 2496 | } 2497 | .tsd-sources a { 2498 | color: #808080; 2499 | text-decoration: underline; 2500 | } 2501 | .tsd-sources ul, .tsd-sources p { 2502 | margin: 0 !important; 2503 | } 2504 | .tsd-sources ul { 2505 | list-style: none; 2506 | padding: 0; 2507 | } 2508 | 2509 | .tsd-page-toolbar { 2510 | position: fixed; 2511 | z-index: 1; 2512 | top: 0; 2513 | left: 0; 2514 | width: 100%; 2515 | height: 40px; 2516 | color: #333; 2517 | background: #fff; 2518 | border-bottom: 1px solid #eee; 2519 | transition: transform 0.3s linear; 2520 | } 2521 | .tsd-page-toolbar a { 2522 | color: #333; 2523 | text-decoration: none; 2524 | } 2525 | .tsd-page-toolbar a.title { 2526 | font-weight: bold; 2527 | } 2528 | .tsd-page-toolbar a.title:hover { 2529 | text-decoration: underline; 2530 | } 2531 | .tsd-page-toolbar .table-wrap { 2532 | display: table; 2533 | width: 100%; 2534 | height: 40px; 2535 | } 2536 | .tsd-page-toolbar .table-cell { 2537 | display: table-cell; 2538 | position: relative; 2539 | white-space: nowrap; 2540 | line-height: 40px; 2541 | } 2542 | .tsd-page-toolbar .table-cell:first-child { 2543 | width: 100%; 2544 | } 2545 | 2546 | .tsd-page-toolbar--hide { 2547 | transform: translateY(-100%); 2548 | } 2549 | 2550 | .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { 2551 | content: ""; 2552 | display: inline-block; 2553 | width: 40px; 2554 | height: 40px; 2555 | margin: 0 -8px 0 0; 2556 | background-image: url(../images/widgets.png); 2557 | background-repeat: no-repeat; 2558 | text-indent: -1024px; 2559 | vertical-align: bottom; 2560 | } 2561 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { 2562 | .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { 2563 | background-image: url(../images/widgets@2x.png); 2564 | background-size: 320px 40px; 2565 | } 2566 | } 2567 | 2568 | .tsd-widget { 2569 | display: inline-block; 2570 | overflow: hidden; 2571 | opacity: 0.6; 2572 | height: 40px; 2573 | transition: opacity 0.1s, background-color 0.2s; 2574 | vertical-align: bottom; 2575 | cursor: pointer; 2576 | } 2577 | .tsd-widget:hover { 2578 | opacity: 0.8; 2579 | } 2580 | .tsd-widget.active { 2581 | opacity: 1; 2582 | background-color: #eee; 2583 | } 2584 | .tsd-widget.no-caption { 2585 | width: 40px; 2586 | } 2587 | .tsd-widget.no-caption:before { 2588 | margin: 0; 2589 | } 2590 | .tsd-widget.search:before { 2591 | background-position: 0 0; 2592 | } 2593 | .tsd-widget.menu:before { 2594 | background-position: -40px 0; 2595 | } 2596 | .tsd-widget.options:before { 2597 | background-position: -80px 0; 2598 | } 2599 | .tsd-widget.options, .tsd-widget.menu { 2600 | display: none; 2601 | } 2602 | @media (max-width: 900px) { 2603 | .tsd-widget.options, .tsd-widget.menu { 2604 | display: inline-block; 2605 | } 2606 | } 2607 | input[type=checkbox] + .tsd-widget:before { 2608 | background-position: -120px 0; 2609 | } 2610 | input[type=checkbox]:checked + .tsd-widget:before { 2611 | background-position: -160px 0; 2612 | } 2613 | 2614 | .tsd-select { 2615 | position: relative; 2616 | display: inline-block; 2617 | height: 40px; 2618 | transition: opacity 0.1s, background-color 0.2s; 2619 | vertical-align: bottom; 2620 | cursor: pointer; 2621 | } 2622 | .tsd-select .tsd-select-label { 2623 | opacity: 0.6; 2624 | transition: opacity 0.2s; 2625 | } 2626 | .tsd-select .tsd-select-label:before { 2627 | background-position: -240px 0; 2628 | } 2629 | .tsd-select.active .tsd-select-label { 2630 | opacity: 0.8; 2631 | } 2632 | .tsd-select.active .tsd-select-list { 2633 | visibility: visible; 2634 | opacity: 1; 2635 | transition-delay: 0s; 2636 | } 2637 | .tsd-select .tsd-select-list { 2638 | position: absolute; 2639 | visibility: hidden; 2640 | top: 40px; 2641 | left: 0; 2642 | margin: 0; 2643 | padding: 0; 2644 | opacity: 0; 2645 | list-style: none; 2646 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2647 | transition: visibility 0s 0.2s, opacity 0.2s; 2648 | } 2649 | .tsd-select .tsd-select-list li { 2650 | padding: 0 20px 0 0; 2651 | background-color: #fdfdfd; 2652 | } 2653 | .tsd-select .tsd-select-list li:before { 2654 | background-position: 40px 0; 2655 | } 2656 | .tsd-select .tsd-select-list li:nth-child(even) { 2657 | background-color: #fff; 2658 | } 2659 | .tsd-select .tsd-select-list li:hover { 2660 | background-color: #eee; 2661 | } 2662 | .tsd-select .tsd-select-list li.selected:before { 2663 | background-position: -200px 0; 2664 | } 2665 | @media (max-width: 900px) { 2666 | .tsd-select .tsd-select-list { 2667 | top: 0; 2668 | left: auto; 2669 | right: 100%; 2670 | margin-right: -5px; 2671 | } 2672 | .tsd-select .tsd-select-label:before { 2673 | background-position: -280px 0; 2674 | } 2675 | } 2676 | 2677 | img { 2678 | max-width: 100%; 2679 | } -------------------------------------------------------------------------------- /docs/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanbuchar/electron-settings/2cf4695985eef47cb6e9120a39400b935fb16ed6/docs/assets/images/icons.png -------------------------------------------------------------------------------- /docs/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanbuchar/electron-settings/2cf4695985eef47cb6e9120a39400b935fb16ed6/docs/assets/images/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanbuchar/electron-settings/2cf4695985eef47cb6e9120a39400b935fb16ed6/docs/assets/images/widgets.png -------------------------------------------------------------------------------- /docs/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanbuchar/electron-settings/2cf4695985eef47cb6e9120a39400b935fb16ed6/docs/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /docs/assets/js/main.js: -------------------------------------------------------------------------------- 1 | !function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return null==e?"":e.toString()},e.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){for(var t,r;47<(r=(t=this.next()).charCodeAt(0))&&r<58;);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos=this.scrollTop||0===this.scrollTop,isShown!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide")),this.lastY=this.scrollTop},Viewport}(typedoc.EventTarget);typedoc.Viewport=Viewport,typedoc.registerService(Viewport,"viewport")}(typedoc||(typedoc={})),function(typedoc){function Component(options){this.el=options.el}typedoc.Component=Component}(typedoc||(typedoc={})),function(typedoc){typedoc.pointerDown="mousedown",typedoc.pointerMove="mousemove",typedoc.pointerUp="mouseup",typedoc.pointerDownPosition={x:0,y:0},typedoc.preventNextClick=!1,typedoc.isPointerDown=!1,typedoc.isPointerTouch=!1,typedoc.hasPointerMoved=!1,typedoc.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),document.documentElement.classList.add(typedoc.isMobile?"is-mobile":"not-mobile"),typedoc.isMobile&&"ontouchstart"in document.documentElement&&(typedoc.isPointerTouch=!0,typedoc.pointerDown="touchstart",typedoc.pointerMove="touchmove",typedoc.pointerUp="touchend"),document.addEventListener(typedoc.pointerDown,function(e){typedoc.isPointerDown=!0,typedoc.hasPointerMoved=!1;var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e;typedoc.pointerDownPosition.y=t.pageY||0,typedoc.pointerDownPosition.x=t.pageX||0}),document.addEventListener(typedoc.pointerMove,function(e){if(typedoc.isPointerDown&&!typedoc.hasPointerMoved){var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e,x=typedoc.pointerDownPosition.x-(t.pageX||0),y=typedoc.pointerDownPosition.y-(t.pageY||0);typedoc.hasPointerMoved=10scrollTop;)index-=1;for(;index"+match+""}),parent=row.parent||"";(parent=parent.replace(new RegExp(this.query,"i"),function(match){return""+match+""}))&&(name=''+parent+"."+name);var item=document.createElement("li");item.classList.value=row.classes,item.innerHTML='\n '+name+"'\n ",this.results.appendChild(item)}}},Search.prototype.setLoadingState=function(value){this.loadingState!=value&&(this.el.classList.remove(SearchLoadingState[this.loadingState].toLowerCase()),this.loadingState=value,this.el.classList.add(SearchLoadingState[this.loadingState].toLowerCase()),this.updateResults())},Search.prototype.setHasFocus=function(value){this.hasFocus!=value&&(this.hasFocus=value,this.el.classList.toggle("has-focus"),value?(this.setQuery(""),this.field.value=""):this.field.value=this.query)},Search.prototype.setQuery=function(value){this.query=value.trim(),this.updateResults()},Search.prototype.setCurrentResult=function(dir){var current=this.results.querySelector(".current");if(current){var rel=1==dir?current.nextElementSibling:current.previousElementSibling;rel&&(current.classList.remove("current"),rel.classList.add("current"))}else(current=this.results.querySelector(1==dir?"li:first-child":"li:last-child"))&¤t.classList.add("current")},Search.prototype.gotoCurrentResult=function(){var current=this.results.querySelector(".current");if(current||(current=this.results.querySelector("li:first-child")),current){var link=current.querySelector("a");link&&(window.location.href=link.href),this.field.blur()}},Search.prototype.bindEvents=function(){var _this=this;this.results.addEventListener("mousedown",function(){_this.resultClicked=!0}),this.results.addEventListener("mouseup",function(){_this.resultClicked=!1,_this.setHasFocus(!1)}),this.field.addEventListener("focusin",function(){_this.setHasFocus(!0),_this.loadIndex()}),this.field.addEventListener("focusout",function(){_this.resultClicked?_this.resultClicked=!1:setTimeout(function(){return _this.setHasFocus(!1)},100)}),this.field.addEventListener("input",function(){_this.setQuery(_this.field.value)}),this.field.addEventListener("keydown",function(e){13==e.keyCode||27==e.keyCode||38==e.keyCode||40==e.keyCode?(_this.preventPress=!0,e.preventDefault(),13==e.keyCode?_this.gotoCurrentResult():27==e.keyCode?_this.field.blur():38==e.keyCode?_this.setCurrentResult(-1):40==e.keyCode&&_this.setCurrentResult(1)):_this.preventPress=!1}),this.field.addEventListener("keypress",function(e){_this.preventPress&&e.preventDefault()}),document.body.addEventListener("keydown",function(e){e.altKey||e.ctrlKey||e.metaKey||!_this.hasFocus&&47this.groups.length-1&&(index=this.groups.length-1),this.index!=index){var to=this.groups[index];if(-1 docs/CNAME", 32 | "release": "standard-version", 33 | "prepublishOnly": "tsc", 34 | "test": "npm run lint && npm run test:main && npm run test:renderer", 35 | "test:main": "electron-mocha --reporter spec --require ts-node/register 'src/**/*.test.ts'", 36 | "test:renderer": "electron-mocha --renderer --reporter spec --require ts-node/register 'src/**/*.test.ts'" 37 | }, 38 | "dependencies": { 39 | "lodash": "^4.17.21", 40 | "mkdirp": "^1.0.4", 41 | "write-file-atomic": "^3.0.3" 42 | }, 43 | "devDependencies": { 44 | "@types/lodash": "^4.17.0", 45 | "@types/mkdirp": "^1.0.0", 46 | "@types/mocha": "^7.0.2", 47 | "@types/node": "^14.0.5", 48 | "@types/randomstring": "^1.1.6", 49 | "@types/rimraf": "^3.0.0", 50 | "@types/write-file-atomic": "^3.0.0", 51 | "@typescript-eslint/eslint-plugin": "^3.0.0", 52 | "@typescript-eslint/parser": "^3.0.0", 53 | "electron": "^9.0.0", 54 | "electron-mocha": "^8.2.2", 55 | "eslint": "^7.1.0", 56 | "eslint-config-airbnb-base": "^14.1.0", 57 | "eslint-plugin-import": "^2.20.2", 58 | "randomstring": "^1.1.5", 59 | "rimraf": "^3.0.2", 60 | "standard-version": "^8.0.0", 61 | "ts-node": "^8.10.1", 62 | "typedoc": "^0.25.13", 63 | "typescript": "^5.4.5" 64 | }, 65 | "peerDependencies": { 66 | "electron": ">= 2" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/settings.test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-env mocha */ 2 | /* eslint import/no-extraneous-dependencies: ['error', { devDependencies: true }] */ 3 | 4 | import assert from 'assert'; 5 | import electron from 'electron'; 6 | import fs from 'fs'; 7 | import mkdirp from 'mkdirp'; 8 | import path from 'path'; 9 | import randomstring from 'randomstring'; 10 | import rimraf from 'rimraf'; 11 | 12 | import settings from './settings'; 13 | 14 | const rootDir = path.join(__dirname, '..'); 15 | const tmpDir = path.join(rootDir, 'tmp'); 16 | 17 | function getUserDataPath() { 18 | const app = electron.app || electron.remote.app; 19 | const userDataPath = app.getPath('userData'); 20 | 21 | return userDataPath; 22 | } 23 | 24 | function createTestDir() { 25 | const rand = randomstring.generate(7); 26 | const dir = path.join(tmpDir, rand); 27 | 28 | mkdirp.sync(dir); 29 | 30 | return dir; 31 | } 32 | 33 | describe('Electron Settings', () => { 34 | 35 | let dir: string; 36 | 37 | // Create a test dir for each test. 38 | beforeEach(() => { 39 | dir = createTestDir(); 40 | 41 | settings.configure({ 42 | dir, 43 | }); 44 | }); 45 | 46 | // Delete user data files and reset settings config. 47 | afterEach(() => { 48 | rimraf.sync(`${getUserDataPath()}/*`); 49 | settings.reset(); 50 | }); 51 | 52 | // Delete tmp files. 53 | after(() => { 54 | rimraf.sync(tmpDir); 55 | }); 56 | 57 | it('should exist', () => { 58 | assert(settings); 59 | }); 60 | 61 | describe('methods', () => { 62 | 63 | describe('#configure', () => { 64 | it('should update the configuration', () => { 65 | assert.equal(settings.file(), path.join(dir, 'settings.json')); 66 | 67 | const fileName = 'foo.json'; 68 | settings.configure({ 69 | dir, 70 | fileName, 71 | }); 72 | 73 | assert.equal(settings.file(), path.join(dir, fileName)); 74 | }); 75 | }); 76 | 77 | describe('#file', () => { 78 | 79 | context('by default', () => { 80 | it('should point to "settings.json" within the app\'s user data directory', () => { 81 | settings.reset(); 82 | 83 | const userDataPath = getUserDataPath(); 84 | 85 | assert.equal(settings.file(), path.join(userDataPath, 'settings.json')); 86 | }); 87 | }); 88 | 89 | context('when a custom directory was defined', () => { 90 | it('should point to "settings.json" within the custom directory', () => { 91 | assert.equal(settings.file(), path.join(dir, 'settings.json')); 92 | }); 93 | }); 94 | 95 | context('when a custom file name was defined', () => { 96 | it('should point to the custom file within the app\'s user data directory', () => { 97 | const fileName = 'foo.json'; 98 | const userDataPath = getUserDataPath(); 99 | 100 | settings.reset(); 101 | settings.configure({ fileName }); 102 | 103 | assert.equal(settings.file(), path.join(userDataPath, fileName)); 104 | }); 105 | }); 106 | 107 | context('when both a custom directory and file name were defined', () => { 108 | it('should point to the custom file within the custom directory', () => { 109 | const fileName = 'foo.json'; 110 | 111 | settings.configure({ fileName }); 112 | 113 | assert.equal(settings.file(), path.join(dir, fileName)); 114 | }); 115 | }); 116 | }); 117 | 118 | describe('#has', () => { 119 | it('should check the value at the key path', async () => { 120 | const seed = { foo: [{ bar: 'baz' }] }; 121 | 122 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 123 | 124 | const hasBar = await settings.has('foo[0].bar'); 125 | const hasQux = await settings.has('foo[0].qux'); 126 | 127 | assert.deepStrictEqual(hasBar, true); 128 | assert.deepStrictEqual(hasQux, false); 129 | }); 130 | }); 131 | 132 | describe('#hasSync', () => { 133 | 134 | context('when no key path is given', () => { 135 | it('should get all settings', () => { 136 | const seed = { foo: [{ bar: 'baz' }] }; 137 | 138 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 139 | 140 | const obj = settings.getSync(); 141 | 142 | assert.deepStrictEqual(obj, seed); 143 | }); 144 | }); 145 | 146 | context('when key path is given', () => { 147 | it('should get the value at the key path', () => { 148 | const seed = { foo: [{ bar: 'baz' }] }; 149 | 150 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 151 | 152 | const value = settings.getSync('foo[0].bar'); 153 | 154 | assert.deepStrictEqual(value, seed.foo[0].bar); 155 | }); 156 | }); 157 | }); 158 | 159 | describe('#get', () => { 160 | 161 | context('when no key path is given', () => { 162 | it('should get all settings', async () => { 163 | const seed = { foo: [{ bar: 'baz' }] }; 164 | 165 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 166 | 167 | const obj = await settings.get(); 168 | 169 | assert.deepStrictEqual(obj, seed); 170 | }); 171 | }); 172 | 173 | context('when key path is given', () => { 174 | it('should get the value at the key path', async () => { 175 | const seed = { foo: [{ bar: 'baz' }] }; 176 | 177 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 178 | 179 | const value = await settings.get('foo[0].bar'); 180 | 181 | assert.deepStrictEqual(value, seed.foo[0].bar); 182 | }); 183 | }); 184 | }); 185 | 186 | describe('#getSync', () => { 187 | 188 | context('when no key path is given', () => { 189 | it('should get all settings', () => { 190 | const seed = { foo: [{ bar: 'baz' }] }; 191 | 192 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 193 | 194 | const obj = settings.getSync(); 195 | 196 | assert.deepStrictEqual(obj, seed); 197 | }); 198 | }); 199 | 200 | context('when key path is given', () => { 201 | it('should get the value at the key path', () => { 202 | const seed = { foo: [{ bar: 'baz' }] }; 203 | 204 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 205 | 206 | const value = settings.getSync('foo[0].bar'); 207 | 208 | assert.deepStrictEqual(value, seed.foo[0].bar); 209 | }); 210 | }); 211 | }); 212 | 213 | describe('#set', () => { 214 | 215 | context('when no key path is given', () => { 216 | it('should set all settings', async () => { 217 | const seed = { foo: [{ bar: 'baz' }] }; 218 | 219 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 220 | 221 | await settings.set(seed); 222 | const obj = await settings.get(); 223 | 224 | assert.deepStrictEqual(obj, seed); 225 | }); 226 | }); 227 | 228 | context('when key path is given', () => { 229 | it('should set the value at the key path', async () => { 230 | const seed = { foo: [{ bar: 'baz' }] }; 231 | 232 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 233 | 234 | const beforeValue = await settings.get('foo[0].bar'); 235 | assert.deepStrictEqual(beforeValue, seed.foo[0].bar); 236 | 237 | await settings.set('foo[0].bar', 'qux'); 238 | const afterValue = await settings.get('foo[0].bar'); 239 | 240 | assert.deepStrictEqual(afterValue, 'qux'); 241 | }); 242 | }); 243 | }); 244 | 245 | describe('#setSync', () => { 246 | 247 | context('when no key path is given', () => { 248 | it('should set all settings', () => { 249 | const seed = { foo: [{ bar: 'baz' }] }; 250 | 251 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 252 | 253 | settings.setSync(seed); 254 | const obj = settings.getSync(); 255 | 256 | assert.deepStrictEqual(obj, seed); 257 | }); 258 | }); 259 | 260 | context('when key path is given', () => { 261 | it('should set the value at the key path', () => { 262 | const seed = { foo: [{ bar: 'baz' }] }; 263 | 264 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 265 | 266 | const beforeValue = settings.getSync('foo[0].bar'); 267 | assert.deepStrictEqual(beforeValue, seed.foo[0].bar); 268 | 269 | settings.setSync('foo[0].bar', 'qux'); 270 | const afterValue = settings.getSync('foo[0].bar'); 271 | 272 | assert.deepStrictEqual(afterValue, 'qux'); 273 | }); 274 | }); 275 | }); 276 | 277 | describe('#unset', () => { 278 | 279 | context('when no key path is given', () => { 280 | it('should unset all settings', async () => { 281 | const seed = { foo: [{ bar: 'baz' }] }; 282 | 283 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 284 | 285 | await settings.unset(); 286 | const obj = await settings.get(); 287 | 288 | assert.deepStrictEqual(obj, {}); 289 | }); 290 | }); 291 | 292 | context('when key path is given', () => { 293 | it('should unset the value at the key path', async () => { 294 | const seed = { foo: [{ bar: 'baz' }] }; 295 | 296 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 297 | 298 | const beforeValue = await settings.get('foo[0].bar'); 299 | assert.deepStrictEqual(beforeValue, seed.foo[0].bar); 300 | 301 | await settings.unset('foo[0].bar'); 302 | const afterValue = await settings.unset('foo[0].bar'); 303 | 304 | assert.deepStrictEqual(afterValue, undefined); 305 | }); 306 | }); 307 | }); 308 | 309 | describe('#unsetSync', () => { 310 | 311 | context('when no key path is given', () => { 312 | it('should unset all settings', () => { 313 | const seed = { foo: [{ bar: 'baz' }] }; 314 | 315 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 316 | 317 | settings.unsetSync(); 318 | const obj = settings.getSync(); 319 | 320 | assert.deepStrictEqual(obj, {}); 321 | }); 322 | }); 323 | 324 | context('when key path is given', () => { 325 | it('should unset the value at the key path', () => { 326 | const seed = { foo: [{ bar: 'baz' }] }; 327 | 328 | fs.writeFileSync(settings.file(), JSON.stringify(seed)); 329 | 330 | const beforeValue = settings.getSync('foo[0].bar'); 331 | assert.deepStrictEqual(beforeValue, seed.foo[0].bar); 332 | 333 | settings.unsetSync('foo[0].bar'); 334 | const afterValue = settings.getSync('foo[0].bar'); 335 | 336 | assert.deepStrictEqual(afterValue, undefined); 337 | }); 338 | }); 339 | }); 340 | }); 341 | 342 | describe('options', () => { 343 | 344 | describe('atomicSave', () => { 345 | 346 | context('when not given', () => { 347 | 348 | it('should not reject when saving', async () => { 349 | await settings.set('foo', 'bar'); 350 | }); 351 | 352 | it('should not throw when saving synchronously', () => { 353 | settings.setSync('foo', 'bar'); 354 | }); 355 | }); 356 | 357 | context('when false', () => { 358 | 359 | it('should not reject when saving', async () => { 360 | await settings.set('foo', 'bar'); 361 | }); 362 | 363 | it('should not throw when saving synchronously', () => { 364 | settings.setSync('foo', 'bar'); 365 | }); 366 | }); 367 | }); 368 | 369 | describe('dir', () => { 370 | 371 | context('when not given', () => { 372 | 373 | it('should save to the user data path', (done) => { 374 | const filePath = path.join(getUserDataPath(), 'settings.json'); 375 | 376 | settings.reset(); 377 | 378 | assert.deepStrictEqual(filePath, settings.file()); 379 | 380 | settings.set('foo', 'bar').then(() => { 381 | // If this errors, then the file does not exist. 382 | fs.stat(filePath, (err) => { 383 | assert.ifError(err); 384 | done(); 385 | }); 386 | }); 387 | }); 388 | }); 389 | 390 | context('when given', () => { 391 | 392 | it('should save to the given directory', (done) => { 393 | const dir = createTestDir(); 394 | const filePath = path.join(dir, 'settings.json'); 395 | 396 | settings.configure({ dir }); 397 | 398 | assert.deepStrictEqual(filePath, settings.file()); 399 | 400 | settings.set('foo', 'bar').then(() => { 401 | // If this errors, then the file does not exist. 402 | fs.stat(filePath, (err) => { 403 | assert.ifError(err); 404 | done(); 405 | }); 406 | }); 407 | }); 408 | 409 | it('should create the given directory if it does not exist', (done) => { 410 | const testDir = createTestDir(); 411 | const filePath = path.join(testDir, 'settings.json'); 412 | 413 | settings.configure({ dir: testDir }); 414 | 415 | settings.set('foo', 'bar').then(() => { 416 | // If this errors, then the file does not exist. 417 | fs.stat(filePath, (err) => { 418 | assert.ifError(err); 419 | done(); 420 | }); 421 | }); 422 | }); 423 | 424 | it('should create the given directory synchronously if it does not exist', () => { 425 | const testDir = createTestDir(); 426 | const filePath = path.join(testDir, 'settings.json'); 427 | 428 | settings.configure({ dir: testDir }); 429 | settings.setSync('foo', 'bar'); 430 | 431 | // If this throws, then the file does not exist. 432 | fs.statSync(filePath); 433 | }); 434 | }); 435 | }); 436 | 437 | describe('fileName', () => { 438 | 439 | context('when not given', () => { 440 | 441 | it('should save to "settings.json"', (done) => { 442 | assert.deepStrictEqual(settings.file(), path.join(dir, 'settings.json')); 443 | 444 | settings.set('foo', 'bar').then(() => { 445 | fs.readFile(path.join(dir, 'settings.json'), 'utf-8', (err, data) => { 446 | assert.ifError(err); 447 | assert.ok(/^{"foo":"bar"}$/.test(data)); 448 | done(); 449 | }); 450 | }); 451 | }); 452 | }); 453 | 454 | context('when "test.json"', () => { 455 | 456 | it('should save to "test.json"', (done) => { 457 | const fileName = 'test.json'; 458 | 459 | settings.configure({ fileName }); 460 | 461 | assert.deepStrictEqual(settings.file(), path.join(dir, fileName)); 462 | 463 | settings.set('foo', 'bar').then(() => { 464 | fs.readFile(path.join(dir, fileName), 'utf-8', (err, data) => { 465 | assert.ifError(err); 466 | assert.ok(/^{"foo":"bar"}$/.test(data)); 467 | done(); 468 | }); 469 | }); 470 | }); 471 | }); 472 | }); 473 | 474 | describe('prettify', () => { 475 | 476 | context('when not given', () => { 477 | 478 | it('should not prettify the output when saving', (done) => { 479 | settings.set('foo', 'bar').then(() => { 480 | fs.readFile(settings.file(), 'utf-8', (err, data) => { 481 | assert.ifError(err); 482 | assert.ok(/^{"foo":"bar"}$/.test(data)); 483 | done(); 484 | }); 485 | }); 486 | }); 487 | }); 488 | 489 | context('when true', () => { 490 | 491 | it('should prettify the output when saving', (done) => { 492 | settings.configure({ prettify: true }); 493 | 494 | settings.set('foo', 'bar').then(() => { 495 | fs.readFile(settings.file(), 'utf-8', (err, data) => { 496 | assert.ifError(err); 497 | assert.ok(/^{\n\s+"foo":\s"bar"\n}$/.test(data)); 498 | done(); 499 | }); 500 | }); 501 | }); 502 | }); 503 | }); 504 | 505 | describe('numSpaces', () => { 506 | 507 | context('when not given', () => { 508 | 509 | it('should prettify the output with two spaces when saving', (done) => { 510 | settings.configure({ prettify: true, numSpaces: 2 }); 511 | 512 | settings.set('foo', 'bar').then(() => { 513 | fs.readFile(settings.file(), 'utf-8', (err, data) => { 514 | assert.ifError(err); 515 | assert.ok(/^{\n(\s){2}"foo": "bar"\n}$/.test(data)); 516 | done(); 517 | }); 518 | }); 519 | }); 520 | }); 521 | 522 | context('when 4', () => { 523 | 524 | it('should prettify the output with four spaces when saving', (done) => { 525 | settings.configure({ prettify: true, numSpaces: 4 }); 526 | 527 | settings.set('foo', 'bar').then(() => { 528 | fs.readFile(settings.file(), 'utf-8', (err, data) => { 529 | assert.ifError(err); 530 | assert.ok(/^{\n(\s){4}"foo": "bar"\n}$/.test(data)); 531 | done(); 532 | }); 533 | }); 534 | }); 535 | }); 536 | }); 537 | }); 538 | }); 539 | -------------------------------------------------------------------------------- /src/settings.ts: -------------------------------------------------------------------------------- 1 | import electron from 'electron'; 2 | import fs from 'fs'; 3 | import mkdirp from 'mkdirp'; 4 | import path from 'path'; 5 | import writeFileAtomic from 'write-file-atomic'; 6 | import { 7 | get as _get, has as _has, set as _set, unset as _unset, 8 | } from 'lodash'; 9 | 10 | /** 11 | * At the basic level, a key path is the string equivalent 12 | * of dot notation in JavaScript. Take the following object, 13 | * for example: 14 | * 15 | * const obj = { 16 | * color: { 17 | * name: 'cerulean', 18 | * code: { 19 | * rgb: [0, 179, 230], 20 | * hex: '#003BE6' 21 | * } 22 | * } 23 | * } 24 | * 25 | * You can access the value of the key `name` in plain 26 | * JavaScript by traversing the tree using object dot 27 | * notation, like so: 28 | * 29 | * console.log(obj.color.name); 30 | * // => "cerulean" 31 | * 32 | * Similarly in Electron Settings, you are reading and 33 | * writing to a JSON object in a file, and a key path is 34 | * just a string that points to a specific key within that 35 | * object -- essentially using object dot notation in 36 | * string form. 37 | * 38 | * settings.get('color.name'); 39 | * // => "cerulean" 40 | * 41 | * Key paths need not be just strings. In fact, there are 42 | * perfectly valid use-cases where you might need to access 43 | * a key, but the name of the key is stored in some 44 | * variable. In this case, you can specify an array of 45 | * strings which can be flattened into a regular key path. 46 | * 47 | * const h = 'hue'; 48 | * settings.get(['color', h]); 49 | * // => undefined 50 | * 51 | * Additionally, since Electron Settings uses Lodash's 52 | * {@link https://lodash.com/docs/4.17.15#get|get()} 53 | * function under the hood, you can even use array syntax: 54 | * 55 | * settings.get('color.code.rgb[1]'); 56 | * // => 179 57 | * 58 | * Using key paths, you are not limited to setting only 59 | * top-level keys like you would be with LocalStorage. With 60 | * Electron Settings, you can deeply nest properties like 61 | * you would with any other object in JavaScript, and it 62 | * just feels natural. 63 | */ 64 | type KeyPath = string | Array; 65 | 66 | /** 67 | * `SettingsValue` types are the datatypes supported by 68 | * Electron Settings. Since Electron Settings reads and 69 | * writes to a JSON file, any value you set must be a valid 70 | * JSON value. This does however mean that `Date` types are 71 | * _not_ supported. 72 | * 73 | * Either simply store a numeric unix timestamp using 74 | * `Date.now()`, or convert dates back into `Date` types 75 | * using `new Date()`: 76 | * 77 | * await settings.set('user.lastLogin', new Date()); 78 | * 79 | * const lastLogin = await settings.get('user.lastLogin'); 80 | * const lastLoginDate = new Date(lastLogin); 81 | */ 82 | type SettingsValue = null | boolean | string | number | SettingsObject | SettingsValue[]; 83 | 84 | /** 85 | * A `SettingsObject` is an object whose property values 86 | * are of the type `SettingsValue`. 87 | */ 88 | type SettingsObject = { 89 | [key: string]: SettingsValue; 90 | }; 91 | 92 | /** 93 | * `Config` types contain all the configuration options for 94 | * Electron Settings that can be set using 95 | * [[configure|configure()]]. 96 | */ 97 | type Config = { 98 | 99 | /** 100 | * Whether or not to save the settings file atomically. 101 | */ 102 | atomicSave: boolean; 103 | 104 | /** 105 | * The path to the settings directory. Defaults to your 106 | * app's user data direcory. 107 | */ 108 | dir?: string; 109 | 110 | /** 111 | * A custom Electron instance to use. Great for testing! 112 | */ 113 | electron?: typeof Electron; 114 | 115 | /** 116 | * The name of the settings file that will be saved to 117 | * the disk. 118 | */ 119 | fileName: string; 120 | 121 | /** 122 | * The number of spaces to use when stringifying the data 123 | * before saving to disk if `prettify` is set to `true`. 124 | */ 125 | numSpaces: number; 126 | 127 | /** 128 | * Whether or not to prettify the data when it's saved to 129 | * disk. 130 | */ 131 | prettify: boolean; 132 | }; 133 | 134 | /** @internal */ 135 | const defaultConfig: Config = { 136 | atomicSave: true, 137 | fileName: 'settings.json', 138 | numSpaces: 2, 139 | prettify: false, 140 | }; 141 | 142 | /** @internal */ 143 | let config: Config = { 144 | ...defaultConfig, 145 | }; 146 | 147 | /** 148 | * Returns the Electron instance. The developer may define 149 | * a custom Electron instance by using `configure()`. 150 | * 151 | * @returns The Electron instance. 152 | * @internal 153 | */ 154 | function getElectron(): typeof Electron { 155 | return config.electron ?? electron; 156 | } 157 | 158 | /** 159 | * Returns the Electron app. The app may need be accessed 160 | * via `Remote` depending on whether this code is running 161 | * in the main or renderer process. 162 | * 163 | * @returns The Electron app. 164 | * @internal 165 | */ 166 | function getElectronApp(): Electron.App { 167 | const e = getElectron(); 168 | const app = e.app ?? e.remote.app; 169 | 170 | return app; 171 | } 172 | 173 | /** 174 | * Returns the path to the settings directory. The path 175 | * may be customized by the developer by using 176 | * `configure()`. 177 | * 178 | * @returns The path to the settings directory. 179 | * @internal 180 | */ 181 | function getSettingsDirPath(): string { 182 | return config.dir ?? getElectronApp().getPath('userData'); 183 | } 184 | 185 | /** 186 | * Returns the path to the settings file. The file name 187 | * may be customized by the developer using `configure()`. 188 | * 189 | * @returns The path to the settings file. 190 | * @internal 191 | */ 192 | function getSettingsFilePath(): string { 193 | const dir = getSettingsDirPath(); 194 | 195 | return path.join(dir, config.fileName); 196 | } 197 | 198 | /** 199 | * Ensures that the settings file exists. If it does not 200 | * exist, then it is created. 201 | * 202 | * @returns A promise which resolves when the settings file exists. 203 | * @internal 204 | */ 205 | function ensureSettingsFile(): Promise { 206 | const filePath = getSettingsFilePath(); 207 | 208 | return new Promise((resolve, reject) => { 209 | fs.stat(filePath, (err) => { 210 | if (err) { 211 | if (err.code === 'ENOENT') { 212 | saveSettings({}).then(resolve, reject); 213 | } else { 214 | reject(err); 215 | } 216 | } else { 217 | resolve(); 218 | } 219 | }); 220 | }); 221 | } 222 | 223 | /** 224 | * Ensures that the settings file exists. If it does not 225 | * exist, then it is created. 226 | * 227 | * @internal 228 | */ 229 | function ensureSettingsFileSync(): void { 230 | const filePath = getSettingsFilePath(); 231 | 232 | try { 233 | fs.statSync(filePath); 234 | } catch (err) { 235 | const e = err as NodeJS.ErrnoException; 236 | if (e) { 237 | if (e.code === 'ENOENT') { 238 | saveSettingsSync({}); 239 | } else { 240 | throw err; 241 | } 242 | } 243 | } 244 | } 245 | 246 | /** 247 | * Ensures that the settings directory exists. If it does 248 | * not exist, then it is created. 249 | * 250 | * @returns A promise which resolves when the settings dir exists. 251 | * @internal 252 | */ 253 | function ensureSettingsDir(): Promise { 254 | const dirPath = getSettingsDirPath(); 255 | 256 | return new Promise((resolve, reject) => { 257 | fs.stat(dirPath, (err) => { 258 | if (err) { 259 | if (err.code === 'ENOENT') { 260 | mkdirp(dirPath).then(() => resolve(), reject); 261 | } else { 262 | reject(err); 263 | } 264 | } else { 265 | resolve(); 266 | } 267 | }); 268 | }); 269 | } 270 | 271 | /** 272 | * Ensures that the settings directory exists. If it does 273 | * not exist, then it is created. 274 | * 275 | * @internal 276 | */ 277 | function ensureSettingsDirSync(): void { 278 | const dirPath = getSettingsDirPath(); 279 | 280 | try { 281 | fs.statSync(dirPath); 282 | } catch (err) { 283 | const e = err as NodeJS.ErrnoException; 284 | if (e) { 285 | if (e.code === 'ENOENT') { 286 | mkdirp.sync(dirPath); 287 | } 288 | } else { 289 | throw err; 290 | } 291 | } 292 | } 293 | 294 | /** 295 | * First ensures that the settings file exists then loads 296 | * the settings from the disk. 297 | * 298 | * @returns A promise which resolves with the settings object. 299 | * @internal 300 | */ 301 | function loadSettings(): Promise { 302 | return ensureSettingsFile().then(() => { 303 | const filePath = getSettingsFilePath(); 304 | 305 | return new Promise((resolve, reject) => { 306 | fs.readFile(filePath, 'utf-8', (err, data) => { 307 | if (err) { 308 | reject(err); 309 | } else { 310 | try { 311 | resolve(JSON.parse(data)); 312 | } catch (err) { 313 | reject(err); 314 | } 315 | } 316 | }); 317 | }); 318 | }); 319 | } 320 | 321 | /** 322 | * First ensures that the settings file exists then loads 323 | * the settings from the disk. 324 | * 325 | * @returns The settings object. 326 | * @internal 327 | */ 328 | function loadSettingsSync(): SettingsObject { 329 | const filePath = getSettingsFilePath(); 330 | 331 | ensureSettingsFileSync(); 332 | 333 | const data = fs.readFileSync(filePath, 'utf-8'); 334 | 335 | return JSON.parse(data); 336 | } 337 | 338 | /** 339 | * Saves the settings to the disk. 340 | * 341 | * @param obj The settings object to save. 342 | * @returns A promise which resolves when the settings have been saved. 343 | * @internal 344 | */ 345 | function saveSettings(obj: SettingsObject): Promise { 346 | return ensureSettingsDir().then(() => { 347 | const filePath = getSettingsFilePath(); 348 | const numSpaces = config.prettify ? config.numSpaces : 0; 349 | const data = JSON.stringify(obj, null, numSpaces); 350 | 351 | return new Promise((resolve, reject) => { 352 | if (config.atomicSave) { 353 | writeFileAtomic(filePath, data, (err) => { 354 | return err 355 | ? reject(err) 356 | : resolve(); 357 | }); 358 | } else { 359 | fs.writeFile(filePath, data, (err) => { 360 | return err 361 | ? reject(err) 362 | : resolve(); 363 | }); 364 | } 365 | }); 366 | }); 367 | } 368 | 369 | /** 370 | * Saves the settings to the disk. 371 | * 372 | * @param obj The settings object to save. 373 | * @internal 374 | */ 375 | function saveSettingsSync(obj: SettingsObject): void { 376 | const filePath = getSettingsFilePath(); 377 | const numSpaces = config.prettify ? config.numSpaces : 0; 378 | const data = JSON.stringify(obj, null, numSpaces); 379 | 380 | ensureSettingsDirSync(); 381 | 382 | if (config.atomicSave) { 383 | writeFileAtomic.sync(filePath, data); 384 | } else { 385 | fs.writeFileSync(filePath, data); 386 | } 387 | } 388 | 389 | /** 390 | * Returns the path to the settings file. 391 | * 392 | * In general, the settings file is stored in your app's 393 | * user data directory in a file called `settings.json`. 394 | * The default user data directory varies by system. 395 | * 396 | * - **macOS** - `~/Library/Application\ Support/` 397 | * - **Windows** - `%APPDATA%/` 398 | * - **Linux** - Either `$XDG_CONFIG_HOME/` or 399 | * `~/.config/` 400 | * 401 | * Although it is not recommended, you may change the name 402 | * or location of the settings file using 403 | * [[configure|configure()]]. 404 | * 405 | * @returns The path to the settings file. 406 | * @example 407 | * 408 | * Get the path to the settings file. 409 | * 410 | * settings.file(); 411 | * // => /home/nathan/.config/MyApp/settings.json 412 | */ 413 | function file(): string { 414 | return getSettingsFilePath(); 415 | } 416 | 417 | /** 418 | * Sets the configuration for Electron Settings. To reset 419 | * to defaults, use [[reset|reset()]]. 420 | * 421 | * Defaults: 422 | * 423 | * { 424 | * atomicSave: true, 425 | * fileName: 'settings.json', 426 | * numSpaces: 2, 427 | * prettify: false 428 | * } 429 | * 430 | * @param customConfig The custom configuration to use. 431 | * @example 432 | * 433 | * Update the filename to `cool-settings.json` and prettify 434 | * the output. 435 | * 436 | * settings.configure({ 437 | * fileName: 'cool-settings.json', 438 | * prettify: true 439 | * }); 440 | */ 441 | function configure(customConfig: Partial): void { 442 | config = { ...config, ...customConfig }; 443 | } 444 | 445 | /** 446 | * Resets the Electron Settings configuration to defaults. 447 | * 448 | * @example 449 | * 450 | * Reset configuration to defaults. 451 | * 452 | * settings.reset(); 453 | */ 454 | function reset(): void { 455 | config = { ...defaultConfig }; 456 | } 457 | 458 | /** 459 | * Checks if the given key path exists. For sync, 460 | * use [[hasSync|hasSync()]]. 461 | * 462 | * @category Core 463 | * @param keyPath The key path to check. 464 | * @returns A promise which resolves to `true` if the 465 | * `keyPath` exists, else `false`. 466 | * @example 467 | * 468 | * Check if the value at `color.name` exists. 469 | * 470 | * // Given: 471 | * // 472 | * // { 473 | * // "color": { 474 | * // "name": "cerulean", 475 | * // "code": { 476 | * // "rgb": [0, 179, 230], 477 | * // "hex": "#003BE6" 478 | * // } 479 | * // } 480 | * // } 481 | * 482 | * const exists = await settings.has('color.name'); 483 | * // => true 484 | * 485 | * @example 486 | * 487 | * Check if the value at `color.hue` exists. 488 | * 489 | * const h = 'hue'; 490 | * const exists = await settings.has(['color', h]); 491 | * // => false 492 | * 493 | * @example 494 | * 495 | * Check if the value at `color.code.rgb[1]` exists. 496 | * 497 | * const exists = await settings.has(color.code.rgb[1]); 498 | * // => true 499 | */ 500 | async function has(keyPath: KeyPath): Promise { 501 | const obj = await loadSettings(); 502 | 503 | return _has(obj, keyPath); 504 | } 505 | 506 | /** 507 | * Checks if the given key path exists. For async, 508 | * use [[hasSync|hasSync()]]. 509 | * 510 | * @category Core 511 | * @param keyPath The key path to check. 512 | * @returns `true` if the `keyPath` exists, else `false`. 513 | * @example 514 | * 515 | * Check if the value at `color.name` exists. 516 | * 517 | * // Given: 518 | * // 519 | * // { 520 | * // "color": { 521 | * // "name": "cerulean", 522 | * // "code": { 523 | * // "rgb": [0, 179, 230], 524 | * // "hex": "#003BE6" 525 | * // } 526 | * // } 527 | * // } 528 | * 529 | * const exists = settings.hasSync('color.name'); 530 | * // => true 531 | * 532 | * @example 533 | * 534 | * Check if the value at `color.hue` exists. 535 | * 536 | * const h = 'hue'; 537 | * const exists = settings.hasSync(['color', h]); 538 | * // => false 539 | * 540 | * @example 541 | * 542 | * Check if the value at `color.code.rgb[1]` exists. 543 | * 544 | * const exists = settings.hasSync(color.code.rgb[1]); 545 | * // => true 546 | */ 547 | function hasSync(keyPath: KeyPath): boolean { 548 | const obj = loadSettingsSync(); 549 | 550 | return _has(obj, keyPath); 551 | } 552 | 553 | /** 554 | * Gets all settings. For sync, use 555 | * [[getSync|getSync()]]. 556 | * 557 | * @category Core 558 | * @returns A promise which resolves with all settings. 559 | * @example 560 | * 561 | * Gets all settings. 562 | * 563 | * const obj = await get(); 564 | */ 565 | async function get(): Promise; 566 | 567 | /** 568 | * Gets the value at the given key path. For sync, 569 | * use [[getSync|getSync()]]. 570 | * 571 | * @category Core 572 | * @param keyPath The key path of the property. 573 | * @returns A promise which resolves with the value at the 574 | * given key path. 575 | * @example 576 | * 577 | * Get the value at `color.name`. 578 | * 579 | * // Given: 580 | * // 581 | * // { 582 | * // "color": { 583 | * // "name": "cerulean", 584 | * // "code": { 585 | * // "rgb": [0, 179, 230], 586 | * // "hex": "#003BE6" 587 | * // } 588 | * // } 589 | * // } 590 | * 591 | * const value = await settings.get('color.name'); 592 | * // => "cerulean" 593 | * 594 | * @example 595 | * 596 | * Get the value at `color.hue`. 597 | * 598 | * const h = 'hue'; 599 | * const value = await settings.get(['color', h]); 600 | * // => undefined 601 | * 602 | * @example 603 | * 604 | * Get the value at `color.code.rgb[1]`. 605 | * 606 | * const h = 'hue'; 607 | * const value = await settings.get('color.code.rgb[1]'); 608 | * // => 179 609 | */ 610 | async function get(keyPath: KeyPath): Promise; 611 | 612 | async function get(keyPath?: KeyPath): Promise { 613 | const obj = await loadSettings(); 614 | 615 | if (keyPath) { 616 | return _get(obj, keyPath); 617 | } else { 618 | return obj; 619 | } 620 | } 621 | 622 | /** 623 | * Gets all settings. For async, use [[get|get()]]. 624 | * 625 | * @category Core 626 | * @returns All settings. 627 | * @example 628 | * 629 | * Gets all settings. 630 | * 631 | * const obj = getSync(); 632 | */ 633 | function getSync(): SettingsObject; 634 | 635 | /** 636 | * Gets the value at the given key path. For async, 637 | * use [[get|get()]]. 638 | * 639 | * @category Core 640 | * @param keyPath The key path of the property. 641 | * @returns The value at the given key path. 642 | * @example 643 | * 644 | * Get the value at `color.name`. 645 | * 646 | * // Given: 647 | * // 648 | * // { 649 | * // "color": { 650 | * // "name": "cerulean", 651 | * // "code": { 652 | * // "rgb": [0, 179, 230], 653 | * // "hex": "#003BE6" 654 | * // } 655 | * // } 656 | * // } 657 | * 658 | * const value = settings.getSync('color.name'); 659 | * // => "cerulean" 660 | * 661 | * @example 662 | * 663 | * Get the value at `color.hue`. 664 | * 665 | * const h = 'hue'; 666 | * const value = settings.getSync(['color', h]); 667 | * // => undefined 668 | * 669 | * @example 670 | * 671 | * Get the value at `color.code.rgb[1]`. 672 | * 673 | * const h = 'hue'; 674 | * const value = settings.getSync('color.code.rgb[1]'); 675 | * // => 179 676 | */ 677 | function getSync(keyPath: KeyPath): SettingsValue; 678 | 679 | function getSync(keyPath?: KeyPath): SettingsValue { 680 | const obj = loadSettingsSync(); 681 | 682 | if (keyPath) { 683 | return _get(obj, keyPath); 684 | } else { 685 | return obj; 686 | } 687 | } 688 | 689 | /** 690 | * Sets all settings. For sync, use [[setSync|setSync()]]. 691 | * 692 | * @category Core 693 | * @param obj The new settings. 694 | * @returns A promise which resolves when the settings have 695 | * been set. 696 | * @example 697 | * 698 | * Set all settings. 699 | * 700 | * await settings.set({ aqpw: 'nice' }); 701 | */ 702 | async function set(obj: SettingsObject): Promise; 703 | 704 | /** 705 | * Sets the value at the given key path. For sync, 706 | * use [[setSync|setSync()]]. 707 | * 708 | * @category Core 709 | * @param keyPath The key path of the property. 710 | * @param value The value to set. 711 | * @returns A promise which resolves when the setting has 712 | * been set. 713 | * @example 714 | * 715 | * Change the value at `color.name` to `sapphire`. 716 | * 717 | * // Given: 718 | * // 719 | * // { 720 | * // "color": { 721 | * // "name": "cerulean", 722 | * // "code": { 723 | * // "rgb": [0, 179, 230], 724 | * // "hex": "#003BE6" 725 | * // } 726 | * // } 727 | * // } 728 | * 729 | * await settings.set('color.name', 'sapphire'); 730 | * 731 | * @example 732 | * 733 | * Set the value of `color.hue` to `blue-ish`. 734 | * 735 | * const h = 'hue'; 736 | * await settings.set(['color', h], 'blue-ish); 737 | * 738 | * @example 739 | * 740 | * Change the value of `color.code`. 741 | * 742 | * await settings.set('color.code', { 743 | * rgb: [16, 31, 134], 744 | * hex: '#101F86' 745 | * }); 746 | */ 747 | async function set(keyPath: KeyPath, obj: SettingsValue): Promise; 748 | 749 | async function set(...args: [SettingsObject] | [KeyPath, SettingsValue]): Promise { 750 | if (args.length === 1) { 751 | const [value] = args; 752 | 753 | return saveSettings(value); 754 | } else { 755 | const [keyPath, value] = args; 756 | const obj = await loadSettings(); 757 | 758 | _set(obj, keyPath, value); 759 | 760 | return saveSettings(obj); 761 | } 762 | } 763 | 764 | /** 765 | * Sets all settings. For async, use [[set|set()]]. 766 | * 767 | * @category Core 768 | * @param obj The new settings. 769 | * @example 770 | * 771 | * Set all settings. 772 | * 773 | * settings.setSync({ aqpw: 'nice' }); 774 | */ 775 | function setSync(obj: SettingsObject): void; 776 | 777 | /** 778 | * Sets the value at the given key path. For async, 779 | * use [[set|set()]]. 780 | * 781 | * @category Core 782 | * @param keyPath The key path of the property. 783 | * @param value The value to set. 784 | * @example 785 | * 786 | * Change the value at `color.name` to `sapphire`. 787 | * 788 | * // Given: 789 | * // 790 | * // { 791 | * // "color": { 792 | * // "name": "cerulean", 793 | * // "code": { 794 | * // "rgb": [0, 179, 230], 795 | * // "hex": "#003BE6" 796 | * // } 797 | * // } 798 | * // } 799 | * 800 | * settings.setSync('color.name', 'sapphire'); 801 | * 802 | * @example 803 | * 804 | * Set the value of `color.hue` to `blue-ish`. 805 | * 806 | * const h = 'hue'; 807 | * settings.setSync(['color', h], 'blue-ish); 808 | * 809 | * @example 810 | * 811 | * Change the value of `color.code`. 812 | * 813 | * settings.setSync('color.code', { 814 | * rgb: [16, 31, 134], 815 | * hex: '#101F86' 816 | * }); 817 | */ 818 | function setSync(keyPath: KeyPath, value: SettingsValue): void; 819 | 820 | function setSync(...args: [SettingsObject] | [KeyPath, SettingsValue]): void { 821 | if (args.length === 1) { 822 | const [value] = args; 823 | 824 | saveSettingsSync(value); 825 | } else { 826 | const [keyPath, value] = args; 827 | const obj = loadSettingsSync(); 828 | 829 | _set(obj, keyPath, value); 830 | 831 | saveSettingsSync(obj); 832 | } 833 | } 834 | 835 | /** 836 | * Unsets all settings. For sync, use [[unsetSync|unsetSync()]]. 837 | * 838 | * @category Core 839 | * @returns A promise which resolves when the settings have 840 | * been unset. 841 | * @example 842 | * 843 | * Unsets all settings. 844 | * 845 | * await settings.unset(); 846 | */ 847 | async function unset(): Promise; 848 | 849 | /** 850 | * Unsets the property at the given key path. For sync, 851 | * use [[unsetSync|unsetSync()]]. 852 | * 853 | * @category Core 854 | * @param keyPath The key path of the property. 855 | * @returns A promise which resolves when the setting has 856 | * been unset. 857 | * @example 858 | * 859 | * Unset the property `color.name`. 860 | * 861 | * // Given: 862 | * // 863 | * // { 864 | * // "color": { 865 | * // "name": "cerulean", 866 | * // "code": { 867 | * // "rgb": [0, 179, 230], 868 | * // "hex": "#003BE6" 869 | * // } 870 | * // } 871 | * // } 872 | * 873 | * await settings.unset('color.name'); 874 | * 875 | * await settings.get('color.name'); 876 | * // => undefined 877 | * 878 | * @example 879 | * 880 | * Unset the property `color.code.rgba[1]`. 881 | * 882 | * await settings.unset('color.code.rgba[1]'); 883 | * 884 | * await settings.get('color.code.rgb'); 885 | * // => [0, null, 230] 886 | */ 887 | async function unset(keyPath: KeyPath): Promise; 888 | 889 | async function unset(keyPath?: KeyPath): Promise { 890 | if (keyPath) { 891 | const obj = await loadSettings(); 892 | 893 | _unset(obj, keyPath); 894 | 895 | return saveSettings(obj); 896 | } else { 897 | // Unset all settings by saving empty object. 898 | return saveSettings({}); 899 | } 900 | } 901 | 902 | /** 903 | * Unsets all settings. For async, use [[unset|unset()]]. 904 | * 905 | * @category Core 906 | * @example 907 | * 908 | * Unsets all settings. 909 | * 910 | * settings.unsetSync(); 911 | */ 912 | function unsetSync(): void; 913 | 914 | /** 915 | * Unsets the property at the given key path. For async, 916 | * use [[unset|unset()]]. 917 | * 918 | * @category Core 919 | * @param keyPath The key path of the property. 920 | * @example 921 | * 922 | * Unset the property `color.name`. 923 | * 924 | * // Given: 925 | * // 926 | * // { 927 | * // "color": { 928 | * // "name": "cerulean", 929 | * // "code": { 930 | * // "rgb": [0, 179, 230], 931 | * // "hex": "#003BE6" 932 | * // } 933 | * // } 934 | * // } 935 | * 936 | * settings.unsetSync('color.name'); 937 | * 938 | * settings.getSync('color.name'); 939 | * // => undefined 940 | * 941 | * @example 942 | * 943 | * Unset the property `color.code.rgba[1]`. 944 | * 945 | * settings.unsetSync('color.code.rgba[1]'); 946 | * 947 | * settings.getSync('color.code.rgb'); 948 | * // => [0, null, 230] 949 | */ 950 | function unsetSync(keyPath: KeyPath): void; 951 | 952 | function unsetSync(keyPath?: KeyPath): void { 953 | if (keyPath) { 954 | const obj = loadSettingsSync(); 955 | 956 | _unset(obj, keyPath); 957 | 958 | saveSettingsSync(obj); 959 | } else { 960 | // Unset all settings by saving empty object. 961 | saveSettingsSync({}); 962 | } 963 | } 964 | 965 | export = { 966 | file, 967 | configure, 968 | reset, 969 | has, 970 | hasSync, 971 | get, 972 | getSync, 973 | set, 974 | setSync, 975 | unset, 976 | unsetSync, 977 | }; 978 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "module": "CommonJS", 5 | "target": "ES5", 6 | "outDir": "dist", 7 | "declaration": true, 8 | "sourceMap": true, 9 | "esModuleInterop": true, 10 | "skipLibCheck": true 11 | }, 12 | "include": [ 13 | "src/**/*" 14 | ], 15 | "exclude": [ 16 | "**/*.test.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Electron Settings", 3 | "includeVersion": true, 4 | "includes": "src", 5 | "exclude": "**/*.test.ts", 6 | "out": "docs", 7 | "readme": "none" 8 | } 9 | --------------------------------------------------------------------------------