@strata-ds/core 2.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.
Files changed (42) hide show
  1. package/README.md +438 -0
  2. package/dist/components/DynamicComponentDebug.d.ts +3 -0
  3. package/dist/components/DynamicComponentDebug.d.ts.map +1 -0
  4. package/dist/components/DynamicComponents.d.ts +12 -0
  5. package/dist/components/DynamicComponents.d.ts.map +1 -0
  6. package/dist/components/card-ui/Card.d.ts +40 -0
  7. package/dist/components/card-ui/Card.d.ts.map +1 -0
  8. package/dist/components/card-ui/DefaultCard.d.ts +3 -0
  9. package/dist/components/card-ui/DefaultCard.d.ts.map +1 -0
  10. package/dist/components/index.d.ts +4 -0
  11. package/dist/components/index.d.ts.map +1 -0
  12. package/dist/data/index.d.ts +2 -0
  13. package/dist/data/index.d.ts.map +1 -0
  14. package/dist/data/mock.types.d.ts +70 -0
  15. package/dist/data/mock.types.d.ts.map +1 -0
  16. package/dist/hook/useCardData.d.ts +371 -0
  17. package/dist/hook/useCardData.d.ts.map +1 -0
  18. package/dist/hook/useComponent.d.ts +4 -0
  19. package/dist/hook/useComponent.d.ts.map +1 -0
  20. package/dist/hook/useComponents.d.ts +2 -0
  21. package/dist/hook/useComponents.d.ts.map +1 -0
  22. package/dist/hook/useDesignSystemSync.d.ts +1 -0
  23. package/dist/hook/useDesignSystemSync.d.ts.map +1 -0
  24. package/dist/hook/useDynamicComponents.d.ts +3 -0
  25. package/dist/hook/useDynamicComponents.d.ts.map +1 -0
  26. package/dist/index.d.ts +440 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.esm.js +3049 -0
  29. package/dist/index.esm.js.map +1 -0
  30. package/dist/index.js +3062 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/providers/StrataProvider.d.ts +60 -0
  33. package/dist/providers/StrataProvider.d.ts.map +1 -0
  34. package/dist/providers/index.d.ts +2 -0
  35. package/dist/providers/index.d.ts.map +1 -0
  36. package/dist/registry/ComponentFactory.d.ts +39 -0
  37. package/dist/registry/ComponentFactory.d.ts.map +1 -0
  38. package/dist/registry/ComponentRegistry.d.ts +29 -0
  39. package/dist/registry/ComponentRegistry.d.ts.map +1 -0
  40. package/dist/types/card-types.d.ts +185 -0
  41. package/dist/types/card-types.d.ts.map +1 -0
  42. package/package.json +74 -0
