@itcase/storybook-config 1.2.78 → 1.2.80

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 (116) hide show
  1. package/dist/cjs/components/EmailTemplatePreview.js +1 -1
  2. package/dist/cjs/decorators/withFormSubmitDecorator.js +0 -1
  3. package/dist/cjs/decorators/withNextDecorator.js +1 -1
  4. package/dist/cjs/decorators/withUiDecorator.js +1 -1
  5. package/dist/cjs/decorators.js +1 -2
  6. package/dist/components/EmailTemplatePreview/index.d.ts +2 -0
  7. package/dist/components/EmailTemplatePreview/index.js +38 -0
  8. package/dist/components/EmailTemplatePreview.js +1 -1
  9. package/dist/components/FormSubmitWrapper/FormSubmitWrapper.d.ts +14 -0
  10. package/dist/components/FormSubmitWrapper/FormSubmitWrapper.js +84 -0
  11. package/dist/components/FormSubmitWrapper/autoSubmitForm.d.ts +2 -0
  12. package/dist/components/FormSubmitWrapper/autoSubmitForm.js +106 -0
  13. package/dist/components/FormSubmitWrapper/index.d.ts +2 -0
  14. package/dist/components/FormSubmitWrapper/index.js +2 -0
  15. package/dist/config/addons/addonThemes.d.ts +15 -0
  16. package/dist/config/addons/addonThemes.js +14 -15
  17. package/dist/config/addons/addonsNextJs.d.ts +2 -0
  18. package/dist/config/addons/addonsNextJs.js +8 -9
  19. package/dist/config/addons/addonsReactNative.d.ts +2 -0
  20. package/dist/config/addons/addonsReactNative.js +6 -7
  21. package/dist/config/addons/addonsReactNativeWeb.d.ts +2 -0
  22. package/dist/config/addons/addonsReactNativeWeb.js +2 -3
  23. package/dist/config/addons/addonsVite.d.ts +2 -0
  24. package/dist/config/addons/addonsVite.js +8 -9
  25. package/dist/config/addons/addonsWebpack.d.ts +18 -0
  26. package/dist/config/addons/addonsWebpack.js +26 -27
  27. package/dist/config/appearance/appearance.d.ts +1 -0
  28. package/dist/config/appearance/appearance.js +1 -1
  29. package/dist/config/backgrounds/backgrounds.d.ts +23 -0
  30. package/dist/config/backgrounds/backgrounds.js +22 -24
  31. package/dist/config/code/code.d.ts +8 -0
  32. package/dist/config/code/code.js +18 -22
  33. package/dist/config/config/mainConfigNextJsVite.d.ts +10 -0
  34. package/dist/config/config/mainConfigNextJsVite.js +35 -38
  35. package/dist/config/config/mainConfigReactNative.d.ts +9 -0
  36. package/dist/config/config/mainConfigReactNative.js +21 -23
  37. package/dist/config/config/mainConfigReactNativeWeb.d.ts +23 -0
  38. package/dist/config/config/mainConfigReactNativeWeb.js +42 -46
  39. package/dist/config/config/mainConfigVite.d.ts +9 -0
  40. package/dist/config/config/mainConfigVite.js +75 -80
  41. package/dist/config/config/mainConfigWebpack.d.ts +9 -0
  42. package/dist/config/config/mainConfigWebpack.js +39 -64
  43. package/dist/config/framework/frameworkNextJs.d.ts +4 -0
  44. package/dist/config/framework/frameworkNextJs.js +3 -4
  45. package/dist/config/framework/frameworkNextJsVite.d.ts +4 -0
  46. package/dist/config/framework/frameworkNextJsVite.js +3 -4
  47. package/dist/config/framework/frameworkReactNative.d.ts +4 -0
  48. package/dist/config/framework/frameworkReactNative.js +3 -4
  49. package/dist/config/framework/frameworkReactNativeWeb.d.ts +4 -0
  50. package/dist/config/framework/frameworkReactNativeWeb.js +3 -4
  51. package/dist/config/framework/frameworkVite.d.ts +4 -0
  52. package/dist/config/framework/frameworkVite.js +3 -4
  53. package/dist/config/framework/frameworkWebpack.d.ts +11 -0
  54. package/dist/config/framework/frameworkWebpack.js +9 -10
  55. package/dist/config/main/index.d.ts +26 -0
  56. package/dist/config/main/index.js +26 -53
  57. package/dist/config/msw/index.d.ts +2 -0
  58. package/dist/config/msw/index.js +2 -7
  59. package/dist/config/msw/mswHandlers.d.ts +5 -0
  60. package/dist/config/msw/mswHandlers.js +20 -24
  61. package/dist/config/ondevice/ondeviceBackgrounds.d.ts +8 -0
  62. package/dist/config/ondevice/ondeviceBackgrounds.js +8 -9
  63. package/dist/config/preview/index.d.ts +6 -0
  64. package/dist/config/preview/index.js +6 -13
  65. package/dist/config/refs/refs.d.ts +13 -0
  66. package/dist/config/refs/refs.js +12 -13
  67. package/dist/config/sourceLink/sourceLink.d.ts +35 -0
  68. package/dist/config/sourceLink/sourceLink.js +32 -36
  69. package/dist/config/static/staticDirsNextJs.d.ts +5 -0
  70. package/dist/config/static/staticDirsNextJs.js +5 -6
  71. package/dist/config/static/staticDirsReactNative.d.ts +2 -0
  72. package/dist/config/static/staticDirsReactNative.js +2 -3
  73. package/dist/config/static/staticDirsReactNativeWeb.d.ts +2 -0
  74. package/dist/config/static/staticDirsReactNativeWeb.js +2 -3
  75. package/dist/config/static/staticDirsVite.d.ts +5 -0
  76. package/dist/config/static/staticDirsVite.js +2 -3
  77. package/dist/config/static/staticDirsWebpack.d.ts +5 -0
  78. package/dist/config/static/staticDirsWebpack.js +2 -3
  79. package/dist/config/status/status.d.ts +21 -0
  80. package/dist/config/status/status.js +23 -24
  81. package/dist/config/users/authorization.d.ts +22 -0
  82. package/dist/config/users/authorization.js +6 -8
  83. package/dist/config/users/users.d.ts +18 -0
  84. package/dist/config/users/users.js +19 -21
  85. package/dist/config/viewport/viewport.d.ts +264 -0
  86. package/dist/config/viewport/viewport.js +23 -25
  87. package/dist/config/vite/getMediaProxyServerConfig.d.ts +13 -0
  88. package/dist/config/vite/getMediaProxyServerConfig.js +14 -16
  89. package/dist/decorators/index.d.ts +8 -0
  90. package/dist/decorators/index.js +8 -0
  91. package/dist/decorators/withClearStoresDecorator.d.ts +4 -0
  92. package/dist/decorators/withExtraProviders.d.ts +2 -0
  93. package/dist/decorators/withFigmaSourceLink.d.ts +5 -0
  94. package/dist/decorators/withFormSubmitDecorator.d.ts +2 -0
  95. package/dist/decorators/withFormSubmitDecorator.js +0 -1
  96. package/dist/decorators/withLayoutDecorator.d.ts +4 -0
  97. package/dist/decorators/withNextDecorator.d.ts +9 -0
  98. package/dist/decorators/withNextDecorator.js +1 -1
  99. package/dist/decorators/withUiDecorator.d.ts +5 -0
  100. package/dist/decorators/withUiDecorator.js +1 -1
  101. package/dist/decorators.js +1 -2
  102. package/dist/utils/getFigmaSourceLink.d.ts +2 -0
  103. package/dist/utils/getFigmaSourceLink.js +13 -14
  104. package/dist/utils/getStoryInfoBlocks.d.ts +2 -0
  105. package/dist/utils/getStoryInfoBlocks.js +45 -55
  106. package/dist/utils/handleMSWParameters.d.ts +8 -0
  107. package/dist/utils/handleMSWParameters.js +18 -27
  108. package/dist/utils/hasFormParameters.d.ts +2 -0
  109. package/dist/utils/hasFormParameters.js +6 -9
  110. package/dist/utils/index.d.ts +7 -0
  111. package/dist/utils/index.js +9 -17
  112. package/dist/utils/isVitestEnvironment.d.ts +2 -0
  113. package/dist/utils/isVitestEnvironment.js +2 -3
  114. package/dist/utils/storybookServerErrorOnSubmit.d.ts +2 -0
  115. package/dist/utils/storybookServerErrorOnSubmit.js +12 -19
  116. package/package.json +62 -55
