@dr.pogodin/react-utils 1.46.1 → 1.47.0-alpha.1

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 (238) hide show
  1. package/babel.config.js +1 -0
  2. package/babel.libweb.config.js +16 -0
  3. package/bin/build.js +24 -15
  4. package/bin/setup.js +11 -8
  5. package/build/development/client/getInj.js.map +1 -1
  6. package/build/development/client/index.js.map +1 -1
  7. package/build/development/client/init.js.map +1 -1
  8. package/build/development/index.js +7 -1
  9. package/build/development/index.js.map +1 -1
  10. package/build/development/server/Cache.js.map +1 -1
  11. package/build/development/server/index.js +13 -8
  12. package/build/development/server/index.js.map +1 -1
  13. package/build/development/server/renderer.js +15 -8
  14. package/build/development/server/renderer.js.map +1 -1
  15. package/build/development/server/server.js +7 -5
  16. package/build/development/server/server.js.map +1 -1
  17. package/build/development/shared/components/Button/index.js +6 -6
  18. package/build/development/shared/components/Button/index.js.map +1 -1
  19. package/build/development/shared/components/Checkbox/index.js +8 -8
  20. package/build/development/shared/components/Checkbox/index.js.map +1 -1
  21. package/build/development/shared/components/GenericLink/index.js +5 -1
  22. package/build/development/shared/components/GenericLink/index.js.map +1 -1
  23. package/build/development/shared/components/Input/index.js +10 -9
  24. package/build/development/shared/components/Input/index.js.map +1 -1
  25. package/build/development/shared/components/Link.js.map +1 -1
  26. package/build/development/shared/components/Modal/index.js +8 -6
  27. package/build/development/shared/components/Modal/index.js.map +1 -1
  28. package/build/development/shared/components/NavLink.js.map +1 -1
  29. package/build/development/shared/components/PageLayout/index.js +6 -6
  30. package/build/development/shared/components/PageLayout/index.js.map +1 -1
  31. package/build/development/shared/components/TextArea/index.js +13 -9
  32. package/build/development/shared/components/TextArea/index.js.map +1 -1
  33. package/build/development/shared/components/Throbber/index.js +6 -6
  34. package/build/development/shared/components/Throbber/index.js.map +1 -1
  35. package/build/development/shared/components/WithTooltip/Tooltip.js +1 -0
  36. package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
  37. package/build/development/shared/components/WithTooltip/index.js +7 -7
  38. package/build/development/shared/components/WithTooltip/index.js.map +1 -1
  39. package/build/development/shared/components/YouTubeVideo/index.js +9 -9
  40. package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
  41. package/build/development/shared/components/index.js.map +1 -1
  42. package/build/development/shared/components/selectors/CustomDropdown/Options/index.js +1 -1
  43. package/build/development/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
  44. package/build/development/shared/components/selectors/CustomDropdown/index.js +11 -11
  45. package/build/development/shared/components/selectors/CustomDropdown/index.js.map +1 -1
  46. package/build/development/shared/components/selectors/NativeDropdown/index.js +12 -12
  47. package/build/development/shared/components/selectors/NativeDropdown/index.js.map +1 -1
  48. package/build/development/shared/components/selectors/Switch/index.js +7 -7
  49. package/build/development/shared/components/selectors/Switch/index.js.map +1 -1
  50. package/build/development/shared/utils/config.js.map +1 -1
  51. package/build/development/shared/utils/globalState.js.map +1 -1
  52. package/build/development/shared/utils/index.js.map +1 -1
  53. package/build/development/shared/utils/jest/E2eSsrEnv.js +14 -10
  54. package/build/development/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  55. package/build/development/shared/utils/splitComponent.js +1 -0
  56. package/build/development/shared/utils/splitComponent.js.map +1 -1
  57. package/build/development/shared/utils/time.js.map +1 -1
  58. package/build/production/client/getInj.js.map +1 -1
  59. package/build/production/client/index.js.map +1 -1
  60. package/build/production/client/init.js.map +1 -1
  61. package/build/production/index.js +4 -1
  62. package/build/production/index.js.map +1 -1
  63. package/build/production/server/Cache.js.map +1 -1
  64. package/build/production/server/index.js +5 -5
  65. package/build/production/server/index.js.map +1 -1
  66. package/build/production/server/renderer.js +7 -7
  67. package/build/production/server/renderer.js.map +1 -1
  68. package/build/production/server/server.js +4 -4
  69. package/build/production/server/server.js.map +1 -1
  70. package/build/production/shared/components/Button/index.js +1 -1
  71. package/build/production/shared/components/Button/index.js.map +1 -1
  72. package/build/production/shared/components/Checkbox/index.js +1 -1
  73. package/build/production/shared/components/Checkbox/index.js.map +1 -1
  74. package/build/production/shared/components/GenericLink/index.js +2 -2
  75. package/build/production/shared/components/GenericLink/index.js.map +1 -1
  76. package/build/production/shared/components/Input/index.js +1 -1
  77. package/build/production/shared/components/Input/index.js.map +1 -1
  78. package/build/production/shared/components/Link.js.map +1 -1
  79. package/build/production/shared/components/Modal/index.js +1 -1
  80. package/build/production/shared/components/Modal/index.js.map +1 -1
  81. package/build/production/shared/components/NavLink.js.map +1 -1
  82. package/build/production/shared/components/PageLayout/index.js +1 -1
  83. package/build/production/shared/components/PageLayout/index.js.map +1 -1
  84. package/build/production/shared/components/TextArea/index.js +1 -1
  85. package/build/production/shared/components/TextArea/index.js.map +1 -1
  86. package/build/production/shared/components/Throbber/index.js +1 -1
  87. package/build/production/shared/components/Throbber/index.js.map +1 -1
  88. package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
  89. package/build/production/shared/components/WithTooltip/index.js +1 -1
  90. package/build/production/shared/components/WithTooltip/index.js.map +1 -1
  91. package/build/production/shared/components/YouTubeVideo/index.js +1 -1
  92. package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
  93. package/build/production/shared/components/index.js.map +1 -1
  94. package/build/production/shared/components/selectors/CustomDropdown/Options/index.js +1 -1
  95. package/build/production/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
  96. package/build/production/shared/components/selectors/CustomDropdown/index.js +1 -1
  97. package/build/production/shared/components/selectors/CustomDropdown/index.js.map +1 -1
  98. package/build/production/shared/components/selectors/NativeDropdown/index.js +1 -1
  99. package/build/production/shared/components/selectors/NativeDropdown/index.js.map +1 -1
  100. package/build/production/shared/components/selectors/Switch/index.js +1 -1
  101. package/build/production/shared/components/selectors/Switch/index.js.map +1 -1
  102. package/build/production/shared/utils/config.js.map +1 -1
  103. package/build/production/shared/utils/globalState.js.map +1 -1
  104. package/build/production/shared/utils/index.js.map +1 -1
  105. package/build/production/shared/utils/jest/E2eSsrEnv.js +8 -7
  106. package/build/production/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  107. package/build/production/shared/utils/splitComponent.js.map +1 -1
  108. package/build/production/shared/utils/time.js.map +1 -1
  109. package/build/web/client/getInj.js +54 -0
  110. package/build/web/client/getInj.js.map +1 -0
  111. package/build/web/client/index.js +38 -0
  112. package/build/web/client/index.js.map +1 -0
  113. package/build/web/client/init.js +49 -0
  114. package/build/web/client/init.js.map +1 -0
  115. package/build/web/index.js +25 -0
  116. package/build/web/index.js.map +1 -0
  117. package/build/web/server/Cache.js +54 -0
  118. package/build/web/server/Cache.js.map +1 -0
  119. package/build/web/server/index.js +211 -0
  120. package/build/web/server/index.js.map +1 -0
  121. package/build/web/server/renderer.js +516 -0
  122. package/build/web/server/renderer.js.map +1 -0
  123. package/build/web/server/server.js +231 -0
  124. package/build/web/server/server.js.map +1 -0
  125. package/build/web/server/utils/errors.js +103 -0
  126. package/build/web/server/utils/errors.js.map +1 -0
  127. package/build/web/server/utils/index.js +4 -0
  128. package/build/web/server/utils/index.js.map +1 -0
  129. package/build/web/shared/components/Button/index.js +90 -0
  130. package/build/web/shared/components/Button/index.js.map +1 -0
  131. package/build/web/shared/components/Button/style.scss +54 -0
  132. package/build/web/shared/components/Checkbox/index.js +35 -0
  133. package/build/web/shared/components/Checkbox/index.js.map +1 -0
  134. package/build/web/shared/components/Checkbox/theme.scss +63 -0
  135. package/build/web/shared/components/GenericLink/index.js +107 -0
  136. package/build/web/shared/components/GenericLink/index.js.map +1 -0
  137. package/build/web/shared/components/GenericLink/style.scss +3 -0
  138. package/build/web/shared/components/Input/index.js +71 -0
  139. package/build/web/shared/components/Input/index.js.map +1 -0
  140. package/build/web/shared/components/Input/theme.scss +52 -0
  141. package/build/web/shared/components/Link.js +20 -0
  142. package/build/web/shared/components/Link.js.map +1 -0
  143. package/build/web/shared/components/Modal/base-theme.scss +38 -0
  144. package/build/web/shared/components/Modal/index.js +128 -0
  145. package/build/web/shared/components/Modal/index.js.map +1 -0
  146. package/build/web/shared/components/Modal/styles.scss +3 -0
  147. package/build/web/shared/components/NavLink.js +13 -0
  148. package/build/web/shared/components/NavLink.js.map +1 -0
  149. package/build/web/shared/components/PageLayout/base-theme.scss +30 -0
  150. package/build/web/shared/components/PageLayout/index.js +38 -0
  151. package/build/web/shared/components/PageLayout/index.js.map +1 -0
  152. package/build/web/shared/components/TextArea/index.js +106 -0
  153. package/build/web/shared/components/TextArea/index.js.map +1 -0
  154. package/build/web/shared/components/TextArea/style.scss +68 -0
  155. package/build/web/shared/components/Throbber/index.js +26 -0
  156. package/build/web/shared/components/Throbber/index.js.map +1 -0
  157. package/build/web/shared/components/Throbber/theme.scss +26 -0
  158. package/build/web/shared/components/WithTooltip/Tooltip.js +226 -0
  159. package/build/web/shared/components/WithTooltip/Tooltip.js.map +1 -0
  160. package/build/web/shared/components/WithTooltip/default-theme.scss +36 -0
  161. package/build/web/shared/components/WithTooltip/index.js +117 -0
  162. package/build/web/shared/components/WithTooltip/index.js.map +1 -0
  163. package/build/web/shared/components/YouTubeVideo/base.scss +15 -0
  164. package/build/web/shared/components/YouTubeVideo/index.js +56 -0
  165. package/build/web/shared/components/YouTubeVideo/index.js.map +1 -0
  166. package/build/web/shared/components/YouTubeVideo/throbber.scss +11 -0
  167. package/build/web/shared/components/index.js +18 -0
  168. package/build/web/shared/components/index.js.map +1 -0
  169. package/build/web/shared/components/selectors/CustomDropdown/Options/index.js +79 -0
  170. package/build/web/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -0
  171. package/build/web/shared/components/selectors/CustomDropdown/Options/style.scss +6 -0
  172. package/build/web/shared/components/selectors/CustomDropdown/index.js +120 -0
  173. package/build/web/shared/components/selectors/CustomDropdown/index.js.map +1 -0
  174. package/build/web/shared/components/selectors/CustomDropdown/theme.scss +118 -0
  175. package/build/web/shared/components/selectors/NativeDropdown/index.js +82 -0
  176. package/build/web/shared/components/selectors/NativeDropdown/index.js.map +1 -0
  177. package/build/web/shared/components/selectors/NativeDropdown/theme.scss +81 -0
  178. package/build/web/shared/components/selectors/Switch/index.js +49 -0
  179. package/build/web/shared/components/selectors/Switch/index.js.map +1 -0
  180. package/build/web/shared/components/selectors/Switch/theme.scss +39 -0
  181. package/build/web/shared/components/selectors/common.js +12 -0
  182. package/build/web/shared/components/selectors/common.js.map +1 -0
  183. package/build/web/shared/components/selectors/index.js +4 -0
  184. package/build/web/shared/components/selectors/index.js.map +1 -0
  185. package/build/web/shared/utils/config.js +21 -0
  186. package/build/web/shared/utils/config.js.map +1 -0
  187. package/build/web/shared/utils/globalState.js +15 -0
  188. package/build/web/shared/utils/globalState.js.map +1 -0
  189. package/build/web/shared/utils/index.js +13 -0
  190. package/build/web/shared/utils/index.js.map +1 -0
  191. package/build/web/shared/utils/isomorphy/buildInfo.js +44 -0
  192. package/build/web/shared/utils/isomorphy/buildInfo.js.map +1 -0
  193. package/build/web/shared/utils/isomorphy/environment-check.js +17 -0
  194. package/build/web/shared/utils/isomorphy/environment-check.js.map +1 -0
  195. package/build/web/shared/utils/isomorphy/index.js +36 -0
  196. package/build/web/shared/utils/isomorphy/index.js.map +1 -0
  197. package/build/web/shared/utils/jest/E2eSsrEnv.js +230 -0
  198. package/build/web/shared/utils/jest/E2eSsrEnv.js.map +1 -0
  199. package/build/web/shared/utils/jest/global.js +4 -0
  200. package/build/web/shared/utils/jest/global.js.map +1 -0
  201. package/build/web/shared/utils/jest/index.js +165 -0
  202. package/build/web/shared/utils/jest/index.js.map +1 -0
  203. package/build/web/shared/utils/splitComponent.js +221 -0
  204. package/build/web/shared/utils/splitComponent.js.map +1 -0
  205. package/build/web/shared/utils/time.js +85 -0
  206. package/build/web/shared/utils/time.js.map +1 -0
  207. package/build/web/shared/utils/webpack.js +61 -0
  208. package/build/web/shared/utils/webpack.js.map +1 -0
  209. package/build/web/styles/_global/reset.css +52 -0
  210. package/build/web/styles/_mixins/fonts.scss +40 -0
  211. package/build/web/styles/_mixins/media.scss +150 -0
  212. package/build/web/styles/_mixins/typography.scss +83 -0
  213. package/build/web/styles/global.scss +11 -0
  214. package/build/web/styles/mixins.scss +6 -0
  215. package/config/babel/node-ssr.js +5 -2
  216. package/config/webpack/app-base.js +10 -7
  217. package/config/webpack/app-development.js +3 -2
  218. package/package.json +29 -40
  219. package/src/index.ts +7 -1
  220. package/src/server/index.ts +6 -8
  221. package/src/server/renderer.tsx +7 -9
  222. package/src/server/server.ts +3 -5
  223. package/src/shared/components/Modal/base-theme.scss +1 -1
  224. package/src/shared/components/PageLayout/base-theme.scss +1 -1
  225. package/src/shared/utils/jest/E2eSsrEnv.ts +8 -1
  226. package/tstyche.config.json +1 -1
  227. package/build/development/__chunk_groups__.json +0 -6
  228. package/build/development/style.css +0 -909
  229. package/build/development/web.bundle.js +0 -752
  230. package/build/production/__chunk_groups__.json +0 -6
  231. package/build/production/style.css +0 -2
  232. package/build/production/style.css.map +0 -1
  233. package/build/production/web.bundle.js +0 -3
  234. package/build/production/web.bundle.js.LICENSE.txt +0 -9
  235. package/build/production/web.bundle.js.map +0 -1
  236. package/dev-styles.js +0 -1
  237. package/null.js +0 -1
  238. package/prod-styles.js +0 -1
