@jfdevelops/react-layout 0.21.0 → 0.22.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 (109) hide show
  1. package/dist/create-config/create-resource-links.cjs +50 -20
  2. package/dist/create-config/create-resource-links.cjs.map +1 -1
  3. package/dist/create-config/create-resource-links.d.cts +18 -2
  4. package/dist/create-config/create-resource-links.d.cts.map +1 -1
  5. package/dist/create-config/create-resource-links.d.mts +18 -2
  6. package/dist/create-config/create-resource-links.d.mts.map +1 -1
  7. package/dist/create-config/create-resource-links.mjs +51 -20
  8. package/dist/create-config/create-resource-links.mjs.map +1 -1
  9. package/dist/create-config/define-layout.cjs +3 -2
  10. package/dist/create-config/define-layout.cjs.map +1 -1
  11. package/dist/create-config/define-layout.d.cts.map +1 -1
  12. package/dist/create-config/define-layout.d.mts.map +1 -1
  13. package/dist/create-config/define-layout.mjs +3 -2
  14. package/dist/create-config/define-layout.mjs.map +1 -1
  15. package/dist/create-config/for-paths/builder.cjs +6 -6
  16. package/dist/create-config/for-paths/builder.cjs.map +1 -1
  17. package/dist/create-config/for-paths/builder.mjs +6 -6
  18. package/dist/create-config/for-paths/builder.mjs.map +1 -1
  19. package/dist/create-config/for-resource.cjs +2 -1
  20. package/dist/create-config/for-resource.cjs.map +1 -1
  21. package/dist/create-config/for-resource.d.cts.map +1 -1
  22. package/dist/create-config/for-resource.d.mts.map +1 -1
  23. package/dist/create-config/for-resource.mjs +2 -1
  24. package/dist/create-config/for-resource.mjs.map +1 -1
  25. package/dist/create-config/for-resources/create-for-resources.cjs +15 -14
  26. package/dist/create-config/for-resources/create-for-resources.cjs.map +1 -1
  27. package/dist/create-config/for-resources/create-for-resources.mjs +15 -14
  28. package/dist/create-config/for-resources/create-for-resources.mjs.map +1 -1
  29. package/dist/create-config/index.d.cts +1 -1
  30. package/dist/create-config/index.d.mts +1 -1
  31. package/dist/errors/invalid-component.cjs +15 -7
  32. package/dist/errors/invalid-component.cjs.map +1 -1
  33. package/dist/errors/invalid-component.d.cts +106 -10
  34. package/dist/errors/invalid-component.d.cts.map +1 -1
  35. package/dist/errors/invalid-component.d.mts +106 -10
  36. package/dist/errors/invalid-component.d.mts.map +1 -1
  37. package/dist/errors/invalid-component.mjs +15 -7
  38. package/dist/errors/invalid-component.mjs.map +1 -1
  39. package/dist/errors/invalid-config.cjs +8 -3
  40. package/dist/errors/invalid-config.cjs.map +1 -1
  41. package/dist/errors/invalid-config.d.cts +96 -6
  42. package/dist/errors/invalid-config.d.cts.map +1 -1
  43. package/dist/errors/invalid-config.d.mts +96 -6
  44. package/dist/errors/invalid-config.d.mts.map +1 -1
  45. package/dist/errors/invalid-config.mjs +8 -3
  46. package/dist/errors/invalid-config.mjs.map +1 -1
  47. package/dist/errors/invalid-path.cjs +11 -5
  48. package/dist/errors/invalid-path.cjs.map +1 -1
  49. package/dist/errors/invalid-path.d.cts +100 -8
  50. package/dist/errors/invalid-path.d.cts.map +1 -1
  51. package/dist/errors/invalid-path.d.mts +100 -8
  52. package/dist/errors/invalid-path.d.mts.map +1 -1
  53. package/dist/errors/invalid-path.mjs +11 -5
  54. package/dist/errors/invalid-path.mjs.map +1 -1
  55. package/dist/errors/invalid-resource.cjs +11 -5
  56. package/dist/errors/invalid-resource.cjs.map +1 -1
  57. package/dist/errors/invalid-resource.d.cts +100 -8
  58. package/dist/errors/invalid-resource.d.cts.map +1 -1
  59. package/dist/errors/invalid-resource.d.mts +100 -8
  60. package/dist/errors/invalid-resource.d.mts.map +1 -1
  61. package/dist/errors/invalid-resource.mjs +11 -5
  62. package/dist/errors/invalid-resource.mjs.map +1 -1
  63. package/dist/errors/invalid-sub-resource.cjs +12 -5
  64. package/dist/errors/invalid-sub-resource.cjs.map +1 -1
  65. package/dist/errors/invalid-sub-resource.d.cts +103 -9
  66. package/dist/errors/invalid-sub-resource.d.cts.map +1 -1
  67. package/dist/errors/invalid-sub-resource.d.mts +103 -9
  68. package/dist/errors/invalid-sub-resource.d.mts.map +1 -1
  69. package/dist/errors/invalid-sub-resource.mjs +12 -5
  70. package/dist/errors/invalid-sub-resource.mjs.map +1 -1
  71. package/dist/errors/layout-configuration-error.cjs +17 -0
  72. package/dist/errors/layout-configuration-error.cjs.map +1 -0
  73. package/dist/errors/layout-configuration-error.d.cts +99 -0
  74. package/dist/errors/layout-configuration-error.d.cts.map +1 -0
  75. package/dist/errors/layout-configuration-error.d.mts +99 -0
  76. package/dist/errors/layout-configuration-error.d.mts.map +1 -0
  77. package/dist/errors/layout-configuration-error.mjs +17 -0
  78. package/dist/errors/layout-configuration-error.mjs.map +1 -0
  79. package/dist/errors/missing-path-variable.cjs +12 -5
  80. package/dist/errors/missing-path-variable.cjs.map +1 -1
  81. package/dist/errors/missing-path-variable.d.cts +99 -7
  82. package/dist/errors/missing-path-variable.d.cts.map +1 -1
  83. package/dist/errors/missing-path-variable.d.mts +99 -7
  84. package/dist/errors/missing-path-variable.d.mts.map +1 -1
  85. package/dist/errors/missing-path-variable.mjs +12 -5
  86. package/dist/errors/missing-path-variable.mjs.map +1 -1
  87. package/dist/errors/react-layout-error.cjs +38 -43
  88. package/dist/errors/react-layout-error.cjs.map +1 -1
  89. package/dist/errors/react-layout-error.d.cts +81 -38
  90. package/dist/errors/react-layout-error.d.cts.map +1 -1
  91. package/dist/errors/react-layout-error.d.mts +81 -38
  92. package/dist/errors/react-layout-error.d.mts.map +1 -1
  93. package/dist/errors/react-layout-error.mjs +39 -43
  94. package/dist/errors/react-layout-error.mjs.map +1 -1
  95. package/dist/index.cjs +4 -3
  96. package/dist/index.d.cts +4 -2
  97. package/dist/index.d.mts +4 -2
  98. package/dist/index.mjs +5 -4
  99. package/dist/node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.d.cts +107 -0
  100. package/dist/node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.d.cts.map +1 -0
  101. package/dist/node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.d.mts +107 -0
  102. package/dist/node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.d.mts.map +1 -0
  103. package/dist/resource.cjs +2 -1
  104. package/dist/resource.cjs.map +1 -1
  105. package/dist/resource.d.cts.map +1 -1
  106. package/dist/resource.d.mts.map +1 -1
  107. package/dist/resource.mjs +3 -1
  108. package/dist/resource.mjs.map +1 -1
  109. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-component.d.cts","names":[],"sources":["../../src/errors/invalid-component.ts"],"mappings":";;;cAKM,KAAA;;UAGW,uBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,SAAA;EACA,IAAA;EACA,QAAA;EACA,eAAA;EACA,MAAA;AAAA;AAAA,cACD,0BAAA;;cAGY,qBAAA,SAA8B,0BAkC1C"}
