@variousjs/various 1.0.1 → 1.1.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/index.d.ts CHANGED
@@ -13,6 +13,7 @@ declare module '@variousjs/various' {
13
13
  type $preload = (names: string[]) => Promise<void>
14
14
  type $postMessage = (name: string, value?: any) => void
15
15
  type $getMountedComponents = () => string[]
16
+ type $t = (key: string, defaultText?: string) => string | undefined
16
17
 
17
18
  export { default as Store, Connect, Dispatch } from 'nycticorax'
18
19
 
@@ -24,12 +25,13 @@ declare module '@variousjs/various' {
24
25
  $preload: $preload,
25
26
  $postMessage: $postMessage,
26
27
  $getMountedComponents: $getMountedComponents,
28
+ $t: $t,
27
29
  }
28
30
 
29
31
  export interface ErrorProps {
30
- reload?: () => void,
31
- type: 'LOADING_ERROR' | 'DEPENDENCIES_LOADING_ERROR' | 'NOT_DEFINED' | 'INVALID_COMPONENT' | 'SCRIPT_ERROR' | 'CONTAINER_ERROR',
32
- message?: string,
32
+ $reload?: () => void,
33
+ $type: 'LOADING_ERROR' | 'DEPENDENCIES_LOADING_ERROR' | 'NOT_DEFINED' | 'INVALID_COMPONENT' | 'SCRIPT_ERROR' | 'CONTAINER_ERROR',
34
+ $message?: string,
33
35
  }
34
36
 
35
37
  export interface ContainerProps<C = {}> {
@@ -52,4 +54,9 @@ declare module '@variousjs/various' {
52
54
  ) => any
53
55
 
54
56
  export type Invoker = (params: { trigger: string, value?: any }) => any
57
+
58
+ export type Ii8n = () => {
59
+ localeKey: string,
60
+ resources: Record<string, Record<string, string>>,
61
+ }
55
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@variousjs/various",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "RequireJS(AMD) + React",
5
5
  "files": [
6
6
  "dist",