arktype 3.0.0-rc.2 → 3.0.0-rc.4

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 (54) hide show
  1. package/out/_internal/schema/runtime.d.ts +1 -0
  2. package/out/_internal/schema/shared/errorReaders.d.ts +28 -0
  3. package/out/_internal/schema/shared/errors.d.ts +1 -17
  4. package/out/_internal/util/registry.d.ts +1 -1
  5. package/out/{chunk-Y2TFSHFX.js → chunk-26Q54DLB.js} +1 -1
  6. package/out/{chunk-7Z2PAVYM.js → chunk-2CTZEGD2.js} +2 -2
  7. package/out/{chunk-EKGIGICV.js → chunk-2ZLGZFMR.js} +1 -1
  8. package/out/{chunk-VAINYPPF.js → chunk-45TLVTHM.js} +8 -3
  9. package/out/{chunk-OYXE5CE5.js → chunk-5FMUN4UX.js} +3 -3
  10. package/out/{chunk-LTN7VXMY.js → chunk-7WE6VANM.js} +1 -1
  11. package/out/{chunk-5PRGHK54.js → chunk-ADLJDWDI.js} +2 -2
  12. package/out/{chunk-KJZZKC2H.js → chunk-AHXBL3IH.js} +1 -1
  13. package/out/{chunk-S6DRXKT4.js → chunk-AK2LKC6C.js} +3 -3
  14. package/out/{chunk-4HAPNBDR.js → chunk-BGUHS6JL.js} +2 -2
  15. package/out/{chunk-XYY247DI.js → chunk-CRZREJ4G.js} +2 -2
  16. package/out/{chunk-MBNIYKKT.js → chunk-D4LE34UY.js} +2 -53
  17. package/out/{chunk-V6DOZAY6.js → chunk-DHHFHTCR.js} +26 -16
  18. package/out/{chunk-VP4BXXZ3.js → chunk-EQMTLVCQ.js} +5 -5
  19. package/out/{chunk-3KBOPH3J.js → chunk-GU3X7OIZ.js} +55 -1
  20. package/out/{chunk-DHYWNLY2.js → chunk-IL34UI7W.js} +2 -2
  21. package/out/{chunk-27A5YUWC.js → chunk-J7NBKIKH.js} +1 -1
  22. package/out/{chunk-XGHWKRD2.js → chunk-J7QORHIL.js} +3 -3
  23. package/out/{chunk-IPRMNVLB.js → chunk-KCMI6RWS.js} +15 -15
  24. package/out/{chunk-ZWHHA52N.js → chunk-KSJQV74J.js} +3 -3
  25. package/out/{chunk-4FZ7IGD5.js → chunk-PGCPLG3X.js} +3 -3
  26. package/out/{chunk-Q66VX6I4.js → chunk-QV545A7L.js} +3 -3
  27. package/out/{chunk-BNRMJNNR.js → chunk-SKBFK3NY.js} +5 -5
  28. package/out/{chunk-YX63Q6AT.js → chunk-U73QHTHA.js} +3 -3
  29. package/out/{chunk-TEE6JS3X.js → chunk-WNFWNDER.js} +6 -6
  30. package/out/codecs.js +12 -12
  31. package/out/config.js +6 -6
  32. package/out/errors.js +7 -7
  33. package/out/i18n.js +4 -4
  34. package/out/index.js +12 -12
  35. package/out/internal.js +25 -25
  36. package/out/island.js +13 -13
  37. package/out/islandDependency.js +26 -26
  38. package/out/keywords/ts.js +8 -8
  39. package/out/locales/de.js +5 -5
  40. package/out/locales/en.js +10 -10
  41. package/out/mutatesInput.js +9 -9
  42. package/out/precompiled.js +7 -7
  43. package/out/runtime.d.ts +4 -2
  44. package/out/runtime.js +1 -1
  45. package/out/schema.js +7 -7
  46. package/out/schemaInternal.js +17 -17
  47. package/out/schemaRuntime.js +2 -2
  48. package/out/schemaRuntimeLean.js +87 -0
  49. package/out/schemaRuntimeNone.js +87 -0
  50. package/out/schemaRuntimeNoneLean.js +87 -0
  51. package/out/util.js +1 -1
  52. package/package.json +4 -4
  53. package/skills/arktype/references/precompile.md +25 -25
  54. /package/out/{chunk-46PLKNON.js → chunk-BMIVLSDP.js} +0 -0