1
+ {"version":3,"file":"invalid-component.d.cts","names":[],"sources":["../../src/errors/invalid-component.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;;;;KASD,uBAAA,UAAiC,OAAA,CAAQ,KAAK;AAAA,cAAC,0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAG9C,qBAAA,SAA8B,0BA0BvC"}
@@ -1,16 +1,112 @@
1
- import { CreatedReactLayoutError, ReactLayoutErrorContext } from "./react-layout-error.mjs";
1
+ import { ImplementedErrorClass } from "../node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.mjs";
2
2
 
3
3
  //#region src/errors/invalid-component.d.ts
4
- declare const scope: "component";
5
- /** Context describing an invalid or unconfigured component slot. */
6
- interface InvalidComponentContext extends ReactLayoutErrorContext<typeof scope> {
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<{
7
5
  component: unknown;
8
- path?: string;
9
- resource?: string;
10
- validComponents?: readonly string[];
11
- reason?: string;
12
- }
13
- declare const InvalidComponentError_base: CreatedReactLayoutError<"invalidComponent", "component", InvalidComponentContext>;
6
+ scope: "component";
7
+ path?: string | undefined;
8
+ reason?: string | undefined;
9
+ resource?: string | undefined;
10
+ validComponents?: string[] | undefined;
11
+ }, {}>;
12
+ type InvalidComponentContext = typeof context.infer;
13
+ declare const InvalidComponentError_base: ImplementedErrorClass<{
14
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
15
+ code: string;
16
+ scope: string;
17
+ }, {}>;
18
+ } & {
19
+ data: {
20
+ readonly property: "context";
21
+ readonly resolve: ({
22
+ definition,
23
+ input
24
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
25
+ code: string;
26
+ scope: string;
27
+ }, {}>>) => {
28
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
29
+ };
30
+ };
31
+ message: ({
32
+ definition,
33
+ data,
34
+ implementation
35
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
36
+ code: string;
37
+ scope: string;
38
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
39
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
40
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
41
+ }>;
42
+ } & {
43
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
44
+ code: string;
45
+ scope: string;
46
+ }, {}>>): {
47
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
48
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
49
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
50
+ };
51
+ } & {
52
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
53
+ data: {
54
+ readonly property: "context";
55
+ readonly resolve: ({
56
+ definition,
57
+ input
58
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
59
+ code: string;
60
+ scope: string;
61
+ }, {}>>) => {
62
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
63
+ };
64
+ };
65
+ message: ({
66
+ definition,
67
+ data,
68
+ implementation
69
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
70
+ code: string;
71
+ scope: string;
72
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
73
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
74
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
75
+ }>;
76
+ } & {
77
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
78
+ code: string;
79
+ scope: string;
80
+ }, {}>>): {
81
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
82
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
83
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
84
+ };
85
+ }>>): {
86
+ name: string;
87
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
88
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
89
+ message: string;
90
+ context: unknown;
91
+ };
92
+ }, {
93
+ readonly code: string;
94
+ readonly scope: string;
95
+ }, {
96
+ component: unknown;
97
+ scope: "component";
98
+ path?: string | undefined;
99
+ reason?: string | undefined;
100
+ resource?: string | undefined;
101
+ validComponents?: string[] | undefined;
102
+ }, {
103
+ component: unknown;
104
+ scope: "component";
105
+ path?: string | undefined;
106
+ reason?: string | undefined;
107
+ resource?: string | undefined;
108
+ validComponents?: string[] | undefined;
109
+ }>;
14
110
  /** Thrown when a requested component slot cannot be resolved. */
