@variousjs/various 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@variousjs/various",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "RequireJS(AMD) + React",
5
5
  "files": [
6
6
  "dist",
package/types/index.d.ts CHANGED
@@ -13,7 +13,7 @@ declare module '@variousjs/various' {
13
13
  }) => () => void
14
14
  type $preload = (names: string[]) => Promise<void>
15
15
 
16
- export { default as Nycticorax, Connect, Dispatch } from 'nycticorax'
16
+ export { default as Store, Connect, Dispatch } from 'nycticorax'
17
17
 
18
18
  export class Router extends Component {}
19
19
  export {
@@ -23,6 +23,8 @@ declare module '@variousjs/various' {
23
23
  Redirect,
24
24
  Prompt,
25
25
  NavLink,
26
+ matchPath,
27
+ Switch,
26
28
  } from 'react-router-dom'
27
29
 
28
30
  export interface ComponentProps<S = {}, C = {}> {
@@ -55,20 +57,12 @@ declare module '@variousjs/various' {
55
57
  $router: RouteComponentProps<{ [key: string]: string }>,
56
58
  }
57
59
 
58
- type Nycticorax<S> = {
60
+ type Store<S> = {
59
61
  getStore: () => S,
60
62
  dispatch: (next: Partial<S>) => void,
61
63
  }
62
64
 
63
65
  export type Actions<S = {}> = {
64
- [name: string]: (nycticorax: Nycticorax<S>, ...args: any[]) => unknown,
65
- }
66
-
67
- export interface Config {
68
- dependencies?: { [key: string]: string },
69
- components: { [key: string]: string },
70
- entry?: string,
71
- routerMode?: 'browser' | 'hash',
72
- root?: string,
66
+ [name: string]: (store: Store<S>, ...args: any[]) => unknown,
73
67
  }
74
68
  }