arktype 3.0.0-beta.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +162 -10
  2. package/out/attributes.d.ts +4 -2
  3. package/out/checkers.d.ts +37 -2
  4. package/out/{chunk-Z4F45ZTE.js → chunk-2U2AWCI3.js} +3 -3
  5. package/out/{chunk-5NJWD7CO.js → chunk-5U2ZMDNI.js} +215 -140
  6. package/out/{chunk-KJ3C5GTL.js → chunk-DLWCO4RV.js} +1 -1
  7. package/out/{chunk-H4VRNKMB.js → chunk-E3DZXEZK.js} +1 -1
  8. package/out/{chunk-EJZJUYPI.js → chunk-EVCML554.js} +2 -2
  9. package/out/{chunk-KI2MOYNT.js → chunk-GPNK5353.js} +184 -32
  10. package/out/{chunk-LUXERINN.js → chunk-RAZ3TXOE.js} +40 -38
  11. package/out/chunk-SWOOCAHN.js +4 -0
  12. package/out/{chunk-ARTS74PX.js → chunk-UETB6YE2.js} +1 -1
  13. package/out/{chunk-JHDPSG5Y.js → chunk-UK5UGFOX.js} +6 -6
  14. package/out/{chunk-WEPQK3AY.js → chunk-VV6YDN2D.js} +441 -145
  15. package/out/codecs.js +5 -5
  16. package/out/config.d.ts +6 -3
  17. package/out/i18n.d.ts +1 -1
  18. package/out/i18n.js +1 -1
  19. package/out/index.d.ts +1 -1
  20. package/out/index.js +5 -5
  21. package/out/internal.d.ts +1 -0
  22. package/out/internal.js +11 -11
  23. package/out/island.js +2 -2
  24. package/out/islandDependency.js +11 -11
  25. package/out/keywords/functions.d.ts +24 -24
  26. package/out/keywords/keywords.d.ts +2 -2
  27. package/out/keywords/phrases.d.ts +23 -23
  28. package/out/keywords/ts.js +2 -2
  29. package/out/locale.d.ts +1 -1
  30. package/out/locales/de.js +1 -1
  31. package/out/locales/en.js +3 -3
  32. package/out/match.d.ts +5 -3
  33. package/out/mutatesInput.js +2 -2
  34. package/out/parser/definition.d.ts +54 -3
  35. package/out/parser/shift/operand/unenclosed.d.ts +3 -1
  36. package/out/parser/shift/operand/unresolvable.d.ts +68 -0
  37. package/out/parser/shift/operator/bounds.d.ts +4 -1
  38. package/out/runtime.d.ts +34 -25
  39. package/out/runtime.js +2 -2
  40. package/out/runtimeDevelopment.js +63 -4
  41. package/out/scope.d.ts +4 -4
  42. package/out/standalone/artifact.d.ts +4 -0
  43. package/out/standalone/baking.d.ts +8 -1
  44. package/out/standalone/sites.d.ts +6 -3
  45. package/out/standalone/values.d.ts +2 -0
  46. package/out/type.d.ts +42 -5
  47. package/package.json +49 -6
  48. package/skills/arktype/SKILL.md +211 -92
  49. package/skills/arktype/references/migrating.md +990 -255
  50. package/skills/arktype/references/precompile.md +8 -5
  51. package/out/chunk-EDEN5UWG.js +0 -4
@@ -102,8 +102,8 @@ var isEpochString = (s, ctx) => {
102
102
  };
103
103
  var jsonString = "a JSON string";
104
104
  var describeSyntaxError = ({ name, message }) => `${name}: ${message}`;
105
- var writeJsonSyntaxErrorProblem = (error) => `must be ${jsonString} (${describeSyntaxError(error)})`;
106
- var jsonProblem = (e, locale) => e.code === "predicate" && e.cause !== void 0 ? writeJsonSyntaxErrorProblem(e.cause) : locale.problem(e, locale);
105
+ var writeJsonSyntaxErrorMessage = (error) => `must be ${jsonString} (${describeSyntaxError(error)})`;
106
+ var jsonMessage = (e, locale) => e.code === "predicate" && e.cause !== void 0 ? writeJsonSyntaxErrorMessage(e.cause) : locale.message(e, locale);
107
107
  var jsonError = /* @__PURE__ */ keywordError("string.json", jsonString);
108
108
  var isJsonString = (s, ctx) => {
109
109
  try {
@@ -188,11 +188,11 @@ var isRegexPattern = (s, ctx) => {
188
188
  }
189
189
  };
190
190
  var raisedErrorPhrases = {
191
- "string.json": { noun: jsonString, problem: jsonProblem },
192
- "string.json.parse": { noun: jsonString, problem: jsonProblem },
191
+ "string.json": { noun: jsonString, message: jsonMessage },
192
+ "string.json.parse": { noun: jsonString, message: jsonMessage },
193
193
  "string.regex": {
194
194
  noun: regexPattern,
195
- problem: (e, locale) => e.code === "predicate" && e.cause !== void 0 ? `must be ${regexPattern} (${describeSyntaxError(e.cause)})` : locale.problem(e, locale)
195
+ message: (e, locale) => e.code === "predicate" && e.cause !== void 0 ? `must be ${regexPattern} (${describeSyntaxError(e.cause)})` : locale.message(e, locale)
196
196
  }
197
197
  };
198
198
  var plainUrl = /^[Hh][Tt]{2}[Pp][Ss]?:\/\/(?:[\dA-Za-z]+(?:-[\dA-Za-z]+)*\.)*[A-Za-z]+(?::\d{1,4})?(?:[#/?]|$)/;
@@ -236,7 +236,7 @@ export {
236
236
  maxEpoch,
237
237
  epochDescriptions,
238
238
  isEpochString,
239
- writeJsonSyntaxErrorProblem,
239
+ writeJsonSyntaxErrorMessage,
240
240
  isJsonString,
241
241
  parseJson,
242
242
  stringifyJson,