15
111
  declare class InvalidComponentError extends InvalidComponentError_base {}
16
112
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-component.d.mts","names":[],"sources":["../../src/errors/invalid-component.ts"],"mappings":";;;cAKM,KAAA;;UAGW,uBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,SAAA;EACA,IAAA;EACA,QAAA;EACA,eAAA;EACA,MAAA;AAAA;AAAA,cACD,0BAAA;;cAGY,qBAAA,SAA8B,0BAkC1C"}
1
+ {"version":3,"file":"invalid-component.d.mts","names":[],"sources":["../../src/errors/invalid-component.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;;;;KASD,uBAAA,UAAiC,OAAA,CAAQ,KAAK;AAAA,cAAC,0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAG9C,qBAAA,SAA8B,0BA0BvC"}
@@ -1,19 +1,27 @@
1
1
  import { createReactLayoutError } from "./react-layout-error.mjs";
2
+ import { type } from "arktype";
2
3
 
3
4
  //#region src/errors/invalid-component.ts
4
- const scope = "component";
5
+ const context = type({
6
+ component: "unknown",
7
+ "path?": "string",
8
+ "reason?": "string",
9
+ "resource?": "string",
10
+ scope: "'component'",
11
+ "validComponents?": "string[]"
12
+ });
5
13
  /** Thrown when a requested component slot cannot be resolved. */
6
14
  var InvalidComponentError = class extends createReactLayoutError({
7
15
  code: "invalidComponent",
8
- scope
9
- })((scope, { component, path, resource, validComponents, reason }) => {
10
- const quotedComponent = JSON.stringify(component) ?? `"${String(component)}"`;
11
- const locationParts = [path ? `path "${path}"` : void 0, resource ? `resource "${resource}"` : void 0].filter((part) => part !== void 0);
16
+ scope: "component"
17
+ }).defineContext(context).implement(({ context, scope }) => {
18
+ const quotedComponent = JSON.stringify(context.component) ?? `"${String(context.component)}"`;
19
+ const locationParts = [context.path ? `path "${context.path}"` : void 0, context.resource ? `resource "${context.resource}"` : void 0].filter((part) => part !== void 0);
12
20
  const locationMessage = locationParts.length > 0 ? ` for ${locationParts.join(" and ")}` : "";
13
- return `[${scope}]: ${reason ?? `Component slot ${quotedComponent}${locationMessage} is not configured.`}${validComponents && validComponents.length > 0 ? ` Available component slots are ${new Intl.ListFormat("en", {
21
+ return `[${scope}]: ${context.reason ?? `Component slot ${quotedComponent}${locationMessage} is not configured.`}${context.validComponents && context.validComponents.length > 0 ? ` Available component slots are ${new Intl.ListFormat("en", {
14
22
  style: "long",
15
23
  type: "disjunction"
16
- }).format(validComponents)}.` : ""}`;
24
+ }).format(context.validComponents)}.` : ""}`;
17
25
  }) {};
18
26
 
19
27
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-component.mjs","names":[],"sources":["../../src/errors/invalid-component.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'component' as const;\n\n/** Context describing an invalid or unconfigured component slot. */\nexport interface InvalidComponentContext\n extends ReactLayoutErrorContext<typeof scope> {\n component: unknown;\n path?: string;\n resource?: string;\n validComponents?: readonly string[];\n reason?: string;\n}\n\n/** Thrown when a requested component slot cannot be resolved. */\nexport class InvalidComponentError extends createReactLayoutError(\n { code: 'invalidComponent', scope },\n)(\n (\n scope,\n {\n component,\n path,\n resource,\n validComponents,\n reason,\n }: InvalidComponentContext,\n ) => {\n const quotedComponent =\n JSON.stringify(component) ?? `\"${String(component)}\"`;\n const locationParts = [\n path ? `path \"${path}\"` : undefined,\n resource ? `resource \"${resource}\"` : undefined,\n ].filter((part): part is string => part !== undefined);\n const locationMessage =\n locationParts.length > 0 ? ` for ${locationParts.join(' and ')}` : '';\n const body =\n reason ??\n `Component slot ${quotedComponent}${locationMessage} is not configured.`;\n const validComponentsMessage =\n validComponents && validComponents.length > 0\n ? ` Available component slots are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(validComponents)}.`\n : '';\n\n return `[${scope}]: ${body}${validComponentsMessage}`;\n },\n) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAad,IAAa,wBAAb,cAA2C,uBACzC;CAAE,MAAM;CAAoB;AAAM,CACpC,GAEI,OACA,EACE,WACA,MACA,UACA,iBACA,aAEC;CACH,MAAM,kBACJ,KAAK,UAAU,SAAS,KAAK,IAAI,OAAO,SAAS,EAAE;CACrD,MAAM,gBAAgB,CACpB,OAAO,SAAS,KAAK,KAAK,QAC1B,WAAW,aAAa,SAAS,KAAK,MACxC,EAAE,QAAQ,SAAyB,SAAS,MAAS;CACrD,MAAM,kBACJ,cAAc,SAAS,IAAI,QAAQ,cAAc,KAAK,OAAO,MAAM;CAYrE,OAAO,IAAI,MAAM,KAVf,UACA,kBAAkB,kBAAkB,gBAAgB,uBAEpD,mBAAmB,gBAAgB,SAAS,IACxC,kCAAkC,IAAI,KAAK,WAAW,MAAM;EAC1D,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,eAAe,EAAE,KAC3B;AAGR,CACF,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-component.mjs","names":[],"sources":["../../src/errors/invalid-component.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n component: 'unknown',\n 'path?': 'string',\n 'reason?': 'string',\n 'resource?': 'string',\n scope: \"'component'\",\n 'validComponents?': 'string[]',\n});\n\nexport type InvalidComponentContext = typeof context.infer;\n\n/** Thrown when a requested component slot cannot be resolved. */\nexport class InvalidComponentError extends createReactLayoutError({\n code: 'invalidComponent',\n scope: 'component',\n})\n .defineContext(context)\n .implement(({ context, scope }) => {\n const quotedComponent =\n JSON.stringify(context.component) ?? `\"${String(context.component)}\"`;\n const locationParts = [\n context.path ? `path \"${context.path}\"` : undefined,\n context.resource ? `resource \"${context.resource}\"` : undefined,\n ].filter((part): part is string => part !== undefined);\n const locationMessage =\n locationParts.length > 0 ? ` for ${locationParts.join(' and ')}` : '';\n const body =\n context.reason ??\n `Component slot ${quotedComponent}${locationMessage} is not configured.`;\n const validComponentsMessage =\n context.validComponents && context.validComponents.length > 0\n ? ` Available component slots are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(context.validComponents)}.`\n : '';\n\n return `[${scope}]: ${body}${validComponentsMessage}`;\n }) {}\n"],"mappings":";;;;AAGA,MAAM,UAAU,KAAK;CACnB,WAAW;CACX,SAAS;CACT,WAAW;CACX,aAAa;CACb,OAAO;CACP,oBAAoB;AACtB,CAAC;;AAKD,IAAa,wBAAb,cAA2C,uBAAuB;CAChE,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,SAAS,YAAY;CACjC,MAAM,kBACJ,KAAK,UAAU,QAAQ,SAAS,KAAK,IAAI,OAAO,QAAQ,SAAS,EAAE;CACrE,MAAM,gBAAgB,CACpB,QAAQ,OAAO,SAAS,QAAQ,KAAK,KAAK,QAC1C,QAAQ,WAAW,aAAa,QAAQ,SAAS,KAAK,MACxD,EAAE,QAAQ,SAAyB,SAAS,MAAS;CACrD,MAAM,kBACJ,cAAc,SAAS,IAAI,QAAQ,cAAc,KAAK,OAAO,MAAM;CAYrE,OAAO,IAAI,MAAM,KAVf,QAAQ,UACR,kBAAkB,kBAAkB,gBAAgB,uBAEpD,QAAQ,mBAAmB,QAAQ,gBAAgB,SAAS,IACxD,kCAAkC,IAAI,KAAK,WAAW,MAAM;EAC1D,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,QAAQ,eAAe,EAAE,KACnC;AAGR,CAAC,EAAE,CAAC"}
@@ -1,12 +1,17 @@
1
1
  const require_react_layout_error = require('./react-layout-error.cjs');
