@openlettermarketing/olc-react-sdk 0.0.18 → 0.0.20

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 (138) hide show
  1. package/build/index.js +3 -3
  2. package/build/index.js.map +1 -1
  3. package/build/types/App.d.ts +1 -0
  4. package/build/types/components/TemplateBuilder/index.d.ts +1 -0
  5. package/build/types/components/TopNavigation/index.d.ts +1 -0
  6. package/build/types/index.d.ts +3 -2
  7. package/package.json +1 -1
  8. package/.eslintignore +0 -1
  9. package/.eslintrc.cjs +0 -18
  10. package/.eslintrc.yml +0 -47
  11. package/.prettierignore +0 -3
  12. package/.prettierrc.yml +0 -5
  13. package/CHANGELOG.md +0 -4
  14. package/babel.config.json +0 -10
  15. package/examples/.eslintrc.yml +0 -4
  16. package/index.html +0 -18
  17. package/public/vite.svg +0 -1
  18. package/src/App.tsx +0 -72
  19. package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
  20. package/src/assets/images/input/cancel.tsx +0 -20
  21. package/src/assets/images/input/search.tsx +0 -20
  22. package/src/assets/images/modal-icons/cancelIcon.png +0 -0
  23. package/src/assets/images/modal-icons/del.tsx +0 -19
  24. package/src/assets/images/modal-icons/delete.svg +0 -3
  25. package/src/assets/images/modal-icons/modal-cross.tsx +0 -23
  26. package/src/assets/images/modal-icons/save.tsx +0 -23
  27. package/src/assets/images/templates/add-icon.svg +0 -5
  28. package/src/assets/images/templates/back-arrow.tsx +0 -19
  29. package/src/assets/images/templates/back-dialog-icon.png +0 -0
  30. package/src/assets/images/templates/back-dialog-icon.svg +0 -3
  31. package/src/assets/images/templates/barcode.png +0 -0
  32. package/src/assets/images/templates/bi-fold-self-mailers.tsx +0 -28
  33. package/src/assets/images/templates/black-trash-icon.svg +0 -3
  34. package/src/assets/images/templates/cancel.svg +0 -4
  35. package/src/assets/images/templates/cancelIcon.png +0 -0
  36. package/src/assets/images/templates/clipboard.svg +0 -3
  37. package/src/assets/images/templates/contact-search.svg +0 -3
  38. package/src/assets/images/templates/content-copy-icon.tsx +0 -24
  39. package/src/assets/images/templates/cross.svg +0 -3
  40. package/src/assets/images/templates/custom-template-icon-black.svg +0 -3
  41. package/src/assets/images/templates/custom-template-icon.svg +0 -3
  42. package/src/assets/images/templates/custom-template.tsx +0 -23
  43. package/src/assets/images/templates/dummy-template.svg +0 -21
  44. package/src/assets/images/templates/dynamic-field.tsx +0 -119
  45. package/src/assets/images/templates/edit-pencil-icon.tsx +0 -21
  46. package/src/assets/images/templates/filter-2.svg +0 -13
  47. package/src/assets/images/templates/info-icon.svg +0 -12
  48. package/src/assets/images/templates/info-icon.tsx +0 -37
  49. package/src/assets/images/templates/one-barcode.png +0 -0
  50. package/src/assets/images/templates/personal-letter.tsx +0 -53
  51. package/src/assets/images/templates/plus-icon.svg +0 -5
  52. package/src/assets/images/templates/postcard.tsx +0 -32
  53. package/src/assets/images/templates/professional-letter.tsx +0 -53
  54. package/src/assets/images/templates/real-penned-letters.tsx +0 -57
  55. package/src/assets/images/templates/search.svg +0 -3
  56. package/src/assets/images/templates/size-image-lg.tsx +0 -20
  57. package/src/assets/images/templates/size-image-mid.tsx +0 -20
  58. package/src/assets/images/templates/size-image.tsx +0 -20
  59. package/src/assets/images/templates/template-copy.svg +0 -3
  60. package/src/assets/images/templates/template-default-design.tsx +0 -21
  61. package/src/assets/images/templates/template-delete.svg +0 -3
  62. package/src/assets/images/templates/template-edit.svg +0 -4
  63. package/src/assets/images/templates/template-save-icon.svg +0 -3
  64. package/src/assets/images/templates/template-search-2.svg +0 -9
  65. package/src/assets/images/templates/template-search.svg +0 -4
  66. package/src/assets/images/templates/thumbnail.svg +0 -10
  67. package/src/assets/images/templates/trash-icon.svg +0 -13
  68. package/src/assets/images/templates/tri-fold-self-mailers.tsx +0 -93
  69. package/src/components/CreateTemplate/index.tsx +0 -379
  70. package/src/components/CreateTemplate/styles.scss +0 -363
  71. package/src/components/GenericUIBlocks/Button/index.tsx +0 -21
  72. package/src/components/GenericUIBlocks/Button/styles.scss +0 -15
  73. package/src/components/GenericUIBlocks/CircularProgress/index.tsx +0 -18
  74. package/src/components/GenericUIBlocks/CircularProgress/styles.scss +0 -98
  75. package/src/components/GenericUIBlocks/Dialog/index.tsx +0 -127
  76. package/src/components/GenericUIBlocks/Dialog/styles.scss +0 -106
  77. package/src/components/GenericUIBlocks/Divider/index.tsx +0 -12
  78. package/src/components/GenericUIBlocks/Divider/styles.scss +0 -7
  79. package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +0 -86
  80. package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +0 -77
  81. package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +0 -24
  82. package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +0 -9
  83. package/src/components/GenericUIBlocks/GenericSnackbar/index.tsx +0 -53
  84. package/src/components/GenericUIBlocks/GenericSnackbar/styles.scss +0 -34
  85. package/src/components/GenericUIBlocks/Grid/index.tsx +0 -82
  86. package/src/components/GenericUIBlocks/Input/index.tsx +0 -89
  87. package/src/components/GenericUIBlocks/Input/styles.scss +0 -80
  88. package/src/components/GenericUIBlocks/Typography/index.tsx +0 -18
  89. package/src/components/GenericUIBlocks/Typography/styles.scss +0 -27
  90. package/src/components/SidePanel/customFields/customFieldSection.tsx +0 -173
  91. package/src/components/SidePanel/customFields/styles.scss +0 -47
  92. package/src/components/SidePanel/index.tsx +0 -42
  93. package/src/components/SidePanel/templates/customTemplateSection.tsx +0 -503
  94. package/src/components/SidePanel/templates/styles.scss +0 -151
  95. package/src/components/TemplateBuilder/index.tsx +0 -301
  96. package/src/components/TemplateBuilder/styles.scss +0 -66
  97. package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +0 -58
  98. package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +0 -123
  99. package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +0 -98
  100. package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +0 -88
  101. package/src/components/TopNavigation/SaveTemplateModel/index.tsx +0 -60
  102. package/src/components/TopNavigation/SaveTemplateModel/styles.scss +0 -128
  103. package/src/components/TopNavigation/index.tsx +0 -405
  104. package/src/components/TopNavigation/styles.scss +0 -83
  105. package/src/importMeta.d.ts +0 -9
  106. package/src/index.scss +0 -137
  107. package/src/index.tsx +0 -80
  108. package/src/libs/test.ts +0 -7
  109. package/src/redux/actions/action-types.ts +0 -42
  110. package/src/redux/actions/customFieldAction.ts +0 -28
  111. package/src/redux/actions/snackbarActions.ts +0 -16
  112. package/src/redux/actions/templateActions.ts +0 -456
  113. package/src/redux/reducers/customFieldReducer.ts +0 -97
  114. package/src/redux/reducers/index.ts +0 -14
  115. package/src/redux/reducers/snackbarReducer.ts +0 -41
  116. package/src/redux/reducers/templateReducer.ts +0 -353
  117. package/src/redux/store.ts +0 -18
  118. package/src/styles/colors.scss +0 -61
  119. package/src/test/mocks.js +0 -89
  120. package/src/test/setupJest.js +0 -1
  121. package/src/utils/api.ts +0 -36
  122. package/src/utils/constants.ts +0 -40
  123. package/src/utils/customStyles.ts +0 -135
  124. package/src/utils/fetchWrapper.ts +0 -68
  125. package/src/utils/fonts.json +0 -1597
  126. package/src/utils/helper.ts +0 -19
  127. package/src/utils/local-storage.ts +0 -15
  128. package/src/utils/message.ts +0 -71
  129. package/src/utils/template-builder.ts +0 -147
  130. package/src/utils/templateRestrictedArea/biFold.ts +0 -433
  131. package/src/utils/templateRestrictedArea/postCard.ts +0 -439
  132. package/src/utils/templateRestrictedArea/professional.ts +0 -422
  133. package/src/utils/templateRestrictedArea/realPenned.ts +0 -244
  134. package/src/utils/templateRestrictedArea/triFold.ts +0 -434
  135. package/tsconfig.json +0 -29
  136. package/tsconfig.node.json +0 -12
  137. package/vite.config.ts +0 -8
  138. package/webpack.config.js +0 -80
