lkd-web-kit 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/components/EmptyState/index.cjs +24 -12
  2. package/dist/components/EmptyState/index.js +24 -12
  3. package/dist/components/Icon.cjs +2 -3
  4. package/dist/components/Icon.js +2 -3
  5. package/dist/components/SelectInfinity/index.cjs +7 -4
  6. package/dist/components/SelectInfinity/index.js +7 -4
  7. package/dist/hooks/useZodConfig.cjs +2 -2
  8. package/dist/hooks/useZodConfig.js +2 -2
  9. package/dist/index.d.ts +4 -4
  10. package/package.json +7 -7
  11. package/dist/node_modules/zod/v4/classic/coerce.cjs +0 -28
  12. package/dist/node_modules/zod/v4/classic/coerce.js +0 -20
  13. package/dist/node_modules/zod/v4/classic/compat.cjs +0 -37
  14. package/dist/node_modules/zod/v4/classic/compat.js +0 -30
  15. package/dist/node_modules/zod/v4/classic/errors.cjs +0 -49
  16. package/dist/node_modules/zod/v4/classic/errors.js +0 -44
  17. package/dist/node_modules/zod/v4/classic/external.cjs +0 -231
  18. package/dist/node_modules/zod/v4/classic/external.js +0 -28
  19. package/dist/node_modules/zod/v4/classic/index.cjs +0 -10
  20. package/dist/node_modules/zod/v4/classic/index.js +0 -5
  21. package/dist/node_modules/zod/v4/classic/iso.cjs +0 -46
  22. package/dist/node_modules/zod/v4/classic/iso.js +0 -35
  23. package/dist/node_modules/zod/v4/classic/parse.cjs +0 -16
  24. package/dist/node_modules/zod/v4/classic/parse.js +0 -9
  25. package/dist/node_modules/zod/v4/classic/schemas.cjs +0 -1155
  26. package/dist/node_modules/zod/v4/classic/schemas.js +0 -1006
  27. package/dist/node_modules/zod/v4/core/api.cjs +0 -1016
  28. package/dist/node_modules/zod/v4/core/api.js +0 -903
  29. package/dist/node_modules/zod/v4/core/checks.cjs +0 -587
  30. package/dist/node_modules/zod/v4/core/checks.js +0 -562
  31. package/dist/node_modules/zod/v4/core/core.cjs +0 -72
  32. package/dist/node_modules/zod/v4/core/core.js +0 -63
  33. package/dist/node_modules/zod/v4/core/doc.cjs +0 -41
  34. package/dist/node_modules/zod/v4/core/doc.js +0 -37
  35. package/dist/node_modules/zod/v4/core/errors.cjs +0 -204
  36. package/dist/node_modules/zod/v4/core/errors.js +0 -194
  37. package/dist/node_modules/zod/v4/core/function.cjs +0 -81
  38. package/dist/node_modules/zod/v4/core/function.js +0 -76
  39. package/dist/node_modules/zod/v4/core/index.cjs +0 -261
  40. package/dist/node_modules/zod/v4/core/index.js +0 -20
  41. package/dist/node_modules/zod/v4/core/json-schema.cjs +0 -2
  42. package/dist/node_modules/zod/v4/core/json-schema.js +0 -1
  43. package/dist/node_modules/zod/v4/core/parse.cjs +0 -71
  44. package/dist/node_modules/zod/v4/core/parse.js +0 -60
  45. package/dist/node_modules/zod/v4/core/regexes.cjs +0 -139
  46. package/dist/node_modules/zod/v4/core/regexes.js +0 -95
  47. package/dist/node_modules/zod/v4/core/registries.cjs +0 -52
  48. package/dist/node_modules/zod/v4/core/registries.js +0 -44
  49. package/dist/node_modules/zod/v4/core/schemas.cjs +0 -1793
  50. package/dist/node_modules/zod/v4/core/schemas.js +0 -1720
  51. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +0 -823
  52. package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -818
  53. package/dist/node_modules/zod/v4/core/util.cjs +0 -543
  54. package/dist/node_modules/zod/v4/core/util.js +0 -491
  55. package/dist/node_modules/zod/v4/core/versions.cjs +0 -11
  56. package/dist/node_modules/zod/v4/core/versions.js +0 -7
  57. package/dist/node_modules/zod/v4/index.cjs +0 -10
  58. package/dist/node_modules/zod/v4/index.js +0 -5
  59. package/dist/node_modules/zod/v4/locales/ar.cjs +0 -121
  60. package/dist/node_modules/zod/v4/locales/ar.js +0 -119
  61. package/dist/node_modules/zod/v4/locales/az.cjs +0 -120
  62. package/dist/node_modules/zod/v4/locales/az.js +0 -118
  63. package/dist/node_modules/zod/v4/locales/be.cjs +0 -169
  64. package/dist/node_modules/zod/v4/locales/be.js +0 -167
  65. package/dist/node_modules/zod/v4/locales/ca.cjs +0 -123
  66. package/dist/node_modules/zod/v4/locales/ca.js +0 -121
  67. package/dist/node_modules/zod/v4/locales/cs.cjs +0 -140
  68. package/dist/node_modules/zod/v4/locales/cs.js +0 -138
  69. package/dist/node_modules/zod/v4/locales/de.cjs +0 -121
  70. package/dist/node_modules/zod/v4/locales/de.js +0 -119
  71. package/dist/node_modules/zod/v4/locales/en.cjs +0 -125
  72. package/dist/node_modules/zod/v4/locales/en.js +0 -120
  73. package/dist/node_modules/zod/v4/locales/eo.cjs +0 -124
  74. package/dist/node_modules/zod/v4/locales/eo.js +0 -119
  75. package/dist/node_modules/zod/v4/locales/es.cjs +0 -122
  76. package/dist/node_modules/zod/v4/locales/es.js +0 -120
  77. package/dist/node_modules/zod/v4/locales/fa.cjs +0 -127
  78. package/dist/node_modules/zod/v4/locales/fa.js +0 -125
  79. package/dist/node_modules/zod/v4/locales/fi.cjs +0 -127
  80. package/dist/node_modules/zod/v4/locales/fi.js +0 -125
  81. package/dist/node_modules/zod/v4/locales/fr-CA.cjs +0 -122
  82. package/dist/node_modules/zod/v4/locales/fr-CA.js +0 -120
  83. package/dist/node_modules/zod/v4/locales/fr.cjs +0 -121
  84. package/dist/node_modules/zod/v4/locales/fr.js +0 -119
  85. package/dist/node_modules/zod/v4/locales/he.cjs +0 -122
  86. package/dist/node_modules/zod/v4/locales/he.js +0 -120
  87. package/dist/node_modules/zod/v4/locales/hu.cjs +0 -122
  88. package/dist/node_modules/zod/v4/locales/hu.js +0 -120
  89. package/dist/node_modules/zod/v4/locales/id.cjs +0 -121
  90. package/dist/node_modules/zod/v4/locales/id.js +0 -119
  91. package/dist/node_modules/zod/v4/locales/index.cjs +0 -85
  92. package/dist/node_modules/zod/v4/locales/index.js +0 -39
  93. package/dist/node_modules/zod/v4/locales/it.cjs +0 -122
  94. package/dist/node_modules/zod/v4/locales/it.js +0 -120
  95. package/dist/node_modules/zod/v4/locales/ja.cjs +0 -120
  96. package/dist/node_modules/zod/v4/locales/ja.js +0 -118
  97. package/dist/node_modules/zod/v4/locales/kh.cjs +0 -122
  98. package/dist/node_modules/zod/v4/locales/kh.js +0 -120
  99. package/dist/node_modules/zod/v4/locales/ko.cjs +0 -126
  100. package/dist/node_modules/zod/v4/locales/ko.js +0 -124
  101. package/dist/node_modules/zod/v4/locales/mk.cjs +0 -123
  102. package/dist/node_modules/zod/v4/locales/mk.js +0 -121
  103. package/dist/node_modules/zod/v4/locales/ms.cjs +0 -121
  104. package/dist/node_modules/zod/v4/locales/ms.js +0 -119
  105. package/dist/node_modules/zod/v4/locales/nl.cjs +0 -122
  106. package/dist/node_modules/zod/v4/locales/nl.js +0 -120
  107. package/dist/node_modules/zod/v4/locales/no.cjs +0 -121
  108. package/dist/node_modules/zod/v4/locales/no.js +0 -119
  109. package/dist/node_modules/zod/v4/locales/ota.cjs +0 -122
  110. package/dist/node_modules/zod/v4/locales/ota.js +0 -120
  111. package/dist/node_modules/zod/v4/locales/pl.cjs +0 -122
  112. package/dist/node_modules/zod/v4/locales/pl.js +0 -120
  113. package/dist/node_modules/zod/v4/locales/ps.cjs +0 -127
  114. package/dist/node_modules/zod/v4/locales/ps.js +0 -125
  115. package/dist/node_modules/zod/v4/locales/pt.cjs +0 -121
  116. package/dist/node_modules/zod/v4/locales/pt.js +0 -119
  117. package/dist/node_modules/zod/v4/locales/ru.cjs +0 -169
  118. package/dist/node_modules/zod/v4/locales/ru.js +0 -167
  119. package/dist/node_modules/zod/v4/locales/sl.cjs +0 -122
  120. package/dist/node_modules/zod/v4/locales/sl.js +0 -120
  121. package/dist/node_modules/zod/v4/locales/sv.cjs +0 -123
  122. package/dist/node_modules/zod/v4/locales/sv.js +0 -121
  123. package/dist/node_modules/zod/v4/locales/ta.cjs +0 -122
  124. package/dist/node_modules/zod/v4/locales/ta.js +0 -120
  125. package/dist/node_modules/zod/v4/locales/th.cjs +0 -122
  126. package/dist/node_modules/zod/v4/locales/th.js +0 -120
  127. package/dist/node_modules/zod/v4/locales/tr.cjs +0 -123
  128. package/dist/node_modules/zod/v4/locales/tr.js +0 -118
  129. package/dist/node_modules/zod/v4/locales/ua.cjs +0 -122
  130. package/dist/node_modules/zod/v4/locales/ua.js +0 -120
  131. package/dist/node_modules/zod/v4/locales/ur.cjs +0 -122
  132. package/dist/node_modules/zod/v4/locales/ur.js +0 -120
  133. package/dist/node_modules/zod/v4/locales/vi.cjs +0 -121
  134. package/dist/node_modules/zod/v4/locales/vi.js +0 -119
  135. package/dist/node_modules/zod/v4/locales/zh-CN.cjs +0 -121
  136. package/dist/node_modules/zod/v4/locales/zh-CN.js +0 -119
  137. package/dist/node_modules/zod/v4/locales/zh-TW.cjs +0 -122
  138. package/dist/node_modules/zod/v4/locales/zh-TW.js +0 -120