2
+ let arktype = require("arktype");
2
3
 
3
4
  //#region src/errors/invalid-config.ts
4
- const scope = "config";
5
+ const context = (0, arktype.type)({
6
+ "config?": "unknown",
7
+ reason: "string",
8
+ scope: "'config'"
9
+ });
5
10
  /** Thrown when a React Layout configuration is invalid. */
6
11
  var InvalidConfigError = class extends require_react_layout_error.createReactLayoutError({
7
12
  code: "invalidConfig",
8
- scope
9
- })((scope, { reason }) => `[${scope}]: The layout configuration is invalid: ${reason}`) {};
13
+ scope: "config"
14
+ }).defineContext(context).implement(({ context, scope }) => `[${scope}]: The layout configuration is invalid: ${context.reason}`) {};
10
15
 
11
16
  //#endregion
12
17
  exports.InvalidConfigError = InvalidConfigError;
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-config.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-config.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'config' as const;\n\n/** Context describing a configuration that React Layout cannot use. */\nexport interface InvalidConfigContext\n extends ReactLayoutErrorContext<typeof scope> {\n reason: string;\n config?: unknown;\n}\n\n/** Thrown when a React Layout configuration is invalid. */\nexport class InvalidConfigError extends createReactLayoutError(\n { code: 'invalidConfig', scope },\n)(\n (scope, { reason }: InvalidConfigContext) =>\n `[${scope}]: The layout configuration is invalid: ${reason}`,\n) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAUd,IAAa,qBAAb,cAAwCA,kDACtC;CAAE,MAAM;CAAiB;AAAM,CACjC,GACG,OAAO,EAAE,aACR,IAAI,MAAM,0CAA0C,QACxD,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-config.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-config.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n 'config?': 'unknown',\n reason: 'string',\n scope: \"'config'\",\n});\n\nexport type InvalidConfigContext = typeof context.infer;\n\n/** Thrown when a React Layout configuration is invalid. */\nexport class InvalidConfigError extends createReactLayoutError({\n code: 'invalidConfig',\n scope: 'config',\n})\n .defineContext(context)\n .implement(\n ({ context, scope }) =>\n `[${scope}]: The layout configuration is invalid: ${context.reason}`,\n ) {}\n"],"mappings":";;;;AAGA,MAAM,4BAAe;CACnB,WAAW;CACX,QAAQ;CACR,OAAO;AACT,CAAC;;AAKD,IAAa,qBAAb,cAAwCA,kDAAuB;CAC7D,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WACE,EAAE,SAAS,YACV,IAAI,MAAM,0CAA0C,QAAQ,QAChE,EAAE,CAAC"}
@@ -1,13 +1,103 @@
1
- import { CreatedReactLayoutError, ReactLayoutErrorContext } from "./react-layout-error.cjs";
1
+ import { ImplementedErrorClass } from "../node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.cjs";
2
2
 
