xenopomp-essentials 0.3.0 → 0.3.2

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 (142) hide show
  1. package/.config/.lintstagedrc.json +3 -0
  2. package/.config/build.config.ts +41 -0
  3. package/.config/testing-exclusions/index.ts +2 -0
  4. package/.config/testing-exclusions/istanbul-exclusions.ts +1 -0
  5. package/.config/testing-exclusions/vitest-exclusions.ts +8 -0
  6. package/.config/ts/tsconfig.lint.json +10 -0
  7. package/.config/vitest.config.ts +18 -0
  8. package/.gitattributes +25 -0
  9. package/.github/workflows/ci.yml +54 -0
  10. package/.github/workflows/npm-publish.yml +27 -0
  11. package/.husky/pre-commit +1 -0
  12. package/.idea/codeStyles/Project.xml +59 -0
  13. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  14. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  15. package/.idea/modules.xml +8 -0
  16. package/.idea/prettier.xml +7 -0
  17. package/.idea/runConfigurations/_template__of_Vitest.xml +9 -0
  18. package/.idea/runConfigurations/build.xml +13 -0
  19. package/.idea/runConfigurations/coverage.xml +12 -0
  20. package/.idea/runConfigurations/lint.xml +13 -0
  21. package/.idea/runConfigurations/lint_code.xml +13 -0
  22. package/.idea/vcs.xml +6 -0
  23. package/.idea/xenopomp-essentials-js.iml +14 -0
  24. package/.prettierrc +20 -0
  25. package/README.md +0 -0
  26. package/__tests__/assets/assertions/expect-deep-equal.ts +14 -0
  27. package/__tests__/assets/assertions/expect-to-render.ts +26 -0
  28. package/__tests__/assets/assertions/index.ts +3 -0
  29. package/__tests__/assets/assertions/not-throwing.ts +6 -0
  30. package/__tests__/assets/index.ts +1 -0
  31. package/__tests__/data/index.ts +1 -0
  32. package/__tests__/data/parseVersion.data.ts +52 -0
  33. package/__tests__/unit/cli/path-builder.test.ts +39 -0
  34. package/__tests__/unit/components/hoc/jsx-dot-notation/component.test-source.tsx +24 -0
  35. package/__tests__/unit/components/hoc/jsx-dot-notation/hoc.test.tsx +11 -0
  36. package/__tests__/unit/components/metrika.test.tsx +14 -0
  37. package/__tests__/unit/components/react-scan.test.tsx +10 -0
  38. package/__tests__/unit/eslint/config.test.tsx +41 -0
  39. package/__tests__/unit/utils/capitalize.test.ts +17 -0
  40. package/__tests__/unit/utils/minmax.test.ts +21 -0
  41. package/__tests__/unit/utils/parseVersion.test.ts +22 -0
  42. package/__tests__/unit/utils/pipe.test.ts +23 -0
  43. package/__tests__/unit/utils/transliterate.test.ts +17 -0
  44. package/_templates/generator/help/index.ejs.t +5 -0
  45. package/_templates/generator/new/hello.ejs.t +18 -0
  46. package/_templates/generator/with-prompt/hello.ejs.t +18 -0
  47. package/_templates/generator/with-prompt/prompt.ejs.t +14 -0
  48. package/_templates/init/repo/new-repo.ejs.t +4 -0
  49. package/_templates/type/new/module.ejs.t +7 -0
  50. package/_templates/type/new/type.ejs.t +7 -0
  51. package/_templates/util/new/func.ejs.t +7 -0
  52. package/_templates/util/new/module.ejs.t +7 -0
  53. package/_templates/util/new/test.ejs.t +13 -0
  54. package/eslint.config.ts +17 -0
  55. package/package.json +7 -6
  56. package/src/cli-tools/changeFile.ts +1 -0
  57. package/src/cli-tools/index.ts +2 -0
  58. package/src/cli-tools/pathBuilder.ts +89 -0
  59. package/src/eslint/config.ts +145 -0
  60. package/src/eslint/configs/all.ts +74 -0
  61. package/src/eslint/configs/deprecation.ts +33 -0
  62. package/src/eslint/configs/index.ts +7 -0
  63. package/src/eslint/configs/markdown.ts +30 -0
  64. package/src/eslint/configs/next.ts +40 -0
  65. package/src/eslint/configs/old.ts +67 -0
  66. package/src/eslint/configs/prettier.ts +6 -0
  67. package/src/eslint/configs/react.ts +18 -0
  68. package/src/eslint/index.ts +7 -0
  69. package/src/eslint/prefixes/author.ts +2 -0
  70. package/src/eslint/prefixes/index.ts +1 -0
  71. package/src/eslint/types/configs.ts +4 -0
  72. package/src/eslint/types/custom-config.ts +4 -0
  73. package/src/eslint/types/index.ts +2 -0
  74. package/src/index.ts +3 -0
  75. package/src/next/Metrika/Metrika.props.ts +11 -0
  76. package/src/next/Metrika/Metrika.tsx +56 -0
  77. package/src/next/ReactScan/ReactScan.tsx +33 -0
  78. package/src/next/index.ts +2 -0
  79. package/src/react/hoc/index.ts +1 -0
  80. package/src/react/hoc/jsxDotNotation.tsx +38 -0
  81. package/src/react/index.ts +1 -0
  82. package/src/repo-eslint-rules/deep-type-naming.rule.ts +49 -0
  83. package/src/repo-eslint-rules/index.ts +9 -0
  84. package/src/schemas/import-meta.schema.ts +12 -0
  85. package/src/schemas/index.ts +1 -0
  86. package/src/types/aliases/AnyObject.ts +5 -0
  87. package/src/types/aliases/EmptyObject.ts +8 -0
  88. package/src/types/aliases/Fn.ts +12 -0
  89. package/src/types/aliases/index.ts +3 -0
  90. package/src/types/index.ts +4 -0
  91. package/src/types/next/NextParams.ts +26 -0
  92. package/src/types/next/index.ts +1 -0
  93. package/src/types/react/AnyFc.ts +6 -0
  94. package/src/types/react/AsyncFC.ts +16 -0
  95. package/src/types/react/DataAttributes.ts +21 -0
  96. package/src/types/react/FCProps.ts +19 -0
  97. package/src/types/react/FunctionalChildren.ts +13 -0
  98. package/src/types/react/SetState.ts +11 -0
  99. package/src/types/react/VariableFC.ts +48 -0
  100. package/src/types/react/VariableProps.ts +9 -0
  101. package/src/types/react/index.ts +8 -0
  102. package/src/types/utilities/ArrayType.ts +12 -0
  103. package/src/types/utilities/AsyncReturnType.ts +14 -0
  104. package/src/types/utilities/DeepInject.ts +22 -0
  105. package/src/types/utilities/Defined.ts +5 -0
  106. package/src/types/utilities/Jsonish.ts +11 -0
  107. package/src/types/utilities/LenientAutocomplete.ts +24 -0
  108. package/src/types/utilities/MatchType.ts +26 -0
  109. package/src/types/utilities/MergeTypes.ts +12 -0
  110. package/src/types/utilities/Modify.ts +10 -0
  111. package/src/types/utilities/Nullable.ts +5 -0
  112. package/src/types/utilities/OneOf.ts +42 -0
  113. package/src/types/utilities/Prettify.ts +15 -0
  114. package/src/types/utilities/RecordKey.ts +9 -0
  115. package/src/types/utilities/RecordValue.ts +9 -0
  116. package/src/types/utilities/ReplaceReturnType.ts +10 -0
  117. package/src/types/utilities/SelectivePartial.ts +17 -0
  118. package/src/types/utilities/StrictOmit.ts +19 -0
  119. package/src/types/utilities/Synchronous.ts +18 -0
  120. package/src/types/utilities/Undefinable.ts +5 -0
  121. package/src/types/utilities/WeakOmit.ts +17 -0
  122. package/src/types/utilities/Writeable.ts +18 -0
  123. package/src/types/utilities/index.ts +24 -0
  124. package/src/utils/capitalize.ts +15 -0
  125. package/src/utils/index.ts +7 -0
  126. package/src/utils/minmax.ts +35 -0
  127. package/src/utils/parseVersion.ts +42 -0
  128. package/src/utils/pipe.ts +29 -0
  129. package/src/utils/transliterate.ts +8 -0
  130. package/tsconfig.json +43 -0
  131. package/cli-tools/index.d.mts +0 -60
  132. package/cli-tools/index.d.ts +0 -60
  133. package/cli-tools/index.mjs +0 -1
  134. package/eslint/index.d.mts +0 -39
  135. package/eslint/index.d.ts +0 -39
  136. package/eslint/index.mjs +0 -3
  137. package/index.d.mts +0 -611
  138. package/index.d.ts +0 -611
  139. package/index.mjs +0 -1
  140. package/next/index.d.mts +0 -67
  141. package/next/index.d.ts +0 -67
  142. package/next/index.mjs +0 -11