@@ -1,6 +1,7 @@
1
1
  import type { ArkSchemaConfig, ResolvedConfig } from "./config.ts";
2
2
  export type { ArkError, ArkErrorCode, ArkErrorInput, RejectInput, ErrorContextsByCode } from "./shared/errors.ts";
3
3
  export * from "./shared/enWriters.ts";
4
+ export * from "./shared/errorReaders.ts";
4
5
  export { appliesValues, discriminatesBooleans, failsInBranches, findsOnRead, holdsExpression, listsUnions, transformsBranches, traversesUnions } from "./shared/issueFeatures.ts";
5
6
  export * from "./shared/issues.ts";
6
7
  export * from "./shared/listed.ts";
@@ -0,0 +1,28 @@
1
+ /** an issue as the readers read it, arktype's or a standalone validator's */
2
+ export interface PathedIssue {
3
+ readonly path: readonly PropertyKey[];
4
+ readonly message: string;
5
+ /** written by arktype as the issue is, absent from a standalone validator's */
6
+ readonly propString?: string;
7
+ }
8
+ /** errors as the readers read them, arktype's or a standalone validator's */
9
+ export interface ReadableErrors<issue extends PathedIssue = PathedIssue> {
10
+ readonly issues: readonly issue[];
11
+ }
12
+ /**
13
+ * The first error at each path, by the string of the path.
14
+ */
15
+ export declare const byPath: <issue extends PathedIssue>(errors: ReadableErrors<issue>) => Record<string, issue>;
16
+ /**
17
+ * Each path's errors, by the string of the path.
18
+ */
19
+ export declare const flatByPath: <issue extends PathedIssue>(errors: ReadableErrors<issue>) => Record<string, issue[]>;
20
+ /**
21
+ * Each path's messages, by the string of the path.
22
+ */
23
+ export declare const flatMessagesByPath: (errors: ReadableErrors) => Record<string, string[]>;
24
+ /**
25
+ * All path strings at which errors are present mapped to the errors occuring
26
+ * at that path or any nested path within it.
27
+ */
28
+ export declare const byAncestorPath: <issue extends PathedIssue>(errors: ReadableErrors<issue>) => Record<string, issue[]>;
@@ -182,23 +182,7 @@ export declare const serializableErrors: (issues: ArkError[]) => readonly ArkErr
182
182
  * The first of `errors.issues`, its text written without the rest's.
183
183
  */
184
184
  export declare const firstIssue: (errors: ArkErrors) => ArkError;
185
- /**
186
- * The first error at each path, by the string of the path.
187
- */
188
- export declare const byPath: (errors: ArkErrors) => Record<string, ArkError>;
189
- /**
190
- * Each path's errors, by the string of the path.
191
- */
192
- export declare const flatByPath: (errors: ArkErrors) => Record<string, ArkError[]>;
193
- /**
194
- * Each path's messages, by the string of the path.
195
- */
196
- export declare const flatMessagesByPath: (errors: ArkErrors) => Record<string, string[]>;
197
- /**
198
- * All path strings at which errors are present mapped to the errors occuring
199
- * at that path or any nested path within it.
200
- */
201
- export declare const byAncestorPath: (errors: ArkErrors) => Record<string, ArkError[]>;
185
+ export { byAncestorPath, byPath, flatByPath, flatMessagesByPath } from "./errorReaders.ts";
202
186
  export interface DerivableErrorContext<code extends ArkErrorCode = ArkErrorCode> {
203
187
  expected: string;
204
188
  actual: string;
@@ -1,4 +1,4 @@
1
- export declare const arkUtilVersion = "3.0.0-rc.2";
1
+ export declare const arkUtilVersion = "3.0.0-rc.4";
2
2
  export declare const initialRegistryContents: {
3
3
  version: string;
4
4
  FileConstructor: typeof File;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configureSchema
3
- } from "./chunk-ZWHHA52N.js";
3
+ } from "./chunk-KSJQV74J.js";
4
4
 
5
5
  // out/config.js
6
6
  var configure = configureSchema;