3
3
  //#region src/errors/invalid-config.d.ts
4
- declare const scope: "config";
5
- /** Context describing a configuration that React Layout cannot use. */
6
- interface InvalidConfigContext extends ReactLayoutErrorContext<typeof scope> {
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<{
7
5
  reason: string;
6
+ scope: "config";
8
7
  config?: unknown;
9
- }
10
- declare const InvalidConfigError_base: CreatedReactLayoutError<"invalidConfig", "config", InvalidConfigContext>;
8
+ }, {}>;
9
+ type InvalidConfigContext = typeof context.infer;
10
+ declare const InvalidConfigError_base: ImplementedErrorClass<{
11
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
12
+ code: string;
13
+ scope: string;
14
+ }, {}>;
15
+ } & {
16
+ data: {
17
+ readonly property: "context";
18
+ readonly resolve: ({
19
+ definition,
20
+ input
21
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
22
+ code: string;
23
+ scope: string;
24
+ }, {}>>) => {
25
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
26
+ };
27
+ };
28
+ message: ({
29
+ definition,
30
+ data,
31
+ implementation
32
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
33
+ code: string;
34
+ scope: string;
35
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
36
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
37
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
38
+ }>;
39
+ } & {
40
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
41
+ code: string;
42
+ scope: string;
43
+ }, {}>>): {
44
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
45
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
46
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
47
+ };
48
+ } & {
49
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
50
+ data: {
51
+ readonly property: "context";
52
+ readonly resolve: ({
53
+ definition,
54
+ input
55
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
56
+ code: string;
57
+ scope: string;
58
+ }, {}>>) => {
59
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
60
+ };
61
+ };
62
+ message: ({
63
+ definition,
64
+ data,
65
+ implementation
66
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
67
+ code: string;
68
+ scope: string;
69
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
70
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
71
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
72
+ }>;
73
+ } & {
74
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
75
+ code: string;
76
+ scope: string;
77
+ }, {}>>): {
78
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
79
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
80
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
81
+ };
82
+ }>>): {
83
+ name: string;
84
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
85
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
86
+ message: string;
87
+ context: unknown;
88
+ };
89
+ }, {
90
+ readonly code: string;
91
+ readonly scope: string;
92
+ }, {
93
+ reason: string;
94
+ scope: "config";
95
+ config?: unknown;
96
+ }, {
97
+ reason: string;
98
+ scope: "config";
99
+ config?: unknown;
100
+ }>;
11
101
  /** Thrown when a React Layout configuration is invalid. */
