@variousjs/various 5.1.1 → 5.1.3
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/dist/index.dev.js +23 -13
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/standalone.js +3944 -1
- package/dist/standalone.js.map +1 -1
- package/package.json +3 -2
- package/standalone.d.ts +43 -0
- package/dist/standalone-dev.js +0 -1805
- package/dist/standalone-dev.js.map +0 -1
package/package.json
CHANGED
package/standalone.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare module '@variousjs/various/standalone' {
|
|
2
|
+
import { ComponentType, RefObject } from 'react'
|
|
3
|
+
import {
|
|
4
|
+
VariousComponentType,
|
|
5
|
+
ObjectRecord,
|
|
6
|
+
ModuleDefined,
|
|
7
|
+
FallbackNode,
|
|
8
|
+
ErrorFallbackNode,
|
|
9
|
+
} from '@variousjs/various'
|
|
10
|
+
|
|
11
|
+
export type DependencyType = string | object | Function
|
|
12
|
+
|
|
13
|
+
export function createComponent<P extends object = ObjectRecord>(
|
|
14
|
+
config: ModuleDefined & {
|
|
15
|
+
url: string,
|
|
16
|
+
type?: VariousComponentType,
|
|
17
|
+
dependencies?: Partial<Record<
|
|
18
|
+
string,
|
|
19
|
+
DependencyType
|
|
20
|
+
>>,
|
|
21
|
+
storeKeys?: string[],
|
|
22
|
+
},
|
|
23
|
+
): ComponentType<P & {
|
|
24
|
+
/**
|
|
25
|
+
* for React Component only
|
|
26
|
+
*/
|
|
27
|
+
$ref?: RefObject<unknown>,
|
|
28
|
+
}> & {
|
|
29
|
+
dispatch: (next: Record<string, any>) => void,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function createConfig(
|
|
33
|
+
config: {
|
|
34
|
+
baseDependencies: Partial<Record<
|
|
35
|
+
string,
|
|
36
|
+
DependencyType
|
|
37
|
+
>>,
|
|
38
|
+
store?: Record<string, any>,
|
|
39
|
+
fallback?: FallbackNode<any>,
|
|
40
|
+
errorFallback?: ErrorFallbackNode<any>,
|
|
41
|
+
},
|
|
42
|
+
): void
|
|
43
|
+
}
|