@@ -11,10 +11,10 @@ import {
11
11
  writeInvalidLocaleObjectMessage,
12
12
  writeKeywordExpected,
13
13
  writeText
14
- } from "./chunk-MBNIYKKT.js";
14
+ } from "./chunk-D4LE34UY.js";
15
15
  import {
16
16
  describeActual
17
- } from "./chunk-3KBOPH3J.js";
17
+ } from "./chunk-GU3X7OIZ.js";
18
18
  import {
19
19
  omit,
20
20
  stringifyPath,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configure
3
- } from "./chunk-Y2TFSHFX.js";
3
+ } from "./chunk-26Q54DLB.js";
4
4
 
5
5
  // out/island.js
6
6
  import { shareConfig } from "arktype/schema/runtime";
@@ -16,7 +16,7 @@ import {
16
16
  // out/runtime.js
17
17
  import { ArkErrors as ArkErrors2, codedIssue, describeActual, enInfo, errorsOf, failsKey, failsKeySite, failsSite, findsOnRead, FirstIssues, holdsExpression, inContext, isCustomIssue, issueAt, issuesOf, mergeIssues, runtimeConfig as runtimeConfig2, sharedMessageOf, supportedJsonSchemaTargets, throwOnDefault, ToJsonSchemaError, traversesUnions, validateStandardJsonSchemaTarget, writeFromPath, writeListed, withContextOf } from "arktype/schema/runtime";
18
18
  import { addErrors, addMorphErrs, allowsInBranchBy, allowsInContext, allowsUntracked, appliesValues, ArkErrors, copyOf, describePredicate, discriminatesBooleans, enterApplied, exitApplied, failsInBranches, pipeApplied, pipeChecked, pipeTransformed, runtimeConfig, runtimeScope, silentCtx, TransformErrors, transformed, transformedInApply, transformIfAllowed, transformResolution, transformsBranches, transformsValid } from "arktype/schema/runtime";
19
- export { aliasVisits, allowsAcyclic, allowsInBranch, applyCyclic, applyIssues, applyRejected, arrayIndexMatcher, callMorph, codedIssue, computeDefaultValueMorph, configure, configuredFallbackOf, configuredWriterOf, copyDeclared, alikeIssue, describeCollapsibleDate, disallowed, enInfo, enterResolution, execMorph, exitResolution, failsKey, failsKeySite, failsSite, FirstIssues, FirstIssueTraversal, fixConfig, foundErrors, fixConfigured, holdsOnlyIndices, keepOwn, InternalTraversal, listedIssue, matchesRepeated, mergeTransformed, missingTextOf, pipe, printKind, rejected, rejects, throwIssues, throwOnDefault, Traversal, TraversalError, tryMorph, withContextOf, writeDomainActual, writeLengthActual, writeMessage, writeNotEqualActual, writeProtoActual, writeNullableJsonSchema, writeUnionJsonSchema, writeUnitActual, writeUnitMessage } from "arktype/schema/runtime";
19
+ export { aliasVisits, allowsAcyclic, allowsInBranch, applyCyclic, applyIssues, applyRejected, arrayIndexMatcher, byAncestorPath, byPath, callMorph, codedIssue, computeDefaultValueMorph, configure, configuredFallbackOf, configuredWriterOf, copyDeclared, alikeIssue, describeCollapsibleDate, disallowed, enInfo, enterResolution, execMorph, exitResolution, failsKey, failsKeySite, failsSite, FirstIssues, FirstIssueTraversal, fixConfig, flatByPath, flatMessagesByPath, foundErrors, fixConfigured, holdsOnlyIndices, keepOwn, InternalTraversal, listedIssue, matchesRepeated, mergeTransformed, missingTextOf, pipe, printKind, rejected, rejects, throwIssues, throwOnDefault, Traversal, TraversalError, tryMorph, withContextOf, writeDomainActual, writeLengthActual, writeMessage, writeNotEqualActual, writeProtoActual, writeNullableJsonSchema, writeUnionJsonSchema, writeUnitActual, writeUnitMessage } from "arktype/schema/runtime";
20
20
 
21
21
  // out/checkers.js
22
22
  import { listedIssue } from "arktype/schema/runtime";
@@ -810,7 +810,11 @@ var union = ((branches, description, issueOf, fails) => {
810
810
  });
811
811
 
812
812
  // out/runtime.js
813
- var precompiledForArktype_3_0_0_rc_2 = true;
813
+ var createRegex = (src, flags) => new RegExp(src, flags);
814
+ var regex = /* @__PURE__ */ Object.assign(createRegex, {
815
+ as: createRegex
816
+ });
817
+ var precompiledForArktype_3_0_0_rc_4 = true;
814
818
  var assign = /* @__PURE__ */ (() => Object.assign)();
815
819
  var is = /* @__PURE__ */ (() => Object.is)();
816
820
  var freeze = /* @__PURE__ */ (() => Object.freeze)();
@@ -1480,7 +1484,8 @@ export {
1480
1484
  discriminate,
1481
1485
  discriminateOr,
1482
1486
  union,
1483
- precompiledForArktype_3_0_0_rc_2,
1487
+ regex,
1488
+ precompiledForArktype_3_0_0_rc_4,
1484
1489
  assign,
1485
1490
  is,
1486
1491
  freeze,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  type
3
- } from "./chunk-BNRMJNNR.js";
3
+ } from "./chunk-SKBFK3NY.js";
4
4
  import {
5
5
  parse
6
- } from "./chunk-VP4BXXZ3.js";
6
+ } from "./chunk-EQMTLVCQ.js";
7
7
  import {
8
8
  RootModule
9
- } from "./chunk-TEE6JS3X.js";
9
+ } from "./chunk-WNFWNDER.js";
10
10
 