12
102
  declare class InvalidConfigError extends InvalidConfigError_base {}
13
103
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-config.d.cts","names":[],"sources":["../../src/errors/invalid-config.ts"],"mappings":";;;cAKM,KAAA;;UAGW,oBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,MAAA;EACA,MAAA;AAAA;AAAA,cACD,uBAAA;AAJD;AAAA,cAOa,kBAAA,SAA2B,uBAKvC"}
1
+ {"version":3,"file":"invalid-config.d.cts","names":[],"sources":["../../src/errors/invalid-config.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;KAMD,oBAAA,UAA8B,OAAA,CAAQ,KAAK;AAAA,cAAC,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAG3C,kBAAA,SAA2B,uBAQrC"}
@@ -1,13 +1,103 @@
1
- import { CreatedReactLayoutError, ReactLayoutErrorContext } from "./react-layout-error.mjs";
1
+ import { ImplementedErrorClass } from "../node_modules/.pnpm/@jfdevelops_create-error@0.2.0_patch_hash_afc71b16c3f866f54416d30f467784ddc31736feb04f281a5fc4772ea422f4a9/node_modules/@jfdevelops/create-error/dist/types.mjs";
2
2
 
3
3
  //#region src/errors/invalid-config.d.ts
4
- declare const scope: "config";
5
- /** Context describing a configuration that React Layout cannot use. */
6
- interface InvalidConfigContext extends ReactLayoutErrorContext<typeof scope> {
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<{
7
5
  reason: string;
6
+ scope: "config";
8
7
  config?: unknown;
9
- }
10
- declare const InvalidConfigError_base: CreatedReactLayoutError<"invalidConfig", "config", InvalidConfigContext>;
8
+ }, {}>;
9
+ type InvalidConfigContext = typeof context.infer;
10
+ declare const InvalidConfigError_base: ImplementedErrorClass<{
11
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
12
+ code: string;
13
+ scope: string;
14
+ }, {}>;
15
+ } & {
16
+ data: {
17
+ readonly property: "context";
18
+ readonly resolve: ({
19
+ definition,
20
+ input
21
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
22
+ code: string;
23
+ scope: string;
24
+ }, {}>>) => {
25
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
26
+ };
27
+ };
28
+ message: ({
29
+ definition,
30
+ data,
31
+ implementation
32
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
33
+ code: string;
34
+ scope: string;
35
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
36
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
37
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
38
+ }>;
39
+ } & {
40
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
41
+ code: string;
42
+ scope: string;
43
+ }, {}>>): {
44
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
45
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
46
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
47
+ };
48
+ } & {
49
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
50
+ data: {
51
+ readonly property: "context";
52
+ readonly resolve: ({
53
+ definition,
54
+ input
55
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
56
+ code: string;
57
+ scope: string;
58
+ }, {}>>) => {
59
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
60
+ };
61
+ };
62
+ message: ({
63
+ definition,
64
+ data,
65
+ implementation
66
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
67
+ code: string;
68
+ scope: string;
69
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
70
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
71
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
72
+ }>;
73
+ } & {
74
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
75
+ code: string;
76
+ scope: string;
77
+ }, {}>>): {
78
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
79
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
80
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
81
+ };
82
+ }>>): {
83
+ name: string;
84
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
85
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
86
+ message: string;
87
+ context: unknown;
88
+ };
89
+ }, {
90
+ readonly code: string;
91
+ readonly scope: string;
92
+ }, {
93
+ reason: string;
94
+ scope: "config";
95
+ config?: unknown;
96
+ }, {
97
+ reason: string;
98
+ scope: "config";
99
+ config?: unknown;
100
+ }>;
11
101
  /** Thrown when a React Layout configuration is invalid. */