@@ -1,434 +0,0 @@
1
- import { DPI } from "../constants";
2
-
3
- // Define the type for the element being added
4
- interface Element {
5
- id: string;
6
- type: string;
7
- name: string;
8
- opacity: number;
9
- visible: boolean;
10
- selectable: boolean;
11
- removable: boolean;
12
- alwaysOnTop: boolean;
13
- showInExport: boolean;
14
- x: number;
15
- y: number;
16
- width: number;
17
- height: number;
18
- rotation: number;
19
- animations?: any[];
20
- blurEnabled?: boolean;
21
- blurRadius?: number;
22
- brightnessEnabled?: boolean;
23
- brightness?: number;
24
- sepiaEnabled?: boolean;
25
- grayscaleEnabled?: boolean;
26
- shadowEnabled?: boolean;
27
- shadowBlur?: number;
28
- shadowOffsetX?: number;
29
- shadowOffsetY?: number;
30
- shadowColor?: string;
31
- shadowOpacity?: number;
32
- draggable?: boolean;
33
- resizable?: boolean;
34
- contentEditable: boolean;
35
- styleEditable: boolean;
36
- subType?: string;
37
- fill?: string;
38
- dash?: any[];
39
- strokeWidth?: number;
40
- stroke?: string;
41
- cornerRadius?: number;
42
- text?: string;
43
- placeholder?: string;
44
- fontSize?: number;
45
- fontFamily?: string;
46
- fontStyle?: string;
47
- fontWeight?: string;
48
- textDecoration?: string;
49
- align?: string;
50
- verticalAlign?: string;
51
- lineHeight?: number;
52
- letterSpacing?: number;
53
- backgroundEnabled?: boolean;
54
- backgroundColor?: string;
55
- backgroundOpacity?: number;
56
- backgroundCornerRadius?: number;
57
- backgroundPadding?: number;
58
- src?: string;
59
- cropX?: number;
60
- cropY?: number;
61
- cropWidth?: number;
62
- cropHeight?: number;
63
- flipX?: boolean;
64
- flipY?: boolean;
65
- clipSrc?: string;
66
- borderSize?: number;
67
- keepRatio?: boolean;
68
- }
69
-
70
- // Define the type for the page
71
- interface Page {
72
- addElement: (element: Element) => void;
73
- }
74
-
75
- // Define the type for the store
76
- interface Store {
77
- width: number;
78
- height: number;
79
- pages: Page[];
80
- history: {
81
- clear: () => void;
82
- };
83
- }
84
-
85
-
86
- export const addRestrictedAreaToTriFold = (store: Store, size: [number, number], barcodeSrc: string): void => {
87
- const page = store.pages[0];
88
-
89
- const elements: Element[] = [
90
- {
91
- id: 'figure-1',
92
- type: 'figure',
93
- name: '',
94
- opacity: 1,
95
- visible: true,
96
- selectable: false,
97
- removable: false,
98
- alwaysOnTop: true,
99
- showInExport: true,
100
- x: store.width - size[0] * DPI - 0.15 * DPI,
101
- y: store.height - size[1] * DPI - 0.125 * DPI - 4 * DPI,
102
- width: size[0] * DPI,
103
- height: size[1] * DPI,
104
- rotation: 0,
105
- animations: [],
106
- blurEnabled: false,
107
- blurRadius: 10,
108
- brightnessEnabled: false,
109
- brightness: 0,
110
- sepiaEnabled: false,
111
- grayscaleEnabled: false,
112
- shadowEnabled: false,
113
- shadowBlur: 5,
114
- shadowOffsetX: 0,
115
- shadowOffsetY: 0,
116
- shadowColor: 'black',
117
- shadowOpacity: 1,
118
- draggable: false,
119
- resizable: false,
120
- contentEditable: false,
121
- styleEditable: false,
122
- subType: 'rect',
123
- fill: 'white',
124
- dash: [],
125
- strokeWidth: 0,
126
- stroke: '#0c0c0c',
127
- cornerRadius: 0,
128
- },
129
- {
130
- id: 'return-address',
131
- type: 'text',
132
- name: '',
133
- opacity: 1,
134
- visible: true,
135
- selectable: false,
136
- removable: false,
137
- alwaysOnTop: true,
138
- showInExport: true,
139
- x: store.width - size[0] * DPI - 0.15 * DPI + 10,
140
- y: store.height - size[1] * DPI - 0.125 * DPI + 20 - 4 * DPI,
141
- width: 240,
142
- height: 20,
143
- rotation: 0,
144
- animations: [],
145
- blurEnabled: false,
146
- blurRadius: 10,
147
- brightnessEnabled: false,
148
- brightness: 0,
149
- sepiaEnabled: false,
150
- grayscaleEnabled: false,
151
- shadowEnabled: false,
152
- shadowBlur: 5,
153
- shadowOffsetX: 0,
154
- shadowOffsetY: 0,
155
- shadowColor: 'black',
156
- shadowOpacity: 1,
157
- draggable: false,
158
- resizable: false,
159
- contentEditable: false,
160
- styleEditable: false,
161
- text: 'YOUR RETURN ADDRESS \nWILL AUTOMATICALLY \nBE PRINTED IN THIS \nPOSITION',
162
- placeholder: '',
163
- fontSize: 12,
164
- fontFamily: 'Roboto',
165
- fontStyle: 'normal',
166
- fontWeight: 'normal',
167
- textDecoration: '',
168
- fill: 'black',
169
- align: 'start',
170
- verticalAlign: 'top',
171
- strokeWidth: 0,
172
- stroke: 'black',
173
- lineHeight: 1.2,
174
- letterSpacing: 0,
175
- backgroundEnabled: false,
176
- backgroundColor: '#7ED321',
177
- backgroundOpacity: 1,
178
- backgroundCornerRadius: 0.5,
179
- backgroundPadding: 0.5,
180
- },
181
- {
182
- id: 'indicia',
183
- type: 'text',
184
- name: '',
185
- opacity: 1,
186
- visible: true,
187
- selectable: false,
188
- removable: false,
189
- alwaysOnTop: true,
190
- showInExport: true,
191
- x: store.width - 111 - 0.15 * DPI,
192
- y: store.height - size[1] * DPI + 10 - 4 * DPI,
193
- width: 111,
194
- height: 40,
195
- rotation: 0,
196
- animations: [],
197
- blurEnabled: false,
198
- blurRadius: 10,
199
- brightnessEnabled: false,
200
- brightness: 0,
201
- sepiaEnabled: false,
202
- grayscaleEnabled: false,
203
- shadowEnabled: false,
204
- shadowBlur: 5,
205
- shadowOffsetX: 0,
206
- shadowOffsetY: 0,
207
- shadowColor: 'black',
208
- shadowOpacity: 1,
209
- draggable: false,
210
- resizable: false,
211
- contentEditable: false,
212
- styleEditable: false,
213
- text: `POSTAGE\nINDICIA`,
214
- placeholder: '',
215
- fontSize: 12,
216
- fontFamily: 'Roboto',
217
- fontStyle: 'normal',
218
- fontWeight: 'normal',
219
- textDecoration: '',
220
- fill: 'black',
221
- align: 'center',
222
- verticalAlign: 'top',
223
- strokeWidth: 0,
224
- stroke: 'black',
225
- lineHeight: 1.2,
226
- letterSpacing: 0,
227
- backgroundEnabled: false,
228
- backgroundColor: '#7ED321',
229
- backgroundOpacity: 1,
230
- backgroundCornerRadius: 0.5,
231
- backgroundPadding: 0.5,
232
- },
233
- {
234
- id: 'barcode',
235
- type: 'image',
236
- name: '',
237
- opacity: 1,
238
- visible: true,
239
- selectable: false,
240
- removable: false,
241
- alwaysOnTop: true,
242
- showInExport: true,
243
- y: store.height - 12 - size[1] * DPI + 110 - 4 * DPI,
244
- x: store.width - size[0] * DPI - 0.15 * DPI + 40,
245
- width: size[0] * DPI - 80,
246
- height: 12,
247
- rotation: 0,
248
- animations: [],
249
- blurEnabled: false,
250
- brightnessEnabled: false,
251
- brightness: 0,
252
- sepiaEnabled: false,
253
- grayscaleEnabled: false,
254
- shadowEnabled: false,
255
- shadowOffsetX: 0,
256
- shadowOffsetY: 0,
257
- shadowOpacity: 1,
258
- draggable: false,
259
- resizable: false,
260
- contentEditable: false,
261
- styleEditable: false,
262
- src: barcodeSrc,
263
- cropX: 0,
264
- cropY: 0,
265
- cropWidth: 1,
266
- cropHeight: 1,
267
- cornerRadius: 0,
268
- flipX: false,
269
- flipY: false,
270
- clipSrc: '',
271
- borderSize: 0,
272
- keepRatio: false,
273
- },
274
- {
275
- id: 'recipient-address',
276
- type: 'text',
277
- name: '',
278
- opacity: 1,
279
- visible: true,
280
- selectable: false,
281
- removable: false,
282
- alwaysOnTop: true,
283
- showInExport: true,
284
- x: store.width - size[0] * DPI - 0.15 * DPI + 10,
285
- y: store.height - size[1] * DPI - 0.125 * DPI + 150 - 4 * DPI,
286
- width: 240,
287
- height: 20,
288
- rotation: 0,
289
- animations: [],
290
- blurEnabled: false,
291
- blurRadius: 10,
292
- brightnessEnabled: false,
293
- brightness: 0,
294
- sepiaEnabled: false,
295
- grayscaleEnabled: false,
296
- shadowEnabled: false,
297
- shadowBlur: 5,
298
- shadowOffsetX: 0,
299
- shadowOffsetY: 0,
300
- shadowColor: 'black',
301
- shadowOpacity: 1,
302
- draggable: false,
303
- resizable: false,
304
- contentEditable: false,
305
- styleEditable: false,
306
- text: 'RECIPIENT ADDRESS \nWILL AUTOMATICALLY \nBE PRINTED IN THIS \nPOSITION',
307
- placeholder: '',
308
- fontSize: 12,
309
- fontFamily: 'Roboto',
310
- fontStyle: 'normal',
311
- fontWeight: 'normal',
312
- textDecoration: '',
313
- fill: 'black',
314
- align: 'start',
315
- verticalAlign: 'top',
316
- strokeWidth: 0,
317
- stroke: 'black',
318
- lineHeight: 1.2,
319
- letterSpacing: 0,
320
- backgroundEnabled: false,
321
- backgroundColor: '#7ED321',
322
- backgroundOpacity: 1,
323
- backgroundCornerRadius: 0.5,
324
- backgroundPadding: 0.5,
325
- },
326
- {
327
- id: 'sequence',
328
- type: 'text',
329
- name: '',
330
- opacity: 1,
331
- visible: true,
332
- selectable: false,
333
- removable: false,
334
- alwaysOnTop: true,
335
- showInExport: true,
336
- x: store.width - 111 - 0.15 * DPI,
337
- y: store.height - size[1] * DPI + 170 - 4 * DPI,
338
- width: 111,
339
- height: 40,
340
- rotation: 0,
341
- animations: [],
342
- blurEnabled: false,
343
- blurRadius: 10,
344
- brightnessEnabled: false,
345
- brightness: 0,
346
- sepiaEnabled: false,
347
- grayscaleEnabled: false,
348
- shadowEnabled: false,
349
- shadowBlur: 5,
350
- shadowOffsetX: 0,
351
- shadowOffsetY: 0,
352
- shadowColor: 'black',
353
- shadowOpacity: 1,
354
- draggable: false,
355
- resizable: false,
356
- contentEditable: false,
357
- styleEditable: false,
358
- text: `Sequence`,
359
- placeholder: '',
360
- fontSize: 8,
361
- fontFamily: 'Roboto',
362
- fontStyle: 'normal',
363
- fontWeight: 'normal',
364
- textDecoration: '',
365
- fill: 'black',
366
- align: 'center',
367
- verticalAlign: 'top',
368
- strokeWidth: 0,
369
- stroke: 'black',
370
- lineHeight: 1.2,
371
- letterSpacing: 0,
372
- backgroundEnabled: false,
373
- backgroundColor: '#7ED321',
374
- backgroundOpacity: 1,
375
- backgroundCornerRadius: 0.5,
376
- backgroundPadding: 0.5,
377
- },
378
- {
379
- id: 'contId',
380
- type: 'text',
381
- name: '',
382
- opacity: 1,
383
- visible: true,
384
- selectable: false,
385
- removable: false,
386
- alwaysOnTop: true,
387
- showInExport: true,
388
- x: store.width - 111 - 0.15 * DPI,
389
- y: store.height - size[1] * DPI + 180 - 4 * DPI,
390
- width: 111,
391
- height: 40,
392
- rotation: 0,
393
- animations: [],
394
- blurEnabled: false,
395
- blurRadius: 10,
396
- brightnessEnabled: false,
397
- brightness: 0,
398
- sepiaEnabled: false,
399
- grayscaleEnabled: false,
400
- shadowEnabled: false,
401
- shadowBlur: 5,
402
- shadowOffsetX: 0,
403
- shadowOffsetY: 0,
404
- shadowColor: 'black',
405
- shadowOpacity: 1,
406
- draggable: false,
407
- resizable: false,
408
- contentEditable: false,
409
- styleEditable: false,
410
- text: `Cont ID`,
411
- placeholder: '',
412
- fontSize: 8,
413
- fontFamily: 'Roboto',
414
- fontStyle: 'normal',
415
- fontWeight: 'normal',
416
- textDecoration: '',
417
- fill: 'black',
418
- align: 'center',
419
- verticalAlign: 'top',
420
- strokeWidth: 0,
421
- stroke: 'black',
422
- lineHeight: 1.2,
423
- letterSpacing: 0,
424
- backgroundEnabled: false,
425
- backgroundColor: '#7ED321',
426
- backgroundOpacity: 1,
427
- backgroundCornerRadius: 0.5,
428
- backgroundPadding: 0.5,
429
- }
430
- ];
431
-
432
- elements.forEach(element => page.addElement(element));
433
- store.history.clear();
434
- };
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "noImplicitAny": true,
4
- "outDir": "build/types",
5
- "module": "es2020",
6
- "target": "es5",
7
- "jsx": "react",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "allowJs": true,
11
- "sourceMap": true,
12
- "declaration": true,
13
- "emitDeclarationOnly": true,
14
- "lib": ["es2018", "dom"],
15
- "moduleResolution": "node",
16
- "skipLibCheck": true,
17
- "allowSyntheticDefaultImports": true,
18
- "forceConsistentCasingInFileNames": true,
19
- "resolveJsonModule": true,
20
- "isolatedModules": true,
21
- "noEmitOnError": false,
22
- "baseUrl" : ".",
23
- "paths": {
24
- "~/*": ["./src/*"]
25
- }
26
- },
27
- "include": ["src/*.tsx", "src/importMeta.d.ts"],
28
- "exclude": ["src/**/tests", "node_modules", "assets/**"],
29
- }
@@ -1,12 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "noImplicitAny": false,
4
- "composite": true,
5
- "skipLibCheck": true,
6
- "module": "ESNext",
7
- "moduleResolution": "bundler",
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true
10
- },
11
- "include": ["vite.config.ts"]
12
- }
package/vite.config.ts DELETED
@@ -1,8 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
-
4
- // https://vitejs.dev/config/
5
- export default defineConfig({
6
- plugins: [react()],
7
- assetsInclude: ['**/*.ttf'],
8
- });
package/webpack.config.js DELETED
@@ -1,80 +0,0 @@
1
- import webpack from 'webpack';
2
- import path from 'node:path';
3
- import TerserPlugin from 'terser-webpack-plugin';
4
-
5
- const __dirname = path.resolve();
6
-
7
- export default {
8
- mode: 'production',
9
- devtool: 'source-map',
10
- entry: './src/index.tsx',
11
- output: {
12
- filename: 'index.js',
13
- path: path.resolve(__dirname, 'build'),
14
- library: {
15
- type: 'module',
16
- },
17
- clean: true,
18
- module: true,
19
- },
20
- optimization: {
21
- minimize: true,
22
- minimizer: [new TerserPlugin({ extractComments: false })],
23
- },
24
- experiments: {
25
- outputModule: true,
26
- },
27
- module: {
28
- rules: [
29
- {
30
- test: /\.(ts|tsx)$/,
31
- exclude: /node_modules/,
32
- use: {
33
- loader: 'babel-loader',
34
- options: {
35
- presets: ['@babel/preset-env', '@babel/preset-typescript', '@babel/preset-react'],
36
- plugins: ['@babel/plugin-transform-class-properties'],
37
- },
38
- },
39
- },
40
- {
41
- test: /\.css$/,
42
- use: ['style-loader', 'css-loader'],
43
- },
44
- {
45
- test: /\.scss$/,
46
- use: ['style-loader', 'css-loader', 'sass-loader'],
47
- },
48
- {
49
- test: /\.svg$/,
50
- use: [
51
- {
52
- loader: 'svg-url-loader',
53
- options: {
54
- noquotes: true,
55
- },
56
- }
57
- ],
58
- },
59
- {
60
- test: /\.(woff|woff2|eot|ttf|otf)$/,
61
- type: "asset/inline"
62
- },
63
- {
64
- test: /\.(png|jpe?g|gif)$/i,
65
- use: ['file-loader'],
66
- },
67
- ],
68
- },
69
- resolve: {
70
- extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
71
- alias: {
72
- '~': path.resolve(__dirname, 'src'),
73
- },
74
- },
75
- plugins: [
76
- new webpack.optimize.LimitChunkCountPlugin({
77
- maxChunks: 1,
78
- }),
79
- ],
80
- };