package/next/index.d.ts DELETED
@@ -1,67 +0,0 @@
1
- import { FC } from 'react';
2
-
3
- /**
4
- * Adds react-scan to your Next.js application.
5
- * @constructor
6
- * @since 0.0.1
7
- *
8
- * @example
9
- * import { ReactScan } from 'xenopomp-essentials/next';
10
- *
11
- * export default function RootLayout({
12
- * children,
13
- * }: {
14
- * children: React.ReactNode
15
- * }) {
16
- * return (
17
- * <html lang="en">
18
- * <head>
19
- * <ReactScan />
20
- * </head>
21
- * <body>{children}</body>
22
- * </html>
23
- * )
24
- *}
25
- */
26
- declare const ReactScan: FC<unknown>;
27
-
28
- interface MetrikaProps {
29
- /**
30
- * ID of your Yandex.Metrika`s counter.
31
- * Locate at dashboard.
32
- */
33
- id: number;
34
- clickMap?: boolean;
35
- trackLinks?: boolean;
36
- accurateTrackBounce?: boolean;
37
- }
38
-
39
- /**
40
- * This component allows you to use Yandex.Metrika
41
- * in your Next.js projects.
42
- *
43
- * @since 0.0.1
44
- *
45
- * @example
46
- * import { Metrika } from 'xenopomp-essentials/next';
47
- *
48
- * export default function RootLayout({
49
- * children,
50
- * }: {
51
- * children: React.ReactNode
52
- * }) {
53
- * return (
54
- * <html lang="en">
55
- * <head>
56
- * <Metrika id={123456789} />
57
- * </head>
58
- * <body>{children}</body>
59
- * </html>
60
- * )
61
- * }
62
- *
63
- * @see https://metrika.yandex.ru
64
- */
65
- declare const Metrika: FC<MetrikaProps>;
66
-
67
- export { Metrika, ReactScan };
package/next/index.mjs DELETED
@@ -1,11 +0,0 @@
1
- import r from"next/script";const n=()=>React.createElement("script",{src:"https://unpkg.com/react-scan/dist/auto.global.js",async:!0}),i=({id:t,clickMap:e=!0,trackLinks:a=!0,accurateTrackBounce:c=!0})=>React.createElement(r,{id:"metrika-counter",strategy:"afterInteractive"},` (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
2
- m[i].l=1*new Date();
3
- for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
4
- k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
5
- (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
6
-
7
- ym(${t}, "init", {
8
- clickmap:${e},
9
- trackLinks:${a},
10
- accurateTrackBounce:${c}
11
- });`);export{i as Metrika,n as ReactScan};