12
102
  declare class InvalidConfigError extends InvalidConfigError_base {}
13
103
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-config.d.mts","names":[],"sources":["../../src/errors/invalid-config.ts"],"mappings":";;;cAKM,KAAA;;UAGW,oBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,MAAA;EACA,MAAA;AAAA;AAAA,cACD,uBAAA;AAJD;AAAA,cAOa,kBAAA,SAA2B,uBAKvC"}
1
+ {"version":3,"file":"invalid-config.d.mts","names":[],"sources":["../../src/errors/invalid-config.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;KAMD,oBAAA,UAA8B,OAAA,CAAQ,KAAK;AAAA,cAAC,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAG3C,kBAAA,SAA2B,uBAQrC"}
@@ -1,12 +1,17 @@
1
1
  import { createReactLayoutError } from "./react-layout-error.mjs";
2
+ import { type } from "arktype";
2
3
 
3
4
  //#region src/errors/invalid-config.ts
4
- const scope = "config";
5
+ const context = type({
6
+ "config?": "unknown",
7
+ reason: "string",
8
+ scope: "'config'"
9
+ });
5
10
  /** Thrown when a React Layout configuration is invalid. */
6
11
  var InvalidConfigError = class extends createReactLayoutError({
7
12
  code: "invalidConfig",
8
- scope
9
- })((scope, { reason }) => `[${scope}]: The layout configuration is invalid: ${reason}`) {};
13
+ scope: "config"
14
+ }).defineContext(context).implement(({ context, scope }) => `[${scope}]: The layout configuration is invalid: ${context.reason}`) {};
10
15
 
11
16
  //#endregion
12
17
  export { InvalidConfigError };
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-config.mjs","names":[],"sources":["../../src/errors/invalid-config.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'config' as const;\n\n/** Context describing a configuration that React Layout cannot use. */\nexport interface InvalidConfigContext\n extends ReactLayoutErrorContext<typeof scope> {\n reason: string;\n config?: unknown;\n}\n\n/** Thrown when a React Layout configuration is invalid. */\nexport class InvalidConfigError extends createReactLayoutError(\n { code: 'invalidConfig', scope },\n)(\n (scope, { reason }: InvalidConfigContext) =>\n `[${scope}]: The layout configuration is invalid: ${reason}`,\n) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAUd,IAAa,qBAAb,cAAwC,uBACtC;CAAE,MAAM;CAAiB;AAAM,CACjC,GACG,OAAO,EAAE,aACR,IAAI,MAAM,0CAA0C,QACxD,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-config.mjs","names":[],"sources":["../../src/errors/invalid-config.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n 'config?': 'unknown',\n reason: 'string',\n scope: \"'config'\",\n});\n\nexport type InvalidConfigContext = typeof context.infer;\n\n/** Thrown when a React Layout configuration is invalid. */\nexport class InvalidConfigError extends createReactLayoutError({\n code: 'invalidConfig',\n scope: 'config',\n})\n .defineContext(context)\n .implement(\n ({ context, scope }) =>\n `[${scope}]: The layout configuration is invalid: ${context.reason}`,\n ) {}\n"],"mappings":";;;;AAGA,MAAM,UAAU,KAAK;CACnB,WAAW;CACX,QAAQ;CACR,OAAO;AACT,CAAC;;AAKD,IAAa,qBAAb,cAAwC,uBAAuB;CAC7D,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WACE,EAAE,SAAS,YACV,IAAI,MAAM,0CAA0C,QAAQ,QAChE,EAAE,CAAC"}
@@ -1,16 +1,22 @@
1
1
  const require_react_layout_error = require('./react-layout-error.cjs');
2
+ let arktype = require("arktype");
2
3
 
3
4
  //#region src/errors/invalid-path.ts
