From 82373634ed1bd9e4eee92390a921177d4a27734c Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Mon, 4 Nov 2019 20:34:14 -0500 Subject: [PATCH] churning things around --- Changes | 6 +- README.md | 366 +---- TODO | 7 + dist/actions.test.js | 2 +- dist/actions.test.js.map | 2 +- dist/addMutations.test.d.ts | 2 + dist/addMutations.test.d.ts.map | 1 + dist/addMutations.test.js | 22 + dist/addMutations.test.js.map | 1 + dist/buildActions/index.d.ts | 9 +- dist/buildActions/index.d.ts.map | 2 +- dist/buildActions/index.js | 20 +- dist/buildActions/index.js.map | 2 +- dist/buildMiddleware/index.d.ts.map | 2 +- dist/buildMiddleware/index.js | 3 +- dist/buildMiddleware/index.js.map | 2 +- dist/buildMutations/index.d.ts | 4 +- dist/buildMutations/index.d.ts.map | 2 +- dist/index.d.ts | 5 +- dist/index.d.ts.map | 2 +- dist/index.js | 7 +- dist/index.js.map | 2 +- dist/middleware.test.js | 21 +- dist/middleware.test.js.map | 2 +- dist/splat.test.js | 8 +- dist/splat.test.js.map | 2 +- dist/test.js | 44 +- dist/test.js.map | 2 +- dist/types.d.ts | 38 +- dist/types.d.ts.map | 2 +- dist/updux.d.ts | 22 +- dist/updux.d.ts.map | 2 +- dist/updux.js | 84 +- dist/updux.js.map | 2 +- docs/assets/css/main.css | 2333 +++++++++++++++++++++++++++ docs/assets/images/icons.png | Bin 0 -> 9615 bytes docs/assets/images/icons@2x.png | Bin 0 -> 28144 bytes docs/assets/images/widgets.png | Bin 0 -> 480 bytes docs/assets/images/widgets@2x.png | Bin 0 -> 855 bytes docs/assets/js/main.js | 1 + docs/assets/js/search.js | 3 + docs/classes/updux.html | 729 +++++++++ docs/globals.html | 1287 +++++++++++++++ docs/index.html | 379 +++++ package.json | 6 +- src/actions.test.ts | 4 +- src/addMutations.test.ts | 23 + src/buildActions/index.ts | 37 +- src/buildMiddleware/index.ts | 4 +- src/index.ts | 12 +- src/middleware.test.ts | 25 +- src/splat.test.ts | 12 +- src/test.ts | 50 +- src/types.ts | 197 ++- src/updux.ts | 273 +++- tsconfig.json | 4 +- typedoc.json | 2 +- 57 files changed, 5579 insertions(+), 502 deletions(-) create mode 100644 TODO create mode 100644 dist/addMutations.test.d.ts create mode 100644 dist/addMutations.test.d.ts.map create mode 100644 dist/addMutations.test.js create mode 100644 dist/addMutations.test.js.map create mode 100644 docs/assets/css/main.css create mode 100644 docs/assets/images/icons.png create mode 100644 docs/assets/images/icons@2x.png create mode 100644 docs/assets/images/widgets.png create mode 100644 docs/assets/images/widgets@2x.png create mode 100644 docs/assets/js/main.js create mode 100644 docs/assets/js/search.js create mode 100644 docs/classes/updux.html create mode 100644 docs/globals.html create mode 100644 docs/index.html create mode 100644 src/addMutations.test.ts diff --git a/Changes b/Changes index a9a38bb..2971f9a 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,8 @@ # Revision history for Updux -NEXT - - point types to right file. - - add state to updux type. +1.0.0 2019-11-04 + - Pretty big rework. + - Better documentation. 0.2.0 2019-10-24 - Converted everything to Typescript. diff --git a/README.md b/README.md index 20d1418..9ef0904 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,34 @@ So, I'm a fan of [Redux](https://redux.js.org). Two days ago I discovered It has a couple of pretty good ideas that removes some of the boilerplate. Keeping mutations and asynchronous effects close to the -reducer definition, à la [VueX][]? Nice. Automatically infering the +reducer definition? Nice. Automatically infering the actions from the said mutations and effects? Genius! But it also enforces a flat hierarchy of reducers -- where is the fun in that? And I'm also having a strong love for [Updeep](https://github.com/substantial/updeep), so I want reducer state updates to leverage the heck out of it. -All that to say, I had some fun yesterday and hacked a proto-lovechild -of `Rematch` and `Updeep`, with a dash of [VueX](https://vuex.vuejs.org/) inspiration. -I call it... `Updux`. +All that to say, say hello to `Updux`. Heavily inspired by `rematch`, but twisted +to work with `updeep` and to fit my peculiar needs. It offers features such as + +* Mimic the way VueX has mutations (reducer reactions to specific actions) and + effects (middleware reacting to actions that can be asynchronous and/or + have side-effects), so everything pertaining to a store are all defined + in the space place. +* Automatically gather all actions used by the updux's effects and mutations, + and makes then accessible as attributes to the `dispatch` object of the + store. +* Mutations have a signature that is friendly to Updux and Immer. +* Also, the mutation signature auto-unwrap the payload of the actions for you. +* TypeScript types. + + +Fair warning: this package is still very new, probably very buggy, +definitively very badly documented, and very subject to changes. Caveat +Maxima Emptor. # Synopsis + ``` import updux from 'updux'; @@ -29,7 +45,7 @@ const { actions, middleware, createStore, -} = updux({ +} = new Updux({ initial: { counter: 0, }, @@ -46,7 +62,10 @@ const { }; }, actions: { - customAction: ( someArg ) => ({ someProp: someArg }), + customAction: ( someArg ) => ({ + type: "custom", + payload: { someProp: someArg } + }), }, }); @@ -58,329 +77,104 @@ store.dispatch.inc(3); # Description -`Updux` exports one function, `updux`, both as a named export and as -its default export. +The formal documentation of the class Updux and its associated functions and +types can be found over [here](./docs/classes/updux.html). -## helpers = updux(config); +## Exporting upduxes -`updux` is a way to minimize and simplify the boilerplate associated with the -creation of a `Redux` store. It takes a shorthand configuration -object, and generates the appropriate reducer, actions, middleware, etc. -In true `Redux`-like fashion, just like reducers can be composed -of sub-reducers, upduxs can be made of sub-upduxs. - -### config - -The config object recognize following properties. - -#### initial - -The default initial state of the reducer. Can be anything your -heart desires. - -#### subduxes - -Object mapping slices of the state to sub-upduxs. - -For example, if in plain Redux you would do +If you are creating upduxes that will be used as subduxes +by other upduxes, or as +[ducks](https://github.com/erikras/ducks-modular-redux)-like containers, I +recommend that you export the Updux instance as the default export: ``` -import { combineReducers } from 'redux'; -import todosReducer from './todos'; -import statisticsReducer from './statistics'; +import Updux from 'updux'; -const rootReducer = combineReducers({ - todos: todosReducer, - stats: statisticsReducer, -}); +const updux = new Updux({ ... }); + +export default updux; ``` -then with Updux you'd do + +Then you can use them as subduxes like this: ``` -import { updux } from 'updux'; -import todos from './todos'; -import statistics from './statistics'; +import Updux from 'updux'; +import foo from './foo'; // foo is an Updux +import bar from './bar'; // bar is an Updux as well -const rootUpdux = updux({ +const updux = new Updux({ subduxes: { - todos, statistics + foo, bar } }); ``` -#### mutations - -Object mapping actions to the associated state mutation. - -For example, in `Redux` you'd do +Or if you want to use it: ``` -function todosReducer(state=[],action) { +import updux from './myUpdux'; - switch(action.type) { - case 'ADD': return [ ...state, action.payload ]; - - case 'DONE': return state.map( todo => todo.id === action.payload - ? { ...todo, done: true } : todo ) - - default: return state; - } -} +const { + reducer, + actions: { doTheThing }, + createStore, + middleware, +} = updux; ``` -With Updux: +## Usage with Immer + +While Updux was created with Updeep in mind, it also plays very +well with [Immer](https://immerjs.github.io/immer/docs/introduction). + +For example, taking this basic updux: ``` -const todosUpdux = updux({ +import Updux from 'updux'; + +const updux = new Updux({ + initial: { counter: 0 }, mutations: { - add: todo => state => [ ...state, todo ], - done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ) + add: (inc=1) => state => { counter: counter + inc } } }); + ``` -The signature of the mutations is `(payload,action) => state => newState`. -It is designed to play well with `Updeep`. This way, instead of doing +Converting it to Immer would look like: + ``` - mutation: { - renameTodo: newName => state => { ...state, name: newName } - } -``` +import Updux from 'updux'; +import { produce } from 'Immer'; -we can do - -``` - mutation: { - renameTodo: newName => u({ name: newName }) - } -``` - -Also, the special key `*` can be used to match any -action not explicitly matched by other mutations. - -``` -const todosUpdux = updux({ +const updux = new Updux({ + initial: { counter: 0 }, mutations: { - add: todo => state => [ ...state, todo ], - done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ), - '*' (payload,action) => state => { - console.warn( "unexpected action ", action.type ); - return state; - }, + add: (inc=1) => produce( draft => draft.counter += inc ) } } }); + ``` -#### effects +But since typing `produce` over and over is no fun, `groomMutations` +can be used to wrap all mutations with it: -Plain object defining asynchronous actions and side-effects triggered by actions. -The effects themselves are Redux middleware, expect with the `dispatch` -property of the first argument augmented with all the available actions. ``` -updux({ - effects: { - fetch: ({dispatch}) => next => async (action) => { - next(action); +import Updux from 'updux'; +import { produce } from 'Immer'; - let result = await fetch(action.payload.url).then( result => result.json() ); - dispatch.fetchSuccess(result); - } - } -}); -``` - -### actions - -Generic action creations are automatically created from the mutations and effects, but you can -also define custom action creator here. The object's values are function that -transform the arguments of the creator to the action's payload. - -``` -const { actions } = updox({ +const updux = new Updux({ + initial: { counter: 0 }, + groomMutations: mutation => (...args) => produce( mutation(...args) ), mutations: { - foo: () => state => state, - } - actions: { - bar: (x,y) => ({x,y}) - } -}); - -actions.foo({ x: 1, y: 2 }); // => { type: foo, payload: { x:1, y:2 } } -actions.bar(1,2); // => { type: bar, payload: { x:1, y:2 } } -``` - -## return value - -`updux` returns an object with the following properties: - -### initial - -Default initial state of the reducer. If applicable, merge -the initial states of `config` and `subduxes`, with -`config` having precedence over `subduxes`. - -If nothing was given, defaults to an empty object. - -### reducer - -A Redux reducer generated using the computed initial state and -mutations. - -### mutations - -Merge of the config and subduxes mutations. If an action trigger -mutations in both the main updux and its subduxes, the subduxes -mutations will be performed first. - -### actions - -Action creators for all actions defined or used in the actions, mutations, effects and subduxes -of the updox config. - -Non-custom action creators defined in `actions` have the signature `(payload={},meta={}) => ({type, -payload,meta})` (with the extra sugar that if `meta` or `payload` are not -specified, the key is not present in the produced action). - -If the same action appears in multiple locations, the precedence order -determining which one will prevail is - - actions generated from mutations/effects < non-custom subduxes actions < - custom subduxes actions < custom actions - -### middleware - -A middleware aggregating all the effects defined in the -updox and its subduxes. Effects of the updox itself are -done before the subdoxes effects. - -### createStore - -Same as doing - -``` -import { createStore, applyMiddleware } from 'redux'; - -const { initial, reducer, middleware, actions } = updox(...); - -const store = createStore( initial, reducer, applyMiddleware(middleware) ); - -for ( let type in actions ) { - store.dispatch[type] = (...args) => { - store.dispatch(actions[type](...args)) - }; -} -``` - -So that later on you can do - -``` -store.dispatch.addTodo(...); - -// still work -store.dispatch( actions.addTodo(...) ); -``` - -# Example - -#### battle.js - -``` -import { updux } from 'updux'; - -import game from './game'; -import log from './log'; -import bogeys from './bogeys'; - -const { createStore } = updux({ - subduxes: { game, log, bogeys } -}) - -export default createStore; -``` - -#### game.js - - -``` -import { updux } from 'updux'; -import _ from 'lodash'; -import u from 'updeep'; - -import { calculateMovement } from 'game/rules'; - -export default updux({ - initial: { game: "", players: [], turn: 0, }, - mutations: { - init_game: ({game: { name, players }}) => {name, players}, - play_turn: () => u({ turn: x => x+1 }), - }, - effects: { - play_turn: ({getState,dispatch}) => next => action => { - - const bogeys = api.getState().bogeys; - - // only allow the turn to be played if - // all ships have their orders in - if( bogeys.any( bogey => ! bogey.orders ) ) return; - - bogeys.forEach( bogey => { - dispatch.move( calculateMovement(bogey) ) - } ); - - next(action); - }, + add: (inc=1) => draft => draft.counter += inc } }); + ``` -#### log.js - -``` -import { updux } from 'updux'; - -export default updux({ - initial: [], - mutations: { - '*': (payload,action) => state => [ ...state, action ], - }, -}); -``` - -#### bogeys.js - -``` -import { updux } from 'updux'; -import _ from 'lodash'; - -export default updux({ - initial: [], - mutations: { - init_game: ({bogeys}) => () => _.keyBy( bogeys, 'id' ), - move: ({position}) => u({ position }), - }, -}); -``` - - -#### myGame.js - -``` -import Battle from './battle'; - -const battle = Battle(); - -battle.dispatch.init_game({ - name: 'Gemini Prime', - players: [ 'yenzie' ], - bogeys: [ { id: 'Enkidu' } ] -}); - -battle.dispatch.play_game(); - -.... -``` diff --git a/TODO b/TODO new file mode 100644 index 0000000..2c9b6ce --- /dev/null +++ b/TODO @@ -0,0 +1,7 @@ +[ ] Warn if one tries to define the same action twice +[ ] Middleware of subduxes get sub-states and getRootState +[ ] add `addAction` method +[ ] can do .addMutation( 'foo', ... );, which either + use the action already existing or create a boring one (should I?) + + diff --git a/dist/actions.test.js b/dist/actions.test.js index e93beca..c225b59 100644 --- a/dist/actions.test.js +++ b/dist/actions.test.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _1 = __importDefault(require(".")); const noopEffect = () => () => () => { }; test('actions defined in effects and mutations, multi-level', () => { - const { actions } = _1.default({ + const { actions } = new _1.default({ effects: { foo: noopEffect, }, diff --git a/dist/actions.test.js.map b/dist/actions.test.js.map index 95b6610..674b923 100644 --- a/dist/actions.test.js.map +++ b/dist/actions.test.js.map @@ -1 +1 @@ -{"version":3,"file":"actions.test.js","sourceRoot":"","sources":["../src/actions.test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAsB;AAGtB,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AAExC,IAAI,CAAC,uDAAuD,EAAE,GAAG,EAAE;IACjE,MAAM,EAAC,OAAO,EAAC,GAAG,UAAK,CAAC;QACtB,OAAO,EAAE;YACP,GAAG,EAAE,UAAU;SAChB;QACD,SAAS,EAAE,EAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,EAAC;QAClC,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,OAAO,EAAE,EAAC,GAAG,EAAE,UAAU,EAAE;gBAC3B,SAAS,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,EAAC;gBACnC,OAAO,EAAE;oBACP,GAAG,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAC,CAAC;iBACjC;aACF;YACD,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,GAAG,EAAE,UAAU;iBAChB;aACF;SACF;KACF,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,IAAI,EAAE,CAAC;IAEb,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAErD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CA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H,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,IAAI,EAAE,CAAC;IAEb,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAErD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;IAClE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC;IAE1E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC,EAAC,CAAC,CAAC;AACvE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/addMutations.test.d.ts b/dist/addMutations.test.d.ts new file mode 100644 index 0000000..d22fe71 --- /dev/null +++ b/dist/addMutations.test.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=addMutations.test.d.ts.map \ No newline at end of file diff --git a/dist/addMutations.test.d.ts.map b/dist/addMutations.test.d.ts.map new file mode 100644 index 0000000..6f49097 --- /dev/null +++ b/dist/addMutations.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"addMutations.test.d.ts","sourceRoot":"","sources":["../src/addMutations.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/addMutations.test.js b/dist/addMutations.test.js new file mode 100644 index 0000000..a152aa9 --- /dev/null +++ b/dist/addMutations.test.js @@ -0,0 +1,22 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const updux_1 = __importStar(require("./updux")); +test('added mutation is present', () => { + const updux = new updux_1.default({ + initial: { sum: 0 }, + }); + const add = updux_1.actionCreator('add', (n) => ({ n })); + updux.addMutation(add, ({ n }, action) => ({ sum }) => ({ sum: sum + n })); + updux.mutations; + const store = updux.createStore(); + store.dispatch.add(3); + expect(store.getState()).toEqual({ sum: 3 }); +}); +//# sourceMappingURL=addMutations.test.js.map \ No newline at end of file diff --git a/dist/addMutations.test.js.map b/dist/addMutations.test.js.map new file mode 100644 index 0000000..bcd88a7 --- /dev/null +++ b/dist/addMutations.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"addMutations.test.js","sourceRoot":"","sources":["../src/addMutations.test.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iDAA+C;AAM/C,IAAI,CAAE,2BAA2B,EAAE,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,IAAI,eAAK,CAAU;QAC7B,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;KACtB,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,qBAAa,CAAC,KAAK,EAAE,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAE,CAAA;IAGxD,KAAK,CAAC,WAAW,CACb,GAAG,EAAE,CAAC,EAAC,CAAC,EAAC,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,EAAE,GAAG,GAAG,CAAC,EAAC,CAAC,CACnD,CAAC;IACF,KAAK,CAAC,SAAS,CAAC;IAChB,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAClC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAEtB,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/buildActions/index.d.ts b/dist/buildActions/index.d.ts index 8c3c0bc..16cd3bd 100644 --- a/dist/buildActions/index.d.ts +++ b/dist/buildActions/index.d.ts @@ -1,8 +1,7 @@ -import { Action, ActionPayloadGenerator, Dictionary } from '../types'; -interface ActionCreator { - (...args: any[]): Action; - _genericAction?: boolean; -} +import { ActionCreator, ActionPayloadGenerator, Dictionary } from '../types'; +export declare function actionCreator(type: T, transform: (...args: any[]) => P): ActionCreator; +export declare function actionCreator(type: T, transform: never): ActionCreator; +export declare function actionCreator(type: T, transform: null): ActionCreator; declare type ActionPair = [string, ActionCreator]; declare function buildActions(generators?: Dictionary, actionNames?: string[], subActions?: ActionPair[]): Dictionary; export default buildActions; diff --git a/dist/buildActions/index.d.ts.map b/dist/buildActions/index.d.ts.map index 9850162..51a994d 100644 --- a/dist/buildActions/index.d.ts.map +++ b/dist/buildActions/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildActions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtE,UAAU,aAAa;IACnB,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAI,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;CAC3B;AAYD,aAAK,UAAU,GAAG,CAAE,MAAM,EAAE,aAAa,CAAE,CAAC;AAE5C,iBAAS,YAAY,CACnB,UAAU,GAAG,UAAU,CAAC,sBAAsB,CAAM,EACpD,WAAW,GAAE,MAAM,EAAO,EAC1B,UAAU,GAAG,UAAU,EAAO,GAC9B,UAAU,CAAC,aAAa,CAAC,CAmB1B;AAED,eAAe,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildActions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,aAAa,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAErF,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAC,CAAC,SAAS,GAAG,EAAG,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAI,aAAa,CAAC,CAAC,EAAC,CAAC,CAAC,CAAA;AAC9H,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAG,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,GAAI,aAAa,CAAC,CAAC,EAAC,SAAS,CAAC,CAAA;AACxG,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAG,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,GAAI,aAAa,CAAC,CAAC,EAAC,IAAI,CAAC,CAAA;AA2BlG,aAAK,UAAU,GAAG,CAAE,MAAM,EAAE,aAAa,CAAE,CAAC;AAE5C,iBAAS,YAAY,CACnB,UAAU,GAAG,UAAU,CAAC,sBAAsB,CAAM,EACpD,WAAW,GAAE,MAAM,EAAO,EAC1B,UAAU,GAAG,UAAU,EAAO,GAC9B,UAAU,CAAC,aAAa,CAAC,CAkB1B;AAED,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/buildActions/index.js b/dist/buildActions/index.js index a2eeb3a..d67d26d 100644 --- a/dist/buildActions/index.js +++ b/dist/buildActions/index.js @@ -4,10 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const fp_1 = __importDefault(require("lodash/fp")); +function actionCreator(type, transform) { + if (transform) { + return Object.assign((...args) => ({ type, payload: transform(...args) }), { type }); + } + if (transform === null) { + return Object.assign(() => ({ type }), { type }); + } + return Object.assign((payload) => ({ type, payload })); +} +exports.actionCreator = actionCreator; function actionFor(type) { - const creator = ((payload = undefined, meta = undefined) => fp_1.default.pickBy(v => v !== undefined)({ type, payload, meta })); - creator._genericAction = true; - return creator; + const f = ((payload = undefined, meta = undefined) => fp_1.default.pickBy(v => v !== undefined)({ type, payload, meta })); + return Object.assign(f, { + _genericAction: true, + type + }); } function buildActions(generators = {}, actionNames = [], subActions = []) { const [crafted, generic] = fp_1.default.partition(([type, f]) => !f._genericAction)(subActions); @@ -15,7 +27,7 @@ function buildActions(generators = {}, actionNames = [], subActions = []) { ...(actionNames.map(type => [type, actionFor(type)])), ...generic, ...crafted, - ...Object.entries(generators).map(([type, payload]) => [type, (...args) => ({ type, payload: payload(...args) })]), + ...Object.entries(generators).map(([type, payload]) => [type, payload.type ? payload : (...args) => ({ type, payload: payload(...args) })]), ]; return fp_1.default.fromPairs(actions); } diff --git a/dist/buildActions/index.js.map b/dist/buildActions/index.js.map index 1dce3b4..d357064 100644 --- a/dist/buildActions/index.js.map +++ b/dist/buildActions/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/buildActions/index.ts"],"names":[],"mappings":";;;;;AAAA,mDAA2B;AAQ3B,SAAS,SAAS,CAAC,IAAW;IAC5B,MAAM,OAAO,GAAmB,CAAE,CAAC,OAAO,GAAG,SAAS,EAAE,IAAI,GAAG,SAAS,EAAE,EAAE,CAC1E,YAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAW,CACjE,CAAC;IAEF,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAE9B,OAAO,OAAO,CAAC;AACjB,CAAC;AAID,SAAS,YAAY,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CAAC,CAAC,CAAC,CAAC,GAAG,IAAS,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CACpJ;KACJ,CAAC;IAEF,OAAO,YAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,kBAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/buildMiddleware/index.d.ts.map b/dist/buildMiddleware/index.d.ts.map index 0977585..4dfca7b 100644 --- a/dist/buildMiddleware/index.d.ts.map +++ b/dist/buildMiddleware/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildMiddleware/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAA2B,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAU,aAAa,EAAE,MAAM,UAAU,CAAC;AAU5E,iBAAS,eAAe,CAAC,CAAC,GAAC,GAAG,EAC1B,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,CAAK,EACxD,OAAO,GAAG,UAAU,CAAC,aAAa,CAAK,EACvC,cAAc,GAAE,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,EAAO,GACtD,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,CAkBhC;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildMiddleware/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAA2B,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAU,aAAa,EAAE,MAAM,UAAU,CAAC;AAU5E,iBAAS,eAAe,CAAC,CAAC,GAAC,GAAG,EAC1B,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,CAAK,EACxD,OAAO,GAAG,UAAU,CAAC,aAAa,CAAK,EACvC,cAAc,GAAE,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,EAAO,GACtD,UAAU,CAAC,EAAE,EAAC,CAAC,EAAC,aAAa,CAAC,CAoBhC;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/dist/buildMiddleware/index.js b/dist/buildMiddleware/index.js index 0e73286..a270e82 100644 --- a/dist/buildMiddleware/index.js +++ b/dist/buildMiddleware/index.js @@ -12,7 +12,8 @@ const MiddlewareFor = (type, mw) => api => next => action => { function buildMiddleware(effects = {}, actions = {}, subMiddlewares = []) { return (api) => { for (let type in actions) { - api.dispatch[type] = (...args) => api.dispatch(actions[type](...args)); + const ac = actions[type]; + api.dispatch[type] = (...args) => api.dispatch(ac(...args)); } return (original_next) => { return [ diff --git a/dist/buildMiddleware/index.js.map b/dist/buildMiddleware/index.js.map index ae5f2fa..49f0da9 100644 --- a/dist/buildMiddleware/index.js.map +++ b/dist/buildMiddleware/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/buildMiddleware/index.ts"],"names":[],"mappings":";;;;;AAAA,mDAA2B;AAK3B,MAAM,aAAa,GAAG,CAAC,IAAS,EAAE,EAAc,EAAe,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;IACtF,IAAI,IAAI,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IAE9D,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC;AAIF,SAAS,eAAe,CACpB,UAAsD,EAAE,EACxD,UAAqC,EAAE,EACvC,iBAAmD,EAAE;IAGvD,OAAO,CAAC,GAAmC,EAAE,EA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;IAGvD,OAAO,CAAC,GAAmC,EAAE,EAAE;QAE7C,KAAK,IAAI,IAAI,IAAI,OAAO,EAAE;YACxB,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YACzB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAU,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;SACnE;QAED,OAAO,CAAC,aAAmB,EAAC,EAAE;YAC5B,OAAO;gBACL,GAAG,YAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAC1C,aAAa,CAAC,IAAI,EAAC,MAAoB,CAAC,CAC3C;gBACD,GAAG,cAAc;aAClB;iBACE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBACd,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC;QAC7D,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/dist/buildMutations/index.d.ts b/dist/buildMutations/index.d.ts index ac5208d..cc17f48 100644 --- a/dist/buildMutations/index.d.ts +++ b/dist/buildMutations/index.d.ts @@ -1,5 +1,5 @@ /// -import { Mutation, Dictionary } from '../types'; -declare function buildMutations(mutations?: Dictionary, subduxes?: {}): import("lodash").Dictionary>; +import { Mutation, Action, Dictionary } from '../types'; +declare function buildMutations(mutations?: Dictionary, subduxes?: {}): import("lodash").Dictionary>>; export default buildMutations; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/buildMutations/index.d.ts.map b/dist/buildMutations/index.d.ts.map index 9ff6399..8476e7b 100644 --- a/dist/buildMutations/index.d.ts.map +++ b/dist/buildMutations/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildMutations/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,QAAQ,EAAU,UAAU,EAAC,MAAM,UAAU,CAAC;AAWtD,iBAAS,cAAc,CACnB,SAAS,GAAE,UAAU,CAAC,QAAQ,CAAM,EACpC,QAAQ,KAAK,8CAgDhB;AAED,eAAe,cAAc,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/buildMutations/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAWtD,iBAAS,cAAc,CACnB,SAAS,GAAE,UAAU,CAAC,QAAQ,CAAM,EACpC,QAAQ,KAAK,mEAgDhB;AAED,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 4f094ab..0af4225 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,4 +1,5 @@ import Updux from './updux'; -import { UpduxConfig } from './types'; -export default function updux(config: UpduxConfig): Updux; +export { default as Updux } from './updux'; +export { UpduxConfig } from './types'; +export default Updux; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index f2d2137..24b5c0b 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,CAAC,GAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,YAE1D"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EACH,WAAW,EACd,MAAM,SAAS,CAAC;AAEjB,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 7ea4d40..ddbf5c5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4,8 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const updux_1 = __importDefault(require("./updux")); -function updux(config) { - return new updux_1.default(config); -} -exports.default = updux; +var updux_2 = require("./updux"); +exports.Updux = updux_2.default; +exports.default = updux_1.default; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 1e3561f..eca5b86 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAGA,oDAA4B;AAI5B,SAAwB,KAAK,CAAQ,MAAsB;IACzD,OAAO,IAAI,eAAK,CAAI,MAAM,CAAC,CAAC;AAC9B,CAAC;AAFD,wBAEC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAE5B,iCAA2C;AAAlC,wBAAA,OAAO,CAAS;AAKzB,kBAAe,eAAK,CAAC"} \ No newline at end of file diff --git a/dist/middleware.test.js b/dist/middleware.test.js index 47bbc07..2cf0ada 100644 --- a/dist/middleware.test.js +++ b/dist/middleware.test.js @@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); const _1 = __importDefault(require(".")); test('simple effect', () => { const tracer = jest.fn(); - const store = _1.default({ + const store = (new _1.default({ effects: { foo: (api) => (next) => (action) => { tracer(); next(action); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); store.dispatch({ type: 'bar' }); expect(tracer).not.toHaveBeenCalled(); @@ -26,16 +26,17 @@ test('effect and sub-effect', () => { tracer(signature); next(action); }; - const store = _1.default({ + const store = (new _1.default({ effects: { foo: tracerEffect('root'), }, subduxes: { - zzz: _1.default({ effects: { + zzz: { effects: { foo: tracerEffect('child'), - } }) + } + } }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); store.dispatch({ type: 'bar' }); expect(tracer).not.toHaveBeenCalled(); @@ -45,14 +46,14 @@ test('effect and sub-effect', () => { }); test('"*" effect', () => { const tracer = jest.fn(); - const store = _1.default({ + const store = (new _1.default({ effects: { '*': api => next => action => { tracer(); next(action); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); store.dispatch({ type: 'bar' }); expect(tracer).toHaveBeenCalled(); @@ -62,7 +63,7 @@ test('async effect', async () => { return new Promise(resolve => setTimeout(resolve, ms)); } const tracer = jest.fn(); - const store = _1.default({ + const store = (new _1.default({ effects: { foo: api => next => async (action) => { next(action); @@ -70,7 +71,7 @@ test('async effect', async () => { tracer(); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); store.dispatch.foo(); expect(tracer).not.toHaveBeenCalled(); diff --git a/dist/middleware.test.js.map b/dist/middleware.test.js.map index 3c21acf..0a2a778 100644 --- a/dist/middleware.test.js.map +++ b/dist/middleware.test.js.map @@ -1 +1 @@ -{"version":3,"file":"middleware.test.js","sourceRoot":"","sources":["../src/middleware.test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAsB;AAGtB,IAAI,CAAE,eAAe,EAAE,GAAG,EAAE;IAExB,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAEzB,MAAM,KAAK,GAAG,UAAK,CAAC;QAChB,OAAO,EAAE;YACL,GAAG,EAAE,CAAC,GAAO,EAAE,EAAE,CAAC,CAAC,IAAQ,EAAE,EAAE,CAAC,CAAC,MAAU,EAAE,EAAE;gBA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AAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAEtC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpB,MAAM,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACtC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/splat.test.js b/dist/splat.test.js index e1c0d08..c3cfcf6 100644 --- a/dist/splat.test.js +++ b/dist/splat.test.js @@ -7,7 +7,7 @@ const _1 = __importDefault(require(".")); const updeep_1 = __importDefault(require("updeep")); const tracer = (chr) => updeep_1.default({ tracer: (s = '') => s + chr }); test('mutations, simple', () => { - const dux = _1.default({ + const dux = new _1.default({ mutations: { foo: () => tracer('a'), '*': () => tracer('b'), @@ -21,19 +21,19 @@ test('mutations, simple', () => { expect(store.getState()).toEqual({ tracer: 'bab', }); }); test('with subduxes', () => { - const dux = _1.default({ + const dux = new _1.default({ mutations: { foo: () => tracer('a'), '*': () => tracer('b'), bar: () => ({ bar }) => ({ bar, tracer: bar.tracer }) }, subduxes: { - bar: _1.default({ + bar: { mutations: { foo: () => tracer('d'), '*': () => tracer('e'), }, - }), + }, }, }); const store = dux.createStore(); diff --git a/dist/splat.test.js.map b/dist/splat.test.js.map index b46fd9d..e99772c 100644 --- a/dist/splat.test.js.map +++ b/dist/splat.test.js.map @@ -1 +1 @@ -{"version":3,"file":"splat.test.js","sourceRoot":"","sources":["../src/splat.test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAsB;AACtB,oDAAuB;AAEvB,MAAM,MAAM,GAAG,CAAC,GAAU,EAAE,EAAE,CAAC,gBAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;AAEhE,IAAI,CAAE,mBAAmB,EAAE,GAAG,EAAE;IAC5B,MAAM,GAAG,GAAG,UAAK,CAAC;QACd,SAAS,EAAE;YACP,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,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M,EAAE,GAAG;QACX,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;KAAE,CAAC,CAAC;IAE5B,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IAErB,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC;QAC7B,MAAM,EAAE,IAAI;QACZ,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;KAAE,CAAC,CAAC;IAE7B,KAAK,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC;IAE9B,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC;QAC7B,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;KAAE,CAAC,CAAC;AAGlC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test.js b/dist/test.js index ee6dace..840098f 100644 --- a/dist/test.js +++ b/dist/test.js @@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const _1 = __importDefault(require(".")); test('actions from mutations', () => { - const { actions: { foo, bar }, } = _1.default({ + const { actions: { foo, bar }, } = new _1.default({ mutations: { foo: () => (x) => x, }, @@ -19,7 +19,7 @@ test('actions from mutations', () => { }); }); test('reducer', () => { - const { actions, reducer } = _1.default({ + const { actions, reducer } = new _1.default({ initial: { counter: 1 }, mutations: { inc: () => ({ counter }) => ({ counter: counter + 1 }), @@ -31,21 +31,21 @@ test('reducer', () => { expect(state).toEqual({ counter: 2 }); }); test('sub reducers', () => { - const foo = _1.default({ + const foo = new _1.default({ initial: 1, mutations: { doFoo: () => (x) => x + 1, doAll: () => (x) => x + 10, }, }); - const bar = _1.default({ + const bar = new _1.default({ initial: 'a', mutations: { doBar: () => (x) => x + 'a', doAll: () => (x) => x + 'b', } }); - const { initial, actions, reducer } = _1.default({ + const { initial, actions, reducer } = new _1.default({ subduxes: { foo, bar } @@ -62,7 +62,7 @@ test('sub reducers', () => { expect(state).toEqual({ foo: 12, bar: 'aab' }); }); test('precedence between root and sub-reducers', () => { - const { initial, reducer, actions, } = _1.default({ + const { initial, reducer, actions, } = new _1.default({ initial: { foo: { bar: 4 }, }, @@ -75,7 +75,7 @@ test('precedence between root and sub-reducers', () => { } }, subduxes: { - foo: _1.default({ + foo: { initial: { bar: 2, quux: 3, @@ -83,7 +83,7 @@ test('precedence between root and sub-reducers', () => { mutations: { inc: () => (state) => ({ ...state, bar: state.bar + 1 }) }, - }), + }, } }); expect(initial).toEqual({ @@ -97,7 +97,7 @@ function timeout(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } test('middleware', async () => { - const { middleware, createStore } = _1.default({ + const { middleware, createStore } = new _1.default({ initial: "", mutations: { inc: (addition) => (state) => state + addition, @@ -114,14 +114,14 @@ test('middleware', async () => { } }, subduxes: { - foo: _1.default({ + foo: { effects: { - doEeet: (api) => next => action => { + doEeet: (api) => (next) => (action) => { api.dispatch({ type: 'inc', payload: 'b' }); next(action); } } - }), + }, } }); const store = createStore(); @@ -130,4 +130,24 @@ test('middleware', async () => { await timeout(1000); expect(store.getState()).toEqual('abZc'); }); +test("subduxes and mutations", () => { + const foo = new _1.default({ mutations: { + quux: () => () => 'x', + blart: () => () => 'a', + } }); + const bar = new _1.default({ mutations: { + quux: () => () => 'y' + } }); + const baz = new _1.default({ + mutations: { + quux: () => (state) => ({ ...state, "baz": "z" }) + }, subduxes: { foo, bar } + }); + let state = baz.reducer(undefined, baz.actions.quux()); + expect(state).toEqual({ + foo: "x", + bar: "y", + baz: "z", + }); +}); //# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/dist/test.js.map b/dist/test.js.map index 7384b54..87f7ad0 100644 --- a/dist/test.js.map +++ b/dist/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAsB;AAE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AE,EAAE,GAAG,EAAE,GAAG,EAAE;KAAE,CAAC,CAAC;IAE7B,IAAI,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAE,CAAC;IAExD,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;QAClB,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG;KACX,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/types.d.ts b/dist/types.d.ts index 9c88ca8..0243f67 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -1,24 +1,32 @@ import { Dispatch, Middleware } from 'redux'; -export declare type Action = { - type: string; - payload?: any; - meta?: any; +declare type MaybePayload

