Comparing version 2.2.0-beta.10 to 2.2.0-beta.11
@@ -117,4 +117,4 @@ import { Store, Action, Reducer } from 'redux'; | ||
windowValues?: WindowValuesDefinitions<LogicType> | ((logic: LogicType) => WindowValuesDefinitions<LogicType>); | ||
urlToAction?: any; | ||
actionToUrl?: any; | ||
urlToAction?: (logic: LogicType) => any; | ||
actionToUrl?: (logic: LogicType) => any; | ||
[key: string]: unknown; | ||
@@ -281,3 +281,3 @@ }; | ||
type: string; | ||
payload: object; | ||
payload: any; | ||
} | ||
@@ -289,3 +289,3 @@ interface KeaAction { | ||
} | ||
declare function createAction(type: string, payloadCreator: (...args: any[]) => object): KeaAction; | ||
declare function createAction(type: string, payloadCreator: (...args: any[]) => any): KeaAction; | ||
@@ -296,2 +296,2 @@ declare function addConnection(logic: any, otherLogic: any): void; | ||
export { ATTACH_REDUCER, AnyComponent, BuiltLogic, BuiltLogicAdditions, Context, ContextOptions, DETACH_REDUCER, EmptyProps, KeaComponent, KeaPlugin, Logic, LogicInput, LogicWrapper, LogicWrapperAdditions, MakeLogicType, PathCreator, PathType, PluginEventArrays, PluginEvents, Props, RequiredPathCreator, Selector, activatePlugin, addConnection, closeContext, connect, createAction, getContext, getPluginContext, getStore, isBreakpoint, kea, keaReducer, openContext, resetContext, setPluginContext, useActions, useAllValues, useKea, useMountedLogic, useValues }; | ||
export { ATTACH_REDUCER, AnyComponent, BreakPointFunction, BuiltLogic, BuiltLogicAdditions, Context, ContextOptions, DETACH_REDUCER, EmptyProps, KeaComponent, KeaPlugin, Logic, LogicInput, LogicWrapper, LogicWrapperAdditions, MakeLogicType, PathCreator, PathType, PluginEventArrays, PluginEvents, Props, RequiredPathCreator, Selector, activatePlugin, addConnection, closeContext, connect, createAction, getContext, getPluginContext, getStore, isBreakpoint, kea, keaReducer, openContext, resetContext, setPluginContext, useActions, useAllValues, useKea, useMountedLogic, useValues }; |
interface KeaReduxAction { | ||
type: string; | ||
payload: object; | ||
payload: any; | ||
} | ||
@@ -10,3 +10,3 @@ interface KeaAction { | ||
} | ||
export declare function createAction(type: string, payloadCreator: (...args: any[]) => object): KeaAction; | ||
export declare function createAction(type: string, payloadCreator: (...args: any[]) => any): KeaAction; | ||
export {}; |
export * from './types'; | ||
export { kea, connect } from './kea'; | ||
export { kea, connect } from './kea/index'; | ||
export { useValues, useAllValues, useActions, useMountedLogic, useKea } from './react/hooks'; | ||
export { resetContext, openContext, closeContext, getContext, getPluginContext, setPluginContext } from './context'; | ||
export { resetContext, openContext, closeContext, getContext, getPluginContext, setPluginContext } from './context/index'; | ||
export { getStore } from './store/store'; | ||
export { keaReducer, ATTACH_REDUCER, DETACH_REDUCER } from './store/reducer'; | ||
export { activatePlugin } from './plugins'; | ||
export { activatePlugin } from './plugins/index'; | ||
export { createAction } from './core/shared/actions'; | ||
export { addConnection } from './core/shared/connect'; | ||
export { isBreakpoint } from './listeners/index'; |
@@ -76,3 +76,3 @@ import { Reducer, Store, Action as ReduxAction } from 'redux'; | ||
}; | ||
declare type BreakPointFunction = (() => void) & ((ms: number) => Promise<void>); | ||
export declare type BreakPointFunction = (() => void) & ((ms: number) => Promise<void>); | ||
declare type ListenerDefinitionsForRecord<A extends Record<string, (...args: any) => any>> = { | ||
@@ -117,4 +117,4 @@ [K in keyof A]?: (payload: ReturnType<A[K]>['payload'], breakpoint: BreakPointFunction, action: ReturnType<A[K]>, previousState: any) => void | Promise<void>; | ||
windowValues?: WindowValuesDefinitions<LogicType> | ((logic: LogicType) => WindowValuesDefinitions<LogicType>); | ||
urlToAction?: any; | ||
actionToUrl?: any; | ||
urlToAction?: (logic: LogicType) => any; | ||
actionToUrl?: (logic: LogicType) => any; | ||
[key: string]: unknown; | ||
@@ -121,0 +121,0 @@ }; |
{ | ||
"name": "kea", | ||
"version": "2.2.0-beta.10", | ||
"version": "2.2.0-beta.11", | ||
"description": "Smart front-end architecture", | ||
@@ -99,3 +99,2 @@ "author": "Marius Andra", | ||
"@types/react-redux": "^7.1.9", | ||
"@types/redux": "^3.6.0", | ||
"@typescript-eslint/eslint-plugin": "^3.6.1", | ||
@@ -102,0 +101,0 @@ "@typescript-eslint/parser": "^3.6.1", |
@@ -1,4 +0,4 @@ | ||
import corePlugin from '../core' | ||
import corePlugin from '../core/index' | ||
import listenersPlugin from '../listeners/index' | ||
import { activatePlugin, runPlugins } from '../plugins' | ||
import { activatePlugin, runPlugins } from '../plugins/index' | ||
import { getStore } from '../store/store' | ||
@@ -5,0 +5,0 @@ import { Context, ContextOptions } from '../types' |
interface KeaReduxAction { | ||
type: string | ||
payload: object | ||
payload: any | ||
} | ||
@@ -14,3 +14,3 @@ | ||
export function createAction(type: string, payloadCreator: (...args: any[]) => object): KeaAction { | ||
export function createAction(type: string, payloadCreator: (...args: any[]) => any): KeaAction { | ||
const action = <KeaAction>(...payloadArgs: any[]) => | ||
@@ -17,0 +17,0 @@ ({ |
export * from './types' | ||
import { resetContext } from './context' | ||
import { resetContext } from './context/index' | ||
export { kea, connect } from './kea' | ||
export { kea, connect } from './kea/index' | ||
export { useValues, useAllValues, useActions, useMountedLogic, useKea } from './react/hooks' | ||
export { resetContext, openContext, closeContext, getContext, getPluginContext, setPluginContext } from './context' | ||
export { resetContext, openContext, closeContext, getContext, getPluginContext, setPluginContext } from './context/index' | ||
export { getStore } from './store/store' | ||
export { keaReducer, ATTACH_REDUCER, DETACH_REDUCER } from './store/reducer' | ||
export { activatePlugin } from './plugins' | ||
export { activatePlugin } from './plugins/index' | ||
@@ -13,0 +13,0 @@ export { createAction } from './core/shared/actions' |
@@ -1,7 +0,7 @@ | ||
import { runPlugins } from '../plugins' | ||
import { getContext } from '../context' | ||
import { runPlugins } from '../plugins/index' | ||
import { getContext } from '../context/index' | ||
import { mountLogic, unmountLogic } from './mount' | ||
import { getPathForInput } from './path' | ||
import { addConnection } from '..' | ||
import { addConnection } from '../index' | ||
@@ -8,0 +8,0 @@ import { Logic, LogicWrapper, Props, LogicInput, BuiltLogicAdditions, BuiltLogic, PathType } from '../types' |
@@ -1,2 +0,2 @@ | ||
import { getContext } from '../context' | ||
import { getContext } from '../context/index' | ||
@@ -3,0 +3,0 @@ import { getBuiltLogic } from './build' |
import { attachReducer, detachReducer } from '../store/reducer' | ||
import { runPlugins } from '../plugins' | ||
import { runPlugins } from '../plugins/index' | ||
import { getContext } from '../context' | ||
import { getContext } from '../context/index' | ||
import { Logic } from '../types' | ||
@@ -6,0 +6,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getContext } from '../context' | ||
import { getContext } from '../context/index' | ||
import { LogicInput, PathCreator, Props } from '../types' | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getContext } from '../context' | ||
import { getContext } from '../context/index' | ||
import { KeaPlugin, PluginEvents } from '../types' | ||
@@ -3,0 +3,0 @@ /* |
@@ -6,3 +6,3 @@ import * as React from 'react' | ||
import { getPathStringForInput } from '../kea/path' | ||
import { runPlugins } from '../plugins' | ||
import { runPlugins } from '../plugins/index' | ||
import { AnyComponent, KeaComponent, LogicWrapper, Props } from '../types' | ||
@@ -9,0 +9,0 @@ |
@@ -120,3 +120,3 @@ import { Reducer, Store, Action as ReduxAction } from 'redux' | ||
type BreakPointFunction = (() => void) & ((ms: number) => Promise<void>) | ||
export type BreakPointFunction = (() => void) & ((ms: number) => Promise<void>) | ||
@@ -167,3 +167,2 @@ type ListenerDefinitionsForRecord<A extends Record<string, (...args: any) => any>> = { | ||
| PathType | ||
connect?: any | ||
@@ -196,4 +195,4 @@ constants?: () => string[] | string[] | ||
windowValues?: WindowValuesDefinitions<LogicType> | ((logic: LogicType) => WindowValuesDefinitions<LogicType>) | ||
urlToAction?: any | ||
actionToUrl?: any | ||
urlToAction?: (logic: LogicType) => any | ||
actionToUrl?: (logic: LogicType) => any | ||
@@ -200,0 +199,0 @@ [key: string]: unknown |
479374
63