11
11
  // out/fromJsonSchema.js
12
12
  var fromJsonSchema = (schema) => (
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4HREHNIV.js";
4
4
  import {
5
5
  en
6
- } from "./chunk-TEE6JS3X.js";
6
+ } from "./chunk-WNFWNDER.js";
7
7
 
8
8
  // out/keywords/phrases.js
9
9
  var epoch = "an integer representing a safe Unix timestamp";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  registerBuilderCompiler,
3
3
  registeredReference
4
- } from "./chunk-MBNIYKKT.js";
4
+ } from "./chunk-D4LE34UY.js";
5
5
  import {
6
6
  TransformErrors,
7
7
  addMorphErrs,
@@ -16,7 +16,7 @@ import {
16
16
  transformResolution,
17
17
  transformedInApply,
18
18
  transformsValid
19
- } from "./chunk-3KBOPH3J.js";
19
+ } from "./chunk-GU3X7OIZ.js";
20
20
  import {
21
21
  CastableBase,
22
22
  DynamicFunction,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  en
3
- } from "./chunk-TEE6JS3X.js";
3
+ } from "./chunk-WNFWNDER.js";
4
4
 
5
5
  // out/locales/en.js
6
6
  var en2 = en;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rootApplyRuntime
3
- } from "./chunk-4FZ7IGD5.js";
3
+ } from "./chunk-PGCPLG3X.js";
4
4
  import {
5
5
  $ark,
6
6
  ArkErrors,
@@ -9,10 +9,10 @@ import {
9
9
  invalidError,
10
10
  isArkError,
11
11
  serializableErrors
12
- } from "./chunk-MBNIYKKT.js";
12
+ } from "./chunk-D4LE34UY.js";
13
13
  import {
14
14
  lineOf
15
- } from "./chunk-3KBOPH3J.js";
15
+ } from "./chunk-GU3X7OIZ.js";
16
16
 
17
17
  // ../schema/out/shared/errorModes.js
18
18
  import { findsOnRead } from "./shared/issueFeatures.js";
@@ -5,10 +5,10 @@ import {
5
5
  groupByPath,
6
6
  labelOf,
7
7
  writeKeywordExpected
8
- } from "./chunk-MBNIYKKT.js";
8
+ } from "./chunk-D4LE34UY.js";
9
9
  import {
10
10
  printedActualOf
11
- } from "./chunk-3KBOPH3J.js";
11
+ } from "./chunk-GU3X7OIZ.js";
12
12
  import {
13
13
  listPattern
14
14
  } from "./chunk-3SH2BQ4T.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  errorModes
3
- } from "./chunk-S6DRXKT4.js";
3
+ } from "./chunk-AK2LKC6C.js";
4
4
  import {
5
5
  $ark
6
- } from "./chunk-MBNIYKKT.js";
6
+ } from "./chunk-D4LE34UY.js";
7
7
 