@@ -0,0 +1,371 @@
1
+ interface UseComponentDataOptions {
2
+ componentName?: string;
3
+ fallbackToDefault?: boolean;
4
+ }
5
+ export declare const useComponentData: (options?: UseComponentDataOptions) => {
6
+ data: {
7
+ card: {
8
+ width: string;
9
+ maxWidth: string;
10
+ backgroundColor: string;
11
+ fontFamily: string;
12
+ };
13
+ container: {
14
+ width: string;
15
+ maxWidth: string;
16
+ backgroundColor: string;
17
+ borderRadius: string;
18
+ boxShadow: string;
19
+ overflow: string;
20
+ };
21
+ header: {
22
+ padding: string;
23
+ borderBottom: string;
24
+ borderColor: string;
25
+ };
26
+ headerContent: {
27
+ display: string;
28
+ justifyContent: string;
29
+ alignItems: string;
30
+ };
31
+ headerTitle: {
32
+ text: string;
33
+ fontSize: string;
34
+ fontWeight: string;
35
+ color: string;
36
+ };
37
+ headerTimer: {
38
+ text: string;
39
+ fontSize: string;
40
+ fontFamily: string;
41
+ color: string;
42
+ };
43
+ body: {
44
+ padding: string;
45
+ };
46
+ bodyDriver: {
47
+ backgroundColor: string;
48
+ borderRadius: string;
49
+ padding: string;
50
+ display: string;
51
+ alignItems: string;
52
+ gap: string;
53
+ };
54
+ bodyImage: {
55
+ src: string;
56
+ alt: string;
57
+ width: string;
58
+ height: string;
59
+ borderRadius: string;
60
+ objectFit: string;
61
+ };
62
+ bodyInfo: {
63
+ flexGrow: string;
64
+ };
65
+ bodyName: {
66
+ text: string;
67
+ fontWeight: string;
68
+ color: string;
69
+ };
70
+ bodySpan: {
71
+ text: string;
72
+ fontSize: string;
73
+ color: string;
74
+ };
75
+ bodyActions: {
76
+ gap: string;
77
+ };
78
+ route: {
79
+ paddingX: string;
80
+ paddingBottom: string;
81
+ };
82
+ routeContainer: {
83
+ gap: string;
84
+ };
85
+ payment: {
86
+ paddingX: string;
87
+ paddingBottom: string;
88
+ };
89
+ paymentContainer: {
90
+ backgroundColor: string;
91
+ borderRadius: string;
92
+ padding: string;
93
+ };
94
+ cardNumber: {
95
+ text: string;
96
+ color: string;
97
+ fontWeight: string;
98
+ fontSize: string;
99
+ };
100
+ cardType: {
101
+ text: string;
102
+ fontSize: string;
103
+ color: string;
104
+ };
105
+ totalSection: {
106
+ paddingX: string;
107
+ paddingY: string;
108
+ };
109
+ totalLabel: {
110
+ text: string;
111
+ color: string;
112
+ fontWeight: string;
113
+ };
114
+ totalAmount: {
115
+ text: string;
116
+ fontSize: string;
117
+ fontWeight: string;
118
+ color: string;
119
+ };
120
+ } | null;
121
+ hasData: boolean;
122
+ componentName: string;
123
+ syncVersion: number;
124
+ };
125
+ export declare const useCardData: () => {
126
+ data: {
127
+ card: {
128
+ width: string;
129
+ maxWidth: string;
130
+ backgroundColor: string;
131
+ fontFamily: string;
132
+ };
133
+ container: {
134
+ width: string;
135
+ maxWidth: string;
136
+ backgroundColor: string;
137
+ borderRadius: string;
138
+ boxShadow: string;
139
+ overflow: string;
140
+ };
141
+ header: {
142
+ padding: string;
143
+ borderBottom: string;
144
+ borderColor: string;
145
+ };
146
+ headerContent: {
147
+ display: string;
148
+ justifyContent: string;
149
+ alignItems: string;
150
+ };
151
+ headerTitle: {
152
+ text: string;
153
+ fontSize: string;
154
+ fontWeight: string;
155
+ color: string;
156
+ };
157
+ headerTimer: {
158
+ text: string;
159
+ fontSize: string;
160
+ fontFamily: string;
161
+ color: string;
162
+ };
163
+ body: {
164
+ padding: string;
165
+ };
166
+ bodyDriver: {
167
+ backgroundColor: string;
168
+ borderRadius: string;
169
+ padding: string;
170
+ display: string;
171
+ alignItems: string;
172
+ gap: string;
173
+ };
174
+ bodyImage: {
175
+ src: string;
176
+ alt: string;
177
+ width: string;
178
+ height: string;
179
+ borderRadius: string;
180
+ objectFit: string;
181
+ };
182
+ bodyInfo: {
183
+ flexGrow: string;
184
+ };
185
+ bodyName: {
186
+ text: string;
187
+ fontWeight: string;
188
+ color: string;
189
+ };
190
+ bodySpan: {
191
+ text: string;
192
+ fontSize: string;
193
+ color: string;
194
+ };
195
+ bodyActions: {
196
+ gap: string;
197
+ };
198
+ route: {
199
+ paddingX: string;
200
+ paddingBottom: string;
201
+ };
202
+ routeContainer: {
203
+ gap: string;
204
+ };
205
+ payment: {
206
+ paddingX: string;
207
+ paddingBottom: string;
208
+ };
209
+ paymentContainer: {
210
+ backgroundColor: string;
211
+ borderRadius: string;
212
+ padding: string;
213
+ };
214
+ cardNumber: {
215
+ text: string;
216
+ color: string;
217
+ fontWeight: string;
218
+ fontSize: string;
219
+ };
220
+ cardType: {
221
+ text: string;
222
+ fontSize: string;
223
+ color: string;
224
+ };
225
+ totalSection: {
226
+ paddingX: string;
227
+ paddingY: string;
228
+ };
229
+ totalLabel: {
230
+ text: string;
231
+ color: string;
232
+ fontWeight: string;
233
+ };
234
+ totalAmount: {
235
+ text: string;
236
+ fontSize: string;
237
+ fontWeight: string;
238
+ color: string;
239
+ };
240
+ } | null;
241
+ hasData: boolean;
242
+ componentName: string;
243
+ syncVersion: number;
244
+ };
245
+ export declare const useCustomComponent: (componentName: string) => {
246
+ data: {
247
+ card: {
248
+ width: string;
249
+ maxWidth: string;
250
+ backgroundColor: string;
251
+ fontFamily: string;
252
+ };
253
+ container: {
254
+ width: string;
255
+ maxWidth: string;
256
+ backgroundColor: string;
257
+ borderRadius: string;
258
+ boxShadow: string;
259
+ overflow: string;
260
+ };
261
+ header: {
262
+ padding: string;
263
+ borderBottom: string;
264
+ borderColor: string;
265
+ };
266
+ headerContent: {
267
+ display: string;
268
+ justifyContent: string;
269
+ alignItems: string;
270
+ };
271
+ headerTitle: {
272
+ text: string;
273
+ fontSize: string;
274
+ fontWeight: string;
275
+ color: string;
276
+ };
277
+ headerTimer: {
278
+ text: string;
279
+ fontSize: string;
280
+ fontFamily: string;
281
+ color: string;
282
+ };
283
+ body: {
284
+ padding: string;
285
+ };
286
+ bodyDriver: {
287
+ backgroundColor: string;
288
+ borderRadius: string;
289
+ padding: string;
290
+ display: string;
291
+ alignItems: string;
292
+ gap: string;
293
+ };
294
+ bodyImage: {
295
+ src: string;
296
+ alt: string;
297
+ width: string;
298
+ height: string;
299
+ borderRadius: string;
300
+ objectFit: string;
301
+ };
302
+ bodyInfo: {
303
+ flexGrow: string;
304
+ };
305
+ bodyName: {
306
+ text: string;
307
+ fontWeight: string;
308
+ color: string;
309
+ };
310
+ bodySpan: {
311
+ text: string;
312
+ fontSize: string;
313
+ color: string;
314
+ };
315
+ bodyActions: {
316
+ gap: string;
317
+ };
318
+ route: {
319
+ paddingX: string;
320
+ paddingBottom: string;
321
+ };
322
+ routeContainer: {
323
+ gap: string;
324
+ };
325
+ payment: {
326
+ paddingX: string;
327
+ paddingBottom: string;
328
+ };
329
+ paymentContainer: {
330
+ backgroundColor: string;
331
+ borderRadius: string;
332
+ padding: string;
333
+ };
334
+ cardNumber: {
335
+ text: string;
336
+ color: string;
337
+ fontWeight: string;
338
+ fontSize: string;
339
+ };
340
+ cardType: {
341
+ text: string;
342
+ fontSize: string;
343
+ color: string;
344
+ };
345
+ totalSection: {
346
+ paddingX: string;
347
+ paddingY: string;
348
+ };
349
+ totalLabel: {
350
+ text: string;
351
+ color: string;
352
+ fontWeight: string;
353
+ };
354
+ totalAmount: {
355
+ text: string;
356
+ fontSize: string;
357
+ fontWeight: string;
358
+ color: string;
359
+ };
360
+ } | null;
361
+ hasData: boolean;
362
+ componentName: string;
363
+ syncVersion: number;
364
+ };
365
+ export declare const useAvailableComponents: () => {
366
+ baseComponents: string[];
367
+ customComponents: string[];
368
+ allComponents: string[];
369
+ };
370
+ export {};
371
+ //# sourceMappingURL=useCardData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCardData.d.ts","sourceRoot":"","sources":["../../src/hook/useCardData.ts"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,GAAI,UAAS,uBAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwPrE,CAAC;AAGF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoD,CAAC;AAG7E,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKvD,CAAC;AAGF,eAAO,MAAM,sBAAsB;;;;CAUlC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const useComponent: (componentName: string) => (import("react").ComponentType<import("../registry/ComponentFactory").DynamicComponentProps> & {
2
+ [subComponentName: string]: import("react").ComponentType<import("../registry/ComponentFactory").DynamicComponentProps>;
3
+ }) | null;
4
+ //# sourceMappingURL=useComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComponent.d.ts","sourceRoot":"","sources":["../../src/hook/useComponent.ts"],"names":[],"mappings":"AAmCA,eAAO,MAAM,YAAY,GAAI,eAAe,MAAM;;SAuBjD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useComponents: () => import("../registry/ComponentRegistry").ComponentRegistry;
2
+ //# sourceMappingURL=useComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComponents.d.ts","sourceRoot":"","sources":["../../src/hook/useComponents.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,iEASzB,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=useDesignSystemSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDesignSystemSync.d.ts","sourceRoot":"","sources":["../../src/hook/useDesignSystemSync.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { ComponentRegistry } from '../registry/ComponentRegistry';
2
+ export declare const useDynamicComponents: () => ComponentRegistry;
3
+ //# sourceMappingURL=useDynamicComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDynamicComponents.d.ts","sourceRoot":"","sources":["../../src/hook/useDynamicComponents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlF,eAAO,MAAM,oBAAoB,yBAwChC,CAAC"}