@@ -1,122 +0,0 @@
1
- 'use strict';
2
-
3
- const util = require('../core/util.cjs');
4
-
5
- const error = () => {
6
- const Sizable = {
7
- string: { unit: "harf", verb: "olmalıdır" },
8
- file: { unit: "bayt", verb: "olmalıdır" },
9
- array: { unit: "unsur", verb: "olmalıdır" },
10
- set: { unit: "unsur", verb: "olmalıdır" },
11
- };
12
- function getSizing(origin) {
13
- return Sizable[origin] ?? null;
14
- }
15
- const parsedType = (data) => {
16
- const t = typeof data;
17
- switch (t) {
18
- case "number": {
19
- return Number.isNaN(data) ? "NaN" : "numara";
20
- }
21
- case "object": {
22
- if (Array.isArray(data)) {
23
- return "saf";
24
- }
25
- if (data === null) {
26
- return "gayb";
27
- }
28
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
29
- return data.constructor.name;
30
- }
31
- }
32
- }
33
- return t;
34
- };
35
- const Nouns = {
36
- regex: "giren",
37
- email: "epostagâh",
38
- url: "URL",
39
- emoji: "emoji",
40
- uuid: "UUID",
41
- uuidv4: "UUIDv4",
42
- uuidv6: "UUIDv6",
43
- nanoid: "nanoid",
44
- guid: "GUID",
45
- cuid: "cuid",
46
- cuid2: "cuid2",
47
- ulid: "ULID",
48
- xid: "XID",
49
- ksuid: "KSUID",
50
- datetime: "ISO hengâmı",
51
- date: "ISO tarihi",
52
- time: "ISO zamanı",
53
- duration: "ISO müddeti",
54
- ipv4: "IPv4 nişânı",
55
- ipv6: "IPv6 nişânı",
56
- cidrv4: "IPv4 menzili",
57
- cidrv6: "IPv6 menzili",
58
- base64: "base64-şifreli metin",
59
- base64url: "base64url-şifreli metin",
60
- json_string: "JSON metin",
61
- e164: "E.164 sayısı",
62
- jwt: "JWT",
63
- template_literal: "giren",
64
- };
65
- return (issue) => {
66
- switch (issue.code) {
67
- case "invalid_type":
68
- return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
69
- // return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
70
- case "invalid_value":
71
- if (issue.values.length === 1)
72
- return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
73
- return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
74
- case "too_big": {
75
- const adj = issue.inclusive ? "<=" : "<";
76
- const sizing = getSizing(issue.origin);
77
- if (sizing)
78
- return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
79
- return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
80
- }
81
- case "too_small": {
82
- const adj = issue.inclusive ? ">=" : ">";
83
- const sizing = getSizing(issue.origin);
84
- if (sizing) {
85
- return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
86
- }
87
- return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
88
- }
89
- case "invalid_format": {
90
- const _issue = issue;
91
- if (_issue.format === "starts_with")
92
- return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
93
- if (_issue.format === "ends_with")
94
- return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
95
- if (_issue.format === "includes")
96
- return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
97
- if (_issue.format === "regex")
98
- return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
99
- return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
100
- }
101
- case "not_multiple_of":
102
- return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
103
- case "unrecognized_keys":
104
- return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
105
- case "invalid_key":
106
- return `${issue.origin} için tanınmayan anahtar var.`;
107
- case "invalid_union":
108
- return "Giren tanınamadı.";
109
- case "invalid_element":
110
- return `${issue.origin} için tanınmayan kıymet var.`;
111
- default:
112
- return `Kıymet tanınamadı.`;
113
- }
114
- };
115
- };
116
- function ota () {
117
- return {
118
- localeError: error(),
119
- };
120
- }
121
-
122
- module.exports = ota;
@@ -1,120 +0,0 @@
1
- import { joinValues, stringifyPrimitive } from '../core/util.js';
2
-
3
- const error = () => {
4
- const Sizable = {
5
- string: { unit: "harf", verb: "olmalıdır" },
6
- file: { unit: "bayt", verb: "olmalıdır" },
7
- array: { unit: "unsur", verb: "olmalıdır" },
8
- set: { unit: "unsur", verb: "olmalıdır" },
9
- };
10
- function getSizing(origin) {
11
- return Sizable[origin] ?? null;
12
- }
13
- const parsedType = (data) => {
14
- const t = typeof data;
15
- switch (t) {
16
- case "number": {
17
- return Number.isNaN(data) ? "NaN" : "numara";
18
- }
19
- case "object": {
20
- if (Array.isArray(data)) {
21
- return "saf";
22
- }
23
- if (data === null) {
24
- return "gayb";
25
- }
26
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
27
- return data.constructor.name;
28
- }
29
- }
30
- }
31
- return t;
32
- };
33
- const Nouns = {
34
- regex: "giren",
35
- email: "epostagâh",
36
- url: "URL",
37
- emoji: "emoji",
38
- uuid: "UUID",
39
- uuidv4: "UUIDv4",
40
- uuidv6: "UUIDv6",
41
- nanoid: "nanoid",
42
- guid: "GUID",
43
- cuid: "cuid",
44
- cuid2: "cuid2",
45
- ulid: "ULID",
46
- xid: "XID",
47
- ksuid: "KSUID",
48
- datetime: "ISO hengâmı",
49
- date: "ISO tarihi",
50
- time: "ISO zamanı",
51
- duration: "ISO müddeti",
52
- ipv4: "IPv4 nişânı",
53
- ipv6: "IPv6 nişânı",
54
- cidrv4: "IPv4 menzili",
55
- cidrv6: "IPv6 menzili",
56
- base64: "base64-şifreli metin",
57
- base64url: "base64url-şifreli metin",
58
- json_string: "JSON metin",
59
- e164: "E.164 sayısı",
60
- jwt: "JWT",
61
- template_literal: "giren",
62
- };
63
- return (issue) => {
64
- switch (issue.code) {
65
- case "invalid_type":
66
- return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
67
- // return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
68
- case "invalid_value":
69
- if (issue.values.length === 1)
70
- return `Fâsit giren: umulan ${stringifyPrimitive(issue.values[0])}`;
71
- return `Fâsit tercih: mûteberler ${joinValues(issue.values, "|")}`;
72
- case "too_big": {
73
- const adj = issue.inclusive ? "<=" : "<";
74
- const sizing = getSizing(issue.origin);
75
- if (sizing)
76
- return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
77
- return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
78
- }
79
- case "too_small": {
80
- const adj = issue.inclusive ? ">=" : ">";
81
- const sizing = getSizing(issue.origin);
82
- if (sizing) {
83
- return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
84
- }
85
- return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
86
- }
87
- case "invalid_format": {
88
- const _issue = issue;
89
- if (_issue.format === "starts_with")
90
- return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
91
- if (_issue.format === "ends_with")
92
- return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
93
- if (_issue.format === "includes")
94
- return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
95
- if (_issue.format === "regex")
96
- return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
97
- return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
98
- }
99
- case "not_multiple_of":
100
- return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
101
- case "unrecognized_keys":
102
- return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
103
- case "invalid_key":
104
- return `${issue.origin} için tanınmayan anahtar var.`;
105
- case "invalid_union":
106
- return "Giren tanınamadı.";
107
- case "invalid_element":
108
- return `${issue.origin} için tanınmayan kıymet var.`;
109
- default:
110
- return `Kıymet tanınamadı.`;
111
- }
112
- };
113
- };
114
- function ota () {
115
- return {
116
- localeError: error(),
117
- };
118
- }
119
-
120
- export { ota as default };
@@ -1,122 +0,0 @@
1
- 'use strict';
2
-
3
- const util = require('../core/util.cjs');
4
-
5
- const error = () => {
6
- const Sizable = {
7
- string: { unit: "znaków", verb: "mieć" },
8
- file: { unit: "bajtów", verb: "mieć" },
9
- array: { unit: "elementów", verb: "mieć" },
10
- set: { unit: "elementów", verb: "mieć" },
11
- };
12
- function getSizing(origin) {
13
- return Sizable[origin] ?? null;
14
- }
15
- const parsedType = (data) => {
16
- const t = typeof data;
17
- switch (t) {
18
- case "number": {
19
- return Number.isNaN(data) ? "NaN" : "liczba";
20
- }
21
- case "object": {
22
- if (Array.isArray(data)) {
23
- return "tablica";
24
- }
25
- if (data === null) {
26
- return "null";
27
- }
28
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
29
- return data.constructor.name;
30
- }
31
- }
32
- }
33
- return t;
34
- };
35
- const Nouns = {
36
- regex: "wyrażenie",
37
- email: "adres email",
38
- url: "URL",
39
- emoji: "emoji",
40
- uuid: "UUID",
41
- uuidv4: "UUIDv4",
42
- uuidv6: "UUIDv6",
43
- nanoid: "nanoid",
44
- guid: "GUID",
45
- cuid: "cuid",
46
- cuid2: "cuid2",
47
- ulid: "ULID",
48
- xid: "XID",
49
- ksuid: "KSUID",
50
- datetime: "data i godzina w formacie ISO",
51
- date: "data w formacie ISO",
52
- time: "godzina w formacie ISO",
53
- duration: "czas trwania ISO",
54
- ipv4: "adres IPv4",
55
- ipv6: "adres IPv6",
56
- cidrv4: "zakres IPv4",
57
- cidrv6: "zakres IPv6",
58
- base64: "ciąg znaków zakodowany w formacie base64",
59
- base64url: "ciąg znaków zakodowany w formacie base64url",
60
- json_string: "ciąg znaków w formacie JSON",
61
- e164: "liczba E.164",
62
- jwt: "JWT",
63
- template_literal: "wejście",
64
- };
65
- return (issue) => {
66
- switch (issue.code) {
67
- case "invalid_type":
68
- return `Nieprawidłowe dane wejściowe: oczekiwano ${issue.expected}, otrzymano ${parsedType(issue.input)}`;
69
- case "invalid_value":
70
- if (issue.values.length === 1)
71
- return `Nieprawidłowe dane wejściowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;
72
- return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${util.joinValues(issue.values, "|")}`;
73
- case "too_big": {
74
- const adj = issue.inclusive ? "<=" : "<";
75
- const sizing = getSizing(issue.origin);
76
- if (sizing) {
77
- return `Za duża wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementów"}`;
78
- }
79
- return `Zbyt duż(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.maximum.toString()}`;
80
- }
81
- case "too_small": {
82
- const adj = issue.inclusive ? ">=" : ">";
83
- const sizing = getSizing(issue.origin);
84
- if (sizing) {
85
- return `Za mała wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.minimum.toString()} ${sizing.unit ?? "elementów"}`;
86
- }
87
- return `Zbyt mał(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.minimum.toString()}`;
88
- }
89
- case "invalid_format": {
90
- const _issue = issue;
91
- if (_issue.format === "starts_with")
92
- return `Nieprawidłowy ciąg znaków: musi zaczynać się od "${_issue.prefix}"`;
93
- if (_issue.format === "ends_with")
94
- return `Nieprawidłowy ciąg znaków: musi kończyć się na "${_issue.suffix}"`;
95
- if (_issue.format === "includes")
96
- return `Nieprawidłowy ciąg znaków: musi zawierać "${_issue.includes}"`;
97
- if (_issue.format === "regex")
98
- return `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${_issue.pattern}`;
99
- return `Nieprawidłow(y/a/e) ${Nouns[_issue.format] ?? issue.format}`;
100
- }
101
- case "not_multiple_of":
102
- return `Nieprawidłowa liczba: musi być wielokrotnością ${issue.divisor}`;
103
- case "unrecognized_keys":
104
- return `Nierozpoznane klucze${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
105
- case "invalid_key":
106
- return `Nieprawidłowy klucz w ${issue.origin}`;
107
- case "invalid_union":
108
- return "Nieprawidłowe dane wejściowe";
109
- case "invalid_element":
110
- return `Nieprawidłowa wartość w ${issue.origin}`;
111
- default:
112
- return `Nieprawidłowe dane wejściowe`;
113
- }
114
- };
115
- };
116
- function pl () {
117
- return {
118
- localeError: error(),
119
- };
120
- }
121
-
122
- module.exports = pl;
@@ -1,120 +0,0 @@
1
- import { joinValues, stringifyPrimitive } from '../core/util.js';
2
-
3
- const error = () => {
4
- const Sizable = {
5
- string: { unit: "znaków", verb: "mieć" },
6
- file: { unit: "bajtów", verb: "mieć" },
7
- array: { unit: "elementów", verb: "mieć" },
8
- set: { unit: "elementów", verb: "mieć" },
9
- };
10
- function getSizing(origin) {
11
- return Sizable[origin] ?? null;
12
- }
13
- const parsedType = (data) => {
14
- const t = typeof data;
15
- switch (t) {
16
- case "number": {
17
- return Number.isNaN(data) ? "NaN" : "liczba";
18
- }
19
- case "object": {
20
- if (Array.isArray(data)) {
21
- return "tablica";
22
- }
23
- if (data === null) {
24
- return "null";
25
- }
26
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
27
- return data.constructor.name;
28
- }
29
- }
30
- }
31
- return t;
32
- };
33
- const Nouns = {
34
- regex: "wyrażenie",
35
- email: "adres email",
36
- url: "URL",
37
- emoji: "emoji",
38
- uuid: "UUID",
39
- uuidv4: "UUIDv4",
40
- uuidv6: "UUIDv6",
41
- nanoid: "nanoid",
42
- guid: "GUID",
43
- cuid: "cuid",
44
- cuid2: "cuid2",
45
- ulid: "ULID",
46
- xid: "XID",
47
- ksuid: "KSUID",
48
- datetime: "data i godzina w formacie ISO",
49
- date: "data w formacie ISO",
50
- time: "godzina w formacie ISO",
51
- duration: "czas trwania ISO",
52
- ipv4: "adres IPv4",
53
- ipv6: "adres IPv6",
54
- cidrv4: "zakres IPv4",
55
- cidrv6: "zakres IPv6",
56
- base64: "ciąg znaków zakodowany w formacie base64",
57
- base64url: "ciąg znaków zakodowany w formacie base64url",
58
- json_string: "ciąg znaków w formacie JSON",
59
- e164: "liczba E.164",
60
- jwt: "JWT",
61
- template_literal: "wejście",
62
- };
63
- return (issue) => {
64
- switch (issue.code) {
65
- case "invalid_type":
66
- return `Nieprawidłowe dane wejściowe: oczekiwano ${issue.expected}, otrzymano ${parsedType(issue.input)}`;
67
- case "invalid_value":
68
- if (issue.values.length === 1)
69
- return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue.values[0])}`;
70
- return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue.values, "|")}`;
71
- case "too_big": {
72
- const adj = issue.inclusive ? "<=" : "<";
73
- const sizing = getSizing(issue.origin);
74
- if (sizing) {
75
- return `Za duża wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementów"}`;
76
- }
77
- return `Zbyt duż(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.maximum.toString()}`;
78
- }
79
- case "too_small": {
80
- const adj = issue.inclusive ? ">=" : ">";
81
- const sizing = getSizing(issue.origin);
82
- if (sizing) {
83
- return `Za mała wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.minimum.toString()} ${sizing.unit ?? "elementów"}`;
84
- }
85
- return `Zbyt mał(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.minimum.toString()}`;
86
- }
87
- case "invalid_format": {
88
- const _issue = issue;
89
- if (_issue.format === "starts_with")
90
- return `Nieprawidłowy ciąg znaków: musi zaczynać się od "${_issue.prefix}"`;
91
- if (_issue.format === "ends_with")
92
- return `Nieprawidłowy ciąg znaków: musi kończyć się na "${_issue.suffix}"`;
93
- if (_issue.format === "includes")
94
- return `Nieprawidłowy ciąg znaków: musi zawierać "${_issue.includes}"`;
95
- if (_issue.format === "regex")
96
- return `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${_issue.pattern}`;
97
- return `Nieprawidłow(y/a/e) ${Nouns[_issue.format] ?? issue.format}`;
98
- }
99
- case "not_multiple_of":
100
- return `Nieprawidłowa liczba: musi być wielokrotnością ${issue.divisor}`;
101
- case "unrecognized_keys":
102
- return `Nierozpoznane klucze${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
103
- case "invalid_key":
104
- return `Nieprawidłowy klucz w ${issue.origin}`;
105
- case "invalid_union":
106
- return "Nieprawidłowe dane wejściowe";
107
- case "invalid_element":
108
- return `Nieprawidłowa wartość w ${issue.origin}`;
109
- default:
110
- return `Nieprawidłowe dane wejściowe`;
111
- }
112
- };
113
- };
114
- function pl () {
115
- return {
116
- localeError: error(),
117
- };
118
- }
119
-
120
- export { pl as default };
@@ -1,127 +0,0 @@
1
- 'use strict';
2
-
3
- const util = require('../core/util.cjs');
4
-
5
- const error = () => {
6
- const Sizable = {
7
- string: { unit: "توکي", verb: "ولري" },
8
- file: { unit: "بایټس", verb: "ولري" },
9
- array: { unit: "توکي", verb: "ولري" },
10
- set: { unit: "توکي", verb: "ولري" },
11
- };
12
- function getSizing(origin) {
13
- return Sizable[origin] ?? null;
14
- }
15
- const parsedType = (data) => {
16
- const t = typeof data;
17
- switch (t) {
18
- case "number": {
19
- return Number.isNaN(data) ? "NaN" : "عدد";
20
- }
21
- case "object": {
22
- if (Array.isArray(data)) {
23
- return "ارې";
24
- }
25
- if (data === null) {
26
- return "null";
27
- }
28
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
29
- return data.constructor.name;
30
- }
31
- }
32
- }
33
- return t;
34
- };
35
- const Nouns = {
36
- regex: "ورودي",
37
- email: "بریښنالیک",
38
- url: "یو آر ال",
39
- emoji: "ایموجي",
40
- uuid: "UUID",
41
- uuidv4: "UUIDv4",
42
- uuidv6: "UUIDv6",
43
- nanoid: "nanoid",
44
- guid: "GUID",
45
- cuid: "cuid",
46
- cuid2: "cuid2",
47
- ulid: "ULID",
48
- xid: "XID",
49
- ksuid: "KSUID",
50
- datetime: "نیټه او وخت",
51
- date: "نېټه",
52
- time: "وخت",
53
- duration: "موده",
54
- ipv4: "د IPv4 پته",
55
- ipv6: "د IPv6 پته",
56
- cidrv4: "د IPv4 ساحه",
57
- cidrv6: "د IPv6 ساحه",
58
- base64: "base64-encoded متن",
59
- base64url: "base64url-encoded متن",
60
- json_string: "JSON متن",
61
- e164: "د E.164 شمېره",
62
- jwt: "JWT",
63
- template_literal: "ورودي",
64
- };
65
- return (issue) => {
66
- switch (issue.code) {
67
- case "invalid_type":
68
- return `ناسم ورودي: باید ${issue.expected} وای, مګر ${parsedType(issue.input)} ترلاسه شو`;
69
- case "invalid_value":
70
- if (issue.values.length === 1) {
71
- return `ناسم ورودي: باید ${util.stringifyPrimitive(issue.values[0])} وای`;
72
- }
73
- return `ناسم انتخاب: باید یو له ${util.joinValues(issue.values, "|")} څخه وای`;
74
- case "too_big": {
75
- const adj = issue.inclusive ? "<=" : "<";
76
- const sizing = getSizing(issue.origin);
77
- if (sizing) {
78
- return `ډیر لوی: ${issue.origin ?? "ارزښت"} باید ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
79
- }
80
- return `ډیر لوی: ${issue.origin ?? "ارزښت"} باید ${adj}${issue.maximum.toString()} وي`;
81
- }
82
- case "too_small": {
83
- const adj = issue.inclusive ? ">=" : ">";
84
- const sizing = getSizing(issue.origin);
85
- if (sizing) {
86
- return `ډیر کوچنی: ${issue.origin} باید ${adj}${issue.minimum.toString()} ${sizing.unit} ولري`;
87
- }
88
- return `ډیر کوچنی: ${issue.origin} باید ${adj}${issue.minimum.toString()} وي`;
89
- }
90
- case "invalid_format": {
91
- const _issue = issue;
92
- if (_issue.format === "starts_with") {
93
- return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
94
- }
95
- if (_issue.format === "ends_with") {
96
- return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
97
- }
98
- if (_issue.format === "includes") {
99
- return `ناسم متن: باید "${_issue.includes}" ولري`;
100
- }
101
- if (_issue.format === "regex") {
102
- return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
103
- }
104
- return `${Nouns[_issue.format] ?? issue.format} ناسم دی`;
105
- }
106
- case "not_multiple_of":
107
- return `ناسم عدد: باید د ${issue.divisor} مضرب وي`;
108
- case "unrecognized_keys":
109
- return `ناسم ${issue.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${util.joinValues(issue.keys, ", ")}`;
110
- case "invalid_key":
111
- return `ناسم کلیډ په ${issue.origin} کې`;
112
- case "invalid_union":
113
- return `ناسمه ورودي`;
114
- case "invalid_element":
115
- return `ناسم عنصر په ${issue.origin} کې`;
116
- default:
117
- return `ناسمه ورودي`;
118
- }
119
- };
120
- };
121
- function ps () {
122
- return {
123
- localeError: error(),
124
- };
125
- }
126
-
127
- module.exports = ps;