lkd-web-kit 0.8.0 → 0.8.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 (136) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  2. package/dist/components/EmptyState/index.cjs +38 -52
  3. package/dist/components/EmptyState/index.js +37 -48
  4. package/dist/components/Icon.cjs +46 -50
  5. package/dist/components/Icon.js +44 -46
  6. package/dist/components/InfinityLoadMoreButton/index.cjs +30 -42
  7. package/dist/components/InfinityLoadMoreButton/index.js +28 -38
  8. package/dist/components/InfinitySelect/index.cjs +126 -168
  9. package/dist/components/InfinitySelect/index.js +125 -164
  10. package/dist/components/MyCheckboxGroup/index.cjs +14 -22
  11. package/dist/components/MyCheckboxGroup/index.js +13 -18
  12. package/dist/components/MyDateInput/index.cjs +12 -18
  13. package/dist/components/MyDateInput/index.js +11 -14
  14. package/dist/components/MyDatePickerInput/CalendarIcon.cjs +45 -64
  15. package/dist/components/MyDatePickerInput/CalendarIcon.js +43 -61
  16. package/dist/components/MyDatePickerInput/index.cjs +12 -18
  17. package/dist/components/MyDatePickerInput/index.js +11 -14
  18. package/dist/components/MyDateTimePicker/index.cjs +12 -18
  19. package/dist/components/MyDateTimePicker/index.js +11 -14
  20. package/dist/components/MyMonthPickerInput/index.cjs +12 -18
  21. package/dist/components/MyMonthPickerInput/index.js +11 -14
  22. package/dist/components/MyMultiSelect/index.cjs +9 -9
  23. package/dist/components/MyMultiSelect/index.js +8 -5
  24. package/dist/components/MyNotifications/index.cjs +11 -17
  25. package/dist/components/MyNotifications/index.js +10 -13
  26. package/dist/components/MyNumberInput/index.cjs +9 -15
  27. package/dist/components/MyNumberInput/index.js +8 -11
  28. package/dist/components/MyRadioGroup/index.cjs +14 -22
  29. package/dist/components/MyRadioGroup/index.js +13 -18
  30. package/dist/components/MySelect/index.cjs +9 -15
  31. package/dist/components/MySelect/index.js +8 -11
  32. package/dist/components/MyTextInput/index.cjs +9 -15
  33. package/dist/components/MyTextInput/index.js +8 -11
  34. package/dist/components/MyTextarea/index.cjs +9 -15
  35. package/dist/components/MyTextarea/index.js +8 -11
  36. package/dist/components/MyTimeInput/index.cjs +9 -15
  37. package/dist/components/MyTimeInput/index.js +8 -11
  38. package/dist/components/NavItems.cjs +28 -38
  39. package/dist/components/NavItems.js +26 -34
  40. package/dist/consts/http-status.cjs +66 -69
  41. package/dist/consts/http-status.js +66 -65
  42. package/dist/consts/revalidate.cjs +10 -13
  43. package/dist/consts/revalidate.js +10 -9
  44. package/dist/contexts/NavigationHistoryContext/hook.cjs +41 -42
  45. package/dist/contexts/NavigationHistoryContext/hook.js +40 -38
  46. package/dist/contexts/NavigationHistoryContext/index.cjs +31 -28
  47. package/dist/contexts/NavigationHistoryContext/index.js +30 -24
  48. package/dist/contexts/PageDataContext/index.cjs +15 -18
  49. package/dist/contexts/PageDataContext/index.js +14 -14
  50. package/dist/form/Form.cjs +19 -28
  51. package/dist/form/Form.js +18 -24
  52. package/dist/form/FormSubmitButton.cjs +15 -27
  53. package/dist/form/FormSubmitButton.js +14 -23
  54. package/dist/form/base/FormCheckbox.cjs +15 -23
  55. package/dist/form/base/FormCheckbox.js +14 -19
  56. package/dist/form/base/FormCheckboxGroup.cjs +10 -16
  57. package/dist/form/base/FormCheckboxGroup.js +9 -12
  58. package/dist/form/base/FormDateInput.cjs +10 -16
  59. package/dist/form/base/FormDateInput.js +9 -12
  60. package/dist/form/base/FormDatePickerInput.cjs +10 -16
  61. package/dist/form/base/FormDatePickerInput.js +9 -12
  62. package/dist/form/base/FormDateTimePicker.cjs +10 -16
  63. package/dist/form/base/FormDateTimePicker.js +9 -12
  64. package/dist/form/base/FormMonthPickerInput.cjs +10 -16
  65. package/dist/form/base/FormMonthPickerInput.js +9 -12
  66. package/dist/form/base/FormMultiSelect.cjs +10 -10
  67. package/dist/form/base/FormMultiSelect.js +9 -6
  68. package/dist/form/base/FormNumberInput.cjs +12 -12
  69. package/dist/form/base/FormNumberInput.js +10 -8
  70. package/dist/form/base/FormRadioGroup.cjs +10 -16
  71. package/dist/form/base/FormRadioGroup.js +9 -12
  72. package/dist/form/base/FormSelect.cjs +10 -16
  73. package/dist/form/base/FormSelect.js +9 -12
  74. package/dist/form/base/FormSelectInfinity.cjs +15 -21
  75. package/dist/form/base/FormSelectInfinity.js +14 -17
  76. package/dist/form/base/FormTextInput.cjs +10 -16
  77. package/dist/form/base/FormTextInput.js +9 -12
  78. package/dist/form/base/FormTextarea.cjs +10 -10
  79. package/dist/form/base/FormTextarea.js +9 -6
  80. package/dist/form/base/FormTimeInput.cjs +18 -24
  81. package/dist/form/base/FormTimeInput.js +17 -20
  82. package/dist/form/utils/nullable-but-required.cjs +14 -17
  83. package/dist/form/utils/nullable-but-required.js +13 -13
  84. package/dist/form/utils/optional-but-required.cjs +14 -17
  85. package/dist/form/utils/optional-but-required.js +13 -13
  86. package/dist/form/utils/zodValidator.cjs +9 -13
  87. package/dist/form/utils/zodValidator.js +9 -9
  88. package/dist/hocs/withController.cjs +43 -54
  89. package/dist/hocs/withController.js +42 -50
  90. package/dist/hocs/withModalManager.cjs +29 -35
  91. package/dist/hocs/withModalManager.js +28 -31
  92. package/dist/hooks/useBreakpoint.cjs +8 -12
  93. package/dist/hooks/useBreakpoint.js +7 -8
  94. package/dist/hooks/useFetchNextPageOnScroll.cjs +13 -21
  95. package/dist/hooks/useFetchNextPageOnScroll.js +13 -17
  96. package/dist/hooks/useOnScrollProgress.cjs +33 -37
  97. package/dist/hooks/useOnScrollProgress.js +32 -33
  98. package/dist/hooks/useUpdateSearchParams.cjs +22 -22
  99. package/dist/hooks/useUpdateSearchParams.js +21 -18
  100. package/dist/hooks/useZodConfig.cjs +14 -19
  101. package/dist/hooks/useZodConfig.js +12 -15
  102. package/dist/index.cjs +130 -136
  103. package/dist/index.d.ts +13 -13
  104. package/dist/index.js +62 -61
  105. package/dist/mantine/breakpoints-with-px.cjs +9 -12
  106. package/dist/mantine/breakpoints-with-px.js +9 -8
  107. package/dist/mantine/my-default-theme.cjs +23 -42
  108. package/dist/mantine/my-default-theme.js +22 -38
  109. package/dist/mantine/to-tailwind-colors.cjs +9 -18
  110. package/dist/mantine/to-tailwind-colors.js +9 -14
  111. package/dist/utils/array/groupBy.cjs +30 -40
  112. package/dist/utils/array/groupBy.js +30 -36
  113. package/dist/utils/array/shuffleArray.cjs +11 -17
  114. package/dist/utils/array/shuffleArray.js +11 -13
  115. package/dist/utils/formatBytes.cjs +12 -11
  116. package/dist/utils/formatBytes.js +12 -7
  117. package/dist/utils/isInfinityEmpty.cjs +3 -6
  118. package/dist/utils/isInfinityEmpty.js +3 -2
  119. package/dist/utils/ky/addBodyJsonHook.cjs +9 -14
  120. package/dist/utils/ky/addBodyJsonHook.js +8 -10
  121. package/dist/utils/ky/parseJson.cjs +6 -9
  122. package/dist/utils/ky/parseJson.js +6 -5
  123. package/dist/utils/new-route.cjs +30 -39
  124. package/dist/utils/new-route.js +30 -35
  125. package/dist/utils/query-stringify.cjs +5 -8
  126. package/dist/utils/query-stringify.js +5 -4
  127. package/dist/utils/virtual-styles.cjs +21 -26
  128. package/dist/utils/virtual-styles.js +21 -22
  129. package/package.json +20 -19
  130. package/dist/node_modules/@mantine/notifications/styles.css +0 -42
  131. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.cjs +0 -74
  132. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +0 -45
  133. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.cjs +0 -886
  134. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -872
  135. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.cjs +0 -75
  136. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -68