4
- const scope = "path";
5
+ const context = (0, arktype.type)({
6
+ path: "unknown",
7
+ "reason?": "string",
8
+ scope: "'path'",
9
+ "validPaths?": "string[]"
10
+ });
5
11
  /** Thrown when a requested layout path is invalid or unavailable. */
6
12
  var InvalidPathError = class extends require_react_layout_error.createReactLayoutError({
7
13
  code: "invalidPath",
8
- scope
9
- })((scope, { path, validPaths, reason }) => {
10
- return `[${scope}]: Path ${JSON.stringify(path) ?? `"${String(path)}"`} is not available.${reason ? ` ${reason}` : ""}${validPaths && validPaths.length > 0 ? ` Available paths are ${new Intl.ListFormat("en", {
14
+ scope: "path"
15
+ }).defineContext(context).implement(({ context, scope }) => {
16
+ return `[${scope}]: Path ${JSON.stringify(context.path) ?? `"${String(context.path)}"`} is not available.${context.reason ? ` ${context.reason}` : ""}${context.validPaths && context.validPaths.length > 0 ? ` Available paths are ${new Intl.ListFormat("en", {
11
17
  style: "long",
12
18
  type: "disjunction"
13
- }).format(validPaths)}.` : ""}`;
19
+ }).format(context.validPaths)}.` : ""}`;
14
20
  }) {};
15
21
 
16
22
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-path.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-path.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'path' as const;\n\n/** Context describing a path that is unavailable to React Layout. */\nexport interface InvalidPathContext\n extends ReactLayoutErrorContext<typeof scope> {\n path: unknown;\n validPaths?: readonly string[];\n reason?: string;\n}\n\n/** Thrown when a requested layout path is invalid or unavailable. */\nexport class InvalidPathError extends createReactLayoutError(\n { code: 'invalidPath', scope },\n)((scope, { path, validPaths, reason }: InvalidPathContext) => {\n const quotedPath = JSON.stringify(path) ?? `\"${String(path)}\"`;\n const reasonMessage = reason ? ` ${reason}` : '';\n const validPathsMessage =\n validPaths && validPaths.length > 0\n ? ` Available paths are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(validPaths)}.`\n : '';\n\n return `[${scope}]: Path ${quotedPath} is not available.${reasonMessage}${validPathsMessage}`;\n}) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAWd,IAAa,mBAAb,cAAsCA,kDACpC;CAAE,MAAM;CAAe;AAAM,CAC/B,GAAG,OAAO,EAAE,MAAM,YAAY,aAAiC;CAW7D,OAAO,IAAI,MAAM,UAVE,KAAK,UAAU,IAAI,KAAK,IAAI,OAAO,IAAI,EAAE,GAUtB,oBAThB,SAAS,IAAI,WAAW,KAE5C,cAAc,WAAW,SAAS,IAC9B,wBAAwB,IAAI,KAAK,WAAW,MAAM;EAChD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,UAAU,EAAE,KACtB;AAGR,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-path.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-path.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n path: 'unknown',\n 'reason?': 'string',\n scope: \"'path'\",\n 'validPaths?': 'string[]',\n});\n\nexport type InvalidPathContext = typeof context.infer;\n\n/** Thrown when a requested layout path is invalid or unavailable. */\nexport class InvalidPathError extends createReactLayoutError({\n code: 'invalidPath',\n scope: 'path',\n})\n .defineContext(context)\n .implement(({ context, scope }) => {\n const quotedPath =\n JSON.stringify(context.path) ?? `\"${String(context.path)}\"`;\n const reasonMessage = context.reason ? ` ${context.reason}` : '';\n const validPathsMessage =\n context.validPaths && context.validPaths.length > 0\n ? ` Available paths are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(context.validPaths)}.`\n : '';\n\n return `[${scope}]: Path ${quotedPath} is not available.${reasonMessage}${validPathsMessage}`;\n }) {}\n"],"mappings":";;;;AAGA,MAAM,4BAAe;CACnB,MAAM;CACN,WAAW;CACX,OAAO;CACP,eAAe;AACjB,CAAC;;AAKD,IAAa,mBAAb,cAAsCA,kDAAuB;CAC3D,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,SAAS,YAAY;CAYjC,OAAO,IAAI,MAAM,UAVf,KAAK,UAAU,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,IAAI,EAAE,GAUrB,oBAThB,QAAQ,SAAS,IAAI,QAAQ,WAAW,KAE5D,QAAQ,cAAc,QAAQ,WAAW,SAAS,IAC9C,wBAAwB,IAAI,KAAK,WAAW,MAAM;EAChD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,QAAQ,UAAU,EAAE,KAC9B;AAGR,CAAC,EAAE,CAAC"}