@@ -0,0 +1,61 @@
1
+ import { IS_CLIENT_SIDE } from "./isomorphy";
2
+ /**
3
+ * Requires the specified module without including it into the bundle during
4
+ * Webpack build.
5
+ * @param modulePath
6
+ * @param [basePath]
7
+ * @return Required module.
8
+ */
9
+ export function requireWeak(modulePath,
10
+ // TODO: For now `basePath` can be provided directly as a string here,
11
+ // for backward compatibility. Deprecate it in future, if any other
12
+ // breaking changes are done for requireWeak().
13
+ basePathOrOptions) {
14
+ if (IS_CLIENT_SIDE) return null;
15
+ let basePath;
16
+ let ops;
17
+ if (typeof basePathOrOptions === 'string') {
18
+ basePath = basePathOrOptions;
19
+ } else {
20
+ ops = basePathOrOptions ?? {};
21
+ ({
22
+ basePath
23
+ } = ops);
24
+ }
25
+
26
+ // eslint-disable-next-line no-eval
27
+ const req = eval('require');
28
+
29
+ // eslint-disable-next-line @typescript-eslint/unbound-method
30
+ const {
31
+ resolve
32
+ } = req('path');
33
+ const path = basePath ? resolve(basePath, modulePath) : modulePath;
34
+ const module = req(path);
35
+ if (!('default' in module) || !module.default) return module;
36
+ const {
37
+ default: def,
38
+ ...named
39
+ } = module;
40
+ const res = def;
41
+ Object.entries(named).forEach(([name, value]) => {
42
+ const assigned = res[name];
43
+ if (assigned) res[name] = value;else if (assigned !== value) {
44
+ throw Error('Conflict between default and named exports');
45
+ }
46
+ });
47
+ return res;
48
+ }
49
+
50
+ /**
51
+ * Resolves specified module path with help of Babel's module resolver.
52
+ * Yes, the function itself just returns its argument to the caller, but Babel
53
+ * is configured to resolve the first argument of resolveWeak(..) function, thus
54
+ * the result will be the resolved path.
55
+ * @param {string} modulePath
56
+ * @return {string} Absolute or relative path to the module.
57
+ */
58
+ export function resolveWeak(modulePath) {
59
+ return modulePath;
60
+ }
61
+ //# sourceMappingURL=webpack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.js","names":["IS_CLIENT_SIDE","requireWeak","modulePath","basePathOrOptions","basePath","ops","req","eval","resolve","path","module","default","def","named","res","Object","entries","forEach","name","value","assigned","Error","resolveWeak"],"sources":["../../../../src/shared/utils/webpack.ts"],"sourcesContent":["import type PathNS from 'node:path';\n\nimport { IS_CLIENT_SIDE } from './isomorphy';\n\ntype RequireWeakOptionsT = {\n basePath?: string;\n};\n\ntype RequireWeakResT<T> = T extends { default: infer D }\n ? (D extends null | undefined ? T : D & Omit<T, 'default'>)\n : T;\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param modulePath\n * @param [basePath]\n * @return Required module.\n */\nexport function requireWeak<T extends object>(\n modulePath: string,\n\n // TODO: For now `basePath` can be provided directly as a string here,\n // for backward compatibility. Deprecate it in future, if any other\n // breaking changes are done for requireWeak().\n basePathOrOptions?: string | RequireWeakOptionsT,\n): RequireWeakResT<T> | null {\n if (IS_CLIENT_SIDE) return null;\n\n let basePath: string | undefined;\n let ops: RequireWeakOptionsT;\n if (typeof basePathOrOptions === 'string') {\n basePath = basePathOrOptions;\n } else {\n ops = basePathOrOptions ?? {};\n ({ basePath } = ops);\n }\n\n // eslint-disable-next-line no-eval\n const req = eval('require') as (path: string) => unknown;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { resolve } = req('path') as typeof PathNS;\n\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const module = req(path) as T;\n\n if (!('default' in module) || !module.default) return module as RequireWeakResT<T>;\n\n const { default: def, ...named } = module;\n\n const res = def as RequireWeakResT<T>;\n\n Object.entries(named).forEach(([name, value]) => {\n const assigned = res[name as keyof RequireWeakResT<T>];\n if (assigned) (res[name as keyof RequireWeakResT<T>] as unknown) = value;\n else if (assigned !== value) {\n throw Error('Conflict between default and named exports');\n }\n });\n return res;\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath: string): string {\n return modulePath;\n}\n"],"mappings":"AAEA,SAASA,cAAc;AAUvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CACzBC,UAAkB;AAElB;AACA;AACA;AACAC,iBAAgD,EACrB;EAC3B,IAAIH,cAAc,EAAE,OAAO,IAAI;EAE/B,IAAII,QAA4B;EAChC,IAAIC,GAAwB;EAC5B,IAAI,OAAOF,iBAAiB,KAAK,QAAQ,EAAE;IACzCC,QAAQ,GAAGD,iBAAiB;EAC9B,CAAC,MAAM;IACLE,GAAG,GAAGF,iBAAiB,IAAI,CAAC,CAAC;IAC7B,CAAC;MAAEC;IAAS,CAAC,GAAGC,GAAG;EACrB;;EAEA;EACA,MAAMC,GAAG,GAAGC,IAAI,CAAC,SAAS,CAA8B;;EAExD;EACA,MAAM;IAAEC;EAAQ,CAAC,GAAGF,GAAG,CAAC,MAAM,CAAkB;EAEhD,MAAMG,IAAI,GAAGL,QAAQ,GAAGI,OAAO,CAACJ,QAAQ,EAAEF,UAAU,CAAC,GAAGA,UAAU;EAClE,MAAMQ,MAAM,GAAGJ,GAAG,CAACG,IAAI,CAAM;EAE7B,IAAI,EAAE,SAAS,IAAIC,MAAM,CAAC,IAAI,CAACA,MAAM,CAACC,OAAO,EAAE,OAAOD,MAAM;EAE5D,MAAM;IAAEC,OAAO,EAAEC,GAAG;IAAE,GAAGC;EAAM,CAAC,GAAGH,MAAM;EAEzC,MAAMI,GAAG,GAAGF,GAAyB;EAErCG,MAAM,CAACC,OAAO,CAACH,KAAK,CAAC,CAACI,OAAO,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAK;IAC/C,MAAMC,QAAQ,GAAGN,GAAG,CAACI,IAAI,CAA6B;IACtD,IAAIE,QAAQ,EAAGN,GAAG,CAACI,IAAI,CAA6B,GAAeC,KAAK,CAAC,KACpE,IAAIC,QAAQ,KAAKD,KAAK,EAAE;MAC3B,MAAME,KAAK,CAAC,4CAA4C,CAAC;IAC3D;EACF,CAAC,CAAC;EACF,OAAOP,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,WAAWA,CAACpB,UAAkB,EAAU;EACtD,OAAOA,UAAU;AACnB","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ /* Eric Meyer's "Reset CSS" 2.0 */
2
+
3
+ /* http://meyerweb.com/eric/tools/css/reset/
4
+ v2.0 | 20110126
5
+ License: none (public domain)
6
+ */
7
+
8
+ /* Having all selectors at individual lines is unreadable in the case of this
9
+ * style reset sheet. */
10
+ /* stylelint-disable selector-list-comma-newline-after */
11
+ a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote,
12
+ body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt,
13
+ em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6,
14
+ header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu,
15
+ nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span,
16
+ strike, strong,sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr,
17
+ tt, u, ul, var, video {
18
+ margin: 0;
19
+ padding: 0;
20
+ border: 0;
21
+ font: inherit;
22
+ font-size: 100%;
23
+ vertical-align: baseline;
24
+ }
25
+
26
+ /* HTML5 display-role reset for older browsers */
27
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
28
+ section {
29
+ display: block;
30
+ }
31
+
32
+ body {
33
+ line-height: 1;
34
+ }
35
+
36
+ ol, ul {
37
+ list-style: none;
38
+ }
39
+
40
+ blockquote, q {
41
+ quotes: none;
42
+ }
43
+
44
+ blockquote::before, blockquote::after, q::before, q::after {
45
+ content: "";
46
+ content: none;
47
+ }
48
+
49
+ table {
50
+ border-collapse: collapse;
51
+ border-spacing: 0;
52
+ }
@@ -0,0 +1,40 @@
1
+ /* Auxiliary mixins for fonts inclusion. */
2
+
3
+ /**
4
+ * Includes a font, provided as a set of alternative files in EOT, WOFF, TTF,
5
+ * SVG formats into the app.
6
+ * $font-name {String}
7
+ * $font-weight {Number}
8
+ * $font-style {String}
9
+ * $font-url {String} Path to the font file, without the filename itself.
10
+ * $font-file {String} Font filename, without extension (should be the same for
11
+ * each version of the font in different formats.
12
+ */
13
+ @mixin font-family($font-name, $font-weight, $font-style, $font-url, $font-file) {
14
+ @font-face {
15
+ font-family: "#{$font-name}";
16
+ font-display: block;
17
+ font-weight: $font-weight;
18
+ font-style: $font-style;
19
+ src: url("#{$font-url}#{$font-file}.eot");
20
+ src: url("#{$font-url}#{$font-file}.eot?#iefix") format("embedded-opentype"), url("#{$font-url}#{$font-file}.woff") format("woff"), url("#{$font-url}#{$font-file}.ttf") format("truetype");
21
+ }
22
+ }
23
+
24
+ /**
25
+ * Includes a font, provided in the TTF format only.
26
+ * $font-name {String}
27
+ * $font-weight {Number}
28
+ * $font-style {String}
29
+ * $font-url {String}
30
+ */
31
+ @mixin font-family-ttf(
32
+ $font-name, $font-weight, $font-style, $font-url) {
33
+ @font-face {
34
+ font-family: $font-name;
35
+ font-display: block;
36
+ font-style: $font-style;
37
+ font-weight: $font-weight;
38
+ src: url("#{$font-url}.ttf") format("truetype");
39
+ }
40
+ }
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Mixins for different layout sizes: xs, sm, md, lg.
3
+ * Breaking points are defined in _variables.scss
4
+ * The range mixins A-to-B all means "for the sizes from A to B, both
5
+ * inclusive", in particular it means that mixin A-to-lg is equivalent to
6
+ * all sizes from A (inclusive) and larger.
7
+ *
8
+ * NOTE: For convenience, these mixins are sorted not alphabetically, but,
9
+ * first, by increase of the first size; second, by increase of the second size.
10
+ */
11
+
12
+ /* Break points. */
13
+
14
+ $screen-xs: 320px !default;
15
+ $screen-sm: 495px !default;
16
+ $screen-mm: 768px !default;
17
+ $screen-md: 1024px !default;
18
+ $screen-lg: 1280px !default;
19
+
20
+ /* XS */
21
+
22
+ @mixin xs {
23
+ @media (max-width: #{$screen-xs}) {
24
+ @content;
25
+ }
26
+ }
27
+
28
+ @mixin xs-to-sm {
29
+ @media (max-width: #{$screen-sm}) {
30
+ @content;
31
+ }
32
+ }
33
+
34
+ @mixin xs-to-mm {
35
+ @media (max-width: #{$screen-mm}) {
36
+ @content;
37
+ }
38
+ }
39
+
40
+ @mixin xs-to-md {
41
+ @media (max-width: #{$screen-md}) {
42
+ @content;
43
+ }
44
+ }
45
+
46
+ @mixin xs-to-lg {
47
+ @media (max-width: #{$screen-lg}) {
48
+ @content;
49
+ }
50
+ }
51
+
52
+ /* SM */
53
+
54
+ @mixin sm {
55
+ @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-sm}) {
56
+ @content;
57
+ }
58
+ }
59
+
60
+ @mixin sm-to-mm {
61
+ @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-mm}) {
62
+ @content;
63
+ }
64
+ }
65
+
66
+ @mixin sm-to-md {
67
+ @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-md}) {
68
+ @content;
69
+ }
70
+ }
71
+
72
+ @mixin sm-to-lg {
73
+ @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-lg}) {
74
+ @content;
75
+ }
76
+ }
77
+
78
+ @mixin sm-to-xl {
79
+ @media (min-width: #{$screen-xs + 1px}) {
80
+ @content;
81
+ }
82
+ }
83
+
84
+ /* MM */
85
+
86
+ @mixin mm {
87
+ @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-mm}) {
88
+ @content;
89
+ }
90
+ }
91
+
92
+ @mixin mm-to-md {
93
+ @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-md}) {
94
+ @content;
95
+ }
96
+ }
97
+
98
+ @mixin mm-to-lg {
99
+ @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-lg}) {
100
+ @content;
101
+ }
102
+ }
103
+
104
+ @mixin mm-to-xl {
105
+ @media (min-width: #{$screen-sm + 1px}) {
106
+ @content;
107
+ }
108
+ }
109
+
110
+ /* MD */
111
+
112
+ @mixin md {
113
+ @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-md}) {
114
+ @content;
115
+ }
116
+ }
117
+
118
+ @mixin md-to-lg {
119
+ @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-lg}) {
120
+ @content;
121
+ }
122
+ }
123
+
124
+ @mixin md-to-xl {
125
+ @media (min-width: #{$screen-mm + 1px}) {
126
+ @content;
127
+ }
128
+ }
129
+
130
+ /* LG */
131
+
132
+ @mixin lg {
133
+ @media (min-width: #{$screen-md + 1px}) and (max-width: #{$screen-lg}) {
134
+ @content;
135
+ }
136
+ }
137
+
138
+ @mixin lg-to-xl {
139
+ @media (min-width: #{$screen-md + 1px}) {
140
+ @content;
141
+ }
142
+ }
143
+
144
+ /* XL */
145
+
146
+ @mixin xl {
147
+ @media (min-width: #{$screen-lg + 1px}) {
148
+ @content;
149
+ }
150
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * A simple drop-in typography mixin.
3
+ */
4
+
5
+ @mixin typography {
6
+ font: 14pt/1.5 Arial, Helvetica, sans-serif;
7
+
8
+ code {
9
+ font-family: monospace;
10
+ font-size: 0.9em;
11
+ }
12
+
13
+ em { font-style: italic; }
14
+
15
+ h1 {
16
+ font-size: 2.4em;
17
+ margin-top: 0.6em;
18
+ }
19
+
20
+ h2 {
21
+ font-size: 2.1em;
22
+ margin-top: 0.6em;
23
+ }
24
+
25
+ h3 {
26
+ font-size: 1.8em;
27
+ margin-top: 0.6em;
28
+ }
29
+
30
+ h4 {
31
+ font-size: 1.6em;
32
+ margin-top: 0.6em;
33
+ }
34
+
35
+ h5 {
36
+ font-size: 1.4em;
37
+ margin-top: 0.6em;
38
+ }
39
+
40
+ h6 {
41
+ font-size: 1.2em;
42
+ margin-top: 0.6em;
43
+ }
44
+
45
+ strong { font-weight: bold; }
46
+ sub { bottom: -0.25em; }
47
+ sup { top: -0.5em; }
48
+
49
+ ol {
50
+ list-style-type: decimal;
51
+ padding-left: 1.2em;
52
+ }
53
+
54
+ ul {
55
+ list-style-type: disc;
56
+ padding-left: 1.2em;
57
+ }
58
+
59
+ li,
60
+ ol,
61
+ p,
62
+ pre,
63
+ ul {
64
+ margin: 0.3em 0;
65
+ }
66
+
67
+ pre {
68
+ background: whitesmoke;
69
+ font-family: monospace;
70
+ font-size: 0.9em;
71
+ overflow: auto;
72
+ padding: 0.3em 0.6em;
73
+ white-space: pre-wrap;
74
+ }
75
+
76
+ sub,
77
+ sup {
78
+ font-size: 0.75em;
79
+ line-height: 0;
80
+ position: relative;
81
+ vertical-align: baseline;
82
+ }
83
+ }
@@ -0,0 +1,11 @@
1
+ /* Global styles. */
2
+
3
+ @use "_global/reset";
4
+
5
+ body {
6
+ text-rendering: auto;
7
+ }
8
+
9
+ * {
10
+ box-sizing: border-box;
11
+ }
@@ -0,0 +1,6 @@
1
+ /* Collection of standard mixins, being used all around. */
2
+ @forward "_mixins/fonts";
3
+ @forward "_mixins/media";
4
+ @forward "_mixins/typography";
5
+
6
+ $zIndexOfDefaultModalOverlay: 998;
@@ -32,9 +32,12 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
35
38
  Object.defineProperty(exports, "__esModule", { value: true });
36
39
  exports.default = getConfig;
37
- const lodash_1 = require("lodash");
40
+ const pull_1 = __importDefault(require("lodash/pull"));
38
41
  const webpack_1 = __importStar(require("./webpack"));
39
42
  /**
40
43
  * Creates a new base config.
@@ -62,7 +65,7 @@ function newBase(babel, options = {}) {
62
65
  'webpack.resolveWeak',
63
66
  ];
64
67
  if (babel.env() === webpack_1.ENVIRONMENTS.DEV) {
65
- (0, lodash_1.pull)(config.plugins, 'react-refresh/babel');
68
+ (0, pull_1.default)(config.plugins, 'react-refresh/babel');
66
69
  }
67
70
  return config;
68
71
  }
@@ -8,7 +8,10 @@ exports.default = configFactory;
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
10
  const sitemap_1 = __importDefault(require("sitemap"));
11
- const lodash_1 = require("lodash");
11
+ const clone_1 = __importDefault(require("lodash/clone"));
12
+ const defaults_1 = __importDefault(require("lodash/defaults"));
13
+ const isFunction_1 = __importDefault(require("lodash/isFunction"));
14
+ const isObject_1 = __importDefault(require("lodash/isObject"));
12
15
  const autoprefixer_1 = __importDefault(require("autoprefixer"));
13
16
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
14
17
  const node_forge_1 = __importDefault(require("node-forge"));
@@ -125,8 +128,8 @@ const utils_1 = require("@dr.pogodin/babel-plugin-react-css-modules/utils");
125
128
  * - **`timestamp`** &mdash; The value set for `BUILD_TIMESTAMP`.
126
129
  */
127
130
  function configFactory(ops) {
128
- var _a, _b, _c;
129
- const o = (0, lodash_1.defaults)((0, lodash_1.clone)(ops), {
131
+ var _a, _b;
132
+ const o = (0, defaults_1.default)((0, clone_1.default)(ops), {
130
133
  babelLoaderOptions: {},
131
134
  cssLocalIdent: '[hash:base64:6]',
132
135
  outputPath: 'build/web-public',
@@ -141,7 +144,7 @@ function configFactory(ops) {
141
144
  const sitemapUrl = node_path_1.default.resolve(o.context, o.sitemap);
142
145
  // eslint-disable-next-line import/no-dynamic-require, @typescript-eslint/no-require-imports
143
146
  let source = require(sitemapUrl);
144
- if ((0, lodash_1.isFunction)(source))
147
+ if ((0, isFunction_1.default)(source))
145
148
  source = source();
146
149
  const sm = new sitemap_1.default.SitemapStream();
147
150
  source.forEach((item) => sm.write(item));
@@ -207,7 +210,7 @@ function configFactory(ops) {
207
210
  plugins.push(new webpack_1.ProgressPlugin());
208
211
  /* Adds InjectManifest plugin from WorkBox, if opted to. */
209
212
  if (o.workbox) {
210
- if (!(0, lodash_1.isObject)(o.workbox))
213
+ if (!(0, isObject_1.default)(o.workbox))
211
214
  o.workbox = {};
212
215
  plugins.push(new workbox_webpack_plugin_1.default.InjectManifest(Object.assign(Object.assign({ swSrc: node_path_1.default.resolve(__dirname, '../workbox/default.js') }, o.workbox), { swDest: '__service-worker.js' })));
213
216
  }
@@ -232,7 +235,7 @@ function configFactory(ops) {
232
235
  // Loads JS modules (.cjs, .js, .jsx, .mjs); TS modules (.ts, .tsx);
233
236
  // and SVG assets (.svg).
234
237
  test: /\.(cjs|js|jsx|mjs|svg|ts|tsx)$/,
235
- exclude: (_b = ops.babelLoaderExclude) !== null && _b !== void 0 ? _b : [/node_modules/],
238
+ exclude: ops.babelLoaderExclude,
236
239
  loader: 'babel-loader',
237
240
  options: Object.assign({ babelrc: false, configFile: false, envName: o.babelEnv, presets: [['@dr.pogodin/react-utils/config/babel/webpack', {
238
241
  typescript: ops.typescript,
@@ -338,7 +341,7 @@ function configFactory(ops) {
338
341
  // @babel/runtime/helpers/esm/interopRequireDefault, which has
339
342
  // the hepler function attached to "default" export).
340
343
  if (process.env.NODE_ENV !== 'test') {
341
- const aliases = (_c = res.resolve) === null || _c === void 0 ? void 0 : _c.alias;
344
+ const aliases = (_b = res.resolve) === null || _b === void 0 ? void 0 : _b.alias;
342
345
  aliases['@babel/runtime/helpers/defineProperty']
343
346
  = node_path_1.default.resolve(o.context, 'node_modules/@babel/runtime/helpers/defineProperty');
344
347
  aliases['@babel/runtime/helpers/interopRequireDefault']
@@ -5,7 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.default = configFactory;
8
- const lodash_1 = require("lodash");
8
+ const clone_1 = __importDefault(require("lodash/clone"));
9
+ const defaults_1 = __importDefault(require("lodash/defaults"));
9
10
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
10
11
  const react_refresh_webpack_plugin_1 = __importDefault(require("@pmmmwh/react-refresh-webpack-plugin"));
11
12
  const webpack_1 = __importDefault(require("webpack"));
@@ -17,7 +18,7 @@ const app_base_1 = __importDefault(require("./app-base"));
17
18
  * @param [ops.dontUseHmr]
18
19
  */
19
20
  function configFactory(ops) {
20
- const o = (0, lodash_1.defaults)((0, lodash_1.clone)(ops), {
21
+ const o = (0, defaults_1.default)((0, clone_1.default)(ops), {
21
22
  cssLocalIdent: '[package]___[path][name]___[local]___[hash:base64:6]',
22
23
  });
23
24
  const entry = ['@dr.pogodin/react-utils/build/development/client/init'];