From 38573a0df13e760e811fddd75d5b3c0eae55ed25 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Fri, 7 Dec 2018 19:26:26 +0100 Subject: [PATCH 01/20] Add typescript example --- example/gallery-ts/index.ts | 10 + example/gallery-ts/package-lock.json | 5439 ++++++++++++++++++++++++++ example/gallery-ts/package.json | 19 + 3 files changed, 5468 insertions(+) create mode 100644 example/gallery-ts/index.ts create mode 100644 example/gallery-ts/package-lock.json create mode 100644 example/gallery-ts/package.json diff --git a/example/gallery-ts/index.ts b/example/gallery-ts/index.ts new file mode 100644 index 0000000..20ef992 --- /dev/null +++ b/example/gallery-ts/index.ts @@ -0,0 +1,10 @@ +import {startLoop, stopLoop, UiWindow} from 'libui-napi'; + + +const win = new UiWindow('Using libui-node with TypeScript', 800, 600, false); +win.onClosing(() => { + win.close(); + stopLoop(); +}); +win.show(); +startLoop(); diff --git a/example/gallery-ts/package-lock.json b/example/gallery-ts/package-lock.json new file mode 100644 index 0000000..aad4d40 --- /dev/null +++ b/example/gallery-ts/package-lock.json @@ -0,0 +1,5439 @@ +{ + "name": "gallery-ts", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "libui-napi": { + "version": "file:../..", + "requires": { + "@creditkarma/async-hooks": "0.0.4", + "cachedir": "^2.1.0", + "debug": "^3.1.0", + "extract-zip": "^1.6.7", + "is-ci": "^1.1.0", + "mkdirp": "^0.5.1", + "mv": "^2.1.1", + "node-gyp": "^3.6.2", + "tar": "^4.4.1" + }, + "dependencies": { + "@ava/babel-plugin-throws-helper": { + "version": "2.0.0", + "bundled": true + }, + "@ava/babel-preset-stage-4": { + "version": "1.1.0", + "bundled": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.8.0", + "babel-plugin-syntax-trailing-function-commas": "^6.20.0", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-es2015-destructuring": "^6.19.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", + "babel-plugin-transform-es2015-parameters": "^6.21.0", + "babel-plugin-transform-es2015-spread": "^6.8.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", + "babel-plugin-transform-exponentiation-operator": "^6.8.0", + "package-hash": "^1.2.0" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "requires": { + "md5-o-matic": "^0.1.1" + } + }, + "package-hash": { + "version": "1.2.0", + "bundled": true, + "requires": { + "md5-hex": "^1.3.0" + } + } + } + }, + "@ava/babel-preset-transform-test-files": { + "version": "3.0.0", + "bundled": true, + "requires": { + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" + } + }, + "@ava/write-file-atomic": { + "version": "2.2.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, + "@concordance/react": { + "version": "1.0.0", + "bundled": true, + "requires": { + "arrify": "^1.0.1" + } + }, + "@creditkarma/async-hooks": { + "version": "0.0.4", + "bundled": true + }, + "@ladjs/time-require": { + "version": "0.1.4", + "bundled": true, + "requires": { + "chalk": "^0.4.0", + "date-time": "^0.1.1", + "pretty-ms": "^0.2.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "bundled": true + }, + "chalk": { + "version": "0.4.0", + "bundled": true, + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "pretty-ms": { + "version": "0.2.2", + "bundled": true, + "requires": { + "parse-ms": "^0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "bundled": true + } + } + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ajv": { + "version": "5.5.2", + "bundled": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "align-text": { + "version": "0.1.4", + "bundled": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true + }, + "ansi-align": { + "version": "2.0.0", + "bundled": true, + "requires": { + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "ansi-bgblack": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgblue": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgcyan": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bggreen": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgmagenta": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgred": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgwhite": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgyellow": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-black": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-blue": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bold": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-colors": { + "version": "0.2.0", + "bundled": true, + "requires": { + "ansi-bgblack": "^0.1.1", + "ansi-bgblue": "^0.1.1", + "ansi-bgcyan": "^0.1.1", + "ansi-bggreen": "^0.1.1", + "ansi-bgmagenta": "^0.1.1", + "ansi-bgred": "^0.1.1", + "ansi-bgwhite": "^0.1.1", + "ansi-bgyellow": "^0.1.1", + "ansi-black": "^0.1.1", + "ansi-blue": "^0.1.1", + "ansi-bold": "^0.1.1", + "ansi-cyan": "^0.1.1", + "ansi-dim": "^0.1.1", + "ansi-gray": "^0.1.1", + "ansi-green": "^0.1.1", + "ansi-grey": "^0.1.1", + "ansi-hidden": "^0.1.1", + "ansi-inverse": "^0.1.1", + "ansi-italic": "^0.1.1", + "ansi-magenta": "^0.1.1", + "ansi-red": "^0.1.1", + "ansi-reset": "^0.1.1", + "ansi-strikethrough": "^0.1.1", + "ansi-underline": "^0.1.1", + "ansi-white": "^0.1.1", + "ansi-yellow": "^0.1.1", + "lazy-cache": "^2.0.1" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "bundled": true, + "requires": { + "set-getter": "^0.1.0" + } + } + } + }, + "ansi-cyan": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-dim": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escape-sequences": { + "version": "4.0.0", + "bundled": true, + "requires": { + "array-back": "^2.0.0" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "bundled": true + }, + "ansi-gray": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-green": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-grey": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-hidden": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-inverse": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-italic": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-magenta": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "ansi-reset": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-strikethrough": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-underline": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-white": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "bundled": true + }, + "ansi-yellow": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "anymatch": { + "version": "1.3.2", + "bundled": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "bundled": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "argv-tools": { + "version": "0.1.1", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "find-replace": "^2.0.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-exclude": { + "version": "1.0.0", + "bundled": true + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true + }, + "arr-swap": { + "version": "1.0.1", + "bundled": true, + "requires": { + "is-number": "^3.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "array-back": { + "version": "2.0.0", + "bundled": true, + "requires": { + "typical": "^2.6.1" + } + }, + "array-differ": { + "version": "1.0.0", + "bundled": true + }, + "array-find-index": { + "version": "1.0.2", + "bundled": true + }, + "array-union": { + "version": "1.0.2", + "bundled": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "bundled": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true + }, + "asap": { + "version": "1.0.0", + "bundled": true + }, + "asn1": { + "version": "0.2.3", + "bundled": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true + }, + "async": { + "version": "1.5.2", + "bundled": true + }, + "async-each": { + "version": "1.0.1", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "auto-bind": { + "version": "1.2.0", + "bundled": true + }, + "ava": { + "version": "0.25.0", + "bundled": true, + "requires": { + "@ava/babel-preset-stage-4": "^1.1.0", + "@ava/babel-preset-transform-test-files": "^3.0.0", + "@ava/write-file-atomic": "^2.2.0", + "@concordance/react": "^1.0.0", + "@ladjs/time-require": "^0.1.4", + "ansi-escapes": "^3.0.0", + "ansi-styles": "^3.1.0", + "arr-flatten": "^1.0.1", + "array-union": "^1.0.1", + "array-uniq": "^1.0.2", + "arrify": "^1.0.0", + "auto-bind": "^1.1.0", + "ava-init": "^0.2.0", + "babel-core": "^6.17.0", + "babel-generator": "^6.26.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "bluebird": "^3.0.0", + "caching-transform": "^1.0.0", + "chalk": "^2.0.1", + "chokidar": "^1.4.2", + "clean-stack": "^1.1.1", + "clean-yaml-object": "^0.1.0", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.0.0", + "cli-truncate": "^1.0.0", + "co-with-promise": "^4.6.0", + "code-excerpt": "^2.1.1", + "common-path-prefix": "^1.0.0", + "concordance": "^3.0.0", + "convert-source-map": "^1.5.1", + "core-assert": "^0.2.0", + "currently-unhandled": "^0.4.1", + "debug": "^3.0.1", + "dot-prop": "^4.1.0", + "empower-core": "^0.6.1", + "equal-length": "^1.0.0", + "figures": "^2.0.0", + "find-cache-dir": "^1.0.0", + "fn-name": "^2.0.0", + "get-port": "^3.0.0", + "globby": "^6.0.0", + "has-flag": "^2.0.0", + "hullabaloo-config-manager": "^1.1.0", + "ignore-by-default": "^1.0.0", + "import-local": "^0.1.1", + "indent-string": "^3.0.0", + "is-ci": "^1.0.7", + "is-generator-fn": "^1.0.0", + "is-obj": "^1.0.0", + "is-observable": "^1.0.0", + "is-promise": "^2.1.0", + "last-line-stream": "^1.0.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.debounce": "^4.0.3", + "lodash.difference": "^4.3.0", + "lodash.flatten": "^4.2.0", + "loud-rejection": "^1.2.0", + "make-dir": "^1.0.0", + "matcher": "^1.0.0", + "md5-hex": "^2.0.0", + "meow": "^3.7.0", + "ms": "^2.0.0", + "multimatch": "^2.1.0", + "observable-to-promise": "^0.5.0", + "option-chain": "^1.0.0", + "package-hash": "^2.0.0", + "pkg-conf": "^2.0.0", + "plur": "^2.0.0", + "pretty-ms": "^3.0.0", + "require-precompiled": "^0.1.0", + "resolve-cwd": "^2.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "slash": "^1.0.0", + "source-map-support": "^0.5.0", + "stack-utils": "^1.0.1", + "strip-ansi": "^4.0.0", + "strip-bom-buf": "^1.0.0", + "supertap": "^1.0.0", + "supports-color": "^5.0.0", + "trim-off-newlines": "^1.0.1", + "unique-temp-dir": "^1.0.0", + "update-notifier": "^2.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "semver": { + "version": "5.5.0", + "bundled": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "ava-init": { + "version": "0.2.1", + "bundled": true, + "requires": { + "arr-exclude": "^1.0.0", + "execa": "^0.7.0", + "has-yarn": "^1.0.0", + "read-pkg-up": "^2.0.0", + "write-pkg": "^3.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "bundled": true + }, + "aws4": { + "version": "1.7.0", + "bundled": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true + } + } + }, + "babel-core": { + "version": "6.26.3", + "bundled": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "bundled": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "bundled": true + } + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-espower": { + "version": "2.4.0", + "bundled": true, + "requires": { + "babel-generator": "^6.1.0", + "babylon": "^6.1.0", + "call-matcher": "^1.0.0", + "core-js": "^2.0.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.1.1" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "bundled": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "bundled": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "bundled": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "bundled": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "bundled": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "bundled": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "bundled": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "bundled": true, + "requires": { + "source-map": "^0.5.6" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "1.11.0", + "bundled": true + }, + "blink-diff": { + "version": "1.0.13", + "bundled": true, + "requires": { + "pngjs-image": "~0.11.5", + "preceptor-core": "~0.10.0", + "promise": "6.0.0" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "bluebird": { + "version": "3.5.1", + "bundled": true + }, + "boxen": { + "version": "1.3.0", + "bundled": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "camelcase": { + "version": "4.1.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "buf-compare": { + "version": "1.0.1", + "bundled": true + }, + "buffer-from": { + "version": "1.1.0", + "bundled": true + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true + }, + "cache-point": { + "version": "0.4.1", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "fs-then-native": "^2.0.0", + "mkdirp2": "^1.0.3" + } + }, + "cachedir": { + "version": "2.1.0", + "bundled": true + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "requires": { + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "requires": { + "md5-o-matic": "^0.1.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "call-matcher": { + "version": "1.0.1", + "bundled": true, + "requires": { + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" + } + }, + "call-signature": { + "version": "0.0.2", + "bundled": true + }, + "camelcase": { + "version": "2.1.1", + "bundled": true + }, + "camelcase-keys": { + "version": "2.1.0", + "bundled": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "catharsis": { + "version": "0.8.9", + "bundled": true, + "requires": { + "underscore-contrib": "~0.3.0" + } + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "2.4.1", + "bundled": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "choices-separator": { + "version": "2.0.0", + "bundled": true, + "requires": { + "ansi-dim": "^0.1.1", + "debug": "^2.6.6", + "strip-color": "^0.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "chokidar": { + "version": "1.7.0", + "bundled": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true + }, + "ci-info": { + "version": "1.1.3", + "bundled": true + }, + "clang-format": { + "version": "1.2.3", + "bundled": true, + "requires": { + "async": "^1.5.2", + "glob": "^7.0.0", + "resolve": "^1.1.6" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "clean-stack": { + "version": "1.3.0", + "bundled": true + }, + "clean-yaml-object": { + "version": "0.1.0", + "bundled": true + }, + "cli-boxes": { + "version": "1.0.0", + "bundled": true + }, + "cli-cursor": { + "version": "2.1.0", + "bundled": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "1.3.1", + "bundled": true + }, + "cli-truncate": { + "version": "1.1.0", + "bundled": true, + "requires": { + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "optional": true + } + } + }, + "clone-deep": { + "version": "1.0.0", + "bundled": true, + "requires": { + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^5.0.0", + "shallow-clone": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "bundled": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true + } + } + }, + "co": { + "version": "4.6.0", + "bundled": true + }, + "co-with-promise": { + "version": "4.6.0", + "bundled": true, + "requires": { + "pinkie-promise": "^1.0.0" + } + }, + "code-excerpt": { + "version": "2.1.1", + "bundled": true, + "requires": { + "convert-to-spaces": "^1.0.1" + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "collect-all": { + "version": "1.0.3", + "bundled": true, + "requires": { + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + } + }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.1", + "bundled": true, + "requires": { + "color-name": "^1.1.1" + } + }, + "color-name": { + "version": "1.1.3", + "bundled": true + }, + "combined-stream": { + "version": "1.0.6", + "bundled": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "command-line-args": { + "version": "5.0.2", + "bundled": true, + "requires": { + "argv-tools": "^0.1.1", + "array-back": "^2.0.0", + "find-replace": "^2.0.1", + "lodash.camelcase": "^4.3.0", + "typical": "^2.6.1" + } + }, + "command-line-tool": { + "version": "0.8.0", + "bundled": true, + "requires": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "command-line-args": "^5.0.0", + "command-line-usage": "^4.1.0", + "typical": "^2.6.1" + } + }, + "command-line-usage": { + "version": "4.1.0", + "bundled": true, + "requires": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "table-layout": "^0.4.2", + "typical": "^2.6.1" + } + }, + "common-path-prefix": { + "version": "1.0.0", + "bundled": true + }, + "common-sequence": { + "version": "1.0.2", + "bundled": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true + }, + "component-emitter": { + "version": "1.2.1", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "concat-stream": { + "version": "1.6.2", + "bundled": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concordance": { + "version": "3.0.0", + "bundled": true, + "requires": { + "date-time": "^2.1.0", + "esutils": "^2.0.2", + "fast-diff": "^1.1.1", + "function-name-support": "^0.2.0", + "js-string-escape": "^1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.flattendeep": "^4.4.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "semver": "^5.3.0", + "well-known-symbols": "^1.0.0" + }, + "dependencies": { + "date-time": { + "version": "2.1.0", + "bundled": true, + "requires": { + "time-zone": "^1.0.0" + } + } + } + }, + "config-master": { + "version": "3.1.0", + "bundled": true, + "requires": { + "walk-back": "^2.0.1" + }, + "dependencies": { + "walk-back": { + "version": "2.0.1", + "bundled": true + } + } + }, + "configstore": { + "version": "3.1.2", + "bundled": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true + }, + "convert-to-spaces": { + "version": "1.0.2", + "bundled": true + }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true + }, + "core-assert": { + "version": "0.2.1", + "bundled": true, + "requires": { + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" + } + }, + "core-js": { + "version": "2.5.7", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "create-error-class": { + "version": "3.0.2", + "bundled": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "cross-env": { + "version": "5.1.6", + "bundled": true, + "requires": { + "cross-spawn": "^5.1.0", + "is-windows": "^1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "bundled": true + }, + "currently-unhandled": { + "version": "0.4.1", + "bundled": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-format": { + "version": "0.0.0", + "bundled": true + }, + "date-time": { + "version": "0.1.1", + "bundled": true + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true + }, + "deep-equal": { + "version": "1.0.1", + "bundled": true + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true + }, + "define-properties": { + "version": "1.1.2", + "bundled": true, + "requires": { + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "define-property": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "defined": { + "version": "1.0.0", + "bundled": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-indent": { + "version": "4.0.0", + "bundled": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "dmd": { + "version": "3.0.12", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "cache-point": "^0.4.1", + "common-sequence": "^1.0.2", + "file-set": "^2.0.0", + "handlebars": "^4.0.11", + "marked": "^0.3.16", + "object-get": "^2.1.0", + "reduce-flatten": "^1.0.1", + "reduce-unique": "^1.0.0", + "reduce-without": "^1.0.1", + "test-value": "^3.0.0", + "walk-back": "^3.0.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "bundled": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer": { + "version": "0.1.1", + "bundled": true + }, + "duplexer3": { + "version": "0.1.4", + "bundled": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "empower-core": { + "version": "0.6.2", + "bundled": true, + "requires": { + "call-signature": "0.0.2", + "core-js": "^2.0.0" + } + }, + "equal-length": { + "version": "1.0.1", + "bundled": true + }, + "error-ex": { + "version": "1.3.1", + "bundled": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-symbol": { + "version": "0.1.0", + "bundled": true + }, + "es-abstract": { + "version": "1.12.0", + "bundled": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "bundled": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es6-error": { + "version": "4.1.1", + "bundled": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true + }, + "espower-location-detector": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-url": "^1.2.1", + "path-is-absolute": "^1.0.0", + "source-map": "^0.5.0", + "xtend": "^4.0.0" + } + }, + "esprima": { + "version": "4.0.0", + "bundled": true + }, + "espurify": { + "version": "1.8.0", + "bundled": true, + "requires": { + "core-js": "^2.0.0" + } + }, + "estraverse": { + "version": "4.2.0", + "bundled": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "bundled": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extract-zip": { + "version": "1.6.7", + "bundled": true, + "requires": { + "concat-stream": "1.6.2", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "yauzl": "2.4.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true + }, + "fast-diff": { + "version": "1.1.2", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true + }, + "fd-slicer": { + "version": "1.0.1", + "bundled": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "2.0.0", + "bundled": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-set": { + "version": "2.0.0", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "glob": "^7.1.2" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "filename-regex": { + "version": "2.0.1", + "bundled": true + }, + "fill-range": { + "version": "2.2.4", + "bundled": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "bundled": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-replace": { + "version": "2.0.1", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "test-value": "^3.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "fn-name": { + "version": "2.0.1", + "bundled": true + }, + "for-each": { + "version": "0.3.2", + "bundled": true, + "requires": { + "is-function": "~1.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true + }, + "for-own": { + "version": "0.1.5", + "bundled": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.3.2", + "bundled": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs-then-native": { + "version": "2.0.0", + "bundled": true + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "bundled": true + }, + "function-name-support": { + "version": "0.2.0", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "get-port": { + "version": "3.2.0", + "bundled": true + }, + "get-stdin": { + "version": "4.0.1", + "bundled": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "6.0.4", + "bundled": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "global-dirs": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ini": "^1.3.4" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true + }, + "globby": { + "version": "6.1.0", + "bundled": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "pinkie": { + "version": "2.0.4", + "bundled": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "requires": { + "pinkie": "^2.0.0" + } + } + } + }, + "got": { + "version": "6.7.1", + "bundled": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "bundled": true + }, + "har-validator": { + "version": "5.0.3", + "bundled": true, + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.1", + "bundled": true, + "requires": { + "function-bind": "^1.0.2" + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-color": { + "version": "0.1.7", + "bundled": true + }, + "has-flag": { + "version": "2.0.0", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "has-yarn": { + "version": "1.0.0", + "bundled": true + }, + "home-or-tmp": { + "version": "2.0.0", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "bundled": true + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "hullabaloo-config-manager": { + "version": "1.1.1", + "bundled": true, + "requires": { + "dot-prop": "^4.1.0", + "es6-error": "^4.0.2", + "graceful-fs": "^4.1.11", + "indent-string": "^3.1.0", + "json5": "^0.5.1", + "lodash.clonedeep": "^4.5.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.isequal": "^4.5.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "pkg-dir": "^2.0.0", + "resolve-from": "^3.0.0", + "safe-buffer": "^5.0.1" + } + }, + "husky": { + "version": "0.14.3", + "bundled": true, + "requires": { + "is-ci": "^1.0.10", + "normalize-path": "^1.0.0", + "strip-indent": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "1.0.0", + "bundled": true + }, + "strip-indent": { + "version": "2.0.0", + "bundled": true + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-by-default": { + "version": "1.0.1", + "bundled": true + }, + "import-lazy": { + "version": "2.1.0", + "bundled": true + }, + "import-local": { + "version": "0.1.1", + "bundled": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "indent-string": { + "version": "3.2.0", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "info-symbol": { + "version": "0.1.0", + "bundled": true + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "invariant": { + "version": "2.2.4", + "bundled": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "irregular-plurals": { + "version": "1.4.0", + "bundled": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true + }, + "is-binary-path": { + "version": "1.0.1", + "bundled": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.3", + "bundled": true + }, + "is-ci": { + "version": "1.1.0", + "bundled": true, + "requires": { + "ci-info": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true + } + } + }, + "is-date-object": { + "version": "1.0.1", + "bundled": true + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "bundled": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-error": { + "version": "2.2.1", + "bundled": true + }, + "is-extendable": { + "version": "0.1.1", + "bundled": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-function": { + "version": "1.0.1", + "bundled": true + }, + "is-generator-fn": { + "version": "1.0.0", + "bundled": true + }, + "is-glob": { + "version": "2.0.1", + "bundled": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "bundled": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "bundled": true + }, + "is-number": { + "version": "2.1.0", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-obj": { + "version": "1.0.1", + "bundled": true + }, + "is-observable": { + "version": "1.1.0", + "bundled": true, + "requires": { + "symbol-observable": "^1.1.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "bundled": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "bundled": true + }, + "is-plain-object": { + "version": "2.0.4", + "bundled": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true + }, + "is-promise": { + "version": "2.1.0", + "bundled": true + }, + "is-redirect": { + "version": "1.0.0", + "bundled": true + }, + "is-regex": { + "version": "1.0.4", + "bundled": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "bundled": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true + }, + "is-symbol": { + "version": "1.0.1", + "bundled": true + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "is-url": { + "version": "1.2.4", + "bundled": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true + }, + "is-windows": { + "version": "1.0.2", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "js-string-escape": { + "version": "1.0.1", + "bundled": true + }, + "js-tokens": { + "version": "3.0.2", + "bundled": true + }, + "js-yaml": { + "version": "3.11.0", + "bundled": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "bundled": true, + "requires": { + "xmlcreate": "^1.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "jsdoc": { + "version": "3.5.5", + "bundled": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", + "taffydb": "2.6.2", + "underscore": "~1.8.3" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.19", + "bundled": true + } + } + }, + "jsdoc-api": { + "version": "4.0.3", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "cache-point": "^0.4.1", + "collect-all": "^1.0.3", + "file-set": "^2.0.0", + "fs-then-native": "^2.0.0", + "jsdoc": "~3.5.5", + "object-to-spawn-args": "^1.1.1", + "temp-path": "^1.0.0", + "walk-back": "^3.0.0" + } + }, + "jsdoc-parse": { + "version": "3.0.1", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "reduce-extract": "^1.0.0", + "sort-array": "^2.0.0", + "test-value": "^3.0.0" + } + }, + "jsdoc-to-markdown": { + "version": "4.0.1", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "command-line-tool": "^0.8.0", + "config-master": "^3.1.0", + "dmd": "^3.0.10", + "jsdoc-api": "^4.0.1", + "jsdoc-parse": "^3.0.1", + "walk-back": "^3.0.0" + } + }, + "jsesc": { + "version": "0.5.0", + "bundled": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "bundled": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "json5": { + "version": "0.5.1", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "klaw": { + "version": "2.0.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "koalas": { + "version": "1.0.2", + "bundled": true + }, + "last-line-stream": { + "version": "1.0.0", + "bundled": true, + "requires": { + "through2": "^2.0.0" + } + }, + "latest-version": { + "version": "3.1.0", + "bundled": true, + "requires": { + "package-json": "^4.0.0" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "optional": true + }, + "load-json-file": { + "version": "2.0.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "bundled": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "bundled": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "bundled": true + }, + "lodash.clonedeepwith": { + "version": "4.5.0", + "bundled": true + }, + "lodash.debounce": { + "version": "4.0.8", + "bundled": true + }, + "lodash.difference": { + "version": "4.5.0", + "bundled": true + }, + "lodash.flatten": { + "version": "4.4.0", + "bundled": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "bundled": true + }, + "lodash.isequal": { + "version": "4.5.0", + "bundled": true + }, + "lodash.merge": { + "version": "4.6.1", + "bundled": true + }, + "lodash.omit": { + "version": "4.5.0", + "bundled": true + }, + "lodash.padend": { + "version": "4.6.1", + "bundled": true + }, + "lodash.pick": { + "version": "4.4.0", + "bundled": true + }, + "log-ok": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ansi-green": "^0.1.1", + "success-symbol": "^0.1.0" + } + }, + "log-utils": { + "version": "0.2.1", + "bundled": true, + "requires": { + "ansi-colors": "^0.2.0", + "error-symbol": "^0.1.0", + "info-symbol": "^0.1.0", + "log-ok": "^0.1.1", + "success-symbol": "^0.1.0", + "time-stamp": "^1.0.1", + "warning-symbol": "^0.1.0" + } + }, + "log4js": { + "version": "1.1.1", + "bundled": true, + "requires": { + "debug": "^2.2.0", + "semver": "^5.3.0", + "streamroller": "^0.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "longest": { + "version": "1.0.1", + "bundled": true + }, + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "bundled": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "bundled": true + }, + "lru-cache": { + "version": "4.1.3", + "bundled": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "dependencies": { + "yallist": { + "version": "2.1.2", + "bundled": true + } + } + }, + "make-dir": { + "version": "1.3.0", + "bundled": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "bundled": true + } + } + }, + "map-obj": { + "version": "1.0.1", + "bundled": true + }, + "map-visit": { + "version": "1.0.0", + "bundled": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "marked": { + "version": "0.3.19", + "bundled": true + }, + "matcher": { + "version": "1.1.1", + "bundled": true, + "requires": { + "escape-string-regexp": "^1.0.4" + } + }, + "math-random": { + "version": "1.0.1", + "bundled": true + }, + "md5-hex": { + "version": "2.0.0", + "bundled": true, + "requires": { + "md5-o-matic": "^0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true + }, + "meow": { + "version": "3.7.0", + "bundled": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pinkie": { + "version": "2.0.4", + "bundled": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "bundled": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "micromatch": { + "version": "2.3.11", + "bundled": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "mime-db": { + "version": "1.33.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.18", + "bundled": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.3.3", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mixin-object": { + "version": "2.0.1", + "bundled": true, + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "bundled": true + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mkdirp2": { + "version": "1.0.4", + "bundled": true + }, + "ms": { + "version": "2.1.1", + "bundled": true + }, + "multimatch": { + "version": "2.1.0", + "bundled": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "bundled": true + }, + "mv": { + "version": "2.1.1", + "bundled": true, + "requires": { + "mkdirp": "~0.5.1", + "ncp": "~2.0.0", + "rimraf": "~2.4.0" + }, + "dependencies": { + "rimraf": { + "version": "2.4.5", + "bundled": true, + "requires": { + "glob": "^6.0.1" + } + } + } + }, + "ncp": { + "version": "2.0.0", + "bundled": true + }, + "node-gyp": { + "version": "3.6.2", + "bundled": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "bundled": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now": { + "version": "11.2.0", + "bundled": true + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "object-copy": { + "version": "0.1.0", + "bundled": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true + } + } + } + } + }, + "object-get": { + "version": "2.1.0", + "bundled": true + }, + "object-inspect": { + "version": "1.5.0", + "bundled": true + }, + "object-keys": { + "version": "1.0.11", + "bundled": true + }, + "object-to-spawn-args": { + "version": "1.1.1", + "bundled": true + }, + "object-visit": { + "version": "1.0.1", + "bundled": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "bundled": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "observable-to-promise": { + "version": "0.5.0", + "bundled": true, + "requires": { + "is-observable": "^0.2.0", + "symbol-observable": "^1.0.4" + }, + "dependencies": { + "is-observable": { + "version": "0.2.0", + "bundled": true, + "requires": { + "symbol-observable": "^0.2.2" + }, + "dependencies": { + "symbol-observable": { + "version": "0.2.4", + "bundled": true + } + } + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "bundled": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "option-chain": { + "version": "1.0.0", + "bundled": true + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true + }, + "p-limit": { + "version": "1.2.0", + "bundled": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "bundled": true + }, + "p-try": { + "version": "1.0.0", + "bundled": true + }, + "package-hash": { + "version": "2.0.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "bundled": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "pako": { + "version": "0.2.9", + "bundled": true + }, + "parse-glob": { + "version": "3.0.4", + "bundled": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-ms": { + "version": "0.1.2", + "bundled": true + }, + "path-exists": { + "version": "3.0.0", + "bundled": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "path-is-inside": { + "version": "1.0.2", + "bundled": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true + }, + "path-type": { + "version": "2.0.0", + "bundled": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pend": { + "version": "1.2.0", + "bundled": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true + }, + "pify": { + "version": "2.3.0", + "bundled": true + }, + "pinkie": { + "version": "1.0.0", + "bundled": true + }, + "pinkie-promise": { + "version": "1.0.0", + "bundled": true, + "requires": { + "pinkie": "^1.0.0" + } + }, + "pkg-conf": { + "version": "2.1.0", + "bundled": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "bundled": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "bundled": true + } + } + }, + "pkg-dir": { + "version": "2.0.0", + "bundled": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "plur": { + "version": "2.1.2", + "bundled": true, + "requires": { + "irregular-plurals": "^1.0.0" + } + }, + "pngjs": { + "version": "2.3.1", + "bundled": true + }, + "pngjs-image": { + "version": "0.11.7", + "bundled": true, + "requires": { + "iconv-lite": "^0.4.8", + "pako": "^0.2.6", + "pngjs": "2.3.1", + "request": "^2.55.0", + "stream-buffers": "1.0.1", + "underscore": "1.7.0" + }, + "dependencies": { + "underscore": { + "version": "1.7.0", + "bundled": true + } + } + }, + "pointer-symbol": { + "version": "1.0.0", + "bundled": true + }, + "preceptor-core": { + "version": "0.10.1", + "bundled": true, + "requires": { + "log4js": "1.1.1", + "underscore": "1.7.0" + }, + "dependencies": { + "underscore": { + "version": "1.7.0", + "bundled": true + } + } + }, + "prepend-http": { + "version": "1.0.4", + "bundled": true + }, + "preserve": { + "version": "0.2.0", + "bundled": true + }, + "pretty-ms": { + "version": "3.2.0", + "bundled": true, + "requires": { + "parse-ms": "^1.0.0" + }, + "dependencies": { + "parse-ms": { + "version": "1.0.1", + "bundled": true + } + } + }, + "private": { + "version": "0.1.8", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true + }, + "promise": { + "version": "6.0.0", + "bundled": true, + "requires": { + "asap": "~1.0.0" + } + }, + "prompt-actions": { + "version": "3.0.2", + "bundled": true, + "requires": { + "debug": "^2.6.8" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "prompt-base": { + "version": "4.1.0", + "bundled": true, + "requires": { + "component-emitter": "^1.2.1", + "debug": "^3.0.1", + "koalas": "^1.0.2", + "log-utils": "^0.2.1", + "prompt-actions": "^3.0.2", + "prompt-question": "^5.0.1", + "readline-ui": "^2.2.3", + "readline-utils": "^2.2.3", + "static-extend": "^0.1.2" + } + }, + "prompt-choices": { + "version": "4.1.0", + "bundled": true, + "requires": { + "arr-flatten": "^1.1.0", + "arr-swap": "^1.0.1", + "choices-separator": "^2.0.0", + "clone-deep": "^4.0.0", + "collection-visit": "^1.0.0", + "define-property": "^2.0.2", + "is-number": "^6.0.0", + "kind-of": "^6.0.2", + "koalas": "^1.0.2", + "log-utils": "^0.2.1", + "pointer-symbol": "^1.0.0", + "radio-symbol": "^2.0.0", + "set-value": "^3.0.0", + "strip-color": "^0.1.0", + "terminal-paginator": "^2.0.2", + "toggle-array": "^1.0.1" + }, + "dependencies": { + "clone-deep": { + "version": "4.0.0", + "bundled": true, + "requires": { + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "define-property": { + "version": "2.0.2", + "bundled": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "is-number": { + "version": "6.0.0", + "bundled": true + }, + "isobject": { + "version": "3.0.1", + "bundled": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true + }, + "shallow-clone": { + "version": "3.0.0", + "bundled": true, + "requires": { + "kind-of": "^6.0.2" + } + } + } + }, + "prompt-confirm": { + "version": "1.2.0", + "bundled": true, + "requires": { + "debug": "^2.6.8", + "prompt-base": "^4.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "prompt-question": { + "version": "5.0.2", + "bundled": true, + "requires": { + "clone-deep": "^1.0.0", + "debug": "^3.0.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "kind-of": "^5.0.2", + "koalas": "^1.0.2", + "prompt-choices": "^4.0.5" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true + }, + "kind-of": { + "version": "5.1.0", + "bundled": true + } + } + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true + }, + "qs": { + "version": "6.5.2", + "bundled": true + }, + "radio-symbol": { + "version": "2.0.0", + "bundled": true, + "requires": { + "ansi-gray": "^0.1.1", + "ansi-green": "^0.1.1", + "is-windows": "^1.0.1" + } + }, + "randomatic": { + "version": "3.0.0", + "bundled": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true + } + } + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true + } + } + }, + "re-emitter": { + "version": "1.1.3", + "bundled": true + }, + "read-pkg": { + "version": "2.0.0", + "bundled": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "bundled": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "readline-ui": { + "version": "2.2.3", + "bundled": true, + "requires": { + "component-emitter": "^1.2.1", + "debug": "^2.6.8", + "readline-utils": "^2.2.1", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "ms": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "readline-utils": { + "version": "2.2.3", + "bundled": true, + "requires": { + "arr-flatten": "^1.1.0", + "extend-shallow": "^2.0.1", + "is-buffer": "^1.1.5", + "is-number": "^3.0.0", + "is-windows": "^1.0.1", + "koalas": "^1.0.2", + "mute-stream": "0.0.7", + "strip-color": "^0.1.0", + "window-size": "^1.1.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "window-size": { + "version": "1.1.1", + "bundled": true, + "requires": { + "define-property": "^1.0.0", + "is-number": "^3.0.0" + } + } + } + }, + "redent": { + "version": "1.0.0", + "bundled": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, + "dependencies": { + "indent-string": { + "version": "2.1.0", + "bundled": true, + "requires": { + "repeating": "^2.0.0" + } + } + } + }, + "reduce-extract": { + "version": "1.0.0", + "bundled": true, + "requires": { + "test-value": "^1.0.1" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "bundled": true, + "requires": { + "typical": "^2.6.0" + } + }, + "test-value": { + "version": "1.1.0", + "bundled": true, + "requires": { + "array-back": "^1.0.2", + "typical": "^2.4.2" + } + } + } + }, + "reduce-flatten": { + "version": "1.0.1", + "bundled": true + }, + "reduce-unique": { + "version": "1.0.0", + "bundled": true + }, + "reduce-without": { + "version": "1.0.1", + "bundled": true, + "requires": { + "test-value": "^2.0.0" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "bundled": true, + "requires": { + "typical": "^2.6.0" + } + }, + "test-value": { + "version": "2.1.0", + "bundled": true, + "requires": { + "array-back": "^1.0.3", + "typical": "^2.6.0" + } + } + } + }, + "regenerate": { + "version": "1.4.0", + "bundled": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "bundled": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regexpu-core": { + "version": "2.0.0", + "bundled": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "bundled": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "bundled": true, + "requires": { + "rc": "^1.0.1" + } + }, + "regjsgen": { + "version": "0.2.0", + "bundled": true + }, + "regjsparser": { + "version": "0.1.5", + "bundled": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "bundled": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.87.0", + "bundled": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "request-promise-core": { + "version": "1.1.1", + "bundled": true, + "requires": { + "lodash": "^4.13.1" + } + }, + "request-promise-native": { + "version": "1.0.5", + "bundled": true, + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "^1.1.0", + "tough-cookie": ">=2.3.3" + } + }, + "require-precompiled": { + "version": "0.1.0", + "bundled": true + }, + "requizzle": { + "version": "0.2.1", + "bundled": true, + "requires": { + "underscore": "~1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "bundled": true + } + } + }, + "resolve": { + "version": "1.7.1", + "bundled": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "bundled": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "bundled": true + }, + "restore-cursor": { + "version": "2.0.0", + "bundled": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "resumer": { + "version": "0.0.0", + "bundled": true, + "requires": { + "through": "~2.3.4" + } + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "^7.0.5" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, + "screenshot-tester": { + "version": "0.3.0", + "bundled": true, + "requires": { + "blink-diff": "^1.0.13", + "chalk": "^2.4.1", + "prompt-confirm": "^1.2.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5" + } + }, + "semver": { + "version": "5.3.0", + "bundled": true + }, + "semver-diff": { + "version": "2.1.0", + "bundled": true, + "requires": { + "semver": "^5.0.3" + } + }, + "serialize-error": { + "version": "2.1.0", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "set-getter": { + "version": "0.1.0", + "bundled": true, + "requires": { + "to-object-path": "^0.3.0" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "bundled": true + }, + "set-value": { + "version": "3.0.0", + "bundled": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "shallow-clone": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true + } + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "slash": { + "version": "1.0.0", + "bundled": true + }, + "slice-ansi": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + } + } + }, + "slide": { + "version": "1.1.6", + "bundled": true + }, + "sort-array": { + "version": "2.0.0", + "bundled": true, + "requires": { + "array-back": "^1.0.4", + "object-get": "^2.1.0", + "typical": "^2.6.0" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "bundled": true, + "requires": { + "typical": "^2.6.0" + } + } + } + }, + "sort-keys": { + "version": "2.0.0", + "bundled": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "bundled": true + }, + "source-map-support": { + "version": "0.5.6", + "bundled": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true + } + } + }, + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "bundled": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true + }, + "split": { + "version": "1.0.0", + "bundled": true, + "requires": { + "through": "2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "bundled": true + }, + "sshpk": { + "version": "1.14.1", + "bundled": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "1.0.1", + "bundled": true + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true + } + } + }, + "stealthy-require": { + "version": "1.1.1", + "bundled": true + }, + "stream-buffers": { + "version": "1.0.1", + "bundled": true + }, + "stream-connect": { + "version": "1.0.2", + "bundled": true, + "requires": { + "array-back": "^1.0.2" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "bundled": true, + "requires": { + "typical": "^2.6.0" + } + } + } + }, + "stream-via": { + "version": "1.0.4", + "bundled": true + }, + "streamroller": { + "version": "0.4.1", + "bundled": true, + "requires": { + "date-format": "^0.0.0", + "debug": "^0.7.2", + "mkdirp": "^0.5.1", + "readable-stream": "^1.1.7" + }, + "dependencies": { + "debug": { + "version": "0.7.4", + "bundled": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true + }, + "readable-stream": { + "version": "1.1.14", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trim": { + "version": "1.1.2", + "bundled": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.0", + "function-bind": "^1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true + }, + "strip-bom-buf": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-utf8": "^0.2.1" + } + }, + "strip-color": { + "version": "0.1.0", + "bundled": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true + }, + "strip-indent": { + "version": "1.0.1", + "bundled": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "success-symbol": { + "version": "0.1.0", + "bundled": true + }, + "supertap": { + "version": "1.0.0", + "bundled": true, + "requires": { + "arrify": "^1.0.1", + "indent-string": "^3.2.0", + "js-yaml": "^3.10.0", + "serialize-error": "^2.1.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "5.4.0", + "bundled": true, + "requires": { + "has-flag": "^3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "bundled": true + } + } + }, + "symbol-observable": { + "version": "1.2.0", + "bundled": true + }, + "table-layout": { + "version": "0.4.4", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "deep-extend": "~0.6.0", + "lodash.padend": "^4.6.1", + "typical": "^2.6.1", + "wordwrapjs": "^3.0.0" + } + }, + "taffydb": { + "version": "2.6.2", + "bundled": true + }, + "tap-out": { + "version": "2.1.0", + "bundled": true, + "requires": { + "re-emitter": "1.1.3", + "readable-stream": "2.2.9", + "split": "1.0.0", + "trim": "0.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "requires": { + "buffer-shims": "~1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "tap-spec": { + "version": "5.0.0", + "bundled": true, + "requires": { + "chalk": "^1.0.0", + "duplexer": "^0.1.1", + "figures": "^1.4.0", + "lodash": "^4.17.10", + "pretty-ms": "^2.1.0", + "repeat-string": "^1.5.2", + "tap-out": "^2.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "bundled": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "parse-ms": { + "version": "1.0.1", + "bundled": true + }, + "plur": { + "version": "1.0.0", + "bundled": true + }, + "pretty-ms": { + "version": "2.1.0", + "bundled": true, + "requires": { + "is-finite": "^1.0.1", + "parse-ms": "^1.0.0", + "plur": "^1.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true + } + } + }, + "tape": { + "version": "4.9.0", + "bundled": true, + "requires": { + "deep-equal": "~1.0.1", + "defined": "~1.0.0", + "for-each": "~0.3.2", + "function-bind": "~1.1.1", + "glob": "~7.1.2", + "has": "~1.0.1", + "inherits": "~2.0.3", + "minimist": "~1.2.0", + "object-inspect": "~1.5.0", + "resolve": "~1.5.0", + "resumer": "~0.0.0", + "string.prototype.trim": "~1.1.2", + "through": "~2.3.8" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "resolve": { + "version": "1.5.0", + "bundled": true, + "requires": { + "path-parse": "^1.0.5" + } + } + } + }, + "tar": { + "version": "4.4.4", + "bundled": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.3", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "temp-path": { + "version": "1.0.0", + "bundled": true + }, + "term-size": { + "version": "1.2.0", + "bundled": true, + "requires": { + "execa": "^0.7.0" + } + }, + "terminal-paginator": { + "version": "2.0.2", + "bundled": true, + "requires": { + "debug": "^2.6.6", + "extend-shallow": "^2.0.1", + "log-utils": "^0.2.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "test-value": { + "version": "3.0.0", + "bundled": true, + "requires": { + "array-back": "^2.0.0", + "typical": "^2.6.1" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true + }, + "through": { + "version": "2.3.8", + "bundled": true + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "time-stamp": { + "version": "1.1.0", + "bundled": true + }, + "time-zone": { + "version": "1.0.0", + "bundled": true + }, + "timed-out": { + "version": "4.0.1", + "bundled": true + }, + "to-dot-case": { + "version": "1.0.0", + "bundled": true, + "requires": { + "to-space-case": "^1.0.0" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "bundled": true + }, + "to-no-case": { + "version": "1.0.2", + "bundled": true + }, + "to-object-path": { + "version": "0.3.0", + "bundled": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-space-case": { + "version": "1.0.0", + "bundled": true, + "requires": { + "to-no-case": "^1.0.0" + } + }, + "toggle-array": { + "version": "1.0.1", + "bundled": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true + } + } + }, + "tough-cookie": { + "version": "2.3.4", + "bundled": true, + "requires": { + "punycode": "^1.4.1" + } + }, + "trim": { + "version": "0.0.1", + "bundled": true + }, + "trim-newlines": { + "version": "1.0.0", + "bundled": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "bundled": true + }, + "trim-right": { + "version": "1.0.1", + "bundled": true + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "typedarray": { + "version": "0.0.6", + "bundled": true + }, + "typical": { + "version": "2.6.1", + "bundled": true + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "uid2": { + "version": "0.0.3", + "bundled": true + }, + "underscore": { + "version": "1.8.3", + "bundled": true + }, + "underscore-contrib": { + "version": "0.3.0", + "bundled": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "bundled": true + } + } + }, + "unique-string": { + "version": "1.0.0", + "bundled": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, + "unique-temp-dir": { + "version": "1.0.0", + "bundled": true, + "requires": { + "mkdirp": "^0.5.1", + "os-tmpdir": "^1.0.1", + "uid2": "0.0.3" + } + }, + "unzip-response": { + "version": "2.0.1", + "bundled": true + }, + "update-notifier": { + "version": "2.5.0", + "bundled": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "bundled": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.2.1", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "walk-back": { + "version": "3.0.0", + "bundled": true + }, + "warning-symbol": { + "version": "0.1.0", + "bundled": true + }, + "well-known-symbols": { + "version": "1.0.0", + "bundled": true + }, + "which": { + "version": "1.3.1", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "widest-line": { + "version": "2.0.0", + "bundled": true, + "requires": { + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true + }, + "wordwrapjs": { + "version": "3.0.0", + "bundled": true, + "requires": { + "reduce-flatten": "^1.0.1", + "typical": "^2.6.1" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "2.3.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-json-file": { + "version": "2.3.0", + "bundled": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" + }, + "dependencies": { + "detect-indent": { + "version": "5.0.0", + "bundled": true + }, + "pify": { + "version": "3.0.0", + "bundled": true + } + } + }, + "write-pkg": { + "version": "3.1.0", + "bundled": true, + "requires": { + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "bundled": true + }, + "xmlcreate": { + "version": "1.0.2", + "bundled": true + }, + "xtend": { + "version": "4.0.1", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + }, + "yargs": { + "version": "3.10.0", + "bundled": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "bundled": true, + "optional": true + } + } + }, + "yauzl": { + "version": "2.4.1", + "bundled": true, + "requires": { + "fd-slicer": "~1.0.1" + } + } + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "typescript": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", + "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==" + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + } + } +} diff --git a/example/gallery-ts/package.json b/example/gallery-ts/package.json new file mode 100644 index 0000000..5c36378 --- /dev/null +++ b/example/gallery-ts/package.json @@ -0,0 +1,19 @@ +{ + "name": "gallery-ts", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "ts-node index.ts" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "libui-napi": "file:../..", + "typescript": "^3.2.2" + }, + "devDependencies": { + "ts-node": "^7.0.1" + } +} From b9a9217b85cdaa11f5f1d9be0ed39e5ff21ef059 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Fri, 7 Dec 2018 19:34:47 +0100 Subject: [PATCH 02/20] button --- example/gallery-ts/index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/example/gallery-ts/index.ts b/example/gallery-ts/index.ts index 20ef992..541bc40 100644 --- a/example/gallery-ts/index.ts +++ b/example/gallery-ts/index.ts @@ -1,4 +1,5 @@ -import {startLoop, stopLoop, UiWindow} from 'libui-napi'; +import {startLoop, stopLoop, UiWindow, UiButton} from 'libui-napi'; + const win = new UiWindow('Using libui-node with TypeScript', 800, 600, false); @@ -6,5 +7,16 @@ win.onClosing(() => { win.close(); stopLoop(); }); + +const btn = new UiButton('full'); +btn.onClicked(() => { + win.fullscreen = !win.fullscreen; + btn.text = win.fullscreen ? 'normal' : 'fullscreen'; +}); +win.setChild(btn); + + win.show(); + + startLoop(); From 1ad4b99578cdaa37183e3b072a120703bdc4eb71 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 18:19:31 +0100 Subject: [PATCH 03/20] Add tslint to lint typescript defs file. --- package-lock.json | 69 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 5 +++- tslint.json | 9 +++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 tslint.json diff --git a/package-lock.json b/package-lock.json index cb842f1..eeacded 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1887,6 +1887,12 @@ "typical": "^2.6.1" } }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, "common-path-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", @@ -2174,6 +2180,12 @@ "repeating": "^2.0.0" } }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "dmd": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/dmd/-/dmd-3.0.12.tgz", @@ -6938,6 +6950,57 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -6957,6 +7020,12 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", + "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", + "dev": true + }, "typical": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", diff --git a/package.json b/package.json index cc1d09f..54ee9d3 100755 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "install": "npm run --silent download-libui && npm run --silent download-libui-napi || npm run build", "test": "cross-env LIBUI_TARGET=test node-gyp configure build && cross-env LIBUI_TARGET=test DEBUG=ControlInternal tape tests/*.js | tap-spec", "precommit": "check-clang-format \"'npm run lint'\"", + "tslint": "tslint libui-napi.d.ts", "lint": "clang-format -i --glob='{tests/**/*.{h,c,m,js},example/*.js,js/**/*.js,src/**/*.{h,c,m},index.js,example.js,libui-napi.d.ts,test.js,example/gallery/src/**/*.js,tools/**/*.js,test_ui.js}'" }, "dependencies": { @@ -52,7 +53,9 @@ "screenshot-tester": "^0.3.0", "tap-spec": "^5.0.0", "tape": "^4.9.0", - "to-dot-case": "^1.0.0" + "to-dot-case": "^1.0.0", + "tslint": "^5.11.0", + "typescript": "^3.2.2" }, "files": [ "tools", diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..32fa6e5 --- /dev/null +++ b/tslint.json @@ -0,0 +1,9 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": {}, + "rulesDirectory": [] +} \ No newline at end of file From 11827b3271ef5efe9f5a4234b344401acaa9a5c1 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 18:23:54 +0100 Subject: [PATCH 04/20] Use namespace to nest enums. --- libui-napi.d.ts | 158 +++++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 75 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 3db6268..b00d214 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -123,11 +123,15 @@ export class FontAttribute { static getUnderlineColor(): {type: textAttributeType; color: Color | null;}|null; static getOTFeatures(): OpenTypeFeatures|null; - static readonly weight = textWeight; - static readonly italic = textItalic; - static readonly stretch = textStretch; - static readonly underline = textUnderline; - static readonly underlineColor = textUnderlineColor; + +} + +export namespace FontAttribute { + type weight = textWeight; + type italic = textItalic; + type stretch = textStretch; + type underline = textUnderline; + type underlineColor = textUnderlineColor; } export class OpenTypeFeatures { @@ -362,48 +366,50 @@ export class UiAreaMouseEvent { readonly held1To64: number; } -declare enum modifierKeys { ctrl, alt, shift, super } - -declare enum extKeys { - escape, - insert, // equivalent to "Help" on Apple keyboards - delete, - home, - end, - pageUp, - pageDown, - up, - down, - left, - right, - f1, // F1..F12 are guaranteed to be consecutive - f2, - f3, - f4, - f5, - f6, - f7, - f8, - f9, - f10, - f11, - f12, - n0, // numpad keys; independent of Num Lock state - n1, // N0..N9 are guaranteed to be consecutive - n2, - n3, - n4, - n5, - n6, - n7, - n8, - n9, - nDot, - nEnter, - nAdd, - nSubtract, - nMultiply, - nDivide +export namespace UiAreaKeyEvent { + enum modifierKeys { ctrl, alt, shift, super } + + enum extKeys { + escape, + insert, // equivalent to "Help" on Apple keyboards + delete, + home, + end, + pageUp, + pageDown, + up, + down, + left, + right, + f1, // F1..F12 are guaranteed to be consecutive + f2, + f3, + f4, + f5, + f6, + f7, + f8, + f9, + f10, + f11, + f12, + n0, // numpad keys; independent of Num Lock state + n1, // N0..N9 are guaranteed to be consecutive + n2, + n3, + n4, + n5, + n6, + n7, + n8, + n9, + nDot, + nEnter, + nAdd, + nSubtract, + nMultiply, + nDivide + } } export class UiAreaKeyEvent { @@ -411,26 +417,32 @@ export class UiAreaKeyEvent { up: boolean); key: string; - extKey: extKeys; - modifier: modifierKeys; + extKey: UiAreaKeyEvent.extKeys; + modifier: UiAreaKeyEvent.modifierKeys; modifiers: number; up: number; - static readonly modifierKeys = modifierKeys; - static readonly extKeys = extKeys; + } + + export const UiDialogs: { openFile(parent: UiWindow): string|null; saveFile(parent: UiWindow): string | null; msgBox(parent: UiWindow, title: string, description: string): void; msgBoxError(parent: UiWindow, title: string, description: string): void; }; -declare enum brushType { solid, linearGradient, radialGradient } -declare enum lineCap { flat, round, square } +export namespace DrawBrush { + enum brushType { solid, linearGradient, radialGradient } +} -declare enum lineJoin { miter, round, bevel } +export namespace DrawStrokeParams { + enum lineCap { flat, round, square } + + enum lineJoin { miter, round, bevel } +} /** * A draw brush @@ -440,7 +452,7 @@ export class DrawBrush { color: Color; - type: brushType; + type: DrawBrush.brushType; /** * The gradient stops @@ -492,12 +504,10 @@ export class UiDrawPath { } export class DrawStrokeParams { - static readonly lineCap = lineCap; - static readonly lineJoin = lineJoin; thickness: number; - cap: lineCap; - join: lineJoin; + cap: DrawStrokeParams.lineCap; + join: DrawStrokeParams.lineJoin; miterLimit: number; dashes: number[]; @@ -729,9 +739,17 @@ export class UiGroup extends UiControl { margined: boolean; } -declare enum GridAlign { fill, start, center, end } +export namespace UiGrid { + /** + * Enum defining the alignment of a control + */ + enum GridAlign { fill, start, center, end } -declare enum GridAt { leading, top, trailing, bottom } + /** + * Enum defining the position where to insert a control into a grid + */ + enum GridAt { leading, top, trailing, bottom } +} /** * A powerful container that allow to specify size and position of each children. @@ -742,16 +760,6 @@ export class UiGrid extends UiControl { */ constructor(); - /** - * Enum defining the alignment of a control - */ - static readonly align = GridAlign; - - /** - * Enum defining the position where to insert a control into a grid - */ - static readonly at = GridAt; - /** * If true, the container inserts some space between children. */ @@ -771,9 +779,9 @@ export class UiGrid extends UiControl { * @param valign - whether the component is aligned with the other components in the * row. */ - insertAt(child: UiControl, before: UiControl, at: GridAt, xspan: number, - yspan: number, hexpand: number, halign: GridAlign, vexpan, - valign: GridAlign): void; + insertAt(child: UiControl, before: UiControl, at: UiGrid.GridAt, xspan: number, + yspan: number, hexpand: number, halign: UiGrid.GridAlign, vexpan, + valign: UiGrid.GridAlign): void; /** * Insert a new child control. @@ -794,7 +802,7 @@ export class UiGrid extends UiControl { * row. */ append(child: UiControl, left: number, top: number, xspan: number, yspan: number, - hexpand: number, halign: GridAlign, vexpand: number, valign: GridAlign): void; + hexpand: number, halign: UiGrid.GridAlign, vexpand: number, valign: UiGrid.GridAlign): void; } /** From 0af5b7e43d72172c346d0ea5f014c5cf9d0d08b7 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 19:07:47 +0100 Subject: [PATCH 05/20] Add custom tslint rules --- tslint.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index 32fa6e5..ffffdaf 100644 --- a/tslint.json +++ b/tslint.json @@ -4,6 +4,11 @@ "tslint:recommended" ], "jsRules": {}, - "rules": {}, + "rules": { + "indent": [true, "tabs"], + "max-classes-per-file": false, + "align": [false, "parameters"], + "no-namespace": false + }, "rulesDirectory": [] } \ No newline at end of file From a7302e4dce6dc9567aae21cf0e941366186189d9 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 19:19:59 +0100 Subject: [PATCH 06/20] Example lint --- example/gallery-ts/index.ts | 7 +- example/gallery-ts/package-lock.json | 319 +++++++++++ example/gallery-ts/package.json | 6 +- example/gallery-ts/tslint.json | 14 + libui-napi.d.ts | 764 ++++++++++++++------------- 5 files changed, 742 insertions(+), 368 deletions(-) create mode 100644 example/gallery-ts/tslint.json diff --git a/example/gallery-ts/index.ts b/example/gallery-ts/index.ts index 541bc40..19655dd 100644 --- a/example/gallery-ts/index.ts +++ b/example/gallery-ts/index.ts @@ -1,6 +1,4 @@ -import {startLoop, stopLoop, UiWindow, UiButton} from 'libui-napi'; - - +import {startLoop, stopLoop, UiButton, UiWindow} from 'libui-napi'; const win = new UiWindow('Using libui-node with TypeScript', 800, 600, false); win.onClosing(() => { @@ -13,10 +11,9 @@ btn.onClicked(() => { win.fullscreen = !win.fullscreen; btn.text = win.fullscreen ? 'normal' : 'fullscreen'; }); -win.setChild(btn); +win.setChild(btn); win.show(); - startLoop(); diff --git a/example/gallery-ts/package-lock.json b/example/gallery-ts/package-lock.json index aad4d40..5ee26b3 100644 --- a/example/gallery-ts/package-lock.json +++ b/example/gallery-ts/package-lock.json @@ -4,24 +4,236 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "libui-napi": { "version": "file:../..", "requires": { @@ -5369,6 +5581,15 @@ "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", @@ -5392,6 +5613,42 @@ } } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5408,6 +5665,27 @@ "source-map": "^0.6.0" } }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, "ts-node": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", @@ -5424,11 +5702,52 @@ "yn": "^2.0.0" } }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "typescript": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==" }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/example/gallery-ts/package.json b/example/gallery-ts/package.json index 5c36378..9ba3609 100644 --- a/example/gallery-ts/package.json +++ b/example/gallery-ts/package.json @@ -4,7 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "start": "ts-node index.ts" + "start": "ts-node index.ts", + "lint": "tslint *.ts" }, "keywords": [], "author": "", @@ -14,6 +15,7 @@ "typescript": "^3.2.2" }, "devDependencies": { - "ts-node": "^7.0.1" + "ts-node": "^7.0.1", + "tslint": "^5.11.0" } } diff --git a/example/gallery-ts/tslint.json b/example/gallery-ts/tslint.json new file mode 100644 index 0000000..94a389c --- /dev/null +++ b/example/gallery-ts/tslint.json @@ -0,0 +1,14 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": { + "indent": [true, "spaces", 4], + "max-classes-per-file": false, + "align": [false, "parameters"], + "no-namespace": false + }, + "rulesDirectory": [] +} \ No newline at end of file diff --git a/libui-napi.d.ts b/libui-napi.d.ts index b00d214..b50b252 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -11,7 +11,7 @@ declare enum textWeight { ultraBold, heavy, ultraHeavy, - maximum + maximum, } declare enum textItalic { normal, oblique, italic } @@ -25,7 +25,7 @@ declare enum textStretch { semiExpanded, expanded, extraExpanded, - ultraExpanded + ultraExpanded, } declare enum textAttributeType { @@ -38,7 +38,7 @@ declare enum textAttributeType { background, underline, underlineColor, - features + features, } declare enum textUnderline { none, single, double, suggestion } @@ -49,42 +49,42 @@ declare enum textUnderlineColor { custom, spelling, grammar, auxiliary } * An object that contains information on a system font. */ export class FontDescriptor { - /** - * Create a new FontDescriptor object. - * @param family - the name of the font, e.g. "Helvetica". `object` type is for - * internal use - * @param size - size in point of the font - * @param weight - weight of the font - * @param italic - 1 if the font is italic, otherwise 0 - * @param stretch - horizontal stretch value for the font - */ - constructor(family: string|object, size: number, weight: number, italic: number, - stretch: number); /** * Return the name of the font, e.g. "Helvetica". */ - readonly family: string; + public readonly family: string; /** * Return the size in point of the font. */ - readonly size: number; + public readonly size: number; /** * Return weight of the font. */ - readonly weight: textWeight; + public readonly weight: textWeight; /** * Return `1` if the font is italic, otherwise `0`. */ - readonly italic: textItalic; + public readonly italic: textItalic; /** * Return horizontal stretch value for the font. */ - readonly stretch: number; + public readonly stretch: number; + /** + * Create a new FontDescriptor object. + * @param family - the name of the font, e.g. "Helvetica". `object` type is for + * internal use + * @param size - size in point of the font + * @param weight - weight of the font + * @param italic - 1 if the font is italic, otherwise 0 + * @param stretch - horizontal stretch value for the font + */ + constructor(family: string|object, size: number, weight: number, italic: number, + stretch: number); } /** @@ -100,91 +100,96 @@ export function startTimer(): void; export function onShouldQuit(cb: () => void): void; +type UnderlineColor = { + type: textAttributeType; color: Color | null; +}|null; + export class FontAttribute { + public static newFamily(v: string): FontAttribute; + public static newSize(v: number): FontAttribute; + public static newWeight(v: textWeight): FontAttribute; + public static newItalic(v: textItalic): FontAttribute; + public static newStretch(v: textStretch): FontAttribute; + public static newColor(c: Color): FontAttribute; + public static newBackgroundColor(c: Color): FontAttribute; + public static newUnderline(v: textUnderline): FontAttribute; + public static newUnderlineColor(type: textUnderlineColor, + color?: Color): FontAttribute; + public static newOTFeatures(otf: OpenTypeFeatures): FontAttribute; + + public static getFamily(): string|null; + public static getSize(): number|null; + public static getWeight(): textWeight|null; + public static getItalic(): textItalic|null; + public static getStretch(): textStretch|null; + public static getColor(): Color|null; + public static getUnderline(): textUnderline|null; + public static getUnderlineColor(): UnderlineColor; + public static getOTFeatures(): OpenTypeFeatures|null; constructor(other: FontAttribute); - static newFamily(v: string): FontAttribute; - static newSize(v: number): FontAttribute; - static newWeight(v: textWeight): FontAttribute; - static newItalic(v: textItalic): FontAttribute; - static newStretch(v: textStretch): FontAttribute; - static newColor(c: Color): FontAttribute; - static newBackgroundColor(c: Color): FontAttribute; - static newUnderline(v: textUnderline): FontAttribute; - static newUnderlineColor(type: textUnderlineColor, color?: Color): FontAttribute; - static newOTFeatures(otf: OpenTypeFeatures): FontAttribute; - - static getFamily(): string|null; - static getSize(): number|null; - static getWeight(): textWeight|null; - static getItalic(): textItalic|null; - static getStretch(): textStretch|null; - static getColor(): Color|null; - static getUnderline(): textUnderline|null; - static getUnderlineColor(): {type: textAttributeType; color: Color | null;}|null; - static getOTFeatures(): OpenTypeFeatures|null; - - } export namespace FontAttribute { - type weight = textWeight; - type italic = textItalic; - type stretch = textStretch; - type underline = textUnderline; - type underlineColor = textUnderlineColor; +type weight = textWeight; +type italic = textItalic; +type stretch = textStretch; +type underline = textUnderline; +type underlineColor = textUnderlineColor; } export class OpenTypeFeatures { - add(tag: string, value: number): void; - remove(tag: string): void; - get(tag: string): number; - forEach(cb: (feat: OpenTypeFeatures, str: string, val: number) => boolean): void; - clone(): OpenTypeFeatures; + public add(tag: string, value: number): void; + public remove(tag: string): void; + public get(tag: string): number; + public forEach(cb: (feat: OpenTypeFeatures, str: string, val: number) => boolean): + void; + public clone(): OpenTypeFeatures; } export class Color { - r: number; - g: number; - b: number; - a: number; + public r: number; + public g: number; + public b: number; + public a: number; constructor(r: number, g: number, b: number, a: number); constructor(other: Color); } export class Point { - x: number; - y: number; + public x: number; + public y: number; constructor(x: number, y: number); constructor(other: Point); } export class Size { - w: number; - h: number; + public w: number; + public h: number; constructor(w: number, h: number); } export class BrushGradientStop { - pos: number; - color: Color; + public pos: number; + public color: Color; constructor(pos: number, color: Color); } export class AttributedString { constructor(str: string); - toString(): string; - toStringLen(): number; - appendAttributed(str: string, ...attribute: FontAttribute[]): void; - appendUnattributed(str: string): void; - insertAttributed(str: string, start: number, ...attribute: FontAttribute[]): void; - insertUnattributed(str: string, at: number): void; - deleteString(start: number, end: number): void; - setAttribute(attr: FontAttribute, start: number, end: number): void; - forEach(cb: (str: AttributedString, attr: FontAttribute, start: number, - end: number) => boolean): void; - numGraphemes(): number; - byteIndexToGrapheme(pos: number): number; - graphemeToByteIndex(pos: number): number; + public toString(): string; + public toStringLen(): number; + public appendAttributed(str: string, ...attribute: FontAttribute[]): void; + public appendUnattributed(str: string): void; + public insertAttributed(str: string, start: number, + ...attribute: FontAttribute[]): void; + public insertUnattributed(str: string, at: number): void; + public deleteString(start: number, end: number): void; + public setAttribute(attr: FontAttribute, start: number, end: number): void; + public forEach(cb: (str: AttributedString, attr: FontAttribute, start: number, + end: number) => boolean): void; + public numGraphemes(): number; + public byteIndexToGrapheme(pos: number): number; + public graphemeToByteIndex(pos: number): number; } /** @@ -193,6 +198,33 @@ export class AttributedString { * more than one, you have to use [Containers](containers.md). */ export class UiWindow { + + /** + * Set or return the text to show in window title bar. + */ + public title: string; + + /** + * Set or return the size in pixel of the content area of the window + * (excluding the size of the window decoration). This mean that if you set window + * size to 0,0 you still see title bar and OS window buttons. + */ + public contentSize: {width: number; height: number}; + + /** + * When true, an internal margin is added to the window. + */ + public margined: boolean; + + /** + * When true, the window is displayed without a border. + */ + public borderless: boolean; + + /** + * When true, the window is displayed in full screen mode. + */ + public fullscreen: boolean; /** * Create a new UiWindow object. * @@ -208,7 +240,7 @@ export class UiWindow { * Show the window. * LibUi always returns null */ - show(): void; + public show(): void; /** * Add a listener to the `closing` event. This event is emitted when the OS @@ -217,7 +249,7 @@ export class UiWindow { * * @param callback - callback to execute when the event is fired. */ - onClosing(callback: () => any): void; + public onClosing(callback: () => any): void; /** * Add a listener to the `contentSizeChanged` event. This event is emitted @@ -225,24 +257,12 @@ export class UiWindow { * * @param callback - callback to execute when the event is fired. */ - onContentSizeChanged(callback: Function): void; + public onContentSizeChanged(callback: () => void): void; /** * Close the window. */ - close(): void; - - /** - * Set or return the text to show in window title bar. - */ - title: string; - - /** - * Set or return the size in pixel of the content area of the window - * (excluding the size of the window decoration). This mean that if you set window - * size to 0,0 you still see title bar and OS window buttons. - */ - contentSize: {width: number; height: number}; + public close(): void; /** * Set the control to show in this window content area. @@ -252,22 +272,7 @@ export class UiWindow { * @param control - the control to add as child. * @param stretchy - whever the control should fill all the available space. */ - setChild(control: UiControl): void; - - /** - * When true, an internal margin is added to the window. - */ - margined: boolean; - - /** - * When true, the window is displayed without a border. - */ - borderless: boolean; - - /** - * When true, the window is displayed in full screen mode. - */ - fullscreen: boolean; + public setChild(control: UiControl): void; } /** @@ -277,15 +282,15 @@ export abstract class UiControl { /** * Set or return whether the control is enabled. */ - enabled: boolean; + public enabled: boolean; /** * Set or return whether the control is visible. */ - visible: boolean; + public visible: boolean; /** * Set or return whether the control is a top level one. */ - toplevel: boolean; + public toplevel: boolean; /** * Create a new UiControl object. */ @@ -332,150 +337,162 @@ export class UiArea extends UiControl { /** * Force a redraw of the area (calls draw callback). */ - queueRedrawAll(): void; + public queueRedrawAll(): void; /** * Let the mouse move the window (only callable in the draw callback) */ - beginWindowMove(): void; + public beginWindowMove(): void; /** * Let the mouse resize the window (only callable in the draw callback) * @param edge - the size which is held by the mouse */ - beginWindowResize(edge: number): void; + public beginWindowResize(edge: number): void; - setSize(w: number, h: number): void; + public setSize(w: number, h: number): void; - scrollTo(x: number, y: number, w: number, h: number): void; + public scrollTo(x: number, y: number, w: number, h: number): void; } export class UiAreaMouseEvent { + + public readonly x: number; + public readonly y: number; + public readonly areaWidth: number; + public readonly areaHeight: number; + public readonly down: number; + public readonly up: number; + public readonly count: number; + public readonly modifiers: number; + public readonly held1To64: number; constructor(x: number, y: number, areaWidth: number, areaHeight: number, down: boolean, up: boolean, count: number, modifiers: any, held1To64: any); - - readonly x: number; - readonly y: number; - readonly areaWidth: number; - readonly areaHeight: number; - readonly down: number; - readonly up: number; - readonly count: number; - readonly modifiers: number; - readonly held1To64: number; } export namespace UiAreaKeyEvent { - enum modifierKeys { ctrl, alt, shift, super } - - enum extKeys { - escape, - insert, // equivalent to "Help" on Apple keyboards - delete, - home, - end, - pageUp, - pageDown, - up, - down, - left, - right, - f1, // F1..F12 are guaranteed to be consecutive - f2, - f3, - f4, - f5, - f6, - f7, - f8, - f9, - f10, - f11, - f12, - n0, // numpad keys; independent of Num Lock state - n1, // N0..N9 are guaranteed to be consecutive - n2, - n3, - n4, - n5, - n6, - n7, - n8, - n9, - nDot, - nEnter, - nAdd, - nSubtract, - nMultiply, - nDivide - } +enum modifierKeys { + ctrl, + alt, + shift, + super, +} + +enum extKeys { + escape, + insert, // equivalent to "Help" on Apple keyboards + delete, + home, + end, + pageUp, + pageDown, + up, + down, + left, + right, + f1, // F1..F12 are guaranteed to be consecutive + f2, + f3, + f4, + f5, + f6, + f7, + f8, + f9, + f10, + f11, + f12, + n0, // numpad keys; independent of Num Lock state + n1, // N0..N9 are guaranteed to be consecutive + n2, + n3, + n4, + n5, + n6, + n7, + n8, + n9, + nDot, + nEnter, + nAdd, + nSubtract, + nMultiply, + nDivide, +} } export class UiAreaKeyEvent { + + public key: string; + public extKey: UiAreaKeyEvent.extKeys; + public modifier: UiAreaKeyEvent.modifierKeys; + public modifiers: number; + public up: number; constructor(key: number, extKey: number, modifier: string, modifiers: any, up: boolean); - - key: string; - extKey: UiAreaKeyEvent.extKeys; - modifier: UiAreaKeyEvent.modifierKeys; - modifiers: number; - up: number; - - } - - export const UiDialogs: { openFile(parent: UiWindow): string|null; saveFile(parent: UiWindow): string | null; msgBox(parent: UiWindow, title: string, description: string): void; msgBoxError(parent: UiWindow, title: string, description: string): void; }; - export namespace DrawBrush { - enum brushType { solid, linearGradient, radialGradient } +enum brushType { + solid, + linearGradient, + radialGradient, +} } export namespace DrawStrokeParams { - enum lineCap { flat, round, square } +enum lineCap { + flat, + round, + square, +} - enum lineJoin { miter, round, bevel } +enum lineJoin { + miter, + round, + bevel, +} } /** * A draw brush */ export class DrawBrush { - constructor(); - color: Color; + public color: Color; - type: DrawBrush.brushType; + public type: DrawBrush.brushType; /** * The gradient stops */ - stops: BrushGradientStop[]; + public stops: BrushGradientStop[]; /** * Set the start position of the gradient * (Radial gradients: the inner circle's center) * @param pos - the coordinates */ - start: Point; + public start: Point; /** * The end position of the gradient * (Radial gradients: the outer circle's center) */ - end: Point; + public end: Point; /** * The radius of the gradient's outer circle (radial gradients only) */ - outerRadius: number; + public outerRadius: number; + constructor(); } declare enum fillMode { winding, alternate } @@ -483,93 +500,99 @@ declare enum fillMode { winding, alternate } export class UiDrawPath { constructor(mode?: fillMode); - addRectangle(x: number, y: number, width: number, height: number): void; + public addRectangle(x: number, y: number, width: number, height: number): void; - newFigure(x: number, y: number): void; + public newFigure(x: number, y: number): void; - newFigureWithArc(xCenter: number, yCenter: number, radius: number, startAngle: number, - sweep: number, negative: number): void; + public newFigureWithArc(xCenter: number, yCenter: number, radius: number, + startAngle: number, sweep: number, negative: number): void; - lineTo(x: number, y: number): void; + public lineTo(x: number, y: number): void; - arcTo(xCenter: number, yCenter: number, radius: number, startAngle: number, - sweep: number, negative: boolean): void; + public arcTo( + xCenter: number, + yCenter: number, + radius: number, + startAngle: number, + sweep: number, + negative: boolean, + ): void; - bezierTo(c1x: number, c1y: number, c2x: number, c2y: number, endX: number, - endY: number): void; + public bezierTo(c1x: number, c1y: number, c2x: number, c2y: number, endX: number, + endY: number): void; - closeFigure(): void; + public closeFigure(): void; - end(): void; + public end(): void; } export class DrawStrokeParams { - thickness: number; - cap: DrawStrokeParams.lineCap; - join: DrawStrokeParams.lineJoin; - miterLimit: number; + public thickness: number; + public cap: DrawStrokeParams.lineCap; + public join: DrawStrokeParams.lineJoin; + public miterLimit: number; - dashes: number[]; - dashPhase: number; + public dashes: number[]; + public dashPhase: number; } export class UiDrawMatrix { + + public readonly 0: [number]; + public readonly 1: [number]; + public readonly 2: [number]; constructor(); - setIdentity(): void; + public setIdentity(): void; - scale(xCenter: number, yCenter: number, x: number, y: number): void; - translate(x: number, y: number): void; - rotate(x: number, y: number, amount: number): void; - skew(x: number, y: number, xAmount: number, yAmount: number): void; - multiply(m: number): void; - invertible(m: number): void; + public scale(xCenter: number, yCenter: number, x: number, y: number): void; + public translate(x: number, y: number): void; + public rotate(x: number, y: number, amount: number): void; + public skew(x: number, y: number, xAmount: number, yAmount: number): void; + public multiply(m: number): void; + public invertible(m: number): void; /** * returns true it it worked */ - invert(m: number): boolean; + public invert(m: number): boolean; - set(i: number, j: number, v: number): void; - get(i: number, j: number): number; - - readonly 0: [number]; - readonly 1: [number]; - readonly 2: [number]; + public set(i: number, j: number, v: number): void; + public get(i: number, j: number): number; } declare enum textAlign { left, center, right } export class DrawTextLayout { + + public readonly extents: Size; constructor(str: AttributedString, font: FontDescriptor, width: number, align: textAlign); - - readonly extents: Size; } /** * A static text label. */ export class UiLabel extends UiControl { - constructor(label?: string); - text: any; + public text: any; + constructor(label?: string); } /** * A container that organizes children as labeled fields. */ export class UiForm extends UiControl { - /** - * Create a new UiForm object. - */ - constructor(); /** * If true, the container inserts some space between children. */ - padded: boolean; + public padded: boolean; + /** + * Create a new UiForm object. + */ + constructor(); /** * Append a new child control as the last field with the specified label. @@ -577,13 +600,13 @@ export class UiForm extends UiControl { * @param control - the control to add as child. * @param stretchy - whether the control should fill all the available space. */ - append(label: string, control: UiControl, stretchy?: boolean): void; + public append(label: string, control: UiControl, stretchy?: boolean): void; /** * Remove a child control at the specified position. * @param index - the index of the control to remove */ - deleteAt(index: number): void; + public deleteAt(index: number): void; } /** @@ -593,18 +616,18 @@ export abstract class UiEntryBase extends UiControl { /** * Set or return the the content of the entry. */ - text: string; + public text: string; /** * Whether the user is allowed to change the entry's contents. */ - readOnly: boolean; + public readOnly: boolean; /** * Add a listener to the `changed` event. Emitted whenever the entry contents * changed. * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => any): void; + public onChanged(callback: () => any): void; } /** @@ -618,27 +641,27 @@ export class UiEntry extends UiEntryBase { * A multiline text entry. */ export class UiMultilineEntry extends UiControl { - /** - * Create a new UiMultilineEntry object. - * @param wrapping - whether the multiline entry wrap text. Defaults to false. - */ - constructor(wrapping?: boolean); /** * Set or return the the content of the multiline entry. */ - text: string; + public text: string; /** * Whether the user is allowed to change the entry's contents. */ - readOnly: boolean; + public readOnly: boolean; + /** + * Create a new UiMultilineEntry object. + * @param wrapping - whether the multiline entry wrap text. Defaults to false. + */ + constructor(wrapping?: boolean); /** * Append the specified text to the entry's contents. * @param text - the text to append. */ - append(text: string): void; + public append(text: string): void; /** * Add a listener to the `changed` event. Emitted whenever the entry's contents @@ -646,7 +669,7 @@ export class UiMultilineEntry extends UiControl { * * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => any): void; + public onChanged(callback: () => any): void; } /** @@ -677,20 +700,20 @@ export abstract class UiBox extends UiControl { /** * If true, the container inserts some space between children. */ - padded: boolean; + public padded: boolean; /** * Append a new child control as the last child. * @param control - the control to add as a child. * @param stretchy - whever the control should fill all the available space. */ - append(control: UiControl, stretchy?: boolean): void; + public append(control: UiControl, stretchy?: boolean): void; /** * Remove a child control at specified position. * @param index - the index of the control to remove */ - deleteAt(index: number): void; + public deleteAt(index: number): void; } /** @@ -712,6 +735,16 @@ export class UiVerticalBox extends UiBox { * it's child. */ export class UiGroup extends UiControl { + + /** + * Set or return the text to show in group caption. + */ + public title: string; + + /** + * When true, an internal margin is added to the group. + */ + public margined: boolean; /** * Create a new UiGroup object. * @@ -719,11 +752,6 @@ export class UiGroup extends UiControl { */ constructor(title?: string); - /** - * Set or return the text to show in group caption. - */ - title: string; - /** * Set the control to show in this group content area. * UiGroup instances can contain only one control. If you need @@ -731,39 +759,44 @@ export class UiGroup extends UiControl { * * @param control - the control to add as child. */ - setChild(control: UiControl): void; - - /** - * When true, an internal margin is added to the group. - */ - margined: boolean; + public setChild(control: UiControl): void; } export namespace UiGrid { - /** - * Enum defining the alignment of a control - */ - enum GridAlign { fill, start, center, end } +/** + * Enum defining the alignment of a control + */ +enum GridAlign { + fill, + start, + center, + end, +} - /** - * Enum defining the position where to insert a control into a grid - */ - enum GridAt { leading, top, trailing, bottom } +/** + * Enum defining the position where to insert a control into a grid + */ +enum GridAt { + leading, + top, + trailing, + bottom, +} } /** * A powerful container that allow to specify size and position of each children. */ export class UiGrid extends UiControl { - /** - * Create a new UiGrid object. - */ - constructor(); /** * If true, the container inserts some space between children. */ - padded: boolean; + public padded: boolean; + /** + * Create a new UiGrid object. + */ + constructor(); /** * Insert a new child control before specified control. @@ -779,9 +812,9 @@ export class UiGrid extends UiControl { * @param valign - whether the component is aligned with the other components in the * row. */ - insertAt(child: UiControl, before: UiControl, at: UiGrid.GridAt, xspan: number, - yspan: number, hexpand: number, halign: UiGrid.GridAlign, vexpan, - valign: UiGrid.GridAlign): void; + public insertAt(child: UiControl, before: UiControl, at: UiGrid.GridAt, xspan: number, + yspan: number, hexpand: number, halign: UiGrid.GridAlign, vexpan, + valign: UiGrid.GridAlign): void; /** * Insert a new child control. @@ -801,8 +834,17 @@ export class UiGrid extends UiControl { * @param valign - whether the component is aligned with the other components in the * row. */ - append(child: UiControl, left: number, top: number, xspan: number, yspan: number, - hexpand: number, halign: UiGrid.GridAlign, vexpand: number, valign: UiGrid.GridAlign): void; + public append( + child: UiControl, + left: number, + top: number, + xspan: number, + yspan: number, + hexpand: number, + halign: UiGrid.GridAlign, + vexpand: number, + valign: UiGrid.GridAlign, + ): void; } /** @@ -816,21 +858,21 @@ export class UiTab extends UiControl { * @param index - the index of the page to check. * @return `true` - whether the page has margins */ - getMargined(index: number): boolean; + public getMargined(index: number): boolean; /** * Add an internal margin to a page of the Tab. * @param index - the index of the page to set the margin on. * @param value - whether to enable or disable the margin. */ - setMargined(index: number, value: boolean): void; + public setMargined(index: number, value: boolean): void; /** * Append a new child control as last tab page. * @param label - the text to show for the new page caption. * @param control - the control to add as a child. */ - append(label: string, control: UiControl): void; + public append(label: string, control: UiControl): void; /** * Insert a new child control before specified position. @@ -838,40 +880,40 @@ export class UiTab extends UiControl { * @param before - the control will be inserted before this position * @param control - the control to insert */ - insertAt(label: string, before: number, control: UiControl): void; + public insertAt(label: string, before: number, control: UiControl): void; /** * Return the total number of tab pages contained in the control. */ - numPages(): number; + public numPages(): number; /** * Remove the tab and control at specified position. * @param index - the index of the tab to remove. */ - deleteAt(index: number): void; + public deleteAt(index: number): void; } /** * A simple button. */ export class UiButton extends UiControl { - /** - * Create a new UiButton object. - */ - constructor(label?: string); /** * Set or return the text of the button. */ - text: string; + public text: string; + /** + * Create a new UiButton object. + */ + constructor(label?: string); /** * Emitted when the button is clicked * * @param callback - callback to execute when the event is fired. */ - onClicked(callback: () => any): void; + public onClicked(callback: () => any): void; } /** @@ -881,22 +923,22 @@ export class UiRadioButtons extends UiControl { /** * Number of items in this radio buttons set */ - itemsCount: number; - /** - * Create a new UiRadioButtons object. - */ - constructor(); + public itemsCount: number; /** * Return or set the currently selected item by index. */ - selected: string; + public selected: string; + /** + * Create a new UiRadioButtons object. + */ + constructor(); /** * Append a new radio option as the last item with the specified text. * @param text - the text to append. */ - append(text: string): void; + public append(text: string): void; /** * Add a listener to the `selected` event. Emitted whenever the selected option @@ -904,22 +946,22 @@ export class UiRadioButtons extends UiControl { * * @param callback - callback to execute when the event is fired. */ - onSelected(callback: () => void): void; + public onSelected(callback: () => void): void; } /** * A button that opens a color palette popup. */ export class UiColorButton extends UiControl { - /** - * Create a new UiColorButton object. - */ - constructor(); /** * Set or return the ColorButton color value. */ - color: Color; + public color: Color; + /** + * Create a new UiColorButton object. + */ + constructor(); /** * Add a listener to the `changed` event. Emitted whenever the user @@ -927,22 +969,22 @@ export class UiColorButton extends UiControl { * * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => void): void; + public onChanged(callback: () => void): void; } /** * A button that opens a popup to choose a font. */ export class UiFontButton extends UiControl { - /** - * Create a new UiFontButton object. - */ - constructor(); /** * Return the FontButton font value. */ - readonly font: FontDescriptor; + public readonly font: FontDescriptor; + /** + * Create a new UiFontButton object. + */ + constructor(); /** * Add a listener to the `changed` event. Emitted whenever the user changed the @@ -950,13 +992,18 @@ export class UiFontButton extends UiControl { * * @param {Function} callback - callback to execute when the event is fired. */ - onChanged(callback: () => void): void; + public onChanged(callback: () => void): void; } /** * Horizontal slider to set numerical values. */ export class UiSlider extends UiControl { + + /** + * Set or return the the content of the slider. + */ + public value: number; /** * Create a new UiSlider object. * @param min - minimum value of the slider. default to `0` @@ -964,23 +1011,23 @@ export class UiSlider extends UiControl { */ constructor(min?: number, max?: number); - /** - * Set or return the the content of the slider. - */ - value: number; - /** * Add a listener to the `changed` event. Emitted whenever the slider value changed. * * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => void): void; + public onChanged(callback: () => void): void; } /** * An entry control for numerical values. */ export class UiSpinbox extends UiControl { + + /** + * Set or return the the content of spinbox. + */ + public value: number; /** * Create a new UiSpinbox object. * @param min - minimum value of the spinbox. defaults to `0` @@ -988,65 +1035,60 @@ export class UiSpinbox extends UiControl { */ constructor(min?: number, max?: number); - /** - * Set or return the the content of spinbox. - */ - value: number; - /** * Add a listener to the `changed` event. Emitted whenever the spinbox value changed. * * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => void): void; + public onChanged(callback: () => void): void; } /** * A checkbox control. */ export class UiCheckbox extends UiControl { - /** - * Create a new UiCheckbox object. - */ - constructor(label?: string); /** * Set or return the text label for the checkbox. */ - text: string; + public text: string; /** * Whether the control is checked. */ - checked: boolean; + public checked: boolean; + /** + * Create a new UiCheckbox object. + */ + constructor(label?: string); /** * Add a listener to the `toggled` event. Emitted whenever the control * `checked` state change. * @param callback - callback to execute when the event is fired. */ - onToggled(callback: () => any): void; + public onToggled(callback: () => any): void; } /** * A drop down combo box that allow list selection only. */ export class UiCombobox extends UiControl { - /** - * Create a new UiCombobox object. - */ - constructor(); /** * Return or set the current selected item by index. */ - selected: number; + public selected: number; + /** + * Create a new UiCombobox object. + */ + constructor(); /** * Append a new text item to the drop down list. * @param text - the item to append. */ - append(text: string): void; + public append(text: string): void; /** * Add a listener to the `selected` event. Emitted whenever the selected @@ -1054,7 +1096,7 @@ export class UiCombobox extends UiControl { * * @param callback - callback to execute when the event is fired. */ - onSelected(callback: () => any): void; + public onSelected(callback: () => any): void; } /** @@ -1062,21 +1104,21 @@ export class UiCombobox extends UiControl { * value. */ export class UiEditableCombobox extends UiControl { - /** - * Create a new UiEditableCombobox object. - */ - constructor(); /** * Return or set the current text. */ - text: string; + public text: string; + /** + * Create a new UiEditableCombobox object. + */ + constructor(); /** * Append a new text item to the drop down list. * @param text - the item to append. */ - append(text: string): void; + public append(text: string): void; /** * Add a listener to the `changed` event. Emitted whenever the text (or item) changes. @@ -1084,7 +1126,7 @@ export class UiEditableCombobox extends UiControl { * @param callback - callback to execute when the event is * fired. */ - onChanged(callback: () => any): void; + public onChanged(callback: () => any): void; } /** @@ -1119,14 +1161,14 @@ export abstract class DateTimePickerBase extends UiControl { /** * Set or return the date/time represented by the control. */ - time: Date; + public time: Date; /** * Add a listener to the `changed` event. Emitted whenever the entry contents changed. * * @param callback - callback to execute when the event is fired. */ - onChanged(callback: () => any): void; + public onChanged(callback: () => any): void; } /** @@ -1163,17 +1205,17 @@ export class UiDatePicker extends DateTimePickerBase { * Progress bar control. */ export class UiProgressBar extends UiControl { - /** - * Create a new UiProgressBar object. - */ - constructor(); /** * The current position of the progress bar. * * Can be set to `-1` to create an indeterminate progress bar. */ - value: number; + public value: number; + /** + * Create a new UiProgressBar object. + */ + constructor(); } /** @@ -1193,63 +1235,63 @@ export class UiMenu { * @param caption - The caption of the menu item. * @return the new appended UiMenuItem */ - appendItem(caption: string): UiMenuItem; + public appendItem(caption: string): UiMenuItem; /** * Append a menu button with a checkable option. * @param caption - The caption of the menu item. * @return the new appended UiMenuItem */ - appendCheckItem(caption: string): UiMenuItem; + public appendCheckItem(caption: string): UiMenuItem; /** * Append an OS-provided quit button. * @return the new appended UiMenuItem */ - appendQuitItem(): UiMenuItem; + public appendQuitItem(): UiMenuItem; /** * Append a OS-provided preferences button. * @return the new appended UiMenuItem */ - appendPreferencesItem(): UiMenuItem; + public appendPreferencesItem(): UiMenuItem; /** * Append an OS-provided about button. * @return the new appended UiMenuItem */ - appendAboutItem(): UiMenuItem; + public appendAboutItem(): UiMenuItem; /** * Append a separator between menu items. * @return the new appended UiMenuItem */ - appendSeparator(): UiMenuItem; + public appendSeparator(): UiMenuItem; } /** * A single button contained in a menu. */ export class UiMenuItem { + /** + * If the item is created using appendCheckItem, then set + * whether it is checked or not. + */ + public checked: boolean; + /** * Enable this menu item. */ - enable(): void; + public enable(): void; /** * Disable this menu item */ - disable(): void; + public disable(): void; /** * Register a callback for the click event of the menu item. * @param callback - the function to register as callback for the event. */ - onClicked(callback: () => void): void; - - /** - * If the item is created using appendCheckItem, then set - * whether it is checked or not. - */ - checked: boolean; + public onClicked(callback: () => void): void; } From 1c4c4b030e710650e40fc5a34f4b545acb4f36af Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 19:21:00 +0100 Subject: [PATCH 07/20] Example lint --- example/gallery-ts/tslint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/gallery-ts/tslint.json b/example/gallery-ts/tslint.json index 94a389c..dc5693e 100644 --- a/example/gallery-ts/tslint.json +++ b/example/gallery-ts/tslint.json @@ -8,7 +8,8 @@ "indent": [true, "spaces", 4], "max-classes-per-file": false, "align": [false, "parameters"], - "no-namespace": false + "no-namespace": false, + "quotemark": [true, "single", "jsx-double"] }, "rulesDirectory": [] } \ No newline at end of file From a0b69f6f34acba8afc533df68f59d5453c30dc03 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:33:14 +0100 Subject: [PATCH 08/20] Add getters and setters --- example/gallery-ts/index.ts | 1 + libui-napi.d.ts | 199 ++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/example/gallery-ts/index.ts b/example/gallery-ts/index.ts index 19655dd..e82c659 100644 --- a/example/gallery-ts/index.ts +++ b/example/gallery-ts/index.ts @@ -7,6 +7,7 @@ win.onClosing(() => { }); const btn = new UiButton('full'); +btn.setText('full screen'); btn.onClicked(() => { win.fullscreen = !win.fullscreen; btn.text = win.fullscreen ? 'normal' : 'fullscreen'; diff --git a/libui-napi.d.ts b/libui-napi.d.ts index b50b252..7f75337 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -85,6 +85,13 @@ export class FontDescriptor { */ constructor(family: string|object, size: number, weight: number, italic: number, stretch: number); + + /* getter/setters for public properties */ + public getFamily(): string; + public getSize(): number; + public getWeight(): textWeight; + public getItalic(): textItalic; + public getStretch(): number; } /** @@ -153,6 +160,16 @@ export class Color { public a: number; constructor(r: number, g: number, b: number, a: number); constructor(other: Color); + + /* getter/setters for public properties */ + public getR(): number; + public setR(value: number): void; + public getG(): number; + public setG(value: number): void; + public getB(): number; + public setB(value: number): void; + public getA(): number; + public setA(value: number): void; } export class Point { @@ -160,18 +177,36 @@ export class Point { public y: number; constructor(x: number, y: number); constructor(other: Point); + + /* getter/setters for public properties */ + public getX(): number; + public setX(value: number): void; + public getY(): number; + public setY(value: number): void; } export class Size { public w: number; public h: number; constructor(w: number, h: number); + + /* getter/setters for public properties */ + public getW(): number; + public setW(value: number): void; + public getH(): number; + public setH(value: number): void; } export class BrushGradientStop { public pos: number; public color: Color; constructor(pos: number, color: Color); + + /* getter/setters for public properties */ + public getPos(): number; + public setPos(value: number): void; + public getColor(): Color; + public setColor(value: Color): void; } export class AttributedString { @@ -236,6 +271,18 @@ export class UiWindow { */ constructor(title: string, width: number, height: number, hasMenubar: boolean); + /* getter/setters for public properties */ + public getTitle(): string; + public setTitle(value: string): void; + public getContentSize(): {width: number; height: number}; + public setContentSize(value: {width: number; height: number}): void; + public getMargined(): boolean; + public setMargined(value: boolean): void; + public getBorderless(): boolean; + public setBorderless(value: boolean): void; + public getFullscreen(): boolean; + public setFullscreen(value: boolean): void; + /** * Show the window. * LibUi always returns null @@ -295,6 +342,14 @@ export abstract class UiControl { * Create a new UiControl object. */ constructor(handle: any); + + /* getter/setters for public properties */ + public getEnabled(): boolean; + public setEnabled(value: boolean): void; + public getVisible(): boolean; + public setVisible(value: boolean): void; + public getToplevel(): boolean; + public setToplevel(value: boolean): void; } /** * An area to draw on. @@ -369,6 +424,17 @@ export class UiAreaMouseEvent { constructor(x: number, y: number, areaWidth: number, areaHeight: number, down: boolean, up: boolean, count: number, modifiers: any, held1To64: any); + + /* getter/setters for public properties */ + public getX(): number; + public getY(): number; + public getAreaWidth(): number; + public getAreaHeight(): number; + public getDown(): number; + public getUp(): number; + public getCount(): number; + public getModifiers(): number; + public getHeld1To64(): number; } export namespace UiAreaKeyEvent { @@ -431,6 +497,18 @@ export class UiAreaKeyEvent { public up: number; constructor(key: number, extKey: number, modifier: string, modifiers: any, up: boolean); + + /* getter/setters for public properties */ + public getKey(): string; + public setKey(value: string): void; + public getExtKey(): UiAreaKeyEvent.extKeys; + public setExtKey(value: UiAreaKeyEvent.extKeys): void; + public getModifier(): UiAreaKeyEvent.modifierKeys; + public setModifier(value: UiAreaKeyEvent.modifierKeys): void; + public getModifiers(): number; + public setModifiers(value: number): void; + public getUp(): number; + public setUp(value: number): void; } export const UiDialogs: { @@ -493,6 +571,20 @@ export class DrawBrush { */ public outerRadius: number; constructor(); + + /* getter/setters for public properties */ + public getColor(): Color; + public setColor(value: Color): void; + public getType(): DrawBrush.brushType; + public setType(value: DrawBrush.brushType): void; + public getStops(): BrushGradientStop[]; + public setStops(value: BrushGradientStop[]): void; + public getStart(): Point; + public setStart(value: Point): void; + public getEnd(): Point; + public setEnd(value: Point): void; + public getOuterRadius(): number; + public setOuterRadius(value: number): void; } declare enum fillMode { winding, alternate } @@ -535,6 +627,20 @@ export class DrawStrokeParams { public dashes: number[]; public dashPhase: number; + + /* getter/setters for public properties */ + public getThickness(): number; + public setThickness(value: number): void; + public getCap(): DrawStrokeParams.lineCap; + public setCap(value: DrawStrokeParams.lineCap): void; + public getJoin(): DrawStrokeParams.lineJoin; + public setJoin(value: DrawStrokeParams.lineJoin): void; + public getMiterLimit(): number; + public setMiterLimit(value: number): void; + public getDashes(): number[]; + public setDashes(value: number[]): void; + public getDashPhase(): number; + public setDashPhase(value: number): void; } export class UiDrawMatrix { @@ -543,6 +649,9 @@ export class UiDrawMatrix { public readonly 1: [number]; public readonly 2: [number]; constructor(); + public get0(): [number]; + public get1(): [number]; + public get2(): [number]; public setIdentity(): void; @@ -569,6 +678,7 @@ export class DrawTextLayout { public readonly extents: Size; constructor(str: AttributedString, font: FontDescriptor, width: number, align: textAlign); + public getExtents(): Size; } /** @@ -578,6 +688,10 @@ export class UiLabel extends UiControl { public text: any; constructor(label?: string); + + /* getter/setters for public properties */ + public getText(): any; + public setText(value: any): void; } /** @@ -594,6 +708,10 @@ export class UiForm extends UiControl { */ constructor(); + /* getter/setters for public properties */ + public getPadded(): boolean; + public setPadded(value: boolean): void; + /** * Append a new child control as the last field with the specified label. * @param label - the text to use as label of the field. @@ -622,6 +740,13 @@ export abstract class UiEntryBase extends UiControl { * Whether the user is allowed to change the entry's contents. */ public readOnly: boolean; + + /* getter/setters for public properties */ + public getText(): string; + public setText(value: string): void; + public getReadOnly(): boolean; + public setReadOnly(value: boolean): void; + /** * Add a listener to the `changed` event. Emitted whenever the entry contents * changed. @@ -657,6 +782,12 @@ export class UiMultilineEntry extends UiControl { */ constructor(wrapping?: boolean); + /* getter/setters for public properties */ + public getText(): string; + public setText(value: string): void; + public getReadOnly(): boolean; + public setReadOnly(value: boolean): void; + /** * Append the specified text to the entry's contents. * @param text - the text to append. @@ -702,6 +833,10 @@ export abstract class UiBox extends UiControl { */ public padded: boolean; + /* getter/setters for public properties */ + public getPadded(): boolean; + public setPadded(value: boolean): void; + /** * Append a new child control as the last child. * @param control - the control to add as a child. @@ -752,6 +887,12 @@ export class UiGroup extends UiControl { */ constructor(title?: string); + /* getter/setters for public properties */ + public getTitle(): string; + public setTitle(value: string): void; + public getMargined(): boolean; + public setMargined(value: boolean): void; + /** * Set the control to show in this group content area. * UiGroup instances can contain only one control. If you need @@ -793,11 +934,16 @@ export class UiGrid extends UiControl { * If true, the container inserts some space between children. */ public padded: boolean; + /** * Create a new UiGrid object. */ constructor(); + /* getter/setters for public properties */ + public getPadded(): boolean; + public setPadded(value: boolean): void; + /** * Insert a new child control before specified control. * @param child - the control to insert @@ -908,6 +1054,10 @@ export class UiButton extends UiControl { */ constructor(label?: string); + /* getter/setters for public properties */ + public getText(): string; + public setText(value: string): void; + /** * Emitted when the button is clicked * @@ -929,11 +1079,18 @@ export class UiRadioButtons extends UiControl { * Return or set the currently selected item by index. */ public selected: string; + /** * Create a new UiRadioButtons object. */ constructor(); + /* getter/setters for public properties */ + public getItemsCount(): number; + public setItemsCount(value: number): void; + public getSelected(): string; + public setSelected(value: string): void; + /** * Append a new radio option as the last item with the specified text. * @param text - the text to append. @@ -963,6 +1120,10 @@ export class UiColorButton extends UiControl { */ constructor(); + /* getter/setters for public properties */ + public getColor(): Color; + public setColor(value: Color): void; + /** * Add a listener to the `changed` event. Emitted whenever the user * changed the selected color. @@ -986,6 +1147,9 @@ export class UiFontButton extends UiControl { */ constructor(); + /* getter/setters for public properties */ + public getFont(): FontDescriptor; + /** * Add a listener to the `changed` event. Emitted whenever the user changed the * selected font. @@ -1011,6 +1175,10 @@ export class UiSlider extends UiControl { */ constructor(min?: number, max?: number); + /* getter/setters for public properties */ + public getValue(): number; + public setValue(value: number): void; + /** * Add a listener to the `changed` event. Emitted whenever the slider value changed. * @@ -1028,6 +1196,7 @@ export class UiSpinbox extends UiControl { * Set or return the the content of spinbox. */ public value: number; + /** * Create a new UiSpinbox object. * @param min - minimum value of the spinbox. defaults to `0` @@ -1035,6 +1204,10 @@ export class UiSpinbox extends UiControl { */ constructor(min?: number, max?: number); + /* getter/setters for public properties */ + public getValue(): number; + public setValue(value: number): void; + /** * Add a listener to the `changed` event. Emitted whenever the spinbox value changed. * @@ -1062,6 +1235,12 @@ export class UiCheckbox extends UiControl { */ constructor(label?: string); + /* getter/setters for public properties */ + public getText(): string; + public setText(value: string): void; + public getChecked(): boolean; + public setChecked(value: boolean): void; + /** * Add a listener to the `toggled` event. Emitted whenever the control * `checked` state change. @@ -1084,6 +1263,10 @@ export class UiCombobox extends UiControl { */ constructor(); + /* getter/setters for public properties */ + public getSelected(): number; + public setSelected(value: number): void; + /** * Append a new text item to the drop down list. * @param text - the item to append. @@ -1114,6 +1297,10 @@ export class UiEditableCombobox extends UiControl { */ constructor(); + /* getter/setters for public properties */ + public getText(): string; + public setText(value: string): void; + /** * Append a new text item to the drop down list. * @param text - the item to append. @@ -1163,6 +1350,10 @@ export abstract class DateTimePickerBase extends UiControl { */ public time: Date; + /* getter/setters for public properties */ + public getTime(): Date; + public setTime(value: Date): void; + /** * Add a listener to the `changed` event. Emitted whenever the entry contents changed. * @@ -1216,6 +1407,10 @@ export class UiProgressBar extends UiControl { * Create a new UiProgressBar object. */ constructor(); + + /* getter/setters for public properties */ + public getValue(): number; + public setValue(value: number): void; } /** @@ -1279,6 +1474,10 @@ export class UiMenuItem { */ public checked: boolean; + /* getter/setters for public properties */ + public getChecked(): boolean; + public setChecked(value: boolean): void; + /** * Enable this menu item. */ From 2d10522110895397029765c8c51227578226df90 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:42:20 +0100 Subject: [PATCH 09/20] Add startTimer arguments --- libui-napi.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 7f75337..9415ef7 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -98,12 +98,13 @@ export class FontDescriptor { * Stop Libui event loop */ export function stopLoop(): void; + /** * Start Libui event loop */ export function startLoop(): void; -export function startTimer(): void; +export function startTimer(timeoutMs: number, callback: () => number): void; export function onShouldQuit(cb: () => void): void; From e194deea96dc512cb0cf93e5b81e28e15f7f75c4 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:47:14 +0100 Subject: [PATCH 10/20] onClosing cb return a void --- libui-napi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 9415ef7..999dd5c 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -297,7 +297,7 @@ export class UiWindow { * * @param callback - callback to execute when the event is fired. */ - public onClosing(callback: () => any): void; + public onClosing(callback: () => void): void; /** * Add a listener to the `contentSizeChanged` event. This event is emitted From 72dbd5f58c2f2dc13bc75ea7914c7310bc8ac901 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:53:54 +0100 Subject: [PATCH 11/20] UiLabel text is a string not any --- libui-napi.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 999dd5c..ef2c5ec 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -646,13 +646,13 @@ export class DrawStrokeParams { export class UiDrawMatrix { - public readonly 0: [number]; - public readonly 1: [number]; - public readonly 2: [number]; + public readonly 0: number; + public readonly 1: number; + public readonly 2: number; constructor(); - public get0(): [number]; - public get1(): [number]; - public get2(): [number]; + public get0(): number; + public get1(): number; + public get2(): number; public setIdentity(): void; @@ -687,12 +687,12 @@ export class DrawTextLayout { */ export class UiLabel extends UiControl { - public text: any; + public text: string; constructor(label?: string); /* getter/setters for public properties */ - public getText(): any; - public setText(value: any): void; + public getText(): string; + public setText(value: string): void; } /** From 086d6304c9e781672911d1d7643e3aefec18ebd8 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:55:59 +0100 Subject: [PATCH 12/20] UiRadioButtons selected is a numbre not a string --- libui-napi.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index ef2c5ec..ee7b5da 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -1079,7 +1079,7 @@ export class UiRadioButtons extends UiControl { /** * Return or set the currently selected item by index. */ - public selected: string; + public selected: number; /** * Create a new UiRadioButtons object. @@ -1089,8 +1089,8 @@ export class UiRadioButtons extends UiControl { /* getter/setters for public properties */ public getItemsCount(): number; public setItemsCount(value: number): void; - public getSelected(): string; - public setSelected(value: string): void; + public getSelected(): number; + public setSelected(value: number): void; /** * Append a new radio option as the last item with the specified text. From 6a652466d32ca27dd1db94a699ca5db44dc1404d Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:57:04 +0100 Subject: [PATCH 13/20] UICombobox onSelected cb return void --- libui-napi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index ee7b5da..3d4a1a1 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -1280,7 +1280,7 @@ export class UiCombobox extends UiControl { * * @param callback - callback to execute when the event is fired. */ - public onSelected(callback: () => any): void; + public onSelected(callback: () => void): void; } /** From bbae53e39392097e9826183f994b2ab8184920f5 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Sun, 9 Dec 2018 20:57:31 +0100 Subject: [PATCH 14/20] UiEditableCombobox cb return void --- libui-napi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 3d4a1a1..c0958f8 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -1314,7 +1314,7 @@ export class UiEditableCombobox extends UiControl { * @param callback - callback to execute when the event is * fired. */ - public onChanged(callback: () => any): void; + public onChanged(callback: () => void): void; } /** From 75852ceafb0a3908e5dfb739d9fe451fef09fea8 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Sun, 9 Dec 2018 21:11:12 +0100 Subject: [PATCH 15/20] Fix enums and forEach return types --- libui-napi.d.ts | 197 ++++++++++++++++++++++++++---------------------- 1 file changed, 107 insertions(+), 90 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 7f75337..0ab363c 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -1,50 +1,3 @@ -declare enum textWeight { - minimum, - thin, - ultraLight, - light, - book, - normal, - medium, - semiBold, - bold, - ultraBold, - heavy, - ultraHeavy, - maximum, -} - -declare enum textItalic { normal, oblique, italic } - -declare enum textStretch { - ultraCondensed, - extraCondensed, - condensed, - semiCondensed, - normal, - semiExpanded, - expanded, - extraExpanded, - ultraExpanded, -} - -declare enum textAttributeType { - family, - size, - weight, - italic, - stretch, - color, - background, - underline, - underlineColor, - features, -} - -declare enum textUnderline { none, single, double, suggestion } - -declare enum textUnderlineColor { custom, spelling, grammar, auxiliary } - /** * An object that contains information on a system font. */ @@ -63,12 +16,12 @@ export class FontDescriptor { /** * Return weight of the font. */ - public readonly weight: textWeight; + public readonly weight: FontAttribute.weight; /** * Return `1` if the font is italic, otherwise `0`. */ - public readonly italic: textItalic; + public readonly italic: FontAttribute.italic; /** * Return horizontal stretch value for the font. @@ -89,8 +42,8 @@ export class FontDescriptor { /* getter/setters for public properties */ public getFamily(): string; public getSize(): number; - public getWeight(): textWeight; - public getItalic(): textItalic; + public getWeight(): FontAttribute.weight; + public getItalic(): FontAttribute.italic; public getStretch(): number; } @@ -107,49 +60,108 @@ export function startTimer(): void; export function onShouldQuit(cb: () => void): void; -type UnderlineColor = { - type: textAttributeType; color: Color | null; -}|null; +interface UnderlineColor { + type: FontAttribute.type; + color: Color|null; +} export class FontAttribute { public static newFamily(v: string): FontAttribute; public static newSize(v: number): FontAttribute; - public static newWeight(v: textWeight): FontAttribute; - public static newItalic(v: textItalic): FontAttribute; - public static newStretch(v: textStretch): FontAttribute; + public static newWeight(v: FontAttribute.weight): FontAttribute; + public static newItalic(v: FontAttribute.italic): FontAttribute; + public static newStretch(v: FontAttribute.stretch): FontAttribute; public static newColor(c: Color): FontAttribute; public static newBackgroundColor(c: Color): FontAttribute; - public static newUnderline(v: textUnderline): FontAttribute; - public static newUnderlineColor(type: textUnderlineColor, + public static newUnderline(v: FontAttribute.underline): FontAttribute; + public static newUnderlineColor(type: FontAttribute.underlineColor, color?: Color): FontAttribute; public static newOTFeatures(otf: OpenTypeFeatures): FontAttribute; - public static getFamily(): string|null; - public static getSize(): number|null; - public static getWeight(): textWeight|null; - public static getItalic(): textItalic|null; - public static getStretch(): textStretch|null; - public static getColor(): Color|null; - public static getUnderline(): textUnderline|null; - public static getUnderlineColor(): UnderlineColor; - public static getOTFeatures(): OpenTypeFeatures|null; constructor(other: FontAttribute); + + public getFamily(): string|null; + public getSize(): number|null; + public getWeight(): FontAttribute.weight|null; + public getItalic(): FontAttribute.italic|null; + public getStretch(): FontAttribute.stretch|null; + public getColor(): Color|null; + public getUnderline(): FontAttribute.underline|null; + public getUnderlineColor(): UnderlineColor|null; + public getOTFeatures(): OpenTypeFeatures|null; + + public getAttributeType(): FontAttribute.type; } export namespace FontAttribute { -type weight = textWeight; -type italic = textItalic; -type stretch = textStretch; -type underline = textUnderline; -type underlineColor = textUnderlineColor; +export enum weight { + minimum, + thin, + ultraLight, + light, + book, + normal, + medium, + semiBold, + bold, + ultraBold, + heavy, + ultraHeavy, + maximum, +} + +export enum italic { + normal, + oblique, + italic, +} + +export enum stretch { + ultraCondensed, + extraCondensed, + condensed, + semiCondensed, + normal, + semiExpanded, + expanded, + extraExpanded, + ultraExpanded, +} + +export enum type { + family, + size, + weight, + italic, + stretch, + color, + background, + underline, + underlineColor, + features, +} + +export enum underline { + none, + single, + double, + suggestion, +} + +export enum underlineColor { + custom, + spelling, + grammar, + auxiliary, +} } export class OpenTypeFeatures { public add(tag: string, value: number): void; public remove(tag: string): void; public get(tag: string): number; - public forEach(cb: (feat: OpenTypeFeatures, str: string, val: number) => boolean): - void; + public forEach(cb: (feat: OpenTypeFeatures, str: string, val: number) => boolean | + void): void; public clone(): OpenTypeFeatures; } @@ -221,7 +233,7 @@ export class AttributedString { public deleteString(start: number, end: number): void; public setAttribute(attr: FontAttribute, start: number, end: number): void; public forEach(cb: (str: AttributedString, attr: FontAttribute, start: number, - end: number) => boolean): void; + end: number) => boolean | void): void; public numGraphemes(): number; public byteIndexToGrapheme(pos: number): number; public graphemeToByteIndex(pos: number): number; @@ -518,7 +530,7 @@ export const UiDialogs: { }; export namespace DrawBrush { -enum brushType { +export enum type { solid, linearGradient, radialGradient, @@ -546,7 +558,7 @@ export class DrawBrush { public color: Color; - public type: DrawBrush.brushType; + public type: DrawBrush.type; /** * The gradient stops @@ -575,8 +587,8 @@ export class DrawBrush { /* getter/setters for public properties */ public getColor(): Color; public setColor(value: Color): void; - public getType(): DrawBrush.brushType; - public setType(value: DrawBrush.brushType): void; + public getType(): DrawBrush.type; + public setType(value: DrawBrush.type): void; public getStops(): BrushGradientStop[]; public setStops(value: BrushGradientStop[]): void; public getStart(): Point; @@ -587,10 +599,8 @@ export class DrawBrush { public setOuterRadius(value: number): void; } -declare enum fillMode { winding, alternate } - export class UiDrawPath { - constructor(mode?: fillMode); + constructor(mode?: UiDrawPath.fillMode); public addRectangle(x: number, y: number, width: number, height: number): void; @@ -618,6 +628,13 @@ export class UiDrawPath { public end(): void; } +export namespace UiDrawPath { +export enum fillMode { + winding, + alternate, +} +} + export class DrawStrokeParams { public thickness: number; @@ -907,7 +924,7 @@ export namespace UiGrid { /** * Enum defining the alignment of a control */ -enum GridAlign { +export enum align { fill, start, center, @@ -917,7 +934,7 @@ enum GridAlign { /** * Enum defining the position where to insert a control into a grid */ -enum GridAt { +export enum at { leading, top, trailing, @@ -958,9 +975,9 @@ export class UiGrid extends UiControl { * @param valign - whether the component is aligned with the other components in the * row. */ - public insertAt(child: UiControl, before: UiControl, at: UiGrid.GridAt, xspan: number, - yspan: number, hexpand: number, halign: UiGrid.GridAlign, vexpan, - valign: UiGrid.GridAlign): void; + public insertAt(child: UiControl, before: UiControl, at: UiGrid.at, xspan: number, + yspan: number, hexpand: number, halign: UiGrid.align, vexpan, + valign: UiGrid.align): void; /** * Insert a new child control. @@ -987,9 +1004,9 @@ export class UiGrid extends UiControl { xspan: number, yspan: number, hexpand: number, - halign: UiGrid.GridAlign, + halign: UiGrid.align, vexpand: number, - valign: UiGrid.GridAlign, + valign: UiGrid.align, ): void; } From f66e55c2205eff0ab08553d9d71e42a5f58fc504 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Sun, 9 Dec 2018 21:27:14 +0100 Subject: [PATCH 16/20] typeings: AreaDrawContext --- libui-napi.d.ts | 69 ++++++++++++++++++++++++++++++++++++++++++++----- tslint.json | 3 ++- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index 1df72af..1b3834f 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -364,6 +364,63 @@ export abstract class UiControl { public getToplevel(): boolean; public setToplevel(value: boolean): void; } + +export class AreaDrawContext { + /** + * Draw a path (the outline). + * @param path - the path to draw + * @param brush - the brush to draw with + * @param stroke - the stroke params to draw with + */ + public stroke(path: UiDrawPath, brush: DrawBrush, stroke: DrawStrokeParams): void; + + /** + * Draw a path (filled). + * @param path - the path to draw + * @param brush - the brush to draw with + */ + public fill(path: UiDrawPath, brush: DrawBrush): void; + + /** + * Apply a matrix transformation + * @param matrix - the matrix to apply + */ + public transform(matrix: UiDrawMatrix): void; + + public clip(path: UiDrawPath): void; + + /** + * Save a transformation state. + */ + public save(): void; + + /** + * Restore a transformation state. + */ + public restore(): void; + + public text(x: number, y: number, textLayout: DrawTextLayout): void; +} + +declare class AreaDrawParams { + public context: AreaDrawContext; + public areaWidth: number; + public areaHeight: number; + public clipX: number; + public clipY: number; + public clipWidth: number; + public clipHeight: number; + + /* getters for public properties */ + public getContext(): AreaDrawContext; + public getAreaWidth(): number; + public getAreaHeight(): number; + public getClipX(): number; + public getClipY(): number; + public getClipWidth(): number; + public getClipHeight(): number; +} + /** * An area to draw on. */ @@ -377,12 +434,12 @@ export class UiArea extends UiControl { * @param keyEvent - callback for key events */ constructor( - // TODO params - draw: (uiArea: UiArea, p: any) => any, - mouse: (uiArea: UiArea, evt: UiAreaMouseEvent) => any, - mouseCrossed: (uiArea: UiArea, evt: UiAreaMouseEvent) => any, - dragBroken: (uiArea: UiArea) => any, - key: (uiArea: UiArea, evt: UiAreaKeyEvent) => any); + draw: (uiArea: UiArea, p: AreaDrawParams) => void, + mouse: (uiArea: UiArea, evt: UiAreaMouseEvent) => void, + mouseCrossed: (uiArea: UiArea, evt: UiAreaMouseEvent) => void, + dragBroken: (uiArea: UiArea) => void, + key: (uiArea: UiArea, evt: UiAreaKeyEvent) => void, + ); /** * Create a new UiArea object. diff --git a/tslint.json b/tslint.json index ffffdaf..c744e95 100644 --- a/tslint.json +++ b/tslint.json @@ -8,7 +8,8 @@ "indent": [true, "tabs"], "max-classes-per-file": false, "align": [false, "parameters"], - "no-namespace": false + "no-namespace": false, + "interface-name": [false] }, "rulesDirectory": [] } \ No newline at end of file From 3830bb382245556d3510d3ba36df3d404cb951df Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Sun, 9 Dec 2018 21:50:26 +0100 Subject: [PATCH 17/20] Use tsc instead of tslint --- example/area-adv.js | 16 ++++----- example/area-scrolling.js | 4 +-- example/area.js | 35 ++++++++------------ example/core-api.js | 4 +-- example/event-loop.js | 12 +++---- example/forms.js | 12 +++---- example/grid.js | 2 +- example/text.js | 2 +- package-lock.json | 68 +++------------------------------------ package.json | 4 +-- tslint.json | 15 --------- 11 files changed, 46 insertions(+), 128 deletions(-) delete mode 100644 tslint.json diff --git a/example/area-adv.js b/example/area-adv.js index 6515616..f0dd13c 100644 --- a/example/area-adv.js +++ b/example/area-adv.js @@ -2,7 +2,7 @@ const libui = require('..'); const solidBrush = new libui.DrawBrush(); -solidBrush.type = libui.brushType.solid; +solidBrush.type = libui.DrawBrush.type.solid; solidBrush.color = new libui.Color(1, 0, 0, 1); console.log(solidBrush.color) @@ -12,7 +12,7 @@ dashedStroke.dashes = [10, 5]; console.log(dashedStroke.dashes); const linearBrush = new libui.DrawBrush(); -linearBrush.type = libui.brushType.linearGradient; +linearBrush.type = libui.DrawBrush.type.linearGradient; linearBrush.start = new libui.Point(0, 0); linearBrush.end = new libui.Point(200, 200); console.log(linearBrush.end) @@ -22,7 +22,7 @@ linearBrush.stops = [ ]; const radialBrush = new libui.DrawBrush(); -radialBrush.type = libui.brushType.radialGradient; +radialBrush.type = libui.DrawBrush.type.radialGradient; radialBrush.start = new libui.Point(250, 300); radialBrush.end = new libui.Point(250, 300); radialBrush.outerRadius = 40; @@ -37,26 +37,26 @@ matrix.setIdentity(); matrix.rotate(70, 280, (Math.PI / 180) * 45) function handlerDraw(area, p) { - let path = new libui.UiDrawPath(libui.fillMode.winding); + let path = new libui.UiDrawPath(libui.UiDrawPath.fillMode.winding); path.addRectangle(0, 0, 200, 200); path.end(); p.context.fill(path, linearBrush); // ------ - path = new libui.UiDrawPath(libui.fillMode.winding); + path = new libui.UiDrawPath(libui.UiDrawPath.fillMode.winding); path.newFigure(0, 0); path.arcTo(250, 300, 50, 0, 2 * Math.PI, false); path.end(); p.context.fill(path, radialBrush); - path = new libui.UiDrawPath(libui.fillMode.winding); + path = new libui.UiDrawPath(libui.UiDrawPath.fillMode.winding); path.newFigure(250, 20); path.lineTo(300, 150); path.end(); p.context.stroke(path, solidBrush, dashedStroke); - path = new libui.UiDrawPath(libui.fillMode.winding); + path = new libui.UiDrawPath(libui.UiDrawPath.fillMode.winding); p.context.transform(matrix); path.addRectangle(20, 230, 100, 100); path.end(); @@ -70,7 +70,7 @@ function onKey() { } function main() { - const mainwin = new libui.UiWindow('Area Advanced', 400, 400, 1); + const mainwin = new libui.UiWindow('Area Advanced', 400, 400, true); mainwin.margined = true; mainwin.onClosing(() => { mainwin.close(); diff --git a/example/area-scrolling.js b/example/area-scrolling.js index e5ec118..8979676 100644 --- a/example/area-scrolling.js +++ b/example/area-scrolling.js @@ -2,14 +2,14 @@ const libui = require('..'); const win = new libui.UiWindow('Area window', 600, 400, false); -win.margined = 1; +win.margined = true; win.onClosing(() => { libui.stopLoop(); }); const hBox = new libui.UiHorizontalBox(); -const brushRed = new libui.DrawBrush(1, 0, 0); +const brushRed = new libui.DrawBrush(); brushRed.color = new libui.Color(1, 0, 0, 1); const area = new libui.UiArea( diff --git a/example/area.js b/example/area.js index 307d78d..f6a7e6a 100644 --- a/example/area.js +++ b/example/area.js @@ -2,7 +2,7 @@ const libui = require('..'); const win = new libui.UiWindow('Area window', 600, 400, false); -win.margined = 1; +win.margined = true; win.onClosing(() => { libui.stopLoop(); }); @@ -27,15 +27,9 @@ brushRed.color = new libui.Color(1, 0, 0, 1); const brushBrown = new libui.DrawBrush(); brushBrown.color = new libui.Color(0.7, 0.5, 0, 1); const brushLinear = new libui.DrawBrush(); -brushLinear.type = libui.brushType.linearGradient; -brushLinear.start = { - x: 10, - y: 10 -}; -brushLinear.end = { - x: 110, - y: 110 -}; +brushLinear.type = libui.DrawBrush.type.linearGradient; +brushLinear.start = new libui.Point(10, 10); +brushLinear.end = new libui.Point(110, 110); brushLinear.stops = [ new libui.BrushGradientStop(0, new libui.Color(1, 0, 0, 1)), new libui.BrushGradientStop(1, new libui.Color(0, 0, 1, 1)) @@ -43,17 +37,13 @@ brushLinear.stops = [ console.log(brushLinear.stops.map(v => ({pos: v.pos, c: v.color}))); const brushRadial = new libui.DrawBrush(); -brushRadial.type = libui.brushType.radialGradient; -brushRadial.start = { - x: 210, - y: 45 -}; -brushRadial.end = { - x: 210, - y: 85 -}; -brushRadial.stops = - [new libui.BrushGradientStop(0, {r: 1}), new libui.BrushGradientStop(1, {b: 1})]; +brushRadial.type = libui.DrawBrush.type.radialGradient; +brushRadial.start = new libui.Point(210, 45); +brushRadial.end = new libui.Point(210, 85); +brushRadial.stops = [ + new libui.BrushGradientStop(0, new libui.Color(1, 0, 0, 1)), + new libui.BrushGradientStop(1, new libui.Color(0, 0, 1, 1)) +]; brushRadial.outerRadius = 50; const sp = new libui.DrawStrokeParams(); @@ -96,7 +86,8 @@ const area = new libui.UiArea( matrix.translate(0, 350); }, () => { - const path = new libui.UiDrawPath(libui.fillMode.alternate); + const path = + new libui.UiDrawPath(libui.UiDrawPath.fillMode.alternate); path.newFigure(230, 230); path.lineTo(5, 230); path.lineTo(5, 5); diff --git a/example/core-api.js b/example/core-api.js index 341b358..5de71a8 100644 --- a/example/core-api.js +++ b/example/core-api.js @@ -18,12 +18,12 @@ menuEdit.appendItem('Cut'); menuEdit.appendItem('Paste'); const win = new libui.UiWindow('Test window', 800, 600, true); -win.margined = 1; +win.margined = true; const box = new libui.UiVerticalBox(); const hBox = new libui.UiHorizontalBox(); const e1 = new libui.UiEntry(); -e1.enabled = 0; +e1.enabled = false; const lblCiao = new libui.UiLabel('ciao'); hBox.append(lblCiao, false); diff --git a/example/event-loop.js b/example/event-loop.js index 2b8ba59..7807291 100644 --- a/example/event-loop.js +++ b/example/event-loop.js @@ -8,7 +8,7 @@ let lastTimeout = 0; let setIntervalLast = Date.now(); console.log(libui.UiWindow) const win = new libui.UiWindow('Event loop tests', 800, 600, false); -win.margined = 1; +win.margined = true; console.log(2) const box = new libui.UiVerticalBox(); box.padded = true; @@ -25,13 +25,13 @@ console.log({setIntervalMs}) const sliderLabel = new libui.UiLabel('0'); -sliderbox.append(setIntervalMs, 1); -sliderbox.append(sliderLabel, 0); +sliderbox.append(setIntervalMs, true); +sliderbox.append(sliderLabel, false); const form = new libui.UiForm(); form.padded = true; -form.append('setInterval', sliderbox, 0); -form.append('actions', makeToolbar(), 0); +form.append('setInterval', sliderbox, false); +form.append('actions', makeToolbar(), false); box.append(form, false); const log = new libui.UiMultilineEntry(); @@ -71,7 +71,7 @@ function setIntervalChanged() { if (Math.abs(ms - lastTimeout) < 100) { return; } - sliderLabel.text = ms; + sliderLabel.text = String(ms); lastTimeout = ms; if (setIntervalHandle !== null) { clearInterval(setIntervalHandle); diff --git a/example/forms.js b/example/forms.js index 99f9a56..f5993e2 100644 --- a/example/forms.js +++ b/example/forms.js @@ -2,7 +2,7 @@ const libui = require('..'); const win = new libui.UiWindow('Forms window', 800, 600, false); -win.margined = 1; +win.margined = true; win.onClosing(() => { libui.stopLoop(); }); @@ -25,12 +25,12 @@ age.value = 40; const form = new libui.UiForm(); form.padded = true; -form.append('name', name, 0); -form.append('surname', surname, 0); -form.append('age', age, 0); +form.append('name', name, false); +form.append('surname', surname, false); +form.append('age', age, false); -hBox.append(form, 1); -hBox.append(JSONData, 1); +hBox.append(form, true); +hBox.append(JSONData, true); setJSON(); diff --git a/example/grid.js b/example/grid.js index c2835d4..d24edc6 100644 --- a/example/grid.js +++ b/example/grid.js @@ -2,7 +2,7 @@ const libui = require('..'); const win = new libui.UiWindow('Forms window', 800, 600, false); -win.margined = 1; +win.margined = true; win.onClosing(() => { libui.stopLoop(); }); diff --git a/example/text.js b/example/text.js index 4bf7054..14f0956 100644 --- a/example/text.js +++ b/example/text.js @@ -121,7 +121,7 @@ function redraw() { } function main() { - mainwin = new libui.UiWindow('textDrawArea Example', 640, 480, 1); + mainwin = new libui.UiWindow('textDrawArea Example', 640, 480, true); mainwin.margined = true; mainwin.onClosing(() => { libui.stopLoop(); diff --git a/package-lock.json b/package-lock.json index eeacded..3795e7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -131,6 +131,11 @@ } } }, + "@types/node": { + "version": "10.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz", + "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==" + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1887,12 +1892,6 @@ "typical": "^2.6.1" } }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, "common-path-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", @@ -2180,12 +2179,6 @@ "repeating": "^2.0.0" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, "dmd": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/dmd/-/dmd-3.0.12.tgz", @@ -6950,57 +6943,6 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index 54ee9d3..e6f9681 100755 --- a/package.json +++ b/package.json @@ -26,11 +26,12 @@ "install": "npm run --silent download-libui && npm run --silent download-libui-napi || npm run build", "test": "cross-env LIBUI_TARGET=test node-gyp configure build && cross-env LIBUI_TARGET=test DEBUG=ControlInternal tape tests/*.js | tap-spec", "precommit": "check-clang-format \"'npm run lint'\"", - "tslint": "tslint libui-napi.d.ts", + "tslint": "npx tsc --noEmit --checkJs --allowJs --lib es2015 libui-napi.d.ts example/area-adv.js example/area-scrolling.js example/area.js example/core-api.js example/errors.js example/event-loop.js example/forms.js example/grid.js example/text.js", "lint": "clang-format -i --glob='{tests/**/*.{h,c,m,js},example/*.js,js/**/*.js,src/**/*.{h,c,m},index.js,example.js,libui-napi.d.ts,test.js,example/gallery/src/**/*.js,tools/**/*.js,test_ui.js}'" }, "dependencies": { "@creditkarma/async-hooks": "0.0.4", + "@types/node": "^10.12.12", "cachedir": "^2.1.0", "debug": "^3.1.0", "extract-zip": "^1.6.7", @@ -54,7 +55,6 @@ "tap-spec": "^5.0.0", "tape": "^4.9.0", "to-dot-case": "^1.0.0", - "tslint": "^5.11.0", "typescript": "^3.2.2" }, "files": [ diff --git a/tslint.json b/tslint.json deleted file mode 100644 index c744e95..0000000 --- a/tslint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": {}, - "rules": { - "indent": [true, "tabs"], - "max-classes-per-file": false, - "align": [false, "parameters"], - "no-namespace": false, - "interface-name": [false] - }, - "rulesDirectory": [] -} \ No newline at end of file From f5d4006881d073b6cb8c221af97b147c438ace76 Mon Sep 17 00:00:00 2001 From: Andrea Parodi Date: Mon, 10 Dec 2018 18:50:33 +0100 Subject: [PATCH 18/20] DateTimePickerBase cb return void --- libui-napi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index c0958f8..01c2690 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -1360,7 +1360,7 @@ export abstract class DateTimePickerBase extends UiControl { * * @param callback - callback to execute when the event is fired. */ - public onChanged(callback: () => any): void; + public onChanged(callback: () => void): void; } /** From b6d93a22eef9687ee066b7eb91a350954ead6795 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Mon, 10 Dec 2018 19:03:44 +0100 Subject: [PATCH 19/20] Fix matrix typings --- libui-napi.d.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libui-napi.d.ts b/libui-napi.d.ts index da58c77..a371214 100644 --- a/libui-napi.d.ts +++ b/libui-napi.d.ts @@ -719,10 +719,9 @@ export class DrawStrokeParams { } export class UiDrawMatrix { - - public readonly 0: number; - public readonly 1: number; - public readonly 2: number; + public readonly 0: [number, number, number]; + public readonly 1: [number, number, number]; + public readonly 2: [number, number, number]; constructor(); public get0(): number; public get1(): number; From 10702b85f7139820effe8da2a7fa1a545603454b Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Mon, 10 Dec 2018 19:06:29 +0100 Subject: [PATCH 20/20] Remove npx from npm script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e6f9681..21ef335 100755 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "install": "npm run --silent download-libui && npm run --silent download-libui-napi || npm run build", "test": "cross-env LIBUI_TARGET=test node-gyp configure build && cross-env LIBUI_TARGET=test DEBUG=ControlInternal tape tests/*.js | tap-spec", "precommit": "check-clang-format \"'npm run lint'\"", - "tslint": "npx tsc --noEmit --checkJs --allowJs --lib es2015 libui-napi.d.ts example/area-adv.js example/area-scrolling.js example/area.js example/core-api.js example/errors.js example/event-loop.js example/forms.js example/grid.js example/text.js", + "tslint": "tsc --noEmit --checkJs --allowJs --lib es2015 libui-napi.d.ts example/area-adv.js example/area-scrolling.js example/area.js example/core-api.js example/errors.js example/event-loop.js example/forms.js example/grid.js example/text.js", "lint": "clang-format -i --glob='{tests/**/*.{h,c,m,js},example/*.js,js/**/*.js,src/**/*.{h,c,m},index.js,example.js,libui-napi.d.ts,test.js,example/gallery/src/**/*.js,tools/**/*.js,test_ui.js}'" }, "dependencies": {