@modular-component/core 0.1.6 → 0.2.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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +31 -354
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -145
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +155 -223
- package/dist/types/arguments.d.ts +0 -33
- package/dist/types/arguments.d.ts.map +0 -1
- package/dist/types/arguments.js +0 -6
- package/dist/types/arguments.js.map +0 -1
- package/dist/types/methods/add.d.ts +0 -23
- package/dist/types/methods/add.d.ts.map +0 -1
- package/dist/types/methods/add.js +0 -8
- package/dist/types/methods/add.js.map +0 -1
- package/dist/types/methods/at.d.ts +0 -22
- package/dist/types/methods/at.d.ts.map +0 -1
- package/dist/types/methods/at.js +0 -7
- package/dist/types/methods/at.js.map +0 -1
- package/dist/types/methods/hook.d.ts +0 -14
- package/dist/types/methods/hook.d.ts.map +0 -1
- package/dist/types/methods/hook.js +0 -7
- package/dist/types/methods/hook.js.map +0 -1
- package/dist/types/methods/mock.d.ts +0 -26
- package/dist/types/methods/mock.d.ts.map +0 -1
- package/dist/types/methods/mock.js +0 -6
- package/dist/types/methods/mock.js.map +0 -1
- package/dist/types/methods/with.d.ts +0 -52
- package/dist/types/methods/with.d.ts.map +0 -1
- package/dist/types/methods/with.js +0 -8
- package/dist/types/methods/with.js.map +0 -1
- package/dist/types/methods.d.ts +0 -10
- package/dist/types/methods.d.ts.map +0 -1
- package/dist/types/methods.js +0 -5
- package/dist/types/methods.js.map +0 -1
- package/dist/types/modular-component.d.ts +0 -15
- package/dist/types/modular-component.d.ts.map +0 -1
- package/dist/types/modular-component.js +0 -5
- package/dist/types/modular-component.js.map +0 -1
- package/dist/types/stage.d.ts +0 -41
- package/dist/types/stage.d.ts.map +0 -1
- package/dist/types/stage.js +0 -5
- package/dist/types/stage.js.map +0 -1
- package/dist/types/utils.d.ts +0 -24
- package/dist/types/utils.d.ts.map +0 -1
- package/dist/types/utils.js +0 -5
- package/dist/types/utils.js.map +0 -1
- package/dist/types/validation.d.ts +0 -4
- package/dist/types/validation.d.ts.map +0 -1
- package/dist/types/validation.js +0 -2
- package/dist/types/validation.js.map +0 -1
- package/src/types/arguments.ts +0 -57
- package/src/types/methods/add.ts +0 -52
- package/src/types/methods/at.ts +0 -64
- package/src/types/methods/hook.ts +0 -27
- package/src/types/methods/mock.ts +0 -90
- package/src/types/methods/with.ts +0 -173
- package/src/types/methods.ts +0 -11
- package/src/types/modular-component.ts +0 -25
- package/src/types/stage.ts +0 -91
- package/src/types/utils.ts +0 -63
- package/src/types/validation.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @modular-component/core
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 83d453f: Rework API for better TypeScript performance and improved DX
|
|
8
|
+
|
|
9
|
+
## 0.1.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 31f2966: Add before{Stage} stage methods
|
|
14
|
+
|
|
3
15
|
## 0.1.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,357 +1,34 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type { ModularStages } from './types/stage';
|
|
6
|
-
declare const withRender: unique symbol;
|
|
7
|
-
declare module './types/stage' {
|
|
8
|
-
interface ModularStages<Args, Value> {
|
|
9
|
-
[withRender]: {
|
|
10
|
-
restrict: FunctionComponent<Args>;
|
|
11
|
-
transform: ReturnType<Value extends FunctionComponent<Args> ? Value : never>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
1
|
+
import React, { ForwardRefRenderFunction, FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
export interface ModularStage<Field extends string, Stage extends (args: any, ref?: any) => any> {
|
|
3
|
+
field: Field;
|
|
4
|
+
useStage: Stage;
|
|
14
5
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
memo: boolean;
|
|
38
|
-
} | undefined): ModularComponent<Props_2, Ref_2, {
|
|
39
|
-
readonly Render: {
|
|
40
|
-
readonly symbol: typeof withRender;
|
|
41
|
-
readonly field: "render";
|
|
42
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
43
|
-
};
|
|
44
|
-
} & _Methods extends infer T ? T extends {
|
|
45
|
-
readonly Render: {
|
|
46
|
-
readonly symbol: typeof withRender;
|
|
47
|
-
readonly field: "render";
|
|
48
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
49
|
-
};
|
|
50
|
-
} & _Methods ? T extends infer U ? { [key in keyof U]: U[key]; } : never : never : never, Stages_1>;
|
|
51
|
-
memo<Props_3 extends {} = {}, Ref_3 = FunctionComponent<Props_3>>(displayName?: string): ModularComponent<Props_3, Ref_3, {
|
|
52
|
-
readonly Render: {
|
|
53
|
-
readonly symbol: typeof withRender;
|
|
54
|
-
readonly field: "render";
|
|
55
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
56
|
-
};
|
|
57
|
-
} & _Methods extends infer T ? T extends {
|
|
58
|
-
readonly Render: {
|
|
59
|
-
readonly symbol: typeof withRender;
|
|
60
|
-
readonly field: "render";
|
|
61
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
62
|
-
};
|
|
63
|
-
} & _Methods ? T extends infer U ? { [key in keyof U]: U[key]; } : never : never : never, Stages_1>;
|
|
64
|
-
};
|
|
65
|
-
extend: <_Methods_1 extends Record<string, MethodRecord>>(_methods: _Methods_1) => {
|
|
66
|
-
build: <Stages_2 extends StageTuple = []>(stages?: StageTuple) => {
|
|
67
|
-
<Props_4 extends {} = {}, Ref_4 = FunctionComponent<Props_4>>(displayName?: string, options?: {
|
|
68
|
-
memo: boolean;
|
|
69
|
-
} | undefined): ModularComponent<Props_4, Ref_4, {
|
|
70
|
-
readonly Render: {
|
|
71
|
-
readonly symbol: typeof withRender;
|
|
72
|
-
readonly field: "render";
|
|
73
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
74
|
-
};
|
|
75
|
-
} & _Methods & _Methods_1 extends infer T_1 ? T_1 extends {
|
|
76
|
-
readonly Render: {
|
|
77
|
-
readonly symbol: typeof withRender;
|
|
78
|
-
readonly field: "render";
|
|
79
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
80
|
-
};
|
|
81
|
-
} & _Methods & _Methods_1 ? T_1 extends infer U ? { [key_1 in keyof U]: U[key_1]; } : never : never : never, Stages_2>;
|
|
82
|
-
memo<Props_5 extends {} = {}, Ref_5 = FunctionComponent<Props_5>>(displayName?: string): ModularComponent<Props_5, Ref_5, {
|
|
83
|
-
readonly Render: {
|
|
84
|
-
readonly symbol: typeof withRender;
|
|
85
|
-
readonly field: "render";
|
|
86
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
87
|
-
};
|
|
88
|
-
} & _Methods & _Methods_1 extends infer T_1 ? T_1 extends {
|
|
89
|
-
readonly Render: {
|
|
90
|
-
readonly symbol: typeof withRender;
|
|
91
|
-
readonly field: "render";
|
|
92
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
93
|
-
};
|
|
94
|
-
} & _Methods & _Methods_1 ? T_1 extends infer U ? { [key_1 in keyof U]: U[key_1]; } : never : never : never, Stages_2>;
|
|
95
|
-
};
|
|
96
|
-
extend: <_Methods_2 extends Record<string, MethodRecord>>(_methods: _Methods_2) => {
|
|
97
|
-
build: <Stages_3 extends StageTuple = []>(stages?: StageTuple) => {
|
|
98
|
-
<Props_6 extends {} = {}, Ref_6 = FunctionComponent<Props_6>>(displayName?: string, options?: {
|
|
99
|
-
memo: boolean;
|
|
100
|
-
} | undefined): ModularComponent<Props_6, Ref_6, {
|
|
101
|
-
readonly Render: {
|
|
102
|
-
readonly symbol: typeof withRender;
|
|
103
|
-
readonly field: "render";
|
|
104
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
105
|
-
};
|
|
106
|
-
} & _Methods & _Methods_1 & _Methods_2 extends infer T_2 ? T_2 extends {
|
|
107
|
-
readonly Render: {
|
|
108
|
-
readonly symbol: typeof withRender;
|
|
109
|
-
readonly field: "render";
|
|
110
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
111
|
-
};
|
|
112
|
-
} & _Methods & _Methods_1 & _Methods_2 ? T_2 extends infer U ? { [key_2 in keyof U]: U[key_2]; } : never : never : never, Stages_3>;
|
|
113
|
-
memo<Props_7 extends {} = {}, Ref_7 = FunctionComponent<Props_7>>(displayName?: string): ModularComponent<Props_7, Ref_7, {
|
|
114
|
-
readonly Render: {
|
|
115
|
-
readonly symbol: typeof withRender;
|
|
116
|
-
readonly field: "render";
|
|
117
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
118
|
-
};
|
|
119
|
-
} & _Methods & _Methods_1 & _Methods_2 extends infer T_2 ? T_2 extends {
|
|
120
|
-
readonly Render: {
|
|
121
|
-
readonly symbol: typeof withRender;
|
|
122
|
-
readonly field: "render";
|
|
123
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
124
|
-
};
|
|
125
|
-
} & _Methods & _Methods_1 & _Methods_2 ? T_2 extends infer U ? { [key_2 in keyof U]: U[key_2]; } : never : never : never, Stages_3>;
|
|
126
|
-
};
|
|
127
|
-
extend: <_Methods_3 extends Record<string, MethodRecord>>(_methods: _Methods_3) => {
|
|
128
|
-
build: <Stages_4 extends StageTuple = []>(stages?: StageTuple) => {
|
|
129
|
-
<Props_8 extends {} = {}, Ref_8 = FunctionComponent<Props_8>>(displayName?: string, options?: {
|
|
130
|
-
memo: boolean;
|
|
131
|
-
} | undefined): ModularComponent<Props_8, Ref_8, {
|
|
132
|
-
readonly Render: {
|
|
133
|
-
readonly symbol: typeof withRender;
|
|
134
|
-
readonly field: "render";
|
|
135
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
136
|
-
};
|
|
137
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 extends infer T_3 ? T_3 extends {
|
|
138
|
-
readonly Render: {
|
|
139
|
-
readonly symbol: typeof withRender;
|
|
140
|
-
readonly field: "render";
|
|
141
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
142
|
-
};
|
|
143
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 ? T_3 extends infer U ? { [key_3 in keyof U]: U[key_3]; } : never : never : never, Stages_4>;
|
|
144
|
-
memo<Props_9 extends {} = {}, Ref_9 = FunctionComponent<Props_9>>(displayName?: string): ModularComponent<Props_9, Ref_9, {
|
|
145
|
-
readonly Render: {
|
|
146
|
-
readonly symbol: typeof withRender;
|
|
147
|
-
readonly field: "render";
|
|
148
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
149
|
-
};
|
|
150
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 extends infer T_3 ? T_3 extends {
|
|
151
|
-
readonly Render: {
|
|
152
|
-
readonly symbol: typeof withRender;
|
|
153
|
-
readonly field: "render";
|
|
154
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
155
|
-
};
|
|
156
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 ? T_3 extends infer U ? { [key_3 in keyof U]: U[key_3]; } : never : never : never, Stages_4>;
|
|
157
|
-
};
|
|
158
|
-
extend: <_Methods_4 extends Record<string, MethodRecord>>(_methods: _Methods_4) => {
|
|
159
|
-
build: <Stages_5 extends StageTuple = []>(stages?: StageTuple) => {
|
|
160
|
-
<Props_10 extends {} = {}, Ref_10 = FunctionComponent<Props_10>>(displayName?: string, options?: {
|
|
161
|
-
memo: boolean;
|
|
162
|
-
} | undefined): ModularComponent<Props_10, Ref_10, {
|
|
163
|
-
readonly Render: {
|
|
164
|
-
readonly symbol: typeof withRender;
|
|
165
|
-
readonly field: "render";
|
|
166
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
167
|
-
};
|
|
168
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 extends infer T_4 ? T_4 extends {
|
|
169
|
-
readonly Render: {
|
|
170
|
-
readonly symbol: typeof withRender;
|
|
171
|
-
readonly field: "render";
|
|
172
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
173
|
-
};
|
|
174
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 ? T_4 extends infer U ? { [key_4 in keyof U]: U[key_4]; } : never : never : never, Stages_5>;
|
|
175
|
-
memo<Props_11 extends {} = {}, Ref_11 = FunctionComponent<Props_11>>(displayName?: string): ModularComponent<Props_11, Ref_11, {
|
|
176
|
-
readonly Render: {
|
|
177
|
-
readonly symbol: typeof withRender;
|
|
178
|
-
readonly field: "render";
|
|
179
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
180
|
-
};
|
|
181
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 extends infer T_4 ? T_4 extends {
|
|
182
|
-
readonly Render: {
|
|
183
|
-
readonly symbol: typeof withRender;
|
|
184
|
-
readonly field: "render";
|
|
185
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
186
|
-
};
|
|
187
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 ? T_4 extends infer U ? { [key_4 in keyof U]: U[key_4]; } : never : never : never, Stages_5>;
|
|
188
|
-
};
|
|
189
|
-
extend: <_Methods_5 extends Record<string, MethodRecord>>(_methods: _Methods_5) => {
|
|
190
|
-
build: <Stages_6 extends StageTuple = []>(stages?: StageTuple) => {
|
|
191
|
-
<Props_12 extends {} = {}, Ref_12 = FunctionComponent<Props_12>>(displayName?: string, options?: {
|
|
192
|
-
memo: boolean;
|
|
193
|
-
} | undefined): ModularComponent<Props_12, Ref_12, {
|
|
194
|
-
readonly Render: {
|
|
195
|
-
readonly symbol: typeof withRender;
|
|
196
|
-
readonly field: "render";
|
|
197
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
198
|
-
};
|
|
199
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 extends infer T_5 ? T_5 extends {
|
|
200
|
-
readonly Render: {
|
|
201
|
-
readonly symbol: typeof withRender;
|
|
202
|
-
readonly field: "render";
|
|
203
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
204
|
-
};
|
|
205
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 ? T_5 extends infer U ? { [key_5 in keyof U]: U[key_5]; } : never : never : never, Stages_6>;
|
|
206
|
-
memo<Props_13 extends {} = {}, Ref_13 = FunctionComponent<Props_13>>(displayName?: string): ModularComponent<Props_13, Ref_13, {
|
|
207
|
-
readonly Render: {
|
|
208
|
-
readonly symbol: typeof withRender;
|
|
209
|
-
readonly field: "render";
|
|
210
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
211
|
-
};
|
|
212
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 extends infer T_5 ? T_5 extends {
|
|
213
|
-
readonly Render: {
|
|
214
|
-
readonly symbol: typeof withRender;
|
|
215
|
-
readonly field: "render";
|
|
216
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
217
|
-
};
|
|
218
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 ? T_5 extends infer U ? { [key_5 in keyof U]: U[key_5]; } : never : never : never, Stages_6>;
|
|
219
|
-
};
|
|
220
|
-
extend: <_Methods_6 extends Record<string, MethodRecord>>(_methods: _Methods_6) => {
|
|
221
|
-
build: <Stages_7 extends StageTuple = []>(stages?: StageTuple) => {
|
|
222
|
-
<Props_14 extends {} = {}, Ref_14 = FunctionComponent<Props_14>>(displayName?: string, options?: {
|
|
223
|
-
memo: boolean;
|
|
224
|
-
} | undefined): ModularComponent<Props_14, Ref_14, {
|
|
225
|
-
readonly Render: {
|
|
226
|
-
readonly symbol: typeof withRender;
|
|
227
|
-
readonly field: "render";
|
|
228
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
229
|
-
};
|
|
230
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 extends infer T_6 ? T_6 extends {
|
|
231
|
-
readonly Render: {
|
|
232
|
-
readonly symbol: typeof withRender;
|
|
233
|
-
readonly field: "render";
|
|
234
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
235
|
-
};
|
|
236
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 ? T_6 extends infer U ? { [key_6 in keyof U]: U[key_6]; } : never : never : never, Stages_7>;
|
|
237
|
-
memo<Props_15 extends {} = {}, Ref_15 = FunctionComponent<Props_15>>(displayName?: string): ModularComponent<Props_15, Ref_15, {
|
|
238
|
-
readonly Render: {
|
|
239
|
-
readonly symbol: typeof withRender;
|
|
240
|
-
readonly field: "render";
|
|
241
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
242
|
-
};
|
|
243
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 extends infer T_6 ? T_6 extends {
|
|
244
|
-
readonly Render: {
|
|
245
|
-
readonly symbol: typeof withRender;
|
|
246
|
-
readonly field: "render";
|
|
247
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
248
|
-
};
|
|
249
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 ? T_6 extends infer U ? { [key_6 in keyof U]: U[key_6]; } : never : never : never, Stages_7>;
|
|
250
|
-
};
|
|
251
|
-
extend: <_Methods_7 extends Record<string, MethodRecord>>(_methods: _Methods_7) => {
|
|
252
|
-
build: <Stages_8 extends StageTuple = []>(stages?: StageTuple) => {
|
|
253
|
-
<Props_16 extends {} = {}, Ref_16 = FunctionComponent<Props_16>>(displayName?: string, options?: {
|
|
254
|
-
memo: boolean;
|
|
255
|
-
} | undefined): ModularComponent<Props_16, Ref_16, {
|
|
256
|
-
readonly Render: {
|
|
257
|
-
readonly symbol: typeof withRender;
|
|
258
|
-
readonly field: "render";
|
|
259
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
260
|
-
};
|
|
261
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 extends infer T_7 ? T_7 extends {
|
|
262
|
-
readonly Render: {
|
|
263
|
-
readonly symbol: typeof withRender;
|
|
264
|
-
readonly field: "render";
|
|
265
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
266
|
-
};
|
|
267
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 ? T_7 extends infer U ? { [key_7 in keyof U]: U[key_7]; } : never : never : never, Stages_8>;
|
|
268
|
-
memo<Props_17 extends {} = {}, Ref_17 = FunctionComponent<Props_17>>(displayName?: string): ModularComponent<Props_17, Ref_17, {
|
|
269
|
-
readonly Render: {
|
|
270
|
-
readonly symbol: typeof withRender;
|
|
271
|
-
readonly field: "render";
|
|
272
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
273
|
-
};
|
|
274
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 extends infer T_7 ? T_7 extends {
|
|
275
|
-
readonly Render: {
|
|
276
|
-
readonly symbol: typeof withRender;
|
|
277
|
-
readonly field: "render";
|
|
278
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
279
|
-
};
|
|
280
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 ? T_7 extends infer U ? { [key_7 in keyof U]: U[key_7]; } : never : never : never, Stages_8>;
|
|
281
|
-
};
|
|
282
|
-
extend: <_Methods_8 extends Record<string, MethodRecord>>(_methods: _Methods_8) => {
|
|
283
|
-
build: <Stages_9 extends StageTuple = []>(stages?: StageTuple) => {
|
|
284
|
-
<Props_18 extends {} = {}, Ref_18 = FunctionComponent<Props_18>>(displayName?: string, options?: {
|
|
285
|
-
memo: boolean;
|
|
286
|
-
} | undefined): ModularComponent<Props_18, Ref_18, {
|
|
287
|
-
readonly Render: {
|
|
288
|
-
readonly symbol: typeof withRender;
|
|
289
|
-
readonly field: "render";
|
|
290
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
291
|
-
};
|
|
292
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 extends infer T_8 ? T_8 extends {
|
|
293
|
-
readonly Render: {
|
|
294
|
-
readonly symbol: typeof withRender;
|
|
295
|
-
readonly field: "render";
|
|
296
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
297
|
-
};
|
|
298
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 ? T_8 extends infer U ? { [key_8 in keyof U]: U[key_8]; } : never : never : never, Stages_9>;
|
|
299
|
-
memo<Props_19 extends {} = {}, Ref_19 = FunctionComponent<Props_19>>(displayName?: string): ModularComponent<Props_19, Ref_19, {
|
|
300
|
-
readonly Render: {
|
|
301
|
-
readonly symbol: typeof withRender;
|
|
302
|
-
readonly field: "render";
|
|
303
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
304
|
-
};
|
|
305
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 extends infer T_8 ? T_8 extends {
|
|
306
|
-
readonly Render: {
|
|
307
|
-
readonly symbol: typeof withRender;
|
|
308
|
-
readonly field: "render";
|
|
309
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
310
|
-
};
|
|
311
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 ? T_8 extends infer U ? { [key_8 in keyof U]: U[key_8]; } : never : never : never, Stages_9>;
|
|
312
|
-
};
|
|
313
|
-
extend: <_Methods_9 extends Record<string, MethodRecord>>(_methods: _Methods_9) => {
|
|
314
|
-
build: <Stages_10 extends StageTuple = []>(stages?: StageTuple) => {
|
|
315
|
-
<Props_20 extends {} = {}, Ref_20 = FunctionComponent<Props_20>>(displayName?: string, options?: {
|
|
316
|
-
memo: boolean;
|
|
317
|
-
} | undefined): ModularComponent<Props_20, Ref_20, {
|
|
318
|
-
readonly Render: {
|
|
319
|
-
readonly symbol: typeof withRender;
|
|
320
|
-
readonly field: "render";
|
|
321
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
322
|
-
};
|
|
323
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 & _Methods_9 extends infer T_9 ? T_9 extends {
|
|
324
|
-
readonly Render: {
|
|
325
|
-
readonly symbol: typeof withRender;
|
|
326
|
-
readonly field: "render";
|
|
327
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
328
|
-
};
|
|
329
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 & _Methods_9 ? T_9 extends infer U ? { [key_9 in keyof U]: U[key_9]; } : never : never : never, Stages_10>;
|
|
330
|
-
memo<Props_21 extends {} = {}, Ref_21 = FunctionComponent<Props_21>>(displayName?: string): ModularComponent<Props_21, Ref_21, {
|
|
331
|
-
readonly Render: {
|
|
332
|
-
readonly symbol: typeof withRender;
|
|
333
|
-
readonly field: "render";
|
|
334
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
335
|
-
};
|
|
336
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 & _Methods_9 extends infer T_9 ? T_9 extends {
|
|
337
|
-
readonly Render: {
|
|
338
|
-
readonly symbol: typeof withRender;
|
|
339
|
-
readonly field: "render";
|
|
340
|
-
readonly transform: (args: any, useStage: any) => any;
|
|
341
|
-
};
|
|
342
|
-
} & _Methods & _Methods_1 & _Methods_2 & _Methods_3 & _Methods_4 & _Methods_5 & _Methods_6 & _Methods_7 & _Methods_8 & _Methods_9 ? T_9 extends infer U ? { [key_9 in keyof U]: U[key_9]; } : never : never : never, Stages_10>;
|
|
343
|
-
};
|
|
344
|
-
extend: <_Methods_10 extends Record<string, MethodRecord>>(_methods: _Methods_10) => any;
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
};
|
|
6
|
+
export type FunctionComponentOrRefRenderFunction<Props, Ref> = [Ref] extends [
|
|
7
|
+
never
|
|
8
|
+
] ? FunctionComponent<PropsWithChildren<Props>> : ForwardRefRenderFunction<Ref, Props>;
|
|
9
|
+
export type ModularComponent<Props extends {}, Ref, Args extends {
|
|
10
|
+
render: ReturnType<FunctionComponent>;
|
|
11
|
+
}> = FunctionComponentOrRefRenderFunction<Props, Ref> & {
|
|
12
|
+
with<Field extends string, Type>(stage: {
|
|
13
|
+
field: Field;
|
|
14
|
+
useStage: (args: Args, ref: React.ForwardedRef<Ref>) => Field extends keyof Args ? Args[Field] : Type;
|
|
15
|
+
}): ModularComponent<Props, Ref, {
|
|
16
|
+
[key in keyof Args | Field]: key extends 'render' ? ReturnType<FunctionComponent> : key extends Field ? Type : key extends keyof Args ? Args[key] : never;
|
|
17
|
+
}>;
|
|
18
|
+
force<Field extends string, Type>(stage: {
|
|
19
|
+
field: Field;
|
|
20
|
+
useStage: (args: Args, ref: React.ForwardedRef<Ref>) => Field extends 'render' ? Args['render'] : Type;
|
|
21
|
+
}): ModularComponent<Props, Ref, {
|
|
22
|
+
[key in keyof Args | Field]: key extends 'render' ? ReturnType<FunctionComponent> : key extends Field ? Type : key extends keyof Args ? Args[key] : never;
|
|
23
|
+
}>;
|
|
24
|
+
use<Field extends keyof Args>(key: Field): {} extends Props ? () => Args[Field] : (props: PropsWithChildren<Props>) => Args[Field];
|
|
25
|
+
use(): {} extends Props ? () => Args : (props: PropsWithChildren<Props>) => Args;
|
|
26
|
+
stage<Field extends keyof Args>(key: Field): (args: Partial<Args>) => Args[Field];
|
|
27
|
+
setDisplayName(displayName: string): ModularComponent<Props, Ref, Args>;
|
|
355
28
|
};
|
|
356
|
-
export declare function
|
|
29
|
+
export declare function ModularComponent<Props extends {} = {}, Ref = never>(displayName?: string): ModularComponent<Props, Ref, {
|
|
30
|
+
props: Props;
|
|
31
|
+
render: ReturnType<FunctionComponent>;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function render<Args extends {}, Ref>(render: (args: Args, ref: React.ForwardedRef<Ref>) => React.ReactElement<any, any> | null): ModularStage<'render', (args: Args, ref: React.ForwardedRef<Ref>) => React.ReactElement<any, any> | null>;
|
|
357
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,150 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Component.asHook = generateAsHook();
|
|
45
|
-
// Add each configured stage methods to the component
|
|
46
|
-
Object.keys(methods).forEach((method) => {
|
|
47
|
-
// Check if a stage of the same key already exists
|
|
48
|
-
const stageIndices = stages
|
|
49
|
-
// Map all stages to an [index, stage] tuple
|
|
50
|
-
.map((record, index) => [index, record])
|
|
51
|
-
// Remove all tuples not matching our stage
|
|
52
|
-
.filter(([, record]) => record.stage === methods[method].symbol)
|
|
53
|
-
// Get the index
|
|
54
|
-
.map(([index]) => index);
|
|
55
|
-
const lastIndex = [...stageIndices].pop();
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
Component[`with${method}`] = (value, forceIndex) => {
|
|
58
|
-
// Prepare the new stage
|
|
59
|
-
const stage = { stage: methods[method].symbol, value };
|
|
60
|
-
// Check if a stage of the same key already exists
|
|
61
|
-
const stageIndex = (forceIndex !== undefined
|
|
62
|
-
? stageIndices[forceIndex]
|
|
63
|
-
: lastIndex) ?? -1;
|
|
64
|
-
// If so, copy the stages and replace the previous record
|
|
65
|
-
if (stageIndex > -1) {
|
|
66
|
-
const nextStages = [...stages];
|
|
67
|
-
nextStages[stageIndex] = stage;
|
|
68
|
-
return ModularFactory(methods).build(nextStages)(displayName);
|
|
69
|
-
}
|
|
70
|
-
// Otherwise, append the stage
|
|
71
|
-
return ModularFactory(methods).build([...stages, stage])(displayName);
|
|
72
|
-
};
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
Component[`add${method}`] =
|
|
75
|
-
stageIndices.length < 1
|
|
76
|
-
? undefined
|
|
77
|
-
: (value) => {
|
|
78
|
-
// Prepare the new stage
|
|
79
|
-
const stage = {
|
|
80
|
-
stage: methods[method].symbol,
|
|
81
|
-
value,
|
|
82
|
-
};
|
|
83
|
-
// Append the stage as in multiple mode
|
|
84
|
-
return ModularFactory(methods).build([
|
|
85
|
-
...stages,
|
|
86
|
-
stage,
|
|
87
|
-
])(displayName);
|
|
88
|
-
};
|
|
89
|
-
// @ts-ignore
|
|
90
|
-
Component[`at${method}`] =
|
|
91
|
-
stageIndices.length < 1
|
|
92
|
-
? undefined
|
|
93
|
-
: (forceIndex) => {
|
|
94
|
-
// Find the needed stage
|
|
95
|
-
const stageIndex = (forceIndex !== undefined
|
|
96
|
-
? stageIndices[forceIndex]
|
|
97
|
-
: lastIndex) ?? lastIndex;
|
|
98
|
-
// Otherwise, keep all stages up to and including the found stage
|
|
99
|
-
return ModularFactory(methods).build(stages.slice(0, stageIndex + 1))(displayName);
|
|
100
|
-
};
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
Component[`mock${method}`] =
|
|
103
|
-
stageIndices.length < 1
|
|
104
|
-
? undefined
|
|
105
|
-
: (value, forceIndex) => {
|
|
106
|
-
// Prepare the mocked stage
|
|
107
|
-
const stage = {
|
|
108
|
-
stage: methods[method].symbol,
|
|
109
|
-
value,
|
|
110
|
-
mocked: true,
|
|
111
|
-
};
|
|
112
|
-
// Find the needed stage
|
|
113
|
-
const stageIndex = (forceIndex !== undefined
|
|
114
|
-
? stageIndices[forceIndex]
|
|
115
|
-
: lastIndex) ?? lastIndex;
|
|
116
|
-
// Replace the stage with its mock
|
|
117
|
-
const nextStages = [...stages];
|
|
118
|
-
nextStages[stageIndex] = stage;
|
|
119
|
-
return ModularFactory(methods).build(nextStages)(displayName);
|
|
120
|
-
};
|
|
121
|
-
const capitalize = (str) => str[0].toUpperCase() + str.slice(1);
|
|
122
|
-
// @ts-ignore
|
|
123
|
-
Component[`asUse${capitalize(methods[method].field)}`] =
|
|
124
|
-
generateAsHook(undefined, methods[method].field);
|
|
125
|
-
});
|
|
126
|
-
return (options?.memo ? memo(Component) : Component);
|
|
127
|
-
};
|
|
128
|
-
factory.memo = (displayName) => factory(displayName, { memo: true });
|
|
129
|
-
return factory;
|
|
130
|
-
},
|
|
131
|
-
extend: (_methods) => {
|
|
132
|
-
return ModularFactory({
|
|
133
|
-
...methods,
|
|
134
|
-
..._methods,
|
|
135
|
-
});
|
|
136
|
-
},
|
|
1
|
+
function InternalFactory(stages) {
|
|
2
|
+
const useComponent = function (props, ref) {
|
|
3
|
+
if (!stages.some((stage) => stage.field === 'render')) {
|
|
4
|
+
stages = [...stages, render(() => null)];
|
|
5
|
+
}
|
|
6
|
+
return useComponent.use('render')(props, ref);
|
|
7
|
+
};
|
|
8
|
+
useComponent.with = (stage) => {
|
|
9
|
+
const index = stages.findIndex((s) => s.field === stage.field);
|
|
10
|
+
if (index !== -1) {
|
|
11
|
+
const next = [...stages];
|
|
12
|
+
next[index] = stage;
|
|
13
|
+
return InternalFactory(next);
|
|
14
|
+
}
|
|
15
|
+
return InternalFactory([...stages, stage]);
|
|
16
|
+
};
|
|
17
|
+
useComponent.force = useComponent.with;
|
|
18
|
+
useComponent.use =
|
|
19
|
+
(field) => (props, ref) => {
|
|
20
|
+
const args = { props };
|
|
21
|
+
const index = field
|
|
22
|
+
? stages.findIndex((stage) => stage.field === field)
|
|
23
|
+
: false;
|
|
24
|
+
if (index === false) {
|
|
25
|
+
for (let stage of stages) {
|
|
26
|
+
args[stage.field] = stage.useStage(args, ref);
|
|
27
|
+
}
|
|
28
|
+
return args;
|
|
29
|
+
}
|
|
30
|
+
const argStages = index === -1 ? stages.slice(0) : stages.slice(0, index + 1);
|
|
31
|
+
const returnStage = argStages.pop();
|
|
32
|
+
for (let stage of argStages) {
|
|
33
|
+
args[stage.field] = stage.useStage(args, ref);
|
|
34
|
+
}
|
|
35
|
+
return returnStage?.useStage(args, ref) ?? null;
|
|
36
|
+
};
|
|
37
|
+
useComponent.stage = (field) => {
|
|
38
|
+
const stage = stages.find((stage) => stage.field === field);
|
|
39
|
+
return stage?.useStage ?? (() => null);
|
|
40
|
+
};
|
|
41
|
+
useComponent.setDisplayName = (displayName) => {
|
|
42
|
+
;
|
|
43
|
+
useComponent.displayName = displayName;
|
|
137
44
|
};
|
|
45
|
+
return useComponent;
|
|
138
46
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
47
|
+
export function ModularComponent(displayName) {
|
|
48
|
+
const useComponent = InternalFactory([]);
|
|
49
|
+
useComponent.displayName = displayName;
|
|
50
|
+
return useComponent;
|
|
51
|
+
}
|
|
52
|
+
export function render(render) {
|
|
53
|
+
return {
|
|
143
54
|
field: 'render',
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
export function createMethodRecord(record) {
|
|
148
|
-
return record;
|
|
55
|
+
useStage: render,
|
|
56
|
+
};
|
|
149
57
|
}
|
|
150
58
|
//# sourceMappingURL=index.js.map
|