@@ -1,66 +1,67 @@
1
- var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
2
- HttpStatus2[HttpStatus2["Continue"] = 100] = "Continue";
3
- HttpStatus2[HttpStatus2["SwitchingProtocols"] = 101] = "SwitchingProtocols";
4
- HttpStatus2[HttpStatus2["Processing"] = 102] = "Processing";
5
- HttpStatus2[HttpStatus2["EarlyHints"] = 103] = "EarlyHints";
6
- HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
7
- HttpStatus2[HttpStatus2["Created"] = 201] = "Created";
8
- HttpStatus2[HttpStatus2["Accepted"] = 202] = "Accepted";
9
- HttpStatus2[HttpStatus2["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
10
- HttpStatus2[HttpStatus2["NoContent"] = 204] = "NoContent";
11
- HttpStatus2[HttpStatus2["ResetContent"] = 205] = "ResetContent";
12
- HttpStatus2[HttpStatus2["PartialContent"] = 206] = "PartialContent";
13
- HttpStatus2[HttpStatus2["MultiStatus"] = 207] = "MultiStatus";
14
- HttpStatus2[HttpStatus2["AlreadyReported"] = 208] = "AlreadyReported";
15
- HttpStatus2[HttpStatus2["ImUsed"] = 226] = "ImUsed";
16
- HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
17
- HttpStatus2[HttpStatus2["MovedPermanently"] = 301] = "MovedPermanently";
18
- HttpStatus2[HttpStatus2["Found"] = 302] = "Found";
19
- HttpStatus2[HttpStatus2["SeeOther"] = 303] = "SeeOther";
20
- HttpStatus2[HttpStatus2["NotModified"] = 304] = "NotModified";
21
- HttpStatus2[HttpStatus2["UseProxy"] = 305] = "UseProxy";
22
- HttpStatus2[HttpStatus2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
23
- HttpStatus2[HttpStatus2["PermanentRedirect"] = 308] = "PermanentRedirect";
24
- HttpStatus2[HttpStatus2["BadRequest"] = 400] = "BadRequest";
25
- HttpStatus2[HttpStatus2["Unauthorized"] = 401] = "Unauthorized";
26
- HttpStatus2[HttpStatus2["PaymentRequired"] = 402] = "PaymentRequired";
27
- HttpStatus2[HttpStatus2["Forbidden"] = 403] = "Forbidden";
28
- HttpStatus2[HttpStatus2["NotFound"] = 404] = "NotFound";
29
- HttpStatus2[HttpStatus2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
30
- HttpStatus2[HttpStatus2["NotAcceptable"] = 406] = "NotAcceptable";
31
- HttpStatus2[HttpStatus2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
32
- HttpStatus2[HttpStatus2["RequestTimeout"] = 408] = "RequestTimeout";
33
- HttpStatus2[HttpStatus2["Conflict"] = 409] = "Conflict";
34
- HttpStatus2[HttpStatus2["Gone"] = 410] = "Gone";
35
- HttpStatus2[HttpStatus2["LengthRequired"] = 411] = "LengthRequired";
36
- HttpStatus2[HttpStatus2["PreconditionFailed"] = 412] = "PreconditionFailed";
37
- HttpStatus2[HttpStatus2["PayloadTooLarge"] = 413] = "PayloadTooLarge";
38
- HttpStatus2[HttpStatus2["UriTooLong"] = 414] = "UriTooLong";
39
- HttpStatus2[HttpStatus2["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
40
- HttpStatus2[HttpStatus2["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
41
- HttpStatus2[HttpStatus2["ExpectationFailed"] = 417] = "ExpectationFailed";
42
- HttpStatus2[HttpStatus2["MisdirectedRequest"] = 421] = "MisdirectedRequest";
43
- HttpStatus2[HttpStatus2["UnprocessableEntity"] = 422] = "UnprocessableEntity";
44
- HttpStatus2[HttpStatus2["Locked"] = 423] = "Locked";
45
- HttpStatus2[HttpStatus2["FailedDependency"] = 424] = "FailedDependency";
46
- HttpStatus2[HttpStatus2["TooEarly"] = 425] = "TooEarly";
47
- HttpStatus2[HttpStatus2["UpgradeRequired"] = 426] = "UpgradeRequired";
48
- HttpStatus2[HttpStatus2["PreconditionRequired"] = 428] = "PreconditionRequired";
49
- HttpStatus2[HttpStatus2["TooManyRequests"] = 429] = "TooManyRequests";
50
- HttpStatus2[HttpStatus2["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
51
- HttpStatus2[HttpStatus2["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
52
- HttpStatus2[HttpStatus2["InternalServerError"] = 500] = "InternalServerError";
53
- HttpStatus2[HttpStatus2["NotImplemented"] = 501] = "NotImplemented";
54
- HttpStatus2[HttpStatus2["BadGateway"] = 502] = "BadGateway";
55
- HttpStatus2[HttpStatus2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
56
- HttpStatus2[HttpStatus2["GatewayTimeout"] = 504] = "GatewayTimeout";
57
- HttpStatus2[HttpStatus2["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
58
- HttpStatus2[HttpStatus2["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
59
- HttpStatus2[HttpStatus2["InsufficientStorage"] = 507] = "InsufficientStorage";
60
- HttpStatus2[HttpStatus2["LoopDetected"] = 508] = "LoopDetected";
61
- HttpStatus2[HttpStatus2["NotExtended"] = 510] = "NotExtended";
62
- HttpStatus2[HttpStatus2["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
63
- return HttpStatus2;
64
- })(HttpStatus || {});
65
-
1
+ //#region src/consts/http-status.ts
2
+ var HttpStatus = /* @__PURE__ */ function(HttpStatus) {
3
+ HttpStatus[HttpStatus["Continue"] = 100] = "Continue";
4
+ HttpStatus[HttpStatus["SwitchingProtocols"] = 101] = "SwitchingProtocols";
5
+ HttpStatus[HttpStatus["Processing"] = 102] = "Processing";
6
+ HttpStatus[HttpStatus["EarlyHints"] = 103] = "EarlyHints";
7
+ HttpStatus[HttpStatus["Ok"] = 200] = "Ok";
8
+ HttpStatus[HttpStatus["Created"] = 201] = "Created";
9
+ HttpStatus[HttpStatus["Accepted"] = 202] = "Accepted";
10
+ HttpStatus[HttpStatus["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
11
+ HttpStatus[HttpStatus["NoContent"] = 204] = "NoContent";
12
+ HttpStatus[HttpStatus["ResetContent"] = 205] = "ResetContent";
13
+ HttpStatus[HttpStatus["PartialContent"] = 206] = "PartialContent";
14
+ HttpStatus[HttpStatus["MultiStatus"] = 207] = "MultiStatus";
15
+ HttpStatus[HttpStatus["AlreadyReported"] = 208] = "AlreadyReported";
16
+ HttpStatus[HttpStatus["ImUsed"] = 226] = "ImUsed";
17
+ HttpStatus[HttpStatus["MultipleChoices"] = 300] = "MultipleChoices";
18
+ HttpStatus[HttpStatus["MovedPermanently"] = 301] = "MovedPermanently";
19
+ HttpStatus[HttpStatus["Found"] = 302] = "Found";
20
+ HttpStatus[HttpStatus["SeeOther"] = 303] = "SeeOther";
21
+ HttpStatus[HttpStatus["NotModified"] = 304] = "NotModified";
22
+ HttpStatus[HttpStatus["UseProxy"] = 305] = "UseProxy";
23
+ HttpStatus[HttpStatus["TemporaryRedirect"] = 307] = "TemporaryRedirect";
24
+ HttpStatus[HttpStatus["PermanentRedirect"] = 308] = "PermanentRedirect";
25
+ HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
26
+ HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
27
+ HttpStatus[HttpStatus["PaymentRequired"] = 402] = "PaymentRequired";
28
+ HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
29
+ HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
30
+ HttpStatus[HttpStatus["MethodNotAllowed"] = 405] = "MethodNotAllowed";
31
+ HttpStatus[HttpStatus["NotAcceptable"] = 406] = "NotAcceptable";
32
+ HttpStatus[HttpStatus["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
33
+ HttpStatus[HttpStatus["RequestTimeout"] = 408] = "RequestTimeout";
34
+ HttpStatus[HttpStatus["Conflict"] = 409] = "Conflict";
35
+ HttpStatus[HttpStatus["Gone"] = 410] = "Gone";
36
+ HttpStatus[HttpStatus["LengthRequired"] = 411] = "LengthRequired";
37
+ HttpStatus[HttpStatus["PreconditionFailed"] = 412] = "PreconditionFailed";
38
+ HttpStatus[HttpStatus["PayloadTooLarge"] = 413] = "PayloadTooLarge";
39
+ HttpStatus[HttpStatus["UriTooLong"] = 414] = "UriTooLong";
40
+ HttpStatus[HttpStatus["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
41
+ HttpStatus[HttpStatus["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
42
+ HttpStatus[HttpStatus["ExpectationFailed"] = 417] = "ExpectationFailed";
43
+ HttpStatus[HttpStatus["MisdirectedRequest"] = 421] = "MisdirectedRequest";
44
+ HttpStatus[HttpStatus["UnprocessableEntity"] = 422] = "UnprocessableEntity";
45
+ HttpStatus[HttpStatus["Locked"] = 423] = "Locked";
46
+ HttpStatus[HttpStatus["FailedDependency"] = 424] = "FailedDependency";
47
+ HttpStatus[HttpStatus["TooEarly"] = 425] = "TooEarly";
48
+ HttpStatus[HttpStatus["UpgradeRequired"] = 426] = "UpgradeRequired";
49
+ HttpStatus[HttpStatus["PreconditionRequired"] = 428] = "PreconditionRequired";
50
+ HttpStatus[HttpStatus["TooManyRequests"] = 429] = "TooManyRequests";
51
+ HttpStatus[HttpStatus["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
52
+ HttpStatus[HttpStatus["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
53
+ HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
54
+ HttpStatus[HttpStatus["NotImplemented"] = 501] = "NotImplemented";
55
+ HttpStatus[HttpStatus["BadGateway"] = 502] = "BadGateway";
56
+ HttpStatus[HttpStatus["ServiceUnavailable"] = 503] = "ServiceUnavailable";
57
+ HttpStatus[HttpStatus["GatewayTimeout"] = 504] = "GatewayTimeout";
58
+ HttpStatus[HttpStatus["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
59
+ HttpStatus[HttpStatus["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
60
+ HttpStatus[HttpStatus["InsufficientStorage"] = 507] = "InsufficientStorage";
61
+ HttpStatus[HttpStatus["LoopDetected"] = 508] = "LoopDetected";
62
+ HttpStatus[HttpStatus["NotExtended"] = 510] = "NotExtended";
63
+ HttpStatus[HttpStatus["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
64
+ return HttpStatus;
65
+ }({});
66
+ //#endregion
66
67
  export { HttpStatus };
@@ -1,14 +1,11 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- var Revalidate = /* @__PURE__ */ ((Revalidate2) => {
6
- Revalidate2[Revalidate2["OneHour"] = 3600] = "OneHour";
7
- Revalidate2[Revalidate2["OneDay"] = 86400] = "OneDay";
8
- Revalidate2[Revalidate2["OneWeek"] = 604800] = "OneWeek";
9
- Revalidate2[Revalidate2["OneMonth"] = 2592e3] = "OneMonth";
10
- Revalidate2[Revalidate2["OneYear"] = 31536e3] = "OneYear";
11
- return Revalidate2;
12
- })(Revalidate || {});
13
-
1
+ //#region src/consts/revalidate.ts
2
+ var Revalidate = /* @__PURE__ */ function(Revalidate) {
3
+ Revalidate[Revalidate["OneHour"] = 3600] = "OneHour";
4
+ Revalidate[Revalidate["OneDay"] = 86400] = "OneDay";
5
+ Revalidate[Revalidate["OneWeek"] = 604800] = "OneWeek";
6
+ Revalidate[Revalidate["OneMonth"] = 2592e3] = "OneMonth";
7
+ Revalidate[Revalidate["OneYear"] = 31536e3] = "OneYear";
8
+ return Revalidate;
9
+ }({});
10
+ //#endregion
14
11
  exports.Revalidate = Revalidate;
@@ -1,10 +1,11 @@
1
- var Revalidate = /* @__PURE__ */ ((Revalidate2) => {
2
- Revalidate2[Revalidate2["OneHour"] = 3600] = "OneHour";
3
- Revalidate2[Revalidate2["OneDay"] = 86400] = "OneDay";
4
- Revalidate2[Revalidate2["OneWeek"] = 604800] = "OneWeek";
5
- Revalidate2[Revalidate2["OneMonth"] = 2592e3] = "OneMonth";
6
- Revalidate2[Revalidate2["OneYear"] = 31536e3] = "OneYear";
7
- return Revalidate2;
8
- })(Revalidate || {});
9
-
1
+ //#region src/consts/revalidate.ts
2
+ var Revalidate = /* @__PURE__ */ function(Revalidate) {
3
+ Revalidate[Revalidate["OneHour"] = 3600] = "OneHour";
4
+ Revalidate[Revalidate["OneDay"] = 86400] = "OneDay";
5
+ Revalidate[Revalidate["OneWeek"] = 604800] = "OneWeek";
6
+ Revalidate[Revalidate["OneMonth"] = 2592e3] = "OneMonth";
7
+ Revalidate[Revalidate["OneYear"] = 31536e3] = "OneYear";
8
+ return Revalidate;
9
+ }({});
10
+ //#endregion
10
11
  export { Revalidate };
@@ -1,46 +1,45 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const navigation = require('next/navigation');
6
- const React = require('react');
7
- const index = require('./index.cjs');
8
-
9
- const QP_BACK_URL_NAME = "backUrl";
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_index = require("./index.cjs");
3
+ let react = require("react");
4
+ let next_navigation = require("next/navigation");
5
+ //#region src/contexts/NavigationHistoryContext/hook.ts
6
+ var QP_BACK_URL_NAME = "backUrl";
10
7
  function useNavigationHistory() {
11
- const context = React.useContext(index.NavigationHistoryContext);
12
- const router = navigation.useRouter();
13
- if (!context) {
14
- throw new Error("useNavigationHistory debe usarse dentro de un NavigationHistoryProvider");
15
- }
16
- const searchParams = navigation.useSearchParams();
17
- const { history } = context;
18
- const goBack = (fallback) => {
19
- const returnUrl = searchParams.get(QP_BACK_URL_NAME);
20
- if (returnUrl) {
21
- router.push(returnUrl);
22
- return;
23
- }
24
- if (history.length <= 1) {
25
- router.push(fallback ?? "/");
26
- return;
27
- }
28
- const previousRoute = history[history.length - 2];
29
- const currentRoute = history[history.length - 1];
30
- if (history.length >= 3 && history[history.length - 3] === currentRoute) {
31
- router.push(fallback ?? "/");
32
- return;
33
- }
34
- router.push(previousRoute ?? "/");
35
- };
36
- return {
37
- history,
38
- goBack,
39
- currentRoute: history.length > 0 ? history[history.length - 1] : null,
40
- hasPreviousRoute: history.length > 1,
41
- getPreviousRoute: () => history.length >= 2 ? history[history.length - 2] : null
42
- };
8
+ const context = (0, react.useContext)(require_index.NavigationHistoryContext);
9
+ const router = (0, next_navigation.useRouter)();
10
+ if (!context) throw new Error("useNavigationHistory debe usarse dentro de un NavigationHistoryProvider");
11
+ const searchParams = (0, next_navigation.useSearchParams)();
12
+ const { history } = context;
13
+ /**
14
+ * Navega hacia atrás en el historial o a la ruta de fallback
15
+ * @param {string} fallback - Ruta a la que ir si no hay historial previo
16
+ */
17
+ const goBack = (fallback) => {
18
+ const returnUrl = searchParams.get(QP_BACK_URL_NAME);
19
+ if (returnUrl) {
20
+ router.push(returnUrl);
21
+ return;
22
+ }
23
+ if (history.length <= 1) {
24
+ router.push(fallback ?? "/");
25
+ return;
26
+ }
27
+ const previousRoute = history[history.length - 2];
28
+ const currentRoute = history[history.length - 1];
29
+ if (history.length >= 3 && history[history.length - 3] === currentRoute) {
30
+ router.push(fallback ?? "/");
31
+ return;
32
+ }
33
+ router.push(previousRoute ?? "/");
34
+ };
35
+ return {
36
+ history,
37
+ goBack,
38
+ currentRoute: history.length > 0 ? history[history.length - 1] : null,
39
+ hasPreviousRoute: history.length > 1,
40
+ getPreviousRoute: () => history.length >= 2 ? history[history.length - 2] : null
41
+ };
43
42
  }
44
-
43
+ //#endregion
45
44
  exports.QP_BACK_URL_NAME = QP_BACK_URL_NAME;
46
45
  exports.useNavigationHistory = useNavigationHistory;
@@ -1,41 +1,43 @@
1
- import { useRouter, useSearchParams } from 'next/navigation';
2
- import { useContext } from 'react';
3
- import { NavigationHistoryContext } from './index.js';
4
-
5
- const QP_BACK_URL_NAME = "backUrl";
1
+ import { NavigationHistoryContext } from "./index.js";
2
+ import { useContext } from "react";
3
+ import { useRouter, useSearchParams } from "next/navigation";
4
+ //#region src/contexts/NavigationHistoryContext/hook.ts
5
+ var QP_BACK_URL_NAME = "backUrl";
6
6
  function useNavigationHistory() {
7
- const context = useContext(NavigationHistoryContext);
8
- const router = useRouter();
9
- if (!context) {
10
- throw new Error("useNavigationHistory debe usarse dentro de un NavigationHistoryProvider");
11
- }
12
- const searchParams = useSearchParams();
13
- const { history } = context;
14
- const goBack = (fallback) => {
15
- const returnUrl = searchParams.get(QP_BACK_URL_NAME);
16
- if (returnUrl) {
17
- router.push(returnUrl);
18
- return;
19
- }
20
- if (history.length <= 1) {
21
- router.push(fallback ?? "/");
22
- return;
23
- }
24
- const previousRoute = history[history.length - 2];
25
- const currentRoute = history[history.length - 1];
26
- if (history.length >= 3 && history[history.length - 3] === currentRoute) {
27
- router.push(fallback ?? "/");
28
- return;
29
- }
30
- router.push(previousRoute ?? "/");
31
- };
32
- return {
33
- history,
34
- goBack,
35
- currentRoute: history.length > 0 ? history[history.length - 1] : null,
36
- hasPreviousRoute: history.length > 1,
37
- getPreviousRoute: () => history.length >= 2 ? history[history.length - 2] : null
38
- };
7
+ const context = useContext(NavigationHistoryContext);
8
+ const router = useRouter();
9
+ if (!context) throw new Error("useNavigationHistory debe usarse dentro de un NavigationHistoryProvider");
10
+ const searchParams = useSearchParams();
11
+ const { history } = context;
12
+ /**
13
+ * Navega hacia atrás en el historial o a la ruta de fallback
14
+ * @param {string} fallback - Ruta a la que ir si no hay historial previo
15
+ */
16
+ const goBack = (fallback) => {
17
+ const returnUrl = searchParams.get(QP_BACK_URL_NAME);
18
+ if (returnUrl) {
19
+ router.push(returnUrl);
20
+ return;
21
+ }
22
+ if (history.length <= 1) {
23
+ router.push(fallback ?? "/");
24
+ return;
25
+ }
26
+ const previousRoute = history[history.length - 2];
27
+ const currentRoute = history[history.length - 1];
28
+ if (history.length >= 3 && history[history.length - 3] === currentRoute) {
29
+ router.push(fallback ?? "/");
30
+ return;
31
+ }
32
+ router.push(previousRoute ?? "/");
33
+ };
34
+ return {
35
+ history,
36
+ goBack,
37
+ currentRoute: history.length > 0 ? history[history.length - 1] : null,
38
+ hasPreviousRoute: history.length > 1,
39
+ getPreviousRoute: () => history.length >= 2 ? history[history.length - 2] : null
40
+ };
39
41
  }
40
-
42
+ //#endregion
41
43
  export { QP_BACK_URL_NAME, useNavigationHistory };
@@ -1,34 +1,37 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const navigation = require('next/navigation');
8
- const React = require('react');
9
-
10
- const NavigationHistoryContext = React.createContext(null);
1
+ "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let next_navigation = require("next/navigation");
6
+ //#region src/contexts/NavigationHistoryContext/index.tsx
7
+ var NavigationHistoryContext = (0, react.createContext)(null);
11
8
  function NavigationHistoryProvider({ children }) {
12
- const historyRef = React.useRef([]);
13
- return /* @__PURE__ */ jsxRuntime.jsxs(NavigationHistoryContext.Provider, { value: { history: historyRef.current }, children: [
14
- /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(HistoryTracker, { historyRef }) }),
15
- children
16
- ] });
9
+ const historyRef = (0, react.useRef)([]);
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(NavigationHistoryContext.Provider, {
11
+ value: { history: historyRef.current },
12
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
13
+ fallback: null,
14
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HistoryTracker, { historyRef })
15
+ }), children]
16
+ });
17
17
  }
18
18
  function HistoryTracker({ historyRef }) {
19
- const pathname = navigation.usePathname();
20
- const searchParams = navigation.useSearchParams();
21
- React.useEffect(() => {
22
- const fullPath = searchParams?.size ? `${pathname}?${searchParams.toString()}` : pathname;
23
- if (fullPath) {
24
- const currentHistory = historyRef.current;
25
- if (currentHistory.length > 0 && currentHistory[currentHistory.length - 1] === fullPath)
26
- return;
27
- historyRef.current = [...currentHistory, fullPath];
28
- }
29
- }, [pathname, searchParams, historyRef]);
30
- return null;
19
+ const pathname = (0, next_navigation.usePathname)();
20
+ const searchParams = (0, next_navigation.useSearchParams)();
21
+ (0, react.useEffect)(() => {
22
+ const fullPath = searchParams?.size ? `${pathname}?${searchParams.toString()}` : pathname;
23
+ if (fullPath) {
24
+ const currentHistory = historyRef.current;
25
+ if (currentHistory.length > 0 && currentHistory[currentHistory.length - 1] === fullPath) return;
26
+ historyRef.current = [...currentHistory, fullPath];
27
+ }
28
+ }, [
29
+ pathname,
30
+ searchParams,
31
+ historyRef
32
+ ]);
33
+ return null;
31
34
  }
32
-
35
+ //#endregion
33
36
  exports.NavigationHistoryContext = NavigationHistoryContext;
34
37
  exports.NavigationHistoryProvider = NavigationHistoryProvider;
@@ -1,29 +1,35 @@
1
- 'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { usePathname, useSearchParams } from 'next/navigation';
4
- import { useRef, createContext, Suspense, useEffect } from 'react';
5
-
6
- const NavigationHistoryContext = createContext(null);
1
+ "use client";
2
+ import { Suspense, createContext, useEffect, useRef } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { usePathname, useSearchParams } from "next/navigation";
5
+ //#region src/contexts/NavigationHistoryContext/index.tsx
6
+ var NavigationHistoryContext = createContext(null);
7
7
  function NavigationHistoryProvider({ children }) {
8
- const historyRef = useRef([]);
9
- return /* @__PURE__ */ jsxs(NavigationHistoryContext.Provider, { value: { history: historyRef.current }, children: [
10
- /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(HistoryTracker, { historyRef }) }),
11
- children
12
- ] });
8
+ const historyRef = useRef([]);
9
+ return /* @__PURE__ */ jsxs(NavigationHistoryContext.Provider, {
10
+ value: { history: historyRef.current },
11
+ children: [/* @__PURE__ */ jsx(Suspense, {
12
+ fallback: null,
13
+ children: /* @__PURE__ */ jsx(HistoryTracker, { historyRef })
14
+ }), children]
15
+ });
13
16
  }
14
17
  function HistoryTracker({ historyRef }) {
15
- const pathname = usePathname();
16
- const searchParams = useSearchParams();
17
- useEffect(() => {
18
- const fullPath = searchParams?.size ? `${pathname}?${searchParams.toString()}` : pathname;
19
- if (fullPath) {
20
- const currentHistory = historyRef.current;
21
- if (currentHistory.length > 0 && currentHistory[currentHistory.length - 1] === fullPath)
22
- return;
23
- historyRef.current = [...currentHistory, fullPath];
24
- }
25
- }, [pathname, searchParams, historyRef]);
26
- return null;
18
+ const pathname = usePathname();
19
+ const searchParams = useSearchParams();
20
+ useEffect(() => {
21
+ const fullPath = searchParams?.size ? `${pathname}?${searchParams.toString()}` : pathname;
22
+ if (fullPath) {
23
+ const currentHistory = historyRef.current;
24
+ if (currentHistory.length > 0 && currentHistory[currentHistory.length - 1] === fullPath) return;
25
+ historyRef.current = [...currentHistory, fullPath];
26
+ }
27
+ }, [
28
+ pathname,
29
+ searchParams,
30
+ historyRef
31
+ ]);
32
+ return null;
27
33
  }
28
-
34
+ //#endregion
29
35
  export { NavigationHistoryContext, NavigationHistoryProvider };
@@ -1,21 +1,18 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const React = require('react');
8
-
9
- const PageData = React.createContext(void 0);
10
- const PageDataProvider = ({
11
- value,
12
- children
13
- }) => /* @__PURE__ */ jsxRuntime.jsx(PageData.Provider, { value, children });
14
- const usePageData = () => {
15
- const data = React.useContext(PageData);
16
- if (data === void 0) throw new Error("Out of context: usePageData");
17
- return data;
1
+ "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/contexts/PageDataContext/index.tsx
6
+ var PageData = (0, react.createContext)(void 0);
7
+ var PageDataProvider = ({ value, children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageData.Provider, {
8
+ value,
9
+ children
10
+ });
11
+ var usePageData = () => {
12
+ const data = (0, react.useContext)(PageData);
13
+ if (data === void 0) throw new Error("Out of context: usePageData");
14
+ return data;
18
15
  };
19
-
16
+ //#endregion
20
17
  exports.PageDataProvider = PageDataProvider;
21
18
  exports.usePageData = usePageData;
@@ -1,16 +1,16 @@
1
- 'use client';
2
- import { jsx } from 'react/jsx-runtime';
3
- import { createContext, useContext } from 'react';
4
-
5
- const PageData = createContext(void 0);
6
- const PageDataProvider = ({
7
- value,
8
- children
9
- }) => /* @__PURE__ */ jsx(PageData.Provider, { value, children });
10
- const usePageData = () => {
11
- const data = useContext(PageData);
12
- if (data === void 0) throw new Error("Out of context: usePageData");
13
- return data;
1
+ "use client";
2
+ import { createContext, useContext } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/contexts/PageDataContext/index.tsx
5
+ var PageData = createContext(void 0);
6
+ var PageDataProvider = ({ value, children }) => /* @__PURE__ */ jsx(PageData.Provider, {
7
+ value,
8
+ children
9
+ });
10
+ var usePageData = () => {
11
+ const data = useContext(PageData);
12
+ if (data === void 0) throw new Error("Out of context: usePageData");
13
+ return data;
14
14
  };
15
-
15
+ //#endregion
16
16
  export { PageDataProvider, usePageData };
@@ -1,30 +1,21 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const core = require('@mantine/core');
8
- const reactHookForm = require('react-hook-form');
9
-
10
- const Form = ({
11
- methods,
12
- onSubmit = () => {
13
- },
14
- onSubmitError,
15
- ...rest
16
- }) => {
17
- return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.FormProvider, { ...methods, children: /* @__PURE__ */ jsxRuntime.jsx(
18
- core.Box,
19
- {
20
- component: "form",
21
- onSubmit: (e) => {
22
- e.stopPropagation();
23
- methods.handleSubmit(onSubmit, onSubmitError)(e);
24
- },
25
- ...rest
26
- }
27
- ) });
1
+ "use client";
2
+ require("../_virtual/_rolldown/runtime.cjs");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ let _mantine_core = require("@mantine/core");
5
+ let react_hook_form = require("react-hook-form");
6
+ //#region src/form/Form.tsx
7
+ var Form = ({ methods, onSubmit = () => {}, onSubmitError, ...rest }) => {
8
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_hook_form.FormProvider, {
9
+ ...methods,
10
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
11
+ component: "form",
12
+ onSubmit: (e) => {
13
+ e.stopPropagation();
14
+ methods.handleSubmit(onSubmit, onSubmitError)(e);
15
+ },
16
+ ...rest
17
+ })
18
+ });
28
19
  };
29
-
20
+ //#endregion
30
21
  exports.Form = Form;