@@ -0,0 +1,4 @@
1
+ declare const FRAMEWORK_VITE: {
2
+ framework: string;
3
+ };
4
+ export { FRAMEWORK_VITE };
@@ -1,5 +1,4 @@
1
1
  const FRAMEWORK_VITE = {
2
- framework: '@storybook/react-vite',
3
- }
4
-
5
- export { FRAMEWORK_VITE }
2
+ framework: '@storybook/react-vite',
3
+ };
4
+ export { FRAMEWORK_VITE };
@@ -0,0 +1,11 @@
1
+ declare const FRAMEWORK_WEBPACK: {
2
+ framework: {
3
+ name: string;
4
+ options: {
5
+ builder: {
6
+ useSWC: boolean;
7
+ };
8
+ };
9
+ };
10
+ };
11
+ export { FRAMEWORK_WEBPACK };
@@ -1,12 +1,11 @@
1
1
  const FRAMEWORK_WEBPACK = {
2
- framework: {
3
- name: '@storybook/react-webpack5',
4
- options: {
5
- builder: {
6
- useSWC: true,
7
- },
2
+ framework: {
3
+ name: '@storybook/react-webpack5',
4
+ options: {
5
+ builder: {
6
+ useSWC: true,
7
+ },
8
+ },
8
9
  },
9
- },
10
- }
11
-
12
- export { FRAMEWORK_WEBPACK }
10
+ };
11
+ export { FRAMEWORK_WEBPACK };
@@ -0,0 +1,26 @@
1
+ import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js';
2
+ import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js';
3
+ import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
4
+ import { ADDONS_VITE } from '../addons/addonsVite.js';
5
+ import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js';
6
+ import { CODE } from '../code/code.js';
7
+ import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js';
8
+ import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js';
9
+ import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js';
10
+ import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js';
11
+ import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js';
12
+ import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js';
13
+ import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js';
14
+ import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js';
15
+ import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js';
16
+ import { FRAMEWORK_VITE } from '../framework/frameworkVite.js';
17
+ import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js';
18
+ import { REFS } from '../refs/refs.js';
19
+ import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js';
20
+ import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js';
21
+ import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js';
22
+ import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js';
23
+ import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js';
24
+ import { STATUS } from '../status/status.js';
25
+ import { AUTHORIZATION } from '../users/authorization.js';
26
+ export { ADDONS_NEXTJS, ADDONS_REACT_NATIVE, ADDONS_REACT_NATIVE_WEB, ADDONS_VITE, ADDONS_WEBPACK, AUTHORIZATION, CODE, FRAMEWORK_NEXTJS, FRAMEWORK_NEXTJS_VITE, FRAMEWORK_REACT_NATIVE, FRAMEWORK_REACT_NATIVE_WEB, FRAMEWORK_VITE, FRAMEWORK_WEBPACK, MAIN_CONFIG_NEXTJS_VITE, MAIN_CONFIG_REACT_NATIVE, MAIN_CONFIG_REACT_NATIVE_WEB, MAIN_CONFIG_VITE, MAIN_CONFIG_WEBPACK, REFS, STATIC_DIRS_NEXTJS, STATIC_DIRS_REACT_NATIVE, STATIC_DIRS_REACT_NATIVE_WEB, STATIC_DIRS_VITE, STATIC_DIRS_WEBPACK, STATUS, };
@@ -1,53 +1,26 @@
1
- import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js'
2
- import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js'
3
- import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js'
4
- import { ADDONS_VITE } from '../addons/addonsVite.js'
5
- import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js'
6
- import { CODE } from '../code/code.js'
7
- import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js'
8
- import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js'
9
- import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js'
10
- import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js'
11
- import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js'
12
- import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js'
13
- import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js'
14
- import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js'
15
- import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js'
16
- import { FRAMEWORK_VITE } from '../framework/frameworkVite.js'
17
- import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js'
18
- import { REFS } from '../refs/refs.js'
19
- import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js'
20
- import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js'
21
- import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js'
22
- import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js'
23
- import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js'
24
- import { STATUS } from '../status/status.js'
25
- import { AUTHORIZATION } from '../users/authorization.js'
26
-
27
- export {
28
- ADDONS_NEXTJS,
29
- ADDONS_REACT_NATIVE,
30
- ADDONS_REACT_NATIVE_WEB,
31
- ADDONS_VITE,
32
- ADDONS_WEBPACK,
33
- AUTHORIZATION,
34
- CODE,
35
- FRAMEWORK_NEXTJS,
36
- FRAMEWORK_NEXTJS_VITE,
37
- FRAMEWORK_REACT_NATIVE,
38
- FRAMEWORK_REACT_NATIVE_WEB,
39
- FRAMEWORK_VITE,
40
- FRAMEWORK_WEBPACK,
41
- MAIN_CONFIG_NEXTJS_VITE,
42
- MAIN_CONFIG_REACT_NATIVE,
43
- MAIN_CONFIG_REACT_NATIVE_WEB,
44
- MAIN_CONFIG_VITE,
45
- MAIN_CONFIG_WEBPACK,
46
- REFS,
47
- STATIC_DIRS_NEXTJS,
48
- STATIC_DIRS_REACT_NATIVE,
49
- STATIC_DIRS_REACT_NATIVE_WEB,
50
- STATIC_DIRS_VITE,
51
- STATIC_DIRS_WEBPACK,
52
- STATUS,
53
- }
1
+ import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js';
2
+ import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js';
3
+ import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
4
+ import { ADDONS_VITE } from '../addons/addonsVite.js';
5
+ import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js';
6
+ import { CODE } from '../code/code.js';
7
+ import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js';
8
+ import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js';
9
+ import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js';
10
+ import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js';
11
+ import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js';
12
+ import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js';
13
+ import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js';
14
+ import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js';
15
+ import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js';
16
+ import { FRAMEWORK_VITE } from '../framework/frameworkVite.js';
17
+ import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js';
18
+ import { REFS } from '../refs/refs.js';
19
+ import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js';
20
+ import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js';
21
+ import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js';
22
+ import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js';
23
+ import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js';
24
+ import { STATUS } from '../status/status.js';
25
+ import { AUTHORIZATION } from '../users/authorization.js';
26
+ export { ADDONS_NEXTJS, ADDONS_REACT_NATIVE, ADDONS_REACT_NATIVE_WEB, ADDONS_VITE, ADDONS_WEBPACK, AUTHORIZATION, CODE, FRAMEWORK_NEXTJS, FRAMEWORK_NEXTJS_VITE, FRAMEWORK_REACT_NATIVE, FRAMEWORK_REACT_NATIVE_WEB, FRAMEWORK_VITE, FRAMEWORK_WEBPACK, MAIN_CONFIG_NEXTJS_VITE, MAIN_CONFIG_REACT_NATIVE, MAIN_CONFIG_REACT_NATIVE_WEB, MAIN_CONFIG_VITE, MAIN_CONFIG_WEBPACK, REFS, STATIC_DIRS_NEXTJS, STATIC_DIRS_REACT_NATIVE, STATIC_DIRS_REACT_NATIVE_WEB, STATIC_DIRS_VITE, STATIC_DIRS_WEBPACK, STATUS, };
@@ -0,0 +1,2 @@
1
+ import { handleGetRequest, serverErrorDataHandler, serverErrorHandler } from './mswHandlers.js';
2
+ export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
@@ -1,7 +1,2 @@
1
- import {
2
- handleGetRequest,
3
- serverErrorDataHandler,
4
- serverErrorHandler,
5
- } from './mswHandlers.js'
6
-
7
- export { handleGetRequest, serverErrorDataHandler, serverErrorHandler }
1
+ import { handleGetRequest, serverErrorDataHandler, serverErrorHandler, } from './mswHandlers.js';
2
+ export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
@@ -0,0 +1,5 @@
1
+ import type { HttpHandler, JsonBodyType } from 'msw';
2
+ declare function serverErrorHandler(errors: JsonBodyType): HttpHandler;
3
+ declare function serverErrorDataHandler(message: JsonBodyType): HttpHandler;
4
+ declare function handleGetRequest(url: string, data: JsonBodyType, status?: number): HttpHandler;
5
+ export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
@@ -1,27 +1,23 @@
1
- import { http, HttpResponse, passthrough } from 'msw'
2
-
3
- const serverErrorHandler = (errors) => {
4
- return http.all('*', ({ request }) => {
5
- if (request.method === 'GET') {
6
- return passthrough()
7
- }
8
- return HttpResponse.json(errors, { status: 400 })
9
- })
1
+ import { http, HttpResponse, passthrough } from 'msw';
2
+ function serverErrorHandler(errors) {
3
+ return http.all('*', ({ request }) => {
4
+ if (request.method === 'GET') {
5
+ return passthrough();
6
+ }
7
+ return HttpResponse.json(errors, { status: 400 });
8
+ });
10
9
  }
11
-
12
- const serverErrorDataHandler = (message) => {
13
- return http.all('*', ({ request }) => {
14
- if (request.method === 'GET') {
15
- return passthrough()
16
- }
17
- return HttpResponse.json({ non_field_errors: message }, { status: 400 })
18
- })
10
+ function serverErrorDataHandler(message) {
11
+ return http.all('*', ({ request }) => {
12
+ if (request.method === 'GET') {
13
+ return passthrough();
14
+ }
15
+ return HttpResponse.json({ non_field_errors: message }, { status: 400 });
16
+ });
19
17
  }
20
-
21
- const handleGetRequest = (url, data, status) => {
22
- return http.get(url, () => {
23
- return HttpResponse.json(data, { status })
24
- })
18
+ function handleGetRequest(url, data, status) {
19
+ return http.get(url, () => {
20
+ return HttpResponse.json(data, { status });
21
+ });
25
22
  }
26
-
27
- export { handleGetRequest, serverErrorDataHandler, serverErrorHandler }
23
+ export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
@@ -0,0 +1,8 @@
1
+ declare const ONDEVICE_BACKGROUNDS: {
2
+ default: string;
3
+ values: {
4
+ name: string;
5
+ value: string;
6
+ }[];
7
+ };
8
+ export { ONDEVICE_BACKGROUNDS };
@@ -1,10 +1,9 @@
1
1
  const ONDEVICE_BACKGROUNDS = {
2
- default: 'plain',
3
- values: [
4
- { name: 'plain', value: 'white' },
5
- { name: 'warm', value: 'hotpink' },
6
- { name: 'cool', value: 'deepskyblue' },
7
- ],
8
- }
9
-
10
- export { ONDEVICE_BACKGROUNDS }
2
+ default: 'plain',
3
+ values: [
4
+ { name: 'plain', value: 'white' },
5
+ { name: 'warm', value: 'hotpink' },
6
+ { name: 'cool', value: 'deepskyblue' },
7
+ ],
8
+ };
9
+ export { ONDEVICE_BACKGROUNDS };
@@ -0,0 +1,6 @@
1
+ import { ADDON_THEMES } from '../addons/addonThemes.js';
2
+ import { BACKGROUNDS } from '../backgrounds/backgrounds.js';
3
+ import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js';
4
+ import { SOURCE_LINK } from '../sourceLink/sourceLink.js';
5
+ import { VIEWPORTS } from '../viewport/viewport.js';
6
+ export { ADDON_THEMES, BACKGROUNDS, ONDEVICE_BACKGROUNDS, SOURCE_LINK, VIEWPORTS, };
@@ -1,13 +1,6 @@
1
- import { ADDON_THEMES } from '../addons/addonThemes.js'
2
- import { BACKGROUNDS } from '../backgrounds/backgrounds.js'
3
- import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js'
4
- import { SOURCE_LINK } from '../sourceLink/sourceLink.js'
5
- import { VIEWPORTS } from '../viewport/viewport.js'
6
-
7
- export {
8
- ADDON_THEMES,
9
- BACKGROUNDS,
10
- ONDEVICE_BACKGROUNDS,
11
- SOURCE_LINK,
12
- VIEWPORTS,
13
- }
1
+ import { ADDON_THEMES } from '../addons/addonThemes.js';
2
+ import { BACKGROUNDS } from '../backgrounds/backgrounds.js';
3
+ import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js';
4
+ import { SOURCE_LINK } from '../sourceLink/sourceLink.js';
5
+ import { VIEWPORTS } from '../viewport/viewport.js';
6
+ export { ADDON_THEMES, BACKGROUNDS, ONDEVICE_BACKGROUNDS, SOURCE_LINK, VIEWPORTS, };
@@ -0,0 +1,13 @@
1
+ declare const REFS: {
2
+ 'itcase-storybook': {
3
+ title: string;
4
+ url: string;
5
+ expanded: boolean;
6
+ };
7
+ 'itcase-ui': {
8
+ title: string;
9
+ url: string;
10
+ expanded: boolean;
11
+ };
12
+ };
13
+ export { REFS };
@@ -1,14 +1,13 @@
1
1
  const REFS = {
2
- 'itcase-storybook': {
3
- title: 'Introduction',
4
- url: 'https://itcase.pro/storybook/',
5
- expanded: false,
6
- },
7
- 'itcase-ui': {
8
- title: 'ITCase UI',
9
- url: 'https://itcase.pro/ui/',
10
- expanded: false,
11
- },
12
- }
13
-
14
- export { REFS }
2
+ 'itcase-storybook': {
3
+ title: 'Introduction',
4
+ url: 'https://itcase.pro/storybook/',
5
+ expanded: false,
6
+ },
7
+ 'itcase-ui': {
8
+ title: 'ITCase UI',
9
+ url: 'https://itcase.pro/ui/',
10
+ expanded: false,
11
+ },
12
+ };
13
+ export { REFS };
@@ -0,0 +1,35 @@
1
+ declare const SOURCE_LINK: {
2
+ links: {
3
+ before: {
4
+ href: string;
5
+ icon: string;
6
+ label: string;
7
+ order: number;
8
+ };
9
+ 'component-editor': ({ importPath, rootPath }: {
10
+ importPath: any;
11
+ rootPath: any;
12
+ }) => {
13
+ type: string;
14
+ label: string;
15
+ href: string;
16
+ icon: string;
17
+ };
18
+ 'story-editor': ({ importPath, rootPath }: {
19
+ importPath: any;
20
+ rootPath: any;
21
+ }) => {
22
+ type: string;
23
+ label: string;
24
+ href: string;
25
+ icon: string;
26
+ };
27
+ 'addon-powered-by': {
28
+ label: string;
29
+ href: string;
30
+ icon: string;
31
+ order: number;
32
+ };
33
+ };
34
+ };
35
+ export { SOURCE_LINK };
@@ -1,39 +1,35 @@
1
1
  /* eslint-disable perfectionist/sort-objects */
2
- import { getFileUrl } from 'storybook-addon-source-link'
3
-
2
+ import { getFileUrl } from 'storybook-addon-source-link';
4
3
  const SOURCE_LINK = {
5
- links: {
6
- before: { href: '', icon: '', label: '', order: 0 },
7
- 'component-editor': ({ importPath, rootPath }) => {
8
- if (!rootPath) return undefined
9
-
10
- const storiesFolderIndex = importPath.indexOf('/stories/')
11
- const componentPath =
12
- storiesFolderIndex !== -1
13
- ? `${importPath.slice(0, storiesFolderIndex)}/index.ts`
14
- : importPath.replace(/\.stories\.(js|jsx|mjs|ts|tsx)$/, '.$1')
15
-
16
- const fileUrl = getFileUrl(rootPath, componentPath)
17
-
18
- return {
19
- type: 'editor',
20
- label: 'VSCode — ' + componentPath,
21
- href: fileUrl.href,
22
- icon: 'VSCodeIcon',
23
- }
4
+ links: {
5
+ before: { href: '', icon: '', label: '', order: 0 },
6
+ 'component-editor': ({ importPath, rootPath }) => {
7
+ if (!rootPath)
8
+ return undefined;
9
+ const storiesFolderIndex = importPath.indexOf('/stories/');
10
+ const componentPath = storiesFolderIndex !== -1
11
+ ? `${importPath.slice(0, storiesFolderIndex)}/index.ts`
12
+ : importPath.replace(/\.stories\.(js|jsx|mjs|ts|tsx)$/, '.$1');
13
+ const fileUrl = getFileUrl(rootPath, componentPath);
14
+ return {
15
+ type: 'editor',
16
+ label: 'VSCode — ' + componentPath,
17
+ href: fileUrl.href,
18
+ icon: 'VSCodeIcon',
19
+ };
20
+ },
21
+ 'story-editor': ({ importPath, rootPath }) => {
22
+ if (!rootPath)
23
+ return undefined;
24
+ const fileUrl = getFileUrl(rootPath, importPath);
25
+ return {
26
+ type: 'editor',
27
+ label: 'Story — ' + importPath.replace(/\.(js|jsx|tsx|tsx)?$/, ''),
28
+ href: fileUrl.href,
29
+ icon: 'StorybookIcon',
30
+ };
31
+ },
32
+ 'addon-powered-by': { label: '', href: '', icon: '', order: 1000 },
24
33
  },
25
- 'story-editor': ({ importPath, rootPath }) => {
26
- if (!rootPath) return undefined
27
- const fileUrl = getFileUrl(rootPath, importPath)
28
- return {
29
- type: 'editor',
30
- label: 'Story — ' + importPath.replace(/\.(js|jsx|tsx|tsx)?$/, ''),
31
- href: fileUrl.href,
32
- icon: 'StorybookIcon',
33
- }
34
- },
35
- 'addon-powered-by': { label: '', href: '', icon: '', order: 1000 },
36
- },
37
- }
38
-
39
- export { SOURCE_LINK }
34
+ };
35
+ export { SOURCE_LINK };
@@ -0,0 +1,5 @@
1
+ declare const STATIC_DIRS_NEXTJS: {
2
+ from: string;
3
+ to: string;
4
+ }[];
5
+ export { STATIC_DIRS_NEXTJS };
@@ -1,7 +1,6 @@
1
1
  const STATIC_DIRS_NEXTJS = [
2
- { from: '../public', to: '/' },
3
- { from: '../src/appearance/', to: 'src/appearance/' },
4
- { from: '../public/img', to: 'img/' },
5
- ]
6
-
7
- export { STATIC_DIRS_NEXTJS }
2
+ { from: '../public', to: '/' },
3
+ { from: '../src/appearance/', to: 'src/appearance/' },
4
+ { from: '../public/img', to: 'img/' },
5
+ ];
6
+ export { STATIC_DIRS_NEXTJS };
@@ -0,0 +1,2 @@
1
+ declare const STATIC_DIRS_REACT_NATIVE: any[];
2
+ export { STATIC_DIRS_REACT_NATIVE };
@@ -1,3 +1,2 @@
1
- const STATIC_DIRS_REACT_NATIVE = []
2
-
3
- export { STATIC_DIRS_REACT_NATIVE }
1
+ const STATIC_DIRS_REACT_NATIVE = [];
2
+ export { STATIC_DIRS_REACT_NATIVE };
@@ -0,0 +1,2 @@
1
+ declare const STATIC_DIRS_REACT_NATIVE_WEB: any[];
2
+ export { STATIC_DIRS_REACT_NATIVE_WEB };
@@ -1,3 +1,2 @@
1
- const STATIC_DIRS_REACT_NATIVE_WEB = []
2
-
3
- export { STATIC_DIRS_REACT_NATIVE_WEB }
1
+ const STATIC_DIRS_REACT_NATIVE_WEB = [];
2
+ export { STATIC_DIRS_REACT_NATIVE_WEB };
@@ -0,0 +1,5 @@
1
+ declare const STATIC_DIRS_VITE: {
2
+ from: string;
3
+ to: string;
4
+ }[];
5
+ export { STATIC_DIRS_VITE };
@@ -1,3 +1,2 @@
1
- const STATIC_DIRS_VITE = [{ from: '../public', to: '/' }]
2
-
3
- export { STATIC_DIRS_VITE }
1
+ const STATIC_DIRS_VITE = [{ from: '../public', to: '/' }];
2
+ export { STATIC_DIRS_VITE };
@@ -0,0 +1,5 @@
1
+ declare const STATIC_DIRS_WEBPACK: {
2
+ from: string;
3
+ to: string;
4
+ }[];
5
+ export { STATIC_DIRS_WEBPACK };
@@ -1,3 +1,2 @@
1
- const STATIC_DIRS_WEBPACK = [{ from: '../public', to: '/' }]
2
-
3
- export { STATIC_DIRS_WEBPACK }
1
+ const STATIC_DIRS_WEBPACK = [{ from: '../public', to: '/' }];
2
+ export { STATIC_DIRS_WEBPACK };
@@ -0,0 +1,21 @@
1
+ declare const STATUS: {
2
+ type: string;
3
+ statuses: {
4
+ emailDevelopServer: {
5
+ description: string;
6
+ color: string;
7
+ background: string;
8
+ };
9
+ emailRemoteServer: {
10
+ description: string;
11
+ color: string;
12
+ background: string;
13
+ };
14
+ emailServerUrlNotSet: {
15
+ description: string;
16
+ color: string;
17
+ background: string;
18
+ };
19
+ };
20
+ };
21
+ export { STATUS };
@@ -1,26 +1,25 @@
1
1
  const STATUS = {
2
- type: !process.env.EMAIL_URL
3
- ? 'emailServerUrlNotSet'
4
- : process.env.EMAIL_URL.includes('http://')
5
- ? 'emailDevelopServer'
6
- : 'emailRemoteServer',
7
- statuses: {
8
- emailDevelopServer: {
9
- description: 'Story use template from local django-server',
10
- color: '#ffffff',
11
- background: 'red',
2
+ type: !process.env.EMAIL_URL
3
+ ? 'emailServerUrlNotSet'
4
+ : process.env.EMAIL_URL.includes('http://')
5
+ ? 'emailDevelopServer'
6
+ : 'emailRemoteServer',
7
+ statuses: {
8
+ emailDevelopServer: {
9
+ description: 'Story use template from local django-server',
10
+ color: '#ffffff',
11
+ background: 'red',
12
+ },
13
+ emailRemoteServer: {
14
+ description: 'Story use template from remote server',
15
+ color: '#ffffff',
16
+ background: 'green',
17
+ },
18
+ emailServerUrlNotSet: {
19
+ description: 'Please set EMAIL_URL in .env.local',
20
+ color: '#ffffff',
21
+ background: 'red',
22
+ },
12
23
  },
13
- emailRemoteServer: {
14
- description: 'Story use template from remote server',
15
- color: '#ffffff',
16
- background: 'green',
17
- },
18
- emailServerUrlNotSet: {
19
- description: 'Please set EMAIL_URL in .env.local',
20
- color: '#ffffff',
21
- background: 'red',
22
- },
23
- },
24
- }
25
-
26
- export { STATUS }
24
+ };
25
+ export { STATUS };
@@ -0,0 +1,22 @@
1
+ declare const AUTHORIZATION: {
2
+ profileUrl: string;
3
+ signInUrl: string;
4
+ values: {
5
+ admin: {
6
+ name: string;
7
+ color: string;
8
+ token: string;
9
+ };
10
+ manager: {
11
+ name: string;
12
+ color: string;
13
+ token: string;
14
+ };
15
+ user: {
16
+ name: string;
17
+ color: string;
18
+ token: string;
19
+ };
20
+ };
21
+ };
22
+ export { AUTHORIZATION };
@@ -1,9 +1,7 @@
1
- import { USERS } from './users.js'
2
-
1
+ import { USERS } from './users.js';
3
2
  const AUTHORIZATION = {
4
- profileUrl: `${process.env.REST_BASE_URL}/rest/profile/`,
5
- signInUrl: `${process.env.REST_BASE_URL}/rest/sign-in/`,
6
- values: USERS,
7
- }
8
-
9
- export { AUTHORIZATION }
3
+ profileUrl: `${process.env.REST_BASE_URL}/rest/profile/`,
4
+ signInUrl: `${process.env.REST_BASE_URL}/rest/sign-in/`,
5
+ values: USERS,
6
+ };
7
+ export { AUTHORIZATION };