= P extends object | string | boolean | number ? { + payload: P; +} : { + payload?: P; }; +export declare type Action = { + type: T; +} & MaybePayload

; export declare type Dictionary = { [key: string]: T; }; -export declare type Mutation = (payload: any, action: Action) => (state: S) => S; +export declare type Mutation = (payload: A['payload'], action: A) => (state: S) => S; export declare type ActionPayloadGenerator = (...args: any[]) => any; -export declare type ActionCreator = (...args: any[]) => Action; -export declare type UpduxDispatch = Dispatch & Dictionary; -export declare type UpduxConfig = Partial<{ - initial: S; - subduxes: {}; - actions: { - [type: string]: ActionPayloadGenerator; +export declare type ActionCreator = { + type: T; + _genericAction?: boolean; +} & ((...args: any[]) => Action); +export declare type UpduxDispatch = Dispatch & Dictionary; +export declare type UpduxConfig = { + initial?: S; + subduxes?: {}; + actions?: { + [type: string]: ActionCreator; }; - mutations: any; - effects: Dictionary>; -}>; + mutations?: any; + groomMutations?: (m: Mutation) => Mutation; + effects?: Dictionary>; +}; export declare type Upreducer = (action: Action) => (state: S) => S; +export {}; //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/types.d.ts.map b/dist/types.d.ts.map index aa59497..3ef363f 100644 --- a/dist/types.d.ts.map +++ b/dist/types.d.ts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AAO,CAAC,EAAE,CAAC,CAAC;IA+BZ,QAAQ,CAAC,EAAE,EAAE,CAAC;IAsBd,OAAO,CAAC,EAAE;QACR,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;KAC/B,CAAC;IAgEF,SAAS,CAAC,EAAE,GAAG,CAAC;IAEhB,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC;IAqBjD,OAAO,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;CACxD,CAAC;AAEF,oBAAY,SAAS,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/updux.d.ts b/dist/updux.d.ts index 31b7d2f..964ccdd 100644 --- a/dist/updux.d.ts +++ b/dist/updux.d.ts @@ -1,5 +1,6 @@ import { UpduxConfig, Dictionary, Action, ActionCreator, Mutation, Upreducer, UpduxDispatch } from './types'; import { Middleware, Store } from 'redux'; +export { actionCreator } from './buildActions'; declare type StoreWithDispatchActions Action; }> = Store & { @@ -7,16 +8,23 @@ declare type StoreWithDispatchActions void; }; }; +export declare type Dux = Pick, 'subduxes' | 'actions' | 'initial' | 'mutations' | 'reducer' | 'middleware' | 'createStore' | 'upreducer'>; export declare class Updux { subduxes: Dictionary; - actions: Dictionary; initial: S; - mutations: Dictionary; - upreducer: Upreducer; - reducer: (state: S | undefined, action: Action) => S; - middleware: Middleware<{}, S, UpduxDispatch>; - createStore: () => StoreWithDispatchActions; - constructor(config: UpduxConfig); + groomMutations: (mutation: Mutation) => Mutation; + private localEffects; + private localActions; + private localMutations; + constructor(config?: UpduxConfig); + readonly middleware: Middleware<{}, S, UpduxDispatch>; + readonly actions: Dictionary; + readonly upreducer: Upreducer; + readonly reducer: (state: S | undefined, action: Action) => S; + readonly mutations: Dictionary>; + readonly createStore: () => StoreWithDispatchActions; + readonly asDux: Dux; + addMutation(creator: A, mutation: Mutation infer R ? R : never>): void; } export default Updux; //# sourceMappingURL=updux.d.ts.map \ No newline at end of file diff --git a/dist/updux.d.ts.map b/dist/updux.d.ts.map index 8dee058..b91c010 100644 --- a/dist/updux.d.ts.map +++ b/dist/updux.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"updux.d.ts","sourceRoot":"","sources":["../src/updux.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7G,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE1C,aAAK,wBAAwB,CAAC,CAAC,GAAC,GAAG,EAAC,OAAO,GAAC;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAC,GAAG,KAAK,MAAM,CAAA;CAAE,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG;IACpG,QAAQ,EAAE;SAAI,IAAI,IAAI,MAAM,OAAO,GAAI,CAAC,GAAG,IAAI,EAAC,GAAG,KAAK,IAAI;KAAE,CAAA;CACjE,CAAC;AAEF,qBAAa,KAAK,CAAC,CAAC,GAAC,GAAG;IAEpB,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAE5B,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IAElC,OAAO,EAAE,CAAC,CAAC;IAEX,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAEhC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAExB,OAAO,EAAE,CAAC,KAAK,EAAC,CAAC,GAAC,SAAS,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC,CAAC;IAEhD,UAAU,EAAE,UAAU,CAAC,EAAE,EAAC,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C,cAAc,CAA0B;gBAEhD,MAAM,GAAE,WAAgB;aA0BtB,UAAU,EAAI,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE,aAAa,CAAC;aAsB9C,OAAO,EAAI,UAAU,CAAC,aAAa,CAAC;aAYpC,SAAS,EAAI,SAAS,CAAC,CAAC,CAAC;aAQzB,OAAO,EAAI,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;aAStD,SAAS,EAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;aA6BpC,WAAW,EAAI,MAAM,wBAAwB,CAAC,CAAC,CAAC;aAiB1D,KAAK,EAAI,GAAG,CAAC,CAAC,CAAC;IAsBnB,WAAW,CAAC,CAAC,SAAS,aAAa,EACjC,OAAO,EAAE,CAAC,EACV,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CAO3E;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/updux.js b/dist/updux.js index b1a42c8..1966c45 100644 --- a/dist/updux.js +++ b/dist/updux.js @@ -1,30 +1,96 @@ "use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const fp_1 = __importDefault(require("lodash/fp")); +const mobx_1 = require("mobx"); const buildActions_1 = __importDefault(require("./buildActions")); const buildInitial_1 = __importDefault(require("./buildInitial")); const buildMutations_1 = __importDefault(require("./buildMutations")); const buildCreateStore_1 = __importDefault(require("./buildCreateStore")); const buildMiddleware_1 = __importDefault(require("./buildMiddleware")); const buildUpreducer_1 = __importDefault(require("./buildUpreducer")); +var buildActions_2 = require("./buildActions"); +exports.actionCreator = buildActions_2.actionCreator; class Updux { - constructor(config) { + constructor(config = {}) { + this.groomMutations = config.groomMutations || ((x) => x); this.subduxes = fp_1.default.mapValues((value) => fp_1.default.isPlainObject(value) ? new Updux(value) : value)(fp_1.default.getOr({}, 'subduxes', config)); - this.actions = buildActions_1.default(config.actions, [...Object.keys(config.mutations || {}), ...Object.keys(config.effects || {})], fp_1.default.flatten(Object.values(this.subduxes).map(({ actions }) => Object.entries(actions)))); + this.localActions = fp_1.default.getOr({}, 'actions', config); + this.localEffects = fp_1.default.getOr({}, 'effects', config); this.initial = buildInitial_1.default(config.initial, fp_1.default.mapValues(({ initial }) => initial)(this.subduxes)); - this.mutations = buildMutations_1.default(config.mutations, this.subduxes); - this.upreducer = buildUpreducer_1.default(this.initial, this.mutations); - this.reducer = (state, action) => { - return this.upreducer(action)(state); - }; - this.middleware = buildMiddleware_1.default(config.effects, this.actions, Object.values(this.subduxes).map(sd => sd.middleware)); + this.localMutations = fp_1.default.mapValues((m) => this.groomMutations(m))(fp_1.default.getOr({}, 'mutations', config)); + } + get middleware() { + return buildMiddleware_1.default(this.localEffects, this.actions, Object.values(this.subduxes).map(sd => sd.middleware)); + } + get actions() { + return buildActions_1.default(this.localActions, [...Object.keys(this.localMutations), ...Object.keys(this.localEffects)], fp_1.default.flatten(Object.values(this.subduxes).map(({ actions }) => Object.entries(actions)))); + } + get upreducer() { + return buildUpreducer_1.default(this.initial, this.mutations); + } + get reducer() { + return (state, action) => this.upreducer(action)(state); + } + get mutations() { + return buildMutations_1.default(this.localMutations, this.subduxes); + } + get createStore() { const actions = this.actions; - this.createStore = buildCreateStore_1.default(this.reducer, this.initial, this.middleware, this.actions); + return buildCreateStore_1.default(this.reducer, this.initial, this.middleware, this.actions); + } + get asDux() { + return { + createStore: this.createStore, + upreducer: this.upreducer, + subduxes: this.subduxes, + middleware: this.middleware, + actions: this.actions, + reducer: this.reducer, + mutations: this.mutations, + initial: this.initial, + }; + } + addMutation(creator, mutation) { + this.localActions[creator.type] = creator; + this.localMutations[creator.type] = this.groomMutations(mutation); } } +__decorate([ + mobx_1.observable +], Updux.prototype, "localEffects", void 0); +__decorate([ + mobx_1.observable +], Updux.prototype, "localActions", void 0); +__decorate([ + mobx_1.observable +], Updux.prototype, "localMutations", void 0); +__decorate([ + mobx_1.computed +], Updux.prototype, "middleware", null); +__decorate([ + mobx_1.computed +], Updux.prototype, "actions", null); +__decorate([ + mobx_1.computed +], Updux.prototype, "upreducer", null); +__decorate([ + mobx_1.computed +], Updux.prototype, "reducer", null); +__decorate([ + mobx_1.computed +], Updux.prototype, "mutations", null); +__decorate([ + mobx_1.computed +], Updux.prototype, "createStore", null); exports.Updux = Updux; exports.default = Updux; //# sourceMappingURL=updux.js.map \ No newline at end of file diff --git a/dist/updux.js.map b/dist/updux.js.map index d6ae157..ea4bcbd 100644 --- a/dist/updux.js.map +++ b/dist/updux.js.map @@ -1 +1 @@ -{"version":3,"file":"updux.js","sourceRoot":"","sources":["../src/updux.ts"],"names":[],"mappings":";;;;;AAAA,mDAA2B;AAC3B,kEAA0C;AAC1C,kEAA0C;AAC1C,sEAA8C;AAE9C,0EAAkD;AAClD,wEAAgD;AAChD,sEAA8C;AAS9C,MAAa,KAAK;IAkBd,YAAY,MAAmB;QAE3B,IAAI,CAAC,QAAQ,GAAG,YAAE,CAAC,SAAS,CACxB,CAAC,KAAuB,EAAE,EAAE,CAAC,YAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAE,CAAC,YAAE,CAAC,KAAK,C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AO,wBAAc,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IA2BS,IAAI,WAAW;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,OAAO,0BAAgB,CACrB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,UAAwB,EAC7B,IAAI,CAAC,OAAO,CACwC,CAAC;IACzD,CAAC;IAQD,IAAI,KAAK;QACP,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;IAWD,WAAW,CACT,OAAU,EACV,QAAwE;QAExE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;QAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,cAAc,CACrD,QAAe,CACD,CAAC;IACnB,CAAC;CACF;AAlKa;IAAX,iBAAU;2CAET;AAEU;IAAX,iBAAU;2CAAiD;AAEhD;IAAX,iBAAU;6CAAiD;AA4BlD;IAAT,eAAQ;uCAMR;AAgBS;IAAT,eAAQ;oCAUR;AAES;IAAT,eAAQ;sCAER;AAMS;IAAT,eAAQ;oCAER;AAOS;IAAT,eAAQ;sCAER;AA2BS;IAAT,eAAQ;wCASR;AA5KH,sBAmNC;AAED,kBAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css new file mode 100644 index 0000000..c771b84 --- /dev/null +++ b/docs/assets/css/main.css @@ -0,0 +1,2333 @@ +/*! normalize.css v1.1.3 | MIT License | git.io/normalize */ +/* ========================================================================== + * HTML5 display definitions + * ========================================================================== */ +/** + * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { + display: block; } + +/** + * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ +audio, canvas, video { + display: inline-block; + *display: inline; + *zoom: 1; } + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. + * Known issue: no IE 6 support. */ +[hidden] { + display: none; } + +/* ========================================================================== + * Base + * ========================================================================== */ +/** + * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using + * `em` units. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. */ +html { + font-size: 100%; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + font-family: sans-serif; } + +/** + * Address `font-family` inconsistency between `textarea` and other form + * elements. */ +button, input, select, textarea { + font-family: sans-serif; } + +/** + * Address margins handled incorrectly in IE 6/7. */ +body { + margin: 0; } + +/* ========================================================================== + * Links + * ========================================================================== */ +/** + * Address `outline` inconsistency between Chrome and other browsers. */ +a:focus { + outline: thin dotted; } + +a:active, a:hover { + outline: 0; } + +/** + * Improve readability when focused and also mouse hovered in all browsers. */ +/* ========================================================================== + * Typography + * ========================================================================== */ +/** + * Address font sizes and margins set differently in IE 6/7. + * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, + * and Chrome. */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +h2 { + font-size: 1.5em; + margin: 0.83em 0; } + +h3 { + font-size: 1.17em; + margin: 1em 0; } + +h4, .tsd-index-panel h3 { + font-size: 1em; + margin: 1.33em 0; } + +h5 { + font-size: 0.83em; + margin: 1.67em 0; } + +h6 { + font-size: 0.67em; + margin: 2.33em 0; } + +/** + * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ +abbr[title] { + border-bottom: 1px dotted; } + +/** + * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ +b, strong { + font-weight: bold; } + +blockquote { + margin: 1em 40px; } + +/** + * Address styling not present in Safari 5 and Chrome. */ +dfn { + font-style: italic; } + +/** + * Address differences between Firefox and other browsers. + * Known issue: no IE 6/7 normalization. */ +hr { + box-sizing: content-box; + height: 0; } + +/** + * Address styling not present in IE 6/7/8/9. */ +mark { + background: #ff0; + color: #000; } + +/** + * Address margins set differently in IE 6/7. */ +p, pre { + margin: 1em 0; } + +/** + * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ +code, kbd, pre, samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; } + +/** + * Improve readability of pre-formatted text in all browsers. */ +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; } + +/** + * Address CSS quotes not supported in IE 6/7. */ +q { + quotes: none; } + q:before, q:after { + content: ''; + content: none; } + +/** + * Address `quotes` property not supported in Safari 4. */ +/** + * Address inconsistent and variable font size in all browsers. */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + top: -0.5em; } + +sub { + bottom: -0.25em; } + +/* ========================================================================== + * Lists + * ========================================================================== */ +/** + * Address margins set differently in IE 6/7. */ +dl, menu, ol, ul { + margin: 1em 0; } + +dd { + margin: 0 0 0 40px; } + +/** + * Address paddings set differently in IE 6/7. */ +menu, ol, ul { + padding: 0 0 0 40px; } + +/** + * Correct list images handled incorrectly in IE 7. */ +nav ul, nav ol { + list-style: none; + list-style-image: none; } + +/* ========================================================================== + * Embedded content + * ========================================================================== */ +/** + * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. + * 2. Improve image quality when scaled in IE 7. */ +img { + border: 0; + /* 1 */ + -ms-interpolation-mode: bicubic; } + +/* 2 */ +/** + * Correct overflow displayed oddly in IE 9. */ +svg:not(:root) { + overflow: hidden; } + +/* ========================================================================== + * Figures + * ========================================================================== */ +/** + * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ +figure, form { + margin: 0; } + +/* ========================================================================== + * Forms + * ========================================================================== */ +/** + * Correct margin displayed oddly in IE 6/7. */ +/** + * Define consistent border, margin, and padding. */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +/** + * 1. Correct color not being inherited in IE 6/7/8/9. + * 2. Correct text not wrapping in Firefox 3. + * 3. Correct alignment displayed oddly in IE 6/7. */ +legend { + border: 0; + /* 1 */ + padding: 0; + white-space: normal; + /* 2 */ + *margin-left: -7px; } + +/* 3 */ +/** + * 1. Correct font size not being inherited in all browsers. + * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, + * and Chrome. + * 3. Improve appearance and consistency in all browsers. */ +button, input, select, textarea { + font-size: 100%; + /* 1 */ + margin: 0; + /* 2 */ + vertical-align: baseline; + /* 3 */ + *vertical-align: middle; } + +/* 3 */ +/** + * Address Firefox 3+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. */ +button, input { + line-height: normal; } + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. + * Correct `select` style inheritance in Firefox 4+ and Opera. */ +button, select { + text-transform: none; } + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + * 4. Remove inner spacing in IE 7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE 6. */ +button, html input[type="button"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ + *overflow: visible; } + +/* 4 */ +input[type="reset"], input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ + *overflow: visible; } + +/* 4 */ +/** + * Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { + cursor: default; } + +/** + * 1. Address box sizing set to content-box in IE 8/9. + * 2. Remove excess padding in IE 8/9. + * 3. Remove excess padding in IE 7. + * Known issue: excess padding remains in IE 6. */ +input { + /* 3 */ } + input[type="checkbox"], input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ + *height: 13px; + /* 3 */ + *width: 13px; } + input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + /* 2 */ + box-sizing: content-box; } + input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). */ +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. */ +/** + * Remove inner padding and border in Firefox 3+. */ +button::-moz-focus-inner, input::-moz-focus-inner { + border: 0; + padding: 0; } + +/** + * 1. Remove default vertical scrollbar in IE 6/7/8/9. + * 2. Improve readability and alignment in all browsers. */ +textarea { + overflow: auto; + /* 1 */ + vertical-align: top; } + +/* 2 */ +/* ========================================================================== + * Tables + * ========================================================================== */ +/** + * Remove most spacing between table cells. */ +table { + border-collapse: collapse; + border-spacing: 0; } + +/* + * + *Visual Studio-like style based on original C# coloring by Jason Diamond */ +.hljs { + display: inline-block; + padding: 0.5em; + background: white; + color: black; } + +.hljs-comment, .hljs-annotation, .hljs-template_comment, .diff .hljs-header, .hljs-chunk, .apache .hljs-cbracket { + color: #008000; } + +.hljs-keyword, .hljs-id, .hljs-built_in, .css .smalltalk .hljs-class, .hljs-winutils, .bash .hljs-variable, .tex .hljs-command, .hljs-request, .hljs-status, .nginx .hljs-title { + color: #00f; } + +.xml .hljs-tag { + color: #00f; } + .xml .hljs-tag .hljs-value { + color: #00f; } + +.hljs-string, .hljs-title, .hljs-parent, .hljs-tag .hljs-value, .hljs-rules .hljs-value { + color: #a31515; } + +.ruby .hljs-symbol { + color: #a31515; } + .ruby .hljs-symbol .hljs-string { + color: #a31515; } + +.hljs-template_tag, .django .hljs-variable, .hljs-addition, .hljs-flow, .hljs-stream, .apache .hljs-tag, .hljs-date, .tex .hljs-formula, .coffeescript .hljs-attribute { + color: #a31515; } + +.ruby .hljs-string, .hljs-decorator, .hljs-filter .hljs-argument, .hljs-localvars, .hljs-array, .hljs-attr_selector, .hljs-pseudo, .hljs-pi, .hljs-doctype, .hljs-deletion, .hljs-envvar, .hljs-shebang, .hljs-preprocessor, .hljs-pragma, .userType, .apache .hljs-sqbracket, .nginx .hljs-built_in, .tex .hljs-special, .hljs-prompt { + color: #2b91af; } + +.hljs-phpdoc, .hljs-javadoc, .hljs-xmlDocTag { + color: #808080; } + +.vhdl .hljs-typename { + font-weight: bold; } + +.vhdl .hljs-string { + color: #666666; } + +.vhdl .hljs-literal { + color: #a31515; } + +.vhdl .hljs-attribute { + color: #00b0e8; } + +.xml .hljs-attribute { + color: #f00; } + +.col > :first-child, .col-1 > :first-child, .col-2 > :first-child, .col-3 > :first-child, .col-4 > :first-child, .col-5 > :first-child, .col-6 > :first-child, .col-7 > :first-child, .col-8 > :first-child, .col-9 > :first-child, .col-10 > :first-child, .col-11 > :first-child, .tsd-panel > :first-child, ul.tsd-descriptions > li > :first-child, +.col > :first-child > :first-child, +.col-1 > :first-child > :first-child, +.col-2 > :first-child > :first-child, +.col-3 > :first-child > :first-child, +.col-4 > :first-child > :first-child, +.col-5 > :first-child > :first-child, +.col-6 > :first-child > :first-child, +.col-7 > :first-child > :first-child, +.col-8 > :first-child > :first-child, +.col-9 > :first-child > :first-child, +.col-10 > :first-child > :first-child, +.col-11 > :first-child > :first-child, +.tsd-panel > :first-child > :first-child, +ul.tsd-descriptions > li > :first-child > :first-child, +.col > :first-child > :first-child > :first-child, +.col-1 > :first-child > :first-child > :first-child, +.col-2 > :first-child > :first-child > :first-child, +.col-3 > :first-child > :first-child > :first-child, +.col-4 > :first-child > :first-child > :first-child, +.col-5 > :first-child > :first-child > :first-child, +.col-6 > :first-child > :first-child > :first-child, +.col-7 > :first-child > :first-child > :first-child, +.col-8 > :first-child > :first-child > :first-child, +.col-9 > :first-child > :first-child > :first-child, +.col-10 > :first-child > :first-child > :first-child, +.col-11 > :first-child > :first-child > :first-child, +.tsd-panel > :first-child > :first-child > :first-child, +ul.tsd-descriptions > li > :first-child > :first-child > :first-child { + margin-top: 0; } + +.col > :last-child, .col-1 > :last-child, .col-2 > :last-child, .col-3 > :last-child, .col-4 > :last-child, .col-5 > :last-child, .col-6 > :last-child, .col-7 > :last-child, .col-8 > :last-child, .col-9 > :last-child, .col-10 > :last-child, .col-11 > :last-child, .tsd-panel > :last-child, ul.tsd-descriptions > li > :last-child, +.col > :last-child > :last-child, +.col-1 > :last-child > :last-child, +.col-2 > :last-child > :last-child, +.col-3 > :last-child > :last-child, +.col-4 > :last-child > :last-child, +.col-5 > :last-child > :last-child, +.col-6 > :last-child > :last-child, +.col-7 > :last-child > :last-child, +.col-8 > :last-child > :last-child, +.col-9 > :last-child > :last-child, +.col-10 > :last-child > :last-child, +.col-11 > :last-child > :last-child, +.tsd-panel > :last-child > :last-child, +ul.tsd-descriptions > li > :last-child > :last-child, +.col > :last-child > :last-child > :last-child, +.col-1 > :last-child > :last-child > :last-child, +.col-2 > :last-child > :last-child > :last-child, +.col-3 > :last-child > :last-child > :last-child, +.col-4 > :last-child > :last-child > :last-child, +.col-5 > :last-child > :last-child > :last-child, +.col-6 > :last-child > :last-child > :last-child, +.col-7 > :last-child > :last-child > :last-child, +.col-8 > :last-child > :last-child > :last-child, +.col-9 > :last-child > :last-child > :last-child, +.col-10 > :last-child > :last-child > :last-child, +.col-11 > :last-child > :last-child > :last-child, +.tsd-panel > :last-child > :last-child > :last-child, +ul.tsd-descriptions > li > :last-child > :last-child > :last-child { + margin-bottom: 0; } + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 0 40px; } + @media (max-width: 640px) { + .container { + padding: 0 20px; } } + +.container-main { + padding-bottom: 200px; } + +.row { + position: relative; + margin: 0 -10px; } + .row:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; } + +.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11 { + box-sizing: border-box; + float: left; + padding: 0 10px; } + +.col-1 { + width: 8.3333333333%; } + +.offset-1 { + margin-left: 8.3333333333%; } + +.col-2 { + width: 16.6666666667%; } + +.offset-2 { + margin-left: 16.6666666667%; } + +.col-3 { + width: 25%; } + +.offset-3 { + margin-left: 25%; } + +.col-4 { + width: 33.3333333333%; } + +.offset-4 { + margin-left: 33.3333333333%; } + +.col-5 { + width: 41.6666666667%; } + +.offset-5 { + margin-left: 41.6666666667%; } + +.col-6 { + width: 50%; } + +.offset-6 { + margin-left: 50%; } + +.col-7 { + width: 58.3333333333%; } + +.offset-7 { + margin-left: 58.3333333333%; } + +.col-8 { + width: 66.6666666667%; } + +.offset-8 { + margin-left: 66.6666666667%; } + +.col-9 { + width: 75%; } + +.offset-9 { + margin-left: 75%; } + +.col-10 { + width: 83.3333333333%; } + +.offset-10 { + margin-left: 83.3333333333%; } + +.col-11 { + width: 91.6666666667%; } + +.offset-11 { + margin-left: 91.6666666667%; } + +.tsd-kind-icon { + display: block; + position: relative; + padding-left: 20px; + text-indent: -20px; } + .tsd-kind-icon:before { + content: ''; + display: inline-block; + vertical-align: middle; + width: 17px; + height: 17px; + margin: 0 3px 2px 0; + background-image: url(../images/icons.png); } + @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { + .tsd-kind-icon:before { + background-image: url(../images/icons@2x.png); + background-size: 238px 204px; } } + +.tsd-signature.tsd-kind-icon:before { + background-position: 0 -153px; } + +.tsd-kind-object-literal > .tsd-kind-icon:before { + background-position: 0px -17px; } + +.tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -17px; } + +.tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -17px; } + +.tsd-kind-class > .tsd-kind-icon:before { + background-position: 0px -34px; } + +.tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -34px; } + +.tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -34px; } + +.tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -51px; } + +.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -51px; } + +.tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -51px; } + +.tsd-kind-interface > .tsd-kind-icon:before { + background-position: 0px -68px; } + +.tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -68px; } + +.tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -68px; } + +.tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -85px; } + +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -85px; } + +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -85px; } + +.tsd-kind-module > .tsd-kind-icon:before { + background-position: 0px -102px; } + +.tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -102px; } + +.tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -102px; } + +.tsd-kind-external-module > .tsd-kind-icon:before { + background-position: 0px -102px; } + +.tsd-kind-external-module.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -102px; } + +.tsd-kind-external-module.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -102px; } + +.tsd-kind-enum > .tsd-kind-icon:before { + background-position: 0px -119px; } + +.tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -119px; } + +.tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -119px; } + +.tsd-kind-enum-member > .tsd-kind-icon:before { + background-position: 0px -136px; } + +.tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -136px; } + +.tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -136px; } + +.tsd-kind-signature > .tsd-kind-icon:before { + background-position: 0px -153px; } + +.tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -153px; } + +.tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -153px; } + +.tsd-kind-type-alias > .tsd-kind-icon:before { + background-position: 0px -170px; } + +.tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -170px; } + +.tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -170px; } + +.tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -187px; } + +.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -187px; } + +.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -187px; } + +.tsd-kind-variable > .tsd-kind-icon:before { + background-position: -136px -0px; } + +.tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -0px; } + +.tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -0px; } + +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -0px; } + +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -0px; } + +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -0px; } + +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -0px; } + +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -0px; } + +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -0px; } + +.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -0px; } + +.tsd-kind-property > .tsd-kind-icon:before { + background-position: -136px -0px; } + +.tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -0px; } + +.tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -0px; } + +.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -0px; } + +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -0px; } + +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -0px; } + +.tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -0px; } + +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -0px; } + +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; } + +.tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -0px; } + +.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -0px; } + +.tsd-kind-get-signature > .tsd-kind-icon:before { + background-position: -136px -17px; } + +.tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -17px; } + +.tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -17px; } + +.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -17px; } + +.tsd-kind-set-signature > .tsd-kind-icon:before { + background-position: -136px -34px; } + +.tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -34px; } + +.tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -34px; } + +.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -34px; } + +.tsd-kind-accessor > .tsd-kind-icon:before { + background-position: -136px -51px; } + +.tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -51px; } + +.tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -51px; } + +.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -51px; } + +.tsd-kind-function > .tsd-kind-icon:before { + background-position: -136px -68px; } + +.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; } + +.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; } + +.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -68px; } + +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -68px; } + +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -68px; } + +.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; } + +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -68px; } + +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; } + +.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -68px; } + +.tsd-kind-method > .tsd-kind-icon:before { + background-position: -136px -68px; } + +.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; } + +.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; } + +.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -68px; } + +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -68px; } + +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -68px; } + +.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; } + +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -68px; } + +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; } + +.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -68px; } + +.tsd-kind-call-signature > .tsd-kind-icon:before { + background-position: -136px -68px; } + +.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; } + +.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; } + +.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -68px; } + +.tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: -136px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -85px; } + +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -85px; } + +.tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: -136px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -85px; } + +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -85px; } + +.tsd-kind-constructor > .tsd-kind-icon:before { + background-position: -136px -102px; } + +.tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -102px; } + +.tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -102px; } + +.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -102px; } + +.tsd-kind-constructor-signature > .tsd-kind-icon:before { + background-position: -136px -102px; } + +.tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -102px; } + +.tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -102px; } + +.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -102px; } + +.tsd-kind-index-signature > .tsd-kind-icon:before { + background-position: -136px -119px; } + +.tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -119px; } + +.tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -119px; } + +.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -119px; } + +.tsd-kind-event > .tsd-kind-icon:before { + background-position: -136px -136px; } + +.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -136px; } + +.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; } + +.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -136px; } + +.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -136px; } + +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -136px; } + +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -136px; } + +.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; } + +.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -136px; } + +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -136px; } + +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; } + +.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -136px; } + +.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -136px; } + +.tsd-is-static > .tsd-kind-icon:before { + background-position: -136px -153px; } + +.tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -153px; } + +.tsd-is-static.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; } + +.tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -153px; } + +.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -153px; } + +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -153px; } + +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -153px; } + +.tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; } + +.tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -153px; } + +.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -153px; } + +.tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; } + +.tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -153px; } + +.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -153px; } + +.tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { + background-position: -136px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -170px; } + +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { + background-position: -136px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -170px; } + +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { + background-position: -136px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -170px; } + +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { + background-position: -136px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -102px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -187px; } + +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -221px -187px; } + +.no-transition { + transition: none !important; } + +@keyframes fade-in { + from { + opacity: 0; } + to { + opacity: 1; } } + +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; } + to { + opacity: 0; } } + +@keyframes fade-in-delayed { + 0% { + opacity: 0; } + 33% { + opacity: 0; } + 100% { + opacity: 1; } } + +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; } + 66% { + opacity: 0; } + 100% { + opacity: 0; } } + +@keyframes shift-to-left { + from { + transform: translate(0, 0); } + to { + transform: translate(-25%, 0); } } + +@keyframes unshift-to-left { + from { + transform: translate(-25%, 0); } + to { + transform: translate(0, 0); } } + +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); } + to { + transform: translate(0, 0); } } + +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; } + to { + transform: translate(100%, 0); } } + +body { + background: #fdfdfd; + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: #222; } + +a { + color: #4da6ff; + text-decoration: none; } + a:hover { + text-decoration: underline; } + +code, pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 14px; + background-color: rgba(0, 0, 0, 0.04); } + +pre { + padding: 10px; } + pre code { + padding: 0; + font-size: 100%; + background-color: transparent; } + +.tsd-typography { + line-height: 1.333em; } + .tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; } + .tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { + font-size: 1em; + margin: 0; } + .tsd-typography h5, .tsd-typography h6 { + font-weight: normal; } + .tsd-typography p, .tsd-typography ul, .tsd-typography ol { + margin: 1em 0; } + +@media (min-width: 901px) and (max-width: 1024px) { + html.default .col-content { + width: 72%; } + html.default .col-menu { + width: 28%; } + html.default .tsd-navigation { + padding-left: 10px; } } + +@media (max-width: 900px) { + html.default .col-content { + float: none; + width: 100%; } + html.default .col-menu { + position: fixed !important; + overflow: auto; + -webkit-overflow-scrolling: touch; + overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + width: 100%; + padding: 20px 20px 0 0; + max-width: 450px; + visibility: hidden; + background-color: #fff; + transform: translate(100%, 0); } + html.default .col-menu > *:last-child { + padding-bottom: 20px; } + html.default .overlay { + content: ''; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; } + html.default.to-has-menu .overlay { + animation: fade-in 0.4s; } + html.default.to-has-menu header, + html.default.to-has-menu footer, + html.default.to-has-menu .col-content { + animation: shift-to-left 0.4s; } + html.default.to-has-menu .col-menu { + animation: pop-in-from-right 0.4s; } + html.default.from-has-menu .overlay { + animation: fade-out 0.4s; } + html.default.from-has-menu header, + html.default.from-has-menu footer, + html.default.from-has-menu .col-content { + animation: unshift-to-left 0.4s; } + html.default.from-has-menu .col-menu { + animation: pop-out-to-right 0.4s; } + html.default.has-menu body { + overflow: hidden; } + html.default.has-menu .overlay { + visibility: visible; } + html.default.has-menu header, + html.default.has-menu footer, + html.default.has-menu .col-content { + transform: translate(-25%, 0); } + html.default.has-menu .col-menu { + visibility: visible; + transform: translate(0, 0); } } + +.tsd-page-title { + padding: 70px 0 20px 0; + margin: 0 0 40px 0; + background: #fff; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); } + .tsd-page-title h1 { + margin: 0; } + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: #808080; } + .tsd-breadcrumb a { + color: #808080; + text-decoration: none; } + .tsd-breadcrumb a:hover { + text-decoration: underline; } + .tsd-breadcrumb li { + display: inline; } + .tsd-breadcrumb li:after { + content: ' / '; } + +html.minimal .container { + margin: 0; } + +html.minimal .container-main { + padding-top: 50px; + padding-bottom: 0; } + +html.minimal .content-wrap { + padding-left: 300px; } + +html.minimal .tsd-navigation { + position: fixed !important; + overflow: auto; + -webkit-overflow-scrolling: touch; + overflow-scrolling: touch; + box-sizing: border-box; + z-index: 1; + left: 0; + top: 40px; + bottom: 0; + width: 300px; + padding: 20px; + margin: 0; } + +html.minimal .tsd-member .tsd-member { + margin-left: 0; } + +html.minimal .tsd-page-toolbar { + position: fixed; + z-index: 2; } + +html.minimal #tsd-filter .tsd-filter-group { + right: 0; + transform: none; } + +html.minimal footer { + background-color: transparent; } + html.minimal footer .container { + padding: 0; } + +html.minimal .tsd-generator { + padding: 0; } + +@media (max-width: 900px) { + html.minimal .tsd-navigation { + display: none; } + html.minimal .content-wrap { + padding-left: 0; } } + +dl.tsd-comment-tags { + overflow: hidden; } + dl.tsd-comment-tags dt { + float: left; + padding: 1px 5px; + margin: 0 10px 0 0; + border-radius: 4px; + border: 1px solid #808080; + color: #808080; + font-size: 0.8em; + font-weight: normal; } + dl.tsd-comment-tags dd { + margin: 0 0 10px 0; } + dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after { + display: table; + content: " "; } + dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after { + clear: both; } + dl.tsd-comment-tags p { + margin: 0; } + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; } + .tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; } + +.toggle-protected .tsd-is-private { + display: none; } + +.toggle-public .tsd-is-private, +.toggle-public .tsd-is-protected, +.toggle-public .tsd-is-private-protected { + display: none; } + +.toggle-inherited .tsd-is-inherited { + display: none; } + +.toggle-only-exported .tsd-is-not-exported { + display: none; } + +.toggle-externals .tsd-is-external { + display: none; } + +#tsd-filter { + position: relative; + display: inline-block; + height: 40px; + vertical-align: bottom; } + .no-filter #tsd-filter { + display: none; } + #tsd-filter .tsd-filter-group { + display: inline-block; + height: 40px; + vertical-align: bottom; + white-space: nowrap; } + #tsd-filter input { + display: none; } + @media (max-width: 900px) { + #tsd-filter .tsd-filter-group { + display: block; + position: absolute; + top: 40px; + right: 20px; + height: auto; + background-color: #fff; + visibility: hidden; + transform: translate(50%, 0); + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } + .has-options #tsd-filter .tsd-filter-group { + visibility: visible; } + .to-has-options #tsd-filter .tsd-filter-group { + animation: fade-in 0.2s; } + .from-has-options #tsd-filter .tsd-filter-group { + animation: fade-out 0.2s; } + #tsd-filter label, + #tsd-filter .tsd-select { + display: block; + padding-right: 20px; } } + +footer { + border-top: 1px solid #eee; + background-color: #fff; } + footer.with-border-bottom { + border-bottom: 1px solid #eee; } + footer .tsd-legend-group { + font-size: 0; } + footer .tsd-legend { + display: inline-block; + width: 25%; + padding: 0; + font-size: 16px; + list-style: none; + line-height: 1.333em; + vertical-align: top; } + @media (max-width: 900px) { + footer .tsd-legend { + width: 50%; } } + +.tsd-hierarchy { + list-style: square; + padding: 0 0 0 20px; + margin: 0; } + .tsd-hierarchy .target { + font-weight: bold; } + +.tsd-index-panel .tsd-index-content { + margin-bottom: -30px !important; } + +.tsd-index-panel .tsd-index-section { + margin-bottom: 30px !important; } + +.tsd-index-panel h3 { + margin: 0 -20px 10px -20px; + padding: 0 20px 10px 20px; + border-bottom: 1px solid #eee; } + +.tsd-index-panel ul.tsd-index-list { + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; + -moz-column-gap: 20px; + -ms-column-gap: 20px; + -o-column-gap: 20px; + column-gap: 20px; + padding: 0; + list-style: none; + line-height: 1.333em; } + @media (max-width: 900px) { + .tsd-index-panel ul.tsd-index-list { + -moz-column-count: 1; + -ms-column-count: 1; + -o-column-count: 1; + column-count: 1; } } + @media (min-width: 901px) and (max-width: 1024px) { + .tsd-index-panel ul.tsd-index-list { + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; } } + .tsd-index-panel ul.tsd-index-list li { + -webkit-column-break-inside: avoid; + -moz-column-break-inside: avoid; + -ms-column-break-inside: avoid; + -o-column-break-inside: avoid; + column-break-inside: avoid; + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; } + +.tsd-index-panel a, +.tsd-index-panel .tsd-parent-kind-module a { + color: #9600ff; } + +.tsd-index-panel .tsd-parent-kind-interface a { + color: #7da01f; } + +.tsd-index-panel .tsd-parent-kind-enum a { + color: #cc9900; } + +.tsd-index-panel .tsd-parent-kind-class a { + color: #4da6ff; } + +.tsd-index-panel .tsd-kind-module a { + color: #9600ff; } + +.tsd-index-panel .tsd-kind-interface a { + color: #7da01f; } + +.tsd-index-panel .tsd-kind-enum a { + color: #cc9900; } + +.tsd-index-panel .tsd-kind-class a { + color: #4da6ff; } + +.tsd-index-panel .tsd-is-private a { + color: #808080; } + +.tsd-flag { + display: inline-block; + padding: 1px 5px; + border-radius: 4px; + color: #fff; + background-color: #808080; + text-indent: 0; + font-size: 14px; + font-weight: normal; } + +.tsd-anchor { + position: absolute; + top: -100px; } + +.tsd-member { + position: relative; } + .tsd-member .tsd-anchor + h3 { + margin-top: 0; + margin-bottom: 0; + border-bottom: none; } + +.tsd-navigation { + padding: 0 0 0 40px; } + .tsd-navigation a { + display: block; + padding-top: 2px; + padding-bottom: 2px; + border-left: 2px solid transparent; + color: #222; + text-decoration: none; + transition: border-left-color 0.1s; } + .tsd-navigation a:hover { + text-decoration: underline; } + .tsd-navigation ul { + margin: 0; + padding: 0; + list-style: none; } + .tsd-navigation li { + padding: 0; } + +.tsd-navigation.primary { + padding-bottom: 40px; } + .tsd-navigation.primary a { + display: block; + padding-top: 6px; + padding-bottom: 6px; } + .tsd-navigation.primary ul li a { + padding-left: 5px; } + .tsd-navigation.primary ul li li a { + padding-left: 25px; } + .tsd-navigation.primary ul li li li a { + padding-left: 45px; } + .tsd-navigation.primary ul li li li li a { + padding-left: 65px; } + .tsd-navigation.primary ul li li li li li a { + padding-left: 85px; } + .tsd-navigation.primary ul li li li li li li a { + padding-left: 105px; } + .tsd-navigation.primary > ul { + border-bottom: 1px solid #eee; } + .tsd-navigation.primary li { + border-top: 1px solid #eee; } + .tsd-navigation.primary li.current > a { + font-weight: bold; } + .tsd-navigation.primary li.label span { + display: block; + padding: 20px 0 6px 5px; + color: #808080; } + .tsd-navigation.primary li.globals + li > span, + .tsd-navigation.primary li.globals + li > a { + padding-top: 20px; } + +.tsd-navigation.secondary ul { + transition: opacity 0.2s; } + .tsd-navigation.secondary ul li a { + padding-left: 25px; } + .tsd-navigation.secondary ul li li a { + padding-left: 45px; } + .tsd-navigation.secondary ul li li li a { + padding-left: 65px; } + .tsd-navigation.secondary ul li li li li a { + padding-left: 85px; } + .tsd-navigation.secondary ul li li li li li a { + padding-left: 105px; } + .tsd-navigation.secondary ul li li li li li li a { + padding-left: 125px; } + .tsd-navigation.secondary ul.current a { + border-left-color: #eee; } + +.tsd-navigation.secondary li.focus > a, +.tsd-navigation.secondary ul.current li.focus > a { + border-left-color: #000; } + +.tsd-navigation.secondary li.current { + margin-top: 20px; + margin-bottom: 20px; + border-left-color: #eee; } + .tsd-navigation.secondary li.current > a { + font-weight: bold; } + +@media (min-width: 901px) { + .menu-sticky-wrap { + position: static; } + .no-csspositionsticky .menu-sticky-wrap.sticky { + position: fixed; } + .no-csspositionsticky .menu-sticky-wrap.sticky-current { + position: fixed; } + .no-csspositionsticky .menu-sticky-wrap.sticky-current ul.before-current, + .no-csspositionsticky .menu-sticky-wrap.sticky-current ul.after-current { + opacity: 0; } + .no-csspositionsticky .menu-sticky-wrap.sticky-bottom { + position: absolute; + top: auto !important; + left: auto !important; + bottom: 0; + right: 0; } + .csspositionsticky .menu-sticky-wrap.sticky { + position: -webkit-sticky; + position: sticky; } + .csspositionsticky .menu-sticky-wrap.sticky-current { + position: -webkit-sticky; + position: sticky; } } + +.tsd-panel { + margin: 20px 0; + padding: 20px; + background-color: #fff; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } + .tsd-panel:empty { + display: none; } + .tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { + margin: 1.5em -20px 10px -20px; + padding: 0 20px 10px 20px; + border-bottom: 1px solid #eee; } + .tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: 0; } + .tsd-panel table { + display: block; + width: 100%; + overflow: auto; + margin-top: 10px; + word-break: normal; + word-break: keep-all; } + .tsd-panel table th { + font-weight: bold; } + .tsd-panel table th, .tsd-panel table td { + padding: 6px 13px; + border: 1px solid #ddd; } + .tsd-panel table tr { + background-color: #fff; + border-top: 1px solid #ccc; } + .tsd-panel table tr:nth-child(2n) { + background-color: #f8f8f8; } + +.tsd-panel-group { + margin: 60px 0; } + .tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { + padding-left: 20px; + padding-right: 20px; } + +#tsd-search { + transition: background-color 0.2s; } + #tsd-search .title { + position: relative; + z-index: 2; } + #tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 40px; + height: 40px; } + #tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: #222; } + #tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; } + #tsd-search .field input, + #tsd-search .title { + transition: opacity 0.2s; } + #tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } + #tsd-search .results li { + padding: 0 10px; + background-color: #fdfdfd; } + #tsd-search .results li:nth-child(even) { + background-color: #fff; } + #tsd-search .results li.state { + display: none; } + #tsd-search .results li.current, + #tsd-search .results li:hover { + background-color: #eee; } + #tsd-search .results a { + display: block; } + #tsd-search .results a:before { + top: 10px; } + #tsd-search .results span.parent { + color: #808080; + font-weight: normal; } + #tsd-search.has-focus { + background-color: #eee; } + #tsd-search.has-focus .field input { + top: 0; + opacity: 1; } + #tsd-search.has-focus .title { + z-index: 0; + opacity: 0; } + #tsd-search.has-focus .results { + visibility: visible; } + #tsd-search.loading .results li.state.loading { + display: block; } + #tsd-search.failure .results li.state.failure { + display: block; } + +.tsd-signature { + margin: 0 0 1em 0; + padding: 10px; + border: 1px solid #eee; + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; } + .tsd-signature.tsd-kind-icon { + padding-left: 30px; } + .tsd-signature.tsd-kind-icon:before { + top: 10px; + left: 10px; } + .tsd-panel > .tsd-signature { + margin-left: -20px; + margin-right: -20px; + border-width: 1px 0; } + .tsd-panel > .tsd-signature.tsd-kind-icon { + padding-left: 40px; } + .tsd-panel > .tsd-signature.tsd-kind-icon:before { + left: 20px; } + +.tsd-signature-symbol { + color: #808080; + font-weight: normal; } + +.tsd-signature-type { + font-style: italic; + font-weight: normal; } + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + border: 1px solid #eee; } + .tsd-signatures .tsd-signature { + margin: 0; + border-width: 1px 0 0 0; + transition: background-color 0.1s; } + .tsd-signatures .tsd-signature:first-child { + border-top-width: 0; } + .tsd-signatures .tsd-signature.current { + background-color: #eee; } + .tsd-signatures.active > .tsd-signature { + cursor: pointer; } + .tsd-panel > .tsd-signatures { + margin-left: -20px; + margin-right: -20px; + border-width: 1px 0; } + .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { + padding-left: 40px; } + .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { + left: 20px; } + .tsd-panel > a.anchor + .tsd-signatures { + border-top-width: 0; + margin-top: -20px; } + +ul.tsd-descriptions { + position: relative; + overflow: hidden; + transition: height 0.3s; + padding: 0; + list-style: none; } + ul.tsd-descriptions.active > .tsd-description { + display: none; } + ul.tsd-descriptions.active > .tsd-description.current { + display: block; } + ul.tsd-descriptions.active > .tsd-description.fade-in { + animation: fade-in-delayed 0.3s; } + ul.tsd-descriptions.active > .tsd-description.fade-out { + animation: fade-out-delayed 0.3s; + position: absolute; + display: block; + top: 0; + left: 0; + right: 0; + opacity: 0; + visibility: hidden; } + ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { + font-size: 16px; + margin: 1em 0 0.5em 0; } + +ul.tsd-parameters, +ul.tsd-type-parameters { + list-style: square; + margin: 0; + padding-left: 20px; } + ul.tsd-parameters > li.tsd-parameter-siganture, + ul.tsd-type-parameters > li.tsd-parameter-siganture { + list-style: none; + margin-left: -20px; } + ul.tsd-parameters h5, + ul.tsd-type-parameters h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; } + ul.tsd-parameters .tsd-comment, + ul.tsd-type-parameters .tsd-comment { + margin-top: -0.5em; } + +.tsd-sources { + font-size: 14px; + color: #808080; + margin: 0 0 1em 0; } + .tsd-sources a { + color: #808080; + text-decoration: underline; } + .tsd-sources ul, .tsd-sources p { + margin: 0 !important; } + .tsd-sources ul { + list-style: none; + padding: 0; } + +.tsd-page-toolbar { + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 40px; + color: #333; + background: #fff; + border-bottom: 1px solid #eee; } + .tsd-page-toolbar a { + color: #333; + text-decoration: none; } + .tsd-page-toolbar a.title { + font-weight: bold; } + .tsd-page-toolbar a.title:hover { + text-decoration: underline; } + .tsd-page-toolbar .table-wrap { + display: table; + width: 100%; + height: 40px; } + .tsd-page-toolbar .table-cell { + display: table-cell; + position: relative; + white-space: nowrap; + line-height: 40px; } + .tsd-page-toolbar .table-cell:first-child { + width: 100%; } + +.tsd-widget:before, .tsd-select .tsd-select-label:before, .tsd-select .tsd-select-list li:before { + content: ''; + display: inline-block; + width: 40px; + height: 40px; + margin: 0 -8px 0 0; + background-image: url(../images/widgets.png); + background-repeat: no-repeat; + text-indent: -1024px; + vertical-align: bottom; } + @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { + .tsd-widget:before, .tsd-select .tsd-select-label:before, .tsd-select .tsd-select-list li:before { + background-image: url(../images/widgets@2x.png); + background-size: 320px 40px; } } + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.6; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; } + .tsd-widget:hover { + opacity: 0.8; } + .tsd-widget.active { + opacity: 1; + background-color: #eee; } + .tsd-widget.no-caption { + width: 40px; } + .tsd-widget.no-caption:before { + margin: 0; } + .tsd-widget.search:before { + background-position: 0 0; } + .tsd-widget.menu:before { + background-position: -40px 0; } + .tsd-widget.options:before { + background-position: -80px 0; } + .tsd-widget.options, .tsd-widget.menu { + display: none; } + @media (max-width: 900px) { + .tsd-widget.options, .tsd-widget.menu { + display: inline-block; } } + input[type=checkbox] + .tsd-widget:before { + background-position: -120px 0; } + input[type=checkbox]:checked + .tsd-widget:before { + background-position: -160px 0; } + +.tsd-select { + position: relative; + display: inline-block; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; } + .tsd-select .tsd-select-label { + opacity: 0.6; + transition: opacity 0.2s; } + .tsd-select .tsd-select-label:before { + background-position: -240px 0; } + .tsd-select.active .tsd-select-label { + opacity: 0.8; } + .tsd-select.active .tsd-select-list { + visibility: visible; + opacity: 1; + transition-delay: 0s; } + .tsd-select .tsd-select-list { + position: absolute; + visibility: hidden; + top: 40px; + left: 0; + margin: 0; + padding: 0; + opacity: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); + transition: visibility 0s 0.2s, opacity 0.2s; } + .tsd-select .tsd-select-list li { + padding: 0 20px 0 0; + background-color: #fdfdfd; } + .tsd-select .tsd-select-list li:before { + background-position: 40px 0; } + .tsd-select .tsd-select-list li:nth-child(even) { + background-color: #fff; } + .tsd-select .tsd-select-list li:hover { + background-color: #eee; } + .tsd-select .tsd-select-list li.selected:before { + background-position: -200px 0; } + @media (max-width: 900px) { + .tsd-select .tsd-select-list { + top: 0; + left: auto; + right: 100%; + margin-right: -5px; } + .tsd-select .tsd-select-label:before { + background-position: -280px 0; } } + +img { + max-width: 100%; } diff --git a/docs/assets/images/icons.png b/docs/assets/images/icons.png new file mode 100644 index 0000000000000000000000000000000000000000..3836d5fe46e48bbe186116855aae879c23935327 GIT binary patch literal 9615 zcmZ{Kc_36>+`rwViHMAd#!?~-${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4#pIUoZJNx?4|ZC{)l>+jaSiiJ`GBKf}l) zUk1>%A61hqy!KvfRsM^|u6vwbH5WpfH(I5AdpBAg%rar%zW}nccGxfgRV4&v`tEoGyBq!uz^f zVqWEtxn%j&+Q2Fi$rL)H`M_HExP+?mFyN^){c{JXs{IM}f}p>7lfD zLZ;s)%6a(Ow@`(jP}k~pn@!dv6JhJkZf5UoumHv`g-tcCs)w* z#0sc%t9@Li{p}f*$vg$UiQ*RGZUr=ykDIaxRDU_(QfcURuYrpX*7IQcS$(Buw%VW7 zxaffDgn{-=K@iEh)LlPc3MPzc+qM^>RXr6Y8ASnP&dr6fqmwYILTpmh$E%{Iz%Qz( NZmR35l_G4O{0}dcmS_L~ literal 0 HcmV?d00001 diff --git a/docs/assets/images/icons@2x.png b/docs/assets/images/icons@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5a209e2f6d7f915cc9cb6fe7a4264c8be4db87b0 GIT binary patch literal 28144 zcmeFZcUTka`>%_-5TzIqq$xo`r3nZ`iiBRG(z{ZnN$)K|ii-3S5u{fmRRNLEoAh2n z@4X|01dtAA(50@mzH5K?{+)CF+}EWTz2eMdW-{;n-p}WG1C$hCWW;pD1Ox#ad~k9g4`y4!oVfq@3c(iW~uhy*`T7_0aH7`>`EnYuXVq#+YC==3#rnNM4TqqzM zpi2Elr!3hl!ZdK#y0bV+yVc8rwFEtAX3=QlvJ&e-EsBp)Q`0yKXbNuf-yYw7kh0CD z|Flk1UuHgvoR+*QR0ee&IDUfUzE7*`A=P$6nC;BPI@VJs|F#`Xc>X!`<6%M7XXNok zw^unt1h0m>-&2{GiIGsByulr92XZRrazZs&&M3jJintF7A}cE^uW4zt_r81yHt1I! z6-_gmO@78G3$})kfyhR0^qk?zev_%4R$qSjQI3MAg0)9EM#TOAD=_tf(*)S$7yiiR z&5v>wk3Bn**iD9S_I#2%^vi(^O+gpv2i^A);6^AcH%VC>0nH8|O!jN*L<#RtT z@aF9HMNu*d(BdiZq(LBO%(qsjSot+Z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V&dy)5>MGnr6uw&*J)SR z4O5d0C2t!+(VG{Y3fFU3G4!F~;z`0^Zy$VT zlJGjGSF&$3BUtfc03n5Fp1KQfb~InA&8`q*1q&GG=||Hzpy6L2H1f*;LpyQht{w?} zDZ2kUk>FaSr)>&iD|Z|7sH6U!z%}z@JhB~OedrN<`}Lfq^UV}Y43>cn?*zZ0AOM2< zpX5w(`QSQaEYTvqHz~=NXHUjQf0o%dBkQfeAN31lR&xxOEgYHTdZp%bVXN280=Ana z^M=FH$n=5rl?&BI)^08Qe_`>YwGkkoEIR+Kv^%~Pb0k^b?3|sA#qp8cs#eTueeM2Q zRw=0&M&6mX$~YF!Y0ZBc@63#c7`f!9BKSXd@Voc{RoLU+XN*d^;RK${8T?=LBS%Bk z&gkb&o-U3d6^w6h1+IPUz|;DW zIZ;96kdsD>Qv^q=09&hp0GpEni<1IR%gvP3v%OR9*{MuRTKWHZyIbuBt)Ci`cU_&% z1T+i^Y)o{%281-<3TpPAUTzw5v;RY=>1rvxmPl96#kYc9hX!6V^nB|ad#(S+)}?8C zr_H+lT3B#So$T=?$(w3-{rbQ4R<@nsf$}$hwSO)A$8&`(j+wQf=Jwhb0`CvhR5DCf z^OgI)KQemrUFPH+UynC$Y~QHG%DbTVh-Skz{enNU)cV_hPu~{TD7TPZl>0&K>iuE| z7AYn$7)Jrb9GE&SfQW4q&G*@N|4cHI`VakFa5-C!ov&XD)J(qp$rJJ*9e z-sHv}#g*T7Cv048d1v~BEAzM5FztAse#q78WWC^BUCzQ U&wLp6h6BX&boFyt=akR{0G%$)mH+?% literal 0 HcmV?d00001 diff --git a/docs/assets/images/widgets@2x.png b/docs/assets/images/widgets@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4bbbd57272f3b28f47527d4951ad10f950b8ad43 GIT binary patch literal 855 zcmeAS@N?(olHy`uVBq!ia0y~yU}^xe12~w0Jcmn z@(X6T|9^jgLcx21{)7exgY)a>N6m2F0<`Rqr;B4q1>>88jUdw-7W`c)zLE*mq8W2H z-<&Jl_Hco5BuC5n@AbF5GD82~-e8-v=#zCyUX0F-o}8pPfAv`!GN$ff+TL<~@kgt} z62eO?_|&+>xBmM$@p|z`tIKEdpPf8%qI>4r7@jn<=eta*{3~?g(zz{Ke9zc-G^gr? z-7foa?LcS!hmbwzru}ICvbWLlW8;+l-}!^=c32!^nV`+`C*;0-*Y%l94pC;Cb3GXz zzSf%a!{gVr{Y_lVuUj+a)*Ca+!-Hu%xmP&&X-2CuANY8^i{D7Kg6qzP zXz_ps9+lN8ESH{K4`yu&b~I>N9xGlE&;2u*b?+Go!AhN?m-bxlLvtC#MzDF2kFzfHJ1W7ybqdefSqVhbOykd*Yi%EDuhs z4wF{ft^bv2+DDnKb8gj1FuvcV`M}luS>lO<^)8x>y1#R;a=-ZKwWTQQb)ioBbi;zh zD!f5V)8581to1LL7c9!l^PSC$NBPYif!_vAZhmL4)v4U)4UsrLYiH_9rmQDd?)(e5 z^pcH>qvBg*i0dus2r*mp4;zKvu=P#s-ti;2obl`NjjwoYd>e(oo#j_uyRb<7Pv^If zzZ|mGHmV)8^tbO%^>eqMw(@7(&3g{jEp-Najo7V75xI_ZHK*FA`elF{r5}E*d7+j_R literal 0 HcmV?d00001 diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js new file mode 100644 index 0000000..667b269 --- /dev/null +++ b/docs/assets/js/main.js @@ -0,0 +1 @@ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function x(e){return null!=e&&e===e.window}var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0>10|55296,1023&r|56320)}function oe(){T()}var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){for((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;o--;)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;l--;)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(R)||[""]).length;l--;)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="

",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0":">",'"':""","'":"'","`":"`"},P=h.invert(L);h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};function $(n){return"\\"+U[n]}var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g;h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}function u(n){return t.call(this,n,h)}var c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};function G(n,r){return n._chain?h(r).chain():r}h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}(),function(t){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,r){e.Backbone=t(e,r,i,n)});else if("undefined"!=typeof exports){var n,i=require("underscore");try{n=require("jquery")}catch(r){}t(e,exports,i,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var r=t.Backbone,s=Array.prototype.slice;e.VERSION="1.4.0",e.$=n,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var h,a=e.Events={},o=/\s+/,u=function(t,e,n,r,s){var h,a=0;if(n&&"object"==typeof n){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(h=i.keys(n);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var g,m,s=[],a=[],o=[],h=[],u={},l=e.add,c=e.merge,f=e.remove,d=!1,v=this.comparator&&null==r&&!1!==e.sort,p=i.isString(this.comparator)?this.comparator:null;for(m=0;m=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){for(var t,r;47<(r=(t=this.next()).charCodeAt(0))&&r<58;);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.posscrollTop;)index-=1;for(;index ul.current"),_this.$navigation=_this.$el.parents(".menu-sticky-wrap"),_this.$container=_this.$el.parents(".row"),_this.listenTo(typedoc.viewport,"resize",_this.onResize),hasPositionSticky||_this.listenTo(typedoc.viewport,"scroll",_this.onScroll),_this.onResize(typedoc.viewport.width,typedoc.viewport.height),_this}return __extends(MenuSticky,_super),MenuSticky.prototype.setState=function(state){this.state!=state&&(""!=this.state&&this.$navigation.removeClass(this.state),this.state=state,""!=this.state&&this.$navigation.addClass(this.state))},MenuSticky.prototype.onResize=function(width,height){this.stickyMode=StickyMode.None,this.setState("");var containerTop=this.$container.offset().top,containerHeight=this.$container.height()||0,bottom=containerTop+containerHeight;if(this.$navigation.height()this.stickyBottom?this.setState("sticky-bottom"):this.setState(scrollTop+20>this.stickyTop?"sticky-current":""):this.stickyMode==StickyMode.Secondary&&(scrollTop>this.stickyBottom?this.setState("sticky-bottom"):this.setState(scrollTop+20>this.stickyTop?"sticky":""))},MenuSticky}(Backbone.View);typedoc.MenuSticky=MenuSticky,typedoc.registerComponent(MenuSticky,".menu-sticky")}(typedoc||(typedoc={})),function(typedoc){var search;!function(search){var SearchLoadingState;!function(SearchLoadingState){SearchLoadingState[SearchLoadingState.Idle=0]="Idle",SearchLoadingState[SearchLoadingState.Loading=1]="Loading",SearchLoadingState[SearchLoadingState.Ready=2]="Ready",SearchLoadingState[SearchLoadingState.Failure=3]="Failure"}(SearchLoadingState||(SearchLoadingState={}));var $el=$("#tsd-search"),$field=$("#tsd-search-field"),$results=$(".results"),base=$el.attr("data-base")+"/",query="",loadingState=SearchLoadingState.Idle,hasFocus=!1,preventPress=!1,index,resultClicked=!1;function createIndex(){var builder=new lunr.Builder;builder.pipeline.add(lunr.trimmer),builder.field("name",{boost:10}),builder.field("parent"),builder.ref("id");var rows=search.data.rows,pos=0,length=rows.length;!function batch(){for(var cycles=0;cycles++<100;)if(builder.add(rows[pos]),++pos==length)return index=builder.build(),setLoadingState(SearchLoadingState.Ready);setTimeout(batch,10)}()}function loadIndex(){loadingState==SearchLoadingState.Idle&&(setTimeout(function(){loadingState==SearchLoadingState.Idle&&setLoadingState(SearchLoadingState.Loading)},500),void 0!==search.data?createIndex():$.get($el.attr("data-index")).done(function(source){eval(source),createIndex()}).fail(function(){setLoadingState(SearchLoadingState.Failure)}))}function updateResults(){if($results.empty(),loadingState==SearchLoadingState.Ready&&query){var res=index.search("*"+query+"*");0===res.length&&(res=index.search("*"+query+"~1*"));for(var i=0,c=Math.min(10,res.length);i"+match+""}),parent=row.parent||"";(parent=parent.replace(new RegExp(query,"i"),function(match){return""+match+""}))&&(name=''+parent+"."+name),$results.append('
  • '+name+"
  • ")}}}function setLoadingState(value){loadingState!=value&&($el.removeClass(SearchLoadingState[loadingState].toLowerCase()),loadingState=value,$el.addClass(SearchLoadingState[loadingState].toLowerCase()),value==SearchLoadingState.Ready&&updateResults())}function setHasFocus(value){hasFocus!=value&&(hasFocus=value,$el.toggleClass("has-focus"),value?(setQuery(""),$field.val("")):$field.val(query))}function setQuery(value){query=$.trim(value),updateResults()}function setCurrentResult(dir){var $current=$results.find(".current");if(0==$current.length)$results.find(1==dir?"li:first-child":"li:last-child").addClass("current");else{var $rel=1==dir?$current.next("li"):$current.prev("li");0<$rel.length&&($current.removeClass("current"),$rel.addClass("current"))}}function gotoCurrentResult(){var $current=$results.find(".current");0==$current.length&&($current=$results.find("li:first-child")),0<$current.length&&(window.location.href=$current.find("a").prop("href"),$field.blur())}$results.on("mousedown",function(){resultClicked=!0}).on("mouseup",function(){setHasFocus(resultClicked=!1)}),$field.on("focusin",function(){setHasFocus(!0),loadIndex()}).on("focusout",function(){resultClicked?resultClicked=!1:setTimeout(function(){return setHasFocus(!1)},100)}).on("input",function(){setQuery($.trim(($field.val()||"").toString()))}).on("keydown",function(e){13==e.keyCode||27==e.keyCode||38==e.keyCode||40==e.keyCode?(preventPress=!0,e.preventDefault(),13==e.keyCode?gotoCurrentResult():27==e.keyCode?$field.blur():38==e.keyCode?setCurrentResult(-1):40==e.keyCode&&setCurrentResult(1)):preventPress=!1}).on("keypress",function(e){preventPress&&e.preventDefault()}),$("body").on("keydown",function(e){e.altKey||e.ctrlKey||e.metaKey||!hasFocus&&47this.groups.length-1&&(index=this.groups.length-1),this.index!=index){var to=this.groups[index];if(-1 .tsd-signature");if(!($signatures.length<2)){this.$container=this.$el.siblings(".tsd-descriptions");var $descriptions=this.$container.find("> .tsd-description");this.groups=[],$signatures.each(function(index,el){_this.groups.push(new SignatureGroup($(el),$descriptions.eq(index)))})}},Signature.prototype.onClick=function(e){var _this=this;e.preventDefault(),_(this.groups).forEach(function(group,index){group.$signature.is(e.currentTarget)&&_this.setIndex(index)})},Signature}(Backbone.View);typedoc.registerComponent(Signature,".tsd-signatures")}(typedoc||(typedoc={})),function(typedoc){var Toggle=function(_super){function Toggle(options){var _this=_super.call(this,options)||this;return _this.className=_this.$el.attr("data-toggle")||"",_this.$el.on(typedoc.pointerUp,function(e){return _this.onPointerUp(e)}),_this.$el.on("click",function(e){return e.preventDefault()}),typedoc.$document.on(typedoc.pointerDown,function(e){return _this.onDocumentPointerDown(e)}),typedoc.$document.on(typedoc.pointerUp,function(e){return _this.onDocumentPointerUp(e)}),_this}return __extends(Toggle,_super),Toggle.prototype.setActive=function(value){if(this.active!=value){this.active=value,typedoc.$html.toggleClass("has-"+this.className,value),this.$el.toggleClass("active",value);var transition=(this.active?"to-has-":"from-has-")+this.className;typedoc.$html.addClass(transition),setTimeout(function(){return typedoc.$html.removeClass(transition)},500)}},Toggle.prototype.onPointerUp=function(event){typedoc.hasPointerMoved||(this.setActive(!0),event.preventDefault())},Toggle.prototype.onDocumentPointerDown=function(e){if(this.active){var $path=$(e.target).parents().addBack();if($path.hasClass("col-menu"))return;if($path.hasClass("tsd-filter-group"))return;this.setActive(!1)}},Toggle.prototype.onDocumentPointerUp=function(e){var _this=this;if(!typedoc.hasPointerMoved&&this.active){var $path=$(e.target).parents().addBack();if($path.hasClass("col-menu")){var $link=$path.filter("a");if($link.length){var href=window.location.href;-1!=href.indexOf("#")&&(href=href.substr(0,href.indexOf("#"))),$link.prop("href").substr(0,href.length)==href&&setTimeout(function(){return _this.setActive(!1)},250)}}}},Toggle}(Backbone.View);typedoc.registerComponent(Toggle,"a[data-toggle]")}(typedoc||(typedoc={})),function(typedoc){typedoc.app=new typedoc.Application}(typedoc||(typedoc={})); \ No newline at end of file diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js new file mode 100644 index 0000000..da08a32 --- /dev/null +++ b/docs/assets/js/search.js @@ -0,0 +1,3 @@ +var typedoc = typedoc || {}; + typedoc.search = typedoc.search || {}; + typedoc.search.data = {"kinds":{"32":"Variable","64":"Function","128":"Class","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"MaybePayload","url":"globals.html#maybepayload","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":1,"kind":4194304,"name":"Action","url":"globals.html#action","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":2,"kind":4194304,"name":"Dictionary","url":"globals.html#dictionary","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":3,"kind":65536,"name":"__type","url":"globals.html#dictionary.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"Dictionary"},{"id":4,"kind":4194304,"name":"Mutation","url":"globals.html#mutation","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":5,"kind":65536,"name":"__type","url":"globals.html#mutation.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"Mutation"},{"id":6,"kind":4194304,"name":"ActionPayloadGenerator","url":"globals.html#actionpayloadgenerator","classes":"tsd-kind-type-alias"},{"id":7,"kind":65536,"name":"__type","url":"globals.html#actionpayloadgenerator.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"ActionPayloadGenerator"},{"id":8,"kind":4194304,"name":"ActionCreator","url":"globals.html#actioncreator","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":9,"kind":4194304,"name":"UpduxDispatch","url":"globals.html#upduxdispatch","classes":"tsd-kind-type-alias"},{"id":10,"kind":4194304,"name":"UpduxConfig","url":"globals.html#upduxconfig","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":11,"kind":65536,"name":"__type","url":"globals.html#upduxconfig.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"UpduxConfig"},{"id":12,"kind":32,"name":"initial","url":"globals.html#upduxconfig.__type.initial","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":13,"kind":32,"name":"subduxes","url":"globals.html#upduxconfig.__type.subduxes","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":14,"kind":32,"name":"actions","url":"globals.html#upduxconfig.__type.actions","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":15,"kind":32,"name":"mutations","url":"globals.html#upduxconfig.__type.mutations","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":16,"kind":32,"name":"groomMutations","url":"globals.html#upduxconfig.__type.groommutations","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":17,"kind":32,"name":"effects","url":"globals.html#upduxconfig.__type.effects","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"UpduxConfig.__type"},{"id":18,"kind":4194304,"name":"Upreducer","url":"globals.html#upreducer","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":19,"kind":65536,"name":"__type","url":"globals.html#upreducer.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"Upreducer"},{"id":20,"kind":64,"name":"actionCreator","url":"globals.html#actioncreator","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":21,"kind":64,"name":"actionFor","url":"globals.html#actionfor","classes":"tsd-kind-function tsd-is-not-exported"},{"id":22,"kind":4194304,"name":"ActionPair","url":"globals.html#actionpair","classes":"tsd-kind-type-alias tsd-is-not-exported"},{"id":23,"kind":64,"name":"buildActions","url":"globals.html#buildactions","classes":"tsd-kind-function"},{"id":24,"kind":64,"name":"buildInitial","url":"globals.html#buildinitial","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":25,"kind":64,"name":"composeMutations","url":"globals.html#composemutations","classes":"tsd-kind-function tsd-is-not-exported"},{"id":26,"kind":4194304,"name":"SubMutations","url":"globals.html#submutations","classes":"tsd-kind-type-alias tsd-is-not-exported"},{"id":27,"kind":65536,"name":"__type","url":"globals.html#submutations.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"SubMutations"},{"id":28,"kind":64,"name":"buildMutations","url":"globals.html#buildmutations","classes":"tsd-kind-function"},{"id":29,"kind":64,"name":"buildCreateStore","url":"globals.html#buildcreatestore","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":30,"kind":64,"name":"MiddlewareFor","url":"globals.html#middlewarefor","classes":"tsd-kind-function tsd-is-not-exported"},{"id":31,"kind":4194304,"name":"Next","url":"globals.html#next","classes":"tsd-kind-type-alias tsd-is-not-exported"},{"id":32,"kind":65536,"name":"__type","url":"globals.html#next.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"Next"},{"id":33,"kind":64,"name":"buildMiddleware","url":"globals.html#buildmiddleware","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":34,"kind":64,"name":"buildUpreducer","url":"globals.html#buildupreducer","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":35,"kind":128,"name":"Updux","url":"classes/updux.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":36,"kind":1024,"name":"subduxes","url":"classes/updux.html#subduxes","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Updux"},{"id":37,"kind":1024,"name":"initial","url":"classes/updux.html#initial","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Updux"},{"id":38,"kind":1024,"name":"groomMutations","url":"classes/updux.html#groommutations","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Updux"},{"id":39,"kind":65536,"name":"__type","url":"classes/updux.html#groommutations.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property","parent":"Updux.groomMutations"},{"id":40,"kind":512,"name":"constructor","url":"classes/updux.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Updux"},{"id":41,"kind":262144,"name":"middleware","url":"classes/updux.html#middleware","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":42,"kind":262144,"name":"actions","url":"classes/updux.html#actions","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":43,"kind":262144,"name":"upreducer","url":"classes/updux.html#upreducer","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":44,"kind":262144,"name":"reducer","url":"classes/updux.html#reducer","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":45,"kind":262144,"name":"mutations","url":"classes/updux.html#mutations","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":46,"kind":262144,"name":"createStore","url":"classes/updux.html#createstore","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":47,"kind":262144,"name":"asDux","url":"classes/updux.html#asdux","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"Updux"},{"id":48,"kind":2048,"name":"addMutation","url":"classes/updux.html#addmutation","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Updux"},{"id":49,"kind":4194304,"name":"StoreWithDispatchActions","url":"globals.html#storewithdispatchactions","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":50,"kind":4194304,"name":"Dux","url":"globals.html#dux","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":51,"kind":64,"name":"noopEffect","url":"globals.html#noopeffect","classes":"tsd-kind-function tsd-is-not-exported"},{"id":52,"kind":4194304,"name":"MyState","url":"globals.html#mystate","classes":"tsd-kind-type-alias tsd-is-not-exported"},{"id":53,"kind":65536,"name":"__type","url":"globals.html#mystate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"MyState"},{"id":54,"kind":32,"name":"sum","url":"globals.html#mystate.__type.sum","classes":"tsd-kind-variable tsd-parent-kind-type-literal tsd-is-not-exported","parent":"MyState.__type"},{"id":55,"kind":64,"name":"tracer","url":"globals.html#tracer","classes":"tsd-kind-function tsd-is-not-exported"},{"id":56,"kind":64,"name":"timeout","url":"globals.html#timeout","classes":"tsd-kind-function tsd-is-not-exported"}]}; \ No newline at end of file diff --git a/docs/classes/updux.html b/docs/classes/updux.html new file mode 100644 index 0000000..96e18a8 --- /dev/null +++ b/docs/classes/updux.html @@ -0,0 +1,729 @@ + + + + + + Updux | updux + + + + + +
    +
    +
    +
    + +
    +
    + Options +
    +
    + All +
      +
    • Public
    • +
    • Public/Protected
    • +
    • All
    • +
    +
    + + + + + + +
    +
    + Menu +
    +
    +
    +
    +
    +
    + +

    Class Updux<S>

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Updux is a way to minimize and simplify the boilerplate associated with the + creation of a Redux store. It takes a shorthand configuration + object, and generates the appropriate reducer, actions, middleware, etc. + In true Redux-like fashion, upduxes can be made of sub-upduxes (subduxes for short) for different slices of the root state.

    +
    +
    +
    +
    +

    Type parameters

    +
      +
    • +

      S

      +
      +
      +

      Store's state type. Defaults to any.

      +
      +
      +
    • +
    +
    +
    +

    Hierarchy

    +
      +
    • + Updux +
    • +
    +
    +
    +

    Index

    +
    +
    +
    +

    Constructors

    + +
    +
    +

    Properties

    + +
    +
    +

    Accessors

    + +
    +
    +

    Methods

    + +
    +
    +
    +
    +
    +

    Constructors

    +
    + +

    constructor

    + +
      +
    • + +

      Parameters

      + +

      Returns Updux

      +
    • +
    +
    +
    +
    +

    Properties

    +
    + +

    groomMutations

    +
    groomMutations: function
    + +
    +
    +

    Function that can be provided to alter all local mutations of the updux + (the mutations of subduxes are left untouched).

    +
    +

    Can be used, for example, for Immer integration:

    +
    import Updux from 'updux';
    +import { produce } from 'Immer';
    +
    +const updux = new Updux({
    +    initial: { counter: 0 },
    +    groomMutations: mutation => (...args) => produce( mutation(...args) ),
    +    mutations: {
    +        add: (inc=1) => draft => draft.counter += inc
    +    }
    +});
    +

    Or perhaps for debugging:

    +
    import Updux from 'updux';
    +
    +const updux = new Updux({
    +    initial: { counter: 0 },
    +    groomMutations: mutation => (...args) => state => {
    +        console.log( "got action ", args[1] );
    +        return mutation(...args)(state);
    +    }
    +});
    +
    +
    +
    +

    Type declaration

    + +
    +
    +
    + +

    initial

    +
    initial: S
    + +
    +
    +

    Default initial state of the reducer. If applicable, merges the + initial states of config and subduxes, with config having + precedence.

    +
    +

    If nothing was provided, defaults to an empty object.

    +
    +
    +
    + +

    subduxes

    +
    subduxes: Dictionary<Updux>
    + +
    +
    +
    +

    Accessors

    +
    + +

    actions

    + +
      +
    • + +
      +
      +

      Action creators for all actions defined or used in the actions, mutations, effects and subduxes + of the updux config.

      +
      +

      Non-custom action creators defined in actions have the signature (payload={},meta={}) => ({type, +payload,meta}) (with the extra sugar that if meta or payload are not + specified, the key is not present in the produced action).

      +

      If the same action appears in multiple locations, the precedence order + determining which one will prevail is

      +
      actions generated from mutations/effects < non-custom subduxes actions <
      +custom subduxes actions < custom actions
      +
      +

      Returns Dictionary<ActionCreator>

      +
    • +
    +
    +
    + +

    asDux

    +
      +
    • get asDux(): Dux<S>
    • +
    +
      +
    • + +
      +
      +

      Returns a + ducks-like + plain object holding the reducer from the Updux object and all + its trimmings.

      +
      +
      +

      Returns Dux<S>

      +
    • +
    +
    +
    + +

    createStore

    +
      +
    • get createStore(): function
    • +
    +
      +
    • + +
      +
      +

      Same as doing

      +
      +
      import { createStore, applyMiddleware } from 'redux';
      +
      +const { initial, reducer, middleware, actions } = updox(...);
      +
      +const store = createStore( initial, reducer, applyMiddleware(middleware) );
      +
      +for ( let type in actions ) {
      +    store.dispatch[type] = (...args) => {
      +        store.dispatch(actions[type](...args))
      +    };
      +}

      So that later on you can do

      +
      store.dispatch.addTodo(...);
      +
      +// still work
      +store.dispatch( actions.addTodo(...) );
      +
      +

      Returns function

      + +
    • +
    +
    +
    + +

    middleware

    + +
      +
    • + +
      +
      +

      A middleware aggregating all the effects defined in the + updux and its subduxes. Effects of the updux itself are + done before the subduxes effects.

      +
      +
      +

      Returns Middleware<__type, S, UpduxDispatch>

      +
    • +
    +
    +
    + +

    mutations

    + +
      +
    • + +
      +
      +

      Merge of the updux and subduxes mutations. If an action triggers + mutations in both the main updux and its subduxes, the subduxes + mutations will be performed first.

      +
      +
      +

      Returns Dictionary<Mutation<S>>

      +
    • +
    +
    +
    + +

    reducer

    +
      +
    • get reducer(): function
    • +
    +
      +
    • + +
      +
      +

      A Redux reducer generated using the computed initial state and + mutations.

      +
      +
      +

      Returns function

      +
        +
      • +
          +
        • (state: S | undefined, action: Action): S
        • +
        +
          +
        • +

          Parameters

          +
            +
          • +
            state: S | undefined
            +
          • +
          • +
            action: Action
            +
          • +
          +

          Returns S

          +
        • +
        +
      • +
      +
    • +
    +
    +
    + +

    upreducer

    + +
      +
    • + +

      Returns Upreducer<S>

      +
    • +
    +
    +
    +
    +

    Methods

    +
    + +

    addMutation

    +
      +
    • addMutation<A>(creator: A, mutation: Mutation<S, A extends (...args: any[]) => infer R ? R : never>): void
    • +
    +
      +
    • + +
      +
      +

      Adds a mutation and its associated action to the updux. + If a local mutation was already associated to the action, + it will be replaced by the new one.

      +
      +
      +
      example
      +
      updux.addMutation( add, inc => state => state + inc );
      +
      +
      +

      Type parameters

      + +

      Parameters

      +
        +
      • +
        creator: A
        +
      • +
      • +
        mutation: Mutation<S, A extends (...args: any[]) => infer R ? R : never>
        +
      • +
      +

      Returns void

      +
    • +
    +
    +
    +
    + +
    +
    +
    +
    +

    Legend

    +
    +
      +
    • Module
    • +
    • Object literal
    • +
    • Variable
    • +
    • Function
    • +
    • Function with type parameter
    • +
    • Index signature
    • +
    • Type alias
    • +
    • Type alias with type parameter
    • +
    +
      +
    • Enumeration
    • +
    • Enumeration member
    • +
    • Property
    • +
    • Method
    • +
    +
      +
    • Interface
    • +
    • Interface with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Index signature
    • +
    +
      +
    • Class
    • +
    • Class with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Accessor
    • +
    • Index signature
    • +
    +
      +
    • Inherited constructor
    • +
    • Inherited property
    • +
    • Inherited method
    • +
    • Inherited accessor
    • +
    +
      +
    • Protected property
    • +
    • Protected method
    • +
    • Protected accessor
    • +
    +
      +
    • Private property
    • +
    • Private method
    • +
    • Private accessor
    • +
    +
      +
    • Static property
    • +
    • Static method
    • +
    +
    +
    +
    +
    +

    Generated using TypeDoc

    +
    +
    + + + + \ No newline at end of file diff --git a/docs/globals.html b/docs/globals.html new file mode 100644 index 0000000..a9de54d --- /dev/null +++ b/docs/globals.html @@ -0,0 +1,1287 @@ + + + + + + updux + + + + + +
    +
    +
    +
    + +
    +
    + Options +
    +
    + All +
      +
    • Public
    • +
    • Public/Protected
    • +
    • All
    • +
    +
    + + + + + + +
    +
    + Menu +
    +
    +
    +
    +
    +
    + +

    updux

    +
    +
    +
    +
    +
    +
    +
    +

    Index

    +
    + +
    +
    +
    +

    Type aliases

    +
    + +

    Action

    +
    Action<T, P>: object & MaybePayload<P>
    + +

    Type parameters

    +
      +
    • +

      T: string

      +
    • +
    • +

      P

      +
    • +
    +
    +
    + +

    ActionCreator

    +
    ActionCreator<T, P>: object & function
    + +

    Type parameters

    +
      +
    • +

      T: string

      +
    • +
    • +

      P

      +
    • +
    +
    +
    + +

    ActionPair

    +
    ActionPair: [string, ActionCreator]
    + +
    +
    + +

    ActionPayloadGenerator

    +
    ActionPayloadGenerator: function
    + +
    +

    Type declaration

    +
      +
    • +
        +
      • (...args: any[]): any
      • +
      +
        +
      • +

        Parameters

        +
          +
        • +
          Rest ...args: any[]
          +
        • +
        +

        Returns any

        +
      • +
      +
    • +
    +
    +
    +
    + +

    Dictionary

    +
    Dictionary<T>: object
    + +

    Type parameters

    +
      +
    • +

      T

      +
    • +
    +
    +

    Type declaration

    +
      +
    • +
      [key: string]: T
      +
    • +
    +
    +
    +
    + +

    Dux

    +
    Dux<S>: Pick<Updux<S>, "subduxes" | "actions" | "initial" | "mutations" | "reducer" | "middleware" | "createStore" | "upreducer">
    + +

    Type parameters

    +
      +
    • +

      S

      +
    • +
    +
    +
    + +

    MaybePayload

    +
    MaybePayload<P>: MaybePayload<P>
    + +

    Type parameters

    +
      +
    • +

      P

      +
    • +
    +
    +
    + +

    Mutation

    +
    Mutation<S, A>: function
    + +

    Type parameters

    + +
    +

    Type declaration

    +
      +
    • +
        +
      • (payload: A["payload"], action: A): function
      • +
      +
        +
      • +

        Parameters

        +
          +
        • +
          payload: A["payload"]
          +
        • +
        • +
          action: A
          +
        • +
        +

        Returns function

        +
          +
        • +
            +
          • (state: S): S
          • +
          +
            +
          • +

            Parameters

            +
              +
            • +
              state: S
              +
            • +
            +

            Returns S

            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    +
    + +

    MyState

    +
    MyState: object
    + +
    +

    Type declaration

    +
      +
    • +
      sum: number
      +
    • +
    +
    +
    +
    + +

    Next

    +
    Next: function
    + +
    +

    Type declaration

    +
      +
    • + +
        +
      • +

        Parameters

        + +

        Returns any

        +
      • +
      +
    • +
    +
    +
    +
    + +

    StoreWithDispatchActions

    +
    StoreWithDispatchActions<S, Actions>: Store<S> & object
    + +

    Type parameters

    +
      +
    • +

      S

      +
    • +
    • +

      Actions

      +
    • +
    +
    +
    + +

    SubMutations

    +
    SubMutations: object
    + +
    +

    Type declaration

    + +
    +
    +
    + +

    UpduxConfig

    +
    UpduxConfig<S>: object
    + +
    +
    +

    Configuration object given to Updux's constructor.

    +
    +
    +

    Type parameters

    +
      +
    • +

      S

      +
      +
      +

      Type of the Updux's state. Defaults to any.

      +
      +
      +
    • +
    +
    +

    Type declaration

    +
      +
    • +
      Optional actions?: undefined | object
      +
      +
      +

      Generic action creations are automatically created from the mutations and effects, but you can + also define custom action creator here. The object's values are function that + transform the arguments of the creator to the action's payload.

      +
      +
      const { actions } = updox({
      +    mutations: {
      +        foo: () => state => state,
      +    }
      +    actions: {
      +        bar: (x,y) => ({x,y})
      +    }
      +});
      +
      +actions.foo({ x: 1, y: 2 }); // => { type: foo, payload: { x:1, y:2  } }
      +actions.bar(1,2);            // => { type: bar, payload: { x:1, y:2  } }
      +
      +
    • +
    • +
      Optional effects?: Dictionary<Middleware<__type, S, UpduxDispatch>>
      +
      +
      +

      Plain object defining asynchronous actions and side-effects triggered by actions. + The effects themselves are Redux middleware, expect with the dispatch + property of the first argument augmented with all the available actions.

      +
      +
      updux({
      +    effects: {
      +        fetch: ({dispatch}) => next => async (action) => {
      +            next(action);
      +
      +            let result = await fetch(action.payload.url).then( result => result.json() );
      +            dispatch.fetchSuccess(result);
      +        }
      +    }
      +});
      +
      +
    • +
    • +
      Optional groomMutations?: undefined | function
      +
    • +
    • +
      Optional initial?: S
      +
      +
      +

      The default initial state of the reducer. Can be anything your + heart desires.

      +
      +
      +
    • +
    • +
      Optional mutations?: any
      +
      +
      +

      Object mapping actions to the associated state mutation.

      +
      +

      For example, in Redux you'd do

      +
      function todosReducer(state=[],action) {
      +
      +    switch(action.type) {
      +        case 'ADD':  return [ ...state, action.payload ];
      +
      +        case 'DONE': return state.map( todo => todo.id === action.payload
      +            ? { ...todo, done: true } : todo )
      +
      +        default: return state;
      +    }
      +}

      With Updux:

      +
      const todosUpdux = updux({
      +    mutations: {
      +        add: todo => state => [ ...state, todo ],
      +        done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) )
      +    }
      +});

      The signature of the mutations is (payload,action) => state => newState. + It is designed to play well with Updeep (and Immer). This way, instead of doing

      +
          mutation: {
      +        renameTodo: newName => state => { ...state, name: newName }
      +    }

      we can do

      +
          mutation: {
      +        renameTodo: newName => u({ name: newName })
      +    }

      Also, the special key * can be used to match any + action not explicitly matched by other mutations.

      +
      const todosUpdux = updux({
      +    mutations: {
      +        add: todo => state => [ ...state, todo ],
      +        done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ),
      +        '*' (payload,action) => state => {
      +            console.warn( "unexpected action ", action.type );
      +            return state;
      +        },
      +    }
      +});
      +
      +
    • +
    • +
      Optional subduxes?: undefined | __type
      +
      +
      +

      Object mapping slices of the state to sub-upduxes.

      +
      +

      For example, if in plain Redux you would do

      +
      import { combineReducers } from 'redux';
      +import todosReducer from './todos';
      +import statisticsReducer from './statistics';
      +
      +const rootReducer = combineReducers({
      +    todos: todosReducer,
      +    stats: statisticsReducer,
      +});

      then with Updux you'd do

      +
      import { updux } from 'updux';
      +import todos from './todos';
      +import statistics from './statistics';
      +
      +const rootUpdux = updux({
      +    subduxes: {
      +        todos, statistics
      +    }
      +});
      +
      +
    • +
    +
    +
    +
    + +

    UpduxDispatch

    +
    UpduxDispatch: Dispatch & Dictionary<Function>
    + +
    +
    + +

    Upreducer

    +
    Upreducer<S>: function
    + +

    Type parameters

    +
      +
    • +

      S

      +
    • +
    +
    +

    Type declaration

    +
      +
    • +
        +
      • (action: Action): function
      • +
      +
        +
      • +

        Parameters

        + +

        Returns function

        +
          +
        • +
            +
          • (state: S): S
          • +
          +
            +
          • +

            Parameters

            +
              +
            • +
              state: S
              +
            • +
            +

            Returns S

            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    +
    +
    +

    Functions

    +
    + +

    Const MiddlewareFor

    +
      +
    • MiddlewareFor(type: any, mw: Middleware): Middleware
    • +
    +
      +
    • + +

      Parameters

      +
        +
      • +
        type: any
        +
      • +
      • +
        mw: Middleware
        +
      • +
      +

      Returns Middleware

      +
    • +
    +
    +
    + +

    actionCreator

    +
      +
    • actionCreator<T, P>(type: T, transform: function): ActionCreator<T, P>
    • +
    • actionCreator<T>(type: T, transform: never): ActionCreator<T, undefined>
    • +
    • actionCreator<T>(type: T, transform: null): ActionCreator<T, null>
    • +
    +
      +
    • + +

      Type parameters

      +
        +
      • +

        T: string

        +
      • +
      • +

        P: any

        +
      • +
      +

      Parameters

      +
        +
      • +
        type: T
        +
      • +
      • +
        transform: function
        +
          +
        • +
            +
          • (...args: any[]): P
          • +
          +
            +
          • +

            Parameters

            +
              +
            • +
              Rest ...args: any[]
              +
            • +
            +

            Returns P

            +
          • +
          +
        • +
        +
      • +
      +

      Returns ActionCreator<T, P>

      +
    • +
    • + +

      Type parameters

      +
        +
      • +

        T: string

        +
      • +
      +

      Parameters

      +
        +
      • +
        type: T
        +
      • +
      • +
        transform: never
        +
      • +
      +

      Returns ActionCreator<T, undefined>

      +
    • +
    • + +

      Type parameters

      +
        +
      • +

        T: string

        +
      • +
      +

      Parameters

      +
        +
      • +
        type: T
        +
      • +
      • +
        transform: null
        +
      • +
      +

      Returns ActionCreator<T, null>

      +
    • +
    +
    +
    + +

    actionFor

    + +
      +
    • + +

      Parameters

      +
        +
      • +
        type: string
        +
      • +
      +

      Returns ActionCreator

      +
    • +
    +
    +
    + +

    buildActions

    + + +
    +
    + +

    buildCreateStore

    +
      +
    • buildCreateStore<S>(reducer: Reducer<S>, initial: S, middleware: Middleware, actions: Dictionary<ActionCreator>): (Anonymous function)
    • +
    +
      +
    • + +

      Type parameters

      +
        +
      • +

        S

        +
      • +
      +

      Parameters

      +
        +
      • +
        reducer: Reducer<S>
        +
      • +
      • +
        initial: S
        +
      • +
      • +
        middleware: Middleware
        +
      • +
      • +
        actions: Dictionary<ActionCreator>
        +
      • +
      +

      Returns (Anonymous function)

      +
    • +
    +
    +
    + +

    buildInitial

    +
      +
    • buildInitial<S>(initial: S, subduxes?: Dictionary<undefined>): S
    • +
    • buildInitial<S>(initial?: Partial<S>, subduxes?: Partial<S>): S extends object ? S : never
    • +
    +
      +
    • + +

      Type parameters

      +
        +
      • +

        S: number | string | boolean

        +
      • +
      +

      Parameters

      +
        +
      • +
        initial: S
        +
      • +
      • +
        Optional subduxes: Dictionary<undefined>
        +
      • +
      +

      Returns S

      +
    • +
    • + +

      Type parameters

      +
        +
      • +

        S: object

        +
      • +
      +

      Parameters

      +
        +
      • +
        Optional initial: Partial<S>
        +
      • +
      • +
        Optional subduxes: Partial<S>
        +
      • +
      +

      Returns S extends object ? S : never

      +
    • +
    +
    +
    + +

    buildMiddleware

    + +
      +
    • + +

      Type parameters

      +
        +
      • +

        S

        +
      • +
      +

      Parameters

      + +

      Returns Middleware<__type, S, UpduxDispatch>

      +
    • +
    +
    +
    + +

    buildMutations

    +
      +
    • buildMutations(mutations?: Dictionary<Mutation>, subduxes?: object): Dictionary<function>
    • +
    +
      +
    • + +

      Parameters

      +
        +
      • +
        Default value mutations: Dictionary<Mutation> = {}
        +
      • +
      • +
        Default value subduxes: object = {}
        +
          +
        +
      • +
      +

      Returns Dictionary<function>

      +
    • +
    +
    +
    + +

    buildUpreducer

    + +
      +
    • + +

      Type parameters

      +
        +
      • +

        S

        +
      • +
      +

      Parameters

      + +

      Returns Upreducer<S>

      +
    • +
    +
    +
    + +

    Const composeMutations

    +
      +
    • composeMutations(mutations: Mutation[]): function
    • +
    +
      +
    • + +

      Parameters

      + +

      Returns function

      +
        +
      • +
          +
        • (payload: A["payload"], action: A): function
        • +
        +
          +
        • +

          Parameters

          +
            +
          • +
            payload: A["payload"]
            +
          • +
          • +
            action: A
            +
          • +
          +

          Returns function

          +
            +
          • +
              +
            • (state: S): S
            • +
            +
              +
            • +

              Parameters

              +
                +
              • +
                state: S
                +
              • +
              +

              Returns S

              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + +

    Const noopEffect

    +
      +
    • noopEffect(): (Anonymous function)
    • +
    +
      +
    • + +

      Returns (Anonymous function)

      +
    • +
    +
    +
    + +

    timeout

    +
      +
    • timeout(ms: number): Promise<unknown>
    • +
    +
      +
    • + +

      Parameters

      +
        +
      • +
        ms: number
        +
      • +
      +

      Returns Promise<unknown>

      +
    • +
    +
    +
    + +

    Const tracer

    +
      +
    • tracer(chr: string): CurriedUpdate1<object>
    • +
    +
      +
    • + +

      Parameters

      +
        +
      • +
        chr: string
        +
      • +
      +

      Returns CurriedUpdate1<object>

      +
    • +
    +
    +
    +
    + +
    +
    +
    +
    +

    Legend

    +
    +
      +
    • Module
    • +
    • Object literal
    • +
    • Variable
    • +
    • Function
    • +
    • Function with type parameter
    • +
    • Index signature
    • +
    • Type alias
    • +
    • Type alias with type parameter
    • +
    +
      +
    • Enumeration
    • +
    • Enumeration member
    • +
    • Property
    • +
    • Method
    • +
    +
      +
    • Interface
    • +
    • Interface with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Index signature
    • +
    +
      +
    • Class
    • +
    • Class with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Accessor
    • +
    • Index signature
    • +
    +
      +
    • Inherited constructor
    • +
    • Inherited property
    • +
    • Inherited method
    • +
    • Inherited accessor
    • +
    +
      +
    • Protected property
    • +
    • Protected method
    • +
    • Protected accessor
    • +
    +
      +
    • Private property
    • +
    • Private method
    • +
    • Private accessor
    • +
    +
      +
    • Static property
    • +
    • Static method
    • +
    +
    +
    +
    +
    +

    Generated using TypeDoc

    +
    +
    + + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..33e256d --- /dev/null +++ b/docs/index.html @@ -0,0 +1,379 @@ + + + + + + updux + + + + + +
    +
    +
    +
    + +
    +
    + Options +
    +
    + All +
      +
    • Public
    • +
    • Public/Protected
    • +
    • All
    • +
    +
    + + + + + + +
    +
    + Menu +
    +
    +
    +
    +
    +
    + +

    updux

    +
    +
    +
    +
    +
    +
    +
    + +

    What's Updux?

    +
    +

    So, I'm a fan of Redux. Two days ago I discovered + rematch alonside a few other frameworks built atop Redux.

    +

    It has a couple of pretty good ideas that removes some of the + boilerplate. Keeping mutations and asynchronous effects close to the + reducer definition? Nice. Automatically infering the + actions from the said mutations and effects? Genius!

    +

    But it also enforces a flat hierarchy of reducers -- where + is the fun in that? And I'm also having a strong love for + Updeep, so I want reducer state updates to leverage the heck out of it.

    +

    All that to say, say hello to Updux. Heavily inspired by rematch, but twisted + to work with updeep and to fit my peculiar needs. It offers features such as

    +
      +
    • Mimic the way VueX has mutations (reducer reactions to specific actions) and + effects (middleware reacting to actions that can be asynchronous and/or + have side-effects), so everything pertaining to a store are all defined + in the space place.
    • +
    • Automatically gather all actions used by the updux's effects and mutations, + and makes then accessible as attributes to the dispatch object of the + store.
    • +
    • Mutations have a signature that is friendly to Updux and Immer.
    • +
    • Also, the mutation signature auto-unwrap the payload of the actions for you.
    • +
    • TypeScript types.
    • +
    +

    Fair warning: this package is still very new, probably very buggy, + definitively very badly documented, and very subject to changes. Caveat + Maxima Emptor.

    + +

    Synopsis

    +
    +
    import updux from 'updux';
    +
    +import otherUpdux from './otherUpdux';
    +
    +const {
    +    initial,
    +    reducer,
    +    actions,
    +    middleware,
    +    createStore,
    +} = new Updux({ 
    +    initial: {
    +        counter: 0,
    +    },
    +    subduxes: {
    +        otherUpdux,
    +    },
    +    mutations: {
    +        inc: ( increment = 1 ) => u({counter: s => s + increment })
    +    },
    +    effects: {
    +        '*' => api => next => action => {
    +            console.log( "hey, look, an action zoomed by!", action );
    +            next(action);
    +        };
    +    },
    +    actions: {
    +        customAction: ( someArg ) => ({ 
    +            type: "custom", 
    +            payload: { someProp: someArg } 
    +        }),
    +    },
    +
    +});
    +
    +const store = createStore();
    +
    +store.dispatch.inc(3);
    + +

    Description

    +
    +

    The formal documentation of the class Updux and its associated functions and + types can be found over here.

    + +

    Exporting upduxes

    +
    +

    If you are creating upduxes that will be used as subduxes + by other upduxes, or as + ducks-like containers, I + recommend that you export the Updux instance as the default export:

    +
    import Updux from 'updux';
    +
    +const updux = new Updux({ ... });
    +
    +export default updux;

    Then you can use them as subduxes like this:

    +
    import Updux from 'updux';
    +import foo from './foo'; // foo is an Updux
    +import bar from './bar'; // bar is an Updux as well
    +
    +const updux = new Updux({
    +    subduxes: {
    +        foo, bar
    +    }
    +});

    Or if you want to use it:

    +
    import updux from './myUpdux';
    +
    +const {
    +    reducer,
    +    actions: { doTheThing },
    +    createStore,
    +    middleware,
    +} = updux;
    + +

    Usage with Immer

    +
    +

    While Updux was created with Updeep in mind, it also plays very + well with Immer.

    +

    For example, taking this basic updux:

    +
    import Updux from 'updux';
    +
    +const updux = new Updux({
    +    initial: { counter: 0 },
    +    mutations: {
    +        add: (inc=1) => state => { counter: counter + inc } 
    +    }
    +});
    +

    Converting it to Immer would look like:

    +
    import Updux from 'updux';
    +import { produce } from 'Immer';
    +
    +const updux = new Updux({
    +    initial: { counter: 0 },
    +    mutations: {
    +        add: (inc=1) => produce( draft => draft.counter += inc ) } 
    +    }
    +});
    +

    But since typing produce over and over is no fun, groomMutations + can be used to wrap all mutations with it:

    +
    import Updux from 'updux';
    +import { produce } from 'Immer';
    +
    +const updux = new Updux({
    +    initial: { counter: 0 },
    +    groomMutations: mutation => (...args) => produce( mutation(...args) ),
    +    mutations: {
    +        add: (inc=1) => draft => draft.counter += inc 
    +    }
    +});
    +
    +
    +
    + +
    +
    +
    +
    +

    Legend

    +
    +
      +
    • Module
    • +
    • Object literal
    • +
    • Variable
    • +
    • Function
    • +
    • Function with type parameter
    • +
    • Index signature
    • +
    • Type alias
    • +
    • Type alias with type parameter
    • +
    +
      +
    • Enumeration
    • +
    • Enumeration member
    • +
    • Property
    • +
    • Method
    • +
    +
      +
    • Interface
    • +
    • Interface with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Index signature
    • +
    +
      +
    • Class
    • +
    • Class with type parameter
    • +
    • Constructor
    • +
    • Property
    • +
    • Method
    • +
    • Accessor
    • +
    • Index signature
    • +
    +
      +
    • Inherited constructor
    • +
    • Inherited property
    • +
    • Inherited method
    • +
    • Inherited accessor
    • +
    +
      +
    • Protected property
    • +
    • Protected method
    • +
    • Protected accessor
    • +
    +
      +
    • Private property
    • +
    • Private method
    • +
    • Private accessor
    • +
    +
      +
    • Static property
    • +
    • Static method
    • +
    +
    +
    +
    +
    +

    Generated using TypeDoc

    +
    +
    + + + + \ No newline at end of file diff --git a/package.json b/package.json index 44c8ecf..f1f073e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "dependencies": { "lodash": "^4.17.15", + "mobx": "^5.14.2", "redux": "^4.0.4" }, "devDependencies": { @@ -13,6 +14,7 @@ "jest": "^24.9.0", "ts-jest": "^24.1.0", "tsd": "^0.10.0", + "typedoc": "^0.15.0", "typescript": "^3.6.4", "updeep": "^1.2.0" }, @@ -21,10 +23,10 @@ "name": "updux", "description": "Updeep-friendly Redux helper framework", "scripts": { - "build": "tsc", + "build": "tsc && typedoc", "test": "jest" }, - "version": "0.2.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git+https://github.com/yanick/updux.git" diff --git a/src/actions.test.ts b/src/actions.test.ts index 4ec6492..cebe253 100644 --- a/src/actions.test.ts +++ b/src/actions.test.ts @@ -1,10 +1,10 @@ -import updux from '.'; +import Updux from '.'; import u from 'updeep'; const noopEffect = () => () => () => {}; test('actions defined in effects and mutations, multi-level', () => { - const {actions} = updux({ + const {actions} = new Updux({ effects: { foo: noopEffect, }, diff --git a/src/addMutations.test.ts b/src/addMutations.test.ts new file mode 100644 index 0000000..7718bc2 --- /dev/null +++ b/src/addMutations.test.ts @@ -0,0 +1,23 @@ +import Updux, { actionCreator } from './updux'; + +type MyState = { + sum: number +} + +test( 'added mutation is present', () => { + const updux = new Updux({ + initial: { sum: 0 }, + }); + + const add = actionCreator('add', (n : number) => ({n}) ) + + // must add 'add' in the actions 9.9 + updux.addMutation( + add, ({n},action) => ({sum}) => ({sum: sum + n}) + ); + updux.mutations; + const store = updux.createStore(); + store.dispatch.add(3); + + expect(store.getState()).toEqual({ sum: 3 }); +}); diff --git a/src/buildActions/index.ts b/src/buildActions/index.ts index 0455716..6da0738 100644 --- a/src/buildActions/index.ts +++ b/src/buildActions/index.ts @@ -1,19 +1,33 @@ import fp from 'lodash/fp'; -import { Action, ActionPayloadGenerator, Dictionary } from '../types'; +import { Action, ActionCreator, ActionPayloadGenerator, Dictionary } from '../types'; -interface ActionCreator { - ( ...args: any[] ): Action; - _genericAction?: boolean +export function actionCreator( type: T, transform: (...args: any[]) => P ): ActionCreator +export function actionCreator( type: T, transform: never ): ActionCreator +export function actionCreator( type: T, transform: null ): ActionCreator +export function actionCreator(type:any, transform:any ) { + + if( transform ) { + return Object.assign( + (...args: any[]) => ({ type, payload: transform(...args) }), + { type } ) + } + + if( transform === null ) { + return Object.assign( () => ({ type }), { type } ) + } + + return Object.assign( (payload: unknown) => ({type, payload}) ); } -function actionFor(type:string) { - const creator : ActionCreator = ( (payload = undefined, meta = undefined) => +function actionFor(type:string): ActionCreator { + const f = ( (payload = undefined, meta = undefined) => fp.pickBy(v => v !== undefined)({type, payload, meta}) as Action ); - creator._genericAction = true; - - return creator; + return Object.assign(f, { + _genericAction: true, + type + }); } type ActionPair = [ string, ActionCreator ]; @@ -30,17 +44,16 @@ function buildActions( ([type,f]) => !f._genericAction )( subActions ); - const actions = [ + const actions : any = [ ...(actionNames.map( type => [ type, actionFor(type) ] )), ...generic, ...crafted, ...Object.entries(generators).map( - ([type, payload]: [ string, Function ]) => [type, (...args: any) => ({ type, payload: payload(...args) })] + ([type, payload]: [ string, Function ]): any => [type, (payload as any).type ? payload : (...args: any) => ({ type, payload: payload(...args) })] ), ]; return fp.fromPairs(actions); - } export default buildActions; diff --git a/src/buildMiddleware/index.ts b/src/buildMiddleware/index.ts index 241a74c..228a8cd 100644 --- a/src/buildMiddleware/index.ts +++ b/src/buildMiddleware/index.ts @@ -18,8 +18,10 @@ function buildMiddleware( ): Middleware<{},S,UpduxDispatch> { return (api: MiddlewareAPI) => { + for (let type in actions) { - api.dispatch[type] = (...args:any[]) => api.dispatch(((actions as any)[type] as any)(...args)); + const ac = actions[type]; + api.dispatch[type] = (...args:any[]) => api.dispatch(ac(...args)); } return (original_next: Next)=> { diff --git a/src/index.ts b/src/index.ts index 07b799b..9b1c97c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,8 @@ -import fp from 'lodash/fp'; -import u from 'updeep'; - import Updux from './updux'; -import { UpduxConfig } from './types'; +export { default as Updux } from './updux'; +export { + UpduxConfig +} from './types'; -export default function updux(config: UpduxConfig) { - return new Updux(config); -} +export default Updux; diff --git a/src/middleware.test.ts b/src/middleware.test.ts index 67b3095..db04bea 100644 --- a/src/middleware.test.ts +++ b/src/middleware.test.ts @@ -1,18 +1,18 @@ -import updux from '.'; +import Updux from '.'; import u from 'updeep'; test( 'simple effect', () => { const tracer = jest.fn(); - const store = updux({ + const store = (new Updux({ effects: { foo: (api:any) => (next:any) => (action:any) => { tracer(); next(action); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); @@ -35,16 +35,17 @@ test( 'effect and sub-effect', () => { next(action); }; - const store = updux({ + const store = (new Updux({ effects: { foo: tracerEffect('root'), }, subduxes: { - zzz: updux({effects: { + zzz: {effects: { foo: tracerEffect('child'), - }}) + } + } }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); @@ -57,22 +58,20 @@ test( 'effect and sub-effect', () => { expect(tracer).toHaveBeenNthCalledWith(1,'root'); expect(tracer).toHaveBeenNthCalledWith(2,'child'); - - }); test( '"*" effect', () => { const tracer = jest.fn(); - const store = updux({ + const store = (new Updux({ effects: { '*': api => next => action => { tracer(); next(action); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); @@ -89,7 +88,7 @@ test( 'async effect', async () => { const tracer = jest.fn(); - const store = updux({ + const store = (new Updux({ effects: { foo: api => next => async action => { next(action); @@ -97,7 +96,7 @@ test( 'async effect', async () => { tracer(); }, }, - }).createStore(); + })).createStore(); expect(tracer).not.toHaveBeenCalled(); diff --git a/src/splat.test.ts b/src/splat.test.ts index abbd335..c2543d2 100644 --- a/src/splat.test.ts +++ b/src/splat.test.ts @@ -1,10 +1,10 @@ -import updux from '.'; +import Updux from '.'; import u from 'updeep'; const tracer = (chr:string) => u({ tracer: (s='') => s + chr }); test( 'mutations, simple', () => { - const dux = updux({ + const dux = new Updux({ mutations: { foo: () => tracer('a'), '*': () => tracer('b'), @@ -25,19 +25,19 @@ test( 'mutations, simple', () => { }); test( 'with subduxes', () => { - const dux = updux({ + const dux = new Updux({ mutations: { foo: () => tracer('a'), '*': () => tracer('b'), bar: () => ({bar}:any) => ({ bar, tracer: bar.tracer }) }, subduxes: { - bar: updux({ + bar: { mutations: { foo: () => tracer('d'), - '*': () => tracer('e'), + '*': () => tracer('e'), }, - }), + }, }, }); diff --git a/src/test.ts b/src/test.ts index 323d2ac..0578dbf 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,9 +1,9 @@ -import updux from '.'; +import Updux from '.'; test('actions from mutations', () => { const { actions: {foo, bar}, - } = updux({ + } = new Updux({ mutations: { foo: () => (x:any) => x, }, @@ -21,7 +21,7 @@ test('actions from mutations', () => { }); test('reducer', () => { - const {actions, reducer} = updux({ + const {actions, reducer} = new Updux({ initial: {counter: 1}, mutations: { inc: () => ({counter}:{counter:number}) => ({counter: counter + 1}), @@ -38,7 +38,7 @@ test('reducer', () => { }); test( 'sub reducers', () => { - const foo = updux({ + const foo = new Updux({ initial: 1, mutations: { doFoo: () => (x:number) => x + 1, @@ -46,7 +46,7 @@ test( 'sub reducers', () => { }, }); - const bar = updux({ + const bar = new Updux({ initial: 'a', mutations: { doBar: () => (x:string) => x + 'a', @@ -54,7 +54,7 @@ test( 'sub reducers', () => { } }); - const { initial, actions, reducer } = updux({ + const { initial, actions, reducer } = new Updux({ subduxes: { foo, bar } @@ -87,7 +87,7 @@ test('precedence between root and sub-reducers', () => { initial, reducer, actions, - } = updux({ + } = new Updux({ initial: { foo: { bar: 4 }, }, @@ -100,7 +100,7 @@ test('precedence between root and sub-reducers', () => { } }, subduxes: { - foo: updux({ + foo: { initial: { bar: 2, quux: 3, @@ -108,7 +108,7 @@ test('precedence between root and sub-reducers', () => { mutations: { inc: () => (state:any) => ({...state, bar: state.bar + 1 }) }, - }), + }, } }); @@ -130,7 +130,7 @@ test( 'middleware', async () => { const { middleware, createStore - } = updux({ + } = new Updux({ initial: "", mutations: { inc: (addition:number) => (state:number) => state + addition, @@ -147,14 +147,14 @@ test( 'middleware', async () => { } }, subduxes: { - foo: updux({ + foo: { effects: { - doEeet: (api) => next => action => { + doEeet: (api:any) => ( next:any ) => ( action: any ) => { api.dispatch({ type: 'inc', payload: 'b'}); next(action); } } - }), + }, } }); @@ -169,3 +169,27 @@ test( 'middleware', async () => { expect(store.getState()).toEqual( 'abZc' ); }); + + +test( "subduxes and mutations", () => { + const foo = new Updux({ mutations: { + quux: () => () => 'x', + blart: () => () => 'a', + }}); + const bar = new Updux({ mutations: { + quux: () => () => 'y' + }}); + const baz = new Updux({ + mutations: { + quux: () => (state:any) => ({...state, "baz": "z" }) + }, subduxes: { foo, bar } }); + + let state = baz.reducer(undefined, baz.actions.quux() ); + + expect(state).toEqual({ + foo: "x", + bar: "y", + baz: "z", + }); + +}); diff --git a/src/types.ts b/src/types.ts index db8308d..bd09f2c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,29 +1,184 @@ -import { Dispatch, Middleware } from 'redux'; +import {Dispatch, Middleware} from 'redux'; -export type Action = { - type: string, - payload?: any, - meta?: any, -} +type MaybePayload

    = P extends object | string | boolean | number + ? { + payload: P; + } + : {payload?: P}; -export type Dictionary = { [key: string]: T }; +export type Action = { + type: T; +} & MaybePayload

    ; -export type Mutation = (payload: any, action: Action) => (state: S) => S ; +export type Dictionary = {[key: string]: T}; -export type ActionPayloadGenerator = (...args:any[]) => any; +export type Mutation = ( + payload: A['payload'], + action: A, +) => (state: S) => S; -export type ActionCreator = (...args: any[] ) => Action; +export type ActionPayloadGenerator = (...args: any[]) => any; -export type UpduxDispatch = Dispatch & Dictionary; +export type ActionCreator = { + type: T; + _genericAction?: boolean; +} & ((...args: any[]) => Action); -export type UpduxConfig = Partial<{ - initial: S, - subduxes: {}, - actions: { - [ type: string ]: ActionPayloadGenerator - }, - mutations: any, - effects: Dictionary>, -}>; +export type UpduxDispatch = Dispatch & Dictionary; -export type Upreducer = (action:Action) => (state:S) => S; + +/** + * Configuration object given to Updux's constructor. + * @typeparam S Type of the Updux's state. Defaults to `any`. + */ +export type UpduxConfig = { + /** + * The default initial state of the reducer. Can be anything your + * heart desires. + */ + initial?: S; + + /** + * Object mapping slices of the state to sub-upduxes. + * + * For example, if in plain Redux you would do + * + * ``` + * import { combineReducers } from 'redux'; + * import todosReducer from './todos'; + * import statisticsReducer from './statistics'; + * + * const rootReducer = combineReducers({ + * todos: todosReducer, + * stats: statisticsReducer, + * }); + * ``` + * + * then with Updux you'd do + * + * ``` + * import { updux } from 'updux'; + * import todos from './todos'; + * import statistics from './statistics'; + * + * const rootUpdux = updux({ + * subduxes: { + * todos, statistics + * } + * }); + */ + subduxes?: {}; + + /** + * Generic action creations are automatically created from the mutations and effects, but you can + * also define custom action creator here. The object's values are function that + * transform the arguments of the creator to the action's payload. + * + * ``` + * const { actions } = updox({ + * mutations: { + * foo: () => state => state, + * } + * actions: { + * bar: (x,y) => ({x,y}) + * } + * }); + * + * actions.foo({ x: 1, y: 2 }); // => { type: foo, payload: { x:1, y:2 } } + * actions.bar(1,2); // => { type: bar, payload: { x:1, y:2 } } + * ``` + */ + + actions?: { + [type: string]: ActionCreator; + }; + + /** + * Object mapping actions to the associated state mutation. + * + * For example, in `Redux` you'd do + * + * ``` + * function todosReducer(state=[],action) { + * + * switch(action.type) { + * case 'ADD': return [ ...state, action.payload ]; + * + * case 'DONE': return state.map( todo => todo.id === action.payload + * ? { ...todo, done: true } : todo ) + * + * default: return state; + * } + * } + * ``` + * + * With Updux: + * + * ``` + * const todosUpdux = updux({ + * mutations: { + * add: todo => state => [ ...state, todo ], + * done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ) + * } + * }); + * ``` + * + * The signature of the mutations is `(payload,action) => state => newState`. + * It is designed to play well with `Updeep` (and [Immer](https://immerjs.github.io/immer/docs/introduction)). This way, instead of doing + * + * ``` + * mutation: { + * renameTodo: newName => state => { ...state, name: newName } + * } + * ``` + * + * we can do + * + * ``` + * mutation: { + * renameTodo: newName => u({ name: newName }) + * } + * ``` + * + * Also, the special key `*` can be used to match any + * action not explicitly matched by other mutations. + * + * ``` + * const todosUpdux = updux({ + * mutations: { + * add: todo => state => [ ...state, todo ], + * done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ), + * '*' (payload,action) => state => { + * console.warn( "unexpected action ", action.type ); + * return state; + * }, + * } + * }); + */ + mutations?: any; + + groomMutations?: (m: Mutation) => Mutation; + + /** + * Plain object defining asynchronous actions and side-effects triggered by actions. + * The effects themselves are Redux middleware, expect with the `dispatch` + * property of the first argument augmented with all the available actions. + * + * ``` + * updux({ + * effects: { + * fetch: ({dispatch}) => next => async (action) => { + * next(action); + * + * let result = await fetch(action.payload.url).then( result => result.json() ); + * dispatch.fetchSuccess(result); + * } + * } + * }); + * ``` + * + */ + effects?: Dictionary>; +}; + +export type Upreducer = (action: Action) => (state: S) => S; diff --git a/src/updux.ts b/src/updux.ts index 5d506fb..a159b50 100644 --- a/src/updux.ts +++ b/src/updux.ts @@ -1,4 +1,7 @@ import fp from 'lodash/fp'; +import u from 'updeep'; +import {observable, computed, toJS} from 'mobx'; + import buildActions from './buildActions'; import buildInitial from './buildInitial'; import buildMutations from './buildMutations'; @@ -6,72 +9,256 @@ import buildMutations from './buildMutations'; import buildCreateStore from './buildCreateStore'; import buildMiddleware from './buildMiddleware'; import buildUpreducer from './buildUpreducer'; -import { UpduxConfig, Dictionary, Action, ActionCreator, Mutation, Upreducer, UpduxDispatch } from './types'; +import { + UpduxConfig, + Dictionary, + Action, + ActionCreator, + Mutation, + Upreducer, + UpduxDispatch, +} from './types'; -import { Middleware, Store } from 'redux'; +import {Middleware, Store} from 'redux'; +export {actionCreator} from './buildActions'; -type StoreWithDispatchActions Action }> = Store & { - dispatch: { [ type in keyof Actions ]: (...args:any) => void } +type StoreWithDispatchActions< + S = any, + Actions = {[action: string]: (...args: any) => Action} +> = Store & { + dispatch: {[type in keyof Actions]: (...args: any) => void}; }; -export class Updux { +export type Dux = Pick< + Updux, + | 'subduxes' + | 'actions' + | 'initial' + | 'mutations' + | 'reducer' + | 'middleware' + | 'createStore' + | 'upreducer' +>; - subduxes: Dictionary; +/** + * `Updux` is a way to minimize and simplify the boilerplate associated with the + * creation of a `Redux` store. It takes a shorthand configuration + * object, and generates the appropriate reducer, actions, middleware, etc. + * In true `Redux`-like fashion, upduxes can be made of sub-upduxes (`subduxes` for short) for different slices of the root state. + * @typeparam S Store's state type. Defaults to `any`. + */ +export class Updux { + subduxes: Dictionary; - actions: Dictionary + /** + * Default initial state of the reducer. If applicable, merges the + * initial states of `config` and `subduxes`, with `config` having + * precedence. + * + * If nothing was provided, defaults to an empty object. + */ + initial: S; - initial: S; +/** + * Function that can be provided to alter all local mutations of the updux + * (the mutations of subduxes are left untouched). + * + * Can be used, for example, for Immer integration: + * + * ``` + * import Updux from 'updux'; + * import { produce } from 'Immer'; + * + * const updux = new Updux({ + * initial: { counter: 0 }, + * groomMutations: mutation => (...args) => produce( mutation(...args) ), + * mutations: { + * add: (inc=1) => draft => draft.counter += inc + * } + * }); + * + * ``` + * + * Or perhaps for debugging: + * + * ``` + * import Updux from 'updux'; + * + * const updux = new Updux({ + * initial: { counter: 0 }, + * groomMutations: mutation => (...args) => state => { + * console.log( "got action ", args[1] ); + * return mutation(...args)(state); + * } + * }); + * + * ``` + */ + groomMutations: (mutation: Mutation) => Mutation; - mutations: Dictionary; + @observable private localEffects: Dictionary< + Middleware<{}, S, UpduxDispatch> + >; - upreducer: Upreducer; + @observable private localActions: Dictionary; - reducer: (state:S|undefined,action:Action) => S; + @observable private localMutations: Dictionary>; - middleware: Middleware<{},S,UpduxDispatch>; + constructor(config: UpduxConfig = {}) { + this.groomMutations = config.groomMutations || ((x: Mutation) => x); - createStore: () => StoreWithDispatchActions; + this.subduxes = fp.mapValues((value: UpduxConfig | Updux) => + fp.isPlainObject(value) ? new Updux(value) : value, + )(fp.getOr({}, 'subduxes', config)) as Dictionary; - constructor(config: UpduxConfig) { + this.localActions = fp.getOr({}, 'actions', config); - this.subduxes = fp.mapValues( - (value:UpduxConfig|Updux) => fp.isPlainObject(value) ? new Updux(value) : value )(fp.getOr({},'subduxes',config) - ) as Dictionary; + this.localEffects = fp.getOr({}, 'effects', config); + this.initial = buildInitial( + config.initial, + fp.mapValues(({initial}) => initial)(this.subduxes), + ); - this.actions = buildActions( - config.actions, - [ ...Object.keys(config.mutations||{}), ...Object.keys(config.effects||{} ) ], - fp.flatten( Object.values( this.subduxes ).map( ({actions}:Updux) => Object.entries(actions) ) ), - ) + this.localMutations = fp.mapValues((m: Mutation) => + this.groomMutations(m), + )(fp.getOr({}, 'mutations', config)); + } - this.initial = buildInitial( - config.initial, fp.mapValues( ({initial}) => initial )(this.subduxes) - ); + /** + * A middleware aggregating all the effects defined in the + * updux and its subduxes. Effects of the updux itself are + * done before the subduxes effects. + */ + @computed get middleware(): Middleware<{}, S, UpduxDispatch> { + return buildMiddleware( + this.localEffects, + this.actions, + Object.values(this.subduxes).map(sd => sd.middleware), + ); + } - this.mutations = buildMutations( - config.mutations, this.subduxes - ); + /** + * Action creators for all actions defined or used in the actions, mutations, effects and subduxes + * of the updux config. + * + * Non-custom action creators defined in `actions` have the signature `(payload={},meta={}) => ({type, + * payload,meta})` (with the extra sugar that if `meta` or `payload` are not + * specified, the key is not present in the produced action). + * + * If the same action appears in multiple locations, the precedence order + * determining which one will prevail is + * + * actions generated from mutations/effects < non-custom subduxes actions < + * custom subduxes actions < custom actions + */ + @computed get actions(): Dictionary { + return buildActions( + this.localActions, + [...Object.keys(this.localMutations), ...Object.keys(this.localEffects)], + fp.flatten( + Object.values(this.subduxes).map(({actions}: Updux) => + Object.entries(actions), + ), + ), + ); + } - this.upreducer = buildUpreducer( - this.initial, this.mutations - ); + @computed get upreducer(): Upreducer { + return buildUpreducer(this.initial, this.mutations); + } - this.reducer = (state,action) => { - return this.upreducer(action)(state as S); - } + /** + * A Redux reducer generated using the computed initial state and + * mutations. + */ + @computed get reducer(): (state: S | undefined, action: Action) => S { + return (state, action) => this.upreducer(action)(state as S); + } - this.middleware = buildMiddleware( - config.effects, - this.actions, - Object.values(this.subduxes).map( sd => sd.middleware ) - ); + /** + * Merge of the updux and subduxes mutations. If an action triggers + * mutations in both the main updux and its subduxes, the subduxes + * mutations will be performed first. + */ + @computed get mutations(): Dictionary> { + return buildMutations(this.localMutations, this.subduxes); + } - const actions = this.actions; - this.createStore = buildCreateStore(this.reducer,this.initial,this.middleware as Middleware,this.actions) as - () => StoreWithDispatchActions< S, typeof actions >; - } + /** + * Same as doing + * + * ``` + * import { createStore, applyMiddleware } from 'redux'; + * + * const { initial, reducer, middleware, actions } = updox(...); + * + * const store = createStore( initial, reducer, applyMiddleware(middleware) ); + * + * for ( let type in actions ) { + * store.dispatch[type] = (...args) => { + * store.dispatch(actions[type](...args)) + * }; + * } + * ``` + * + * So that later on you can do + * + * ``` + * store.dispatch.addTodo(...); + * + * // still work + * store.dispatch( actions.addTodo(...) ); + */ + @computed get createStore(): () => StoreWithDispatchActions { + const actions = this.actions; + return buildCreateStore( + this.reducer, + this.initial, + this.middleware as Middleware, + this.actions, + ) as () => StoreWithDispatchActions; + } + + /** + * Returns a + * [ducks](https://github.com/erikras/ducks-modular-redux)-like + * plain object holding the reducer from the Updux object and all + * its trimmings. + */ + get asDux(): Dux { + return { + createStore: this.createStore, + upreducer: this.upreducer, + subduxes: this.subduxes, + middleware: this.middleware, + actions: this.actions, + reducer: this.reducer, + mutations: this.mutations, + initial: this.initial, + }; + } + + /** + * Adds a mutation and its associated action to the updux. + * If a local mutation was already associated to the action, + * it will be replaced by the new one. + * @example + * ``` + * updux.addMutation( add, inc => state => state + inc ); + * ``` + */ + addMutation( + creator: A, + mutation: Mutation infer R ? R : never>, + ) { + this.localActions[creator.type] = creator; + this.localMutations[creator.type] = this.groomMutations( + mutation as any, + ) as Mutation; + } } export default Updux; diff --git a/tsconfig.json b/tsconfig.json index a26462a..b8a8c14 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -49,7 +49,7 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ @@ -60,7 +60,7 @@ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/typedoc.json b/typedoc.json index 1877f66..3730d0d 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,5 +1,5 @@ { - "theme": "minimal", + "theme": "default", "tsBuildInfoFile": true, "out": "docs", "mode": "file",