8
8
  // ../schema/out/errors.js
9
9
  $ark.errorModes = errorModes;
@@ -21,14 +21,13 @@ import {
21
21
  writeProtoActual,
22
22
  writeUnitActual,
23
23
  writeUnitMessage
24
- } from "./chunk-3KBOPH3J.js";
24
+ } from "./chunk-GU3X7OIZ.js";
25
25
  import {
26
26
  nameOf,
27
27
  register,
28
28
  registry
29
- } from "./chunk-27A5YUWC.js";
29
+ } from "./chunk-J7NBKIKH.js";
30
30
  import {
31
- appendStringifiedKey,
32
31
  appendUnique,
33
32
  conflatenateAll,
34
33
  describeCollapsibleDate,
@@ -894,52 +893,6 @@ var errorsToJson = {
894
893
  };
895
894
  var serializableErrors = (issues) => issues.toJSON ? issues : Object.defineProperty(issues, "toJSON", errorsToJson);
896
895
  var firstIssue = (errors) => errors._first ?? errors.issues[0];
897
- var byPath = function (errors) {
898
- const result = {};
899
- for (const error of errors.issues) {
900
- const k = propStringOf(error);
901
- if (!hasOwn(result, k))
902
- defineEntry(result, k, error);
903
- }
904
- return result;
905
- };
906
- var flatByPath = function (errors) {
907
- const result = {};
908
- for (const error of errors.issues)
909
- addEntry(result, propStringOf(error), error);
910
- return result;
911
- };
912
- var flatMessagesByPath = function (errors) {
913
- const result = {};
914
- for (const error of errors.issues)
915
- addEntry(result, propStringOf(error), error.message);
916
- return result;
917
- };
918
- var byAncestorPath = function (errors) {
919
- const result = {};
920
- for (const error of errors.issues) {
921
- let propString = "";
922
- addEntry(result, propString, error);
923
- for (const k of error.path) {
924
- propString = appendStringifiedKey(propString, k);
925
- addEntry(result, propString, error);
926
- }
927
- }
928
- return result;
929
- };
930
- var propStringOf = (error) => error.propString ?? stringifyPath(error.path);
931
- var addEntry = (result, k, value) => {
932
- if (hasOwn(result, k))
933
- result[k].push(value);
934
- else
935
- defineEntry(result, k, [value]);
936
- };
937
- var defineEntry = (result, k, value) => Object.defineProperty(result, k, {
938
- value,
939
- enumerable: true,
940
- writable: true,
941
- configurable: true
942
- });
943
896
  var configureAfterTypeMessage = "configure() must be called before any Type is created, so import the module calling it before any module that creates one";
944
897
  var unrenderedLocaleMessage = 'import "arktype/i18n" to write errors in locales other than en';
945
898
  var copiedErrorMessage = "Only errors validation returned can be written again, not copies";
@@ -1101,10 +1054,6 @@ export {
1101
1054
  unwrittenError,
1102
1055
  serializableErrors,
1103
1056
  firstIssue,
1104
- byPath,
1105
- flatByPath,
1106
- flatMessagesByPath,
1107
- byAncestorPath,
1108
1057
  configureAfterTypeMessage,
1109
1058
  unrenderedLocaleMessage,
1110
1059
  copiedErrorMessage,
@@ -38,6 +38,8 @@ import {
38
38
  bakedJsonSchemaOptionsMessage,
39
39
  bakedStandardJsonSchema,
40
40
  booleanChecker,
41
+ byAncestorPath,
42
+ byPath,
41
43
  callMorph,
42
44
  callingDeferredRootApply,
43
45
  callingRootApply,
@@ -114,6 +116,8 @@ import {
114
116
  firstIssue,
115
117
  fixConfig,
116
118
  fixConfigured,
119
+ flatByPath,
120
+ flatMessagesByPath,
117
121
  foundErrors,
118
122
  freeze,
119
123
  holdHoles,
@@ -166,7 +170,7 @@ import {
166
170
  pipeTransformed,
167
171
  piped,
168
172
  pipedIntoUndetailed,
169
- precompiledForArktype_3_0_0_rc_2,
173
+ precompiledForArktype_3_0_0_rc_4,
170
174
  printKind,
171
175
  props,
172
176
  raisingTraversalOf,
@@ -174,6 +178,7 @@ import {
174
178
  readingCtxNode,
175
179
  receiverOf,
176
180
  recordOf,
181
+ regex,
177
182
  rejected,
178
183
  rejecting,
179
184
  rejects,
@@ -237,17 +242,17 @@ import {
237
242
  writeUnitMessage,
238
243
  writtenBy,
239
244
  writtenSiteOf
240
- } from "./chunk-VAINYPPF.js";
241
- import "./chunk-IPRMNVLB.js";
245
+ } from "./chunk-45TLVTHM.js";
246
+ import "./chunk-KCMI6RWS.js";
242
247
  import {
243
248
  keywords
244
- } from "./chunk-BNRMJNNR.js";
249
+ } from "./chunk-SKBFK3NY.js";
245
250
  import {
246
251
  InternalTypedFn
247
252
  } from "./chunk-4FTHWK63.js";
248
253
  import {
249
254
  writesInPlace
250
- } from "./chunk-Q66VX6I4.js";
255
+ } from "./chunk-QV545A7L.js";
251
256
  import {
252
257
  capitalizeString,
253
258
  emptyCollectionDefaults,
@@ -286,7 +291,7 @@ import {
286
291
  hashedPrefixLength,
287
292
  madeMorphs,
288
293
  precompileRootUnits
289
- } from "./chunk-TEE6JS3X.js";
294
+ } from "./chunk-WNFWNDER.js";
290
295
  import {
291
296
  isIpv4,
292
297
  isIpv6,
@@ -297,7 +302,7 @@ import {
297
302
  ToJsonSchema,
298
303
  foreignTypesByMorph,
299
304
  unionJsonSchemaWritersKey
300
- } from "./chunk-ZWHHA52N.js";
305
+ } from "./chunk-KSJQV74J.js";
301
306
  import {
302
307
  supportedJsonSchemaTargets,
303
308
  writeNullableJsonSchema,
@@ -309,28 +314,28 @@ import {
309
314
  import {
310
315
  rootApplyParts,
311
316
  rootApplyRuntime
312
- } from "./chunk-4FZ7IGD5.js";
317
+ } from "./chunk-PGCPLG3X.js";
313
318
  import {
314
319
  isDecidedByAllows,
315
320
  isRefinedPattern
316
- } from "./chunk-5PRGHK54.js";
321
+ } from "./chunk-ADLJDWDI.js";
317
322
  import {
318
323
  $ark,
319
324
  describesData,
320
325
  errorWriters,
321
326
  errorWritersByCode,
322
327
  registryName
323
- } from "./chunk-MBNIYKKT.js";
328
+ } from "./chunk-D4LE34UY.js";
324
329
  import {
325
330
  describeBranches,
326
331
  describeCases,
327
332
  hasArkKind,
328
333
  holeNameMarker,
329
334
  isNode
330
- } from "./chunk-3KBOPH3J.js";
335
+ } from "./chunk-GU3X7OIZ.js";
331
336
  import {
332
337
  nameOf
333
- } from "./chunk-27A5YUWC.js";
338
+ } from "./chunk-J7NBKIKH.js";
334
339
  import {
335
340
  ParseError,
336
341
  appendStringifiedKey,
@@ -414,6 +419,8 @@ __export(runtimeExports_exports, {
414
419
  bakedStandardJsonSchema: () => bakedStandardJsonSchema,
415
420
  baseNameOf: () => baseNameOf,
416
421
  booleanChecker: () => booleanChecker,
422
+ byAncestorPath: () => byAncestorPath,
423
+ byPath: () => byPath,
417
424
  callMorph: () => callMorph,
418
425
  callingDeferredRootApply: () => callingDeferredRootApply,
419
426
  callingRootApply: () => callingRootApply,
@@ -493,6 +500,8 @@ __export(runtimeExports_exports, {
493
500
  firstIssue: () => firstIssue,
494
501
  fixConfig: () => fixConfig,
495
502
  fixConfigured: () => fixConfigured,
503
+ flatByPath: () => flatByPath,
504
+ flatMessagesByPath: () => flatMessagesByPath,
496
505
  foundErrors: () => foundErrors,
497
506
  freeze: () => freeze,
498
507
  functionNameOf: () => functionNameOf,
@@ -575,7 +584,7 @@ __export(runtimeExports_exports, {
575
584
  pipeTransformed: () => pipeTransformed,
576
585
  piped: () => piped,
577
586
  pipedIntoUndetailed: () => pipedIntoUndetailed,
578
- precompiledForArktype_3_0_0_rc_2: () => precompiledForArktype_3_0_0_rc_2,
587
+ precompiledForArktype_3_0_0_rc_4: () => precompiledForArktype_3_0_0_rc_4,
579
588
  printKind: () => printKind,
580
589
  printable: () => printable,
581
590
  props: () => props,
@@ -585,6 +594,7 @@ __export(runtimeExports_exports, {
585
594
  readingCtxNode: () => readingCtxNode,
586
595
  receiverOf: () => receiverOf,
587
596
  recordOf: () => recordOf,
597
+ regex: () => regex,
588
598
  rejected: () => rejected,
589
599
  rejecting: () => rejecting,
590
600
  rejects: () => rejects,
@@ -5575,10 +5585,10 @@ ${args}`}`)}`;
5575
5585
  if (Reflect.ownKeys(value).some((k) => k !== "lastIndex")) {
5576
5586
  throwParseError(writeUnprecompilableMessage("a RegExp with its own properties"));
5577
5587
  }
5578
- const regex = `/${value.source}/${value.flags}`;
5588
+ const regex2 = `/${value.source}/${value.flags}`;
5579
5589
  if (this.patternInstances.has(value))
5580
- return this.declareConst(value, "literal", regex);
5581
- return this.declareConst(value, "literal", value.lastIndex ? `runtime.assign(${regex}, { lastIndex: ${value.lastIndex} })` : regex);
5590
+ return this.declareConst(value, "literal", regex2);
5591
+ return this.declareConst(value, "literal", value.lastIndex ? `runtime.assign(${regex2}, { lastIndex: ${value.lastIndex} })` : regex2);
5582
5592
  }
5583
5593
  return this.metas.has(value) && this.readMeta(value) || this.emitLiteral(value);
5584
5594
  }
@@ -47,7 +47,7 @@ import {
47
47
  writeForeignArkMessage,
48
48
  writeUnboundableMessage,
49
49
  writeUnresolvableMessage
50
- } from "./chunk-TEE6JS3X.js";
50
+ } from "./chunk-WNFWNDER.js";
51
51
  import {
52
52
  WeakCache,
53
53
  defineLazily
@@ -60,7 +60,7 @@ import {
60
60
  rootKinds,
61
61
  schemaKindsRightOf,
62
62
  unionJsonSchemaWritersKey
63
- } from "./chunk-ZWHHA52N.js";
63
+ } from "./chunk-KSJQV74J.js";
64
64
  import {
65
65
  openApiNull,
66
66
  writeNullableJsonSchema,
@@ -74,12 +74,12 @@ import {
74
74
  } from "./chunk-TACLEIDM.js";
75
75
  import {
76
76
  compileLiteralPropAccess
77
- } from "./chunk-5PRGHK54.js";
77
+ } from "./chunk-ADLJDWDI.js";
78
78
  import {
79
79
  $ark,
80
80
  ArkErrors,
81
81
  asTemplated
82
- } from "./chunk-MBNIYKKT.js";
82
+ } from "./chunk-D4LE34UY.js";
83
83
  import {
84
84
  defining,
85
85
  execMorph,
@@ -93,7 +93,7 @@ import {
93
93
  printSelfAsThis,
94
94
  queueUnchecked,
95
95
  throwOnDefault
96
- } from "./chunk-3KBOPH3J.js";
96
+ } from "./chunk-GU3X7OIZ.js";
97
97
  import {
98
98
  Callable,
99
99
  ParseError,
@@ -2,6 +2,7 @@ import {
2
2
  listPattern
3
3
  } from "./chunk-3SH2BQ4T.js";
4
4
  import {
5
+ appendStringifiedKey,
5
6
  arkKindOf,
6
7
  defineValue,
7
8
  describeCollapsibleDate,
@@ -22,6 +23,7 @@ import {
22
23
  pathAt,
23
24
  printKind,
24
25
  printable,
26
+ stringifyPath,
25
27
  throwError,
26
28
  timeOf
27
29
  } from "./chunk-3HZC67MT.js";
@@ -1445,6 +1447,54 @@ var computeDefaultValueMorph = (key, value, defaultInput, node = value, isThunkI
1445
1447
  };
1446
1448
  };
1447
1449
 
1450
+ // ../schema/out/shared/errorReaders.js
1451
+ var byPath = (errors) => {
1452
+ const result = {};
1453
+ for (const error of errors.issues) {
1454
+ const k = propStringOf(error);
1455
+ if (!hasOwn(result, k))
1456
+ defineEntry(result, k, error);
1457
+ }
1458
+ return result;
1459
+ };
1460
+ var flatByPath = (errors) => {
1461
+ const result = {};
1462
+ for (const error of errors.issues)
1463
+ addEntry(result, propStringOf(error), error);
1464
+ return result;
1465
+ };
1466
+ var flatMessagesByPath = (errors) => {
1467
+ const result = {};
1468
+ for (const error of errors.issues)
1469
+ addEntry(result, propStringOf(error), error.message);
1470
+ return result;
1471
+ };
1472
+ var byAncestorPath = (errors) => {
1473
+ const result = {};
1474
+ for (const error of errors.issues) {
1475
+ let propString = "";
1476
+ addEntry(result, propString, error);
1477
+ for (const k of error.path) {
1478
+ propString = appendStringifiedKey(propString, k);
1479
+ addEntry(result, propString, error);
1480
+ }
1481
+ }
1482
+ return result;
1483
+ };
1484
+ var propStringOf = (error) => error.propString ?? stringifyPath(error.path);
1485
+ var addEntry = (result, k, value) => {
1486
+ if (hasOwn(result, k))
1487
+ result[k].push(value);
1488
+ else
1489
+ defineEntry(result, k, [value]);
1490
+ };
1491
+ var defineEntry = (result, k, value) => Object.defineProperty(result, k, {
1492
+ value,
1493
+ enumerable: true,
1494
+ writable: true,
1495
+ configurable: true
1496
+ });
1497
+
1448
1498
  export {
1449
1499
  describeActual,
1450
1500
  describeUnwrittenActual,
@@ -1560,5 +1610,9 @@ export {
1560
1610
  allowsAcyclic,
1561
1611
  allowsInContext,
1562
1612
  travKey,
1563
- computeDefaultValueMorph
1613
+ computeDefaultValueMorph,
1614
+ byPath,
1615
+ flatByPath,
1616
+ flatMessagesByPath,
1617
+ byAncestorPath
1564
1618
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  inPlaceTransforms,
3
3
  inputOnlyMorphs
4
- } from "./chunk-Q66VX6I4.js";
4
+ } from "./chunk-QV545A7L.js";
5
5
  import {
6
6
  parseDate,
7
7
  parseInteger,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-4HREHNIV.js";
12
12
  import {
13
13
  $ark
14
- } from "./chunk-MBNIYKKT.js";
14
+ } from "./chunk-D4LE34UY.js";
15
15
 
16
16
  // ../schema/out/mutatesInput.js
17
17
  $ark.inPlace = inPlaceTransforms;
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3HZC67MT.js";
5
5
 
6
6
  // ../util/out/registry.js
7
- var arkUtilVersion = "3.0.0-rc.2";
7
+ var arkUtilVersion = "3.0.0-rc.4";
8
8
  var reservedRegistryKeys = {
9
9
  inPlace: void 0,
10
10
  errorModes: void 0,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  encode,
3
3
  inverses
4
- } from "./chunk-YX63Q6AT.js";
4
+ } from "./chunk-U73QHTHA.js";
5
5
  import {
6
6
  type
7
- } from "./chunk-BNRMJNNR.js";
7
+ } from "./chunk-SKBFK3NY.js";
8
8
  import {
9
9
  capitalizeString,
10
10
  keepFormatted,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-4HREHNIV.js";
27
27
  import {
28
28
  $ark
29
- } from "./chunk-MBNIYKKT.js";
29
+ } from "./chunk-D4LE34UY.js";
30
30
 
31
31
  // ../schema/out/codecs.js
32
32
  $ark.encode = encode;